diff --git a/.eslintignore b/.eslintignore index fdd51b72c6879ff..37e0a229afb6d3c 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,6 +4,7 @@ node_modules **/dist/** examples/with-typescript-eslint-jest/** examples/with-kea/** +packages/next/bundles/webpack/packages/*.runtime.js packages/next/compiled/**/* packages/react-refresh-utils/**/*.js packages/react-dev-overlay/lib/** diff --git a/.github/actions/next-stats-action/src/prepare/repo-setup.js b/.github/actions/next-stats-action/src/prepare/repo-setup.js index 6f7b722ec6ec4ba..e5ee6d2c4b22aa6 100644 --- a/.github/actions/next-stats-action/src/prepare/repo-setup.js +++ b/.github/actions/next-stats-action/src/prepare/repo-setup.js @@ -69,13 +69,17 @@ module.exports = (actionInfo) => { for (const pkg of pkgs) { const pkgPath = path.join(repoDir, 'packages', pkg) const packedPkgPath = path.join(pkgPath, `${pkg}-packed.tgz`) - // pack the package with yarn - await exec(`cd ${pkgPath} && yarn pack -f ${pkg}-packed.tgz`) const pkgDataPath = path.join(pkgPath, 'package.json') const pkgData = require(pkgDataPath) const { name } = pkgData - pkgDatas.set(name, { pkgDataPath, pkgData, packedPkgPath }) + pkgDatas.set(name, { + pkgDataPath, + pkg, + pkgPath, + pkgData, + packedPkgPath, + }) pkgPaths.set(name, packedPkgPath) } @@ -93,6 +97,13 @@ module.exports = (actionInfo) => { 'utf8' ) } + + // wait to pack packages until after dependency paths have been updated + // to the correct versions + for (const pkgName of pkgDatas.keys()) { + const { pkg, pkgPath } = pkgDatas.get(pkgName) + await exec(`cd ${pkgPath} && yarn pack -f ${pkg}-packed.tgz`) + } return pkgPaths }, } diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 5f0dac3b38b1f09..8169f3ec5452849 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -160,6 +160,7 @@ jobs: NEXT_TELEMETRY_DISABLED: 1 NEXT_TEST_JOB: 1 HEADLESS: true + NEXT_WEBPACK5: 1 steps: - uses: actions/checkout@v2 @@ -170,9 +171,6 @@ jobs: - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }} - - run: cat package.json | jq '.resolutions.webpack = "^5.11.1"' > package.json.tmp && mv package.json.tmp package.json - if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }} - - run: cat package.json | jq '.resolutions.react = "^17.0.1"' > package.json.tmp && mv package.json.tmp package.json if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }} @@ -185,7 +183,7 @@ jobs: - run: yarn list webpack react react-dom if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }} - - run: xvfb-run node run-tests.js test/integration/{link-ref,production,basic,async-modules,font-optimization,ssr-ctx}/test/index.test.js test/acceptance/*.test.js + - run: xvfb-run node run-tests.js test/integration/{link-ref,production,basic,async-modules,ssr-ctx}/test/index.test.js test/acceptance/*.test.js if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }} testFirefox: diff --git a/.prettierignore b/.prettierignore index ea591d398df13ef..522a3d1a67eacb7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,6 +2,7 @@ node_modules **/.next/** **/_next/** **/dist/** +packages/next/bundles/webpack/packages/*.runtime.js packages/next/compiled/** packages/react-refresh-utils/**/*.js packages/react-refresh-utils/**/*.d.ts @@ -14,4 +15,4 @@ packages/next-codemod/transforms/__tests__/**/* packages/next-codemod/**/*.js packages/next-codemod/**/*.d.ts packages/next-env/**/*.d.ts -test-timings.json \ No newline at end of file +test-timings.json diff --git a/.prettierignore_staged b/.prettierignore_staged index 00f3e004f5736a7..e888b2691913937 100644 --- a/.prettierignore_staged +++ b/.prettierignore_staged @@ -2,6 +2,7 @@ **/_next/** **/dist/** packages/next/compiled/**/* +packages/next/bundles/webpack/packages/*.runtime.js lerna.json packages/next-codemod/transforms/__testfixtures__/**/* packages/next-codemod/transforms/__tests__/**/* diff --git a/check-pre-compiled.sh b/check-pre-compiled.sh index 431be334834d9f2..f0865c9db428ad1 100755 --- a/check-pre-compiled.sh +++ b/check-pre-compiled.sh @@ -1,5 +1,8 @@ #!/bin/bash +yarn --cwd packages/next/bundles +cp packages/next/bundles/node_modules/webpack5/lib/hmr/HotModuleReplacement.runtime.js packages/next/bundles/webpack/packages/ +cp packages/next/bundles/node_modules/webpack5/lib/hmr/JavascriptHotModuleReplacement.runtime.js packages/next/bundles/webpack/packages/ yarn --cwd packages/next ncc-compiled # Make sure to exit with 1 if there are changes after running ncc-compiled diff --git a/package.json b/package.json index ecca26928ab8ff8..fda6056b8172853 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "eslint": "6.8.0", "eslint-plugin-import": "2.20.2", "eslint-plugin-jest": "23.13.1", - "eslint-plugin-react": "7.18.0", + "eslint-plugin-react": "7.19.0", "eslint-plugin-react-hooks": "2.3.0", "execa": "2.0.3", "express": "4.17.0", diff --git a/packages/next/build/compiler.ts b/packages/next/build/compiler.ts index c3926e4594ff584..fe42a3442720bf0 100644 --- a/packages/next/build/compiler.ts +++ b/packages/next/build/compiler.ts @@ -1,11 +1,14 @@ -import webpack, { Stats, Configuration } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' export type CompilerResult = { errors: string[] warnings: string[] } -function generateStats(result: CompilerResult, stat: Stats): CompilerResult { +function generateStats( + result: CompilerResult, + stat: webpack.Stats +): CompilerResult { const { errors, warnings } = stat.toJson('errors-warnings') if (errors.length > 0) { result.errors.push(...errors) @@ -32,12 +35,15 @@ function closeCompiler(compiler: webpack.Compiler | webpack.MultiCompiler) { } export function runCompiler( - config: Configuration | Configuration[] + config: webpack.Configuration | webpack.Configuration[] ): Promise { return new Promise((resolve, reject) => { const compiler = webpack(config) compiler.run( - (err: Error, statsOrMultiStats: { stats: Stats[] } | Stats) => { + ( + err: Error, + statsOrMultiStats: { stats: webpack.Stats[] } | webpack.Stats + ) => { closeCompiler(compiler).then(() => { if (err) { const reason = err?.toString() diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 1b2e33c7c6e5386..aaccf1aae36fbbd 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -7,8 +7,11 @@ import semver from 'next/dist/compiled/semver' // @ts-ignore No typings yet import TerserPlugin from './webpack/plugins/terser-webpack-plugin/src/index.js' import path from 'path' -import webpack from 'webpack' -import { Configuration } from 'webpack' +import { + webpack, + isWebpack5, + init as initWebpack, +} from 'next/dist/compiled/webpack/webpack' import { DOT_NEXT_ALIAS, NEXT_PROJECT_ROOT, @@ -61,23 +64,16 @@ import { NextConfig } from '../next-server/server/config' type ExcludesFalse = (x: T | false) => x is T -const isWebpack5 = parseInt(webpack.version!) === 5 - -if (isWebpack5 && semver.lt(webpack.version!, '5.11.1')) { - Log.error( - `webpack 5 version must be greater than v5.11.1 to work properly with Next.js, please upgrade to continue!\nSee more info here: https://err.sh/next.js/invalid-webpack-5-version` - ) - process.exit(1) -} - -const devtoolRevertWarning = execOnce((devtool: Configuration['devtool']) => { - console.warn( - chalk.yellow.bold('Warning: ') + - chalk.bold(`Reverting webpack devtool to '${devtool}'.\n`) + - 'Changing the webpack devtool in development mode will cause severe performance regressions.\n' + - 'Read more: https://err.sh/next.js/improper-devtool' - ) -}) +const devtoolRevertWarning = execOnce( + (devtool: webpack.Configuration['devtool']) => { + console.warn( + chalk.yellow.bold('Warning: ') + + chalk.bold(`Reverting webpack devtool to '${devtool}'.\n`) + + 'Changing the webpack devtool in development mode will cause severe performance regressions.\n' + + 'Read more: https://err.sh/next.js/improper-devtool' + ) + } +) function parseJsonFile(filePath: string) { const JSON5 = require('next/dist/compiled/json5') @@ -208,6 +204,12 @@ export default async function getBaseWebpackConfig( rewrites: Rewrite[] } ): Promise { + initWebpack( + config.future?.webpack5 || + (config.future?.webpack5 !== false && + Number(process.env.NEXT_WEBPACK5) > 0) + ) + let plugins: PluginMetaData[] = [] let babelPresetPlugins: { dir: string; config: any }[] = [] @@ -909,7 +911,7 @@ export default async function getBaseWebpackConfig( ].filter(Boolean), }, plugins: [ - hasReactRefresh && new ReactRefreshWebpackPlugin(), + hasReactRefresh && new ReactRefreshWebpackPlugin(webpack), // Makes sure `Buffer` and `process` are polyfilled in client-side bundles (same behavior as webpack 4) isWebpack5 && !isServer && diff --git a/packages/next/build/webpack/config/blocks/base.ts b/packages/next/build/webpack/config/blocks/base.ts index 34b117a44081a85..85f7babc02a9b48 100644 --- a/packages/next/build/webpack/config/blocks/base.ts +++ b/packages/next/build/webpack/config/blocks/base.ts @@ -1,13 +1,13 @@ import isWslBoolean from 'next/dist/compiled/is-wsl' import curry from 'next/dist/compiled/lodash.curry' -import { Configuration } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' import { ConfigurationContext } from '../utils' const isWindows = process.platform === 'win32' || isWslBoolean export const base = curry(function base( ctx: ConfigurationContext, - config: Configuration + config: webpack.Configuration ) { config.mode = ctx.isDevelopment ? 'development' : 'production' config.name = ctx.isServer ? 'server' : 'client' diff --git a/packages/next/build/webpack/config/blocks/css/index.ts b/packages/next/build/webpack/config/blocks/css/index.ts index 549e061cb05fd4d..0edf224e45de37d 100644 --- a/packages/next/build/webpack/config/blocks/css/index.ts +++ b/packages/next/build/webpack/config/blocks/css/index.ts @@ -1,6 +1,6 @@ import curry from 'next/dist/compiled/lodash.curry' import path from 'path' -import webpack, { Configuration } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' import MiniCssExtractPlugin from '../../../plugins/mini-css-extract-plugin' import { loader, plugin } from '../../helpers' import { ConfigurationContext, ConfigurationFn, pipe } from '../../utils' @@ -26,7 +26,7 @@ const regexSassModules = /\.module\.(scss|sass)$/ export const css = curry(async function css( ctx: ConfigurationContext, - config: Configuration + config: webpack.Configuration ) { const { prependData: sassPrependData, @@ -38,7 +38,7 @@ export const css = curry(async function css( // First, process files with `sass-loader`: this inlines content, and // compiles away the proprietary syntax. { - loader: require.resolve('sass-loader'), + loader: require.resolve('next/dist/compiled/sass-loader'), options: { // Source maps are required so that `resolve-url-loader` can locate // files original to their source directory. diff --git a/packages/next/build/webpack/config/blocks/css/loaders/client.ts b/packages/next/build/webpack/config/blocks/css/loaders/client.ts index 3e260ce069c8df7..f09e66c1f1d2585 100644 --- a/packages/next/build/webpack/config/blocks/css/loaders/client.ts +++ b/packages/next/build/webpack/config/blocks/css/loaders/client.ts @@ -1,4 +1,4 @@ -import webpack from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' import MiniCssExtractPlugin from '../../../../plugins/mini-css-extract-plugin' export function getClientStyleLoader({ diff --git a/packages/next/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.ts b/packages/next/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.ts index 6ddedfe3d064dfd..047320273a44913 100644 --- a/packages/next/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.ts +++ b/packages/next/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.ts @@ -1,6 +1,6 @@ import loaderUtils from 'loader-utils' import path from 'path' -import webpack from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' const regexLikeIndexModule = /(? { const { diff --git a/packages/next/build/webpack/loaders/noop-loader.ts b/packages/next/build/webpack/loaders/noop-loader.ts index c8dde089f1ad081..258fd1667d592ef 100644 --- a/packages/next/build/webpack/loaders/noop-loader.ts +++ b/packages/next/build/webpack/loaders/noop-loader.ts @@ -1,4 +1,4 @@ -import { loader } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' -const NoopLoader: loader.Loader = (source) => source +const NoopLoader: webpack.loader.Loader = (source) => source export default NoopLoader diff --git a/packages/next/build/webpack/plugins/build-manifest-plugin.ts b/packages/next/build/webpack/plugins/build-manifest-plugin.ts index ddd11fbd12693b9..5cfe31ba85d6975 100644 --- a/packages/next/build/webpack/plugins/build-manifest-plugin.ts +++ b/packages/next/build/webpack/plugins/build-manifest-plugin.ts @@ -1,6 +1,9 @@ import devalue from 'next/dist/compiled/devalue' -import webpack, { Compiler, compilation as CompilationType } from 'webpack' -import sources from 'webpack-sources' +import { + webpack, + isWebpack5, + sources, +} from 'next/dist/compiled/webpack/webpack' import { BUILD_MANIFEST, CLIENT_STATIC_FILES_PATH, @@ -16,10 +19,6 @@ import { Rewrite } from '../../../lib/load-custom-routes' import { getSortedRoutes } from '../../../next-server/lib/router/utils' import { tracer, traceFn } from '../../tracer' import { spans } from './profiling-plugin' -// @ts-ignore: TODO: remove ignore when webpack 5 is stable -const { RawSource } = webpack.sources || sources - -const isWebpack5 = parseInt(webpack.version!) === 5 type DeepMutable = { -readonly [P in keyof T]: DeepMutable } @@ -107,7 +106,7 @@ export default class BuildManifestPlugin { return tracer.withSpan(spans.get(compiler), () => { const span = tracer.startSpan('NextJsBuildManifest-createassets') return traceFn(span, () => { - const namedChunks: Map = + const namedChunks: Map = compilation.namedChunks const assetMap: DeepMutable = { polyfillFiles: [], @@ -200,20 +199,20 @@ export default class BuildManifestPlugin { const ssgManifestPath = `${CLIENT_STATIC_FILES_PATH}/${this.buildId}/_ssgManifest.js` assetMap.lowPriorityFiles.push(ssgManifestPath) - assets[ssgManifestPath] = new RawSource(srcEmptySsgManifest) + assets[ssgManifestPath] = new sources.RawSource(srcEmptySsgManifest) assetMap.pages = Object.keys(assetMap.pages) .sort() // eslint-disable-next-line .reduce((a, c) => ((a[c] = assetMap.pages[c]), a), {} as any) - assets[BUILD_MANIFEST] = new RawSource( + assets[BUILD_MANIFEST] = new sources.RawSource( JSON.stringify(assetMap, null, 2) ) const clientManifestPath = `${CLIENT_STATIC_FILES_PATH}/${this.buildId}/_buildManifest.js` - assets[clientManifestPath] = new RawSource( + assets[clientManifestPath] = new sources.RawSource( `self.__BUILD_MANIFEST = ${generateClientManifest( compiler, assetMap, @@ -226,7 +225,7 @@ export default class BuildManifestPlugin { }) } - apply(compiler: Compiler) { + apply(compiler: webpack.Compiler) { if (isWebpack5) { compiler.hooks.make.tap('NextJsBuildManifest', (compilation) => { // @ts-ignore TODO: Remove ignore when webpack 5 is stable diff --git a/packages/next/build/webpack/plugins/chunk-names-plugin.ts b/packages/next/build/webpack/plugins/chunk-names-plugin.ts index 8d12acd9d17f5fc..0b8ea23e4808e0a 100644 --- a/packages/next/build/webpack/plugins/chunk-names-plugin.ts +++ b/packages/next/build/webpack/plugins/chunk-names-plugin.ts @@ -1,9 +1,9 @@ -import { Compiler } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' // This plugin mirrors webpack 3 `filename` and `chunkfilename` behavior // This fixes https://github.com/webpack/webpack/issues/6598 // This plugin is based on https://github.com/researchgate/webpack/commit/2f28947fa0c63ccbb18f39c0098bd791a2c37090 export default class ChunkNamesPlugin { - apply(compiler: Compiler) { + apply(compiler: webpack.Compiler) { compiler.hooks.compilation.tap( 'NextJsChunkNamesPlugin', (compilation: any) => { diff --git a/packages/next/build/webpack/plugins/css-minimizer-plugin.ts b/packages/next/build/webpack/plugins/css-minimizer-plugin.ts index 6f6a18b26fb87e8..b417fdbb3c885ea 100644 --- a/packages/next/build/webpack/plugins/css-minimizer-plugin.ts +++ b/packages/next/build/webpack/plugins/css-minimizer-plugin.ts @@ -1,14 +1,14 @@ import cssnanoSimple from 'cssnano-simple' import postcssScss from 'next/dist/compiled/postcss-scss' import postcss, { Parser } from 'postcss' -import webpack from 'webpack' -import sources from 'webpack-sources' +import { + webpack, + isWebpack5, + sources, +} from 'next/dist/compiled/webpack/webpack' import { tracer, traceAsyncFn } from '../../tracer' import { spans } from './profiling-plugin' -// @ts-ignore: TODO: remove ignore when webpack 5 is stable -const { RawSource, SourceMapSource } = webpack.sources || sources - // https://github.com/NMFR/optimize-css-assets-webpack-plugin/blob/0a410a9bf28c7b0e81a3470a13748e68ca2f50aa/src/index.js#L20 const CSS_REGEX = /\.css(\?.*)?$/i @@ -18,8 +18,6 @@ type CssMinimizerPluginOptions = { } } -const isWebpack5 = parseInt(webpack.version!) === 5 - export class CssMinimizerPlugin { __next_css_remove = true @@ -54,9 +52,9 @@ export class CssMinimizerPlugin { .process(input, postcssOptions) .then((res) => { if (res.map) { - return new SourceMapSource(res.css, file, res.map.toJSON()) + return new sources.SourceMapSource(res.css, file, res.map.toJSON()) } else { - return new RawSource(res.css) + return new sources.RawSource(res.css) } }) } diff --git a/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts b/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts index f53e832985e5c3c..215f5f5c00aa151 100644 --- a/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts +++ b/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts @@ -1,6 +1,10 @@ -import webpack, { compilation as CompilationType, Compiler } from 'webpack' +import { + webpack, + BasicEvaluatedExpression, + isWebpack5, + sources, +} from 'next/dist/compiled/webpack/webpack' import { namedTypes } from 'ast-types' -import sources from 'webpack-sources' import { getFontDefinitionFromNetwork, FontManifest, @@ -12,18 +16,6 @@ import { OPTIMIZED_FONT_PROVIDERS, } from '../../../next-server/lib/constants' -// @ts-ignore: TODO: remove ignore when webpack 5 is stable -const { RawSource } = webpack.sources || sources - -const isWebpack5 = parseInt(webpack.version!) === 5 - -let BasicEvaluatedExpression: any -if (isWebpack5) { - BasicEvaluatedExpression = require('webpack/lib/javascript/BasicEvaluatedExpression') -} else { - BasicEvaluatedExpression = require('webpack/lib/BasicEvaluatedExpression') -} - async function minifyCss(css: string): Promise { return new Promise((resolve) => postcss([ @@ -41,12 +33,12 @@ async function minifyCss(css: string): Promise { } export class FontStylesheetGatheringPlugin { - compiler?: Compiler + compiler?: webpack.Compiler gatheredStylesheets: Array = [] manifestContent: FontManifest = [] private parserHandler = ( - factory: CompilationType.NormalModuleFactory + factory: webpack.compilation.NormalModuleFactory ): void => { const JS_TYPES = ['auto', 'esm', 'dynamic'] // Do an extra walk per module and add interested visitors to the walk. @@ -134,7 +126,7 @@ export class FontStylesheetGatheringPlugin { } } - public apply(compiler: Compiler) { + public apply(compiler: webpack.Compiler) { this.compiler = compiler compiler.hooks.normalModuleFactory.tap( this.constructor.name, @@ -180,7 +172,7 @@ export class FontStylesheetGatheringPlugin { }) } if (!isWebpack5) { - compilation.assets[FONT_MANIFEST] = new RawSource( + compilation.assets[FONT_MANIFEST] = new sources.RawSource( JSON.stringify(this.manifestContent, null, ' ') ) } @@ -200,7 +192,7 @@ export class FontStylesheetGatheringPlugin { stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS, }, (assets: any) => { - assets[FONT_MANIFEST] = new RawSource( + assets[FONT_MANIFEST] = new sources.RawSource( JSON.stringify(this.manifestContent, null, ' ') ) } diff --git a/packages/next/build/webpack/plugins/jsconfig-paths-plugin.ts b/packages/next/build/webpack/plugins/jsconfig-paths-plugin.ts index 0e3ee873ca93626..367e7e563512599 100644 --- a/packages/next/build/webpack/plugins/jsconfig-paths-plugin.ts +++ b/packages/next/build/webpack/plugins/jsconfig-paths-plugin.ts @@ -4,7 +4,7 @@ * https://github.com/microsoft/TypeScript/blob/214df64e287804577afa1fea0184c18c40f7d1ca/LICENSE.txt */ import path from 'path' -import { ResolvePlugin } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' import { debug } from 'next/dist/compiled/debug' const log = debug('next:jsconfig-paths-plugin') @@ -136,7 +136,7 @@ type Paths = { [match: string]: string[] } * Largely based on how the TypeScript compiler handles it: * https://github.com/microsoft/TypeScript/blob/1a9c8197fffe3dace5f8dca6633d450a88cba66d/src/compiler/moduleNameResolver.ts#L1362 */ -export class JsConfigPathsPlugin implements ResolvePlugin { +export class JsConfigPathsPlugin implements webpack.ResolvePlugin { paths: Paths resolvedBaseUrl: string constructor(paths: Paths, resolvedBaseUrl: string) { diff --git a/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/CssDependency.js b/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/CssDependency.js index 3969bacf7d34898..8f0d9ee7ba775da 100644 --- a/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/CssDependency.js +++ b/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/CssDependency.js @@ -1,59 +1,64 @@ -import webpack from 'webpack' +import { + webpack, + onWebpackInit, + isWebpack5, +} from 'next/dist/compiled/webpack/webpack' -class CssDependency extends webpack.Dependency { - constructor( - { identifier, content, media, sourceMap }, - context, - identifierIndex - ) { - super() +let CssDependency +onWebpackInit(function () { + CssDependency = class extends webpack.Dependency { + constructor( + { identifier, content, media, sourceMap }, + context, + identifierIndex + ) { + super() - this.identifier = identifier - this.identifierIndex = identifierIndex - this.content = content - this.media = media - this.sourceMap = sourceMap - this.context = context - } + this.identifier = identifier + this.identifierIndex = identifierIndex + this.content = content + this.media = media + this.sourceMap = sourceMap + this.context = context + } - getResourceIdentifier() { - return `css-module-${this.identifier}-${this.identifierIndex}` + getResourceIdentifier() { + return `css-module-${this.identifier}-${this.identifierIndex}` + } } -} -const isWebpack5 = parseInt(webpack.version) === 5 - -if (isWebpack5) { // @ts-ignore TODO: remove ts-ignore when webpack 5 is stable - webpack.util.serialization.register( - CssDependency, - 'next/dist/build/webpack/plugins/mini-css-extract-plugin/src/CssDependency', - null, - { - serialize(obj, { write }) { - write(obj.identifier) - write(obj.content) - write(obj.media) - write(obj.sourceMap) - write(obj.context) - write(obj.identifierIndex) - }, - deserialize({ read }) { - const obj = new CssDependency( - { - identifier: read(), - content: read(), - media: read(), - sourceMap: read(), - }, - read(), - read() - ) + if (isWebpack5) { + webpack.util.serialization.register( + CssDependency, + 'next/dist/build/webpack/plugins/mini-css-extract-plugin/src/CssDependency', + null, + { + serialize(obj, { write }) { + write(obj.identifier) + write(obj.content) + write(obj.media) + write(obj.sourceMap) + write(obj.context) + write(obj.identifierIndex) + }, + deserialize({ read }) { + const obj = new CssDependency( + { + identifier: read(), + content: read(), + media: read(), + sourceMap: read(), + }, + read(), + read() + ) - return obj - }, - } - ) -} + return obj + }, + } + ) + } +}) -export default CssDependency +export { CssDependency as default } diff --git a/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/CssModule.js b/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/CssModule.js index 45ab2a1f0c78fb1..da3bdd0512e26e4 100644 --- a/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/CssModule.js +++ b/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/CssModule.js @@ -1,97 +1,103 @@ -import webpack from 'webpack' - -class CssModule extends webpack.Module { - constructor(dependency) { - super('css/mini-extract', dependency.context) - this.id = '' - this._identifier = dependency.identifier - this._identifierIndex = dependency.identifierIndex - this.content = dependency.content - this.media = dependency.media - this.sourceMap = dependency.sourceMap - } // no source() so webpack doesn't do add stuff to the bundle - - size() { - return this.content.length - } +import { + webpack, + onWebpackInit, + isWebpack5, +} from 'next/dist/compiled/webpack/webpack' + +let CssModule + +onWebpackInit(function () { + CssModule = class extends webpack.Module { + constructor(dependency) { + super('css/mini-extract', dependency.context) + this.id = '' + this._identifier = dependency.identifier + this._identifierIndex = dependency.identifierIndex + this.content = dependency.content + this.media = dependency.media + this.sourceMap = dependency.sourceMap + } // no source() so webpack doesn't do add stuff to the bundle + + size() { + return this.content.length + } - identifier() { - return `css ${this._identifier} ${this._identifierIndex}` - } + identifier() { + return `css ${this._identifier} ${this._identifierIndex}` + } - readableIdentifier(requestShortener) { - return `css ${requestShortener.shorten(this._identifier)}${ - this._identifierIndex ? ` (${this._identifierIndex})` : '' - }` - } + readableIdentifier(requestShortener) { + return `css ${requestShortener.shorten(this._identifier)}${ + this._identifierIndex ? ` (${this._identifierIndex})` : '' + }` + } - nameForCondition() { - const resource = this._identifier.split('!').pop() + nameForCondition() { + const resource = this._identifier.split('!').pop() - const idx = resource.indexOf('?') + const idx = resource.indexOf('?') - if (idx >= 0) { - return resource.substring(0, idx) + if (idx >= 0) { + return resource.substring(0, idx) + } + + return resource } - return resource - } + updateCacheModule(module) { + this.content = module.content + this.media = module.media + this.sourceMap = module.sourceMap + } - updateCacheModule(module) { - this.content = module.content - this.media = module.media - this.sourceMap = module.sourceMap - } + needRebuild() { + return true + } - needRebuild() { - return true - } + build(options, compilation, resolver, fileSystem, callback) { + this.buildInfo = {} + this.buildMeta = {} + callback() + } - build(options, compilation, resolver, fileSystem, callback) { - this.buildInfo = {} - this.buildMeta = {} - callback() + updateHash(hash, context) { + super.updateHash(hash, context) + hash.update(this.content) + hash.update(this.media || '') + hash.update(this.sourceMap ? JSON.stringify(this.sourceMap) : '') + } } - updateHash(hash, context) { - super.updateHash(hash, context) - hash.update(this.content) - hash.update(this.media || '') - hash.update(this.sourceMap ? JSON.stringify(this.sourceMap) : '') + if (isWebpack5) { + // @ts-ignore TODO: remove ts-ignore when webpack 5 is stable + webpack.util.serialization.register( + CssModule, + 'next/dist/build/webpack/plugins/mini-css-extract-plugin/src/CssModule', + null, + { + serialize(obj, { write }) { + write(obj.context) + write(obj._identifier) + write(obj._identifierIndex) + write(obj.content) + write(obj.media) + write(obj.sourceMap) + }, + deserialize({ read }) { + const obj = new CssModule({ + context: read(), + identifier: read(), + identifierIndex: read(), + content: read(), + media: read(), + sourceMap: read(), + }) + + return obj + }, + } + ) } -} - -const isWebpack5 = parseInt(webpack.version) === 5 - -if (isWebpack5) { - // @ts-ignore TODO: remove ts-ignore when webpack 5 is stable - webpack.util.serialization.register( - CssModule, - 'next/dist/build/webpack/plugins/mini-css-extract-plugin/src/CssModule', - null, - { - serialize(obj, { write }) { - write(obj.context) - write(obj._identifier) - write(obj._identifierIndex) - write(obj.content) - write(obj.media) - write(obj.sourceMap) - }, - deserialize({ read }) { - const obj = new CssModule({ - context: read(), - identifier: read(), - identifierIndex: read(), - content: read(), - media: read(), - sourceMap: read(), - }) - - return obj - }, - } - ) -} +}) -export default CssModule +export { CssModule as default } diff --git a/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/index.js b/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/index.js index 4f0ece4826a2678..f43a54ac4d85b19 100644 --- a/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/index.js +++ b/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/index.js @@ -1,19 +1,25 @@ /* eslint-disable class-methods-use-this */ -import webpack from 'webpack' -import sources from 'webpack-sources' +import { + webpack, + isWebpack5, + onWebpackInit, + sources, +} from 'next/dist/compiled/webpack/webpack' import CssDependency from './CssDependency' import CssModule from './CssModule' -const { ConcatSource, SourceMapSource, OriginalSource } = - webpack.sources || sources -const { - Template, - util: { createHash }, -} = webpack +// Destructurings of live bindings must register for updates +let ConcatSource, SourceMapSource, OriginalSource, Template, createHash +onWebpackInit(function () { + ;({ ConcatSource, SourceMapSource, OriginalSource } = sources) + ;({ + Template, + util: { createHash }, + } = webpack) +}) -const isWebpack5 = parseInt(webpack.version) === 5 const MODULE_TYPE = 'css/mini-extract' const pluginName = 'mini-css-extract-plugin' @@ -162,7 +168,7 @@ class MiniCssExtractPlugin { if (modules) { if (isWebpack5) { - const xor = new (require('webpack/lib/util/StringXor'))() + const xor = new (require('next/dist/compiled/webpack/webpack').StringXor)() for (const m of modules) { if (m.type === MODULE_TYPE) { xor.add(compilation.chunkGraph.getModuleHash(m, chunk.runtime)) diff --git a/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/loader.js b/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/loader.js index 104497739266e36..4eeba0b83086582 100644 --- a/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/loader.js +++ b/packages/next/build/webpack/plugins/mini-css-extract-plugin/src/loader.js @@ -1,12 +1,14 @@ import NativeModule from 'module' import loaderUtils from 'loader-utils' -import webpack from 'webpack' -import NodeTargetPlugin from 'webpack/lib/node/NodeTargetPlugin' +import { + webpack, + isWebpack5, + NodeTargetPlugin, +} from 'next/dist/compiled/webpack/webpack' import CssDependency from './CssDependency' -const isWebpack5 = parseInt(webpack.version) === 5 const pluginName = 'mini-css-extract-plugin' function evalModuleCode(loaderContext, code, filename) { diff --git a/packages/next/build/webpack/plugins/next-drop-client-page-plugin.ts b/packages/next/build/webpack/plugins/next-drop-client-page-plugin.ts index 3a746b34b18237f..cb68a52bc97023c 100644 --- a/packages/next/build/webpack/plugins/next-drop-client-page-plugin.ts +++ b/packages/next/build/webpack/plugins/next-drop-client-page-plugin.ts @@ -1,30 +1,24 @@ -import { - Compiler, - compilation as CompilationType, - Plugin, - version, -} from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' +import { isWebpack5 } from 'next/dist/compiled/webpack/webpack' import { STRING_LITERAL_DROP_BUNDLE } from '../../../next-server/lib/constants' -const isWebpack5 = parseInt(version!) === 5 - export const ampFirstEntryNamesMap: WeakMap< - CompilationType.Compilation, + webpack.compilation.Compilation, string[] > = new WeakMap() const PLUGIN_NAME = 'DropAmpFirstPagesPlugin' // Prevents outputting client pages when they are not needed -export class DropClientPage implements Plugin { +export class DropClientPage implements webpack.Plugin { ampPages = new Set() - apply(compiler: Compiler) { + apply(compiler: webpack.Compiler) { compiler.hooks.compilation.tap( PLUGIN_NAME, (compilation: any, { normalModuleFactory }: any) => { // Recursively look up the issuer till it ends up at the root - function findEntryModule(mod: any): CompilationType.Module | null { + function findEntryModule(mod: any): webpack.compilation.Module | null { const queue = new Set([mod]) for (const module of queue) { if (isWebpack5) { diff --git a/packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts b/packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts index cdc3df03dcb72db..29e62e0e5b6f2b6 100644 --- a/packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts +++ b/packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts @@ -1,9 +1,8 @@ -import { Compiler, Plugin, version } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' +import { isWebpack5 } from 'next/dist/compiled/webpack/webpack' import { realpathSync } from 'fs' import path from 'path' -const isWebpack5 = parseInt(version!) === 5 - function deleteCache(filePath: string) { try { delete require.cache[realpathSync(filePath)] @@ -17,12 +16,12 @@ function deleteCache(filePath: string) { const PLUGIN_NAME = 'NextJsRequireCacheHotReloader' // This plugin flushes require.cache after emitting the files. Providing 'hot reloading' of server files. -export class NextJsRequireCacheHotReloader implements Plugin { +export class NextJsRequireCacheHotReloader implements webpack.Plugin { prevAssets: any = null previousOutputPathsWebpack5: Set = new Set() currentOutputPathsWebpack5: Set = new Set() - apply(compiler: Compiler) { + apply(compiler: webpack.Compiler) { if (isWebpack5) { // @ts-ignored Webpack has this hooks compiler.hooks.assetEmitted.tap( diff --git a/packages/next/build/webpack/plugins/nextjs-ssr-import.ts b/packages/next/build/webpack/plugins/nextjs-ssr-import.ts index a5aa5e81a97bfe6..5ad1874441ce0e6 100644 --- a/packages/next/build/webpack/plugins/nextjs-ssr-import.ts +++ b/packages/next/build/webpack/plugins/nextjs-ssr-import.ts @@ -1,10 +1,10 @@ import { join, resolve, relative, dirname } from 'path' -import { Compiler } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' // This plugin modifies the require-ensure code generated by Webpack // to work with Next.js SSR export default class NextJsSsrImportPlugin { - apply(compiler: Compiler) { + apply(compiler: webpack.Compiler) { compiler.hooks.compilation.tap('NextJsSSRImport', (compilation: any) => { compilation.mainTemplate.hooks.requireEnsure.tap( 'NextJsSSRImport', diff --git a/packages/next/build/webpack/plugins/nextjs-ssr-module-cache.ts b/packages/next/build/webpack/plugins/nextjs-ssr-module-cache.ts index 9953a65780a614b..d8993055fdbe88a 100644 --- a/packages/next/build/webpack/plugins/nextjs-ssr-module-cache.ts +++ b/packages/next/build/webpack/plugins/nextjs-ssr-module-cache.ts @@ -1,12 +1,8 @@ -import webpack from 'webpack' -import sources from 'webpack-sources' +import { webpack, sources } from 'next/dist/compiled/webpack/webpack' import { join, relative, dirname } from 'path' import getRouteFromEntrypoint from '../../../next-server/server/get-route-from-entrypoint' const SSR_MODULE_CACHE_FILENAME = 'ssr-module-cache.js' -// @ts-ignore: TODO: remove ignore when webpack 5 is stable -const { RawSource } = webpack.sources || sources - // By default webpack keeps initialized modules per-module. // This means that if you have 2 entrypoints loaded into the same app // they will *not* share the same instance @@ -28,7 +24,7 @@ export default class NextJsSsrImportPlugin { compiler.hooks.emit.tapAsync( 'NextJsSSRModuleCache', (compilation, callback) => { - compilation.assets[SSR_MODULE_CACHE_FILENAME] = new RawSource(` + compilation.assets[SSR_MODULE_CACHE_FILENAME] = new sources.RawSource(` /* This cache is used by webpack for instantiated modules */ module.exports = {} `) diff --git a/packages/next/build/webpack/plugins/pages-manifest-plugin.ts b/packages/next/build/webpack/plugins/pages-manifest-plugin.ts index fbd5b332c4dedb3..90a806221266a98 100644 --- a/packages/next/build/webpack/plugins/pages-manifest-plugin.ts +++ b/packages/next/build/webpack/plugins/pages-manifest-plugin.ts @@ -1,19 +1,17 @@ -import webpack, { Compiler, Plugin } from 'webpack' -import sources from 'webpack-sources' +import { + webpack, + isWebpack5, + sources, +} from 'next/dist/compiled/webpack/webpack' import { PAGES_MANIFEST } from '../../../next-server/lib/constants' import getRouteFromEntrypoint from '../../../next-server/server/get-route-from-entrypoint' export type PagesManifest = { [page: string]: string } -// @ts-ignore: TODO: remove ignore when webpack 5 is stable -const { RawSource } = webpack.sources || sources - -const isWebpack5 = parseInt(webpack.version!) === 5 - // This plugin creates a pages-manifest.json from page entrypoints. // This is used for mapping paths like `/` to `.next/server/static//pages/index.js` when doing SSR // It's also used by next export to provide defaultPathMap -export default class PagesManifestPlugin implements Plugin { +export default class PagesManifestPlugin implements webpack.Plugin { serverless: boolean constructor(serverless: boolean) { @@ -50,10 +48,12 @@ export default class PagesManifestPlugin implements Plugin { pages[pagePath] = files[0].replace(/\\/g, '/') } - assets[PAGES_MANIFEST] = new RawSource(JSON.stringify(pages, null, 2)) + assets[PAGES_MANIFEST] = new sources.RawSource( + JSON.stringify(pages, null, 2) + ) } - apply(compiler: Compiler): void { + apply(compiler: webpack.Compiler): void { if (isWebpack5) { compiler.hooks.make.tap('NextJsPagesManifest', (compilation) => { // @ts-ignore TODO: Remove ignore when webpack 5 is stable diff --git a/packages/next/build/webpack/plugins/react-loadable-plugin.ts b/packages/next/build/webpack/plugins/react-loadable-plugin.ts index c2f3400b4fa56be..52efe3904009642 100644 --- a/packages/next/build/webpack/plugins/react-loadable-plugin.ts +++ b/packages/next/build/webpack/plugins/react-loadable-plugin.ts @@ -21,17 +21,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWAR // Implementation of this PR: https://github.com/jamiebuilds/react-loadable/pull/132 // Modified to strip out unneeded results for Next's specific use case -import webpack, { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - compilation as CompilationType, - Compiler, -} from 'webpack' -import sources from 'webpack-sources' - -// @ts-ignore: TODO: remove ignore when webpack 5 is stable -const { RawSource } = webpack.sources || sources - -const isWebpack5 = parseInt(webpack.version!) === 5 +import { + webpack, + isWebpack5, + sources, +} from 'next/dist/compiled/webpack/webpack' function getModulesIterable(compilation: any, chunk: any) { if (isWebpack5) { @@ -50,8 +44,8 @@ function getModuleId(compilation: any, module: any) { } function buildManifest( - _compiler: Compiler, - compilation: CompilationType.Compilation + _compiler: webpack.Compiler, + compilation: webpack.compilation.Compilation ) { let manifest: { [k: string]: any[] } = {} @@ -115,11 +109,13 @@ export class ReactLoadablePlugin { createAssets(compiler: any, compilation: any, assets: any) { const manifest = buildManifest(compiler, compilation) // @ts-ignore: TODO: remove when webpack 5 is stable - assets[this.filename] = new RawSource(JSON.stringify(manifest, null, 2)) + assets[this.filename] = new sources.RawSource( + JSON.stringify(manifest, null, 2) + ) return assets } - apply(compiler: Compiler) { + apply(compiler: webpack.Compiler) { if (isWebpack5) { compiler.hooks.make.tap('ReactLoadableManifest', (compilation) => { // @ts-ignore TODO: Remove ignore when webpack 5 is stable diff --git a/packages/next/build/webpack/plugins/serverless-plugin.ts b/packages/next/build/webpack/plugins/serverless-plugin.ts index b8599ba772b911e..886116e83c840de 100644 --- a/packages/next/build/webpack/plugins/serverless-plugin.ts +++ b/packages/next/build/webpack/plugins/serverless-plugin.ts @@ -1,10 +1,5 @@ -import { Compiler } from 'webpack' -import webpack from 'webpack' -const isWebpack5 = parseInt(webpack.version!) === 5 - -const GraphHelpers = isWebpack5 - ? undefined - : require('webpack/lib/GraphHelpers') +import { webpack } from 'next/dist/compiled/webpack/webpack' +import { isWebpack5, GraphHelpers } from 'next/dist/compiled/webpack/webpack' /** * Makes sure there are no dynamic chunks when the target is serverless @@ -13,7 +8,7 @@ const GraphHelpers = isWebpack5 */ export class ServerlessPlugin { - apply(compiler: Compiler) { + apply(compiler: webpack.Compiler) { compiler.hooks.compilation.tap('ServerlessPlugin', (compilation) => { const hook = isWebpack5 ? compilation.hooks.optimizeChunks diff --git a/packages/next/build/webpack/plugins/terser-webpack-plugin/src/index.js b/packages/next/build/webpack/plugins/terser-webpack-plugin/src/index.js index 5c20c71d32bc6bd..ca72c47b5351d9c 100644 --- a/packages/next/build/webpack/plugins/terser-webpack-plugin/src/index.js +++ b/packages/next/build/webpack/plugins/terser-webpack-plugin/src/index.js @@ -1,8 +1,11 @@ // @ts-nocheck import * as path from 'path' - -import webpack, { ModuleFilenameHelpers, Compilation } from 'webpack' -import sources from 'webpack-sources' +import { + webpack, + ModuleFilenameHelpers, + isWebpack5, + sources, +} from 'next/dist/compiled/webpack/webpack' import pLimit from 'p-limit' import jestWorker from 'jest-worker' import crypto from 'crypto' @@ -10,8 +13,6 @@ import cacache from 'next/dist/compiled/cacache' import { tracer, traceAsyncFn } from '../../../../tracer' import { spans } from '../../profiling-plugin' -const isWebpack5 = parseInt(webpack.version) === 5 - function getEcmaVersion(environment) { // ES 6th if ( @@ -357,7 +358,7 @@ class TerserPlugin { compilation.hooks.processAssets.tapPromise( { name: pluginName, - stage: Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE, + stage: webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE, }, (assets) => this.optimize( diff --git a/packages/next/build/webpack/plugins/webpack-conformance-plugin/index.ts b/packages/next/build/webpack/plugins/webpack-conformance-plugin/index.ts index 58a096b762e3503..a251e9add861f4d 100644 --- a/packages/next/build/webpack/plugins/webpack-conformance-plugin/index.ts +++ b/packages/next/build/webpack/plugins/webpack-conformance-plugin/index.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line import/no-extraneous-dependencies import { NodePath } from 'ast-types/lib/node-path' import { visit } from 'next/dist/compiled/recast' -import { compilation as CompilationType, Compiler } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' import { IConformanceAnomaly, IConformanceTestResult, @@ -28,7 +28,7 @@ export default class WebpackConformancePlugin { private tests: IWebpackConformanceTest[] private errors: Array private warnings: Array - private compiler?: Compiler + private compiler?: webpack.Compiler constructor(options: IWebpackConformancePluginOptions) { this.tests = [] @@ -49,7 +49,7 @@ export default class WebpackConformancePlugin { } private buildStartedHandler = ( - _compilation: CompilationType.Compilation, + _compilation: webpack.compilation.Compilation, callback: () => void ) => { const buildStartedResults: IConformanceTestResult[] = this.tests.map( @@ -68,7 +68,7 @@ export default class WebpackConformancePlugin { } private buildCompletedHandler = ( - compilation: CompilationType.Compilation, + compilation: webpack.compilation.Compilation, cb: () => void ): void => { const buildCompletedResults: IConformanceTestResult[] = this.tests.map( @@ -89,7 +89,7 @@ export default class WebpackConformancePlugin { } private parserHandler = ( - factory: CompilationType.NormalModuleFactory + factory: webpack.compilation.NormalModuleFactory ): void => { const JS_TYPES = ['auto', 'esm', 'dynamic'] const collectedVisitors: Map = new Map() @@ -137,7 +137,7 @@ export default class WebpackConformancePlugin { } } - public apply(compiler: Compiler) { + public apply(compiler: webpack.Compiler) { this.compiler = compiler compiler.hooks.make.tapAsync( this.constructor.name, diff --git a/packages/next/build/webpack/plugins/wellknown-errors-plugin/index.ts b/packages/next/build/webpack/plugins/wellknown-errors-plugin/index.ts index 4e36cee1276d2f5..1120fe453ed7c4b 100644 --- a/packages/next/build/webpack/plugins/wellknown-errors-plugin/index.ts +++ b/packages/next/build/webpack/plugins/wellknown-errors-plugin/index.ts @@ -1,8 +1,8 @@ -import { Compiler } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' import { getModuleBuildError } from './webpackModuleError' export class WellKnownErrorsPlugin { - apply(compiler: Compiler) { + apply(compiler: webpack.Compiler) { compiler.hooks.compilation.tap('WellKnownErrorsPlugin', (compilation) => { compilation.hooks.afterSeal.tapPromise( 'WellKnownErrorsPlugin', diff --git a/packages/next/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts b/packages/next/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts index 23dc3676848613c..07eeb6c01e4ae19 100644 --- a/packages/next/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts +++ b/packages/next/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts @@ -1,7 +1,6 @@ import { readFileSync } from 'fs' import * as path from 'path' -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import { compilation as CompilationType } from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' import { getBabelError } from './parseBabel' import { getCssError } from './parseCss' import { getScssError } from './parseScss' @@ -9,7 +8,7 @@ import { getNotFoundError } from './parseNotFoundError' import { SimpleWebpackError } from './simpleWebpackError' function getFileData( - compilation: CompilationType.Compilation, + compilation: webpack.compilation.Compilation, m: any ): [string, string | null] { let resolved: string @@ -42,7 +41,7 @@ function getFileData( } export async function getModuleBuildError( - compilation: CompilationType.Compilation, + compilation: webpack.compilation.Compilation, input: any ): Promise { if ( diff --git a/packages/next/bundles/package.json b/packages/next/bundles/package.json new file mode 100644 index 000000000000000..c76eaaf812bf9fa --- /dev/null +++ b/packages/next/bundles/package.json @@ -0,0 +1,7 @@ +{ + "dependencies": { + "webpack5": "npm:webpack@5", + "schema-utils3": "npm:schema-utils@3.0.0", + "webpack-sources2": "npm:webpack-sources@2.2.0" + } +} diff --git a/packages/next/bundles/webpack/bundle4.js b/packages/next/bundles/webpack/bundle4.js new file mode 100644 index 000000000000000..5440889387f2653 --- /dev/null +++ b/packages/next/bundles/webpack/bundle4.js @@ -0,0 +1,12 @@ +/* eslint-disable import/no-extraneous-dependencies */ + +module.exports = function () { + return { + BasicEvaluatedExpression: require('webpack/lib/BasicEvaluatedExpression'), + NodeTargetPlugin: require('webpack/lib/node/NodeTargetPlugin'), + ModuleFilenameHelpers: require('webpack/lib/ModuleFilenameHelpers'), + GraphHelpers: require('webpack/lib/GraphHelpers'), + sources: require('webpack-sources'), + webpack: require('webpack'), + } +} diff --git a/packages/next/bundles/webpack/bundle5.js b/packages/next/bundles/webpack/bundle5.js new file mode 100644 index 000000000000000..54c46ab6be45a19 --- /dev/null +++ b/packages/next/bundles/webpack/bundle5.js @@ -0,0 +1,12 @@ +/* eslint-disable import/no-extraneous-dependencies */ + +module.exports = function () { + return { + BasicEvaluatedExpression: require('webpack5/lib/javascript/BasicEvaluatedExpression'), + ModuleFilenameHelpers: require('webpack5/lib/ModuleFilenameHelpers'), + NodeTargetPlugin: require('webpack5/lib/node/NodeTargetPlugin'), + StringXor: require('webpack5/lib/util/StringXor'), + sources: require('webpack5').sources, + webpack: require('webpack5'), + } +} diff --git a/packages/next/bundles/webpack/packages/HotModuleReplacement.runtime.js b/packages/next/bundles/webpack/packages/HotModuleReplacement.runtime.js new file mode 100644 index 000000000000000..b272b4cdfeb4a28 --- /dev/null +++ b/packages/next/bundles/webpack/packages/HotModuleReplacement.runtime.js @@ -0,0 +1,377 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +var $interceptModuleExecution$ = undefined; +var $moduleCache$ = undefined; +// eslint-disable-next-line no-unused-vars +var $hmrModuleData$ = undefined; +var $hmrDownloadManifest$ = undefined; +var $hmrDownloadUpdateHandlers$ = undefined; +var $hmrInvalidateModuleHandlers$ = undefined; +var __webpack_require__ = undefined; + +module.exports = function () { + var currentModuleData = {}; + var installedModules = $moduleCache$; + + // module and require creation + var currentChildModule; + var currentParents = []; + + // status + var registeredStatusHandlers = []; + var currentStatus = "idle"; + + // while downloading + var blockingPromises; + + // The update info + var currentUpdateApplyHandlers; + var queuedInvalidatedModules; + + // eslint-disable-next-line no-unused-vars + $hmrModuleData$ = currentModuleData; + + $interceptModuleExecution$.push(function (options) { + var module = options.module; + var require = createRequire(options.require, options.id); + module.hot = createModuleHotObject(options.id, module); + module.parents = currentParents; + module.children = []; + currentParents = []; + options.require = require; + }); + + $hmrDownloadUpdateHandlers$ = {}; + $hmrInvalidateModuleHandlers$ = {}; + + function createRequire(require, moduleId) { + var me = installedModules[moduleId]; + if (!me) return require; + var fn = function (request) { + if (me.hot.active) { + if (installedModules[request]) { + var parents = installedModules[request].parents; + if (parents.indexOf(moduleId) === -1) { + parents.push(moduleId); + } + } else { + currentParents = [moduleId]; + currentChildModule = request; + } + if (me.children.indexOf(request) === -1) { + me.children.push(request); + } + } else { + console.warn( + "[HMR] unexpected require(" + + request + + ") from disposed module " + + moduleId + ); + currentParents = []; + } + return require(request); + }; + var createPropertyDescriptor = function (name) { + return { + configurable: true, + enumerable: true, + get: function () { + return require[name]; + }, + set: function (value) { + require[name] = value; + } + }; + }; + for (var name in require) { + if (Object.prototype.hasOwnProperty.call(require, name) && name !== "e") { + Object.defineProperty(fn, name, createPropertyDescriptor(name)); + } + } + fn.e = function (chunkId) { + return trackBlockingPromise(require.e(chunkId)); + }; + return fn; + } + + function createModuleHotObject(moduleId, me) { + var hot = { + // private stuff + _acceptedDependencies: {}, + _declinedDependencies: {}, + _selfAccepted: false, + _selfDeclined: false, + _selfInvalidated: false, + _disposeHandlers: [], + _main: currentChildModule !== moduleId, + _requireSelf: function () { + currentParents = me.parents.slice(); + currentChildModule = moduleId; + __webpack_require__(moduleId); + }, + + // Module API + active: true, + accept: function (dep, callback) { + if (dep === undefined) hot._selfAccepted = true; + else if (typeof dep === "function") hot._selfAccepted = dep; + else if (typeof dep === "object" && dep !== null) + for (var i = 0; i < dep.length; i++) + hot._acceptedDependencies[dep[i]] = callback || function () {}; + else hot._acceptedDependencies[dep] = callback || function () {}; + }, + decline: function (dep) { + if (dep === undefined) hot._selfDeclined = true; + else if (typeof dep === "object" && dep !== null) + for (var i = 0; i < dep.length; i++) + hot._declinedDependencies[dep[i]] = true; + else hot._declinedDependencies[dep] = true; + }, + dispose: function (callback) { + hot._disposeHandlers.push(callback); + }, + addDisposeHandler: function (callback) { + hot._disposeHandlers.push(callback); + }, + removeDisposeHandler: function (callback) { + var idx = hot._disposeHandlers.indexOf(callback); + if (idx >= 0) hot._disposeHandlers.splice(idx, 1); + }, + invalidate: function () { + this._selfInvalidated = true; + switch (currentStatus) { + case "idle": + currentUpdateApplyHandlers = []; + Object.keys($hmrInvalidateModuleHandlers$).forEach(function (key) { + $hmrInvalidateModuleHandlers$[key]( + moduleId, + currentUpdateApplyHandlers + ); + }); + setStatus("ready"); + break; + case "ready": + Object.keys($hmrInvalidateModuleHandlers$).forEach(function (key) { + $hmrInvalidateModuleHandlers$[key]( + moduleId, + currentUpdateApplyHandlers + ); + }); + break; + case "prepare": + case "check": + case "dispose": + case "apply": + (queuedInvalidatedModules = queuedInvalidatedModules || []).push( + moduleId + ); + break; + default: + // ignore requests in error states + break; + } + }, + + // Management API + check: hotCheck, + apply: hotApply, + status: function (l) { + if (!l) return currentStatus; + registeredStatusHandlers.push(l); + }, + addStatusHandler: function (l) { + registeredStatusHandlers.push(l); + }, + removeStatusHandler: function (l) { + var idx = registeredStatusHandlers.indexOf(l); + if (idx >= 0) registeredStatusHandlers.splice(idx, 1); + }, + + //inherit from previous dispose call + data: currentModuleData[moduleId] + }; + currentChildModule = undefined; + return hot; + } + + function setStatus(newStatus) { + currentStatus = newStatus; + for (var i = 0; i < registeredStatusHandlers.length; i++) + registeredStatusHandlers[i].call(null, newStatus); + } + + function trackBlockingPromise(promise) { + switch (currentStatus) { + case "ready": + setStatus("prepare"); + blockingPromises.push(promise); + waitForBlockingPromises(function () { + setStatus("ready"); + }); + return promise; + case "prepare": + blockingPromises.push(promise); + return promise; + default: + return promise; + } + } + + function waitForBlockingPromises(fn) { + if (blockingPromises.length === 0) return fn(); + var blocker = blockingPromises; + blockingPromises = []; + return Promise.all(blocker).then(function () { + return waitForBlockingPromises(fn); + }); + } + + function hotCheck(applyOnUpdate) { + if (currentStatus !== "idle") { + throw new Error("check() is only allowed in idle status"); + } + setStatus("check"); + return $hmrDownloadManifest$().then(function (update) { + if (!update) { + setStatus(applyInvalidatedModules() ? "ready" : "idle"); + return null; + } + + setStatus("prepare"); + + var updatedModules = []; + blockingPromises = []; + currentUpdateApplyHandlers = []; + + return Promise.all( + Object.keys($hmrDownloadUpdateHandlers$).reduce(function ( + promises, + key + ) { + $hmrDownloadUpdateHandlers$[key]( + update.c, + update.r, + update.m, + promises, + currentUpdateApplyHandlers, + updatedModules + ); + return promises; + }, + []) + ).then(function () { + return waitForBlockingPromises(function () { + if (applyOnUpdate) { + return internalApply(applyOnUpdate); + } else { + setStatus("ready"); + + return updatedModules; + } + }); + }); + }); + } + + function hotApply(options) { + if (currentStatus !== "ready") { + return Promise.resolve().then(function () { + throw new Error("apply() is only allowed in ready status"); + }); + } + return internalApply(options); + } + + function internalApply(options) { + options = options || {}; + + applyInvalidatedModules(); + + var results = currentUpdateApplyHandlers.map(function (handler) { + return handler(options); + }); + currentUpdateApplyHandlers = undefined; + + var errors = results + .map(function (r) { + return r.error; + }) + .filter(Boolean); + + if (errors.length > 0) { + setStatus("abort"); + return Promise.resolve().then(function () { + throw errors[0]; + }); + } + + // Now in "dispose" phase + setStatus("dispose"); + + results.forEach(function (result) { + if (result.dispose) result.dispose(); + }); + + // Now in "apply" phase + setStatus("apply"); + + var error; + var reportError = function (err) { + if (!error) error = err; + }; + + var outdatedModules = []; + results.forEach(function (result) { + if (result.apply) { + var modules = result.apply(reportError); + if (modules) { + for (var i = 0; i < modules.length; i++) { + outdatedModules.push(modules[i]); + } + } + } + }); + + // handle errors in accept handlers and self accepted module load + if (error) { + setStatus("fail"); + return Promise.resolve().then(function () { + throw error; + }); + } + + if (queuedInvalidatedModules) { + return internalApply(options).then(function (list) { + outdatedModules.forEach(function (moduleId) { + if (list.indexOf(moduleId) < 0) list.push(moduleId); + }); + return list; + }); + } + + setStatus("idle"); + return Promise.resolve(outdatedModules); + } + + function applyInvalidatedModules() { + if (queuedInvalidatedModules) { + if (!currentUpdateApplyHandlers) currentUpdateApplyHandlers = []; + Object.keys($hmrInvalidateModuleHandlers$).forEach(function (key) { + queuedInvalidatedModules.forEach(function (moduleId) { + $hmrInvalidateModuleHandlers$[key]( + moduleId, + currentUpdateApplyHandlers + ); + }); + }); + queuedInvalidatedModules = undefined; + return true; + } + } +}; diff --git a/packages/next/bundles/webpack/packages/JavascriptHotModuleReplacement.runtime.js b/packages/next/bundles/webpack/packages/JavascriptHotModuleReplacement.runtime.js new file mode 100644 index 000000000000000..60a15089d3f30bd --- /dev/null +++ b/packages/next/bundles/webpack/packages/JavascriptHotModuleReplacement.runtime.js @@ -0,0 +1,431 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +var $installedChunks$ = undefined; +var $loadUpdateChunk$ = undefined; +var $moduleCache$ = undefined; +var $moduleFactories$ = undefined; +var $ensureChunkHandlers$ = undefined; +var $hasOwnProperty$ = undefined; +var $hmrModuleData$ = undefined; +var $hmrDownloadUpdateHandlers$ = undefined; +var $hmrInvalidateModuleHandlers$ = undefined; +var __webpack_require__ = undefined; + +module.exports = function () { + var currentUpdateChunks; + var currentUpdate; + var currentUpdateRemovedChunks; + var currentUpdateRuntime; + function applyHandler(options) { + if ($ensureChunkHandlers$) delete $ensureChunkHandlers$.$key$Hmr; + currentUpdateChunks = undefined; + function getAffectedModuleEffects(updateModuleId) { + var outdatedModules = [updateModuleId]; + var outdatedDependencies = {}; + + var queue = outdatedModules.map(function (id) { + return { + chain: [id], + id: id + }; + }); + while (queue.length > 0) { + var queueItem = queue.pop(); + var moduleId = queueItem.id; + var chain = queueItem.chain; + var module = $moduleCache$[moduleId]; + if ( + !module || + (module.hot._selfAccepted && !module.hot._selfInvalidated) + ) + continue; + if (module.hot._selfDeclined) { + return { + type: "self-declined", + chain: chain, + moduleId: moduleId + }; + } + if (module.hot._main) { + return { + type: "unaccepted", + chain: chain, + moduleId: moduleId + }; + } + for (var i = 0; i < module.parents.length; i++) { + var parentId = module.parents[i]; + var parent = $moduleCache$[parentId]; + if (!parent) continue; + if (parent.hot._declinedDependencies[moduleId]) { + return { + type: "declined", + chain: chain.concat([parentId]), + moduleId: moduleId, + parentId: parentId + }; + } + if (outdatedModules.indexOf(parentId) !== -1) continue; + if (parent.hot._acceptedDependencies[moduleId]) { + if (!outdatedDependencies[parentId]) + outdatedDependencies[parentId] = []; + addAllToSet(outdatedDependencies[parentId], [moduleId]); + continue; + } + delete outdatedDependencies[parentId]; + outdatedModules.push(parentId); + queue.push({ + chain: chain.concat([parentId]), + id: parentId + }); + } + } + + return { + type: "accepted", + moduleId: updateModuleId, + outdatedModules: outdatedModules, + outdatedDependencies: outdatedDependencies + }; + } + + function addAllToSet(a, b) { + for (var i = 0; i < b.length; i++) { + var item = b[i]; + if (a.indexOf(item) === -1) a.push(item); + } + } + + // at begin all updates modules are outdated + // the "outdated" status can propagate to parents if they don't accept the children + var outdatedDependencies = {}; + var outdatedModules = []; + var appliedUpdate = {}; + + var warnUnexpectedRequire = function warnUnexpectedRequire(module) { + console.warn( + "[HMR] unexpected require(" + module.id + ") to disposed module" + ); + }; + + for (var moduleId in currentUpdate) { + if ($hasOwnProperty$(currentUpdate, moduleId)) { + var newModuleFactory = currentUpdate[moduleId]; + /** @type {TODO} */ + var result; + if (newModuleFactory) { + result = getAffectedModuleEffects(moduleId); + } else { + result = { + type: "disposed", + moduleId: moduleId + }; + } + /** @type {Error|false} */ + var abortError = false; + var doApply = false; + var doDispose = false; + var chainInfo = ""; + if (result.chain) { + chainInfo = "\nUpdate propagation: " + result.chain.join(" -> "); + } + switch (result.type) { + case "self-declined": + if (options.onDeclined) options.onDeclined(result); + if (!options.ignoreDeclined) + abortError = new Error( + "Aborted because of self decline: " + + result.moduleId + + chainInfo + ); + break; + case "declined": + if (options.onDeclined) options.onDeclined(result); + if (!options.ignoreDeclined) + abortError = new Error( + "Aborted because of declined dependency: " + + result.moduleId + + " in " + + result.parentId + + chainInfo + ); + break; + case "unaccepted": + if (options.onUnaccepted) options.onUnaccepted(result); + if (!options.ignoreUnaccepted) + abortError = new Error( + "Aborted because " + moduleId + " is not accepted" + chainInfo + ); + break; + case "accepted": + if (options.onAccepted) options.onAccepted(result); + doApply = true; + break; + case "disposed": + if (options.onDisposed) options.onDisposed(result); + doDispose = true; + break; + default: + throw new Error("Unexception type " + result.type); + } + if (abortError) { + return { + error: abortError + }; + } + if (doApply) { + appliedUpdate[moduleId] = newModuleFactory; + addAllToSet(outdatedModules, result.outdatedModules); + for (moduleId in result.outdatedDependencies) { + if ($hasOwnProperty$(result.outdatedDependencies, moduleId)) { + if (!outdatedDependencies[moduleId]) + outdatedDependencies[moduleId] = []; + addAllToSet( + outdatedDependencies[moduleId], + result.outdatedDependencies[moduleId] + ); + } + } + } + if (doDispose) { + addAllToSet(outdatedModules, [result.moduleId]); + appliedUpdate[moduleId] = warnUnexpectedRequire; + } + } + } + currentUpdate = undefined; + + // Store self accepted outdated modules to require them later by the module system + var outdatedSelfAcceptedModules = []; + for (var j = 0; j < outdatedModules.length; j++) { + var outdatedModuleId = outdatedModules[j]; + if ( + $moduleCache$[outdatedModuleId] && + $moduleCache$[outdatedModuleId].hot._selfAccepted && + // removed self-accepted modules should not be required + appliedUpdate[outdatedModuleId] !== warnUnexpectedRequire && + // when called invalidate self-accepting is not possible + !$moduleCache$[outdatedModuleId].hot._selfInvalidated + ) { + outdatedSelfAcceptedModules.push({ + module: outdatedModuleId, + require: $moduleCache$[outdatedModuleId].hot._requireSelf, + errorHandler: $moduleCache$[outdatedModuleId].hot._selfAccepted + }); + } + } + + var moduleOutdatedDependencies; + + return { + dispose: function () { + currentUpdateRemovedChunks.forEach(function (chunkId) { + delete $installedChunks$[chunkId]; + }); + currentUpdateRemovedChunks = undefined; + + var idx; + var queue = outdatedModules.slice(); + while (queue.length > 0) { + var moduleId = queue.pop(); + var module = $moduleCache$[moduleId]; + if (!module) continue; + + var data = {}; + + // Call dispose handlers + var disposeHandlers = module.hot._disposeHandlers; + for (j = 0; j < disposeHandlers.length; j++) { + disposeHandlers[j].call(null, data); + } + $hmrModuleData$[moduleId] = data; + + // disable module (this disables requires from this module) + module.hot.active = false; + + // remove module from cache + delete $moduleCache$[moduleId]; + + // when disposing there is no need to call dispose handler + delete outdatedDependencies[moduleId]; + + // remove "parents" references from all children + for (j = 0; j < module.children.length; j++) { + var child = $moduleCache$[module.children[j]]; + if (!child) continue; + idx = child.parents.indexOf(moduleId); + if (idx >= 0) { + child.parents.splice(idx, 1); + } + } + } + + // remove outdated dependency from module children + var dependency; + for (var outdatedModuleId in outdatedDependencies) { + if ($hasOwnProperty$(outdatedDependencies, outdatedModuleId)) { + module = $moduleCache$[outdatedModuleId]; + if (module) { + moduleOutdatedDependencies = + outdatedDependencies[outdatedModuleId]; + for (j = 0; j < moduleOutdatedDependencies.length; j++) { + dependency = moduleOutdatedDependencies[j]; + idx = module.children.indexOf(dependency); + if (idx >= 0) module.children.splice(idx, 1); + } + } + } + } + }, + apply: function (reportError) { + // insert new code + for (var updateModuleId in appliedUpdate) { + if ($hasOwnProperty$(appliedUpdate, updateModuleId)) { + $moduleFactories$[updateModuleId] = appliedUpdate[updateModuleId]; + } + } + + // run new runtime modules + for (var i = 0; i < currentUpdateRuntime.length; i++) { + currentUpdateRuntime[i](__webpack_require__); + } + + // call accept handlers + for (var outdatedModuleId in outdatedDependencies) { + if ($hasOwnProperty$(outdatedDependencies, outdatedModuleId)) { + var module = $moduleCache$[outdatedModuleId]; + if (module) { + moduleOutdatedDependencies = + outdatedDependencies[outdatedModuleId]; + var callbacks = []; + var dependenciesForCallbacks = []; + for (var j = 0; j < moduleOutdatedDependencies.length; j++) { + var dependency = moduleOutdatedDependencies[j]; + var acceptCallback = + module.hot._acceptedDependencies[dependency]; + if (acceptCallback) { + if (callbacks.indexOf(acceptCallback) !== -1) continue; + callbacks.push(acceptCallback); + dependenciesForCallbacks.push(dependency); + } + } + for (var k = 0; k < callbacks.length; k++) { + try { + callbacks[k].call(null, moduleOutdatedDependencies); + } catch (err) { + if (options.onErrored) { + options.onErrored({ + type: "accept-errored", + moduleId: outdatedModuleId, + dependencyId: dependenciesForCallbacks[k], + error: err + }); + } + if (!options.ignoreErrored) { + reportError(err); + } + } + } + } + } + } + + // Load self accepted modules + for (var o = 0; o < outdatedSelfAcceptedModules.length; o++) { + var item = outdatedSelfAcceptedModules[o]; + var moduleId = item.module; + try { + item.require(moduleId); + } catch (err) { + if (typeof item.errorHandler === "function") { + try { + item.errorHandler(err); + } catch (err2) { + if (options.onErrored) { + options.onErrored({ + type: "self-accept-error-handler-errored", + moduleId: moduleId, + error: err2, + originalError: err + }); + } + if (!options.ignoreErrored) { + reportError(err2); + } + reportError(err); + } + } else { + if (options.onErrored) { + options.onErrored({ + type: "self-accept-errored", + moduleId: moduleId, + error: err + }); + } + if (!options.ignoreErrored) { + reportError(err); + } + } + } + } + + return outdatedModules; + } + }; + } + $hmrInvalidateModuleHandlers$.$key$ = function (moduleId, applyHandlers) { + if (!currentUpdate) { + currentUpdate = {}; + currentUpdateRuntime = []; + currentUpdateRemovedChunks = []; + applyHandlers.push(applyHandler); + } + if (!$hasOwnProperty$(currentUpdate, moduleId)) { + currentUpdate[moduleId] = $moduleFactories$[moduleId]; + } + }; + $hmrDownloadUpdateHandlers$.$key$ = function ( + chunkIds, + removedChunks, + removedModules, + promises, + applyHandlers, + updatedModulesList + ) { + applyHandlers.push(applyHandler); + currentUpdateChunks = {}; + currentUpdateRemovedChunks = removedChunks; + currentUpdate = removedModules.reduce(function (obj, key) { + obj[key] = false; + return obj; + }, {}); + currentUpdateRuntime = []; + chunkIds.forEach(function (chunkId) { + if ( + $hasOwnProperty$($installedChunks$, chunkId) && + $installedChunks$[chunkId] !== undefined + ) { + promises.push($loadUpdateChunk$(chunkId, updatedModulesList)); + currentUpdateChunks[chunkId] = true; + } + }); + if ($ensureChunkHandlers$) { + $ensureChunkHandlers$.$key$Hmr = function (chunkId, promises) { + if ( + currentUpdateChunks && + !$hasOwnProperty$(currentUpdateChunks, chunkId) && + $hasOwnProperty$($installedChunks$, chunkId) && + $installedChunks$[chunkId] !== undefined + ) { + promises.push($loadUpdateChunk$(chunkId)); + currentUpdateChunks[chunkId] = true; + } + }; + } + }; +}; diff --git a/packages/next/bundles/webpack/packages/webpack.js b/packages/next/bundles/webpack/packages/webpack.js new file mode 100644 index 000000000000000..c5632cfbec988bc --- /dev/null +++ b/packages/next/bundles/webpack/packages/webpack.js @@ -0,0 +1,27 @@ +exports.__esModule = true + +exports.isWebpack5 = false + +exports.default = undefined + +let initializedWebpack5 = false +let initializedWebpack4 = false +let initFns = [] +exports.init = function (useWebpack5) { + if (useWebpack5) { + Object.assign(exports, require('./bundle5')()) + exports.isWebpack5 = true + if (!initializedWebpack5) for (const cb of initFns) cb() + initializedWebpack5 = true + } else { + Object.assign(exports, require('./bundle4')()) + exports.isWebpack5 = false + if (!initializedWebpack4) for (const cb of initFns) cb() + initializedWebpack4 = true + } +} + +exports.onWebpackInit = function (cb) { + if (initializedWebpack5 || initializedWebpack4) cb() + initFns.push(cb) +} diff --git a/packages/next/bundles/yarn.lock b/packages/next/bundles/yarn.lock new file mode 100644 index 000000000000000..8f1f84c00ac857a --- /dev/null +++ b/packages/next/bundles/yarn.lock @@ -0,0 +1,539 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/eslint-scope@^3.7.0": + version "3.7.0" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.0.tgz#4792816e31119ebd506902a482caec4951fabd86" + integrity sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "7.2.6" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.6.tgz#5e9aff555a975596c03a98b59ecd103decc70c3c" + integrity sha512-I+1sYH+NPQ3/tVqCeUSBwTE/0heyvtXqpIopUUArlBm0Kpocb8FbMa3AZ/ASKIFpN3rnEx932TTXDbt9OXsNDw== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*", "@types/estree@^0.0.45": + version "0.0.45" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884" + integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== + +"@types/json-schema@*", "@types/json-schema@^7.0.6": + version "7.0.6" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" + integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== + +"@types/node@*": + version "14.14.20" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.20.tgz#f7974863edd21d1f8a494a73e8e2b3658615c340" + integrity sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A== + +"@webassemblyjs/ast@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" + integrity sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + +"@webassemblyjs/floating-point-hex-parser@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.0.tgz#34d62052f453cd43101d72eab4966a022587947c" + integrity sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA== + +"@webassemblyjs/helper-api-error@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.0.tgz#aaea8fb3b923f4aaa9b512ff541b013ffb68d2d4" + integrity sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w== + +"@webassemblyjs/helper-buffer@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.0.tgz#d026c25d175e388a7dbda9694e91e743cbe9b642" + integrity sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA== + +"@webassemblyjs/helper-numbers@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.0.tgz#7ab04172d54e312cc6ea4286d7d9fa27c88cd4f9" + integrity sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.0" + "@webassemblyjs/helper-api-error" "1.11.0" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.0.tgz#85fdcda4129902fe86f81abf7e7236953ec5a4e1" + integrity sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA== + +"@webassemblyjs/helper-wasm-section@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.0.tgz#9ce2cc89300262509c801b4af113d1ca25c1a75b" + integrity sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-buffer" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/wasm-gen" "1.11.0" + +"@webassemblyjs/ieee754@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.0.tgz#46975d583f9828f5d094ac210e219441c4e6f5cf" + integrity sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.0.tgz#f7353de1df38aa201cba9fb88b43f41f75ff403b" + integrity sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.0.tgz#86e48f959cf49e0e5091f069a709b862f5a2cadf" + integrity sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw== + +"@webassemblyjs/wasm-edit@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.0.tgz#ee4a5c9f677046a210542ae63897094c2027cb78" + integrity sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-buffer" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/helper-wasm-section" "1.11.0" + "@webassemblyjs/wasm-gen" "1.11.0" + "@webassemblyjs/wasm-opt" "1.11.0" + "@webassemblyjs/wasm-parser" "1.11.0" + "@webassemblyjs/wast-printer" "1.11.0" + +"@webassemblyjs/wasm-gen@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.0.tgz#3cdb35e70082d42a35166988dda64f24ceb97abe" + integrity sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/ieee754" "1.11.0" + "@webassemblyjs/leb128" "1.11.0" + "@webassemblyjs/utf8" "1.11.0" + +"@webassemblyjs/wasm-opt@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.0.tgz#1638ae188137f4bb031f568a413cd24d32f92978" + integrity sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-buffer" "1.11.0" + "@webassemblyjs/wasm-gen" "1.11.0" + "@webassemblyjs/wasm-parser" "1.11.0" + +"@webassemblyjs/wasm-parser@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.0.tgz#3e680b8830d5b13d1ec86cc42f38f3d4a7700754" + integrity sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-api-error" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/ieee754" "1.11.0" + "@webassemblyjs/leb128" "1.11.0" + "@webassemblyjs/utf8" "1.11.0" + +"@webassemblyjs/wast-printer@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.0.tgz#680d1f6a5365d6d401974a8e949e05474e1fab7e" + integrity sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +acorn@^8.0.4: + version "8.0.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.4.tgz#7a3ae4191466a6984eee0fe3407a4f3aa9db8354" + integrity sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ== + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +browserslist@^4.14.5: + version "4.16.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.1.tgz#bf757a2da376b3447b800a16f0f1c96358138766" + integrity sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA== + dependencies: + caniuse-lite "^1.0.30001173" + colorette "^1.2.1" + electron-to-chromium "^1.3.634" + escalade "^3.1.1" + node-releases "^1.1.69" + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +caniuse-lite@^1.0.30001173: + version "1.0.30001173" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001173.tgz#3c47bbe3cd6d7a9eda7f50ac016d158005569f56" + integrity sha512-R3aqmjrICdGCTAnSXtNyvWYMK3YtV5jwudbq0T7nN9k4kmE4CBuwPqyJ+KBzepSTh0huivV2gLbSMEzTTmfeYw== + +chrome-trace-event@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" + integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== + dependencies: + tslib "^1.9.0" + +colorette@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" + integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +electron-to-chromium@^1.3.634: + version "1.3.635" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.635.tgz#8d1591eeca6b257d380061a2c04f0b3cc6c9e33b" + integrity sha512-RRriZOLs9CpW6KTLmgBqyUdnY0QNqqWs0HOtuQGGEMizOTNNn1P7sGRBxARnUeLejOsgwjDyRqT3E/CSst02ZQ== + +enhanced-resolve@^5.3.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.4.1.tgz#c89b0c34f17f931902ef2913a125d4b825b49b6f" + integrity sha512-4GbyIMzYktTFoRSmkbgZ1LU+RXwf4AQ8Z+rSuuh1dC8plp0PPeaWvx6+G4hh4KnUJ48VoxKbNyA1QQQIUpXjYA== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + +events@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379" + integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +graceful-fs@^4.1.2, graceful-fs@^4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +jest-worker@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^7.0.0" + +json-parse-better-errors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +loader-runner@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" + integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +mime-db@1.45.0: + version "1.45.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" + integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== + +mime-types@^2.1.27: + version "2.1.28" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" + integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== + dependencies: + mime-db "1.45.0" + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +node-releases@^1.1.69: + version "1.1.69" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.69.tgz#3149dbde53b781610cd8b486d62d86e26c3725f6" + integrity sha512-DGIjo79VDEyAnRlfSqYTsy+yoHd2IOjJiKUozD2MV2D85Vso6Bug56mb9tT/fY5Urt0iqk01H7x+llAruDR2zA== + +p-limit@^3.0.2, p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +pkg-dir@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760" + integrity sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA== + dependencies: + find-up "^5.0.0" + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"schema-utils3@npm:schema-utils@3.0.0", schema-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef" + integrity sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA== + dependencies: + "@types/json-schema" "^7.0.6" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +serialize-javascript@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + +source-list-map@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + +source-map-support@~0.5.19: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@~0.7.2: + version "0.7.3" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" + integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== + +supports-color@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" + integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== + +terser-webpack-plugin@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.1.tgz#7effadee06f7ecfa093dbbd3e9ab23f5f3ed8673" + integrity sha512-5XNNXZiR8YO6X6KhSGXfY0QrGrCRlSwAEjIIrlRQR4W8nP69TaJUlh3bkuac6zzgspiGPfKEHcY295MMVExl5Q== + dependencies: + jest-worker "^26.6.2" + p-limit "^3.1.0" + schema-utils "^3.0.0" + serialize-javascript "^5.0.1" + source-map "^0.6.1" + terser "^5.5.1" + +terser@^5.5.1: + version "5.5.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.5.1.tgz#540caa25139d6f496fdea056e414284886fb2289" + integrity sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ== + dependencies: + commander "^2.20.0" + source-map "~0.7.2" + source-map-support "~0.5.19" + +tslib@^1.9.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +watchpack@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.1.0.tgz#e63194736bf3aa22026f7b191cd57907b0f9f696" + integrity sha512-UjgD1mqjkG99+3lgG36at4wPnUXNvis2v1utwTgQ43C22c4LD71LsYMExdWXh4HZ+RmW+B0t1Vrg2GpXAkTOQw== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + +"webpack-sources2@npm:webpack-sources@2.2.0", webpack-sources@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.2.0.tgz#058926f39e3d443193b6c31547229806ffd02bac" + integrity sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w== + dependencies: + source-list-map "^2.0.1" + source-map "^0.6.1" + +"webpack5@npm:webpack@5": + version "5.12.3" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.12.3.tgz#2682aeb6bdf5622a365ef855392f8fa338bcaa28" + integrity sha512-7tiQmcTnKhZwbf7X7sEfXe0pgkGjUZjT6JfYkZHvvIb4/ZsXl1rJu5PxsJoN7W3v5sNSP/8TgBoiOdDqVdvK5w== + dependencies: + "@types/eslint-scope" "^3.7.0" + "@types/estree" "^0.0.45" + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/wasm-edit" "1.11.0" + "@webassemblyjs/wasm-parser" "1.11.0" + acorn "^8.0.4" + browserslist "^4.14.5" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.3.1" + eslint-scope "^5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.4" + json-parse-better-errors "^1.0.2" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + pkg-dir "^5.0.0" + schema-utils "^3.0.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.1.1" + watchpack "^2.0.0" + webpack-sources "^2.1.1" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/packages/next/compiled/amphtml-validator/index.js b/packages/next/compiled/amphtml-validator/index.js index c30d190365c7980..200fb323bc356d7 100644 --- a/packages/next/compiled/amphtml-validator/index.js +++ b/packages/next/compiled/amphtml-validator/index.js @@ -1 +1 @@ -module.exports=(()=>{var e={306:(e,t,n)=>{"use strict";const r=n(584);const o=n(747);const i=n(605);const s=n(211);const u=n(622);const a=n(654);const c=n(554);const l=n(191);const f=n(835);const p=n(669);const h=n(184);const m="amphtml-validator";function hasPrefix(e,t){return e.indexOf(t)==0}function isHttpOrHttpsUrl(e){return hasPrefix(e,"http://")||hasPrefix(e,"https://")}function readFromFile(e){return new c(function(t,n){o.readFile(e,"utf8",function(e,r){if(e){n(e)}else{t(r.trim())}})})}function readFromReadable(e,t){return new c(function(n,r){const o=[];t.setEncoding("utf8");t.on("data",function(e){o.push(e)});t.on("end",function(){n(o.join(""))});t.on("error",function(t){r(new Error("Could not read from "+e+" - "+t.message))})})}function readFromStdin(){return readFromReadable("stdin",process.stdin).then(function(e){process.stdin.resume();return e})}function readFromUrl(e,t){return new c(function(n,r){const o=hasPrefix(e,"http://")?i:s;const u=o.request(e,function(t){if(t.statusCode!==200){t.resume();r(new Error("Unable to fetch "+e+" - HTTP Status "+t.statusCode))}else{n(t)}});u.setHeader("User-Agent",t);u.on("error",function(t){r(new Error("Unable to fetch "+e+" - "+t.message))});u.end()}).then(readFromReadable.bind(null,e))}function ValidationResult(){this.status="UNKNOWN";this.errors=[]}function ValidationError(){this.severity="UNKNOWN_SEVERITY";this.line=1;this.col=0;this.message="";this.specUrl=null;this.code="UNKNOWN_CODE";this.params=[]}function Validator(e){this.sandbox=h.createContext();try{new h.Script(e).runInContext(this.sandbox)}catch(e){throw new Error("Could not instantiate validator.js - "+e.message)}}Validator.prototype.validateString=function(e,t){const n=this.sandbox.amp.validator.validateString(e,t);const r=new ValidationResult;r.status=n.status;for(let e=0;e\n\n"+' Validates the files or urls provided as arguments. If "-" is\n'+" specified, reads from stdin instead.").option("--validator_js ","The Validator Javascript.\n"+" Latest published version by default, or\n"+" dist/validator_minified.js (built with build.py)\n"+" for development.","https://cdn.ampproject.org/v0/validator.js").option("--user-agent ","User agent string to use in requests.",m).option("--html_format ","The input format to be validated.\n"+" AMP by default.","AMP").option("--format ","How to format the output.\n"+' "color" displays errors/warnings/success in\n'+" red/orange/green.\n"+' "text" avoids color (e.g., useful in terminals not\n'+" supporting color).\n"+' "json" emits json corresponding to the ValidationResult\n'+" message in validator.proto.","color").parse(process.argv);if(a.args.length===0){a.outputHelp();process.exit(1)}if(a.html_format!=="AMP"&&a.html_format!=="AMP4ADS"&&a.html_format!=="AMP4EMAIL"){process.stderr.write('--html_format must be set to "AMP", "AMP4ADS", or "AMP4EMAIL".\n',function(){process.exit(1)})}if(a.format!=="color"&&a.format!=="text"&&a.format!=="json"){process.stderr.write('--format must be set to "color", "text", or "json".\n',function(){process.exit(1)})}const e=[];for(let t=0;t{var r=n(614).EventEmitter;var o=n(129).spawn;var i=n(622);var s=i.dirname;var u=i.basename;var a=n(747);n(669).inherits(Command,r);t=e.exports=new Command;t.Command=Command;t.Option=Option;function Option(e,t){this.flags=e;this.required=~e.indexOf("<");this.optional=~e.indexOf("[");this.bool=!~e.indexOf("-no-");e=e.split(/[ ,|]+/);if(e.length>1&&!/^[[<]/.test(e[1]))this.short=e.shift();this.long=e.shift();this.description=t||""}Option.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Option.prototype.attributeName=function(){return camelcase(this.name())};Option.prototype.is=function(e){return this.short===e||this.long===e};function Command(e){this.commands=[];this.options=[];this._execs={};this._allowUnknownOption=false;this._args=[];this._name=e||""}Command.prototype.command=function(e,t,n){if(typeof t==="object"&&t!==null){n=t;t=null}n=n||{};var r=e.split(/ +/);var o=new Command(r.shift());if(t){o.description(t);this.executables=true;this._execs[o._name]=true;if(n.isDefault)this.defaultExecutable=o._name}o._noHelp=!!n.noHelp;this.commands.push(o);o.parseExpectedArgs(r);o.parent=this;if(t)return this;return o};Command.prototype.arguments=function(e){return this.parseExpectedArgs(e.split(/ +/))};Command.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};Command.prototype.parseExpectedArgs=function(e){if(!e.length)return;var t=this;e.forEach(function(e){var n={required:false,name:"",variadic:false};switch(e[0]){case"<":n.required=true;n.name=e.slice(1,-1);break;case"[":n.name=e.slice(1,-1);break}if(n.name.length>3&&n.name.slice(-3)==="..."){n.variadic=true;n.name=n.name.slice(0,-3)}if(n.name){t._args.push(n)}});return this};Command.prototype.action=function(e){var t=this;var n=function(n,r){n=n||[];r=r||[];var o=t.parseOptions(r);outputHelpIfNecessary(t,o.unknown);if(o.unknown.length>0){t.unknownOption(o.unknown[0])}if(o.args.length)n=o.args.concat(n);t._args.forEach(function(e,r){if(e.required&&n[r]==null){t.missingArgument(e.name)}else if(e.variadic){if(r!==t._args.length-1){t.variadicArgNotLast(e.name)}n[r]=n.splice(r)}});if(t._args.length){n[t._args.length]=t}else{n.push(t)}e.apply(t,n)};var r=this.parent||this;var o=r===this?"*":this._name;r.on("command:"+o,n);if(this._alias)r.on("command:"+this._alias,n);return this};Command.prototype.option=function(e,t,n,r){var o=this,i=new Option(e,t),s=i.name(),u=i.attributeName();if(typeof n!=="function"){if(n instanceof RegExp){var a=n;n=function(e,t){var n=a.exec(e);return n?n[0]:t}}else{r=n;n=null}}if(!i.bool||i.optional||i.required){if(!i.bool)r=true;if(r!==undefined){o[u]=r;i.defaultValue=r}}this.options.push(i);this.on("option:"+s,function(e){if(e!==null&&n){e=n(e,o[u]===undefined?r:o[u])}if(typeof o[u]==="boolean"||typeof o[u]==="undefined"){if(e==null){o[u]=i.bool?r||true:false}else{o[u]=e}}else if(e!==null){o[u]=e}});return this};Command.prototype.allowUnknownOption=function(e){this._allowUnknownOption=arguments.length===0||e;return this};Command.prototype.parse=function(e){if(this.executables)this.addImplicitHelpCommand();this.rawArgs=e;this._name=this._name||u(e[1],".js");if(this.executables&&e.length<3&&!this.defaultExecutable){e.push("--help")}var t=this.parseOptions(this.normalize(e.slice(2)));var n=this.args=t.args;var r=this.parseArgs(this.args,t.unknown);var o=r.args[0];var i=null;if(o){i=this.commands.filter(function(e){return e.alias()===o})[0]}if(this._execs[o]&&typeof this._execs[o]!=="function"){return this.executeSubCommand(e,n,t.unknown)}else if(i){n[0]=i._name;return this.executeSubCommand(e,n,t.unknown)}else if(this.defaultExecutable){n.unshift(this.defaultExecutable);return this.executeSubCommand(e,n,t.unknown)}return r};Command.prototype.executeSubCommand=function(e,t,n){t=t.concat(n);if(!t.length)this.help();if(t[0]==="help"&&t.length===1)this.help();if(t[0]==="help"){t[0]=t[1];t[1]="--help"}var r=e[1];var c=u(r,".js")+"-"+t[0];var l,f=a.lstatSync(r).isSymbolicLink()?a.readlinkSync(r):r;if(f!==r&&f.charAt(0)!=="/"){f=i.join(s(r),f)}l=s(f);var p=i.join(l,c);var h=false;if(exists(p+".js")){c=p+".js";h=true}else if(exists(p)){c=p}t=t.slice(1);var m;if(process.platform!=="win32"){if(h){t.unshift(c);t=(process.execArgv||[]).concat(t);m=o(process.argv[0],t,{stdio:"inherit",customFds:[0,1,2]})}else{m=o(c,t,{stdio:"inherit",customFds:[0,1,2]})}}else{t.unshift(c);m=o(process.execPath,t,{stdio:"inherit"})}var d=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];d.forEach(function(e){process.on(e,function(){if(m.killed===false&&m.exitCode===null){m.kill(e)}})});m.on("close",process.exit.bind(process));m.on("error",function(e){if(e.code==="ENOENT"){console.error("\n %s(1) does not exist, try --help\n",c)}else if(e.code==="EACCES"){console.error("\n %s(1) not executable. try chmod or run with root\n",c)}process.exit(1)});this.runningCommand=m};Command.prototype.normalize=function(e){var t=[],n,r,o;for(var i=0,s=e.length;i0){r=this.optionFor(e[i-1])}if(n==="--"){t=t.concat(e.slice(i));break}else if(r&&r.required){t.push(n)}else if(n.length>1&&n[0]==="-"&&n[1]!=="-"){n.slice(1).split("").forEach(function(e){t.push("-"+e)})}else if(/^--/.test(n)&&~(o=n.indexOf("="))){t.push(n.slice(0,o),n.slice(o+1))}else{t.push(n)}}return t};Command.prototype.parseArgs=function(e,t){var n;if(e.length){n=e[0];if(this.listeners("command:"+n).length){this.emit("command:"+e.shift(),e,t)}else{this.emit("command:*",e)}}else{outputHelpIfNecessary(this,t);if(t.length>0){this.unknownOption(t[0])}}return this};Command.prototype.optionFor=function(e){for(var t=0,n=this.options.length;t1&&i[0]==="-"){s.push(i);if(u+1e){e=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>e){e=this.largestCommandLength()}}return e};Command.prototype.optionHelp=function(){var e=this.padWidth();return this.options.map(function(t){return pad(t.flags,e)+" "+t.description+(t.bool&&t.defaultValue!==undefined?" (default: "+t.defaultValue+")":"")}).concat([pad("-h, --help",e)+" "+"output usage information"]).join("\n")};Command.prototype.commandHelp=function(){if(!this.commands.length)return"";var e=this.prepareCommands();var t=this.padWidth();return[" Commands:","",e.map(function(e){var n=e[1]?" "+e[1]:"";return(n?pad(e[0],t):e[0])+n}).join("\n").replace(/^/gm," "),""].join("\n")};Command.prototype.helpInformation=function(){var e=[];if(this._description){e=[" "+this._description,""];var t=this._argsDescription;if(t&&this._args.length){var n=this.padWidth();e.push(" Arguments:");e.push("");this._args.forEach(function(r){e.push(" "+pad(r.name,n)+" "+t[r.name])});e.push("")}}var r=this._name;if(this._alias){r=r+"|"+this._alias}var o=[""," Usage: "+r+" "+this.usage(),""];var i=[];var s=this.commandHelp();if(s)i=[s];var u=[" Options:","",""+this.optionHelp().replace(/^/gm," "),""];return o.concat(e).concat(u).concat(i).join("\n")};Command.prototype.outputHelp=function(e){if(!e){e=function(e){return e}}process.stdout.write(e(this.helpInformation()));this.emit("--help")};Command.prototype.help=function(e){this.outputHelp(e);process.exit()};function camelcase(e){return e.split("-").reduce(function(e,t){return e+t[0].toUpperCase()+t.slice(1)})}function pad(e,t){var n=Math.max(0,t-e.length);return e+Array(n+1).join(" ")}function outputHelpIfNecessary(e,t){t=t||[];for(var n=0;n":"["+t+"]"}function exists(e){try{if(a.statSync(e).isFile()){return true}}catch(e){return false}}},307:(e,t,n)=>{"use strict";var r=n(826);var o=[];e.exports=asap;function asap(e){var t;if(o.length){t=o.pop()}else{t=new RawTask}t.task=e;t.domain=process.domain;r(t)}function RawTask(){this.task=null;this.domain=null}RawTask.prototype.call=function(){if(this.domain){this.domain.enter()}var e=true;try{this.task.call();e=false;if(this.domain){this.domain.exit()}}finally{if(e){r.requestFlush()}this.task=null;this.domain=null;o.push(this)}}},826:(e,t,n)=>{"use strict";var r;var o=typeof setImmediate==="function";e.exports=rawAsap;function rawAsap(e){if(!i.length){requestFlush();s=true}i[i.length]=e}var i=[];var s=false;var u=0;var a=1024;function flush(){while(ua){for(var t=0,n=i.length-u;t{var r={};e["exports"]=r;r.themes={};var o=n(669);var i=r.styles=n(401);var s=Object.defineProperties;var u=new RegExp(/[\r\n]+/g);r.supportsColor=n(744).supportsColor;if(typeof r.enabled==="undefined"){r.enabled=r.supportsColor()!==false}r.enable=function(){r.enabled=true};r.disable=function(){r.enabled=false};r.stripColors=r.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var a=r.stylize=function stylize(e,t){if(!r.enabled){return e+""}return i[t].open+e+i[t].close};var c=/[|\\{}()[\]^$+*?.]/g;var l=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return e.replace(c,"\\$&")};function build(e){var t=function builder(){return applyStyle.apply(builder,arguments)};t._styles=e;t.__proto__=p;return t}var f=function(){var e={};i.grey=i.gray;Object.keys(i).forEach(function(t){i[t].closeRe=new RegExp(l(i[t].close),"g");e[t]={get:function(){return build(this._styles.concat(t))}}});return e}();var p=s(function colors(){},f);function applyStyle(){var e=Array.prototype.slice.call(arguments);var t=e.map(function(e){if(e!==undefined&&e.constructor===String){return e}else{return o.inspect(e)}}).join(" ");if(!r.enabled||!t){return t}var n=t.indexOf("\n")!=-1;var s=this._styles;var a=s.length;while(a--){var c=i[s[a]];t=c.open+t.replace(c.closeRe,c.open)+c.close;if(n){t=t.replace(u,c.close+"\n"+c.open)}}return t}r.setTheme=function(e){if(typeof e==="string"){console.log("colors.setTheme now only accepts an object, not a string. "+"If you are trying to set a theme from a file, it is now your (the "+"caller's) responsibility to require the file. The old syntax "+"looked like colors.setTheme(__dirname + "+"'/../themes/generic-logging.js'); The new syntax looks like "+"colors.setTheme(require(__dirname + "+"'/../themes/generic-logging.js'));");return}for(var t in e){(function(t){r[t]=function(n){if(typeof e[t]==="object"){var o=n;for(var i in e[t]){o=r[e[t][i]](o)}return o}return r[e[t]](n)}})(t)}};function init(){var e={};Object.keys(f).forEach(function(t){e[t]={get:function(){return build([t])}}});return e}var h=function sequencer(e,t){var n=t.split("");n=n.map(e);return n.join("")};r.trap=n(173);r.zalgo=n(393);r.maps={};r.maps.america=n(530);r.maps.zebra=n(346);r.maps.rainbow=n(120);r.maps.random=n(243);for(var m in r.maps){(function(e){r[e]=function(t){return h(r.maps[e],t)}})(m)}s(r,init())},173:e=>{e["exports"]=function runTheTrap(e,t){var n="";e=e||"Run the trap, drop the bass";e=e.split("");var r={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};e.forEach(function(e){e=e.toLowerCase();var t=r[e]||[" "];var o=Math.floor(Math.random()*t.length);if(typeof r[e]!=="undefined"){n+=r[e][o]}else{n+=e}});return n}},393:e=>{e["exports"]=function zalgo(e,t){e=e||" he is here ";var n={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]};var r=[].concat(n.up,n.down,n.mid);function randomNumber(e){var t=Math.floor(Math.random()*e);return t}function isChar(e){var t=false;r.filter(function(n){t=n===e});return t}function heComes(e,t){var r="";var o;var i;t=t||{};t["up"]=typeof t["up"]!=="undefined"?t["up"]:true;t["mid"]=typeof t["mid"]!=="undefined"?t["mid"]:true;t["down"]=typeof t["down"]!=="undefined"?t["down"]:true;t["size"]=typeof t["size"]!=="undefined"?t["size"]:"maxi";e=e.split("");for(i in e){if(isChar(i)){continue}r=r+e[i];o={up:0,down:0,mid:0};switch(t.size){case"mini":o.up=randomNumber(8);o.mid=randomNumber(2);o.down=randomNumber(8);break;case"maxi":o.up=randomNumber(16)+3;o.mid=randomNumber(4)+1;o.down=randomNumber(64)+3;break;default:o.up=randomNumber(8)+1;o.mid=randomNumber(6)/2;o.down=randomNumber(8)+1;break}var s=["up","mid","down"];for(var u in s){var a=s[u];for(var c=0;c<=o[a];c++){if(t[a]){r=r+n[a][randomNumber(n[a].length)]}}}}return r}return heComes(e,t)}},530:(e,t,n)=>{var r=n(508);e["exports"]=function(){return function(e,t,n){if(e===" ")return e;switch(t%3){case 0:return r.red(e);case 1:return r.white(e);case 2:return r.blue(e)}}}()},120:(e,t,n)=>{var r=n(508);e["exports"]=function(){var e=["red","yellow","green","blue","magenta"];return function(t,n,o){if(t===" "){return t}else{return r[e[n++%e.length]](t)}}}()},243:(e,t,n)=>{var r=n(508);e["exports"]=function(){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(t,n,o){return t===" "?t:r[e[Math.round(Math.random()*(e.length-2))]](t)}}()},346:(e,t,n)=>{var r=n(508);e["exports"]=function(e,t,n){return t%2===0?e:r.inverse(e)}},401:e=>{var t={};e["exports"]=t;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach(function(e){var r=n[e];var o=t[e]=[];o.open="["+r[0]+"m";o.close="["+r[1]+"m"})},252:e=>{"use strict";e.exports=function(e,t){t=t||process.argv;var n=t.indexOf("--");var r=/^-{1,2}/.test(e)?"":"--";var o=t.indexOf(r+e);return o!==-1&&(n===-1?true:o{"use strict";var r=n(87);var o=n(252);var i=process.env;var s=void 0;if(o("no-color")||o("no-colors")||o("color=false")){s=false}else if(o("color")||o("colors")||o("color=true")||o("color=always")){s=true}if("FORCE_COLOR"in i){s=i.FORCE_COLOR.length===0||parseInt(i.FORCE_COLOR,10)!==0}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(s===false){return 0}if(o("color=16m")||o("color=full")||o("color=truecolor")){return 3}if(o("color=256")){return 2}if(e&&!e.isTTY&&s!==true){return 0}var t=s?1:0;if(process.platform==="win32"){var n=r.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(n[0])>=10&&Number(n[2])>=10586){return Number(n[2])>=14931?3:2}return 1}if("CI"in i){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(e){return e in i})||i.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in i){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0}if("TERM_PROGRAM"in i){var u=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(i.TERM)){return 2}if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)){return 1}if("COLORTERM"in i){return 1}if(i.TERM==="dumb"){return t}return t}function getSupportLevel(e){var t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},584:(e,t,n)=>{var r=n(508);e["exports"]=r},554:(e,t,n)=>{"use strict";e.exports=n(198)},541:(e,t,n)=>{"use strict";var r=n(826);function noop(){}var o=null;var i={};function getThen(e){try{return e.then}catch(e){o=e;return i}}function tryCallOne(e,t){try{return e(t)}catch(e){o=e;return i}}function tryCallTwo(e,t,n){try{e(t,n)}catch(e){o=e;return i}}e.exports=Promise;function Promise(e){if(typeof this!=="object"){throw new TypeError("Promises must be constructed via new")}if(typeof e!=="function"){throw new TypeError("Promise constructor's argument is not a function")}this._75=0;this._83=0;this._18=null;this._38=null;if(e===noop)return;doResolve(e,this)}Promise._47=null;Promise._71=null;Promise._44=noop;Promise.prototype.then=function(e,t){if(this.constructor!==Promise){return safeThen(this,e,t)}var n=new Promise(noop);handle(this,new Handler(e,t,n));return n};function safeThen(e,t,n){return new e.constructor(function(r,o){var i=new Promise(noop);i.then(r,o);handle(e,new Handler(t,n,i))})}function handle(e,t){while(e._83===3){e=e._18}if(Promise._47){Promise._47(e)}if(e._83===0){if(e._75===0){e._75=1;e._38=t;return}if(e._75===1){e._75=2;e._38=[e._38,t];return}e._38.push(t);return}handleResolved(e,t)}function handleResolved(e,t){r(function(){var n=e._83===1?t.onFulfilled:t.onRejected;if(n===null){if(e._83===1){resolve(t.promise,e._18)}else{reject(t.promise,e._18)}return}var r=tryCallOne(n,e._18);if(r===i){reject(t.promise,o)}else{resolve(t.promise,r)}})}function resolve(e,t){if(t===e){return reject(e,new TypeError("A promise cannot be resolved with itself."))}if(t&&(typeof t==="object"||typeof t==="function")){var n=getThen(t);if(n===i){return reject(e,o)}if(n===e.then&&t instanceof Promise){e._83=3;e._18=t;finale(e);return}else if(typeof n==="function"){doResolve(n.bind(t),e);return}}e._83=1;e._18=t;finale(e)}function reject(e,t){e._83=2;e._18=t;if(Promise._71){Promise._71(e,t)}finale(e)}function finale(e){if(e._75===1){handle(e,e._38);e._38=null}if(e._75===2){for(var t=0;t{"use strict";var r=n(541);e.exports=r;r.prototype.done=function(e,t){var n=arguments.length?this.then.apply(this,arguments):this;n.then(null,function(e){setTimeout(function(){throw e},0)})}},667:(e,t,n)=>{"use strict";var r=n(541);e.exports=r;var o=valuePromise(true);var i=valuePromise(false);var s=valuePromise(null);var u=valuePromise(undefined);var a=valuePromise(0);var c=valuePromise("");function valuePromise(e){var t=new r(r._44);t._83=1;t._18=e;return t}r.resolve=function(e){if(e instanceof r)return e;if(e===null)return s;if(e===undefined)return u;if(e===true)return o;if(e===false)return i;if(e===0)return a;if(e==="")return c;if(typeof e==="object"||typeof e==="function"){try{var t=e.then;if(typeof t==="function"){return new r(t.bind(e))}}catch(e){return new r(function(t,n){n(e)})}}return valuePromise(e)};r.all=function(e){var t=Array.prototype.slice.call(e);return new r(function(e,n){if(t.length===0)return e([]);var o=t.length;function res(i,s){if(s&&(typeof s==="object"||typeof s==="function")){if(s instanceof r&&s.then===r.prototype.then){while(s._83===3){s=s._18}if(s._83===1)return res(i,s._18);if(s._83===2)n(s._18);s.then(function(e){res(i,e)},n);return}else{var u=s.then;if(typeof u==="function"){var a=new r(u.bind(s));a.then(function(e){res(i,e)},n);return}}}t[i]=s;if(--o===0){e(t)}}for(var i=0;i{"use strict";var r=n(541);e.exports=r;r.prototype["finally"]=function(e){return this.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})})}},198:(e,t,n)=>{"use strict";e.exports=n(541);n(200);n(579);n(667);n(369);n(693)},369:(e,t,n)=>{"use strict";var r=n(541);var o=n(307);e.exports=r;r.denodeify=function(e,t){if(typeof t==="number"&&t!==Infinity){return denodeifyWithCount(e,t)}else{return denodeifyWithoutCount(e)}};var i="function (err, res) {"+"if (err) { rj(err); } else { rs(res); }"+"}";function denodeifyWithCount(e,t){var n=[];for(var o=0;o "+t+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+i+";","var res;","switch (argLength) {",n.concat(["extra"]).map(function(e,t){return"case "+t+":"+"res = fn.call("+["self"].concat(n.slice(0,t)).concat("cb").join(",")+");"+"break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],s)(r,e)}r.nodeify=function(e){return function(){var t=Array.prototype.slice.call(arguments);var n=typeof t[t.length-1]==="function"?t.pop():null;var i=this;try{return e.apply(this,arguments).nodeify(n,i)}catch(e){if(n===null||typeof n=="undefined"){return new r(function(t,n){n(e)})}else{o(function(){n.call(i,e)})}}}};r.prototype.nodeify=function(e,t){if(typeof e!="function")return this;this.then(function(n){o(function(){e.call(t,null,n)})},function(n){o(function(){e.call(t,n)})})}},693:(e,t,n)=>{"use strict";var r=n(541);e.exports=r;r.enableSynchronous=function(){r.prototype.isPending=function(){return this.getState()==0};r.prototype.isFulfilled=function(){return this.getState()==1};r.prototype.isRejected=function(){return this.getState()==2};r.prototype.getValue=function(){if(this._83===3){return this._18.getValue()}if(!this.isFulfilled()){throw new Error("Cannot get a value of an unfulfilled promise.")}return this._18};r.prototype.getReason=function(){if(this._83===3){return this._18.getReason()}if(!this.isRejected()){throw new Error("Cannot get a rejection reason of a non-rejected promise.")}return this._18};r.prototype.getState=function(){if(this._83===3){return this._18.getState()}if(this._83===-1||this._83===-2){return 0}return this._83}};r.disableSynchronous=function(){r.prototype.isPending=undefined;r.prototype.isFulfilled=undefined;r.prototype.isRejected=undefined;r.prototype.getValue=undefined;r.prototype.getReason=undefined;r.prototype.getState=undefined}},129:e=>{"use strict";e.exports=require("child_process")},229:e=>{"use strict";e.exports=require("domain")},614:e=>{"use strict";e.exports=require("events")},747:e=>{"use strict";e.exports=require("fs")},605:e=>{"use strict";e.exports=require("http")},211:e=>{"use strict";e.exports=require("https")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")},191:e=>{"use strict";e.exports=require("querystring")},835:e=>{"use strict";e.exports=require("url")},669:e=>{"use strict";e.exports=require("util")},184:e=>{"use strict";e.exports=require("vm")}};var t={};function __webpack_require__(n){if(t[n]){return t[n].exports}var r=t[n]={exports:{}};var o=true;try{e[n](r,r.exports,__webpack_require__);o=false}finally{if(o)delete t[n]}return r.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(306)})(); \ No newline at end of file +module.exports=(()=>{var e={306:(e,t,n)=>{"use strict";const r=n(584);const o=n(747);const i=n(605);const s=n(211);const u=n(622);const a=n(654);const c=n(554);const l=n(191);const f=n(835);const p=n(669);const h=n(184);const m="amphtml-validator";function hasPrefix(e,t){return e.indexOf(t)==0}function isHttpOrHttpsUrl(e){return hasPrefix(e,"http://")||hasPrefix(e,"https://")}function readFromFile(e){return new c(function(t,n){o.readFile(e,"utf8",function(e,r){if(e){n(e)}else{t(r.trim())}})})}function readFromReadable(e,t){return new c(function(n,r){const o=[];t.setEncoding("utf8");t.on("data",function(e){o.push(e)});t.on("end",function(){n(o.join(""))});t.on("error",function(t){r(new Error("Could not read from "+e+" - "+t.message))})})}function readFromStdin(){return readFromReadable("stdin",process.stdin).then(function(e){process.stdin.resume();return e})}function readFromUrl(e,t){return new c(function(n,r){const o=hasPrefix(e,"http://")?i:s;const u=o.request(e,function(t){if(t.statusCode!==200){t.resume();r(new Error("Unable to fetch "+e+" - HTTP Status "+t.statusCode))}else{n(t)}});u.setHeader("User-Agent",t);u.on("error",function(t){r(new Error("Unable to fetch "+e+" - "+t.message))});u.end()}).then(readFromReadable.bind(null,e))}function ValidationResult(){this.status="UNKNOWN";this.errors=[]}function ValidationError(){this.severity="UNKNOWN_SEVERITY";this.line=1;this.col=0;this.message="";this.specUrl=null;this.code="UNKNOWN_CODE";this.params=[]}function Validator(e){this.sandbox=h.createContext();try{new h.Script(e).runInContext(this.sandbox)}catch(e){throw new Error("Could not instantiate validator.js - "+e.message)}}Validator.prototype.validateString=function(e,t){const n=this.sandbox.amp.validator.validateString(e,t);const r=new ValidationResult;r.status=n.status;for(let e=0;e\n\n"+' Validates the files or urls provided as arguments. If "-" is\n'+" specified, reads from stdin instead.").option("--validator_js ","The Validator Javascript.\n"+" Latest published version by default, or\n"+" dist/validator_minified.js (built with build.py)\n"+" for development.","https://cdn.ampproject.org/v0/validator.js").option("--user-agent ","User agent string to use in requests.",m).option("--html_format ","The input format to be validated.\n"+" AMP by default.","AMP").option("--format ","How to format the output.\n"+' "color" displays errors/warnings/success in\n'+" red/orange/green.\n"+' "text" avoids color (e.g., useful in terminals not\n'+" supporting color).\n"+' "json" emits json corresponding to the ValidationResult\n'+" message in validator.proto.","color").parse(process.argv);if(a.args.length===0){a.outputHelp();process.exit(1)}if(a.html_format!=="AMP"&&a.html_format!=="AMP4ADS"&&a.html_format!=="AMP4EMAIL"){process.stderr.write('--html_format must be set to "AMP", "AMP4ADS", or "AMP4EMAIL".\n',function(){process.exit(1)})}if(a.format!=="color"&&a.format!=="text"&&a.format!=="json"){process.stderr.write('--format must be set to "color", "text", or "json".\n',function(){process.exit(1)})}const e=[];for(let t=0;t{var r=n(614).EventEmitter;var o=n(129).spawn;var i=n(622);var s=i.dirname;var u=i.basename;var a=n(747);n(669).inherits(Command,r);t=e.exports=new Command;t.Command=Command;t.Option=Option;function Option(e,t){this.flags=e;this.required=~e.indexOf("<");this.optional=~e.indexOf("[");this.bool=!~e.indexOf("-no-");e=e.split(/[ ,|]+/);if(e.length>1&&!/^[[<]/.test(e[1]))this.short=e.shift();this.long=e.shift();this.description=t||""}Option.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Option.prototype.attributeName=function(){return camelcase(this.name())};Option.prototype.is=function(e){return this.short===e||this.long===e};function Command(e){this.commands=[];this.options=[];this._execs={};this._allowUnknownOption=false;this._args=[];this._name=e||""}Command.prototype.command=function(e,t,n){if(typeof t==="object"&&t!==null){n=t;t=null}n=n||{};var r=e.split(/ +/);var o=new Command(r.shift());if(t){o.description(t);this.executables=true;this._execs[o._name]=true;if(n.isDefault)this.defaultExecutable=o._name}o._noHelp=!!n.noHelp;this.commands.push(o);o.parseExpectedArgs(r);o.parent=this;if(t)return this;return o};Command.prototype.arguments=function(e){return this.parseExpectedArgs(e.split(/ +/))};Command.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};Command.prototype.parseExpectedArgs=function(e){if(!e.length)return;var t=this;e.forEach(function(e){var n={required:false,name:"",variadic:false};switch(e[0]){case"<":n.required=true;n.name=e.slice(1,-1);break;case"[":n.name=e.slice(1,-1);break}if(n.name.length>3&&n.name.slice(-3)==="..."){n.variadic=true;n.name=n.name.slice(0,-3)}if(n.name){t._args.push(n)}});return this};Command.prototype.action=function(e){var t=this;var n=function(n,r){n=n||[];r=r||[];var o=t.parseOptions(r);outputHelpIfNecessary(t,o.unknown);if(o.unknown.length>0){t.unknownOption(o.unknown[0])}if(o.args.length)n=o.args.concat(n);t._args.forEach(function(e,r){if(e.required&&n[r]==null){t.missingArgument(e.name)}else if(e.variadic){if(r!==t._args.length-1){t.variadicArgNotLast(e.name)}n[r]=n.splice(r)}});if(t._args.length){n[t._args.length]=t}else{n.push(t)}e.apply(t,n)};var r=this.parent||this;var o=r===this?"*":this._name;r.on("command:"+o,n);if(this._alias)r.on("command:"+this._alias,n);return this};Command.prototype.option=function(e,t,n,r){var o=this,i=new Option(e,t),s=i.name(),u=i.attributeName();if(typeof n!=="function"){if(n instanceof RegExp){var a=n;n=function(e,t){var n=a.exec(e);return n?n[0]:t}}else{r=n;n=null}}if(!i.bool||i.optional||i.required){if(!i.bool)r=true;if(r!==undefined){o[u]=r;i.defaultValue=r}}this.options.push(i);this.on("option:"+s,function(e){if(e!==null&&n){e=n(e,o[u]===undefined?r:o[u])}if(typeof o[u]==="boolean"||typeof o[u]==="undefined"){if(e==null){o[u]=i.bool?r||true:false}else{o[u]=e}}else if(e!==null){o[u]=e}});return this};Command.prototype.allowUnknownOption=function(e){this._allowUnknownOption=arguments.length===0||e;return this};Command.prototype.parse=function(e){if(this.executables)this.addImplicitHelpCommand();this.rawArgs=e;this._name=this._name||u(e[1],".js");if(this.executables&&e.length<3&&!this.defaultExecutable){e.push("--help")}var t=this.parseOptions(this.normalize(e.slice(2)));var n=this.args=t.args;var r=this.parseArgs(this.args,t.unknown);var o=r.args[0];var i=null;if(o){i=this.commands.filter(function(e){return e.alias()===o})[0]}if(this._execs[o]&&typeof this._execs[o]!=="function"){return this.executeSubCommand(e,n,t.unknown)}else if(i){n[0]=i._name;return this.executeSubCommand(e,n,t.unknown)}else if(this.defaultExecutable){n.unshift(this.defaultExecutable);return this.executeSubCommand(e,n,t.unknown)}return r};Command.prototype.executeSubCommand=function(e,t,n){t=t.concat(n);if(!t.length)this.help();if(t[0]==="help"&&t.length===1)this.help();if(t[0]==="help"){t[0]=t[1];t[1]="--help"}var r=e[1];var c=u(r,".js")+"-"+t[0];var l,f=a.lstatSync(r).isSymbolicLink()?a.readlinkSync(r):r;if(f!==r&&f.charAt(0)!=="/"){f=i.join(s(r),f)}l=s(f);var p=i.join(l,c);var h=false;if(exists(p+".js")){c=p+".js";h=true}else if(exists(p)){c=p}t=t.slice(1);var m;if(process.platform!=="win32"){if(h){t.unshift(c);t=(process.execArgv||[]).concat(t);m=o(process.argv[0],t,{stdio:"inherit",customFds:[0,1,2]})}else{m=o(c,t,{stdio:"inherit",customFds:[0,1,2]})}}else{t.unshift(c);m=o(process.execPath,t,{stdio:"inherit"})}var d=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];d.forEach(function(e){process.on(e,function(){if(m.killed===false&&m.exitCode===null){m.kill(e)}})});m.on("close",process.exit.bind(process));m.on("error",function(e){if(e.code==="ENOENT"){console.error("\n %s(1) does not exist, try --help\n",c)}else if(e.code==="EACCES"){console.error("\n %s(1) not executable. try chmod or run with root\n",c)}process.exit(1)});this.runningCommand=m};Command.prototype.normalize=function(e){var t=[],n,r,o;for(var i=0,s=e.length;i0){r=this.optionFor(e[i-1])}if(n==="--"){t=t.concat(e.slice(i));break}else if(r&&r.required){t.push(n)}else if(n.length>1&&n[0]==="-"&&n[1]!=="-"){n.slice(1).split("").forEach(function(e){t.push("-"+e)})}else if(/^--/.test(n)&&~(o=n.indexOf("="))){t.push(n.slice(0,o),n.slice(o+1))}else{t.push(n)}}return t};Command.prototype.parseArgs=function(e,t){var n;if(e.length){n=e[0];if(this.listeners("command:"+n).length){this.emit("command:"+e.shift(),e,t)}else{this.emit("command:*",e)}}else{outputHelpIfNecessary(this,t);if(t.length>0){this.unknownOption(t[0])}}return this};Command.prototype.optionFor=function(e){for(var t=0,n=this.options.length;t1&&i[0]==="-"){s.push(i);if(u+1e){e=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>e){e=this.largestCommandLength()}}return e};Command.prototype.optionHelp=function(){var e=this.padWidth();return this.options.map(function(t){return pad(t.flags,e)+" "+t.description+(t.bool&&t.defaultValue!==undefined?" (default: "+t.defaultValue+")":"")}).concat([pad("-h, --help",e)+" "+"output usage information"]).join("\n")};Command.prototype.commandHelp=function(){if(!this.commands.length)return"";var e=this.prepareCommands();var t=this.padWidth();return[" Commands:","",e.map(function(e){var n=e[1]?" "+e[1]:"";return(n?pad(e[0],t):e[0])+n}).join("\n").replace(/^/gm," "),""].join("\n")};Command.prototype.helpInformation=function(){var e=[];if(this._description){e=[" "+this._description,""];var t=this._argsDescription;if(t&&this._args.length){var n=this.padWidth();e.push(" Arguments:");e.push("");this._args.forEach(function(r){e.push(" "+pad(r.name,n)+" "+t[r.name])});e.push("")}}var r=this._name;if(this._alias){r=r+"|"+this._alias}var o=[""," Usage: "+r+" "+this.usage(),""];var i=[];var s=this.commandHelp();if(s)i=[s];var u=[" Options:","",""+this.optionHelp().replace(/^/gm," "),""];return o.concat(e).concat(u).concat(i).join("\n")};Command.prototype.outputHelp=function(e){if(!e){e=function(e){return e}}process.stdout.write(e(this.helpInformation()));this.emit("--help")};Command.prototype.help=function(e){this.outputHelp(e);process.exit()};function camelcase(e){return e.split("-").reduce(function(e,t){return e+t[0].toUpperCase()+t.slice(1)})}function pad(e,t){var n=Math.max(0,t-e.length);return e+Array(n+1).join(" ")}function outputHelpIfNecessary(e,t){t=t||[];for(var n=0;n":"["+t+"]"}function exists(e){try{if(a.statSync(e).isFile()){return true}}catch(e){return false}}},307:(e,t,n)=>{"use strict";var r=n(826);var o=[];e.exports=asap;function asap(e){var t;if(o.length){t=o.pop()}else{t=new RawTask}t.task=e;t.domain=process.domain;r(t)}function RawTask(){this.task=null;this.domain=null}RawTask.prototype.call=function(){if(this.domain){this.domain.enter()}var e=true;try{this.task.call();e=false;if(this.domain){this.domain.exit()}}finally{if(e){r.requestFlush()}this.task=null;this.domain=null;o.push(this)}}},826:(e,t,n)=>{"use strict";var r;var o=typeof setImmediate==="function";e.exports=rawAsap;function rawAsap(e){if(!i.length){requestFlush();s=true}i[i.length]=e}var i=[];var s=false;var u=0;var a=1024;function flush(){while(ua){for(var t=0,n=i.length-u;t{var r={};e["exports"]=r;r.themes={};var o=n(669);var i=r.styles=n(401);var s=Object.defineProperties;var u=new RegExp(/[\r\n]+/g);r.supportsColor=n(744).supportsColor;if(typeof r.enabled==="undefined"){r.enabled=r.supportsColor()!==false}r.enable=function(){r.enabled=true};r.disable=function(){r.enabled=false};r.stripColors=r.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var a=r.stylize=function stylize(e,t){if(!r.enabled){return e+""}return i[t].open+e+i[t].close};var c=/[|\\{}()[\]^$+*?.]/g;var l=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return e.replace(c,"\\$&")};function build(e){var t=function builder(){return applyStyle.apply(builder,arguments)};t._styles=e;t.__proto__=p;return t}var f=function(){var e={};i.grey=i.gray;Object.keys(i).forEach(function(t){i[t].closeRe=new RegExp(l(i[t].close),"g");e[t]={get:function(){return build(this._styles.concat(t))}}});return e}();var p=s(function colors(){},f);function applyStyle(){var e=Array.prototype.slice.call(arguments);var t=e.map(function(e){if(e!==undefined&&e.constructor===String){return e}else{return o.inspect(e)}}).join(" ");if(!r.enabled||!t){return t}var n=t.indexOf("\n")!=-1;var s=this._styles;var a=s.length;while(a--){var c=i[s[a]];t=c.open+t.replace(c.closeRe,c.open)+c.close;if(n){t=t.replace(u,c.close+"\n"+c.open)}}return t}r.setTheme=function(e){if(typeof e==="string"){console.log("colors.setTheme now only accepts an object, not a string. "+"If you are trying to set a theme from a file, it is now your (the "+"caller's) responsibility to require the file. The old syntax "+"looked like colors.setTheme(__dirname + "+"'/../themes/generic-logging.js'); The new syntax looks like "+"colors.setTheme(require(__dirname + "+"'/../themes/generic-logging.js'));");return}for(var t in e){(function(t){r[t]=function(n){if(typeof e[t]==="object"){var o=n;for(var i in e[t]){o=r[e[t][i]](o)}return o}return r[e[t]](n)}})(t)}};function init(){var e={};Object.keys(f).forEach(function(t){e[t]={get:function(){return build([t])}}});return e}var h=function sequencer(e,t){var n=t.split("");n=n.map(e);return n.join("")};r.trap=n(173);r.zalgo=n(393);r.maps={};r.maps.america=n(530);r.maps.zebra=n(346);r.maps.rainbow=n(120);r.maps.random=n(243);for(var m in r.maps){(function(e){r[e]=function(t){return h(r.maps[e],t)}})(m)}s(r,init())},173:e=>{e["exports"]=function runTheTrap(e,t){var n="";e=e||"Run the trap, drop the bass";e=e.split("");var r={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};e.forEach(function(e){e=e.toLowerCase();var t=r[e]||[" "];var o=Math.floor(Math.random()*t.length);if(typeof r[e]!=="undefined"){n+=r[e][o]}else{n+=e}});return n}},393:e=>{e["exports"]=function zalgo(e,t){e=e||" he is here ";var n={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]};var r=[].concat(n.up,n.down,n.mid);function randomNumber(e){var t=Math.floor(Math.random()*e);return t}function isChar(e){var t=false;r.filter(function(n){t=n===e});return t}function heComes(e,t){var r="";var o;var i;t=t||{};t["up"]=typeof t["up"]!=="undefined"?t["up"]:true;t["mid"]=typeof t["mid"]!=="undefined"?t["mid"]:true;t["down"]=typeof t["down"]!=="undefined"?t["down"]:true;t["size"]=typeof t["size"]!=="undefined"?t["size"]:"maxi";e=e.split("");for(i in e){if(isChar(i)){continue}r=r+e[i];o={up:0,down:0,mid:0};switch(t.size){case"mini":o.up=randomNumber(8);o.mid=randomNumber(2);o.down=randomNumber(8);break;case"maxi":o.up=randomNumber(16)+3;o.mid=randomNumber(4)+1;o.down=randomNumber(64)+3;break;default:o.up=randomNumber(8)+1;o.mid=randomNumber(6)/2;o.down=randomNumber(8)+1;break}var s=["up","mid","down"];for(var u in s){var a=s[u];for(var c=0;c<=o[a];c++){if(t[a]){r=r+n[a][randomNumber(n[a].length)]}}}}return r}return heComes(e,t)}},530:(e,t,n)=>{var r=n(508);e["exports"]=function(){return function(e,t,n){if(e===" ")return e;switch(t%3){case 0:return r.red(e);case 1:return r.white(e);case 2:return r.blue(e)}}}()},120:(e,t,n)=>{var r=n(508);e["exports"]=function(){var e=["red","yellow","green","blue","magenta"];return function(t,n,o){if(t===" "){return t}else{return r[e[n++%e.length]](t)}}}()},243:(e,t,n)=>{var r=n(508);e["exports"]=function(){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(t,n,o){return t===" "?t:r[e[Math.round(Math.random()*(e.length-2))]](t)}}()},346:(e,t,n)=>{var r=n(508);e["exports"]=function(e,t,n){return t%2===0?e:r.inverse(e)}},401:e=>{var t={};e["exports"]=t;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach(function(e){var r=n[e];var o=t[e]=[];o.open="["+r[0]+"m";o.close="["+r[1]+"m"})},252:e=>{"use strict";e.exports=function(e,t){t=t||process.argv;var n=t.indexOf("--");var r=/^-{1,2}/.test(e)?"":"--";var o=t.indexOf(r+e);return o!==-1&&(n===-1?true:o{"use strict";var r=n(87);var o=n(252);var i=process.env;var s=void 0;if(o("no-color")||o("no-colors")||o("color=false")){s=false}else if(o("color")||o("colors")||o("color=true")||o("color=always")){s=true}if("FORCE_COLOR"in i){s=i.FORCE_COLOR.length===0||parseInt(i.FORCE_COLOR,10)!==0}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(s===false){return 0}if(o("color=16m")||o("color=full")||o("color=truecolor")){return 3}if(o("color=256")){return 2}if(e&&!e.isTTY&&s!==true){return 0}var t=s?1:0;if(process.platform==="win32"){var n=r.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(n[0])>=10&&Number(n[2])>=10586){return Number(n[2])>=14931?3:2}return 1}if("CI"in i){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(e){return e in i})||i.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in i){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0}if("TERM_PROGRAM"in i){var u=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(i.TERM)){return 2}if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)){return 1}if("COLORTERM"in i){return 1}if(i.TERM==="dumb"){return t}return t}function getSupportLevel(e){var t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},584:(e,t,n)=>{var r=n(508);e["exports"]=r},554:(e,t,n)=>{"use strict";e.exports=n(198)},541:(e,t,n)=>{"use strict";var r=n(826);function noop(){}var o=null;var i={};function getThen(e){try{return e.then}catch(e){o=e;return i}}function tryCallOne(e,t){try{return e(t)}catch(e){o=e;return i}}function tryCallTwo(e,t,n){try{e(t,n)}catch(e){o=e;return i}}e.exports=Promise;function Promise(e){if(typeof this!=="object"){throw new TypeError("Promises must be constructed via new")}if(typeof e!=="function"){throw new TypeError("Promise constructor's argument is not a function")}this._75=0;this._83=0;this._18=null;this._38=null;if(e===noop)return;doResolve(e,this)}Promise._47=null;Promise._71=null;Promise._44=noop;Promise.prototype.then=function(e,t){if(this.constructor!==Promise){return safeThen(this,e,t)}var n=new Promise(noop);handle(this,new Handler(e,t,n));return n};function safeThen(e,t,n){return new e.constructor(function(r,o){var i=new Promise(noop);i.then(r,o);handle(e,new Handler(t,n,i))})}function handle(e,t){while(e._83===3){e=e._18}if(Promise._47){Promise._47(e)}if(e._83===0){if(e._75===0){e._75=1;e._38=t;return}if(e._75===1){e._75=2;e._38=[e._38,t];return}e._38.push(t);return}handleResolved(e,t)}function handleResolved(e,t){r(function(){var n=e._83===1?t.onFulfilled:t.onRejected;if(n===null){if(e._83===1){resolve(t.promise,e._18)}else{reject(t.promise,e._18)}return}var r=tryCallOne(n,e._18);if(r===i){reject(t.promise,o)}else{resolve(t.promise,r)}})}function resolve(e,t){if(t===e){return reject(e,new TypeError("A promise cannot be resolved with itself."))}if(t&&(typeof t==="object"||typeof t==="function")){var n=getThen(t);if(n===i){return reject(e,o)}if(n===e.then&&t instanceof Promise){e._83=3;e._18=t;finale(e);return}else if(typeof n==="function"){doResolve(n.bind(t),e);return}}e._83=1;e._18=t;finale(e)}function reject(e,t){e._83=2;e._18=t;if(Promise._71){Promise._71(e,t)}finale(e)}function finale(e){if(e._75===1){handle(e,e._38);e._38=null}if(e._75===2){for(var t=0;t{"use strict";var r=n(541);e.exports=r;r.prototype.done=function(e,t){var n=arguments.length?this.then.apply(this,arguments):this;n.then(null,function(e){setTimeout(function(){throw e},0)})}},667:(e,t,n)=>{"use strict";var r=n(541);e.exports=r;var o=valuePromise(true);var i=valuePromise(false);var s=valuePromise(null);var u=valuePromise(undefined);var a=valuePromise(0);var c=valuePromise("");function valuePromise(e){var t=new r(r._44);t._83=1;t._18=e;return t}r.resolve=function(e){if(e instanceof r)return e;if(e===null)return s;if(e===undefined)return u;if(e===true)return o;if(e===false)return i;if(e===0)return a;if(e==="")return c;if(typeof e==="object"||typeof e==="function"){try{var t=e.then;if(typeof t==="function"){return new r(t.bind(e))}}catch(e){return new r(function(t,n){n(e)})}}return valuePromise(e)};r.all=function(e){var t=Array.prototype.slice.call(e);return new r(function(e,n){if(t.length===0)return e([]);var o=t.length;function res(i,s){if(s&&(typeof s==="object"||typeof s==="function")){if(s instanceof r&&s.then===r.prototype.then){while(s._83===3){s=s._18}if(s._83===1)return res(i,s._18);if(s._83===2)n(s._18);s.then(function(e){res(i,e)},n);return}else{var u=s.then;if(typeof u==="function"){var a=new r(u.bind(s));a.then(function(e){res(i,e)},n);return}}}t[i]=s;if(--o===0){e(t)}}for(var i=0;i{"use strict";var r=n(541);e.exports=r;r.prototype["finally"]=function(e){return this.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})})}},198:(e,t,n)=>{"use strict";e.exports=n(541);n(200);n(579);n(667);n(369);n(693)},369:(e,t,n)=>{"use strict";var r=n(541);var o=n(307);e.exports=r;r.denodeify=function(e,t){if(typeof t==="number"&&t!==Infinity){return denodeifyWithCount(e,t)}else{return denodeifyWithoutCount(e)}};var i="function (err, res) {"+"if (err) { rj(err); } else { rs(res); }"+"}";function denodeifyWithCount(e,t){var n=[];for(var o=0;o "+t+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+i+";","var res;","switch (argLength) {",n.concat(["extra"]).map(function(e,t){return"case "+t+":"+"res = fn.call("+["self"].concat(n.slice(0,t)).concat("cb").join(",")+");"+"break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],s)(r,e)}r.nodeify=function(e){return function(){var t=Array.prototype.slice.call(arguments);var n=typeof t[t.length-1]==="function"?t.pop():null;var i=this;try{return e.apply(this,arguments).nodeify(n,i)}catch(e){if(n===null||typeof n=="undefined"){return new r(function(t,n){n(e)})}else{o(function(){n.call(i,e)})}}}};r.prototype.nodeify=function(e,t){if(typeof e!="function")return this;this.then(function(n){o(function(){e.call(t,null,n)})},function(n){o(function(){e.call(t,n)})})}},693:(e,t,n)=>{"use strict";var r=n(541);e.exports=r;r.enableSynchronous=function(){r.prototype.isPending=function(){return this.getState()==0};r.prototype.isFulfilled=function(){return this.getState()==1};r.prototype.isRejected=function(){return this.getState()==2};r.prototype.getValue=function(){if(this._83===3){return this._18.getValue()}if(!this.isFulfilled()){throw new Error("Cannot get a value of an unfulfilled promise.")}return this._18};r.prototype.getReason=function(){if(this._83===3){return this._18.getReason()}if(!this.isRejected()){throw new Error("Cannot get a rejection reason of a non-rejected promise.")}return this._18};r.prototype.getState=function(){if(this._83===3){return this._18.getState()}if(this._83===-1||this._83===-2){return 0}return this._83}};r.disableSynchronous=function(){r.prototype.isPending=undefined;r.prototype.isFulfilled=undefined;r.prototype.isRejected=undefined;r.prototype.getValue=undefined;r.prototype.getReason=undefined;r.prototype.getState=undefined}},129:e=>{"use strict";e.exports=require("child_process")},229:e=>{"use strict";e.exports=require("domain")},614:e=>{"use strict";e.exports=require("events")},747:e=>{"use strict";e.exports=require("fs")},605:e=>{"use strict";e.exports=require("http")},211:e=>{"use strict";e.exports=require("https")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")},191:e=>{"use strict";e.exports=require("querystring")},835:e=>{"use strict";e.exports=require("url")},669:e=>{"use strict";e.exports=require("util")},184:e=>{"use strict";e.exports=require("vm")}};var t={};function __nccwpck_require__(n){if(t[n]){return t[n].exports}var r=t[n]={exports:{}};var o=true;try{e[n](r,r.exports,__nccwpck_require__);o=false}finally{if(o)delete t[n]}return r.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(306)})(); \ No newline at end of file diff --git a/packages/next/compiled/arg/index.js b/packages/next/compiled/arg/index.js index 3ca0cace38dc5ec..2b943c4f778af52 100644 --- a/packages/next/compiled/arg/index.js +++ b/packages/next/compiled/arg/index.js @@ -1 +1 @@ -module.exports=(()=>{var o={762:o=>{const c=Symbol("arg flag");function arg(o,{argv:n,permissive:f=false,stopAtPositional:_=false}={}){if(!o){throw new Error("Argument specification object is required")}const h={_:[]};n=n||process.argv.slice(2);const w={};const k={};for(const n of Object.keys(o)){if(!n){throw new TypeError("Argument key cannot be an empty string")}if(n[0]!=="-"){throw new TypeError(`Argument key must start with '-' but found: '${n}'`)}if(n.length===1){throw new TypeError(`Argument key must have a name; singular '-' keys are not allowed: ${n}`)}if(typeof o[n]==="string"){w[n]=o[n];continue}let f=o[n];let _=false;if(Array.isArray(f)&&f.length===1&&typeof f[0]==="function"){const[o]=f;f=((c,n,f=[])=>{f.push(o(c,n,f[f.length-1]));return f});_=o===Boolean||o[c]===true}else if(typeof f==="function"){_=f===Boolean||f[c]===true}else{throw new TypeError(`Type missing or not a function or valid array type: ${n}`)}if(n[1]!=="-"&&n.length>2){throw new TypeError(`Short argument keys (with a single hyphen) must have only one character: ${n}`)}k[n]=[f,_]}for(let o=0,c=n.length;o0){h._=h._.concat(n.slice(o));break}if(c==="--"){h._=h._.concat(n.slice(o+1));break}if(c.length>1&&c[0]==="-"){const _=c[1]==="-"||c.length===2?[c]:c.slice(1).split("").map(o=>`-${o}`);for(let c=0;c<_.length;c++){const b=_[c];const[$,E]=b[1]==="-"?b.split("=",2):[b,undefined];let T=$;while(T in w){T=w[T]}if(!(T in k)){if(f){h._.push(b);continue}else{const o=new Error(`Unknown or unexpected option: ${$}`);o.code="ARG_UNKNOWN_OPTION";throw o}}const[q,O]=k[T];if(!O&&c+1<_.length){throw new TypeError(`Option requires argument (but was followed by another short argument): ${$}`)}if(O){h[T]=q(true,T,h[T])}else if(E===undefined){if(n.length1&&n[o+1][0]==="-"){const o=$===T?"":` (alias for ${T})`;throw new Error(`Option requires argument: ${$}${o}`)}h[T]=q(n[o+1],T,h[T]);++o}else{h[T]=q(E,T,h[T])}}}else{h._.push(c)}}return h}arg.flag=(o=>{o[c]=true;return o});arg.COUNT=arg.flag((o,c,n)=>(n||0)+1);o.exports=arg}};var c={};function __webpack_require__(n){if(c[n]){return c[n].exports}var f=c[n]={exports:{}};var _=true;try{o[n](f,f.exports,__webpack_require__);_=false}finally{if(_)delete c[n]}return f.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(762)})(); \ No newline at end of file +module.exports=(()=>{var o={762:o=>{const c=Symbol("arg flag");function arg(o,{argv:n,permissive:f=false,stopAtPositional:_=false}={}){if(!o){throw new Error("Argument specification object is required")}const h={_:[]};n=n||process.argv.slice(2);const w={};const k={};for(const n of Object.keys(o)){if(!n){throw new TypeError("Argument key cannot be an empty string")}if(n[0]!=="-"){throw new TypeError(`Argument key must start with '-' but found: '${n}'`)}if(n.length===1){throw new TypeError(`Argument key must have a name; singular '-' keys are not allowed: ${n}`)}if(typeof o[n]==="string"){w[n]=o[n];continue}let f=o[n];let _=false;if(Array.isArray(f)&&f.length===1&&typeof f[0]==="function"){const[o]=f;f=((c,n,f=[])=>{f.push(o(c,n,f[f.length-1]));return f});_=o===Boolean||o[c]===true}else if(typeof f==="function"){_=f===Boolean||f[c]===true}else{throw new TypeError(`Type missing or not a function or valid array type: ${n}`)}if(n[1]!=="-"&&n.length>2){throw new TypeError(`Short argument keys (with a single hyphen) must have only one character: ${n}`)}k[n]=[f,_]}for(let o=0,c=n.length;o0){h._=h._.concat(n.slice(o));break}if(c==="--"){h._=h._.concat(n.slice(o+1));break}if(c.length>1&&c[0]==="-"){const _=c[1]==="-"||c.length===2?[c]:c.slice(1).split("").map(o=>`-${o}`);for(let c=0;c<_.length;c++){const b=_[c];const[$,E]=b[1]==="-"?b.split("=",2):[b,undefined];let T=$;while(T in w){T=w[T]}if(!(T in k)){if(f){h._.push(b);continue}else{const o=new Error(`Unknown or unexpected option: ${$}`);o.code="ARG_UNKNOWN_OPTION";throw o}}const[q,O]=k[T];if(!O&&c+1<_.length){throw new TypeError(`Option requires argument (but was followed by another short argument): ${$}`)}if(O){h[T]=q(true,T,h[T])}else if(E===undefined){if(n.length1&&n[o+1][0]==="-"){const o=$===T?"":` (alias for ${T})`;throw new Error(`Option requires argument: ${$}${o}`)}h[T]=q(n[o+1],T,h[T]);++o}else{h[T]=q(E,T,h[T])}}}else{h._.push(c)}}return h}arg.flag=(o=>{o[c]=true;return o});arg.COUNT=arg.flag((o,c,n)=>(n||0)+1);o.exports=arg}};var c={};function __nccwpck_require__(n){if(c[n]){return c[n].exports}var f=c[n]={exports:{}};var _=true;try{o[n](f,f.exports,__nccwpck_require__);_=false}finally{if(_)delete c[n]}return f.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(762)})(); \ No newline at end of file diff --git a/packages/next/compiled/async-retry/index.js b/packages/next/compiled/async-retry/index.js index 2f7eaade44855fd..4a110a48bcecb15 100644 --- a/packages/next/compiled/async-retry/index.js +++ b/packages/next/compiled/async-retry/index.js @@ -1 +1 @@ -module.exports=(()=>{var t={415:(t,r,e)=>{var i=e(347);function retry(t,r){function run(e,o){var n=r||{};var a=i.operation(n);function bail(t){o(t||new Error("Aborted"))}function onError(t,r){if(t.bail){bail(t);return}if(!a.retry(t)){o(a.mainError())}else if(n.onRetry){n.onRetry(t,r)}}function runAttempt(r){var i;try{i=t(bail,r)}catch(t){onError(t,r);return}Promise.resolve(i).then(e).catch(function catchIt(t){onError(t,r)})}a.attempt(runAttempt)}return new Promise(run)}t.exports=retry},347:(t,r,e)=>{t.exports=e(244)},244:(t,r,e)=>{var i=e(369);r.operation=function(t){var e=r.timeouts(t);return new i(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};r.timeouts=function(t){if(t instanceof Array){return[].concat(t)}var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false};for(var e in t){r[e]=t[e]}if(r.minTimeout>r.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var i=[];for(var o=0;o{function RetryOperation(t,r){if(typeof r==="boolean"){r={forever:r}}this._originalTimeouts=JSON.parse(JSON.stringify(t));this._timeouts=t;this._options=r||{};this._maxRetryTime=r&&r.maxRetryTime||Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationTimeout=null;this._operationTimeoutCb=null;this._timeout=null;this._operationStart=null;if(this._options.forever){this._cachedTimeouts=this._timeouts.slice(0)}}t.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1;this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){if(this._timeout){clearTimeout(this._timeout)}this._timeouts=[];this._cachedTimeouts=null};RetryOperation.prototype.retry=function(t){if(this._timeout){clearTimeout(this._timeout)}if(!t){return false}var r=(new Date).getTime();if(t&&r-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(t);var e=this._timeouts.shift();if(e===undefined){if(this._cachedTimeouts){this._errors.splice(this._errors.length-1,this._errors.length);this._timeouts=this._cachedTimeouts.slice(0);e=this._timeouts.shift()}else{return false}}var i=this;var o=setTimeout(function(){i._attempts++;if(i._operationTimeoutCb){i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout);if(i._options.unref){i._timeout.unref()}}i._fn(i._attempts)},e);if(this._options.unref){o.unref()}return true};RetryOperation.prototype.attempt=function(t,r){this._fn=t;if(r){if(r.timeout){this._operationTimeout=r.timeout}if(r.cb){this._operationTimeoutCb=r.cb}}var e=this;if(this._operationTimeoutCb){this._timeout=setTimeout(function(){e._operationTimeoutCb()},e._operationTimeout)}this._operationStart=(new Date).getTime();this._fn(this._attempts)};RetryOperation.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated");this.attempt(t)};RetryOperation.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated");this.attempt(t)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0){return null}var t={};var r=null;var e=0;for(var i=0;i=e){r=o;e=a}}return r}}};var r={};function __webpack_require__(e){if(r[e]){return r[e].exports}var i=r[e]={exports:{}};var o=true;try{t[e](i,i.exports,__webpack_require__);o=false}finally{if(o)delete r[e]}return i.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(415)})(); \ No newline at end of file +module.exports=(()=>{var t={415:(t,r,e)=>{var i=e(347);function retry(t,r){function run(e,o){var n=r||{};var a=i.operation(n);function bail(t){o(t||new Error("Aborted"))}function onError(t,r){if(t.bail){bail(t);return}if(!a.retry(t)){o(a.mainError())}else if(n.onRetry){n.onRetry(t,r)}}function runAttempt(r){var i;try{i=t(bail,r)}catch(t){onError(t,r);return}Promise.resolve(i).then(e).catch(function catchIt(t){onError(t,r)})}a.attempt(runAttempt)}return new Promise(run)}t.exports=retry},347:(t,r,e)=>{t.exports=e(244)},244:(t,r,e)=>{var i=e(369);r.operation=function(t){var e=r.timeouts(t);return new i(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};r.timeouts=function(t){if(t instanceof Array){return[].concat(t)}var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false};for(var e in t){r[e]=t[e]}if(r.minTimeout>r.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var i=[];for(var o=0;o{function RetryOperation(t,r){if(typeof r==="boolean"){r={forever:r}}this._originalTimeouts=JSON.parse(JSON.stringify(t));this._timeouts=t;this._options=r||{};this._maxRetryTime=r&&r.maxRetryTime||Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationTimeout=null;this._operationTimeoutCb=null;this._timeout=null;this._operationStart=null;if(this._options.forever){this._cachedTimeouts=this._timeouts.slice(0)}}t.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1;this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){if(this._timeout){clearTimeout(this._timeout)}this._timeouts=[];this._cachedTimeouts=null};RetryOperation.prototype.retry=function(t){if(this._timeout){clearTimeout(this._timeout)}if(!t){return false}var r=(new Date).getTime();if(t&&r-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(t);var e=this._timeouts.shift();if(e===undefined){if(this._cachedTimeouts){this._errors.splice(this._errors.length-1,this._errors.length);this._timeouts=this._cachedTimeouts.slice(0);e=this._timeouts.shift()}else{return false}}var i=this;var o=setTimeout(function(){i._attempts++;if(i._operationTimeoutCb){i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout);if(i._options.unref){i._timeout.unref()}}i._fn(i._attempts)},e);if(this._options.unref){o.unref()}return true};RetryOperation.prototype.attempt=function(t,r){this._fn=t;if(r){if(r.timeout){this._operationTimeout=r.timeout}if(r.cb){this._operationTimeoutCb=r.cb}}var e=this;if(this._operationTimeoutCb){this._timeout=setTimeout(function(){e._operationTimeoutCb()},e._operationTimeout)}this._operationStart=(new Date).getTime();this._fn(this._attempts)};RetryOperation.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated");this.attempt(t)};RetryOperation.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated");this.attempt(t)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0){return null}var t={};var r=null;var e=0;for(var i=0;i=e){r=o;e=a}}return r}}};var r={};function __nccwpck_require__(e){if(r[e]){return r[e].exports}var i=r[e]={exports:{}};var o=true;try{t[e](i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete r[e]}return i.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(415)})(); \ No newline at end of file diff --git a/packages/next/compiled/async-sema/index.js b/packages/next/compiled/async-sema/index.js index dca41ae515eca61..b43cae5d998a84a 100644 --- a/packages/next/compiled/async-sema/index.js +++ b/packages/next/compiled/async-sema/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var t={884:function(t,e,i){var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const r=s(i(614));function arrayMove(t,e,i,s,r){for(let n=0;n>>0;t=t-1;t=t|t>>1;t=t|t>>2;t=t|t>>4;t=t|t>>8;t=t|t>>16;return t+1}function getCapacity(t){return pow2AtLeast(Math.min(Math.max(16,t),1073741824))}class Deque{constructor(t){this._capacity=getCapacity(t);this._length=0;this._front=0;this.arr=[]}push(t){const e=this._length;this.checkCapacity(e+1);const i=this._front+e&this._capacity-1;this.arr[i]=t;this._length=e+1;return e+1}pop(){const t=this._length;if(t===0){return void 0}const e=this._front+t-1&this._capacity-1;const i=this.arr[e];this.arr[e]=void 0;this._length=t-1;return i}shift(){const t=this._length;if(t===0){return void 0}const e=this._front;const i=this.arr[e];this.arr[e]=void 0;this._front=e+1&this._capacity-1;this._length=t-1;return i}get length(){return this._length}checkCapacity(t){if(this._capacitye){const t=i+s&e-1;arrayMove(this.arr,0,this.arr,e,t)}}}class ReleaseEmitter extends r.default{}function isFn(t){return typeof t==="function"}function defaultInit(){return"1"}class Sema{constructor(t,{initFn:e=defaultInit,pauseFn:i,resumeFn:s,capacity:r=10}={}){if(isFn(i)!==isFn(s)){throw new Error("pauseFn and resumeFn must be both set for pausing")}this.nrTokens=t;this.free=new Deque(t);this.waiting=new Deque(r);this.releaseEmitter=new ReleaseEmitter;this.noTokens=e===defaultInit;this.pauseFn=i;this.resumeFn=s;this.paused=false;this.releaseEmitter.on("release",t=>{const e=this.waiting.shift();if(e){e.resolve(t)}else{if(this.resumeFn&&this.paused){this.paused=false;this.resumeFn()}this.free.push(t)}});for(let i=0;i{if(this.pauseFn&&!this.paused){this.paused=true;this.pauseFn()}this.waiting.push({resolve:t,reject:e})})}release(t){this.releaseEmitter.emit("release",this.noTokens?"1":t)}drain(){const t=new Array(this.nrTokens);for(let e=0;es.release(),r)}}e.RateLimit=RateLimit},614:t=>{t.exports=require("events")}};var e={};function __webpack_require__(i){if(e[i]){return e[i].exports}var s=e[i]={exports:{}};var r=true;try{t[i].call(s.exports,s,s.exports,__webpack_require__);r=false}finally{if(r)delete e[i]}return s.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(884)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var t={884:function(t,e,i){var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const r=s(i(614));function arrayMove(t,e,i,s,r){for(let n=0;n>>0;t=t-1;t=t|t>>1;t=t|t>>2;t=t|t>>4;t=t|t>>8;t=t|t>>16;return t+1}function getCapacity(t){return pow2AtLeast(Math.min(Math.max(16,t),1073741824))}class Deque{constructor(t){this._capacity=getCapacity(t);this._length=0;this._front=0;this.arr=[]}push(t){const e=this._length;this.checkCapacity(e+1);const i=this._front+e&this._capacity-1;this.arr[i]=t;this._length=e+1;return e+1}pop(){const t=this._length;if(t===0){return void 0}const e=this._front+t-1&this._capacity-1;const i=this.arr[e];this.arr[e]=void 0;this._length=t-1;return i}shift(){const t=this._length;if(t===0){return void 0}const e=this._front;const i=this.arr[e];this.arr[e]=void 0;this._front=e+1&this._capacity-1;this._length=t-1;return i}get length(){return this._length}checkCapacity(t){if(this._capacitye){const t=i+s&e-1;arrayMove(this.arr,0,this.arr,e,t)}}}class ReleaseEmitter extends r.default{}function isFn(t){return typeof t==="function"}function defaultInit(){return"1"}class Sema{constructor(t,{initFn:e=defaultInit,pauseFn:i,resumeFn:s,capacity:r=10}={}){if(isFn(i)!==isFn(s)){throw new Error("pauseFn and resumeFn must be both set for pausing")}this.nrTokens=t;this.free=new Deque(t);this.waiting=new Deque(r);this.releaseEmitter=new ReleaseEmitter;this.noTokens=e===defaultInit;this.pauseFn=i;this.resumeFn=s;this.paused=false;this.releaseEmitter.on("release",t=>{const e=this.waiting.shift();if(e){e.resolve(t)}else{if(this.resumeFn&&this.paused){this.paused=false;this.resumeFn()}this.free.push(t)}});for(let i=0;i{if(this.pauseFn&&!this.paused){this.paused=true;this.pauseFn()}this.waiting.push({resolve:t,reject:e})})}release(t){this.releaseEmitter.emit("release",this.noTokens?"1":t)}drain(){const t=new Array(this.nrTokens);for(let e=0;es.release(),r)}}e.RateLimit=RateLimit},614:t=>{t.exports=require("events")}};var e={};function __nccwpck_require__(i){if(e[i]){return e[i].exports}var s=e[i]={exports:{}};var r=true;try{t[i].call(s.exports,s,s.exports,__nccwpck_require__);r=false}finally{if(r)delete e[i]}return s.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(884)})(); \ No newline at end of file diff --git a/packages/next/compiled/babel/bundle.js b/packages/next/compiled/babel/bundle.js index 78d5bf5314ee8f5..a97696f346cf1eb 100644 --- a/packages/next/compiled/babel/bundle.js +++ b/packages/next/compiled/babel/bundle.js @@ -2191,4 +2191,4 @@ module.exports=(()=>{var e={44954:e=>{"use strict";e.exports=JSON.parse('{"es6.a (function (${t.identifier(o)}) { ${l} })(${i} || (${t.cloneNode(i)} = ${u})); - `}},31507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(70287);var n=r(85850);var a=(0,s.declare)(e=>{e.assertVersion(7);const t=/[\ud800-\udfff]/g;const r=/(\\+)u\{([0-9a-fA-F]+)\}/g;function escape(e){let t=e.toString(16);while(t.length<4)t="0"+t;return"\\u"+t}function replacer(e,t,r){if(t.length%2===0){return e}const s=String.fromCodePoint(parseInt(r,16));const n=t.slice(0,-1)+escape(s.charCodeAt(0));return s.length===1?n:n+escape(s.charCodeAt(1))}function replaceUnicodeEscapes(e){return e.replace(r,replacer)}function getUnicodeEscape(e){let t;while(t=r.exec(e)){if(t[1].length%2===0)continue;r.lastIndex=0;return t[0]}return null}return{name:"transform-unicode-escapes",visitor:{Identifier(e){const{node:r,key:s}=e;const{name:a}=r;const i=a.replace(t,e=>{return`_u${e.charCodeAt(0).toString(16)}`});if(a===i)return;const o=n.types.inherits(n.types.stringLiteral(a),r);if(s==="key"){e.replaceWith(o);return}const{parentPath:l,scope:u}=e;if(l.isMemberExpression({property:r})||l.isOptionalMemberExpression({property:r})){l.node.computed=true;e.replaceWith(o);return}const c=u.getBinding(a);if(c){u.rename(a,u.generateUid(i));return}throw e.buildCodeFrameError(`Can't reference '${a}' as a bare identifier`)},"StringLiteral|DirectiveLiteral"(e){const{node:t}=e;const{extra:r}=t;if(r==null?void 0:r.raw)r.raw=replaceUnicodeEscapes(r.raw)},TemplateElement(e){const{node:t,parentPath:r}=e;const{value:s}=t;const n=getUnicodeEscape(s.raw);if(!n)return;const a=r.parentPath;if(a.isTaggedTemplateExpression()){throw e.buildCodeFrameError(`Can't replace Unicode escape '${n}' inside tagged template literals. You can enable '@babel/plugin-transform-template-literals' to compile them to classic strings.`)}s.raw=replaceUnicodeEscapes(s.raw)}}}});t.default=a},91990:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(36610);var n=r(70287);var a=(0,n.declare)(e=>{e.assertVersion(7);return(0,s.createRegExpFeaturePlugin)({name:"transform-unicode-regex",feature:"unicodeFlag"})});t.default=a},39291:e=>{const t=new Set(["proposal-class-properties","proposal-private-methods"]);const r={"proposal-async-generator-functions":"syntax-async-generators","proposal-class-properties":"syntax-class-properties","proposal-json-strings":"syntax-json-strings","proposal-nullish-coalescing-operator":"syntax-nullish-coalescing-operator","proposal-numeric-separator":"syntax-numeric-separator","proposal-object-rest-spread":"syntax-object-rest-spread","proposal-optional-catch-binding":"syntax-optional-catch-binding","proposal-optional-chaining":"syntax-optional-chaining","proposal-private-methods":"syntax-class-properties","proposal-unicode-property-regex":null};const s=Object.keys(r).map(function(e){return[e,r[e]]});const n=new Map(s);e.exports={pluginSyntaxMap:n,proposalPlugins:t}},98805:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(5116));var n=_interopRequireDefault(r(82112));var a=_interopRequireDefault(r(57640));var i=_interopRequireDefault(r(23817));var o=_interopRequireDefault(r(26456));var l=_interopRequireDefault(r(99420));var u=_interopRequireDefault(r(61586));var c=_interopRequireDefault(r(95619));var p=_interopRequireDefault(r(86343));var f=_interopRequireDefault(r(28909));var d=_interopRequireDefault(r(39797));var y=_interopRequireDefault(r(56679));var h=_interopRequireDefault(r(14189));var m=_interopRequireDefault(r(53447));var g=_interopRequireDefault(r(74690));var b=_interopRequireDefault(r(78562));var x=_interopRequireDefault(r(91253));var v=_interopRequireDefault(r(76321));var E=_interopRequireDefault(r(66841));var T=_interopRequireDefault(r(17788));var S=_interopRequireDefault(r(15654));var P=_interopRequireDefault(r(82079));var j=_interopRequireDefault(r(35078));var w=_interopRequireDefault(r(12077));var A=_interopRequireDefault(r(4197));var D=_interopRequireDefault(r(43673));var O=_interopRequireDefault(r(45807));var _=_interopRequireDefault(r(84419));var C=_interopRequireDefault(r(21600));var I=_interopRequireDefault(r(7109));var k=_interopRequireDefault(r(13798));var R=_interopRequireDefault(r(32817));var M=_interopRequireDefault(r(74483));var N=_interopRequireDefault(r(74058));var F=_interopRequireDefault(r(36195));var L=_interopRequireDefault(r(59630));var B=_interopRequireDefault(r(46642));var q=_interopRequireDefault(r(5718));var W=_interopRequireDefault(r(59153));var U=_interopRequireDefault(r(50933));var K=_interopRequireDefault(r(68749));var V=_interopRequireDefault(r(82565));var $=_interopRequireDefault(r(79874));var J=_interopRequireDefault(r(46660));var H=_interopRequireDefault(r(79418));var G=_interopRequireDefault(r(19562));var Y=_interopRequireDefault(r(26155));var X=_interopRequireDefault(r(17655));var z=_interopRequireDefault(r(2397));var Q=_interopRequireDefault(r(26088));var Z=_interopRequireDefault(r(27476));var ee=_interopRequireDefault(r(48315));var te=_interopRequireDefault(r(84779));var re=_interopRequireDefault(r(84611));var se=_interopRequireDefault(r(446));var ne=_interopRequireDefault(r(31507));var ae=_interopRequireDefault(r(91990));var ie=_interopRequireDefault(r(30348));var oe=_interopRequireDefault(r(45585));var le=_interopRequireDefault(r(1056));var ue=_interopRequireDefault(r(64038));var ce=_interopRequireDefault(r(86808));var pe=_interopRequireDefault(r(96126));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var fe={"bugfix/transform-async-arrows-in-class":ie.default,"bugfix/transform-edge-default-parameters":oe.default,"bugfix/transform-edge-function-name":le.default,"bugfix/transform-safari-block-shadowing":ce.default,"bugfix/transform-safari-for-shadowing":pe.default,"bugfix/transform-tagged-template-caching":ue.default,"proposal-async-generator-functions":h.default,"proposal-class-properties":m.default,"proposal-dynamic-import":g.default,"proposal-export-namespace-from":b.default,"proposal-json-strings":x.default,"proposal-logical-assignment-operators":v.default,"proposal-nullish-coalescing-operator":E.default,"proposal-numeric-separator":T.default,"proposal-object-rest-spread":S.default,"proposal-optional-catch-binding":P.default,"proposal-optional-chaining":j.default,"proposal-private-methods":w.default,"proposal-unicode-property-regex":A.default,"syntax-async-generators":s.default,"syntax-class-properties":n.default,"syntax-dynamic-import":a.default,"syntax-export-namespace-from":i.default,"syntax-json-strings":o.default,"syntax-logical-assignment-operators":l.default,"syntax-nullish-coalescing-operator":u.default,"syntax-numeric-separator":c.default,"syntax-object-rest-spread":p.default,"syntax-optional-catch-binding":f.default,"syntax-optional-chaining":d.default,"syntax-top-level-await":y.default,"transform-arrow-functions":O.default,"transform-async-to-generator":D.default,"transform-block-scoped-functions":_.default,"transform-block-scoping":C.default,"transform-classes":I.default,"transform-computed-properties":k.default,"transform-destructuring":R.default,"transform-dotall-regex":M.default,"transform-duplicate-keys":N.default,"transform-exponentiation-operator":F.default,"transform-for-of":L.default,"transform-function-name":B.default,"transform-literals":q.default,"transform-member-expression-literals":W.default,"transform-modules-amd":U.default,"transform-modules-commonjs":K.default,"transform-modules-systemjs":V.default,"transform-modules-umd":$.default,"transform-named-capturing-groups-regex":J.default,"transform-new-target":H.default,"transform-object-super":G.default,"transform-parameters":Y.default,"transform-property-literals":X.default,"transform-regenerator":z.default,"transform-reserved-words":Q.default,"transform-shorthand-properties":Z.default,"transform-spread":ee.default,"transform-sticky-regex":te.default,"transform-template-literals":re.default,"transform-typeof-symbol":se.default,"transform-unicode-escapes":ne.default,"transform-unicode-regex":ae.default};t.default=fe},37192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.logUsagePolyfills=t.logEntryPolyfills=t.logPluginOrPolyfill=void 0;var s=r(34487);const n=e=>{return e>1?"s":""};const a=(e,t,r)=>{const n=(0,s.getInclusionReasons)(e,t,r);const a=JSON.stringify(n).replace(/,/g,", ").replace(/^\{"/,'{ "').replace(/"\}$/,'" }');console.log(` ${e} ${a}`)};t.logPluginOrPolyfill=a;const i=(e,t,r,s,i,o)=>{if(process.env.BABEL_ENV==="test"){s=s.replace(/\\/g,"/")}if(!t){console.log(`\n[${s}] Import of ${e} was not found.`);return}if(!r.size){console.log(`\n[${s}] Based on your targets, polyfills were not added.`);return}console.log(`\n[${s}] Replaced ${e} entries with the following polyfill${n(r.size)}:`);for(const e of r){a(e,i,o)}};t.logEntryPolyfills=i;const o=(e,t,r,s)=>{if(process.env.BABEL_ENV==="test"){t=t.replace(/\\/g,"/")}if(!e.size){console.log(`\n[${t}] Based on your code and targets, core-js polyfills were not added.`);return}console.log(`\n[${t}] Added following core-js polyfill${n(e.size)}:`);for(const t of e){a(t,r,s)}};t.logUsagePolyfills=o},33330:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.removeUnnecessaryItems=removeUnnecessaryItems;function removeUnnecessaryItems(e,t){e.forEach(r=>{var s;(s=t[r])==null?void 0:s.forEach(t=>e.delete(t))})}},90666:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;const r=["transform-typeof-symbol"];function _default({loose:e}){return e?r:null}},92553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isPluginRequired=isPluginRequired;t.default=t.getPolyfillPlugins=t.getModulesPluginNames=t.transformIncludesAndExcludes=void 0;var s=r(62519);var n=r(37192);var a=_interopRequireDefault(r(90666));var i=r(33330);var o=_interopRequireDefault(r(73422));var l=_interopRequireDefault(r(91e3));var u=r(39291);var c=r(13528);var p=_interopRequireDefault(r(7409));var f=_interopRequireDefault(r(26763));var d=_interopRequireDefault(r(30172));var y=_interopRequireDefault(r(15045));var h=_interopRequireDefault(r(59817));var m=_interopRequireDefault(r(80101));var g=_interopRequireDefault(r(1066));var b=_interopRequireWildcard(r(34487));var x=_interopRequireDefault(r(98805));var v=r(41013);var E=r(70287);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isPluginRequired(e,t){return(0,b.isRequired)("fake-name",e,{compatData:{"fake-name":t}})}const T={withProposals:{withoutBugfixes:c.plugins,withBugfixes:Object.assign({},c.plugins,c.pluginsBugfixes)},withoutProposals:{withoutBugfixes:(0,v.filterStageFromList)(c.plugins,u.proposalPlugins),withBugfixes:(0,v.filterStageFromList)(Object.assign({},c.plugins,c.pluginsBugfixes),u.proposalPlugins)}};function getPluginList(e,t){if(e){if(t)return T.withProposals.withBugfixes;else return T.withProposals.withoutBugfixes}else{if(t)return T.withoutProposals.withBugfixes;else return T.withoutProposals.withoutBugfixes}}const S=e=>{const t=x.default[e];if(!t){throw new Error(`Could not find plugin "${e}". Ensure there is an entry in ./available-plugins.js for it.`)}return t};const P=e=>{return e.reduce((e,t)=>{const r=t.match(/^(es|es6|es7|esnext|web)\./)?"builtIns":"plugins";e[r].add(t);return e},{all:e,plugins:new Set,builtIns:new Set})};t.transformIncludesAndExcludes=P;const j=({modules:e,transformations:t,shouldTransformESM:r,shouldTransformDynamicImport:s,shouldTransformExportNamespaceFrom:n,shouldParseTopLevelAwait:a})=>{const i=[];if(e!==false&&t[e]){if(r){i.push(t[e])}if(s&&r&&e!=="umd"){i.push("proposal-dynamic-import")}else{if(s){console.warn("Dynamic import can only be supported when transforming ES modules"+" to AMD, CommonJS or SystemJS. Only the parser plugin will be enabled.")}i.push("syntax-dynamic-import")}}else{i.push("syntax-dynamic-import")}if(n){i.push("proposal-export-namespace-from")}else{i.push("syntax-export-namespace-from")}if(a){i.push("syntax-top-level-await")}return i};t.getModulesPluginNames=j;const w=({useBuiltIns:e,corejs:t,polyfillTargets:r,include:s,exclude:n,proposals:a,shippedProposals:i,regenerator:o,debug:l})=>{const u=[];if(e==="usage"||e==="entry"){const c={corejs:t,polyfillTargets:r,include:s,exclude:n,proposals:a,shippedProposals:i,regenerator:o,debug:l};if(t){if(e==="usage"){if(t.major===2){u.push([f.default,c])}else{u.push([d.default,c])}if(o){u.push([y.default,c])}}else{if(t.major===2){u.push([h.default,c])}else{u.push([m.default,c]);if(!o){u.push([g.default,c])}}}}}return u};t.getPolyfillPlugins=w;function supportsStaticESM(e){return!!(e==null?void 0:e.supportsStaticESM)}function supportsDynamicImport(e){return!!(e==null?void 0:e.supportsDynamicImport)}function supportsExportNamespaceFrom(e){return!!(e==null?void 0:e.supportsExportNamespaceFrom)}function supportsTopLevelAwait(e){return!!(e==null?void 0:e.supportsTopLevelAwait)}var A=(0,E.declare)((e,t)=>{e.assertVersion(7);const{bugfixes:r,configPath:s,debug:f,exclude:d,forceAllTransforms:y,ignoreBrowserslistConfig:h,include:m,loose:g,modules:x,shippedProposals:v,spec:E,targets:T,useBuiltIns:A,corejs:{version:D,proposals:O},browserslistEnv:_}=(0,l.default)(t);let C=false;if(T==null?void 0:T.uglify){C=true;delete T.uglify;console.log("");console.log("The uglify target has been deprecated. Set the top level");console.log("option `forceAllTransforms: true` instead.");console.log("")}if((T==null?void 0:T.esmodules)&&T.browsers){console.log("");console.log("@babel/preset-env: esmodules and browsers targets have been specified together.");console.log(`\`browsers\` target, \`${T.browsers}\` will be ignored.`);console.log("")}const I=(0,b.default)(T,{ignoreBrowserslistConfig:h,configPath:s,browserslistEnv:_});const k=P(m);const R=P(d);const M=y||C?{}:I;const N=getPluginList(v,r);const F=x==="auto"&&(e.caller==null?void 0:e.caller(supportsExportNamespaceFrom))||x===false&&!(0,b.isRequired)("proposal-export-namespace-from",M,{compatData:N,includes:k.plugins,excludes:R.plugins});const L=j({modules:x,transformations:o.default,shouldTransformESM:x!=="auto"||!(e.caller==null?void 0:e.caller(supportsStaticESM)),shouldTransformDynamicImport:x!=="auto"||!(e.caller==null?void 0:e.caller(supportsDynamicImport)),shouldTransformExportNamespaceFrom:!F,shouldParseTopLevelAwait:!e.caller||e.caller(supportsTopLevelAwait)});const B=(0,b.filterItems)(N,k.plugins,R.plugins,M,L,(0,a.default)({loose:g}),u.pluginSyntaxMap);(0,i.removeUnnecessaryItems)(B,p.default);const q=w({useBuiltIns:A,corejs:D,polyfillTargets:I,include:k.builtIns,exclude:R.builtIns,proposals:O,shippedProposals:v,regenerator:B.has("transform-regenerator"),debug:f});const W=A!==false;const U=Array.from(B).map(e=>{if(e==="proposal-class-properties"||e==="proposal-private-methods"||e==="proposal-private-property-in-object"){return[S(e),{loose:g?"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error":"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"}]}return[S(e),{spec:E,loose:g,useBuiltIns:W}]}).concat(q);if(f){console.log("@babel/preset-env: `DEBUG` option");console.log("\nUsing targets:");console.log(JSON.stringify((0,b.prettifyTargets)(I),null,2));console.log(`\nUsing modules transform: ${x.toString()}`);console.log("\nUsing plugins:");B.forEach(e=>{(0,n.logPluginOrPolyfill)(e,I,c.plugins)});if(!A){console.log("\nUsing polyfills: No polyfills were added, since the `useBuiltIns` option was not set.")}else{console.log(`\nUsing polyfills with \`${A}\` option:`)}}return{plugins:U}});t.default=A},73422:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var r={auto:"transform-modules-commonjs",amd:"transform-modules-amd",commonjs:"transform-modules-commonjs",cjs:"transform-modules-commonjs",systemjs:"transform-modules-systemjs",umd:"transform-modules-umd"};t.default=r},91000:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.normalizeCoreJSOption=normalizeCoreJSOption;t.default=normalizeOptions;t.validateUseBuiltInsOption=t.validateModulesOption=t.checkDuplicateIncludeExcludes=t.normalizePluginName=void 0;var s=_interopRequireDefault(r(49686));var n=r(62519);var a=_interopRequireDefault(r(44954));var i=r(13528);var o=_interopRequireDefault(r(73422));var l=r(54613);var u=r(69562);var c=r(14293);var p=r(22174);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const f=new u.OptionValidator(p.name);const d=Object.keys(i.plugins);const y=["proposal-dynamic-import",...Object.keys(o.default).map(e=>o.default[e])];const h=(e,t)=>new Set([...d,...e==="exclude"?y:[],...t?t==2?[...Object.keys(a.default),...c.defaultWebIncludes]:Object.keys(s.default):[]]);const m=e=>{if(e instanceof RegExp)return e;try{return new RegExp(`^${v(e)}$`)}catch(e){return null}};const g=(e,t,r)=>Array.from(h(t,r)).filter(t=>e instanceof RegExp&&e.test(t));const b=e=>[].concat(...e);const x=(e=[],t,r)=>{if(e.length===0)return[];const s=e.map(e=>g(m(e),t,r));const n=e.filter((e,t)=>s[t].length===0);f.invariant(n.length===0,`The plugins/built-ins '${n.join(", ")}' passed to the '${t}' option are not\n valid. Please check data/[plugin-features|built-in-features].js in babel-preset-env`);return b(s)};const v=e=>e.replace(/^(@babel\/|babel-)(plugin-)?/,"");t.normalizePluginName=v;const E=(e=[],t=[])=>{const r=e.filter(e=>t.indexOf(e)>=0);f.invariant(r.length===0,`The plugins/built-ins '${r.join(", ")}' were found in both the "include" and\n "exclude" options.`)};t.checkDuplicateIncludeExcludes=E;const T=e=>{if(typeof e==="string"||Array.isArray(e)){return{browsers:e}}return Object.assign({},e)};const S=(e=l.ModulesOption.auto)=>{f.invariant(l.ModulesOption[e.toString()]||e===l.ModulesOption.false,`The 'modules' option must be one of \n`+` - 'false' to indicate no module processing\n`+` - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'`+` - 'auto' (default) which will automatically select 'false' if the current\n`+` process is known to support ES module syntax, or "commonjs" otherwise\n`);return e};t.validateModulesOption=S;const P=(e=false)=>{f.invariant(l.UseBuiltInsOption[e.toString()]||e===l.UseBuiltInsOption.false,`The 'useBuiltIns' option must be either\n 'false' (default) to indicate no polyfill,\n '"entry"' to indicate replacing the entry polyfill, or\n '"usage"' to import only used polyfills per file`);return e};t.validateUseBuiltInsOption=P;function normalizeCoreJSOption(e,t){let r=false;let s;if(t&&e===undefined){s=2;console.warn("\nWARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a "+"core-js version. Currently, we assume version 2.x when no version "+"is passed. Since this default version will likely change in future "+"versions of Babel, we recommend explicitly setting the core-js version "+"you are using via the `corejs` option.\n"+"\nYou should also be sure that the version you pass to the `corejs` "+"option matches the version specified in your `package.json`'s "+"`dependencies` section. If it doesn't, you need to run one of the "+"following commands:\n\n"+" npm install --save core-js@2 npm install --save core-js@3\n"+" yarn add core-js@2 yarn add core-js@3\n\n"+"More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins\n"+"More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs")}else if(typeof e==="object"&&e!==null){s=e.version;r=Boolean(e.proposals)}else{s=e}const a=s?(0,n.coerce)(String(s)):false;if(!t&&a){console.log("\nWARNING (@babel/preset-env): The `corejs` option only has an effect when the `useBuiltIns` option is not `false`\n")}if(t&&(!a||a.major<2||a.major>3)){throw new RangeError("Invalid Option: The version passed to `corejs` is invalid. Currently, "+"only core-js@2 and core-js@3 are supported.")}return{version:a,proposals:r}}function normalizeOptions(e){f.validateTopLevelOptions(e,l.TopLevelOptions);const t=P(e.useBuiltIns);const r=normalizeCoreJSOption(e.corejs,t);const s=x(e.include,l.TopLevelOptions.include,!!r.version&&r.version.major);const n=x(e.exclude,l.TopLevelOptions.exclude,!!r.version&&r.version.major);E(s,n);return{bugfixes:f.validateBooleanOption(l.TopLevelOptions.bugfixes,e.bugfixes,false),configPath:f.validateStringOption(l.TopLevelOptions.configPath,e.configPath,process.cwd()),corejs:r,debug:f.validateBooleanOption(l.TopLevelOptions.debug,e.debug,false),include:s,exclude:n,forceAllTransforms:f.validateBooleanOption(l.TopLevelOptions.forceAllTransforms,e.forceAllTransforms,false),ignoreBrowserslistConfig:f.validateBooleanOption(l.TopLevelOptions.ignoreBrowserslistConfig,e.ignoreBrowserslistConfig,false),loose:f.validateBooleanOption(l.TopLevelOptions.loose,e.loose,false),modules:S(e.modules),shippedProposals:f.validateBooleanOption(l.TopLevelOptions.shippedProposals,e.shippedProposals,false),spec:f.validateBooleanOption(l.TopLevelOptions.spec,e.spec,false),targets:T(e.targets),useBuiltIns:t,browserslistEnv:f.validateStringOption(l.TopLevelOptions.browserslistEnv,e.browserslistEnv)}}},54613:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UseBuiltInsOption=t.ModulesOption=t.TopLevelOptions=void 0;const r={bugfixes:"bugfixes",configPath:"configPath",corejs:"corejs",debug:"debug",exclude:"exclude",forceAllTransforms:"forceAllTransforms",ignoreBrowserslistConfig:"ignoreBrowserslistConfig",include:"include",loose:"loose",modules:"modules",shippedProposals:"shippedProposals",spec:"spec",targets:"targets",useBuiltIns:"useBuiltIns",browserslistEnv:"browserslistEnv"};t.TopLevelOptions=r;const s={false:false,auto:"auto",amd:"amd",commonjs:"commonjs",cjs:"cjs",systemjs:"systemjs",umd:"umd"};t.ModulesOption=s;const n={false:false,entry:"entry",usage:"usage"};t.UseBuiltInsOption=n},13528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pluginsBugfixes=t.plugins=void 0;var s=_interopRequireDefault(r(65561));var n=_interopRequireDefault(r(68991));var a=_interopRequireDefault(r(98805));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i={};t.plugins=i;const o={};t.pluginsBugfixes=o;for(const e of Object.keys(s.default)){if(Object.hasOwnProperty.call(a.default,e)){i[e]=s.default[e]}}for(const e of Object.keys(n.default)){if(Object.hasOwnProperty.call(a.default,e)){o[e]=n.default[e]}}i["proposal-class-properties"]=i["proposal-private-methods"]},84434:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.StaticProperties=t.InstanceProperties=t.BuiltIns=void 0;const r=["es6.object.to-string","es6.array.iterator","web.dom.iterable"];const s=["es6.string.iterator",...r];const n=["es6.object.to-string","es6.promise"];const a={DataView:"es6.typed.data-view",Float32Array:"es6.typed.float32-array",Float64Array:"es6.typed.float64-array",Int8Array:"es6.typed.int8-array",Int16Array:"es6.typed.int16-array",Int32Array:"es6.typed.int32-array",Map:["es6.map",...s],Number:"es6.number.constructor",Promise:n,RegExp:["es6.regexp.constructor"],Set:["es6.set",...s],Symbol:["es6.symbol","es7.symbol.async-iterator"],Uint8Array:"es6.typed.uint8-array",Uint8ClampedArray:"es6.typed.uint8-clamped-array",Uint16Array:"es6.typed.uint16-array",Uint32Array:"es6.typed.uint32-array",WeakMap:["es6.weak-map",...s],WeakSet:["es6.weak-set",...s]};t.BuiltIns=a;const i={__defineGetter__:["es7.object.define-getter"],__defineSetter__:["es7.object.define-setter"],__lookupGetter__:["es7.object.lookup-getter"],__lookupSetter__:["es7.object.lookup-setter"],anchor:["es6.string.anchor"],big:["es6.string.big"],bind:["es6.function.bind"],blink:["es6.string.blink"],bold:["es6.string.bold"],codePointAt:["es6.string.code-point-at"],copyWithin:["es6.array.copy-within"],endsWith:["es6.string.ends-with"],entries:r,every:["es6.array.is-array"],fill:["es6.array.fill"],filter:["es6.array.filter"],finally:["es7.promise.finally",...n],find:["es6.array.find"],findIndex:["es6.array.find-index"],fixed:["es6.string.fixed"],flags:["es6.regexp.flags"],flatMap:["es7.array.flat-map"],fontcolor:["es6.string.fontcolor"],fontsize:["es6.string.fontsize"],forEach:["es6.array.for-each"],includes:["es6.string.includes","es7.array.includes"],indexOf:["es6.array.index-of"],italics:["es6.string.italics"],keys:r,lastIndexOf:["es6.array.last-index-of"],link:["es6.string.link"],map:["es6.array.map"],match:["es6.regexp.match"],name:["es6.function.name"],padStart:["es7.string.pad-start"],padEnd:["es7.string.pad-end"],reduce:["es6.array.reduce"],reduceRight:["es6.array.reduce-right"],repeat:["es6.string.repeat"],replace:["es6.regexp.replace"],search:["es6.regexp.search"],slice:["es6.array.slice"],small:["es6.string.small"],some:["es6.array.some"],sort:["es6.array.sort"],split:["es6.regexp.split"],startsWith:["es6.string.starts-with"],strike:["es6.string.strike"],sub:["es6.string.sub"],sup:["es6.string.sup"],toISOString:["es6.date.to-iso-string"],toJSON:["es6.date.to-json"],toString:["es6.object.to-string","es6.date.to-string","es6.regexp.to-string"],trim:["es6.string.trim"],trimEnd:["es7.string.trim-right"],trimLeft:["es7.string.trim-left"],trimRight:["es7.string.trim-right"],trimStart:["es7.string.trim-left"],values:r};t.InstanceProperties=i;const o={Array:{from:["es6.array.from","es6.string.iterator"],isArray:"es6.array.is-array",of:"es6.array.of"},Date:{now:"es6.date.now"},Object:{assign:"es6.object.assign",create:"es6.object.create",defineProperty:"es6.object.define-property",defineProperties:"es6.object.define-properties",entries:"es7.object.entries",freeze:"es6.object.freeze",getOwnPropertyDescriptors:"es7.object.get-own-property-descriptors",getOwnPropertySymbols:"es6.symbol",is:"es6.object.is",isExtensible:"es6.object.is-extensible",isFrozen:"es6.object.is-frozen",isSealed:"es6.object.is-sealed",keys:"es6.object.keys",preventExtensions:"es6.object.prevent-extensions",seal:"es6.object.seal",setPrototypeOf:"es6.object.set-prototype-of",values:"es7.object.values"},Math:{acosh:"es6.math.acosh",asinh:"es6.math.asinh",atanh:"es6.math.atanh",cbrt:"es6.math.cbrt",clz32:"es6.math.clz32",cosh:"es6.math.cosh",expm1:"es6.math.expm1",fround:"es6.math.fround",hypot:"es6.math.hypot",imul:"es6.math.imul",log1p:"es6.math.log1p",log10:"es6.math.log10",log2:"es6.math.log2",sign:"es6.math.sign",sinh:"es6.math.sinh",tanh:"es6.math.tanh",trunc:"es6.math.trunc"},String:{fromCodePoint:"es6.string.from-code-point",raw:"es6.string.raw"},Number:{EPSILON:"es6.number.epsilon",MIN_SAFE_INTEGER:"es6.number.min-safe-integer",MAX_SAFE_INTEGER:"es6.number.max-safe-integer",isFinite:"es6.number.is-finite",isInteger:"es6.number.is-integer",isSafeInteger:"es6.number.is-safe-integer",isNaN:"es6.number.is-nan",parseFloat:"es6.number.parse-float",parseInt:"es6.number.parse-int"},Promise:{all:s,race:s},Reflect:{apply:"es6.reflect.apply",construct:"es6.reflect.construct",defineProperty:"es6.reflect.define-property",deleteProperty:"es6.reflect.delete-property",get:"es6.reflect.get",getOwnPropertyDescriptor:"es6.reflect.get-own-property-descriptor",getPrototypeOf:"es6.reflect.get-prototype-of",has:"es6.reflect.has",isExtensible:"es6.reflect.is-extensible",ownKeys:"es6.reflect.own-keys",preventExtensions:"es6.reflect.prevent-extensions",set:"es6.reflect.set",setPrototypeOf:"es6.reflect.set-prototype-of"}};t.StaticProperties=o},59817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=_interopRequireDefault(r(44954));var n=r(34487);var a=_interopRequireDefault(r(14293));var i=r(41013);var o=r(37192);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _default(e,{include:t,exclude:r,polyfillTargets:l,regenerator:u,debug:c}){const p=(0,n.filterItems)(s.default,t,r,l,(0,a.default)(l));const f={ImportDeclaration(e){if((0,i.isPolyfillSource)((0,i.getImportSource)(e))){this.replaceBySeparateModulesImport(e)}},Program(e){e.get("body").forEach(e=>{if((0,i.isPolyfillSource)((0,i.getRequireSource)(e))){this.replaceBySeparateModulesImport(e)}})}};return{name:"corejs2-entry",visitor:f,pre(){this.importPolyfillIncluded=false;this.replaceBySeparateModulesImport=function(e){this.importPolyfillIncluded=true;if(u){(0,i.createImport)(e,"regenerator-runtime")}const t=Array.from(p).reverse();for(const r of t){(0,i.createImport)(e,r)}e.remove()}},post(){if(c){(0,o.logEntryPolyfills)("@babel/polyfill",this.importPolyfillIncluded,p,this.file.opts.filename,l,s.default)}}}}},14293:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;t.defaultWebIncludes=void 0;const r=["web.timers","web.immediate","web.dom.iterable"];t.defaultWebIncludes=r;function _default(e){const t=Object.keys(e);const s=!t.length;const n=t.some(e=>e!=="node");return s||n?r:null}},26763:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=_interopRequireDefault(r(44954));var n=r(34487);var a=_interopRequireDefault(r(14293));var i=r(84434);var o=r(41013);var l=r(37192);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const u=`\n When setting \`useBuiltIns: 'usage'\`, polyfills are automatically imported when needed.\n Please remove the \`import '@babel/polyfill'\` call or use \`useBuiltIns: 'entry'\` instead.`;function _default({types:e},{include:t,exclude:r,polyfillTargets:c,debug:p}){const f=(0,n.filterItems)(s.default,t,r,c,(0,a.default)(c));const d={ImportDeclaration(e){if((0,o.isPolyfillSource)((0,o.getImportSource)(e))){console.warn(u);e.remove()}},Program(e){e.get("body").forEach(e=>{if((0,o.isPolyfillSource)((0,o.getRequireSource)(e))){console.warn(u);e.remove()}})},ReferencedIdentifier({node:{name:t},parent:r,scope:s}){if(e.isMemberExpression(r))return;if(!(0,o.has)(i.BuiltIns,t))return;if(s.getBindingIdentifier(t))return;const n=i.BuiltIns[t];this.addUnsupported(n)},CallExpression(t){if(t.node.arguments.length)return;const r=t.node.callee;if(!e.isMemberExpression(r))return;if(!r.computed)return;if(!t.get("callee.property").matchesPattern("Symbol.iterator")){return}this.addImport("web.dom.iterable")},BinaryExpression(e){if(e.node.operator!=="in")return;if(!e.get("left").matchesPattern("Symbol.iterator"))return;this.addImport("web.dom.iterable")},YieldExpression(e){if(e.node.delegate){this.addImport("web.dom.iterable")}},MemberExpression:{enter(t){const{node:r}=t;const{object:s,property:n}=r;if((0,o.isNamespaced)(t.get("object")))return;let a=s.name;let l="";let u="";if(r.computed){if(e.isStringLiteral(n)){l=n.value}else{const e=t.get("property").evaluate();if(e.confident&&e.value){l=e.value}}}else{l=n.name}if(t.scope.getBindingIdentifier(s.name)){const e=t.get("object").evaluate();if(e.value){u=(0,o.getType)(e.value)}else if(e.deopt&&e.deopt.isIdentifier()){a=e.deopt.node.name}}if((0,o.has)(i.StaticProperties,a)){const e=i.StaticProperties[a];if((0,o.has)(e,l)){const t=e[l];this.addUnsupported(t)}}if((0,o.has)(i.InstanceProperties,l)){let e=i.InstanceProperties[l];if(u){e=e.filter(e=>e.includes(u))}this.addUnsupported(e)}},exit(e){const{name:t}=e.node.object;if(!(0,o.has)(i.BuiltIns,t))return;if(e.scope.getBindingIdentifier(t))return;const r=i.BuiltIns[t];this.addUnsupported(r)}},VariableDeclarator(t){const{node:r}=t;const{id:s,init:n}=r;if(!e.isObjectPattern(s))return;if(n&&t.scope.getBindingIdentifier(n.name))return;for(const{key:t}of s.properties){if(!r.computed&&e.isIdentifier(t)&&(0,o.has)(i.InstanceProperties,t.name)){const e=i.InstanceProperties[t.name];this.addUnsupported(e)}}}};return{name:"corejs2-usage",pre({path:e}){this.polyfillsSet=new Set;this.addImport=function(t){if(!this.polyfillsSet.has(t)){this.polyfillsSet.add(t);(0,o.createImport)(e,t)}};this.addUnsupported=function(e){const t=Array.isArray(e)?e:[e];for(const e of t){if(f.has(e)){this.addImport(e)}}}},post(){if(p){(0,l.logUsagePolyfills)(this.polyfillsSet,this.file.opts.filename,c,s.default)}},visitor:d}}},59603:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PossibleGlobalObjects=t.CommonInstanceDependencies=t.StaticProperties=t.InstanceProperties=t.BuiltIns=t.PromiseDependencies=t.CommonIterators=void 0;const r=["es.array.iterator","web.dom-collections.iterator"];const s=["es.string.iterator",...r];t.CommonIterators=s;const n=["es.object.to-string",...r];const a=["es.object.to-string",...s];const i=["es.typed-array.copy-within","es.typed-array.every","es.typed-array.fill","es.typed-array.filter","es.typed-array.find","es.typed-array.find-index","es.typed-array.for-each","es.typed-array.includes","es.typed-array.index-of","es.typed-array.iterator","es.typed-array.join","es.typed-array.last-index-of","es.typed-array.map","es.typed-array.reduce","es.typed-array.reduce-right","es.typed-array.reverse","es.typed-array.set","es.typed-array.slice","es.typed-array.some","es.typed-array.sort","es.typed-array.subarray","es.typed-array.to-locale-string","es.typed-array.to-string","es.object.to-string","es.array.iterator","es.array-buffer.slice"];const o={from:"es.typed-array.from",of:"es.typed-array.of"};const l=["es.promise","es.object.to-string"];t.PromiseDependencies=l;const u=[...l,...s];const c=["es.symbol","es.symbol.description","es.object.to-string"];const p=["es.map","esnext.map.delete-all","esnext.map.every","esnext.map.filter","esnext.map.find","esnext.map.find-key","esnext.map.includes","esnext.map.key-of","esnext.map.map-keys","esnext.map.map-values","esnext.map.merge","esnext.map.reduce","esnext.map.some","esnext.map.update",...a];const f=["es.set","esnext.set.add-all","esnext.set.delete-all","esnext.set.difference","esnext.set.every","esnext.set.filter","esnext.set.find","esnext.set.intersection","esnext.set.is-disjoint-from","esnext.set.is-subset-of","esnext.set.is-superset-of","esnext.set.join","esnext.set.map","esnext.set.reduce","esnext.set.some","esnext.set.symmetric-difference","esnext.set.union",...a];const d=["es.weak-map","esnext.weak-map.delete-all",...a];const y=["es.weak-set","esnext.weak-set.add-all","esnext.weak-set.delete-all",...a];const h=["web.url",...a];const m={AggregateError:["esnext.aggregate-error",...s],ArrayBuffer:["es.array-buffer.constructor","es.array-buffer.slice","es.object.to-string"],DataView:["es.data-view","es.array-buffer.slice","es.object.to-string"],Date:["es.date.to-string"],Float32Array:["es.typed-array.float32-array",...i],Float64Array:["es.typed-array.float64-array",...i],Int8Array:["es.typed-array.int8-array",...i],Int16Array:["es.typed-array.int16-array",...i],Int32Array:["es.typed-array.int32-array",...i],Uint8Array:["es.typed-array.uint8-array",...i],Uint8ClampedArray:["es.typed-array.uint8-clamped-array",...i],Uint16Array:["es.typed-array.uint16-array",...i],Uint32Array:["es.typed-array.uint32-array",...i],Map:p,Number:["es.number.constructor"],Observable:["esnext.observable","esnext.symbol.observable","es.object.to-string",...a],Promise:l,RegExp:["es.regexp.constructor","es.regexp.exec","es.regexp.to-string"],Set:f,Symbol:c,URL:["web.url",...h],URLSearchParams:h,WeakMap:d,WeakSet:y,clearImmediate:["web.immediate"],compositeKey:["esnext.composite-key"],compositeSymbol:["esnext.composite-symbol",...c],fetch:l,globalThis:["es.global-this","esnext.global-this"],parseFloat:["es.parse-float"],parseInt:["es.parse-int"],queueMicrotask:["web.queue-microtask"],setTimeout:["web.timers"],setInterval:["web.timers"],setImmediate:["web.immediate"]};t.BuiltIns=m;const g={at:["esnext.string.at"],anchor:["es.string.anchor"],big:["es.string.big"],bind:["es.function.bind"],blink:["es.string.blink"],bold:["es.string.bold"],codePointAt:["es.string.code-point-at"],codePoints:["esnext.string.code-points"],concat:["es.array.concat"],copyWithin:["es.array.copy-within"],description:["es.symbol","es.symbol.description"],endsWith:["es.string.ends-with"],entries:n,every:["es.array.every"],exec:["es.regexp.exec"],fill:["es.array.fill"],filter:["es.array.filter"],finally:["es.promise.finally",...l],find:["es.array.find"],findIndex:["es.array.find-index"],fixed:["es.string.fixed"],flags:["es.regexp.flags"],flat:["es.array.flat","es.array.unscopables.flat"],flatMap:["es.array.flat-map","es.array.unscopables.flat-map"],fontcolor:["es.string.fontcolor"],fontsize:["es.string.fontsize"],forEach:["es.array.for-each","web.dom-collections.for-each"],includes:["es.array.includes","es.string.includes"],indexOf:["es.array.index-of"],italics:["es.string.italics"],join:["es.array.join"],keys:n,lastIndex:["esnext.array.last-index"],lastIndexOf:["es.array.last-index-of"],lastItem:["esnext.array.last-item"],link:["es.string.link"],match:["es.string.match","es.regexp.exec"],matchAll:["es.string.match-all","esnext.string.match-all"],map:["es.array.map"],name:["es.function.name"],padEnd:["es.string.pad-end"],padStart:["es.string.pad-start"],reduce:["es.array.reduce"],reduceRight:["es.array.reduce-right"],repeat:["es.string.repeat"],replace:["es.string.replace","es.regexp.exec"],replaceAll:["esnext.string.replace-all"],reverse:["es.array.reverse"],search:["es.string.search","es.regexp.exec"],slice:["es.array.slice"],small:["es.string.small"],some:["es.array.some"],sort:["es.array.sort"],splice:["es.array.splice"],split:["es.string.split","es.regexp.exec"],startsWith:["es.string.starts-with"],strike:["es.string.strike"],sub:["es.string.sub"],sup:["es.string.sup"],toFixed:["es.number.to-fixed"],toISOString:["es.date.to-iso-string"],toJSON:["es.date.to-json","web.url.to-json"],toPrecision:["es.number.to-precision"],toString:["es.object.to-string","es.regexp.to-string","es.date.to-string"],trim:["es.string.trim"],trimEnd:["es.string.trim-end"],trimLeft:["es.string.trim-start"],trimRight:["es.string.trim-end"],trimStart:["es.string.trim-start"],values:n,__defineGetter__:["es.object.define-getter"],__defineSetter__:["es.object.define-setter"],__lookupGetter__:["es.object.lookup-getter"],__lookupSetter__:["es.object.lookup-setter"]};t.InstanceProperties=g;const b={Array:{from:["es.array.from","es.string.iterator"],isArray:["es.array.is-array"],of:["es.array.of"]},Date:{now:"es.date.now"},Object:{assign:"es.object.assign",create:"es.object.create",defineProperty:"es.object.define-property",defineProperties:"es.object.define-properties",entries:"es.object.entries",freeze:"es.object.freeze",fromEntries:["es.object.from-entries","es.array.iterator"],getOwnPropertyDescriptor:"es.object.get-own-property-descriptor",getOwnPropertyDescriptors:"es.object.get-own-property-descriptors",getOwnPropertyNames:"es.object.get-own-property-names",getOwnPropertySymbols:"es.symbol",getPrototypeOf:"es.object.get-prototype-of",is:"es.object.is",isExtensible:"es.object.is-extensible",isFrozen:"es.object.is-frozen",isSealed:"es.object.is-sealed",keys:"es.object.keys",preventExtensions:"es.object.prevent-extensions",seal:"es.object.seal",setPrototypeOf:"es.object.set-prototype-of",values:"es.object.values"},Math:{DEG_PER_RAD:"esnext.math.deg-per-rad",RAD_PER_DEG:"esnext.math.rad-per-deg",acosh:"es.math.acosh",asinh:"es.math.asinh",atanh:"es.math.atanh",cbrt:"es.math.cbrt",clamp:"esnext.math.clamp",clz32:"es.math.clz32",cosh:"es.math.cosh",degrees:"esnext.math.degrees",expm1:"es.math.expm1",fround:"es.math.fround",fscale:"esnext.math.fscale",hypot:"es.math.hypot",iaddh:"esnext.math.iaddh",imul:"es.math.imul",imulh:"esnext.math.imulh",isubh:"esnext.math.isubh",log1p:"es.math.log1p",log10:"es.math.log10",log2:"es.math.log2",radians:"esnext.math.radians",scale:"esnext.math.scale",seededPRNG:"esnext.math.seeded-prng",sign:"es.math.sign",signbit:"esnext.math.signbit",sinh:"es.math.sinh",tanh:"es.math.tanh",trunc:"es.math.trunc",umulh:"esnext.math.umulh"},String:{fromCodePoint:"es.string.from-code-point",raw:"es.string.raw"},Number:{EPSILON:"es.number.epsilon",MIN_SAFE_INTEGER:"es.number.min-safe-integer",MAX_SAFE_INTEGER:"es.number.max-safe-integer",fromString:"esnext.number.from-string",isFinite:"es.number.is-finite",isInteger:"es.number.is-integer",isSafeInteger:"es.number.is-safe-integer",isNaN:"es.number.is-nan",parseFloat:"es.number.parse-float",parseInt:"es.number.parse-int"},Map:{from:["esnext.map.from",...p],groupBy:["esnext.map.group-by",...p],keyBy:["esnext.map.key-by",...p],of:["esnext.map.of",...p]},Set:{from:["esnext.set.from",...f],of:["esnext.set.of",...f]},WeakMap:{from:["esnext.weak-map.from",...d],of:["esnext.weak-map.of",...d]},WeakSet:{from:["esnext.weak-set.from",...y],of:["esnext.weak-set.of",...y]},Promise:{all:u,allSettled:["es.promise.all-settled","esnext.promise.all-settled",...u],any:["esnext.promise.any","esnext.aggregate-error",...u],race:u,try:["esnext.promise.try",...u]},Reflect:{apply:"es.reflect.apply",construct:"es.reflect.construct",defineMetadata:"esnext.reflect.define-metadata",defineProperty:"es.reflect.define-property",deleteMetadata:"esnext.reflect.delete-metadata",deleteProperty:"es.reflect.delete-property",get:"es.reflect.get",getMetadata:"esnext.reflect.get-metadata",getMetadataKeys:"esnext.reflect.get-metadata-keys",getOwnMetadata:"esnext.reflect.get-own-metadata",getOwnMetadataKeys:"esnext.reflect.get-own-metadata-keys",getOwnPropertyDescriptor:"es.reflect.get-own-property-descriptor",getPrototypeOf:"es.reflect.get-prototype-of",has:"es.reflect.has",hasMetadata:"esnext.reflect.has-metadata",hasOwnMetadata:"esnext.reflect.has-own-metadata",isExtensible:"es.reflect.is-extensible",metadata:"esnext.reflect.metadata",ownKeys:"es.reflect.own-keys",preventExtensions:"es.reflect.prevent-extensions",set:"es.reflect.set",setPrototypeOf:"es.reflect.set-prototype-of"},Symbol:{asyncIterator:["es.symbol.async-iterator"],dispose:["esnext.symbol.dispose"],hasInstance:["es.symbol.has-instance","es.function.has-instance"],isConcatSpreadable:["es.symbol.is-concat-spreadable","es.array.concat"],iterator:["es.symbol.iterator",...a],match:["es.symbol.match","es.string.match"],observable:["esnext.symbol.observable"],patternMatch:["esnext.symbol.pattern-match"],replace:["es.symbol.replace","es.string.replace"],search:["es.symbol.search","es.string.search"],species:["es.symbol.species","es.array.species"],split:["es.symbol.split","es.string.split"],toPrimitive:["es.symbol.to-primitive","es.date.to-primitive"],toStringTag:["es.symbol.to-string-tag","es.object.to-string","es.math.to-string-tag","es.json.to-string-tag"],unscopables:["es.symbol.unscopables"]},ArrayBuffer:{isView:["es.array-buffer.is-view"]},Int8Array:o,Uint8Array:o,Uint8ClampedArray:o,Int16Array:o,Uint16Array:o,Int32Array:o,Uint32Array:o,Float32Array:o,Float64Array:o};t.StaticProperties=b;const x=new Set(["es.object.to-string","es.object.define-getter","es.object.define-setter","es.object.lookup-getter","es.object.lookup-setter","es.regexp.exec"]);t.CommonInstanceDependencies=x;const v=new Set(["global","globalThis","self","window"]);t.PossibleGlobalObjects=v},80101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=_interopRequireDefault(r(49686));var n=_interopRequireDefault(r(64341));var a=_interopRequireDefault(r(79774));var i=r(34487);var o=r(41013);var l=r(37192);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isBabelPolyfillSource(e){return e==="@babel/polyfill"||e==="babel-polyfill"}function isCoreJSSource(e){if(typeof e==="string"){e=e.replace(/\\/g,"/").replace(/(\/(index)?)?(\.js)?$/i,"").toLowerCase()}return(0,o.has)(n.default,e)&&n.default[e]}const u=`\n \`@babel/polyfill\` is deprecated. Please, use required parts of \`core-js\`\n and \`regenerator-runtime/runtime\` separately`;function _default(e,{corejs:t,include:r,exclude:n,polyfillTargets:c,debug:p}){const f=(0,i.filterItems)(s.default,r,n,c,null);const d=new Set((0,a.default)(t.version));function shouldReplace(e,t){if(!t)return false;if(t.length===1&&f.has(t[0])&&d.has(t[0])&&(0,o.getModulePath)(t[0])===e){return false}return true}const y={ImportDeclaration(e){const t=(0,o.getImportSource)(e);if(!t)return;if(isBabelPolyfillSource(t)){console.warn(u)}else{const r=isCoreJSSource(t);if(shouldReplace(t,r)){this.replaceBySeparateModulesImport(e,r)}}},Program:{enter(e){e.get("body").forEach(e=>{const t=(0,o.getRequireSource)(e);if(!t)return;if(isBabelPolyfillSource(t)){console.warn(u)}else{const r=isCoreJSSource(t);if(shouldReplace(t,r)){this.replaceBySeparateModulesImport(e,r)}}})},exit(e){const t=(0,o.intersection)(f,this.polyfillsSet,d);const r=Array.from(t).reverse();for(const t of r){if(!this.injectedPolyfills.has(t)){(0,o.createImport)(e,t)}}t.forEach(e=>this.injectedPolyfills.add(e))}}};return{name:"corejs3-entry",visitor:y,pre(){this.injectedPolyfills=new Set;this.polyfillsSet=new Set;this.replaceBySeparateModulesImport=function(e,t){for(const e of t){this.polyfillsSet.add(e)}e.remove()}},post(){if(p){(0,l.logEntryPolyfills)("core-js",this.injectedPolyfills.size>0,this.injectedPolyfills,this.file.opts.filename,c,s.default)}}}}},30172:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=_interopRequireDefault(r(49686));var n=_interopRequireDefault(r(85709));var a=_interopRequireDefault(r(79774));var i=r(34487);var o=r(59603);var l=r(41013);var u=r(37192);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const c=`\n When setting \`useBuiltIns: 'usage'\`, polyfills are automatically imported when needed.\n Please remove the direct import of \`core-js\` or use \`useBuiltIns: 'entry'\` instead.`;const p=Object.keys(s.default).filter(e=>!e.startsWith("esnext.")).reduce((e,t)=>{e[t]=s.default[t];return e},{});const f=n.default.reduce((e,t)=>{e[t]=s.default[t];return e},Object.assign({},p));function _default(e,{corejs:t,include:r,exclude:n,polyfillTargets:d,proposals:y,shippedProposals:h,debug:m}){const g=(0,i.filterItems)(y?s.default:h?f:p,r,n,d,null);const b=new Set((0,a.default)(t.version));function resolveKey(e,t){const{node:r,parent:s,scope:n}=e;if(e.isStringLiteral())return r.value;const{name:a}=r;const i=e.isIdentifier();if(i&&!(t||s.computed))return a;if(!i||n.getBindingIdentifier(a)){const{value:t}=e.evaluate();if(typeof t==="string")return t}}function resolveSource(e){const{node:t,scope:r}=e;let s,n;if(t){s=t.name;if(!e.isIdentifier()||r.getBindingIdentifier(s)){const{deopt:t,value:r}=e.evaluate();if(r!==undefined){n=(0,l.getType)(r)}else if(t==null?void 0:t.isIdentifier()){s=t.node.name}}}return{builtIn:s,instanceType:n,isNamespaced:(0,l.isNamespaced)(e)}}const x={ImportDeclaration(e){if((0,l.isPolyfillSource)((0,l.getImportSource)(e))){console.warn(c);e.remove()}},Program:{enter(e){e.get("body").forEach(e=>{if((0,l.isPolyfillSource)((0,l.getRequireSource)(e))){console.warn(c);e.remove()}})},exit(e){const t=(0,l.intersection)(g,this.polyfillsSet,b);const r=Array.from(t).reverse();for(const t of r){if(!this.injectedPolyfills.has(t)){(0,l.createImport)(e,t)}}t.forEach(e=>this.injectedPolyfills.add(e))}},Import(){this.addUnsupported(o.PromiseDependencies)},Function({node:e}){if(e.async){this.addUnsupported(o.PromiseDependencies)}},"ForOfStatement|ArrayPattern"(){this.addUnsupported(o.CommonIterators)},SpreadElement({parentPath:e}){if(!e.isObjectExpression()){this.addUnsupported(o.CommonIterators)}},YieldExpression({node:e}){if(e.delegate){this.addUnsupported(o.CommonIterators)}},ReferencedIdentifier({node:{name:e},scope:t}){if(t.getBindingIdentifier(e))return;this.addBuiltInDependencies(e)},MemberExpression(e){const t=resolveSource(e.get("object"));const r=resolveKey(e.get("property"));this.addPropertyDependencies(t,r)},ObjectPattern(e){const{parentPath:t,parent:r,key:s}=e;let n;if(t.isVariableDeclarator()){n=resolveSource(t.get("init"))}else if(t.isAssignmentExpression()){n=resolveSource(t.get("right"))}else if(t.isFunctionExpression()){const e=t.parentPath;if(e.isCallExpression()||e.isNewExpression()){if(e.node.callee===r){n=resolveSource(e.get("arguments")[s])}}}for(const t of e.get("properties")){if(t.isObjectProperty()){const e=resolveKey(t.get("key"));this.addPropertyDependencies(n,e)}}},BinaryExpression(e){if(e.node.operator!=="in")return;const t=resolveSource(e.get("right"));const r=resolveKey(e.get("left"),true);this.addPropertyDependencies(t,r)}};return{name:"corejs3-usage",pre(){this.injectedPolyfills=new Set;this.polyfillsSet=new Set;this.addUnsupported=function(e){const t=Array.isArray(e)?e:[e];for(const e of t){this.polyfillsSet.add(e)}};this.addBuiltInDependencies=function(e){if((0,l.has)(o.BuiltIns,e)){const t=o.BuiltIns[e];this.addUnsupported(t)}};this.addPropertyDependencies=function(e={},t){const{builtIn:r,instanceType:s,isNamespaced:n}=e;if(n)return;if(o.PossibleGlobalObjects.has(r)){this.addBuiltInDependencies(t)}else if((0,l.has)(o.StaticProperties,r)){const e=o.StaticProperties[r];if((0,l.has)(e,t)){const r=e[t];return this.addUnsupported(r)}}if(!(0,l.has)(o.InstanceProperties,t))return;let a=o.InstanceProperties[t];if(s){a=a.filter(e=>e.includes(s)||o.CommonInstanceDependencies.has(e))}this.addUnsupported(a)}},post(){if(m){(0,u.logUsagePolyfills)(this.injectedPolyfills,this.file.opts.filename,d,s.default)}},visitor:x}}},1066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=r(41013);function isRegeneratorSource(e){return e==="regenerator-runtime/runtime"}function _default(){const e={ImportDeclaration(e){if(isRegeneratorSource((0,s.getImportSource)(e))){this.regeneratorImportExcluded=true;e.remove()}},Program(e){e.get("body").forEach(e=>{if(isRegeneratorSource((0,s.getRequireSource)(e))){this.regeneratorImportExcluded=true;e.remove()}})}};return{name:"regenerator-entry",visitor:e,pre(){this.regeneratorImportExcluded=false},post(){if(this.opts.debug&&this.regeneratorImportExcluded){let e=this.file.opts.filename;if(process.env.BABEL_ENV==="test"){e=e.replace(/\\/g,"/")}console.log(`\n[${e}] Based on your targets, regenerator-runtime import excluded.`)}}}}},15045:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=r(41013);function _default(){return{name:"regenerator-usage",pre(){this.usesRegenerator=false},visitor:{Function(e){const{node:t}=e;if(!this.usesRegenerator&&(t.generator||t.async)){this.usesRegenerator=true;(0,s.createImport)(e,"regenerator-runtime")}}},post(){if(this.opts.debug&&this.usesRegenerator){let e=this.file.opts.filename;if(process.env.BABEL_ENV==="test"){e=e.replace(/\\/g,"/")}console.log(`\n[${e}] Based on your code and targets, added regenerator-runtime.`)}}}}},41013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getType=getType;t.intersection=intersection;t.filterStageFromList=filterStageFromList;t.getImportSource=getImportSource;t.getRequireSource=getRequireSource;t.isPolyfillSource=isPolyfillSource;t.getModulePath=getModulePath;t.createImport=createImport;t.isNamespaced=isNamespaced;t.has=void 0;var s=_interopRequireWildcard(r(63760));var n=r(76098);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const a=Object.hasOwnProperty.call.bind(Object.hasOwnProperty);t.has=a;function getType(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function intersection(e,t,r){const s=new Set;for(const n of e){if(t.has(n)&&r.has(n))s.add(n)}return s}function filterStageFromList(e,t){return Object.keys(e).reduce((r,s)=>{if(!t.has(s)){r[s]=e[s]}return r},{})}function getImportSource({node:e}){if(e.specifiers.length===0)return e.source.value}function getRequireSource({node:e}){if(!s.isExpressionStatement(e))return;const{expression:t}=e;const r=s.isCallExpression(t)&&s.isIdentifier(t.callee)&&t.callee.name==="require"&&t.arguments.length===1&&s.isStringLiteral(t.arguments[0]);if(r)return t.arguments[0].value}function isPolyfillSource(e){return e==="@babel/polyfill"||e==="core-js"}const i={"regenerator-runtime":"regenerator-runtime/runtime.js"};function getModulePath(e){return i[e]||`core-js/modules/${e}.js`}function createImport(e,t){return(0,n.addSideEffect)(e,getModulePath(t))}function isNamespaced(e){if(!e.node)return false;const t=e.scope.getBinding(e.node.name);if(!t)return false;return t.path.isImportNamespaceSpecifier()}},30348:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;const r={allowInsertArrow:false,specCompliant:false};var s=({types:e})=>({name:"transform-async-arrows-in-class",visitor:{ArrowFunctionExpression(t){if(t.node.async&&t.findParent(e.isClassMethod)){t.arrowFunctionToExpression(r)}}}});t.default=s;e.exports=t.default},45585:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r=({types:e})=>{const t=t=>t.parentKey==="params"&&t.parentPath&&e.isArrowFunctionExpression(t.parentPath);return{name:"transform-edge-default-parameters",visitor:{AssignmentPattern(e){const r=e.find(t);if(r&&e.parent.shorthand){e.parent.shorthand=false;(e.parent.extra||{}).shorthand=false;e.scope.rename(e.parent.key.name)}}}}};t.default=r;e.exports=t.default},1056:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r=({types:e})=>({name:"transform-edge-function-name",visitor:{FunctionExpression:{exit(t){if(!t.node.id&&e.isIdentifier(t.parent.id)){const r=e.cloneNode(t.parent.id);const s=t.scope.getBinding(r.name);if(s.constantViolations.length){t.scope.rename(r.name)}t.node.id=r}}}}});t.default=r;e.exports=t.default},86808:(e,t)=>{"use strict";t.__esModule=true;t.default=_default;function _default({types:e}){return{name:"transform-safari-block-shadowing",visitor:{VariableDeclarator(t){const r=t.parent.kind;if(r!=="let"&&r!=="const")return;const s=t.scope.block;if(e.isFunction(s)||e.isProgram(s))return;const n=e.getOuterBindingIdentifiers(t.node.id);for(const r of Object.keys(n)){let s=t.scope;if(!s.hasOwnBinding(r))continue;while(s=s.parent){if(s.hasOwnBinding(r)){t.scope.rename(r);break}if(e.isFunction(s.block)||e.isProgram(s.block)){break}}}}}}}e.exports=t.default},96126:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;function handle(e){if(!e.isVariableDeclaration())return;const t=e.getFunctionParent();const{name:r}=e.node.declarations[0].id;if(t&&t.scope.hasOwnBinding(r)&&t.scope.getOwnBinding(r).kind==="param"){e.scope.rename(r)}}var r=()=>({name:"transform-safari-for-shadowing",visitor:{ForXStatement(e){handle(e.get("left"))},ForStatement(e){handle(e.get("init"))}}});t.default=r;e.exports=t.default},64038:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r=({types:e})=>({name:"transform-tagged-template-caching",visitor:{TaggedTemplateExpression(t,r){let s=r.get("processed");if(!s){s=new Map;r.set("processed",s)}if(s.has(t.node))return t.skip();const n=t.node.quasi.expressions;let a=r.get("identity");if(!a){a=t.scope.getProgramParent().generateDeclaredUidIdentifier("_");r.set("identity",a);const s=t.scope.getBinding(a.name);s.path.get("init").replaceWith(e.arrowFunctionExpression([e.identifier("t")],e.identifier("t")))}const i=e.taggedTemplateExpression(a,e.templateLiteral(t.node.quasi.quasis,n.map(()=>e.numericLiteral(0))));s.set(i,true);const o=t.scope.getProgramParent().generateDeclaredUidIdentifier("t");t.scope.getBinding(o.name).path.parent.kind="let";const l=e.logicalExpression("||",o,e.assignmentExpression("=",o,i));const u=e.callExpression(t.node.tag,[l,...n]);t.replaceWith(u)}}});t.default=r;e.exports=t.default},9064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(70287);var n=_interopRequireDefault(r(30027));var a=_interopRequireDefault(r(14155));var i=_interopRequireDefault(r(59654));var o=_interopRequireDefault(r(71073));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var l=(0,s.declare)((e,t)=>{e.assertVersion(7);let{pragma:r,pragmaFrag:s}=t;const{pure:l,throwIfNamespace:u=true,runtime:c="classic",importSource:p}=t;if(c==="classic"){r=r||"React.createElement";s=s||"React.Fragment"}const f=!!t.development;return{plugins:[[f?a.default:n.default,{importSource:p,pragma:r,pragmaFrag:s,runtime:c,throwIfNamespace:u,pure:l,useBuiltIns:!!t.useBuiltIns,useSpread:t.useSpread}],i.default,l!==false&&o.default].filter(Boolean)}});t.default=l},39293:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(70287);var n=_interopRequireDefault(r(28524));var a=r(69562);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=new a.OptionValidator("@babel/preset-typescript");var o=(0,s.declare)((e,t)=>{e.assertVersion(7);const{allowDeclareFields:r,allowNamespaces:s,jsxPragma:a,onlyRemoveTypeImports:o}=t;const l=i.validateStringOption("jsxPragmaFrag",t.jsxPragmaFrag,"React.Fragment");const u=i.validateBooleanOption("allExtensions",t.allExtensions,false);const c=i.validateBooleanOption("isTSX",t.isTSX,false);if(c){i.invariant(u,"isTSX:true requires allExtensions:true")}const p=e=>({allowDeclareFields:r,allowNamespaces:s,isTSX:e,jsxPragma:a,jsxPragmaFrag:l,onlyRemoveTypeImports:o});return{overrides:u?[{plugins:[[n.default,p(c)]]}]:[{test:/\.ts$/,plugins:[[n.default,p(false)]]},{test:/\.tsx$/,plugins:[[n.default,p(true)]]}]}});t.default=o},44388:e=>{function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=_interopRequireDefault},51675:(e,t,r)=>{var s=r(57246);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function _getRequireWildcardCache(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||s(e)!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e){if(Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;if(i&&(i.get||i.set)){Object.defineProperty(r,a,i)}else{r[a]=e[a]}}}r["default"]=e;if(t){t.set(e,r)}return r}e.exports=_interopRequireWildcard},57246:e=>{function _typeof(t){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){e.exports=_typeof=function _typeof(e){return typeof e}}else{e.exports=_typeof=function _typeof(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return _typeof(t)}e.exports=_typeof},22663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=createTemplateBuilder;var s=r(5447);var n=_interopRequireDefault(r(26522));var a=_interopRequireDefault(r(80694));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=(0,s.validate)({placeholderPattern:false});function createTemplateBuilder(e,t){const r=new WeakMap;const o=new WeakMap;const l=t||(0,s.validate)(null);return Object.assign((t,...i)=>{if(typeof t==="string"){if(i.length>1)throw new Error("Unexpected extra params.");return extendedTrace((0,n.default)(e,t,(0,s.merge)(l,(0,s.validate)(i[0]))))}else if(Array.isArray(t)){let s=r.get(t);if(!s){s=(0,a.default)(e,t,l);r.set(t,s)}return extendedTrace(s(i))}else if(typeof t==="object"&&t){if(i.length>0)throw new Error("Unexpected extra params.");return createTemplateBuilder(e,(0,s.merge)(l,(0,s.validate)(t)))}throw new Error(`Unexpected template param ${typeof t}`)},{ast:(t,...r)=>{if(typeof t==="string"){if(r.length>1)throw new Error("Unexpected extra params.");return(0,n.default)(e,t,(0,s.merge)((0,s.merge)(l,(0,s.validate)(r[0])),i))()}else if(Array.isArray(t)){let n=o.get(t);if(!n){n=(0,a.default)(e,t,(0,s.merge)(l,i));o.set(t,n)}return n(r)()}throw new Error(`Unexpected template param ${typeof t}`)}})}function extendedTrace(e){let t="";try{throw new Error}catch(e){if(e.stack){t=e.stack.split("\n").slice(3).join("\n")}}return r=>{try{return e(r)}catch(e){e.stack+=`\n =============\n${t}`;throw e}}}},31272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.program=t.expression=t.statement=t.statements=t.smart=void 0;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function makeStatementFormatter(e){return{code:e=>`/* @babel/template */;\n${e}`,validate:()=>{},unwrap:t=>{return e(t.program.body.slice(1))}}}const n=makeStatementFormatter(e=>{if(e.length>1){return e}else{return e[0]}});t.smart=n;const a=makeStatementFormatter(e=>e);t.statements=a;const i=makeStatementFormatter(e=>{if(e.length===0){throw new Error("Found nothing to return.")}if(e.length>1){throw new Error("Found multiple statements but wanted one")}return e[0]});t.statement=i;const o={code:e=>`(\n${e}\n)`,validate:e=>{if(e.program.body.length>1){throw new Error("Found multiple statements but wanted one")}if(o.unwrap(e).start===0){throw new Error("Parse result included parens.")}},unwrap:({program:e})=>{const[t]=e.body;s.assertExpressionStatement(t);return t.expression}};t.expression=o;const l={code:e=>e,validate:()=>{},unwrap:e=>e.program};t.program=l},36900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=t.program=t.expression=t.statements=t.statement=t.smart=void 0;var s=_interopRequireWildcard(r(31272));var n=_interopRequireDefault(r(22663));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const a=(0,n.default)(s.smart);t.smart=a;const i=(0,n.default)(s.statement);t.statement=i;const o=(0,n.default)(s.statements);t.statements=o;const l=(0,n.default)(s.expression);t.expression=l;const u=(0,n.default)(s.program);t.program=u;var c=Object.assign(a.bind(undefined),{smart:a,statement:i,statements:o,expression:l,program:u,ast:a.ast});t.default=c},80694:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=literalTemplate;var s=r(5447);var n=_interopRequireDefault(r(68278));var a=_interopRequireDefault(r(1143));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function literalTemplate(e,t,r){const{metadata:n,names:i}=buildLiteralData(e,t,r);return t=>{const r={};t.forEach((e,t)=>{r[i[t]]=e});return t=>{const i=(0,s.normalizeReplacements)(t);if(i){Object.keys(i).forEach(e=>{if(Object.prototype.hasOwnProperty.call(r,e)){throw new Error("Unexpected replacement overlap.")}})}return e.unwrap((0,a.default)(n,i?Object.assign(i,r):r))}}}function buildLiteralData(e,t,r){let s;let a;let i;let o="";do{o+="$";const l=buildTemplateCode(t,o);s=l.names;a=new Set(s);i=(0,n.default)(e,e.code(l.code),{parser:r.parser,placeholderWhitelist:new Set(l.names.concat(r.placeholderWhitelist?Array.from(r.placeholderWhitelist):[])),placeholderPattern:r.placeholderPattern,preserveComments:r.preserveComments,syntacticPlaceholders:r.syntacticPlaceholders})}while(i.placeholders.some(e=>e.isDuplicate&&a.has(e.name)));return{metadata:i,names:s}}function buildTemplateCode(e,t){const r=[];let s=e[0];for(let n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.merge=merge;t.validate=validate;t.normalizeReplacements=normalizeReplacements;function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var r={};var s=Object.keys(e);var n,a;for(a=0;a=0)continue;r[n]=e[n]}return r}function merge(e,t){const{placeholderWhitelist:r=e.placeholderWhitelist,placeholderPattern:s=e.placeholderPattern,preserveComments:n=e.preserveComments,syntacticPlaceholders:a=e.syntacticPlaceholders}=t;return{parser:Object.assign({},e.parser,t.parser),placeholderWhitelist:r,placeholderPattern:s,preserveComments:n,syntacticPlaceholders:a}}function validate(e){if(e!=null&&typeof e!=="object"){throw new Error("Unknown template options.")}const t=e||{},{placeholderWhitelist:r,placeholderPattern:s,preserveComments:n,syntacticPlaceholders:a}=t,i=_objectWithoutPropertiesLoose(t,["placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders"]);if(r!=null&&!(r instanceof Set)){throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined")}if(s!=null&&!(s instanceof RegExp)&&s!==false){throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined")}if(n!=null&&typeof n!=="boolean"){throw new Error("'.preserveComments' must be a boolean, null, or undefined")}if(a!=null&&typeof a!=="boolean"){throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined")}if(a===true&&(r!=null||s!=null)){throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible"+" with '.syntacticPlaceholders: true'")}return{parser:i,placeholderWhitelist:r||undefined,placeholderPattern:s==null?undefined:s,preserveComments:n==null?undefined:n,syntacticPlaceholders:a==null?undefined:a}}function normalizeReplacements(e){if(Array.isArray(e)){return e.reduce((e,t,r)=>{e["$"+r]=t;return e},{})}else if(typeof e==="object"||e==null){return e||undefined}throw new Error("Template replacements must be an array, object, null, or undefined")}},68278:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=parseAndBuildMetadata;var s=_interopRequireWildcard(r(63760));var n=r(30865);var a=r(36553);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const i=/^[_$A-Z0-9]+$/;function parseAndBuildMetadata(e,t,r){const{placeholderWhitelist:n,placeholderPattern:a,preserveComments:i,syntacticPlaceholders:o}=r;const l=parseWithCodeFrame(t,r.parser,o);s.removePropertiesDeep(l,{preserveComments:i});e.validate(l);const u={placeholders:[],placeholderNames:new Set};const c={placeholders:[],placeholderNames:new Set};const p={value:undefined};s.traverse(l,placeholderVisitorHandler,{syntactic:u,legacy:c,isLegacyRef:p,placeholderWhitelist:n,placeholderPattern:a,syntacticPlaceholders:o});return Object.assign({ast:l},p.value?c:u)}function placeholderVisitorHandler(e,t,r){var n;let a;if(s.isPlaceholder(e)){if(r.syntacticPlaceholders===false){throw new Error("%%foo%%-style placeholders can't be used when "+"'.syntacticPlaceholders' is false.")}else{a=e.name.name;r.isLegacyRef.value=false}}else if(r.isLegacyRef.value===false||r.syntacticPlaceholders){return}else if(s.isIdentifier(e)||s.isJSXIdentifier(e)){a=e.name;r.isLegacyRef.value=true}else if(s.isStringLiteral(e)){a=e.value;r.isLegacyRef.value=true}else{return}if(!r.isLegacyRef.value&&(r.placeholderPattern!=null||r.placeholderWhitelist!=null)){throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible"+" with '.syntacticPlaceholders: true'")}if(r.isLegacyRef.value&&(r.placeholderPattern===false||!(r.placeholderPattern||i).test(a))&&!((n=r.placeholderWhitelist)==null?void 0:n.has(a))){return}t=t.slice();const{node:o,key:l}=t[t.length-1];let u;if(s.isStringLiteral(e)||s.isPlaceholder(e,{expectedNode:"StringLiteral"})){u="string"}else if(s.isNewExpression(o)&&l==="arguments"||s.isCallExpression(o)&&l==="arguments"||s.isFunction(o)&&l==="params"){u="param"}else if(s.isExpressionStatement(o)&&!s.isPlaceholder(e)){u="statement";t=t.slice(0,-1)}else if(s.isStatement(e)&&s.isPlaceholder(e)){u="statement"}else{u="other"}const{placeholders:c,placeholderNames:p}=r.isLegacyRef.value?r.legacy:r.syntactic;c.push({name:a,type:u,resolve:e=>resolveAncestors(e,t),isDuplicate:p.has(a)});p.add(a)}function resolveAncestors(e,t){let r=e;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=populatePlaceholders;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function populatePlaceholders(e,t){const r=s.cloneNode(e.ast);if(t){e.placeholders.forEach(e=>{if(!Object.prototype.hasOwnProperty.call(t,e.name)){const t=e.name;throw new Error(`Error: No substitution given for "${t}". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['${t}'])}\n - { placeholderPattern: /^${t}$/ }`)}});Object.keys(t).forEach(t=>{if(!e.placeholderNames.has(t)){throw new Error(`Unknown substitution "${t}" given`)}})}e.placeholders.slice().reverse().forEach(e=>{try{applyReplacement(e,r,t&&t[e.name]||null)}catch(t){t.message=`@babel/template placeholder "${e.name}": ${t.message}`;throw t}});return r}function applyReplacement(e,t,r){if(e.isDuplicate){if(Array.isArray(r)){r=r.map(e=>s.cloneNode(e))}else if(typeof r==="object"){r=s.cloneNode(r)}}const{parent:n,key:a,index:i}=e.resolve(t);if(e.type==="string"){if(typeof r==="string"){r=s.stringLiteral(r)}if(!r||!s.isStringLiteral(r)){throw new Error("Expected string substitution")}}else if(e.type==="statement"){if(i===undefined){if(!r){r=s.emptyStatement()}else if(Array.isArray(r)){r=s.blockStatement(r)}else if(typeof r==="string"){r=s.expressionStatement(s.identifier(r))}else if(!s.isStatement(r)){r=s.expressionStatement(r)}}else{if(r&&!Array.isArray(r)){if(typeof r==="string"){r=s.identifier(r)}if(!s.isStatement(r)){r=s.expressionStatement(r)}}}}else if(e.type==="param"){if(typeof r==="string"){r=s.identifier(r)}if(i===undefined)throw new Error("Assertion failure.")}else{if(typeof r==="string"){r=s.identifier(r)}if(Array.isArray(r)){throw new Error("Cannot replace single expression with an array.")}}if(i===undefined){s.validate(n,a,r);n[a]=r}else{const t=n[a].slice();if(e.type==="statement"||e.type==="param"){if(r==null){t.splice(i,1)}else if(Array.isArray(r)){t.splice(i,1,...r)}else{t[i]=r}}else{t[i]=r}s.validate(n,a,t);n[a]=t}}},26522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=stringTemplate;var s=r(5447);var n=_interopRequireDefault(r(68278));var a=_interopRequireDefault(r(1143));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringTemplate(e,t,r){t=e.code(t);let i;return o=>{const l=(0,s.normalizeReplacements)(o);if(!i)i=(0,n.default)(e,t,r);return e.unwrap((0,a.default)(i,l))}}},65711:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.clear=clear;t.clearPath=clearPath;t.clearScope=clearScope;t.scope=t.path=void 0;let r=new WeakMap;t.path=r;let s=new WeakMap;t.scope=s;function clear(){clearPath();clearScope()}function clearPath(){t.path=r=new WeakMap}function clearScope(){t.scope=s=new WeakMap}},58424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(32481));var n=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const a=process.env.NODE_ENV==="test";class TraversalContext{constructor(e,t,r,s){this.queue=null;this.parentPath=s;this.scope=e;this.state=r;this.opts=t}shouldVisit(e){const t=this.opts;if(t.enter||t.exit)return true;if(t[e.type])return true;const r=n.VISITOR_KEYS[e.type];if(!(r==null?void 0:r.length))return false;for(const t of r){if(e[t])return true}return false}create(e,t,r,n){return s.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})}maybeQueue(e,t){if(this.trap){throw new Error("Infinite cycle detected")}if(this.queue){if(t){this.queue.push(e)}else{this.priorityQueue.push(e)}}}visitMultiple(e,t,r){if(e.length===0)return false;const s=[];for(let n=0;n=1e4){this.trap=true}const{node:n}=s;if(t.has(n))continue;if(n)t.add(n);if(s.visit()){r=true;break}if(this.priorityQueue.length){r=this.visitQueue(this.priorityQueue);this.priorityQueue=[];this.queue=e;if(r)break}}for(const t of e){t.popContext()}this.queue=null;return r}visit(e,t){const r=e[t];if(!r)return false;if(Array.isArray(r)){return this.visitMultiple(r,e,t)}else{return this.visitSingle(e,t)}}}t.default=TraversalContext},67267:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;class Hub{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(e,t,r=TypeError){return new r(t)}}t.default=Hub},18442:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=traverse;Object.defineProperty(t,"NodePath",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"Scope",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"Hub",{enumerable:true,get:function(){return u.default}});t.visitors=void 0;var s=_interopRequireDefault(r(58424));var n=_interopRequireWildcard(r(2751));t.visitors=n;var a=_interopRequireWildcard(r(63760));var i=_interopRequireWildcard(r(65711));var o=_interopRequireDefault(r(32481));var l=_interopRequireDefault(r(10660));var u=_interopRequireDefault(r(67267));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function traverse(e,t,r,s,i){if(!e)return;if(!t)t={};if(!t.noScope&&!r){if(e.type!=="Program"&&e.type!=="File"){throw new Error("You must pass a scope and parentPath unless traversing a Program/File. "+`Instead of that you tried to traverse a ${e.type} node without `+"passing scope and parentPath.")}}if(!a.VISITOR_KEYS[e.type]){return}n.explode(t);traverse.node(e,t,r,s,i)}traverse.visitors=n;traverse.verify=n.verify;traverse.explode=n.explode;traverse.cheap=function(e,t){return a.traverseFast(e,t)};traverse.node=function(e,t,r,n,i,o){const l=a.VISITOR_KEYS[e.type];if(!l)return;const u=new s.default(r,t,n,i);for(const t of l){if(o&&o[t])continue;if(u.visit(e,t))return}};traverse.clearNode=function(e,t){a.removeProperties(e,t);i.path.delete(e)};traverse.removeProperties=function(e,t){a.traverseFast(e,traverse.clearNode,t);return e};function hasDenylistedType(e,t){if(e.node.type===t.type){t.has=true;e.stop()}}traverse.hasType=function(e,t,r){if(r==null?void 0:r.includes(e.type))return false;if(e.type===t)return true;const s={has:false,type:t};traverse(e,{noScope:true,denylist:r,enter:hasDenylistedType},null,s);return s.has};traverse.cache=i},38439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.findParent=findParent;t.find=find;t.getFunctionParent=getFunctionParent;t.getStatementParent=getStatementParent;t.getEarliestCommonAncestorFrom=getEarliestCommonAncestorFrom;t.getDeepestCommonAncestorFrom=getDeepestCommonAncestorFrom;t.getAncestry=getAncestry;t.isAncestor=isAncestor;t.isDescendant=isDescendant;t.inType=inType;var s=_interopRequireWildcard(r(63760));var n=_interopRequireDefault(r(32481));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function findParent(e){let t=this;while(t=t.parentPath){if(e(t))return t}return null}function find(e){let t=this;do{if(e(t))return t}while(t=t.parentPath);return null}function getFunctionParent(){return this.findParent(e=>e.isFunction())}function getStatementParent(){let e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()){break}else{e=e.parentPath}}while(e);if(e&&(e.isProgram()||e.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return e}function getEarliestCommonAncestorFrom(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){let n;const a=s.VISITOR_KEYS[e.type];for(const e of r){const r=e[t+1];if(!n){n=r;continue}if(r.listKey&&n.listKey===r.listKey){if(r.keyi){n=r}}return n})}function getDeepestCommonAncestorFrom(e,t){if(!e.length){return this}if(e.length===1){return e[0]}let r=Infinity;let s,n;const a=e.map(e=>{const t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==this);if(t.lengtht===e)}function inType(){let e=this;while(e){for(const t of arguments){if(e.node.type===t)return true}e=e.parentPath}return false}},24517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shareCommentsWithSiblings=shareCommentsWithSiblings;t.addComment=addComment;t.addComments=addComments;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function shareCommentsWithSiblings(){if(typeof this.key==="string")return;const e=this.node;if(!e)return;const t=e.trailingComments;const r=e.leadingComments;if(!t&&!r)return;const s=this.getSibling(this.key-1);const n=this.getSibling(this.key+1);const a=Boolean(s.node);const i=Boolean(n.node);if(a&&!i){s.addComments("trailing",t)}else if(i&&!a){n.addComments("leading",r)}}function addComment(e,t,r){s.addComment(this.node,e,t,r)}function addComments(e,t){s.addComments(this.node,e,t)}},92337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.call=call;t._call=_call;t.isBlacklisted=t.isDenylisted=isDenylisted;t.visit=visit;t.skip=skip;t.skipKey=skipKey;t.stop=stop;t.setScope=setScope;t.setContext=setContext;t.resync=resync;t._resyncParent=_resyncParent;t._resyncKey=_resyncKey;t._resyncList=_resyncList;t._resyncRemoved=_resyncRemoved;t.popContext=popContext;t.pushContext=pushContext;t.setup=setup;t.setKey=setKey;t.requeue=requeue;t._getQueueContexts=_getQueueContexts;var s=_interopRequireDefault(r(18442));var n=r(32481);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function call(e){const t=this.opts;this.debug(e);if(this.node){if(this._call(t[e]))return true}if(this.node){return this._call(t[this.node.type]&&t[this.node.type][e])}return false}function _call(e){if(!e)return false;for(const t of e){if(!t)continue;const e=this.node;if(!e)return true;const r=t.call(this.state,this,this.state);if(r&&typeof r==="object"&&typeof r.then==="function"){throw new Error(`You appear to be using a plugin with an async traversal visitor, `+`which your current version of Babel does not support. `+`If you're using a published plugin, you may need to upgrade `+`your @babel/core version.`)}if(r){throw new Error(`Unexpected return value from visitor method ${t}`)}if(this.node!==e)return true;if(this._traverseFlags>0)return true}return false}function isDenylisted(){var e;const t=(e=this.opts.denylist)!=null?e:this.opts.blacklist;return t&&t.indexOf(this.node.type)>-1}function visit(){if(!this.node){return false}if(this.isDenylisted()){return false}if(this.opts.shouldSkip&&this.opts.shouldSkip(this)){return false}if(this.shouldSkip||this.call("enter")||this.shouldSkip){this.debug("Skip...");return this.shouldStop}this.debug("Recursing into...");s.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys);this.call("exit");return this.shouldStop}function skip(){this.shouldSkip=true}function skipKey(e){if(this.skipKeys==null){this.skipKeys={}}this.skipKeys[e]=true}function stop(){this._traverseFlags|=n.SHOULD_SKIP|n.SHOULD_STOP}function setScope(){if(this.opts&&this.opts.noScope)return;let e=this.parentPath;let t;while(e&&!t){if(e.opts&&e.opts.noScope)return;t=e.scope;e=e.parentPath}this.scope=this.getScope(t);if(this.scope)this.scope.init()}function setContext(e){if(this.skipKeys!=null){this.skipKeys={}}this._traverseFlags=0;if(e){this.context=e;this.state=e.state;this.opts=e.opts}this.setScope();return this}function resync(){if(this.removed)return;this._resyncParent();this._resyncList();this._resyncKey()}function _resyncParent(){if(this.parentPath){this.parent=this.parentPath.node}}function _resyncKey(){if(!this.container)return;if(this.node===this.container[this.key])return;if(Array.isArray(this.container)){for(let e=0;e0){this.setContext(this.contexts[this.contexts.length-1])}else{this.setContext(undefined)}}function pushContext(e){this.contexts.push(e);this.setContext(e)}function setup(e,t,r,s){this.listKey=r;this.container=t;this.parentPath=e||this.parentPath;this.setKey(s)}function setKey(e){var t;this.key=e;this.node=this.container[this.key];this.type=(t=this.node)==null?void 0:t.type}function requeue(e=this){if(e.removed)return;const t=this.contexts;for(const r of t){r.maybeQueue(e)}}function _getQueueContexts(){let e=this;let t=this.contexts;while(!t.length){e=e.parentPath;if(!e)break;t=e.contexts}return t}},63797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toComputedKey=toComputedKey;t.ensureBlock=ensureBlock;t.arrowFunctionToShadowed=arrowFunctionToShadowed;t.unwrapFunctionEnvironment=unwrapFunctionEnvironment;t.arrowFunctionToExpression=arrowFunctionToExpression;var s=_interopRequireWildcard(r(63760));var n=_interopRequireDefault(r(98733));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function toComputedKey(){const e=this.node;let t;if(this.isMemberExpression()){t=e.property}else if(this.isProperty()||this.isMethod()){t=e.key}else{throw new ReferenceError("todo")}if(!e.computed){if(s.isIdentifier(t))t=s.stringLiteral(t.name)}return t}function ensureBlock(){const e=this.get("body");const t=e.node;if(Array.isArray(e)){throw new Error("Can't convert array path to a block statement")}if(!t){throw new Error("Can't convert node without a body")}if(e.isBlockStatement()){return t}const r=[];let n="body";let a;let i;if(e.isStatement()){i="body";a=0;r.push(e.node)}else{n+=".body.0";if(this.isFunction()){a="argument";r.push(s.returnStatement(e.node))}else{a="expression";r.push(s.expressionStatement(e.node))}}this.node.body=s.blockStatement(r);const o=this.get(n);e.setup(o,i?o.node[i]:o.node,i,a);return this.node}function arrowFunctionToShadowed(){if(!this.isArrowFunctionExpression())return;this.arrowFunctionToExpression()}function unwrapFunctionEnvironment(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration()){throw this.buildCodeFrameError("Can only unwrap the environment of a function.")}hoistFunctionEnvironment(this)}function arrowFunctionToExpression({allowInsertArrow:e=true,specCompliant:t=false}={}){if(!this.isArrowFunctionExpression()){throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.")}const r=hoistFunctionEnvironment(this,t,e);this.ensureBlock();this.node.type="FunctionExpression";if(t){const e=r?null:this.parentPath.scope.generateUidIdentifier("arrowCheckId");if(e){this.parentPath.scope.push({id:e,init:s.objectExpression([])})}this.get("body").unshiftContainer("body",s.expressionStatement(s.callExpression(this.hub.addHelper("newArrowCheck"),[s.thisExpression(),e?s.identifier(e.name):s.identifier(r)])));this.replaceWith(s.callExpression(s.memberExpression((0,n.default)(this,true)||this.node,s.identifier("bind")),[e?s.identifier(e.name):s.thisExpression()]))}}function hoistFunctionEnvironment(e,t=false,r=true){const n=e.findParent(e=>{return e.isFunction()&&!e.isArrowFunctionExpression()||e.isProgram()||e.isClassProperty({static:false})});const a=(n==null?void 0:n.node.kind)==="constructor";if(n.isClassProperty()){throw e.buildCodeFrameError("Unable to transform arrow inside class property")}const{thisPaths:i,argumentsPaths:o,newTargetPaths:l,superProps:u,superCalls:c}=getScopeInformation(e);if(a&&c.length>0){if(!r){throw c[0].buildCodeFrameError("Unable to handle nested super() usage in arrow")}const e=[];n.traverse({Function(e){if(e.isArrowFunctionExpression())return;e.skip()},ClassProperty(e){e.skip()},CallExpression(t){if(!t.get("callee").isSuper())return;e.push(t)}});const t=getSuperBinding(n);e.forEach(e=>{const r=s.identifier(t);r.loc=e.node.callee.loc;e.get("callee").replaceWith(r)})}if(o.length>0){const e=getBinding(n,"arguments",()=>s.identifier("arguments"));o.forEach(t=>{const r=s.identifier(e);r.loc=t.node.loc;t.replaceWith(r)})}if(l.length>0){const e=getBinding(n,"newtarget",()=>s.metaProperty(s.identifier("new"),s.identifier("target")));l.forEach(t=>{const r=s.identifier(e);r.loc=t.node.loc;t.replaceWith(r)})}if(u.length>0){if(!r){throw u[0].buildCodeFrameError("Unable to handle nested super.prop usage")}const e=u.reduce((e,t)=>e.concat(standardizeSuperProperty(t)),[]);e.forEach(e=>{const t=e.node.computed?"":e.get("property").node.name;const r=e.parentPath.isAssignmentExpression({left:e.node});const a=e.parentPath.isCallExpression({callee:e.node});const o=getSuperPropBinding(n,r,t);const l=[];if(e.node.computed){l.push(e.get("property").node)}if(r){const t=e.parentPath.node.right;l.push(t)}const u=s.callExpression(s.identifier(o),l);if(a){e.parentPath.unshiftContainer("arguments",s.thisExpression());e.replaceWith(s.memberExpression(u,s.identifier("call")));i.push(e.parentPath.get("arguments.0"))}else if(r){e.parentPath.replaceWith(u)}else{e.replaceWith(u)}})}let p;if(i.length>0||t){p=getThisBinding(n,a);if(!t||a&&hasSuperClass(n)){i.forEach(e=>{const t=e.isJSX()?s.jsxIdentifier(p):s.identifier(p);t.loc=e.node.loc;e.replaceWith(t)});if(t)p=null}}return p}function standardizeSuperProperty(e){if(e.parentPath.isAssignmentExpression()&&e.parentPath.node.operator!=="="){const t=e.parentPath;const r=t.node.operator.slice(0,-1);const n=t.node.right;t.node.operator="=";if(e.node.computed){const a=e.scope.generateDeclaredUidIdentifier("tmp");t.get("left").replaceWith(s.memberExpression(e.node.object,s.assignmentExpression("=",a,e.node.property),true));t.get("right").replaceWith(s.binaryExpression(r,s.memberExpression(e.node.object,s.identifier(a.name),true),n))}else{t.get("left").replaceWith(s.memberExpression(e.node.object,e.node.property));t.get("right").replaceWith(s.binaryExpression(r,s.memberExpression(e.node.object,s.identifier(e.node.property.name)),n))}return[t.get("left"),t.get("right").get("left")]}else if(e.parentPath.isUpdateExpression()){const t=e.parentPath;const r=e.scope.generateDeclaredUidIdentifier("tmp");const n=e.node.computed?e.scope.generateDeclaredUidIdentifier("prop"):null;const a=[s.assignmentExpression("=",r,s.memberExpression(e.node.object,n?s.assignmentExpression("=",n,e.node.property):e.node.property,e.node.computed)),s.assignmentExpression("=",s.memberExpression(e.node.object,n?s.identifier(n.name):e.node.property,e.node.computed),s.binaryExpression("+",s.identifier(r.name),s.numericLiteral(1)))];if(!e.parentPath.node.prefix){a.push(s.identifier(r.name))}t.replaceWith(s.sequenceExpression(a));const i=t.get("expressions.0.right");const o=t.get("expressions.1.left");return[i,o]}return[e]}function hasSuperClass(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}function getThisBinding(e,t){return getBinding(e,"this",r=>{if(!t||!hasSuperClass(e))return s.thisExpression();const n=new WeakSet;e.traverse({Function(e){if(e.isArrowFunctionExpression())return;e.skip()},ClassProperty(e){e.skip()},CallExpression(e){if(!e.get("callee").isSuper())return;if(n.has(e.node))return;n.add(e.node);e.replaceWithMultiple([e.node,s.assignmentExpression("=",s.identifier(r),s.identifier("this"))])}})})}function getSuperBinding(e){return getBinding(e,"supercall",()=>{const t=e.scope.generateUidIdentifier("args");return s.arrowFunctionExpression([s.restElement(t)],s.callExpression(s.super(),[s.spreadElement(s.identifier(t.name))]))})}function getSuperPropBinding(e,t,r){const n=t?"set":"get";return getBinding(e,`superprop_${n}:${r||""}`,()=>{const n=[];let a;if(r){a=s.memberExpression(s.super(),s.identifier(r))}else{const t=e.scope.generateUidIdentifier("prop");n.unshift(t);a=s.memberExpression(s.super(),s.identifier(t.name),true)}if(t){const t=e.scope.generateUidIdentifier("value");n.push(t);a=s.assignmentExpression("=",a,s.identifier(t.name))}return s.arrowFunctionExpression(n,a)})}function getBinding(e,t,r){const s="binding:"+t;let n=e.getData(s);if(!n){const a=e.scope.generateUidIdentifier(t);n=a.name;e.setData(s,n);e.scope.push({id:a,init:r(n)})}return n}function getScopeInformation(e){const t=[];const r=[];const s=[];const n=[];const a=[];e.traverse({ClassProperty(e){e.skip()},Function(e){if(e.isArrowFunctionExpression())return;e.skip()},ThisExpression(e){t.push(e)},JSXIdentifier(e){if(e.node.name!=="this")return;if(!e.parentPath.isJSXMemberExpression({object:e.node})&&!e.parentPath.isJSXOpeningElement({name:e.node})){return}t.push(e)},CallExpression(e){if(e.get("callee").isSuper())a.push(e)},MemberExpression(e){if(e.get("object").isSuper())n.push(e)},ReferencedIdentifier(e){if(e.node.name!=="arguments")return;r.push(e)},MetaProperty(e){if(!e.get("meta").isIdentifier({name:"new"}))return;if(!e.get("property").isIdentifier({name:"target"}))return;s.push(e)}});return{thisPaths:t,argumentsPaths:r,newTargetPaths:s,superProps:n,superCalls:a}}},81290:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.evaluateTruthy=evaluateTruthy;t.evaluate=evaluate;const r=["String","Number","Math"];const s=["random"];function evaluateTruthy(){const e=this.evaluate();if(e.confident)return!!e.value}function deopt(e,t){if(!t.confident)return;t.deoptPath=e;t.confident=false}function evaluateCached(e,t){const{node:r}=e;const{seen:s}=t;if(s.has(r)){const n=s.get(r);if(n.resolved){return n.value}else{deopt(e,t);return}}else{const n={resolved:false};s.set(r,n);const a=_evaluate(e,t);if(t.confident){n.resolved=true;n.value=a}return a}}function _evaluate(e,t){if(!t.confident)return;const{node:n}=e;if(e.isSequenceExpression()){const r=e.get("expressions");return evaluateCached(r[r.length-1],t)}if(e.isStringLiteral()||e.isNumericLiteral()||e.isBooleanLiteral()){return n.value}if(e.isNullLiteral()){return null}if(e.isTemplateLiteral()){return evaluateQuasis(e,n.quasis,t)}if(e.isTaggedTemplateExpression()&&e.get("tag").isMemberExpression()){const r=e.get("tag.object");const{node:{name:s}}=r;const a=e.get("tag.property");if(r.isIdentifier()&&s==="String"&&!e.scope.getBinding(s,true)&&a.isIdentifier&&a.node.name==="raw"){return evaluateQuasis(e,n.quasi.quasis,t,true)}}if(e.isConditionalExpression()){const r=evaluateCached(e.get("test"),t);if(!t.confident)return;if(r){return evaluateCached(e.get("consequent"),t)}else{return evaluateCached(e.get("alternate"),t)}}if(e.isExpressionWrapper()){return evaluateCached(e.get("expression"),t)}if(e.isMemberExpression()&&!e.parentPath.isCallExpression({callee:n})){const t=e.get("property");const r=e.get("object");if(r.isLiteral()&&t.isIdentifier()){const e=r.node.value;const s=typeof e;if(s==="number"||s==="string"){return e[t.node.name]}}}if(e.isReferencedIdentifier()){const r=e.scope.getBinding(n.name);if(r&&r.constantViolations.length>0){return deopt(r.path,t)}if(r&&e.node.start":return r>s;case"<=":return r<=s;case">=":return r>=s;case"==":return r==s;case"!=":return r!=s;case"===":return r===s;case"!==":return r!==s;case"|":return r|s;case"&":return r&s;case"^":return r^s;case"<<":return r<>":return r>>s;case">>>":return r>>>s}}if(e.isCallExpression()){const a=e.get("callee");let i;let o;if(a.isIdentifier()&&!e.scope.getBinding(a.node.name,true)&&r.indexOf(a.node.name)>=0){o=global[n.callee.name]}if(a.isMemberExpression()){const e=a.get("object");const t=a.get("property");if(e.isIdentifier()&&t.isIdentifier()&&r.indexOf(e.node.name)>=0&&s.indexOf(t.node.name)<0){i=global[e.node.name];o=i[t.node.name]}if(e.isLiteral()&&t.isIdentifier()){const r=typeof e.node.value;if(r==="string"||r==="number"){i=e.node.value;o=i[t.node.name]}}}if(o){const r=e.get("arguments").map(e=>evaluateCached(e,t));if(!t.confident)return;return o.apply(i,r)}}deopt(e,t)}function evaluateQuasis(e,t,r,s=false){let n="";let a=0;const i=e.get("expressions");for(const e of t){if(!r.confident)break;n+=s?e.value.raw:e.value.cooked;const t=i[a++];if(t)n+=String(evaluateCached(t,r))}if(!r.confident)return;return n}function evaluate(){const e={confident:true,deoptPath:null,seen:new Map};let t=evaluateCached(this,e);if(!e.confident)t=undefined;return{confident:e.confident,deopt:e.deoptPath,value:t}}},45971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getOpposite=getOpposite;t.getCompletionRecords=getCompletionRecords;t.getSibling=getSibling;t.getPrevSibling=getPrevSibling;t.getNextSibling=getNextSibling;t.getAllNextSiblings=getAllNextSiblings;t.getAllPrevSiblings=getAllPrevSiblings;t.get=get;t._getKey=_getKey;t._getPattern=_getPattern;t.getBindingIdentifiers=getBindingIdentifiers;t.getOuterBindingIdentifiers=getOuterBindingIdentifiers;t.getBindingIdentifierPaths=getBindingIdentifierPaths;t.getOuterBindingIdentifierPaths=getOuterBindingIdentifierPaths;var s=_interopRequireDefault(r(32481));var n=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getOpposite(){if(this.key==="left"){return this.getSibling("right")}else if(this.key==="right"){return this.getSibling("left")}}function addCompletionRecords(e,t){if(e)return t.concat(e.getCompletionRecords());return t}function findBreak(e){let t;if(!Array.isArray(e)){e=[e]}for(const n of e){if(n.isDoExpression()||n.isProgram()||n.isBlockStatement()||n.isCatchClause()||n.isLabeledStatement()){t=findBreak(n.get("body"))}else if(n.isIfStatement()){var r;t=(r=findBreak(n.get("consequent")))!=null?r:findBreak(n.get("alternate"))}else if(n.isTryStatement()){var s;t=(s=findBreak(n.get("block")))!=null?s:findBreak(n.get("handler"))}else if(n.isBreakStatement()){t=n}if(t){return t}}return null}function completionRecordForSwitch(e,t){let r=true;for(let s=e.length-1;s>=0;s--){const n=e[s];const a=n.get("consequent");let i=findBreak(a);if(i){while(i.key===0&&i.parentPath.isBlockStatement()){i=i.parentPath}const e=i.getPrevSibling();if(i.key>0&&(e.isExpressionStatement()||e.isBlockStatement())){t=addCompletionRecords(e,t);i.remove()}else{i.replaceWith(i.scope.buildUndefinedNode());t=addCompletionRecords(i,t)}}else if(r){const e=t=>!t.isBlockStatement()||t.get("body").some(e);const s=a.some(e);if(s){t=addCompletionRecords(a[a.length-1],t);r=false}}}return t}function getCompletionRecords(){let e=[];if(this.isIfStatement()){e=addCompletionRecords(this.get("consequent"),e);e=addCompletionRecords(this.get("alternate"),e)}else if(this.isDoExpression()||this.isFor()||this.isWhile()){e=addCompletionRecords(this.get("body"),e)}else if(this.isProgram()||this.isBlockStatement()){e=addCompletionRecords(this.get("body").pop(),e)}else if(this.isFunction()){return this.get("body").getCompletionRecords()}else if(this.isTryStatement()){e=addCompletionRecords(this.get("block"),e);e=addCompletionRecords(this.get("handler"),e)}else if(this.isCatchClause()){e=addCompletionRecords(this.get("body"),e)}else if(this.isSwitchStatement()){e=completionRecordForSwitch(this.get("cases"),e)}else{e.push(this)}return e}function getSibling(e){return s.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)}function getPrevSibling(){return this.getSibling(this.key-1)}function getNextSibling(){return this.getSibling(this.key+1)}function getAllNextSiblings(){let e=this.key;let t=this.getSibling(++e);const r=[];while(t.node){r.push(t);t=this.getSibling(++e)}return r}function getAllPrevSiblings(){let e=this.key;let t=this.getSibling(--e);const r=[];while(t.node){r.push(t);t=this.getSibling(--e)}return r}function get(e,t=true){if(t===true)t=this.context;const r=e.split(".");if(r.length===1){return this._getKey(e,t)}else{return this._getPattern(r,t)}}function _getKey(e,t){const r=this.node;const n=r[e];if(Array.isArray(n)){return n.map((a,i)=>{return s.default.get({listKey:e,parentPath:this,parent:r,container:n,key:i}).setContext(t)})}else{return s.default.get({parentPath:this,parent:r,container:r,key:e}).setContext(t)}}function _getPattern(e,t){let r=this;for(const s of e){if(s==="."){r=r.parentPath}else{if(Array.isArray(r)){r=r[s]}else{r=r.get(s,t)}}}return r}function getBindingIdentifiers(e){return n.getBindingIdentifiers(this.node,e)}function getOuterBindingIdentifiers(e){return n.getOuterBindingIdentifiers(this.node,e)}function getBindingIdentifierPaths(e=false,t=false){const r=this;let s=[].concat(r);const a=Object.create(null);while(s.length){const r=s.shift();if(!r)continue;if(!r.node)continue;const i=n.getBindingIdentifiers.keys[r.node.type];if(r.isIdentifier()){if(e){const e=a[r.node.name]=a[r.node.name]||[];e.push(r)}else{a[r.node.name]=r}continue}if(r.isExportDeclaration()){const e=r.get("declaration");if(e.isDeclaration()){s.push(e)}continue}if(t){if(r.isFunctionDeclaration()){s.push(r.get("id"));continue}if(r.isFunctionExpression()){continue}}if(i){for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=t.SHOULD_SKIP=t.SHOULD_STOP=t.REMOVED=void 0;var s=_interopRequireWildcard(r(43859));var n=_interopRequireDefault(r(31185));var a=_interopRequireDefault(r(18442));var i=_interopRequireDefault(r(10660));var o=_interopRequireWildcard(r(63760));var l=r(65711);var u=_interopRequireDefault(r(43187));var c=_interopRequireWildcard(r(38439));var p=_interopRequireWildcard(r(64111));var f=_interopRequireWildcard(r(52352));var d=_interopRequireWildcard(r(81290));var y=_interopRequireWildcard(r(63797));var h=_interopRequireWildcard(r(82851));var m=_interopRequireWildcard(r(92337));var g=_interopRequireWildcard(r(53178));var b=_interopRequireWildcard(r(61625));var x=_interopRequireWildcard(r(45971));var v=_interopRequireWildcard(r(24517));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const E=(0,n.default)("babel");const T=1<<0;t.REMOVED=T;const S=1<<1;t.SHOULD_STOP=S;const P=1<<2;t.SHOULD_SKIP=P;class NodePath{constructor(e,t){this.contexts=[];this.state=null;this.opts=null;this._traverseFlags=0;this.skipKeys=null;this.parentPath=null;this.container=null;this.listKey=null;this.key=null;this.node=null;this.type=null;this.parent=t;this.hub=e;this.data=null;this.context=null;this.scope=null}static get({hub:e,parentPath:t,parent:r,container:s,listKey:n,key:a}){if(!e&&t){e=t.hub}if(!r){throw new Error("To get a node path the parent needs to exist")}const i=s[a];let o=l.path.get(r);if(!o){o=new Map;l.path.set(r,o)}let u=o.get(i);if(!u){u=new NodePath(e,r);if(i)o.set(i,u)}u.setup(t,s,n,a);return u}getScope(e){return this.isScope()?new i.default(this):e}setData(e,t){if(this.data==null){this.data=Object.create(null)}return this.data[e]=t}getData(e,t){if(this.data==null){this.data=Object.create(null)}let r=this.data[e];if(r===undefined&&t!==undefined)r=this.data[e]=t;return r}buildCodeFrameError(e,t=SyntaxError){return this.hub.buildError(this.node,e,t)}traverse(e,t){(0,a.default)(this.node,e,this.scope,t,this)}set(e,t){o.validate(this.node,e,t);this.node[e]=t}getPathLocation(){const e=[];let t=this;do{let r=t.key;if(t.inList)r=`${t.listKey}[${r}]`;e.unshift(r)}while(t=t.parentPath);return e.join(".")}debug(e){if(!E.enabled)return;E(`${this.getPathLocation()} ${this.type}: ${e}`)}toString(){return(0,u.default)(this.node).code}get inList(){return!!this.listKey}set inList(e){if(!e){this.listKey=null}}get parentKey(){return this.listKey||this.key}get shouldSkip(){return!!(this._traverseFlags&P)}set shouldSkip(e){if(e){this._traverseFlags|=P}else{this._traverseFlags&=~P}}get shouldStop(){return!!(this._traverseFlags&S)}set shouldStop(e){if(e){this._traverseFlags|=S}else{this._traverseFlags&=~S}}get removed(){return!!(this._traverseFlags&T)}set removed(e){if(e){this._traverseFlags|=T}else{this._traverseFlags&=~T}}}t.default=NodePath;Object.assign(NodePath.prototype,c,p,f,d,y,h,m,g,b,x,v);for(const e of o.TYPES){const t=`is${e}`;const r=o[t];NodePath.prototype[t]=function(e){return r(this.node,e)};NodePath.prototype[`assert${e}`]=function(t){if(!r(this.node,t)){throw new TypeError(`Expected node path of type ${e}`)}}}for(const e of Object.keys(s)){if(e[0]==="_")continue;if(o.TYPES.indexOf(e)<0)o.TYPES.push(e);const t=s[e];NodePath.prototype[`is${e}`]=function(e){return t.checkPath(this,e)}}},64111:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getTypeAnnotation=getTypeAnnotation;t._getTypeAnnotation=_getTypeAnnotation;t.isBaseType=isBaseType;t.couldBeBaseType=couldBeBaseType;t.baseTypeStrictlyMatches=baseTypeStrictlyMatches;t.isGenericType=isGenericType;var s=_interopRequireWildcard(r(87118));var n=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function getTypeAnnotation(){if(this.typeAnnotation)return this.typeAnnotation;let e=this._getTypeAnnotation()||n.anyTypeAnnotation();if(n.isTypeAnnotation(e))e=e.typeAnnotation;return this.typeAnnotation=e}const a=new WeakSet;function _getTypeAnnotation(){const e=this.node;if(!e){if(this.key==="init"&&this.parentPath.isVariableDeclarator()){const e=this.parentPath.parentPath;const t=e.parentPath;if(e.key==="left"&&t.isForInStatement()){return n.stringTypeAnnotation()}if(e.key==="left"&&t.isForOfStatement()){return n.anyTypeAnnotation()}return n.voidTypeAnnotation()}else{return}}if(e.typeAnnotation){return e.typeAnnotation}if(a.has(e)){return}a.add(e);try{var t;let r=s[e.type];if(r){return r.call(this,e)}r=s[this.parentPath.type];if((t=r)==null?void 0:t.validParent){return this.parentPath.getTypeAnnotation()}}finally{a.delete(e)}}function isBaseType(e,t){return _isBaseType(e,this.getTypeAnnotation(),t)}function _isBaseType(e,t,r){if(e==="string"){return n.isStringTypeAnnotation(t)}else if(e==="number"){return n.isNumberTypeAnnotation(t)}else if(e==="boolean"){return n.isBooleanTypeAnnotation(t)}else if(e==="any"){return n.isAnyTypeAnnotation(t)}else if(e==="mixed"){return n.isMixedTypeAnnotation(t)}else if(e==="empty"){return n.isEmptyTypeAnnotation(t)}else if(e==="void"){return n.isVoidTypeAnnotation(t)}else{if(r){return false}else{throw new Error(`Unknown base type ${e}`)}}}function couldBeBaseType(e){const t=this.getTypeAnnotation();if(n.isAnyTypeAnnotation(t))return true;if(n.isUnionTypeAnnotation(t)){for(const r of t.types){if(n.isAnyTypeAnnotation(r)||_isBaseType(e,r,true)){return true}}return false}else{return _isBaseType(e,t,true)}}function baseTypeStrictlyMatches(e){const t=this.getTypeAnnotation();e=e.getTypeAnnotation();if(!n.isAnyTypeAnnotation(t)&&n.isFlowBaseAnnotation(t)){return e.type===t.type}}function isGenericType(e){const t=this.getTypeAnnotation();return n.isGenericTypeAnnotation(t)&&n.isIdentifier(t.id,{name:e})}},76722:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _default(e){if(!this.isReferenced())return;const t=this.scope.getBinding(e.name);if(t){if(t.identifier.typeAnnotation){return t.identifier.typeAnnotation}else{return getTypeAnnotationBindingConstantViolations(t,this,e.name)}}if(e.name==="undefined"){return s.voidTypeAnnotation()}else if(e.name==="NaN"||e.name==="Infinity"){return s.numberTypeAnnotation()}else if(e.name==="arguments"){}}function getTypeAnnotationBindingConstantViolations(e,t,r){const n=[];const a=[];let i=getConstantViolationsBefore(e,t,a);const o=getConditionalAnnotation(e,t,r);if(o){const t=getConstantViolationsBefore(e,o.ifStatement);i=i.filter(e=>t.indexOf(e)<0);n.push(o.typeAnnotation)}if(i.length){i=i.concat(a);for(const e of i){n.push(e.getTypeAnnotation())}}if(!n.length){return}if(s.isTSTypeAnnotation(n[0])&&s.createTSUnionType){return s.createTSUnionType(n)}if(s.createFlowUnionType){return s.createFlowUnionType(n)}return s.createUnionTypeAnnotation(n)}function getConstantViolationsBefore(e,t,r){const s=e.constantViolations.slice();s.unshift(e.path);return s.filter(e=>{e=e.resolve();const s=e._guessExecutionStatusRelativeTo(t);if(r&&s==="unknown")r.push(e);return s==="before"})}function inferAnnotationFromBinaryExpression(e,t){const r=t.node.operator;const n=t.get("right").resolve();const a=t.get("left").resolve();let i;if(a.isIdentifier({name:e})){i=n}else if(n.isIdentifier({name:e})){i=a}if(i){if(r==="==="){return i.getTypeAnnotation()}if(s.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0){return s.numberTypeAnnotation()}return}if(r!=="==="&&r!=="==")return;let o;let l;if(a.isUnaryExpression({operator:"typeof"})){o=a;l=n}else if(n.isUnaryExpression({operator:"typeof"})){o=n;l=a}if(!o)return;if(!o.get("argument").isIdentifier({name:e}))return;l=l.resolve();if(!l.isLiteral())return;const u=l.node.value;if(typeof u!=="string")return;return s.createTypeAnnotationBasedOnTypeof(u)}function getParentConditionalPath(e,t,r){let s;while(s=t.parentPath){if(s.isIfStatement()||s.isConditionalExpression()){if(t.key==="test"){return}return s}if(s.isFunction()){if(s.parentPath.scope.getBinding(r)!==e)return}t=s}}function getConditionalAnnotation(e,t,r){const n=getParentConditionalPath(e,t,r);if(!n)return;const a=n.get("test");const i=[a];const o=[];for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VariableDeclarator=VariableDeclarator;t.TypeCastExpression=TypeCastExpression;t.NewExpression=NewExpression;t.TemplateLiteral=TemplateLiteral;t.UnaryExpression=UnaryExpression;t.BinaryExpression=BinaryExpression;t.LogicalExpression=LogicalExpression;t.ConditionalExpression=ConditionalExpression;t.SequenceExpression=SequenceExpression;t.ParenthesizedExpression=ParenthesizedExpression;t.AssignmentExpression=AssignmentExpression;t.UpdateExpression=UpdateExpression;t.StringLiteral=StringLiteral;t.NumericLiteral=NumericLiteral;t.BooleanLiteral=BooleanLiteral;t.NullLiteral=NullLiteral;t.RegExpLiteral=RegExpLiteral;t.ObjectExpression=ObjectExpression;t.ArrayExpression=ArrayExpression;t.RestElement=RestElement;t.ClassDeclaration=t.ClassExpression=t.FunctionDeclaration=t.ArrowFunctionExpression=t.FunctionExpression=Func;t.CallExpression=CallExpression;t.TaggedTemplateExpression=TaggedTemplateExpression;Object.defineProperty(t,"Identifier",{enumerable:true,get:function(){return n.default}});var s=_interopRequireWildcard(r(63760));var n=_interopRequireDefault(r(76722));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function VariableDeclarator(){var e;const t=this.get("id");if(!t.isIdentifier())return;const r=this.get("init");let s=r.getTypeAnnotation();if(((e=s)==null?void 0:e.type)==="AnyTypeAnnotation"){if(r.isCallExpression()&&r.get("callee").isIdentifier({name:"Array"})&&!r.scope.hasBinding("Array",true)){s=ArrayExpression()}}return s}function TypeCastExpression(e){return e.typeAnnotation}TypeCastExpression.validParent=true;function NewExpression(e){if(this.get("callee").isIdentifier()){return s.genericTypeAnnotation(e.callee)}}function TemplateLiteral(){return s.stringTypeAnnotation()}function UnaryExpression(e){const t=e.operator;if(t==="void"){return s.voidTypeAnnotation()}else if(s.NUMBER_UNARY_OPERATORS.indexOf(t)>=0){return s.numberTypeAnnotation()}else if(s.STRING_UNARY_OPERATORS.indexOf(t)>=0){return s.stringTypeAnnotation()}else if(s.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0){return s.booleanTypeAnnotation()}}function BinaryExpression(e){const t=e.operator;if(s.NUMBER_BINARY_OPERATORS.indexOf(t)>=0){return s.numberTypeAnnotation()}else if(s.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0){return s.booleanTypeAnnotation()}else if(t==="+"){const e=this.get("right");const t=this.get("left");if(t.isBaseType("number")&&e.isBaseType("number")){return s.numberTypeAnnotation()}else if(t.isBaseType("string")||e.isBaseType("string")){return s.stringTypeAnnotation()}return s.unionTypeAnnotation([s.stringTypeAnnotation(),s.numberTypeAnnotation()])}}function LogicalExpression(){const e=[this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()];if(s.isTSTypeAnnotation(e[0])&&s.createTSUnionType){return s.createTSUnionType(e)}if(s.createFlowUnionType){return s.createFlowUnionType(e)}return s.createUnionTypeAnnotation(e)}function ConditionalExpression(){const e=[this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()];if(s.isTSTypeAnnotation(e[0])&&s.createTSUnionType){return s.createTSUnionType(e)}if(s.createFlowUnionType){return s.createFlowUnionType(e)}return s.createUnionTypeAnnotation(e)}function SequenceExpression(){return this.get("expressions").pop().getTypeAnnotation()}function ParenthesizedExpression(){return this.get("expression").getTypeAnnotation()}function AssignmentExpression(){return this.get("right").getTypeAnnotation()}function UpdateExpression(e){const t=e.operator;if(t==="++"||t==="--"){return s.numberTypeAnnotation()}}function StringLiteral(){return s.stringTypeAnnotation()}function NumericLiteral(){return s.numberTypeAnnotation()}function BooleanLiteral(){return s.booleanTypeAnnotation()}function NullLiteral(){return s.nullLiteralTypeAnnotation()}function RegExpLiteral(){return s.genericTypeAnnotation(s.identifier("RegExp"))}function ObjectExpression(){return s.genericTypeAnnotation(s.identifier("Object"))}function ArrayExpression(){return s.genericTypeAnnotation(s.identifier("Array"))}function RestElement(){return ArrayExpression()}RestElement.validParent=true;function Func(){return s.genericTypeAnnotation(s.identifier("Function"))}const a=s.buildMatchMemberExpression("Array.from");const i=s.buildMatchMemberExpression("Object.keys");const o=s.buildMatchMemberExpression("Object.values");const l=s.buildMatchMemberExpression("Object.entries");function CallExpression(){const{callee:e}=this.node;if(i(e)){return s.arrayTypeAnnotation(s.stringTypeAnnotation())}else if(a(e)||o(e)){return s.arrayTypeAnnotation(s.anyTypeAnnotation())}else if(l(e)){return s.arrayTypeAnnotation(s.tupleTypeAnnotation([s.stringTypeAnnotation(),s.anyTypeAnnotation()]))}return resolveCall(this.get("callee"))}function TaggedTemplateExpression(){return resolveCall(this.get("tag"))}function resolveCall(e){e=e.resolve();if(e.isFunction()){if(e.is("async")){if(e.is("generator")){return s.genericTypeAnnotation(s.identifier("AsyncIterator"))}else{return s.genericTypeAnnotation(s.identifier("Promise"))}}else{if(e.node.returnType){return e.node.returnType}else{}}}}},82851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.matchesPattern=matchesPattern;t.has=has;t.isStatic=isStatic;t.isnt=isnt;t.equals=equals;t.isNodeType=isNodeType;t.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;t.canSwapBetweenExpressionAndStatement=canSwapBetweenExpressionAndStatement;t.isCompletionRecord=isCompletionRecord;t.isStatementOrBlock=isStatementOrBlock;t.referencesImport=referencesImport;t.getSource=getSource;t.willIMaybeExecuteBefore=willIMaybeExecuteBefore;t._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;t._guessExecutionStatusRelativeToDifferentFunctions=_guessExecutionStatusRelativeToDifferentFunctions;t.resolve=resolve;t._resolve=_resolve;t.isConstantExpression=isConstantExpression;t.isInStrictMode=isInStrictMode;t.is=void 0;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function matchesPattern(e,t){return s.matchesPattern(this.node,e,t)}function has(e){const t=this.node&&this.node[e];if(t&&Array.isArray(t)){return!!t.length}else{return!!t}}function isStatic(){return this.scope.isStatic(this.node)}const n=has;t.is=n;function isnt(e){return!this.has(e)}function equals(e,t){return this.node[e]===t}function isNodeType(e){return s.isType(this.type,e)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function canSwapBetweenExpressionAndStatement(e){if(this.key!=="body"||!this.parentPath.isArrowFunctionExpression()){return false}if(this.isExpression()){return s.isBlockStatement(e)}else if(this.isBlockStatement()){return s.isExpression(e)}return false}function isCompletionRecord(e){let t=this;let r=true;do{const s=t.container;if(t.isFunction()&&!r){return!!e}r=false;if(Array.isArray(s)&&t.key!==s.length-1){return false}}while((t=t.parentPath)&&!t.isProgram());return true}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||s.isBlockStatement(this.container)){return false}else{return s.STATEMENT_OR_BLOCK_KEYS.includes(this.key)}}function referencesImport(e,t){if(!this.isReferencedIdentifier())return false;const r=this.scope.getBinding(this.node.name);if(!r||r.kind!=="module")return false;const s=r.path;const n=s.parentPath;if(!n.isImportDeclaration())return false;if(n.node.source.value===e){if(!t)return true}else{return false}if(s.isImportDefaultSpecifier()&&t==="default"){return true}if(s.isImportNamespaceSpecifier()&&t==="*"){return true}if(s.isImportSpecifier()&&s.node.imported.name===t){return true}return false}function getSource(){const e=this.node;if(e.end){const t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""}function willIMaybeExecuteBefore(e){return this._guessExecutionStatusRelativeTo(e)!=="after"}function getOuterFunction(e){return(e.scope.getFunctionParent()||e.scope.getProgramParent()).path}function isExecutionUncertain(e,t){switch(e){case"LogicalExpression":return t==="right";case"ConditionalExpression":case"IfStatement":return t==="consequent"||t==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return t==="body";case"ForStatement":return t==="body"||t==="update";case"SwitchStatement":return t==="cases";case"TryStatement":return t==="handler";case"AssignmentPattern":return t==="right";case"OptionalMemberExpression":return t==="property";case"OptionalCallExpression":return t==="arguments";default:return false}}function isExecutionUncertainInList(e,t){for(let r=0;r=0)return"after";if(r.this.indexOf(e)>=0)return"before";let n;const a={target:0,this:0};while(!n&&a.this=0){n=e}else{a.this++}}if(!n){throw new Error("Internal Babel error - The two compared nodes"+" don't appear to belong to the same program.")}if(isExecutionUncertainInList(r.this,a.this-1)||isExecutionUncertainInList(r.target,a.target-1)){return"unknown"}const i={this:r.this[a.this-1],target:r.target[a.target-1]};if(i.target.listKey&&i.this.listKey&&i.target.container===i.this.container){return i.target.key>i.this.key?"before":"after"}const o=s.VISITOR_KEYS[n.type];const l={this:o.indexOf(i.this.parentKey),target:o.indexOf(i.target.parentKey)};return l.target>l.this?"before":"after"}const a=new WeakSet;function _guessExecutionStatusRelativeToDifferentFunctions(e){if(!e.isFunctionDeclaration()||e.parentPath.isExportDeclaration()){return"unknown"}const t=e.scope.getBinding(e.node.id.name);if(!t.references)return"before";const r=t.referencePaths;let s;for(const t of r){const r=!!t.find(t=>t.node===e.node);if(r)continue;if(t.key!=="callee"||!t.parentPath.isCallExpression()){return"unknown"}if(a.has(t.node))continue;a.add(t.node);const n=this._guessExecutionStatusRelativeTo(t);a.delete(t.node);if(s&&s!==n){return"unknown"}else{s=n}}return s}function resolve(e,t){return this._resolve(e,t)||this}function _resolve(e,t){if(t&&t.indexOf(this)>=0)return;t=t||[];t.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(e,t)}else{}}else if(this.isReferencedIdentifier()){const r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if(r.kind==="module")return;if(r.path!==this){const s=r.path.resolve(e,t);if(this.find(e=>e.node===s.node))return;return s}}else if(this.isTypeCastExpression()){return this.get("expression").resolve(e,t)}else if(e&&this.isMemberExpression()){const r=this.toComputedKey();if(!s.isLiteral(r))return;const n=r.value;const a=this.get("object").resolve(e,t);if(a.isObjectExpression()){const r=a.get("properties");for(const s of r){if(!s.isProperty())continue;const r=s.get("key");let a=s.isnt("computed")&&r.isIdentifier({name:n});a=a||r.isLiteral({value:n});if(a)return s.get("value").resolve(e,t)}}else if(a.isArrayExpression()&&!isNaN(+n)){const r=a.get("elements");const s=r[n];if(s)return s.resolve(e,t)}}}function isConstantExpression(){if(this.isIdentifier()){const e=this.scope.getBinding(this.node.name);if(!e)return false;return e.constant}if(this.isLiteral()){if(this.isRegExpLiteral()){return false}if(this.isTemplateLiteral()){return this.get("expressions").every(e=>e.isConstantExpression())}return true}if(this.isUnaryExpression()){if(this.get("operator").node!=="void"){return false}return this.get("argument").isConstantExpression()}if(this.isBinaryExpression()){return this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return false}function isInStrictMode(){const e=this.isProgram()?this:this.parentPath;const t=e.find(e=>{if(e.isProgram({sourceType:"module"}))return true;if(e.isClass())return true;if(!e.isProgram()&&!e.isFunction())return false;if(e.isArrowFunctionExpression()&&!e.get("body").isBlockStatement()){return false}let{node:t}=e;if(e.isFunction())t=t.body;for(const e of t.directives){if(e.value.value==="use strict"){return true}}});return!!t}},37961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const n={ReferencedIdentifier(e,t){if(e.isJSXIdentifier()&&s.react.isCompatTag(e.node.name)&&!e.parentPath.isJSXMemberExpression()){return}if(e.node.name==="this"){let r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression()){break}}while(r=r.parent);if(r)t.breakOnScopePaths.push(r.path)}const r=e.scope.getBinding(e.node.name);if(!r)return;for(const s of r.constantViolations){if(s.scope!==r.path.scope){t.mutableBinding=true;e.stop();return}}if(r!==t.scope.getBinding(e.node.name))return;t.bindings[e.node.name]=r}};class PathHoister{constructor(e,t){this.breakOnScopePaths=[];this.bindings={};this.mutableBinding=false;this.scopes=[];this.scope=t;this.path=e;this.attachAfter=false}isCompatibleScope(e){for(const t of Object.keys(this.bindings)){const r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier)){return false}}return true}getCompatibleScopes(){let e=this.path.scope;do{if(this.isCompatibleScope(e)){this.scopes.push(e)}else{break}if(this.breakOnScopePaths.indexOf(e.path)>=0){break}}while(e=e.parent)}getAttachmentPath(){let e=this._getAttachmentPath();if(!e)return;let t=e.scope;if(t.path===e){t=e.scope.parent}if(t.path.isProgram()||t.path.isFunction()){for(const r of Object.keys(this.bindings)){if(!t.hasOwnBinding(r))continue;const s=this.bindings[r];if(s.kind==="param"||s.path.parentKey==="params"){continue}const n=this.getAttachmentParentForPath(s.path);if(n.key>=e.key){this.attachAfter=true;e=s.path;for(const t of s.constantViolations){if(this.getAttachmentParentForPath(t).key>e.key){e=t}}}}}return e}_getAttachmentPath(){const e=this.scopes;const t=e.pop();if(!t)return;if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;const e=t.path.get("body").get("body");for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hooks=void 0;const r=[function(e,t){const r=e.key==="test"&&(t.isWhile()||t.isSwitchCase())||e.key==="declaration"&&t.isExportDeclaration()||e.key==="body"&&t.isLabeledStatement()||e.listKey==="declarations"&&t.isVariableDeclaration()&&t.node.declarations.length===1||e.key==="expression"&&t.isExpressionStatement();if(r){t.remove();return true}},function(e,t){if(t.isSequenceExpression()&&t.node.expressions.length===1){t.replaceWith(t.node.expressions[0]);return true}},function(e,t){if(t.isBinary()){if(e.key==="left"){t.replaceWith(t.node.right)}else{t.replaceWith(t.node.left)}return true}},function(e,t){if(t.isIfStatement()&&(e.key==="consequent"||e.key==="alternate")||e.key==="body"&&(t.isLoop()||t.isArrowFunctionExpression())){e.replaceWith({type:"BlockStatement",body:[]});return true}}];t.hooks=r},43859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ForAwaitStatement=t.NumericLiteralTypeAnnotation=t.ExistentialTypeParam=t.SpreadProperty=t.RestProperty=t.Flow=t.Pure=t.Generated=t.User=t.Var=t.BlockScoped=t.Referenced=t.Scope=t.Expression=t.Statement=t.BindingIdentifier=t.ReferencedMemberExpression=t.ReferencedIdentifier=void 0;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const n={types:["Identifier","JSXIdentifier"],checkPath(e,t){const{node:r,parent:n}=e;if(!s.isIdentifier(r,t)&&!s.isJSXMemberExpression(n,t)){if(s.isJSXIdentifier(r,t)){if(s.react.isCompatTag(r.name))return false}else{return false}}return s.isReferenced(r,n,e.parentPath.parent)}};t.ReferencedIdentifier=n;const a={types:["MemberExpression"],checkPath({node:e,parent:t}){return s.isMemberExpression(e)&&s.isReferenced(e,t)}};t.ReferencedMemberExpression=a;const i={types:["Identifier"],checkPath(e){const{node:t,parent:r}=e;const n=e.parentPath.parent;return s.isIdentifier(t)&&s.isBinding(t,r,n)}};t.BindingIdentifier=i;const o={types:["Statement"],checkPath({node:e,parent:t}){if(s.isStatement(e)){if(s.isVariableDeclaration(e)){if(s.isForXStatement(t,{left:e}))return false;if(s.isForStatement(t,{init:e}))return false}return true}else{return false}}};t.Statement=o;const l={types:["Expression"],checkPath(e){if(e.isIdentifier()){return e.isReferencedIdentifier()}else{return s.isExpression(e.node)}}};t.Expression=l;const u={types:["Scopable","Pattern"],checkPath(e){return s.isScope(e.node,e.parent)}};t.Scope=u;const c={checkPath(e){return s.isReferenced(e.node,e.parent)}};t.Referenced=c;const p={checkPath(e){return s.isBlockScoped(e.node)}};t.BlockScoped=p;const f={types:["VariableDeclaration"],checkPath(e){return s.isVar(e.node)}};t.Var=f;const d={checkPath(e){return e.node&&!!e.node.loc}};t.User=d;const y={checkPath(e){return!e.isUser()}};t.Generated=y;const h={checkPath(e,t){return e.scope.isPure(e.node,t)}};t.Pure=h;const m={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath({node:e}){if(s.isFlow(e)){return true}else if(s.isImportDeclaration(e)){return e.importKind==="type"||e.importKind==="typeof"}else if(s.isExportDeclaration(e)){return e.exportKind==="type"}else if(s.isImportSpecifier(e)){return e.importKind==="type"||e.importKind==="typeof"}else{return false}}};t.Flow=m;const g={types:["RestElement"],checkPath(e){return e.parentPath&&e.parentPath.isObjectPattern()}};t.RestProperty=g;const b={types:["RestElement"],checkPath(e){return e.parentPath&&e.parentPath.isObjectExpression()}};t.SpreadProperty=b;const x={types:["ExistsTypeAnnotation"]};t.ExistentialTypeParam=x;const v={types:["NumberLiteralTypeAnnotation"]};t.NumericLiteralTypeAnnotation=v;const E={types:["ForOfStatement"],checkPath({node:e}){return e.await===true}};t.ForAwaitStatement=E},61625:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.insertBefore=insertBefore;t._containerInsert=_containerInsert;t._containerInsertBefore=_containerInsertBefore;t._containerInsertAfter=_containerInsertAfter;t.insertAfter=insertAfter;t.updateSiblingKeys=updateSiblingKeys;t._verifyNodeList=_verifyNodeList;t.unshiftContainer=unshiftContainer;t.pushContainer=pushContainer;t.hoist=hoist;var s=r(65711);var n=_interopRequireDefault(r(37961));var a=_interopRequireDefault(r(32481));var i=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function insertBefore(e){this._assertUnremoved();e=this._verifyNodeList(e);const{parentPath:t}=this;if(t.isExpressionStatement()||t.isLabeledStatement()||t.isExportNamedDeclaration()||t.isExportDefaultDeclaration()&&this.isDeclaration()){return t.insertBefore(e)}else if(this.isNodeType("Expression")&&!this.isJSXElement()||t.isForStatement()&&this.key==="init"){if(this.node)e.push(this.node);return this.replaceExpressionWithStatements(e)}else if(Array.isArray(this.container)){return this._containerInsertBefore(e)}else if(this.isStatementOrBlock()){const t=this.node&&(!this.isExpressionStatement()||this.node.expression!=null);this.replaceWith(i.blockStatement(t?[this.node]:[]));return this.unshiftContainer("body",e)}else{throw new Error("We don't know what to do with this node type. "+"We were previously a Statement but we can't fit in here?")}}function _containerInsert(e,t){this.updateSiblingKeys(e,t.length);const r=[];this.container.splice(e,0,...t);for(let s=0;s{return i.isExpression(e)?i.expressionStatement(e):e}))}else if(this.isNodeType("Expression")&&!this.isJSXElement()&&!t.isJSXElement()||t.isForStatement()&&this.key==="init"){if(this.node){let{scope:r}=this;if(t.isMethod({computed:true,key:this.node})){r=r.parent}const s=r.generateDeclaredUidIdentifier();e.unshift(i.expressionStatement(i.assignmentExpression("=",i.cloneNode(s),this.node)));e.push(i.expressionStatement(i.cloneNode(s)))}return this.replaceExpressionWithStatements(e)}else if(Array.isArray(this.container)){return this._containerInsertAfter(e)}else if(this.isStatementOrBlock()){const t=this.node&&(!this.isExpressionStatement()||this.node.expression!=null);this.replaceWith(i.blockStatement(t?[this.node]:[]));return this.pushContainer("body",e)}else{throw new Error("We don't know what to do with this node type. "+"We were previously a Statement but we can't fit in here?")}}function updateSiblingKeys(e,t){if(!this.parent)return;const r=s.path.get(this.parent);for(const[,s]of r){if(s.key>=e){s.key+=t}}}function _verifyNodeList(e){if(!e){return[]}if(e.constructor!==Array){e=[e]}for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.remove=remove;t._removeFromScope=_removeFromScope;t._callRemovalHooks=_callRemovalHooks;t._remove=_remove;t._markRemoved=_markRemoved;t._assertUnremoved=_assertUnremoved;var s=r(79016);var n=r(65711);var a=r(32481);function remove(){var e;this._assertUnremoved();this.resync();if(!((e=this.opts)==null?void 0:e.noScope)){this._removeFromScope()}if(this._callRemovalHooks()){this._markRemoved();return}this.shareCommentsWithSiblings();this._remove();this._markRemoved()}function _removeFromScope(){const e=this.getBindingIdentifiers();Object.keys(e).forEach(e=>this.scope.removeBinding(e))}function _callRemovalHooks(){for(const e of s.hooks){if(e(this,this.parentPath))return true}}function _remove(){if(Array.isArray(this.container)){this.container.splice(this.key,1);this.updateSiblingKeys(this.key,-1)}else{this._replaceWith(null)}}function _markRemoved(){this._traverseFlags|=a.SHOULD_SKIP|a.REMOVED;if(this.parent)n.path.get(this.parent).delete(this.node);this.node=null}function _assertUnremoved(){if(this.removed){throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}}},52352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.replaceWithMultiple=replaceWithMultiple;t.replaceWithSourceString=replaceWithSourceString;t.replaceWith=replaceWith;t._replaceWith=_replaceWith;t.replaceExpressionWithStatements=replaceExpressionWithStatements;t.replaceInline=replaceInline;var s=r(36553);var n=_interopRequireDefault(r(18442));var a=_interopRequireDefault(r(32481));var i=r(65711);var o=r(30865);var l=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const u={Function(e){e.skip()},VariableDeclaration(e){if(e.node.kind!=="var")return;const t=e.getBindingIdentifiers();for(const r of Object.keys(t)){e.scope.push({id:t[r]})}const r=[];for(const t of e.node.declarations){if(t.init){r.push(l.expressionStatement(l.assignmentExpression("=",t.id,t.init)))}}e.replaceWithMultiple(r)}};function replaceWithMultiple(e){var t;this.resync();e=this._verifyNodeList(e);l.inheritLeadingComments(e[0],this.node);l.inheritTrailingComments(e[e.length-1],this.node);(t=i.path.get(this.parent))==null?void 0:t.delete(this.node);this.node=this.container[this.key]=null;const r=this.insertAfter(e);if(this.node){this.requeue()}else{this.remove()}return r}function replaceWithSourceString(e){this.resync();try{e=`(${e})`;e=(0,o.parse)(e)}catch(t){const r=t.loc;if(r){t.message+=" - make sure this is an expression.\n"+(0,s.codeFrameColumns)(e,{start:{line:r.line,column:r.column+1}});t.code="BABEL_REPLACE_SOURCE_ERROR"}throw t}e=e.program.body[0].expression;n.default.removeProperties(e);return this.replaceWith(e)}function replaceWith(e){this.resync();if(this.removed){throw new Error("You can't replace this node, we've already removed it")}if(e instanceof a.default){e=e.node}if(!e){throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead")}if(this.node===e){return[this]}if(this.isProgram()&&!l.isProgram(e)){throw new Error("You can only replace a Program root node with another Program node")}if(Array.isArray(e)){throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`")}if(typeof e==="string"){throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`")}let t="";if(this.isNodeType("Statement")&&l.isExpression(e)){if(!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e)&&!this.parentPath.isExportDefaultDeclaration()){e=l.expressionStatement(e);t="expression"}}if(this.isNodeType("Expression")&&l.isStatement(e)){if(!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e)){return this.replaceExpressionWithStatements([e])}}const r=this.node;if(r){l.inheritsComments(e,r);l.removeComments(r)}this._replaceWith(e);this.type=e.type;this.setScope();this.requeue();return[t?this.get(t):this]}function _replaceWith(e){var t;if(!this.container){throw new ReferenceError("Container is falsy")}if(this.inList){l.validate(this.parent,this.key,[e])}else{l.validate(this.parent,this.key,e)}this.debug(`Replace with ${e==null?void 0:e.type}`);(t=i.path.get(this.parent))==null?void 0:t.set(e,this).delete(this.node);this.node=this.container[this.key]=e}function replaceExpressionWithStatements(e){this.resync();const t=l.toSequenceExpression(e,this.scope);if(t){return this.replaceWith(t)[0].get("expressions")}const r=this.getFunctionParent();const s=r==null?void 0:r.is("async");const a=l.arrowFunctionExpression([],l.blockStatement(e));this.replaceWith(l.callExpression(a,[]));this.traverse(u);const i=this.get("callee").getCompletionRecords();for(const e of i){if(!e.isExpressionStatement())continue;const t=e.findParent(e=>e.isLoop());if(t){let r=t.getData("expressionReplacementReturnUid");if(!r){const e=this.get("callee");r=e.scope.generateDeclaredUidIdentifier("ret");e.get("body").pushContainer("body",l.returnStatement(l.cloneNode(r)));t.setData("expressionReplacementReturnUid",r)}else{r=l.identifier(r.name)}e.get("expression").replaceWith(l.assignmentExpression("=",l.cloneNode(r),e.node.expression))}else{e.replaceWith(l.returnStatement(e.node.expression))}}const o=this.get("callee");o.arrowFunctionToExpression();if(s&&n.default.hasType(this.get("callee.body").node,"AwaitExpression",l.FUNCTION_TYPES)){o.set("async",true);this.replaceWith(l.awaitExpression(this.node))}return o.get("body.body")}function replaceInline(e){this.resync();if(Array.isArray(e)){if(Array.isArray(this.container)){e=this._verifyNodeList(e);const t=this._containerInsertAfter(e);this.remove();return t}else{return this.replaceWithMultiple(e)}}else{return this.replaceWith(e)}}},24653:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;class Binding{constructor({identifier:e,scope:t,path:r,kind:s}){this.constantViolations=[];this.constant=true;this.referencePaths=[];this.referenced=false;this.references=0;this.identifier=e;this.scope=t;this.path=r;this.kind=s;this.clearValue()}deoptValue(){this.clearValue();this.hasDeoptedValue=true}setValue(e){if(this.hasDeoptedValue)return;this.hasValue=true;this.value=e}clearValue(){this.hasDeoptedValue=false;this.hasValue=false;this.value=null}reassign(e){this.constant=false;if(this.constantViolations.indexOf(e)!==-1){return}this.constantViolations.push(e)}reference(e){if(this.referencePaths.indexOf(e)!==-1){return}this.referenced=true;this.references++;this.referencePaths.push(e)}dereference(){this.references--;this.referenced=!!this.references}}t.default=Binding},10660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(46659));var n=_interopRequireDefault(r(18442));var a=_interopRequireDefault(r(24653));var i=_interopRequireDefault(r(41389));var o=_interopRequireWildcard(r(63760));var l=r(65711);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function gatherNodeParts(e,t){switch(e==null?void 0:e.type){default:if(o.isModuleDeclaration(e)){if(e.source){gatherNodeParts(e.source,t)}else if(e.specifiers&&e.specifiers.length){for(const r of e.specifiers)gatherNodeParts(r,t)}else if(e.declaration){gatherNodeParts(e.declaration,t)}}else if(o.isModuleSpecifier(e)){gatherNodeParts(e.local,t)}else if(o.isLiteral(e)){t.push(e.value)}break;case"MemberExpression":case"OptionalMemberExpression":case"JSXMemberExpression":gatherNodeParts(e.object,t);gatherNodeParts(e.property,t);break;case"Identifier":case"JSXIdentifier":t.push(e.name);break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":gatherNodeParts(e.callee,t);break;case"ObjectExpression":case"ObjectPattern":for(const r of e.properties){gatherNodeParts(r,t)}break;case"SpreadElement":case"RestElement":gatherNodeParts(e.argument,t);break;case"ObjectProperty":case"ObjectMethod":case"ClassProperty":case"ClassMethod":case"ClassPrivateProperty":case"ClassPrivateMethod":gatherNodeParts(e.key,t);break;case"ThisExpression":t.push("this");break;case"Super":t.push("super");break;case"Import":t.push("import");break;case"DoExpression":t.push("do");break;case"YieldExpression":t.push("yield");gatherNodeParts(e.argument,t);break;case"AwaitExpression":t.push("await");gatherNodeParts(e.argument,t);break;case"AssignmentExpression":gatherNodeParts(e.left,t);break;case"VariableDeclarator":gatherNodeParts(e.id,t);break;case"FunctionExpression":case"FunctionDeclaration":case"ClassExpression":case"ClassDeclaration":gatherNodeParts(e.id,t);break;case"PrivateName":gatherNodeParts(e.id,t);break;case"ParenthesizedExpression":gatherNodeParts(e.expression,t);break;case"UnaryExpression":case"UpdateExpression":gatherNodeParts(e.argument,t);break;case"MetaProperty":gatherNodeParts(e.meta,t);gatherNodeParts(e.property,t);break;case"JSXElement":gatherNodeParts(e.openingElement,t);break;case"JSXOpeningElement":t.push(e.name);break;case"JSXFragment":gatherNodeParts(e.openingFragment,t);break;case"JSXOpeningFragment":t.push("Fragment");break;case"JSXNamespacedName":gatherNodeParts(e.namespace,t);gatherNodeParts(e.name,t);break}}const u={For(e){for(const t of o.FOR_INIT_KEYS){const r=e.get(t);if(r.isVar()){const t=e.scope.getFunctionParent()||e.scope.getProgramParent();t.registerBinding("var",r)}}},Declaration(e){if(e.isBlockScoped())return;if(e.isExportDeclaration()&&e.get("declaration").isDeclaration()){return}const t=e.scope.getFunctionParent()||e.scope.getProgramParent();t.registerDeclaration(e)},ReferencedIdentifier(e,t){t.references.push(e)},ForXStatement(e,t){const r=e.get("left");if(r.isPattern()||r.isIdentifier()){t.constantViolations.push(e)}},ExportDeclaration:{exit(e){const{node:t,scope:r}=e;const s=t.declaration;if(o.isClassDeclaration(s)||o.isFunctionDeclaration(s)){const t=s.id;if(!t)return;const n=r.getBinding(t.name);if(n)n.reference(e)}else if(o.isVariableDeclaration(s)){for(const t of s.declarations){for(const s of Object.keys(o.getBindingIdentifiers(t))){const t=r.getBinding(s);if(t)t.reference(e)}}}}},LabeledStatement(e){e.scope.getProgramParent().addGlobal(e.node);e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression(e,t){t.assignments.push(e)},UpdateExpression(e,t){t.constantViolations.push(e)},UnaryExpression(e,t){if(e.node.operator==="delete"){t.constantViolations.push(e)}},BlockScoped(e){let t=e.scope;if(t.path===e)t=t.parent;const r=t.getBlockParent();r.registerDeclaration(e);if(e.isClassDeclaration()&&e.node.id){const t=e.node.id;const r=t.name;e.scope.bindings[r]=e.scope.parent.getBinding(r)}},Block(e){const t=e.get("body");for(const r of t){if(r.isFunctionDeclaration()){e.scope.getBlockParent().registerDeclaration(r)}}},CatchClause(e){e.scope.registerBinding("let",e)},Function(e){if(e.isFunctionExpression()&&e.has("id")&&!e.get("id").node[o.NOT_LOCAL_BINDING]){e.scope.registerBinding("local",e.get("id"),e)}const t=e.get("params");for(const r of t){e.scope.registerBinding("param",r)}},ClassExpression(e){if(e.has("id")&&!e.get("id").node[o.NOT_LOCAL_BINDING]){e.scope.registerBinding("local",e)}}};let c=0;class Scope{constructor(e){const{node:t}=e;const r=l.scope.get(t);if((r==null?void 0:r.path)===e){return r}l.scope.set(t,this);this.uid=c++;this.block=t;this.path=e;this.labels=new Map;this.inited=false}get parent(){const e=this.path.findParent(e=>e.isScope());return e==null?void 0:e.scope}get parentBlock(){return this.path.parent}get hub(){return this.path.hub}traverse(e,t,r){(0,n.default)(e,t,this,r,this.path)}generateDeclaredUidIdentifier(e){const t=this.generateUidIdentifier(e);this.push({id:t});return o.cloneNode(t)}generateUidIdentifier(e){return o.identifier(this.generateUid(e))}generateUid(e="temp"){e=o.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");let t;let r=1;do{t=this._generateUid(e,r);r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));const s=this.getProgramParent();s.references[t]=true;s.uids[t]=true;return t}_generateUid(e,t){let r=e;if(t>1)r+=t;return`_${r}`}generateUidBasedOnNode(e,t){const r=[];gatherNodeParts(e,r);let s=r.join("$");s=s.replace(/^_/,"")||t||"ref";return this.generateUid(s.slice(0,20))}generateUidIdentifierBasedOnNode(e,t){return o.identifier(this.generateUidBasedOnNode(e,t))}isStatic(e){if(o.isThisExpression(e)||o.isSuper(e)){return true}if(o.isIdentifier(e)){const t=this.getBinding(e.name);if(t){return t.constant}else{return this.hasBinding(e.name)}}return false}maybeGenerateMemoised(e,t){if(this.isStatic(e)){return null}else{const r=this.generateUidIdentifierBasedOnNode(e);if(!t){this.push({id:r});return o.cloneNode(r)}return r}}checkBlockScopedCollisions(e,t,r,s){if(t==="param")return;if(e.kind==="local")return;const n=t==="let"||e.kind==="let"||e.kind==="const"||e.kind==="module"||e.kind==="param"&&(t==="let"||t==="const");if(n){throw this.hub.buildError(s,`Duplicate declaration "${r}"`,TypeError)}}rename(e,t,r){const n=this.getBinding(e);if(n){t=t||this.generateUidIdentifier(e).name;return new s.default(n,e,t).rename(r)}}_renameFromMap(e,t,r,s){if(e[t]){e[r]=s;e[t]=null}}dump(){const e="-".repeat(60);console.log(e);let t=this;do{console.log("#",t.block.type);for(const e of Object.keys(t.bindings)){const r=t.bindings[e];console.log(" -",e,{constant:r.constant,references:r.references,violations:r.constantViolations.length,kind:r.kind})}}while(t=t.parent);console.log(e)}toArray(e,t,r){if(o.isIdentifier(e)){const t=this.getBinding(e.name);if((t==null?void 0:t.constant)&&t.path.isGenericType("Array")){return e}}if(o.isArrayExpression(e)){return e}if(o.isIdentifier(e,{name:"arguments"})){return o.callExpression(o.memberExpression(o.memberExpression(o.memberExpression(o.identifier("Array"),o.identifier("prototype")),o.identifier("slice")),o.identifier("call")),[e])}let s;const n=[e];if(t===true){s="toConsumableArray"}else if(t){n.push(o.numericLiteral(t));s="slicedToArray"}else{s="toArray"}if(r){n.unshift(this.hub.addHelper(s));s="maybeArrayLike"}return o.callExpression(this.hub.addHelper(s),n)}hasLabel(e){return!!this.getLabel(e)}getLabel(e){return this.labels.get(e)}registerLabel(e){this.labels.set(e.node.label.name,e)}registerDeclaration(e){if(e.isLabeledStatement()){this.registerLabel(e)}else if(e.isFunctionDeclaration()){this.registerBinding("hoisted",e.get("id"),e)}else if(e.isVariableDeclaration()){const t=e.get("declarations");for(const r of t){this.registerBinding(e.node.kind,r)}}else if(e.isClassDeclaration()){this.registerBinding("let",e)}else if(e.isImportDeclaration()){const t=e.get("specifiers");for(const e of t){this.registerBinding("module",e)}}else if(e.isExportDeclaration()){const t=e.get("declaration");if(t.isClassDeclaration()||t.isFunctionDeclaration()||t.isVariableDeclaration()){this.registerDeclaration(t)}}else{this.registerBinding("unknown",e)}}buildUndefinedNode(){return o.unaryExpression("void",o.numericLiteral(0),true)}registerConstantViolation(e){const t=e.getBindingIdentifiers();for(const r of Object.keys(t)){const t=this.getBinding(r);if(t)t.reassign(e)}}registerBinding(e,t,r=t){if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration()){const r=t.get("declarations");for(const t of r){this.registerBinding(e,t)}return}const s=this.getProgramParent();const n=t.getOuterBindingIdentifiers(true);for(const t of Object.keys(n)){s.references[t]=true;for(const s of n[t]){const n=this.getOwnBinding(t);if(n){if(n.identifier===s)continue;this.checkBlockScopedCollisions(n,e,t,s)}if(n){this.registerConstantViolation(r)}else{this.bindings[t]=new a.default({identifier:s,scope:this,path:r,kind:e})}}}}addGlobal(e){this.globals[e.name]=e}hasUid(e){let t=this;do{if(t.uids[e])return true}while(t=t.parent);return false}hasGlobal(e){let t=this;do{if(t.globals[e])return true}while(t=t.parent);return false}hasReference(e){return!!this.getProgramParent().references[e]}isPure(e,t){if(o.isIdentifier(e)){const r=this.getBinding(e.name);if(!r)return false;if(t)return r.constant;return true}else if(o.isClass(e)){if(e.superClass&&!this.isPure(e.superClass,t)){return false}return this.isPure(e.body,t)}else if(o.isClassBody(e)){for(const r of e.body){if(!this.isPure(r,t))return false}return true}else if(o.isBinary(e)){return this.isPure(e.left,t)&&this.isPure(e.right,t)}else if(o.isArrayExpression(e)){for(const r of e.elements){if(!this.isPure(r,t))return false}return true}else if(o.isObjectExpression(e)){for(const r of e.properties){if(!this.isPure(r,t))return false}return true}else if(o.isMethod(e)){if(e.computed&&!this.isPure(e.key,t))return false;if(e.kind==="get"||e.kind==="set")return false;return true}else if(o.isProperty(e)){if(e.computed&&!this.isPure(e.key,t))return false;return this.isPure(e.value,t)}else if(o.isUnaryExpression(e)){return this.isPure(e.argument,t)}else if(o.isTaggedTemplateExpression(e)){return o.matchesPattern(e.tag,"String.raw")&&!this.hasBinding("String",true)&&this.isPure(e.quasi,t)}else if(o.isTemplateLiteral(e)){for(const r of e.expressions){if(!this.isPure(r,t))return false}return true}else{return o.isPureish(e)}}setData(e,t){return this.data[e]=t}getData(e){let t=this;do{const r=t.data[e];if(r!=null)return r}while(t=t.parent)}removeData(e){let t=this;do{const r=t.data[e];if(r!=null)t.data[e]=null}while(t=t.parent)}init(){if(!this.inited){this.inited=true;this.crawl()}}crawl(){const e=this.path;this.references=Object.create(null);this.bindings=Object.create(null);this.globals=Object.create(null);this.uids=Object.create(null);this.data=Object.create(null);if(e.isFunction()){if(e.isFunctionExpression()&&e.has("id")&&!e.get("id").node[o.NOT_LOCAL_BINDING]){this.registerBinding("local",e.get("id"),e)}const t=e.get("params");for(const e of t){this.registerBinding("param",e)}}const t=this.getProgramParent();if(t.crawling)return;const r={references:[],constantViolations:[],assignments:[]};this.crawling=true;e.traverse(u,r);this.crawling=false;for(const e of r.assignments){const r=e.getBindingIdentifiers();for(const s of Object.keys(r)){if(e.scope.getBinding(s))continue;t.addGlobal(r[s])}e.scope.registerConstantViolation(e)}for(const e of r.references){const r=e.scope.getBinding(e.node.name);if(r){r.reference(e)}else{t.addGlobal(e.node)}}for(const e of r.constantViolations){e.scope.registerConstantViolation(e)}}push(e){let t=this.path;if(!t.isBlockStatement()&&!t.isProgram()){t=this.getBlockParent().path}if(t.isSwitchStatement()){t=(this.getFunctionParent()||this.getProgramParent()).path}if(t.isLoop()||t.isCatchClause()||t.isFunction()){t.ensureBlock();t=t.get("body")}const r=e.unique;const s=e.kind||"var";const n=e._blockHoist==null?2:e._blockHoist;const a=`declaration:${s}:${n}`;let i=!r&&t.getData(a);if(!i){const e=o.variableDeclaration(s,[]);e._blockHoist=n;[i]=t.unshiftContainer("body",[e]);if(!r)t.setData(a,i)}const l=o.variableDeclarator(e.id,e.init);i.node.declarations.push(l);this.registerBinding(s,i.get("declarations").pop())}getProgramParent(){let e=this;do{if(e.path.isProgram()){return e}}while(e=e.parent);throw new Error("Couldn't find a Program")}getFunctionParent(){let e=this;do{if(e.path.isFunctionParent()){return e}}while(e=e.parent);return null}getBlockParent(){let e=this;do{if(e.path.isBlockParent()){return e}}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getAllBindings(){const e=Object.create(null);let t=this;do{for(const r of Object.keys(t.bindings)){if(r in e===false){e[r]=t.bindings[r]}}t=t.parent}while(t);return e}getAllBindingsOfKind(){const e=Object.create(null);for(const t of arguments){let r=this;do{for(const s of Object.keys(r.bindings)){const n=r.bindings[s];if(n.kind===t)e[s]=n}r=r.parent}while(r)}return e}bindingIdentifierEquals(e,t){return this.getBindingIdentifier(e)===t}getBinding(e){let t=this;let r;do{const n=t.getOwnBinding(e);if(n){var s;if(((s=r)==null?void 0:s.isPattern())&&n.kind!=="param"){}else{return n}}r=t.path}while(t=t.parent)}getOwnBinding(e){return this.bindings[e]}getBindingIdentifier(e){var t;return(t=this.getBinding(e))==null?void 0:t.identifier}getOwnBindingIdentifier(e){const t=this.bindings[e];return t==null?void 0:t.identifier}hasOwnBinding(e){return!!this.getOwnBinding(e)}hasBinding(e,t){if(!e)return false;if(this.hasOwnBinding(e))return true;if(this.parentHasBinding(e,t))return true;if(this.hasUid(e))return true;if(!t&&Scope.globals.includes(e))return true;if(!t&&Scope.contextVariables.includes(e))return true;return false}parentHasBinding(e,t){var r;return(r=this.parent)==null?void 0:r.hasBinding(e,t)}moveBindingTo(e,t){const r=this.getBinding(e);if(r){r.scope.removeOwnBinding(e);r.scope=t;t.bindings[e]=r}}removeOwnBinding(e){delete this.bindings[e]}removeBinding(e){var t;(t=this.getBinding(e))==null?void 0:t.scope.removeOwnBinding(e);let r=this;do{if(r.uids[e]){r.uids[e]=false}}while(r=r.parent)}}t.default=Scope;Scope.globals=Object.keys(i.default.builtin);Scope.contextVariables=["arguments","undefined","Infinity","NaN"]},46659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(24653));var n=_interopRequireDefault(r(76729));var a=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i={ReferencedIdentifier({node:e},t){if(e.name===t.oldName){e.name=t.newName}},Scope(e,t){if(!e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)){e.skip()}},"AssignmentExpression|Declaration|VariableDeclarator"(e,t){if(e.isVariableDeclaration())return;const r=e.getOuterBindingIdentifiers();for(const e in r){if(e===t.oldName)r[e].name=t.newName}}};class Renamer{constructor(e,t,r){this.newName=r;this.oldName=t;this.binding=e}maybeConvertFromExportDeclaration(e){const t=e.parentPath;if(!t.isExportDeclaration()){return}if(t.isExportDefaultDeclaration()&&!t.get("declaration").node.id){return}(0,n.default)(t)}maybeConvertFromClassFunctionDeclaration(e){return;if(!e.isFunctionDeclaration()&&!e.isClassDeclaration())return;if(this.binding.kind!=="hoisted")return;e.node.id=a.identifier(this.oldName);e.node._blockHoist=3;e.replaceWith(a.variableDeclaration("let",[a.variableDeclarator(a.identifier(this.newName),a.toExpression(e.node))]))}maybeConvertFromClassFunctionExpression(e){return;if(!e.isFunctionExpression()&&!e.isClassExpression())return;if(this.binding.kind!=="local")return;e.node.id=a.identifier(this.oldName);this.binding.scope.parent.push({id:a.identifier(this.newName)});e.replaceWith(a.assignmentExpression("=",a.identifier(this.newName),e.node))}rename(e){const{binding:t,oldName:r,newName:s}=this;const{scope:n,path:a}=t;const o=a.find(e=>e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression());if(o){const e=o.getOuterBindingIdentifiers();if(e[r]===t.identifier){this.maybeConvertFromExportDeclaration(o)}}const l=e||n.block;if((l==null?void 0:l.type)==="SwitchStatement"){l.cases.forEach(e=>{n.traverse(e,i,this)})}else{n.traverse(l,i,this)}if(!e){n.removeOwnBinding(r);n.bindings[s]=t;this.binding.identifier.name=s}if(t.type==="hoisted"){}if(o){this.maybeConvertFromClassFunctionDeclaration(o);this.maybeConvertFromClassFunctionExpression(o)}}}t.default=Renamer},2751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.explode=explode;t.verify=verify;t.merge=merge;var s=_interopRequireWildcard(r(43859));var n=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function explode(e){if(e._exploded)return e;e._exploded=true;for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=t.split("|");if(r.length===1)continue;const s=e[t];delete e[t];for(const t of r){e[t]=s}}verify(e);delete e.__esModule;ensureEntranceObjects(e);ensureCallbackArrays(e);for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=s[t];if(!r)continue;const n=e[t];for(const e of Object.keys(n)){n[e]=wrapCheck(r,n[e])}delete e[t];if(r.types){for(const t of r.types){if(e[t]){mergePair(e[t],n)}else{e[t]=n}}}else{mergePair(e,n)}}for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=e[t];let s=n.FLIPPED_ALIAS_KEYS[t];const a=n.DEPRECATED_KEYS[t];if(a){console.trace(`Visitor defined for ${t} but it has been renamed to ${a}`);s=[a]}if(!s)continue;delete e[t];for(const t of s){const s=e[t];if(s){mergePair(s,r)}else{e[t]=Object.assign({},r)}}}for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;ensureCallbackArrays(e[t])}return e}function verify(e){if(e._verified)return;if(typeof e==="function"){throw new Error("You passed `traverse()` a function when it expected a visitor object, "+"are you sure you didn't mean `{ enter: Function }`?")}for(const t of Object.keys(e)){if(t==="enter"||t==="exit"){validateVisitorMethods(t,e[t])}if(shouldIgnoreKey(t))continue;if(n.TYPES.indexOf(t)<0){throw new Error(`You gave us a visitor for the node type ${t} but it's not a valid type`)}const r=e[t];if(typeof r==="object"){for(const e of Object.keys(r)){if(e==="enter"||e==="exit"){validateVisitorMethods(`${t}.${e}`,r[e])}else{throw new Error("You passed `traverse()` a visitor object with the property "+`${t} that has the invalid property ${e}`)}}}}e._verified=true}function validateVisitorMethods(e,t){const r=[].concat(t);for(const t of r){if(typeof t!=="function"){throw new TypeError(`Non-function found defined in ${e} with type ${typeof t}`)}}}function merge(e,t=[],r){const s={};for(let n=0;ne.toString())}return s});s[n]=a}return s}function ensureEntranceObjects(e){for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=e[t];if(typeof r==="function"){e[t]={enter:r}}}}function ensureCallbackArrays(e){if(e.enter&&!Array.isArray(e.enter))e.enter=[e.enter];if(e.exit&&!Array.isArray(e.exit))e.exit=[e.exit]}function wrapCheck(e,t){const r=function(r){if(e.checkPath(r)){return t.apply(this,arguments)}};r.toString=(()=>t.toString());return r}function shouldIgnoreKey(e){if(e[0]==="_")return true;if(e==="enter"||e==="exit"||e==="shouldSkip")return true;if(e==="denylist"||e==="noScope"||e==="skipKeys"||e==="blacklist"){return true}return false}function mergePair(e,t){for(const r of Object.keys(t)){e[r]=[].concat(e[r]||[],t[r])}}},34654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=assertNode;var s=_interopRequireDefault(r(95595));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function assertNode(e){if(!(0,s.default)(e)){var t;const r=(t=e==null?void 0:e.type)!=null?t:JSON.stringify(e);throw new TypeError(`Not a valid node of type "${r}"`)}}},28970:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertArrayExpression=assertArrayExpression;t.assertAssignmentExpression=assertAssignmentExpression;t.assertBinaryExpression=assertBinaryExpression;t.assertInterpreterDirective=assertInterpreterDirective;t.assertDirective=assertDirective;t.assertDirectiveLiteral=assertDirectiveLiteral;t.assertBlockStatement=assertBlockStatement;t.assertBreakStatement=assertBreakStatement;t.assertCallExpression=assertCallExpression;t.assertCatchClause=assertCatchClause;t.assertConditionalExpression=assertConditionalExpression;t.assertContinueStatement=assertContinueStatement;t.assertDebuggerStatement=assertDebuggerStatement;t.assertDoWhileStatement=assertDoWhileStatement;t.assertEmptyStatement=assertEmptyStatement;t.assertExpressionStatement=assertExpressionStatement;t.assertFile=assertFile;t.assertForInStatement=assertForInStatement;t.assertForStatement=assertForStatement;t.assertFunctionDeclaration=assertFunctionDeclaration;t.assertFunctionExpression=assertFunctionExpression;t.assertIdentifier=assertIdentifier;t.assertIfStatement=assertIfStatement;t.assertLabeledStatement=assertLabeledStatement;t.assertStringLiteral=assertStringLiteral;t.assertNumericLiteral=assertNumericLiteral;t.assertNullLiteral=assertNullLiteral;t.assertBooleanLiteral=assertBooleanLiteral;t.assertRegExpLiteral=assertRegExpLiteral;t.assertLogicalExpression=assertLogicalExpression;t.assertMemberExpression=assertMemberExpression;t.assertNewExpression=assertNewExpression;t.assertProgram=assertProgram;t.assertObjectExpression=assertObjectExpression;t.assertObjectMethod=assertObjectMethod;t.assertObjectProperty=assertObjectProperty;t.assertRestElement=assertRestElement;t.assertReturnStatement=assertReturnStatement;t.assertSequenceExpression=assertSequenceExpression;t.assertParenthesizedExpression=assertParenthesizedExpression;t.assertSwitchCase=assertSwitchCase;t.assertSwitchStatement=assertSwitchStatement;t.assertThisExpression=assertThisExpression;t.assertThrowStatement=assertThrowStatement;t.assertTryStatement=assertTryStatement;t.assertUnaryExpression=assertUnaryExpression;t.assertUpdateExpression=assertUpdateExpression;t.assertVariableDeclaration=assertVariableDeclaration;t.assertVariableDeclarator=assertVariableDeclarator;t.assertWhileStatement=assertWhileStatement;t.assertWithStatement=assertWithStatement;t.assertAssignmentPattern=assertAssignmentPattern;t.assertArrayPattern=assertArrayPattern;t.assertArrowFunctionExpression=assertArrowFunctionExpression;t.assertClassBody=assertClassBody;t.assertClassExpression=assertClassExpression;t.assertClassDeclaration=assertClassDeclaration;t.assertExportAllDeclaration=assertExportAllDeclaration;t.assertExportDefaultDeclaration=assertExportDefaultDeclaration;t.assertExportNamedDeclaration=assertExportNamedDeclaration;t.assertExportSpecifier=assertExportSpecifier;t.assertForOfStatement=assertForOfStatement;t.assertImportDeclaration=assertImportDeclaration;t.assertImportDefaultSpecifier=assertImportDefaultSpecifier;t.assertImportNamespaceSpecifier=assertImportNamespaceSpecifier;t.assertImportSpecifier=assertImportSpecifier;t.assertMetaProperty=assertMetaProperty;t.assertClassMethod=assertClassMethod;t.assertObjectPattern=assertObjectPattern;t.assertSpreadElement=assertSpreadElement;t.assertSuper=assertSuper;t.assertTaggedTemplateExpression=assertTaggedTemplateExpression;t.assertTemplateElement=assertTemplateElement;t.assertTemplateLiteral=assertTemplateLiteral;t.assertYieldExpression=assertYieldExpression;t.assertAwaitExpression=assertAwaitExpression;t.assertImport=assertImport;t.assertBigIntLiteral=assertBigIntLiteral;t.assertExportNamespaceSpecifier=assertExportNamespaceSpecifier;t.assertOptionalMemberExpression=assertOptionalMemberExpression;t.assertOptionalCallExpression=assertOptionalCallExpression;t.assertAnyTypeAnnotation=assertAnyTypeAnnotation;t.assertArrayTypeAnnotation=assertArrayTypeAnnotation;t.assertBooleanTypeAnnotation=assertBooleanTypeAnnotation;t.assertBooleanLiteralTypeAnnotation=assertBooleanLiteralTypeAnnotation;t.assertNullLiteralTypeAnnotation=assertNullLiteralTypeAnnotation;t.assertClassImplements=assertClassImplements;t.assertDeclareClass=assertDeclareClass;t.assertDeclareFunction=assertDeclareFunction;t.assertDeclareInterface=assertDeclareInterface;t.assertDeclareModule=assertDeclareModule;t.assertDeclareModuleExports=assertDeclareModuleExports;t.assertDeclareTypeAlias=assertDeclareTypeAlias;t.assertDeclareOpaqueType=assertDeclareOpaqueType;t.assertDeclareVariable=assertDeclareVariable;t.assertDeclareExportDeclaration=assertDeclareExportDeclaration;t.assertDeclareExportAllDeclaration=assertDeclareExportAllDeclaration;t.assertDeclaredPredicate=assertDeclaredPredicate;t.assertExistsTypeAnnotation=assertExistsTypeAnnotation;t.assertFunctionTypeAnnotation=assertFunctionTypeAnnotation;t.assertFunctionTypeParam=assertFunctionTypeParam;t.assertGenericTypeAnnotation=assertGenericTypeAnnotation;t.assertInferredPredicate=assertInferredPredicate;t.assertInterfaceExtends=assertInterfaceExtends;t.assertInterfaceDeclaration=assertInterfaceDeclaration;t.assertInterfaceTypeAnnotation=assertInterfaceTypeAnnotation;t.assertIntersectionTypeAnnotation=assertIntersectionTypeAnnotation;t.assertMixedTypeAnnotation=assertMixedTypeAnnotation;t.assertEmptyTypeAnnotation=assertEmptyTypeAnnotation;t.assertNullableTypeAnnotation=assertNullableTypeAnnotation;t.assertNumberLiteralTypeAnnotation=assertNumberLiteralTypeAnnotation;t.assertNumberTypeAnnotation=assertNumberTypeAnnotation;t.assertObjectTypeAnnotation=assertObjectTypeAnnotation;t.assertObjectTypeInternalSlot=assertObjectTypeInternalSlot;t.assertObjectTypeCallProperty=assertObjectTypeCallProperty;t.assertObjectTypeIndexer=assertObjectTypeIndexer;t.assertObjectTypeProperty=assertObjectTypeProperty;t.assertObjectTypeSpreadProperty=assertObjectTypeSpreadProperty;t.assertOpaqueType=assertOpaqueType;t.assertQualifiedTypeIdentifier=assertQualifiedTypeIdentifier;t.assertStringLiteralTypeAnnotation=assertStringLiteralTypeAnnotation;t.assertStringTypeAnnotation=assertStringTypeAnnotation;t.assertSymbolTypeAnnotation=assertSymbolTypeAnnotation;t.assertThisTypeAnnotation=assertThisTypeAnnotation;t.assertTupleTypeAnnotation=assertTupleTypeAnnotation;t.assertTypeofTypeAnnotation=assertTypeofTypeAnnotation;t.assertTypeAlias=assertTypeAlias;t.assertTypeAnnotation=assertTypeAnnotation;t.assertTypeCastExpression=assertTypeCastExpression;t.assertTypeParameter=assertTypeParameter;t.assertTypeParameterDeclaration=assertTypeParameterDeclaration;t.assertTypeParameterInstantiation=assertTypeParameterInstantiation;t.assertUnionTypeAnnotation=assertUnionTypeAnnotation;t.assertVariance=assertVariance;t.assertVoidTypeAnnotation=assertVoidTypeAnnotation;t.assertEnumDeclaration=assertEnumDeclaration;t.assertEnumBooleanBody=assertEnumBooleanBody;t.assertEnumNumberBody=assertEnumNumberBody;t.assertEnumStringBody=assertEnumStringBody;t.assertEnumSymbolBody=assertEnumSymbolBody;t.assertEnumBooleanMember=assertEnumBooleanMember;t.assertEnumNumberMember=assertEnumNumberMember;t.assertEnumStringMember=assertEnumStringMember;t.assertEnumDefaultedMember=assertEnumDefaultedMember;t.assertJSXAttribute=assertJSXAttribute;t.assertJSXClosingElement=assertJSXClosingElement;t.assertJSXElement=assertJSXElement;t.assertJSXEmptyExpression=assertJSXEmptyExpression;t.assertJSXExpressionContainer=assertJSXExpressionContainer;t.assertJSXSpreadChild=assertJSXSpreadChild;t.assertJSXIdentifier=assertJSXIdentifier;t.assertJSXMemberExpression=assertJSXMemberExpression;t.assertJSXNamespacedName=assertJSXNamespacedName;t.assertJSXOpeningElement=assertJSXOpeningElement;t.assertJSXSpreadAttribute=assertJSXSpreadAttribute;t.assertJSXText=assertJSXText;t.assertJSXFragment=assertJSXFragment;t.assertJSXOpeningFragment=assertJSXOpeningFragment;t.assertJSXClosingFragment=assertJSXClosingFragment;t.assertNoop=assertNoop;t.assertPlaceholder=assertPlaceholder;t.assertV8IntrinsicIdentifier=assertV8IntrinsicIdentifier;t.assertArgumentPlaceholder=assertArgumentPlaceholder;t.assertBindExpression=assertBindExpression;t.assertClassProperty=assertClassProperty;t.assertPipelineTopicExpression=assertPipelineTopicExpression;t.assertPipelineBareFunction=assertPipelineBareFunction;t.assertPipelinePrimaryTopicReference=assertPipelinePrimaryTopicReference;t.assertClassPrivateProperty=assertClassPrivateProperty;t.assertClassPrivateMethod=assertClassPrivateMethod;t.assertImportAttribute=assertImportAttribute;t.assertDecorator=assertDecorator;t.assertDoExpression=assertDoExpression;t.assertExportDefaultSpecifier=assertExportDefaultSpecifier;t.assertPrivateName=assertPrivateName;t.assertRecordExpression=assertRecordExpression;t.assertTupleExpression=assertTupleExpression;t.assertDecimalLiteral=assertDecimalLiteral;t.assertStaticBlock=assertStaticBlock;t.assertTSParameterProperty=assertTSParameterProperty;t.assertTSDeclareFunction=assertTSDeclareFunction;t.assertTSDeclareMethod=assertTSDeclareMethod;t.assertTSQualifiedName=assertTSQualifiedName;t.assertTSCallSignatureDeclaration=assertTSCallSignatureDeclaration;t.assertTSConstructSignatureDeclaration=assertTSConstructSignatureDeclaration;t.assertTSPropertySignature=assertTSPropertySignature;t.assertTSMethodSignature=assertTSMethodSignature;t.assertTSIndexSignature=assertTSIndexSignature;t.assertTSAnyKeyword=assertTSAnyKeyword;t.assertTSBooleanKeyword=assertTSBooleanKeyword;t.assertTSBigIntKeyword=assertTSBigIntKeyword;t.assertTSIntrinsicKeyword=assertTSIntrinsicKeyword;t.assertTSNeverKeyword=assertTSNeverKeyword;t.assertTSNullKeyword=assertTSNullKeyword;t.assertTSNumberKeyword=assertTSNumberKeyword;t.assertTSObjectKeyword=assertTSObjectKeyword;t.assertTSStringKeyword=assertTSStringKeyword;t.assertTSSymbolKeyword=assertTSSymbolKeyword;t.assertTSUndefinedKeyword=assertTSUndefinedKeyword;t.assertTSUnknownKeyword=assertTSUnknownKeyword;t.assertTSVoidKeyword=assertTSVoidKeyword;t.assertTSThisType=assertTSThisType;t.assertTSFunctionType=assertTSFunctionType;t.assertTSConstructorType=assertTSConstructorType;t.assertTSTypeReference=assertTSTypeReference;t.assertTSTypePredicate=assertTSTypePredicate;t.assertTSTypeQuery=assertTSTypeQuery;t.assertTSTypeLiteral=assertTSTypeLiteral;t.assertTSArrayType=assertTSArrayType;t.assertTSTupleType=assertTSTupleType;t.assertTSOptionalType=assertTSOptionalType;t.assertTSRestType=assertTSRestType;t.assertTSNamedTupleMember=assertTSNamedTupleMember;t.assertTSUnionType=assertTSUnionType;t.assertTSIntersectionType=assertTSIntersectionType;t.assertTSConditionalType=assertTSConditionalType;t.assertTSInferType=assertTSInferType;t.assertTSParenthesizedType=assertTSParenthesizedType;t.assertTSTypeOperator=assertTSTypeOperator;t.assertTSIndexedAccessType=assertTSIndexedAccessType;t.assertTSMappedType=assertTSMappedType;t.assertTSLiteralType=assertTSLiteralType;t.assertTSExpressionWithTypeArguments=assertTSExpressionWithTypeArguments;t.assertTSInterfaceDeclaration=assertTSInterfaceDeclaration;t.assertTSInterfaceBody=assertTSInterfaceBody;t.assertTSTypeAliasDeclaration=assertTSTypeAliasDeclaration;t.assertTSAsExpression=assertTSAsExpression;t.assertTSTypeAssertion=assertTSTypeAssertion;t.assertTSEnumDeclaration=assertTSEnumDeclaration;t.assertTSEnumMember=assertTSEnumMember;t.assertTSModuleDeclaration=assertTSModuleDeclaration;t.assertTSModuleBlock=assertTSModuleBlock;t.assertTSImportType=assertTSImportType;t.assertTSImportEqualsDeclaration=assertTSImportEqualsDeclaration;t.assertTSExternalModuleReference=assertTSExternalModuleReference;t.assertTSNonNullExpression=assertTSNonNullExpression;t.assertTSExportAssignment=assertTSExportAssignment;t.assertTSNamespaceExportDeclaration=assertTSNamespaceExportDeclaration;t.assertTSTypeAnnotation=assertTSTypeAnnotation;t.assertTSTypeParameterInstantiation=assertTSTypeParameterInstantiation;t.assertTSTypeParameterDeclaration=assertTSTypeParameterDeclaration;t.assertTSTypeParameter=assertTSTypeParameter;t.assertExpression=assertExpression;t.assertBinary=assertBinary;t.assertScopable=assertScopable;t.assertBlockParent=assertBlockParent;t.assertBlock=assertBlock;t.assertStatement=assertStatement;t.assertTerminatorless=assertTerminatorless;t.assertCompletionStatement=assertCompletionStatement;t.assertConditional=assertConditional;t.assertLoop=assertLoop;t.assertWhile=assertWhile;t.assertExpressionWrapper=assertExpressionWrapper;t.assertFor=assertFor;t.assertForXStatement=assertForXStatement;t.assertFunction=assertFunction;t.assertFunctionParent=assertFunctionParent;t.assertPureish=assertPureish;t.assertDeclaration=assertDeclaration;t.assertPatternLike=assertPatternLike;t.assertLVal=assertLVal;t.assertTSEntityName=assertTSEntityName;t.assertLiteral=assertLiteral;t.assertImmutable=assertImmutable;t.assertUserWhitespacable=assertUserWhitespacable;t.assertMethod=assertMethod;t.assertObjectMember=assertObjectMember;t.assertProperty=assertProperty;t.assertUnaryLike=assertUnaryLike;t.assertPattern=assertPattern;t.assertClass=assertClass;t.assertModuleDeclaration=assertModuleDeclaration;t.assertExportDeclaration=assertExportDeclaration;t.assertModuleSpecifier=assertModuleSpecifier;t.assertFlow=assertFlow;t.assertFlowType=assertFlowType;t.assertFlowBaseAnnotation=assertFlowBaseAnnotation;t.assertFlowDeclaration=assertFlowDeclaration;t.assertFlowPredicate=assertFlowPredicate;t.assertEnumBody=assertEnumBody;t.assertEnumMember=assertEnumMember;t.assertJSX=assertJSX;t.assertPrivate=assertPrivate;t.assertTSTypeElement=assertTSTypeElement;t.assertTSType=assertTSType;t.assertTSBaseType=assertTSBaseType;t.assertNumberLiteral=assertNumberLiteral;t.assertRegexLiteral=assertRegexLiteral;t.assertRestProperty=assertRestProperty;t.assertSpreadProperty=assertSpreadProperty;var s=_interopRequireDefault(r(28422));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function assert(e,t,r){if(!(0,s.default)(e,t,r)){throw new Error(`Expected type "${e}" with option ${JSON.stringify(r)}, `+`but instead got "${t.type}".`)}}function assertArrayExpression(e,t){assert("ArrayExpression",e,t)}function assertAssignmentExpression(e,t){assert("AssignmentExpression",e,t)}function assertBinaryExpression(e,t){assert("BinaryExpression",e,t)}function assertInterpreterDirective(e,t){assert("InterpreterDirective",e,t)}function assertDirective(e,t){assert("Directive",e,t)}function assertDirectiveLiteral(e,t){assert("DirectiveLiteral",e,t)}function assertBlockStatement(e,t){assert("BlockStatement",e,t)}function assertBreakStatement(e,t){assert("BreakStatement",e,t)}function assertCallExpression(e,t){assert("CallExpression",e,t)}function assertCatchClause(e,t){assert("CatchClause",e,t)}function assertConditionalExpression(e,t){assert("ConditionalExpression",e,t)}function assertContinueStatement(e,t){assert("ContinueStatement",e,t)}function assertDebuggerStatement(e,t){assert("DebuggerStatement",e,t)}function assertDoWhileStatement(e,t){assert("DoWhileStatement",e,t)}function assertEmptyStatement(e,t){assert("EmptyStatement",e,t)}function assertExpressionStatement(e,t){assert("ExpressionStatement",e,t)}function assertFile(e,t){assert("File",e,t)}function assertForInStatement(e,t){assert("ForInStatement",e,t)}function assertForStatement(e,t){assert("ForStatement",e,t)}function assertFunctionDeclaration(e,t){assert("FunctionDeclaration",e,t)}function assertFunctionExpression(e,t){assert("FunctionExpression",e,t)}function assertIdentifier(e,t){assert("Identifier",e,t)}function assertIfStatement(e,t){assert("IfStatement",e,t)}function assertLabeledStatement(e,t){assert("LabeledStatement",e,t)}function assertStringLiteral(e,t){assert("StringLiteral",e,t)}function assertNumericLiteral(e,t){assert("NumericLiteral",e,t)}function assertNullLiteral(e,t){assert("NullLiteral",e,t)}function assertBooleanLiteral(e,t){assert("BooleanLiteral",e,t)}function assertRegExpLiteral(e,t){assert("RegExpLiteral",e,t)}function assertLogicalExpression(e,t){assert("LogicalExpression",e,t)}function assertMemberExpression(e,t){assert("MemberExpression",e,t)}function assertNewExpression(e,t){assert("NewExpression",e,t)}function assertProgram(e,t){assert("Program",e,t)}function assertObjectExpression(e,t){assert("ObjectExpression",e,t)}function assertObjectMethod(e,t){assert("ObjectMethod",e,t)}function assertObjectProperty(e,t){assert("ObjectProperty",e,t)}function assertRestElement(e,t){assert("RestElement",e,t)}function assertReturnStatement(e,t){assert("ReturnStatement",e,t)}function assertSequenceExpression(e,t){assert("SequenceExpression",e,t)}function assertParenthesizedExpression(e,t){assert("ParenthesizedExpression",e,t)}function assertSwitchCase(e,t){assert("SwitchCase",e,t)}function assertSwitchStatement(e,t){assert("SwitchStatement",e,t)}function assertThisExpression(e,t){assert("ThisExpression",e,t)}function assertThrowStatement(e,t){assert("ThrowStatement",e,t)}function assertTryStatement(e,t){assert("TryStatement",e,t)}function assertUnaryExpression(e,t){assert("UnaryExpression",e,t)}function assertUpdateExpression(e,t){assert("UpdateExpression",e,t)}function assertVariableDeclaration(e,t){assert("VariableDeclaration",e,t)}function assertVariableDeclarator(e,t){assert("VariableDeclarator",e,t)}function assertWhileStatement(e,t){assert("WhileStatement",e,t)}function assertWithStatement(e,t){assert("WithStatement",e,t)}function assertAssignmentPattern(e,t){assert("AssignmentPattern",e,t)}function assertArrayPattern(e,t){assert("ArrayPattern",e,t)}function assertArrowFunctionExpression(e,t){assert("ArrowFunctionExpression",e,t)}function assertClassBody(e,t){assert("ClassBody",e,t)}function assertClassExpression(e,t){assert("ClassExpression",e,t)}function assertClassDeclaration(e,t){assert("ClassDeclaration",e,t)}function assertExportAllDeclaration(e,t){assert("ExportAllDeclaration",e,t)}function assertExportDefaultDeclaration(e,t){assert("ExportDefaultDeclaration",e,t)}function assertExportNamedDeclaration(e,t){assert("ExportNamedDeclaration",e,t)}function assertExportSpecifier(e,t){assert("ExportSpecifier",e,t)}function assertForOfStatement(e,t){assert("ForOfStatement",e,t)}function assertImportDeclaration(e,t){assert("ImportDeclaration",e,t)}function assertImportDefaultSpecifier(e,t){assert("ImportDefaultSpecifier",e,t)}function assertImportNamespaceSpecifier(e,t){assert("ImportNamespaceSpecifier",e,t)}function assertImportSpecifier(e,t){assert("ImportSpecifier",e,t)}function assertMetaProperty(e,t){assert("MetaProperty",e,t)}function assertClassMethod(e,t){assert("ClassMethod",e,t)}function assertObjectPattern(e,t){assert("ObjectPattern",e,t)}function assertSpreadElement(e,t){assert("SpreadElement",e,t)}function assertSuper(e,t){assert("Super",e,t)}function assertTaggedTemplateExpression(e,t){assert("TaggedTemplateExpression",e,t)}function assertTemplateElement(e,t){assert("TemplateElement",e,t)}function assertTemplateLiteral(e,t){assert("TemplateLiteral",e,t)}function assertYieldExpression(e,t){assert("YieldExpression",e,t)}function assertAwaitExpression(e,t){assert("AwaitExpression",e,t)}function assertImport(e,t){assert("Import",e,t)}function assertBigIntLiteral(e,t){assert("BigIntLiteral",e,t)}function assertExportNamespaceSpecifier(e,t){assert("ExportNamespaceSpecifier",e,t)}function assertOptionalMemberExpression(e,t){assert("OptionalMemberExpression",e,t)}function assertOptionalCallExpression(e,t){assert("OptionalCallExpression",e,t)}function assertAnyTypeAnnotation(e,t){assert("AnyTypeAnnotation",e,t)}function assertArrayTypeAnnotation(e,t){assert("ArrayTypeAnnotation",e,t)}function assertBooleanTypeAnnotation(e,t){assert("BooleanTypeAnnotation",e,t)}function assertBooleanLiteralTypeAnnotation(e,t){assert("BooleanLiteralTypeAnnotation",e,t)}function assertNullLiteralTypeAnnotation(e,t){assert("NullLiteralTypeAnnotation",e,t)}function assertClassImplements(e,t){assert("ClassImplements",e,t)}function assertDeclareClass(e,t){assert("DeclareClass",e,t)}function assertDeclareFunction(e,t){assert("DeclareFunction",e,t)}function assertDeclareInterface(e,t){assert("DeclareInterface",e,t)}function assertDeclareModule(e,t){assert("DeclareModule",e,t)}function assertDeclareModuleExports(e,t){assert("DeclareModuleExports",e,t)}function assertDeclareTypeAlias(e,t){assert("DeclareTypeAlias",e,t)}function assertDeclareOpaqueType(e,t){assert("DeclareOpaqueType",e,t)}function assertDeclareVariable(e,t){assert("DeclareVariable",e,t)}function assertDeclareExportDeclaration(e,t){assert("DeclareExportDeclaration",e,t)}function assertDeclareExportAllDeclaration(e,t){assert("DeclareExportAllDeclaration",e,t)}function assertDeclaredPredicate(e,t){assert("DeclaredPredicate",e,t)}function assertExistsTypeAnnotation(e,t){assert("ExistsTypeAnnotation",e,t)}function assertFunctionTypeAnnotation(e,t){assert("FunctionTypeAnnotation",e,t)}function assertFunctionTypeParam(e,t){assert("FunctionTypeParam",e,t)}function assertGenericTypeAnnotation(e,t){assert("GenericTypeAnnotation",e,t)}function assertInferredPredicate(e,t){assert("InferredPredicate",e,t)}function assertInterfaceExtends(e,t){assert("InterfaceExtends",e,t)}function assertInterfaceDeclaration(e,t){assert("InterfaceDeclaration",e,t)}function assertInterfaceTypeAnnotation(e,t){assert("InterfaceTypeAnnotation",e,t)}function assertIntersectionTypeAnnotation(e,t){assert("IntersectionTypeAnnotation",e,t)}function assertMixedTypeAnnotation(e,t){assert("MixedTypeAnnotation",e,t)}function assertEmptyTypeAnnotation(e,t){assert("EmptyTypeAnnotation",e,t)}function assertNullableTypeAnnotation(e,t){assert("NullableTypeAnnotation",e,t)}function assertNumberLiteralTypeAnnotation(e,t){assert("NumberLiteralTypeAnnotation",e,t)}function assertNumberTypeAnnotation(e,t){assert("NumberTypeAnnotation",e,t)}function assertObjectTypeAnnotation(e,t){assert("ObjectTypeAnnotation",e,t)}function assertObjectTypeInternalSlot(e,t){assert("ObjectTypeInternalSlot",e,t)}function assertObjectTypeCallProperty(e,t){assert("ObjectTypeCallProperty",e,t)}function assertObjectTypeIndexer(e,t){assert("ObjectTypeIndexer",e,t)}function assertObjectTypeProperty(e,t){assert("ObjectTypeProperty",e,t)}function assertObjectTypeSpreadProperty(e,t){assert("ObjectTypeSpreadProperty",e,t)}function assertOpaqueType(e,t){assert("OpaqueType",e,t)}function assertQualifiedTypeIdentifier(e,t){assert("QualifiedTypeIdentifier",e,t)}function assertStringLiteralTypeAnnotation(e,t){assert("StringLiteralTypeAnnotation",e,t)}function assertStringTypeAnnotation(e,t){assert("StringTypeAnnotation",e,t)}function assertSymbolTypeAnnotation(e,t){assert("SymbolTypeAnnotation",e,t)}function assertThisTypeAnnotation(e,t){assert("ThisTypeAnnotation",e,t)}function assertTupleTypeAnnotation(e,t){assert("TupleTypeAnnotation",e,t)}function assertTypeofTypeAnnotation(e,t){assert("TypeofTypeAnnotation",e,t)}function assertTypeAlias(e,t){assert("TypeAlias",e,t)}function assertTypeAnnotation(e,t){assert("TypeAnnotation",e,t)}function assertTypeCastExpression(e,t){assert("TypeCastExpression",e,t)}function assertTypeParameter(e,t){assert("TypeParameter",e,t)}function assertTypeParameterDeclaration(e,t){assert("TypeParameterDeclaration",e,t)}function assertTypeParameterInstantiation(e,t){assert("TypeParameterInstantiation",e,t)}function assertUnionTypeAnnotation(e,t){assert("UnionTypeAnnotation",e,t)}function assertVariance(e,t){assert("Variance",e,t)}function assertVoidTypeAnnotation(e,t){assert("VoidTypeAnnotation",e,t)}function assertEnumDeclaration(e,t){assert("EnumDeclaration",e,t)}function assertEnumBooleanBody(e,t){assert("EnumBooleanBody",e,t)}function assertEnumNumberBody(e,t){assert("EnumNumberBody",e,t)}function assertEnumStringBody(e,t){assert("EnumStringBody",e,t)}function assertEnumSymbolBody(e,t){assert("EnumSymbolBody",e,t)}function assertEnumBooleanMember(e,t){assert("EnumBooleanMember",e,t)}function assertEnumNumberMember(e,t){assert("EnumNumberMember",e,t)}function assertEnumStringMember(e,t){assert("EnumStringMember",e,t)}function assertEnumDefaultedMember(e,t){assert("EnumDefaultedMember",e,t)}function assertJSXAttribute(e,t){assert("JSXAttribute",e,t)}function assertJSXClosingElement(e,t){assert("JSXClosingElement",e,t)}function assertJSXElement(e,t){assert("JSXElement",e,t)}function assertJSXEmptyExpression(e,t){assert("JSXEmptyExpression",e,t)}function assertJSXExpressionContainer(e,t){assert("JSXExpressionContainer",e,t)}function assertJSXSpreadChild(e,t){assert("JSXSpreadChild",e,t)}function assertJSXIdentifier(e,t){assert("JSXIdentifier",e,t)}function assertJSXMemberExpression(e,t){assert("JSXMemberExpression",e,t)}function assertJSXNamespacedName(e,t){assert("JSXNamespacedName",e,t)}function assertJSXOpeningElement(e,t){assert("JSXOpeningElement",e,t)}function assertJSXSpreadAttribute(e,t){assert("JSXSpreadAttribute",e,t)}function assertJSXText(e,t){assert("JSXText",e,t)}function assertJSXFragment(e,t){assert("JSXFragment",e,t)}function assertJSXOpeningFragment(e,t){assert("JSXOpeningFragment",e,t)}function assertJSXClosingFragment(e,t){assert("JSXClosingFragment",e,t)}function assertNoop(e,t){assert("Noop",e,t)}function assertPlaceholder(e,t){assert("Placeholder",e,t)}function assertV8IntrinsicIdentifier(e,t){assert("V8IntrinsicIdentifier",e,t)}function assertArgumentPlaceholder(e,t){assert("ArgumentPlaceholder",e,t)}function assertBindExpression(e,t){assert("BindExpression",e,t)}function assertClassProperty(e,t){assert("ClassProperty",e,t)}function assertPipelineTopicExpression(e,t){assert("PipelineTopicExpression",e,t)}function assertPipelineBareFunction(e,t){assert("PipelineBareFunction",e,t)}function assertPipelinePrimaryTopicReference(e,t){assert("PipelinePrimaryTopicReference",e,t)}function assertClassPrivateProperty(e,t){assert("ClassPrivateProperty",e,t)}function assertClassPrivateMethod(e,t){assert("ClassPrivateMethod",e,t)}function assertImportAttribute(e,t){assert("ImportAttribute",e,t)}function assertDecorator(e,t){assert("Decorator",e,t)}function assertDoExpression(e,t){assert("DoExpression",e,t)}function assertExportDefaultSpecifier(e,t){assert("ExportDefaultSpecifier",e,t)}function assertPrivateName(e,t){assert("PrivateName",e,t)}function assertRecordExpression(e,t){assert("RecordExpression",e,t)}function assertTupleExpression(e,t){assert("TupleExpression",e,t)}function assertDecimalLiteral(e,t){assert("DecimalLiteral",e,t)}function assertStaticBlock(e,t){assert("StaticBlock",e,t)}function assertTSParameterProperty(e,t){assert("TSParameterProperty",e,t)}function assertTSDeclareFunction(e,t){assert("TSDeclareFunction",e,t)}function assertTSDeclareMethod(e,t){assert("TSDeclareMethod",e,t)}function assertTSQualifiedName(e,t){assert("TSQualifiedName",e,t)}function assertTSCallSignatureDeclaration(e,t){assert("TSCallSignatureDeclaration",e,t)}function assertTSConstructSignatureDeclaration(e,t){assert("TSConstructSignatureDeclaration",e,t)}function assertTSPropertySignature(e,t){assert("TSPropertySignature",e,t)}function assertTSMethodSignature(e,t){assert("TSMethodSignature",e,t)}function assertTSIndexSignature(e,t){assert("TSIndexSignature",e,t)}function assertTSAnyKeyword(e,t){assert("TSAnyKeyword",e,t)}function assertTSBooleanKeyword(e,t){assert("TSBooleanKeyword",e,t)}function assertTSBigIntKeyword(e,t){assert("TSBigIntKeyword",e,t)}function assertTSIntrinsicKeyword(e,t){assert("TSIntrinsicKeyword",e,t)}function assertTSNeverKeyword(e,t){assert("TSNeverKeyword",e,t)}function assertTSNullKeyword(e,t){assert("TSNullKeyword",e,t)}function assertTSNumberKeyword(e,t){assert("TSNumberKeyword",e,t)}function assertTSObjectKeyword(e,t){assert("TSObjectKeyword",e,t)}function assertTSStringKeyword(e,t){assert("TSStringKeyword",e,t)}function assertTSSymbolKeyword(e,t){assert("TSSymbolKeyword",e,t)}function assertTSUndefinedKeyword(e,t){assert("TSUndefinedKeyword",e,t)}function assertTSUnknownKeyword(e,t){assert("TSUnknownKeyword",e,t)}function assertTSVoidKeyword(e,t){assert("TSVoidKeyword",e,t)}function assertTSThisType(e,t){assert("TSThisType",e,t)}function assertTSFunctionType(e,t){assert("TSFunctionType",e,t)}function assertTSConstructorType(e,t){assert("TSConstructorType",e,t)}function assertTSTypeReference(e,t){assert("TSTypeReference",e,t)}function assertTSTypePredicate(e,t){assert("TSTypePredicate",e,t)}function assertTSTypeQuery(e,t){assert("TSTypeQuery",e,t)}function assertTSTypeLiteral(e,t){assert("TSTypeLiteral",e,t)}function assertTSArrayType(e,t){assert("TSArrayType",e,t)}function assertTSTupleType(e,t){assert("TSTupleType",e,t)}function assertTSOptionalType(e,t){assert("TSOptionalType",e,t)}function assertTSRestType(e,t){assert("TSRestType",e,t)}function assertTSNamedTupleMember(e,t){assert("TSNamedTupleMember",e,t)}function assertTSUnionType(e,t){assert("TSUnionType",e,t)}function assertTSIntersectionType(e,t){assert("TSIntersectionType",e,t)}function assertTSConditionalType(e,t){assert("TSConditionalType",e,t)}function assertTSInferType(e,t){assert("TSInferType",e,t)}function assertTSParenthesizedType(e,t){assert("TSParenthesizedType",e,t)}function assertTSTypeOperator(e,t){assert("TSTypeOperator",e,t)}function assertTSIndexedAccessType(e,t){assert("TSIndexedAccessType",e,t)}function assertTSMappedType(e,t){assert("TSMappedType",e,t)}function assertTSLiteralType(e,t){assert("TSLiteralType",e,t)}function assertTSExpressionWithTypeArguments(e,t){assert("TSExpressionWithTypeArguments",e,t)}function assertTSInterfaceDeclaration(e,t){assert("TSInterfaceDeclaration",e,t)}function assertTSInterfaceBody(e,t){assert("TSInterfaceBody",e,t)}function assertTSTypeAliasDeclaration(e,t){assert("TSTypeAliasDeclaration",e,t)}function assertTSAsExpression(e,t){assert("TSAsExpression",e,t)}function assertTSTypeAssertion(e,t){assert("TSTypeAssertion",e,t)}function assertTSEnumDeclaration(e,t){assert("TSEnumDeclaration",e,t)}function assertTSEnumMember(e,t){assert("TSEnumMember",e,t)}function assertTSModuleDeclaration(e,t){assert("TSModuleDeclaration",e,t)}function assertTSModuleBlock(e,t){assert("TSModuleBlock",e,t)}function assertTSImportType(e,t){assert("TSImportType",e,t)}function assertTSImportEqualsDeclaration(e,t){assert("TSImportEqualsDeclaration",e,t)}function assertTSExternalModuleReference(e,t){assert("TSExternalModuleReference",e,t)}function assertTSNonNullExpression(e,t){assert("TSNonNullExpression",e,t)}function assertTSExportAssignment(e,t){assert("TSExportAssignment",e,t)}function assertTSNamespaceExportDeclaration(e,t){assert("TSNamespaceExportDeclaration",e,t)}function assertTSTypeAnnotation(e,t){assert("TSTypeAnnotation",e,t)}function assertTSTypeParameterInstantiation(e,t){assert("TSTypeParameterInstantiation",e,t)}function assertTSTypeParameterDeclaration(e,t){assert("TSTypeParameterDeclaration",e,t)}function assertTSTypeParameter(e,t){assert("TSTypeParameter",e,t)}function assertExpression(e,t){assert("Expression",e,t)}function assertBinary(e,t){assert("Binary",e,t)}function assertScopable(e,t){assert("Scopable",e,t)}function assertBlockParent(e,t){assert("BlockParent",e,t)}function assertBlock(e,t){assert("Block",e,t)}function assertStatement(e,t){assert("Statement",e,t)}function assertTerminatorless(e,t){assert("Terminatorless",e,t)}function assertCompletionStatement(e,t){assert("CompletionStatement",e,t)}function assertConditional(e,t){assert("Conditional",e,t)}function assertLoop(e,t){assert("Loop",e,t)}function assertWhile(e,t){assert("While",e,t)}function assertExpressionWrapper(e,t){assert("ExpressionWrapper",e,t)}function assertFor(e,t){assert("For",e,t)}function assertForXStatement(e,t){assert("ForXStatement",e,t)}function assertFunction(e,t){assert("Function",e,t)}function assertFunctionParent(e,t){assert("FunctionParent",e,t)}function assertPureish(e,t){assert("Pureish",e,t)}function assertDeclaration(e,t){assert("Declaration",e,t)}function assertPatternLike(e,t){assert("PatternLike",e,t)}function assertLVal(e,t){assert("LVal",e,t)}function assertTSEntityName(e,t){assert("TSEntityName",e,t)}function assertLiteral(e,t){assert("Literal",e,t)}function assertImmutable(e,t){assert("Immutable",e,t)}function assertUserWhitespacable(e,t){assert("UserWhitespacable",e,t)}function assertMethod(e,t){assert("Method",e,t)}function assertObjectMember(e,t){assert("ObjectMember",e,t)}function assertProperty(e,t){assert("Property",e,t)}function assertUnaryLike(e,t){assert("UnaryLike",e,t)}function assertPattern(e,t){assert("Pattern",e,t)}function assertClass(e,t){assert("Class",e,t)}function assertModuleDeclaration(e,t){assert("ModuleDeclaration",e,t)}function assertExportDeclaration(e,t){assert("ExportDeclaration",e,t)}function assertModuleSpecifier(e,t){assert("ModuleSpecifier",e,t)}function assertFlow(e,t){assert("Flow",e,t)}function assertFlowType(e,t){assert("FlowType",e,t)}function assertFlowBaseAnnotation(e,t){assert("FlowBaseAnnotation",e,t)}function assertFlowDeclaration(e,t){assert("FlowDeclaration",e,t)}function assertFlowPredicate(e,t){assert("FlowPredicate",e,t)}function assertEnumBody(e,t){assert("EnumBody",e,t)}function assertEnumMember(e,t){assert("EnumMember",e,t)}function assertJSX(e,t){assert("JSX",e,t)}function assertPrivate(e,t){assert("Private",e,t)}function assertTSTypeElement(e,t){assert("TSTypeElement",e,t)}function assertTSType(e,t){assert("TSType",e,t)}function assertTSBaseType(e,t){assert("TSBaseType",e,t)}function assertNumberLiteral(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral");assert("NumberLiteral",e,t)}function assertRegexLiteral(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");assert("RegexLiteral",e,t)}function assertRestProperty(e,t){console.trace("The node type RestProperty has been renamed to RestElement");assert("RestProperty",e,t)}function assertSpreadProperty(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement");assert("SpreadProperty",e,t)}},5416:()=>{},59281:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=builder;var s=_interopRequireDefault(r(31471));var n=r(74098);var a=_interopRequireDefault(r(81236));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function builder(e,...t){const r=n.BUILDER_KEYS[e];const i=t.length;if(i>r.length){throw new Error(`${e}: Too many arguments passed. Received ${i} but can receive no more than ${r.length}`)}const o={type:e};let l=0;r.forEach(r=>{const a=n.NODE_FIELDS[e][r];let u;if(l{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=createFlowUnionType;var s=r(35093);var n=_interopRequireDefault(r(77523));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function createFlowUnionType(e){const t=(0,n.default)(e);if(t.length===1){return t[0]}else{return(0,s.unionTypeAnnotation)(t)}}},52989:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=createTypeAnnotationBasedOnTypeof;var s=r(35093);function createTypeAnnotationBasedOnTypeof(e){if(e==="string"){return(0,s.stringTypeAnnotation)()}else if(e==="number"){return(0,s.numberTypeAnnotation)()}else if(e==="undefined"){return(0,s.voidTypeAnnotation)()}else if(e==="boolean"){return(0,s.booleanTypeAnnotation)()}else if(e==="function"){return(0,s.genericTypeAnnotation)((0,s.identifier)("Function"))}else if(e==="object"){return(0,s.genericTypeAnnotation)((0,s.identifier)("Object"))}else if(e==="symbol"){return(0,s.genericTypeAnnotation)((0,s.identifier)("Symbol"))}else{throw new Error("Invalid typeof value")}}},35093:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.arrayExpression=arrayExpression;t.assignmentExpression=assignmentExpression;t.binaryExpression=binaryExpression;t.interpreterDirective=interpreterDirective;t.directive=directive;t.directiveLiteral=directiveLiteral;t.blockStatement=blockStatement;t.breakStatement=breakStatement;t.callExpression=callExpression;t.catchClause=catchClause;t.conditionalExpression=conditionalExpression;t.continueStatement=continueStatement;t.debuggerStatement=debuggerStatement;t.doWhileStatement=doWhileStatement;t.emptyStatement=emptyStatement;t.expressionStatement=expressionStatement;t.file=file;t.forInStatement=forInStatement;t.forStatement=forStatement;t.functionDeclaration=functionDeclaration;t.functionExpression=functionExpression;t.identifier=identifier;t.ifStatement=ifStatement;t.labeledStatement=labeledStatement;t.stringLiteral=stringLiteral;t.numericLiteral=numericLiteral;t.nullLiteral=nullLiteral;t.booleanLiteral=booleanLiteral;t.regExpLiteral=regExpLiteral;t.logicalExpression=logicalExpression;t.memberExpression=memberExpression;t.newExpression=newExpression;t.program=program;t.objectExpression=objectExpression;t.objectMethod=objectMethod;t.objectProperty=objectProperty;t.restElement=restElement;t.returnStatement=returnStatement;t.sequenceExpression=sequenceExpression;t.parenthesizedExpression=parenthesizedExpression;t.switchCase=switchCase;t.switchStatement=switchStatement;t.thisExpression=thisExpression;t.throwStatement=throwStatement;t.tryStatement=tryStatement;t.unaryExpression=unaryExpression;t.updateExpression=updateExpression;t.variableDeclaration=variableDeclaration;t.variableDeclarator=variableDeclarator;t.whileStatement=whileStatement;t.withStatement=withStatement;t.assignmentPattern=assignmentPattern;t.arrayPattern=arrayPattern;t.arrowFunctionExpression=arrowFunctionExpression;t.classBody=classBody;t.classExpression=classExpression;t.classDeclaration=classDeclaration;t.exportAllDeclaration=exportAllDeclaration;t.exportDefaultDeclaration=exportDefaultDeclaration;t.exportNamedDeclaration=exportNamedDeclaration;t.exportSpecifier=exportSpecifier;t.forOfStatement=forOfStatement;t.importDeclaration=importDeclaration;t.importDefaultSpecifier=importDefaultSpecifier;t.importNamespaceSpecifier=importNamespaceSpecifier;t.importSpecifier=importSpecifier;t.metaProperty=metaProperty;t.classMethod=classMethod;t.objectPattern=objectPattern;t.spreadElement=spreadElement;t.super=_super;t.taggedTemplateExpression=taggedTemplateExpression;t.templateElement=templateElement;t.templateLiteral=templateLiteral;t.yieldExpression=yieldExpression;t.awaitExpression=awaitExpression;t.import=_import;t.bigIntLiteral=bigIntLiteral;t.exportNamespaceSpecifier=exportNamespaceSpecifier;t.optionalMemberExpression=optionalMemberExpression;t.optionalCallExpression=optionalCallExpression;t.anyTypeAnnotation=anyTypeAnnotation;t.arrayTypeAnnotation=arrayTypeAnnotation;t.booleanTypeAnnotation=booleanTypeAnnotation;t.booleanLiteralTypeAnnotation=booleanLiteralTypeAnnotation;t.nullLiteralTypeAnnotation=nullLiteralTypeAnnotation;t.classImplements=classImplements;t.declareClass=declareClass;t.declareFunction=declareFunction;t.declareInterface=declareInterface;t.declareModule=declareModule;t.declareModuleExports=declareModuleExports;t.declareTypeAlias=declareTypeAlias;t.declareOpaqueType=declareOpaqueType;t.declareVariable=declareVariable;t.declareExportDeclaration=declareExportDeclaration;t.declareExportAllDeclaration=declareExportAllDeclaration;t.declaredPredicate=declaredPredicate;t.existsTypeAnnotation=existsTypeAnnotation;t.functionTypeAnnotation=functionTypeAnnotation;t.functionTypeParam=functionTypeParam;t.genericTypeAnnotation=genericTypeAnnotation;t.inferredPredicate=inferredPredicate;t.interfaceExtends=interfaceExtends;t.interfaceDeclaration=interfaceDeclaration;t.interfaceTypeAnnotation=interfaceTypeAnnotation;t.intersectionTypeAnnotation=intersectionTypeAnnotation;t.mixedTypeAnnotation=mixedTypeAnnotation;t.emptyTypeAnnotation=emptyTypeAnnotation;t.nullableTypeAnnotation=nullableTypeAnnotation;t.numberLiteralTypeAnnotation=numberLiteralTypeAnnotation;t.numberTypeAnnotation=numberTypeAnnotation;t.objectTypeAnnotation=objectTypeAnnotation;t.objectTypeInternalSlot=objectTypeInternalSlot;t.objectTypeCallProperty=objectTypeCallProperty;t.objectTypeIndexer=objectTypeIndexer;t.objectTypeProperty=objectTypeProperty;t.objectTypeSpreadProperty=objectTypeSpreadProperty;t.opaqueType=opaqueType;t.qualifiedTypeIdentifier=qualifiedTypeIdentifier;t.stringLiteralTypeAnnotation=stringLiteralTypeAnnotation;t.stringTypeAnnotation=stringTypeAnnotation;t.symbolTypeAnnotation=symbolTypeAnnotation;t.thisTypeAnnotation=thisTypeAnnotation;t.tupleTypeAnnotation=tupleTypeAnnotation;t.typeofTypeAnnotation=typeofTypeAnnotation;t.typeAlias=typeAlias;t.typeAnnotation=typeAnnotation;t.typeCastExpression=typeCastExpression;t.typeParameter=typeParameter;t.typeParameterDeclaration=typeParameterDeclaration;t.typeParameterInstantiation=typeParameterInstantiation;t.unionTypeAnnotation=unionTypeAnnotation;t.variance=variance;t.voidTypeAnnotation=voidTypeAnnotation;t.enumDeclaration=enumDeclaration;t.enumBooleanBody=enumBooleanBody;t.enumNumberBody=enumNumberBody;t.enumStringBody=enumStringBody;t.enumSymbolBody=enumSymbolBody;t.enumBooleanMember=enumBooleanMember;t.enumNumberMember=enumNumberMember;t.enumStringMember=enumStringMember;t.enumDefaultedMember=enumDefaultedMember;t.jSXAttribute=t.jsxAttribute=jsxAttribute;t.jSXClosingElement=t.jsxClosingElement=jsxClosingElement;t.jSXElement=t.jsxElement=jsxElement;t.jSXEmptyExpression=t.jsxEmptyExpression=jsxEmptyExpression;t.jSXExpressionContainer=t.jsxExpressionContainer=jsxExpressionContainer;t.jSXSpreadChild=t.jsxSpreadChild=jsxSpreadChild;t.jSXIdentifier=t.jsxIdentifier=jsxIdentifier;t.jSXMemberExpression=t.jsxMemberExpression=jsxMemberExpression;t.jSXNamespacedName=t.jsxNamespacedName=jsxNamespacedName;t.jSXOpeningElement=t.jsxOpeningElement=jsxOpeningElement;t.jSXSpreadAttribute=t.jsxSpreadAttribute=jsxSpreadAttribute;t.jSXText=t.jsxText=jsxText;t.jSXFragment=t.jsxFragment=jsxFragment;t.jSXOpeningFragment=t.jsxOpeningFragment=jsxOpeningFragment;t.jSXClosingFragment=t.jsxClosingFragment=jsxClosingFragment;t.noop=noop;t.placeholder=placeholder;t.v8IntrinsicIdentifier=v8IntrinsicIdentifier;t.argumentPlaceholder=argumentPlaceholder;t.bindExpression=bindExpression;t.classProperty=classProperty;t.pipelineTopicExpression=pipelineTopicExpression;t.pipelineBareFunction=pipelineBareFunction;t.pipelinePrimaryTopicReference=pipelinePrimaryTopicReference;t.classPrivateProperty=classPrivateProperty;t.classPrivateMethod=classPrivateMethod;t.importAttribute=importAttribute;t.decorator=decorator;t.doExpression=doExpression;t.exportDefaultSpecifier=exportDefaultSpecifier;t.privateName=privateName;t.recordExpression=recordExpression;t.tupleExpression=tupleExpression;t.decimalLiteral=decimalLiteral;t.staticBlock=staticBlock;t.tSParameterProperty=t.tsParameterProperty=tsParameterProperty;t.tSDeclareFunction=t.tsDeclareFunction=tsDeclareFunction;t.tSDeclareMethod=t.tsDeclareMethod=tsDeclareMethod;t.tSQualifiedName=t.tsQualifiedName=tsQualifiedName;t.tSCallSignatureDeclaration=t.tsCallSignatureDeclaration=tsCallSignatureDeclaration;t.tSConstructSignatureDeclaration=t.tsConstructSignatureDeclaration=tsConstructSignatureDeclaration;t.tSPropertySignature=t.tsPropertySignature=tsPropertySignature;t.tSMethodSignature=t.tsMethodSignature=tsMethodSignature;t.tSIndexSignature=t.tsIndexSignature=tsIndexSignature;t.tSAnyKeyword=t.tsAnyKeyword=tsAnyKeyword;t.tSBooleanKeyword=t.tsBooleanKeyword=tsBooleanKeyword;t.tSBigIntKeyword=t.tsBigIntKeyword=tsBigIntKeyword;t.tSIntrinsicKeyword=t.tsIntrinsicKeyword=tsIntrinsicKeyword;t.tSNeverKeyword=t.tsNeverKeyword=tsNeverKeyword;t.tSNullKeyword=t.tsNullKeyword=tsNullKeyword;t.tSNumberKeyword=t.tsNumberKeyword=tsNumberKeyword;t.tSObjectKeyword=t.tsObjectKeyword=tsObjectKeyword;t.tSStringKeyword=t.tsStringKeyword=tsStringKeyword;t.tSSymbolKeyword=t.tsSymbolKeyword=tsSymbolKeyword;t.tSUndefinedKeyword=t.tsUndefinedKeyword=tsUndefinedKeyword;t.tSUnknownKeyword=t.tsUnknownKeyword=tsUnknownKeyword;t.tSVoidKeyword=t.tsVoidKeyword=tsVoidKeyword;t.tSThisType=t.tsThisType=tsThisType;t.tSFunctionType=t.tsFunctionType=tsFunctionType;t.tSConstructorType=t.tsConstructorType=tsConstructorType;t.tSTypeReference=t.tsTypeReference=tsTypeReference;t.tSTypePredicate=t.tsTypePredicate=tsTypePredicate;t.tSTypeQuery=t.tsTypeQuery=tsTypeQuery;t.tSTypeLiteral=t.tsTypeLiteral=tsTypeLiteral;t.tSArrayType=t.tsArrayType=tsArrayType;t.tSTupleType=t.tsTupleType=tsTupleType;t.tSOptionalType=t.tsOptionalType=tsOptionalType;t.tSRestType=t.tsRestType=tsRestType;t.tSNamedTupleMember=t.tsNamedTupleMember=tsNamedTupleMember;t.tSUnionType=t.tsUnionType=tsUnionType;t.tSIntersectionType=t.tsIntersectionType=tsIntersectionType;t.tSConditionalType=t.tsConditionalType=tsConditionalType;t.tSInferType=t.tsInferType=tsInferType;t.tSParenthesizedType=t.tsParenthesizedType=tsParenthesizedType;t.tSTypeOperator=t.tsTypeOperator=tsTypeOperator;t.tSIndexedAccessType=t.tsIndexedAccessType=tsIndexedAccessType;t.tSMappedType=t.tsMappedType=tsMappedType;t.tSLiteralType=t.tsLiteralType=tsLiteralType;t.tSExpressionWithTypeArguments=t.tsExpressionWithTypeArguments=tsExpressionWithTypeArguments;t.tSInterfaceDeclaration=t.tsInterfaceDeclaration=tsInterfaceDeclaration;t.tSInterfaceBody=t.tsInterfaceBody=tsInterfaceBody;t.tSTypeAliasDeclaration=t.tsTypeAliasDeclaration=tsTypeAliasDeclaration;t.tSAsExpression=t.tsAsExpression=tsAsExpression;t.tSTypeAssertion=t.tsTypeAssertion=tsTypeAssertion;t.tSEnumDeclaration=t.tsEnumDeclaration=tsEnumDeclaration;t.tSEnumMember=t.tsEnumMember=tsEnumMember;t.tSModuleDeclaration=t.tsModuleDeclaration=tsModuleDeclaration;t.tSModuleBlock=t.tsModuleBlock=tsModuleBlock;t.tSImportType=t.tsImportType=tsImportType;t.tSImportEqualsDeclaration=t.tsImportEqualsDeclaration=tsImportEqualsDeclaration;t.tSExternalModuleReference=t.tsExternalModuleReference=tsExternalModuleReference;t.tSNonNullExpression=t.tsNonNullExpression=tsNonNullExpression;t.tSExportAssignment=t.tsExportAssignment=tsExportAssignment;t.tSNamespaceExportDeclaration=t.tsNamespaceExportDeclaration=tsNamespaceExportDeclaration;t.tSTypeAnnotation=t.tsTypeAnnotation=tsTypeAnnotation;t.tSTypeParameterInstantiation=t.tsTypeParameterInstantiation=tsTypeParameterInstantiation;t.tSTypeParameterDeclaration=t.tsTypeParameterDeclaration=tsTypeParameterDeclaration;t.tSTypeParameter=t.tsTypeParameter=tsTypeParameter;t.numberLiteral=NumberLiteral;t.regexLiteral=RegexLiteral;t.restProperty=RestProperty;t.spreadProperty=SpreadProperty;var s=_interopRequireDefault(r(59281));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function arrayExpression(e){return(0,s.default)("ArrayExpression",...arguments)}function assignmentExpression(e,t,r){return(0,s.default)("AssignmentExpression",...arguments)}function binaryExpression(e,t,r){return(0,s.default)("BinaryExpression",...arguments)}function interpreterDirective(e){return(0,s.default)("InterpreterDirective",...arguments)}function directive(e){return(0,s.default)("Directive",...arguments)}function directiveLiteral(e){return(0,s.default)("DirectiveLiteral",...arguments)}function blockStatement(e,t){return(0,s.default)("BlockStatement",...arguments)}function breakStatement(e){return(0,s.default)("BreakStatement",...arguments)}function callExpression(e,t){return(0,s.default)("CallExpression",...arguments)}function catchClause(e,t){return(0,s.default)("CatchClause",...arguments)}function conditionalExpression(e,t,r){return(0,s.default)("ConditionalExpression",...arguments)}function continueStatement(e){return(0,s.default)("ContinueStatement",...arguments)}function debuggerStatement(){return(0,s.default)("DebuggerStatement",...arguments)}function doWhileStatement(e,t){return(0,s.default)("DoWhileStatement",...arguments)}function emptyStatement(){return(0,s.default)("EmptyStatement",...arguments)}function expressionStatement(e){return(0,s.default)("ExpressionStatement",...arguments)}function file(e,t,r){return(0,s.default)("File",...arguments)}function forInStatement(e,t,r){return(0,s.default)("ForInStatement",...arguments)}function forStatement(e,t,r,n){return(0,s.default)("ForStatement",...arguments)}function functionDeclaration(e,t,r,n,a){return(0,s.default)("FunctionDeclaration",...arguments)}function functionExpression(e,t,r,n,a){return(0,s.default)("FunctionExpression",...arguments)}function identifier(e){return(0,s.default)("Identifier",...arguments)}function ifStatement(e,t,r){return(0,s.default)("IfStatement",...arguments)}function labeledStatement(e,t){return(0,s.default)("LabeledStatement",...arguments)}function stringLiteral(e){return(0,s.default)("StringLiteral",...arguments)}function numericLiteral(e){return(0,s.default)("NumericLiteral",...arguments)}function nullLiteral(){return(0,s.default)("NullLiteral",...arguments)}function booleanLiteral(e){return(0,s.default)("BooleanLiteral",...arguments)}function regExpLiteral(e,t){return(0,s.default)("RegExpLiteral",...arguments)}function logicalExpression(e,t,r){return(0,s.default)("LogicalExpression",...arguments)}function memberExpression(e,t,r,n){return(0,s.default)("MemberExpression",...arguments)}function newExpression(e,t){return(0,s.default)("NewExpression",...arguments)}function program(e,t,r,n){return(0,s.default)("Program",...arguments)}function objectExpression(e){return(0,s.default)("ObjectExpression",...arguments)}function objectMethod(e,t,r,n,a,i,o){return(0,s.default)("ObjectMethod",...arguments)}function objectProperty(e,t,r,n,a){return(0,s.default)("ObjectProperty",...arguments)}function restElement(e){return(0,s.default)("RestElement",...arguments)}function returnStatement(e){return(0,s.default)("ReturnStatement",...arguments)}function sequenceExpression(e){return(0,s.default)("SequenceExpression",...arguments)}function parenthesizedExpression(e){return(0,s.default)("ParenthesizedExpression",...arguments)}function switchCase(e,t){return(0,s.default)("SwitchCase",...arguments)}function switchStatement(e,t){return(0,s.default)("SwitchStatement",...arguments)}function thisExpression(){return(0,s.default)("ThisExpression",...arguments)}function throwStatement(e){return(0,s.default)("ThrowStatement",...arguments)}function tryStatement(e,t,r){return(0,s.default)("TryStatement",...arguments)}function unaryExpression(e,t,r){return(0,s.default)("UnaryExpression",...arguments)}function updateExpression(e,t,r){return(0,s.default)("UpdateExpression",...arguments)}function variableDeclaration(e,t){return(0,s.default)("VariableDeclaration",...arguments)}function variableDeclarator(e,t){return(0,s.default)("VariableDeclarator",...arguments)}function whileStatement(e,t){return(0,s.default)("WhileStatement",...arguments)}function withStatement(e,t){return(0,s.default)("WithStatement",...arguments)}function assignmentPattern(e,t){return(0,s.default)("AssignmentPattern",...arguments)}function arrayPattern(e){return(0,s.default)("ArrayPattern",...arguments)}function arrowFunctionExpression(e,t,r){return(0,s.default)("ArrowFunctionExpression",...arguments)}function classBody(e){return(0,s.default)("ClassBody",...arguments)}function classExpression(e,t,r,n){return(0,s.default)("ClassExpression",...arguments)}function classDeclaration(e,t,r,n){return(0,s.default)("ClassDeclaration",...arguments)}function exportAllDeclaration(e){return(0,s.default)("ExportAllDeclaration",...arguments)}function exportDefaultDeclaration(e){return(0,s.default)("ExportDefaultDeclaration",...arguments)}function exportNamedDeclaration(e,t,r){return(0,s.default)("ExportNamedDeclaration",...arguments)}function exportSpecifier(e,t){return(0,s.default)("ExportSpecifier",...arguments)}function forOfStatement(e,t,r,n){return(0,s.default)("ForOfStatement",...arguments)}function importDeclaration(e,t){return(0,s.default)("ImportDeclaration",...arguments)}function importDefaultSpecifier(e){return(0,s.default)("ImportDefaultSpecifier",...arguments)}function importNamespaceSpecifier(e){return(0,s.default)("ImportNamespaceSpecifier",...arguments)}function importSpecifier(e,t){return(0,s.default)("ImportSpecifier",...arguments)}function metaProperty(e,t){return(0,s.default)("MetaProperty",...arguments)}function classMethod(e,t,r,n,a,i,o,l){return(0,s.default)("ClassMethod",...arguments)}function objectPattern(e){return(0,s.default)("ObjectPattern",...arguments)}function spreadElement(e){return(0,s.default)("SpreadElement",...arguments)}function _super(){return(0,s.default)("Super",...arguments)}function taggedTemplateExpression(e,t){return(0,s.default)("TaggedTemplateExpression",...arguments)}function templateElement(e,t){return(0,s.default)("TemplateElement",...arguments)}function templateLiteral(e,t){return(0,s.default)("TemplateLiteral",...arguments)}function yieldExpression(e,t){return(0,s.default)("YieldExpression",...arguments)}function awaitExpression(e){return(0,s.default)("AwaitExpression",...arguments)}function _import(){return(0,s.default)("Import",...arguments)}function bigIntLiteral(e){return(0,s.default)("BigIntLiteral",...arguments)}function exportNamespaceSpecifier(e){return(0,s.default)("ExportNamespaceSpecifier",...arguments)}function optionalMemberExpression(e,t,r,n){return(0,s.default)("OptionalMemberExpression",...arguments)}function optionalCallExpression(e,t,r){return(0,s.default)("OptionalCallExpression",...arguments)}function anyTypeAnnotation(){return(0,s.default)("AnyTypeAnnotation",...arguments)}function arrayTypeAnnotation(e){return(0,s.default)("ArrayTypeAnnotation",...arguments)}function booleanTypeAnnotation(){return(0,s.default)("BooleanTypeAnnotation",...arguments)}function booleanLiteralTypeAnnotation(e){return(0,s.default)("BooleanLiteralTypeAnnotation",...arguments)}function nullLiteralTypeAnnotation(){return(0,s.default)("NullLiteralTypeAnnotation",...arguments)}function classImplements(e,t){return(0,s.default)("ClassImplements",...arguments)}function declareClass(e,t,r,n){return(0,s.default)("DeclareClass",...arguments)}function declareFunction(e){return(0,s.default)("DeclareFunction",...arguments)}function declareInterface(e,t,r,n){return(0,s.default)("DeclareInterface",...arguments)}function declareModule(e,t,r){return(0,s.default)("DeclareModule",...arguments)}function declareModuleExports(e){return(0,s.default)("DeclareModuleExports",...arguments)}function declareTypeAlias(e,t,r){return(0,s.default)("DeclareTypeAlias",...arguments)}function declareOpaqueType(e,t,r){return(0,s.default)("DeclareOpaqueType",...arguments)}function declareVariable(e){return(0,s.default)("DeclareVariable",...arguments)}function declareExportDeclaration(e,t,r){return(0,s.default)("DeclareExportDeclaration",...arguments)}function declareExportAllDeclaration(e){return(0,s.default)("DeclareExportAllDeclaration",...arguments)}function declaredPredicate(e){return(0,s.default)("DeclaredPredicate",...arguments)}function existsTypeAnnotation(){return(0,s.default)("ExistsTypeAnnotation",...arguments)}function functionTypeAnnotation(e,t,r,n){return(0,s.default)("FunctionTypeAnnotation",...arguments)}function functionTypeParam(e,t){return(0,s.default)("FunctionTypeParam",...arguments)}function genericTypeAnnotation(e,t){return(0,s.default)("GenericTypeAnnotation",...arguments)}function inferredPredicate(){return(0,s.default)("InferredPredicate",...arguments)}function interfaceExtends(e,t){return(0,s.default)("InterfaceExtends",...arguments)}function interfaceDeclaration(e,t,r,n){return(0,s.default)("InterfaceDeclaration",...arguments)}function interfaceTypeAnnotation(e,t){return(0,s.default)("InterfaceTypeAnnotation",...arguments)}function intersectionTypeAnnotation(e){return(0,s.default)("IntersectionTypeAnnotation",...arguments)}function mixedTypeAnnotation(){return(0,s.default)("MixedTypeAnnotation",...arguments)}function emptyTypeAnnotation(){return(0,s.default)("EmptyTypeAnnotation",...arguments)}function nullableTypeAnnotation(e){return(0,s.default)("NullableTypeAnnotation",...arguments)}function numberLiteralTypeAnnotation(e){return(0,s.default)("NumberLiteralTypeAnnotation",...arguments)}function numberTypeAnnotation(){return(0,s.default)("NumberTypeAnnotation",...arguments)}function objectTypeAnnotation(e,t,r,n,a){return(0,s.default)("ObjectTypeAnnotation",...arguments)}function objectTypeInternalSlot(e,t,r,n,a){return(0,s.default)("ObjectTypeInternalSlot",...arguments)}function objectTypeCallProperty(e){return(0,s.default)("ObjectTypeCallProperty",...arguments)}function objectTypeIndexer(e,t,r,n){return(0,s.default)("ObjectTypeIndexer",...arguments)}function objectTypeProperty(e,t,r){return(0,s.default)("ObjectTypeProperty",...arguments)}function objectTypeSpreadProperty(e){return(0,s.default)("ObjectTypeSpreadProperty",...arguments)}function opaqueType(e,t,r,n){return(0,s.default)("OpaqueType",...arguments)}function qualifiedTypeIdentifier(e,t){return(0,s.default)("QualifiedTypeIdentifier",...arguments)}function stringLiteralTypeAnnotation(e){return(0,s.default)("StringLiteralTypeAnnotation",...arguments)}function stringTypeAnnotation(){return(0,s.default)("StringTypeAnnotation",...arguments)}function symbolTypeAnnotation(){return(0,s.default)("SymbolTypeAnnotation",...arguments)}function thisTypeAnnotation(){return(0,s.default)("ThisTypeAnnotation",...arguments)}function tupleTypeAnnotation(e){return(0,s.default)("TupleTypeAnnotation",...arguments)}function typeofTypeAnnotation(e){return(0,s.default)("TypeofTypeAnnotation",...arguments)}function typeAlias(e,t,r){return(0,s.default)("TypeAlias",...arguments)}function typeAnnotation(e){return(0,s.default)("TypeAnnotation",...arguments)}function typeCastExpression(e,t){return(0,s.default)("TypeCastExpression",...arguments)}function typeParameter(e,t,r){return(0,s.default)("TypeParameter",...arguments)}function typeParameterDeclaration(e){return(0,s.default)("TypeParameterDeclaration",...arguments)}function typeParameterInstantiation(e){return(0,s.default)("TypeParameterInstantiation",...arguments)}function unionTypeAnnotation(e){return(0,s.default)("UnionTypeAnnotation",...arguments)}function variance(e){return(0,s.default)("Variance",...arguments)}function voidTypeAnnotation(){return(0,s.default)("VoidTypeAnnotation",...arguments)}function enumDeclaration(e,t){return(0,s.default)("EnumDeclaration",...arguments)}function enumBooleanBody(e){return(0,s.default)("EnumBooleanBody",...arguments)}function enumNumberBody(e){return(0,s.default)("EnumNumberBody",...arguments)}function enumStringBody(e){return(0,s.default)("EnumStringBody",...arguments)}function enumSymbolBody(e){return(0,s.default)("EnumSymbolBody",...arguments)}function enumBooleanMember(e){return(0,s.default)("EnumBooleanMember",...arguments)}function enumNumberMember(e,t){return(0,s.default)("EnumNumberMember",...arguments)}function enumStringMember(e,t){return(0,s.default)("EnumStringMember",...arguments)}function enumDefaultedMember(e){return(0,s.default)("EnumDefaultedMember",...arguments)}function jsxAttribute(e,t){return(0,s.default)("JSXAttribute",...arguments)}function jsxClosingElement(e){return(0,s.default)("JSXClosingElement",...arguments)}function jsxElement(e,t,r,n){return(0,s.default)("JSXElement",...arguments)}function jsxEmptyExpression(){return(0,s.default)("JSXEmptyExpression",...arguments)}function jsxExpressionContainer(e){return(0,s.default)("JSXExpressionContainer",...arguments)}function jsxSpreadChild(e){return(0,s.default)("JSXSpreadChild",...arguments)}function jsxIdentifier(e){return(0,s.default)("JSXIdentifier",...arguments)}function jsxMemberExpression(e,t){return(0,s.default)("JSXMemberExpression",...arguments)}function jsxNamespacedName(e,t){return(0,s.default)("JSXNamespacedName",...arguments)}function jsxOpeningElement(e,t,r){return(0,s.default)("JSXOpeningElement",...arguments)}function jsxSpreadAttribute(e){return(0,s.default)("JSXSpreadAttribute",...arguments)}function jsxText(e){return(0,s.default)("JSXText",...arguments)}function jsxFragment(e,t,r){return(0,s.default)("JSXFragment",...arguments)}function jsxOpeningFragment(){return(0,s.default)("JSXOpeningFragment",...arguments)}function jsxClosingFragment(){return(0,s.default)("JSXClosingFragment",...arguments)}function noop(){return(0,s.default)("Noop",...arguments)}function placeholder(e,t){return(0,s.default)("Placeholder",...arguments)}function v8IntrinsicIdentifier(e){return(0,s.default)("V8IntrinsicIdentifier",...arguments)}function argumentPlaceholder(){return(0,s.default)("ArgumentPlaceholder",...arguments)}function bindExpression(e,t){return(0,s.default)("BindExpression",...arguments)}function classProperty(e,t,r,n,a,i){return(0,s.default)("ClassProperty",...arguments)}function pipelineTopicExpression(e){return(0,s.default)("PipelineTopicExpression",...arguments)}function pipelineBareFunction(e){return(0,s.default)("PipelineBareFunction",...arguments)}function pipelinePrimaryTopicReference(){return(0,s.default)("PipelinePrimaryTopicReference",...arguments)}function classPrivateProperty(e,t,r,n){return(0,s.default)("ClassPrivateProperty",...arguments)}function classPrivateMethod(e,t,r,n,a){return(0,s.default)("ClassPrivateMethod",...arguments)}function importAttribute(e,t){return(0,s.default)("ImportAttribute",...arguments)}function decorator(e){return(0,s.default)("Decorator",...arguments)}function doExpression(e){return(0,s.default)("DoExpression",...arguments)}function exportDefaultSpecifier(e){return(0,s.default)("ExportDefaultSpecifier",...arguments)}function privateName(e){return(0,s.default)("PrivateName",...arguments)}function recordExpression(e){return(0,s.default)("RecordExpression",...arguments)}function tupleExpression(e){return(0,s.default)("TupleExpression",...arguments)}function decimalLiteral(e){return(0,s.default)("DecimalLiteral",...arguments)}function staticBlock(e){return(0,s.default)("StaticBlock",...arguments)}function tsParameterProperty(e){return(0,s.default)("TSParameterProperty",...arguments)}function tsDeclareFunction(e,t,r,n){return(0,s.default)("TSDeclareFunction",...arguments)}function tsDeclareMethod(e,t,r,n,a){return(0,s.default)("TSDeclareMethod",...arguments)}function tsQualifiedName(e,t){return(0,s.default)("TSQualifiedName",...arguments)}function tsCallSignatureDeclaration(e,t,r){return(0,s.default)("TSCallSignatureDeclaration",...arguments)}function tsConstructSignatureDeclaration(e,t,r){return(0,s.default)("TSConstructSignatureDeclaration",...arguments)}function tsPropertySignature(e,t,r){return(0,s.default)("TSPropertySignature",...arguments)}function tsMethodSignature(e,t,r,n){return(0,s.default)("TSMethodSignature",...arguments)}function tsIndexSignature(e,t){return(0,s.default)("TSIndexSignature",...arguments)}function tsAnyKeyword(){return(0,s.default)("TSAnyKeyword",...arguments)}function tsBooleanKeyword(){return(0,s.default)("TSBooleanKeyword",...arguments)}function tsBigIntKeyword(){return(0,s.default)("TSBigIntKeyword",...arguments)}function tsIntrinsicKeyword(){return(0,s.default)("TSIntrinsicKeyword",...arguments)}function tsNeverKeyword(){return(0,s.default)("TSNeverKeyword",...arguments)}function tsNullKeyword(){return(0,s.default)("TSNullKeyword",...arguments)}function tsNumberKeyword(){return(0,s.default)("TSNumberKeyword",...arguments)}function tsObjectKeyword(){return(0,s.default)("TSObjectKeyword",...arguments)}function tsStringKeyword(){return(0,s.default)("TSStringKeyword",...arguments)}function tsSymbolKeyword(){return(0,s.default)("TSSymbolKeyword",...arguments)}function tsUndefinedKeyword(){return(0,s.default)("TSUndefinedKeyword",...arguments)}function tsUnknownKeyword(){return(0,s.default)("TSUnknownKeyword",...arguments)}function tsVoidKeyword(){return(0,s.default)("TSVoidKeyword",...arguments)}function tsThisType(){return(0,s.default)("TSThisType",...arguments)}function tsFunctionType(e,t,r){return(0,s.default)("TSFunctionType",...arguments)}function tsConstructorType(e,t,r){return(0,s.default)("TSConstructorType",...arguments)}function tsTypeReference(e,t){return(0,s.default)("TSTypeReference",...arguments)}function tsTypePredicate(e,t,r){return(0,s.default)("TSTypePredicate",...arguments)}function tsTypeQuery(e){return(0,s.default)("TSTypeQuery",...arguments)}function tsTypeLiteral(e){return(0,s.default)("TSTypeLiteral",...arguments)}function tsArrayType(e){return(0,s.default)("TSArrayType",...arguments)}function tsTupleType(e){return(0,s.default)("TSTupleType",...arguments)}function tsOptionalType(e){return(0,s.default)("TSOptionalType",...arguments)}function tsRestType(e){return(0,s.default)("TSRestType",...arguments)}function tsNamedTupleMember(e,t,r){return(0,s.default)("TSNamedTupleMember",...arguments)}function tsUnionType(e){return(0,s.default)("TSUnionType",...arguments)}function tsIntersectionType(e){return(0,s.default)("TSIntersectionType",...arguments)}function tsConditionalType(e,t,r,n){return(0,s.default)("TSConditionalType",...arguments)}function tsInferType(e){return(0,s.default)("TSInferType",...arguments)}function tsParenthesizedType(e){return(0,s.default)("TSParenthesizedType",...arguments)}function tsTypeOperator(e){return(0,s.default)("TSTypeOperator",...arguments)}function tsIndexedAccessType(e,t){return(0,s.default)("TSIndexedAccessType",...arguments)}function tsMappedType(e,t,r){return(0,s.default)("TSMappedType",...arguments)}function tsLiteralType(e){return(0,s.default)("TSLiteralType",...arguments)}function tsExpressionWithTypeArguments(e,t){return(0,s.default)("TSExpressionWithTypeArguments",...arguments)}function tsInterfaceDeclaration(e,t,r,n){return(0,s.default)("TSInterfaceDeclaration",...arguments)}function tsInterfaceBody(e){return(0,s.default)("TSInterfaceBody",...arguments)}function tsTypeAliasDeclaration(e,t,r){return(0,s.default)("TSTypeAliasDeclaration",...arguments)}function tsAsExpression(e,t){return(0,s.default)("TSAsExpression",...arguments)}function tsTypeAssertion(e,t){return(0,s.default)("TSTypeAssertion",...arguments)}function tsEnumDeclaration(e,t){return(0,s.default)("TSEnumDeclaration",...arguments)}function tsEnumMember(e,t){return(0,s.default)("TSEnumMember",...arguments)}function tsModuleDeclaration(e,t){return(0,s.default)("TSModuleDeclaration",...arguments)}function tsModuleBlock(e){return(0,s.default)("TSModuleBlock",...arguments)}function tsImportType(e,t,r){return(0,s.default)("TSImportType",...arguments)}function tsImportEqualsDeclaration(e,t){return(0,s.default)("TSImportEqualsDeclaration",...arguments)}function tsExternalModuleReference(e){return(0,s.default)("TSExternalModuleReference",...arguments)}function tsNonNullExpression(e){return(0,s.default)("TSNonNullExpression",...arguments)}function tsExportAssignment(e){return(0,s.default)("TSExportAssignment",...arguments)}function tsNamespaceExportDeclaration(e){return(0,s.default)("TSNamespaceExportDeclaration",...arguments)}function tsTypeAnnotation(e){return(0,s.default)("TSTypeAnnotation",...arguments)}function tsTypeParameterInstantiation(e){return(0,s.default)("TSTypeParameterInstantiation",...arguments)}function tsTypeParameterDeclaration(e){return(0,s.default)("TSTypeParameterDeclaration",...arguments)}function tsTypeParameter(e,t,r){return(0,s.default)("TSTypeParameter",...arguments)}function NumberLiteral(...e){console.trace("The node type NumberLiteral has been renamed to NumericLiteral");return(0,s.default)("NumberLiteral",...e)}function RegexLiteral(...e){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");return(0,s.default)("RegexLiteral",...e)}function RestProperty(...e){console.trace("The node type RestProperty has been renamed to RestElement");return(0,s.default)("RestProperty",...e)}function SpreadProperty(...e){console.trace("The node type SpreadProperty has been renamed to SpreadElement");return(0,s.default)("SpreadProperty",...e)}},1221:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"ArrayExpression",{enumerable:true,get:function(){return s.arrayExpression}});Object.defineProperty(t,"AssignmentExpression",{enumerable:true,get:function(){return s.assignmentExpression}});Object.defineProperty(t,"BinaryExpression",{enumerable:true,get:function(){return s.binaryExpression}});Object.defineProperty(t,"InterpreterDirective",{enumerable:true,get:function(){return s.interpreterDirective}});Object.defineProperty(t,"Directive",{enumerable:true,get:function(){return s.directive}});Object.defineProperty(t,"DirectiveLiteral",{enumerable:true,get:function(){return s.directiveLiteral}});Object.defineProperty(t,"BlockStatement",{enumerable:true,get:function(){return s.blockStatement}});Object.defineProperty(t,"BreakStatement",{enumerable:true,get:function(){return s.breakStatement}});Object.defineProperty(t,"CallExpression",{enumerable:true,get:function(){return s.callExpression}});Object.defineProperty(t,"CatchClause",{enumerable:true,get:function(){return s.catchClause}});Object.defineProperty(t,"ConditionalExpression",{enumerable:true,get:function(){return s.conditionalExpression}});Object.defineProperty(t,"ContinueStatement",{enumerable:true,get:function(){return s.continueStatement}});Object.defineProperty(t,"DebuggerStatement",{enumerable:true,get:function(){return s.debuggerStatement}});Object.defineProperty(t,"DoWhileStatement",{enumerable:true,get:function(){return s.doWhileStatement}});Object.defineProperty(t,"EmptyStatement",{enumerable:true,get:function(){return s.emptyStatement}});Object.defineProperty(t,"ExpressionStatement",{enumerable:true,get:function(){return s.expressionStatement}});Object.defineProperty(t,"File",{enumerable:true,get:function(){return s.file}});Object.defineProperty(t,"ForInStatement",{enumerable:true,get:function(){return s.forInStatement}});Object.defineProperty(t,"ForStatement",{enumerable:true,get:function(){return s.forStatement}});Object.defineProperty(t,"FunctionDeclaration",{enumerable:true,get:function(){return s.functionDeclaration}});Object.defineProperty(t,"FunctionExpression",{enumerable:true,get:function(){return s.functionExpression}});Object.defineProperty(t,"Identifier",{enumerable:true,get:function(){return s.identifier}});Object.defineProperty(t,"IfStatement",{enumerable:true,get:function(){return s.ifStatement}});Object.defineProperty(t,"LabeledStatement",{enumerable:true,get:function(){return s.labeledStatement}});Object.defineProperty(t,"StringLiteral",{enumerable:true,get:function(){return s.stringLiteral}});Object.defineProperty(t,"NumericLiteral",{enumerable:true,get:function(){return s.numericLiteral}});Object.defineProperty(t,"NullLiteral",{enumerable:true,get:function(){return s.nullLiteral}});Object.defineProperty(t,"BooleanLiteral",{enumerable:true,get:function(){return s.booleanLiteral}});Object.defineProperty(t,"RegExpLiteral",{enumerable:true,get:function(){return s.regExpLiteral}});Object.defineProperty(t,"LogicalExpression",{enumerable:true,get:function(){return s.logicalExpression}});Object.defineProperty(t,"MemberExpression",{enumerable:true,get:function(){return s.memberExpression}});Object.defineProperty(t,"NewExpression",{enumerable:true,get:function(){return s.newExpression}});Object.defineProperty(t,"Program",{enumerable:true,get:function(){return s.program}});Object.defineProperty(t,"ObjectExpression",{enumerable:true,get:function(){return s.objectExpression}});Object.defineProperty(t,"ObjectMethod",{enumerable:true,get:function(){return s.objectMethod}});Object.defineProperty(t,"ObjectProperty",{enumerable:true,get:function(){return s.objectProperty}});Object.defineProperty(t,"RestElement",{enumerable:true,get:function(){return s.restElement}});Object.defineProperty(t,"ReturnStatement",{enumerable:true,get:function(){return s.returnStatement}});Object.defineProperty(t,"SequenceExpression",{enumerable:true,get:function(){return s.sequenceExpression}});Object.defineProperty(t,"ParenthesizedExpression",{enumerable:true,get:function(){return s.parenthesizedExpression}});Object.defineProperty(t,"SwitchCase",{enumerable:true,get:function(){return s.switchCase}});Object.defineProperty(t,"SwitchStatement",{enumerable:true,get:function(){return s.switchStatement}});Object.defineProperty(t,"ThisExpression",{enumerable:true,get:function(){return s.thisExpression}});Object.defineProperty(t,"ThrowStatement",{enumerable:true,get:function(){return s.throwStatement}});Object.defineProperty(t,"TryStatement",{enumerable:true,get:function(){return s.tryStatement}});Object.defineProperty(t,"UnaryExpression",{enumerable:true,get:function(){return s.unaryExpression}});Object.defineProperty(t,"UpdateExpression",{enumerable:true,get:function(){return s.updateExpression}});Object.defineProperty(t,"VariableDeclaration",{enumerable:true,get:function(){return s.variableDeclaration}});Object.defineProperty(t,"VariableDeclarator",{enumerable:true,get:function(){return s.variableDeclarator}});Object.defineProperty(t,"WhileStatement",{enumerable:true,get:function(){return s.whileStatement}});Object.defineProperty(t,"WithStatement",{enumerable:true,get:function(){return s.withStatement}});Object.defineProperty(t,"AssignmentPattern",{enumerable:true,get:function(){return s.assignmentPattern}});Object.defineProperty(t,"ArrayPattern",{enumerable:true,get:function(){return s.arrayPattern}});Object.defineProperty(t,"ArrowFunctionExpression",{enumerable:true,get:function(){return s.arrowFunctionExpression}});Object.defineProperty(t,"ClassBody",{enumerable:true,get:function(){return s.classBody}});Object.defineProperty(t,"ClassExpression",{enumerable:true,get:function(){return s.classExpression}});Object.defineProperty(t,"ClassDeclaration",{enumerable:true,get:function(){return s.classDeclaration}});Object.defineProperty(t,"ExportAllDeclaration",{enumerable:true,get:function(){return s.exportAllDeclaration}});Object.defineProperty(t,"ExportDefaultDeclaration",{enumerable:true,get:function(){return s.exportDefaultDeclaration}});Object.defineProperty(t,"ExportNamedDeclaration",{enumerable:true,get:function(){return s.exportNamedDeclaration}});Object.defineProperty(t,"ExportSpecifier",{enumerable:true,get:function(){return s.exportSpecifier}});Object.defineProperty(t,"ForOfStatement",{enumerable:true,get:function(){return s.forOfStatement}});Object.defineProperty(t,"ImportDeclaration",{enumerable:true,get:function(){return s.importDeclaration}});Object.defineProperty(t,"ImportDefaultSpecifier",{enumerable:true,get:function(){return s.importDefaultSpecifier}});Object.defineProperty(t,"ImportNamespaceSpecifier",{enumerable:true,get:function(){return s.importNamespaceSpecifier}});Object.defineProperty(t,"ImportSpecifier",{enumerable:true,get:function(){return s.importSpecifier}});Object.defineProperty(t,"MetaProperty",{enumerable:true,get:function(){return s.metaProperty}});Object.defineProperty(t,"ClassMethod",{enumerable:true,get:function(){return s.classMethod}});Object.defineProperty(t,"ObjectPattern",{enumerable:true,get:function(){return s.objectPattern}});Object.defineProperty(t,"SpreadElement",{enumerable:true,get:function(){return s.spreadElement}});Object.defineProperty(t,"Super",{enumerable:true,get:function(){return s.super}});Object.defineProperty(t,"TaggedTemplateExpression",{enumerable:true,get:function(){return s.taggedTemplateExpression}});Object.defineProperty(t,"TemplateElement",{enumerable:true,get:function(){return s.templateElement}});Object.defineProperty(t,"TemplateLiteral",{enumerable:true,get:function(){return s.templateLiteral}});Object.defineProperty(t,"YieldExpression",{enumerable:true,get:function(){return s.yieldExpression}});Object.defineProperty(t,"AwaitExpression",{enumerable:true,get:function(){return s.awaitExpression}});Object.defineProperty(t,"Import",{enumerable:true,get:function(){return s.import}});Object.defineProperty(t,"BigIntLiteral",{enumerable:true,get:function(){return s.bigIntLiteral}});Object.defineProperty(t,"ExportNamespaceSpecifier",{enumerable:true,get:function(){return s.exportNamespaceSpecifier}});Object.defineProperty(t,"OptionalMemberExpression",{enumerable:true,get:function(){return s.optionalMemberExpression}});Object.defineProperty(t,"OptionalCallExpression",{enumerable:true,get:function(){return s.optionalCallExpression}});Object.defineProperty(t,"AnyTypeAnnotation",{enumerable:true,get:function(){return s.anyTypeAnnotation}});Object.defineProperty(t,"ArrayTypeAnnotation",{enumerable:true,get:function(){return s.arrayTypeAnnotation}});Object.defineProperty(t,"BooleanTypeAnnotation",{enumerable:true,get:function(){return s.booleanTypeAnnotation}});Object.defineProperty(t,"BooleanLiteralTypeAnnotation",{enumerable:true,get:function(){return s.booleanLiteralTypeAnnotation}});Object.defineProperty(t,"NullLiteralTypeAnnotation",{enumerable:true,get:function(){return s.nullLiteralTypeAnnotation}});Object.defineProperty(t,"ClassImplements",{enumerable:true,get:function(){return s.classImplements}});Object.defineProperty(t,"DeclareClass",{enumerable:true,get:function(){return s.declareClass}});Object.defineProperty(t,"DeclareFunction",{enumerable:true,get:function(){return s.declareFunction}});Object.defineProperty(t,"DeclareInterface",{enumerable:true,get:function(){return s.declareInterface}});Object.defineProperty(t,"DeclareModule",{enumerable:true,get:function(){return s.declareModule}});Object.defineProperty(t,"DeclareModuleExports",{enumerable:true,get:function(){return s.declareModuleExports}});Object.defineProperty(t,"DeclareTypeAlias",{enumerable:true,get:function(){return s.declareTypeAlias}});Object.defineProperty(t,"DeclareOpaqueType",{enumerable:true,get:function(){return s.declareOpaqueType}});Object.defineProperty(t,"DeclareVariable",{enumerable:true,get:function(){return s.declareVariable}});Object.defineProperty(t,"DeclareExportDeclaration",{enumerable:true,get:function(){return s.declareExportDeclaration}});Object.defineProperty(t,"DeclareExportAllDeclaration",{enumerable:true,get:function(){return s.declareExportAllDeclaration}});Object.defineProperty(t,"DeclaredPredicate",{enumerable:true,get:function(){return s.declaredPredicate}});Object.defineProperty(t,"ExistsTypeAnnotation",{enumerable:true,get:function(){return s.existsTypeAnnotation}});Object.defineProperty(t,"FunctionTypeAnnotation",{enumerable:true,get:function(){return s.functionTypeAnnotation}});Object.defineProperty(t,"FunctionTypeParam",{enumerable:true,get:function(){return s.functionTypeParam}});Object.defineProperty(t,"GenericTypeAnnotation",{enumerable:true,get:function(){return s.genericTypeAnnotation}});Object.defineProperty(t,"InferredPredicate",{enumerable:true,get:function(){return s.inferredPredicate}});Object.defineProperty(t,"InterfaceExtends",{enumerable:true,get:function(){return s.interfaceExtends}});Object.defineProperty(t,"InterfaceDeclaration",{enumerable:true,get:function(){return s.interfaceDeclaration}});Object.defineProperty(t,"InterfaceTypeAnnotation",{enumerable:true,get:function(){return s.interfaceTypeAnnotation}});Object.defineProperty(t,"IntersectionTypeAnnotation",{enumerable:true,get:function(){return s.intersectionTypeAnnotation}});Object.defineProperty(t,"MixedTypeAnnotation",{enumerable:true,get:function(){return s.mixedTypeAnnotation}});Object.defineProperty(t,"EmptyTypeAnnotation",{enumerable:true,get:function(){return s.emptyTypeAnnotation}});Object.defineProperty(t,"NullableTypeAnnotation",{enumerable:true,get:function(){return s.nullableTypeAnnotation}});Object.defineProperty(t,"NumberLiteralTypeAnnotation",{enumerable:true,get:function(){return s.numberLiteralTypeAnnotation}});Object.defineProperty(t,"NumberTypeAnnotation",{enumerable:true,get:function(){return s.numberTypeAnnotation}});Object.defineProperty(t,"ObjectTypeAnnotation",{enumerable:true,get:function(){return s.objectTypeAnnotation}});Object.defineProperty(t,"ObjectTypeInternalSlot",{enumerable:true,get:function(){return s.objectTypeInternalSlot}});Object.defineProperty(t,"ObjectTypeCallProperty",{enumerable:true,get:function(){return s.objectTypeCallProperty}});Object.defineProperty(t,"ObjectTypeIndexer",{enumerable:true,get:function(){return s.objectTypeIndexer}});Object.defineProperty(t,"ObjectTypeProperty",{enumerable:true,get:function(){return s.objectTypeProperty}});Object.defineProperty(t,"ObjectTypeSpreadProperty",{enumerable:true,get:function(){return s.objectTypeSpreadProperty}});Object.defineProperty(t,"OpaqueType",{enumerable:true,get:function(){return s.opaqueType}});Object.defineProperty(t,"QualifiedTypeIdentifier",{enumerable:true,get:function(){return s.qualifiedTypeIdentifier}});Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:true,get:function(){return s.stringLiteralTypeAnnotation}});Object.defineProperty(t,"StringTypeAnnotation",{enumerable:true,get:function(){return s.stringTypeAnnotation}});Object.defineProperty(t,"SymbolTypeAnnotation",{enumerable:true,get:function(){return s.symbolTypeAnnotation}});Object.defineProperty(t,"ThisTypeAnnotation",{enumerable:true,get:function(){return s.thisTypeAnnotation}});Object.defineProperty(t,"TupleTypeAnnotation",{enumerable:true,get:function(){return s.tupleTypeAnnotation}});Object.defineProperty(t,"TypeofTypeAnnotation",{enumerable:true,get:function(){return s.typeofTypeAnnotation}});Object.defineProperty(t,"TypeAlias",{enumerable:true,get:function(){return s.typeAlias}});Object.defineProperty(t,"TypeAnnotation",{enumerable:true,get:function(){return s.typeAnnotation}});Object.defineProperty(t,"TypeCastExpression",{enumerable:true,get:function(){return s.typeCastExpression}});Object.defineProperty(t,"TypeParameter",{enumerable:true,get:function(){return s.typeParameter}});Object.defineProperty(t,"TypeParameterDeclaration",{enumerable:true,get:function(){return s.typeParameterDeclaration}});Object.defineProperty(t,"TypeParameterInstantiation",{enumerable:true,get:function(){return s.typeParameterInstantiation}});Object.defineProperty(t,"UnionTypeAnnotation",{enumerable:true,get:function(){return s.unionTypeAnnotation}});Object.defineProperty(t,"Variance",{enumerable:true,get:function(){return s.variance}});Object.defineProperty(t,"VoidTypeAnnotation",{enumerable:true,get:function(){return s.voidTypeAnnotation}});Object.defineProperty(t,"EnumDeclaration",{enumerable:true,get:function(){return s.enumDeclaration}});Object.defineProperty(t,"EnumBooleanBody",{enumerable:true,get:function(){return s.enumBooleanBody}});Object.defineProperty(t,"EnumNumberBody",{enumerable:true,get:function(){return s.enumNumberBody}});Object.defineProperty(t,"EnumStringBody",{enumerable:true,get:function(){return s.enumStringBody}});Object.defineProperty(t,"EnumSymbolBody",{enumerable:true,get:function(){return s.enumSymbolBody}});Object.defineProperty(t,"EnumBooleanMember",{enumerable:true,get:function(){return s.enumBooleanMember}});Object.defineProperty(t,"EnumNumberMember",{enumerable:true,get:function(){return s.enumNumberMember}});Object.defineProperty(t,"EnumStringMember",{enumerable:true,get:function(){return s.enumStringMember}});Object.defineProperty(t,"EnumDefaultedMember",{enumerable:true,get:function(){return s.enumDefaultedMember}});Object.defineProperty(t,"JSXAttribute",{enumerable:true,get:function(){return s.jsxAttribute}});Object.defineProperty(t,"JSXClosingElement",{enumerable:true,get:function(){return s.jsxClosingElement}});Object.defineProperty(t,"JSXElement",{enumerable:true,get:function(){return s.jsxElement}});Object.defineProperty(t,"JSXEmptyExpression",{enumerable:true,get:function(){return s.jsxEmptyExpression}});Object.defineProperty(t,"JSXExpressionContainer",{enumerable:true,get:function(){return s.jsxExpressionContainer}});Object.defineProperty(t,"JSXSpreadChild",{enumerable:true,get:function(){return s.jsxSpreadChild}});Object.defineProperty(t,"JSXIdentifier",{enumerable:true,get:function(){return s.jsxIdentifier}});Object.defineProperty(t,"JSXMemberExpression",{enumerable:true,get:function(){return s.jsxMemberExpression}});Object.defineProperty(t,"JSXNamespacedName",{enumerable:true,get:function(){return s.jsxNamespacedName}});Object.defineProperty(t,"JSXOpeningElement",{enumerable:true,get:function(){return s.jsxOpeningElement}});Object.defineProperty(t,"JSXSpreadAttribute",{enumerable:true,get:function(){return s.jsxSpreadAttribute}});Object.defineProperty(t,"JSXText",{enumerable:true,get:function(){return s.jsxText}});Object.defineProperty(t,"JSXFragment",{enumerable:true,get:function(){return s.jsxFragment}});Object.defineProperty(t,"JSXOpeningFragment",{enumerable:true,get:function(){return s.jsxOpeningFragment}});Object.defineProperty(t,"JSXClosingFragment",{enumerable:true,get:function(){return s.jsxClosingFragment}});Object.defineProperty(t,"Noop",{enumerable:true,get:function(){return s.noop}});Object.defineProperty(t,"Placeholder",{enumerable:true,get:function(){return s.placeholder}});Object.defineProperty(t,"V8IntrinsicIdentifier",{enumerable:true,get:function(){return s.v8IntrinsicIdentifier}});Object.defineProperty(t,"ArgumentPlaceholder",{enumerable:true,get:function(){return s.argumentPlaceholder}});Object.defineProperty(t,"BindExpression",{enumerable:true,get:function(){return s.bindExpression}});Object.defineProperty(t,"ClassProperty",{enumerable:true,get:function(){return s.classProperty}});Object.defineProperty(t,"PipelineTopicExpression",{enumerable:true,get:function(){return s.pipelineTopicExpression}});Object.defineProperty(t,"PipelineBareFunction",{enumerable:true,get:function(){return s.pipelineBareFunction}});Object.defineProperty(t,"PipelinePrimaryTopicReference",{enumerable:true,get:function(){return s.pipelinePrimaryTopicReference}});Object.defineProperty(t,"ClassPrivateProperty",{enumerable:true,get:function(){return s.classPrivateProperty}});Object.defineProperty(t,"ClassPrivateMethod",{enumerable:true,get:function(){return s.classPrivateMethod}});Object.defineProperty(t,"ImportAttribute",{enumerable:true,get:function(){return s.importAttribute}});Object.defineProperty(t,"Decorator",{enumerable:true,get:function(){return s.decorator}});Object.defineProperty(t,"DoExpression",{enumerable:true,get:function(){return s.doExpression}});Object.defineProperty(t,"ExportDefaultSpecifier",{enumerable:true,get:function(){return s.exportDefaultSpecifier}});Object.defineProperty(t,"PrivateName",{enumerable:true,get:function(){return s.privateName}});Object.defineProperty(t,"RecordExpression",{enumerable:true,get:function(){return s.recordExpression}});Object.defineProperty(t,"TupleExpression",{enumerable:true,get:function(){return s.tupleExpression}});Object.defineProperty(t,"DecimalLiteral",{enumerable:true,get:function(){return s.decimalLiteral}});Object.defineProperty(t,"StaticBlock",{enumerable:true,get:function(){return s.staticBlock}});Object.defineProperty(t,"TSParameterProperty",{enumerable:true,get:function(){return s.tsParameterProperty}});Object.defineProperty(t,"TSDeclareFunction",{enumerable:true,get:function(){return s.tsDeclareFunction}});Object.defineProperty(t,"TSDeclareMethod",{enumerable:true,get:function(){return s.tsDeclareMethod}});Object.defineProperty(t,"TSQualifiedName",{enumerable:true,get:function(){return s.tsQualifiedName}});Object.defineProperty(t,"TSCallSignatureDeclaration",{enumerable:true,get:function(){return s.tsCallSignatureDeclaration}});Object.defineProperty(t,"TSConstructSignatureDeclaration",{enumerable:true,get:function(){return s.tsConstructSignatureDeclaration}});Object.defineProperty(t,"TSPropertySignature",{enumerable:true,get:function(){return s.tsPropertySignature}});Object.defineProperty(t,"TSMethodSignature",{enumerable:true,get:function(){return s.tsMethodSignature}});Object.defineProperty(t,"TSIndexSignature",{enumerable:true,get:function(){return s.tsIndexSignature}});Object.defineProperty(t,"TSAnyKeyword",{enumerable:true,get:function(){return s.tsAnyKeyword}});Object.defineProperty(t,"TSBooleanKeyword",{enumerable:true,get:function(){return s.tsBooleanKeyword}});Object.defineProperty(t,"TSBigIntKeyword",{enumerable:true,get:function(){return s.tsBigIntKeyword}});Object.defineProperty(t,"TSIntrinsicKeyword",{enumerable:true,get:function(){return s.tsIntrinsicKeyword}});Object.defineProperty(t,"TSNeverKeyword",{enumerable:true,get:function(){return s.tsNeverKeyword}});Object.defineProperty(t,"TSNullKeyword",{enumerable:true,get:function(){return s.tsNullKeyword}});Object.defineProperty(t,"TSNumberKeyword",{enumerable:true,get:function(){return s.tsNumberKeyword}});Object.defineProperty(t,"TSObjectKeyword",{enumerable:true,get:function(){return s.tsObjectKeyword}});Object.defineProperty(t,"TSStringKeyword",{enumerable:true,get:function(){return s.tsStringKeyword}});Object.defineProperty(t,"TSSymbolKeyword",{enumerable:true,get:function(){return s.tsSymbolKeyword}});Object.defineProperty(t,"TSUndefinedKeyword",{enumerable:true,get:function(){return s.tsUndefinedKeyword}});Object.defineProperty(t,"TSUnknownKeyword",{enumerable:true,get:function(){return s.tsUnknownKeyword}});Object.defineProperty(t,"TSVoidKeyword",{enumerable:true,get:function(){return s.tsVoidKeyword}});Object.defineProperty(t,"TSThisType",{enumerable:true,get:function(){return s.tsThisType}});Object.defineProperty(t,"TSFunctionType",{enumerable:true,get:function(){return s.tsFunctionType}});Object.defineProperty(t,"TSConstructorType",{enumerable:true,get:function(){return s.tsConstructorType}});Object.defineProperty(t,"TSTypeReference",{enumerable:true,get:function(){return s.tsTypeReference}});Object.defineProperty(t,"TSTypePredicate",{enumerable:true,get:function(){return s.tsTypePredicate}});Object.defineProperty(t,"TSTypeQuery",{enumerable:true,get:function(){return s.tsTypeQuery}});Object.defineProperty(t,"TSTypeLiteral",{enumerable:true,get:function(){return s.tsTypeLiteral}});Object.defineProperty(t,"TSArrayType",{enumerable:true,get:function(){return s.tsArrayType}});Object.defineProperty(t,"TSTupleType",{enumerable:true,get:function(){return s.tsTupleType}});Object.defineProperty(t,"TSOptionalType",{enumerable:true,get:function(){return s.tsOptionalType}});Object.defineProperty(t,"TSRestType",{enumerable:true,get:function(){return s.tsRestType}});Object.defineProperty(t,"TSNamedTupleMember",{enumerable:true,get:function(){return s.tsNamedTupleMember}});Object.defineProperty(t,"TSUnionType",{enumerable:true,get:function(){return s.tsUnionType}});Object.defineProperty(t,"TSIntersectionType",{enumerable:true,get:function(){return s.tsIntersectionType}});Object.defineProperty(t,"TSConditionalType",{enumerable:true,get:function(){return s.tsConditionalType}});Object.defineProperty(t,"TSInferType",{enumerable:true,get:function(){return s.tsInferType}});Object.defineProperty(t,"TSParenthesizedType",{enumerable:true,get:function(){return s.tsParenthesizedType}});Object.defineProperty(t,"TSTypeOperator",{enumerable:true,get:function(){return s.tsTypeOperator}});Object.defineProperty(t,"TSIndexedAccessType",{enumerable:true,get:function(){return s.tsIndexedAccessType}});Object.defineProperty(t,"TSMappedType",{enumerable:true,get:function(){return s.tsMappedType}});Object.defineProperty(t,"TSLiteralType",{enumerable:true,get:function(){return s.tsLiteralType}});Object.defineProperty(t,"TSExpressionWithTypeArguments",{enumerable:true,get:function(){return s.tsExpressionWithTypeArguments}});Object.defineProperty(t,"TSInterfaceDeclaration",{enumerable:true,get:function(){return s.tsInterfaceDeclaration}});Object.defineProperty(t,"TSInterfaceBody",{enumerable:true,get:function(){return s.tsInterfaceBody}});Object.defineProperty(t,"TSTypeAliasDeclaration",{enumerable:true,get:function(){return s.tsTypeAliasDeclaration}});Object.defineProperty(t,"TSAsExpression",{enumerable:true,get:function(){return s.tsAsExpression}});Object.defineProperty(t,"TSTypeAssertion",{enumerable:true,get:function(){return s.tsTypeAssertion}});Object.defineProperty(t,"TSEnumDeclaration",{enumerable:true,get:function(){return s.tsEnumDeclaration}});Object.defineProperty(t,"TSEnumMember",{enumerable:true,get:function(){return s.tsEnumMember}});Object.defineProperty(t,"TSModuleDeclaration",{enumerable:true,get:function(){return s.tsModuleDeclaration}});Object.defineProperty(t,"TSModuleBlock",{enumerable:true,get:function(){return s.tsModuleBlock}});Object.defineProperty(t,"TSImportType",{enumerable:true,get:function(){return s.tsImportType}});Object.defineProperty(t,"TSImportEqualsDeclaration",{enumerable:true,get:function(){return s.tsImportEqualsDeclaration}});Object.defineProperty(t,"TSExternalModuleReference",{enumerable:true,get:function(){return s.tsExternalModuleReference}});Object.defineProperty(t,"TSNonNullExpression",{enumerable:true,get:function(){return s.tsNonNullExpression}});Object.defineProperty(t,"TSExportAssignment",{enumerable:true,get:function(){return s.tsExportAssignment}});Object.defineProperty(t,"TSNamespaceExportDeclaration",{enumerable:true,get:function(){return s.tsNamespaceExportDeclaration}});Object.defineProperty(t,"TSTypeAnnotation",{enumerable:true,get:function(){return s.tsTypeAnnotation}});Object.defineProperty(t,"TSTypeParameterInstantiation",{enumerable:true,get:function(){return s.tsTypeParameterInstantiation}});Object.defineProperty(t,"TSTypeParameterDeclaration",{enumerable:true,get:function(){return s.tsTypeParameterDeclaration}});Object.defineProperty(t,"TSTypeParameter",{enumerable:true,get:function(){return s.tsTypeParameter}});Object.defineProperty(t,"NumberLiteral",{enumerable:true,get:function(){return s.numberLiteral}});Object.defineProperty(t,"RegexLiteral",{enumerable:true,get:function(){return s.regexLiteral}});Object.defineProperty(t,"RestProperty",{enumerable:true,get:function(){return s.restProperty}});Object.defineProperty(t,"SpreadProperty",{enumerable:true,get:function(){return s.spreadProperty}});var s=r(35093)},67629:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=buildChildren;var s=r(18939);var n=_interopRequireDefault(r(82646));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function buildChildren(e){const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=createTSUnionType;var s=r(35093);var n=_interopRequireDefault(r(47196));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function createTSUnionType(e){const t=e.map(e=>e.typeAnnotation);const r=(0,n.default)(t);if(r.length===1){return r[0]}else{return(0,s.tsUnionType)(r)}}},10063:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=clone;var s=_interopRequireDefault(r(78068));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function clone(e){return(0,s.default)(e,false)}},9784:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=cloneDeep;var s=_interopRequireDefault(r(78068));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneDeep(e){return(0,s.default)(e)}},59233:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=cloneDeepWithoutLoc;var s=_interopRequireDefault(r(78068));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneDeepWithoutLoc(e){return(0,s.default)(e,true,true)}},78068:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=cloneNode;var s=r(74098);var n=r(18939);const a=Function.call.bind(Object.prototype.hasOwnProperty);function cloneIfNode(e,t,r){if(e&&typeof e.type==="string"){return cloneNode(e,t,r)}return e}function cloneIfNodeOrArray(e,t,r){if(Array.isArray(e)){return e.map(e=>cloneIfNode(e,t,r))}return cloneIfNode(e,t,r)}function cloneNode(e,t=true,r=false){if(!e)return e;const{type:i}=e;const o={type:e.type};if((0,n.isIdentifier)(e)){o.name=e.name;if(a(e,"optional")&&typeof e.optional==="boolean"){o.optional=e.optional}if(a(e,"typeAnnotation")){o.typeAnnotation=t?cloneIfNodeOrArray(e.typeAnnotation,true,r):e.typeAnnotation}}else if(!a(s.NODE_FIELDS,i)){throw new Error(`Unknown node type: "${i}"`)}else{for(const l of Object.keys(s.NODE_FIELDS[i])){if(a(e,l)){if(t){o[l]=(0,n.isFile)(e)&&l==="comments"?maybeCloneComments(e.comments,t,r):cloneIfNodeOrArray(e[l],true,r)}else{o[l]=e[l]}}}}if(a(e,"loc")){if(r){o.loc=null}else{o.loc=e.loc}}if(a(e,"leadingComments")){o.leadingComments=maybeCloneComments(e.leadingComments,t,r)}if(a(e,"innerComments")){o.innerComments=maybeCloneComments(e.innerComments,t,r)}if(a(e,"trailingComments")){o.trailingComments=maybeCloneComments(e.trailingComments,t,r)}if(a(e,"extra")){o.extra=Object.assign({},e.extra)}return o}function cloneCommentsWithoutLoc(e){return e.map(({type:e,value:t})=>({type:e,value:t,loc:null}))}function maybeCloneComments(e,t,r){return t&&r?cloneCommentsWithoutLoc(e):e}},80405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=cloneWithoutLoc;var s=_interopRequireDefault(r(78068));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneWithoutLoc(e){return(0,s.default)(e,false,true)}},55899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=addComment;var s=_interopRequireDefault(r(85565));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function addComment(e,t,r,n){return(0,s.default)(e,t,[{type:n?"CommentLine":"CommentBlock",value:r}])}},85565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=addComments;function addComments(e,t,r){if(!r||!e)return e;const s=`${t}Comments`;if(e[s]){if(t==="leading"){e[s]=r.concat(e[s])}else{e[s]=e[s].concat(r)}}else{e[s]=r}return e}},63307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inheritInnerComments;var s=_interopRequireDefault(r(74837));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function inheritInnerComments(e,t){(0,s.default)("innerComments",e,t)}},94149:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inheritLeadingComments;var s=_interopRequireDefault(r(74837));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function inheritLeadingComments(e,t){(0,s.default)("leadingComments",e,t)}},41177:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inheritTrailingComments;var s=_interopRequireDefault(r(74837));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function inheritTrailingComments(e,t){(0,s.default)("trailingComments",e,t)}},58245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inheritsComments;var s=_interopRequireDefault(r(41177));var n=_interopRequireDefault(r(94149));var a=_interopRequireDefault(r(63307));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function inheritsComments(e,t){(0,s.default)(e,t);(0,n.default)(e,t);(0,a.default)(e,t);return e}},4496:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=removeComments;var s=r(91073);function removeComments(e){s.COMMENT_KEYS.forEach(t=>{e[t]=null});return e}},69946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TSBASETYPE_TYPES=t.TSTYPE_TYPES=t.TSTYPEELEMENT_TYPES=t.PRIVATE_TYPES=t.JSX_TYPES=t.ENUMMEMBER_TYPES=t.ENUMBODY_TYPES=t.FLOWPREDICATE_TYPES=t.FLOWDECLARATION_TYPES=t.FLOWBASEANNOTATION_TYPES=t.FLOWTYPE_TYPES=t.FLOW_TYPES=t.MODULESPECIFIER_TYPES=t.EXPORTDECLARATION_TYPES=t.MODULEDECLARATION_TYPES=t.CLASS_TYPES=t.PATTERN_TYPES=t.UNARYLIKE_TYPES=t.PROPERTY_TYPES=t.OBJECTMEMBER_TYPES=t.METHOD_TYPES=t.USERWHITESPACABLE_TYPES=t.IMMUTABLE_TYPES=t.LITERAL_TYPES=t.TSENTITYNAME_TYPES=t.LVAL_TYPES=t.PATTERNLIKE_TYPES=t.DECLARATION_TYPES=t.PUREISH_TYPES=t.FUNCTIONPARENT_TYPES=t.FUNCTION_TYPES=t.FORXSTATEMENT_TYPES=t.FOR_TYPES=t.EXPRESSIONWRAPPER_TYPES=t.WHILE_TYPES=t.LOOP_TYPES=t.CONDITIONAL_TYPES=t.COMPLETIONSTATEMENT_TYPES=t.TERMINATORLESS_TYPES=t.STATEMENT_TYPES=t.BLOCK_TYPES=t.BLOCKPARENT_TYPES=t.SCOPABLE_TYPES=t.BINARY_TYPES=t.EXPRESSION_TYPES=void 0;var s=r(74098);const n=s.FLIPPED_ALIAS_KEYS["Expression"];t.EXPRESSION_TYPES=n;const a=s.FLIPPED_ALIAS_KEYS["Binary"];t.BINARY_TYPES=a;const i=s.FLIPPED_ALIAS_KEYS["Scopable"];t.SCOPABLE_TYPES=i;const o=s.FLIPPED_ALIAS_KEYS["BlockParent"];t.BLOCKPARENT_TYPES=o;const l=s.FLIPPED_ALIAS_KEYS["Block"];t.BLOCK_TYPES=l;const u=s.FLIPPED_ALIAS_KEYS["Statement"];t.STATEMENT_TYPES=u;const c=s.FLIPPED_ALIAS_KEYS["Terminatorless"];t.TERMINATORLESS_TYPES=c;const p=s.FLIPPED_ALIAS_KEYS["CompletionStatement"];t.COMPLETIONSTATEMENT_TYPES=p;const f=s.FLIPPED_ALIAS_KEYS["Conditional"];t.CONDITIONAL_TYPES=f;const d=s.FLIPPED_ALIAS_KEYS["Loop"];t.LOOP_TYPES=d;const y=s.FLIPPED_ALIAS_KEYS["While"];t.WHILE_TYPES=y;const h=s.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];t.EXPRESSIONWRAPPER_TYPES=h;const m=s.FLIPPED_ALIAS_KEYS["For"];t.FOR_TYPES=m;const g=s.FLIPPED_ALIAS_KEYS["ForXStatement"];t.FORXSTATEMENT_TYPES=g;const b=s.FLIPPED_ALIAS_KEYS["Function"];t.FUNCTION_TYPES=b;const x=s.FLIPPED_ALIAS_KEYS["FunctionParent"];t.FUNCTIONPARENT_TYPES=x;const v=s.FLIPPED_ALIAS_KEYS["Pureish"];t.PUREISH_TYPES=v;const E=s.FLIPPED_ALIAS_KEYS["Declaration"];t.DECLARATION_TYPES=E;const T=s.FLIPPED_ALIAS_KEYS["PatternLike"];t.PATTERNLIKE_TYPES=T;const S=s.FLIPPED_ALIAS_KEYS["LVal"];t.LVAL_TYPES=S;const P=s.FLIPPED_ALIAS_KEYS["TSEntityName"];t.TSENTITYNAME_TYPES=P;const j=s.FLIPPED_ALIAS_KEYS["Literal"];t.LITERAL_TYPES=j;const w=s.FLIPPED_ALIAS_KEYS["Immutable"];t.IMMUTABLE_TYPES=w;const A=s.FLIPPED_ALIAS_KEYS["UserWhitespacable"];t.USERWHITESPACABLE_TYPES=A;const D=s.FLIPPED_ALIAS_KEYS["Method"];t.METHOD_TYPES=D;const O=s.FLIPPED_ALIAS_KEYS["ObjectMember"];t.OBJECTMEMBER_TYPES=O;const _=s.FLIPPED_ALIAS_KEYS["Property"];t.PROPERTY_TYPES=_;const C=s.FLIPPED_ALIAS_KEYS["UnaryLike"];t.UNARYLIKE_TYPES=C;const I=s.FLIPPED_ALIAS_KEYS["Pattern"];t.PATTERN_TYPES=I;const k=s.FLIPPED_ALIAS_KEYS["Class"];t.CLASS_TYPES=k;const R=s.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];t.MODULEDECLARATION_TYPES=R;const M=s.FLIPPED_ALIAS_KEYS["ExportDeclaration"];t.EXPORTDECLARATION_TYPES=M;const N=s.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];t.MODULESPECIFIER_TYPES=N;const F=s.FLIPPED_ALIAS_KEYS["Flow"];t.FLOW_TYPES=F;const L=s.FLIPPED_ALIAS_KEYS["FlowType"];t.FLOWTYPE_TYPES=L;const B=s.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];t.FLOWBASEANNOTATION_TYPES=B;const q=s.FLIPPED_ALIAS_KEYS["FlowDeclaration"];t.FLOWDECLARATION_TYPES=q;const W=s.FLIPPED_ALIAS_KEYS["FlowPredicate"];t.FLOWPREDICATE_TYPES=W;const U=s.FLIPPED_ALIAS_KEYS["EnumBody"];t.ENUMBODY_TYPES=U;const K=s.FLIPPED_ALIAS_KEYS["EnumMember"];t.ENUMMEMBER_TYPES=K;const V=s.FLIPPED_ALIAS_KEYS["JSX"];t.JSX_TYPES=V;const $=s.FLIPPED_ALIAS_KEYS["Private"];t.PRIVATE_TYPES=$;const J=s.FLIPPED_ALIAS_KEYS["TSTypeElement"];t.TSTYPEELEMENT_TYPES=J;const H=s.FLIPPED_ALIAS_KEYS["TSType"];t.TSTYPE_TYPES=H;const G=s.FLIPPED_ALIAS_KEYS["TSBaseType"];t.TSBASETYPE_TYPES=G},91073:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.ASSIGNMENT_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;const r=["consequent","body","alternate"];t.STATEMENT_OR_BLOCK_KEYS=r;const s=["body","expressions"];t.FLATTENABLE_KEYS=s;const n=["left","init"];t.FOR_INIT_KEYS=n;const a=["leadingComments","trailingComments","innerComments"];t.COMMENT_KEYS=a;const i=["||","&&","??"];t.LOGICAL_OPERATORS=i;const o=["++","--"];t.UPDATE_OPERATORS=o;const l=[">","<",">=","<="];t.BOOLEAN_NUMBER_BINARY_OPERATORS=l;const u=["==","===","!=","!=="];t.EQUALITY_BINARY_OPERATORS=u;const c=[...u,"in","instanceof"];t.COMPARISON_BINARY_OPERATORS=c;const p=[...c,...l];t.BOOLEAN_BINARY_OPERATORS=p;const f=["-","/","%","*","**","&","|",">>",">>>","<<","^"];t.NUMBER_BINARY_OPERATORS=f;const d=["+",...f,...p];t.BINARY_OPERATORS=d;const y=["=","+=",...f.map(e=>e+"="),...i.map(e=>e+"=")];t.ASSIGNMENT_OPERATORS=y;const h=["delete","!"];t.BOOLEAN_UNARY_OPERATORS=h;const m=["+","-","~"];t.NUMBER_UNARY_OPERATORS=m;const g=["typeof"];t.STRING_UNARY_OPERATORS=g;const b=["void","throw",...h,...m,...g];t.UNARY_OPERATORS=b;const x={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};t.INHERIT_KEYS=x;const v=Symbol.for("var used to be block scoped");t.BLOCK_SCOPED_SYMBOL=v;const E=Symbol.for("should not be considered a local binding");t.NOT_LOCAL_BINDING=E},30965:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=ensureBlock;var s=_interopRequireDefault(r(96262));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ensureBlock(e,t="body"){return e[t]=(0,s.default)(e[t],e)}},37866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=gatherSequenceExpressions;var s=_interopRequireDefault(r(97723));var n=r(18939);var a=r(35093);var i=_interopRequireDefault(r(78068));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function gatherSequenceExpressions(e,t,r){const o=[];let l=true;for(const u of e){if(!(0,n.isEmptyStatement)(u)){l=false}if((0,n.isExpression)(u)){o.push(u)}else if((0,n.isExpressionStatement)(u)){o.push(u.expression)}else if((0,n.isVariableDeclaration)(u)){if(u.kind!=="var")return;for(const e of u.declarations){const t=(0,s.default)(e);for(const e of Object.keys(t)){r.push({kind:u.kind,id:(0,i.default)(t[e])})}if(e.init){o.push((0,a.assignmentExpression)("=",e.id,e.init))}}l=true}else if((0,n.isIfStatement)(u)){const e=u.consequent?gatherSequenceExpressions([u.consequent],t,r):t.buildUndefinedNode();const s=u.alternate?gatherSequenceExpressions([u.alternate],t,r):t.buildUndefinedNode();if(!e||!s)return;o.push((0,a.conditionalExpression)(u.test,e,s))}else if((0,n.isBlockStatement)(u)){const e=gatherSequenceExpressions(u.body,t,r);if(!e)return;o.push(e)}else if((0,n.isEmptyStatement)(u)){if(e.indexOf(u)===0){l=true}}else{return}}if(l){o.push(t.buildUndefinedNode())}if(o.length===1){return o[0]}else{return(0,a.sequenceExpression)(o)}}},77853:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toBindingIdentifierName;var s=_interopRequireDefault(r(76898));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toBindingIdentifierName(e){e=(0,s.default)(e);if(e==="eval"||e==="arguments")e="_"+e;return e}},96262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toBlock;var s=r(18939);var n=r(35093);function toBlock(e,t){if((0,s.isBlockStatement)(e)){return e}let r=[];if((0,s.isEmptyStatement)(e)){r=[]}else{if(!(0,s.isStatement)(e)){if((0,s.isFunction)(t)){e=(0,n.returnStatement)(e)}else{e=(0,n.expressionStatement)(e)}}r=[e]}return(0,n.blockStatement)(r)}},9212:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toComputedKey;var s=r(18939);var n=r(35093);function toComputedKey(e,t=e.key||e.property){if(!e.computed&&(0,s.isIdentifier)(t))t=(0,n.stringLiteral)(t.name);return t}},96456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(18939);var n=toExpression;t.default=n;function toExpression(e){if((0,s.isExpressionStatement)(e)){e=e.expression}if((0,s.isExpression)(e)){return e}if((0,s.isClass)(e)){e.type="ClassExpression"}else if((0,s.isFunction)(e)){e.type="FunctionExpression"}if(!(0,s.isExpression)(e)){throw new Error(`cannot turn ${e.type} to an expression`)}return e}},76898:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toIdentifier;var s=_interopRequireDefault(r(90735));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toIdentifier(e){e=e+"";e=e.replace(/[^a-zA-Z0-9$_]/g,"-");e=e.replace(/^[-0-9]+/,"");e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""});if(!(0,s.default)(e)){e=`_${e}`}return e||"_"}},41093:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toKeyAlias;var s=r(18939);var n=_interopRequireDefault(r(78068));var a=_interopRequireDefault(r(22686));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toKeyAlias(e,t=e.key){let r;if(e.kind==="method"){return toKeyAlias.increment()+""}else if((0,s.isIdentifier)(t)){r=t.name}else if((0,s.isStringLiteral)(t)){r=JSON.stringify(t.value)}else{r=JSON.stringify((0,a.default)((0,n.default)(t)))}if(e.computed){r=`[${r}]`}if(e.static){r=`static:${r}`}return r}toKeyAlias.uid=0;toKeyAlias.increment=function(){if(toKeyAlias.uid>=Number.MAX_SAFE_INTEGER){return toKeyAlias.uid=0}else{return toKeyAlias.uid++}}},62591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toSequenceExpression;var s=_interopRequireDefault(r(37866));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toSequenceExpression(e,t){if(!(e==null?void 0:e.length))return;const r=[];const n=(0,s.default)(e,t,r);if(!n)return;for(const e of r){t.push(e)}return n}},67166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(18939);var n=r(35093);var a=toStatement;t.default=a;function toStatement(e,t){if((0,s.isStatement)(e)){return e}let r=false;let a;if((0,s.isClass)(e)){r=true;a="ClassDeclaration"}else if((0,s.isFunction)(e)){r=true;a="FunctionDeclaration"}else if((0,s.isAssignmentExpression)(e)){return(0,n.expressionStatement)(e)}if(r&&!e.id){a=false}if(!a){if(t){return false}else{throw new Error(`cannot turn ${e.type} to a statement`)}}e.type=a;return e}},39331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(24788));var n=_interopRequireDefault(r(1370));var a=_interopRequireDefault(r(90735));var i=r(35093);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var o=valueToNode;t.default=o;function valueToNode(e){if(e===undefined){return(0,i.identifier)("undefined")}if(e===true||e===false){return(0,i.booleanLiteral)(e)}if(e===null){return(0,i.nullLiteral)()}if(typeof e==="string"){return(0,i.stringLiteral)(e)}if(typeof e==="number"){let t;if(Number.isFinite(e)){t=(0,i.numericLiteral)(Math.abs(e))}else{let r;if(Number.isNaN(e)){r=(0,i.numericLiteral)(0)}else{r=(0,i.numericLiteral)(1)}t=(0,i.binaryExpression)("/",r,(0,i.numericLiteral)(0))}if(e<0||Object.is(e,-0)){t=(0,i.unaryExpression)("-",t)}return t}if((0,n.default)(e)){const t=e.source;const r=e.toString().match(/\/([a-z]+|)$/)[1];return(0,i.regExpLiteral)(t,r)}if(Array.isArray(e)){return(0,i.arrayExpression)(e.map(valueToNode))}if((0,s.default)(e)){const t=[];for(const r of Object.keys(e)){let s;if((0,a.default)(r)){s=(0,i.identifier)(r)}else{s=(0,i.stringLiteral)(r)}t.push((0,i.objectProperty)(s,valueToNode(e[r])))}return(0,i.objectExpression)(t)}throw new Error("don't know how to turn this value into a node")}},89759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.classMethodOrDeclareMethodCommon=t.classMethodOrPropertyCommon=t.patternLikeCommon=t.functionDeclarationCommon=t.functionTypeAnnotationCommon=t.functionCommon=void 0;var s=_interopRequireDefault(r(28422));var n=_interopRequireDefault(r(90735));var a=r(74246);var i=r(91073);var o=_interopRequireWildcard(r(584));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(0,o.default)("ArrayExpression",{fields:{elements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:!process.env.BABEL_TYPES_8_BREAKING?[]:undefined}},visitor:["elements"],aliases:["Expression"]});(0,o.default)("AssignmentExpression",{fields:{operator:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING){return(0,o.assertValueType)("string")}const e=(0,o.assertOneOf)(...i.ASSIGNMENT_OPERATORS);const t=(0,o.assertOneOf)("=");return function(r,n,a){const i=(0,s.default)("Pattern",r.left)?t:e;i(r,n,a)}}()},left:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("LVal"):(0,o.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern")},right:{validate:(0,o.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]});(0,o.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,o.assertOneOf)(...i.BINARY_OPERATORS)},left:{validate:function(){const e=(0,o.assertNodeType)("Expression");const t=(0,o.assertNodeType)("Expression","PrivateName");const r=function(r,s,n){const a=r.operator==="in"?t:e;a(r,s,n)};r.oneOfNodeTypes=["Expression","PrivateName"];return r}()},right:{validate:(0,o.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]});(0,o.default)("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}}});(0,o.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,o.assertNodeType)("DirectiveLiteral")}}});(0,o.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}}});(0,o.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Directive"))),default:[]},body:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]});(0,o.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,o.assertNodeType)("Identifier"),optional:true}},aliases:["Statement","Terminatorless","CompletionStatement"]});(0,o.default)("CallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,o.assertNodeType)("Expression","V8IntrinsicIdentifier")},arguments:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))}},!process.env.BABEL_TYPES_8_BREAKING?{optional:{validate:(0,o.assertOneOf)(true,false),optional:true}}:{},{typeArguments:{validate:(0,o.assertNodeType)("TypeParameterInstantiation"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TSTypeParameterInstantiation"),optional:true}})});(0,o.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,o.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:true},body:{validate:(0,o.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]});(0,o.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},consequent:{validate:(0,o.assertNodeType)("Expression")},alternate:{validate:(0,o.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]});(0,o.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,o.assertNodeType)("Identifier"),optional:true}},aliases:["Statement","Terminatorless","CompletionStatement"]});(0,o.default)("DebuggerStatement",{aliases:["Statement"]});(0,o.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]});(0,o.default)("EmptyStatement",{aliases:["Statement"]});(0,o.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,o.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]});(0,o.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,o.assertNodeType)("Program")},comments:{validate:!process.env.BABEL_TYPES_8_BREAKING?Object.assign(()=>{},{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}):(0,o.assertEach)((0,o.assertNodeType)("CommentBlock","CommentLine")),optional:true},tokens:{validate:(0,o.assertEach)(Object.assign(()=>{},{type:"any"})),optional:true}}});(0,o.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("VariableDeclaration","LVal"):(0,o.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern")},right:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}}});(0,o.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,o.assertNodeType)("VariableDeclaration","Expression"),optional:true},test:{validate:(0,o.assertNodeType)("Expression"),optional:true},update:{validate:(0,o.assertNodeType)("Expression"),optional:true},body:{validate:(0,o.assertNodeType)("Statement")}}});const l={params:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Identifier","Pattern","RestElement","TSParameterProperty")))},generator:{default:false},async:{default:false}};t.functionCommon=l;const u={returnType:{validate:(0,o.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:true}};t.functionTypeAnnotationCommon=u;const c=Object.assign({},l,{declare:{validate:(0,o.assertValueType)("boolean"),optional:true},id:{validate:(0,o.assertNodeType)("Identifier"),optional:true}});t.functionDeclarationCommon=c;(0,o.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:Object.assign({},c,u,{body:{validate:(0,o.assertNodeType)("BlockStatement")}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return()=>{};const e=(0,o.assertNodeType)("Identifier");return function(t,r,n){if(!(0,s.default)("ExportDefaultDeclaration",t)){e(n,"id",n.id)}}}()});(0,o.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},l,u,{id:{validate:(0,o.assertNodeType)("Identifier"),optional:true},body:{validate:(0,o.assertNodeType)("BlockStatement")}})});const p={typeAnnotation:{validate:(0,o.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator")))}};t.patternLikeCommon=p;(0,o.default)("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","PatternLike","LVal","TSEntityName"],fields:Object.assign({},p,{name:{validate:(0,o.chain)((0,o.assertValueType)("string"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!(0,n.default)(r,false)){throw new TypeError(`"${r}" is not a valid identifier name`)}},{type:"string"}))},optional:{validate:(0,o.assertValueType)("boolean"),optional:true}}),validate(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;const n=/\.(\w+)$/.exec(t);if(!n)return;const[,i]=n;const o={computed:false};if(i==="property"){if((0,s.default)("MemberExpression",e,o))return;if((0,s.default)("OptionalMemberExpression",e,o))return}else if(i==="key"){if((0,s.default)("Property",e,o))return;if((0,s.default)("Method",e,o))return}else if(i==="exported"){if((0,s.default)("ExportSpecifier",e))return}else if(i==="imported"){if((0,s.default)("ImportSpecifier",e,{imported:r}))return}else if(i==="meta"){if((0,s.default)("MetaProperty",e,{meta:r}))return}if(((0,a.isKeyword)(r.name)||(0,a.isReservedWord)(r.name,false))&&r.name!=="this"){throw new TypeError(`"${r.name}" is not a valid identifier`)}}});(0,o.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},consequent:{validate:(0,o.assertNodeType)("Statement")},alternate:{optional:true,validate:(0,o.assertNodeType)("Statement")}}});(0,o.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,o.assertNodeType)("Identifier")},body:{validate:(0,o.assertNodeType)("Statement")}}});(0,o.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,o.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,o.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,o.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]});(0,o.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,o.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,o.assertValueType)("string")},flags:{validate:(0,o.chain)((0,o.assertValueType)("string"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;const s=/[^gimsuy]/.exec(r);if(s){throw new TypeError(`"${s[0]}" is not a valid RegExp flag`)}},{type:"string"})),default:""}}});(0,o.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,o.assertOneOf)(...i.LOGICAL_OPERATORS)},left:{validate:(0,o.assertNodeType)("Expression")},right:{validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("MemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression","LVal"],fields:Object.assign({object:{validate:(0,o.assertNodeType)("Expression")},property:{validate:function(){const e=(0,o.assertNodeType)("Identifier","PrivateName");const t=(0,o.assertNodeType)("Expression");const r=function(r,s,n){const a=r.computed?t:e;a(r,s,n)};r.oneOfNodeTypes=["Expression","Identifier","PrivateName"];return r}()},computed:{default:false}},!process.env.BABEL_TYPES_8_BREAKING?{optional:{validate:(0,o.assertOneOf)(true,false),optional:true}}:{})});(0,o.default)("NewExpression",{inherits:"CallExpression"});(0,o.default)("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceFile:{validate:(0,o.assertValueType)("string")},sourceType:{validate:(0,o.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,o.assertNodeType)("InterpreterDirective"),default:null,optional:true},directives:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Directive"))),default:[]},body:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block"]});(0,o.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ObjectMethod","ObjectProperty","SpreadElement")))}}});(0,o.default)("ObjectMethod",{builder:["kind","key","params","body","computed","generator","async"],fields:Object.assign({},l,u,{kind:Object.assign({validate:(0,o.assertOneOf)("method","get","set")},!process.env.BABEL_TYPES_8_BREAKING?{default:"method"}:{}),computed:{default:false},key:{validate:function(){const e=(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral");const t=(0,o.assertNodeType)("Expression");const r=function(r,s,n){const a=r.computed?t:e;a(r,s,n)};r.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral"];return r}()},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},body:{validate:(0,o.assertNodeType)("BlockStatement")}}),visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]});(0,o.default)("ObjectProperty",{builder:["key","value","computed","shorthand",...!process.env.BABEL_TYPES_8_BREAKING?["decorators"]:[]],fields:{computed:{default:false},key:{validate:function(){const e=(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral");const t=(0,o.assertNodeType)("Expression");const r=function(r,s,n){const a=r.computed?t:e;a(r,s,n)};r.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral"];return r}()},value:{validate:(0,o.assertNodeType)("Expression","PatternLike")},shorthand:{validate:(0,o.chain)((0,o.assertValueType)("boolean"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&e.computed){throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true")}},{type:"boolean"}),function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&!(0,s.default)("Identifier",e.key)){throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}}),default:false},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:function(){const e=(0,o.assertNodeType)("Identifier","Pattern");const t=(0,o.assertNodeType)("Expression");return function(r,n,a){if(!process.env.BABEL_TYPES_8_BREAKING)return;const i=(0,s.default)("ObjectPattern",r)?e:t;i(a,"value",a.value)}}()});(0,o.default)("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["LVal","PatternLike"],deprecatedAlias:"RestProperty",fields:Object.assign({},p,{argument:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("LVal"):(0,o.assertNodeType)("Identifier","Pattern","MemberExpression")}}),validate(e,t){if(!process.env.BABEL_TYPES_8_BREAKING)return;const r=/(\w+)\[(\d+)\]/.exec(t);if(!r)throw new Error("Internal Babel error: malformed key.");const[,s,n]=r;if(e[s].length>n+1){throw new TypeError(`RestElement must be last element of ${s}`)}}});(0,o.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,o.assertNodeType)("Expression"),optional:true}}});(0,o.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression")))}},aliases:["Expression"]});(0,o.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,o.assertNodeType)("Expression"),optional:true},consequent:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Statement")))}}});(0,o.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,o.assertNodeType)("Expression")},cases:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("SwitchCase")))}}});(0,o.default)("ThisExpression",{aliases:["Expression"]});(0,o.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:(0,o.chain)((0,o.assertNodeType)("BlockStatement"),Object.assign(function(e){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!e.handler&&!e.finalizer){throw new TypeError("TryStatement expects either a handler or finalizer, or both")}},{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:true,validate:(0,o.assertNodeType)("CatchClause")},finalizer:{optional:true,validate:(0,o.assertNodeType)("BlockStatement")}}});(0,o.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:true},argument:{validate:(0,o.assertNodeType)("Expression")},operator:{validate:(0,o.assertOneOf)(...i.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]});(0,o.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:false},argument:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("Expression"):(0,o.assertNodeType)("Identifier","MemberExpression")},operator:{validate:(0,o.assertOneOf)(...i.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]});(0,o.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,o.assertValueType)("boolean"),optional:true},kind:{validate:(0,o.assertOneOf)("var","let","const")},declarations:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("VariableDeclarator")))}},validate(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!(0,s.default)("ForXStatement",e,{left:r}))return;if(r.declarations.length!==1){throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${e.type}`)}}});(0,o.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING){return(0,o.assertNodeType)("LVal")}const e=(0,o.assertNodeType)("Identifier","ArrayPattern","ObjectPattern");const t=(0,o.assertNodeType)("Identifier");return function(r,s,n){const a=r.init?e:t;a(r,s,n)}}()},definite:{optional:true,validate:(0,o.assertValueType)("boolean")},init:{optional:true,validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}}});(0,o.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}}});(0,o.default)("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},p,{left:{validate:(0,o.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression")},right:{validate:(0,o.assertNodeType)("Expression")},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}})});(0,o.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},p,{elements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeOrValueType)("null","PatternLike")))},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}})});(0,o.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},l,u,{expression:{validate:(0,o.assertValueType)("boolean")},body:{validate:(0,o.assertNodeType)("BlockStatement","Expression")}})});(0,o.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","TSDeclareMethod","TSIndexSignature")))}}});(0,o.default)("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,o.assertNodeType)("Identifier"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:true},body:{validate:(0,o.assertNodeType)("ClassBody")},superClass:{optional:true,validate:(0,o.assertNodeType)("Expression")},superTypeParameters:{validate:(0,o.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true},implements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("TSExpressionWithTypeArguments","ClassImplements"))),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},mixins:{validate:(0,o.assertNodeType)("InterfaceExtends"),optional:true}}});(0,o.default)("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,o.assertNodeType)("Identifier")},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:true},body:{validate:(0,o.assertNodeType)("ClassBody")},superClass:{optional:true,validate:(0,o.assertNodeType)("Expression")},superTypeParameters:{validate:(0,o.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true},implements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("TSExpressionWithTypeArguments","ClassImplements"))),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},mixins:{validate:(0,o.assertNodeType)("InterfaceExtends"),optional:true},declare:{validate:(0,o.assertValueType)("boolean"),optional:true},abstract:{validate:(0,o.assertValueType)("boolean"),optional:true}},validate:function(){const e=(0,o.assertNodeType)("Identifier");return function(t,r,n){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!(0,s.default)("ExportDefaultDeclaration",t)){e(n,"id",n.id)}}}()});(0,o.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,o.assertNodeType)("StringLiteral")},exportKind:(0,o.validateOptional)((0,o.assertOneOf)("type","value")),assertions:{optional:true,validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertNodeType)("ImportAttribute"))}}});(0,o.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,o.assertNodeType)("FunctionDeclaration","TSDeclareFunction","ClassDeclaration","Expression")}}});(0,o.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{optional:true,validate:(0,o.chain)((0,o.assertNodeType)("Declaration"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&e.specifiers.length){throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration")}},{oneOfNodeTypes:["Declaration"]}),function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&e.source){throw new TypeError("Cannot export a declaration from a source")}})},assertions:{optional:true,validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertNodeType)("ImportAttribute"))},specifiers:{default:[],validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)(function(){const e=(0,o.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier");const t=(0,o.assertNodeType)("ExportSpecifier");if(!process.env.BABEL_TYPES_8_BREAKING)return e;return function(r,s,n){const a=r.source?e:t;a(r,s,n)}}()))},source:{validate:(0,o.assertNodeType)("StringLiteral"),optional:true},exportKind:(0,o.validateOptional)((0,o.assertOneOf)("type","value"))}});(0,o.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")},exported:{validate:(0,o.assertNodeType)("Identifier","StringLiteral")}}});(0,o.default)("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING){return(0,o.assertNodeType)("VariableDeclaration","LVal")}const e=(0,o.assertNodeType)("VariableDeclaration");const t=(0,o.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern");return function(r,n,a){if((0,s.default)("VariableDeclaration",a)){e(r,n,a)}else{t(r,n,a)}}}()},right:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")},await:{default:false}}});(0,o.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{assertions:{optional:true,validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertNodeType)("ImportAttribute"))},specifiers:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,o.assertNodeType)("StringLiteral")},importKind:{validate:(0,o.assertOneOf)("type","typeof","value"),optional:true}}});(0,o.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")}}});(0,o.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")}}});(0,o.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")},imported:{validate:(0,o.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,o.assertOneOf)("type","typeof"),optional:true}}});(0,o.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,o.chain)((0,o.assertNodeType)("Identifier"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;let n;switch(r.name){case"function":n="sent";break;case"new":n="target";break;case"import":n="meta";break}if(!(0,s.default)("Identifier",e.property,{name:n})){throw new TypeError("Unrecognised MetaProperty")}},{oneOfNodeTypes:["Identifier"]}))},property:{validate:(0,o.assertNodeType)("Identifier")}}});const f={abstract:{validate:(0,o.assertValueType)("boolean"),optional:true},accessibility:{validate:(0,o.assertOneOf)("public","private","protected"),optional:true},static:{default:false},computed:{default:false},optional:{validate:(0,o.assertValueType)("boolean"),optional:true},key:{validate:(0,o.chain)(function(){const e=(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral");const t=(0,o.assertNodeType)("Expression");return function(r,s,n){const a=r.computed?t:e;a(r,s,n)}}(),(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral","Expression"))}};t.classMethodOrPropertyCommon=f;const d=Object.assign({},l,f,{kind:{validate:(0,o.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,o.chain)((0,o.assertValueType)("string"),(0,o.assertOneOf)("public","private","protected")),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}});t.classMethodOrDeclareMethodCommon=d;(0,o.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:Object.assign({},d,u,{body:{validate:(0,o.assertNodeType)("BlockStatement")}})});(0,o.default)("ObjectPattern",{visitor:["properties","typeAnnotation","decorators"],builder:["properties"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},p,{properties:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("RestElement","ObjectProperty")))}})});(0,o.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("Super",{aliases:["Expression"]});(0,o.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,o.assertNodeType)("Expression")},quasi:{validate:(0,o.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true}}});(0,o.default)("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,o.assertShape)({raw:{validate:(0,o.assertValueType)("string")},cooked:{validate:(0,o.assertValueType)("string"),optional:true}})},tail:{default:false}}});(0,o.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("TemplateElement")))},expressions:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression","TSType")),function(e,t,r){if(e.quasis.length!==r.length+1){throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.\nExpected ${r.length+1} quasis but got ${e.quasis.length}`)}})}}});(0,o.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,o.chain)((0,o.assertValueType)("boolean"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&!e.argument){throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")}},{type:"boolean"})),default:false},argument:{optional:true,validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("Import",{aliases:["Expression"]});(0,o.default)("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,o.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,o.assertNodeType)("Identifier")}}});(0,o.default)("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,o.assertNodeType)("Expression")},property:{validate:function(){const e=(0,o.assertNodeType)("Identifier");const t=(0,o.assertNodeType)("Expression");const r=function(r,s,n){const a=r.computed?t:e;a(r,s,n)};r.oneOfNodeTypes=["Expression","Identifier"];return r}()},computed:{default:false},optional:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertValueType)("boolean"):(0,o.chain)((0,o.assertValueType)("boolean"),(0,o.assertOptionalChainStart)())}}});(0,o.default)("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:(0,o.assertNodeType)("Expression")},arguments:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))},optional:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertValueType)("boolean"):(0,o.chain)((0,o.assertValueType)("boolean"),(0,o.assertOptionalChainStart)())},typeArguments:{validate:(0,o.assertNodeType)("TypeParameterInstantiation"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TSTypeParameterInstantiation"),optional:true}}})},7180:(e,t,r)=>{"use strict";var s=_interopRequireWildcard(r(584));var n=r(89759);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}(0,s.default)("ArgumentPlaceholder",{});(0,s.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:!process.env.BABEL_TYPES_8_BREAKING?{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})}}:{object:{validate:(0,s.assertNodeType)("Expression")},callee:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],fields:Object.assign({},n.classMethodOrPropertyCommon,{value:{validate:(0,s.assertNodeType)("Expression"),optional:true},definite:{validate:(0,s.assertValueType)("boolean"),optional:true},typeAnnotation:{validate:(0,s.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator"))),optional:true},readonly:{validate:(0,s.assertValueType)("boolean"),optional:true},declare:{validate:(0,s.assertValueType)("boolean"),optional:true}})});(0,s.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]});(0,s.default)("ClassPrivateProperty",{visitor:["key","value","decorators"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,s.assertNodeType)("PrivateName")},value:{validate:(0,s.assertNodeType)("Expression"),optional:true},typeAnnotation:{validate:(0,s.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator"))),optional:true}}});(0,s.default)("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},n.classMethodOrDeclareMethodCommon,n.functionTypeAnnotationCommon,{key:{validate:(0,s.assertNodeType)("PrivateName")},body:{validate:(0,s.assertNodeType)("BlockStatement")}})});(0,s.default)("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,s.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,s.assertNodeType)("StringLiteral")}}});(0,s.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")}}});(0,s.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,s.assertNodeType)("Identifier")}}});(0,s.default)("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,s.assertNodeType)("Identifier")}}});(0,s.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("ObjectProperty","SpreadElement")))}}});(0,s.default)("TupleExpression",{fields:{elements:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]});(0,s.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,s.default)("StaticBlock",{visitor:["body"],fields:{body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent"]})},41290:(e,t,r)=>{"use strict";var s=_interopRequireWildcard(r(584));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const n=(e,t="TypeParameterDeclaration")=>{(0,s.default)(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends","mixins","implements","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)(t),extends:(0,s.validateOptional)((0,s.arrayOfType)("InterfaceExtends")),mixins:(0,s.validateOptional)((0,s.arrayOfType)("InterfaceExtends")),implements:(0,s.validateOptional)((0,s.arrayOfType)("ClassImplements")),body:(0,s.validateType)("ObjectTypeAnnotation")}})};(0,s.default)("AnyTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow","FlowType"],fields:{elementType:(0,s.validateType)("FlowType")}});(0,s.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,s.validate)((0,s.assertValueType)("boolean"))}});(0,s.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TypeParameterInstantiation")}});n("DeclareClass");(0,s.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),predicate:(0,s.validateOptionalType)("DeclaredPredicate")}});n("DeclareInterface");(0,s.default)("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)(["Identifier","StringLiteral"]),body:(0,s.validateType)("BlockStatement"),kind:(0,s.validateOptional)((0,s.assertOneOf)("CommonJS","ES"))}});(0,s.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,s.validateType)("TypeAnnotation")}});(0,s.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TypeParameterDeclaration"),right:(0,s.validateType)("FlowType")}});(0,s.default)("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,s.validateOptionalType)("FlowType")}});(0,s.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier")}});(0,s.default)("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{declaration:(0,s.validateOptionalType)("Flow"),specifiers:(0,s.validateOptional)((0,s.arrayOfType)(["ExportSpecifier","ExportNamespaceSpecifier"])),source:(0,s.validateOptionalType)("StringLiteral"),default:(0,s.validateOptional)((0,s.assertValueType)("boolean"))}});(0,s.default)("DeclareExportAllDeclaration",{visitor:["source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{source:(0,s.validateType)("StringLiteral"),exportKind:(0,s.validateOptional)((0,s.assertOneOf)("type","value"))}});(0,s.default)("DeclaredPredicate",{visitor:["value"],aliases:["Flow","FlowPredicate"],fields:{value:(0,s.validateType)("Flow")}});(0,s.default)("ExistsTypeAnnotation",{aliases:["Flow","FlowType"]});(0,s.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow","FlowType"],fields:{typeParameters:(0,s.validateOptionalType)("TypeParameterDeclaration"),params:(0,s.validate)((0,s.arrayOfType)("FunctionTypeParam")),rest:(0,s.validateOptionalType)("FunctionTypeParam"),returnType:(0,s.validateType)("FlowType")}});(0,s.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{name:(0,s.validateOptionalType)("Identifier"),typeAnnotation:(0,s.validateType)("FlowType"),optional:(0,s.validateOptional)((0,s.assertValueType)("boolean"))}});(0,s.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow","FlowType"],fields:{id:(0,s.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,s.validateOptionalType)("TypeParameterInstantiation")}});(0,s.default)("InferredPredicate",{aliases:["Flow","FlowPredicate"]});(0,s.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{id:(0,s.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,s.validateOptionalType)("TypeParameterInstantiation")}});n("InterfaceDeclaration");(0,s.default)("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["Flow","FlowType"],fields:{extends:(0,s.validateOptional)((0,s.arrayOfType)("InterfaceExtends")),body:(0,s.validateType)("ObjectTypeAnnotation")}});(0,s.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,s.validate)((0,s.arrayOfType)("FlowType"))}});(0,s.default)("MixedTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow","FlowType"],fields:{typeAnnotation:(0,s.validateType)("FlowType")}});(0,s.default)("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,s.validate)((0,s.assertValueType)("number"))}});(0,s.default)("NumberTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["Flow","FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,s.validate)((0,s.arrayOfType)(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:(0,s.validateOptional)((0,s.arrayOfType)("ObjectTypeIndexer")),callProperties:(0,s.validateOptional)((0,s.arrayOfType)("ObjectTypeCallProperty")),internalSlots:(0,s.validateOptional)((0,s.arrayOfType)("ObjectTypeInternalSlot")),exact:{validate:(0,s.assertValueType)("boolean"),default:false},inexact:(0,s.validateOptional)((0,s.assertValueType)("boolean"))}});(0,s.default)("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["Flow","UserWhitespacable"],fields:{id:(0,s.validateType)("Identifier"),value:(0,s.validateType)("FlowType"),optional:(0,s.validate)((0,s.assertValueType)("boolean")),static:(0,s.validate)((0,s.assertValueType)("boolean")),method:(0,s.validate)((0,s.assertValueType)("boolean"))}});(0,s.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{value:(0,s.validateType)("FlowType"),static:(0,s.validate)((0,s.assertValueType)("boolean"))}});(0,s.default)("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["Flow","UserWhitespacable"],fields:{id:(0,s.validateOptionalType)("Identifier"),key:(0,s.validateType)("FlowType"),value:(0,s.validateType)("FlowType"),static:(0,s.validate)((0,s.assertValueType)("boolean")),variance:(0,s.validateOptionalType)("Variance")}});(0,s.default)("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["Flow","UserWhitespacable"],fields:{key:(0,s.validateType)(["Identifier","StringLiteral"]),value:(0,s.validateType)("FlowType"),kind:(0,s.validate)((0,s.assertOneOf)("init","get","set")),static:(0,s.validate)((0,s.assertValueType)("boolean")),proto:(0,s.validate)((0,s.assertValueType)("boolean")),optional:(0,s.validate)((0,s.assertValueType)("boolean")),variance:(0,s.validateOptionalType)("Variance"),method:(0,s.validate)((0,s.assertValueType)("boolean"))}});(0,s.default)("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["Flow","UserWhitespacable"],fields:{argument:(0,s.validateType)("FlowType")}});(0,s.default)("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,s.validateOptionalType)("FlowType"),impltype:(0,s.validateType)("FlowType")}});(0,s.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{id:(0,s.validateType)("Identifier"),qualification:(0,s.validateType)(["Identifier","QualifiedTypeIdentifier"])}});(0,s.default)("StringLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,s.validate)((0,s.assertValueType)("string"))}});(0,s.default)("StringTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("SymbolTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("ThisTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,s.validate)((0,s.arrayOfType)("FlowType"))}});(0,s.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow","FlowType"],fields:{argument:(0,s.validateType)("FlowType")}});(0,s.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TypeParameterDeclaration"),right:(0,s.validateType)("FlowType")}});(0,s.default)("TypeAnnotation",{aliases:["Flow"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,s.validateType)("FlowType")}});(0,s.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{expression:(0,s.validateType)("Expression"),typeAnnotation:(0,s.validateType)("TypeAnnotation")}});(0,s.default)("TypeParameter",{aliases:["Flow"],visitor:["bound","default","variance"],fields:{name:(0,s.validate)((0,s.assertValueType)("string")),bound:(0,s.validateOptionalType)("TypeAnnotation"),default:(0,s.validateOptionalType)("FlowType"),variance:(0,s.validateOptionalType)("Variance")}});(0,s.default)("TypeParameterDeclaration",{aliases:["Flow"],visitor:["params"],fields:{params:(0,s.validate)((0,s.arrayOfType)("TypeParameter"))}});(0,s.default)("TypeParameterInstantiation",{aliases:["Flow"],visitor:["params"],fields:{params:(0,s.validate)((0,s.arrayOfType)("FlowType"))}});(0,s.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,s.validate)((0,s.arrayOfType)("FlowType"))}});(0,s.default)("Variance",{aliases:["Flow"],builder:["kind"],fields:{kind:(0,s.validate)((0,s.assertOneOf)("minus","plus"))}});(0,s.default)("VoidTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,s.validateType)("Identifier"),body:(0,s.validateType)(["EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody"])}});(0,s.default)("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,s.validate)((0,s.assertValueType)("boolean")),members:(0,s.validateArrayOfType)("EnumBooleanMember")}});(0,s.default)("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,s.validate)((0,s.assertValueType)("boolean")),members:(0,s.validateArrayOfType)("EnumNumberMember")}});(0,s.default)("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,s.validate)((0,s.assertValueType)("boolean")),members:(0,s.validateArrayOfType)(["EnumStringMember","EnumDefaultedMember"])}});(0,s.default)("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,s.validateArrayOfType)("EnumDefaultedMember")}});(0,s.default)("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,s.validateType)("Identifier"),init:(0,s.validateType)("BooleanLiteral")}});(0,s.default)("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,s.validateType)("Identifier"),init:(0,s.validateType)("NumericLiteral")}});(0,s.default)("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,s.validateType)("Identifier"),init:(0,s.validateType)("StringLiteral")}});(0,s.default)("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,s.validateType)("Identifier")}})},74098:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"VISITOR_KEYS",{enumerable:true,get:function(){return n.VISITOR_KEYS}});Object.defineProperty(t,"ALIAS_KEYS",{enumerable:true,get:function(){return n.ALIAS_KEYS}});Object.defineProperty(t,"FLIPPED_ALIAS_KEYS",{enumerable:true,get:function(){return n.FLIPPED_ALIAS_KEYS}});Object.defineProperty(t,"NODE_FIELDS",{enumerable:true,get:function(){return n.NODE_FIELDS}});Object.defineProperty(t,"BUILDER_KEYS",{enumerable:true,get:function(){return n.BUILDER_KEYS}});Object.defineProperty(t,"DEPRECATED_KEYS",{enumerable:true,get:function(){return n.DEPRECATED_KEYS}});Object.defineProperty(t,"NODE_PARENT_VALIDATIONS",{enumerable:true,get:function(){return n.NODE_PARENT_VALIDATIONS}});Object.defineProperty(t,"PLACEHOLDERS",{enumerable:true,get:function(){return a.PLACEHOLDERS}});Object.defineProperty(t,"PLACEHOLDERS_ALIAS",{enumerable:true,get:function(){return a.PLACEHOLDERS_ALIAS}});Object.defineProperty(t,"PLACEHOLDERS_FLIPPED_ALIAS",{enumerable:true,get:function(){return a.PLACEHOLDERS_FLIPPED_ALIAS}});t.TYPES=void 0;var s=_interopRequireDefault(r(80035));r(89759);r(41290);r(26924);r(14429);r(7180);r(83812);var n=r(584);var a=r(8689);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(0,s.default)(n.VISITOR_KEYS);(0,s.default)(n.ALIAS_KEYS);(0,s.default)(n.FLIPPED_ALIAS_KEYS);(0,s.default)(n.NODE_FIELDS);(0,s.default)(n.BUILDER_KEYS);(0,s.default)(n.DEPRECATED_KEYS);(0,s.default)(a.PLACEHOLDERS_ALIAS);(0,s.default)(a.PLACEHOLDERS_FLIPPED_ALIAS);const i=Object.keys(n.VISITOR_KEYS).concat(Object.keys(n.FLIPPED_ALIAS_KEYS)).concat(Object.keys(n.DEPRECATED_KEYS));t.TYPES=i},26924:(e,t,r)=>{"use strict";var s=_interopRequireWildcard(r(584));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}(0,s.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,s.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:true,validate:(0,s.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}});(0,s.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,s.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}});(0,s.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,s.assertNodeType)("JSXOpeningElement")},closingElement:{optional:true,validate:(0,s.assertNodeType)("JSXClosingElement")},children:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))},selfClosing:{validate:(0,s.assertValueType)("boolean"),optional:true}}});(0,s.default)("JSXEmptyExpression",{aliases:["JSX"]});(0,s.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,s.assertNodeType)("Expression","JSXEmptyExpression")}}});(0,s.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("JSXIdentifier",{builder:["name"],aliases:["JSX"],fields:{name:{validate:(0,s.assertValueType)("string")}}});(0,s.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX"],fields:{object:{validate:(0,s.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,s.assertNodeType)("JSXIdentifier")}}});(0,s.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,s.assertNodeType)("JSXIdentifier")},name:{validate:(0,s.assertNodeType)("JSXIdentifier")}}});(0,s.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,s.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:false},attributes:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:(0,s.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true}}});(0,s.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}}});(0,s.default)("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["JSX","Immutable","Expression"],fields:{openingFragment:{validate:(0,s.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,s.assertNodeType)("JSXClosingFragment")},children:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}});(0,s.default)("JSXOpeningFragment",{aliases:["JSX","Immutable"]});(0,s.default)("JSXClosingFragment",{aliases:["JSX","Immutable"]})},14429:(e,t,r)=>{"use strict";var s=_interopRequireWildcard(r(584));var n=r(8689);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}(0,s.default)("Noop",{visitor:[]});(0,s.default)("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:(0,s.assertNodeType)("Identifier")},expectedNode:{validate:(0,s.assertOneOf)(...n.PLACEHOLDERS)}}});(0,s.default)("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,s.assertValueType)("string")}}})},8689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PLACEHOLDERS_FLIPPED_ALIAS=t.PLACEHOLDERS_ALIAS=t.PLACEHOLDERS=void 0;var s=r(584);const n=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"];t.PLACEHOLDERS=n;const a={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};t.PLACEHOLDERS_ALIAS=a;for(const e of n){const t=s.ALIAS_KEYS[e];if(t==null?void 0:t.length)a[e]=t}const i={};t.PLACEHOLDERS_FLIPPED_ALIAS=i;Object.keys(a).forEach(e=>{a[e].forEach(t=>{if(!Object.hasOwnProperty.call(i,t)){i[t]=[]}i[t].push(e)})})},83812:(e,t,r)=>{"use strict";var s=_interopRequireWildcard(r(584));var n=r(89759);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const a=(0,s.assertValueType)("boolean");const i={returnType:{validate:(0,s.assertNodeType)("TSTypeAnnotation","Noop"),optional:true},typeParameters:{validate:(0,s.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:true}};(0,s.default)("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,s.assertOneOf)("public","private","protected"),optional:true},readonly:{validate:(0,s.assertValueType)("boolean"),optional:true},parameter:{validate:(0,s.assertNodeType)("Identifier","AssignmentPattern")}}});(0,s.default)("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},n.functionDeclarationCommon,i)});(0,s.default)("TSDeclareMethod",{visitor:["decorators","key","typeParameters","params","returnType"],fields:Object.assign({},n.classMethodOrDeclareMethodCommon,i)});(0,s.default)("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,s.validateType)("TSEntityName"),right:(0,s.validateType)("Identifier")}});const o={typeParameters:(0,s.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,s.validateArrayOfType)(["Identifier","RestElement"]),typeAnnotation:(0,s.validateOptionalType)("TSTypeAnnotation")};const l={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:o};(0,s.default)("TSCallSignatureDeclaration",l);(0,s.default)("TSConstructSignatureDeclaration",l);const u={key:(0,s.validateType)("Expression"),computed:(0,s.validate)(a),optional:(0,s.validateOptional)(a)};(0,s.default)("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation","initializer"],fields:Object.assign({},u,{readonly:(0,s.validateOptional)(a),typeAnnotation:(0,s.validateOptionalType)("TSTypeAnnotation"),initializer:(0,s.validateOptionalType)("Expression")})});(0,s.default)("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},o,u)});(0,s.default)("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,s.validateOptional)(a),parameters:(0,s.validateArrayOfType)("Identifier"),typeAnnotation:(0,s.validateOptionalType)("TSTypeAnnotation")}});const c=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const e of c){(0,s.default)(e,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}})}(0,s.default)("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const p={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"],fields:o};(0,s.default)("TSFunctionType",p);(0,s.default)("TSConstructorType",p);(0,s.default)("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,s.validateType)("TSEntityName"),typeParameters:(0,s.validateOptionalType)("TSTypeParameterInstantiation")}});(0,s.default)("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,s.validateType)(["Identifier","TSThisType"]),typeAnnotation:(0,s.validateOptionalType)("TSTypeAnnotation"),asserts:(0,s.validateOptional)(a)}});(0,s.default)("TSTypeQuery",{aliases:["TSType"],visitor:["exprName"],fields:{exprName:(0,s.validateType)(["TSEntityName","TSImportType"])}});(0,s.default)("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,s.validateArrayOfType)("TSTypeElement")}});(0,s.default)("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,s.validateType)("TSType")}});(0,s.default)("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,s.validateArrayOfType)(["TSType","TSNamedTupleMember"])}});(0,s.default)("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,s.validateType)("Identifier"),optional:{validate:a,default:false},elementType:(0,s.validateType)("TSType")}});const f={aliases:["TSType"],visitor:["types"],fields:{types:(0,s.validateArrayOfType)("TSType")}};(0,s.default)("TSUnionType",f);(0,s.default)("TSIntersectionType",f);(0,s.default)("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,s.validateType)("TSType"),extendsType:(0,s.validateType)("TSType"),trueType:(0,s.validateType)("TSType"),falseType:(0,s.validateType)("TSType")}});(0,s.default)("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,s.validateType)("TSTypeParameter")}});(0,s.default)("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{operator:(0,s.validate)((0,s.assertValueType)("string")),typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,s.validateType)("TSType"),indexType:(0,s.validateType)("TSType")}});(0,s.default)("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","typeAnnotation","nameType"],fields:{readonly:(0,s.validateOptional)(a),typeParameter:(0,s.validateType)("TSTypeParameter"),optional:(0,s.validateOptional)(a),typeAnnotation:(0,s.validateOptionalType)("TSType"),nameType:(0,s.validateOptionalType)("TSType")}});(0,s.default)("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:(0,s.validateType)(["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral"])}});(0,s.default)("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,s.validateType)("TSEntityName"),typeParameters:(0,s.validateOptionalType)("TSTypeParameterInstantiation")}});(0,s.default)("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,s.validateOptional)(a),id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,s.validateOptional)((0,s.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,s.validateType)("TSInterfaceBody")}});(0,s.default)("TSInterfaceBody",{visitor:["body"],fields:{body:(0,s.validateArrayOfType)("TSTypeElement")}});(0,s.default)("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,s.validateOptional)(a),id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSAsExpression",{aliases:["Expression"],visitor:["expression","typeAnnotation"],fields:{expression:(0,s.validateType)("Expression"),typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSTypeAssertion",{aliases:["Expression"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,s.validateType)("TSType"),expression:(0,s.validateType)("Expression")}});(0,s.default)("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,s.validateOptional)(a),const:(0,s.validateOptional)(a),id:(0,s.validateType)("Identifier"),members:(0,s.validateArrayOfType)("TSEnumMember"),initializer:(0,s.validateOptionalType)("Expression")}});(0,s.default)("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,s.validateType)(["Identifier","StringLiteral"]),initializer:(0,s.validateOptionalType)("Expression")}});(0,s.default)("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:(0,s.validateOptional)(a),global:(0,s.validateOptional)(a),id:(0,s.validateType)(["Identifier","StringLiteral"]),body:(0,s.validateType)(["TSModuleBlock","TSModuleDeclaration"])}});(0,s.default)("TSModuleBlock",{aliases:["Scopable","Block","BlockParent"],visitor:["body"],fields:{body:(0,s.validateArrayOfType)("Statement")}});(0,s.default)("TSImportType",{aliases:["TSType"],visitor:["argument","qualifier","typeParameters"],fields:{argument:(0,s.validateType)("StringLiteral"),qualifier:(0,s.validateOptionalType)("TSEntityName"),typeParameters:(0,s.validateOptionalType)("TSTypeParameterInstantiation")}});(0,s.default)("TSImportEqualsDeclaration",{aliases:["Statement"],visitor:["id","moduleReference"],fields:{isExport:(0,s.validate)(a),id:(0,s.validateType)("Identifier"),moduleReference:(0,s.validateType)(["TSEntityName","TSExternalModuleReference"])}});(0,s.default)("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,s.validateType)("StringLiteral")}});(0,s.default)("TSNonNullExpression",{aliases:["Expression"],visitor:["expression"],fields:{expression:(0,s.validateType)("Expression")}});(0,s.default)("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,s.validateType)("Expression")}});(0,s.default)("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,s.validateType)("Identifier")}});(0,s.default)("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,s.assertNodeType)("TSType")}}});(0,s.default)("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("TSType")))}}});(0,s.default)("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("TSTypeParameter")))}}});(0,s.default)("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,s.assertValueType)("string")},constraint:{validate:(0,s.assertNodeType)("TSType"),optional:true},default:{validate:(0,s.assertNodeType)("TSType"),optional:true}}})},584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validate=validate;t.typeIs=typeIs;t.validateType=validateType;t.validateOptional=validateOptional;t.validateOptionalType=validateOptionalType;t.arrayOf=arrayOf;t.arrayOfType=arrayOfType;t.validateArrayOfType=validateArrayOfType;t.assertEach=assertEach;t.assertOneOf=assertOneOf;t.assertNodeType=assertNodeType;t.assertNodeOrValueType=assertNodeOrValueType;t.assertValueType=assertValueType;t.assertShape=assertShape;t.assertOptionalChainStart=assertOptionalChainStart;t.chain=chain;t.default=defineType;t.NODE_PARENT_VALIDATIONS=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.FLIPPED_ALIAS_KEYS=t.ALIAS_KEYS=t.VISITOR_KEYS=void 0;var s=_interopRequireDefault(r(28422));var n=r(81236);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const a={};t.VISITOR_KEYS=a;const i={};t.ALIAS_KEYS=i;const o={};t.FLIPPED_ALIAS_KEYS=o;const l={};t.NODE_FIELDS=l;const u={};t.BUILDER_KEYS=u;const c={};t.DEPRECATED_KEYS=c;const p={};t.NODE_PARENT_VALIDATIONS=p;function getType(e){if(Array.isArray(e)){return"array"}else if(e===null){return"null"}else{return typeof e}}function validate(e){return{validate:e}}function typeIs(e){return typeof e==="string"?assertNodeType(e):assertNodeType(...e)}function validateType(e){return validate(typeIs(e))}function validateOptional(e){return{validate:e,optional:true}}function validateOptionalType(e){return{validate:typeIs(e),optional:true}}function arrayOf(e){return chain(assertValueType("array"),assertEach(e))}function arrayOfType(e){return arrayOf(typeIs(e))}function validateArrayOfType(e){return validate(arrayOfType(e))}function assertEach(e){function validator(t,r,s){if(!Array.isArray(s))return;for(let a=0;a{o[t]=o[t]||[];o[t].push(e)});if(t.validate){p[e]=t.validate}y[e]=t}const y={}},63760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s={react:true,assertNode:true,createTypeAnnotationBasedOnTypeof:true,createUnionTypeAnnotation:true,createFlowUnionType:true,createTSUnionType:true,cloneNode:true,clone:true,cloneDeep:true,cloneDeepWithoutLoc:true,cloneWithoutLoc:true,addComment:true,addComments:true,inheritInnerComments:true,inheritLeadingComments:true,inheritsComments:true,inheritTrailingComments:true,removeComments:true,ensureBlock:true,toBindingIdentifierName:true,toBlock:true,toComputedKey:true,toExpression:true,toIdentifier:true,toKeyAlias:true,toSequenceExpression:true,toStatement:true,valueToNode:true,appendToMemberExpression:true,inherits:true,prependToMemberExpression:true,removeProperties:true,removePropertiesDeep:true,removeTypeDuplicates:true,getBindingIdentifiers:true,getOuterBindingIdentifiers:true,traverse:true,traverseFast:true,shallowEqual:true,is:true,isBinding:true,isBlockScoped:true,isImmutable:true,isLet:true,isNode:true,isNodesEquivalent:true,isPlaceholderType:true,isReferenced:true,isScope:true,isSpecifierDefault:true,isType:true,isValidES3Identifier:true,isValidIdentifier:true,isVar:true,matchesPattern:true,validate:true,buildMatchMemberExpression:true};Object.defineProperty(t,"assertNode",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"createTypeAnnotationBasedOnTypeof",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"createUnionTypeAnnotation",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"createFlowUnionType",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"createTSUnionType",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"cloneNode",{enumerable:true,get:function(){return y.default}});Object.defineProperty(t,"clone",{enumerable:true,get:function(){return h.default}});Object.defineProperty(t,"cloneDeep",{enumerable:true,get:function(){return m.default}});Object.defineProperty(t,"cloneDeepWithoutLoc",{enumerable:true,get:function(){return g.default}});Object.defineProperty(t,"cloneWithoutLoc",{enumerable:true,get:function(){return b.default}});Object.defineProperty(t,"addComment",{enumerable:true,get:function(){return x.default}});Object.defineProperty(t,"addComments",{enumerable:true,get:function(){return v.default}});Object.defineProperty(t,"inheritInnerComments",{enumerable:true,get:function(){return E.default}});Object.defineProperty(t,"inheritLeadingComments",{enumerable:true,get:function(){return T.default}});Object.defineProperty(t,"inheritsComments",{enumerable:true,get:function(){return S.default}});Object.defineProperty(t,"inheritTrailingComments",{enumerable:true,get:function(){return P.default}});Object.defineProperty(t,"removeComments",{enumerable:true,get:function(){return j.default}});Object.defineProperty(t,"ensureBlock",{enumerable:true,get:function(){return D.default}});Object.defineProperty(t,"toBindingIdentifierName",{enumerable:true,get:function(){return O.default}});Object.defineProperty(t,"toBlock",{enumerable:true,get:function(){return _.default}});Object.defineProperty(t,"toComputedKey",{enumerable:true,get:function(){return C.default}});Object.defineProperty(t,"toExpression",{enumerable:true,get:function(){return I.default}});Object.defineProperty(t,"toIdentifier",{enumerable:true,get:function(){return k.default}});Object.defineProperty(t,"toKeyAlias",{enumerable:true,get:function(){return R.default}});Object.defineProperty(t,"toSequenceExpression",{enumerable:true,get:function(){return M.default}});Object.defineProperty(t,"toStatement",{enumerable:true,get:function(){return N.default}});Object.defineProperty(t,"valueToNode",{enumerable:true,get:function(){return F.default}});Object.defineProperty(t,"appendToMemberExpression",{enumerable:true,get:function(){return B.default}});Object.defineProperty(t,"inherits",{enumerable:true,get:function(){return q.default}});Object.defineProperty(t,"prependToMemberExpression",{enumerable:true,get:function(){return W.default}});Object.defineProperty(t,"removeProperties",{enumerable:true,get:function(){return U.default}});Object.defineProperty(t,"removePropertiesDeep",{enumerable:true,get:function(){return K.default}});Object.defineProperty(t,"removeTypeDuplicates",{enumerable:true,get:function(){return V.default}});Object.defineProperty(t,"getBindingIdentifiers",{enumerable:true,get:function(){return $.default}});Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:true,get:function(){return J.default}});Object.defineProperty(t,"traverse",{enumerable:true,get:function(){return H.default}});Object.defineProperty(t,"traverseFast",{enumerable:true,get:function(){return G.default}});Object.defineProperty(t,"shallowEqual",{enumerable:true,get:function(){return Y.default}});Object.defineProperty(t,"is",{enumerable:true,get:function(){return X.default}});Object.defineProperty(t,"isBinding",{enumerable:true,get:function(){return z.default}});Object.defineProperty(t,"isBlockScoped",{enumerable:true,get:function(){return Q.default}});Object.defineProperty(t,"isImmutable",{enumerable:true,get:function(){return Z.default}});Object.defineProperty(t,"isLet",{enumerable:true,get:function(){return ee.default}});Object.defineProperty(t,"isNode",{enumerable:true,get:function(){return te.default}});Object.defineProperty(t,"isNodesEquivalent",{enumerable:true,get:function(){return re.default}});Object.defineProperty(t,"isPlaceholderType",{enumerable:true,get:function(){return se.default}});Object.defineProperty(t,"isReferenced",{enumerable:true,get:function(){return ne.default}});Object.defineProperty(t,"isScope",{enumerable:true,get:function(){return ae.default}});Object.defineProperty(t,"isSpecifierDefault",{enumerable:true,get:function(){return ie.default}});Object.defineProperty(t,"isType",{enumerable:true,get:function(){return oe.default}});Object.defineProperty(t,"isValidES3Identifier",{enumerable:true,get:function(){return le.default}});Object.defineProperty(t,"isValidIdentifier",{enumerable:true,get:function(){return ue.default}});Object.defineProperty(t,"isVar",{enumerable:true,get:function(){return ce.default}});Object.defineProperty(t,"matchesPattern",{enumerable:true,get:function(){return pe.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return fe.default}});Object.defineProperty(t,"buildMatchMemberExpression",{enumerable:true,get:function(){return de.default}});t.react=void 0;var n=_interopRequireDefault(r(10800));var a=_interopRequireDefault(r(80593));var i=_interopRequireDefault(r(67629));var o=_interopRequireDefault(r(34654));var l=r(28970);Object.keys(l).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===l[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return l[e]}})});var u=_interopRequireDefault(r(52989));var c=_interopRequireDefault(r(78581));var p=_interopRequireDefault(r(95720));var f=r(35093);Object.keys(f).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===f[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return f[e]}})});var d=r(1221);Object.keys(d).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===d[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return d[e]}})});var y=_interopRequireDefault(r(78068));var h=_interopRequireDefault(r(10063));var m=_interopRequireDefault(r(9784));var g=_interopRequireDefault(r(59233));var b=_interopRequireDefault(r(80405));var x=_interopRequireDefault(r(55899));var v=_interopRequireDefault(r(85565));var E=_interopRequireDefault(r(63307));var T=_interopRequireDefault(r(94149));var S=_interopRequireDefault(r(58245));var P=_interopRequireDefault(r(41177));var j=_interopRequireDefault(r(4496));var w=r(69946);Object.keys(w).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===w[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return w[e]}})});var A=r(91073);Object.keys(A).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===A[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return A[e]}})});var D=_interopRequireDefault(r(30965));var O=_interopRequireDefault(r(77853));var _=_interopRequireDefault(r(96262));var C=_interopRequireDefault(r(9212));var I=_interopRequireDefault(r(96456));var k=_interopRequireDefault(r(76898));var R=_interopRequireDefault(r(41093));var M=_interopRequireDefault(r(62591));var N=_interopRequireDefault(r(67166));var F=_interopRequireDefault(r(39331));var L=r(74098);Object.keys(L).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===L[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return L[e]}})});var B=_interopRequireDefault(r(3340));var q=_interopRequireDefault(r(83092));var W=_interopRequireDefault(r(55727));var U=_interopRequireDefault(r(95313));var K=_interopRequireDefault(r(22686));var V=_interopRequireDefault(r(77523));var $=_interopRequireDefault(r(97723));var J=_interopRequireDefault(r(73946));var H=_interopRequireWildcard(r(11691));Object.keys(H).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===H[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return H[e]}})});var G=_interopRequireDefault(r(39361));var Y=_interopRequireDefault(r(80400));var X=_interopRequireDefault(r(28422));var z=_interopRequireDefault(r(52459));var Q=_interopRequireDefault(r(16800));var Z=_interopRequireDefault(r(66028));var ee=_interopRequireDefault(r(63289));var te=_interopRequireDefault(r(95595));var re=_interopRequireDefault(r(40191));var se=_interopRequireDefault(r(8010));var ne=_interopRequireDefault(r(898));var ae=_interopRequireDefault(r(45379));var ie=_interopRequireDefault(r(10932));var oe=_interopRequireDefault(r(30699));var le=_interopRequireDefault(r(29834));var ue=_interopRequireDefault(r(90735));var ce=_interopRequireDefault(r(8965));var pe=_interopRequireDefault(r(71854));var fe=_interopRequireDefault(r(81236));var de=_interopRequireDefault(r(66449));var ye=r(18939);Object.keys(ye).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===ye[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return ye[e]}})});var he=r(5416);Object.keys(he).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===he[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return he[e]}})});function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const me={isReactComponent:n.default,isCompatTag:a.default,buildChildren:i.default};t.react=me},3340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=appendToMemberExpression;var s=r(35093);function appendToMemberExpression(e,t,r=false){e.object=(0,s.memberExpression)(e.object,e.property,e.computed);e.property=t;e.computed=!!r;return e}},77523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=removeTypeDuplicates;var s=r(18939);function getQualifiedName(e){return(0,s.isIdentifier)(e)?e.name:`${e.id.name}.${getQualifiedName(e.qualification)}`}function removeTypeDuplicates(e){const t={};const r={};const n=[];const a=[];for(let i=0;i=0){continue}if((0,s.isAnyTypeAnnotation)(o)){return[o]}if((0,s.isFlowBaseAnnotation)(o)){r[o.type]=o;continue}if((0,s.isUnionTypeAnnotation)(o)){if(n.indexOf(o.types)<0){e=e.concat(o.types);n.push(o.types)}continue}if((0,s.isGenericTypeAnnotation)(o)){const e=getQualifiedName(o.id);if(t[e]){let r=t[e];if(r.typeParameters){if(o.typeParameters){r.typeParameters.params=removeTypeDuplicates(r.typeParameters.params.concat(o.typeParameters.params))}}else{r=o.typeParameters}}else{t[e]=o}continue}a.push(o)}for(const e of Object.keys(r)){a.push(r[e])}for(const e of Object.keys(t)){a.push(t[e])}return a}},83092:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inherits;var s=r(91073);var n=_interopRequireDefault(r(58245));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function inherits(e,t){if(!e||!t)return e;for(const r of s.INHERIT_KEYS.optional){if(e[r]==null){e[r]=t[r]}}for(const r of Object.keys(t)){if(r[0]==="_"&&r!=="__clone")e[r]=t[r]}for(const r of s.INHERIT_KEYS.force){e[r]=t[r]}(0,n.default)(e,t);return e}},55727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=prependToMemberExpression;var s=r(35093);function prependToMemberExpression(e,t){e.object=(0,s.memberExpression)(t,e.object);return e}},95313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=removeProperties;var s=r(91073);const n=["tokens","start","end","loc","raw","rawValue"];const a=s.COMMENT_KEYS.concat(["comments"]).concat(n);function removeProperties(e,t={}){const r=t.preserveComments?n:a;for(const t of r){if(e[t]!=null)e[t]=undefined}for(const t of Object.keys(e)){if(t[0]==="_"&&e[t]!=null)e[t]=undefined}const s=Object.getOwnPropertySymbols(e);for(const t of s){e[t]=null}}},22686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=removePropertiesDeep;var s=_interopRequireDefault(r(39361));var n=_interopRequireDefault(r(95313));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function removePropertiesDeep(e,t){(0,s.default)(e,n.default,t);return e}},47196:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=removeTypeDuplicates;var s=r(18939);function removeTypeDuplicates(e){const t={};const r={};const n=[];const a=[];for(let t=0;t=0){continue}if((0,s.isTSAnyKeyword)(i)){return[i]}if((0,s.isTSBaseType)(i)){r[i.type]=i;continue}if((0,s.isTSUnionType)(i)){if(n.indexOf(i.types)<0){e=e.concat(i.types);n.push(i.types)}continue}a.push(i)}for(const e of Object.keys(r)){a.push(r[e])}for(const e of Object.keys(t)){a.push(t[e])}return a}},97723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=getBindingIdentifiers;var s=r(18939);function getBindingIdentifiers(e,t,r){let n=[].concat(e);const a=Object.create(null);while(n.length){const e=n.shift();if(!e)continue;const i=getBindingIdentifiers.keys[e.type];if((0,s.isIdentifier)(e)){if(t){const t=a[e.name]=a[e.name]||[];t.push(e)}else{a[e.name]=e}continue}if((0,s.isExportDeclaration)(e)&&!(0,s.isExportAllDeclaration)(e)){if((0,s.isDeclaration)(e.declaration)){n.push(e.declaration)}continue}if(r){if((0,s.isFunctionDeclaration)(e)){n.push(e.id);continue}if((0,s.isFunctionExpression)(e)){continue}}if(i){for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(97723));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var n=getOuterBindingIdentifiers;t.default=n;function getOuterBindingIdentifiers(e,t){return(0,s.default)(e,t,true)}},11691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=traverse;var s=r(74098);function traverse(e,t,r){if(typeof t==="function"){t={enter:t}}const{enter:s,exit:n}=t;traverseSimpleImpl(e,s,n,r,[])}function traverseSimpleImpl(e,t,r,n,a){const i=s.VISITOR_KEYS[e.type];if(!i)return;if(t)t(e,a,n);for(const s of i){const i=e[s];if(Array.isArray(i)){for(let o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=traverseFast;var s=r(74098);function traverseFast(e,t,r){if(!e)return;const n=s.VISITOR_KEYS[e.type];if(!n)return;r=r||{};t(e,r);for(const s of n){const n=e[s];if(Array.isArray(n)){for(const e of n){traverseFast(e,t,r)}}else{traverseFast(n,t,r)}}}},74837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inherit;function inherit(e,t,r){if(t&&r){t[e]=Array.from(new Set([].concat(t[e],r[e]).filter(Boolean)))}}},82646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=cleanJSXElementLiteralChild;var s=r(35093);function cleanJSXElementLiteralChild(e,t){const r=e.value.split(/\r\n|\n|\r/);let n=0;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=shallowEqual;function shallowEqual(e,t){const r=Object.keys(t);for(const s of r){if(e[s]!==t[s]){return false}}return true}},66449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=buildMatchMemberExpression;var s=_interopRequireDefault(r(71854));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function buildMatchMemberExpression(e,t){const r=e.split(".");return e=>(0,s.default)(e,r,t)}},18939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isArrayExpression=isArrayExpression;t.isAssignmentExpression=isAssignmentExpression;t.isBinaryExpression=isBinaryExpression;t.isInterpreterDirective=isInterpreterDirective;t.isDirective=isDirective;t.isDirectiveLiteral=isDirectiveLiteral;t.isBlockStatement=isBlockStatement;t.isBreakStatement=isBreakStatement;t.isCallExpression=isCallExpression;t.isCatchClause=isCatchClause;t.isConditionalExpression=isConditionalExpression;t.isContinueStatement=isContinueStatement;t.isDebuggerStatement=isDebuggerStatement;t.isDoWhileStatement=isDoWhileStatement;t.isEmptyStatement=isEmptyStatement;t.isExpressionStatement=isExpressionStatement;t.isFile=isFile;t.isForInStatement=isForInStatement;t.isForStatement=isForStatement;t.isFunctionDeclaration=isFunctionDeclaration;t.isFunctionExpression=isFunctionExpression;t.isIdentifier=isIdentifier;t.isIfStatement=isIfStatement;t.isLabeledStatement=isLabeledStatement;t.isStringLiteral=isStringLiteral;t.isNumericLiteral=isNumericLiteral;t.isNullLiteral=isNullLiteral;t.isBooleanLiteral=isBooleanLiteral;t.isRegExpLiteral=isRegExpLiteral;t.isLogicalExpression=isLogicalExpression;t.isMemberExpression=isMemberExpression;t.isNewExpression=isNewExpression;t.isProgram=isProgram;t.isObjectExpression=isObjectExpression;t.isObjectMethod=isObjectMethod;t.isObjectProperty=isObjectProperty;t.isRestElement=isRestElement;t.isReturnStatement=isReturnStatement;t.isSequenceExpression=isSequenceExpression;t.isParenthesizedExpression=isParenthesizedExpression;t.isSwitchCase=isSwitchCase;t.isSwitchStatement=isSwitchStatement;t.isThisExpression=isThisExpression;t.isThrowStatement=isThrowStatement;t.isTryStatement=isTryStatement;t.isUnaryExpression=isUnaryExpression;t.isUpdateExpression=isUpdateExpression;t.isVariableDeclaration=isVariableDeclaration;t.isVariableDeclarator=isVariableDeclarator;t.isWhileStatement=isWhileStatement;t.isWithStatement=isWithStatement;t.isAssignmentPattern=isAssignmentPattern;t.isArrayPattern=isArrayPattern;t.isArrowFunctionExpression=isArrowFunctionExpression;t.isClassBody=isClassBody;t.isClassExpression=isClassExpression;t.isClassDeclaration=isClassDeclaration;t.isExportAllDeclaration=isExportAllDeclaration;t.isExportDefaultDeclaration=isExportDefaultDeclaration;t.isExportNamedDeclaration=isExportNamedDeclaration;t.isExportSpecifier=isExportSpecifier;t.isForOfStatement=isForOfStatement;t.isImportDeclaration=isImportDeclaration;t.isImportDefaultSpecifier=isImportDefaultSpecifier;t.isImportNamespaceSpecifier=isImportNamespaceSpecifier;t.isImportSpecifier=isImportSpecifier;t.isMetaProperty=isMetaProperty;t.isClassMethod=isClassMethod;t.isObjectPattern=isObjectPattern;t.isSpreadElement=isSpreadElement;t.isSuper=isSuper;t.isTaggedTemplateExpression=isTaggedTemplateExpression;t.isTemplateElement=isTemplateElement;t.isTemplateLiteral=isTemplateLiteral;t.isYieldExpression=isYieldExpression;t.isAwaitExpression=isAwaitExpression;t.isImport=isImport;t.isBigIntLiteral=isBigIntLiteral;t.isExportNamespaceSpecifier=isExportNamespaceSpecifier;t.isOptionalMemberExpression=isOptionalMemberExpression;t.isOptionalCallExpression=isOptionalCallExpression;t.isAnyTypeAnnotation=isAnyTypeAnnotation;t.isArrayTypeAnnotation=isArrayTypeAnnotation;t.isBooleanTypeAnnotation=isBooleanTypeAnnotation;t.isBooleanLiteralTypeAnnotation=isBooleanLiteralTypeAnnotation;t.isNullLiteralTypeAnnotation=isNullLiteralTypeAnnotation;t.isClassImplements=isClassImplements;t.isDeclareClass=isDeclareClass;t.isDeclareFunction=isDeclareFunction;t.isDeclareInterface=isDeclareInterface;t.isDeclareModule=isDeclareModule;t.isDeclareModuleExports=isDeclareModuleExports;t.isDeclareTypeAlias=isDeclareTypeAlias;t.isDeclareOpaqueType=isDeclareOpaqueType;t.isDeclareVariable=isDeclareVariable;t.isDeclareExportDeclaration=isDeclareExportDeclaration;t.isDeclareExportAllDeclaration=isDeclareExportAllDeclaration;t.isDeclaredPredicate=isDeclaredPredicate;t.isExistsTypeAnnotation=isExistsTypeAnnotation;t.isFunctionTypeAnnotation=isFunctionTypeAnnotation;t.isFunctionTypeParam=isFunctionTypeParam;t.isGenericTypeAnnotation=isGenericTypeAnnotation;t.isInferredPredicate=isInferredPredicate;t.isInterfaceExtends=isInterfaceExtends;t.isInterfaceDeclaration=isInterfaceDeclaration;t.isInterfaceTypeAnnotation=isInterfaceTypeAnnotation;t.isIntersectionTypeAnnotation=isIntersectionTypeAnnotation;t.isMixedTypeAnnotation=isMixedTypeAnnotation;t.isEmptyTypeAnnotation=isEmptyTypeAnnotation;t.isNullableTypeAnnotation=isNullableTypeAnnotation;t.isNumberLiteralTypeAnnotation=isNumberLiteralTypeAnnotation;t.isNumberTypeAnnotation=isNumberTypeAnnotation;t.isObjectTypeAnnotation=isObjectTypeAnnotation;t.isObjectTypeInternalSlot=isObjectTypeInternalSlot;t.isObjectTypeCallProperty=isObjectTypeCallProperty;t.isObjectTypeIndexer=isObjectTypeIndexer;t.isObjectTypeProperty=isObjectTypeProperty;t.isObjectTypeSpreadProperty=isObjectTypeSpreadProperty;t.isOpaqueType=isOpaqueType;t.isQualifiedTypeIdentifier=isQualifiedTypeIdentifier;t.isStringLiteralTypeAnnotation=isStringLiteralTypeAnnotation;t.isStringTypeAnnotation=isStringTypeAnnotation;t.isSymbolTypeAnnotation=isSymbolTypeAnnotation;t.isThisTypeAnnotation=isThisTypeAnnotation;t.isTupleTypeAnnotation=isTupleTypeAnnotation;t.isTypeofTypeAnnotation=isTypeofTypeAnnotation;t.isTypeAlias=isTypeAlias;t.isTypeAnnotation=isTypeAnnotation;t.isTypeCastExpression=isTypeCastExpression;t.isTypeParameter=isTypeParameter;t.isTypeParameterDeclaration=isTypeParameterDeclaration;t.isTypeParameterInstantiation=isTypeParameterInstantiation;t.isUnionTypeAnnotation=isUnionTypeAnnotation;t.isVariance=isVariance;t.isVoidTypeAnnotation=isVoidTypeAnnotation;t.isEnumDeclaration=isEnumDeclaration;t.isEnumBooleanBody=isEnumBooleanBody;t.isEnumNumberBody=isEnumNumberBody;t.isEnumStringBody=isEnumStringBody;t.isEnumSymbolBody=isEnumSymbolBody;t.isEnumBooleanMember=isEnumBooleanMember;t.isEnumNumberMember=isEnumNumberMember;t.isEnumStringMember=isEnumStringMember;t.isEnumDefaultedMember=isEnumDefaultedMember;t.isJSXAttribute=isJSXAttribute;t.isJSXClosingElement=isJSXClosingElement;t.isJSXElement=isJSXElement;t.isJSXEmptyExpression=isJSXEmptyExpression;t.isJSXExpressionContainer=isJSXExpressionContainer;t.isJSXSpreadChild=isJSXSpreadChild;t.isJSXIdentifier=isJSXIdentifier;t.isJSXMemberExpression=isJSXMemberExpression;t.isJSXNamespacedName=isJSXNamespacedName;t.isJSXOpeningElement=isJSXOpeningElement;t.isJSXSpreadAttribute=isJSXSpreadAttribute;t.isJSXText=isJSXText;t.isJSXFragment=isJSXFragment;t.isJSXOpeningFragment=isJSXOpeningFragment;t.isJSXClosingFragment=isJSXClosingFragment;t.isNoop=isNoop;t.isPlaceholder=isPlaceholder;t.isV8IntrinsicIdentifier=isV8IntrinsicIdentifier;t.isArgumentPlaceholder=isArgumentPlaceholder;t.isBindExpression=isBindExpression;t.isClassProperty=isClassProperty;t.isPipelineTopicExpression=isPipelineTopicExpression;t.isPipelineBareFunction=isPipelineBareFunction;t.isPipelinePrimaryTopicReference=isPipelinePrimaryTopicReference;t.isClassPrivateProperty=isClassPrivateProperty;t.isClassPrivateMethod=isClassPrivateMethod;t.isImportAttribute=isImportAttribute;t.isDecorator=isDecorator;t.isDoExpression=isDoExpression;t.isExportDefaultSpecifier=isExportDefaultSpecifier;t.isPrivateName=isPrivateName;t.isRecordExpression=isRecordExpression;t.isTupleExpression=isTupleExpression;t.isDecimalLiteral=isDecimalLiteral;t.isStaticBlock=isStaticBlock;t.isTSParameterProperty=isTSParameterProperty;t.isTSDeclareFunction=isTSDeclareFunction;t.isTSDeclareMethod=isTSDeclareMethod;t.isTSQualifiedName=isTSQualifiedName;t.isTSCallSignatureDeclaration=isTSCallSignatureDeclaration;t.isTSConstructSignatureDeclaration=isTSConstructSignatureDeclaration;t.isTSPropertySignature=isTSPropertySignature;t.isTSMethodSignature=isTSMethodSignature;t.isTSIndexSignature=isTSIndexSignature;t.isTSAnyKeyword=isTSAnyKeyword;t.isTSBooleanKeyword=isTSBooleanKeyword;t.isTSBigIntKeyword=isTSBigIntKeyword;t.isTSIntrinsicKeyword=isTSIntrinsicKeyword;t.isTSNeverKeyword=isTSNeverKeyword;t.isTSNullKeyword=isTSNullKeyword;t.isTSNumberKeyword=isTSNumberKeyword;t.isTSObjectKeyword=isTSObjectKeyword;t.isTSStringKeyword=isTSStringKeyword;t.isTSSymbolKeyword=isTSSymbolKeyword;t.isTSUndefinedKeyword=isTSUndefinedKeyword;t.isTSUnknownKeyword=isTSUnknownKeyword;t.isTSVoidKeyword=isTSVoidKeyword;t.isTSThisType=isTSThisType;t.isTSFunctionType=isTSFunctionType;t.isTSConstructorType=isTSConstructorType;t.isTSTypeReference=isTSTypeReference;t.isTSTypePredicate=isTSTypePredicate;t.isTSTypeQuery=isTSTypeQuery;t.isTSTypeLiteral=isTSTypeLiteral;t.isTSArrayType=isTSArrayType;t.isTSTupleType=isTSTupleType;t.isTSOptionalType=isTSOptionalType;t.isTSRestType=isTSRestType;t.isTSNamedTupleMember=isTSNamedTupleMember;t.isTSUnionType=isTSUnionType;t.isTSIntersectionType=isTSIntersectionType;t.isTSConditionalType=isTSConditionalType;t.isTSInferType=isTSInferType;t.isTSParenthesizedType=isTSParenthesizedType;t.isTSTypeOperator=isTSTypeOperator;t.isTSIndexedAccessType=isTSIndexedAccessType;t.isTSMappedType=isTSMappedType;t.isTSLiteralType=isTSLiteralType;t.isTSExpressionWithTypeArguments=isTSExpressionWithTypeArguments;t.isTSInterfaceDeclaration=isTSInterfaceDeclaration;t.isTSInterfaceBody=isTSInterfaceBody;t.isTSTypeAliasDeclaration=isTSTypeAliasDeclaration;t.isTSAsExpression=isTSAsExpression;t.isTSTypeAssertion=isTSTypeAssertion;t.isTSEnumDeclaration=isTSEnumDeclaration;t.isTSEnumMember=isTSEnumMember;t.isTSModuleDeclaration=isTSModuleDeclaration;t.isTSModuleBlock=isTSModuleBlock;t.isTSImportType=isTSImportType;t.isTSImportEqualsDeclaration=isTSImportEqualsDeclaration;t.isTSExternalModuleReference=isTSExternalModuleReference;t.isTSNonNullExpression=isTSNonNullExpression;t.isTSExportAssignment=isTSExportAssignment;t.isTSNamespaceExportDeclaration=isTSNamespaceExportDeclaration;t.isTSTypeAnnotation=isTSTypeAnnotation;t.isTSTypeParameterInstantiation=isTSTypeParameterInstantiation;t.isTSTypeParameterDeclaration=isTSTypeParameterDeclaration;t.isTSTypeParameter=isTSTypeParameter;t.isExpression=isExpression;t.isBinary=isBinary;t.isScopable=isScopable;t.isBlockParent=isBlockParent;t.isBlock=isBlock;t.isStatement=isStatement;t.isTerminatorless=isTerminatorless;t.isCompletionStatement=isCompletionStatement;t.isConditional=isConditional;t.isLoop=isLoop;t.isWhile=isWhile;t.isExpressionWrapper=isExpressionWrapper;t.isFor=isFor;t.isForXStatement=isForXStatement;t.isFunction=isFunction;t.isFunctionParent=isFunctionParent;t.isPureish=isPureish;t.isDeclaration=isDeclaration;t.isPatternLike=isPatternLike;t.isLVal=isLVal;t.isTSEntityName=isTSEntityName;t.isLiteral=isLiteral;t.isImmutable=isImmutable;t.isUserWhitespacable=isUserWhitespacable;t.isMethod=isMethod;t.isObjectMember=isObjectMember;t.isProperty=isProperty;t.isUnaryLike=isUnaryLike;t.isPattern=isPattern;t.isClass=isClass;t.isModuleDeclaration=isModuleDeclaration;t.isExportDeclaration=isExportDeclaration;t.isModuleSpecifier=isModuleSpecifier;t.isFlow=isFlow;t.isFlowType=isFlowType;t.isFlowBaseAnnotation=isFlowBaseAnnotation;t.isFlowDeclaration=isFlowDeclaration;t.isFlowPredicate=isFlowPredicate;t.isEnumBody=isEnumBody;t.isEnumMember=isEnumMember;t.isJSX=isJSX;t.isPrivate=isPrivate;t.isTSTypeElement=isTSTypeElement;t.isTSType=isTSType;t.isTSBaseType=isTSBaseType;t.isNumberLiteral=isNumberLiteral;t.isRegexLiteral=isRegexLiteral;t.isRestProperty=isRestProperty;t.isSpreadProperty=isSpreadProperty;var s=_interopRequireDefault(r(80400));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isArrayExpression(e,t){if(!e)return false;const r=e.type;if(r==="ArrayExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isAssignmentExpression(e,t){if(!e)return false;const r=e.type;if(r==="AssignmentExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBinaryExpression(e,t){if(!e)return false;const r=e.type;if(r==="BinaryExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isInterpreterDirective(e,t){if(!e)return false;const r=e.type;if(r==="InterpreterDirective"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDirective(e,t){if(!e)return false;const r=e.type;if(r==="Directive"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDirectiveLiteral(e,t){if(!e)return false;const r=e.type;if(r==="DirectiveLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBlockStatement(e,t){if(!e)return false;const r=e.type;if(r==="BlockStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBreakStatement(e,t){if(!e)return false;const r=e.type;if(r==="BreakStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isCallExpression(e,t){if(!e)return false;const r=e.type;if(r==="CallExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isCatchClause(e,t){if(!e)return false;const r=e.type;if(r==="CatchClause"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isConditionalExpression(e,t){if(!e)return false;const r=e.type;if(r==="ConditionalExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isContinueStatement(e,t){if(!e)return false;const r=e.type;if(r==="ContinueStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDebuggerStatement(e,t){if(!e)return false;const r=e.type;if(r==="DebuggerStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDoWhileStatement(e,t){if(!e)return false;const r=e.type;if(r==="DoWhileStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEmptyStatement(e,t){if(!e)return false;const r=e.type;if(r==="EmptyStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExpressionStatement(e,t){if(!e)return false;const r=e.type;if(r==="ExpressionStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFile(e,t){if(!e)return false;const r=e.type;if(r==="File"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isForInStatement(e,t){if(!e)return false;const r=e.type;if(r==="ForInStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isForStatement(e,t){if(!e)return false;const r=e.type;if(r==="ForStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunctionDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="FunctionDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunctionExpression(e,t){if(!e)return false;const r=e.type;if(r==="FunctionExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="Identifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isIfStatement(e,t){if(!e)return false;const r=e.type;if(r==="IfStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isLabeledStatement(e,t){if(!e)return false;const r=e.type;if(r==="LabeledStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isStringLiteral(e,t){if(!e)return false;const r=e.type;if(r==="StringLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNumericLiteral(e,t){if(!e)return false;const r=e.type;if(r==="NumericLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNullLiteral(e,t){if(!e)return false;const r=e.type;if(r==="NullLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBooleanLiteral(e,t){if(!e)return false;const r=e.type;if(r==="BooleanLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isRegExpLiteral(e,t){if(!e)return false;const r=e.type;if(r==="RegExpLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isLogicalExpression(e,t){if(!e)return false;const r=e.type;if(r==="LogicalExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isMemberExpression(e,t){if(!e)return false;const r=e.type;if(r==="MemberExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNewExpression(e,t){if(!e)return false;const r=e.type;if(r==="NewExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isProgram(e,t){if(!e)return false;const r=e.type;if(r==="Program"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectExpression(e,t){if(!e)return false;const r=e.type;if(r==="ObjectExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectMethod(e,t){if(!e)return false;const r=e.type;if(r==="ObjectMethod"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isRestElement(e,t){if(!e)return false;const r=e.type;if(r==="RestElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isReturnStatement(e,t){if(!e)return false;const r=e.type;if(r==="ReturnStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSequenceExpression(e,t){if(!e)return false;const r=e.type;if(r==="SequenceExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isParenthesizedExpression(e,t){if(!e)return false;const r=e.type;if(r==="ParenthesizedExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSwitchCase(e,t){if(!e)return false;const r=e.type;if(r==="SwitchCase"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSwitchStatement(e,t){if(!e)return false;const r=e.type;if(r==="SwitchStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isThisExpression(e,t){if(!e)return false;const r=e.type;if(r==="ThisExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isThrowStatement(e,t){if(!e)return false;const r=e.type;if(r==="ThrowStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTryStatement(e,t){if(!e)return false;const r=e.type;if(r==="TryStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isUnaryExpression(e,t){if(!e)return false;const r=e.type;if(r==="UnaryExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isUpdateExpression(e,t){if(!e)return false;const r=e.type;if(r==="UpdateExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isVariableDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="VariableDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isVariableDeclarator(e,t){if(!e)return false;const r=e.type;if(r==="VariableDeclarator"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isWhileStatement(e,t){if(!e)return false;const r=e.type;if(r==="WhileStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isWithStatement(e,t){if(!e)return false;const r=e.type;if(r==="WithStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isAssignmentPattern(e,t){if(!e)return false;const r=e.type;if(r==="AssignmentPattern"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isArrayPattern(e,t){if(!e)return false;const r=e.type;if(r==="ArrayPattern"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isArrowFunctionExpression(e,t){if(!e)return false;const r=e.type;if(r==="ArrowFunctionExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassBody(e,t){if(!e)return false;const r=e.type;if(r==="ClassBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassExpression(e,t){if(!e)return false;const r=e.type;if(r==="ClassExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ClassDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportAllDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ExportAllDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportDefaultDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ExportDefaultDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportNamedDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ExportNamedDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ExportSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isForOfStatement(e,t){if(!e)return false;const r=e.type;if(r==="ForOfStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImportDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ImportDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImportDefaultSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ImportDefaultSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImportNamespaceSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ImportNamespaceSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImportSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ImportSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isMetaProperty(e,t){if(!e)return false;const r=e.type;if(r==="MetaProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassMethod(e,t){if(!e)return false;const r=e.type;if(r==="ClassMethod"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectPattern(e,t){if(!e)return false;const r=e.type;if(r==="ObjectPattern"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSpreadElement(e,t){if(!e)return false;const r=e.type;if(r==="SpreadElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSuper(e,t){if(!e)return false;const r=e.type;if(r==="Super"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTaggedTemplateExpression(e,t){if(!e)return false;const r=e.type;if(r==="TaggedTemplateExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTemplateElement(e,t){if(!e)return false;const r=e.type;if(r==="TemplateElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTemplateLiteral(e,t){if(!e)return false;const r=e.type;if(r==="TemplateLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isYieldExpression(e,t){if(!e)return false;const r=e.type;if(r==="YieldExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isAwaitExpression(e,t){if(!e)return false;const r=e.type;if(r==="AwaitExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImport(e,t){if(!e)return false;const r=e.type;if(r==="Import"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBigIntLiteral(e,t){if(!e)return false;const r=e.type;if(r==="BigIntLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportNamespaceSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ExportNamespaceSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isOptionalMemberExpression(e,t){if(!e)return false;const r=e.type;if(r==="OptionalMemberExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isOptionalCallExpression(e,t){if(!e)return false;const r=e.type;if(r==="OptionalCallExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isAnyTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="AnyTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isArrayTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ArrayTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBooleanTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="BooleanTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBooleanLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="BooleanLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNullLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NullLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassImplements(e,t){if(!e)return false;const r=e.type;if(r==="ClassImplements"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareClass(e,t){if(!e)return false;const r=e.type;if(r==="DeclareClass"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareFunction(e,t){if(!e)return false;const r=e.type;if(r==="DeclareFunction"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareInterface(e,t){if(!e)return false;const r=e.type;if(r==="DeclareInterface"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareModule(e,t){if(!e)return false;const r=e.type;if(r==="DeclareModule"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareModuleExports(e,t){if(!e)return false;const r=e.type;if(r==="DeclareModuleExports"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareTypeAlias(e,t){if(!e)return false;const r=e.type;if(r==="DeclareTypeAlias"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareOpaqueType(e,t){if(!e)return false;const r=e.type;if(r==="DeclareOpaqueType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareVariable(e,t){if(!e)return false;const r=e.type;if(r==="DeclareVariable"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareExportDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="DeclareExportDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareExportAllDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="DeclareExportAllDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclaredPredicate(e,t){if(!e)return false;const r=e.type;if(r==="DeclaredPredicate"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExistsTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ExistsTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunctionTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="FunctionTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunctionTypeParam(e,t){if(!e)return false;const r=e.type;if(r==="FunctionTypeParam"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isGenericTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="GenericTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isInferredPredicate(e,t){if(!e)return false;const r=e.type;if(r==="InferredPredicate"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isInterfaceExtends(e,t){if(!e)return false;const r=e.type;if(r==="InterfaceExtends"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isInterfaceDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="InterfaceDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isInterfaceTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="InterfaceTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isIntersectionTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="IntersectionTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isMixedTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="MixedTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEmptyTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="EmptyTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNullableTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NullableTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNumberLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NumberLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNumberTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NumberTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeInternalSlot(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeInternalSlot"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeCallProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeCallProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeIndexer(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeIndexer"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeSpreadProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeSpreadProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isOpaqueType(e,t){if(!e)return false;const r=e.type;if(r==="OpaqueType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isQualifiedTypeIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="QualifiedTypeIdentifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isStringLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="StringLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isStringTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="StringTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSymbolTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="SymbolTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isThisTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ThisTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTupleTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TupleTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeofTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TypeofTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeAlias(e,t){if(!e)return false;const r=e.type;if(r==="TypeAlias"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeCastExpression(e,t){if(!e)return false;const r=e.type;if(r==="TypeCastExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeParameter(e,t){if(!e)return false;const r=e.type;if(r==="TypeParameter"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeParameterDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TypeParameterDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeParameterInstantiation(e,t){if(!e)return false;const r=e.type;if(r==="TypeParameterInstantiation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isUnionTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="UnionTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isVariance(e,t){if(!e)return false;const r=e.type;if(r==="Variance"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isVoidTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="VoidTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="EnumDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumBooleanBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumBooleanBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumNumberBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumNumberBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumStringBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumStringBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumSymbolBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumSymbolBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumBooleanMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumBooleanMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumNumberMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumNumberMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumStringMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumStringMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumDefaultedMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumDefaultedMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXAttribute(e,t){if(!e)return false;const r=e.type;if(r==="JSXAttribute"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXClosingElement(e,t){if(!e)return false;const r=e.type;if(r==="JSXClosingElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXElement(e,t){if(!e)return false;const r=e.type;if(r==="JSXElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXEmptyExpression(e,t){if(!e)return false;const r=e.type;if(r==="JSXEmptyExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXExpressionContainer(e,t){if(!e)return false;const r=e.type;if(r==="JSXExpressionContainer"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXSpreadChild(e,t){if(!e)return false;const r=e.type;if(r==="JSXSpreadChild"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="JSXIdentifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXMemberExpression(e,t){if(!e)return false;const r=e.type;if(r==="JSXMemberExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXNamespacedName(e,t){if(!e)return false;const r=e.type;if(r==="JSXNamespacedName"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXOpeningElement(e,t){if(!e)return false;const r=e.type;if(r==="JSXOpeningElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXSpreadAttribute(e,t){if(!e)return false;const r=e.type;if(r==="JSXSpreadAttribute"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXText(e,t){if(!e)return false;const r=e.type;if(r==="JSXText"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXFragment(e,t){if(!e)return false;const r=e.type;if(r==="JSXFragment"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXOpeningFragment(e,t){if(!e)return false;const r=e.type;if(r==="JSXOpeningFragment"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXClosingFragment(e,t){if(!e)return false;const r=e.type;if(r==="JSXClosingFragment"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNoop(e,t){if(!e)return false;const r=e.type;if(r==="Noop"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPlaceholder(e,t){if(!e)return false;const r=e.type;if(r==="Placeholder"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isV8IntrinsicIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="V8IntrinsicIdentifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isArgumentPlaceholder(e,t){if(!e)return false;const r=e.type;if(r==="ArgumentPlaceholder"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBindExpression(e,t){if(!e)return false;const r=e.type;if(r==="BindExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassProperty(e,t){if(!e)return false;const r=e.type;if(r==="ClassProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPipelineTopicExpression(e,t){if(!e)return false;const r=e.type;if(r==="PipelineTopicExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPipelineBareFunction(e,t){if(!e)return false;const r=e.type;if(r==="PipelineBareFunction"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPipelinePrimaryTopicReference(e,t){if(!e)return false;const r=e.type;if(r==="PipelinePrimaryTopicReference"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassPrivateProperty(e,t){if(!e)return false;const r=e.type;if(r==="ClassPrivateProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassPrivateMethod(e,t){if(!e)return false;const r=e.type;if(r==="ClassPrivateMethod"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImportAttribute(e,t){if(!e)return false;const r=e.type;if(r==="ImportAttribute"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDecorator(e,t){if(!e)return false;const r=e.type;if(r==="Decorator"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDoExpression(e,t){if(!e)return false;const r=e.type;if(r==="DoExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportDefaultSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ExportDefaultSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPrivateName(e,t){if(!e)return false;const r=e.type;if(r==="PrivateName"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isRecordExpression(e,t){if(!e)return false;const r=e.type;if(r==="RecordExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTupleExpression(e,t){if(!e)return false;const r=e.type;if(r==="TupleExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDecimalLiteral(e,t){if(!e)return false;const r=e.type;if(r==="DecimalLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isStaticBlock(e,t){if(!e)return false;const r=e.type;if(r==="StaticBlock"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSParameterProperty(e,t){if(!e)return false;const r=e.type;if(r==="TSParameterProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSDeclareFunction(e,t){if(!e)return false;const r=e.type;if(r==="TSDeclareFunction"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSDeclareMethod(e,t){if(!e)return false;const r=e.type;if(r==="TSDeclareMethod"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSQualifiedName(e,t){if(!e)return false;const r=e.type;if(r==="TSQualifiedName"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSCallSignatureDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSCallSignatureDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSConstructSignatureDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSConstructSignatureDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSPropertySignature(e,t){if(!e)return false;const r=e.type;if(r==="TSPropertySignature"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSMethodSignature(e,t){if(!e)return false;const r=e.type;if(r==="TSMethodSignature"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSIndexSignature(e,t){if(!e)return false;const r=e.type;if(r==="TSIndexSignature"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSAnyKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSAnyKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSBooleanKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSBooleanKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSBigIntKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSBigIntKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSIntrinsicKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSIntrinsicKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNeverKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSNeverKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNullKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSNullKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNumberKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSNumberKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSObjectKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSObjectKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSStringKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSStringKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSSymbolKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSSymbolKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSUndefinedKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSUndefinedKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSUnknownKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSUnknownKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSVoidKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSVoidKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSThisType(e,t){if(!e)return false;const r=e.type;if(r==="TSThisType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSFunctionType(e,t){if(!e)return false;const r=e.type;if(r==="TSFunctionType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSConstructorType(e,t){if(!e)return false;const r=e.type;if(r==="TSConstructorType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeReference(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeReference"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypePredicate(e,t){if(!e)return false;const r=e.type;if(r==="TSTypePredicate"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeQuery(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeQuery"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeLiteral(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSArrayType(e,t){if(!e)return false;const r=e.type;if(r==="TSArrayType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTupleType(e,t){if(!e)return false;const r=e.type;if(r==="TSTupleType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSOptionalType(e,t){if(!e)return false;const r=e.type;if(r==="TSOptionalType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSRestType(e,t){if(!e)return false;const r=e.type;if(r==="TSRestType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNamedTupleMember(e,t){if(!e)return false;const r=e.type;if(r==="TSNamedTupleMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSUnionType(e,t){if(!e)return false;const r=e.type;if(r==="TSUnionType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSIntersectionType(e,t){if(!e)return false;const r=e.type;if(r==="TSIntersectionType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSConditionalType(e,t){if(!e)return false;const r=e.type;if(r==="TSConditionalType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSInferType(e,t){if(!e)return false;const r=e.type;if(r==="TSInferType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSParenthesizedType(e,t){if(!e)return false;const r=e.type;if(r==="TSParenthesizedType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeOperator(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeOperator"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSIndexedAccessType(e,t){if(!e)return false;const r=e.type;if(r==="TSIndexedAccessType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSMappedType(e,t){if(!e)return false;const r=e.type;if(r==="TSMappedType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSLiteralType(e,t){if(!e)return false;const r=e.type;if(r==="TSLiteralType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSExpressionWithTypeArguments(e,t){if(!e)return false;const r=e.type;if(r==="TSExpressionWithTypeArguments"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSInterfaceDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSInterfaceDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSInterfaceBody(e,t){if(!e)return false;const r=e.type;if(r==="TSInterfaceBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeAliasDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeAliasDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSAsExpression(e,t){if(!e)return false;const r=e.type;if(r==="TSAsExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeAssertion(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeAssertion"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSEnumDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSEnumDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSEnumMember(e,t){if(!e)return false;const r=e.type;if(r==="TSEnumMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSModuleDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSModuleDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSModuleBlock(e,t){if(!e)return false;const r=e.type;if(r==="TSModuleBlock"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSImportType(e,t){if(!e)return false;const r=e.type;if(r==="TSImportType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSImportEqualsDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSImportEqualsDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSExternalModuleReference(e,t){if(!e)return false;const r=e.type;if(r==="TSExternalModuleReference"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNonNullExpression(e,t){if(!e)return false;const r=e.type;if(r==="TSNonNullExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSExportAssignment(e,t){if(!e)return false;const r=e.type;if(r==="TSExportAssignment"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNamespaceExportDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSNamespaceExportDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeParameterInstantiation(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeParameterInstantiation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeParameterDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeParameterDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeParameter(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeParameter"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExpression(e,t){if(!e)return false;const r=e.type;if("ArrayExpression"===r||"AssignmentExpression"===r||"BinaryExpression"===r||"CallExpression"===r||"ConditionalExpression"===r||"FunctionExpression"===r||"Identifier"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"LogicalExpression"===r||"MemberExpression"===r||"NewExpression"===r||"ObjectExpression"===r||"SequenceExpression"===r||"ParenthesizedExpression"===r||"ThisExpression"===r||"UnaryExpression"===r||"UpdateExpression"===r||"ArrowFunctionExpression"===r||"ClassExpression"===r||"MetaProperty"===r||"Super"===r||"TaggedTemplateExpression"===r||"TemplateLiteral"===r||"YieldExpression"===r||"AwaitExpression"===r||"Import"===r||"BigIntLiteral"===r||"OptionalMemberExpression"===r||"OptionalCallExpression"===r||"TypeCastExpression"===r||"JSXElement"===r||"JSXFragment"===r||"BindExpression"===r||"PipelinePrimaryTopicReference"===r||"DoExpression"===r||"RecordExpression"===r||"TupleExpression"===r||"DecimalLiteral"===r||"TSAsExpression"===r||"TSTypeAssertion"===r||"TSNonNullExpression"===r||r==="Placeholder"&&("Expression"===e.expectedNode||"Identifier"===e.expectedNode||"StringLiteral"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBinary(e,t){if(!e)return false;const r=e.type;if("BinaryExpression"===r||"LogicalExpression"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isScopable(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"CatchClause"===r||"DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"Program"===r||"ObjectMethod"===r||"SwitchStatement"===r||"WhileStatement"===r||"ArrowFunctionExpression"===r||"ClassExpression"===r||"ClassDeclaration"===r||"ForOfStatement"===r||"ClassMethod"===r||"ClassPrivateMethod"===r||"StaticBlock"===r||"TSModuleBlock"===r||r==="Placeholder"&&"BlockStatement"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBlockParent(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"CatchClause"===r||"DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"Program"===r||"ObjectMethod"===r||"SwitchStatement"===r||"WhileStatement"===r||"ArrowFunctionExpression"===r||"ForOfStatement"===r||"ClassMethod"===r||"ClassPrivateMethod"===r||"StaticBlock"===r||"TSModuleBlock"===r||r==="Placeholder"&&"BlockStatement"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBlock(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"Program"===r||"TSModuleBlock"===r||r==="Placeholder"&&"BlockStatement"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isStatement(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"BreakStatement"===r||"ContinueStatement"===r||"DebuggerStatement"===r||"DoWhileStatement"===r||"EmptyStatement"===r||"ExpressionStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"IfStatement"===r||"LabeledStatement"===r||"ReturnStatement"===r||"SwitchStatement"===r||"ThrowStatement"===r||"TryStatement"===r||"VariableDeclaration"===r||"WhileStatement"===r||"WithStatement"===r||"ClassDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ForOfStatement"===r||"ImportDeclaration"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r||"EnumDeclaration"===r||"TSDeclareFunction"===r||"TSInterfaceDeclaration"===r||"TSTypeAliasDeclaration"===r||"TSEnumDeclaration"===r||"TSModuleDeclaration"===r||"TSImportEqualsDeclaration"===r||"TSExportAssignment"===r||"TSNamespaceExportDeclaration"===r||r==="Placeholder"&&("Statement"===e.expectedNode||"Declaration"===e.expectedNode||"BlockStatement"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTerminatorless(e,t){if(!e)return false;const r=e.type;if("BreakStatement"===r||"ContinueStatement"===r||"ReturnStatement"===r||"ThrowStatement"===r||"YieldExpression"===r||"AwaitExpression"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isCompletionStatement(e,t){if(!e)return false;const r=e.type;if("BreakStatement"===r||"ContinueStatement"===r||"ReturnStatement"===r||"ThrowStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isConditional(e,t){if(!e)return false;const r=e.type;if("ConditionalExpression"===r||"IfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isLoop(e,t){if(!e)return false;const r=e.type;if("DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"WhileStatement"===r||"ForOfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isWhile(e,t){if(!e)return false;const r=e.type;if("DoWhileStatement"===r||"WhileStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExpressionWrapper(e,t){if(!e)return false;const r=e.type;if("ExpressionStatement"===r||"ParenthesizedExpression"===r||"TypeCastExpression"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFor(e,t){if(!e)return false;const r=e.type;if("ForInStatement"===r||"ForStatement"===r||"ForOfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isForXStatement(e,t){if(!e)return false;const r=e.type;if("ForInStatement"===r||"ForOfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunction(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"FunctionExpression"===r||"ObjectMethod"===r||"ArrowFunctionExpression"===r||"ClassMethod"===r||"ClassPrivateMethod"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunctionParent(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"FunctionExpression"===r||"ObjectMethod"===r||"ArrowFunctionExpression"===r||"ClassMethod"===r||"ClassPrivateMethod"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPureish(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"FunctionExpression"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"ArrowFunctionExpression"===r||"BigIntLiteral"===r||"DecimalLiteral"===r||r==="Placeholder"&&"StringLiteral"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclaration(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"VariableDeclaration"===r||"ClassDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ImportDeclaration"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r||"EnumDeclaration"===r||"TSDeclareFunction"===r||"TSInterfaceDeclaration"===r||"TSTypeAliasDeclaration"===r||"TSEnumDeclaration"===r||"TSModuleDeclaration"===r||r==="Placeholder"&&"Declaration"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPatternLike(e,t){if(!e)return false;const r=e.type;if("Identifier"===r||"RestElement"===r||"AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r||r==="Placeholder"&&("Pattern"===e.expectedNode||"Identifier"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isLVal(e,t){if(!e)return false;const r=e.type;if("Identifier"===r||"MemberExpression"===r||"RestElement"===r||"AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r||"TSParameterProperty"===r||r==="Placeholder"&&("Pattern"===e.expectedNode||"Identifier"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSEntityName(e,t){if(!e)return false;const r=e.type;if("Identifier"===r||"TSQualifiedName"===r||r==="Placeholder"&&"Identifier"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isLiteral(e,t){if(!e)return false;const r=e.type;if("StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"TemplateLiteral"===r||"BigIntLiteral"===r||"DecimalLiteral"===r||r==="Placeholder"&&"StringLiteral"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImmutable(e,t){if(!e)return false;const r=e.type;if("StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"BigIntLiteral"===r||"JSXAttribute"===r||"JSXClosingElement"===r||"JSXElement"===r||"JSXExpressionContainer"===r||"JSXSpreadChild"===r||"JSXOpeningElement"===r||"JSXText"===r||"JSXFragment"===r||"JSXOpeningFragment"===r||"JSXClosingFragment"===r||"DecimalLiteral"===r||r==="Placeholder"&&"StringLiteral"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isUserWhitespacable(e,t){if(!e)return false;const r=e.type;if("ObjectMethod"===r||"ObjectProperty"===r||"ObjectTypeInternalSlot"===r||"ObjectTypeCallProperty"===r||"ObjectTypeIndexer"===r||"ObjectTypeProperty"===r||"ObjectTypeSpreadProperty"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isMethod(e,t){if(!e)return false;const r=e.type;if("ObjectMethod"===r||"ClassMethod"===r||"ClassPrivateMethod"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectMember(e,t){if(!e)return false;const r=e.type;if("ObjectMethod"===r||"ObjectProperty"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isProperty(e,t){if(!e)return false;const r=e.type;if("ObjectProperty"===r||"ClassProperty"===r||"ClassPrivateProperty"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isUnaryLike(e,t){if(!e)return false;const r=e.type;if("UnaryExpression"===r||"SpreadElement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPattern(e,t){if(!e)return false;const r=e.type;if("AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r||r==="Placeholder"&&"Pattern"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClass(e,t){if(!e)return false;const r=e.type;if("ClassExpression"===r||"ClassDeclaration"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isModuleDeclaration(e,t){if(!e)return false;const r=e.type;if("ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ImportDeclaration"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportDeclaration(e,t){if(!e)return false;const r=e.type;if("ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isModuleSpecifier(e,t){if(!e)return false;const r=e.type;if("ExportSpecifier"===r||"ImportDefaultSpecifier"===r||"ImportNamespaceSpecifier"===r||"ImportSpecifier"===r||"ExportNamespaceSpecifier"===r||"ExportDefaultSpecifier"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFlow(e,t){if(!e)return false;const r=e.type;if("AnyTypeAnnotation"===r||"ArrayTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"BooleanLiteralTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"ClassImplements"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"DeclaredPredicate"===r||"ExistsTypeAnnotation"===r||"FunctionTypeAnnotation"===r||"FunctionTypeParam"===r||"GenericTypeAnnotation"===r||"InferredPredicate"===r||"InterfaceExtends"===r||"InterfaceDeclaration"===r||"InterfaceTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NullableTypeAnnotation"===r||"NumberLiteralTypeAnnotation"===r||"NumberTypeAnnotation"===r||"ObjectTypeAnnotation"===r||"ObjectTypeInternalSlot"===r||"ObjectTypeCallProperty"===r||"ObjectTypeIndexer"===r||"ObjectTypeProperty"===r||"ObjectTypeSpreadProperty"===r||"OpaqueType"===r||"QualifiedTypeIdentifier"===r||"StringLiteralTypeAnnotation"===r||"StringTypeAnnotation"===r||"SymbolTypeAnnotation"===r||"ThisTypeAnnotation"===r||"TupleTypeAnnotation"===r||"TypeofTypeAnnotation"===r||"TypeAlias"===r||"TypeAnnotation"===r||"TypeCastExpression"===r||"TypeParameter"===r||"TypeParameterDeclaration"===r||"TypeParameterInstantiation"===r||"UnionTypeAnnotation"===r||"Variance"===r||"VoidTypeAnnotation"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFlowType(e,t){if(!e)return false;const r=e.type;if("AnyTypeAnnotation"===r||"ArrayTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"BooleanLiteralTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"ExistsTypeAnnotation"===r||"FunctionTypeAnnotation"===r||"GenericTypeAnnotation"===r||"InterfaceTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NullableTypeAnnotation"===r||"NumberLiteralTypeAnnotation"===r||"NumberTypeAnnotation"===r||"ObjectTypeAnnotation"===r||"StringLiteralTypeAnnotation"===r||"StringTypeAnnotation"===r||"SymbolTypeAnnotation"===r||"ThisTypeAnnotation"===r||"TupleTypeAnnotation"===r||"TypeofTypeAnnotation"===r||"UnionTypeAnnotation"===r||"VoidTypeAnnotation"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFlowBaseAnnotation(e,t){if(!e)return false;const r=e.type;if("AnyTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NumberTypeAnnotation"===r||"StringTypeAnnotation"===r||"SymbolTypeAnnotation"===r||"ThisTypeAnnotation"===r||"VoidTypeAnnotation"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFlowDeclaration(e,t){if(!e)return false;const r=e.type;if("DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFlowPredicate(e,t){if(!e)return false;const r=e.type;if("DeclaredPredicate"===r||"InferredPredicate"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumBody(e,t){if(!e)return false;const r=e.type;if("EnumBooleanBody"===r||"EnumNumberBody"===r||"EnumStringBody"===r||"EnumSymbolBody"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumMember(e,t){if(!e)return false;const r=e.type;if("EnumBooleanMember"===r||"EnumNumberMember"===r||"EnumStringMember"===r||"EnumDefaultedMember"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSX(e,t){if(!e)return false;const r=e.type;if("JSXAttribute"===r||"JSXClosingElement"===r||"JSXElement"===r||"JSXEmptyExpression"===r||"JSXExpressionContainer"===r||"JSXSpreadChild"===r||"JSXIdentifier"===r||"JSXMemberExpression"===r||"JSXNamespacedName"===r||"JSXOpeningElement"===r||"JSXSpreadAttribute"===r||"JSXText"===r||"JSXFragment"===r||"JSXOpeningFragment"===r||"JSXClosingFragment"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPrivate(e,t){if(!e)return false;const r=e.type;if("ClassPrivateProperty"===r||"ClassPrivateMethod"===r||"PrivateName"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeElement(e,t){if(!e)return false;const r=e.type;if("TSCallSignatureDeclaration"===r||"TSConstructSignatureDeclaration"===r||"TSPropertySignature"===r||"TSMethodSignature"===r||"TSIndexSignature"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSType(e,t){if(!e)return false;const r=e.type;if("TSAnyKeyword"===r||"TSBooleanKeyword"===r||"TSBigIntKeyword"===r||"TSIntrinsicKeyword"===r||"TSNeverKeyword"===r||"TSNullKeyword"===r||"TSNumberKeyword"===r||"TSObjectKeyword"===r||"TSStringKeyword"===r||"TSSymbolKeyword"===r||"TSUndefinedKeyword"===r||"TSUnknownKeyword"===r||"TSVoidKeyword"===r||"TSThisType"===r||"TSFunctionType"===r||"TSConstructorType"===r||"TSTypeReference"===r||"TSTypePredicate"===r||"TSTypeQuery"===r||"TSTypeLiteral"===r||"TSArrayType"===r||"TSTupleType"===r||"TSOptionalType"===r||"TSRestType"===r||"TSUnionType"===r||"TSIntersectionType"===r||"TSConditionalType"===r||"TSInferType"===r||"TSParenthesizedType"===r||"TSTypeOperator"===r||"TSIndexedAccessType"===r||"TSMappedType"===r||"TSLiteralType"===r||"TSExpressionWithTypeArguments"===r||"TSImportType"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSBaseType(e,t){if(!e)return false;const r=e.type;if("TSAnyKeyword"===r||"TSBooleanKeyword"===r||"TSBigIntKeyword"===r||"TSIntrinsicKeyword"===r||"TSNeverKeyword"===r||"TSNullKeyword"===r||"TSNumberKeyword"===r||"TSObjectKeyword"===r||"TSStringKeyword"===r||"TSSymbolKeyword"===r||"TSUndefinedKeyword"===r||"TSUnknownKeyword"===r||"TSVoidKeyword"===r||"TSThisType"===r||"TSLiteralType"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNumberLiteral(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral");if(!e)return false;const r=e.type;if(r==="NumberLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isRegexLiteral(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");if(!e)return false;const r=e.type;if(r==="RegexLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isRestProperty(e,t){console.trace("The node type RestProperty has been renamed to RestElement");if(!e)return false;const r=e.type;if(r==="RestProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSpreadProperty(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement");if(!e)return false;const r=e.type;if(r==="SpreadProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}},28422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=is;var s=_interopRequireDefault(r(80400));var n=_interopRequireDefault(r(30699));var a=_interopRequireDefault(r(8010));var i=r(74098);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function is(e,t,r){if(!t)return false;const o=(0,n.default)(t.type,e);if(!o){if(!r&&t.type==="Placeholder"&&e in i.FLIPPED_ALIAS_KEYS){return(0,a.default)(t.expectedNode,e)}return false}if(typeof r==="undefined"){return true}else{return(0,s.default)(t,r)}}},52459:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isBinding;var s=_interopRequireDefault(r(97723));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isBinding(e,t,r){if(r&&e.type==="Identifier"&&t.type==="ObjectProperty"&&r.type==="ObjectExpression"){return false}const n=s.default.keys[t.type];if(n){for(let r=0;r=0)return true}else{if(a===e)return true}}}return false}},16800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isBlockScoped;var s=r(18939);var n=_interopRequireDefault(r(63289));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isBlockScoped(e){return(0,s.isFunctionDeclaration)(e)||(0,s.isClassDeclaration)(e)||(0,n.default)(e)}},66028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isImmutable;var s=_interopRequireDefault(r(30699));var n=r(18939);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isImmutable(e){if((0,s.default)(e.type,"Immutable"))return true;if((0,n.isIdentifier)(e)){if(e.name==="undefined"){return true}else{return false}}return false}},63289:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isLet;var s=r(18939);var n=r(91073);function isLet(e){return(0,s.isVariableDeclaration)(e)&&(e.kind!=="var"||e[n.BLOCK_SCOPED_SYMBOL])}},95595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isNode;var s=r(74098);function isNode(e){return!!(e&&s.VISITOR_KEYS[e.type])}},40191:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isNodesEquivalent;var s=r(74098);function isNodesEquivalent(e,t){if(typeof e!=="object"||typeof t!=="object"||e==null||t==null){return e===t}if(e.type!==t.type){return false}const r=Object.keys(s.NODE_FIELDS[e.type]||e.type);const n=s.VISITOR_KEYS[e.type];for(const s of r){if(typeof e[s]!==typeof t[s]){return false}if(e[s]==null&&t[s]==null){continue}else if(e[s]==null||t[s]==null){return false}if(Array.isArray(e[s])){if(!Array.isArray(t[s])){return false}if(e[s].length!==t[s].length){return false}for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isPlaceholderType;var s=r(74098);function isPlaceholderType(e,t){if(e===t)return true;const r=s.PLACEHOLDERS_ALIAS[e];if(r){for(const e of r){if(t===e)return true}}return false}},898:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isReferenced;function isReferenced(e,t,r){switch(t.type){case"MemberExpression":case"JSXMemberExpression":case"OptionalMemberExpression":if(t.property===e){return!!t.computed}return t.object===e;case"VariableDeclarator":return t.init===e;case"ArrowFunctionExpression":return t.body===e;case"PrivateName":return false;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":if(t.params.includes(e)){return false}case"ObjectProperty":case"ClassProperty":case"ClassPrivateProperty":if(t.key===e){return!!t.computed}if(t.value===e){return!r||r.type!=="ObjectPattern"}return true;case"ClassDeclaration":case"ClassExpression":return t.superClass===e;case"AssignmentExpression":return t.right===e;case"AssignmentPattern":return t.right===e;case"LabeledStatement":return false;case"CatchClause":return false;case"RestElement":return false;case"BreakStatement":case"ContinueStatement":return false;case"FunctionDeclaration":case"FunctionExpression":return false;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return false;case"ExportSpecifier":if(r==null?void 0:r.source){return false}return t.local===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return false;case"JSXAttribute":return false;case"ObjectPattern":case"ArrayPattern":return false;case"MetaProperty":return false;case"ObjectTypeProperty":return t.key!==e;case"TSEnumMember":return t.id!==e;case"TSPropertySignature":if(t.key===e){return!!t.computed}return true}return true}},45379:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isScope;var s=r(18939);function isScope(e,t){if((0,s.isBlockStatement)(e)&&((0,s.isFunction)(t)||(0,s.isCatchClause)(t))){return false}if((0,s.isPattern)(e)&&((0,s.isFunction)(t)||(0,s.isCatchClause)(t))){return true}return(0,s.isScopable)(e)}},10932:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isSpecifierDefault;var s=r(18939);function isSpecifierDefault(e){return(0,s.isImportDefaultSpecifier)(e)||(0,s.isIdentifier)(e.imported||e.exported,{name:"default"})}},30699:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isType;var s=r(74098);function isType(e,t){if(e===t)return true;if(s.ALIAS_KEYS[t])return false;const r=s.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return true;for(const t of r){if(e===t)return true}}return false}},29834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isValidES3Identifier;var s=_interopRequireDefault(r(90735));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"]);function isValidES3Identifier(e){return(0,s.default)(e)&&!n.has(e)}},90735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isValidIdentifier;var s=r(74246);function isValidIdentifier(e,t=true){if(typeof e!=="string")return false;if(t){if((0,s.isKeyword)(e)||(0,s.isStrictReservedWord)(e,true)){return false}}return(0,s.isIdentifierName)(e)}},8965:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isVar;var s=r(18939);var n=r(91073);function isVar(e){return(0,s.isVariableDeclaration)(e,{kind:"var"})&&!e[n.BLOCK_SCOPED_SYMBOL]}},71854:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=matchesPattern;var s=r(18939);function matchesPattern(e,t,r){if(!(0,s.isMemberExpression)(e))return false;const n=Array.isArray(t)?t:t.split(".");const a=[];let i;for(i=e;(0,s.isMemberExpression)(i);i=i.object){a.push(i.property)}a.push(i);if(a.lengthn.length)return false;for(let e=0,t=a.length-1;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isCompatTag;function isCompatTag(e){return!!e&&/^[a-z]/.test(e)}},10800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(66449));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=(0,s.default)("React.Component");var a=n;t.default=a},81236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=validate;t.validateField=validateField;t.validateChild=validateChild;var s=r(74098);function validate(e,t,r){if(!e)return;const n=s.NODE_FIELDS[e.type];if(!n)return;const a=n[t];validateField(e,t,r,a);validateChild(e,t,r)}function validateField(e,t,r,s){if(!(s==null?void 0:s.validate))return;if(s.optional&&r==null)return;s.validate(e,t,r)}function validateChild(e,t,r){if(r==null)return;const n=s.NODE_PARENT_VALIDATIONS[r.type];if(!n)return;n(e,t,r)}},99593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=function(){function sliceIterator(e,t){var r=[];var s=true;var n=false;var a=undefined;try{for(var i=e[Symbol.iterator](),o;!(s=(o=i.next()).done);s=true){r.push(o.value);if(t&&r.length===t)break}}catch(e){n=true;a=e}finally{try{if(!s&&i["return"])i["return"]()}finally{if(n)throw a}}return r}return function(e,t){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,t)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();t.getImportSource=getImportSource;t.createDynamicImportTransform=createDynamicImportTransform;function getImportSource(e,t){var s=t.arguments;var n=r(s,1),a=n[0];var i=e.isStringLiteral(a)||e.isTemplateLiteral(a);if(i){e.removeComments(a);return a}return e.templateLiteral([e.templateElement({raw:"",cooked:""}),e.templateElement({raw:"",cooked:""},true)],s)}function createDynamicImportTransform(e){var t=e.template,r=e.types;var s={static:{interop:t("Promise.resolve().then(() => INTEROP(require(SOURCE)))"),noInterop:t("Promise.resolve().then(() => require(SOURCE))")},dynamic:{interop:t("Promise.resolve(SOURCE).then(s => INTEROP(require(s)))"),noInterop:t("Promise.resolve(SOURCE).then(s => require(s))")}};var n=typeof WeakSet==="function"&&new WeakSet;var a=function isString(e){return r.isStringLiteral(e)||r.isTemplateLiteral(e)&&e.expressions.length===0};return function(e,t){if(n){if(n.has(t)){return}n.add(t)}var i=getImportSource(r,t.parent);var o=a(i)?s["static"]:s.dynamic;var l=e.opts.noInterop?o.noInterop({SOURCE:i}):o.interop({SOURCE:i,INTEROP:e.addHelper("interopRequireWildcard")});t.parentPath.replaceWith(l)}}},42604:(e,t,r)=>{e.exports=r(99593)},36301:(e,t,r)=>{"use strict";var s=r(35747);var n=r(85622);var a=r(13401);Object.defineProperty(t,"commentRegex",{get:function getCommentRegex(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}});Object.defineProperty(t,"mapFileCommentRegex",{get:function getMapFileCommentRegex(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}});function decodeBase64(e){return a.Buffer.from(e,"base64").toString()}function stripComment(e){return e.split(",").pop()}function readFromFileMap(e,r){var a=t.mapFileCommentRegex.exec(e);var i=a[1]||a[2];var o=n.resolve(r,i);try{return s.readFileSync(o,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+o+"\n"+e)}}function Converter(e,t){t=t||{};if(t.isFileComment)e=readFromFileMap(e,t.commentFileDir);if(t.hasComment)e=stripComment(e);if(t.isEncoded)e=decodeBase64(e);if(t.isJSON||t.isEncoded)e=JSON.parse(e);this.sourcemap=e}Converter.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)};Converter.prototype.toBase64=function(){var e=this.toJSON();return a.Buffer.from(e,"utf8").toString("base64")};Converter.prototype.toComment=function(e){var t=this.toBase64();var r="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return e&&e.multiline?"/*# "+r+" */":"//# "+r};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error('property "'+e+'" already exists on the sourcemap, use set property instead');return this.setProperty(e,t)};Converter.prototype.setProperty=function(e,t){this.sourcemap[e]=t;return this};Converter.prototype.getProperty=function(e){return this.sourcemap[e]};t.fromObject=function(e){return new Converter(e)};t.fromJSON=function(e){return new Converter(e,{isJSON:true})};t.fromBase64=function(e){return new Converter(e,{isEncoded:true})};t.fromComment=function(e){e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(e,{isEncoded:true,hasComment:true})};t.fromMapFileComment=function(e,t){return new Converter(e,{commentFileDir:t,isFileComment:true,isJSON:true})};t.fromSource=function(e){var r=e.match(t.commentRegex);return r?t.fromComment(r.pop()):null};t.fromMapFileSource=function(e,r){var s=e.match(t.mapFileCommentRegex);return s?t.fromMapFileComment(s.pop(),r):null};t.removeComments=function(e){return e.replace(t.commentRegex,"")};t.removeMapFileComments=function(e){return e.replace(t.mapFileCommentRegex,"")};t.generateMapFileComment=function(e,t){var r="sourceMappingURL="+e;return t&&t.multiline?"/*# "+r+" */":"//# "+r}},13401:(e,t,r)=>{var s=r(64293);var n=s.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=s}else{copyProps(s,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var s=n(e);if(t!==undefined){if(typeof r==="string"){s.fill(t,r)}else{s.fill(t)}}else{s.fill(0)}return s};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s.SlowBuffer(e)}},79774:(e,t,r)=>{"use strict";const{compare:s,intersection:n,semver:a}=r(7720);const i=r(72490);const o=r(97347);e.exports=function(e){const t=a(e);if(t.major!==3){throw RangeError("This version of `core-js-compat` works only with `core-js@3`.")}const r=[];for(const e of Object.keys(i)){if(s(e,"<=",t)){r.push(...i[e])}}return n(r,o)}},7720:(e,t,r)=>{"use strict";const s=r(43566);const n=r(29402);const a=Function.call.bind({}.hasOwnProperty);function compare(e,t,r){return s(n(e),t,n(r))}function intersection(e,t){const r=e instanceof Set?e:new Set(e);return t.filter(e=>r.has(e))}function sortObjectByKey(e,t){return Object.keys(e).sort(t).reduce((t,r)=>{t[r]=e[r];return t},{})}e.exports={compare:compare,has:a,intersection:intersection,semver:n,sortObjectByKey:sortObjectByKey}},97819:(e,t,r)=>{const s=r(71982);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:a}=r(22768);const{re:i,t:o}=r(1537);const{compareIdentifiers:l}=r(36103);class SemVer{constructor(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>a||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>a||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>a||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},43566:(e,t,r)=>{const s=r(42445);const n=r(77729);const a=r(34087);const i=r(60758);const o=r(42720);const l=r(29864);const u=(e,t,r,u)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return s(e,r,u);case"!=":return n(e,r,u);case">":return a(e,r,u);case">=":return i(e,r,u);case"<":return o(e,r,u);case"<=":return l(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=u},29402:(e,t,r)=>{const s=r(97819);const n=r(23614);const{re:a,t:i}=r(1537);const o=(e,t)=>{if(e instanceof s){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(a[i.COERCE])}else{let t;while((t=a[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}a[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}a[i.COERCERTL].lastIndex=-1}if(r===null)return null;return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=o},829:(e,t,r)=>{const s=r(97819);const n=(e,t,r)=>new s(e,r).compare(new s(t,r));e.exports=n},42445:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)===0;e.exports=n},34087:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)>0;e.exports=n},60758:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)>=0;e.exports=n},42720:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)<0;e.exports=n},29864:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)<=0;e.exports=n},77729:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)!==0;e.exports=n},23614:(e,t,r)=>{const{MAX_LENGTH:s}=r(22768);const{re:n,t:a}=r(1537);const i=r(97819);const o=(e,t)=>{if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof i){return e}if(typeof e!=="string"){return null}if(e.length>s){return null}const r=t.loose?n[a.LOOSE]:n[a.FULL];if(!r.test(e)){return null}try{return new i(e,t)}catch(e){return null}};e.exports=o},22768:e=>{const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:s,MAX_SAFE_COMPONENT_LENGTH:n}},71982:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},36103:e=>{const t=/^[0-9]+$/;const r=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:er(t,e);e.exports={compareIdentifiers:r,rcompareIdentifiers:s}},1537:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:s}=r(22768);const n=r(71982);t=e.exports={};const a=t.re=[];const i=t.src=[];const o=t.t={};let l=0;const u=(e,t,r)=>{const s=l++;n(s,t);o[e]=s;i[s]=t;a[s]=new RegExp(t,r?"g":undefined)};u("NUMERICIDENTIFIER","0|[1-9]\\d*");u("NUMERICIDENTIFIERLOOSE","[0-9]+");u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");u("MAINVERSION",`(${i[o.NUMERICIDENTIFIER]})\\.`+`(${i[o.NUMERICIDENTIFIER]})\\.`+`(${i[o.NUMERICIDENTIFIER]})`);u("MAINVERSIONLOOSE",`(${i[o.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[o.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[o.NUMERICIDENTIFIERLOOSE]})`);u("PRERELEASEIDENTIFIER",`(?:${i[o.NUMERICIDENTIFIER]}|${i[o.NONNUMERICIDENTIFIER]})`);u("PRERELEASEIDENTIFIERLOOSE",`(?:${i[o.NUMERICIDENTIFIERLOOSE]}|${i[o.NONNUMERICIDENTIFIER]})`);u("PRERELEASE",`(?:-(${i[o.PRERELEASEIDENTIFIER]}(?:\\.${i[o.PRERELEASEIDENTIFIER]})*))`);u("PRERELEASELOOSE",`(?:-?(${i[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[o.PRERELEASEIDENTIFIERLOOSE]})*))`);u("BUILDIDENTIFIER","[0-9A-Za-z-]+");u("BUILD",`(?:\\+(${i[o.BUILDIDENTIFIER]}(?:\\.${i[o.BUILDIDENTIFIER]})*))`);u("FULLPLAIN",`v?${i[o.MAINVERSION]}${i[o.PRERELEASE]}?${i[o.BUILD]}?`);u("FULL",`^${i[o.FULLPLAIN]}$`);u("LOOSEPLAIN",`[v=\\s]*${i[o.MAINVERSIONLOOSE]}${i[o.PRERELEASELOOSE]}?${i[o.BUILD]}?`);u("LOOSE",`^${i[o.LOOSEPLAIN]}$`);u("GTLT","((?:<|>)?=?)");u("XRANGEIDENTIFIERLOOSE",`${i[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);u("XRANGEIDENTIFIER",`${i[o.NUMERICIDENTIFIER]}|x|X|\\*`);u("XRANGEPLAIN",`[v=\\s]*(${i[o.XRANGEIDENTIFIER]})`+`(?:\\.(${i[o.XRANGEIDENTIFIER]})`+`(?:\\.(${i[o.XRANGEIDENTIFIER]})`+`(?:${i[o.PRERELEASE]})?${i[o.BUILD]}?`+`)?)?`);u("XRANGEPLAINLOOSE",`[v=\\s]*(${i[o.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[o.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[o.XRANGEIDENTIFIERLOOSE]})`+`(?:${i[o.PRERELEASELOOSE]})?${i[o.BUILD]}?`+`)?)?`);u("XRANGE",`^${i[o.GTLT]}\\s*${i[o.XRANGEPLAIN]}$`);u("XRANGELOOSE",`^${i[o.GTLT]}\\s*${i[o.XRANGEPLAINLOOSE]}$`);u("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);u("COERCERTL",i[o.COERCE],true);u("LONETILDE","(?:~>?)");u("TILDETRIM",`(\\s*)${i[o.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";u("TILDE",`^${i[o.LONETILDE]}${i[o.XRANGEPLAIN]}$`);u("TILDELOOSE",`^${i[o.LONETILDE]}${i[o.XRANGEPLAINLOOSE]}$`);u("LONECARET","(?:\\^)");u("CARETTRIM",`(\\s*)${i[o.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";u("CARET",`^${i[o.LONECARET]}${i[o.XRANGEPLAIN]}$`);u("CARETLOOSE",`^${i[o.LONECARET]}${i[o.XRANGEPLAINLOOSE]}$`);u("COMPARATORLOOSE",`^${i[o.GTLT]}\\s*(${i[o.LOOSEPLAIN]})$|^$`);u("COMPARATOR",`^${i[o.GTLT]}\\s*(${i[o.FULLPLAIN]})$|^$`);u("COMPARATORTRIM",`(\\s*)${i[o.GTLT]}\\s*(${i[o.LOOSEPLAIN]}|${i[o.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";u("HYPHENRANGE",`^\\s*(${i[o.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${i[o.XRANGEPLAIN]})`+`\\s*$`);u("HYPHENRANGELOOSE",`^\\s*(${i[o.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${i[o.XRANGEPLAINLOOSE]})`+`\\s*$`);u("STAR","(<|>)?=?\\s*\\*")},67941:e=>{"use strict";const t=Symbol.for("gensync:v1:start");const r=Symbol.for("gensync:v1:suspend");const s="GENSYNC_EXPECTED_START";const n="GENSYNC_EXPECTED_SUSPEND";const a="GENSYNC_OPTIONS_ERROR";const i="GENSYNC_RACE_NONEMPTY";const o="GENSYNC_ERRBACK_NO_CALLBACK";e.exports=Object.assign(function gensync(e){let t=e;if(typeof e!=="function"){t=newGenerator(e)}else{t=wrapGenerator(e)}return Object.assign(t,makeFunctionAPI(t))},{all:buildOperation({name:"all",arity:1,sync:function(e){const t=Array.from(e[0]);return t.map(e=>evaluateSync(e))},async:function(e,t,r){const s=Array.from(e[0]);let n=0;const a=s.map(()=>undefined);s.forEach((e,s)=>{evaluateAsync(e,e=>{a[s]=e;n+=1;if(n===a.length)t(a)},r)})}}),race:buildOperation({name:"race",arity:1,sync:function(e){const t=Array.from(e[0]);if(t.length===0){throw makeError("Must race at least 1 item",i)}return evaluateSync(t[0])},async:function(e,t,r){const s=Array.from(e[0]);if(s.length===0){throw makeError("Must race at least 1 item",i)}for(const e of s){evaluateAsync(e,t,r)}}})});function makeFunctionAPI(e){const t={sync:function(...t){return evaluateSync(e.apply(this,t))},async:function(...t){return new Promise((r,s)=>{evaluateAsync(e.apply(this,t),r,s)})},errback:function(...t){const r=t.pop();if(typeof r!=="function"){throw makeError("Asynchronous function called without callback",o)}let s;try{s=e.apply(this,t)}catch(e){r(e);return}evaluateAsync(s,e=>r(undefined,e),e=>r(e))}};return t}function assertTypeof(e,t,r,s){if(typeof r===e||s&&typeof r==="undefined"){return}let n;if(s){n=`Expected opts.${t} to be either a ${e}, or undefined.`}else{n=`Expected opts.${t} to be a ${e}.`}throw makeError(n,a)}function makeError(e,t){return Object.assign(new Error(e),{code:t})}function newGenerator({name:e,arity:t,sync:r,async:s,errback:n}){assertTypeof("string","name",e,true);assertTypeof("number","arity",t,true);assertTypeof("function","sync",r);assertTypeof("function","async",s,true);assertTypeof("function","errback",n,true);if(s&&n){throw makeError("Expected one of either opts.async or opts.errback, but got _both_.",a)}if(typeof e!=="string"){let t;if(n&&n.name&&n.name!=="errback"){t=n.name}if(s&&s.name&&s.name!=="async"){t=s.name.replace(/Async$/,"")}if(r&&r.name&&r.name!=="sync"){t=r.name.replace(/Sync$/,"")}if(typeof t==="string"){e=t}}if(typeof t!=="number"){t=r.length}return buildOperation({name:e,arity:t,sync:function(e){return r.apply(this,e)},async:function(e,t,a){if(s){s.apply(this,e).then(t,a)}else if(n){n.call(this,...e,(e,r)=>{if(e==null)t(r);else a(e)})}else{t(r.apply(this,e))}}})}function wrapGenerator(e){return setFunctionMetadata(e.name,e.length,function(...t){return e.apply(this,t)})}function buildOperation({name:e,arity:s,sync:n,async:a}){return setFunctionMetadata(e,s,function*(...e){const s=yield t;if(!s){return n.call(this,e)}let i;try{a.call(this,e,e=>{if(i)return;i={value:e};s()},e=>{if(i)return;i={err:e};s()})}catch(e){i={err:e};s()}yield r;if(i.hasOwnProperty("err")){throw i.err}return i.value})}function evaluateSync(e){let t;while(!({value:t}=e.next()).done){assertStart(t,e)}return t}function evaluateAsync(e,t,r){(function step(){try{let s;while(!({value:s}=e.next()).done){assertStart(s,e);let t=true;let r=false;const n=e.next(()=>{if(t){r=true}else{step()}});t=false;assertSuspend(n,e);if(!r){return}}return t(s)}catch(e){return r(e)}})()}function assertStart(e,r){if(e===t)return;throwError(r,makeError(`Got unexpected yielded value in gensync generator: ${JSON.stringify(e)}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,s))}function assertSuspend({value:e,done:t},s){if(!t&&e===r)return;throwError(s,makeError(t?"Unexpected generator completion. If you get this, it is probably a gensync bug.":`Expected GENSYNC_SUSPEND, got ${JSON.stringify(e)}. If you get this, it is probably a gensync bug.`,n))}function throwError(e,t){if(e.throw)e.throw(t);throw t}function isIterable(e){return!!e&&(typeof e==="object"||typeof e==="function")&&!e[Symbol.iterator]}function setFunctionMetadata(e,t,r){if(typeof e==="string"){const t=Object.getOwnPropertyDescriptor(r,"name");if(!t||t.configurable){Object.defineProperty(r,"name",Object.assign(t||{},{configurable:true,value:e}))}}if(typeof t==="number"){const e=Object.getOwnPropertyDescriptor(r,"length");if(!e||e.configurable){Object.defineProperty(r,"length",Object.assign(e||{},{configurable:true,value:t}))}}return r}},41389:(e,t,r)=>{"use strict";e.exports=r(67589)},52388:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;t.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:undefined};if(e[1])t.type="string",t.closed=!!(e[3]||e[4]);else if(e[5])t.type="comment";else if(e[6])t.type="comment",t.closed=!!e[7];else if(e[8])t.type="regex";else if(e[9])t.type="number";else if(e[10])t.type="name";else if(e[11])t.type="punctuator";else if(e[12])t.type="whitespace";return t}},41066:(e,t,r)=>{var s=r(76028),n=r(562);var a=s(n,"DataView");e.exports=a},30731:(e,t,r)=>{var s=r(79130),n=r(93067),a=r(21098),i=r(73949),o=r(48911);function Hash(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t{var s=r(52523),n=r(19937),a=r(15131),i=r(89528),o=r(51635);function ListCache(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t{var s=r(76028),n=r(562);var a=s(n,"Map");e.exports=a},16531:(e,t,r)=>{var s=r(3489),n=r(288),a=r(15712),i=r(80369),o=r(66935);function MapCache(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t{var s=r(76028),n=r(562);var a=s(n,"Promise");e.exports=a},9056:(e,t,r)=>{var s=r(76028),n=r(562);var a=s(n,"Set");e.exports=a},41113:(e,t,r)=>{var s=r(16531),n=r(57073),a=r(65372);function SetCache(e){var t=-1,r=e==null?0:e.length;this.__data__=new s;while(++t{var s=r(82746),n=r(22614),a=r(24202),i=r(96310),o=r(58721),l=r(90320);function Stack(e){var t=this.__data__=new s(e);this.size=t.size}Stack.prototype.clear=n;Stack.prototype["delete"]=a;Stack.prototype.get=i;Stack.prototype.has=o;Stack.prototype.set=l;e.exports=Stack},39929:(e,t,r)=>{var s=r(562);var n=s.Symbol;e.exports=n},81918:(e,t,r)=>{var s=r(562);var n=s.Uint8Array;e.exports=n},87243:(e,t,r)=>{var s=r(76028),n=r(562);var a=s(n,"WeakMap");e.exports=a},99502:e=>{function apply(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}e.exports=apply},98029:e=>{function arrayEach(e,t){var r=-1,s=e==null?0:e.length;while(++r{function arrayFilter(e,t){var r=-1,s=e==null?0:e.length,n=0,a=[];while(++r{var s=r(15683),n=r(24839),a=r(43364),i=r(12963),o=r(72950),l=r(53635);var u=Object.prototype;var c=u.hasOwnProperty;function arrayLikeKeys(e,t){var r=a(e),u=!r&&n(e),p=!r&&!u&&i(e),f=!r&&!u&&!p&&l(e),d=r||u||p||f,y=d?s(e.length,String):[],h=y.length;for(var m in e){if((t||c.call(e,m))&&!(d&&(m=="length"||p&&(m=="offset"||m=="parent")||f&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||o(m,h)))){y.push(m)}}return y}e.exports=arrayLikeKeys},77680:e=>{function arrayMap(e,t){var r=-1,s=e==null?0:e.length,n=Array(s);while(++r{function arrayPush(e,t){var r=-1,s=t.length,n=e.length;while(++r{function arraySome(e,t){var r=-1,s=e==null?0:e.length;while(++r{var s=r(71850),n=r(28650);var a=Object.prototype;var i=a.hasOwnProperty;function assignValue(e,t,r){var a=e[t];if(!(i.call(e,t)&&n(a,r))||r===undefined&&!(t in e)){s(e,t,r)}}e.exports=assignValue},886:(e,t,r)=>{var s=r(28650);function assocIndexOf(e,t){var r=e.length;while(r--){if(s(e[r][0],t)){return r}}return-1}e.exports=assocIndexOf},57361:(e,t,r)=>{var s=r(83568),n=r(50288);function baseAssign(e,t){return e&&s(t,n(t),e)}e.exports=baseAssign},86677:(e,t,r)=>{var s=r(83568),n=r(86032);function baseAssignIn(e,t){return e&&s(t,n(t),e)}e.exports=baseAssignIn},71850:(e,t,r)=>{var s=r(59252);function baseAssignValue(e,t,r){if(t=="__proto__"&&s){s(e,t,{configurable:true,enumerable:true,value:r,writable:true})}else{e[t]=r}}e.exports=baseAssignValue},95570:(e,t,r)=>{var s=r(49754),n=r(98029),a=r(55647),i=r(57361),o=r(86677),l=r(82009),u=r(76640),c=r(85337),p=r(93017),f=r(18785),d=r(54296),y=r(207),h=r(4025),m=r(27353),g=r(66312),b=r(43364),x=r(12963),v=r(13689),E=r(43420),T=r(81360),S=r(50288),P=r(86032);var j=1,w=2,A=4;var D="[object Arguments]",O="[object Array]",_="[object Boolean]",C="[object Date]",I="[object Error]",k="[object Function]",R="[object GeneratorFunction]",M="[object Map]",N="[object Number]",F="[object Object]",L="[object RegExp]",B="[object Set]",q="[object String]",W="[object Symbol]",U="[object WeakMap]";var K="[object ArrayBuffer]",V="[object DataView]",$="[object Float32Array]",J="[object Float64Array]",H="[object Int8Array]",G="[object Int16Array]",Y="[object Int32Array]",X="[object Uint8Array]",z="[object Uint8ClampedArray]",Q="[object Uint16Array]",Z="[object Uint32Array]";var ee={};ee[D]=ee[O]=ee[K]=ee[V]=ee[_]=ee[C]=ee[$]=ee[J]=ee[H]=ee[G]=ee[Y]=ee[M]=ee[N]=ee[F]=ee[L]=ee[B]=ee[q]=ee[W]=ee[X]=ee[z]=ee[Q]=ee[Z]=true;ee[I]=ee[k]=ee[U]=false;function baseClone(e,t,r,O,_,C){var I,M=t&j,N=t&w,L=t&A;if(r){I=_?r(e,O,_,C):r(e)}if(I!==undefined){return I}if(!E(e)){return e}var B=b(e);if(B){I=h(e);if(!M){return u(e,I)}}else{var q=y(e),W=q==k||q==R;if(x(e)){return l(e,M)}if(q==F||q==D||W&&!_){I=N||W?{}:g(e);if(!M){return N?p(e,o(I,e)):c(e,i(I,e))}}else{if(!ee[q]){return _?e:{}}I=m(e,q,M)}}C||(C=new s);var U=C.get(e);if(U){return U}C.set(e,I);if(T(e)){e.forEach(function(s){I.add(baseClone(s,t,r,s,e,C))})}else if(v(e)){e.forEach(function(s,n){I.set(n,baseClone(s,t,r,n,e,C))})}var K=L?N?d:f:N?P:S;var V=B?undefined:K(e);n(V||e,function(s,n){if(V){n=s;s=e[n]}a(I,n,baseClone(s,t,r,n,e,C))});return I}e.exports=baseClone},14794:(e,t,r)=>{var s=r(43420);var n=Object.create;var a=function(){function object(){}return function(e){if(!s(e)){return{}}if(n){return n(e)}object.prototype=e;var t=new object;object.prototype=undefined;return t}}();e.exports=a},45547:(e,t,r)=>{var s=r(75954),n=r(97990);var a=n(s);e.exports=a},97919:e=>{function baseFindIndex(e,t,r,s){var n=e.length,a=r+(s?1:-1);while(s?a--:++a{var s=r(52061),n=r(6426);function baseFlatten(e,t,r,a,i){var o=-1,l=e.length;r||(r=n);i||(i=[]);while(++o0&&r(u)){if(t>1){baseFlatten(u,t-1,r,a,i)}else{s(i,u)}}else if(!a){i[i.length]=u}}return i}e.exports=baseFlatten},58342:(e,t,r)=>{var s=r(28290);var n=s();e.exports=n},75954:(e,t,r)=>{var s=r(58342),n=r(50288);function baseForOwn(e,t){return e&&s(e,t,n)}e.exports=baseForOwn},86685:(e,t,r)=>{var s=r(18963),n=r(30668);function baseGet(e,t){t=s(t,e);var r=0,a=t.length;while(e!=null&&r{var s=r(52061),n=r(43364);function baseGetAllKeys(e,t,r){var a=t(e);return n(e)?a:s(a,r(e))}e.exports=baseGetAllKeys},98653:(e,t,r)=>{var s=r(39929),n=r(32608),a=r(49052);var i="[object Null]",o="[object Undefined]";var l=s?s.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?o:i}return l&&l in Object(e)?n(e):a(e)}e.exports=baseGetTag},59488:e=>{var t=Object.prototype;var r=t.hasOwnProperty;function baseHas(e,t){return e!=null&&r.call(e,t)}e.exports=baseHas},56263:e=>{function baseHasIn(e,t){return e!=null&&t in Object(e)}e.exports=baseHasIn},77086:(e,t,r)=>{var s=r(97919),n=r(14094),a=r(54590);function baseIndexOf(e,t,r){return t===t?a(e,t,r):s(e,n,r)}e.exports=baseIndexOf},80683:e=>{function baseIndexOfWith(e,t,r,s){var n=r-1,a=e.length;while(++n{var s=r(98653),n=r(9111);var a="[object Arguments]";function baseIsArguments(e){return n(e)&&s(e)==a}e.exports=baseIsArguments},60876:(e,t,r)=>{var s=r(74402),n=r(9111);function baseIsEqual(e,t,r,a,i){if(e===t){return true}if(e==null||t==null||!n(e)&&!n(t)){return e!==e&&t!==t}return s(e,t,r,a,baseIsEqual,i)}e.exports=baseIsEqual},74402:(e,t,r)=>{var s=r(49754),n=r(32312),a=r(95155),i=r(61333),o=r(207),l=r(43364),u=r(12963),c=r(53635);var p=1;var f="[object Arguments]",d="[object Array]",y="[object Object]";var h=Object.prototype;var m=h.hasOwnProperty;function baseIsEqualDeep(e,t,r,h,g,b){var x=l(e),v=l(t),E=x?d:o(e),T=v?d:o(t);E=E==f?y:E;T=T==f?y:T;var S=E==y,P=T==y,j=E==T;if(j&&u(e)){if(!u(t)){return false}x=true;S=false}if(j&&!S){b||(b=new s);return x||c(e)?n(e,t,r,h,g,b):a(e,t,E,r,h,g,b)}if(!(r&p)){var w=S&&m.call(e,"__wrapped__"),A=P&&m.call(t,"__wrapped__");if(w||A){var D=w?e.value():e,O=A?t.value():t;b||(b=new s);return g(D,O,r,h,b)}}if(!j){return false}b||(b=new s);return i(e,t,r,h,g,b)}e.exports=baseIsEqualDeep},81391:(e,t,r)=>{var s=r(207),n=r(9111);var a="[object Map]";function baseIsMap(e){return n(e)&&s(e)==a}e.exports=baseIsMap},83770:(e,t,r)=>{var s=r(49754),n=r(60876);var a=1,i=2;function baseIsMatch(e,t,r,o){var l=r.length,u=l,c=!o;if(e==null){return!u}e=Object(e);while(l--){var p=r[l];if(c&&p[2]?p[1]!==e[p[0]]:!(p[0]in e)){return false}}while(++l{function baseIsNaN(e){return e!==e}e.exports=baseIsNaN},72294:(e,t,r)=>{var s=r(66827),n=r(16716),a=r(43420),i=r(98241);var o=/[\\^$.*+?()[\]{}|]/g;var l=/^\[object .+?Constructor\]$/;var u=Function.prototype,c=Object.prototype;var p=u.toString;var f=c.hasOwnProperty;var d=RegExp("^"+p.call(f).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(e){if(!a(e)||n(e)){return false}var t=s(e)?d:l;return t.test(i(e))}e.exports=baseIsNative},42542:(e,t,r)=>{var s=r(98653),n=r(9111);var a="[object RegExp]";function baseIsRegExp(e){return n(e)&&s(e)==a}e.exports=baseIsRegExp},19472:(e,t,r)=>{var s=r(207),n=r(9111);var a="[object Set]";function baseIsSet(e){return n(e)&&s(e)==a}e.exports=baseIsSet},86944:(e,t,r)=>{var s=r(98653),n=r(55752),a=r(9111);var i="[object Arguments]",o="[object Array]",l="[object Boolean]",u="[object Date]",c="[object Error]",p="[object Function]",f="[object Map]",d="[object Number]",y="[object Object]",h="[object RegExp]",m="[object Set]",g="[object String]",b="[object WeakMap]";var x="[object ArrayBuffer]",v="[object DataView]",E="[object Float32Array]",T="[object Float64Array]",S="[object Int8Array]",P="[object Int16Array]",j="[object Int32Array]",w="[object Uint8Array]",A="[object Uint8ClampedArray]",D="[object Uint16Array]",O="[object Uint32Array]";var _={};_[E]=_[T]=_[S]=_[P]=_[j]=_[w]=_[A]=_[D]=_[O]=true;_[i]=_[o]=_[x]=_[l]=_[v]=_[u]=_[c]=_[p]=_[f]=_[d]=_[y]=_[h]=_[m]=_[g]=_[b]=false;function baseIsTypedArray(e){return a(e)&&n(e.length)&&!!_[s(e)]}e.exports=baseIsTypedArray},49749:(e,t,r)=>{var s=r(67122),n=r(93008),a=r(57460),i=r(43364),o=r(60204);function baseIteratee(e){if(typeof e=="function"){return e}if(e==null){return a}if(typeof e=="object"){return i(e)?n(e[0],e[1]):s(e)}return o(e)}e.exports=baseIteratee},24787:(e,t,r)=>{var s=r(4954),n=r(11491);var a=Object.prototype;var i=a.hasOwnProperty;function baseKeys(e){if(!s(e)){return n(e)}var t=[];for(var r in Object(e)){if(i.call(e,r)&&r!="constructor"){t.push(r)}}return t}e.exports=baseKeys},14535:(e,t,r)=>{var s=r(43420),n=r(4954),a=r(43101);var i=Object.prototype;var o=i.hasOwnProperty;function baseKeysIn(e){if(!s(e)){return a(e)}var t=n(e),r=[];for(var i in e){if(!(i=="constructor"&&(t||!o.call(e,i)))){r.push(i)}}return r}e.exports=baseKeysIn},56004:(e,t,r)=>{var s=r(45547),n=r(20577);function baseMap(e,t){var r=-1,a=n(e)?Array(e.length):[];s(e,function(e,s,n){a[++r]=t(e,s,n)});return a}e.exports=baseMap},67122:(e,t,r)=>{var s=r(83770),n=r(47876),a=r(66162);function baseMatches(e){var t=n(e);if(t.length==1&&t[0][2]){return a(t[0][0],t[0][1])}return function(r){return r===e||s(r,e,t)}}e.exports=baseMatches},93008:(e,t,r)=>{var s=r(60876),n=r(94484),a=r(14426),i=r(20007),o=r(36705),l=r(66162),u=r(30668);var c=1,p=2;function baseMatchesProperty(e,t){if(i(e)&&o(t)){return l(u(e),t)}return function(r){var i=n(r,e);return i===undefined&&i===t?a(r,e):s(t,i,c|p)}}e.exports=baseMatchesProperty},18631:(e,t,r)=>{var s=r(77680),n=r(86685),a=r(49749),i=r(56004),o=r(30268),l=r(83717),u=r(2687),c=r(57460),p=r(43364);function baseOrderBy(e,t,r){if(t.length){t=s(t,function(e){if(p(e)){return function(t){return n(t,e.length===1?e[0]:e)}}return e})}else{t=[c]}var f=-1;t=s(t,l(a));var d=i(e,function(e,r,n){var a=s(t,function(t){return t(e)});return{criteria:a,index:++f,value:e}});return o(d,function(e,t){return u(e,t,r)})}e.exports=baseOrderBy},18077:e=>{function baseProperty(e){return function(t){return t==null?undefined:t[e]}}e.exports=baseProperty},1666:(e,t,r)=>{var s=r(86685);function basePropertyDeep(e){return function(t){return s(t,e)}}e.exports=basePropertyDeep},60257:(e,t,r)=>{var s=r(77680),n=r(77086),a=r(80683),i=r(83717),o=r(76640);var l=Array.prototype;var u=l.splice;function basePullAll(e,t,r,l){var c=l?a:n,p=-1,f=t.length,d=e;if(e===t){t=o(t)}if(r){d=s(e,i(r))}while(++p-1){if(d!==e){u.call(d,y,1)}u.call(e,y,1)}}return e}e.exports=basePullAll},31428:(e,t,r)=>{var s=r(57460),n=r(216),a=r(65444);function baseRest(e,t){return a(n(e,t,s),e+"")}e.exports=baseRest},3503:(e,t,r)=>{var s=r(66915),n=r(59252),a=r(57460);var i=!n?a:function(e,t){return n(e,"toString",{configurable:true,enumerable:false,value:s(t),writable:true})};e.exports=i},98415:e=>{function baseSlice(e,t,r){var s=-1,n=e.length;if(t<0){t=-t>n?0:n+t}r=r>n?n:r;if(r<0){r+=n}n=t>r?0:r-t>>>0;t>>>=0;var a=Array(n);while(++s{function baseSortBy(e,t){var r=e.length;e.sort(t);while(r--){e[r]=e[r].value}return e}e.exports=baseSortBy},15683:e=>{function baseTimes(e,t){var r=-1,s=Array(e);while(++r{var s=r(39929),n=r(77680),a=r(43364),i=r(82500);var o=1/0;var l=s?s.prototype:undefined,u=l?l.toString:undefined;function baseToString(e){if(typeof e=="string"){return e}if(a(e)){return n(e,baseToString)+""}if(i(e)){return u?u.call(e):""}var t=e+"";return t=="0"&&1/e==-o?"-0":t}e.exports=baseToString},83717:e=>{function baseUnary(e){return function(t){return e(t)}}e.exports=baseUnary},89127:e=>{function cacheHas(e,t){return e.has(t)}e.exports=cacheHas},18963:(e,t,r)=>{var s=r(43364),n=r(20007),a=r(35725),i=r(49228);function castPath(e,t){if(s(e)){return e}return n(e,t)?[e]:a(i(e))}e.exports=castPath},18384:(e,t,r)=>{var s=r(81918);function cloneArrayBuffer(e){var t=new e.constructor(e.byteLength);new s(t).set(new s(e));return t}e.exports=cloneArrayBuffer},82009:(e,t,r)=>{e=r.nmd(e);var s=r(562);var n=true&&t&&!t.nodeType&&t;var a=n&&"object"=="object"&&e&&!e.nodeType&&e;var i=a&&a.exports===n;var o=i?s.Buffer:undefined,l=o?o.allocUnsafe:undefined;function cloneBuffer(e,t){if(t){return e.slice()}var r=e.length,s=l?l(r):new e.constructor(r);e.copy(s);return s}e.exports=cloneBuffer},8534:(e,t,r)=>{var s=r(18384);function cloneDataView(e,t){var r=t?s(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}e.exports=cloneDataView},86549:e=>{var t=/\w*$/;function cloneRegExp(e){var r=new e.constructor(e.source,t.exec(e));r.lastIndex=e.lastIndex;return r}e.exports=cloneRegExp},81731:(e,t,r)=>{var s=r(39929);var n=s?s.prototype:undefined,a=n?n.valueOf:undefined;function cloneSymbol(e){return a?Object(a.call(e)):{}}e.exports=cloneSymbol},13817:(e,t,r)=>{var s=r(18384);function cloneTypedArray(e,t){var r=t?s(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}e.exports=cloneTypedArray},28800:(e,t,r)=>{var s=r(82500);function compareAscending(e,t){if(e!==t){var r=e!==undefined,n=e===null,a=e===e,i=s(e);var o=t!==undefined,l=t===null,u=t===t,c=s(t);if(!l&&!c&&!i&&e>t||i&&o&&u&&!l&&!c||n&&o&&u||!r&&u||!a){return 1}if(!n&&!i&&!c&&e{var s=r(28800);function compareMultiple(e,t,r){var n=-1,a=e.criteria,i=t.criteria,o=a.length,l=r.length;while(++n=l){return u}var c=r[n];return u*(c=="desc"?-1:1)}}return e.index-t.index}e.exports=compareMultiple},76640:e=>{function copyArray(e,t){var r=-1,s=e.length;t||(t=Array(s));while(++r{var s=r(55647),n=r(71850);function copyObject(e,t,r,a){var i=!r;r||(r={});var o=-1,l=t.length;while(++o{var s=r(83568),n=r(5841);function copySymbols(e,t){return s(e,n(e),t)}e.exports=copySymbols},93017:(e,t,r)=>{var s=r(83568),n=r(85468);function copySymbolsIn(e,t){return s(e,n(e),t)}e.exports=copySymbolsIn},54554:(e,t,r)=>{var s=r(562);var n=s["__core-js_shared__"];e.exports=n},97990:(e,t,r)=>{var s=r(20577);function createBaseEach(e,t){return function(r,n){if(r==null){return r}if(!s(r)){return e(r,n)}var a=r.length,i=t?a:-1,o=Object(r);while(t?i--:++i{function createBaseFor(e){return function(t,r,s){var n=-1,a=Object(t),i=s(t),o=i.length;while(o--){var l=i[e?o:++n];if(r(a[l],l,a)===false){break}}return t}}e.exports=createBaseFor},59252:(e,t,r)=>{var s=r(76028);var n=function(){try{var e=s(Object,"defineProperty");e({},"",{});return e}catch(e){}}();e.exports=n},32312:(e,t,r)=>{var s=r(41113),n=r(49551),a=r(89127);var i=1,o=2;function equalArrays(e,t,r,l,u,c){var p=r&i,f=e.length,d=t.length;if(f!=d&&!(p&&d>f)){return false}var y=c.get(e);var h=c.get(t);if(y&&h){return y==t&&h==e}var m=-1,g=true,b=r&o?new s:undefined;c.set(e,t);c.set(t,e);while(++m{var s=r(39929),n=r(81918),a=r(28650),i=r(32312),o=r(46918),l=r(44592);var u=1,c=2;var p="[object Boolean]",f="[object Date]",d="[object Error]",y="[object Map]",h="[object Number]",m="[object RegExp]",g="[object Set]",b="[object String]",x="[object Symbol]";var v="[object ArrayBuffer]",E="[object DataView]";var T=s?s.prototype:undefined,S=T?T.valueOf:undefined;function equalByTag(e,t,r,s,T,P,j){switch(r){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset){return false}e=e.buffer;t=t.buffer;case v:if(e.byteLength!=t.byteLength||!P(new n(e),new n(t))){return false}return true;case p:case f:case h:return a(+e,+t);case d:return e.name==t.name&&e.message==t.message;case m:case b:return e==t+"";case y:var w=o;case g:var A=s&u;w||(w=l);if(e.size!=t.size&&!A){return false}var D=j.get(e);if(D){return D==t}s|=c;j.set(e,t);var O=i(w(e),w(t),s,T,P,j);j["delete"](e);return O;case x:if(S){return S.call(e)==S.call(t)}}return false}e.exports=equalByTag},61333:(e,t,r)=>{var s=r(18785);var n=1;var a=Object.prototype;var i=a.hasOwnProperty;function equalObjects(e,t,r,a,o,l){var u=r&n,c=s(e),p=c.length,f=s(t),d=f.length;if(p!=d&&!u){return false}var y=p;while(y--){var h=c[y];if(!(u?h in t:i.call(t,h))){return false}}var m=l.get(e);var g=l.get(t);if(m&&g){return m==t&&g==e}var b=true;l.set(e,t);l.set(t,e);var x=u;while(++y{var t=typeof global=="object"&&global&&global.Object===Object&&global;e.exports=t},18785:(e,t,r)=>{var s=r(98160),n=r(5841),a=r(50288);function getAllKeys(e){return s(e,a,n)}e.exports=getAllKeys},54296:(e,t,r)=>{var s=r(98160),n=r(85468),a=r(86032);function getAllKeysIn(e){return s(e,a,n)}e.exports=getAllKeysIn},71198:(e,t,r)=>{var s=r(89958);function getMapData(e,t){var r=e.__data__;return s(t)?r[typeof t=="string"?"string":"hash"]:r.map}e.exports=getMapData},47876:(e,t,r)=>{var s=r(36705),n=r(50288);function getMatchData(e){var t=n(e),r=t.length;while(r--){var a=t[r],i=e[a];t[r]=[a,i,s(i)]}return t}e.exports=getMatchData},76028:(e,t,r)=>{var s=r(72294),n=r(64413);function getNative(e,t){var r=n(e,t);return s(r)?r:undefined}e.exports=getNative},63363:(e,t,r)=>{var s=r(90570);var n=s(Object.getPrototypeOf,Object);e.exports=n},32608:(e,t,r)=>{var s=r(39929);var n=Object.prototype;var a=n.hasOwnProperty;var i=n.toString;var o=s?s.toStringTag:undefined;function getRawTag(e){var t=a.call(e,o),r=e[o];try{e[o]=undefined;var s=true}catch(e){}var n=i.call(e);if(s){if(t){e[o]=r}else{delete e[o]}}return n}e.exports=getRawTag},5841:(e,t,r)=>{var s=r(69459),n=r(87632);var a=Object.prototype;var i=a.propertyIsEnumerable;var o=Object.getOwnPropertySymbols;var l=!o?n:function(e){if(e==null){return[]}e=Object(e);return s(o(e),function(t){return i.call(e,t)})};e.exports=l},85468:(e,t,r)=>{var s=r(52061),n=r(63363),a=r(5841),i=r(87632);var o=Object.getOwnPropertySymbols;var l=!o?i:function(e){var t=[];while(e){s(t,a(e));e=n(e)}return t};e.exports=l},207:(e,t,r)=>{var s=r(41066),n=r(51105),a=r(40514),i=r(9056),o=r(87243),l=r(98653),u=r(98241);var c="[object Map]",p="[object Object]",f="[object Promise]",d="[object Set]",y="[object WeakMap]";var h="[object DataView]";var m=u(s),g=u(n),b=u(a),x=u(i),v=u(o);var E=l;if(s&&E(new s(new ArrayBuffer(1)))!=h||n&&E(new n)!=c||a&&E(a.resolve())!=f||i&&E(new i)!=d||o&&E(new o)!=y){E=function(e){var t=l(e),r=t==p?e.constructor:undefined,s=r?u(r):"";if(s){switch(s){case m:return h;case g:return c;case b:return f;case x:return d;case v:return y}}return t}}e.exports=E},64413:e=>{function getValue(e,t){return e==null?undefined:e[t]}e.exports=getValue},23144:(e,t,r)=>{var s=r(18963),n=r(24839),a=r(43364),i=r(72950),o=r(55752),l=r(30668);function hasPath(e,t,r){t=s(t,e);var u=-1,c=t.length,p=false;while(++u{var s=r(36786);function hashClear(){this.__data__=s?s(null):{};this.size=0}e.exports=hashClear},93067:e=>{function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];this.size-=t?1:0;return t}e.exports=hashDelete},21098:(e,t,r)=>{var s=r(36786);var n="__lodash_hash_undefined__";var a=Object.prototype;var i=a.hasOwnProperty;function hashGet(e){var t=this.__data__;if(s){var r=t[e];return r===n?undefined:r}return i.call(t,e)?t[e]:undefined}e.exports=hashGet},73949:(e,t,r)=>{var s=r(36786);var n=Object.prototype;var a=n.hasOwnProperty;function hashHas(e){var t=this.__data__;return s?t[e]!==undefined:a.call(t,e)}e.exports=hashHas},48911:(e,t,r)=>{var s=r(36786);var n="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;this.size+=this.has(e)?0:1;r[e]=s&&t===undefined?n:t;return this}e.exports=hashSet},4025:e=>{var t=Object.prototype;var r=t.hasOwnProperty;function initCloneArray(e){var t=e.length,s=new e.constructor(t);if(t&&typeof e[0]=="string"&&r.call(e,"index")){s.index=e.index;s.input=e.input}return s}e.exports=initCloneArray},27353:(e,t,r)=>{var s=r(18384),n=r(8534),a=r(86549),i=r(81731),o=r(13817);var l="[object Boolean]",u="[object Date]",c="[object Map]",p="[object Number]",f="[object RegExp]",d="[object Set]",y="[object String]",h="[object Symbol]";var m="[object ArrayBuffer]",g="[object DataView]",b="[object Float32Array]",x="[object Float64Array]",v="[object Int8Array]",E="[object Int16Array]",T="[object Int32Array]",S="[object Uint8Array]",P="[object Uint8ClampedArray]",j="[object Uint16Array]",w="[object Uint32Array]";function initCloneByTag(e,t,r){var A=e.constructor;switch(t){case m:return s(e);case l:case u:return new A(+e);case g:return n(e,r);case b:case x:case v:case E:case T:case S:case P:case j:case w:return o(e,r);case c:return new A;case p:case y:return new A(e);case f:return a(e);case d:return new A;case h:return i(e)}}e.exports=initCloneByTag},66312:(e,t,r)=>{var s=r(14794),n=r(63363),a=r(4954);function initCloneObject(e){return typeof e.constructor=="function"&&!a(e)?s(n(e)):{}}e.exports=initCloneObject},6426:(e,t,r)=>{var s=r(39929),n=r(24839),a=r(43364);var i=s?s.isConcatSpreadable:undefined;function isFlattenable(e){return a(e)||n(e)||!!(i&&e&&e[i])}e.exports=isFlattenable},72950:e=>{var t=9007199254740991;var r=/^(?:0|[1-9]\d*)$/;function isIndex(e,s){var n=typeof e;s=s==null?t:s;return!!s&&(n=="number"||n!="symbol"&&r.test(e))&&(e>-1&&e%1==0&&e{var s=r(28650),n=r(20577),a=r(72950),i=r(43420);function isIterateeCall(e,t,r){if(!i(r)){return false}var o=typeof t;if(o=="number"?n(r)&&a(t,r.length):o=="string"&&t in r){return s(r[t],e)}return false}e.exports=isIterateeCall},20007:(e,t,r)=>{var s=r(43364),n=r(82500);var a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function isKey(e,t){if(s(e)){return false}var r=typeof e;if(r=="number"||r=="symbol"||r=="boolean"||e==null||n(e)){return true}return i.test(e)||!a.test(e)||t!=null&&e in Object(t)}e.exports=isKey},89958:e=>{function isKeyable(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}e.exports=isKeyable},16716:(e,t,r)=>{var s=r(54554);var n=function(){var e=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked(e){return!!n&&n in e}e.exports=isMasked},4954:e=>{var t=Object.prototype;function isPrototype(e){var r=e&&e.constructor,s=typeof r=="function"&&r.prototype||t;return e===s}e.exports=isPrototype},36705:(e,t,r)=>{var s=r(43420);function isStrictComparable(e){return e===e&&!s(e)}e.exports=isStrictComparable},52523:e=>{function listCacheClear(){this.__data__=[];this.size=0}e.exports=listCacheClear},19937:(e,t,r)=>{var s=r(886);var n=Array.prototype;var a=n.splice;function listCacheDelete(e){var t=this.__data__,r=s(t,e);if(r<0){return false}var n=t.length-1;if(r==n){t.pop()}else{a.call(t,r,1)}--this.size;return true}e.exports=listCacheDelete},15131:(e,t,r)=>{var s=r(886);function listCacheGet(e){var t=this.__data__,r=s(t,e);return r<0?undefined:t[r][1]}e.exports=listCacheGet},89528:(e,t,r)=>{var s=r(886);function listCacheHas(e){return s(this.__data__,e)>-1}e.exports=listCacheHas},51635:(e,t,r)=>{var s=r(886);function listCacheSet(e,t){var r=this.__data__,n=s(r,e);if(n<0){++this.size;r.push([e,t])}else{r[n][1]=t}return this}e.exports=listCacheSet},3489:(e,t,r)=>{var s=r(30731),n=r(82746),a=r(51105);function mapCacheClear(){this.size=0;this.__data__={hash:new s,map:new(a||n),string:new s}}e.exports=mapCacheClear},288:(e,t,r)=>{var s=r(71198);function mapCacheDelete(e){var t=s(this,e)["delete"](e);this.size-=t?1:0;return t}e.exports=mapCacheDelete},15712:(e,t,r)=>{var s=r(71198);function mapCacheGet(e){return s(this,e).get(e)}e.exports=mapCacheGet},80369:(e,t,r)=>{var s=r(71198);function mapCacheHas(e){return s(this,e).has(e)}e.exports=mapCacheHas},66935:(e,t,r)=>{var s=r(71198);function mapCacheSet(e,t){var r=s(this,e),n=r.size;r.set(e,t);this.size+=r.size==n?0:1;return this}e.exports=mapCacheSet},46918:e=>{function mapToArray(e){var t=-1,r=Array(e.size);e.forEach(function(e,s){r[++t]=[s,e]});return r}e.exports=mapToArray},66162:e=>{function matchesStrictComparable(e,t){return function(r){if(r==null){return false}return r[e]===t&&(t!==undefined||e in Object(r))}}e.exports=matchesStrictComparable},46717:(e,t,r)=>{var s=r(89058);var n=500;function memoizeCapped(e){var t=s(e,function(e){if(r.size===n){r.clear()}return e});var r=t.cache;return t}e.exports=memoizeCapped},36786:(e,t,r)=>{var s=r(76028);var n=s(Object,"create");e.exports=n},11491:(e,t,r)=>{var s=r(90570);var n=s(Object.keys,Object);e.exports=n},43101:e=>{function nativeKeysIn(e){var t=[];if(e!=null){for(var r in Object(e)){t.push(r)}}return t}e.exports=nativeKeysIn},62470:(e,t,r)=>{e=r.nmd(e);var s=r(37825);var n=true&&t&&!t.nodeType&&t;var a=n&&"object"=="object"&&e&&!e.nodeType&&e;var i=a&&a.exports===n;var o=i&&s.process;var l=function(){try{var e=a&&a.require&&a.require("util").types;if(e){return e}return o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=l},49052:e=>{var t=Object.prototype;var r=t.toString;function objectToString(e){return r.call(e)}e.exports=objectToString},90570:e=>{function overArg(e,t){return function(r){return e(t(r))}}e.exports=overArg},216:(e,t,r)=>{var s=r(99502);var n=Math.max;function overRest(e,t,r){t=n(t===undefined?e.length-1:t,0);return function(){var a=arguments,i=-1,o=n(a.length-t,0),l=Array(o);while(++i{var s=r(37825);var n=typeof self=="object"&&self&&self.Object===Object&&self;var a=s||n||Function("return this")();e.exports=a},57073:e=>{var t="__lodash_hash_undefined__";function setCacheAdd(e){this.__data__.set(e,t);return this}e.exports=setCacheAdd},65372:e=>{function setCacheHas(e){return this.__data__.has(e)}e.exports=setCacheHas},44592:e=>{function setToArray(e){var t=-1,r=Array(e.size);e.forEach(function(e){r[++t]=e});return r}e.exports=setToArray},65444:(e,t,r)=>{var s=r(3503),n=r(10697);var a=n(s);e.exports=a},10697:e=>{var t=800,r=16;var s=Date.now;function shortOut(e){var n=0,a=0;return function(){var i=s(),o=r-(i-a);a=i;if(o>0){if(++n>=t){return arguments[0]}}else{n=0}return e.apply(undefined,arguments)}}e.exports=shortOut},22614:(e,t,r)=>{var s=r(82746);function stackClear(){this.__data__=new s;this.size=0}e.exports=stackClear},24202:e=>{function stackDelete(e){var t=this.__data__,r=t["delete"](e);this.size=t.size;return r}e.exports=stackDelete},96310:e=>{function stackGet(e){return this.__data__.get(e)}e.exports=stackGet},58721:e=>{function stackHas(e){return this.__data__.has(e)}e.exports=stackHas},90320:(e,t,r)=>{var s=r(82746),n=r(51105),a=r(16531);var i=200;function stackSet(e,t){var r=this.__data__;if(r instanceof s){var o=r.__data__;if(!n||o.length{function strictIndexOf(e,t,r){var s=r-1,n=e.length;while(++s{var s=r(46717);var n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var a=/\\(\\)?/g;var i=s(function(e){var t=[];if(e.charCodeAt(0)===46){t.push("")}e.replace(n,function(e,r,s,n){t.push(s?n.replace(a,"$1"):r||e)});return t});e.exports=i},30668:(e,t,r)=>{var s=r(82500);var n=1/0;function toKey(e){if(typeof e=="string"||s(e)){return e}var t=e+"";return t=="0"&&1/e==-n?"-0":t}e.exports=toKey},98241:e=>{var t=Function.prototype;var r=t.toString;function toSource(e){if(e!=null){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}e.exports=toSource},80573:(e,t,r)=>{var s=r(98415),n=r(78155),a=r(29841);var i=Math.ceil,o=Math.max;function chunk(e,t,r){if(r?n(e,t,r):t===undefined){t=1}else{t=o(a(t),0)}var l=e==null?0:e.length;if(!l||t<1){return[]}var u=0,c=0,p=Array(i(l/t));while(u{var s=r(95570);var n=4;function clone(e){return s(e,n)}e.exports=clone},60956:(e,t,r)=>{var s=r(95570);var n=1,a=4;function cloneDeep(e){return s(e,n|a)}e.exports=cloneDeep},66915:e=>{function constant(e){return function(){return e}}e.exports=constant},28650:e=>{function eq(e,t){return e===t||e!==e&&t!==t}e.exports=eq},76421:(e,t,r)=>{var s=r(49228);var n=/[\\^$.*+?()[\]{}|]/g,a=RegExp(n.source);function escapeRegExp(e){e=s(e);return e&&a.test(e)?e.replace(n,"\\$&"):e}e.exports=escapeRegExp},94484:(e,t,r)=>{var s=r(86685);function get(e,t,r){var n=e==null?undefined:s(e,t);return n===undefined?r:n}e.exports=get},58997:(e,t,r)=>{var s=r(59488),n=r(23144);function has(e,t){return e!=null&&n(e,t,s)}e.exports=has},14426:(e,t,r)=>{var s=r(56263),n=r(23144);function hasIn(e,t){return e!=null&&n(e,t,s)}e.exports=hasIn},57460:e=>{function identity(e){return e}e.exports=identity},24839:(e,t,r)=>{var s=r(77907),n=r(9111);var a=Object.prototype;var i=a.hasOwnProperty;var o=a.propertyIsEnumerable;var l=s(function(){return arguments}())?s:function(e){return n(e)&&i.call(e,"callee")&&!o.call(e,"callee")};e.exports=l},43364:e=>{var t=Array.isArray;e.exports=t},20577:(e,t,r)=>{var s=r(66827),n=r(55752);function isArrayLike(e){return e!=null&&n(e.length)&&!s(e)}e.exports=isArrayLike},12963:(e,t,r)=>{e=r.nmd(e);var s=r(562),n=r(90377);var a=true&&t&&!t.nodeType&&t;var i=a&&"object"=="object"&&e&&!e.nodeType&&e;var o=i&&i.exports===a;var l=o?s.Buffer:undefined;var u=l?l.isBuffer:undefined;var c=u||n;e.exports=c},66827:(e,t,r)=>{var s=r(98653),n=r(43420);var a="[object AsyncFunction]",i="[object Function]",o="[object GeneratorFunction]",l="[object Proxy]";function isFunction(e){if(!n(e)){return false}var t=s(e);return t==i||t==o||t==a||t==l}e.exports=isFunction},55752:e=>{var t=9007199254740991;function isLength(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=t}e.exports=isLength},13689:(e,t,r)=>{var s=r(81391),n=r(83717),a=r(62470);var i=a&&a.isMap;var o=i?n(i):s;e.exports=o},43420:e=>{function isObject(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}e.exports=isObject},9111:e=>{function isObjectLike(e){return e!=null&&typeof e=="object"}e.exports=isObjectLike},24788:(e,t,r)=>{var s=r(98653),n=r(63363),a=r(9111);var i="[object Object]";var o=Function.prototype,l=Object.prototype;var u=o.toString;var c=l.hasOwnProperty;var p=u.call(Object);function isPlainObject(e){if(!a(e)||s(e)!=i){return false}var t=n(e);if(t===null){return true}var r=c.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&u.call(r)==p}e.exports=isPlainObject},1370:(e,t,r)=>{var s=r(42542),n=r(83717),a=r(62470);var i=a&&a.isRegExp;var o=i?n(i):s;e.exports=o},81360:(e,t,r)=>{var s=r(19472),n=r(83717),a=r(62470);var i=a&&a.isSet;var o=i?n(i):s;e.exports=o},82500:(e,t,r)=>{var s=r(98653),n=r(9111);var a="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||n(e)&&s(e)==a}e.exports=isSymbol},53635:(e,t,r)=>{var s=r(86944),n=r(83717),a=r(62470);var i=a&&a.isTypedArray;var o=i?n(i):s;e.exports=o},50288:(e,t,r)=>{var s=r(63360),n=r(24787),a=r(20577);function keys(e){return a(e)?s(e):n(e)}e.exports=keys},86032:(e,t,r)=>{var s=r(63360),n=r(14535),a=r(20577);function keysIn(e){return a(e)?s(e,true):n(e)}e.exports=keysIn},89058:(e,t,r)=>{var s=r(16531);var n="Expected a function";function memoize(e,t){if(typeof e!="function"||t!=null&&typeof t!="function"){throw new TypeError(n)}var r=function(){var s=arguments,n=t?t.apply(this,s):s[0],a=r.cache;if(a.has(n)){return a.get(n)}var i=e.apply(this,s);r.cache=a.set(n,i)||a;return i};r.cache=new(memoize.Cache||s);return r}memoize.Cache=s;e.exports=memoize},60204:(e,t,r)=>{var s=r(18077),n=r(1666),a=r(20007),i=r(30668);function property(e){return a(e)?s(i(e)):n(e)}e.exports=property},39214:(e,t,r)=>{var s=r(31428),n=r(44675);var a=s(n);e.exports=a},44675:(e,t,r)=>{var s=r(60257);function pullAll(e,t){return e&&e.length&&t&&t.length?s(e,t):e}e.exports=pullAll},52169:(e,t,r)=>{var s=r(5765),n=r(18631),a=r(31428),i=r(78155);var o=a(function(e,t){if(e==null){return[]}var r=t.length;if(r>1&&i(e,t[0],t[1])){t=[]}else if(r>2&&i(t[0],t[1],t[2])){t=[t[0]]}return n(e,s(t,1),[])});e.exports=o},87632:e=>{function stubArray(){return[]}e.exports=stubArray},90377:e=>{function stubFalse(){return false}e.exports=stubFalse},67683:(e,t,r)=>{var s=r(98208);var n=1/0,a=1.7976931348623157e308;function toFinite(e){if(!e){return e===0?e:0}e=s(e);if(e===n||e===-n){var t=e<0?-1:1;return t*a}return e===e?e:0}e.exports=toFinite},29841:(e,t,r)=>{var s=r(67683);function toInteger(e){var t=s(e),r=t%1;return t===t?r?t-r:t:0}e.exports=toInteger},98208:(e,t,r)=>{var s=r(43420),n=r(82500);var a=0/0;var i=/^\s+|\s+$/g;var o=/^[-+]0x[0-9a-f]+$/i;var l=/^0b[01]+$/i;var u=/^0o[0-7]+$/i;var c=parseInt;function toNumber(e){if(typeof e=="number"){return e}if(n(e)){return a}if(s(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=s(t)?t+"":t}if(typeof e!="string"){return e===0?e:+e}e=e.replace(i,"");var r=l.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):o.test(e)?a:+e}e.exports=toNumber},49228:(e,t,r)=>{var s=r(74851);function toString(e){return e==null?"":s(e)}e.exports=toString},70495:(e,t)=>{"use strict";var r=Object;var s=Object.defineProperty;var n=Object.create;function defProp(e,t,n){if(s)try{s.call(r,e,t,{value:n})}catch(r){e[t]=n}else{e[t]=n}}function makeSafeToCall(e){if(e){defProp(e,"call",e.call);defProp(e,"apply",e.apply)}return e}makeSafeToCall(s);makeSafeToCall(n);var a=makeSafeToCall(Object.prototype.hasOwnProperty);var i=makeSafeToCall(Number.prototype.toString);var o=makeSafeToCall(String.prototype.slice);var l=function(){};function create(e){if(n){return n.call(r,e)}l.prototype=e||null;return new l}var u=Math.random;var c=create(null);function makeUniqueKey(){do{var e=internString(o.call(i.call(u(),36),2))}while(a.call(c,e));return c[e]=e}function internString(e){var t={};t[e]=true;return Object.keys(t)[0]}t.makeUniqueKey=makeUniqueKey;var p=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function getOwnPropertyNames(e){for(var t=p(e),r=0,s=0,n=t.length;rs){t[s]=t[r]}++s}}t.length=s;return t};function defaultCreatorFn(e){return create(null)}function makeAccessor(e){var t=makeUniqueKey();var r=create(null);e=e||defaultCreatorFn;function register(s){var n;function vault(t,a){if(t===r){return a?n=null:n||(n=e(s))}}defProp(s,t,vault)}function accessor(e){if(!a.call(e,t))register(e);return e[t](r)}accessor.forget=function(e){if(a.call(e,t))e[t](r,true)};return accessor}t.makeAccessor=makeAccessor},70696:function(e,t,r){e=r.nmd(e);(function(r){var s=true&&t;var n=true&&e&&e.exports==s&&e;var a=typeof global=="object"&&global;if(a.global===a||a.window===a){r=a}var i={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var o=55296;var l=56319;var u=56320;var c=57343;var p=/\\x00([^0123456789]|$)/g;var f={};var d=f.hasOwnProperty;var y=function(e,t){var r;for(r in t){if(d.call(t,r)){e[r]=t[r]}}return e};var h=function(e,t){var r=-1;var s=e.length;while(++r=s&&tr){return e}if(t<=n&&r>=a){e.splice(s,2);continue}if(t>=n&&r=n&&t<=a){e[s+1]=t}else if(r>=n&&r<=a){e[s]=r+1;return e}s+=2}return e};var w=function(e,t){var r=0;var s;var n;var a=null;var o=e.length;if(t<0||t>1114111){throw RangeError(i.codePointRange)}while(r=s&&tt){e.splice(a!=null?a+2:0,0,t,t+1);return e}if(t==n){if(t+1==e[r+2]){e.splice(r,4,s,e[r+3]);return e}e[r+1]=t+1;return e}a=r;r+=2}e.push(t,t+1);return e};var A=function(e,t){var r=0;var s;var n;var a=e.slice();var i=t.length;while(r1114111||r<0||r>1114111){throw RangeError(i.codePointRange)}var s=0;var n;var a;var o=false;var l=e.length;while(sr){return e}if(n>=t&&n<=r){if(a>t&&a-1<=r){e.splice(s,2);s-=2}else{e.splice(s-1,2);s-=2}}}else if(n==r+1){e[s]=t;return e}else if(n>r){e.splice(s,0,t,r+1);return e}else if(t>=n&&t=n&&t=a){e[s]=t;e[s+1]=r+1;o=true}s+=2}if(!o){e.push(t,r+1)}return e};var _=function(e,t){var r=0;var s=e.length;var n=e[r];var a=e[s-1];if(s>=2){if(ta){return false}}while(r=n&&t=40&&e<=43||e==46||e==47||e==63||e>=91&&e<=94||e>=123&&e<=125){t="\\"+L(e)}else if(e>=32&&e<=126){t=L(e)}else if(e<=255){t="\\x"+v(E(e),2)}else{t="\\u"+v(E(e),4)}return t};var q=function(e){if(e<=65535){return B(e)}return"\\u{"+e.toString(16).toUpperCase()+"}"};var W=function(e){var t=e.length;var r=e.charCodeAt(0);var s;if(r>=o&&r<=l&&t>1){s=e.charCodeAt(1);return(r-o)*1024+s-u+65536}return r};var U=function(e){var t="";var r=0;var s;var n;var a=e.length;if(k(e)){return B(e[0])}while(r=o&&p<=l){s.push(i,o);t.push(o,p+1)}if(p>=u&&p<=c){s.push(i,o);t.push(o,l+1);r.push(u,p+1)}if(p>c){s.push(i,o);t.push(o,l+1);r.push(u,c+1);if(p<=65535){s.push(c+1,p+1)}else{s.push(c+1,65535+1);n.push(65535+1,p+1)}}}else if(i>=o&&i<=l){if(p>=o&&p<=l){t.push(i,p+1)}if(p>=u&&p<=c){t.push(i,l+1);r.push(u,p+1)}if(p>c){t.push(i,l+1);r.push(u,c+1);if(p<=65535){s.push(c+1,p+1)}else{s.push(c+1,65535+1);n.push(65535+1,p+1)}}}else if(i>=u&&i<=c){if(p>=u&&p<=c){r.push(i,p+1)}if(p>c){r.push(i,c+1);if(p<=65535){s.push(c+1,p+1)}else{s.push(c+1,65535+1);n.push(65535+1,p+1)}}}else if(i>c&&i<=65535){if(p<=65535){s.push(i,p+1)}else{s.push(i,65535+1);n.push(65535+1,p+1)}}else{n.push(i,p+1)}a+=2}return{loneHighSurrogates:t,loneLowSurrogates:r,bmp:s,astral:n}};var $=function(e){var t=[];var r=[];var s=false;var n;var a;var i;var o;var l;var u;var c=-1;var p=e.length;while(++c1){e=T.call(arguments)}if(this instanceof X){this.data=[];return e?this.add(e):this}return(new X).add(e)};X.version="1.3.3";var z=X.prototype;y(z,{add:function(e){var t=this;if(e==null){return t}if(e instanceof X){t.data=A(t.data,e.data);return t}if(arguments.length>1){e=T.call(arguments)}if(g(e)){h(e,function(e){t.add(e)});return t}t.data=w(t.data,b(e)?e:W(e));return t},remove:function(e){var t=this;if(e==null){return t}if(e instanceof X){t.data=D(t.data,e.data);return t}if(arguments.length>1){e=T.call(arguments)}if(g(e)){h(e,function(e){t.remove(e)});return t}t.data=P(t.data,b(e)?e:W(e));return t},addRange:function(e,t){var r=this;r.data=O(r.data,b(e)?e:W(e),b(t)?t:W(t));return r},removeRange:function(e,t){var r=this;var s=b(e)?e:W(e);var n=b(t)?t:W(t);r.data=j(r.data,s,n);return r},intersection:function(e){var t=this;var r=e instanceof X?R(e.data):e;t.data=C(t.data,r);return t},contains:function(e){return _(this.data,b(e)?e:W(e))},clone:function(){var e=new X;e.data=this.data.slice(0);return e},toString:function(e){var t=Y(this.data,e?e.bmpOnly:false,e?e.hasUnicodeFlag:false);if(!t){return"[]"}return t.replace(p,"\\0$1")},toRegExp:function(e){var t=this.toString(e&&e.indexOf("u")!=-1?{hasUnicodeFlag:true}:null);return RegExp(t,e||"")},valueOf:function(){return R(this.data)}});z.toArray=z.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return X})}else if(s&&!s.nodeType){if(n){n.exports=X}else{s.regenerate=X}}else{r.regenerate=X}})(this)},32892:(e,t,r)=>{"use strict";var s=r(51675);var n=r(44388);var a=n(r(42357));var i=s(r(17870));var o=s(r(84336));var l=s(r(65781));var u=Object.prototype.hasOwnProperty;function Emitter(e){a["default"].ok(this instanceof Emitter);l.getTypes().assertIdentifier(e);this.nextTempId=0;this.contextId=e;this.listing=[];this.marked=[true];this.insertedLocs=new Set;this.finalLoc=this.loc();this.tryEntries=[];this.leapManager=new i.LeapManager(this)}var c=Emitter.prototype;t.Emitter=Emitter;c.loc=function(){var e=l.getTypes().numericLiteral(-1);this.insertedLocs.add(e);return e};c.getInsertedLocs=function(){return this.insertedLocs};c.getContextId=function(){return l.getTypes().clone(this.contextId)};c.mark=function(e){l.getTypes().assertLiteral(e);var t=this.listing.length;if(e.value===-1){e.value=t}else{a["default"].strictEqual(e.value,t)}this.marked[t]=true;return e};c.emit=function(e){var t=l.getTypes();if(t.isExpression(e)){e=t.expressionStatement(e)}t.assertStatement(e);this.listing.push(e)};c.emitAssign=function(e,t){this.emit(this.assign(e,t));return e};c.assign=function(e,t){var r=l.getTypes();return r.expressionStatement(r.assignmentExpression("=",r.cloneDeep(e),t))};c.contextProperty=function(e,t){var r=l.getTypes();return r.memberExpression(this.getContextId(),t?r.stringLiteral(e):r.identifier(e),!!t)};c.stop=function(e){if(e){this.setReturnValue(e)}this.jump(this.finalLoc)};c.setReturnValue=function(e){l.getTypes().assertExpression(e.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))};c.clearPendingException=function(e,t){var r=l.getTypes();r.assertLiteral(e);var s=r.callExpression(this.contextProperty("catch",true),[r.clone(e)]);if(t){this.emitAssign(t,s)}else{this.emit(s)}};c.jump=function(e){this.emitAssign(this.contextProperty("next"),e);this.emit(l.getTypes().breakStatement())};c.jumpIf=function(e,t){var r=l.getTypes();r.assertExpression(e);r.assertLiteral(t);this.emit(r.ifStatement(e,r.blockStatement([this.assign(this.contextProperty("next"),t),r.breakStatement()])))};c.jumpIfNot=function(e,t){var r=l.getTypes();r.assertExpression(e);r.assertLiteral(t);var s;if(r.isUnaryExpression(e)&&e.operator==="!"){s=e.argument}else{s=r.unaryExpression("!",e)}this.emit(r.ifStatement(s,r.blockStatement([this.assign(this.contextProperty("next"),t),r.breakStatement()])))};c.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)};c.getContextFunction=function(e){var t=l.getTypes();return t.functionExpression(e||null,[this.getContextId()],t.blockStatement([this.getDispatchLoop()]),false,false)};c.getDispatchLoop=function(){var e=this;var t=l.getTypes();var r=[];var s;var n=false;e.listing.forEach(function(a,i){if(e.marked.hasOwnProperty(i)){r.push(t.switchCase(t.numericLiteral(i),s=[]));n=false}if(!n){s.push(a);if(t.isCompletionStatement(a))n=true}});this.finalLoc.value=this.listing.length;r.push(t.switchCase(this.finalLoc,[]),t.switchCase(t.stringLiteral("end"),[t.returnStatement(t.callExpression(this.contextProperty("stop"),[]))]));return t.whileStatement(t.numericLiteral(1),t.switchStatement(t.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),r))};c.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var e=l.getTypes();var t=0;return e.arrayExpression(this.tryEntries.map(function(r){var s=r.firstLoc.value;a["default"].ok(s>=t,"try entries out of order");t=s;var n=r.catchEntry;var i=r.finallyEntry;var o=[r.firstLoc,n?n.firstLoc:null];if(i){o[2]=i.firstLoc;o[3]=i.afterLoc}return e.arrayExpression(o.map(function(t){return t&&e.clone(t)}))}))};c.explode=function(e,t){var r=l.getTypes();var s=e.node;var n=this;r.assertNode(s);if(r.isDeclaration(s))throw getDeclError(s);if(r.isStatement(s))return n.explodeStatement(e);if(r.isExpression(s))return n.explodeExpression(e,t);switch(s.type){case"Program":return e.get("body").map(n.explodeStatement,n);case"VariableDeclarator":throw getDeclError(s);case"Property":case"SwitchCase":case"CatchClause":throw new Error(s.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(s.type))}};function getDeclError(e){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(e))}c.explodeStatement=function(e,t){var r=l.getTypes();var s=e.node;var n=this;var u,c,f;r.assertStatement(s);if(t){r.assertIdentifier(t)}else{t=null}if(r.isBlockStatement(s)){e.get("body").forEach(function(e){n.explodeStatement(e)});return}if(!o.containsLeap(s)){n.emit(s);return}switch(s.type){case"ExpressionStatement":n.explodeExpression(e.get("expression"),true);break;case"LabeledStatement":c=this.loc();n.leapManager.withEntry(new i.LabeledEntry(c,s.label),function(){n.explodeStatement(e.get("body"),s.label)});n.mark(c);break;case"WhileStatement":u=this.loc();c=this.loc();n.mark(u);n.jumpIfNot(n.explodeExpression(e.get("test")),c);n.leapManager.withEntry(new i.LoopEntry(c,u,t),function(){n.explodeStatement(e.get("body"))});n.jump(u);n.mark(c);break;case"DoWhileStatement":var d=this.loc();var y=this.loc();c=this.loc();n.mark(d);n.leapManager.withEntry(new i.LoopEntry(c,y,t),function(){n.explode(e.get("body"))});n.mark(y);n.jumpIf(n.explodeExpression(e.get("test")),d);n.mark(c);break;case"ForStatement":f=this.loc();var h=this.loc();c=this.loc();if(s.init){n.explode(e.get("init"),true)}n.mark(f);if(s.test){n.jumpIfNot(n.explodeExpression(e.get("test")),c)}else{}n.leapManager.withEntry(new i.LoopEntry(c,h,t),function(){n.explodeStatement(e.get("body"))});n.mark(h);if(s.update){n.explode(e.get("update"),true)}n.jump(f);n.mark(c);break;case"TypeCastExpression":return n.explodeExpression(e.get("expression"));case"ForInStatement":f=this.loc();c=this.loc();var m=n.makeTempVar();n.emitAssign(m,r.callExpression(l.runtimeProperty("keys"),[n.explodeExpression(e.get("right"))]));n.mark(f);var g=n.makeTempVar();n.jumpIf(r.memberExpression(r.assignmentExpression("=",g,r.callExpression(r.cloneDeep(m),[])),r.identifier("done"),false),c);n.emitAssign(s.left,r.memberExpression(r.cloneDeep(g),r.identifier("value"),false));n.leapManager.withEntry(new i.LoopEntry(c,f,t),function(){n.explodeStatement(e.get("body"))});n.jump(f);n.mark(c);break;case"BreakStatement":n.emitAbruptCompletion({type:"break",target:n.leapManager.getBreakLoc(s.label)});break;case"ContinueStatement":n.emitAbruptCompletion({type:"continue",target:n.leapManager.getContinueLoc(s.label)});break;case"SwitchStatement":var b=n.emitAssign(n.makeTempVar(),n.explodeExpression(e.get("discriminant")));c=this.loc();var x=this.loc();var v=x;var E=[];var T=s.cases||[];for(var S=T.length-1;S>=0;--S){var P=T[S];r.assertSwitchCase(P);if(P.test){v=r.conditionalExpression(r.binaryExpression("===",r.cloneDeep(b),P.test),E[S]=this.loc(),v)}else{E[S]=x}}var j=e.get("discriminant");l.replaceWithOrRemove(j,v);n.jump(n.explodeExpression(j));n.leapManager.withEntry(new i.SwitchEntry(c),function(){e.get("cases").forEach(function(e){var t=e.key;n.mark(E[t]);e.get("consequent").forEach(function(e){n.explodeStatement(e)})})});n.mark(c);if(x.value===-1){n.mark(x);a["default"].strictEqual(c.value,x.value)}break;case"IfStatement":var w=s.alternate&&this.loc();c=this.loc();n.jumpIfNot(n.explodeExpression(e.get("test")),w||c);n.explodeStatement(e.get("consequent"));if(w){n.jump(c);n.mark(w);n.explodeStatement(e.get("alternate"))}n.mark(c);break;case"ReturnStatement":n.emitAbruptCompletion({type:"return",value:n.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":c=this.loc();var A=s.handler;var D=A&&this.loc();var O=D&&new i.CatchEntry(D,A.param);var _=s.finalizer&&this.loc();var C=_&&new i.FinallyEntry(_,c);var I=new i.TryEntry(n.getUnmarkedCurrentLoc(),O,C);n.tryEntries.push(I);n.updateContextPrevLoc(I.firstLoc);n.leapManager.withEntry(I,function(){n.explodeStatement(e.get("block"));if(D){if(_){n.jump(_)}else{n.jump(c)}n.updateContextPrevLoc(n.mark(D));var t=e.get("handler.body");var s=n.makeTempVar();n.clearPendingException(I.firstLoc,s);t.traverse(p,{getSafeParam:function getSafeParam(){return r.cloneDeep(s)},catchParamName:A.param.name});n.leapManager.withEntry(O,function(){n.explodeStatement(t)})}if(_){n.updateContextPrevLoc(n.mark(_));n.leapManager.withEntry(C,function(){n.explodeStatement(e.get("finalizer"))});n.emit(r.returnStatement(r.callExpression(n.contextProperty("finish"),[C.firstLoc])))}});n.mark(c);break;case"ThrowStatement":n.emit(r.throwStatement(n.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(s.type))}};var p={Identifier:function Identifier(e,t){if(e.node.name===t.catchParamName&&l.isReference(e)){l.replaceWithOrRemove(e,t.getSafeParam())}},Scope:function Scope(e,t){if(e.scope.hasOwnBinding(t.catchParamName)){e.skip()}}};c.emitAbruptCompletion=function(e){if(!isValidCompletion(e)){a["default"].ok(false,"invalid completion record: "+JSON.stringify(e))}a["default"].notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=l.getTypes();var r=[t.stringLiteral(e.type)];if(e.type==="break"||e.type==="continue"){t.assertLiteral(e.target);r[1]=this.insertedLocs.has(e.target)?e.target:t.cloneDeep(e.target)}else if(e.type==="return"||e.type==="throw"){if(e.value){t.assertExpression(e.value);r[1]=this.insertedLocs.has(e.value)?e.value:t.cloneDeep(e.value)}}this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"),r)))};function isValidCompletion(e){var t=e.type;if(t==="normal"){return!u.call(e,"target")}if(t==="break"||t==="continue"){return!u.call(e,"value")&&l.getTypes().isLiteral(e.target)}if(t==="return"||t==="throw"){return u.call(e,"value")&&!u.call(e,"target")}return false}c.getUnmarkedCurrentLoc=function(){return l.getTypes().numericLiteral(this.listing.length)};c.updateContextPrevLoc=function(e){var t=l.getTypes();if(e){t.assertLiteral(e);if(e.value===-1){e.value=this.listing.length}else{a["default"].strictEqual(e.value,this.listing.length)}}else{e=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),e)};c.explodeExpression=function(e,t){var r=l.getTypes();var s=e.node;if(s){r.assertExpression(s)}else{return s}var n=this;var i;var u;function finish(e){r.assertExpression(e);if(t){n.emit(e)}else{return e}}if(!o.containsLeap(s)){return finish(s)}var c=o.containsLeap.onlyChildren(s);function explodeViaTempVar(e,t,s){a["default"].ok(!s||!e,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var i=n.explodeExpression(t,s);if(s){}else if(e||c&&!r.isLiteral(i)){i=n.emitAssign(e||n.makeTempVar(),i)}return i}switch(s.type){case"MemberExpression":return finish(r.memberExpression(n.explodeExpression(e.get("object")),s.computed?explodeViaTempVar(null,e.get("property")):s.property,s.computed));case"CallExpression":var p=e.get("callee");var f=e.get("arguments");var d;var y;var h=f.some(function(e){return o.containsLeap(e.node)});var m=null;if(r.isMemberExpression(p.node)){if(h){var g=explodeViaTempVar(n.makeTempVar(),p.get("object"));var b=p.node.computed?explodeViaTempVar(null,p.get("property")):p.node.property;m=g;d=r.memberExpression(r.memberExpression(r.cloneDeep(g),b,p.node.computed),r.identifier("call"),false)}else{d=n.explodeExpression(p)}}else{d=explodeViaTempVar(null,p);if(r.isMemberExpression(d)){d=r.sequenceExpression([r.numericLiteral(0),r.cloneDeep(d)])}}if(h){y=f.map(function(e){return explodeViaTempVar(null,e)});if(m)y.unshift(m);y=y.map(function(e){return r.cloneDeep(e)})}else{y=e.node.arguments}return finish(r.callExpression(d,y));case"NewExpression":return finish(r.newExpression(explodeViaTempVar(null,e.get("callee")),e.get("arguments").map(function(e){return explodeViaTempVar(null,e)})));case"ObjectExpression":return finish(r.objectExpression(e.get("properties").map(function(e){if(e.isObjectProperty()){return r.objectProperty(e.node.key,explodeViaTempVar(null,e.get("value")),e.node.computed)}else{return e.node}})));case"ArrayExpression":return finish(r.arrayExpression(e.get("elements").map(function(e){if(e.isSpreadElement()){return r.spreadElement(explodeViaTempVar(null,e.get("argument")))}else{return explodeViaTempVar(null,e)}})));case"SequenceExpression":var x=s.expressions.length-1;e.get("expressions").forEach(function(e){if(e.key===x){i=n.explodeExpression(e,t)}else{n.explodeExpression(e,true)}});return i;case"LogicalExpression":u=this.loc();if(!t){i=n.makeTempVar()}var v=explodeViaTempVar(i,e.get("left"));if(s.operator==="&&"){n.jumpIfNot(v,u)}else{a["default"].strictEqual(s.operator,"||");n.jumpIf(v,u)}explodeViaTempVar(i,e.get("right"),t);n.mark(u);return i;case"ConditionalExpression":var E=this.loc();u=this.loc();var T=n.explodeExpression(e.get("test"));n.jumpIfNot(T,E);if(!t){i=n.makeTempVar()}explodeViaTempVar(i,e.get("consequent"),t);n.jump(u);n.mark(E);explodeViaTempVar(i,e.get("alternate"),t);n.mark(u);return i;case"UnaryExpression":return finish(r.unaryExpression(s.operator,n.explodeExpression(e.get("argument")),!!s.prefix));case"BinaryExpression":return finish(r.binaryExpression(s.operator,explodeViaTempVar(null,e.get("left")),explodeViaTempVar(null,e.get("right"))));case"AssignmentExpression":if(s.operator==="="){return finish(r.assignmentExpression(s.operator,n.explodeExpression(e.get("left")),n.explodeExpression(e.get("right"))))}var S=n.explodeExpression(e.get("left"));var P=n.emitAssign(n.makeTempVar(),S);return finish(r.assignmentExpression("=",r.cloneDeep(S),r.assignmentExpression(s.operator,r.cloneDeep(P),n.explodeExpression(e.get("right")))));case"UpdateExpression":return finish(r.updateExpression(s.operator,n.explodeExpression(e.get("argument")),s.prefix));case"YieldExpression":u=this.loc();var j=s.argument&&n.explodeExpression(e.get("argument"));if(j&&s.delegate){var w=n.makeTempVar();var A=r.returnStatement(r.callExpression(n.contextProperty("delegateYield"),[j,r.stringLiteral(w.property.name),u]));A.loc=s.loc;n.emit(A);n.mark(u);return w}n.emitAssign(n.contextProperty("next"),u);var D=r.returnStatement(r.cloneDeep(j)||null);D.loc=s.loc;n.emit(D);n.mark(u);return n.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(s.type))}}},1454:(e,t,r)=>{"use strict";var s=r(51675);var n=s(r(65781));var a=Object.prototype.hasOwnProperty;t.hoist=function(e){var t=n.getTypes();t.assertFunction(e.node);var r={};function varDeclToExpr(e,s){var n=e.node,a=e.scope;t.assertVariableDeclaration(n);var i=[];n.declarations.forEach(function(e){r[e.id.name]=t.identifier(e.id.name);a.removeBinding(e.id.name);if(e.init){i.push(t.assignmentExpression("=",e.id,e.init))}else if(s){i.push(e.id)}});if(i.length===0)return null;if(i.length===1)return i[0];return t.sequenceExpression(i)}e.get("body").traverse({VariableDeclaration:{exit:function exit(e){var r=varDeclToExpr(e,false);if(r===null){e.remove()}else{n.replaceWithOrRemove(e,t.expressionStatement(r))}e.skip()}},ForStatement:function ForStatement(e){var t=e.get("init");if(t.isVariableDeclaration()){n.replaceWithOrRemove(t,varDeclToExpr(t,false))}},ForXStatement:function ForXStatement(e){var t=e.get("left");if(t.isVariableDeclaration()){n.replaceWithOrRemove(t,varDeclToExpr(t,true))}},FunctionDeclaration:function FunctionDeclaration(e){var s=e.node;r[s.id.name]=s.id;var a=t.expressionStatement(t.assignmentExpression("=",t.clone(s.id),t.functionExpression(e.scope.generateUidIdentifierBasedOnNode(s),s.params,s.body,s.generator,s.expression)));if(e.parentPath.isBlockStatement()){e.parentPath.unshiftContainer("body",a);e.remove()}else{n.replaceWithOrRemove(e,a)}e.scope.removeBinding(s.id.name);e.skip()},FunctionExpression:function FunctionExpression(e){e.skip()},ArrowFunctionExpression:function ArrowFunctionExpression(e){e.skip()}});var s={};e.get("params").forEach(function(e){var r=e.node;if(t.isIdentifier(r)){s[r.name]=r}else{}});var i=[];Object.keys(r).forEach(function(e){if(!a.call(s,e)){i.push(t.variableDeclarator(r[e],null))}});if(i.length===0){return null}return t.variableDeclaration("var",i)}},60919:(e,t,r)=>{"use strict";t.__esModule=true;t.default=_default;var s=r(92980);function _default(e){var t={visitor:(0,s.getVisitor)(e)};var r=e&&e.version;if(r&&parseInt(r,10)>=7){t.name="regenerator-transform"}return t}},17870:(e,t,r)=>{"use strict";var s=r(44388);var n=s(r(42357));var a=r(32892);var i=r(31669);var o=r(65781);function Entry(){n["default"].ok(this instanceof Entry)}function FunctionEntry(e){Entry.call(this);(0,o.getTypes)().assertLiteral(e);this.returnLoc=e}(0,i.inherits)(FunctionEntry,Entry);t.FunctionEntry=FunctionEntry;function LoopEntry(e,t,r){Entry.call(this);var s=(0,o.getTypes)();s.assertLiteral(e);s.assertLiteral(t);if(r){s.assertIdentifier(r)}else{r=null}this.breakLoc=e;this.continueLoc=t;this.label=r}(0,i.inherits)(LoopEntry,Entry);t.LoopEntry=LoopEntry;function SwitchEntry(e){Entry.call(this);(0,o.getTypes)().assertLiteral(e);this.breakLoc=e}(0,i.inherits)(SwitchEntry,Entry);t.SwitchEntry=SwitchEntry;function TryEntry(e,t,r){Entry.call(this);var s=(0,o.getTypes)();s.assertLiteral(e);if(t){n["default"].ok(t instanceof CatchEntry)}else{t=null}if(r){n["default"].ok(r instanceof FinallyEntry)}else{r=null}n["default"].ok(t||r);this.firstLoc=e;this.catchEntry=t;this.finallyEntry=r}(0,i.inherits)(TryEntry,Entry);t.TryEntry=TryEntry;function CatchEntry(e,t){Entry.call(this);var r=(0,o.getTypes)();r.assertLiteral(e);r.assertIdentifier(t);this.firstLoc=e;this.paramId=t}(0,i.inherits)(CatchEntry,Entry);t.CatchEntry=CatchEntry;function FinallyEntry(e,t){Entry.call(this);var r=(0,o.getTypes)();r.assertLiteral(e);r.assertLiteral(t);this.firstLoc=e;this.afterLoc=t}(0,i.inherits)(FinallyEntry,Entry);t.FinallyEntry=FinallyEntry;function LabeledEntry(e,t){Entry.call(this);var r=(0,o.getTypes)();r.assertLiteral(e);r.assertIdentifier(t);this.breakLoc=e;this.label=t}(0,i.inherits)(LabeledEntry,Entry);t.LabeledEntry=LabeledEntry;function LeapManager(e){n["default"].ok(this instanceof LeapManager);n["default"].ok(e instanceof a.Emitter);this.emitter=e;this.entryStack=[new FunctionEntry(e.finalLoc)]}var l=LeapManager.prototype;t.LeapManager=LeapManager;l.withEntry=function(e,t){n["default"].ok(e instanceof Entry);this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();n["default"].strictEqual(r,e)}};l._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var s=this.entryStack[r];var n=s[e];if(n){if(t){if(s.label&&s.label.name===t.name){return n}}else if(s instanceof LabeledEntry){}else{return n}}}return null};l.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)};l.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},84336:(e,t,r)=>{"use strict";var s=r(44388);var n=s(r(42357));var a=r(65781);var i=r(70495);var o=(0,i.makeAccessor)();var l=Object.prototype.hasOwnProperty;function makePredicate(e,t){function onlyChildren(e){var t=(0,a.getTypes)();t.assertNode(e);var r=false;function check(e){if(r){}else if(Array.isArray(e)){e.some(check)}else if(t.isNode(e)){n["default"].strictEqual(r,false);r=predicate(e)}return r}var s=t.VISITOR_KEYS[e.type];if(s){for(var i=0;i{"use strict";var s=r(51675);t.__esModule=true;t.default=replaceShorthandObjectMethod;var n=s(r(65781));function replaceShorthandObjectMethod(e){var t=n.getTypes();if(!e.node||!t.isFunction(e.node)){throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.")}if(!t.isObjectMethod(e.node)){return e}if(!e.node.generator){return e}var r=e.node.params.map(function(e){return t.cloneDeep(e)});var s=t.functionExpression(null,r,t.cloneDeep(e.node.body),e.node.generator,e.node.async);n.replaceWithOrRemove(e,t.objectProperty(t.cloneDeep(e.node.key),s,e.node.computed,false));return e.get("value")}},65781:(e,t)=>{"use strict";t.__esModule=true;t.wrapWithTypes=wrapWithTypes;t.getTypes=getTypes;t.runtimeProperty=runtimeProperty;t.isReference=isReference;t.replaceWithOrRemove=replaceWithOrRemove;var r=null;function wrapWithTypes(e,t){return function(){var s=r;r=e;try{for(var n=arguments.length,a=new Array(n),i=0;i{"use strict";var s=r(51675);var n=r(44388);var a=n(r(42357));var i=r(1454);var o=r(32892);var l=n(r(56367));var u=s(r(65781));var c=r(70495);t.getVisitor=function(e){var t=e.types;return{Method:function Method(e,r){var s=e.node;if(!shouldRegenerate(s,r))return;var n=t.functionExpression(null,[],t.cloneNode(s.body,false),s.generator,s.async);e.get("body").set("body",[t.returnStatement(t.callExpression(n,[]))]);s.async=false;s.generator=false;e.get("body.body.0.argument.callee").unwrapFunctionEnvironment()},Function:{exit:u.wrapWithTypes(t,function(e,r){var s=e.node;if(!shouldRegenerate(s,r))return;e=(0,l["default"])(e);s=e.node;var n=e.scope.generateUidIdentifier("context");var a=e.scope.generateUidIdentifier("args");e.ensureBlock();var c=e.get("body");if(s.async){c.traverse(y)}c.traverse(d,{context:n});var p=[];var h=[];c.get("body").forEach(function(e){var r=e.node;if(t.isExpressionStatement(r)&&t.isStringLiteral(r.expression)){p.push(r)}else if(r&&r._blockHoist!=null){p.push(r)}else{h.push(r)}});if(p.length>0){c.node.body=h}var m=getOuterFnExpr(e);t.assertIdentifier(s.id);var g=t.identifier(s.id.name+"$");var b=(0,i.hoist)(e);var x={usesThis:false,usesArguments:false,getArgsId:function getArgsId(){return t.clone(a)}};e.traverse(f,x);if(x.usesArguments){b=b||t.variableDeclaration("var",[]);b.declarations.push(t.variableDeclarator(t.clone(a),t.identifier("arguments")))}var v=new o.Emitter(n);v.explode(e.get("body"));if(b&&b.declarations.length>0){p.push(b)}var E=[v.getContextFunction(g)];var T=v.getTryLocsList();if(s.generator){E.push(m)}else if(x.usesThis||T||s.async){E.push(t.nullLiteral())}if(x.usesThis){E.push(t.thisExpression())}else if(T||s.async){E.push(t.nullLiteral())}if(T){E.push(T)}else if(s.async){E.push(t.nullLiteral())}if(s.async){var S=e.scope;do{if(S.hasOwnBinding("Promise"))S.rename("Promise")}while(S=S.parent);E.push(t.identifier("Promise"))}var P=t.callExpression(u.runtimeProperty(s.async?"async":"wrap"),E);p.push(t.returnStatement(P));s.body=t.blockStatement(p);e.get("body.body").forEach(function(e){return e.scope.registerDeclaration(e)});var j=c.node.directives;if(j){s.body.directives=j}var w=s.generator;if(w){s.generator=false}if(s.async){s.async=false}if(w&&t.isExpression(s)){u.replaceWithOrRemove(e,t.callExpression(u.runtimeProperty("mark"),[s]));e.addComment("leading","#__PURE__")}var A=v.getInsertedLocs();e.traverse({NumericLiteral:function NumericLiteral(e){if(!A.has(e.node)){return}e.replaceWith(t.numericLiteral(e.node.value))}});e.requeue()})}}};function shouldRegenerate(e,t){if(e.generator){if(e.async){return t.opts.asyncGenerators!==false}else{return t.opts.generators!==false}}else if(e.async){return t.opts.async!==false}else{return false}}function getOuterFnExpr(e){var t=u.getTypes();var r=e.node;t.assertFunction(r);if(!r.id){r.id=e.scope.parent.generateUidIdentifier("callee")}if(r.generator&&t.isFunctionDeclaration(r)){return getMarkedFunctionId(e)}return t.clone(r.id)}var p=(0,c.makeAccessor)();function getMarkedFunctionId(e){var t=u.getTypes();var r=e.node;t.assertIdentifier(r.id);var s=e.findParent(function(e){return e.isProgram()||e.isBlockStatement()});if(!s){return r.id}var n=s.node;a["default"].ok(Array.isArray(n.body));var i=p(n);if(!i.decl){i.decl=t.variableDeclaration("var",[]);s.unshiftContainer("body",i.decl);i.declPath=s.get("body.0")}a["default"].strictEqual(i.declPath.node,i.decl);var o=s.scope.generateUidIdentifier("marked");var l=t.callExpression(u.runtimeProperty("mark"),[t.clone(r.id)]);var c=i.decl.declarations.push(t.variableDeclarator(o,l))-1;var f=i.declPath.get("declarations."+c+".init");a["default"].strictEqual(f.node,l);f.addComment("leading","#__PURE__");return t.clone(o)}var f={"FunctionExpression|FunctionDeclaration|Method":function FunctionExpressionFunctionDeclarationMethod(e){e.skip()},Identifier:function Identifier(e,t){if(e.node.name==="arguments"&&u.isReference(e)){u.replaceWithOrRemove(e,t.getArgsId());t.usesArguments=true}},ThisExpression:function ThisExpression(e,t){t.usesThis=true}};var d={MetaProperty:function MetaProperty(e){var t=e.node;if(t.meta.name==="function"&&t.property.name==="sent"){var r=u.getTypes();u.replaceWithOrRemove(e,r.memberExpression(r.clone(this.context),r.identifier("_sent")))}}};var y={Function:function Function(e){e.skip()},AwaitExpression:function AwaitExpression(e){var t=u.getTypes();var r=e.node.argument;u.replaceWithOrRemove(e,t.yieldExpression(t.callExpression(u.runtimeProperty("awrap"),[r]),false))}}},80035:e=>{"use strict";let t=null;function FastObject(e){if(t!==null&&typeof t.property){const e=t;t=FastObject.prototype=null;return e}t=FastObject.prototype=e==null?Object.create(null):e;return new FastObject}FastObject();e.exports=function toFastproperties(e){return FastObject(e)}},68783:e=>{e.exports=new Set(["General_Category","Script","Script_Extensions","Alphabetic","Any","ASCII","ASCII_Hex_Digit","Assigned","Bidi_Control","Bidi_Mirrored","Case_Ignorable","Cased","Changes_When_Casefolded","Changes_When_Casemapped","Changes_When_Lowercased","Changes_When_NFKC_Casefolded","Changes_When_Titlecased","Changes_When_Uppercased","Dash","Default_Ignorable_Code_Point","Deprecated","Diacritic","Emoji","Emoji_Component","Emoji_Modifier","Emoji_Modifier_Base","Emoji_Presentation","Extended_Pictographic","Extender","Grapheme_Base","Grapheme_Extend","Hex_Digit","ID_Continue","ID_Start","Ideographic","IDS_Binary_Operator","IDS_Trinary_Operator","Join_Control","Logical_Order_Exception","Lowercase","Math","Noncharacter_Code_Point","Pattern_Syntax","Pattern_White_Space","Quotation_Mark","Radical","Regional_Indicator","Sentence_Terminal","Soft_Dotted","Terminal_Punctuation","Unified_Ideograph","Uppercase","Variation_Selector","White_Space","XID_Continue","XID_Start"])},89755:(e,t,r)=>{"use strict";const s=r(68783);const n=r(71047);const a=function(e){if(s.has(e)){return e}if(n.has(e)){return n.get(e)}throw new Error(`Unknown property: ${e}`)};e.exports=a},36104:e=>{e.exports=new Map([["General_Category",new Map([["C","Other"],["Cc","Control"],["cntrl","Control"],["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","Mark"],["Mc","Spacing_Mark"],["Me","Enclosing_Mark"],["Mn","Nonspacing_Mark"],["N","Number"],["Nd","Decimal_Number"],["digit","Decimal_Number"],["Nl","Letter_Number"],["No","Other_Number"],["P","Punctuation"],["punct","Punctuation"],["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"],["Other","Other"],["Control","Control"],["Format","Format"],["Unassigned","Unassigned"],["Private_Use","Private_Use"],["Surrogate","Surrogate"],["Letter","Letter"],["Cased_Letter","Cased_Letter"],["Lowercase_Letter","Lowercase_Letter"],["Modifier_Letter","Modifier_Letter"],["Other_Letter","Other_Letter"],["Titlecase_Letter","Titlecase_Letter"],["Uppercase_Letter","Uppercase_Letter"],["Mark","Mark"],["Spacing_Mark","Spacing_Mark"],["Enclosing_Mark","Enclosing_Mark"],["Nonspacing_Mark","Nonspacing_Mark"],["Number","Number"],["Decimal_Number","Decimal_Number"],["Letter_Number","Letter_Number"],["Other_Number","Other_Number"],["Punctuation","Punctuation"],["Connector_Punctuation","Connector_Punctuation"],["Dash_Punctuation","Dash_Punctuation"],["Close_Punctuation","Close_Punctuation"],["Final_Punctuation","Final_Punctuation"],["Initial_Punctuation","Initial_Punctuation"],["Other_Punctuation","Other_Punctuation"],["Open_Punctuation","Open_Punctuation"],["Symbol","Symbol"],["Currency_Symbol","Currency_Symbol"],["Modifier_Symbol","Modifier_Symbol"],["Math_Symbol","Math_Symbol"],["Other_Symbol","Other_Symbol"],["Separator","Separator"],["Line_Separator","Line_Separator"],["Paragraph_Separator","Paragraph_Separator"],["Space_Separator","Space_Separator"]])],["Script",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","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","Cham"],["Cher","Cherokee"],["Chrs","Chorasmian"],["Copt","Coptic"],["Qaac","Coptic"],["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"],["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","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","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Nand","Nandinagari"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["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","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Wcho","Wancho"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yezi","Yezidi"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Chorasmian","Chorasmian"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dives_Akuru","Dives_Akuru"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Elymaic","Elymaic"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Nyiakeng_Puachue_Hmong","Nyiakeng_Puachue_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Khitan_Small_Script","Khitan_Small_Script"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Nandinagari","Nandinagari"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Wancho","Wancho"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yezidi","Yezidi"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])],["Script_Extensions",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","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","Cham"],["Cher","Cherokee"],["Chrs","Chorasmian"],["Copt","Coptic"],["Qaac","Coptic"],["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"],["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","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","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Nand","Nandinagari"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["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","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Wcho","Wancho"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yezi","Yezidi"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Chorasmian","Chorasmian"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dives_Akuru","Dives_Akuru"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Elymaic","Elymaic"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Nyiakeng_Puachue_Hmong","Nyiakeng_Puachue_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Khitan_Small_Script","Khitan_Small_Script"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Nandinagari","Nandinagari"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Wancho","Wancho"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yezidi","Yezidi"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])]])},67621:(e,t,r)=>{"use strict";const s=r(36104);const n=function(e,t){const r=s.get(e);if(!r){throw new Error(`Unknown property \`${e}\`.`)}const n=r.get(t);if(n){return n}throw new Error(`Unknown value \`${t}\` for property \`${e}\`.`)};e.exports=n},71047:e=>{e.exports=new Map([["scx","Script_Extensions"],["sc","Script"],["gc","General_Category"],["AHex","ASCII_Hex_Digit"],["Alpha","Alphabetic"],["Bidi_C","Bidi_Control"],["Bidi_M","Bidi_Mirrored"],["Cased","Cased"],["CI","Case_Ignorable"],["CWCF","Changes_When_Casefolded"],["CWCM","Changes_When_Casemapped"],["CWKCF","Changes_When_NFKC_Casefolded"],["CWL","Changes_When_Lowercased"],["CWT","Changes_When_Titlecased"],["CWU","Changes_When_Uppercased"],["Dash","Dash"],["Dep","Deprecated"],["DI","Default_Ignorable_Code_Point"],["Dia","Diacritic"],["Ext","Extender"],["Gr_Base","Grapheme_Base"],["Gr_Ext","Grapheme_Extend"],["Hex","Hex_Digit"],["IDC","ID_Continue"],["Ideo","Ideographic"],["IDS","ID_Start"],["IDSB","IDS_Binary_Operator"],["IDST","IDS_Trinary_Operator"],["Join_C","Join_Control"],["LOE","Logical_Order_Exception"],["Lower","Lowercase"],["Math","Math"],["NChar","Noncharacter_Code_Point"],["Pat_Syn","Pattern_Syntax"],["Pat_WS","Pattern_White_Space"],["QMark","Quotation_Mark"],["Radical","Radical"],["RI","Regional_Indicator"],["SD","Soft_Dotted"],["STerm","Sentence_Terminal"],["Term","Terminal_Punctuation"],["UIdeo","Unified_Ideograph"],["Upper","Uppercase"],["VS","Variation_Selector"],["WSpace","White_Space"],["space","White_Space"],["XIDC","XID_Continue"],["XIDS","XID_Start"]])},47352:(e,t,r)=>{function codeFrame(){return r(36553)}function core(){return r(85850)}function pluginProposalClassProperties(){return r(53447)}function pluginProposalExportNamespaceFrom(){return r(78562)}function pluginProposalNumericSeparator(){return r(17788)}function pluginProposalObjectRestSpread(){return r(15654)}function pluginSyntaxBigint(){return r(84176)}function pluginSyntaxDynamicImport(){return r(57640)}function pluginSyntaxJsx(){return r(89518)}function pluginTransformModulesCommonjs(){return r(68749)}function pluginTransformRuntime(){return r(65626)}function presetEnv(){return r(92553)}function presetReact(){return r(9064)}function presetTypescript(){return r(39293)}e.exports={codeFrame:codeFrame,core:core,pluginProposalClassProperties:pluginProposalClassProperties,pluginProposalExportNamespaceFrom:pluginProposalExportNamespaceFrom,pluginProposalNumericSeparator:pluginProposalNumericSeparator,pluginProposalObjectRestSpread:pluginProposalObjectRestSpread,pluginSyntaxBigint:pluginSyntaxBigint,pluginSyntaxDynamicImport:pluginSyntaxDynamicImport,pluginSyntaxJsx:pluginSyntaxJsx,pluginTransformModulesCommonjs:pluginTransformModulesCommonjs,pluginTransformRuntime:pluginTransformRuntime,presetEnv:presetEnv,presetReact:presetReact,presetTypescript:presetTypescript}},42357:e=>{"use strict";e.exports=require("assert")},3561:e=>{"use strict";e.exports=require("browserslist")},64293:e=>{"use strict";e.exports=require("buffer")},72242:e=>{"use strict";e.exports=require("chalk")},35747:e=>{"use strict";e.exports=require("fs")},32282:e=>{"use strict";e.exports=require("module")},31185:e=>{"use strict";e.exports=require("next/dist/compiled/debug")},33170:e=>{"use strict";e.exports=require("next/dist/compiled/json5")},62519:e=>{"use strict";e.exports=require("next/dist/compiled/semver")},96241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},85622:e=>{"use strict";e.exports=require("path")},78835:e=>{"use strict";e.exports=require("url")},31669:e=>{"use strict";e.exports=require("util")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var s=t[r]={id:r,loaded:false,exports:{}};var n=true;try{e[r].call(s.exports,s,s.exports,__webpack_require__);n=false}finally{if(n)delete t[r]}s.loaded=true;return s.exports}(()=>{__webpack_require__.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t))})();(()=>{__webpack_require__.nmd=(e=>{e.paths=[];if(!e.children)e.children=[];return e})})();__webpack_require__.ab=__dirname+"/";return __webpack_require__(47352)})(); \ No newline at end of file + `}},31507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(70287);var n=r(85850);var a=(0,s.declare)(e=>{e.assertVersion(7);const t=/[\ud800-\udfff]/g;const r=/(\\+)u\{([0-9a-fA-F]+)\}/g;function escape(e){let t=e.toString(16);while(t.length<4)t="0"+t;return"\\u"+t}function replacer(e,t,r){if(t.length%2===0){return e}const s=String.fromCodePoint(parseInt(r,16));const n=t.slice(0,-1)+escape(s.charCodeAt(0));return s.length===1?n:n+escape(s.charCodeAt(1))}function replaceUnicodeEscapes(e){return e.replace(r,replacer)}function getUnicodeEscape(e){let t;while(t=r.exec(e)){if(t[1].length%2===0)continue;r.lastIndex=0;return t[0]}return null}return{name:"transform-unicode-escapes",visitor:{Identifier(e){const{node:r,key:s}=e;const{name:a}=r;const i=a.replace(t,e=>{return`_u${e.charCodeAt(0).toString(16)}`});if(a===i)return;const o=n.types.inherits(n.types.stringLiteral(a),r);if(s==="key"){e.replaceWith(o);return}const{parentPath:l,scope:u}=e;if(l.isMemberExpression({property:r})||l.isOptionalMemberExpression({property:r})){l.node.computed=true;e.replaceWith(o);return}const c=u.getBinding(a);if(c){u.rename(a,u.generateUid(i));return}throw e.buildCodeFrameError(`Can't reference '${a}' as a bare identifier`)},"StringLiteral|DirectiveLiteral"(e){const{node:t}=e;const{extra:r}=t;if(r==null?void 0:r.raw)r.raw=replaceUnicodeEscapes(r.raw)},TemplateElement(e){const{node:t,parentPath:r}=e;const{value:s}=t;const n=getUnicodeEscape(s.raw);if(!n)return;const a=r.parentPath;if(a.isTaggedTemplateExpression()){throw e.buildCodeFrameError(`Can't replace Unicode escape '${n}' inside tagged template literals. You can enable '@babel/plugin-transform-template-literals' to compile them to classic strings.`)}s.raw=replaceUnicodeEscapes(s.raw)}}}});t.default=a},91990:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(36610);var n=r(70287);var a=(0,n.declare)(e=>{e.assertVersion(7);return(0,s.createRegExpFeaturePlugin)({name:"transform-unicode-regex",feature:"unicodeFlag"})});t.default=a},39291:e=>{const t=new Set(["proposal-class-properties","proposal-private-methods"]);const r={"proposal-async-generator-functions":"syntax-async-generators","proposal-class-properties":"syntax-class-properties","proposal-json-strings":"syntax-json-strings","proposal-nullish-coalescing-operator":"syntax-nullish-coalescing-operator","proposal-numeric-separator":"syntax-numeric-separator","proposal-object-rest-spread":"syntax-object-rest-spread","proposal-optional-catch-binding":"syntax-optional-catch-binding","proposal-optional-chaining":"syntax-optional-chaining","proposal-private-methods":"syntax-class-properties","proposal-unicode-property-regex":null};const s=Object.keys(r).map(function(e){return[e,r[e]]});const n=new Map(s);e.exports={pluginSyntaxMap:n,proposalPlugins:t}},98805:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(5116));var n=_interopRequireDefault(r(82112));var a=_interopRequireDefault(r(57640));var i=_interopRequireDefault(r(23817));var o=_interopRequireDefault(r(26456));var l=_interopRequireDefault(r(99420));var u=_interopRequireDefault(r(61586));var c=_interopRequireDefault(r(95619));var p=_interopRequireDefault(r(86343));var f=_interopRequireDefault(r(28909));var d=_interopRequireDefault(r(39797));var y=_interopRequireDefault(r(56679));var h=_interopRequireDefault(r(14189));var m=_interopRequireDefault(r(53447));var g=_interopRequireDefault(r(74690));var b=_interopRequireDefault(r(78562));var x=_interopRequireDefault(r(91253));var v=_interopRequireDefault(r(76321));var E=_interopRequireDefault(r(66841));var T=_interopRequireDefault(r(17788));var S=_interopRequireDefault(r(15654));var P=_interopRequireDefault(r(82079));var j=_interopRequireDefault(r(35078));var w=_interopRequireDefault(r(12077));var A=_interopRequireDefault(r(4197));var D=_interopRequireDefault(r(43673));var O=_interopRequireDefault(r(45807));var _=_interopRequireDefault(r(84419));var C=_interopRequireDefault(r(21600));var I=_interopRequireDefault(r(7109));var k=_interopRequireDefault(r(13798));var R=_interopRequireDefault(r(32817));var M=_interopRequireDefault(r(74483));var N=_interopRequireDefault(r(74058));var F=_interopRequireDefault(r(36195));var L=_interopRequireDefault(r(59630));var B=_interopRequireDefault(r(46642));var q=_interopRequireDefault(r(5718));var W=_interopRequireDefault(r(59153));var U=_interopRequireDefault(r(50933));var K=_interopRequireDefault(r(68749));var V=_interopRequireDefault(r(82565));var $=_interopRequireDefault(r(79874));var J=_interopRequireDefault(r(46660));var H=_interopRequireDefault(r(79418));var G=_interopRequireDefault(r(19562));var Y=_interopRequireDefault(r(26155));var X=_interopRequireDefault(r(17655));var z=_interopRequireDefault(r(2397));var Q=_interopRequireDefault(r(26088));var Z=_interopRequireDefault(r(27476));var ee=_interopRequireDefault(r(48315));var te=_interopRequireDefault(r(84779));var re=_interopRequireDefault(r(84611));var se=_interopRequireDefault(r(446));var ne=_interopRequireDefault(r(31507));var ae=_interopRequireDefault(r(91990));var ie=_interopRequireDefault(r(30348));var oe=_interopRequireDefault(r(45585));var le=_interopRequireDefault(r(1056));var ue=_interopRequireDefault(r(64038));var ce=_interopRequireDefault(r(86808));var pe=_interopRequireDefault(r(96126));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var fe={"bugfix/transform-async-arrows-in-class":ie.default,"bugfix/transform-edge-default-parameters":oe.default,"bugfix/transform-edge-function-name":le.default,"bugfix/transform-safari-block-shadowing":ce.default,"bugfix/transform-safari-for-shadowing":pe.default,"bugfix/transform-tagged-template-caching":ue.default,"proposal-async-generator-functions":h.default,"proposal-class-properties":m.default,"proposal-dynamic-import":g.default,"proposal-export-namespace-from":b.default,"proposal-json-strings":x.default,"proposal-logical-assignment-operators":v.default,"proposal-nullish-coalescing-operator":E.default,"proposal-numeric-separator":T.default,"proposal-object-rest-spread":S.default,"proposal-optional-catch-binding":P.default,"proposal-optional-chaining":j.default,"proposal-private-methods":w.default,"proposal-unicode-property-regex":A.default,"syntax-async-generators":s.default,"syntax-class-properties":n.default,"syntax-dynamic-import":a.default,"syntax-export-namespace-from":i.default,"syntax-json-strings":o.default,"syntax-logical-assignment-operators":l.default,"syntax-nullish-coalescing-operator":u.default,"syntax-numeric-separator":c.default,"syntax-object-rest-spread":p.default,"syntax-optional-catch-binding":f.default,"syntax-optional-chaining":d.default,"syntax-top-level-await":y.default,"transform-arrow-functions":O.default,"transform-async-to-generator":D.default,"transform-block-scoped-functions":_.default,"transform-block-scoping":C.default,"transform-classes":I.default,"transform-computed-properties":k.default,"transform-destructuring":R.default,"transform-dotall-regex":M.default,"transform-duplicate-keys":N.default,"transform-exponentiation-operator":F.default,"transform-for-of":L.default,"transform-function-name":B.default,"transform-literals":q.default,"transform-member-expression-literals":W.default,"transform-modules-amd":U.default,"transform-modules-commonjs":K.default,"transform-modules-systemjs":V.default,"transform-modules-umd":$.default,"transform-named-capturing-groups-regex":J.default,"transform-new-target":H.default,"transform-object-super":G.default,"transform-parameters":Y.default,"transform-property-literals":X.default,"transform-regenerator":z.default,"transform-reserved-words":Q.default,"transform-shorthand-properties":Z.default,"transform-spread":ee.default,"transform-sticky-regex":te.default,"transform-template-literals":re.default,"transform-typeof-symbol":se.default,"transform-unicode-escapes":ne.default,"transform-unicode-regex":ae.default};t.default=fe},37192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.logUsagePolyfills=t.logEntryPolyfills=t.logPluginOrPolyfill=void 0;var s=r(34487);const n=e=>{return e>1?"s":""};const a=(e,t,r)=>{const n=(0,s.getInclusionReasons)(e,t,r);const a=JSON.stringify(n).replace(/,/g,", ").replace(/^\{"/,'{ "').replace(/"\}$/,'" }');console.log(` ${e} ${a}`)};t.logPluginOrPolyfill=a;const i=(e,t,r,s,i,o)=>{if(process.env.BABEL_ENV==="test"){s=s.replace(/\\/g,"/")}if(!t){console.log(`\n[${s}] Import of ${e} was not found.`);return}if(!r.size){console.log(`\n[${s}] Based on your targets, polyfills were not added.`);return}console.log(`\n[${s}] Replaced ${e} entries with the following polyfill${n(r.size)}:`);for(const e of r){a(e,i,o)}};t.logEntryPolyfills=i;const o=(e,t,r,s)=>{if(process.env.BABEL_ENV==="test"){t=t.replace(/\\/g,"/")}if(!e.size){console.log(`\n[${t}] Based on your code and targets, core-js polyfills were not added.`);return}console.log(`\n[${t}] Added following core-js polyfill${n(e.size)}:`);for(const t of e){a(t,r,s)}};t.logUsagePolyfills=o},33330:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.removeUnnecessaryItems=removeUnnecessaryItems;function removeUnnecessaryItems(e,t){e.forEach(r=>{var s;(s=t[r])==null?void 0:s.forEach(t=>e.delete(t))})}},90666:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;const r=["transform-typeof-symbol"];function _default({loose:e}){return e?r:null}},92553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isPluginRequired=isPluginRequired;t.default=t.getPolyfillPlugins=t.getModulesPluginNames=t.transformIncludesAndExcludes=void 0;var s=r(62519);var n=r(37192);var a=_interopRequireDefault(r(90666));var i=r(33330);var o=_interopRequireDefault(r(73422));var l=_interopRequireDefault(r(91e3));var u=r(39291);var c=r(13528);var p=_interopRequireDefault(r(7409));var f=_interopRequireDefault(r(26763));var d=_interopRequireDefault(r(30172));var y=_interopRequireDefault(r(15045));var h=_interopRequireDefault(r(59817));var m=_interopRequireDefault(r(80101));var g=_interopRequireDefault(r(1066));var b=_interopRequireWildcard(r(34487));var x=_interopRequireDefault(r(98805));var v=r(41013);var E=r(70287);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isPluginRequired(e,t){return(0,b.isRequired)("fake-name",e,{compatData:{"fake-name":t}})}const T={withProposals:{withoutBugfixes:c.plugins,withBugfixes:Object.assign({},c.plugins,c.pluginsBugfixes)},withoutProposals:{withoutBugfixes:(0,v.filterStageFromList)(c.plugins,u.proposalPlugins),withBugfixes:(0,v.filterStageFromList)(Object.assign({},c.plugins,c.pluginsBugfixes),u.proposalPlugins)}};function getPluginList(e,t){if(e){if(t)return T.withProposals.withBugfixes;else return T.withProposals.withoutBugfixes}else{if(t)return T.withoutProposals.withBugfixes;else return T.withoutProposals.withoutBugfixes}}const S=e=>{const t=x.default[e];if(!t){throw new Error(`Could not find plugin "${e}". Ensure there is an entry in ./available-plugins.js for it.`)}return t};const P=e=>{return e.reduce((e,t)=>{const r=t.match(/^(es|es6|es7|esnext|web)\./)?"builtIns":"plugins";e[r].add(t);return e},{all:e,plugins:new Set,builtIns:new Set})};t.transformIncludesAndExcludes=P;const j=({modules:e,transformations:t,shouldTransformESM:r,shouldTransformDynamicImport:s,shouldTransformExportNamespaceFrom:n,shouldParseTopLevelAwait:a})=>{const i=[];if(e!==false&&t[e]){if(r){i.push(t[e])}if(s&&r&&e!=="umd"){i.push("proposal-dynamic-import")}else{if(s){console.warn("Dynamic import can only be supported when transforming ES modules"+" to AMD, CommonJS or SystemJS. Only the parser plugin will be enabled.")}i.push("syntax-dynamic-import")}}else{i.push("syntax-dynamic-import")}if(n){i.push("proposal-export-namespace-from")}else{i.push("syntax-export-namespace-from")}if(a){i.push("syntax-top-level-await")}return i};t.getModulesPluginNames=j;const w=({useBuiltIns:e,corejs:t,polyfillTargets:r,include:s,exclude:n,proposals:a,shippedProposals:i,regenerator:o,debug:l})=>{const u=[];if(e==="usage"||e==="entry"){const c={corejs:t,polyfillTargets:r,include:s,exclude:n,proposals:a,shippedProposals:i,regenerator:o,debug:l};if(t){if(e==="usage"){if(t.major===2){u.push([f.default,c])}else{u.push([d.default,c])}if(o){u.push([y.default,c])}}else{if(t.major===2){u.push([h.default,c])}else{u.push([m.default,c]);if(!o){u.push([g.default,c])}}}}}return u};t.getPolyfillPlugins=w;function supportsStaticESM(e){return!!(e==null?void 0:e.supportsStaticESM)}function supportsDynamicImport(e){return!!(e==null?void 0:e.supportsDynamicImport)}function supportsExportNamespaceFrom(e){return!!(e==null?void 0:e.supportsExportNamespaceFrom)}function supportsTopLevelAwait(e){return!!(e==null?void 0:e.supportsTopLevelAwait)}var A=(0,E.declare)((e,t)=>{e.assertVersion(7);const{bugfixes:r,configPath:s,debug:f,exclude:d,forceAllTransforms:y,ignoreBrowserslistConfig:h,include:m,loose:g,modules:x,shippedProposals:v,spec:E,targets:T,useBuiltIns:A,corejs:{version:D,proposals:O},browserslistEnv:_}=(0,l.default)(t);let C=false;if(T==null?void 0:T.uglify){C=true;delete T.uglify;console.log("");console.log("The uglify target has been deprecated. Set the top level");console.log("option `forceAllTransforms: true` instead.");console.log("")}if((T==null?void 0:T.esmodules)&&T.browsers){console.log("");console.log("@babel/preset-env: esmodules and browsers targets have been specified together.");console.log(`\`browsers\` target, \`${T.browsers}\` will be ignored.`);console.log("")}const I=(0,b.default)(T,{ignoreBrowserslistConfig:h,configPath:s,browserslistEnv:_});const k=P(m);const R=P(d);const M=y||C?{}:I;const N=getPluginList(v,r);const F=x==="auto"&&(e.caller==null?void 0:e.caller(supportsExportNamespaceFrom))||x===false&&!(0,b.isRequired)("proposal-export-namespace-from",M,{compatData:N,includes:k.plugins,excludes:R.plugins});const L=j({modules:x,transformations:o.default,shouldTransformESM:x!=="auto"||!(e.caller==null?void 0:e.caller(supportsStaticESM)),shouldTransformDynamicImport:x!=="auto"||!(e.caller==null?void 0:e.caller(supportsDynamicImport)),shouldTransformExportNamespaceFrom:!F,shouldParseTopLevelAwait:!e.caller||e.caller(supportsTopLevelAwait)});const B=(0,b.filterItems)(N,k.plugins,R.plugins,M,L,(0,a.default)({loose:g}),u.pluginSyntaxMap);(0,i.removeUnnecessaryItems)(B,p.default);const q=w({useBuiltIns:A,corejs:D,polyfillTargets:I,include:k.builtIns,exclude:R.builtIns,proposals:O,shippedProposals:v,regenerator:B.has("transform-regenerator"),debug:f});const W=A!==false;const U=Array.from(B).map(e=>{if(e==="proposal-class-properties"||e==="proposal-private-methods"||e==="proposal-private-property-in-object"){return[S(e),{loose:g?"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error":"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"}]}return[S(e),{spec:E,loose:g,useBuiltIns:W}]}).concat(q);if(f){console.log("@babel/preset-env: `DEBUG` option");console.log("\nUsing targets:");console.log(JSON.stringify((0,b.prettifyTargets)(I),null,2));console.log(`\nUsing modules transform: ${x.toString()}`);console.log("\nUsing plugins:");B.forEach(e=>{(0,n.logPluginOrPolyfill)(e,I,c.plugins)});if(!A){console.log("\nUsing polyfills: No polyfills were added, since the `useBuiltIns` option was not set.")}else{console.log(`\nUsing polyfills with \`${A}\` option:`)}}return{plugins:U}});t.default=A},73422:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var r={auto:"transform-modules-commonjs",amd:"transform-modules-amd",commonjs:"transform-modules-commonjs",cjs:"transform-modules-commonjs",systemjs:"transform-modules-systemjs",umd:"transform-modules-umd"};t.default=r},91000:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.normalizeCoreJSOption=normalizeCoreJSOption;t.default=normalizeOptions;t.validateUseBuiltInsOption=t.validateModulesOption=t.checkDuplicateIncludeExcludes=t.normalizePluginName=void 0;var s=_interopRequireDefault(r(49686));var n=r(62519);var a=_interopRequireDefault(r(44954));var i=r(13528);var o=_interopRequireDefault(r(73422));var l=r(54613);var u=r(69562);var c=r(14293);var p=r(22174);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const f=new u.OptionValidator(p.name);const d=Object.keys(i.plugins);const y=["proposal-dynamic-import",...Object.keys(o.default).map(e=>o.default[e])];const h=(e,t)=>new Set([...d,...e==="exclude"?y:[],...t?t==2?[...Object.keys(a.default),...c.defaultWebIncludes]:Object.keys(s.default):[]]);const m=e=>{if(e instanceof RegExp)return e;try{return new RegExp(`^${v(e)}$`)}catch(e){return null}};const g=(e,t,r)=>Array.from(h(t,r)).filter(t=>e instanceof RegExp&&e.test(t));const b=e=>[].concat(...e);const x=(e=[],t,r)=>{if(e.length===0)return[];const s=e.map(e=>g(m(e),t,r));const n=e.filter((e,t)=>s[t].length===0);f.invariant(n.length===0,`The plugins/built-ins '${n.join(", ")}' passed to the '${t}' option are not\n valid. Please check data/[plugin-features|built-in-features].js in babel-preset-env`);return b(s)};const v=e=>e.replace(/^(@babel\/|babel-)(plugin-)?/,"");t.normalizePluginName=v;const E=(e=[],t=[])=>{const r=e.filter(e=>t.indexOf(e)>=0);f.invariant(r.length===0,`The plugins/built-ins '${r.join(", ")}' were found in both the "include" and\n "exclude" options.`)};t.checkDuplicateIncludeExcludes=E;const T=e=>{if(typeof e==="string"||Array.isArray(e)){return{browsers:e}}return Object.assign({},e)};const S=(e=l.ModulesOption.auto)=>{f.invariant(l.ModulesOption[e.toString()]||e===l.ModulesOption.false,`The 'modules' option must be one of \n`+` - 'false' to indicate no module processing\n`+` - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'`+` - 'auto' (default) which will automatically select 'false' if the current\n`+` process is known to support ES module syntax, or "commonjs" otherwise\n`);return e};t.validateModulesOption=S;const P=(e=false)=>{f.invariant(l.UseBuiltInsOption[e.toString()]||e===l.UseBuiltInsOption.false,`The 'useBuiltIns' option must be either\n 'false' (default) to indicate no polyfill,\n '"entry"' to indicate replacing the entry polyfill, or\n '"usage"' to import only used polyfills per file`);return e};t.validateUseBuiltInsOption=P;function normalizeCoreJSOption(e,t){let r=false;let s;if(t&&e===undefined){s=2;console.warn("\nWARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a "+"core-js version. Currently, we assume version 2.x when no version "+"is passed. Since this default version will likely change in future "+"versions of Babel, we recommend explicitly setting the core-js version "+"you are using via the `corejs` option.\n"+"\nYou should also be sure that the version you pass to the `corejs` "+"option matches the version specified in your `package.json`'s "+"`dependencies` section. If it doesn't, you need to run one of the "+"following commands:\n\n"+" npm install --save core-js@2 npm install --save core-js@3\n"+" yarn add core-js@2 yarn add core-js@3\n\n"+"More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins\n"+"More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs")}else if(typeof e==="object"&&e!==null){s=e.version;r=Boolean(e.proposals)}else{s=e}const a=s?(0,n.coerce)(String(s)):false;if(!t&&a){console.log("\nWARNING (@babel/preset-env): The `corejs` option only has an effect when the `useBuiltIns` option is not `false`\n")}if(t&&(!a||a.major<2||a.major>3)){throw new RangeError("Invalid Option: The version passed to `corejs` is invalid. Currently, "+"only core-js@2 and core-js@3 are supported.")}return{version:a,proposals:r}}function normalizeOptions(e){f.validateTopLevelOptions(e,l.TopLevelOptions);const t=P(e.useBuiltIns);const r=normalizeCoreJSOption(e.corejs,t);const s=x(e.include,l.TopLevelOptions.include,!!r.version&&r.version.major);const n=x(e.exclude,l.TopLevelOptions.exclude,!!r.version&&r.version.major);E(s,n);return{bugfixes:f.validateBooleanOption(l.TopLevelOptions.bugfixes,e.bugfixes,false),configPath:f.validateStringOption(l.TopLevelOptions.configPath,e.configPath,process.cwd()),corejs:r,debug:f.validateBooleanOption(l.TopLevelOptions.debug,e.debug,false),include:s,exclude:n,forceAllTransforms:f.validateBooleanOption(l.TopLevelOptions.forceAllTransforms,e.forceAllTransforms,false),ignoreBrowserslistConfig:f.validateBooleanOption(l.TopLevelOptions.ignoreBrowserslistConfig,e.ignoreBrowserslistConfig,false),loose:f.validateBooleanOption(l.TopLevelOptions.loose,e.loose,false),modules:S(e.modules),shippedProposals:f.validateBooleanOption(l.TopLevelOptions.shippedProposals,e.shippedProposals,false),spec:f.validateBooleanOption(l.TopLevelOptions.spec,e.spec,false),targets:T(e.targets),useBuiltIns:t,browserslistEnv:f.validateStringOption(l.TopLevelOptions.browserslistEnv,e.browserslistEnv)}}},54613:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UseBuiltInsOption=t.ModulesOption=t.TopLevelOptions=void 0;const r={bugfixes:"bugfixes",configPath:"configPath",corejs:"corejs",debug:"debug",exclude:"exclude",forceAllTransforms:"forceAllTransforms",ignoreBrowserslistConfig:"ignoreBrowserslistConfig",include:"include",loose:"loose",modules:"modules",shippedProposals:"shippedProposals",spec:"spec",targets:"targets",useBuiltIns:"useBuiltIns",browserslistEnv:"browserslistEnv"};t.TopLevelOptions=r;const s={false:false,auto:"auto",amd:"amd",commonjs:"commonjs",cjs:"cjs",systemjs:"systemjs",umd:"umd"};t.ModulesOption=s;const n={false:false,entry:"entry",usage:"usage"};t.UseBuiltInsOption=n},13528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pluginsBugfixes=t.plugins=void 0;var s=_interopRequireDefault(r(65561));var n=_interopRequireDefault(r(68991));var a=_interopRequireDefault(r(98805));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i={};t.plugins=i;const o={};t.pluginsBugfixes=o;for(const e of Object.keys(s.default)){if(Object.hasOwnProperty.call(a.default,e)){i[e]=s.default[e]}}for(const e of Object.keys(n.default)){if(Object.hasOwnProperty.call(a.default,e)){o[e]=n.default[e]}}i["proposal-class-properties"]=i["proposal-private-methods"]},84434:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.StaticProperties=t.InstanceProperties=t.BuiltIns=void 0;const r=["es6.object.to-string","es6.array.iterator","web.dom.iterable"];const s=["es6.string.iterator",...r];const n=["es6.object.to-string","es6.promise"];const a={DataView:"es6.typed.data-view",Float32Array:"es6.typed.float32-array",Float64Array:"es6.typed.float64-array",Int8Array:"es6.typed.int8-array",Int16Array:"es6.typed.int16-array",Int32Array:"es6.typed.int32-array",Map:["es6.map",...s],Number:"es6.number.constructor",Promise:n,RegExp:["es6.regexp.constructor"],Set:["es6.set",...s],Symbol:["es6.symbol","es7.symbol.async-iterator"],Uint8Array:"es6.typed.uint8-array",Uint8ClampedArray:"es6.typed.uint8-clamped-array",Uint16Array:"es6.typed.uint16-array",Uint32Array:"es6.typed.uint32-array",WeakMap:["es6.weak-map",...s],WeakSet:["es6.weak-set",...s]};t.BuiltIns=a;const i={__defineGetter__:["es7.object.define-getter"],__defineSetter__:["es7.object.define-setter"],__lookupGetter__:["es7.object.lookup-getter"],__lookupSetter__:["es7.object.lookup-setter"],anchor:["es6.string.anchor"],big:["es6.string.big"],bind:["es6.function.bind"],blink:["es6.string.blink"],bold:["es6.string.bold"],codePointAt:["es6.string.code-point-at"],copyWithin:["es6.array.copy-within"],endsWith:["es6.string.ends-with"],entries:r,every:["es6.array.is-array"],fill:["es6.array.fill"],filter:["es6.array.filter"],finally:["es7.promise.finally",...n],find:["es6.array.find"],findIndex:["es6.array.find-index"],fixed:["es6.string.fixed"],flags:["es6.regexp.flags"],flatMap:["es7.array.flat-map"],fontcolor:["es6.string.fontcolor"],fontsize:["es6.string.fontsize"],forEach:["es6.array.for-each"],includes:["es6.string.includes","es7.array.includes"],indexOf:["es6.array.index-of"],italics:["es6.string.italics"],keys:r,lastIndexOf:["es6.array.last-index-of"],link:["es6.string.link"],map:["es6.array.map"],match:["es6.regexp.match"],name:["es6.function.name"],padStart:["es7.string.pad-start"],padEnd:["es7.string.pad-end"],reduce:["es6.array.reduce"],reduceRight:["es6.array.reduce-right"],repeat:["es6.string.repeat"],replace:["es6.regexp.replace"],search:["es6.regexp.search"],slice:["es6.array.slice"],small:["es6.string.small"],some:["es6.array.some"],sort:["es6.array.sort"],split:["es6.regexp.split"],startsWith:["es6.string.starts-with"],strike:["es6.string.strike"],sub:["es6.string.sub"],sup:["es6.string.sup"],toISOString:["es6.date.to-iso-string"],toJSON:["es6.date.to-json"],toString:["es6.object.to-string","es6.date.to-string","es6.regexp.to-string"],trim:["es6.string.trim"],trimEnd:["es7.string.trim-right"],trimLeft:["es7.string.trim-left"],trimRight:["es7.string.trim-right"],trimStart:["es7.string.trim-left"],values:r};t.InstanceProperties=i;const o={Array:{from:["es6.array.from","es6.string.iterator"],isArray:"es6.array.is-array",of:"es6.array.of"},Date:{now:"es6.date.now"},Object:{assign:"es6.object.assign",create:"es6.object.create",defineProperty:"es6.object.define-property",defineProperties:"es6.object.define-properties",entries:"es7.object.entries",freeze:"es6.object.freeze",getOwnPropertyDescriptors:"es7.object.get-own-property-descriptors",getOwnPropertySymbols:"es6.symbol",is:"es6.object.is",isExtensible:"es6.object.is-extensible",isFrozen:"es6.object.is-frozen",isSealed:"es6.object.is-sealed",keys:"es6.object.keys",preventExtensions:"es6.object.prevent-extensions",seal:"es6.object.seal",setPrototypeOf:"es6.object.set-prototype-of",values:"es7.object.values"},Math:{acosh:"es6.math.acosh",asinh:"es6.math.asinh",atanh:"es6.math.atanh",cbrt:"es6.math.cbrt",clz32:"es6.math.clz32",cosh:"es6.math.cosh",expm1:"es6.math.expm1",fround:"es6.math.fround",hypot:"es6.math.hypot",imul:"es6.math.imul",log1p:"es6.math.log1p",log10:"es6.math.log10",log2:"es6.math.log2",sign:"es6.math.sign",sinh:"es6.math.sinh",tanh:"es6.math.tanh",trunc:"es6.math.trunc"},String:{fromCodePoint:"es6.string.from-code-point",raw:"es6.string.raw"},Number:{EPSILON:"es6.number.epsilon",MIN_SAFE_INTEGER:"es6.number.min-safe-integer",MAX_SAFE_INTEGER:"es6.number.max-safe-integer",isFinite:"es6.number.is-finite",isInteger:"es6.number.is-integer",isSafeInteger:"es6.number.is-safe-integer",isNaN:"es6.number.is-nan",parseFloat:"es6.number.parse-float",parseInt:"es6.number.parse-int"},Promise:{all:s,race:s},Reflect:{apply:"es6.reflect.apply",construct:"es6.reflect.construct",defineProperty:"es6.reflect.define-property",deleteProperty:"es6.reflect.delete-property",get:"es6.reflect.get",getOwnPropertyDescriptor:"es6.reflect.get-own-property-descriptor",getPrototypeOf:"es6.reflect.get-prototype-of",has:"es6.reflect.has",isExtensible:"es6.reflect.is-extensible",ownKeys:"es6.reflect.own-keys",preventExtensions:"es6.reflect.prevent-extensions",set:"es6.reflect.set",setPrototypeOf:"es6.reflect.set-prototype-of"}};t.StaticProperties=o},59817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=_interopRequireDefault(r(44954));var n=r(34487);var a=_interopRequireDefault(r(14293));var i=r(41013);var o=r(37192);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _default(e,{include:t,exclude:r,polyfillTargets:l,regenerator:u,debug:c}){const p=(0,n.filterItems)(s.default,t,r,l,(0,a.default)(l));const f={ImportDeclaration(e){if((0,i.isPolyfillSource)((0,i.getImportSource)(e))){this.replaceBySeparateModulesImport(e)}},Program(e){e.get("body").forEach(e=>{if((0,i.isPolyfillSource)((0,i.getRequireSource)(e))){this.replaceBySeparateModulesImport(e)}})}};return{name:"corejs2-entry",visitor:f,pre(){this.importPolyfillIncluded=false;this.replaceBySeparateModulesImport=function(e){this.importPolyfillIncluded=true;if(u){(0,i.createImport)(e,"regenerator-runtime")}const t=Array.from(p).reverse();for(const r of t){(0,i.createImport)(e,r)}e.remove()}},post(){if(c){(0,o.logEntryPolyfills)("@babel/polyfill",this.importPolyfillIncluded,p,this.file.opts.filename,l,s.default)}}}}},14293:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;t.defaultWebIncludes=void 0;const r=["web.timers","web.immediate","web.dom.iterable"];t.defaultWebIncludes=r;function _default(e){const t=Object.keys(e);const s=!t.length;const n=t.some(e=>e!=="node");return s||n?r:null}},26763:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=_interopRequireDefault(r(44954));var n=r(34487);var a=_interopRequireDefault(r(14293));var i=r(84434);var o=r(41013);var l=r(37192);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const u=`\n When setting \`useBuiltIns: 'usage'\`, polyfills are automatically imported when needed.\n Please remove the \`import '@babel/polyfill'\` call or use \`useBuiltIns: 'entry'\` instead.`;function _default({types:e},{include:t,exclude:r,polyfillTargets:c,debug:p}){const f=(0,n.filterItems)(s.default,t,r,c,(0,a.default)(c));const d={ImportDeclaration(e){if((0,o.isPolyfillSource)((0,o.getImportSource)(e))){console.warn(u);e.remove()}},Program(e){e.get("body").forEach(e=>{if((0,o.isPolyfillSource)((0,o.getRequireSource)(e))){console.warn(u);e.remove()}})},ReferencedIdentifier({node:{name:t},parent:r,scope:s}){if(e.isMemberExpression(r))return;if(!(0,o.has)(i.BuiltIns,t))return;if(s.getBindingIdentifier(t))return;const n=i.BuiltIns[t];this.addUnsupported(n)},CallExpression(t){if(t.node.arguments.length)return;const r=t.node.callee;if(!e.isMemberExpression(r))return;if(!r.computed)return;if(!t.get("callee.property").matchesPattern("Symbol.iterator")){return}this.addImport("web.dom.iterable")},BinaryExpression(e){if(e.node.operator!=="in")return;if(!e.get("left").matchesPattern("Symbol.iterator"))return;this.addImport("web.dom.iterable")},YieldExpression(e){if(e.node.delegate){this.addImport("web.dom.iterable")}},MemberExpression:{enter(t){const{node:r}=t;const{object:s,property:n}=r;if((0,o.isNamespaced)(t.get("object")))return;let a=s.name;let l="";let u="";if(r.computed){if(e.isStringLiteral(n)){l=n.value}else{const e=t.get("property").evaluate();if(e.confident&&e.value){l=e.value}}}else{l=n.name}if(t.scope.getBindingIdentifier(s.name)){const e=t.get("object").evaluate();if(e.value){u=(0,o.getType)(e.value)}else if(e.deopt&&e.deopt.isIdentifier()){a=e.deopt.node.name}}if((0,o.has)(i.StaticProperties,a)){const e=i.StaticProperties[a];if((0,o.has)(e,l)){const t=e[l];this.addUnsupported(t)}}if((0,o.has)(i.InstanceProperties,l)){let e=i.InstanceProperties[l];if(u){e=e.filter(e=>e.includes(u))}this.addUnsupported(e)}},exit(e){const{name:t}=e.node.object;if(!(0,o.has)(i.BuiltIns,t))return;if(e.scope.getBindingIdentifier(t))return;const r=i.BuiltIns[t];this.addUnsupported(r)}},VariableDeclarator(t){const{node:r}=t;const{id:s,init:n}=r;if(!e.isObjectPattern(s))return;if(n&&t.scope.getBindingIdentifier(n.name))return;for(const{key:t}of s.properties){if(!r.computed&&e.isIdentifier(t)&&(0,o.has)(i.InstanceProperties,t.name)){const e=i.InstanceProperties[t.name];this.addUnsupported(e)}}}};return{name:"corejs2-usage",pre({path:e}){this.polyfillsSet=new Set;this.addImport=function(t){if(!this.polyfillsSet.has(t)){this.polyfillsSet.add(t);(0,o.createImport)(e,t)}};this.addUnsupported=function(e){const t=Array.isArray(e)?e:[e];for(const e of t){if(f.has(e)){this.addImport(e)}}}},post(){if(p){(0,l.logUsagePolyfills)(this.polyfillsSet,this.file.opts.filename,c,s.default)}},visitor:d}}},59603:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PossibleGlobalObjects=t.CommonInstanceDependencies=t.StaticProperties=t.InstanceProperties=t.BuiltIns=t.PromiseDependencies=t.CommonIterators=void 0;const r=["es.array.iterator","web.dom-collections.iterator"];const s=["es.string.iterator",...r];t.CommonIterators=s;const n=["es.object.to-string",...r];const a=["es.object.to-string",...s];const i=["es.typed-array.copy-within","es.typed-array.every","es.typed-array.fill","es.typed-array.filter","es.typed-array.find","es.typed-array.find-index","es.typed-array.for-each","es.typed-array.includes","es.typed-array.index-of","es.typed-array.iterator","es.typed-array.join","es.typed-array.last-index-of","es.typed-array.map","es.typed-array.reduce","es.typed-array.reduce-right","es.typed-array.reverse","es.typed-array.set","es.typed-array.slice","es.typed-array.some","es.typed-array.sort","es.typed-array.subarray","es.typed-array.to-locale-string","es.typed-array.to-string","es.object.to-string","es.array.iterator","es.array-buffer.slice"];const o={from:"es.typed-array.from",of:"es.typed-array.of"};const l=["es.promise","es.object.to-string"];t.PromiseDependencies=l;const u=[...l,...s];const c=["es.symbol","es.symbol.description","es.object.to-string"];const p=["es.map","esnext.map.delete-all","esnext.map.every","esnext.map.filter","esnext.map.find","esnext.map.find-key","esnext.map.includes","esnext.map.key-of","esnext.map.map-keys","esnext.map.map-values","esnext.map.merge","esnext.map.reduce","esnext.map.some","esnext.map.update",...a];const f=["es.set","esnext.set.add-all","esnext.set.delete-all","esnext.set.difference","esnext.set.every","esnext.set.filter","esnext.set.find","esnext.set.intersection","esnext.set.is-disjoint-from","esnext.set.is-subset-of","esnext.set.is-superset-of","esnext.set.join","esnext.set.map","esnext.set.reduce","esnext.set.some","esnext.set.symmetric-difference","esnext.set.union",...a];const d=["es.weak-map","esnext.weak-map.delete-all",...a];const y=["es.weak-set","esnext.weak-set.add-all","esnext.weak-set.delete-all",...a];const h=["web.url",...a];const m={AggregateError:["esnext.aggregate-error",...s],ArrayBuffer:["es.array-buffer.constructor","es.array-buffer.slice","es.object.to-string"],DataView:["es.data-view","es.array-buffer.slice","es.object.to-string"],Date:["es.date.to-string"],Float32Array:["es.typed-array.float32-array",...i],Float64Array:["es.typed-array.float64-array",...i],Int8Array:["es.typed-array.int8-array",...i],Int16Array:["es.typed-array.int16-array",...i],Int32Array:["es.typed-array.int32-array",...i],Uint8Array:["es.typed-array.uint8-array",...i],Uint8ClampedArray:["es.typed-array.uint8-clamped-array",...i],Uint16Array:["es.typed-array.uint16-array",...i],Uint32Array:["es.typed-array.uint32-array",...i],Map:p,Number:["es.number.constructor"],Observable:["esnext.observable","esnext.symbol.observable","es.object.to-string",...a],Promise:l,RegExp:["es.regexp.constructor","es.regexp.exec","es.regexp.to-string"],Set:f,Symbol:c,URL:["web.url",...h],URLSearchParams:h,WeakMap:d,WeakSet:y,clearImmediate:["web.immediate"],compositeKey:["esnext.composite-key"],compositeSymbol:["esnext.composite-symbol",...c],fetch:l,globalThis:["es.global-this","esnext.global-this"],parseFloat:["es.parse-float"],parseInt:["es.parse-int"],queueMicrotask:["web.queue-microtask"],setTimeout:["web.timers"],setInterval:["web.timers"],setImmediate:["web.immediate"]};t.BuiltIns=m;const g={at:["esnext.string.at"],anchor:["es.string.anchor"],big:["es.string.big"],bind:["es.function.bind"],blink:["es.string.blink"],bold:["es.string.bold"],codePointAt:["es.string.code-point-at"],codePoints:["esnext.string.code-points"],concat:["es.array.concat"],copyWithin:["es.array.copy-within"],description:["es.symbol","es.symbol.description"],endsWith:["es.string.ends-with"],entries:n,every:["es.array.every"],exec:["es.regexp.exec"],fill:["es.array.fill"],filter:["es.array.filter"],finally:["es.promise.finally",...l],find:["es.array.find"],findIndex:["es.array.find-index"],fixed:["es.string.fixed"],flags:["es.regexp.flags"],flat:["es.array.flat","es.array.unscopables.flat"],flatMap:["es.array.flat-map","es.array.unscopables.flat-map"],fontcolor:["es.string.fontcolor"],fontsize:["es.string.fontsize"],forEach:["es.array.for-each","web.dom-collections.for-each"],includes:["es.array.includes","es.string.includes"],indexOf:["es.array.index-of"],italics:["es.string.italics"],join:["es.array.join"],keys:n,lastIndex:["esnext.array.last-index"],lastIndexOf:["es.array.last-index-of"],lastItem:["esnext.array.last-item"],link:["es.string.link"],match:["es.string.match","es.regexp.exec"],matchAll:["es.string.match-all","esnext.string.match-all"],map:["es.array.map"],name:["es.function.name"],padEnd:["es.string.pad-end"],padStart:["es.string.pad-start"],reduce:["es.array.reduce"],reduceRight:["es.array.reduce-right"],repeat:["es.string.repeat"],replace:["es.string.replace","es.regexp.exec"],replaceAll:["esnext.string.replace-all"],reverse:["es.array.reverse"],search:["es.string.search","es.regexp.exec"],slice:["es.array.slice"],small:["es.string.small"],some:["es.array.some"],sort:["es.array.sort"],splice:["es.array.splice"],split:["es.string.split","es.regexp.exec"],startsWith:["es.string.starts-with"],strike:["es.string.strike"],sub:["es.string.sub"],sup:["es.string.sup"],toFixed:["es.number.to-fixed"],toISOString:["es.date.to-iso-string"],toJSON:["es.date.to-json","web.url.to-json"],toPrecision:["es.number.to-precision"],toString:["es.object.to-string","es.regexp.to-string","es.date.to-string"],trim:["es.string.trim"],trimEnd:["es.string.trim-end"],trimLeft:["es.string.trim-start"],trimRight:["es.string.trim-end"],trimStart:["es.string.trim-start"],values:n,__defineGetter__:["es.object.define-getter"],__defineSetter__:["es.object.define-setter"],__lookupGetter__:["es.object.lookup-getter"],__lookupSetter__:["es.object.lookup-setter"]};t.InstanceProperties=g;const b={Array:{from:["es.array.from","es.string.iterator"],isArray:["es.array.is-array"],of:["es.array.of"]},Date:{now:"es.date.now"},Object:{assign:"es.object.assign",create:"es.object.create",defineProperty:"es.object.define-property",defineProperties:"es.object.define-properties",entries:"es.object.entries",freeze:"es.object.freeze",fromEntries:["es.object.from-entries","es.array.iterator"],getOwnPropertyDescriptor:"es.object.get-own-property-descriptor",getOwnPropertyDescriptors:"es.object.get-own-property-descriptors",getOwnPropertyNames:"es.object.get-own-property-names",getOwnPropertySymbols:"es.symbol",getPrototypeOf:"es.object.get-prototype-of",is:"es.object.is",isExtensible:"es.object.is-extensible",isFrozen:"es.object.is-frozen",isSealed:"es.object.is-sealed",keys:"es.object.keys",preventExtensions:"es.object.prevent-extensions",seal:"es.object.seal",setPrototypeOf:"es.object.set-prototype-of",values:"es.object.values"},Math:{DEG_PER_RAD:"esnext.math.deg-per-rad",RAD_PER_DEG:"esnext.math.rad-per-deg",acosh:"es.math.acosh",asinh:"es.math.asinh",atanh:"es.math.atanh",cbrt:"es.math.cbrt",clamp:"esnext.math.clamp",clz32:"es.math.clz32",cosh:"es.math.cosh",degrees:"esnext.math.degrees",expm1:"es.math.expm1",fround:"es.math.fround",fscale:"esnext.math.fscale",hypot:"es.math.hypot",iaddh:"esnext.math.iaddh",imul:"es.math.imul",imulh:"esnext.math.imulh",isubh:"esnext.math.isubh",log1p:"es.math.log1p",log10:"es.math.log10",log2:"es.math.log2",radians:"esnext.math.radians",scale:"esnext.math.scale",seededPRNG:"esnext.math.seeded-prng",sign:"es.math.sign",signbit:"esnext.math.signbit",sinh:"es.math.sinh",tanh:"es.math.tanh",trunc:"es.math.trunc",umulh:"esnext.math.umulh"},String:{fromCodePoint:"es.string.from-code-point",raw:"es.string.raw"},Number:{EPSILON:"es.number.epsilon",MIN_SAFE_INTEGER:"es.number.min-safe-integer",MAX_SAFE_INTEGER:"es.number.max-safe-integer",fromString:"esnext.number.from-string",isFinite:"es.number.is-finite",isInteger:"es.number.is-integer",isSafeInteger:"es.number.is-safe-integer",isNaN:"es.number.is-nan",parseFloat:"es.number.parse-float",parseInt:"es.number.parse-int"},Map:{from:["esnext.map.from",...p],groupBy:["esnext.map.group-by",...p],keyBy:["esnext.map.key-by",...p],of:["esnext.map.of",...p]},Set:{from:["esnext.set.from",...f],of:["esnext.set.of",...f]},WeakMap:{from:["esnext.weak-map.from",...d],of:["esnext.weak-map.of",...d]},WeakSet:{from:["esnext.weak-set.from",...y],of:["esnext.weak-set.of",...y]},Promise:{all:u,allSettled:["es.promise.all-settled","esnext.promise.all-settled",...u],any:["esnext.promise.any","esnext.aggregate-error",...u],race:u,try:["esnext.promise.try",...u]},Reflect:{apply:"es.reflect.apply",construct:"es.reflect.construct",defineMetadata:"esnext.reflect.define-metadata",defineProperty:"es.reflect.define-property",deleteMetadata:"esnext.reflect.delete-metadata",deleteProperty:"es.reflect.delete-property",get:"es.reflect.get",getMetadata:"esnext.reflect.get-metadata",getMetadataKeys:"esnext.reflect.get-metadata-keys",getOwnMetadata:"esnext.reflect.get-own-metadata",getOwnMetadataKeys:"esnext.reflect.get-own-metadata-keys",getOwnPropertyDescriptor:"es.reflect.get-own-property-descriptor",getPrototypeOf:"es.reflect.get-prototype-of",has:"es.reflect.has",hasMetadata:"esnext.reflect.has-metadata",hasOwnMetadata:"esnext.reflect.has-own-metadata",isExtensible:"es.reflect.is-extensible",metadata:"esnext.reflect.metadata",ownKeys:"es.reflect.own-keys",preventExtensions:"es.reflect.prevent-extensions",set:"es.reflect.set",setPrototypeOf:"es.reflect.set-prototype-of"},Symbol:{asyncIterator:["es.symbol.async-iterator"],dispose:["esnext.symbol.dispose"],hasInstance:["es.symbol.has-instance","es.function.has-instance"],isConcatSpreadable:["es.symbol.is-concat-spreadable","es.array.concat"],iterator:["es.symbol.iterator",...a],match:["es.symbol.match","es.string.match"],observable:["esnext.symbol.observable"],patternMatch:["esnext.symbol.pattern-match"],replace:["es.symbol.replace","es.string.replace"],search:["es.symbol.search","es.string.search"],species:["es.symbol.species","es.array.species"],split:["es.symbol.split","es.string.split"],toPrimitive:["es.symbol.to-primitive","es.date.to-primitive"],toStringTag:["es.symbol.to-string-tag","es.object.to-string","es.math.to-string-tag","es.json.to-string-tag"],unscopables:["es.symbol.unscopables"]},ArrayBuffer:{isView:["es.array-buffer.is-view"]},Int8Array:o,Uint8Array:o,Uint8ClampedArray:o,Int16Array:o,Uint16Array:o,Int32Array:o,Uint32Array:o,Float32Array:o,Float64Array:o};t.StaticProperties=b;const x=new Set(["es.object.to-string","es.object.define-getter","es.object.define-setter","es.object.lookup-getter","es.object.lookup-setter","es.regexp.exec"]);t.CommonInstanceDependencies=x;const v=new Set(["global","globalThis","self","window"]);t.PossibleGlobalObjects=v},80101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=_interopRequireDefault(r(49686));var n=_interopRequireDefault(r(64341));var a=_interopRequireDefault(r(79774));var i=r(34487);var o=r(41013);var l=r(37192);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isBabelPolyfillSource(e){return e==="@babel/polyfill"||e==="babel-polyfill"}function isCoreJSSource(e){if(typeof e==="string"){e=e.replace(/\\/g,"/").replace(/(\/(index)?)?(\.js)?$/i,"").toLowerCase()}return(0,o.has)(n.default,e)&&n.default[e]}const u=`\n \`@babel/polyfill\` is deprecated. Please, use required parts of \`core-js\`\n and \`regenerator-runtime/runtime\` separately`;function _default(e,{corejs:t,include:r,exclude:n,polyfillTargets:c,debug:p}){const f=(0,i.filterItems)(s.default,r,n,c,null);const d=new Set((0,a.default)(t.version));function shouldReplace(e,t){if(!t)return false;if(t.length===1&&f.has(t[0])&&d.has(t[0])&&(0,o.getModulePath)(t[0])===e){return false}return true}const y={ImportDeclaration(e){const t=(0,o.getImportSource)(e);if(!t)return;if(isBabelPolyfillSource(t)){console.warn(u)}else{const r=isCoreJSSource(t);if(shouldReplace(t,r)){this.replaceBySeparateModulesImport(e,r)}}},Program:{enter(e){e.get("body").forEach(e=>{const t=(0,o.getRequireSource)(e);if(!t)return;if(isBabelPolyfillSource(t)){console.warn(u)}else{const r=isCoreJSSource(t);if(shouldReplace(t,r)){this.replaceBySeparateModulesImport(e,r)}}})},exit(e){const t=(0,o.intersection)(f,this.polyfillsSet,d);const r=Array.from(t).reverse();for(const t of r){if(!this.injectedPolyfills.has(t)){(0,o.createImport)(e,t)}}t.forEach(e=>this.injectedPolyfills.add(e))}}};return{name:"corejs3-entry",visitor:y,pre(){this.injectedPolyfills=new Set;this.polyfillsSet=new Set;this.replaceBySeparateModulesImport=function(e,t){for(const e of t){this.polyfillsSet.add(e)}e.remove()}},post(){if(p){(0,l.logEntryPolyfills)("core-js",this.injectedPolyfills.size>0,this.injectedPolyfills,this.file.opts.filename,c,s.default)}}}}},30172:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=_interopRequireDefault(r(49686));var n=_interopRequireDefault(r(85709));var a=_interopRequireDefault(r(79774));var i=r(34487);var o=r(59603);var l=r(41013);var u=r(37192);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const c=`\n When setting \`useBuiltIns: 'usage'\`, polyfills are automatically imported when needed.\n Please remove the direct import of \`core-js\` or use \`useBuiltIns: 'entry'\` instead.`;const p=Object.keys(s.default).filter(e=>!e.startsWith("esnext.")).reduce((e,t)=>{e[t]=s.default[t];return e},{});const f=n.default.reduce((e,t)=>{e[t]=s.default[t];return e},Object.assign({},p));function _default(e,{corejs:t,include:r,exclude:n,polyfillTargets:d,proposals:y,shippedProposals:h,debug:m}){const g=(0,i.filterItems)(y?s.default:h?f:p,r,n,d,null);const b=new Set((0,a.default)(t.version));function resolveKey(e,t){const{node:r,parent:s,scope:n}=e;if(e.isStringLiteral())return r.value;const{name:a}=r;const i=e.isIdentifier();if(i&&!(t||s.computed))return a;if(!i||n.getBindingIdentifier(a)){const{value:t}=e.evaluate();if(typeof t==="string")return t}}function resolveSource(e){const{node:t,scope:r}=e;let s,n;if(t){s=t.name;if(!e.isIdentifier()||r.getBindingIdentifier(s)){const{deopt:t,value:r}=e.evaluate();if(r!==undefined){n=(0,l.getType)(r)}else if(t==null?void 0:t.isIdentifier()){s=t.node.name}}}return{builtIn:s,instanceType:n,isNamespaced:(0,l.isNamespaced)(e)}}const x={ImportDeclaration(e){if((0,l.isPolyfillSource)((0,l.getImportSource)(e))){console.warn(c);e.remove()}},Program:{enter(e){e.get("body").forEach(e=>{if((0,l.isPolyfillSource)((0,l.getRequireSource)(e))){console.warn(c);e.remove()}})},exit(e){const t=(0,l.intersection)(g,this.polyfillsSet,b);const r=Array.from(t).reverse();for(const t of r){if(!this.injectedPolyfills.has(t)){(0,l.createImport)(e,t)}}t.forEach(e=>this.injectedPolyfills.add(e))}},Import(){this.addUnsupported(o.PromiseDependencies)},Function({node:e}){if(e.async){this.addUnsupported(o.PromiseDependencies)}},"ForOfStatement|ArrayPattern"(){this.addUnsupported(o.CommonIterators)},SpreadElement({parentPath:e}){if(!e.isObjectExpression()){this.addUnsupported(o.CommonIterators)}},YieldExpression({node:e}){if(e.delegate){this.addUnsupported(o.CommonIterators)}},ReferencedIdentifier({node:{name:e},scope:t}){if(t.getBindingIdentifier(e))return;this.addBuiltInDependencies(e)},MemberExpression(e){const t=resolveSource(e.get("object"));const r=resolveKey(e.get("property"));this.addPropertyDependencies(t,r)},ObjectPattern(e){const{parentPath:t,parent:r,key:s}=e;let n;if(t.isVariableDeclarator()){n=resolveSource(t.get("init"))}else if(t.isAssignmentExpression()){n=resolveSource(t.get("right"))}else if(t.isFunctionExpression()){const e=t.parentPath;if(e.isCallExpression()||e.isNewExpression()){if(e.node.callee===r){n=resolveSource(e.get("arguments")[s])}}}for(const t of e.get("properties")){if(t.isObjectProperty()){const e=resolveKey(t.get("key"));this.addPropertyDependencies(n,e)}}},BinaryExpression(e){if(e.node.operator!=="in")return;const t=resolveSource(e.get("right"));const r=resolveKey(e.get("left"),true);this.addPropertyDependencies(t,r)}};return{name:"corejs3-usage",pre(){this.injectedPolyfills=new Set;this.polyfillsSet=new Set;this.addUnsupported=function(e){const t=Array.isArray(e)?e:[e];for(const e of t){this.polyfillsSet.add(e)}};this.addBuiltInDependencies=function(e){if((0,l.has)(o.BuiltIns,e)){const t=o.BuiltIns[e];this.addUnsupported(t)}};this.addPropertyDependencies=function(e={},t){const{builtIn:r,instanceType:s,isNamespaced:n}=e;if(n)return;if(o.PossibleGlobalObjects.has(r)){this.addBuiltInDependencies(t)}else if((0,l.has)(o.StaticProperties,r)){const e=o.StaticProperties[r];if((0,l.has)(e,t)){const r=e[t];return this.addUnsupported(r)}}if(!(0,l.has)(o.InstanceProperties,t))return;let a=o.InstanceProperties[t];if(s){a=a.filter(e=>e.includes(s)||o.CommonInstanceDependencies.has(e))}this.addUnsupported(a)}},post(){if(m){(0,u.logUsagePolyfills)(this.injectedPolyfills,this.file.opts.filename,d,s.default)}},visitor:x}}},1066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=r(41013);function isRegeneratorSource(e){return e==="regenerator-runtime/runtime"}function _default(){const e={ImportDeclaration(e){if(isRegeneratorSource((0,s.getImportSource)(e))){this.regeneratorImportExcluded=true;e.remove()}},Program(e){e.get("body").forEach(e=>{if(isRegeneratorSource((0,s.getRequireSource)(e))){this.regeneratorImportExcluded=true;e.remove()}})}};return{name:"regenerator-entry",visitor:e,pre(){this.regeneratorImportExcluded=false},post(){if(this.opts.debug&&this.regeneratorImportExcluded){let e=this.file.opts.filename;if(process.env.BABEL_ENV==="test"){e=e.replace(/\\/g,"/")}console.log(`\n[${e}] Based on your targets, regenerator-runtime import excluded.`)}}}}},15045:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=r(41013);function _default(){return{name:"regenerator-usage",pre(){this.usesRegenerator=false},visitor:{Function(e){const{node:t}=e;if(!this.usesRegenerator&&(t.generator||t.async)){this.usesRegenerator=true;(0,s.createImport)(e,"regenerator-runtime")}}},post(){if(this.opts.debug&&this.usesRegenerator){let e=this.file.opts.filename;if(process.env.BABEL_ENV==="test"){e=e.replace(/\\/g,"/")}console.log(`\n[${e}] Based on your code and targets, added regenerator-runtime.`)}}}}},41013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getType=getType;t.intersection=intersection;t.filterStageFromList=filterStageFromList;t.getImportSource=getImportSource;t.getRequireSource=getRequireSource;t.isPolyfillSource=isPolyfillSource;t.getModulePath=getModulePath;t.createImport=createImport;t.isNamespaced=isNamespaced;t.has=void 0;var s=_interopRequireWildcard(r(63760));var n=r(76098);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const a=Object.hasOwnProperty.call.bind(Object.hasOwnProperty);t.has=a;function getType(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function intersection(e,t,r){const s=new Set;for(const n of e){if(t.has(n)&&r.has(n))s.add(n)}return s}function filterStageFromList(e,t){return Object.keys(e).reduce((r,s)=>{if(!t.has(s)){r[s]=e[s]}return r},{})}function getImportSource({node:e}){if(e.specifiers.length===0)return e.source.value}function getRequireSource({node:e}){if(!s.isExpressionStatement(e))return;const{expression:t}=e;const r=s.isCallExpression(t)&&s.isIdentifier(t.callee)&&t.callee.name==="require"&&t.arguments.length===1&&s.isStringLiteral(t.arguments[0]);if(r)return t.arguments[0].value}function isPolyfillSource(e){return e==="@babel/polyfill"||e==="core-js"}const i={"regenerator-runtime":"regenerator-runtime/runtime.js"};function getModulePath(e){return i[e]||`core-js/modules/${e}.js`}function createImport(e,t){return(0,n.addSideEffect)(e,getModulePath(t))}function isNamespaced(e){if(!e.node)return false;const t=e.scope.getBinding(e.node.name);if(!t)return false;return t.path.isImportNamespaceSpecifier()}},30348:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;const r={allowInsertArrow:false,specCompliant:false};var s=({types:e})=>({name:"transform-async-arrows-in-class",visitor:{ArrowFunctionExpression(t){if(t.node.async&&t.findParent(e.isClassMethod)){t.arrowFunctionToExpression(r)}}}});t.default=s;e.exports=t.default},45585:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r=({types:e})=>{const t=t=>t.parentKey==="params"&&t.parentPath&&e.isArrowFunctionExpression(t.parentPath);return{name:"transform-edge-default-parameters",visitor:{AssignmentPattern(e){const r=e.find(t);if(r&&e.parent.shorthand){e.parent.shorthand=false;(e.parent.extra||{}).shorthand=false;e.scope.rename(e.parent.key.name)}}}}};t.default=r;e.exports=t.default},1056:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r=({types:e})=>({name:"transform-edge-function-name",visitor:{FunctionExpression:{exit(t){if(!t.node.id&&e.isIdentifier(t.parent.id)){const r=e.cloneNode(t.parent.id);const s=t.scope.getBinding(r.name);if(s.constantViolations.length){t.scope.rename(r.name)}t.node.id=r}}}}});t.default=r;e.exports=t.default},86808:(e,t)=>{"use strict";t.__esModule=true;t.default=_default;function _default({types:e}){return{name:"transform-safari-block-shadowing",visitor:{VariableDeclarator(t){const r=t.parent.kind;if(r!=="let"&&r!=="const")return;const s=t.scope.block;if(e.isFunction(s)||e.isProgram(s))return;const n=e.getOuterBindingIdentifiers(t.node.id);for(const r of Object.keys(n)){let s=t.scope;if(!s.hasOwnBinding(r))continue;while(s=s.parent){if(s.hasOwnBinding(r)){t.scope.rename(r);break}if(e.isFunction(s.block)||e.isProgram(s.block)){break}}}}}}}e.exports=t.default},96126:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;function handle(e){if(!e.isVariableDeclaration())return;const t=e.getFunctionParent();const{name:r}=e.node.declarations[0].id;if(t&&t.scope.hasOwnBinding(r)&&t.scope.getOwnBinding(r).kind==="param"){e.scope.rename(r)}}var r=()=>({name:"transform-safari-for-shadowing",visitor:{ForXStatement(e){handle(e.get("left"))},ForStatement(e){handle(e.get("init"))}}});t.default=r;e.exports=t.default},64038:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r=({types:e})=>({name:"transform-tagged-template-caching",visitor:{TaggedTemplateExpression(t,r){let s=r.get("processed");if(!s){s=new Map;r.set("processed",s)}if(s.has(t.node))return t.skip();const n=t.node.quasi.expressions;let a=r.get("identity");if(!a){a=t.scope.getProgramParent().generateDeclaredUidIdentifier("_");r.set("identity",a);const s=t.scope.getBinding(a.name);s.path.get("init").replaceWith(e.arrowFunctionExpression([e.identifier("t")],e.identifier("t")))}const i=e.taggedTemplateExpression(a,e.templateLiteral(t.node.quasi.quasis,n.map(()=>e.numericLiteral(0))));s.set(i,true);const o=t.scope.getProgramParent().generateDeclaredUidIdentifier("t");t.scope.getBinding(o.name).path.parent.kind="let";const l=e.logicalExpression("||",o,e.assignmentExpression("=",o,i));const u=e.callExpression(t.node.tag,[l,...n]);t.replaceWith(u)}}});t.default=r;e.exports=t.default},9064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(70287);var n=_interopRequireDefault(r(30027));var a=_interopRequireDefault(r(14155));var i=_interopRequireDefault(r(59654));var o=_interopRequireDefault(r(71073));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var l=(0,s.declare)((e,t)=>{e.assertVersion(7);let{pragma:r,pragmaFrag:s}=t;const{pure:l,throwIfNamespace:u=true,runtime:c="classic",importSource:p}=t;if(c==="classic"){r=r||"React.createElement";s=s||"React.Fragment"}const f=!!t.development;return{plugins:[[f?a.default:n.default,{importSource:p,pragma:r,pragmaFrag:s,runtime:c,throwIfNamespace:u,pure:l,useBuiltIns:!!t.useBuiltIns,useSpread:t.useSpread}],i.default,l!==false&&o.default].filter(Boolean)}});t.default=l},39293:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(70287);var n=_interopRequireDefault(r(28524));var a=r(69562);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=new a.OptionValidator("@babel/preset-typescript");var o=(0,s.declare)((e,t)=>{e.assertVersion(7);const{allowDeclareFields:r,allowNamespaces:s,jsxPragma:a,onlyRemoveTypeImports:o}=t;const l=i.validateStringOption("jsxPragmaFrag",t.jsxPragmaFrag,"React.Fragment");const u=i.validateBooleanOption("allExtensions",t.allExtensions,false);const c=i.validateBooleanOption("isTSX",t.isTSX,false);if(c){i.invariant(u,"isTSX:true requires allExtensions:true")}const p=e=>({allowDeclareFields:r,allowNamespaces:s,isTSX:e,jsxPragma:a,jsxPragmaFrag:l,onlyRemoveTypeImports:o});return{overrides:u?[{plugins:[[n.default,p(c)]]}]:[{test:/\.ts$/,plugins:[[n.default,p(false)]]},{test:/\.tsx$/,plugins:[[n.default,p(true)]]}]}});t.default=o},44388:e=>{function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=_interopRequireDefault},51675:(e,t,r)=>{var s=r(57246);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function _getRequireWildcardCache(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||s(e)!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e){if(Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;if(i&&(i.get||i.set)){Object.defineProperty(r,a,i)}else{r[a]=e[a]}}}r["default"]=e;if(t){t.set(e,r)}return r}e.exports=_interopRequireWildcard},57246:e=>{function _typeof(t){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){e.exports=_typeof=function _typeof(e){return typeof e}}else{e.exports=_typeof=function _typeof(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return _typeof(t)}e.exports=_typeof},22663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=createTemplateBuilder;var s=r(5447);var n=_interopRequireDefault(r(26522));var a=_interopRequireDefault(r(80694));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=(0,s.validate)({placeholderPattern:false});function createTemplateBuilder(e,t){const r=new WeakMap;const o=new WeakMap;const l=t||(0,s.validate)(null);return Object.assign((t,...i)=>{if(typeof t==="string"){if(i.length>1)throw new Error("Unexpected extra params.");return extendedTrace((0,n.default)(e,t,(0,s.merge)(l,(0,s.validate)(i[0]))))}else if(Array.isArray(t)){let s=r.get(t);if(!s){s=(0,a.default)(e,t,l);r.set(t,s)}return extendedTrace(s(i))}else if(typeof t==="object"&&t){if(i.length>0)throw new Error("Unexpected extra params.");return createTemplateBuilder(e,(0,s.merge)(l,(0,s.validate)(t)))}throw new Error(`Unexpected template param ${typeof t}`)},{ast:(t,...r)=>{if(typeof t==="string"){if(r.length>1)throw new Error("Unexpected extra params.");return(0,n.default)(e,t,(0,s.merge)((0,s.merge)(l,(0,s.validate)(r[0])),i))()}else if(Array.isArray(t)){let n=o.get(t);if(!n){n=(0,a.default)(e,t,(0,s.merge)(l,i));o.set(t,n)}return n(r)()}throw new Error(`Unexpected template param ${typeof t}`)}})}function extendedTrace(e){let t="";try{throw new Error}catch(e){if(e.stack){t=e.stack.split("\n").slice(3).join("\n")}}return r=>{try{return e(r)}catch(e){e.stack+=`\n =============\n${t}`;throw e}}}},31272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.program=t.expression=t.statement=t.statements=t.smart=void 0;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function makeStatementFormatter(e){return{code:e=>`/* @babel/template */;\n${e}`,validate:()=>{},unwrap:t=>{return e(t.program.body.slice(1))}}}const n=makeStatementFormatter(e=>{if(e.length>1){return e}else{return e[0]}});t.smart=n;const a=makeStatementFormatter(e=>e);t.statements=a;const i=makeStatementFormatter(e=>{if(e.length===0){throw new Error("Found nothing to return.")}if(e.length>1){throw new Error("Found multiple statements but wanted one")}return e[0]});t.statement=i;const o={code:e=>`(\n${e}\n)`,validate:e=>{if(e.program.body.length>1){throw new Error("Found multiple statements but wanted one")}if(o.unwrap(e).start===0){throw new Error("Parse result included parens.")}},unwrap:({program:e})=>{const[t]=e.body;s.assertExpressionStatement(t);return t.expression}};t.expression=o;const l={code:e=>e,validate:()=>{},unwrap:e=>e.program};t.program=l},36900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=t.program=t.expression=t.statements=t.statement=t.smart=void 0;var s=_interopRequireWildcard(r(31272));var n=_interopRequireDefault(r(22663));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const a=(0,n.default)(s.smart);t.smart=a;const i=(0,n.default)(s.statement);t.statement=i;const o=(0,n.default)(s.statements);t.statements=o;const l=(0,n.default)(s.expression);t.expression=l;const u=(0,n.default)(s.program);t.program=u;var c=Object.assign(a.bind(undefined),{smart:a,statement:i,statements:o,expression:l,program:u,ast:a.ast});t.default=c},80694:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=literalTemplate;var s=r(5447);var n=_interopRequireDefault(r(68278));var a=_interopRequireDefault(r(1143));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function literalTemplate(e,t,r){const{metadata:n,names:i}=buildLiteralData(e,t,r);return t=>{const r={};t.forEach((e,t)=>{r[i[t]]=e});return t=>{const i=(0,s.normalizeReplacements)(t);if(i){Object.keys(i).forEach(e=>{if(Object.prototype.hasOwnProperty.call(r,e)){throw new Error("Unexpected replacement overlap.")}})}return e.unwrap((0,a.default)(n,i?Object.assign(i,r):r))}}}function buildLiteralData(e,t,r){let s;let a;let i;let o="";do{o+="$";const l=buildTemplateCode(t,o);s=l.names;a=new Set(s);i=(0,n.default)(e,e.code(l.code),{parser:r.parser,placeholderWhitelist:new Set(l.names.concat(r.placeholderWhitelist?Array.from(r.placeholderWhitelist):[])),placeholderPattern:r.placeholderPattern,preserveComments:r.preserveComments,syntacticPlaceholders:r.syntacticPlaceholders})}while(i.placeholders.some(e=>e.isDuplicate&&a.has(e.name)));return{metadata:i,names:s}}function buildTemplateCode(e,t){const r=[];let s=e[0];for(let n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.merge=merge;t.validate=validate;t.normalizeReplacements=normalizeReplacements;function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var r={};var s=Object.keys(e);var n,a;for(a=0;a=0)continue;r[n]=e[n]}return r}function merge(e,t){const{placeholderWhitelist:r=e.placeholderWhitelist,placeholderPattern:s=e.placeholderPattern,preserveComments:n=e.preserveComments,syntacticPlaceholders:a=e.syntacticPlaceholders}=t;return{parser:Object.assign({},e.parser,t.parser),placeholderWhitelist:r,placeholderPattern:s,preserveComments:n,syntacticPlaceholders:a}}function validate(e){if(e!=null&&typeof e!=="object"){throw new Error("Unknown template options.")}const t=e||{},{placeholderWhitelist:r,placeholderPattern:s,preserveComments:n,syntacticPlaceholders:a}=t,i=_objectWithoutPropertiesLoose(t,["placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders"]);if(r!=null&&!(r instanceof Set)){throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined")}if(s!=null&&!(s instanceof RegExp)&&s!==false){throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined")}if(n!=null&&typeof n!=="boolean"){throw new Error("'.preserveComments' must be a boolean, null, or undefined")}if(a!=null&&typeof a!=="boolean"){throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined")}if(a===true&&(r!=null||s!=null)){throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible"+" with '.syntacticPlaceholders: true'")}return{parser:i,placeholderWhitelist:r||undefined,placeholderPattern:s==null?undefined:s,preserveComments:n==null?undefined:n,syntacticPlaceholders:a==null?undefined:a}}function normalizeReplacements(e){if(Array.isArray(e)){return e.reduce((e,t,r)=>{e["$"+r]=t;return e},{})}else if(typeof e==="object"||e==null){return e||undefined}throw new Error("Template replacements must be an array, object, null, or undefined")}},68278:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=parseAndBuildMetadata;var s=_interopRequireWildcard(r(63760));var n=r(30865);var a=r(36553);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const i=/^[_$A-Z0-9]+$/;function parseAndBuildMetadata(e,t,r){const{placeholderWhitelist:n,placeholderPattern:a,preserveComments:i,syntacticPlaceholders:o}=r;const l=parseWithCodeFrame(t,r.parser,o);s.removePropertiesDeep(l,{preserveComments:i});e.validate(l);const u={placeholders:[],placeholderNames:new Set};const c={placeholders:[],placeholderNames:new Set};const p={value:undefined};s.traverse(l,placeholderVisitorHandler,{syntactic:u,legacy:c,isLegacyRef:p,placeholderWhitelist:n,placeholderPattern:a,syntacticPlaceholders:o});return Object.assign({ast:l},p.value?c:u)}function placeholderVisitorHandler(e,t,r){var n;let a;if(s.isPlaceholder(e)){if(r.syntacticPlaceholders===false){throw new Error("%%foo%%-style placeholders can't be used when "+"'.syntacticPlaceholders' is false.")}else{a=e.name.name;r.isLegacyRef.value=false}}else if(r.isLegacyRef.value===false||r.syntacticPlaceholders){return}else if(s.isIdentifier(e)||s.isJSXIdentifier(e)){a=e.name;r.isLegacyRef.value=true}else if(s.isStringLiteral(e)){a=e.value;r.isLegacyRef.value=true}else{return}if(!r.isLegacyRef.value&&(r.placeholderPattern!=null||r.placeholderWhitelist!=null)){throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible"+" with '.syntacticPlaceholders: true'")}if(r.isLegacyRef.value&&(r.placeholderPattern===false||!(r.placeholderPattern||i).test(a))&&!((n=r.placeholderWhitelist)==null?void 0:n.has(a))){return}t=t.slice();const{node:o,key:l}=t[t.length-1];let u;if(s.isStringLiteral(e)||s.isPlaceholder(e,{expectedNode:"StringLiteral"})){u="string"}else if(s.isNewExpression(o)&&l==="arguments"||s.isCallExpression(o)&&l==="arguments"||s.isFunction(o)&&l==="params"){u="param"}else if(s.isExpressionStatement(o)&&!s.isPlaceholder(e)){u="statement";t=t.slice(0,-1)}else if(s.isStatement(e)&&s.isPlaceholder(e)){u="statement"}else{u="other"}const{placeholders:c,placeholderNames:p}=r.isLegacyRef.value?r.legacy:r.syntactic;c.push({name:a,type:u,resolve:e=>resolveAncestors(e,t),isDuplicate:p.has(a)});p.add(a)}function resolveAncestors(e,t){let r=e;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=populatePlaceholders;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function populatePlaceholders(e,t){const r=s.cloneNode(e.ast);if(t){e.placeholders.forEach(e=>{if(!Object.prototype.hasOwnProperty.call(t,e.name)){const t=e.name;throw new Error(`Error: No substitution given for "${t}". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['${t}'])}\n - { placeholderPattern: /^${t}$/ }`)}});Object.keys(t).forEach(t=>{if(!e.placeholderNames.has(t)){throw new Error(`Unknown substitution "${t}" given`)}})}e.placeholders.slice().reverse().forEach(e=>{try{applyReplacement(e,r,t&&t[e.name]||null)}catch(t){t.message=`@babel/template placeholder "${e.name}": ${t.message}`;throw t}});return r}function applyReplacement(e,t,r){if(e.isDuplicate){if(Array.isArray(r)){r=r.map(e=>s.cloneNode(e))}else if(typeof r==="object"){r=s.cloneNode(r)}}const{parent:n,key:a,index:i}=e.resolve(t);if(e.type==="string"){if(typeof r==="string"){r=s.stringLiteral(r)}if(!r||!s.isStringLiteral(r)){throw new Error("Expected string substitution")}}else if(e.type==="statement"){if(i===undefined){if(!r){r=s.emptyStatement()}else if(Array.isArray(r)){r=s.blockStatement(r)}else if(typeof r==="string"){r=s.expressionStatement(s.identifier(r))}else if(!s.isStatement(r)){r=s.expressionStatement(r)}}else{if(r&&!Array.isArray(r)){if(typeof r==="string"){r=s.identifier(r)}if(!s.isStatement(r)){r=s.expressionStatement(r)}}}}else if(e.type==="param"){if(typeof r==="string"){r=s.identifier(r)}if(i===undefined)throw new Error("Assertion failure.")}else{if(typeof r==="string"){r=s.identifier(r)}if(Array.isArray(r)){throw new Error("Cannot replace single expression with an array.")}}if(i===undefined){s.validate(n,a,r);n[a]=r}else{const t=n[a].slice();if(e.type==="statement"||e.type==="param"){if(r==null){t.splice(i,1)}else if(Array.isArray(r)){t.splice(i,1,...r)}else{t[i]=r}}else{t[i]=r}s.validate(n,a,t);n[a]=t}}},26522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=stringTemplate;var s=r(5447);var n=_interopRequireDefault(r(68278));var a=_interopRequireDefault(r(1143));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringTemplate(e,t,r){t=e.code(t);let i;return o=>{const l=(0,s.normalizeReplacements)(o);if(!i)i=(0,n.default)(e,t,r);return e.unwrap((0,a.default)(i,l))}}},65711:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.clear=clear;t.clearPath=clearPath;t.clearScope=clearScope;t.scope=t.path=void 0;let r=new WeakMap;t.path=r;let s=new WeakMap;t.scope=s;function clear(){clearPath();clearScope()}function clearPath(){t.path=r=new WeakMap}function clearScope(){t.scope=s=new WeakMap}},58424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(32481));var n=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const a=process.env.NODE_ENV==="test";class TraversalContext{constructor(e,t,r,s){this.queue=null;this.parentPath=s;this.scope=e;this.state=r;this.opts=t}shouldVisit(e){const t=this.opts;if(t.enter||t.exit)return true;if(t[e.type])return true;const r=n.VISITOR_KEYS[e.type];if(!(r==null?void 0:r.length))return false;for(const t of r){if(e[t])return true}return false}create(e,t,r,n){return s.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})}maybeQueue(e,t){if(this.trap){throw new Error("Infinite cycle detected")}if(this.queue){if(t){this.queue.push(e)}else{this.priorityQueue.push(e)}}}visitMultiple(e,t,r){if(e.length===0)return false;const s=[];for(let n=0;n=1e4){this.trap=true}const{node:n}=s;if(t.has(n))continue;if(n)t.add(n);if(s.visit()){r=true;break}if(this.priorityQueue.length){r=this.visitQueue(this.priorityQueue);this.priorityQueue=[];this.queue=e;if(r)break}}for(const t of e){t.popContext()}this.queue=null;return r}visit(e,t){const r=e[t];if(!r)return false;if(Array.isArray(r)){return this.visitMultiple(r,e,t)}else{return this.visitSingle(e,t)}}}t.default=TraversalContext},67267:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;class Hub{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(e,t,r=TypeError){return new r(t)}}t.default=Hub},18442:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=traverse;Object.defineProperty(t,"NodePath",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"Scope",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"Hub",{enumerable:true,get:function(){return u.default}});t.visitors=void 0;var s=_interopRequireDefault(r(58424));var n=_interopRequireWildcard(r(2751));t.visitors=n;var a=_interopRequireWildcard(r(63760));var i=_interopRequireWildcard(r(65711));var o=_interopRequireDefault(r(32481));var l=_interopRequireDefault(r(10660));var u=_interopRequireDefault(r(67267));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function traverse(e,t,r,s,i){if(!e)return;if(!t)t={};if(!t.noScope&&!r){if(e.type!=="Program"&&e.type!=="File"){throw new Error("You must pass a scope and parentPath unless traversing a Program/File. "+`Instead of that you tried to traverse a ${e.type} node without `+"passing scope and parentPath.")}}if(!a.VISITOR_KEYS[e.type]){return}n.explode(t);traverse.node(e,t,r,s,i)}traverse.visitors=n;traverse.verify=n.verify;traverse.explode=n.explode;traverse.cheap=function(e,t){return a.traverseFast(e,t)};traverse.node=function(e,t,r,n,i,o){const l=a.VISITOR_KEYS[e.type];if(!l)return;const u=new s.default(r,t,n,i);for(const t of l){if(o&&o[t])continue;if(u.visit(e,t))return}};traverse.clearNode=function(e,t){a.removeProperties(e,t);i.path.delete(e)};traverse.removeProperties=function(e,t){a.traverseFast(e,traverse.clearNode,t);return e};function hasDenylistedType(e,t){if(e.node.type===t.type){t.has=true;e.stop()}}traverse.hasType=function(e,t,r){if(r==null?void 0:r.includes(e.type))return false;if(e.type===t)return true;const s={has:false,type:t};traverse(e,{noScope:true,denylist:r,enter:hasDenylistedType},null,s);return s.has};traverse.cache=i},38439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.findParent=findParent;t.find=find;t.getFunctionParent=getFunctionParent;t.getStatementParent=getStatementParent;t.getEarliestCommonAncestorFrom=getEarliestCommonAncestorFrom;t.getDeepestCommonAncestorFrom=getDeepestCommonAncestorFrom;t.getAncestry=getAncestry;t.isAncestor=isAncestor;t.isDescendant=isDescendant;t.inType=inType;var s=_interopRequireWildcard(r(63760));var n=_interopRequireDefault(r(32481));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function findParent(e){let t=this;while(t=t.parentPath){if(e(t))return t}return null}function find(e){let t=this;do{if(e(t))return t}while(t=t.parentPath);return null}function getFunctionParent(){return this.findParent(e=>e.isFunction())}function getStatementParent(){let e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()){break}else{e=e.parentPath}}while(e);if(e&&(e.isProgram()||e.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return e}function getEarliestCommonAncestorFrom(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){let n;const a=s.VISITOR_KEYS[e.type];for(const e of r){const r=e[t+1];if(!n){n=r;continue}if(r.listKey&&n.listKey===r.listKey){if(r.keyi){n=r}}return n})}function getDeepestCommonAncestorFrom(e,t){if(!e.length){return this}if(e.length===1){return e[0]}let r=Infinity;let s,n;const a=e.map(e=>{const t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==this);if(t.lengtht===e)}function inType(){let e=this;while(e){for(const t of arguments){if(e.node.type===t)return true}e=e.parentPath}return false}},24517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shareCommentsWithSiblings=shareCommentsWithSiblings;t.addComment=addComment;t.addComments=addComments;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function shareCommentsWithSiblings(){if(typeof this.key==="string")return;const e=this.node;if(!e)return;const t=e.trailingComments;const r=e.leadingComments;if(!t&&!r)return;const s=this.getSibling(this.key-1);const n=this.getSibling(this.key+1);const a=Boolean(s.node);const i=Boolean(n.node);if(a&&!i){s.addComments("trailing",t)}else if(i&&!a){n.addComments("leading",r)}}function addComment(e,t,r){s.addComment(this.node,e,t,r)}function addComments(e,t){s.addComments(this.node,e,t)}},92337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.call=call;t._call=_call;t.isBlacklisted=t.isDenylisted=isDenylisted;t.visit=visit;t.skip=skip;t.skipKey=skipKey;t.stop=stop;t.setScope=setScope;t.setContext=setContext;t.resync=resync;t._resyncParent=_resyncParent;t._resyncKey=_resyncKey;t._resyncList=_resyncList;t._resyncRemoved=_resyncRemoved;t.popContext=popContext;t.pushContext=pushContext;t.setup=setup;t.setKey=setKey;t.requeue=requeue;t._getQueueContexts=_getQueueContexts;var s=_interopRequireDefault(r(18442));var n=r(32481);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function call(e){const t=this.opts;this.debug(e);if(this.node){if(this._call(t[e]))return true}if(this.node){return this._call(t[this.node.type]&&t[this.node.type][e])}return false}function _call(e){if(!e)return false;for(const t of e){if(!t)continue;const e=this.node;if(!e)return true;const r=t.call(this.state,this,this.state);if(r&&typeof r==="object"&&typeof r.then==="function"){throw new Error(`You appear to be using a plugin with an async traversal visitor, `+`which your current version of Babel does not support. `+`If you're using a published plugin, you may need to upgrade `+`your @babel/core version.`)}if(r){throw new Error(`Unexpected return value from visitor method ${t}`)}if(this.node!==e)return true;if(this._traverseFlags>0)return true}return false}function isDenylisted(){var e;const t=(e=this.opts.denylist)!=null?e:this.opts.blacklist;return t&&t.indexOf(this.node.type)>-1}function visit(){if(!this.node){return false}if(this.isDenylisted()){return false}if(this.opts.shouldSkip&&this.opts.shouldSkip(this)){return false}if(this.shouldSkip||this.call("enter")||this.shouldSkip){this.debug("Skip...");return this.shouldStop}this.debug("Recursing into...");s.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys);this.call("exit");return this.shouldStop}function skip(){this.shouldSkip=true}function skipKey(e){if(this.skipKeys==null){this.skipKeys={}}this.skipKeys[e]=true}function stop(){this._traverseFlags|=n.SHOULD_SKIP|n.SHOULD_STOP}function setScope(){if(this.opts&&this.opts.noScope)return;let e=this.parentPath;let t;while(e&&!t){if(e.opts&&e.opts.noScope)return;t=e.scope;e=e.parentPath}this.scope=this.getScope(t);if(this.scope)this.scope.init()}function setContext(e){if(this.skipKeys!=null){this.skipKeys={}}this._traverseFlags=0;if(e){this.context=e;this.state=e.state;this.opts=e.opts}this.setScope();return this}function resync(){if(this.removed)return;this._resyncParent();this._resyncList();this._resyncKey()}function _resyncParent(){if(this.parentPath){this.parent=this.parentPath.node}}function _resyncKey(){if(!this.container)return;if(this.node===this.container[this.key])return;if(Array.isArray(this.container)){for(let e=0;e0){this.setContext(this.contexts[this.contexts.length-1])}else{this.setContext(undefined)}}function pushContext(e){this.contexts.push(e);this.setContext(e)}function setup(e,t,r,s){this.listKey=r;this.container=t;this.parentPath=e||this.parentPath;this.setKey(s)}function setKey(e){var t;this.key=e;this.node=this.container[this.key];this.type=(t=this.node)==null?void 0:t.type}function requeue(e=this){if(e.removed)return;const t=this.contexts;for(const r of t){r.maybeQueue(e)}}function _getQueueContexts(){let e=this;let t=this.contexts;while(!t.length){e=e.parentPath;if(!e)break;t=e.contexts}return t}},63797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toComputedKey=toComputedKey;t.ensureBlock=ensureBlock;t.arrowFunctionToShadowed=arrowFunctionToShadowed;t.unwrapFunctionEnvironment=unwrapFunctionEnvironment;t.arrowFunctionToExpression=arrowFunctionToExpression;var s=_interopRequireWildcard(r(63760));var n=_interopRequireDefault(r(98733));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function toComputedKey(){const e=this.node;let t;if(this.isMemberExpression()){t=e.property}else if(this.isProperty()||this.isMethod()){t=e.key}else{throw new ReferenceError("todo")}if(!e.computed){if(s.isIdentifier(t))t=s.stringLiteral(t.name)}return t}function ensureBlock(){const e=this.get("body");const t=e.node;if(Array.isArray(e)){throw new Error("Can't convert array path to a block statement")}if(!t){throw new Error("Can't convert node without a body")}if(e.isBlockStatement()){return t}const r=[];let n="body";let a;let i;if(e.isStatement()){i="body";a=0;r.push(e.node)}else{n+=".body.0";if(this.isFunction()){a="argument";r.push(s.returnStatement(e.node))}else{a="expression";r.push(s.expressionStatement(e.node))}}this.node.body=s.blockStatement(r);const o=this.get(n);e.setup(o,i?o.node[i]:o.node,i,a);return this.node}function arrowFunctionToShadowed(){if(!this.isArrowFunctionExpression())return;this.arrowFunctionToExpression()}function unwrapFunctionEnvironment(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration()){throw this.buildCodeFrameError("Can only unwrap the environment of a function.")}hoistFunctionEnvironment(this)}function arrowFunctionToExpression({allowInsertArrow:e=true,specCompliant:t=false}={}){if(!this.isArrowFunctionExpression()){throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.")}const r=hoistFunctionEnvironment(this,t,e);this.ensureBlock();this.node.type="FunctionExpression";if(t){const e=r?null:this.parentPath.scope.generateUidIdentifier("arrowCheckId");if(e){this.parentPath.scope.push({id:e,init:s.objectExpression([])})}this.get("body").unshiftContainer("body",s.expressionStatement(s.callExpression(this.hub.addHelper("newArrowCheck"),[s.thisExpression(),e?s.identifier(e.name):s.identifier(r)])));this.replaceWith(s.callExpression(s.memberExpression((0,n.default)(this,true)||this.node,s.identifier("bind")),[e?s.identifier(e.name):s.thisExpression()]))}}function hoistFunctionEnvironment(e,t=false,r=true){const n=e.findParent(e=>{return e.isFunction()&&!e.isArrowFunctionExpression()||e.isProgram()||e.isClassProperty({static:false})});const a=(n==null?void 0:n.node.kind)==="constructor";if(n.isClassProperty()){throw e.buildCodeFrameError("Unable to transform arrow inside class property")}const{thisPaths:i,argumentsPaths:o,newTargetPaths:l,superProps:u,superCalls:c}=getScopeInformation(e);if(a&&c.length>0){if(!r){throw c[0].buildCodeFrameError("Unable to handle nested super() usage in arrow")}const e=[];n.traverse({Function(e){if(e.isArrowFunctionExpression())return;e.skip()},ClassProperty(e){e.skip()},CallExpression(t){if(!t.get("callee").isSuper())return;e.push(t)}});const t=getSuperBinding(n);e.forEach(e=>{const r=s.identifier(t);r.loc=e.node.callee.loc;e.get("callee").replaceWith(r)})}if(o.length>0){const e=getBinding(n,"arguments",()=>s.identifier("arguments"));o.forEach(t=>{const r=s.identifier(e);r.loc=t.node.loc;t.replaceWith(r)})}if(l.length>0){const e=getBinding(n,"newtarget",()=>s.metaProperty(s.identifier("new"),s.identifier("target")));l.forEach(t=>{const r=s.identifier(e);r.loc=t.node.loc;t.replaceWith(r)})}if(u.length>0){if(!r){throw u[0].buildCodeFrameError("Unable to handle nested super.prop usage")}const e=u.reduce((e,t)=>e.concat(standardizeSuperProperty(t)),[]);e.forEach(e=>{const t=e.node.computed?"":e.get("property").node.name;const r=e.parentPath.isAssignmentExpression({left:e.node});const a=e.parentPath.isCallExpression({callee:e.node});const o=getSuperPropBinding(n,r,t);const l=[];if(e.node.computed){l.push(e.get("property").node)}if(r){const t=e.parentPath.node.right;l.push(t)}const u=s.callExpression(s.identifier(o),l);if(a){e.parentPath.unshiftContainer("arguments",s.thisExpression());e.replaceWith(s.memberExpression(u,s.identifier("call")));i.push(e.parentPath.get("arguments.0"))}else if(r){e.parentPath.replaceWith(u)}else{e.replaceWith(u)}})}let p;if(i.length>0||t){p=getThisBinding(n,a);if(!t||a&&hasSuperClass(n)){i.forEach(e=>{const t=e.isJSX()?s.jsxIdentifier(p):s.identifier(p);t.loc=e.node.loc;e.replaceWith(t)});if(t)p=null}}return p}function standardizeSuperProperty(e){if(e.parentPath.isAssignmentExpression()&&e.parentPath.node.operator!=="="){const t=e.parentPath;const r=t.node.operator.slice(0,-1);const n=t.node.right;t.node.operator="=";if(e.node.computed){const a=e.scope.generateDeclaredUidIdentifier("tmp");t.get("left").replaceWith(s.memberExpression(e.node.object,s.assignmentExpression("=",a,e.node.property),true));t.get("right").replaceWith(s.binaryExpression(r,s.memberExpression(e.node.object,s.identifier(a.name),true),n))}else{t.get("left").replaceWith(s.memberExpression(e.node.object,e.node.property));t.get("right").replaceWith(s.binaryExpression(r,s.memberExpression(e.node.object,s.identifier(e.node.property.name)),n))}return[t.get("left"),t.get("right").get("left")]}else if(e.parentPath.isUpdateExpression()){const t=e.parentPath;const r=e.scope.generateDeclaredUidIdentifier("tmp");const n=e.node.computed?e.scope.generateDeclaredUidIdentifier("prop"):null;const a=[s.assignmentExpression("=",r,s.memberExpression(e.node.object,n?s.assignmentExpression("=",n,e.node.property):e.node.property,e.node.computed)),s.assignmentExpression("=",s.memberExpression(e.node.object,n?s.identifier(n.name):e.node.property,e.node.computed),s.binaryExpression("+",s.identifier(r.name),s.numericLiteral(1)))];if(!e.parentPath.node.prefix){a.push(s.identifier(r.name))}t.replaceWith(s.sequenceExpression(a));const i=t.get("expressions.0.right");const o=t.get("expressions.1.left");return[i,o]}return[e]}function hasSuperClass(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}function getThisBinding(e,t){return getBinding(e,"this",r=>{if(!t||!hasSuperClass(e))return s.thisExpression();const n=new WeakSet;e.traverse({Function(e){if(e.isArrowFunctionExpression())return;e.skip()},ClassProperty(e){e.skip()},CallExpression(e){if(!e.get("callee").isSuper())return;if(n.has(e.node))return;n.add(e.node);e.replaceWithMultiple([e.node,s.assignmentExpression("=",s.identifier(r),s.identifier("this"))])}})})}function getSuperBinding(e){return getBinding(e,"supercall",()=>{const t=e.scope.generateUidIdentifier("args");return s.arrowFunctionExpression([s.restElement(t)],s.callExpression(s.super(),[s.spreadElement(s.identifier(t.name))]))})}function getSuperPropBinding(e,t,r){const n=t?"set":"get";return getBinding(e,`superprop_${n}:${r||""}`,()=>{const n=[];let a;if(r){a=s.memberExpression(s.super(),s.identifier(r))}else{const t=e.scope.generateUidIdentifier("prop");n.unshift(t);a=s.memberExpression(s.super(),s.identifier(t.name),true)}if(t){const t=e.scope.generateUidIdentifier("value");n.push(t);a=s.assignmentExpression("=",a,s.identifier(t.name))}return s.arrowFunctionExpression(n,a)})}function getBinding(e,t,r){const s="binding:"+t;let n=e.getData(s);if(!n){const a=e.scope.generateUidIdentifier(t);n=a.name;e.setData(s,n);e.scope.push({id:a,init:r(n)})}return n}function getScopeInformation(e){const t=[];const r=[];const s=[];const n=[];const a=[];e.traverse({ClassProperty(e){e.skip()},Function(e){if(e.isArrowFunctionExpression())return;e.skip()},ThisExpression(e){t.push(e)},JSXIdentifier(e){if(e.node.name!=="this")return;if(!e.parentPath.isJSXMemberExpression({object:e.node})&&!e.parentPath.isJSXOpeningElement({name:e.node})){return}t.push(e)},CallExpression(e){if(e.get("callee").isSuper())a.push(e)},MemberExpression(e){if(e.get("object").isSuper())n.push(e)},ReferencedIdentifier(e){if(e.node.name!=="arguments")return;r.push(e)},MetaProperty(e){if(!e.get("meta").isIdentifier({name:"new"}))return;if(!e.get("property").isIdentifier({name:"target"}))return;s.push(e)}});return{thisPaths:t,argumentsPaths:r,newTargetPaths:s,superProps:n,superCalls:a}}},81290:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.evaluateTruthy=evaluateTruthy;t.evaluate=evaluate;const r=["String","Number","Math"];const s=["random"];function evaluateTruthy(){const e=this.evaluate();if(e.confident)return!!e.value}function deopt(e,t){if(!t.confident)return;t.deoptPath=e;t.confident=false}function evaluateCached(e,t){const{node:r}=e;const{seen:s}=t;if(s.has(r)){const n=s.get(r);if(n.resolved){return n.value}else{deopt(e,t);return}}else{const n={resolved:false};s.set(r,n);const a=_evaluate(e,t);if(t.confident){n.resolved=true;n.value=a}return a}}function _evaluate(e,t){if(!t.confident)return;const{node:n}=e;if(e.isSequenceExpression()){const r=e.get("expressions");return evaluateCached(r[r.length-1],t)}if(e.isStringLiteral()||e.isNumericLiteral()||e.isBooleanLiteral()){return n.value}if(e.isNullLiteral()){return null}if(e.isTemplateLiteral()){return evaluateQuasis(e,n.quasis,t)}if(e.isTaggedTemplateExpression()&&e.get("tag").isMemberExpression()){const r=e.get("tag.object");const{node:{name:s}}=r;const a=e.get("tag.property");if(r.isIdentifier()&&s==="String"&&!e.scope.getBinding(s,true)&&a.isIdentifier&&a.node.name==="raw"){return evaluateQuasis(e,n.quasi.quasis,t,true)}}if(e.isConditionalExpression()){const r=evaluateCached(e.get("test"),t);if(!t.confident)return;if(r){return evaluateCached(e.get("consequent"),t)}else{return evaluateCached(e.get("alternate"),t)}}if(e.isExpressionWrapper()){return evaluateCached(e.get("expression"),t)}if(e.isMemberExpression()&&!e.parentPath.isCallExpression({callee:n})){const t=e.get("property");const r=e.get("object");if(r.isLiteral()&&t.isIdentifier()){const e=r.node.value;const s=typeof e;if(s==="number"||s==="string"){return e[t.node.name]}}}if(e.isReferencedIdentifier()){const r=e.scope.getBinding(n.name);if(r&&r.constantViolations.length>0){return deopt(r.path,t)}if(r&&e.node.start":return r>s;case"<=":return r<=s;case">=":return r>=s;case"==":return r==s;case"!=":return r!=s;case"===":return r===s;case"!==":return r!==s;case"|":return r|s;case"&":return r&s;case"^":return r^s;case"<<":return r<>":return r>>s;case">>>":return r>>>s}}if(e.isCallExpression()){const a=e.get("callee");let i;let o;if(a.isIdentifier()&&!e.scope.getBinding(a.node.name,true)&&r.indexOf(a.node.name)>=0){o=global[n.callee.name]}if(a.isMemberExpression()){const e=a.get("object");const t=a.get("property");if(e.isIdentifier()&&t.isIdentifier()&&r.indexOf(e.node.name)>=0&&s.indexOf(t.node.name)<0){i=global[e.node.name];o=i[t.node.name]}if(e.isLiteral()&&t.isIdentifier()){const r=typeof e.node.value;if(r==="string"||r==="number"){i=e.node.value;o=i[t.node.name]}}}if(o){const r=e.get("arguments").map(e=>evaluateCached(e,t));if(!t.confident)return;return o.apply(i,r)}}deopt(e,t)}function evaluateQuasis(e,t,r,s=false){let n="";let a=0;const i=e.get("expressions");for(const e of t){if(!r.confident)break;n+=s?e.value.raw:e.value.cooked;const t=i[a++];if(t)n+=String(evaluateCached(t,r))}if(!r.confident)return;return n}function evaluate(){const e={confident:true,deoptPath:null,seen:new Map};let t=evaluateCached(this,e);if(!e.confident)t=undefined;return{confident:e.confident,deopt:e.deoptPath,value:t}}},45971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getOpposite=getOpposite;t.getCompletionRecords=getCompletionRecords;t.getSibling=getSibling;t.getPrevSibling=getPrevSibling;t.getNextSibling=getNextSibling;t.getAllNextSiblings=getAllNextSiblings;t.getAllPrevSiblings=getAllPrevSiblings;t.get=get;t._getKey=_getKey;t._getPattern=_getPattern;t.getBindingIdentifiers=getBindingIdentifiers;t.getOuterBindingIdentifiers=getOuterBindingIdentifiers;t.getBindingIdentifierPaths=getBindingIdentifierPaths;t.getOuterBindingIdentifierPaths=getOuterBindingIdentifierPaths;var s=_interopRequireDefault(r(32481));var n=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getOpposite(){if(this.key==="left"){return this.getSibling("right")}else if(this.key==="right"){return this.getSibling("left")}}function addCompletionRecords(e,t){if(e)return t.concat(e.getCompletionRecords());return t}function findBreak(e){let t;if(!Array.isArray(e)){e=[e]}for(const n of e){if(n.isDoExpression()||n.isProgram()||n.isBlockStatement()||n.isCatchClause()||n.isLabeledStatement()){t=findBreak(n.get("body"))}else if(n.isIfStatement()){var r;t=(r=findBreak(n.get("consequent")))!=null?r:findBreak(n.get("alternate"))}else if(n.isTryStatement()){var s;t=(s=findBreak(n.get("block")))!=null?s:findBreak(n.get("handler"))}else if(n.isBreakStatement()){t=n}if(t){return t}}return null}function completionRecordForSwitch(e,t){let r=true;for(let s=e.length-1;s>=0;s--){const n=e[s];const a=n.get("consequent");let i=findBreak(a);if(i){while(i.key===0&&i.parentPath.isBlockStatement()){i=i.parentPath}const e=i.getPrevSibling();if(i.key>0&&(e.isExpressionStatement()||e.isBlockStatement())){t=addCompletionRecords(e,t);i.remove()}else{i.replaceWith(i.scope.buildUndefinedNode());t=addCompletionRecords(i,t)}}else if(r){const e=t=>!t.isBlockStatement()||t.get("body").some(e);const s=a.some(e);if(s){t=addCompletionRecords(a[a.length-1],t);r=false}}}return t}function getCompletionRecords(){let e=[];if(this.isIfStatement()){e=addCompletionRecords(this.get("consequent"),e);e=addCompletionRecords(this.get("alternate"),e)}else if(this.isDoExpression()||this.isFor()||this.isWhile()){e=addCompletionRecords(this.get("body"),e)}else if(this.isProgram()||this.isBlockStatement()){e=addCompletionRecords(this.get("body").pop(),e)}else if(this.isFunction()){return this.get("body").getCompletionRecords()}else if(this.isTryStatement()){e=addCompletionRecords(this.get("block"),e);e=addCompletionRecords(this.get("handler"),e)}else if(this.isCatchClause()){e=addCompletionRecords(this.get("body"),e)}else if(this.isSwitchStatement()){e=completionRecordForSwitch(this.get("cases"),e)}else{e.push(this)}return e}function getSibling(e){return s.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)}function getPrevSibling(){return this.getSibling(this.key-1)}function getNextSibling(){return this.getSibling(this.key+1)}function getAllNextSiblings(){let e=this.key;let t=this.getSibling(++e);const r=[];while(t.node){r.push(t);t=this.getSibling(++e)}return r}function getAllPrevSiblings(){let e=this.key;let t=this.getSibling(--e);const r=[];while(t.node){r.push(t);t=this.getSibling(--e)}return r}function get(e,t=true){if(t===true)t=this.context;const r=e.split(".");if(r.length===1){return this._getKey(e,t)}else{return this._getPattern(r,t)}}function _getKey(e,t){const r=this.node;const n=r[e];if(Array.isArray(n)){return n.map((a,i)=>{return s.default.get({listKey:e,parentPath:this,parent:r,container:n,key:i}).setContext(t)})}else{return s.default.get({parentPath:this,parent:r,container:r,key:e}).setContext(t)}}function _getPattern(e,t){let r=this;for(const s of e){if(s==="."){r=r.parentPath}else{if(Array.isArray(r)){r=r[s]}else{r=r.get(s,t)}}}return r}function getBindingIdentifiers(e){return n.getBindingIdentifiers(this.node,e)}function getOuterBindingIdentifiers(e){return n.getOuterBindingIdentifiers(this.node,e)}function getBindingIdentifierPaths(e=false,t=false){const r=this;let s=[].concat(r);const a=Object.create(null);while(s.length){const r=s.shift();if(!r)continue;if(!r.node)continue;const i=n.getBindingIdentifiers.keys[r.node.type];if(r.isIdentifier()){if(e){const e=a[r.node.name]=a[r.node.name]||[];e.push(r)}else{a[r.node.name]=r}continue}if(r.isExportDeclaration()){const e=r.get("declaration");if(e.isDeclaration()){s.push(e)}continue}if(t){if(r.isFunctionDeclaration()){s.push(r.get("id"));continue}if(r.isFunctionExpression()){continue}}if(i){for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=t.SHOULD_SKIP=t.SHOULD_STOP=t.REMOVED=void 0;var s=_interopRequireWildcard(r(43859));var n=_interopRequireDefault(r(31185));var a=_interopRequireDefault(r(18442));var i=_interopRequireDefault(r(10660));var o=_interopRequireWildcard(r(63760));var l=r(65711);var u=_interopRequireDefault(r(43187));var c=_interopRequireWildcard(r(38439));var p=_interopRequireWildcard(r(64111));var f=_interopRequireWildcard(r(52352));var d=_interopRequireWildcard(r(81290));var y=_interopRequireWildcard(r(63797));var h=_interopRequireWildcard(r(82851));var m=_interopRequireWildcard(r(92337));var g=_interopRequireWildcard(r(53178));var b=_interopRequireWildcard(r(61625));var x=_interopRequireWildcard(r(45971));var v=_interopRequireWildcard(r(24517));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const E=(0,n.default)("babel");const T=1<<0;t.REMOVED=T;const S=1<<1;t.SHOULD_STOP=S;const P=1<<2;t.SHOULD_SKIP=P;class NodePath{constructor(e,t){this.contexts=[];this.state=null;this.opts=null;this._traverseFlags=0;this.skipKeys=null;this.parentPath=null;this.container=null;this.listKey=null;this.key=null;this.node=null;this.type=null;this.parent=t;this.hub=e;this.data=null;this.context=null;this.scope=null}static get({hub:e,parentPath:t,parent:r,container:s,listKey:n,key:a}){if(!e&&t){e=t.hub}if(!r){throw new Error("To get a node path the parent needs to exist")}const i=s[a];let o=l.path.get(r);if(!o){o=new Map;l.path.set(r,o)}let u=o.get(i);if(!u){u=new NodePath(e,r);if(i)o.set(i,u)}u.setup(t,s,n,a);return u}getScope(e){return this.isScope()?new i.default(this):e}setData(e,t){if(this.data==null){this.data=Object.create(null)}return this.data[e]=t}getData(e,t){if(this.data==null){this.data=Object.create(null)}let r=this.data[e];if(r===undefined&&t!==undefined)r=this.data[e]=t;return r}buildCodeFrameError(e,t=SyntaxError){return this.hub.buildError(this.node,e,t)}traverse(e,t){(0,a.default)(this.node,e,this.scope,t,this)}set(e,t){o.validate(this.node,e,t);this.node[e]=t}getPathLocation(){const e=[];let t=this;do{let r=t.key;if(t.inList)r=`${t.listKey}[${r}]`;e.unshift(r)}while(t=t.parentPath);return e.join(".")}debug(e){if(!E.enabled)return;E(`${this.getPathLocation()} ${this.type}: ${e}`)}toString(){return(0,u.default)(this.node).code}get inList(){return!!this.listKey}set inList(e){if(!e){this.listKey=null}}get parentKey(){return this.listKey||this.key}get shouldSkip(){return!!(this._traverseFlags&P)}set shouldSkip(e){if(e){this._traverseFlags|=P}else{this._traverseFlags&=~P}}get shouldStop(){return!!(this._traverseFlags&S)}set shouldStop(e){if(e){this._traverseFlags|=S}else{this._traverseFlags&=~S}}get removed(){return!!(this._traverseFlags&T)}set removed(e){if(e){this._traverseFlags|=T}else{this._traverseFlags&=~T}}}t.default=NodePath;Object.assign(NodePath.prototype,c,p,f,d,y,h,m,g,b,x,v);for(const e of o.TYPES){const t=`is${e}`;const r=o[t];NodePath.prototype[t]=function(e){return r(this.node,e)};NodePath.prototype[`assert${e}`]=function(t){if(!r(this.node,t)){throw new TypeError(`Expected node path of type ${e}`)}}}for(const e of Object.keys(s)){if(e[0]==="_")continue;if(o.TYPES.indexOf(e)<0)o.TYPES.push(e);const t=s[e];NodePath.prototype[`is${e}`]=function(e){return t.checkPath(this,e)}}},64111:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getTypeAnnotation=getTypeAnnotation;t._getTypeAnnotation=_getTypeAnnotation;t.isBaseType=isBaseType;t.couldBeBaseType=couldBeBaseType;t.baseTypeStrictlyMatches=baseTypeStrictlyMatches;t.isGenericType=isGenericType;var s=_interopRequireWildcard(r(87118));var n=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function getTypeAnnotation(){if(this.typeAnnotation)return this.typeAnnotation;let e=this._getTypeAnnotation()||n.anyTypeAnnotation();if(n.isTypeAnnotation(e))e=e.typeAnnotation;return this.typeAnnotation=e}const a=new WeakSet;function _getTypeAnnotation(){const e=this.node;if(!e){if(this.key==="init"&&this.parentPath.isVariableDeclarator()){const e=this.parentPath.parentPath;const t=e.parentPath;if(e.key==="left"&&t.isForInStatement()){return n.stringTypeAnnotation()}if(e.key==="left"&&t.isForOfStatement()){return n.anyTypeAnnotation()}return n.voidTypeAnnotation()}else{return}}if(e.typeAnnotation){return e.typeAnnotation}if(a.has(e)){return}a.add(e);try{var t;let r=s[e.type];if(r){return r.call(this,e)}r=s[this.parentPath.type];if((t=r)==null?void 0:t.validParent){return this.parentPath.getTypeAnnotation()}}finally{a.delete(e)}}function isBaseType(e,t){return _isBaseType(e,this.getTypeAnnotation(),t)}function _isBaseType(e,t,r){if(e==="string"){return n.isStringTypeAnnotation(t)}else if(e==="number"){return n.isNumberTypeAnnotation(t)}else if(e==="boolean"){return n.isBooleanTypeAnnotation(t)}else if(e==="any"){return n.isAnyTypeAnnotation(t)}else if(e==="mixed"){return n.isMixedTypeAnnotation(t)}else if(e==="empty"){return n.isEmptyTypeAnnotation(t)}else if(e==="void"){return n.isVoidTypeAnnotation(t)}else{if(r){return false}else{throw new Error(`Unknown base type ${e}`)}}}function couldBeBaseType(e){const t=this.getTypeAnnotation();if(n.isAnyTypeAnnotation(t))return true;if(n.isUnionTypeAnnotation(t)){for(const r of t.types){if(n.isAnyTypeAnnotation(r)||_isBaseType(e,r,true)){return true}}return false}else{return _isBaseType(e,t,true)}}function baseTypeStrictlyMatches(e){const t=this.getTypeAnnotation();e=e.getTypeAnnotation();if(!n.isAnyTypeAnnotation(t)&&n.isFlowBaseAnnotation(t)){return e.type===t.type}}function isGenericType(e){const t=this.getTypeAnnotation();return n.isGenericTypeAnnotation(t)&&n.isIdentifier(t.id,{name:e})}},76722:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=_default;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _default(e){if(!this.isReferenced())return;const t=this.scope.getBinding(e.name);if(t){if(t.identifier.typeAnnotation){return t.identifier.typeAnnotation}else{return getTypeAnnotationBindingConstantViolations(t,this,e.name)}}if(e.name==="undefined"){return s.voidTypeAnnotation()}else if(e.name==="NaN"||e.name==="Infinity"){return s.numberTypeAnnotation()}else if(e.name==="arguments"){}}function getTypeAnnotationBindingConstantViolations(e,t,r){const n=[];const a=[];let i=getConstantViolationsBefore(e,t,a);const o=getConditionalAnnotation(e,t,r);if(o){const t=getConstantViolationsBefore(e,o.ifStatement);i=i.filter(e=>t.indexOf(e)<0);n.push(o.typeAnnotation)}if(i.length){i=i.concat(a);for(const e of i){n.push(e.getTypeAnnotation())}}if(!n.length){return}if(s.isTSTypeAnnotation(n[0])&&s.createTSUnionType){return s.createTSUnionType(n)}if(s.createFlowUnionType){return s.createFlowUnionType(n)}return s.createUnionTypeAnnotation(n)}function getConstantViolationsBefore(e,t,r){const s=e.constantViolations.slice();s.unshift(e.path);return s.filter(e=>{e=e.resolve();const s=e._guessExecutionStatusRelativeTo(t);if(r&&s==="unknown")r.push(e);return s==="before"})}function inferAnnotationFromBinaryExpression(e,t){const r=t.node.operator;const n=t.get("right").resolve();const a=t.get("left").resolve();let i;if(a.isIdentifier({name:e})){i=n}else if(n.isIdentifier({name:e})){i=a}if(i){if(r==="==="){return i.getTypeAnnotation()}if(s.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0){return s.numberTypeAnnotation()}return}if(r!=="==="&&r!=="==")return;let o;let l;if(a.isUnaryExpression({operator:"typeof"})){o=a;l=n}else if(n.isUnaryExpression({operator:"typeof"})){o=n;l=a}if(!o)return;if(!o.get("argument").isIdentifier({name:e}))return;l=l.resolve();if(!l.isLiteral())return;const u=l.node.value;if(typeof u!=="string")return;return s.createTypeAnnotationBasedOnTypeof(u)}function getParentConditionalPath(e,t,r){let s;while(s=t.parentPath){if(s.isIfStatement()||s.isConditionalExpression()){if(t.key==="test"){return}return s}if(s.isFunction()){if(s.parentPath.scope.getBinding(r)!==e)return}t=s}}function getConditionalAnnotation(e,t,r){const n=getParentConditionalPath(e,t,r);if(!n)return;const a=n.get("test");const i=[a];const o=[];for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VariableDeclarator=VariableDeclarator;t.TypeCastExpression=TypeCastExpression;t.NewExpression=NewExpression;t.TemplateLiteral=TemplateLiteral;t.UnaryExpression=UnaryExpression;t.BinaryExpression=BinaryExpression;t.LogicalExpression=LogicalExpression;t.ConditionalExpression=ConditionalExpression;t.SequenceExpression=SequenceExpression;t.ParenthesizedExpression=ParenthesizedExpression;t.AssignmentExpression=AssignmentExpression;t.UpdateExpression=UpdateExpression;t.StringLiteral=StringLiteral;t.NumericLiteral=NumericLiteral;t.BooleanLiteral=BooleanLiteral;t.NullLiteral=NullLiteral;t.RegExpLiteral=RegExpLiteral;t.ObjectExpression=ObjectExpression;t.ArrayExpression=ArrayExpression;t.RestElement=RestElement;t.ClassDeclaration=t.ClassExpression=t.FunctionDeclaration=t.ArrowFunctionExpression=t.FunctionExpression=Func;t.CallExpression=CallExpression;t.TaggedTemplateExpression=TaggedTemplateExpression;Object.defineProperty(t,"Identifier",{enumerable:true,get:function(){return n.default}});var s=_interopRequireWildcard(r(63760));var n=_interopRequireDefault(r(76722));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function VariableDeclarator(){var e;const t=this.get("id");if(!t.isIdentifier())return;const r=this.get("init");let s=r.getTypeAnnotation();if(((e=s)==null?void 0:e.type)==="AnyTypeAnnotation"){if(r.isCallExpression()&&r.get("callee").isIdentifier({name:"Array"})&&!r.scope.hasBinding("Array",true)){s=ArrayExpression()}}return s}function TypeCastExpression(e){return e.typeAnnotation}TypeCastExpression.validParent=true;function NewExpression(e){if(this.get("callee").isIdentifier()){return s.genericTypeAnnotation(e.callee)}}function TemplateLiteral(){return s.stringTypeAnnotation()}function UnaryExpression(e){const t=e.operator;if(t==="void"){return s.voidTypeAnnotation()}else if(s.NUMBER_UNARY_OPERATORS.indexOf(t)>=0){return s.numberTypeAnnotation()}else if(s.STRING_UNARY_OPERATORS.indexOf(t)>=0){return s.stringTypeAnnotation()}else if(s.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0){return s.booleanTypeAnnotation()}}function BinaryExpression(e){const t=e.operator;if(s.NUMBER_BINARY_OPERATORS.indexOf(t)>=0){return s.numberTypeAnnotation()}else if(s.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0){return s.booleanTypeAnnotation()}else if(t==="+"){const e=this.get("right");const t=this.get("left");if(t.isBaseType("number")&&e.isBaseType("number")){return s.numberTypeAnnotation()}else if(t.isBaseType("string")||e.isBaseType("string")){return s.stringTypeAnnotation()}return s.unionTypeAnnotation([s.stringTypeAnnotation(),s.numberTypeAnnotation()])}}function LogicalExpression(){const e=[this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()];if(s.isTSTypeAnnotation(e[0])&&s.createTSUnionType){return s.createTSUnionType(e)}if(s.createFlowUnionType){return s.createFlowUnionType(e)}return s.createUnionTypeAnnotation(e)}function ConditionalExpression(){const e=[this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()];if(s.isTSTypeAnnotation(e[0])&&s.createTSUnionType){return s.createTSUnionType(e)}if(s.createFlowUnionType){return s.createFlowUnionType(e)}return s.createUnionTypeAnnotation(e)}function SequenceExpression(){return this.get("expressions").pop().getTypeAnnotation()}function ParenthesizedExpression(){return this.get("expression").getTypeAnnotation()}function AssignmentExpression(){return this.get("right").getTypeAnnotation()}function UpdateExpression(e){const t=e.operator;if(t==="++"||t==="--"){return s.numberTypeAnnotation()}}function StringLiteral(){return s.stringTypeAnnotation()}function NumericLiteral(){return s.numberTypeAnnotation()}function BooleanLiteral(){return s.booleanTypeAnnotation()}function NullLiteral(){return s.nullLiteralTypeAnnotation()}function RegExpLiteral(){return s.genericTypeAnnotation(s.identifier("RegExp"))}function ObjectExpression(){return s.genericTypeAnnotation(s.identifier("Object"))}function ArrayExpression(){return s.genericTypeAnnotation(s.identifier("Array"))}function RestElement(){return ArrayExpression()}RestElement.validParent=true;function Func(){return s.genericTypeAnnotation(s.identifier("Function"))}const a=s.buildMatchMemberExpression("Array.from");const i=s.buildMatchMemberExpression("Object.keys");const o=s.buildMatchMemberExpression("Object.values");const l=s.buildMatchMemberExpression("Object.entries");function CallExpression(){const{callee:e}=this.node;if(i(e)){return s.arrayTypeAnnotation(s.stringTypeAnnotation())}else if(a(e)||o(e)){return s.arrayTypeAnnotation(s.anyTypeAnnotation())}else if(l(e)){return s.arrayTypeAnnotation(s.tupleTypeAnnotation([s.stringTypeAnnotation(),s.anyTypeAnnotation()]))}return resolveCall(this.get("callee"))}function TaggedTemplateExpression(){return resolveCall(this.get("tag"))}function resolveCall(e){e=e.resolve();if(e.isFunction()){if(e.is("async")){if(e.is("generator")){return s.genericTypeAnnotation(s.identifier("AsyncIterator"))}else{return s.genericTypeAnnotation(s.identifier("Promise"))}}else{if(e.node.returnType){return e.node.returnType}else{}}}}},82851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.matchesPattern=matchesPattern;t.has=has;t.isStatic=isStatic;t.isnt=isnt;t.equals=equals;t.isNodeType=isNodeType;t.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;t.canSwapBetweenExpressionAndStatement=canSwapBetweenExpressionAndStatement;t.isCompletionRecord=isCompletionRecord;t.isStatementOrBlock=isStatementOrBlock;t.referencesImport=referencesImport;t.getSource=getSource;t.willIMaybeExecuteBefore=willIMaybeExecuteBefore;t._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;t._guessExecutionStatusRelativeToDifferentFunctions=_guessExecutionStatusRelativeToDifferentFunctions;t.resolve=resolve;t._resolve=_resolve;t.isConstantExpression=isConstantExpression;t.isInStrictMode=isInStrictMode;t.is=void 0;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function matchesPattern(e,t){return s.matchesPattern(this.node,e,t)}function has(e){const t=this.node&&this.node[e];if(t&&Array.isArray(t)){return!!t.length}else{return!!t}}function isStatic(){return this.scope.isStatic(this.node)}const n=has;t.is=n;function isnt(e){return!this.has(e)}function equals(e,t){return this.node[e]===t}function isNodeType(e){return s.isType(this.type,e)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function canSwapBetweenExpressionAndStatement(e){if(this.key!=="body"||!this.parentPath.isArrowFunctionExpression()){return false}if(this.isExpression()){return s.isBlockStatement(e)}else if(this.isBlockStatement()){return s.isExpression(e)}return false}function isCompletionRecord(e){let t=this;let r=true;do{const s=t.container;if(t.isFunction()&&!r){return!!e}r=false;if(Array.isArray(s)&&t.key!==s.length-1){return false}}while((t=t.parentPath)&&!t.isProgram());return true}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||s.isBlockStatement(this.container)){return false}else{return s.STATEMENT_OR_BLOCK_KEYS.includes(this.key)}}function referencesImport(e,t){if(!this.isReferencedIdentifier())return false;const r=this.scope.getBinding(this.node.name);if(!r||r.kind!=="module")return false;const s=r.path;const n=s.parentPath;if(!n.isImportDeclaration())return false;if(n.node.source.value===e){if(!t)return true}else{return false}if(s.isImportDefaultSpecifier()&&t==="default"){return true}if(s.isImportNamespaceSpecifier()&&t==="*"){return true}if(s.isImportSpecifier()&&s.node.imported.name===t){return true}return false}function getSource(){const e=this.node;if(e.end){const t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""}function willIMaybeExecuteBefore(e){return this._guessExecutionStatusRelativeTo(e)!=="after"}function getOuterFunction(e){return(e.scope.getFunctionParent()||e.scope.getProgramParent()).path}function isExecutionUncertain(e,t){switch(e){case"LogicalExpression":return t==="right";case"ConditionalExpression":case"IfStatement":return t==="consequent"||t==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return t==="body";case"ForStatement":return t==="body"||t==="update";case"SwitchStatement":return t==="cases";case"TryStatement":return t==="handler";case"AssignmentPattern":return t==="right";case"OptionalMemberExpression":return t==="property";case"OptionalCallExpression":return t==="arguments";default:return false}}function isExecutionUncertainInList(e,t){for(let r=0;r=0)return"after";if(r.this.indexOf(e)>=0)return"before";let n;const a={target:0,this:0};while(!n&&a.this=0){n=e}else{a.this++}}if(!n){throw new Error("Internal Babel error - The two compared nodes"+" don't appear to belong to the same program.")}if(isExecutionUncertainInList(r.this,a.this-1)||isExecutionUncertainInList(r.target,a.target-1)){return"unknown"}const i={this:r.this[a.this-1],target:r.target[a.target-1]};if(i.target.listKey&&i.this.listKey&&i.target.container===i.this.container){return i.target.key>i.this.key?"before":"after"}const o=s.VISITOR_KEYS[n.type];const l={this:o.indexOf(i.this.parentKey),target:o.indexOf(i.target.parentKey)};return l.target>l.this?"before":"after"}const a=new WeakSet;function _guessExecutionStatusRelativeToDifferentFunctions(e){if(!e.isFunctionDeclaration()||e.parentPath.isExportDeclaration()){return"unknown"}const t=e.scope.getBinding(e.node.id.name);if(!t.references)return"before";const r=t.referencePaths;let s;for(const t of r){const r=!!t.find(t=>t.node===e.node);if(r)continue;if(t.key!=="callee"||!t.parentPath.isCallExpression()){return"unknown"}if(a.has(t.node))continue;a.add(t.node);const n=this._guessExecutionStatusRelativeTo(t);a.delete(t.node);if(s&&s!==n){return"unknown"}else{s=n}}return s}function resolve(e,t){return this._resolve(e,t)||this}function _resolve(e,t){if(t&&t.indexOf(this)>=0)return;t=t||[];t.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(e,t)}else{}}else if(this.isReferencedIdentifier()){const r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if(r.kind==="module")return;if(r.path!==this){const s=r.path.resolve(e,t);if(this.find(e=>e.node===s.node))return;return s}}else if(this.isTypeCastExpression()){return this.get("expression").resolve(e,t)}else if(e&&this.isMemberExpression()){const r=this.toComputedKey();if(!s.isLiteral(r))return;const n=r.value;const a=this.get("object").resolve(e,t);if(a.isObjectExpression()){const r=a.get("properties");for(const s of r){if(!s.isProperty())continue;const r=s.get("key");let a=s.isnt("computed")&&r.isIdentifier({name:n});a=a||r.isLiteral({value:n});if(a)return s.get("value").resolve(e,t)}}else if(a.isArrayExpression()&&!isNaN(+n)){const r=a.get("elements");const s=r[n];if(s)return s.resolve(e,t)}}}function isConstantExpression(){if(this.isIdentifier()){const e=this.scope.getBinding(this.node.name);if(!e)return false;return e.constant}if(this.isLiteral()){if(this.isRegExpLiteral()){return false}if(this.isTemplateLiteral()){return this.get("expressions").every(e=>e.isConstantExpression())}return true}if(this.isUnaryExpression()){if(this.get("operator").node!=="void"){return false}return this.get("argument").isConstantExpression()}if(this.isBinaryExpression()){return this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return false}function isInStrictMode(){const e=this.isProgram()?this:this.parentPath;const t=e.find(e=>{if(e.isProgram({sourceType:"module"}))return true;if(e.isClass())return true;if(!e.isProgram()&&!e.isFunction())return false;if(e.isArrowFunctionExpression()&&!e.get("body").isBlockStatement()){return false}let{node:t}=e;if(e.isFunction())t=t.body;for(const e of t.directives){if(e.value.value==="use strict"){return true}}});return!!t}},37961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const n={ReferencedIdentifier(e,t){if(e.isJSXIdentifier()&&s.react.isCompatTag(e.node.name)&&!e.parentPath.isJSXMemberExpression()){return}if(e.node.name==="this"){let r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression()){break}}while(r=r.parent);if(r)t.breakOnScopePaths.push(r.path)}const r=e.scope.getBinding(e.node.name);if(!r)return;for(const s of r.constantViolations){if(s.scope!==r.path.scope){t.mutableBinding=true;e.stop();return}}if(r!==t.scope.getBinding(e.node.name))return;t.bindings[e.node.name]=r}};class PathHoister{constructor(e,t){this.breakOnScopePaths=[];this.bindings={};this.mutableBinding=false;this.scopes=[];this.scope=t;this.path=e;this.attachAfter=false}isCompatibleScope(e){for(const t of Object.keys(this.bindings)){const r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier)){return false}}return true}getCompatibleScopes(){let e=this.path.scope;do{if(this.isCompatibleScope(e)){this.scopes.push(e)}else{break}if(this.breakOnScopePaths.indexOf(e.path)>=0){break}}while(e=e.parent)}getAttachmentPath(){let e=this._getAttachmentPath();if(!e)return;let t=e.scope;if(t.path===e){t=e.scope.parent}if(t.path.isProgram()||t.path.isFunction()){for(const r of Object.keys(this.bindings)){if(!t.hasOwnBinding(r))continue;const s=this.bindings[r];if(s.kind==="param"||s.path.parentKey==="params"){continue}const n=this.getAttachmentParentForPath(s.path);if(n.key>=e.key){this.attachAfter=true;e=s.path;for(const t of s.constantViolations){if(this.getAttachmentParentForPath(t).key>e.key){e=t}}}}}return e}_getAttachmentPath(){const e=this.scopes;const t=e.pop();if(!t)return;if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;const e=t.path.get("body").get("body");for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hooks=void 0;const r=[function(e,t){const r=e.key==="test"&&(t.isWhile()||t.isSwitchCase())||e.key==="declaration"&&t.isExportDeclaration()||e.key==="body"&&t.isLabeledStatement()||e.listKey==="declarations"&&t.isVariableDeclaration()&&t.node.declarations.length===1||e.key==="expression"&&t.isExpressionStatement();if(r){t.remove();return true}},function(e,t){if(t.isSequenceExpression()&&t.node.expressions.length===1){t.replaceWith(t.node.expressions[0]);return true}},function(e,t){if(t.isBinary()){if(e.key==="left"){t.replaceWith(t.node.right)}else{t.replaceWith(t.node.left)}return true}},function(e,t){if(t.isIfStatement()&&(e.key==="consequent"||e.key==="alternate")||e.key==="body"&&(t.isLoop()||t.isArrowFunctionExpression())){e.replaceWith({type:"BlockStatement",body:[]});return true}}];t.hooks=r},43859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ForAwaitStatement=t.NumericLiteralTypeAnnotation=t.ExistentialTypeParam=t.SpreadProperty=t.RestProperty=t.Flow=t.Pure=t.Generated=t.User=t.Var=t.BlockScoped=t.Referenced=t.Scope=t.Expression=t.Statement=t.BindingIdentifier=t.ReferencedMemberExpression=t.ReferencedIdentifier=void 0;var s=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const n={types:["Identifier","JSXIdentifier"],checkPath(e,t){const{node:r,parent:n}=e;if(!s.isIdentifier(r,t)&&!s.isJSXMemberExpression(n,t)){if(s.isJSXIdentifier(r,t)){if(s.react.isCompatTag(r.name))return false}else{return false}}return s.isReferenced(r,n,e.parentPath.parent)}};t.ReferencedIdentifier=n;const a={types:["MemberExpression"],checkPath({node:e,parent:t}){return s.isMemberExpression(e)&&s.isReferenced(e,t)}};t.ReferencedMemberExpression=a;const i={types:["Identifier"],checkPath(e){const{node:t,parent:r}=e;const n=e.parentPath.parent;return s.isIdentifier(t)&&s.isBinding(t,r,n)}};t.BindingIdentifier=i;const o={types:["Statement"],checkPath({node:e,parent:t}){if(s.isStatement(e)){if(s.isVariableDeclaration(e)){if(s.isForXStatement(t,{left:e}))return false;if(s.isForStatement(t,{init:e}))return false}return true}else{return false}}};t.Statement=o;const l={types:["Expression"],checkPath(e){if(e.isIdentifier()){return e.isReferencedIdentifier()}else{return s.isExpression(e.node)}}};t.Expression=l;const u={types:["Scopable","Pattern"],checkPath(e){return s.isScope(e.node,e.parent)}};t.Scope=u;const c={checkPath(e){return s.isReferenced(e.node,e.parent)}};t.Referenced=c;const p={checkPath(e){return s.isBlockScoped(e.node)}};t.BlockScoped=p;const f={types:["VariableDeclaration"],checkPath(e){return s.isVar(e.node)}};t.Var=f;const d={checkPath(e){return e.node&&!!e.node.loc}};t.User=d;const y={checkPath(e){return!e.isUser()}};t.Generated=y;const h={checkPath(e,t){return e.scope.isPure(e.node,t)}};t.Pure=h;const m={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath({node:e}){if(s.isFlow(e)){return true}else if(s.isImportDeclaration(e)){return e.importKind==="type"||e.importKind==="typeof"}else if(s.isExportDeclaration(e)){return e.exportKind==="type"}else if(s.isImportSpecifier(e)){return e.importKind==="type"||e.importKind==="typeof"}else{return false}}};t.Flow=m;const g={types:["RestElement"],checkPath(e){return e.parentPath&&e.parentPath.isObjectPattern()}};t.RestProperty=g;const b={types:["RestElement"],checkPath(e){return e.parentPath&&e.parentPath.isObjectExpression()}};t.SpreadProperty=b;const x={types:["ExistsTypeAnnotation"]};t.ExistentialTypeParam=x;const v={types:["NumberLiteralTypeAnnotation"]};t.NumericLiteralTypeAnnotation=v;const E={types:["ForOfStatement"],checkPath({node:e}){return e.await===true}};t.ForAwaitStatement=E},61625:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.insertBefore=insertBefore;t._containerInsert=_containerInsert;t._containerInsertBefore=_containerInsertBefore;t._containerInsertAfter=_containerInsertAfter;t.insertAfter=insertAfter;t.updateSiblingKeys=updateSiblingKeys;t._verifyNodeList=_verifyNodeList;t.unshiftContainer=unshiftContainer;t.pushContainer=pushContainer;t.hoist=hoist;var s=r(65711);var n=_interopRequireDefault(r(37961));var a=_interopRequireDefault(r(32481));var i=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function insertBefore(e){this._assertUnremoved();e=this._verifyNodeList(e);const{parentPath:t}=this;if(t.isExpressionStatement()||t.isLabeledStatement()||t.isExportNamedDeclaration()||t.isExportDefaultDeclaration()&&this.isDeclaration()){return t.insertBefore(e)}else if(this.isNodeType("Expression")&&!this.isJSXElement()||t.isForStatement()&&this.key==="init"){if(this.node)e.push(this.node);return this.replaceExpressionWithStatements(e)}else if(Array.isArray(this.container)){return this._containerInsertBefore(e)}else if(this.isStatementOrBlock()){const t=this.node&&(!this.isExpressionStatement()||this.node.expression!=null);this.replaceWith(i.blockStatement(t?[this.node]:[]));return this.unshiftContainer("body",e)}else{throw new Error("We don't know what to do with this node type. "+"We were previously a Statement but we can't fit in here?")}}function _containerInsert(e,t){this.updateSiblingKeys(e,t.length);const r=[];this.container.splice(e,0,...t);for(let s=0;s{return i.isExpression(e)?i.expressionStatement(e):e}))}else if(this.isNodeType("Expression")&&!this.isJSXElement()&&!t.isJSXElement()||t.isForStatement()&&this.key==="init"){if(this.node){let{scope:r}=this;if(t.isMethod({computed:true,key:this.node})){r=r.parent}const s=r.generateDeclaredUidIdentifier();e.unshift(i.expressionStatement(i.assignmentExpression("=",i.cloneNode(s),this.node)));e.push(i.expressionStatement(i.cloneNode(s)))}return this.replaceExpressionWithStatements(e)}else if(Array.isArray(this.container)){return this._containerInsertAfter(e)}else if(this.isStatementOrBlock()){const t=this.node&&(!this.isExpressionStatement()||this.node.expression!=null);this.replaceWith(i.blockStatement(t?[this.node]:[]));return this.pushContainer("body",e)}else{throw new Error("We don't know what to do with this node type. "+"We were previously a Statement but we can't fit in here?")}}function updateSiblingKeys(e,t){if(!this.parent)return;const r=s.path.get(this.parent);for(const[,s]of r){if(s.key>=e){s.key+=t}}}function _verifyNodeList(e){if(!e){return[]}if(e.constructor!==Array){e=[e]}for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.remove=remove;t._removeFromScope=_removeFromScope;t._callRemovalHooks=_callRemovalHooks;t._remove=_remove;t._markRemoved=_markRemoved;t._assertUnremoved=_assertUnremoved;var s=r(79016);var n=r(65711);var a=r(32481);function remove(){var e;this._assertUnremoved();this.resync();if(!((e=this.opts)==null?void 0:e.noScope)){this._removeFromScope()}if(this._callRemovalHooks()){this._markRemoved();return}this.shareCommentsWithSiblings();this._remove();this._markRemoved()}function _removeFromScope(){const e=this.getBindingIdentifiers();Object.keys(e).forEach(e=>this.scope.removeBinding(e))}function _callRemovalHooks(){for(const e of s.hooks){if(e(this,this.parentPath))return true}}function _remove(){if(Array.isArray(this.container)){this.container.splice(this.key,1);this.updateSiblingKeys(this.key,-1)}else{this._replaceWith(null)}}function _markRemoved(){this._traverseFlags|=a.SHOULD_SKIP|a.REMOVED;if(this.parent)n.path.get(this.parent).delete(this.node);this.node=null}function _assertUnremoved(){if(this.removed){throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}}},52352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.replaceWithMultiple=replaceWithMultiple;t.replaceWithSourceString=replaceWithSourceString;t.replaceWith=replaceWith;t._replaceWith=_replaceWith;t.replaceExpressionWithStatements=replaceExpressionWithStatements;t.replaceInline=replaceInline;var s=r(36553);var n=_interopRequireDefault(r(18442));var a=_interopRequireDefault(r(32481));var i=r(65711);var o=r(30865);var l=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const u={Function(e){e.skip()},VariableDeclaration(e){if(e.node.kind!=="var")return;const t=e.getBindingIdentifiers();for(const r of Object.keys(t)){e.scope.push({id:t[r]})}const r=[];for(const t of e.node.declarations){if(t.init){r.push(l.expressionStatement(l.assignmentExpression("=",t.id,t.init)))}}e.replaceWithMultiple(r)}};function replaceWithMultiple(e){var t;this.resync();e=this._verifyNodeList(e);l.inheritLeadingComments(e[0],this.node);l.inheritTrailingComments(e[e.length-1],this.node);(t=i.path.get(this.parent))==null?void 0:t.delete(this.node);this.node=this.container[this.key]=null;const r=this.insertAfter(e);if(this.node){this.requeue()}else{this.remove()}return r}function replaceWithSourceString(e){this.resync();try{e=`(${e})`;e=(0,o.parse)(e)}catch(t){const r=t.loc;if(r){t.message+=" - make sure this is an expression.\n"+(0,s.codeFrameColumns)(e,{start:{line:r.line,column:r.column+1}});t.code="BABEL_REPLACE_SOURCE_ERROR"}throw t}e=e.program.body[0].expression;n.default.removeProperties(e);return this.replaceWith(e)}function replaceWith(e){this.resync();if(this.removed){throw new Error("You can't replace this node, we've already removed it")}if(e instanceof a.default){e=e.node}if(!e){throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead")}if(this.node===e){return[this]}if(this.isProgram()&&!l.isProgram(e)){throw new Error("You can only replace a Program root node with another Program node")}if(Array.isArray(e)){throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`")}if(typeof e==="string"){throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`")}let t="";if(this.isNodeType("Statement")&&l.isExpression(e)){if(!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e)&&!this.parentPath.isExportDefaultDeclaration()){e=l.expressionStatement(e);t="expression"}}if(this.isNodeType("Expression")&&l.isStatement(e)){if(!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e)){return this.replaceExpressionWithStatements([e])}}const r=this.node;if(r){l.inheritsComments(e,r);l.removeComments(r)}this._replaceWith(e);this.type=e.type;this.setScope();this.requeue();return[t?this.get(t):this]}function _replaceWith(e){var t;if(!this.container){throw new ReferenceError("Container is falsy")}if(this.inList){l.validate(this.parent,this.key,[e])}else{l.validate(this.parent,this.key,e)}this.debug(`Replace with ${e==null?void 0:e.type}`);(t=i.path.get(this.parent))==null?void 0:t.set(e,this).delete(this.node);this.node=this.container[this.key]=e}function replaceExpressionWithStatements(e){this.resync();const t=l.toSequenceExpression(e,this.scope);if(t){return this.replaceWith(t)[0].get("expressions")}const r=this.getFunctionParent();const s=r==null?void 0:r.is("async");const a=l.arrowFunctionExpression([],l.blockStatement(e));this.replaceWith(l.callExpression(a,[]));this.traverse(u);const i=this.get("callee").getCompletionRecords();for(const e of i){if(!e.isExpressionStatement())continue;const t=e.findParent(e=>e.isLoop());if(t){let r=t.getData("expressionReplacementReturnUid");if(!r){const e=this.get("callee");r=e.scope.generateDeclaredUidIdentifier("ret");e.get("body").pushContainer("body",l.returnStatement(l.cloneNode(r)));t.setData("expressionReplacementReturnUid",r)}else{r=l.identifier(r.name)}e.get("expression").replaceWith(l.assignmentExpression("=",l.cloneNode(r),e.node.expression))}else{e.replaceWith(l.returnStatement(e.node.expression))}}const o=this.get("callee");o.arrowFunctionToExpression();if(s&&n.default.hasType(this.get("callee.body").node,"AwaitExpression",l.FUNCTION_TYPES)){o.set("async",true);this.replaceWith(l.awaitExpression(this.node))}return o.get("body.body")}function replaceInline(e){this.resync();if(Array.isArray(e)){if(Array.isArray(this.container)){e=this._verifyNodeList(e);const t=this._containerInsertAfter(e);this.remove();return t}else{return this.replaceWithMultiple(e)}}else{return this.replaceWith(e)}}},24653:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;class Binding{constructor({identifier:e,scope:t,path:r,kind:s}){this.constantViolations=[];this.constant=true;this.referencePaths=[];this.referenced=false;this.references=0;this.identifier=e;this.scope=t;this.path=r;this.kind=s;this.clearValue()}deoptValue(){this.clearValue();this.hasDeoptedValue=true}setValue(e){if(this.hasDeoptedValue)return;this.hasValue=true;this.value=e}clearValue(){this.hasDeoptedValue=false;this.hasValue=false;this.value=null}reassign(e){this.constant=false;if(this.constantViolations.indexOf(e)!==-1){return}this.constantViolations.push(e)}reference(e){if(this.referencePaths.indexOf(e)!==-1){return}this.referenced=true;this.references++;this.referencePaths.push(e)}dereference(){this.references--;this.referenced=!!this.references}}t.default=Binding},10660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(46659));var n=_interopRequireDefault(r(18442));var a=_interopRequireDefault(r(24653));var i=_interopRequireDefault(r(41389));var o=_interopRequireWildcard(r(63760));var l=r(65711);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function gatherNodeParts(e,t){switch(e==null?void 0:e.type){default:if(o.isModuleDeclaration(e)){if(e.source){gatherNodeParts(e.source,t)}else if(e.specifiers&&e.specifiers.length){for(const r of e.specifiers)gatherNodeParts(r,t)}else if(e.declaration){gatherNodeParts(e.declaration,t)}}else if(o.isModuleSpecifier(e)){gatherNodeParts(e.local,t)}else if(o.isLiteral(e)){t.push(e.value)}break;case"MemberExpression":case"OptionalMemberExpression":case"JSXMemberExpression":gatherNodeParts(e.object,t);gatherNodeParts(e.property,t);break;case"Identifier":case"JSXIdentifier":t.push(e.name);break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":gatherNodeParts(e.callee,t);break;case"ObjectExpression":case"ObjectPattern":for(const r of e.properties){gatherNodeParts(r,t)}break;case"SpreadElement":case"RestElement":gatherNodeParts(e.argument,t);break;case"ObjectProperty":case"ObjectMethod":case"ClassProperty":case"ClassMethod":case"ClassPrivateProperty":case"ClassPrivateMethod":gatherNodeParts(e.key,t);break;case"ThisExpression":t.push("this");break;case"Super":t.push("super");break;case"Import":t.push("import");break;case"DoExpression":t.push("do");break;case"YieldExpression":t.push("yield");gatherNodeParts(e.argument,t);break;case"AwaitExpression":t.push("await");gatherNodeParts(e.argument,t);break;case"AssignmentExpression":gatherNodeParts(e.left,t);break;case"VariableDeclarator":gatherNodeParts(e.id,t);break;case"FunctionExpression":case"FunctionDeclaration":case"ClassExpression":case"ClassDeclaration":gatherNodeParts(e.id,t);break;case"PrivateName":gatherNodeParts(e.id,t);break;case"ParenthesizedExpression":gatherNodeParts(e.expression,t);break;case"UnaryExpression":case"UpdateExpression":gatherNodeParts(e.argument,t);break;case"MetaProperty":gatherNodeParts(e.meta,t);gatherNodeParts(e.property,t);break;case"JSXElement":gatherNodeParts(e.openingElement,t);break;case"JSXOpeningElement":t.push(e.name);break;case"JSXFragment":gatherNodeParts(e.openingFragment,t);break;case"JSXOpeningFragment":t.push("Fragment");break;case"JSXNamespacedName":gatherNodeParts(e.namespace,t);gatherNodeParts(e.name,t);break}}const u={For(e){for(const t of o.FOR_INIT_KEYS){const r=e.get(t);if(r.isVar()){const t=e.scope.getFunctionParent()||e.scope.getProgramParent();t.registerBinding("var",r)}}},Declaration(e){if(e.isBlockScoped())return;if(e.isExportDeclaration()&&e.get("declaration").isDeclaration()){return}const t=e.scope.getFunctionParent()||e.scope.getProgramParent();t.registerDeclaration(e)},ReferencedIdentifier(e,t){t.references.push(e)},ForXStatement(e,t){const r=e.get("left");if(r.isPattern()||r.isIdentifier()){t.constantViolations.push(e)}},ExportDeclaration:{exit(e){const{node:t,scope:r}=e;const s=t.declaration;if(o.isClassDeclaration(s)||o.isFunctionDeclaration(s)){const t=s.id;if(!t)return;const n=r.getBinding(t.name);if(n)n.reference(e)}else if(o.isVariableDeclaration(s)){for(const t of s.declarations){for(const s of Object.keys(o.getBindingIdentifiers(t))){const t=r.getBinding(s);if(t)t.reference(e)}}}}},LabeledStatement(e){e.scope.getProgramParent().addGlobal(e.node);e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression(e,t){t.assignments.push(e)},UpdateExpression(e,t){t.constantViolations.push(e)},UnaryExpression(e,t){if(e.node.operator==="delete"){t.constantViolations.push(e)}},BlockScoped(e){let t=e.scope;if(t.path===e)t=t.parent;const r=t.getBlockParent();r.registerDeclaration(e);if(e.isClassDeclaration()&&e.node.id){const t=e.node.id;const r=t.name;e.scope.bindings[r]=e.scope.parent.getBinding(r)}},Block(e){const t=e.get("body");for(const r of t){if(r.isFunctionDeclaration()){e.scope.getBlockParent().registerDeclaration(r)}}},CatchClause(e){e.scope.registerBinding("let",e)},Function(e){if(e.isFunctionExpression()&&e.has("id")&&!e.get("id").node[o.NOT_LOCAL_BINDING]){e.scope.registerBinding("local",e.get("id"),e)}const t=e.get("params");for(const r of t){e.scope.registerBinding("param",r)}},ClassExpression(e){if(e.has("id")&&!e.get("id").node[o.NOT_LOCAL_BINDING]){e.scope.registerBinding("local",e)}}};let c=0;class Scope{constructor(e){const{node:t}=e;const r=l.scope.get(t);if((r==null?void 0:r.path)===e){return r}l.scope.set(t,this);this.uid=c++;this.block=t;this.path=e;this.labels=new Map;this.inited=false}get parent(){const e=this.path.findParent(e=>e.isScope());return e==null?void 0:e.scope}get parentBlock(){return this.path.parent}get hub(){return this.path.hub}traverse(e,t,r){(0,n.default)(e,t,this,r,this.path)}generateDeclaredUidIdentifier(e){const t=this.generateUidIdentifier(e);this.push({id:t});return o.cloneNode(t)}generateUidIdentifier(e){return o.identifier(this.generateUid(e))}generateUid(e="temp"){e=o.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");let t;let r=1;do{t=this._generateUid(e,r);r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));const s=this.getProgramParent();s.references[t]=true;s.uids[t]=true;return t}_generateUid(e,t){let r=e;if(t>1)r+=t;return`_${r}`}generateUidBasedOnNode(e,t){const r=[];gatherNodeParts(e,r);let s=r.join("$");s=s.replace(/^_/,"")||t||"ref";return this.generateUid(s.slice(0,20))}generateUidIdentifierBasedOnNode(e,t){return o.identifier(this.generateUidBasedOnNode(e,t))}isStatic(e){if(o.isThisExpression(e)||o.isSuper(e)){return true}if(o.isIdentifier(e)){const t=this.getBinding(e.name);if(t){return t.constant}else{return this.hasBinding(e.name)}}return false}maybeGenerateMemoised(e,t){if(this.isStatic(e)){return null}else{const r=this.generateUidIdentifierBasedOnNode(e);if(!t){this.push({id:r});return o.cloneNode(r)}return r}}checkBlockScopedCollisions(e,t,r,s){if(t==="param")return;if(e.kind==="local")return;const n=t==="let"||e.kind==="let"||e.kind==="const"||e.kind==="module"||e.kind==="param"&&(t==="let"||t==="const");if(n){throw this.hub.buildError(s,`Duplicate declaration "${r}"`,TypeError)}}rename(e,t,r){const n=this.getBinding(e);if(n){t=t||this.generateUidIdentifier(e).name;return new s.default(n,e,t).rename(r)}}_renameFromMap(e,t,r,s){if(e[t]){e[r]=s;e[t]=null}}dump(){const e="-".repeat(60);console.log(e);let t=this;do{console.log("#",t.block.type);for(const e of Object.keys(t.bindings)){const r=t.bindings[e];console.log(" -",e,{constant:r.constant,references:r.references,violations:r.constantViolations.length,kind:r.kind})}}while(t=t.parent);console.log(e)}toArray(e,t,r){if(o.isIdentifier(e)){const t=this.getBinding(e.name);if((t==null?void 0:t.constant)&&t.path.isGenericType("Array")){return e}}if(o.isArrayExpression(e)){return e}if(o.isIdentifier(e,{name:"arguments"})){return o.callExpression(o.memberExpression(o.memberExpression(o.memberExpression(o.identifier("Array"),o.identifier("prototype")),o.identifier("slice")),o.identifier("call")),[e])}let s;const n=[e];if(t===true){s="toConsumableArray"}else if(t){n.push(o.numericLiteral(t));s="slicedToArray"}else{s="toArray"}if(r){n.unshift(this.hub.addHelper(s));s="maybeArrayLike"}return o.callExpression(this.hub.addHelper(s),n)}hasLabel(e){return!!this.getLabel(e)}getLabel(e){return this.labels.get(e)}registerLabel(e){this.labels.set(e.node.label.name,e)}registerDeclaration(e){if(e.isLabeledStatement()){this.registerLabel(e)}else if(e.isFunctionDeclaration()){this.registerBinding("hoisted",e.get("id"),e)}else if(e.isVariableDeclaration()){const t=e.get("declarations");for(const r of t){this.registerBinding(e.node.kind,r)}}else if(e.isClassDeclaration()){this.registerBinding("let",e)}else if(e.isImportDeclaration()){const t=e.get("specifiers");for(const e of t){this.registerBinding("module",e)}}else if(e.isExportDeclaration()){const t=e.get("declaration");if(t.isClassDeclaration()||t.isFunctionDeclaration()||t.isVariableDeclaration()){this.registerDeclaration(t)}}else{this.registerBinding("unknown",e)}}buildUndefinedNode(){return o.unaryExpression("void",o.numericLiteral(0),true)}registerConstantViolation(e){const t=e.getBindingIdentifiers();for(const r of Object.keys(t)){const t=this.getBinding(r);if(t)t.reassign(e)}}registerBinding(e,t,r=t){if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration()){const r=t.get("declarations");for(const t of r){this.registerBinding(e,t)}return}const s=this.getProgramParent();const n=t.getOuterBindingIdentifiers(true);for(const t of Object.keys(n)){s.references[t]=true;for(const s of n[t]){const n=this.getOwnBinding(t);if(n){if(n.identifier===s)continue;this.checkBlockScopedCollisions(n,e,t,s)}if(n){this.registerConstantViolation(r)}else{this.bindings[t]=new a.default({identifier:s,scope:this,path:r,kind:e})}}}}addGlobal(e){this.globals[e.name]=e}hasUid(e){let t=this;do{if(t.uids[e])return true}while(t=t.parent);return false}hasGlobal(e){let t=this;do{if(t.globals[e])return true}while(t=t.parent);return false}hasReference(e){return!!this.getProgramParent().references[e]}isPure(e,t){if(o.isIdentifier(e)){const r=this.getBinding(e.name);if(!r)return false;if(t)return r.constant;return true}else if(o.isClass(e)){if(e.superClass&&!this.isPure(e.superClass,t)){return false}return this.isPure(e.body,t)}else if(o.isClassBody(e)){for(const r of e.body){if(!this.isPure(r,t))return false}return true}else if(o.isBinary(e)){return this.isPure(e.left,t)&&this.isPure(e.right,t)}else if(o.isArrayExpression(e)){for(const r of e.elements){if(!this.isPure(r,t))return false}return true}else if(o.isObjectExpression(e)){for(const r of e.properties){if(!this.isPure(r,t))return false}return true}else if(o.isMethod(e)){if(e.computed&&!this.isPure(e.key,t))return false;if(e.kind==="get"||e.kind==="set")return false;return true}else if(o.isProperty(e)){if(e.computed&&!this.isPure(e.key,t))return false;return this.isPure(e.value,t)}else if(o.isUnaryExpression(e)){return this.isPure(e.argument,t)}else if(o.isTaggedTemplateExpression(e)){return o.matchesPattern(e.tag,"String.raw")&&!this.hasBinding("String",true)&&this.isPure(e.quasi,t)}else if(o.isTemplateLiteral(e)){for(const r of e.expressions){if(!this.isPure(r,t))return false}return true}else{return o.isPureish(e)}}setData(e,t){return this.data[e]=t}getData(e){let t=this;do{const r=t.data[e];if(r!=null)return r}while(t=t.parent)}removeData(e){let t=this;do{const r=t.data[e];if(r!=null)t.data[e]=null}while(t=t.parent)}init(){if(!this.inited){this.inited=true;this.crawl()}}crawl(){const e=this.path;this.references=Object.create(null);this.bindings=Object.create(null);this.globals=Object.create(null);this.uids=Object.create(null);this.data=Object.create(null);if(e.isFunction()){if(e.isFunctionExpression()&&e.has("id")&&!e.get("id").node[o.NOT_LOCAL_BINDING]){this.registerBinding("local",e.get("id"),e)}const t=e.get("params");for(const e of t){this.registerBinding("param",e)}}const t=this.getProgramParent();if(t.crawling)return;const r={references:[],constantViolations:[],assignments:[]};this.crawling=true;e.traverse(u,r);this.crawling=false;for(const e of r.assignments){const r=e.getBindingIdentifiers();for(const s of Object.keys(r)){if(e.scope.getBinding(s))continue;t.addGlobal(r[s])}e.scope.registerConstantViolation(e)}for(const e of r.references){const r=e.scope.getBinding(e.node.name);if(r){r.reference(e)}else{t.addGlobal(e.node)}}for(const e of r.constantViolations){e.scope.registerConstantViolation(e)}}push(e){let t=this.path;if(!t.isBlockStatement()&&!t.isProgram()){t=this.getBlockParent().path}if(t.isSwitchStatement()){t=(this.getFunctionParent()||this.getProgramParent()).path}if(t.isLoop()||t.isCatchClause()||t.isFunction()){t.ensureBlock();t=t.get("body")}const r=e.unique;const s=e.kind||"var";const n=e._blockHoist==null?2:e._blockHoist;const a=`declaration:${s}:${n}`;let i=!r&&t.getData(a);if(!i){const e=o.variableDeclaration(s,[]);e._blockHoist=n;[i]=t.unshiftContainer("body",[e]);if(!r)t.setData(a,i)}const l=o.variableDeclarator(e.id,e.init);i.node.declarations.push(l);this.registerBinding(s,i.get("declarations").pop())}getProgramParent(){let e=this;do{if(e.path.isProgram()){return e}}while(e=e.parent);throw new Error("Couldn't find a Program")}getFunctionParent(){let e=this;do{if(e.path.isFunctionParent()){return e}}while(e=e.parent);return null}getBlockParent(){let e=this;do{if(e.path.isBlockParent()){return e}}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getAllBindings(){const e=Object.create(null);let t=this;do{for(const r of Object.keys(t.bindings)){if(r in e===false){e[r]=t.bindings[r]}}t=t.parent}while(t);return e}getAllBindingsOfKind(){const e=Object.create(null);for(const t of arguments){let r=this;do{for(const s of Object.keys(r.bindings)){const n=r.bindings[s];if(n.kind===t)e[s]=n}r=r.parent}while(r)}return e}bindingIdentifierEquals(e,t){return this.getBindingIdentifier(e)===t}getBinding(e){let t=this;let r;do{const n=t.getOwnBinding(e);if(n){var s;if(((s=r)==null?void 0:s.isPattern())&&n.kind!=="param"){}else{return n}}r=t.path}while(t=t.parent)}getOwnBinding(e){return this.bindings[e]}getBindingIdentifier(e){var t;return(t=this.getBinding(e))==null?void 0:t.identifier}getOwnBindingIdentifier(e){const t=this.bindings[e];return t==null?void 0:t.identifier}hasOwnBinding(e){return!!this.getOwnBinding(e)}hasBinding(e,t){if(!e)return false;if(this.hasOwnBinding(e))return true;if(this.parentHasBinding(e,t))return true;if(this.hasUid(e))return true;if(!t&&Scope.globals.includes(e))return true;if(!t&&Scope.contextVariables.includes(e))return true;return false}parentHasBinding(e,t){var r;return(r=this.parent)==null?void 0:r.hasBinding(e,t)}moveBindingTo(e,t){const r=this.getBinding(e);if(r){r.scope.removeOwnBinding(e);r.scope=t;t.bindings[e]=r}}removeOwnBinding(e){delete this.bindings[e]}removeBinding(e){var t;(t=this.getBinding(e))==null?void 0:t.scope.removeOwnBinding(e);let r=this;do{if(r.uids[e]){r.uids[e]=false}}while(r=r.parent)}}t.default=Scope;Scope.globals=Object.keys(i.default.builtin);Scope.contextVariables=["arguments","undefined","Infinity","NaN"]},46659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(24653));var n=_interopRequireDefault(r(76729));var a=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i={ReferencedIdentifier({node:e},t){if(e.name===t.oldName){e.name=t.newName}},Scope(e,t){if(!e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)){e.skip()}},"AssignmentExpression|Declaration|VariableDeclarator"(e,t){if(e.isVariableDeclaration())return;const r=e.getOuterBindingIdentifiers();for(const e in r){if(e===t.oldName)r[e].name=t.newName}}};class Renamer{constructor(e,t,r){this.newName=r;this.oldName=t;this.binding=e}maybeConvertFromExportDeclaration(e){const t=e.parentPath;if(!t.isExportDeclaration()){return}if(t.isExportDefaultDeclaration()&&!t.get("declaration").node.id){return}(0,n.default)(t)}maybeConvertFromClassFunctionDeclaration(e){return;if(!e.isFunctionDeclaration()&&!e.isClassDeclaration())return;if(this.binding.kind!=="hoisted")return;e.node.id=a.identifier(this.oldName);e.node._blockHoist=3;e.replaceWith(a.variableDeclaration("let",[a.variableDeclarator(a.identifier(this.newName),a.toExpression(e.node))]))}maybeConvertFromClassFunctionExpression(e){return;if(!e.isFunctionExpression()&&!e.isClassExpression())return;if(this.binding.kind!=="local")return;e.node.id=a.identifier(this.oldName);this.binding.scope.parent.push({id:a.identifier(this.newName)});e.replaceWith(a.assignmentExpression("=",a.identifier(this.newName),e.node))}rename(e){const{binding:t,oldName:r,newName:s}=this;const{scope:n,path:a}=t;const o=a.find(e=>e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression());if(o){const e=o.getOuterBindingIdentifiers();if(e[r]===t.identifier){this.maybeConvertFromExportDeclaration(o)}}const l=e||n.block;if((l==null?void 0:l.type)==="SwitchStatement"){l.cases.forEach(e=>{n.traverse(e,i,this)})}else{n.traverse(l,i,this)}if(!e){n.removeOwnBinding(r);n.bindings[s]=t;this.binding.identifier.name=s}if(t.type==="hoisted"){}if(o){this.maybeConvertFromClassFunctionDeclaration(o);this.maybeConvertFromClassFunctionExpression(o)}}}t.default=Renamer},2751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.explode=explode;t.verify=verify;t.merge=merge;var s=_interopRequireWildcard(r(43859));var n=_interopRequireWildcard(r(63760));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function explode(e){if(e._exploded)return e;e._exploded=true;for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=t.split("|");if(r.length===1)continue;const s=e[t];delete e[t];for(const t of r){e[t]=s}}verify(e);delete e.__esModule;ensureEntranceObjects(e);ensureCallbackArrays(e);for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=s[t];if(!r)continue;const n=e[t];for(const e of Object.keys(n)){n[e]=wrapCheck(r,n[e])}delete e[t];if(r.types){for(const t of r.types){if(e[t]){mergePair(e[t],n)}else{e[t]=n}}}else{mergePair(e,n)}}for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=e[t];let s=n.FLIPPED_ALIAS_KEYS[t];const a=n.DEPRECATED_KEYS[t];if(a){console.trace(`Visitor defined for ${t} but it has been renamed to ${a}`);s=[a]}if(!s)continue;delete e[t];for(const t of s){const s=e[t];if(s){mergePair(s,r)}else{e[t]=Object.assign({},r)}}}for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;ensureCallbackArrays(e[t])}return e}function verify(e){if(e._verified)return;if(typeof e==="function"){throw new Error("You passed `traverse()` a function when it expected a visitor object, "+"are you sure you didn't mean `{ enter: Function }`?")}for(const t of Object.keys(e)){if(t==="enter"||t==="exit"){validateVisitorMethods(t,e[t])}if(shouldIgnoreKey(t))continue;if(n.TYPES.indexOf(t)<0){throw new Error(`You gave us a visitor for the node type ${t} but it's not a valid type`)}const r=e[t];if(typeof r==="object"){for(const e of Object.keys(r)){if(e==="enter"||e==="exit"){validateVisitorMethods(`${t}.${e}`,r[e])}else{throw new Error("You passed `traverse()` a visitor object with the property "+`${t} that has the invalid property ${e}`)}}}}e._verified=true}function validateVisitorMethods(e,t){const r=[].concat(t);for(const t of r){if(typeof t!=="function"){throw new TypeError(`Non-function found defined in ${e} with type ${typeof t}`)}}}function merge(e,t=[],r){const s={};for(let n=0;ne.toString())}return s});s[n]=a}return s}function ensureEntranceObjects(e){for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=e[t];if(typeof r==="function"){e[t]={enter:r}}}}function ensureCallbackArrays(e){if(e.enter&&!Array.isArray(e.enter))e.enter=[e.enter];if(e.exit&&!Array.isArray(e.exit))e.exit=[e.exit]}function wrapCheck(e,t){const r=function(r){if(e.checkPath(r)){return t.apply(this,arguments)}};r.toString=(()=>t.toString());return r}function shouldIgnoreKey(e){if(e[0]==="_")return true;if(e==="enter"||e==="exit"||e==="shouldSkip")return true;if(e==="denylist"||e==="noScope"||e==="skipKeys"||e==="blacklist"){return true}return false}function mergePair(e,t){for(const r of Object.keys(t)){e[r]=[].concat(e[r]||[],t[r])}}},34654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=assertNode;var s=_interopRequireDefault(r(95595));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function assertNode(e){if(!(0,s.default)(e)){var t;const r=(t=e==null?void 0:e.type)!=null?t:JSON.stringify(e);throw new TypeError(`Not a valid node of type "${r}"`)}}},28970:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertArrayExpression=assertArrayExpression;t.assertAssignmentExpression=assertAssignmentExpression;t.assertBinaryExpression=assertBinaryExpression;t.assertInterpreterDirective=assertInterpreterDirective;t.assertDirective=assertDirective;t.assertDirectiveLiteral=assertDirectiveLiteral;t.assertBlockStatement=assertBlockStatement;t.assertBreakStatement=assertBreakStatement;t.assertCallExpression=assertCallExpression;t.assertCatchClause=assertCatchClause;t.assertConditionalExpression=assertConditionalExpression;t.assertContinueStatement=assertContinueStatement;t.assertDebuggerStatement=assertDebuggerStatement;t.assertDoWhileStatement=assertDoWhileStatement;t.assertEmptyStatement=assertEmptyStatement;t.assertExpressionStatement=assertExpressionStatement;t.assertFile=assertFile;t.assertForInStatement=assertForInStatement;t.assertForStatement=assertForStatement;t.assertFunctionDeclaration=assertFunctionDeclaration;t.assertFunctionExpression=assertFunctionExpression;t.assertIdentifier=assertIdentifier;t.assertIfStatement=assertIfStatement;t.assertLabeledStatement=assertLabeledStatement;t.assertStringLiteral=assertStringLiteral;t.assertNumericLiteral=assertNumericLiteral;t.assertNullLiteral=assertNullLiteral;t.assertBooleanLiteral=assertBooleanLiteral;t.assertRegExpLiteral=assertRegExpLiteral;t.assertLogicalExpression=assertLogicalExpression;t.assertMemberExpression=assertMemberExpression;t.assertNewExpression=assertNewExpression;t.assertProgram=assertProgram;t.assertObjectExpression=assertObjectExpression;t.assertObjectMethod=assertObjectMethod;t.assertObjectProperty=assertObjectProperty;t.assertRestElement=assertRestElement;t.assertReturnStatement=assertReturnStatement;t.assertSequenceExpression=assertSequenceExpression;t.assertParenthesizedExpression=assertParenthesizedExpression;t.assertSwitchCase=assertSwitchCase;t.assertSwitchStatement=assertSwitchStatement;t.assertThisExpression=assertThisExpression;t.assertThrowStatement=assertThrowStatement;t.assertTryStatement=assertTryStatement;t.assertUnaryExpression=assertUnaryExpression;t.assertUpdateExpression=assertUpdateExpression;t.assertVariableDeclaration=assertVariableDeclaration;t.assertVariableDeclarator=assertVariableDeclarator;t.assertWhileStatement=assertWhileStatement;t.assertWithStatement=assertWithStatement;t.assertAssignmentPattern=assertAssignmentPattern;t.assertArrayPattern=assertArrayPattern;t.assertArrowFunctionExpression=assertArrowFunctionExpression;t.assertClassBody=assertClassBody;t.assertClassExpression=assertClassExpression;t.assertClassDeclaration=assertClassDeclaration;t.assertExportAllDeclaration=assertExportAllDeclaration;t.assertExportDefaultDeclaration=assertExportDefaultDeclaration;t.assertExportNamedDeclaration=assertExportNamedDeclaration;t.assertExportSpecifier=assertExportSpecifier;t.assertForOfStatement=assertForOfStatement;t.assertImportDeclaration=assertImportDeclaration;t.assertImportDefaultSpecifier=assertImportDefaultSpecifier;t.assertImportNamespaceSpecifier=assertImportNamespaceSpecifier;t.assertImportSpecifier=assertImportSpecifier;t.assertMetaProperty=assertMetaProperty;t.assertClassMethod=assertClassMethod;t.assertObjectPattern=assertObjectPattern;t.assertSpreadElement=assertSpreadElement;t.assertSuper=assertSuper;t.assertTaggedTemplateExpression=assertTaggedTemplateExpression;t.assertTemplateElement=assertTemplateElement;t.assertTemplateLiteral=assertTemplateLiteral;t.assertYieldExpression=assertYieldExpression;t.assertAwaitExpression=assertAwaitExpression;t.assertImport=assertImport;t.assertBigIntLiteral=assertBigIntLiteral;t.assertExportNamespaceSpecifier=assertExportNamespaceSpecifier;t.assertOptionalMemberExpression=assertOptionalMemberExpression;t.assertOptionalCallExpression=assertOptionalCallExpression;t.assertAnyTypeAnnotation=assertAnyTypeAnnotation;t.assertArrayTypeAnnotation=assertArrayTypeAnnotation;t.assertBooleanTypeAnnotation=assertBooleanTypeAnnotation;t.assertBooleanLiteralTypeAnnotation=assertBooleanLiteralTypeAnnotation;t.assertNullLiteralTypeAnnotation=assertNullLiteralTypeAnnotation;t.assertClassImplements=assertClassImplements;t.assertDeclareClass=assertDeclareClass;t.assertDeclareFunction=assertDeclareFunction;t.assertDeclareInterface=assertDeclareInterface;t.assertDeclareModule=assertDeclareModule;t.assertDeclareModuleExports=assertDeclareModuleExports;t.assertDeclareTypeAlias=assertDeclareTypeAlias;t.assertDeclareOpaqueType=assertDeclareOpaqueType;t.assertDeclareVariable=assertDeclareVariable;t.assertDeclareExportDeclaration=assertDeclareExportDeclaration;t.assertDeclareExportAllDeclaration=assertDeclareExportAllDeclaration;t.assertDeclaredPredicate=assertDeclaredPredicate;t.assertExistsTypeAnnotation=assertExistsTypeAnnotation;t.assertFunctionTypeAnnotation=assertFunctionTypeAnnotation;t.assertFunctionTypeParam=assertFunctionTypeParam;t.assertGenericTypeAnnotation=assertGenericTypeAnnotation;t.assertInferredPredicate=assertInferredPredicate;t.assertInterfaceExtends=assertInterfaceExtends;t.assertInterfaceDeclaration=assertInterfaceDeclaration;t.assertInterfaceTypeAnnotation=assertInterfaceTypeAnnotation;t.assertIntersectionTypeAnnotation=assertIntersectionTypeAnnotation;t.assertMixedTypeAnnotation=assertMixedTypeAnnotation;t.assertEmptyTypeAnnotation=assertEmptyTypeAnnotation;t.assertNullableTypeAnnotation=assertNullableTypeAnnotation;t.assertNumberLiteralTypeAnnotation=assertNumberLiteralTypeAnnotation;t.assertNumberTypeAnnotation=assertNumberTypeAnnotation;t.assertObjectTypeAnnotation=assertObjectTypeAnnotation;t.assertObjectTypeInternalSlot=assertObjectTypeInternalSlot;t.assertObjectTypeCallProperty=assertObjectTypeCallProperty;t.assertObjectTypeIndexer=assertObjectTypeIndexer;t.assertObjectTypeProperty=assertObjectTypeProperty;t.assertObjectTypeSpreadProperty=assertObjectTypeSpreadProperty;t.assertOpaqueType=assertOpaqueType;t.assertQualifiedTypeIdentifier=assertQualifiedTypeIdentifier;t.assertStringLiteralTypeAnnotation=assertStringLiteralTypeAnnotation;t.assertStringTypeAnnotation=assertStringTypeAnnotation;t.assertSymbolTypeAnnotation=assertSymbolTypeAnnotation;t.assertThisTypeAnnotation=assertThisTypeAnnotation;t.assertTupleTypeAnnotation=assertTupleTypeAnnotation;t.assertTypeofTypeAnnotation=assertTypeofTypeAnnotation;t.assertTypeAlias=assertTypeAlias;t.assertTypeAnnotation=assertTypeAnnotation;t.assertTypeCastExpression=assertTypeCastExpression;t.assertTypeParameter=assertTypeParameter;t.assertTypeParameterDeclaration=assertTypeParameterDeclaration;t.assertTypeParameterInstantiation=assertTypeParameterInstantiation;t.assertUnionTypeAnnotation=assertUnionTypeAnnotation;t.assertVariance=assertVariance;t.assertVoidTypeAnnotation=assertVoidTypeAnnotation;t.assertEnumDeclaration=assertEnumDeclaration;t.assertEnumBooleanBody=assertEnumBooleanBody;t.assertEnumNumberBody=assertEnumNumberBody;t.assertEnumStringBody=assertEnumStringBody;t.assertEnumSymbolBody=assertEnumSymbolBody;t.assertEnumBooleanMember=assertEnumBooleanMember;t.assertEnumNumberMember=assertEnumNumberMember;t.assertEnumStringMember=assertEnumStringMember;t.assertEnumDefaultedMember=assertEnumDefaultedMember;t.assertJSXAttribute=assertJSXAttribute;t.assertJSXClosingElement=assertJSXClosingElement;t.assertJSXElement=assertJSXElement;t.assertJSXEmptyExpression=assertJSXEmptyExpression;t.assertJSXExpressionContainer=assertJSXExpressionContainer;t.assertJSXSpreadChild=assertJSXSpreadChild;t.assertJSXIdentifier=assertJSXIdentifier;t.assertJSXMemberExpression=assertJSXMemberExpression;t.assertJSXNamespacedName=assertJSXNamespacedName;t.assertJSXOpeningElement=assertJSXOpeningElement;t.assertJSXSpreadAttribute=assertJSXSpreadAttribute;t.assertJSXText=assertJSXText;t.assertJSXFragment=assertJSXFragment;t.assertJSXOpeningFragment=assertJSXOpeningFragment;t.assertJSXClosingFragment=assertJSXClosingFragment;t.assertNoop=assertNoop;t.assertPlaceholder=assertPlaceholder;t.assertV8IntrinsicIdentifier=assertV8IntrinsicIdentifier;t.assertArgumentPlaceholder=assertArgumentPlaceholder;t.assertBindExpression=assertBindExpression;t.assertClassProperty=assertClassProperty;t.assertPipelineTopicExpression=assertPipelineTopicExpression;t.assertPipelineBareFunction=assertPipelineBareFunction;t.assertPipelinePrimaryTopicReference=assertPipelinePrimaryTopicReference;t.assertClassPrivateProperty=assertClassPrivateProperty;t.assertClassPrivateMethod=assertClassPrivateMethod;t.assertImportAttribute=assertImportAttribute;t.assertDecorator=assertDecorator;t.assertDoExpression=assertDoExpression;t.assertExportDefaultSpecifier=assertExportDefaultSpecifier;t.assertPrivateName=assertPrivateName;t.assertRecordExpression=assertRecordExpression;t.assertTupleExpression=assertTupleExpression;t.assertDecimalLiteral=assertDecimalLiteral;t.assertStaticBlock=assertStaticBlock;t.assertTSParameterProperty=assertTSParameterProperty;t.assertTSDeclareFunction=assertTSDeclareFunction;t.assertTSDeclareMethod=assertTSDeclareMethod;t.assertTSQualifiedName=assertTSQualifiedName;t.assertTSCallSignatureDeclaration=assertTSCallSignatureDeclaration;t.assertTSConstructSignatureDeclaration=assertTSConstructSignatureDeclaration;t.assertTSPropertySignature=assertTSPropertySignature;t.assertTSMethodSignature=assertTSMethodSignature;t.assertTSIndexSignature=assertTSIndexSignature;t.assertTSAnyKeyword=assertTSAnyKeyword;t.assertTSBooleanKeyword=assertTSBooleanKeyword;t.assertTSBigIntKeyword=assertTSBigIntKeyword;t.assertTSIntrinsicKeyword=assertTSIntrinsicKeyword;t.assertTSNeverKeyword=assertTSNeverKeyword;t.assertTSNullKeyword=assertTSNullKeyword;t.assertTSNumberKeyword=assertTSNumberKeyword;t.assertTSObjectKeyword=assertTSObjectKeyword;t.assertTSStringKeyword=assertTSStringKeyword;t.assertTSSymbolKeyword=assertTSSymbolKeyword;t.assertTSUndefinedKeyword=assertTSUndefinedKeyword;t.assertTSUnknownKeyword=assertTSUnknownKeyword;t.assertTSVoidKeyword=assertTSVoidKeyword;t.assertTSThisType=assertTSThisType;t.assertTSFunctionType=assertTSFunctionType;t.assertTSConstructorType=assertTSConstructorType;t.assertTSTypeReference=assertTSTypeReference;t.assertTSTypePredicate=assertTSTypePredicate;t.assertTSTypeQuery=assertTSTypeQuery;t.assertTSTypeLiteral=assertTSTypeLiteral;t.assertTSArrayType=assertTSArrayType;t.assertTSTupleType=assertTSTupleType;t.assertTSOptionalType=assertTSOptionalType;t.assertTSRestType=assertTSRestType;t.assertTSNamedTupleMember=assertTSNamedTupleMember;t.assertTSUnionType=assertTSUnionType;t.assertTSIntersectionType=assertTSIntersectionType;t.assertTSConditionalType=assertTSConditionalType;t.assertTSInferType=assertTSInferType;t.assertTSParenthesizedType=assertTSParenthesizedType;t.assertTSTypeOperator=assertTSTypeOperator;t.assertTSIndexedAccessType=assertTSIndexedAccessType;t.assertTSMappedType=assertTSMappedType;t.assertTSLiteralType=assertTSLiteralType;t.assertTSExpressionWithTypeArguments=assertTSExpressionWithTypeArguments;t.assertTSInterfaceDeclaration=assertTSInterfaceDeclaration;t.assertTSInterfaceBody=assertTSInterfaceBody;t.assertTSTypeAliasDeclaration=assertTSTypeAliasDeclaration;t.assertTSAsExpression=assertTSAsExpression;t.assertTSTypeAssertion=assertTSTypeAssertion;t.assertTSEnumDeclaration=assertTSEnumDeclaration;t.assertTSEnumMember=assertTSEnumMember;t.assertTSModuleDeclaration=assertTSModuleDeclaration;t.assertTSModuleBlock=assertTSModuleBlock;t.assertTSImportType=assertTSImportType;t.assertTSImportEqualsDeclaration=assertTSImportEqualsDeclaration;t.assertTSExternalModuleReference=assertTSExternalModuleReference;t.assertTSNonNullExpression=assertTSNonNullExpression;t.assertTSExportAssignment=assertTSExportAssignment;t.assertTSNamespaceExportDeclaration=assertTSNamespaceExportDeclaration;t.assertTSTypeAnnotation=assertTSTypeAnnotation;t.assertTSTypeParameterInstantiation=assertTSTypeParameterInstantiation;t.assertTSTypeParameterDeclaration=assertTSTypeParameterDeclaration;t.assertTSTypeParameter=assertTSTypeParameter;t.assertExpression=assertExpression;t.assertBinary=assertBinary;t.assertScopable=assertScopable;t.assertBlockParent=assertBlockParent;t.assertBlock=assertBlock;t.assertStatement=assertStatement;t.assertTerminatorless=assertTerminatorless;t.assertCompletionStatement=assertCompletionStatement;t.assertConditional=assertConditional;t.assertLoop=assertLoop;t.assertWhile=assertWhile;t.assertExpressionWrapper=assertExpressionWrapper;t.assertFor=assertFor;t.assertForXStatement=assertForXStatement;t.assertFunction=assertFunction;t.assertFunctionParent=assertFunctionParent;t.assertPureish=assertPureish;t.assertDeclaration=assertDeclaration;t.assertPatternLike=assertPatternLike;t.assertLVal=assertLVal;t.assertTSEntityName=assertTSEntityName;t.assertLiteral=assertLiteral;t.assertImmutable=assertImmutable;t.assertUserWhitespacable=assertUserWhitespacable;t.assertMethod=assertMethod;t.assertObjectMember=assertObjectMember;t.assertProperty=assertProperty;t.assertUnaryLike=assertUnaryLike;t.assertPattern=assertPattern;t.assertClass=assertClass;t.assertModuleDeclaration=assertModuleDeclaration;t.assertExportDeclaration=assertExportDeclaration;t.assertModuleSpecifier=assertModuleSpecifier;t.assertFlow=assertFlow;t.assertFlowType=assertFlowType;t.assertFlowBaseAnnotation=assertFlowBaseAnnotation;t.assertFlowDeclaration=assertFlowDeclaration;t.assertFlowPredicate=assertFlowPredicate;t.assertEnumBody=assertEnumBody;t.assertEnumMember=assertEnumMember;t.assertJSX=assertJSX;t.assertPrivate=assertPrivate;t.assertTSTypeElement=assertTSTypeElement;t.assertTSType=assertTSType;t.assertTSBaseType=assertTSBaseType;t.assertNumberLiteral=assertNumberLiteral;t.assertRegexLiteral=assertRegexLiteral;t.assertRestProperty=assertRestProperty;t.assertSpreadProperty=assertSpreadProperty;var s=_interopRequireDefault(r(28422));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function assert(e,t,r){if(!(0,s.default)(e,t,r)){throw new Error(`Expected type "${e}" with option ${JSON.stringify(r)}, `+`but instead got "${t.type}".`)}}function assertArrayExpression(e,t){assert("ArrayExpression",e,t)}function assertAssignmentExpression(e,t){assert("AssignmentExpression",e,t)}function assertBinaryExpression(e,t){assert("BinaryExpression",e,t)}function assertInterpreterDirective(e,t){assert("InterpreterDirective",e,t)}function assertDirective(e,t){assert("Directive",e,t)}function assertDirectiveLiteral(e,t){assert("DirectiveLiteral",e,t)}function assertBlockStatement(e,t){assert("BlockStatement",e,t)}function assertBreakStatement(e,t){assert("BreakStatement",e,t)}function assertCallExpression(e,t){assert("CallExpression",e,t)}function assertCatchClause(e,t){assert("CatchClause",e,t)}function assertConditionalExpression(e,t){assert("ConditionalExpression",e,t)}function assertContinueStatement(e,t){assert("ContinueStatement",e,t)}function assertDebuggerStatement(e,t){assert("DebuggerStatement",e,t)}function assertDoWhileStatement(e,t){assert("DoWhileStatement",e,t)}function assertEmptyStatement(e,t){assert("EmptyStatement",e,t)}function assertExpressionStatement(e,t){assert("ExpressionStatement",e,t)}function assertFile(e,t){assert("File",e,t)}function assertForInStatement(e,t){assert("ForInStatement",e,t)}function assertForStatement(e,t){assert("ForStatement",e,t)}function assertFunctionDeclaration(e,t){assert("FunctionDeclaration",e,t)}function assertFunctionExpression(e,t){assert("FunctionExpression",e,t)}function assertIdentifier(e,t){assert("Identifier",e,t)}function assertIfStatement(e,t){assert("IfStatement",e,t)}function assertLabeledStatement(e,t){assert("LabeledStatement",e,t)}function assertStringLiteral(e,t){assert("StringLiteral",e,t)}function assertNumericLiteral(e,t){assert("NumericLiteral",e,t)}function assertNullLiteral(e,t){assert("NullLiteral",e,t)}function assertBooleanLiteral(e,t){assert("BooleanLiteral",e,t)}function assertRegExpLiteral(e,t){assert("RegExpLiteral",e,t)}function assertLogicalExpression(e,t){assert("LogicalExpression",e,t)}function assertMemberExpression(e,t){assert("MemberExpression",e,t)}function assertNewExpression(e,t){assert("NewExpression",e,t)}function assertProgram(e,t){assert("Program",e,t)}function assertObjectExpression(e,t){assert("ObjectExpression",e,t)}function assertObjectMethod(e,t){assert("ObjectMethod",e,t)}function assertObjectProperty(e,t){assert("ObjectProperty",e,t)}function assertRestElement(e,t){assert("RestElement",e,t)}function assertReturnStatement(e,t){assert("ReturnStatement",e,t)}function assertSequenceExpression(e,t){assert("SequenceExpression",e,t)}function assertParenthesizedExpression(e,t){assert("ParenthesizedExpression",e,t)}function assertSwitchCase(e,t){assert("SwitchCase",e,t)}function assertSwitchStatement(e,t){assert("SwitchStatement",e,t)}function assertThisExpression(e,t){assert("ThisExpression",e,t)}function assertThrowStatement(e,t){assert("ThrowStatement",e,t)}function assertTryStatement(e,t){assert("TryStatement",e,t)}function assertUnaryExpression(e,t){assert("UnaryExpression",e,t)}function assertUpdateExpression(e,t){assert("UpdateExpression",e,t)}function assertVariableDeclaration(e,t){assert("VariableDeclaration",e,t)}function assertVariableDeclarator(e,t){assert("VariableDeclarator",e,t)}function assertWhileStatement(e,t){assert("WhileStatement",e,t)}function assertWithStatement(e,t){assert("WithStatement",e,t)}function assertAssignmentPattern(e,t){assert("AssignmentPattern",e,t)}function assertArrayPattern(e,t){assert("ArrayPattern",e,t)}function assertArrowFunctionExpression(e,t){assert("ArrowFunctionExpression",e,t)}function assertClassBody(e,t){assert("ClassBody",e,t)}function assertClassExpression(e,t){assert("ClassExpression",e,t)}function assertClassDeclaration(e,t){assert("ClassDeclaration",e,t)}function assertExportAllDeclaration(e,t){assert("ExportAllDeclaration",e,t)}function assertExportDefaultDeclaration(e,t){assert("ExportDefaultDeclaration",e,t)}function assertExportNamedDeclaration(e,t){assert("ExportNamedDeclaration",e,t)}function assertExportSpecifier(e,t){assert("ExportSpecifier",e,t)}function assertForOfStatement(e,t){assert("ForOfStatement",e,t)}function assertImportDeclaration(e,t){assert("ImportDeclaration",e,t)}function assertImportDefaultSpecifier(e,t){assert("ImportDefaultSpecifier",e,t)}function assertImportNamespaceSpecifier(e,t){assert("ImportNamespaceSpecifier",e,t)}function assertImportSpecifier(e,t){assert("ImportSpecifier",e,t)}function assertMetaProperty(e,t){assert("MetaProperty",e,t)}function assertClassMethod(e,t){assert("ClassMethod",e,t)}function assertObjectPattern(e,t){assert("ObjectPattern",e,t)}function assertSpreadElement(e,t){assert("SpreadElement",e,t)}function assertSuper(e,t){assert("Super",e,t)}function assertTaggedTemplateExpression(e,t){assert("TaggedTemplateExpression",e,t)}function assertTemplateElement(e,t){assert("TemplateElement",e,t)}function assertTemplateLiteral(e,t){assert("TemplateLiteral",e,t)}function assertYieldExpression(e,t){assert("YieldExpression",e,t)}function assertAwaitExpression(e,t){assert("AwaitExpression",e,t)}function assertImport(e,t){assert("Import",e,t)}function assertBigIntLiteral(e,t){assert("BigIntLiteral",e,t)}function assertExportNamespaceSpecifier(e,t){assert("ExportNamespaceSpecifier",e,t)}function assertOptionalMemberExpression(e,t){assert("OptionalMemberExpression",e,t)}function assertOptionalCallExpression(e,t){assert("OptionalCallExpression",e,t)}function assertAnyTypeAnnotation(e,t){assert("AnyTypeAnnotation",e,t)}function assertArrayTypeAnnotation(e,t){assert("ArrayTypeAnnotation",e,t)}function assertBooleanTypeAnnotation(e,t){assert("BooleanTypeAnnotation",e,t)}function assertBooleanLiteralTypeAnnotation(e,t){assert("BooleanLiteralTypeAnnotation",e,t)}function assertNullLiteralTypeAnnotation(e,t){assert("NullLiteralTypeAnnotation",e,t)}function assertClassImplements(e,t){assert("ClassImplements",e,t)}function assertDeclareClass(e,t){assert("DeclareClass",e,t)}function assertDeclareFunction(e,t){assert("DeclareFunction",e,t)}function assertDeclareInterface(e,t){assert("DeclareInterface",e,t)}function assertDeclareModule(e,t){assert("DeclareModule",e,t)}function assertDeclareModuleExports(e,t){assert("DeclareModuleExports",e,t)}function assertDeclareTypeAlias(e,t){assert("DeclareTypeAlias",e,t)}function assertDeclareOpaqueType(e,t){assert("DeclareOpaqueType",e,t)}function assertDeclareVariable(e,t){assert("DeclareVariable",e,t)}function assertDeclareExportDeclaration(e,t){assert("DeclareExportDeclaration",e,t)}function assertDeclareExportAllDeclaration(e,t){assert("DeclareExportAllDeclaration",e,t)}function assertDeclaredPredicate(e,t){assert("DeclaredPredicate",e,t)}function assertExistsTypeAnnotation(e,t){assert("ExistsTypeAnnotation",e,t)}function assertFunctionTypeAnnotation(e,t){assert("FunctionTypeAnnotation",e,t)}function assertFunctionTypeParam(e,t){assert("FunctionTypeParam",e,t)}function assertGenericTypeAnnotation(e,t){assert("GenericTypeAnnotation",e,t)}function assertInferredPredicate(e,t){assert("InferredPredicate",e,t)}function assertInterfaceExtends(e,t){assert("InterfaceExtends",e,t)}function assertInterfaceDeclaration(e,t){assert("InterfaceDeclaration",e,t)}function assertInterfaceTypeAnnotation(e,t){assert("InterfaceTypeAnnotation",e,t)}function assertIntersectionTypeAnnotation(e,t){assert("IntersectionTypeAnnotation",e,t)}function assertMixedTypeAnnotation(e,t){assert("MixedTypeAnnotation",e,t)}function assertEmptyTypeAnnotation(e,t){assert("EmptyTypeAnnotation",e,t)}function assertNullableTypeAnnotation(e,t){assert("NullableTypeAnnotation",e,t)}function assertNumberLiteralTypeAnnotation(e,t){assert("NumberLiteralTypeAnnotation",e,t)}function assertNumberTypeAnnotation(e,t){assert("NumberTypeAnnotation",e,t)}function assertObjectTypeAnnotation(e,t){assert("ObjectTypeAnnotation",e,t)}function assertObjectTypeInternalSlot(e,t){assert("ObjectTypeInternalSlot",e,t)}function assertObjectTypeCallProperty(e,t){assert("ObjectTypeCallProperty",e,t)}function assertObjectTypeIndexer(e,t){assert("ObjectTypeIndexer",e,t)}function assertObjectTypeProperty(e,t){assert("ObjectTypeProperty",e,t)}function assertObjectTypeSpreadProperty(e,t){assert("ObjectTypeSpreadProperty",e,t)}function assertOpaqueType(e,t){assert("OpaqueType",e,t)}function assertQualifiedTypeIdentifier(e,t){assert("QualifiedTypeIdentifier",e,t)}function assertStringLiteralTypeAnnotation(e,t){assert("StringLiteralTypeAnnotation",e,t)}function assertStringTypeAnnotation(e,t){assert("StringTypeAnnotation",e,t)}function assertSymbolTypeAnnotation(e,t){assert("SymbolTypeAnnotation",e,t)}function assertThisTypeAnnotation(e,t){assert("ThisTypeAnnotation",e,t)}function assertTupleTypeAnnotation(e,t){assert("TupleTypeAnnotation",e,t)}function assertTypeofTypeAnnotation(e,t){assert("TypeofTypeAnnotation",e,t)}function assertTypeAlias(e,t){assert("TypeAlias",e,t)}function assertTypeAnnotation(e,t){assert("TypeAnnotation",e,t)}function assertTypeCastExpression(e,t){assert("TypeCastExpression",e,t)}function assertTypeParameter(e,t){assert("TypeParameter",e,t)}function assertTypeParameterDeclaration(e,t){assert("TypeParameterDeclaration",e,t)}function assertTypeParameterInstantiation(e,t){assert("TypeParameterInstantiation",e,t)}function assertUnionTypeAnnotation(e,t){assert("UnionTypeAnnotation",e,t)}function assertVariance(e,t){assert("Variance",e,t)}function assertVoidTypeAnnotation(e,t){assert("VoidTypeAnnotation",e,t)}function assertEnumDeclaration(e,t){assert("EnumDeclaration",e,t)}function assertEnumBooleanBody(e,t){assert("EnumBooleanBody",e,t)}function assertEnumNumberBody(e,t){assert("EnumNumberBody",e,t)}function assertEnumStringBody(e,t){assert("EnumStringBody",e,t)}function assertEnumSymbolBody(e,t){assert("EnumSymbolBody",e,t)}function assertEnumBooleanMember(e,t){assert("EnumBooleanMember",e,t)}function assertEnumNumberMember(e,t){assert("EnumNumberMember",e,t)}function assertEnumStringMember(e,t){assert("EnumStringMember",e,t)}function assertEnumDefaultedMember(e,t){assert("EnumDefaultedMember",e,t)}function assertJSXAttribute(e,t){assert("JSXAttribute",e,t)}function assertJSXClosingElement(e,t){assert("JSXClosingElement",e,t)}function assertJSXElement(e,t){assert("JSXElement",e,t)}function assertJSXEmptyExpression(e,t){assert("JSXEmptyExpression",e,t)}function assertJSXExpressionContainer(e,t){assert("JSXExpressionContainer",e,t)}function assertJSXSpreadChild(e,t){assert("JSXSpreadChild",e,t)}function assertJSXIdentifier(e,t){assert("JSXIdentifier",e,t)}function assertJSXMemberExpression(e,t){assert("JSXMemberExpression",e,t)}function assertJSXNamespacedName(e,t){assert("JSXNamespacedName",e,t)}function assertJSXOpeningElement(e,t){assert("JSXOpeningElement",e,t)}function assertJSXSpreadAttribute(e,t){assert("JSXSpreadAttribute",e,t)}function assertJSXText(e,t){assert("JSXText",e,t)}function assertJSXFragment(e,t){assert("JSXFragment",e,t)}function assertJSXOpeningFragment(e,t){assert("JSXOpeningFragment",e,t)}function assertJSXClosingFragment(e,t){assert("JSXClosingFragment",e,t)}function assertNoop(e,t){assert("Noop",e,t)}function assertPlaceholder(e,t){assert("Placeholder",e,t)}function assertV8IntrinsicIdentifier(e,t){assert("V8IntrinsicIdentifier",e,t)}function assertArgumentPlaceholder(e,t){assert("ArgumentPlaceholder",e,t)}function assertBindExpression(e,t){assert("BindExpression",e,t)}function assertClassProperty(e,t){assert("ClassProperty",e,t)}function assertPipelineTopicExpression(e,t){assert("PipelineTopicExpression",e,t)}function assertPipelineBareFunction(e,t){assert("PipelineBareFunction",e,t)}function assertPipelinePrimaryTopicReference(e,t){assert("PipelinePrimaryTopicReference",e,t)}function assertClassPrivateProperty(e,t){assert("ClassPrivateProperty",e,t)}function assertClassPrivateMethod(e,t){assert("ClassPrivateMethod",e,t)}function assertImportAttribute(e,t){assert("ImportAttribute",e,t)}function assertDecorator(e,t){assert("Decorator",e,t)}function assertDoExpression(e,t){assert("DoExpression",e,t)}function assertExportDefaultSpecifier(e,t){assert("ExportDefaultSpecifier",e,t)}function assertPrivateName(e,t){assert("PrivateName",e,t)}function assertRecordExpression(e,t){assert("RecordExpression",e,t)}function assertTupleExpression(e,t){assert("TupleExpression",e,t)}function assertDecimalLiteral(e,t){assert("DecimalLiteral",e,t)}function assertStaticBlock(e,t){assert("StaticBlock",e,t)}function assertTSParameterProperty(e,t){assert("TSParameterProperty",e,t)}function assertTSDeclareFunction(e,t){assert("TSDeclareFunction",e,t)}function assertTSDeclareMethod(e,t){assert("TSDeclareMethod",e,t)}function assertTSQualifiedName(e,t){assert("TSQualifiedName",e,t)}function assertTSCallSignatureDeclaration(e,t){assert("TSCallSignatureDeclaration",e,t)}function assertTSConstructSignatureDeclaration(e,t){assert("TSConstructSignatureDeclaration",e,t)}function assertTSPropertySignature(e,t){assert("TSPropertySignature",e,t)}function assertTSMethodSignature(e,t){assert("TSMethodSignature",e,t)}function assertTSIndexSignature(e,t){assert("TSIndexSignature",e,t)}function assertTSAnyKeyword(e,t){assert("TSAnyKeyword",e,t)}function assertTSBooleanKeyword(e,t){assert("TSBooleanKeyword",e,t)}function assertTSBigIntKeyword(e,t){assert("TSBigIntKeyword",e,t)}function assertTSIntrinsicKeyword(e,t){assert("TSIntrinsicKeyword",e,t)}function assertTSNeverKeyword(e,t){assert("TSNeverKeyword",e,t)}function assertTSNullKeyword(e,t){assert("TSNullKeyword",e,t)}function assertTSNumberKeyword(e,t){assert("TSNumberKeyword",e,t)}function assertTSObjectKeyword(e,t){assert("TSObjectKeyword",e,t)}function assertTSStringKeyword(e,t){assert("TSStringKeyword",e,t)}function assertTSSymbolKeyword(e,t){assert("TSSymbolKeyword",e,t)}function assertTSUndefinedKeyword(e,t){assert("TSUndefinedKeyword",e,t)}function assertTSUnknownKeyword(e,t){assert("TSUnknownKeyword",e,t)}function assertTSVoidKeyword(e,t){assert("TSVoidKeyword",e,t)}function assertTSThisType(e,t){assert("TSThisType",e,t)}function assertTSFunctionType(e,t){assert("TSFunctionType",e,t)}function assertTSConstructorType(e,t){assert("TSConstructorType",e,t)}function assertTSTypeReference(e,t){assert("TSTypeReference",e,t)}function assertTSTypePredicate(e,t){assert("TSTypePredicate",e,t)}function assertTSTypeQuery(e,t){assert("TSTypeQuery",e,t)}function assertTSTypeLiteral(e,t){assert("TSTypeLiteral",e,t)}function assertTSArrayType(e,t){assert("TSArrayType",e,t)}function assertTSTupleType(e,t){assert("TSTupleType",e,t)}function assertTSOptionalType(e,t){assert("TSOptionalType",e,t)}function assertTSRestType(e,t){assert("TSRestType",e,t)}function assertTSNamedTupleMember(e,t){assert("TSNamedTupleMember",e,t)}function assertTSUnionType(e,t){assert("TSUnionType",e,t)}function assertTSIntersectionType(e,t){assert("TSIntersectionType",e,t)}function assertTSConditionalType(e,t){assert("TSConditionalType",e,t)}function assertTSInferType(e,t){assert("TSInferType",e,t)}function assertTSParenthesizedType(e,t){assert("TSParenthesizedType",e,t)}function assertTSTypeOperator(e,t){assert("TSTypeOperator",e,t)}function assertTSIndexedAccessType(e,t){assert("TSIndexedAccessType",e,t)}function assertTSMappedType(e,t){assert("TSMappedType",e,t)}function assertTSLiteralType(e,t){assert("TSLiteralType",e,t)}function assertTSExpressionWithTypeArguments(e,t){assert("TSExpressionWithTypeArguments",e,t)}function assertTSInterfaceDeclaration(e,t){assert("TSInterfaceDeclaration",e,t)}function assertTSInterfaceBody(e,t){assert("TSInterfaceBody",e,t)}function assertTSTypeAliasDeclaration(e,t){assert("TSTypeAliasDeclaration",e,t)}function assertTSAsExpression(e,t){assert("TSAsExpression",e,t)}function assertTSTypeAssertion(e,t){assert("TSTypeAssertion",e,t)}function assertTSEnumDeclaration(e,t){assert("TSEnumDeclaration",e,t)}function assertTSEnumMember(e,t){assert("TSEnumMember",e,t)}function assertTSModuleDeclaration(e,t){assert("TSModuleDeclaration",e,t)}function assertTSModuleBlock(e,t){assert("TSModuleBlock",e,t)}function assertTSImportType(e,t){assert("TSImportType",e,t)}function assertTSImportEqualsDeclaration(e,t){assert("TSImportEqualsDeclaration",e,t)}function assertTSExternalModuleReference(e,t){assert("TSExternalModuleReference",e,t)}function assertTSNonNullExpression(e,t){assert("TSNonNullExpression",e,t)}function assertTSExportAssignment(e,t){assert("TSExportAssignment",e,t)}function assertTSNamespaceExportDeclaration(e,t){assert("TSNamespaceExportDeclaration",e,t)}function assertTSTypeAnnotation(e,t){assert("TSTypeAnnotation",e,t)}function assertTSTypeParameterInstantiation(e,t){assert("TSTypeParameterInstantiation",e,t)}function assertTSTypeParameterDeclaration(e,t){assert("TSTypeParameterDeclaration",e,t)}function assertTSTypeParameter(e,t){assert("TSTypeParameter",e,t)}function assertExpression(e,t){assert("Expression",e,t)}function assertBinary(e,t){assert("Binary",e,t)}function assertScopable(e,t){assert("Scopable",e,t)}function assertBlockParent(e,t){assert("BlockParent",e,t)}function assertBlock(e,t){assert("Block",e,t)}function assertStatement(e,t){assert("Statement",e,t)}function assertTerminatorless(e,t){assert("Terminatorless",e,t)}function assertCompletionStatement(e,t){assert("CompletionStatement",e,t)}function assertConditional(e,t){assert("Conditional",e,t)}function assertLoop(e,t){assert("Loop",e,t)}function assertWhile(e,t){assert("While",e,t)}function assertExpressionWrapper(e,t){assert("ExpressionWrapper",e,t)}function assertFor(e,t){assert("For",e,t)}function assertForXStatement(e,t){assert("ForXStatement",e,t)}function assertFunction(e,t){assert("Function",e,t)}function assertFunctionParent(e,t){assert("FunctionParent",e,t)}function assertPureish(e,t){assert("Pureish",e,t)}function assertDeclaration(e,t){assert("Declaration",e,t)}function assertPatternLike(e,t){assert("PatternLike",e,t)}function assertLVal(e,t){assert("LVal",e,t)}function assertTSEntityName(e,t){assert("TSEntityName",e,t)}function assertLiteral(e,t){assert("Literal",e,t)}function assertImmutable(e,t){assert("Immutable",e,t)}function assertUserWhitespacable(e,t){assert("UserWhitespacable",e,t)}function assertMethod(e,t){assert("Method",e,t)}function assertObjectMember(e,t){assert("ObjectMember",e,t)}function assertProperty(e,t){assert("Property",e,t)}function assertUnaryLike(e,t){assert("UnaryLike",e,t)}function assertPattern(e,t){assert("Pattern",e,t)}function assertClass(e,t){assert("Class",e,t)}function assertModuleDeclaration(e,t){assert("ModuleDeclaration",e,t)}function assertExportDeclaration(e,t){assert("ExportDeclaration",e,t)}function assertModuleSpecifier(e,t){assert("ModuleSpecifier",e,t)}function assertFlow(e,t){assert("Flow",e,t)}function assertFlowType(e,t){assert("FlowType",e,t)}function assertFlowBaseAnnotation(e,t){assert("FlowBaseAnnotation",e,t)}function assertFlowDeclaration(e,t){assert("FlowDeclaration",e,t)}function assertFlowPredicate(e,t){assert("FlowPredicate",e,t)}function assertEnumBody(e,t){assert("EnumBody",e,t)}function assertEnumMember(e,t){assert("EnumMember",e,t)}function assertJSX(e,t){assert("JSX",e,t)}function assertPrivate(e,t){assert("Private",e,t)}function assertTSTypeElement(e,t){assert("TSTypeElement",e,t)}function assertTSType(e,t){assert("TSType",e,t)}function assertTSBaseType(e,t){assert("TSBaseType",e,t)}function assertNumberLiteral(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral");assert("NumberLiteral",e,t)}function assertRegexLiteral(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");assert("RegexLiteral",e,t)}function assertRestProperty(e,t){console.trace("The node type RestProperty has been renamed to RestElement");assert("RestProperty",e,t)}function assertSpreadProperty(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement");assert("SpreadProperty",e,t)}},5416:()=>{},59281:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=builder;var s=_interopRequireDefault(r(31471));var n=r(74098);var a=_interopRequireDefault(r(81236));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function builder(e,...t){const r=n.BUILDER_KEYS[e];const i=t.length;if(i>r.length){throw new Error(`${e}: Too many arguments passed. Received ${i} but can receive no more than ${r.length}`)}const o={type:e};let l=0;r.forEach(r=>{const a=n.NODE_FIELDS[e][r];let u;if(l{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=createFlowUnionType;var s=r(35093);var n=_interopRequireDefault(r(77523));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function createFlowUnionType(e){const t=(0,n.default)(e);if(t.length===1){return t[0]}else{return(0,s.unionTypeAnnotation)(t)}}},52989:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=createTypeAnnotationBasedOnTypeof;var s=r(35093);function createTypeAnnotationBasedOnTypeof(e){if(e==="string"){return(0,s.stringTypeAnnotation)()}else if(e==="number"){return(0,s.numberTypeAnnotation)()}else if(e==="undefined"){return(0,s.voidTypeAnnotation)()}else if(e==="boolean"){return(0,s.booleanTypeAnnotation)()}else if(e==="function"){return(0,s.genericTypeAnnotation)((0,s.identifier)("Function"))}else if(e==="object"){return(0,s.genericTypeAnnotation)((0,s.identifier)("Object"))}else if(e==="symbol"){return(0,s.genericTypeAnnotation)((0,s.identifier)("Symbol"))}else{throw new Error("Invalid typeof value")}}},35093:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.arrayExpression=arrayExpression;t.assignmentExpression=assignmentExpression;t.binaryExpression=binaryExpression;t.interpreterDirective=interpreterDirective;t.directive=directive;t.directiveLiteral=directiveLiteral;t.blockStatement=blockStatement;t.breakStatement=breakStatement;t.callExpression=callExpression;t.catchClause=catchClause;t.conditionalExpression=conditionalExpression;t.continueStatement=continueStatement;t.debuggerStatement=debuggerStatement;t.doWhileStatement=doWhileStatement;t.emptyStatement=emptyStatement;t.expressionStatement=expressionStatement;t.file=file;t.forInStatement=forInStatement;t.forStatement=forStatement;t.functionDeclaration=functionDeclaration;t.functionExpression=functionExpression;t.identifier=identifier;t.ifStatement=ifStatement;t.labeledStatement=labeledStatement;t.stringLiteral=stringLiteral;t.numericLiteral=numericLiteral;t.nullLiteral=nullLiteral;t.booleanLiteral=booleanLiteral;t.regExpLiteral=regExpLiteral;t.logicalExpression=logicalExpression;t.memberExpression=memberExpression;t.newExpression=newExpression;t.program=program;t.objectExpression=objectExpression;t.objectMethod=objectMethod;t.objectProperty=objectProperty;t.restElement=restElement;t.returnStatement=returnStatement;t.sequenceExpression=sequenceExpression;t.parenthesizedExpression=parenthesizedExpression;t.switchCase=switchCase;t.switchStatement=switchStatement;t.thisExpression=thisExpression;t.throwStatement=throwStatement;t.tryStatement=tryStatement;t.unaryExpression=unaryExpression;t.updateExpression=updateExpression;t.variableDeclaration=variableDeclaration;t.variableDeclarator=variableDeclarator;t.whileStatement=whileStatement;t.withStatement=withStatement;t.assignmentPattern=assignmentPattern;t.arrayPattern=arrayPattern;t.arrowFunctionExpression=arrowFunctionExpression;t.classBody=classBody;t.classExpression=classExpression;t.classDeclaration=classDeclaration;t.exportAllDeclaration=exportAllDeclaration;t.exportDefaultDeclaration=exportDefaultDeclaration;t.exportNamedDeclaration=exportNamedDeclaration;t.exportSpecifier=exportSpecifier;t.forOfStatement=forOfStatement;t.importDeclaration=importDeclaration;t.importDefaultSpecifier=importDefaultSpecifier;t.importNamespaceSpecifier=importNamespaceSpecifier;t.importSpecifier=importSpecifier;t.metaProperty=metaProperty;t.classMethod=classMethod;t.objectPattern=objectPattern;t.spreadElement=spreadElement;t.super=_super;t.taggedTemplateExpression=taggedTemplateExpression;t.templateElement=templateElement;t.templateLiteral=templateLiteral;t.yieldExpression=yieldExpression;t.awaitExpression=awaitExpression;t.import=_import;t.bigIntLiteral=bigIntLiteral;t.exportNamespaceSpecifier=exportNamespaceSpecifier;t.optionalMemberExpression=optionalMemberExpression;t.optionalCallExpression=optionalCallExpression;t.anyTypeAnnotation=anyTypeAnnotation;t.arrayTypeAnnotation=arrayTypeAnnotation;t.booleanTypeAnnotation=booleanTypeAnnotation;t.booleanLiteralTypeAnnotation=booleanLiteralTypeAnnotation;t.nullLiteralTypeAnnotation=nullLiteralTypeAnnotation;t.classImplements=classImplements;t.declareClass=declareClass;t.declareFunction=declareFunction;t.declareInterface=declareInterface;t.declareModule=declareModule;t.declareModuleExports=declareModuleExports;t.declareTypeAlias=declareTypeAlias;t.declareOpaqueType=declareOpaqueType;t.declareVariable=declareVariable;t.declareExportDeclaration=declareExportDeclaration;t.declareExportAllDeclaration=declareExportAllDeclaration;t.declaredPredicate=declaredPredicate;t.existsTypeAnnotation=existsTypeAnnotation;t.functionTypeAnnotation=functionTypeAnnotation;t.functionTypeParam=functionTypeParam;t.genericTypeAnnotation=genericTypeAnnotation;t.inferredPredicate=inferredPredicate;t.interfaceExtends=interfaceExtends;t.interfaceDeclaration=interfaceDeclaration;t.interfaceTypeAnnotation=interfaceTypeAnnotation;t.intersectionTypeAnnotation=intersectionTypeAnnotation;t.mixedTypeAnnotation=mixedTypeAnnotation;t.emptyTypeAnnotation=emptyTypeAnnotation;t.nullableTypeAnnotation=nullableTypeAnnotation;t.numberLiteralTypeAnnotation=numberLiteralTypeAnnotation;t.numberTypeAnnotation=numberTypeAnnotation;t.objectTypeAnnotation=objectTypeAnnotation;t.objectTypeInternalSlot=objectTypeInternalSlot;t.objectTypeCallProperty=objectTypeCallProperty;t.objectTypeIndexer=objectTypeIndexer;t.objectTypeProperty=objectTypeProperty;t.objectTypeSpreadProperty=objectTypeSpreadProperty;t.opaqueType=opaqueType;t.qualifiedTypeIdentifier=qualifiedTypeIdentifier;t.stringLiteralTypeAnnotation=stringLiteralTypeAnnotation;t.stringTypeAnnotation=stringTypeAnnotation;t.symbolTypeAnnotation=symbolTypeAnnotation;t.thisTypeAnnotation=thisTypeAnnotation;t.tupleTypeAnnotation=tupleTypeAnnotation;t.typeofTypeAnnotation=typeofTypeAnnotation;t.typeAlias=typeAlias;t.typeAnnotation=typeAnnotation;t.typeCastExpression=typeCastExpression;t.typeParameter=typeParameter;t.typeParameterDeclaration=typeParameterDeclaration;t.typeParameterInstantiation=typeParameterInstantiation;t.unionTypeAnnotation=unionTypeAnnotation;t.variance=variance;t.voidTypeAnnotation=voidTypeAnnotation;t.enumDeclaration=enumDeclaration;t.enumBooleanBody=enumBooleanBody;t.enumNumberBody=enumNumberBody;t.enumStringBody=enumStringBody;t.enumSymbolBody=enumSymbolBody;t.enumBooleanMember=enumBooleanMember;t.enumNumberMember=enumNumberMember;t.enumStringMember=enumStringMember;t.enumDefaultedMember=enumDefaultedMember;t.jSXAttribute=t.jsxAttribute=jsxAttribute;t.jSXClosingElement=t.jsxClosingElement=jsxClosingElement;t.jSXElement=t.jsxElement=jsxElement;t.jSXEmptyExpression=t.jsxEmptyExpression=jsxEmptyExpression;t.jSXExpressionContainer=t.jsxExpressionContainer=jsxExpressionContainer;t.jSXSpreadChild=t.jsxSpreadChild=jsxSpreadChild;t.jSXIdentifier=t.jsxIdentifier=jsxIdentifier;t.jSXMemberExpression=t.jsxMemberExpression=jsxMemberExpression;t.jSXNamespacedName=t.jsxNamespacedName=jsxNamespacedName;t.jSXOpeningElement=t.jsxOpeningElement=jsxOpeningElement;t.jSXSpreadAttribute=t.jsxSpreadAttribute=jsxSpreadAttribute;t.jSXText=t.jsxText=jsxText;t.jSXFragment=t.jsxFragment=jsxFragment;t.jSXOpeningFragment=t.jsxOpeningFragment=jsxOpeningFragment;t.jSXClosingFragment=t.jsxClosingFragment=jsxClosingFragment;t.noop=noop;t.placeholder=placeholder;t.v8IntrinsicIdentifier=v8IntrinsicIdentifier;t.argumentPlaceholder=argumentPlaceholder;t.bindExpression=bindExpression;t.classProperty=classProperty;t.pipelineTopicExpression=pipelineTopicExpression;t.pipelineBareFunction=pipelineBareFunction;t.pipelinePrimaryTopicReference=pipelinePrimaryTopicReference;t.classPrivateProperty=classPrivateProperty;t.classPrivateMethod=classPrivateMethod;t.importAttribute=importAttribute;t.decorator=decorator;t.doExpression=doExpression;t.exportDefaultSpecifier=exportDefaultSpecifier;t.privateName=privateName;t.recordExpression=recordExpression;t.tupleExpression=tupleExpression;t.decimalLiteral=decimalLiteral;t.staticBlock=staticBlock;t.tSParameterProperty=t.tsParameterProperty=tsParameterProperty;t.tSDeclareFunction=t.tsDeclareFunction=tsDeclareFunction;t.tSDeclareMethod=t.tsDeclareMethod=tsDeclareMethod;t.tSQualifiedName=t.tsQualifiedName=tsQualifiedName;t.tSCallSignatureDeclaration=t.tsCallSignatureDeclaration=tsCallSignatureDeclaration;t.tSConstructSignatureDeclaration=t.tsConstructSignatureDeclaration=tsConstructSignatureDeclaration;t.tSPropertySignature=t.tsPropertySignature=tsPropertySignature;t.tSMethodSignature=t.tsMethodSignature=tsMethodSignature;t.tSIndexSignature=t.tsIndexSignature=tsIndexSignature;t.tSAnyKeyword=t.tsAnyKeyword=tsAnyKeyword;t.tSBooleanKeyword=t.tsBooleanKeyword=tsBooleanKeyword;t.tSBigIntKeyword=t.tsBigIntKeyword=tsBigIntKeyword;t.tSIntrinsicKeyword=t.tsIntrinsicKeyword=tsIntrinsicKeyword;t.tSNeverKeyword=t.tsNeverKeyword=tsNeverKeyword;t.tSNullKeyword=t.tsNullKeyword=tsNullKeyword;t.tSNumberKeyword=t.tsNumberKeyword=tsNumberKeyword;t.tSObjectKeyword=t.tsObjectKeyword=tsObjectKeyword;t.tSStringKeyword=t.tsStringKeyword=tsStringKeyword;t.tSSymbolKeyword=t.tsSymbolKeyword=tsSymbolKeyword;t.tSUndefinedKeyword=t.tsUndefinedKeyword=tsUndefinedKeyword;t.tSUnknownKeyword=t.tsUnknownKeyword=tsUnknownKeyword;t.tSVoidKeyword=t.tsVoidKeyword=tsVoidKeyword;t.tSThisType=t.tsThisType=tsThisType;t.tSFunctionType=t.tsFunctionType=tsFunctionType;t.tSConstructorType=t.tsConstructorType=tsConstructorType;t.tSTypeReference=t.tsTypeReference=tsTypeReference;t.tSTypePredicate=t.tsTypePredicate=tsTypePredicate;t.tSTypeQuery=t.tsTypeQuery=tsTypeQuery;t.tSTypeLiteral=t.tsTypeLiteral=tsTypeLiteral;t.tSArrayType=t.tsArrayType=tsArrayType;t.tSTupleType=t.tsTupleType=tsTupleType;t.tSOptionalType=t.tsOptionalType=tsOptionalType;t.tSRestType=t.tsRestType=tsRestType;t.tSNamedTupleMember=t.tsNamedTupleMember=tsNamedTupleMember;t.tSUnionType=t.tsUnionType=tsUnionType;t.tSIntersectionType=t.tsIntersectionType=tsIntersectionType;t.tSConditionalType=t.tsConditionalType=tsConditionalType;t.tSInferType=t.tsInferType=tsInferType;t.tSParenthesizedType=t.tsParenthesizedType=tsParenthesizedType;t.tSTypeOperator=t.tsTypeOperator=tsTypeOperator;t.tSIndexedAccessType=t.tsIndexedAccessType=tsIndexedAccessType;t.tSMappedType=t.tsMappedType=tsMappedType;t.tSLiteralType=t.tsLiteralType=tsLiteralType;t.tSExpressionWithTypeArguments=t.tsExpressionWithTypeArguments=tsExpressionWithTypeArguments;t.tSInterfaceDeclaration=t.tsInterfaceDeclaration=tsInterfaceDeclaration;t.tSInterfaceBody=t.tsInterfaceBody=tsInterfaceBody;t.tSTypeAliasDeclaration=t.tsTypeAliasDeclaration=tsTypeAliasDeclaration;t.tSAsExpression=t.tsAsExpression=tsAsExpression;t.tSTypeAssertion=t.tsTypeAssertion=tsTypeAssertion;t.tSEnumDeclaration=t.tsEnumDeclaration=tsEnumDeclaration;t.tSEnumMember=t.tsEnumMember=tsEnumMember;t.tSModuleDeclaration=t.tsModuleDeclaration=tsModuleDeclaration;t.tSModuleBlock=t.tsModuleBlock=tsModuleBlock;t.tSImportType=t.tsImportType=tsImportType;t.tSImportEqualsDeclaration=t.tsImportEqualsDeclaration=tsImportEqualsDeclaration;t.tSExternalModuleReference=t.tsExternalModuleReference=tsExternalModuleReference;t.tSNonNullExpression=t.tsNonNullExpression=tsNonNullExpression;t.tSExportAssignment=t.tsExportAssignment=tsExportAssignment;t.tSNamespaceExportDeclaration=t.tsNamespaceExportDeclaration=tsNamespaceExportDeclaration;t.tSTypeAnnotation=t.tsTypeAnnotation=tsTypeAnnotation;t.tSTypeParameterInstantiation=t.tsTypeParameterInstantiation=tsTypeParameterInstantiation;t.tSTypeParameterDeclaration=t.tsTypeParameterDeclaration=tsTypeParameterDeclaration;t.tSTypeParameter=t.tsTypeParameter=tsTypeParameter;t.numberLiteral=NumberLiteral;t.regexLiteral=RegexLiteral;t.restProperty=RestProperty;t.spreadProperty=SpreadProperty;var s=_interopRequireDefault(r(59281));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function arrayExpression(e){return(0,s.default)("ArrayExpression",...arguments)}function assignmentExpression(e,t,r){return(0,s.default)("AssignmentExpression",...arguments)}function binaryExpression(e,t,r){return(0,s.default)("BinaryExpression",...arguments)}function interpreterDirective(e){return(0,s.default)("InterpreterDirective",...arguments)}function directive(e){return(0,s.default)("Directive",...arguments)}function directiveLiteral(e){return(0,s.default)("DirectiveLiteral",...arguments)}function blockStatement(e,t){return(0,s.default)("BlockStatement",...arguments)}function breakStatement(e){return(0,s.default)("BreakStatement",...arguments)}function callExpression(e,t){return(0,s.default)("CallExpression",...arguments)}function catchClause(e,t){return(0,s.default)("CatchClause",...arguments)}function conditionalExpression(e,t,r){return(0,s.default)("ConditionalExpression",...arguments)}function continueStatement(e){return(0,s.default)("ContinueStatement",...arguments)}function debuggerStatement(){return(0,s.default)("DebuggerStatement",...arguments)}function doWhileStatement(e,t){return(0,s.default)("DoWhileStatement",...arguments)}function emptyStatement(){return(0,s.default)("EmptyStatement",...arguments)}function expressionStatement(e){return(0,s.default)("ExpressionStatement",...arguments)}function file(e,t,r){return(0,s.default)("File",...arguments)}function forInStatement(e,t,r){return(0,s.default)("ForInStatement",...arguments)}function forStatement(e,t,r,n){return(0,s.default)("ForStatement",...arguments)}function functionDeclaration(e,t,r,n,a){return(0,s.default)("FunctionDeclaration",...arguments)}function functionExpression(e,t,r,n,a){return(0,s.default)("FunctionExpression",...arguments)}function identifier(e){return(0,s.default)("Identifier",...arguments)}function ifStatement(e,t,r){return(0,s.default)("IfStatement",...arguments)}function labeledStatement(e,t){return(0,s.default)("LabeledStatement",...arguments)}function stringLiteral(e){return(0,s.default)("StringLiteral",...arguments)}function numericLiteral(e){return(0,s.default)("NumericLiteral",...arguments)}function nullLiteral(){return(0,s.default)("NullLiteral",...arguments)}function booleanLiteral(e){return(0,s.default)("BooleanLiteral",...arguments)}function regExpLiteral(e,t){return(0,s.default)("RegExpLiteral",...arguments)}function logicalExpression(e,t,r){return(0,s.default)("LogicalExpression",...arguments)}function memberExpression(e,t,r,n){return(0,s.default)("MemberExpression",...arguments)}function newExpression(e,t){return(0,s.default)("NewExpression",...arguments)}function program(e,t,r,n){return(0,s.default)("Program",...arguments)}function objectExpression(e){return(0,s.default)("ObjectExpression",...arguments)}function objectMethod(e,t,r,n,a,i,o){return(0,s.default)("ObjectMethod",...arguments)}function objectProperty(e,t,r,n,a){return(0,s.default)("ObjectProperty",...arguments)}function restElement(e){return(0,s.default)("RestElement",...arguments)}function returnStatement(e){return(0,s.default)("ReturnStatement",...arguments)}function sequenceExpression(e){return(0,s.default)("SequenceExpression",...arguments)}function parenthesizedExpression(e){return(0,s.default)("ParenthesizedExpression",...arguments)}function switchCase(e,t){return(0,s.default)("SwitchCase",...arguments)}function switchStatement(e,t){return(0,s.default)("SwitchStatement",...arguments)}function thisExpression(){return(0,s.default)("ThisExpression",...arguments)}function throwStatement(e){return(0,s.default)("ThrowStatement",...arguments)}function tryStatement(e,t,r){return(0,s.default)("TryStatement",...arguments)}function unaryExpression(e,t,r){return(0,s.default)("UnaryExpression",...arguments)}function updateExpression(e,t,r){return(0,s.default)("UpdateExpression",...arguments)}function variableDeclaration(e,t){return(0,s.default)("VariableDeclaration",...arguments)}function variableDeclarator(e,t){return(0,s.default)("VariableDeclarator",...arguments)}function whileStatement(e,t){return(0,s.default)("WhileStatement",...arguments)}function withStatement(e,t){return(0,s.default)("WithStatement",...arguments)}function assignmentPattern(e,t){return(0,s.default)("AssignmentPattern",...arguments)}function arrayPattern(e){return(0,s.default)("ArrayPattern",...arguments)}function arrowFunctionExpression(e,t,r){return(0,s.default)("ArrowFunctionExpression",...arguments)}function classBody(e){return(0,s.default)("ClassBody",...arguments)}function classExpression(e,t,r,n){return(0,s.default)("ClassExpression",...arguments)}function classDeclaration(e,t,r,n){return(0,s.default)("ClassDeclaration",...arguments)}function exportAllDeclaration(e){return(0,s.default)("ExportAllDeclaration",...arguments)}function exportDefaultDeclaration(e){return(0,s.default)("ExportDefaultDeclaration",...arguments)}function exportNamedDeclaration(e,t,r){return(0,s.default)("ExportNamedDeclaration",...arguments)}function exportSpecifier(e,t){return(0,s.default)("ExportSpecifier",...arguments)}function forOfStatement(e,t,r,n){return(0,s.default)("ForOfStatement",...arguments)}function importDeclaration(e,t){return(0,s.default)("ImportDeclaration",...arguments)}function importDefaultSpecifier(e){return(0,s.default)("ImportDefaultSpecifier",...arguments)}function importNamespaceSpecifier(e){return(0,s.default)("ImportNamespaceSpecifier",...arguments)}function importSpecifier(e,t){return(0,s.default)("ImportSpecifier",...arguments)}function metaProperty(e,t){return(0,s.default)("MetaProperty",...arguments)}function classMethod(e,t,r,n,a,i,o,l){return(0,s.default)("ClassMethod",...arguments)}function objectPattern(e){return(0,s.default)("ObjectPattern",...arguments)}function spreadElement(e){return(0,s.default)("SpreadElement",...arguments)}function _super(){return(0,s.default)("Super",...arguments)}function taggedTemplateExpression(e,t){return(0,s.default)("TaggedTemplateExpression",...arguments)}function templateElement(e,t){return(0,s.default)("TemplateElement",...arguments)}function templateLiteral(e,t){return(0,s.default)("TemplateLiteral",...arguments)}function yieldExpression(e,t){return(0,s.default)("YieldExpression",...arguments)}function awaitExpression(e){return(0,s.default)("AwaitExpression",...arguments)}function _import(){return(0,s.default)("Import",...arguments)}function bigIntLiteral(e){return(0,s.default)("BigIntLiteral",...arguments)}function exportNamespaceSpecifier(e){return(0,s.default)("ExportNamespaceSpecifier",...arguments)}function optionalMemberExpression(e,t,r,n){return(0,s.default)("OptionalMemberExpression",...arguments)}function optionalCallExpression(e,t,r){return(0,s.default)("OptionalCallExpression",...arguments)}function anyTypeAnnotation(){return(0,s.default)("AnyTypeAnnotation",...arguments)}function arrayTypeAnnotation(e){return(0,s.default)("ArrayTypeAnnotation",...arguments)}function booleanTypeAnnotation(){return(0,s.default)("BooleanTypeAnnotation",...arguments)}function booleanLiteralTypeAnnotation(e){return(0,s.default)("BooleanLiteralTypeAnnotation",...arguments)}function nullLiteralTypeAnnotation(){return(0,s.default)("NullLiteralTypeAnnotation",...arguments)}function classImplements(e,t){return(0,s.default)("ClassImplements",...arguments)}function declareClass(e,t,r,n){return(0,s.default)("DeclareClass",...arguments)}function declareFunction(e){return(0,s.default)("DeclareFunction",...arguments)}function declareInterface(e,t,r,n){return(0,s.default)("DeclareInterface",...arguments)}function declareModule(e,t,r){return(0,s.default)("DeclareModule",...arguments)}function declareModuleExports(e){return(0,s.default)("DeclareModuleExports",...arguments)}function declareTypeAlias(e,t,r){return(0,s.default)("DeclareTypeAlias",...arguments)}function declareOpaqueType(e,t,r){return(0,s.default)("DeclareOpaqueType",...arguments)}function declareVariable(e){return(0,s.default)("DeclareVariable",...arguments)}function declareExportDeclaration(e,t,r){return(0,s.default)("DeclareExportDeclaration",...arguments)}function declareExportAllDeclaration(e){return(0,s.default)("DeclareExportAllDeclaration",...arguments)}function declaredPredicate(e){return(0,s.default)("DeclaredPredicate",...arguments)}function existsTypeAnnotation(){return(0,s.default)("ExistsTypeAnnotation",...arguments)}function functionTypeAnnotation(e,t,r,n){return(0,s.default)("FunctionTypeAnnotation",...arguments)}function functionTypeParam(e,t){return(0,s.default)("FunctionTypeParam",...arguments)}function genericTypeAnnotation(e,t){return(0,s.default)("GenericTypeAnnotation",...arguments)}function inferredPredicate(){return(0,s.default)("InferredPredicate",...arguments)}function interfaceExtends(e,t){return(0,s.default)("InterfaceExtends",...arguments)}function interfaceDeclaration(e,t,r,n){return(0,s.default)("InterfaceDeclaration",...arguments)}function interfaceTypeAnnotation(e,t){return(0,s.default)("InterfaceTypeAnnotation",...arguments)}function intersectionTypeAnnotation(e){return(0,s.default)("IntersectionTypeAnnotation",...arguments)}function mixedTypeAnnotation(){return(0,s.default)("MixedTypeAnnotation",...arguments)}function emptyTypeAnnotation(){return(0,s.default)("EmptyTypeAnnotation",...arguments)}function nullableTypeAnnotation(e){return(0,s.default)("NullableTypeAnnotation",...arguments)}function numberLiteralTypeAnnotation(e){return(0,s.default)("NumberLiteralTypeAnnotation",...arguments)}function numberTypeAnnotation(){return(0,s.default)("NumberTypeAnnotation",...arguments)}function objectTypeAnnotation(e,t,r,n,a){return(0,s.default)("ObjectTypeAnnotation",...arguments)}function objectTypeInternalSlot(e,t,r,n,a){return(0,s.default)("ObjectTypeInternalSlot",...arguments)}function objectTypeCallProperty(e){return(0,s.default)("ObjectTypeCallProperty",...arguments)}function objectTypeIndexer(e,t,r,n){return(0,s.default)("ObjectTypeIndexer",...arguments)}function objectTypeProperty(e,t,r){return(0,s.default)("ObjectTypeProperty",...arguments)}function objectTypeSpreadProperty(e){return(0,s.default)("ObjectTypeSpreadProperty",...arguments)}function opaqueType(e,t,r,n){return(0,s.default)("OpaqueType",...arguments)}function qualifiedTypeIdentifier(e,t){return(0,s.default)("QualifiedTypeIdentifier",...arguments)}function stringLiteralTypeAnnotation(e){return(0,s.default)("StringLiteralTypeAnnotation",...arguments)}function stringTypeAnnotation(){return(0,s.default)("StringTypeAnnotation",...arguments)}function symbolTypeAnnotation(){return(0,s.default)("SymbolTypeAnnotation",...arguments)}function thisTypeAnnotation(){return(0,s.default)("ThisTypeAnnotation",...arguments)}function tupleTypeAnnotation(e){return(0,s.default)("TupleTypeAnnotation",...arguments)}function typeofTypeAnnotation(e){return(0,s.default)("TypeofTypeAnnotation",...arguments)}function typeAlias(e,t,r){return(0,s.default)("TypeAlias",...arguments)}function typeAnnotation(e){return(0,s.default)("TypeAnnotation",...arguments)}function typeCastExpression(e,t){return(0,s.default)("TypeCastExpression",...arguments)}function typeParameter(e,t,r){return(0,s.default)("TypeParameter",...arguments)}function typeParameterDeclaration(e){return(0,s.default)("TypeParameterDeclaration",...arguments)}function typeParameterInstantiation(e){return(0,s.default)("TypeParameterInstantiation",...arguments)}function unionTypeAnnotation(e){return(0,s.default)("UnionTypeAnnotation",...arguments)}function variance(e){return(0,s.default)("Variance",...arguments)}function voidTypeAnnotation(){return(0,s.default)("VoidTypeAnnotation",...arguments)}function enumDeclaration(e,t){return(0,s.default)("EnumDeclaration",...arguments)}function enumBooleanBody(e){return(0,s.default)("EnumBooleanBody",...arguments)}function enumNumberBody(e){return(0,s.default)("EnumNumberBody",...arguments)}function enumStringBody(e){return(0,s.default)("EnumStringBody",...arguments)}function enumSymbolBody(e){return(0,s.default)("EnumSymbolBody",...arguments)}function enumBooleanMember(e){return(0,s.default)("EnumBooleanMember",...arguments)}function enumNumberMember(e,t){return(0,s.default)("EnumNumberMember",...arguments)}function enumStringMember(e,t){return(0,s.default)("EnumStringMember",...arguments)}function enumDefaultedMember(e){return(0,s.default)("EnumDefaultedMember",...arguments)}function jsxAttribute(e,t){return(0,s.default)("JSXAttribute",...arguments)}function jsxClosingElement(e){return(0,s.default)("JSXClosingElement",...arguments)}function jsxElement(e,t,r,n){return(0,s.default)("JSXElement",...arguments)}function jsxEmptyExpression(){return(0,s.default)("JSXEmptyExpression",...arguments)}function jsxExpressionContainer(e){return(0,s.default)("JSXExpressionContainer",...arguments)}function jsxSpreadChild(e){return(0,s.default)("JSXSpreadChild",...arguments)}function jsxIdentifier(e){return(0,s.default)("JSXIdentifier",...arguments)}function jsxMemberExpression(e,t){return(0,s.default)("JSXMemberExpression",...arguments)}function jsxNamespacedName(e,t){return(0,s.default)("JSXNamespacedName",...arguments)}function jsxOpeningElement(e,t,r){return(0,s.default)("JSXOpeningElement",...arguments)}function jsxSpreadAttribute(e){return(0,s.default)("JSXSpreadAttribute",...arguments)}function jsxText(e){return(0,s.default)("JSXText",...arguments)}function jsxFragment(e,t,r){return(0,s.default)("JSXFragment",...arguments)}function jsxOpeningFragment(){return(0,s.default)("JSXOpeningFragment",...arguments)}function jsxClosingFragment(){return(0,s.default)("JSXClosingFragment",...arguments)}function noop(){return(0,s.default)("Noop",...arguments)}function placeholder(e,t){return(0,s.default)("Placeholder",...arguments)}function v8IntrinsicIdentifier(e){return(0,s.default)("V8IntrinsicIdentifier",...arguments)}function argumentPlaceholder(){return(0,s.default)("ArgumentPlaceholder",...arguments)}function bindExpression(e,t){return(0,s.default)("BindExpression",...arguments)}function classProperty(e,t,r,n,a,i){return(0,s.default)("ClassProperty",...arguments)}function pipelineTopicExpression(e){return(0,s.default)("PipelineTopicExpression",...arguments)}function pipelineBareFunction(e){return(0,s.default)("PipelineBareFunction",...arguments)}function pipelinePrimaryTopicReference(){return(0,s.default)("PipelinePrimaryTopicReference",...arguments)}function classPrivateProperty(e,t,r,n){return(0,s.default)("ClassPrivateProperty",...arguments)}function classPrivateMethod(e,t,r,n,a){return(0,s.default)("ClassPrivateMethod",...arguments)}function importAttribute(e,t){return(0,s.default)("ImportAttribute",...arguments)}function decorator(e){return(0,s.default)("Decorator",...arguments)}function doExpression(e){return(0,s.default)("DoExpression",...arguments)}function exportDefaultSpecifier(e){return(0,s.default)("ExportDefaultSpecifier",...arguments)}function privateName(e){return(0,s.default)("PrivateName",...arguments)}function recordExpression(e){return(0,s.default)("RecordExpression",...arguments)}function tupleExpression(e){return(0,s.default)("TupleExpression",...arguments)}function decimalLiteral(e){return(0,s.default)("DecimalLiteral",...arguments)}function staticBlock(e){return(0,s.default)("StaticBlock",...arguments)}function tsParameterProperty(e){return(0,s.default)("TSParameterProperty",...arguments)}function tsDeclareFunction(e,t,r,n){return(0,s.default)("TSDeclareFunction",...arguments)}function tsDeclareMethod(e,t,r,n,a){return(0,s.default)("TSDeclareMethod",...arguments)}function tsQualifiedName(e,t){return(0,s.default)("TSQualifiedName",...arguments)}function tsCallSignatureDeclaration(e,t,r){return(0,s.default)("TSCallSignatureDeclaration",...arguments)}function tsConstructSignatureDeclaration(e,t,r){return(0,s.default)("TSConstructSignatureDeclaration",...arguments)}function tsPropertySignature(e,t,r){return(0,s.default)("TSPropertySignature",...arguments)}function tsMethodSignature(e,t,r,n){return(0,s.default)("TSMethodSignature",...arguments)}function tsIndexSignature(e,t){return(0,s.default)("TSIndexSignature",...arguments)}function tsAnyKeyword(){return(0,s.default)("TSAnyKeyword",...arguments)}function tsBooleanKeyword(){return(0,s.default)("TSBooleanKeyword",...arguments)}function tsBigIntKeyword(){return(0,s.default)("TSBigIntKeyword",...arguments)}function tsIntrinsicKeyword(){return(0,s.default)("TSIntrinsicKeyword",...arguments)}function tsNeverKeyword(){return(0,s.default)("TSNeverKeyword",...arguments)}function tsNullKeyword(){return(0,s.default)("TSNullKeyword",...arguments)}function tsNumberKeyword(){return(0,s.default)("TSNumberKeyword",...arguments)}function tsObjectKeyword(){return(0,s.default)("TSObjectKeyword",...arguments)}function tsStringKeyword(){return(0,s.default)("TSStringKeyword",...arguments)}function tsSymbolKeyword(){return(0,s.default)("TSSymbolKeyword",...arguments)}function tsUndefinedKeyword(){return(0,s.default)("TSUndefinedKeyword",...arguments)}function tsUnknownKeyword(){return(0,s.default)("TSUnknownKeyword",...arguments)}function tsVoidKeyword(){return(0,s.default)("TSVoidKeyword",...arguments)}function tsThisType(){return(0,s.default)("TSThisType",...arguments)}function tsFunctionType(e,t,r){return(0,s.default)("TSFunctionType",...arguments)}function tsConstructorType(e,t,r){return(0,s.default)("TSConstructorType",...arguments)}function tsTypeReference(e,t){return(0,s.default)("TSTypeReference",...arguments)}function tsTypePredicate(e,t,r){return(0,s.default)("TSTypePredicate",...arguments)}function tsTypeQuery(e){return(0,s.default)("TSTypeQuery",...arguments)}function tsTypeLiteral(e){return(0,s.default)("TSTypeLiteral",...arguments)}function tsArrayType(e){return(0,s.default)("TSArrayType",...arguments)}function tsTupleType(e){return(0,s.default)("TSTupleType",...arguments)}function tsOptionalType(e){return(0,s.default)("TSOptionalType",...arguments)}function tsRestType(e){return(0,s.default)("TSRestType",...arguments)}function tsNamedTupleMember(e,t,r){return(0,s.default)("TSNamedTupleMember",...arguments)}function tsUnionType(e){return(0,s.default)("TSUnionType",...arguments)}function tsIntersectionType(e){return(0,s.default)("TSIntersectionType",...arguments)}function tsConditionalType(e,t,r,n){return(0,s.default)("TSConditionalType",...arguments)}function tsInferType(e){return(0,s.default)("TSInferType",...arguments)}function tsParenthesizedType(e){return(0,s.default)("TSParenthesizedType",...arguments)}function tsTypeOperator(e){return(0,s.default)("TSTypeOperator",...arguments)}function tsIndexedAccessType(e,t){return(0,s.default)("TSIndexedAccessType",...arguments)}function tsMappedType(e,t,r){return(0,s.default)("TSMappedType",...arguments)}function tsLiteralType(e){return(0,s.default)("TSLiteralType",...arguments)}function tsExpressionWithTypeArguments(e,t){return(0,s.default)("TSExpressionWithTypeArguments",...arguments)}function tsInterfaceDeclaration(e,t,r,n){return(0,s.default)("TSInterfaceDeclaration",...arguments)}function tsInterfaceBody(e){return(0,s.default)("TSInterfaceBody",...arguments)}function tsTypeAliasDeclaration(e,t,r){return(0,s.default)("TSTypeAliasDeclaration",...arguments)}function tsAsExpression(e,t){return(0,s.default)("TSAsExpression",...arguments)}function tsTypeAssertion(e,t){return(0,s.default)("TSTypeAssertion",...arguments)}function tsEnumDeclaration(e,t){return(0,s.default)("TSEnumDeclaration",...arguments)}function tsEnumMember(e,t){return(0,s.default)("TSEnumMember",...arguments)}function tsModuleDeclaration(e,t){return(0,s.default)("TSModuleDeclaration",...arguments)}function tsModuleBlock(e){return(0,s.default)("TSModuleBlock",...arguments)}function tsImportType(e,t,r){return(0,s.default)("TSImportType",...arguments)}function tsImportEqualsDeclaration(e,t){return(0,s.default)("TSImportEqualsDeclaration",...arguments)}function tsExternalModuleReference(e){return(0,s.default)("TSExternalModuleReference",...arguments)}function tsNonNullExpression(e){return(0,s.default)("TSNonNullExpression",...arguments)}function tsExportAssignment(e){return(0,s.default)("TSExportAssignment",...arguments)}function tsNamespaceExportDeclaration(e){return(0,s.default)("TSNamespaceExportDeclaration",...arguments)}function tsTypeAnnotation(e){return(0,s.default)("TSTypeAnnotation",...arguments)}function tsTypeParameterInstantiation(e){return(0,s.default)("TSTypeParameterInstantiation",...arguments)}function tsTypeParameterDeclaration(e){return(0,s.default)("TSTypeParameterDeclaration",...arguments)}function tsTypeParameter(e,t,r){return(0,s.default)("TSTypeParameter",...arguments)}function NumberLiteral(...e){console.trace("The node type NumberLiteral has been renamed to NumericLiteral");return(0,s.default)("NumberLiteral",...e)}function RegexLiteral(...e){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");return(0,s.default)("RegexLiteral",...e)}function RestProperty(...e){console.trace("The node type RestProperty has been renamed to RestElement");return(0,s.default)("RestProperty",...e)}function SpreadProperty(...e){console.trace("The node type SpreadProperty has been renamed to SpreadElement");return(0,s.default)("SpreadProperty",...e)}},1221:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"ArrayExpression",{enumerable:true,get:function(){return s.arrayExpression}});Object.defineProperty(t,"AssignmentExpression",{enumerable:true,get:function(){return s.assignmentExpression}});Object.defineProperty(t,"BinaryExpression",{enumerable:true,get:function(){return s.binaryExpression}});Object.defineProperty(t,"InterpreterDirective",{enumerable:true,get:function(){return s.interpreterDirective}});Object.defineProperty(t,"Directive",{enumerable:true,get:function(){return s.directive}});Object.defineProperty(t,"DirectiveLiteral",{enumerable:true,get:function(){return s.directiveLiteral}});Object.defineProperty(t,"BlockStatement",{enumerable:true,get:function(){return s.blockStatement}});Object.defineProperty(t,"BreakStatement",{enumerable:true,get:function(){return s.breakStatement}});Object.defineProperty(t,"CallExpression",{enumerable:true,get:function(){return s.callExpression}});Object.defineProperty(t,"CatchClause",{enumerable:true,get:function(){return s.catchClause}});Object.defineProperty(t,"ConditionalExpression",{enumerable:true,get:function(){return s.conditionalExpression}});Object.defineProperty(t,"ContinueStatement",{enumerable:true,get:function(){return s.continueStatement}});Object.defineProperty(t,"DebuggerStatement",{enumerable:true,get:function(){return s.debuggerStatement}});Object.defineProperty(t,"DoWhileStatement",{enumerable:true,get:function(){return s.doWhileStatement}});Object.defineProperty(t,"EmptyStatement",{enumerable:true,get:function(){return s.emptyStatement}});Object.defineProperty(t,"ExpressionStatement",{enumerable:true,get:function(){return s.expressionStatement}});Object.defineProperty(t,"File",{enumerable:true,get:function(){return s.file}});Object.defineProperty(t,"ForInStatement",{enumerable:true,get:function(){return s.forInStatement}});Object.defineProperty(t,"ForStatement",{enumerable:true,get:function(){return s.forStatement}});Object.defineProperty(t,"FunctionDeclaration",{enumerable:true,get:function(){return s.functionDeclaration}});Object.defineProperty(t,"FunctionExpression",{enumerable:true,get:function(){return s.functionExpression}});Object.defineProperty(t,"Identifier",{enumerable:true,get:function(){return s.identifier}});Object.defineProperty(t,"IfStatement",{enumerable:true,get:function(){return s.ifStatement}});Object.defineProperty(t,"LabeledStatement",{enumerable:true,get:function(){return s.labeledStatement}});Object.defineProperty(t,"StringLiteral",{enumerable:true,get:function(){return s.stringLiteral}});Object.defineProperty(t,"NumericLiteral",{enumerable:true,get:function(){return s.numericLiteral}});Object.defineProperty(t,"NullLiteral",{enumerable:true,get:function(){return s.nullLiteral}});Object.defineProperty(t,"BooleanLiteral",{enumerable:true,get:function(){return s.booleanLiteral}});Object.defineProperty(t,"RegExpLiteral",{enumerable:true,get:function(){return s.regExpLiteral}});Object.defineProperty(t,"LogicalExpression",{enumerable:true,get:function(){return s.logicalExpression}});Object.defineProperty(t,"MemberExpression",{enumerable:true,get:function(){return s.memberExpression}});Object.defineProperty(t,"NewExpression",{enumerable:true,get:function(){return s.newExpression}});Object.defineProperty(t,"Program",{enumerable:true,get:function(){return s.program}});Object.defineProperty(t,"ObjectExpression",{enumerable:true,get:function(){return s.objectExpression}});Object.defineProperty(t,"ObjectMethod",{enumerable:true,get:function(){return s.objectMethod}});Object.defineProperty(t,"ObjectProperty",{enumerable:true,get:function(){return s.objectProperty}});Object.defineProperty(t,"RestElement",{enumerable:true,get:function(){return s.restElement}});Object.defineProperty(t,"ReturnStatement",{enumerable:true,get:function(){return s.returnStatement}});Object.defineProperty(t,"SequenceExpression",{enumerable:true,get:function(){return s.sequenceExpression}});Object.defineProperty(t,"ParenthesizedExpression",{enumerable:true,get:function(){return s.parenthesizedExpression}});Object.defineProperty(t,"SwitchCase",{enumerable:true,get:function(){return s.switchCase}});Object.defineProperty(t,"SwitchStatement",{enumerable:true,get:function(){return s.switchStatement}});Object.defineProperty(t,"ThisExpression",{enumerable:true,get:function(){return s.thisExpression}});Object.defineProperty(t,"ThrowStatement",{enumerable:true,get:function(){return s.throwStatement}});Object.defineProperty(t,"TryStatement",{enumerable:true,get:function(){return s.tryStatement}});Object.defineProperty(t,"UnaryExpression",{enumerable:true,get:function(){return s.unaryExpression}});Object.defineProperty(t,"UpdateExpression",{enumerable:true,get:function(){return s.updateExpression}});Object.defineProperty(t,"VariableDeclaration",{enumerable:true,get:function(){return s.variableDeclaration}});Object.defineProperty(t,"VariableDeclarator",{enumerable:true,get:function(){return s.variableDeclarator}});Object.defineProperty(t,"WhileStatement",{enumerable:true,get:function(){return s.whileStatement}});Object.defineProperty(t,"WithStatement",{enumerable:true,get:function(){return s.withStatement}});Object.defineProperty(t,"AssignmentPattern",{enumerable:true,get:function(){return s.assignmentPattern}});Object.defineProperty(t,"ArrayPattern",{enumerable:true,get:function(){return s.arrayPattern}});Object.defineProperty(t,"ArrowFunctionExpression",{enumerable:true,get:function(){return s.arrowFunctionExpression}});Object.defineProperty(t,"ClassBody",{enumerable:true,get:function(){return s.classBody}});Object.defineProperty(t,"ClassExpression",{enumerable:true,get:function(){return s.classExpression}});Object.defineProperty(t,"ClassDeclaration",{enumerable:true,get:function(){return s.classDeclaration}});Object.defineProperty(t,"ExportAllDeclaration",{enumerable:true,get:function(){return s.exportAllDeclaration}});Object.defineProperty(t,"ExportDefaultDeclaration",{enumerable:true,get:function(){return s.exportDefaultDeclaration}});Object.defineProperty(t,"ExportNamedDeclaration",{enumerable:true,get:function(){return s.exportNamedDeclaration}});Object.defineProperty(t,"ExportSpecifier",{enumerable:true,get:function(){return s.exportSpecifier}});Object.defineProperty(t,"ForOfStatement",{enumerable:true,get:function(){return s.forOfStatement}});Object.defineProperty(t,"ImportDeclaration",{enumerable:true,get:function(){return s.importDeclaration}});Object.defineProperty(t,"ImportDefaultSpecifier",{enumerable:true,get:function(){return s.importDefaultSpecifier}});Object.defineProperty(t,"ImportNamespaceSpecifier",{enumerable:true,get:function(){return s.importNamespaceSpecifier}});Object.defineProperty(t,"ImportSpecifier",{enumerable:true,get:function(){return s.importSpecifier}});Object.defineProperty(t,"MetaProperty",{enumerable:true,get:function(){return s.metaProperty}});Object.defineProperty(t,"ClassMethod",{enumerable:true,get:function(){return s.classMethod}});Object.defineProperty(t,"ObjectPattern",{enumerable:true,get:function(){return s.objectPattern}});Object.defineProperty(t,"SpreadElement",{enumerable:true,get:function(){return s.spreadElement}});Object.defineProperty(t,"Super",{enumerable:true,get:function(){return s.super}});Object.defineProperty(t,"TaggedTemplateExpression",{enumerable:true,get:function(){return s.taggedTemplateExpression}});Object.defineProperty(t,"TemplateElement",{enumerable:true,get:function(){return s.templateElement}});Object.defineProperty(t,"TemplateLiteral",{enumerable:true,get:function(){return s.templateLiteral}});Object.defineProperty(t,"YieldExpression",{enumerable:true,get:function(){return s.yieldExpression}});Object.defineProperty(t,"AwaitExpression",{enumerable:true,get:function(){return s.awaitExpression}});Object.defineProperty(t,"Import",{enumerable:true,get:function(){return s.import}});Object.defineProperty(t,"BigIntLiteral",{enumerable:true,get:function(){return s.bigIntLiteral}});Object.defineProperty(t,"ExportNamespaceSpecifier",{enumerable:true,get:function(){return s.exportNamespaceSpecifier}});Object.defineProperty(t,"OptionalMemberExpression",{enumerable:true,get:function(){return s.optionalMemberExpression}});Object.defineProperty(t,"OptionalCallExpression",{enumerable:true,get:function(){return s.optionalCallExpression}});Object.defineProperty(t,"AnyTypeAnnotation",{enumerable:true,get:function(){return s.anyTypeAnnotation}});Object.defineProperty(t,"ArrayTypeAnnotation",{enumerable:true,get:function(){return s.arrayTypeAnnotation}});Object.defineProperty(t,"BooleanTypeAnnotation",{enumerable:true,get:function(){return s.booleanTypeAnnotation}});Object.defineProperty(t,"BooleanLiteralTypeAnnotation",{enumerable:true,get:function(){return s.booleanLiteralTypeAnnotation}});Object.defineProperty(t,"NullLiteralTypeAnnotation",{enumerable:true,get:function(){return s.nullLiteralTypeAnnotation}});Object.defineProperty(t,"ClassImplements",{enumerable:true,get:function(){return s.classImplements}});Object.defineProperty(t,"DeclareClass",{enumerable:true,get:function(){return s.declareClass}});Object.defineProperty(t,"DeclareFunction",{enumerable:true,get:function(){return s.declareFunction}});Object.defineProperty(t,"DeclareInterface",{enumerable:true,get:function(){return s.declareInterface}});Object.defineProperty(t,"DeclareModule",{enumerable:true,get:function(){return s.declareModule}});Object.defineProperty(t,"DeclareModuleExports",{enumerable:true,get:function(){return s.declareModuleExports}});Object.defineProperty(t,"DeclareTypeAlias",{enumerable:true,get:function(){return s.declareTypeAlias}});Object.defineProperty(t,"DeclareOpaqueType",{enumerable:true,get:function(){return s.declareOpaqueType}});Object.defineProperty(t,"DeclareVariable",{enumerable:true,get:function(){return s.declareVariable}});Object.defineProperty(t,"DeclareExportDeclaration",{enumerable:true,get:function(){return s.declareExportDeclaration}});Object.defineProperty(t,"DeclareExportAllDeclaration",{enumerable:true,get:function(){return s.declareExportAllDeclaration}});Object.defineProperty(t,"DeclaredPredicate",{enumerable:true,get:function(){return s.declaredPredicate}});Object.defineProperty(t,"ExistsTypeAnnotation",{enumerable:true,get:function(){return s.existsTypeAnnotation}});Object.defineProperty(t,"FunctionTypeAnnotation",{enumerable:true,get:function(){return s.functionTypeAnnotation}});Object.defineProperty(t,"FunctionTypeParam",{enumerable:true,get:function(){return s.functionTypeParam}});Object.defineProperty(t,"GenericTypeAnnotation",{enumerable:true,get:function(){return s.genericTypeAnnotation}});Object.defineProperty(t,"InferredPredicate",{enumerable:true,get:function(){return s.inferredPredicate}});Object.defineProperty(t,"InterfaceExtends",{enumerable:true,get:function(){return s.interfaceExtends}});Object.defineProperty(t,"InterfaceDeclaration",{enumerable:true,get:function(){return s.interfaceDeclaration}});Object.defineProperty(t,"InterfaceTypeAnnotation",{enumerable:true,get:function(){return s.interfaceTypeAnnotation}});Object.defineProperty(t,"IntersectionTypeAnnotation",{enumerable:true,get:function(){return s.intersectionTypeAnnotation}});Object.defineProperty(t,"MixedTypeAnnotation",{enumerable:true,get:function(){return s.mixedTypeAnnotation}});Object.defineProperty(t,"EmptyTypeAnnotation",{enumerable:true,get:function(){return s.emptyTypeAnnotation}});Object.defineProperty(t,"NullableTypeAnnotation",{enumerable:true,get:function(){return s.nullableTypeAnnotation}});Object.defineProperty(t,"NumberLiteralTypeAnnotation",{enumerable:true,get:function(){return s.numberLiteralTypeAnnotation}});Object.defineProperty(t,"NumberTypeAnnotation",{enumerable:true,get:function(){return s.numberTypeAnnotation}});Object.defineProperty(t,"ObjectTypeAnnotation",{enumerable:true,get:function(){return s.objectTypeAnnotation}});Object.defineProperty(t,"ObjectTypeInternalSlot",{enumerable:true,get:function(){return s.objectTypeInternalSlot}});Object.defineProperty(t,"ObjectTypeCallProperty",{enumerable:true,get:function(){return s.objectTypeCallProperty}});Object.defineProperty(t,"ObjectTypeIndexer",{enumerable:true,get:function(){return s.objectTypeIndexer}});Object.defineProperty(t,"ObjectTypeProperty",{enumerable:true,get:function(){return s.objectTypeProperty}});Object.defineProperty(t,"ObjectTypeSpreadProperty",{enumerable:true,get:function(){return s.objectTypeSpreadProperty}});Object.defineProperty(t,"OpaqueType",{enumerable:true,get:function(){return s.opaqueType}});Object.defineProperty(t,"QualifiedTypeIdentifier",{enumerable:true,get:function(){return s.qualifiedTypeIdentifier}});Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:true,get:function(){return s.stringLiteralTypeAnnotation}});Object.defineProperty(t,"StringTypeAnnotation",{enumerable:true,get:function(){return s.stringTypeAnnotation}});Object.defineProperty(t,"SymbolTypeAnnotation",{enumerable:true,get:function(){return s.symbolTypeAnnotation}});Object.defineProperty(t,"ThisTypeAnnotation",{enumerable:true,get:function(){return s.thisTypeAnnotation}});Object.defineProperty(t,"TupleTypeAnnotation",{enumerable:true,get:function(){return s.tupleTypeAnnotation}});Object.defineProperty(t,"TypeofTypeAnnotation",{enumerable:true,get:function(){return s.typeofTypeAnnotation}});Object.defineProperty(t,"TypeAlias",{enumerable:true,get:function(){return s.typeAlias}});Object.defineProperty(t,"TypeAnnotation",{enumerable:true,get:function(){return s.typeAnnotation}});Object.defineProperty(t,"TypeCastExpression",{enumerable:true,get:function(){return s.typeCastExpression}});Object.defineProperty(t,"TypeParameter",{enumerable:true,get:function(){return s.typeParameter}});Object.defineProperty(t,"TypeParameterDeclaration",{enumerable:true,get:function(){return s.typeParameterDeclaration}});Object.defineProperty(t,"TypeParameterInstantiation",{enumerable:true,get:function(){return s.typeParameterInstantiation}});Object.defineProperty(t,"UnionTypeAnnotation",{enumerable:true,get:function(){return s.unionTypeAnnotation}});Object.defineProperty(t,"Variance",{enumerable:true,get:function(){return s.variance}});Object.defineProperty(t,"VoidTypeAnnotation",{enumerable:true,get:function(){return s.voidTypeAnnotation}});Object.defineProperty(t,"EnumDeclaration",{enumerable:true,get:function(){return s.enumDeclaration}});Object.defineProperty(t,"EnumBooleanBody",{enumerable:true,get:function(){return s.enumBooleanBody}});Object.defineProperty(t,"EnumNumberBody",{enumerable:true,get:function(){return s.enumNumberBody}});Object.defineProperty(t,"EnumStringBody",{enumerable:true,get:function(){return s.enumStringBody}});Object.defineProperty(t,"EnumSymbolBody",{enumerable:true,get:function(){return s.enumSymbolBody}});Object.defineProperty(t,"EnumBooleanMember",{enumerable:true,get:function(){return s.enumBooleanMember}});Object.defineProperty(t,"EnumNumberMember",{enumerable:true,get:function(){return s.enumNumberMember}});Object.defineProperty(t,"EnumStringMember",{enumerable:true,get:function(){return s.enumStringMember}});Object.defineProperty(t,"EnumDefaultedMember",{enumerable:true,get:function(){return s.enumDefaultedMember}});Object.defineProperty(t,"JSXAttribute",{enumerable:true,get:function(){return s.jsxAttribute}});Object.defineProperty(t,"JSXClosingElement",{enumerable:true,get:function(){return s.jsxClosingElement}});Object.defineProperty(t,"JSXElement",{enumerable:true,get:function(){return s.jsxElement}});Object.defineProperty(t,"JSXEmptyExpression",{enumerable:true,get:function(){return s.jsxEmptyExpression}});Object.defineProperty(t,"JSXExpressionContainer",{enumerable:true,get:function(){return s.jsxExpressionContainer}});Object.defineProperty(t,"JSXSpreadChild",{enumerable:true,get:function(){return s.jsxSpreadChild}});Object.defineProperty(t,"JSXIdentifier",{enumerable:true,get:function(){return s.jsxIdentifier}});Object.defineProperty(t,"JSXMemberExpression",{enumerable:true,get:function(){return s.jsxMemberExpression}});Object.defineProperty(t,"JSXNamespacedName",{enumerable:true,get:function(){return s.jsxNamespacedName}});Object.defineProperty(t,"JSXOpeningElement",{enumerable:true,get:function(){return s.jsxOpeningElement}});Object.defineProperty(t,"JSXSpreadAttribute",{enumerable:true,get:function(){return s.jsxSpreadAttribute}});Object.defineProperty(t,"JSXText",{enumerable:true,get:function(){return s.jsxText}});Object.defineProperty(t,"JSXFragment",{enumerable:true,get:function(){return s.jsxFragment}});Object.defineProperty(t,"JSXOpeningFragment",{enumerable:true,get:function(){return s.jsxOpeningFragment}});Object.defineProperty(t,"JSXClosingFragment",{enumerable:true,get:function(){return s.jsxClosingFragment}});Object.defineProperty(t,"Noop",{enumerable:true,get:function(){return s.noop}});Object.defineProperty(t,"Placeholder",{enumerable:true,get:function(){return s.placeholder}});Object.defineProperty(t,"V8IntrinsicIdentifier",{enumerable:true,get:function(){return s.v8IntrinsicIdentifier}});Object.defineProperty(t,"ArgumentPlaceholder",{enumerable:true,get:function(){return s.argumentPlaceholder}});Object.defineProperty(t,"BindExpression",{enumerable:true,get:function(){return s.bindExpression}});Object.defineProperty(t,"ClassProperty",{enumerable:true,get:function(){return s.classProperty}});Object.defineProperty(t,"PipelineTopicExpression",{enumerable:true,get:function(){return s.pipelineTopicExpression}});Object.defineProperty(t,"PipelineBareFunction",{enumerable:true,get:function(){return s.pipelineBareFunction}});Object.defineProperty(t,"PipelinePrimaryTopicReference",{enumerable:true,get:function(){return s.pipelinePrimaryTopicReference}});Object.defineProperty(t,"ClassPrivateProperty",{enumerable:true,get:function(){return s.classPrivateProperty}});Object.defineProperty(t,"ClassPrivateMethod",{enumerable:true,get:function(){return s.classPrivateMethod}});Object.defineProperty(t,"ImportAttribute",{enumerable:true,get:function(){return s.importAttribute}});Object.defineProperty(t,"Decorator",{enumerable:true,get:function(){return s.decorator}});Object.defineProperty(t,"DoExpression",{enumerable:true,get:function(){return s.doExpression}});Object.defineProperty(t,"ExportDefaultSpecifier",{enumerable:true,get:function(){return s.exportDefaultSpecifier}});Object.defineProperty(t,"PrivateName",{enumerable:true,get:function(){return s.privateName}});Object.defineProperty(t,"RecordExpression",{enumerable:true,get:function(){return s.recordExpression}});Object.defineProperty(t,"TupleExpression",{enumerable:true,get:function(){return s.tupleExpression}});Object.defineProperty(t,"DecimalLiteral",{enumerable:true,get:function(){return s.decimalLiteral}});Object.defineProperty(t,"StaticBlock",{enumerable:true,get:function(){return s.staticBlock}});Object.defineProperty(t,"TSParameterProperty",{enumerable:true,get:function(){return s.tsParameterProperty}});Object.defineProperty(t,"TSDeclareFunction",{enumerable:true,get:function(){return s.tsDeclareFunction}});Object.defineProperty(t,"TSDeclareMethod",{enumerable:true,get:function(){return s.tsDeclareMethod}});Object.defineProperty(t,"TSQualifiedName",{enumerable:true,get:function(){return s.tsQualifiedName}});Object.defineProperty(t,"TSCallSignatureDeclaration",{enumerable:true,get:function(){return s.tsCallSignatureDeclaration}});Object.defineProperty(t,"TSConstructSignatureDeclaration",{enumerable:true,get:function(){return s.tsConstructSignatureDeclaration}});Object.defineProperty(t,"TSPropertySignature",{enumerable:true,get:function(){return s.tsPropertySignature}});Object.defineProperty(t,"TSMethodSignature",{enumerable:true,get:function(){return s.tsMethodSignature}});Object.defineProperty(t,"TSIndexSignature",{enumerable:true,get:function(){return s.tsIndexSignature}});Object.defineProperty(t,"TSAnyKeyword",{enumerable:true,get:function(){return s.tsAnyKeyword}});Object.defineProperty(t,"TSBooleanKeyword",{enumerable:true,get:function(){return s.tsBooleanKeyword}});Object.defineProperty(t,"TSBigIntKeyword",{enumerable:true,get:function(){return s.tsBigIntKeyword}});Object.defineProperty(t,"TSIntrinsicKeyword",{enumerable:true,get:function(){return s.tsIntrinsicKeyword}});Object.defineProperty(t,"TSNeverKeyword",{enumerable:true,get:function(){return s.tsNeverKeyword}});Object.defineProperty(t,"TSNullKeyword",{enumerable:true,get:function(){return s.tsNullKeyword}});Object.defineProperty(t,"TSNumberKeyword",{enumerable:true,get:function(){return s.tsNumberKeyword}});Object.defineProperty(t,"TSObjectKeyword",{enumerable:true,get:function(){return s.tsObjectKeyword}});Object.defineProperty(t,"TSStringKeyword",{enumerable:true,get:function(){return s.tsStringKeyword}});Object.defineProperty(t,"TSSymbolKeyword",{enumerable:true,get:function(){return s.tsSymbolKeyword}});Object.defineProperty(t,"TSUndefinedKeyword",{enumerable:true,get:function(){return s.tsUndefinedKeyword}});Object.defineProperty(t,"TSUnknownKeyword",{enumerable:true,get:function(){return s.tsUnknownKeyword}});Object.defineProperty(t,"TSVoidKeyword",{enumerable:true,get:function(){return s.tsVoidKeyword}});Object.defineProperty(t,"TSThisType",{enumerable:true,get:function(){return s.tsThisType}});Object.defineProperty(t,"TSFunctionType",{enumerable:true,get:function(){return s.tsFunctionType}});Object.defineProperty(t,"TSConstructorType",{enumerable:true,get:function(){return s.tsConstructorType}});Object.defineProperty(t,"TSTypeReference",{enumerable:true,get:function(){return s.tsTypeReference}});Object.defineProperty(t,"TSTypePredicate",{enumerable:true,get:function(){return s.tsTypePredicate}});Object.defineProperty(t,"TSTypeQuery",{enumerable:true,get:function(){return s.tsTypeQuery}});Object.defineProperty(t,"TSTypeLiteral",{enumerable:true,get:function(){return s.tsTypeLiteral}});Object.defineProperty(t,"TSArrayType",{enumerable:true,get:function(){return s.tsArrayType}});Object.defineProperty(t,"TSTupleType",{enumerable:true,get:function(){return s.tsTupleType}});Object.defineProperty(t,"TSOptionalType",{enumerable:true,get:function(){return s.tsOptionalType}});Object.defineProperty(t,"TSRestType",{enumerable:true,get:function(){return s.tsRestType}});Object.defineProperty(t,"TSNamedTupleMember",{enumerable:true,get:function(){return s.tsNamedTupleMember}});Object.defineProperty(t,"TSUnionType",{enumerable:true,get:function(){return s.tsUnionType}});Object.defineProperty(t,"TSIntersectionType",{enumerable:true,get:function(){return s.tsIntersectionType}});Object.defineProperty(t,"TSConditionalType",{enumerable:true,get:function(){return s.tsConditionalType}});Object.defineProperty(t,"TSInferType",{enumerable:true,get:function(){return s.tsInferType}});Object.defineProperty(t,"TSParenthesizedType",{enumerable:true,get:function(){return s.tsParenthesizedType}});Object.defineProperty(t,"TSTypeOperator",{enumerable:true,get:function(){return s.tsTypeOperator}});Object.defineProperty(t,"TSIndexedAccessType",{enumerable:true,get:function(){return s.tsIndexedAccessType}});Object.defineProperty(t,"TSMappedType",{enumerable:true,get:function(){return s.tsMappedType}});Object.defineProperty(t,"TSLiteralType",{enumerable:true,get:function(){return s.tsLiteralType}});Object.defineProperty(t,"TSExpressionWithTypeArguments",{enumerable:true,get:function(){return s.tsExpressionWithTypeArguments}});Object.defineProperty(t,"TSInterfaceDeclaration",{enumerable:true,get:function(){return s.tsInterfaceDeclaration}});Object.defineProperty(t,"TSInterfaceBody",{enumerable:true,get:function(){return s.tsInterfaceBody}});Object.defineProperty(t,"TSTypeAliasDeclaration",{enumerable:true,get:function(){return s.tsTypeAliasDeclaration}});Object.defineProperty(t,"TSAsExpression",{enumerable:true,get:function(){return s.tsAsExpression}});Object.defineProperty(t,"TSTypeAssertion",{enumerable:true,get:function(){return s.tsTypeAssertion}});Object.defineProperty(t,"TSEnumDeclaration",{enumerable:true,get:function(){return s.tsEnumDeclaration}});Object.defineProperty(t,"TSEnumMember",{enumerable:true,get:function(){return s.tsEnumMember}});Object.defineProperty(t,"TSModuleDeclaration",{enumerable:true,get:function(){return s.tsModuleDeclaration}});Object.defineProperty(t,"TSModuleBlock",{enumerable:true,get:function(){return s.tsModuleBlock}});Object.defineProperty(t,"TSImportType",{enumerable:true,get:function(){return s.tsImportType}});Object.defineProperty(t,"TSImportEqualsDeclaration",{enumerable:true,get:function(){return s.tsImportEqualsDeclaration}});Object.defineProperty(t,"TSExternalModuleReference",{enumerable:true,get:function(){return s.tsExternalModuleReference}});Object.defineProperty(t,"TSNonNullExpression",{enumerable:true,get:function(){return s.tsNonNullExpression}});Object.defineProperty(t,"TSExportAssignment",{enumerable:true,get:function(){return s.tsExportAssignment}});Object.defineProperty(t,"TSNamespaceExportDeclaration",{enumerable:true,get:function(){return s.tsNamespaceExportDeclaration}});Object.defineProperty(t,"TSTypeAnnotation",{enumerable:true,get:function(){return s.tsTypeAnnotation}});Object.defineProperty(t,"TSTypeParameterInstantiation",{enumerable:true,get:function(){return s.tsTypeParameterInstantiation}});Object.defineProperty(t,"TSTypeParameterDeclaration",{enumerable:true,get:function(){return s.tsTypeParameterDeclaration}});Object.defineProperty(t,"TSTypeParameter",{enumerable:true,get:function(){return s.tsTypeParameter}});Object.defineProperty(t,"NumberLiteral",{enumerable:true,get:function(){return s.numberLiteral}});Object.defineProperty(t,"RegexLiteral",{enumerable:true,get:function(){return s.regexLiteral}});Object.defineProperty(t,"RestProperty",{enumerable:true,get:function(){return s.restProperty}});Object.defineProperty(t,"SpreadProperty",{enumerable:true,get:function(){return s.spreadProperty}});var s=r(35093)},67629:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=buildChildren;var s=r(18939);var n=_interopRequireDefault(r(82646));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function buildChildren(e){const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=createTSUnionType;var s=r(35093);var n=_interopRequireDefault(r(47196));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function createTSUnionType(e){const t=e.map(e=>e.typeAnnotation);const r=(0,n.default)(t);if(r.length===1){return r[0]}else{return(0,s.tsUnionType)(r)}}},10063:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=clone;var s=_interopRequireDefault(r(78068));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function clone(e){return(0,s.default)(e,false)}},9784:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=cloneDeep;var s=_interopRequireDefault(r(78068));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneDeep(e){return(0,s.default)(e)}},59233:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=cloneDeepWithoutLoc;var s=_interopRequireDefault(r(78068));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneDeepWithoutLoc(e){return(0,s.default)(e,true,true)}},78068:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=cloneNode;var s=r(74098);var n=r(18939);const a=Function.call.bind(Object.prototype.hasOwnProperty);function cloneIfNode(e,t,r){if(e&&typeof e.type==="string"){return cloneNode(e,t,r)}return e}function cloneIfNodeOrArray(e,t,r){if(Array.isArray(e)){return e.map(e=>cloneIfNode(e,t,r))}return cloneIfNode(e,t,r)}function cloneNode(e,t=true,r=false){if(!e)return e;const{type:i}=e;const o={type:e.type};if((0,n.isIdentifier)(e)){o.name=e.name;if(a(e,"optional")&&typeof e.optional==="boolean"){o.optional=e.optional}if(a(e,"typeAnnotation")){o.typeAnnotation=t?cloneIfNodeOrArray(e.typeAnnotation,true,r):e.typeAnnotation}}else if(!a(s.NODE_FIELDS,i)){throw new Error(`Unknown node type: "${i}"`)}else{for(const l of Object.keys(s.NODE_FIELDS[i])){if(a(e,l)){if(t){o[l]=(0,n.isFile)(e)&&l==="comments"?maybeCloneComments(e.comments,t,r):cloneIfNodeOrArray(e[l],true,r)}else{o[l]=e[l]}}}}if(a(e,"loc")){if(r){o.loc=null}else{o.loc=e.loc}}if(a(e,"leadingComments")){o.leadingComments=maybeCloneComments(e.leadingComments,t,r)}if(a(e,"innerComments")){o.innerComments=maybeCloneComments(e.innerComments,t,r)}if(a(e,"trailingComments")){o.trailingComments=maybeCloneComments(e.trailingComments,t,r)}if(a(e,"extra")){o.extra=Object.assign({},e.extra)}return o}function cloneCommentsWithoutLoc(e){return e.map(({type:e,value:t})=>({type:e,value:t,loc:null}))}function maybeCloneComments(e,t,r){return t&&r?cloneCommentsWithoutLoc(e):e}},80405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=cloneWithoutLoc;var s=_interopRequireDefault(r(78068));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneWithoutLoc(e){return(0,s.default)(e,false,true)}},55899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=addComment;var s=_interopRequireDefault(r(85565));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function addComment(e,t,r,n){return(0,s.default)(e,t,[{type:n?"CommentLine":"CommentBlock",value:r}])}},85565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=addComments;function addComments(e,t,r){if(!r||!e)return e;const s=`${t}Comments`;if(e[s]){if(t==="leading"){e[s]=r.concat(e[s])}else{e[s]=e[s].concat(r)}}else{e[s]=r}return e}},63307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inheritInnerComments;var s=_interopRequireDefault(r(74837));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function inheritInnerComments(e,t){(0,s.default)("innerComments",e,t)}},94149:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inheritLeadingComments;var s=_interopRequireDefault(r(74837));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function inheritLeadingComments(e,t){(0,s.default)("leadingComments",e,t)}},41177:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inheritTrailingComments;var s=_interopRequireDefault(r(74837));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function inheritTrailingComments(e,t){(0,s.default)("trailingComments",e,t)}},58245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inheritsComments;var s=_interopRequireDefault(r(41177));var n=_interopRequireDefault(r(94149));var a=_interopRequireDefault(r(63307));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function inheritsComments(e,t){(0,s.default)(e,t);(0,n.default)(e,t);(0,a.default)(e,t);return e}},4496:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=removeComments;var s=r(91073);function removeComments(e){s.COMMENT_KEYS.forEach(t=>{e[t]=null});return e}},69946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TSBASETYPE_TYPES=t.TSTYPE_TYPES=t.TSTYPEELEMENT_TYPES=t.PRIVATE_TYPES=t.JSX_TYPES=t.ENUMMEMBER_TYPES=t.ENUMBODY_TYPES=t.FLOWPREDICATE_TYPES=t.FLOWDECLARATION_TYPES=t.FLOWBASEANNOTATION_TYPES=t.FLOWTYPE_TYPES=t.FLOW_TYPES=t.MODULESPECIFIER_TYPES=t.EXPORTDECLARATION_TYPES=t.MODULEDECLARATION_TYPES=t.CLASS_TYPES=t.PATTERN_TYPES=t.UNARYLIKE_TYPES=t.PROPERTY_TYPES=t.OBJECTMEMBER_TYPES=t.METHOD_TYPES=t.USERWHITESPACABLE_TYPES=t.IMMUTABLE_TYPES=t.LITERAL_TYPES=t.TSENTITYNAME_TYPES=t.LVAL_TYPES=t.PATTERNLIKE_TYPES=t.DECLARATION_TYPES=t.PUREISH_TYPES=t.FUNCTIONPARENT_TYPES=t.FUNCTION_TYPES=t.FORXSTATEMENT_TYPES=t.FOR_TYPES=t.EXPRESSIONWRAPPER_TYPES=t.WHILE_TYPES=t.LOOP_TYPES=t.CONDITIONAL_TYPES=t.COMPLETIONSTATEMENT_TYPES=t.TERMINATORLESS_TYPES=t.STATEMENT_TYPES=t.BLOCK_TYPES=t.BLOCKPARENT_TYPES=t.SCOPABLE_TYPES=t.BINARY_TYPES=t.EXPRESSION_TYPES=void 0;var s=r(74098);const n=s.FLIPPED_ALIAS_KEYS["Expression"];t.EXPRESSION_TYPES=n;const a=s.FLIPPED_ALIAS_KEYS["Binary"];t.BINARY_TYPES=a;const i=s.FLIPPED_ALIAS_KEYS["Scopable"];t.SCOPABLE_TYPES=i;const o=s.FLIPPED_ALIAS_KEYS["BlockParent"];t.BLOCKPARENT_TYPES=o;const l=s.FLIPPED_ALIAS_KEYS["Block"];t.BLOCK_TYPES=l;const u=s.FLIPPED_ALIAS_KEYS["Statement"];t.STATEMENT_TYPES=u;const c=s.FLIPPED_ALIAS_KEYS["Terminatorless"];t.TERMINATORLESS_TYPES=c;const p=s.FLIPPED_ALIAS_KEYS["CompletionStatement"];t.COMPLETIONSTATEMENT_TYPES=p;const f=s.FLIPPED_ALIAS_KEYS["Conditional"];t.CONDITIONAL_TYPES=f;const d=s.FLIPPED_ALIAS_KEYS["Loop"];t.LOOP_TYPES=d;const y=s.FLIPPED_ALIAS_KEYS["While"];t.WHILE_TYPES=y;const h=s.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];t.EXPRESSIONWRAPPER_TYPES=h;const m=s.FLIPPED_ALIAS_KEYS["For"];t.FOR_TYPES=m;const g=s.FLIPPED_ALIAS_KEYS["ForXStatement"];t.FORXSTATEMENT_TYPES=g;const b=s.FLIPPED_ALIAS_KEYS["Function"];t.FUNCTION_TYPES=b;const x=s.FLIPPED_ALIAS_KEYS["FunctionParent"];t.FUNCTIONPARENT_TYPES=x;const v=s.FLIPPED_ALIAS_KEYS["Pureish"];t.PUREISH_TYPES=v;const E=s.FLIPPED_ALIAS_KEYS["Declaration"];t.DECLARATION_TYPES=E;const T=s.FLIPPED_ALIAS_KEYS["PatternLike"];t.PATTERNLIKE_TYPES=T;const S=s.FLIPPED_ALIAS_KEYS["LVal"];t.LVAL_TYPES=S;const P=s.FLIPPED_ALIAS_KEYS["TSEntityName"];t.TSENTITYNAME_TYPES=P;const j=s.FLIPPED_ALIAS_KEYS["Literal"];t.LITERAL_TYPES=j;const w=s.FLIPPED_ALIAS_KEYS["Immutable"];t.IMMUTABLE_TYPES=w;const A=s.FLIPPED_ALIAS_KEYS["UserWhitespacable"];t.USERWHITESPACABLE_TYPES=A;const D=s.FLIPPED_ALIAS_KEYS["Method"];t.METHOD_TYPES=D;const O=s.FLIPPED_ALIAS_KEYS["ObjectMember"];t.OBJECTMEMBER_TYPES=O;const _=s.FLIPPED_ALIAS_KEYS["Property"];t.PROPERTY_TYPES=_;const C=s.FLIPPED_ALIAS_KEYS["UnaryLike"];t.UNARYLIKE_TYPES=C;const I=s.FLIPPED_ALIAS_KEYS["Pattern"];t.PATTERN_TYPES=I;const k=s.FLIPPED_ALIAS_KEYS["Class"];t.CLASS_TYPES=k;const R=s.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];t.MODULEDECLARATION_TYPES=R;const M=s.FLIPPED_ALIAS_KEYS["ExportDeclaration"];t.EXPORTDECLARATION_TYPES=M;const N=s.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];t.MODULESPECIFIER_TYPES=N;const F=s.FLIPPED_ALIAS_KEYS["Flow"];t.FLOW_TYPES=F;const L=s.FLIPPED_ALIAS_KEYS["FlowType"];t.FLOWTYPE_TYPES=L;const B=s.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];t.FLOWBASEANNOTATION_TYPES=B;const q=s.FLIPPED_ALIAS_KEYS["FlowDeclaration"];t.FLOWDECLARATION_TYPES=q;const W=s.FLIPPED_ALIAS_KEYS["FlowPredicate"];t.FLOWPREDICATE_TYPES=W;const U=s.FLIPPED_ALIAS_KEYS["EnumBody"];t.ENUMBODY_TYPES=U;const K=s.FLIPPED_ALIAS_KEYS["EnumMember"];t.ENUMMEMBER_TYPES=K;const V=s.FLIPPED_ALIAS_KEYS["JSX"];t.JSX_TYPES=V;const $=s.FLIPPED_ALIAS_KEYS["Private"];t.PRIVATE_TYPES=$;const J=s.FLIPPED_ALIAS_KEYS["TSTypeElement"];t.TSTYPEELEMENT_TYPES=J;const H=s.FLIPPED_ALIAS_KEYS["TSType"];t.TSTYPE_TYPES=H;const G=s.FLIPPED_ALIAS_KEYS["TSBaseType"];t.TSBASETYPE_TYPES=G},91073:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.ASSIGNMENT_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;const r=["consequent","body","alternate"];t.STATEMENT_OR_BLOCK_KEYS=r;const s=["body","expressions"];t.FLATTENABLE_KEYS=s;const n=["left","init"];t.FOR_INIT_KEYS=n;const a=["leadingComments","trailingComments","innerComments"];t.COMMENT_KEYS=a;const i=["||","&&","??"];t.LOGICAL_OPERATORS=i;const o=["++","--"];t.UPDATE_OPERATORS=o;const l=[">","<",">=","<="];t.BOOLEAN_NUMBER_BINARY_OPERATORS=l;const u=["==","===","!=","!=="];t.EQUALITY_BINARY_OPERATORS=u;const c=[...u,"in","instanceof"];t.COMPARISON_BINARY_OPERATORS=c;const p=[...c,...l];t.BOOLEAN_BINARY_OPERATORS=p;const f=["-","/","%","*","**","&","|",">>",">>>","<<","^"];t.NUMBER_BINARY_OPERATORS=f;const d=["+",...f,...p];t.BINARY_OPERATORS=d;const y=["=","+=",...f.map(e=>e+"="),...i.map(e=>e+"=")];t.ASSIGNMENT_OPERATORS=y;const h=["delete","!"];t.BOOLEAN_UNARY_OPERATORS=h;const m=["+","-","~"];t.NUMBER_UNARY_OPERATORS=m;const g=["typeof"];t.STRING_UNARY_OPERATORS=g;const b=["void","throw",...h,...m,...g];t.UNARY_OPERATORS=b;const x={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};t.INHERIT_KEYS=x;const v=Symbol.for("var used to be block scoped");t.BLOCK_SCOPED_SYMBOL=v;const E=Symbol.for("should not be considered a local binding");t.NOT_LOCAL_BINDING=E},30965:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=ensureBlock;var s=_interopRequireDefault(r(96262));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ensureBlock(e,t="body"){return e[t]=(0,s.default)(e[t],e)}},37866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=gatherSequenceExpressions;var s=_interopRequireDefault(r(97723));var n=r(18939);var a=r(35093);var i=_interopRequireDefault(r(78068));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function gatherSequenceExpressions(e,t,r){const o=[];let l=true;for(const u of e){if(!(0,n.isEmptyStatement)(u)){l=false}if((0,n.isExpression)(u)){o.push(u)}else if((0,n.isExpressionStatement)(u)){o.push(u.expression)}else if((0,n.isVariableDeclaration)(u)){if(u.kind!=="var")return;for(const e of u.declarations){const t=(0,s.default)(e);for(const e of Object.keys(t)){r.push({kind:u.kind,id:(0,i.default)(t[e])})}if(e.init){o.push((0,a.assignmentExpression)("=",e.id,e.init))}}l=true}else if((0,n.isIfStatement)(u)){const e=u.consequent?gatherSequenceExpressions([u.consequent],t,r):t.buildUndefinedNode();const s=u.alternate?gatherSequenceExpressions([u.alternate],t,r):t.buildUndefinedNode();if(!e||!s)return;o.push((0,a.conditionalExpression)(u.test,e,s))}else if((0,n.isBlockStatement)(u)){const e=gatherSequenceExpressions(u.body,t,r);if(!e)return;o.push(e)}else if((0,n.isEmptyStatement)(u)){if(e.indexOf(u)===0){l=true}}else{return}}if(l){o.push(t.buildUndefinedNode())}if(o.length===1){return o[0]}else{return(0,a.sequenceExpression)(o)}}},77853:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toBindingIdentifierName;var s=_interopRequireDefault(r(76898));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toBindingIdentifierName(e){e=(0,s.default)(e);if(e==="eval"||e==="arguments")e="_"+e;return e}},96262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toBlock;var s=r(18939);var n=r(35093);function toBlock(e,t){if((0,s.isBlockStatement)(e)){return e}let r=[];if((0,s.isEmptyStatement)(e)){r=[]}else{if(!(0,s.isStatement)(e)){if((0,s.isFunction)(t)){e=(0,n.returnStatement)(e)}else{e=(0,n.expressionStatement)(e)}}r=[e]}return(0,n.blockStatement)(r)}},9212:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toComputedKey;var s=r(18939);var n=r(35093);function toComputedKey(e,t=e.key||e.property){if(!e.computed&&(0,s.isIdentifier)(t))t=(0,n.stringLiteral)(t.name);return t}},96456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(18939);var n=toExpression;t.default=n;function toExpression(e){if((0,s.isExpressionStatement)(e)){e=e.expression}if((0,s.isExpression)(e)){return e}if((0,s.isClass)(e)){e.type="ClassExpression"}else if((0,s.isFunction)(e)){e.type="FunctionExpression"}if(!(0,s.isExpression)(e)){throw new Error(`cannot turn ${e.type} to an expression`)}return e}},76898:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toIdentifier;var s=_interopRequireDefault(r(90735));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toIdentifier(e){e=e+"";e=e.replace(/[^a-zA-Z0-9$_]/g,"-");e=e.replace(/^[-0-9]+/,"");e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""});if(!(0,s.default)(e)){e=`_${e}`}return e||"_"}},41093:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toKeyAlias;var s=r(18939);var n=_interopRequireDefault(r(78068));var a=_interopRequireDefault(r(22686));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toKeyAlias(e,t=e.key){let r;if(e.kind==="method"){return toKeyAlias.increment()+""}else if((0,s.isIdentifier)(t)){r=t.name}else if((0,s.isStringLiteral)(t)){r=JSON.stringify(t.value)}else{r=JSON.stringify((0,a.default)((0,n.default)(t)))}if(e.computed){r=`[${r}]`}if(e.static){r=`static:${r}`}return r}toKeyAlias.uid=0;toKeyAlias.increment=function(){if(toKeyAlias.uid>=Number.MAX_SAFE_INTEGER){return toKeyAlias.uid=0}else{return toKeyAlias.uid++}}},62591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=toSequenceExpression;var s=_interopRequireDefault(r(37866));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function toSequenceExpression(e,t){if(!(e==null?void 0:e.length))return;const r=[];const n=(0,s.default)(e,t,r);if(!n)return;for(const e of r){t.push(e)}return n}},67166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=r(18939);var n=r(35093);var a=toStatement;t.default=a;function toStatement(e,t){if((0,s.isStatement)(e)){return e}let r=false;let a;if((0,s.isClass)(e)){r=true;a="ClassDeclaration"}else if((0,s.isFunction)(e)){r=true;a="FunctionDeclaration"}else if((0,s.isAssignmentExpression)(e)){return(0,n.expressionStatement)(e)}if(r&&!e.id){a=false}if(!a){if(t){return false}else{throw new Error(`cannot turn ${e.type} to a statement`)}}e.type=a;return e}},39331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(24788));var n=_interopRequireDefault(r(1370));var a=_interopRequireDefault(r(90735));var i=r(35093);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var o=valueToNode;t.default=o;function valueToNode(e){if(e===undefined){return(0,i.identifier)("undefined")}if(e===true||e===false){return(0,i.booleanLiteral)(e)}if(e===null){return(0,i.nullLiteral)()}if(typeof e==="string"){return(0,i.stringLiteral)(e)}if(typeof e==="number"){let t;if(Number.isFinite(e)){t=(0,i.numericLiteral)(Math.abs(e))}else{let r;if(Number.isNaN(e)){r=(0,i.numericLiteral)(0)}else{r=(0,i.numericLiteral)(1)}t=(0,i.binaryExpression)("/",r,(0,i.numericLiteral)(0))}if(e<0||Object.is(e,-0)){t=(0,i.unaryExpression)("-",t)}return t}if((0,n.default)(e)){const t=e.source;const r=e.toString().match(/\/([a-z]+|)$/)[1];return(0,i.regExpLiteral)(t,r)}if(Array.isArray(e)){return(0,i.arrayExpression)(e.map(valueToNode))}if((0,s.default)(e)){const t=[];for(const r of Object.keys(e)){let s;if((0,a.default)(r)){s=(0,i.identifier)(r)}else{s=(0,i.stringLiteral)(r)}t.push((0,i.objectProperty)(s,valueToNode(e[r])))}return(0,i.objectExpression)(t)}throw new Error("don't know how to turn this value into a node")}},89759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.classMethodOrDeclareMethodCommon=t.classMethodOrPropertyCommon=t.patternLikeCommon=t.functionDeclarationCommon=t.functionTypeAnnotationCommon=t.functionCommon=void 0;var s=_interopRequireDefault(r(28422));var n=_interopRequireDefault(r(90735));var a=r(74246);var i=r(91073);var o=_interopRequireWildcard(r(584));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(0,o.default)("ArrayExpression",{fields:{elements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:!process.env.BABEL_TYPES_8_BREAKING?[]:undefined}},visitor:["elements"],aliases:["Expression"]});(0,o.default)("AssignmentExpression",{fields:{operator:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING){return(0,o.assertValueType)("string")}const e=(0,o.assertOneOf)(...i.ASSIGNMENT_OPERATORS);const t=(0,o.assertOneOf)("=");return function(r,n,a){const i=(0,s.default)("Pattern",r.left)?t:e;i(r,n,a)}}()},left:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("LVal"):(0,o.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern")},right:{validate:(0,o.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]});(0,o.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,o.assertOneOf)(...i.BINARY_OPERATORS)},left:{validate:function(){const e=(0,o.assertNodeType)("Expression");const t=(0,o.assertNodeType)("Expression","PrivateName");const r=function(r,s,n){const a=r.operator==="in"?t:e;a(r,s,n)};r.oneOfNodeTypes=["Expression","PrivateName"];return r}()},right:{validate:(0,o.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]});(0,o.default)("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}}});(0,o.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,o.assertNodeType)("DirectiveLiteral")}}});(0,o.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}}});(0,o.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Directive"))),default:[]},body:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]});(0,o.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,o.assertNodeType)("Identifier"),optional:true}},aliases:["Statement","Terminatorless","CompletionStatement"]});(0,o.default)("CallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,o.assertNodeType)("Expression","V8IntrinsicIdentifier")},arguments:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))}},!process.env.BABEL_TYPES_8_BREAKING?{optional:{validate:(0,o.assertOneOf)(true,false),optional:true}}:{},{typeArguments:{validate:(0,o.assertNodeType)("TypeParameterInstantiation"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TSTypeParameterInstantiation"),optional:true}})});(0,o.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,o.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:true},body:{validate:(0,o.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]});(0,o.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},consequent:{validate:(0,o.assertNodeType)("Expression")},alternate:{validate:(0,o.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]});(0,o.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,o.assertNodeType)("Identifier"),optional:true}},aliases:["Statement","Terminatorless","CompletionStatement"]});(0,o.default)("DebuggerStatement",{aliases:["Statement"]});(0,o.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]});(0,o.default)("EmptyStatement",{aliases:["Statement"]});(0,o.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,o.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]});(0,o.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,o.assertNodeType)("Program")},comments:{validate:!process.env.BABEL_TYPES_8_BREAKING?Object.assign(()=>{},{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}):(0,o.assertEach)((0,o.assertNodeType)("CommentBlock","CommentLine")),optional:true},tokens:{validate:(0,o.assertEach)(Object.assign(()=>{},{type:"any"})),optional:true}}});(0,o.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("VariableDeclaration","LVal"):(0,o.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern")},right:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}}});(0,o.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,o.assertNodeType)("VariableDeclaration","Expression"),optional:true},test:{validate:(0,o.assertNodeType)("Expression"),optional:true},update:{validate:(0,o.assertNodeType)("Expression"),optional:true},body:{validate:(0,o.assertNodeType)("Statement")}}});const l={params:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Identifier","Pattern","RestElement","TSParameterProperty")))},generator:{default:false},async:{default:false}};t.functionCommon=l;const u={returnType:{validate:(0,o.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:true}};t.functionTypeAnnotationCommon=u;const c=Object.assign({},l,{declare:{validate:(0,o.assertValueType)("boolean"),optional:true},id:{validate:(0,o.assertNodeType)("Identifier"),optional:true}});t.functionDeclarationCommon=c;(0,o.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:Object.assign({},c,u,{body:{validate:(0,o.assertNodeType)("BlockStatement")}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return()=>{};const e=(0,o.assertNodeType)("Identifier");return function(t,r,n){if(!(0,s.default)("ExportDefaultDeclaration",t)){e(n,"id",n.id)}}}()});(0,o.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},l,u,{id:{validate:(0,o.assertNodeType)("Identifier"),optional:true},body:{validate:(0,o.assertNodeType)("BlockStatement")}})});const p={typeAnnotation:{validate:(0,o.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator")))}};t.patternLikeCommon=p;(0,o.default)("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","PatternLike","LVal","TSEntityName"],fields:Object.assign({},p,{name:{validate:(0,o.chain)((0,o.assertValueType)("string"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!(0,n.default)(r,false)){throw new TypeError(`"${r}" is not a valid identifier name`)}},{type:"string"}))},optional:{validate:(0,o.assertValueType)("boolean"),optional:true}}),validate(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;const n=/\.(\w+)$/.exec(t);if(!n)return;const[,i]=n;const o={computed:false};if(i==="property"){if((0,s.default)("MemberExpression",e,o))return;if((0,s.default)("OptionalMemberExpression",e,o))return}else if(i==="key"){if((0,s.default)("Property",e,o))return;if((0,s.default)("Method",e,o))return}else if(i==="exported"){if((0,s.default)("ExportSpecifier",e))return}else if(i==="imported"){if((0,s.default)("ImportSpecifier",e,{imported:r}))return}else if(i==="meta"){if((0,s.default)("MetaProperty",e,{meta:r}))return}if(((0,a.isKeyword)(r.name)||(0,a.isReservedWord)(r.name,false))&&r.name!=="this"){throw new TypeError(`"${r.name}" is not a valid identifier`)}}});(0,o.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},consequent:{validate:(0,o.assertNodeType)("Statement")},alternate:{optional:true,validate:(0,o.assertNodeType)("Statement")}}});(0,o.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,o.assertNodeType)("Identifier")},body:{validate:(0,o.assertNodeType)("Statement")}}});(0,o.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,o.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,o.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,o.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]});(0,o.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,o.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,o.assertValueType)("string")},flags:{validate:(0,o.chain)((0,o.assertValueType)("string"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;const s=/[^gimsuy]/.exec(r);if(s){throw new TypeError(`"${s[0]}" is not a valid RegExp flag`)}},{type:"string"})),default:""}}});(0,o.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,o.assertOneOf)(...i.LOGICAL_OPERATORS)},left:{validate:(0,o.assertNodeType)("Expression")},right:{validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("MemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression","LVal"],fields:Object.assign({object:{validate:(0,o.assertNodeType)("Expression")},property:{validate:function(){const e=(0,o.assertNodeType)("Identifier","PrivateName");const t=(0,o.assertNodeType)("Expression");const r=function(r,s,n){const a=r.computed?t:e;a(r,s,n)};r.oneOfNodeTypes=["Expression","Identifier","PrivateName"];return r}()},computed:{default:false}},!process.env.BABEL_TYPES_8_BREAKING?{optional:{validate:(0,o.assertOneOf)(true,false),optional:true}}:{})});(0,o.default)("NewExpression",{inherits:"CallExpression"});(0,o.default)("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceFile:{validate:(0,o.assertValueType)("string")},sourceType:{validate:(0,o.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,o.assertNodeType)("InterpreterDirective"),default:null,optional:true},directives:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Directive"))),default:[]},body:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block"]});(0,o.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ObjectMethod","ObjectProperty","SpreadElement")))}}});(0,o.default)("ObjectMethod",{builder:["kind","key","params","body","computed","generator","async"],fields:Object.assign({},l,u,{kind:Object.assign({validate:(0,o.assertOneOf)("method","get","set")},!process.env.BABEL_TYPES_8_BREAKING?{default:"method"}:{}),computed:{default:false},key:{validate:function(){const e=(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral");const t=(0,o.assertNodeType)("Expression");const r=function(r,s,n){const a=r.computed?t:e;a(r,s,n)};r.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral"];return r}()},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},body:{validate:(0,o.assertNodeType)("BlockStatement")}}),visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]});(0,o.default)("ObjectProperty",{builder:["key","value","computed","shorthand",...!process.env.BABEL_TYPES_8_BREAKING?["decorators"]:[]],fields:{computed:{default:false},key:{validate:function(){const e=(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral");const t=(0,o.assertNodeType)("Expression");const r=function(r,s,n){const a=r.computed?t:e;a(r,s,n)};r.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral"];return r}()},value:{validate:(0,o.assertNodeType)("Expression","PatternLike")},shorthand:{validate:(0,o.chain)((0,o.assertValueType)("boolean"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&e.computed){throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true")}},{type:"boolean"}),function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&!(0,s.default)("Identifier",e.key)){throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}}),default:false},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:function(){const e=(0,o.assertNodeType)("Identifier","Pattern");const t=(0,o.assertNodeType)("Expression");return function(r,n,a){if(!process.env.BABEL_TYPES_8_BREAKING)return;const i=(0,s.default)("ObjectPattern",r)?e:t;i(a,"value",a.value)}}()});(0,o.default)("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["LVal","PatternLike"],deprecatedAlias:"RestProperty",fields:Object.assign({},p,{argument:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("LVal"):(0,o.assertNodeType)("Identifier","Pattern","MemberExpression")}}),validate(e,t){if(!process.env.BABEL_TYPES_8_BREAKING)return;const r=/(\w+)\[(\d+)\]/.exec(t);if(!r)throw new Error("Internal Babel error: malformed key.");const[,s,n]=r;if(e[s].length>n+1){throw new TypeError(`RestElement must be last element of ${s}`)}}});(0,o.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,o.assertNodeType)("Expression"),optional:true}}});(0,o.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression")))}},aliases:["Expression"]});(0,o.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,o.assertNodeType)("Expression"),optional:true},consequent:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Statement")))}}});(0,o.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,o.assertNodeType)("Expression")},cases:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("SwitchCase")))}}});(0,o.default)("ThisExpression",{aliases:["Expression"]});(0,o.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:(0,o.chain)((0,o.assertNodeType)("BlockStatement"),Object.assign(function(e){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!e.handler&&!e.finalizer){throw new TypeError("TryStatement expects either a handler or finalizer, or both")}},{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:true,validate:(0,o.assertNodeType)("CatchClause")},finalizer:{optional:true,validate:(0,o.assertNodeType)("BlockStatement")}}});(0,o.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:true},argument:{validate:(0,o.assertNodeType)("Expression")},operator:{validate:(0,o.assertOneOf)(...i.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]});(0,o.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:false},argument:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("Expression"):(0,o.assertNodeType)("Identifier","MemberExpression")},operator:{validate:(0,o.assertOneOf)(...i.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]});(0,o.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,o.assertValueType)("boolean"),optional:true},kind:{validate:(0,o.assertOneOf)("var","let","const")},declarations:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("VariableDeclarator")))}},validate(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!(0,s.default)("ForXStatement",e,{left:r}))return;if(r.declarations.length!==1){throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${e.type}`)}}});(0,o.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING){return(0,o.assertNodeType)("LVal")}const e=(0,o.assertNodeType)("Identifier","ArrayPattern","ObjectPattern");const t=(0,o.assertNodeType)("Identifier");return function(r,s,n){const a=r.init?e:t;a(r,s,n)}}()},definite:{optional:true,validate:(0,o.assertValueType)("boolean")},init:{optional:true,validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}}});(0,o.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}}});(0,o.default)("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},p,{left:{validate:(0,o.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression")},right:{validate:(0,o.assertNodeType)("Expression")},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}})});(0,o.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},p,{elements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeOrValueType)("null","PatternLike")))},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}})});(0,o.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},l,u,{expression:{validate:(0,o.assertValueType)("boolean")},body:{validate:(0,o.assertNodeType)("BlockStatement","Expression")}})});(0,o.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","TSDeclareMethod","TSIndexSignature")))}}});(0,o.default)("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,o.assertNodeType)("Identifier"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:true},body:{validate:(0,o.assertNodeType)("ClassBody")},superClass:{optional:true,validate:(0,o.assertNodeType)("Expression")},superTypeParameters:{validate:(0,o.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true},implements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("TSExpressionWithTypeArguments","ClassImplements"))),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},mixins:{validate:(0,o.assertNodeType)("InterfaceExtends"),optional:true}}});(0,o.default)("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,o.assertNodeType)("Identifier")},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:true},body:{validate:(0,o.assertNodeType)("ClassBody")},superClass:{optional:true,validate:(0,o.assertNodeType)("Expression")},superTypeParameters:{validate:(0,o.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true},implements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("TSExpressionWithTypeArguments","ClassImplements"))),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},mixins:{validate:(0,o.assertNodeType)("InterfaceExtends"),optional:true},declare:{validate:(0,o.assertValueType)("boolean"),optional:true},abstract:{validate:(0,o.assertValueType)("boolean"),optional:true}},validate:function(){const e=(0,o.assertNodeType)("Identifier");return function(t,r,n){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!(0,s.default)("ExportDefaultDeclaration",t)){e(n,"id",n.id)}}}()});(0,o.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,o.assertNodeType)("StringLiteral")},exportKind:(0,o.validateOptional)((0,o.assertOneOf)("type","value")),assertions:{optional:true,validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertNodeType)("ImportAttribute"))}}});(0,o.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,o.assertNodeType)("FunctionDeclaration","TSDeclareFunction","ClassDeclaration","Expression")}}});(0,o.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{optional:true,validate:(0,o.chain)((0,o.assertNodeType)("Declaration"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&e.specifiers.length){throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration")}},{oneOfNodeTypes:["Declaration"]}),function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&e.source){throw new TypeError("Cannot export a declaration from a source")}})},assertions:{optional:true,validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertNodeType)("ImportAttribute"))},specifiers:{default:[],validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)(function(){const e=(0,o.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier");const t=(0,o.assertNodeType)("ExportSpecifier");if(!process.env.BABEL_TYPES_8_BREAKING)return e;return function(r,s,n){const a=r.source?e:t;a(r,s,n)}}()))},source:{validate:(0,o.assertNodeType)("StringLiteral"),optional:true},exportKind:(0,o.validateOptional)((0,o.assertOneOf)("type","value"))}});(0,o.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")},exported:{validate:(0,o.assertNodeType)("Identifier","StringLiteral")}}});(0,o.default)("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING){return(0,o.assertNodeType)("VariableDeclaration","LVal")}const e=(0,o.assertNodeType)("VariableDeclaration");const t=(0,o.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern");return function(r,n,a){if((0,s.default)("VariableDeclaration",a)){e(r,n,a)}else{t(r,n,a)}}}()},right:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")},await:{default:false}}});(0,o.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{assertions:{optional:true,validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertNodeType)("ImportAttribute"))},specifiers:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,o.assertNodeType)("StringLiteral")},importKind:{validate:(0,o.assertOneOf)("type","typeof","value"),optional:true}}});(0,o.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")}}});(0,o.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")}}});(0,o.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")},imported:{validate:(0,o.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,o.assertOneOf)("type","typeof"),optional:true}}});(0,o.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,o.chain)((0,o.assertNodeType)("Identifier"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;let n;switch(r.name){case"function":n="sent";break;case"new":n="target";break;case"import":n="meta";break}if(!(0,s.default)("Identifier",e.property,{name:n})){throw new TypeError("Unrecognised MetaProperty")}},{oneOfNodeTypes:["Identifier"]}))},property:{validate:(0,o.assertNodeType)("Identifier")}}});const f={abstract:{validate:(0,o.assertValueType)("boolean"),optional:true},accessibility:{validate:(0,o.assertOneOf)("public","private","protected"),optional:true},static:{default:false},computed:{default:false},optional:{validate:(0,o.assertValueType)("boolean"),optional:true},key:{validate:(0,o.chain)(function(){const e=(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral");const t=(0,o.assertNodeType)("Expression");return function(r,s,n){const a=r.computed?t:e;a(r,s,n)}}(),(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral","Expression"))}};t.classMethodOrPropertyCommon=f;const d=Object.assign({},l,f,{kind:{validate:(0,o.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,o.chain)((0,o.assertValueType)("string"),(0,o.assertOneOf)("public","private","protected")),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}});t.classMethodOrDeclareMethodCommon=d;(0,o.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:Object.assign({},d,u,{body:{validate:(0,o.assertNodeType)("BlockStatement")}})});(0,o.default)("ObjectPattern",{visitor:["properties","typeAnnotation","decorators"],builder:["properties"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},p,{properties:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("RestElement","ObjectProperty")))}})});(0,o.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("Super",{aliases:["Expression"]});(0,o.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,o.assertNodeType)("Expression")},quasi:{validate:(0,o.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true}}});(0,o.default)("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,o.assertShape)({raw:{validate:(0,o.assertValueType)("string")},cooked:{validate:(0,o.assertValueType)("string"),optional:true}})},tail:{default:false}}});(0,o.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("TemplateElement")))},expressions:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression","TSType")),function(e,t,r){if(e.quasis.length!==r.length+1){throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.\nExpected ${r.length+1} quasis but got ${e.quasis.length}`)}})}}});(0,o.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,o.chain)((0,o.assertValueType)("boolean"),Object.assign(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&!e.argument){throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")}},{type:"boolean"})),default:false},argument:{optional:true,validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,o.assertNodeType)("Expression")}}});(0,o.default)("Import",{aliases:["Expression"]});(0,o.default)("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,o.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,o.assertNodeType)("Identifier")}}});(0,o.default)("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,o.assertNodeType)("Expression")},property:{validate:function(){const e=(0,o.assertNodeType)("Identifier");const t=(0,o.assertNodeType)("Expression");const r=function(r,s,n){const a=r.computed?t:e;a(r,s,n)};r.oneOfNodeTypes=["Expression","Identifier"];return r}()},computed:{default:false},optional:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertValueType)("boolean"):(0,o.chain)((0,o.assertValueType)("boolean"),(0,o.assertOptionalChainStart)())}}});(0,o.default)("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:(0,o.assertNodeType)("Expression")},arguments:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))},optional:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertValueType)("boolean"):(0,o.chain)((0,o.assertValueType)("boolean"),(0,o.assertOptionalChainStart)())},typeArguments:{validate:(0,o.assertNodeType)("TypeParameterInstantiation"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TSTypeParameterInstantiation"),optional:true}}})},7180:(e,t,r)=>{"use strict";var s=_interopRequireWildcard(r(584));var n=r(89759);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}(0,s.default)("ArgumentPlaceholder",{});(0,s.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:!process.env.BABEL_TYPES_8_BREAKING?{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})}}:{object:{validate:(0,s.assertNodeType)("Expression")},callee:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],fields:Object.assign({},n.classMethodOrPropertyCommon,{value:{validate:(0,s.assertNodeType)("Expression"),optional:true},definite:{validate:(0,s.assertValueType)("boolean"),optional:true},typeAnnotation:{validate:(0,s.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator"))),optional:true},readonly:{validate:(0,s.assertValueType)("boolean"),optional:true},declare:{validate:(0,s.assertValueType)("boolean"),optional:true}})});(0,s.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]});(0,s.default)("ClassPrivateProperty",{visitor:["key","value","decorators"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,s.assertNodeType)("PrivateName")},value:{validate:(0,s.assertNodeType)("Expression"),optional:true},typeAnnotation:{validate:(0,s.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator"))),optional:true}}});(0,s.default)("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},n.classMethodOrDeclareMethodCommon,n.functionTypeAnnotationCommon,{key:{validate:(0,s.assertNodeType)("PrivateName")},body:{validate:(0,s.assertNodeType)("BlockStatement")}})});(0,s.default)("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,s.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,s.assertNodeType)("StringLiteral")}}});(0,s.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")}}});(0,s.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,s.assertNodeType)("Identifier")}}});(0,s.default)("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,s.assertNodeType)("Identifier")}}});(0,s.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("ObjectProperty","SpreadElement")))}}});(0,s.default)("TupleExpression",{fields:{elements:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]});(0,s.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,s.default)("StaticBlock",{visitor:["body"],fields:{body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent"]})},41290:(e,t,r)=>{"use strict";var s=_interopRequireWildcard(r(584));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const n=(e,t="TypeParameterDeclaration")=>{(0,s.default)(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends","mixins","implements","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)(t),extends:(0,s.validateOptional)((0,s.arrayOfType)("InterfaceExtends")),mixins:(0,s.validateOptional)((0,s.arrayOfType)("InterfaceExtends")),implements:(0,s.validateOptional)((0,s.arrayOfType)("ClassImplements")),body:(0,s.validateType)("ObjectTypeAnnotation")}})};(0,s.default)("AnyTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow","FlowType"],fields:{elementType:(0,s.validateType)("FlowType")}});(0,s.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,s.validate)((0,s.assertValueType)("boolean"))}});(0,s.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TypeParameterInstantiation")}});n("DeclareClass");(0,s.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),predicate:(0,s.validateOptionalType)("DeclaredPredicate")}});n("DeclareInterface");(0,s.default)("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)(["Identifier","StringLiteral"]),body:(0,s.validateType)("BlockStatement"),kind:(0,s.validateOptional)((0,s.assertOneOf)("CommonJS","ES"))}});(0,s.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,s.validateType)("TypeAnnotation")}});(0,s.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TypeParameterDeclaration"),right:(0,s.validateType)("FlowType")}});(0,s.default)("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,s.validateOptionalType)("FlowType")}});(0,s.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier")}});(0,s.default)("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{declaration:(0,s.validateOptionalType)("Flow"),specifiers:(0,s.validateOptional)((0,s.arrayOfType)(["ExportSpecifier","ExportNamespaceSpecifier"])),source:(0,s.validateOptionalType)("StringLiteral"),default:(0,s.validateOptional)((0,s.assertValueType)("boolean"))}});(0,s.default)("DeclareExportAllDeclaration",{visitor:["source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{source:(0,s.validateType)("StringLiteral"),exportKind:(0,s.validateOptional)((0,s.assertOneOf)("type","value"))}});(0,s.default)("DeclaredPredicate",{visitor:["value"],aliases:["Flow","FlowPredicate"],fields:{value:(0,s.validateType)("Flow")}});(0,s.default)("ExistsTypeAnnotation",{aliases:["Flow","FlowType"]});(0,s.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow","FlowType"],fields:{typeParameters:(0,s.validateOptionalType)("TypeParameterDeclaration"),params:(0,s.validate)((0,s.arrayOfType)("FunctionTypeParam")),rest:(0,s.validateOptionalType)("FunctionTypeParam"),returnType:(0,s.validateType)("FlowType")}});(0,s.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{name:(0,s.validateOptionalType)("Identifier"),typeAnnotation:(0,s.validateType)("FlowType"),optional:(0,s.validateOptional)((0,s.assertValueType)("boolean"))}});(0,s.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow","FlowType"],fields:{id:(0,s.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,s.validateOptionalType)("TypeParameterInstantiation")}});(0,s.default)("InferredPredicate",{aliases:["Flow","FlowPredicate"]});(0,s.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{id:(0,s.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,s.validateOptionalType)("TypeParameterInstantiation")}});n("InterfaceDeclaration");(0,s.default)("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["Flow","FlowType"],fields:{extends:(0,s.validateOptional)((0,s.arrayOfType)("InterfaceExtends")),body:(0,s.validateType)("ObjectTypeAnnotation")}});(0,s.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,s.validate)((0,s.arrayOfType)("FlowType"))}});(0,s.default)("MixedTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow","FlowType"],fields:{typeAnnotation:(0,s.validateType)("FlowType")}});(0,s.default)("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,s.validate)((0,s.assertValueType)("number"))}});(0,s.default)("NumberTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["Flow","FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,s.validate)((0,s.arrayOfType)(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:(0,s.validateOptional)((0,s.arrayOfType)("ObjectTypeIndexer")),callProperties:(0,s.validateOptional)((0,s.arrayOfType)("ObjectTypeCallProperty")),internalSlots:(0,s.validateOptional)((0,s.arrayOfType)("ObjectTypeInternalSlot")),exact:{validate:(0,s.assertValueType)("boolean"),default:false},inexact:(0,s.validateOptional)((0,s.assertValueType)("boolean"))}});(0,s.default)("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["Flow","UserWhitespacable"],fields:{id:(0,s.validateType)("Identifier"),value:(0,s.validateType)("FlowType"),optional:(0,s.validate)((0,s.assertValueType)("boolean")),static:(0,s.validate)((0,s.assertValueType)("boolean")),method:(0,s.validate)((0,s.assertValueType)("boolean"))}});(0,s.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{value:(0,s.validateType)("FlowType"),static:(0,s.validate)((0,s.assertValueType)("boolean"))}});(0,s.default)("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["Flow","UserWhitespacable"],fields:{id:(0,s.validateOptionalType)("Identifier"),key:(0,s.validateType)("FlowType"),value:(0,s.validateType)("FlowType"),static:(0,s.validate)((0,s.assertValueType)("boolean")),variance:(0,s.validateOptionalType)("Variance")}});(0,s.default)("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["Flow","UserWhitespacable"],fields:{key:(0,s.validateType)(["Identifier","StringLiteral"]),value:(0,s.validateType)("FlowType"),kind:(0,s.validate)((0,s.assertOneOf)("init","get","set")),static:(0,s.validate)((0,s.assertValueType)("boolean")),proto:(0,s.validate)((0,s.assertValueType)("boolean")),optional:(0,s.validate)((0,s.assertValueType)("boolean")),variance:(0,s.validateOptionalType)("Variance"),method:(0,s.validate)((0,s.assertValueType)("boolean"))}});(0,s.default)("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["Flow","UserWhitespacable"],fields:{argument:(0,s.validateType)("FlowType")}});(0,s.default)("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,s.validateOptionalType)("FlowType"),impltype:(0,s.validateType)("FlowType")}});(0,s.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{id:(0,s.validateType)("Identifier"),qualification:(0,s.validateType)(["Identifier","QualifiedTypeIdentifier"])}});(0,s.default)("StringLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,s.validate)((0,s.assertValueType)("string"))}});(0,s.default)("StringTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("SymbolTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("ThisTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,s.validate)((0,s.arrayOfType)("FlowType"))}});(0,s.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow","FlowType"],fields:{argument:(0,s.validateType)("FlowType")}});(0,s.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TypeParameterDeclaration"),right:(0,s.validateType)("FlowType")}});(0,s.default)("TypeAnnotation",{aliases:["Flow"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,s.validateType)("FlowType")}});(0,s.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{expression:(0,s.validateType)("Expression"),typeAnnotation:(0,s.validateType)("TypeAnnotation")}});(0,s.default)("TypeParameter",{aliases:["Flow"],visitor:["bound","default","variance"],fields:{name:(0,s.validate)((0,s.assertValueType)("string")),bound:(0,s.validateOptionalType)("TypeAnnotation"),default:(0,s.validateOptionalType)("FlowType"),variance:(0,s.validateOptionalType)("Variance")}});(0,s.default)("TypeParameterDeclaration",{aliases:["Flow"],visitor:["params"],fields:{params:(0,s.validate)((0,s.arrayOfType)("TypeParameter"))}});(0,s.default)("TypeParameterInstantiation",{aliases:["Flow"],visitor:["params"],fields:{params:(0,s.validate)((0,s.arrayOfType)("FlowType"))}});(0,s.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,s.validate)((0,s.arrayOfType)("FlowType"))}});(0,s.default)("Variance",{aliases:["Flow"],builder:["kind"],fields:{kind:(0,s.validate)((0,s.assertOneOf)("minus","plus"))}});(0,s.default)("VoidTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]});(0,s.default)("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,s.validateType)("Identifier"),body:(0,s.validateType)(["EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody"])}});(0,s.default)("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,s.validate)((0,s.assertValueType)("boolean")),members:(0,s.validateArrayOfType)("EnumBooleanMember")}});(0,s.default)("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,s.validate)((0,s.assertValueType)("boolean")),members:(0,s.validateArrayOfType)("EnumNumberMember")}});(0,s.default)("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,s.validate)((0,s.assertValueType)("boolean")),members:(0,s.validateArrayOfType)(["EnumStringMember","EnumDefaultedMember"])}});(0,s.default)("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,s.validateArrayOfType)("EnumDefaultedMember")}});(0,s.default)("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,s.validateType)("Identifier"),init:(0,s.validateType)("BooleanLiteral")}});(0,s.default)("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,s.validateType)("Identifier"),init:(0,s.validateType)("NumericLiteral")}});(0,s.default)("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,s.validateType)("Identifier"),init:(0,s.validateType)("StringLiteral")}});(0,s.default)("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,s.validateType)("Identifier")}})},74098:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"VISITOR_KEYS",{enumerable:true,get:function(){return n.VISITOR_KEYS}});Object.defineProperty(t,"ALIAS_KEYS",{enumerable:true,get:function(){return n.ALIAS_KEYS}});Object.defineProperty(t,"FLIPPED_ALIAS_KEYS",{enumerable:true,get:function(){return n.FLIPPED_ALIAS_KEYS}});Object.defineProperty(t,"NODE_FIELDS",{enumerable:true,get:function(){return n.NODE_FIELDS}});Object.defineProperty(t,"BUILDER_KEYS",{enumerable:true,get:function(){return n.BUILDER_KEYS}});Object.defineProperty(t,"DEPRECATED_KEYS",{enumerable:true,get:function(){return n.DEPRECATED_KEYS}});Object.defineProperty(t,"NODE_PARENT_VALIDATIONS",{enumerable:true,get:function(){return n.NODE_PARENT_VALIDATIONS}});Object.defineProperty(t,"PLACEHOLDERS",{enumerable:true,get:function(){return a.PLACEHOLDERS}});Object.defineProperty(t,"PLACEHOLDERS_ALIAS",{enumerable:true,get:function(){return a.PLACEHOLDERS_ALIAS}});Object.defineProperty(t,"PLACEHOLDERS_FLIPPED_ALIAS",{enumerable:true,get:function(){return a.PLACEHOLDERS_FLIPPED_ALIAS}});t.TYPES=void 0;var s=_interopRequireDefault(r(80035));r(89759);r(41290);r(26924);r(14429);r(7180);r(83812);var n=r(584);var a=r(8689);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(0,s.default)(n.VISITOR_KEYS);(0,s.default)(n.ALIAS_KEYS);(0,s.default)(n.FLIPPED_ALIAS_KEYS);(0,s.default)(n.NODE_FIELDS);(0,s.default)(n.BUILDER_KEYS);(0,s.default)(n.DEPRECATED_KEYS);(0,s.default)(a.PLACEHOLDERS_ALIAS);(0,s.default)(a.PLACEHOLDERS_FLIPPED_ALIAS);const i=Object.keys(n.VISITOR_KEYS).concat(Object.keys(n.FLIPPED_ALIAS_KEYS)).concat(Object.keys(n.DEPRECATED_KEYS));t.TYPES=i},26924:(e,t,r)=>{"use strict";var s=_interopRequireWildcard(r(584));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}(0,s.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,s.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:true,validate:(0,s.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}});(0,s.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,s.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}});(0,s.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,s.assertNodeType)("JSXOpeningElement")},closingElement:{optional:true,validate:(0,s.assertNodeType)("JSXClosingElement")},children:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))},selfClosing:{validate:(0,s.assertValueType)("boolean"),optional:true}}});(0,s.default)("JSXEmptyExpression",{aliases:["JSX"]});(0,s.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,s.assertNodeType)("Expression","JSXEmptyExpression")}}});(0,s.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("JSXIdentifier",{builder:["name"],aliases:["JSX"],fields:{name:{validate:(0,s.assertValueType)("string")}}});(0,s.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX"],fields:{object:{validate:(0,s.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,s.assertNodeType)("JSXIdentifier")}}});(0,s.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,s.assertNodeType)("JSXIdentifier")},name:{validate:(0,s.assertNodeType)("JSXIdentifier")}}});(0,s.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,s.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:false},attributes:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:(0,s.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true}}});(0,s.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}});(0,s.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}}});(0,s.default)("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["JSX","Immutable","Expression"],fields:{openingFragment:{validate:(0,s.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,s.assertNodeType)("JSXClosingFragment")},children:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}});(0,s.default)("JSXOpeningFragment",{aliases:["JSX","Immutable"]});(0,s.default)("JSXClosingFragment",{aliases:["JSX","Immutable"]})},14429:(e,t,r)=>{"use strict";var s=_interopRequireWildcard(r(584));var n=r(8689);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}(0,s.default)("Noop",{visitor:[]});(0,s.default)("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:(0,s.assertNodeType)("Identifier")},expectedNode:{validate:(0,s.assertOneOf)(...n.PLACEHOLDERS)}}});(0,s.default)("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,s.assertValueType)("string")}}})},8689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PLACEHOLDERS_FLIPPED_ALIAS=t.PLACEHOLDERS_ALIAS=t.PLACEHOLDERS=void 0;var s=r(584);const n=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"];t.PLACEHOLDERS=n;const a={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};t.PLACEHOLDERS_ALIAS=a;for(const e of n){const t=s.ALIAS_KEYS[e];if(t==null?void 0:t.length)a[e]=t}const i={};t.PLACEHOLDERS_FLIPPED_ALIAS=i;Object.keys(a).forEach(e=>{a[e].forEach(t=>{if(!Object.hasOwnProperty.call(i,t)){i[t]=[]}i[t].push(e)})})},83812:(e,t,r)=>{"use strict";var s=_interopRequireWildcard(r(584));var n=r(89759);function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}const a=(0,s.assertValueType)("boolean");const i={returnType:{validate:(0,s.assertNodeType)("TSTypeAnnotation","Noop"),optional:true},typeParameters:{validate:(0,s.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:true}};(0,s.default)("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,s.assertOneOf)("public","private","protected"),optional:true},readonly:{validate:(0,s.assertValueType)("boolean"),optional:true},parameter:{validate:(0,s.assertNodeType)("Identifier","AssignmentPattern")}}});(0,s.default)("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},n.functionDeclarationCommon,i)});(0,s.default)("TSDeclareMethod",{visitor:["decorators","key","typeParameters","params","returnType"],fields:Object.assign({},n.classMethodOrDeclareMethodCommon,i)});(0,s.default)("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,s.validateType)("TSEntityName"),right:(0,s.validateType)("Identifier")}});const o={typeParameters:(0,s.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,s.validateArrayOfType)(["Identifier","RestElement"]),typeAnnotation:(0,s.validateOptionalType)("TSTypeAnnotation")};const l={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:o};(0,s.default)("TSCallSignatureDeclaration",l);(0,s.default)("TSConstructSignatureDeclaration",l);const u={key:(0,s.validateType)("Expression"),computed:(0,s.validate)(a),optional:(0,s.validateOptional)(a)};(0,s.default)("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation","initializer"],fields:Object.assign({},u,{readonly:(0,s.validateOptional)(a),typeAnnotation:(0,s.validateOptionalType)("TSTypeAnnotation"),initializer:(0,s.validateOptionalType)("Expression")})});(0,s.default)("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},o,u)});(0,s.default)("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,s.validateOptional)(a),parameters:(0,s.validateArrayOfType)("Identifier"),typeAnnotation:(0,s.validateOptionalType)("TSTypeAnnotation")}});const c=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const e of c){(0,s.default)(e,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}})}(0,s.default)("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const p={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"],fields:o};(0,s.default)("TSFunctionType",p);(0,s.default)("TSConstructorType",p);(0,s.default)("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,s.validateType)("TSEntityName"),typeParameters:(0,s.validateOptionalType)("TSTypeParameterInstantiation")}});(0,s.default)("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,s.validateType)(["Identifier","TSThisType"]),typeAnnotation:(0,s.validateOptionalType)("TSTypeAnnotation"),asserts:(0,s.validateOptional)(a)}});(0,s.default)("TSTypeQuery",{aliases:["TSType"],visitor:["exprName"],fields:{exprName:(0,s.validateType)(["TSEntityName","TSImportType"])}});(0,s.default)("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,s.validateArrayOfType)("TSTypeElement")}});(0,s.default)("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,s.validateType)("TSType")}});(0,s.default)("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,s.validateArrayOfType)(["TSType","TSNamedTupleMember"])}});(0,s.default)("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,s.validateType)("Identifier"),optional:{validate:a,default:false},elementType:(0,s.validateType)("TSType")}});const f={aliases:["TSType"],visitor:["types"],fields:{types:(0,s.validateArrayOfType)("TSType")}};(0,s.default)("TSUnionType",f);(0,s.default)("TSIntersectionType",f);(0,s.default)("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,s.validateType)("TSType"),extendsType:(0,s.validateType)("TSType"),trueType:(0,s.validateType)("TSType"),falseType:(0,s.validateType)("TSType")}});(0,s.default)("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,s.validateType)("TSTypeParameter")}});(0,s.default)("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{operator:(0,s.validate)((0,s.assertValueType)("string")),typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,s.validateType)("TSType"),indexType:(0,s.validateType)("TSType")}});(0,s.default)("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","typeAnnotation","nameType"],fields:{readonly:(0,s.validateOptional)(a),typeParameter:(0,s.validateType)("TSTypeParameter"),optional:(0,s.validateOptional)(a),typeAnnotation:(0,s.validateOptionalType)("TSType"),nameType:(0,s.validateOptionalType)("TSType")}});(0,s.default)("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:(0,s.validateType)(["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral"])}});(0,s.default)("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,s.validateType)("TSEntityName"),typeParameters:(0,s.validateOptionalType)("TSTypeParameterInstantiation")}});(0,s.default)("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,s.validateOptional)(a),id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,s.validateOptional)((0,s.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,s.validateType)("TSInterfaceBody")}});(0,s.default)("TSInterfaceBody",{visitor:["body"],fields:{body:(0,s.validateArrayOfType)("TSTypeElement")}});(0,s.default)("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,s.validateOptional)(a),id:(0,s.validateType)("Identifier"),typeParameters:(0,s.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSAsExpression",{aliases:["Expression"],visitor:["expression","typeAnnotation"],fields:{expression:(0,s.validateType)("Expression"),typeAnnotation:(0,s.validateType)("TSType")}});(0,s.default)("TSTypeAssertion",{aliases:["Expression"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,s.validateType)("TSType"),expression:(0,s.validateType)("Expression")}});(0,s.default)("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,s.validateOptional)(a),const:(0,s.validateOptional)(a),id:(0,s.validateType)("Identifier"),members:(0,s.validateArrayOfType)("TSEnumMember"),initializer:(0,s.validateOptionalType)("Expression")}});(0,s.default)("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,s.validateType)(["Identifier","StringLiteral"]),initializer:(0,s.validateOptionalType)("Expression")}});(0,s.default)("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:(0,s.validateOptional)(a),global:(0,s.validateOptional)(a),id:(0,s.validateType)(["Identifier","StringLiteral"]),body:(0,s.validateType)(["TSModuleBlock","TSModuleDeclaration"])}});(0,s.default)("TSModuleBlock",{aliases:["Scopable","Block","BlockParent"],visitor:["body"],fields:{body:(0,s.validateArrayOfType)("Statement")}});(0,s.default)("TSImportType",{aliases:["TSType"],visitor:["argument","qualifier","typeParameters"],fields:{argument:(0,s.validateType)("StringLiteral"),qualifier:(0,s.validateOptionalType)("TSEntityName"),typeParameters:(0,s.validateOptionalType)("TSTypeParameterInstantiation")}});(0,s.default)("TSImportEqualsDeclaration",{aliases:["Statement"],visitor:["id","moduleReference"],fields:{isExport:(0,s.validate)(a),id:(0,s.validateType)("Identifier"),moduleReference:(0,s.validateType)(["TSEntityName","TSExternalModuleReference"])}});(0,s.default)("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,s.validateType)("StringLiteral")}});(0,s.default)("TSNonNullExpression",{aliases:["Expression"],visitor:["expression"],fields:{expression:(0,s.validateType)("Expression")}});(0,s.default)("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,s.validateType)("Expression")}});(0,s.default)("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,s.validateType)("Identifier")}});(0,s.default)("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,s.assertNodeType)("TSType")}}});(0,s.default)("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("TSType")))}}});(0,s.default)("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("TSTypeParameter")))}}});(0,s.default)("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,s.assertValueType)("string")},constraint:{validate:(0,s.assertNodeType)("TSType"),optional:true},default:{validate:(0,s.assertNodeType)("TSType"),optional:true}}})},584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validate=validate;t.typeIs=typeIs;t.validateType=validateType;t.validateOptional=validateOptional;t.validateOptionalType=validateOptionalType;t.arrayOf=arrayOf;t.arrayOfType=arrayOfType;t.validateArrayOfType=validateArrayOfType;t.assertEach=assertEach;t.assertOneOf=assertOneOf;t.assertNodeType=assertNodeType;t.assertNodeOrValueType=assertNodeOrValueType;t.assertValueType=assertValueType;t.assertShape=assertShape;t.assertOptionalChainStart=assertOptionalChainStart;t.chain=chain;t.default=defineType;t.NODE_PARENT_VALIDATIONS=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.FLIPPED_ALIAS_KEYS=t.ALIAS_KEYS=t.VISITOR_KEYS=void 0;var s=_interopRequireDefault(r(28422));var n=r(81236);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const a={};t.VISITOR_KEYS=a;const i={};t.ALIAS_KEYS=i;const o={};t.FLIPPED_ALIAS_KEYS=o;const l={};t.NODE_FIELDS=l;const u={};t.BUILDER_KEYS=u;const c={};t.DEPRECATED_KEYS=c;const p={};t.NODE_PARENT_VALIDATIONS=p;function getType(e){if(Array.isArray(e)){return"array"}else if(e===null){return"null"}else{return typeof e}}function validate(e){return{validate:e}}function typeIs(e){return typeof e==="string"?assertNodeType(e):assertNodeType(...e)}function validateType(e){return validate(typeIs(e))}function validateOptional(e){return{validate:e,optional:true}}function validateOptionalType(e){return{validate:typeIs(e),optional:true}}function arrayOf(e){return chain(assertValueType("array"),assertEach(e))}function arrayOfType(e){return arrayOf(typeIs(e))}function validateArrayOfType(e){return validate(arrayOfType(e))}function assertEach(e){function validator(t,r,s){if(!Array.isArray(s))return;for(let a=0;a{o[t]=o[t]||[];o[t].push(e)});if(t.validate){p[e]=t.validate}y[e]=t}const y={}},63760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s={react:true,assertNode:true,createTypeAnnotationBasedOnTypeof:true,createUnionTypeAnnotation:true,createFlowUnionType:true,createTSUnionType:true,cloneNode:true,clone:true,cloneDeep:true,cloneDeepWithoutLoc:true,cloneWithoutLoc:true,addComment:true,addComments:true,inheritInnerComments:true,inheritLeadingComments:true,inheritsComments:true,inheritTrailingComments:true,removeComments:true,ensureBlock:true,toBindingIdentifierName:true,toBlock:true,toComputedKey:true,toExpression:true,toIdentifier:true,toKeyAlias:true,toSequenceExpression:true,toStatement:true,valueToNode:true,appendToMemberExpression:true,inherits:true,prependToMemberExpression:true,removeProperties:true,removePropertiesDeep:true,removeTypeDuplicates:true,getBindingIdentifiers:true,getOuterBindingIdentifiers:true,traverse:true,traverseFast:true,shallowEqual:true,is:true,isBinding:true,isBlockScoped:true,isImmutable:true,isLet:true,isNode:true,isNodesEquivalent:true,isPlaceholderType:true,isReferenced:true,isScope:true,isSpecifierDefault:true,isType:true,isValidES3Identifier:true,isValidIdentifier:true,isVar:true,matchesPattern:true,validate:true,buildMatchMemberExpression:true};Object.defineProperty(t,"assertNode",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"createTypeAnnotationBasedOnTypeof",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"createUnionTypeAnnotation",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"createFlowUnionType",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"createTSUnionType",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"cloneNode",{enumerable:true,get:function(){return y.default}});Object.defineProperty(t,"clone",{enumerable:true,get:function(){return h.default}});Object.defineProperty(t,"cloneDeep",{enumerable:true,get:function(){return m.default}});Object.defineProperty(t,"cloneDeepWithoutLoc",{enumerable:true,get:function(){return g.default}});Object.defineProperty(t,"cloneWithoutLoc",{enumerable:true,get:function(){return b.default}});Object.defineProperty(t,"addComment",{enumerable:true,get:function(){return x.default}});Object.defineProperty(t,"addComments",{enumerable:true,get:function(){return v.default}});Object.defineProperty(t,"inheritInnerComments",{enumerable:true,get:function(){return E.default}});Object.defineProperty(t,"inheritLeadingComments",{enumerable:true,get:function(){return T.default}});Object.defineProperty(t,"inheritsComments",{enumerable:true,get:function(){return S.default}});Object.defineProperty(t,"inheritTrailingComments",{enumerable:true,get:function(){return P.default}});Object.defineProperty(t,"removeComments",{enumerable:true,get:function(){return j.default}});Object.defineProperty(t,"ensureBlock",{enumerable:true,get:function(){return D.default}});Object.defineProperty(t,"toBindingIdentifierName",{enumerable:true,get:function(){return O.default}});Object.defineProperty(t,"toBlock",{enumerable:true,get:function(){return _.default}});Object.defineProperty(t,"toComputedKey",{enumerable:true,get:function(){return C.default}});Object.defineProperty(t,"toExpression",{enumerable:true,get:function(){return I.default}});Object.defineProperty(t,"toIdentifier",{enumerable:true,get:function(){return k.default}});Object.defineProperty(t,"toKeyAlias",{enumerable:true,get:function(){return R.default}});Object.defineProperty(t,"toSequenceExpression",{enumerable:true,get:function(){return M.default}});Object.defineProperty(t,"toStatement",{enumerable:true,get:function(){return N.default}});Object.defineProperty(t,"valueToNode",{enumerable:true,get:function(){return F.default}});Object.defineProperty(t,"appendToMemberExpression",{enumerable:true,get:function(){return B.default}});Object.defineProperty(t,"inherits",{enumerable:true,get:function(){return q.default}});Object.defineProperty(t,"prependToMemberExpression",{enumerable:true,get:function(){return W.default}});Object.defineProperty(t,"removeProperties",{enumerable:true,get:function(){return U.default}});Object.defineProperty(t,"removePropertiesDeep",{enumerable:true,get:function(){return K.default}});Object.defineProperty(t,"removeTypeDuplicates",{enumerable:true,get:function(){return V.default}});Object.defineProperty(t,"getBindingIdentifiers",{enumerable:true,get:function(){return $.default}});Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:true,get:function(){return J.default}});Object.defineProperty(t,"traverse",{enumerable:true,get:function(){return H.default}});Object.defineProperty(t,"traverseFast",{enumerable:true,get:function(){return G.default}});Object.defineProperty(t,"shallowEqual",{enumerable:true,get:function(){return Y.default}});Object.defineProperty(t,"is",{enumerable:true,get:function(){return X.default}});Object.defineProperty(t,"isBinding",{enumerable:true,get:function(){return z.default}});Object.defineProperty(t,"isBlockScoped",{enumerable:true,get:function(){return Q.default}});Object.defineProperty(t,"isImmutable",{enumerable:true,get:function(){return Z.default}});Object.defineProperty(t,"isLet",{enumerable:true,get:function(){return ee.default}});Object.defineProperty(t,"isNode",{enumerable:true,get:function(){return te.default}});Object.defineProperty(t,"isNodesEquivalent",{enumerable:true,get:function(){return re.default}});Object.defineProperty(t,"isPlaceholderType",{enumerable:true,get:function(){return se.default}});Object.defineProperty(t,"isReferenced",{enumerable:true,get:function(){return ne.default}});Object.defineProperty(t,"isScope",{enumerable:true,get:function(){return ae.default}});Object.defineProperty(t,"isSpecifierDefault",{enumerable:true,get:function(){return ie.default}});Object.defineProperty(t,"isType",{enumerable:true,get:function(){return oe.default}});Object.defineProperty(t,"isValidES3Identifier",{enumerable:true,get:function(){return le.default}});Object.defineProperty(t,"isValidIdentifier",{enumerable:true,get:function(){return ue.default}});Object.defineProperty(t,"isVar",{enumerable:true,get:function(){return ce.default}});Object.defineProperty(t,"matchesPattern",{enumerable:true,get:function(){return pe.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return fe.default}});Object.defineProperty(t,"buildMatchMemberExpression",{enumerable:true,get:function(){return de.default}});t.react=void 0;var n=_interopRequireDefault(r(10800));var a=_interopRequireDefault(r(80593));var i=_interopRequireDefault(r(67629));var o=_interopRequireDefault(r(34654));var l=r(28970);Object.keys(l).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===l[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return l[e]}})});var u=_interopRequireDefault(r(52989));var c=_interopRequireDefault(r(78581));var p=_interopRequireDefault(r(95720));var f=r(35093);Object.keys(f).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===f[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return f[e]}})});var d=r(1221);Object.keys(d).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===d[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return d[e]}})});var y=_interopRequireDefault(r(78068));var h=_interopRequireDefault(r(10063));var m=_interopRequireDefault(r(9784));var g=_interopRequireDefault(r(59233));var b=_interopRequireDefault(r(80405));var x=_interopRequireDefault(r(55899));var v=_interopRequireDefault(r(85565));var E=_interopRequireDefault(r(63307));var T=_interopRequireDefault(r(94149));var S=_interopRequireDefault(r(58245));var P=_interopRequireDefault(r(41177));var j=_interopRequireDefault(r(4496));var w=r(69946);Object.keys(w).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===w[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return w[e]}})});var A=r(91073);Object.keys(A).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===A[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return A[e]}})});var D=_interopRequireDefault(r(30965));var O=_interopRequireDefault(r(77853));var _=_interopRequireDefault(r(96262));var C=_interopRequireDefault(r(9212));var I=_interopRequireDefault(r(96456));var k=_interopRequireDefault(r(76898));var R=_interopRequireDefault(r(41093));var M=_interopRequireDefault(r(62591));var N=_interopRequireDefault(r(67166));var F=_interopRequireDefault(r(39331));var L=r(74098);Object.keys(L).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===L[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return L[e]}})});var B=_interopRequireDefault(r(3340));var q=_interopRequireDefault(r(83092));var W=_interopRequireDefault(r(55727));var U=_interopRequireDefault(r(95313));var K=_interopRequireDefault(r(22686));var V=_interopRequireDefault(r(77523));var $=_interopRequireDefault(r(97723));var J=_interopRequireDefault(r(73946));var H=_interopRequireWildcard(r(11691));Object.keys(H).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===H[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return H[e]}})});var G=_interopRequireDefault(r(39361));var Y=_interopRequireDefault(r(80400));var X=_interopRequireDefault(r(28422));var z=_interopRequireDefault(r(52459));var Q=_interopRequireDefault(r(16800));var Z=_interopRequireDefault(r(66028));var ee=_interopRequireDefault(r(63289));var te=_interopRequireDefault(r(95595));var re=_interopRequireDefault(r(40191));var se=_interopRequireDefault(r(8010));var ne=_interopRequireDefault(r(898));var ae=_interopRequireDefault(r(45379));var ie=_interopRequireDefault(r(10932));var oe=_interopRequireDefault(r(30699));var le=_interopRequireDefault(r(29834));var ue=_interopRequireDefault(r(90735));var ce=_interopRequireDefault(r(8965));var pe=_interopRequireDefault(r(71854));var fe=_interopRequireDefault(r(81236));var de=_interopRequireDefault(r(66449));var ye=r(18939);Object.keys(ye).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===ye[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return ye[e]}})});var he=r(5416);Object.keys(he).forEach(function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(s,e))return;if(e in t&&t[e]===he[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return he[e]}})});function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){var a=s?Object.getOwnPropertyDescriptor(e,n):null;if(a&&(a.get||a.set)){Object.defineProperty(r,n,a)}else{r[n]=e[n]}}}r.default=e;if(t){t.set(e,r)}return r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const me={isReactComponent:n.default,isCompatTag:a.default,buildChildren:i.default};t.react=me},3340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=appendToMemberExpression;var s=r(35093);function appendToMemberExpression(e,t,r=false){e.object=(0,s.memberExpression)(e.object,e.property,e.computed);e.property=t;e.computed=!!r;return e}},77523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=removeTypeDuplicates;var s=r(18939);function getQualifiedName(e){return(0,s.isIdentifier)(e)?e.name:`${e.id.name}.${getQualifiedName(e.qualification)}`}function removeTypeDuplicates(e){const t={};const r={};const n=[];const a=[];for(let i=0;i=0){continue}if((0,s.isAnyTypeAnnotation)(o)){return[o]}if((0,s.isFlowBaseAnnotation)(o)){r[o.type]=o;continue}if((0,s.isUnionTypeAnnotation)(o)){if(n.indexOf(o.types)<0){e=e.concat(o.types);n.push(o.types)}continue}if((0,s.isGenericTypeAnnotation)(o)){const e=getQualifiedName(o.id);if(t[e]){let r=t[e];if(r.typeParameters){if(o.typeParameters){r.typeParameters.params=removeTypeDuplicates(r.typeParameters.params.concat(o.typeParameters.params))}}else{r=o.typeParameters}}else{t[e]=o}continue}a.push(o)}for(const e of Object.keys(r)){a.push(r[e])}for(const e of Object.keys(t)){a.push(t[e])}return a}},83092:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inherits;var s=r(91073);var n=_interopRequireDefault(r(58245));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function inherits(e,t){if(!e||!t)return e;for(const r of s.INHERIT_KEYS.optional){if(e[r]==null){e[r]=t[r]}}for(const r of Object.keys(t)){if(r[0]==="_"&&r!=="__clone")e[r]=t[r]}for(const r of s.INHERIT_KEYS.force){e[r]=t[r]}(0,n.default)(e,t);return e}},55727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=prependToMemberExpression;var s=r(35093);function prependToMemberExpression(e,t){e.object=(0,s.memberExpression)(t,e.object);return e}},95313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=removeProperties;var s=r(91073);const n=["tokens","start","end","loc","raw","rawValue"];const a=s.COMMENT_KEYS.concat(["comments"]).concat(n);function removeProperties(e,t={}){const r=t.preserveComments?n:a;for(const t of r){if(e[t]!=null)e[t]=undefined}for(const t of Object.keys(e)){if(t[0]==="_"&&e[t]!=null)e[t]=undefined}const s=Object.getOwnPropertySymbols(e);for(const t of s){e[t]=null}}},22686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=removePropertiesDeep;var s=_interopRequireDefault(r(39361));var n=_interopRequireDefault(r(95313));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function removePropertiesDeep(e,t){(0,s.default)(e,n.default,t);return e}},47196:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=removeTypeDuplicates;var s=r(18939);function removeTypeDuplicates(e){const t={};const r={};const n=[];const a=[];for(let t=0;t=0){continue}if((0,s.isTSAnyKeyword)(i)){return[i]}if((0,s.isTSBaseType)(i)){r[i.type]=i;continue}if((0,s.isTSUnionType)(i)){if(n.indexOf(i.types)<0){e=e.concat(i.types);n.push(i.types)}continue}a.push(i)}for(const e of Object.keys(r)){a.push(r[e])}for(const e of Object.keys(t)){a.push(t[e])}return a}},97723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=getBindingIdentifiers;var s=r(18939);function getBindingIdentifiers(e,t,r){let n=[].concat(e);const a=Object.create(null);while(n.length){const e=n.shift();if(!e)continue;const i=getBindingIdentifiers.keys[e.type];if((0,s.isIdentifier)(e)){if(t){const t=a[e.name]=a[e.name]||[];t.push(e)}else{a[e.name]=e}continue}if((0,s.isExportDeclaration)(e)&&!(0,s.isExportAllDeclaration)(e)){if((0,s.isDeclaration)(e.declaration)){n.push(e.declaration)}continue}if(r){if((0,s.isFunctionDeclaration)(e)){n.push(e.id);continue}if((0,s.isFunctionExpression)(e)){continue}}if(i){for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(97723));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var n=getOuterBindingIdentifiers;t.default=n;function getOuterBindingIdentifiers(e,t){return(0,s.default)(e,t,true)}},11691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=traverse;var s=r(74098);function traverse(e,t,r){if(typeof t==="function"){t={enter:t}}const{enter:s,exit:n}=t;traverseSimpleImpl(e,s,n,r,[])}function traverseSimpleImpl(e,t,r,n,a){const i=s.VISITOR_KEYS[e.type];if(!i)return;if(t)t(e,a,n);for(const s of i){const i=e[s];if(Array.isArray(i)){for(let o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=traverseFast;var s=r(74098);function traverseFast(e,t,r){if(!e)return;const n=s.VISITOR_KEYS[e.type];if(!n)return;r=r||{};t(e,r);for(const s of n){const n=e[s];if(Array.isArray(n)){for(const e of n){traverseFast(e,t,r)}}else{traverseFast(n,t,r)}}}},74837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=inherit;function inherit(e,t,r){if(t&&r){t[e]=Array.from(new Set([].concat(t[e],r[e]).filter(Boolean)))}}},82646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=cleanJSXElementLiteralChild;var s=r(35093);function cleanJSXElementLiteralChild(e,t){const r=e.value.split(/\r\n|\n|\r/);let n=0;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=shallowEqual;function shallowEqual(e,t){const r=Object.keys(t);for(const s of r){if(e[s]!==t[s]){return false}}return true}},66449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=buildMatchMemberExpression;var s=_interopRequireDefault(r(71854));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function buildMatchMemberExpression(e,t){const r=e.split(".");return e=>(0,s.default)(e,r,t)}},18939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isArrayExpression=isArrayExpression;t.isAssignmentExpression=isAssignmentExpression;t.isBinaryExpression=isBinaryExpression;t.isInterpreterDirective=isInterpreterDirective;t.isDirective=isDirective;t.isDirectiveLiteral=isDirectiveLiteral;t.isBlockStatement=isBlockStatement;t.isBreakStatement=isBreakStatement;t.isCallExpression=isCallExpression;t.isCatchClause=isCatchClause;t.isConditionalExpression=isConditionalExpression;t.isContinueStatement=isContinueStatement;t.isDebuggerStatement=isDebuggerStatement;t.isDoWhileStatement=isDoWhileStatement;t.isEmptyStatement=isEmptyStatement;t.isExpressionStatement=isExpressionStatement;t.isFile=isFile;t.isForInStatement=isForInStatement;t.isForStatement=isForStatement;t.isFunctionDeclaration=isFunctionDeclaration;t.isFunctionExpression=isFunctionExpression;t.isIdentifier=isIdentifier;t.isIfStatement=isIfStatement;t.isLabeledStatement=isLabeledStatement;t.isStringLiteral=isStringLiteral;t.isNumericLiteral=isNumericLiteral;t.isNullLiteral=isNullLiteral;t.isBooleanLiteral=isBooleanLiteral;t.isRegExpLiteral=isRegExpLiteral;t.isLogicalExpression=isLogicalExpression;t.isMemberExpression=isMemberExpression;t.isNewExpression=isNewExpression;t.isProgram=isProgram;t.isObjectExpression=isObjectExpression;t.isObjectMethod=isObjectMethod;t.isObjectProperty=isObjectProperty;t.isRestElement=isRestElement;t.isReturnStatement=isReturnStatement;t.isSequenceExpression=isSequenceExpression;t.isParenthesizedExpression=isParenthesizedExpression;t.isSwitchCase=isSwitchCase;t.isSwitchStatement=isSwitchStatement;t.isThisExpression=isThisExpression;t.isThrowStatement=isThrowStatement;t.isTryStatement=isTryStatement;t.isUnaryExpression=isUnaryExpression;t.isUpdateExpression=isUpdateExpression;t.isVariableDeclaration=isVariableDeclaration;t.isVariableDeclarator=isVariableDeclarator;t.isWhileStatement=isWhileStatement;t.isWithStatement=isWithStatement;t.isAssignmentPattern=isAssignmentPattern;t.isArrayPattern=isArrayPattern;t.isArrowFunctionExpression=isArrowFunctionExpression;t.isClassBody=isClassBody;t.isClassExpression=isClassExpression;t.isClassDeclaration=isClassDeclaration;t.isExportAllDeclaration=isExportAllDeclaration;t.isExportDefaultDeclaration=isExportDefaultDeclaration;t.isExportNamedDeclaration=isExportNamedDeclaration;t.isExportSpecifier=isExportSpecifier;t.isForOfStatement=isForOfStatement;t.isImportDeclaration=isImportDeclaration;t.isImportDefaultSpecifier=isImportDefaultSpecifier;t.isImportNamespaceSpecifier=isImportNamespaceSpecifier;t.isImportSpecifier=isImportSpecifier;t.isMetaProperty=isMetaProperty;t.isClassMethod=isClassMethod;t.isObjectPattern=isObjectPattern;t.isSpreadElement=isSpreadElement;t.isSuper=isSuper;t.isTaggedTemplateExpression=isTaggedTemplateExpression;t.isTemplateElement=isTemplateElement;t.isTemplateLiteral=isTemplateLiteral;t.isYieldExpression=isYieldExpression;t.isAwaitExpression=isAwaitExpression;t.isImport=isImport;t.isBigIntLiteral=isBigIntLiteral;t.isExportNamespaceSpecifier=isExportNamespaceSpecifier;t.isOptionalMemberExpression=isOptionalMemberExpression;t.isOptionalCallExpression=isOptionalCallExpression;t.isAnyTypeAnnotation=isAnyTypeAnnotation;t.isArrayTypeAnnotation=isArrayTypeAnnotation;t.isBooleanTypeAnnotation=isBooleanTypeAnnotation;t.isBooleanLiteralTypeAnnotation=isBooleanLiteralTypeAnnotation;t.isNullLiteralTypeAnnotation=isNullLiteralTypeAnnotation;t.isClassImplements=isClassImplements;t.isDeclareClass=isDeclareClass;t.isDeclareFunction=isDeclareFunction;t.isDeclareInterface=isDeclareInterface;t.isDeclareModule=isDeclareModule;t.isDeclareModuleExports=isDeclareModuleExports;t.isDeclareTypeAlias=isDeclareTypeAlias;t.isDeclareOpaqueType=isDeclareOpaqueType;t.isDeclareVariable=isDeclareVariable;t.isDeclareExportDeclaration=isDeclareExportDeclaration;t.isDeclareExportAllDeclaration=isDeclareExportAllDeclaration;t.isDeclaredPredicate=isDeclaredPredicate;t.isExistsTypeAnnotation=isExistsTypeAnnotation;t.isFunctionTypeAnnotation=isFunctionTypeAnnotation;t.isFunctionTypeParam=isFunctionTypeParam;t.isGenericTypeAnnotation=isGenericTypeAnnotation;t.isInferredPredicate=isInferredPredicate;t.isInterfaceExtends=isInterfaceExtends;t.isInterfaceDeclaration=isInterfaceDeclaration;t.isInterfaceTypeAnnotation=isInterfaceTypeAnnotation;t.isIntersectionTypeAnnotation=isIntersectionTypeAnnotation;t.isMixedTypeAnnotation=isMixedTypeAnnotation;t.isEmptyTypeAnnotation=isEmptyTypeAnnotation;t.isNullableTypeAnnotation=isNullableTypeAnnotation;t.isNumberLiteralTypeAnnotation=isNumberLiteralTypeAnnotation;t.isNumberTypeAnnotation=isNumberTypeAnnotation;t.isObjectTypeAnnotation=isObjectTypeAnnotation;t.isObjectTypeInternalSlot=isObjectTypeInternalSlot;t.isObjectTypeCallProperty=isObjectTypeCallProperty;t.isObjectTypeIndexer=isObjectTypeIndexer;t.isObjectTypeProperty=isObjectTypeProperty;t.isObjectTypeSpreadProperty=isObjectTypeSpreadProperty;t.isOpaqueType=isOpaqueType;t.isQualifiedTypeIdentifier=isQualifiedTypeIdentifier;t.isStringLiteralTypeAnnotation=isStringLiteralTypeAnnotation;t.isStringTypeAnnotation=isStringTypeAnnotation;t.isSymbolTypeAnnotation=isSymbolTypeAnnotation;t.isThisTypeAnnotation=isThisTypeAnnotation;t.isTupleTypeAnnotation=isTupleTypeAnnotation;t.isTypeofTypeAnnotation=isTypeofTypeAnnotation;t.isTypeAlias=isTypeAlias;t.isTypeAnnotation=isTypeAnnotation;t.isTypeCastExpression=isTypeCastExpression;t.isTypeParameter=isTypeParameter;t.isTypeParameterDeclaration=isTypeParameterDeclaration;t.isTypeParameterInstantiation=isTypeParameterInstantiation;t.isUnionTypeAnnotation=isUnionTypeAnnotation;t.isVariance=isVariance;t.isVoidTypeAnnotation=isVoidTypeAnnotation;t.isEnumDeclaration=isEnumDeclaration;t.isEnumBooleanBody=isEnumBooleanBody;t.isEnumNumberBody=isEnumNumberBody;t.isEnumStringBody=isEnumStringBody;t.isEnumSymbolBody=isEnumSymbolBody;t.isEnumBooleanMember=isEnumBooleanMember;t.isEnumNumberMember=isEnumNumberMember;t.isEnumStringMember=isEnumStringMember;t.isEnumDefaultedMember=isEnumDefaultedMember;t.isJSXAttribute=isJSXAttribute;t.isJSXClosingElement=isJSXClosingElement;t.isJSXElement=isJSXElement;t.isJSXEmptyExpression=isJSXEmptyExpression;t.isJSXExpressionContainer=isJSXExpressionContainer;t.isJSXSpreadChild=isJSXSpreadChild;t.isJSXIdentifier=isJSXIdentifier;t.isJSXMemberExpression=isJSXMemberExpression;t.isJSXNamespacedName=isJSXNamespacedName;t.isJSXOpeningElement=isJSXOpeningElement;t.isJSXSpreadAttribute=isJSXSpreadAttribute;t.isJSXText=isJSXText;t.isJSXFragment=isJSXFragment;t.isJSXOpeningFragment=isJSXOpeningFragment;t.isJSXClosingFragment=isJSXClosingFragment;t.isNoop=isNoop;t.isPlaceholder=isPlaceholder;t.isV8IntrinsicIdentifier=isV8IntrinsicIdentifier;t.isArgumentPlaceholder=isArgumentPlaceholder;t.isBindExpression=isBindExpression;t.isClassProperty=isClassProperty;t.isPipelineTopicExpression=isPipelineTopicExpression;t.isPipelineBareFunction=isPipelineBareFunction;t.isPipelinePrimaryTopicReference=isPipelinePrimaryTopicReference;t.isClassPrivateProperty=isClassPrivateProperty;t.isClassPrivateMethod=isClassPrivateMethod;t.isImportAttribute=isImportAttribute;t.isDecorator=isDecorator;t.isDoExpression=isDoExpression;t.isExportDefaultSpecifier=isExportDefaultSpecifier;t.isPrivateName=isPrivateName;t.isRecordExpression=isRecordExpression;t.isTupleExpression=isTupleExpression;t.isDecimalLiteral=isDecimalLiteral;t.isStaticBlock=isStaticBlock;t.isTSParameterProperty=isTSParameterProperty;t.isTSDeclareFunction=isTSDeclareFunction;t.isTSDeclareMethod=isTSDeclareMethod;t.isTSQualifiedName=isTSQualifiedName;t.isTSCallSignatureDeclaration=isTSCallSignatureDeclaration;t.isTSConstructSignatureDeclaration=isTSConstructSignatureDeclaration;t.isTSPropertySignature=isTSPropertySignature;t.isTSMethodSignature=isTSMethodSignature;t.isTSIndexSignature=isTSIndexSignature;t.isTSAnyKeyword=isTSAnyKeyword;t.isTSBooleanKeyword=isTSBooleanKeyword;t.isTSBigIntKeyword=isTSBigIntKeyword;t.isTSIntrinsicKeyword=isTSIntrinsicKeyword;t.isTSNeverKeyword=isTSNeverKeyword;t.isTSNullKeyword=isTSNullKeyword;t.isTSNumberKeyword=isTSNumberKeyword;t.isTSObjectKeyword=isTSObjectKeyword;t.isTSStringKeyword=isTSStringKeyword;t.isTSSymbolKeyword=isTSSymbolKeyword;t.isTSUndefinedKeyword=isTSUndefinedKeyword;t.isTSUnknownKeyword=isTSUnknownKeyword;t.isTSVoidKeyword=isTSVoidKeyword;t.isTSThisType=isTSThisType;t.isTSFunctionType=isTSFunctionType;t.isTSConstructorType=isTSConstructorType;t.isTSTypeReference=isTSTypeReference;t.isTSTypePredicate=isTSTypePredicate;t.isTSTypeQuery=isTSTypeQuery;t.isTSTypeLiteral=isTSTypeLiteral;t.isTSArrayType=isTSArrayType;t.isTSTupleType=isTSTupleType;t.isTSOptionalType=isTSOptionalType;t.isTSRestType=isTSRestType;t.isTSNamedTupleMember=isTSNamedTupleMember;t.isTSUnionType=isTSUnionType;t.isTSIntersectionType=isTSIntersectionType;t.isTSConditionalType=isTSConditionalType;t.isTSInferType=isTSInferType;t.isTSParenthesizedType=isTSParenthesizedType;t.isTSTypeOperator=isTSTypeOperator;t.isTSIndexedAccessType=isTSIndexedAccessType;t.isTSMappedType=isTSMappedType;t.isTSLiteralType=isTSLiteralType;t.isTSExpressionWithTypeArguments=isTSExpressionWithTypeArguments;t.isTSInterfaceDeclaration=isTSInterfaceDeclaration;t.isTSInterfaceBody=isTSInterfaceBody;t.isTSTypeAliasDeclaration=isTSTypeAliasDeclaration;t.isTSAsExpression=isTSAsExpression;t.isTSTypeAssertion=isTSTypeAssertion;t.isTSEnumDeclaration=isTSEnumDeclaration;t.isTSEnumMember=isTSEnumMember;t.isTSModuleDeclaration=isTSModuleDeclaration;t.isTSModuleBlock=isTSModuleBlock;t.isTSImportType=isTSImportType;t.isTSImportEqualsDeclaration=isTSImportEqualsDeclaration;t.isTSExternalModuleReference=isTSExternalModuleReference;t.isTSNonNullExpression=isTSNonNullExpression;t.isTSExportAssignment=isTSExportAssignment;t.isTSNamespaceExportDeclaration=isTSNamespaceExportDeclaration;t.isTSTypeAnnotation=isTSTypeAnnotation;t.isTSTypeParameterInstantiation=isTSTypeParameterInstantiation;t.isTSTypeParameterDeclaration=isTSTypeParameterDeclaration;t.isTSTypeParameter=isTSTypeParameter;t.isExpression=isExpression;t.isBinary=isBinary;t.isScopable=isScopable;t.isBlockParent=isBlockParent;t.isBlock=isBlock;t.isStatement=isStatement;t.isTerminatorless=isTerminatorless;t.isCompletionStatement=isCompletionStatement;t.isConditional=isConditional;t.isLoop=isLoop;t.isWhile=isWhile;t.isExpressionWrapper=isExpressionWrapper;t.isFor=isFor;t.isForXStatement=isForXStatement;t.isFunction=isFunction;t.isFunctionParent=isFunctionParent;t.isPureish=isPureish;t.isDeclaration=isDeclaration;t.isPatternLike=isPatternLike;t.isLVal=isLVal;t.isTSEntityName=isTSEntityName;t.isLiteral=isLiteral;t.isImmutable=isImmutable;t.isUserWhitespacable=isUserWhitespacable;t.isMethod=isMethod;t.isObjectMember=isObjectMember;t.isProperty=isProperty;t.isUnaryLike=isUnaryLike;t.isPattern=isPattern;t.isClass=isClass;t.isModuleDeclaration=isModuleDeclaration;t.isExportDeclaration=isExportDeclaration;t.isModuleSpecifier=isModuleSpecifier;t.isFlow=isFlow;t.isFlowType=isFlowType;t.isFlowBaseAnnotation=isFlowBaseAnnotation;t.isFlowDeclaration=isFlowDeclaration;t.isFlowPredicate=isFlowPredicate;t.isEnumBody=isEnumBody;t.isEnumMember=isEnumMember;t.isJSX=isJSX;t.isPrivate=isPrivate;t.isTSTypeElement=isTSTypeElement;t.isTSType=isTSType;t.isTSBaseType=isTSBaseType;t.isNumberLiteral=isNumberLiteral;t.isRegexLiteral=isRegexLiteral;t.isRestProperty=isRestProperty;t.isSpreadProperty=isSpreadProperty;var s=_interopRequireDefault(r(80400));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isArrayExpression(e,t){if(!e)return false;const r=e.type;if(r==="ArrayExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isAssignmentExpression(e,t){if(!e)return false;const r=e.type;if(r==="AssignmentExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBinaryExpression(e,t){if(!e)return false;const r=e.type;if(r==="BinaryExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isInterpreterDirective(e,t){if(!e)return false;const r=e.type;if(r==="InterpreterDirective"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDirective(e,t){if(!e)return false;const r=e.type;if(r==="Directive"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDirectiveLiteral(e,t){if(!e)return false;const r=e.type;if(r==="DirectiveLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBlockStatement(e,t){if(!e)return false;const r=e.type;if(r==="BlockStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBreakStatement(e,t){if(!e)return false;const r=e.type;if(r==="BreakStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isCallExpression(e,t){if(!e)return false;const r=e.type;if(r==="CallExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isCatchClause(e,t){if(!e)return false;const r=e.type;if(r==="CatchClause"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isConditionalExpression(e,t){if(!e)return false;const r=e.type;if(r==="ConditionalExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isContinueStatement(e,t){if(!e)return false;const r=e.type;if(r==="ContinueStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDebuggerStatement(e,t){if(!e)return false;const r=e.type;if(r==="DebuggerStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDoWhileStatement(e,t){if(!e)return false;const r=e.type;if(r==="DoWhileStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEmptyStatement(e,t){if(!e)return false;const r=e.type;if(r==="EmptyStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExpressionStatement(e,t){if(!e)return false;const r=e.type;if(r==="ExpressionStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFile(e,t){if(!e)return false;const r=e.type;if(r==="File"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isForInStatement(e,t){if(!e)return false;const r=e.type;if(r==="ForInStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isForStatement(e,t){if(!e)return false;const r=e.type;if(r==="ForStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunctionDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="FunctionDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunctionExpression(e,t){if(!e)return false;const r=e.type;if(r==="FunctionExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="Identifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isIfStatement(e,t){if(!e)return false;const r=e.type;if(r==="IfStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isLabeledStatement(e,t){if(!e)return false;const r=e.type;if(r==="LabeledStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isStringLiteral(e,t){if(!e)return false;const r=e.type;if(r==="StringLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNumericLiteral(e,t){if(!e)return false;const r=e.type;if(r==="NumericLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNullLiteral(e,t){if(!e)return false;const r=e.type;if(r==="NullLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBooleanLiteral(e,t){if(!e)return false;const r=e.type;if(r==="BooleanLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isRegExpLiteral(e,t){if(!e)return false;const r=e.type;if(r==="RegExpLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isLogicalExpression(e,t){if(!e)return false;const r=e.type;if(r==="LogicalExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isMemberExpression(e,t){if(!e)return false;const r=e.type;if(r==="MemberExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNewExpression(e,t){if(!e)return false;const r=e.type;if(r==="NewExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isProgram(e,t){if(!e)return false;const r=e.type;if(r==="Program"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectExpression(e,t){if(!e)return false;const r=e.type;if(r==="ObjectExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectMethod(e,t){if(!e)return false;const r=e.type;if(r==="ObjectMethod"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isRestElement(e,t){if(!e)return false;const r=e.type;if(r==="RestElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isReturnStatement(e,t){if(!e)return false;const r=e.type;if(r==="ReturnStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSequenceExpression(e,t){if(!e)return false;const r=e.type;if(r==="SequenceExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isParenthesizedExpression(e,t){if(!e)return false;const r=e.type;if(r==="ParenthesizedExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSwitchCase(e,t){if(!e)return false;const r=e.type;if(r==="SwitchCase"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSwitchStatement(e,t){if(!e)return false;const r=e.type;if(r==="SwitchStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isThisExpression(e,t){if(!e)return false;const r=e.type;if(r==="ThisExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isThrowStatement(e,t){if(!e)return false;const r=e.type;if(r==="ThrowStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTryStatement(e,t){if(!e)return false;const r=e.type;if(r==="TryStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isUnaryExpression(e,t){if(!e)return false;const r=e.type;if(r==="UnaryExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isUpdateExpression(e,t){if(!e)return false;const r=e.type;if(r==="UpdateExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isVariableDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="VariableDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isVariableDeclarator(e,t){if(!e)return false;const r=e.type;if(r==="VariableDeclarator"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isWhileStatement(e,t){if(!e)return false;const r=e.type;if(r==="WhileStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isWithStatement(e,t){if(!e)return false;const r=e.type;if(r==="WithStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isAssignmentPattern(e,t){if(!e)return false;const r=e.type;if(r==="AssignmentPattern"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isArrayPattern(e,t){if(!e)return false;const r=e.type;if(r==="ArrayPattern"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isArrowFunctionExpression(e,t){if(!e)return false;const r=e.type;if(r==="ArrowFunctionExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassBody(e,t){if(!e)return false;const r=e.type;if(r==="ClassBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassExpression(e,t){if(!e)return false;const r=e.type;if(r==="ClassExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ClassDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportAllDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ExportAllDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportDefaultDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ExportDefaultDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportNamedDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ExportNamedDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ExportSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isForOfStatement(e,t){if(!e)return false;const r=e.type;if(r==="ForOfStatement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImportDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ImportDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImportDefaultSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ImportDefaultSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImportNamespaceSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ImportNamespaceSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImportSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ImportSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isMetaProperty(e,t){if(!e)return false;const r=e.type;if(r==="MetaProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassMethod(e,t){if(!e)return false;const r=e.type;if(r==="ClassMethod"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectPattern(e,t){if(!e)return false;const r=e.type;if(r==="ObjectPattern"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSpreadElement(e,t){if(!e)return false;const r=e.type;if(r==="SpreadElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSuper(e,t){if(!e)return false;const r=e.type;if(r==="Super"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTaggedTemplateExpression(e,t){if(!e)return false;const r=e.type;if(r==="TaggedTemplateExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTemplateElement(e,t){if(!e)return false;const r=e.type;if(r==="TemplateElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTemplateLiteral(e,t){if(!e)return false;const r=e.type;if(r==="TemplateLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isYieldExpression(e,t){if(!e)return false;const r=e.type;if(r==="YieldExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isAwaitExpression(e,t){if(!e)return false;const r=e.type;if(r==="AwaitExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImport(e,t){if(!e)return false;const r=e.type;if(r==="Import"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBigIntLiteral(e,t){if(!e)return false;const r=e.type;if(r==="BigIntLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportNamespaceSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ExportNamespaceSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isOptionalMemberExpression(e,t){if(!e)return false;const r=e.type;if(r==="OptionalMemberExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isOptionalCallExpression(e,t){if(!e)return false;const r=e.type;if(r==="OptionalCallExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isAnyTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="AnyTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isArrayTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ArrayTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBooleanTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="BooleanTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBooleanLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="BooleanLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNullLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NullLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassImplements(e,t){if(!e)return false;const r=e.type;if(r==="ClassImplements"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareClass(e,t){if(!e)return false;const r=e.type;if(r==="DeclareClass"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareFunction(e,t){if(!e)return false;const r=e.type;if(r==="DeclareFunction"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareInterface(e,t){if(!e)return false;const r=e.type;if(r==="DeclareInterface"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareModule(e,t){if(!e)return false;const r=e.type;if(r==="DeclareModule"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareModuleExports(e,t){if(!e)return false;const r=e.type;if(r==="DeclareModuleExports"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareTypeAlias(e,t){if(!e)return false;const r=e.type;if(r==="DeclareTypeAlias"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareOpaqueType(e,t){if(!e)return false;const r=e.type;if(r==="DeclareOpaqueType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareVariable(e,t){if(!e)return false;const r=e.type;if(r==="DeclareVariable"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareExportDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="DeclareExportDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclareExportAllDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="DeclareExportAllDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclaredPredicate(e,t){if(!e)return false;const r=e.type;if(r==="DeclaredPredicate"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExistsTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ExistsTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunctionTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="FunctionTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunctionTypeParam(e,t){if(!e)return false;const r=e.type;if(r==="FunctionTypeParam"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isGenericTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="GenericTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isInferredPredicate(e,t){if(!e)return false;const r=e.type;if(r==="InferredPredicate"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isInterfaceExtends(e,t){if(!e)return false;const r=e.type;if(r==="InterfaceExtends"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isInterfaceDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="InterfaceDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isInterfaceTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="InterfaceTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isIntersectionTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="IntersectionTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isMixedTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="MixedTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEmptyTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="EmptyTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNullableTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NullableTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNumberLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NumberLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNumberTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NumberTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeInternalSlot(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeInternalSlot"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeCallProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeCallProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeIndexer(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeIndexer"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectTypeSpreadProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeSpreadProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isOpaqueType(e,t){if(!e)return false;const r=e.type;if(r==="OpaqueType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isQualifiedTypeIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="QualifiedTypeIdentifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isStringLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="StringLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isStringTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="StringTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSymbolTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="SymbolTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isThisTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ThisTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTupleTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TupleTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeofTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TypeofTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeAlias(e,t){if(!e)return false;const r=e.type;if(r==="TypeAlias"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeCastExpression(e,t){if(!e)return false;const r=e.type;if(r==="TypeCastExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeParameter(e,t){if(!e)return false;const r=e.type;if(r==="TypeParameter"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeParameterDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TypeParameterDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTypeParameterInstantiation(e,t){if(!e)return false;const r=e.type;if(r==="TypeParameterInstantiation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isUnionTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="UnionTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isVariance(e,t){if(!e)return false;const r=e.type;if(r==="Variance"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isVoidTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="VoidTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="EnumDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumBooleanBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumBooleanBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumNumberBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumNumberBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumStringBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumStringBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumSymbolBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumSymbolBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumBooleanMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumBooleanMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumNumberMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumNumberMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumStringMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumStringMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumDefaultedMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumDefaultedMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXAttribute(e,t){if(!e)return false;const r=e.type;if(r==="JSXAttribute"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXClosingElement(e,t){if(!e)return false;const r=e.type;if(r==="JSXClosingElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXElement(e,t){if(!e)return false;const r=e.type;if(r==="JSXElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXEmptyExpression(e,t){if(!e)return false;const r=e.type;if(r==="JSXEmptyExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXExpressionContainer(e,t){if(!e)return false;const r=e.type;if(r==="JSXExpressionContainer"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXSpreadChild(e,t){if(!e)return false;const r=e.type;if(r==="JSXSpreadChild"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="JSXIdentifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXMemberExpression(e,t){if(!e)return false;const r=e.type;if(r==="JSXMemberExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXNamespacedName(e,t){if(!e)return false;const r=e.type;if(r==="JSXNamespacedName"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXOpeningElement(e,t){if(!e)return false;const r=e.type;if(r==="JSXOpeningElement"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXSpreadAttribute(e,t){if(!e)return false;const r=e.type;if(r==="JSXSpreadAttribute"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXText(e,t){if(!e)return false;const r=e.type;if(r==="JSXText"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXFragment(e,t){if(!e)return false;const r=e.type;if(r==="JSXFragment"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXOpeningFragment(e,t){if(!e)return false;const r=e.type;if(r==="JSXOpeningFragment"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSXClosingFragment(e,t){if(!e)return false;const r=e.type;if(r==="JSXClosingFragment"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNoop(e,t){if(!e)return false;const r=e.type;if(r==="Noop"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPlaceholder(e,t){if(!e)return false;const r=e.type;if(r==="Placeholder"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isV8IntrinsicIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="V8IntrinsicIdentifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isArgumentPlaceholder(e,t){if(!e)return false;const r=e.type;if(r==="ArgumentPlaceholder"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBindExpression(e,t){if(!e)return false;const r=e.type;if(r==="BindExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassProperty(e,t){if(!e)return false;const r=e.type;if(r==="ClassProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPipelineTopicExpression(e,t){if(!e)return false;const r=e.type;if(r==="PipelineTopicExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPipelineBareFunction(e,t){if(!e)return false;const r=e.type;if(r==="PipelineBareFunction"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPipelinePrimaryTopicReference(e,t){if(!e)return false;const r=e.type;if(r==="PipelinePrimaryTopicReference"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassPrivateProperty(e,t){if(!e)return false;const r=e.type;if(r==="ClassPrivateProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClassPrivateMethod(e,t){if(!e)return false;const r=e.type;if(r==="ClassPrivateMethod"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImportAttribute(e,t){if(!e)return false;const r=e.type;if(r==="ImportAttribute"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDecorator(e,t){if(!e)return false;const r=e.type;if(r==="Decorator"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDoExpression(e,t){if(!e)return false;const r=e.type;if(r==="DoExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportDefaultSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ExportDefaultSpecifier"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPrivateName(e,t){if(!e)return false;const r=e.type;if(r==="PrivateName"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isRecordExpression(e,t){if(!e)return false;const r=e.type;if(r==="RecordExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTupleExpression(e,t){if(!e)return false;const r=e.type;if(r==="TupleExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDecimalLiteral(e,t){if(!e)return false;const r=e.type;if(r==="DecimalLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isStaticBlock(e,t){if(!e)return false;const r=e.type;if(r==="StaticBlock"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSParameterProperty(e,t){if(!e)return false;const r=e.type;if(r==="TSParameterProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSDeclareFunction(e,t){if(!e)return false;const r=e.type;if(r==="TSDeclareFunction"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSDeclareMethod(e,t){if(!e)return false;const r=e.type;if(r==="TSDeclareMethod"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSQualifiedName(e,t){if(!e)return false;const r=e.type;if(r==="TSQualifiedName"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSCallSignatureDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSCallSignatureDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSConstructSignatureDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSConstructSignatureDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSPropertySignature(e,t){if(!e)return false;const r=e.type;if(r==="TSPropertySignature"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSMethodSignature(e,t){if(!e)return false;const r=e.type;if(r==="TSMethodSignature"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSIndexSignature(e,t){if(!e)return false;const r=e.type;if(r==="TSIndexSignature"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSAnyKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSAnyKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSBooleanKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSBooleanKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSBigIntKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSBigIntKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSIntrinsicKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSIntrinsicKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNeverKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSNeverKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNullKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSNullKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNumberKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSNumberKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSObjectKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSObjectKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSStringKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSStringKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSSymbolKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSSymbolKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSUndefinedKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSUndefinedKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSUnknownKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSUnknownKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSVoidKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSVoidKeyword"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSThisType(e,t){if(!e)return false;const r=e.type;if(r==="TSThisType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSFunctionType(e,t){if(!e)return false;const r=e.type;if(r==="TSFunctionType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSConstructorType(e,t){if(!e)return false;const r=e.type;if(r==="TSConstructorType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeReference(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeReference"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypePredicate(e,t){if(!e)return false;const r=e.type;if(r==="TSTypePredicate"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeQuery(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeQuery"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeLiteral(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSArrayType(e,t){if(!e)return false;const r=e.type;if(r==="TSArrayType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTupleType(e,t){if(!e)return false;const r=e.type;if(r==="TSTupleType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSOptionalType(e,t){if(!e)return false;const r=e.type;if(r==="TSOptionalType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSRestType(e,t){if(!e)return false;const r=e.type;if(r==="TSRestType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNamedTupleMember(e,t){if(!e)return false;const r=e.type;if(r==="TSNamedTupleMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSUnionType(e,t){if(!e)return false;const r=e.type;if(r==="TSUnionType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSIntersectionType(e,t){if(!e)return false;const r=e.type;if(r==="TSIntersectionType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSConditionalType(e,t){if(!e)return false;const r=e.type;if(r==="TSConditionalType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSInferType(e,t){if(!e)return false;const r=e.type;if(r==="TSInferType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSParenthesizedType(e,t){if(!e)return false;const r=e.type;if(r==="TSParenthesizedType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeOperator(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeOperator"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSIndexedAccessType(e,t){if(!e)return false;const r=e.type;if(r==="TSIndexedAccessType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSMappedType(e,t){if(!e)return false;const r=e.type;if(r==="TSMappedType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSLiteralType(e,t){if(!e)return false;const r=e.type;if(r==="TSLiteralType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSExpressionWithTypeArguments(e,t){if(!e)return false;const r=e.type;if(r==="TSExpressionWithTypeArguments"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSInterfaceDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSInterfaceDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSInterfaceBody(e,t){if(!e)return false;const r=e.type;if(r==="TSInterfaceBody"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeAliasDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeAliasDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSAsExpression(e,t){if(!e)return false;const r=e.type;if(r==="TSAsExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeAssertion(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeAssertion"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSEnumDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSEnumDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSEnumMember(e,t){if(!e)return false;const r=e.type;if(r==="TSEnumMember"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSModuleDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSModuleDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSModuleBlock(e,t){if(!e)return false;const r=e.type;if(r==="TSModuleBlock"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSImportType(e,t){if(!e)return false;const r=e.type;if(r==="TSImportType"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSImportEqualsDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSImportEqualsDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSExternalModuleReference(e,t){if(!e)return false;const r=e.type;if(r==="TSExternalModuleReference"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNonNullExpression(e,t){if(!e)return false;const r=e.type;if(r==="TSNonNullExpression"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSExportAssignment(e,t){if(!e)return false;const r=e.type;if(r==="TSExportAssignment"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSNamespaceExportDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSNamespaceExportDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeParameterInstantiation(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeParameterInstantiation"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeParameterDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeParameterDeclaration"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeParameter(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeParameter"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExpression(e,t){if(!e)return false;const r=e.type;if("ArrayExpression"===r||"AssignmentExpression"===r||"BinaryExpression"===r||"CallExpression"===r||"ConditionalExpression"===r||"FunctionExpression"===r||"Identifier"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"LogicalExpression"===r||"MemberExpression"===r||"NewExpression"===r||"ObjectExpression"===r||"SequenceExpression"===r||"ParenthesizedExpression"===r||"ThisExpression"===r||"UnaryExpression"===r||"UpdateExpression"===r||"ArrowFunctionExpression"===r||"ClassExpression"===r||"MetaProperty"===r||"Super"===r||"TaggedTemplateExpression"===r||"TemplateLiteral"===r||"YieldExpression"===r||"AwaitExpression"===r||"Import"===r||"BigIntLiteral"===r||"OptionalMemberExpression"===r||"OptionalCallExpression"===r||"TypeCastExpression"===r||"JSXElement"===r||"JSXFragment"===r||"BindExpression"===r||"PipelinePrimaryTopicReference"===r||"DoExpression"===r||"RecordExpression"===r||"TupleExpression"===r||"DecimalLiteral"===r||"TSAsExpression"===r||"TSTypeAssertion"===r||"TSNonNullExpression"===r||r==="Placeholder"&&("Expression"===e.expectedNode||"Identifier"===e.expectedNode||"StringLiteral"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBinary(e,t){if(!e)return false;const r=e.type;if("BinaryExpression"===r||"LogicalExpression"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isScopable(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"CatchClause"===r||"DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"Program"===r||"ObjectMethod"===r||"SwitchStatement"===r||"WhileStatement"===r||"ArrowFunctionExpression"===r||"ClassExpression"===r||"ClassDeclaration"===r||"ForOfStatement"===r||"ClassMethod"===r||"ClassPrivateMethod"===r||"StaticBlock"===r||"TSModuleBlock"===r||r==="Placeholder"&&"BlockStatement"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBlockParent(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"CatchClause"===r||"DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"Program"===r||"ObjectMethod"===r||"SwitchStatement"===r||"WhileStatement"===r||"ArrowFunctionExpression"===r||"ForOfStatement"===r||"ClassMethod"===r||"ClassPrivateMethod"===r||"StaticBlock"===r||"TSModuleBlock"===r||r==="Placeholder"&&"BlockStatement"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isBlock(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"Program"===r||"TSModuleBlock"===r||r==="Placeholder"&&"BlockStatement"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isStatement(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"BreakStatement"===r||"ContinueStatement"===r||"DebuggerStatement"===r||"DoWhileStatement"===r||"EmptyStatement"===r||"ExpressionStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"IfStatement"===r||"LabeledStatement"===r||"ReturnStatement"===r||"SwitchStatement"===r||"ThrowStatement"===r||"TryStatement"===r||"VariableDeclaration"===r||"WhileStatement"===r||"WithStatement"===r||"ClassDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ForOfStatement"===r||"ImportDeclaration"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r||"EnumDeclaration"===r||"TSDeclareFunction"===r||"TSInterfaceDeclaration"===r||"TSTypeAliasDeclaration"===r||"TSEnumDeclaration"===r||"TSModuleDeclaration"===r||"TSImportEqualsDeclaration"===r||"TSExportAssignment"===r||"TSNamespaceExportDeclaration"===r||r==="Placeholder"&&("Statement"===e.expectedNode||"Declaration"===e.expectedNode||"BlockStatement"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTerminatorless(e,t){if(!e)return false;const r=e.type;if("BreakStatement"===r||"ContinueStatement"===r||"ReturnStatement"===r||"ThrowStatement"===r||"YieldExpression"===r||"AwaitExpression"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isCompletionStatement(e,t){if(!e)return false;const r=e.type;if("BreakStatement"===r||"ContinueStatement"===r||"ReturnStatement"===r||"ThrowStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isConditional(e,t){if(!e)return false;const r=e.type;if("ConditionalExpression"===r||"IfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isLoop(e,t){if(!e)return false;const r=e.type;if("DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"WhileStatement"===r||"ForOfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isWhile(e,t){if(!e)return false;const r=e.type;if("DoWhileStatement"===r||"WhileStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExpressionWrapper(e,t){if(!e)return false;const r=e.type;if("ExpressionStatement"===r||"ParenthesizedExpression"===r||"TypeCastExpression"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFor(e,t){if(!e)return false;const r=e.type;if("ForInStatement"===r||"ForStatement"===r||"ForOfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isForXStatement(e,t){if(!e)return false;const r=e.type;if("ForInStatement"===r||"ForOfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunction(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"FunctionExpression"===r||"ObjectMethod"===r||"ArrowFunctionExpression"===r||"ClassMethod"===r||"ClassPrivateMethod"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFunctionParent(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"FunctionExpression"===r||"ObjectMethod"===r||"ArrowFunctionExpression"===r||"ClassMethod"===r||"ClassPrivateMethod"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPureish(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"FunctionExpression"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"ArrowFunctionExpression"===r||"BigIntLiteral"===r||"DecimalLiteral"===r||r==="Placeholder"&&"StringLiteral"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isDeclaration(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"VariableDeclaration"===r||"ClassDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ImportDeclaration"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r||"EnumDeclaration"===r||"TSDeclareFunction"===r||"TSInterfaceDeclaration"===r||"TSTypeAliasDeclaration"===r||"TSEnumDeclaration"===r||"TSModuleDeclaration"===r||r==="Placeholder"&&"Declaration"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPatternLike(e,t){if(!e)return false;const r=e.type;if("Identifier"===r||"RestElement"===r||"AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r||r==="Placeholder"&&("Pattern"===e.expectedNode||"Identifier"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isLVal(e,t){if(!e)return false;const r=e.type;if("Identifier"===r||"MemberExpression"===r||"RestElement"===r||"AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r||"TSParameterProperty"===r||r==="Placeholder"&&("Pattern"===e.expectedNode||"Identifier"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSEntityName(e,t){if(!e)return false;const r=e.type;if("Identifier"===r||"TSQualifiedName"===r||r==="Placeholder"&&"Identifier"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isLiteral(e,t){if(!e)return false;const r=e.type;if("StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"TemplateLiteral"===r||"BigIntLiteral"===r||"DecimalLiteral"===r||r==="Placeholder"&&"StringLiteral"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isImmutable(e,t){if(!e)return false;const r=e.type;if("StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"BigIntLiteral"===r||"JSXAttribute"===r||"JSXClosingElement"===r||"JSXElement"===r||"JSXExpressionContainer"===r||"JSXSpreadChild"===r||"JSXOpeningElement"===r||"JSXText"===r||"JSXFragment"===r||"JSXOpeningFragment"===r||"JSXClosingFragment"===r||"DecimalLiteral"===r||r==="Placeholder"&&"StringLiteral"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isUserWhitespacable(e,t){if(!e)return false;const r=e.type;if("ObjectMethod"===r||"ObjectProperty"===r||"ObjectTypeInternalSlot"===r||"ObjectTypeCallProperty"===r||"ObjectTypeIndexer"===r||"ObjectTypeProperty"===r||"ObjectTypeSpreadProperty"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isMethod(e,t){if(!e)return false;const r=e.type;if("ObjectMethod"===r||"ClassMethod"===r||"ClassPrivateMethod"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isObjectMember(e,t){if(!e)return false;const r=e.type;if("ObjectMethod"===r||"ObjectProperty"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isProperty(e,t){if(!e)return false;const r=e.type;if("ObjectProperty"===r||"ClassProperty"===r||"ClassPrivateProperty"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isUnaryLike(e,t){if(!e)return false;const r=e.type;if("UnaryExpression"===r||"SpreadElement"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPattern(e,t){if(!e)return false;const r=e.type;if("AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r||r==="Placeholder"&&"Pattern"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isClass(e,t){if(!e)return false;const r=e.type;if("ClassExpression"===r||"ClassDeclaration"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isModuleDeclaration(e,t){if(!e)return false;const r=e.type;if("ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ImportDeclaration"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isExportDeclaration(e,t){if(!e)return false;const r=e.type;if("ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isModuleSpecifier(e,t){if(!e)return false;const r=e.type;if("ExportSpecifier"===r||"ImportDefaultSpecifier"===r||"ImportNamespaceSpecifier"===r||"ImportSpecifier"===r||"ExportNamespaceSpecifier"===r||"ExportDefaultSpecifier"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFlow(e,t){if(!e)return false;const r=e.type;if("AnyTypeAnnotation"===r||"ArrayTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"BooleanLiteralTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"ClassImplements"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"DeclaredPredicate"===r||"ExistsTypeAnnotation"===r||"FunctionTypeAnnotation"===r||"FunctionTypeParam"===r||"GenericTypeAnnotation"===r||"InferredPredicate"===r||"InterfaceExtends"===r||"InterfaceDeclaration"===r||"InterfaceTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NullableTypeAnnotation"===r||"NumberLiteralTypeAnnotation"===r||"NumberTypeAnnotation"===r||"ObjectTypeAnnotation"===r||"ObjectTypeInternalSlot"===r||"ObjectTypeCallProperty"===r||"ObjectTypeIndexer"===r||"ObjectTypeProperty"===r||"ObjectTypeSpreadProperty"===r||"OpaqueType"===r||"QualifiedTypeIdentifier"===r||"StringLiteralTypeAnnotation"===r||"StringTypeAnnotation"===r||"SymbolTypeAnnotation"===r||"ThisTypeAnnotation"===r||"TupleTypeAnnotation"===r||"TypeofTypeAnnotation"===r||"TypeAlias"===r||"TypeAnnotation"===r||"TypeCastExpression"===r||"TypeParameter"===r||"TypeParameterDeclaration"===r||"TypeParameterInstantiation"===r||"UnionTypeAnnotation"===r||"Variance"===r||"VoidTypeAnnotation"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFlowType(e,t){if(!e)return false;const r=e.type;if("AnyTypeAnnotation"===r||"ArrayTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"BooleanLiteralTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"ExistsTypeAnnotation"===r||"FunctionTypeAnnotation"===r||"GenericTypeAnnotation"===r||"InterfaceTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NullableTypeAnnotation"===r||"NumberLiteralTypeAnnotation"===r||"NumberTypeAnnotation"===r||"ObjectTypeAnnotation"===r||"StringLiteralTypeAnnotation"===r||"StringTypeAnnotation"===r||"SymbolTypeAnnotation"===r||"ThisTypeAnnotation"===r||"TupleTypeAnnotation"===r||"TypeofTypeAnnotation"===r||"UnionTypeAnnotation"===r||"VoidTypeAnnotation"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFlowBaseAnnotation(e,t){if(!e)return false;const r=e.type;if("AnyTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NumberTypeAnnotation"===r||"StringTypeAnnotation"===r||"SymbolTypeAnnotation"===r||"ThisTypeAnnotation"===r||"VoidTypeAnnotation"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFlowDeclaration(e,t){if(!e)return false;const r=e.type;if("DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isFlowPredicate(e,t){if(!e)return false;const r=e.type;if("DeclaredPredicate"===r||"InferredPredicate"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumBody(e,t){if(!e)return false;const r=e.type;if("EnumBooleanBody"===r||"EnumNumberBody"===r||"EnumStringBody"===r||"EnumSymbolBody"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isEnumMember(e,t){if(!e)return false;const r=e.type;if("EnumBooleanMember"===r||"EnumNumberMember"===r||"EnumStringMember"===r||"EnumDefaultedMember"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isJSX(e,t){if(!e)return false;const r=e.type;if("JSXAttribute"===r||"JSXClosingElement"===r||"JSXElement"===r||"JSXEmptyExpression"===r||"JSXExpressionContainer"===r||"JSXSpreadChild"===r||"JSXIdentifier"===r||"JSXMemberExpression"===r||"JSXNamespacedName"===r||"JSXOpeningElement"===r||"JSXSpreadAttribute"===r||"JSXText"===r||"JSXFragment"===r||"JSXOpeningFragment"===r||"JSXClosingFragment"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isPrivate(e,t){if(!e)return false;const r=e.type;if("ClassPrivateProperty"===r||"ClassPrivateMethod"===r||"PrivateName"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSTypeElement(e,t){if(!e)return false;const r=e.type;if("TSCallSignatureDeclaration"===r||"TSConstructSignatureDeclaration"===r||"TSPropertySignature"===r||"TSMethodSignature"===r||"TSIndexSignature"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSType(e,t){if(!e)return false;const r=e.type;if("TSAnyKeyword"===r||"TSBooleanKeyword"===r||"TSBigIntKeyword"===r||"TSIntrinsicKeyword"===r||"TSNeverKeyword"===r||"TSNullKeyword"===r||"TSNumberKeyword"===r||"TSObjectKeyword"===r||"TSStringKeyword"===r||"TSSymbolKeyword"===r||"TSUndefinedKeyword"===r||"TSUnknownKeyword"===r||"TSVoidKeyword"===r||"TSThisType"===r||"TSFunctionType"===r||"TSConstructorType"===r||"TSTypeReference"===r||"TSTypePredicate"===r||"TSTypeQuery"===r||"TSTypeLiteral"===r||"TSArrayType"===r||"TSTupleType"===r||"TSOptionalType"===r||"TSRestType"===r||"TSUnionType"===r||"TSIntersectionType"===r||"TSConditionalType"===r||"TSInferType"===r||"TSParenthesizedType"===r||"TSTypeOperator"===r||"TSIndexedAccessType"===r||"TSMappedType"===r||"TSLiteralType"===r||"TSExpressionWithTypeArguments"===r||"TSImportType"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isTSBaseType(e,t){if(!e)return false;const r=e.type;if("TSAnyKeyword"===r||"TSBooleanKeyword"===r||"TSBigIntKeyword"===r||"TSIntrinsicKeyword"===r||"TSNeverKeyword"===r||"TSNullKeyword"===r||"TSNumberKeyword"===r||"TSObjectKeyword"===r||"TSStringKeyword"===r||"TSSymbolKeyword"===r||"TSUndefinedKeyword"===r||"TSUnknownKeyword"===r||"TSVoidKeyword"===r||"TSThisType"===r||"TSLiteralType"===r){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isNumberLiteral(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral");if(!e)return false;const r=e.type;if(r==="NumberLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isRegexLiteral(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");if(!e)return false;const r=e.type;if(r==="RegexLiteral"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isRestProperty(e,t){console.trace("The node type RestProperty has been renamed to RestElement");if(!e)return false;const r=e.type;if(r==="RestProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}function isSpreadProperty(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement");if(!e)return false;const r=e.type;if(r==="SpreadProperty"){if(typeof t==="undefined"){return true}else{return(0,s.default)(e,t)}}return false}},28422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=is;var s=_interopRequireDefault(r(80400));var n=_interopRequireDefault(r(30699));var a=_interopRequireDefault(r(8010));var i=r(74098);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function is(e,t,r){if(!t)return false;const o=(0,n.default)(t.type,e);if(!o){if(!r&&t.type==="Placeholder"&&e in i.FLIPPED_ALIAS_KEYS){return(0,a.default)(t.expectedNode,e)}return false}if(typeof r==="undefined"){return true}else{return(0,s.default)(t,r)}}},52459:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isBinding;var s=_interopRequireDefault(r(97723));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isBinding(e,t,r){if(r&&e.type==="Identifier"&&t.type==="ObjectProperty"&&r.type==="ObjectExpression"){return false}const n=s.default.keys[t.type];if(n){for(let r=0;r=0)return true}else{if(a===e)return true}}}return false}},16800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isBlockScoped;var s=r(18939);var n=_interopRequireDefault(r(63289));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isBlockScoped(e){return(0,s.isFunctionDeclaration)(e)||(0,s.isClassDeclaration)(e)||(0,n.default)(e)}},66028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isImmutable;var s=_interopRequireDefault(r(30699));var n=r(18939);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isImmutable(e){if((0,s.default)(e.type,"Immutable"))return true;if((0,n.isIdentifier)(e)){if(e.name==="undefined"){return true}else{return false}}return false}},63289:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isLet;var s=r(18939);var n=r(91073);function isLet(e){return(0,s.isVariableDeclaration)(e)&&(e.kind!=="var"||e[n.BLOCK_SCOPED_SYMBOL])}},95595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isNode;var s=r(74098);function isNode(e){return!!(e&&s.VISITOR_KEYS[e.type])}},40191:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isNodesEquivalent;var s=r(74098);function isNodesEquivalent(e,t){if(typeof e!=="object"||typeof t!=="object"||e==null||t==null){return e===t}if(e.type!==t.type){return false}const r=Object.keys(s.NODE_FIELDS[e.type]||e.type);const n=s.VISITOR_KEYS[e.type];for(const s of r){if(typeof e[s]!==typeof t[s]){return false}if(e[s]==null&&t[s]==null){continue}else if(e[s]==null||t[s]==null){return false}if(Array.isArray(e[s])){if(!Array.isArray(t[s])){return false}if(e[s].length!==t[s].length){return false}for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isPlaceholderType;var s=r(74098);function isPlaceholderType(e,t){if(e===t)return true;const r=s.PLACEHOLDERS_ALIAS[e];if(r){for(const e of r){if(t===e)return true}}return false}},898:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isReferenced;function isReferenced(e,t,r){switch(t.type){case"MemberExpression":case"JSXMemberExpression":case"OptionalMemberExpression":if(t.property===e){return!!t.computed}return t.object===e;case"VariableDeclarator":return t.init===e;case"ArrowFunctionExpression":return t.body===e;case"PrivateName":return false;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":if(t.params.includes(e)){return false}case"ObjectProperty":case"ClassProperty":case"ClassPrivateProperty":if(t.key===e){return!!t.computed}if(t.value===e){return!r||r.type!=="ObjectPattern"}return true;case"ClassDeclaration":case"ClassExpression":return t.superClass===e;case"AssignmentExpression":return t.right===e;case"AssignmentPattern":return t.right===e;case"LabeledStatement":return false;case"CatchClause":return false;case"RestElement":return false;case"BreakStatement":case"ContinueStatement":return false;case"FunctionDeclaration":case"FunctionExpression":return false;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return false;case"ExportSpecifier":if(r==null?void 0:r.source){return false}return t.local===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return false;case"JSXAttribute":return false;case"ObjectPattern":case"ArrayPattern":return false;case"MetaProperty":return false;case"ObjectTypeProperty":return t.key!==e;case"TSEnumMember":return t.id!==e;case"TSPropertySignature":if(t.key===e){return!!t.computed}return true}return true}},45379:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isScope;var s=r(18939);function isScope(e,t){if((0,s.isBlockStatement)(e)&&((0,s.isFunction)(t)||(0,s.isCatchClause)(t))){return false}if((0,s.isPattern)(e)&&((0,s.isFunction)(t)||(0,s.isCatchClause)(t))){return true}return(0,s.isScopable)(e)}},10932:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isSpecifierDefault;var s=r(18939);function isSpecifierDefault(e){return(0,s.isImportDefaultSpecifier)(e)||(0,s.isIdentifier)(e.imported||e.exported,{name:"default"})}},30699:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isType;var s=r(74098);function isType(e,t){if(e===t)return true;if(s.ALIAS_KEYS[t])return false;const r=s.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return true;for(const t of r){if(e===t)return true}}return false}},29834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isValidES3Identifier;var s=_interopRequireDefault(r(90735));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"]);function isValidES3Identifier(e){return(0,s.default)(e)&&!n.has(e)}},90735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isValidIdentifier;var s=r(74246);function isValidIdentifier(e,t=true){if(typeof e!=="string")return false;if(t){if((0,s.isKeyword)(e)||(0,s.isStrictReservedWord)(e,true)){return false}}return(0,s.isIdentifierName)(e)}},8965:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isVar;var s=r(18939);var n=r(91073);function isVar(e){return(0,s.isVariableDeclaration)(e,{kind:"var"})&&!e[n.BLOCK_SCOPED_SYMBOL]}},71854:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=matchesPattern;var s=r(18939);function matchesPattern(e,t,r){if(!(0,s.isMemberExpression)(e))return false;const n=Array.isArray(t)?t:t.split(".");const a=[];let i;for(i=e;(0,s.isMemberExpression)(i);i=i.object){a.push(i.property)}a.push(i);if(a.lengthn.length)return false;for(let e=0,t=a.length-1;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=isCompatTag;function isCompatTag(e){return!!e&&/^[a-z]/.test(e)}},10800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var s=_interopRequireDefault(r(66449));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=(0,s.default)("React.Component");var a=n;t.default=a},81236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=validate;t.validateField=validateField;t.validateChild=validateChild;var s=r(74098);function validate(e,t,r){if(!e)return;const n=s.NODE_FIELDS[e.type];if(!n)return;const a=n[t];validateField(e,t,r,a);validateChild(e,t,r)}function validateField(e,t,r,s){if(!(s==null?void 0:s.validate))return;if(s.optional&&r==null)return;s.validate(e,t,r)}function validateChild(e,t,r){if(r==null)return;const n=s.NODE_PARENT_VALIDATIONS[r.type];if(!n)return;n(e,t,r)}},99593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=function(){function sliceIterator(e,t){var r=[];var s=true;var n=false;var a=undefined;try{for(var i=e[Symbol.iterator](),o;!(s=(o=i.next()).done);s=true){r.push(o.value);if(t&&r.length===t)break}}catch(e){n=true;a=e}finally{try{if(!s&&i["return"])i["return"]()}finally{if(n)throw a}}return r}return function(e,t){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,t)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();t.getImportSource=getImportSource;t.createDynamicImportTransform=createDynamicImportTransform;function getImportSource(e,t){var s=t.arguments;var n=r(s,1),a=n[0];var i=e.isStringLiteral(a)||e.isTemplateLiteral(a);if(i){e.removeComments(a);return a}return e.templateLiteral([e.templateElement({raw:"",cooked:""}),e.templateElement({raw:"",cooked:""},true)],s)}function createDynamicImportTransform(e){var t=e.template,r=e.types;var s={static:{interop:t("Promise.resolve().then(() => INTEROP(require(SOURCE)))"),noInterop:t("Promise.resolve().then(() => require(SOURCE))")},dynamic:{interop:t("Promise.resolve(SOURCE).then(s => INTEROP(require(s)))"),noInterop:t("Promise.resolve(SOURCE).then(s => require(s))")}};var n=typeof WeakSet==="function"&&new WeakSet;var a=function isString(e){return r.isStringLiteral(e)||r.isTemplateLiteral(e)&&e.expressions.length===0};return function(e,t){if(n){if(n.has(t)){return}n.add(t)}var i=getImportSource(r,t.parent);var o=a(i)?s["static"]:s.dynamic;var l=e.opts.noInterop?o.noInterop({SOURCE:i}):o.interop({SOURCE:i,INTEROP:e.addHelper("interopRequireWildcard")});t.parentPath.replaceWith(l)}}},42604:(e,t,r)=>{e.exports=r(99593)},36301:(e,t,r)=>{"use strict";var s=r(35747);var n=r(85622);var a=r(13401);Object.defineProperty(t,"commentRegex",{get:function getCommentRegex(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}});Object.defineProperty(t,"mapFileCommentRegex",{get:function getMapFileCommentRegex(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}});function decodeBase64(e){return a.Buffer.from(e,"base64").toString()}function stripComment(e){return e.split(",").pop()}function readFromFileMap(e,r){var a=t.mapFileCommentRegex.exec(e);var i=a[1]||a[2];var o=n.resolve(r,i);try{return s.readFileSync(o,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+o+"\n"+e)}}function Converter(e,t){t=t||{};if(t.isFileComment)e=readFromFileMap(e,t.commentFileDir);if(t.hasComment)e=stripComment(e);if(t.isEncoded)e=decodeBase64(e);if(t.isJSON||t.isEncoded)e=JSON.parse(e);this.sourcemap=e}Converter.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)};Converter.prototype.toBase64=function(){var e=this.toJSON();return a.Buffer.from(e,"utf8").toString("base64")};Converter.prototype.toComment=function(e){var t=this.toBase64();var r="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return e&&e.multiline?"/*# "+r+" */":"//# "+r};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error('property "'+e+'" already exists on the sourcemap, use set property instead');return this.setProperty(e,t)};Converter.prototype.setProperty=function(e,t){this.sourcemap[e]=t;return this};Converter.prototype.getProperty=function(e){return this.sourcemap[e]};t.fromObject=function(e){return new Converter(e)};t.fromJSON=function(e){return new Converter(e,{isJSON:true})};t.fromBase64=function(e){return new Converter(e,{isEncoded:true})};t.fromComment=function(e){e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(e,{isEncoded:true,hasComment:true})};t.fromMapFileComment=function(e,t){return new Converter(e,{commentFileDir:t,isFileComment:true,isJSON:true})};t.fromSource=function(e){var r=e.match(t.commentRegex);return r?t.fromComment(r.pop()):null};t.fromMapFileSource=function(e,r){var s=e.match(t.mapFileCommentRegex);return s?t.fromMapFileComment(s.pop(),r):null};t.removeComments=function(e){return e.replace(t.commentRegex,"")};t.removeMapFileComments=function(e){return e.replace(t.mapFileCommentRegex,"")};t.generateMapFileComment=function(e,t){var r="sourceMappingURL="+e;return t&&t.multiline?"/*# "+r+" */":"//# "+r}},13401:(e,t,r)=>{var s=r(64293);var n=s.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=s}else{copyProps(s,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var s=n(e);if(t!==undefined){if(typeof r==="string"){s.fill(t,r)}else{s.fill(t)}}else{s.fill(0)}return s};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s.SlowBuffer(e)}},79774:(e,t,r)=>{"use strict";const{compare:s,intersection:n,semver:a}=r(7720);const i=r(72490);const o=r(97347);e.exports=function(e){const t=a(e);if(t.major!==3){throw RangeError("This version of `core-js-compat` works only with `core-js@3`.")}const r=[];for(const e of Object.keys(i)){if(s(e,"<=",t)){r.push(...i[e])}}return n(r,o)}},7720:(e,t,r)=>{"use strict";const s=r(43566);const n=r(29402);const a=Function.call.bind({}.hasOwnProperty);function compare(e,t,r){return s(n(e),t,n(r))}function intersection(e,t){const r=e instanceof Set?e:new Set(e);return t.filter(e=>r.has(e))}function sortObjectByKey(e,t){return Object.keys(e).sort(t).reduce((t,r)=>{t[r]=e[r];return t},{})}e.exports={compare:compare,has:a,intersection:intersection,semver:n,sortObjectByKey:sortObjectByKey}},97819:(e,t,r)=>{const s=r(71982);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:a}=r(22768);const{re:i,t:o}=r(1537);const{compareIdentifiers:l}=r(36103);class SemVer{constructor(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>a||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>a||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>a||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},43566:(e,t,r)=>{const s=r(42445);const n=r(77729);const a=r(34087);const i=r(60758);const o=r(42720);const l=r(29864);const u=(e,t,r,u)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return s(e,r,u);case"!=":return n(e,r,u);case">":return a(e,r,u);case">=":return i(e,r,u);case"<":return o(e,r,u);case"<=":return l(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=u},29402:(e,t,r)=>{const s=r(97819);const n=r(23614);const{re:a,t:i}=r(1537);const o=(e,t)=>{if(e instanceof s){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(a[i.COERCE])}else{let t;while((t=a[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}a[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}a[i.COERCERTL].lastIndex=-1}if(r===null)return null;return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=o},829:(e,t,r)=>{const s=r(97819);const n=(e,t,r)=>new s(e,r).compare(new s(t,r));e.exports=n},42445:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)===0;e.exports=n},34087:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)>0;e.exports=n},60758:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)>=0;e.exports=n},42720:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)<0;e.exports=n},29864:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)<=0;e.exports=n},77729:(e,t,r)=>{const s=r(829);const n=(e,t,r)=>s(e,t,r)!==0;e.exports=n},23614:(e,t,r)=>{const{MAX_LENGTH:s}=r(22768);const{re:n,t:a}=r(1537);const i=r(97819);const o=(e,t)=>{if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof i){return e}if(typeof e!=="string"){return null}if(e.length>s){return null}const r=t.loose?n[a.LOOSE]:n[a.FULL];if(!r.test(e)){return null}try{return new i(e,t)}catch(e){return null}};e.exports=o},22768:e=>{const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:s,MAX_SAFE_COMPONENT_LENGTH:n}},71982:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},36103:e=>{const t=/^[0-9]+$/;const r=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:er(t,e);e.exports={compareIdentifiers:r,rcompareIdentifiers:s}},1537:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:s}=r(22768);const n=r(71982);t=e.exports={};const a=t.re=[];const i=t.src=[];const o=t.t={};let l=0;const u=(e,t,r)=>{const s=l++;n(s,t);o[e]=s;i[s]=t;a[s]=new RegExp(t,r?"g":undefined)};u("NUMERICIDENTIFIER","0|[1-9]\\d*");u("NUMERICIDENTIFIERLOOSE","[0-9]+");u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");u("MAINVERSION",`(${i[o.NUMERICIDENTIFIER]})\\.`+`(${i[o.NUMERICIDENTIFIER]})\\.`+`(${i[o.NUMERICIDENTIFIER]})`);u("MAINVERSIONLOOSE",`(${i[o.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[o.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[o.NUMERICIDENTIFIERLOOSE]})`);u("PRERELEASEIDENTIFIER",`(?:${i[o.NUMERICIDENTIFIER]}|${i[o.NONNUMERICIDENTIFIER]})`);u("PRERELEASEIDENTIFIERLOOSE",`(?:${i[o.NUMERICIDENTIFIERLOOSE]}|${i[o.NONNUMERICIDENTIFIER]})`);u("PRERELEASE",`(?:-(${i[o.PRERELEASEIDENTIFIER]}(?:\\.${i[o.PRERELEASEIDENTIFIER]})*))`);u("PRERELEASELOOSE",`(?:-?(${i[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[o.PRERELEASEIDENTIFIERLOOSE]})*))`);u("BUILDIDENTIFIER","[0-9A-Za-z-]+");u("BUILD",`(?:\\+(${i[o.BUILDIDENTIFIER]}(?:\\.${i[o.BUILDIDENTIFIER]})*))`);u("FULLPLAIN",`v?${i[o.MAINVERSION]}${i[o.PRERELEASE]}?${i[o.BUILD]}?`);u("FULL",`^${i[o.FULLPLAIN]}$`);u("LOOSEPLAIN",`[v=\\s]*${i[o.MAINVERSIONLOOSE]}${i[o.PRERELEASELOOSE]}?${i[o.BUILD]}?`);u("LOOSE",`^${i[o.LOOSEPLAIN]}$`);u("GTLT","((?:<|>)?=?)");u("XRANGEIDENTIFIERLOOSE",`${i[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);u("XRANGEIDENTIFIER",`${i[o.NUMERICIDENTIFIER]}|x|X|\\*`);u("XRANGEPLAIN",`[v=\\s]*(${i[o.XRANGEIDENTIFIER]})`+`(?:\\.(${i[o.XRANGEIDENTIFIER]})`+`(?:\\.(${i[o.XRANGEIDENTIFIER]})`+`(?:${i[o.PRERELEASE]})?${i[o.BUILD]}?`+`)?)?`);u("XRANGEPLAINLOOSE",`[v=\\s]*(${i[o.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[o.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[o.XRANGEIDENTIFIERLOOSE]})`+`(?:${i[o.PRERELEASELOOSE]})?${i[o.BUILD]}?`+`)?)?`);u("XRANGE",`^${i[o.GTLT]}\\s*${i[o.XRANGEPLAIN]}$`);u("XRANGELOOSE",`^${i[o.GTLT]}\\s*${i[o.XRANGEPLAINLOOSE]}$`);u("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);u("COERCERTL",i[o.COERCE],true);u("LONETILDE","(?:~>?)");u("TILDETRIM",`(\\s*)${i[o.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";u("TILDE",`^${i[o.LONETILDE]}${i[o.XRANGEPLAIN]}$`);u("TILDELOOSE",`^${i[o.LONETILDE]}${i[o.XRANGEPLAINLOOSE]}$`);u("LONECARET","(?:\\^)");u("CARETTRIM",`(\\s*)${i[o.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";u("CARET",`^${i[o.LONECARET]}${i[o.XRANGEPLAIN]}$`);u("CARETLOOSE",`^${i[o.LONECARET]}${i[o.XRANGEPLAINLOOSE]}$`);u("COMPARATORLOOSE",`^${i[o.GTLT]}\\s*(${i[o.LOOSEPLAIN]})$|^$`);u("COMPARATOR",`^${i[o.GTLT]}\\s*(${i[o.FULLPLAIN]})$|^$`);u("COMPARATORTRIM",`(\\s*)${i[o.GTLT]}\\s*(${i[o.LOOSEPLAIN]}|${i[o.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";u("HYPHENRANGE",`^\\s*(${i[o.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${i[o.XRANGEPLAIN]})`+`\\s*$`);u("HYPHENRANGELOOSE",`^\\s*(${i[o.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${i[o.XRANGEPLAINLOOSE]})`+`\\s*$`);u("STAR","(<|>)?=?\\s*\\*")},67941:e=>{"use strict";const t=Symbol.for("gensync:v1:start");const r=Symbol.for("gensync:v1:suspend");const s="GENSYNC_EXPECTED_START";const n="GENSYNC_EXPECTED_SUSPEND";const a="GENSYNC_OPTIONS_ERROR";const i="GENSYNC_RACE_NONEMPTY";const o="GENSYNC_ERRBACK_NO_CALLBACK";e.exports=Object.assign(function gensync(e){let t=e;if(typeof e!=="function"){t=newGenerator(e)}else{t=wrapGenerator(e)}return Object.assign(t,makeFunctionAPI(t))},{all:buildOperation({name:"all",arity:1,sync:function(e){const t=Array.from(e[0]);return t.map(e=>evaluateSync(e))},async:function(e,t,r){const s=Array.from(e[0]);let n=0;const a=s.map(()=>undefined);s.forEach((e,s)=>{evaluateAsync(e,e=>{a[s]=e;n+=1;if(n===a.length)t(a)},r)})}}),race:buildOperation({name:"race",arity:1,sync:function(e){const t=Array.from(e[0]);if(t.length===0){throw makeError("Must race at least 1 item",i)}return evaluateSync(t[0])},async:function(e,t,r){const s=Array.from(e[0]);if(s.length===0){throw makeError("Must race at least 1 item",i)}for(const e of s){evaluateAsync(e,t,r)}}})});function makeFunctionAPI(e){const t={sync:function(...t){return evaluateSync(e.apply(this,t))},async:function(...t){return new Promise((r,s)=>{evaluateAsync(e.apply(this,t),r,s)})},errback:function(...t){const r=t.pop();if(typeof r!=="function"){throw makeError("Asynchronous function called without callback",o)}let s;try{s=e.apply(this,t)}catch(e){r(e);return}evaluateAsync(s,e=>r(undefined,e),e=>r(e))}};return t}function assertTypeof(e,t,r,s){if(typeof r===e||s&&typeof r==="undefined"){return}let n;if(s){n=`Expected opts.${t} to be either a ${e}, or undefined.`}else{n=`Expected opts.${t} to be a ${e}.`}throw makeError(n,a)}function makeError(e,t){return Object.assign(new Error(e),{code:t})}function newGenerator({name:e,arity:t,sync:r,async:s,errback:n}){assertTypeof("string","name",e,true);assertTypeof("number","arity",t,true);assertTypeof("function","sync",r);assertTypeof("function","async",s,true);assertTypeof("function","errback",n,true);if(s&&n){throw makeError("Expected one of either opts.async or opts.errback, but got _both_.",a)}if(typeof e!=="string"){let t;if(n&&n.name&&n.name!=="errback"){t=n.name}if(s&&s.name&&s.name!=="async"){t=s.name.replace(/Async$/,"")}if(r&&r.name&&r.name!=="sync"){t=r.name.replace(/Sync$/,"")}if(typeof t==="string"){e=t}}if(typeof t!=="number"){t=r.length}return buildOperation({name:e,arity:t,sync:function(e){return r.apply(this,e)},async:function(e,t,a){if(s){s.apply(this,e).then(t,a)}else if(n){n.call(this,...e,(e,r)=>{if(e==null)t(r);else a(e)})}else{t(r.apply(this,e))}}})}function wrapGenerator(e){return setFunctionMetadata(e.name,e.length,function(...t){return e.apply(this,t)})}function buildOperation({name:e,arity:s,sync:n,async:a}){return setFunctionMetadata(e,s,function*(...e){const s=yield t;if(!s){return n.call(this,e)}let i;try{a.call(this,e,e=>{if(i)return;i={value:e};s()},e=>{if(i)return;i={err:e};s()})}catch(e){i={err:e};s()}yield r;if(i.hasOwnProperty("err")){throw i.err}return i.value})}function evaluateSync(e){let t;while(!({value:t}=e.next()).done){assertStart(t,e)}return t}function evaluateAsync(e,t,r){(function step(){try{let s;while(!({value:s}=e.next()).done){assertStart(s,e);let t=true;let r=false;const n=e.next(()=>{if(t){r=true}else{step()}});t=false;assertSuspend(n,e);if(!r){return}}return t(s)}catch(e){return r(e)}})()}function assertStart(e,r){if(e===t)return;throwError(r,makeError(`Got unexpected yielded value in gensync generator: ${JSON.stringify(e)}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,s))}function assertSuspend({value:e,done:t},s){if(!t&&e===r)return;throwError(s,makeError(t?"Unexpected generator completion. If you get this, it is probably a gensync bug.":`Expected GENSYNC_SUSPEND, got ${JSON.stringify(e)}. If you get this, it is probably a gensync bug.`,n))}function throwError(e,t){if(e.throw)e.throw(t);throw t}function isIterable(e){return!!e&&(typeof e==="object"||typeof e==="function")&&!e[Symbol.iterator]}function setFunctionMetadata(e,t,r){if(typeof e==="string"){const t=Object.getOwnPropertyDescriptor(r,"name");if(!t||t.configurable){Object.defineProperty(r,"name",Object.assign(t||{},{configurable:true,value:e}))}}if(typeof t==="number"){const e=Object.getOwnPropertyDescriptor(r,"length");if(!e||e.configurable){Object.defineProperty(r,"length",Object.assign(e||{},{configurable:true,value:t}))}}return r}},41389:(e,t,r)=>{"use strict";e.exports=r(67589)},52388:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;t.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:undefined};if(e[1])t.type="string",t.closed=!!(e[3]||e[4]);else if(e[5])t.type="comment";else if(e[6])t.type="comment",t.closed=!!e[7];else if(e[8])t.type="regex";else if(e[9])t.type="number";else if(e[10])t.type="name";else if(e[11])t.type="punctuator";else if(e[12])t.type="whitespace";return t}},41066:(e,t,r)=>{var s=r(76028),n=r(562);var a=s(n,"DataView");e.exports=a},30731:(e,t,r)=>{var s=r(79130),n=r(93067),a=r(21098),i=r(73949),o=r(48911);function Hash(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t{var s=r(52523),n=r(19937),a=r(15131),i=r(89528),o=r(51635);function ListCache(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t{var s=r(76028),n=r(562);var a=s(n,"Map");e.exports=a},16531:(e,t,r)=>{var s=r(3489),n=r(288),a=r(15712),i=r(80369),o=r(66935);function MapCache(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t{var s=r(76028),n=r(562);var a=s(n,"Promise");e.exports=a},9056:(e,t,r)=>{var s=r(76028),n=r(562);var a=s(n,"Set");e.exports=a},41113:(e,t,r)=>{var s=r(16531),n=r(57073),a=r(65372);function SetCache(e){var t=-1,r=e==null?0:e.length;this.__data__=new s;while(++t{var s=r(82746),n=r(22614),a=r(24202),i=r(96310),o=r(58721),l=r(90320);function Stack(e){var t=this.__data__=new s(e);this.size=t.size}Stack.prototype.clear=n;Stack.prototype["delete"]=a;Stack.prototype.get=i;Stack.prototype.has=o;Stack.prototype.set=l;e.exports=Stack},39929:(e,t,r)=>{var s=r(562);var n=s.Symbol;e.exports=n},81918:(e,t,r)=>{var s=r(562);var n=s.Uint8Array;e.exports=n},87243:(e,t,r)=>{var s=r(76028),n=r(562);var a=s(n,"WeakMap");e.exports=a},99502:e=>{function apply(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}e.exports=apply},98029:e=>{function arrayEach(e,t){var r=-1,s=e==null?0:e.length;while(++r{function arrayFilter(e,t){var r=-1,s=e==null?0:e.length,n=0,a=[];while(++r{var s=r(15683),n=r(24839),a=r(43364),i=r(12963),o=r(72950),l=r(53635);var u=Object.prototype;var c=u.hasOwnProperty;function arrayLikeKeys(e,t){var r=a(e),u=!r&&n(e),p=!r&&!u&&i(e),f=!r&&!u&&!p&&l(e),d=r||u||p||f,y=d?s(e.length,String):[],h=y.length;for(var m in e){if((t||c.call(e,m))&&!(d&&(m=="length"||p&&(m=="offset"||m=="parent")||f&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||o(m,h)))){y.push(m)}}return y}e.exports=arrayLikeKeys},77680:e=>{function arrayMap(e,t){var r=-1,s=e==null?0:e.length,n=Array(s);while(++r{function arrayPush(e,t){var r=-1,s=t.length,n=e.length;while(++r{function arraySome(e,t){var r=-1,s=e==null?0:e.length;while(++r{var s=r(71850),n=r(28650);var a=Object.prototype;var i=a.hasOwnProperty;function assignValue(e,t,r){var a=e[t];if(!(i.call(e,t)&&n(a,r))||r===undefined&&!(t in e)){s(e,t,r)}}e.exports=assignValue},886:(e,t,r)=>{var s=r(28650);function assocIndexOf(e,t){var r=e.length;while(r--){if(s(e[r][0],t)){return r}}return-1}e.exports=assocIndexOf},57361:(e,t,r)=>{var s=r(83568),n=r(50288);function baseAssign(e,t){return e&&s(t,n(t),e)}e.exports=baseAssign},86677:(e,t,r)=>{var s=r(83568),n=r(86032);function baseAssignIn(e,t){return e&&s(t,n(t),e)}e.exports=baseAssignIn},71850:(e,t,r)=>{var s=r(59252);function baseAssignValue(e,t,r){if(t=="__proto__"&&s){s(e,t,{configurable:true,enumerable:true,value:r,writable:true})}else{e[t]=r}}e.exports=baseAssignValue},95570:(e,t,r)=>{var s=r(49754),n=r(98029),a=r(55647),i=r(57361),o=r(86677),l=r(82009),u=r(76640),c=r(85337),p=r(93017),f=r(18785),d=r(54296),y=r(207),h=r(4025),m=r(27353),g=r(66312),b=r(43364),x=r(12963),v=r(13689),E=r(43420),T=r(81360),S=r(50288),P=r(86032);var j=1,w=2,A=4;var D="[object Arguments]",O="[object Array]",_="[object Boolean]",C="[object Date]",I="[object Error]",k="[object Function]",R="[object GeneratorFunction]",M="[object Map]",N="[object Number]",F="[object Object]",L="[object RegExp]",B="[object Set]",q="[object String]",W="[object Symbol]",U="[object WeakMap]";var K="[object ArrayBuffer]",V="[object DataView]",$="[object Float32Array]",J="[object Float64Array]",H="[object Int8Array]",G="[object Int16Array]",Y="[object Int32Array]",X="[object Uint8Array]",z="[object Uint8ClampedArray]",Q="[object Uint16Array]",Z="[object Uint32Array]";var ee={};ee[D]=ee[O]=ee[K]=ee[V]=ee[_]=ee[C]=ee[$]=ee[J]=ee[H]=ee[G]=ee[Y]=ee[M]=ee[N]=ee[F]=ee[L]=ee[B]=ee[q]=ee[W]=ee[X]=ee[z]=ee[Q]=ee[Z]=true;ee[I]=ee[k]=ee[U]=false;function baseClone(e,t,r,O,_,C){var I,M=t&j,N=t&w,L=t&A;if(r){I=_?r(e,O,_,C):r(e)}if(I!==undefined){return I}if(!E(e)){return e}var B=b(e);if(B){I=h(e);if(!M){return u(e,I)}}else{var q=y(e),W=q==k||q==R;if(x(e)){return l(e,M)}if(q==F||q==D||W&&!_){I=N||W?{}:g(e);if(!M){return N?p(e,o(I,e)):c(e,i(I,e))}}else{if(!ee[q]){return _?e:{}}I=m(e,q,M)}}C||(C=new s);var U=C.get(e);if(U){return U}C.set(e,I);if(T(e)){e.forEach(function(s){I.add(baseClone(s,t,r,s,e,C))})}else if(v(e)){e.forEach(function(s,n){I.set(n,baseClone(s,t,r,n,e,C))})}var K=L?N?d:f:N?P:S;var V=B?undefined:K(e);n(V||e,function(s,n){if(V){n=s;s=e[n]}a(I,n,baseClone(s,t,r,n,e,C))});return I}e.exports=baseClone},14794:(e,t,r)=>{var s=r(43420);var n=Object.create;var a=function(){function object(){}return function(e){if(!s(e)){return{}}if(n){return n(e)}object.prototype=e;var t=new object;object.prototype=undefined;return t}}();e.exports=a},45547:(e,t,r)=>{var s=r(75954),n=r(97990);var a=n(s);e.exports=a},97919:e=>{function baseFindIndex(e,t,r,s){var n=e.length,a=r+(s?1:-1);while(s?a--:++a{var s=r(52061),n=r(6426);function baseFlatten(e,t,r,a,i){var o=-1,l=e.length;r||(r=n);i||(i=[]);while(++o0&&r(u)){if(t>1){baseFlatten(u,t-1,r,a,i)}else{s(i,u)}}else if(!a){i[i.length]=u}}return i}e.exports=baseFlatten},58342:(e,t,r)=>{var s=r(28290);var n=s();e.exports=n},75954:(e,t,r)=>{var s=r(58342),n=r(50288);function baseForOwn(e,t){return e&&s(e,t,n)}e.exports=baseForOwn},86685:(e,t,r)=>{var s=r(18963),n=r(30668);function baseGet(e,t){t=s(t,e);var r=0,a=t.length;while(e!=null&&r{var s=r(52061),n=r(43364);function baseGetAllKeys(e,t,r){var a=t(e);return n(e)?a:s(a,r(e))}e.exports=baseGetAllKeys},98653:(e,t,r)=>{var s=r(39929),n=r(32608),a=r(49052);var i="[object Null]",o="[object Undefined]";var l=s?s.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?o:i}return l&&l in Object(e)?n(e):a(e)}e.exports=baseGetTag},59488:e=>{var t=Object.prototype;var r=t.hasOwnProperty;function baseHas(e,t){return e!=null&&r.call(e,t)}e.exports=baseHas},56263:e=>{function baseHasIn(e,t){return e!=null&&t in Object(e)}e.exports=baseHasIn},77086:(e,t,r)=>{var s=r(97919),n=r(14094),a=r(54590);function baseIndexOf(e,t,r){return t===t?a(e,t,r):s(e,n,r)}e.exports=baseIndexOf},80683:e=>{function baseIndexOfWith(e,t,r,s){var n=r-1,a=e.length;while(++n{var s=r(98653),n=r(9111);var a="[object Arguments]";function baseIsArguments(e){return n(e)&&s(e)==a}e.exports=baseIsArguments},60876:(e,t,r)=>{var s=r(74402),n=r(9111);function baseIsEqual(e,t,r,a,i){if(e===t){return true}if(e==null||t==null||!n(e)&&!n(t)){return e!==e&&t!==t}return s(e,t,r,a,baseIsEqual,i)}e.exports=baseIsEqual},74402:(e,t,r)=>{var s=r(49754),n=r(32312),a=r(95155),i=r(61333),o=r(207),l=r(43364),u=r(12963),c=r(53635);var p=1;var f="[object Arguments]",d="[object Array]",y="[object Object]";var h=Object.prototype;var m=h.hasOwnProperty;function baseIsEqualDeep(e,t,r,h,g,b){var x=l(e),v=l(t),E=x?d:o(e),T=v?d:o(t);E=E==f?y:E;T=T==f?y:T;var S=E==y,P=T==y,j=E==T;if(j&&u(e)){if(!u(t)){return false}x=true;S=false}if(j&&!S){b||(b=new s);return x||c(e)?n(e,t,r,h,g,b):a(e,t,E,r,h,g,b)}if(!(r&p)){var w=S&&m.call(e,"__wrapped__"),A=P&&m.call(t,"__wrapped__");if(w||A){var D=w?e.value():e,O=A?t.value():t;b||(b=new s);return g(D,O,r,h,b)}}if(!j){return false}b||(b=new s);return i(e,t,r,h,g,b)}e.exports=baseIsEqualDeep},81391:(e,t,r)=>{var s=r(207),n=r(9111);var a="[object Map]";function baseIsMap(e){return n(e)&&s(e)==a}e.exports=baseIsMap},83770:(e,t,r)=>{var s=r(49754),n=r(60876);var a=1,i=2;function baseIsMatch(e,t,r,o){var l=r.length,u=l,c=!o;if(e==null){return!u}e=Object(e);while(l--){var p=r[l];if(c&&p[2]?p[1]!==e[p[0]]:!(p[0]in e)){return false}}while(++l{function baseIsNaN(e){return e!==e}e.exports=baseIsNaN},72294:(e,t,r)=>{var s=r(66827),n=r(16716),a=r(43420),i=r(98241);var o=/[\\^$.*+?()[\]{}|]/g;var l=/^\[object .+?Constructor\]$/;var u=Function.prototype,c=Object.prototype;var p=u.toString;var f=c.hasOwnProperty;var d=RegExp("^"+p.call(f).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(e){if(!a(e)||n(e)){return false}var t=s(e)?d:l;return t.test(i(e))}e.exports=baseIsNative},42542:(e,t,r)=>{var s=r(98653),n=r(9111);var a="[object RegExp]";function baseIsRegExp(e){return n(e)&&s(e)==a}e.exports=baseIsRegExp},19472:(e,t,r)=>{var s=r(207),n=r(9111);var a="[object Set]";function baseIsSet(e){return n(e)&&s(e)==a}e.exports=baseIsSet},86944:(e,t,r)=>{var s=r(98653),n=r(55752),a=r(9111);var i="[object Arguments]",o="[object Array]",l="[object Boolean]",u="[object Date]",c="[object Error]",p="[object Function]",f="[object Map]",d="[object Number]",y="[object Object]",h="[object RegExp]",m="[object Set]",g="[object String]",b="[object WeakMap]";var x="[object ArrayBuffer]",v="[object DataView]",E="[object Float32Array]",T="[object Float64Array]",S="[object Int8Array]",P="[object Int16Array]",j="[object Int32Array]",w="[object Uint8Array]",A="[object Uint8ClampedArray]",D="[object Uint16Array]",O="[object Uint32Array]";var _={};_[E]=_[T]=_[S]=_[P]=_[j]=_[w]=_[A]=_[D]=_[O]=true;_[i]=_[o]=_[x]=_[l]=_[v]=_[u]=_[c]=_[p]=_[f]=_[d]=_[y]=_[h]=_[m]=_[g]=_[b]=false;function baseIsTypedArray(e){return a(e)&&n(e.length)&&!!_[s(e)]}e.exports=baseIsTypedArray},49749:(e,t,r)=>{var s=r(67122),n=r(93008),a=r(57460),i=r(43364),o=r(60204);function baseIteratee(e){if(typeof e=="function"){return e}if(e==null){return a}if(typeof e=="object"){return i(e)?n(e[0],e[1]):s(e)}return o(e)}e.exports=baseIteratee},24787:(e,t,r)=>{var s=r(4954),n=r(11491);var a=Object.prototype;var i=a.hasOwnProperty;function baseKeys(e){if(!s(e)){return n(e)}var t=[];for(var r in Object(e)){if(i.call(e,r)&&r!="constructor"){t.push(r)}}return t}e.exports=baseKeys},14535:(e,t,r)=>{var s=r(43420),n=r(4954),a=r(43101);var i=Object.prototype;var o=i.hasOwnProperty;function baseKeysIn(e){if(!s(e)){return a(e)}var t=n(e),r=[];for(var i in e){if(!(i=="constructor"&&(t||!o.call(e,i)))){r.push(i)}}return r}e.exports=baseKeysIn},56004:(e,t,r)=>{var s=r(45547),n=r(20577);function baseMap(e,t){var r=-1,a=n(e)?Array(e.length):[];s(e,function(e,s,n){a[++r]=t(e,s,n)});return a}e.exports=baseMap},67122:(e,t,r)=>{var s=r(83770),n=r(47876),a=r(66162);function baseMatches(e){var t=n(e);if(t.length==1&&t[0][2]){return a(t[0][0],t[0][1])}return function(r){return r===e||s(r,e,t)}}e.exports=baseMatches},93008:(e,t,r)=>{var s=r(60876),n=r(94484),a=r(14426),i=r(20007),o=r(36705),l=r(66162),u=r(30668);var c=1,p=2;function baseMatchesProperty(e,t){if(i(e)&&o(t)){return l(u(e),t)}return function(r){var i=n(r,e);return i===undefined&&i===t?a(r,e):s(t,i,c|p)}}e.exports=baseMatchesProperty},18631:(e,t,r)=>{var s=r(77680),n=r(86685),a=r(49749),i=r(56004),o=r(30268),l=r(83717),u=r(2687),c=r(57460),p=r(43364);function baseOrderBy(e,t,r){if(t.length){t=s(t,function(e){if(p(e)){return function(t){return n(t,e.length===1?e[0]:e)}}return e})}else{t=[c]}var f=-1;t=s(t,l(a));var d=i(e,function(e,r,n){var a=s(t,function(t){return t(e)});return{criteria:a,index:++f,value:e}});return o(d,function(e,t){return u(e,t,r)})}e.exports=baseOrderBy},18077:e=>{function baseProperty(e){return function(t){return t==null?undefined:t[e]}}e.exports=baseProperty},1666:(e,t,r)=>{var s=r(86685);function basePropertyDeep(e){return function(t){return s(t,e)}}e.exports=basePropertyDeep},60257:(e,t,r)=>{var s=r(77680),n=r(77086),a=r(80683),i=r(83717),o=r(76640);var l=Array.prototype;var u=l.splice;function basePullAll(e,t,r,l){var c=l?a:n,p=-1,f=t.length,d=e;if(e===t){t=o(t)}if(r){d=s(e,i(r))}while(++p-1){if(d!==e){u.call(d,y,1)}u.call(e,y,1)}}return e}e.exports=basePullAll},31428:(e,t,r)=>{var s=r(57460),n=r(216),a=r(65444);function baseRest(e,t){return a(n(e,t,s),e+"")}e.exports=baseRest},3503:(e,t,r)=>{var s=r(66915),n=r(59252),a=r(57460);var i=!n?a:function(e,t){return n(e,"toString",{configurable:true,enumerable:false,value:s(t),writable:true})};e.exports=i},98415:e=>{function baseSlice(e,t,r){var s=-1,n=e.length;if(t<0){t=-t>n?0:n+t}r=r>n?n:r;if(r<0){r+=n}n=t>r?0:r-t>>>0;t>>>=0;var a=Array(n);while(++s{function baseSortBy(e,t){var r=e.length;e.sort(t);while(r--){e[r]=e[r].value}return e}e.exports=baseSortBy},15683:e=>{function baseTimes(e,t){var r=-1,s=Array(e);while(++r{var s=r(39929),n=r(77680),a=r(43364),i=r(82500);var o=1/0;var l=s?s.prototype:undefined,u=l?l.toString:undefined;function baseToString(e){if(typeof e=="string"){return e}if(a(e)){return n(e,baseToString)+""}if(i(e)){return u?u.call(e):""}var t=e+"";return t=="0"&&1/e==-o?"-0":t}e.exports=baseToString},83717:e=>{function baseUnary(e){return function(t){return e(t)}}e.exports=baseUnary},89127:e=>{function cacheHas(e,t){return e.has(t)}e.exports=cacheHas},18963:(e,t,r)=>{var s=r(43364),n=r(20007),a=r(35725),i=r(49228);function castPath(e,t){if(s(e)){return e}return n(e,t)?[e]:a(i(e))}e.exports=castPath},18384:(e,t,r)=>{var s=r(81918);function cloneArrayBuffer(e){var t=new e.constructor(e.byteLength);new s(t).set(new s(e));return t}e.exports=cloneArrayBuffer},82009:(e,t,r)=>{e=r.nmd(e);var s=r(562);var n=true&&t&&!t.nodeType&&t;var a=n&&"object"=="object"&&e&&!e.nodeType&&e;var i=a&&a.exports===n;var o=i?s.Buffer:undefined,l=o?o.allocUnsafe:undefined;function cloneBuffer(e,t){if(t){return e.slice()}var r=e.length,s=l?l(r):new e.constructor(r);e.copy(s);return s}e.exports=cloneBuffer},8534:(e,t,r)=>{var s=r(18384);function cloneDataView(e,t){var r=t?s(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}e.exports=cloneDataView},86549:e=>{var t=/\w*$/;function cloneRegExp(e){var r=new e.constructor(e.source,t.exec(e));r.lastIndex=e.lastIndex;return r}e.exports=cloneRegExp},81731:(e,t,r)=>{var s=r(39929);var n=s?s.prototype:undefined,a=n?n.valueOf:undefined;function cloneSymbol(e){return a?Object(a.call(e)):{}}e.exports=cloneSymbol},13817:(e,t,r)=>{var s=r(18384);function cloneTypedArray(e,t){var r=t?s(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}e.exports=cloneTypedArray},28800:(e,t,r)=>{var s=r(82500);function compareAscending(e,t){if(e!==t){var r=e!==undefined,n=e===null,a=e===e,i=s(e);var o=t!==undefined,l=t===null,u=t===t,c=s(t);if(!l&&!c&&!i&&e>t||i&&o&&u&&!l&&!c||n&&o&&u||!r&&u||!a){return 1}if(!n&&!i&&!c&&e{var s=r(28800);function compareMultiple(e,t,r){var n=-1,a=e.criteria,i=t.criteria,o=a.length,l=r.length;while(++n=l){return u}var c=r[n];return u*(c=="desc"?-1:1)}}return e.index-t.index}e.exports=compareMultiple},76640:e=>{function copyArray(e,t){var r=-1,s=e.length;t||(t=Array(s));while(++r{var s=r(55647),n=r(71850);function copyObject(e,t,r,a){var i=!r;r||(r={});var o=-1,l=t.length;while(++o{var s=r(83568),n=r(5841);function copySymbols(e,t){return s(e,n(e),t)}e.exports=copySymbols},93017:(e,t,r)=>{var s=r(83568),n=r(85468);function copySymbolsIn(e,t){return s(e,n(e),t)}e.exports=copySymbolsIn},54554:(e,t,r)=>{var s=r(562);var n=s["__core-js_shared__"];e.exports=n},97990:(e,t,r)=>{var s=r(20577);function createBaseEach(e,t){return function(r,n){if(r==null){return r}if(!s(r)){return e(r,n)}var a=r.length,i=t?a:-1,o=Object(r);while(t?i--:++i{function createBaseFor(e){return function(t,r,s){var n=-1,a=Object(t),i=s(t),o=i.length;while(o--){var l=i[e?o:++n];if(r(a[l],l,a)===false){break}}return t}}e.exports=createBaseFor},59252:(e,t,r)=>{var s=r(76028);var n=function(){try{var e=s(Object,"defineProperty");e({},"",{});return e}catch(e){}}();e.exports=n},32312:(e,t,r)=>{var s=r(41113),n=r(49551),a=r(89127);var i=1,o=2;function equalArrays(e,t,r,l,u,c){var p=r&i,f=e.length,d=t.length;if(f!=d&&!(p&&d>f)){return false}var y=c.get(e);var h=c.get(t);if(y&&h){return y==t&&h==e}var m=-1,g=true,b=r&o?new s:undefined;c.set(e,t);c.set(t,e);while(++m{var s=r(39929),n=r(81918),a=r(28650),i=r(32312),o=r(46918),l=r(44592);var u=1,c=2;var p="[object Boolean]",f="[object Date]",d="[object Error]",y="[object Map]",h="[object Number]",m="[object RegExp]",g="[object Set]",b="[object String]",x="[object Symbol]";var v="[object ArrayBuffer]",E="[object DataView]";var T=s?s.prototype:undefined,S=T?T.valueOf:undefined;function equalByTag(e,t,r,s,T,P,j){switch(r){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset){return false}e=e.buffer;t=t.buffer;case v:if(e.byteLength!=t.byteLength||!P(new n(e),new n(t))){return false}return true;case p:case f:case h:return a(+e,+t);case d:return e.name==t.name&&e.message==t.message;case m:case b:return e==t+"";case y:var w=o;case g:var A=s&u;w||(w=l);if(e.size!=t.size&&!A){return false}var D=j.get(e);if(D){return D==t}s|=c;j.set(e,t);var O=i(w(e),w(t),s,T,P,j);j["delete"](e);return O;case x:if(S){return S.call(e)==S.call(t)}}return false}e.exports=equalByTag},61333:(e,t,r)=>{var s=r(18785);var n=1;var a=Object.prototype;var i=a.hasOwnProperty;function equalObjects(e,t,r,a,o,l){var u=r&n,c=s(e),p=c.length,f=s(t),d=f.length;if(p!=d&&!u){return false}var y=p;while(y--){var h=c[y];if(!(u?h in t:i.call(t,h))){return false}}var m=l.get(e);var g=l.get(t);if(m&&g){return m==t&&g==e}var b=true;l.set(e,t);l.set(t,e);var x=u;while(++y{var t=typeof global=="object"&&global&&global.Object===Object&&global;e.exports=t},18785:(e,t,r)=>{var s=r(98160),n=r(5841),a=r(50288);function getAllKeys(e){return s(e,a,n)}e.exports=getAllKeys},54296:(e,t,r)=>{var s=r(98160),n=r(85468),a=r(86032);function getAllKeysIn(e){return s(e,a,n)}e.exports=getAllKeysIn},71198:(e,t,r)=>{var s=r(89958);function getMapData(e,t){var r=e.__data__;return s(t)?r[typeof t=="string"?"string":"hash"]:r.map}e.exports=getMapData},47876:(e,t,r)=>{var s=r(36705),n=r(50288);function getMatchData(e){var t=n(e),r=t.length;while(r--){var a=t[r],i=e[a];t[r]=[a,i,s(i)]}return t}e.exports=getMatchData},76028:(e,t,r)=>{var s=r(72294),n=r(64413);function getNative(e,t){var r=n(e,t);return s(r)?r:undefined}e.exports=getNative},63363:(e,t,r)=>{var s=r(90570);var n=s(Object.getPrototypeOf,Object);e.exports=n},32608:(e,t,r)=>{var s=r(39929);var n=Object.prototype;var a=n.hasOwnProperty;var i=n.toString;var o=s?s.toStringTag:undefined;function getRawTag(e){var t=a.call(e,o),r=e[o];try{e[o]=undefined;var s=true}catch(e){}var n=i.call(e);if(s){if(t){e[o]=r}else{delete e[o]}}return n}e.exports=getRawTag},5841:(e,t,r)=>{var s=r(69459),n=r(87632);var a=Object.prototype;var i=a.propertyIsEnumerable;var o=Object.getOwnPropertySymbols;var l=!o?n:function(e){if(e==null){return[]}e=Object(e);return s(o(e),function(t){return i.call(e,t)})};e.exports=l},85468:(e,t,r)=>{var s=r(52061),n=r(63363),a=r(5841),i=r(87632);var o=Object.getOwnPropertySymbols;var l=!o?i:function(e){var t=[];while(e){s(t,a(e));e=n(e)}return t};e.exports=l},207:(e,t,r)=>{var s=r(41066),n=r(51105),a=r(40514),i=r(9056),o=r(87243),l=r(98653),u=r(98241);var c="[object Map]",p="[object Object]",f="[object Promise]",d="[object Set]",y="[object WeakMap]";var h="[object DataView]";var m=u(s),g=u(n),b=u(a),x=u(i),v=u(o);var E=l;if(s&&E(new s(new ArrayBuffer(1)))!=h||n&&E(new n)!=c||a&&E(a.resolve())!=f||i&&E(new i)!=d||o&&E(new o)!=y){E=function(e){var t=l(e),r=t==p?e.constructor:undefined,s=r?u(r):"";if(s){switch(s){case m:return h;case g:return c;case b:return f;case x:return d;case v:return y}}return t}}e.exports=E},64413:e=>{function getValue(e,t){return e==null?undefined:e[t]}e.exports=getValue},23144:(e,t,r)=>{var s=r(18963),n=r(24839),a=r(43364),i=r(72950),o=r(55752),l=r(30668);function hasPath(e,t,r){t=s(t,e);var u=-1,c=t.length,p=false;while(++u{var s=r(36786);function hashClear(){this.__data__=s?s(null):{};this.size=0}e.exports=hashClear},93067:e=>{function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];this.size-=t?1:0;return t}e.exports=hashDelete},21098:(e,t,r)=>{var s=r(36786);var n="__lodash_hash_undefined__";var a=Object.prototype;var i=a.hasOwnProperty;function hashGet(e){var t=this.__data__;if(s){var r=t[e];return r===n?undefined:r}return i.call(t,e)?t[e]:undefined}e.exports=hashGet},73949:(e,t,r)=>{var s=r(36786);var n=Object.prototype;var a=n.hasOwnProperty;function hashHas(e){var t=this.__data__;return s?t[e]!==undefined:a.call(t,e)}e.exports=hashHas},48911:(e,t,r)=>{var s=r(36786);var n="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;this.size+=this.has(e)?0:1;r[e]=s&&t===undefined?n:t;return this}e.exports=hashSet},4025:e=>{var t=Object.prototype;var r=t.hasOwnProperty;function initCloneArray(e){var t=e.length,s=new e.constructor(t);if(t&&typeof e[0]=="string"&&r.call(e,"index")){s.index=e.index;s.input=e.input}return s}e.exports=initCloneArray},27353:(e,t,r)=>{var s=r(18384),n=r(8534),a=r(86549),i=r(81731),o=r(13817);var l="[object Boolean]",u="[object Date]",c="[object Map]",p="[object Number]",f="[object RegExp]",d="[object Set]",y="[object String]",h="[object Symbol]";var m="[object ArrayBuffer]",g="[object DataView]",b="[object Float32Array]",x="[object Float64Array]",v="[object Int8Array]",E="[object Int16Array]",T="[object Int32Array]",S="[object Uint8Array]",P="[object Uint8ClampedArray]",j="[object Uint16Array]",w="[object Uint32Array]";function initCloneByTag(e,t,r){var A=e.constructor;switch(t){case m:return s(e);case l:case u:return new A(+e);case g:return n(e,r);case b:case x:case v:case E:case T:case S:case P:case j:case w:return o(e,r);case c:return new A;case p:case y:return new A(e);case f:return a(e);case d:return new A;case h:return i(e)}}e.exports=initCloneByTag},66312:(e,t,r)=>{var s=r(14794),n=r(63363),a=r(4954);function initCloneObject(e){return typeof e.constructor=="function"&&!a(e)?s(n(e)):{}}e.exports=initCloneObject},6426:(e,t,r)=>{var s=r(39929),n=r(24839),a=r(43364);var i=s?s.isConcatSpreadable:undefined;function isFlattenable(e){return a(e)||n(e)||!!(i&&e&&e[i])}e.exports=isFlattenable},72950:e=>{var t=9007199254740991;var r=/^(?:0|[1-9]\d*)$/;function isIndex(e,s){var n=typeof e;s=s==null?t:s;return!!s&&(n=="number"||n!="symbol"&&r.test(e))&&(e>-1&&e%1==0&&e{var s=r(28650),n=r(20577),a=r(72950),i=r(43420);function isIterateeCall(e,t,r){if(!i(r)){return false}var o=typeof t;if(o=="number"?n(r)&&a(t,r.length):o=="string"&&t in r){return s(r[t],e)}return false}e.exports=isIterateeCall},20007:(e,t,r)=>{var s=r(43364),n=r(82500);var a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function isKey(e,t){if(s(e)){return false}var r=typeof e;if(r=="number"||r=="symbol"||r=="boolean"||e==null||n(e)){return true}return i.test(e)||!a.test(e)||t!=null&&e in Object(t)}e.exports=isKey},89958:e=>{function isKeyable(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}e.exports=isKeyable},16716:(e,t,r)=>{var s=r(54554);var n=function(){var e=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked(e){return!!n&&n in e}e.exports=isMasked},4954:e=>{var t=Object.prototype;function isPrototype(e){var r=e&&e.constructor,s=typeof r=="function"&&r.prototype||t;return e===s}e.exports=isPrototype},36705:(e,t,r)=>{var s=r(43420);function isStrictComparable(e){return e===e&&!s(e)}e.exports=isStrictComparable},52523:e=>{function listCacheClear(){this.__data__=[];this.size=0}e.exports=listCacheClear},19937:(e,t,r)=>{var s=r(886);var n=Array.prototype;var a=n.splice;function listCacheDelete(e){var t=this.__data__,r=s(t,e);if(r<0){return false}var n=t.length-1;if(r==n){t.pop()}else{a.call(t,r,1)}--this.size;return true}e.exports=listCacheDelete},15131:(e,t,r)=>{var s=r(886);function listCacheGet(e){var t=this.__data__,r=s(t,e);return r<0?undefined:t[r][1]}e.exports=listCacheGet},89528:(e,t,r)=>{var s=r(886);function listCacheHas(e){return s(this.__data__,e)>-1}e.exports=listCacheHas},51635:(e,t,r)=>{var s=r(886);function listCacheSet(e,t){var r=this.__data__,n=s(r,e);if(n<0){++this.size;r.push([e,t])}else{r[n][1]=t}return this}e.exports=listCacheSet},3489:(e,t,r)=>{var s=r(30731),n=r(82746),a=r(51105);function mapCacheClear(){this.size=0;this.__data__={hash:new s,map:new(a||n),string:new s}}e.exports=mapCacheClear},288:(e,t,r)=>{var s=r(71198);function mapCacheDelete(e){var t=s(this,e)["delete"](e);this.size-=t?1:0;return t}e.exports=mapCacheDelete},15712:(e,t,r)=>{var s=r(71198);function mapCacheGet(e){return s(this,e).get(e)}e.exports=mapCacheGet},80369:(e,t,r)=>{var s=r(71198);function mapCacheHas(e){return s(this,e).has(e)}e.exports=mapCacheHas},66935:(e,t,r)=>{var s=r(71198);function mapCacheSet(e,t){var r=s(this,e),n=r.size;r.set(e,t);this.size+=r.size==n?0:1;return this}e.exports=mapCacheSet},46918:e=>{function mapToArray(e){var t=-1,r=Array(e.size);e.forEach(function(e,s){r[++t]=[s,e]});return r}e.exports=mapToArray},66162:e=>{function matchesStrictComparable(e,t){return function(r){if(r==null){return false}return r[e]===t&&(t!==undefined||e in Object(r))}}e.exports=matchesStrictComparable},46717:(e,t,r)=>{var s=r(89058);var n=500;function memoizeCapped(e){var t=s(e,function(e){if(r.size===n){r.clear()}return e});var r=t.cache;return t}e.exports=memoizeCapped},36786:(e,t,r)=>{var s=r(76028);var n=s(Object,"create");e.exports=n},11491:(e,t,r)=>{var s=r(90570);var n=s(Object.keys,Object);e.exports=n},43101:e=>{function nativeKeysIn(e){var t=[];if(e!=null){for(var r in Object(e)){t.push(r)}}return t}e.exports=nativeKeysIn},62470:(e,t,r)=>{e=r.nmd(e);var s=r(37825);var n=true&&t&&!t.nodeType&&t;var a=n&&"object"=="object"&&e&&!e.nodeType&&e;var i=a&&a.exports===n;var o=i&&s.process;var l=function(){try{var e=a&&a.require&&a.require("util").types;if(e){return e}return o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=l},49052:e=>{var t=Object.prototype;var r=t.toString;function objectToString(e){return r.call(e)}e.exports=objectToString},90570:e=>{function overArg(e,t){return function(r){return e(t(r))}}e.exports=overArg},216:(e,t,r)=>{var s=r(99502);var n=Math.max;function overRest(e,t,r){t=n(t===undefined?e.length-1:t,0);return function(){var a=arguments,i=-1,o=n(a.length-t,0),l=Array(o);while(++i{var s=r(37825);var n=typeof self=="object"&&self&&self.Object===Object&&self;var a=s||n||Function("return this")();e.exports=a},57073:e=>{var t="__lodash_hash_undefined__";function setCacheAdd(e){this.__data__.set(e,t);return this}e.exports=setCacheAdd},65372:e=>{function setCacheHas(e){return this.__data__.has(e)}e.exports=setCacheHas},44592:e=>{function setToArray(e){var t=-1,r=Array(e.size);e.forEach(function(e){r[++t]=e});return r}e.exports=setToArray},65444:(e,t,r)=>{var s=r(3503),n=r(10697);var a=n(s);e.exports=a},10697:e=>{var t=800,r=16;var s=Date.now;function shortOut(e){var n=0,a=0;return function(){var i=s(),o=r-(i-a);a=i;if(o>0){if(++n>=t){return arguments[0]}}else{n=0}return e.apply(undefined,arguments)}}e.exports=shortOut},22614:(e,t,r)=>{var s=r(82746);function stackClear(){this.__data__=new s;this.size=0}e.exports=stackClear},24202:e=>{function stackDelete(e){var t=this.__data__,r=t["delete"](e);this.size=t.size;return r}e.exports=stackDelete},96310:e=>{function stackGet(e){return this.__data__.get(e)}e.exports=stackGet},58721:e=>{function stackHas(e){return this.__data__.has(e)}e.exports=stackHas},90320:(e,t,r)=>{var s=r(82746),n=r(51105),a=r(16531);var i=200;function stackSet(e,t){var r=this.__data__;if(r instanceof s){var o=r.__data__;if(!n||o.length{function strictIndexOf(e,t,r){var s=r-1,n=e.length;while(++s{var s=r(46717);var n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var a=/\\(\\)?/g;var i=s(function(e){var t=[];if(e.charCodeAt(0)===46){t.push("")}e.replace(n,function(e,r,s,n){t.push(s?n.replace(a,"$1"):r||e)});return t});e.exports=i},30668:(e,t,r)=>{var s=r(82500);var n=1/0;function toKey(e){if(typeof e=="string"||s(e)){return e}var t=e+"";return t=="0"&&1/e==-n?"-0":t}e.exports=toKey},98241:e=>{var t=Function.prototype;var r=t.toString;function toSource(e){if(e!=null){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}e.exports=toSource},80573:(e,t,r)=>{var s=r(98415),n=r(78155),a=r(29841);var i=Math.ceil,o=Math.max;function chunk(e,t,r){if(r?n(e,t,r):t===undefined){t=1}else{t=o(a(t),0)}var l=e==null?0:e.length;if(!l||t<1){return[]}var u=0,c=0,p=Array(i(l/t));while(u{var s=r(95570);var n=4;function clone(e){return s(e,n)}e.exports=clone},60956:(e,t,r)=>{var s=r(95570);var n=1,a=4;function cloneDeep(e){return s(e,n|a)}e.exports=cloneDeep},66915:e=>{function constant(e){return function(){return e}}e.exports=constant},28650:e=>{function eq(e,t){return e===t||e!==e&&t!==t}e.exports=eq},76421:(e,t,r)=>{var s=r(49228);var n=/[\\^$.*+?()[\]{}|]/g,a=RegExp(n.source);function escapeRegExp(e){e=s(e);return e&&a.test(e)?e.replace(n,"\\$&"):e}e.exports=escapeRegExp},94484:(e,t,r)=>{var s=r(86685);function get(e,t,r){var n=e==null?undefined:s(e,t);return n===undefined?r:n}e.exports=get},58997:(e,t,r)=>{var s=r(59488),n=r(23144);function has(e,t){return e!=null&&n(e,t,s)}e.exports=has},14426:(e,t,r)=>{var s=r(56263),n=r(23144);function hasIn(e,t){return e!=null&&n(e,t,s)}e.exports=hasIn},57460:e=>{function identity(e){return e}e.exports=identity},24839:(e,t,r)=>{var s=r(77907),n=r(9111);var a=Object.prototype;var i=a.hasOwnProperty;var o=a.propertyIsEnumerable;var l=s(function(){return arguments}())?s:function(e){return n(e)&&i.call(e,"callee")&&!o.call(e,"callee")};e.exports=l},43364:e=>{var t=Array.isArray;e.exports=t},20577:(e,t,r)=>{var s=r(66827),n=r(55752);function isArrayLike(e){return e!=null&&n(e.length)&&!s(e)}e.exports=isArrayLike},12963:(e,t,r)=>{e=r.nmd(e);var s=r(562),n=r(90377);var a=true&&t&&!t.nodeType&&t;var i=a&&"object"=="object"&&e&&!e.nodeType&&e;var o=i&&i.exports===a;var l=o?s.Buffer:undefined;var u=l?l.isBuffer:undefined;var c=u||n;e.exports=c},66827:(e,t,r)=>{var s=r(98653),n=r(43420);var a="[object AsyncFunction]",i="[object Function]",o="[object GeneratorFunction]",l="[object Proxy]";function isFunction(e){if(!n(e)){return false}var t=s(e);return t==i||t==o||t==a||t==l}e.exports=isFunction},55752:e=>{var t=9007199254740991;function isLength(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=t}e.exports=isLength},13689:(e,t,r)=>{var s=r(81391),n=r(83717),a=r(62470);var i=a&&a.isMap;var o=i?n(i):s;e.exports=o},43420:e=>{function isObject(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}e.exports=isObject},9111:e=>{function isObjectLike(e){return e!=null&&typeof e=="object"}e.exports=isObjectLike},24788:(e,t,r)=>{var s=r(98653),n=r(63363),a=r(9111);var i="[object Object]";var o=Function.prototype,l=Object.prototype;var u=o.toString;var c=l.hasOwnProperty;var p=u.call(Object);function isPlainObject(e){if(!a(e)||s(e)!=i){return false}var t=n(e);if(t===null){return true}var r=c.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&u.call(r)==p}e.exports=isPlainObject},1370:(e,t,r)=>{var s=r(42542),n=r(83717),a=r(62470);var i=a&&a.isRegExp;var o=i?n(i):s;e.exports=o},81360:(e,t,r)=>{var s=r(19472),n=r(83717),a=r(62470);var i=a&&a.isSet;var o=i?n(i):s;e.exports=o},82500:(e,t,r)=>{var s=r(98653),n=r(9111);var a="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||n(e)&&s(e)==a}e.exports=isSymbol},53635:(e,t,r)=>{var s=r(86944),n=r(83717),a=r(62470);var i=a&&a.isTypedArray;var o=i?n(i):s;e.exports=o},50288:(e,t,r)=>{var s=r(63360),n=r(24787),a=r(20577);function keys(e){return a(e)?s(e):n(e)}e.exports=keys},86032:(e,t,r)=>{var s=r(63360),n=r(14535),a=r(20577);function keysIn(e){return a(e)?s(e,true):n(e)}e.exports=keysIn},89058:(e,t,r)=>{var s=r(16531);var n="Expected a function";function memoize(e,t){if(typeof e!="function"||t!=null&&typeof t!="function"){throw new TypeError(n)}var r=function(){var s=arguments,n=t?t.apply(this,s):s[0],a=r.cache;if(a.has(n)){return a.get(n)}var i=e.apply(this,s);r.cache=a.set(n,i)||a;return i};r.cache=new(memoize.Cache||s);return r}memoize.Cache=s;e.exports=memoize},60204:(e,t,r)=>{var s=r(18077),n=r(1666),a=r(20007),i=r(30668);function property(e){return a(e)?s(i(e)):n(e)}e.exports=property},39214:(e,t,r)=>{var s=r(31428),n=r(44675);var a=s(n);e.exports=a},44675:(e,t,r)=>{var s=r(60257);function pullAll(e,t){return e&&e.length&&t&&t.length?s(e,t):e}e.exports=pullAll},52169:(e,t,r)=>{var s=r(5765),n=r(18631),a=r(31428),i=r(78155);var o=a(function(e,t){if(e==null){return[]}var r=t.length;if(r>1&&i(e,t[0],t[1])){t=[]}else if(r>2&&i(t[0],t[1],t[2])){t=[t[0]]}return n(e,s(t,1),[])});e.exports=o},87632:e=>{function stubArray(){return[]}e.exports=stubArray},90377:e=>{function stubFalse(){return false}e.exports=stubFalse},67683:(e,t,r)=>{var s=r(98208);var n=1/0,a=1.7976931348623157e308;function toFinite(e){if(!e){return e===0?e:0}e=s(e);if(e===n||e===-n){var t=e<0?-1:1;return t*a}return e===e?e:0}e.exports=toFinite},29841:(e,t,r)=>{var s=r(67683);function toInteger(e){var t=s(e),r=t%1;return t===t?r?t-r:t:0}e.exports=toInteger},98208:(e,t,r)=>{var s=r(43420),n=r(82500);var a=0/0;var i=/^\s+|\s+$/g;var o=/^[-+]0x[0-9a-f]+$/i;var l=/^0b[01]+$/i;var u=/^0o[0-7]+$/i;var c=parseInt;function toNumber(e){if(typeof e=="number"){return e}if(n(e)){return a}if(s(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=s(t)?t+"":t}if(typeof e!="string"){return e===0?e:+e}e=e.replace(i,"");var r=l.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):o.test(e)?a:+e}e.exports=toNumber},49228:(e,t,r)=>{var s=r(74851);function toString(e){return e==null?"":s(e)}e.exports=toString},70495:(e,t)=>{"use strict";var r=Object;var s=Object.defineProperty;var n=Object.create;function defProp(e,t,n){if(s)try{s.call(r,e,t,{value:n})}catch(r){e[t]=n}else{e[t]=n}}function makeSafeToCall(e){if(e){defProp(e,"call",e.call);defProp(e,"apply",e.apply)}return e}makeSafeToCall(s);makeSafeToCall(n);var a=makeSafeToCall(Object.prototype.hasOwnProperty);var i=makeSafeToCall(Number.prototype.toString);var o=makeSafeToCall(String.prototype.slice);var l=function(){};function create(e){if(n){return n.call(r,e)}l.prototype=e||null;return new l}var u=Math.random;var c=create(null);function makeUniqueKey(){do{var e=internString(o.call(i.call(u(),36),2))}while(a.call(c,e));return c[e]=e}function internString(e){var t={};t[e]=true;return Object.keys(t)[0]}t.makeUniqueKey=makeUniqueKey;var p=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function getOwnPropertyNames(e){for(var t=p(e),r=0,s=0,n=t.length;rs){t[s]=t[r]}++s}}t.length=s;return t};function defaultCreatorFn(e){return create(null)}function makeAccessor(e){var t=makeUniqueKey();var r=create(null);e=e||defaultCreatorFn;function register(s){var n;function vault(t,a){if(t===r){return a?n=null:n||(n=e(s))}}defProp(s,t,vault)}function accessor(e){if(!a.call(e,t))register(e);return e[t](r)}accessor.forget=function(e){if(a.call(e,t))e[t](r,true)};return accessor}t.makeAccessor=makeAccessor},70696:function(e,t,r){e=r.nmd(e);(function(r){var s=true&&t;var n=true&&e&&e.exports==s&&e;var a=typeof global=="object"&&global;if(a.global===a||a.window===a){r=a}var i={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var o=55296;var l=56319;var u=56320;var c=57343;var p=/\\x00([^0123456789]|$)/g;var f={};var d=f.hasOwnProperty;var y=function(e,t){var r;for(r in t){if(d.call(t,r)){e[r]=t[r]}}return e};var h=function(e,t){var r=-1;var s=e.length;while(++r=s&&tr){return e}if(t<=n&&r>=a){e.splice(s,2);continue}if(t>=n&&r=n&&t<=a){e[s+1]=t}else if(r>=n&&r<=a){e[s]=r+1;return e}s+=2}return e};var w=function(e,t){var r=0;var s;var n;var a=null;var o=e.length;if(t<0||t>1114111){throw RangeError(i.codePointRange)}while(r=s&&tt){e.splice(a!=null?a+2:0,0,t,t+1);return e}if(t==n){if(t+1==e[r+2]){e.splice(r,4,s,e[r+3]);return e}e[r+1]=t+1;return e}a=r;r+=2}e.push(t,t+1);return e};var A=function(e,t){var r=0;var s;var n;var a=e.slice();var i=t.length;while(r1114111||r<0||r>1114111){throw RangeError(i.codePointRange)}var s=0;var n;var a;var o=false;var l=e.length;while(sr){return e}if(n>=t&&n<=r){if(a>t&&a-1<=r){e.splice(s,2);s-=2}else{e.splice(s-1,2);s-=2}}}else if(n==r+1){e[s]=t;return e}else if(n>r){e.splice(s,0,t,r+1);return e}else if(t>=n&&t=n&&t=a){e[s]=t;e[s+1]=r+1;o=true}s+=2}if(!o){e.push(t,r+1)}return e};var _=function(e,t){var r=0;var s=e.length;var n=e[r];var a=e[s-1];if(s>=2){if(ta){return false}}while(r=n&&t=40&&e<=43||e==46||e==47||e==63||e>=91&&e<=94||e>=123&&e<=125){t="\\"+L(e)}else if(e>=32&&e<=126){t=L(e)}else if(e<=255){t="\\x"+v(E(e),2)}else{t="\\u"+v(E(e),4)}return t};var q=function(e){if(e<=65535){return B(e)}return"\\u{"+e.toString(16).toUpperCase()+"}"};var W=function(e){var t=e.length;var r=e.charCodeAt(0);var s;if(r>=o&&r<=l&&t>1){s=e.charCodeAt(1);return(r-o)*1024+s-u+65536}return r};var U=function(e){var t="";var r=0;var s;var n;var a=e.length;if(k(e)){return B(e[0])}while(r=o&&p<=l){s.push(i,o);t.push(o,p+1)}if(p>=u&&p<=c){s.push(i,o);t.push(o,l+1);r.push(u,p+1)}if(p>c){s.push(i,o);t.push(o,l+1);r.push(u,c+1);if(p<=65535){s.push(c+1,p+1)}else{s.push(c+1,65535+1);n.push(65535+1,p+1)}}}else if(i>=o&&i<=l){if(p>=o&&p<=l){t.push(i,p+1)}if(p>=u&&p<=c){t.push(i,l+1);r.push(u,p+1)}if(p>c){t.push(i,l+1);r.push(u,c+1);if(p<=65535){s.push(c+1,p+1)}else{s.push(c+1,65535+1);n.push(65535+1,p+1)}}}else if(i>=u&&i<=c){if(p>=u&&p<=c){r.push(i,p+1)}if(p>c){r.push(i,c+1);if(p<=65535){s.push(c+1,p+1)}else{s.push(c+1,65535+1);n.push(65535+1,p+1)}}}else if(i>c&&i<=65535){if(p<=65535){s.push(i,p+1)}else{s.push(i,65535+1);n.push(65535+1,p+1)}}else{n.push(i,p+1)}a+=2}return{loneHighSurrogates:t,loneLowSurrogates:r,bmp:s,astral:n}};var $=function(e){var t=[];var r=[];var s=false;var n;var a;var i;var o;var l;var u;var c=-1;var p=e.length;while(++c1){e=T.call(arguments)}if(this instanceof X){this.data=[];return e?this.add(e):this}return(new X).add(e)};X.version="1.3.3";var z=X.prototype;y(z,{add:function(e){var t=this;if(e==null){return t}if(e instanceof X){t.data=A(t.data,e.data);return t}if(arguments.length>1){e=T.call(arguments)}if(g(e)){h(e,function(e){t.add(e)});return t}t.data=w(t.data,b(e)?e:W(e));return t},remove:function(e){var t=this;if(e==null){return t}if(e instanceof X){t.data=D(t.data,e.data);return t}if(arguments.length>1){e=T.call(arguments)}if(g(e)){h(e,function(e){t.remove(e)});return t}t.data=P(t.data,b(e)?e:W(e));return t},addRange:function(e,t){var r=this;r.data=O(r.data,b(e)?e:W(e),b(t)?t:W(t));return r},removeRange:function(e,t){var r=this;var s=b(e)?e:W(e);var n=b(t)?t:W(t);r.data=j(r.data,s,n);return r},intersection:function(e){var t=this;var r=e instanceof X?R(e.data):e;t.data=C(t.data,r);return t},contains:function(e){return _(this.data,b(e)?e:W(e))},clone:function(){var e=new X;e.data=this.data.slice(0);return e},toString:function(e){var t=Y(this.data,e?e.bmpOnly:false,e?e.hasUnicodeFlag:false);if(!t){return"[]"}return t.replace(p,"\\0$1")},toRegExp:function(e){var t=this.toString(e&&e.indexOf("u")!=-1?{hasUnicodeFlag:true}:null);return RegExp(t,e||"")},valueOf:function(){return R(this.data)}});z.toArray=z.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return X})}else if(s&&!s.nodeType){if(n){n.exports=X}else{s.regenerate=X}}else{r.regenerate=X}})(this)},32892:(e,t,r)=>{"use strict";var s=r(51675);var n=r(44388);var a=n(r(42357));var i=s(r(17870));var o=s(r(84336));var l=s(r(65781));var u=Object.prototype.hasOwnProperty;function Emitter(e){a["default"].ok(this instanceof Emitter);l.getTypes().assertIdentifier(e);this.nextTempId=0;this.contextId=e;this.listing=[];this.marked=[true];this.insertedLocs=new Set;this.finalLoc=this.loc();this.tryEntries=[];this.leapManager=new i.LeapManager(this)}var c=Emitter.prototype;t.Emitter=Emitter;c.loc=function(){var e=l.getTypes().numericLiteral(-1);this.insertedLocs.add(e);return e};c.getInsertedLocs=function(){return this.insertedLocs};c.getContextId=function(){return l.getTypes().clone(this.contextId)};c.mark=function(e){l.getTypes().assertLiteral(e);var t=this.listing.length;if(e.value===-1){e.value=t}else{a["default"].strictEqual(e.value,t)}this.marked[t]=true;return e};c.emit=function(e){var t=l.getTypes();if(t.isExpression(e)){e=t.expressionStatement(e)}t.assertStatement(e);this.listing.push(e)};c.emitAssign=function(e,t){this.emit(this.assign(e,t));return e};c.assign=function(e,t){var r=l.getTypes();return r.expressionStatement(r.assignmentExpression("=",r.cloneDeep(e),t))};c.contextProperty=function(e,t){var r=l.getTypes();return r.memberExpression(this.getContextId(),t?r.stringLiteral(e):r.identifier(e),!!t)};c.stop=function(e){if(e){this.setReturnValue(e)}this.jump(this.finalLoc)};c.setReturnValue=function(e){l.getTypes().assertExpression(e.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))};c.clearPendingException=function(e,t){var r=l.getTypes();r.assertLiteral(e);var s=r.callExpression(this.contextProperty("catch",true),[r.clone(e)]);if(t){this.emitAssign(t,s)}else{this.emit(s)}};c.jump=function(e){this.emitAssign(this.contextProperty("next"),e);this.emit(l.getTypes().breakStatement())};c.jumpIf=function(e,t){var r=l.getTypes();r.assertExpression(e);r.assertLiteral(t);this.emit(r.ifStatement(e,r.blockStatement([this.assign(this.contextProperty("next"),t),r.breakStatement()])))};c.jumpIfNot=function(e,t){var r=l.getTypes();r.assertExpression(e);r.assertLiteral(t);var s;if(r.isUnaryExpression(e)&&e.operator==="!"){s=e.argument}else{s=r.unaryExpression("!",e)}this.emit(r.ifStatement(s,r.blockStatement([this.assign(this.contextProperty("next"),t),r.breakStatement()])))};c.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)};c.getContextFunction=function(e){var t=l.getTypes();return t.functionExpression(e||null,[this.getContextId()],t.blockStatement([this.getDispatchLoop()]),false,false)};c.getDispatchLoop=function(){var e=this;var t=l.getTypes();var r=[];var s;var n=false;e.listing.forEach(function(a,i){if(e.marked.hasOwnProperty(i)){r.push(t.switchCase(t.numericLiteral(i),s=[]));n=false}if(!n){s.push(a);if(t.isCompletionStatement(a))n=true}});this.finalLoc.value=this.listing.length;r.push(t.switchCase(this.finalLoc,[]),t.switchCase(t.stringLiteral("end"),[t.returnStatement(t.callExpression(this.contextProperty("stop"),[]))]));return t.whileStatement(t.numericLiteral(1),t.switchStatement(t.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),r))};c.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var e=l.getTypes();var t=0;return e.arrayExpression(this.tryEntries.map(function(r){var s=r.firstLoc.value;a["default"].ok(s>=t,"try entries out of order");t=s;var n=r.catchEntry;var i=r.finallyEntry;var o=[r.firstLoc,n?n.firstLoc:null];if(i){o[2]=i.firstLoc;o[3]=i.afterLoc}return e.arrayExpression(o.map(function(t){return t&&e.clone(t)}))}))};c.explode=function(e,t){var r=l.getTypes();var s=e.node;var n=this;r.assertNode(s);if(r.isDeclaration(s))throw getDeclError(s);if(r.isStatement(s))return n.explodeStatement(e);if(r.isExpression(s))return n.explodeExpression(e,t);switch(s.type){case"Program":return e.get("body").map(n.explodeStatement,n);case"VariableDeclarator":throw getDeclError(s);case"Property":case"SwitchCase":case"CatchClause":throw new Error(s.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(s.type))}};function getDeclError(e){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(e))}c.explodeStatement=function(e,t){var r=l.getTypes();var s=e.node;var n=this;var u,c,f;r.assertStatement(s);if(t){r.assertIdentifier(t)}else{t=null}if(r.isBlockStatement(s)){e.get("body").forEach(function(e){n.explodeStatement(e)});return}if(!o.containsLeap(s)){n.emit(s);return}switch(s.type){case"ExpressionStatement":n.explodeExpression(e.get("expression"),true);break;case"LabeledStatement":c=this.loc();n.leapManager.withEntry(new i.LabeledEntry(c,s.label),function(){n.explodeStatement(e.get("body"),s.label)});n.mark(c);break;case"WhileStatement":u=this.loc();c=this.loc();n.mark(u);n.jumpIfNot(n.explodeExpression(e.get("test")),c);n.leapManager.withEntry(new i.LoopEntry(c,u,t),function(){n.explodeStatement(e.get("body"))});n.jump(u);n.mark(c);break;case"DoWhileStatement":var d=this.loc();var y=this.loc();c=this.loc();n.mark(d);n.leapManager.withEntry(new i.LoopEntry(c,y,t),function(){n.explode(e.get("body"))});n.mark(y);n.jumpIf(n.explodeExpression(e.get("test")),d);n.mark(c);break;case"ForStatement":f=this.loc();var h=this.loc();c=this.loc();if(s.init){n.explode(e.get("init"),true)}n.mark(f);if(s.test){n.jumpIfNot(n.explodeExpression(e.get("test")),c)}else{}n.leapManager.withEntry(new i.LoopEntry(c,h,t),function(){n.explodeStatement(e.get("body"))});n.mark(h);if(s.update){n.explode(e.get("update"),true)}n.jump(f);n.mark(c);break;case"TypeCastExpression":return n.explodeExpression(e.get("expression"));case"ForInStatement":f=this.loc();c=this.loc();var m=n.makeTempVar();n.emitAssign(m,r.callExpression(l.runtimeProperty("keys"),[n.explodeExpression(e.get("right"))]));n.mark(f);var g=n.makeTempVar();n.jumpIf(r.memberExpression(r.assignmentExpression("=",g,r.callExpression(r.cloneDeep(m),[])),r.identifier("done"),false),c);n.emitAssign(s.left,r.memberExpression(r.cloneDeep(g),r.identifier("value"),false));n.leapManager.withEntry(new i.LoopEntry(c,f,t),function(){n.explodeStatement(e.get("body"))});n.jump(f);n.mark(c);break;case"BreakStatement":n.emitAbruptCompletion({type:"break",target:n.leapManager.getBreakLoc(s.label)});break;case"ContinueStatement":n.emitAbruptCompletion({type:"continue",target:n.leapManager.getContinueLoc(s.label)});break;case"SwitchStatement":var b=n.emitAssign(n.makeTempVar(),n.explodeExpression(e.get("discriminant")));c=this.loc();var x=this.loc();var v=x;var E=[];var T=s.cases||[];for(var S=T.length-1;S>=0;--S){var P=T[S];r.assertSwitchCase(P);if(P.test){v=r.conditionalExpression(r.binaryExpression("===",r.cloneDeep(b),P.test),E[S]=this.loc(),v)}else{E[S]=x}}var j=e.get("discriminant");l.replaceWithOrRemove(j,v);n.jump(n.explodeExpression(j));n.leapManager.withEntry(new i.SwitchEntry(c),function(){e.get("cases").forEach(function(e){var t=e.key;n.mark(E[t]);e.get("consequent").forEach(function(e){n.explodeStatement(e)})})});n.mark(c);if(x.value===-1){n.mark(x);a["default"].strictEqual(c.value,x.value)}break;case"IfStatement":var w=s.alternate&&this.loc();c=this.loc();n.jumpIfNot(n.explodeExpression(e.get("test")),w||c);n.explodeStatement(e.get("consequent"));if(w){n.jump(c);n.mark(w);n.explodeStatement(e.get("alternate"))}n.mark(c);break;case"ReturnStatement":n.emitAbruptCompletion({type:"return",value:n.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":c=this.loc();var A=s.handler;var D=A&&this.loc();var O=D&&new i.CatchEntry(D,A.param);var _=s.finalizer&&this.loc();var C=_&&new i.FinallyEntry(_,c);var I=new i.TryEntry(n.getUnmarkedCurrentLoc(),O,C);n.tryEntries.push(I);n.updateContextPrevLoc(I.firstLoc);n.leapManager.withEntry(I,function(){n.explodeStatement(e.get("block"));if(D){if(_){n.jump(_)}else{n.jump(c)}n.updateContextPrevLoc(n.mark(D));var t=e.get("handler.body");var s=n.makeTempVar();n.clearPendingException(I.firstLoc,s);t.traverse(p,{getSafeParam:function getSafeParam(){return r.cloneDeep(s)},catchParamName:A.param.name});n.leapManager.withEntry(O,function(){n.explodeStatement(t)})}if(_){n.updateContextPrevLoc(n.mark(_));n.leapManager.withEntry(C,function(){n.explodeStatement(e.get("finalizer"))});n.emit(r.returnStatement(r.callExpression(n.contextProperty("finish"),[C.firstLoc])))}});n.mark(c);break;case"ThrowStatement":n.emit(r.throwStatement(n.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(s.type))}};var p={Identifier:function Identifier(e,t){if(e.node.name===t.catchParamName&&l.isReference(e)){l.replaceWithOrRemove(e,t.getSafeParam())}},Scope:function Scope(e,t){if(e.scope.hasOwnBinding(t.catchParamName)){e.skip()}}};c.emitAbruptCompletion=function(e){if(!isValidCompletion(e)){a["default"].ok(false,"invalid completion record: "+JSON.stringify(e))}a["default"].notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=l.getTypes();var r=[t.stringLiteral(e.type)];if(e.type==="break"||e.type==="continue"){t.assertLiteral(e.target);r[1]=this.insertedLocs.has(e.target)?e.target:t.cloneDeep(e.target)}else if(e.type==="return"||e.type==="throw"){if(e.value){t.assertExpression(e.value);r[1]=this.insertedLocs.has(e.value)?e.value:t.cloneDeep(e.value)}}this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"),r)))};function isValidCompletion(e){var t=e.type;if(t==="normal"){return!u.call(e,"target")}if(t==="break"||t==="continue"){return!u.call(e,"value")&&l.getTypes().isLiteral(e.target)}if(t==="return"||t==="throw"){return u.call(e,"value")&&!u.call(e,"target")}return false}c.getUnmarkedCurrentLoc=function(){return l.getTypes().numericLiteral(this.listing.length)};c.updateContextPrevLoc=function(e){var t=l.getTypes();if(e){t.assertLiteral(e);if(e.value===-1){e.value=this.listing.length}else{a["default"].strictEqual(e.value,this.listing.length)}}else{e=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),e)};c.explodeExpression=function(e,t){var r=l.getTypes();var s=e.node;if(s){r.assertExpression(s)}else{return s}var n=this;var i;var u;function finish(e){r.assertExpression(e);if(t){n.emit(e)}else{return e}}if(!o.containsLeap(s)){return finish(s)}var c=o.containsLeap.onlyChildren(s);function explodeViaTempVar(e,t,s){a["default"].ok(!s||!e,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var i=n.explodeExpression(t,s);if(s){}else if(e||c&&!r.isLiteral(i)){i=n.emitAssign(e||n.makeTempVar(),i)}return i}switch(s.type){case"MemberExpression":return finish(r.memberExpression(n.explodeExpression(e.get("object")),s.computed?explodeViaTempVar(null,e.get("property")):s.property,s.computed));case"CallExpression":var p=e.get("callee");var f=e.get("arguments");var d;var y;var h=f.some(function(e){return o.containsLeap(e.node)});var m=null;if(r.isMemberExpression(p.node)){if(h){var g=explodeViaTempVar(n.makeTempVar(),p.get("object"));var b=p.node.computed?explodeViaTempVar(null,p.get("property")):p.node.property;m=g;d=r.memberExpression(r.memberExpression(r.cloneDeep(g),b,p.node.computed),r.identifier("call"),false)}else{d=n.explodeExpression(p)}}else{d=explodeViaTempVar(null,p);if(r.isMemberExpression(d)){d=r.sequenceExpression([r.numericLiteral(0),r.cloneDeep(d)])}}if(h){y=f.map(function(e){return explodeViaTempVar(null,e)});if(m)y.unshift(m);y=y.map(function(e){return r.cloneDeep(e)})}else{y=e.node.arguments}return finish(r.callExpression(d,y));case"NewExpression":return finish(r.newExpression(explodeViaTempVar(null,e.get("callee")),e.get("arguments").map(function(e){return explodeViaTempVar(null,e)})));case"ObjectExpression":return finish(r.objectExpression(e.get("properties").map(function(e){if(e.isObjectProperty()){return r.objectProperty(e.node.key,explodeViaTempVar(null,e.get("value")),e.node.computed)}else{return e.node}})));case"ArrayExpression":return finish(r.arrayExpression(e.get("elements").map(function(e){if(e.isSpreadElement()){return r.spreadElement(explodeViaTempVar(null,e.get("argument")))}else{return explodeViaTempVar(null,e)}})));case"SequenceExpression":var x=s.expressions.length-1;e.get("expressions").forEach(function(e){if(e.key===x){i=n.explodeExpression(e,t)}else{n.explodeExpression(e,true)}});return i;case"LogicalExpression":u=this.loc();if(!t){i=n.makeTempVar()}var v=explodeViaTempVar(i,e.get("left"));if(s.operator==="&&"){n.jumpIfNot(v,u)}else{a["default"].strictEqual(s.operator,"||");n.jumpIf(v,u)}explodeViaTempVar(i,e.get("right"),t);n.mark(u);return i;case"ConditionalExpression":var E=this.loc();u=this.loc();var T=n.explodeExpression(e.get("test"));n.jumpIfNot(T,E);if(!t){i=n.makeTempVar()}explodeViaTempVar(i,e.get("consequent"),t);n.jump(u);n.mark(E);explodeViaTempVar(i,e.get("alternate"),t);n.mark(u);return i;case"UnaryExpression":return finish(r.unaryExpression(s.operator,n.explodeExpression(e.get("argument")),!!s.prefix));case"BinaryExpression":return finish(r.binaryExpression(s.operator,explodeViaTempVar(null,e.get("left")),explodeViaTempVar(null,e.get("right"))));case"AssignmentExpression":if(s.operator==="="){return finish(r.assignmentExpression(s.operator,n.explodeExpression(e.get("left")),n.explodeExpression(e.get("right"))))}var S=n.explodeExpression(e.get("left"));var P=n.emitAssign(n.makeTempVar(),S);return finish(r.assignmentExpression("=",r.cloneDeep(S),r.assignmentExpression(s.operator,r.cloneDeep(P),n.explodeExpression(e.get("right")))));case"UpdateExpression":return finish(r.updateExpression(s.operator,n.explodeExpression(e.get("argument")),s.prefix));case"YieldExpression":u=this.loc();var j=s.argument&&n.explodeExpression(e.get("argument"));if(j&&s.delegate){var w=n.makeTempVar();var A=r.returnStatement(r.callExpression(n.contextProperty("delegateYield"),[j,r.stringLiteral(w.property.name),u]));A.loc=s.loc;n.emit(A);n.mark(u);return w}n.emitAssign(n.contextProperty("next"),u);var D=r.returnStatement(r.cloneDeep(j)||null);D.loc=s.loc;n.emit(D);n.mark(u);return n.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(s.type))}}},1454:(e,t,r)=>{"use strict";var s=r(51675);var n=s(r(65781));var a=Object.prototype.hasOwnProperty;t.hoist=function(e){var t=n.getTypes();t.assertFunction(e.node);var r={};function varDeclToExpr(e,s){var n=e.node,a=e.scope;t.assertVariableDeclaration(n);var i=[];n.declarations.forEach(function(e){r[e.id.name]=t.identifier(e.id.name);a.removeBinding(e.id.name);if(e.init){i.push(t.assignmentExpression("=",e.id,e.init))}else if(s){i.push(e.id)}});if(i.length===0)return null;if(i.length===1)return i[0];return t.sequenceExpression(i)}e.get("body").traverse({VariableDeclaration:{exit:function exit(e){var r=varDeclToExpr(e,false);if(r===null){e.remove()}else{n.replaceWithOrRemove(e,t.expressionStatement(r))}e.skip()}},ForStatement:function ForStatement(e){var t=e.get("init");if(t.isVariableDeclaration()){n.replaceWithOrRemove(t,varDeclToExpr(t,false))}},ForXStatement:function ForXStatement(e){var t=e.get("left");if(t.isVariableDeclaration()){n.replaceWithOrRemove(t,varDeclToExpr(t,true))}},FunctionDeclaration:function FunctionDeclaration(e){var s=e.node;r[s.id.name]=s.id;var a=t.expressionStatement(t.assignmentExpression("=",t.clone(s.id),t.functionExpression(e.scope.generateUidIdentifierBasedOnNode(s),s.params,s.body,s.generator,s.expression)));if(e.parentPath.isBlockStatement()){e.parentPath.unshiftContainer("body",a);e.remove()}else{n.replaceWithOrRemove(e,a)}e.scope.removeBinding(s.id.name);e.skip()},FunctionExpression:function FunctionExpression(e){e.skip()},ArrowFunctionExpression:function ArrowFunctionExpression(e){e.skip()}});var s={};e.get("params").forEach(function(e){var r=e.node;if(t.isIdentifier(r)){s[r.name]=r}else{}});var i=[];Object.keys(r).forEach(function(e){if(!a.call(s,e)){i.push(t.variableDeclarator(r[e],null))}});if(i.length===0){return null}return t.variableDeclaration("var",i)}},60919:(e,t,r)=>{"use strict";t.__esModule=true;t.default=_default;var s=r(92980);function _default(e){var t={visitor:(0,s.getVisitor)(e)};var r=e&&e.version;if(r&&parseInt(r,10)>=7){t.name="regenerator-transform"}return t}},17870:(e,t,r)=>{"use strict";var s=r(44388);var n=s(r(42357));var a=r(32892);var i=r(31669);var o=r(65781);function Entry(){n["default"].ok(this instanceof Entry)}function FunctionEntry(e){Entry.call(this);(0,o.getTypes)().assertLiteral(e);this.returnLoc=e}(0,i.inherits)(FunctionEntry,Entry);t.FunctionEntry=FunctionEntry;function LoopEntry(e,t,r){Entry.call(this);var s=(0,o.getTypes)();s.assertLiteral(e);s.assertLiteral(t);if(r){s.assertIdentifier(r)}else{r=null}this.breakLoc=e;this.continueLoc=t;this.label=r}(0,i.inherits)(LoopEntry,Entry);t.LoopEntry=LoopEntry;function SwitchEntry(e){Entry.call(this);(0,o.getTypes)().assertLiteral(e);this.breakLoc=e}(0,i.inherits)(SwitchEntry,Entry);t.SwitchEntry=SwitchEntry;function TryEntry(e,t,r){Entry.call(this);var s=(0,o.getTypes)();s.assertLiteral(e);if(t){n["default"].ok(t instanceof CatchEntry)}else{t=null}if(r){n["default"].ok(r instanceof FinallyEntry)}else{r=null}n["default"].ok(t||r);this.firstLoc=e;this.catchEntry=t;this.finallyEntry=r}(0,i.inherits)(TryEntry,Entry);t.TryEntry=TryEntry;function CatchEntry(e,t){Entry.call(this);var r=(0,o.getTypes)();r.assertLiteral(e);r.assertIdentifier(t);this.firstLoc=e;this.paramId=t}(0,i.inherits)(CatchEntry,Entry);t.CatchEntry=CatchEntry;function FinallyEntry(e,t){Entry.call(this);var r=(0,o.getTypes)();r.assertLiteral(e);r.assertLiteral(t);this.firstLoc=e;this.afterLoc=t}(0,i.inherits)(FinallyEntry,Entry);t.FinallyEntry=FinallyEntry;function LabeledEntry(e,t){Entry.call(this);var r=(0,o.getTypes)();r.assertLiteral(e);r.assertIdentifier(t);this.breakLoc=e;this.label=t}(0,i.inherits)(LabeledEntry,Entry);t.LabeledEntry=LabeledEntry;function LeapManager(e){n["default"].ok(this instanceof LeapManager);n["default"].ok(e instanceof a.Emitter);this.emitter=e;this.entryStack=[new FunctionEntry(e.finalLoc)]}var l=LeapManager.prototype;t.LeapManager=LeapManager;l.withEntry=function(e,t){n["default"].ok(e instanceof Entry);this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();n["default"].strictEqual(r,e)}};l._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var s=this.entryStack[r];var n=s[e];if(n){if(t){if(s.label&&s.label.name===t.name){return n}}else if(s instanceof LabeledEntry){}else{return n}}}return null};l.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)};l.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},84336:(e,t,r)=>{"use strict";var s=r(44388);var n=s(r(42357));var a=r(65781);var i=r(70495);var o=(0,i.makeAccessor)();var l=Object.prototype.hasOwnProperty;function makePredicate(e,t){function onlyChildren(e){var t=(0,a.getTypes)();t.assertNode(e);var r=false;function check(e){if(r){}else if(Array.isArray(e)){e.some(check)}else if(t.isNode(e)){n["default"].strictEqual(r,false);r=predicate(e)}return r}var s=t.VISITOR_KEYS[e.type];if(s){for(var i=0;i{"use strict";var s=r(51675);t.__esModule=true;t.default=replaceShorthandObjectMethod;var n=s(r(65781));function replaceShorthandObjectMethod(e){var t=n.getTypes();if(!e.node||!t.isFunction(e.node)){throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.")}if(!t.isObjectMethod(e.node)){return e}if(!e.node.generator){return e}var r=e.node.params.map(function(e){return t.cloneDeep(e)});var s=t.functionExpression(null,r,t.cloneDeep(e.node.body),e.node.generator,e.node.async);n.replaceWithOrRemove(e,t.objectProperty(t.cloneDeep(e.node.key),s,e.node.computed,false));return e.get("value")}},65781:(e,t)=>{"use strict";t.__esModule=true;t.wrapWithTypes=wrapWithTypes;t.getTypes=getTypes;t.runtimeProperty=runtimeProperty;t.isReference=isReference;t.replaceWithOrRemove=replaceWithOrRemove;var r=null;function wrapWithTypes(e,t){return function(){var s=r;r=e;try{for(var n=arguments.length,a=new Array(n),i=0;i{"use strict";var s=r(51675);var n=r(44388);var a=n(r(42357));var i=r(1454);var o=r(32892);var l=n(r(56367));var u=s(r(65781));var c=r(70495);t.getVisitor=function(e){var t=e.types;return{Method:function Method(e,r){var s=e.node;if(!shouldRegenerate(s,r))return;var n=t.functionExpression(null,[],t.cloneNode(s.body,false),s.generator,s.async);e.get("body").set("body",[t.returnStatement(t.callExpression(n,[]))]);s.async=false;s.generator=false;e.get("body.body.0.argument.callee").unwrapFunctionEnvironment()},Function:{exit:u.wrapWithTypes(t,function(e,r){var s=e.node;if(!shouldRegenerate(s,r))return;e=(0,l["default"])(e);s=e.node;var n=e.scope.generateUidIdentifier("context");var a=e.scope.generateUidIdentifier("args");e.ensureBlock();var c=e.get("body");if(s.async){c.traverse(y)}c.traverse(d,{context:n});var p=[];var h=[];c.get("body").forEach(function(e){var r=e.node;if(t.isExpressionStatement(r)&&t.isStringLiteral(r.expression)){p.push(r)}else if(r&&r._blockHoist!=null){p.push(r)}else{h.push(r)}});if(p.length>0){c.node.body=h}var m=getOuterFnExpr(e);t.assertIdentifier(s.id);var g=t.identifier(s.id.name+"$");var b=(0,i.hoist)(e);var x={usesThis:false,usesArguments:false,getArgsId:function getArgsId(){return t.clone(a)}};e.traverse(f,x);if(x.usesArguments){b=b||t.variableDeclaration("var",[]);b.declarations.push(t.variableDeclarator(t.clone(a),t.identifier("arguments")))}var v=new o.Emitter(n);v.explode(e.get("body"));if(b&&b.declarations.length>0){p.push(b)}var E=[v.getContextFunction(g)];var T=v.getTryLocsList();if(s.generator){E.push(m)}else if(x.usesThis||T||s.async){E.push(t.nullLiteral())}if(x.usesThis){E.push(t.thisExpression())}else if(T||s.async){E.push(t.nullLiteral())}if(T){E.push(T)}else if(s.async){E.push(t.nullLiteral())}if(s.async){var S=e.scope;do{if(S.hasOwnBinding("Promise"))S.rename("Promise")}while(S=S.parent);E.push(t.identifier("Promise"))}var P=t.callExpression(u.runtimeProperty(s.async?"async":"wrap"),E);p.push(t.returnStatement(P));s.body=t.blockStatement(p);e.get("body.body").forEach(function(e){return e.scope.registerDeclaration(e)});var j=c.node.directives;if(j){s.body.directives=j}var w=s.generator;if(w){s.generator=false}if(s.async){s.async=false}if(w&&t.isExpression(s)){u.replaceWithOrRemove(e,t.callExpression(u.runtimeProperty("mark"),[s]));e.addComment("leading","#__PURE__")}var A=v.getInsertedLocs();e.traverse({NumericLiteral:function NumericLiteral(e){if(!A.has(e.node)){return}e.replaceWith(t.numericLiteral(e.node.value))}});e.requeue()})}}};function shouldRegenerate(e,t){if(e.generator){if(e.async){return t.opts.asyncGenerators!==false}else{return t.opts.generators!==false}}else if(e.async){return t.opts.async!==false}else{return false}}function getOuterFnExpr(e){var t=u.getTypes();var r=e.node;t.assertFunction(r);if(!r.id){r.id=e.scope.parent.generateUidIdentifier("callee")}if(r.generator&&t.isFunctionDeclaration(r)){return getMarkedFunctionId(e)}return t.clone(r.id)}var p=(0,c.makeAccessor)();function getMarkedFunctionId(e){var t=u.getTypes();var r=e.node;t.assertIdentifier(r.id);var s=e.findParent(function(e){return e.isProgram()||e.isBlockStatement()});if(!s){return r.id}var n=s.node;a["default"].ok(Array.isArray(n.body));var i=p(n);if(!i.decl){i.decl=t.variableDeclaration("var",[]);s.unshiftContainer("body",i.decl);i.declPath=s.get("body.0")}a["default"].strictEqual(i.declPath.node,i.decl);var o=s.scope.generateUidIdentifier("marked");var l=t.callExpression(u.runtimeProperty("mark"),[t.clone(r.id)]);var c=i.decl.declarations.push(t.variableDeclarator(o,l))-1;var f=i.declPath.get("declarations."+c+".init");a["default"].strictEqual(f.node,l);f.addComment("leading","#__PURE__");return t.clone(o)}var f={"FunctionExpression|FunctionDeclaration|Method":function FunctionExpressionFunctionDeclarationMethod(e){e.skip()},Identifier:function Identifier(e,t){if(e.node.name==="arguments"&&u.isReference(e)){u.replaceWithOrRemove(e,t.getArgsId());t.usesArguments=true}},ThisExpression:function ThisExpression(e,t){t.usesThis=true}};var d={MetaProperty:function MetaProperty(e){var t=e.node;if(t.meta.name==="function"&&t.property.name==="sent"){var r=u.getTypes();u.replaceWithOrRemove(e,r.memberExpression(r.clone(this.context),r.identifier("_sent")))}}};var y={Function:function Function(e){e.skip()},AwaitExpression:function AwaitExpression(e){var t=u.getTypes();var r=e.node.argument;u.replaceWithOrRemove(e,t.yieldExpression(t.callExpression(u.runtimeProperty("awrap"),[r]),false))}}},80035:e=>{"use strict";let t=null;function FastObject(e){if(t!==null&&typeof t.property){const e=t;t=FastObject.prototype=null;return e}t=FastObject.prototype=e==null?Object.create(null):e;return new FastObject}FastObject();e.exports=function toFastproperties(e){return FastObject(e)}},68783:e=>{e.exports=new Set(["General_Category","Script","Script_Extensions","Alphabetic","Any","ASCII","ASCII_Hex_Digit","Assigned","Bidi_Control","Bidi_Mirrored","Case_Ignorable","Cased","Changes_When_Casefolded","Changes_When_Casemapped","Changes_When_Lowercased","Changes_When_NFKC_Casefolded","Changes_When_Titlecased","Changes_When_Uppercased","Dash","Default_Ignorable_Code_Point","Deprecated","Diacritic","Emoji","Emoji_Component","Emoji_Modifier","Emoji_Modifier_Base","Emoji_Presentation","Extended_Pictographic","Extender","Grapheme_Base","Grapheme_Extend","Hex_Digit","ID_Continue","ID_Start","Ideographic","IDS_Binary_Operator","IDS_Trinary_Operator","Join_Control","Logical_Order_Exception","Lowercase","Math","Noncharacter_Code_Point","Pattern_Syntax","Pattern_White_Space","Quotation_Mark","Radical","Regional_Indicator","Sentence_Terminal","Soft_Dotted","Terminal_Punctuation","Unified_Ideograph","Uppercase","Variation_Selector","White_Space","XID_Continue","XID_Start"])},89755:(e,t,r)=>{"use strict";const s=r(68783);const n=r(71047);const a=function(e){if(s.has(e)){return e}if(n.has(e)){return n.get(e)}throw new Error(`Unknown property: ${e}`)};e.exports=a},36104:e=>{e.exports=new Map([["General_Category",new Map([["C","Other"],["Cc","Control"],["cntrl","Control"],["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","Mark"],["Mc","Spacing_Mark"],["Me","Enclosing_Mark"],["Mn","Nonspacing_Mark"],["N","Number"],["Nd","Decimal_Number"],["digit","Decimal_Number"],["Nl","Letter_Number"],["No","Other_Number"],["P","Punctuation"],["punct","Punctuation"],["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"],["Other","Other"],["Control","Control"],["Format","Format"],["Unassigned","Unassigned"],["Private_Use","Private_Use"],["Surrogate","Surrogate"],["Letter","Letter"],["Cased_Letter","Cased_Letter"],["Lowercase_Letter","Lowercase_Letter"],["Modifier_Letter","Modifier_Letter"],["Other_Letter","Other_Letter"],["Titlecase_Letter","Titlecase_Letter"],["Uppercase_Letter","Uppercase_Letter"],["Mark","Mark"],["Spacing_Mark","Spacing_Mark"],["Enclosing_Mark","Enclosing_Mark"],["Nonspacing_Mark","Nonspacing_Mark"],["Number","Number"],["Decimal_Number","Decimal_Number"],["Letter_Number","Letter_Number"],["Other_Number","Other_Number"],["Punctuation","Punctuation"],["Connector_Punctuation","Connector_Punctuation"],["Dash_Punctuation","Dash_Punctuation"],["Close_Punctuation","Close_Punctuation"],["Final_Punctuation","Final_Punctuation"],["Initial_Punctuation","Initial_Punctuation"],["Other_Punctuation","Other_Punctuation"],["Open_Punctuation","Open_Punctuation"],["Symbol","Symbol"],["Currency_Symbol","Currency_Symbol"],["Modifier_Symbol","Modifier_Symbol"],["Math_Symbol","Math_Symbol"],["Other_Symbol","Other_Symbol"],["Separator","Separator"],["Line_Separator","Line_Separator"],["Paragraph_Separator","Paragraph_Separator"],["Space_Separator","Space_Separator"]])],["Script",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","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","Cham"],["Cher","Cherokee"],["Chrs","Chorasmian"],["Copt","Coptic"],["Qaac","Coptic"],["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"],["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","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","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Nand","Nandinagari"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["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","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Wcho","Wancho"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yezi","Yezidi"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Chorasmian","Chorasmian"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dives_Akuru","Dives_Akuru"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Elymaic","Elymaic"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Nyiakeng_Puachue_Hmong","Nyiakeng_Puachue_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Khitan_Small_Script","Khitan_Small_Script"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Nandinagari","Nandinagari"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Wancho","Wancho"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yezidi","Yezidi"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])],["Script_Extensions",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","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","Cham"],["Cher","Cherokee"],["Chrs","Chorasmian"],["Copt","Coptic"],["Qaac","Coptic"],["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"],["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","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","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Nand","Nandinagari"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["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","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Wcho","Wancho"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yezi","Yezidi"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Chorasmian","Chorasmian"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dives_Akuru","Dives_Akuru"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Elymaic","Elymaic"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Nyiakeng_Puachue_Hmong","Nyiakeng_Puachue_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Khitan_Small_Script","Khitan_Small_Script"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Nandinagari","Nandinagari"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Wancho","Wancho"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yezidi","Yezidi"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])]])},67621:(e,t,r)=>{"use strict";const s=r(36104);const n=function(e,t){const r=s.get(e);if(!r){throw new Error(`Unknown property \`${e}\`.`)}const n=r.get(t);if(n){return n}throw new Error(`Unknown value \`${t}\` for property \`${e}\`.`)};e.exports=n},71047:e=>{e.exports=new Map([["scx","Script_Extensions"],["sc","Script"],["gc","General_Category"],["AHex","ASCII_Hex_Digit"],["Alpha","Alphabetic"],["Bidi_C","Bidi_Control"],["Bidi_M","Bidi_Mirrored"],["Cased","Cased"],["CI","Case_Ignorable"],["CWCF","Changes_When_Casefolded"],["CWCM","Changes_When_Casemapped"],["CWKCF","Changes_When_NFKC_Casefolded"],["CWL","Changes_When_Lowercased"],["CWT","Changes_When_Titlecased"],["CWU","Changes_When_Uppercased"],["Dash","Dash"],["Dep","Deprecated"],["DI","Default_Ignorable_Code_Point"],["Dia","Diacritic"],["Ext","Extender"],["Gr_Base","Grapheme_Base"],["Gr_Ext","Grapheme_Extend"],["Hex","Hex_Digit"],["IDC","ID_Continue"],["Ideo","Ideographic"],["IDS","ID_Start"],["IDSB","IDS_Binary_Operator"],["IDST","IDS_Trinary_Operator"],["Join_C","Join_Control"],["LOE","Logical_Order_Exception"],["Lower","Lowercase"],["Math","Math"],["NChar","Noncharacter_Code_Point"],["Pat_Syn","Pattern_Syntax"],["Pat_WS","Pattern_White_Space"],["QMark","Quotation_Mark"],["Radical","Radical"],["RI","Regional_Indicator"],["SD","Soft_Dotted"],["STerm","Sentence_Terminal"],["Term","Terminal_Punctuation"],["UIdeo","Unified_Ideograph"],["Upper","Uppercase"],["VS","Variation_Selector"],["WSpace","White_Space"],["space","White_Space"],["XIDC","XID_Continue"],["XIDS","XID_Start"]])},47352:(e,t,r)=>{function codeFrame(){return r(36553)}function core(){return r(85850)}function pluginProposalClassProperties(){return r(53447)}function pluginProposalExportNamespaceFrom(){return r(78562)}function pluginProposalNumericSeparator(){return r(17788)}function pluginProposalObjectRestSpread(){return r(15654)}function pluginSyntaxBigint(){return r(84176)}function pluginSyntaxDynamicImport(){return r(57640)}function pluginSyntaxJsx(){return r(89518)}function pluginTransformModulesCommonjs(){return r(68749)}function pluginTransformRuntime(){return r(65626)}function presetEnv(){return r(92553)}function presetReact(){return r(9064)}function presetTypescript(){return r(39293)}e.exports={codeFrame:codeFrame,core:core,pluginProposalClassProperties:pluginProposalClassProperties,pluginProposalExportNamespaceFrom:pluginProposalExportNamespaceFrom,pluginProposalNumericSeparator:pluginProposalNumericSeparator,pluginProposalObjectRestSpread:pluginProposalObjectRestSpread,pluginSyntaxBigint:pluginSyntaxBigint,pluginSyntaxDynamicImport:pluginSyntaxDynamicImport,pluginSyntaxJsx:pluginSyntaxJsx,pluginTransformModulesCommonjs:pluginTransformModulesCommonjs,pluginTransformRuntime:pluginTransformRuntime,presetEnv:presetEnv,presetReact:presetReact,presetTypescript:presetTypescript}},42357:e=>{"use strict";e.exports=require("assert")},3561:e=>{"use strict";e.exports=require("browserslist")},64293:e=>{"use strict";e.exports=require("buffer")},72242:e=>{"use strict";e.exports=require("chalk")},35747:e=>{"use strict";e.exports=require("fs")},32282:e=>{"use strict";e.exports=require("module")},31185:e=>{"use strict";e.exports=require("next/dist/compiled/debug")},33170:e=>{"use strict";e.exports=require("next/dist/compiled/json5")},62519:e=>{"use strict";e.exports=require("next/dist/compiled/semver")},96241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},85622:e=>{"use strict";e.exports=require("path")},78835:e=>{"use strict";e.exports=require("url")},31669:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var s=t[r]={id:r,loaded:false,exports:{}};var n=true;try{e[r].call(s.exports,s,s.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}s.loaded=true;return s.exports}(()=>{__nccwpck_require__.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t))})();(()=>{__nccwpck_require__.nmd=(e=>{e.paths=[];if(!e.children)e.children=[];return e})})();__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(47352)})(); \ No newline at end of file diff --git a/packages/next/compiled/cacache/index.js b/packages/next/compiled/cacache/index.js index 0253ae0de0b8bb5..481b943dd1280cc 100644 --- a/packages/next/compiled/cacache/index.js +++ b/packages/next/compiled/cacache/index.js @@ -1 +1 @@ -module.exports=(()=>{var __webpack_modules__={3485:(t,e,r)=>{const{dirname:n}=r(5622);const{promisify:i}=r(1669);const{access:s,accessSync:o,copyFile:a,copyFileSync:c,unlink:u,unlinkSync:l,rename:f,renameSync:h}=r(5747);const p=i(s);const d=i(a);const y=i(u);const v=i(f);const m=r(7424);const g=async t=>{try{await p(t);return true}catch(t){return t.code!=="ENOENT"}};const _=t=>{try{o(t);return true}catch(t){return t.code!=="ENOENT"}};t.exports=(async(t,e,r={})=>{if(!t||!e){throw new TypeError("`source` and `destination` file required")}r={overwrite:true,...r};if(!r.overwrite&&await g(e)){throw new Error(`The destination file exists: ${e}`)}await m(n(e));try{await v(t,e)}catch(r){if(r.code==="EXDEV"){await d(t,e);await y(t)}else{throw r}}});t.exports.sync=((t,e,r={})=>{if(!t||!e){throw new TypeError("`source` and `destination` file required")}r={overwrite:true,...r};if(!r.overwrite&&_(e)){throw new Error(`The destination file exists: ${e}`)}m.sync(n(e));try{h(t,e)}catch(r){if(r.code==="EXDEV"){c(t,e);l(t)}else{throw r}}})},7424:(t,e,r)=>{const n=r(3430);const i=r(8693);const{mkdirpNative:s,mkdirpNativeSync:o}=r(9863);const{mkdirpManual:a,mkdirpManualSync:c}=r(4906);const{useNative:u,useNativeSync:l}=r(7721);const f=(t,e)=>{t=i(t);e=n(e);return u(e)?s(t,e):a(t,e)};const h=(t,e)=>{t=i(t);e=n(e);return l(e)?o(t,e):c(t,e)};f.sync=h;f.native=((t,e)=>s(i(t),n(e)));f.manual=((t,e)=>a(i(t),n(e)));f.nativeSync=((t,e)=>o(i(t),n(e)));f.manualSync=((t,e)=>c(i(t),n(e)));t.exports=f},7496:(t,e,r)=>{const{dirname:n}=r(5622);const i=(t,e,r=undefined)=>{if(r===e)return Promise.resolve();return t.statAsync(e).then(t=>t.isDirectory()?r:undefined,r=>r.code==="ENOENT"?i(t,n(e),e):undefined)};const s=(t,e,r=undefined)=>{if(r===e)return undefined;try{return t.statSync(e).isDirectory()?r:undefined}catch(r){return r.code==="ENOENT"?s(t,n(e),e):undefined}};t.exports={findMade:i,findMadeSync:s}},4906:(t,e,r)=>{const{dirname:n}=r(5622);const i=(t,e,r)=>{e.recursive=false;const s=n(t);if(s===t){return e.mkdirAsync(t,e).catch(t=>{if(t.code!=="EISDIR")throw t})}return e.mkdirAsync(t,e).then(()=>r||t,n=>{if(n.code==="ENOENT")return i(s,e).then(r=>i(t,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return e.statAsync(t).then(t=>{if(t.isDirectory())return r;else throw n},()=>{throw n})})};const s=(t,e,r)=>{const i=n(t);e.recursive=false;if(i===t){try{return e.mkdirSync(t,e)}catch(t){if(t.code!=="EISDIR")throw t;else return}}try{e.mkdirSync(t,e);return r||t}catch(n){if(n.code==="ENOENT")return s(t,e,s(i,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!e.statSync(t).isDirectory())throw n}catch(t){throw n}}};t.exports={mkdirpManual:i,mkdirpManualSync:s}},9863:(t,e,r)=>{const{dirname:n}=r(5622);const{findMade:i,findMadeSync:s}=r(7496);const{mkdirpManual:o,mkdirpManualSync:a}=r(4906);const c=(t,e)=>{e.recursive=true;const r=n(t);if(r===t)return e.mkdirAsync(t,e);return i(e,t).then(r=>e.mkdirAsync(t,e).then(()=>r).catch(r=>{if(r.code==="ENOENT")return o(t,e);else throw r}))};const u=(t,e)=>{e.recursive=true;const r=n(t);if(r===t)return e.mkdirSync(t,e);const i=s(e,t);try{e.mkdirSync(t,e);return i}catch(r){if(r.code==="ENOENT")return a(t,e);else throw r}};t.exports={mkdirpNative:c,mkdirpNativeSync:u}},3430:(t,e,r)=>{const{promisify:n}=r(1669);const i=r(5747);const s=t=>{if(!t)t={mode:511,fs:i};else if(typeof t==="object")t={mode:511,fs:i,...t};else if(typeof t==="number")t={mode:t,fs:i};else if(typeof t==="string")t={mode:parseInt(t,8),fs:i};else throw new TypeError("invalid options argument");t.mkdir=t.mkdir||t.fs.mkdir||i.mkdir;t.mkdirAsync=n(t.mkdir);t.stat=t.stat||t.fs.stat||i.stat;t.statAsync=n(t.stat);t.statSync=t.statSync||t.fs.statSync||i.statSync;t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||i.mkdirSync;return t};t.exports=s},8693:(t,e,r)=>{const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:i,parse:s}=r(5622);const o=t=>{if(/\0/.test(t)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"})}t=i(t);if(n==="win32"){const e=/[*|"<>?:]/;const{root:r}=s(t);if(e.test(t.substr(r.length))){throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}}return t};t.exports=o},7721:(t,e,r)=>{const n=r(5747);const i=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const s=i.replace(/^v/,"").split(".");const o=+s[0]>10||+s[0]===10&&+s[1]>=12;const a=!o?()=>false:t=>t.mkdir===n.mkdir;const c=!o?()=>false:t=>t.mkdirSync===n.mkdirSync;t.exports={useNative:a,useNativeSync:c}},464:(t,e,r)=>{"use strict";const n=r(6342);const i=r(9616);const s=t=>t.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"");class AggregateError extends Error{constructor(t){if(!Array.isArray(t)){throw new TypeError(`Expected input to be an Array, got ${typeof t}`)}t=[...t].map(t=>{if(t instanceof Error){return t}if(t!==null&&typeof t==="object"){return Object.assign(new Error(t.message),t)}return new Error(t)});let e=t.map(t=>{return typeof t.stack==="string"?s(i(t.stack)):String(t)}).join("\n");e="\n"+n(e,4);super(e);this.name="AggregateError";Object.defineProperty(this,"_errors",{value:t})}*[Symbol.iterator](){for(const t of this._errors){yield t}}}t.exports=AggregateError},6342:t=>{"use strict";t.exports=((t,e=1,r)=>{r={indent:" ",includeEmptyLines:false,...r};if(typeof t!=="string"){throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``)}if(typeof e!=="number"){throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``)}if(typeof r.indent!=="string"){throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``)}if(e===0){return t}const n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))})},587:t=>{"use strict";t.exports=balanced;function balanced(t,e,r){if(t instanceof RegExp)t=maybeMatch(t,r);if(e instanceof RegExp)e=maybeMatch(e,r);var n=range(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function maybeMatch(t,e){var r=e.match(t);return r?r[0]:null}balanced.range=range;function range(t,e,r){var n,i,s,o,a;var c=r.indexOf(t);var u=r.indexOf(e,c+1);var l=c;if(c>=0&&u>0){n=[];s=r.length;while(l>=0&&!a){if(l==c){n.push(l);c=r.indexOf(t,l+1)}else if(n.length==1){a=[n.pop(),u]}else{i=n.pop();if(i=0?c:u}if(n.length){a=[s,o]}}return a}},5801:t=>{"use strict";t.exports=function(t){var e=t._SomePromiseArray;function any(t){var r=new e(t);var n=r.promise();r.setHowMany(1);r.setUnwrap();r.init();return n}t.any=function(t){return any(t)};t.prototype.any=function(){return any(this)}}},9952:(t,e,r)=>{"use strict";var n;try{throw new Error}catch(t){n=t}var i=r(7254);var s=r(3172);function Async(){this._customScheduler=false;this._isTickUsed=false;this._lateQueue=new s(16);this._normalQueue=new s(16);this._haveDrainedQueues=false;var t=this;this.drainQueues=function(){t._drainQueues()};this._schedule=i}Async.prototype.setScheduler=function(t){var e=this._schedule;this._schedule=t;this._customScheduler=true;return e};Async.prototype.hasCustomScheduler=function(){return this._customScheduler};Async.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};Async.prototype.fatalError=function(t,e){if(e){process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n");process.exit(2)}else{this.throwLater(t)}};Async.prototype.throwLater=function(t,e){if(arguments.length===1){e=t;t=function(){throw e}}if(typeof setTimeout!=="undefined"){setTimeout(function(){t(e)},0)}else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}};function AsyncInvokeLater(t,e,r){this._lateQueue.push(t,e,r);this._queueTick()}function AsyncInvoke(t,e,r){this._normalQueue.push(t,e,r);this._queueTick()}function AsyncSettlePromises(t){this._normalQueue._pushOne(t);this._queueTick()}Async.prototype.invokeLater=AsyncInvokeLater;Async.prototype.invoke=AsyncInvoke;Async.prototype.settlePromises=AsyncSettlePromises;function _drainQueue(t){while(t.length()>0){_drainQueueStep(t)}}function _drainQueueStep(t){var e=t.shift();if(typeof e!=="function"){e._settlePromises()}else{var r=t.shift();var n=t.shift();e.call(r,n)}}Async.prototype._drainQueues=function(){_drainQueue(this._normalQueue);this._reset();this._haveDrainedQueues=true;_drainQueue(this._lateQueue)};Async.prototype._queueTick=function(){if(!this._isTickUsed){this._isTickUsed=true;this._schedule(this.drainQueues)}};Async.prototype._reset=function(){this._isTickUsed=false};t.exports=Async;t.exports.firstLineError=n},1273:t=>{"use strict";t.exports=function(t,e,r,n){var i=false;var s=function(t,e){this._reject(e)};var o=function(t,e){e.promiseRejectionQueued=true;e.bindingPromise._then(s,s,null,this,t)};var a=function(t,e){if((this._bitField&50397184)===0){this._resolveCallback(e.target)}};var c=function(t,e){if(!e.promiseRejectionQueued)this._reject(t)};t.prototype.bind=function(s){if(!i){i=true;t.prototype._propagateFrom=n.propagateFromFunction();t.prototype._boundValue=n.boundValueFunction()}var u=r(s);var l=new t(e);l._propagateFrom(this,1);var f=this._target();l._setBoundTo(u);if(u instanceof t){var h={promiseRejectionQueued:false,promise:l,target:f,bindingPromise:u};f._then(e,o,undefined,l,h);u._then(a,c,undefined,l,h);l._setOnCancel(u)}else{l._resolveCallback(f)}return l};t.prototype._setBoundTo=function(t){if(t!==undefined){this._bitField=this._bitField|2097152;this._boundTo=t}else{this._bitField=this._bitField&~2097152}};t.prototype._isBound=function(){return(this._bitField&2097152)===2097152};t.bind=function(e,r){return t.resolve(r).bind(e)}}},5229:(t,e,r)=>{"use strict";var n;if(typeof Promise!=="undefined")n=Promise;function noConflict(){try{if(Promise===i)Promise=n}catch(t){}return i}var i=r(5175)();i.noConflict=noConflict;t.exports=i},8779:(t,e,r)=>{"use strict";var n=Object.create;if(n){var i=n(null);var s=n(null);i[" size"]=s[" size"]=0}t.exports=function(t){var e=r(6587);var n=e.canEvaluate;var o=e.isIdentifier;var a;var c;if(true){var u=function(t){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,t))(ensureMethod)};var l=function(t){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",t))};var f=function(t,e,r){var n=r[t];if(typeof n!=="function"){if(!o(t)){return null}n=e(t);r[t]=n;r[" size"]++;if(r[" size"]>512){var i=Object.keys(r);for(var s=0;s<256;++s)delete r[i[s]];r[" size"]=i.length-256}}return n};a=function(t){return f(t,u,i)};c=function(t){return f(t,l,s)}}function ensureMethod(r,n){var i;if(r!=null)i=r[n];if(typeof i!=="function"){var s="Object "+e.classString(r)+" has no method '"+e.toString(n)+"'";throw new t.TypeError(s)}return i}function caller(t){var e=this.pop();var r=ensureMethod(t,e);return r.apply(t,this)}t.prototype.call=function(t){var e=arguments.length;var r=new Array(Math.max(e-1,0));for(var i=1;i{"use strict";t.exports=function(t,e,n,i){var s=r(6587);var o=s.tryCatch;var a=s.errorObj;var c=t._async;t.prototype["break"]=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");var t=this;var e=t;while(t._isCancellable()){if(!t._cancelBy(e)){if(e._isFollowing()){e._followee().cancel()}else{e._cancelBranched()}break}var r=t._cancellationParent;if(r==null||!r._isCancellable()){if(t._isFollowing()){t._followee().cancel()}else{t._cancelBranched()}break}else{if(t._isFollowing())t._followee().cancel();t._setWillBeCancelled();e=t;t=r}}};t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--};t.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===undefined||this._branchesRemainingToCancel<=0};t.prototype._cancelBy=function(t){if(t===this){this._branchesRemainingToCancel=0;this._invokeOnCancel();return true}else{this._branchHasCancelled();if(this._enoughBranchesHaveCancelled()){this._invokeOnCancel();return true}}return false};t.prototype._cancelBranched=function(){if(this._enoughBranchesHaveCancelled()){this._cancel()}};t.prototype._cancel=function(){if(!this._isCancellable())return;this._setCancelled();c.invoke(this._cancelPromises,this,undefined)};t.prototype._cancelPromises=function(){if(this._length()>0)this._settlePromises()};t.prototype._unsetOnCancel=function(){this._onCancelField=undefined};t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()};t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()};t.prototype._doInvokeOnCancel=function(t,e){if(s.isArray(t)){for(var r=0;r{"use strict";t.exports=function(t){var e=r(6587);var n=r(9048).keys;var i=e.tryCatch;var s=e.errorObj;function catchFilter(r,o,a){return function(c){var u=a._boundValue();t:for(var l=0;l{"use strict";t.exports=function(t){var e=false;var r=[];t.prototype._promiseCreated=function(){};t.prototype._pushContext=function(){};t.prototype._popContext=function(){return null};t._peekContext=t.prototype._peekContext=function(){};function Context(){this._trace=new Context.CapturedTrace(peekContext())}Context.prototype._pushContext=function(){if(this._trace!==undefined){this._trace._promiseCreated=null;r.push(this._trace)}};Context.prototype._popContext=function(){if(this._trace!==undefined){var t=r.pop();var e=t._promiseCreated;t._promiseCreated=null;return e}return null};function createContext(){if(e)return new Context}function peekContext(){var t=r.length-1;if(t>=0){return r[t]}return undefined}Context.CapturedTrace=null;Context.create=createContext;Context.deactivateLongStackTraces=function(){};Context.activateLongStackTraces=function(){var r=t.prototype._pushContext;var n=t.prototype._popContext;var i=t._peekContext;var s=t.prototype._peekContext;var o=t.prototype._promiseCreated;Context.deactivateLongStackTraces=function(){t.prototype._pushContext=r;t.prototype._popContext=n;t._peekContext=i;t.prototype._peekContext=s;t.prototype._promiseCreated=o;e=false};e=true;t.prototype._pushContext=Context.prototype._pushContext;t.prototype._popContext=Context.prototype._popContext;t._peekContext=t.prototype._peekContext=peekContext;t.prototype._promiseCreated=function(){var t=this._peekContext();if(t&&t._promiseCreated==null)t._promiseCreated=this}};return Context}},4776:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i){var s=t._async;var o=r(9640).Warning;var a=r(6587);var c=r(9048);var u=a.canAttachTrace;var l;var f;var h=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;var p=/\((?:timers\.js):\d+:\d+\)/;var d=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;var y=null;var v=null;var m=false;var g;var _=!!(a.env("BLUEBIRD_DEBUG")!=0&&(false||a.env("BLUEBIRD_DEBUG")||a.env("NODE_ENV")==="development"));var w=!!(a.env("BLUEBIRD_WARNINGS")!=0&&(_||a.env("BLUEBIRD_WARNINGS")));var b=!!(a.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(_||a.env("BLUEBIRD_LONG_STACK_TRACES")));var S=a.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(w||!!a.env("BLUEBIRD_W_FORGOTTEN_RETURN"));var E;(function(){var e=[];function unhandledRejectionCheck(){for(var t=0;t0};t.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576};t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&~1048576;if(this._isUnhandledRejectionNotified()){this._unsetUnhandledRejectionIsNotified();this._notifyUnhandledRejectionIsHandled()}};t.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0};t.prototype._warn=function(t,e,r){return warn(t,e,r||this)};t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();f=a.contextBind(r,e)};t.onUnhandledRejectionHandled=function(e){var r=t._getContext();l=a.contextBind(r,e)};var k=function(){};t.longStackTraces=function(){if(s.haveItemsQueued()&&!N.longStackTraces){throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n")}if(!N.longStackTraces&&longStackTracesIsSupported()){var r=t.prototype._captureStackTrace;var n=t.prototype._attachExtraTrace;var i=t.prototype._dereferenceTrace;N.longStackTraces=true;k=function(){if(s.haveItemsQueued()&&!N.longStackTraces){throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n")}t.prototype._captureStackTrace=r;t.prototype._attachExtraTrace=n;t.prototype._dereferenceTrace=i;e.deactivateLongStackTraces();N.longStackTraces=false};t.prototype._captureStackTrace=longStackTracesCaptureStackTrace;t.prototype._attachExtraTrace=longStackTracesAttachExtraTrace;t.prototype._dereferenceTrace=longStackTracesDereferenceTrace;e.activateLongStackTraces()}};t.hasLongStackTraces=function(){return N.longStackTraces&&longStackTracesIsSupported()};var x={unhandledrejection:{before:function(){var t=a.global.onunhandledrejection;a.global.onunhandledrejection=null;return t},after:function(t){a.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=a.global.onrejectionhandled;a.global.onrejectionhandled=null;return t},after:function(t){a.global.onrejectionhandled=t}}};var C=function(){var t=function(t,e){if(t){var r;try{r=t.before();return!a.global.dispatchEvent(e)}finally{t.after(r)}}else{return!a.global.dispatchEvent(e)}};try{if(typeof CustomEvent==="function"){var e=new CustomEvent("CustomEvent");a.global.dispatchEvent(e);return function(e,r){e=e.toLowerCase();var n={detail:r,cancelable:true};var i=new CustomEvent(e,n);c.defineProperty(i,"promise",{value:r.promise});c.defineProperty(i,"reason",{value:r.reason});return t(x[e],i)}}else if(typeof Event==="function"){var e=new Event("CustomEvent");a.global.dispatchEvent(e);return function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:true});n.detail=r;c.defineProperty(n,"promise",{value:r.promise});c.defineProperty(n,"reason",{value:r.reason});return t(x[e],n)}}else{var e=document.createEvent("CustomEvent");e.initCustomEvent("testingtheevent",false,true,{});a.global.dispatchEvent(e);return function(e,r){e=e.toLowerCase();var n=document.createEvent("CustomEvent");n.initCustomEvent(e,false,true,r);return t(x[e],n)}}}catch(t){}return function(){return false}}();var A=function(){if(a.isNode){return function(){return process.emit.apply(process,arguments)}}else{if(!a.global){return function(){return false}}return function(t){var e="on"+t.toLowerCase();var r=a.global[e];if(!r)return false;r.apply(a.global,[].slice.call(arguments,1));return true}}}();function generatePromiseLifecycleEventObject(t,e){return{promise:e}}var T={promiseCreated:generatePromiseLifecycleEventObject,promiseFulfilled:generatePromiseLifecycleEventObject,promiseRejected:generatePromiseLifecycleEventObject,promiseResolved:generatePromiseLifecycleEventObject,promiseCancelled:generatePromiseLifecycleEventObject,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:generatePromiseLifecycleEventObject};var P=function(t){var e=false;try{e=A.apply(null,arguments)}catch(t){s.throwLater(t);e=true}var r=false;try{r=C(t,T[t].apply(null,arguments))}catch(t){s.throwLater(t);r=true}return r||e};t.config=function(e){e=Object(e);if("longStackTraces"in e){if(e.longStackTraces){t.longStackTraces()}else if(!e.longStackTraces&&t.hasLongStackTraces()){k()}}if("warnings"in e){var r=e.warnings;N.warnings=!!r;S=N.warnings;if(a.isObject(r)){if("wForgottenReturn"in r){S=!!r.wForgottenReturn}}}if("cancellation"in e&&e.cancellation&&!N.cancellation){if(s.haveItemsQueued()){throw new Error("cannot enable cancellation after promises are in use")}t.prototype._clearCancellationData=cancellationClearCancellationData;t.prototype._propagateFrom=cancellationPropagateFrom;t.prototype._onCancel=cancellationOnCancel;t.prototype._setOnCancel=cancellationSetOnCancel;t.prototype._attachCancellationCallback=cancellationAttachCancellationCallback;t.prototype._execute=cancellationExecute;j=cancellationPropagateFrom;N.cancellation=true}if("monitoring"in e){if(e.monitoring&&!N.monitoring){N.monitoring=true;t.prototype._fireEvent=P}else if(!e.monitoring&&N.monitoring){N.monitoring=false;t.prototype._fireEvent=defaultFireEvent}}if("asyncHooks"in e&&a.nodeSupportsAsyncResource){var o=N.asyncHooks;var c=!!e.asyncHooks;if(o!==c){N.asyncHooks=c;if(c){n()}else{i()}}}return t};function defaultFireEvent(){return false}t.prototype._fireEvent=defaultFireEvent;t.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}};t.prototype._onCancel=function(){};t.prototype._setOnCancel=function(t){};t.prototype._attachCancellationCallback=function(t){};t.prototype._captureStackTrace=function(){};t.prototype._attachExtraTrace=function(){};t.prototype._dereferenceTrace=function(){};t.prototype._clearCancellationData=function(){};t.prototype._propagateFrom=function(t,e){};function cancellationExecute(t,e,r){var n=this;try{t(e,r,function(t){if(typeof t!=="function"){throw new TypeError("onCancel must be a function, got: "+a.toString(t))}n._attachCancellationCallback(t)})}catch(t){return t}}function cancellationAttachCancellationCallback(t){if(!this._isCancellable())return this;var e=this._onCancel();if(e!==undefined){if(a.isArray(e)){e.push(t)}else{this._setOnCancel([e,t])}}else{this._setOnCancel(t)}}function cancellationOnCancel(){return this._onCancelField}function cancellationSetOnCancel(t){this._onCancelField=t}function cancellationClearCancellationData(){this._cancellationParent=undefined;this._onCancelField=undefined}function cancellationPropagateFrom(t,e){if((e&1)!==0){this._cancellationParent=t;var r=t._branchesRemainingToCancel;if(r===undefined){r=0}t._branchesRemainingToCancel=r+1}if((e&2)!==0&&t._isBound()){this._setBoundTo(t._boundTo)}}function bindingPropagateFrom(t,e){if((e&2)!==0&&t._isBound()){this._setBoundTo(t._boundTo)}}var j=bindingPropagateFrom;function boundValueFunction(){var e=this._boundTo;if(e!==undefined){if(e instanceof t){if(e.isFulfilled()){return e.value()}else{return undefined}}}return e}function longStackTracesCaptureStackTrace(){this._trace=new CapturedTrace(this._peekContext())}function longStackTracesAttachExtraTrace(t,e){if(u(t)){var r=this._trace;if(r!==undefined){if(e)r=r._parent}if(r!==undefined){r.attachExtraTrace(t)}else if(!t.__stackCleaned__){var n=parseStackAndMessage(t);a.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n"));a.notEnumerableProp(t,"__stackCleaned__",true)}}}function longStackTracesDereferenceTrace(){this._trace=undefined}function checkForgottenReturns(t,e,r,n,i){if(t===undefined&&e!==null&&S){if(i!==undefined&&i._returnedNonUndefined())return;if((n._bitField&65535)===0)return;if(r)r=r+" ";var s="";var o="";if(e._trace){var a=e._trace.stack.split("\n");var c=cleanStack(a);for(var u=c.length-1;u>=0;--u){var l=c[u];if(!p.test(l)){var f=l.match(d);if(f){s="at "+f[1]+":"+f[2]+":"+f[3]+" "}break}}if(c.length>0){var h=c[0];for(var u=0;u0){o="\n"+a[u-1]}break}}}}var y="a promise was created in a "+r+"handler "+s+"but was not returned from it, "+"see http://goo.gl/rRqMUw"+o;n._warn(y,true,e)}}function deprecated(t,e){var r=t+" is deprecated and will be removed in a future version.";if(e)r+=" Use "+e+" instead.";return warn(r)}function warn(e,r,n){if(!N.warnings)return;var i=new o(e);var s;if(r){n._attachExtraTrace(i)}else if(N.longStackTraces&&(s=t._peekContext())){s.attachExtraTrace(i)}else{var a=parseStackAndMessage(i);i.stack=a.message+"\n"+a.stack.join("\n")}if(!P("warning",i)){formatAndLogError(i,"",true)}}function reconstructStack(t,e){for(var r=0;r=0;--a){if(n[a]===s){o=a;break}}for(var a=o;a>=0;--a){var c=n[a];if(e[i]===c){e.pop();i--}else{break}}e=n}}function cleanStack(t){var e=[];for(var r=0;r0&&t.name!="SyntaxError"){e=e.slice(r)}return e}function parseStackAndMessage(t){var e=t.stack;var r=t.toString();e=typeof e==="string"&&e.length>0?stackFramesAsArray(t):[" (No stack trace)"];return{message:r,stack:t.name=="SyntaxError"?e:cleanStack(e)}}function formatAndLogError(t,e,r){if(typeof console!=="undefined"){var n;if(a.isObject(t)){var i=t.stack;n=e+v(i,t)}else{n=e+String(t)}if(typeof g==="function"){g(n,r)}else if(typeof console.log==="function"||typeof console.log==="object"){console.log(n)}}}function fireRejectionEvent(t,e,r,n){var i=false;try{if(typeof e==="function"){i=true;if(t==="rejectionHandled"){e(n)}else{e(r,n)}}}catch(t){s.throwLater(t)}if(t==="unhandledRejection"){if(!P(t,r,n)&&!i){formatAndLogError(r,"Unhandled rejection ")}}else{P(t,n)}}function formatNonError(t){var e;if(typeof t==="function"){e="[function "+(t.name||"anonymous")+"]"}else{e=t&&typeof t.toString==="function"?t.toString():a.toString(t);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e)){try{var n=JSON.stringify(t);e=n}catch(t){}}if(e.length===0){e="(empty array)"}}return"(<"+snip(e)+">, no stack trace)"}function snip(t){var e=41;if(t.length=s){return}O=function(t){if(h.test(t))return true;var e=parseLineInfo(t);if(e){if(e.fileName===o&&(i<=e.line&&e.line<=s)){return true}}return false}}function CapturedTrace(t){this._parent=t;this._promisesCreated=0;var e=this._length=1+(t===undefined?0:t._length);R(this,CapturedTrace);if(e>32)this.uncycle()}a.inherits(CapturedTrace,Error);e.CapturedTrace=CapturedTrace;CapturedTrace.prototype.uncycle=function(){var t=this._length;if(t<2)return;var e=[];var r={};for(var n=0,i=this;i!==undefined;++n){e.push(i);i=i._parent}t=this._length=n;for(var n=t-1;n>=0;--n){var s=e[n].stack;if(r[s]===undefined){r[s]=n}}for(var n=0;n0){e[a-1]._parent=undefined;e[a-1]._length=1}e[n]._parent=undefined;e[n]._length=1;var c=n>0?e[n-1]:this;if(a=0;--l){e[l]._length=u;u++}return}}};CapturedTrace.prototype.attachExtraTrace=function(t){if(t.__stackCleaned__)return;this.uncycle();var e=parseStackAndMessage(t);var r=e.message;var n=[e.stack];var i=this;while(i!==undefined){n.push(cleanStack(i.stack.split("\n")));i=i._parent}removeCommonRoots(n);removeDuplicateOrEmptyJumps(n);a.notEnumerableProp(t,"stack",reconstructStack(r,n));a.notEnumerableProp(t,"__stackCleaned__",true)};var R=function stackDetection(){var t=/^\s*at\s*/;var e=function(t,e){if(typeof t==="string")return t;if(e.name!==undefined&&e.message!==undefined){return e.toString()}return formatNonError(e)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6;y=t;v=e;var r=Error.captureStackTrace;O=function(t){return h.test(t)};return function(t,e){Error.stackTraceLimit+=6;r(t,e);Error.stackTraceLimit-=6}}var n=new Error;if(typeof n.stack==="string"&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0){y=/@/;v=e;m=true;return function captureStackTrace(t){t.stack=(new Error).stack}}var i;try{throw new Error}catch(t){i="stack"in t}if(!("stack"in n)&&i&&typeof Error.stackTraceLimit==="number"){y=t;v=e;return function captureStackTrace(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6}}v=function(t,e){if(typeof t==="string")return t;if((typeof e==="object"||typeof e==="function")&&e.name!==undefined&&e.message!==undefined){return e.toString()}return formatNonError(e)};return null}([]);if(typeof console!=="undefined"&&typeof console.warn!=="undefined"){g=function(t){console.warn(t)};if(a.isNode&&process.stderr.isTTY){g=function(t,e){var r=e?"":"";console.warn(r+t+"\n")}}else if(!a.isNode&&typeof(new Error).stack==="string"){g=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}}}var N={warnings:w,longStackTraces:false,cancellation:false,monitoring:false,asyncHooks:false};if(b)t.longStackTraces();return{asyncHooks:function(){return N.asyncHooks},longStackTraces:function(){return N.longStackTraces},warnings:function(){return N.warnings},cancellation:function(){return N.cancellation},monitoring:function(){return N.monitoring},propagateFromFunction:function(){return j},boundValueFunction:function(){return boundValueFunction},checkForgottenReturns:checkForgottenReturns,setBounds:setBounds,warn:warn,deprecated:deprecated,CapturedTrace:CapturedTrace,fireDomEvent:C,fireGlobalEvent:A}}},8925:t=>{"use strict";t.exports=function(t){function returner(){return this.value}function thrower(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(e){if(e instanceof t)e.suppressUnhandledRejections();return this._then(returner,undefined,undefined,{value:e},undefined)};t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(thrower,undefined,undefined,{reason:t},undefined)};t.prototype.catchThrow=function(t){if(arguments.length<=1){return this._then(undefined,thrower,undefined,{reason:t},undefined)}else{var e=arguments[1];var r=function(){throw e};return this.caught(t,r)}};t.prototype.catchReturn=function(e){if(arguments.length<=1){if(e instanceof t)e.suppressUnhandledRejections();return this._then(undefined,returner,undefined,{value:e},undefined)}else{var r=arguments[1];if(r instanceof t)r.suppressUnhandledRejections();var n=function(){return r};return this.caught(e,n)}}}},5708:t=>{"use strict";t.exports=function(t,e){var r=t.reduce;var n=t.all;function promiseAllThis(){return n(this)}function PromiseMapSeries(t,n){return r(t,n,e,e)}t.prototype.each=function(t){return r(this,t,e,0)._then(promiseAllThis,undefined,undefined,this,undefined)};t.prototype.mapSeries=function(t){return r(this,t,e,e)};t.each=function(t,n){return r(t,n,e,0)._then(promiseAllThis,undefined,undefined,t,undefined)};t.mapSeries=PromiseMapSeries}},9640:(t,e,r)=>{"use strict";var n=r(9048);var i=n.freeze;var s=r(6587);var o=s.inherits;var a=s.notEnumerableProp;function subError(t,e){function SubError(r){if(!(this instanceof SubError))return new SubError(r);a(this,"message",typeof r==="string"?r:e);a(this,"name",t);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{Error.call(this)}}o(SubError,Error);return SubError}var c,u;var l=subError("Warning","warning");var f=subError("CancellationError","cancellation error");var h=subError("TimeoutError","timeout error");var p=subError("AggregateError","aggregate error");try{c=TypeError;u=RangeError}catch(t){c=subError("TypeError","type error");u=subError("RangeError","range error")}var d=("join pop push shift unshift slice filter forEach some "+"every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");for(var y=0;y{var e=function(){"use strict";return this===undefined}();if(e){t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:e,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!!(!r||r.writable||r.set)}}}else{var r={}.hasOwnProperty;var n={}.toString;var i={}.constructor.prototype;var s=function(t){var e=[];for(var n in t){if(r.call(t,n)){e.push(n)}}return e};var o=function(t,e){return{value:t[e]}};var a=function(t,e,r){t[e]=r.value;return t};var c=function(t){return t};var u=function(t){try{return Object(t).constructor.prototype}catch(t){return i}};var l=function(t){try{return n.call(t)==="[object Array]"}catch(t){return false}};t.exports={isArray:l,keys:s,names:s,defineProperty:a,getDescriptor:o,freeze:c,getPrototypeOf:u,isES5:e,propertyIsWritable:function(){return true}}}},3359:t=>{"use strict";t.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)};t.filter=function(t,n,i){return r(t,n,i,e)}}},1371:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var i=r(6587);var s=t.CancellationError;var o=i.errorObj;var a=r(691)(n);function PassThroughHandlerContext(t,e,r){this.promise=t;this.type=e;this.handler=r;this.called=false;this.cancelPromise=null}PassThroughHandlerContext.prototype.isFinallyHandler=function(){return this.type===0};function FinallyHandlerCancelReaction(t){this.finallyHandler=t}FinallyHandlerCancelReaction.prototype._resultCancelled=function(){checkCancel(this.finallyHandler)};function checkCancel(t,e){if(t.cancelPromise!=null){if(arguments.length>1){t.cancelPromise._reject(e)}else{t.cancelPromise._cancel()}t.cancelPromise=null;return true}return false}function succeed(){return finallyHandler.call(this,this.promise._target()._settledValue())}function fail(t){if(checkCancel(this,t))return;o.e=t;return o}function finallyHandler(r){var i=this.promise;var a=this.handler;if(!this.called){this.called=true;var c=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),r);if(c===n){return c}else if(c!==undefined){i._setReturnedNonUndefined();var u=e(c,i);if(u instanceof t){if(this.cancelPromise!=null){if(u._isCancelled()){var l=new s("late cancellation observer");i._attachExtraTrace(l);o.e=l;return o}else if(u.isPending()){u._attachCancellationCallback(new FinallyHandlerCancelReaction(this))}}return u._then(succeed,fail,undefined,this,undefined)}}}if(i.isRejected()){checkCancel(this);o.e=r;return o}else{checkCancel(this);return r}}t.prototype._passThrough=function(t,e,r,n){if(typeof t!=="function")return this.then();return this._then(r,n,undefined,new PassThroughHandlerContext(this,e,t),undefined)};t.prototype.lastly=t.prototype["finally"]=function(t){return this._passThrough(t,0,finallyHandler,finallyHandler)};t.prototype.tap=function(t){return this._passThrough(t,1,finallyHandler)};t.prototype.tapCatch=function(e){var r=arguments.length;if(r===1){return this._passThrough(e,1,undefined,finallyHandler)}else{var n=new Array(r-1),s=0,o;for(o=0;o{"use strict";t.exports=function(t,e,n,i,s,o){var a=r(9640);var c=a.TypeError;var u=r(6587);var l=u.errorObj;var f=u.tryCatch;var h=[];function promiseFromYieldHandler(e,r,n){for(var s=0;s{"use strict";t.exports=function(t,e,n,i,s){var o=r(6587);var a=o.canEvaluate;var c=o.tryCatch;var u=o.errorObj;var l;if(true){if(a){var f=function(t){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,t))};var h=function(t){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,t))};var p=function(e){var r=new Array(e);for(var n=0;n0&&typeof arguments[r]==="function"){s=arguments[r];if(true){if(r<=8&&a){var c=new t(i);c._captureStackTrace();var u=d[r-1];var f=new u(s);var h=y;for(var p=0;p{"use strict";t.exports=function(t,e,n,i,s,o){var a=r(6587);var c=a.tryCatch;var u=a.errorObj;var l=t._async;function MappingPromiseArray(e,r,n,i){this.constructor$(e);this._promise._captureStackTrace();var o=t._getContext();this._callback=a.contextBind(o,r);this._preservedValues=i===s?new Array(this.length()):null;this._limit=n;this._inFlight=0;this._queue=[];l.invoke(this._asyncInit,this,undefined);if(a.isArray(e)){for(var c=0;c=1){this._inFlight--;this._drainQueue();if(this._isResolved())return true}}else{if(l>=1&&this._inFlight>=l){n[r]=e;this._queue.push(r);return false}if(a!==null)a[r]=e;var f=this._promise;var h=this._callback;var p=f._boundValue();f._pushContext();var d=c(h).call(p,e,r,s);var y=f._popContext();o.checkForgottenReturns(d,y,a!==null?"Promise.filter":"Promise.map",f);if(d===u){this._reject(d.e);return true}var v=i(d,this._promise);if(v instanceof t){v=v._target();var m=v._bitField;if((m&50397184)===0){if(l>=1)this._inFlight++;n[r]=v;v._proxy(this,(r+1)*-1);return false}else if((m&33554432)!==0){d=v._value()}else if((m&16777216)!==0){this._reject(v._reason());return true}else{this._cancel();return true}}n[r]=d}var g=++this._totalResolved;if(g>=s){if(a!==null){this._filter(n,a)}else{this._resolve(n)}return true}return false};MappingPromiseArray.prototype._drainQueue=function(){var t=this._queue;var e=this._limit;var r=this._values;while(t.length>0&&this._inFlight=1?o:0;return new MappingPromiseArray(e,r,o,s).promise()}t.prototype.map=function(t,e){return map(this,t,e,null)};t.map=function(t,e,r,n){return map(t,e,r,n)}}},3303:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i,s){var o=r(6587);var a=o.tryCatch;t.method=function(r){if(typeof r!=="function"){throw new t.TypeError("expecting a function but got "+o.classString(r))}return function(){var n=new t(e);n._captureStackTrace();n._pushContext();var i=a(r).apply(this,arguments);var o=n._popContext();s.checkForgottenReturns(i,o,"Promise.method",n);n._resolveFromSyncValue(i);return n}};t.attempt=t["try"]=function(r){if(typeof r!=="function"){return i("expecting a function but got "+o.classString(r))}var n=new t(e);n._captureStackTrace();n._pushContext();var c;if(arguments.length>1){s.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1];var l=arguments[2];c=o.isArray(u)?a(r).apply(l,u):a(r).call(l,u)}else{c=a(r)()}var f=n._popContext();s.checkForgottenReturns(c,f,"Promise.try",n);n._resolveFromSyncValue(c);return n};t.prototype._resolveFromSyncValue=function(t){if(t===o.errorObj){this._rejectCallback(t.e,false)}else{this._resolveCallback(t,true)}}}},938:(t,e,r)=>{"use strict";var n=r(6587);var i=n.maybeWrapAsError;var s=r(9640);var o=s.OperationalError;var a=r(9048);function isUntypedError(t){return t instanceof Error&&a.getPrototypeOf(t)===Error.prototype}var c=/^(?:name|message|stack|cause)$/;function wrapAsOperationalError(t){var e;if(isUntypedError(t)){e=new o(t);e.name=t.name;e.message=t.message;e.stack=t.stack;var r=a.keys(t);for(var i=0;i{"use strict";t.exports=function(t){var e=r(6587);var n=t._async;var i=e.tryCatch;var s=e.errorObj;function spreadAdapter(t,r){var o=this;if(!e.isArray(t))return successAdapter.call(o,t,r);var a=i(r).apply(o._boundValue(),[null].concat(t));if(a===s){n.throwLater(a.e)}}function successAdapter(t,e){var r=this;var o=r._boundValue();var a=t===undefined?i(e).call(o,null):i(e).call(o,null,t);if(a===s){n.throwLater(a.e)}}function errorAdapter(t,e){var r=this;if(!t){var o=new Error(t+"");o.cause=t;t=o}var a=i(e).call(r._boundValue(),t);if(a===s){n.throwLater(a.e)}}t.prototype.asCallback=t.prototype.nodeify=function(t,e){if(typeof t=="function"){var r=successAdapter;if(e!==undefined&&Object(e).spread){r=spreadAdapter}this._then(r,errorAdapter,undefined,this,t)}return this}}},5175:(t,e,r)=>{"use strict";t.exports=function(){var e=function(){return new _("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")};var n=function(){return new Promise.PromiseInspection(this._target())};var i=function(t){return Promise.reject(new _(t))};function Proxyable(){}var s={};var o=r(6587);o.setReflectHandler(n);var a=function(){var t=process.domain;if(t===undefined){return null}return t};var c=function(){return null};var u=function(){return{domain:a(),async:null}};var l=o.isNode&&o.nodeSupportsAsyncResource?r(7303).AsyncResource:null;var f=function(){return{domain:a(),async:new l("Bluebird::Promise")}};var h=o.isNode?u:c;o.notEnumerableProp(Promise,"_getContext",h);var p=function(){h=f;o.notEnumerableProp(Promise,"_getContext",f)};var d=function(){h=u;o.notEnumerableProp(Promise,"_getContext",u)};var y=r(9048);var v=r(9952);var m=new v;y.defineProperty(Promise,"_async",{value:m});var g=r(9640);var _=Promise.TypeError=g.TypeError;Promise.RangeError=g.RangeError;var w=Promise.CancellationError=g.CancellationError;Promise.TimeoutError=g.TimeoutError;Promise.OperationalError=g.OperationalError;Promise.RejectionError=g.OperationalError;Promise.AggregateError=g.AggregateError;var b=function(){};var S={};var E={};var k=r(3938)(Promise,b);var x=r(3003)(Promise,b,k,i,Proxyable);var C=r(1030)(Promise);var A=C.create;var T=r(4776)(Promise,C,p,d);var P=T.CapturedTrace;var j=r(1371)(Promise,k,E);var O=r(691)(E);var F=r(938);var R=o.errorObj;var N=o.tryCatch;function check(t,e){if(t==null||t.constructor!==Promise){throw new _("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}if(typeof e!=="function"){throw new _("expecting a function but got "+o.classString(e))}}function Promise(t){if(t!==b){check(this,t)}this._bitField=0;this._fulfillmentHandler0=undefined;this._rejectionHandler0=undefined;this._promise0=undefined;this._receiver0=undefined;this._resolveFromExecutor(t);this._promiseCreated();this._fireEvent("promiseCreated",this)}Promise.prototype.toString=function(){return"[object Promise]"};Promise.prototype.caught=Promise.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var r=new Array(e-1),n=0,s;for(s=0;s0&&typeof t!=="function"&&typeof e!=="function"){var r=".then() only accepts functions but was passed: "+o.classString(t);if(arguments.length>1){r+=", "+o.classString(e)}this._warn(r)}return this._then(t,e,undefined,undefined,undefined)};Promise.prototype.done=function(t,e){var r=this._then(t,e,undefined,undefined,undefined);r._setIsFinal()};Promise.prototype.spread=function(t){if(typeof t!=="function"){return i("expecting a function but got "+o.classString(t))}return this.all()._then(t,undefined,undefined,S,undefined)};Promise.prototype.toJSON=function(){var t={isFulfilled:false,isRejected:false,fulfillmentValue:undefined,rejectionReason:undefined};if(this.isFulfilled()){t.fulfillmentValue=this.value();t.isFulfilled=true}else if(this.isRejected()){t.rejectionReason=this.reason();t.isRejected=true}return t};Promise.prototype.all=function(){if(arguments.length>0){this._warn(".all() was passed arguments but it does not take any")}return new x(this).promise()};Promise.prototype.error=function(t){return this.caught(o.originatesFromRejection,t)};Promise.getNewLibraryCopy=t.exports;Promise.is=function(t){return t instanceof Promise};Promise.fromNode=Promise.fromCallback=function(t){var e=new Promise(b);e._captureStackTrace();var r=arguments.length>1?!!Object(arguments[1]).multiArgs:false;var n=N(t)(F(e,r));if(n===R){e._rejectCallback(n.e,true)}if(!e._isFateSealed())e._setAsyncGuaranteed();return e};Promise.all=function(t){return new x(t).promise()};Promise.cast=function(t){var e=k(t);if(!(e instanceof Promise)){e=new Promise(b);e._captureStackTrace();e._setFulfilled();e._rejectionHandler0=t}return e};Promise.resolve=Promise.fulfilled=Promise.cast;Promise.reject=Promise.rejected=function(t){var e=new Promise(b);e._captureStackTrace();e._rejectCallback(t,true);return e};Promise.setScheduler=function(t){if(typeof t!=="function"){throw new _("expecting a function but got "+o.classString(t))}return m.setScheduler(t)};Promise.prototype._then=function(t,e,r,n,i){var s=i!==undefined;var a=s?i:new Promise(b);var c=this._target();var u=c._bitField;if(!s){a._propagateFrom(this,3);a._captureStackTrace();if(n===undefined&&(this._bitField&2097152)!==0){if(!((u&50397184)===0)){n=this._boundValue()}else{n=c===this?undefined:this._boundTo}}this._fireEvent("promiseChained",this,a)}var l=h();if(!((u&50397184)===0)){var f,p,d=c._settlePromiseCtx;if((u&33554432)!==0){p=c._rejectionHandler0;f=t}else if((u&16777216)!==0){p=c._fulfillmentHandler0;f=e;c._unsetRejectionIsUnhandled()}else{d=c._settlePromiseLateCancellationObserver;p=new w("late cancellation observer");c._attachExtraTrace(p);f=e}m.invoke(d,c,{handler:o.contextBind(l,f),promise:a,receiver:n,value:p})}else{c._addCallbacks(t,e,a,n,l)}return a};Promise.prototype._length=function(){return this._bitField&65535};Promise.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0};Promise.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864};Promise.prototype._setLength=function(t){this._bitField=this._bitField&-65536|t&65535};Promise.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432;this._fireEvent("promiseFulfilled",this)};Promise.prototype._setRejected=function(){this._bitField=this._bitField|16777216;this._fireEvent("promiseRejected",this)};Promise.prototype._setFollowing=function(){this._bitField=this._bitField|67108864;this._fireEvent("promiseResolved",this)};Promise.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304};Promise.prototype._isFinal=function(){return(this._bitField&4194304)>0};Promise.prototype._unsetCancelled=function(){this._bitField=this._bitField&~65536};Promise.prototype._setCancelled=function(){this._bitField=this._bitField|65536;this._fireEvent("promiseCancelled",this)};Promise.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608};Promise.prototype._setAsyncGuaranteed=function(){if(m.hasCustomScheduler())return;var t=this._bitField;this._bitField=t|(t&536870912)>>2^134217728};Promise.prototype._setNoAsyncGuarantee=function(){this._bitField=(this._bitField|536870912)&~134217728};Promise.prototype._receiverAt=function(t){var e=t===0?this._receiver0:this[t*4-4+3];if(e===s){return undefined}else if(e===undefined&&this._isBound()){return this._boundValue()}return e};Promise.prototype._promiseAt=function(t){return this[t*4-4+2]};Promise.prototype._fulfillmentHandlerAt=function(t){return this[t*4-4+0]};Promise.prototype._rejectionHandlerAt=function(t){return this[t*4-4+1]};Promise.prototype._boundValue=function(){};Promise.prototype._migrateCallback0=function(t){var e=t._bitField;var r=t._fulfillmentHandler0;var n=t._rejectionHandler0;var i=t._promise0;var o=t._receiverAt(0);if(o===undefined)o=s;this._addCallbacks(r,n,i,o,null)};Promise.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e);var n=t._rejectionHandlerAt(e);var i=t._promiseAt(e);var o=t._receiverAt(e);if(o===undefined)o=s;this._addCallbacks(r,n,i,o,null)};Promise.prototype._addCallbacks=function(t,e,r,n,i){var s=this._length();if(s>=65535-4){s=0;this._setLength(0)}if(s===0){this._promise0=r;this._receiver0=n;if(typeof t==="function"){this._fulfillmentHandler0=o.contextBind(i,t)}if(typeof e==="function"){this._rejectionHandler0=o.contextBind(i,e)}}else{var a=s*4-4;this[a+2]=r;this[a+3]=n;if(typeof t==="function"){this[a+0]=o.contextBind(i,t)}if(typeof e==="function"){this[a+1]=o.contextBind(i,e)}}this._setLength(s+1);return s};Promise.prototype._proxy=function(t,e){this._addCallbacks(undefined,undefined,e,t,null)};Promise.prototype._resolveCallback=function(t,r){if((this._bitField&117506048)!==0)return;if(t===this)return this._rejectCallback(e(),false);var n=k(t,this);if(!(n instanceof Promise))return this._fulfill(t);if(r)this._propagateFrom(n,2);var i=n._target();if(i===this){this._reject(e());return}var s=i._bitField;if((s&50397184)===0){var o=this._length();if(o>0)i._migrateCallback0(this);for(var a=1;a>>16)return;if(t===this){var n=e();this._attachExtraTrace(n);return this._reject(n)}this._setFulfilled();this._rejectionHandler0=t;if((r&65535)>0){if((r&134217728)!==0){this._settlePromises()}else{m.settlePromises(this)}this._dereferenceTrace()}};Promise.prototype._reject=function(t){var e=this._bitField;if((e&117506048)>>>16)return;this._setRejected();this._fulfillmentHandler0=t;if(this._isFinal()){return m.fatalError(t,o.isNode)}if((e&65535)>0){m.settlePromises(this)}else{this._ensurePossibleRejectionHandled()}};Promise.prototype._fulfillPromises=function(t,e){for(var r=1;r0){if((t&16842752)!==0){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t);this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t);this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()};Promise.prototype._settledValue=function(){var t=this._bitField;if((t&33554432)!==0){return this._rejectionHandler0}else if((t&16777216)!==0){return this._fulfillmentHandler0}};if(typeof Symbol!=="undefined"&&Symbol.toStringTag){y.defineProperty(Promise.prototype,Symbol.toStringTag,{get:function(){return"Object"}})}function deferResolve(t){this.promise._resolveCallback(t)}function deferReject(t){this.promise._rejectCallback(t,false)}Promise.defer=Promise.pending=function(){T.deprecated("Promise.defer","new Promise");var t=new Promise(b);return{promise:t,resolve:deferResolve,reject:deferReject}};o.notEnumerableProp(Promise,"_makeSelfResolutionError",e);r(3303)(Promise,b,k,i,T);r(1273)(Promise,b,k,T);r(7386)(Promise,x,i,T);r(8925)(Promise);r(7659)(Promise);r(9255)(Promise,x,k,b,m);Promise.Promise=Promise;Promise.version="3.7.2";r(8779)(Promise);r(2225)(Promise,i,b,k,Proxyable,T);r(2757)(Promise,x,i,k,b,T);r(733)(Promise);r(7632)(Promise,b);r(4519)(Promise,x,k,i);r(3741)(Promise,b,k,i);r(8773)(Promise,x,i,k,b,T);r(8741)(Promise,x,T);r(5566)(Promise,x,i);r(8329)(Promise,b,T);r(1904)(Promise,i,k,A,b,T);r(5801)(Promise);r(5708)(Promise,b);r(3359)(Promise,b);o.toFastProperties(Promise);o.toFastProperties(Promise.prototype);function fillTypes(t){var e=new Promise(b);e._fulfillmentHandler0=t;e._rejectionHandler0=t;e._promise0=t;e._receiver0=t}fillTypes({a:1});fillTypes({b:2});fillTypes({c:3});fillTypes(1);fillTypes(function(){});fillTypes(undefined);fillTypes(false);fillTypes(new Promise(b));T.setBounds(v.firstLineError,o.lastLineError);return Promise}},3003:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i,s){var o=r(6587);var a=o.isArray;function toResolutionValue(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function PromiseArray(r){var n=this._promise=new t(e);if(r instanceof t){n._propagateFrom(r,3);r.suppressUnhandledRejections()}n._setOnCancel(this);this._values=r;this._length=0;this._totalResolved=0;this._init(undefined,-2)}o.inherits(PromiseArray,s);PromiseArray.prototype.length=function(){return this._length};PromiseArray.prototype.promise=function(){return this._promise};PromiseArray.prototype._init=function init(e,r){var s=n(this._values,this._promise);if(s instanceof t){s=s._target();var a=s._bitField;this._values=s;if((a&50397184)===0){this._promise._setAsyncGuaranteed();return s._then(init,this._reject,undefined,this,r)}else if((a&33554432)!==0){s=s._value()}else if((a&16777216)!==0){return this._reject(s._reason())}else{return this._cancel()}}s=o.asArray(s);if(s===null){var c=i("expecting an array or an iterable object but got "+o.classString(s)).reason();this._promise._rejectCallback(c,false);return}if(s.length===0){if(r===-5){this._resolveEmptyArray()}else{this._resolve(toResolutionValue(r))}return}this._iterate(s)};PromiseArray.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r;this._values=this.shouldCopyValues()?new Array(r):this._values;var i=this._promise;var s=false;var o=null;for(var a=0;a=this._length){this._resolve(this._values);return true}return false};PromiseArray.prototype._promiseCancelled=function(){this._cancel();return true};PromiseArray.prototype._promiseRejected=function(t){this._totalResolved++;this._reject(t);return true};PromiseArray.prototype._resultCancelled=function(){if(this._isResolved())return;var e=this._values;this._cancel();if(e instanceof t){e.cancel()}else{for(var r=0;r{"use strict";t.exports=function(t,e){var n={};var i=r(6587);var s=r(938);var o=i.withAppended;var a=i.maybeWrapAsError;var c=i.canEvaluate;var u=r(9640).TypeError;var l="Async";var f={__isPromisified__:true};var h=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"];var p=new RegExp("^(?:"+h.join("|")+")$");var d=function(t){return i.isIdentifier(t)&&t.charAt(0)!=="_"&&t!=="constructor"};function propsFilter(t){return!p.test(t)}function isPromisified(t){try{return t.__isPromisified__===true}catch(t){return false}}function hasPromisified(t,e,r){var n=i.getDataPropertyOrDefault(t,e+r,f);return n?isPromisified(n):false}function checkValid(t,e,r){for(var n=0;n=r;--n){e.push(n)}for(var n=t+1;n<=3;++n){e.push(n)}return e};var g=function(t){return i.filledRange(t,"_arg","")};var _=function(t){return i.filledRange(Math.max(t,3),"_arg","")};var w=function(t){if(typeof t.length==="number"){return Math.max(Math.min(t.length,1023+1),0)}return 0};v=function(r,c,u,l,f,h){var p=Math.max(0,w(l)-1);var d=m(p);var y=typeof r==="string"||c===n;function generateCallForArgumentCount(t){var e=g(t).join(", ");var r=t>0?", ":"";var n;if(y){n="ret = callback.call(this, {{args}}, nodeback); break;\n"}else{n=c===undefined?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n"}return n.replace("{{args}}",e).replace(", ",r)}function generateArgumentSwitchCase(){var t="";for(var e=0;e{"use strict";t.exports=function(t,e,n,i){var s=r(6587);var o=s.isObject;var a=r(9048);var c;if(typeof Map==="function")c=Map;var u=function(){var t=0;var e=0;function extractEntry(r,n){this[t]=r;this[t+e]=n;t++}return function mapToEntries(r){e=r.size;t=0;var n=new Array(r.size*2);r.forEach(extractEntry,n);return n}}();var l=function(t){var e=new c;var r=t.length/2|0;for(var n=0;n=this._length){var n;if(this._isMap){n=l(this._values)}else{n={};var i=this.length();for(var s=0,o=this.length();s>1};function props(e){var r;var s=n(e);if(!o(s)){return i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}else if(s instanceof t){r=s._then(t.props,undefined,undefined,undefined,undefined)}else{r=new PropertiesPromiseArray(s).promise()}if(s instanceof t){r._propagateFrom(s,2)}return r}t.prototype.props=function(){return props(this)};t.props=function(t){return props(t)}}},3172:t=>{"use strict";function arrayMove(t,e,r,n,i){for(var s=0;s{"use strict";t.exports=function(t,e,n,i){var s=r(6587);var o=function(t){return t.then(function(e){return race(e,t)})};function race(r,a){var c=n(r);if(c instanceof t){return o(c)}else{r=s.asArray(r);if(r===null)return i("expecting an array or an iterable object but got "+s.classString(r))}var u=new t(e);if(a!==undefined){u._propagateFrom(a,3)}var l=u._fulfill;var f=u._reject;for(var h=0,p=r.length;h{"use strict";t.exports=function(t,e,n,i,s,o){var a=r(6587);var c=a.tryCatch;function ReductionPromiseArray(e,r,n,i){this.constructor$(e);var o=t._getContext();this._fn=a.contextBind(o,r);if(n!==undefined){n=t.resolve(n);n._attachCancellationCallback(this)}this._initialValue=n;this._currentCancellable=null;if(i===s){this._eachValues=Array(this._length)}else if(i===0){this._eachValues=null}else{this._eachValues=undefined}this._promise._captureStackTrace();this._init$(undefined,-5)}a.inherits(ReductionPromiseArray,e);ReductionPromiseArray.prototype._gotAccum=function(t){if(this._eachValues!==undefined&&this._eachValues!==null&&t!==s){this._eachValues.push(t)}};ReductionPromiseArray.prototype._eachComplete=function(t){if(this._eachValues!==null){this._eachValues.push(t)}return this._eachValues};ReductionPromiseArray.prototype._init=function(){};ReductionPromiseArray.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==undefined?this._eachValues:this._initialValue)};ReductionPromiseArray.prototype.shouldCopyValues=function(){return false};ReductionPromiseArray.prototype._resolve=function(t){this._promise._resolveCallback(t);this._values=null};ReductionPromiseArray.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();if(this._isResolved())return;this._resultCancelled$();if(this._currentCancellable instanceof t){this._currentCancellable.cancel()}if(this._initialValue instanceof t){this._initialValue.cancel()}};ReductionPromiseArray.prototype._iterate=function(e){this._values=e;var r;var n;var i=e.length;if(this._initialValue!==undefined){r=this._initialValue;n=0}else{r=t.resolve(e[0]);n=1}this._currentCancellable=r;for(var s=n;s{"use strict";var n=r(6587);var i;var s=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")};var o=n.getNativePromise();if(n.isNode&&typeof MutationObserver==="undefined"){var a=global.setImmediate;var c=process.nextTick;i=n.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if(typeof o==="function"&&typeof o.resolve==="function"){var u=o.resolve();i=function(t){u.then(t)}}else if(typeof MutationObserver!=="undefined"&&!(typeof window!=="undefined"&&window.navigator&&(window.navigator.standalone||window.cordova))&&"classList"in document.documentElement){i=function(){var t=document.createElement("div");var e={attributes:true};var r=false;var n=document.createElement("div");var i=new MutationObserver(function(){t.classList.toggle("foo");r=false});i.observe(n,e);var s=function(){if(r)return;r=true;n.classList.toggle("foo")};return function schedule(r){var n=new MutationObserver(function(){n.disconnect();r()});n.observe(t,e);s()}}()}else if(typeof setImmediate!=="undefined"){i=function(t){setImmediate(t)}}else if(typeof setTimeout!=="undefined"){i=function(t){setTimeout(t,0)}}else{i=s}t.exports=i},8741:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var i=t.PromiseInspection;var s=r(6587);function SettledPromiseArray(t){this.constructor$(t)}s.inherits(SettledPromiseArray,e);SettledPromiseArray.prototype._promiseResolved=function(t,e){this._values[t]=e;var r=++this._totalResolved;if(r>=this._length){this._resolve(this._values);return true}return false};SettledPromiseArray.prototype._promiseFulfilled=function(t,e){var r=new i;r._bitField=33554432;r._settledValueField=t;return this._promiseResolved(e,r)};SettledPromiseArray.prototype._promiseRejected=function(t,e){var r=new i;r._bitField=16777216;r._settledValueField=t;return this._promiseResolved(e,r)};t.settle=function(t){n.deprecated(".settle()",".reflect()");return new SettledPromiseArray(t).promise()};t.allSettled=function(t){return new SettledPromiseArray(t).promise()};t.prototype.settle=function(){return t.settle(this)}}},5566:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var i=r(6587);var s=r(9640).RangeError;var o=r(9640).AggregateError;var a=i.isArray;var c={};function SomePromiseArray(t){this.constructor$(t);this._howMany=0;this._unwrap=false;this._initialized=false}i.inherits(SomePromiseArray,e);SomePromiseArray.prototype._init=function(){if(!this._initialized){return}if(this._howMany===0){this._resolve([]);return}this._init$(undefined,-5);var t=a(this._values);if(!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()){this._reject(this._getRangeError(this.length()))}};SomePromiseArray.prototype.init=function(){this._initialized=true;this._init()};SomePromiseArray.prototype.setUnwrap=function(){this._unwrap=true};SomePromiseArray.prototype.howMany=function(){return this._howMany};SomePromiseArray.prototype.setHowMany=function(t){this._howMany=t};SomePromiseArray.prototype._promiseFulfilled=function(t){this._addFulfilled(t);if(this._fulfilled()===this.howMany()){this._values.length=this.howMany();if(this.howMany()===1&&this._unwrap){this._resolve(this._values[0])}else{this._resolve(this._values)}return true}return false};SomePromiseArray.prototype._promiseRejected=function(t){this._addRejected(t);return this._checkOutcome()};SomePromiseArray.prototype._promiseCancelled=function(){if(this._values instanceof t||this._values==null){return this._cancel()}this._addRejected(c);return this._checkOutcome()};SomePromiseArray.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){var t=new o;for(var e=this.length();e0){this._reject(t)}else{this._cancel()}return true}return false};SomePromiseArray.prototype._fulfilled=function(){return this._totalResolved};SomePromiseArray.prototype._rejected=function(){return this._values.length-this.length()};SomePromiseArray.prototype._addRejected=function(t){this._values.push(t)};SomePromiseArray.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t};SomePromiseArray.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()};SomePromiseArray.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new s(e)};SomePromiseArray.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))};function some(t,e){if((e|0)!==e||e<0){return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n")}var r=new SomePromiseArray(t);var i=r.promise();r.setHowMany(e);r.init();return i}t.some=function(t,e){return some(t,e)};t.prototype.some=function(t){return some(this,t)};t._SomePromiseArray=SomePromiseArray}},7659:t=>{"use strict";t.exports=function(t){function PromiseInspection(t){if(t!==undefined){t=t._target();this._bitField=t._bitField;this._settledValueField=t._isFateSealed()?t._settledValue():undefined}else{this._bitField=0;this._settledValueField=undefined}}PromiseInspection.prototype._settledValue=function(){return this._settledValueField};var e=PromiseInspection.prototype.value=function(){if(!this.isFulfilled()){throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n")}return this._settledValue()};var r=PromiseInspection.prototype.error=PromiseInspection.prototype.reason=function(){if(!this.isRejected()){throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n")}return this._settledValue()};var n=PromiseInspection.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0};var i=PromiseInspection.prototype.isRejected=function(){return(this._bitField&16777216)!==0};var s=PromiseInspection.prototype.isPending=function(){return(this._bitField&50397184)===0};var o=PromiseInspection.prototype.isResolved=function(){return(this._bitField&50331648)!==0};PromiseInspection.prototype.isCancelled=function(){return(this._bitField&8454144)!==0};t.prototype.__isCancelled=function(){return(this._bitField&65536)===65536};t.prototype._isCancelled=function(){return this._target().__isCancelled()};t.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0};t.prototype.isPending=function(){return s.call(this._target())};t.prototype.isRejected=function(){return i.call(this._target())};t.prototype.isFulfilled=function(){return n.call(this._target())};t.prototype.isResolved=function(){return o.call(this._target())};t.prototype.value=function(){return e.call(this._target())};t.prototype.reason=function(){var t=this._target();t._unsetRejectionIsUnhandled();return r.call(t)};t.prototype._value=function(){return this._settledValue()};t.prototype._reason=function(){this._unsetRejectionIsUnhandled();return this._settledValue()};t.PromiseInspection=PromiseInspection}},3938:(t,e,r)=>{"use strict";t.exports=function(t,e){var n=r(6587);var i=n.errorObj;var s=n.isObject;function tryConvertToPromise(r,n){if(s(r)){if(r instanceof t)return r;var o=getThen(r);if(o===i){if(n)n._pushContext();var a=t.reject(o.e);if(n)n._popContext();return a}else if(typeof o==="function"){if(isAnyBluebirdPromise(r)){var a=new t(e);r._then(a._fulfill,a._reject,undefined,a,null);return a}return doThenable(r,o,n)}}return r}function doGetThen(t){return t.then}function getThen(t){try{return doGetThen(t)}catch(t){i.e=t;return i}}var o={}.hasOwnProperty;function isAnyBluebirdPromise(t){try{return o.call(t,"_promise0")}catch(t){return false}}function doThenable(r,s,o){var a=new t(e);var c=a;if(o)o._pushContext();a._captureStackTrace();if(o)o._popContext();var u=true;var l=n.tryCatch(s).call(r,resolve,reject);u=false;if(a&&l===i){a._rejectCallback(l.e,true,true);a=null}function resolve(t){if(!a)return;a._resolveCallback(t);a=null}function reject(t){if(!a)return;a._rejectCallback(t,u,true);a=null}return c}return tryConvertToPromise}},8329:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var i=r(6587);var s=t.TimeoutError;function HandleWrapper(t){this.handle=t}HandleWrapper.prototype._resultCancelled=function(){clearTimeout(this.handle)};var o=function(t){return a(+this).thenReturn(t)};var a=t.delay=function(r,i){var s;var a;if(i!==undefined){s=t.resolve(i)._then(o,null,null,r,undefined);if(n.cancellation()&&i instanceof t){s._setOnCancel(i)}}else{s=new t(e);a=setTimeout(function(){s._fulfill()},+r);if(n.cancellation()){s._setOnCancel(new HandleWrapper(a))}s._captureStackTrace()}s._setAsyncGuaranteed();return s};t.prototype.delay=function(t){return a(t,this)};var c=function(t,e,r){var n;if(typeof e!=="string"){if(e instanceof Error){n=e}else{n=new s("operation timed out")}}else{n=new s(e)}i.markAsOriginatingFromRejection(n);t._attachExtraTrace(n);t._reject(n);if(r!=null){r.cancel()}};function successClear(t){clearTimeout(this.handle);return t}function failureClear(t){clearTimeout(this.handle);throw t}t.prototype.timeout=function(t,e){t=+t;var r,i;var s=new HandleWrapper(setTimeout(function timeoutTimeout(){if(r.isPending()){c(r,e,i)}},t));if(n.cancellation()){i=this.then();r=i._then(successClear,failureClear,undefined,s,undefined);r._setOnCancel(s)}else{r=this._then(successClear,failureClear,undefined,s,undefined)}return r}}},1904:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i,s,o){var a=r(6587);var c=r(9640).TypeError;var u=r(6587).inherits;var l=a.errorObj;var f=a.tryCatch;var h={};function thrower(t){setTimeout(function(){throw t},0)}function castPreservingDisposable(t){var e=n(t);if(e!==t&&typeof t._isDisposable==="function"&&typeof t._getDisposer==="function"&&t._isDisposable()){e._setDisposable(t._getDisposer())}return e}function dispose(e,r){var i=0;var o=e.length;var a=new t(s);function iterator(){if(i>=o)return a._fulfill();var s=castPreservingDisposable(e[i++]);if(s instanceof t&&s._isDisposable()){try{s=n(s._getDisposer().tryDispose(r),e.promise)}catch(t){return thrower(t)}if(s instanceof t){return s._then(iterator,thrower,null,null,null)}}iterator()}iterator();return a}function Disposer(t,e,r){this._data=t;this._promise=e;this._context=r}Disposer.prototype.data=function(){return this._data};Disposer.prototype.promise=function(){return this._promise};Disposer.prototype.resource=function(){if(this.promise().isFulfilled()){return this.promise().value()}return h};Disposer.prototype.tryDispose=function(t){var e=this.resource();var r=this._context;if(r!==undefined)r._pushContext();var n=e!==h?this.doDispose(e,t):null;if(r!==undefined)r._popContext();this._promise._unsetDisposable();this._data=null;return n};Disposer.isDisposer=function(t){return t!=null&&typeof t.resource==="function"&&typeof t.tryDispose==="function"};function FunctionDisposer(t,e,r){this.constructor$(t,e,r)}u(FunctionDisposer,Disposer);FunctionDisposer.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)};function maybeUnwrapDisposer(t){if(Disposer.isDisposer(t)){this.resources[this.index]._setDisposable(t);return t.promise()}return t}function ResourceList(t){this.length=t;this.promise=null;this[t-1]=null}ResourceList.prototype._resultCancelled=function(){var e=this.length;for(var r=0;r0};t.prototype._getDisposer=function(){return this._disposer};t.prototype._unsetDisposable=function(){this._bitField=this._bitField&~131072;this._disposer=undefined};t.prototype.disposer=function(t){if(typeof t==="function"){return new FunctionDisposer(t,this,i())}throw new c}}},6587:function(module,__unused_webpack_exports,__webpack_require__){"use strict";var es5=__webpack_require__(9048);var canEvaluate=typeof navigator=="undefined";var errorObj={e:{}};var tryCatchTarget;var globalObject=typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:this!==undefined?this:null;function tryCatcher(){try{var t=tryCatchTarget;tryCatchTarget=null;return t.apply(this,arguments)}catch(t){errorObj.e=t;return errorObj}}function tryCatch(t){tryCatchTarget=t;return tryCatcher}var inherits=function(t,e){var r={}.hasOwnProperty;function T(){this.constructor=t;this.constructor$=e;for(var n in e.prototype){if(r.call(e.prototype,n)&&n.charAt(n.length-1)!=="$"){this[n+"$"]=e.prototype[n]}}}T.prototype=e.prototype;t.prototype=new T;return t.prototype};function isPrimitive(t){return t==null||t===true||t===false||typeof t==="string"||typeof t==="number"}function isObject(t){return typeof t==="function"||typeof t==="object"&&t!==null}function maybeWrapAsError(t){if(!isPrimitive(t))return t;return new Error(safeToString(t))}function withAppended(t,e){var r=t.length;var n=new Array(r+1);var i;for(i=0;i1;var n=e.length>0&&!(e.length===1&&e[0]==="constructor");var i=thisAssignmentPattern.test(t+"")&&es5.names(t).length>0;if(r||n||i){return true}}return false}catch(t){return false}}function toFastProperties(obj){function FakeConstructor(){}FakeConstructor.prototype=obj;var receiver=new FakeConstructor;function ic(){return typeof receiver.foo}ic();ic();return obj;eval(obj)}var rident=/^[a-z$_][a-z$_0-9]*$/i;function isIdentifier(t){return rident.test(t)}function filledRange(t,e,r){var n=new Array(t);for(var i=0;i10||t[0]>0}();ret.nodeSupportsAsyncResource=ret.isNode&&function(){var t=false;try{var e=__webpack_require__(7303).AsyncResource;t=typeof e.prototype.runInAsyncScope==="function"}catch(e){t=false}return t}();if(ret.isNode)ret.toFastProperties(process);try{throw new Error}catch(t){ret.lastLineError=t}module.exports=ret},5533:(t,e,r)=>{var n=r(5179);var i=r(587);t.exports=expandTop;var s="\0SLASH"+Math.random()+"\0";var o="\0OPEN"+Math.random()+"\0";var a="\0CLOSE"+Math.random()+"\0";var c="\0COMMA"+Math.random()+"\0";var u="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(s).split("\\{").join(o).split("\\}").join(a).split("\\,").join(c).split("\\.").join(u)}function unescapeBraces(t){return t.split(s).join("\\").split(o).join("{").split(a).join("}").split(c).join(",").split(u).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var r=i("{","}",t);if(!r)return t.split(",");var n=r.pre;var s=r.body;var o=r.post;var a=n.split(",");a[a.length-1]+="{"+s+"}";var c=parseCommaParts(o);if(o.length){a[a.length-1]+=c.shift();a.push.apply(a,c)}e.push.apply(e,a);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function identity(t){return t}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var r=[];var s=i("{","}",t);if(!s||/\$$/.test(s.pre))return[t];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body);var c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body);var u=o||c;var l=s.body.indexOf(",")>=0;if(!u&&!l){if(s.post.match(/,.*\}/)){t=s.pre+"{"+s.body+a+s.post;return expand(t)}return[t]}var f;if(u){f=s.body.split(/\.\./)}else{f=parseCommaParts(s.body);if(f.length===1){f=expand(f[0],false).map(embrace);if(f.length===1){var h=s.post.length?expand(s.post,false):[""];return h.map(function(t){return s.pre+f[0]+t})}}}var p=s.pre;var h=s.post.length?expand(s.post,false):[""];var d;if(u){var y=numeric(f[0]);var v=numeric(f[1]);var m=Math.max(f[0].length,f[1].length);var g=f.length==3?Math.abs(numeric(f[2])):1;var _=lte;var w=v0){var x=new Array(k+1).join("0");if(S<0)E="-"+x+E.slice(1);else E=x+E}}}d.push(E)}}else{d=n(f,function(t){return expand(t,false)})}for(var C=0;C{"use strict";const n=r(2087);const i=/\s+at.*(?:\(|\s)(.*)\)?/;const s=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;const o=typeof n.homedir==="undefined"?"":n.homedir();t.exports=((t,e)=>{e=Object.assign({pretty:false},e);return t.replace(/\\/g,"/").split("\n").filter(t=>{const e=t.match(i);if(e===null||!e[1]){return true}const r=e[1];if(r.includes(".app/Contents/Resources/electron.asar")||r.includes(".app/Contents/Resources/default_app.asar")){return false}return!s.test(r)}).filter(t=>t.trim()!=="").map(t=>{if(e.pretty){return t.replace(i,(t,e)=>t.replace(e,e.replace(o,"~")))}return t}).join("\n")})},5179:t=>{t.exports=function(t,r){var n=[];for(var i=0;i{t.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var n=r(5747);var i=n.realpath;var s=n.realpathSync;var o=process.version;var a=/^v[0-5]\./.test(o);var c=r(2145);function newError(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function realpath(t,e,r){if(a){return i(t,e,r)}if(typeof e==="function"){r=e;e=null}i(t,e,function(n,i){if(newError(n)){c.realpath(t,e,r)}else{r(n,i)}})}function realpathSync(t,e){if(a){return s(t,e)}try{return s(t,e)}catch(r){if(newError(r)){return c.realpathSync(t,e)}else{throw r}}}function monkeypatch(){n.realpath=realpath;n.realpathSync=realpathSync}function unmonkeypatch(){n.realpath=i;n.realpathSync=s}},2145:(t,e,r)=>{var n=r(5622);var i=process.platform==="win32";var s=r(5747);var o=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var t;if(o){var e=new Error;t=debugCallback}else t=missingCallback;return t;function debugCallback(t){if(t){e.message=t.message;t=e;missingCallback(t)}}function missingCallback(t){if(t){if(process.throwDeprecation)throw t;else if(!process.noDeprecation){var e="fs: missing callback "+(t.stack||t.message);if(process.traceDeprecation)console.trace(e);else console.error(e)}}}}function maybeCallback(t){return typeof t==="function"?t:rethrow()}var a=n.normalize;if(i){var c=/(.*?)(?:[\/\\]+|$)/g}else{var c=/(.*?)(?:[\/]+|$)/g}if(i){var u=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var u=/^[\/]*/}e.realpathSync=function realpathSync(t,e){t=n.resolve(t);if(e&&Object.prototype.hasOwnProperty.call(e,t)){return e[t]}var r=t,o={},a={};var l;var f;var h;var p;start();function start(){var e=u.exec(t);l=e[0].length;f=e[0];h=e[0];p="";if(i&&!a[h]){s.lstatSync(h);a[h]=true}}while(l=t.length){if(e)e[o]=t;return r(null,t)}c.lastIndex=f;var n=c.exec(t);d=h;h+=n[0];p=d+n[1];f=c.lastIndex;if(l[p]||e&&e[p]===p){return process.nextTick(LOOP)}if(e&&Object.prototype.hasOwnProperty.call(e,p)){return gotResolvedLink(e[p])}return s.lstat(p,gotStat)}function gotStat(t,n){if(t)return r(t);if(!n.isSymbolicLink()){l[p]=true;if(e)e[p]=p;return process.nextTick(LOOP)}if(!i){var o=n.dev.toString(32)+":"+n.ino.toString(32);if(a.hasOwnProperty(o)){return gotTarget(null,a[o],p)}}s.stat(p,function(t){if(t)return r(t);s.readlink(p,function(t,e){if(!i)a[o]=e;gotTarget(t,e)})})}function gotTarget(t,i,s){if(t)return r(t);var o=n.resolve(d,i);if(e)e[s]=o;gotResolvedLink(o)}function gotResolvedLink(e){t=n.resolve(e,t.slice(f));start()}}},357:(t,e,r)=>{e.alphasort=alphasort;e.alphasorti=alphasorti;e.setopts=setopts;e.ownProp=ownProp;e.makeAbs=makeAbs;e.finish=finish;e.mark=mark;e.isIgnored=isIgnored;e.childrenIgnored=childrenIgnored;function ownProp(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var n=r(5622);var i=r(6944);var s=r(6540);var o=i.Minimatch;function alphasorti(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}function alphasort(t,e){return t.localeCompare(e)}function setupIgnores(t,e){t.ignore=e.ignore||[];if(!Array.isArray(t.ignore))t.ignore=[t.ignore];if(t.ignore.length){t.ignore=t.ignore.map(ignoreMap)}}function ignoreMap(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new o(r,{dot:true})}return{matcher:new o(t,{dot:true}),gmatcher:e}}function setopts(t,e,r){if(!r)r={};if(r.matchBase&&-1===e.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}e="**/"+e}t.silent=!!r.silent;t.pattern=e;t.strict=r.strict!==false;t.realpath=!!r.realpath;t.realpathCache=r.realpathCache||Object.create(null);t.follow=!!r.follow;t.dot=!!r.dot;t.mark=!!r.mark;t.nodir=!!r.nodir;if(t.nodir)t.mark=true;t.sync=!!r.sync;t.nounique=!!r.nounique;t.nonull=!!r.nonull;t.nosort=!!r.nosort;t.nocase=!!r.nocase;t.stat=!!r.stat;t.noprocess=!!r.noprocess;t.absolute=!!r.absolute;t.maxLength=r.maxLength||Infinity;t.cache=r.cache||Object.create(null);t.statCache=r.statCache||Object.create(null);t.symlinks=r.symlinks||Object.create(null);setupIgnores(t,r);t.changedCwd=false;var i=process.cwd();if(!ownProp(r,"cwd"))t.cwd=i;else{t.cwd=n.resolve(r.cwd);t.changedCwd=t.cwd!==i}t.root=r.root||n.resolve(t.cwd,"/");t.root=n.resolve(t.root);if(process.platform==="win32")t.root=t.root.replace(/\\/g,"/");t.cwdAbs=s(t.cwd)?t.cwd:makeAbs(t,t.cwd);if(process.platform==="win32")t.cwdAbs=t.cwdAbs.replace(/\\/g,"/");t.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;t.minimatch=new o(e,r);t.options=t.minimatch.options}function finish(t){var e=t.nounique;var r=e?[]:Object.create(null);for(var n=0,i=t.matches.length;n{t.exports=glob;var n=r(5747);var i=r(4082);var s=r(6944);var o=s.Minimatch;var a=r(2989);var c=r(8614).EventEmitter;var u=r(5622);var l=r(2357);var f=r(6540);var h=r(8427);var p=r(357);var d=p.alphasort;var y=p.alphasorti;var v=p.setopts;var m=p.ownProp;var g=r(4889);var _=r(1669);var w=p.childrenIgnored;var b=p.isIgnored;var S=r(6754);function glob(t,e,r){if(typeof e==="function")r=e,e={};if(!e)e={};if(e.sync){if(r)throw new TypeError("callback provided to sync glob");return h(t,e)}return new Glob(t,e,r)}glob.sync=h;var E=glob.GlobSync=h.GlobSync;glob.glob=glob;function extend(t,e){if(e===null||typeof e!=="object"){return t}var r=Object.keys(e);var n=r.length;while(n--){t[r[n]]=e[r[n]]}return t}glob.hasMagic=function(t,e){var r=extend({},e);r.noprocess=true;var n=new Glob(t,r);var i=n.minimatch.set;if(!t)return false;if(i.length>1)return true;for(var s=0;sthis.maxLength)return e();if(!this.stat&&m(this.cache,r)){var s=this.cache[r];if(Array.isArray(s))s="DIR";if(!i||s==="DIR")return e(null,s);if(i&&s==="FILE")return e()}var o;var a=this.statCache[r];if(a!==undefined){if(a===false)return e(null,a);else{var c=a.isDirectory()?"DIR":"FILE";if(i&&c==="FILE")return e();else return e(null,c,a)}}var u=this;var l=g("stat\0"+r,lstatcb_);if(l)n.lstat(r,l);function lstatcb_(i,s){if(s&&s.isSymbolicLink()){return n.stat(r,function(n,i){if(n)u._stat2(t,r,null,s,e);else u._stat2(t,r,n,i,e)})}else{u._stat2(t,r,i,s,e)}}};Glob.prototype._stat2=function(t,e,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[e]=false;return i()}var s=t.slice(-1)==="/";this.statCache[e]=n;if(e.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var o=true;if(n)o=n.isDirectory()?"DIR":"FILE";this.cache[e]=this.cache[e]||o;if(s&&o==="FILE")return i();return i(null,o,n)}},8427:(t,e,r)=>{t.exports=globSync;globSync.GlobSync=GlobSync;var n=r(5747);var i=r(4082);var s=r(6944);var o=s.Minimatch;var a=r(7966).Glob;var c=r(1669);var u=r(5622);var l=r(2357);var f=r(6540);var h=r(357);var p=h.alphasort;var d=h.alphasorti;var y=h.setopts;var v=h.ownProp;var m=h.childrenIgnored;var g=h.isIgnored;function globSync(t,e){if(typeof e==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(t,e).found}function GlobSync(t,e){if(!t)throw new Error("must provide pattern");if(typeof e==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(t,e);y(this,t,e);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;nthis.maxLength)return false;if(!this.stat&&v(this.cache,e)){var i=this.cache[e];if(Array.isArray(i))i="DIR";if(!r||i==="DIR")return i;if(r&&i==="FILE")return false}var s;var o=this.statCache[e];if(!o){var a;try{a=n.lstatSync(e)}catch(t){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR")){this.statCache[e]=false;return false}}if(a&&a.isSymbolicLink()){try{o=n.statSync(e)}catch(t){o=a}}else{o=a}}this.statCache[e]=o;var i=true;if(o)i=o.isDirectory()?"DIR":"FILE";this.cache[e]=this.cache[e]||i;if(r&&i==="FILE")return false;return i};GlobSync.prototype._mark=function(t){return h.mark(this,t)};GlobSync.prototype._makeAbs=function(t){return h.makeAbs(this,t)}},8681:t=>{(function(){var e;function MurmurHash3(t,r){var n=this instanceof MurmurHash3?this:e;n.reset(r);if(typeof t==="string"&&t.length>0){n.hash(t)}if(n!==this){return n}}MurmurHash3.prototype.hash=function(t){var e,r,n,i,s;s=t.length;this.len+=s;r=this.k1;n=0;switch(this.rem){case 0:r^=s>n?t.charCodeAt(n++)&65535:0;case 1:r^=s>n?(t.charCodeAt(n++)&65535)<<8:0;case 2:r^=s>n?(t.charCodeAt(n++)&65535)<<16:0;case 3:r^=s>n?(t.charCodeAt(n)&255)<<24:0;r^=s>n?(t.charCodeAt(n++)&65280)>>8:0}this.rem=s+this.rem&3;s-=this.rem;if(s>0){e=this.h1;while(1){r=r*11601+(r&65535)*3432906752&4294967295;r=r<<15|r>>>17;r=r*13715+(r&65535)*461832192&4294967295;e^=r;e=e<<13|e>>>19;e=e*5+3864292196&4294967295;if(n>=s){break}r=t.charCodeAt(n++)&65535^(t.charCodeAt(n++)&65535)<<8^(t.charCodeAt(n++)&65535)<<16;i=t.charCodeAt(n++);r^=(i&255)<<24^(i&65280)>>8}r=0;switch(this.rem){case 3:r^=(t.charCodeAt(n+2)&65535)<<16;case 2:r^=(t.charCodeAt(n+1)&65535)<<8;case 1:r^=t.charCodeAt(n)&65535}this.h1=e}this.k1=r;return this};MurmurHash3.prototype.result=function(){var t,e;t=this.k1;e=this.h1;if(t>0){t=t*11601+(t&65535)*3432906752&4294967295;t=t<<15|t>>>17;t=t*13715+(t&65535)*461832192&4294967295;e^=t}e^=this.len;e^=e>>>16;e=e*51819+(e&65535)*2246770688&4294967295;e^=e>>>13;e=e*44597+(e&65535)*3266445312&4294967295;e^=e>>>16;return e>>>0};MurmurHash3.prototype.reset=function(t){this.h1=typeof t==="number"?t:0;this.rem=this.k1=this.len=0;return this};e=new MurmurHash3;if(true){t.exports=MurmurHash3}else{}})()},9609:(t,e,r)=>{const n=new Map;const i=r(5747);const{dirname:s,resolve:o}=r(5622);const a=t=>new Promise((e,r)=>i.lstat(t,(t,n)=>t?r(t):e(n)));const c=t=>{t=o(t);if(n.has(t))return Promise.resolve(n.get(t));const e=e=>{const{uid:r,gid:i}=e;n.set(t,{uid:r,gid:i});return{uid:r,gid:i}};const r=s(t);const i=r===t?null:e=>{return c(r).then(e=>{n.set(t,e);return e})};return a(t).then(e,i)};const u=t=>{t=o(t);if(n.has(t))return n.get(t);const e=s(t);let r=true;try{const s=i.lstatSync(t);r=false;const{uid:o,gid:a}=s;n.set(t,{uid:o,gid:a});return{uid:o,gid:a}}finally{if(r&&e!==t){const r=u(e);n.set(t,r);return r}}};const l=new Map;t.exports=(t=>{t=o(t);if(l.has(t))return Promise.resolve(l.get(t));const e=c(t).then(e=>{l.delete(t);return e});l.set(t,e);return e});t.exports.sync=u;t.exports.clearCache=(()=>{n.clear();l.clear()})},4889:(t,e,r)=>{var n=r(3640);var i=Object.create(null);var s=r(6754);t.exports=n(inflight);function inflight(t,e){if(i[t]){i[t].push(e);return null}else{i[t]=[e];return makeres(t)}}function makeres(t){return s(function RES(){var e=i[t];var r=e.length;var n=slice(arguments);try{for(var s=0;sr){e.splice(0,r);process.nextTick(function(){RES.apply(null,n)})}else{delete i[t]}}})}function slice(t){var e=t.length;var r=[];for(var n=0;n{try{var n=r(1669);if(typeof n.inherits!=="function")throw"";t.exports=n.inherits}catch(e){t.exports=r(7350)}},7350:t=>{if(typeof Object.create==="function"){t.exports=function inherits(t,e){if(e){t.super_=e;t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}})}}}else{t.exports=function inherits(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype;t.prototype=new r;t.prototype.constructor=t}}}},6944:(t,e,r)=>{t.exports=minimatch;minimatch.Minimatch=Minimatch;var n={sep:"/"};try{n=r(5622)}catch(t){}var i=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var s=r(5533);var o={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var a="[^/]";var c=a+"*?";var u="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var l="(?:(?!(?:\\/|^)\\.).)*?";var f=charSet("().*{}+?[]^$\\!");function charSet(t){return t.split("").reduce(function(t,e){t[e]=true;return t},{})}var h=/\/+/;minimatch.filter=filter;function filter(t,e){e=e||{};return function(r,n,i){return minimatch(r,t,e)}}function ext(t,e){t=t||{};e=e||{};var r={};Object.keys(e).forEach(function(t){r[t]=e[t]});Object.keys(t).forEach(function(e){r[e]=t[e]});return r}minimatch.defaults=function(t){if(!t||!Object.keys(t).length)return minimatch;var e=minimatch;var r=function minimatch(r,n,i){return e.minimatch(r,n,ext(t,i))};r.Minimatch=function Minimatch(r,n){return new e.Minimatch(r,ext(t,n))};return r};Minimatch.defaults=function(t){if(!t||!Object.keys(t).length)return Minimatch;return minimatch.defaults(t).Minimatch};function minimatch(t,e,r){if(typeof e!=="string"){throw new TypeError("glob pattern string required")}if(!r)r={};if(!r.nocomment&&e.charAt(0)==="#"){return false}if(e.trim()==="")return t==="";return new Minimatch(e,r).match(t)}function Minimatch(t,e){if(!(this instanceof Minimatch)){return new Minimatch(t,e)}if(typeof t!=="string"){throw new TypeError("glob pattern string required")}if(!e)e={};t=t.trim();if(n.sep!=="/"){t=t.split(n.sep).join("/")}this.options=e;this.set=[];this.pattern=t;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var t=this.pattern;var e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(e.debug)this.debug=console.error;this.debug(this.pattern,r);r=this.globParts=r.map(function(t){return t.split(h)});this.debug(this.pattern,r);r=r.map(function(t,e,r){return t.map(this.parse,this)},this);this.debug(this.pattern,r);r=r.filter(function(t){return t.indexOf(false)===-1});this.debug(this.pattern,r);this.set=r}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var t=this.pattern;var e=false;var r=this.options;var n=0;if(r.nonegate)return;for(var i=0,s=t.length;i1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&t==="**")return i;if(t==="")return"";var n="";var s=!!r.nocase;var u=false;var l=[];var h=[];var d;var y=false;var v=-1;var m=-1;var g=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var _=this;function clearStateChar(){if(d){switch(d){case"*":n+=c;s=true;break;case"?":n+=a;s=true;break;default:n+="\\"+d;break}_.debug("clearStateChar %j %j",d,n);d=false}}for(var w=0,b=t.length,S;w-1;P--){var j=h[P];var O=n.slice(0,j.reStart);var F=n.slice(j.reStart,j.reEnd-8);var R=n.slice(j.reEnd-8,j.reEnd);var N=n.slice(j.reEnd);R+=N;var D=O.split("(").length-1;var I=N;for(w=0;w=0;o--){s=t[o];if(s)break}for(o=0;o>> no match, partial?",t,f,e,h);if(f===a)return true}return false}var d;if(typeof u==="string"){if(n.nocase){d=l.toLowerCase()===u.toLowerCase()}else{d=l===u}this.debug("string match",u,l,d)}else{d=l.match(u);this.debug("pattern match",u,l,d)}if(!d)return false}if(s===a&&o===c){return true}else if(s===a){return r}else if(o===c){var y=s===a-1&&t[s]==="";return y}throw new Error("wtf?")};function globUnescape(t){return t.replace(/\\(.)/g,"$1")}function regExpEscape(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},5283:(t,e,r)=>{const n=r(8351);const i=Symbol("_data");const s=Symbol("_length");class Collect extends n{constructor(t){super(t);this[i]=[];this[s]=0}write(t,e,r){if(typeof e==="function")r=e,e="utf8";if(!e)e="utf8";const n=Buffer.isBuffer(t)?t:Buffer.from(t,e);this[i].push(n);this[s]+=n.length;if(r)r();return true}end(t,e,r){if(typeof t==="function")r=t,t=null;if(typeof e==="function")r=e,e="utf8";if(t)this.write(t,e);const n=Buffer.concat(this[i],this[s]);super.write(n);return super.end(r)}}t.exports=Collect;class CollectPassThrough extends n{constructor(t){super(t);this[i]=[];this[s]=0}write(t,e,r){if(typeof e==="function")r=e,e="utf8";if(!e)e="utf8";const n=Buffer.isBuffer(t)?t:Buffer.from(t,e);this[i].push(n);this[s]+=n.length;return super.write(t,e,r)}end(t,e,r){if(typeof t==="function")r=t,t=null;if(typeof e==="function")r=e,e="utf8";if(t)this.write(t,e);const n=Buffer.concat(this[i],this[s]);this.emit("collect",n);return super.end(r)}}t.exports.PassThrough=CollectPassThrough},4145:(t,e,r)=>{const n=r(8351);const i=Symbol("_flush");const s=Symbol("_flushed");const o=Symbol("_flushing");class Flush extends n{constructor(t={}){if(typeof t==="function")t={flush:t};super(t);if(typeof t.flush!=="function"&&typeof this.flush!=="function")throw new TypeError("must provide flush function in options");this[i]=t.flush||this.flush}emit(t,...e){if(t!=="end"&&t!=="finish"||this[s])return super.emit(t,...e);if(this[o])return;this[o]=true;const r=t=>{this[s]=true;t?super.emit("error",t):super.emit("end")};const n=this[i](r);if(n&&n.then)n.then(()=>r(),t=>r(t))}}t.exports=Flush},6436:(t,e,r)=>{const n=r(8351);const i=r(8614);const s=t=>t&&t instanceof i&&(typeof t.pipe==="function"||typeof t.write==="function"&&typeof t.end==="function");const o=Symbol("_head");const a=Symbol("_tail");const c=Symbol("_linkStreams");const u=Symbol("_setHead");const l=Symbol("_setTail");const f=Symbol("_onError");const h=Symbol("_onData");const p=Symbol("_onEnd");const d=Symbol("_onDrain");const y=Symbol("_streams");class Pipeline extends n{constructor(t,...e){if(s(t)){e.unshift(t);t={}}super(t);this[y]=[];if(e.length)this.push(...e)}[c](t){return t.reduce((t,e)=>{t.on("error",t=>e.emit("error",t));t.pipe(e);return e})}push(...t){this[y].push(...t);if(this[a])t.unshift(this[a]);const e=this[c](t);this[l](e);if(!this[o])this[u](t[0])}unshift(...t){this[y].unshift(...t);if(this[o])t.push(this[o]);const e=this[c](t);this[u](t[0]);if(!this[a])this[l](e)}destroy(t){this[y].forEach(t=>typeof t.destroy==="function"&&t.destroy());return super.destroy(t)}[l](t){this[a]=t;t.on("error",e=>this[f](t,e));t.on("data",e=>this[h](t,e));t.on("end",()=>this[p](t));t.on("finish",()=>this[p](t))}[f](t,e){if(t===this[a])this.emit("error",e)}[h](t,e){if(t===this[a])super.write(e)}[p](t){if(t===this[a])super.end()}pause(){super.pause();return this[a]&&this[a].pause&&this[a].pause()}emit(t,...e){if(t==="resume"&&this[a]&&this[a].resume)this[a].resume();return super.emit(t,...e)}[u](t){this[o]=t;t.on("drain",()=>this[d](t))}[d](t){if(t===this[o])this.emit("drain")}write(t,e,r){return this[o].write(t,e,r)}end(t,e,r){this[o].end(t,e,r);return this}}t.exports=Pipeline},8351:(t,e,r)=>{"use strict";const n=r(8614);const i=r(2413);const s=r(546);const o=r(4304).StringDecoder;const a=Symbol("EOF");const c=Symbol("maybeEmitEnd");const u=Symbol("emittedEnd");const l=Symbol("emittingEnd");const f=Symbol("closed");const h=Symbol("read");const p=Symbol("flush");const d=Symbol("flushChunk");const y=Symbol("encoding");const v=Symbol("decoder");const m=Symbol("flowing");const g=Symbol("paused");const _=Symbol("resume");const w=Symbol("bufferLength");const b=Symbol("bufferPush");const S=Symbol("bufferShift");const E=Symbol("objectMode");const k=Symbol("destroyed");const x=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const C=x&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const A=x&&Symbol.iterator||Symbol("iterator not implemented");const T=t=>t==="end"||t==="finish"||t==="prefinish";const P=t=>t instanceof ArrayBuffer||typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const j=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);t.exports=class Minipass extends i{constructor(t){super();this[m]=false;this[g]=false;this.pipes=new s;this.buffer=new s;this[E]=t&&t.objectMode||false;if(this[E])this[y]=null;else this[y]=t&&t.encoding||null;if(this[y]==="buffer")this[y]=null;this[v]=this[y]?new o(this[y]):null;this[a]=false;this[u]=false;this[l]=false;this[f]=false;this.writable=true;this.readable=true;this[w]=0;this[k]=false}get bufferLength(){return this[w]}get encoding(){return this[y]}set encoding(t){if(this[E])throw new Error("cannot set encoding in objectMode");if(this[y]&&t!==this[y]&&(this[v]&&this[v].lastNeed||this[w]))throw new Error("cannot change encoding");if(this[y]!==t){this[v]=t?new o(t):null;if(this.buffer.length)this.buffer=this.buffer.map(t=>this[v].write(t))}this[y]=t}setEncoding(t){this.encoding=t}get objectMode(){return this[E]}set objectMode(t){this[E]=this[E]||!!t}write(t,e,r){if(this[a])throw new Error("write after end");if(this[k]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof e==="function")r=e,e="utf8";if(!e)e="utf8";if(!this[E]&&!Buffer.isBuffer(t)){if(j(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(P(t))t=Buffer.from(t);else if(typeof t!=="string")this.objectMode=true}if(!this.objectMode&&!t.length){const t=this.flowing;if(this[w]!==0)this.emit("readable");if(r)r();return t}if(typeof t==="string"&&!this[E]&&!(e===this[y]&&!this[v].lastNeed)){t=Buffer.from(t,e)}if(Buffer.isBuffer(t)&&this[y])t=this[v].write(t);try{return this.flowing?(this.emit("data",t),this.flowing):(this[b](t),false)}finally{if(this[w]!==0)this.emit("readable");if(r)r()}}read(t){if(this[k])return null;try{if(this[w]===0||t===0||t>this[w])return null;if(this[E])t=null;if(this.buffer.length>1&&!this[E]){if(this.encoding)this.buffer=new s([Array.from(this.buffer).join("")]);else this.buffer=new s([Buffer.concat(Array.from(this.buffer),this[w])])}return this[h](t||null,this.buffer.head.value)}finally{this[c]()}}[h](t,e){if(t===e.length||t===null)this[S]();else{this.buffer.head.value=e.slice(t);e=e.slice(0,t);this[w]-=t}this.emit("data",e);if(!this.buffer.length&&!this[a])this.emit("drain");return e}end(t,e,r){if(typeof t==="function")r=t,t=null;if(typeof e==="function")r=e,e="utf8";if(t)this.write(t,e);if(r)this.once("end",r);this[a]=true;this.writable=false;if(this.flowing||!this[g])this[c]();return this}[_](){if(this[k])return;this[g]=false;this[m]=true;this.emit("resume");if(this.buffer.length)this[p]();else if(this[a])this[c]();else this.emit("drain")}resume(){return this[_]()}pause(){this[m]=false;this[g]=true}get destroyed(){return this[k]}get flowing(){return this[m]}get paused(){return this[g]}[b](t){if(this[E])this[w]+=1;else this[w]+=t.length;return this.buffer.push(t)}[S](){if(this.buffer.length){if(this[E])this[w]-=1;else this[w]-=this.buffer.head.value.length}return this.buffer.shift()}[p](){do{}while(this[d](this[S]()));if(!this.buffer.length&&!this[a])this.emit("drain")}[d](t){return t?(this.emit("data",t),this.flowing):false}pipe(t,e){if(this[k])return;const r=this[u];e=e||{};if(t===process.stdout||t===process.stderr)e.end=false;else e.end=e.end!==false;const n={dest:t,opts:e,ondrain:t=>this[_]()};this.pipes.push(n);t.on("drain",n.ondrain);this[_]();if(r&&n.opts.end)n.dest.end();return t}addListener(t,e){return this.on(t,e)}on(t,e){try{return super.on(t,e)}finally{if(t==="data"&&!this.pipes.length&&!this.flowing)this[_]();else if(T(t)&&this[u]){super.emit(t);this.removeAllListeners(t)}}}get emittedEnd(){return this[u]}[c](){if(!this[l]&&!this[u]&&!this[k]&&this.buffer.length===0&&this[a]){this[l]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[f])this.emit("close");this[l]=false}}emit(t,e){if(t!=="error"&&t!=="close"&&t!==k&&this[k])return;else if(t==="data"){if(!e)return;if(this.pipes.length)this.pipes.forEach(t=>t.dest.write(e)===false&&this.pause())}else if(t==="end"){if(this[u]===true)return;this[u]=true;this.readable=false;if(this[v]){e=this[v].end();if(e){this.pipes.forEach(t=>t.dest.write(e));super.emit("data",e)}}this.pipes.forEach(t=>{t.dest.removeListener("drain",t.ondrain);if(t.opts.end)t.dest.end()})}else if(t==="close"){this[f]=true;if(!this[u]&&!this[k])return}const r=new Array(arguments.length);r[0]=t;r[1]=e;if(arguments.length>2){for(let t=2;t{t.push(e);if(!this[E])t.dataLength+=e.length});return e.then(()=>t)}concat(){return this[E]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(t=>this[E]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?t.join(""):Buffer.concat(t,t.dataLength))}promise(){return new Promise((t,e)=>{this.on(k,()=>e(new Error("stream destroyed")));this.on("end",()=>t());this.on("error",t=>e(t))})}[C](){const t=()=>{const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[a])return Promise.resolve({done:true});let e=null;let r=null;const n=t=>{this.removeListener("data",i);this.removeListener("end",s);r(t)};const i=t=>{this.removeListener("error",n);this.removeListener("end",s);this.pause();e({value:t,done:!!this[a]})};const s=()=>{this.removeListener("error",n);this.removeListener("data",i);e({done:true})};const o=()=>n(new Error("stream destroyed"));return new Promise((t,a)=>{r=a;e=t;this.once(k,o);this.once("error",n);this.once("end",s);this.once("data",i)})};return{next:t}}[A](){const t=()=>{const t=this.read();const e=t===null;return{value:t,done:e}};return{next:t}}destroy(t){if(this[k]){if(t)this.emit("error",t);else this.emit(k);return this}this[k]=true;this.buffer=new s;this[w]=0;if(typeof this.close==="function"&&!this[f])this.close();if(t)this.emit("error",t);else this.emit(k);return this}static isStream(t){return!!t&&(t instanceof Minipass||t instanceof i||t instanceof n&&(typeof t.pipe==="function"||typeof t.write==="function"&&typeof t.end==="function"))}}},2253:t=>{"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},546:(t,e,r)=>{"use strict";t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var e=this;if(!(e instanceof Yallist)){e=new Yallist}e.tail=null;e.head=null;e.length=0;if(t&&typeof t.forEach==="function"){t.forEach(function(t){e.push(t)})}else if(arguments.length>0){for(var r=0,n=arguments.length;r1){r=e}else if(this.head){n=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;n!==null;i++){r=t(r,n.value,i);n=n.next}return r};Yallist.prototype.reduceReverse=function(t,e){var r;var n=this.tail;if(arguments.length>1){r=e}else if(this.tail){n=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;n!==null;i--){r=t(r,n.value,i);n=n.prev}return r};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var e=0,r=this.head;r!==null;e++){t[e]=r.value;r=r.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var e=0,r=this.tail;r!==null;e++){t[e]=r.value;r=r.prev}return t};Yallist.prototype.slice=function(t,e){e=e||this.length;if(e<0){e+=this.length}t=t||0;if(t<0){t+=this.length}var r=new Yallist;if(ethis.length){e=this.length}for(var n=0,i=this.head;i!==null&&nthis.length){e=this.length}for(var n=this.length,i=this.tail;i!==null&&n>e;n--){i=i.prev}for(;i!==null&&n>t;n--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(t,e,...r){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var n=0,i=this.head;i!==null&&n{var n=r(3640);t.exports=n(once);t.exports.strict=n(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(t){var e=function(){if(e.called)return e.value;e.called=true;return e.value=t.apply(this,arguments)};e.called=false;return e}function onceStrict(t){var e=function(){if(e.called)throw new Error(e.onceError);e.called=true;return e.value=t.apply(this,arguments)};var r=t.name||"Function wrapped with `once`";e.onceError=r+" shouldn't be called more than once";e.called=false;return e}},6540:t=>{"use strict";function posix(t){return t.charAt(0)==="/"}function win32(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=e.exec(t);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}t.exports=process.platform==="win32"?win32:posix;t.exports.posix=posix;t.exports.win32=win32},9346:(t,e,r)=>{"use strict";t.exports=inflight;let n;try{n=r(5229)}catch(t){n=Promise}const i={};inflight.active=i;function inflight(t,e){return n.all([t,e]).then(function(t){const e=t[0];const r=t[1];if(Array.isArray(e)){return n.all(e).then(function(t){return _inflight(t.join(""),r)})}else{return _inflight(e,r)}});function _inflight(t,e){if(!i[t]){i[t]=new n(function(t){return t(e())});i[t].then(cleanup,cleanup);function cleanup(){delete i[t]}}return i[t]}}},9536:(t,e,r)=>{"use strict";var n=r(5622);var i=r(5275);t.exports=function(t,e,r){return n.join(t,(e?e+"-":"")+i(r))}},5275:(t,e,r)=>{"use strict";var n=r(8681);t.exports=function(t){if(t){var e=new n(t);return("00000000"+e.result().toString(16)).substr(-8)}else{return(Math.random().toString(16)+"0000000").substr(2,8)}}},3640:t=>{t.exports=wrappy;function wrappy(t,e){if(t&&e)return wrappy(t)(e);if(typeof t!=="function")throw new TypeError("need wrapper function");Object.keys(t).forEach(function(e){wrapper[e]=t[e]});return wrapper;function wrapper(){var e=new Array(arguments.length);for(var r=0;r{"use strict";const n=r(1669);const i=r(5747);const s=r(595);const o=r(5575);const a=r(9409);const c=r(8351);const u=r(5283);const l=r(6436);const f=n.promisify(i.writeFile);t.exports=function get(t,e,r){return getData(false,t,e,r)};t.exports.byDigest=function getByDigest(t,e,r){return getData(true,t,e,r)};function getData(t,e,r,n={}){const{integrity:i,memoize:c,size:u}=n;const l=t?o.get.byDigest(e,r,n):o.get(e,r,n);if(l&&c!==false){return Promise.resolve(t?l:{metadata:l.entry.metadata,data:l.data,integrity:l.entry.integrity,size:l.entry.size})}return(t?Promise.resolve(null):s.find(e,r,n)).then(l=>{if(!l&&!t){throw new s.NotFoundError(e,r)}return a(e,t?r:l.integrity,{integrity:i,size:u}).then(e=>t?e:{data:e,metadata:l.metadata,size:l.size,integrity:l.integrity}).then(i=>{if(c&&t){o.put.byDigest(e,r,i,n)}else if(c){o.put(e,l,i.data,n)}return i})})}t.exports.sync=function get(t,e,r){return getDataSync(false,t,e,r)};t.exports.sync.byDigest=function getByDigest(t,e,r){return getDataSync(true,t,e,r)};function getDataSync(t,e,r,n={}){const{integrity:i,memoize:c,size:u}=n;const l=t?o.get.byDigest(e,r,n):o.get(e,r,n);if(l&&c!==false){return t?l:{metadata:l.entry.metadata,data:l.data,integrity:l.entry.integrity,size:l.entry.size}}const f=!t&&s.find.sync(e,r,n);if(!f&&!t){throw new s.NotFoundError(e,r)}const h=a.sync(e,t?r:f.integrity,{integrity:i,size:u});const p=t?h:{metadata:f.metadata,data:h,size:f.size,integrity:f.integrity};if(c&&t){o.put.byDigest(e,r,p,n)}else if(c){o.put(e,f,p.data,n)}return p}t.exports.stream=getStream;const h=t=>{const e=new c;e.on("newListener",function(e,r){e==="metadata"&&r(t.entry.metadata);e==="integrity"&&r(t.entry.integrity);e==="size"&&r(t.entry.size)});e.end(t.data);return e};function getStream(t,e,r={}){const{memoize:n,size:i}=r;const c=o.get(t,e,r);if(c&&n!==false){return h(c)}const f=new l;s.find(t,e).then(c=>{if(!c){throw new s.NotFoundError(t,e)}f.emit("metadata",c.metadata);f.emit("integrity",c.integrity);f.emit("size",c.size);f.on("newListener",function(t,e){t==="metadata"&&e(c.metadata);t==="integrity"&&e(c.integrity);t==="size"&&e(c.size)});const l=a.readStream(t,c.integrity,{...r,size:typeof i!=="number"?c.size:i});if(n){const e=new u.PassThrough;e.on("collect",e=>o.put(t,c,e,r));f.unshift(e)}f.unshift(l)}).catch(t=>f.emit("error",t));return f}t.exports.stream.byDigest=getStreamDigest;function getStreamDigest(t,e,r={}){const{memoize:n}=r;const i=o.get.byDigest(t,e,r);if(i&&n!==false){const t=new c;t.end(i);return t}else{const i=a.readStream(t,e,r);if(!n){return i}const s=new u.PassThrough;s.on("collect",n=>o.put.byDigest(t,e,n,r));return new l(i,s)}}t.exports.info=info;function info(t,e,r={}){const{memoize:n}=r;const i=o.get(t,e,r);if(i&&n!==false){return Promise.resolve(i.entry)}else{return s.find(t,e)}}t.exports.hasContent=a.hasContent;function cp(t,e,r,n){return copy(false,t,e,r,n)}t.exports.copy=cp;function cpDigest(t,e,r,n){return copy(true,t,e,r,n)}t.exports.copy.byDigest=cpDigest;function copy(t,e,r,n,i={}){if(a.copy){return(t?Promise.resolve(null):s.find(e,r,i)).then(o=>{if(!o&&!t){throw new s.NotFoundError(e,r)}return a.copy(e,t?r:o.integrity,n,i).then(()=>{return t?r:{metadata:o.metadata,size:o.size,integrity:o.integrity}})})}return getData(t,e,r,i).then(e=>{return f(n,t?e:e.data).then(()=>{return t?r:{metadata:e.metadata,size:e.size,integrity:e.integrity}})})}},7234:(t,e,r)=>{"use strict";const n=r(1048);const i=r(4761);const s=r(5576);const o=r(4876);const a=r(9869);const{clearMemoized:c}=r(5575);const u=r(644);t.exports.ls=n;t.exports.ls.stream=n.stream;t.exports.get=i;t.exports.get.byDigest=i.byDigest;t.exports.get.sync=i.sync;t.exports.get.sync.byDigest=i.sync.byDigest;t.exports.get.stream=i.stream;t.exports.get.stream.byDigest=i.stream.byDigest;t.exports.get.copy=i.copy;t.exports.get.copy.byDigest=i.copy.byDigest;t.exports.get.info=i.info;t.exports.get.hasContent=i.hasContent;t.exports.get.hasContent.sync=i.hasContent.sync;t.exports.put=s;t.exports.put.stream=s.stream;t.exports.rm=o.entry;t.exports.rm.all=o.all;t.exports.rm.entry=t.exports.rm;t.exports.rm.content=o.content;t.exports.clearMemoized=c;t.exports.tmp={};t.exports.tmp.mkdir=u.mkdir;t.exports.tmp.withTmp=u.withTmp;t.exports.verify=a;t.exports.verify.lastRun=a.lastRun},3491:(t,e,r)=>{"use strict";const n=r(1666).Jw.k;const i=r(2700);const s=r(5622);const o=r(6726);t.exports=contentPath;function contentPath(t,e){const r=o.parse(e,{single:true});return s.join(contentDir(t),r.algorithm,...i(r.hexDigest()))}t.exports.contentDir=contentDir;function contentDir(t){return s.join(t,`content-v${n}`)}},9409:(t,e,r)=>{"use strict";const n=r(1669);const i=r(5747);const s=r(7714);const o=r(6726);const a=r(3491);const c=r(6436);const u=n.promisify(i.lstat);const l=n.promisify(i.readFile);t.exports=read;const f=64*1024*1024;function read(t,e,r={}){const{size:n}=r;return withContentSri(t,e,(t,e)=>{return u(t).then(r=>({stat:r,cpath:t,sri:e}))}).then(({stat:t,cpath:e,sri:r})=>{if(typeof n==="number"&&t.size!==n){throw sizeError(n,t.size)}if(t.size>f){return h(e,t.size,r,new c).concat()}return l(e,null).then(t=>{if(!o.checkData(t,r)){throw integrityError(r,e)}return t})})}const h=(t,e,r,n)=>{n.push(new s.ReadStream(t,{size:e,readSize:f}),o.integrityStream({integrity:r,size:e}));return n};t.exports.sync=readSync;function readSync(t,e,r={}){const{size:n}=r;return withContentSriSync(t,e,(t,e)=>{const r=i.readFileSync(t);if(typeof n==="number"&&n!==r.length){throw sizeError(n,r.length)}if(o.checkData(r,e)){return r}throw integrityError(e,t)})}t.exports.stream=readStream;t.exports.readStream=readStream;function readStream(t,e,r={}){const{size:n}=r;const i=new c;withContentSri(t,e,(t,e)=>{return u(t).then(r=>({stat:r,cpath:t,sri:e}))}).then(({stat:t,cpath:e,sri:r})=>{if(typeof n==="number"&&n!==t.size){return i.emit("error",sizeError(n,t.size))}h(e,t.size,r,i)},t=>i.emit("error",t));return i}let p;if(i.copyFile){t.exports.copy=copy;t.exports.copy.sync=copySync;p=n.promisify(i.copyFile)}function copy(t,e,r){return withContentSri(t,e,(t,e)=>{return p(t,r)})}function copySync(t,e,r){return withContentSriSync(t,e,(t,e)=>{return i.copyFileSync(t,r)})}t.exports.hasContent=hasContent;function hasContent(t,e){if(!e){return Promise.resolve(false)}return withContentSri(t,e,(t,e)=>{return u(t).then(t=>({size:t.size,sri:e,stat:t}))}).catch(t=>{if(t.code==="ENOENT"){return false}if(t.code==="EPERM"){if(process.platform!=="win32"){throw t}else{return false}}})}t.exports.hasContent.sync=hasContentSync;function hasContentSync(t,e){if(!e){return false}return withContentSriSync(t,e,(t,e)=>{try{const r=i.lstatSync(t);return{size:r.size,sri:e,stat:r}}catch(t){if(t.code==="ENOENT"){return false}if(t.code==="EPERM"){if(process.platform!=="win32"){throw t}else{return false}}}})}function withContentSri(t,e,r){const n=()=>{const n=o.parse(e);const i=n.pickAlgorithm();const s=n[i];if(s.length<=1){const e=a(t,s[0]);return r(e,s[0])}else{return Promise.all(s.map(e=>{return withContentSri(t,e,r).catch(t=>{if(t.code==="ENOENT"){return Object.assign(new Error("No matching content found for "+n.toString()),{code:"ENOENT"})}return t})})).then(t=>{const e=t.find(t=>!(t instanceof Error));if(e){return e}const r=t.find(t=>t.code==="ENOENT");if(r){throw r}throw t.find(t=>t instanceof Error)})}};return new Promise((t,e)=>{try{n().then(t).catch(e)}catch(t){e(t)}})}function withContentSriSync(t,e,r){const n=o.parse(e);const i=n.pickAlgorithm();const s=n[i];if(s.length<=1){const e=a(t,s[0]);return r(e,s[0])}else{let e=null;for(const n of s){try{return withContentSriSync(t,n,r)}catch(t){e=t}}throw e}}function sizeError(t,e){const r=new Error(`Bad data size: expected inserted data to be ${t} bytes, but got ${e} instead`);r.expected=t;r.found=e;r.code="EBADSIZE";return r}function integrityError(t,e){const r=new Error(`Integrity verification failed for ${t} (${e})`);r.code="EINTEGRITY";r.sri=t;r.path=e;return r}},1343:(t,e,r)=>{"use strict";const n=r(1669);const i=r(3491);const{hasContent:s}=r(9409);const o=n.promisify(r(4959));t.exports=rm;function rm(t,e){return s(t,e).then(e=>{if(e&&e.sri){return o(i(t,e.sri)).then(()=>true)}else{return false}})}},3729:(t,e,r)=>{"use strict";const n=r(1669);const i=r(3491);const s=r(1191);const o=r(5747);const a=r(5604);const c=r(8351);const u=r(6436);const l=r(4145);const f=r(5622);const h=n.promisify(r(4959));const p=r(6726);const d=r(9536);const{disposer:y}=r(9131);const v=r(7714);const m=n.promisify(o.writeFile);t.exports=write;function write(t,e,r={}){const{algorithms:n,size:i,integrity:s}=r;if(n&&n.length>1){throw new Error("opts.algorithms only supports a single algorithm for now")}if(typeof i==="number"&&e.length!==i){return Promise.reject(sizeError(i,e.length))}const o=p.fromData(e,n?{algorithms:n}:{});if(s&&!p.checkData(e,s,r)){return Promise.reject(checksumError(s,o))}return y(makeTmp(t,r),makeTmpDisposer,n=>{return m(n.target,e,{flag:"wx"}).then(()=>moveToDestination(n,t,o,r))}).then(()=>({integrity:o,size:e.length}))}t.exports.stream=writeStream;class CacacheWriteStream extends l{constructor(t,e){super();this.opts=e;this.cache=t;this.inputStream=new c;this.inputStream.on("error",t=>this.emit("error",t));this.inputStream.on("drain",()=>this.emit("drain"));this.handleContentP=null}write(t,e,r){if(!this.handleContentP){this.handleContentP=handleContent(this.inputStream,this.cache,this.opts)}return this.inputStream.write(t,e,r)}flush(t){this.inputStream.end(()=>{if(!this.handleContentP){const e=new Error("Cache input stream was empty");e.code="ENODATA";return Promise.reject(e).catch(t)}this.handleContentP.then(e=>{e.integrity&&this.emit("integrity",e.integrity);e.size!==null&&this.emit("size",e.size);t()},e=>t(e))})}}function writeStream(t,e={}){return new CacacheWriteStream(t,e)}function handleContent(t,e,r){return y(makeTmp(e,r),makeTmpDisposer,n=>{return pipeToTmp(t,e,n.target,r).then(t=>{return moveToDestination(n,e,t.integrity,r).then(()=>t)})})}function pipeToTmp(t,e,r,n){let i;let s;const o=p.integrityStream({integrity:n.integrity,algorithms:n.algorithms,size:n.size});o.on("integrity",t=>{i=t});o.on("size",t=>{s=t});const a=new v.WriteStream(r,{flags:"wx"});const c=new u(t,o,a);return c.promise().then(()=>({integrity:i,size:s})).catch(t=>h(r).then(()=>{throw t}))}function makeTmp(t,e){const r=d(f.join(t,"tmp"),e.tmpPrefix);return s.mkdirfix(t,f.dirname(r)).then(()=>({target:r,moved:false}))}function makeTmpDisposer(t){if(t.moved){return Promise.resolve()}return h(t.target)}function moveToDestination(t,e,r,n){const o=i(e,r);const c=f.dirname(o);return s.mkdirfix(e,c).then(()=>{return a(t.target,o)}).then(()=>{t.moved=true;return s.chownr(e,o)})}function sizeError(t,e){const r=new Error(`Bad data size: expected inserted data to be ${t} bytes, but got ${e} instead`);r.expected=t;r.found=e;r.code="EBADSIZE";return r}function checksumError(t,e){const r=new Error(`Integrity check failed:\n Wanted: ${t}\n Found: ${e}`);r.code="EINTEGRITY";r.expected=t;r.found=e;return r}},595:(t,e,r)=>{"use strict";const n=r(1669);const i=r(6417);const s=r(5747);const o=r(8351);const a=r(5622);const c=r(6726);const u=r(3491);const l=r(1191);const f=r(2700);const h=r(1666).Jw.K;const p=n.promisify(s.appendFile);const d=n.promisify(s.readFile);const y=n.promisify(s.readdir);t.exports.NotFoundError=class NotFoundError extends Error{constructor(t,e){super(`No cache entry for ${e} found in ${t}`);this.code="ENOENT";this.cache=t;this.key=e}};t.exports.insert=insert;function insert(t,e,r,n={}){const{metadata:i,size:s}=n;const o=bucketPath(t,e);const u={key:e,integrity:r&&c.stringify(r),time:Date.now(),size:s,metadata:i};return l.mkdirfix(t,a.dirname(o)).then(()=>{const t=JSON.stringify(u);return p(o,`\n${hashEntry(t)}\t${t}`)}).then(()=>l.chownr(t,o)).catch(t=>{if(t.code==="ENOENT"){return undefined}throw t}).then(()=>{return formatEntry(t,u)})}t.exports.insert.sync=insertSync;function insertSync(t,e,r,n={}){const{metadata:i,size:o}=n;const u=bucketPath(t,e);const f={key:e,integrity:r&&c.stringify(r),time:Date.now(),size:o,metadata:i};l.mkdirfix.sync(t,a.dirname(u));const h=JSON.stringify(f);s.appendFileSync(u,`\n${hashEntry(h)}\t${h}`);try{l.chownr.sync(t,u)}catch(t){if(t.code!=="ENOENT"){throw t}}return formatEntry(t,f)}t.exports.find=find;function find(t,e){const r=bucketPath(t,e);return bucketEntries(r).then(r=>{return r.reduce((r,n)=>{if(n&&n.key===e){return formatEntry(t,n)}else{return r}},null)}).catch(t=>{if(t.code==="ENOENT"){return null}else{throw t}})}t.exports.find.sync=findSync;function findSync(t,e){const r=bucketPath(t,e);try{return bucketEntriesSync(r).reduce((r,n)=>{if(n&&n.key===e){return formatEntry(t,n)}else{return r}},null)}catch(t){if(t.code==="ENOENT"){return null}else{throw t}}}t.exports.delete=del;function del(t,e,r){return insert(t,e,null,r)}t.exports.delete.sync=delSync;function delSync(t,e,r){return insertSync(t,e,null,r)}t.exports.lsStream=lsStream;function lsStream(t){const e=bucketDir(t);const r=new o({objectMode:true});readdirOrEmpty(e).then(n=>Promise.all(n.map(n=>{const i=a.join(e,n);return readdirOrEmpty(i).then(e=>Promise.all(e.map(e=>{const n=a.join(i,e);return readdirOrEmpty(n).then(e=>Promise.all(e.map(e=>{const i=a.join(n,e);return bucketEntries(i).then(t=>t.reduce((t,e)=>{t.set(e.key,e);return t},new Map)).then(e=>{for(const n of e.values()){const e=formatEntry(t,n);if(e){r.write(e)}}}).catch(t=>{if(t.code==="ENOENT"){return undefined}throw t})})))})))}))).then(()=>r.end(),t=>r.emit("error",t));return r}t.exports.ls=ls;function ls(t){return lsStream(t).collect().then(t=>t.reduce((t,e)=>{t[e.key]=e;return t},{}))}function bucketEntries(t,e){return d(t,"utf8").then(t=>_bucketEntries(t,e))}function bucketEntriesSync(t,e){const r=s.readFileSync(t,"utf8");return _bucketEntries(r,e)}function _bucketEntries(t,e){const r=[];t.split("\n").forEach(t=>{if(!t){return}const e=t.split("\t");if(!e[1]||hashEntry(e[1])!==e[0]){return}let n;try{n=JSON.parse(e[1])}catch(t){return}if(n){r.push(n)}});return r}t.exports.bucketDir=bucketDir;function bucketDir(t){return a.join(t,`index-v${h}`)}t.exports.bucketPath=bucketPath;function bucketPath(t,e){const r=hashKey(e);return a.join.apply(a,[bucketDir(t)].concat(f(r)))}t.exports.hashKey=hashKey;function hashKey(t){return hash(t,"sha256")}t.exports.hashEntry=hashEntry;function hashEntry(t){return hash(t,"sha1")}function hash(t,e){return i.createHash(e).update(t).digest("hex")}function formatEntry(t,e){if(!e.integrity){return null}return{key:e.key,integrity:e.integrity,path:u(t,e.integrity),size:e.size,time:e.time,metadata:e.metadata}}function readdirOrEmpty(t){return y(t).catch(t=>{if(t.code==="ENOENT"||t.code==="ENOTDIR"){return[]}throw t})}},5575:(t,e,r)=>{"use strict";const n=r(738);const i=50*1024*1024;const s=3*60*1e3;const o=new n({max:i,maxAge:s,length:(t,e)=>e.startsWith("key:")?t.data.length:t.length});t.exports.clearMemoized=clearMemoized;function clearMemoized(){const t={};o.forEach((e,r)=>{t[r]=e});o.reset();return t}t.exports.put=put;function put(t,e,r,n){pickMem(n).set(`key:${t}:${e.key}`,{entry:e,data:r});putDigest(t,e.integrity,r,n)}t.exports.put.byDigest=putDigest;function putDigest(t,e,r,n){pickMem(n).set(`digest:${t}:${e}`,r)}t.exports.get=get;function get(t,e,r){return pickMem(r).get(`key:${t}:${e}`)}t.exports.get.byDigest=getDigest;function getDigest(t,e,r){return pickMem(r).get(`digest:${t}:${e}`)}class ObjProxy{constructor(t){this.obj=t}get(t){return this.obj[t]}set(t,e){this.obj[t]=e}}function pickMem(t){if(!t||!t.memoize){return o}else if(t.memoize.get&&t.memoize.set){return t.memoize}else if(typeof t.memoize==="object"){return new ObjProxy(t.memoize)}else{return o}}},9131:t=>{"use strict";t.exports.disposer=disposer;function disposer(t,e,r){const n=(t,r,n=false)=>{return e(t).then(()=>{if(n){throw r}return r},t=>{throw t})};return t.then(t=>{return Promise.resolve().then(()=>r(t)).then(e=>n(t,e)).catch(e=>n(t,e,true))})}},1191:(t,e,r)=>{"use strict";const n=r(1669);const i=n.promisify(r(9051));const s=r(2933);const o=r(9346);const a=r(9609);const c={uid:null,gid:null};const u=()=>{if(typeof c.uid!=="number"){c.uid=process.getuid();const t=process.setuid;process.setuid=(e=>{c.uid=null;process.setuid=t;return process.setuid(e)})}if(typeof c.gid!=="number"){c.gid=process.getgid();const t=process.setgid;process.setgid=(e=>{c.gid=null;process.setgid=t;return process.setgid(e)})}};t.exports.chownr=fixOwner;function fixOwner(t,e){if(!process.getuid){return Promise.resolve()}u();if(c.uid!==0){return Promise.resolve()}return Promise.resolve(a(t)).then(t=>{const{uid:r,gid:n}=t;if(c.uid===r&&c.gid===n){return}return o("fixOwner: fixing ownership on "+e,()=>i(e,typeof r==="number"?r:c.uid,typeof n==="number"?n:c.gid).catch(t=>{if(t.code==="ENOENT"){return null}throw t}))})}t.exports.chownr.sync=fixOwnerSync;function fixOwnerSync(t,e){if(!process.getuid){return}const{uid:r,gid:n}=a.sync(t);u();if(c.uid!==0){return}if(c.uid===r&&c.gid===n){return}try{i.sync(e,typeof r==="number"?r:c.uid,typeof n==="number"?n:c.gid)}catch(t){if(t.code==="ENOENT"){return null}throw t}}t.exports.mkdirfix=mkdirfix;function mkdirfix(t,e,r){return Promise.resolve(a(t)).then(()=>{return s(e).then(e=>{if(e){return fixOwner(t,e).then(()=>e)}}).catch(r=>{if(r.code==="EEXIST"){return fixOwner(t,e).then(()=>null)}throw r})})}t.exports.mkdirfix.sync=mkdirfixSync;function mkdirfixSync(t,e){try{a.sync(t);const r=s.sync(e);if(r){fixOwnerSync(t,r);return r}}catch(r){if(r.code==="EEXIST"){fixOwnerSync(t,e);return null}else{throw r}}}},2700:t=>{"use strict";t.exports=hashToSegments;function hashToSegments(t){return[t.slice(0,2),t.slice(2,4),t.slice(4)]}},5604:(t,e,r)=>{"use strict";const n=r(5747);const i=r(1669);const s=i.promisify(n.chmod);const o=i.promisify(n.unlink);const a=i.promisify(n.stat);const c=r(3485);const u=r(9346);t.exports=moveFile;function moveFile(t,e){const r=global.__CACACHE_TEST_FAKE_WINDOWS__||process.platform==="win32";return new Promise((i,s)=>{n.link(t,e,t=>{if(t){if(r&&t.code==="EPERM"){return i()}else if(t.code==="EEXIST"||t.code==="EBUSY"){return i()}else{return s(t)}}else{return i()}})}).then(()=>{return Promise.all([o(t),!r&&s(e,"0444")])}).catch(()=>{return u("cacache-move-file:"+e,()=>{return a(e).catch(r=>{if(r.code!=="ENOENT"){throw r}return c(t,e)})})})}},644:(t,e,r)=>{"use strict";const n=r(1669);const i=r(1191);const s=r(5622);const o=n.promisify(r(4959));const a=r(9536);const{disposer:c}=r(9131);t.exports.mkdir=mktmpdir;function mktmpdir(t,e={}){const{tmpPrefix:r}=e;const n=a(s.join(t,"tmp"),r);return i.mkdirfix(t,n).then(()=>{return n})}t.exports.withTmp=withTmp;function withTmp(t,e,r){if(!r){r=e;e={}}return c(mktmpdir(t,e),o,r)}t.exports.fix=fixtmpdir;function fixtmpdir(t){return i(t,s.join(t,"tmp"))}},584:(t,e,r)=>{"use strict";const n=r(1669);const i=r(1855);const s=r(3491);const o=r(1191);const a=r(5747);const c=r(7714);const u=n.promisify(r(7966));const l=r(595);const f=r(5622);const h=n.promisify(r(4959));const p=r(6726);const d=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const y=n.promisify(a.stat);const v=n.promisify(a.truncate);const m=n.promisify(a.writeFile);const g=n.promisify(a.readFile);const _=t=>({concurrency:20,log:{silly(){}},...t});t.exports=verify;function verify(t,e){e=_(e);e.log.silly("verify","verifying cache at",t);const r=[markStartTime,fixPerms,garbageCollect,rebuildIndex,cleanTmp,writeVerifile,markEndTime];return r.reduce((r,n,i)=>{const s=n.name;const o=new Date;return r.then(r=>{return n(t,e).then(t=>{t&&Object.keys(t).forEach(e=>{r[e]=t[e]});const e=new Date;if(!r.runTime){r.runTime={}}r.runTime[s]=e-o;return Promise.resolve(r)})})},Promise.resolve({})).then(r=>{r.runTime.total=r.endTime-r.startTime;e.log.silly("verify","verification finished for",t,"in",`${r.runTime.total}ms`);return r})}function markStartTime(t,e){return Promise.resolve({startTime:new Date})}function markEndTime(t,e){return Promise.resolve({endTime:new Date})}function fixPerms(t,e){e.log.silly("verify","fixing cache permissions");return o.mkdirfix(t,t).then(()=>{return o.chownr(t,t)}).then(()=>null)}function garbageCollect(t,e){e.log.silly("verify","garbage collecting content");const r=l.lsStream(t);const n=new Set;r.on("data",t=>{if(e.filter&&!e.filter(t)){return}n.add(t.integrity.toString())});return new Promise((t,e)=>{r.on("end",t).on("error",e)}).then(()=>{const r=s.contentDir(t);return u(f.join(r,"**"),{follow:false,nodir:true,nosort:true}).then(t=>{return Promise.resolve({verifiedContent:0,reclaimedCount:0,reclaimedSize:0,badContentCount:0,keptSize:0}).then(r=>i(t,t=>{const e=t.split(/[/\\]/);const i=e.slice(e.length-3).join("");const s=e[e.length-4];const o=p.fromHex(i,s);if(n.has(o.toString())){return verifyContent(t,o).then(t=>{if(!t.valid){r.reclaimedCount++;r.badContentCount++;r.reclaimedSize+=t.size}else{r.verifiedContent++;r.keptSize+=t.size}return r})}else{r.reclaimedCount++;return y(t).then(e=>{return h(t).then(()=>{r.reclaimedSize+=e.size;return r})})}},{concurrency:e.concurrency}).then(()=>r))})})}function verifyContent(t,e){return y(t).then(r=>{const n={size:r.size,valid:true};return p.checkStream(new c.ReadStream(t),e).catch(e=>{if(e.code!=="EINTEGRITY"){throw e}return h(t).then(()=>{n.valid=false})}).then(()=>n)}).catch(t=>{if(t.code==="ENOENT"){return{size:0,valid:false}}throw t})}function rebuildIndex(t,e){e.log.silly("verify","rebuilding index");return l.ls(t).then(r=>{const n={missingContent:0,rejectedEntries:0,totalEntries:0};const s={};for(const i in r){if(d(r,i)){const o=l.hashKey(i);const a=r[i];const c=e.filter&&!e.filter(a);c&&n.rejectedEntries++;if(s[o]&&!c){s[o].push(a)}else if(s[o]&&c){}else if(c){s[o]=[];s[o]._path=l.bucketPath(t,i)}else{s[o]=[a];s[o]._path=l.bucketPath(t,i)}}}return i(Object.keys(s),r=>{return rebuildBucket(t,s[r],n,e)},{concurrency:e.concurrency}).then(()=>n)})}function rebuildBucket(t,e,r,n){return v(e._path).then(()=>{return e.reduce((e,n)=>{return e.then(()=>{const e=s(t,n.integrity);return y(e).then(()=>{return l.insert(t,n.key,n.integrity,{metadata:n.metadata,size:n.size}).then(()=>{r.totalEntries++})}).catch(t=>{if(t.code==="ENOENT"){r.rejectedEntries++;r.missingContent++;return}throw t})})},Promise.resolve())})}function cleanTmp(t,e){e.log.silly("verify","cleaning tmp directory");return h(f.join(t,"tmp"))}function writeVerifile(t,e){const r=f.join(t,"_lastverified");e.log.silly("verify","writing verifile to "+r);try{return m(r,""+ +new Date)}finally{o.chownr.sync(t,r)}}t.exports.lastRun=lastRun;function lastRun(t){return g(f.join(t,"_lastverified"),"utf8").then(t=>new Date(+t))}},1048:(t,e,r)=>{"use strict";const n=r(595);t.exports=n.ls;t.exports.stream=n.lsStream},738:(t,e,r)=>{"use strict";const n=r(665);const i=Symbol("max");const s=Symbol("length");const o=Symbol("lengthCalculator");const a=Symbol("allowStale");const c=Symbol("maxAge");const u=Symbol("dispose");const l=Symbol("noDisposeOnSet");const f=Symbol("lruList");const h=Symbol("cache");const p=Symbol("updateAgeOnGet");const d=()=>1;class LRUCache{constructor(t){if(typeof t==="number")t={max:t};if(!t)t={};if(t.max&&(typeof t.max!=="number"||t.max<0))throw new TypeError("max must be a non-negative number");const e=this[i]=t.max||Infinity;const r=t.length||d;this[o]=typeof r!=="function"?d:r;this[a]=t.stale||false;if(t.maxAge&&typeof t.maxAge!=="number")throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0;this[u]=t.dispose;this[l]=t.noDisposeOnSet||false;this[p]=t.updateAgeOnGet||false;this.reset()}set max(t){if(typeof t!=="number"||t<0)throw new TypeError("max must be a non-negative number");this[i]=t||Infinity;m(this)}get max(){return this[i]}set allowStale(t){this[a]=!!t}get allowStale(){return this[a]}set maxAge(t){if(typeof t!=="number")throw new TypeError("maxAge must be a non-negative number");this[c]=t;m(this)}get maxAge(){return this[c]}set lengthCalculator(t){if(typeof t!=="function")t=d;if(t!==this[o]){this[o]=t;this[s]=0;this[f].forEach(t=>{t.length=this[o](t.value,t.key);this[s]+=t.length})}m(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[f].length}rforEach(t,e){e=e||this;for(let r=this[f].tail;r!==null;){const n=r.prev;_(this,t,r,e);r=n}}forEach(t,e){e=e||this;for(let r=this[f].head;r!==null;){const n=r.next;_(this,t,r,e);r=n}}keys(){return this[f].toArray().map(t=>t.key)}values(){return this[f].toArray().map(t=>t.value)}reset(){if(this[u]&&this[f]&&this[f].length){this[f].forEach(t=>this[u](t.key,t.value))}this[h]=new Map;this[f]=new n;this[s]=0}dump(){return this[f].map(t=>v(this,t)?false:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[f]}set(t,e,r){r=r||this[c];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const n=r?Date.now():0;const a=this[o](e,t);if(this[h].has(t)){if(a>this[i]){g(this,this[h].get(t));return false}const o=this[h].get(t);const c=o.value;if(this[u]){if(!this[l])this[u](t,c.value)}c.now=n;c.maxAge=r;c.value=e;this[s]+=a-c.length;c.length=a;this.get(t);m(this);return true}const p=new Entry(t,e,a,n,r);if(p.length>this[i]){if(this[u])this[u](t,e);return false}this[s]+=p.length;this[f].unshift(p);this[h].set(t,this[f].head);m(this);return true}has(t){if(!this[h].has(t))return false;const e=this[h].get(t).value;return!v(this,e)}get(t){return y(this,t,true)}peek(t){return y(this,t,false)}pop(){const t=this[f].tail;if(!t)return null;g(this,t);return t.value}del(t){g(this,this[h].get(t))}load(t){this.reset();const e=Date.now();for(let r=t.length-1;r>=0;r--){const n=t[r];const i=n.e||0;if(i===0)this.set(n.k,n.v);else{const t=i-e;if(t>0){this.set(n.k,n.v,t)}}}}prune(){this[h].forEach((t,e)=>y(this,e,false))}}const y=(t,e,r)=>{const n=t[h].get(e);if(n){const e=n.value;if(v(t,e)){g(t,n);if(!t[a])return undefined}else{if(r){if(t[p])n.value.now=Date.now();t[f].unshiftNode(n)}}return e.value}};const v=(t,e)=>{if(!e||!e.maxAge&&!t[c])return false;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[c]&&r>t[c]};const m=t=>{if(t[s]>t[i]){for(let e=t[f].tail;t[s]>t[i]&&e!==null;){const r=e.prev;g(t,e);e=r}}};const g=(t,e)=>{if(e){const r=e.value;if(t[u])t[u](r.key,r.value);t[s]-=r.length;t[h].delete(r.key);t[f].removeNode(e)}};class Entry{constructor(t,e,r,n,i){this.key=t;this.value=e;this.length=r;this.now=n;this.maxAge=i||0}}const _=(t,e,r,n)=>{let i=r.value;if(v(t,i)){g(t,r);if(!t[a])i=undefined}if(i)e.call(n,i.value,i.key,t)};t.exports=LRUCache},2933:(t,e,r)=>{const n=r(2810);const i=r(4376);const{mkdirpNative:s,mkdirpNativeSync:o}=r(935);const{mkdirpManual:a,mkdirpManualSync:c}=r(7105);const{useNative:u,useNativeSync:l}=r(4230);const f=(t,e)=>{t=i(t);e=n(e);return u(e)?s(t,e):a(t,e)};const h=(t,e)=>{t=i(t);e=n(e);return l(e)?o(t,e):c(t,e)};f.sync=h;f.native=((t,e)=>s(i(t),n(e)));f.manual=((t,e)=>a(i(t),n(e)));f.nativeSync=((t,e)=>o(i(t),n(e)));f.manualSync=((t,e)=>c(i(t),n(e)));t.exports=f},5552:(t,e,r)=>{const{dirname:n}=r(5622);const i=(t,e,r=undefined)=>{if(r===e)return Promise.resolve();return t.statAsync(e).then(t=>t.isDirectory()?r:undefined,r=>r.code==="ENOENT"?i(t,n(e),e):undefined)};const s=(t,e,r=undefined)=>{if(r===e)return undefined;try{return t.statSync(e).isDirectory()?r:undefined}catch(r){return r.code==="ENOENT"?s(t,n(e),e):undefined}};t.exports={findMade:i,findMadeSync:s}},7105:(t,e,r)=>{const{dirname:n}=r(5622);const i=(t,e,r)=>{e.recursive=false;const s=n(t);if(s===t){return e.mkdirAsync(t,e).catch(t=>{if(t.code!=="EISDIR")throw t})}return e.mkdirAsync(t,e).then(()=>r||t,n=>{if(n.code==="ENOENT")return i(s,e).then(r=>i(t,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return e.statAsync(t).then(t=>{if(t.isDirectory())return r;else throw n},()=>{throw n})})};const s=(t,e,r)=>{const i=n(t);e.recursive=false;if(i===t){try{return e.mkdirSync(t,e)}catch(t){if(t.code!=="EISDIR")throw t;else return}}try{e.mkdirSync(t,e);return r||t}catch(n){if(n.code==="ENOENT")return s(t,e,s(i,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!e.statSync(t).isDirectory())throw n}catch(t){throw n}}};t.exports={mkdirpManual:i,mkdirpManualSync:s}},935:(t,e,r)=>{const{dirname:n}=r(5622);const{findMade:i,findMadeSync:s}=r(5552);const{mkdirpManual:o,mkdirpManualSync:a}=r(7105);const c=(t,e)=>{e.recursive=true;const r=n(t);if(r===t)return e.mkdirAsync(t,e);return i(e,t).then(r=>e.mkdirAsync(t,e).then(()=>r).catch(r=>{if(r.code==="ENOENT")return o(t,e);else throw r}))};const u=(t,e)=>{e.recursive=true;const r=n(t);if(r===t)return e.mkdirSync(t,e);const i=s(e,t);try{e.mkdirSync(t,e);return i}catch(r){if(r.code==="ENOENT")return a(t,e);else throw r}};t.exports={mkdirpNative:c,mkdirpNativeSync:u}},2810:(t,e,r)=>{const{promisify:n}=r(1669);const i=r(5747);const s=t=>{if(!t)t={mode:511,fs:i};else if(typeof t==="object")t={mode:511,fs:i,...t};else if(typeof t==="number")t={mode:t,fs:i};else if(typeof t==="string")t={mode:parseInt(t,8),fs:i};else throw new TypeError("invalid options argument");t.mkdir=t.mkdir||t.fs.mkdir||i.mkdir;t.mkdirAsync=n(t.mkdir);t.stat=t.stat||t.fs.stat||i.stat;t.statAsync=n(t.stat);t.statSync=t.statSync||t.fs.statSync||i.statSync;t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||i.mkdirSync;return t};t.exports=s},4376:(t,e,r)=>{const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:i,parse:s}=r(5622);const o=t=>{if(/\0/.test(t)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"})}t=i(t);if(n==="win32"){const e=/[*|"<>?:]/;const{root:r}=s(t);if(e.test(t.substr(r.length))){throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}}return t};t.exports=o},4230:(t,e,r)=>{const n=r(5747);const i=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const s=i.replace(/^v/,"").split(".");const o=+s[0]>10||+s[0]===10&&+s[1]>=12;const a=!o?()=>false:t=>t.mkdir===n.mkdir;const c=!o?()=>false:t=>t.mkdirSync===n.mkdirSync;t.exports={useNative:a,useNativeSync:c}},5576:(t,e,r)=>{"use strict";const n=r(595);const i=r(5575);const s=r(3729);const o=r(4145);const{PassThrough:a}=r(5283);const c=r(6436);const u=t=>({algorithms:["sha512"],...t});t.exports=putData;function putData(t,e,r,o={}){const{memoize:a}=o;o=u(o);return s(t,r,o).then(s=>{return n.insert(t,e,s.integrity,{...o,size:s.size}).then(e=>{if(a){i.put(t,e,r,o)}return s.integrity})})}t.exports.stream=putStream;function putStream(t,e,r={}){const{memoize:l}=r;r=u(r);let f;let h;let p;const d=new c;if(l){const t=(new a).on("collect",t=>{p=t});d.push(t)}const y=s.stream(t,r).on("integrity",t=>{f=t}).on("size",t=>{h=t});d.push(y);d.push(new o({flush(){return n.insert(t,e,f,{...r,size:h}).then(e=>{if(l&&p){i.put(t,e,p,r)}if(f){d.emit("integrity",f)}if(h){d.emit("size",h)}})}}));return d}},4876:(t,e,r)=>{"use strict";const n=r(1669);const i=r(595);const s=r(5575);const o=r(5622);const a=n.promisify(r(4959));const c=r(1343);t.exports=entry;t.exports.entry=entry;function entry(t,e){s.clearMemoized();return i.delete(t,e)}t.exports.content=content;function content(t,e){s.clearMemoized();return c(t,e)}t.exports.all=all;function all(t){s.clearMemoized();return a(o.join(t,"*(content-*|index-*)"))}},9869:(t,e,r)=>{"use strict";t.exports=r(584)},9051:(t,e,r)=>{"use strict";const n=r(5747);const i=r(5622);const s=n.lchown?"lchown":"chown";const o=n.lchownSync?"lchownSync":"chownSync";const a=n.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/);const c=(t,e,r)=>{try{return n[o](t,e,r)}catch(t){if(t.code!=="ENOENT")throw t}};const u=(t,e,r)=>{try{return n.chownSync(t,e,r)}catch(t){if(t.code!=="ENOENT")throw t}};const l=a?(t,e,r,i)=>s=>{if(!s||s.code!=="EISDIR")i(s);else n.chown(t,e,r,i)}:(t,e,r,n)=>n;const f=a?(t,e,r)=>{try{return c(t,e,r)}catch(n){if(n.code!=="EISDIR")throw n;u(t,e,r)}}:(t,e,r)=>c(t,e,r);const h=process.version;let p=(t,e,r)=>n.readdir(t,e,r);let d=(t,e)=>n.readdirSync(t,e);if(/^v4\./.test(h))p=((t,e,r)=>n.readdir(t,r));const y=(t,e,r,i)=>{n[s](t,e,r,l(t,e,r,t=>{i(t&&t.code!=="ENOENT"?t:null)}))};const v=(t,e,r,s,o)=>{if(typeof e==="string")return n.lstat(i.resolve(t,e),(n,i)=>{if(n)return o(n.code!=="ENOENT"?n:null);i.name=e;v(t,i,r,s,o)});if(e.isDirectory()){m(i.resolve(t,e.name),r,s,n=>{if(n)return o(n);const a=i.resolve(t,e.name);y(a,r,s,o)})}else{const n=i.resolve(t,e.name);y(n,r,s,o)}};const m=(t,e,r,n)=>{p(t,{withFileTypes:true},(i,s)=>{if(i){if(i.code==="ENOENT")return n();else if(i.code!=="ENOTDIR"&&i.code!=="ENOTSUP")return n(i)}if(i||!s.length)return y(t,e,r,n);let o=s.length;let a=null;const c=i=>{if(a)return;if(i)return n(a=i);if(--o===0)return y(t,e,r,n)};s.forEach(n=>v(t,n,e,r,c))})};const g=(t,e,r,s)=>{if(typeof e==="string"){try{const r=n.lstatSync(i.resolve(t,e));r.name=e;e=r}catch(t){if(t.code==="ENOENT")return;else throw t}}if(e.isDirectory())_(i.resolve(t,e.name),r,s);f(i.resolve(t,e.name),r,s)};const _=(t,e,r)=>{let n;try{n=d(t,{withFileTypes:true})}catch(n){if(n.code==="ENOENT")return;else if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return f(t,e,r);else throw n}if(n&&n.length)n.forEach(n=>g(t,n,e,r));return f(t,e,r)};t.exports=m;m.sync=_},7714:(t,e,r)=>{"use strict";const n=r(8351);const i=r(8614).EventEmitter;const s=r(5747);let o=s.writev;if(!o){const t=process.binding("fs");const e=t.FSReqWrap||t.FSReqCallback;o=((r,n,i,s)=>{const o=(t,e)=>s(t,e,n);const a=new e;a.oncomplete=o;t.writeBuffers(r,n,i,a)})}const a=Symbol("_autoClose");const c=Symbol("_close");const u=Symbol("_ended");const l=Symbol("_fd");const f=Symbol("_finished");const h=Symbol("_flags");const p=Symbol("_flush");const d=Symbol("_handleChunk");const y=Symbol("_makeBuf");const v=Symbol("_mode");const m=Symbol("_needDrain");const g=Symbol("_onerror");const _=Symbol("_onopen");const w=Symbol("_onread");const b=Symbol("_onwrite");const S=Symbol("_open");const E=Symbol("_path");const k=Symbol("_pos");const x=Symbol("_queue");const C=Symbol("_read");const A=Symbol("_readSize");const T=Symbol("_reading");const P=Symbol("_remain");const j=Symbol("_size");const O=Symbol("_write");const F=Symbol("_writing");const R=Symbol("_defaultFlag");const N=Symbol("_errored");class ReadStream extends n{constructor(t,e){e=e||{};super(e);this.readable=true;this.writable=false;if(typeof t!=="string")throw new TypeError("path must be a string");this[N]=false;this[l]=typeof e.fd==="number"?e.fd:null;this[E]=t;this[A]=e.readSize||16*1024*1024;this[T]=false;this[j]=typeof e.size==="number"?e.size:Infinity;this[P]=this[j];this[a]=typeof e.autoClose==="boolean"?e.autoClose:true;if(typeof this[l]==="number")this[C]();else this[S]()}get fd(){return this[l]}get path(){return this[E]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[S](){s.open(this[E],"r",(t,e)=>this[_](t,e))}[_](t,e){if(t)this[g](t);else{this[l]=e;this.emit("open",e);this[C]()}}[y](){return Buffer.allocUnsafe(Math.min(this[A],this[P]))}[C](){if(!this[T]){this[T]=true;const t=this[y]();if(t.length===0)return process.nextTick(()=>this[w](null,0,t));s.read(this[l],t,0,t.length,null,(t,e,r)=>this[w](t,e,r))}}[w](t,e,r){this[T]=false;if(t)this[g](t);else if(this[d](e,r))this[C]()}[c](){if(this[a]&&typeof this[l]==="number"){const t=this[l];this[l]=null;s.close(t,t=>t?this.emit("error",t):this.emit("close"))}}[g](t){this[T]=true;this[c]();this.emit("error",t)}[d](t,e){let r=false;this[P]-=t;if(t>0)r=super.write(tthis[_](t,e))}[_](t,e){if(this[R]&&this[h]==="r+"&&t&&t.code==="ENOENT"){this[h]="w";this[S]()}else if(t)this[g](t);else{this[l]=e;this.emit("open",e);this[p]()}}end(t,e){if(t)this.write(t,e);this[u]=true;if(!this[F]&&!this[x].length&&typeof this[l]==="number")this[b](null,0);return this}write(t,e){if(typeof t==="string")t=Buffer.from(t,e);if(this[u]){this.emit("error",new Error("write() after end()"));return false}if(this[l]===null||this[F]||this[x].length){this[x].push(t);this[m]=true;return false}this[F]=true;this[O](t);return true}[O](t){s.write(this[l],t,0,t.length,this[k],(t,e)=>this[b](t,e))}[b](t,e){if(t)this[g](t);else{if(this[k]!==null)this[k]+=e;if(this[x].length)this[p]();else{this[F]=false;if(this[u]&&!this[f]){this[f]=true;this[c]();this.emit("finish")}else if(this[m]){this[m]=false;this.emit("drain")}}}}[p](){if(this[x].length===0){if(this[u])this[b](null,0)}else if(this[x].length===1)this[O](this[x].pop());else{const t=this[x];this[x]=[];o(this[l],t,this[k],(t,e)=>this[b](t,e))}}[c](){if(this[a]&&typeof this[l]==="number"){const t=this[l];this[l]=null;s.close(t,t=>t?this.emit("error",t):this.emit("close"))}}}class WriteStreamSync extends WriteStream{[S](){let t;if(this[R]&&this[h]==="r+"){try{t=s.openSync(this[E],this[h],this[v])}catch(t){if(t.code==="ENOENT"){this[h]="w";return this[S]()}else throw t}}else t=s.openSync(this[E],this[h],this[v]);this[_](null,t)}[c](){if(this[a]&&typeof this[l]==="number"){const t=this[l];this[l]=null;s.closeSync(t);this.emit("close")}}[O](t){let e=true;try{this[b](null,s.writeSync(this[l],t,0,t.length,this[k]));e=false}finally{if(e)try{this[c]()}catch(t){}}}}e.ReadStream=ReadStream;e.ReadStreamSync=ReadStreamSync;e.WriteStream=WriteStream;e.WriteStreamSync=WriteStreamSync},1855:(t,e,r)=>{"use strict";const n=r(464);t.exports=(async(t,e,{concurrency:r=Infinity,stopOnError:i=true}={})=>{return new Promise((s,o)=>{if(typeof e!=="function"){throw new TypeError("Mapper function is required")}if(!((Number.isSafeInteger(r)||r===Infinity)&&r>=1)){throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`)}const a=[];const c=[];const u=t[Symbol.iterator]();let l=false;let f=false;let h=0;let p=0;const d=()=>{if(l){return}const t=u.next();const r=p;p++;if(t.done){f=true;if(h===0){if(!i&&c.length!==0){o(new n(c))}else{s(a)}}return}h++;(async()=>{try{const n=await t.value;a[r]=await e(n,r);h--;d()}catch(t){if(i){l=true;o(t)}else{c.push(t);h--;d()}}})()};for(let t=0;t{const n=r(2357);const i=r(5622);const s=r(5747);let o=undefined;try{o=r(7966)}catch(t){}const a={nosort:true,silent:true};let c=0;const u=process.platform==="win32";const l=t=>{const e=["unlink","chmod","stat","lstat","rmdir","readdir"];e.forEach(e=>{t[e]=t[e]||s[e];e=e+"Sync";t[e]=t[e]||s[e]});t.maxBusyTries=t.maxBusyTries||3;t.emfileWait=t.emfileWait||1e3;if(t.glob===false){t.disableGlob=true}if(t.disableGlob!==true&&o===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}t.disableGlob=t.disableGlob||false;t.glob=t.glob||a};const f=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}n(t,"rimraf: missing path");n.equal(typeof t,"string","rimraf: path should be a string");n.equal(typeof r,"function","rimraf: callback function required");n(e,"rimraf: invalid options argument provided");n.equal(typeof e,"object","rimraf: options should be object");l(e);let i=0;let s=null;let a=0;const u=t=>{s=s||t;if(--a===0)r(s)};const f=(t,n)=>{if(t)return r(t);a=n.length;if(a===0)return r();n.forEach(t=>{const r=n=>{if(n){if((n.code==="EBUSY"||n.code==="ENOTEMPTY"||n.code==="EPERM")&&ih(t,e,r),i*100)}if(n.code==="EMFILE"&&ch(t,e,r),c++)}if(n.code==="ENOENT")n=null}c=0;u(n)};h(t,e,r)})};if(e.disableGlob||!o.hasMagic(t))return f(null,[t]);e.lstat(t,(r,n)=>{if(!r)return f(null,[t]);o(t,e.glob,f)})};const h=(t,e,r)=>{n(t);n(e);n(typeof r==="function");e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&u)p(t,e,n,r);if(i&&i.isDirectory())return y(t,e,n,r);e.unlink(t,n=>{if(n){if(n.code==="ENOENT")return r(null);if(n.code==="EPERM")return u?p(t,e,n,r):y(t,e,n,r);if(n.code==="EISDIR")return y(t,e,n,r)}return r(n)})})};const p=(t,e,r,i)=>{n(t);n(e);n(typeof i==="function");e.chmod(t,438,n=>{if(n)i(n.code==="ENOENT"?null:r);else e.stat(t,(n,s)=>{if(n)i(n.code==="ENOENT"?null:r);else if(s.isDirectory())y(t,e,r,i);else e.unlink(t,i)})})};const d=(t,e,r)=>{n(t);n(e);try{e.chmodSync(t,438)}catch(t){if(t.code==="ENOENT")return;else throw r}let i;try{i=e.statSync(t)}catch(t){if(t.code==="ENOENT")return;else throw r}if(i.isDirectory())g(t,e,r);else e.unlinkSync(t)};const y=(t,e,r,i)=>{n(t);n(e);n(typeof i==="function");e.rmdir(t,n=>{if(n&&(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM"))v(t,e,i);else if(n&&n.code==="ENOTDIR")i(r);else i(n)})};const v=(t,e,r)=>{n(t);n(e);n(typeof r==="function");e.readdir(t,(n,s)=>{if(n)return r(n);let o=s.length;if(o===0)return e.rmdir(t,r);let a;s.forEach(n=>{f(i.join(t,n),e,n=>{if(a)return;if(n)return r(a=n);if(--o===0)e.rmdir(t,r)})})})};const m=(t,e)=>{e=e||{};l(e);n(t,"rimraf: missing path");n.equal(typeof t,"string","rimraf: path should be a string");n(e,"rimraf: missing options");n.equal(typeof e,"object","rimraf: options should be object");let r;if(e.disableGlob||!o.hasMagic(t)){r=[t]}else{try{e.lstatSync(t);r=[t]}catch(n){r=o.sync(t,e.glob)}}if(!r.length)return;for(let t=0;t{n(t);n(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")_(t,e)}};const _=(t,e)=>{n(t);n(e);e.readdirSync(t).forEach(r=>m(i.join(t,r),e));const r=u?100:1;let s=0;do{let n=true;try{const i=e.rmdirSync(t,e);n=false;return i}finally{if(++s{"use strict";const n=r(6417);const i=r(8351);const s=["sha256","sha384","sha512"];const o=/^[a-z0-9+/]+(?:=?=?)$/i;const a=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/;const c=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/;const u=/^[\x21-\x7E]+$/;const l={algorithms:["sha512"],error:false,options:[],pickAlgorithm:getPrioritizedHash,sep:" ",single:false,strict:false};const f=(t={})=>({...l,...t});const h=t=>!t||!t.length?"":`?${t.join("?")}`;const p=Symbol("_onEnd");const d=Symbol("_getOptions");class IntegrityStream extends i{constructor(t){super();this.size=0;this.opts=t;this[d]();const{algorithms:e=l.algorithms}=t;this.algorithms=Array.from(new Set(e.concat(this.algorithm?[this.algorithm]:[])));this.hashes=this.algorithms.map(n.createHash)}[d](){const{integrity:t,size:e,options:r}={...l,...this.opts};this.sri=t?parse(t,this.opts):null;this.expectedSize=e;this.goodSri=this.sri?!!Object.keys(this.sri).length:false;this.algorithm=this.goodSri?this.sri.pickAlgorithm(this.opts):null;this.digests=this.goodSri?this.sri[this.algorithm]:null;this.optString=h(r)}emit(t,e){if(t==="end")this[p]();return super.emit(t,e)}write(t){this.size+=t.length;this.hashes.forEach(e=>e.update(t));return super.write(t)}[p](){if(!this.goodSri){this[d]()}const t=parse(this.hashes.map((t,e)=>{return`${this.algorithms[e]}-${t.digest("base64")}${this.optString}`}).join(" "),this.opts);const e=this.goodSri&&t.match(this.sri,this.opts);if(typeof this.expectedSize==="number"&&this.size!==this.expectedSize){const t=new Error(`stream size mismatch when checking ${this.sri}.\n Wanted: ${this.expectedSize}\n Found: ${this.size}`);t.code="EBADSIZE";t.found=this.size;t.expected=this.expectedSize;t.sri=this.sri;this.emit("error",t)}else if(this.sri&&!e){const e=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${t}. (${this.size} bytes)`);e.code="EINTEGRITY";e.found=t;e.expected=this.digests;e.algorithm=this.algorithm;e.sri=this.sri;this.emit("error",e)}else{this.emit("size",this.size);this.emit("integrity",t);e&&this.emit("verified",e)}}}class Hash{get isHash(){return true}constructor(t,e){e=f(e);const r=!!e.strict;this.source=t.trim();this.digest="";this.algorithm="";this.options=[];const n=this.source.match(r?c:a);if(!n){return}if(r&&!s.some(t=>t===n[1])){return}this.algorithm=n[1];this.digest=n[2];const i=n[3];if(i){this.options=i.slice(1).split("?")}}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}toString(t){t=f(t);if(t.strict){if(!(s.some(t=>t===this.algorithm)&&this.digest.match(o)&&this.options.every(t=>t.match(u)))){return""}}const e=this.options&&this.options.length?`?${this.options.join("?")}`:"";return`${this.algorithm}-${this.digest}${e}`}}class Integrity{get isIntegrity(){return true}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(t){t=f(t);let e=t.sep||" ";if(t.strict){e=e.replace(/\S+/g," ")}return Object.keys(this).map(r=>{return this[r].map(e=>{return Hash.prototype.toString.call(e,t)}).filter(t=>t.length).join(e)}).filter(t=>t.length).join(e)}concat(t,e){e=f(e);const r=typeof t==="string"?t:stringify(t,e);return parse(`${this.toString(e)} ${r}`,e)}hexDigest(){return parse(this,{single:true}).hexDigest()}merge(t,e){e=f(e);const r=parse(t,e);for(const t in r){if(this[t]){if(!this[t].find(e=>r[t].find(t=>e.digest===t.digest))){throw new Error("hashes do not match, cannot update integrity")}}else{this[t]=r[t]}}}match(t,e){e=f(e);const r=parse(t,e);const n=r.pickAlgorithm(e);return this[n]&&r[n]&&this[n].find(t=>r[n].find(e=>t.digest===e.digest))||false}pickAlgorithm(t){t=f(t);const e=t.pickAlgorithm;const r=Object.keys(this);return r.reduce((t,r)=>{return e(t,r)||t})}}t.exports.parse=parse;function parse(t,e){if(!t)return null;e=f(e);if(typeof t==="string"){return _parse(t,e)}else if(t.algorithm&&t.digest){const r=new Integrity;r[t.algorithm]=[t];return _parse(stringify(r,e),e)}else{return _parse(stringify(t,e),e)}}function _parse(t,e){if(e.single){return new Hash(t,e)}const r=t.trim().split(/\s+/).reduce((t,r)=>{const n=new Hash(r,e);if(n.algorithm&&n.digest){const e=n.algorithm;if(!t[e]){t[e]=[]}t[e].push(n)}return t},new Integrity);return r.isEmpty()?null:r}t.exports.stringify=stringify;function stringify(t,e){e=f(e);if(t.algorithm&&t.digest){return Hash.prototype.toString.call(t,e)}else if(typeof t==="string"){return stringify(parse(t,e),e)}else{return Integrity.prototype.toString.call(t,e)}}t.exports.fromHex=fromHex;function fromHex(t,e,r){r=f(r);const n=h(r.options);return parse(`${e}-${Buffer.from(t,"hex").toString("base64")}${n}`,r)}t.exports.fromData=fromData;function fromData(t,e){e=f(e);const r=e.algorithms;const i=h(e.options);return r.reduce((r,s)=>{const o=n.createHash(s).update(t).digest("base64");const a=new Hash(`${s}-${o}${i}`,e);if(a.algorithm&&a.digest){const t=a.algorithm;if(!r[t]){r[t]=[]}r[t].push(a)}return r},new Integrity)}t.exports.fromStream=fromStream;function fromStream(t,e){e=f(e);const r=integrityStream(e);return new Promise((e,n)=>{t.pipe(r);t.on("error",n);r.on("error",n);let i;r.on("integrity",t=>{i=t});r.on("end",()=>e(i));r.on("data",()=>{})})}t.exports.checkData=checkData;function checkData(t,e,r){r=f(r);e=parse(e,r);if(!e||!Object.keys(e).length){if(r.error){throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"})}else{return false}}const i=e.pickAlgorithm(r);const s=n.createHash(i).update(t).digest("base64");const o=parse({algorithm:i,digest:s});const a=o.match(e,r);if(a||!r.error){return a}else if(typeof r.size==="number"&&t.length!==r.size){const n=new Error(`data size mismatch when checking ${e}.\n Wanted: ${r.size}\n Found: ${t.length}`);n.code="EBADSIZE";n.found=t.length;n.expected=r.size;n.sri=e;throw n}else{const r=new Error(`Integrity checksum failed when using ${i}: Wanted ${e}, but got ${o}. (${t.length} bytes)`);r.code="EINTEGRITY";r.found=o;r.expected=e;r.algorithm=i;r.sri=e;throw r}}t.exports.checkStream=checkStream;function checkStream(t,e,r){r=f(r);r.integrity=e;e=parse(e,r);if(!e||!Object.keys(e).length){return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}))}const n=integrityStream(r);return new Promise((e,r)=>{t.pipe(n);t.on("error",r);n.on("error",r);let i;n.on("verified",t=>{i=t});n.on("end",()=>e(i));n.on("data",()=>{})})}t.exports.integrityStream=integrityStream;function integrityStream(t={}){return new IntegrityStream(t)}t.exports.create=createIntegrity;function createIntegrity(t){t=f(t);const e=t.algorithms;const r=h(t.options);const i=e.map(n.createHash);return{update:function(t,e){i.forEach(r=>r.update(t,e));return this},digest:function(n){const s=e.reduce((e,n)=>{const s=i.shift().digest("base64");const o=new Hash(`${n}-${s}${r}`,t);if(o.algorithm&&o.digest){const t=o.algorithm;if(!e[t]){e[t]=[]}e[t].push(o)}return e},new Integrity);return s}}}const y=new Set(n.getHashes());const v=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>y.has(t));function getPrioritizedHash(t,e){return v.indexOf(t.toLowerCase())>=v.indexOf(e.toLowerCase())?t:e}},4091:t=>{"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},665:(t,e,r)=>{"use strict";t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var e=this;if(!(e instanceof Yallist)){e=new Yallist}e.tail=null;e.head=null;e.length=0;if(t&&typeof t.forEach==="function"){t.forEach(function(t){e.push(t)})}else if(arguments.length>0){for(var r=0,n=arguments.length;r1){r=e}else if(this.head){n=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;n!==null;i++){r=t(r,n.value,i);n=n.next}return r};Yallist.prototype.reduceReverse=function(t,e){var r;var n=this.tail;if(arguments.length>1){r=e}else if(this.tail){n=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;n!==null;i--){r=t(r,n.value,i);n=n.prev}return r};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var e=0,r=this.head;r!==null;e++){t[e]=r.value;r=r.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var e=0,r=this.tail;r!==null;e++){t[e]=r.value;r=r.prev}return t};Yallist.prototype.slice=function(t,e){e=e||this.length;if(e<0){e+=this.length}t=t||0;if(t<0){t+=this.length}var r=new Yallist;if(ethis.length){e=this.length}for(var n=0,i=this.head;i!==null&&nthis.length){e=this.length}for(var n=this.length,i=this.tail;i!==null&&n>e;n--){i=i.prev}for(;i!==null&&n>t;n--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(t,e,...r){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var n=0,i=this.head;i!==null&&n{"use strict";t.exports=JSON.parse('{"Jw":{"k":"2","K":"5"}}')},2357:t=>{"use strict";t.exports=require("assert")},7303:t=>{"use strict";t.exports=require("async_hooks")},6417:t=>{"use strict";t.exports=require("crypto")},8614:t=>{"use strict";t.exports=require("events")},5747:t=>{"use strict";t.exports=require("fs")},2087:t=>{"use strict";t.exports=require("os")},5622:t=>{"use strict";t.exports=require("path")},2413:t=>{"use strict";t.exports=require("stream")},4304:t=>{"use strict";t.exports=require("string_decoder")},1669:t=>{"use strict";t.exports=require("util")}};var __webpack_module_cache__={};function __webpack_require__(t){if(__webpack_module_cache__[t]){return __webpack_module_cache__[t].exports}var e=__webpack_module_cache__[t]={exports:{}};var r=true;try{__webpack_modules__[t].call(e.exports,e,e.exports,__webpack_require__);r=false}finally{if(r)delete __webpack_module_cache__[t]}return e.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(7234)})(); \ No newline at end of file +module.exports=(()=>{var __webpack_modules__={3485:(t,e,r)=>{const{dirname:n}=r(5622);const{promisify:i}=r(1669);const{access:s,accessSync:o,copyFile:a,copyFileSync:c,unlink:u,unlinkSync:l,rename:f,renameSync:h}=r(5747);const p=i(s);const d=i(a);const y=i(u);const v=i(f);const m=r(7424);const g=async t=>{try{await p(t);return true}catch(t){return t.code!=="ENOENT"}};const _=t=>{try{o(t);return true}catch(t){return t.code!=="ENOENT"}};t.exports=(async(t,e,r={})=>{if(!t||!e){throw new TypeError("`source` and `destination` file required")}r={overwrite:true,...r};if(!r.overwrite&&await g(e)){throw new Error(`The destination file exists: ${e}`)}await m(n(e));try{await v(t,e)}catch(r){if(r.code==="EXDEV"){await d(t,e);await y(t)}else{throw r}}});t.exports.sync=((t,e,r={})=>{if(!t||!e){throw new TypeError("`source` and `destination` file required")}r={overwrite:true,...r};if(!r.overwrite&&_(e)){throw new Error(`The destination file exists: ${e}`)}m.sync(n(e));try{h(t,e)}catch(r){if(r.code==="EXDEV"){c(t,e);l(t)}else{throw r}}})},7424:(t,e,r)=>{const n=r(3430);const i=r(8693);const{mkdirpNative:s,mkdirpNativeSync:o}=r(9863);const{mkdirpManual:a,mkdirpManualSync:c}=r(4906);const{useNative:u,useNativeSync:l}=r(7721);const f=(t,e)=>{t=i(t);e=n(e);return u(e)?s(t,e):a(t,e)};const h=(t,e)=>{t=i(t);e=n(e);return l(e)?o(t,e):c(t,e)};f.sync=h;f.native=((t,e)=>s(i(t),n(e)));f.manual=((t,e)=>a(i(t),n(e)));f.nativeSync=((t,e)=>o(i(t),n(e)));f.manualSync=((t,e)=>c(i(t),n(e)));t.exports=f},7496:(t,e,r)=>{const{dirname:n}=r(5622);const i=(t,e,r=undefined)=>{if(r===e)return Promise.resolve();return t.statAsync(e).then(t=>t.isDirectory()?r:undefined,r=>r.code==="ENOENT"?i(t,n(e),e):undefined)};const s=(t,e,r=undefined)=>{if(r===e)return undefined;try{return t.statSync(e).isDirectory()?r:undefined}catch(r){return r.code==="ENOENT"?s(t,n(e),e):undefined}};t.exports={findMade:i,findMadeSync:s}},4906:(t,e,r)=>{const{dirname:n}=r(5622);const i=(t,e,r)=>{e.recursive=false;const s=n(t);if(s===t){return e.mkdirAsync(t,e).catch(t=>{if(t.code!=="EISDIR")throw t})}return e.mkdirAsync(t,e).then(()=>r||t,n=>{if(n.code==="ENOENT")return i(s,e).then(r=>i(t,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return e.statAsync(t).then(t=>{if(t.isDirectory())return r;else throw n},()=>{throw n})})};const s=(t,e,r)=>{const i=n(t);e.recursive=false;if(i===t){try{return e.mkdirSync(t,e)}catch(t){if(t.code!=="EISDIR")throw t;else return}}try{e.mkdirSync(t,e);return r||t}catch(n){if(n.code==="ENOENT")return s(t,e,s(i,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!e.statSync(t).isDirectory())throw n}catch(t){throw n}}};t.exports={mkdirpManual:i,mkdirpManualSync:s}},9863:(t,e,r)=>{const{dirname:n}=r(5622);const{findMade:i,findMadeSync:s}=r(7496);const{mkdirpManual:o,mkdirpManualSync:a}=r(4906);const c=(t,e)=>{e.recursive=true;const r=n(t);if(r===t)return e.mkdirAsync(t,e);return i(e,t).then(r=>e.mkdirAsync(t,e).then(()=>r).catch(r=>{if(r.code==="ENOENT")return o(t,e);else throw r}))};const u=(t,e)=>{e.recursive=true;const r=n(t);if(r===t)return e.mkdirSync(t,e);const i=s(e,t);try{e.mkdirSync(t,e);return i}catch(r){if(r.code==="ENOENT")return a(t,e);else throw r}};t.exports={mkdirpNative:c,mkdirpNativeSync:u}},3430:(t,e,r)=>{const{promisify:n}=r(1669);const i=r(5747);const s=t=>{if(!t)t={mode:511,fs:i};else if(typeof t==="object")t={mode:511,fs:i,...t};else if(typeof t==="number")t={mode:t,fs:i};else if(typeof t==="string")t={mode:parseInt(t,8),fs:i};else throw new TypeError("invalid options argument");t.mkdir=t.mkdir||t.fs.mkdir||i.mkdir;t.mkdirAsync=n(t.mkdir);t.stat=t.stat||t.fs.stat||i.stat;t.statAsync=n(t.stat);t.statSync=t.statSync||t.fs.statSync||i.statSync;t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||i.mkdirSync;return t};t.exports=s},8693:(t,e,r)=>{const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:i,parse:s}=r(5622);const o=t=>{if(/\0/.test(t)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"})}t=i(t);if(n==="win32"){const e=/[*|"<>?:]/;const{root:r}=s(t);if(e.test(t.substr(r.length))){throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}}return t};t.exports=o},7721:(t,e,r)=>{const n=r(5747);const i=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const s=i.replace(/^v/,"").split(".");const o=+s[0]>10||+s[0]===10&&+s[1]>=12;const a=!o?()=>false:t=>t.mkdir===n.mkdir;const c=!o?()=>false:t=>t.mkdirSync===n.mkdirSync;t.exports={useNative:a,useNativeSync:c}},464:(t,e,r)=>{"use strict";const n=r(6342);const i=r(9616);const s=t=>t.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"");class AggregateError extends Error{constructor(t){if(!Array.isArray(t)){throw new TypeError(`Expected input to be an Array, got ${typeof t}`)}t=[...t].map(t=>{if(t instanceof Error){return t}if(t!==null&&typeof t==="object"){return Object.assign(new Error(t.message),t)}return new Error(t)});let e=t.map(t=>{return typeof t.stack==="string"?s(i(t.stack)):String(t)}).join("\n");e="\n"+n(e,4);super(e);this.name="AggregateError";Object.defineProperty(this,"_errors",{value:t})}*[Symbol.iterator](){for(const t of this._errors){yield t}}}t.exports=AggregateError},6342:t=>{"use strict";t.exports=((t,e=1,r)=>{r={indent:" ",includeEmptyLines:false,...r};if(typeof t!=="string"){throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``)}if(typeof e!=="number"){throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``)}if(typeof r.indent!=="string"){throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``)}if(e===0){return t}const n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))})},587:t=>{"use strict";t.exports=balanced;function balanced(t,e,r){if(t instanceof RegExp)t=maybeMatch(t,r);if(e instanceof RegExp)e=maybeMatch(e,r);var n=range(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function maybeMatch(t,e){var r=e.match(t);return r?r[0]:null}balanced.range=range;function range(t,e,r){var n,i,s,o,a;var c=r.indexOf(t);var u=r.indexOf(e,c+1);var l=c;if(c>=0&&u>0){n=[];s=r.length;while(l>=0&&!a){if(l==c){n.push(l);c=r.indexOf(t,l+1)}else if(n.length==1){a=[n.pop(),u]}else{i=n.pop();if(i=0?c:u}if(n.length){a=[s,o]}}return a}},5801:t=>{"use strict";t.exports=function(t){var e=t._SomePromiseArray;function any(t){var r=new e(t);var n=r.promise();r.setHowMany(1);r.setUnwrap();r.init();return n}t.any=function(t){return any(t)};t.prototype.any=function(){return any(this)}}},9952:(t,e,r)=>{"use strict";var n;try{throw new Error}catch(t){n=t}var i=r(7254);var s=r(3172);function Async(){this._customScheduler=false;this._isTickUsed=false;this._lateQueue=new s(16);this._normalQueue=new s(16);this._haveDrainedQueues=false;var t=this;this.drainQueues=function(){t._drainQueues()};this._schedule=i}Async.prototype.setScheduler=function(t){var e=this._schedule;this._schedule=t;this._customScheduler=true;return e};Async.prototype.hasCustomScheduler=function(){return this._customScheduler};Async.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};Async.prototype.fatalError=function(t,e){if(e){process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n");process.exit(2)}else{this.throwLater(t)}};Async.prototype.throwLater=function(t,e){if(arguments.length===1){e=t;t=function(){throw e}}if(typeof setTimeout!=="undefined"){setTimeout(function(){t(e)},0)}else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}};function AsyncInvokeLater(t,e,r){this._lateQueue.push(t,e,r);this._queueTick()}function AsyncInvoke(t,e,r){this._normalQueue.push(t,e,r);this._queueTick()}function AsyncSettlePromises(t){this._normalQueue._pushOne(t);this._queueTick()}Async.prototype.invokeLater=AsyncInvokeLater;Async.prototype.invoke=AsyncInvoke;Async.prototype.settlePromises=AsyncSettlePromises;function _drainQueue(t){while(t.length()>0){_drainQueueStep(t)}}function _drainQueueStep(t){var e=t.shift();if(typeof e!=="function"){e._settlePromises()}else{var r=t.shift();var n=t.shift();e.call(r,n)}}Async.prototype._drainQueues=function(){_drainQueue(this._normalQueue);this._reset();this._haveDrainedQueues=true;_drainQueue(this._lateQueue)};Async.prototype._queueTick=function(){if(!this._isTickUsed){this._isTickUsed=true;this._schedule(this.drainQueues)}};Async.prototype._reset=function(){this._isTickUsed=false};t.exports=Async;t.exports.firstLineError=n},1273:t=>{"use strict";t.exports=function(t,e,r,n){var i=false;var s=function(t,e){this._reject(e)};var o=function(t,e){e.promiseRejectionQueued=true;e.bindingPromise._then(s,s,null,this,t)};var a=function(t,e){if((this._bitField&50397184)===0){this._resolveCallback(e.target)}};var c=function(t,e){if(!e.promiseRejectionQueued)this._reject(t)};t.prototype.bind=function(s){if(!i){i=true;t.prototype._propagateFrom=n.propagateFromFunction();t.prototype._boundValue=n.boundValueFunction()}var u=r(s);var l=new t(e);l._propagateFrom(this,1);var f=this._target();l._setBoundTo(u);if(u instanceof t){var h={promiseRejectionQueued:false,promise:l,target:f,bindingPromise:u};f._then(e,o,undefined,l,h);u._then(a,c,undefined,l,h);l._setOnCancel(u)}else{l._resolveCallback(f)}return l};t.prototype._setBoundTo=function(t){if(t!==undefined){this._bitField=this._bitField|2097152;this._boundTo=t}else{this._bitField=this._bitField&~2097152}};t.prototype._isBound=function(){return(this._bitField&2097152)===2097152};t.bind=function(e,r){return t.resolve(r).bind(e)}}},5229:(t,e,r)=>{"use strict";var n;if(typeof Promise!=="undefined")n=Promise;function noConflict(){try{if(Promise===i)Promise=n}catch(t){}return i}var i=r(5175)();i.noConflict=noConflict;t.exports=i},8779:(t,e,r)=>{"use strict";var n=Object.create;if(n){var i=n(null);var s=n(null);i[" size"]=s[" size"]=0}t.exports=function(t){var e=r(6587);var n=e.canEvaluate;var o=e.isIdentifier;var a;var c;if(true){var u=function(t){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,t))(ensureMethod)};var l=function(t){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",t))};var f=function(t,e,r){var n=r[t];if(typeof n!=="function"){if(!o(t)){return null}n=e(t);r[t]=n;r[" size"]++;if(r[" size"]>512){var i=Object.keys(r);for(var s=0;s<256;++s)delete r[i[s]];r[" size"]=i.length-256}}return n};a=function(t){return f(t,u,i)};c=function(t){return f(t,l,s)}}function ensureMethod(r,n){var i;if(r!=null)i=r[n];if(typeof i!=="function"){var s="Object "+e.classString(r)+" has no method '"+e.toString(n)+"'";throw new t.TypeError(s)}return i}function caller(t){var e=this.pop();var r=ensureMethod(t,e);return r.apply(t,this)}t.prototype.call=function(t){var e=arguments.length;var r=new Array(Math.max(e-1,0));for(var i=1;i{"use strict";t.exports=function(t,e,n,i){var s=r(6587);var o=s.tryCatch;var a=s.errorObj;var c=t._async;t.prototype["break"]=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");var t=this;var e=t;while(t._isCancellable()){if(!t._cancelBy(e)){if(e._isFollowing()){e._followee().cancel()}else{e._cancelBranched()}break}var r=t._cancellationParent;if(r==null||!r._isCancellable()){if(t._isFollowing()){t._followee().cancel()}else{t._cancelBranched()}break}else{if(t._isFollowing())t._followee().cancel();t._setWillBeCancelled();e=t;t=r}}};t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--};t.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===undefined||this._branchesRemainingToCancel<=0};t.prototype._cancelBy=function(t){if(t===this){this._branchesRemainingToCancel=0;this._invokeOnCancel();return true}else{this._branchHasCancelled();if(this._enoughBranchesHaveCancelled()){this._invokeOnCancel();return true}}return false};t.prototype._cancelBranched=function(){if(this._enoughBranchesHaveCancelled()){this._cancel()}};t.prototype._cancel=function(){if(!this._isCancellable())return;this._setCancelled();c.invoke(this._cancelPromises,this,undefined)};t.prototype._cancelPromises=function(){if(this._length()>0)this._settlePromises()};t.prototype._unsetOnCancel=function(){this._onCancelField=undefined};t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()};t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()};t.prototype._doInvokeOnCancel=function(t,e){if(s.isArray(t)){for(var r=0;r{"use strict";t.exports=function(t){var e=r(6587);var n=r(9048).keys;var i=e.tryCatch;var s=e.errorObj;function catchFilter(r,o,a){return function(c){var u=a._boundValue();t:for(var l=0;l{"use strict";t.exports=function(t){var e=false;var r=[];t.prototype._promiseCreated=function(){};t.prototype._pushContext=function(){};t.prototype._popContext=function(){return null};t._peekContext=t.prototype._peekContext=function(){};function Context(){this._trace=new Context.CapturedTrace(peekContext())}Context.prototype._pushContext=function(){if(this._trace!==undefined){this._trace._promiseCreated=null;r.push(this._trace)}};Context.prototype._popContext=function(){if(this._trace!==undefined){var t=r.pop();var e=t._promiseCreated;t._promiseCreated=null;return e}return null};function createContext(){if(e)return new Context}function peekContext(){var t=r.length-1;if(t>=0){return r[t]}return undefined}Context.CapturedTrace=null;Context.create=createContext;Context.deactivateLongStackTraces=function(){};Context.activateLongStackTraces=function(){var r=t.prototype._pushContext;var n=t.prototype._popContext;var i=t._peekContext;var s=t.prototype._peekContext;var o=t.prototype._promiseCreated;Context.deactivateLongStackTraces=function(){t.prototype._pushContext=r;t.prototype._popContext=n;t._peekContext=i;t.prototype._peekContext=s;t.prototype._promiseCreated=o;e=false};e=true;t.prototype._pushContext=Context.prototype._pushContext;t.prototype._popContext=Context.prototype._popContext;t._peekContext=t.prototype._peekContext=peekContext;t.prototype._promiseCreated=function(){var t=this._peekContext();if(t&&t._promiseCreated==null)t._promiseCreated=this}};return Context}},4776:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i){var s=t._async;var o=r(9640).Warning;var a=r(6587);var c=r(9048);var u=a.canAttachTrace;var l;var f;var h=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;var p=/\((?:timers\.js):\d+:\d+\)/;var d=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;var y=null;var v=null;var m=false;var g;var _=!!(a.env("BLUEBIRD_DEBUG")!=0&&(false||a.env("BLUEBIRD_DEBUG")||a.env("NODE_ENV")==="development"));var w=!!(a.env("BLUEBIRD_WARNINGS")!=0&&(_||a.env("BLUEBIRD_WARNINGS")));var b=!!(a.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(_||a.env("BLUEBIRD_LONG_STACK_TRACES")));var S=a.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(w||!!a.env("BLUEBIRD_W_FORGOTTEN_RETURN"));var E;(function(){var e=[];function unhandledRejectionCheck(){for(var t=0;t0};t.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576};t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&~1048576;if(this._isUnhandledRejectionNotified()){this._unsetUnhandledRejectionIsNotified();this._notifyUnhandledRejectionIsHandled()}};t.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0};t.prototype._warn=function(t,e,r){return warn(t,e,r||this)};t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();f=a.contextBind(r,e)};t.onUnhandledRejectionHandled=function(e){var r=t._getContext();l=a.contextBind(r,e)};var k=function(){};t.longStackTraces=function(){if(s.haveItemsQueued()&&!N.longStackTraces){throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n")}if(!N.longStackTraces&&longStackTracesIsSupported()){var r=t.prototype._captureStackTrace;var n=t.prototype._attachExtraTrace;var i=t.prototype._dereferenceTrace;N.longStackTraces=true;k=function(){if(s.haveItemsQueued()&&!N.longStackTraces){throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n")}t.prototype._captureStackTrace=r;t.prototype._attachExtraTrace=n;t.prototype._dereferenceTrace=i;e.deactivateLongStackTraces();N.longStackTraces=false};t.prototype._captureStackTrace=longStackTracesCaptureStackTrace;t.prototype._attachExtraTrace=longStackTracesAttachExtraTrace;t.prototype._dereferenceTrace=longStackTracesDereferenceTrace;e.activateLongStackTraces()}};t.hasLongStackTraces=function(){return N.longStackTraces&&longStackTracesIsSupported()};var x={unhandledrejection:{before:function(){var t=a.global.onunhandledrejection;a.global.onunhandledrejection=null;return t},after:function(t){a.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=a.global.onrejectionhandled;a.global.onrejectionhandled=null;return t},after:function(t){a.global.onrejectionhandled=t}}};var C=function(){var t=function(t,e){if(t){var r;try{r=t.before();return!a.global.dispatchEvent(e)}finally{t.after(r)}}else{return!a.global.dispatchEvent(e)}};try{if(typeof CustomEvent==="function"){var e=new CustomEvent("CustomEvent");a.global.dispatchEvent(e);return function(e,r){e=e.toLowerCase();var n={detail:r,cancelable:true};var i=new CustomEvent(e,n);c.defineProperty(i,"promise",{value:r.promise});c.defineProperty(i,"reason",{value:r.reason});return t(x[e],i)}}else if(typeof Event==="function"){var e=new Event("CustomEvent");a.global.dispatchEvent(e);return function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:true});n.detail=r;c.defineProperty(n,"promise",{value:r.promise});c.defineProperty(n,"reason",{value:r.reason});return t(x[e],n)}}else{var e=document.createEvent("CustomEvent");e.initCustomEvent("testingtheevent",false,true,{});a.global.dispatchEvent(e);return function(e,r){e=e.toLowerCase();var n=document.createEvent("CustomEvent");n.initCustomEvent(e,false,true,r);return t(x[e],n)}}}catch(t){}return function(){return false}}();var A=function(){if(a.isNode){return function(){return process.emit.apply(process,arguments)}}else{if(!a.global){return function(){return false}}return function(t){var e="on"+t.toLowerCase();var r=a.global[e];if(!r)return false;r.apply(a.global,[].slice.call(arguments,1));return true}}}();function generatePromiseLifecycleEventObject(t,e){return{promise:e}}var T={promiseCreated:generatePromiseLifecycleEventObject,promiseFulfilled:generatePromiseLifecycleEventObject,promiseRejected:generatePromiseLifecycleEventObject,promiseResolved:generatePromiseLifecycleEventObject,promiseCancelled:generatePromiseLifecycleEventObject,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:generatePromiseLifecycleEventObject};var P=function(t){var e=false;try{e=A.apply(null,arguments)}catch(t){s.throwLater(t);e=true}var r=false;try{r=C(t,T[t].apply(null,arguments))}catch(t){s.throwLater(t);r=true}return r||e};t.config=function(e){e=Object(e);if("longStackTraces"in e){if(e.longStackTraces){t.longStackTraces()}else if(!e.longStackTraces&&t.hasLongStackTraces()){k()}}if("warnings"in e){var r=e.warnings;N.warnings=!!r;S=N.warnings;if(a.isObject(r)){if("wForgottenReturn"in r){S=!!r.wForgottenReturn}}}if("cancellation"in e&&e.cancellation&&!N.cancellation){if(s.haveItemsQueued()){throw new Error("cannot enable cancellation after promises are in use")}t.prototype._clearCancellationData=cancellationClearCancellationData;t.prototype._propagateFrom=cancellationPropagateFrom;t.prototype._onCancel=cancellationOnCancel;t.prototype._setOnCancel=cancellationSetOnCancel;t.prototype._attachCancellationCallback=cancellationAttachCancellationCallback;t.prototype._execute=cancellationExecute;j=cancellationPropagateFrom;N.cancellation=true}if("monitoring"in e){if(e.monitoring&&!N.monitoring){N.monitoring=true;t.prototype._fireEvent=P}else if(!e.monitoring&&N.monitoring){N.monitoring=false;t.prototype._fireEvent=defaultFireEvent}}if("asyncHooks"in e&&a.nodeSupportsAsyncResource){var o=N.asyncHooks;var c=!!e.asyncHooks;if(o!==c){N.asyncHooks=c;if(c){n()}else{i()}}}return t};function defaultFireEvent(){return false}t.prototype._fireEvent=defaultFireEvent;t.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}};t.prototype._onCancel=function(){};t.prototype._setOnCancel=function(t){};t.prototype._attachCancellationCallback=function(t){};t.prototype._captureStackTrace=function(){};t.prototype._attachExtraTrace=function(){};t.prototype._dereferenceTrace=function(){};t.prototype._clearCancellationData=function(){};t.prototype._propagateFrom=function(t,e){};function cancellationExecute(t,e,r){var n=this;try{t(e,r,function(t){if(typeof t!=="function"){throw new TypeError("onCancel must be a function, got: "+a.toString(t))}n._attachCancellationCallback(t)})}catch(t){return t}}function cancellationAttachCancellationCallback(t){if(!this._isCancellable())return this;var e=this._onCancel();if(e!==undefined){if(a.isArray(e)){e.push(t)}else{this._setOnCancel([e,t])}}else{this._setOnCancel(t)}}function cancellationOnCancel(){return this._onCancelField}function cancellationSetOnCancel(t){this._onCancelField=t}function cancellationClearCancellationData(){this._cancellationParent=undefined;this._onCancelField=undefined}function cancellationPropagateFrom(t,e){if((e&1)!==0){this._cancellationParent=t;var r=t._branchesRemainingToCancel;if(r===undefined){r=0}t._branchesRemainingToCancel=r+1}if((e&2)!==0&&t._isBound()){this._setBoundTo(t._boundTo)}}function bindingPropagateFrom(t,e){if((e&2)!==0&&t._isBound()){this._setBoundTo(t._boundTo)}}var j=bindingPropagateFrom;function boundValueFunction(){var e=this._boundTo;if(e!==undefined){if(e instanceof t){if(e.isFulfilled()){return e.value()}else{return undefined}}}return e}function longStackTracesCaptureStackTrace(){this._trace=new CapturedTrace(this._peekContext())}function longStackTracesAttachExtraTrace(t,e){if(u(t)){var r=this._trace;if(r!==undefined){if(e)r=r._parent}if(r!==undefined){r.attachExtraTrace(t)}else if(!t.__stackCleaned__){var n=parseStackAndMessage(t);a.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n"));a.notEnumerableProp(t,"__stackCleaned__",true)}}}function longStackTracesDereferenceTrace(){this._trace=undefined}function checkForgottenReturns(t,e,r,n,i){if(t===undefined&&e!==null&&S){if(i!==undefined&&i._returnedNonUndefined())return;if((n._bitField&65535)===0)return;if(r)r=r+" ";var s="";var o="";if(e._trace){var a=e._trace.stack.split("\n");var c=cleanStack(a);for(var u=c.length-1;u>=0;--u){var l=c[u];if(!p.test(l)){var f=l.match(d);if(f){s="at "+f[1]+":"+f[2]+":"+f[3]+" "}break}}if(c.length>0){var h=c[0];for(var u=0;u0){o="\n"+a[u-1]}break}}}}var y="a promise was created in a "+r+"handler "+s+"but was not returned from it, "+"see http://goo.gl/rRqMUw"+o;n._warn(y,true,e)}}function deprecated(t,e){var r=t+" is deprecated and will be removed in a future version.";if(e)r+=" Use "+e+" instead.";return warn(r)}function warn(e,r,n){if(!N.warnings)return;var i=new o(e);var s;if(r){n._attachExtraTrace(i)}else if(N.longStackTraces&&(s=t._peekContext())){s.attachExtraTrace(i)}else{var a=parseStackAndMessage(i);i.stack=a.message+"\n"+a.stack.join("\n")}if(!P("warning",i)){formatAndLogError(i,"",true)}}function reconstructStack(t,e){for(var r=0;r=0;--a){if(n[a]===s){o=a;break}}for(var a=o;a>=0;--a){var c=n[a];if(e[i]===c){e.pop();i--}else{break}}e=n}}function cleanStack(t){var e=[];for(var r=0;r0&&t.name!="SyntaxError"){e=e.slice(r)}return e}function parseStackAndMessage(t){var e=t.stack;var r=t.toString();e=typeof e==="string"&&e.length>0?stackFramesAsArray(t):[" (No stack trace)"];return{message:r,stack:t.name=="SyntaxError"?e:cleanStack(e)}}function formatAndLogError(t,e,r){if(typeof console!=="undefined"){var n;if(a.isObject(t)){var i=t.stack;n=e+v(i,t)}else{n=e+String(t)}if(typeof g==="function"){g(n,r)}else if(typeof console.log==="function"||typeof console.log==="object"){console.log(n)}}}function fireRejectionEvent(t,e,r,n){var i=false;try{if(typeof e==="function"){i=true;if(t==="rejectionHandled"){e(n)}else{e(r,n)}}}catch(t){s.throwLater(t)}if(t==="unhandledRejection"){if(!P(t,r,n)&&!i){formatAndLogError(r,"Unhandled rejection ")}}else{P(t,n)}}function formatNonError(t){var e;if(typeof t==="function"){e="[function "+(t.name||"anonymous")+"]"}else{e=t&&typeof t.toString==="function"?t.toString():a.toString(t);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e)){try{var n=JSON.stringify(t);e=n}catch(t){}}if(e.length===0){e="(empty array)"}}return"(<"+snip(e)+">, no stack trace)"}function snip(t){var e=41;if(t.length=s){return}O=function(t){if(h.test(t))return true;var e=parseLineInfo(t);if(e){if(e.fileName===o&&(i<=e.line&&e.line<=s)){return true}}return false}}function CapturedTrace(t){this._parent=t;this._promisesCreated=0;var e=this._length=1+(t===undefined?0:t._length);R(this,CapturedTrace);if(e>32)this.uncycle()}a.inherits(CapturedTrace,Error);e.CapturedTrace=CapturedTrace;CapturedTrace.prototype.uncycle=function(){var t=this._length;if(t<2)return;var e=[];var r={};for(var n=0,i=this;i!==undefined;++n){e.push(i);i=i._parent}t=this._length=n;for(var n=t-1;n>=0;--n){var s=e[n].stack;if(r[s]===undefined){r[s]=n}}for(var n=0;n0){e[a-1]._parent=undefined;e[a-1]._length=1}e[n]._parent=undefined;e[n]._length=1;var c=n>0?e[n-1]:this;if(a=0;--l){e[l]._length=u;u++}return}}};CapturedTrace.prototype.attachExtraTrace=function(t){if(t.__stackCleaned__)return;this.uncycle();var e=parseStackAndMessage(t);var r=e.message;var n=[e.stack];var i=this;while(i!==undefined){n.push(cleanStack(i.stack.split("\n")));i=i._parent}removeCommonRoots(n);removeDuplicateOrEmptyJumps(n);a.notEnumerableProp(t,"stack",reconstructStack(r,n));a.notEnumerableProp(t,"__stackCleaned__",true)};var R=function stackDetection(){var t=/^\s*at\s*/;var e=function(t,e){if(typeof t==="string")return t;if(e.name!==undefined&&e.message!==undefined){return e.toString()}return formatNonError(e)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6;y=t;v=e;var r=Error.captureStackTrace;O=function(t){return h.test(t)};return function(t,e){Error.stackTraceLimit+=6;r(t,e);Error.stackTraceLimit-=6}}var n=new Error;if(typeof n.stack==="string"&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0){y=/@/;v=e;m=true;return function captureStackTrace(t){t.stack=(new Error).stack}}var i;try{throw new Error}catch(t){i="stack"in t}if(!("stack"in n)&&i&&typeof Error.stackTraceLimit==="number"){y=t;v=e;return function captureStackTrace(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6}}v=function(t,e){if(typeof t==="string")return t;if((typeof e==="object"||typeof e==="function")&&e.name!==undefined&&e.message!==undefined){return e.toString()}return formatNonError(e)};return null}([]);if(typeof console!=="undefined"&&typeof console.warn!=="undefined"){g=function(t){console.warn(t)};if(a.isNode&&process.stderr.isTTY){g=function(t,e){var r=e?"":"";console.warn(r+t+"\n")}}else if(!a.isNode&&typeof(new Error).stack==="string"){g=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}}}var N={warnings:w,longStackTraces:false,cancellation:false,monitoring:false,asyncHooks:false};if(b)t.longStackTraces();return{asyncHooks:function(){return N.asyncHooks},longStackTraces:function(){return N.longStackTraces},warnings:function(){return N.warnings},cancellation:function(){return N.cancellation},monitoring:function(){return N.monitoring},propagateFromFunction:function(){return j},boundValueFunction:function(){return boundValueFunction},checkForgottenReturns:checkForgottenReturns,setBounds:setBounds,warn:warn,deprecated:deprecated,CapturedTrace:CapturedTrace,fireDomEvent:C,fireGlobalEvent:A}}},8925:t=>{"use strict";t.exports=function(t){function returner(){return this.value}function thrower(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(e){if(e instanceof t)e.suppressUnhandledRejections();return this._then(returner,undefined,undefined,{value:e},undefined)};t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(thrower,undefined,undefined,{reason:t},undefined)};t.prototype.catchThrow=function(t){if(arguments.length<=1){return this._then(undefined,thrower,undefined,{reason:t},undefined)}else{var e=arguments[1];var r=function(){throw e};return this.caught(t,r)}};t.prototype.catchReturn=function(e){if(arguments.length<=1){if(e instanceof t)e.suppressUnhandledRejections();return this._then(undefined,returner,undefined,{value:e},undefined)}else{var r=arguments[1];if(r instanceof t)r.suppressUnhandledRejections();var n=function(){return r};return this.caught(e,n)}}}},5708:t=>{"use strict";t.exports=function(t,e){var r=t.reduce;var n=t.all;function promiseAllThis(){return n(this)}function PromiseMapSeries(t,n){return r(t,n,e,e)}t.prototype.each=function(t){return r(this,t,e,0)._then(promiseAllThis,undefined,undefined,this,undefined)};t.prototype.mapSeries=function(t){return r(this,t,e,e)};t.each=function(t,n){return r(t,n,e,0)._then(promiseAllThis,undefined,undefined,t,undefined)};t.mapSeries=PromiseMapSeries}},9640:(t,e,r)=>{"use strict";var n=r(9048);var i=n.freeze;var s=r(6587);var o=s.inherits;var a=s.notEnumerableProp;function subError(t,e){function SubError(r){if(!(this instanceof SubError))return new SubError(r);a(this,"message",typeof r==="string"?r:e);a(this,"name",t);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{Error.call(this)}}o(SubError,Error);return SubError}var c,u;var l=subError("Warning","warning");var f=subError("CancellationError","cancellation error");var h=subError("TimeoutError","timeout error");var p=subError("AggregateError","aggregate error");try{c=TypeError;u=RangeError}catch(t){c=subError("TypeError","type error");u=subError("RangeError","range error")}var d=("join pop push shift unshift slice filter forEach some "+"every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");for(var y=0;y{var e=function(){"use strict";return this===undefined}();if(e){t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:e,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!!(!r||r.writable||r.set)}}}else{var r={}.hasOwnProperty;var n={}.toString;var i={}.constructor.prototype;var s=function(t){var e=[];for(var n in t){if(r.call(t,n)){e.push(n)}}return e};var o=function(t,e){return{value:t[e]}};var a=function(t,e,r){t[e]=r.value;return t};var c=function(t){return t};var u=function(t){try{return Object(t).constructor.prototype}catch(t){return i}};var l=function(t){try{return n.call(t)==="[object Array]"}catch(t){return false}};t.exports={isArray:l,keys:s,names:s,defineProperty:a,getDescriptor:o,freeze:c,getPrototypeOf:u,isES5:e,propertyIsWritable:function(){return true}}}},3359:t=>{"use strict";t.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)};t.filter=function(t,n,i){return r(t,n,i,e)}}},1371:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var i=r(6587);var s=t.CancellationError;var o=i.errorObj;var a=r(691)(n);function PassThroughHandlerContext(t,e,r){this.promise=t;this.type=e;this.handler=r;this.called=false;this.cancelPromise=null}PassThroughHandlerContext.prototype.isFinallyHandler=function(){return this.type===0};function FinallyHandlerCancelReaction(t){this.finallyHandler=t}FinallyHandlerCancelReaction.prototype._resultCancelled=function(){checkCancel(this.finallyHandler)};function checkCancel(t,e){if(t.cancelPromise!=null){if(arguments.length>1){t.cancelPromise._reject(e)}else{t.cancelPromise._cancel()}t.cancelPromise=null;return true}return false}function succeed(){return finallyHandler.call(this,this.promise._target()._settledValue())}function fail(t){if(checkCancel(this,t))return;o.e=t;return o}function finallyHandler(r){var i=this.promise;var a=this.handler;if(!this.called){this.called=true;var c=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),r);if(c===n){return c}else if(c!==undefined){i._setReturnedNonUndefined();var u=e(c,i);if(u instanceof t){if(this.cancelPromise!=null){if(u._isCancelled()){var l=new s("late cancellation observer");i._attachExtraTrace(l);o.e=l;return o}else if(u.isPending()){u._attachCancellationCallback(new FinallyHandlerCancelReaction(this))}}return u._then(succeed,fail,undefined,this,undefined)}}}if(i.isRejected()){checkCancel(this);o.e=r;return o}else{checkCancel(this);return r}}t.prototype._passThrough=function(t,e,r,n){if(typeof t!=="function")return this.then();return this._then(r,n,undefined,new PassThroughHandlerContext(this,e,t),undefined)};t.prototype.lastly=t.prototype["finally"]=function(t){return this._passThrough(t,0,finallyHandler,finallyHandler)};t.prototype.tap=function(t){return this._passThrough(t,1,finallyHandler)};t.prototype.tapCatch=function(e){var r=arguments.length;if(r===1){return this._passThrough(e,1,undefined,finallyHandler)}else{var n=new Array(r-1),s=0,o;for(o=0;o{"use strict";t.exports=function(t,e,n,i,s,o){var a=r(9640);var c=a.TypeError;var u=r(6587);var l=u.errorObj;var f=u.tryCatch;var h=[];function promiseFromYieldHandler(e,r,n){for(var s=0;s{"use strict";t.exports=function(t,e,n,i,s){var o=r(6587);var a=o.canEvaluate;var c=o.tryCatch;var u=o.errorObj;var l;if(true){if(a){var f=function(t){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,t))};var h=function(t){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,t))};var p=function(e){var r=new Array(e);for(var n=0;n0&&typeof arguments[r]==="function"){s=arguments[r];if(true){if(r<=8&&a){var c=new t(i);c._captureStackTrace();var u=d[r-1];var f=new u(s);var h=y;for(var p=0;p{"use strict";t.exports=function(t,e,n,i,s,o){var a=r(6587);var c=a.tryCatch;var u=a.errorObj;var l=t._async;function MappingPromiseArray(e,r,n,i){this.constructor$(e);this._promise._captureStackTrace();var o=t._getContext();this._callback=a.contextBind(o,r);this._preservedValues=i===s?new Array(this.length()):null;this._limit=n;this._inFlight=0;this._queue=[];l.invoke(this._asyncInit,this,undefined);if(a.isArray(e)){for(var c=0;c=1){this._inFlight--;this._drainQueue();if(this._isResolved())return true}}else{if(l>=1&&this._inFlight>=l){n[r]=e;this._queue.push(r);return false}if(a!==null)a[r]=e;var f=this._promise;var h=this._callback;var p=f._boundValue();f._pushContext();var d=c(h).call(p,e,r,s);var y=f._popContext();o.checkForgottenReturns(d,y,a!==null?"Promise.filter":"Promise.map",f);if(d===u){this._reject(d.e);return true}var v=i(d,this._promise);if(v instanceof t){v=v._target();var m=v._bitField;if((m&50397184)===0){if(l>=1)this._inFlight++;n[r]=v;v._proxy(this,(r+1)*-1);return false}else if((m&33554432)!==0){d=v._value()}else if((m&16777216)!==0){this._reject(v._reason());return true}else{this._cancel();return true}}n[r]=d}var g=++this._totalResolved;if(g>=s){if(a!==null){this._filter(n,a)}else{this._resolve(n)}return true}return false};MappingPromiseArray.prototype._drainQueue=function(){var t=this._queue;var e=this._limit;var r=this._values;while(t.length>0&&this._inFlight=1?o:0;return new MappingPromiseArray(e,r,o,s).promise()}t.prototype.map=function(t,e){return map(this,t,e,null)};t.map=function(t,e,r,n){return map(t,e,r,n)}}},3303:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i,s){var o=r(6587);var a=o.tryCatch;t.method=function(r){if(typeof r!=="function"){throw new t.TypeError("expecting a function but got "+o.classString(r))}return function(){var n=new t(e);n._captureStackTrace();n._pushContext();var i=a(r).apply(this,arguments);var o=n._popContext();s.checkForgottenReturns(i,o,"Promise.method",n);n._resolveFromSyncValue(i);return n}};t.attempt=t["try"]=function(r){if(typeof r!=="function"){return i("expecting a function but got "+o.classString(r))}var n=new t(e);n._captureStackTrace();n._pushContext();var c;if(arguments.length>1){s.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1];var l=arguments[2];c=o.isArray(u)?a(r).apply(l,u):a(r).call(l,u)}else{c=a(r)()}var f=n._popContext();s.checkForgottenReturns(c,f,"Promise.try",n);n._resolveFromSyncValue(c);return n};t.prototype._resolveFromSyncValue=function(t){if(t===o.errorObj){this._rejectCallback(t.e,false)}else{this._resolveCallback(t,true)}}}},938:(t,e,r)=>{"use strict";var n=r(6587);var i=n.maybeWrapAsError;var s=r(9640);var o=s.OperationalError;var a=r(9048);function isUntypedError(t){return t instanceof Error&&a.getPrototypeOf(t)===Error.prototype}var c=/^(?:name|message|stack|cause)$/;function wrapAsOperationalError(t){var e;if(isUntypedError(t)){e=new o(t);e.name=t.name;e.message=t.message;e.stack=t.stack;var r=a.keys(t);for(var i=0;i{"use strict";t.exports=function(t){var e=r(6587);var n=t._async;var i=e.tryCatch;var s=e.errorObj;function spreadAdapter(t,r){var o=this;if(!e.isArray(t))return successAdapter.call(o,t,r);var a=i(r).apply(o._boundValue(),[null].concat(t));if(a===s){n.throwLater(a.e)}}function successAdapter(t,e){var r=this;var o=r._boundValue();var a=t===undefined?i(e).call(o,null):i(e).call(o,null,t);if(a===s){n.throwLater(a.e)}}function errorAdapter(t,e){var r=this;if(!t){var o=new Error(t+"");o.cause=t;t=o}var a=i(e).call(r._boundValue(),t);if(a===s){n.throwLater(a.e)}}t.prototype.asCallback=t.prototype.nodeify=function(t,e){if(typeof t=="function"){var r=successAdapter;if(e!==undefined&&Object(e).spread){r=spreadAdapter}this._then(r,errorAdapter,undefined,this,t)}return this}}},5175:(t,e,r)=>{"use strict";t.exports=function(){var e=function(){return new _("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")};var n=function(){return new Promise.PromiseInspection(this._target())};var i=function(t){return Promise.reject(new _(t))};function Proxyable(){}var s={};var o=r(6587);o.setReflectHandler(n);var a=function(){var t=process.domain;if(t===undefined){return null}return t};var c=function(){return null};var u=function(){return{domain:a(),async:null}};var l=o.isNode&&o.nodeSupportsAsyncResource?r(7303).AsyncResource:null;var f=function(){return{domain:a(),async:new l("Bluebird::Promise")}};var h=o.isNode?u:c;o.notEnumerableProp(Promise,"_getContext",h);var p=function(){h=f;o.notEnumerableProp(Promise,"_getContext",f)};var d=function(){h=u;o.notEnumerableProp(Promise,"_getContext",u)};var y=r(9048);var v=r(9952);var m=new v;y.defineProperty(Promise,"_async",{value:m});var g=r(9640);var _=Promise.TypeError=g.TypeError;Promise.RangeError=g.RangeError;var w=Promise.CancellationError=g.CancellationError;Promise.TimeoutError=g.TimeoutError;Promise.OperationalError=g.OperationalError;Promise.RejectionError=g.OperationalError;Promise.AggregateError=g.AggregateError;var b=function(){};var S={};var E={};var k=r(3938)(Promise,b);var x=r(3003)(Promise,b,k,i,Proxyable);var C=r(1030)(Promise);var A=C.create;var T=r(4776)(Promise,C,p,d);var P=T.CapturedTrace;var j=r(1371)(Promise,k,E);var O=r(691)(E);var F=r(938);var R=o.errorObj;var N=o.tryCatch;function check(t,e){if(t==null||t.constructor!==Promise){throw new _("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}if(typeof e!=="function"){throw new _("expecting a function but got "+o.classString(e))}}function Promise(t){if(t!==b){check(this,t)}this._bitField=0;this._fulfillmentHandler0=undefined;this._rejectionHandler0=undefined;this._promise0=undefined;this._receiver0=undefined;this._resolveFromExecutor(t);this._promiseCreated();this._fireEvent("promiseCreated",this)}Promise.prototype.toString=function(){return"[object Promise]"};Promise.prototype.caught=Promise.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var r=new Array(e-1),n=0,s;for(s=0;s0&&typeof t!=="function"&&typeof e!=="function"){var r=".then() only accepts functions but was passed: "+o.classString(t);if(arguments.length>1){r+=", "+o.classString(e)}this._warn(r)}return this._then(t,e,undefined,undefined,undefined)};Promise.prototype.done=function(t,e){var r=this._then(t,e,undefined,undefined,undefined);r._setIsFinal()};Promise.prototype.spread=function(t){if(typeof t!=="function"){return i("expecting a function but got "+o.classString(t))}return this.all()._then(t,undefined,undefined,S,undefined)};Promise.prototype.toJSON=function(){var t={isFulfilled:false,isRejected:false,fulfillmentValue:undefined,rejectionReason:undefined};if(this.isFulfilled()){t.fulfillmentValue=this.value();t.isFulfilled=true}else if(this.isRejected()){t.rejectionReason=this.reason();t.isRejected=true}return t};Promise.prototype.all=function(){if(arguments.length>0){this._warn(".all() was passed arguments but it does not take any")}return new x(this).promise()};Promise.prototype.error=function(t){return this.caught(o.originatesFromRejection,t)};Promise.getNewLibraryCopy=t.exports;Promise.is=function(t){return t instanceof Promise};Promise.fromNode=Promise.fromCallback=function(t){var e=new Promise(b);e._captureStackTrace();var r=arguments.length>1?!!Object(arguments[1]).multiArgs:false;var n=N(t)(F(e,r));if(n===R){e._rejectCallback(n.e,true)}if(!e._isFateSealed())e._setAsyncGuaranteed();return e};Promise.all=function(t){return new x(t).promise()};Promise.cast=function(t){var e=k(t);if(!(e instanceof Promise)){e=new Promise(b);e._captureStackTrace();e._setFulfilled();e._rejectionHandler0=t}return e};Promise.resolve=Promise.fulfilled=Promise.cast;Promise.reject=Promise.rejected=function(t){var e=new Promise(b);e._captureStackTrace();e._rejectCallback(t,true);return e};Promise.setScheduler=function(t){if(typeof t!=="function"){throw new _("expecting a function but got "+o.classString(t))}return m.setScheduler(t)};Promise.prototype._then=function(t,e,r,n,i){var s=i!==undefined;var a=s?i:new Promise(b);var c=this._target();var u=c._bitField;if(!s){a._propagateFrom(this,3);a._captureStackTrace();if(n===undefined&&(this._bitField&2097152)!==0){if(!((u&50397184)===0)){n=this._boundValue()}else{n=c===this?undefined:this._boundTo}}this._fireEvent("promiseChained",this,a)}var l=h();if(!((u&50397184)===0)){var f,p,d=c._settlePromiseCtx;if((u&33554432)!==0){p=c._rejectionHandler0;f=t}else if((u&16777216)!==0){p=c._fulfillmentHandler0;f=e;c._unsetRejectionIsUnhandled()}else{d=c._settlePromiseLateCancellationObserver;p=new w("late cancellation observer");c._attachExtraTrace(p);f=e}m.invoke(d,c,{handler:o.contextBind(l,f),promise:a,receiver:n,value:p})}else{c._addCallbacks(t,e,a,n,l)}return a};Promise.prototype._length=function(){return this._bitField&65535};Promise.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0};Promise.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864};Promise.prototype._setLength=function(t){this._bitField=this._bitField&-65536|t&65535};Promise.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432;this._fireEvent("promiseFulfilled",this)};Promise.prototype._setRejected=function(){this._bitField=this._bitField|16777216;this._fireEvent("promiseRejected",this)};Promise.prototype._setFollowing=function(){this._bitField=this._bitField|67108864;this._fireEvent("promiseResolved",this)};Promise.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304};Promise.prototype._isFinal=function(){return(this._bitField&4194304)>0};Promise.prototype._unsetCancelled=function(){this._bitField=this._bitField&~65536};Promise.prototype._setCancelled=function(){this._bitField=this._bitField|65536;this._fireEvent("promiseCancelled",this)};Promise.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608};Promise.prototype._setAsyncGuaranteed=function(){if(m.hasCustomScheduler())return;var t=this._bitField;this._bitField=t|(t&536870912)>>2^134217728};Promise.prototype._setNoAsyncGuarantee=function(){this._bitField=(this._bitField|536870912)&~134217728};Promise.prototype._receiverAt=function(t){var e=t===0?this._receiver0:this[t*4-4+3];if(e===s){return undefined}else if(e===undefined&&this._isBound()){return this._boundValue()}return e};Promise.prototype._promiseAt=function(t){return this[t*4-4+2]};Promise.prototype._fulfillmentHandlerAt=function(t){return this[t*4-4+0]};Promise.prototype._rejectionHandlerAt=function(t){return this[t*4-4+1]};Promise.prototype._boundValue=function(){};Promise.prototype._migrateCallback0=function(t){var e=t._bitField;var r=t._fulfillmentHandler0;var n=t._rejectionHandler0;var i=t._promise0;var o=t._receiverAt(0);if(o===undefined)o=s;this._addCallbacks(r,n,i,o,null)};Promise.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e);var n=t._rejectionHandlerAt(e);var i=t._promiseAt(e);var o=t._receiverAt(e);if(o===undefined)o=s;this._addCallbacks(r,n,i,o,null)};Promise.prototype._addCallbacks=function(t,e,r,n,i){var s=this._length();if(s>=65535-4){s=0;this._setLength(0)}if(s===0){this._promise0=r;this._receiver0=n;if(typeof t==="function"){this._fulfillmentHandler0=o.contextBind(i,t)}if(typeof e==="function"){this._rejectionHandler0=o.contextBind(i,e)}}else{var a=s*4-4;this[a+2]=r;this[a+3]=n;if(typeof t==="function"){this[a+0]=o.contextBind(i,t)}if(typeof e==="function"){this[a+1]=o.contextBind(i,e)}}this._setLength(s+1);return s};Promise.prototype._proxy=function(t,e){this._addCallbacks(undefined,undefined,e,t,null)};Promise.prototype._resolveCallback=function(t,r){if((this._bitField&117506048)!==0)return;if(t===this)return this._rejectCallback(e(),false);var n=k(t,this);if(!(n instanceof Promise))return this._fulfill(t);if(r)this._propagateFrom(n,2);var i=n._target();if(i===this){this._reject(e());return}var s=i._bitField;if((s&50397184)===0){var o=this._length();if(o>0)i._migrateCallback0(this);for(var a=1;a>>16)return;if(t===this){var n=e();this._attachExtraTrace(n);return this._reject(n)}this._setFulfilled();this._rejectionHandler0=t;if((r&65535)>0){if((r&134217728)!==0){this._settlePromises()}else{m.settlePromises(this)}this._dereferenceTrace()}};Promise.prototype._reject=function(t){var e=this._bitField;if((e&117506048)>>>16)return;this._setRejected();this._fulfillmentHandler0=t;if(this._isFinal()){return m.fatalError(t,o.isNode)}if((e&65535)>0){m.settlePromises(this)}else{this._ensurePossibleRejectionHandled()}};Promise.prototype._fulfillPromises=function(t,e){for(var r=1;r0){if((t&16842752)!==0){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t);this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t);this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()};Promise.prototype._settledValue=function(){var t=this._bitField;if((t&33554432)!==0){return this._rejectionHandler0}else if((t&16777216)!==0){return this._fulfillmentHandler0}};if(typeof Symbol!=="undefined"&&Symbol.toStringTag){y.defineProperty(Promise.prototype,Symbol.toStringTag,{get:function(){return"Object"}})}function deferResolve(t){this.promise._resolveCallback(t)}function deferReject(t){this.promise._rejectCallback(t,false)}Promise.defer=Promise.pending=function(){T.deprecated("Promise.defer","new Promise");var t=new Promise(b);return{promise:t,resolve:deferResolve,reject:deferReject}};o.notEnumerableProp(Promise,"_makeSelfResolutionError",e);r(3303)(Promise,b,k,i,T);r(1273)(Promise,b,k,T);r(7386)(Promise,x,i,T);r(8925)(Promise);r(7659)(Promise);r(9255)(Promise,x,k,b,m);Promise.Promise=Promise;Promise.version="3.7.2";r(8779)(Promise);r(2225)(Promise,i,b,k,Proxyable,T);r(2757)(Promise,x,i,k,b,T);r(733)(Promise);r(7632)(Promise,b);r(4519)(Promise,x,k,i);r(3741)(Promise,b,k,i);r(8773)(Promise,x,i,k,b,T);r(8741)(Promise,x,T);r(5566)(Promise,x,i);r(8329)(Promise,b,T);r(1904)(Promise,i,k,A,b,T);r(5801)(Promise);r(5708)(Promise,b);r(3359)(Promise,b);o.toFastProperties(Promise);o.toFastProperties(Promise.prototype);function fillTypes(t){var e=new Promise(b);e._fulfillmentHandler0=t;e._rejectionHandler0=t;e._promise0=t;e._receiver0=t}fillTypes({a:1});fillTypes({b:2});fillTypes({c:3});fillTypes(1);fillTypes(function(){});fillTypes(undefined);fillTypes(false);fillTypes(new Promise(b));T.setBounds(v.firstLineError,o.lastLineError);return Promise}},3003:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i,s){var o=r(6587);var a=o.isArray;function toResolutionValue(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function PromiseArray(r){var n=this._promise=new t(e);if(r instanceof t){n._propagateFrom(r,3);r.suppressUnhandledRejections()}n._setOnCancel(this);this._values=r;this._length=0;this._totalResolved=0;this._init(undefined,-2)}o.inherits(PromiseArray,s);PromiseArray.prototype.length=function(){return this._length};PromiseArray.prototype.promise=function(){return this._promise};PromiseArray.prototype._init=function init(e,r){var s=n(this._values,this._promise);if(s instanceof t){s=s._target();var a=s._bitField;this._values=s;if((a&50397184)===0){this._promise._setAsyncGuaranteed();return s._then(init,this._reject,undefined,this,r)}else if((a&33554432)!==0){s=s._value()}else if((a&16777216)!==0){return this._reject(s._reason())}else{return this._cancel()}}s=o.asArray(s);if(s===null){var c=i("expecting an array or an iterable object but got "+o.classString(s)).reason();this._promise._rejectCallback(c,false);return}if(s.length===0){if(r===-5){this._resolveEmptyArray()}else{this._resolve(toResolutionValue(r))}return}this._iterate(s)};PromiseArray.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r;this._values=this.shouldCopyValues()?new Array(r):this._values;var i=this._promise;var s=false;var o=null;for(var a=0;a=this._length){this._resolve(this._values);return true}return false};PromiseArray.prototype._promiseCancelled=function(){this._cancel();return true};PromiseArray.prototype._promiseRejected=function(t){this._totalResolved++;this._reject(t);return true};PromiseArray.prototype._resultCancelled=function(){if(this._isResolved())return;var e=this._values;this._cancel();if(e instanceof t){e.cancel()}else{for(var r=0;r{"use strict";t.exports=function(t,e){var n={};var i=r(6587);var s=r(938);var o=i.withAppended;var a=i.maybeWrapAsError;var c=i.canEvaluate;var u=r(9640).TypeError;var l="Async";var f={__isPromisified__:true};var h=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"];var p=new RegExp("^(?:"+h.join("|")+")$");var d=function(t){return i.isIdentifier(t)&&t.charAt(0)!=="_"&&t!=="constructor"};function propsFilter(t){return!p.test(t)}function isPromisified(t){try{return t.__isPromisified__===true}catch(t){return false}}function hasPromisified(t,e,r){var n=i.getDataPropertyOrDefault(t,e+r,f);return n?isPromisified(n):false}function checkValid(t,e,r){for(var n=0;n=r;--n){e.push(n)}for(var n=t+1;n<=3;++n){e.push(n)}return e};var g=function(t){return i.filledRange(t,"_arg","")};var _=function(t){return i.filledRange(Math.max(t,3),"_arg","")};var w=function(t){if(typeof t.length==="number"){return Math.max(Math.min(t.length,1023+1),0)}return 0};v=function(r,c,u,l,f,h){var p=Math.max(0,w(l)-1);var d=m(p);var y=typeof r==="string"||c===n;function generateCallForArgumentCount(t){var e=g(t).join(", ");var r=t>0?", ":"";var n;if(y){n="ret = callback.call(this, {{args}}, nodeback); break;\n"}else{n=c===undefined?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n"}return n.replace("{{args}}",e).replace(", ",r)}function generateArgumentSwitchCase(){var t="";for(var e=0;e{"use strict";t.exports=function(t,e,n,i){var s=r(6587);var o=s.isObject;var a=r(9048);var c;if(typeof Map==="function")c=Map;var u=function(){var t=0;var e=0;function extractEntry(r,n){this[t]=r;this[t+e]=n;t++}return function mapToEntries(r){e=r.size;t=0;var n=new Array(r.size*2);r.forEach(extractEntry,n);return n}}();var l=function(t){var e=new c;var r=t.length/2|0;for(var n=0;n=this._length){var n;if(this._isMap){n=l(this._values)}else{n={};var i=this.length();for(var s=0,o=this.length();s>1};function props(e){var r;var s=n(e);if(!o(s)){return i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}else if(s instanceof t){r=s._then(t.props,undefined,undefined,undefined,undefined)}else{r=new PropertiesPromiseArray(s).promise()}if(s instanceof t){r._propagateFrom(s,2)}return r}t.prototype.props=function(){return props(this)};t.props=function(t){return props(t)}}},3172:t=>{"use strict";function arrayMove(t,e,r,n,i){for(var s=0;s{"use strict";t.exports=function(t,e,n,i){var s=r(6587);var o=function(t){return t.then(function(e){return race(e,t)})};function race(r,a){var c=n(r);if(c instanceof t){return o(c)}else{r=s.asArray(r);if(r===null)return i("expecting an array or an iterable object but got "+s.classString(r))}var u=new t(e);if(a!==undefined){u._propagateFrom(a,3)}var l=u._fulfill;var f=u._reject;for(var h=0,p=r.length;h{"use strict";t.exports=function(t,e,n,i,s,o){var a=r(6587);var c=a.tryCatch;function ReductionPromiseArray(e,r,n,i){this.constructor$(e);var o=t._getContext();this._fn=a.contextBind(o,r);if(n!==undefined){n=t.resolve(n);n._attachCancellationCallback(this)}this._initialValue=n;this._currentCancellable=null;if(i===s){this._eachValues=Array(this._length)}else if(i===0){this._eachValues=null}else{this._eachValues=undefined}this._promise._captureStackTrace();this._init$(undefined,-5)}a.inherits(ReductionPromiseArray,e);ReductionPromiseArray.prototype._gotAccum=function(t){if(this._eachValues!==undefined&&this._eachValues!==null&&t!==s){this._eachValues.push(t)}};ReductionPromiseArray.prototype._eachComplete=function(t){if(this._eachValues!==null){this._eachValues.push(t)}return this._eachValues};ReductionPromiseArray.prototype._init=function(){};ReductionPromiseArray.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==undefined?this._eachValues:this._initialValue)};ReductionPromiseArray.prototype.shouldCopyValues=function(){return false};ReductionPromiseArray.prototype._resolve=function(t){this._promise._resolveCallback(t);this._values=null};ReductionPromiseArray.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();if(this._isResolved())return;this._resultCancelled$();if(this._currentCancellable instanceof t){this._currentCancellable.cancel()}if(this._initialValue instanceof t){this._initialValue.cancel()}};ReductionPromiseArray.prototype._iterate=function(e){this._values=e;var r;var n;var i=e.length;if(this._initialValue!==undefined){r=this._initialValue;n=0}else{r=t.resolve(e[0]);n=1}this._currentCancellable=r;for(var s=n;s{"use strict";var n=r(6587);var i;var s=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")};var o=n.getNativePromise();if(n.isNode&&typeof MutationObserver==="undefined"){var a=global.setImmediate;var c=process.nextTick;i=n.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if(typeof o==="function"&&typeof o.resolve==="function"){var u=o.resolve();i=function(t){u.then(t)}}else if(typeof MutationObserver!=="undefined"&&!(typeof window!=="undefined"&&window.navigator&&(window.navigator.standalone||window.cordova))&&"classList"in document.documentElement){i=function(){var t=document.createElement("div");var e={attributes:true};var r=false;var n=document.createElement("div");var i=new MutationObserver(function(){t.classList.toggle("foo");r=false});i.observe(n,e);var s=function(){if(r)return;r=true;n.classList.toggle("foo")};return function schedule(r){var n=new MutationObserver(function(){n.disconnect();r()});n.observe(t,e);s()}}()}else if(typeof setImmediate!=="undefined"){i=function(t){setImmediate(t)}}else if(typeof setTimeout!=="undefined"){i=function(t){setTimeout(t,0)}}else{i=s}t.exports=i},8741:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var i=t.PromiseInspection;var s=r(6587);function SettledPromiseArray(t){this.constructor$(t)}s.inherits(SettledPromiseArray,e);SettledPromiseArray.prototype._promiseResolved=function(t,e){this._values[t]=e;var r=++this._totalResolved;if(r>=this._length){this._resolve(this._values);return true}return false};SettledPromiseArray.prototype._promiseFulfilled=function(t,e){var r=new i;r._bitField=33554432;r._settledValueField=t;return this._promiseResolved(e,r)};SettledPromiseArray.prototype._promiseRejected=function(t,e){var r=new i;r._bitField=16777216;r._settledValueField=t;return this._promiseResolved(e,r)};t.settle=function(t){n.deprecated(".settle()",".reflect()");return new SettledPromiseArray(t).promise()};t.allSettled=function(t){return new SettledPromiseArray(t).promise()};t.prototype.settle=function(){return t.settle(this)}}},5566:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var i=r(6587);var s=r(9640).RangeError;var o=r(9640).AggregateError;var a=i.isArray;var c={};function SomePromiseArray(t){this.constructor$(t);this._howMany=0;this._unwrap=false;this._initialized=false}i.inherits(SomePromiseArray,e);SomePromiseArray.prototype._init=function(){if(!this._initialized){return}if(this._howMany===0){this._resolve([]);return}this._init$(undefined,-5);var t=a(this._values);if(!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()){this._reject(this._getRangeError(this.length()))}};SomePromiseArray.prototype.init=function(){this._initialized=true;this._init()};SomePromiseArray.prototype.setUnwrap=function(){this._unwrap=true};SomePromiseArray.prototype.howMany=function(){return this._howMany};SomePromiseArray.prototype.setHowMany=function(t){this._howMany=t};SomePromiseArray.prototype._promiseFulfilled=function(t){this._addFulfilled(t);if(this._fulfilled()===this.howMany()){this._values.length=this.howMany();if(this.howMany()===1&&this._unwrap){this._resolve(this._values[0])}else{this._resolve(this._values)}return true}return false};SomePromiseArray.prototype._promiseRejected=function(t){this._addRejected(t);return this._checkOutcome()};SomePromiseArray.prototype._promiseCancelled=function(){if(this._values instanceof t||this._values==null){return this._cancel()}this._addRejected(c);return this._checkOutcome()};SomePromiseArray.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){var t=new o;for(var e=this.length();e0){this._reject(t)}else{this._cancel()}return true}return false};SomePromiseArray.prototype._fulfilled=function(){return this._totalResolved};SomePromiseArray.prototype._rejected=function(){return this._values.length-this.length()};SomePromiseArray.prototype._addRejected=function(t){this._values.push(t)};SomePromiseArray.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t};SomePromiseArray.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()};SomePromiseArray.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new s(e)};SomePromiseArray.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))};function some(t,e){if((e|0)!==e||e<0){return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n")}var r=new SomePromiseArray(t);var i=r.promise();r.setHowMany(e);r.init();return i}t.some=function(t,e){return some(t,e)};t.prototype.some=function(t){return some(this,t)};t._SomePromiseArray=SomePromiseArray}},7659:t=>{"use strict";t.exports=function(t){function PromiseInspection(t){if(t!==undefined){t=t._target();this._bitField=t._bitField;this._settledValueField=t._isFateSealed()?t._settledValue():undefined}else{this._bitField=0;this._settledValueField=undefined}}PromiseInspection.prototype._settledValue=function(){return this._settledValueField};var e=PromiseInspection.prototype.value=function(){if(!this.isFulfilled()){throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n")}return this._settledValue()};var r=PromiseInspection.prototype.error=PromiseInspection.prototype.reason=function(){if(!this.isRejected()){throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n")}return this._settledValue()};var n=PromiseInspection.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0};var i=PromiseInspection.prototype.isRejected=function(){return(this._bitField&16777216)!==0};var s=PromiseInspection.prototype.isPending=function(){return(this._bitField&50397184)===0};var o=PromiseInspection.prototype.isResolved=function(){return(this._bitField&50331648)!==0};PromiseInspection.prototype.isCancelled=function(){return(this._bitField&8454144)!==0};t.prototype.__isCancelled=function(){return(this._bitField&65536)===65536};t.prototype._isCancelled=function(){return this._target().__isCancelled()};t.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0};t.prototype.isPending=function(){return s.call(this._target())};t.prototype.isRejected=function(){return i.call(this._target())};t.prototype.isFulfilled=function(){return n.call(this._target())};t.prototype.isResolved=function(){return o.call(this._target())};t.prototype.value=function(){return e.call(this._target())};t.prototype.reason=function(){var t=this._target();t._unsetRejectionIsUnhandled();return r.call(t)};t.prototype._value=function(){return this._settledValue()};t.prototype._reason=function(){this._unsetRejectionIsUnhandled();return this._settledValue()};t.PromiseInspection=PromiseInspection}},3938:(t,e,r)=>{"use strict";t.exports=function(t,e){var n=r(6587);var i=n.errorObj;var s=n.isObject;function tryConvertToPromise(r,n){if(s(r)){if(r instanceof t)return r;var o=getThen(r);if(o===i){if(n)n._pushContext();var a=t.reject(o.e);if(n)n._popContext();return a}else if(typeof o==="function"){if(isAnyBluebirdPromise(r)){var a=new t(e);r._then(a._fulfill,a._reject,undefined,a,null);return a}return doThenable(r,o,n)}}return r}function doGetThen(t){return t.then}function getThen(t){try{return doGetThen(t)}catch(t){i.e=t;return i}}var o={}.hasOwnProperty;function isAnyBluebirdPromise(t){try{return o.call(t,"_promise0")}catch(t){return false}}function doThenable(r,s,o){var a=new t(e);var c=a;if(o)o._pushContext();a._captureStackTrace();if(o)o._popContext();var u=true;var l=n.tryCatch(s).call(r,resolve,reject);u=false;if(a&&l===i){a._rejectCallback(l.e,true,true);a=null}function resolve(t){if(!a)return;a._resolveCallback(t);a=null}function reject(t){if(!a)return;a._rejectCallback(t,u,true);a=null}return c}return tryConvertToPromise}},8329:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var i=r(6587);var s=t.TimeoutError;function HandleWrapper(t){this.handle=t}HandleWrapper.prototype._resultCancelled=function(){clearTimeout(this.handle)};var o=function(t){return a(+this).thenReturn(t)};var a=t.delay=function(r,i){var s;var a;if(i!==undefined){s=t.resolve(i)._then(o,null,null,r,undefined);if(n.cancellation()&&i instanceof t){s._setOnCancel(i)}}else{s=new t(e);a=setTimeout(function(){s._fulfill()},+r);if(n.cancellation()){s._setOnCancel(new HandleWrapper(a))}s._captureStackTrace()}s._setAsyncGuaranteed();return s};t.prototype.delay=function(t){return a(t,this)};var c=function(t,e,r){var n;if(typeof e!=="string"){if(e instanceof Error){n=e}else{n=new s("operation timed out")}}else{n=new s(e)}i.markAsOriginatingFromRejection(n);t._attachExtraTrace(n);t._reject(n);if(r!=null){r.cancel()}};function successClear(t){clearTimeout(this.handle);return t}function failureClear(t){clearTimeout(this.handle);throw t}t.prototype.timeout=function(t,e){t=+t;var r,i;var s=new HandleWrapper(setTimeout(function timeoutTimeout(){if(r.isPending()){c(r,e,i)}},t));if(n.cancellation()){i=this.then();r=i._then(successClear,failureClear,undefined,s,undefined);r._setOnCancel(s)}else{r=this._then(successClear,failureClear,undefined,s,undefined)}return r}}},1904:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i,s,o){var a=r(6587);var c=r(9640).TypeError;var u=r(6587).inherits;var l=a.errorObj;var f=a.tryCatch;var h={};function thrower(t){setTimeout(function(){throw t},0)}function castPreservingDisposable(t){var e=n(t);if(e!==t&&typeof t._isDisposable==="function"&&typeof t._getDisposer==="function"&&t._isDisposable()){e._setDisposable(t._getDisposer())}return e}function dispose(e,r){var i=0;var o=e.length;var a=new t(s);function iterator(){if(i>=o)return a._fulfill();var s=castPreservingDisposable(e[i++]);if(s instanceof t&&s._isDisposable()){try{s=n(s._getDisposer().tryDispose(r),e.promise)}catch(t){return thrower(t)}if(s instanceof t){return s._then(iterator,thrower,null,null,null)}}iterator()}iterator();return a}function Disposer(t,e,r){this._data=t;this._promise=e;this._context=r}Disposer.prototype.data=function(){return this._data};Disposer.prototype.promise=function(){return this._promise};Disposer.prototype.resource=function(){if(this.promise().isFulfilled()){return this.promise().value()}return h};Disposer.prototype.tryDispose=function(t){var e=this.resource();var r=this._context;if(r!==undefined)r._pushContext();var n=e!==h?this.doDispose(e,t):null;if(r!==undefined)r._popContext();this._promise._unsetDisposable();this._data=null;return n};Disposer.isDisposer=function(t){return t!=null&&typeof t.resource==="function"&&typeof t.tryDispose==="function"};function FunctionDisposer(t,e,r){this.constructor$(t,e,r)}u(FunctionDisposer,Disposer);FunctionDisposer.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)};function maybeUnwrapDisposer(t){if(Disposer.isDisposer(t)){this.resources[this.index]._setDisposable(t);return t.promise()}return t}function ResourceList(t){this.length=t;this.promise=null;this[t-1]=null}ResourceList.prototype._resultCancelled=function(){var e=this.length;for(var r=0;r0};t.prototype._getDisposer=function(){return this._disposer};t.prototype._unsetDisposable=function(){this._bitField=this._bitField&~131072;this._disposer=undefined};t.prototype.disposer=function(t){if(typeof t==="function"){return new FunctionDisposer(t,this,i())}throw new c}}},6587:function(module,__unused_webpack_exports,__nccwpck_require__){"use strict";var es5=__nccwpck_require__(9048);var canEvaluate=typeof navigator=="undefined";var errorObj={e:{}};var tryCatchTarget;var globalObject=typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:this!==undefined?this:null;function tryCatcher(){try{var t=tryCatchTarget;tryCatchTarget=null;return t.apply(this,arguments)}catch(t){errorObj.e=t;return errorObj}}function tryCatch(t){tryCatchTarget=t;return tryCatcher}var inherits=function(t,e){var r={}.hasOwnProperty;function T(){this.constructor=t;this.constructor$=e;for(var n in e.prototype){if(r.call(e.prototype,n)&&n.charAt(n.length-1)!=="$"){this[n+"$"]=e.prototype[n]}}}T.prototype=e.prototype;t.prototype=new T;return t.prototype};function isPrimitive(t){return t==null||t===true||t===false||typeof t==="string"||typeof t==="number"}function isObject(t){return typeof t==="function"||typeof t==="object"&&t!==null}function maybeWrapAsError(t){if(!isPrimitive(t))return t;return new Error(safeToString(t))}function withAppended(t,e){var r=t.length;var n=new Array(r+1);var i;for(i=0;i1;var n=e.length>0&&!(e.length===1&&e[0]==="constructor");var i=thisAssignmentPattern.test(t+"")&&es5.names(t).length>0;if(r||n||i){return true}}return false}catch(t){return false}}function toFastProperties(obj){function FakeConstructor(){}FakeConstructor.prototype=obj;var receiver=new FakeConstructor;function ic(){return typeof receiver.foo}ic();ic();return obj;eval(obj)}var rident=/^[a-z$_][a-z$_0-9]*$/i;function isIdentifier(t){return rident.test(t)}function filledRange(t,e,r){var n=new Array(t);for(var i=0;i10||t[0]>0}();ret.nodeSupportsAsyncResource=ret.isNode&&function(){var t=false;try{var e=__nccwpck_require__(7303).AsyncResource;t=typeof e.prototype.runInAsyncScope==="function"}catch(e){t=false}return t}();if(ret.isNode)ret.toFastProperties(process);try{throw new Error}catch(t){ret.lastLineError=t}module.exports=ret},5533:(t,e,r)=>{var n=r(5179);var i=r(587);t.exports=expandTop;var s="\0SLASH"+Math.random()+"\0";var o="\0OPEN"+Math.random()+"\0";var a="\0CLOSE"+Math.random()+"\0";var c="\0COMMA"+Math.random()+"\0";var u="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(s).split("\\{").join(o).split("\\}").join(a).split("\\,").join(c).split("\\.").join(u)}function unescapeBraces(t){return t.split(s).join("\\").split(o).join("{").split(a).join("}").split(c).join(",").split(u).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var r=i("{","}",t);if(!r)return t.split(",");var n=r.pre;var s=r.body;var o=r.post;var a=n.split(",");a[a.length-1]+="{"+s+"}";var c=parseCommaParts(o);if(o.length){a[a.length-1]+=c.shift();a.push.apply(a,c)}e.push.apply(e,a);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function identity(t){return t}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var r=[];var s=i("{","}",t);if(!s||/\$$/.test(s.pre))return[t];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body);var c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body);var u=o||c;var l=s.body.indexOf(",")>=0;if(!u&&!l){if(s.post.match(/,.*\}/)){t=s.pre+"{"+s.body+a+s.post;return expand(t)}return[t]}var f;if(u){f=s.body.split(/\.\./)}else{f=parseCommaParts(s.body);if(f.length===1){f=expand(f[0],false).map(embrace);if(f.length===1){var h=s.post.length?expand(s.post,false):[""];return h.map(function(t){return s.pre+f[0]+t})}}}var p=s.pre;var h=s.post.length?expand(s.post,false):[""];var d;if(u){var y=numeric(f[0]);var v=numeric(f[1]);var m=Math.max(f[0].length,f[1].length);var g=f.length==3?Math.abs(numeric(f[2])):1;var _=lte;var w=v0){var x=new Array(k+1).join("0");if(S<0)E="-"+x+E.slice(1);else E=x+E}}}d.push(E)}}else{d=n(f,function(t){return expand(t,false)})}for(var C=0;C{"use strict";const n=r(2087);const i=/\s+at.*(?:\(|\s)(.*)\)?/;const s=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;const o=typeof n.homedir==="undefined"?"":n.homedir();t.exports=((t,e)=>{e=Object.assign({pretty:false},e);return t.replace(/\\/g,"/").split("\n").filter(t=>{const e=t.match(i);if(e===null||!e[1]){return true}const r=e[1];if(r.includes(".app/Contents/Resources/electron.asar")||r.includes(".app/Contents/Resources/default_app.asar")){return false}return!s.test(r)}).filter(t=>t.trim()!=="").map(t=>{if(e.pretty){return t.replace(i,(t,e)=>t.replace(e,e.replace(o,"~")))}return t}).join("\n")})},5179:t=>{t.exports=function(t,r){var n=[];for(var i=0;i{t.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var n=r(5747);var i=n.realpath;var s=n.realpathSync;var o=process.version;var a=/^v[0-5]\./.test(o);var c=r(2145);function newError(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function realpath(t,e,r){if(a){return i(t,e,r)}if(typeof e==="function"){r=e;e=null}i(t,e,function(n,i){if(newError(n)){c.realpath(t,e,r)}else{r(n,i)}})}function realpathSync(t,e){if(a){return s(t,e)}try{return s(t,e)}catch(r){if(newError(r)){return c.realpathSync(t,e)}else{throw r}}}function monkeypatch(){n.realpath=realpath;n.realpathSync=realpathSync}function unmonkeypatch(){n.realpath=i;n.realpathSync=s}},2145:(t,e,r)=>{var n=r(5622);var i=process.platform==="win32";var s=r(5747);var o=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var t;if(o){var e=new Error;t=debugCallback}else t=missingCallback;return t;function debugCallback(t){if(t){e.message=t.message;t=e;missingCallback(t)}}function missingCallback(t){if(t){if(process.throwDeprecation)throw t;else if(!process.noDeprecation){var e="fs: missing callback "+(t.stack||t.message);if(process.traceDeprecation)console.trace(e);else console.error(e)}}}}function maybeCallback(t){return typeof t==="function"?t:rethrow()}var a=n.normalize;if(i){var c=/(.*?)(?:[\/\\]+|$)/g}else{var c=/(.*?)(?:[\/]+|$)/g}if(i){var u=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var u=/^[\/]*/}e.realpathSync=function realpathSync(t,e){t=n.resolve(t);if(e&&Object.prototype.hasOwnProperty.call(e,t)){return e[t]}var r=t,o={},a={};var l;var f;var h;var p;start();function start(){var e=u.exec(t);l=e[0].length;f=e[0];h=e[0];p="";if(i&&!a[h]){s.lstatSync(h);a[h]=true}}while(l=t.length){if(e)e[o]=t;return r(null,t)}c.lastIndex=f;var n=c.exec(t);d=h;h+=n[0];p=d+n[1];f=c.lastIndex;if(l[p]||e&&e[p]===p){return process.nextTick(LOOP)}if(e&&Object.prototype.hasOwnProperty.call(e,p)){return gotResolvedLink(e[p])}return s.lstat(p,gotStat)}function gotStat(t,n){if(t)return r(t);if(!n.isSymbolicLink()){l[p]=true;if(e)e[p]=p;return process.nextTick(LOOP)}if(!i){var o=n.dev.toString(32)+":"+n.ino.toString(32);if(a.hasOwnProperty(o)){return gotTarget(null,a[o],p)}}s.stat(p,function(t){if(t)return r(t);s.readlink(p,function(t,e){if(!i)a[o]=e;gotTarget(t,e)})})}function gotTarget(t,i,s){if(t)return r(t);var o=n.resolve(d,i);if(e)e[s]=o;gotResolvedLink(o)}function gotResolvedLink(e){t=n.resolve(e,t.slice(f));start()}}},357:(t,e,r)=>{e.alphasort=alphasort;e.alphasorti=alphasorti;e.setopts=setopts;e.ownProp=ownProp;e.makeAbs=makeAbs;e.finish=finish;e.mark=mark;e.isIgnored=isIgnored;e.childrenIgnored=childrenIgnored;function ownProp(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var n=r(5622);var i=r(6944);var s=r(6540);var o=i.Minimatch;function alphasorti(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}function alphasort(t,e){return t.localeCompare(e)}function setupIgnores(t,e){t.ignore=e.ignore||[];if(!Array.isArray(t.ignore))t.ignore=[t.ignore];if(t.ignore.length){t.ignore=t.ignore.map(ignoreMap)}}function ignoreMap(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new o(r,{dot:true})}return{matcher:new o(t,{dot:true}),gmatcher:e}}function setopts(t,e,r){if(!r)r={};if(r.matchBase&&-1===e.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}e="**/"+e}t.silent=!!r.silent;t.pattern=e;t.strict=r.strict!==false;t.realpath=!!r.realpath;t.realpathCache=r.realpathCache||Object.create(null);t.follow=!!r.follow;t.dot=!!r.dot;t.mark=!!r.mark;t.nodir=!!r.nodir;if(t.nodir)t.mark=true;t.sync=!!r.sync;t.nounique=!!r.nounique;t.nonull=!!r.nonull;t.nosort=!!r.nosort;t.nocase=!!r.nocase;t.stat=!!r.stat;t.noprocess=!!r.noprocess;t.absolute=!!r.absolute;t.maxLength=r.maxLength||Infinity;t.cache=r.cache||Object.create(null);t.statCache=r.statCache||Object.create(null);t.symlinks=r.symlinks||Object.create(null);setupIgnores(t,r);t.changedCwd=false;var i=process.cwd();if(!ownProp(r,"cwd"))t.cwd=i;else{t.cwd=n.resolve(r.cwd);t.changedCwd=t.cwd!==i}t.root=r.root||n.resolve(t.cwd,"/");t.root=n.resolve(t.root);if(process.platform==="win32")t.root=t.root.replace(/\\/g,"/");t.cwdAbs=s(t.cwd)?t.cwd:makeAbs(t,t.cwd);if(process.platform==="win32")t.cwdAbs=t.cwdAbs.replace(/\\/g,"/");t.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;t.minimatch=new o(e,r);t.options=t.minimatch.options}function finish(t){var e=t.nounique;var r=e?[]:Object.create(null);for(var n=0,i=t.matches.length;n{t.exports=glob;var n=r(5747);var i=r(4082);var s=r(6944);var o=s.Minimatch;var a=r(2989);var c=r(8614).EventEmitter;var u=r(5622);var l=r(2357);var f=r(6540);var h=r(8427);var p=r(357);var d=p.alphasort;var y=p.alphasorti;var v=p.setopts;var m=p.ownProp;var g=r(4889);var _=r(1669);var w=p.childrenIgnored;var b=p.isIgnored;var S=r(6754);function glob(t,e,r){if(typeof e==="function")r=e,e={};if(!e)e={};if(e.sync){if(r)throw new TypeError("callback provided to sync glob");return h(t,e)}return new Glob(t,e,r)}glob.sync=h;var E=glob.GlobSync=h.GlobSync;glob.glob=glob;function extend(t,e){if(e===null||typeof e!=="object"){return t}var r=Object.keys(e);var n=r.length;while(n--){t[r[n]]=e[r[n]]}return t}glob.hasMagic=function(t,e){var r=extend({},e);r.noprocess=true;var n=new Glob(t,r);var i=n.minimatch.set;if(!t)return false;if(i.length>1)return true;for(var s=0;sthis.maxLength)return e();if(!this.stat&&m(this.cache,r)){var s=this.cache[r];if(Array.isArray(s))s="DIR";if(!i||s==="DIR")return e(null,s);if(i&&s==="FILE")return e()}var o;var a=this.statCache[r];if(a!==undefined){if(a===false)return e(null,a);else{var c=a.isDirectory()?"DIR":"FILE";if(i&&c==="FILE")return e();else return e(null,c,a)}}var u=this;var l=g("stat\0"+r,lstatcb_);if(l)n.lstat(r,l);function lstatcb_(i,s){if(s&&s.isSymbolicLink()){return n.stat(r,function(n,i){if(n)u._stat2(t,r,null,s,e);else u._stat2(t,r,n,i,e)})}else{u._stat2(t,r,i,s,e)}}};Glob.prototype._stat2=function(t,e,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[e]=false;return i()}var s=t.slice(-1)==="/";this.statCache[e]=n;if(e.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var o=true;if(n)o=n.isDirectory()?"DIR":"FILE";this.cache[e]=this.cache[e]||o;if(s&&o==="FILE")return i();return i(null,o,n)}},8427:(t,e,r)=>{t.exports=globSync;globSync.GlobSync=GlobSync;var n=r(5747);var i=r(4082);var s=r(6944);var o=s.Minimatch;var a=r(7966).Glob;var c=r(1669);var u=r(5622);var l=r(2357);var f=r(6540);var h=r(357);var p=h.alphasort;var d=h.alphasorti;var y=h.setopts;var v=h.ownProp;var m=h.childrenIgnored;var g=h.isIgnored;function globSync(t,e){if(typeof e==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(t,e).found}function GlobSync(t,e){if(!t)throw new Error("must provide pattern");if(typeof e==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(t,e);y(this,t,e);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;nthis.maxLength)return false;if(!this.stat&&v(this.cache,e)){var i=this.cache[e];if(Array.isArray(i))i="DIR";if(!r||i==="DIR")return i;if(r&&i==="FILE")return false}var s;var o=this.statCache[e];if(!o){var a;try{a=n.lstatSync(e)}catch(t){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR")){this.statCache[e]=false;return false}}if(a&&a.isSymbolicLink()){try{o=n.statSync(e)}catch(t){o=a}}else{o=a}}this.statCache[e]=o;var i=true;if(o)i=o.isDirectory()?"DIR":"FILE";this.cache[e]=this.cache[e]||i;if(r&&i==="FILE")return false;return i};GlobSync.prototype._mark=function(t){return h.mark(this,t)};GlobSync.prototype._makeAbs=function(t){return h.makeAbs(this,t)}},8681:t=>{(function(){var e;function MurmurHash3(t,r){var n=this instanceof MurmurHash3?this:e;n.reset(r);if(typeof t==="string"&&t.length>0){n.hash(t)}if(n!==this){return n}}MurmurHash3.prototype.hash=function(t){var e,r,n,i,s;s=t.length;this.len+=s;r=this.k1;n=0;switch(this.rem){case 0:r^=s>n?t.charCodeAt(n++)&65535:0;case 1:r^=s>n?(t.charCodeAt(n++)&65535)<<8:0;case 2:r^=s>n?(t.charCodeAt(n++)&65535)<<16:0;case 3:r^=s>n?(t.charCodeAt(n)&255)<<24:0;r^=s>n?(t.charCodeAt(n++)&65280)>>8:0}this.rem=s+this.rem&3;s-=this.rem;if(s>0){e=this.h1;while(1){r=r*11601+(r&65535)*3432906752&4294967295;r=r<<15|r>>>17;r=r*13715+(r&65535)*461832192&4294967295;e^=r;e=e<<13|e>>>19;e=e*5+3864292196&4294967295;if(n>=s){break}r=t.charCodeAt(n++)&65535^(t.charCodeAt(n++)&65535)<<8^(t.charCodeAt(n++)&65535)<<16;i=t.charCodeAt(n++);r^=(i&255)<<24^(i&65280)>>8}r=0;switch(this.rem){case 3:r^=(t.charCodeAt(n+2)&65535)<<16;case 2:r^=(t.charCodeAt(n+1)&65535)<<8;case 1:r^=t.charCodeAt(n)&65535}this.h1=e}this.k1=r;return this};MurmurHash3.prototype.result=function(){var t,e;t=this.k1;e=this.h1;if(t>0){t=t*11601+(t&65535)*3432906752&4294967295;t=t<<15|t>>>17;t=t*13715+(t&65535)*461832192&4294967295;e^=t}e^=this.len;e^=e>>>16;e=e*51819+(e&65535)*2246770688&4294967295;e^=e>>>13;e=e*44597+(e&65535)*3266445312&4294967295;e^=e>>>16;return e>>>0};MurmurHash3.prototype.reset=function(t){this.h1=typeof t==="number"?t:0;this.rem=this.k1=this.len=0;return this};e=new MurmurHash3;if(true){t.exports=MurmurHash3}else{}})()},9609:(t,e,r)=>{const n=new Map;const i=r(5747);const{dirname:s,resolve:o}=r(5622);const a=t=>new Promise((e,r)=>i.lstat(t,(t,n)=>t?r(t):e(n)));const c=t=>{t=o(t);if(n.has(t))return Promise.resolve(n.get(t));const e=e=>{const{uid:r,gid:i}=e;n.set(t,{uid:r,gid:i});return{uid:r,gid:i}};const r=s(t);const i=r===t?null:e=>{return c(r).then(e=>{n.set(t,e);return e})};return a(t).then(e,i)};const u=t=>{t=o(t);if(n.has(t))return n.get(t);const e=s(t);let r=true;try{const s=i.lstatSync(t);r=false;const{uid:o,gid:a}=s;n.set(t,{uid:o,gid:a});return{uid:o,gid:a}}finally{if(r&&e!==t){const r=u(e);n.set(t,r);return r}}};const l=new Map;t.exports=(t=>{t=o(t);if(l.has(t))return Promise.resolve(l.get(t));const e=c(t).then(e=>{l.delete(t);return e});l.set(t,e);return e});t.exports.sync=u;t.exports.clearCache=(()=>{n.clear();l.clear()})},4889:(t,e,r)=>{var n=r(3640);var i=Object.create(null);var s=r(6754);t.exports=n(inflight);function inflight(t,e){if(i[t]){i[t].push(e);return null}else{i[t]=[e];return makeres(t)}}function makeres(t){return s(function RES(){var e=i[t];var r=e.length;var n=slice(arguments);try{for(var s=0;sr){e.splice(0,r);process.nextTick(function(){RES.apply(null,n)})}else{delete i[t]}}})}function slice(t){var e=t.length;var r=[];for(var n=0;n{try{var n=r(1669);if(typeof n.inherits!=="function")throw"";t.exports=n.inherits}catch(e){t.exports=r(7350)}},7350:t=>{if(typeof Object.create==="function"){t.exports=function inherits(t,e){if(e){t.super_=e;t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}})}}}else{t.exports=function inherits(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype;t.prototype=new r;t.prototype.constructor=t}}}},6944:(t,e,r)=>{t.exports=minimatch;minimatch.Minimatch=Minimatch;var n={sep:"/"};try{n=r(5622)}catch(t){}var i=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var s=r(5533);var o={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var a="[^/]";var c=a+"*?";var u="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var l="(?:(?!(?:\\/|^)\\.).)*?";var f=charSet("().*{}+?[]^$\\!");function charSet(t){return t.split("").reduce(function(t,e){t[e]=true;return t},{})}var h=/\/+/;minimatch.filter=filter;function filter(t,e){e=e||{};return function(r,n,i){return minimatch(r,t,e)}}function ext(t,e){t=t||{};e=e||{};var r={};Object.keys(e).forEach(function(t){r[t]=e[t]});Object.keys(t).forEach(function(e){r[e]=t[e]});return r}minimatch.defaults=function(t){if(!t||!Object.keys(t).length)return minimatch;var e=minimatch;var r=function minimatch(r,n,i){return e.minimatch(r,n,ext(t,i))};r.Minimatch=function Minimatch(r,n){return new e.Minimatch(r,ext(t,n))};return r};Minimatch.defaults=function(t){if(!t||!Object.keys(t).length)return Minimatch;return minimatch.defaults(t).Minimatch};function minimatch(t,e,r){if(typeof e!=="string"){throw new TypeError("glob pattern string required")}if(!r)r={};if(!r.nocomment&&e.charAt(0)==="#"){return false}if(e.trim()==="")return t==="";return new Minimatch(e,r).match(t)}function Minimatch(t,e){if(!(this instanceof Minimatch)){return new Minimatch(t,e)}if(typeof t!=="string"){throw new TypeError("glob pattern string required")}if(!e)e={};t=t.trim();if(n.sep!=="/"){t=t.split(n.sep).join("/")}this.options=e;this.set=[];this.pattern=t;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var t=this.pattern;var e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(e.debug)this.debug=console.error;this.debug(this.pattern,r);r=this.globParts=r.map(function(t){return t.split(h)});this.debug(this.pattern,r);r=r.map(function(t,e,r){return t.map(this.parse,this)},this);this.debug(this.pattern,r);r=r.filter(function(t){return t.indexOf(false)===-1});this.debug(this.pattern,r);this.set=r}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var t=this.pattern;var e=false;var r=this.options;var n=0;if(r.nonegate)return;for(var i=0,s=t.length;i1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&t==="**")return i;if(t==="")return"";var n="";var s=!!r.nocase;var u=false;var l=[];var h=[];var d;var y=false;var v=-1;var m=-1;var g=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var _=this;function clearStateChar(){if(d){switch(d){case"*":n+=c;s=true;break;case"?":n+=a;s=true;break;default:n+="\\"+d;break}_.debug("clearStateChar %j %j",d,n);d=false}}for(var w=0,b=t.length,S;w-1;P--){var j=h[P];var O=n.slice(0,j.reStart);var F=n.slice(j.reStart,j.reEnd-8);var R=n.slice(j.reEnd-8,j.reEnd);var N=n.slice(j.reEnd);R+=N;var D=O.split("(").length-1;var I=N;for(w=0;w=0;o--){s=t[o];if(s)break}for(o=0;o>> no match, partial?",t,f,e,h);if(f===a)return true}return false}var d;if(typeof u==="string"){if(n.nocase){d=l.toLowerCase()===u.toLowerCase()}else{d=l===u}this.debug("string match",u,l,d)}else{d=l.match(u);this.debug("pattern match",u,l,d)}if(!d)return false}if(s===a&&o===c){return true}else if(s===a){return r}else if(o===c){var y=s===a-1&&t[s]==="";return y}throw new Error("wtf?")};function globUnescape(t){return t.replace(/\\(.)/g,"$1")}function regExpEscape(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},5283:(t,e,r)=>{const n=r(8351);const i=Symbol("_data");const s=Symbol("_length");class Collect extends n{constructor(t){super(t);this[i]=[];this[s]=0}write(t,e,r){if(typeof e==="function")r=e,e="utf8";if(!e)e="utf8";const n=Buffer.isBuffer(t)?t:Buffer.from(t,e);this[i].push(n);this[s]+=n.length;if(r)r();return true}end(t,e,r){if(typeof t==="function")r=t,t=null;if(typeof e==="function")r=e,e="utf8";if(t)this.write(t,e);const n=Buffer.concat(this[i],this[s]);super.write(n);return super.end(r)}}t.exports=Collect;class CollectPassThrough extends n{constructor(t){super(t);this[i]=[];this[s]=0}write(t,e,r){if(typeof e==="function")r=e,e="utf8";if(!e)e="utf8";const n=Buffer.isBuffer(t)?t:Buffer.from(t,e);this[i].push(n);this[s]+=n.length;return super.write(t,e,r)}end(t,e,r){if(typeof t==="function")r=t,t=null;if(typeof e==="function")r=e,e="utf8";if(t)this.write(t,e);const n=Buffer.concat(this[i],this[s]);this.emit("collect",n);return super.end(r)}}t.exports.PassThrough=CollectPassThrough},4145:(t,e,r)=>{const n=r(8351);const i=Symbol("_flush");const s=Symbol("_flushed");const o=Symbol("_flushing");class Flush extends n{constructor(t={}){if(typeof t==="function")t={flush:t};super(t);if(typeof t.flush!=="function"&&typeof this.flush!=="function")throw new TypeError("must provide flush function in options");this[i]=t.flush||this.flush}emit(t,...e){if(t!=="end"&&t!=="finish"||this[s])return super.emit(t,...e);if(this[o])return;this[o]=true;const r=t=>{this[s]=true;t?super.emit("error",t):super.emit("end")};const n=this[i](r);if(n&&n.then)n.then(()=>r(),t=>r(t))}}t.exports=Flush},6436:(t,e,r)=>{const n=r(8351);const i=r(8614);const s=t=>t&&t instanceof i&&(typeof t.pipe==="function"||typeof t.write==="function"&&typeof t.end==="function");const o=Symbol("_head");const a=Symbol("_tail");const c=Symbol("_linkStreams");const u=Symbol("_setHead");const l=Symbol("_setTail");const f=Symbol("_onError");const h=Symbol("_onData");const p=Symbol("_onEnd");const d=Symbol("_onDrain");const y=Symbol("_streams");class Pipeline extends n{constructor(t,...e){if(s(t)){e.unshift(t);t={}}super(t);this[y]=[];if(e.length)this.push(...e)}[c](t){return t.reduce((t,e)=>{t.on("error",t=>e.emit("error",t));t.pipe(e);return e})}push(...t){this[y].push(...t);if(this[a])t.unshift(this[a]);const e=this[c](t);this[l](e);if(!this[o])this[u](t[0])}unshift(...t){this[y].unshift(...t);if(this[o])t.push(this[o]);const e=this[c](t);this[u](t[0]);if(!this[a])this[l](e)}destroy(t){this[y].forEach(t=>typeof t.destroy==="function"&&t.destroy());return super.destroy(t)}[l](t){this[a]=t;t.on("error",e=>this[f](t,e));t.on("data",e=>this[h](t,e));t.on("end",()=>this[p](t));t.on("finish",()=>this[p](t))}[f](t,e){if(t===this[a])this.emit("error",e)}[h](t,e){if(t===this[a])super.write(e)}[p](t){if(t===this[a])super.end()}pause(){super.pause();return this[a]&&this[a].pause&&this[a].pause()}emit(t,...e){if(t==="resume"&&this[a]&&this[a].resume)this[a].resume();return super.emit(t,...e)}[u](t){this[o]=t;t.on("drain",()=>this[d](t))}[d](t){if(t===this[o])this.emit("drain")}write(t,e,r){return this[o].write(t,e,r)}end(t,e,r){this[o].end(t,e,r);return this}}t.exports=Pipeline},8351:(t,e,r)=>{"use strict";const n=r(8614);const i=r(2413);const s=r(546);const o=r(4304).StringDecoder;const a=Symbol("EOF");const c=Symbol("maybeEmitEnd");const u=Symbol("emittedEnd");const l=Symbol("emittingEnd");const f=Symbol("closed");const h=Symbol("read");const p=Symbol("flush");const d=Symbol("flushChunk");const y=Symbol("encoding");const v=Symbol("decoder");const m=Symbol("flowing");const g=Symbol("paused");const _=Symbol("resume");const w=Symbol("bufferLength");const b=Symbol("bufferPush");const S=Symbol("bufferShift");const E=Symbol("objectMode");const k=Symbol("destroyed");const x=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const C=x&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const A=x&&Symbol.iterator||Symbol("iterator not implemented");const T=t=>t==="end"||t==="finish"||t==="prefinish";const P=t=>t instanceof ArrayBuffer||typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const j=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);t.exports=class Minipass extends i{constructor(t){super();this[m]=false;this[g]=false;this.pipes=new s;this.buffer=new s;this[E]=t&&t.objectMode||false;if(this[E])this[y]=null;else this[y]=t&&t.encoding||null;if(this[y]==="buffer")this[y]=null;this[v]=this[y]?new o(this[y]):null;this[a]=false;this[u]=false;this[l]=false;this[f]=false;this.writable=true;this.readable=true;this[w]=0;this[k]=false}get bufferLength(){return this[w]}get encoding(){return this[y]}set encoding(t){if(this[E])throw new Error("cannot set encoding in objectMode");if(this[y]&&t!==this[y]&&(this[v]&&this[v].lastNeed||this[w]))throw new Error("cannot change encoding");if(this[y]!==t){this[v]=t?new o(t):null;if(this.buffer.length)this.buffer=this.buffer.map(t=>this[v].write(t))}this[y]=t}setEncoding(t){this.encoding=t}get objectMode(){return this[E]}set objectMode(t){this[E]=this[E]||!!t}write(t,e,r){if(this[a])throw new Error("write after end");if(this[k]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof e==="function")r=e,e="utf8";if(!e)e="utf8";if(!this[E]&&!Buffer.isBuffer(t)){if(j(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(P(t))t=Buffer.from(t);else if(typeof t!=="string")this.objectMode=true}if(!this.objectMode&&!t.length){const t=this.flowing;if(this[w]!==0)this.emit("readable");if(r)r();return t}if(typeof t==="string"&&!this[E]&&!(e===this[y]&&!this[v].lastNeed)){t=Buffer.from(t,e)}if(Buffer.isBuffer(t)&&this[y])t=this[v].write(t);try{return this.flowing?(this.emit("data",t),this.flowing):(this[b](t),false)}finally{if(this[w]!==0)this.emit("readable");if(r)r()}}read(t){if(this[k])return null;try{if(this[w]===0||t===0||t>this[w])return null;if(this[E])t=null;if(this.buffer.length>1&&!this[E]){if(this.encoding)this.buffer=new s([Array.from(this.buffer).join("")]);else this.buffer=new s([Buffer.concat(Array.from(this.buffer),this[w])])}return this[h](t||null,this.buffer.head.value)}finally{this[c]()}}[h](t,e){if(t===e.length||t===null)this[S]();else{this.buffer.head.value=e.slice(t);e=e.slice(0,t);this[w]-=t}this.emit("data",e);if(!this.buffer.length&&!this[a])this.emit("drain");return e}end(t,e,r){if(typeof t==="function")r=t,t=null;if(typeof e==="function")r=e,e="utf8";if(t)this.write(t,e);if(r)this.once("end",r);this[a]=true;this.writable=false;if(this.flowing||!this[g])this[c]();return this}[_](){if(this[k])return;this[g]=false;this[m]=true;this.emit("resume");if(this.buffer.length)this[p]();else if(this[a])this[c]();else this.emit("drain")}resume(){return this[_]()}pause(){this[m]=false;this[g]=true}get destroyed(){return this[k]}get flowing(){return this[m]}get paused(){return this[g]}[b](t){if(this[E])this[w]+=1;else this[w]+=t.length;return this.buffer.push(t)}[S](){if(this.buffer.length){if(this[E])this[w]-=1;else this[w]-=this.buffer.head.value.length}return this.buffer.shift()}[p](){do{}while(this[d](this[S]()));if(!this.buffer.length&&!this[a])this.emit("drain")}[d](t){return t?(this.emit("data",t),this.flowing):false}pipe(t,e){if(this[k])return;const r=this[u];e=e||{};if(t===process.stdout||t===process.stderr)e.end=false;else e.end=e.end!==false;const n={dest:t,opts:e,ondrain:t=>this[_]()};this.pipes.push(n);t.on("drain",n.ondrain);this[_]();if(r&&n.opts.end)n.dest.end();return t}addListener(t,e){return this.on(t,e)}on(t,e){try{return super.on(t,e)}finally{if(t==="data"&&!this.pipes.length&&!this.flowing)this[_]();else if(T(t)&&this[u]){super.emit(t);this.removeAllListeners(t)}}}get emittedEnd(){return this[u]}[c](){if(!this[l]&&!this[u]&&!this[k]&&this.buffer.length===0&&this[a]){this[l]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[f])this.emit("close");this[l]=false}}emit(t,e){if(t!=="error"&&t!=="close"&&t!==k&&this[k])return;else if(t==="data"){if(!e)return;if(this.pipes.length)this.pipes.forEach(t=>t.dest.write(e)===false&&this.pause())}else if(t==="end"){if(this[u]===true)return;this[u]=true;this.readable=false;if(this[v]){e=this[v].end();if(e){this.pipes.forEach(t=>t.dest.write(e));super.emit("data",e)}}this.pipes.forEach(t=>{t.dest.removeListener("drain",t.ondrain);if(t.opts.end)t.dest.end()})}else if(t==="close"){this[f]=true;if(!this[u]&&!this[k])return}const r=new Array(arguments.length);r[0]=t;r[1]=e;if(arguments.length>2){for(let t=2;t{t.push(e);if(!this[E])t.dataLength+=e.length});return e.then(()=>t)}concat(){return this[E]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(t=>this[E]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?t.join(""):Buffer.concat(t,t.dataLength))}promise(){return new Promise((t,e)=>{this.on(k,()=>e(new Error("stream destroyed")));this.on("end",()=>t());this.on("error",t=>e(t))})}[C](){const t=()=>{const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[a])return Promise.resolve({done:true});let e=null;let r=null;const n=t=>{this.removeListener("data",i);this.removeListener("end",s);r(t)};const i=t=>{this.removeListener("error",n);this.removeListener("end",s);this.pause();e({value:t,done:!!this[a]})};const s=()=>{this.removeListener("error",n);this.removeListener("data",i);e({done:true})};const o=()=>n(new Error("stream destroyed"));return new Promise((t,a)=>{r=a;e=t;this.once(k,o);this.once("error",n);this.once("end",s);this.once("data",i)})};return{next:t}}[A](){const t=()=>{const t=this.read();const e=t===null;return{value:t,done:e}};return{next:t}}destroy(t){if(this[k]){if(t)this.emit("error",t);else this.emit(k);return this}this[k]=true;this.buffer=new s;this[w]=0;if(typeof this.close==="function"&&!this[f])this.close();if(t)this.emit("error",t);else this.emit(k);return this}static isStream(t){return!!t&&(t instanceof Minipass||t instanceof i||t instanceof n&&(typeof t.pipe==="function"||typeof t.write==="function"&&typeof t.end==="function"))}}},2253:t=>{"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},546:(t,e,r)=>{"use strict";t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var e=this;if(!(e instanceof Yallist)){e=new Yallist}e.tail=null;e.head=null;e.length=0;if(t&&typeof t.forEach==="function"){t.forEach(function(t){e.push(t)})}else if(arguments.length>0){for(var r=0,n=arguments.length;r1){r=e}else if(this.head){n=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;n!==null;i++){r=t(r,n.value,i);n=n.next}return r};Yallist.prototype.reduceReverse=function(t,e){var r;var n=this.tail;if(arguments.length>1){r=e}else if(this.tail){n=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;n!==null;i--){r=t(r,n.value,i);n=n.prev}return r};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var e=0,r=this.head;r!==null;e++){t[e]=r.value;r=r.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var e=0,r=this.tail;r!==null;e++){t[e]=r.value;r=r.prev}return t};Yallist.prototype.slice=function(t,e){e=e||this.length;if(e<0){e+=this.length}t=t||0;if(t<0){t+=this.length}var r=new Yallist;if(ethis.length){e=this.length}for(var n=0,i=this.head;i!==null&&nthis.length){e=this.length}for(var n=this.length,i=this.tail;i!==null&&n>e;n--){i=i.prev}for(;i!==null&&n>t;n--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(t,e,...r){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var n=0,i=this.head;i!==null&&n{var n=r(3640);t.exports=n(once);t.exports.strict=n(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(t){var e=function(){if(e.called)return e.value;e.called=true;return e.value=t.apply(this,arguments)};e.called=false;return e}function onceStrict(t){var e=function(){if(e.called)throw new Error(e.onceError);e.called=true;return e.value=t.apply(this,arguments)};var r=t.name||"Function wrapped with `once`";e.onceError=r+" shouldn't be called more than once";e.called=false;return e}},6540:t=>{"use strict";function posix(t){return t.charAt(0)==="/"}function win32(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=e.exec(t);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}t.exports=process.platform==="win32"?win32:posix;t.exports.posix=posix;t.exports.win32=win32},9346:(t,e,r)=>{"use strict";t.exports=inflight;let n;try{n=r(5229)}catch(t){n=Promise}const i={};inflight.active=i;function inflight(t,e){return n.all([t,e]).then(function(t){const e=t[0];const r=t[1];if(Array.isArray(e)){return n.all(e).then(function(t){return _inflight(t.join(""),r)})}else{return _inflight(e,r)}});function _inflight(t,e){if(!i[t]){i[t]=new n(function(t){return t(e())});i[t].then(cleanup,cleanup);function cleanup(){delete i[t]}}return i[t]}}},9536:(t,e,r)=>{"use strict";var n=r(5622);var i=r(5275);t.exports=function(t,e,r){return n.join(t,(e?e+"-":"")+i(r))}},5275:(t,e,r)=>{"use strict";var n=r(8681);t.exports=function(t){if(t){var e=new n(t);return("00000000"+e.result().toString(16)).substr(-8)}else{return(Math.random().toString(16)+"0000000").substr(2,8)}}},3640:t=>{t.exports=wrappy;function wrappy(t,e){if(t&&e)return wrappy(t)(e);if(typeof t!=="function")throw new TypeError("need wrapper function");Object.keys(t).forEach(function(e){wrapper[e]=t[e]});return wrapper;function wrapper(){var e=new Array(arguments.length);for(var r=0;r{"use strict";const n=r(1669);const i=r(5747);const s=r(595);const o=r(5575);const a=r(9409);const c=r(8351);const u=r(5283);const l=r(6436);const f=n.promisify(i.writeFile);t.exports=function get(t,e,r){return getData(false,t,e,r)};t.exports.byDigest=function getByDigest(t,e,r){return getData(true,t,e,r)};function getData(t,e,r,n={}){const{integrity:i,memoize:c,size:u}=n;const l=t?o.get.byDigest(e,r,n):o.get(e,r,n);if(l&&c!==false){return Promise.resolve(t?l:{metadata:l.entry.metadata,data:l.data,integrity:l.entry.integrity,size:l.entry.size})}return(t?Promise.resolve(null):s.find(e,r,n)).then(l=>{if(!l&&!t){throw new s.NotFoundError(e,r)}return a(e,t?r:l.integrity,{integrity:i,size:u}).then(e=>t?e:{data:e,metadata:l.metadata,size:l.size,integrity:l.integrity}).then(i=>{if(c&&t){o.put.byDigest(e,r,i,n)}else if(c){o.put(e,l,i.data,n)}return i})})}t.exports.sync=function get(t,e,r){return getDataSync(false,t,e,r)};t.exports.sync.byDigest=function getByDigest(t,e,r){return getDataSync(true,t,e,r)};function getDataSync(t,e,r,n={}){const{integrity:i,memoize:c,size:u}=n;const l=t?o.get.byDigest(e,r,n):o.get(e,r,n);if(l&&c!==false){return t?l:{metadata:l.entry.metadata,data:l.data,integrity:l.entry.integrity,size:l.entry.size}}const f=!t&&s.find.sync(e,r,n);if(!f&&!t){throw new s.NotFoundError(e,r)}const h=a.sync(e,t?r:f.integrity,{integrity:i,size:u});const p=t?h:{metadata:f.metadata,data:h,size:f.size,integrity:f.integrity};if(c&&t){o.put.byDigest(e,r,p,n)}else if(c){o.put(e,f,p.data,n)}return p}t.exports.stream=getStream;const h=t=>{const e=new c;e.on("newListener",function(e,r){e==="metadata"&&r(t.entry.metadata);e==="integrity"&&r(t.entry.integrity);e==="size"&&r(t.entry.size)});e.end(t.data);return e};function getStream(t,e,r={}){const{memoize:n,size:i}=r;const c=o.get(t,e,r);if(c&&n!==false){return h(c)}const f=new l;s.find(t,e).then(c=>{if(!c){throw new s.NotFoundError(t,e)}f.emit("metadata",c.metadata);f.emit("integrity",c.integrity);f.emit("size",c.size);f.on("newListener",function(t,e){t==="metadata"&&e(c.metadata);t==="integrity"&&e(c.integrity);t==="size"&&e(c.size)});const l=a.readStream(t,c.integrity,{...r,size:typeof i!=="number"?c.size:i});if(n){const e=new u.PassThrough;e.on("collect",e=>o.put(t,c,e,r));f.unshift(e)}f.unshift(l)}).catch(t=>f.emit("error",t));return f}t.exports.stream.byDigest=getStreamDigest;function getStreamDigest(t,e,r={}){const{memoize:n}=r;const i=o.get.byDigest(t,e,r);if(i&&n!==false){const t=new c;t.end(i);return t}else{const i=a.readStream(t,e,r);if(!n){return i}const s=new u.PassThrough;s.on("collect",n=>o.put.byDigest(t,e,n,r));return new l(i,s)}}t.exports.info=info;function info(t,e,r={}){const{memoize:n}=r;const i=o.get(t,e,r);if(i&&n!==false){return Promise.resolve(i.entry)}else{return s.find(t,e)}}t.exports.hasContent=a.hasContent;function cp(t,e,r,n){return copy(false,t,e,r,n)}t.exports.copy=cp;function cpDigest(t,e,r,n){return copy(true,t,e,r,n)}t.exports.copy.byDigest=cpDigest;function copy(t,e,r,n,i={}){if(a.copy){return(t?Promise.resolve(null):s.find(e,r,i)).then(o=>{if(!o&&!t){throw new s.NotFoundError(e,r)}return a.copy(e,t?r:o.integrity,n,i).then(()=>{return t?r:{metadata:o.metadata,size:o.size,integrity:o.integrity}})})}return getData(t,e,r,i).then(e=>{return f(n,t?e:e.data).then(()=>{return t?r:{metadata:e.metadata,size:e.size,integrity:e.integrity}})})}},7234:(t,e,r)=>{"use strict";const n=r(1048);const i=r(4761);const s=r(5576);const o=r(4876);const a=r(9869);const{clearMemoized:c}=r(5575);const u=r(644);t.exports.ls=n;t.exports.ls.stream=n.stream;t.exports.get=i;t.exports.get.byDigest=i.byDigest;t.exports.get.sync=i.sync;t.exports.get.sync.byDigest=i.sync.byDigest;t.exports.get.stream=i.stream;t.exports.get.stream.byDigest=i.stream.byDigest;t.exports.get.copy=i.copy;t.exports.get.copy.byDigest=i.copy.byDigest;t.exports.get.info=i.info;t.exports.get.hasContent=i.hasContent;t.exports.get.hasContent.sync=i.hasContent.sync;t.exports.put=s;t.exports.put.stream=s.stream;t.exports.rm=o.entry;t.exports.rm.all=o.all;t.exports.rm.entry=t.exports.rm;t.exports.rm.content=o.content;t.exports.clearMemoized=c;t.exports.tmp={};t.exports.tmp.mkdir=u.mkdir;t.exports.tmp.withTmp=u.withTmp;t.exports.verify=a;t.exports.verify.lastRun=a.lastRun},3491:(t,e,r)=>{"use strict";const n=r(1666).Jw.k;const i=r(2700);const s=r(5622);const o=r(6726);t.exports=contentPath;function contentPath(t,e){const r=o.parse(e,{single:true});return s.join(contentDir(t),r.algorithm,...i(r.hexDigest()))}t.exports.contentDir=contentDir;function contentDir(t){return s.join(t,`content-v${n}`)}},9409:(t,e,r)=>{"use strict";const n=r(1669);const i=r(5747);const s=r(7714);const o=r(6726);const a=r(3491);const c=r(6436);const u=n.promisify(i.lstat);const l=n.promisify(i.readFile);t.exports=read;const f=64*1024*1024;function read(t,e,r={}){const{size:n}=r;return withContentSri(t,e,(t,e)=>{return u(t).then(r=>({stat:r,cpath:t,sri:e}))}).then(({stat:t,cpath:e,sri:r})=>{if(typeof n==="number"&&t.size!==n){throw sizeError(n,t.size)}if(t.size>f){return h(e,t.size,r,new c).concat()}return l(e,null).then(t=>{if(!o.checkData(t,r)){throw integrityError(r,e)}return t})})}const h=(t,e,r,n)=>{n.push(new s.ReadStream(t,{size:e,readSize:f}),o.integrityStream({integrity:r,size:e}));return n};t.exports.sync=readSync;function readSync(t,e,r={}){const{size:n}=r;return withContentSriSync(t,e,(t,e)=>{const r=i.readFileSync(t);if(typeof n==="number"&&n!==r.length){throw sizeError(n,r.length)}if(o.checkData(r,e)){return r}throw integrityError(e,t)})}t.exports.stream=readStream;t.exports.readStream=readStream;function readStream(t,e,r={}){const{size:n}=r;const i=new c;withContentSri(t,e,(t,e)=>{return u(t).then(r=>({stat:r,cpath:t,sri:e}))}).then(({stat:t,cpath:e,sri:r})=>{if(typeof n==="number"&&n!==t.size){return i.emit("error",sizeError(n,t.size))}h(e,t.size,r,i)},t=>i.emit("error",t));return i}let p;if(i.copyFile){t.exports.copy=copy;t.exports.copy.sync=copySync;p=n.promisify(i.copyFile)}function copy(t,e,r){return withContentSri(t,e,(t,e)=>{return p(t,r)})}function copySync(t,e,r){return withContentSriSync(t,e,(t,e)=>{return i.copyFileSync(t,r)})}t.exports.hasContent=hasContent;function hasContent(t,e){if(!e){return Promise.resolve(false)}return withContentSri(t,e,(t,e)=>{return u(t).then(t=>({size:t.size,sri:e,stat:t}))}).catch(t=>{if(t.code==="ENOENT"){return false}if(t.code==="EPERM"){if(process.platform!=="win32"){throw t}else{return false}}})}t.exports.hasContent.sync=hasContentSync;function hasContentSync(t,e){if(!e){return false}return withContentSriSync(t,e,(t,e)=>{try{const r=i.lstatSync(t);return{size:r.size,sri:e,stat:r}}catch(t){if(t.code==="ENOENT"){return false}if(t.code==="EPERM"){if(process.platform!=="win32"){throw t}else{return false}}}})}function withContentSri(t,e,r){const n=()=>{const n=o.parse(e);const i=n.pickAlgorithm();const s=n[i];if(s.length<=1){const e=a(t,s[0]);return r(e,s[0])}else{return Promise.all(s.map(e=>{return withContentSri(t,e,r).catch(t=>{if(t.code==="ENOENT"){return Object.assign(new Error("No matching content found for "+n.toString()),{code:"ENOENT"})}return t})})).then(t=>{const e=t.find(t=>!(t instanceof Error));if(e){return e}const r=t.find(t=>t.code==="ENOENT");if(r){throw r}throw t.find(t=>t instanceof Error)})}};return new Promise((t,e)=>{try{n().then(t).catch(e)}catch(t){e(t)}})}function withContentSriSync(t,e,r){const n=o.parse(e);const i=n.pickAlgorithm();const s=n[i];if(s.length<=1){const e=a(t,s[0]);return r(e,s[0])}else{let e=null;for(const n of s){try{return withContentSriSync(t,n,r)}catch(t){e=t}}throw e}}function sizeError(t,e){const r=new Error(`Bad data size: expected inserted data to be ${t} bytes, but got ${e} instead`);r.expected=t;r.found=e;r.code="EBADSIZE";return r}function integrityError(t,e){const r=new Error(`Integrity verification failed for ${t} (${e})`);r.code="EINTEGRITY";r.sri=t;r.path=e;return r}},1343:(t,e,r)=>{"use strict";const n=r(1669);const i=r(3491);const{hasContent:s}=r(9409);const o=n.promisify(r(4959));t.exports=rm;function rm(t,e){return s(t,e).then(e=>{if(e&&e.sri){return o(i(t,e.sri)).then(()=>true)}else{return false}})}},3729:(t,e,r)=>{"use strict";const n=r(1669);const i=r(3491);const s=r(1191);const o=r(5747);const a=r(5604);const c=r(8351);const u=r(6436);const l=r(4145);const f=r(5622);const h=n.promisify(r(4959));const p=r(6726);const d=r(9536);const{disposer:y}=r(9131);const v=r(7714);const m=n.promisify(o.writeFile);t.exports=write;function write(t,e,r={}){const{algorithms:n,size:i,integrity:s}=r;if(n&&n.length>1){throw new Error("opts.algorithms only supports a single algorithm for now")}if(typeof i==="number"&&e.length!==i){return Promise.reject(sizeError(i,e.length))}const o=p.fromData(e,n?{algorithms:n}:{});if(s&&!p.checkData(e,s,r)){return Promise.reject(checksumError(s,o))}return y(makeTmp(t,r),makeTmpDisposer,n=>{return m(n.target,e,{flag:"wx"}).then(()=>moveToDestination(n,t,o,r))}).then(()=>({integrity:o,size:e.length}))}t.exports.stream=writeStream;class CacacheWriteStream extends l{constructor(t,e){super();this.opts=e;this.cache=t;this.inputStream=new c;this.inputStream.on("error",t=>this.emit("error",t));this.inputStream.on("drain",()=>this.emit("drain"));this.handleContentP=null}write(t,e,r){if(!this.handleContentP){this.handleContentP=handleContent(this.inputStream,this.cache,this.opts)}return this.inputStream.write(t,e,r)}flush(t){this.inputStream.end(()=>{if(!this.handleContentP){const e=new Error("Cache input stream was empty");e.code="ENODATA";return Promise.reject(e).catch(t)}this.handleContentP.then(e=>{e.integrity&&this.emit("integrity",e.integrity);e.size!==null&&this.emit("size",e.size);t()},e=>t(e))})}}function writeStream(t,e={}){return new CacacheWriteStream(t,e)}function handleContent(t,e,r){return y(makeTmp(e,r),makeTmpDisposer,n=>{return pipeToTmp(t,e,n.target,r).then(t=>{return moveToDestination(n,e,t.integrity,r).then(()=>t)})})}function pipeToTmp(t,e,r,n){let i;let s;const o=p.integrityStream({integrity:n.integrity,algorithms:n.algorithms,size:n.size});o.on("integrity",t=>{i=t});o.on("size",t=>{s=t});const a=new v.WriteStream(r,{flags:"wx"});const c=new u(t,o,a);return c.promise().then(()=>({integrity:i,size:s})).catch(t=>h(r).then(()=>{throw t}))}function makeTmp(t,e){const r=d(f.join(t,"tmp"),e.tmpPrefix);return s.mkdirfix(t,f.dirname(r)).then(()=>({target:r,moved:false}))}function makeTmpDisposer(t){if(t.moved){return Promise.resolve()}return h(t.target)}function moveToDestination(t,e,r,n){const o=i(e,r);const c=f.dirname(o);return s.mkdirfix(e,c).then(()=>{return a(t.target,o)}).then(()=>{t.moved=true;return s.chownr(e,o)})}function sizeError(t,e){const r=new Error(`Bad data size: expected inserted data to be ${t} bytes, but got ${e} instead`);r.expected=t;r.found=e;r.code="EBADSIZE";return r}function checksumError(t,e){const r=new Error(`Integrity check failed:\n Wanted: ${t}\n Found: ${e}`);r.code="EINTEGRITY";r.expected=t;r.found=e;return r}},595:(t,e,r)=>{"use strict";const n=r(1669);const i=r(6417);const s=r(5747);const o=r(8351);const a=r(5622);const c=r(6726);const u=r(3491);const l=r(1191);const f=r(2700);const h=r(1666).Jw.K;const p=n.promisify(s.appendFile);const d=n.promisify(s.readFile);const y=n.promisify(s.readdir);t.exports.NotFoundError=class NotFoundError extends Error{constructor(t,e){super(`No cache entry for ${e} found in ${t}`);this.code="ENOENT";this.cache=t;this.key=e}};t.exports.insert=insert;function insert(t,e,r,n={}){const{metadata:i,size:s}=n;const o=bucketPath(t,e);const u={key:e,integrity:r&&c.stringify(r),time:Date.now(),size:s,metadata:i};return l.mkdirfix(t,a.dirname(o)).then(()=>{const t=JSON.stringify(u);return p(o,`\n${hashEntry(t)}\t${t}`)}).then(()=>l.chownr(t,o)).catch(t=>{if(t.code==="ENOENT"){return undefined}throw t}).then(()=>{return formatEntry(t,u)})}t.exports.insert.sync=insertSync;function insertSync(t,e,r,n={}){const{metadata:i,size:o}=n;const u=bucketPath(t,e);const f={key:e,integrity:r&&c.stringify(r),time:Date.now(),size:o,metadata:i};l.mkdirfix.sync(t,a.dirname(u));const h=JSON.stringify(f);s.appendFileSync(u,`\n${hashEntry(h)}\t${h}`);try{l.chownr.sync(t,u)}catch(t){if(t.code!=="ENOENT"){throw t}}return formatEntry(t,f)}t.exports.find=find;function find(t,e){const r=bucketPath(t,e);return bucketEntries(r).then(r=>{return r.reduce((r,n)=>{if(n&&n.key===e){return formatEntry(t,n)}else{return r}},null)}).catch(t=>{if(t.code==="ENOENT"){return null}else{throw t}})}t.exports.find.sync=findSync;function findSync(t,e){const r=bucketPath(t,e);try{return bucketEntriesSync(r).reduce((r,n)=>{if(n&&n.key===e){return formatEntry(t,n)}else{return r}},null)}catch(t){if(t.code==="ENOENT"){return null}else{throw t}}}t.exports.delete=del;function del(t,e,r){return insert(t,e,null,r)}t.exports.delete.sync=delSync;function delSync(t,e,r){return insertSync(t,e,null,r)}t.exports.lsStream=lsStream;function lsStream(t){const e=bucketDir(t);const r=new o({objectMode:true});readdirOrEmpty(e).then(n=>Promise.all(n.map(n=>{const i=a.join(e,n);return readdirOrEmpty(i).then(e=>Promise.all(e.map(e=>{const n=a.join(i,e);return readdirOrEmpty(n).then(e=>Promise.all(e.map(e=>{const i=a.join(n,e);return bucketEntries(i).then(t=>t.reduce((t,e)=>{t.set(e.key,e);return t},new Map)).then(e=>{for(const n of e.values()){const e=formatEntry(t,n);if(e){r.write(e)}}}).catch(t=>{if(t.code==="ENOENT"){return undefined}throw t})})))})))}))).then(()=>r.end(),t=>r.emit("error",t));return r}t.exports.ls=ls;function ls(t){return lsStream(t).collect().then(t=>t.reduce((t,e)=>{t[e.key]=e;return t},{}))}function bucketEntries(t,e){return d(t,"utf8").then(t=>_bucketEntries(t,e))}function bucketEntriesSync(t,e){const r=s.readFileSync(t,"utf8");return _bucketEntries(r,e)}function _bucketEntries(t,e){const r=[];t.split("\n").forEach(t=>{if(!t){return}const e=t.split("\t");if(!e[1]||hashEntry(e[1])!==e[0]){return}let n;try{n=JSON.parse(e[1])}catch(t){return}if(n){r.push(n)}});return r}t.exports.bucketDir=bucketDir;function bucketDir(t){return a.join(t,`index-v${h}`)}t.exports.bucketPath=bucketPath;function bucketPath(t,e){const r=hashKey(e);return a.join.apply(a,[bucketDir(t)].concat(f(r)))}t.exports.hashKey=hashKey;function hashKey(t){return hash(t,"sha256")}t.exports.hashEntry=hashEntry;function hashEntry(t){return hash(t,"sha1")}function hash(t,e){return i.createHash(e).update(t).digest("hex")}function formatEntry(t,e){if(!e.integrity){return null}return{key:e.key,integrity:e.integrity,path:u(t,e.integrity),size:e.size,time:e.time,metadata:e.metadata}}function readdirOrEmpty(t){return y(t).catch(t=>{if(t.code==="ENOENT"||t.code==="ENOTDIR"){return[]}throw t})}},5575:(t,e,r)=>{"use strict";const n=r(738);const i=50*1024*1024;const s=3*60*1e3;const o=new n({max:i,maxAge:s,length:(t,e)=>e.startsWith("key:")?t.data.length:t.length});t.exports.clearMemoized=clearMemoized;function clearMemoized(){const t={};o.forEach((e,r)=>{t[r]=e});o.reset();return t}t.exports.put=put;function put(t,e,r,n){pickMem(n).set(`key:${t}:${e.key}`,{entry:e,data:r});putDigest(t,e.integrity,r,n)}t.exports.put.byDigest=putDigest;function putDigest(t,e,r,n){pickMem(n).set(`digest:${t}:${e}`,r)}t.exports.get=get;function get(t,e,r){return pickMem(r).get(`key:${t}:${e}`)}t.exports.get.byDigest=getDigest;function getDigest(t,e,r){return pickMem(r).get(`digest:${t}:${e}`)}class ObjProxy{constructor(t){this.obj=t}get(t){return this.obj[t]}set(t,e){this.obj[t]=e}}function pickMem(t){if(!t||!t.memoize){return o}else if(t.memoize.get&&t.memoize.set){return t.memoize}else if(typeof t.memoize==="object"){return new ObjProxy(t.memoize)}else{return o}}},9131:t=>{"use strict";t.exports.disposer=disposer;function disposer(t,e,r){const n=(t,r,n=false)=>{return e(t).then(()=>{if(n){throw r}return r},t=>{throw t})};return t.then(t=>{return Promise.resolve().then(()=>r(t)).then(e=>n(t,e)).catch(e=>n(t,e,true))})}},1191:(t,e,r)=>{"use strict";const n=r(1669);const i=n.promisify(r(9051));const s=r(2933);const o=r(9346);const a=r(9609);const c={uid:null,gid:null};const u=()=>{if(typeof c.uid!=="number"){c.uid=process.getuid();const t=process.setuid;process.setuid=(e=>{c.uid=null;process.setuid=t;return process.setuid(e)})}if(typeof c.gid!=="number"){c.gid=process.getgid();const t=process.setgid;process.setgid=(e=>{c.gid=null;process.setgid=t;return process.setgid(e)})}};t.exports.chownr=fixOwner;function fixOwner(t,e){if(!process.getuid){return Promise.resolve()}u();if(c.uid!==0){return Promise.resolve()}return Promise.resolve(a(t)).then(t=>{const{uid:r,gid:n}=t;if(c.uid===r&&c.gid===n){return}return o("fixOwner: fixing ownership on "+e,()=>i(e,typeof r==="number"?r:c.uid,typeof n==="number"?n:c.gid).catch(t=>{if(t.code==="ENOENT"){return null}throw t}))})}t.exports.chownr.sync=fixOwnerSync;function fixOwnerSync(t,e){if(!process.getuid){return}const{uid:r,gid:n}=a.sync(t);u();if(c.uid!==0){return}if(c.uid===r&&c.gid===n){return}try{i.sync(e,typeof r==="number"?r:c.uid,typeof n==="number"?n:c.gid)}catch(t){if(t.code==="ENOENT"){return null}throw t}}t.exports.mkdirfix=mkdirfix;function mkdirfix(t,e,r){return Promise.resolve(a(t)).then(()=>{return s(e).then(e=>{if(e){return fixOwner(t,e).then(()=>e)}}).catch(r=>{if(r.code==="EEXIST"){return fixOwner(t,e).then(()=>null)}throw r})})}t.exports.mkdirfix.sync=mkdirfixSync;function mkdirfixSync(t,e){try{a.sync(t);const r=s.sync(e);if(r){fixOwnerSync(t,r);return r}}catch(r){if(r.code==="EEXIST"){fixOwnerSync(t,e);return null}else{throw r}}}},2700:t=>{"use strict";t.exports=hashToSegments;function hashToSegments(t){return[t.slice(0,2),t.slice(2,4),t.slice(4)]}},5604:(t,e,r)=>{"use strict";const n=r(5747);const i=r(1669);const s=i.promisify(n.chmod);const o=i.promisify(n.unlink);const a=i.promisify(n.stat);const c=r(3485);const u=r(9346);t.exports=moveFile;function moveFile(t,e){const r=global.__CACACHE_TEST_FAKE_WINDOWS__||process.platform==="win32";return new Promise((i,s)=>{n.link(t,e,t=>{if(t){if(r&&t.code==="EPERM"){return i()}else if(t.code==="EEXIST"||t.code==="EBUSY"){return i()}else{return s(t)}}else{return i()}})}).then(()=>{return Promise.all([o(t),!r&&s(e,"0444")])}).catch(()=>{return u("cacache-move-file:"+e,()=>{return a(e).catch(r=>{if(r.code!=="ENOENT"){throw r}return c(t,e)})})})}},644:(t,e,r)=>{"use strict";const n=r(1669);const i=r(1191);const s=r(5622);const o=n.promisify(r(4959));const a=r(9536);const{disposer:c}=r(9131);t.exports.mkdir=mktmpdir;function mktmpdir(t,e={}){const{tmpPrefix:r}=e;const n=a(s.join(t,"tmp"),r);return i.mkdirfix(t,n).then(()=>{return n})}t.exports.withTmp=withTmp;function withTmp(t,e,r){if(!r){r=e;e={}}return c(mktmpdir(t,e),o,r)}t.exports.fix=fixtmpdir;function fixtmpdir(t){return i(t,s.join(t,"tmp"))}},584:(t,e,r)=>{"use strict";const n=r(1669);const i=r(1855);const s=r(3491);const o=r(1191);const a=r(5747);const c=r(7714);const u=n.promisify(r(7966));const l=r(595);const f=r(5622);const h=n.promisify(r(4959));const p=r(6726);const d=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const y=n.promisify(a.stat);const v=n.promisify(a.truncate);const m=n.promisify(a.writeFile);const g=n.promisify(a.readFile);const _=t=>({concurrency:20,log:{silly(){}},...t});t.exports=verify;function verify(t,e){e=_(e);e.log.silly("verify","verifying cache at",t);const r=[markStartTime,fixPerms,garbageCollect,rebuildIndex,cleanTmp,writeVerifile,markEndTime];return r.reduce((r,n,i)=>{const s=n.name;const o=new Date;return r.then(r=>{return n(t,e).then(t=>{t&&Object.keys(t).forEach(e=>{r[e]=t[e]});const e=new Date;if(!r.runTime){r.runTime={}}r.runTime[s]=e-o;return Promise.resolve(r)})})},Promise.resolve({})).then(r=>{r.runTime.total=r.endTime-r.startTime;e.log.silly("verify","verification finished for",t,"in",`${r.runTime.total}ms`);return r})}function markStartTime(t,e){return Promise.resolve({startTime:new Date})}function markEndTime(t,e){return Promise.resolve({endTime:new Date})}function fixPerms(t,e){e.log.silly("verify","fixing cache permissions");return o.mkdirfix(t,t).then(()=>{return o.chownr(t,t)}).then(()=>null)}function garbageCollect(t,e){e.log.silly("verify","garbage collecting content");const r=l.lsStream(t);const n=new Set;r.on("data",t=>{if(e.filter&&!e.filter(t)){return}n.add(t.integrity.toString())});return new Promise((t,e)=>{r.on("end",t).on("error",e)}).then(()=>{const r=s.contentDir(t);return u(f.join(r,"**"),{follow:false,nodir:true,nosort:true}).then(t=>{return Promise.resolve({verifiedContent:0,reclaimedCount:0,reclaimedSize:0,badContentCount:0,keptSize:0}).then(r=>i(t,t=>{const e=t.split(/[/\\]/);const i=e.slice(e.length-3).join("");const s=e[e.length-4];const o=p.fromHex(i,s);if(n.has(o.toString())){return verifyContent(t,o).then(t=>{if(!t.valid){r.reclaimedCount++;r.badContentCount++;r.reclaimedSize+=t.size}else{r.verifiedContent++;r.keptSize+=t.size}return r})}else{r.reclaimedCount++;return y(t).then(e=>{return h(t).then(()=>{r.reclaimedSize+=e.size;return r})})}},{concurrency:e.concurrency}).then(()=>r))})})}function verifyContent(t,e){return y(t).then(r=>{const n={size:r.size,valid:true};return p.checkStream(new c.ReadStream(t),e).catch(e=>{if(e.code!=="EINTEGRITY"){throw e}return h(t).then(()=>{n.valid=false})}).then(()=>n)}).catch(t=>{if(t.code==="ENOENT"){return{size:0,valid:false}}throw t})}function rebuildIndex(t,e){e.log.silly("verify","rebuilding index");return l.ls(t).then(r=>{const n={missingContent:0,rejectedEntries:0,totalEntries:0};const s={};for(const i in r){if(d(r,i)){const o=l.hashKey(i);const a=r[i];const c=e.filter&&!e.filter(a);c&&n.rejectedEntries++;if(s[o]&&!c){s[o].push(a)}else if(s[o]&&c){}else if(c){s[o]=[];s[o]._path=l.bucketPath(t,i)}else{s[o]=[a];s[o]._path=l.bucketPath(t,i)}}}return i(Object.keys(s),r=>{return rebuildBucket(t,s[r],n,e)},{concurrency:e.concurrency}).then(()=>n)})}function rebuildBucket(t,e,r,n){return v(e._path).then(()=>{return e.reduce((e,n)=>{return e.then(()=>{const e=s(t,n.integrity);return y(e).then(()=>{return l.insert(t,n.key,n.integrity,{metadata:n.metadata,size:n.size}).then(()=>{r.totalEntries++})}).catch(t=>{if(t.code==="ENOENT"){r.rejectedEntries++;r.missingContent++;return}throw t})})},Promise.resolve())})}function cleanTmp(t,e){e.log.silly("verify","cleaning tmp directory");return h(f.join(t,"tmp"))}function writeVerifile(t,e){const r=f.join(t,"_lastverified");e.log.silly("verify","writing verifile to "+r);try{return m(r,""+ +new Date)}finally{o.chownr.sync(t,r)}}t.exports.lastRun=lastRun;function lastRun(t){return g(f.join(t,"_lastverified"),"utf8").then(t=>new Date(+t))}},1048:(t,e,r)=>{"use strict";const n=r(595);t.exports=n.ls;t.exports.stream=n.lsStream},738:(t,e,r)=>{"use strict";const n=r(665);const i=Symbol("max");const s=Symbol("length");const o=Symbol("lengthCalculator");const a=Symbol("allowStale");const c=Symbol("maxAge");const u=Symbol("dispose");const l=Symbol("noDisposeOnSet");const f=Symbol("lruList");const h=Symbol("cache");const p=Symbol("updateAgeOnGet");const d=()=>1;class LRUCache{constructor(t){if(typeof t==="number")t={max:t};if(!t)t={};if(t.max&&(typeof t.max!=="number"||t.max<0))throw new TypeError("max must be a non-negative number");const e=this[i]=t.max||Infinity;const r=t.length||d;this[o]=typeof r!=="function"?d:r;this[a]=t.stale||false;if(t.maxAge&&typeof t.maxAge!=="number")throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0;this[u]=t.dispose;this[l]=t.noDisposeOnSet||false;this[p]=t.updateAgeOnGet||false;this.reset()}set max(t){if(typeof t!=="number"||t<0)throw new TypeError("max must be a non-negative number");this[i]=t||Infinity;m(this)}get max(){return this[i]}set allowStale(t){this[a]=!!t}get allowStale(){return this[a]}set maxAge(t){if(typeof t!=="number")throw new TypeError("maxAge must be a non-negative number");this[c]=t;m(this)}get maxAge(){return this[c]}set lengthCalculator(t){if(typeof t!=="function")t=d;if(t!==this[o]){this[o]=t;this[s]=0;this[f].forEach(t=>{t.length=this[o](t.value,t.key);this[s]+=t.length})}m(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[f].length}rforEach(t,e){e=e||this;for(let r=this[f].tail;r!==null;){const n=r.prev;_(this,t,r,e);r=n}}forEach(t,e){e=e||this;for(let r=this[f].head;r!==null;){const n=r.next;_(this,t,r,e);r=n}}keys(){return this[f].toArray().map(t=>t.key)}values(){return this[f].toArray().map(t=>t.value)}reset(){if(this[u]&&this[f]&&this[f].length){this[f].forEach(t=>this[u](t.key,t.value))}this[h]=new Map;this[f]=new n;this[s]=0}dump(){return this[f].map(t=>v(this,t)?false:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[f]}set(t,e,r){r=r||this[c];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const n=r?Date.now():0;const a=this[o](e,t);if(this[h].has(t)){if(a>this[i]){g(this,this[h].get(t));return false}const o=this[h].get(t);const c=o.value;if(this[u]){if(!this[l])this[u](t,c.value)}c.now=n;c.maxAge=r;c.value=e;this[s]+=a-c.length;c.length=a;this.get(t);m(this);return true}const p=new Entry(t,e,a,n,r);if(p.length>this[i]){if(this[u])this[u](t,e);return false}this[s]+=p.length;this[f].unshift(p);this[h].set(t,this[f].head);m(this);return true}has(t){if(!this[h].has(t))return false;const e=this[h].get(t).value;return!v(this,e)}get(t){return y(this,t,true)}peek(t){return y(this,t,false)}pop(){const t=this[f].tail;if(!t)return null;g(this,t);return t.value}del(t){g(this,this[h].get(t))}load(t){this.reset();const e=Date.now();for(let r=t.length-1;r>=0;r--){const n=t[r];const i=n.e||0;if(i===0)this.set(n.k,n.v);else{const t=i-e;if(t>0){this.set(n.k,n.v,t)}}}}prune(){this[h].forEach((t,e)=>y(this,e,false))}}const y=(t,e,r)=>{const n=t[h].get(e);if(n){const e=n.value;if(v(t,e)){g(t,n);if(!t[a])return undefined}else{if(r){if(t[p])n.value.now=Date.now();t[f].unshiftNode(n)}}return e.value}};const v=(t,e)=>{if(!e||!e.maxAge&&!t[c])return false;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[c]&&r>t[c]};const m=t=>{if(t[s]>t[i]){for(let e=t[f].tail;t[s]>t[i]&&e!==null;){const r=e.prev;g(t,e);e=r}}};const g=(t,e)=>{if(e){const r=e.value;if(t[u])t[u](r.key,r.value);t[s]-=r.length;t[h].delete(r.key);t[f].removeNode(e)}};class Entry{constructor(t,e,r,n,i){this.key=t;this.value=e;this.length=r;this.now=n;this.maxAge=i||0}}const _=(t,e,r,n)=>{let i=r.value;if(v(t,i)){g(t,r);if(!t[a])i=undefined}if(i)e.call(n,i.value,i.key,t)};t.exports=LRUCache},2933:(t,e,r)=>{const n=r(2810);const i=r(4376);const{mkdirpNative:s,mkdirpNativeSync:o}=r(935);const{mkdirpManual:a,mkdirpManualSync:c}=r(7105);const{useNative:u,useNativeSync:l}=r(4230);const f=(t,e)=>{t=i(t);e=n(e);return u(e)?s(t,e):a(t,e)};const h=(t,e)=>{t=i(t);e=n(e);return l(e)?o(t,e):c(t,e)};f.sync=h;f.native=((t,e)=>s(i(t),n(e)));f.manual=((t,e)=>a(i(t),n(e)));f.nativeSync=((t,e)=>o(i(t),n(e)));f.manualSync=((t,e)=>c(i(t),n(e)));t.exports=f},5552:(t,e,r)=>{const{dirname:n}=r(5622);const i=(t,e,r=undefined)=>{if(r===e)return Promise.resolve();return t.statAsync(e).then(t=>t.isDirectory()?r:undefined,r=>r.code==="ENOENT"?i(t,n(e),e):undefined)};const s=(t,e,r=undefined)=>{if(r===e)return undefined;try{return t.statSync(e).isDirectory()?r:undefined}catch(r){return r.code==="ENOENT"?s(t,n(e),e):undefined}};t.exports={findMade:i,findMadeSync:s}},7105:(t,e,r)=>{const{dirname:n}=r(5622);const i=(t,e,r)=>{e.recursive=false;const s=n(t);if(s===t){return e.mkdirAsync(t,e).catch(t=>{if(t.code!=="EISDIR")throw t})}return e.mkdirAsync(t,e).then(()=>r||t,n=>{if(n.code==="ENOENT")return i(s,e).then(r=>i(t,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return e.statAsync(t).then(t=>{if(t.isDirectory())return r;else throw n},()=>{throw n})})};const s=(t,e,r)=>{const i=n(t);e.recursive=false;if(i===t){try{return e.mkdirSync(t,e)}catch(t){if(t.code!=="EISDIR")throw t;else return}}try{e.mkdirSync(t,e);return r||t}catch(n){if(n.code==="ENOENT")return s(t,e,s(i,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!e.statSync(t).isDirectory())throw n}catch(t){throw n}}};t.exports={mkdirpManual:i,mkdirpManualSync:s}},935:(t,e,r)=>{const{dirname:n}=r(5622);const{findMade:i,findMadeSync:s}=r(5552);const{mkdirpManual:o,mkdirpManualSync:a}=r(7105);const c=(t,e)=>{e.recursive=true;const r=n(t);if(r===t)return e.mkdirAsync(t,e);return i(e,t).then(r=>e.mkdirAsync(t,e).then(()=>r).catch(r=>{if(r.code==="ENOENT")return o(t,e);else throw r}))};const u=(t,e)=>{e.recursive=true;const r=n(t);if(r===t)return e.mkdirSync(t,e);const i=s(e,t);try{e.mkdirSync(t,e);return i}catch(r){if(r.code==="ENOENT")return a(t,e);else throw r}};t.exports={mkdirpNative:c,mkdirpNativeSync:u}},2810:(t,e,r)=>{const{promisify:n}=r(1669);const i=r(5747);const s=t=>{if(!t)t={mode:511,fs:i};else if(typeof t==="object")t={mode:511,fs:i,...t};else if(typeof t==="number")t={mode:t,fs:i};else if(typeof t==="string")t={mode:parseInt(t,8),fs:i};else throw new TypeError("invalid options argument");t.mkdir=t.mkdir||t.fs.mkdir||i.mkdir;t.mkdirAsync=n(t.mkdir);t.stat=t.stat||t.fs.stat||i.stat;t.statAsync=n(t.stat);t.statSync=t.statSync||t.fs.statSync||i.statSync;t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||i.mkdirSync;return t};t.exports=s},4376:(t,e,r)=>{const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:i,parse:s}=r(5622);const o=t=>{if(/\0/.test(t)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"})}t=i(t);if(n==="win32"){const e=/[*|"<>?:]/;const{root:r}=s(t);if(e.test(t.substr(r.length))){throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}}return t};t.exports=o},4230:(t,e,r)=>{const n=r(5747);const i=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const s=i.replace(/^v/,"").split(".");const o=+s[0]>10||+s[0]===10&&+s[1]>=12;const a=!o?()=>false:t=>t.mkdir===n.mkdir;const c=!o?()=>false:t=>t.mkdirSync===n.mkdirSync;t.exports={useNative:a,useNativeSync:c}},5576:(t,e,r)=>{"use strict";const n=r(595);const i=r(5575);const s=r(3729);const o=r(4145);const{PassThrough:a}=r(5283);const c=r(6436);const u=t=>({algorithms:["sha512"],...t});t.exports=putData;function putData(t,e,r,o={}){const{memoize:a}=o;o=u(o);return s(t,r,o).then(s=>{return n.insert(t,e,s.integrity,{...o,size:s.size}).then(e=>{if(a){i.put(t,e,r,o)}return s.integrity})})}t.exports.stream=putStream;function putStream(t,e,r={}){const{memoize:l}=r;r=u(r);let f;let h;let p;const d=new c;if(l){const t=(new a).on("collect",t=>{p=t});d.push(t)}const y=s.stream(t,r).on("integrity",t=>{f=t}).on("size",t=>{h=t});d.push(y);d.push(new o({flush(){return n.insert(t,e,f,{...r,size:h}).then(e=>{if(l&&p){i.put(t,e,p,r)}if(f){d.emit("integrity",f)}if(h){d.emit("size",h)}})}}));return d}},4876:(t,e,r)=>{"use strict";const n=r(1669);const i=r(595);const s=r(5575);const o=r(5622);const a=n.promisify(r(4959));const c=r(1343);t.exports=entry;t.exports.entry=entry;function entry(t,e){s.clearMemoized();return i.delete(t,e)}t.exports.content=content;function content(t,e){s.clearMemoized();return c(t,e)}t.exports.all=all;function all(t){s.clearMemoized();return a(o.join(t,"*(content-*|index-*)"))}},9869:(t,e,r)=>{"use strict";t.exports=r(584)},9051:(t,e,r)=>{"use strict";const n=r(5747);const i=r(5622);const s=n.lchown?"lchown":"chown";const o=n.lchownSync?"lchownSync":"chownSync";const a=n.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/);const c=(t,e,r)=>{try{return n[o](t,e,r)}catch(t){if(t.code!=="ENOENT")throw t}};const u=(t,e,r)=>{try{return n.chownSync(t,e,r)}catch(t){if(t.code!=="ENOENT")throw t}};const l=a?(t,e,r,i)=>s=>{if(!s||s.code!=="EISDIR")i(s);else n.chown(t,e,r,i)}:(t,e,r,n)=>n;const f=a?(t,e,r)=>{try{return c(t,e,r)}catch(n){if(n.code!=="EISDIR")throw n;u(t,e,r)}}:(t,e,r)=>c(t,e,r);const h=process.version;let p=(t,e,r)=>n.readdir(t,e,r);let d=(t,e)=>n.readdirSync(t,e);if(/^v4\./.test(h))p=((t,e,r)=>n.readdir(t,r));const y=(t,e,r,i)=>{n[s](t,e,r,l(t,e,r,t=>{i(t&&t.code!=="ENOENT"?t:null)}))};const v=(t,e,r,s,o)=>{if(typeof e==="string")return n.lstat(i.resolve(t,e),(n,i)=>{if(n)return o(n.code!=="ENOENT"?n:null);i.name=e;v(t,i,r,s,o)});if(e.isDirectory()){m(i.resolve(t,e.name),r,s,n=>{if(n)return o(n);const a=i.resolve(t,e.name);y(a,r,s,o)})}else{const n=i.resolve(t,e.name);y(n,r,s,o)}};const m=(t,e,r,n)=>{p(t,{withFileTypes:true},(i,s)=>{if(i){if(i.code==="ENOENT")return n();else if(i.code!=="ENOTDIR"&&i.code!=="ENOTSUP")return n(i)}if(i||!s.length)return y(t,e,r,n);let o=s.length;let a=null;const c=i=>{if(a)return;if(i)return n(a=i);if(--o===0)return y(t,e,r,n)};s.forEach(n=>v(t,n,e,r,c))})};const g=(t,e,r,s)=>{if(typeof e==="string"){try{const r=n.lstatSync(i.resolve(t,e));r.name=e;e=r}catch(t){if(t.code==="ENOENT")return;else throw t}}if(e.isDirectory())_(i.resolve(t,e.name),r,s);f(i.resolve(t,e.name),r,s)};const _=(t,e,r)=>{let n;try{n=d(t,{withFileTypes:true})}catch(n){if(n.code==="ENOENT")return;else if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return f(t,e,r);else throw n}if(n&&n.length)n.forEach(n=>g(t,n,e,r));return f(t,e,r)};t.exports=m;m.sync=_},7714:(t,e,r)=>{"use strict";const n=r(8351);const i=r(8614).EventEmitter;const s=r(5747);let o=s.writev;if(!o){const t=process.binding("fs");const e=t.FSReqWrap||t.FSReqCallback;o=((r,n,i,s)=>{const o=(t,e)=>s(t,e,n);const a=new e;a.oncomplete=o;t.writeBuffers(r,n,i,a)})}const a=Symbol("_autoClose");const c=Symbol("_close");const u=Symbol("_ended");const l=Symbol("_fd");const f=Symbol("_finished");const h=Symbol("_flags");const p=Symbol("_flush");const d=Symbol("_handleChunk");const y=Symbol("_makeBuf");const v=Symbol("_mode");const m=Symbol("_needDrain");const g=Symbol("_onerror");const _=Symbol("_onopen");const w=Symbol("_onread");const b=Symbol("_onwrite");const S=Symbol("_open");const E=Symbol("_path");const k=Symbol("_pos");const x=Symbol("_queue");const C=Symbol("_read");const A=Symbol("_readSize");const T=Symbol("_reading");const P=Symbol("_remain");const j=Symbol("_size");const O=Symbol("_write");const F=Symbol("_writing");const R=Symbol("_defaultFlag");const N=Symbol("_errored");class ReadStream extends n{constructor(t,e){e=e||{};super(e);this.readable=true;this.writable=false;if(typeof t!=="string")throw new TypeError("path must be a string");this[N]=false;this[l]=typeof e.fd==="number"?e.fd:null;this[E]=t;this[A]=e.readSize||16*1024*1024;this[T]=false;this[j]=typeof e.size==="number"?e.size:Infinity;this[P]=this[j];this[a]=typeof e.autoClose==="boolean"?e.autoClose:true;if(typeof this[l]==="number")this[C]();else this[S]()}get fd(){return this[l]}get path(){return this[E]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[S](){s.open(this[E],"r",(t,e)=>this[_](t,e))}[_](t,e){if(t)this[g](t);else{this[l]=e;this.emit("open",e);this[C]()}}[y](){return Buffer.allocUnsafe(Math.min(this[A],this[P]))}[C](){if(!this[T]){this[T]=true;const t=this[y]();if(t.length===0)return process.nextTick(()=>this[w](null,0,t));s.read(this[l],t,0,t.length,null,(t,e,r)=>this[w](t,e,r))}}[w](t,e,r){this[T]=false;if(t)this[g](t);else if(this[d](e,r))this[C]()}[c](){if(this[a]&&typeof this[l]==="number"){const t=this[l];this[l]=null;s.close(t,t=>t?this.emit("error",t):this.emit("close"))}}[g](t){this[T]=true;this[c]();this.emit("error",t)}[d](t,e){let r=false;this[P]-=t;if(t>0)r=super.write(tthis[_](t,e))}[_](t,e){if(this[R]&&this[h]==="r+"&&t&&t.code==="ENOENT"){this[h]="w";this[S]()}else if(t)this[g](t);else{this[l]=e;this.emit("open",e);this[p]()}}end(t,e){if(t)this.write(t,e);this[u]=true;if(!this[F]&&!this[x].length&&typeof this[l]==="number")this[b](null,0);return this}write(t,e){if(typeof t==="string")t=Buffer.from(t,e);if(this[u]){this.emit("error",new Error("write() after end()"));return false}if(this[l]===null||this[F]||this[x].length){this[x].push(t);this[m]=true;return false}this[F]=true;this[O](t);return true}[O](t){s.write(this[l],t,0,t.length,this[k],(t,e)=>this[b](t,e))}[b](t,e){if(t)this[g](t);else{if(this[k]!==null)this[k]+=e;if(this[x].length)this[p]();else{this[F]=false;if(this[u]&&!this[f]){this[f]=true;this[c]();this.emit("finish")}else if(this[m]){this[m]=false;this.emit("drain")}}}}[p](){if(this[x].length===0){if(this[u])this[b](null,0)}else if(this[x].length===1)this[O](this[x].pop());else{const t=this[x];this[x]=[];o(this[l],t,this[k],(t,e)=>this[b](t,e))}}[c](){if(this[a]&&typeof this[l]==="number"){const t=this[l];this[l]=null;s.close(t,t=>t?this.emit("error",t):this.emit("close"))}}}class WriteStreamSync extends WriteStream{[S](){let t;if(this[R]&&this[h]==="r+"){try{t=s.openSync(this[E],this[h],this[v])}catch(t){if(t.code==="ENOENT"){this[h]="w";return this[S]()}else throw t}}else t=s.openSync(this[E],this[h],this[v]);this[_](null,t)}[c](){if(this[a]&&typeof this[l]==="number"){const t=this[l];this[l]=null;s.closeSync(t);this.emit("close")}}[O](t){let e=true;try{this[b](null,s.writeSync(this[l],t,0,t.length,this[k]));e=false}finally{if(e)try{this[c]()}catch(t){}}}}e.ReadStream=ReadStream;e.ReadStreamSync=ReadStreamSync;e.WriteStream=WriteStream;e.WriteStreamSync=WriteStreamSync},1855:(t,e,r)=>{"use strict";const n=r(464);t.exports=(async(t,e,{concurrency:r=Infinity,stopOnError:i=true}={})=>{return new Promise((s,o)=>{if(typeof e!=="function"){throw new TypeError("Mapper function is required")}if(!((Number.isSafeInteger(r)||r===Infinity)&&r>=1)){throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`)}const a=[];const c=[];const u=t[Symbol.iterator]();let l=false;let f=false;let h=0;let p=0;const d=()=>{if(l){return}const t=u.next();const r=p;p++;if(t.done){f=true;if(h===0){if(!i&&c.length!==0){o(new n(c))}else{s(a)}}return}h++;(async()=>{try{const n=await t.value;a[r]=await e(n,r);h--;d()}catch(t){if(i){l=true;o(t)}else{c.push(t);h--;d()}}})()};for(let t=0;t{const n=r(2357);const i=r(5622);const s=r(5747);let o=undefined;try{o=r(7966)}catch(t){}const a={nosort:true,silent:true};let c=0;const u=process.platform==="win32";const l=t=>{const e=["unlink","chmod","stat","lstat","rmdir","readdir"];e.forEach(e=>{t[e]=t[e]||s[e];e=e+"Sync";t[e]=t[e]||s[e]});t.maxBusyTries=t.maxBusyTries||3;t.emfileWait=t.emfileWait||1e3;if(t.glob===false){t.disableGlob=true}if(t.disableGlob!==true&&o===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}t.disableGlob=t.disableGlob||false;t.glob=t.glob||a};const f=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}n(t,"rimraf: missing path");n.equal(typeof t,"string","rimraf: path should be a string");n.equal(typeof r,"function","rimraf: callback function required");n(e,"rimraf: invalid options argument provided");n.equal(typeof e,"object","rimraf: options should be object");l(e);let i=0;let s=null;let a=0;const u=t=>{s=s||t;if(--a===0)r(s)};const f=(t,n)=>{if(t)return r(t);a=n.length;if(a===0)return r();n.forEach(t=>{const r=n=>{if(n){if((n.code==="EBUSY"||n.code==="ENOTEMPTY"||n.code==="EPERM")&&ih(t,e,r),i*100)}if(n.code==="EMFILE"&&ch(t,e,r),c++)}if(n.code==="ENOENT")n=null}c=0;u(n)};h(t,e,r)})};if(e.disableGlob||!o.hasMagic(t))return f(null,[t]);e.lstat(t,(r,n)=>{if(!r)return f(null,[t]);o(t,e.glob,f)})};const h=(t,e,r)=>{n(t);n(e);n(typeof r==="function");e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&u)p(t,e,n,r);if(i&&i.isDirectory())return y(t,e,n,r);e.unlink(t,n=>{if(n){if(n.code==="ENOENT")return r(null);if(n.code==="EPERM")return u?p(t,e,n,r):y(t,e,n,r);if(n.code==="EISDIR")return y(t,e,n,r)}return r(n)})})};const p=(t,e,r,i)=>{n(t);n(e);n(typeof i==="function");e.chmod(t,438,n=>{if(n)i(n.code==="ENOENT"?null:r);else e.stat(t,(n,s)=>{if(n)i(n.code==="ENOENT"?null:r);else if(s.isDirectory())y(t,e,r,i);else e.unlink(t,i)})})};const d=(t,e,r)=>{n(t);n(e);try{e.chmodSync(t,438)}catch(t){if(t.code==="ENOENT")return;else throw r}let i;try{i=e.statSync(t)}catch(t){if(t.code==="ENOENT")return;else throw r}if(i.isDirectory())g(t,e,r);else e.unlinkSync(t)};const y=(t,e,r,i)=>{n(t);n(e);n(typeof i==="function");e.rmdir(t,n=>{if(n&&(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM"))v(t,e,i);else if(n&&n.code==="ENOTDIR")i(r);else i(n)})};const v=(t,e,r)=>{n(t);n(e);n(typeof r==="function");e.readdir(t,(n,s)=>{if(n)return r(n);let o=s.length;if(o===0)return e.rmdir(t,r);let a;s.forEach(n=>{f(i.join(t,n),e,n=>{if(a)return;if(n)return r(a=n);if(--o===0)e.rmdir(t,r)})})})};const m=(t,e)=>{e=e||{};l(e);n(t,"rimraf: missing path");n.equal(typeof t,"string","rimraf: path should be a string");n(e,"rimraf: missing options");n.equal(typeof e,"object","rimraf: options should be object");let r;if(e.disableGlob||!o.hasMagic(t)){r=[t]}else{try{e.lstatSync(t);r=[t]}catch(n){r=o.sync(t,e.glob)}}if(!r.length)return;for(let t=0;t{n(t);n(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")_(t,e)}};const _=(t,e)=>{n(t);n(e);e.readdirSync(t).forEach(r=>m(i.join(t,r),e));const r=u?100:1;let s=0;do{let n=true;try{const i=e.rmdirSync(t,e);n=false;return i}finally{if(++s{"use strict";const n=r(6417);const i=r(8351);const s=["sha256","sha384","sha512"];const o=/^[a-z0-9+/]+(?:=?=?)$/i;const a=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/;const c=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/;const u=/^[\x21-\x7E]+$/;const l={algorithms:["sha512"],error:false,options:[],pickAlgorithm:getPrioritizedHash,sep:" ",single:false,strict:false};const f=(t={})=>({...l,...t});const h=t=>!t||!t.length?"":`?${t.join("?")}`;const p=Symbol("_onEnd");const d=Symbol("_getOptions");class IntegrityStream extends i{constructor(t){super();this.size=0;this.opts=t;this[d]();const{algorithms:e=l.algorithms}=t;this.algorithms=Array.from(new Set(e.concat(this.algorithm?[this.algorithm]:[])));this.hashes=this.algorithms.map(n.createHash)}[d](){const{integrity:t,size:e,options:r}={...l,...this.opts};this.sri=t?parse(t,this.opts):null;this.expectedSize=e;this.goodSri=this.sri?!!Object.keys(this.sri).length:false;this.algorithm=this.goodSri?this.sri.pickAlgorithm(this.opts):null;this.digests=this.goodSri?this.sri[this.algorithm]:null;this.optString=h(r)}emit(t,e){if(t==="end")this[p]();return super.emit(t,e)}write(t){this.size+=t.length;this.hashes.forEach(e=>e.update(t));return super.write(t)}[p](){if(!this.goodSri){this[d]()}const t=parse(this.hashes.map((t,e)=>{return`${this.algorithms[e]}-${t.digest("base64")}${this.optString}`}).join(" "),this.opts);const e=this.goodSri&&t.match(this.sri,this.opts);if(typeof this.expectedSize==="number"&&this.size!==this.expectedSize){const t=new Error(`stream size mismatch when checking ${this.sri}.\n Wanted: ${this.expectedSize}\n Found: ${this.size}`);t.code="EBADSIZE";t.found=this.size;t.expected=this.expectedSize;t.sri=this.sri;this.emit("error",t)}else if(this.sri&&!e){const e=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${t}. (${this.size} bytes)`);e.code="EINTEGRITY";e.found=t;e.expected=this.digests;e.algorithm=this.algorithm;e.sri=this.sri;this.emit("error",e)}else{this.emit("size",this.size);this.emit("integrity",t);e&&this.emit("verified",e)}}}class Hash{get isHash(){return true}constructor(t,e){e=f(e);const r=!!e.strict;this.source=t.trim();this.digest="";this.algorithm="";this.options=[];const n=this.source.match(r?c:a);if(!n){return}if(r&&!s.some(t=>t===n[1])){return}this.algorithm=n[1];this.digest=n[2];const i=n[3];if(i){this.options=i.slice(1).split("?")}}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}toString(t){t=f(t);if(t.strict){if(!(s.some(t=>t===this.algorithm)&&this.digest.match(o)&&this.options.every(t=>t.match(u)))){return""}}const e=this.options&&this.options.length?`?${this.options.join("?")}`:"";return`${this.algorithm}-${this.digest}${e}`}}class Integrity{get isIntegrity(){return true}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(t){t=f(t);let e=t.sep||" ";if(t.strict){e=e.replace(/\S+/g," ")}return Object.keys(this).map(r=>{return this[r].map(e=>{return Hash.prototype.toString.call(e,t)}).filter(t=>t.length).join(e)}).filter(t=>t.length).join(e)}concat(t,e){e=f(e);const r=typeof t==="string"?t:stringify(t,e);return parse(`${this.toString(e)} ${r}`,e)}hexDigest(){return parse(this,{single:true}).hexDigest()}merge(t,e){e=f(e);const r=parse(t,e);for(const t in r){if(this[t]){if(!this[t].find(e=>r[t].find(t=>e.digest===t.digest))){throw new Error("hashes do not match, cannot update integrity")}}else{this[t]=r[t]}}}match(t,e){e=f(e);const r=parse(t,e);const n=r.pickAlgorithm(e);return this[n]&&r[n]&&this[n].find(t=>r[n].find(e=>t.digest===e.digest))||false}pickAlgorithm(t){t=f(t);const e=t.pickAlgorithm;const r=Object.keys(this);return r.reduce((t,r)=>{return e(t,r)||t})}}t.exports.parse=parse;function parse(t,e){if(!t)return null;e=f(e);if(typeof t==="string"){return _parse(t,e)}else if(t.algorithm&&t.digest){const r=new Integrity;r[t.algorithm]=[t];return _parse(stringify(r,e),e)}else{return _parse(stringify(t,e),e)}}function _parse(t,e){if(e.single){return new Hash(t,e)}const r=t.trim().split(/\s+/).reduce((t,r)=>{const n=new Hash(r,e);if(n.algorithm&&n.digest){const e=n.algorithm;if(!t[e]){t[e]=[]}t[e].push(n)}return t},new Integrity);return r.isEmpty()?null:r}t.exports.stringify=stringify;function stringify(t,e){e=f(e);if(t.algorithm&&t.digest){return Hash.prototype.toString.call(t,e)}else if(typeof t==="string"){return stringify(parse(t,e),e)}else{return Integrity.prototype.toString.call(t,e)}}t.exports.fromHex=fromHex;function fromHex(t,e,r){r=f(r);const n=h(r.options);return parse(`${e}-${Buffer.from(t,"hex").toString("base64")}${n}`,r)}t.exports.fromData=fromData;function fromData(t,e){e=f(e);const r=e.algorithms;const i=h(e.options);return r.reduce((r,s)=>{const o=n.createHash(s).update(t).digest("base64");const a=new Hash(`${s}-${o}${i}`,e);if(a.algorithm&&a.digest){const t=a.algorithm;if(!r[t]){r[t]=[]}r[t].push(a)}return r},new Integrity)}t.exports.fromStream=fromStream;function fromStream(t,e){e=f(e);const r=integrityStream(e);return new Promise((e,n)=>{t.pipe(r);t.on("error",n);r.on("error",n);let i;r.on("integrity",t=>{i=t});r.on("end",()=>e(i));r.on("data",()=>{})})}t.exports.checkData=checkData;function checkData(t,e,r){r=f(r);e=parse(e,r);if(!e||!Object.keys(e).length){if(r.error){throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"})}else{return false}}const i=e.pickAlgorithm(r);const s=n.createHash(i).update(t).digest("base64");const o=parse({algorithm:i,digest:s});const a=o.match(e,r);if(a||!r.error){return a}else if(typeof r.size==="number"&&t.length!==r.size){const n=new Error(`data size mismatch when checking ${e}.\n Wanted: ${r.size}\n Found: ${t.length}`);n.code="EBADSIZE";n.found=t.length;n.expected=r.size;n.sri=e;throw n}else{const r=new Error(`Integrity checksum failed when using ${i}: Wanted ${e}, but got ${o}. (${t.length} bytes)`);r.code="EINTEGRITY";r.found=o;r.expected=e;r.algorithm=i;r.sri=e;throw r}}t.exports.checkStream=checkStream;function checkStream(t,e,r){r=f(r);r.integrity=e;e=parse(e,r);if(!e||!Object.keys(e).length){return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}))}const n=integrityStream(r);return new Promise((e,r)=>{t.pipe(n);t.on("error",r);n.on("error",r);let i;n.on("verified",t=>{i=t});n.on("end",()=>e(i));n.on("data",()=>{})})}t.exports.integrityStream=integrityStream;function integrityStream(t={}){return new IntegrityStream(t)}t.exports.create=createIntegrity;function createIntegrity(t){t=f(t);const e=t.algorithms;const r=h(t.options);const i=e.map(n.createHash);return{update:function(t,e){i.forEach(r=>r.update(t,e));return this},digest:function(n){const s=e.reduce((e,n)=>{const s=i.shift().digest("base64");const o=new Hash(`${n}-${s}${r}`,t);if(o.algorithm&&o.digest){const t=o.algorithm;if(!e[t]){e[t]=[]}e[t].push(o)}return e},new Integrity);return s}}}const y=new Set(n.getHashes());const v=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>y.has(t));function getPrioritizedHash(t,e){return v.indexOf(t.toLowerCase())>=v.indexOf(e.toLowerCase())?t:e}},4091:t=>{"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},665:(t,e,r)=>{"use strict";t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var e=this;if(!(e instanceof Yallist)){e=new Yallist}e.tail=null;e.head=null;e.length=0;if(t&&typeof t.forEach==="function"){t.forEach(function(t){e.push(t)})}else if(arguments.length>0){for(var r=0,n=arguments.length;r1){r=e}else if(this.head){n=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;n!==null;i++){r=t(r,n.value,i);n=n.next}return r};Yallist.prototype.reduceReverse=function(t,e){var r;var n=this.tail;if(arguments.length>1){r=e}else if(this.tail){n=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;n!==null;i--){r=t(r,n.value,i);n=n.prev}return r};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var e=0,r=this.head;r!==null;e++){t[e]=r.value;r=r.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var e=0,r=this.tail;r!==null;e++){t[e]=r.value;r=r.prev}return t};Yallist.prototype.slice=function(t,e){e=e||this.length;if(e<0){e+=this.length}t=t||0;if(t<0){t+=this.length}var r=new Yallist;if(ethis.length){e=this.length}for(var n=0,i=this.head;i!==null&&nthis.length){e=this.length}for(var n=this.length,i=this.tail;i!==null&&n>e;n--){i=i.prev}for(;i!==null&&n>t;n--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(t,e,...r){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var n=0,i=this.head;i!==null&&n{"use strict";t.exports=JSON.parse('{"Jw":{"k":"2","K":"5"}}')},2357:t=>{"use strict";t.exports=require("assert")},7303:t=>{"use strict";t.exports=require("async_hooks")},6417:t=>{"use strict";t.exports=require("crypto")},8614:t=>{"use strict";t.exports=require("events")},5747:t=>{"use strict";t.exports=require("fs")},2087:t=>{"use strict";t.exports=require("os")},5622:t=>{"use strict";t.exports=require("path")},2413:t=>{"use strict";t.exports=require("stream")},4304:t=>{"use strict";t.exports=require("string_decoder")},1669:t=>{"use strict";t.exports=require("util")}};var __webpack_module_cache__={};function __nccwpck_require__(t){if(__webpack_module_cache__[t]){return __webpack_module_cache__[t].exports}var e=__webpack_module_cache__[t]={exports:{}};var r=true;try{__webpack_modules__[t].call(e.exports,e,e.exports,__nccwpck_require__);r=false}finally{if(r)delete __webpack_module_cache__[t]}return e.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(7234)})(); \ No newline at end of file diff --git a/packages/next/compiled/cache-loader/cjs.js b/packages/next/compiled/cache-loader/cjs.js index 637a442293fe1be..0ea35b59bf283ff 100644 --- a/packages/next/compiled/cache-loader/cjs.js +++ b/packages/next/compiled/cache-loader/cjs.js @@ -1 +1 @@ -module.exports=(()=>{var e={819:e=>{"use strict";e.exports=JSON.parse('{"type":"object","properties":{"cacheContext":{"description":"The default cache context in order to generate the cache relatively to a path. By default it will use absolute paths.","type":"string"},"cacheKey":{"description":"Allows you to override default cache key generator.","instanceof":"Function"},"cacheIdentifier":{"description":"Provide a cache directory where cache items should be stored (used for default read/write implementation).","type":"string"},"cacheDirectory":{"description":"Provide an invalidation identifier which is used to generate the hashes. You can use it for extra dependencies of loaders (used for default read/write implementation).","type":"string"},"compare":{"description":"Allows you to override default comparison function between the cached dependency and the one is being read. Return true to use the cached resource.","instanceof":"Function"},"precision":{"description":"Round mtime by this number of milliseconds both for stats and deps before passing those params to the comparing function.","type":"number"},"read":{"description":"Allows you to override default read cache data from file.","instanceof":"Function"},"readOnly":{"description":"Allows you to override default value and make the cache read only (useful for some environments where you don\'t want the cache to be updated, only read from it).","type":"boolean"},"write":{"description":"Allows you to override default write cache data to file (e.g. Redis, memcached).","instanceof":"Function"}},"additionalProperties":false}')},612:e=>{"use strict";e.exports=JSON.parse('{"name":"cache-loader","version":"4.1.0","description":"Caches the result of following loaders on disk.","license":"MIT","repository":"webpack-contrib/cache-loader","author":"Tobias Koppers @sokra","homepage":"https://github.com/webpack-contrib/cache-loader","bugs":"https://github.com/webpack-contrib/cache-loader/issues","main":"dist/cjs.js","engines":{"node":">= 8.9.0"},"scripts":{"start":"npm run build -- -w","prebuild":"npm run clean","build":"cross-env NODE_ENV=production babel src -d dist --ignore \\"src/**/*.test.js\\" --copy-files","clean":"del-cli dist","commitlint":"commitlint --from=master","lint:prettier":"prettier \\"{**/*,*}.{js,json,md,yml,css}\\" --list-different","lint:js":"eslint --cache src test","lint":"npm-run-all -l -p \\"lint:**\\"","prepare":"npm run build","release":"standard-version","security":"npm audit","test:only":"cross-env NODE_ENV=test jest","test:watch":"cross-env NODE_ENV=test jest --watch","test:coverage":"cross-env NODE_ENV=test jest --collectCoverageFrom=\\"src/**/*.js\\" --coverage","pretest":"npm run lint","test":"cross-env NODE_ENV=test npm run test:coverage","defaults":"webpack-defaults"},"files":["dist"],"peerDependencies":{"webpack":"^4.0.0"},"dependencies":{"buffer-json":"^2.0.0","find-cache-dir":"^3.0.0","loader-utils":"^1.2.3","mkdirp":"^0.5.1","neo-async":"^2.6.1","schema-utils":"^2.0.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","@commitlint/cli":"^8.1.0","@commitlint/config-conventional":"^8.1.0","@webpack-contrib/defaults":"^5.0.2","@webpack-contrib/eslint-config-webpack":"^3.0.0","babel-jest":"^24.8.0","babel-loader":"^8.0.6","commitlint-azure-pipelines-cli":"^1.0.2","cross-env":"^5.2.0","del":"^5.0.0","del-cli":"^2.0.0","eslint":"^6.0.1","eslint-config-prettier":"^6.0.0","eslint-plugin-import":"^2.18.0","file-loader":"^4.1.0","husky":"^3.0.0","jest":"^24.8.0","jest-junit":"^6.4.0","lint-staged":"^9.2.0","memory-fs":"^0.4.1","normalize-path":"^3.0.0","npm-run-all":"^4.1.5","prettier":"^1.18.2","standard-version":"^6.0.1","uuid":"^3.3.2","webpack":"^4.36.1","webpack-cli":"^3.3.6"},"keywords":["webpack"]}')},456:e=>{function stringify(e,t){return JSON.stringify(e,replacer,t)}function parse(e){return JSON.parse(e,reviver)}function replacer(e,t){if(isBufferLike(t)){if(isArray(t.data)){if(t.data.length>0){t.data="base64:"+Buffer.from(t.data).toString("base64")}else{t.data=""}}}return t}function reviver(e,t){if(isBufferLike(t)){if(isArray(t.data)){return Buffer.from(t.data)}else if(isString(t.data)){if(t.data.startsWith("base64:")){return Buffer.from(t.data.slice("base64:".length),"base64")}return Buffer.from(t.data)}}return t}function isBufferLike(e){return isObject(e)&&e.type==="Buffer"&&(isArray(e.data)||isString(e.data))}function isArray(e){return Array.isArray(e)}function isString(e){return typeof e==="string"}function isObject(e){return typeof e==="object"&&e!==null}e.exports={stringify:stringify,parse:parse,replacer:replacer,reviver:reviver}},296:(e,t,r)=>{"use strict";e.exports=r(582)},582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=loader;t.pitch=pitch;t.raw=void 0;const i=r(747);const n=r(87);const s=r(622);const a=r(386);const c=r(417);const o=r(327);const d=r(844);const u=r(456);const{getOptions:l}=r(710);const p=r(225);const h=r(612);const f=process.env.NODE_ENV||"development";const m=r(819);const b={cacheContext:"",cacheDirectory:d({name:"cache-loader"})||n.tmpdir(),cacheIdentifier:`cache-loader:${h.version} ${f}`,cacheKey:cacheKey,compare:compare,precision:0,read:read,readOnly:false,write:write};function pathWithCacheContext(e,t){if(!e){return t}if(t.includes(e)){return t.split("!").map(t=>s.relative(e,t)).join("!")}return t.split("!").map(t=>s.resolve(e,t)).join("!")}function roundMs(e,t){return Math.floor(e/t)*t}function loader(...e){const t=Object.assign({},b,l(this));p(m,t,{name:"Cache Loader",baseDataPath:"options"});const{readOnly:r,write:n}=t;if(r){this.callback(null,...e);return}const s=this.async();const{data:c}=this;const o=this.getDependencies().concat(this.loaders.map(e=>e.path));const d=this.getContextDependencies();let u=true;const h=this.fs||i;const f=(e,r)=>{h.stat(e,(i,n)=>{if(i){r(i);return}const s=n.mtime.getTime();if(s/1e3>=Math.floor(c.startTime/1e3)){u=false}r(null,{path:pathWithCacheContext(t.cacheContext,e),mtime:s})})};a.parallel([e=>a.mapLimit(o,20,f,e),e=>a.mapLimit(d,20,f,e)],(r,i)=>{if(r){s(null,...e);return}if(!u){s(null,...e);return}const[a,o]=i;n(c.cacheKey,{remainingRequest:pathWithCacheContext(t.cacheContext,c.remainingRequest),dependencies:a,contextDependencies:o,result:e},()=>{s(null,...e)})})}function pitch(e,t,r){const n=Object.assign({},b,l(this));p(m,n,{name:"Cache Loader (Pitch)",baseDataPath:"options"});const{cacheContext:s,cacheKey:c,compare:o,read:d,readOnly:u,precision:h}=n;const f=this.async();const y=r;y.remainingRequest=e;y.cacheKey=c(n,y.remainingRequest);d(y.cacheKey,(e,t)=>{if(e){f();return}if(pathWithCacheContext(n.cacheContext,t.remainingRequest)!==y.remainingRequest){f();return}const r=this.fs||i;a.each(t.dependencies.concat(t.contextDependencies),(e,t)=>{const i={...e,path:pathWithCacheContext(n.cacheContext,e.path)};r.stat(i.path,(r,n)=>{if(r){t(r);return}if(u){t();return}const s=n;const a=i;if(h>1){["atime","mtime","ctime","birthtime"].forEach(e=>{const t=`${e}Ms`;const r=roundMs(n[t],h);s[t]=r;s[e]=new Date(r)});a.mtime=roundMs(e.mtime,h)}if(o(s,a)!==true){t(true);return}t()})},e=>{if(e){y.startTime=Date.now();f();return}t.dependencies.forEach(e=>this.addDependency(pathWithCacheContext(s,e.path)));t.contextDependencies.forEach(e=>this.addContextDependency(pathWithCacheContext(s,e.path)));f(null,...t.result)})})}function digest(e){return c.createHash("md5").update(e).digest("hex")}const y=new Set;function write(e,t,r){const n=s.dirname(e);const a=u.stringify(t);if(y.has(n)){i.writeFile(e,a,"utf-8",r)}else{o(n,t=>{if(t){r(t);return}y.add(n);i.writeFile(e,a,"utf-8",r)})}}function read(e,t){i.readFile(e,"utf-8",(e,r)=>{if(e){t(e);return}try{const e=u.parse(r);t(null,e)}catch(e){t(e)}})}function cacheKey(e,t){const{cacheIdentifier:r,cacheDirectory:i}=e;const n=digest(`${r}\n${t}`);return s.join(i,`${n}.json`)}function compare(e,t){return e.mtime.getTime()===t.mtime}const g=true;t.raw=g},417:e=>{"use strict";e.exports=require("crypto")},747:e=>{"use strict";e.exports=require("fs")},710:e=>{"use strict";e.exports=require("loader-utils")},844:e=>{"use strict";e.exports=require("next/dist/compiled/find-cache-dir")},327:e=>{"use strict";e.exports=require("next/dist/compiled/mkdirp")},386:e=>{"use strict";e.exports=require("next/dist/compiled/neo-async")},225:e=>{"use strict";e.exports=require("next/dist/compiled/schema-utils")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var i=t[r]={exports:{}};var n=true;try{e[r](i,i.exports,__webpack_require__);n=false}finally{if(n)delete t[r]}return i.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(296)})(); \ No newline at end of file +module.exports=(()=>{var e={819:e=>{"use strict";e.exports=JSON.parse('{"type":"object","properties":{"cacheContext":{"description":"The default cache context in order to generate the cache relatively to a path. By default it will use absolute paths.","type":"string"},"cacheKey":{"description":"Allows you to override default cache key generator.","instanceof":"Function"},"cacheIdentifier":{"description":"Provide a cache directory where cache items should be stored (used for default read/write implementation).","type":"string"},"cacheDirectory":{"description":"Provide an invalidation identifier which is used to generate the hashes. You can use it for extra dependencies of loaders (used for default read/write implementation).","type":"string"},"compare":{"description":"Allows you to override default comparison function between the cached dependency and the one is being read. Return true to use the cached resource.","instanceof":"Function"},"precision":{"description":"Round mtime by this number of milliseconds both for stats and deps before passing those params to the comparing function.","type":"number"},"read":{"description":"Allows you to override default read cache data from file.","instanceof":"Function"},"readOnly":{"description":"Allows you to override default value and make the cache read only (useful for some environments where you don\'t want the cache to be updated, only read from it).","type":"boolean"},"write":{"description":"Allows you to override default write cache data to file (e.g. Redis, memcached).","instanceof":"Function"}},"additionalProperties":false}')},612:e=>{"use strict";e.exports=JSON.parse('{"name":"cache-loader","version":"4.1.0","description":"Caches the result of following loaders on disk.","license":"MIT","repository":"webpack-contrib/cache-loader","author":"Tobias Koppers @sokra","homepage":"https://github.com/webpack-contrib/cache-loader","bugs":"https://github.com/webpack-contrib/cache-loader/issues","main":"dist/cjs.js","engines":{"node":">= 8.9.0"},"scripts":{"start":"npm run build -- -w","prebuild":"npm run clean","build":"cross-env NODE_ENV=production babel src -d dist --ignore \\"src/**/*.test.js\\" --copy-files","clean":"del-cli dist","commitlint":"commitlint --from=master","lint:prettier":"prettier \\"{**/*,*}.{js,json,md,yml,css}\\" --list-different","lint:js":"eslint --cache src test","lint":"npm-run-all -l -p \\"lint:**\\"","prepare":"npm run build","release":"standard-version","security":"npm audit","test:only":"cross-env NODE_ENV=test jest","test:watch":"cross-env NODE_ENV=test jest --watch","test:coverage":"cross-env NODE_ENV=test jest --collectCoverageFrom=\\"src/**/*.js\\" --coverage","pretest":"npm run lint","test":"cross-env NODE_ENV=test npm run test:coverage","defaults":"webpack-defaults"},"files":["dist"],"peerDependencies":{"webpack":"^4.0.0"},"dependencies":{"buffer-json":"^2.0.0","find-cache-dir":"^3.0.0","loader-utils":"^1.2.3","mkdirp":"^0.5.1","neo-async":"^2.6.1","schema-utils":"^2.0.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","@commitlint/cli":"^8.1.0","@commitlint/config-conventional":"^8.1.0","@webpack-contrib/defaults":"^5.0.2","@webpack-contrib/eslint-config-webpack":"^3.0.0","babel-jest":"^24.8.0","babel-loader":"^8.0.6","commitlint-azure-pipelines-cli":"^1.0.2","cross-env":"^5.2.0","del":"^5.0.0","del-cli":"^2.0.0","eslint":"^6.0.1","eslint-config-prettier":"^6.0.0","eslint-plugin-import":"^2.18.0","file-loader":"^4.1.0","husky":"^3.0.0","jest":"^24.8.0","jest-junit":"^6.4.0","lint-staged":"^9.2.0","memory-fs":"^0.4.1","normalize-path":"^3.0.0","npm-run-all":"^4.1.5","prettier":"^1.18.2","standard-version":"^6.0.1","uuid":"^3.3.2","webpack":"^4.36.1","webpack-cli":"^3.3.6"},"keywords":["webpack"]}')},456:e=>{function stringify(e,t){return JSON.stringify(e,replacer,t)}function parse(e){return JSON.parse(e,reviver)}function replacer(e,t){if(isBufferLike(t)){if(isArray(t.data)){if(t.data.length>0){t.data="base64:"+Buffer.from(t.data).toString("base64")}else{t.data=""}}}return t}function reviver(e,t){if(isBufferLike(t)){if(isArray(t.data)){return Buffer.from(t.data)}else if(isString(t.data)){if(t.data.startsWith("base64:")){return Buffer.from(t.data.slice("base64:".length),"base64")}return Buffer.from(t.data)}}return t}function isBufferLike(e){return isObject(e)&&e.type==="Buffer"&&(isArray(e.data)||isString(e.data))}function isArray(e){return Array.isArray(e)}function isString(e){return typeof e==="string"}function isObject(e){return typeof e==="object"&&e!==null}e.exports={stringify:stringify,parse:parse,replacer:replacer,reviver:reviver}},296:(e,t,r)=>{"use strict";e.exports=r(582)},582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=loader;t.pitch=pitch;t.raw=void 0;const i=r(747);const n=r(87);const s=r(622);const a=r(386);const c=r(417);const o=r(327);const d=r(844);const u=r(456);const{getOptions:l}=r(710);const p=r(225);const h=r(612);const f=process.env.NODE_ENV||"development";const m=r(819);const b={cacheContext:"",cacheDirectory:d({name:"cache-loader"})||n.tmpdir(),cacheIdentifier:`cache-loader:${h.version} ${f}`,cacheKey:cacheKey,compare:compare,precision:0,read:read,readOnly:false,write:write};function pathWithCacheContext(e,t){if(!e){return t}if(t.includes(e)){return t.split("!").map(t=>s.relative(e,t)).join("!")}return t.split("!").map(t=>s.resolve(e,t)).join("!")}function roundMs(e,t){return Math.floor(e/t)*t}function loader(...e){const t=Object.assign({},b,l(this));p(m,t,{name:"Cache Loader",baseDataPath:"options"});const{readOnly:r,write:n}=t;if(r){this.callback(null,...e);return}const s=this.async();const{data:c}=this;const o=this.getDependencies().concat(this.loaders.map(e=>e.path));const d=this.getContextDependencies();let u=true;const h=this.fs||i;const f=(e,r)=>{h.stat(e,(i,n)=>{if(i){r(i);return}const s=n.mtime.getTime();if(s/1e3>=Math.floor(c.startTime/1e3)){u=false}r(null,{path:pathWithCacheContext(t.cacheContext,e),mtime:s})})};a.parallel([e=>a.mapLimit(o,20,f,e),e=>a.mapLimit(d,20,f,e)],(r,i)=>{if(r){s(null,...e);return}if(!u){s(null,...e);return}const[a,o]=i;n(c.cacheKey,{remainingRequest:pathWithCacheContext(t.cacheContext,c.remainingRequest),dependencies:a,contextDependencies:o,result:e},()=>{s(null,...e)})})}function pitch(e,t,r){const n=Object.assign({},b,l(this));p(m,n,{name:"Cache Loader (Pitch)",baseDataPath:"options"});const{cacheContext:s,cacheKey:c,compare:o,read:d,readOnly:u,precision:h}=n;const f=this.async();const y=r;y.remainingRequest=e;y.cacheKey=c(n,y.remainingRequest);d(y.cacheKey,(e,t)=>{if(e){f();return}if(pathWithCacheContext(n.cacheContext,t.remainingRequest)!==y.remainingRequest){f();return}const r=this.fs||i;a.each(t.dependencies.concat(t.contextDependencies),(e,t)=>{const i={...e,path:pathWithCacheContext(n.cacheContext,e.path)};r.stat(i.path,(r,n)=>{if(r){t(r);return}if(u){t();return}const s=n;const a=i;if(h>1){["atime","mtime","ctime","birthtime"].forEach(e=>{const t=`${e}Ms`;const r=roundMs(n[t],h);s[t]=r;s[e]=new Date(r)});a.mtime=roundMs(e.mtime,h)}if(o(s,a)!==true){t(true);return}t()})},e=>{if(e){y.startTime=Date.now();f();return}t.dependencies.forEach(e=>this.addDependency(pathWithCacheContext(s,e.path)));t.contextDependencies.forEach(e=>this.addContextDependency(pathWithCacheContext(s,e.path)));f(null,...t.result)})})}function digest(e){return c.createHash("md5").update(e).digest("hex")}const y=new Set;function write(e,t,r){const n=s.dirname(e);const a=u.stringify(t);if(y.has(n)){i.writeFile(e,a,"utf-8",r)}else{o(n,t=>{if(t){r(t);return}y.add(n);i.writeFile(e,a,"utf-8",r)})}}function read(e,t){i.readFile(e,"utf-8",(e,r)=>{if(e){t(e);return}try{const e=u.parse(r);t(null,e)}catch(e){t(e)}})}function cacheKey(e,t){const{cacheIdentifier:r,cacheDirectory:i}=e;const n=digest(`${r}\n${t}`);return s.join(i,`${n}.json`)}function compare(e,t){return e.mtime.getTime()===t.mtime}const g=true;t.raw=g},417:e=>{"use strict";e.exports=require("crypto")},747:e=>{"use strict";e.exports=require("fs")},710:e=>{"use strict";e.exports=require("loader-utils")},844:e=>{"use strict";e.exports=require("next/dist/compiled/find-cache-dir")},327:e=>{"use strict";e.exports=require("next/dist/compiled/mkdirp")},386:e=>{"use strict";e.exports=require("next/dist/compiled/neo-async")},225:e=>{"use strict";e.exports=require("next/dist/compiled/schema-utils")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var i=t[r]={exports:{}};var n=true;try{e[r](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}return i.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(296)})(); \ No newline at end of file diff --git a/packages/next/compiled/ci-info/index.js b/packages/next/compiled/ci-info/index.js index 6e03cdb7fc321b7..fbb8f93fe5067d1 100644 --- a/packages/next/compiled/ci-info/index.js +++ b/packages/next/compiled/ci-info/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var n={253:n=>{n.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitHub Actions","constant":"GITHUB_ACTIONS","env":"GITHUB_ACTIONS","pr":{"GITHUB_EVENT_NAME":"pull_request"}},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"ZEIT Now","constant":"ZEIT_NOW","env":"NOW_BUILDER"},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Nevercode","constant":"NEVERCODE","env":"NEVERCODE","pr":{"env":"NEVERCODE_PULL_REQUEST","ne":"false"}},{"name":"Render","constant":"RENDER","env":"RENDER","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')},622:(n,e,a)=>{var t=a(253);var E=process.env;Object.defineProperty(e,"_vendors",{value:t.map(function(n){return n.constant})});e.name=null;e.isPR=null;t.forEach(function(n){var a=Array.isArray(n.env)?n.env:[n.env];var t=a.every(function(n){return checkEnv(n)});e[n.constant]=t;if(t){e.name=n.name;switch(typeof n.pr){case"string":e.isPR=!!E[n.pr];break;case"object":if("env"in n.pr){e.isPR=n.pr.env in E&&E[n.pr.env]!==n.pr.ne}else if("any"in n.pr){e.isPR=n.pr.any.some(function(n){return!!E[n]})}else{e.isPR=checkEnv(n.pr)}break;default:e.isPR=null}}});e.isCI=!!(E.CI||E.CONTINUOUS_INTEGRATION||E.BUILD_NUMBER||E.RUN_ID||e.name||false);function checkEnv(n){if(typeof n==="string")return!!E[n];return Object.keys(n).every(function(e){return E[e]===n[e]})}}};var e={};function __webpack_require__(a){if(e[a]){return e[a].exports}var t=e[a]={exports:{}};var E=true;try{n[a](t,t.exports,__webpack_require__);E=false}finally{if(E)delete e[a]}return t.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(622)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var n={253:n=>{n.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitHub Actions","constant":"GITHUB_ACTIONS","env":"GITHUB_ACTIONS","pr":{"GITHUB_EVENT_NAME":"pull_request"}},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"ZEIT Now","constant":"ZEIT_NOW","env":"NOW_BUILDER"},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Nevercode","constant":"NEVERCODE","env":"NEVERCODE","pr":{"env":"NEVERCODE_PULL_REQUEST","ne":"false"}},{"name":"Render","constant":"RENDER","env":"RENDER","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')},622:(n,e,a)=>{var t=a(253);var E=process.env;Object.defineProperty(e,"_vendors",{value:t.map(function(n){return n.constant})});e.name=null;e.isPR=null;t.forEach(function(n){var a=Array.isArray(n.env)?n.env:[n.env];var t=a.every(function(n){return checkEnv(n)});e[n.constant]=t;if(t){e.name=n.name;switch(typeof n.pr){case"string":e.isPR=!!E[n.pr];break;case"object":if("env"in n.pr){e.isPR=n.pr.env in E&&E[n.pr.env]!==n.pr.ne}else if("any"in n.pr){e.isPR=n.pr.any.some(function(n){return!!E[n]})}else{e.isPR=checkEnv(n.pr)}break;default:e.isPR=null}}});e.isCI=!!(E.CI||E.CONTINUOUS_INTEGRATION||E.BUILD_NUMBER||E.RUN_ID||e.name||false);function checkEnv(n){if(typeof n==="string")return!!E[n];return Object.keys(n).every(function(e){return E[e]===n[e]})}}};var e={};function __nccwpck_require__(a){if(e[a]){return e[a].exports}var t=e[a]={exports:{}};var E=true;try{n[a](t,t.exports,__nccwpck_require__);E=false}finally{if(E)delete e[a]}return t.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(622)})(); \ No newline at end of file diff --git a/packages/next/compiled/comment-json/index.js b/packages/next/compiled/comment-json/index.js index 6bc43fa8694f870..634a0915ca3dd3d 100644 --- a/packages/next/compiled/comment-json/index.js +++ b/packages/next/compiled/comment-json/index.js @@ -1 +1 @@ -module.exports=(()=>{var t={210:(t,e,i)=>{const r=i(577);const{isObject:n,isArray:s}=i(334);const a="before";const u="after-prop";const h="after-colon";const o="after-value";const l="after-comma";const c=[a,u,h,o,l];const p=":";const f=undefined;const D=(t,e)=>Symbol.for(t+p+e);const x=(t,e,i,n,s,a)=>{const u=D(s,n);if(!r(e,u)){return}const h=i===n?u:D(s,i);t[h]=e[u];if(a){delete e[u]}};const E=(t,e,i)=>{i.forEach(i=>{if(!r(e,i)){return}t[i]=e[i];c.forEach(r=>{x(t,e,i,i,r)})});return t};const m=(t,e,i)=>{if(e===i){return}c.forEach(n=>{const s=D(n,i);if(!r(t,s)){x(t,t,i,e,n);return}const a=t[s];x(t,t,i,e,n);t[D(n,e)]=a})};const v=t=>{const{length:e}=t;let i=0;const r=e/2;for(;i{c.forEach(s=>{x(t,e,i+r,i,s,n)})};const S=(t,e,i,r,n,s)=>{if(n>0){let a=r;while(a-- >0){C(t,e,i+a,n,s&&a=u)}};class CommentArray extends Array{splice(...t){const{length:e}=this;const i=super.splice(...t);let[r,n,...s]=t;if(r<0){r+=e}if(arguments.length===1){n=e-r}else{n=Math.min(e-r,n)}const{length:a}=s;const u=a-n;const h=r+n;const o=e-h;S(this,this,h,o,u,true);return i}slice(...t){const{length:e}=this;const i=super.slice(...t);if(!i.length){return new CommentArray}let[r,n]=t;if(n===f){n=e}else if(n<0){n+=e}if(r<0){r+=e}else if(r===f){r=0}S(i,this,r,n-r,-r);return i}unshift(...t){const{length:e}=this;const i=super.unshift(...t);const{length:r}=t;if(r>0){S(this,this,0,e,r,true)}return i}shift(){const t=super.shift();const{length:e}=this;S(this,this,1,e,-1,true);return t}reverse(){super.reverse();v(this);return this}pop(){const t=super.pop();const{length:e}=this;c.forEach(t=>{const i=D(t,e);delete this[i]});return t}concat(...t){let{length:e}=this;const i=super.concat(...t);if(!t.length){return i}t.forEach(t=>{const r=e;e+=s(t)?t.length:1;if(!(t instanceof CommentArray)){return}S(i,t,0,t.length,r)});return i}}t.exports={CommentArray:CommentArray,assign(t,e,i){if(!n(t)){throw new TypeError("Cannot convert undefined or null to object")}if(!n(e)){return t}if(i===f){i=Object.keys(e)}else if(!s(i)){throw new TypeError("keys must be array or undefined")}return E(t,e,i)},PREFIX_BEFORE:a,PREFIX_AFTER_PROP:u,PREFIX_AFTER_COLON:h,PREFIX_AFTER_VALUE:o,PREFIX_AFTER_COMMA:l,COLON:p,UNDEFINED:f}},20:(t,e,i)=>{const{parse:r,tokenize:n}=i(762);const s=i(703);const{CommentArray:a,assign:u}=i(210);t.exports={parse:r,stringify:s,tokenize:n,CommentArray:a,assign:u}},762:(t,e,i)=>{const r=i(609);const{CommentArray:n,PREFIX_BEFORE:s,PREFIX_AFTER_PROP:a,PREFIX_AFTER_COLON:u,PREFIX_AFTER_VALUE:h,PREFIX_AFTER_COMMA:o,COLON:l,UNDEFINED:c}=i(210);const p=t=>r.tokenize(t,{comment:true,loc:true});const f=[];let D=null;let x=null;const E=[];let m;let v=false;let C=false;let S=null;let d=null;let y=null;let A;let F=null;const w=()=>{E.length=f.length=0;d=null;m=c};const b=()=>{w();S.length=0;x=D=S=d=y=F=null};const B="before-all";const g="after";const P="after-all";const T="[";const I="]";const M="{";const X="}";const J=",";const k="";const N="-";const L=t=>Symbol.for(m!==c?`${t}:${m}`:t);const O=(t,e)=>F?F(t,e):e;const U=()=>{const t=new SyntaxError(`Unexpected token ${y.value.slice(0,1)}`);Object.assign(t,y.loc.start);throw t};const R=()=>{const t=new SyntaxError("Unexpected end of JSON input");Object.assign(t,d?d.loc.end:{line:1,column:0});throw t};const z=()=>{const t=S[++A];C=y&&t&&y.loc.end.line===t.loc.start.line||false;d=y;y=t};const K=()=>{if(!y){R()}return y.type==="Punctuator"?y.value:y.type};const j=t=>K()===t;const H=t=>{if(!j(t)){U()}};const W=t=>{f.push(D);D=t};const V=()=>{D=f.pop()};const G=()=>{if(!x){return}const t=[];for(const e of x){if(e.inline){t.push(e)}else{break}}const{length:e}=t;if(!e){return}if(e===x.length){x=null}else{x.splice(0,e)}D[L(o)]=t};const Y=t=>{if(!x){return}D[L(t)]=x;x=null};const q=t=>{const e=[];while(y&&(j("LineComment")||j("BlockComment"))){const t={...y,inline:C};e.push(t);z()}if(v){return}if(!e.length){return}if(t){D[L(t)]=e;return}x=e};const $=(t,e)=>{if(e){E.push(m)}m=t};const Q=()=>{m=E.pop()};const Z=()=>{const t={};W(t);$(c,true);let e=false;let i;q();while(!j(X)){if(e){H(J);z();q();G();if(j(X)){break}}e=true;H("String");i=JSON.parse(y.value);$(i);Y(s);z();q(a);H(l);z();q(u);t[i]=O(i,walk());q(h)}z();m=undefined;Y(e?g:s);V();Q();return t};const _=()=>{const t=new n;W(t);$(c,true);let e=false;let i=0;q();while(!j(I)){if(e){H(J);z();q();G();if(j(I)){break}}e=true;$(i);Y(s);t[i]=O(i,walk());q(h);i++}z();m=undefined;Y(e?g:s);V();Q();return t};function walk(){let t=K();if(t===M){z();return Z()}if(t===T){z();return _()}let e=k;if(t===N){z();t=K();e=N}let i;switch(t){case"String":case"Boolean":case"Null":case"Numeric":i=y.value;z();return JSON.parse(e+i);default:}}const tt=t=>Object(t)===t;const et=(t,e,i)=>{w();S=p(t);F=e;v=i;if(!S.length){R()}A=-1;z();W({});q(B);let r=walk();q(P);if(y){U()}if(!i&&r!==null){if(!tt(r)){r=new Object(r)}Object.assign(r,D)}V();r=O("",r);b();return r};t.exports={parse:et,tokenize:p,PREFIX_BEFORE:s,PREFIX_BEFORE_ALL:B,PREFIX_AFTER_PROP:a,PREFIX_AFTER_COLON:u,PREFIX_AFTER_VALUE:h,PREFIX_AFTER_COMMA:o,PREFIX_AFTER:g,PREFIX_AFTER_ALL:P,BRACKET_OPEN:T,BRACKET_CLOSE:I,CURLY_BRACKET_OPEN:M,CURLY_BRACKET_CLOSE:X,COLON:l,COMMA:J,EMPTY:k,UNDEFINED:c}},703:(t,e,i)=>{const{isArray:r,isObject:n,isFunction:s,isNumber:a,isString:u}=i(334);const h=i(332);const{PREFIX_BEFORE_ALL:o,PREFIX_BEFORE:l,PREFIX_AFTER_PROP:c,PREFIX_AFTER_COLON:p,PREFIX_AFTER_VALUE:f,PREFIX_AFTER_COMMA:D,PREFIX_AFTER:x,PREFIX_AFTER_ALL:E,BRACKET_OPEN:m,BRACKET_CLOSE:v,CURLY_BRACKET_OPEN:C,CURLY_BRACKET_CLOSE:S,COLON:d,COMMA:y,EMPTY:A,UNDEFINED:F}=i(762);const w=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;const b=" ";const B="\n";const g="null";const P=t=>`${l}:${t}`;const T=t=>`${c}:${t}`;const I=t=>`${p}:${t}`;const M=t=>`${f}:${t}`;const X=t=>`${D}:${t}`;const J={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};const k=t=>{w.lastIndex=0;if(!w.test(t)){return t}return t.replace(w,t=>{const e=J[t];return typeof e==="string"?e:t})};const N=t=>`"${k(t)}"`;const L=(t,e)=>e?`//${t}`:`/*${t}*/`;const O=(t,e,i,r)=>{const n=t[Symbol.for(e)];if(!n||!n.length){return A}let s=false;const a=n.reduce((t,{inline:e,type:r,value:n})=>{const a=e?b:B+i;s=r==="LineComment";return t+a+L(n,s)},A);return r||s?a+B+i:a};let U=null;let R=A;const z=()=>{U=null;R=A};const K=(t,e,i)=>t?e?t+e.trim()+B+i:t.trimRight()+B+i:e?e.trimRight()+B+i:A;const j=(t,e,i)=>{const r=O(e,l,i+R,true);return K(r,t,i)};const H=(t,e)=>{const i=e+R;const{length:r}=t;let n=A;let s=A;for(let e=0;e{if(!t){return"null"}const i=e+R;let n=A;let s=A;let a=true;const u=r(U)?U:Object.keys(t);const h=e=>{const r=stringify(e,t,i);if(r===F){return}if(!a){n+=y}a=false;const u=K(s,O(t,P(e),i),i);n+=u||B+i;n+=N(e)+O(t,T(e),i)+d+O(t,I(e),i)+b+r+O(t,M(e),i);s=O(t,X(e),i)};u.forEach(h);n+=K(s,O(t,x,i),i);return C+j(n,t,e)+S};function stringify(t,e,i){let a=e[t];if(n(a)&&s(a.toJSON)){a=a.toJSON(t)}if(s(U)){a=U.call(e,t,a)}switch(typeof a){case"string":return N(a);case"number":return Number.isFinite(a)?String(a):g;case"boolean":case"null":return String(a);case"object":return r(a)?H(a,i):W(a,i);default:}}const V=t=>u(t)?t:a(t)?h(b,t):A;const{toString:G}=Object.prototype;const Y=["[object Number]","[object String]","[object Boolean]"];const q=t=>{if(typeof t!=="object"){return false}const e=G.call(t);return Y.includes(e)};t.exports=((t,e,i)=>{const a=V(i);if(!a){return JSON.stringify(t,e)}if(!s(e)&&!r(e)){e=null}U=e;R=a;const u=q(t)?JSON.stringify(t):stringify("",{"":t},A);z();return n(t)?O(t,o,A).trimLeft()+u+O(t,E,A).trimRight():u})},334:(t,e)=>{function isArray(t){if(Array.isArray){return Array.isArray(t)}return objectToString(t)==="[object Array]"}e.isArray=isArray;function isBoolean(t){return typeof t==="boolean"}e.isBoolean=isBoolean;function isNull(t){return t===null}e.isNull=isNull;function isNullOrUndefined(t){return t==null}e.isNullOrUndefined=isNullOrUndefined;function isNumber(t){return typeof t==="number"}e.isNumber=isNumber;function isString(t){return typeof t==="string"}e.isString=isString;function isSymbol(t){return typeof t==="symbol"}e.isSymbol=isSymbol;function isUndefined(t){return t===void 0}e.isUndefined=isUndefined;function isRegExp(t){return objectToString(t)==="[object RegExp]"}e.isRegExp=isRegExp;function isObject(t){return typeof t==="object"&&t!==null}e.isObject=isObject;function isDate(t){return objectToString(t)==="[object Date]"}e.isDate=isDate;function isError(t){return objectToString(t)==="[object Error]"||t instanceof Error}e.isError=isError;function isFunction(t){return typeof t==="function"}e.isFunction=isFunction;function isPrimitive(t){return t===null||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="symbol"||typeof t==="undefined"}e.isPrimitive=isPrimitive;e.isBuffer=Buffer.isBuffer;function objectToString(t){return Object.prototype.toString.call(t)}},609:function(t){(function webpackUniversalModuleDefinition(e,i){if(true)t.exports=i();else{}})(this,function(){return function(t){var e={};function __nested_webpack_require_583__(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:false};t[i].call(r.exports,r,r.exports,__nested_webpack_require_583__);r.loaded=true;return r.exports}__nested_webpack_require_583__.m=t;__nested_webpack_require_583__.c=e;__nested_webpack_require_583__.p="";return __nested_webpack_require_583__(0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(1);var n=i(3);var s=i(8);var a=i(15);function parse(t,e,i){var a=null;var u=function(t,e){if(i){i(t,e)}if(a){a.visit(t,e)}};var h=typeof i==="function"?u:null;var o=false;if(e){o=typeof e.comment==="boolean"&&e.comment;var l=typeof e.attachComment==="boolean"&&e.attachComment;if(o||l){a=new r.CommentHandler;a.attach=l;e.comment=true;h=u}}var c=false;if(e&&typeof e.sourceType==="string"){c=e.sourceType==="module"}var p;if(e&&typeof e.jsx==="boolean"&&e.jsx){p=new n.JSXParser(t,e,h)}else{p=new s.Parser(t,e,h)}var f=c?p.parseModule():p.parseScript();var D=f;if(o&&a){D.comments=a.comments}if(p.config.tokens){D.tokens=p.tokens}if(p.config.tolerant){D.errors=p.errorHandler.errors}return D}e.parse=parse;function parseModule(t,e,i){var r=e||{};r.sourceType="module";return parse(t,r,i)}e.parseModule=parseModule;function parseScript(t,e,i){var r=e||{};r.sourceType="script";return parse(t,r,i)}e.parseScript=parseScript;function tokenize(t,e,i){var r=new a.Tokenizer(t,e);var n;n=[];try{while(true){var s=r.getNextToken();if(!s){break}if(i){s=i(s)}n.push(s)}}catch(t){r.errorHandler.tolerate(t)}if(r.errorHandler.tolerant){n.errors=r.errors()}return n}e.tokenize=tokenize;var u=i(2);e.Syntax=u.Syntax;e.version="4.0.1"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(2);var n=function(){function CommentHandler(){this.attach=false;this.comments=[];this.stack=[];this.leading=[];this.trailing=[]}CommentHandler.prototype.insertInnerComments=function(t,e){if(t.type===r.Syntax.BlockStatement&&t.body.length===0){var i=[];for(var n=this.leading.length-1;n>=0;--n){var s=this.leading[n];if(e.end.offset>=s.start){i.unshift(s.comment);this.leading.splice(n,1);this.trailing.splice(n,1)}}if(i.length){t.innerComments=i}}};CommentHandler.prototype.findTrailingComments=function(t){var e=[];if(this.trailing.length>0){for(var i=this.trailing.length-1;i>=0;--i){var r=this.trailing[i];if(r.start>=t.end.offset){e.unshift(r.comment)}}this.trailing.length=0;return e}var n=this.stack[this.stack.length-1];if(n&&n.node.trailingComments){var s=n.node.trailingComments[0];if(s&&s.range[0]>=t.end.offset){e=n.node.trailingComments;delete n.node.trailingComments}}return e};CommentHandler.prototype.findLeadingComments=function(t){var e=[];var i;while(this.stack.length>0){var r=this.stack[this.stack.length-1];if(r&&r.start>=t.start.offset){i=r.node;this.stack.pop()}else{break}}if(i){var n=i.leadingComments?i.leadingComments.length:0;for(var s=n-1;s>=0;--s){var a=i.leadingComments[s];if(a.range[1]<=t.start.offset){e.unshift(a);i.leadingComments.splice(s,1)}}if(i.leadingComments&&i.leadingComments.length===0){delete i.leadingComments}return e}for(var s=this.leading.length-1;s>=0;--s){var r=this.leading[s];if(r.start<=t.start.offset){e.unshift(r.comment);this.leading.splice(s,1)}}return e};CommentHandler.prototype.visitNode=function(t,e){if(t.type===r.Syntax.Program&&t.body.length>0){return}this.insertInnerComments(t,e);var i=this.findTrailingComments(e);var n=this.findLeadingComments(e);if(n.length>0){t.leadingComments=n}if(i.length>0){t.trailingComments=i}this.stack.push({node:t,start:e.start.offset})};CommentHandler.prototype.visitComment=function(t,e){var i=t.type[0]==="L"?"Line":"Block";var r={type:i,value:t.value};if(t.range){r.range=t.range}if(t.loc){r.loc=t.loc}this.comments.push(r);if(this.attach){var n={comment:{type:i,value:t.value,range:[e.start.offset,e.end.offset]},start:e.start.offset};if(t.loc){n.comment.loc=t.loc}t.type=i;this.leading.push(n);this.trailing.push(n)}};CommentHandler.prototype.visit=function(t,e){if(t.type==="LineComment"){this.visitComment(t,e)}else if(t.type==="BlockComment"){this.visitComment(t,e)}else if(this.attach){this.visitNode(t,e)}};return CommentHandler}();e.CommentHandler=n},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(t,e,i){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(e.hasOwnProperty(i))t[i]=e[i]};return function(e,i){t(e,i);function __(){this.constructor=e}e.prototype=i===null?Object.create(i):(__.prototype=i.prototype,new __)}}();Object.defineProperty(e,"__esModule",{value:true});var n=i(4);var s=i(5);var a=i(6);var u=i(7);var h=i(8);var o=i(13);var l=i(14);o.TokenName[100]="JSXIdentifier";o.TokenName[101]="JSXText";function getQualifiedElementName(t){var e;switch(t.type){case a.JSXSyntax.JSXIdentifier:var i=t;e=i.name;break;case a.JSXSyntax.JSXNamespacedName:var r=t;e=getQualifiedElementName(r.namespace)+":"+getQualifiedElementName(r.name);break;case a.JSXSyntax.JSXMemberExpression:var n=t;e=getQualifiedElementName(n.object)+"."+getQualifiedElementName(n.property);break;default:break}return e}var c=function(t){r(JSXParser,t);function JSXParser(e,i,r){return t.call(this,e,i,r)||this}JSXParser.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():t.prototype.parsePrimaryExpression.call(this)};JSXParser.prototype.startJSX=function(){this.scanner.index=this.startMarker.index;this.scanner.lineNumber=this.startMarker.line;this.scanner.lineStart=this.startMarker.index-this.startMarker.column};JSXParser.prototype.finishJSX=function(){this.nextToken()};JSXParser.prototype.reenterJSX=function(){this.startJSX();this.expectJSX("}");if(this.config.tokens){this.tokens.pop()}};JSXParser.prototype.createJSXNode=function(){this.collectComments();return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.scanXHTMLEntity=function(t){var e="&";var i=true;var r=false;var s=false;var a=false;while(!this.scanner.eof()&&i&&!r){var u=this.scanner.source[this.scanner.index];if(u===t){break}r=u===";";e+=u;++this.scanner.index;if(!r){switch(e.length){case 2:s=u==="#";break;case 3:if(s){a=u==="x";i=a||n.Character.isDecimalDigit(u.charCodeAt(0));s=s&&!a}break;default:i=i&&!(s&&!n.Character.isDecimalDigit(u.charCodeAt(0)));i=i&&!(a&&!n.Character.isHexDigit(u.charCodeAt(0)));break}}}if(i&&r&&e.length>2){var h=e.substr(1,e.length-2);if(s&&h.length>1){e=String.fromCharCode(parseInt(h.substr(1),10))}else if(a&&h.length>2){e=String.fromCharCode(parseInt("0"+h.substr(1),16))}else if(!s&&!a&&l.XHTMLEntities[h]){e=l.XHTMLEntities[h]}}return e};JSXParser.prototype.lexJSX=function(){var t=this.scanner.source.charCodeAt(this.scanner.index);if(t===60||t===62||t===47||t===58||t===61||t===123||t===125){var e=this.scanner.source[this.scanner.index++];return{type:7,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(t===34||t===39){var i=this.scanner.index;var r=this.scanner.source[this.scanner.index++];var s="";while(!this.scanner.eof()){var a=this.scanner.source[this.scanner.index++];if(a===r){break}else if(a==="&"){s+=this.scanXHTMLEntity(r)}else{s+=a}}return{type:8,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}if(t===46){var u=this.scanner.source.charCodeAt(this.scanner.index+1);var h=this.scanner.source.charCodeAt(this.scanner.index+2);var e=u===46&&h===46?"...":".";var i=this.scanner.index;this.scanner.index+=e.length;return{type:7,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}if(t===96){return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index}}if(n.Character.isIdentifierStart(t)&&t!==92){var i=this.scanner.index;++this.scanner.index;while(!this.scanner.eof()){var a=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(a)&&a!==92){++this.scanner.index}else if(a===45){++this.scanner.index}else{break}}var o=this.scanner.source.slice(i,this.scanner.index);return{type:100,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}return this.scanner.lex()};JSXParser.prototype.nextJSXToken=function(){this.collectComments();this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var t=this.lexJSX();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;if(this.config.tokens){this.tokens.push(this.convertToken(t))}return t};JSXParser.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var t=this.scanner.index;var e="";while(!this.scanner.eof()){var i=this.scanner.source[this.scanner.index];if(i==="{"||i==="<"){break}++this.scanner.index;e+=i;if(n.Character.isLineTerminator(i.charCodeAt(0))){++this.scanner.lineNumber;if(i==="\r"&&this.scanner.source[this.scanner.index]==="\n"){++this.scanner.index}this.scanner.lineStart=this.scanner.index}}this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var r={type:101,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index};if(e.length>0&&this.config.tokens){this.tokens.push(this.convertToken(r))}return r};JSXParser.prototype.peekJSXToken=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.lexJSX();this.scanner.restoreState(t);return e};JSXParser.prototype.expectJSX=function(t){var e=this.nextJSXToken();if(e.type!==7||e.value!==t){this.throwUnexpectedToken(e)}};JSXParser.prototype.matchJSX=function(t){var e=this.peekJSXToken();return e.type===7&&e.value===t};JSXParser.prototype.parseJSXIdentifier=function(){var t=this.createJSXNode();var e=this.nextJSXToken();if(e.type!==100){this.throwUnexpectedToken(e)}return this.finalize(t,new s.JSXIdentifier(e.value))};JSXParser.prototype.parseJSXElementName=function(){var t=this.createJSXNode();var e=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=e;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new s.JSXNamespacedName(i,r))}else if(this.matchJSX(".")){while(this.matchJSX(".")){var n=e;this.expectJSX(".");var a=this.parseJSXIdentifier();e=this.finalize(t,new s.JSXMemberExpression(n,a))}}return e};JSXParser.prototype.parseJSXAttributeName=function(){var t=this.createJSXNode();var e;var i=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=i;this.expectJSX(":");var n=this.parseJSXIdentifier();e=this.finalize(t,new s.JSXNamespacedName(r,n))}else{e=i}return e};JSXParser.prototype.parseJSXStringLiteralAttribute=function(){var t=this.createJSXNode();var e=this.nextJSXToken();if(e.type!==8){this.throwUnexpectedToken(e)}var i=this.getTokenRaw(e);return this.finalize(t,new u.Literal(e.value,i))};JSXParser.prototype.parseJSXExpressionAttribute=function(){var t=this.createJSXNode();this.expectJSX("{");this.finishJSX();if(this.match("}")){this.tolerateError("JSX attributes must only be assigned a non-empty expression")}var e=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(t,new s.JSXExpressionContainer(e))};JSXParser.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()};JSXParser.prototype.parseJSXNameValueAttribute=function(){var t=this.createJSXNode();var e=this.parseJSXAttributeName();var i=null;if(this.matchJSX("=")){this.expectJSX("=");i=this.parseJSXAttributeValue()}return this.finalize(t,new s.JSXAttribute(e,i))};JSXParser.prototype.parseJSXSpreadAttribute=function(){var t=this.createJSXNode();this.expectJSX("{");this.expectJSX("...");this.finishJSX();var e=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(t,new s.JSXSpreadAttribute(e))};JSXParser.prototype.parseJSXAttributes=function(){var t=[];while(!this.matchJSX("/")&&!this.matchJSX(">")){var e=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();t.push(e)}return t};JSXParser.prototype.parseJSXOpeningElement=function(){var t=this.createJSXNode();this.expectJSX("<");var e=this.parseJSXElementName();var i=this.parseJSXAttributes();var r=this.matchJSX("/");if(r){this.expectJSX("/")}this.expectJSX(">");return this.finalize(t,new s.JSXOpeningElement(e,r,i))};JSXParser.prototype.parseJSXBoundaryElement=function(){var t=this.createJSXNode();this.expectJSX("<");if(this.matchJSX("/")){this.expectJSX("/");var e=this.parseJSXElementName();this.expectJSX(">");return this.finalize(t,new s.JSXClosingElement(e))}var i=this.parseJSXElementName();var r=this.parseJSXAttributes();var n=this.matchJSX("/");if(n){this.expectJSX("/")}this.expectJSX(">");return this.finalize(t,new s.JSXOpeningElement(i,n,r))};JSXParser.prototype.parseJSXEmptyExpression=function(){var t=this.createJSXChildNode();this.collectComments();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;return this.finalize(t,new s.JSXEmptyExpression)};JSXParser.prototype.parseJSXExpressionContainer=function(){var t=this.createJSXNode();this.expectJSX("{");var e;if(this.matchJSX("}")){e=this.parseJSXEmptyExpression();this.expectJSX("}")}else{this.finishJSX();e=this.parseAssignmentExpression();this.reenterJSX()}return this.finalize(t,new s.JSXExpressionContainer(e))};JSXParser.prototype.parseJSXChildren=function(){var t=[];while(!this.scanner.eof()){var e=this.createJSXChildNode();var i=this.nextJSXText();if(i.start0){var u=this.finalize(t.node,new s.JSXElement(t.opening,t.children,t.closing));t=e[e.length-1];t.children.push(u);e.pop()}else{break}}}return t};JSXParser.prototype.parseJSXElement=function(){var t=this.createJSXNode();var e=this.parseJSXOpeningElement();var i=[];var r=null;if(!e.selfClosing){var n=this.parseComplexJSXElement({node:t,opening:e,closing:r,children:i});i=n.children;r=n.closing}return this.finalize(t,new s.JSXElement(e,i,r))};JSXParser.prototype.parseJSXRoot=function(){if(this.config.tokens){this.tokens.pop()}this.startJSX();var t=this.parseJSXElement();this.finishJSX();return t};JSXParser.prototype.isStartOfExpression=function(){return t.prototype.isStartOfExpression.call(this)||this.match("<")};return JSXParser}(h.Parser);e.JSXParser=c},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});var i={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};e.Character={fromCodePoint:function(t){return t<65536?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10))+String.fromCharCode(56320+(t-65536&1023))},isWhiteSpace:function(t){return t===32||t===9||t===11||t===12||t===160||t>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0},isLineTerminator:function(t){return t===10||t===13||t===8232||t===8233},isIdentifierStart:function(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&i.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(t))},isIdentifierPart:function(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&i.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(t))},isDecimalDigit:function(t){return t>=48&&t<=57},isHexDigit:function(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102},isOctalDigit:function(t){return t>=48&&t<=55}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(6);var n=function(){function JSXClosingElement(t){this.type=r.JSXSyntax.JSXClosingElement;this.name=t}return JSXClosingElement}();e.JSXClosingElement=n;var s=function(){function JSXElement(t,e,i){this.type=r.JSXSyntax.JSXElement;this.openingElement=t;this.children=e;this.closingElement=i}return JSXElement}();e.JSXElement=s;var a=function(){function JSXEmptyExpression(){this.type=r.JSXSyntax.JSXEmptyExpression}return JSXEmptyExpression}();e.JSXEmptyExpression=a;var u=function(){function JSXExpressionContainer(t){this.type=r.JSXSyntax.JSXExpressionContainer;this.expression=t}return JSXExpressionContainer}();e.JSXExpressionContainer=u;var h=function(){function JSXIdentifier(t){this.type=r.JSXSyntax.JSXIdentifier;this.name=t}return JSXIdentifier}();e.JSXIdentifier=h;var o=function(){function JSXMemberExpression(t,e){this.type=r.JSXSyntax.JSXMemberExpression;this.object=t;this.property=e}return JSXMemberExpression}();e.JSXMemberExpression=o;var l=function(){function JSXAttribute(t,e){this.type=r.JSXSyntax.JSXAttribute;this.name=t;this.value=e}return JSXAttribute}();e.JSXAttribute=l;var c=function(){function JSXNamespacedName(t,e){this.type=r.JSXSyntax.JSXNamespacedName;this.namespace=t;this.name=e}return JSXNamespacedName}();e.JSXNamespacedName=c;var p=function(){function JSXOpeningElement(t,e,i){this.type=r.JSXSyntax.JSXOpeningElement;this.name=t;this.selfClosing=e;this.attributes=i}return JSXOpeningElement}();e.JSXOpeningElement=p;var f=function(){function JSXSpreadAttribute(t){this.type=r.JSXSyntax.JSXSpreadAttribute;this.argument=t}return JSXSpreadAttribute}();e.JSXSpreadAttribute=f;var D=function(){function JSXText(t,e){this.type=r.JSXSyntax.JSXText;this.value=t;this.raw=e}return JSXText}();e.JSXText=D},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(2);var n=function(){function ArrayExpression(t){this.type=r.Syntax.ArrayExpression;this.elements=t}return ArrayExpression}();e.ArrayExpression=n;var s=function(){function ArrayPattern(t){this.type=r.Syntax.ArrayPattern;this.elements=t}return ArrayPattern}();e.ArrayPattern=s;var a=function(){function ArrowFunctionExpression(t,e,i){this.type=r.Syntax.ArrowFunctionExpression;this.id=null;this.params=t;this.body=e;this.generator=false;this.expression=i;this.async=false}return ArrowFunctionExpression}();e.ArrowFunctionExpression=a;var u=function(){function AssignmentExpression(t,e,i){this.type=r.Syntax.AssignmentExpression;this.operator=t;this.left=e;this.right=i}return AssignmentExpression}();e.AssignmentExpression=u;var h=function(){function AssignmentPattern(t,e){this.type=r.Syntax.AssignmentPattern;this.left=t;this.right=e}return AssignmentPattern}();e.AssignmentPattern=h;var o=function(){function AsyncArrowFunctionExpression(t,e,i){this.type=r.Syntax.ArrowFunctionExpression;this.id=null;this.params=t;this.body=e;this.generator=false;this.expression=i;this.async=true}return AsyncArrowFunctionExpression}();e.AsyncArrowFunctionExpression=o;var l=function(){function AsyncFunctionDeclaration(t,e,i){this.type=r.Syntax.FunctionDeclaration;this.id=t;this.params=e;this.body=i;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionDeclaration}();e.AsyncFunctionDeclaration=l;var c=function(){function AsyncFunctionExpression(t,e,i){this.type=r.Syntax.FunctionExpression;this.id=t;this.params=e;this.body=i;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionExpression}();e.AsyncFunctionExpression=c;var p=function(){function AwaitExpression(t){this.type=r.Syntax.AwaitExpression;this.argument=t}return AwaitExpression}();e.AwaitExpression=p;var f=function(){function BinaryExpression(t,e,i){var n=t==="||"||t==="&&";this.type=n?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression;this.operator=t;this.left=e;this.right=i}return BinaryExpression}();e.BinaryExpression=f;var D=function(){function BlockStatement(t){this.type=r.Syntax.BlockStatement;this.body=t}return BlockStatement}();e.BlockStatement=D;var x=function(){function BreakStatement(t){this.type=r.Syntax.BreakStatement;this.label=t}return BreakStatement}();e.BreakStatement=x;var E=function(){function CallExpression(t,e){this.type=r.Syntax.CallExpression;this.callee=t;this.arguments=e}return CallExpression}();e.CallExpression=E;var m=function(){function CatchClause(t,e){this.type=r.Syntax.CatchClause;this.param=t;this.body=e}return CatchClause}();e.CatchClause=m;var v=function(){function ClassBody(t){this.type=r.Syntax.ClassBody;this.body=t}return ClassBody}();e.ClassBody=v;var C=function(){function ClassDeclaration(t,e,i){this.type=r.Syntax.ClassDeclaration;this.id=t;this.superClass=e;this.body=i}return ClassDeclaration}();e.ClassDeclaration=C;var S=function(){function ClassExpression(t,e,i){this.type=r.Syntax.ClassExpression;this.id=t;this.superClass=e;this.body=i}return ClassExpression}();e.ClassExpression=S;var d=function(){function ComputedMemberExpression(t,e){this.type=r.Syntax.MemberExpression;this.computed=true;this.object=t;this.property=e}return ComputedMemberExpression}();e.ComputedMemberExpression=d;var y=function(){function ConditionalExpression(t,e,i){this.type=r.Syntax.ConditionalExpression;this.test=t;this.consequent=e;this.alternate=i}return ConditionalExpression}();e.ConditionalExpression=y;var A=function(){function ContinueStatement(t){this.type=r.Syntax.ContinueStatement;this.label=t}return ContinueStatement}();e.ContinueStatement=A;var F=function(){function DebuggerStatement(){this.type=r.Syntax.DebuggerStatement}return DebuggerStatement}();e.DebuggerStatement=F;var w=function(){function Directive(t,e){this.type=r.Syntax.ExpressionStatement;this.expression=t;this.directive=e}return Directive}();e.Directive=w;var b=function(){function DoWhileStatement(t,e){this.type=r.Syntax.DoWhileStatement;this.body=t;this.test=e}return DoWhileStatement}();e.DoWhileStatement=b;var B=function(){function EmptyStatement(){this.type=r.Syntax.EmptyStatement}return EmptyStatement}();e.EmptyStatement=B;var g=function(){function ExportAllDeclaration(t){this.type=r.Syntax.ExportAllDeclaration;this.source=t}return ExportAllDeclaration}();e.ExportAllDeclaration=g;var P=function(){function ExportDefaultDeclaration(t){this.type=r.Syntax.ExportDefaultDeclaration;this.declaration=t}return ExportDefaultDeclaration}();e.ExportDefaultDeclaration=P;var T=function(){function ExportNamedDeclaration(t,e,i){this.type=r.Syntax.ExportNamedDeclaration;this.declaration=t;this.specifiers=e;this.source=i}return ExportNamedDeclaration}();e.ExportNamedDeclaration=T;var I=function(){function ExportSpecifier(t,e){this.type=r.Syntax.ExportSpecifier;this.exported=e;this.local=t}return ExportSpecifier}();e.ExportSpecifier=I;var M=function(){function ExpressionStatement(t){this.type=r.Syntax.ExpressionStatement;this.expression=t}return ExpressionStatement}();e.ExpressionStatement=M;var X=function(){function ForInStatement(t,e,i){this.type=r.Syntax.ForInStatement;this.left=t;this.right=e;this.body=i;this.each=false}return ForInStatement}();e.ForInStatement=X;var J=function(){function ForOfStatement(t,e,i){this.type=r.Syntax.ForOfStatement;this.left=t;this.right=e;this.body=i}return ForOfStatement}();e.ForOfStatement=J;var k=function(){function ForStatement(t,e,i,n){this.type=r.Syntax.ForStatement;this.init=t;this.test=e;this.update=i;this.body=n}return ForStatement}();e.ForStatement=k;var N=function(){function FunctionDeclaration(t,e,i,n){this.type=r.Syntax.FunctionDeclaration;this.id=t;this.params=e;this.body=i;this.generator=n;this.expression=false;this.async=false}return FunctionDeclaration}();e.FunctionDeclaration=N;var L=function(){function FunctionExpression(t,e,i,n){this.type=r.Syntax.FunctionExpression;this.id=t;this.params=e;this.body=i;this.generator=n;this.expression=false;this.async=false}return FunctionExpression}();e.FunctionExpression=L;var O=function(){function Identifier(t){this.type=r.Syntax.Identifier;this.name=t}return Identifier}();e.Identifier=O;var U=function(){function IfStatement(t,e,i){this.type=r.Syntax.IfStatement;this.test=t;this.consequent=e;this.alternate=i}return IfStatement}();e.IfStatement=U;var R=function(){function ImportDeclaration(t,e){this.type=r.Syntax.ImportDeclaration;this.specifiers=t;this.source=e}return ImportDeclaration}();e.ImportDeclaration=R;var z=function(){function ImportDefaultSpecifier(t){this.type=r.Syntax.ImportDefaultSpecifier;this.local=t}return ImportDefaultSpecifier}();e.ImportDefaultSpecifier=z;var K=function(){function ImportNamespaceSpecifier(t){this.type=r.Syntax.ImportNamespaceSpecifier;this.local=t}return ImportNamespaceSpecifier}();e.ImportNamespaceSpecifier=K;var j=function(){function ImportSpecifier(t,e){this.type=r.Syntax.ImportSpecifier;this.local=t;this.imported=e}return ImportSpecifier}();e.ImportSpecifier=j;var H=function(){function LabeledStatement(t,e){this.type=r.Syntax.LabeledStatement;this.label=t;this.body=e}return LabeledStatement}();e.LabeledStatement=H;var W=function(){function Literal(t,e){this.type=r.Syntax.Literal;this.value=t;this.raw=e}return Literal}();e.Literal=W;var V=function(){function MetaProperty(t,e){this.type=r.Syntax.MetaProperty;this.meta=t;this.property=e}return MetaProperty}();e.MetaProperty=V;var G=function(){function MethodDefinition(t,e,i,n,s){this.type=r.Syntax.MethodDefinition;this.key=t;this.computed=e;this.value=i;this.kind=n;this.static=s}return MethodDefinition}();e.MethodDefinition=G;var Y=function(){function Module(t){this.type=r.Syntax.Program;this.body=t;this.sourceType="module"}return Module}();e.Module=Y;var q=function(){function NewExpression(t,e){this.type=r.Syntax.NewExpression;this.callee=t;this.arguments=e}return NewExpression}();e.NewExpression=q;var $=function(){function ObjectExpression(t){this.type=r.Syntax.ObjectExpression;this.properties=t}return ObjectExpression}();e.ObjectExpression=$;var Q=function(){function ObjectPattern(t){this.type=r.Syntax.ObjectPattern;this.properties=t}return ObjectPattern}();e.ObjectPattern=Q;var Z=function(){function Property(t,e,i,n,s,a){this.type=r.Syntax.Property;this.key=e;this.computed=i;this.value=n;this.kind=t;this.method=s;this.shorthand=a}return Property}();e.Property=Z;var _=function(){function RegexLiteral(t,e,i,n){this.type=r.Syntax.Literal;this.value=t;this.raw=e;this.regex={pattern:i,flags:n}}return RegexLiteral}();e.RegexLiteral=_;var tt=function(){function RestElement(t){this.type=r.Syntax.RestElement;this.argument=t}return RestElement}();e.RestElement=tt;var et=function(){function ReturnStatement(t){this.type=r.Syntax.ReturnStatement;this.argument=t}return ReturnStatement}();e.ReturnStatement=et;var it=function(){function Script(t){this.type=r.Syntax.Program;this.body=t;this.sourceType="script"}return Script}();e.Script=it;var rt=function(){function SequenceExpression(t){this.type=r.Syntax.SequenceExpression;this.expressions=t}return SequenceExpression}();e.SequenceExpression=rt;var nt=function(){function SpreadElement(t){this.type=r.Syntax.SpreadElement;this.argument=t}return SpreadElement}();e.SpreadElement=nt;var st=function(){function StaticMemberExpression(t,e){this.type=r.Syntax.MemberExpression;this.computed=false;this.object=t;this.property=e}return StaticMemberExpression}();e.StaticMemberExpression=st;var at=function(){function Super(){this.type=r.Syntax.Super}return Super}();e.Super=at;var ut=function(){function SwitchCase(t,e){this.type=r.Syntax.SwitchCase;this.test=t;this.consequent=e}return SwitchCase}();e.SwitchCase=ut;var ht=function(){function SwitchStatement(t,e){this.type=r.Syntax.SwitchStatement;this.discriminant=t;this.cases=e}return SwitchStatement}();e.SwitchStatement=ht;var ot=function(){function TaggedTemplateExpression(t,e){this.type=r.Syntax.TaggedTemplateExpression;this.tag=t;this.quasi=e}return TaggedTemplateExpression}();e.TaggedTemplateExpression=ot;var lt=function(){function TemplateElement(t,e){this.type=r.Syntax.TemplateElement;this.value=t;this.tail=e}return TemplateElement}();e.TemplateElement=lt;var ct=function(){function TemplateLiteral(t,e){this.type=r.Syntax.TemplateLiteral;this.quasis=t;this.expressions=e}return TemplateLiteral}();e.TemplateLiteral=ct;var pt=function(){function ThisExpression(){this.type=r.Syntax.ThisExpression}return ThisExpression}();e.ThisExpression=pt;var ft=function(){function ThrowStatement(t){this.type=r.Syntax.ThrowStatement;this.argument=t}return ThrowStatement}();e.ThrowStatement=ft;var Dt=function(){function TryStatement(t,e,i){this.type=r.Syntax.TryStatement;this.block=t;this.handler=e;this.finalizer=i}return TryStatement}();e.TryStatement=Dt;var xt=function(){function UnaryExpression(t,e){this.type=r.Syntax.UnaryExpression;this.operator=t;this.argument=e;this.prefix=true}return UnaryExpression}();e.UnaryExpression=xt;var Et=function(){function UpdateExpression(t,e,i){this.type=r.Syntax.UpdateExpression;this.operator=t;this.argument=e;this.prefix=i}return UpdateExpression}();e.UpdateExpression=Et;var mt=function(){function VariableDeclaration(t,e){this.type=r.Syntax.VariableDeclaration;this.declarations=t;this.kind=e}return VariableDeclaration}();e.VariableDeclaration=mt;var vt=function(){function VariableDeclarator(t,e){this.type=r.Syntax.VariableDeclarator;this.id=t;this.init=e}return VariableDeclarator}();e.VariableDeclarator=vt;var Ct=function(){function WhileStatement(t,e){this.type=r.Syntax.WhileStatement;this.test=t;this.body=e}return WhileStatement}();e.WhileStatement=Ct;var St=function(){function WithStatement(t,e){this.type=r.Syntax.WithStatement;this.object=t;this.body=e}return WithStatement}();e.WithStatement=St;var dt=function(){function YieldExpression(t,e){this.type=r.Syntax.YieldExpression;this.argument=t;this.delegate=e}return YieldExpression}();e.YieldExpression=dt},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(9);var n=i(10);var s=i(11);var a=i(7);var u=i(12);var h=i(2);var o=i(13);var l="ArrowParameterPlaceHolder";var c=function(){function Parser(t,e,i){if(e===void 0){e={}}this.config={range:typeof e.range==="boolean"&&e.range,loc:typeof e.loc==="boolean"&&e.loc,source:null,tokens:typeof e.tokens==="boolean"&&e.tokens,comment:typeof e.comment==="boolean"&&e.comment,tolerant:typeof e.tolerant==="boolean"&&e.tolerant};if(this.config.loc&&e.source&&e.source!==null){this.config.source=String(e.source)}this.delegate=i;this.errorHandler=new n.ErrorHandler;this.errorHandler.tolerant=this.config.tolerant;this.scanner=new u.Scanner(t,this.errorHandler);this.scanner.trackComment=this.config.comment;this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11};this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0};this.hasLineTerminator=false;this.context={isModule:false,await:false,allowIn:true,allowStrictDirective:true,allowYield:true,firstCoverInitializedNameError:null,isAssignmentTarget:false,isBindingElement:false,inFunctionBody:false,inIteration:false,inSwitch:false,labelSet:{},strict:false};this.tokens=[];this.startMarker={index:0,line:this.scanner.lineNumber,column:0};this.lastMarker={index:0,line:this.scanner.lineNumber,column:0};this.nextToken();this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}Parser.prototype.throwError=function(t){var e=[];for(var i=1;i0&&this.delegate){for(var e=0;e>="||t===">>>="||t==="&="||t==="^="||t==="|="};Parser.prototype.isolateCoverGrammar=function(t){var e=this.context.isBindingElement;var i=this.context.isAssignmentTarget;var r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=t.call(this);if(this.context.firstCoverInitializedNameError!==null){this.throwUnexpectedToken(this.context.firstCoverInitializedNameError)}this.context.isBindingElement=e;this.context.isAssignmentTarget=i;this.context.firstCoverInitializedNameError=r;return n};Parser.prototype.inheritCoverGrammar=function(t){var e=this.context.isBindingElement;var i=this.context.isAssignmentTarget;var r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=t.call(this);this.context.isBindingElement=this.context.isBindingElement&&e;this.context.isAssignmentTarget=this.context.isAssignmentTarget&&i;this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError;return n};Parser.prototype.consumeSemicolon=function(){if(this.match(";")){this.nextToken()}else if(!this.hasLineTerminator){if(this.lookahead.type!==2&&!this.match("}")){this.throwUnexpectedToken(this.lookahead)}this.lastMarker.index=this.startMarker.index;this.lastMarker.line=this.startMarker.line;this.lastMarker.column=this.startMarker.column}};Parser.prototype.parsePrimaryExpression=function(){var t=this.createNode();var e;var i,r;switch(this.lookahead.type){case 3:if((this.context.isModule||this.context.await)&&this.lookahead.value==="await"){this.tolerateUnexpectedToken(this.lookahead)}e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(t,new a.Identifier(this.nextToken().value));break;case 6:case 8:if(this.context.strict&&this.lookahead.octal){this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral)}this.context.isAssignmentTarget=false;this.context.isBindingElement=false;i=this.nextToken();r=this.getTokenRaw(i);e=this.finalize(t,new a.Literal(i.value,r));break;case 1:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;i=this.nextToken();r=this.getTokenRaw(i);e=this.finalize(t,new a.Literal(i.value==="true",r));break;case 5:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;i=this.nextToken();r=this.getTokenRaw(i);e=this.finalize(t,new a.Literal(null,r));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=false;e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.scanner.index=this.startMarker.index;i=this.nextRegexToken();r=this.getTokenRaw(i);e=this.finalize(t,new a.RegexLiteral(i.regex,r,i.pattern,i.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:if(!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")){e=this.parseIdentifierName()}else if(!this.context.strict&&this.matchKeyword("let")){e=this.finalize(t,new a.Identifier(this.nextToken().value))}else{this.context.isAssignmentTarget=false;this.context.isBindingElement=false;if(this.matchKeyword("function")){e=this.parseFunctionExpression()}else if(this.matchKeyword("this")){this.nextToken();e=this.finalize(t,new a.ThisExpression)}else if(this.matchKeyword("class")){e=this.parseClassExpression()}else{e=this.throwUnexpectedToken(this.nextToken())}}break;default:e=this.throwUnexpectedToken(this.nextToken())}return e};Parser.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var e=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new a.SpreadElement(e))};Parser.prototype.parseArrayInitializer=function(){var t=this.createNode();var e=[];this.expect("[");while(!this.match("]")){if(this.match(",")){this.nextToken();e.push(null)}else if(this.match("...")){var i=this.parseSpreadElement();if(!this.match("]")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.expect(",")}e.push(i)}else{e.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(t,new a.ArrayExpression(e))};Parser.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var e=this.context.strict;var i=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);if(this.context.strict&&t.firstRestricted){this.tolerateUnexpectedToken(t.firstRestricted,t.message)}if(this.context.strict&&t.stricted){this.tolerateUnexpectedToken(t.stricted,t.message)}this.context.strict=e;this.context.allowStrictDirective=i;return r};Parser.prototype.parsePropertyMethodFunction=function(){var t=false;var e=this.createNode();var i=this.context.allowYield;this.context.allowYield=true;var r=this.parseFormalParameters();var n=this.parsePropertyMethod(r);this.context.allowYield=i;return this.finalize(e,new a.FunctionExpression(null,r.params,n,t))};Parser.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode();var e=this.context.allowYield;var i=this.context.await;this.context.allowYield=false;this.context.await=true;var r=this.parseFormalParameters();var n=this.parsePropertyMethod(r);this.context.allowYield=e;this.context.await=i;return this.finalize(t,new a.AsyncFunctionExpression(null,r.params,n))};Parser.prototype.parseObjectPropertyKey=function(){var t=this.createNode();var e=this.nextToken();var i;switch(e.type){case 8:case 6:if(this.context.strict&&e.octal){this.tolerateUnexpectedToken(e,s.Messages.StrictOctalLiteral)}var r=this.getTokenRaw(e);i=this.finalize(t,new a.Literal(e.value,r));break;case 3:case 1:case 5:case 4:i=this.finalize(t,new a.Identifier(e.value));break;case 7:if(e.value==="["){i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.expect("]")}else{i=this.throwUnexpectedToken(e)}break;default:i=this.throwUnexpectedToken(e)}return i};Parser.prototype.isPropertyKey=function(t,e){return t.type===h.Syntax.Identifier&&t.name===e||t.type===h.Syntax.Literal&&t.value===e};Parser.prototype.parseObjectProperty=function(t){var e=this.createNode();var i=this.lookahead;var r;var n=null;var u=null;var h=false;var o=false;var l=false;var c=false;if(i.type===3){var p=i.value;this.nextToken();h=this.match("[");c=!this.hasLineTerminator&&p==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(",");n=c?this.parseObjectPropertyKey():this.finalize(e,new a.Identifier(p))}else if(this.match("*")){this.nextToken()}else{h=this.match("[");n=this.parseObjectPropertyKey()}var f=this.qualifiedPropertyName(this.lookahead);if(i.type===3&&!c&&i.value==="get"&&f){r="get";h=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;u=this.parseGetterMethod()}else if(i.type===3&&!c&&i.value==="set"&&f){r="set";h=this.match("[");n=this.parseObjectPropertyKey();u=this.parseSetterMethod()}else if(i.type===7&&i.value==="*"&&f){r="init";h=this.match("[");n=this.parseObjectPropertyKey();u=this.parseGeneratorMethod();o=true}else{if(!n){this.throwUnexpectedToken(this.lookahead)}r="init";if(this.match(":")&&!c){if(!h&&this.isPropertyKey(n,"__proto__")){if(t.value){this.tolerateError(s.Messages.DuplicateProtoProperty)}t.value=true}this.nextToken();u=this.inheritCoverGrammar(this.parseAssignmentExpression)}else if(this.match("(")){u=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();o=true}else if(i.type===3){var p=this.finalize(e,new a.Identifier(i.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead;this.nextToken();l=true;var D=this.isolateCoverGrammar(this.parseAssignmentExpression);u=this.finalize(e,new a.AssignmentPattern(p,D))}else{l=true;u=p}}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(e,new a.Property(r,n,h,u,o,l))};Parser.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");var e=[];var i={value:false};while(!this.match("}")){e.push(this.parseObjectProperty(i));if(!this.match("}")){this.expectCommaSeparator()}}this.expect("}");return this.finalize(t,new a.ObjectExpression(e))};Parser.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode();var e=this.nextToken();var i=e.value;var n=e.cooked;return this.finalize(t,new a.TemplateElement({raw:i,cooked:n},e.tail))};Parser.prototype.parseTemplateElement=function(){if(this.lookahead.type!==10){this.throwUnexpectedToken()}var t=this.createNode();var e=this.nextToken();var i=e.value;var r=e.cooked;return this.finalize(t,new a.TemplateElement({raw:i,cooked:r},e.tail))};Parser.prototype.parseTemplateLiteral=function(){var t=this.createNode();var e=[];var i=[];var r=this.parseTemplateHead();i.push(r);while(!r.tail){e.push(this.parseExpression());r=this.parseTemplateElement();i.push(r)}return this.finalize(t,new a.TemplateLiteral(i,e))};Parser.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case h.Syntax.Identifier:case h.Syntax.MemberExpression:case h.Syntax.RestElement:case h.Syntax.AssignmentPattern:break;case h.Syntax.SpreadElement:t.type=h.Syntax.RestElement;this.reinterpretExpressionAsPattern(t.argument);break;case h.Syntax.ArrayExpression:t.type=h.Syntax.ArrayPattern;for(var e=0;e")){this.expect("=>")}t={type:l,params:[],async:false}}else{var e=this.lookahead;var i=[];if(this.match("...")){t=this.parseRestElement(i);this.expect(")");if(!this.match("=>")){this.expect("=>")}t={type:l,params:[t],async:false}}else{var r=false;this.context.isBindingElement=true;t=this.inheritCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];this.context.isAssignmentTarget=false;n.push(t);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();if(this.match(")")){this.nextToken();for(var s=0;s")){this.expect("=>")}this.context.isBindingElement=false;for(var s=0;s")){if(t.type===h.Syntax.Identifier&&t.name==="yield"){r=true;t={type:l,params:[t],async:false}}if(!r){if(!this.context.isBindingElement){this.throwUnexpectedToken(this.lookahead)}if(t.type===h.Syntax.SequenceExpression){for(var s=0;s")){for(var h=0;h0){this.nextToken();this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=[t,this.lookahead];var s=e;var u=this.isolateCoverGrammar(this.parseExponentiationExpression);var h=[s,i.value,u];var o=[r];while(true){r=this.binaryPrecedence(this.lookahead);if(r<=0){break}while(h.length>2&&r<=o[o.length-1]){u=h.pop();var l=h.pop();o.pop();s=h.pop();n.pop();var c=this.startNode(n[n.length-1]);h.push(this.finalize(c,new a.BinaryExpression(l,s,u)))}h.push(this.nextToken().value);o.push(r);n.push(this.lookahead);h.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=h.length-1;e=h[p];var f=n.pop();while(p>1){var D=n.pop();var x=f&&f.lineStart;var c=this.startNode(D,x);var l=h[p-1];e=this.finalize(c,new a.BinaryExpression(l,h[p-2],e));p-=2;f=D}}return e};Parser.prototype.parseConditionalExpression=function(){var t=this.lookahead;var e=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var i=this.context.allowIn;this.context.allowIn=true;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=i;this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.ConditionalExpression(e,r,n));this.context.isAssignmentTarget=false;this.context.isBindingElement=false}return e};Parser.prototype.checkPatternParam=function(t,e){switch(e.type){case h.Syntax.Identifier:this.validateParam(t,e,e.name);break;case h.Syntax.RestElement:this.checkPatternParam(t,e.argument);break;case h.Syntax.AssignmentPattern:this.checkPatternParam(t,e.left);break;case h.Syntax.ArrayPattern:for(var i=0;i")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=t.async;var u=this.reinterpretAsCoverFormalsList(t);if(u){if(this.hasLineTerminator){this.tolerateUnexpectedToken(this.lookahead)}this.context.firstCoverInitializedNameError=null;var o=this.context.strict;var c=this.context.allowStrictDirective;this.context.allowStrictDirective=u.simple;var p=this.context.allowYield;var f=this.context.await;this.context.allowYield=true;this.context.await=n;var D=this.startNode(e);this.expect("=>");var x=void 0;if(this.match("{")){var E=this.context.allowIn;this.context.allowIn=true;x=this.parseFunctionSourceElements();this.context.allowIn=E}else{x=this.isolateCoverGrammar(this.parseAssignmentExpression)}var m=x.type!==h.Syntax.BlockStatement;if(this.context.strict&&u.firstRestricted){this.throwUnexpectedToken(u.firstRestricted,u.message)}if(this.context.strict&&u.stricted){this.tolerateUnexpectedToken(u.stricted,u.message)}t=n?this.finalize(D,new a.AsyncArrowFunctionExpression(u.params,x,m)):this.finalize(D,new a.ArrowFunctionExpression(u.params,x,m));this.context.strict=o;this.context.allowStrictDirective=c;this.context.allowYield=p;this.context.await=f}}else{if(this.matchAssign()){if(!this.context.isAssignmentTarget){this.tolerateError(s.Messages.InvalidLHSInAssignment)}if(this.context.strict&&t.type===h.Syntax.Identifier){var v=t;if(this.scanner.isRestrictedWord(v.name)){this.tolerateUnexpectedToken(i,s.Messages.StrictLHSAssignment)}if(this.scanner.isStrictModeReservedWord(v.name)){this.tolerateUnexpectedToken(i,s.Messages.StrictReservedWord)}}if(!this.match("=")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false}else{this.reinterpretExpressionAsPattern(t)}i=this.nextToken();var C=i.value;var S=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.AssignmentExpression(C,t,S));this.context.firstCoverInitializedNameError=null}}}return t};Parser.prototype.parseExpression=function(){var t=this.lookahead;var e=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var i=[];i.push(e);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();i.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}e=this.finalize(this.startNode(t),new a.SequenceExpression(i))}return e};Parser.prototype.parseStatementListItem=function(){var t;this.context.isAssignmentTarget=true;this.context.isBindingElement=true;if(this.lookahead.type===4){switch(this.lookahead.value){case"export":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration)}t=this.parseExportDeclaration();break;case"import":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration)}t=this.parseImportDeclaration();break;case"const":t=this.parseLexicalDeclaration({inFor:false});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:false}):this.parseStatement();break;default:t=this.parseStatement();break}}else{t=this.parseStatement()}return t};Parser.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");var e=[];while(true){if(this.match("}")){break}e.push(this.parseStatementListItem())}this.expect("}");return this.finalize(t,new a.BlockStatement(e))};Parser.prototype.parseLexicalBinding=function(t,e){var i=this.createNode();var r=[];var n=this.parsePattern(r,t);if(this.context.strict&&n.type===h.Syntax.Identifier){if(this.scanner.isRestrictedWord(n.name)){this.tolerateError(s.Messages.StrictVarName)}}var u=null;if(t==="const"){if(!this.matchKeyword("in")&&!this.matchContextualKeyword("of")){if(this.match("=")){this.nextToken();u=this.isolateCoverGrammar(this.parseAssignmentExpression)}else{this.throwError(s.Messages.DeclarationMissingInitializer,"const")}}}else if(!e.inFor&&n.type!==h.Syntax.Identifier||this.match("=")){this.expect("=");u=this.isolateCoverGrammar(this.parseAssignmentExpression)}return this.finalize(i,new a.VariableDeclarator(n,u))};Parser.prototype.parseBindingList=function(t,e){var i=[this.parseLexicalBinding(t,e)];while(this.match(",")){this.nextToken();i.push(this.parseLexicalBinding(t,e))}return i};Parser.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.scanner.lex();this.scanner.restoreState(t);return e.type===3||e.type===7&&e.value==="["||e.type===7&&e.value==="{"||e.type===4&&e.value==="let"||e.type===4&&e.value==="yield"};Parser.prototype.parseLexicalDeclaration=function(t){var e=this.createNode();var i=this.nextToken().value;r.assert(i==="let"||i==="const","Lexical declaration must be either let or const");var n=this.parseBindingList(i,t);this.consumeSemicolon();return this.finalize(e,new a.VariableDeclaration(n,i))};Parser.prototype.parseBindingRestElement=function(t,e){var i=this.createNode();this.expect("...");var r=this.parsePattern(t,e);return this.finalize(i,new a.RestElement(r))};Parser.prototype.parseArrayPattern=function(t,e){var i=this.createNode();this.expect("[");var r=[];while(!this.match("]")){if(this.match(",")){this.nextToken();r.push(null)}else{if(this.match("...")){r.push(this.parseBindingRestElement(t,e));break}else{r.push(this.parsePatternWithDefault(t,e))}if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(i,new a.ArrayPattern(r))};Parser.prototype.parsePropertyPattern=function(t,e){var i=this.createNode();var r=false;var n=false;var s=false;var u;var h;if(this.lookahead.type===3){var o=this.lookahead;u=this.parseVariableIdentifier();var l=this.finalize(i,new a.Identifier(o.value));if(this.match("=")){t.push(o);n=true;this.nextToken();var c=this.parseAssignmentExpression();h=this.finalize(this.startNode(o),new a.AssignmentPattern(l,c))}else if(!this.match(":")){t.push(o);n=true;h=l}else{this.expect(":");h=this.parsePatternWithDefault(t,e)}}else{r=this.match("[");u=this.parseObjectPropertyKey();this.expect(":");h=this.parsePatternWithDefault(t,e)}return this.finalize(i,new a.Property("init",u,r,h,s,n))};Parser.prototype.parseObjectPattern=function(t,e){var i=this.createNode();var r=[];this.expect("{");while(!this.match("}")){r.push(this.parsePropertyPattern(t,e));if(!this.match("}")){this.expect(",")}}this.expect("}");return this.finalize(i,new a.ObjectPattern(r))};Parser.prototype.parsePattern=function(t,e){var i;if(this.match("[")){i=this.parseArrayPattern(t,e)}else if(this.match("{")){i=this.parseObjectPattern(t,e)}else{if(this.matchKeyword("let")&&(e==="const"||e==="let")){this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding)}t.push(this.lookahead);i=this.parseVariableIdentifier(e)}return i};Parser.prototype.parsePatternWithDefault=function(t,e){var i=this.lookahead;var r=this.parsePattern(t,e);if(this.match("=")){this.nextToken();var n=this.context.allowYield;this.context.allowYield=true;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=n;r=this.finalize(this.startNode(i),new a.AssignmentPattern(r,s))}return r};Parser.prototype.parseVariableIdentifier=function(t){var e=this.createNode();var i=this.nextToken();if(i.type===4&&i.value==="yield"){if(this.context.strict){this.tolerateUnexpectedToken(i,s.Messages.StrictReservedWord)}else if(!this.context.allowYield){this.throwUnexpectedToken(i)}}else if(i.type!==3){if(this.context.strict&&i.type===4&&this.scanner.isStrictModeReservedWord(i.value)){this.tolerateUnexpectedToken(i,s.Messages.StrictReservedWord)}else{if(this.context.strict||i.value!=="let"||t!=="var"){this.throwUnexpectedToken(i)}}}else if((this.context.isModule||this.context.await)&&i.type===3&&i.value==="await"){this.tolerateUnexpectedToken(i)}return this.finalize(e,new a.Identifier(i.value))};Parser.prototype.parseVariableDeclaration=function(t){var e=this.createNode();var i=[];var r=this.parsePattern(i,"var");if(this.context.strict&&r.type===h.Syntax.Identifier){if(this.scanner.isRestrictedWord(r.name)){this.tolerateError(s.Messages.StrictVarName)}}var n=null;if(this.match("=")){this.nextToken();n=this.isolateCoverGrammar(this.parseAssignmentExpression)}else if(r.type!==h.Syntax.Identifier&&!t.inFor){this.expect("=")}return this.finalize(e,new a.VariableDeclarator(r,n))};Parser.prototype.parseVariableDeclarationList=function(t){var e={inFor:t.inFor};var i=[];i.push(this.parseVariableDeclaration(e));while(this.match(",")){this.nextToken();i.push(this.parseVariableDeclaration(e))}return i};Parser.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var e=this.parseVariableDeclarationList({inFor:false});this.consumeSemicolon();return this.finalize(t,new a.VariableDeclaration(e,"var"))};Parser.prototype.parseEmptyStatement=function(){var t=this.createNode();this.expect(";");return this.finalize(t,new a.EmptyStatement)};Parser.prototype.parseExpressionStatement=function(){var t=this.createNode();var e=this.parseExpression();this.consumeSemicolon();return this.finalize(t,new a.ExpressionStatement(e))};Parser.prototype.parseIfClause=function(){if(this.context.strict&&this.matchKeyword("function")){this.tolerateError(s.Messages.StrictFunction)}return this.parseStatement()};Parser.prototype.parseIfStatement=function(){var t=this.createNode();var e;var i=null;this.expectKeyword("if");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());e=this.finalize(this.createNode(),new a.EmptyStatement)}else{this.expect(")");e=this.parseIfClause();if(this.matchKeyword("else")){this.nextToken();i=this.parseIfClause()}}return this.finalize(t,new a.IfStatement(r,e,i))};Parser.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var e=this.context.inIteration;this.context.inIteration=true;var i=this.parseStatement();this.context.inIteration=e;this.expectKeyword("while");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken())}else{this.expect(")");if(this.match(";")){this.nextToken()}}return this.finalize(t,new a.DoWhileStatement(i,r))};Parser.prototype.parseWhileStatement=function(){var t=this.createNode();var e;this.expectKeyword("while");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());e=this.finalize(this.createNode(),new a.EmptyStatement)}else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=true;e=this.parseStatement();this.context.inIteration=r}return this.finalize(t,new a.WhileStatement(i,e))};Parser.prototype.parseForStatement=function(){var t=null;var e=null;var i=null;var r=true;var n,u;var o=this.createNode();this.expectKeyword("for");this.expect("(");if(this.match(";")){this.nextToken()}else{if(this.matchKeyword("var")){t=this.createNode();this.nextToken();var l=this.context.allowIn;this.context.allowIn=false;var c=this.parseVariableDeclarationList({inFor:true});this.context.allowIn=l;if(c.length===1&&this.matchKeyword("in")){var p=c[0];if(p.init&&(p.id.type===h.Syntax.ArrayPattern||p.id.type===h.Syntax.ObjectPattern||this.context.strict)){this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in")}t=this.finalize(t,new a.VariableDeclaration(c,"var"));this.nextToken();n=t;u=this.parseExpression();t=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){t=this.finalize(t,new a.VariableDeclaration(c,"var"));this.nextToken();n=t;u=this.parseAssignmentExpression();t=null;r=false}else{t=this.finalize(t,new a.VariableDeclaration(c,"var"));this.expect(";")}}else if(this.matchKeyword("const")||this.matchKeyword("let")){t=this.createNode();var f=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in"){t=this.finalize(t,new a.Identifier(f));this.nextToken();n=t;u=this.parseExpression();t=null}else{var l=this.context.allowIn;this.context.allowIn=false;var c=this.parseBindingList(f,{inFor:true});this.context.allowIn=l;if(c.length===1&&c[0].init===null&&this.matchKeyword("in")){t=this.finalize(t,new a.VariableDeclaration(c,f));this.nextToken();n=t;u=this.parseExpression();t=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){t=this.finalize(t,new a.VariableDeclaration(c,f));this.nextToken();n=t;u=this.parseAssignmentExpression();t=null;r=false}else{this.consumeSemicolon();t=this.finalize(t,new a.VariableDeclaration(c,f))}}}else{var D=this.lookahead;var l=this.context.allowIn;this.context.allowIn=false;t=this.inheritCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=l;if(this.matchKeyword("in")){if(!this.context.isAssignmentTarget||t.type===h.Syntax.AssignmentExpression){this.tolerateError(s.Messages.InvalidLHSInForIn)}this.nextToken();this.reinterpretExpressionAsPattern(t);n=t;u=this.parseExpression();t=null}else if(this.matchContextualKeyword("of")){if(!this.context.isAssignmentTarget||t.type===h.Syntax.AssignmentExpression){this.tolerateError(s.Messages.InvalidLHSInForLoop)}this.nextToken();this.reinterpretExpressionAsPattern(t);n=t;u=this.parseAssignmentExpression();t=null;r=false}else{if(this.match(",")){var x=[t];while(this.match(",")){this.nextToken();x.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}t=this.finalize(this.startNode(D),new a.SequenceExpression(x))}this.expect(";")}}}if(typeof n==="undefined"){if(!this.match(";")){e=this.parseExpression()}this.expect(";");if(!this.match(")")){i=this.parseExpression()}}var E;if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());E=this.finalize(this.createNode(),new a.EmptyStatement)}else{this.expect(")");var m=this.context.inIteration;this.context.inIteration=true;E=this.isolateCoverGrammar(this.parseStatement);this.context.inIteration=m}return typeof n==="undefined"?this.finalize(o,new a.ForStatement(t,e,i,E)):r?this.finalize(o,new a.ForInStatement(n,u,E)):this.finalize(o,new a.ForOfStatement(n,u,E))};Parser.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var e=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var i=this.parseVariableIdentifier();e=i;var r="$"+i.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,r)){this.throwError(s.Messages.UnknownLabel,i.name)}}this.consumeSemicolon();if(e===null&&!this.context.inIteration){this.throwError(s.Messages.IllegalContinue)}return this.finalize(t,new a.ContinueStatement(e))};Parser.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var e=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var i=this.parseVariableIdentifier();var r="$"+i.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,r)){this.throwError(s.Messages.UnknownLabel,i.name)}e=i}this.consumeSemicolon();if(e===null&&!this.context.inIteration&&!this.context.inSwitch){this.throwError(s.Messages.IllegalBreak)}return this.finalize(t,new a.BreakStatement(e))};Parser.prototype.parseReturnStatement=function(){if(!this.context.inFunctionBody){this.tolerateError(s.Messages.IllegalReturn)}var t=this.createNode();this.expectKeyword("return");var e=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10;var i=e?this.parseExpression():null;this.consumeSemicolon();return this.finalize(t,new a.ReturnStatement(i))};Parser.prototype.parseWithStatement=function(){if(this.context.strict){this.tolerateError(s.Messages.StrictModeWith)}var t=this.createNode();var e;this.expectKeyword("with");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());e=this.finalize(this.createNode(),new a.EmptyStatement)}else{this.expect(")");e=this.parseStatement()}return this.finalize(t,new a.WithStatement(i,e))};Parser.prototype.parseSwitchCase=function(){var t=this.createNode();var e;if(this.matchKeyword("default")){this.nextToken();e=null}else{this.expectKeyword("case");e=this.parseExpression()}this.expect(":");var i=[];while(true){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case")){break}i.push(this.parseStatementListItem())}return this.finalize(t,new a.SwitchCase(e,i))};Parser.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch");this.expect("(");var e=this.parseExpression();this.expect(")");var i=this.context.inSwitch;this.context.inSwitch=true;var r=[];var n=false;this.expect("{");while(true){if(this.match("}")){break}var u=this.parseSwitchCase();if(u.test===null){if(n){this.throwError(s.Messages.MultipleDefaultsInSwitch)}n=true}r.push(u)}this.expect("}");this.context.inSwitch=i;return this.finalize(t,new a.SwitchStatement(e,r))};Parser.prototype.parseLabelledStatement=function(){var t=this.createNode();var e=this.parseExpression();var i;if(e.type===h.Syntax.Identifier&&this.match(":")){this.nextToken();var r=e;var n="$"+r.name;if(Object.prototype.hasOwnProperty.call(this.context.labelSet,n)){this.throwError(s.Messages.Redeclaration,"Label",r.name)}this.context.labelSet[n]=true;var u=void 0;if(this.matchKeyword("class")){this.tolerateUnexpectedToken(this.lookahead);u=this.parseClassDeclaration()}else if(this.matchKeyword("function")){var o=this.lookahead;var l=this.parseFunctionDeclaration();if(this.context.strict){this.tolerateUnexpectedToken(o,s.Messages.StrictFunction)}else if(l.generator){this.tolerateUnexpectedToken(o,s.Messages.GeneratorInLegacyContext)}u=l}else{u=this.parseStatement()}delete this.context.labelSet[n];i=new a.LabeledStatement(r,u)}else{this.consumeSemicolon();i=new a.ExpressionStatement(e)}return this.finalize(t,i)};Parser.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw");if(this.hasLineTerminator){this.throwError(s.Messages.NewlineAfterThrow)}var e=this.parseExpression();this.consumeSemicolon();return this.finalize(t,new a.ThrowStatement(e))};Parser.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch");this.expect("(");if(this.match(")")){this.throwUnexpectedToken(this.lookahead)}var e=[];var i=this.parsePattern(e);var r={};for(var n=0;n0){this.tolerateError(s.Messages.BadGetterArity)}var n=this.parsePropertyMethod(r);this.context.allowYield=i;return this.finalize(t,new a.FunctionExpression(null,r.params,n,e))};Parser.prototype.parseSetterMethod=function(){var t=this.createNode();var e=false;var i=this.context.allowYield;this.context.allowYield=!e;var r=this.parseFormalParameters();if(r.params.length!==1){this.tolerateError(s.Messages.BadSetterArity)}else if(r.params[0]instanceof a.RestElement){this.tolerateError(s.Messages.BadSetterRestParameter)}var n=this.parsePropertyMethod(r);this.context.allowYield=i;return this.finalize(t,new a.FunctionExpression(null,r.params,n,e))};Parser.prototype.parseGeneratorMethod=function(){var t=this.createNode();var e=true;var i=this.context.allowYield;this.context.allowYield=true;var r=this.parseFormalParameters();this.context.allowYield=false;var n=this.parsePropertyMethod(r);this.context.allowYield=i;return this.finalize(t,new a.FunctionExpression(null,r.params,n,e))};Parser.prototype.isStartOfExpression=function(){var t=true;var e=this.lookahead.value;switch(this.lookahead.type){case 7:t=e==="["||e==="("||e==="{"||e==="+"||e==="-"||e==="!"||e==="~"||e==="++"||e==="--"||e==="/"||e==="/=";break;case 4:t=e==="class"||e==="delete"||e==="function"||e==="let"||e==="new"||e==="super"||e==="this"||e==="typeof"||e==="void"||e==="yield";break;default:break}return t};Parser.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var e=null;var i=false;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=false;i=this.match("*");if(i){this.nextToken();e=this.parseAssignmentExpression()}else if(this.isStartOfExpression()){e=this.parseAssignmentExpression()}this.context.allowYield=r}return this.finalize(t,new a.YieldExpression(e,i))};Parser.prototype.parseClassElement=function(t){var e=this.lookahead;var i=this.createNode();var r="";var n=null;var u=null;var h=false;var o=false;var l=false;var c=false;if(this.match("*")){this.nextToken()}else{h=this.match("[");n=this.parseObjectPropertyKey();var p=n;if(p.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))){e=this.lookahead;l=true;h=this.match("[");if(this.match("*")){this.nextToken()}else{n=this.parseObjectPropertyKey()}}if(e.type===3&&!this.hasLineTerminator&&e.value==="async"){var f=this.lookahead.value;if(f!==":"&&f!=="("&&f!=="*"){c=true;e=this.lookahead;n=this.parseObjectPropertyKey();if(e.type===3&&e.value==="constructor"){this.tolerateUnexpectedToken(e,s.Messages.ConstructorIsAsync)}}}}var D=this.qualifiedPropertyName(this.lookahead);if(e.type===3){if(e.value==="get"&&D){r="get";h=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;u=this.parseGetterMethod()}else if(e.value==="set"&&D){r="set";h=this.match("[");n=this.parseObjectPropertyKey();u=this.parseSetterMethod()}}else if(e.type===7&&e.value==="*"&&D){r="init";h=this.match("[");n=this.parseObjectPropertyKey();u=this.parseGeneratorMethod();o=true}if(!r&&n&&this.match("(")){r="init";u=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();o=true}if(!r){this.throwUnexpectedToken(this.lookahead)}if(r==="init"){r="method"}if(!h){if(l&&this.isPropertyKey(n,"prototype")){this.throwUnexpectedToken(e,s.Messages.StaticPrototype)}if(!l&&this.isPropertyKey(n,"constructor")){if(r!=="method"||!o||u&&u.generator){this.throwUnexpectedToken(e,s.Messages.ConstructorSpecialMethod)}if(t.value){this.throwUnexpectedToken(e,s.Messages.DuplicateConstructor)}else{t.value=true}r="constructor"}}return this.finalize(i,new a.MethodDefinition(n,h,u,r,l))};Parser.prototype.parseClassElementList=function(){var t=[];var e={value:false};this.expect("{");while(!this.match("}")){if(this.match(";")){this.nextToken()}else{t.push(this.parseClassElement(e))}}this.expect("}");return t};Parser.prototype.parseClassBody=function(){var t=this.createNode();var e=this.parseClassElementList();return this.finalize(t,new a.ClassBody(e))};Parser.prototype.parseClassDeclaration=function(t){var e=this.createNode();var i=this.context.strict;this.context.strict=true;this.expectKeyword("class");var r=t&&this.lookahead.type!==3?null:this.parseVariableIdentifier();var n=null;if(this.matchKeyword("extends")){this.nextToken();n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var s=this.parseClassBody();this.context.strict=i;return this.finalize(e,new a.ClassDeclaration(r,n,s))};Parser.prototype.parseClassExpression=function(){var t=this.createNode();var e=this.context.strict;this.context.strict=true;this.expectKeyword("class");var i=this.lookahead.type===3?this.parseVariableIdentifier():null;var r=null;if(this.matchKeyword("extends")){this.nextToken();r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var n=this.parseClassBody();this.context.strict=e;return this.finalize(t,new a.ClassExpression(i,r,n))};Parser.prototype.parseModule=function(){this.context.strict=true;this.context.isModule=true;this.scanner.isModule=true;var t=this.createNode();var e=this.parseDirectivePrologues();while(this.lookahead.type!==2){e.push(this.parseStatementListItem())}return this.finalize(t,new a.Module(e))};Parser.prototype.parseScript=function(){var t=this.createNode();var e=this.parseDirectivePrologues();while(this.lookahead.type!==2){e.push(this.parseStatementListItem())}return this.finalize(t,new a.Script(e))};Parser.prototype.parseModuleSpecifier=function(){var t=this.createNode();if(this.lookahead.type!==8){this.throwError(s.Messages.InvalidModuleSpecifier)}var e=this.nextToken();var i=this.getTokenRaw(e);return this.finalize(t,new a.Literal(e.value,i))};Parser.prototype.parseImportSpecifier=function(){var t=this.createNode();var e;var i;if(this.lookahead.type===3){e=this.parseVariableIdentifier();i=e;if(this.matchContextualKeyword("as")){this.nextToken();i=this.parseVariableIdentifier()}}else{e=this.parseIdentifierName();i=e;if(this.matchContextualKeyword("as")){this.nextToken();i=this.parseVariableIdentifier()}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(t,new a.ImportSpecifier(i,e))};Parser.prototype.parseNamedImports=function(){this.expect("{");var t=[];while(!this.match("}")){t.push(this.parseImportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");return t};Parser.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode();var e=this.parseIdentifierName();return this.finalize(t,new a.ImportDefaultSpecifier(e))};Parser.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*");if(!this.matchContextualKeyword("as")){this.throwError(s.Messages.NoAsAfterImportNamespace)}this.nextToken();var e=this.parseIdentifierName();return this.finalize(t,new a.ImportNamespaceSpecifier(e))};Parser.prototype.parseImportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(s.Messages.IllegalImportDeclaration)}var t=this.createNode();this.expectKeyword("import");var e;var i=[];if(this.lookahead.type===8){e=this.parseModuleSpecifier()}else{if(this.match("{")){i=i.concat(this.parseNamedImports())}else if(this.match("*")){i.push(this.parseImportNamespaceSpecifier())}else if(this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")){i.push(this.parseImportDefaultSpecifier());if(this.match(",")){this.nextToken();if(this.match("*")){i.push(this.parseImportNamespaceSpecifier())}else if(this.match("{")){i=i.concat(this.parseNamedImports())}else{this.throwUnexpectedToken(this.lookahead)}}}else{this.throwUnexpectedToken(this.nextToken())}if(!this.matchContextualKeyword("from")){var r=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();e=this.parseModuleSpecifier()}this.consumeSemicolon();return this.finalize(t,new a.ImportDeclaration(i,e))};Parser.prototype.parseExportSpecifier=function(){var t=this.createNode();var e=this.parseIdentifierName();var i=e;if(this.matchContextualKeyword("as")){this.nextToken();i=this.parseIdentifierName()}return this.finalize(t,new a.ExportSpecifier(e,i))};Parser.prototype.parseExportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(s.Messages.IllegalExportDeclaration)}var t=this.createNode();this.expectKeyword("export");var e;if(this.matchKeyword("default")){this.nextToken();if(this.matchKeyword("function")){var i=this.parseFunctionDeclaration(true);e=this.finalize(t,new a.ExportDefaultDeclaration(i))}else if(this.matchKeyword("class")){var i=this.parseClassDeclaration(true);e=this.finalize(t,new a.ExportDefaultDeclaration(i))}else if(this.matchContextualKeyword("async")){var i=this.matchAsyncFunction()?this.parseFunctionDeclaration(true):this.parseAssignmentExpression();e=this.finalize(t,new a.ExportDefaultDeclaration(i))}else{if(this.matchContextualKeyword("from")){this.throwError(s.Messages.UnexpectedToken,this.lookahead.value)}var i=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon();e=this.finalize(t,new a.ExportDefaultDeclaration(i))}}else if(this.match("*")){this.nextToken();if(!this.matchContextualKeyword("from")){var r=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var n=this.parseModuleSpecifier();this.consumeSemicolon();e=this.finalize(t,new a.ExportAllDeclaration(n))}else if(this.lookahead.type===4){var i=void 0;switch(this.lookahead.value){case"let":case"const":i=this.parseLexicalDeclaration({inFor:false});break;case"var":case"class":case"function":i=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(i,[],null))}else if(this.matchAsyncFunction()){var i=this.parseFunctionDeclaration();e=this.finalize(t,new a.ExportNamedDeclaration(i,[],null))}else{var u=[];var h=null;var o=false;this.expect("{");while(!this.match("}")){o=o||this.matchKeyword("default");u.push(this.parseExportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");if(this.matchContextualKeyword("from")){this.nextToken();h=this.parseModuleSpecifier();this.consumeSemicolon()}else if(o){var r=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}else{this.consumeSemicolon()}e=this.finalize(t,new a.ExportNamedDeclaration(null,u,h))}return e};return Parser}();e.Parser=c},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});function assert(t,e){if(!t){throw new Error("ASSERT: "+e)}}e.assert=assert},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});var i=function(){function ErrorHandler(){this.errors=[];this.tolerant=false}ErrorHandler.prototype.recordError=function(t){this.errors.push(t)};ErrorHandler.prototype.tolerate=function(t){if(this.tolerant){this.recordError(t)}else{throw t}};ErrorHandler.prototype.constructError=function(t,e){var i=new Error(t);try{throw i}catch(t){if(Object.create&&Object.defineProperty){i=Object.create(t);Object.defineProperty(i,"column",{value:e})}}return i};ErrorHandler.prototype.createError=function(t,e,i,r){var n="Line "+e+": "+r;var s=this.constructError(n,i);s.index=t;s.lineNumber=e;s.description=r;return s};ErrorHandler.prototype.throwError=function(t,e,i,r){throw this.createError(t,e,i,r)};ErrorHandler.prototype.tolerateError=function(t,e,i,r){var n=this.createError(t,e,i,r);if(this.tolerant){this.recordError(n)}else{throw n}};return ErrorHandler}();e.ErrorHandler=i},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(9);var n=i(4);var s=i(11);function hexValue(t){return"0123456789abcdef".indexOf(t.toLowerCase())}function octalValue(t){return"01234567".indexOf(t)}var a=function(){function Scanner(t,e){this.source=t;this.errorHandler=e;this.trackComment=false;this.isModule=false;this.length=t.length;this.index=0;this.lineNumber=t.length>0?1:0;this.lineStart=0;this.curlyStack=[]}Scanner.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}};Scanner.prototype.restoreState=function(t){this.index=t.index;this.lineNumber=t.lineNumber;this.lineStart=t.lineStart};Scanner.prototype.eof=function(){return this.index>=this.length};Scanner.prototype.throwUnexpectedToken=function(t){if(t===void 0){t=s.Messages.UnexpectedTokenIllegal}return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,t)};Scanner.prototype.tolerateUnexpectedToken=function(t){if(t===void 0){t=s.Messages.UnexpectedTokenIllegal}this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,t)};Scanner.prototype.skipSingleLineComment=function(t){var e=[];var i,r;if(this.trackComment){e=[];i=this.index-t;r={start:{line:this.lineNumber,column:this.index-this.lineStart-t},end:{}}}while(!this.eof()){var s=this.source.charCodeAt(this.index);++this.index;if(n.Character.isLineTerminator(s)){if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:false,slice:[i+t,this.index-1],range:[i,this.index-1],loc:r};e.push(a)}if(s===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;return e}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:false,slice:[i+t,this.index],range:[i,this.index],loc:r};e.push(a)}return e};Scanner.prototype.skipMultiLineComment=function(){var t=[];var e,i;if(this.trackComment){t=[];e=this.index-2;i={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}}}while(!this.eof()){var r=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(r)){if(r===13&&this.source.charCodeAt(this.index+1)===10){++this.index}++this.lineNumber;++this.index;this.lineStart=this.index}else if(r===42){if(this.source.charCodeAt(this.index+1)===47){this.index+=2;if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:true,slice:[e+2,this.index-2],range:[e,this.index],loc:i};t.push(s)}return t}++this.index}else{++this.index}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:true,slice:[e+2,this.index],range:[e,this.index],loc:i};t.push(s)}this.tolerateUnexpectedToken();return t};Scanner.prototype.scanComments=function(){var t;if(this.trackComment){t=[]}var e=this.index===0;while(!this.eof()){var i=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(i)){++this.index}else if(n.Character.isLineTerminator(i)){++this.index;if(i===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;e=true}else if(i===47){i=this.source.charCodeAt(this.index+1);if(i===47){this.index+=2;var r=this.skipSingleLineComment(2);if(this.trackComment){t=t.concat(r)}e=true}else if(i===42){this.index+=2;var r=this.skipMultiLineComment();if(this.trackComment){t=t.concat(r)}}else{break}}else if(e&&i===45){if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var r=this.skipSingleLineComment(3);if(this.trackComment){t=t.concat(r)}}else{break}}else if(i===60&&!this.isModule){if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var r=this.skipSingleLineComment(4);if(this.trackComment){t=t.concat(r)}}else{break}}else{break}}return t};Scanner.prototype.isFutureReservedWord=function(t){switch(t){case"enum":case"export":case"import":case"super":return true;default:return false}};Scanner.prototype.isStrictModeReservedWord=function(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}};Scanner.prototype.isRestrictedWord=function(t){return t==="eval"||t==="arguments"};Scanner.prototype.isKeyword=function(t){switch(t.length){case 2:return t==="if"||t==="in"||t==="do";case 3:return t==="var"||t==="for"||t==="new"||t==="try"||t==="let";case 4:return t==="this"||t==="else"||t==="case"||t==="void"||t==="with"||t==="enum";case 5:return t==="while"||t==="break"||t==="catch"||t==="throw"||t==="const"||t==="yield"||t==="class"||t==="super";case 6:return t==="return"||t==="typeof"||t==="delete"||t==="switch"||t==="export"||t==="import";case 7:return t==="default"||t==="finally"||t==="extends";case 8:return t==="function"||t==="continue"||t==="debugger";case 10:return t==="instanceof";default:return false}};Scanner.prototype.codePointAt=function(t){var e=this.source.charCodeAt(t);if(e>=55296&&e<=56319){var i=this.source.charCodeAt(t+1);if(i>=56320&&i<=57343){var r=e;e=(r-55296)*1024+i-56320+65536}}return e};Scanner.prototype.scanHexEscape=function(t){var e=t==="u"?4:2;var i=0;for(var r=0;r1114111||t!=="}"){this.throwUnexpectedToken()}return n.Character.fromCodePoint(e)};Scanner.prototype.getIdentifier=function(){var t=this.index++;while(!this.eof()){var e=this.source.charCodeAt(this.index);if(e===92){this.index=t;return this.getComplexIdentifier()}else if(e>=55296&&e<57343){this.index=t;return this.getComplexIdentifier()}if(n.Character.isIdentifierPart(e)){++this.index}else{break}}return this.source.slice(t,this.index)};Scanner.prototype.getComplexIdentifier=function(){var t=this.codePointAt(this.index);var e=n.Character.fromCodePoint(t);this.index+=e.length;var i;if(t===92){if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;i=this.scanUnicodeCodePointEscape()}else{i=this.scanHexEscape("u");if(i===null||i==="\\"||!n.Character.isIdentifierStart(i.charCodeAt(0))){this.throwUnexpectedToken()}}e=i}while(!this.eof()){t=this.codePointAt(this.index);if(!n.Character.isIdentifierPart(t)){break}i=n.Character.fromCodePoint(t);e+=i;this.index+=i.length;if(t===92){e=e.substr(0,e.length-1);if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;i=this.scanUnicodeCodePointEscape()}else{i=this.scanHexEscape("u");if(i===null||i==="\\"||!n.Character.isIdentifierPart(i.charCodeAt(0))){this.throwUnexpectedToken()}}e+=i}}return e};Scanner.prototype.octalToDecimal=function(t){var e=t!=="0";var i=octalValue(t);if(!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){e=true;i=i*8+octalValue(this.source[this.index++]);if("0123".indexOf(t)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){i=i*8+octalValue(this.source[this.index++])}}return{code:i,octal:e}};Scanner.prototype.scanIdentifier=function(){var t;var e=this.index;var i=this.source.charCodeAt(e)===92?this.getComplexIdentifier():this.getIdentifier();if(i.length===1){t=3}else if(this.isKeyword(i)){t=4}else if(i==="null"){t=5}else if(i==="true"||i==="false"){t=1}else{t=3}if(t!==3&&e+i.length!==this.index){var r=this.index;this.index=e;this.tolerateUnexpectedToken(s.Messages.InvalidEscapedReservedWord);this.index=r}return{type:t,value:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanPunctuator=function(){var t=this.index;var e=this.source[this.index];switch(e){case"(":case"{":if(e==="{"){this.curlyStack.push("{")}++this.index;break;case".":++this.index;if(this.source[this.index]==="."&&this.source[this.index+1]==="."){this.index+=2;e="..."}break;case"}":++this.index;this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:e=this.source.substr(this.index,4);if(e===">>>="){this.index+=4}else{e=e.substr(0,3);if(e==="==="||e==="!=="||e===">>>"||e==="<<="||e===">>="||e==="**="){this.index+=3}else{e=e.substr(0,2);if(e==="&&"||e==="||"||e==="=="||e==="!="||e==="+="||e==="-="||e==="*="||e==="/="||e==="++"||e==="--"||e==="<<"||e===">>"||e==="&="||e==="|="||e==="^="||e==="%="||e==="<="||e===">="||e==="=>"||e==="**"){this.index+=2}else{e=this.source[this.index];if("<>=!+-*%&|^/".indexOf(e)>=0){++this.index}}}}}if(this.index===t){this.throwUnexpectedToken()}return{type:7,value:e,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanHexLiteral=function(t){var e="";while(!this.eof()){if(!n.Character.isHexDigit(this.source.charCodeAt(this.index))){break}e+=this.source[this.index++]}if(e.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt("0x"+e,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanBinaryLiteral=function(t){var e="";var i;while(!this.eof()){i=this.source[this.index];if(i!=="0"&&i!=="1"){break}e+=this.source[this.index++]}if(e.length===0){this.throwUnexpectedToken()}if(!this.eof()){i=this.source.charCodeAt(this.index);if(n.Character.isIdentifierStart(i)||n.Character.isDecimalDigit(i)){this.throwUnexpectedToken()}}return{type:6,value:parseInt(e,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanOctalLiteral=function(t,e){var i="";var r=false;if(n.Character.isOctalDigit(t.charCodeAt(0))){r=true;i="0"+this.source[this.index++]}else{++this.index}while(!this.eof()){if(!n.Character.isOctalDigit(this.source.charCodeAt(this.index))){break}i+=this.source[this.index++]}if(!r&&i.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt(i,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.isImplicitOctalLiteral=function(){for(var t=this.index+1;t=0){r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(t,e,r){var a=parseInt(e||r,16);if(a>1114111){n.throwUnexpectedToken(s.Messages.InvalidRegExp)}if(a<=65535){return String.fromCharCode(a)}return i}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,i)}try{RegExp(r)}catch(t){this.throwUnexpectedToken(s.Messages.InvalidRegExp)}try{return new RegExp(t,e)}catch(t){return null}};Scanner.prototype.scanRegExpBody=function(){var t=this.source[this.index];r.assert(t==="/","Regular expression literal must start with a slash");var e=this.source[this.index++];var i=false;var a=false;while(!this.eof()){t=this.source[this.index++];e+=t;if(t==="\\"){t=this.source[this.index++];if(n.Character.isLineTerminator(t.charCodeAt(0))){this.throwUnexpectedToken(s.Messages.UnterminatedRegExp)}e+=t}else if(n.Character.isLineTerminator(t.charCodeAt(0))){this.throwUnexpectedToken(s.Messages.UnterminatedRegExp)}else if(i){if(t==="]"){i=false}}else{if(t==="/"){a=true;break}else if(t==="["){i=true}}}if(!a){this.throwUnexpectedToken(s.Messages.UnterminatedRegExp)}return e.substr(1,e.length-2)};Scanner.prototype.scanRegExpFlags=function(){var t="";var e="";while(!this.eof()){var i=this.source[this.index];if(!n.Character.isIdentifierPart(i.charCodeAt(0))){break}++this.index;if(i==="\\"&&!this.eof()){i=this.source[this.index];if(i==="u"){++this.index;var r=this.index;var s=this.scanHexEscape("u");if(s!==null){e+=s;for(t+="\\u";r=55296&&t<57343){if(n.Character.isIdentifierStart(this.codePointAt(this.index))){return this.scanIdentifier()}}return this.scanPunctuator()};return Scanner}();e.Scanner=a},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.TokenName={};e.TokenName[1]="Boolean";e.TokenName[2]="";e.TokenName[3]="Identifier";e.TokenName[4]="Keyword";e.TokenName[5]="Null";e.TokenName[6]="Numeric";e.TokenName[7]="Punctuator";e.TokenName[8]="String";e.TokenName[9]="RegularExpression";e.TokenName[10]="Template"},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(10);var n=i(12);var s=i(13);var a=function(){function Reader(){this.values=[];this.curly=this.paren=-1}Reader.prototype.beforeFunctionExpression=function(t){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(t)>=0};Reader.prototype.isRegexStart=function(){var t=this.values[this.values.length-1];var e=t!==null;switch(t){case"this":case"]":e=false;break;case")":var i=this.values[this.paren-1];e=i==="if"||i==="while"||i==="for"||i==="with";break;case"}":e=false;if(this.values[this.curly-3]==="function"){var r=this.values[this.curly-4];e=r?!this.beforeFunctionExpression(r):false}else if(this.values[this.curly-4]==="function"){var r=this.values[this.curly-5];e=r?!this.beforeFunctionExpression(r):true}break;default:break}return e};Reader.prototype.push=function(t){if(t.type===7||t.type===4){if(t.value==="{"){this.curly=this.values.length}else if(t.value==="("){this.paren=this.values.length}this.values.push(t.value)}else{this.values.push(null)}};return Reader}();var u=function(){function Tokenizer(t,e){this.errorHandler=new r.ErrorHandler;this.errorHandler.tolerant=e?typeof e.tolerant==="boolean"&&e.tolerant:false;this.scanner=new n.Scanner(t,this.errorHandler);this.scanner.trackComment=e?typeof e.comment==="boolean"&&e.comment:false;this.trackRange=e?typeof e.range==="boolean"&&e.range:false;this.trackLoc=e?typeof e.loc==="boolean"&&e.loc:false;this.buffer=[];this.reader=new a}Tokenizer.prototype.errors=function(){return this.errorHandler.errors};Tokenizer.prototype.getNextToken=function(){if(this.buffer.length===0){var t=this.scanner.scanComments();if(this.scanner.trackComment){for(var e=0;e{"use strict";const e=Object.prototype.hasOwnProperty;t.exports=((t,i)=>e.call(t,i))},332:t=>{"use strict";var e="";var i;t.exports=repeat;function repeat(t,r){if(typeof t!=="string"){throw new TypeError("expected a string")}if(r===1)return t;if(r===2)return t+t;var n=t.length*r;if(i!==t||typeof i==="undefined"){i=t;e=""}else if(e.length>=n){return e.substr(0,n)}while(n>e.length&&r>1){if(r&1){e+=t}r>>=1;t+=t}e+=t;e=e.substr(0,n);return e}}};var e={};function __webpack_require__(i){if(e[i]){return e[i].exports}var r=e[i]={exports:{}};var n=true;try{t[i].call(r.exports,r,r.exports,__webpack_require__);n=false}finally{if(n)delete e[i]}return r.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(20)})(); \ No newline at end of file +module.exports=(()=>{var t={210:(t,e,i)=>{const r=i(577);const{isObject:n,isArray:s}=i(334);const a="before";const u="after-prop";const h="after-colon";const o="after-value";const l="after-comma";const c=[a,u,h,o,l];const p=":";const f=undefined;const D=(t,e)=>Symbol.for(t+p+e);const x=(t,e,i,n,s,a)=>{const u=D(s,n);if(!r(e,u)){return}const h=i===n?u:D(s,i);t[h]=e[u];if(a){delete e[u]}};const E=(t,e,i)=>{i.forEach(i=>{if(!r(e,i)){return}t[i]=e[i];c.forEach(r=>{x(t,e,i,i,r)})});return t};const m=(t,e,i)=>{if(e===i){return}c.forEach(n=>{const s=D(n,i);if(!r(t,s)){x(t,t,i,e,n);return}const a=t[s];x(t,t,i,e,n);t[D(n,e)]=a})};const v=t=>{const{length:e}=t;let i=0;const r=e/2;for(;i{c.forEach(s=>{x(t,e,i+r,i,s,n)})};const S=(t,e,i,r,n,s)=>{if(n>0){let a=r;while(a-- >0){C(t,e,i+a,n,s&&a=u)}};class CommentArray extends Array{splice(...t){const{length:e}=this;const i=super.splice(...t);let[r,n,...s]=t;if(r<0){r+=e}if(arguments.length===1){n=e-r}else{n=Math.min(e-r,n)}const{length:a}=s;const u=a-n;const h=r+n;const o=e-h;S(this,this,h,o,u,true);return i}slice(...t){const{length:e}=this;const i=super.slice(...t);if(!i.length){return new CommentArray}let[r,n]=t;if(n===f){n=e}else if(n<0){n+=e}if(r<0){r+=e}else if(r===f){r=0}S(i,this,r,n-r,-r);return i}unshift(...t){const{length:e}=this;const i=super.unshift(...t);const{length:r}=t;if(r>0){S(this,this,0,e,r,true)}return i}shift(){const t=super.shift();const{length:e}=this;S(this,this,1,e,-1,true);return t}reverse(){super.reverse();v(this);return this}pop(){const t=super.pop();const{length:e}=this;c.forEach(t=>{const i=D(t,e);delete this[i]});return t}concat(...t){let{length:e}=this;const i=super.concat(...t);if(!t.length){return i}t.forEach(t=>{const r=e;e+=s(t)?t.length:1;if(!(t instanceof CommentArray)){return}S(i,t,0,t.length,r)});return i}}t.exports={CommentArray:CommentArray,assign(t,e,i){if(!n(t)){throw new TypeError("Cannot convert undefined or null to object")}if(!n(e)){return t}if(i===f){i=Object.keys(e)}else if(!s(i)){throw new TypeError("keys must be array or undefined")}return E(t,e,i)},PREFIX_BEFORE:a,PREFIX_AFTER_PROP:u,PREFIX_AFTER_COLON:h,PREFIX_AFTER_VALUE:o,PREFIX_AFTER_COMMA:l,COLON:p,UNDEFINED:f}},20:(t,e,i)=>{const{parse:r,tokenize:n}=i(762);const s=i(703);const{CommentArray:a,assign:u}=i(210);t.exports={parse:r,stringify:s,tokenize:n,CommentArray:a,assign:u}},762:(t,e,i)=>{const r=i(609);const{CommentArray:n,PREFIX_BEFORE:s,PREFIX_AFTER_PROP:a,PREFIX_AFTER_COLON:u,PREFIX_AFTER_VALUE:h,PREFIX_AFTER_COMMA:o,COLON:l,UNDEFINED:c}=i(210);const p=t=>r.tokenize(t,{comment:true,loc:true});const f=[];let D=null;let x=null;const E=[];let m;let v=false;let C=false;let S=null;let d=null;let y=null;let A;let F=null;const w=()=>{E.length=f.length=0;d=null;m=c};const b=()=>{w();S.length=0;x=D=S=d=y=F=null};const B="before-all";const g="after";const P="after-all";const T="[";const I="]";const M="{";const X="}";const J=",";const k="";const N="-";const L=t=>Symbol.for(m!==c?`${t}:${m}`:t);const O=(t,e)=>F?F(t,e):e;const U=()=>{const t=new SyntaxError(`Unexpected token ${y.value.slice(0,1)}`);Object.assign(t,y.loc.start);throw t};const R=()=>{const t=new SyntaxError("Unexpected end of JSON input");Object.assign(t,d?d.loc.end:{line:1,column:0});throw t};const z=()=>{const t=S[++A];C=y&&t&&y.loc.end.line===t.loc.start.line||false;d=y;y=t};const K=()=>{if(!y){R()}return y.type==="Punctuator"?y.value:y.type};const j=t=>K()===t;const H=t=>{if(!j(t)){U()}};const W=t=>{f.push(D);D=t};const V=()=>{D=f.pop()};const G=()=>{if(!x){return}const t=[];for(const e of x){if(e.inline){t.push(e)}else{break}}const{length:e}=t;if(!e){return}if(e===x.length){x=null}else{x.splice(0,e)}D[L(o)]=t};const Y=t=>{if(!x){return}D[L(t)]=x;x=null};const q=t=>{const e=[];while(y&&(j("LineComment")||j("BlockComment"))){const t={...y,inline:C};e.push(t);z()}if(v){return}if(!e.length){return}if(t){D[L(t)]=e;return}x=e};const $=(t,e)=>{if(e){E.push(m)}m=t};const Q=()=>{m=E.pop()};const Z=()=>{const t={};W(t);$(c,true);let e=false;let i;q();while(!j(X)){if(e){H(J);z();q();G();if(j(X)){break}}e=true;H("String");i=JSON.parse(y.value);$(i);Y(s);z();q(a);H(l);z();q(u);t[i]=O(i,walk());q(h)}z();m=undefined;Y(e?g:s);V();Q();return t};const _=()=>{const t=new n;W(t);$(c,true);let e=false;let i=0;q();while(!j(I)){if(e){H(J);z();q();G();if(j(I)){break}}e=true;$(i);Y(s);t[i]=O(i,walk());q(h);i++}z();m=undefined;Y(e?g:s);V();Q();return t};function walk(){let t=K();if(t===M){z();return Z()}if(t===T){z();return _()}let e=k;if(t===N){z();t=K();e=N}let i;switch(t){case"String":case"Boolean":case"Null":case"Numeric":i=y.value;z();return JSON.parse(e+i);default:}}const tt=t=>Object(t)===t;const et=(t,e,i)=>{w();S=p(t);F=e;v=i;if(!S.length){R()}A=-1;z();W({});q(B);let r=walk();q(P);if(y){U()}if(!i&&r!==null){if(!tt(r)){r=new Object(r)}Object.assign(r,D)}V();r=O("",r);b();return r};t.exports={parse:et,tokenize:p,PREFIX_BEFORE:s,PREFIX_BEFORE_ALL:B,PREFIX_AFTER_PROP:a,PREFIX_AFTER_COLON:u,PREFIX_AFTER_VALUE:h,PREFIX_AFTER_COMMA:o,PREFIX_AFTER:g,PREFIX_AFTER_ALL:P,BRACKET_OPEN:T,BRACKET_CLOSE:I,CURLY_BRACKET_OPEN:M,CURLY_BRACKET_CLOSE:X,COLON:l,COMMA:J,EMPTY:k,UNDEFINED:c}},703:(t,e,i)=>{const{isArray:r,isObject:n,isFunction:s,isNumber:a,isString:u}=i(334);const h=i(332);const{PREFIX_BEFORE_ALL:o,PREFIX_BEFORE:l,PREFIX_AFTER_PROP:c,PREFIX_AFTER_COLON:p,PREFIX_AFTER_VALUE:f,PREFIX_AFTER_COMMA:D,PREFIX_AFTER:x,PREFIX_AFTER_ALL:E,BRACKET_OPEN:m,BRACKET_CLOSE:v,CURLY_BRACKET_OPEN:C,CURLY_BRACKET_CLOSE:S,COLON:d,COMMA:y,EMPTY:A,UNDEFINED:F}=i(762);const w=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;const b=" ";const B="\n";const g="null";const P=t=>`${l}:${t}`;const T=t=>`${c}:${t}`;const I=t=>`${p}:${t}`;const M=t=>`${f}:${t}`;const X=t=>`${D}:${t}`;const J={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};const k=t=>{w.lastIndex=0;if(!w.test(t)){return t}return t.replace(w,t=>{const e=J[t];return typeof e==="string"?e:t})};const N=t=>`"${k(t)}"`;const L=(t,e)=>e?`//${t}`:`/*${t}*/`;const O=(t,e,i,r)=>{const n=t[Symbol.for(e)];if(!n||!n.length){return A}let s=false;const a=n.reduce((t,{inline:e,type:r,value:n})=>{const a=e?b:B+i;s=r==="LineComment";return t+a+L(n,s)},A);return r||s?a+B+i:a};let U=null;let R=A;const z=()=>{U=null;R=A};const K=(t,e,i)=>t?e?t+e.trim()+B+i:t.trimRight()+B+i:e?e.trimRight()+B+i:A;const j=(t,e,i)=>{const r=O(e,l,i+R,true);return K(r,t,i)};const H=(t,e)=>{const i=e+R;const{length:r}=t;let n=A;let s=A;for(let e=0;e{if(!t){return"null"}const i=e+R;let n=A;let s=A;let a=true;const u=r(U)?U:Object.keys(t);const h=e=>{const r=stringify(e,t,i);if(r===F){return}if(!a){n+=y}a=false;const u=K(s,O(t,P(e),i),i);n+=u||B+i;n+=N(e)+O(t,T(e),i)+d+O(t,I(e),i)+b+r+O(t,M(e),i);s=O(t,X(e),i)};u.forEach(h);n+=K(s,O(t,x,i),i);return C+j(n,t,e)+S};function stringify(t,e,i){let a=e[t];if(n(a)&&s(a.toJSON)){a=a.toJSON(t)}if(s(U)){a=U.call(e,t,a)}switch(typeof a){case"string":return N(a);case"number":return Number.isFinite(a)?String(a):g;case"boolean":case"null":return String(a);case"object":return r(a)?H(a,i):W(a,i);default:}}const V=t=>u(t)?t:a(t)?h(b,t):A;const{toString:G}=Object.prototype;const Y=["[object Number]","[object String]","[object Boolean]"];const q=t=>{if(typeof t!=="object"){return false}const e=G.call(t);return Y.includes(e)};t.exports=((t,e,i)=>{const a=V(i);if(!a){return JSON.stringify(t,e)}if(!s(e)&&!r(e)){e=null}U=e;R=a;const u=q(t)?JSON.stringify(t):stringify("",{"":t},A);z();return n(t)?O(t,o,A).trimLeft()+u+O(t,E,A).trimRight():u})},334:(t,e)=>{function isArray(t){if(Array.isArray){return Array.isArray(t)}return objectToString(t)==="[object Array]"}e.isArray=isArray;function isBoolean(t){return typeof t==="boolean"}e.isBoolean=isBoolean;function isNull(t){return t===null}e.isNull=isNull;function isNullOrUndefined(t){return t==null}e.isNullOrUndefined=isNullOrUndefined;function isNumber(t){return typeof t==="number"}e.isNumber=isNumber;function isString(t){return typeof t==="string"}e.isString=isString;function isSymbol(t){return typeof t==="symbol"}e.isSymbol=isSymbol;function isUndefined(t){return t===void 0}e.isUndefined=isUndefined;function isRegExp(t){return objectToString(t)==="[object RegExp]"}e.isRegExp=isRegExp;function isObject(t){return typeof t==="object"&&t!==null}e.isObject=isObject;function isDate(t){return objectToString(t)==="[object Date]"}e.isDate=isDate;function isError(t){return objectToString(t)==="[object Error]"||t instanceof Error}e.isError=isError;function isFunction(t){return typeof t==="function"}e.isFunction=isFunction;function isPrimitive(t){return t===null||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="symbol"||typeof t==="undefined"}e.isPrimitive=isPrimitive;e.isBuffer=Buffer.isBuffer;function objectToString(t){return Object.prototype.toString.call(t)}},609:function(t){(function webpackUniversalModuleDefinition(e,i){if(true)t.exports=i();else{}})(this,function(){return function(t){var e={};function __nested_webpack_require_583__(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:false};t[i].call(r.exports,r,r.exports,__nested_webpack_require_583__);r.loaded=true;return r.exports}__nested_webpack_require_583__.m=t;__nested_webpack_require_583__.c=e;__nested_webpack_require_583__.p="";return __nested_webpack_require_583__(0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(1);var n=i(3);var s=i(8);var a=i(15);function parse(t,e,i){var a=null;var u=function(t,e){if(i){i(t,e)}if(a){a.visit(t,e)}};var h=typeof i==="function"?u:null;var o=false;if(e){o=typeof e.comment==="boolean"&&e.comment;var l=typeof e.attachComment==="boolean"&&e.attachComment;if(o||l){a=new r.CommentHandler;a.attach=l;e.comment=true;h=u}}var c=false;if(e&&typeof e.sourceType==="string"){c=e.sourceType==="module"}var p;if(e&&typeof e.jsx==="boolean"&&e.jsx){p=new n.JSXParser(t,e,h)}else{p=new s.Parser(t,e,h)}var f=c?p.parseModule():p.parseScript();var D=f;if(o&&a){D.comments=a.comments}if(p.config.tokens){D.tokens=p.tokens}if(p.config.tolerant){D.errors=p.errorHandler.errors}return D}e.parse=parse;function parseModule(t,e,i){var r=e||{};r.sourceType="module";return parse(t,r,i)}e.parseModule=parseModule;function parseScript(t,e,i){var r=e||{};r.sourceType="script";return parse(t,r,i)}e.parseScript=parseScript;function tokenize(t,e,i){var r=new a.Tokenizer(t,e);var n;n=[];try{while(true){var s=r.getNextToken();if(!s){break}if(i){s=i(s)}n.push(s)}}catch(t){r.errorHandler.tolerate(t)}if(r.errorHandler.tolerant){n.errors=r.errors()}return n}e.tokenize=tokenize;var u=i(2);e.Syntax=u.Syntax;e.version="4.0.1"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(2);var n=function(){function CommentHandler(){this.attach=false;this.comments=[];this.stack=[];this.leading=[];this.trailing=[]}CommentHandler.prototype.insertInnerComments=function(t,e){if(t.type===r.Syntax.BlockStatement&&t.body.length===0){var i=[];for(var n=this.leading.length-1;n>=0;--n){var s=this.leading[n];if(e.end.offset>=s.start){i.unshift(s.comment);this.leading.splice(n,1);this.trailing.splice(n,1)}}if(i.length){t.innerComments=i}}};CommentHandler.prototype.findTrailingComments=function(t){var e=[];if(this.trailing.length>0){for(var i=this.trailing.length-1;i>=0;--i){var r=this.trailing[i];if(r.start>=t.end.offset){e.unshift(r.comment)}}this.trailing.length=0;return e}var n=this.stack[this.stack.length-1];if(n&&n.node.trailingComments){var s=n.node.trailingComments[0];if(s&&s.range[0]>=t.end.offset){e=n.node.trailingComments;delete n.node.trailingComments}}return e};CommentHandler.prototype.findLeadingComments=function(t){var e=[];var i;while(this.stack.length>0){var r=this.stack[this.stack.length-1];if(r&&r.start>=t.start.offset){i=r.node;this.stack.pop()}else{break}}if(i){var n=i.leadingComments?i.leadingComments.length:0;for(var s=n-1;s>=0;--s){var a=i.leadingComments[s];if(a.range[1]<=t.start.offset){e.unshift(a);i.leadingComments.splice(s,1)}}if(i.leadingComments&&i.leadingComments.length===0){delete i.leadingComments}return e}for(var s=this.leading.length-1;s>=0;--s){var r=this.leading[s];if(r.start<=t.start.offset){e.unshift(r.comment);this.leading.splice(s,1)}}return e};CommentHandler.prototype.visitNode=function(t,e){if(t.type===r.Syntax.Program&&t.body.length>0){return}this.insertInnerComments(t,e);var i=this.findTrailingComments(e);var n=this.findLeadingComments(e);if(n.length>0){t.leadingComments=n}if(i.length>0){t.trailingComments=i}this.stack.push({node:t,start:e.start.offset})};CommentHandler.prototype.visitComment=function(t,e){var i=t.type[0]==="L"?"Line":"Block";var r={type:i,value:t.value};if(t.range){r.range=t.range}if(t.loc){r.loc=t.loc}this.comments.push(r);if(this.attach){var n={comment:{type:i,value:t.value,range:[e.start.offset,e.end.offset]},start:e.start.offset};if(t.loc){n.comment.loc=t.loc}t.type=i;this.leading.push(n);this.trailing.push(n)}};CommentHandler.prototype.visit=function(t,e){if(t.type==="LineComment"){this.visitComment(t,e)}else if(t.type==="BlockComment"){this.visitComment(t,e)}else if(this.attach){this.visitNode(t,e)}};return CommentHandler}();e.CommentHandler=n},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(t,e,i){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(e.hasOwnProperty(i))t[i]=e[i]};return function(e,i){t(e,i);function __(){this.constructor=e}e.prototype=i===null?Object.create(i):(__.prototype=i.prototype,new __)}}();Object.defineProperty(e,"__esModule",{value:true});var n=i(4);var s=i(5);var a=i(6);var u=i(7);var h=i(8);var o=i(13);var l=i(14);o.TokenName[100]="JSXIdentifier";o.TokenName[101]="JSXText";function getQualifiedElementName(t){var e;switch(t.type){case a.JSXSyntax.JSXIdentifier:var i=t;e=i.name;break;case a.JSXSyntax.JSXNamespacedName:var r=t;e=getQualifiedElementName(r.namespace)+":"+getQualifiedElementName(r.name);break;case a.JSXSyntax.JSXMemberExpression:var n=t;e=getQualifiedElementName(n.object)+"."+getQualifiedElementName(n.property);break;default:break}return e}var c=function(t){r(JSXParser,t);function JSXParser(e,i,r){return t.call(this,e,i,r)||this}JSXParser.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():t.prototype.parsePrimaryExpression.call(this)};JSXParser.prototype.startJSX=function(){this.scanner.index=this.startMarker.index;this.scanner.lineNumber=this.startMarker.line;this.scanner.lineStart=this.startMarker.index-this.startMarker.column};JSXParser.prototype.finishJSX=function(){this.nextToken()};JSXParser.prototype.reenterJSX=function(){this.startJSX();this.expectJSX("}");if(this.config.tokens){this.tokens.pop()}};JSXParser.prototype.createJSXNode=function(){this.collectComments();return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.scanXHTMLEntity=function(t){var e="&";var i=true;var r=false;var s=false;var a=false;while(!this.scanner.eof()&&i&&!r){var u=this.scanner.source[this.scanner.index];if(u===t){break}r=u===";";e+=u;++this.scanner.index;if(!r){switch(e.length){case 2:s=u==="#";break;case 3:if(s){a=u==="x";i=a||n.Character.isDecimalDigit(u.charCodeAt(0));s=s&&!a}break;default:i=i&&!(s&&!n.Character.isDecimalDigit(u.charCodeAt(0)));i=i&&!(a&&!n.Character.isHexDigit(u.charCodeAt(0)));break}}}if(i&&r&&e.length>2){var h=e.substr(1,e.length-2);if(s&&h.length>1){e=String.fromCharCode(parseInt(h.substr(1),10))}else if(a&&h.length>2){e=String.fromCharCode(parseInt("0"+h.substr(1),16))}else if(!s&&!a&&l.XHTMLEntities[h]){e=l.XHTMLEntities[h]}}return e};JSXParser.prototype.lexJSX=function(){var t=this.scanner.source.charCodeAt(this.scanner.index);if(t===60||t===62||t===47||t===58||t===61||t===123||t===125){var e=this.scanner.source[this.scanner.index++];return{type:7,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(t===34||t===39){var i=this.scanner.index;var r=this.scanner.source[this.scanner.index++];var s="";while(!this.scanner.eof()){var a=this.scanner.source[this.scanner.index++];if(a===r){break}else if(a==="&"){s+=this.scanXHTMLEntity(r)}else{s+=a}}return{type:8,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}if(t===46){var u=this.scanner.source.charCodeAt(this.scanner.index+1);var h=this.scanner.source.charCodeAt(this.scanner.index+2);var e=u===46&&h===46?"...":".";var i=this.scanner.index;this.scanner.index+=e.length;return{type:7,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}if(t===96){return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index}}if(n.Character.isIdentifierStart(t)&&t!==92){var i=this.scanner.index;++this.scanner.index;while(!this.scanner.eof()){var a=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(a)&&a!==92){++this.scanner.index}else if(a===45){++this.scanner.index}else{break}}var o=this.scanner.source.slice(i,this.scanner.index);return{type:100,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}return this.scanner.lex()};JSXParser.prototype.nextJSXToken=function(){this.collectComments();this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var t=this.lexJSX();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;if(this.config.tokens){this.tokens.push(this.convertToken(t))}return t};JSXParser.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var t=this.scanner.index;var e="";while(!this.scanner.eof()){var i=this.scanner.source[this.scanner.index];if(i==="{"||i==="<"){break}++this.scanner.index;e+=i;if(n.Character.isLineTerminator(i.charCodeAt(0))){++this.scanner.lineNumber;if(i==="\r"&&this.scanner.source[this.scanner.index]==="\n"){++this.scanner.index}this.scanner.lineStart=this.scanner.index}}this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var r={type:101,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index};if(e.length>0&&this.config.tokens){this.tokens.push(this.convertToken(r))}return r};JSXParser.prototype.peekJSXToken=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.lexJSX();this.scanner.restoreState(t);return e};JSXParser.prototype.expectJSX=function(t){var e=this.nextJSXToken();if(e.type!==7||e.value!==t){this.throwUnexpectedToken(e)}};JSXParser.prototype.matchJSX=function(t){var e=this.peekJSXToken();return e.type===7&&e.value===t};JSXParser.prototype.parseJSXIdentifier=function(){var t=this.createJSXNode();var e=this.nextJSXToken();if(e.type!==100){this.throwUnexpectedToken(e)}return this.finalize(t,new s.JSXIdentifier(e.value))};JSXParser.prototype.parseJSXElementName=function(){var t=this.createJSXNode();var e=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=e;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new s.JSXNamespacedName(i,r))}else if(this.matchJSX(".")){while(this.matchJSX(".")){var n=e;this.expectJSX(".");var a=this.parseJSXIdentifier();e=this.finalize(t,new s.JSXMemberExpression(n,a))}}return e};JSXParser.prototype.parseJSXAttributeName=function(){var t=this.createJSXNode();var e;var i=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=i;this.expectJSX(":");var n=this.parseJSXIdentifier();e=this.finalize(t,new s.JSXNamespacedName(r,n))}else{e=i}return e};JSXParser.prototype.parseJSXStringLiteralAttribute=function(){var t=this.createJSXNode();var e=this.nextJSXToken();if(e.type!==8){this.throwUnexpectedToken(e)}var i=this.getTokenRaw(e);return this.finalize(t,new u.Literal(e.value,i))};JSXParser.prototype.parseJSXExpressionAttribute=function(){var t=this.createJSXNode();this.expectJSX("{");this.finishJSX();if(this.match("}")){this.tolerateError("JSX attributes must only be assigned a non-empty expression")}var e=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(t,new s.JSXExpressionContainer(e))};JSXParser.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()};JSXParser.prototype.parseJSXNameValueAttribute=function(){var t=this.createJSXNode();var e=this.parseJSXAttributeName();var i=null;if(this.matchJSX("=")){this.expectJSX("=");i=this.parseJSXAttributeValue()}return this.finalize(t,new s.JSXAttribute(e,i))};JSXParser.prototype.parseJSXSpreadAttribute=function(){var t=this.createJSXNode();this.expectJSX("{");this.expectJSX("...");this.finishJSX();var e=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(t,new s.JSXSpreadAttribute(e))};JSXParser.prototype.parseJSXAttributes=function(){var t=[];while(!this.matchJSX("/")&&!this.matchJSX(">")){var e=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();t.push(e)}return t};JSXParser.prototype.parseJSXOpeningElement=function(){var t=this.createJSXNode();this.expectJSX("<");var e=this.parseJSXElementName();var i=this.parseJSXAttributes();var r=this.matchJSX("/");if(r){this.expectJSX("/")}this.expectJSX(">");return this.finalize(t,new s.JSXOpeningElement(e,r,i))};JSXParser.prototype.parseJSXBoundaryElement=function(){var t=this.createJSXNode();this.expectJSX("<");if(this.matchJSX("/")){this.expectJSX("/");var e=this.parseJSXElementName();this.expectJSX(">");return this.finalize(t,new s.JSXClosingElement(e))}var i=this.parseJSXElementName();var r=this.parseJSXAttributes();var n=this.matchJSX("/");if(n){this.expectJSX("/")}this.expectJSX(">");return this.finalize(t,new s.JSXOpeningElement(i,n,r))};JSXParser.prototype.parseJSXEmptyExpression=function(){var t=this.createJSXChildNode();this.collectComments();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;return this.finalize(t,new s.JSXEmptyExpression)};JSXParser.prototype.parseJSXExpressionContainer=function(){var t=this.createJSXNode();this.expectJSX("{");var e;if(this.matchJSX("}")){e=this.parseJSXEmptyExpression();this.expectJSX("}")}else{this.finishJSX();e=this.parseAssignmentExpression();this.reenterJSX()}return this.finalize(t,new s.JSXExpressionContainer(e))};JSXParser.prototype.parseJSXChildren=function(){var t=[];while(!this.scanner.eof()){var e=this.createJSXChildNode();var i=this.nextJSXText();if(i.start0){var u=this.finalize(t.node,new s.JSXElement(t.opening,t.children,t.closing));t=e[e.length-1];t.children.push(u);e.pop()}else{break}}}return t};JSXParser.prototype.parseJSXElement=function(){var t=this.createJSXNode();var e=this.parseJSXOpeningElement();var i=[];var r=null;if(!e.selfClosing){var n=this.parseComplexJSXElement({node:t,opening:e,closing:r,children:i});i=n.children;r=n.closing}return this.finalize(t,new s.JSXElement(e,i,r))};JSXParser.prototype.parseJSXRoot=function(){if(this.config.tokens){this.tokens.pop()}this.startJSX();var t=this.parseJSXElement();this.finishJSX();return t};JSXParser.prototype.isStartOfExpression=function(){return t.prototype.isStartOfExpression.call(this)||this.match("<")};return JSXParser}(h.Parser);e.JSXParser=c},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});var i={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};e.Character={fromCodePoint:function(t){return t<65536?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10))+String.fromCharCode(56320+(t-65536&1023))},isWhiteSpace:function(t){return t===32||t===9||t===11||t===12||t===160||t>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0},isLineTerminator:function(t){return t===10||t===13||t===8232||t===8233},isIdentifierStart:function(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&i.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(t))},isIdentifierPart:function(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&i.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(t))},isDecimalDigit:function(t){return t>=48&&t<=57},isHexDigit:function(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102},isOctalDigit:function(t){return t>=48&&t<=55}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(6);var n=function(){function JSXClosingElement(t){this.type=r.JSXSyntax.JSXClosingElement;this.name=t}return JSXClosingElement}();e.JSXClosingElement=n;var s=function(){function JSXElement(t,e,i){this.type=r.JSXSyntax.JSXElement;this.openingElement=t;this.children=e;this.closingElement=i}return JSXElement}();e.JSXElement=s;var a=function(){function JSXEmptyExpression(){this.type=r.JSXSyntax.JSXEmptyExpression}return JSXEmptyExpression}();e.JSXEmptyExpression=a;var u=function(){function JSXExpressionContainer(t){this.type=r.JSXSyntax.JSXExpressionContainer;this.expression=t}return JSXExpressionContainer}();e.JSXExpressionContainer=u;var h=function(){function JSXIdentifier(t){this.type=r.JSXSyntax.JSXIdentifier;this.name=t}return JSXIdentifier}();e.JSXIdentifier=h;var o=function(){function JSXMemberExpression(t,e){this.type=r.JSXSyntax.JSXMemberExpression;this.object=t;this.property=e}return JSXMemberExpression}();e.JSXMemberExpression=o;var l=function(){function JSXAttribute(t,e){this.type=r.JSXSyntax.JSXAttribute;this.name=t;this.value=e}return JSXAttribute}();e.JSXAttribute=l;var c=function(){function JSXNamespacedName(t,e){this.type=r.JSXSyntax.JSXNamespacedName;this.namespace=t;this.name=e}return JSXNamespacedName}();e.JSXNamespacedName=c;var p=function(){function JSXOpeningElement(t,e,i){this.type=r.JSXSyntax.JSXOpeningElement;this.name=t;this.selfClosing=e;this.attributes=i}return JSXOpeningElement}();e.JSXOpeningElement=p;var f=function(){function JSXSpreadAttribute(t){this.type=r.JSXSyntax.JSXSpreadAttribute;this.argument=t}return JSXSpreadAttribute}();e.JSXSpreadAttribute=f;var D=function(){function JSXText(t,e){this.type=r.JSXSyntax.JSXText;this.value=t;this.raw=e}return JSXText}();e.JSXText=D},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(2);var n=function(){function ArrayExpression(t){this.type=r.Syntax.ArrayExpression;this.elements=t}return ArrayExpression}();e.ArrayExpression=n;var s=function(){function ArrayPattern(t){this.type=r.Syntax.ArrayPattern;this.elements=t}return ArrayPattern}();e.ArrayPattern=s;var a=function(){function ArrowFunctionExpression(t,e,i){this.type=r.Syntax.ArrowFunctionExpression;this.id=null;this.params=t;this.body=e;this.generator=false;this.expression=i;this.async=false}return ArrowFunctionExpression}();e.ArrowFunctionExpression=a;var u=function(){function AssignmentExpression(t,e,i){this.type=r.Syntax.AssignmentExpression;this.operator=t;this.left=e;this.right=i}return AssignmentExpression}();e.AssignmentExpression=u;var h=function(){function AssignmentPattern(t,e){this.type=r.Syntax.AssignmentPattern;this.left=t;this.right=e}return AssignmentPattern}();e.AssignmentPattern=h;var o=function(){function AsyncArrowFunctionExpression(t,e,i){this.type=r.Syntax.ArrowFunctionExpression;this.id=null;this.params=t;this.body=e;this.generator=false;this.expression=i;this.async=true}return AsyncArrowFunctionExpression}();e.AsyncArrowFunctionExpression=o;var l=function(){function AsyncFunctionDeclaration(t,e,i){this.type=r.Syntax.FunctionDeclaration;this.id=t;this.params=e;this.body=i;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionDeclaration}();e.AsyncFunctionDeclaration=l;var c=function(){function AsyncFunctionExpression(t,e,i){this.type=r.Syntax.FunctionExpression;this.id=t;this.params=e;this.body=i;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionExpression}();e.AsyncFunctionExpression=c;var p=function(){function AwaitExpression(t){this.type=r.Syntax.AwaitExpression;this.argument=t}return AwaitExpression}();e.AwaitExpression=p;var f=function(){function BinaryExpression(t,e,i){var n=t==="||"||t==="&&";this.type=n?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression;this.operator=t;this.left=e;this.right=i}return BinaryExpression}();e.BinaryExpression=f;var D=function(){function BlockStatement(t){this.type=r.Syntax.BlockStatement;this.body=t}return BlockStatement}();e.BlockStatement=D;var x=function(){function BreakStatement(t){this.type=r.Syntax.BreakStatement;this.label=t}return BreakStatement}();e.BreakStatement=x;var E=function(){function CallExpression(t,e){this.type=r.Syntax.CallExpression;this.callee=t;this.arguments=e}return CallExpression}();e.CallExpression=E;var m=function(){function CatchClause(t,e){this.type=r.Syntax.CatchClause;this.param=t;this.body=e}return CatchClause}();e.CatchClause=m;var v=function(){function ClassBody(t){this.type=r.Syntax.ClassBody;this.body=t}return ClassBody}();e.ClassBody=v;var C=function(){function ClassDeclaration(t,e,i){this.type=r.Syntax.ClassDeclaration;this.id=t;this.superClass=e;this.body=i}return ClassDeclaration}();e.ClassDeclaration=C;var S=function(){function ClassExpression(t,e,i){this.type=r.Syntax.ClassExpression;this.id=t;this.superClass=e;this.body=i}return ClassExpression}();e.ClassExpression=S;var d=function(){function ComputedMemberExpression(t,e){this.type=r.Syntax.MemberExpression;this.computed=true;this.object=t;this.property=e}return ComputedMemberExpression}();e.ComputedMemberExpression=d;var y=function(){function ConditionalExpression(t,e,i){this.type=r.Syntax.ConditionalExpression;this.test=t;this.consequent=e;this.alternate=i}return ConditionalExpression}();e.ConditionalExpression=y;var A=function(){function ContinueStatement(t){this.type=r.Syntax.ContinueStatement;this.label=t}return ContinueStatement}();e.ContinueStatement=A;var F=function(){function DebuggerStatement(){this.type=r.Syntax.DebuggerStatement}return DebuggerStatement}();e.DebuggerStatement=F;var w=function(){function Directive(t,e){this.type=r.Syntax.ExpressionStatement;this.expression=t;this.directive=e}return Directive}();e.Directive=w;var b=function(){function DoWhileStatement(t,e){this.type=r.Syntax.DoWhileStatement;this.body=t;this.test=e}return DoWhileStatement}();e.DoWhileStatement=b;var B=function(){function EmptyStatement(){this.type=r.Syntax.EmptyStatement}return EmptyStatement}();e.EmptyStatement=B;var g=function(){function ExportAllDeclaration(t){this.type=r.Syntax.ExportAllDeclaration;this.source=t}return ExportAllDeclaration}();e.ExportAllDeclaration=g;var P=function(){function ExportDefaultDeclaration(t){this.type=r.Syntax.ExportDefaultDeclaration;this.declaration=t}return ExportDefaultDeclaration}();e.ExportDefaultDeclaration=P;var T=function(){function ExportNamedDeclaration(t,e,i){this.type=r.Syntax.ExportNamedDeclaration;this.declaration=t;this.specifiers=e;this.source=i}return ExportNamedDeclaration}();e.ExportNamedDeclaration=T;var I=function(){function ExportSpecifier(t,e){this.type=r.Syntax.ExportSpecifier;this.exported=e;this.local=t}return ExportSpecifier}();e.ExportSpecifier=I;var M=function(){function ExpressionStatement(t){this.type=r.Syntax.ExpressionStatement;this.expression=t}return ExpressionStatement}();e.ExpressionStatement=M;var X=function(){function ForInStatement(t,e,i){this.type=r.Syntax.ForInStatement;this.left=t;this.right=e;this.body=i;this.each=false}return ForInStatement}();e.ForInStatement=X;var J=function(){function ForOfStatement(t,e,i){this.type=r.Syntax.ForOfStatement;this.left=t;this.right=e;this.body=i}return ForOfStatement}();e.ForOfStatement=J;var k=function(){function ForStatement(t,e,i,n){this.type=r.Syntax.ForStatement;this.init=t;this.test=e;this.update=i;this.body=n}return ForStatement}();e.ForStatement=k;var N=function(){function FunctionDeclaration(t,e,i,n){this.type=r.Syntax.FunctionDeclaration;this.id=t;this.params=e;this.body=i;this.generator=n;this.expression=false;this.async=false}return FunctionDeclaration}();e.FunctionDeclaration=N;var L=function(){function FunctionExpression(t,e,i,n){this.type=r.Syntax.FunctionExpression;this.id=t;this.params=e;this.body=i;this.generator=n;this.expression=false;this.async=false}return FunctionExpression}();e.FunctionExpression=L;var O=function(){function Identifier(t){this.type=r.Syntax.Identifier;this.name=t}return Identifier}();e.Identifier=O;var U=function(){function IfStatement(t,e,i){this.type=r.Syntax.IfStatement;this.test=t;this.consequent=e;this.alternate=i}return IfStatement}();e.IfStatement=U;var R=function(){function ImportDeclaration(t,e){this.type=r.Syntax.ImportDeclaration;this.specifiers=t;this.source=e}return ImportDeclaration}();e.ImportDeclaration=R;var z=function(){function ImportDefaultSpecifier(t){this.type=r.Syntax.ImportDefaultSpecifier;this.local=t}return ImportDefaultSpecifier}();e.ImportDefaultSpecifier=z;var K=function(){function ImportNamespaceSpecifier(t){this.type=r.Syntax.ImportNamespaceSpecifier;this.local=t}return ImportNamespaceSpecifier}();e.ImportNamespaceSpecifier=K;var j=function(){function ImportSpecifier(t,e){this.type=r.Syntax.ImportSpecifier;this.local=t;this.imported=e}return ImportSpecifier}();e.ImportSpecifier=j;var H=function(){function LabeledStatement(t,e){this.type=r.Syntax.LabeledStatement;this.label=t;this.body=e}return LabeledStatement}();e.LabeledStatement=H;var W=function(){function Literal(t,e){this.type=r.Syntax.Literal;this.value=t;this.raw=e}return Literal}();e.Literal=W;var V=function(){function MetaProperty(t,e){this.type=r.Syntax.MetaProperty;this.meta=t;this.property=e}return MetaProperty}();e.MetaProperty=V;var G=function(){function MethodDefinition(t,e,i,n,s){this.type=r.Syntax.MethodDefinition;this.key=t;this.computed=e;this.value=i;this.kind=n;this.static=s}return MethodDefinition}();e.MethodDefinition=G;var Y=function(){function Module(t){this.type=r.Syntax.Program;this.body=t;this.sourceType="module"}return Module}();e.Module=Y;var q=function(){function NewExpression(t,e){this.type=r.Syntax.NewExpression;this.callee=t;this.arguments=e}return NewExpression}();e.NewExpression=q;var $=function(){function ObjectExpression(t){this.type=r.Syntax.ObjectExpression;this.properties=t}return ObjectExpression}();e.ObjectExpression=$;var Q=function(){function ObjectPattern(t){this.type=r.Syntax.ObjectPattern;this.properties=t}return ObjectPattern}();e.ObjectPattern=Q;var Z=function(){function Property(t,e,i,n,s,a){this.type=r.Syntax.Property;this.key=e;this.computed=i;this.value=n;this.kind=t;this.method=s;this.shorthand=a}return Property}();e.Property=Z;var _=function(){function RegexLiteral(t,e,i,n){this.type=r.Syntax.Literal;this.value=t;this.raw=e;this.regex={pattern:i,flags:n}}return RegexLiteral}();e.RegexLiteral=_;var tt=function(){function RestElement(t){this.type=r.Syntax.RestElement;this.argument=t}return RestElement}();e.RestElement=tt;var et=function(){function ReturnStatement(t){this.type=r.Syntax.ReturnStatement;this.argument=t}return ReturnStatement}();e.ReturnStatement=et;var it=function(){function Script(t){this.type=r.Syntax.Program;this.body=t;this.sourceType="script"}return Script}();e.Script=it;var rt=function(){function SequenceExpression(t){this.type=r.Syntax.SequenceExpression;this.expressions=t}return SequenceExpression}();e.SequenceExpression=rt;var nt=function(){function SpreadElement(t){this.type=r.Syntax.SpreadElement;this.argument=t}return SpreadElement}();e.SpreadElement=nt;var st=function(){function StaticMemberExpression(t,e){this.type=r.Syntax.MemberExpression;this.computed=false;this.object=t;this.property=e}return StaticMemberExpression}();e.StaticMemberExpression=st;var at=function(){function Super(){this.type=r.Syntax.Super}return Super}();e.Super=at;var ut=function(){function SwitchCase(t,e){this.type=r.Syntax.SwitchCase;this.test=t;this.consequent=e}return SwitchCase}();e.SwitchCase=ut;var ht=function(){function SwitchStatement(t,e){this.type=r.Syntax.SwitchStatement;this.discriminant=t;this.cases=e}return SwitchStatement}();e.SwitchStatement=ht;var ot=function(){function TaggedTemplateExpression(t,e){this.type=r.Syntax.TaggedTemplateExpression;this.tag=t;this.quasi=e}return TaggedTemplateExpression}();e.TaggedTemplateExpression=ot;var lt=function(){function TemplateElement(t,e){this.type=r.Syntax.TemplateElement;this.value=t;this.tail=e}return TemplateElement}();e.TemplateElement=lt;var ct=function(){function TemplateLiteral(t,e){this.type=r.Syntax.TemplateLiteral;this.quasis=t;this.expressions=e}return TemplateLiteral}();e.TemplateLiteral=ct;var pt=function(){function ThisExpression(){this.type=r.Syntax.ThisExpression}return ThisExpression}();e.ThisExpression=pt;var ft=function(){function ThrowStatement(t){this.type=r.Syntax.ThrowStatement;this.argument=t}return ThrowStatement}();e.ThrowStatement=ft;var Dt=function(){function TryStatement(t,e,i){this.type=r.Syntax.TryStatement;this.block=t;this.handler=e;this.finalizer=i}return TryStatement}();e.TryStatement=Dt;var xt=function(){function UnaryExpression(t,e){this.type=r.Syntax.UnaryExpression;this.operator=t;this.argument=e;this.prefix=true}return UnaryExpression}();e.UnaryExpression=xt;var Et=function(){function UpdateExpression(t,e,i){this.type=r.Syntax.UpdateExpression;this.operator=t;this.argument=e;this.prefix=i}return UpdateExpression}();e.UpdateExpression=Et;var mt=function(){function VariableDeclaration(t,e){this.type=r.Syntax.VariableDeclaration;this.declarations=t;this.kind=e}return VariableDeclaration}();e.VariableDeclaration=mt;var vt=function(){function VariableDeclarator(t,e){this.type=r.Syntax.VariableDeclarator;this.id=t;this.init=e}return VariableDeclarator}();e.VariableDeclarator=vt;var Ct=function(){function WhileStatement(t,e){this.type=r.Syntax.WhileStatement;this.test=t;this.body=e}return WhileStatement}();e.WhileStatement=Ct;var St=function(){function WithStatement(t,e){this.type=r.Syntax.WithStatement;this.object=t;this.body=e}return WithStatement}();e.WithStatement=St;var dt=function(){function YieldExpression(t,e){this.type=r.Syntax.YieldExpression;this.argument=t;this.delegate=e}return YieldExpression}();e.YieldExpression=dt},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(9);var n=i(10);var s=i(11);var a=i(7);var u=i(12);var h=i(2);var o=i(13);var l="ArrowParameterPlaceHolder";var c=function(){function Parser(t,e,i){if(e===void 0){e={}}this.config={range:typeof e.range==="boolean"&&e.range,loc:typeof e.loc==="boolean"&&e.loc,source:null,tokens:typeof e.tokens==="boolean"&&e.tokens,comment:typeof e.comment==="boolean"&&e.comment,tolerant:typeof e.tolerant==="boolean"&&e.tolerant};if(this.config.loc&&e.source&&e.source!==null){this.config.source=String(e.source)}this.delegate=i;this.errorHandler=new n.ErrorHandler;this.errorHandler.tolerant=this.config.tolerant;this.scanner=new u.Scanner(t,this.errorHandler);this.scanner.trackComment=this.config.comment;this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11};this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0};this.hasLineTerminator=false;this.context={isModule:false,await:false,allowIn:true,allowStrictDirective:true,allowYield:true,firstCoverInitializedNameError:null,isAssignmentTarget:false,isBindingElement:false,inFunctionBody:false,inIteration:false,inSwitch:false,labelSet:{},strict:false};this.tokens=[];this.startMarker={index:0,line:this.scanner.lineNumber,column:0};this.lastMarker={index:0,line:this.scanner.lineNumber,column:0};this.nextToken();this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}Parser.prototype.throwError=function(t){var e=[];for(var i=1;i0&&this.delegate){for(var e=0;e>="||t===">>>="||t==="&="||t==="^="||t==="|="};Parser.prototype.isolateCoverGrammar=function(t){var e=this.context.isBindingElement;var i=this.context.isAssignmentTarget;var r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=t.call(this);if(this.context.firstCoverInitializedNameError!==null){this.throwUnexpectedToken(this.context.firstCoverInitializedNameError)}this.context.isBindingElement=e;this.context.isAssignmentTarget=i;this.context.firstCoverInitializedNameError=r;return n};Parser.prototype.inheritCoverGrammar=function(t){var e=this.context.isBindingElement;var i=this.context.isAssignmentTarget;var r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=t.call(this);this.context.isBindingElement=this.context.isBindingElement&&e;this.context.isAssignmentTarget=this.context.isAssignmentTarget&&i;this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError;return n};Parser.prototype.consumeSemicolon=function(){if(this.match(";")){this.nextToken()}else if(!this.hasLineTerminator){if(this.lookahead.type!==2&&!this.match("}")){this.throwUnexpectedToken(this.lookahead)}this.lastMarker.index=this.startMarker.index;this.lastMarker.line=this.startMarker.line;this.lastMarker.column=this.startMarker.column}};Parser.prototype.parsePrimaryExpression=function(){var t=this.createNode();var e;var i,r;switch(this.lookahead.type){case 3:if((this.context.isModule||this.context.await)&&this.lookahead.value==="await"){this.tolerateUnexpectedToken(this.lookahead)}e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(t,new a.Identifier(this.nextToken().value));break;case 6:case 8:if(this.context.strict&&this.lookahead.octal){this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral)}this.context.isAssignmentTarget=false;this.context.isBindingElement=false;i=this.nextToken();r=this.getTokenRaw(i);e=this.finalize(t,new a.Literal(i.value,r));break;case 1:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;i=this.nextToken();r=this.getTokenRaw(i);e=this.finalize(t,new a.Literal(i.value==="true",r));break;case 5:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;i=this.nextToken();r=this.getTokenRaw(i);e=this.finalize(t,new a.Literal(null,r));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=false;e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.scanner.index=this.startMarker.index;i=this.nextRegexToken();r=this.getTokenRaw(i);e=this.finalize(t,new a.RegexLiteral(i.regex,r,i.pattern,i.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:if(!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")){e=this.parseIdentifierName()}else if(!this.context.strict&&this.matchKeyword("let")){e=this.finalize(t,new a.Identifier(this.nextToken().value))}else{this.context.isAssignmentTarget=false;this.context.isBindingElement=false;if(this.matchKeyword("function")){e=this.parseFunctionExpression()}else if(this.matchKeyword("this")){this.nextToken();e=this.finalize(t,new a.ThisExpression)}else if(this.matchKeyword("class")){e=this.parseClassExpression()}else{e=this.throwUnexpectedToken(this.nextToken())}}break;default:e=this.throwUnexpectedToken(this.nextToken())}return e};Parser.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var e=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new a.SpreadElement(e))};Parser.prototype.parseArrayInitializer=function(){var t=this.createNode();var e=[];this.expect("[");while(!this.match("]")){if(this.match(",")){this.nextToken();e.push(null)}else if(this.match("...")){var i=this.parseSpreadElement();if(!this.match("]")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.expect(",")}e.push(i)}else{e.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(t,new a.ArrayExpression(e))};Parser.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var e=this.context.strict;var i=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);if(this.context.strict&&t.firstRestricted){this.tolerateUnexpectedToken(t.firstRestricted,t.message)}if(this.context.strict&&t.stricted){this.tolerateUnexpectedToken(t.stricted,t.message)}this.context.strict=e;this.context.allowStrictDirective=i;return r};Parser.prototype.parsePropertyMethodFunction=function(){var t=false;var e=this.createNode();var i=this.context.allowYield;this.context.allowYield=true;var r=this.parseFormalParameters();var n=this.parsePropertyMethod(r);this.context.allowYield=i;return this.finalize(e,new a.FunctionExpression(null,r.params,n,t))};Parser.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode();var e=this.context.allowYield;var i=this.context.await;this.context.allowYield=false;this.context.await=true;var r=this.parseFormalParameters();var n=this.parsePropertyMethod(r);this.context.allowYield=e;this.context.await=i;return this.finalize(t,new a.AsyncFunctionExpression(null,r.params,n))};Parser.prototype.parseObjectPropertyKey=function(){var t=this.createNode();var e=this.nextToken();var i;switch(e.type){case 8:case 6:if(this.context.strict&&e.octal){this.tolerateUnexpectedToken(e,s.Messages.StrictOctalLiteral)}var r=this.getTokenRaw(e);i=this.finalize(t,new a.Literal(e.value,r));break;case 3:case 1:case 5:case 4:i=this.finalize(t,new a.Identifier(e.value));break;case 7:if(e.value==="["){i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.expect("]")}else{i=this.throwUnexpectedToken(e)}break;default:i=this.throwUnexpectedToken(e)}return i};Parser.prototype.isPropertyKey=function(t,e){return t.type===h.Syntax.Identifier&&t.name===e||t.type===h.Syntax.Literal&&t.value===e};Parser.prototype.parseObjectProperty=function(t){var e=this.createNode();var i=this.lookahead;var r;var n=null;var u=null;var h=false;var o=false;var l=false;var c=false;if(i.type===3){var p=i.value;this.nextToken();h=this.match("[");c=!this.hasLineTerminator&&p==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(",");n=c?this.parseObjectPropertyKey():this.finalize(e,new a.Identifier(p))}else if(this.match("*")){this.nextToken()}else{h=this.match("[");n=this.parseObjectPropertyKey()}var f=this.qualifiedPropertyName(this.lookahead);if(i.type===3&&!c&&i.value==="get"&&f){r="get";h=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;u=this.parseGetterMethod()}else if(i.type===3&&!c&&i.value==="set"&&f){r="set";h=this.match("[");n=this.parseObjectPropertyKey();u=this.parseSetterMethod()}else if(i.type===7&&i.value==="*"&&f){r="init";h=this.match("[");n=this.parseObjectPropertyKey();u=this.parseGeneratorMethod();o=true}else{if(!n){this.throwUnexpectedToken(this.lookahead)}r="init";if(this.match(":")&&!c){if(!h&&this.isPropertyKey(n,"__proto__")){if(t.value){this.tolerateError(s.Messages.DuplicateProtoProperty)}t.value=true}this.nextToken();u=this.inheritCoverGrammar(this.parseAssignmentExpression)}else if(this.match("(")){u=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();o=true}else if(i.type===3){var p=this.finalize(e,new a.Identifier(i.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead;this.nextToken();l=true;var D=this.isolateCoverGrammar(this.parseAssignmentExpression);u=this.finalize(e,new a.AssignmentPattern(p,D))}else{l=true;u=p}}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(e,new a.Property(r,n,h,u,o,l))};Parser.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");var e=[];var i={value:false};while(!this.match("}")){e.push(this.parseObjectProperty(i));if(!this.match("}")){this.expectCommaSeparator()}}this.expect("}");return this.finalize(t,new a.ObjectExpression(e))};Parser.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode();var e=this.nextToken();var i=e.value;var n=e.cooked;return this.finalize(t,new a.TemplateElement({raw:i,cooked:n},e.tail))};Parser.prototype.parseTemplateElement=function(){if(this.lookahead.type!==10){this.throwUnexpectedToken()}var t=this.createNode();var e=this.nextToken();var i=e.value;var r=e.cooked;return this.finalize(t,new a.TemplateElement({raw:i,cooked:r},e.tail))};Parser.prototype.parseTemplateLiteral=function(){var t=this.createNode();var e=[];var i=[];var r=this.parseTemplateHead();i.push(r);while(!r.tail){e.push(this.parseExpression());r=this.parseTemplateElement();i.push(r)}return this.finalize(t,new a.TemplateLiteral(i,e))};Parser.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case h.Syntax.Identifier:case h.Syntax.MemberExpression:case h.Syntax.RestElement:case h.Syntax.AssignmentPattern:break;case h.Syntax.SpreadElement:t.type=h.Syntax.RestElement;this.reinterpretExpressionAsPattern(t.argument);break;case h.Syntax.ArrayExpression:t.type=h.Syntax.ArrayPattern;for(var e=0;e")){this.expect("=>")}t={type:l,params:[],async:false}}else{var e=this.lookahead;var i=[];if(this.match("...")){t=this.parseRestElement(i);this.expect(")");if(!this.match("=>")){this.expect("=>")}t={type:l,params:[t],async:false}}else{var r=false;this.context.isBindingElement=true;t=this.inheritCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];this.context.isAssignmentTarget=false;n.push(t);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();if(this.match(")")){this.nextToken();for(var s=0;s")){this.expect("=>")}this.context.isBindingElement=false;for(var s=0;s")){if(t.type===h.Syntax.Identifier&&t.name==="yield"){r=true;t={type:l,params:[t],async:false}}if(!r){if(!this.context.isBindingElement){this.throwUnexpectedToken(this.lookahead)}if(t.type===h.Syntax.SequenceExpression){for(var s=0;s")){for(var h=0;h0){this.nextToken();this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=[t,this.lookahead];var s=e;var u=this.isolateCoverGrammar(this.parseExponentiationExpression);var h=[s,i.value,u];var o=[r];while(true){r=this.binaryPrecedence(this.lookahead);if(r<=0){break}while(h.length>2&&r<=o[o.length-1]){u=h.pop();var l=h.pop();o.pop();s=h.pop();n.pop();var c=this.startNode(n[n.length-1]);h.push(this.finalize(c,new a.BinaryExpression(l,s,u)))}h.push(this.nextToken().value);o.push(r);n.push(this.lookahead);h.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=h.length-1;e=h[p];var f=n.pop();while(p>1){var D=n.pop();var x=f&&f.lineStart;var c=this.startNode(D,x);var l=h[p-1];e=this.finalize(c,new a.BinaryExpression(l,h[p-2],e));p-=2;f=D}}return e};Parser.prototype.parseConditionalExpression=function(){var t=this.lookahead;var e=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var i=this.context.allowIn;this.context.allowIn=true;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=i;this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.ConditionalExpression(e,r,n));this.context.isAssignmentTarget=false;this.context.isBindingElement=false}return e};Parser.prototype.checkPatternParam=function(t,e){switch(e.type){case h.Syntax.Identifier:this.validateParam(t,e,e.name);break;case h.Syntax.RestElement:this.checkPatternParam(t,e.argument);break;case h.Syntax.AssignmentPattern:this.checkPatternParam(t,e.left);break;case h.Syntax.ArrayPattern:for(var i=0;i")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=t.async;var u=this.reinterpretAsCoverFormalsList(t);if(u){if(this.hasLineTerminator){this.tolerateUnexpectedToken(this.lookahead)}this.context.firstCoverInitializedNameError=null;var o=this.context.strict;var c=this.context.allowStrictDirective;this.context.allowStrictDirective=u.simple;var p=this.context.allowYield;var f=this.context.await;this.context.allowYield=true;this.context.await=n;var D=this.startNode(e);this.expect("=>");var x=void 0;if(this.match("{")){var E=this.context.allowIn;this.context.allowIn=true;x=this.parseFunctionSourceElements();this.context.allowIn=E}else{x=this.isolateCoverGrammar(this.parseAssignmentExpression)}var m=x.type!==h.Syntax.BlockStatement;if(this.context.strict&&u.firstRestricted){this.throwUnexpectedToken(u.firstRestricted,u.message)}if(this.context.strict&&u.stricted){this.tolerateUnexpectedToken(u.stricted,u.message)}t=n?this.finalize(D,new a.AsyncArrowFunctionExpression(u.params,x,m)):this.finalize(D,new a.ArrowFunctionExpression(u.params,x,m));this.context.strict=o;this.context.allowStrictDirective=c;this.context.allowYield=p;this.context.await=f}}else{if(this.matchAssign()){if(!this.context.isAssignmentTarget){this.tolerateError(s.Messages.InvalidLHSInAssignment)}if(this.context.strict&&t.type===h.Syntax.Identifier){var v=t;if(this.scanner.isRestrictedWord(v.name)){this.tolerateUnexpectedToken(i,s.Messages.StrictLHSAssignment)}if(this.scanner.isStrictModeReservedWord(v.name)){this.tolerateUnexpectedToken(i,s.Messages.StrictReservedWord)}}if(!this.match("=")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false}else{this.reinterpretExpressionAsPattern(t)}i=this.nextToken();var C=i.value;var S=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.AssignmentExpression(C,t,S));this.context.firstCoverInitializedNameError=null}}}return t};Parser.prototype.parseExpression=function(){var t=this.lookahead;var e=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var i=[];i.push(e);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();i.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}e=this.finalize(this.startNode(t),new a.SequenceExpression(i))}return e};Parser.prototype.parseStatementListItem=function(){var t;this.context.isAssignmentTarget=true;this.context.isBindingElement=true;if(this.lookahead.type===4){switch(this.lookahead.value){case"export":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration)}t=this.parseExportDeclaration();break;case"import":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration)}t=this.parseImportDeclaration();break;case"const":t=this.parseLexicalDeclaration({inFor:false});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:false}):this.parseStatement();break;default:t=this.parseStatement();break}}else{t=this.parseStatement()}return t};Parser.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");var e=[];while(true){if(this.match("}")){break}e.push(this.parseStatementListItem())}this.expect("}");return this.finalize(t,new a.BlockStatement(e))};Parser.prototype.parseLexicalBinding=function(t,e){var i=this.createNode();var r=[];var n=this.parsePattern(r,t);if(this.context.strict&&n.type===h.Syntax.Identifier){if(this.scanner.isRestrictedWord(n.name)){this.tolerateError(s.Messages.StrictVarName)}}var u=null;if(t==="const"){if(!this.matchKeyword("in")&&!this.matchContextualKeyword("of")){if(this.match("=")){this.nextToken();u=this.isolateCoverGrammar(this.parseAssignmentExpression)}else{this.throwError(s.Messages.DeclarationMissingInitializer,"const")}}}else if(!e.inFor&&n.type!==h.Syntax.Identifier||this.match("=")){this.expect("=");u=this.isolateCoverGrammar(this.parseAssignmentExpression)}return this.finalize(i,new a.VariableDeclarator(n,u))};Parser.prototype.parseBindingList=function(t,e){var i=[this.parseLexicalBinding(t,e)];while(this.match(",")){this.nextToken();i.push(this.parseLexicalBinding(t,e))}return i};Parser.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.scanner.lex();this.scanner.restoreState(t);return e.type===3||e.type===7&&e.value==="["||e.type===7&&e.value==="{"||e.type===4&&e.value==="let"||e.type===4&&e.value==="yield"};Parser.prototype.parseLexicalDeclaration=function(t){var e=this.createNode();var i=this.nextToken().value;r.assert(i==="let"||i==="const","Lexical declaration must be either let or const");var n=this.parseBindingList(i,t);this.consumeSemicolon();return this.finalize(e,new a.VariableDeclaration(n,i))};Parser.prototype.parseBindingRestElement=function(t,e){var i=this.createNode();this.expect("...");var r=this.parsePattern(t,e);return this.finalize(i,new a.RestElement(r))};Parser.prototype.parseArrayPattern=function(t,e){var i=this.createNode();this.expect("[");var r=[];while(!this.match("]")){if(this.match(",")){this.nextToken();r.push(null)}else{if(this.match("...")){r.push(this.parseBindingRestElement(t,e));break}else{r.push(this.parsePatternWithDefault(t,e))}if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(i,new a.ArrayPattern(r))};Parser.prototype.parsePropertyPattern=function(t,e){var i=this.createNode();var r=false;var n=false;var s=false;var u;var h;if(this.lookahead.type===3){var o=this.lookahead;u=this.parseVariableIdentifier();var l=this.finalize(i,new a.Identifier(o.value));if(this.match("=")){t.push(o);n=true;this.nextToken();var c=this.parseAssignmentExpression();h=this.finalize(this.startNode(o),new a.AssignmentPattern(l,c))}else if(!this.match(":")){t.push(o);n=true;h=l}else{this.expect(":");h=this.parsePatternWithDefault(t,e)}}else{r=this.match("[");u=this.parseObjectPropertyKey();this.expect(":");h=this.parsePatternWithDefault(t,e)}return this.finalize(i,new a.Property("init",u,r,h,s,n))};Parser.prototype.parseObjectPattern=function(t,e){var i=this.createNode();var r=[];this.expect("{");while(!this.match("}")){r.push(this.parsePropertyPattern(t,e));if(!this.match("}")){this.expect(",")}}this.expect("}");return this.finalize(i,new a.ObjectPattern(r))};Parser.prototype.parsePattern=function(t,e){var i;if(this.match("[")){i=this.parseArrayPattern(t,e)}else if(this.match("{")){i=this.parseObjectPattern(t,e)}else{if(this.matchKeyword("let")&&(e==="const"||e==="let")){this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding)}t.push(this.lookahead);i=this.parseVariableIdentifier(e)}return i};Parser.prototype.parsePatternWithDefault=function(t,e){var i=this.lookahead;var r=this.parsePattern(t,e);if(this.match("=")){this.nextToken();var n=this.context.allowYield;this.context.allowYield=true;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=n;r=this.finalize(this.startNode(i),new a.AssignmentPattern(r,s))}return r};Parser.prototype.parseVariableIdentifier=function(t){var e=this.createNode();var i=this.nextToken();if(i.type===4&&i.value==="yield"){if(this.context.strict){this.tolerateUnexpectedToken(i,s.Messages.StrictReservedWord)}else if(!this.context.allowYield){this.throwUnexpectedToken(i)}}else if(i.type!==3){if(this.context.strict&&i.type===4&&this.scanner.isStrictModeReservedWord(i.value)){this.tolerateUnexpectedToken(i,s.Messages.StrictReservedWord)}else{if(this.context.strict||i.value!=="let"||t!=="var"){this.throwUnexpectedToken(i)}}}else if((this.context.isModule||this.context.await)&&i.type===3&&i.value==="await"){this.tolerateUnexpectedToken(i)}return this.finalize(e,new a.Identifier(i.value))};Parser.prototype.parseVariableDeclaration=function(t){var e=this.createNode();var i=[];var r=this.parsePattern(i,"var");if(this.context.strict&&r.type===h.Syntax.Identifier){if(this.scanner.isRestrictedWord(r.name)){this.tolerateError(s.Messages.StrictVarName)}}var n=null;if(this.match("=")){this.nextToken();n=this.isolateCoverGrammar(this.parseAssignmentExpression)}else if(r.type!==h.Syntax.Identifier&&!t.inFor){this.expect("=")}return this.finalize(e,new a.VariableDeclarator(r,n))};Parser.prototype.parseVariableDeclarationList=function(t){var e={inFor:t.inFor};var i=[];i.push(this.parseVariableDeclaration(e));while(this.match(",")){this.nextToken();i.push(this.parseVariableDeclaration(e))}return i};Parser.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var e=this.parseVariableDeclarationList({inFor:false});this.consumeSemicolon();return this.finalize(t,new a.VariableDeclaration(e,"var"))};Parser.prototype.parseEmptyStatement=function(){var t=this.createNode();this.expect(";");return this.finalize(t,new a.EmptyStatement)};Parser.prototype.parseExpressionStatement=function(){var t=this.createNode();var e=this.parseExpression();this.consumeSemicolon();return this.finalize(t,new a.ExpressionStatement(e))};Parser.prototype.parseIfClause=function(){if(this.context.strict&&this.matchKeyword("function")){this.tolerateError(s.Messages.StrictFunction)}return this.parseStatement()};Parser.prototype.parseIfStatement=function(){var t=this.createNode();var e;var i=null;this.expectKeyword("if");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());e=this.finalize(this.createNode(),new a.EmptyStatement)}else{this.expect(")");e=this.parseIfClause();if(this.matchKeyword("else")){this.nextToken();i=this.parseIfClause()}}return this.finalize(t,new a.IfStatement(r,e,i))};Parser.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var e=this.context.inIteration;this.context.inIteration=true;var i=this.parseStatement();this.context.inIteration=e;this.expectKeyword("while");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken())}else{this.expect(")");if(this.match(";")){this.nextToken()}}return this.finalize(t,new a.DoWhileStatement(i,r))};Parser.prototype.parseWhileStatement=function(){var t=this.createNode();var e;this.expectKeyword("while");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());e=this.finalize(this.createNode(),new a.EmptyStatement)}else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=true;e=this.parseStatement();this.context.inIteration=r}return this.finalize(t,new a.WhileStatement(i,e))};Parser.prototype.parseForStatement=function(){var t=null;var e=null;var i=null;var r=true;var n,u;var o=this.createNode();this.expectKeyword("for");this.expect("(");if(this.match(";")){this.nextToken()}else{if(this.matchKeyword("var")){t=this.createNode();this.nextToken();var l=this.context.allowIn;this.context.allowIn=false;var c=this.parseVariableDeclarationList({inFor:true});this.context.allowIn=l;if(c.length===1&&this.matchKeyword("in")){var p=c[0];if(p.init&&(p.id.type===h.Syntax.ArrayPattern||p.id.type===h.Syntax.ObjectPattern||this.context.strict)){this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in")}t=this.finalize(t,new a.VariableDeclaration(c,"var"));this.nextToken();n=t;u=this.parseExpression();t=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){t=this.finalize(t,new a.VariableDeclaration(c,"var"));this.nextToken();n=t;u=this.parseAssignmentExpression();t=null;r=false}else{t=this.finalize(t,new a.VariableDeclaration(c,"var"));this.expect(";")}}else if(this.matchKeyword("const")||this.matchKeyword("let")){t=this.createNode();var f=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in"){t=this.finalize(t,new a.Identifier(f));this.nextToken();n=t;u=this.parseExpression();t=null}else{var l=this.context.allowIn;this.context.allowIn=false;var c=this.parseBindingList(f,{inFor:true});this.context.allowIn=l;if(c.length===1&&c[0].init===null&&this.matchKeyword("in")){t=this.finalize(t,new a.VariableDeclaration(c,f));this.nextToken();n=t;u=this.parseExpression();t=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){t=this.finalize(t,new a.VariableDeclaration(c,f));this.nextToken();n=t;u=this.parseAssignmentExpression();t=null;r=false}else{this.consumeSemicolon();t=this.finalize(t,new a.VariableDeclaration(c,f))}}}else{var D=this.lookahead;var l=this.context.allowIn;this.context.allowIn=false;t=this.inheritCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=l;if(this.matchKeyword("in")){if(!this.context.isAssignmentTarget||t.type===h.Syntax.AssignmentExpression){this.tolerateError(s.Messages.InvalidLHSInForIn)}this.nextToken();this.reinterpretExpressionAsPattern(t);n=t;u=this.parseExpression();t=null}else if(this.matchContextualKeyword("of")){if(!this.context.isAssignmentTarget||t.type===h.Syntax.AssignmentExpression){this.tolerateError(s.Messages.InvalidLHSInForLoop)}this.nextToken();this.reinterpretExpressionAsPattern(t);n=t;u=this.parseAssignmentExpression();t=null;r=false}else{if(this.match(",")){var x=[t];while(this.match(",")){this.nextToken();x.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}t=this.finalize(this.startNode(D),new a.SequenceExpression(x))}this.expect(";")}}}if(typeof n==="undefined"){if(!this.match(";")){e=this.parseExpression()}this.expect(";");if(!this.match(")")){i=this.parseExpression()}}var E;if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());E=this.finalize(this.createNode(),new a.EmptyStatement)}else{this.expect(")");var m=this.context.inIteration;this.context.inIteration=true;E=this.isolateCoverGrammar(this.parseStatement);this.context.inIteration=m}return typeof n==="undefined"?this.finalize(o,new a.ForStatement(t,e,i,E)):r?this.finalize(o,new a.ForInStatement(n,u,E)):this.finalize(o,new a.ForOfStatement(n,u,E))};Parser.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var e=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var i=this.parseVariableIdentifier();e=i;var r="$"+i.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,r)){this.throwError(s.Messages.UnknownLabel,i.name)}}this.consumeSemicolon();if(e===null&&!this.context.inIteration){this.throwError(s.Messages.IllegalContinue)}return this.finalize(t,new a.ContinueStatement(e))};Parser.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var e=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var i=this.parseVariableIdentifier();var r="$"+i.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,r)){this.throwError(s.Messages.UnknownLabel,i.name)}e=i}this.consumeSemicolon();if(e===null&&!this.context.inIteration&&!this.context.inSwitch){this.throwError(s.Messages.IllegalBreak)}return this.finalize(t,new a.BreakStatement(e))};Parser.prototype.parseReturnStatement=function(){if(!this.context.inFunctionBody){this.tolerateError(s.Messages.IllegalReturn)}var t=this.createNode();this.expectKeyword("return");var e=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10;var i=e?this.parseExpression():null;this.consumeSemicolon();return this.finalize(t,new a.ReturnStatement(i))};Parser.prototype.parseWithStatement=function(){if(this.context.strict){this.tolerateError(s.Messages.StrictModeWith)}var t=this.createNode();var e;this.expectKeyword("with");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());e=this.finalize(this.createNode(),new a.EmptyStatement)}else{this.expect(")");e=this.parseStatement()}return this.finalize(t,new a.WithStatement(i,e))};Parser.prototype.parseSwitchCase=function(){var t=this.createNode();var e;if(this.matchKeyword("default")){this.nextToken();e=null}else{this.expectKeyword("case");e=this.parseExpression()}this.expect(":");var i=[];while(true){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case")){break}i.push(this.parseStatementListItem())}return this.finalize(t,new a.SwitchCase(e,i))};Parser.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch");this.expect("(");var e=this.parseExpression();this.expect(")");var i=this.context.inSwitch;this.context.inSwitch=true;var r=[];var n=false;this.expect("{");while(true){if(this.match("}")){break}var u=this.parseSwitchCase();if(u.test===null){if(n){this.throwError(s.Messages.MultipleDefaultsInSwitch)}n=true}r.push(u)}this.expect("}");this.context.inSwitch=i;return this.finalize(t,new a.SwitchStatement(e,r))};Parser.prototype.parseLabelledStatement=function(){var t=this.createNode();var e=this.parseExpression();var i;if(e.type===h.Syntax.Identifier&&this.match(":")){this.nextToken();var r=e;var n="$"+r.name;if(Object.prototype.hasOwnProperty.call(this.context.labelSet,n)){this.throwError(s.Messages.Redeclaration,"Label",r.name)}this.context.labelSet[n]=true;var u=void 0;if(this.matchKeyword("class")){this.tolerateUnexpectedToken(this.lookahead);u=this.parseClassDeclaration()}else if(this.matchKeyword("function")){var o=this.lookahead;var l=this.parseFunctionDeclaration();if(this.context.strict){this.tolerateUnexpectedToken(o,s.Messages.StrictFunction)}else if(l.generator){this.tolerateUnexpectedToken(o,s.Messages.GeneratorInLegacyContext)}u=l}else{u=this.parseStatement()}delete this.context.labelSet[n];i=new a.LabeledStatement(r,u)}else{this.consumeSemicolon();i=new a.ExpressionStatement(e)}return this.finalize(t,i)};Parser.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw");if(this.hasLineTerminator){this.throwError(s.Messages.NewlineAfterThrow)}var e=this.parseExpression();this.consumeSemicolon();return this.finalize(t,new a.ThrowStatement(e))};Parser.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch");this.expect("(");if(this.match(")")){this.throwUnexpectedToken(this.lookahead)}var e=[];var i=this.parsePattern(e);var r={};for(var n=0;n0){this.tolerateError(s.Messages.BadGetterArity)}var n=this.parsePropertyMethod(r);this.context.allowYield=i;return this.finalize(t,new a.FunctionExpression(null,r.params,n,e))};Parser.prototype.parseSetterMethod=function(){var t=this.createNode();var e=false;var i=this.context.allowYield;this.context.allowYield=!e;var r=this.parseFormalParameters();if(r.params.length!==1){this.tolerateError(s.Messages.BadSetterArity)}else if(r.params[0]instanceof a.RestElement){this.tolerateError(s.Messages.BadSetterRestParameter)}var n=this.parsePropertyMethod(r);this.context.allowYield=i;return this.finalize(t,new a.FunctionExpression(null,r.params,n,e))};Parser.prototype.parseGeneratorMethod=function(){var t=this.createNode();var e=true;var i=this.context.allowYield;this.context.allowYield=true;var r=this.parseFormalParameters();this.context.allowYield=false;var n=this.parsePropertyMethod(r);this.context.allowYield=i;return this.finalize(t,new a.FunctionExpression(null,r.params,n,e))};Parser.prototype.isStartOfExpression=function(){var t=true;var e=this.lookahead.value;switch(this.lookahead.type){case 7:t=e==="["||e==="("||e==="{"||e==="+"||e==="-"||e==="!"||e==="~"||e==="++"||e==="--"||e==="/"||e==="/=";break;case 4:t=e==="class"||e==="delete"||e==="function"||e==="let"||e==="new"||e==="super"||e==="this"||e==="typeof"||e==="void"||e==="yield";break;default:break}return t};Parser.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var e=null;var i=false;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=false;i=this.match("*");if(i){this.nextToken();e=this.parseAssignmentExpression()}else if(this.isStartOfExpression()){e=this.parseAssignmentExpression()}this.context.allowYield=r}return this.finalize(t,new a.YieldExpression(e,i))};Parser.prototype.parseClassElement=function(t){var e=this.lookahead;var i=this.createNode();var r="";var n=null;var u=null;var h=false;var o=false;var l=false;var c=false;if(this.match("*")){this.nextToken()}else{h=this.match("[");n=this.parseObjectPropertyKey();var p=n;if(p.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))){e=this.lookahead;l=true;h=this.match("[");if(this.match("*")){this.nextToken()}else{n=this.parseObjectPropertyKey()}}if(e.type===3&&!this.hasLineTerminator&&e.value==="async"){var f=this.lookahead.value;if(f!==":"&&f!=="("&&f!=="*"){c=true;e=this.lookahead;n=this.parseObjectPropertyKey();if(e.type===3&&e.value==="constructor"){this.tolerateUnexpectedToken(e,s.Messages.ConstructorIsAsync)}}}}var D=this.qualifiedPropertyName(this.lookahead);if(e.type===3){if(e.value==="get"&&D){r="get";h=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;u=this.parseGetterMethod()}else if(e.value==="set"&&D){r="set";h=this.match("[");n=this.parseObjectPropertyKey();u=this.parseSetterMethod()}}else if(e.type===7&&e.value==="*"&&D){r="init";h=this.match("[");n=this.parseObjectPropertyKey();u=this.parseGeneratorMethod();o=true}if(!r&&n&&this.match("(")){r="init";u=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();o=true}if(!r){this.throwUnexpectedToken(this.lookahead)}if(r==="init"){r="method"}if(!h){if(l&&this.isPropertyKey(n,"prototype")){this.throwUnexpectedToken(e,s.Messages.StaticPrototype)}if(!l&&this.isPropertyKey(n,"constructor")){if(r!=="method"||!o||u&&u.generator){this.throwUnexpectedToken(e,s.Messages.ConstructorSpecialMethod)}if(t.value){this.throwUnexpectedToken(e,s.Messages.DuplicateConstructor)}else{t.value=true}r="constructor"}}return this.finalize(i,new a.MethodDefinition(n,h,u,r,l))};Parser.prototype.parseClassElementList=function(){var t=[];var e={value:false};this.expect("{");while(!this.match("}")){if(this.match(";")){this.nextToken()}else{t.push(this.parseClassElement(e))}}this.expect("}");return t};Parser.prototype.parseClassBody=function(){var t=this.createNode();var e=this.parseClassElementList();return this.finalize(t,new a.ClassBody(e))};Parser.prototype.parseClassDeclaration=function(t){var e=this.createNode();var i=this.context.strict;this.context.strict=true;this.expectKeyword("class");var r=t&&this.lookahead.type!==3?null:this.parseVariableIdentifier();var n=null;if(this.matchKeyword("extends")){this.nextToken();n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var s=this.parseClassBody();this.context.strict=i;return this.finalize(e,new a.ClassDeclaration(r,n,s))};Parser.prototype.parseClassExpression=function(){var t=this.createNode();var e=this.context.strict;this.context.strict=true;this.expectKeyword("class");var i=this.lookahead.type===3?this.parseVariableIdentifier():null;var r=null;if(this.matchKeyword("extends")){this.nextToken();r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var n=this.parseClassBody();this.context.strict=e;return this.finalize(t,new a.ClassExpression(i,r,n))};Parser.prototype.parseModule=function(){this.context.strict=true;this.context.isModule=true;this.scanner.isModule=true;var t=this.createNode();var e=this.parseDirectivePrologues();while(this.lookahead.type!==2){e.push(this.parseStatementListItem())}return this.finalize(t,new a.Module(e))};Parser.prototype.parseScript=function(){var t=this.createNode();var e=this.parseDirectivePrologues();while(this.lookahead.type!==2){e.push(this.parseStatementListItem())}return this.finalize(t,new a.Script(e))};Parser.prototype.parseModuleSpecifier=function(){var t=this.createNode();if(this.lookahead.type!==8){this.throwError(s.Messages.InvalidModuleSpecifier)}var e=this.nextToken();var i=this.getTokenRaw(e);return this.finalize(t,new a.Literal(e.value,i))};Parser.prototype.parseImportSpecifier=function(){var t=this.createNode();var e;var i;if(this.lookahead.type===3){e=this.parseVariableIdentifier();i=e;if(this.matchContextualKeyword("as")){this.nextToken();i=this.parseVariableIdentifier()}}else{e=this.parseIdentifierName();i=e;if(this.matchContextualKeyword("as")){this.nextToken();i=this.parseVariableIdentifier()}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(t,new a.ImportSpecifier(i,e))};Parser.prototype.parseNamedImports=function(){this.expect("{");var t=[];while(!this.match("}")){t.push(this.parseImportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");return t};Parser.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode();var e=this.parseIdentifierName();return this.finalize(t,new a.ImportDefaultSpecifier(e))};Parser.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*");if(!this.matchContextualKeyword("as")){this.throwError(s.Messages.NoAsAfterImportNamespace)}this.nextToken();var e=this.parseIdentifierName();return this.finalize(t,new a.ImportNamespaceSpecifier(e))};Parser.prototype.parseImportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(s.Messages.IllegalImportDeclaration)}var t=this.createNode();this.expectKeyword("import");var e;var i=[];if(this.lookahead.type===8){e=this.parseModuleSpecifier()}else{if(this.match("{")){i=i.concat(this.parseNamedImports())}else if(this.match("*")){i.push(this.parseImportNamespaceSpecifier())}else if(this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")){i.push(this.parseImportDefaultSpecifier());if(this.match(",")){this.nextToken();if(this.match("*")){i.push(this.parseImportNamespaceSpecifier())}else if(this.match("{")){i=i.concat(this.parseNamedImports())}else{this.throwUnexpectedToken(this.lookahead)}}}else{this.throwUnexpectedToken(this.nextToken())}if(!this.matchContextualKeyword("from")){var r=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();e=this.parseModuleSpecifier()}this.consumeSemicolon();return this.finalize(t,new a.ImportDeclaration(i,e))};Parser.prototype.parseExportSpecifier=function(){var t=this.createNode();var e=this.parseIdentifierName();var i=e;if(this.matchContextualKeyword("as")){this.nextToken();i=this.parseIdentifierName()}return this.finalize(t,new a.ExportSpecifier(e,i))};Parser.prototype.parseExportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(s.Messages.IllegalExportDeclaration)}var t=this.createNode();this.expectKeyword("export");var e;if(this.matchKeyword("default")){this.nextToken();if(this.matchKeyword("function")){var i=this.parseFunctionDeclaration(true);e=this.finalize(t,new a.ExportDefaultDeclaration(i))}else if(this.matchKeyword("class")){var i=this.parseClassDeclaration(true);e=this.finalize(t,new a.ExportDefaultDeclaration(i))}else if(this.matchContextualKeyword("async")){var i=this.matchAsyncFunction()?this.parseFunctionDeclaration(true):this.parseAssignmentExpression();e=this.finalize(t,new a.ExportDefaultDeclaration(i))}else{if(this.matchContextualKeyword("from")){this.throwError(s.Messages.UnexpectedToken,this.lookahead.value)}var i=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon();e=this.finalize(t,new a.ExportDefaultDeclaration(i))}}else if(this.match("*")){this.nextToken();if(!this.matchContextualKeyword("from")){var r=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var n=this.parseModuleSpecifier();this.consumeSemicolon();e=this.finalize(t,new a.ExportAllDeclaration(n))}else if(this.lookahead.type===4){var i=void 0;switch(this.lookahead.value){case"let":case"const":i=this.parseLexicalDeclaration({inFor:false});break;case"var":case"class":case"function":i=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(i,[],null))}else if(this.matchAsyncFunction()){var i=this.parseFunctionDeclaration();e=this.finalize(t,new a.ExportNamedDeclaration(i,[],null))}else{var u=[];var h=null;var o=false;this.expect("{");while(!this.match("}")){o=o||this.matchKeyword("default");u.push(this.parseExportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");if(this.matchContextualKeyword("from")){this.nextToken();h=this.parseModuleSpecifier();this.consumeSemicolon()}else if(o){var r=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}else{this.consumeSemicolon()}e=this.finalize(t,new a.ExportNamedDeclaration(null,u,h))}return e};return Parser}();e.Parser=c},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});function assert(t,e){if(!t){throw new Error("ASSERT: "+e)}}e.assert=assert},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});var i=function(){function ErrorHandler(){this.errors=[];this.tolerant=false}ErrorHandler.prototype.recordError=function(t){this.errors.push(t)};ErrorHandler.prototype.tolerate=function(t){if(this.tolerant){this.recordError(t)}else{throw t}};ErrorHandler.prototype.constructError=function(t,e){var i=new Error(t);try{throw i}catch(t){if(Object.create&&Object.defineProperty){i=Object.create(t);Object.defineProperty(i,"column",{value:e})}}return i};ErrorHandler.prototype.createError=function(t,e,i,r){var n="Line "+e+": "+r;var s=this.constructError(n,i);s.index=t;s.lineNumber=e;s.description=r;return s};ErrorHandler.prototype.throwError=function(t,e,i,r){throw this.createError(t,e,i,r)};ErrorHandler.prototype.tolerateError=function(t,e,i,r){var n=this.createError(t,e,i,r);if(this.tolerant){this.recordError(n)}else{throw n}};return ErrorHandler}();e.ErrorHandler=i},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(9);var n=i(4);var s=i(11);function hexValue(t){return"0123456789abcdef".indexOf(t.toLowerCase())}function octalValue(t){return"01234567".indexOf(t)}var a=function(){function Scanner(t,e){this.source=t;this.errorHandler=e;this.trackComment=false;this.isModule=false;this.length=t.length;this.index=0;this.lineNumber=t.length>0?1:0;this.lineStart=0;this.curlyStack=[]}Scanner.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}};Scanner.prototype.restoreState=function(t){this.index=t.index;this.lineNumber=t.lineNumber;this.lineStart=t.lineStart};Scanner.prototype.eof=function(){return this.index>=this.length};Scanner.prototype.throwUnexpectedToken=function(t){if(t===void 0){t=s.Messages.UnexpectedTokenIllegal}return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,t)};Scanner.prototype.tolerateUnexpectedToken=function(t){if(t===void 0){t=s.Messages.UnexpectedTokenIllegal}this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,t)};Scanner.prototype.skipSingleLineComment=function(t){var e=[];var i,r;if(this.trackComment){e=[];i=this.index-t;r={start:{line:this.lineNumber,column:this.index-this.lineStart-t},end:{}}}while(!this.eof()){var s=this.source.charCodeAt(this.index);++this.index;if(n.Character.isLineTerminator(s)){if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:false,slice:[i+t,this.index-1],range:[i,this.index-1],loc:r};e.push(a)}if(s===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;return e}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:false,slice:[i+t,this.index],range:[i,this.index],loc:r};e.push(a)}return e};Scanner.prototype.skipMultiLineComment=function(){var t=[];var e,i;if(this.trackComment){t=[];e=this.index-2;i={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}}}while(!this.eof()){var r=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(r)){if(r===13&&this.source.charCodeAt(this.index+1)===10){++this.index}++this.lineNumber;++this.index;this.lineStart=this.index}else if(r===42){if(this.source.charCodeAt(this.index+1)===47){this.index+=2;if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:true,slice:[e+2,this.index-2],range:[e,this.index],loc:i};t.push(s)}return t}++this.index}else{++this.index}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:true,slice:[e+2,this.index],range:[e,this.index],loc:i};t.push(s)}this.tolerateUnexpectedToken();return t};Scanner.prototype.scanComments=function(){var t;if(this.trackComment){t=[]}var e=this.index===0;while(!this.eof()){var i=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(i)){++this.index}else if(n.Character.isLineTerminator(i)){++this.index;if(i===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;e=true}else if(i===47){i=this.source.charCodeAt(this.index+1);if(i===47){this.index+=2;var r=this.skipSingleLineComment(2);if(this.trackComment){t=t.concat(r)}e=true}else if(i===42){this.index+=2;var r=this.skipMultiLineComment();if(this.trackComment){t=t.concat(r)}}else{break}}else if(e&&i===45){if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var r=this.skipSingleLineComment(3);if(this.trackComment){t=t.concat(r)}}else{break}}else if(i===60&&!this.isModule){if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var r=this.skipSingleLineComment(4);if(this.trackComment){t=t.concat(r)}}else{break}}else{break}}return t};Scanner.prototype.isFutureReservedWord=function(t){switch(t){case"enum":case"export":case"import":case"super":return true;default:return false}};Scanner.prototype.isStrictModeReservedWord=function(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}};Scanner.prototype.isRestrictedWord=function(t){return t==="eval"||t==="arguments"};Scanner.prototype.isKeyword=function(t){switch(t.length){case 2:return t==="if"||t==="in"||t==="do";case 3:return t==="var"||t==="for"||t==="new"||t==="try"||t==="let";case 4:return t==="this"||t==="else"||t==="case"||t==="void"||t==="with"||t==="enum";case 5:return t==="while"||t==="break"||t==="catch"||t==="throw"||t==="const"||t==="yield"||t==="class"||t==="super";case 6:return t==="return"||t==="typeof"||t==="delete"||t==="switch"||t==="export"||t==="import";case 7:return t==="default"||t==="finally"||t==="extends";case 8:return t==="function"||t==="continue"||t==="debugger";case 10:return t==="instanceof";default:return false}};Scanner.prototype.codePointAt=function(t){var e=this.source.charCodeAt(t);if(e>=55296&&e<=56319){var i=this.source.charCodeAt(t+1);if(i>=56320&&i<=57343){var r=e;e=(r-55296)*1024+i-56320+65536}}return e};Scanner.prototype.scanHexEscape=function(t){var e=t==="u"?4:2;var i=0;for(var r=0;r1114111||t!=="}"){this.throwUnexpectedToken()}return n.Character.fromCodePoint(e)};Scanner.prototype.getIdentifier=function(){var t=this.index++;while(!this.eof()){var e=this.source.charCodeAt(this.index);if(e===92){this.index=t;return this.getComplexIdentifier()}else if(e>=55296&&e<57343){this.index=t;return this.getComplexIdentifier()}if(n.Character.isIdentifierPart(e)){++this.index}else{break}}return this.source.slice(t,this.index)};Scanner.prototype.getComplexIdentifier=function(){var t=this.codePointAt(this.index);var e=n.Character.fromCodePoint(t);this.index+=e.length;var i;if(t===92){if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;i=this.scanUnicodeCodePointEscape()}else{i=this.scanHexEscape("u");if(i===null||i==="\\"||!n.Character.isIdentifierStart(i.charCodeAt(0))){this.throwUnexpectedToken()}}e=i}while(!this.eof()){t=this.codePointAt(this.index);if(!n.Character.isIdentifierPart(t)){break}i=n.Character.fromCodePoint(t);e+=i;this.index+=i.length;if(t===92){e=e.substr(0,e.length-1);if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;i=this.scanUnicodeCodePointEscape()}else{i=this.scanHexEscape("u");if(i===null||i==="\\"||!n.Character.isIdentifierPart(i.charCodeAt(0))){this.throwUnexpectedToken()}}e+=i}}return e};Scanner.prototype.octalToDecimal=function(t){var e=t!=="0";var i=octalValue(t);if(!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){e=true;i=i*8+octalValue(this.source[this.index++]);if("0123".indexOf(t)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){i=i*8+octalValue(this.source[this.index++])}}return{code:i,octal:e}};Scanner.prototype.scanIdentifier=function(){var t;var e=this.index;var i=this.source.charCodeAt(e)===92?this.getComplexIdentifier():this.getIdentifier();if(i.length===1){t=3}else if(this.isKeyword(i)){t=4}else if(i==="null"){t=5}else if(i==="true"||i==="false"){t=1}else{t=3}if(t!==3&&e+i.length!==this.index){var r=this.index;this.index=e;this.tolerateUnexpectedToken(s.Messages.InvalidEscapedReservedWord);this.index=r}return{type:t,value:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanPunctuator=function(){var t=this.index;var e=this.source[this.index];switch(e){case"(":case"{":if(e==="{"){this.curlyStack.push("{")}++this.index;break;case".":++this.index;if(this.source[this.index]==="."&&this.source[this.index+1]==="."){this.index+=2;e="..."}break;case"}":++this.index;this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:e=this.source.substr(this.index,4);if(e===">>>="){this.index+=4}else{e=e.substr(0,3);if(e==="==="||e==="!=="||e===">>>"||e==="<<="||e===">>="||e==="**="){this.index+=3}else{e=e.substr(0,2);if(e==="&&"||e==="||"||e==="=="||e==="!="||e==="+="||e==="-="||e==="*="||e==="/="||e==="++"||e==="--"||e==="<<"||e===">>"||e==="&="||e==="|="||e==="^="||e==="%="||e==="<="||e===">="||e==="=>"||e==="**"){this.index+=2}else{e=this.source[this.index];if("<>=!+-*%&|^/".indexOf(e)>=0){++this.index}}}}}if(this.index===t){this.throwUnexpectedToken()}return{type:7,value:e,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanHexLiteral=function(t){var e="";while(!this.eof()){if(!n.Character.isHexDigit(this.source.charCodeAt(this.index))){break}e+=this.source[this.index++]}if(e.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt("0x"+e,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanBinaryLiteral=function(t){var e="";var i;while(!this.eof()){i=this.source[this.index];if(i!=="0"&&i!=="1"){break}e+=this.source[this.index++]}if(e.length===0){this.throwUnexpectedToken()}if(!this.eof()){i=this.source.charCodeAt(this.index);if(n.Character.isIdentifierStart(i)||n.Character.isDecimalDigit(i)){this.throwUnexpectedToken()}}return{type:6,value:parseInt(e,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanOctalLiteral=function(t,e){var i="";var r=false;if(n.Character.isOctalDigit(t.charCodeAt(0))){r=true;i="0"+this.source[this.index++]}else{++this.index}while(!this.eof()){if(!n.Character.isOctalDigit(this.source.charCodeAt(this.index))){break}i+=this.source[this.index++]}if(!r&&i.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt(i,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.isImplicitOctalLiteral=function(){for(var t=this.index+1;t=0){r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(t,e,r){var a=parseInt(e||r,16);if(a>1114111){n.throwUnexpectedToken(s.Messages.InvalidRegExp)}if(a<=65535){return String.fromCharCode(a)}return i}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,i)}try{RegExp(r)}catch(t){this.throwUnexpectedToken(s.Messages.InvalidRegExp)}try{return new RegExp(t,e)}catch(t){return null}};Scanner.prototype.scanRegExpBody=function(){var t=this.source[this.index];r.assert(t==="/","Regular expression literal must start with a slash");var e=this.source[this.index++];var i=false;var a=false;while(!this.eof()){t=this.source[this.index++];e+=t;if(t==="\\"){t=this.source[this.index++];if(n.Character.isLineTerminator(t.charCodeAt(0))){this.throwUnexpectedToken(s.Messages.UnterminatedRegExp)}e+=t}else if(n.Character.isLineTerminator(t.charCodeAt(0))){this.throwUnexpectedToken(s.Messages.UnterminatedRegExp)}else if(i){if(t==="]"){i=false}}else{if(t==="/"){a=true;break}else if(t==="["){i=true}}}if(!a){this.throwUnexpectedToken(s.Messages.UnterminatedRegExp)}return e.substr(1,e.length-2)};Scanner.prototype.scanRegExpFlags=function(){var t="";var e="";while(!this.eof()){var i=this.source[this.index];if(!n.Character.isIdentifierPart(i.charCodeAt(0))){break}++this.index;if(i==="\\"&&!this.eof()){i=this.source[this.index];if(i==="u"){++this.index;var r=this.index;var s=this.scanHexEscape("u");if(s!==null){e+=s;for(t+="\\u";r=55296&&t<57343){if(n.Character.isIdentifierStart(this.codePointAt(this.index))){return this.scanIdentifier()}}return this.scanPunctuator()};return Scanner}();e.Scanner=a},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.TokenName={};e.TokenName[1]="Boolean";e.TokenName[2]="";e.TokenName[3]="Identifier";e.TokenName[4]="Keyword";e.TokenName[5]="Null";e.TokenName[6]="Numeric";e.TokenName[7]="Punctuator";e.TokenName[8]="String";e.TokenName[9]="RegularExpression";e.TokenName[10]="Template"},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:true});e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:true});var r=i(10);var n=i(12);var s=i(13);var a=function(){function Reader(){this.values=[];this.curly=this.paren=-1}Reader.prototype.beforeFunctionExpression=function(t){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(t)>=0};Reader.prototype.isRegexStart=function(){var t=this.values[this.values.length-1];var e=t!==null;switch(t){case"this":case"]":e=false;break;case")":var i=this.values[this.paren-1];e=i==="if"||i==="while"||i==="for"||i==="with";break;case"}":e=false;if(this.values[this.curly-3]==="function"){var r=this.values[this.curly-4];e=r?!this.beforeFunctionExpression(r):false}else if(this.values[this.curly-4]==="function"){var r=this.values[this.curly-5];e=r?!this.beforeFunctionExpression(r):true}break;default:break}return e};Reader.prototype.push=function(t){if(t.type===7||t.type===4){if(t.value==="{"){this.curly=this.values.length}else if(t.value==="("){this.paren=this.values.length}this.values.push(t.value)}else{this.values.push(null)}};return Reader}();var u=function(){function Tokenizer(t,e){this.errorHandler=new r.ErrorHandler;this.errorHandler.tolerant=e?typeof e.tolerant==="boolean"&&e.tolerant:false;this.scanner=new n.Scanner(t,this.errorHandler);this.scanner.trackComment=e?typeof e.comment==="boolean"&&e.comment:false;this.trackRange=e?typeof e.range==="boolean"&&e.range:false;this.trackLoc=e?typeof e.loc==="boolean"&&e.loc:false;this.buffer=[];this.reader=new a}Tokenizer.prototype.errors=function(){return this.errorHandler.errors};Tokenizer.prototype.getNextToken=function(){if(this.buffer.length===0){var t=this.scanner.scanComments();if(this.scanner.trackComment){for(var e=0;e{"use strict";const e=Object.prototype.hasOwnProperty;t.exports=((t,i)=>e.call(t,i))},332:t=>{"use strict";var e="";var i;t.exports=repeat;function repeat(t,r){if(typeof t!=="string"){throw new TypeError("expected a string")}if(r===1)return t;if(r===2)return t+t;var n=t.length*r;if(i!==t||typeof i==="undefined"){i=t;e=""}else if(e.length>=n){return e.substr(0,n)}while(n>e.length&&r>1){if(r&1){e+=t}r>>=1;t+=t}e+=t;e=e.substr(0,n);return e}}};var e={};function __nccwpck_require__(i){if(e[i]){return e[i].exports}var r=e[i]={exports:{}};var n=true;try{t[i].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete e[i]}return r.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(20)})(); \ No newline at end of file diff --git a/packages/next/compiled/compression/index.js b/packages/next/compiled/compression/index.js index 1680ca67590adba..e625c5473138034 100644 --- a/packages/next/compiled/compression/index.js +++ b/packages/next/compiled/compression/index.js @@ -1 +1 @@ -module.exports=(()=>{var e={990:e=>{"use strict";e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["ecma","es"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","compressible":true},"application/fhir+xml":{"source":"iana","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/mrb-publish+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/msc-ivr+xml":{"source":"iana","compressible":true},"application/msc-mixer+xml":{"source":"iana","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana"},"application/news-groupinfo":{"source":"iana"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana"},"application/nss":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana"},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","compressible":true},"application/pidf-diff+xml":{"source":"iana","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana"},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["keynote"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana"},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana"},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"apache","extensions":["der","crt","pem"]},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana"},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana"},"image/avcs":{"source":"iana"},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shex":{"extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana"},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana"},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')},138:(e,a,i)=>{"use strict";var n=i(399);var s=i(126);e.exports=Accepts;function Accepts(e){if(!(this instanceof Accepts)){return new Accepts(e)}this.headers=e.headers;this.negotiator=new n(e)}Accepts.prototype.type=Accepts.prototype.types=function(e){var a=e;if(a&&!Array.isArray(a)){a=new Array(arguments.length);for(var i=0;i{"use strict";var n=i(310);var s=/^text\/|\+(?:json|text|xml)$/i;var o=/^\s*([^;\s]*)(?:;|\s|$)/;e.exports=compressible;function compressible(e){if(!e||typeof e!=="string"){return false}var a=o.exec(e);var i=a&&a[1].toLowerCase();var c=n[i];if(c&&c.compressible!==undefined){return c.compressible}return s.test(i)||undefined}},557:(e,a,i)=>{"use strict";var n=i(138);var s=i(800).Buffer;var o=i(526);var c=i(8);var t=i(185)("compression");var p=i(215);var r=i(921);var l=i(761);e.exports=compression;e.exports.filter=shouldCompress;var u=/(?:^|,)\s*?no-transform\s*?(?:,|$)/;function compression(e){var a=e||{};var i=a.filter||shouldCompress;var s=o.parse(a.threshold);if(s==null){s=1024}return function compression(e,o,c){var u=false;var m;var d=[];var x;var v=o.end;var f=o.on;var b=o.write;o.flush=function flush(){if(x){x.flush()}};o.write=function write(e,a){if(u){return false}if(!this._header){this._implicitHeader()}return x?x.write(toBuffer(e,a)):b.call(this,e,a)};o.end=function end(e,a){if(u){return false}if(!this._header){if(!this.getHeader("Content-Length")){m=chunkLength(e,a)}this._implicitHeader()}if(!x){return v.call(this,e,a)}u=true;return e?x.end(toBuffer(e,a)):x.end()};o.on=function on(e,a){if(!d||e!=="drain"){return f.call(this,e,a)}if(x){return x.on(e,a)}d.push([e,a]);return this};function nocompress(e){t("no compression: %s",e);addListeners(o,f,d);d=null}p(o,function onResponseHeaders(){if(!i(e,o)){nocompress("filtered");return}if(!shouldTransform(e,o)){nocompress("no transform");return}r(o,"Accept-Encoding");if(Number(o.getHeader("Content-Length")){"use strict";e.exports=bytes;e.exports.format=format;e.exports.parse=parse;var a=/\B(?=(\d{3})+(?!\d))/g;var i=/(?:\.0*|(\.[^0]+)0+)$/;var n={b:1,kb:1<<10,mb:1<<20,gb:1<<30,tb:(1<<30)*1024};var s=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;function bytes(e,a){if(typeof e==="string"){return parse(e)}if(typeof e==="number"){return format(e,a)}return null}function format(e,s){if(!Number.isFinite(e)){return null}var o=Math.abs(e);var c=s&&s.thousandsSeparator||"";var t=s&&s.unitSeparator||"";var p=s&&s.decimalPlaces!==undefined?s.decimalPlaces:2;var r=Boolean(s&&s.fixedDecimals);var l=s&&s.unit||"";if(!l||!n[l.toLowerCase()]){if(o>=n.tb){l="TB"}else if(o>=n.gb){l="GB"}else if(o>=n.mb){l="MB"}else if(o>=n.kb){l="KB"}else{l="B"}}var u=e/n[l.toLowerCase()];var m=u.toFixed(p);if(!r){m=m.replace(i,"$1")}if(c){m=m.replace(a,c)}return m+t+l}function parse(e){if(typeof e==="number"&&!isNaN(e)){return e}if(typeof e!=="string"){return null}var a=s.exec(e);var i;var o="b";if(!a){i=parseInt(e,10);o="b"}else{i=parseFloat(a[1]);o=a[4].toLowerCase()}return Math.floor(n[o]*i)}},800:(e,a,i)=>{var n=i(293);var s=n.Buffer;function copyProps(e,a){for(var i in e){a[i]=e[i]}}if(s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow){e.exports=n}else{copyProps(n,a);a.Buffer=SafeBuffer}function SafeBuffer(e,a,i){return s(e,a,i)}copyProps(s,SafeBuffer);SafeBuffer.from=function(e,a,i){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return s(e,a,i)};SafeBuffer.alloc=function(e,a,i){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var n=s(e);if(a!==undefined){if(typeof i==="string"){n.fill(a,i)}else{n.fill(a)}}else{n.fill(0)}return n};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(e)}},310:(e,a,i)=>{e.exports=i(990)},126:(e,a,i)=>{"use strict";var n=i(310);var s=i(622).extname;var o=/^\s*([^;\s]*)(?:;|\s|$)/;var c=/^text\//i;a.charset=charset;a.charsets={lookup:charset};a.contentType=contentType;a.extension=extension;a.extensions=Object.create(null);a.lookup=lookup;a.types=Object.create(null);populateMaps(a.extensions,a.types);function charset(e){if(!e||typeof e!=="string"){return false}var a=o.exec(e);var i=a&&n[a[1].toLowerCase()];if(i&&i.charset){return i.charset}if(a&&c.test(a[1])){return"UTF-8"}return false}function contentType(e){if(!e||typeof e!=="string"){return false}var i=e.indexOf("/")===-1?a.lookup(e):e;if(!i){return false}if(i.indexOf("charset")===-1){var n=a.charset(i);if(n)i+="; charset="+n.toLowerCase()}return i}function extension(e){if(!e||typeof e!=="string"){return false}var i=o.exec(e);var n=i&&a.extensions[i[1].toLowerCase()];if(!n||!n.length){return false}return n[0]}function lookup(e){if(!e||typeof e!=="string"){return false}var i=s("x."+e).toLowerCase().substr(1);if(!i){return false}return a.types[i]||false}function populateMaps(e,a){var i=["nginx","apache",undefined,"iana"];Object.keys(n).forEach(function forEachMimeType(s){var o=n[s];var c=o.extensions;if(!c||!c.length){return}e[s]=c;for(var t=0;tl||r===l&&a[p].substr(0,12)==="application/")){continue}}a[p]=s}})}},399:(e,a,i)=>{"use strict";var n=Object.create(null);e.exports=Negotiator;e.exports.Negotiator=Negotiator;function Negotiator(e){if(!(this instanceof Negotiator)){return new Negotiator(e)}this.request=e}Negotiator.prototype.charset=function charset(e){var a=this.charsets(e);return a&&a[0]};Negotiator.prototype.charsets=function charsets(e){var a=loadModule("charset").preferredCharsets;return a(this.request.headers["accept-charset"],e)};Negotiator.prototype.encoding=function encoding(e){var a=this.encodings(e);return a&&a[0]};Negotiator.prototype.encodings=function encodings(e){var a=loadModule("encoding").preferredEncodings;return a(this.request.headers["accept-encoding"],e)};Negotiator.prototype.language=function language(e){var a=this.languages(e);return a&&a[0]};Negotiator.prototype.languages=function languages(e){var a=loadModule("language").preferredLanguages;return a(this.request.headers["accept-language"],e)};Negotiator.prototype.mediaType=function mediaType(e){var a=this.mediaTypes(e);return a&&a[0]};Negotiator.prototype.mediaTypes=function mediaTypes(e){var a=loadModule("mediaType").preferredMediaTypes;return a(this.request.headers.accept,e)};Negotiator.prototype.preferredCharset=Negotiator.prototype.charset;Negotiator.prototype.preferredCharsets=Negotiator.prototype.charsets;Negotiator.prototype.preferredEncoding=Negotiator.prototype.encoding;Negotiator.prototype.preferredEncodings=Negotiator.prototype.encodings;Negotiator.prototype.preferredLanguage=Negotiator.prototype.language;Negotiator.prototype.preferredLanguages=Negotiator.prototype.languages;Negotiator.prototype.preferredMediaType=Negotiator.prototype.mediaType;Negotiator.prototype.preferredMediaTypes=Negotiator.prototype.mediaTypes;function loadModule(e){var a=n[e];if(a!==undefined){return a}switch(e){case"charset":a=i(935);break;case"encoding":a=i(916);break;case"language":a=i(842);break;case"mediaType":a=i(463);break;default:throw new Error("Cannot find module '"+e+"'")}n[e]=a;return a}},935:e=>{"use strict";e.exports=preferredCharsets;e.exports.preferredCharsets=preferredCharsets;var a=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function parseAcceptCharset(e){var a=e.split(",");for(var i=0,n=0;i0}},916:e=>{"use strict";e.exports=preferredEncodings;e.exports.preferredEncodings=preferredEncodings;var a=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function parseAcceptEncoding(e){var a=e.split(",");var i=false;var n=1;for(var s=0,o=0;s0}},842:e=>{"use strict";e.exports=preferredLanguages;e.exports.preferredLanguages=preferredLanguages;var a=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function parseAcceptLanguage(e){var a=e.split(",");for(var i=0,n=0;i0}},463:e=>{"use strict";e.exports=preferredMediaTypes;e.exports.preferredMediaTypes=preferredMediaTypes;var a=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function parseAccept(e){var a=splitMediaTypes(e);for(var i=0,n=0;i0){if(o.every(function(e){return a.params[e]=="*"||(a.params[e]||"").toLowerCase()==(n.params[e]||"").toLowerCase()})){s|=1}else{return null}}return{i:i,o:a.i,q:a.q,s:s}}function preferredMediaTypes(e,a){var i=parseAccept(e===undefined?"*/*":e||"");if(!a){return i.filter(isQuality).sort(compareSpecs).map(getFullType)}var n=a.map(function getPriority(e,a){return getMediaTypePriority(e,i,a)});return n.filter(isQuality).sort(compareSpecs).map(function getType(e){return a[n.indexOf(e)]})}function compareSpecs(e,a){return a.q-e.q||a.s-e.s||e.o-a.o||e.i-a.i||0}function getFullType(e){return e.type+"/"+e.subtype}function isQuality(e){return e.q>0}function quoteCount(e){var a=0;var i=0;while((i=e.indexOf('"',i))!==-1){a++;i++}return a}function splitKeyValuePair(e){var a=e.indexOf("=");var i;var n;if(a===-1){i=e}else{i=e.substr(0,a);n=e.substr(a+1)}return[i,n]}function splitMediaTypes(e){var a=e.split(",");for(var i=1,n=0;i{"use strict";e.exports=onHeaders;function createWriteHead(e,a){var i=false;return function writeHead(n){var s=setWriteHeadHeaders.apply(this,arguments);if(!i){i=true;a.call(this);if(typeof s[0]==="number"&&this.statusCode!==s[0]){s[0]=this.statusCode;s.length=1}}return e.apply(this,s)}}function onHeaders(e,a){if(!e){throw new TypeError("argument res is required")}if(typeof a!=="function"){throw new TypeError("argument listener must be a function")}e.writeHead=createWriteHead(e.writeHead,a)}function setHeadersFromArray(e,a){for(var i=0;i1&&typeof arguments[1]==="string"?2:1;var n=a>=i+1?arguments[i]:undefined;this.statusCode=e;if(Array.isArray(n)){setHeadersFromArray(this,n)}else if(n){setHeadersFromObject(this,n)}var s=new Array(Math.min(a,i));for(var o=0;o{"use strict";e.exports=vary;e.exports.append=append;var a=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function append(e,i){if(typeof e!=="string"){throw new TypeError("header argument is required")}if(!i){throw new TypeError("field argument is required")}var n=!Array.isArray(i)?parse(String(i)):i;for(var s=0;s{"use strict";e.exports=require("buffer")},185:e=>{"use strict";e.exports=require("next/dist/compiled/debug")},622:e=>{"use strict";e.exports=require("path")},761:e=>{"use strict";e.exports=require("zlib")}};var a={};function __webpack_require__(i){if(a[i]){return a[i].exports}var n=a[i]={exports:{}};var s=true;try{e[i](n,n.exports,__webpack_require__);s=false}finally{if(s)delete a[i]}return n.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(557)})(); \ No newline at end of file +module.exports=(()=>{var e={990:e=>{"use strict";e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["ecma","es"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","compressible":true},"application/fhir+xml":{"source":"iana","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/mrb-publish+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/msc-ivr+xml":{"source":"iana","compressible":true},"application/msc-mixer+xml":{"source":"iana","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana"},"application/news-groupinfo":{"source":"iana"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana"},"application/nss":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana"},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","compressible":true},"application/pidf-diff+xml":{"source":"iana","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana"},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["keynote"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana"},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana"},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"apache","extensions":["der","crt","pem"]},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana"},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana"},"image/avcs":{"source":"iana"},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shex":{"extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana"},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana"},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')},138:(e,a,i)=>{"use strict";var n=i(399);var s=i(126);e.exports=Accepts;function Accepts(e){if(!(this instanceof Accepts)){return new Accepts(e)}this.headers=e.headers;this.negotiator=new n(e)}Accepts.prototype.type=Accepts.prototype.types=function(e){var a=e;if(a&&!Array.isArray(a)){a=new Array(arguments.length);for(var i=0;i{"use strict";var n=i(310);var s=/^text\/|\+(?:json|text|xml)$/i;var o=/^\s*([^;\s]*)(?:;|\s|$)/;e.exports=compressible;function compressible(e){if(!e||typeof e!=="string"){return false}var a=o.exec(e);var i=a&&a[1].toLowerCase();var c=n[i];if(c&&c.compressible!==undefined){return c.compressible}return s.test(i)||undefined}},557:(e,a,i)=>{"use strict";var n=i(138);var s=i(800).Buffer;var o=i(526);var c=i(8);var t=i(185)("compression");var p=i(215);var r=i(921);var l=i(761);e.exports=compression;e.exports.filter=shouldCompress;var u=/(?:^|,)\s*?no-transform\s*?(?:,|$)/;function compression(e){var a=e||{};var i=a.filter||shouldCompress;var s=o.parse(a.threshold);if(s==null){s=1024}return function compression(e,o,c){var u=false;var m;var d=[];var x;var v=o.end;var f=o.on;var b=o.write;o.flush=function flush(){if(x){x.flush()}};o.write=function write(e,a){if(u){return false}if(!this._header){this._implicitHeader()}return x?x.write(toBuffer(e,a)):b.call(this,e,a)};o.end=function end(e,a){if(u){return false}if(!this._header){if(!this.getHeader("Content-Length")){m=chunkLength(e,a)}this._implicitHeader()}if(!x){return v.call(this,e,a)}u=true;return e?x.end(toBuffer(e,a)):x.end()};o.on=function on(e,a){if(!d||e!=="drain"){return f.call(this,e,a)}if(x){return x.on(e,a)}d.push([e,a]);return this};function nocompress(e){t("no compression: %s",e);addListeners(o,f,d);d=null}p(o,function onResponseHeaders(){if(!i(e,o)){nocompress("filtered");return}if(!shouldTransform(e,o)){nocompress("no transform");return}r(o,"Accept-Encoding");if(Number(o.getHeader("Content-Length")){"use strict";e.exports=bytes;e.exports.format=format;e.exports.parse=parse;var a=/\B(?=(\d{3})+(?!\d))/g;var i=/(?:\.0*|(\.[^0]+)0+)$/;var n={b:1,kb:1<<10,mb:1<<20,gb:1<<30,tb:(1<<30)*1024};var s=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;function bytes(e,a){if(typeof e==="string"){return parse(e)}if(typeof e==="number"){return format(e,a)}return null}function format(e,s){if(!Number.isFinite(e)){return null}var o=Math.abs(e);var c=s&&s.thousandsSeparator||"";var t=s&&s.unitSeparator||"";var p=s&&s.decimalPlaces!==undefined?s.decimalPlaces:2;var r=Boolean(s&&s.fixedDecimals);var l=s&&s.unit||"";if(!l||!n[l.toLowerCase()]){if(o>=n.tb){l="TB"}else if(o>=n.gb){l="GB"}else if(o>=n.mb){l="MB"}else if(o>=n.kb){l="KB"}else{l="B"}}var u=e/n[l.toLowerCase()];var m=u.toFixed(p);if(!r){m=m.replace(i,"$1")}if(c){m=m.replace(a,c)}return m+t+l}function parse(e){if(typeof e==="number"&&!isNaN(e)){return e}if(typeof e!=="string"){return null}var a=s.exec(e);var i;var o="b";if(!a){i=parseInt(e,10);o="b"}else{i=parseFloat(a[1]);o=a[4].toLowerCase()}return Math.floor(n[o]*i)}},800:(e,a,i)=>{var n=i(293);var s=n.Buffer;function copyProps(e,a){for(var i in e){a[i]=e[i]}}if(s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow){e.exports=n}else{copyProps(n,a);a.Buffer=SafeBuffer}function SafeBuffer(e,a,i){return s(e,a,i)}copyProps(s,SafeBuffer);SafeBuffer.from=function(e,a,i){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return s(e,a,i)};SafeBuffer.alloc=function(e,a,i){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var n=s(e);if(a!==undefined){if(typeof i==="string"){n.fill(a,i)}else{n.fill(a)}}else{n.fill(0)}return n};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(e)}},310:(e,a,i)=>{e.exports=i(990)},126:(e,a,i)=>{"use strict";var n=i(310);var s=i(622).extname;var o=/^\s*([^;\s]*)(?:;|\s|$)/;var c=/^text\//i;a.charset=charset;a.charsets={lookup:charset};a.contentType=contentType;a.extension=extension;a.extensions=Object.create(null);a.lookup=lookup;a.types=Object.create(null);populateMaps(a.extensions,a.types);function charset(e){if(!e||typeof e!=="string"){return false}var a=o.exec(e);var i=a&&n[a[1].toLowerCase()];if(i&&i.charset){return i.charset}if(a&&c.test(a[1])){return"UTF-8"}return false}function contentType(e){if(!e||typeof e!=="string"){return false}var i=e.indexOf("/")===-1?a.lookup(e):e;if(!i){return false}if(i.indexOf("charset")===-1){var n=a.charset(i);if(n)i+="; charset="+n.toLowerCase()}return i}function extension(e){if(!e||typeof e!=="string"){return false}var i=o.exec(e);var n=i&&a.extensions[i[1].toLowerCase()];if(!n||!n.length){return false}return n[0]}function lookup(e){if(!e||typeof e!=="string"){return false}var i=s("x."+e).toLowerCase().substr(1);if(!i){return false}return a.types[i]||false}function populateMaps(e,a){var i=["nginx","apache",undefined,"iana"];Object.keys(n).forEach(function forEachMimeType(s){var o=n[s];var c=o.extensions;if(!c||!c.length){return}e[s]=c;for(var t=0;tl||r===l&&a[p].substr(0,12)==="application/")){continue}}a[p]=s}})}},399:(e,a,i)=>{"use strict";var n=Object.create(null);e.exports=Negotiator;e.exports.Negotiator=Negotiator;function Negotiator(e){if(!(this instanceof Negotiator)){return new Negotiator(e)}this.request=e}Negotiator.prototype.charset=function charset(e){var a=this.charsets(e);return a&&a[0]};Negotiator.prototype.charsets=function charsets(e){var a=loadModule("charset").preferredCharsets;return a(this.request.headers["accept-charset"],e)};Negotiator.prototype.encoding=function encoding(e){var a=this.encodings(e);return a&&a[0]};Negotiator.prototype.encodings=function encodings(e){var a=loadModule("encoding").preferredEncodings;return a(this.request.headers["accept-encoding"],e)};Negotiator.prototype.language=function language(e){var a=this.languages(e);return a&&a[0]};Negotiator.prototype.languages=function languages(e){var a=loadModule("language").preferredLanguages;return a(this.request.headers["accept-language"],e)};Negotiator.prototype.mediaType=function mediaType(e){var a=this.mediaTypes(e);return a&&a[0]};Negotiator.prototype.mediaTypes=function mediaTypes(e){var a=loadModule("mediaType").preferredMediaTypes;return a(this.request.headers.accept,e)};Negotiator.prototype.preferredCharset=Negotiator.prototype.charset;Negotiator.prototype.preferredCharsets=Negotiator.prototype.charsets;Negotiator.prototype.preferredEncoding=Negotiator.prototype.encoding;Negotiator.prototype.preferredEncodings=Negotiator.prototype.encodings;Negotiator.prototype.preferredLanguage=Negotiator.prototype.language;Negotiator.prototype.preferredLanguages=Negotiator.prototype.languages;Negotiator.prototype.preferredMediaType=Negotiator.prototype.mediaType;Negotiator.prototype.preferredMediaTypes=Negotiator.prototype.mediaTypes;function loadModule(e){var a=n[e];if(a!==undefined){return a}switch(e){case"charset":a=i(935);break;case"encoding":a=i(916);break;case"language":a=i(842);break;case"mediaType":a=i(463);break;default:throw new Error("Cannot find module '"+e+"'")}n[e]=a;return a}},935:e=>{"use strict";e.exports=preferredCharsets;e.exports.preferredCharsets=preferredCharsets;var a=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function parseAcceptCharset(e){var a=e.split(",");for(var i=0,n=0;i0}},916:e=>{"use strict";e.exports=preferredEncodings;e.exports.preferredEncodings=preferredEncodings;var a=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function parseAcceptEncoding(e){var a=e.split(",");var i=false;var n=1;for(var s=0,o=0;s0}},842:e=>{"use strict";e.exports=preferredLanguages;e.exports.preferredLanguages=preferredLanguages;var a=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function parseAcceptLanguage(e){var a=e.split(",");for(var i=0,n=0;i0}},463:e=>{"use strict";e.exports=preferredMediaTypes;e.exports.preferredMediaTypes=preferredMediaTypes;var a=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function parseAccept(e){var a=splitMediaTypes(e);for(var i=0,n=0;i0){if(o.every(function(e){return a.params[e]=="*"||(a.params[e]||"").toLowerCase()==(n.params[e]||"").toLowerCase()})){s|=1}else{return null}}return{i:i,o:a.i,q:a.q,s:s}}function preferredMediaTypes(e,a){var i=parseAccept(e===undefined?"*/*":e||"");if(!a){return i.filter(isQuality).sort(compareSpecs).map(getFullType)}var n=a.map(function getPriority(e,a){return getMediaTypePriority(e,i,a)});return n.filter(isQuality).sort(compareSpecs).map(function getType(e){return a[n.indexOf(e)]})}function compareSpecs(e,a){return a.q-e.q||a.s-e.s||e.o-a.o||e.i-a.i||0}function getFullType(e){return e.type+"/"+e.subtype}function isQuality(e){return e.q>0}function quoteCount(e){var a=0;var i=0;while((i=e.indexOf('"',i))!==-1){a++;i++}return a}function splitKeyValuePair(e){var a=e.indexOf("=");var i;var n;if(a===-1){i=e}else{i=e.substr(0,a);n=e.substr(a+1)}return[i,n]}function splitMediaTypes(e){var a=e.split(",");for(var i=1,n=0;i{"use strict";e.exports=onHeaders;function createWriteHead(e,a){var i=false;return function writeHead(n){var s=setWriteHeadHeaders.apply(this,arguments);if(!i){i=true;a.call(this);if(typeof s[0]==="number"&&this.statusCode!==s[0]){s[0]=this.statusCode;s.length=1}}return e.apply(this,s)}}function onHeaders(e,a){if(!e){throw new TypeError("argument res is required")}if(typeof a!=="function"){throw new TypeError("argument listener must be a function")}e.writeHead=createWriteHead(e.writeHead,a)}function setHeadersFromArray(e,a){for(var i=0;i1&&typeof arguments[1]==="string"?2:1;var n=a>=i+1?arguments[i]:undefined;this.statusCode=e;if(Array.isArray(n)){setHeadersFromArray(this,n)}else if(n){setHeadersFromObject(this,n)}var s=new Array(Math.min(a,i));for(var o=0;o{"use strict";e.exports=vary;e.exports.append=append;var a=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function append(e,i){if(typeof e!=="string"){throw new TypeError("header argument is required")}if(!i){throw new TypeError("field argument is required")}var n=!Array.isArray(i)?parse(String(i)):i;for(var s=0;s{"use strict";e.exports=require("buffer")},185:e=>{"use strict";e.exports=require("next/dist/compiled/debug")},622:e=>{"use strict";e.exports=require("path")},761:e=>{"use strict";e.exports=require("zlib")}};var a={};function __nccwpck_require__(i){if(a[i]){return a[i].exports}var n=a[i]={exports:{}};var s=true;try{e[i](n,n.exports,__nccwpck_require__);s=false}finally{if(s)delete a[i]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(557)})(); \ No newline at end of file diff --git a/packages/next/compiled/conf/index.js b/packages/next/compiled/conf/index.js index 7eef191ee4e7a62..5d2f2acd8eae123 100644 --- a/packages/next/compiled/conf/index.js +++ b/packages/next/compiled/conf/index.js @@ -1 +1 @@ -module.exports=(()=>{var f={601:f=>{"use strict";f.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},8938:f=>{"use strict";f.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},1414:(f,e,n)=>{"use strict";var s=n(1645),l=n(2630),v=n(7246),r=n(7837),b=n(3600),g=n(9290),w=n(1665),j=n(6989),d=n(6057);f.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=n(75);var E=n(8093);Ajv.prototype.addKeyword=E.add;Ajv.prototype.getKeyword=E.get;Ajv.prototype.removeKeyword=E.remove;Ajv.prototype.validateKeyword=E.validate;var R=n(2718);Ajv.ValidationError=R.Validation;Ajv.MissingRefError=R.MissingRef;Ajv.$dataMetaSchema=j;var A="http://json-schema.org/draft-07/schema";var F=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var p=["/properties"];function Ajv(f){if(!(this instanceof Ajv))return new Ajv(f);f=this._opts=d.copy(f)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=g(f.format);this._cache=f.cache||new v;this._loadingSchemas={};this._compilations=[];this.RULES=w();this._getId=chooseGetId(f);f.loopRequired=f.loopRequired||Infinity;if(f.errorDataPath=="property")f._errorDataPathProperty=true;if(f.serialize===undefined)f.serialize=b;this._metaOpts=getMetaSchemaOptions(this);if(f.formats)addInitialFormats(this);if(f.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof f.meta=="object")this.addMetaSchema(f.meta);if(f.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(f,e){var n;if(typeof f=="string"){n=this.getSchema(f);if(!n)throw new Error('no schema with key or ref "'+f+'"')}else{var s=this._addSchema(f);n=s.validate||this._compile(s)}var l=n(e);if(n.$async!==true)this.errors=n.errors;return l}function compile(f,e){var n=this._addSchema(f,undefined,e);return n.validate||this._compile(n)}function addSchema(f,e,n,s){if(Array.isArray(f)){for(var v=0;v{"use strict";var e=f.exports=function Cache(){this._cache={}};e.prototype.put=function Cache_put(f,e){this._cache[f]=e};e.prototype.get=function Cache_get(f){return this._cache[f]};e.prototype.del=function Cache_del(f){delete this._cache[f]};e.prototype.clear=function Cache_clear(){this._cache={}}},75:(f,e,n)=>{"use strict";var s=n(2718).MissingRef;f.exports=compileAsync;function compileAsync(f,e,n){var l=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof e=="function"){n=e;e=undefined}var v=loadMetaSchemaOf(f).then(function(){var n=l._addSchema(f,undefined,e);return n.validate||_compileAsync(n)});if(n){v.then(function(f){n(null,f)},n)}return v;function loadMetaSchemaOf(f){var e=f.$schema;return e&&!l.getSchema(e)?compileAsync.call(l,{$ref:e},true):Promise.resolve()}function _compileAsync(f){try{return l._compile(f)}catch(f){if(f instanceof s)return loadMissingSchema(f);throw f}function loadMissingSchema(n){var s=n.missingSchema;if(added(s))throw new Error("Schema "+s+" is loaded but "+n.missingRef+" cannot be resolved");var v=l._loadingSchemas[s];if(!v){v=l._loadingSchemas[s]=l._opts.loadSchema(s);v.then(removePromise,removePromise)}return v.then(function(f){if(!added(s)){return loadMetaSchemaOf(f).then(function(){if(!added(s))l.addSchema(f,s,undefined,e)})}}).then(function(){return _compileAsync(f)});function removePromise(){delete l._loadingSchemas[s]}function added(f){return l._refs[f]||l._schemas[f]}}}}},2718:(f,e,n)=>{"use strict";var s=n(2630);f.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(f){this.message="validation failed";this.errors=f;this.ajv=this.validation=true}MissingRefError.message=function(f,e){return"can't resolve reference "+e+" from id "+f};function MissingRefError(f,e,n){this.message=n||MissingRefError.message(f,e);this.missingRef=s.url(f,e);this.missingSchema=s.normalizeId(s.fullPath(this.missingRef))}function errorSubclass(f){f.prototype=Object.create(Error.prototype);f.prototype.constructor=f;return f}},9290:(f,e,n)=>{"use strict";var s=n(6057);var l=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var v=[0,31,28,31,30,31,30,31,31,30,31,30,31];var r=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var b=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var w=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var j=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var d=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var E=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var R=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var A=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var F=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;f.exports=formats;function formats(f){f=f=="full"?"full":"fast";return s.copy(formats[f])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":j,url:d,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:b,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:E,"json-pointer":R,"json-pointer-uri-fragment":A,"relative-json-pointer":F};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":w,"uri-template":j,url:d,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:b,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:E,"json-pointer":R,"json-pointer-uri-fragment":A,"relative-json-pointer":F};function isLeapYear(f){return f%4===0&&(f%100!==0||f%400===0)}function date(f){var e=f.match(l);if(!e)return false;var n=+e[1];var s=+e[2];var r=+e[3];return s>=1&&s<=12&&r>=1&&r<=(s==2&&isLeapYear(n)?29:v[s])}function time(f,e){var n=f.match(r);if(!n)return false;var s=n[1];var l=n[2];var v=n[3];var b=n[5];return(s<=23&&l<=59&&v<=59||s==23&&l==59&&v==60)&&(!e||b)}var p=/t|\s/i;function date_time(f){var e=f.split(p);return e.length==2&&date(e[0])&&time(e[1],true)}var I=/\/|:/;function uri(f){return I.test(f)&&g.test(f)}var x=/[^\\]\\Z/;function regex(f){if(x.test(f))return false;try{new RegExp(f);return true}catch(f){return false}}},1645:(f,e,n)=>{"use strict";var s=n(2630),l=n(6057),v=n(2718),r=n(3600);var b=n(6131);var g=l.ucs2length;var w=n(3933);var j=v.Validation;f.exports=compile;function compile(f,e,n,d){var E=this,R=this._opts,A=[undefined],F={},p=[],I={},x=[],z={},U=[];e=e||{schema:f,refVal:A,refs:F};var N=checkCompiling.call(this,f,e,d);var Q=this._compilations[N.index];if(N.compiling)return Q.callValidate=callValidate;var q=this._formats;var O=this.RULES;try{var C=localCompile(f,e,n,d);Q.validate=C;var L=Q.callValidate;if(L){L.schema=C.schema;L.errors=null;L.refs=C.refs;L.refVal=C.refVal;L.root=C.root;L.$async=C.$async;if(R.sourceCode)L.source=C.source}return C}finally{endCompiling.call(this,f,e,d)}function callValidate(){var f=Q.validate;var e=f.apply(this,arguments);callValidate.errors=f.errors;return e}function localCompile(f,n,r,d){var I=!n||n&&n.schema==f;if(n.schema!=e.schema)return compile.call(E,f,n,r,d);var z=f.$async===true;var N=b({isTop:true,schema:f,isRoot:I,baseId:d,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:v.MissingRef,RULES:O,validate:b,util:l,resolve:s,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:R,formats:q,logger:E.logger,self:E});N=vars(A,refValCode)+vars(p,patternCode)+vars(x,defaultCode)+vars(U,customRuleCode)+N;if(R.processCode)N=R.processCode(N,f);var Q;try{var C=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",N);Q=C(E,O,q,e,A,x,U,w,g,j);A[0]=Q}catch(f){E.logger.error("Error compiling schema, function code:",N);throw f}Q.schema=f;Q.errors=null;Q.refs=F;Q.refVal=A;Q.root=I?Q:n;if(z)Q.$async=true;if(R.sourceCode===true){Q.source={code:N,patterns:p,defaults:x}}return Q}function resolveRef(f,l,v){l=s.url(f,l);var r=F[l];var b,g;if(r!==undefined){b=A[r];g="refVal["+r+"]";return resolvedRef(b,g)}if(!v&&e.refs){var w=e.refs[l];if(w!==undefined){b=e.refVal[w];g=addLocalRef(l,b);return resolvedRef(b,g)}}g=addLocalRef(l);var j=s.call(E,localCompile,e,l);if(j===undefined){var d=n&&n[l];if(d){j=s.inlineRef(d,R.inlineRefs)?d:compile.call(E,d,e,n,f)}}if(j===undefined){removeLocalRef(l)}else{replaceLocalRef(l,j);return resolvedRef(j,g)}}function addLocalRef(f,e){var n=A.length;A[n]=e;F[f]=n;return"refVal"+n}function removeLocalRef(f){delete F[f]}function replaceLocalRef(f,e){var n=F[f];A[n]=e}function resolvedRef(f,e){return typeof f=="object"||typeof f=="boolean"?{code:e,schema:f,inline:true}:{code:e,$async:f&&!!f.$async}}function usePattern(f){var e=I[f];if(e===undefined){e=I[f]=p.length;p[e]=f}return"pattern"+e}function useDefault(f){switch(typeof f){case"boolean":case"number":return""+f;case"string":return l.toQuotedString(f);case"object":if(f===null)return"null";var e=r(f);var n=z[e];if(n===undefined){n=z[e]=x.length;x[n]=f}return"default"+n}}function useCustomRule(f,e,n,s){if(E._opts.validateSchema!==false){var l=f.definition.dependencies;if(l&&!l.every(function(f){return Object.prototype.hasOwnProperty.call(n,f)}))throw new Error("parent schema must have all required keywords: "+l.join(","));var v=f.definition.validateSchema;if(v){var r=v(e);if(!r){var b="keyword schema is invalid: "+E.errorsText(v.errors);if(E._opts.validateSchema=="log")E.logger.error(b);else throw new Error(b)}}}var g=f.definition.compile,w=f.definition.inline,j=f.definition.macro;var d;if(g){d=g.call(E,e,n,s)}else if(j){d=j.call(E,e,n,s);if(R.validateSchema!==false)E.validateSchema(d,true)}else if(w){d=w.call(E,s,f.keyword,e,n)}else{d=f.definition.validate;if(!d)return}if(d===undefined)throw new Error('custom keyword "'+f.keyword+'"failed to compile');var A=U.length;U[A]=d;return{code:"customRule"+A,validate:d}}}function checkCompiling(f,e,n){var s=compIndex.call(this,f,e,n);if(s>=0)return{index:s,compiling:true};s=this._compilations.length;this._compilations[s]={schema:f,root:e,baseId:n};return{index:s,compiling:false}}function endCompiling(f,e,n){var s=compIndex.call(this,f,e,n);if(s>=0)this._compilations.splice(s,1)}function compIndex(f,e,n){for(var s=0;s{"use strict";var s=n(4007),l=n(3933),v=n(6057),r=n(7837),b=n(2437);f.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(f,e,n){var s=this._refs[n];if(typeof s=="string"){if(this._refs[s])s=this._refs[s];else return resolve.call(this,f,e,s)}s=s||this._schemas[n];if(s instanceof r){return inlineRef(s.schema,this._opts.inlineRefs)?s.schema:s.validate||this._compile(s)}var l=resolveSchema.call(this,e,n);var v,b,g;if(l){v=l.schema;e=l.root;g=l.baseId}if(v instanceof r){b=v.validate||f.call(this,v.schema,e,undefined,g)}else if(v!==undefined){b=inlineRef(v,this._opts.inlineRefs)?v:f.call(this,v,e,undefined,g)}return b}function resolveSchema(f,e){var n=s.parse(e),l=_getFullPath(n),v=getFullPath(this._getId(f.schema));if(Object.keys(f.schema).length===0||l!==v){var b=normalizeId(l);var g=this._refs[b];if(typeof g=="string"){return resolveRecursive.call(this,f,g,n)}else if(g instanceof r){if(!g.validate)this._compile(g);f=g}else{g=this._schemas[b];if(g instanceof r){if(!g.validate)this._compile(g);if(b==normalizeId(e))return{schema:g,root:f,baseId:v};f=g}else{return}}if(!f.schema)return;v=getFullPath(this._getId(f.schema))}return getJsonPointer.call(this,n,v,f.schema,f)}function resolveRecursive(f,e,n){var s=resolveSchema.call(this,f,e);if(s){var l=s.schema;var v=s.baseId;f=s.root;var r=this._getId(l);if(r)v=resolveUrl(v,r);return getJsonPointer.call(this,n,v,l,f)}}var g=v.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(f,e,n,s){f.fragment=f.fragment||"";if(f.fragment.slice(0,1)!="/")return;var l=f.fragment.split("/");for(var r=1;r{"use strict";var s=n(4124),l=n(6057).toHash;f.exports=function rules(){var f=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var e=["type","$comment"];var n=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var v=["number","integer","string","array","object","boolean","null"];f.all=l(e);f.types=l(v);f.forEach(function(n){n.rules=n.rules.map(function(n){var l;if(typeof n=="object"){var v=Object.keys(n)[0];l=n[v];n=v;l.forEach(function(n){e.push(n);f.all[n]=true})}e.push(n);var r=f.all[n]={keyword:n,code:s[n],implements:l};return r});f.all.$comment={keyword:"$comment",code:s.$comment};if(n.type)f.types[n.type]=n});f.keywords=l(e.concat(n));f.custom={};return f}},7837:(f,e,n)=>{"use strict";var s=n(6057);f.exports=SchemaObject;function SchemaObject(f){s.copy(f,this)}},9652:f=>{"use strict";f.exports=function ucs2length(f){var e=0,n=f.length,s=0,l;while(s=55296&&l<=56319&&s{"use strict";f.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:n(3933),ucs2length:n(9652),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(f,e){e=e||{};for(var n in f)e[n]=f[n];return e}function checkDataType(f,e,n,s){var l=s?" !== ":" === ",v=s?" || ":" && ",r=s?"!":"",b=s?"":"!";switch(f){case"null":return e+l+"null";case"array":return r+"Array.isArray("+e+")";case"object":return"("+r+e+v+"typeof "+e+l+'"object"'+v+b+"Array.isArray("+e+"))";case"integer":return"(typeof "+e+l+'"number"'+v+b+"("+e+" % 1)"+v+e+l+e+(n?v+r+"isFinite("+e+")":"")+")";case"number":return"(typeof "+e+l+'"'+f+'"'+(n?v+r+"isFinite("+e+")":"")+")";default:return"typeof "+e+l+'"'+f+'"'}}function checkDataTypes(f,e,n){switch(f.length){case 1:return checkDataType(f[0],e,n,true);default:var s="";var l=toHash(f);if(l.array&&l.object){s=l.null?"(":"(!"+e+" || ";s+="typeof "+e+' !== "object")';delete l.null;delete l.array;delete l.object}if(l.number)delete l.integer;for(var v in l)s+=(s?" && ":"")+checkDataType(v,e,n,true);return s}}var s=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(f,e){if(Array.isArray(e)){var n=[];for(var l=0;l=e)throw new Error("Cannot access property/index "+s+" levels up, current level is "+e);return n[e-s]}if(s>e)throw new Error("Cannot access data "+s+" levels up, current level is "+e);v="data"+(e-s||"");if(!l)return v}var w=v;var j=l.split("/");for(var d=0;d{"use strict";var e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];f.exports=function(f,n){for(var s=0;s{"use strict";var s=n(8938);f.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:s.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:s.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},3711:f=>{"use strict";f.exports=function generate__limit(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j;var d="data"+(v||"");var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}var A=e=="maximum",F=A?"exclusiveMaximum":"exclusiveMinimum",p=f.schema[F],I=f.opts.$data&&p&&p.$data,x=A?"<":">",z=A?">":"<",j=undefined;if(!(E||typeof r=="number"||r===undefined)){throw new Error(e+" must be number")}if(!(I||p===undefined||typeof p=="number"||typeof p=="boolean")){throw new Error(F+" must be number or boolean")}if(I){var U=f.util.getData(p.$data,v,f.dataPathArr),N="exclusive"+l,Q="exclType"+l,q="exclIsNumber"+l,O="op"+l,C="' + "+O+" + '";s+=" var schemaExcl"+l+" = "+U+"; ";U="schemaExcl"+l;s+=" var "+N+"; var "+Q+" = typeof "+U+"; if ("+Q+" != 'boolean' && "+Q+" != 'undefined' && "+Q+" != 'number') { ";var j=F;var L=L||[];L.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: {} ";if(f.opts.messages!==false){s+=" , message: '"+F+" should be boolean' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var J=s;s=L.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+J+"]); "}else{s+=" validate.errors = ["+J+"]; return false; "}}else{s+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}s+=" "+Q+" == 'number' ? ( ("+N+" = "+R+" === undefined || "+U+" "+x+"= "+R+") ? "+d+" "+z+"= "+U+" : "+d+" "+z+" "+R+" ) : ( ("+N+" = "+U+" === true) ? "+d+" "+z+"= "+R+" : "+d+" "+z+" "+R+" ) || "+d+" !== "+d+") { var op"+l+" = "+N+" ? '"+x+"' : '"+x+"='; ";if(r===undefined){j=F;g=f.errSchemaPath+"/"+F;R=U;E=I}}else{var q=typeof p=="number",C=x;if(q&&E){var O="'"+C+"'";s+=" if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}s+=" ( "+R+" === undefined || "+p+" "+x+"= "+R+" ? "+d+" "+z+"= "+p+" : "+d+" "+z+" "+R+" ) || "+d+" !== "+d+") { "}else{if(q&&r===undefined){N=true;j=F;g=f.errSchemaPath+"/"+F;R=p;z+="="}else{if(q)R=Math[A?"min":"max"](p,r);if(p===(q?R:true)){N=true;j=F;g=f.errSchemaPath+"/"+F;z+="="}else{N=false;C+="="}}var O="'"+C+"'";s+=" if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}s+=" "+d+" "+z+" "+R+" || "+d+" !== "+d+") { "}}j=j||e;var L=L||[];L.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"_limit")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { comparison: "+O+", limit: "+R+", exclusive: "+N+" } ";if(f.opts.messages!==false){s+=" , message: 'should be "+C+" ";if(E){s+="' + "+R}else{s+=""+R+"'"}}if(f.opts.verbose){s+=" , schema: ";if(E){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var J=s;s=L.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+J+"]); "}else{s+=" validate.errors = ["+J+"]; return false; "}}else{s+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(w){s+=" else { "}return s}},5675:f=>{"use strict";f.exports=function generate__limitItems(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j;var d="data"+(v||"");var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}if(!(E||typeof r=="number")){throw new Error(e+" must be number")}var A=e=="maxItems"?">":"<";s+="if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}s+=" "+d+".length "+A+" "+R+") { ";var j=e;var F=F||[];F.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"_limitItems")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { limit: "+R+" } ";if(f.opts.messages!==false){s+=" , message: 'should NOT have ";if(e=="maxItems"){s+="more"}else{s+="fewer"}s+=" than ";if(E){s+="' + "+R+" + '"}else{s+=""+r}s+=" items' "}if(f.opts.verbose){s+=" , schema: ";if(E){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var p=s;s=F.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+p+"]); "}else{s+=" validate.errors = ["+p+"]; return false; "}}else{s+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(w){s+=" else { "}return s}},6051:f=>{"use strict";f.exports=function generate__limitLength(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j;var d="data"+(v||"");var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}if(!(E||typeof r=="number")){throw new Error(e+" must be number")}var A=e=="maxLength"?">":"<";s+="if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}if(f.opts.unicode===false){s+=" "+d+".length "}else{s+=" ucs2length("+d+") "}s+=" "+A+" "+R+") { ";var j=e;var F=F||[];F.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"_limitLength")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { limit: "+R+" } ";if(f.opts.messages!==false){s+=" , message: 'should NOT be ";if(e=="maxLength"){s+="longer"}else{s+="shorter"}s+=" than ";if(E){s+="' + "+R+" + '"}else{s+=""+r}s+=" characters' "}if(f.opts.verbose){s+=" , schema: ";if(E){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var p=s;s=F.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+p+"]); "}else{s+=" validate.errors = ["+p+"]; return false; "}}else{s+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(w){s+=" else { "}return s}},7043:f=>{"use strict";f.exports=function generate__limitProperties(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j;var d="data"+(v||"");var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}if(!(E||typeof r=="number")){throw new Error(e+" must be number")}var A=e=="maxProperties"?">":"<";s+="if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}s+=" Object.keys("+d+").length "+A+" "+R+") { ";var j=e;var F=F||[];F.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"_limitProperties")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { limit: "+R+" } ";if(f.opts.messages!==false){s+=" , message: 'should NOT have ";if(e=="maxProperties"){s+="more"}else{s+="fewer"}s+=" than ";if(E){s+="' + "+R+" + '"}else{s+=""+r}s+=" properties' "}if(f.opts.verbose){s+=" , schema: ";if(E){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var p=s;s=F.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+p+"]); "}else{s+=" validate.errors = ["+p+"]; return false; "}}else{s+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(w){s+=" else { "}return s}},3639:f=>{"use strict";f.exports=function generate_allOf(f,e,n){var s=" ";var l=f.schema[e];var v=f.schemaPath+f.util.getProperty(e);var r=f.errSchemaPath+"/"+e;var b=!f.opts.allErrors;var g=f.util.copy(f);var w="";g.level++;var j="valid"+g.level;var d=g.baseId,E=true;var R=l;if(R){var A,F=-1,p=R.length-1;while(F0||A===false:f.util.schemaHasRules(A,f.RULES.all)){E=false;g.schema=A;g.schemaPath=v+"["+F+"]";g.errSchemaPath=r+"/"+F;s+=" "+f.validate(g)+" ";g.baseId=d;if(b){s+=" if ("+j+") { ";w+="}"}}}}if(b){if(E){s+=" if (true) { "}else{s+=" "+w.slice(0,-1)+" "}}return s}},1256:f=>{"use strict";f.exports=function generate_anyOf(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E="errs__"+l;var R=f.util.copy(f);var A="";R.level++;var F="valid"+R.level;var p=r.every(function(e){return f.opts.strictKeywords?typeof e=="object"&&Object.keys(e).length>0||e===false:f.util.schemaHasRules(e,f.RULES.all)});if(p){var I=R.baseId;s+=" var "+E+" = errors; var "+d+" = false; ";var x=f.compositeRule;f.compositeRule=R.compositeRule=true;var z=r;if(z){var U,N=-1,Q=z.length-1;while(N{"use strict";f.exports=function generate_comment(f,e,n){var s=" ";var l=f.schema[e];var v=f.errSchemaPath+"/"+e;var r=!f.opts.allErrors;var b=f.util.toQuotedString(l);if(f.opts.$comment===true){s+=" console.log("+b+");"}else if(typeof f.opts.$comment=="function"){s+=" self._opts.$comment("+b+", "+f.util.toQuotedString(v)+", validate.root.schema);"}return s}},184:f=>{"use strict";f.exports=function generate_const(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}if(!E){s+=" var schema"+l+" = validate.schema"+b+";"}s+="var "+d+" = equal("+j+", schema"+l+"); if (!"+d+") { ";var A=A||[];A.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { allowedValue: schema"+l+" } ";if(f.opts.messages!==false){s+=" , message: 'should be equal to constant' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var F=s;s=A.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+F+"]); "}else{s+=" validate.errors = ["+F+"]; return false; "}}else{s+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(w){s+=" else { "}return s}},7419:f=>{"use strict";f.exports=function generate_contains(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E="errs__"+l;var R=f.util.copy(f);var A="";R.level++;var F="valid"+R.level;var p="i"+l,I=R.dataLevel=f.dataLevel+1,x="data"+I,z=f.baseId,U=f.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:f.util.schemaHasRules(r,f.RULES.all);s+="var "+E+" = errors;var "+d+";";if(U){var N=f.compositeRule;f.compositeRule=R.compositeRule=true;R.schema=r;R.schemaPath=b;R.errSchemaPath=g;s+=" var "+F+" = false; for (var "+p+" = 0; "+p+" < "+j+".length; "+p+"++) { ";R.errorPath=f.util.getPathExpr(f.errorPath,p,f.opts.jsonPointers,true);var Q=j+"["+p+"]";R.dataPathArr[I]=p;var q=f.validate(R);R.baseId=z;if(f.util.varOccurences(q,x)<2){s+=" "+f.util.varReplace(q,x,Q)+" "}else{s+=" var "+x+" = "+Q+"; "+q+" "}s+=" if ("+F+") break; } ";f.compositeRule=R.compositeRule=N;s+=" "+A+" if (!"+F+") {"}else{s+=" if ("+j+".length == 0) {"}var O=O||[];O.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: {} ";if(f.opts.messages!==false){s+=" , message: 'should contain a valid item' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var C=s;s=O.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+C+"]); "}else{s+=" validate.errors = ["+C+"]; return false; "}}else{s+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { ";if(U){s+=" errors = "+E+"; if (vErrors !== null) { if ("+E+") vErrors.length = "+E+"; else vErrors = null; } "}if(f.opts.allErrors){s+=" } "}return s}},7921:f=>{"use strict";f.exports=function generate_custom(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j;var d="data"+(v||"");var E="valid"+l;var R="errs__"+l;var A=f.opts.$data&&r&&r.$data,F;if(A){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";F="schema"+l}else{F=r}var p=this,I="definition"+l,x=p.definition,z="";var U,N,Q,q,O;if(A&&x.$data){O="keywordValidate"+l;var C=x.validateSchema;s+=" var "+I+" = RULES.custom['"+e+"'].definition; var "+O+" = "+I+".validate;"}else{q=f.useCustomRule(p,r,f.schema,f);if(!q)return;F="validate.schema"+b;O=q.code;U=x.compile;N=x.inline;Q=x.macro}var L=O+".errors",J="i"+l,T="ruleErr"+l,G=x.async;if(G&&!f.async)throw new Error("async keyword in sync schema");if(!(N||Q)){s+=""+L+" = null;"}s+="var "+R+" = errors;var "+E+";";if(A&&x.$data){z+="}";s+=" if ("+F+" === undefined) { "+E+" = true; } else { ";if(C){z+="}";s+=" "+E+" = "+I+".validateSchema("+F+"); if ("+E+") { "}}if(N){if(x.statements){s+=" "+q.validate+" "}else{s+=" "+E+" = "+q.validate+"; "}}else if(Q){var H=f.util.copy(f);var z="";H.level++;var X="valid"+H.level;H.schema=q.validate;H.schemaPath="";var M=f.compositeRule;f.compositeRule=H.compositeRule=true;var Y=f.validate(H).replace(/validate\.schema/g,O);f.compositeRule=H.compositeRule=M;s+=" "+Y}else{var W=W||[];W.push(s);s="";s+=" "+O+".call( ";if(f.opts.passContext){s+="this"}else{s+="self"}if(U||x.schema===false){s+=" , "+d+" "}else{s+=" , "+F+" , "+d+" , validate.schema"+f.schemaPath+" "}s+=" , (dataPath || '')";if(f.errorPath!='""'){s+=" + "+f.errorPath}var B=v?"data"+(v-1||""):"parentData",c=v?f.dataPathArr[v]:"parentDataProperty";s+=" , "+B+" , "+c+" , rootData ) ";var Z=s;s=W.pop();if(x.errors===false){s+=" "+E+" = ";if(G){s+="await "}s+=""+Z+"; "}else{if(G){L="customErrors"+l;s+=" var "+L+" = null; try { "+E+" = await "+Z+"; } catch (e) { "+E+" = false; if (e instanceof ValidationError) "+L+" = e.errors; else throw e; } "}else{s+=" "+L+" = null; "+E+" = "+Z+"; "}}}if(x.modifying){s+=" if ("+B+") "+d+" = "+B+"["+c+"];"}s+=""+z;if(x.valid){if(w){s+=" if (true) { "}}else{s+=" if ( ";if(x.valid===undefined){s+=" !";if(Q){s+=""+X}else{s+=""+E}}else{s+=" "+!x.valid+" "}s+=") { ";j=p.keyword;var W=W||[];W.push(s);s="";var W=W||[];W.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"custom")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { keyword: '"+p.keyword+"' } ";if(f.opts.messages!==false){s+=" , message: 'should pass \""+p.keyword+"\" keyword validation' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var D=s;s=W.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+D+"]); "}else{s+=" validate.errors = ["+D+"]; return false; "}}else{s+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var K=s;s=W.pop();if(N){if(x.errors){if(x.errors!="full"){s+=" for (var "+J+"="+R+"; "+J+"{"use strict";f.exports=function generate_dependencies(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="errs__"+l;var E=f.util.copy(f);var R="";E.level++;var A="valid"+E.level;var F={},p={},I=f.opts.ownProperties;for(N in r){if(N=="__proto__")continue;var x=r[N];var z=Array.isArray(x)?p:F;z[N]=x}s+="var "+d+" = errors;";var U=f.errorPath;s+="var missing"+l+";";for(var N in p){z=p[N];if(z.length){s+=" if ( "+j+f.util.getProperty(N)+" !== undefined ";if(I){s+=" && Object.prototype.hasOwnProperty.call("+j+", '"+f.util.escapeQuotes(N)+"') "}if(w){s+=" && ( ";var Q=z;if(Q){var q,O=-1,C=Q.length-1;while(O0||x===false:f.util.schemaHasRules(x,f.RULES.all)){s+=" "+A+" = true; if ( "+j+f.util.getProperty(N)+" !== undefined ";if(I){s+=" && Object.prototype.hasOwnProperty.call("+j+", '"+f.util.escapeQuotes(N)+"') "}s+=") { ";E.schema=x;E.schemaPath=b+f.util.getProperty(N);E.errSchemaPath=g+"/"+f.util.escapeFragment(N);s+=" "+f.validate(E)+" ";E.baseId=B;s+=" } ";if(w){s+=" if ("+A+") { ";R+="}"}}}if(w){s+=" "+R+" if ("+d+" == errors) {"}return s}},9795:f=>{"use strict";f.exports=function generate_enum(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}var A="i"+l,F="schema"+l;if(!E){s+=" var "+F+" = validate.schema"+b+";"}s+="var "+d+";";if(E){s+=" if (schema"+l+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+l+")) "+d+" = false; else {"}s+=""+d+" = false;for (var "+A+"=0; "+A+"<"+F+".length; "+A+"++) if (equal("+j+", "+F+"["+A+"])) { "+d+" = true; break; }";if(E){s+=" } "}s+=" if (!"+d+") { ";var p=p||[];p.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { allowedValues: schema"+l+" } ";if(f.opts.messages!==false){s+=" , message: 'should be equal to one of the allowed values' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var I=s;s=p.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(w){s+=" else { "}return s}},5801:f=>{"use strict";f.exports=function generate_format(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");if(f.opts.format===false){if(w){s+=" if (true) { "}return s}var d=f.opts.$data&&r&&r.$data,E;if(d){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";E="schema"+l}else{E=r}var R=f.opts.unknownFormats,A=Array.isArray(R);if(d){var F="format"+l,p="isObject"+l,I="formatType"+l;s+=" var "+F+" = formats["+E+"]; var "+p+" = typeof "+F+" == 'object' && !("+F+" instanceof RegExp) && "+F+".validate; var "+I+" = "+p+" && "+F+".type || 'string'; if ("+p+") { ";if(f.async){s+=" var async"+l+" = "+F+".async; "}s+=" "+F+" = "+F+".validate; } if ( ";if(d){s+=" ("+E+" !== undefined && typeof "+E+" != 'string') || "}s+=" (";if(R!="ignore"){s+=" ("+E+" && !"+F+" ";if(A){s+=" && self._opts.unknownFormats.indexOf("+E+") == -1 "}s+=") || "}s+=" ("+F+" && "+I+" == '"+n+"' && !(typeof "+F+" == 'function' ? ";if(f.async){s+=" (async"+l+" ? await "+F+"("+j+") : "+F+"("+j+")) "}else{s+=" "+F+"("+j+") "}s+=" : "+F+".test("+j+"))))) {"}else{var F=f.formats[r];if(!F){if(R=="ignore"){f.logger.warn('unknown format "'+r+'" ignored in schema at path "'+f.errSchemaPath+'"');if(w){s+=" if (true) { "}return s}else if(A&&R.indexOf(r)>=0){if(w){s+=" if (true) { "}return s}else{throw new Error('unknown format "'+r+'" is used in schema at path "'+f.errSchemaPath+'"')}}var p=typeof F=="object"&&!(F instanceof RegExp)&&F.validate;var I=p&&F.type||"string";if(p){var x=F.async===true;F=F.validate}if(I!=n){if(w){s+=" if (true) { "}return s}if(x){if(!f.async)throw new Error("async format in sync schema");var z="formats"+f.util.getProperty(r)+".validate";s+=" if (!(await "+z+"("+j+"))) { "}else{s+=" if (! ";var z="formats"+f.util.getProperty(r);if(p)z+=".validate";if(typeof F=="function"){s+=" "+z+"("+j+") "}else{s+=" "+z+".test("+j+") "}s+=") { "}}var U=U||[];U.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { format: ";if(d){s+=""+E}else{s+=""+f.util.toQuotedString(r)}s+=" } ";if(f.opts.messages!==false){s+=" , message: 'should match format \"";if(d){s+="' + "+E+" + '"}else{s+=""+f.util.escapeQuotes(r)}s+="\"' "}if(f.opts.verbose){s+=" , schema: ";if(d){s+="validate.schema"+b}else{s+=""+f.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var N=s;s=U.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+N+"]); "}else{s+=" validate.errors = ["+N+"]; return false; "}}else{s+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(w){s+=" else { "}return s}},4962:f=>{"use strict";f.exports=function generate_if(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E="errs__"+l;var R=f.util.copy(f);R.level++;var A="valid"+R.level;var F=f.schema["then"],p=f.schema["else"],I=F!==undefined&&(f.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===false:f.util.schemaHasRules(F,f.RULES.all)),x=p!==undefined&&(f.opts.strictKeywords?typeof p=="object"&&Object.keys(p).length>0||p===false:f.util.schemaHasRules(p,f.RULES.all)),z=R.baseId;if(I||x){var U;R.createErrors=false;R.schema=r;R.schemaPath=b;R.errSchemaPath=g;s+=" var "+E+" = errors; var "+d+" = true; ";var N=f.compositeRule;f.compositeRule=R.compositeRule=true;s+=" "+f.validate(R)+" ";R.baseId=z;R.createErrors=true;s+=" errors = "+E+"; if (vErrors !== null) { if ("+E+") vErrors.length = "+E+"; else vErrors = null; } ";f.compositeRule=R.compositeRule=N;if(I){s+=" if ("+A+") { ";R.schema=f.schema["then"];R.schemaPath=f.schemaPath+".then";R.errSchemaPath=f.errSchemaPath+"/then";s+=" "+f.validate(R)+" ";R.baseId=z;s+=" "+d+" = "+A+"; ";if(I&&x){U="ifClause"+l;s+=" var "+U+" = 'then'; "}else{U="'then'"}s+=" } ";if(x){s+=" else { "}}else{s+=" if (!"+A+") { "}if(x){R.schema=f.schema["else"];R.schemaPath=f.schemaPath+".else";R.errSchemaPath=f.errSchemaPath+"/else";s+=" "+f.validate(R)+" ";R.baseId=z;s+=" "+d+" = "+A+"; ";if(I&&x){U="ifClause"+l;s+=" var "+U+" = 'else'; "}else{U="'else'"}s+=" } "}s+=" if (!"+d+") { var err = ";if(f.createErrors!==false){s+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { failingKeyword: "+U+" } ";if(f.opts.messages!==false){s+=" , message: 'should match \"' + "+U+" + '\" schema' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+=" } ";if(w){s+=" else { "}}else{if(w){s+=" if (true) { "}}return s}},4124:(f,e,n)=>{"use strict";f.exports={$ref:n(5746),allOf:n(3639),anyOf:n(1256),$comment:n(2660),const:n(184),contains:n(7419),dependencies:n(7299),enum:n(9795),format:n(5801),if:n(4962),items:n(9623),maximum:n(3711),minimum:n(3711),maxItems:n(5675),minItems:n(5675),maxLength:n(6051),minLength:n(6051),maxProperties:n(7043),minProperties:n(7043),multipleOf:n(9251),not:n(7739),oneOf:n(6857),pattern:n(8099),properties:n(9438),propertyNames:n(3466),required:n(8430),uniqueItems:n(2207),validate:n(6131)}},9623:f=>{"use strict";f.exports=function generate_items(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E="errs__"+l;var R=f.util.copy(f);var A="";R.level++;var F="valid"+R.level;var p="i"+l,I=R.dataLevel=f.dataLevel+1,x="data"+I,z=f.baseId;s+="var "+E+" = errors;var "+d+";";if(Array.isArray(r)){var U=f.schema.additionalItems;if(U===false){s+=" "+d+" = "+j+".length <= "+r.length+"; ";var N=g;g=f.errSchemaPath+"/additionalItems";s+=" if (!"+d+") { ";var Q=Q||[];Q.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { limit: "+r.length+" } ";if(f.opts.messages!==false){s+=" , message: 'should NOT have more than "+r.length+" items' "}if(f.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var q=s;s=Q.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+q+"]); "}else{s+=" validate.errors = ["+q+"]; return false; "}}else{s+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";g=N;if(w){A+="}";s+=" else { "}}var O=r;if(O){var C,L=-1,J=O.length-1;while(L0||C===false:f.util.schemaHasRules(C,f.RULES.all)){s+=" "+F+" = true; if ("+j+".length > "+L+") { ";var T=j+"["+L+"]";R.schema=C;R.schemaPath=b+"["+L+"]";R.errSchemaPath=g+"/"+L;R.errorPath=f.util.getPathExpr(f.errorPath,L,f.opts.jsonPointers,true);R.dataPathArr[I]=L;var G=f.validate(R);R.baseId=z;if(f.util.varOccurences(G,x)<2){s+=" "+f.util.varReplace(G,x,T)+" "}else{s+=" var "+x+" = "+T+"; "+G+" "}s+=" } ";if(w){s+=" if ("+F+") { ";A+="}"}}}}if(typeof U=="object"&&(f.opts.strictKeywords?typeof U=="object"&&Object.keys(U).length>0||U===false:f.util.schemaHasRules(U,f.RULES.all))){R.schema=U;R.schemaPath=f.schemaPath+".additionalItems";R.errSchemaPath=f.errSchemaPath+"/additionalItems";s+=" "+F+" = true; if ("+j+".length > "+r.length+") { for (var "+p+" = "+r.length+"; "+p+" < "+j+".length; "+p+"++) { ";R.errorPath=f.util.getPathExpr(f.errorPath,p,f.opts.jsonPointers,true);var T=j+"["+p+"]";R.dataPathArr[I]=p;var G=f.validate(R);R.baseId=z;if(f.util.varOccurences(G,x)<2){s+=" "+f.util.varReplace(G,x,T)+" "}else{s+=" var "+x+" = "+T+"; "+G+" "}if(w){s+=" if (!"+F+") break; "}s+=" } } ";if(w){s+=" if ("+F+") { ";A+="}"}}}else if(f.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:f.util.schemaHasRules(r,f.RULES.all)){R.schema=r;R.schemaPath=b;R.errSchemaPath=g;s+=" for (var "+p+" = "+0+"; "+p+" < "+j+".length; "+p+"++) { ";R.errorPath=f.util.getPathExpr(f.errorPath,p,f.opts.jsonPointers,true);var T=j+"["+p+"]";R.dataPathArr[I]=p;var G=f.validate(R);R.baseId=z;if(f.util.varOccurences(G,x)<2){s+=" "+f.util.varReplace(G,x,T)+" "}else{s+=" var "+x+" = "+T+"; "+G+" "}if(w){s+=" if (!"+F+") break; "}s+=" }"}if(w){s+=" "+A+" if ("+E+" == errors) {"}return s}},9251:f=>{"use strict";f.exports=function generate_multipleOf(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d=f.opts.$data&&r&&r.$data,E;if(d){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";E="schema"+l}else{E=r}if(!(d||typeof r=="number")){throw new Error(e+" must be number")}s+="var division"+l+";if (";if(d){s+=" "+E+" !== undefined && ( typeof "+E+" != 'number' || "}s+=" (division"+l+" = "+j+" / "+E+", ";if(f.opts.multipleOfPrecision){s+=" Math.abs(Math.round(division"+l+") - division"+l+") > 1e-"+f.opts.multipleOfPrecision+" "}else{s+=" division"+l+" !== parseInt(division"+l+") "}s+=" ) ";if(d){s+=" ) "}s+=" ) { ";var R=R||[];R.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { multipleOf: "+E+" } ";if(f.opts.messages!==false){s+=" , message: 'should be multiple of ";if(d){s+="' + "+E}else{s+=""+E+"'"}}if(f.opts.verbose){s+=" , schema: ";if(d){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var A=s;s=R.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(w){s+=" else { "}return s}},7739:f=>{"use strict";f.exports=function generate_not(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="errs__"+l;var E=f.util.copy(f);E.level++;var R="valid"+E.level;if(f.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:f.util.schemaHasRules(r,f.RULES.all)){E.schema=r;E.schemaPath=b;E.errSchemaPath=g;s+=" var "+d+" = errors; ";var A=f.compositeRule;f.compositeRule=E.compositeRule=true;E.createErrors=false;var F;if(E.opts.allErrors){F=E.opts.allErrors;E.opts.allErrors=false}s+=" "+f.validate(E)+" ";E.createErrors=true;if(F)E.opts.allErrors=F;f.compositeRule=E.compositeRule=A;s+=" if ("+R+") { ";var p=p||[];p.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: {} ";if(f.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var I=s;s=p.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ";if(f.opts.allErrors){s+=" } "}}else{s+=" var err = ";if(f.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: {} ";if(f.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(w){s+=" if (false) { "}}return s}},6857:f=>{"use strict";f.exports=function generate_oneOf(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E="errs__"+l;var R=f.util.copy(f);var A="";R.level++;var F="valid"+R.level;var p=R.baseId,I="prevValid"+l,x="passingSchemas"+l;s+="var "+E+" = errors , "+I+" = false , "+d+" = false , "+x+" = null; ";var z=f.compositeRule;f.compositeRule=R.compositeRule=true;var U=r;if(U){var N,Q=-1,q=U.length-1;while(Q0||N===false:f.util.schemaHasRules(N,f.RULES.all)){R.schema=N;R.schemaPath=b+"["+Q+"]";R.errSchemaPath=g+"/"+Q;s+=" "+f.validate(R)+" ";R.baseId=p}else{s+=" var "+F+" = true; "}if(Q){s+=" if ("+F+" && "+I+") { "+d+" = false; "+x+" = ["+x+", "+Q+"]; } else { ";A+="}"}s+=" if ("+F+") { "+d+" = "+I+" = true; "+x+" = "+Q+"; }"}}f.compositeRule=R.compositeRule=z;s+=""+A+"if (!"+d+") { var err = ";if(f.createErrors!==false){s+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { passingSchemas: "+x+" } ";if(f.opts.messages!==false){s+=" , message: 'should match exactly one schema in oneOf' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+="} else { errors = "+E+"; if (vErrors !== null) { if ("+E+") vErrors.length = "+E+"; else vErrors = null; }";if(f.opts.allErrors){s+=" } "}return s}},8099:f=>{"use strict";f.exports=function generate_pattern(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d=f.opts.$data&&r&&r.$data,E;if(d){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";E="schema"+l}else{E=r}var R=d?"(new RegExp("+E+"))":f.usePattern(r);s+="if ( ";if(d){s+=" ("+E+" !== undefined && typeof "+E+" != 'string') || "}s+=" !"+R+".test("+j+") ) { ";var A=A||[];A.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { pattern: ";if(d){s+=""+E}else{s+=""+f.util.toQuotedString(r)}s+=" } ";if(f.opts.messages!==false){s+=" , message: 'should match pattern \"";if(d){s+="' + "+E+" + '"}else{s+=""+f.util.escapeQuotes(r)}s+="\"' "}if(f.opts.verbose){s+=" , schema: ";if(d){s+="validate.schema"+b}else{s+=""+f.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var F=s;s=A.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+F+"]); "}else{s+=" validate.errors = ["+F+"]; return false; "}}else{s+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(w){s+=" else { "}return s}},9438:f=>{"use strict";f.exports=function generate_properties(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="errs__"+l;var E=f.util.copy(f);var R="";E.level++;var A="valid"+E.level;var F="key"+l,p="idx"+l,I=E.dataLevel=f.dataLevel+1,x="data"+I,z="dataProperties"+l;var U=Object.keys(r||{}).filter(notProto),N=f.schema.patternProperties||{},Q=Object.keys(N).filter(notProto),q=f.schema.additionalProperties,O=U.length||Q.length,C=q===false,L=typeof q=="object"&&Object.keys(q).length,J=f.opts.removeAdditional,T=C||L||J,G=f.opts.ownProperties,H=f.baseId;var X=f.schema.required;if(X&&!(f.opts.$data&&X.$data)&&X.length8){s+=" || validate.schema"+b+".hasOwnProperty("+F+") "}else{var Y=U;if(Y){var W,B=-1,c=Y.length-1;while(B0||t===false:f.util.schemaHasRules(t,f.RULES.all)){var ff=f.util.getProperty(W),P=j+ff,ef=_&&t.default!==undefined;E.schema=t;E.schemaPath=b+ff;E.errSchemaPath=g+"/"+f.util.escapeFragment(W);E.errorPath=f.util.getPath(f.errorPath,W,f.opts.jsonPointers);E.dataPathArr[I]=f.util.toQuotedString(W);var i=f.validate(E);E.baseId=H;if(f.util.varOccurences(i,x)<2){i=f.util.varReplace(i,x,P);var nf=P}else{var nf=x;s+=" var "+x+" = "+P+"; "}if(ef){s+=" "+i+" "}else{if(M&&M[W]){s+=" if ( "+nf+" === undefined ";if(G){s+=" || ! Object.prototype.hasOwnProperty.call("+j+", '"+f.util.escapeQuotes(W)+"') "}s+=") { "+A+" = false; ";var y=f.errorPath,h=g,sf=f.util.escapeQuotes(W);if(f.opts._errorDataPathProperty){f.errorPath=f.util.getPath(y,W,f.opts.jsonPointers)}g=f.errSchemaPath+"/required";var a=a||[];a.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { missingProperty: '"+sf+"' } ";if(f.opts.messages!==false){s+=" , message: '";if(f.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+sf+"\\'"}s+="' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var S=s;s=a.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+S+"]); "}else{s+=" validate.errors = ["+S+"]; return false; "}}else{s+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}g=h;f.errorPath=y;s+=" } else { "}else{if(w){s+=" if ( "+nf+" === undefined ";if(G){s+=" || ! Object.prototype.hasOwnProperty.call("+j+", '"+f.util.escapeQuotes(W)+"') "}s+=") { "+A+" = true; } else { "}else{s+=" if ("+nf+" !== undefined ";if(G){s+=" && Object.prototype.hasOwnProperty.call("+j+", '"+f.util.escapeQuotes(W)+"') "}s+=" ) { "}}s+=" "+i+" } "}}if(w){s+=" if ("+A+") { ";R+="}"}}}}if(Q.length){var lf=Q;if(lf){var D,vf=-1,rf=lf.length-1;while(vf0||t===false:f.util.schemaHasRules(t,f.RULES.all)){E.schema=t;E.schemaPath=f.schemaPath+".patternProperties"+f.util.getProperty(D);E.errSchemaPath=f.errSchemaPath+"/patternProperties/"+f.util.escapeFragment(D);if(G){s+=" "+z+" = "+z+" || Object.keys("+j+"); for (var "+p+"=0; "+p+"<"+z+".length; "+p+"++) { var "+F+" = "+z+"["+p+"]; "}else{s+=" for (var "+F+" in "+j+") { "}s+=" if ("+f.usePattern(D)+".test("+F+")) { ";E.errorPath=f.util.getPathExpr(f.errorPath,F,f.opts.jsonPointers);var P=j+"["+F+"]";E.dataPathArr[I]=F;var i=f.validate(E);E.baseId=H;if(f.util.varOccurences(i,x)<2){s+=" "+f.util.varReplace(i,x,P)+" "}else{s+=" var "+x+" = "+P+"; "+i+" "}if(w){s+=" if (!"+A+") break; "}s+=" } ";if(w){s+=" else "+A+" = true; "}s+=" } ";if(w){s+=" if ("+A+") { ";R+="}"}}}}}if(w){s+=" "+R+" if ("+d+" == errors) {"}return s}},3466:f=>{"use strict";f.exports=function generate_propertyNames(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="errs__"+l;var E=f.util.copy(f);var R="";E.level++;var A="valid"+E.level;s+="var "+d+" = errors;";if(f.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:f.util.schemaHasRules(r,f.RULES.all)){E.schema=r;E.schemaPath=b;E.errSchemaPath=g;var F="key"+l,p="idx"+l,I="i"+l,x="' + "+F+" + '",z=E.dataLevel=f.dataLevel+1,U="data"+z,N="dataProperties"+l,Q=f.opts.ownProperties,q=f.baseId;if(Q){s+=" var "+N+" = undefined; "}if(Q){s+=" "+N+" = "+N+" || Object.keys("+j+"); for (var "+p+"=0; "+p+"<"+N+".length; "+p+"++) { var "+F+" = "+N+"["+p+"]; "}else{s+=" for (var "+F+" in "+j+") { "}s+=" var startErrs"+l+" = errors; ";var O=F;var C=f.compositeRule;f.compositeRule=E.compositeRule=true;var L=f.validate(E);E.baseId=q;if(f.util.varOccurences(L,U)<2){s+=" "+f.util.varReplace(L,U,O)+" "}else{s+=" var "+U+" = "+O+"; "+L+" "}f.compositeRule=E.compositeRule=C;s+=" if (!"+A+") { for (var "+I+"=startErrs"+l+"; "+I+"{"use strict";f.exports=function generate_ref(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.errSchemaPath+"/"+e;var g=!f.opts.allErrors;var w="data"+(v||"");var j="valid"+l;var d,E;if(r=="#"||r=="#/"){if(f.isRoot){d=f.async;E="validate"}else{d=f.root.schema.$async===true;E="root.refVal[0]"}}else{var R=f.resolveRef(f.baseId,r,f.isRoot);if(R===undefined){var A=f.MissingRefError.message(f.baseId,r);if(f.opts.missingRefs=="fail"){f.logger.error(A);var F=F||[];F.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"$ref"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(b)+" , params: { ref: '"+f.util.escapeQuotes(r)+"' } ";if(f.opts.messages!==false){s+=" , message: 'can\\'t resolve reference "+f.util.escapeQuotes(r)+"' "}if(f.opts.verbose){s+=" , schema: "+f.util.toQuotedString(r)+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+w+" "}s+=" } "}else{s+=" {} "}var p=s;s=F.pop();if(!f.compositeRule&&g){if(f.async){s+=" throw new ValidationError(["+p+"]); "}else{s+=" validate.errors = ["+p+"]; return false; "}}else{s+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}if(g){s+=" if (false) { "}}else if(f.opts.missingRefs=="ignore"){f.logger.warn(A);if(g){s+=" if (true) { "}}else{throw new f.MissingRefError(f.baseId,r,A)}}else if(R.inline){var I=f.util.copy(f);I.level++;var x="valid"+I.level;I.schema=R.schema;I.schemaPath="";I.errSchemaPath=r;var z=f.validate(I).replace(/validate\.schema/g,R.code);s+=" "+z+" ";if(g){s+=" if ("+x+") { "}}else{d=R.$async===true||f.async&&R.$async!==false;E=R.code}}if(E){var F=F||[];F.push(s);s="";if(f.opts.passContext){s+=" "+E+".call(this, "}else{s+=" "+E+"( "}s+=" "+w+", (dataPath || '')";if(f.errorPath!='""'){s+=" + "+f.errorPath}var U=v?"data"+(v-1||""):"parentData",N=v?f.dataPathArr[v]:"parentDataProperty";s+=" , "+U+" , "+N+", rootData) ";var Q=s;s=F.pop();if(d){if(!f.async)throw new Error("async schema referenced by sync schema");if(g){s+=" var "+j+"; "}s+=" try { await "+Q+"; ";if(g){s+=" "+j+" = true; "}s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ";if(g){s+=" "+j+" = false; "}s+=" } ";if(g){s+=" if ("+j+") { "}}else{s+=" if (!"+Q+") { if (vErrors === null) vErrors = "+E+".errors; else vErrors = vErrors.concat("+E+".errors); errors = vErrors.length; } ";if(g){s+=" else { "}}}return s}},8430:f=>{"use strict";f.exports=function generate_required(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}var A="schema"+l;if(!E){if(r.length0||U===false:f.util.schemaHasRules(U,f.RULES.all)))){F[F.length]=I}}}}else{var F=r}}if(E||F.length){var N=f.errorPath,Q=E||F.length>=f.opts.loopRequired,q=f.opts.ownProperties;if(w){s+=" var missing"+l+"; ";if(Q){if(!E){s+=" var "+A+" = validate.schema"+b+"; "}var O="i"+l,C="schema"+l+"["+O+"]",L="' + "+C+" + '";if(f.opts._errorDataPathProperty){f.errorPath=f.util.getPathExpr(N,C,f.opts.jsonPointers)}s+=" var "+d+" = true; ";if(E){s+=" if (schema"+l+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+l+")) "+d+" = false; else {"}s+=" for (var "+O+" = 0; "+O+" < "+A+".length; "+O+"++) { "+d+" = "+j+"["+A+"["+O+"]] !== undefined ";if(q){s+=" && Object.prototype.hasOwnProperty.call("+j+", "+A+"["+O+"]) "}s+="; if (!"+d+") break; } ";if(E){s+=" } "}s+=" if (!"+d+") { ";var J=J||[];J.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { missingProperty: '"+L+"' } ";if(f.opts.messages!==false){s+=" , message: '";if(f.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+L+"\\'"}s+="' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var T=s;s=J.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+T+"]); "}else{s+=" validate.errors = ["+T+"]; return false; "}}else{s+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { "}else{s+=" if ( ";var G=F;if(G){var H,O=-1,X=G.length-1;while(O{"use strict";f.exports=function generate_uniqueItems(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}if((r||E)&&f.opts.uniqueItems!==false){if(E){s+=" var "+d+"; if ("+R+" === false || "+R+" === undefined) "+d+" = true; else if (typeof "+R+" != 'boolean') "+d+" = false; else { "}s+=" var i = "+j+".length , "+d+" = true , j; if (i > 1) { ";var A=f.schema.items&&f.schema.items.type,F=Array.isArray(A);if(!A||A=="object"||A=="array"||F&&(A.indexOf("object")>=0||A.indexOf("array")>=0)){s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+j+"[i], "+j+"[j])) { "+d+" = false; break outer; } } } "}else{s+=" var itemIndices = {}, item; for (;i--;) { var item = "+j+"[i]; ";var p="checkDataType"+(F?"s":"");s+=" if ("+f.util[p](A,"item",f.opts.strictNumbers,true)+") continue; ";if(F){s+=" if (typeof item == 'string') item = '\"' + item; "}s+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}s+=" } ";if(E){s+=" } "}s+=" if (!"+d+") { ";var I=I||[];I.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { i: i, j: j } ";if(f.opts.messages!==false){s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(f.opts.verbose){s+=" , schema: ";if(E){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var x=s;s=I.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+x+"]); "}else{s+=" validate.errors = ["+x+"]; return false; "}}else{s+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(w){s+=" else { "}}else{if(w){s+=" if (true) { "}}return s}},6131:f=>{"use strict";f.exports=function generate_validate(f,e,n){var s="";var l=f.schema.$async===true,v=f.util.schemaHasRulesExcept(f.schema,f.RULES.all,"$ref"),r=f.self._getId(f.schema);if(f.opts.strictKeywords){var b=f.util.schemaUnknownRules(f.schema,f.RULES.keywords);if(b){var g="unknown keyword: "+b;if(f.opts.strictKeywords==="log")f.logger.warn(g);else throw new Error(g)}}if(f.isTop){s+=" var validate = ";if(l){f.async=true;s+="async "}s+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if(r&&(f.opts.sourceCode||f.opts.processCode)){s+=" "+("/*# sourceURL="+r+" */")+" "}}if(typeof f.schema=="boolean"||!(v||f.schema.$ref)){var e="false schema";var w=f.level;var j=f.dataLevel;var d=f.schema[e];var E=f.schemaPath+f.util.getProperty(e);var R=f.errSchemaPath+"/"+e;var A=!f.opts.allErrors;var F;var p="data"+(j||"");var I="valid"+w;if(f.schema===false){if(f.isTop){A=true}else{s+=" var "+I+" = false; "}var x=x||[];x.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(F||"false schema")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(R)+" , params: {} ";if(f.opts.messages!==false){s+=" , message: 'boolean schema is false' "}if(f.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+f.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var z=s;s=x.pop();if(!f.compositeRule&&A){if(f.async){s+=" throw new ValidationError(["+z+"]); "}else{s+=" validate.errors = ["+z+"]; return false; "}}else{s+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(f.isTop){if(l){s+=" return data; "}else{s+=" validate.errors = null; return true; "}}else{s+=" var "+I+" = true; "}}if(f.isTop){s+=" }; return validate; "}return s}if(f.isTop){var U=f.isTop,w=f.level=0,j=f.dataLevel=0,p="data";f.rootId=f.resolve.fullPath(f.self._getId(f.root.schema));f.baseId=f.baseId||f.rootId;delete f.isTop;f.dataPathArr=[""];if(f.schema.default!==undefined&&f.opts.useDefaults&&f.opts.strictDefaults){var N="default is ignored in the schema root";if(f.opts.strictDefaults==="log")f.logger.warn(N);else throw new Error(N)}s+=" var vErrors = null; ";s+=" var errors = 0; ";s+=" if (rootData === undefined) rootData = data; "}else{var w=f.level,j=f.dataLevel,p="data"+(j||"");if(r)f.baseId=f.resolve.url(f.baseId,r);if(l&&!f.async)throw new Error("async schema in sync schema");s+=" var errs_"+w+" = errors;"}var I="valid"+w,A=!f.opts.allErrors,Q="",q="";var F;var O=f.schema.type,C=Array.isArray(O);if(O&&f.opts.nullable&&f.schema.nullable===true){if(C){if(O.indexOf("null")==-1)O=O.concat("null")}else if(O!="null"){O=[O,"null"];C=true}}if(C&&O.length==1){O=O[0];C=false}if(f.schema.$ref&&v){if(f.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+f.errSchemaPath+'" (see option extendRefs)')}else if(f.opts.extendRefs!==true){v=false;f.logger.warn('$ref: keywords ignored in schema at path "'+f.errSchemaPath+'"')}}if(f.schema.$comment&&f.opts.$comment){s+=" "+f.RULES.all.$comment.code(f,"$comment")}if(O){if(f.opts.coerceTypes){var L=f.util.coerceToTypes(f.opts.coerceTypes,O)}var J=f.RULES.types[O];if(L||C||J===true||J&&!$shouldUseGroup(J)){var E=f.schemaPath+".type",R=f.errSchemaPath+"/type";var E=f.schemaPath+".type",R=f.errSchemaPath+"/type",T=C?"checkDataTypes":"checkDataType";s+=" if ("+f.util[T](O,p,f.opts.strictNumbers,true)+") { ";if(L){var G="dataType"+w,H="coerced"+w;s+=" var "+G+" = typeof "+p+"; var "+H+" = undefined; ";if(f.opts.coerceTypes=="array"){s+=" if ("+G+" == 'object' && Array.isArray("+p+") && "+p+".length == 1) { "+p+" = "+p+"[0]; "+G+" = typeof "+p+"; if ("+f.util.checkDataType(f.schema.type,p,f.opts.strictNumbers)+") "+H+" = "+p+"; } "}s+=" if ("+H+" !== undefined) ; ";var X=L;if(X){var M,Y=-1,W=X.length-1;while(Y{"use strict";var s=/^[a-z_$][a-z0-9_$-]*$/i;var l=n(7921);var v=n(5533);f.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(f,e){var n=this.RULES;if(n.keywords[f])throw new Error("Keyword "+f+" is already defined");if(!s.test(f))throw new Error("Keyword "+f+" is not a valid identifier");if(e){this.validateKeyword(e,true);var v=e.type;if(Array.isArray(v)){for(var r=0;r{"use strict";f=n.nmd(f);const s=n(5747);const l=n(5622);const v=n(6417);const r=n(2357);const b=n(8614);const g=n(5514);const w=n(3900);const j=n(6536);const d=n(7727);const E=n(8393);const R=n(1414);const A=()=>Object.create(null);const F="aes-256-cbc";delete require.cache[__filename];const p=l.dirname(f.parent&&f.parent.filename||".");const I=(f,e)=>{const n=["undefined","symbol","function"];const s=typeof e;if(n.includes(s)){throw new TypeError(`Setting a value of type \`${s}\` for key \`${f}\` is not allowed as it's not supported by JSON`)}};class Conf{constructor(f){f={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:true,serialize:f=>JSON.stringify(f,null,"\t"),deserialize:JSON.parse,accessPropertiesByDotNotation:true,...f};if(!f.cwd){if(!f.projectName){const e=j.sync(p);f.projectName=e&&JSON.parse(s.readFileSync(e,"utf8")).name}if(!f.projectName){throw new Error("Project name could not be inferred. Please specify the `projectName` option.")}f.cwd=d(f.projectName,{suffix:f.projectSuffix}).config}this._options=f;if(f.schema){if(typeof f.schema!=="object"){throw new TypeError("The `schema` option must be an object.")}const e=new R({allErrors:true,format:"full",useDefaults:true,errorDataPath:"property"});const n={type:"object",properties:f.schema};this._validator=e.compile(n)}this.events=new b;this.encryptionKey=f.encryptionKey;this.serialize=f.serialize;this.deserialize=f.deserialize;const e=f.fileExtension?`.${f.fileExtension}`:"";this.path=l.resolve(f.cwd,`${f.configName}${e}`);const n=this.store;const v=Object.assign(A(),f.defaults,n);this._validate(v);try{r.deepEqual(n,v)}catch(f){this.store=v}}_validate(f){if(!this._validator){return}const e=this._validator(f);if(!e){const f=this._validator.errors.reduce((f,{dataPath:e,message:n})=>f+` \`${e.slice(1)}\` ${n};`,"");throw new Error("Config schema violation:"+f.slice(0,-1))}}get(f,e){if(this._options.accessPropertiesByDotNotation){return g.get(this.store,f,e)}return f in this.store?this.store[f]:e}set(f,e){if(typeof f!=="string"&&typeof f!=="object"){throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof f}`)}if(typeof f!=="object"&&e===undefined){throw new TypeError("Use `delete()` to clear values")}const{store:n}=this;const s=(f,e)=>{I(f,e);if(this._options.accessPropertiesByDotNotation){g.set(n,f,e)}else{n[f]=e}};if(typeof f==="object"){const e=f;for(const[f,n]of Object.entries(e)){s(f,n)}}else{s(f,e)}this.store=n}has(f){if(this._options.accessPropertiesByDotNotation){return g.has(this.store,f)}return f in this.store}delete(f){const{store:e}=this;if(this._options.accessPropertiesByDotNotation){g.delete(e,f)}else{delete e[f]}this.store=e}clear(){this.store=A()}onDidChange(f,e){if(typeof f!=="string"){throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof f}`)}if(typeof e!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`)}const n=()=>this.get(f);return this.handleChange(n,e)}onDidAnyChange(f){if(typeof f!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof f}`)}const e=()=>this.store;return this.handleChange(e,f)}handleChange(f,e){let n=f();const s=()=>{const s=n;const l=f();try{r.deepEqual(l,s)}catch(f){n=l;e.call(this,l,s)}};this.events.on("change",s);return()=>this.events.removeListener("change",s)}get size(){return Object.keys(this.store).length}get store(){try{let f=s.readFileSync(this.path,this.encryptionKey?null:"utf8");if(this.encryptionKey){try{if(f.slice(16,17).toString()===":"){const e=f.slice(0,16);const n=v.pbkdf2Sync(this.encryptionKey,e.toString(),1e4,32,"sha512");const s=v.createDecipheriv(F,n,e);f=Buffer.concat([s.update(f.slice(17)),s.final()])}else{const e=v.createDecipher(F,this.encryptionKey);f=Buffer.concat([e.update(f),e.final()])}}catch(f){}}f=this.deserialize(f);this._validate(f);return Object.assign(A(),f)}catch(f){if(f.code==="ENOENT"){w.sync(l.dirname(this.path));return A()}if(this._options.clearInvalidConfig&&f.name==="SyntaxError"){return A()}throw f}}set store(f){w.sync(l.dirname(this.path));this._validate(f);let e=this.serialize(f);if(this.encryptionKey){const f=v.randomBytes(16);const n=v.pbkdf2Sync(this.encryptionKey,f.toString(),1e4,32,"sha512");const s=v.createCipheriv(F,n,f);e=Buffer.concat([f,Buffer.from(":"),s.update(Buffer.from(e)),s.final()])}E.sync(this.path,e);this.events.emit("change")}*[Symbol.iterator](){for(const[f,e]of Object.entries(this.store)){yield[f,e]}}}f.exports=Conf},5514:(f,e,n)=>{"use strict";const s=n(1771);const l=["__proto__","prototype","constructor"];const v=f=>!f.some(f=>l.includes(f));function getPathSegments(f){const e=f.split(".");const n=[];for(let f=0;f{"use strict";f.exports=(f=>{const e=typeof f;return f!==null&&(e==="object"||e==="function")})},3900:(f,e,n)=>{"use strict";const s=n(5747);const l=n(5622);const{promisify:v}=n(1669);const r=n(2519);const b=r.satisfies(process.version,">=10.12.0");const g=f=>{if(process.platform==="win32"){const e=/[<>:"|?*]/.test(f.replace(l.parse(f).root,""));if(e){const e=new Error(`Path contains invalid characters: ${f}`);e.code="EINVAL";throw e}}};const w=f=>{const e={mode:511&~process.umask(),fs:s};return{...e,...f}};const j=f=>{const e=new Error(`operation not permitted, mkdir '${f}'`);e.code="EPERM";e.errno=-4048;e.path=f;e.syscall="mkdir";return e};const d=async(f,e)=>{g(f);e=w(e);const n=v(e.fs.mkdir);const r=v(e.fs.stat);if(b&&e.fs.mkdir===s.mkdir){const s=l.resolve(f);await n(s,{mode:e.mode,recursive:true});return s}const d=async f=>{try{await n(f,e.mode);return f}catch(e){if(e.code==="EPERM"){throw e}if(e.code==="ENOENT"){if(l.dirname(f)===f){throw j(f)}if(e.message.includes("null bytes")){throw e}await d(l.dirname(f));return d(f)}try{const n=await r(f);if(!n.isDirectory()){throw new Error("The path is not a directory")}}catch(f){throw e}return f}};return d(l.resolve(f))};f.exports=d;f.exports.sync=((f,e)=>{g(f);e=w(e);if(b&&e.fs.mkdirSync===s.mkdirSync){const n=l.resolve(f);s.mkdirSync(n,{mode:e.mode,recursive:true});return n}const n=f=>{try{e.fs.mkdirSync(f,e.mode)}catch(s){if(s.code==="EPERM"){throw s}if(s.code==="ENOENT"){if(l.dirname(f)===f){throw j(f)}if(s.message.includes("null bytes")){throw s}n(l.dirname(f));return n(f)}try{if(!e.fs.statSync(f).isDirectory()){throw new Error("The path is not a directory")}}catch(f){throw s}}return f};return n(l.resolve(f))})},8393:(f,e,n)=>{"use strict";f.exports=writeFile;f.exports.sync=writeFileSync;f.exports._getTmpname=getTmpname;f.exports._cleanupOnExit=cleanupOnExit;const s=n(5747);const l=n(8681);const v=n(2317);const r=n(5622);const b=n(3010);const g=n(4005);const{promisify:w}=n(1669);const j={};const d=function getId(){try{const f=n(5013);return f.threadId}catch(f){return 0}}();let E=0;function getTmpname(f){return f+"."+l(__filename).hash(String(process.pid)).hash(String(d)).hash(String(++E)).result()}function cleanupOnExit(f){return()=>{try{s.unlinkSync(typeof f==="function"?f():f)}catch(f){}}}function serializeActiveFile(f){return new Promise(e=>{if(!j[f])j[f]=[];j[f].push(e);if(j[f].length===1)e()})}async function writeFileAsync(f,e,n={}){if(typeof n==="string"){n={encoding:n}}let l;let d;const E=v(cleanupOnExit(()=>d));const R=r.resolve(f);try{await serializeActiveFile(R);const v=await w(s.realpath)(f).catch(()=>f);d=getTmpname(v);if(!n.mode||!n.chown){const f=await w(s.stat)(v).catch(()=>{});if(f){if(n.mode==null){n.mode=f.mode}if(n.chown==null&&process.getuid){n.chown={uid:f.uid,gid:f.gid}}}}l=await w(s.open)(d,"w",n.mode);if(n.tmpfileCreated){await n.tmpfileCreated(d)}if(b(e)){e=g(e)}if(Buffer.isBuffer(e)){await w(s.write)(l,e,0,e.length,0)}else if(e!=null){await w(s.write)(l,String(e),0,String(n.encoding||"utf8"))}if(n.fsync!==false){await w(s.fsync)(l)}await w(s.close)(l);l=null;if(n.chown){await w(s.chown)(d,n.chown.uid,n.chown.gid)}if(n.mode){await w(s.chmod)(d,n.mode)}await w(s.rename)(d,v)}finally{if(l){await w(s.close)(l).catch(()=>{})}E();await w(s.unlink)(d).catch(()=>{});j[R].shift();if(j[R].length>0){j[R][0]()}else delete j[R]}}function writeFile(f,e,n,s){if(n instanceof Function){s=n;n={}}const l=writeFileAsync(f,e,n);if(s){l.then(s,s)}return l}function writeFileSync(f,e,n){if(typeof n==="string")n={encoding:n};else if(!n)n={};try{f=s.realpathSync(f)}catch(f){}const l=getTmpname(f);if(!n.mode||!n.chown){try{const e=s.statSync(f);n=Object.assign({},n);if(!n.mode){n.mode=e.mode}if(!n.chown&&process.getuid){n.chown={uid:e.uid,gid:e.gid}}}catch(f){}}let r;const w=cleanupOnExit(l);const j=v(w);let d=true;try{r=s.openSync(l,"w",n.mode);if(n.tmpfileCreated){n.tmpfileCreated(l)}if(b(e)){e=g(e)}if(Buffer.isBuffer(e)){s.writeSync(r,e,0,e.length,0)}else if(e!=null){s.writeSync(r,String(e),0,String(n.encoding||"utf8"))}if(n.fsync!==false){s.fsyncSync(r)}s.closeSync(r);r=null;if(n.chown)s.chownSync(l,n.chown.uid,n.chown.gid);if(n.mode)s.chmodSync(l,n.mode);s.renameSync(l,f);d=false}finally{if(r){try{s.closeSync(r)}catch(f){}}j();if(d){w()}}}},7727:(f,e,n)=>{"use strict";const s=n(5622);const l=n(2087);const v=l.homedir();const r=l.tmpdir();const{env:b}=process;const g=f=>{const e=s.join(v,"Library");return{data:s.join(e,"Application Support",f),config:s.join(e,"Preferences",f),cache:s.join(e,"Caches",f),log:s.join(e,"Logs",f),temp:s.join(r,f)}};const w=f=>{const e=b.APPDATA||s.join(v,"AppData","Roaming");const n=b.LOCALAPPDATA||s.join(v,"AppData","Local");return{data:s.join(n,f,"Data"),config:s.join(e,f,"Config"),cache:s.join(n,f,"Cache"),log:s.join(n,f,"Log"),temp:s.join(r,f)}};const j=f=>{const e=s.basename(v);return{data:s.join(b.XDG_DATA_HOME||s.join(v,".local","share"),f),config:s.join(b.XDG_CONFIG_HOME||s.join(v,".config"),f),cache:s.join(b.XDG_CACHE_HOME||s.join(v,".cache"),f),log:s.join(b.XDG_STATE_HOME||s.join(v,".local","state"),f),temp:s.join(r,e,f)}};const d=(f,e)=>{if(typeof f!=="string"){throw new TypeError(`Expected string, got ${typeof f}`)}e=Object.assign({suffix:"nodejs"},e);if(e.suffix){f+=`-${e.suffix}`}if(process.platform==="darwin"){return g(f)}if(process.platform==="win32"){return w(f)}return j(f)};f.exports=d;f.exports.default=d},3933:f=>{"use strict";f.exports=function equal(f,e){if(f===e)return true;if(f&&e&&typeof f=="object"&&typeof e=="object"){if(f.constructor!==e.constructor)return false;var n,s,l;if(Array.isArray(f)){n=f.length;if(n!=e.length)return false;for(s=n;s--!==0;)if(!equal(f[s],e[s]))return false;return true}if(f.constructor===RegExp)return f.source===e.source&&f.flags===e.flags;if(f.valueOf!==Object.prototype.valueOf)return f.valueOf()===e.valueOf();if(f.toString!==Object.prototype.toString)return f.toString()===e.toString();l=Object.keys(f);n=l.length;if(n!==Object.keys(e).length)return false;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(e,l[s]))return false;for(s=n;s--!==0;){var v=l[s];if(!equal(f[v],e[v]))return false}return true}return f!==f&&e!==e}},3600:f=>{"use strict";f.exports=function(f,e){if(!e)e={};if(typeof e==="function")e={cmp:e};var n=typeof e.cycles==="boolean"?e.cycles:false;var s=e.cmp&&function(f){return function(e){return function(n,s){var l={key:n,value:e[n]};var v={key:s,value:e[s]};return f(l,v)}}}(e.cmp);var l=[];return function stringify(f){if(f&&f.toJSON&&typeof f.toJSON==="function"){f=f.toJSON()}if(f===undefined)return;if(typeof f=="number")return isFinite(f)?""+f:"null";if(typeof f!=="object")return JSON.stringify(f);var e,v;if(Array.isArray(f)){v="[";for(e=0;e{(function(){var e;function MurmurHash3(f,n){var s=this instanceof MurmurHash3?this:e;s.reset(n);if(typeof f==="string"&&f.length>0){s.hash(f)}if(s!==this){return s}}MurmurHash3.prototype.hash=function(f){var e,n,s,l,v;v=f.length;this.len+=v;n=this.k1;s=0;switch(this.rem){case 0:n^=v>s?f.charCodeAt(s++)&65535:0;case 1:n^=v>s?(f.charCodeAt(s++)&65535)<<8:0;case 2:n^=v>s?(f.charCodeAt(s++)&65535)<<16:0;case 3:n^=v>s?(f.charCodeAt(s)&255)<<24:0;n^=v>s?(f.charCodeAt(s++)&65280)>>8:0}this.rem=v+this.rem&3;v-=this.rem;if(v>0){e=this.h1;while(1){n=n*11601+(n&65535)*3432906752&4294967295;n=n<<15|n>>>17;n=n*13715+(n&65535)*461832192&4294967295;e^=n;e=e<<13|e>>>19;e=e*5+3864292196&4294967295;if(s>=v){break}n=f.charCodeAt(s++)&65535^(f.charCodeAt(s++)&65535)<<8^(f.charCodeAt(s++)&65535)<<16;l=f.charCodeAt(s++);n^=(l&255)<<24^(l&65280)>>8}n=0;switch(this.rem){case 3:n^=(f.charCodeAt(s+2)&65535)<<16;case 2:n^=(f.charCodeAt(s+1)&65535)<<8;case 1:n^=f.charCodeAt(s)&65535}this.h1=e}this.k1=n;return this};MurmurHash3.prototype.result=function(){var f,e;f=this.k1;e=this.h1;if(f>0){f=f*11601+(f&65535)*3432906752&4294967295;f=f<<15|f>>>17;f=f*13715+(f&65535)*461832192&4294967295;e^=f}e^=this.len;e^=e>>>16;e=e*51819+(e&65535)*2246770688&4294967295;e^=e>>>13;e=e*44597+(e&65535)*3266445312&4294967295;e^=e>>>16;return e>>>0};MurmurHash3.prototype.reset=function(f){this.h1=typeof f==="number"?f:0;this.rem=this.k1=this.len=0;return this};e=new MurmurHash3;if(true){f.exports=MurmurHash3}else{}})()},3010:f=>{f.exports=isTypedArray;isTypedArray.strict=isStrictTypedArray;isTypedArray.loose=isLooseTypedArray;var e=Object.prototype.toString;var n={"[object Int8Array]":true,"[object Int16Array]":true,"[object Int32Array]":true,"[object Uint8Array]":true,"[object Uint8ClampedArray]":true,"[object Uint16Array]":true,"[object Uint32Array]":true,"[object Float32Array]":true,"[object Float64Array]":true};function isTypedArray(f){return isStrictTypedArray(f)||isLooseTypedArray(f)}function isStrictTypedArray(f){return f instanceof Int8Array||f instanceof Int16Array||f instanceof Int32Array||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Uint16Array||f instanceof Uint32Array||f instanceof Float32Array||f instanceof Float64Array}function isLooseTypedArray(f){return n[e.call(f)]}},2437:f=>{"use strict";var e=f.exports=function(f,e,n){if(typeof e=="function"){n=e;e={}}n=e.cb||n;var s=typeof n=="function"?n:n.pre||function(){};var l=n.post||function(){};_traverse(e,s,l,f,"",f)};e.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true};e.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};e.propsKeywords={definitions:true,properties:true,patternProperties:true,dependencies:true};e.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(f,n,s,l,v,r,b,g,w,j){if(l&&typeof l=="object"&&!Array.isArray(l)){n(l,v,r,b,g,w,j);for(var d in l){var E=l[d];if(Array.isArray(E)){if(d in e.arrayKeywords){for(var R=0;R{"use strict";const s=n(4442);f.exports=(async({cwd:f}={})=>s("package.json",{cwd:f}));f.exports.sync=(({cwd:f}={})=>s.sync("package.json",{cwd:f}))},2317:(f,e,n)=>{var s=n(2357);var l=n(2935);var v=n(8614);if(typeof v!=="function"){v=v.EventEmitter}var r;if(process.__signal_exit_emitter__){r=process.__signal_exit_emitter__}else{r=process.__signal_exit_emitter__=new v;r.count=0;r.emitted={}}if(!r.infinite){r.setMaxListeners(Infinity);r.infinite=true}f.exports=function(f,e){s.equal(typeof f,"function","a callback must be provided for exit handler");if(g===false){load()}var n="exit";if(e&&e.alwaysLast){n="afterexit"}var l=function(){r.removeListener(n,f);if(r.listeners("exit").length===0&&r.listeners("afterexit").length===0){unload()}};r.on(n,f);return l};f.exports.unload=unload;function unload(){if(!g){return}g=false;l.forEach(function(f){try{process.removeListener(f,b[f])}catch(f){}});process.emit=j;process.reallyExit=w;r.count-=1}function emit(f,e,n){if(r.emitted[f]){return}r.emitted[f]=true;r.emit(f,e,n)}var b={};l.forEach(function(f){b[f]=function listener(){var e=process.listeners(f);if(e.length===r.count){unload();emit("exit",null,f);emit("afterexit",null,f);process.kill(process.pid,f)}}});f.exports.signals=function(){return l};f.exports.load=load;var g=false;function load(){if(g){return}g=true;r.count+=1;l=l.filter(function(f){try{process.on(f,b[f]);return true}catch(f){return false}});process.emit=processEmit;process.reallyExit=processReallyExit}var w=process.reallyExit;function processReallyExit(f){process.exitCode=f||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);w.call(process,process.exitCode)}var j=process.emit;function processEmit(f,e){if(f==="exit"){if(e!==undefined){process.exitCode=e}var n=j.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return n}else{return j.apply(this,arguments)}}},2935:f=>{f.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){f.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){f.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},4005:(f,e,n)=>{var s=n(3010).strict;f.exports=function typedarrayToBuffer(f){if(s(f)){var e=Buffer.from(f.buffer);if(f.byteLength!==f.buffer.byteLength){e=e.slice(f.byteOffset,f.byteOffset+f.byteLength)}return e}else{return Buffer.from(f)}}},4007:function(f,e){(function(f,n){true?n(e):0})(this,function(f){"use strict";function merge(){for(var f=arguments.length,e=Array(f),n=0;n1){e[0]=e[0].slice(0,-1);var s=e.length-1;for(var l=1;l= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var x=r-b;var z=Math.floor;var U=String.fromCharCode;function error$1(f){throw new RangeError(I[f])}function map(f,e){var n=[];var s=f.length;while(s--){n[s]=e(f[s])}return n}function mapDomain(f,e){var n=f.split("@");var s="";if(n.length>1){s=n[0]+"@";f=n[1]}f=f.replace(p,".");var l=f.split(".");var v=map(l,e).join(".");return s+v}function ucs2decode(f){var e=[];var n=0;var s=f.length;while(n=55296&&l<=56319&&n>1;f+=z(f/e);for(;f>x*g>>1;s+=r){f=z(f/x)}return z(s+(x+1)*f/(f+w))};var C=function decode(f){var e=[];var n=f.length;var s=0;var l=E;var w=d;var j=f.lastIndexOf(R);if(j<0){j=0}for(var A=0;A=128){error$1("not-basic")}e.push(f.charCodeAt(A))}for(var F=j>0?j+1:0;F=n){error$1("invalid-input")}var U=Q(f.charCodeAt(F++));if(U>=r||U>z((v-s)/I)){error$1("overflow")}s+=U*I;var N=x<=w?b:x>=w+g?g:x-w;if(Uz(v/q)){error$1("overflow")}I*=q}var C=e.length+1;w=O(s-p,C,p==0);if(z(s/C)>v-l){error$1("overflow")}l+=z(s/C);s%=C;e.splice(s++,0,l)}return String.fromCodePoint.apply(String,e)};var L=function encode(f){var e=[];f=ucs2decode(f);var n=f.length;var s=E;var l=0;var w=d;var j=true;var A=false;var F=undefined;try{for(var p=f[Symbol.iterator](),I;!(j=(I=p.next()).done);j=true){var x=I.value;if(x<128){e.push(U(x))}}}catch(f){A=true;F=f}finally{try{if(!j&&p.return){p.return()}}finally{if(A){throw F}}}var N=e.length;var Q=N;if(N){e.push(R)}while(Q=s&&Xz((v-l)/M)){error$1("overflow")}l+=(C-s)*M;s=C;var Y=true;var W=false;var B=undefined;try{for(var c=f[Symbol.iterator](),Z;!(Y=(Z=c.next()).done);Y=true){var D=Z.value;if(Dv){error$1("overflow")}if(D==s){var K=l;for(var V=r;;V+=r){var y=V<=w?b:V>=w+g?g:V-w;if(K>6|192).toString(16).toUpperCase()+"%"+(e&63|128).toString(16).toUpperCase();else n="%"+(e>>12|224).toString(16).toUpperCase()+"%"+(e>>6&63|128).toString(16).toUpperCase()+"%"+(e&63|128).toString(16).toUpperCase();return n}function pctDecChars(f){var e="";var n=0;var s=f.length;while(n=194&&l<224){if(s-n>=6){var v=parseInt(f.substr(n+4,2),16);e+=String.fromCharCode((l&31)<<6|v&63)}else{e+=f.substr(n,6)}n+=6}else if(l>=224){if(s-n>=9){var r=parseInt(f.substr(n+4,2),16);var b=parseInt(f.substr(n+7,2),16);e+=String.fromCharCode((l&15)<<12|(r&63)<<6|b&63)}else{e+=f.substr(n,9)}n+=9}else{e+=f.substr(n,3);n+=3}}return e}function _normalizeComponentEncoding(f,e){function decodeUnreserved(f){var n=pctDecChars(f);return!n.match(e.UNRESERVED)?f:n}if(f.scheme)f.scheme=String(f.scheme).replace(e.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(e.NOT_SCHEME,"");if(f.userinfo!==undefined)f.userinfo=String(f.userinfo).replace(e.PCT_ENCODED,decodeUnreserved).replace(e.NOT_USERINFO,pctEncChar).replace(e.PCT_ENCODED,toUpperCase);if(f.host!==undefined)f.host=String(f.host).replace(e.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(e.NOT_HOST,pctEncChar).replace(e.PCT_ENCODED,toUpperCase);if(f.path!==undefined)f.path=String(f.path).replace(e.PCT_ENCODED,decodeUnreserved).replace(f.scheme?e.NOT_PATH:e.NOT_PATH_NOSCHEME,pctEncChar).replace(e.PCT_ENCODED,toUpperCase);if(f.query!==undefined)f.query=String(f.query).replace(e.PCT_ENCODED,decodeUnreserved).replace(e.NOT_QUERY,pctEncChar).replace(e.PCT_ENCODED,toUpperCase);if(f.fragment!==undefined)f.fragment=String(f.fragment).replace(e.PCT_ENCODED,decodeUnreserved).replace(e.NOT_FRAGMENT,pctEncChar).replace(e.PCT_ENCODED,toUpperCase);return f}function _stripLeadingZeros(f){return f.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(f,e){var n=f.match(e.IPV4ADDRESS)||[];var l=s(n,2),v=l[1];if(v){return v.split(".").map(_stripLeadingZeros).join(".")}else{return f}}function _normalizeIPv6(f,e){var n=f.match(e.IPV6ADDRESS)||[];var l=s(n,3),v=l[1],r=l[2];if(v){var b=v.toLowerCase().split("::").reverse(),g=s(b,2),w=g[0],j=g[1];var d=j?j.split(":").map(_stripLeadingZeros):[];var E=w.split(":").map(_stripLeadingZeros);var R=e.IPV4ADDRESS.test(E[E.length-1]);var A=R?7:8;var F=E.length-A;var p=Array(A);for(var I=0;I1){var N=p.slice(0,z.index);var Q=p.slice(z.index+z.length);U=N.join(":")+"::"+Q.join(":")}else{U=p.join(":")}if(r){U+="%"+r}return U}else{return f}}var X=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var M="".match(/(){0}/)[1]===undefined;function parse(f){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var l={};var v=s.iri!==false?n:e;if(s.reference==="suffix")f=(s.scheme?s.scheme+":":"")+"//"+f;var r=f.match(X);if(r){if(M){l.scheme=r[1];l.userinfo=r[3];l.host=r[4];l.port=parseInt(r[5],10);l.path=r[6]||"";l.query=r[7];l.fragment=r[8];if(isNaN(l.port)){l.port=r[5]}}else{l.scheme=r[1]||undefined;l.userinfo=f.indexOf("@")!==-1?r[3]:undefined;l.host=f.indexOf("//")!==-1?r[4]:undefined;l.port=parseInt(r[5],10);l.path=r[6]||"";l.query=f.indexOf("?")!==-1?r[7]:undefined;l.fragment=f.indexOf("#")!==-1?r[8]:undefined;if(isNaN(l.port)){l.port=f.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:undefined}}if(l.host){l.host=_normalizeIPv6(_normalizeIPv4(l.host,v),v)}if(l.scheme===undefined&&l.userinfo===undefined&&l.host===undefined&&l.port===undefined&&!l.path&&l.query===undefined){l.reference="same-document"}else if(l.scheme===undefined){l.reference="relative"}else if(l.fragment===undefined){l.reference="absolute"}else{l.reference="uri"}if(s.reference&&s.reference!=="suffix"&&s.reference!==l.reference){l.error=l.error||"URI is not a "+s.reference+" reference."}var b=H[(s.scheme||l.scheme||"").toLowerCase()];if(!s.unicodeSupport&&(!b||!b.unicodeSupport)){if(l.host&&(s.domainHost||b&&b.domainHost)){try{l.host=G.toASCII(l.host.replace(v.PCT_ENCODED,pctDecChars).toLowerCase())}catch(f){l.error=l.error||"Host's domain name can not be converted to ASCII via punycode: "+f}}_normalizeComponentEncoding(l,e)}else{_normalizeComponentEncoding(l,v)}if(b&&b.parse){b.parse(l,s)}}else{l.error=l.error||"URI can not be parsed."}return l}function _recomposeAuthority(f,s){var l=s.iri!==false?n:e;var v=[];if(f.userinfo!==undefined){v.push(f.userinfo);v.push("@")}if(f.host!==undefined){v.push(_normalizeIPv6(_normalizeIPv4(String(f.host),l),l).replace(l.IPV6ADDRESS,function(f,e,n){return"["+e+(n?"%25"+n:"")+"]"}))}if(typeof f.port==="number"){v.push(":");v.push(f.port.toString(10))}return v.length?v.join(""):undefined}var Y=/^\.\.?\//;var W=/^\/\.(\/|$)/;var B=/^\/\.\.(\/|$)/;var c=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(f){var e=[];while(f.length){if(f.match(Y)){f=f.replace(Y,"")}else if(f.match(W)){f=f.replace(W,"/")}else if(f.match(B)){f=f.replace(B,"/");e.pop()}else if(f==="."||f===".."){f=""}else{var n=f.match(c);if(n){var s=n[0];f=f.slice(s.length);e.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return e.join("")}function serialize(f){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var l=s.iri?n:e;var v=[];var r=H[(s.scheme||f.scheme||"").toLowerCase()];if(r&&r.serialize)r.serialize(f,s);if(f.host){if(l.IPV6ADDRESS.test(f.host)){}else if(s.domainHost||r&&r.domainHost){try{f.host=!s.iri?G.toASCII(f.host.replace(l.PCT_ENCODED,pctDecChars).toLowerCase()):G.toUnicode(f.host)}catch(e){f.error=f.error||"Host's domain name can not be converted to "+(!s.iri?"ASCII":"Unicode")+" via punycode: "+e}}}_normalizeComponentEncoding(f,l);if(s.reference!=="suffix"&&f.scheme){v.push(f.scheme);v.push(":")}var b=_recomposeAuthority(f,s);if(b!==undefined){if(s.reference!=="suffix"){v.push("//")}v.push(b);if(f.path&&f.path.charAt(0)!=="/"){v.push("/")}}if(f.path!==undefined){var g=f.path;if(!s.absolutePath&&(!r||!r.absolutePath)){g=removeDotSegments(g)}if(b===undefined){g=g.replace(/^\/\//,"/%2F")}v.push(g)}if(f.query!==undefined){v.push("?");v.push(f.query)}if(f.fragment!==undefined){v.push("#");v.push(f.fragment)}return v.join("")}function resolveComponents(f,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var s=arguments[3];var l={};if(!s){f=parse(serialize(f,n),n);e=parse(serialize(e,n),n)}n=n||{};if(!n.tolerant&&e.scheme){l.scheme=e.scheme;l.userinfo=e.userinfo;l.host=e.host;l.port=e.port;l.path=removeDotSegments(e.path||"");l.query=e.query}else{if(e.userinfo!==undefined||e.host!==undefined||e.port!==undefined){l.userinfo=e.userinfo;l.host=e.host;l.port=e.port;l.path=removeDotSegments(e.path||"");l.query=e.query}else{if(!e.path){l.path=f.path;if(e.query!==undefined){l.query=e.query}else{l.query=f.query}}else{if(e.path.charAt(0)==="/"){l.path=removeDotSegments(e.path)}else{if((f.userinfo!==undefined||f.host!==undefined||f.port!==undefined)&&!f.path){l.path="/"+e.path}else if(!f.path){l.path=e.path}else{l.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+e.path}l.path=removeDotSegments(l.path)}l.query=e.query}l.userinfo=f.userinfo;l.host=f.host;l.port=f.port}l.scheme=f.scheme}l.fragment=e.fragment;return l}function resolve(f,e,n){var s=assign({scheme:"null"},n);return serialize(resolveComponents(parse(f,s),parse(e,s),s,true),s)}function normalize(f,e){if(typeof f==="string"){f=serialize(parse(f,e),e)}else if(typeOf(f)==="object"){f=parse(serialize(f,e),e)}return f}function equal(f,e,n){if(typeof f==="string"){f=serialize(parse(f,n),n)}else if(typeOf(f)==="object"){f=serialize(f,n)}if(typeof e==="string"){e=serialize(parse(e,n),n)}else if(typeOf(e)==="object"){e=serialize(e,n)}return f===e}function escapeComponent(f,s){return f&&f.toString().replace(!s||!s.iri?e.ESCAPE:n.ESCAPE,pctEncChar)}function unescapeComponent(f,s){return f&&f.toString().replace(!s||!s.iri?e.PCT_ENCODED:n.PCT_ENCODED,pctDecChars)}var Z={scheme:"http",domainHost:true,parse:function parse(f,e){if(!f.host){f.error=f.error||"HTTP URIs must have a host."}return f},serialize:function serialize(f,e){if(f.port===(String(f.scheme).toLowerCase()!=="https"?80:443)||f.port===""){f.port=undefined}if(!f.path){f.path="/"}return f}};var D={scheme:"https",domainHost:Z.domainHost,parse:Z.parse,serialize:Z.serialize};var K={};var V=true;var y="[A-Za-z0-9\\-\\.\\_\\~"+(V?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var k="[0-9A-Fa-f]";var h=subexp(subexp("%[EFef]"+k+"%"+k+k+"%"+k+k)+"|"+subexp("%[89A-Fa-f]"+k+"%"+k+k)+"|"+subexp("%"+k+k));var a="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var S="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var m=merge(S,'[\\"\\\\]');var P="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var i=new RegExp(y,"g");var _=new RegExp(h,"g");var u=new RegExp(merge("[^]",a,"[\\.]",'[\\"]',m),"g");var o=new RegExp(merge("[^]",y,P),"g");var $=o;function decodeUnreserved(f){var e=pctDecChars(f);return!e.match(i)?f:e}var t={scheme:"mailto",parse:function parse$$1(f,e){var n=f;var s=n.to=n.path?n.path.split(","):[];n.path=undefined;if(n.query){var l=false;var v={};var r=n.query.split("&");for(var b=0,g=r.length;b{"use strict";f.exports=require("assert")},6417:f=>{"use strict";f.exports=require("crypto")},8614:f=>{"use strict";f.exports=require("events")},5747:f=>{"use strict";f.exports=require("fs")},4442:f=>{"use strict";f.exports=require("next/dist/compiled/find-up")},2519:f=>{"use strict";f.exports=require("next/dist/compiled/semver")},2087:f=>{"use strict";f.exports=require("os")},5622:f=>{"use strict";f.exports=require("path")},1669:f=>{"use strict";f.exports=require("util")},5013:f=>{"use strict";f.exports=require("worker_threads")}};var e={};function __webpack_require__(n){if(e[n]){return e[n].exports}var s=e[n]={id:n,loaded:false,exports:{}};var l=true;try{f[n].call(s.exports,s,s.exports,__webpack_require__);l=false}finally{if(l)delete e[n]}s.loaded=true;return s.exports}(()=>{__webpack_require__.nmd=(f=>{f.paths=[];if(!f.children)f.children=[];return f})})();__webpack_require__.ab=__dirname+"/";return __webpack_require__(3331)})(); \ No newline at end of file +module.exports=(()=>{var f={601:f=>{"use strict";f.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},8938:f=>{"use strict";f.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},1414:(f,e,n)=>{"use strict";var s=n(1645),l=n(2630),v=n(7246),r=n(7837),b=n(3600),g=n(9290),w=n(1665),j=n(6989),d=n(6057);f.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=n(75);var E=n(8093);Ajv.prototype.addKeyword=E.add;Ajv.prototype.getKeyword=E.get;Ajv.prototype.removeKeyword=E.remove;Ajv.prototype.validateKeyword=E.validate;var R=n(2718);Ajv.ValidationError=R.Validation;Ajv.MissingRefError=R.MissingRef;Ajv.$dataMetaSchema=j;var A="http://json-schema.org/draft-07/schema";var F=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var p=["/properties"];function Ajv(f){if(!(this instanceof Ajv))return new Ajv(f);f=this._opts=d.copy(f)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=g(f.format);this._cache=f.cache||new v;this._loadingSchemas={};this._compilations=[];this.RULES=w();this._getId=chooseGetId(f);f.loopRequired=f.loopRequired||Infinity;if(f.errorDataPath=="property")f._errorDataPathProperty=true;if(f.serialize===undefined)f.serialize=b;this._metaOpts=getMetaSchemaOptions(this);if(f.formats)addInitialFormats(this);if(f.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof f.meta=="object")this.addMetaSchema(f.meta);if(f.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(f,e){var n;if(typeof f=="string"){n=this.getSchema(f);if(!n)throw new Error('no schema with key or ref "'+f+'"')}else{var s=this._addSchema(f);n=s.validate||this._compile(s)}var l=n(e);if(n.$async!==true)this.errors=n.errors;return l}function compile(f,e){var n=this._addSchema(f,undefined,e);return n.validate||this._compile(n)}function addSchema(f,e,n,s){if(Array.isArray(f)){for(var v=0;v{"use strict";var e=f.exports=function Cache(){this._cache={}};e.prototype.put=function Cache_put(f,e){this._cache[f]=e};e.prototype.get=function Cache_get(f){return this._cache[f]};e.prototype.del=function Cache_del(f){delete this._cache[f]};e.prototype.clear=function Cache_clear(){this._cache={}}},75:(f,e,n)=>{"use strict";var s=n(2718).MissingRef;f.exports=compileAsync;function compileAsync(f,e,n){var l=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof e=="function"){n=e;e=undefined}var v=loadMetaSchemaOf(f).then(function(){var n=l._addSchema(f,undefined,e);return n.validate||_compileAsync(n)});if(n){v.then(function(f){n(null,f)},n)}return v;function loadMetaSchemaOf(f){var e=f.$schema;return e&&!l.getSchema(e)?compileAsync.call(l,{$ref:e},true):Promise.resolve()}function _compileAsync(f){try{return l._compile(f)}catch(f){if(f instanceof s)return loadMissingSchema(f);throw f}function loadMissingSchema(n){var s=n.missingSchema;if(added(s))throw new Error("Schema "+s+" is loaded but "+n.missingRef+" cannot be resolved");var v=l._loadingSchemas[s];if(!v){v=l._loadingSchemas[s]=l._opts.loadSchema(s);v.then(removePromise,removePromise)}return v.then(function(f){if(!added(s)){return loadMetaSchemaOf(f).then(function(){if(!added(s))l.addSchema(f,s,undefined,e)})}}).then(function(){return _compileAsync(f)});function removePromise(){delete l._loadingSchemas[s]}function added(f){return l._refs[f]||l._schemas[f]}}}}},2718:(f,e,n)=>{"use strict";var s=n(2630);f.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(f){this.message="validation failed";this.errors=f;this.ajv=this.validation=true}MissingRefError.message=function(f,e){return"can't resolve reference "+e+" from id "+f};function MissingRefError(f,e,n){this.message=n||MissingRefError.message(f,e);this.missingRef=s.url(f,e);this.missingSchema=s.normalizeId(s.fullPath(this.missingRef))}function errorSubclass(f){f.prototype=Object.create(Error.prototype);f.prototype.constructor=f;return f}},9290:(f,e,n)=>{"use strict";var s=n(6057);var l=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var v=[0,31,28,31,30,31,30,31,31,30,31,30,31];var r=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var b=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var w=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var j=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var d=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var E=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var R=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var A=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var F=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;f.exports=formats;function formats(f){f=f=="full"?"full":"fast";return s.copy(formats[f])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":j,url:d,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:b,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:E,"json-pointer":R,"json-pointer-uri-fragment":A,"relative-json-pointer":F};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":w,"uri-template":j,url:d,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:b,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:E,"json-pointer":R,"json-pointer-uri-fragment":A,"relative-json-pointer":F};function isLeapYear(f){return f%4===0&&(f%100!==0||f%400===0)}function date(f){var e=f.match(l);if(!e)return false;var n=+e[1];var s=+e[2];var r=+e[3];return s>=1&&s<=12&&r>=1&&r<=(s==2&&isLeapYear(n)?29:v[s])}function time(f,e){var n=f.match(r);if(!n)return false;var s=n[1];var l=n[2];var v=n[3];var b=n[5];return(s<=23&&l<=59&&v<=59||s==23&&l==59&&v==60)&&(!e||b)}var p=/t|\s/i;function date_time(f){var e=f.split(p);return e.length==2&&date(e[0])&&time(e[1],true)}var I=/\/|:/;function uri(f){return I.test(f)&&g.test(f)}var x=/[^\\]\\Z/;function regex(f){if(x.test(f))return false;try{new RegExp(f);return true}catch(f){return false}}},1645:(f,e,n)=>{"use strict";var s=n(2630),l=n(6057),v=n(2718),r=n(3600);var b=n(6131);var g=l.ucs2length;var w=n(3933);var j=v.Validation;f.exports=compile;function compile(f,e,n,d){var E=this,R=this._opts,A=[undefined],F={},p=[],I={},x=[],z={},U=[];e=e||{schema:f,refVal:A,refs:F};var N=checkCompiling.call(this,f,e,d);var Q=this._compilations[N.index];if(N.compiling)return Q.callValidate=callValidate;var q=this._formats;var O=this.RULES;try{var C=localCompile(f,e,n,d);Q.validate=C;var L=Q.callValidate;if(L){L.schema=C.schema;L.errors=null;L.refs=C.refs;L.refVal=C.refVal;L.root=C.root;L.$async=C.$async;if(R.sourceCode)L.source=C.source}return C}finally{endCompiling.call(this,f,e,d)}function callValidate(){var f=Q.validate;var e=f.apply(this,arguments);callValidate.errors=f.errors;return e}function localCompile(f,n,r,d){var I=!n||n&&n.schema==f;if(n.schema!=e.schema)return compile.call(E,f,n,r,d);var z=f.$async===true;var N=b({isTop:true,schema:f,isRoot:I,baseId:d,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:v.MissingRef,RULES:O,validate:b,util:l,resolve:s,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:R,formats:q,logger:E.logger,self:E});N=vars(A,refValCode)+vars(p,patternCode)+vars(x,defaultCode)+vars(U,customRuleCode)+N;if(R.processCode)N=R.processCode(N,f);var Q;try{var C=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",N);Q=C(E,O,q,e,A,x,U,w,g,j);A[0]=Q}catch(f){E.logger.error("Error compiling schema, function code:",N);throw f}Q.schema=f;Q.errors=null;Q.refs=F;Q.refVal=A;Q.root=I?Q:n;if(z)Q.$async=true;if(R.sourceCode===true){Q.source={code:N,patterns:p,defaults:x}}return Q}function resolveRef(f,l,v){l=s.url(f,l);var r=F[l];var b,g;if(r!==undefined){b=A[r];g="refVal["+r+"]";return resolvedRef(b,g)}if(!v&&e.refs){var w=e.refs[l];if(w!==undefined){b=e.refVal[w];g=addLocalRef(l,b);return resolvedRef(b,g)}}g=addLocalRef(l);var j=s.call(E,localCompile,e,l);if(j===undefined){var d=n&&n[l];if(d){j=s.inlineRef(d,R.inlineRefs)?d:compile.call(E,d,e,n,f)}}if(j===undefined){removeLocalRef(l)}else{replaceLocalRef(l,j);return resolvedRef(j,g)}}function addLocalRef(f,e){var n=A.length;A[n]=e;F[f]=n;return"refVal"+n}function removeLocalRef(f){delete F[f]}function replaceLocalRef(f,e){var n=F[f];A[n]=e}function resolvedRef(f,e){return typeof f=="object"||typeof f=="boolean"?{code:e,schema:f,inline:true}:{code:e,$async:f&&!!f.$async}}function usePattern(f){var e=I[f];if(e===undefined){e=I[f]=p.length;p[e]=f}return"pattern"+e}function useDefault(f){switch(typeof f){case"boolean":case"number":return""+f;case"string":return l.toQuotedString(f);case"object":if(f===null)return"null";var e=r(f);var n=z[e];if(n===undefined){n=z[e]=x.length;x[n]=f}return"default"+n}}function useCustomRule(f,e,n,s){if(E._opts.validateSchema!==false){var l=f.definition.dependencies;if(l&&!l.every(function(f){return Object.prototype.hasOwnProperty.call(n,f)}))throw new Error("parent schema must have all required keywords: "+l.join(","));var v=f.definition.validateSchema;if(v){var r=v(e);if(!r){var b="keyword schema is invalid: "+E.errorsText(v.errors);if(E._opts.validateSchema=="log")E.logger.error(b);else throw new Error(b)}}}var g=f.definition.compile,w=f.definition.inline,j=f.definition.macro;var d;if(g){d=g.call(E,e,n,s)}else if(j){d=j.call(E,e,n,s);if(R.validateSchema!==false)E.validateSchema(d,true)}else if(w){d=w.call(E,s,f.keyword,e,n)}else{d=f.definition.validate;if(!d)return}if(d===undefined)throw new Error('custom keyword "'+f.keyword+'"failed to compile');var A=U.length;U[A]=d;return{code:"customRule"+A,validate:d}}}function checkCompiling(f,e,n){var s=compIndex.call(this,f,e,n);if(s>=0)return{index:s,compiling:true};s=this._compilations.length;this._compilations[s]={schema:f,root:e,baseId:n};return{index:s,compiling:false}}function endCompiling(f,e,n){var s=compIndex.call(this,f,e,n);if(s>=0)this._compilations.splice(s,1)}function compIndex(f,e,n){for(var s=0;s{"use strict";var s=n(4007),l=n(3933),v=n(6057),r=n(7837),b=n(2437);f.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(f,e,n){var s=this._refs[n];if(typeof s=="string"){if(this._refs[s])s=this._refs[s];else return resolve.call(this,f,e,s)}s=s||this._schemas[n];if(s instanceof r){return inlineRef(s.schema,this._opts.inlineRefs)?s.schema:s.validate||this._compile(s)}var l=resolveSchema.call(this,e,n);var v,b,g;if(l){v=l.schema;e=l.root;g=l.baseId}if(v instanceof r){b=v.validate||f.call(this,v.schema,e,undefined,g)}else if(v!==undefined){b=inlineRef(v,this._opts.inlineRefs)?v:f.call(this,v,e,undefined,g)}return b}function resolveSchema(f,e){var n=s.parse(e),l=_getFullPath(n),v=getFullPath(this._getId(f.schema));if(Object.keys(f.schema).length===0||l!==v){var b=normalizeId(l);var g=this._refs[b];if(typeof g=="string"){return resolveRecursive.call(this,f,g,n)}else if(g instanceof r){if(!g.validate)this._compile(g);f=g}else{g=this._schemas[b];if(g instanceof r){if(!g.validate)this._compile(g);if(b==normalizeId(e))return{schema:g,root:f,baseId:v};f=g}else{return}}if(!f.schema)return;v=getFullPath(this._getId(f.schema))}return getJsonPointer.call(this,n,v,f.schema,f)}function resolveRecursive(f,e,n){var s=resolveSchema.call(this,f,e);if(s){var l=s.schema;var v=s.baseId;f=s.root;var r=this._getId(l);if(r)v=resolveUrl(v,r);return getJsonPointer.call(this,n,v,l,f)}}var g=v.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(f,e,n,s){f.fragment=f.fragment||"";if(f.fragment.slice(0,1)!="/")return;var l=f.fragment.split("/");for(var r=1;r{"use strict";var s=n(4124),l=n(6057).toHash;f.exports=function rules(){var f=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var e=["type","$comment"];var n=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var v=["number","integer","string","array","object","boolean","null"];f.all=l(e);f.types=l(v);f.forEach(function(n){n.rules=n.rules.map(function(n){var l;if(typeof n=="object"){var v=Object.keys(n)[0];l=n[v];n=v;l.forEach(function(n){e.push(n);f.all[n]=true})}e.push(n);var r=f.all[n]={keyword:n,code:s[n],implements:l};return r});f.all.$comment={keyword:"$comment",code:s.$comment};if(n.type)f.types[n.type]=n});f.keywords=l(e.concat(n));f.custom={};return f}},7837:(f,e,n)=>{"use strict";var s=n(6057);f.exports=SchemaObject;function SchemaObject(f){s.copy(f,this)}},9652:f=>{"use strict";f.exports=function ucs2length(f){var e=0,n=f.length,s=0,l;while(s=55296&&l<=56319&&s{"use strict";f.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:n(3933),ucs2length:n(9652),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(f,e){e=e||{};for(var n in f)e[n]=f[n];return e}function checkDataType(f,e,n,s){var l=s?" !== ":" === ",v=s?" || ":" && ",r=s?"!":"",b=s?"":"!";switch(f){case"null":return e+l+"null";case"array":return r+"Array.isArray("+e+")";case"object":return"("+r+e+v+"typeof "+e+l+'"object"'+v+b+"Array.isArray("+e+"))";case"integer":return"(typeof "+e+l+'"number"'+v+b+"("+e+" % 1)"+v+e+l+e+(n?v+r+"isFinite("+e+")":"")+")";case"number":return"(typeof "+e+l+'"'+f+'"'+(n?v+r+"isFinite("+e+")":"")+")";default:return"typeof "+e+l+'"'+f+'"'}}function checkDataTypes(f,e,n){switch(f.length){case 1:return checkDataType(f[0],e,n,true);default:var s="";var l=toHash(f);if(l.array&&l.object){s=l.null?"(":"(!"+e+" || ";s+="typeof "+e+' !== "object")';delete l.null;delete l.array;delete l.object}if(l.number)delete l.integer;for(var v in l)s+=(s?" && ":"")+checkDataType(v,e,n,true);return s}}var s=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(f,e){if(Array.isArray(e)){var n=[];for(var l=0;l=e)throw new Error("Cannot access property/index "+s+" levels up, current level is "+e);return n[e-s]}if(s>e)throw new Error("Cannot access data "+s+" levels up, current level is "+e);v="data"+(e-s||"");if(!l)return v}var w=v;var j=l.split("/");for(var d=0;d{"use strict";var e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];f.exports=function(f,n){for(var s=0;s{"use strict";var s=n(8938);f.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:s.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:s.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},3711:f=>{"use strict";f.exports=function generate__limit(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j;var d="data"+(v||"");var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}var A=e=="maximum",F=A?"exclusiveMaximum":"exclusiveMinimum",p=f.schema[F],I=f.opts.$data&&p&&p.$data,x=A?"<":">",z=A?">":"<",j=undefined;if(!(E||typeof r=="number"||r===undefined)){throw new Error(e+" must be number")}if(!(I||p===undefined||typeof p=="number"||typeof p=="boolean")){throw new Error(F+" must be number or boolean")}if(I){var U=f.util.getData(p.$data,v,f.dataPathArr),N="exclusive"+l,Q="exclType"+l,q="exclIsNumber"+l,O="op"+l,C="' + "+O+" + '";s+=" var schemaExcl"+l+" = "+U+"; ";U="schemaExcl"+l;s+=" var "+N+"; var "+Q+" = typeof "+U+"; if ("+Q+" != 'boolean' && "+Q+" != 'undefined' && "+Q+" != 'number') { ";var j=F;var L=L||[];L.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: {} ";if(f.opts.messages!==false){s+=" , message: '"+F+" should be boolean' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var J=s;s=L.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+J+"]); "}else{s+=" validate.errors = ["+J+"]; return false; "}}else{s+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}s+=" "+Q+" == 'number' ? ( ("+N+" = "+R+" === undefined || "+U+" "+x+"= "+R+") ? "+d+" "+z+"= "+U+" : "+d+" "+z+" "+R+" ) : ( ("+N+" = "+U+" === true) ? "+d+" "+z+"= "+R+" : "+d+" "+z+" "+R+" ) || "+d+" !== "+d+") { var op"+l+" = "+N+" ? '"+x+"' : '"+x+"='; ";if(r===undefined){j=F;g=f.errSchemaPath+"/"+F;R=U;E=I}}else{var q=typeof p=="number",C=x;if(q&&E){var O="'"+C+"'";s+=" if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}s+=" ( "+R+" === undefined || "+p+" "+x+"= "+R+" ? "+d+" "+z+"= "+p+" : "+d+" "+z+" "+R+" ) || "+d+" !== "+d+") { "}else{if(q&&r===undefined){N=true;j=F;g=f.errSchemaPath+"/"+F;R=p;z+="="}else{if(q)R=Math[A?"min":"max"](p,r);if(p===(q?R:true)){N=true;j=F;g=f.errSchemaPath+"/"+F;z+="="}else{N=false;C+="="}}var O="'"+C+"'";s+=" if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}s+=" "+d+" "+z+" "+R+" || "+d+" !== "+d+") { "}}j=j||e;var L=L||[];L.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"_limit")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { comparison: "+O+", limit: "+R+", exclusive: "+N+" } ";if(f.opts.messages!==false){s+=" , message: 'should be "+C+" ";if(E){s+="' + "+R}else{s+=""+R+"'"}}if(f.opts.verbose){s+=" , schema: ";if(E){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var J=s;s=L.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+J+"]); "}else{s+=" validate.errors = ["+J+"]; return false; "}}else{s+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(w){s+=" else { "}return s}},5675:f=>{"use strict";f.exports=function generate__limitItems(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j;var d="data"+(v||"");var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}if(!(E||typeof r=="number")){throw new Error(e+" must be number")}var A=e=="maxItems"?">":"<";s+="if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}s+=" "+d+".length "+A+" "+R+") { ";var j=e;var F=F||[];F.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"_limitItems")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { limit: "+R+" } ";if(f.opts.messages!==false){s+=" , message: 'should NOT have ";if(e=="maxItems"){s+="more"}else{s+="fewer"}s+=" than ";if(E){s+="' + "+R+" + '"}else{s+=""+r}s+=" items' "}if(f.opts.verbose){s+=" , schema: ";if(E){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var p=s;s=F.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+p+"]); "}else{s+=" validate.errors = ["+p+"]; return false; "}}else{s+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(w){s+=" else { "}return s}},6051:f=>{"use strict";f.exports=function generate__limitLength(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j;var d="data"+(v||"");var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}if(!(E||typeof r=="number")){throw new Error(e+" must be number")}var A=e=="maxLength"?">":"<";s+="if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}if(f.opts.unicode===false){s+=" "+d+".length "}else{s+=" ucs2length("+d+") "}s+=" "+A+" "+R+") { ";var j=e;var F=F||[];F.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"_limitLength")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { limit: "+R+" } ";if(f.opts.messages!==false){s+=" , message: 'should NOT be ";if(e=="maxLength"){s+="longer"}else{s+="shorter"}s+=" than ";if(E){s+="' + "+R+" + '"}else{s+=""+r}s+=" characters' "}if(f.opts.verbose){s+=" , schema: ";if(E){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var p=s;s=F.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+p+"]); "}else{s+=" validate.errors = ["+p+"]; return false; "}}else{s+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(w){s+=" else { "}return s}},7043:f=>{"use strict";f.exports=function generate__limitProperties(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j;var d="data"+(v||"");var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}if(!(E||typeof r=="number")){throw new Error(e+" must be number")}var A=e=="maxProperties"?">":"<";s+="if ( ";if(E){s+=" ("+R+" !== undefined && typeof "+R+" != 'number') || "}s+=" Object.keys("+d+").length "+A+" "+R+") { ";var j=e;var F=F||[];F.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"_limitProperties")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { limit: "+R+" } ";if(f.opts.messages!==false){s+=" , message: 'should NOT have ";if(e=="maxProperties"){s+="more"}else{s+="fewer"}s+=" than ";if(E){s+="' + "+R+" + '"}else{s+=""+r}s+=" properties' "}if(f.opts.verbose){s+=" , schema: ";if(E){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var p=s;s=F.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+p+"]); "}else{s+=" validate.errors = ["+p+"]; return false; "}}else{s+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(w){s+=" else { "}return s}},3639:f=>{"use strict";f.exports=function generate_allOf(f,e,n){var s=" ";var l=f.schema[e];var v=f.schemaPath+f.util.getProperty(e);var r=f.errSchemaPath+"/"+e;var b=!f.opts.allErrors;var g=f.util.copy(f);var w="";g.level++;var j="valid"+g.level;var d=g.baseId,E=true;var R=l;if(R){var A,F=-1,p=R.length-1;while(F0||A===false:f.util.schemaHasRules(A,f.RULES.all)){E=false;g.schema=A;g.schemaPath=v+"["+F+"]";g.errSchemaPath=r+"/"+F;s+=" "+f.validate(g)+" ";g.baseId=d;if(b){s+=" if ("+j+") { ";w+="}"}}}}if(b){if(E){s+=" if (true) { "}else{s+=" "+w.slice(0,-1)+" "}}return s}},1256:f=>{"use strict";f.exports=function generate_anyOf(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E="errs__"+l;var R=f.util.copy(f);var A="";R.level++;var F="valid"+R.level;var p=r.every(function(e){return f.opts.strictKeywords?typeof e=="object"&&Object.keys(e).length>0||e===false:f.util.schemaHasRules(e,f.RULES.all)});if(p){var I=R.baseId;s+=" var "+E+" = errors; var "+d+" = false; ";var x=f.compositeRule;f.compositeRule=R.compositeRule=true;var z=r;if(z){var U,N=-1,Q=z.length-1;while(N{"use strict";f.exports=function generate_comment(f,e,n){var s=" ";var l=f.schema[e];var v=f.errSchemaPath+"/"+e;var r=!f.opts.allErrors;var b=f.util.toQuotedString(l);if(f.opts.$comment===true){s+=" console.log("+b+");"}else if(typeof f.opts.$comment=="function"){s+=" self._opts.$comment("+b+", "+f.util.toQuotedString(v)+", validate.root.schema);"}return s}},184:f=>{"use strict";f.exports=function generate_const(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}if(!E){s+=" var schema"+l+" = validate.schema"+b+";"}s+="var "+d+" = equal("+j+", schema"+l+"); if (!"+d+") { ";var A=A||[];A.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { allowedValue: schema"+l+" } ";if(f.opts.messages!==false){s+=" , message: 'should be equal to constant' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var F=s;s=A.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+F+"]); "}else{s+=" validate.errors = ["+F+"]; return false; "}}else{s+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(w){s+=" else { "}return s}},7419:f=>{"use strict";f.exports=function generate_contains(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E="errs__"+l;var R=f.util.copy(f);var A="";R.level++;var F="valid"+R.level;var p="i"+l,I=R.dataLevel=f.dataLevel+1,x="data"+I,z=f.baseId,U=f.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:f.util.schemaHasRules(r,f.RULES.all);s+="var "+E+" = errors;var "+d+";";if(U){var N=f.compositeRule;f.compositeRule=R.compositeRule=true;R.schema=r;R.schemaPath=b;R.errSchemaPath=g;s+=" var "+F+" = false; for (var "+p+" = 0; "+p+" < "+j+".length; "+p+"++) { ";R.errorPath=f.util.getPathExpr(f.errorPath,p,f.opts.jsonPointers,true);var Q=j+"["+p+"]";R.dataPathArr[I]=p;var q=f.validate(R);R.baseId=z;if(f.util.varOccurences(q,x)<2){s+=" "+f.util.varReplace(q,x,Q)+" "}else{s+=" var "+x+" = "+Q+"; "+q+" "}s+=" if ("+F+") break; } ";f.compositeRule=R.compositeRule=N;s+=" "+A+" if (!"+F+") {"}else{s+=" if ("+j+".length == 0) {"}var O=O||[];O.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: {} ";if(f.opts.messages!==false){s+=" , message: 'should contain a valid item' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var C=s;s=O.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+C+"]); "}else{s+=" validate.errors = ["+C+"]; return false; "}}else{s+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { ";if(U){s+=" errors = "+E+"; if (vErrors !== null) { if ("+E+") vErrors.length = "+E+"; else vErrors = null; } "}if(f.opts.allErrors){s+=" } "}return s}},7921:f=>{"use strict";f.exports=function generate_custom(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j;var d="data"+(v||"");var E="valid"+l;var R="errs__"+l;var A=f.opts.$data&&r&&r.$data,F;if(A){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";F="schema"+l}else{F=r}var p=this,I="definition"+l,x=p.definition,z="";var U,N,Q,q,O;if(A&&x.$data){O="keywordValidate"+l;var C=x.validateSchema;s+=" var "+I+" = RULES.custom['"+e+"'].definition; var "+O+" = "+I+".validate;"}else{q=f.useCustomRule(p,r,f.schema,f);if(!q)return;F="validate.schema"+b;O=q.code;U=x.compile;N=x.inline;Q=x.macro}var L=O+".errors",J="i"+l,T="ruleErr"+l,G=x.async;if(G&&!f.async)throw new Error("async keyword in sync schema");if(!(N||Q)){s+=""+L+" = null;"}s+="var "+R+" = errors;var "+E+";";if(A&&x.$data){z+="}";s+=" if ("+F+" === undefined) { "+E+" = true; } else { ";if(C){z+="}";s+=" "+E+" = "+I+".validateSchema("+F+"); if ("+E+") { "}}if(N){if(x.statements){s+=" "+q.validate+" "}else{s+=" "+E+" = "+q.validate+"; "}}else if(Q){var H=f.util.copy(f);var z="";H.level++;var X="valid"+H.level;H.schema=q.validate;H.schemaPath="";var M=f.compositeRule;f.compositeRule=H.compositeRule=true;var Y=f.validate(H).replace(/validate\.schema/g,O);f.compositeRule=H.compositeRule=M;s+=" "+Y}else{var W=W||[];W.push(s);s="";s+=" "+O+".call( ";if(f.opts.passContext){s+="this"}else{s+="self"}if(U||x.schema===false){s+=" , "+d+" "}else{s+=" , "+F+" , "+d+" , validate.schema"+f.schemaPath+" "}s+=" , (dataPath || '')";if(f.errorPath!='""'){s+=" + "+f.errorPath}var B=v?"data"+(v-1||""):"parentData",c=v?f.dataPathArr[v]:"parentDataProperty";s+=" , "+B+" , "+c+" , rootData ) ";var Z=s;s=W.pop();if(x.errors===false){s+=" "+E+" = ";if(G){s+="await "}s+=""+Z+"; "}else{if(G){L="customErrors"+l;s+=" var "+L+" = null; try { "+E+" = await "+Z+"; } catch (e) { "+E+" = false; if (e instanceof ValidationError) "+L+" = e.errors; else throw e; } "}else{s+=" "+L+" = null; "+E+" = "+Z+"; "}}}if(x.modifying){s+=" if ("+B+") "+d+" = "+B+"["+c+"];"}s+=""+z;if(x.valid){if(w){s+=" if (true) { "}}else{s+=" if ( ";if(x.valid===undefined){s+=" !";if(Q){s+=""+X}else{s+=""+E}}else{s+=" "+!x.valid+" "}s+=") { ";j=p.keyword;var W=W||[];W.push(s);s="";var W=W||[];W.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(j||"custom")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { keyword: '"+p.keyword+"' } ";if(f.opts.messages!==false){s+=" , message: 'should pass \""+p.keyword+"\" keyword validation' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var D=s;s=W.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+D+"]); "}else{s+=" validate.errors = ["+D+"]; return false; "}}else{s+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var K=s;s=W.pop();if(N){if(x.errors){if(x.errors!="full"){s+=" for (var "+J+"="+R+"; "+J+"{"use strict";f.exports=function generate_dependencies(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="errs__"+l;var E=f.util.copy(f);var R="";E.level++;var A="valid"+E.level;var F={},p={},I=f.opts.ownProperties;for(N in r){if(N=="__proto__")continue;var x=r[N];var z=Array.isArray(x)?p:F;z[N]=x}s+="var "+d+" = errors;";var U=f.errorPath;s+="var missing"+l+";";for(var N in p){z=p[N];if(z.length){s+=" if ( "+j+f.util.getProperty(N)+" !== undefined ";if(I){s+=" && Object.prototype.hasOwnProperty.call("+j+", '"+f.util.escapeQuotes(N)+"') "}if(w){s+=" && ( ";var Q=z;if(Q){var q,O=-1,C=Q.length-1;while(O0||x===false:f.util.schemaHasRules(x,f.RULES.all)){s+=" "+A+" = true; if ( "+j+f.util.getProperty(N)+" !== undefined ";if(I){s+=" && Object.prototype.hasOwnProperty.call("+j+", '"+f.util.escapeQuotes(N)+"') "}s+=") { ";E.schema=x;E.schemaPath=b+f.util.getProperty(N);E.errSchemaPath=g+"/"+f.util.escapeFragment(N);s+=" "+f.validate(E)+" ";E.baseId=B;s+=" } ";if(w){s+=" if ("+A+") { ";R+="}"}}}if(w){s+=" "+R+" if ("+d+" == errors) {"}return s}},9795:f=>{"use strict";f.exports=function generate_enum(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}var A="i"+l,F="schema"+l;if(!E){s+=" var "+F+" = validate.schema"+b+";"}s+="var "+d+";";if(E){s+=" if (schema"+l+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+l+")) "+d+" = false; else {"}s+=""+d+" = false;for (var "+A+"=0; "+A+"<"+F+".length; "+A+"++) if (equal("+j+", "+F+"["+A+"])) { "+d+" = true; break; }";if(E){s+=" } "}s+=" if (!"+d+") { ";var p=p||[];p.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { allowedValues: schema"+l+" } ";if(f.opts.messages!==false){s+=" , message: 'should be equal to one of the allowed values' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var I=s;s=p.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(w){s+=" else { "}return s}},5801:f=>{"use strict";f.exports=function generate_format(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");if(f.opts.format===false){if(w){s+=" if (true) { "}return s}var d=f.opts.$data&&r&&r.$data,E;if(d){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";E="schema"+l}else{E=r}var R=f.opts.unknownFormats,A=Array.isArray(R);if(d){var F="format"+l,p="isObject"+l,I="formatType"+l;s+=" var "+F+" = formats["+E+"]; var "+p+" = typeof "+F+" == 'object' && !("+F+" instanceof RegExp) && "+F+".validate; var "+I+" = "+p+" && "+F+".type || 'string'; if ("+p+") { ";if(f.async){s+=" var async"+l+" = "+F+".async; "}s+=" "+F+" = "+F+".validate; } if ( ";if(d){s+=" ("+E+" !== undefined && typeof "+E+" != 'string') || "}s+=" (";if(R!="ignore"){s+=" ("+E+" && !"+F+" ";if(A){s+=" && self._opts.unknownFormats.indexOf("+E+") == -1 "}s+=") || "}s+=" ("+F+" && "+I+" == '"+n+"' && !(typeof "+F+" == 'function' ? ";if(f.async){s+=" (async"+l+" ? await "+F+"("+j+") : "+F+"("+j+")) "}else{s+=" "+F+"("+j+") "}s+=" : "+F+".test("+j+"))))) {"}else{var F=f.formats[r];if(!F){if(R=="ignore"){f.logger.warn('unknown format "'+r+'" ignored in schema at path "'+f.errSchemaPath+'"');if(w){s+=" if (true) { "}return s}else if(A&&R.indexOf(r)>=0){if(w){s+=" if (true) { "}return s}else{throw new Error('unknown format "'+r+'" is used in schema at path "'+f.errSchemaPath+'"')}}var p=typeof F=="object"&&!(F instanceof RegExp)&&F.validate;var I=p&&F.type||"string";if(p){var x=F.async===true;F=F.validate}if(I!=n){if(w){s+=" if (true) { "}return s}if(x){if(!f.async)throw new Error("async format in sync schema");var z="formats"+f.util.getProperty(r)+".validate";s+=" if (!(await "+z+"("+j+"))) { "}else{s+=" if (! ";var z="formats"+f.util.getProperty(r);if(p)z+=".validate";if(typeof F=="function"){s+=" "+z+"("+j+") "}else{s+=" "+z+".test("+j+") "}s+=") { "}}var U=U||[];U.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { format: ";if(d){s+=""+E}else{s+=""+f.util.toQuotedString(r)}s+=" } ";if(f.opts.messages!==false){s+=" , message: 'should match format \"";if(d){s+="' + "+E+" + '"}else{s+=""+f.util.escapeQuotes(r)}s+="\"' "}if(f.opts.verbose){s+=" , schema: ";if(d){s+="validate.schema"+b}else{s+=""+f.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var N=s;s=U.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+N+"]); "}else{s+=" validate.errors = ["+N+"]; return false; "}}else{s+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(w){s+=" else { "}return s}},4962:f=>{"use strict";f.exports=function generate_if(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E="errs__"+l;var R=f.util.copy(f);R.level++;var A="valid"+R.level;var F=f.schema["then"],p=f.schema["else"],I=F!==undefined&&(f.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===false:f.util.schemaHasRules(F,f.RULES.all)),x=p!==undefined&&(f.opts.strictKeywords?typeof p=="object"&&Object.keys(p).length>0||p===false:f.util.schemaHasRules(p,f.RULES.all)),z=R.baseId;if(I||x){var U;R.createErrors=false;R.schema=r;R.schemaPath=b;R.errSchemaPath=g;s+=" var "+E+" = errors; var "+d+" = true; ";var N=f.compositeRule;f.compositeRule=R.compositeRule=true;s+=" "+f.validate(R)+" ";R.baseId=z;R.createErrors=true;s+=" errors = "+E+"; if (vErrors !== null) { if ("+E+") vErrors.length = "+E+"; else vErrors = null; } ";f.compositeRule=R.compositeRule=N;if(I){s+=" if ("+A+") { ";R.schema=f.schema["then"];R.schemaPath=f.schemaPath+".then";R.errSchemaPath=f.errSchemaPath+"/then";s+=" "+f.validate(R)+" ";R.baseId=z;s+=" "+d+" = "+A+"; ";if(I&&x){U="ifClause"+l;s+=" var "+U+" = 'then'; "}else{U="'then'"}s+=" } ";if(x){s+=" else { "}}else{s+=" if (!"+A+") { "}if(x){R.schema=f.schema["else"];R.schemaPath=f.schemaPath+".else";R.errSchemaPath=f.errSchemaPath+"/else";s+=" "+f.validate(R)+" ";R.baseId=z;s+=" "+d+" = "+A+"; ";if(I&&x){U="ifClause"+l;s+=" var "+U+" = 'else'; "}else{U="'else'"}s+=" } "}s+=" if (!"+d+") { var err = ";if(f.createErrors!==false){s+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { failingKeyword: "+U+" } ";if(f.opts.messages!==false){s+=" , message: 'should match \"' + "+U+" + '\" schema' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+=" } ";if(w){s+=" else { "}}else{if(w){s+=" if (true) { "}}return s}},4124:(f,e,n)=>{"use strict";f.exports={$ref:n(5746),allOf:n(3639),anyOf:n(1256),$comment:n(2660),const:n(184),contains:n(7419),dependencies:n(7299),enum:n(9795),format:n(5801),if:n(4962),items:n(9623),maximum:n(3711),minimum:n(3711),maxItems:n(5675),minItems:n(5675),maxLength:n(6051),minLength:n(6051),maxProperties:n(7043),minProperties:n(7043),multipleOf:n(9251),not:n(7739),oneOf:n(6857),pattern:n(8099),properties:n(9438),propertyNames:n(3466),required:n(8430),uniqueItems:n(2207),validate:n(6131)}},9623:f=>{"use strict";f.exports=function generate_items(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E="errs__"+l;var R=f.util.copy(f);var A="";R.level++;var F="valid"+R.level;var p="i"+l,I=R.dataLevel=f.dataLevel+1,x="data"+I,z=f.baseId;s+="var "+E+" = errors;var "+d+";";if(Array.isArray(r)){var U=f.schema.additionalItems;if(U===false){s+=" "+d+" = "+j+".length <= "+r.length+"; ";var N=g;g=f.errSchemaPath+"/additionalItems";s+=" if (!"+d+") { ";var Q=Q||[];Q.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { limit: "+r.length+" } ";if(f.opts.messages!==false){s+=" , message: 'should NOT have more than "+r.length+" items' "}if(f.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var q=s;s=Q.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+q+"]); "}else{s+=" validate.errors = ["+q+"]; return false; "}}else{s+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";g=N;if(w){A+="}";s+=" else { "}}var O=r;if(O){var C,L=-1,J=O.length-1;while(L0||C===false:f.util.schemaHasRules(C,f.RULES.all)){s+=" "+F+" = true; if ("+j+".length > "+L+") { ";var T=j+"["+L+"]";R.schema=C;R.schemaPath=b+"["+L+"]";R.errSchemaPath=g+"/"+L;R.errorPath=f.util.getPathExpr(f.errorPath,L,f.opts.jsonPointers,true);R.dataPathArr[I]=L;var G=f.validate(R);R.baseId=z;if(f.util.varOccurences(G,x)<2){s+=" "+f.util.varReplace(G,x,T)+" "}else{s+=" var "+x+" = "+T+"; "+G+" "}s+=" } ";if(w){s+=" if ("+F+") { ";A+="}"}}}}if(typeof U=="object"&&(f.opts.strictKeywords?typeof U=="object"&&Object.keys(U).length>0||U===false:f.util.schemaHasRules(U,f.RULES.all))){R.schema=U;R.schemaPath=f.schemaPath+".additionalItems";R.errSchemaPath=f.errSchemaPath+"/additionalItems";s+=" "+F+" = true; if ("+j+".length > "+r.length+") { for (var "+p+" = "+r.length+"; "+p+" < "+j+".length; "+p+"++) { ";R.errorPath=f.util.getPathExpr(f.errorPath,p,f.opts.jsonPointers,true);var T=j+"["+p+"]";R.dataPathArr[I]=p;var G=f.validate(R);R.baseId=z;if(f.util.varOccurences(G,x)<2){s+=" "+f.util.varReplace(G,x,T)+" "}else{s+=" var "+x+" = "+T+"; "+G+" "}if(w){s+=" if (!"+F+") break; "}s+=" } } ";if(w){s+=" if ("+F+") { ";A+="}"}}}else if(f.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:f.util.schemaHasRules(r,f.RULES.all)){R.schema=r;R.schemaPath=b;R.errSchemaPath=g;s+=" for (var "+p+" = "+0+"; "+p+" < "+j+".length; "+p+"++) { ";R.errorPath=f.util.getPathExpr(f.errorPath,p,f.opts.jsonPointers,true);var T=j+"["+p+"]";R.dataPathArr[I]=p;var G=f.validate(R);R.baseId=z;if(f.util.varOccurences(G,x)<2){s+=" "+f.util.varReplace(G,x,T)+" "}else{s+=" var "+x+" = "+T+"; "+G+" "}if(w){s+=" if (!"+F+") break; "}s+=" }"}if(w){s+=" "+A+" if ("+E+" == errors) {"}return s}},9251:f=>{"use strict";f.exports=function generate_multipleOf(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d=f.opts.$data&&r&&r.$data,E;if(d){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";E="schema"+l}else{E=r}if(!(d||typeof r=="number")){throw new Error(e+" must be number")}s+="var division"+l+";if (";if(d){s+=" "+E+" !== undefined && ( typeof "+E+" != 'number' || "}s+=" (division"+l+" = "+j+" / "+E+", ";if(f.opts.multipleOfPrecision){s+=" Math.abs(Math.round(division"+l+") - division"+l+") > 1e-"+f.opts.multipleOfPrecision+" "}else{s+=" division"+l+" !== parseInt(division"+l+") "}s+=" ) ";if(d){s+=" ) "}s+=" ) { ";var R=R||[];R.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { multipleOf: "+E+" } ";if(f.opts.messages!==false){s+=" , message: 'should be multiple of ";if(d){s+="' + "+E}else{s+=""+E+"'"}}if(f.opts.verbose){s+=" , schema: ";if(d){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var A=s;s=R.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(w){s+=" else { "}return s}},7739:f=>{"use strict";f.exports=function generate_not(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="errs__"+l;var E=f.util.copy(f);E.level++;var R="valid"+E.level;if(f.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:f.util.schemaHasRules(r,f.RULES.all)){E.schema=r;E.schemaPath=b;E.errSchemaPath=g;s+=" var "+d+" = errors; ";var A=f.compositeRule;f.compositeRule=E.compositeRule=true;E.createErrors=false;var F;if(E.opts.allErrors){F=E.opts.allErrors;E.opts.allErrors=false}s+=" "+f.validate(E)+" ";E.createErrors=true;if(F)E.opts.allErrors=F;f.compositeRule=E.compositeRule=A;s+=" if ("+R+") { ";var p=p||[];p.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: {} ";if(f.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var I=s;s=p.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ";if(f.opts.allErrors){s+=" } "}}else{s+=" var err = ";if(f.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: {} ";if(f.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(w){s+=" if (false) { "}}return s}},6857:f=>{"use strict";f.exports=function generate_oneOf(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E="errs__"+l;var R=f.util.copy(f);var A="";R.level++;var F="valid"+R.level;var p=R.baseId,I="prevValid"+l,x="passingSchemas"+l;s+="var "+E+" = errors , "+I+" = false , "+d+" = false , "+x+" = null; ";var z=f.compositeRule;f.compositeRule=R.compositeRule=true;var U=r;if(U){var N,Q=-1,q=U.length-1;while(Q0||N===false:f.util.schemaHasRules(N,f.RULES.all)){R.schema=N;R.schemaPath=b+"["+Q+"]";R.errSchemaPath=g+"/"+Q;s+=" "+f.validate(R)+" ";R.baseId=p}else{s+=" var "+F+" = true; "}if(Q){s+=" if ("+F+" && "+I+") { "+d+" = false; "+x+" = ["+x+", "+Q+"]; } else { ";A+="}"}s+=" if ("+F+") { "+d+" = "+I+" = true; "+x+" = "+Q+"; }"}}f.compositeRule=R.compositeRule=z;s+=""+A+"if (!"+d+") { var err = ";if(f.createErrors!==false){s+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { passingSchemas: "+x+" } ";if(f.opts.messages!==false){s+=" , message: 'should match exactly one schema in oneOf' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+="} else { errors = "+E+"; if (vErrors !== null) { if ("+E+") vErrors.length = "+E+"; else vErrors = null; }";if(f.opts.allErrors){s+=" } "}return s}},8099:f=>{"use strict";f.exports=function generate_pattern(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d=f.opts.$data&&r&&r.$data,E;if(d){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";E="schema"+l}else{E=r}var R=d?"(new RegExp("+E+"))":f.usePattern(r);s+="if ( ";if(d){s+=" ("+E+" !== undefined && typeof "+E+" != 'string') || "}s+=" !"+R+".test("+j+") ) { ";var A=A||[];A.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { pattern: ";if(d){s+=""+E}else{s+=""+f.util.toQuotedString(r)}s+=" } ";if(f.opts.messages!==false){s+=" , message: 'should match pattern \"";if(d){s+="' + "+E+" + '"}else{s+=""+f.util.escapeQuotes(r)}s+="\"' "}if(f.opts.verbose){s+=" , schema: ";if(d){s+="validate.schema"+b}else{s+=""+f.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var F=s;s=A.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+F+"]); "}else{s+=" validate.errors = ["+F+"]; return false; "}}else{s+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(w){s+=" else { "}return s}},9438:f=>{"use strict";f.exports=function generate_properties(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="errs__"+l;var E=f.util.copy(f);var R="";E.level++;var A="valid"+E.level;var F="key"+l,p="idx"+l,I=E.dataLevel=f.dataLevel+1,x="data"+I,z="dataProperties"+l;var U=Object.keys(r||{}).filter(notProto),N=f.schema.patternProperties||{},Q=Object.keys(N).filter(notProto),q=f.schema.additionalProperties,O=U.length||Q.length,C=q===false,L=typeof q=="object"&&Object.keys(q).length,J=f.opts.removeAdditional,T=C||L||J,G=f.opts.ownProperties,H=f.baseId;var X=f.schema.required;if(X&&!(f.opts.$data&&X.$data)&&X.length8){s+=" || validate.schema"+b+".hasOwnProperty("+F+") "}else{var Y=U;if(Y){var W,B=-1,c=Y.length-1;while(B0||t===false:f.util.schemaHasRules(t,f.RULES.all)){var ff=f.util.getProperty(W),P=j+ff,ef=_&&t.default!==undefined;E.schema=t;E.schemaPath=b+ff;E.errSchemaPath=g+"/"+f.util.escapeFragment(W);E.errorPath=f.util.getPath(f.errorPath,W,f.opts.jsonPointers);E.dataPathArr[I]=f.util.toQuotedString(W);var i=f.validate(E);E.baseId=H;if(f.util.varOccurences(i,x)<2){i=f.util.varReplace(i,x,P);var nf=P}else{var nf=x;s+=" var "+x+" = "+P+"; "}if(ef){s+=" "+i+" "}else{if(M&&M[W]){s+=" if ( "+nf+" === undefined ";if(G){s+=" || ! Object.prototype.hasOwnProperty.call("+j+", '"+f.util.escapeQuotes(W)+"') "}s+=") { "+A+" = false; ";var y=f.errorPath,h=g,sf=f.util.escapeQuotes(W);if(f.opts._errorDataPathProperty){f.errorPath=f.util.getPath(y,W,f.opts.jsonPointers)}g=f.errSchemaPath+"/required";var a=a||[];a.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { missingProperty: '"+sf+"' } ";if(f.opts.messages!==false){s+=" , message: '";if(f.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+sf+"\\'"}s+="' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var S=s;s=a.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+S+"]); "}else{s+=" validate.errors = ["+S+"]; return false; "}}else{s+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}g=h;f.errorPath=y;s+=" } else { "}else{if(w){s+=" if ( "+nf+" === undefined ";if(G){s+=" || ! Object.prototype.hasOwnProperty.call("+j+", '"+f.util.escapeQuotes(W)+"') "}s+=") { "+A+" = true; } else { "}else{s+=" if ("+nf+" !== undefined ";if(G){s+=" && Object.prototype.hasOwnProperty.call("+j+", '"+f.util.escapeQuotes(W)+"') "}s+=" ) { "}}s+=" "+i+" } "}}if(w){s+=" if ("+A+") { ";R+="}"}}}}if(Q.length){var lf=Q;if(lf){var D,vf=-1,rf=lf.length-1;while(vf0||t===false:f.util.schemaHasRules(t,f.RULES.all)){E.schema=t;E.schemaPath=f.schemaPath+".patternProperties"+f.util.getProperty(D);E.errSchemaPath=f.errSchemaPath+"/patternProperties/"+f.util.escapeFragment(D);if(G){s+=" "+z+" = "+z+" || Object.keys("+j+"); for (var "+p+"=0; "+p+"<"+z+".length; "+p+"++) { var "+F+" = "+z+"["+p+"]; "}else{s+=" for (var "+F+" in "+j+") { "}s+=" if ("+f.usePattern(D)+".test("+F+")) { ";E.errorPath=f.util.getPathExpr(f.errorPath,F,f.opts.jsonPointers);var P=j+"["+F+"]";E.dataPathArr[I]=F;var i=f.validate(E);E.baseId=H;if(f.util.varOccurences(i,x)<2){s+=" "+f.util.varReplace(i,x,P)+" "}else{s+=" var "+x+" = "+P+"; "+i+" "}if(w){s+=" if (!"+A+") break; "}s+=" } ";if(w){s+=" else "+A+" = true; "}s+=" } ";if(w){s+=" if ("+A+") { ";R+="}"}}}}}if(w){s+=" "+R+" if ("+d+" == errors) {"}return s}},3466:f=>{"use strict";f.exports=function generate_propertyNames(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="errs__"+l;var E=f.util.copy(f);var R="";E.level++;var A="valid"+E.level;s+="var "+d+" = errors;";if(f.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:f.util.schemaHasRules(r,f.RULES.all)){E.schema=r;E.schemaPath=b;E.errSchemaPath=g;var F="key"+l,p="idx"+l,I="i"+l,x="' + "+F+" + '",z=E.dataLevel=f.dataLevel+1,U="data"+z,N="dataProperties"+l,Q=f.opts.ownProperties,q=f.baseId;if(Q){s+=" var "+N+" = undefined; "}if(Q){s+=" "+N+" = "+N+" || Object.keys("+j+"); for (var "+p+"=0; "+p+"<"+N+".length; "+p+"++) { var "+F+" = "+N+"["+p+"]; "}else{s+=" for (var "+F+" in "+j+") { "}s+=" var startErrs"+l+" = errors; ";var O=F;var C=f.compositeRule;f.compositeRule=E.compositeRule=true;var L=f.validate(E);E.baseId=q;if(f.util.varOccurences(L,U)<2){s+=" "+f.util.varReplace(L,U,O)+" "}else{s+=" var "+U+" = "+O+"; "+L+" "}f.compositeRule=E.compositeRule=C;s+=" if (!"+A+") { for (var "+I+"=startErrs"+l+"; "+I+"{"use strict";f.exports=function generate_ref(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.errSchemaPath+"/"+e;var g=!f.opts.allErrors;var w="data"+(v||"");var j="valid"+l;var d,E;if(r=="#"||r=="#/"){if(f.isRoot){d=f.async;E="validate"}else{d=f.root.schema.$async===true;E="root.refVal[0]"}}else{var R=f.resolveRef(f.baseId,r,f.isRoot);if(R===undefined){var A=f.MissingRefError.message(f.baseId,r);if(f.opts.missingRefs=="fail"){f.logger.error(A);var F=F||[];F.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"$ref"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(b)+" , params: { ref: '"+f.util.escapeQuotes(r)+"' } ";if(f.opts.messages!==false){s+=" , message: 'can\\'t resolve reference "+f.util.escapeQuotes(r)+"' "}if(f.opts.verbose){s+=" , schema: "+f.util.toQuotedString(r)+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+w+" "}s+=" } "}else{s+=" {} "}var p=s;s=F.pop();if(!f.compositeRule&&g){if(f.async){s+=" throw new ValidationError(["+p+"]); "}else{s+=" validate.errors = ["+p+"]; return false; "}}else{s+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}if(g){s+=" if (false) { "}}else if(f.opts.missingRefs=="ignore"){f.logger.warn(A);if(g){s+=" if (true) { "}}else{throw new f.MissingRefError(f.baseId,r,A)}}else if(R.inline){var I=f.util.copy(f);I.level++;var x="valid"+I.level;I.schema=R.schema;I.schemaPath="";I.errSchemaPath=r;var z=f.validate(I).replace(/validate\.schema/g,R.code);s+=" "+z+" ";if(g){s+=" if ("+x+") { "}}else{d=R.$async===true||f.async&&R.$async!==false;E=R.code}}if(E){var F=F||[];F.push(s);s="";if(f.opts.passContext){s+=" "+E+".call(this, "}else{s+=" "+E+"( "}s+=" "+w+", (dataPath || '')";if(f.errorPath!='""'){s+=" + "+f.errorPath}var U=v?"data"+(v-1||""):"parentData",N=v?f.dataPathArr[v]:"parentDataProperty";s+=" , "+U+" , "+N+", rootData) ";var Q=s;s=F.pop();if(d){if(!f.async)throw new Error("async schema referenced by sync schema");if(g){s+=" var "+j+"; "}s+=" try { await "+Q+"; ";if(g){s+=" "+j+" = true; "}s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ";if(g){s+=" "+j+" = false; "}s+=" } ";if(g){s+=" if ("+j+") { "}}else{s+=" if (!"+Q+") { if (vErrors === null) vErrors = "+E+".errors; else vErrors = vErrors.concat("+E+".errors); errors = vErrors.length; } ";if(g){s+=" else { "}}}return s}},8430:f=>{"use strict";f.exports=function generate_required(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}var A="schema"+l;if(!E){if(r.length0||U===false:f.util.schemaHasRules(U,f.RULES.all)))){F[F.length]=I}}}}else{var F=r}}if(E||F.length){var N=f.errorPath,Q=E||F.length>=f.opts.loopRequired,q=f.opts.ownProperties;if(w){s+=" var missing"+l+"; ";if(Q){if(!E){s+=" var "+A+" = validate.schema"+b+"; "}var O="i"+l,C="schema"+l+"["+O+"]",L="' + "+C+" + '";if(f.opts._errorDataPathProperty){f.errorPath=f.util.getPathExpr(N,C,f.opts.jsonPointers)}s+=" var "+d+" = true; ";if(E){s+=" if (schema"+l+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+l+")) "+d+" = false; else {"}s+=" for (var "+O+" = 0; "+O+" < "+A+".length; "+O+"++) { "+d+" = "+j+"["+A+"["+O+"]] !== undefined ";if(q){s+=" && Object.prototype.hasOwnProperty.call("+j+", "+A+"["+O+"]) "}s+="; if (!"+d+") break; } ";if(E){s+=" } "}s+=" if (!"+d+") { ";var J=J||[];J.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { missingProperty: '"+L+"' } ";if(f.opts.messages!==false){s+=" , message: '";if(f.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+L+"\\'"}s+="' "}if(f.opts.verbose){s+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var T=s;s=J.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+T+"]); "}else{s+=" validate.errors = ["+T+"]; return false; "}}else{s+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { "}else{s+=" if ( ";var G=F;if(G){var H,O=-1,X=G.length-1;while(O{"use strict";f.exports=function generate_uniqueItems(f,e,n){var s=" ";var l=f.level;var v=f.dataLevel;var r=f.schema[e];var b=f.schemaPath+f.util.getProperty(e);var g=f.errSchemaPath+"/"+e;var w=!f.opts.allErrors;var j="data"+(v||"");var d="valid"+l;var E=f.opts.$data&&r&&r.$data,R;if(E){s+=" var schema"+l+" = "+f.util.getData(r.$data,v,f.dataPathArr)+"; ";R="schema"+l}else{R=r}if((r||E)&&f.opts.uniqueItems!==false){if(E){s+=" var "+d+"; if ("+R+" === false || "+R+" === undefined) "+d+" = true; else if (typeof "+R+" != 'boolean') "+d+" = false; else { "}s+=" var i = "+j+".length , "+d+" = true , j; if (i > 1) { ";var A=f.schema.items&&f.schema.items.type,F=Array.isArray(A);if(!A||A=="object"||A=="array"||F&&(A.indexOf("object")>=0||A.indexOf("array")>=0)){s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+j+"[i], "+j+"[j])) { "+d+" = false; break outer; } } } "}else{s+=" var itemIndices = {}, item; for (;i--;) { var item = "+j+"[i]; ";var p="checkDataType"+(F?"s":"");s+=" if ("+f.util[p](A,"item",f.opts.strictNumbers,true)+") continue; ";if(F){s+=" if (typeof item == 'string') item = '\"' + item; "}s+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}s+=" } ";if(E){s+=" } "}s+=" if (!"+d+") { ";var I=I||[];I.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(g)+" , params: { i: i, j: j } ";if(f.opts.messages!==false){s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(f.opts.verbose){s+=" , schema: ";if(E){s+="validate.schema"+b}else{s+=""+r}s+=" , parentSchema: validate.schema"+f.schemaPath+" , data: "+j+" "}s+=" } "}else{s+=" {} "}var x=s;s=I.pop();if(!f.compositeRule&&w){if(f.async){s+=" throw new ValidationError(["+x+"]); "}else{s+=" validate.errors = ["+x+"]; return false; "}}else{s+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(w){s+=" else { "}}else{if(w){s+=" if (true) { "}}return s}},6131:f=>{"use strict";f.exports=function generate_validate(f,e,n){var s="";var l=f.schema.$async===true,v=f.util.schemaHasRulesExcept(f.schema,f.RULES.all,"$ref"),r=f.self._getId(f.schema);if(f.opts.strictKeywords){var b=f.util.schemaUnknownRules(f.schema,f.RULES.keywords);if(b){var g="unknown keyword: "+b;if(f.opts.strictKeywords==="log")f.logger.warn(g);else throw new Error(g)}}if(f.isTop){s+=" var validate = ";if(l){f.async=true;s+="async "}s+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if(r&&(f.opts.sourceCode||f.opts.processCode)){s+=" "+("/*# sourceURL="+r+" */")+" "}}if(typeof f.schema=="boolean"||!(v||f.schema.$ref)){var e="false schema";var w=f.level;var j=f.dataLevel;var d=f.schema[e];var E=f.schemaPath+f.util.getProperty(e);var R=f.errSchemaPath+"/"+e;var A=!f.opts.allErrors;var F;var p="data"+(j||"");var I="valid"+w;if(f.schema===false){if(f.isTop){A=true}else{s+=" var "+I+" = false; "}var x=x||[];x.push(s);s="";if(f.createErrors!==false){s+=" { keyword: '"+(F||"false schema")+"' , dataPath: (dataPath || '') + "+f.errorPath+" , schemaPath: "+f.util.toQuotedString(R)+" , params: {} ";if(f.opts.messages!==false){s+=" , message: 'boolean schema is false' "}if(f.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+f.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var z=s;s=x.pop();if(!f.compositeRule&&A){if(f.async){s+=" throw new ValidationError(["+z+"]); "}else{s+=" validate.errors = ["+z+"]; return false; "}}else{s+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(f.isTop){if(l){s+=" return data; "}else{s+=" validate.errors = null; return true; "}}else{s+=" var "+I+" = true; "}}if(f.isTop){s+=" }; return validate; "}return s}if(f.isTop){var U=f.isTop,w=f.level=0,j=f.dataLevel=0,p="data";f.rootId=f.resolve.fullPath(f.self._getId(f.root.schema));f.baseId=f.baseId||f.rootId;delete f.isTop;f.dataPathArr=[""];if(f.schema.default!==undefined&&f.opts.useDefaults&&f.opts.strictDefaults){var N="default is ignored in the schema root";if(f.opts.strictDefaults==="log")f.logger.warn(N);else throw new Error(N)}s+=" var vErrors = null; ";s+=" var errors = 0; ";s+=" if (rootData === undefined) rootData = data; "}else{var w=f.level,j=f.dataLevel,p="data"+(j||"");if(r)f.baseId=f.resolve.url(f.baseId,r);if(l&&!f.async)throw new Error("async schema in sync schema");s+=" var errs_"+w+" = errors;"}var I="valid"+w,A=!f.opts.allErrors,Q="",q="";var F;var O=f.schema.type,C=Array.isArray(O);if(O&&f.opts.nullable&&f.schema.nullable===true){if(C){if(O.indexOf("null")==-1)O=O.concat("null")}else if(O!="null"){O=[O,"null"];C=true}}if(C&&O.length==1){O=O[0];C=false}if(f.schema.$ref&&v){if(f.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+f.errSchemaPath+'" (see option extendRefs)')}else if(f.opts.extendRefs!==true){v=false;f.logger.warn('$ref: keywords ignored in schema at path "'+f.errSchemaPath+'"')}}if(f.schema.$comment&&f.opts.$comment){s+=" "+f.RULES.all.$comment.code(f,"$comment")}if(O){if(f.opts.coerceTypes){var L=f.util.coerceToTypes(f.opts.coerceTypes,O)}var J=f.RULES.types[O];if(L||C||J===true||J&&!$shouldUseGroup(J)){var E=f.schemaPath+".type",R=f.errSchemaPath+"/type";var E=f.schemaPath+".type",R=f.errSchemaPath+"/type",T=C?"checkDataTypes":"checkDataType";s+=" if ("+f.util[T](O,p,f.opts.strictNumbers,true)+") { ";if(L){var G="dataType"+w,H="coerced"+w;s+=" var "+G+" = typeof "+p+"; var "+H+" = undefined; ";if(f.opts.coerceTypes=="array"){s+=" if ("+G+" == 'object' && Array.isArray("+p+") && "+p+".length == 1) { "+p+" = "+p+"[0]; "+G+" = typeof "+p+"; if ("+f.util.checkDataType(f.schema.type,p,f.opts.strictNumbers)+") "+H+" = "+p+"; } "}s+=" if ("+H+" !== undefined) ; ";var X=L;if(X){var M,Y=-1,W=X.length-1;while(Y{"use strict";var s=/^[a-z_$][a-z0-9_$-]*$/i;var l=n(7921);var v=n(5533);f.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(f,e){var n=this.RULES;if(n.keywords[f])throw new Error("Keyword "+f+" is already defined");if(!s.test(f))throw new Error("Keyword "+f+" is not a valid identifier");if(e){this.validateKeyword(e,true);var v=e.type;if(Array.isArray(v)){for(var r=0;r{"use strict";f=n.nmd(f);const s=n(5747);const l=n(5622);const v=n(6417);const r=n(2357);const b=n(8614);const g=n(5514);const w=n(3900);const j=n(6536);const d=n(7727);const E=n(8393);const R=n(1414);const A=()=>Object.create(null);const F="aes-256-cbc";delete require.cache[__filename];const p=l.dirname(f.parent&&f.parent.filename||".");const I=(f,e)=>{const n=["undefined","symbol","function"];const s=typeof e;if(n.includes(s)){throw new TypeError(`Setting a value of type \`${s}\` for key \`${f}\` is not allowed as it's not supported by JSON`)}};class Conf{constructor(f){f={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:true,serialize:f=>JSON.stringify(f,null,"\t"),deserialize:JSON.parse,accessPropertiesByDotNotation:true,...f};if(!f.cwd){if(!f.projectName){const e=j.sync(p);f.projectName=e&&JSON.parse(s.readFileSync(e,"utf8")).name}if(!f.projectName){throw new Error("Project name could not be inferred. Please specify the `projectName` option.")}f.cwd=d(f.projectName,{suffix:f.projectSuffix}).config}this._options=f;if(f.schema){if(typeof f.schema!=="object"){throw new TypeError("The `schema` option must be an object.")}const e=new R({allErrors:true,format:"full",useDefaults:true,errorDataPath:"property"});const n={type:"object",properties:f.schema};this._validator=e.compile(n)}this.events=new b;this.encryptionKey=f.encryptionKey;this.serialize=f.serialize;this.deserialize=f.deserialize;const e=f.fileExtension?`.${f.fileExtension}`:"";this.path=l.resolve(f.cwd,`${f.configName}${e}`);const n=this.store;const v=Object.assign(A(),f.defaults,n);this._validate(v);try{r.deepEqual(n,v)}catch(f){this.store=v}}_validate(f){if(!this._validator){return}const e=this._validator(f);if(!e){const f=this._validator.errors.reduce((f,{dataPath:e,message:n})=>f+` \`${e.slice(1)}\` ${n};`,"");throw new Error("Config schema violation:"+f.slice(0,-1))}}get(f,e){if(this._options.accessPropertiesByDotNotation){return g.get(this.store,f,e)}return f in this.store?this.store[f]:e}set(f,e){if(typeof f!=="string"&&typeof f!=="object"){throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof f}`)}if(typeof f!=="object"&&e===undefined){throw new TypeError("Use `delete()` to clear values")}const{store:n}=this;const s=(f,e)=>{I(f,e);if(this._options.accessPropertiesByDotNotation){g.set(n,f,e)}else{n[f]=e}};if(typeof f==="object"){const e=f;for(const[f,n]of Object.entries(e)){s(f,n)}}else{s(f,e)}this.store=n}has(f){if(this._options.accessPropertiesByDotNotation){return g.has(this.store,f)}return f in this.store}delete(f){const{store:e}=this;if(this._options.accessPropertiesByDotNotation){g.delete(e,f)}else{delete e[f]}this.store=e}clear(){this.store=A()}onDidChange(f,e){if(typeof f!=="string"){throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof f}`)}if(typeof e!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`)}const n=()=>this.get(f);return this.handleChange(n,e)}onDidAnyChange(f){if(typeof f!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof f}`)}const e=()=>this.store;return this.handleChange(e,f)}handleChange(f,e){let n=f();const s=()=>{const s=n;const l=f();try{r.deepEqual(l,s)}catch(f){n=l;e.call(this,l,s)}};this.events.on("change",s);return()=>this.events.removeListener("change",s)}get size(){return Object.keys(this.store).length}get store(){try{let f=s.readFileSync(this.path,this.encryptionKey?null:"utf8");if(this.encryptionKey){try{if(f.slice(16,17).toString()===":"){const e=f.slice(0,16);const n=v.pbkdf2Sync(this.encryptionKey,e.toString(),1e4,32,"sha512");const s=v.createDecipheriv(F,n,e);f=Buffer.concat([s.update(f.slice(17)),s.final()])}else{const e=v.createDecipher(F,this.encryptionKey);f=Buffer.concat([e.update(f),e.final()])}}catch(f){}}f=this.deserialize(f);this._validate(f);return Object.assign(A(),f)}catch(f){if(f.code==="ENOENT"){w.sync(l.dirname(this.path));return A()}if(this._options.clearInvalidConfig&&f.name==="SyntaxError"){return A()}throw f}}set store(f){w.sync(l.dirname(this.path));this._validate(f);let e=this.serialize(f);if(this.encryptionKey){const f=v.randomBytes(16);const n=v.pbkdf2Sync(this.encryptionKey,f.toString(),1e4,32,"sha512");const s=v.createCipheriv(F,n,f);e=Buffer.concat([f,Buffer.from(":"),s.update(Buffer.from(e)),s.final()])}E.sync(this.path,e);this.events.emit("change")}*[Symbol.iterator](){for(const[f,e]of Object.entries(this.store)){yield[f,e]}}}f.exports=Conf},5514:(f,e,n)=>{"use strict";const s=n(1771);const l=["__proto__","prototype","constructor"];const v=f=>!f.some(f=>l.includes(f));function getPathSegments(f){const e=f.split(".");const n=[];for(let f=0;f{"use strict";f.exports=(f=>{const e=typeof f;return f!==null&&(e==="object"||e==="function")})},3900:(f,e,n)=>{"use strict";const s=n(5747);const l=n(5622);const{promisify:v}=n(1669);const r=n(2519);const b=r.satisfies(process.version,">=10.12.0");const g=f=>{if(process.platform==="win32"){const e=/[<>:"|?*]/.test(f.replace(l.parse(f).root,""));if(e){const e=new Error(`Path contains invalid characters: ${f}`);e.code="EINVAL";throw e}}};const w=f=>{const e={mode:511&~process.umask(),fs:s};return{...e,...f}};const j=f=>{const e=new Error(`operation not permitted, mkdir '${f}'`);e.code="EPERM";e.errno=-4048;e.path=f;e.syscall="mkdir";return e};const d=async(f,e)=>{g(f);e=w(e);const n=v(e.fs.mkdir);const r=v(e.fs.stat);if(b&&e.fs.mkdir===s.mkdir){const s=l.resolve(f);await n(s,{mode:e.mode,recursive:true});return s}const d=async f=>{try{await n(f,e.mode);return f}catch(e){if(e.code==="EPERM"){throw e}if(e.code==="ENOENT"){if(l.dirname(f)===f){throw j(f)}if(e.message.includes("null bytes")){throw e}await d(l.dirname(f));return d(f)}try{const n=await r(f);if(!n.isDirectory()){throw new Error("The path is not a directory")}}catch(f){throw e}return f}};return d(l.resolve(f))};f.exports=d;f.exports.sync=((f,e)=>{g(f);e=w(e);if(b&&e.fs.mkdirSync===s.mkdirSync){const n=l.resolve(f);s.mkdirSync(n,{mode:e.mode,recursive:true});return n}const n=f=>{try{e.fs.mkdirSync(f,e.mode)}catch(s){if(s.code==="EPERM"){throw s}if(s.code==="ENOENT"){if(l.dirname(f)===f){throw j(f)}if(s.message.includes("null bytes")){throw s}n(l.dirname(f));return n(f)}try{if(!e.fs.statSync(f).isDirectory()){throw new Error("The path is not a directory")}}catch(f){throw s}}return f};return n(l.resolve(f))})},8393:(f,e,n)=>{"use strict";f.exports=writeFile;f.exports.sync=writeFileSync;f.exports._getTmpname=getTmpname;f.exports._cleanupOnExit=cleanupOnExit;const s=n(5747);const l=n(8681);const v=n(2317);const r=n(5622);const b=n(3010);const g=n(4005);const{promisify:w}=n(1669);const j={};const d=function getId(){try{const f=n(5013);return f.threadId}catch(f){return 0}}();let E=0;function getTmpname(f){return f+"."+l(__filename).hash(String(process.pid)).hash(String(d)).hash(String(++E)).result()}function cleanupOnExit(f){return()=>{try{s.unlinkSync(typeof f==="function"?f():f)}catch(f){}}}function serializeActiveFile(f){return new Promise(e=>{if(!j[f])j[f]=[];j[f].push(e);if(j[f].length===1)e()})}async function writeFileAsync(f,e,n={}){if(typeof n==="string"){n={encoding:n}}let l;let d;const E=v(cleanupOnExit(()=>d));const R=r.resolve(f);try{await serializeActiveFile(R);const v=await w(s.realpath)(f).catch(()=>f);d=getTmpname(v);if(!n.mode||!n.chown){const f=await w(s.stat)(v).catch(()=>{});if(f){if(n.mode==null){n.mode=f.mode}if(n.chown==null&&process.getuid){n.chown={uid:f.uid,gid:f.gid}}}}l=await w(s.open)(d,"w",n.mode);if(n.tmpfileCreated){await n.tmpfileCreated(d)}if(b(e)){e=g(e)}if(Buffer.isBuffer(e)){await w(s.write)(l,e,0,e.length,0)}else if(e!=null){await w(s.write)(l,String(e),0,String(n.encoding||"utf8"))}if(n.fsync!==false){await w(s.fsync)(l)}await w(s.close)(l);l=null;if(n.chown){await w(s.chown)(d,n.chown.uid,n.chown.gid)}if(n.mode){await w(s.chmod)(d,n.mode)}await w(s.rename)(d,v)}finally{if(l){await w(s.close)(l).catch(()=>{})}E();await w(s.unlink)(d).catch(()=>{});j[R].shift();if(j[R].length>0){j[R][0]()}else delete j[R]}}function writeFile(f,e,n,s){if(n instanceof Function){s=n;n={}}const l=writeFileAsync(f,e,n);if(s){l.then(s,s)}return l}function writeFileSync(f,e,n){if(typeof n==="string")n={encoding:n};else if(!n)n={};try{f=s.realpathSync(f)}catch(f){}const l=getTmpname(f);if(!n.mode||!n.chown){try{const e=s.statSync(f);n=Object.assign({},n);if(!n.mode){n.mode=e.mode}if(!n.chown&&process.getuid){n.chown={uid:e.uid,gid:e.gid}}}catch(f){}}let r;const w=cleanupOnExit(l);const j=v(w);let d=true;try{r=s.openSync(l,"w",n.mode);if(n.tmpfileCreated){n.tmpfileCreated(l)}if(b(e)){e=g(e)}if(Buffer.isBuffer(e)){s.writeSync(r,e,0,e.length,0)}else if(e!=null){s.writeSync(r,String(e),0,String(n.encoding||"utf8"))}if(n.fsync!==false){s.fsyncSync(r)}s.closeSync(r);r=null;if(n.chown)s.chownSync(l,n.chown.uid,n.chown.gid);if(n.mode)s.chmodSync(l,n.mode);s.renameSync(l,f);d=false}finally{if(r){try{s.closeSync(r)}catch(f){}}j();if(d){w()}}}},7727:(f,e,n)=>{"use strict";const s=n(5622);const l=n(2087);const v=l.homedir();const r=l.tmpdir();const{env:b}=process;const g=f=>{const e=s.join(v,"Library");return{data:s.join(e,"Application Support",f),config:s.join(e,"Preferences",f),cache:s.join(e,"Caches",f),log:s.join(e,"Logs",f),temp:s.join(r,f)}};const w=f=>{const e=b.APPDATA||s.join(v,"AppData","Roaming");const n=b.LOCALAPPDATA||s.join(v,"AppData","Local");return{data:s.join(n,f,"Data"),config:s.join(e,f,"Config"),cache:s.join(n,f,"Cache"),log:s.join(n,f,"Log"),temp:s.join(r,f)}};const j=f=>{const e=s.basename(v);return{data:s.join(b.XDG_DATA_HOME||s.join(v,".local","share"),f),config:s.join(b.XDG_CONFIG_HOME||s.join(v,".config"),f),cache:s.join(b.XDG_CACHE_HOME||s.join(v,".cache"),f),log:s.join(b.XDG_STATE_HOME||s.join(v,".local","state"),f),temp:s.join(r,e,f)}};const d=(f,e)=>{if(typeof f!=="string"){throw new TypeError(`Expected string, got ${typeof f}`)}e=Object.assign({suffix:"nodejs"},e);if(e.suffix){f+=`-${e.suffix}`}if(process.platform==="darwin"){return g(f)}if(process.platform==="win32"){return w(f)}return j(f)};f.exports=d;f.exports.default=d},3933:f=>{"use strict";f.exports=function equal(f,e){if(f===e)return true;if(f&&e&&typeof f=="object"&&typeof e=="object"){if(f.constructor!==e.constructor)return false;var n,s,l;if(Array.isArray(f)){n=f.length;if(n!=e.length)return false;for(s=n;s--!==0;)if(!equal(f[s],e[s]))return false;return true}if(f.constructor===RegExp)return f.source===e.source&&f.flags===e.flags;if(f.valueOf!==Object.prototype.valueOf)return f.valueOf()===e.valueOf();if(f.toString!==Object.prototype.toString)return f.toString()===e.toString();l=Object.keys(f);n=l.length;if(n!==Object.keys(e).length)return false;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(e,l[s]))return false;for(s=n;s--!==0;){var v=l[s];if(!equal(f[v],e[v]))return false}return true}return f!==f&&e!==e}},3600:f=>{"use strict";f.exports=function(f,e){if(!e)e={};if(typeof e==="function")e={cmp:e};var n=typeof e.cycles==="boolean"?e.cycles:false;var s=e.cmp&&function(f){return function(e){return function(n,s){var l={key:n,value:e[n]};var v={key:s,value:e[s]};return f(l,v)}}}(e.cmp);var l=[];return function stringify(f){if(f&&f.toJSON&&typeof f.toJSON==="function"){f=f.toJSON()}if(f===undefined)return;if(typeof f=="number")return isFinite(f)?""+f:"null";if(typeof f!=="object")return JSON.stringify(f);var e,v;if(Array.isArray(f)){v="[";for(e=0;e{(function(){var e;function MurmurHash3(f,n){var s=this instanceof MurmurHash3?this:e;s.reset(n);if(typeof f==="string"&&f.length>0){s.hash(f)}if(s!==this){return s}}MurmurHash3.prototype.hash=function(f){var e,n,s,l,v;v=f.length;this.len+=v;n=this.k1;s=0;switch(this.rem){case 0:n^=v>s?f.charCodeAt(s++)&65535:0;case 1:n^=v>s?(f.charCodeAt(s++)&65535)<<8:0;case 2:n^=v>s?(f.charCodeAt(s++)&65535)<<16:0;case 3:n^=v>s?(f.charCodeAt(s)&255)<<24:0;n^=v>s?(f.charCodeAt(s++)&65280)>>8:0}this.rem=v+this.rem&3;v-=this.rem;if(v>0){e=this.h1;while(1){n=n*11601+(n&65535)*3432906752&4294967295;n=n<<15|n>>>17;n=n*13715+(n&65535)*461832192&4294967295;e^=n;e=e<<13|e>>>19;e=e*5+3864292196&4294967295;if(s>=v){break}n=f.charCodeAt(s++)&65535^(f.charCodeAt(s++)&65535)<<8^(f.charCodeAt(s++)&65535)<<16;l=f.charCodeAt(s++);n^=(l&255)<<24^(l&65280)>>8}n=0;switch(this.rem){case 3:n^=(f.charCodeAt(s+2)&65535)<<16;case 2:n^=(f.charCodeAt(s+1)&65535)<<8;case 1:n^=f.charCodeAt(s)&65535}this.h1=e}this.k1=n;return this};MurmurHash3.prototype.result=function(){var f,e;f=this.k1;e=this.h1;if(f>0){f=f*11601+(f&65535)*3432906752&4294967295;f=f<<15|f>>>17;f=f*13715+(f&65535)*461832192&4294967295;e^=f}e^=this.len;e^=e>>>16;e=e*51819+(e&65535)*2246770688&4294967295;e^=e>>>13;e=e*44597+(e&65535)*3266445312&4294967295;e^=e>>>16;return e>>>0};MurmurHash3.prototype.reset=function(f){this.h1=typeof f==="number"?f:0;this.rem=this.k1=this.len=0;return this};e=new MurmurHash3;if(true){f.exports=MurmurHash3}else{}})()},3010:f=>{f.exports=isTypedArray;isTypedArray.strict=isStrictTypedArray;isTypedArray.loose=isLooseTypedArray;var e=Object.prototype.toString;var n={"[object Int8Array]":true,"[object Int16Array]":true,"[object Int32Array]":true,"[object Uint8Array]":true,"[object Uint8ClampedArray]":true,"[object Uint16Array]":true,"[object Uint32Array]":true,"[object Float32Array]":true,"[object Float64Array]":true};function isTypedArray(f){return isStrictTypedArray(f)||isLooseTypedArray(f)}function isStrictTypedArray(f){return f instanceof Int8Array||f instanceof Int16Array||f instanceof Int32Array||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Uint16Array||f instanceof Uint32Array||f instanceof Float32Array||f instanceof Float64Array}function isLooseTypedArray(f){return n[e.call(f)]}},2437:f=>{"use strict";var e=f.exports=function(f,e,n){if(typeof e=="function"){n=e;e={}}n=e.cb||n;var s=typeof n=="function"?n:n.pre||function(){};var l=n.post||function(){};_traverse(e,s,l,f,"",f)};e.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true};e.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};e.propsKeywords={definitions:true,properties:true,patternProperties:true,dependencies:true};e.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(f,n,s,l,v,r,b,g,w,j){if(l&&typeof l=="object"&&!Array.isArray(l)){n(l,v,r,b,g,w,j);for(var d in l){var E=l[d];if(Array.isArray(E)){if(d in e.arrayKeywords){for(var R=0;R{"use strict";const s=n(4442);f.exports=(async({cwd:f}={})=>s("package.json",{cwd:f}));f.exports.sync=(({cwd:f}={})=>s.sync("package.json",{cwd:f}))},2317:(f,e,n)=>{var s=n(2357);var l=n(2935);var v=n(8614);if(typeof v!=="function"){v=v.EventEmitter}var r;if(process.__signal_exit_emitter__){r=process.__signal_exit_emitter__}else{r=process.__signal_exit_emitter__=new v;r.count=0;r.emitted={}}if(!r.infinite){r.setMaxListeners(Infinity);r.infinite=true}f.exports=function(f,e){s.equal(typeof f,"function","a callback must be provided for exit handler");if(g===false){load()}var n="exit";if(e&&e.alwaysLast){n="afterexit"}var l=function(){r.removeListener(n,f);if(r.listeners("exit").length===0&&r.listeners("afterexit").length===0){unload()}};r.on(n,f);return l};f.exports.unload=unload;function unload(){if(!g){return}g=false;l.forEach(function(f){try{process.removeListener(f,b[f])}catch(f){}});process.emit=j;process.reallyExit=w;r.count-=1}function emit(f,e,n){if(r.emitted[f]){return}r.emitted[f]=true;r.emit(f,e,n)}var b={};l.forEach(function(f){b[f]=function listener(){var e=process.listeners(f);if(e.length===r.count){unload();emit("exit",null,f);emit("afterexit",null,f);process.kill(process.pid,f)}}});f.exports.signals=function(){return l};f.exports.load=load;var g=false;function load(){if(g){return}g=true;r.count+=1;l=l.filter(function(f){try{process.on(f,b[f]);return true}catch(f){return false}});process.emit=processEmit;process.reallyExit=processReallyExit}var w=process.reallyExit;function processReallyExit(f){process.exitCode=f||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);w.call(process,process.exitCode)}var j=process.emit;function processEmit(f,e){if(f==="exit"){if(e!==undefined){process.exitCode=e}var n=j.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return n}else{return j.apply(this,arguments)}}},2935:f=>{f.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){f.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){f.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},4005:(f,e,n)=>{var s=n(3010).strict;f.exports=function typedarrayToBuffer(f){if(s(f)){var e=Buffer.from(f.buffer);if(f.byteLength!==f.buffer.byteLength){e=e.slice(f.byteOffset,f.byteOffset+f.byteLength)}return e}else{return Buffer.from(f)}}},4007:function(f,e){(function(f,n){true?n(e):0})(this,function(f){"use strict";function merge(){for(var f=arguments.length,e=Array(f),n=0;n1){e[0]=e[0].slice(0,-1);var s=e.length-1;for(var l=1;l= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var x=r-b;var z=Math.floor;var U=String.fromCharCode;function error$1(f){throw new RangeError(I[f])}function map(f,e){var n=[];var s=f.length;while(s--){n[s]=e(f[s])}return n}function mapDomain(f,e){var n=f.split("@");var s="";if(n.length>1){s=n[0]+"@";f=n[1]}f=f.replace(p,".");var l=f.split(".");var v=map(l,e).join(".");return s+v}function ucs2decode(f){var e=[];var n=0;var s=f.length;while(n=55296&&l<=56319&&n>1;f+=z(f/e);for(;f>x*g>>1;s+=r){f=z(f/x)}return z(s+(x+1)*f/(f+w))};var C=function decode(f){var e=[];var n=f.length;var s=0;var l=E;var w=d;var j=f.lastIndexOf(R);if(j<0){j=0}for(var A=0;A=128){error$1("not-basic")}e.push(f.charCodeAt(A))}for(var F=j>0?j+1:0;F=n){error$1("invalid-input")}var U=Q(f.charCodeAt(F++));if(U>=r||U>z((v-s)/I)){error$1("overflow")}s+=U*I;var N=x<=w?b:x>=w+g?g:x-w;if(Uz(v/q)){error$1("overflow")}I*=q}var C=e.length+1;w=O(s-p,C,p==0);if(z(s/C)>v-l){error$1("overflow")}l+=z(s/C);s%=C;e.splice(s++,0,l)}return String.fromCodePoint.apply(String,e)};var L=function encode(f){var e=[];f=ucs2decode(f);var n=f.length;var s=E;var l=0;var w=d;var j=true;var A=false;var F=undefined;try{for(var p=f[Symbol.iterator](),I;!(j=(I=p.next()).done);j=true){var x=I.value;if(x<128){e.push(U(x))}}}catch(f){A=true;F=f}finally{try{if(!j&&p.return){p.return()}}finally{if(A){throw F}}}var N=e.length;var Q=N;if(N){e.push(R)}while(Q=s&&Xz((v-l)/M)){error$1("overflow")}l+=(C-s)*M;s=C;var Y=true;var W=false;var B=undefined;try{for(var c=f[Symbol.iterator](),Z;!(Y=(Z=c.next()).done);Y=true){var D=Z.value;if(Dv){error$1("overflow")}if(D==s){var K=l;for(var V=r;;V+=r){var y=V<=w?b:V>=w+g?g:V-w;if(K>6|192).toString(16).toUpperCase()+"%"+(e&63|128).toString(16).toUpperCase();else n="%"+(e>>12|224).toString(16).toUpperCase()+"%"+(e>>6&63|128).toString(16).toUpperCase()+"%"+(e&63|128).toString(16).toUpperCase();return n}function pctDecChars(f){var e="";var n=0;var s=f.length;while(n=194&&l<224){if(s-n>=6){var v=parseInt(f.substr(n+4,2),16);e+=String.fromCharCode((l&31)<<6|v&63)}else{e+=f.substr(n,6)}n+=6}else if(l>=224){if(s-n>=9){var r=parseInt(f.substr(n+4,2),16);var b=parseInt(f.substr(n+7,2),16);e+=String.fromCharCode((l&15)<<12|(r&63)<<6|b&63)}else{e+=f.substr(n,9)}n+=9}else{e+=f.substr(n,3);n+=3}}return e}function _normalizeComponentEncoding(f,e){function decodeUnreserved(f){var n=pctDecChars(f);return!n.match(e.UNRESERVED)?f:n}if(f.scheme)f.scheme=String(f.scheme).replace(e.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(e.NOT_SCHEME,"");if(f.userinfo!==undefined)f.userinfo=String(f.userinfo).replace(e.PCT_ENCODED,decodeUnreserved).replace(e.NOT_USERINFO,pctEncChar).replace(e.PCT_ENCODED,toUpperCase);if(f.host!==undefined)f.host=String(f.host).replace(e.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(e.NOT_HOST,pctEncChar).replace(e.PCT_ENCODED,toUpperCase);if(f.path!==undefined)f.path=String(f.path).replace(e.PCT_ENCODED,decodeUnreserved).replace(f.scheme?e.NOT_PATH:e.NOT_PATH_NOSCHEME,pctEncChar).replace(e.PCT_ENCODED,toUpperCase);if(f.query!==undefined)f.query=String(f.query).replace(e.PCT_ENCODED,decodeUnreserved).replace(e.NOT_QUERY,pctEncChar).replace(e.PCT_ENCODED,toUpperCase);if(f.fragment!==undefined)f.fragment=String(f.fragment).replace(e.PCT_ENCODED,decodeUnreserved).replace(e.NOT_FRAGMENT,pctEncChar).replace(e.PCT_ENCODED,toUpperCase);return f}function _stripLeadingZeros(f){return f.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(f,e){var n=f.match(e.IPV4ADDRESS)||[];var l=s(n,2),v=l[1];if(v){return v.split(".").map(_stripLeadingZeros).join(".")}else{return f}}function _normalizeIPv6(f,e){var n=f.match(e.IPV6ADDRESS)||[];var l=s(n,3),v=l[1],r=l[2];if(v){var b=v.toLowerCase().split("::").reverse(),g=s(b,2),w=g[0],j=g[1];var d=j?j.split(":").map(_stripLeadingZeros):[];var E=w.split(":").map(_stripLeadingZeros);var R=e.IPV4ADDRESS.test(E[E.length-1]);var A=R?7:8;var F=E.length-A;var p=Array(A);for(var I=0;I1){var N=p.slice(0,z.index);var Q=p.slice(z.index+z.length);U=N.join(":")+"::"+Q.join(":")}else{U=p.join(":")}if(r){U+="%"+r}return U}else{return f}}var X=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var M="".match(/(){0}/)[1]===undefined;function parse(f){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var l={};var v=s.iri!==false?n:e;if(s.reference==="suffix")f=(s.scheme?s.scheme+":":"")+"//"+f;var r=f.match(X);if(r){if(M){l.scheme=r[1];l.userinfo=r[3];l.host=r[4];l.port=parseInt(r[5],10);l.path=r[6]||"";l.query=r[7];l.fragment=r[8];if(isNaN(l.port)){l.port=r[5]}}else{l.scheme=r[1]||undefined;l.userinfo=f.indexOf("@")!==-1?r[3]:undefined;l.host=f.indexOf("//")!==-1?r[4]:undefined;l.port=parseInt(r[5],10);l.path=r[6]||"";l.query=f.indexOf("?")!==-1?r[7]:undefined;l.fragment=f.indexOf("#")!==-1?r[8]:undefined;if(isNaN(l.port)){l.port=f.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:undefined}}if(l.host){l.host=_normalizeIPv6(_normalizeIPv4(l.host,v),v)}if(l.scheme===undefined&&l.userinfo===undefined&&l.host===undefined&&l.port===undefined&&!l.path&&l.query===undefined){l.reference="same-document"}else if(l.scheme===undefined){l.reference="relative"}else if(l.fragment===undefined){l.reference="absolute"}else{l.reference="uri"}if(s.reference&&s.reference!=="suffix"&&s.reference!==l.reference){l.error=l.error||"URI is not a "+s.reference+" reference."}var b=H[(s.scheme||l.scheme||"").toLowerCase()];if(!s.unicodeSupport&&(!b||!b.unicodeSupport)){if(l.host&&(s.domainHost||b&&b.domainHost)){try{l.host=G.toASCII(l.host.replace(v.PCT_ENCODED,pctDecChars).toLowerCase())}catch(f){l.error=l.error||"Host's domain name can not be converted to ASCII via punycode: "+f}}_normalizeComponentEncoding(l,e)}else{_normalizeComponentEncoding(l,v)}if(b&&b.parse){b.parse(l,s)}}else{l.error=l.error||"URI can not be parsed."}return l}function _recomposeAuthority(f,s){var l=s.iri!==false?n:e;var v=[];if(f.userinfo!==undefined){v.push(f.userinfo);v.push("@")}if(f.host!==undefined){v.push(_normalizeIPv6(_normalizeIPv4(String(f.host),l),l).replace(l.IPV6ADDRESS,function(f,e,n){return"["+e+(n?"%25"+n:"")+"]"}))}if(typeof f.port==="number"){v.push(":");v.push(f.port.toString(10))}return v.length?v.join(""):undefined}var Y=/^\.\.?\//;var W=/^\/\.(\/|$)/;var B=/^\/\.\.(\/|$)/;var c=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(f){var e=[];while(f.length){if(f.match(Y)){f=f.replace(Y,"")}else if(f.match(W)){f=f.replace(W,"/")}else if(f.match(B)){f=f.replace(B,"/");e.pop()}else if(f==="."||f===".."){f=""}else{var n=f.match(c);if(n){var s=n[0];f=f.slice(s.length);e.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return e.join("")}function serialize(f){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var l=s.iri?n:e;var v=[];var r=H[(s.scheme||f.scheme||"").toLowerCase()];if(r&&r.serialize)r.serialize(f,s);if(f.host){if(l.IPV6ADDRESS.test(f.host)){}else if(s.domainHost||r&&r.domainHost){try{f.host=!s.iri?G.toASCII(f.host.replace(l.PCT_ENCODED,pctDecChars).toLowerCase()):G.toUnicode(f.host)}catch(e){f.error=f.error||"Host's domain name can not be converted to "+(!s.iri?"ASCII":"Unicode")+" via punycode: "+e}}}_normalizeComponentEncoding(f,l);if(s.reference!=="suffix"&&f.scheme){v.push(f.scheme);v.push(":")}var b=_recomposeAuthority(f,s);if(b!==undefined){if(s.reference!=="suffix"){v.push("//")}v.push(b);if(f.path&&f.path.charAt(0)!=="/"){v.push("/")}}if(f.path!==undefined){var g=f.path;if(!s.absolutePath&&(!r||!r.absolutePath)){g=removeDotSegments(g)}if(b===undefined){g=g.replace(/^\/\//,"/%2F")}v.push(g)}if(f.query!==undefined){v.push("?");v.push(f.query)}if(f.fragment!==undefined){v.push("#");v.push(f.fragment)}return v.join("")}function resolveComponents(f,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var s=arguments[3];var l={};if(!s){f=parse(serialize(f,n),n);e=parse(serialize(e,n),n)}n=n||{};if(!n.tolerant&&e.scheme){l.scheme=e.scheme;l.userinfo=e.userinfo;l.host=e.host;l.port=e.port;l.path=removeDotSegments(e.path||"");l.query=e.query}else{if(e.userinfo!==undefined||e.host!==undefined||e.port!==undefined){l.userinfo=e.userinfo;l.host=e.host;l.port=e.port;l.path=removeDotSegments(e.path||"");l.query=e.query}else{if(!e.path){l.path=f.path;if(e.query!==undefined){l.query=e.query}else{l.query=f.query}}else{if(e.path.charAt(0)==="/"){l.path=removeDotSegments(e.path)}else{if((f.userinfo!==undefined||f.host!==undefined||f.port!==undefined)&&!f.path){l.path="/"+e.path}else if(!f.path){l.path=e.path}else{l.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+e.path}l.path=removeDotSegments(l.path)}l.query=e.query}l.userinfo=f.userinfo;l.host=f.host;l.port=f.port}l.scheme=f.scheme}l.fragment=e.fragment;return l}function resolve(f,e,n){var s=assign({scheme:"null"},n);return serialize(resolveComponents(parse(f,s),parse(e,s),s,true),s)}function normalize(f,e){if(typeof f==="string"){f=serialize(parse(f,e),e)}else if(typeOf(f)==="object"){f=parse(serialize(f,e),e)}return f}function equal(f,e,n){if(typeof f==="string"){f=serialize(parse(f,n),n)}else if(typeOf(f)==="object"){f=serialize(f,n)}if(typeof e==="string"){e=serialize(parse(e,n),n)}else if(typeOf(e)==="object"){e=serialize(e,n)}return f===e}function escapeComponent(f,s){return f&&f.toString().replace(!s||!s.iri?e.ESCAPE:n.ESCAPE,pctEncChar)}function unescapeComponent(f,s){return f&&f.toString().replace(!s||!s.iri?e.PCT_ENCODED:n.PCT_ENCODED,pctDecChars)}var Z={scheme:"http",domainHost:true,parse:function parse(f,e){if(!f.host){f.error=f.error||"HTTP URIs must have a host."}return f},serialize:function serialize(f,e){if(f.port===(String(f.scheme).toLowerCase()!=="https"?80:443)||f.port===""){f.port=undefined}if(!f.path){f.path="/"}return f}};var D={scheme:"https",domainHost:Z.domainHost,parse:Z.parse,serialize:Z.serialize};var K={};var V=true;var y="[A-Za-z0-9\\-\\.\\_\\~"+(V?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var k="[0-9A-Fa-f]";var h=subexp(subexp("%[EFef]"+k+"%"+k+k+"%"+k+k)+"|"+subexp("%[89A-Fa-f]"+k+"%"+k+k)+"|"+subexp("%"+k+k));var a="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var S="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var m=merge(S,'[\\"\\\\]');var P="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var i=new RegExp(y,"g");var _=new RegExp(h,"g");var u=new RegExp(merge("[^]",a,"[\\.]",'[\\"]',m),"g");var o=new RegExp(merge("[^]",y,P),"g");var $=o;function decodeUnreserved(f){var e=pctDecChars(f);return!e.match(i)?f:e}var t={scheme:"mailto",parse:function parse$$1(f,e){var n=f;var s=n.to=n.path?n.path.split(","):[];n.path=undefined;if(n.query){var l=false;var v={};var r=n.query.split("&");for(var b=0,g=r.length;b{"use strict";f.exports=require("assert")},6417:f=>{"use strict";f.exports=require("crypto")},8614:f=>{"use strict";f.exports=require("events")},5747:f=>{"use strict";f.exports=require("fs")},4442:f=>{"use strict";f.exports=require("next/dist/compiled/find-up")},2519:f=>{"use strict";f.exports=require("next/dist/compiled/semver")},2087:f=>{"use strict";f.exports=require("os")},5622:f=>{"use strict";f.exports=require("path")},1669:f=>{"use strict";f.exports=require("util")},5013:f=>{"use strict";f.exports=require("worker_threads")}};var e={};function __nccwpck_require__(n){if(e[n]){return e[n].exports}var s=e[n]={id:n,loaded:false,exports:{}};var l=true;try{f[n].call(s.exports,s,s.exports,__nccwpck_require__);l=false}finally{if(l)delete e[n]}s.loaded=true;return s.exports}(()=>{__nccwpck_require__.nmd=(f=>{f.paths=[];if(!f.children)f.children=[];return f})})();__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(3331)})(); \ No newline at end of file diff --git a/packages/next/compiled/content-type/index.js b/packages/next/compiled/content-type/index.js index 73a8eda312c8567..6c9fcf876a3b3f1 100644 --- a/packages/next/compiled/content-type/index.js +++ b/packages/next/compiled/content-type/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var e={899:(e,r)=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;var a=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;var n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;var i=/\\([\u000b\u0020-\u00ff])/g;var o=/([\\"])/g;var u=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;r.format=format;r.parse=parse;function format(e){if(!e||typeof e!=="object"){throw new TypeError("argument obj is required")}var r=e.parameters;var t=e.type;if(!t||!u.test(t)){throw new TypeError("invalid type")}var a=t;if(r&&typeof r==="object"){var i;var o=Object.keys(r).sort();for(var f=0;f0&&!a.test(r)){throw new TypeError("invalid parameter value")}return'"'+r.replace(o,"\\$1")+'"'}function ContentType(e){this.parameters=Object.create(null);this.type=e}}};var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var a=r[t]={exports:{}};var n=true;try{e[t](a,a.exports,__webpack_require__);n=false}finally{if(n)delete r[t]}return a.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(899)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var e={899:(e,r)=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;var a=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;var n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;var i=/\\([\u000b\u0020-\u00ff])/g;var o=/([\\"])/g;var u=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;r.format=format;r.parse=parse;function format(e){if(!e||typeof e!=="object"){throw new TypeError("argument obj is required")}var r=e.parameters;var t=e.type;if(!t||!u.test(t)){throw new TypeError("invalid type")}var a=t;if(r&&typeof r==="object"){var i;var o=Object.keys(r).sort();for(var f=0;f0&&!a.test(r)){throw new TypeError("invalid parameter value")}return'"'+r.replace(o,"\\$1")+'"'}function ContentType(e){this.parameters=Object.create(null);this.type=e}}};var r={};function __nccwpck_require__(t){if(r[t]){return r[t].exports}var a=r[t]={exports:{}};var n=true;try{e[t](a,a.exports,__nccwpck_require__);n=false}finally{if(n)delete r[t]}return a.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(899)})(); \ No newline at end of file diff --git a/packages/next/compiled/cookie/index.js b/packages/next/compiled/cookie/index.js index fe96831894c971c..ff6fbdfaa8b9836 100644 --- a/packages/next/compiled/cookie/index.js +++ b/packages/next/compiled/cookie/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var e={583:(e,r)=>{r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse(e,r){if(typeof e!=="string"){throw new TypeError("argument str must be a string")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p{"use strict";var e={583:(e,r)=>{r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse(e,r){if(typeof e!=="string"){throw new TypeError("argument str must be a string")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p{var e={369:(e,t,r)=>{t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let s=0;let n=0;t[0].replace(/%[a-zA-Z%]/g,e=>{if(e==="%%"){return}s++;if(e==="%c"){n=s}});t.splice(n,0,r)}function log(...e){return typeof console==="object"&&console.log&&console.log(...e)}function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(507)(t);const{formatters:s}=e.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},507:(e,t,r)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=r(4);Object.keys(e).forEach(t=>{createDebug[t]=e[t]});createDebug.instances=[];createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let r=0;r{if(t==="%%"){return t}o++;const n=createDebug.formatters[s];if(typeof n==="function"){const s=e[o];t=n.call(r,s);e.splice(o,1);o--}return t});createDebug.formatArgs.call(r,e);const c=r.log||createDebug.log;c.apply(r,e)}debug.namespace=e;debug.enabled=createDebug.enabled(e);debug.useColors=createDebug.useColors();debug.color=selectColor(e);debug.destroy=destroy;debug.extend=extend;if(typeof createDebug.init==="function"){createDebug.init(debug)}createDebug.instances.push(debug);return debug}function destroy(){const e=createDebug.instances.indexOf(this);if(e!==-1){createDebug.instances.splice(e,1);return true}return false}function extend(e,t){const r=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);r.log=this.log;return r}function enable(e){createDebug.save(e);createDebug.names=[];createDebug.skips=[];let t;const r=(typeof e==="string"?e:"").split(/[\s,]+/);const s=r.length;for(t=0;t"-"+e)].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let t;let r;for(t=0,r=createDebug.skips.length;t{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(369)}else{e.exports=r(296)}},296:(e,t,r)=>{const s=r(867);const n=r(669);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.colors=[6,2,3,4,5,1];try{const e=r(106);if(e&&(e.stderr||e).level>=2){t.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(e){}t.inspectOpts=Object.keys(process.env).filter(e=>{return/^debug_/i.test(e)}).reduce((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>{return t.toUpperCase()});let s=process.env[t];if(/^(yes|on|true|enabled)$/i.test(s)){s=true}else if(/^(no|off|false|disabled)$/i.test(s)){s=false}else if(s==="null"){s=null}else{s=Number(s)}e[r]=s;return e},{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):s.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:r,useColors:s}=this;if(s){const s=this.color;const n="[3"+(s<8?s:"8;5;"+s);const o=` ${n};1m${r} `;t[0]=o+t[0].split("\n").join("\n"+o);t.push(n+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(n.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let s=0;s{"use strict";e.exports=((e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const s=t.indexOf(r+e);const n=t.indexOf("--");return s!==-1&&(n===-1?true:s{var t=1e3;var r=t*60;var s=r*60;var n=s*24;var o=n*7;var c=n*365.25;e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!u){return}var a=parseFloat(u[1]);var i=(u[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return a*c;case"weeks":case"week":case"w":return a*o;case"days":case"day":case"d":return a*n;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return undefined}}function fmtShort(e){var o=Math.abs(e);if(o>=n){return Math.round(e/n)+"d"}if(o>=s){return Math.round(e/s)+"h"}if(o>=r){return Math.round(e/r)+"m"}if(o>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var o=Math.abs(e);if(o>=n){return plural(e,o,n,"day")}if(o>=s){return plural(e,o,s,"hour")}if(o>=r){return plural(e,o,r,"minute")}if(o>=t){return plural(e,o,t,"second")}return e+" ms"}function plural(e,t,r,s){var n=t>=r*1.5;return Math.round(e/r)+" "+s+(n?"s":"")}},106:(e,t,r)=>{"use strict";const s=r(87);const n=r(379);const o=process.env;let c;if(n("no-color")||n("no-colors")||n("color=false")){c=false}else if(n("color")||n("colors")||n("color=true")||n("color=always")){c=true}if("FORCE_COLOR"in o){c=o.FORCE_COLOR.length===0||parseInt(o.FORCE_COLOR,10)!==0}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(c===false){return 0}if(n("color=16m")||n("color=full")||n("color=truecolor")){return 3}if(n("color=256")){return 2}if(e&&!e.isTTY&&c!==true){return 0}const t=c?1:0;if(process.platform==="win32"){const e=s.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in o){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in o)||o.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in o){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0}if(o.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(o.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)){return 1}if("COLORTERM"in o){return 1}if(o.TERM==="dumb"){return t}return t}function getSupportLevel(e){const t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},87:e=>{"use strict";e.exports=require("os")},867:e=>{"use strict";e.exports=require("tty")},669:e=>{"use strict";e.exports=require("util")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var s=t[r]={exports:{}};var n=true;try{e[r](s,s.exports,__webpack_require__);n=false}finally{if(n)delete t[r]}return s.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(787)})(); \ No newline at end of file +module.exports=(()=>{var e={369:(e,t,r)=>{t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let s=0;let n=0;t[0].replace(/%[a-zA-Z%]/g,e=>{if(e==="%%"){return}s++;if(e==="%c"){n=s}});t.splice(n,0,r)}function log(...e){return typeof console==="object"&&console.log&&console.log(...e)}function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(507)(t);const{formatters:s}=e.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},507:(e,t,r)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=r(4);Object.keys(e).forEach(t=>{createDebug[t]=e[t]});createDebug.instances=[];createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let r=0;r{if(t==="%%"){return t}o++;const n=createDebug.formatters[s];if(typeof n==="function"){const s=e[o];t=n.call(r,s);e.splice(o,1);o--}return t});createDebug.formatArgs.call(r,e);const c=r.log||createDebug.log;c.apply(r,e)}debug.namespace=e;debug.enabled=createDebug.enabled(e);debug.useColors=createDebug.useColors();debug.color=selectColor(e);debug.destroy=destroy;debug.extend=extend;if(typeof createDebug.init==="function"){createDebug.init(debug)}createDebug.instances.push(debug);return debug}function destroy(){const e=createDebug.instances.indexOf(this);if(e!==-1){createDebug.instances.splice(e,1);return true}return false}function extend(e,t){const r=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);r.log=this.log;return r}function enable(e){createDebug.save(e);createDebug.names=[];createDebug.skips=[];let t;const r=(typeof e==="string"?e:"").split(/[\s,]+/);const s=r.length;for(t=0;t"-"+e)].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let t;let r;for(t=0,r=createDebug.skips.length;t{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(369)}else{e.exports=r(296)}},296:(e,t,r)=>{const s=r(867);const n=r(669);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.colors=[6,2,3,4,5,1];try{const e=r(106);if(e&&(e.stderr||e).level>=2){t.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(e){}t.inspectOpts=Object.keys(process.env).filter(e=>{return/^debug_/i.test(e)}).reduce((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>{return t.toUpperCase()});let s=process.env[t];if(/^(yes|on|true|enabled)$/i.test(s)){s=true}else if(/^(no|off|false|disabled)$/i.test(s)){s=false}else if(s==="null"){s=null}else{s=Number(s)}e[r]=s;return e},{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):s.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:r,useColors:s}=this;if(s){const s=this.color;const n="[3"+(s<8?s:"8;5;"+s);const o=` ${n};1m${r} `;t[0]=o+t[0].split("\n").join("\n"+o);t.push(n+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(n.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let s=0;s{"use strict";e.exports=((e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const s=t.indexOf(r+e);const n=t.indexOf("--");return s!==-1&&(n===-1?true:s{var t=1e3;var r=t*60;var s=r*60;var n=s*24;var o=n*7;var c=n*365.25;e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!u){return}var a=parseFloat(u[1]);var i=(u[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return a*c;case"weeks":case"week":case"w":return a*o;case"days":case"day":case"d":return a*n;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return undefined}}function fmtShort(e){var o=Math.abs(e);if(o>=n){return Math.round(e/n)+"d"}if(o>=s){return Math.round(e/s)+"h"}if(o>=r){return Math.round(e/r)+"m"}if(o>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var o=Math.abs(e);if(o>=n){return plural(e,o,n,"day")}if(o>=s){return plural(e,o,s,"hour")}if(o>=r){return plural(e,o,r,"minute")}if(o>=t){return plural(e,o,t,"second")}return e+" ms"}function plural(e,t,r,s){var n=t>=r*1.5;return Math.round(e/r)+" "+s+(n?"s":"")}},106:(e,t,r)=>{"use strict";const s=r(87);const n=r(379);const o=process.env;let c;if(n("no-color")||n("no-colors")||n("color=false")){c=false}else if(n("color")||n("colors")||n("color=true")||n("color=always")){c=true}if("FORCE_COLOR"in o){c=o.FORCE_COLOR.length===0||parseInt(o.FORCE_COLOR,10)!==0}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(c===false){return 0}if(n("color=16m")||n("color=full")||n("color=truecolor")){return 3}if(n("color=256")){return 2}if(e&&!e.isTTY&&c!==true){return 0}const t=c?1:0;if(process.platform==="win32"){const e=s.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in o){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in o)||o.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in o){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0}if(o.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(o.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)){return 1}if("COLORTERM"in o){return 1}if(o.TERM==="dumb"){return t}return t}function getSupportLevel(e){const t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},87:e=>{"use strict";e.exports=require("os")},867:e=>{"use strict";e.exports=require("tty")},669:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var s=t[r]={exports:{}};var n=true;try{e[r](s,s.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}return s.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(787)})(); \ No newline at end of file diff --git a/packages/next/compiled/devalue/devalue.umd.js b/packages/next/compiled/devalue/devalue.umd.js index 516c317b3e95321..e4fae8b3912b74e 100644 --- a/packages/next/compiled/devalue/devalue.umd.js +++ b/packages/next/compiled/devalue/devalue.umd.js @@ -1 +1 @@ -module.exports=(()=>{var r={251:function(r){(function(e,t){true?r.exports=t():0})(this,function(){"use strict";var r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";var e=/[<>\b\f\n\r\t\0\u2028\u2029]/g;var t=/^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/;var n={"<":"\\u003C",">":"\\u003E","/":"\\u002F","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};var i=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function devalue(r){var e=new Map;function walk(r){if(typeof r==="function"){throw new Error("Cannot stringify a function")}if(e.has(r)){e.set(r,e.get(r)+1);return}e.set(r,1);if(!isPrimitive(r)){var t=getType(r);switch(t){case"Number":case"String":case"Boolean":case"Date":case"RegExp":return;case"Array":r.forEach(walk);break;case"Set":case"Map":Array.from(r).forEach(walk);break;default:var n=Object.getPrototypeOf(r);if(n!==Object.prototype&&n!==null&&Object.getOwnPropertyNames(n).sort().join("\0")!==i){throw new Error("Cannot stringify arbitrary non-POJOs")}if(Object.getOwnPropertySymbols(r).length>0){throw new Error("Cannot stringify POJOs with symbolic keys")}Object.keys(r).forEach(function(e){return walk(r[e])})}}}walk(r);var t=new Map;Array.from(e).filter(function(r){return r[1]>1}).sort(function(r,e){return e[1]-r[1]}).forEach(function(r,e){t.set(r[0],getName(e))});function stringify(r){if(t.has(r)){return t.get(r)}if(isPrimitive(r)){return stringifyPrimitive(r)}var e=getType(r);switch(e){case"Number":case"String":case"Boolean":return"Object("+stringify(r.valueOf())+")";case"RegExp":return"new RegExp("+stringifyString(r.source)+', "'+r.flags+'")';case"Date":return"new Date("+r.getTime()+")";case"Array":var n=r.map(function(e,t){return t in r?stringify(e):""});var i=r.length===0||r.length-1 in r?"":",";return"["+n.join(",")+i+"]";case"Set":case"Map":return"new "+e+"(["+Array.from(r).map(stringify).join(",")+"])";default:var o="{"+Object.keys(r).map(function(e){return safeKey(e)+":"+stringify(r[e])}).join(",")+"}";var f=Object.getPrototypeOf(r);if(f===null){return Object.keys(r).length>0?"Object.assign(Object.create(null),"+o+")":"Object.create(null)"}return o}}var n=stringify(r);if(t.size){var o=[];var f=[];var a=[];t.forEach(function(r,e){o.push(r);if(isPrimitive(e)){a.push(stringifyPrimitive(e));return}var t=getType(e);switch(t){case"Number":case"String":case"Boolean":a.push("Object("+stringify(e.valueOf())+")");break;case"RegExp":a.push(e.toString());break;case"Date":a.push("new Date("+e.getTime()+")");break;case"Array":a.push("Array("+e.length+")");e.forEach(function(e,t){f.push(r+"["+t+"]="+stringify(e))});break;case"Set":a.push("new Set");f.push(r+"."+Array.from(e).map(function(r){return"add("+stringify(r)+")"}).join("."));break;case"Map":a.push("new Map");f.push(r+"."+Array.from(e).map(function(r){var e=r[0],t=r[1];return"set("+stringify(e)+", "+stringify(t)+")"}).join("."));break;default:a.push(Object.getPrototypeOf(e)===null?"Object.create(null)":"{}");Object.keys(e).forEach(function(t){f.push(""+r+safeProp(t)+"="+stringify(e[t]))})}});f.push("return "+n);return"(function("+o.join(",")+"){"+f.join(";")+"}("+a.join(",")+"))"}else{return n}}function getName(e){var n="";do{n=r[e%r.length]+n;e=~~(e/r.length)-1}while(e>=0);return t.test(n)?n+"_":n}function isPrimitive(r){return Object(r)!==r}function stringifyPrimitive(r){if(typeof r==="string")return stringifyString(r);if(r===void 0)return"void 0";if(r===0&&1/r<0)return"-0";var e=String(r);if(typeof r==="number")return e.replace(/^(-)?0\./,"$1.");return e}function getType(r){return Object.prototype.toString.call(r).slice(8,-1)}function escapeUnsafeChar(r){return n[r]||r}function escapeUnsafeChars(r){return r.replace(e,escapeUnsafeChar)}function safeKey(r){return/^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(r)?r:escapeUnsafeChars(JSON.stringify(r))}function safeProp(r){return/^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(r)?"."+r:"["+escapeUnsafeChars(JSON.stringify(r))+"]"}function stringifyString(r){var e='"';for(var t=0;t=55296&&o<=57343){var f=r.charCodeAt(t+1);if(o<=56319&&(f>=56320&&f<=57343)){e+=i+r[++t]}else{e+="\\u"+o.toString(16).toUpperCase()}}else{e+=i}}e+='"';return e}return devalue})}};var e={};function __webpack_require__(t){if(e[t]){return e[t].exports}var n=e[t]={exports:{}};var i=true;try{r[t].call(n.exports,n,n.exports,__webpack_require__);i=false}finally{if(i)delete e[t]}return n.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(251)})(); \ No newline at end of file +module.exports=(()=>{var r={251:function(r){(function(e,t){true?r.exports=t():0})(this,function(){"use strict";var r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";var e=/[<>\b\f\n\r\t\0\u2028\u2029]/g;var t=/^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/;var n={"<":"\\u003C",">":"\\u003E","/":"\\u002F","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};var i=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function devalue(r){var e=new Map;function walk(r){if(typeof r==="function"){throw new Error("Cannot stringify a function")}if(e.has(r)){e.set(r,e.get(r)+1);return}e.set(r,1);if(!isPrimitive(r)){var t=getType(r);switch(t){case"Number":case"String":case"Boolean":case"Date":case"RegExp":return;case"Array":r.forEach(walk);break;case"Set":case"Map":Array.from(r).forEach(walk);break;default:var n=Object.getPrototypeOf(r);if(n!==Object.prototype&&n!==null&&Object.getOwnPropertyNames(n).sort().join("\0")!==i){throw new Error("Cannot stringify arbitrary non-POJOs")}if(Object.getOwnPropertySymbols(r).length>0){throw new Error("Cannot stringify POJOs with symbolic keys")}Object.keys(r).forEach(function(e){return walk(r[e])})}}}walk(r);var t=new Map;Array.from(e).filter(function(r){return r[1]>1}).sort(function(r,e){return e[1]-r[1]}).forEach(function(r,e){t.set(r[0],getName(e))});function stringify(r){if(t.has(r)){return t.get(r)}if(isPrimitive(r)){return stringifyPrimitive(r)}var e=getType(r);switch(e){case"Number":case"String":case"Boolean":return"Object("+stringify(r.valueOf())+")";case"RegExp":return"new RegExp("+stringifyString(r.source)+', "'+r.flags+'")';case"Date":return"new Date("+r.getTime()+")";case"Array":var n=r.map(function(e,t){return t in r?stringify(e):""});var i=r.length===0||r.length-1 in r?"":",";return"["+n.join(",")+i+"]";case"Set":case"Map":return"new "+e+"(["+Array.from(r).map(stringify).join(",")+"])";default:var o="{"+Object.keys(r).map(function(e){return safeKey(e)+":"+stringify(r[e])}).join(",")+"}";var f=Object.getPrototypeOf(r);if(f===null){return Object.keys(r).length>0?"Object.assign(Object.create(null),"+o+")":"Object.create(null)"}return o}}var n=stringify(r);if(t.size){var o=[];var f=[];var a=[];t.forEach(function(r,e){o.push(r);if(isPrimitive(e)){a.push(stringifyPrimitive(e));return}var t=getType(e);switch(t){case"Number":case"String":case"Boolean":a.push("Object("+stringify(e.valueOf())+")");break;case"RegExp":a.push(e.toString());break;case"Date":a.push("new Date("+e.getTime()+")");break;case"Array":a.push("Array("+e.length+")");e.forEach(function(e,t){f.push(r+"["+t+"]="+stringify(e))});break;case"Set":a.push("new Set");f.push(r+"."+Array.from(e).map(function(r){return"add("+stringify(r)+")"}).join("."));break;case"Map":a.push("new Map");f.push(r+"."+Array.from(e).map(function(r){var e=r[0],t=r[1];return"set("+stringify(e)+", "+stringify(t)+")"}).join("."));break;default:a.push(Object.getPrototypeOf(e)===null?"Object.create(null)":"{}");Object.keys(e).forEach(function(t){f.push(""+r+safeProp(t)+"="+stringify(e[t]))})}});f.push("return "+n);return"(function("+o.join(",")+"){"+f.join(";")+"}("+a.join(",")+"))"}else{return n}}function getName(e){var n="";do{n=r[e%r.length]+n;e=~~(e/r.length)-1}while(e>=0);return t.test(n)?n+"_":n}function isPrimitive(r){return Object(r)!==r}function stringifyPrimitive(r){if(typeof r==="string")return stringifyString(r);if(r===void 0)return"void 0";if(r===0&&1/r<0)return"-0";var e=String(r);if(typeof r==="number")return e.replace(/^(-)?0\./,"$1.");return e}function getType(r){return Object.prototype.toString.call(r).slice(8,-1)}function escapeUnsafeChar(r){return n[r]||r}function escapeUnsafeChars(r){return r.replace(e,escapeUnsafeChar)}function safeKey(r){return/^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(r)?r:escapeUnsafeChars(JSON.stringify(r))}function safeProp(r){return/^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(r)?"."+r:"["+escapeUnsafeChars(JSON.stringify(r))+"]"}function stringifyString(r){var e='"';for(var t=0;t=55296&&o<=57343){var f=r.charCodeAt(t+1);if(o<=56319&&(f>=56320&&f<=57343)){e+=i+r[++t]}else{e+="\\u"+o.toString(16).toUpperCase()}}else{e+=i}}e+='"';return e}return devalue})}};var e={};function __nccwpck_require__(t){if(e[t]){return e[t].exports}var n=e[t]={exports:{}};var i=true;try{r[t].call(n.exports,n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete e[t]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(251)})(); \ No newline at end of file diff --git a/packages/next/compiled/escape-string-regexp/index.js b/packages/next/compiled/escape-string-regexp/index.js index d368c06f26a17e9..f63f2bb839f59e6 100644 --- a/packages/next/compiled/escape-string-regexp/index.js +++ b/packages/next/compiled/escape-string-regexp/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var e={813:e=>{const r=/[|\\{}()[\]^$+*?.-]/g;e.exports=(e=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}return e.replace(r,"\\$&")})}};var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var _=r[t]={exports:{}};var a=true;try{e[t](_,_.exports,__webpack_require__);a=false}finally{if(a)delete r[t]}return _.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(813)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var e={813:e=>{const r=/[|\\{}()[\]^$+*?.-]/g;e.exports=(e=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}return e.replace(r,"\\$&")})}};var r={};function __nccwpck_require__(t){if(r[t]){return r[t].exports}var _=r[t]={exports:{}};var a=true;try{e[t](_,_.exports,__nccwpck_require__);a=false}finally{if(a)delete r[t]}return _.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(813)})(); \ No newline at end of file diff --git a/packages/next/compiled/file-loader/cjs.js b/packages/next/compiled/file-loader/cjs.js index d27810ba0b3a7ce..c0161c09e4eee26 100644 --- a/packages/next/compiled/file-loader/cjs.js +++ b/packages/next/compiled/file-loader/cjs.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var e={764:e=>{e.exports=JSON.parse('{"additionalProperties":true,"properties":{"name":{"description":"The filename template for the target file(s) (https://github.com/webpack-contrib/file-loader#name).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"outputPath":{"description":"A filesystem path where the target file(s) will be placed (https://github.com/webpack-contrib/file-loader#outputpath).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"publicPath":{"description":"A custom public path for the target file(s) (https://github.com/webpack-contrib/file-loader#publicpath).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"postTransformPublicPath":{"description":"A custom transformation function for post-processing the publicPath (https://github.com/webpack-contrib/file-loader#posttransformpublicpath).","instanceof":"Function"},"context":{"description":"A custom file context (https://github.com/webpack-contrib/file-loader#context).","type":"string"},"emitFile":{"description":"Enables/Disables emit files (https://github.com/webpack-contrib/file-loader#emitfile).","type":"boolean"},"regExp":{"description":"A Regular Expression to one or many parts of the target file path. The capture groups can be reused in the name property using [N] placeholder (https://github.com/webpack-contrib/file-loader#regexp).","anyOf":[{"type":"string"},{"instanceof":"RegExp"}]},"esModule":{"description":"By default, file-loader generates JS modules that use the ES modules syntax.","type":"boolean"}},"type":"object"}')},467:(e,t,i)=>{const r=i(206);e.exports=r.default;e.exports.raw=r.raw},206:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});t.default=loader;t.raw=void 0;var r=_interopRequireDefault(i(622));var o=_interopRequireDefault(i(710));var a=_interopRequireDefault(i(225));var n=_interopRequireDefault(i(764));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function loader(e){const t=o.default.getOptions(this);(0,a.default)(n.default,t,{name:"File Loader",baseDataPath:"options"});const i=t.context||this.rootContext;const s=o.default.interpolateName(this,t.name||"[contenthash].[ext]",{context:i,content:e,regExp:t.regExp});let p=s;if(t.outputPath){if(typeof t.outputPath==="function"){p=t.outputPath(s,this.resourcePath,i)}else{p=r.default.posix.join(t.outputPath,s)}}let u=`__webpack_public_path__ + ${JSON.stringify(p)}`;if(t.publicPath){if(typeof t.publicPath==="function"){u=t.publicPath(s,this.resourcePath,i)}else{u=`${t.publicPath.endsWith("/")?t.publicPath:`${t.publicPath}/`}${s}`}u=JSON.stringify(u)}if(t.postTransformPublicPath){u=t.postTransformPublicPath(u)}if(typeof t.emitFile==="undefined"||t.emitFile){this.emitFile(p,e)}const l=typeof t.esModule!=="undefined"?t.esModule:true;return`${l?"export default":"module.exports ="} ${u};`}const s=true;t.raw=s},710:e=>{e.exports=require("loader-utils")},225:e=>{e.exports=require("next/dist/compiled/schema-utils")},622:e=>{e.exports=require("path")}};var t={};function __webpack_require__(i){if(t[i]){return t[i].exports}var r=t[i]={exports:{}};var o=true;try{e[i](r,r.exports,__webpack_require__);o=false}finally{if(o)delete t[i]}return r.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(467)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var e={764:e=>{e.exports=JSON.parse('{"additionalProperties":true,"properties":{"name":{"description":"The filename template for the target file(s) (https://github.com/webpack-contrib/file-loader#name).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"outputPath":{"description":"A filesystem path where the target file(s) will be placed (https://github.com/webpack-contrib/file-loader#outputpath).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"publicPath":{"description":"A custom public path for the target file(s) (https://github.com/webpack-contrib/file-loader#publicpath).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"postTransformPublicPath":{"description":"A custom transformation function for post-processing the publicPath (https://github.com/webpack-contrib/file-loader#posttransformpublicpath).","instanceof":"Function"},"context":{"description":"A custom file context (https://github.com/webpack-contrib/file-loader#context).","type":"string"},"emitFile":{"description":"Enables/Disables emit files (https://github.com/webpack-contrib/file-loader#emitfile).","type":"boolean"},"regExp":{"description":"A Regular Expression to one or many parts of the target file path. The capture groups can be reused in the name property using [N] placeholder (https://github.com/webpack-contrib/file-loader#regexp).","anyOf":[{"type":"string"},{"instanceof":"RegExp"}]},"esModule":{"description":"By default, file-loader generates JS modules that use the ES modules syntax.","type":"boolean"}},"type":"object"}')},467:(e,t,i)=>{const r=i(206);e.exports=r.default;e.exports.raw=r.raw},206:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});t.default=loader;t.raw=void 0;var r=_interopRequireDefault(i(622));var o=_interopRequireDefault(i(710));var a=_interopRequireDefault(i(225));var n=_interopRequireDefault(i(764));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function loader(e){const t=o.default.getOptions(this);(0,a.default)(n.default,t,{name:"File Loader",baseDataPath:"options"});const i=t.context||this.rootContext;const s=o.default.interpolateName(this,t.name||"[contenthash].[ext]",{context:i,content:e,regExp:t.regExp});let p=s;if(t.outputPath){if(typeof t.outputPath==="function"){p=t.outputPath(s,this.resourcePath,i)}else{p=r.default.posix.join(t.outputPath,s)}}let u=`__webpack_public_path__ + ${JSON.stringify(p)}`;if(t.publicPath){if(typeof t.publicPath==="function"){u=t.publicPath(s,this.resourcePath,i)}else{u=`${t.publicPath.endsWith("/")?t.publicPath:`${t.publicPath}/`}${s}`}u=JSON.stringify(u)}if(t.postTransformPublicPath){u=t.postTransformPublicPath(u)}if(typeof t.emitFile==="undefined"||t.emitFile){this.emitFile(p,e)}const l=typeof t.esModule!=="undefined"?t.esModule:true;return`${l?"export default":"module.exports ="} ${u};`}const s=true;t.raw=s},710:e=>{e.exports=require("loader-utils")},225:e=>{e.exports=require("next/dist/compiled/schema-utils")},622:e=>{e.exports=require("path")}};var t={};function __nccwpck_require__(i){if(t[i]){return t[i].exports}var r=t[i]={exports:{}};var o=true;try{e[i](r,r.exports,__nccwpck_require__);o=false}finally{if(o)delete t[i]}return r.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(467)})(); \ No newline at end of file diff --git a/packages/next/compiled/find-cache-dir/index.js b/packages/next/compiled/find-cache-dir/index.js index 585d41ebcd6e4e4..7000c7c3130bb27 100644 --- a/packages/next/compiled/find-cache-dir/index.js +++ b/packages/next/compiled/find-cache-dir/index.js @@ -1 +1 @@ -module.exports=(()=>{var r={192:(r,e,t)=>{var s=t(622);r.exports=function(r,e){if(e){var t=e.map(function(e){return s.resolve(r,e)})}else{var t=r}var n=t.slice(1).reduce(function(r,e){if(!e.match(/^([A-Za-z]:)?\/|\\/)){throw new Error("relative path without a basedir")}var t=e.split(/\/+|\\+/);for(var s=0;r[s]===t[s]&&s1?n.join("/"):"/"}},19:(r,e,t)=>{"use strict";const s=t(622);const n=t(747);const o=t(192);const c=t(860);const i=t(240);const{env:a,cwd:u}=process;const d=r=>{try{n.accessSync(r,n.constants.W_OK);return true}catch(r){return false}};function useDirectory(r,e){if(e.create){i.sync(r)}if(e.thunk){return(...e)=>s.join(r,...e)}return r}function getNodeModuleDirectory(r){const e=s.join(r,"node_modules");if(!d(e)&&(n.existsSync(e)||!d(s.join(r)))){return}return e}r.exports=((r={})=>{if(a.CACHE_DIR&&!["true","false","1","0"].includes(a.CACHE_DIR)){return useDirectory(s.join(a.CACHE_DIR,"find-cache-dir"),r)}let{cwd:e=u()}=r;if(r.files){e=o(e,r.files)}e=c.sync(e);if(!e){return}const t=getNodeModuleDirectory(e);if(!t){return undefined}return useDirectory(s.join(e,"node_modules",".cache",r.name),r)})},240:(r,e,t)=>{"use strict";const s=t(747);const n=t(622);const{promisify:o}=t(669);const c=t(519);const i=c.satisfies(process.version,">=10.12.0");const a=r=>{if(process.platform==="win32"){const e=/[<>:"|?*]/.test(r.replace(n.parse(r).root,""));if(e){const e=new Error(`Path contains invalid characters: ${r}`);e.code="EINVAL";throw e}}};const u=r=>{const e={mode:511&~process.umask(),fs:s};return{...e,...r}};const d=r=>{const e=new Error(`operation not permitted, mkdir '${r}'`);e.code="EPERM";e.errno=-4048;e.path=r;e.syscall="mkdir";return e};const f=async(r,e)=>{a(r);e=u(e);const t=o(e.fs.mkdir);const c=o(e.fs.stat);if(i&&e.fs.mkdir===s.mkdir){const s=n.resolve(r);await t(s,{mode:e.mode,recursive:true});return s}const f=async r=>{try{await t(r,e.mode);return r}catch(e){if(e.code==="EPERM"){throw e}if(e.code==="ENOENT"){if(n.dirname(r)===r){throw d(r)}if(e.message.includes("null bytes")){throw e}await f(n.dirname(r));return f(r)}try{const t=await c(r);if(!t.isDirectory()){throw new Error("The path is not a directory")}}catch(r){throw e}return r}};return f(n.resolve(r))};r.exports=f;r.exports.sync=((r,e)=>{a(r);e=u(e);if(i&&e.fs.mkdirSync===s.mkdirSync){const t=n.resolve(r);s.mkdirSync(t,{mode:e.mode,recursive:true});return t}const t=r=>{try{e.fs.mkdirSync(r,e.mode)}catch(s){if(s.code==="EPERM"){throw s}if(s.code==="ENOENT"){if(n.dirname(r)===r){throw d(r)}if(s.message.includes("null bytes")){throw s}t(n.dirname(r));return t(r)}try{if(!e.fs.statSync(r).isDirectory()){throw new Error("The path is not a directory")}}catch(r){throw s}}return r};return t(n.resolve(r))})},860:(r,e,t)=>{"use strict";const s=t(622);const n=t(442);const o=async r=>{const e=await n("package.json",{cwd:r});return e&&s.dirname(e)};r.exports=o;r.exports.default=o;r.exports.sync=(r=>{const e=n.sync("package.json",{cwd:r});return e&&s.dirname(e)})},747:r=>{"use strict";r.exports=require("fs")},442:r=>{"use strict";r.exports=require("next/dist/compiled/find-up")},519:r=>{"use strict";r.exports=require("next/dist/compiled/semver")},622:r=>{"use strict";r.exports=require("path")},669:r=>{"use strict";r.exports=require("util")}};var e={};function __webpack_require__(t){if(e[t]){return e[t].exports}var s=e[t]={exports:{}};var n=true;try{r[t](s,s.exports,__webpack_require__);n=false}finally{if(n)delete e[t]}return s.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(19)})(); \ No newline at end of file +module.exports=(()=>{var r={192:(r,e,t)=>{var s=t(622);r.exports=function(r,e){if(e){var t=e.map(function(e){return s.resolve(r,e)})}else{var t=r}var n=t.slice(1).reduce(function(r,e){if(!e.match(/^([A-Za-z]:)?\/|\\/)){throw new Error("relative path without a basedir")}var t=e.split(/\/+|\\+/);for(var s=0;r[s]===t[s]&&s1?n.join("/"):"/"}},19:(r,e,t)=>{"use strict";const s=t(622);const n=t(747);const o=t(192);const c=t(860);const i=t(240);const{env:a,cwd:u}=process;const d=r=>{try{n.accessSync(r,n.constants.W_OK);return true}catch(r){return false}};function useDirectory(r,e){if(e.create){i.sync(r)}if(e.thunk){return(...e)=>s.join(r,...e)}return r}function getNodeModuleDirectory(r){const e=s.join(r,"node_modules");if(!d(e)&&(n.existsSync(e)||!d(s.join(r)))){return}return e}r.exports=((r={})=>{if(a.CACHE_DIR&&!["true","false","1","0"].includes(a.CACHE_DIR)){return useDirectory(s.join(a.CACHE_DIR,"find-cache-dir"),r)}let{cwd:e=u()}=r;if(r.files){e=o(e,r.files)}e=c.sync(e);if(!e){return}const t=getNodeModuleDirectory(e);if(!t){return undefined}return useDirectory(s.join(e,"node_modules",".cache",r.name),r)})},240:(r,e,t)=>{"use strict";const s=t(747);const n=t(622);const{promisify:o}=t(669);const c=t(519);const i=c.satisfies(process.version,">=10.12.0");const a=r=>{if(process.platform==="win32"){const e=/[<>:"|?*]/.test(r.replace(n.parse(r).root,""));if(e){const e=new Error(`Path contains invalid characters: ${r}`);e.code="EINVAL";throw e}}};const u=r=>{const e={mode:511&~process.umask(),fs:s};return{...e,...r}};const d=r=>{const e=new Error(`operation not permitted, mkdir '${r}'`);e.code="EPERM";e.errno=-4048;e.path=r;e.syscall="mkdir";return e};const f=async(r,e)=>{a(r);e=u(e);const t=o(e.fs.mkdir);const c=o(e.fs.stat);if(i&&e.fs.mkdir===s.mkdir){const s=n.resolve(r);await t(s,{mode:e.mode,recursive:true});return s}const f=async r=>{try{await t(r,e.mode);return r}catch(e){if(e.code==="EPERM"){throw e}if(e.code==="ENOENT"){if(n.dirname(r)===r){throw d(r)}if(e.message.includes("null bytes")){throw e}await f(n.dirname(r));return f(r)}try{const t=await c(r);if(!t.isDirectory()){throw new Error("The path is not a directory")}}catch(r){throw e}return r}};return f(n.resolve(r))};r.exports=f;r.exports.sync=((r,e)=>{a(r);e=u(e);if(i&&e.fs.mkdirSync===s.mkdirSync){const t=n.resolve(r);s.mkdirSync(t,{mode:e.mode,recursive:true});return t}const t=r=>{try{e.fs.mkdirSync(r,e.mode)}catch(s){if(s.code==="EPERM"){throw s}if(s.code==="ENOENT"){if(n.dirname(r)===r){throw d(r)}if(s.message.includes("null bytes")){throw s}t(n.dirname(r));return t(r)}try{if(!e.fs.statSync(r).isDirectory()){throw new Error("The path is not a directory")}}catch(r){throw s}}return r};return t(n.resolve(r))})},860:(r,e,t)=>{"use strict";const s=t(622);const n=t(442);const o=async r=>{const e=await n("package.json",{cwd:r});return e&&s.dirname(e)};r.exports=o;r.exports.default=o;r.exports.sync=(r=>{const e=n.sync("package.json",{cwd:r});return e&&s.dirname(e)})},747:r=>{"use strict";r.exports=require("fs")},442:r=>{"use strict";r.exports=require("next/dist/compiled/find-up")},519:r=>{"use strict";r.exports=require("next/dist/compiled/semver")},622:r=>{"use strict";r.exports=require("path")},669:r=>{"use strict";r.exports=require("util")}};var e={};function __nccwpck_require__(t){if(e[t]){return e[t].exports}var s=e[t]={exports:{}};var n=true;try{r[t](s,s.exports,__nccwpck_require__);n=false}finally{if(n)delete e[t]}return s.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(19)})(); \ No newline at end of file diff --git a/packages/next/compiled/find-up/LICENSE b/packages/next/compiled/find-up/LICENSE index e7af2f77107d730..fa7ceba3eb4a965 100644 --- a/packages/next/compiled/find-up/LICENSE +++ b/packages/next/compiled/find-up/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +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: diff --git a/packages/next/compiled/find-up/index.js b/packages/next/compiled/find-up/index.js index 20150b8cab541c2..496f4e8b9f172e3 100644 --- a/packages/next/compiled/find-up/index.js +++ b/packages/next/compiled/find-up/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var e={944:e=>{const t=(e,...t)=>new Promise(r=>{r(e(...t))});e.exports=t;e.exports.default=t},486:(e,t,r)=>{const n=r(622);const s=r(447);const c=r(978);const o=Symbol("findUp.stop");e.exports=(async(e,t={})=>{let r=n.resolve(t.cwd||"");const{root:c}=n.parse(r);const i=[].concat(e);const a=async t=>{if(typeof e!=="function"){return s(i,t)}const r=await e(t.cwd);if(typeof r==="string"){return s([r],t)}return r};while(true){const e=await a({...t,cwd:r});if(e===o){return}if(e){return n.resolve(r,e)}if(r===c){return}r=n.dirname(r)}});e.exports.sync=((e,t={})=>{let r=n.resolve(t.cwd||"");const{root:c}=n.parse(r);const i=[].concat(e);const a=t=>{if(typeof e!=="function"){return s.sync(i,t)}const r=e(t.cwd);if(typeof r==="string"){return s.sync([r],t)}return r};while(true){const e=a({...t,cwd:r});if(e===o){return}if(e){return n.resolve(r,e)}if(r===c){return}r=n.dirname(r)}});e.exports.exists=c;e.exports.sync.exists=c.sync;e.exports.stop=o},447:(e,t,r)=>{const n=r(622);const s=r(747);const{promisify:c}=r(669);const o=r(104);const i=c(s.stat);const a=c(s.lstat);const u={directory:"isDirectory",file:"isFile"};function checkType({type:e}){if(e in u){return}throw new Error(`Invalid type specified: ${e}`)}const p=(e,t)=>e===undefined||t[u[e]]();e.exports=(async(e,t)=>{t={cwd:process.cwd(),type:"file",allowSymlinks:true,...t};checkType(t);const r=t.allowSymlinks?i:a;return o(e,async e=>{try{const s=await r(n.resolve(t.cwd,e));return p(t.type,s)}catch(e){return false}},t)});e.exports.sync=((e,t)=>{t={cwd:process.cwd(),allowSymlinks:true,type:"file",...t};checkType(t);const r=t.allowSymlinks?s.statSync:s.lstatSync;for(const s of e){try{const e=r(n.resolve(t.cwd,s));if(p(t.type,e)){return s}}catch(e){}}})},104:(e,t,r)=>{const n=r(707);class EndError extends Error{constructor(e){super();this.value=e}}const s=async(e,t)=>t(await e);const c=async e=>{const t=await Promise.all(e);if(t[1]===true){throw new EndError(t[0])}return false};const o=async(e,t,r)=>{r={concurrency:Infinity,preserveOrder:true,...r};const o=n(r.concurrency);const i=[...e].map(e=>[e,o(s,e,t)]);const a=n(r.preserveOrder?1:Infinity);try{await Promise.all(i.map(e=>a(c,e)))}catch(e){if(e instanceof EndError){return e.value}throw e}};e.exports=o;e.exports.default=o},707:(e,t,r)=>{const n=r(944);const s=e=>{if(!((Number.isInteger(e)||e===Infinity)&&e>0)){return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"))}const t=[];let r=0;const s=()=>{r--;if(t.length>0){t.shift()()}};const c=(e,t,...c)=>{r++;const o=n(e,...c);t(o);o.then(s,s)};const o=(n,s,...o)=>{if(rnew Promise(r=>o(e,r,...t));Object.defineProperties(i,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}});return i};e.exports=s;e.exports.default=s},978:(e,t,r)=>{const n=r(747);const{promisify:s}=r(669);const c=s(n.access);e.exports=(async e=>{try{await c(e);return true}catch(e){return false}});e.exports.sync=(e=>{try{n.accessSync(e);return true}catch(e){return false}})},747:e=>{e.exports=require("fs")},622:e=>{e.exports=require("path")},669:e=>{e.exports=require("util")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={exports:{}};var s=true;try{e[r](n,n.exports,__webpack_require__);s=false}finally{if(s)delete t[r]}return n.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(486)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var e={944:e=>{const t=(e,...t)=>new Promise(r=>{r(e(...t))});e.exports=t;e.exports.default=t},486:(e,t,r)=>{const n=r(622);const s=r(447);const c=r(978);const o=Symbol("findUp.stop");e.exports=(async(e,t={})=>{let r=n.resolve(t.cwd||"");const{root:c}=n.parse(r);const i=[].concat(e);const a=async t=>{if(typeof e!=="function"){return s(i,t)}const r=await e(t.cwd);if(typeof r==="string"){return s([r],t)}return r};while(true){const e=await a({...t,cwd:r});if(e===o){return}if(e){return n.resolve(r,e)}if(r===c){return}r=n.dirname(r)}});e.exports.sync=((e,t={})=>{let r=n.resolve(t.cwd||"");const{root:c}=n.parse(r);const i=[].concat(e);const a=t=>{if(typeof e!=="function"){return s.sync(i,t)}const r=e(t.cwd);if(typeof r==="string"){return s.sync([r],t)}return r};while(true){const e=a({...t,cwd:r});if(e===o){return}if(e){return n.resolve(r,e)}if(r===c){return}r=n.dirname(r)}});e.exports.exists=c;e.exports.sync.exists=c.sync;e.exports.stop=o},447:(e,t,r)=>{const n=r(622);const s=r(747);const{promisify:c}=r(669);const o=r(104);const i=c(s.stat);const a=c(s.lstat);const u={directory:"isDirectory",file:"isFile"};function checkType({type:e}){if(e in u){return}throw new Error(`Invalid type specified: ${e}`)}const p=(e,t)=>e===undefined||t[u[e]]();e.exports=(async(e,t)=>{t={cwd:process.cwd(),type:"file",allowSymlinks:true,...t};checkType(t);const r=t.allowSymlinks?i:a;return o(e,async e=>{try{const s=await r(n.resolve(t.cwd,e));return p(t.type,s)}catch(e){return false}},t)});e.exports.sync=((e,t)=>{t={cwd:process.cwd(),allowSymlinks:true,type:"file",...t};checkType(t);const r=t.allowSymlinks?s.statSync:s.lstatSync;for(const s of e){try{const e=r(n.resolve(t.cwd,s));if(p(t.type,e)){return s}}catch(e){}}})},104:(e,t,r)=>{const n=r(707);class EndError extends Error{constructor(e){super();this.value=e}}const s=async(e,t)=>t(await e);const c=async e=>{const t=await Promise.all(e);if(t[1]===true){throw new EndError(t[0])}return false};const o=async(e,t,r)=>{r={concurrency:Infinity,preserveOrder:true,...r};const o=n(r.concurrency);const i=[...e].map(e=>[e,o(s,e,t)]);const a=n(r.preserveOrder?1:Infinity);try{await Promise.all(i.map(e=>a(c,e)))}catch(e){if(e instanceof EndError){return e.value}throw e}};e.exports=o;e.exports.default=o},707:(e,t,r)=>{const n=r(944);const s=e=>{if(!((Number.isInteger(e)||e===Infinity)&&e>0)){return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"))}const t=[];let r=0;const s=()=>{r--;if(t.length>0){t.shift()()}};const c=(e,t,...c)=>{r++;const o=n(e,...c);t(o);o.then(s,s)};const o=(n,s,...o)=>{if(rnew Promise(r=>o(e,r,...t));Object.defineProperties(i,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}});return i};e.exports=s;e.exports.default=s},978:(e,t,r)=>{const n=r(747);const{promisify:s}=r(669);const c=s(n.access);e.exports=(async e=>{try{await c(e);return true}catch(e){return false}});e.exports.sync=(e=>{try{n.accessSync(e);return true}catch(e){return false}})},747:e=>{e.exports=require("fs")},622:e=>{e.exports=require("path")},669:e=>{e.exports=require("util")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var n=t[r]={exports:{}};var s=true;try{e[r](n,n.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(486)})(); \ No newline at end of file diff --git a/packages/next/compiled/find-up/package.json b/packages/next/compiled/find-up/package.json index 2a3444a633eb003..4d267d64f3029ea 100644 --- a/packages/next/compiled/find-up/package.json +++ b/packages/next/compiled/find-up/package.json @@ -1 +1 @@ -{"name":"find-up","main":"index.js","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"license":"MIT"} +{"name":"find-up","main":"index.js","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT"} diff --git a/packages/next/compiled/fresh/index.js b/packages/next/compiled/fresh/index.js index 11f4844bf862987..aec7efa7a31aa43 100644 --- a/packages/next/compiled/fresh/index.js +++ b/packages/next/compiled/fresh/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var r={948:r=>{var e=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;r.exports=fresh;function fresh(r,a){var t=r["if-modified-since"];var s=r["if-none-match"];if(!t&&!s){return false}var i=r["cache-control"];if(i&&e.test(i)){return false}if(s&&s!=="*"){var f=a["etag"];if(!f){return false}var n=true;var u=parseTokenList(s);for(var o=0;o{"use strict";var r={948:r=>{var e=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;r.exports=fresh;function fresh(r,a){var t=r["if-modified-since"];var s=r["if-none-match"];if(!t&&!s){return false}var i=r["cache-control"];if(i&&e.test(i)){return false}if(s&&s!=="*"){var f=a["etag"];if(!f){return false}var n=true;var u=parseTokenList(s);for(var o=0;o{var n={724:(n,i,o)=>{var a=o(413);var p=["write","end","destroy"];var t=["resume","pause"];var f=["data","close"];var e=Array.prototype.slice;n.exports=duplex;function forEach(n,i){if(n.forEach){return n.forEach(i)}for(var o=0;o{"use strict";const a=o(747);const p=o(413);const t=o(761);const f=o(724);const e=o(490);const c=n=>Object.assign({level:9},n);n.exports=((n,i)=>{if(!n){return Promise.resolve(0)}return e(t.gzip)(n,c(i)).then(n=>n.length).catch(n=>0)});n.exports.sync=((n,i)=>t.gzipSync(n,c(i)).length);n.exports.stream=(n=>{const i=new p.PassThrough;const o=new p.PassThrough;const a=f(i,o);let e=0;const d=t.createGzip(c(n)).on("data",n=>{e+=n.length}).on("error",()=>{a.gzipSize=0}).on("end",()=>{a.gzipSize=e;a.emit("gzip-size",e);o.end()});i.pipe(d);i.pipe(o,{end:false});return a});n.exports.file=((i,o)=>{return new Promise((p,t)=>{const f=a.createReadStream(i);f.on("error",t);const e=f.pipe(n.exports.stream(o));e.on("error",t);e.on("gzip-size",p)})});n.exports.fileSync=((i,o)=>n.exports.sync(a.readFileSync(i),o))},490:n=>{"use strict";const i=(n,i)=>(function(...o){const a=i.promiseModule;return new a((a,p)=>{if(i.multiArgs){o.push((...n)=>{if(i.errorFirst){if(n[0]){p(n)}else{n.shift();a(n)}}else{a(n)}})}else if(i.errorFirst){o.push((n,i)=>{if(n){p(n)}else{a(i)}})}else{o.push(a)}n.apply(this,o)})});n.exports=((n,o)=>{o=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:true,promiseModule:Promise},o);const a=typeof n;if(!(n!==null&&(a==="object"||a==="function"))){throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${n===null?"null":a}\``)}const p=n=>{const i=i=>typeof i==="string"?n===i:i.test(n);return o.include?o.include.some(i):!o.exclude.some(i)};let t;if(a==="function"){t=function(...a){return o.excludeMain?n(...a):i(n,o).apply(this,a)}}else{t=Object.create(Object.getPrototypeOf(n))}for(const a in n){const f=n[a];t[a]=typeof f==="function"&&p(a)?i(f,o):f}return t})},747:n=>{"use strict";n.exports=require("fs")},413:n=>{"use strict";n.exports=require("stream")},761:n=>{"use strict";n.exports=require("zlib")}};var i={};function __webpack_require__(o){if(i[o]){return i[o].exports}var a=i[o]={exports:{}};var p=true;try{n[o](a,a.exports,__webpack_require__);p=false}finally{if(p)delete i[o]}return a.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(656)})(); \ No newline at end of file +module.exports=(()=>{var n={724:(n,i,o)=>{var a=o(413);var p=["write","end","destroy"];var t=["resume","pause"];var f=["data","close"];var e=Array.prototype.slice;n.exports=duplex;function forEach(n,i){if(n.forEach){return n.forEach(i)}for(var o=0;o{"use strict";const a=o(747);const p=o(413);const t=o(761);const f=o(724);const e=o(490);const c=n=>Object.assign({level:9},n);n.exports=((n,i)=>{if(!n){return Promise.resolve(0)}return e(t.gzip)(n,c(i)).then(n=>n.length).catch(n=>0)});n.exports.sync=((n,i)=>t.gzipSync(n,c(i)).length);n.exports.stream=(n=>{const i=new p.PassThrough;const o=new p.PassThrough;const a=f(i,o);let e=0;const d=t.createGzip(c(n)).on("data",n=>{e+=n.length}).on("error",()=>{a.gzipSize=0}).on("end",()=>{a.gzipSize=e;a.emit("gzip-size",e);o.end()});i.pipe(d);i.pipe(o,{end:false});return a});n.exports.file=((i,o)=>{return new Promise((p,t)=>{const f=a.createReadStream(i);f.on("error",t);const e=f.pipe(n.exports.stream(o));e.on("error",t);e.on("gzip-size",p)})});n.exports.fileSync=((i,o)=>n.exports.sync(a.readFileSync(i),o))},490:n=>{"use strict";const i=(n,i)=>(function(...o){const a=i.promiseModule;return new a((a,p)=>{if(i.multiArgs){o.push((...n)=>{if(i.errorFirst){if(n[0]){p(n)}else{n.shift();a(n)}}else{a(n)}})}else if(i.errorFirst){o.push((n,i)=>{if(n){p(n)}else{a(i)}})}else{o.push(a)}n.apply(this,o)})});n.exports=((n,o)=>{o=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:true,promiseModule:Promise},o);const a=typeof n;if(!(n!==null&&(a==="object"||a==="function"))){throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${n===null?"null":a}\``)}const p=n=>{const i=i=>typeof i==="string"?n===i:i.test(n);return o.include?o.include.some(i):!o.exclude.some(i)};let t;if(a==="function"){t=function(...a){return o.excludeMain?n(...a):i(n,o).apply(this,a)}}else{t=Object.create(Object.getPrototypeOf(n))}for(const a in n){const f=n[a];t[a]=typeof f==="function"&&p(a)?i(f,o):f}return t})},747:n=>{"use strict";n.exports=require("fs")},413:n=>{"use strict";n.exports=require("stream")},761:n=>{"use strict";n.exports=require("zlib")}};var i={};function __nccwpck_require__(o){if(i[o]){return i[o].exports}var a=i[o]={exports:{}};var p=true;try{n[o](a,a.exports,__nccwpck_require__);p=false}finally{if(p)delete i[o]}return a.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(656)})(); \ No newline at end of file diff --git a/packages/next/compiled/http-proxy/index.js b/packages/next/compiled/http-proxy/index.js index 6091b1789b04bea..81bf8638501d9ae 100644 --- a/packages/next/compiled/http-proxy/index.js +++ b/packages/next/compiled/http-proxy/index.js @@ -1 +1 @@ -module.exports=(()=>{var e={933:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)r=false}function EE(e,t,r){this.fn=e;this.context=t;this.once=r||false}function addListener(e,t,o,n,s){if(typeof o!=="function"){throw new TypeError("The listener must be a function")}var i=new EE(o,n||e,s),a=r?r+t:t;if(!e._events[a])e._events[a]=i,e._eventsCount++;else if(!e._events[a].fn)e._events[a].push(i);else e._events[a]=[e._events[a],i];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],o,n;if(this._eventsCount===0)return e;for(n in o=this._events){if(t.call(o,n))e.push(r?n.slice(1):n)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(o))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=r?r+e:e,o=this._events[t];if(!o)return[];if(o.fn)return[o.fn];for(var n=0,s=o.length,i=new Array(s);n{var o=r(835);var n=o.URL;var s=r(605);var i=r(211);var a=r(357);var c=r(413).Writable;var f=r(185)("follow-redirects");var u={GET:true,HEAD:true,OPTIONS:true,TRACE:true};var h=Object.create(null);["abort","aborted","connect","error","socket","timeout"].forEach(function(e){h[e]=function(t,r,o){this._redirectable.emit(e,t,r,o)}});function RedirectableRequest(e,t){c.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var r=this;this._onNativeResponse=function(e){r._processResponse(e)};this._performRequest()}RedirectableRequest.prototype=Object.create(c.prototype);RedirectableRequest.prototype.write=function(e,t,r){if(this._ending){throw new Error("write after end")}if(!(typeof e==="string"||typeof e==="object"&&"length"in e)){throw new Error("data should be a string, Buffer or Uint8Array")}if(typeof t==="function"){r=t;t=null}if(e.length===0){if(r){r()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,r)}else{this.emit("error",new Error("Request body larger than maxBodyLength limit"));this.abort()}};RedirectableRequest.prototype.end=function(e,t,r){if(typeof e==="function"){r=e;e=t=null}else if(typeof t==="function"){r=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,r)}else{var o=this;var n=this._currentRequest;this.write(e,t,function(){o._ended=true;n.end(null,null,r)});this._ending=true}};RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};RedirectableRequest.prototype.setTimeout=function(e,t){if(t){this.once("timeout",t)}if(this.socket){startTimer(this,e)}else{var r=this;this._currentRequest.once("socket",function(){startTimer(r,e)})}this.once("response",clearTimer);this.once("error",clearTimer);return this};function startTimer(e,t){clearTimeout(e._timeout);e._timeout=setTimeout(function(){e.emit("timeout")},t)}function clearTimer(){clearTimeout(this._timeout)}["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){RedirectableRequest.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})});RedirectableRequest.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){this.emit("error",new Error("Unsupported protocol "+e));return}if(this._options.agents){var r=e.substr(0,e.length-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=o.format(this._options);n._redirectable=this;for(var s in h){if(s){n.on(s,h[s])}}if(this._isRedirect){var i=0;var a=this;var c=this._requestBodyBuffers;(function writeNext(e){if(n===a._currentRequest){if(e){a.emit("error",e)}else if(i=300&&t<400){this._currentRequest.removeAllListeners();this._currentRequest.on("error",noop);this._currentRequest.abort();e.destroy();if(++this._redirectCount>this._options.maxRedirects){this.emit("error",new Error("Max redirects exceeded."));return}var n;var s=this._options.headers;if(t!==307&&!(this._options.method in u)){this._options.method="GET";this._requestBodyBuffers=[];for(n in s){if(/^content-/i.test(n)){delete s[n]}}}if(!this._isRedirect){for(n in s){if(/^host$/i.test(n)){delete s[n]}}}var i=o.resolve(this._currentUrl,r);f("redirecting to",i);Object.assign(this._options,o.parse(i));if(typeof this._options.beforeRedirect==="function"){try{this._options.beforeRedirect.call(null,this._options)}catch(e){this.emit("error",e);return}this._sanitizeOptions(this._options)}this._isRedirect=true;this._performRequest()}else{e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[]}};function wrap(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var r={};Object.keys(e).forEach(function(s){var i=s+":";var c=r[i]=e[s];var u=t[s]=Object.create(c);u.request=function(e,s,c){if(typeof e==="string"){var u=e;try{e=urlToOptions(new n(u))}catch(t){e=o.parse(u)}}else if(n&&e instanceof n){e=urlToOptions(e)}else{c=s;s=e;e={protocol:i}}if(typeof s==="function"){c=s;s=null}s=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,s);s.nativeProtocols=r;a.equal(s.protocol,i,"protocol mismatch");f("options",s);return new RedirectableRequest(s,c)};u.get=function(e,t,r){var o=u.request(e,t,r);o.end();return o}});return t}function noop(){}function urlToOptions(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};if(e.port!==""){t.port=Number(e.port)}return t}e.exports=wrap({http:s,https:i});e.exports.wrap=wrap},737:(e,t,r)=>{e.exports=r(825)},825:(e,t,r)=>{var o=r(130).Server;function createProxyServer(e){return new o(e)}o.createProxyServer=createProxyServer;o.createServer=createProxyServer;o.createProxy=createProxyServer;e.exports=o},658:(e,t,r)=>{var o=t,n=r(835),s=r(669)._extend,i=r(543);var a=/(^|,)\s*upgrade\s*($|,)/i,c=/^https|wss/;o.isSSL=c;o.setupOutgoing=function(e,t,r,f){e.port=t[f||"target"].port||(c.test(t[f||"target"].protocol)?443:80);["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(r){e[r]=t[f||"target"][r]});e.method=t.method||r.method;e.headers=s({},r.headers);if(t.headers){s(e.headers,t.headers)}if(t.auth){e.auth=t.auth}if(t.ca){e.ca=t.ca}if(c.test(t[f||"target"].protocol)){e.rejectUnauthorized=typeof t.secure==="undefined"?true:t.secure}e.agent=t.agent||false;e.localAddress=t.localAddress;if(!e.agent){e.headers=e.headers||{};if(typeof e.headers.connection!=="string"||!a.test(e.headers.connection)){e.headers.connection="close"}}var u=t[f||"target"];var h=u&&t.prependPath!==false?u.path||"":"";var p=!t.toProxy?n.parse(r.url).path||"":r.url;p=!t.ignorePath?p:"";e.path=o.urlJoin(h,p);if(t.changeOrigin){e.headers.host=i(e.port,t[f||"target"].protocol)&&!hasPort(e.host)?e.host+":"+e.port:e.host}return e};o.setupSocket=function(e){e.setTimeout(0);e.setNoDelay(true);e.setKeepAlive(true,0);return e};o.getPort=function(e){var t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:o.hasEncryptedConnection(e)?"443":"80"};o.hasEncryptedConnection=function(e){return Boolean(e.connection.encrypted||e.connection.pair)};o.urlJoin=function(){var e=Array.prototype.slice.call(arguments),t=e.length-1,r=e[t],o=r.split("?"),n;e[t]=o.shift();n=[e.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")];n.push.apply(n,o);return n.join("?")};o.rewriteCookieProperty=function rewriteCookieProperty(e,t,r){if(Array.isArray(e)){return e.map(function(e){return rewriteCookieProperty(e,t,r)})}return e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),function(e,r,o){var n;if(o in t){n=t[o]}else if("*"in t){n=t["*"]}else{return e}if(n){return r+n}else{return""}})};function hasPort(e){return!!~e.indexOf(":")}},130:(e,t,r)=>{var o=e.exports,n=r(669)._extend,s=r(835).parse,i=r(933),a=r(605),c=r(211),f=r(373),u=r(257);o.Server=ProxyServer;function createRightProxy(e){return function(t){return function(r,o){var i=e==="ws"?this.wsPasses:this.webPasses,a=[].slice.call(arguments),c=a.length-1,f,u;if(typeof a[c]==="function"){u=a[c];c--}var h=t;if(!(a[c]instanceof Buffer)&&a[c]!==o){h=n({},t);n(h,a[c]);c--}if(a[c]instanceof Buffer){f=a[c]}["target","forward"].forEach(function(e){if(typeof h[e]==="string")h[e]=s(h[e])});if(!h.target&&!h.forward){return this.emit("error",new Error("Must provide a proper URL as target"))}for(var p=0;p{var o=r(605),n=r(211),s=r(773),i=r(658),a=r(382);s=Object.keys(s).map(function(e){return s[e]});var c={http:o,https:n};e.exports={deleteLength:function deleteLength(e,t,r){if((e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]){e.headers["content-length"]="0";delete e.headers["transfer-encoding"]}},timeout:function timeout(e,t,r){if(r.timeout){e.socket.setTimeout(r.timeout)}},XHeaders:function XHeaders(e,t,r){if(!r.xfwd)return;var o=e.isSpdy||i.hasEncryptedConnection(e);var n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:i.getPort(e),proto:o?"https":"http"};["for","port","proto"].forEach(function(t){e.headers["x-forwarded-"+t]=(e.headers["x-forwarded-"+t]||"")+(e.headers["x-forwarded-"+t]?",":"")+n[t]});e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers["host"]||""},stream:function stream(e,t,r,o,n,f){n.emit("start",e,t,r.target||r.forward);var u=r.followRedirects?a:c;var h=u.http;var p=u.https;if(r.forward){var d=(r.forward.protocol==="https:"?p:h).request(i.setupOutgoing(r.ssl||{},r,e,"forward"));var l=createErrorHandler(d,r.forward);e.on("error",l);d.on("error",l);(r.buffer||e).pipe(d);if(!r.target){return t.end()}}var v=(r.target.protocol==="https:"?p:h).request(i.setupOutgoing(r.ssl||{},r,e));v.on("socket",function(o){if(n&&!v.getHeader("expect")){n.emit("proxyReq",v,e,t,r)}});if(r.proxyTimeout){v.setTimeout(r.proxyTimeout,function(){v.abort()})}e.on("aborted",function(){v.abort()});var m=createErrorHandler(v,r.target);e.on("error",m);v.on("error",m);function createErrorHandler(r,o){return function proxyError(s){if(e.socket.destroyed&&s.code==="ECONNRESET"){n.emit("econnreset",s,e,t,o);return r.abort()}if(f){f(s,e,t,o)}else{n.emit("error",s,e,t,o)}}}(r.buffer||e).pipe(v);v.on("response",function(o){if(n){n.emit("proxyRes",o,e,t)}if(!t.headersSent&&!r.selfHandleResponse){for(var i=0;i{var o=r(835),n=r(658);var s=/^201|30(1|2|7|8)$/;e.exports={removeChunked:function removeChunked(e,t,r){if(e.httpVersion==="1.0"){delete r.headers["transfer-encoding"]}},setConnection:function setConnection(e,t,r){if(e.httpVersion==="1.0"){r.headers.connection=e.headers.connection||"close"}else if(e.httpVersion!=="2.0"&&!r.headers.connection){r.headers.connection=e.headers.connection||"keep-alive"}},setRedirectHostRewrite:function setRedirectHostRewrite(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers["location"]&&s.test(r.statusCode)){var i=o.parse(n.target);var a=o.parse(r.headers["location"]);if(i.host!=a.host){return}if(n.hostRewrite){a.host=n.hostRewrite}else if(n.autoRewrite){a.host=e.headers["host"]}if(n.protocolRewrite){a.protocol=n.protocolRewrite}r.headers["location"]=a.format()}},writeHeaders:function writeHeaders(e,t,r,o){var s=o.cookieDomainRewrite,i=o.cookiePathRewrite,a=o.preserveHeaderKeyCase,c,f=function(e,r){if(r==undefined)return;if(s&&e.toLowerCase()==="set-cookie"){r=n.rewriteCookieProperty(r,s,"domain")}if(i&&e.toLowerCase()==="set-cookie"){r=n.rewriteCookieProperty(r,i,"path")}t.setHeader(String(e).trim(),r)};if(typeof s==="string"){s={"*":s}}if(typeof i==="string"){i={"*":i}}if(a&&r.rawHeaders!=undefined){c={};for(var u=0;u{var o=r(605),n=r(211),s=r(658);e.exports={checkMethodAndHeader:function checkMethodAndHeader(e,t){if(e.method!=="GET"||!e.headers.upgrade){t.destroy();return true}if(e.headers.upgrade.toLowerCase()!=="websocket"){t.destroy();return true}},XHeaders:function XHeaders(e,t,r){if(!r.xfwd)return;var o={for:e.connection.remoteAddress||e.socket.remoteAddress,port:s.getPort(e),proto:s.hasEncryptedConnection(e)?"wss":"ws"};["for","port","proto"].forEach(function(t){e.headers["x-forwarded-"+t]=(e.headers["x-forwarded-"+t]||"")+(e.headers["x-forwarded-"+t]?",":"")+o[t]})},stream:function stream(e,t,r,i,a,c){var f=function(e,t){return Object.keys(t).reduce(function(e,r){var o=t[r];if(!Array.isArray(o)){e.push(r+": "+o);return e}for(var n=0;n{"use strict";e.exports=function required(e,t){t=t.split(":")[0];e=+e;if(!e)return false;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return false}return e!==0}},357:e=>{"use strict";e.exports=require("assert")},605:e=>{"use strict";e.exports=require("http")},211:e=>{"use strict";e.exports=require("https")},185:e=>{"use strict";e.exports=require("next/dist/compiled/debug")},413:e=>{"use strict";e.exports=require("stream")},835:e=>{"use strict";e.exports=require("url")},669:e=>{"use strict";e.exports=require("util")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var o=t[r]={exports:{}};var n=true;try{e[r](o,o.exports,__webpack_require__);n=false}finally{if(n)delete t[r]}return o.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(737)})(); \ No newline at end of file +module.exports=(()=>{var e={933:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)r=false}function EE(e,t,r){this.fn=e;this.context=t;this.once=r||false}function addListener(e,t,o,n,s){if(typeof o!=="function"){throw new TypeError("The listener must be a function")}var i=new EE(o,n||e,s),a=r?r+t:t;if(!e._events[a])e._events[a]=i,e._eventsCount++;else if(!e._events[a].fn)e._events[a].push(i);else e._events[a]=[e._events[a],i];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],o,n;if(this._eventsCount===0)return e;for(n in o=this._events){if(t.call(o,n))e.push(r?n.slice(1):n)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(o))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=r?r+e:e,o=this._events[t];if(!o)return[];if(o.fn)return[o.fn];for(var n=0,s=o.length,i=new Array(s);n{var o=r(835);var n=o.URL;var s=r(605);var i=r(211);var a=r(357);var c=r(413).Writable;var f=r(185)("follow-redirects");var u={GET:true,HEAD:true,OPTIONS:true,TRACE:true};var h=Object.create(null);["abort","aborted","connect","error","socket","timeout"].forEach(function(e){h[e]=function(t,r,o){this._redirectable.emit(e,t,r,o)}});function RedirectableRequest(e,t){c.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var r=this;this._onNativeResponse=function(e){r._processResponse(e)};this._performRequest()}RedirectableRequest.prototype=Object.create(c.prototype);RedirectableRequest.prototype.write=function(e,t,r){if(this._ending){throw new Error("write after end")}if(!(typeof e==="string"||typeof e==="object"&&"length"in e)){throw new Error("data should be a string, Buffer or Uint8Array")}if(typeof t==="function"){r=t;t=null}if(e.length===0){if(r){r()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,r)}else{this.emit("error",new Error("Request body larger than maxBodyLength limit"));this.abort()}};RedirectableRequest.prototype.end=function(e,t,r){if(typeof e==="function"){r=e;e=t=null}else if(typeof t==="function"){r=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,r)}else{var o=this;var n=this._currentRequest;this.write(e,t,function(){o._ended=true;n.end(null,null,r)});this._ending=true}};RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};RedirectableRequest.prototype.setTimeout=function(e,t){if(t){this.once("timeout",t)}if(this.socket){startTimer(this,e)}else{var r=this;this._currentRequest.once("socket",function(){startTimer(r,e)})}this.once("response",clearTimer);this.once("error",clearTimer);return this};function startTimer(e,t){clearTimeout(e._timeout);e._timeout=setTimeout(function(){e.emit("timeout")},t)}function clearTimer(){clearTimeout(this._timeout)}["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){RedirectableRequest.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})});RedirectableRequest.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){this.emit("error",new Error("Unsupported protocol "+e));return}if(this._options.agents){var r=e.substr(0,e.length-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=o.format(this._options);n._redirectable=this;for(var s in h){if(s){n.on(s,h[s])}}if(this._isRedirect){var i=0;var a=this;var c=this._requestBodyBuffers;(function writeNext(e){if(n===a._currentRequest){if(e){a.emit("error",e)}else if(i=300&&t<400){this._currentRequest.removeAllListeners();this._currentRequest.on("error",noop);this._currentRequest.abort();e.destroy();if(++this._redirectCount>this._options.maxRedirects){this.emit("error",new Error("Max redirects exceeded."));return}var n;var s=this._options.headers;if(t!==307&&!(this._options.method in u)){this._options.method="GET";this._requestBodyBuffers=[];for(n in s){if(/^content-/i.test(n)){delete s[n]}}}if(!this._isRedirect){for(n in s){if(/^host$/i.test(n)){delete s[n]}}}var i=o.resolve(this._currentUrl,r);f("redirecting to",i);Object.assign(this._options,o.parse(i));if(typeof this._options.beforeRedirect==="function"){try{this._options.beforeRedirect.call(null,this._options)}catch(e){this.emit("error",e);return}this._sanitizeOptions(this._options)}this._isRedirect=true;this._performRequest()}else{e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[]}};function wrap(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var r={};Object.keys(e).forEach(function(s){var i=s+":";var c=r[i]=e[s];var u=t[s]=Object.create(c);u.request=function(e,s,c){if(typeof e==="string"){var u=e;try{e=urlToOptions(new n(u))}catch(t){e=o.parse(u)}}else if(n&&e instanceof n){e=urlToOptions(e)}else{c=s;s=e;e={protocol:i}}if(typeof s==="function"){c=s;s=null}s=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,s);s.nativeProtocols=r;a.equal(s.protocol,i,"protocol mismatch");f("options",s);return new RedirectableRequest(s,c)};u.get=function(e,t,r){var o=u.request(e,t,r);o.end();return o}});return t}function noop(){}function urlToOptions(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};if(e.port!==""){t.port=Number(e.port)}return t}e.exports=wrap({http:s,https:i});e.exports.wrap=wrap},737:(e,t,r)=>{e.exports=r(825)},825:(e,t,r)=>{var o=r(130).Server;function createProxyServer(e){return new o(e)}o.createProxyServer=createProxyServer;o.createServer=createProxyServer;o.createProxy=createProxyServer;e.exports=o},658:(e,t,r)=>{var o=t,n=r(835),s=r(669)._extend,i=r(543);var a=/(^|,)\s*upgrade\s*($|,)/i,c=/^https|wss/;o.isSSL=c;o.setupOutgoing=function(e,t,r,f){e.port=t[f||"target"].port||(c.test(t[f||"target"].protocol)?443:80);["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(r){e[r]=t[f||"target"][r]});e.method=t.method||r.method;e.headers=s({},r.headers);if(t.headers){s(e.headers,t.headers)}if(t.auth){e.auth=t.auth}if(t.ca){e.ca=t.ca}if(c.test(t[f||"target"].protocol)){e.rejectUnauthorized=typeof t.secure==="undefined"?true:t.secure}e.agent=t.agent||false;e.localAddress=t.localAddress;if(!e.agent){e.headers=e.headers||{};if(typeof e.headers.connection!=="string"||!a.test(e.headers.connection)){e.headers.connection="close"}}var u=t[f||"target"];var h=u&&t.prependPath!==false?u.path||"":"";var p=!t.toProxy?n.parse(r.url).path||"":r.url;p=!t.ignorePath?p:"";e.path=o.urlJoin(h,p);if(t.changeOrigin){e.headers.host=i(e.port,t[f||"target"].protocol)&&!hasPort(e.host)?e.host+":"+e.port:e.host}return e};o.setupSocket=function(e){e.setTimeout(0);e.setNoDelay(true);e.setKeepAlive(true,0);return e};o.getPort=function(e){var t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:o.hasEncryptedConnection(e)?"443":"80"};o.hasEncryptedConnection=function(e){return Boolean(e.connection.encrypted||e.connection.pair)};o.urlJoin=function(){var e=Array.prototype.slice.call(arguments),t=e.length-1,r=e[t],o=r.split("?"),n;e[t]=o.shift();n=[e.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")];n.push.apply(n,o);return n.join("?")};o.rewriteCookieProperty=function rewriteCookieProperty(e,t,r){if(Array.isArray(e)){return e.map(function(e){return rewriteCookieProperty(e,t,r)})}return e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),function(e,r,o){var n;if(o in t){n=t[o]}else if("*"in t){n=t["*"]}else{return e}if(n){return r+n}else{return""}})};function hasPort(e){return!!~e.indexOf(":")}},130:(e,t,r)=>{var o=e.exports,n=r(669)._extend,s=r(835).parse,i=r(933),a=r(605),c=r(211),f=r(373),u=r(257);o.Server=ProxyServer;function createRightProxy(e){return function(t){return function(r,o){var i=e==="ws"?this.wsPasses:this.webPasses,a=[].slice.call(arguments),c=a.length-1,f,u;if(typeof a[c]==="function"){u=a[c];c--}var h=t;if(!(a[c]instanceof Buffer)&&a[c]!==o){h=n({},t);n(h,a[c]);c--}if(a[c]instanceof Buffer){f=a[c]}["target","forward"].forEach(function(e){if(typeof h[e]==="string")h[e]=s(h[e])});if(!h.target&&!h.forward){return this.emit("error",new Error("Must provide a proper URL as target"))}for(var p=0;p{var o=r(605),n=r(211),s=r(773),i=r(658),a=r(382);s=Object.keys(s).map(function(e){return s[e]});var c={http:o,https:n};e.exports={deleteLength:function deleteLength(e,t,r){if((e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]){e.headers["content-length"]="0";delete e.headers["transfer-encoding"]}},timeout:function timeout(e,t,r){if(r.timeout){e.socket.setTimeout(r.timeout)}},XHeaders:function XHeaders(e,t,r){if(!r.xfwd)return;var o=e.isSpdy||i.hasEncryptedConnection(e);var n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:i.getPort(e),proto:o?"https":"http"};["for","port","proto"].forEach(function(t){e.headers["x-forwarded-"+t]=(e.headers["x-forwarded-"+t]||"")+(e.headers["x-forwarded-"+t]?",":"")+n[t]});e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers["host"]||""},stream:function stream(e,t,r,o,n,f){n.emit("start",e,t,r.target||r.forward);var u=r.followRedirects?a:c;var h=u.http;var p=u.https;if(r.forward){var d=(r.forward.protocol==="https:"?p:h).request(i.setupOutgoing(r.ssl||{},r,e,"forward"));var l=createErrorHandler(d,r.forward);e.on("error",l);d.on("error",l);(r.buffer||e).pipe(d);if(!r.target){return t.end()}}var v=(r.target.protocol==="https:"?p:h).request(i.setupOutgoing(r.ssl||{},r,e));v.on("socket",function(o){if(n&&!v.getHeader("expect")){n.emit("proxyReq",v,e,t,r)}});if(r.proxyTimeout){v.setTimeout(r.proxyTimeout,function(){v.abort()})}e.on("aborted",function(){v.abort()});var m=createErrorHandler(v,r.target);e.on("error",m);v.on("error",m);function createErrorHandler(r,o){return function proxyError(s){if(e.socket.destroyed&&s.code==="ECONNRESET"){n.emit("econnreset",s,e,t,o);return r.abort()}if(f){f(s,e,t,o)}else{n.emit("error",s,e,t,o)}}}(r.buffer||e).pipe(v);v.on("response",function(o){if(n){n.emit("proxyRes",o,e,t)}if(!t.headersSent&&!r.selfHandleResponse){for(var i=0;i{var o=r(835),n=r(658);var s=/^201|30(1|2|7|8)$/;e.exports={removeChunked:function removeChunked(e,t,r){if(e.httpVersion==="1.0"){delete r.headers["transfer-encoding"]}},setConnection:function setConnection(e,t,r){if(e.httpVersion==="1.0"){r.headers.connection=e.headers.connection||"close"}else if(e.httpVersion!=="2.0"&&!r.headers.connection){r.headers.connection=e.headers.connection||"keep-alive"}},setRedirectHostRewrite:function setRedirectHostRewrite(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers["location"]&&s.test(r.statusCode)){var i=o.parse(n.target);var a=o.parse(r.headers["location"]);if(i.host!=a.host){return}if(n.hostRewrite){a.host=n.hostRewrite}else if(n.autoRewrite){a.host=e.headers["host"]}if(n.protocolRewrite){a.protocol=n.protocolRewrite}r.headers["location"]=a.format()}},writeHeaders:function writeHeaders(e,t,r,o){var s=o.cookieDomainRewrite,i=o.cookiePathRewrite,a=o.preserveHeaderKeyCase,c,f=function(e,r){if(r==undefined)return;if(s&&e.toLowerCase()==="set-cookie"){r=n.rewriteCookieProperty(r,s,"domain")}if(i&&e.toLowerCase()==="set-cookie"){r=n.rewriteCookieProperty(r,i,"path")}t.setHeader(String(e).trim(),r)};if(typeof s==="string"){s={"*":s}}if(typeof i==="string"){i={"*":i}}if(a&&r.rawHeaders!=undefined){c={};for(var u=0;u{var o=r(605),n=r(211),s=r(658);e.exports={checkMethodAndHeader:function checkMethodAndHeader(e,t){if(e.method!=="GET"||!e.headers.upgrade){t.destroy();return true}if(e.headers.upgrade.toLowerCase()!=="websocket"){t.destroy();return true}},XHeaders:function XHeaders(e,t,r){if(!r.xfwd)return;var o={for:e.connection.remoteAddress||e.socket.remoteAddress,port:s.getPort(e),proto:s.hasEncryptedConnection(e)?"wss":"ws"};["for","port","proto"].forEach(function(t){e.headers["x-forwarded-"+t]=(e.headers["x-forwarded-"+t]||"")+(e.headers["x-forwarded-"+t]?",":"")+o[t]})},stream:function stream(e,t,r,i,a,c){var f=function(e,t){return Object.keys(t).reduce(function(e,r){var o=t[r];if(!Array.isArray(o)){e.push(r+": "+o);return e}for(var n=0;n{"use strict";e.exports=function required(e,t){t=t.split(":")[0];e=+e;if(!e)return false;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return false}return e!==0}},357:e=>{"use strict";e.exports=require("assert")},605:e=>{"use strict";e.exports=require("http")},211:e=>{"use strict";e.exports=require("https")},185:e=>{"use strict";e.exports=require("next/dist/compiled/debug")},413:e=>{"use strict";e.exports=require("stream")},835:e=>{"use strict";e.exports=require("url")},669:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var o=t[r]={exports:{}};var n=true;try{e[r](o,o.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}return o.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(737)})(); \ No newline at end of file diff --git a/packages/next/compiled/ignore-loader/index.js b/packages/next/compiled/ignore-loader/index.js index 10e5afe06ee78e0..9a7dd87f496e0ff 100644 --- a/packages/next/compiled/ignore-loader/index.js +++ b/packages/next/compiled/ignore-loader/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var e={223:e=>{e.exports=function(e){this.cacheable&&this.cacheable();return""}}};var r={};function __webpack_require__(_){if(r[_]){return r[_].exports}var t=r[_]={exports:{}};var a=true;try{e[_](t,t.exports,__webpack_require__);a=false}finally{if(a)delete r[_]}return t.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(223)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var e={223:e=>{e.exports=function(e){this.cacheable&&this.cacheable();return""}}};var r={};function __nccwpck_require__(_){if(r[_]){return r[_].exports}var t=r[_]={exports:{}};var a=true;try{e[_](t,t.exports,__nccwpck_require__);a=false}finally{if(a)delete r[_]}return t.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(223)})(); \ No newline at end of file diff --git a/packages/next/compiled/is-animated/index.js b/packages/next/compiled/is-animated/index.js index 4af45b443e2bc37..11d62af40582b2a 100644 --- a/packages/next/compiled/is-animated/index.js +++ b/packages/next/compiled/is-animated/index.js @@ -1 +1 @@ -module.exports=(()=>{var e={586:(e,r,t)=>{"use strict";var a=t(714);var i=t(645);var n=t(746);function isAnimated(e){if(a.isGIF(e)){return a.isAnimated(e)}if(i.isPNG(e)){return i.isAnimated(e)}if(n.isWebp(e)){return n.isAnimated(e)}return false}e.exports=isAnimated},714:(e,r)=>{"use strict";function getDataBlocksLength(e,r){var t=0;while(e[r+t]){t+=e[r+t]+1}return t+1}r.isGIF=function(e){var r=e.slice(0,3).toString("ascii");return r==="GIF"};r.isAnimated=function(e){var r,t,a;var i=0;var n=0;a=e.slice(0,3).toString("ascii");if(a!=="GIF"){return false}r=e[10]&128;t=e[10]&7;i+=6;i+=7;i+=r?3*Math.pow(2,t+1):0;while(n<2&&i1}},645:(e,r)=>{r.isPNG=function(e){var r=e.slice(0,8).toString("hex");return r==="89504e470d0a1a0a"};r.isAnimated=function(e){var r=false;var t=false;var a=false;var i=null;var n=8;while(n{r.isWebp=function(e){var r=[87,69,66,80];for(var t=0;t{var e={586:(e,r,t)=>{"use strict";var a=t(714);var i=t(645);var n=t(746);function isAnimated(e){if(a.isGIF(e)){return a.isAnimated(e)}if(i.isPNG(e)){return i.isAnimated(e)}if(n.isWebp(e)){return n.isAnimated(e)}return false}e.exports=isAnimated},714:(e,r)=>{"use strict";function getDataBlocksLength(e,r){var t=0;while(e[r+t]){t+=e[r+t]+1}return t+1}r.isGIF=function(e){var r=e.slice(0,3).toString("ascii");return r==="GIF"};r.isAnimated=function(e){var r,t,a;var i=0;var n=0;a=e.slice(0,3).toString("ascii");if(a!=="GIF"){return false}r=e[10]&128;t=e[10]&7;i+=6;i+=7;i+=r?3*Math.pow(2,t+1):0;while(n<2&&i1}},645:(e,r)=>{r.isPNG=function(e){var r=e.slice(0,8).toString("hex");return r==="89504e470d0a1a0a"};r.isAnimated=function(e){var r=false;var t=false;var a=false;var i=null;var n=8;while(n{r.isWebp=function(e){var r=[87,69,66,80];for(var t=0;t{"use strict";var r={749:(r,e,t)=>{const u=t(747);let n;function hasDockerEnv(){try{u.statSync("/.dockerenv");return true}catch(r){return false}}function hasDockerCGroup(){try{return u.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch(r){return false}}r.exports=(()=>{if(n===undefined){n=hasDockerEnv()||hasDockerCGroup()}return n})},747:r=>{r.exports=require("fs")}};var e={};function __webpack_require__(t){if(e[t]){return e[t].exports}var u=e[t]={exports:{}};var n=true;try{r[t](u,u.exports,__webpack_require__);n=false}finally{if(n)delete e[t]}return u.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(749)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var r={749:(r,e,t)=>{const u=t(747);let n;function hasDockerEnv(){try{u.statSync("/.dockerenv");return true}catch(r){return false}}function hasDockerCGroup(){try{return u.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch(r){return false}}r.exports=(()=>{if(n===undefined){n=hasDockerEnv()||hasDockerCGroup()}return n})},747:r=>{r.exports=require("fs")}};var e={};function __nccwpck_require__(t){if(e[t]){return e[t].exports}var u=e[t]={exports:{}};var n=true;try{r[t](u,u.exports,__nccwpck_require__);n=false}finally{if(n)delete e[t]}return u.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(749)})(); \ No newline at end of file diff --git a/packages/next/compiled/is-wsl/index.js b/packages/next/compiled/is-wsl/index.js index f959bb079a9c205..ae92ebe95b67eaf 100644 --- a/packages/next/compiled/is-wsl/index.js +++ b/packages/next/compiled/is-wsl/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var e={559:(e,r,t)=>{const s=t(87);const o=t(747);const _=t(1);const i=()=>{if(process.platform!=="linux"){return false}if(s.release().toLowerCase().includes("microsoft")){if(_()){return false}return true}try{return o.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!_():false}catch(e){return false}};if(process.env.__IS_WSL_TEST__){e.exports=i}else{e.exports=i()}},747:e=>{e.exports=require("fs")},1:e=>{e.exports=require("next/dist/compiled/is-docker")},87:e=>{e.exports=require("os")}};var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var s=r[t]={exports:{}};var o=true;try{e[t](s,s.exports,__webpack_require__);o=false}finally{if(o)delete r[t]}return s.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(559)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var e={559:(e,r,t)=>{const s=t(87);const o=t(747);const _=t(1);const i=()=>{if(process.platform!=="linux"){return false}if(s.release().toLowerCase().includes("microsoft")){if(_()){return false}return true}try{return o.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!_():false}catch(e){return false}};if(process.env.__IS_WSL_TEST__){e.exports=i}else{e.exports=i()}},747:e=>{e.exports=require("fs")},1:e=>{e.exports=require("next/dist/compiled/is-docker")},87:e=>{e.exports=require("os")}};var r={};function __nccwpck_require__(t){if(r[t]){return r[t].exports}var s=r[t]={exports:{}};var o=true;try{e[t](s,s.exports,__nccwpck_require__);o=false}finally{if(o)delete r[t]}return s.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(559)})(); \ No newline at end of file diff --git a/packages/next/compiled/json5/index.js b/packages/next/compiled/json5/index.js index 1a6917ac451048a..212fd101debe48a 100644 --- a/packages/next/compiled/json5/index.js +++ b/packages/next/compiled/json5/index.js @@ -1 +1 @@ -module.exports=(()=>{var u={946:(u,D,e)=>{const r=e(975);const F=e(230);const C={parse:r,stringify:F};u.exports=C},975:(u,D,e)=>{const r=e(685);let F;let C;let A;let t;let n;let E;let i;let a;let B;u.exports=function parse(u,D){F=String(u);C="start";A=[];t=0;n=1;E=0;i=undefined;a=undefined;B=undefined;do{i=lex();h[C]()}while(i.type!=="eof");if(typeof D==="function"){return internalize({"":B},"",D)}return B};function internalize(u,D,e){const r=u[D];if(r!=null&&typeof r==="object"){for(const u in r){const D=internalize(r,u,e);if(D===undefined){delete r[u]}else{r[u]=D}}}return e.call(u,D,r)}let s;let o;let c;let d;let f;function lex(){s="default";o="";c=false;d=1;for(;;){f=peek();const u=l[s]();if(u){return u}}}function peek(){if(F[t]){return String.fromCodePoint(F.codePointAt(t))}}function read(){const u=peek();if(u==="\n"){n++;E=0}else if(u){E+=u.length}else{E++}if(u){t+=u.length}return u}const l={default(){switch(f){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":read();return;case"/":read();s="comment";return;case undefined:read();return newToken("eof")}if(r.isSpaceSeparator(f)){read();return}return l[C]()},comment(){switch(f){case"*":read();s="multiLineComment";return;case"/":read();s="singleLineComment";return}throw invalidChar(read())},multiLineComment(){switch(f){case"*":read();s="multiLineCommentAsterisk";return;case undefined:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(f){case"*":read();return;case"/":read();s="default";return;case undefined:throw invalidChar(read())}read();s="multiLineComment"},singleLineComment(){switch(f){case"\n":case"\r":case"\u2028":case"\u2029":read();s="default";return;case undefined:read();return newToken("eof")}read()},value(){switch(f){case"{":case"[":return newToken("punctuator",read());case"n":read();literal("ull");return newToken("null",null);case"t":read();literal("rue");return newToken("boolean",true);case"f":read();literal("alse");return newToken("boolean",false);case"-":case"+":if(read()==="-"){d=-1}s="sign";return;case".":o=read();s="decimalPointLeading";return;case"0":o=read();s="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o=read();s="decimalInteger";return;case"I":read();literal("nfinity");return newToken("numeric",Infinity);case"N":read();literal("aN");return newToken("numeric",NaN);case'"':case"'":c=read()==='"';o="";s="string";return}throw invalidChar(read())},identifierNameStartEscape(){if(f!=="u"){throw invalidChar(read())}read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!r.isIdStartChar(u)){throw invalidIdentifier()}break}o+=u;s="identifierName"},identifierName(){switch(f){case"$":case"_":case"‌":case"‍":o+=read();return;case"\\":read();s="identifierNameEscape";return}if(r.isIdContinueChar(f)){o+=read();return}return newToken("identifier",o)},identifierNameEscape(){if(f!=="u"){throw invalidChar(read())}read();const u=unicodeEscape();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!r.isIdContinueChar(u)){throw invalidIdentifier()}break}o+=u;s="identifierName"},sign(){switch(f){case".":o=read();s="decimalPointLeading";return;case"0":o=read();s="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o=read();s="decimalInteger";return;case"I":read();literal("nfinity");return newToken("numeric",d*Infinity);case"N":read();literal("aN");return newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(f){case".":o+=read();s="decimalPoint";return;case"e":case"E":o+=read();s="decimalExponent";return;case"x":case"X":o+=read();s="hexadecimal";return}return newToken("numeric",d*0)},decimalInteger(){switch(f){case".":o+=read();s="decimalPoint";return;case"e":case"E":o+=read();s="decimalExponent";return}if(r.isDigit(f)){o+=read();return}return newToken("numeric",d*Number(o))},decimalPointLeading(){if(r.isDigit(f)){o+=read();s="decimalFraction";return}throw invalidChar(read())},decimalPoint(){switch(f){case"e":case"E":o+=read();s="decimalExponent";return}if(r.isDigit(f)){o+=read();s="decimalFraction";return}return newToken("numeric",d*Number(o))},decimalFraction(){switch(f){case"e":case"E":o+=read();s="decimalExponent";return}if(r.isDigit(f)){o+=read();return}return newToken("numeric",d*Number(o))},decimalExponent(){switch(f){case"+":case"-":o+=read();s="decimalExponentSign";return}if(r.isDigit(f)){o+=read();s="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentSign(){if(r.isDigit(f)){o+=read();s="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentInteger(){if(r.isDigit(f)){o+=read();return}return newToken("numeric",d*Number(o))},hexadecimal(){if(r.isHexDigit(f)){o+=read();s="hexadecimalInteger";return}throw invalidChar(read())},hexadecimalInteger(){if(r.isHexDigit(f)){o+=read();return}return newToken("numeric",d*Number(o))},string(){switch(f){case"\\":read();o+=escape();return;case'"':if(c){read();return newToken("string",o)}o+=read();return;case"'":if(!c){read();return newToken("string",o)}o+=read();return;case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(f);break;case undefined:throw invalidChar(read())}o+=read()},start(){switch(f){case"{":case"[":return newToken("punctuator",read())}s="value"},beforePropertyName(){switch(f){case"$":case"_":o=read();s="identifierName";return;case"\\":read();s="identifierNameStartEscape";return;case"}":return newToken("punctuator",read());case'"':case"'":c=read()==='"';s="string";return}if(r.isIdStartChar(f)){o+=read();s="identifierName";return}throw invalidChar(read())},afterPropertyName(){if(f===":"){return newToken("punctuator",read())}throw invalidChar(read())},beforePropertyValue(){s="value"},afterPropertyValue(){switch(f){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if(f==="]"){return newToken("punctuator",read())}s="value"},afterArrayValue(){switch(f){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(u,D){return{type:u,value:D,line:n,column:E}}function literal(u){for(const D of u){const u=peek();if(u!==D){throw invalidChar(read())}read()}}function escape(){const u=peek();switch(u){case"b":read();return"\b";case"f":read();return"\f";case"n":read();return"\n";case"r":read();return"\r";case"t":read();return"\t";case"v":read();return"\v";case"0":read();if(r.isDigit(peek())){throw invalidChar(read())}return"\0";case"x":read();return hexEscape();case"u":read();return unicodeEscape();case"\n":case"\u2028":case"\u2029":read();return"";case"\r":read();if(peek()==="\n"){read()}return"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw invalidChar(read());case undefined:throw invalidChar(read())}return read()}function hexEscape(){let u="";let D=peek();if(!r.isHexDigit(D)){throw invalidChar(read())}u+=read();D=peek();if(!r.isHexDigit(D)){throw invalidChar(read())}u+=read();return String.fromCodePoint(parseInt(u,16))}function unicodeEscape(){let u="";let D=4;while(D-- >0){const D=peek();if(!r.isHexDigit(D)){throw invalidChar(read())}u+=read()}return String.fromCodePoint(parseInt(u,16))}const h={start(){if(i.type==="eof"){throw invalidEOF()}push()},beforePropertyName(){switch(i.type){case"identifier":case"string":a=i.value;C="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF()}},afterPropertyName(){if(i.type==="eof"){throw invalidEOF()}C="beforePropertyValue"},beforePropertyValue(){if(i.type==="eof"){throw invalidEOF()}push()},beforeArrayValue(){if(i.type==="eof"){throw invalidEOF()}if(i.type==="punctuator"&&i.value==="]"){pop();return}push()},afterPropertyValue(){if(i.type==="eof"){throw invalidEOF()}switch(i.value){case",":C="beforePropertyName";return;case"}":pop()}},afterArrayValue(){if(i.type==="eof"){throw invalidEOF()}switch(i.value){case",":C="beforeArrayValue";return;case"]":pop()}},end(){}};function push(){let u;switch(i.type){case"punctuator":switch(i.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=i.value;break}if(B===undefined){B=u}else{const D=A[A.length-1];if(Array.isArray(D)){D.push(u)}else{D[a]=u}}if(u!==null&&typeof u==="object"){A.push(u);if(Array.isArray(u)){C="beforeArrayValue"}else{C="beforePropertyName"}}else{const u=A[A.length-1];if(u==null){C="end"}else if(Array.isArray(u)){C="afterArrayValue"}else{C="afterPropertyValue"}}}function pop(){A.pop();const u=A[A.length-1];if(u==null){C="end"}else if(Array.isArray(u)){C="afterArrayValue"}else{C="afterPropertyValue"}}function invalidChar(u){if(u===undefined){return syntaxError(`JSON5: invalid end of input at ${n}:${E}`)}return syntaxError(`JSON5: invalid character '${formatChar(u)}' at ${n}:${E}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${n}:${E}`)}function invalidIdentifier(){E-=5;return syntaxError(`JSON5: invalid identifier character at ${n}:${E}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u]){return D[u]}if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);D.lineNumber=n;D.columnNumber=E;return D}},230:(u,D,e)=>{const r=e(685);u.exports=function stringify(u,D,e){const F=[];let C="";let A;let t;let n="";let E;if(D!=null&&typeof D==="object"&&!Array.isArray(D)){e=D.space;E=D.quote;D=D.replacer}if(typeof D==="function"){t=D}else if(Array.isArray(D)){A=[];for(const u of D){let D;if(typeof u==="string"){D=u}else if(typeof u==="number"||u instanceof String||u instanceof Number){D=String(u)}if(D!==undefined&&A.indexOf(D)<0){A.push(D)}}}if(e instanceof Number){e=Number(e)}else if(e instanceof String){e=String(e)}if(typeof e==="number"){if(e>0){e=Math.min(10,Math.floor(e));n=" ".substr(0,e)}}else if(typeof e==="string"){n=e.substr(0,10)}return serializeProperty("",{"":u});function serializeProperty(u,D){let e=D[u];if(e!=null){if(typeof e.toJSON5==="function"){e=e.toJSON5(u)}else if(typeof e.toJSON==="function"){e=e.toJSON(u)}}if(t){e=t.call(D,u,e)}if(e instanceof Number){e=Number(e)}else if(e instanceof String){e=String(e)}else if(e instanceof Boolean){e=e.valueOf()}switch(e){case null:return"null";case true:return"true";case false:return"false"}if(typeof e==="string"){return quoteString(e,false)}if(typeof e==="number"){return String(e)}if(typeof e==="object"){return Array.isArray(e)?serializeArray(e):serializeObject(e)}return undefined}function quoteString(u){const D={"'":.1,'"':.2};const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let F="";for(let C=0;CD[u]=0){throw TypeError("Converting circular structure to JSON5")}F.push(u);let D=C;C=C+n;let e=A||Object.keys(u);let r=[];for(const D of e){const e=serializeProperty(D,u);if(e!==undefined){let u=serializeKey(D)+":";if(n!==""){u+=" "}u+=e;r.push(u)}}let t;if(r.length===0){t="{}"}else{let u;if(n===""){u=r.join(",");t="{"+u+"}"}else{let e=",\n"+C;u=r.join(e);t="{\n"+C+u+",\n"+D+"}"}}F.pop();C=D;return t}function serializeKey(u){if(u.length===0){return quoteString(u,true)}const D=String.fromCodePoint(u.codePointAt(0));if(!r.isIdStartChar(D)){return quoteString(u,true)}for(let e=D.length;e=0){throw TypeError("Converting circular structure to JSON5")}F.push(u);let D=C;C=C+n;let e=[];for(let D=0;D{u.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;u.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;u.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},685:(u,D,e)=>{const r=e(875);u.exports={isSpaceSeparator(u){return typeof u==="string"&&r.Space_Separator.test(u)},isIdStartChar(u){return typeof u==="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||r.ID_Start.test(u))},isIdContinueChar(u){return typeof u==="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u==="‌"||u==="‍"||r.ID_Continue.test(u))},isDigit(u){return typeof u==="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u==="string"&&/[0-9A-Fa-f]/.test(u)}}}};var D={};function __webpack_require__(e){if(D[e]){return D[e].exports}var r=D[e]={exports:{}};var F=true;try{u[e](r,r.exports,__webpack_require__);F=false}finally{if(F)delete D[e]}return r.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(946)})(); \ No newline at end of file +module.exports=(()=>{var u={946:(u,D,e)=>{const r=e(975);const F=e(230);const C={parse:r,stringify:F};u.exports=C},975:(u,D,e)=>{const r=e(685);let F;let C;let A;let t;let n;let E;let i;let a;let B;u.exports=function parse(u,D){F=String(u);C="start";A=[];t=0;n=1;E=0;i=undefined;a=undefined;B=undefined;do{i=lex();h[C]()}while(i.type!=="eof");if(typeof D==="function"){return internalize({"":B},"",D)}return B};function internalize(u,D,e){const r=u[D];if(r!=null&&typeof r==="object"){for(const u in r){const D=internalize(r,u,e);if(D===undefined){delete r[u]}else{r[u]=D}}}return e.call(u,D,r)}let s;let o;let c;let d;let f;function lex(){s="default";o="";c=false;d=1;for(;;){f=peek();const u=l[s]();if(u){return u}}}function peek(){if(F[t]){return String.fromCodePoint(F.codePointAt(t))}}function read(){const u=peek();if(u==="\n"){n++;E=0}else if(u){E+=u.length}else{E++}if(u){t+=u.length}return u}const l={default(){switch(f){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":read();return;case"/":read();s="comment";return;case undefined:read();return newToken("eof")}if(r.isSpaceSeparator(f)){read();return}return l[C]()},comment(){switch(f){case"*":read();s="multiLineComment";return;case"/":read();s="singleLineComment";return}throw invalidChar(read())},multiLineComment(){switch(f){case"*":read();s="multiLineCommentAsterisk";return;case undefined:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(f){case"*":read();return;case"/":read();s="default";return;case undefined:throw invalidChar(read())}read();s="multiLineComment"},singleLineComment(){switch(f){case"\n":case"\r":case"\u2028":case"\u2029":read();s="default";return;case undefined:read();return newToken("eof")}read()},value(){switch(f){case"{":case"[":return newToken("punctuator",read());case"n":read();literal("ull");return newToken("null",null);case"t":read();literal("rue");return newToken("boolean",true);case"f":read();literal("alse");return newToken("boolean",false);case"-":case"+":if(read()==="-"){d=-1}s="sign";return;case".":o=read();s="decimalPointLeading";return;case"0":o=read();s="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o=read();s="decimalInteger";return;case"I":read();literal("nfinity");return newToken("numeric",Infinity);case"N":read();literal("aN");return newToken("numeric",NaN);case'"':case"'":c=read()==='"';o="";s="string";return}throw invalidChar(read())},identifierNameStartEscape(){if(f!=="u"){throw invalidChar(read())}read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!r.isIdStartChar(u)){throw invalidIdentifier()}break}o+=u;s="identifierName"},identifierName(){switch(f){case"$":case"_":case"‌":case"‍":o+=read();return;case"\\":read();s="identifierNameEscape";return}if(r.isIdContinueChar(f)){o+=read();return}return newToken("identifier",o)},identifierNameEscape(){if(f!=="u"){throw invalidChar(read())}read();const u=unicodeEscape();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!r.isIdContinueChar(u)){throw invalidIdentifier()}break}o+=u;s="identifierName"},sign(){switch(f){case".":o=read();s="decimalPointLeading";return;case"0":o=read();s="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o=read();s="decimalInteger";return;case"I":read();literal("nfinity");return newToken("numeric",d*Infinity);case"N":read();literal("aN");return newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(f){case".":o+=read();s="decimalPoint";return;case"e":case"E":o+=read();s="decimalExponent";return;case"x":case"X":o+=read();s="hexadecimal";return}return newToken("numeric",d*0)},decimalInteger(){switch(f){case".":o+=read();s="decimalPoint";return;case"e":case"E":o+=read();s="decimalExponent";return}if(r.isDigit(f)){o+=read();return}return newToken("numeric",d*Number(o))},decimalPointLeading(){if(r.isDigit(f)){o+=read();s="decimalFraction";return}throw invalidChar(read())},decimalPoint(){switch(f){case"e":case"E":o+=read();s="decimalExponent";return}if(r.isDigit(f)){o+=read();s="decimalFraction";return}return newToken("numeric",d*Number(o))},decimalFraction(){switch(f){case"e":case"E":o+=read();s="decimalExponent";return}if(r.isDigit(f)){o+=read();return}return newToken("numeric",d*Number(o))},decimalExponent(){switch(f){case"+":case"-":o+=read();s="decimalExponentSign";return}if(r.isDigit(f)){o+=read();s="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentSign(){if(r.isDigit(f)){o+=read();s="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentInteger(){if(r.isDigit(f)){o+=read();return}return newToken("numeric",d*Number(o))},hexadecimal(){if(r.isHexDigit(f)){o+=read();s="hexadecimalInteger";return}throw invalidChar(read())},hexadecimalInteger(){if(r.isHexDigit(f)){o+=read();return}return newToken("numeric",d*Number(o))},string(){switch(f){case"\\":read();o+=escape();return;case'"':if(c){read();return newToken("string",o)}o+=read();return;case"'":if(!c){read();return newToken("string",o)}o+=read();return;case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(f);break;case undefined:throw invalidChar(read())}o+=read()},start(){switch(f){case"{":case"[":return newToken("punctuator",read())}s="value"},beforePropertyName(){switch(f){case"$":case"_":o=read();s="identifierName";return;case"\\":read();s="identifierNameStartEscape";return;case"}":return newToken("punctuator",read());case'"':case"'":c=read()==='"';s="string";return}if(r.isIdStartChar(f)){o+=read();s="identifierName";return}throw invalidChar(read())},afterPropertyName(){if(f===":"){return newToken("punctuator",read())}throw invalidChar(read())},beforePropertyValue(){s="value"},afterPropertyValue(){switch(f){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if(f==="]"){return newToken("punctuator",read())}s="value"},afterArrayValue(){switch(f){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(u,D){return{type:u,value:D,line:n,column:E}}function literal(u){for(const D of u){const u=peek();if(u!==D){throw invalidChar(read())}read()}}function escape(){const u=peek();switch(u){case"b":read();return"\b";case"f":read();return"\f";case"n":read();return"\n";case"r":read();return"\r";case"t":read();return"\t";case"v":read();return"\v";case"0":read();if(r.isDigit(peek())){throw invalidChar(read())}return"\0";case"x":read();return hexEscape();case"u":read();return unicodeEscape();case"\n":case"\u2028":case"\u2029":read();return"";case"\r":read();if(peek()==="\n"){read()}return"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw invalidChar(read());case undefined:throw invalidChar(read())}return read()}function hexEscape(){let u="";let D=peek();if(!r.isHexDigit(D)){throw invalidChar(read())}u+=read();D=peek();if(!r.isHexDigit(D)){throw invalidChar(read())}u+=read();return String.fromCodePoint(parseInt(u,16))}function unicodeEscape(){let u="";let D=4;while(D-- >0){const D=peek();if(!r.isHexDigit(D)){throw invalidChar(read())}u+=read()}return String.fromCodePoint(parseInt(u,16))}const h={start(){if(i.type==="eof"){throw invalidEOF()}push()},beforePropertyName(){switch(i.type){case"identifier":case"string":a=i.value;C="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF()}},afterPropertyName(){if(i.type==="eof"){throw invalidEOF()}C="beforePropertyValue"},beforePropertyValue(){if(i.type==="eof"){throw invalidEOF()}push()},beforeArrayValue(){if(i.type==="eof"){throw invalidEOF()}if(i.type==="punctuator"&&i.value==="]"){pop();return}push()},afterPropertyValue(){if(i.type==="eof"){throw invalidEOF()}switch(i.value){case",":C="beforePropertyName";return;case"}":pop()}},afterArrayValue(){if(i.type==="eof"){throw invalidEOF()}switch(i.value){case",":C="beforeArrayValue";return;case"]":pop()}},end(){}};function push(){let u;switch(i.type){case"punctuator":switch(i.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=i.value;break}if(B===undefined){B=u}else{const D=A[A.length-1];if(Array.isArray(D)){D.push(u)}else{D[a]=u}}if(u!==null&&typeof u==="object"){A.push(u);if(Array.isArray(u)){C="beforeArrayValue"}else{C="beforePropertyName"}}else{const u=A[A.length-1];if(u==null){C="end"}else if(Array.isArray(u)){C="afterArrayValue"}else{C="afterPropertyValue"}}}function pop(){A.pop();const u=A[A.length-1];if(u==null){C="end"}else if(Array.isArray(u)){C="afterArrayValue"}else{C="afterPropertyValue"}}function invalidChar(u){if(u===undefined){return syntaxError(`JSON5: invalid end of input at ${n}:${E}`)}return syntaxError(`JSON5: invalid character '${formatChar(u)}' at ${n}:${E}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${n}:${E}`)}function invalidIdentifier(){E-=5;return syntaxError(`JSON5: invalid identifier character at ${n}:${E}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u]){return D[u]}if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);D.lineNumber=n;D.columnNumber=E;return D}},230:(u,D,e)=>{const r=e(685);u.exports=function stringify(u,D,e){const F=[];let C="";let A;let t;let n="";let E;if(D!=null&&typeof D==="object"&&!Array.isArray(D)){e=D.space;E=D.quote;D=D.replacer}if(typeof D==="function"){t=D}else if(Array.isArray(D)){A=[];for(const u of D){let D;if(typeof u==="string"){D=u}else if(typeof u==="number"||u instanceof String||u instanceof Number){D=String(u)}if(D!==undefined&&A.indexOf(D)<0){A.push(D)}}}if(e instanceof Number){e=Number(e)}else if(e instanceof String){e=String(e)}if(typeof e==="number"){if(e>0){e=Math.min(10,Math.floor(e));n=" ".substr(0,e)}}else if(typeof e==="string"){n=e.substr(0,10)}return serializeProperty("",{"":u});function serializeProperty(u,D){let e=D[u];if(e!=null){if(typeof e.toJSON5==="function"){e=e.toJSON5(u)}else if(typeof e.toJSON==="function"){e=e.toJSON(u)}}if(t){e=t.call(D,u,e)}if(e instanceof Number){e=Number(e)}else if(e instanceof String){e=String(e)}else if(e instanceof Boolean){e=e.valueOf()}switch(e){case null:return"null";case true:return"true";case false:return"false"}if(typeof e==="string"){return quoteString(e,false)}if(typeof e==="number"){return String(e)}if(typeof e==="object"){return Array.isArray(e)?serializeArray(e):serializeObject(e)}return undefined}function quoteString(u){const D={"'":.1,'"':.2};const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let F="";for(let C=0;CD[u]=0){throw TypeError("Converting circular structure to JSON5")}F.push(u);let D=C;C=C+n;let e=A||Object.keys(u);let r=[];for(const D of e){const e=serializeProperty(D,u);if(e!==undefined){let u=serializeKey(D)+":";if(n!==""){u+=" "}u+=e;r.push(u)}}let t;if(r.length===0){t="{}"}else{let u;if(n===""){u=r.join(",");t="{"+u+"}"}else{let e=",\n"+C;u=r.join(e);t="{\n"+C+u+",\n"+D+"}"}}F.pop();C=D;return t}function serializeKey(u){if(u.length===0){return quoteString(u,true)}const D=String.fromCodePoint(u.codePointAt(0));if(!r.isIdStartChar(D)){return quoteString(u,true)}for(let e=D.length;e=0){throw TypeError("Converting circular structure to JSON5")}F.push(u);let D=C;C=C+n;let e=[];for(let D=0;D{u.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;u.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;u.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},685:(u,D,e)=>{const r=e(875);u.exports={isSpaceSeparator(u){return typeof u==="string"&&r.Space_Separator.test(u)},isIdStartChar(u){return typeof u==="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||r.ID_Start.test(u))},isIdContinueChar(u){return typeof u==="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u==="‌"||u==="‍"||r.ID_Continue.test(u))},isDigit(u){return typeof u==="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u==="string"&&/[0-9A-Fa-f]/.test(u)}}}};var D={};function __nccwpck_require__(e){if(D[e]){return D[e].exports}var r=D[e]={exports:{}};var F=true;try{u[e](r,r.exports,__nccwpck_require__);F=false}finally{if(F)delete D[e]}return r.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(946)})(); \ No newline at end of file diff --git a/packages/next/compiled/jsonwebtoken/index.js b/packages/next/compiled/jsonwebtoken/index.js index 4f2a79bb08ddc94..9aec8fbc179a69e 100644 --- a/packages/next/compiled/jsonwebtoken/index.js +++ b/packages/next/compiled/jsonwebtoken/index.js @@ -1 +1 @@ -module.exports=(()=>{var e={68:(e,r,t)=>{"use strict";var n=t(293).Buffer;var i=t(293).SlowBuffer;e.exports=bufferEq;function bufferEq(e,r){if(!n.isBuffer(e)||!n.isBuffer(r)){return false}if(e.length!==r.length){return false}var t=0;for(var i=0;i{"use strict";var n=t(615).Buffer;var i=t(363);var a=128,o=0,s=32,u=16,f=2,c=u|s|o<<6,p=f|o<<6;function base64Url(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function signatureAsBuffer(e){if(n.isBuffer(e)){return e}else if("string"===typeof e){return n.from(e,"base64")}throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function derToJose(e,r){e=signatureAsBuffer(e);var t=i(r);var o=t+1;var s=e.length;var u=0;if(e[u++]!==c){throw new Error('Could not find expected "seq"')}var f=e[u++];if(f===(a|1)){f=e[u++]}if(s-u=a;if(i){--n}return n}function joseToDer(e,r){e=signatureAsBuffer(e);var t=i(r);var o=e.length;if(o!==t*2){throw new TypeError('"'+r+'" signatures must be "'+t*2+'" bytes, saw "'+o+'"')}var s=countPadding(e,0,t);var u=countPadding(e,t,e.length);var f=t-s;var l=t-u;var v=1+1+f+1+1+l;var y=v{"use strict";function getParamSize(e){var r=(e/8|0)+(e%8===0?0:1);return r}var r={ES256:getParamSize(256),ES384:getParamSize(384),ES512:getParamSize(521)};function getParamBytesForAlg(e){var t=r[e];if(t){return t}throw new Error('Unknown algorithm "'+e+'"')}e.exports=getParamBytesForAlg},516:(e,r,t)=>{var n=t(641);e.exports=function(e,r){r=r||{};var t=n.decode(e,r);if(!t){return null}var i=t.payload;if(typeof i==="string"){try{var a=JSON.parse(i);if(a!==null&&typeof a==="object"){i=a}}catch(e){}}if(r.complete===true){return{header:t.header,payload:i,signature:t.signature}}return i}},667:(e,r,t)=>{e.exports={decode:t(516),verify:t(452),sign:t(596),JsonWebTokenError:t(86),NotBeforeError:t(384),TokenExpiredError:t(874)}},86:e=>{var r=function(e,r){Error.call(this,e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="JsonWebTokenError";this.message=e;if(r)this.inner=r};r.prototype=Object.create(Error.prototype);r.prototype.constructor=r;e.exports=r},384:(e,r,t)=>{var n=t(86);var i=function(e,r){n.call(this,e);this.name="NotBeforeError";this.date=r};i.prototype=Object.create(n.prototype);i.prototype.constructor=i;e.exports=i},874:(e,r,t)=>{var n=t(86);var i=function(e,r){n.call(this,e);this.name="TokenExpiredError";this.expiredAt=r};i.prototype=Object.create(n.prototype);i.prototype.constructor=i;e.exports=i},347:(e,r,t)=>{var n=t(519);e.exports=n.satisfies(process.version,"^6.12.0 || >=8.0.0")},527:(e,r,t)=>{var n=t(4);e.exports=function(e,r){var t=r||Math.floor(Date.now()/1e3);if(typeof e==="string"){var i=n(e);if(typeof i==="undefined"){return}return Math.floor(t+i/1e3)}else if(typeof e==="number"){return t+e}else{return}}},596:(e,r,t)=>{var n=t(527);var i=t(347);var a=t(641);var o=t(282);var s=t(170);var u=t(117);var f=t(598);var c=t(952);var p=t(95);var l=t(433);var v=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];if(i){v.splice(3,0,"PS256","PS384","PS512")}var y={expiresIn:{isValid:function(e){return u(e)||p(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return u(e)||p(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return p(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:o.bind(null,v),message:'"algorithm" must be a valid string enum value'},header:{isValid:c,message:'"header" must be an object'},encoding:{isValid:p,message:'"encoding" must be a string'},issuer:{isValid:p,message:'"issuer" must be a string'},subject:{isValid:p,message:'"subject" must be a string'},jwtid:{isValid:p,message:'"jwtid" must be a string'},noTimestamp:{isValid:s,message:'"noTimestamp" must be a boolean'},keyid:{isValid:p,message:'"keyid" must be a string'},mutatePayload:{isValid:s,message:'"mutatePayload" must be a boolean'}};var d={iat:{isValid:f,message:'"iat" should be a number of seconds'},exp:{isValid:f,message:'"exp" should be a number of seconds'},nbf:{isValid:f,message:'"nbf" should be a number of seconds'}};function validate(e,r,t,n){if(!c(t)){throw new Error('Expected "'+n+'" to be a plain object.')}Object.keys(t).forEach(function(i){var a=e[i];if(!a){if(!r){throw new Error('"'+i+'" is not allowed in "'+n+'"')}return}if(!a.isValid(t[i])){throw new Error(a.message)}})}function validateOptions(e){return validate(y,false,e,"options")}function validatePayload(e){return validate(d,true,e,"payload")}var b={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"};var h=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,r,t,i){if(typeof t==="function"){i=t;t={}}else{t=t||{}}var o=typeof e==="object"&&!Buffer.isBuffer(e);var s=Object.assign({alg:t.algorithm||"HS256",typ:o?"JWT":undefined,kid:t.keyid},t.header);function failure(e){if(i){return i(e)}throw e}if(!r&&t.algorithm!=="none"){return failure(new Error("secretOrPrivateKey must have a value"))}if(typeof e==="undefined"){return failure(new Error("payload is required"))}else if(o){try{validatePayload(e)}catch(e){return failure(e)}if(!t.mutatePayload){e=Object.assign({},e)}}else{var u=h.filter(function(e){return typeof t[e]!=="undefined"});if(u.length>0){return failure(new Error("invalid "+u.join(",")+" option for "+typeof e+" payload"))}}if(typeof e.exp!=="undefined"&&typeof t.expiresIn!=="undefined"){return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'))}if(typeof e.nbf!=="undefined"&&typeof t.notBefore!=="undefined"){return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'))}try{validateOptions(t)}catch(e){return failure(e)}var f=e.iat||Math.floor(Date.now()/1e3);if(t.noTimestamp){delete e.iat}else if(o){e.iat=f}if(typeof t.notBefore!=="undefined"){try{e.nbf=n(t.notBefore,f)}catch(e){return failure(e)}if(typeof e.nbf==="undefined"){return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}}if(typeof t.expiresIn!=="undefined"&&typeof e==="object"){try{e.exp=n(t.expiresIn,f)}catch(e){return failure(e)}if(typeof e.exp==="undefined"){return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}}Object.keys(b).forEach(function(r){var n=b[r];if(typeof t[r]!=="undefined"){if(typeof e[n]!=="undefined"){return failure(new Error('Bad "options.'+r+'" option. The payload already has an "'+n+'" property.'))}e[n]=t[r]}});var c=t.encoding||"utf8";if(typeof i==="function"){i=i&&l(i);a.createSign({header:s,privateKey:r,payload:e,encoding:c}).once("error",i).once("done",function(e){i(null,e)})}else{return a.sign({header:s,payload:e,secret:r,encoding:c})}}},452:(e,r,t)=>{var n=t(86);var i=t(384);var a=t(874);var o=t(516);var s=t(527);var u=t(347);var f=t(641);var c=["RS256","RS384","RS512","ES256","ES384","ES512"];var p=["RS256","RS384","RS512"];var l=["HS256","HS384","HS512"];if(u){c.splice(3,0,"PS256","PS384","PS512");p.splice(3,0,"PS256","PS384","PS512")}e.exports=function(e,r,t,u){if(typeof t==="function"&&!u){u=t;t={}}if(!t){t={}}t=Object.assign({},t);var v;if(u){v=u}else{v=function(e,r){if(e)throw e;return r}}if(t.clockTimestamp&&typeof t.clockTimestamp!=="number"){return v(new n("clockTimestamp must be a number"))}if(t.nonce!==undefined&&(typeof t.nonce!=="string"||t.nonce.trim()==="")){return v(new n("nonce must be a non-empty string"))}var y=t.clockTimestamp||Math.floor(Date.now()/1e3);if(!e){return v(new n("jwt must be provided"))}if(typeof e!=="string"){return v(new n("jwt must be a string"))}var d=e.split(".");if(d.length!==3){return v(new n("jwt malformed"))}var b;try{b=o(e,{complete:true})}catch(e){return v(e)}if(!b){return v(new n("invalid token"))}var h=b.header;var g;if(typeof r==="function"){if(!u){return v(new n("verify must be called asynchronous if secret or public key is provided as a callback"))}g=r}else{g=function(e,t){return t(null,r)}}return g(h,function(r,o){if(r){return v(new n("error in secret or public key callback: "+r.message))}var u=d[2].trim()!=="";if(!u&&o){return v(new n("jwt signature is required"))}if(u&&!o){return v(new n("secret or public key must be provided"))}if(!u&&!t.algorithms){t.algorithms=["none"]}if(!t.algorithms){t.algorithms=~o.toString().indexOf("BEGIN CERTIFICATE")||~o.toString().indexOf("BEGIN PUBLIC KEY")?c:~o.toString().indexOf("BEGIN RSA PUBLIC KEY")?p:l}if(!~t.algorithms.indexOf(b.header.alg)){return v(new n("invalid algorithm"))}var g;try{g=f.verify(e,b.header.alg,o)}catch(e){return v(e)}if(!g){return v(new n("invalid signature"))}var m=b.payload;if(typeof m.nbf!=="undefined"&&!t.ignoreNotBefore){if(typeof m.nbf!=="number"){return v(new n("invalid nbf value"))}if(m.nbf>y+(t.clockTolerance||0)){return v(new i("jwt not active",new Date(m.nbf*1e3)))}}if(typeof m.exp!=="undefined"&&!t.ignoreExpiration){if(typeof m.exp!=="number"){return v(new n("invalid exp value"))}if(y>=m.exp+(t.clockTolerance||0)){return v(new a("jwt expired",new Date(m.exp*1e3)))}}if(t.audience){var S=Array.isArray(t.audience)?t.audience:[t.audience];var w=Array.isArray(m.aud)?m.aud:[m.aud];var j=w.some(function(e){return S.some(function(r){return r instanceof RegExp?r.test(e):r===e})});if(!j){return v(new n("jwt audience invalid. expected: "+S.join(" or ")))}}if(t.issuer){var x=typeof t.issuer==="string"&&m.iss!==t.issuer||Array.isArray(t.issuer)&&t.issuer.indexOf(m.iss)===-1;if(x){return v(new n("jwt issuer invalid. expected: "+t.issuer))}}if(t.subject){if(m.sub!==t.subject){return v(new n("jwt subject invalid. expected: "+t.subject))}}if(t.jwtid){if(m.jti!==t.jwtid){return v(new n("jwt jwtid invalid. expected: "+t.jwtid))}}if(t.nonce){if(m.nonce!==t.nonce){return v(new n("jwt nonce invalid. expected: "+t.nonce))}}if(t.maxAge){if(typeof m.iat!=="number"){return v(new n("iat required when maxAge is specified"))}var E=s(t.maxAge,m.iat);if(typeof E==="undefined"){return v(new n('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(y>=E+(t.clockTolerance||0)){return v(new a("maxAge exceeded",new Date(E*1e3)))}}if(t.complete===true){var O=b.signature;return v(null,{header:h,payload:m,signature:O})}return v(null,m)})}},350:(e,r,t)=>{var n=t(68);var i=t(615).Buffer;var a=t(417);var o=t(175);var s=t(669);var u='"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".';var f="secret must be a string or buffer";var c="key must be a string or a buffer";var p="key must be a string, a buffer or an object";var l=typeof a.createPublicKey==="function";if(l){c+=" or a KeyObject";f+="or a KeyObject"}function checkIsPublicKey(e){if(i.isBuffer(e)){return}if(typeof e==="string"){return}if(!l){throw typeError(c)}if(typeof e!=="object"){throw typeError(c)}if(typeof e.type!=="string"){throw typeError(c)}if(typeof e.asymmetricKeyType!=="string"){throw typeError(c)}if(typeof e.export!=="function"){throw typeError(c)}}function checkIsPrivateKey(e){if(i.isBuffer(e)){return}if(typeof e==="string"){return}if(typeof e==="object"){return}throw typeError(p)}function checkIsSecretKey(e){if(i.isBuffer(e)){return}if(typeof e==="string"){return e}if(!l){throw typeError(f)}if(typeof e!=="object"){throw typeError(f)}if(e.type!=="secret"){throw typeError(f)}if(typeof e.export!=="function"){throw typeError(f)}}function fromBase64(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function toBase64(e){e=e.toString();var r=4-e.length%4;if(r!==4){for(var t=0;t{var n=t(921);var i=t(716);var a=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];r.ALGORITHMS=a;r.sign=n.sign;r.verify=i.verify;r.decode=i.decode;r.isValid=i.isValid;r.createSign=function createSign(e){return new n(e)};r.createVerify=function createVerify(e){return new i(e)}},423:(e,r,t)=>{var n=t(615).Buffer;var i=t(413);var a=t(669);function DataStream(e){this.buffer=null;this.writable=true;this.readable=true;if(!e){this.buffer=n.alloc(0);return this}if(typeof e.pipe==="function"){this.buffer=n.alloc(0);e.pipe(this);return this}if(e.length||typeof e==="object"){this.buffer=e;this.writable=false;process.nextTick(function(){this.emit("end",e);this.readable=false;this.emit("close")}.bind(this));return this}throw new TypeError("Unexpected data type ("+typeof e+")")}a.inherits(DataStream,i);DataStream.prototype.write=function write(e){this.buffer=n.concat([this.buffer,n.from(e)]);this.emit("data",e)};DataStream.prototype.end=function end(e){if(e)this.write(e);this.emit("end",e);this.emit("close");this.writable=false;this.readable=false};e.exports=DataStream},921:(e,r,t)=>{var n=t(615).Buffer;var i=t(423);var a=t(350);var o=t(413);var s=t(29);var u=t(669);function base64url(e,r){return n.from(e,r).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function jwsSecuredInput(e,r,t){t=t||"utf8";var n=base64url(s(e),"binary");var i=base64url(s(r),t);return u.format("%s.%s",n,i)}function jwsSign(e){var r=e.header;var t=e.payload;var n=e.secret||e.privateKey;var i=e.encoding;var o=a(r.alg);var s=jwsSecuredInput(r,t,i);var f=o.sign(s,n);return u.format("%s.%s",s,f)}function SignStream(e){var r=e.secret||e.privateKey||e.key;var t=new i(r);this.readable=true;this.header=e.header;this.encoding=e.encoding;this.secret=this.privateKey=this.key=t;this.payload=new i(e.payload);this.secret.once("close",function(){if(!this.payload.writable&&this.readable)this.sign()}.bind(this));this.payload.once("close",function(){if(!this.secret.writable&&this.readable)this.sign()}.bind(this))}u.inherits(SignStream,o);SignStream.prototype.sign=function sign(){try{var e=jwsSign({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});this.emit("done",e);this.emit("data",e);this.emit("end");this.readable=false;return e}catch(e){this.readable=false;this.emit("error",e);this.emit("close")}};SignStream.sign=jwsSign;e.exports=SignStream},29:(e,r,t)=>{var n=t(293).Buffer;e.exports=function toString(e){if(typeof e==="string")return e;if(typeof e==="number"||n.isBuffer(e))return e.toString();return JSON.stringify(e)}},716:(e,r,t)=>{var n=t(615).Buffer;var i=t(423);var a=t(350);var o=t(413);var s=t(29);var u=t(669);var f=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function safeJsonParse(e){if(isObject(e))return e;try{return JSON.parse(e)}catch(e){return undefined}}function headerFromJWS(e){var r=e.split(".",1)[0];return safeJsonParse(n.from(r,"base64").toString("binary"))}function securedInputFromJWS(e){return e.split(".",2).join(".")}function signatureFromJWS(e){return e.split(".")[2]}function payloadFromJWS(e,r){r=r||"utf8";var t=e.split(".")[1];return n.from(t,"base64").toString(r)}function isValidJws(e){return f.test(e)&&!!headerFromJWS(e)}function jwsVerify(e,r,t){if(!r){var n=new Error("Missing algorithm parameter for jws.verify");n.code="MISSING_ALGORITHM";throw n}e=s(e);var i=signatureFromJWS(e);var o=securedInputFromJWS(e);var u=a(r);return u.verify(o,i,t)}function jwsDecode(e,r){r=r||{};e=s(e);if(!isValidJws(e))return null;var t=headerFromJWS(e);if(!t)return null;var n=payloadFromJWS(e);if(t.typ==="JWT"||r.json)n=JSON.parse(n,r.encoding);return{header:t,payload:n,signature:signatureFromJWS(e)}}function VerifyStream(e){e=e||{};var r=e.secret||e.publicKey||e.key;var t=new i(r);this.readable=true;this.algorithm=e.algorithm;this.encoding=e.encoding;this.secret=this.publicKey=this.key=t;this.signature=new i(e.signature);this.secret.once("close",function(){if(!this.signature.writable&&this.readable)this.verify()}.bind(this));this.signature.once("close",function(){if(!this.secret.writable&&this.readable)this.verify()}.bind(this))}u.inherits(VerifyStream,o);VerifyStream.prototype.verify=function verify(){try{var e=jwsVerify(this.signature.buffer,this.algorithm,this.key.buffer);var r=jwsDecode(this.signature.buffer,this.encoding);this.emit("done",e,r);this.emit("data",e);this.emit("end");this.readable=false;return e}catch(e){this.readable=false;this.emit("error",e);this.emit("close")}};VerifyStream.decode=jwsDecode;VerifyStream.isValid=isValidJws;VerifyStream.verify=jwsVerify;e.exports=VerifyStream},282:e=>{var r=1/0,t=9007199254740991,n=1.7976931348623157e308,i=0/0;var a="[object Arguments]",o="[object Function]",s="[object GeneratorFunction]",u="[object String]",f="[object Symbol]";var c=/^\s+|\s+$/g;var p=/^[-+]0x[0-9a-f]+$/i;var l=/^0b[01]+$/i;var v=/^0o[0-7]+$/i;var y=/^(?:0|[1-9]\d*)$/;var d=parseInt;function arrayMap(e,r){var t=-1,n=e?e.length:0,i=Array(n);while(++t-1&&e%1==0&&e-1:!!i&&baseIndexOf(e,r,t)>-1}function isArguments(e){return isArrayLikeObject(e)&&h.call(e,"callee")&&(!m.call(e,"callee")||g.call(e)==a)}var j=Array.isArray;function isArrayLike(e){return e!=null&&isLength(e.length)&&!isFunction(e)}function isArrayLikeObject(e){return isObjectLike(e)&&isArrayLike(e)}function isFunction(e){var r=isObject(e)?g.call(e):"";return r==o||r==s}function isLength(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=t}function isObject(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function isObjectLike(e){return!!e&&typeof e=="object"}function isString(e){return typeof e=="string"||!j(e)&&isObjectLike(e)&&g.call(e)==u}function isSymbol(e){return typeof e=="symbol"||isObjectLike(e)&&g.call(e)==f}function toFinite(e){if(!e){return e===0?e:0}e=toNumber(e);if(e===r||e===-r){var t=e<0?-1:1;return t*n}return e===e?e:0}function toInteger(e){var r=toFinite(e),t=r%1;return r===r?t?r-t:r:0}function toNumber(e){if(typeof e=="number"){return e}if(isSymbol(e)){return i}if(isObject(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=isObject(r)?r+"":r}if(typeof e!="string"){return e===0?e:+e}e=e.replace(c,"");var t=l.test(e);return t||v.test(e)?d(e.slice(2),t?2:8):p.test(e)?i:+e}function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}function values(e){return e?baseValues(e,keys(e)):[]}e.exports=includes},170:e=>{var r="[object Boolean]";var t=Object.prototype;var n=t.toString;function isBoolean(e){return e===true||e===false||isObjectLike(e)&&n.call(e)==r}function isObjectLike(e){return!!e&&typeof e=="object"}e.exports=isBoolean},117:e=>{var r=1/0,t=1.7976931348623157e308,n=0/0;var i="[object Symbol]";var a=/^\s+|\s+$/g;var o=/^[-+]0x[0-9a-f]+$/i;var s=/^0b[01]+$/i;var u=/^0o[0-7]+$/i;var f=parseInt;var c=Object.prototype;var p=c.toString;function isInteger(e){return typeof e=="number"&&e==toInteger(e)}function isObject(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function isObjectLike(e){return!!e&&typeof e=="object"}function isSymbol(e){return typeof e=="symbol"||isObjectLike(e)&&p.call(e)==i}function toFinite(e){if(!e){return e===0?e:0}e=toNumber(e);if(e===r||e===-r){var n=e<0?-1:1;return n*t}return e===e?e:0}function toInteger(e){var r=toFinite(e),t=r%1;return r===r?t?r-t:r:0}function toNumber(e){if(typeof e=="number"){return e}if(isSymbol(e)){return n}if(isObject(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=isObject(r)?r+"":r}if(typeof e!="string"){return e===0?e:+e}e=e.replace(a,"");var t=s.test(e);return t||u.test(e)?f(e.slice(2),t?2:8):o.test(e)?n:+e}e.exports=isInteger},598:e=>{var r="[object Number]";var t=Object.prototype;var n=t.toString;function isObjectLike(e){return!!e&&typeof e=="object"}function isNumber(e){return typeof e=="number"||isObjectLike(e)&&n.call(e)==r}e.exports=isNumber},952:e=>{var r="[object Object]";function isHostObject(e){var r=false;if(e!=null&&typeof e.toString!="function"){try{r=!!(e+"")}catch(e){}}return r}function overArg(e,r){return function(t){return e(r(t))}}var t=Function.prototype,n=Object.prototype;var i=t.toString;var a=n.hasOwnProperty;var o=i.call(Object);var s=n.toString;var u=overArg(Object.getPrototypeOf,Object);function isObjectLike(e){return!!e&&typeof e=="object"}function isPlainObject(e){if(!isObjectLike(e)||s.call(e)!=r||isHostObject(e)){return false}var t=u(e);if(t===null){return true}var n=a.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&i.call(n)==o}e.exports=isPlainObject},95:e=>{var r="[object String]";var t=Object.prototype;var n=t.toString;var i=Array.isArray;function isObjectLike(e){return!!e&&typeof e=="object"}function isString(e){return typeof e=="string"||!i(e)&&isObjectLike(e)&&n.call(e)==r}e.exports=isString},433:e=>{var r="Expected a function";var t=1/0,n=1.7976931348623157e308,i=0/0;var a="[object Symbol]";var o=/^\s+|\s+$/g;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var f=/^0o[0-7]+$/i;var c=parseInt;var p=Object.prototype;var l=p.toString;function before(e,t){var n;if(typeof t!="function"){throw new TypeError(r)}e=toInteger(e);return function(){if(--e>0){n=t.apply(this,arguments)}if(e<=1){t=undefined}return n}}function once(e){return before(2,e)}function isObject(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function isObjectLike(e){return!!e&&typeof e=="object"}function isSymbol(e){return typeof e=="symbol"||isObjectLike(e)&&l.call(e)==a}function toFinite(e){if(!e){return e===0?e:0}e=toNumber(e);if(e===t||e===-t){var r=e<0?-1:1;return r*n}return e===e?e:0}function toInteger(e){var r=toFinite(e),t=r%1;return r===r?t?r-t:r:0}function toNumber(e){if(typeof e=="number"){return e}if(isSymbol(e)){return i}if(isObject(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=isObject(r)?r+"":r}if(typeof e!="string"){return e===0?e:+e}e=e.replace(o,"");var t=u.test(e);return t||f.test(e)?c(e.slice(2),t?2:8):s.test(e)?i:+e}e.exports=once},4:e=>{var r=1e3;var t=r*60;var n=t*60;var i=n*24;var a=i*7;var o=i*365.25;e.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0){return parse(e)}else if(t==="number"&&isFinite(e)){return r.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s){return}var u=parseFloat(s[1]);var f=(s[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*a;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var a=Math.abs(e);if(a>=i){return Math.round(e/i)+"d"}if(a>=n){return Math.round(e/n)+"h"}if(a>=t){return Math.round(e/t)+"m"}if(a>=r){return Math.round(e/r)+"s"}return e+"ms"}function fmtLong(e){var a=Math.abs(e);if(a>=i){return plural(e,a,i,"day")}if(a>=n){return plural(e,a,n,"hour")}if(a>=t){return plural(e,a,t,"minute")}if(a>=r){return plural(e,a,r,"second")}return e+" ms"}function plural(e,r,t,n){var i=r>=t*1.5;return Math.round(e/t)+" "+n+(i?"s":"")}},615:(e,r,t)=>{var n=t(293);var i=n.Buffer;function copyProps(e,r){for(var t in e){r[t]=e[t]}}if(i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow){e.exports=n}else{copyProps(n,r);r.Buffer=SafeBuffer}function SafeBuffer(e,r,t){return i(e,r,t)}SafeBuffer.prototype=Object.create(i.prototype);copyProps(i,SafeBuffer);SafeBuffer.from=function(e,r,t){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return i(e,r,t)};SafeBuffer.alloc=function(e,r,t){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var n=i(e);if(r!==undefined){if(typeof t==="string"){n.fill(r,t)}else{n.fill(r)}}else{n.fill(0)}return n};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(e)}},293:e=>{"use strict";e.exports=require("buffer")},417:e=>{"use strict";e.exports=require("crypto")},519:e=>{"use strict";e.exports=require("next/dist/compiled/semver")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}};var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var n=r[t]={exports:{}};var i=true;try{e[t](n,n.exports,__webpack_require__);i=false}finally{if(i)delete r[t]}return n.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(667)})(); \ No newline at end of file +module.exports=(()=>{var e={68:(e,r,t)=>{"use strict";var n=t(293).Buffer;var i=t(293).SlowBuffer;e.exports=bufferEq;function bufferEq(e,r){if(!n.isBuffer(e)||!n.isBuffer(r)){return false}if(e.length!==r.length){return false}var t=0;for(var i=0;i{"use strict";var n=t(615).Buffer;var i=t(363);var a=128,o=0,s=32,u=16,f=2,c=u|s|o<<6,p=f|o<<6;function base64Url(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function signatureAsBuffer(e){if(n.isBuffer(e)){return e}else if("string"===typeof e){return n.from(e,"base64")}throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function derToJose(e,r){e=signatureAsBuffer(e);var t=i(r);var o=t+1;var s=e.length;var u=0;if(e[u++]!==c){throw new Error('Could not find expected "seq"')}var f=e[u++];if(f===(a|1)){f=e[u++]}if(s-u=a;if(i){--n}return n}function joseToDer(e,r){e=signatureAsBuffer(e);var t=i(r);var o=e.length;if(o!==t*2){throw new TypeError('"'+r+'" signatures must be "'+t*2+'" bytes, saw "'+o+'"')}var s=countPadding(e,0,t);var u=countPadding(e,t,e.length);var f=t-s;var l=t-u;var v=1+1+f+1+1+l;var y=v{"use strict";function getParamSize(e){var r=(e/8|0)+(e%8===0?0:1);return r}var r={ES256:getParamSize(256),ES384:getParamSize(384),ES512:getParamSize(521)};function getParamBytesForAlg(e){var t=r[e];if(t){return t}throw new Error('Unknown algorithm "'+e+'"')}e.exports=getParamBytesForAlg},516:(e,r,t)=>{var n=t(641);e.exports=function(e,r){r=r||{};var t=n.decode(e,r);if(!t){return null}var i=t.payload;if(typeof i==="string"){try{var a=JSON.parse(i);if(a!==null&&typeof a==="object"){i=a}}catch(e){}}if(r.complete===true){return{header:t.header,payload:i,signature:t.signature}}return i}},667:(e,r,t)=>{e.exports={decode:t(516),verify:t(452),sign:t(596),JsonWebTokenError:t(86),NotBeforeError:t(384),TokenExpiredError:t(874)}},86:e=>{var r=function(e,r){Error.call(this,e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="JsonWebTokenError";this.message=e;if(r)this.inner=r};r.prototype=Object.create(Error.prototype);r.prototype.constructor=r;e.exports=r},384:(e,r,t)=>{var n=t(86);var i=function(e,r){n.call(this,e);this.name="NotBeforeError";this.date=r};i.prototype=Object.create(n.prototype);i.prototype.constructor=i;e.exports=i},874:(e,r,t)=>{var n=t(86);var i=function(e,r){n.call(this,e);this.name="TokenExpiredError";this.expiredAt=r};i.prototype=Object.create(n.prototype);i.prototype.constructor=i;e.exports=i},347:(e,r,t)=>{var n=t(519);e.exports=n.satisfies(process.version,"^6.12.0 || >=8.0.0")},527:(e,r,t)=>{var n=t(4);e.exports=function(e,r){var t=r||Math.floor(Date.now()/1e3);if(typeof e==="string"){var i=n(e);if(typeof i==="undefined"){return}return Math.floor(t+i/1e3)}else if(typeof e==="number"){return t+e}else{return}}},596:(e,r,t)=>{var n=t(527);var i=t(347);var a=t(641);var o=t(282);var s=t(170);var u=t(117);var f=t(598);var c=t(952);var p=t(95);var l=t(433);var v=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];if(i){v.splice(3,0,"PS256","PS384","PS512")}var y={expiresIn:{isValid:function(e){return u(e)||p(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return u(e)||p(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return p(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:o.bind(null,v),message:'"algorithm" must be a valid string enum value'},header:{isValid:c,message:'"header" must be an object'},encoding:{isValid:p,message:'"encoding" must be a string'},issuer:{isValid:p,message:'"issuer" must be a string'},subject:{isValid:p,message:'"subject" must be a string'},jwtid:{isValid:p,message:'"jwtid" must be a string'},noTimestamp:{isValid:s,message:'"noTimestamp" must be a boolean'},keyid:{isValid:p,message:'"keyid" must be a string'},mutatePayload:{isValid:s,message:'"mutatePayload" must be a boolean'}};var d={iat:{isValid:f,message:'"iat" should be a number of seconds'},exp:{isValid:f,message:'"exp" should be a number of seconds'},nbf:{isValid:f,message:'"nbf" should be a number of seconds'}};function validate(e,r,t,n){if(!c(t)){throw new Error('Expected "'+n+'" to be a plain object.')}Object.keys(t).forEach(function(i){var a=e[i];if(!a){if(!r){throw new Error('"'+i+'" is not allowed in "'+n+'"')}return}if(!a.isValid(t[i])){throw new Error(a.message)}})}function validateOptions(e){return validate(y,false,e,"options")}function validatePayload(e){return validate(d,true,e,"payload")}var b={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"};var h=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,r,t,i){if(typeof t==="function"){i=t;t={}}else{t=t||{}}var o=typeof e==="object"&&!Buffer.isBuffer(e);var s=Object.assign({alg:t.algorithm||"HS256",typ:o?"JWT":undefined,kid:t.keyid},t.header);function failure(e){if(i){return i(e)}throw e}if(!r&&t.algorithm!=="none"){return failure(new Error("secretOrPrivateKey must have a value"))}if(typeof e==="undefined"){return failure(new Error("payload is required"))}else if(o){try{validatePayload(e)}catch(e){return failure(e)}if(!t.mutatePayload){e=Object.assign({},e)}}else{var u=h.filter(function(e){return typeof t[e]!=="undefined"});if(u.length>0){return failure(new Error("invalid "+u.join(",")+" option for "+typeof e+" payload"))}}if(typeof e.exp!=="undefined"&&typeof t.expiresIn!=="undefined"){return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'))}if(typeof e.nbf!=="undefined"&&typeof t.notBefore!=="undefined"){return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'))}try{validateOptions(t)}catch(e){return failure(e)}var f=e.iat||Math.floor(Date.now()/1e3);if(t.noTimestamp){delete e.iat}else if(o){e.iat=f}if(typeof t.notBefore!=="undefined"){try{e.nbf=n(t.notBefore,f)}catch(e){return failure(e)}if(typeof e.nbf==="undefined"){return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}}if(typeof t.expiresIn!=="undefined"&&typeof e==="object"){try{e.exp=n(t.expiresIn,f)}catch(e){return failure(e)}if(typeof e.exp==="undefined"){return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}}Object.keys(b).forEach(function(r){var n=b[r];if(typeof t[r]!=="undefined"){if(typeof e[n]!=="undefined"){return failure(new Error('Bad "options.'+r+'" option. The payload already has an "'+n+'" property.'))}e[n]=t[r]}});var c=t.encoding||"utf8";if(typeof i==="function"){i=i&&l(i);a.createSign({header:s,privateKey:r,payload:e,encoding:c}).once("error",i).once("done",function(e){i(null,e)})}else{return a.sign({header:s,payload:e,secret:r,encoding:c})}}},452:(e,r,t)=>{var n=t(86);var i=t(384);var a=t(874);var o=t(516);var s=t(527);var u=t(347);var f=t(641);var c=["RS256","RS384","RS512","ES256","ES384","ES512"];var p=["RS256","RS384","RS512"];var l=["HS256","HS384","HS512"];if(u){c.splice(3,0,"PS256","PS384","PS512");p.splice(3,0,"PS256","PS384","PS512")}e.exports=function(e,r,t,u){if(typeof t==="function"&&!u){u=t;t={}}if(!t){t={}}t=Object.assign({},t);var v;if(u){v=u}else{v=function(e,r){if(e)throw e;return r}}if(t.clockTimestamp&&typeof t.clockTimestamp!=="number"){return v(new n("clockTimestamp must be a number"))}if(t.nonce!==undefined&&(typeof t.nonce!=="string"||t.nonce.trim()==="")){return v(new n("nonce must be a non-empty string"))}var y=t.clockTimestamp||Math.floor(Date.now()/1e3);if(!e){return v(new n("jwt must be provided"))}if(typeof e!=="string"){return v(new n("jwt must be a string"))}var d=e.split(".");if(d.length!==3){return v(new n("jwt malformed"))}var b;try{b=o(e,{complete:true})}catch(e){return v(e)}if(!b){return v(new n("invalid token"))}var h=b.header;var g;if(typeof r==="function"){if(!u){return v(new n("verify must be called asynchronous if secret or public key is provided as a callback"))}g=r}else{g=function(e,t){return t(null,r)}}return g(h,function(r,o){if(r){return v(new n("error in secret or public key callback: "+r.message))}var u=d[2].trim()!=="";if(!u&&o){return v(new n("jwt signature is required"))}if(u&&!o){return v(new n("secret or public key must be provided"))}if(!u&&!t.algorithms){t.algorithms=["none"]}if(!t.algorithms){t.algorithms=~o.toString().indexOf("BEGIN CERTIFICATE")||~o.toString().indexOf("BEGIN PUBLIC KEY")?c:~o.toString().indexOf("BEGIN RSA PUBLIC KEY")?p:l}if(!~t.algorithms.indexOf(b.header.alg)){return v(new n("invalid algorithm"))}var g;try{g=f.verify(e,b.header.alg,o)}catch(e){return v(e)}if(!g){return v(new n("invalid signature"))}var m=b.payload;if(typeof m.nbf!=="undefined"&&!t.ignoreNotBefore){if(typeof m.nbf!=="number"){return v(new n("invalid nbf value"))}if(m.nbf>y+(t.clockTolerance||0)){return v(new i("jwt not active",new Date(m.nbf*1e3)))}}if(typeof m.exp!=="undefined"&&!t.ignoreExpiration){if(typeof m.exp!=="number"){return v(new n("invalid exp value"))}if(y>=m.exp+(t.clockTolerance||0)){return v(new a("jwt expired",new Date(m.exp*1e3)))}}if(t.audience){var S=Array.isArray(t.audience)?t.audience:[t.audience];var w=Array.isArray(m.aud)?m.aud:[m.aud];var j=w.some(function(e){return S.some(function(r){return r instanceof RegExp?r.test(e):r===e})});if(!j){return v(new n("jwt audience invalid. expected: "+S.join(" or ")))}}if(t.issuer){var x=typeof t.issuer==="string"&&m.iss!==t.issuer||Array.isArray(t.issuer)&&t.issuer.indexOf(m.iss)===-1;if(x){return v(new n("jwt issuer invalid. expected: "+t.issuer))}}if(t.subject){if(m.sub!==t.subject){return v(new n("jwt subject invalid. expected: "+t.subject))}}if(t.jwtid){if(m.jti!==t.jwtid){return v(new n("jwt jwtid invalid. expected: "+t.jwtid))}}if(t.nonce){if(m.nonce!==t.nonce){return v(new n("jwt nonce invalid. expected: "+t.nonce))}}if(t.maxAge){if(typeof m.iat!=="number"){return v(new n("iat required when maxAge is specified"))}var E=s(t.maxAge,m.iat);if(typeof E==="undefined"){return v(new n('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(y>=E+(t.clockTolerance||0)){return v(new a("maxAge exceeded",new Date(E*1e3)))}}if(t.complete===true){var O=b.signature;return v(null,{header:h,payload:m,signature:O})}return v(null,m)})}},350:(e,r,t)=>{var n=t(68);var i=t(615).Buffer;var a=t(417);var o=t(175);var s=t(669);var u='"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".';var f="secret must be a string or buffer";var c="key must be a string or a buffer";var p="key must be a string, a buffer or an object";var l=typeof a.createPublicKey==="function";if(l){c+=" or a KeyObject";f+="or a KeyObject"}function checkIsPublicKey(e){if(i.isBuffer(e)){return}if(typeof e==="string"){return}if(!l){throw typeError(c)}if(typeof e!=="object"){throw typeError(c)}if(typeof e.type!=="string"){throw typeError(c)}if(typeof e.asymmetricKeyType!=="string"){throw typeError(c)}if(typeof e.export!=="function"){throw typeError(c)}}function checkIsPrivateKey(e){if(i.isBuffer(e)){return}if(typeof e==="string"){return}if(typeof e==="object"){return}throw typeError(p)}function checkIsSecretKey(e){if(i.isBuffer(e)){return}if(typeof e==="string"){return e}if(!l){throw typeError(f)}if(typeof e!=="object"){throw typeError(f)}if(e.type!=="secret"){throw typeError(f)}if(typeof e.export!=="function"){throw typeError(f)}}function fromBase64(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function toBase64(e){e=e.toString();var r=4-e.length%4;if(r!==4){for(var t=0;t{var n=t(921);var i=t(716);var a=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];r.ALGORITHMS=a;r.sign=n.sign;r.verify=i.verify;r.decode=i.decode;r.isValid=i.isValid;r.createSign=function createSign(e){return new n(e)};r.createVerify=function createVerify(e){return new i(e)}},423:(e,r,t)=>{var n=t(615).Buffer;var i=t(413);var a=t(669);function DataStream(e){this.buffer=null;this.writable=true;this.readable=true;if(!e){this.buffer=n.alloc(0);return this}if(typeof e.pipe==="function"){this.buffer=n.alloc(0);e.pipe(this);return this}if(e.length||typeof e==="object"){this.buffer=e;this.writable=false;process.nextTick(function(){this.emit("end",e);this.readable=false;this.emit("close")}.bind(this));return this}throw new TypeError("Unexpected data type ("+typeof e+")")}a.inherits(DataStream,i);DataStream.prototype.write=function write(e){this.buffer=n.concat([this.buffer,n.from(e)]);this.emit("data",e)};DataStream.prototype.end=function end(e){if(e)this.write(e);this.emit("end",e);this.emit("close");this.writable=false;this.readable=false};e.exports=DataStream},921:(e,r,t)=>{var n=t(615).Buffer;var i=t(423);var a=t(350);var o=t(413);var s=t(29);var u=t(669);function base64url(e,r){return n.from(e,r).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function jwsSecuredInput(e,r,t){t=t||"utf8";var n=base64url(s(e),"binary");var i=base64url(s(r),t);return u.format("%s.%s",n,i)}function jwsSign(e){var r=e.header;var t=e.payload;var n=e.secret||e.privateKey;var i=e.encoding;var o=a(r.alg);var s=jwsSecuredInput(r,t,i);var f=o.sign(s,n);return u.format("%s.%s",s,f)}function SignStream(e){var r=e.secret||e.privateKey||e.key;var t=new i(r);this.readable=true;this.header=e.header;this.encoding=e.encoding;this.secret=this.privateKey=this.key=t;this.payload=new i(e.payload);this.secret.once("close",function(){if(!this.payload.writable&&this.readable)this.sign()}.bind(this));this.payload.once("close",function(){if(!this.secret.writable&&this.readable)this.sign()}.bind(this))}u.inherits(SignStream,o);SignStream.prototype.sign=function sign(){try{var e=jwsSign({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});this.emit("done",e);this.emit("data",e);this.emit("end");this.readable=false;return e}catch(e){this.readable=false;this.emit("error",e);this.emit("close")}};SignStream.sign=jwsSign;e.exports=SignStream},29:(e,r,t)=>{var n=t(293).Buffer;e.exports=function toString(e){if(typeof e==="string")return e;if(typeof e==="number"||n.isBuffer(e))return e.toString();return JSON.stringify(e)}},716:(e,r,t)=>{var n=t(615).Buffer;var i=t(423);var a=t(350);var o=t(413);var s=t(29);var u=t(669);var f=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function safeJsonParse(e){if(isObject(e))return e;try{return JSON.parse(e)}catch(e){return undefined}}function headerFromJWS(e){var r=e.split(".",1)[0];return safeJsonParse(n.from(r,"base64").toString("binary"))}function securedInputFromJWS(e){return e.split(".",2).join(".")}function signatureFromJWS(e){return e.split(".")[2]}function payloadFromJWS(e,r){r=r||"utf8";var t=e.split(".")[1];return n.from(t,"base64").toString(r)}function isValidJws(e){return f.test(e)&&!!headerFromJWS(e)}function jwsVerify(e,r,t){if(!r){var n=new Error("Missing algorithm parameter for jws.verify");n.code="MISSING_ALGORITHM";throw n}e=s(e);var i=signatureFromJWS(e);var o=securedInputFromJWS(e);var u=a(r);return u.verify(o,i,t)}function jwsDecode(e,r){r=r||{};e=s(e);if(!isValidJws(e))return null;var t=headerFromJWS(e);if(!t)return null;var n=payloadFromJWS(e);if(t.typ==="JWT"||r.json)n=JSON.parse(n,r.encoding);return{header:t,payload:n,signature:signatureFromJWS(e)}}function VerifyStream(e){e=e||{};var r=e.secret||e.publicKey||e.key;var t=new i(r);this.readable=true;this.algorithm=e.algorithm;this.encoding=e.encoding;this.secret=this.publicKey=this.key=t;this.signature=new i(e.signature);this.secret.once("close",function(){if(!this.signature.writable&&this.readable)this.verify()}.bind(this));this.signature.once("close",function(){if(!this.secret.writable&&this.readable)this.verify()}.bind(this))}u.inherits(VerifyStream,o);VerifyStream.prototype.verify=function verify(){try{var e=jwsVerify(this.signature.buffer,this.algorithm,this.key.buffer);var r=jwsDecode(this.signature.buffer,this.encoding);this.emit("done",e,r);this.emit("data",e);this.emit("end");this.readable=false;return e}catch(e){this.readable=false;this.emit("error",e);this.emit("close")}};VerifyStream.decode=jwsDecode;VerifyStream.isValid=isValidJws;VerifyStream.verify=jwsVerify;e.exports=VerifyStream},282:e=>{var r=1/0,t=9007199254740991,n=1.7976931348623157e308,i=0/0;var a="[object Arguments]",o="[object Function]",s="[object GeneratorFunction]",u="[object String]",f="[object Symbol]";var c=/^\s+|\s+$/g;var p=/^[-+]0x[0-9a-f]+$/i;var l=/^0b[01]+$/i;var v=/^0o[0-7]+$/i;var y=/^(?:0|[1-9]\d*)$/;var d=parseInt;function arrayMap(e,r){var t=-1,n=e?e.length:0,i=Array(n);while(++t-1&&e%1==0&&e-1:!!i&&baseIndexOf(e,r,t)>-1}function isArguments(e){return isArrayLikeObject(e)&&h.call(e,"callee")&&(!m.call(e,"callee")||g.call(e)==a)}var j=Array.isArray;function isArrayLike(e){return e!=null&&isLength(e.length)&&!isFunction(e)}function isArrayLikeObject(e){return isObjectLike(e)&&isArrayLike(e)}function isFunction(e){var r=isObject(e)?g.call(e):"";return r==o||r==s}function isLength(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=t}function isObject(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function isObjectLike(e){return!!e&&typeof e=="object"}function isString(e){return typeof e=="string"||!j(e)&&isObjectLike(e)&&g.call(e)==u}function isSymbol(e){return typeof e=="symbol"||isObjectLike(e)&&g.call(e)==f}function toFinite(e){if(!e){return e===0?e:0}e=toNumber(e);if(e===r||e===-r){var t=e<0?-1:1;return t*n}return e===e?e:0}function toInteger(e){var r=toFinite(e),t=r%1;return r===r?t?r-t:r:0}function toNumber(e){if(typeof e=="number"){return e}if(isSymbol(e)){return i}if(isObject(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=isObject(r)?r+"":r}if(typeof e!="string"){return e===0?e:+e}e=e.replace(c,"");var t=l.test(e);return t||v.test(e)?d(e.slice(2),t?2:8):p.test(e)?i:+e}function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}function values(e){return e?baseValues(e,keys(e)):[]}e.exports=includes},170:e=>{var r="[object Boolean]";var t=Object.prototype;var n=t.toString;function isBoolean(e){return e===true||e===false||isObjectLike(e)&&n.call(e)==r}function isObjectLike(e){return!!e&&typeof e=="object"}e.exports=isBoolean},117:e=>{var r=1/0,t=1.7976931348623157e308,n=0/0;var i="[object Symbol]";var a=/^\s+|\s+$/g;var o=/^[-+]0x[0-9a-f]+$/i;var s=/^0b[01]+$/i;var u=/^0o[0-7]+$/i;var f=parseInt;var c=Object.prototype;var p=c.toString;function isInteger(e){return typeof e=="number"&&e==toInteger(e)}function isObject(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function isObjectLike(e){return!!e&&typeof e=="object"}function isSymbol(e){return typeof e=="symbol"||isObjectLike(e)&&p.call(e)==i}function toFinite(e){if(!e){return e===0?e:0}e=toNumber(e);if(e===r||e===-r){var n=e<0?-1:1;return n*t}return e===e?e:0}function toInteger(e){var r=toFinite(e),t=r%1;return r===r?t?r-t:r:0}function toNumber(e){if(typeof e=="number"){return e}if(isSymbol(e)){return n}if(isObject(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=isObject(r)?r+"":r}if(typeof e!="string"){return e===0?e:+e}e=e.replace(a,"");var t=s.test(e);return t||u.test(e)?f(e.slice(2),t?2:8):o.test(e)?n:+e}e.exports=isInteger},598:e=>{var r="[object Number]";var t=Object.prototype;var n=t.toString;function isObjectLike(e){return!!e&&typeof e=="object"}function isNumber(e){return typeof e=="number"||isObjectLike(e)&&n.call(e)==r}e.exports=isNumber},952:e=>{var r="[object Object]";function isHostObject(e){var r=false;if(e!=null&&typeof e.toString!="function"){try{r=!!(e+"")}catch(e){}}return r}function overArg(e,r){return function(t){return e(r(t))}}var t=Function.prototype,n=Object.prototype;var i=t.toString;var a=n.hasOwnProperty;var o=i.call(Object);var s=n.toString;var u=overArg(Object.getPrototypeOf,Object);function isObjectLike(e){return!!e&&typeof e=="object"}function isPlainObject(e){if(!isObjectLike(e)||s.call(e)!=r||isHostObject(e)){return false}var t=u(e);if(t===null){return true}var n=a.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&i.call(n)==o}e.exports=isPlainObject},95:e=>{var r="[object String]";var t=Object.prototype;var n=t.toString;var i=Array.isArray;function isObjectLike(e){return!!e&&typeof e=="object"}function isString(e){return typeof e=="string"||!i(e)&&isObjectLike(e)&&n.call(e)==r}e.exports=isString},433:e=>{var r="Expected a function";var t=1/0,n=1.7976931348623157e308,i=0/0;var a="[object Symbol]";var o=/^\s+|\s+$/g;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var f=/^0o[0-7]+$/i;var c=parseInt;var p=Object.prototype;var l=p.toString;function before(e,t){var n;if(typeof t!="function"){throw new TypeError(r)}e=toInteger(e);return function(){if(--e>0){n=t.apply(this,arguments)}if(e<=1){t=undefined}return n}}function once(e){return before(2,e)}function isObject(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function isObjectLike(e){return!!e&&typeof e=="object"}function isSymbol(e){return typeof e=="symbol"||isObjectLike(e)&&l.call(e)==a}function toFinite(e){if(!e){return e===0?e:0}e=toNumber(e);if(e===t||e===-t){var r=e<0?-1:1;return r*n}return e===e?e:0}function toInteger(e){var r=toFinite(e),t=r%1;return r===r?t?r-t:r:0}function toNumber(e){if(typeof e=="number"){return e}if(isSymbol(e)){return i}if(isObject(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=isObject(r)?r+"":r}if(typeof e!="string"){return e===0?e:+e}e=e.replace(o,"");var t=u.test(e);return t||f.test(e)?c(e.slice(2),t?2:8):s.test(e)?i:+e}e.exports=once},4:e=>{var r=1e3;var t=r*60;var n=t*60;var i=n*24;var a=i*7;var o=i*365.25;e.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0){return parse(e)}else if(t==="number"&&isFinite(e)){return r.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s){return}var u=parseFloat(s[1]);var f=(s[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*a;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var a=Math.abs(e);if(a>=i){return Math.round(e/i)+"d"}if(a>=n){return Math.round(e/n)+"h"}if(a>=t){return Math.round(e/t)+"m"}if(a>=r){return Math.round(e/r)+"s"}return e+"ms"}function fmtLong(e){var a=Math.abs(e);if(a>=i){return plural(e,a,i,"day")}if(a>=n){return plural(e,a,n,"hour")}if(a>=t){return plural(e,a,t,"minute")}if(a>=r){return plural(e,a,r,"second")}return e+" ms"}function plural(e,r,t,n){var i=r>=t*1.5;return Math.round(e/t)+" "+n+(i?"s":"")}},615:(e,r,t)=>{var n=t(293);var i=n.Buffer;function copyProps(e,r){for(var t in e){r[t]=e[t]}}if(i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow){e.exports=n}else{copyProps(n,r);r.Buffer=SafeBuffer}function SafeBuffer(e,r,t){return i(e,r,t)}SafeBuffer.prototype=Object.create(i.prototype);copyProps(i,SafeBuffer);SafeBuffer.from=function(e,r,t){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return i(e,r,t)};SafeBuffer.alloc=function(e,r,t){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var n=i(e);if(r!==undefined){if(typeof t==="string"){n.fill(r,t)}else{n.fill(r)}}else{n.fill(0)}return n};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(e)}},293:e=>{"use strict";e.exports=require("buffer")},417:e=>{"use strict";e.exports=require("crypto")},519:e=>{"use strict";e.exports=require("next/dist/compiled/semver")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}};var r={};function __nccwpck_require__(t){if(r[t]){return r[t].exports}var n=r[t]={exports:{}};var i=true;try{e[t](n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(667)})(); \ No newline at end of file diff --git a/packages/next/compiled/lodash.curry/index.js b/packages/next/compiled/lodash.curry/index.js index 34171cb2da26082..6e737d788bc207d 100644 --- a/packages/next/compiled/lodash.curry/index.js +++ b/packages/next/compiled/lodash.curry/index.js @@ -1 +1 @@ -module.exports=(()=>{var e={434:e=>{var r="Expected a function";var t="__lodash_placeholder__";var n=1,a=2,i=4,u=8,c=16,o=32,l=64,f=128,p=256,s=512;var d=1/0,v=9007199254740991,h=1.7976931348623157e308,y=0/0;var b=[["ary",f],["bind",n],["bindKey",a],["curry",u],["curryRight",c],["flip",s],["partial",o],["partialRight",l],["rearg",p]];var w="[object Function]",g="[object GeneratorFunction]",_="[object Symbol]";var j=/[\\^$.*+?()[\]{}|]/g;var O=/^\s+|\s+$/g;var x=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,I=/\{\n\/\* \[wrapped with (.+)\] \*/,m=/,? & /;var H=/^[-+]0x[0-9a-f]+$/i;var C=/^0b[01]+$/i;var N=/^\[object .+?Constructor\]$/;var $=/^0o[0-7]+$/i;var F=/^(?:0|[1-9]\d*)$/;var S=parseInt;var R=typeof global=="object"&&global&&global.Object===Object&&global;var A=typeof self=="object"&&self&&self.Object===Object&&self;var W=R||A||Function("return this")();function apply(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function arrayEach(e,r){var t=-1,n=e?e.length:0;while(++t-1}function baseFindIndex(e,r,t,n){var a=e.length,i=t+(n?1:-1);while(n?i--:++i2?e:undefined}();function baseCreate(e){return isObject(e)?T(e):{}}function baseIsNative(e){if(!isObject(e)||isMasked(e)){return false}var r=isFunction(e)||isHostObject(e)?L:N;return r.test(toSource(e))}function composeArgs(e,r,t,n){var a=-1,i=e.length,u=t.length,c=-1,o=r.length,l=V(i-u,0),f=Array(o+l),p=!n;while(++c1){a.reverse()}if(y&&v1?"& ":"")+r[n];r=r.join(t>2?", ":" ");return e.replace(x,"{\n/* [wrapped with "+r+"] */\n")}function isIndex(e,r){r=r==null?v:r;return!!r&&(typeof e=="number"||F.test(e))&&(e>-1&&e%1==0&&e{var e={434:e=>{var r="Expected a function";var t="__lodash_placeholder__";var n=1,a=2,i=4,u=8,c=16,o=32,l=64,f=128,p=256,s=512;var d=1/0,v=9007199254740991,h=1.7976931348623157e308,y=0/0;var b=[["ary",f],["bind",n],["bindKey",a],["curry",u],["curryRight",c],["flip",s],["partial",o],["partialRight",l],["rearg",p]];var w="[object Function]",g="[object GeneratorFunction]",_="[object Symbol]";var j=/[\\^$.*+?()[\]{}|]/g;var O=/^\s+|\s+$/g;var x=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,I=/\{\n\/\* \[wrapped with (.+)\] \*/,m=/,? & /;var H=/^[-+]0x[0-9a-f]+$/i;var C=/^0b[01]+$/i;var N=/^\[object .+?Constructor\]$/;var $=/^0o[0-7]+$/i;var F=/^(?:0|[1-9]\d*)$/;var S=parseInt;var R=typeof global=="object"&&global&&global.Object===Object&&global;var A=typeof self=="object"&&self&&self.Object===Object&&self;var W=R||A||Function("return this")();function apply(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function arrayEach(e,r){var t=-1,n=e?e.length:0;while(++t-1}function baseFindIndex(e,r,t,n){var a=e.length,i=t+(n?1:-1);while(n?i--:++i2?e:undefined}();function baseCreate(e){return isObject(e)?T(e):{}}function baseIsNative(e){if(!isObject(e)||isMasked(e)){return false}var r=isFunction(e)||isHostObject(e)?L:N;return r.test(toSource(e))}function composeArgs(e,r,t,n){var a=-1,i=e.length,u=t.length,c=-1,o=r.length,l=V(i-u,0),f=Array(o+l),p=!n;while(++c1){a.reverse()}if(y&&v1?"& ":"")+r[n];r=r.join(t>2?", ":" ");return e.replace(x,"{\n/* [wrapped with "+r+"] */\n")}function isIndex(e,r){r=r==null?v:r;return!!r&&(typeof e=="number"||F.test(e))&&(e>-1&&e%1==0&&e{"use strict";var t={69:(t,e,i)=>{const s=i(652);const n=Symbol("max");const l=Symbol("length");const r=Symbol("lengthCalculator");const h=Symbol("allowStale");const a=Symbol("maxAge");const o=Symbol("dispose");const u=Symbol("noDisposeOnSet");const f=Symbol("lruList");const p=Symbol("cache");const v=Symbol("updateAgeOnGet");const c=()=>1;class LRUCache{constructor(t){if(typeof t==="number")t={max:t};if(!t)t={};if(t.max&&(typeof t.max!=="number"||t.max<0))throw new TypeError("max must be a non-negative number");const e=this[n]=t.max||Infinity;const i=t.length||c;this[r]=typeof i!=="function"?c:i;this[h]=t.stale||false;if(t.maxAge&&typeof t.maxAge!=="number")throw new TypeError("maxAge must be a number");this[a]=t.maxAge||0;this[o]=t.dispose;this[u]=t.noDisposeOnSet||false;this[v]=t.updateAgeOnGet||false;this.reset()}set max(t){if(typeof t!=="number"||t<0)throw new TypeError("max must be a non-negative number");this[n]=t||Infinity;y(this)}get max(){return this[n]}set allowStale(t){this[h]=!!t}get allowStale(){return this[h]}set maxAge(t){if(typeof t!=="number")throw new TypeError("maxAge must be a non-negative number");this[a]=t;y(this)}get maxAge(){return this[a]}set lengthCalculator(t){if(typeof t!=="function")t=c;if(t!==this[r]){this[r]=t;this[l]=0;this[f].forEach(t=>{t.length=this[r](t.value,t.key);this[l]+=t.length})}y(this)}get lengthCalculator(){return this[r]}get length(){return this[l]}get itemCount(){return this[f].length}rforEach(t,e){e=e||this;for(let i=this[f].tail;i!==null;){const s=i.prev;x(this,t,i,e);i=s}}forEach(t,e){e=e||this;for(let i=this[f].head;i!==null;){const s=i.next;x(this,t,i,e);i=s}}keys(){return this[f].toArray().map(t=>t.key)}values(){return this[f].toArray().map(t=>t.value)}reset(){if(this[o]&&this[f]&&this[f].length){this[f].forEach(t=>this[o](t.key,t.value))}this[p]=new Map;this[f]=new s;this[l]=0}dump(){return this[f].map(t=>d(this,t)?false:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[f]}set(t,e,i){i=i||this[a];if(i&&typeof i!=="number")throw new TypeError("maxAge must be a number");const s=i?Date.now():0;const h=this[r](e,t);if(this[p].has(t)){if(h>this[n]){m(this,this[p].get(t));return false}const r=this[p].get(t);const a=r.value;if(this[o]){if(!this[u])this[o](t,a.value)}a.now=s;a.maxAge=i;a.value=e;this[l]+=h-a.length;a.length=h;this.get(t);y(this);return true}const v=new Entry(t,e,h,s,i);if(v.length>this[n]){if(this[o])this[o](t,e);return false}this[l]+=v.length;this[f].unshift(v);this[p].set(t,this[f].head);y(this);return true}has(t){if(!this[p].has(t))return false;const e=this[p].get(t).value;return!d(this,e)}get(t){return g(this,t,true)}peek(t){return g(this,t,false)}pop(){const t=this[f].tail;if(!t)return null;m(this,t);return t.value}del(t){m(this,this[p].get(t))}load(t){this.reset();const e=Date.now();for(let i=t.length-1;i>=0;i--){const s=t[i];const n=s.e||0;if(n===0)this.set(s.k,s.v);else{const t=n-e;if(t>0){this.set(s.k,s.v,t)}}}}prune(){this[p].forEach((t,e)=>g(this,e,false))}}const g=(t,e,i)=>{const s=t[p].get(e);if(s){const e=s.value;if(d(t,e)){m(t,s);if(!t[h])return undefined}else{if(i){if(t[v])s.value.now=Date.now();t[f].unshiftNode(s)}}return e.value}};const d=(t,e)=>{if(!e||!e.maxAge&&!t[a])return false;const i=Date.now()-e.now;return e.maxAge?i>e.maxAge:t[a]&&i>t[a]};const y=t=>{if(t[l]>t[n]){for(let e=t[f].tail;t[l]>t[n]&&e!==null;){const i=e.prev;m(t,e);e=i}}};const m=(t,e)=>{if(e){const i=e.value;if(t[o])t[o](i.key,i.value);t[l]-=i.length;t[p].delete(i.key);t[f].removeNode(e)}};class Entry{constructor(t,e,i,s,n){this.key=t;this.value=e;this.length=i;this.now=s;this.maxAge=n||0}}const x=(t,e,i,s)=>{let n=i.value;if(d(t,n)){m(t,i);if(!t[h])n=undefined}if(n)e.call(s,n.value,n.key,t)};t.exports=LRUCache},216:t=>{t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},652:(t,e,i)=>{t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var e=this;if(!(e instanceof Yallist)){e=new Yallist}e.tail=null;e.head=null;e.length=0;if(t&&typeof t.forEach==="function"){t.forEach(function(t){e.push(t)})}else if(arguments.length>0){for(var i=0,s=arguments.length;i1){i=e}else if(this.head){s=this.head.next;i=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;s!==null;n++){i=t(i,s.value,n);s=s.next}return i};Yallist.prototype.reduceReverse=function(t,e){var i;var s=this.tail;if(arguments.length>1){i=e}else if(this.tail){s=this.tail.prev;i=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;s!==null;n--){i=t(i,s.value,n);s=s.prev}return i};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var e=0,i=this.head;i!==null;e++){t[e]=i.value;i=i.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var e=0,i=this.tail;i!==null;e++){t[e]=i.value;i=i.prev}return t};Yallist.prototype.slice=function(t,e){e=e||this.length;if(e<0){e+=this.length}t=t||0;if(t<0){t+=this.length}var i=new Yallist;if(ethis.length){e=this.length}for(var s=0,n=this.head;n!==null&&sthis.length){e=this.length}for(var s=this.length,n=this.tail;n!==null&&s>e;s--){n=n.prev}for(;n!==null&&s>t;s--,n=n.prev){i.push(n.value)}return i};Yallist.prototype.splice=function(t,e){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var i=0,s=this.head;s!==null&&i{"use strict";var t={69:(t,e,i)=>{const s=i(652);const n=Symbol("max");const l=Symbol("length");const r=Symbol("lengthCalculator");const h=Symbol("allowStale");const a=Symbol("maxAge");const o=Symbol("dispose");const u=Symbol("noDisposeOnSet");const f=Symbol("lruList");const p=Symbol("cache");const v=Symbol("updateAgeOnGet");const c=()=>1;class LRUCache{constructor(t){if(typeof t==="number")t={max:t};if(!t)t={};if(t.max&&(typeof t.max!=="number"||t.max<0))throw new TypeError("max must be a non-negative number");const e=this[n]=t.max||Infinity;const i=t.length||c;this[r]=typeof i!=="function"?c:i;this[h]=t.stale||false;if(t.maxAge&&typeof t.maxAge!=="number")throw new TypeError("maxAge must be a number");this[a]=t.maxAge||0;this[o]=t.dispose;this[u]=t.noDisposeOnSet||false;this[v]=t.updateAgeOnGet||false;this.reset()}set max(t){if(typeof t!=="number"||t<0)throw new TypeError("max must be a non-negative number");this[n]=t||Infinity;y(this)}get max(){return this[n]}set allowStale(t){this[h]=!!t}get allowStale(){return this[h]}set maxAge(t){if(typeof t!=="number")throw new TypeError("maxAge must be a non-negative number");this[a]=t;y(this)}get maxAge(){return this[a]}set lengthCalculator(t){if(typeof t!=="function")t=c;if(t!==this[r]){this[r]=t;this[l]=0;this[f].forEach(t=>{t.length=this[r](t.value,t.key);this[l]+=t.length})}y(this)}get lengthCalculator(){return this[r]}get length(){return this[l]}get itemCount(){return this[f].length}rforEach(t,e){e=e||this;for(let i=this[f].tail;i!==null;){const s=i.prev;x(this,t,i,e);i=s}}forEach(t,e){e=e||this;for(let i=this[f].head;i!==null;){const s=i.next;x(this,t,i,e);i=s}}keys(){return this[f].toArray().map(t=>t.key)}values(){return this[f].toArray().map(t=>t.value)}reset(){if(this[o]&&this[f]&&this[f].length){this[f].forEach(t=>this[o](t.key,t.value))}this[p]=new Map;this[f]=new s;this[l]=0}dump(){return this[f].map(t=>d(this,t)?false:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[f]}set(t,e,i){i=i||this[a];if(i&&typeof i!=="number")throw new TypeError("maxAge must be a number");const s=i?Date.now():0;const h=this[r](e,t);if(this[p].has(t)){if(h>this[n]){m(this,this[p].get(t));return false}const r=this[p].get(t);const a=r.value;if(this[o]){if(!this[u])this[o](t,a.value)}a.now=s;a.maxAge=i;a.value=e;this[l]+=h-a.length;a.length=h;this.get(t);y(this);return true}const v=new Entry(t,e,h,s,i);if(v.length>this[n]){if(this[o])this[o](t,e);return false}this[l]+=v.length;this[f].unshift(v);this[p].set(t,this[f].head);y(this);return true}has(t){if(!this[p].has(t))return false;const e=this[p].get(t).value;return!d(this,e)}get(t){return g(this,t,true)}peek(t){return g(this,t,false)}pop(){const t=this[f].tail;if(!t)return null;m(this,t);return t.value}del(t){m(this,this[p].get(t))}load(t){this.reset();const e=Date.now();for(let i=t.length-1;i>=0;i--){const s=t[i];const n=s.e||0;if(n===0)this.set(s.k,s.v);else{const t=n-e;if(t>0){this.set(s.k,s.v,t)}}}}prune(){this[p].forEach((t,e)=>g(this,e,false))}}const g=(t,e,i)=>{const s=t[p].get(e);if(s){const e=s.value;if(d(t,e)){m(t,s);if(!t[h])return undefined}else{if(i){if(t[v])s.value.now=Date.now();t[f].unshiftNode(s)}}return e.value}};const d=(t,e)=>{if(!e||!e.maxAge&&!t[a])return false;const i=Date.now()-e.now;return e.maxAge?i>e.maxAge:t[a]&&i>t[a]};const y=t=>{if(t[l]>t[n]){for(let e=t[f].tail;t[l]>t[n]&&e!==null;){const i=e.prev;m(t,e);e=i}}};const m=(t,e)=>{if(e){const i=e.value;if(t[o])t[o](i.key,i.value);t[l]-=i.length;t[p].delete(i.key);t[f].removeNode(e)}};class Entry{constructor(t,e,i,s,n){this.key=t;this.value=e;this.length=i;this.now=s;this.maxAge=n||0}}const x=(t,e,i,s)=>{let n=i.value;if(d(t,n)){m(t,i);if(!t[h])n=undefined}if(n)e.call(s,n.value,n.key,t)};t.exports=LRUCache},216:t=>{t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},652:(t,e,i)=>{t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var e=this;if(!(e instanceof Yallist)){e=new Yallist}e.tail=null;e.head=null;e.length=0;if(t&&typeof t.forEach==="function"){t.forEach(function(t){e.push(t)})}else if(arguments.length>0){for(var i=0,s=arguments.length;i1){i=e}else if(this.head){s=this.head.next;i=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;s!==null;n++){i=t(i,s.value,n);s=s.next}return i};Yallist.prototype.reduceReverse=function(t,e){var i;var s=this.tail;if(arguments.length>1){i=e}else if(this.tail){s=this.tail.prev;i=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;s!==null;n--){i=t(i,s.value,n);s=s.prev}return i};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var e=0,i=this.head;i!==null;e++){t[e]=i.value;i=i.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var e=0,i=this.tail;i!==null;e++){t[e]=i.value;i=i.prev}return t};Yallist.prototype.slice=function(t,e){e=e||this.length;if(e<0){e+=this.length}t=t||0;if(t<0){t+=this.length}var i=new Yallist;if(ethis.length){e=this.length}for(var s=0,n=this.head;n!==null&&sthis.length){e=this.length}for(var s=this.length,n=this.tail;n!==null&&s>e;s--){n=n.prev}for(;n!==null&&s>t;s--,n=n.prev){i.push(n.value)}return i};Yallist.prototype.splice=function(t,e){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var i=0,s=this.head;s!==null&&i{var r={186:(r,e,i)=>{var t=i(622);var n=i(747);var s=parseInt("0777",8);r.exports=mkdirP.mkdirp=mkdirP.mkdirP=mkdirP;function mkdirP(r,e,i,a){if(typeof e==="function"){i=e;e={}}else if(!e||typeof e!=="object"){e={mode:e}}var u=e.mode;var c=e.fs||n;if(u===undefined){u=s&~process.umask()}if(!a)a=null;var o=i||function(){};r=t.resolve(r);c.mkdir(r,u,function(i){if(!i){a=a||r;return o(null,a)}switch(i.code){case"ENOENT":mkdirP(t.dirname(r),e,function(i,t){if(i)o(i,t);else mkdirP(r,e,o,t)});break;default:c.stat(r,function(r,e){if(r||!e.isDirectory())o(i,a);else o(null,a)});break}})}mkdirP.sync=function sync(r,e,i){if(!e||typeof e!=="object"){e={mode:e}}var a=e.mode;var u=e.fs||n;if(a===undefined){a=s&~process.umask()}if(!i)i=null;r=t.resolve(r);try{u.mkdirSync(r,a);i=i||r}catch(n){switch(n.code){case"ENOENT":i=sync(t.dirname(r),e,i);sync(r,e,i);break;default:var c;try{c=u.statSync(r)}catch(r){throw n}if(!c.isDirectory())throw n;break}}return i}},747:r=>{"use strict";r.exports=require("fs")},622:r=>{"use strict";r.exports=require("path")}};var e={};function __webpack_require__(i){if(e[i]){return e[i].exports}var t=e[i]={exports:{}};var n=true;try{r[i](t,t.exports,__webpack_require__);n=false}finally{if(n)delete e[i]}return t.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(186)})(); \ No newline at end of file +module.exports=(()=>{var r={186:(r,e,i)=>{var t=i(622);var n=i(747);var s=parseInt("0777",8);r.exports=mkdirP.mkdirp=mkdirP.mkdirP=mkdirP;function mkdirP(r,e,i,a){if(typeof e==="function"){i=e;e={}}else if(!e||typeof e!=="object"){e={mode:e}}var u=e.mode;var c=e.fs||n;if(u===undefined){u=s&~process.umask()}if(!a)a=null;var o=i||function(){};r=t.resolve(r);c.mkdir(r,u,function(i){if(!i){a=a||r;return o(null,a)}switch(i.code){case"ENOENT":mkdirP(t.dirname(r),e,function(i,t){if(i)o(i,t);else mkdirP(r,e,o,t)});break;default:c.stat(r,function(r,e){if(r||!e.isDirectory())o(i,a);else o(null,a)});break}})}mkdirP.sync=function sync(r,e,i){if(!e||typeof e!=="object"){e={mode:e}}var a=e.mode;var u=e.fs||n;if(a===undefined){a=s&~process.umask()}if(!i)i=null;r=t.resolve(r);try{u.mkdirSync(r,a);i=i||r}catch(n){switch(n.code){case"ENOENT":i=sync(t.dirname(r),e,i);sync(r,e,i);break;default:var c;try{c=u.statSync(r)}catch(r){throw n}if(!c.isDirectory())throw n;break}}return i}},747:r=>{"use strict";r.exports=require("fs")},622:r=>{"use strict";r.exports=require("path")}};var e={};function __nccwpck_require__(i){if(e[i]){return e[i].exports}var t=e[i]={exports:{}};var n=true;try{r[i](t,t.exports,__nccwpck_require__);n=false}finally{if(n)delete e[i]}return t.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(186)})(); \ No newline at end of file diff --git a/packages/next/compiled/nanoid/index.cjs b/packages/next/compiled/nanoid/index.cjs index 0cb03efef23bbdc..f9720c0bea3a0fb 100644 --- a/packages/next/compiled/nanoid/index.cjs +++ b/packages/next/compiled/nanoid/index.cjs @@ -1 +1 @@ -module.exports=(()=>{var e={161:(e,r,t)=>{let l=t(417);let{urlAlphabet:a}=t(117);const n=32;let u,i;let _=e=>{if(!u||u.lengthu.length){l.randomFillSync(u);i=0}let r=u.subarray(i,i+e);i+=e;return r};let h=(e,r,t)=>{let l=(2<<31-Math.clz32(e.length-1|1))-1;let a=Math.ceil(1.6*l*r/e.length);return()=>{let n="";while(true){let u=t(a);let i=a;while(i--){n+=e[u[i]&l]||"";if(n.length===r)return n}}}};let c=(e,r)=>h(e,r,_);let s=(e=21)=>{let r=_(e);let t="";while(e--){t+=a[r[e]&63]}return t};e.exports={nanoid:s,customAlphabet:c,customRandom:h,urlAlphabet:a,random:_}},117:e=>{let r="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";e.exports={urlAlphabet:r}},417:e=>{"use strict";e.exports=require("crypto")}};var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var l=r[t]={exports:{}};var a=true;try{e[t](l,l.exports,__webpack_require__);a=false}finally{if(a)delete r[t]}return l.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(161)})(); \ No newline at end of file +module.exports=(()=>{var e={161:(e,r,t)=>{let l=t(417);let{urlAlphabet:a}=t(117);const n=32;let u,i;let _=e=>{if(!u||u.lengthu.length){l.randomFillSync(u);i=0}let r=u.subarray(i,i+e);i+=e;return r};let h=(e,r,t)=>{let l=(2<<31-Math.clz32(e.length-1|1))-1;let a=Math.ceil(1.6*l*r/e.length);return()=>{let n="";while(true){let u=t(a);let i=a;while(i--){n+=e[u[i]&l]||"";if(n.length===r)return n}}}};let c=(e,r)=>h(e,r,_);let s=(e=21)=>{let r=_(e);let t="";while(e--){t+=a[r[e]&63]}return t};e.exports={nanoid:s,customAlphabet:c,customRandom:h,urlAlphabet:a,random:_}},117:e=>{let r="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";e.exports={urlAlphabet:r}},417:e=>{"use strict";e.exports=require("crypto")}};var r={};function __nccwpck_require__(t){if(r[t]){return r[t].exports}var l=r[t]={exports:{}};var a=true;try{e[t](l,l.exports,__nccwpck_require__);a=false}finally{if(a)delete r[t]}return l.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(161)})(); \ No newline at end of file diff --git a/packages/next/compiled/neo-async/async.js b/packages/next/compiled/neo-async/async.js index 3cfd4de671cb0de..6d5cfb742db559e 100644 --- a/packages/next/compiled/neo-async/async.js +++ b/packages/next/compiled/neo-async/async.js @@ -1 +1 @@ -module.exports=(()=>{var n={117:function(n,e){(function(n,f){"use strict";true?f(e):0})(this,function(n){"use strict";var e=function noop(){};var f=function throwError(){throw new Error("Callback was already called.")};var r=5;var t=0;var u="object";var a="function";var l=Array.isArray;var o=Object.keys;var i=Array.prototype.push;var h=typeof Symbol===a&&Symbol.iterator;var y,s,v;createImmediate();var I=createEach(arrayEach,baseEach,symbolEach);var c=createMap(arrayEachIndex,baseEachIndex,symbolEachIndex,true);var p=createMap(arrayEachIndex,baseEachKey,symbolEachKey,false);var g=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,true);var d=createFilterSeries(true);var W=createFilterLimit(true);var m=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,false);var C=createFilterSeries(false);var j=createFilterLimit(false);var b=createDetect(arrayEachValue,baseEachValue,symbolEachValue,true);var K=createDetectSeries(true);var L=createDetectLimit(true);var w=createEvery(arrayEachValue,baseEachValue,symbolEachValue);var A=createEverySeries();var _=createEveryLimit();var O=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,true);var S=createPickSeries(true);var V=createPickLimit(true);var B=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,false);var N=createPickSeries(false);var D=createPickLimit(false);var E=createTransform(arrayEachResult,baseEachResult,symbolEachResult);var F=createSortBy(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue);var R=createConcat(arrayEachIndex,baseEachIndex,symbolEachIndex);var q=createGroupBy(arrayEachValue,baseEachValue,symbolEachValue);var Q=createParallel(arrayEachFunc,baseEachFunc);var P=createApplyEach(c);var G=createApplyEach(mapSeries);var M=createLogger("log");var U=createLogger("dir");var $={VERSION:"2.6.1",each:I,eachSeries:eachSeries,eachLimit:eachLimit,forEach:I,forEachSeries:eachSeries,forEachLimit:eachLimit,eachOf:I,eachOfSeries:eachSeries,eachOfLimit:eachLimit,forEachOf:I,forEachOfSeries:eachSeries,forEachOfLimit:eachLimit,map:c,mapSeries:mapSeries,mapLimit:mapLimit,mapValues:p,mapValuesSeries:mapValuesSeries,mapValuesLimit:mapValuesLimit,filter:g,filterSeries:d,filterLimit:W,select:g,selectSeries:d,selectLimit:W,reject:m,rejectSeries:C,rejectLimit:j,detect:b,detectSeries:K,detectLimit:L,find:b,findSeries:K,findLimit:L,pick:O,pickSeries:S,pickLimit:V,omit:B,omitSeries:N,omitLimit:D,reduce:reduce,inject:reduce,foldl:reduce,reduceRight:reduceRight,foldr:reduceRight,transform:E,transformSeries:transformSeries,transformLimit:transformLimit,sortBy:F,sortBySeries:sortBySeries,sortByLimit:sortByLimit,some:some,someSeries:someSeries,someLimit:someLimit,any:some,anySeries:someSeries,anyLimit:someLimit,every:w,everySeries:A,everyLimit:_,all:w,allSeries:A,allLimit:_,concat:R,concatSeries:concatSeries,concatLimit:concatLimit,groupBy:q,groupBySeries:groupBySeries,groupByLimit:groupByLimit,parallel:Q,series:series,parallelLimit:parallelLimit,tryEach:tryEach,waterfall:waterfall,angelFall:angelFall,angelfall:angelFall,whilst:whilst,doWhilst:doWhilst,until:until,doUntil:doUntil,during:during,doDuring:doDuring,forever:forever,compose:compose,seq:seq,applyEach:P,applyEachSeries:G,queue:queue,priorityQueue:priorityQueue,cargo:cargo,auto:auto,autoInject:autoInject,retry:retry,retryable:retryable,iterator:iterator,times:times,timesSeries:timesSeries,timesLimit:timesLimit,race:race,apply:apply,nextTick:s,setImmediate:v,memoize:memoize,unmemoize:unmemoize,ensureAsync:ensureAsync,constant:constant,asyncify:asyncify,wrapSync:asyncify,log:M,dir:U,reflect:reflect,reflectAll:reflectAll,timeout:timeout,createLogger:createLogger,safe:safe,fast:fast};n["default"]=$;baseEachSync($,function(e,f){n[f]=e},o($));function createImmediate(n){var e=function delay(n){var e=slice(arguments,1);setTimeout(function(){n.apply(null,e)})};v=typeof setImmediate===a?setImmediate:e;if(typeof process===u&&typeof process.nextTick===a){y=/^v0.10/.test(process.version)?v:process.nextTick;s=/^v0/.test(process.version)?v:process.nextTick}else{s=y=v}if(n===false){y=function(n){n()}}}function createArray(n){var e=-1;var f=n.length;var r=Array(f);while(++e=e&&n[a]>=r){a--}if(u>a){break}swap(n,t,u++,a--)}return u}function swap(n,e,f,r){var t=n[f];n[f]=n[r];n[r]=t;var u=e[f];e[f]=e[r];e[r]=u}function quickSort(n,e,f,r){if(e===f){return}var t=e;while(++t<=f&&n[e]===n[t]){var u=t-1;if(r[u]>r[t]){var a=r[u];r[u]=r[t];r[t]=a}}if(t>f){return}var l=n[e]>n[t]?e:t;t=partition(n,e,f,n[l],r);quickSort(n,e,t-1,r);quickSort(n,t,f,r)}function makeConcatResult(n){var f=[];arrayEachSync(n,function(n){if(n===e){return}if(l(n)){i.apply(f,n)}else{f.push(n)}});return f}function arrayEach(n,e,f){var r=-1;var t=n.length;if(e.length===3){while(++rs?s:t,W);function arrayIterator(){v=j++;if(vi?i:r,g);function arrayIterator(){if(Wi?i:r,d);function arrayIterator(){s=m++;if(si?i:r,g);function arrayIterator(){s=m++;if(ss?s:t,W);function arrayIterator(){v=C++;if(vs?s:t,W);function arrayIterator(){v=j++;if(vi?i:f,g);function arrayIterator(){s=m++;if(si?i:r,m);function arrayIterator(){if(j=2){i.apply(d,slice(arguments,1))}if(n){t(n,d)}else if(++W===a){p=f;t(null,d)}else if(g){y(p)}else{g=true;p()}g=false}}function concatLimit(n,r,t,a){a=a||e;var i,s,v,I,c,p;var g=false;var d=0;var W=0;if(l(n)){i=n.length;c=t.length===3?arrayIteratorWithIndex:arrayIterator}else if(!n){}else if(h&&n[h]){i=Infinity;p=[];v=n[h]();c=t.length===3?symbolIteratorWithKey:symbolIterator}else if(typeof n===u){var m=o(n);i=m.length;c=t.length===3?objectIteratorWithKey:objectIterator}if(!i||isNaN(r)||r<1){return a(null,[])}p=p||Array(i);timesSync(r>i?i:r,c);function arrayIterator(){if(di?i:r,d);function arrayIterator(){if(ma?a:r,I);function arrayIterator(){i=p++;if(i1){var t=slice(arguments,1);return r.apply(this,t)}else{return r}}}function DLL(){this.head=null;this.tail=null;this.length=0}DLL.prototype._removeLink=function(n){var e=n.prev;var f=n.next;if(e){e.next=f}else{this.head=f}if(f){f.prev=e}else{this.tail=e}n.prev=null;n.next=null;this.length--;return n};DLL.prototype.empty=DLL;DLL.prototype._setInitial=function(n){this.length=1;this.head=this.tail=n};DLL.prototype.insertBefore=function(n,e){e.prev=n.prev;e.next=n;if(n.prev){n.prev.next=e}else{this.head=e}n.prev=e;this.length++};DLL.prototype.unshift=function(n){if(this.head){this.insertBefore(this.head,n)}else{this._setInitial(n)}};DLL.prototype.push=function(n){var e=this.tail;if(e){n.prev=e;n.next=e.next;this.tail=n;e.next=n;this.length++}else{this._setInitial(n)}};DLL.prototype.shift=function(){return this.head&&this._removeLink(this.head)};DLL.prototype.splice=function(n){var e;var f=[];while(n--&&(e=this.shift())){f.push(e)}return f};DLL.prototype.remove=function(n){var e=this.head;while(e){if(n(e)){this._removeLink(e)}e=e.next}return this};function baseQueue(n,r,t,u){if(t===undefined){t=1}else if(isNaN(t)||t<1){throw new Error("Concurrency must not be zero")}var a=0;var o=[];var h,s;var v={_tasks:new DLL,concurrency:t,payload:u,saturated:e,unsaturated:e,buffer:t/4,empty:e,drain:e,error:e,started:false,paused:false,push:push,kill:kill,unshift:unshift,remove:remove,process:n?runQueue:runCargo,length:getLength,running:running,workersList:getWorkersList,idle:idle,pause:pause,resume:resume,_worker:r};return v;function push(n,e){_insert(n,e)}function unshift(n,e){_insert(n,e,true)}function _exec(n){var e={data:n,callback:h};if(s){v._tasks.unshift(e)}else{v._tasks.push(e)}y(v.process)}function _insert(n,f,r){if(f==null){f=e}else if(typeof f!=="function"){throw new Error("task callback must be a function")}v.started=true;var t=l(n)?n:[n];if(n===undefined||!t.length){if(v.idle()){y(v.drain)}return}s=r;h=f;arrayEachSync(t,_exec)}function kill(){v.drain=e;v._tasks.empty()}function _next(n,e){var r=false;return function done(t,u){if(r){f()}r=true;a--;var l;var i=-1;var h=o.length;var y=-1;var s=e.length;var v=arguments.length>2;var I=v&&createArray(arguments);while(++y=i.priority){i=i.next}while(o--){var h={data:u[o],priority:f,callback:t};if(i){r._tasks.insertBefore(i,h)}else{r._tasks.push(h)}y(r.process)}}}function cargo(n,e){return baseQueue(false,n,1,e)}function auto(n,r,t){if(typeof r===a){t=r;r=null}var u=o(n);var i=u.length;var h={};if(i===0){return t(null,h)}var y=0;var s=[];var v=Object.create(null);t=onlyOnce(t||e);r=r||i;baseEachSync(n,iterator,u);proceedQueue();function iterator(n,r){var a,o;if(!l(n)){a=n;o=0;s.push([a,o,done]);return}var I=n.length-1;a=n[I];o=I;if(I===0){s.push([a,o,done]);return}var c=-1;while(++c=n){t(null,u);t=f}else if(a){y(iterate)}else{a=true;iterate()}a=false}}function timesLimit(n,r,t,u){u=u||e;n=+n;if(isNaN(n)||n<1||isNaN(r)||r<1){return u(null,[])}var a=Array(n);var l=false;var o=0;var i=0;timesSync(r>n?n:r,iterate);function iterate(){var e=o++;if(e=n){u(null,a);u=f}else if(l){y(iterate)}else{l=true;iterate()}l=false}}}function race(n,f){f=once(f||e);var r,t;var a=-1;if(l(n)){r=n.length;while(++a2){f=slice(arguments,1)}e(null,{value:f})}}}function reflectAll(n){var e,f;if(l(n)){e=Array(n.length);arrayEachSync(n,iterate)}else if(n&&typeof n===u){f=o(n);e={};baseEachSync(n,iterate,f)}return e;function iterate(n,f){e[f]=reflect(n)}}function createLogger(n){return function(n){var e=slice(arguments,1);e.push(done);n.apply(null,e)};function done(e){if(typeof console===u){if(e){if(console.error){console.error(e)}return}if(console[n]){var f=slice(arguments,1);arrayEachSync(f,function(e){console[n](e)})}}}}function safe(){createImmediate();return n}function fast(){createImmediate(false);return n}})}};var e={};function __webpack_require__(f){if(e[f]){return e[f].exports}var r=e[f]={exports:{}};var t=true;try{n[f].call(r.exports,r,r.exports,__webpack_require__);t=false}finally{if(t)delete e[f]}return r.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(117)})(); \ No newline at end of file +module.exports=(()=>{var n={117:function(n,e){(function(n,f){"use strict";true?f(e):0})(this,function(n){"use strict";var e=function noop(){};var f=function throwError(){throw new Error("Callback was already called.")};var r=5;var t=0;var u="object";var a="function";var l=Array.isArray;var o=Object.keys;var i=Array.prototype.push;var h=typeof Symbol===a&&Symbol.iterator;var y,s,v;createImmediate();var I=createEach(arrayEach,baseEach,symbolEach);var c=createMap(arrayEachIndex,baseEachIndex,symbolEachIndex,true);var p=createMap(arrayEachIndex,baseEachKey,symbolEachKey,false);var g=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,true);var d=createFilterSeries(true);var W=createFilterLimit(true);var m=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,false);var C=createFilterSeries(false);var j=createFilterLimit(false);var b=createDetect(arrayEachValue,baseEachValue,symbolEachValue,true);var K=createDetectSeries(true);var L=createDetectLimit(true);var w=createEvery(arrayEachValue,baseEachValue,symbolEachValue);var A=createEverySeries();var _=createEveryLimit();var O=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,true);var S=createPickSeries(true);var V=createPickLimit(true);var B=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,false);var N=createPickSeries(false);var D=createPickLimit(false);var E=createTransform(arrayEachResult,baseEachResult,symbolEachResult);var F=createSortBy(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue);var R=createConcat(arrayEachIndex,baseEachIndex,symbolEachIndex);var q=createGroupBy(arrayEachValue,baseEachValue,symbolEachValue);var Q=createParallel(arrayEachFunc,baseEachFunc);var P=createApplyEach(c);var G=createApplyEach(mapSeries);var M=createLogger("log");var U=createLogger("dir");var $={VERSION:"2.6.1",each:I,eachSeries:eachSeries,eachLimit:eachLimit,forEach:I,forEachSeries:eachSeries,forEachLimit:eachLimit,eachOf:I,eachOfSeries:eachSeries,eachOfLimit:eachLimit,forEachOf:I,forEachOfSeries:eachSeries,forEachOfLimit:eachLimit,map:c,mapSeries:mapSeries,mapLimit:mapLimit,mapValues:p,mapValuesSeries:mapValuesSeries,mapValuesLimit:mapValuesLimit,filter:g,filterSeries:d,filterLimit:W,select:g,selectSeries:d,selectLimit:W,reject:m,rejectSeries:C,rejectLimit:j,detect:b,detectSeries:K,detectLimit:L,find:b,findSeries:K,findLimit:L,pick:O,pickSeries:S,pickLimit:V,omit:B,omitSeries:N,omitLimit:D,reduce:reduce,inject:reduce,foldl:reduce,reduceRight:reduceRight,foldr:reduceRight,transform:E,transformSeries:transformSeries,transformLimit:transformLimit,sortBy:F,sortBySeries:sortBySeries,sortByLimit:sortByLimit,some:some,someSeries:someSeries,someLimit:someLimit,any:some,anySeries:someSeries,anyLimit:someLimit,every:w,everySeries:A,everyLimit:_,all:w,allSeries:A,allLimit:_,concat:R,concatSeries:concatSeries,concatLimit:concatLimit,groupBy:q,groupBySeries:groupBySeries,groupByLimit:groupByLimit,parallel:Q,series:series,parallelLimit:parallelLimit,tryEach:tryEach,waterfall:waterfall,angelFall:angelFall,angelfall:angelFall,whilst:whilst,doWhilst:doWhilst,until:until,doUntil:doUntil,during:during,doDuring:doDuring,forever:forever,compose:compose,seq:seq,applyEach:P,applyEachSeries:G,queue:queue,priorityQueue:priorityQueue,cargo:cargo,auto:auto,autoInject:autoInject,retry:retry,retryable:retryable,iterator:iterator,times:times,timesSeries:timesSeries,timesLimit:timesLimit,race:race,apply:apply,nextTick:s,setImmediate:v,memoize:memoize,unmemoize:unmemoize,ensureAsync:ensureAsync,constant:constant,asyncify:asyncify,wrapSync:asyncify,log:M,dir:U,reflect:reflect,reflectAll:reflectAll,timeout:timeout,createLogger:createLogger,safe:safe,fast:fast};n["default"]=$;baseEachSync($,function(e,f){n[f]=e},o($));function createImmediate(n){var e=function delay(n){var e=slice(arguments,1);setTimeout(function(){n.apply(null,e)})};v=typeof setImmediate===a?setImmediate:e;if(typeof process===u&&typeof process.nextTick===a){y=/^v0.10/.test(process.version)?v:process.nextTick;s=/^v0/.test(process.version)?v:process.nextTick}else{s=y=v}if(n===false){y=function(n){n()}}}function createArray(n){var e=-1;var f=n.length;var r=Array(f);while(++e=e&&n[a]>=r){a--}if(u>a){break}swap(n,t,u++,a--)}return u}function swap(n,e,f,r){var t=n[f];n[f]=n[r];n[r]=t;var u=e[f];e[f]=e[r];e[r]=u}function quickSort(n,e,f,r){if(e===f){return}var t=e;while(++t<=f&&n[e]===n[t]){var u=t-1;if(r[u]>r[t]){var a=r[u];r[u]=r[t];r[t]=a}}if(t>f){return}var l=n[e]>n[t]?e:t;t=partition(n,e,f,n[l],r);quickSort(n,e,t-1,r);quickSort(n,t,f,r)}function makeConcatResult(n){var f=[];arrayEachSync(n,function(n){if(n===e){return}if(l(n)){i.apply(f,n)}else{f.push(n)}});return f}function arrayEach(n,e,f){var r=-1;var t=n.length;if(e.length===3){while(++rs?s:t,W);function arrayIterator(){v=j++;if(vi?i:r,g);function arrayIterator(){if(Wi?i:r,d);function arrayIterator(){s=m++;if(si?i:r,g);function arrayIterator(){s=m++;if(ss?s:t,W);function arrayIterator(){v=C++;if(vs?s:t,W);function arrayIterator(){v=j++;if(vi?i:f,g);function arrayIterator(){s=m++;if(si?i:r,m);function arrayIterator(){if(j=2){i.apply(d,slice(arguments,1))}if(n){t(n,d)}else if(++W===a){p=f;t(null,d)}else if(g){y(p)}else{g=true;p()}g=false}}function concatLimit(n,r,t,a){a=a||e;var i,s,v,I,c,p;var g=false;var d=0;var W=0;if(l(n)){i=n.length;c=t.length===3?arrayIteratorWithIndex:arrayIterator}else if(!n){}else if(h&&n[h]){i=Infinity;p=[];v=n[h]();c=t.length===3?symbolIteratorWithKey:symbolIterator}else if(typeof n===u){var m=o(n);i=m.length;c=t.length===3?objectIteratorWithKey:objectIterator}if(!i||isNaN(r)||r<1){return a(null,[])}p=p||Array(i);timesSync(r>i?i:r,c);function arrayIterator(){if(di?i:r,d);function arrayIterator(){if(ma?a:r,I);function arrayIterator(){i=p++;if(i1){var t=slice(arguments,1);return r.apply(this,t)}else{return r}}}function DLL(){this.head=null;this.tail=null;this.length=0}DLL.prototype._removeLink=function(n){var e=n.prev;var f=n.next;if(e){e.next=f}else{this.head=f}if(f){f.prev=e}else{this.tail=e}n.prev=null;n.next=null;this.length--;return n};DLL.prototype.empty=DLL;DLL.prototype._setInitial=function(n){this.length=1;this.head=this.tail=n};DLL.prototype.insertBefore=function(n,e){e.prev=n.prev;e.next=n;if(n.prev){n.prev.next=e}else{this.head=e}n.prev=e;this.length++};DLL.prototype.unshift=function(n){if(this.head){this.insertBefore(this.head,n)}else{this._setInitial(n)}};DLL.prototype.push=function(n){var e=this.tail;if(e){n.prev=e;n.next=e.next;this.tail=n;e.next=n;this.length++}else{this._setInitial(n)}};DLL.prototype.shift=function(){return this.head&&this._removeLink(this.head)};DLL.prototype.splice=function(n){var e;var f=[];while(n--&&(e=this.shift())){f.push(e)}return f};DLL.prototype.remove=function(n){var e=this.head;while(e){if(n(e)){this._removeLink(e)}e=e.next}return this};function baseQueue(n,r,t,u){if(t===undefined){t=1}else if(isNaN(t)||t<1){throw new Error("Concurrency must not be zero")}var a=0;var o=[];var h,s;var v={_tasks:new DLL,concurrency:t,payload:u,saturated:e,unsaturated:e,buffer:t/4,empty:e,drain:e,error:e,started:false,paused:false,push:push,kill:kill,unshift:unshift,remove:remove,process:n?runQueue:runCargo,length:getLength,running:running,workersList:getWorkersList,idle:idle,pause:pause,resume:resume,_worker:r};return v;function push(n,e){_insert(n,e)}function unshift(n,e){_insert(n,e,true)}function _exec(n){var e={data:n,callback:h};if(s){v._tasks.unshift(e)}else{v._tasks.push(e)}y(v.process)}function _insert(n,f,r){if(f==null){f=e}else if(typeof f!=="function"){throw new Error("task callback must be a function")}v.started=true;var t=l(n)?n:[n];if(n===undefined||!t.length){if(v.idle()){y(v.drain)}return}s=r;h=f;arrayEachSync(t,_exec)}function kill(){v.drain=e;v._tasks.empty()}function _next(n,e){var r=false;return function done(t,u){if(r){f()}r=true;a--;var l;var i=-1;var h=o.length;var y=-1;var s=e.length;var v=arguments.length>2;var I=v&&createArray(arguments);while(++y=i.priority){i=i.next}while(o--){var h={data:u[o],priority:f,callback:t};if(i){r._tasks.insertBefore(i,h)}else{r._tasks.push(h)}y(r.process)}}}function cargo(n,e){return baseQueue(false,n,1,e)}function auto(n,r,t){if(typeof r===a){t=r;r=null}var u=o(n);var i=u.length;var h={};if(i===0){return t(null,h)}var y=0;var s=[];var v=Object.create(null);t=onlyOnce(t||e);r=r||i;baseEachSync(n,iterator,u);proceedQueue();function iterator(n,r){var a,o;if(!l(n)){a=n;o=0;s.push([a,o,done]);return}var I=n.length-1;a=n[I];o=I;if(I===0){s.push([a,o,done]);return}var c=-1;while(++c=n){t(null,u);t=f}else if(a){y(iterate)}else{a=true;iterate()}a=false}}function timesLimit(n,r,t,u){u=u||e;n=+n;if(isNaN(n)||n<1||isNaN(r)||r<1){return u(null,[])}var a=Array(n);var l=false;var o=0;var i=0;timesSync(r>n?n:r,iterate);function iterate(){var e=o++;if(e=n){u(null,a);u=f}else if(l){y(iterate)}else{l=true;iterate()}l=false}}}function race(n,f){f=once(f||e);var r,t;var a=-1;if(l(n)){r=n.length;while(++a2){f=slice(arguments,1)}e(null,{value:f})}}}function reflectAll(n){var e,f;if(l(n)){e=Array(n.length);arrayEachSync(n,iterate)}else if(n&&typeof n===u){f=o(n);e={};baseEachSync(n,iterate,f)}return e;function iterate(n,f){e[f]=reflect(n)}}function createLogger(n){return function(n){var e=slice(arguments,1);e.push(done);n.apply(null,e)};function done(e){if(typeof console===u){if(e){if(console.error){console.error(e)}return}if(console[n]){var f=slice(arguments,1);arrayEachSync(f,function(e){console[n](e)})}}}}function safe(){createImmediate();return n}function fast(){createImmediate(false);return n}})}};var e={};function __nccwpck_require__(f){if(e[f]){return e[f].exports}var r=e[f]={exports:{}};var t=true;try{n[f].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[f]}return r.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(117)})(); \ No newline at end of file diff --git a/packages/next/compiled/ora/index.js b/packages/next/compiled/ora/index.js index 9d74af2aa2d08b8..2489813cf075986 100644 --- a/packages/next/compiled/ora/index.js +++ b/packages/next/compiled/ora/index.js @@ -1 +1 @@ -module.exports=(()=>{var e={250:(e,t,r)=>{var s=r(820);e.exports=function(e,t){e=e||{};Object.keys(t).forEach(function(r){if(typeof e[r]==="undefined"){e[r]=s(t[r])}});return e}},820:e=>{var t=function(){"use strict";function clone(e,t,r,s){var i;if(typeof t==="object"){r=t.depth;s=t.prototype;i=t.filter;t=t.circular}var n=[];var o=[];var a=typeof Buffer!="undefined";if(typeof t=="undefined")t=true;if(typeof r=="undefined")r=Infinity;function _clone(e,r){if(e===null)return null;if(r==0)return e;var i;var _;if(typeof e!="object"){return e}if(clone.__isArray(e)){i=[]}else if(clone.__isRegExp(e)){i=new RegExp(e.source,__getRegExpFlags(e));if(e.lastIndex)i.lastIndex=e.lastIndex}else if(clone.__isDate(e)){i=new Date(e.getTime())}else if(a&&Buffer.isBuffer(e)){if(Buffer.allocUnsafe){i=Buffer.allocUnsafe(e.length)}else{i=new Buffer(e.length)}e.copy(i);return i}else{if(typeof s=="undefined"){_=Object.getPrototypeOf(e);i=Object.create(_)}else{i=Object.create(s);_=s}}if(t){var l=n.indexOf(e);if(l!=-1){return o[l]}n.push(e);o.push(i)}for(var u in e){var f;if(_){f=Object.getOwnPropertyDescriptor(_,u)}if(f&&f.set==null){continue}i[u]=_clone(e[u],r-1)}return i}return _clone(e,r)}clone.clonePrototype=function clonePrototype(e){if(e===null)return null;var t=function(){};t.prototype=e;return new t};function __objToStr(e){return Object.prototype.toString.call(e)}clone.__objToStr=__objToStr;function __isDate(e){return typeof e==="object"&&__objToStr(e)==="[object Date]"}clone.__isDate=__isDate;function __isArray(e){return typeof e==="object"&&__objToStr(e)==="[object Array]"}clone.__isArray=__isArray;function __isRegExp(e){return typeof e==="object"&&__objToStr(e)==="[object RegExp]"}clone.__isRegExp=__isRegExp;function __getRegExpFlags(e){var t="";if(e.global)t+="g";if(e.ignoreCase)t+="i";if(e.multiline)t+="m";return t}clone.__getRegExpFlags=__getRegExpFlags;return clone}();if(true&&e.exports){e.exports=t}},133:e=>{"use strict";e.exports=(({stream:e=process.stdout}={})=>{return Boolean(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))})},279:(e,t,r)=>{"use strict";const s=r(242);const i=process.platform!=="win32"||process.env.CI||process.env.TERM==="xterm-256color";const n={info:s.blue("ℹ"),success:s.green("✔"),warning:s.yellow("⚠"),error:s.red("✖")};const o={info:s.blue("i"),success:s.green("√"),warning:s.yellow("‼"),error:s.red("×")};e.exports=i?n:o},883:e=>{"use strict";const t=(e,t)=>{for(const r of Reflect.ownKeys(t)){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}return e};e.exports=t;e.exports.default=t},3:(e,t,r)=>{var s=r(413);e.exports=MuteStream;function MuteStream(e){s.apply(this);e=e||{};this.writable=this.readable=true;this.muted=false;this.on("pipe",this._onpipe);this.replace=e.replace;this._prompt=e.prompt||null;this._hadControl=false}MuteStream.prototype=Object.create(s.prototype);Object.defineProperty(MuteStream.prototype,"constructor",{value:MuteStream,enumerable:false});MuteStream.prototype.mute=function(){this.muted=true};MuteStream.prototype.unmute=function(){this.muted=false};Object.defineProperty(MuteStream.prototype,"_onpipe",{value:onPipe,enumerable:false,writable:true,configurable:true});function onPipe(e){this._src=e}Object.defineProperty(MuteStream.prototype,"isTTY",{get:getIsTTY,set:setIsTTY,enumerable:true,configurable:true});function getIsTTY(){return this._dest?this._dest.isTTY:this._src?this._src.isTTY:false}function setIsTTY(e){Object.defineProperty(this,"isTTY",{value:e,enumerable:true,writable:true,configurable:true})}Object.defineProperty(MuteStream.prototype,"rows",{get:function(){return this._dest?this._dest.rows:this._src?this._src.rows:undefined},enumerable:true,configurable:true});Object.defineProperty(MuteStream.prototype,"columns",{get:function(){return this._dest?this._dest.columns:this._src?this._src.columns:undefined},enumerable:true,configurable:true});MuteStream.prototype.pipe=function(e,t){this._dest=e;return s.prototype.pipe.call(this,e,t)};MuteStream.prototype.pause=function(){if(this._src)return this._src.pause()};MuteStream.prototype.resume=function(){if(this._src)return this._src.resume()};MuteStream.prototype.write=function(e){if(this.muted){if(!this.replace)return true;if(e.match(/^\u001b/)){if(e.indexOf(this._prompt)===0){e=e.substr(this._prompt.length);e=e.replace(/./g,this.replace);e=this._prompt+e}this._hadControl=true;return this.emit("data",e)}else{if(this._prompt&&this._hadControl&&e.indexOf(this._prompt)===0){this._hadControl=false;this.emit("data",this._prompt);e=e.substr(this._prompt.length)}e=e.toString().replace(/./g,this.replace)}}this.emit("data",e)};MuteStream.prototype.end=function(e){if(this.muted){if(e&&this.replace){e=e.toString().replace(/./g,this.replace)}else{e=null}}if(e)this.emit("data",e);this.emit("end")};function proxy(e){return function(){var t=this._dest;var r=this._src;if(t&&t[e])t[e].apply(t,arguments);if(r&&r[e])r[e].apply(r,arguments)}}MuteStream.prototype.destroy=proxy("destroy");MuteStream.prototype.destroySoon=proxy("destroySoon");MuteStream.prototype.close=proxy("close")},53:(e,t,r)=>{"use strict";const s=r(883);const i=new WeakMap;const n=(e,t={})=>{if(typeof e!=="function"){throw new TypeError("Expected a function")}let r;let n=false;let o=0;const a=e.displayName||e.name||"";const _=function(...s){i.set(_,++o);if(n){if(t.throw===true){throw new Error(`Function \`${a}\` can only be called once`)}return r}n=true;r=e.apply(this,s);e=null;return r};s(_,e);i.set(_,o);return _};e.exports=n;e.exports.default=n;e.exports.callCount=(e=>{if(!i.has(e)){throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`)}return i.get(e)})},317:(e,t,r)=>{var s=r(357);var i=r(935);var n=r(614);if(typeof n!=="function"){n=n.EventEmitter}var o;if(process.__signal_exit_emitter__){o=process.__signal_exit_emitter__}else{o=process.__signal_exit_emitter__=new n;o.count=0;o.emitted={}}if(!o.infinite){o.setMaxListeners(Infinity);o.infinite=true}e.exports=function(e,t){s.equal(typeof e,"function","a callback must be provided for exit handler");if(_===false){load()}var r="exit";if(t&&t.alwaysLast){r="afterexit"}var i=function(){o.removeListener(r,e);if(o.listeners("exit").length===0&&o.listeners("afterexit").length===0){unload()}};o.on(r,e);return i};e.exports.unload=unload;function unload(){if(!_){return}_=false;i.forEach(function(e){try{process.removeListener(e,a[e])}catch(e){}});process.emit=u;process.reallyExit=l;o.count-=1}function emit(e,t,r){if(o.emitted[e]){return}o.emitted[e]=true;o.emit(e,t,r)}var a={};i.forEach(function(e){a[e]=function listener(){var t=process.listeners(e);if(t.length===o.count){unload();emit("exit",null,e);emit("afterexit",null,e);process.kill(process.pid,e)}}});e.exports.signals=function(){return i};e.exports.load=load;var _=false;function load(){if(_){return}_=true;o.count+=1;i=i.filter(function(e){try{process.on(e,a[e]);return true}catch(e){return false}});process.emit=processEmit;process.reallyExit=processReallyExit}var l=process.reallyExit;function processReallyExit(e){process.exitCode=e||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);l.call(process,process.exitCode)}var u=process.emit;function processEmit(e,t){if(e==="exit"){if(t!==undefined){process.exitCode=t}var r=u.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return r}else{return u.apply(this,arguments)}}},935:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},965:e=>{e.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]},997:(e,t,r)=>{"use strict";var s=r(250);var i=r(965);var n={nul:0,control:0};e.exports=function wcwidth(e){return wcswidth(e,n)};e.exports.config=function(e){e=s(e||{},n);return function wcwidth(t){return wcswidth(t,e)}};function wcswidth(e,t){if(typeof e!=="string")return wcwidth(e,t);var r=0;for(var s=0;s=127&&e<160)return t.control;if(bisearch(e))return 0;return 1+(e>=4352&&(e<=4447||e==9001||e==9002||e>=11904&&e<=42191&&e!=12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))}function bisearch(e){var t=0;var r=i.length-1;var s;if(ei[r][1])return false;while(r>=t){s=Math.floor((t+r)/2);if(e>i[s][1])t=s+1;else if(e{"use strict";const s=r(847);let i=false;t.show=((e=process.stderr)=>{if(!e.isTTY){return}i=false;e.write("[?25h")});t.hide=((e=process.stderr)=>{if(!e.isTTY){return}s();i=true;e.write("[?25l")});t.toggle=((e,r)=>{if(e!==undefined){i=e}if(i){t.show(r)}else{t.hide(r)}})},31:(e,t,r)=>{"use strict";const s=Object.assign({},r(615));e.exports=s;e.exports.default=s},970:(e,t,r)=>{"use strict";const s=r(58);const i=r(242);const n=r(482);const o=r(31);const a=r(279);const _=r(148);const l=r(997);const u=r(133);const f=r(3);const c=Symbol("text");const p=Symbol("prefixText");const h=3;class StdinDiscarder{constructor(){this.requests=0;this.mutedStream=new f;this.mutedStream.pipe(process.stdout);this.mutedStream.mute();const e=this;this.ourEmit=function(t,r,...s){const{stdin:i}=process;if(e.requests>0||i.emit===e.ourEmit){if(t==="keypress"){return}if(t==="data"&&r.includes(h)){process.emit("SIGINT")}Reflect.apply(e.oldEmit,this,[t,r,...s])}else{Reflect.apply(process.stdin.emit,this,[t,r,...s])}}}start(){this.requests++;if(this.requests===1){this.realStart()}}stop(){if(this.requests<=0){throw new Error("`stop` called more times than `start`")}this.requests--;if(this.requests===0){this.realStop()}}realStart(){if(process.platform==="win32"){return}this.rl=s.createInterface({input:process.stdin,output:this.mutedStream});this.rl.on("SIGINT",()=>{if(process.listenerCount("SIGINT")===0){process.emit("SIGINT")}else{this.rl.close();process.kill(process.pid,"SIGINT")}})}realStop(){if(process.platform==="win32"){return}this.rl.close();this.rl=undefined}}const m=new StdinDiscarder;class Ora{constructor(e){if(typeof e==="string"){e={text:e}}this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:true,...e};this.spinner=this.options.spinner;this.color=this.options.color;this.hideCursor=this.options.hideCursor!==false;this.interval=this.options.interval||this.spinner.interval||100;this.stream=this.options.stream;this.id=undefined;this.isEnabled=typeof this.options.isEnabled==="boolean"?this.options.isEnabled:u({stream:this.stream});this.text=this.options.text;this.prefixText=this.options.prefixText;this.linesToClear=0;this.indent=this.options.indent;this.discardStdin=this.options.discardStdin;this.isDiscardingStdin=false}get indent(){return this._indent}set indent(e=0){if(!(e>=0&&Number.isInteger(e))){throw new Error("The `indent` option must be an integer from 0 and up")}this._indent=e}_updateInterval(e){if(e!==undefined){this.interval=e}}get spinner(){return this._spinner}set spinner(e){this.frameIndex=0;if(typeof e==="object"){if(e.frames===undefined){throw new Error("The given spinner must have a `frames` property")}this._spinner=e}else if(process.platform==="win32"){this._spinner=o.line}else if(e===undefined){this._spinner=o.dots}else if(o[e]){this._spinner=o[e]}else{throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json for a full list.`)}this._updateInterval(this._spinner.interval)}get text(){return this[c]}get prefixText(){return this[p]}get isSpinning(){return this.id!==undefined}updateLineCount(){const e=this.stream.columns||80;const t=typeof this[p]==="string"?this[p]+"-":"";this.lineCount=_(t+"--"+this[c]).split("\n").reduce((t,r)=>{return t+Math.max(1,Math.ceil(l(r)/e))},0)}set text(e){this[c]=e;this.updateLineCount()}set prefixText(e){this[p]=e;this.updateLineCount()}frame(){const{frames:e}=this.spinner;let t=e[this.frameIndex];if(this.color){t=i[this.color](t)}this.frameIndex=++this.frameIndex%e.length;const r=typeof this.prefixText==="string"&&this.prefixText!==""?this.prefixText+" ":"";const s=typeof this.text==="string"?" "+this.text:"";return r+t+s}clear(){if(!this.isEnabled||!this.stream.isTTY){return this}for(let e=0;e0){this.stream.moveCursor(0,-1)}this.stream.clearLine();this.stream.cursorTo(this.indent)}this.linesToClear=0;return this}render(){this.clear();this.stream.write(this.frame());this.linesToClear=this.lineCount;return this}start(e){if(e){this.text=e}if(!this.isEnabled){if(this.text){this.stream.write(`- ${this.text}\n`)}return this}if(this.isSpinning){return this}if(this.hideCursor){n.hide(this.stream)}if(this.discardStdin&&process.stdin.isTTY){this.isDiscardingStdin=true;m.start()}this.render();this.id=setInterval(this.render.bind(this),this.interval);return this}stop(){if(!this.isEnabled){return this}clearInterval(this.id);this.id=undefined;this.frameIndex=0;this.clear();if(this.hideCursor){n.show(this.stream)}if(this.discardStdin&&process.stdin.isTTY&&this.isDiscardingStdin){m.stop();this.isDiscardingStdin=false}return this}succeed(e){return this.stopAndPersist({symbol:a.success,text:e})}fail(e){return this.stopAndPersist({symbol:a.error,text:e})}warn(e){return this.stopAndPersist({symbol:a.warning,text:e})}info(e){return this.stopAndPersist({symbol:a.info,text:e})}stopAndPersist(e={}){const t=e.prefixText||this.prefixText;const r=typeof t==="string"&&t!==""?t+" ":"";const s=e.text||this.text;const i=typeof s==="string"?" "+s:"";this.stop();this.stream.write(`${r}${e.symbol||" "}${i}\n`);return this}}const d=function(e){return new Ora(e)};e.exports=d;e.exports.promise=((e,t)=>{if(typeof e.then!=="function"){throw new TypeError("Parameter `action` must be a Promise")}const r=new Ora(t);r.start();(async()=>{try{await e;r.succeed()}catch(e){r.fail()}})();return r})},847:(e,t,r)=>{"use strict";const s=r(53);const i=r(317);e.exports=s(()=>{i(()=>{process.stderr.write("[?25h")},{alwaysLast:true})})},615:e=>{"use strict";e.exports=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","´","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","°","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["😄 ","😝 "]},"monkey":{"interval":300,"frames":["🙈 ","🙈 ","🙉 ","🙊 "]},"hearts":{"interval":100,"frames":["💛 ","💙 ","💜 ","💚 ","❤️ "]},"clock":{"interval":100,"frames":["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},"earth":{"interval":180,"frames":["🌍 ","🌎 ","🌏 "]},"moon":{"interval":80,"frames":["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},"runner":{"interval":140,"frames":["🚶 ","🏃 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["🌲","🎄"]},"grenade":{"interval":80,"frames":["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]}}')},357:e=>{"use strict";e.exports=require("assert")},242:e=>{"use strict";e.exports=require("chalk")},614:e=>{"use strict";e.exports=require("events")},148:e=>{"use strict";e.exports=require("next/dist/compiled/strip-ansi")},58:e=>{"use strict";e.exports=require("readline")},413:e=>{"use strict";e.exports=require("stream")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var s=t[r]={exports:{}};var i=true;try{e[r](s,s.exports,__webpack_require__);i=false}finally{if(i)delete t[r]}return s.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(970)})(); \ No newline at end of file +module.exports=(()=>{var e={250:(e,t,r)=>{var s=r(820);e.exports=function(e,t){e=e||{};Object.keys(t).forEach(function(r){if(typeof e[r]==="undefined"){e[r]=s(t[r])}});return e}},820:e=>{var t=function(){"use strict";function clone(e,t,r,s){var i;if(typeof t==="object"){r=t.depth;s=t.prototype;i=t.filter;t=t.circular}var n=[];var o=[];var a=typeof Buffer!="undefined";if(typeof t=="undefined")t=true;if(typeof r=="undefined")r=Infinity;function _clone(e,r){if(e===null)return null;if(r==0)return e;var i;var _;if(typeof e!="object"){return e}if(clone.__isArray(e)){i=[]}else if(clone.__isRegExp(e)){i=new RegExp(e.source,__getRegExpFlags(e));if(e.lastIndex)i.lastIndex=e.lastIndex}else if(clone.__isDate(e)){i=new Date(e.getTime())}else if(a&&Buffer.isBuffer(e)){if(Buffer.allocUnsafe){i=Buffer.allocUnsafe(e.length)}else{i=new Buffer(e.length)}e.copy(i);return i}else{if(typeof s=="undefined"){_=Object.getPrototypeOf(e);i=Object.create(_)}else{i=Object.create(s);_=s}}if(t){var l=n.indexOf(e);if(l!=-1){return o[l]}n.push(e);o.push(i)}for(var u in e){var f;if(_){f=Object.getOwnPropertyDescriptor(_,u)}if(f&&f.set==null){continue}i[u]=_clone(e[u],r-1)}return i}return _clone(e,r)}clone.clonePrototype=function clonePrototype(e){if(e===null)return null;var t=function(){};t.prototype=e;return new t};function __objToStr(e){return Object.prototype.toString.call(e)}clone.__objToStr=__objToStr;function __isDate(e){return typeof e==="object"&&__objToStr(e)==="[object Date]"}clone.__isDate=__isDate;function __isArray(e){return typeof e==="object"&&__objToStr(e)==="[object Array]"}clone.__isArray=__isArray;function __isRegExp(e){return typeof e==="object"&&__objToStr(e)==="[object RegExp]"}clone.__isRegExp=__isRegExp;function __getRegExpFlags(e){var t="";if(e.global)t+="g";if(e.ignoreCase)t+="i";if(e.multiline)t+="m";return t}clone.__getRegExpFlags=__getRegExpFlags;return clone}();if(true&&e.exports){e.exports=t}},133:e=>{"use strict";e.exports=(({stream:e=process.stdout}={})=>{return Boolean(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))})},279:(e,t,r)=>{"use strict";const s=r(242);const i=process.platform!=="win32"||process.env.CI||process.env.TERM==="xterm-256color";const n={info:s.blue("ℹ"),success:s.green("✔"),warning:s.yellow("⚠"),error:s.red("✖")};const o={info:s.blue("i"),success:s.green("√"),warning:s.yellow("‼"),error:s.red("×")};e.exports=i?n:o},883:e=>{"use strict";const t=(e,t)=>{for(const r of Reflect.ownKeys(t)){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}return e};e.exports=t;e.exports.default=t},3:(e,t,r)=>{var s=r(413);e.exports=MuteStream;function MuteStream(e){s.apply(this);e=e||{};this.writable=this.readable=true;this.muted=false;this.on("pipe",this._onpipe);this.replace=e.replace;this._prompt=e.prompt||null;this._hadControl=false}MuteStream.prototype=Object.create(s.prototype);Object.defineProperty(MuteStream.prototype,"constructor",{value:MuteStream,enumerable:false});MuteStream.prototype.mute=function(){this.muted=true};MuteStream.prototype.unmute=function(){this.muted=false};Object.defineProperty(MuteStream.prototype,"_onpipe",{value:onPipe,enumerable:false,writable:true,configurable:true});function onPipe(e){this._src=e}Object.defineProperty(MuteStream.prototype,"isTTY",{get:getIsTTY,set:setIsTTY,enumerable:true,configurable:true});function getIsTTY(){return this._dest?this._dest.isTTY:this._src?this._src.isTTY:false}function setIsTTY(e){Object.defineProperty(this,"isTTY",{value:e,enumerable:true,writable:true,configurable:true})}Object.defineProperty(MuteStream.prototype,"rows",{get:function(){return this._dest?this._dest.rows:this._src?this._src.rows:undefined},enumerable:true,configurable:true});Object.defineProperty(MuteStream.prototype,"columns",{get:function(){return this._dest?this._dest.columns:this._src?this._src.columns:undefined},enumerable:true,configurable:true});MuteStream.prototype.pipe=function(e,t){this._dest=e;return s.prototype.pipe.call(this,e,t)};MuteStream.prototype.pause=function(){if(this._src)return this._src.pause()};MuteStream.prototype.resume=function(){if(this._src)return this._src.resume()};MuteStream.prototype.write=function(e){if(this.muted){if(!this.replace)return true;if(e.match(/^\u001b/)){if(e.indexOf(this._prompt)===0){e=e.substr(this._prompt.length);e=e.replace(/./g,this.replace);e=this._prompt+e}this._hadControl=true;return this.emit("data",e)}else{if(this._prompt&&this._hadControl&&e.indexOf(this._prompt)===0){this._hadControl=false;this.emit("data",this._prompt);e=e.substr(this._prompt.length)}e=e.toString().replace(/./g,this.replace)}}this.emit("data",e)};MuteStream.prototype.end=function(e){if(this.muted){if(e&&this.replace){e=e.toString().replace(/./g,this.replace)}else{e=null}}if(e)this.emit("data",e);this.emit("end")};function proxy(e){return function(){var t=this._dest;var r=this._src;if(t&&t[e])t[e].apply(t,arguments);if(r&&r[e])r[e].apply(r,arguments)}}MuteStream.prototype.destroy=proxy("destroy");MuteStream.prototype.destroySoon=proxy("destroySoon");MuteStream.prototype.close=proxy("close")},53:(e,t,r)=>{"use strict";const s=r(883);const i=new WeakMap;const n=(e,t={})=>{if(typeof e!=="function"){throw new TypeError("Expected a function")}let r;let n=false;let o=0;const a=e.displayName||e.name||"";const _=function(...s){i.set(_,++o);if(n){if(t.throw===true){throw new Error(`Function \`${a}\` can only be called once`)}return r}n=true;r=e.apply(this,s);e=null;return r};s(_,e);i.set(_,o);return _};e.exports=n;e.exports.default=n;e.exports.callCount=(e=>{if(!i.has(e)){throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`)}return i.get(e)})},317:(e,t,r)=>{var s=r(357);var i=r(935);var n=r(614);if(typeof n!=="function"){n=n.EventEmitter}var o;if(process.__signal_exit_emitter__){o=process.__signal_exit_emitter__}else{o=process.__signal_exit_emitter__=new n;o.count=0;o.emitted={}}if(!o.infinite){o.setMaxListeners(Infinity);o.infinite=true}e.exports=function(e,t){s.equal(typeof e,"function","a callback must be provided for exit handler");if(_===false){load()}var r="exit";if(t&&t.alwaysLast){r="afterexit"}var i=function(){o.removeListener(r,e);if(o.listeners("exit").length===0&&o.listeners("afterexit").length===0){unload()}};o.on(r,e);return i};e.exports.unload=unload;function unload(){if(!_){return}_=false;i.forEach(function(e){try{process.removeListener(e,a[e])}catch(e){}});process.emit=u;process.reallyExit=l;o.count-=1}function emit(e,t,r){if(o.emitted[e]){return}o.emitted[e]=true;o.emit(e,t,r)}var a={};i.forEach(function(e){a[e]=function listener(){var t=process.listeners(e);if(t.length===o.count){unload();emit("exit",null,e);emit("afterexit",null,e);process.kill(process.pid,e)}}});e.exports.signals=function(){return i};e.exports.load=load;var _=false;function load(){if(_){return}_=true;o.count+=1;i=i.filter(function(e){try{process.on(e,a[e]);return true}catch(e){return false}});process.emit=processEmit;process.reallyExit=processReallyExit}var l=process.reallyExit;function processReallyExit(e){process.exitCode=e||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);l.call(process,process.exitCode)}var u=process.emit;function processEmit(e,t){if(e==="exit"){if(t!==undefined){process.exitCode=t}var r=u.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return r}else{return u.apply(this,arguments)}}},935:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},965:e=>{e.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]},997:(e,t,r)=>{"use strict";var s=r(250);var i=r(965);var n={nul:0,control:0};e.exports=function wcwidth(e){return wcswidth(e,n)};e.exports.config=function(e){e=s(e||{},n);return function wcwidth(t){return wcswidth(t,e)}};function wcswidth(e,t){if(typeof e!=="string")return wcwidth(e,t);var r=0;for(var s=0;s=127&&e<160)return t.control;if(bisearch(e))return 0;return 1+(e>=4352&&(e<=4447||e==9001||e==9002||e>=11904&&e<=42191&&e!=12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))}function bisearch(e){var t=0;var r=i.length-1;var s;if(ei[r][1])return false;while(r>=t){s=Math.floor((t+r)/2);if(e>i[s][1])t=s+1;else if(e{"use strict";const s=r(847);let i=false;t.show=((e=process.stderr)=>{if(!e.isTTY){return}i=false;e.write("[?25h")});t.hide=((e=process.stderr)=>{if(!e.isTTY){return}s();i=true;e.write("[?25l")});t.toggle=((e,r)=>{if(e!==undefined){i=e}if(i){t.show(r)}else{t.hide(r)}})},31:(e,t,r)=>{"use strict";const s=Object.assign({},r(615));e.exports=s;e.exports.default=s},970:(e,t,r)=>{"use strict";const s=r(58);const i=r(242);const n=r(482);const o=r(31);const a=r(279);const _=r(148);const l=r(997);const u=r(133);const f=r(3);const c=Symbol("text");const p=Symbol("prefixText");const h=3;class StdinDiscarder{constructor(){this.requests=0;this.mutedStream=new f;this.mutedStream.pipe(process.stdout);this.mutedStream.mute();const e=this;this.ourEmit=function(t,r,...s){const{stdin:i}=process;if(e.requests>0||i.emit===e.ourEmit){if(t==="keypress"){return}if(t==="data"&&r.includes(h)){process.emit("SIGINT")}Reflect.apply(e.oldEmit,this,[t,r,...s])}else{Reflect.apply(process.stdin.emit,this,[t,r,...s])}}}start(){this.requests++;if(this.requests===1){this.realStart()}}stop(){if(this.requests<=0){throw new Error("`stop` called more times than `start`")}this.requests--;if(this.requests===0){this.realStop()}}realStart(){if(process.platform==="win32"){return}this.rl=s.createInterface({input:process.stdin,output:this.mutedStream});this.rl.on("SIGINT",()=>{if(process.listenerCount("SIGINT")===0){process.emit("SIGINT")}else{this.rl.close();process.kill(process.pid,"SIGINT")}})}realStop(){if(process.platform==="win32"){return}this.rl.close();this.rl=undefined}}const m=new StdinDiscarder;class Ora{constructor(e){if(typeof e==="string"){e={text:e}}this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:true,...e};this.spinner=this.options.spinner;this.color=this.options.color;this.hideCursor=this.options.hideCursor!==false;this.interval=this.options.interval||this.spinner.interval||100;this.stream=this.options.stream;this.id=undefined;this.isEnabled=typeof this.options.isEnabled==="boolean"?this.options.isEnabled:u({stream:this.stream});this.text=this.options.text;this.prefixText=this.options.prefixText;this.linesToClear=0;this.indent=this.options.indent;this.discardStdin=this.options.discardStdin;this.isDiscardingStdin=false}get indent(){return this._indent}set indent(e=0){if(!(e>=0&&Number.isInteger(e))){throw new Error("The `indent` option must be an integer from 0 and up")}this._indent=e}_updateInterval(e){if(e!==undefined){this.interval=e}}get spinner(){return this._spinner}set spinner(e){this.frameIndex=0;if(typeof e==="object"){if(e.frames===undefined){throw new Error("The given spinner must have a `frames` property")}this._spinner=e}else if(process.platform==="win32"){this._spinner=o.line}else if(e===undefined){this._spinner=o.dots}else if(o[e]){this._spinner=o[e]}else{throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json for a full list.`)}this._updateInterval(this._spinner.interval)}get text(){return this[c]}get prefixText(){return this[p]}get isSpinning(){return this.id!==undefined}updateLineCount(){const e=this.stream.columns||80;const t=typeof this[p]==="string"?this[p]+"-":"";this.lineCount=_(t+"--"+this[c]).split("\n").reduce((t,r)=>{return t+Math.max(1,Math.ceil(l(r)/e))},0)}set text(e){this[c]=e;this.updateLineCount()}set prefixText(e){this[p]=e;this.updateLineCount()}frame(){const{frames:e}=this.spinner;let t=e[this.frameIndex];if(this.color){t=i[this.color](t)}this.frameIndex=++this.frameIndex%e.length;const r=typeof this.prefixText==="string"&&this.prefixText!==""?this.prefixText+" ":"";const s=typeof this.text==="string"?" "+this.text:"";return r+t+s}clear(){if(!this.isEnabled||!this.stream.isTTY){return this}for(let e=0;e0){this.stream.moveCursor(0,-1)}this.stream.clearLine();this.stream.cursorTo(this.indent)}this.linesToClear=0;return this}render(){this.clear();this.stream.write(this.frame());this.linesToClear=this.lineCount;return this}start(e){if(e){this.text=e}if(!this.isEnabled){if(this.text){this.stream.write(`- ${this.text}\n`)}return this}if(this.isSpinning){return this}if(this.hideCursor){n.hide(this.stream)}if(this.discardStdin&&process.stdin.isTTY){this.isDiscardingStdin=true;m.start()}this.render();this.id=setInterval(this.render.bind(this),this.interval);return this}stop(){if(!this.isEnabled){return this}clearInterval(this.id);this.id=undefined;this.frameIndex=0;this.clear();if(this.hideCursor){n.show(this.stream)}if(this.discardStdin&&process.stdin.isTTY&&this.isDiscardingStdin){m.stop();this.isDiscardingStdin=false}return this}succeed(e){return this.stopAndPersist({symbol:a.success,text:e})}fail(e){return this.stopAndPersist({symbol:a.error,text:e})}warn(e){return this.stopAndPersist({symbol:a.warning,text:e})}info(e){return this.stopAndPersist({symbol:a.info,text:e})}stopAndPersist(e={}){const t=e.prefixText||this.prefixText;const r=typeof t==="string"&&t!==""?t+" ":"";const s=e.text||this.text;const i=typeof s==="string"?" "+s:"";this.stop();this.stream.write(`${r}${e.symbol||" "}${i}\n`);return this}}const d=function(e){return new Ora(e)};e.exports=d;e.exports.promise=((e,t)=>{if(typeof e.then!=="function"){throw new TypeError("Parameter `action` must be a Promise")}const r=new Ora(t);r.start();(async()=>{try{await e;r.succeed()}catch(e){r.fail()}})();return r})},847:(e,t,r)=>{"use strict";const s=r(53);const i=r(317);e.exports=s(()=>{i(()=>{process.stderr.write("[?25h")},{alwaysLast:true})})},615:e=>{"use strict";e.exports=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","´","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","°","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["😄 ","😝 "]},"monkey":{"interval":300,"frames":["🙈 ","🙈 ","🙉 ","🙊 "]},"hearts":{"interval":100,"frames":["💛 ","💙 ","💜 ","💚 ","❤️ "]},"clock":{"interval":100,"frames":["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},"earth":{"interval":180,"frames":["🌍 ","🌎 ","🌏 "]},"moon":{"interval":80,"frames":["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},"runner":{"interval":140,"frames":["🚶 ","🏃 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["🌲","🎄"]},"grenade":{"interval":80,"frames":["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]}}')},357:e=>{"use strict";e.exports=require("assert")},242:e=>{"use strict";e.exports=require("chalk")},614:e=>{"use strict";e.exports=require("events")},148:e=>{"use strict";e.exports=require("next/dist/compiled/strip-ansi")},58:e=>{"use strict";e.exports=require("readline")},413:e=>{"use strict";e.exports=require("stream")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var s=t[r]={exports:{}};var i=true;try{e[r](s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return s.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(970)})(); \ No newline at end of file diff --git a/packages/next/compiled/postcss-flexbugs-fixes/index.js b/packages/next/compiled/postcss-flexbugs-fixes/index.js index ad4a733c8f75f70..161a4eb98e3e6bf 100644 --- a/packages/next/compiled/postcss-flexbugs-fixes/index.js +++ b/packages/next/compiled/postcss-flexbugs-fixes/index.js @@ -1 +1 @@ -module.exports=(()=>{var e={379:e=>{"use strict";e.exports=((e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const n=t.indexOf(r+e);const i=t.indexOf("--");return n!==-1&&(i===-1?true:n{var n=r(633);function shouldSetZeroBasis(e){if(!e){return false}return e==="0"||e.replace(/\s/g,"")==="0px"}function properBasis(e){if(shouldSetZeroBasis(e)){return"0%"}return e}e.exports=function(e){if(e.prop==="flex"){var t=n.list.space(e.value);var r="0";var i="1";var s="0%";if(t[0]){r=t[0]}if(t[1]){if(!isNaN(t[1])){i=t[1]}else{s=t[1]}}if(t[2]){s=t[2]}e.value=r+" "+i+" "+properBasis(s)}}},196:(e,t,r)=>{var n=r(633);e.exports=function(e){if(e.prop==="flex"){var t=n.list.space(e.value);var r=t[0];var i=t[1]||"1";var s=t[2]||"0%";if(s==="0%")s=null;e.value=r+" "+i+(s?" "+s:"")}}},136:(e,t,r)=>{var n=r(633);e.exports=function(e){var t=/(\d{1,}) (\d{1,}) (calc\(.*\))/g;var r=t.exec(e.value);if(e.prop==="flex"&&r){var i=n.decl({prop:"flex-grow",value:r[1],source:e.source});var s=n.decl({prop:"flex-shrink",value:r[2],source:e.source});var o=n.decl({prop:"flex-basis",value:r[3],source:e.source});e.parent.insertBefore(e,i);e.parent.insertBefore(e,s);e.parent.insertBefore(e,o);e.remove()}}},350:(e,t,r)=>{var n=r(633);var i=r(369);var s=r(196);var o=r(136);var u=["none","auto","content","inherit","initial","unset"];e.exports=n.plugin("postcss-flexbugs-fixes",function(e){var t=Object.assign({bug4:true,bug6:true,bug81a:true},e);return function(e){e.walkDecls(function(e){if(e.value.indexOf("var(")>-1){return}if(e.value==="none"){return}var r=n.list.space(e.value);if(u.indexOf(e.value)>0&&r.length===1){return}if(t.bug4){i(e)}if(t.bug6){s(e)}if(t.bug81a){o(e)}})}})},217:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(878));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(AtRule,e);function AtRule(t){var r;r=e.call(this,t)||this;r.type="atrule";return r}var t=AtRule.prototype;t.append=function append(){var t;if(!this.nodes)this.nodes=[];for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(Comment,e);function Comment(t){var r;r=e.call(this,t)||this;r.type="comment";return r}return Comment}(n.default);var s=i;t.default=s;e.exports=t.default},878:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(605));var i=_interopRequireDefault(r(259));var s=_interopRequireDefault(r(497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r=u.length)break;l=u[f++]}else{f=u.next();if(f.done)break;l=f.value}var c=l;this.nodes.push(c)}}return this};t.prepend=function prepend(){for(var e=arguments.length,t=new Array(e),r=0;r=n.length)break;o=n[s++]}else{s=n.next();if(s.done)break;o=s.value}var u=o;var a=this.normalize(u,this.first,"prepend").reverse();for(var f=a,l=Array.isArray(f),c=0,f=l?f:f[Symbol.iterator]();;){var h;if(l){if(c>=f.length)break;h=f[c++]}else{c=f.next();if(c.done)break;h=c.value}var p=h;this.nodes.unshift(p)}for(var d in this.indexes){this.indexes[d]=this.indexes[d]+a.length}}return this};t.cleanRaws=function cleanRaws(t){e.prototype.cleanRaws.call(this,t);if(this.nodes){for(var r=this.nodes,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{i=r.next();if(i.done)break;s=i.value}var o=s;o.cleanRaws(t)}}};t.insertBefore=function insertBefore(e,t){e=this.index(e);var r=e===0?"prepend":false;var n=this.normalize(t,this.nodes[e],r).reverse();for(var i=n,s=Array.isArray(i),o=0,i=s?i:i[Symbol.iterator]();;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{o=i.next();if(o.done)break;u=o.value}var a=u;this.nodes.splice(e,0,a)}var f;for(var l in this.indexes){f=this.indexes[l];if(e<=f){this.indexes[l]=f+n.length}}return this};t.insertAfter=function insertAfter(e,t){e=this.index(e);var r=this.normalize(t,this.nodes[e]).reverse();for(var n=r,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var o;if(i){if(s>=n.length)break;o=n[s++]}else{s=n.next();if(s.done)break;o=s.value}var u=o;this.nodes.splice(e+1,0,u)}var a;for(var f in this.indexes){a=this.indexes[f];if(e=e){this.indexes[r]=t-1}}return this};t.removeAll=function removeAll(){for(var e=this.nodes,t=Array.isArray(e),r=0,e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{r=e.next();if(r.done)break;n=r.value}var i=n;i.parent=undefined}this.nodes=[];return this};t.replaceValues=function replaceValues(e,t,r){if(!r){r=t;t={}}this.walkDecls(function(n){if(t.props&&t.props.indexOf(n.prop)===-1)return;if(t.fast&&n.value.indexOf(t.fast)===-1)return;n.value=n.value.replace(e,r)});return this};t.every=function every(e){return this.nodes.every(e)};t.some=function some(e){return this.nodes.some(e)};t.index=function index(e){if(typeof e==="number"){return e}return this.nodes.indexOf(e)};t.normalize=function normalize(e,t){var s=this;if(typeof e==="string"){var o=r(749);e=cleanSource(o(e).nodes)}else if(Array.isArray(e)){e=e.slice(0);for(var u=e,a=Array.isArray(u),f=0,u=a?u:u[Symbol.iterator]();;){var l;if(a){if(f>=u.length)break;l=u[f++]}else{f=u.next();if(f.done)break;l=f.value}var c=l;if(c.parent)c.parent.removeChild(c,"ignore")}}else if(e.type==="root"){e=e.nodes.slice(0);for(var h=e,p=Array.isArray(h),d=0,h=p?h:h[Symbol.iterator]();;){var v;if(p){if(d>=h.length)break;v=h[d++]}else{d=h.next();if(d.done)break;v=d.value}var w=v;if(w.parent)w.parent.removeChild(w,"ignore")}}else if(e.type){e=[e]}else if(e.prop){if(typeof e.value==="undefined"){throw new Error("Value field is missed in node creation")}else if(typeof e.value!=="string"){e.value=String(e.value)}e=[new n.default(e)]}else if(e.selector){var m=r(797);e=[new m(e)]}else if(e.name){var g=r(217);e=[new g(e)]}else if(e.text){e=[new i.default(e)]}else{throw new Error("Unknown node type in node creation")}var y=e.map(function(e){if(e.parent)e.parent.removeChild(e);if(typeof e.raws.before==="undefined"){if(t&&typeof t.raws.before!=="undefined"){e.raws.before=t.raws.before.replace(/[^\s]/g,"")}}e.parent=s;return e});return y};_createClass(Container,[{key:"first",get:function get(){if(!this.nodes)return undefined;return this.nodes[0]}},{key:"last",get:function get(){if(!this.nodes)return undefined;return this.nodes[this.nodes.length-1]}}]);return Container}(s.default);var u=o;t.default=u;e.exports=t.default},535:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(327));var i=_interopRequireDefault(r(242));var s=_interopRequireDefault(r(300));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _assertThisInitialized(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function _wrapNativeSuper(e){var t=typeof Map==="function"?new Map:undefined;_wrapNativeSuper=function _wrapNativeSuper(e){if(e===null||!_isNativeFunction(e))return e;if(typeof e!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof t!=="undefined"){if(t.has(e))return t.get(e);t.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,e)};return _wrapNativeSuper(e)}function isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}function _construct(e,t,r){if(isNativeReflectConstruct()){_construct=Reflect.construct}else{_construct=function _construct(e,t,r){var n=[null];n.push.apply(n,t);var i=Function.bind.apply(e,n);var s=new i;if(r)_setPrototypeOf(s,r.prototype);return s}}return _construct.apply(null,arguments)}function _isNativeFunction(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function _setPrototypeOf(e,t){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e};return _setPrototypeOf(e,t)}function _getPrototypeOf(e){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(e)}var o=function(e){_inheritsLoose(CssSyntaxError,e);function CssSyntaxError(t,r,n,i,s,o){var u;u=e.call(this,t)||this;u.name="CssSyntaxError";u.reason=t;if(s){u.file=s}if(i){u.source=i}if(o){u.plugin=o}if(typeof r!=="undefined"&&typeof n!=="undefined"){u.line=r;u.column=n}u.setMessage();if(Error.captureStackTrace){Error.captureStackTrace(_assertThisInitialized(u),CssSyntaxError)}return u}var t=CssSyntaxError.prototype;t.setMessage=function setMessage(){this.message=this.plugin?this.plugin+": ":"";this.message+=this.file?this.file:"";if(typeof this.line!=="undefined"){this.message+=":"+this.line+":"+this.column}this.message+=": "+this.reason};t.showSourceCode=function showSourceCode(e){var t=this;if(!this.source)return"";var r=this.source;if(s.default){if(typeof e==="undefined")e=n.default.stdout;if(e)r=(0,s.default)(r)}var o=r.split(/\r?\n/);var u=Math.max(this.line-3,0);var a=Math.min(this.line+2,o.length);var f=String(a).length;function mark(t){if(e&&i.default.red){return i.default.red.bold(t)}return t}function aside(t){if(e&&i.default.gray){return i.default.gray(t)}return t}return o.slice(u,a).map(function(e,r){var n=u+1+r;var i=" "+(" "+n).slice(-f)+" | ";if(n===t.line){var s=aside(i.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return mark(">")+aside(i)+e+"\n "+s+mark("^")}return" "+aside(i)+e}).join("\n")};t.toString=function toString(){var e=this.showSourceCode();if(e){e="\n\n"+e+"\n"}return this.name+": "+this.message+e};return CssSyntaxError}(_wrapNativeSuper(Error));var u=o;t.default=u;e.exports=t.default},605:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(Declaration,e);function Declaration(t){var r;r=e.call(this,t)||this;r.type="decl";return r}return Declaration}(n.default);var s=i;t.default=s;e.exports=t.default},905:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(622));var i=_interopRequireDefault(r(535));var s=_interopRequireDefault(r(713));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r"}if(this.map)this.map.file=this.from}var e=Input.prototype;e.error=function error(e,t,r,n){if(n===void 0){n={}}var s;var o=this.origin(t,r);if(o){s=new i.default(e,o.line,o.column,o.source,o.file,n.plugin)}else{s=new i.default(e,t,r,this.css,this.file,n.plugin)}s.input={line:t,column:r,source:this.css};if(this.file)s.input.file=this.file;return s};e.origin=function origin(e,t){if(!this.map)return false;var r=this.map.consumer();var n=r.originalPositionFor({line:e,column:t});if(!n.source)return false;var i={file:this.mapResolve(n.source),line:n.line,column:n.column};var s=r.sourceContentFor(n.source);if(s)i.source=s;return i};e.mapResolve=function mapResolve(e){if(/^\w+:\/\//.test(e)){return e}return n.default.resolve(this.map.consumer().sourceRoot||".",e)};_createClass(Input,[{key:"from",get:function get(){return this.file||this.id}}]);return Input}();var a=u;t.default=a;e.exports=t.default},169:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(595));var i=_interopRequireDefault(r(549));var s=_interopRequireDefault(r(831));var o=_interopRequireDefault(r(613));var u=_interopRequireDefault(r(749));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;rparseInt(o[1])){console.error("Unknown error from PostCSS plugin. Your current PostCSS "+"version is "+i+", but "+r+" uses "+n+". Perhaps this is the source of the error below.")}}}}catch(e){if(console&&console.error)console.error(e)}};e.asyncTick=function asyncTick(e,t){var r=this;if(this.plugin>=this.processor.plugins.length){this.processed=true;return e()}try{var n=this.processor.plugins[this.plugin];var i=this.run(n);this.plugin+=1;if(isPromise(i)){i.then(function(){r.asyncTick(e,t)}).catch(function(e){r.handleError(e,n);r.processed=true;t(e)})}else{this.asyncTick(e,t)}}catch(e){this.processed=true;t(e)}};e.async=function async(){var e=this;if(this.processed){return new Promise(function(t,r){if(e.error){r(e.error)}else{t(e.stringify())}})}if(this.processing){return this.processing}this.processing=new Promise(function(t,r){if(e.error)return r(e.error);e.plugin=0;e.asyncTick(t,r)}).then(function(){e.processed=true;return e.stringify()});return this.processing};e.sync=function sync(){if(this.processed)return this.result;this.processed=true;if(this.processing){throw new Error("Use process(css).then(cb) to work with async plugins")}if(this.error)throw this.error;for(var e=this.result.processor.plugins,t=Array.isArray(e),r=0,e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{r=e.next();if(r.done)break;n=r.value}var i=n;var s=this.run(i);if(isPromise(s)){throw new Error("Use process(css).then(cb) to work with async plugins")}}return this.result};e.run=function run(e){this.result.lastPlugin=e;try{return e(this.result.root,this.result)}catch(t){this.handleError(t,e);throw t}};e.stringify=function stringify(){if(this.stringified)return this.result;this.stringified=true;this.sync();var e=this.result.opts;var t=i.default;if(e.syntax)t=e.syntax.stringify;if(e.stringifier)t=e.stringifier;if(t.stringify)t=t.stringify;var r=new n.default(t,this.result.root,this.result.opts);var s=r.generate();this.result.css=s[0];this.result.map=s[1];return this.result};_createClass(LazyResult,[{key:"processor",get:function get(){return this.result.processor}},{key:"opts",get:function get(){return this.result.opts}},{key:"css",get:function get(){return this.stringify().css}},{key:"content",get:function get(){return this.stringify().content}},{key:"map",get:function get(){return this.stringify().map}},{key:"root",get:function get(){return this.sync().root}},{key:"messages",get:function get(){return this.sync().messages}}]);return LazyResult}();var f=a;t.default=f;e.exports=t.default},9:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r={split:function split(e,t,r){var n=[];var i="";var split=false;var s=0;var o=false;var u=false;for(var a=0;a0)s-=1}else if(s===0){if(t.indexOf(f)!==-1)split=true}if(split){if(i!=="")n.push(i.trim());i="";split=false}else{i+=f}}if(r||i!=="")n.push(i.trim());return n},space:function space(e){var t=[" ","\n","\t"];return r.split(e,t)},comma:function comma(e){return r.split(e,[","],true)}};var n=r;t.default=n;e.exports=t.default},595:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(241));var i=_interopRequireDefault(r(622));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s=function(){function MapGenerator(e,t,r){this.stringify=e;this.mapOpts=r.map||{};this.root=t;this.opts=r}var e=MapGenerator.prototype;e.isMap=function isMap(){if(typeof this.opts.map!=="undefined"){return!!this.opts.map}return this.previous().length>0};e.previous=function previous(){var e=this;if(!this.previousMaps){this.previousMaps=[];this.root.walk(function(t){if(t.source&&t.source.input.map){var r=t.source.input.map;if(e.previousMaps.indexOf(r)===-1){e.previousMaps.push(r)}}})}return this.previousMaps};e.isInline=function isInline(){if(typeof this.mapOpts.inline!=="undefined"){return this.mapOpts.inline}var e=this.mapOpts.annotation;if(typeof e!=="undefined"&&e!==true){return false}if(this.previous().length){return this.previous().some(function(e){return e.inline})}return true};e.isSourcesContent=function isSourcesContent(){if(typeof this.mapOpts.sourcesContent!=="undefined"){return this.mapOpts.sourcesContent}if(this.previous().length){return this.previous().some(function(e){return e.withContent()})}return true};e.clearAnnotation=function clearAnnotation(){if(this.mapOpts.annotation===false)return;var e;for(var t=this.root.nodes.length-1;t>=0;t--){e=this.root.nodes[t];if(e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0){this.root.removeChild(t)}}};e.setSourcesContent=function setSourcesContent(){var e=this;var t={};this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!t[n]){t[n]=true;var i=e.relative(n);e.map.setSourceContent(i,r.source.input.css)}}})};e.applyPrevMaps=function applyPrevMaps(){for(var e=this.previous(),t=Array.isArray(e),r=0,e=t?e:e[Symbol.iterator]();;){var s;if(t){if(r>=e.length)break;s=e[r++]}else{r=e.next();if(r.done)break;s=r.value}var o=s;var u=this.relative(o.file);var a=o.root||i.default.dirname(o.file);var f=void 0;if(this.mapOpts.sourcesContent===false){f=new n.default.SourceMapConsumer(o.text);if(f.sourcesContent){f.sourcesContent=f.sourcesContent.map(function(){return null})}}else{f=o.consumer()}this.map.applySourceMap(f,u,this.relative(a))}};e.isAnnotation=function isAnnotation(){if(this.isInline()){return true}if(typeof this.mapOpts.annotation!=="undefined"){return this.mapOpts.annotation}if(this.previous().length){return this.previous().some(function(e){return e.annotation})}return true};e.toBase64=function toBase64(e){if(Buffer){return Buffer.from(e).toString("base64")}return window.btoa(unescape(encodeURIComponent(e)))};e.addAnnotation=function addAnnotation(){var e;if(this.isInline()){e="data:application/json;base64,"+this.toBase64(this.map.toString())}else if(typeof this.mapOpts.annotation==="string"){e=this.mapOpts.annotation}else{e=this.outputFile()+".map"}var t="\n";if(this.css.indexOf("\r\n")!==-1)t="\r\n";this.css+=t+"/*# sourceMappingURL="+e+" */"};e.outputFile=function outputFile(){if(this.opts.to){return this.relative(this.opts.to)}if(this.opts.from){return this.relative(this.opts.from)}return"to.css"};e.generateMap=function generateMap(){this.generateString();if(this.isSourcesContent())this.setSourcesContent();if(this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline()){return[this.css]}return[this.css,this.map]};e.relative=function relative(e){if(e.indexOf("<")===0)return e;if(/^\w+:\/\//.test(e))return e;var t=this.opts.to?i.default.dirname(this.opts.to):".";if(typeof this.mapOpts.annotation==="string"){t=i.default.dirname(i.default.resolve(t,this.mapOpts.annotation))}e=i.default.relative(t,e);if(i.default.sep==="\\"){return e.replace(/\\/g,"/")}return e};e.sourcePath=function sourcePath(e){if(this.mapOpts.from){return this.mapOpts.from}return this.relative(e.source.input.from)};e.generateString=function generateString(){var e=this;this.css="";this.map=new n.default.SourceMapGenerator({file:this.outputFile()});var t=1;var r=1;var i,s;this.stringify(this.root,function(n,o,u){e.css+=n;if(o&&u!=="end"){if(o.source&&o.source.start){e.map.addMapping({source:e.sourcePath(o),generated:{line:t,column:r-1},original:{line:o.source.start.line,column:o.source.start.column-1}})}else{e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:t,column:r-1}})}}i=n.match(/\n/g);if(i){t+=i.length;s=n.lastIndexOf("\n");r=n.length-s}else{r+=n.length}if(o&&u!=="start"){var a=o.parent||{raws:{}};if(o.type!=="decl"||o!==a.last||a.raws.semicolon){if(o.source&&o.source.end){e.map.addMapping({source:e.sourcePath(o),generated:{line:t,column:r-2},original:{line:o.source.end.line,column:o.source.end.column-1}})}else{e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:t,column:r-1}})}}}})};e.generate=function generate(){this.clearAnnotation();if(this.isMap()){return this.generateMap()}var e="";this.stringify(this.root,function(t){e+=t});return[e]};return MapGenerator}();var o=s;t.default=o;e.exports=t.default},497:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(535));var i=_interopRequireDefault(r(935));var s=_interopRequireDefault(r(549));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneNode(e,t){var r=new e.constructor;for(var n in e){if(!e.hasOwnProperty(n))continue;var i=e[n];var s=typeof i;if(n==="parent"&&s==="object"){if(t)r[n]=t}else if(n==="source"){r[n]=i}else if(i instanceof Array){r[n]=i.map(function(e){return cloneNode(e,r)})}else{if(s==="object"&&i!==null)i=cloneNode(i);r[n]=i}}return r}var o=function(){function Node(e){if(e===void 0){e={}}this.raws={};if(process.env.NODE_ENV!=="production"){if(typeof e!=="object"&&typeof e!=="undefined"){throw new Error("PostCSS nodes constructor accepts object, not "+JSON.stringify(e))}}for(var t in e){this[t]=e[t]}}var e=Node.prototype;e.error=function error(e,t){if(t===void 0){t={}}if(this.source){var r=this.positionBy(t);return this.source.input.error(e,r.line,r.column,t)}return new n.default(e)};e.warn=function warn(e,t,r){var n={node:this};for(var i in r){n[i]=r[i]}return e.warn(t,n)};e.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};e.toString=function toString(e){if(e===void 0){e=s.default}if(e.stringify)e=e.stringify;var t="";e(this,function(e){t+=e});return t};e.clone=function clone(e){if(e===void 0){e={}}var t=cloneNode(this);for(var r in e){t[r]=e[r]}return t};e.cloneBefore=function cloneBefore(e){if(e===void 0){e={}}var t=this.clone(e);this.parent.insertBefore(this,t);return t};e.cloneAfter=function cloneAfter(e){if(e===void 0){e={}}var t=this.clone(e);this.parent.insertAfter(this,t);return t};e.replaceWith=function replaceWith(){if(this.parent){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(570));var i=_interopRequireDefault(r(905));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e,t){var r=new i.default(e,t);var s=new n.default(r);try{s.parse()}catch(e){if(process.env.NODE_ENV!=="production"){if(e.name==="CssSyntaxError"&&t&&t.from){if(/\.scss$/i.test(t.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(t.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(t.from)){e.message+="\nYou tried to parse Less with "+"the standard CSS parser; "+"try again with the postcss-less parser"}}}throw e}return s.root}var s=parse;t.default=s;e.exports=t.default},570:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(605));var i=_interopRequireDefault(r(926));var s=_interopRequireDefault(r(259));var o=_interopRequireDefault(r(217));var u=_interopRequireDefault(r(907));var a=_interopRequireDefault(r(797));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var f=function(){function Parser(e){this.input=e;this.root=new u.default;this.current=this.root;this.spaces="";this.semicolon=false;this.createTokenizer();this.root.source={input:e,start:{line:1,column:1}}}var e=Parser.prototype;e.createTokenizer=function createTokenizer(){this.tokenizer=(0,i.default)(this.input)};e.parse=function parse(){var e;while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();switch(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()};e.comment=function comment(e){var t=new s.default;this.init(t,e[2],e[3]);t.source.end={line:e[4],column:e[5]};var r=e[1].slice(2,-2);if(/^\s*$/.test(r)){t.text="";t.raws.left=r;t.raws.right=""}else{var n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);t.text=n[2];t.raws.left=n[1];t.raws.right=n[3]}};e.emptyRule=function emptyRule(e){var t=new a.default;this.init(t,e[2],e[3]);t.selector="";t.raws.between="";this.current=t};e.other=function other(e){var t=false;var r=null;var n=false;var i=null;var s=[];var o=[];var u=e;while(u){r=u[0];o.push(u);if(r==="("||r==="["){if(!i)i=u;s.push(r==="("?")":"]")}else if(s.length===0){if(r===";"){if(n){this.decl(o);return}else{break}}else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop());t=true;break}else if(r===":"){n=true}}else if(r===s[s.length-1]){s.pop();if(s.length===0)i=null}u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())t=true;if(s.length>0)this.unclosedBracket(i);if(t&&n){while(o.length){u=o[o.length-1][0];if(u!=="space"&&u!=="comment")break;this.tokenizer.back(o.pop())}this.decl(o)}else{this.unknownWord(o)}};e.rule=function rule(e){e.pop();var t=new a.default;this.init(t,e[0][2],e[0][3]);t.raws.between=this.spacesAndCommentsFromEnd(e);this.raw(t,"selector",e);this.current=t};e.decl=function decl(e){var t=new n.default;this.init(t);var r=e[e.length-1];if(r[0]===";"){this.semicolon=true;e.pop()}if(r[4]){t.source.end={line:r[4],column:r[5]}}else{t.source.end={line:r[2],column:r[3]}}while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);t.raws.before+=e.shift()[1]}t.source.start={line:e[0][2],column:e[0][3]};t.prop="";while(e.length){var i=e[0][0];if(i===":"||i==="space"||i==="comment"){break}t.prop+=e.shift()[1]}t.raws.between="";var s;while(e.length){s=e.shift();if(s[0]===":"){t.raws.between+=s[1];break}else{if(s[0]==="word"&&/\w/.test(s[1])){this.unknownWord([s])}t.raws.between+=s[1]}}if(t.prop[0]==="_"||t.prop[0]==="*"){t.raws.before+=t.prop[0];t.prop=t.prop.slice(1)}t.raws.between+=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(var o=e.length-1;o>0;o--){s=e[o];if(s[1].toLowerCase()==="!important"){t.important=true;var u=this.stringFrom(e,o);u=this.spacesFromEnd(e)+u;if(u!==" !important")t.raws.important=u;break}else if(s[1].toLowerCase()==="important"){var a=e.slice(0);var f="";for(var l=o;l>0;l--){var c=a[l][0];if(f.trim().indexOf("!")===0&&c!=="space"){break}f=a.pop()[1]+f}if(f.trim().indexOf("!")===0){t.important=true;t.raws.important=f;e=a}}if(s[0]!=="space"&&s[0]!=="comment"){break}}this.raw(t,"value",e);if(t.value.indexOf(":")!==-1)this.checkMissedSemicolon(e)};e.atrule=function atrule(e){var t=new o.default;t.name=e[1].slice(1);if(t.name===""){this.unnamedAtrule(t,e)}this.init(t,e[2],e[3]);var r;var n;var i=false;var s=false;var u=[];while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();if(e[0]===";"){t.source.end={line:e[2],column:e[3]};this.semicolon=true;break}else if(e[0]==="{"){s=true;break}else if(e[0]==="}"){if(u.length>0){n=u.length-1;r=u[n];while(r&&r[0]==="space"){r=u[--n]}if(r){t.source.end={line:r[4],column:r[5]}}}this.end(e);break}else{u.push(e)}if(this.tokenizer.endOfFile()){i=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(u);if(u.length){t.raws.afterName=this.spacesAndCommentsFromStart(u);this.raw(t,"params",u);if(i){e=u[u.length-1];t.source.end={line:e[4],column:e[5]};this.spaces=t.raws.between;t.raws.between=""}}else{t.raws.afterName="";t.params=""}if(s){t.nodes=[];this.current=t}};e.end=function end(e){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={line:e[2],column:e[3]};this.current=this.current.parent}else{this.unexpectedClose(e)}};e.endFile=function 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};e.freeSemicolon=function freeSemicolon(e){this.spaces+=e[1];if(this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];if(t&&t.type==="rule"&&!t.raws.ownSemicolon){t.raws.ownSemicolon=this.spaces;this.spaces=""}}};e.init=function init(e,t,r){this.current.push(e);e.source={start:{line:t,column:r},input:this.input};e.raws.before=this.spaces;this.spaces="";if(e.type!=="comment")this.semicolon=false};e.raw=function raw(e,t,r){var n,i;var s=r.length;var o="";var u=true;var a,f;var l=/^([.|#])?([\w])+/i;for(var c=0;c=0;i--){n=e[i];if(n[0]!=="space"){r+=1;if(r===2)break}}throw this.input.error("Missed semicolon",n[2],n[3])};return Parser}();t.default=f;e.exports=t.default},633:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(605));var i=_interopRequireDefault(r(74));var s=_interopRequireDefault(r(549));var o=_interopRequireDefault(r(259));var u=_interopRequireDefault(r(217));var a=_interopRequireDefault(r(216));var f=_interopRequireDefault(r(749));var l=_interopRequireDefault(r(9));var c=_interopRequireDefault(r(797));var h=_interopRequireDefault(r(907));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function postcss(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(241));var i=_interopRequireDefault(r(622));var s=_interopRequireDefault(r(747));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function fromBase64(e){if(Buffer){return Buffer.from(e,"base64").toString()}else{return window.atob(e)}}var o=function(){function PreviousMap(e,t){this.loadAnnotation(e);this.inline=this.startWith(this.annotation,"data:");var r=t.map?t.map.prev:undefined;var n=this.loadMap(t.from,r);if(n)this.text=n}var e=PreviousMap.prototype;e.consumer=function consumer(){if(!this.consumerCache){this.consumerCache=new n.default.SourceMapConsumer(this.text)}return this.consumerCache};e.withContent=function withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)};e.startWith=function startWith(e,t){if(!e)return false;return e.substr(0,t.length)===t};e.getAnnotationURL=function getAnnotationURL(e){return e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//)[1].trim()};e.loadAnnotation=function loadAnnotation(e){var t=e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//gm);if(t&&t.length>0){var r=t[t.length-1];if(r){this.annotation=this.getAnnotationURL(r)}}};e.decodeInline=function decodeInline(e){var t=/^data:application\/json;charset=utf-?8;base64,/;var r=/^data:application\/json;base64,/;var n="data:application/json,";if(this.startWith(e,n)){return decodeURIComponent(e.substr(n.length))}if(t.test(e)||r.test(e)){return fromBase64(e.substr(RegExp.lastMatch.length))}var i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)};e.loadMap=function loadMap(e,t){if(t===false)return false;if(t){if(typeof t==="string"){return t}else if(typeof t==="function"){var r=t(e);if(r&&s.default.existsSync&&s.default.existsSync(r)){return s.default.readFileSync(r,"utf-8").toString().trim()}else{throw new Error("Unable to load previous source map: "+r.toString())}}else if(t instanceof n.default.SourceMapConsumer){return n.default.SourceMapGenerator.fromSourceMap(t).toString()}else if(t instanceof n.default.SourceMapGenerator){return t.toString()}else if(this.isMap(t)){return JSON.stringify(t)}else{throw new Error("Unsupported previous source map format: "+t.toString())}}else if(this.inline){return this.decodeInline(this.annotation)}else if(this.annotation){var o=this.annotation;if(e)o=i.default.join(i.default.dirname(e),o);this.root=i.default.dirname(o);if(s.default.existsSync&&s.default.existsSync(o)){return s.default.readFileSync(o,"utf-8").toString().trim()}else{return false}}};e.isMap=function isMap(e){if(typeof e!=="object")return false;return typeof e.mappings==="string"||typeof e._mappings==="string"};return PreviousMap}();var u=o;t.default=u;e.exports=t.default},74:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(169));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i=function(){function Processor(e){if(e===void 0){e=[]}this.version="7.0.32";this.plugins=this.normalize(e)}var e=Processor.prototype;e.use=function use(e){this.plugins=this.plugins.concat(this.normalize([e]));return this};e.process=function(e){function process(t){return e.apply(this,arguments)}process.toString=function(){return e.toString()};return process}(function(e,t){if(t===void 0){t={}}if(this.plugins.length===0&&t.parser===t.stringifier){if(process.env.NODE_ENV!=="production"){if(typeof console!=="undefined"&&console.warn){console.warn("You did not set any plugins, parser, or stringifier. "+"Right now, PostCSS does nothing. Pick plugins for your case "+"on https://www.postcss.parts/ and use them in postcss.config.js.")}}}return new n.default(this,e,t)});e.normalize=function normalize(e){var t=[];for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{i=r.next();if(i.done)break;s=i.value}var o=s;if(o.postcss)o=o.postcss;if(typeof o==="object"&&Array.isArray(o.plugins)){t=t.concat(o.plugins)}else if(typeof o==="function"){t.push(o)}else if(typeof o==="object"&&(o.parse||o.stringify)){if(process.env.NODE_ENV!=="production"){throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use "+"one of the syntax/parser/stringifier options as outlined "+"in your PostCSS runner documentation.")}}else{throw new Error(o+" is not a PostCSS plugin")}}return t};return Processor}();var s=i;t.default=s;e.exports=t.default},613:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(338));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(878));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(Root,e);function Root(t){var r;r=e.call(this,t)||this;r.type="root";if(!r.nodes)r.nodes=[];return r}var t=Root.prototype;t.removeChild=function removeChild(t,r){var n=this.index(t);if(!r&&n===0&&this.nodes.length>1){this.nodes[1].raws.before=this.nodes[n].raws.before}return e.prototype.removeChild.call(this,t)};t.normalize=function normalize(t,r,n){var i=e.prototype.normalize.call(this,t);if(r){if(n==="prepend"){if(this.nodes.length>1){r.raws.before=this.nodes[1].raws.before}else{delete r.raws.before}}else if(this.first!==r){for(var s=i,o=Array.isArray(s),u=0,s=o?s:s[Symbol.iterator]();;){var a;if(o){if(u>=s.length)break;a=s[u++]}else{u=s.next();if(u.done)break;a=u.value}var f=a;f.raws.before=r.raws.before}}}return i};t.toResult=function toResult(e){if(e===void 0){e={}}var t=r(169);var n=r(74);var i=new t(new n,this,e);return i.stringify()};return Root}(n.default);var s=i;t.default=s;e.exports=t.default},797:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(878));var i=_interopRequireDefault(r(9));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r{"use strict";t.__esModule=true;t.default=void 0;var r={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:false};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}var n=function(){function Stringifier(e){this.builder=e}var e=Stringifier.prototype;e.stringify=function stringify(e,t){this[e.type](e,t)};e.root=function root(e){this.body(e);if(e.raws.after)this.builder(e.raws.after)};e.comment=function comment(e){var t=this.raw(e,"left","commentLeft");var r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)};e.decl=function decl(e,t){var r=this.raw(e,"between","colon");var n=e.prop+r+this.rawValue(e,"value");if(e.important){n+=e.raws.important||" !important"}if(t)n+=";";this.builder(n,e)};e.rule=function rule(e){this.block(e,this.rawValue(e,"selector"));if(e.raws.ownSemicolon){this.builder(e.raws.ownSemicolon,e,"end")}};e.atrule=function atrule(e,t){var r="@"+e.name;var n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!=="undefined"){r+=e.raws.afterName}else if(n){r+=" "}if(e.nodes){this.block(e,r+n)}else{var i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}};e.body=function body(e){var t=e.nodes.length-1;while(t>0){if(e.nodes[t].type!=="comment")break;t-=1}var r=this.raw(e,"semicolon");for(var n=0;n0){if(typeof e.raws.after!=="undefined"){t=e.raws.after;if(t.indexOf("\n")!==-1){t=t.replace(/[^\n]+$/,"")}return false}}});if(t)t=t.replace(/[^\s]/g,"");return t};e.rawBeforeOpen=function rawBeforeOpen(e){var t;e.walk(function(e){if(e.type!=="decl"){t=e.raws.between;if(typeof t!=="undefined")return false}});return t};e.rawColon=function rawColon(e){var t;e.walkDecls(function(e){if(typeof e.raws.between!=="undefined"){t=e.raws.between.replace(/[^\s:]/g,"");return false}});return t};e.beforeAfter=function beforeAfter(e,t){var r;if(e.type==="decl"){r=this.raw(e,null,"beforeDecl")}else if(e.type==="comment"){r=this.raw(e,null,"beforeComment")}else if(t==="before"){r=this.raw(e,null,"beforeRule")}else{r=this.raw(e,null,"beforeClose")}var n=e.parent;var i=0;while(n&&n.type!=="root"){i+=1;n=n.parent}if(r.indexOf("\n")!==-1){var s=this.raw(e,null,"indent");if(s.length){for(var o=0;o{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(935));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringify(e,t){var r=new n.default(t);r.stringify(e)}var i=stringify;t.default=i;e.exports=t.default},300:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(242));var i=_interopRequireDefault(r(926));var s=_interopRequireDefault(r(905));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var o={brackets:n.default.cyan,"at-word":n.default.cyan,comment:n.default.gray,string:n.default.green,class:n.default.yellow,call:n.default.cyan,hash:n.default.magenta,"(":n.default.cyan,")":n.default.cyan,"{":n.default.yellow,"}":n.default.yellow,"[":n.default.yellow,"]":n.default.yellow,":":n.default.yellow,";":n.default.yellow};function getTokenType(e,t){var r=e[0],n=e[1];if(r==="word"){if(n[0]==="."){return"class"}if(n[0]==="#"){return"hash"}}if(!t.endOfFile()){var i=t.nextToken();t.back(i);if(i[0]==="brackets"||i[0]==="(")return"call"}return r}function terminalHighlight(e){var t=(0,i.default)(new s.default(e),{ignoreErrors:true});var r="";var n=function _loop(){var e=t.nextToken();var n=o[getTokenType(e,t)];if(n){r+=e[1].split(/\r?\n/).map(function(e){return n(e)}).join("\n")}else{r+=e[1]}};while(!t.endOfFile()){n()}return r}var u=terminalHighlight;t.default=u;e.exports=t.default},926:(e,t)=>{"use strict";t.__esModule=true;t.default=tokenizer;var r="'".charCodeAt(0);var n='"'.charCodeAt(0);var i="\\".charCodeAt(0);var s="/".charCodeAt(0);var o="\n".charCodeAt(0);var u=" ".charCodeAt(0);var a="\f".charCodeAt(0);var f="\t".charCodeAt(0);var l="\r".charCodeAt(0);var c="[".charCodeAt(0);var h="]".charCodeAt(0);var p="(".charCodeAt(0);var d=")".charCodeAt(0);var v="{".charCodeAt(0);var w="}".charCodeAt(0);var m=";".charCodeAt(0);var g="*".charCodeAt(0);var y=":".charCodeAt(0);var b="@".charCodeAt(0);var R=/[ \n\t\r\f{}()'"\\;/[\]#]/g;var C=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g;var S=/.[\\/("'\n]/;var O=/[a-f0-9]/i;function tokenizer(e,t){if(t===void 0){t={}}var A=e.css.valueOf();var M=t.ignoreErrors;var D,k,x,E,q,N,B;var I,F,T,j,z,L,P;var V=A.length;var W=-1;var U=1;var $=0;var G=[];var Y=[];function position(){return $}function unclosed(t){throw e.error("Unclosed "+t,U,$-W)}function endOfFile(){return Y.length===0&&$>=V}function nextToken(e){if(Y.length)return Y.pop();if($>=V)return;var t=e?e.ignoreUnclosed:false;D=A.charCodeAt($);if(D===o||D===a||D===l&&A.charCodeAt($+1)!==o){W=$;U+=1}switch(D){case o:case u:case f:case l:case a:k=$;do{k+=1;D=A.charCodeAt(k);if(D===o){W=k;U+=1}}while(D===u||D===o||D===f||D===l||D===a);P=["space",A.slice($,k)];$=k-1;break;case c:case h:case v:case w:case y:case m:case d:var J=String.fromCharCode(D);P=[J,J,U,$-W];break;case p:z=G.length?G.pop()[1]:"";L=A.charCodeAt($+1);if(z==="url"&&L!==r&&L!==n&&L!==u&&L!==o&&L!==f&&L!==a&&L!==l){k=$;do{T=false;k=A.indexOf(")",k+1);if(k===-1){if(M||t){k=$;break}else{unclosed("bracket")}}j=k;while(A.charCodeAt(j-1)===i){j-=1;T=!T}}while(T);P=["brackets",A.slice($,k+1),U,$-W,U,k-W];$=k}else{k=A.indexOf(")",$+1);N=A.slice($,k+1);if(k===-1||S.test(N)){P=["(","(",U,$-W]}else{P=["brackets",N,U,$-W,U,k-W];$=k}}break;case r:case n:x=D===r?"'":'"';k=$;do{T=false;k=A.indexOf(x,k+1);if(k===-1){if(M||t){k=$+1;break}else{unclosed("string")}}j=k;while(A.charCodeAt(j-1)===i){j-=1;T=!T}}while(T);N=A.slice($,k+1);E=N.split("\n");q=E.length-1;if(q>0){I=U+q;F=k-E[q].length}else{I=U;F=W}P=["string",A.slice($,k+1),U,$-W,I,k-F];W=F;U=I;$=k;break;case b:R.lastIndex=$+1;R.test(A);if(R.lastIndex===0){k=A.length-1}else{k=R.lastIndex-2}P=["at-word",A.slice($,k+1),U,$-W,U,k-W];$=k;break;case i:k=$;B=true;while(A.charCodeAt(k+1)===i){k+=1;B=!B}D=A.charCodeAt(k+1);if(B&&D!==s&&D!==u&&D!==o&&D!==f&&D!==l&&D!==a){k+=1;if(O.test(A.charAt(k))){while(O.test(A.charAt(k+1))){k+=1}if(A.charCodeAt(k+1)===u){k+=1}}}P=["word",A.slice($,k+1),U,$-W,U,k-W];$=k;break;default:if(D===s&&A.charCodeAt($+1)===g){k=A.indexOf("*/",$+2)+1;if(k===0){if(M||t){k=A.length}else{unclosed("comment")}}N=A.slice($,k+1);E=N.split("\n");q=E.length-1;if(q>0){I=U+q;F=k-E[q].length}else{I=U;F=W}P=["comment",N,U,$-W,I,k-F];W=F;U=I;$=k}else{C.lastIndex=$+1;C.test(A);if(C.lastIndex===0){k=A.length-1}else{k=C.lastIndex-2}P=["word",A.slice($,k+1),U,$-W,U,k-W];G.push(P);$=k}break}$++;return P}function back(e){Y.push(e)}return{back:back,nextToken:nextToken,endOfFile:endOfFile,position:position}}e.exports=t.default},216:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r={prefix:function prefix(e){var t=e.match(/^(-\w+-)/);if(t){return t[0]}return""},unprefixed:function unprefixed(e){return e.replace(/^-\w+-/,"")}};var n=r;t.default=n;e.exports=t.default},831:(e,t)=>{"use strict";t.__esModule=true;t.default=warnOnce;var r={};function warnOnce(e){if(r[e])return;r[e]=true;if(typeof console!=="undefined"&&console.warn){console.warn(e)}}e.exports=t.default},338:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r=function(){function Warning(e,t){if(t===void 0){t={}}this.type="warning";this.text=e;if(t.node&&t.node.source){var r=t.node.positionBy(t);this.line=r.line;this.column=r.column}for(var n in t){this[n]=t[n]}}var e=Warning.prototype;e.toString=function toString(){if(this.node){return this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message}if(this.plugin){return this.plugin+": "+this.text}return this.text};return Warning}();var n=r;t.default=n;e.exports=t.default},327:(e,t,r)=>{"use strict";const n=r(87);const i=r(379);const{env:s}=process;let o;if(i("no-color")||i("no-colors")||i("color=false")||i("color=never")){o=0}else if(i("color")||i("colors")||i("color=true")||i("color=always")){o=1}if("FORCE_COLOR"in s){if(s.FORCE_COLOR===true||s.FORCE_COLOR==="true"){o=1}else if(s.FORCE_COLOR===false||s.FORCE_COLOR==="false"){o=0}else{o=s.FORCE_COLOR.length===0?1:Math.min(parseInt(s.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(o===0){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!e.isTTY&&o===undefined){return 0}const t=o||0;if(s.TERM==="dumb"){return t}if(process.platform==="win32"){const e=n.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in s){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in s)||s.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in s){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0}if(s.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(s.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)){return 1}if("COLORTERM"in s){return 1}return t}function getSupportLevel(e){const t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},242:e=>{"use strict";e.exports=require("chalk")},747:e=>{"use strict";e.exports=require("fs")},241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={exports:{}};var i=true;try{e[r](n,n.exports,__webpack_require__);i=false}finally{if(i)delete t[r]}return n.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(350)})(); \ No newline at end of file +module.exports=(()=>{var e={379:e=>{"use strict";e.exports=((e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const n=t.indexOf(r+e);const i=t.indexOf("--");return n!==-1&&(i===-1?true:n{var n=r(633);function shouldSetZeroBasis(e){if(!e){return false}return e==="0"||e.replace(/\s/g,"")==="0px"}function properBasis(e){if(shouldSetZeroBasis(e)){return"0%"}return e}e.exports=function(e){if(e.prop==="flex"){var t=n.list.space(e.value);var r="0";var i="1";var s="0%";if(t[0]){r=t[0]}if(t[1]){if(!isNaN(t[1])){i=t[1]}else{s=t[1]}}if(t[2]){s=t[2]}e.value=r+" "+i+" "+properBasis(s)}}},196:(e,t,r)=>{var n=r(633);e.exports=function(e){if(e.prop==="flex"){var t=n.list.space(e.value);var r=t[0];var i=t[1]||"1";var s=t[2]||"0%";if(s==="0%")s=null;e.value=r+" "+i+(s?" "+s:"")}}},136:(e,t,r)=>{var n=r(633);e.exports=function(e){var t=/(\d{1,}) (\d{1,}) (calc\(.*\))/g;var r=t.exec(e.value);if(e.prop==="flex"&&r){var i=n.decl({prop:"flex-grow",value:r[1],source:e.source});var s=n.decl({prop:"flex-shrink",value:r[2],source:e.source});var o=n.decl({prop:"flex-basis",value:r[3],source:e.source});e.parent.insertBefore(e,i);e.parent.insertBefore(e,s);e.parent.insertBefore(e,o);e.remove()}}},350:(e,t,r)=>{var n=r(633);var i=r(369);var s=r(196);var o=r(136);var u=["none","auto","content","inherit","initial","unset"];e.exports=n.plugin("postcss-flexbugs-fixes",function(e){var t=Object.assign({bug4:true,bug6:true,bug81a:true},e);return function(e){e.walkDecls(function(e){if(e.value.indexOf("var(")>-1){return}if(e.value==="none"){return}var r=n.list.space(e.value);if(u.indexOf(e.value)>0&&r.length===1){return}if(t.bug4){i(e)}if(t.bug6){s(e)}if(t.bug81a){o(e)}})}})},217:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(878));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(AtRule,e);function AtRule(t){var r;r=e.call(this,t)||this;r.type="atrule";return r}var t=AtRule.prototype;t.append=function append(){var t;if(!this.nodes)this.nodes=[];for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(Comment,e);function Comment(t){var r;r=e.call(this,t)||this;r.type="comment";return r}return Comment}(n.default);var s=i;t.default=s;e.exports=t.default},878:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(605));var i=_interopRequireDefault(r(259));var s=_interopRequireDefault(r(497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r=u.length)break;l=u[f++]}else{f=u.next();if(f.done)break;l=f.value}var c=l;this.nodes.push(c)}}return this};t.prepend=function prepend(){for(var e=arguments.length,t=new Array(e),r=0;r=n.length)break;o=n[s++]}else{s=n.next();if(s.done)break;o=s.value}var u=o;var a=this.normalize(u,this.first,"prepend").reverse();for(var f=a,l=Array.isArray(f),c=0,f=l?f:f[Symbol.iterator]();;){var h;if(l){if(c>=f.length)break;h=f[c++]}else{c=f.next();if(c.done)break;h=c.value}var p=h;this.nodes.unshift(p)}for(var d in this.indexes){this.indexes[d]=this.indexes[d]+a.length}}return this};t.cleanRaws=function cleanRaws(t){e.prototype.cleanRaws.call(this,t);if(this.nodes){for(var r=this.nodes,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{i=r.next();if(i.done)break;s=i.value}var o=s;o.cleanRaws(t)}}};t.insertBefore=function insertBefore(e,t){e=this.index(e);var r=e===0?"prepend":false;var n=this.normalize(t,this.nodes[e],r).reverse();for(var i=n,s=Array.isArray(i),o=0,i=s?i:i[Symbol.iterator]();;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{o=i.next();if(o.done)break;u=o.value}var a=u;this.nodes.splice(e,0,a)}var f;for(var l in this.indexes){f=this.indexes[l];if(e<=f){this.indexes[l]=f+n.length}}return this};t.insertAfter=function insertAfter(e,t){e=this.index(e);var r=this.normalize(t,this.nodes[e]).reverse();for(var n=r,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var o;if(i){if(s>=n.length)break;o=n[s++]}else{s=n.next();if(s.done)break;o=s.value}var u=o;this.nodes.splice(e+1,0,u)}var a;for(var f in this.indexes){a=this.indexes[f];if(e=e){this.indexes[r]=t-1}}return this};t.removeAll=function removeAll(){for(var e=this.nodes,t=Array.isArray(e),r=0,e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{r=e.next();if(r.done)break;n=r.value}var i=n;i.parent=undefined}this.nodes=[];return this};t.replaceValues=function replaceValues(e,t,r){if(!r){r=t;t={}}this.walkDecls(function(n){if(t.props&&t.props.indexOf(n.prop)===-1)return;if(t.fast&&n.value.indexOf(t.fast)===-1)return;n.value=n.value.replace(e,r)});return this};t.every=function every(e){return this.nodes.every(e)};t.some=function some(e){return this.nodes.some(e)};t.index=function index(e){if(typeof e==="number"){return e}return this.nodes.indexOf(e)};t.normalize=function normalize(e,t){var s=this;if(typeof e==="string"){var o=r(749);e=cleanSource(o(e).nodes)}else if(Array.isArray(e)){e=e.slice(0);for(var u=e,a=Array.isArray(u),f=0,u=a?u:u[Symbol.iterator]();;){var l;if(a){if(f>=u.length)break;l=u[f++]}else{f=u.next();if(f.done)break;l=f.value}var c=l;if(c.parent)c.parent.removeChild(c,"ignore")}}else if(e.type==="root"){e=e.nodes.slice(0);for(var h=e,p=Array.isArray(h),d=0,h=p?h:h[Symbol.iterator]();;){var v;if(p){if(d>=h.length)break;v=h[d++]}else{d=h.next();if(d.done)break;v=d.value}var w=v;if(w.parent)w.parent.removeChild(w,"ignore")}}else if(e.type){e=[e]}else if(e.prop){if(typeof e.value==="undefined"){throw new Error("Value field is missed in node creation")}else if(typeof e.value!=="string"){e.value=String(e.value)}e=[new n.default(e)]}else if(e.selector){var m=r(797);e=[new m(e)]}else if(e.name){var g=r(217);e=[new g(e)]}else if(e.text){e=[new i.default(e)]}else{throw new Error("Unknown node type in node creation")}var y=e.map(function(e){if(e.parent)e.parent.removeChild(e);if(typeof e.raws.before==="undefined"){if(t&&typeof t.raws.before!=="undefined"){e.raws.before=t.raws.before.replace(/[^\s]/g,"")}}e.parent=s;return e});return y};_createClass(Container,[{key:"first",get:function get(){if(!this.nodes)return undefined;return this.nodes[0]}},{key:"last",get:function get(){if(!this.nodes)return undefined;return this.nodes[this.nodes.length-1]}}]);return Container}(s.default);var u=o;t.default=u;e.exports=t.default},535:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(327));var i=_interopRequireDefault(r(242));var s=_interopRequireDefault(r(300));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _assertThisInitialized(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function _wrapNativeSuper(e){var t=typeof Map==="function"?new Map:undefined;_wrapNativeSuper=function _wrapNativeSuper(e){if(e===null||!_isNativeFunction(e))return e;if(typeof e!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof t!=="undefined"){if(t.has(e))return t.get(e);t.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,e)};return _wrapNativeSuper(e)}function isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}function _construct(e,t,r){if(isNativeReflectConstruct()){_construct=Reflect.construct}else{_construct=function _construct(e,t,r){var n=[null];n.push.apply(n,t);var i=Function.bind.apply(e,n);var s=new i;if(r)_setPrototypeOf(s,r.prototype);return s}}return _construct.apply(null,arguments)}function _isNativeFunction(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function _setPrototypeOf(e,t){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e};return _setPrototypeOf(e,t)}function _getPrototypeOf(e){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(e)}var o=function(e){_inheritsLoose(CssSyntaxError,e);function CssSyntaxError(t,r,n,i,s,o){var u;u=e.call(this,t)||this;u.name="CssSyntaxError";u.reason=t;if(s){u.file=s}if(i){u.source=i}if(o){u.plugin=o}if(typeof r!=="undefined"&&typeof n!=="undefined"){u.line=r;u.column=n}u.setMessage();if(Error.captureStackTrace){Error.captureStackTrace(_assertThisInitialized(u),CssSyntaxError)}return u}var t=CssSyntaxError.prototype;t.setMessage=function setMessage(){this.message=this.plugin?this.plugin+": ":"";this.message+=this.file?this.file:"";if(typeof this.line!=="undefined"){this.message+=":"+this.line+":"+this.column}this.message+=": "+this.reason};t.showSourceCode=function showSourceCode(e){var t=this;if(!this.source)return"";var r=this.source;if(s.default){if(typeof e==="undefined")e=n.default.stdout;if(e)r=(0,s.default)(r)}var o=r.split(/\r?\n/);var u=Math.max(this.line-3,0);var a=Math.min(this.line+2,o.length);var f=String(a).length;function mark(t){if(e&&i.default.red){return i.default.red.bold(t)}return t}function aside(t){if(e&&i.default.gray){return i.default.gray(t)}return t}return o.slice(u,a).map(function(e,r){var n=u+1+r;var i=" "+(" "+n).slice(-f)+" | ";if(n===t.line){var s=aside(i.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return mark(">")+aside(i)+e+"\n "+s+mark("^")}return" "+aside(i)+e}).join("\n")};t.toString=function toString(){var e=this.showSourceCode();if(e){e="\n\n"+e+"\n"}return this.name+": "+this.message+e};return CssSyntaxError}(_wrapNativeSuper(Error));var u=o;t.default=u;e.exports=t.default},605:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(Declaration,e);function Declaration(t){var r;r=e.call(this,t)||this;r.type="decl";return r}return Declaration}(n.default);var s=i;t.default=s;e.exports=t.default},905:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(622));var i=_interopRequireDefault(r(535));var s=_interopRequireDefault(r(713));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r"}if(this.map)this.map.file=this.from}var e=Input.prototype;e.error=function error(e,t,r,n){if(n===void 0){n={}}var s;var o=this.origin(t,r);if(o){s=new i.default(e,o.line,o.column,o.source,o.file,n.plugin)}else{s=new i.default(e,t,r,this.css,this.file,n.plugin)}s.input={line:t,column:r,source:this.css};if(this.file)s.input.file=this.file;return s};e.origin=function origin(e,t){if(!this.map)return false;var r=this.map.consumer();var n=r.originalPositionFor({line:e,column:t});if(!n.source)return false;var i={file:this.mapResolve(n.source),line:n.line,column:n.column};var s=r.sourceContentFor(n.source);if(s)i.source=s;return i};e.mapResolve=function mapResolve(e){if(/^\w+:\/\//.test(e)){return e}return n.default.resolve(this.map.consumer().sourceRoot||".",e)};_createClass(Input,[{key:"from",get:function get(){return this.file||this.id}}]);return Input}();var a=u;t.default=a;e.exports=t.default},169:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(595));var i=_interopRequireDefault(r(549));var s=_interopRequireDefault(r(831));var o=_interopRequireDefault(r(613));var u=_interopRequireDefault(r(749));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;rparseInt(o[1])){console.error("Unknown error from PostCSS plugin. Your current PostCSS "+"version is "+i+", but "+r+" uses "+n+". Perhaps this is the source of the error below.")}}}}catch(e){if(console&&console.error)console.error(e)}};e.asyncTick=function asyncTick(e,t){var r=this;if(this.plugin>=this.processor.plugins.length){this.processed=true;return e()}try{var n=this.processor.plugins[this.plugin];var i=this.run(n);this.plugin+=1;if(isPromise(i)){i.then(function(){r.asyncTick(e,t)}).catch(function(e){r.handleError(e,n);r.processed=true;t(e)})}else{this.asyncTick(e,t)}}catch(e){this.processed=true;t(e)}};e.async=function async(){var e=this;if(this.processed){return new Promise(function(t,r){if(e.error){r(e.error)}else{t(e.stringify())}})}if(this.processing){return this.processing}this.processing=new Promise(function(t,r){if(e.error)return r(e.error);e.plugin=0;e.asyncTick(t,r)}).then(function(){e.processed=true;return e.stringify()});return this.processing};e.sync=function sync(){if(this.processed)return this.result;this.processed=true;if(this.processing){throw new Error("Use process(css).then(cb) to work with async plugins")}if(this.error)throw this.error;for(var e=this.result.processor.plugins,t=Array.isArray(e),r=0,e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{r=e.next();if(r.done)break;n=r.value}var i=n;var s=this.run(i);if(isPromise(s)){throw new Error("Use process(css).then(cb) to work with async plugins")}}return this.result};e.run=function run(e){this.result.lastPlugin=e;try{return e(this.result.root,this.result)}catch(t){this.handleError(t,e);throw t}};e.stringify=function stringify(){if(this.stringified)return this.result;this.stringified=true;this.sync();var e=this.result.opts;var t=i.default;if(e.syntax)t=e.syntax.stringify;if(e.stringifier)t=e.stringifier;if(t.stringify)t=t.stringify;var r=new n.default(t,this.result.root,this.result.opts);var s=r.generate();this.result.css=s[0];this.result.map=s[1];return this.result};_createClass(LazyResult,[{key:"processor",get:function get(){return this.result.processor}},{key:"opts",get:function get(){return this.result.opts}},{key:"css",get:function get(){return this.stringify().css}},{key:"content",get:function get(){return this.stringify().content}},{key:"map",get:function get(){return this.stringify().map}},{key:"root",get:function get(){return this.sync().root}},{key:"messages",get:function get(){return this.sync().messages}}]);return LazyResult}();var f=a;t.default=f;e.exports=t.default},9:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r={split:function split(e,t,r){var n=[];var i="";var split=false;var s=0;var o=false;var u=false;for(var a=0;a0)s-=1}else if(s===0){if(t.indexOf(f)!==-1)split=true}if(split){if(i!=="")n.push(i.trim());i="";split=false}else{i+=f}}if(r||i!=="")n.push(i.trim());return n},space:function space(e){var t=[" ","\n","\t"];return r.split(e,t)},comma:function comma(e){return r.split(e,[","],true)}};var n=r;t.default=n;e.exports=t.default},595:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(241));var i=_interopRequireDefault(r(622));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s=function(){function MapGenerator(e,t,r){this.stringify=e;this.mapOpts=r.map||{};this.root=t;this.opts=r}var e=MapGenerator.prototype;e.isMap=function isMap(){if(typeof this.opts.map!=="undefined"){return!!this.opts.map}return this.previous().length>0};e.previous=function previous(){var e=this;if(!this.previousMaps){this.previousMaps=[];this.root.walk(function(t){if(t.source&&t.source.input.map){var r=t.source.input.map;if(e.previousMaps.indexOf(r)===-1){e.previousMaps.push(r)}}})}return this.previousMaps};e.isInline=function isInline(){if(typeof this.mapOpts.inline!=="undefined"){return this.mapOpts.inline}var e=this.mapOpts.annotation;if(typeof e!=="undefined"&&e!==true){return false}if(this.previous().length){return this.previous().some(function(e){return e.inline})}return true};e.isSourcesContent=function isSourcesContent(){if(typeof this.mapOpts.sourcesContent!=="undefined"){return this.mapOpts.sourcesContent}if(this.previous().length){return this.previous().some(function(e){return e.withContent()})}return true};e.clearAnnotation=function clearAnnotation(){if(this.mapOpts.annotation===false)return;var e;for(var t=this.root.nodes.length-1;t>=0;t--){e=this.root.nodes[t];if(e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0){this.root.removeChild(t)}}};e.setSourcesContent=function setSourcesContent(){var e=this;var t={};this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!t[n]){t[n]=true;var i=e.relative(n);e.map.setSourceContent(i,r.source.input.css)}}})};e.applyPrevMaps=function applyPrevMaps(){for(var e=this.previous(),t=Array.isArray(e),r=0,e=t?e:e[Symbol.iterator]();;){var s;if(t){if(r>=e.length)break;s=e[r++]}else{r=e.next();if(r.done)break;s=r.value}var o=s;var u=this.relative(o.file);var a=o.root||i.default.dirname(o.file);var f=void 0;if(this.mapOpts.sourcesContent===false){f=new n.default.SourceMapConsumer(o.text);if(f.sourcesContent){f.sourcesContent=f.sourcesContent.map(function(){return null})}}else{f=o.consumer()}this.map.applySourceMap(f,u,this.relative(a))}};e.isAnnotation=function isAnnotation(){if(this.isInline()){return true}if(typeof this.mapOpts.annotation!=="undefined"){return this.mapOpts.annotation}if(this.previous().length){return this.previous().some(function(e){return e.annotation})}return true};e.toBase64=function toBase64(e){if(Buffer){return Buffer.from(e).toString("base64")}return window.btoa(unescape(encodeURIComponent(e)))};e.addAnnotation=function addAnnotation(){var e;if(this.isInline()){e="data:application/json;base64,"+this.toBase64(this.map.toString())}else if(typeof this.mapOpts.annotation==="string"){e=this.mapOpts.annotation}else{e=this.outputFile()+".map"}var t="\n";if(this.css.indexOf("\r\n")!==-1)t="\r\n";this.css+=t+"/*# sourceMappingURL="+e+" */"};e.outputFile=function outputFile(){if(this.opts.to){return this.relative(this.opts.to)}if(this.opts.from){return this.relative(this.opts.from)}return"to.css"};e.generateMap=function generateMap(){this.generateString();if(this.isSourcesContent())this.setSourcesContent();if(this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline()){return[this.css]}return[this.css,this.map]};e.relative=function relative(e){if(e.indexOf("<")===0)return e;if(/^\w+:\/\//.test(e))return e;var t=this.opts.to?i.default.dirname(this.opts.to):".";if(typeof this.mapOpts.annotation==="string"){t=i.default.dirname(i.default.resolve(t,this.mapOpts.annotation))}e=i.default.relative(t,e);if(i.default.sep==="\\"){return e.replace(/\\/g,"/")}return e};e.sourcePath=function sourcePath(e){if(this.mapOpts.from){return this.mapOpts.from}return this.relative(e.source.input.from)};e.generateString=function generateString(){var e=this;this.css="";this.map=new n.default.SourceMapGenerator({file:this.outputFile()});var t=1;var r=1;var i,s;this.stringify(this.root,function(n,o,u){e.css+=n;if(o&&u!=="end"){if(o.source&&o.source.start){e.map.addMapping({source:e.sourcePath(o),generated:{line:t,column:r-1},original:{line:o.source.start.line,column:o.source.start.column-1}})}else{e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:t,column:r-1}})}}i=n.match(/\n/g);if(i){t+=i.length;s=n.lastIndexOf("\n");r=n.length-s}else{r+=n.length}if(o&&u!=="start"){var a=o.parent||{raws:{}};if(o.type!=="decl"||o!==a.last||a.raws.semicolon){if(o.source&&o.source.end){e.map.addMapping({source:e.sourcePath(o),generated:{line:t,column:r-2},original:{line:o.source.end.line,column:o.source.end.column-1}})}else{e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:t,column:r-1}})}}}})};e.generate=function generate(){this.clearAnnotation();if(this.isMap()){return this.generateMap()}var e="";this.stringify(this.root,function(t){e+=t});return[e]};return MapGenerator}();var o=s;t.default=o;e.exports=t.default},497:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(535));var i=_interopRequireDefault(r(935));var s=_interopRequireDefault(r(549));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneNode(e,t){var r=new e.constructor;for(var n in e){if(!e.hasOwnProperty(n))continue;var i=e[n];var s=typeof i;if(n==="parent"&&s==="object"){if(t)r[n]=t}else if(n==="source"){r[n]=i}else if(i instanceof Array){r[n]=i.map(function(e){return cloneNode(e,r)})}else{if(s==="object"&&i!==null)i=cloneNode(i);r[n]=i}}return r}var o=function(){function Node(e){if(e===void 0){e={}}this.raws={};if(process.env.NODE_ENV!=="production"){if(typeof e!=="object"&&typeof e!=="undefined"){throw new Error("PostCSS nodes constructor accepts object, not "+JSON.stringify(e))}}for(var t in e){this[t]=e[t]}}var e=Node.prototype;e.error=function error(e,t){if(t===void 0){t={}}if(this.source){var r=this.positionBy(t);return this.source.input.error(e,r.line,r.column,t)}return new n.default(e)};e.warn=function warn(e,t,r){var n={node:this};for(var i in r){n[i]=r[i]}return e.warn(t,n)};e.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};e.toString=function toString(e){if(e===void 0){e=s.default}if(e.stringify)e=e.stringify;var t="";e(this,function(e){t+=e});return t};e.clone=function clone(e){if(e===void 0){e={}}var t=cloneNode(this);for(var r in e){t[r]=e[r]}return t};e.cloneBefore=function cloneBefore(e){if(e===void 0){e={}}var t=this.clone(e);this.parent.insertBefore(this,t);return t};e.cloneAfter=function cloneAfter(e){if(e===void 0){e={}}var t=this.clone(e);this.parent.insertAfter(this,t);return t};e.replaceWith=function replaceWith(){if(this.parent){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(570));var i=_interopRequireDefault(r(905));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e,t){var r=new i.default(e,t);var s=new n.default(r);try{s.parse()}catch(e){if(process.env.NODE_ENV!=="production"){if(e.name==="CssSyntaxError"&&t&&t.from){if(/\.scss$/i.test(t.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(t.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(t.from)){e.message+="\nYou tried to parse Less with "+"the standard CSS parser; "+"try again with the postcss-less parser"}}}throw e}return s.root}var s=parse;t.default=s;e.exports=t.default},570:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(605));var i=_interopRequireDefault(r(926));var s=_interopRequireDefault(r(259));var o=_interopRequireDefault(r(217));var u=_interopRequireDefault(r(907));var a=_interopRequireDefault(r(797));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var f=function(){function Parser(e){this.input=e;this.root=new u.default;this.current=this.root;this.spaces="";this.semicolon=false;this.createTokenizer();this.root.source={input:e,start:{line:1,column:1}}}var e=Parser.prototype;e.createTokenizer=function createTokenizer(){this.tokenizer=(0,i.default)(this.input)};e.parse=function parse(){var e;while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();switch(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()};e.comment=function comment(e){var t=new s.default;this.init(t,e[2],e[3]);t.source.end={line:e[4],column:e[5]};var r=e[1].slice(2,-2);if(/^\s*$/.test(r)){t.text="";t.raws.left=r;t.raws.right=""}else{var n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);t.text=n[2];t.raws.left=n[1];t.raws.right=n[3]}};e.emptyRule=function emptyRule(e){var t=new a.default;this.init(t,e[2],e[3]);t.selector="";t.raws.between="";this.current=t};e.other=function other(e){var t=false;var r=null;var n=false;var i=null;var s=[];var o=[];var u=e;while(u){r=u[0];o.push(u);if(r==="("||r==="["){if(!i)i=u;s.push(r==="("?")":"]")}else if(s.length===0){if(r===";"){if(n){this.decl(o);return}else{break}}else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop());t=true;break}else if(r===":"){n=true}}else if(r===s[s.length-1]){s.pop();if(s.length===0)i=null}u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())t=true;if(s.length>0)this.unclosedBracket(i);if(t&&n){while(o.length){u=o[o.length-1][0];if(u!=="space"&&u!=="comment")break;this.tokenizer.back(o.pop())}this.decl(o)}else{this.unknownWord(o)}};e.rule=function rule(e){e.pop();var t=new a.default;this.init(t,e[0][2],e[0][3]);t.raws.between=this.spacesAndCommentsFromEnd(e);this.raw(t,"selector",e);this.current=t};e.decl=function decl(e){var t=new n.default;this.init(t);var r=e[e.length-1];if(r[0]===";"){this.semicolon=true;e.pop()}if(r[4]){t.source.end={line:r[4],column:r[5]}}else{t.source.end={line:r[2],column:r[3]}}while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);t.raws.before+=e.shift()[1]}t.source.start={line:e[0][2],column:e[0][3]};t.prop="";while(e.length){var i=e[0][0];if(i===":"||i==="space"||i==="comment"){break}t.prop+=e.shift()[1]}t.raws.between="";var s;while(e.length){s=e.shift();if(s[0]===":"){t.raws.between+=s[1];break}else{if(s[0]==="word"&&/\w/.test(s[1])){this.unknownWord([s])}t.raws.between+=s[1]}}if(t.prop[0]==="_"||t.prop[0]==="*"){t.raws.before+=t.prop[0];t.prop=t.prop.slice(1)}t.raws.between+=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(var o=e.length-1;o>0;o--){s=e[o];if(s[1].toLowerCase()==="!important"){t.important=true;var u=this.stringFrom(e,o);u=this.spacesFromEnd(e)+u;if(u!==" !important")t.raws.important=u;break}else if(s[1].toLowerCase()==="important"){var a=e.slice(0);var f="";for(var l=o;l>0;l--){var c=a[l][0];if(f.trim().indexOf("!")===0&&c!=="space"){break}f=a.pop()[1]+f}if(f.trim().indexOf("!")===0){t.important=true;t.raws.important=f;e=a}}if(s[0]!=="space"&&s[0]!=="comment"){break}}this.raw(t,"value",e);if(t.value.indexOf(":")!==-1)this.checkMissedSemicolon(e)};e.atrule=function atrule(e){var t=new o.default;t.name=e[1].slice(1);if(t.name===""){this.unnamedAtrule(t,e)}this.init(t,e[2],e[3]);var r;var n;var i=false;var s=false;var u=[];while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();if(e[0]===";"){t.source.end={line:e[2],column:e[3]};this.semicolon=true;break}else if(e[0]==="{"){s=true;break}else if(e[0]==="}"){if(u.length>0){n=u.length-1;r=u[n];while(r&&r[0]==="space"){r=u[--n]}if(r){t.source.end={line:r[4],column:r[5]}}}this.end(e);break}else{u.push(e)}if(this.tokenizer.endOfFile()){i=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(u);if(u.length){t.raws.afterName=this.spacesAndCommentsFromStart(u);this.raw(t,"params",u);if(i){e=u[u.length-1];t.source.end={line:e[4],column:e[5]};this.spaces=t.raws.between;t.raws.between=""}}else{t.raws.afterName="";t.params=""}if(s){t.nodes=[];this.current=t}};e.end=function end(e){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={line:e[2],column:e[3]};this.current=this.current.parent}else{this.unexpectedClose(e)}};e.endFile=function 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};e.freeSemicolon=function freeSemicolon(e){this.spaces+=e[1];if(this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];if(t&&t.type==="rule"&&!t.raws.ownSemicolon){t.raws.ownSemicolon=this.spaces;this.spaces=""}}};e.init=function init(e,t,r){this.current.push(e);e.source={start:{line:t,column:r},input:this.input};e.raws.before=this.spaces;this.spaces="";if(e.type!=="comment")this.semicolon=false};e.raw=function raw(e,t,r){var n,i;var s=r.length;var o="";var u=true;var a,f;var l=/^([.|#])?([\w])+/i;for(var c=0;c=0;i--){n=e[i];if(n[0]!=="space"){r+=1;if(r===2)break}}throw this.input.error("Missed semicolon",n[2],n[3])};return Parser}();t.default=f;e.exports=t.default},633:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(605));var i=_interopRequireDefault(r(74));var s=_interopRequireDefault(r(549));var o=_interopRequireDefault(r(259));var u=_interopRequireDefault(r(217));var a=_interopRequireDefault(r(216));var f=_interopRequireDefault(r(749));var l=_interopRequireDefault(r(9));var c=_interopRequireDefault(r(797));var h=_interopRequireDefault(r(907));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function postcss(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(241));var i=_interopRequireDefault(r(622));var s=_interopRequireDefault(r(747));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function fromBase64(e){if(Buffer){return Buffer.from(e,"base64").toString()}else{return window.atob(e)}}var o=function(){function PreviousMap(e,t){this.loadAnnotation(e);this.inline=this.startWith(this.annotation,"data:");var r=t.map?t.map.prev:undefined;var n=this.loadMap(t.from,r);if(n)this.text=n}var e=PreviousMap.prototype;e.consumer=function consumer(){if(!this.consumerCache){this.consumerCache=new n.default.SourceMapConsumer(this.text)}return this.consumerCache};e.withContent=function withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)};e.startWith=function startWith(e,t){if(!e)return false;return e.substr(0,t.length)===t};e.getAnnotationURL=function getAnnotationURL(e){return e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//)[1].trim()};e.loadAnnotation=function loadAnnotation(e){var t=e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//gm);if(t&&t.length>0){var r=t[t.length-1];if(r){this.annotation=this.getAnnotationURL(r)}}};e.decodeInline=function decodeInline(e){var t=/^data:application\/json;charset=utf-?8;base64,/;var r=/^data:application\/json;base64,/;var n="data:application/json,";if(this.startWith(e,n)){return decodeURIComponent(e.substr(n.length))}if(t.test(e)||r.test(e)){return fromBase64(e.substr(RegExp.lastMatch.length))}var i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)};e.loadMap=function loadMap(e,t){if(t===false)return false;if(t){if(typeof t==="string"){return t}else if(typeof t==="function"){var r=t(e);if(r&&s.default.existsSync&&s.default.existsSync(r)){return s.default.readFileSync(r,"utf-8").toString().trim()}else{throw new Error("Unable to load previous source map: "+r.toString())}}else if(t instanceof n.default.SourceMapConsumer){return n.default.SourceMapGenerator.fromSourceMap(t).toString()}else if(t instanceof n.default.SourceMapGenerator){return t.toString()}else if(this.isMap(t)){return JSON.stringify(t)}else{throw new Error("Unsupported previous source map format: "+t.toString())}}else if(this.inline){return this.decodeInline(this.annotation)}else if(this.annotation){var o=this.annotation;if(e)o=i.default.join(i.default.dirname(e),o);this.root=i.default.dirname(o);if(s.default.existsSync&&s.default.existsSync(o)){return s.default.readFileSync(o,"utf-8").toString().trim()}else{return false}}};e.isMap=function isMap(e){if(typeof e!=="object")return false;return typeof e.mappings==="string"||typeof e._mappings==="string"};return PreviousMap}();var u=o;t.default=u;e.exports=t.default},74:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(169));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i=function(){function Processor(e){if(e===void 0){e=[]}this.version="7.0.32";this.plugins=this.normalize(e)}var e=Processor.prototype;e.use=function use(e){this.plugins=this.plugins.concat(this.normalize([e]));return this};e.process=function(e){function process(t){return e.apply(this,arguments)}process.toString=function(){return e.toString()};return process}(function(e,t){if(t===void 0){t={}}if(this.plugins.length===0&&t.parser===t.stringifier){if(process.env.NODE_ENV!=="production"){if(typeof console!=="undefined"&&console.warn){console.warn("You did not set any plugins, parser, or stringifier. "+"Right now, PostCSS does nothing. Pick plugins for your case "+"on https://www.postcss.parts/ and use them in postcss.config.js.")}}}return new n.default(this,e,t)});e.normalize=function normalize(e){var t=[];for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{i=r.next();if(i.done)break;s=i.value}var o=s;if(o.postcss)o=o.postcss;if(typeof o==="object"&&Array.isArray(o.plugins)){t=t.concat(o.plugins)}else if(typeof o==="function"){t.push(o)}else if(typeof o==="object"&&(o.parse||o.stringify)){if(process.env.NODE_ENV!=="production"){throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use "+"one of the syntax/parser/stringifier options as outlined "+"in your PostCSS runner documentation.")}}else{throw new Error(o+" is not a PostCSS plugin")}}return t};return Processor}();var s=i;t.default=s;e.exports=t.default},613:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(338));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(878));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(Root,e);function Root(t){var r;r=e.call(this,t)||this;r.type="root";if(!r.nodes)r.nodes=[];return r}var t=Root.prototype;t.removeChild=function removeChild(t,r){var n=this.index(t);if(!r&&n===0&&this.nodes.length>1){this.nodes[1].raws.before=this.nodes[n].raws.before}return e.prototype.removeChild.call(this,t)};t.normalize=function normalize(t,r,n){var i=e.prototype.normalize.call(this,t);if(r){if(n==="prepend"){if(this.nodes.length>1){r.raws.before=this.nodes[1].raws.before}else{delete r.raws.before}}else if(this.first!==r){for(var s=i,o=Array.isArray(s),u=0,s=o?s:s[Symbol.iterator]();;){var a;if(o){if(u>=s.length)break;a=s[u++]}else{u=s.next();if(u.done)break;a=u.value}var f=a;f.raws.before=r.raws.before}}}return i};t.toResult=function toResult(e){if(e===void 0){e={}}var t=r(169);var n=r(74);var i=new t(new n,this,e);return i.stringify()};return Root}(n.default);var s=i;t.default=s;e.exports=t.default},797:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(878));var i=_interopRequireDefault(r(9));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r{"use strict";t.__esModule=true;t.default=void 0;var r={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:false};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}var n=function(){function Stringifier(e){this.builder=e}var e=Stringifier.prototype;e.stringify=function stringify(e,t){this[e.type](e,t)};e.root=function root(e){this.body(e);if(e.raws.after)this.builder(e.raws.after)};e.comment=function comment(e){var t=this.raw(e,"left","commentLeft");var r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)};e.decl=function decl(e,t){var r=this.raw(e,"between","colon");var n=e.prop+r+this.rawValue(e,"value");if(e.important){n+=e.raws.important||" !important"}if(t)n+=";";this.builder(n,e)};e.rule=function rule(e){this.block(e,this.rawValue(e,"selector"));if(e.raws.ownSemicolon){this.builder(e.raws.ownSemicolon,e,"end")}};e.atrule=function atrule(e,t){var r="@"+e.name;var n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!=="undefined"){r+=e.raws.afterName}else if(n){r+=" "}if(e.nodes){this.block(e,r+n)}else{var i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}};e.body=function body(e){var t=e.nodes.length-1;while(t>0){if(e.nodes[t].type!=="comment")break;t-=1}var r=this.raw(e,"semicolon");for(var n=0;n0){if(typeof e.raws.after!=="undefined"){t=e.raws.after;if(t.indexOf("\n")!==-1){t=t.replace(/[^\n]+$/,"")}return false}}});if(t)t=t.replace(/[^\s]/g,"");return t};e.rawBeforeOpen=function rawBeforeOpen(e){var t;e.walk(function(e){if(e.type!=="decl"){t=e.raws.between;if(typeof t!=="undefined")return false}});return t};e.rawColon=function rawColon(e){var t;e.walkDecls(function(e){if(typeof e.raws.between!=="undefined"){t=e.raws.between.replace(/[^\s:]/g,"");return false}});return t};e.beforeAfter=function beforeAfter(e,t){var r;if(e.type==="decl"){r=this.raw(e,null,"beforeDecl")}else if(e.type==="comment"){r=this.raw(e,null,"beforeComment")}else if(t==="before"){r=this.raw(e,null,"beforeRule")}else{r=this.raw(e,null,"beforeClose")}var n=e.parent;var i=0;while(n&&n.type!=="root"){i+=1;n=n.parent}if(r.indexOf("\n")!==-1){var s=this.raw(e,null,"indent");if(s.length){for(var o=0;o{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(935));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringify(e,t){var r=new n.default(t);r.stringify(e)}var i=stringify;t.default=i;e.exports=t.default},300:(e,t,r)=>{"use strict";t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(242));var i=_interopRequireDefault(r(926));var s=_interopRequireDefault(r(905));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var o={brackets:n.default.cyan,"at-word":n.default.cyan,comment:n.default.gray,string:n.default.green,class:n.default.yellow,call:n.default.cyan,hash:n.default.magenta,"(":n.default.cyan,")":n.default.cyan,"{":n.default.yellow,"}":n.default.yellow,"[":n.default.yellow,"]":n.default.yellow,":":n.default.yellow,";":n.default.yellow};function getTokenType(e,t){var r=e[0],n=e[1];if(r==="word"){if(n[0]==="."){return"class"}if(n[0]==="#"){return"hash"}}if(!t.endOfFile()){var i=t.nextToken();t.back(i);if(i[0]==="brackets"||i[0]==="(")return"call"}return r}function terminalHighlight(e){var t=(0,i.default)(new s.default(e),{ignoreErrors:true});var r="";var n=function _loop(){var e=t.nextToken();var n=o[getTokenType(e,t)];if(n){r+=e[1].split(/\r?\n/).map(function(e){return n(e)}).join("\n")}else{r+=e[1]}};while(!t.endOfFile()){n()}return r}var u=terminalHighlight;t.default=u;e.exports=t.default},926:(e,t)=>{"use strict";t.__esModule=true;t.default=tokenizer;var r="'".charCodeAt(0);var n='"'.charCodeAt(0);var i="\\".charCodeAt(0);var s="/".charCodeAt(0);var o="\n".charCodeAt(0);var u=" ".charCodeAt(0);var a="\f".charCodeAt(0);var f="\t".charCodeAt(0);var l="\r".charCodeAt(0);var c="[".charCodeAt(0);var h="]".charCodeAt(0);var p="(".charCodeAt(0);var d=")".charCodeAt(0);var v="{".charCodeAt(0);var w="}".charCodeAt(0);var m=";".charCodeAt(0);var g="*".charCodeAt(0);var y=":".charCodeAt(0);var b="@".charCodeAt(0);var R=/[ \n\t\r\f{}()'"\\;/[\]#]/g;var C=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g;var S=/.[\\/("'\n]/;var O=/[a-f0-9]/i;function tokenizer(e,t){if(t===void 0){t={}}var A=e.css.valueOf();var M=t.ignoreErrors;var D,k,x,E,q,N,B;var I,F,T,j,z,L,P;var V=A.length;var W=-1;var U=1;var $=0;var G=[];var Y=[];function position(){return $}function unclosed(t){throw e.error("Unclosed "+t,U,$-W)}function endOfFile(){return Y.length===0&&$>=V}function nextToken(e){if(Y.length)return Y.pop();if($>=V)return;var t=e?e.ignoreUnclosed:false;D=A.charCodeAt($);if(D===o||D===a||D===l&&A.charCodeAt($+1)!==o){W=$;U+=1}switch(D){case o:case u:case f:case l:case a:k=$;do{k+=1;D=A.charCodeAt(k);if(D===o){W=k;U+=1}}while(D===u||D===o||D===f||D===l||D===a);P=["space",A.slice($,k)];$=k-1;break;case c:case h:case v:case w:case y:case m:case d:var J=String.fromCharCode(D);P=[J,J,U,$-W];break;case p:z=G.length?G.pop()[1]:"";L=A.charCodeAt($+1);if(z==="url"&&L!==r&&L!==n&&L!==u&&L!==o&&L!==f&&L!==a&&L!==l){k=$;do{T=false;k=A.indexOf(")",k+1);if(k===-1){if(M||t){k=$;break}else{unclosed("bracket")}}j=k;while(A.charCodeAt(j-1)===i){j-=1;T=!T}}while(T);P=["brackets",A.slice($,k+1),U,$-W,U,k-W];$=k}else{k=A.indexOf(")",$+1);N=A.slice($,k+1);if(k===-1||S.test(N)){P=["(","(",U,$-W]}else{P=["brackets",N,U,$-W,U,k-W];$=k}}break;case r:case n:x=D===r?"'":'"';k=$;do{T=false;k=A.indexOf(x,k+1);if(k===-1){if(M||t){k=$+1;break}else{unclosed("string")}}j=k;while(A.charCodeAt(j-1)===i){j-=1;T=!T}}while(T);N=A.slice($,k+1);E=N.split("\n");q=E.length-1;if(q>0){I=U+q;F=k-E[q].length}else{I=U;F=W}P=["string",A.slice($,k+1),U,$-W,I,k-F];W=F;U=I;$=k;break;case b:R.lastIndex=$+1;R.test(A);if(R.lastIndex===0){k=A.length-1}else{k=R.lastIndex-2}P=["at-word",A.slice($,k+1),U,$-W,U,k-W];$=k;break;case i:k=$;B=true;while(A.charCodeAt(k+1)===i){k+=1;B=!B}D=A.charCodeAt(k+1);if(B&&D!==s&&D!==u&&D!==o&&D!==f&&D!==l&&D!==a){k+=1;if(O.test(A.charAt(k))){while(O.test(A.charAt(k+1))){k+=1}if(A.charCodeAt(k+1)===u){k+=1}}}P=["word",A.slice($,k+1),U,$-W,U,k-W];$=k;break;default:if(D===s&&A.charCodeAt($+1)===g){k=A.indexOf("*/",$+2)+1;if(k===0){if(M||t){k=A.length}else{unclosed("comment")}}N=A.slice($,k+1);E=N.split("\n");q=E.length-1;if(q>0){I=U+q;F=k-E[q].length}else{I=U;F=W}P=["comment",N,U,$-W,I,k-F];W=F;U=I;$=k}else{C.lastIndex=$+1;C.test(A);if(C.lastIndex===0){k=A.length-1}else{k=C.lastIndex-2}P=["word",A.slice($,k+1),U,$-W,U,k-W];G.push(P);$=k}break}$++;return P}function back(e){Y.push(e)}return{back:back,nextToken:nextToken,endOfFile:endOfFile,position:position}}e.exports=t.default},216:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r={prefix:function prefix(e){var t=e.match(/^(-\w+-)/);if(t){return t[0]}return""},unprefixed:function unprefixed(e){return e.replace(/^-\w+-/,"")}};var n=r;t.default=n;e.exports=t.default},831:(e,t)=>{"use strict";t.__esModule=true;t.default=warnOnce;var r={};function warnOnce(e){if(r[e])return;r[e]=true;if(typeof console!=="undefined"&&console.warn){console.warn(e)}}e.exports=t.default},338:(e,t)=>{"use strict";t.__esModule=true;t.default=void 0;var r=function(){function Warning(e,t){if(t===void 0){t={}}this.type="warning";this.text=e;if(t.node&&t.node.source){var r=t.node.positionBy(t);this.line=r.line;this.column=r.column}for(var n in t){this[n]=t[n]}}var e=Warning.prototype;e.toString=function toString(){if(this.node){return this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message}if(this.plugin){return this.plugin+": "+this.text}return this.text};return Warning}();var n=r;t.default=n;e.exports=t.default},327:(e,t,r)=>{"use strict";const n=r(87);const i=r(379);const{env:s}=process;let o;if(i("no-color")||i("no-colors")||i("color=false")||i("color=never")){o=0}else if(i("color")||i("colors")||i("color=true")||i("color=always")){o=1}if("FORCE_COLOR"in s){if(s.FORCE_COLOR===true||s.FORCE_COLOR==="true"){o=1}else if(s.FORCE_COLOR===false||s.FORCE_COLOR==="false"){o=0}else{o=s.FORCE_COLOR.length===0?1:Math.min(parseInt(s.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(o===0){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!e.isTTY&&o===undefined){return 0}const t=o||0;if(s.TERM==="dumb"){return t}if(process.platform==="win32"){const e=n.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in s){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in s)||s.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in s){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0}if(s.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(s.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)){return 1}if("COLORTERM"in s){return 1}return t}function getSupportLevel(e){const t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},242:e=>{"use strict";e.exports=require("chalk")},747:e=>{"use strict";e.exports=require("fs")},241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var n=t[r]={exports:{}};var i=true;try{e[r](n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(350)})(); \ No newline at end of file diff --git a/packages/next/compiled/postcss-loader/cjs.js b/packages/next/compiled/postcss-loader/cjs.js index 28700d9075481ed..aa59f164990e547 100644 --- a/packages/next/compiled/postcss-loader/cjs.js +++ b/packages/next/compiled/postcss-loader/cjs.js @@ -1 +1 @@ -module.exports=(()=>{var e={6553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.codeFrameColumns=codeFrameColumns;t.default=_default;var n=_interopRequireWildcard(r(9571));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e){if(Object.prototype.hasOwnProperty.call(e,s)){var i=n?Object.getOwnPropertyDescriptor(e,s):null;if(i&&(i.get||i.set)){Object.defineProperty(r,s,i)}else{r[s]=e[s]}}}r.default=e;if(t){t.set(e,r)}return r}let s=false;function getDefs(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}const i=/\r\n|[\n\r\u2028\u2029]/;function getMarkerLines(e,t,r){const n=Object.assign({column:0,line:-1},e.start);const s=Object.assign({},n,e.end);const{linesAbove:i=2,linesBelow:o=3}=r||{};const a=n.line;const l=n.column;const c=s.line;const f=s.column;let u=Math.max(a-(i+1),0);let h=Math.min(t.length,c+o);if(a===-1){u=0}if(c===-1){h=t.length}const p=c-a;const d={};if(p){for(let e=0;e<=p;e++){const r=e+a;if(!l){d[r]=true}else if(e===0){const e=t[r-1].length;d[r]=[l,e-l+1]}else if(e===p){d[r]=[0,f]}else{const n=t[r-e].length;d[r]=[0,n]}}}else{if(l===f){if(l){d[a]=[l,0]}else{d[a]=true}}else{d[a]=[l,f-l]}}return{start:u,end:h,markerLines:d}}function codeFrameColumns(e,t,r={}){const s=(r.highlightCode||r.forceColor)&&(0,n.shouldHighlight)(r);const o=(0,n.getChalk)(r);const a=getDefs(o);const l=(e,t)=>{return s?e(t):t};const c=e.split(i);const{start:f,end:u,markerLines:h}=getMarkerLines(t,c,r);const p=t.start&&typeof t.start.column==="number";const d=String(u).length;const g=s?(0,n.default)(e,r):e;let w=g.split(i).slice(f,u).map((e,t)=>{const n=f+1+t;const s=` ${n}`.slice(-d);const i=` ${s} | `;const o=h[n];const c=!h[n+1];if(o){let t="";if(Array.isArray(o)){const n=e.slice(0,Math.max(o[0]-1,0)).replace(/[^\t]/g," ");const s=o[1]||1;t=["\n ",l(a.gutter,i.replace(/\d/g," ")),n,l(a.marker,"^").repeat(s)].join("");if(c&&r.message){t+=" "+l(a.message,r.message)}}return[l(a.marker,">"),l(a.gutter,i),e,t].join("")}else{return` ${l(a.gutter,i)}${e}`}}).join("\n");if(r.message&&!p){w=`${" ".repeat(d+1)}${r.message}\n${w}`}if(s){return o.reset(w)}else{return w}}function _default(e,t,r,n={}){if(!s){s=true;const e="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning){process.emitWarning(e,"DeprecationWarning")}else{const t=new Error(e);t.name="DeprecationWarning";console.warn(new Error(e))}}r=Math.max(r,0);const i={start:{column:r,line:t}};return codeFrameColumns(e,i,n)}},4705:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isIdentifierStart=isIdentifierStart;t.isIdentifierChar=isIdentifierChar;t.isIdentifierName=isIdentifierName;let r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";let n="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const s=new RegExp("["+r+"]");const i=new RegExp("["+r+n+"]");r=n=null;const o=[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,157,310,10,21,11,7,153,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,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,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,85,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,159,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,230,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,35,56,264,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,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,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,2357,44,11,6,17,0,370,43,1301,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,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938];const a=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,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,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function isInAstralSet(e,t){let r=65536;for(let n=0,s=t.length;ne)return false;r+=t[n+1];if(r>=e)return true}return false}function isIdentifierStart(e){if(e<65)return e===36;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&s.test(String.fromCharCode(e))}return isInAstralSet(e,o)}function isIdentifierChar(e){if(e<48)return e===36;if(e<58)return true;if(e<65)return false;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&i.test(String.fromCharCode(e))}return isInAstralSet(e,o)||isInAstralSet(e,a)}function isIdentifierName(e){let t=true;for(let r=0,n=Array.from(e);r{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"isIdentifierName",{enumerable:true,get:function(){return n.isIdentifierName}});Object.defineProperty(t,"isIdentifierChar",{enumerable:true,get:function(){return n.isIdentifierChar}});Object.defineProperty(t,"isIdentifierStart",{enumerable:true,get:function(){return n.isIdentifierStart}});Object.defineProperty(t,"isReservedWord",{enumerable:true,get:function(){return s.isReservedWord}});Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:true,get:function(){return s.isStrictBindOnlyReservedWord}});Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:true,get:function(){return s.isStrictBindReservedWord}});Object.defineProperty(t,"isStrictReservedWord",{enumerable:true,get:function(){return s.isStrictReservedWord}});Object.defineProperty(t,"isKeyword",{enumerable:true,get:function(){return s.isKeyword}});var n=r(4705);var s=r(8755)},8755:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isReservedWord=isReservedWord;t.isStrictReservedWord=isStrictReservedWord;t.isStrictBindOnlyReservedWord=isStrictBindOnlyReservedWord;t.isStrictBindReservedWord=isStrictBindReservedWord;t.isKeyword=isKeyword;const r={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]};const n=new Set(r.keyword);const s=new Set(r.strict);const i=new Set(r.strictBind);function isReservedWord(e,t){return t&&e==="await"||e==="enum"}function isStrictReservedWord(e,t){return isReservedWord(e,t)||s.has(e)}function isStrictBindOnlyReservedWord(e){return i.has(e)}function isStrictBindReservedWord(e,t){return isStrictReservedWord(e,t)||isStrictBindOnlyReservedWord(e)}function isKeyword(e){return n.has(e)}},9571:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shouldHighlight=shouldHighlight;t.getChalk=getChalk;t.default=highlight;var n=_interopRequireWildcard(r(2388));var s=r(4246);var i=_interopRequireDefault(r(2242));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e){if(Object.prototype.hasOwnProperty.call(e,s)){var i=n?Object.getOwnPropertyDescriptor(e,s):null;if(i&&(i.get||i.set)){Object.defineProperty(r,s,i)}else{r[s]=e[s]}}}r.default=e;if(t){t.set(e,r)}return r}function getDefs(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold}}const o=/\r\n|[\n\r\u2028\u2029]/;const a=/^[a-z][\w-]*$/i;const l=/^[()[\]{}]$/;function getTokenType(e){const[t,r]=e.slice(-2);const i=(0,n.matchToToken)(e);if(i.type==="name"){if((0,s.isKeyword)(i.value)||(0,s.isReservedWord)(i.value)){return"keyword"}if(a.test(i.value)&&(r[t-1]==="<"||r.substr(t-2,2)=="n(e)).join("\n")}else{return t[0]}})}function shouldHighlight(e){return i.default.supportsColor||e.forceColor}function getChalk(e){let t=i.default;if(e.forceColor){t=new i.default.constructor({enabled:true,level:1})}return t}function highlight(e,t={}){if(shouldHighlight(t)){const r=getChalk(t);const n=getDefs(r);return highlightTokens(n,e)}else{return e}}},726:e=>{"use strict";const t=()=>{const e=Error.prepareStackTrace;Error.prepareStackTrace=((e,t)=>t);const t=(new Error).stack.slice(1);Error.prepareStackTrace=e;return t};e.exports=t;e.exports.default=t},8361:(e,t,r)=>{"use strict";var n=r(1669);var s=r(237);var i=function errorEx(e,t){if(!e||e.constructor!==String){t=e||{};e=Error.name}var r=function ErrorEXError(n){if(!this){return new ErrorEXError(n)}n=n instanceof Error?n.message:n||this.message;Error.call(this,n);Error.captureStackTrace(this,r);this.name=e;Object.defineProperty(this,"message",{configurable:true,enumerable:false,get:function(){var e=n.split(/\r?\n/g);for(var r in t){if(!t.hasOwnProperty(r)){continue}var i=t[r];if("message"in i){e=i.message(this[r],e)||e;if(!s(e)){e=[e]}}}return e.join("\n")},set:function(e){n=e}});var i=null;var o=Object.getOwnPropertyDescriptor(this,"stack");var a=o.get;var l=o.value;delete o.value;delete o.writable;o.set=function(e){i=e};o.get=function(){var e=(i||(a?a.call(this):l)).split(/\r?\n+/g);if(!i){e[0]=this.name+": "+this.message}var r=1;for(var n in t){if(!t.hasOwnProperty(n)){continue}var s=t[n];if("line"in s){var o=s.line(this[n]);if(o){e.splice(r++,0," "+o)}}if("stack"in s){s.stack(this[n],e)}}return e.join("\n")};Object.defineProperty(this,"stack",o)};if(Object.setPrototypeOf){Object.setPrototypeOf(r.prototype,Error.prototype);Object.setPrototypeOf(r,Error)}else{n.inherits(r,Error)}return r};i.append=function(e,t){return{message:function(r,n){r=r||t;if(r){n[0]+=" "+e.replace("%s",r.toString())}return n}}};i.line=function(e,t){return{line:function(r){r=r||t;if(r){return e.replace("%s",r.toString())}return null}}};e.exports=i},9900:(e,t,r)=>{"use strict";const n=r(5622);const s=r(4101);const i=r(5281);e.exports=(e=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}const t=i(__filename);const r=s(n.dirname(t),e);const o=require.cache[r];if(o&&o.parent){let e=o.parent.children.length;while(e--){if(o.parent.children[e].id===r){o.parent.children.splice(e,1)}}}delete require.cache[r];const a=require.cache[t];return a===undefined?require(r):a.require(r)})},4101:(e,t,r)=>{"use strict";const n=r(5622);const s=r(2282);const i=r(5747);const o=(e,t,r)=>{if(typeof e!=="string"){throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof e}\``)}if(typeof t!=="string"){throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof t}\``)}try{e=i.realpathSync(e)}catch(t){if(t.code==="ENOENT"){e=n.resolve(e)}else if(r){return null}else{throw t}}const o=n.join(e,"noop.js");const a=()=>s._resolveFilename(t,{id:o,filename:o,paths:s._nodeModulePaths(e)});if(r){try{return a()}catch(e){return null}}return a()};e.exports=((e,t)=>o(e,t));e.exports.silent=((e,t)=>o(e,t,true))},237:e=>{"use strict";e.exports=function isArrayish(e){if(!e){return false}return e instanceof Array||Array.isArray(e)||e.length>=0&&e.splice instanceof Function}},1352:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return t.call(e)=="[object Array]"}},2388:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;t.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:undefined};if(e[1])t.type="string",t.closed=!!(e[3]||e[4]);else if(e[5])t.type="comment";else if(e[6])t.type="comment",t.closed=!!e[7];else if(e[8])t.type="regex";else if(e[9])t.type="number";else if(e[10])t.type="name";else if(e[11])t.type="punctuator";else if(e[12])t.type="whitespace";return t}},8335:e=>{"use strict";e.exports=parseJson;function parseJson(e,t,r){r=r||20;try{return JSON.parse(e,t)}catch(t){if(typeof e!=="string"){const t=Array.isArray(e)&&e.length===0;const r="Cannot parse "+(t?"an empty array":String(e));throw new TypeError(r)}const n=t.message.match(/^Unexpected token.*position\s+(\d+)/i);const s=n?+n[1]:t.message.match(/^Unexpected end of JSON.*/i)?e.length-1:null;if(s!=null){const n=s<=r?0:s-r;const i=s+r>=e.length?e.length:s+r;t.message+=` while parsing near '${n===0?"":"..."}${e.slice(n,i)}${i===e.length?"":"..."}'`}else{t.message+=` while parsing '${e.slice(0,r*2)}'`}throw t}}},241:(e,t)=>{function set(e,t,r){if(typeof r.value==="object")r.value=klona(r.value);if(!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"){Object.defineProperty(e,t,r)}else e[t]=r.value}function klona(e){if(typeof e!=="object")return e;var t=0,r,n,s,i=Object.prototype.toString.call(e);if(i==="[object Object]"){s=Object.create(e.__proto__||null)}else if(i==="[object Array]"){s=Array(e.length)}else if(i==="[object Set]"){s=new Set;e.forEach(function(e){s.add(klona(e))})}else if(i==="[object Map]"){s=new Map;e.forEach(function(e,t){s.set(klona(t),klona(e))})}else if(i==="[object Date]"){s=new Date(+e)}else if(i==="[object RegExp]"){s=new RegExp(e.source,e.flags)}else if(i==="[object DataView]"){s=new e.constructor(klona(e.buffer))}else if(i==="[object ArrayBuffer]"){s=e.slice(0)}else if(i.slice(-6)==="Array]"){s=new e.constructor(e)}if(s){for(n=Object.getOwnPropertySymbols(e);t{"use strict";var n=r(1352);var s=r(4943);var i=Array.prototype.slice;e.exports=LineColumnFinder;function LineColumnFinder(e,t){if(!(this instanceof LineColumnFinder)){if(typeof t==="number"){return new LineColumnFinder(e).fromIndex(t)}return new LineColumnFinder(e,t)}this.str=e||"";this.lineToIndex=buildLineToIndex(this.str);t=t||{};this.origin=typeof t.origin==="undefined"?1:t.origin}LineColumnFinder.prototype.fromIndex=function(e){if(e<0||e>=this.str.length||isNaN(e)){return null}var t=findLowerIndexInRangeArray(e,this.lineToIndex);return{line:t+this.origin,col:e-this.lineToIndex[t]+this.origin}};LineColumnFinder.prototype.toIndex=function(e,t){if(typeof t==="undefined"){if(n(e)&&e.length>=2){return this.toIndex(e[0],e[1])}if(s(e)&&"line"in e&&("col"in e||"column"in e)){return this.toIndex(e.line,"col"in e?e.col:e.column)}return-1}if(isNaN(e)||isNaN(t)){return-1}e-=this.origin;t-=this.origin;if(e>=0&&t>=0&&e=t[t.length-1]){return t.length-1}var r=0,n=t.length-2,s;while(r>1);if(e=t[s+1]){r=s+1}else{r=s;break}}return r}},4943:(e,t,r)=>{"use strict";var n=r(1352);e.exports=function isObject(e){return e!=null&&typeof e==="object"&&n(e)===false}},9036:(e,t)=>{"use strict";var r="\n";var n="\r";var s=function(){function LinesAndColumns(e){this.string=e;var t=[0];for(var s=0;sthis.string.length){return null}var t=0;var r=this.offsets;while(r[t+1]<=e){t++}var n=e-r[t];return{line:t,column:n}};LinesAndColumns.prototype.indexForLocation=function(e){var t=e.line,r=e.column;if(t<0||t>=this.offsets.length){return null}if(r<0||r>this.lengthOfLine(t)){return null}return this.offsets[t]+r};LinesAndColumns.prototype.lengthOfLine=function(e){var t=this.offsets[e];var r=e===this.offsets.length-1?this.string.length:this.offsets[e+1];return r-t};return LinesAndColumns}();t.__esModule=true;t.default=s},5281:(e,t,r)=>{"use strict";const n=r(726);e.exports=(e=>{const t=n();if(!e){return t[2].getFileName()}let r=false;t.shift();for(const n of t){const t=n.getFileName();if(typeof t!=="string"){continue}if(t===e){r=true;continue}if(t==="module.js"){continue}if(r&&t!==e){return t}}})},1230:(e,t,r)=>{"use strict";var n=r(6580);var s=r(390);var i=r(3616);const o={anchorPrefix:"a",customTags:null,indent:2,indentSeq:true,keepCstNodes:false,keepNodeTypes:true,keepBlobsInJSON:true,mapAsMap:false,maxAliasCount:100,prettyErrors:false,simpleKeys:false,version:"1.2"};const a={get binary(){return s.binaryOptions},set binary(e){Object.assign(s.binaryOptions,e)},get bool(){return s.boolOptions},set bool(e){Object.assign(s.boolOptions,e)},get int(){return s.intOptions},set int(e){Object.assign(s.intOptions,e)},get null(){return s.nullOptions},set null(e){Object.assign(s.nullOptions,e)},get str(){return s.strOptions},set str(e){Object.assign(s.strOptions,e)}};const l={"1.0":{schema:"yaml-1.1",merge:true,tagPrefixes:[{handle:"!",prefix:n.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:true,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:n.defaultTagPrefix}]},1.2:{schema:"core",merge:false,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:n.defaultTagPrefix}]}};function stringifyTag(e,t){if((e.version||e.options.version)==="1.0"){const e=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return"!"+e[1];const r=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return r?`!${r[1]}/${r[2]}`:`!${t.replace(/^tag:/,"")}`}let r=e.tagPrefixes.find(e=>t.indexOf(e.prefix)===0);if(!r){const n=e.getDefaults().tagPrefixes;r=n&&n.find(e=>t.indexOf(e.prefix)===0)}if(!r)return t[0]==="!"?t:`!<${t}>`;const n=t.substr(r.prefix.length).replace(/[!,[\]{}]/g,e=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[e]);return r.handle+n}function getTagObject(e,t){if(t instanceof s.Alias)return s.Alias;if(t.tag){const r=e.filter(e=>e.tag===t.tag);if(r.length>0)return r.find(e=>e.format===t.format)||r[0]}let r,n;if(t instanceof s.Scalar){n=t.value;const s=e.filter(e=>e.identify&&e.identify(n)||e.class&&n instanceof e.class);r=s.find(e=>e.format===t.format)||s.find(e=>!e.format)}else{n=t;r=e.find(e=>e.nodeClass&&n instanceof e.nodeClass)}if(!r){const e=n&&n.constructor?n.constructor.name:typeof n;throw new Error(`Tag not resolved for ${e} value`)}return r}function stringifyProps(e,t,{anchors:r,doc:n}){const s=[];const i=n.anchors.getName(e);if(i){r[i]=e;s.push(`&${i}`)}if(e.tag){s.push(stringifyTag(n,e.tag))}else if(!t.default){s.push(stringifyTag(n,t.tag))}return s.join(" ")}function stringify(e,t,r,n){const{anchors:i,schema:o}=t.doc;let a;if(!(e instanceof s.Node)){const t={aliasNodes:[],onTagObj:e=>a=e,prevObjects:new Map};e=o.createNode(e,true,null,t);for(const e of t.aliasNodes){e.source=e.source.node;let t=i.getName(e.source);if(!t){t=i.newName();i.map[t]=e.source}}}if(e instanceof s.Pair)return e.toString(t,r,n);if(!a)a=getTagObject(o.tags,e);const l=stringifyProps(e,a,t);if(l.length>0)t.indentAtStart=(t.indentAtStart||0)+l.length+1;const c=typeof a.stringify==="function"?a.stringify(e,t,r,n):e instanceof s.Scalar?s.stringifyString(e,t,r,n):e.toString(t,r,n);if(!l)return c;return e instanceof s.Scalar||c[0]==="{"||c[0]==="["?`${l} ${c}`:`${l}\n${t.indent}${c}`}class Anchors{static validAnchorNode(e){return e instanceof s.Scalar||e instanceof s.YAMLSeq||e instanceof s.YAMLMap}constructor(e){n._defineProperty(this,"map",{});this.prefix=e}createAlias(e,t){this.setAnchor(e,t);return new s.Alias(e)}createMergePair(...e){const t=new s.Merge;t.value.items=e.map(e=>{if(e instanceof s.Alias){if(e.source instanceof s.YAMLMap)return e}else if(e instanceof s.YAMLMap){return this.createAlias(e)}throw new Error("Merge sources must be Map nodes or their Aliases")});return t}getName(e){const{map:t}=this;return Object.keys(t).find(r=>t[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){if(!e)e=this.prefix;const t=Object.keys(this.map);for(let r=1;true;++r){const n=`${e}${r}`;if(!t.includes(n))return n}}resolveNodes(){const{map:e,_cstAliases:t}=this;Object.keys(e).forEach(t=>{e[t]=e[t].resolved});t.forEach(e=>{e.source=e.source.resolved});delete this._cstAliases}setAnchor(e,t){if(e!=null&&!Anchors.validAnchorNode(e)){throw new Error("Anchors may only be set for Scalar, Seq and Map nodes")}if(t&&/[\x00-\x19\s,[\]{}]/.test(t)){throw new Error("Anchor names must not contain whitespace or control characters")}const{map:r}=this;const n=e&&Object.keys(r).find(t=>r[t]===e);if(n){if(!t){return n}else if(n!==t){delete r[n];r[t]=e}}else{if(!t){if(!e)return null;t=this.newName()}r[t]=e}return t}}const c=(e,t)=>{if(e&&typeof e==="object"){const{tag:r}=e;if(e instanceof s.Collection){if(r)t[r]=true;e.items.forEach(e=>c(e,t))}else if(e instanceof s.Pair){c(e.key,t);c(e.value,t)}else if(e instanceof s.Scalar){if(r)t[r]=true}}return t};const f=e=>Object.keys(c(e,{}));function parseContents(e,t){const r={before:[],after:[]};let i=undefined;let o=false;for(const a of t){if(a.valueRange){if(i!==undefined){const t="Document contains trailing content not separated by a ... or --- line";e.errors.push(new n.YAMLSyntaxError(a,t));break}const t=s.resolveNode(e,a);if(o){t.spaceBefore=true;o=false}i=t}else if(a.comment!==null){const e=i===undefined?r.before:r.after;e.push(a.comment)}else if(a.type===n.Type.BLANK_LINE){o=true;if(i===undefined&&r.before.length>0&&!e.commentBefore){e.commentBefore=r.before.join("\n");r.before=[]}}}e.contents=i||null;if(!i){e.comment=r.before.concat(r.after).join("\n")||null}else{const t=r.before.join("\n");if(t){const e=i instanceof s.Collection&&i.items[0]?i.items[0]:i;e.commentBefore=e.commentBefore?`${t}\n${e.commentBefore}`:t}e.comment=r.after.join("\n")||null}}function resolveTagDirective({tagPrefixes:e},t){const[r,s]=t.parameters;if(!r||!s){const e="Insufficient parameters given for %TAG directive";throw new n.YAMLSemanticError(t,e)}if(e.some(e=>e.handle===r)){const e="The %TAG directive must only be given at most once per handle in the same document.";throw new n.YAMLSemanticError(t,e)}return{handle:r,prefix:s}}function resolveYamlDirective(e,t){let[r]=t.parameters;if(t.name==="YAML:1.0")r="1.0";if(!r){const e="Insufficient parameters given for %YAML directive";throw new n.YAMLSemanticError(t,e)}if(!l[r]){const s=e.version||e.options.version;const i=`Document will be parsed as YAML ${s} rather than YAML ${r}`;e.warnings.push(new n.YAMLWarning(t,i))}return r}function parseDirectives(e,t,r){const s=[];let i=false;for(const r of t){const{comment:t,name:o}=r;switch(o){case"TAG":try{e.tagPrefixes.push(resolveTagDirective(e,r))}catch(t){e.errors.push(t)}i=true;break;case"YAML":case"YAML:1.0":if(e.version){const t="The %YAML directive must only be given at most once per document.";e.errors.push(new n.YAMLSemanticError(r,t))}try{e.version=resolveYamlDirective(e,r)}catch(t){e.errors.push(t)}i=true;break;default:if(o){const t=`YAML only supports %TAG and %YAML directives, and not %${o}`;e.warnings.push(new n.YAMLWarning(r,t))}}if(t)s.push(t)}if(r&&!i&&"1.1"===(e.version||r.version||e.options.version)){const t=({handle:e,prefix:t})=>({handle:e,prefix:t});e.tagPrefixes=r.tagPrefixes.map(t);e.version=r.version}e.commentBefore=s.join("\n")||null}function assertCollection(e){if(e instanceof s.Collection)return true;throw new Error("Expected a YAML collection as document contents")}class Document{constructor(e){this.anchors=new Anchors(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){assertCollection(this.contents);return this.contents.add(e)}addIn(e,t){assertCollection(this.contents);this.contents.addIn(e,t)}delete(e){assertCollection(this.contents);return this.contents.delete(e)}deleteIn(e){if(s.isEmptyPath(e)){if(this.contents==null)return false;this.contents=null;return true}assertCollection(this.contents);return this.contents.deleteIn(e)}getDefaults(){return Document.defaults[this.version]||Document.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof s.Collection?this.contents.get(e,t):undefined}getIn(e,t){if(s.isEmptyPath(e))return!t&&this.contents instanceof s.Scalar?this.contents.value:this.contents;return this.contents instanceof s.Collection?this.contents.getIn(e,t):undefined}has(e){return this.contents instanceof s.Collection?this.contents.has(e):false}hasIn(e){if(s.isEmptyPath(e))return this.contents!==undefined;return this.contents instanceof s.Collection?this.contents.hasIn(e):false}set(e,t){assertCollection(this.contents);this.contents.set(e,t)}setIn(e,t){if(s.isEmptyPath(e))this.contents=t;else{assertCollection(this.contents);this.contents.setIn(e,t)}}setSchema(e,t){if(!e&&!t&&this.schema)return;if(typeof e==="number")e=e.toFixed(1);if(e==="1.0"||e==="1.1"||e==="1.2"){if(this.version)this.version=e;else this.options.version=e;delete this.options.schema}else if(e&&typeof e==="string"){this.options.schema=e}if(Array.isArray(t))this.options.customTags=t;const r=Object.assign({},this.getDefaults(),this.options);this.schema=new i.Schema(r)}parse(e,t){if(this.options.keepCstNodes)this.cstNode=e;if(this.options.keepNodeTypes)this.type="DOCUMENT";const{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o){if(!o.source)o.source=this;this.errors.push(o)}parseDirectives(this,r,t);if(i)this.directivesEndMarker=true;this.range=a?[a.start,a.end]:null;this.setSchema();this.anchors._cstAliases=[];parseContents(this,s);this.anchors.resolveNodes();if(this.options.prettyErrors){for(const e of this.errors)if(e instanceof n.YAMLError)e.makePretty();for(const e of this.warnings)if(e instanceof n.YAMLError)e.makePretty()}return this}listNonDefaultTags(){return f(this.contents).filter(e=>e.indexOf(i.Schema.defaultPrefix)!==0)}setTagPrefix(e,t){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(t){const r=this.tagPrefixes.find(t=>t.handle===e);if(r)r.prefix=t;else this.tagPrefixes.push({handle:e,prefix:t})}else{this.tagPrefixes=this.tagPrefixes.filter(t=>t.handle!==e)}}toJSON(e,t){const{keepBlobsInJSON:r,mapAsMap:n,maxAliasCount:i}=this.options;const o=r&&(typeof e!=="string"||!(this.contents instanceof s.Scalar));const a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!n,maxAliasCount:i,stringify:stringify};const l=Object.keys(this.anchors.map);if(l.length>0)a.anchors=new Map(l.map(e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}]));const c=s.toJSON(this.contents,e,a);if(typeof t==="function"&&a.anchors)for(const{count:e,res:r}of a.anchors.values())t(r,e);return c}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");const e=this.options.indent;if(!Number.isInteger(e)||e<=0){const t=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${t}`)}this.setSchema();const t=[];let r=false;if(this.version){let e="%YAML 1.2";if(this.schema.name==="yaml-1.1"){if(this.version==="1.0")e="%YAML:1.0";else if(this.version==="1.1")e="%YAML 1.1"}t.push(e);r=true}const n=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:e,prefix:s})=>{if(n.some(e=>e.indexOf(s)===0)){t.push(`%TAG ${e} ${s}`);r=true}});if(r||this.directivesEndMarker)t.push("---");if(this.commentBefore){if(r||!this.directivesEndMarker)t.unshift("");t.unshift(this.commentBefore.replace(/^/gm,"#"))}const i={anchors:{},doc:this,indent:"",indentStep:" ".repeat(e),stringify:stringify};let o=false;let a=null;if(this.contents){if(this.contents instanceof s.Node){if(this.contents.spaceBefore&&(r||this.directivesEndMarker))t.push("");if(this.contents.commentBefore)t.push(this.contents.commentBefore.replace(/^/gm,"#"));i.forceBlockIndent=!!this.comment;a=this.contents.comment}const e=a?null:()=>o=true;const n=stringify(this.contents,i,()=>a=null,e);t.push(s.addComment(n,"",a))}else if(this.contents!==undefined){t.push(stringify(this.contents,i))}if(this.comment){if((!o||a)&&t[t.length-1]!=="")t.push("");t.push(this.comment.replace(/^/gm,"#"))}return t.join("\n")+"\n"}}n._defineProperty(Document,"defaults",l);t.Document=Document;t.defaultOptions=o;t.scalarOptions=a},6580:(e,t)=>{"use strict";const r={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."};const n={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"};const s="tag:yaml.org,2002:";const i={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function findLineStarts(e){const t=[0];let r=e.indexOf("\n");while(r!==-1){r+=1;t.push(r);r=e.indexOf("\n",r)}return t}function getSrcInfo(e){let t,r;if(typeof e==="string"){t=findLineStarts(e);r=e}else{if(Array.isArray(e))e=e[0];if(e&&e.context){if(!e.lineStarts)e.lineStarts=findLineStarts(e.context.src);t=e.lineStarts;r=e.context.src}}return{lineStarts:t,src:r}}function getLinePos(e,t){if(typeof e!=="number"||e<0)return null;const{lineStarts:r,src:n}=getSrcInfo(t);if(!r||!n||e>n.length)return null;for(let t=0;t=1)||e>r.length)return null;const s=r[e-1];let i=r[e];while(i&&i>s&&n[i-1]==="\n")--i;return n.slice(s,i)}function getPrettyContext({start:e,end:t},r,n=80){let s=getLine(e.line,r);if(!s)return null;let{col:i}=e;if(s.length>n){if(i<=n-10){s=s.substr(0,n-1)+"…"}else{const e=Math.round(n/2);if(s.length>i+e)s=s.substr(0,i+e-1)+"…";i-=s.length-n;s="…"+s.substr(1-n)}}let o=1;let a="";if(t){if(t.line===e.line&&i+(t.col-e.col)<=n+1){o=t.col-e.col}else{o=Math.min(s.length+1,n)-i;a="…"}}const l=i>1?" ".repeat(i-1):"";const c="^".repeat(o);return`${s}\n${l}${c}${a}`}class Range{static copy(e){return new Range(e.start,e.end)}constructor(e,t){this.start=e;this.end=t||e}isEmpty(){return typeof this.start!=="number"||!this.end||this.end<=this.start}setOrigRange(e,t){const{start:r,end:n}=this;if(e.length===0||n<=e[0]){this.origStart=r;this.origEnd=n;return t}let s=t;while(sr)break;else++s}this.origStart=r+s;const i=s;while(s=n)break;else++s}this.origEnd=n+s;return i}}class Node{static addStringTerminator(e,t,r){if(r[r.length-1]==="\n")return r;const n=Node.endOfWhiteSpace(e,t);return n>=e.length||e[n]==="\n"?r+"\n":r}static atDocumentBoundary(e,t,n){const s=e[t];if(!s)return true;const i=e[t-1];if(i&&i!=="\n")return false;if(n){if(s!==n)return false}else{if(s!==r.DIRECTIVES_END&&s!==r.DOCUMENT_END)return false}const o=e[t+1];const a=e[t+2];if(o!==s||a!==s)return false;const l=e[t+3];return!l||l==="\n"||l==="\t"||l===" "}static endOfIdentifier(e,t){let r=e[t];const n=r==="<";const s=n?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];while(r&&s.indexOf(r)===-1)r=e[t+=1];if(n&&r===">")t+=1;return t}static endOfIndent(e,t){let r=e[t];while(r===" ")r=e[t+=1];return t}static endOfLine(e,t){let r=e[t];while(r&&r!=="\n")r=e[t+=1];return t}static endOfWhiteSpace(e,t){let r=e[t];while(r==="\t"||r===" ")r=e[t+=1];return t}static startOfLine(e,t){let r=e[t-1];if(r==="\n")return t;while(r&&r!=="\n")r=e[t-=1];return t+1}static endOfBlockIndent(e,t,r){const n=Node.endOfIndent(e,r);if(n>r+t){return n}else{const t=Node.endOfWhiteSpace(e,n);const r=e[t];if(!r||r==="\n")return t}return null}static atBlank(e,t,r){const n=e[t];return n==="\n"||n==="\t"||n===" "||r&&!n}static nextNodeIsIndented(e,t,r){if(!e||t<0)return false;if(t>0)return true;return r&&e==="-"}static normalizeOffset(e,t){const r=e[t];return!r?t:r!=="\n"&&e[t-1]==="\n"?t-1:Node.endOfWhiteSpace(e,t)}static foldNewline(e,t,r){let n=0;let s=false;let i="";let o=e[t+1];while(o===" "||o==="\t"||o==="\n"){switch(o){case"\n":n=0;t+=1;i+="\n";break;case"\t":if(n<=r)s=true;t=Node.endOfWhiteSpace(e,t+2)-1;break;case" ":n+=1;t+=1;break}o=e[t+1]}if(!i)i=" ";if(o&&n<=r)s=true;return{fold:i,offset:t,error:s}}constructor(e,t,r){Object.defineProperty(this,"context",{value:r||null,writable:true});this.error=null;this.range=null;this.valueRange=null;this.props=t||[];this.type=e;this.value=null}getPropValue(e,t,r){if(!this.context)return null;const{src:n}=this.context;const s=this.props[e];return s&&n[s.start]===t?n.slice(s.start+(r?1:0),s.end):null}get anchor(){for(let e=0;e0?e.join("\n"):null}commentHasRequiredWhitespace(e){const{src:t}=this.context;if(this.header&&e===this.header.end)return false;if(!this.valueRange)return false;const{end:r}=this.valueRange;return e!==r||Node.atBlank(t,r-1)}get hasComment(){if(this.context){const{src:e}=this.context;for(let t=0;tr.setOrigRange(e,t));return t}toString(){const{context:{src:e},range:t,value:r}=this;if(r!=null)return r;const n=e.slice(t.start,t.end);return Node.addStringTerminator(e,t.end,n)}}class YAMLError extends Error{constructor(e,t,r){if(!r||!(t instanceof Node))throw new Error(`Invalid arguments for new ${e}`);super();this.name=e;this.message=r;this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;const e=this.source.context&&this.source.context.root;if(typeof this.offset==="number"){this.range=new Range(this.offset,this.offset+1);const t=e&&getLinePos(this.offset,e);if(t){const e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else{this.range=this.source.range;this.linePos=this.source.rangeAsLinePos}if(this.linePos){const{line:t,col:r}=this.linePos.start;this.message+=` at line ${t}, column ${r}`;const n=e&&getPrettyContext(this.linePos,e);if(n)this.message+=`:\n\n${n}\n`}delete this.source}}class YAMLReferenceError extends YAMLError{constructor(e,t){super("YAMLReferenceError",e,t)}}class YAMLSemanticError extends YAMLError{constructor(e,t){super("YAMLSemanticError",e,t)}}class YAMLSyntaxError extends YAMLError{constructor(e,t){super("YAMLSyntaxError",e,t)}}class YAMLWarning extends YAMLError{constructor(e,t){super("YAMLWarning",e,t)}}function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}class PlainValue extends Node{static endOfLine(e,t,r){let n=e[t];let s=t;while(n&&n!=="\n"){if(r&&(n==="["||n==="]"||n==="{"||n==="}"||n===","))break;const t=e[s+1];if(n===":"&&(!t||t==="\n"||t==="\t"||t===" "||r&&t===","))break;if((n===" "||n==="\t")&&t==="#")break;s+=1;n=t}return s}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{src:r}=this.context;let n=r[t-1];while(ei?r.slice(i,n+1):e}else{s+=e}}const i=r[e];switch(i){case"\t":{const e="Plain value cannot start with a tab character";const t=[new YAMLSemanticError(this,e)];return{errors:t,str:s}}case"@":case"`":{const e=`Plain value cannot start with reserved character ${i}`;const t=[new YAMLSemanticError(this,e)];return{errors:t,str:s}}default:return s}}parseBlockValue(e){const{indent:t,inFlow:r,src:n}=this.context;let s=e;let i=e;for(let e=n[s];e==="\n";e=n[s]){if(Node.atDocumentBoundary(n,s+1))break;const e=Node.endOfBlockIndent(n,t,s+1);if(e===null||n[e]==="#")break;if(n[e]==="\n"){s=e}else{i=PlainValue.endOfLine(n,e,r);s=i}}if(this.valueRange.isEmpty())this.valueRange.start=e;this.valueRange.end=i;return i}parse(e,t){this.context=e;const{inFlow:r,src:n}=e;let s=t;const i=n[s];if(i&&i!=="#"&&i!=="\n"){s=PlainValue.endOfLine(n,t,r)}this.valueRange=new Range(t,s);s=Node.endOfWhiteSpace(n,s);s=this.parseComment(s);if(!this.hasComment||this.valueRange.isEmpty()){s=this.parseBlockValue(s)}return s}}t.Char=r;t.Node=Node;t.PlainValue=PlainValue;t.Range=Range;t.Type=n;t.YAMLError=YAMLError;t.YAMLReferenceError=YAMLReferenceError;t.YAMLSemanticError=YAMLSemanticError;t.YAMLSyntaxError=YAMLSyntaxError;t.YAMLWarning=YAMLWarning;t._defineProperty=_defineProperty;t.defaultTagPrefix=s;t.defaultTags=i},3616:(e,t,r)=>{"use strict";var n=r(6580);var s=r(390);var i=r(5655);function createMap(e,t,r){const n=new s.YAMLMap(e);if(t instanceof Map){for(const[s,i]of t)n.items.push(e.createPair(s,i,r))}else if(t&&typeof t==="object"){for(const s of Object.keys(t))n.items.push(e.createPair(s,t[s],r))}if(typeof e.sortMapEntries==="function"){n.items.sort(e.sortMapEntries)}return n}const o={createNode:createMap,default:true,nodeClass:s.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:s.resolveMap};function createSeq(e,t,r){const n=new s.YAMLSeq(e);if(t&&t[Symbol.iterator]){for(const s of t){const t=e.createNode(s,r.wrapScalars,null,r);n.items.push(t)}}return n}const a={createNode:createSeq,default:true,nodeClass:s.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:s.resolveSeq};const l={identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify(e,t,r,n){t=Object.assign({actualString:true},t);return s.stringifyString(e,t,r,n)},options:s.strOptions};const c=[o,a,l];const f=e=>typeof e==="bigint"||Number.isInteger(e);const u=(e,t,r)=>s.intOptions.asBigInt?BigInt(e):parseInt(t,r);function intStringify(e,t,r){const{value:n}=e;if(f(n)&&n>=0)return r+n.toString(t);return s.stringifyNumber(e)}const h={identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new s.Scalar(null):null,default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr};const p={identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>e[0]==="t"||e[0]==="T",options:s.boolOptions,stringify:({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr};const d={identify:e=>f(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>u(e,t,8),options:s.intOptions,stringify:e=>intStringify(e,8,"0o")};const g={identify:f,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>u(e,e,10),options:s.intOptions,stringify:s.stringifyNumber};const w={identify:e=>f(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>u(e,t,16),options:s.intOptions,stringify:e=>intStringify(e,16,"0x")};const y={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber};const m={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify:({value:e})=>Number(e).toExponential()};const S={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,r){const n=t||r;const i=new s.Scalar(parseFloat(e));if(n&&n[n.length-1]==="0")i.minFractionDigits=n.length;return i},stringify:s.stringifyNumber};const b=c.concat([h,p,d,g,w,y,m,S]);const O=e=>typeof e==="bigint"||Number.isInteger(e);const A=({value:e})=>JSON.stringify(e);const E=[o,a,{identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify:A},{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new s.Scalar(null):null,default:true,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:A},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>e==="true",stringify:A},{identify:O,default:true,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>s.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>O(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:A}];E.scalarFallback=(e=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)});const M=({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr;const N=e=>typeof e==="bigint"||Number.isInteger(e);function intResolve$1(e,t,r){let n=t.replace(/_/g,"");if(s.intOptions.asBigInt){switch(r){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const t=BigInt(n);return e==="-"?BigInt(-1)*t:t}const i=parseInt(n,r);return e==="-"?-1*i:i}function intStringify$1(e,t,r){const{value:n}=e;if(N(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return s.stringifyNumber(e)}const C=c.concat([{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new s.Scalar(null):null,default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>true,options:s.boolOptions,stringify:M},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>false,options:s.boolOptions,stringify:M},{identify:N,default:true,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,r)=>intResolve$1(t,r,2),stringify:e=>intStringify$1(e,2,"0b")},{identify:N,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,r)=>intResolve$1(t,r,8),stringify:e=>intStringify$1(e,8,"0")},{identify:N,default:true,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,r)=>intResolve$1(t,r,10),stringify:s.stringifyNumber},{identify:N,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,r)=>intResolve$1(t,r,16),stringify:e=>intStringify$1(e,16,"0x")},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify:({value:e})=>Number(e).toExponential()},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){const r=new s.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");if(e[e.length-1]==="0")r.minFractionDigits=e.length}return r},stringify:s.stringifyNumber}],i.binary,i.omap,i.pairs,i.set,i.intTime,i.floatTime,i.timestamp);const T={core:b,failsafe:c,json:E,yaml11:C};const L={binary:i.binary,bool:p,float:S,floatExp:m,floatNaN:y,floatTime:i.floatTime,int:g,intHex:w,intOct:d,intTime:i.intTime,map:o,null:h,omap:i.omap,pairs:i.pairs,seq:a,set:i.set,timestamp:i.timestamp};function findTagObject(e,t,r){if(t){const e=r.filter(e=>e.tag===t);const n=e.find(e=>!e.format)||e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format)}function createNode(e,t,r){if(e instanceof s.Node)return e;const{defaultPrefix:n,onTagObj:i,prevObjects:l,schema:c,wrapScalars:f}=r;if(t&&t.startsWith("!!"))t=n+t.slice(2);let u=findTagObject(e,t,c.tags);if(!u){if(typeof e.toJSON==="function")e=e.toJSON();if(typeof e!=="object")return f?new s.Scalar(e):e;u=e instanceof Map?o:e[Symbol.iterator]?a:o}if(i){i(u);delete r.onTagObj}const h={};if(e&&typeof e==="object"&&l){const t=l.get(e);if(t){const e=new s.Alias(t);r.aliasNodes.push(e);return e}h.value=e;l.set(e,h)}h.node=u.createNode?u.createNode(r.schema,e,r):f?new s.Scalar(e):e;if(t&&h.node instanceof s.Node)h.node.tag=t;return h.node}function getSchemaTags(e,t,r,n){let s=e[n.replace(/\W/g,"")];if(!s){const t=Object.keys(e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${t}`)}if(Array.isArray(r)){for(const e of r)s=s.concat(e)}else if(typeof r==="function"){s=r(s.slice())}for(let e=0;eJSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag "${r}"; use one of ${e}`)}s[e]=n}}return s}const R=(e,t)=>e.keyt.key?1:0;class Schema{constructor({customTags:e,merge:t,schema:r,sortMapEntries:n,tags:s}){this.merge=!!t;this.name=r;this.sortMapEntries=n===true?R:n||null;if(!e&&s)i.warnOptionDeprecation("tags","customTags");this.tags=getSchemaTags(T,L,e||s,r)}createNode(e,t,r,n){const s={defaultPrefix:Schema.defaultPrefix,schema:this,wrapScalars:t};const i=n?Object.assign(n,s):s;return createNode(e,r,i)}createPair(e,t,r){if(!r)r={wrapScalars:true};const n=this.createNode(e,r.wrapScalars,null,r);const i=this.createNode(t,r.wrapScalars,null,r);return new s.Pair(n,i)}}n._defineProperty(Schema,"defaultPrefix",n.defaultTagPrefix);n._defineProperty(Schema,"defaultTags",n.defaultTags);t.Schema=Schema},4884:(e,t,r)=>{"use strict";var n=r(6580);var s=r(2488);r(390);var i=r(1230);var o=r(3616);var a=r(5655);function createNode(e,t=true,r){if(r===undefined&&typeof t==="string"){r=t;t=true}const n=Object.assign({},i.Document.defaults[i.defaultOptions.version],i.defaultOptions);const s=new o.Schema(n);return s.createNode(e,t,r)}class Document extends i.Document{constructor(e){super(Object.assign({},i.defaultOptions,e))}}function parseAllDocuments(e,t){const r=[];let n;for(const i of s.parse(e)){const e=new Document(t);e.parse(i,n);r.push(e);n=e}return r}function parseDocument(e,t){const r=s.parse(e);const i=new Document(t).parse(r[0]);if(r.length>1){const e="Source contains multiple documents; please use YAML.parseAllDocuments()";i.errors.unshift(new n.YAMLSemanticError(r[1],e))}return i}function parse(e,t){const r=parseDocument(e,t);r.warnings.forEach(e=>a.warn(e));if(r.errors.length>0)throw r.errors[0];return r.toJSON()}function stringify(e,t){const r=new Document(t);r.contents=e;return String(r)}const l={createNode:createNode,defaultOptions:i.defaultOptions,Document:Document,parse:parse,parseAllDocuments:parseAllDocuments,parseCST:s.parse,parseDocument:parseDocument,scalarOptions:i.scalarOptions,stringify:stringify};t.YAML=l},2488:(e,t,r)=>{"use strict";var n=r(6580);class BlankLine extends n.Node{constructor(){super(n.Type.BLANK_LINE)}get includesTrailingLines(){return true}parse(e,t){this.context=e;this.range=new n.Range(t,t+1);return t+1}}class CollectionItem extends n.Node{constructor(e,t){super(e,t);this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,t){this.context=e;const{parseNode:r,src:s}=e;let{atLineStart:i,lineStart:o}=e;if(!i&&this.type===n.Type.SEQ_ITEM)this.error=new n.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line");const a=i?t-o:e.indent;let l=n.Node.endOfWhiteSpace(s,t+1);let c=s[l];const f=c==="#";const u=[];let h=null;while(c==="\n"||c==="#"){if(c==="#"){const e=n.Node.endOfLine(s,l+1);u.push(new n.Range(l,e));l=e}else{i=true;o=l+1;const e=n.Node.endOfWhiteSpace(s,o);if(s[e]==="\n"&&u.length===0){h=new BlankLine;o=h.parse({src:s},o)}l=n.Node.endOfIndent(s,o)}c=s[l]}if(n.Node.nextNodeIsIndented(c,l-(o+a),this.type!==n.Type.SEQ_ITEM)){this.node=r({atLineStart:i,inCollection:false,indent:a,lineStart:o,parent:this},l)}else if(c&&o>t+1){l=o-1}if(this.node){if(h){const t=e.parent.items||e.parent.contents;if(t)t.push(h)}if(u.length)Array.prototype.push.apply(this.props,u);l=this.node.range.end}else{if(f){const e=u[0];this.props.push(e);l=e.end}else{l=n.Node.endOfLine(s,t+1)}}const p=this.node?this.node.valueRange.end:l;this.valueRange=new n.Range(t,p);return l}setOrigRanges(e,t){t=super.setOrigRanges(e,t);return this.node?this.node.setOrigRanges(e,t):t}toString(){const{context:{src:e},node:t,range:r,value:s}=this;if(s!=null)return s;const i=t?e.slice(r.start,t.range.start)+String(t):e.slice(r.start,r.end);return n.Node.addStringTerminator(e,r.end,i)}}class Comment extends n.Node{constructor(){super(n.Type.COMMENT)}parse(e,t){this.context=e;const r=this.parseComment(t);this.range=new n.Range(t,r);return r}}function grabCollectionEndComments(e){let t=e;while(t instanceof CollectionItem)t=t.node;if(!(t instanceof Collection))return null;const r=t.items.length;let s=-1;for(let e=r-1;e>=0;--e){const r=t.items[e];if(r.type===n.Type.COMMENT){const{indent:t,lineStart:n}=r.context;if(t>0&&r.range.start>=n+t)break;s=e}else if(r.type===n.Type.BLANK_LINE)s=e;else break}if(s===-1)return null;const i=t.items.splice(s,r-s);const o=i[0].range.start;while(true){t.range.end=o;if(t.valueRange&&t.valueRange.end>o)t.valueRange.end=o;if(t===e)break;t=t.context.parent}return i}class Collection extends n.Node{static nextContentHasIndent(e,t,r){const s=n.Node.endOfLine(e,t)+1;t=n.Node.endOfWhiteSpace(e,s);const i=e[t];if(!i)return false;if(t>=s+r)return true;if(i!=="#"&&i!=="\n")return false;return Collection.nextContentHasIndent(e,t,r)}constructor(e){super(e.type===n.Type.SEQ_ITEM?n.Type.SEQ:n.Type.MAP);for(let t=e.props.length-1;t>=0;--t){if(e.props[t].start0}parse(e,t){this.context=e;const{parseNode:r,src:s}=e;let i=n.Node.startOfLine(s,t);const o=this.items[0];o.context.parent=this;this.valueRange=n.Range.copy(o.valueRange);const a=o.range.start-o.context.lineStart;let l=t;l=n.Node.normalizeOffset(s,l);let c=s[l];let f=n.Node.endOfWhiteSpace(s,i)===l;let u=false;while(c){while(c==="\n"||c==="#"){if(f&&c==="\n"&&!u){const e=new BlankLine;l=e.parse({src:s},l);this.valueRange.end=l;if(l>=s.length){c=null;break}this.items.push(e);l-=1}else if(c==="#"){if(l=s.length){c=null;break}}i=l+1;l=n.Node.endOfIndent(s,i);if(n.Node.atBlank(s,l)){const e=n.Node.endOfWhiteSpace(s,l);const t=s[e];if(!t||t==="\n"||t==="#"){l=e}}c=s[l];f=true}if(!c){break}if(l!==i+a&&(f||c!==":")){if(lt)l=i;break}else if(!this.error){const e="All collection items must start at the same column";this.error=new n.YAMLSyntaxError(this,e)}}if(o.type===n.Type.SEQ_ITEM){if(c!=="-"){if(i>t)l=i;break}}else if(c==="-"&&!this.error){const e=s[l+1];if(!e||e==="\n"||e==="\t"||e===" "){const e="A collection cannot be both a mapping and a sequence";this.error=new n.YAMLSyntaxError(this,e)}}const e=r({atLineStart:f,inCollection:true,indent:a,lineStart:i,parent:this},l);if(!e)return l;this.items.push(e);this.valueRange.end=e.valueRange.end;l=n.Node.normalizeOffset(s,e.range.end);c=s[l];f=false;u=e.includesTrailingLines;if(c){let e=l-1;let t=s[e];while(t===" "||t==="\t")t=s[--e];if(t==="\n"){i=e+1;f=true}}const h=grabCollectionEndComments(e);if(h)Array.prototype.push.apply(this.items,h)}return l}setOrigRanges(e,t){t=super.setOrigRanges(e,t);this.items.forEach(r=>{t=r.setOrigRanges(e,t)});return t}toString(){const{context:{src:e},items:t,range:r,value:s}=this;if(s!=null)return s;let i=e.slice(r.start,t[0].range.start)+String(t[0]);for(let e=1;e0){this.contents=this.directives;this.directives=[]}return i}}if(t[i]){this.directivesEndMarker=new n.Range(i,i+3);return i+3}if(s){this.error=new n.YAMLSemanticError(this,"Missing directives-end indicator line")}else if(this.directives.length>0){this.contents=this.directives;this.directives=[]}return i}parseContents(e){const{parseNode:t,src:r}=this.context;if(!this.contents)this.contents=[];let s=e;while(r[s-1]==="-")s-=1;let i=n.Node.endOfWhiteSpace(r,e);let o=s===e;this.valueRange=new n.Range(i);while(!n.Node.atDocumentBoundary(r,i,n.Char.DOCUMENT_END)){switch(r[i]){case"\n":if(o){const e=new BlankLine;i=e.parse({src:r},i);if(i{t=r.setOrigRanges(e,t)});if(this.directivesEndMarker)t=this.directivesEndMarker.setOrigRange(e,t);this.contents.forEach(r=>{t=r.setOrigRanges(e,t)});if(this.documentEndMarker)t=this.documentEndMarker.setOrigRange(e,t);return t}toString(){const{contents:e,directives:t,value:r}=this;if(r!=null)return r;let s=t.join("");if(e.length>0){if(t.length>0||e[0].type===n.Type.COMMENT)s+="---\n";s+=e.join("")}if(s[s.length-1]!=="\n")s+="\n";return s}}class Alias extends n.Node{parse(e,t){this.context=e;const{src:r}=e;let s=n.Node.endOfIdentifier(r,t+1);this.valueRange=new n.Range(t+1,s);s=n.Node.endOfWhiteSpace(r,s);s=this.parseComment(s);return s}}const s={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"};class BlockValue extends n.Node{constructor(e,t){super(e,t);this.blockIndent=null;this.chomping=s.CLIP;this.header=null}get includesTrailingLines(){return this.chomping===s.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{indent:r,src:i}=this.context;if(this.valueRange.isEmpty())return"";let o=null;let a=i[t-1];while(a==="\n"||a==="\t"||a===" "){t-=1;if(t<=e){if(this.chomping===s.KEEP)break;else return""}if(a==="\n")o=t;a=i[t-1]}let l=t+1;if(o){if(this.chomping===s.KEEP){l=o;t=this.valueRange.end}else{t=o}}const c=r+this.blockIndent;const f=this.type===n.Type.BLOCK_FOLDED;let u=true;let h="";let p="";let d=false;for(let r=e;rl){l=c}}else if(s&&s!=="\n"&&c{if(r instanceof n.Node){t=r.setOrigRanges(e,t)}else if(e.length===0){r.origOffset=r.offset}else{let n=t;while(nr.offset)break;else++n}r.origOffset=r.offset+n;t=n}});return t}toString(){const{context:{src:e},items:t,range:r,value:s}=this;if(s!=null)return s;const i=t.filter(e=>e instanceof n.Node);let o="";let a=r.start;i.forEach(t=>{const r=e.slice(a,t.range.start);a=t.range.end;o+=r+String(t);if(o[o.length-1]==="\n"&&e[a-1]!=="\n"&&e[a]==="\n"){a+=1}});o+=e.slice(a,r.end);return n.Node.addStringTerminator(e,r.end,o)}}class QuoteDouble extends n.Node{static endOfQuote(e,t){let r=e[t];while(r&&r!=='"'){t+=r==="\\"?2:1;r=e[t]}return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[];const{start:t,end:r}=this.valueRange;const{indent:s,src:i}=this.context;if(i[r-1]!=='"')e.push(new n.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=t+1;ae?i.slice(e,a+1):t}else{o+=t}}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,t,r){const{src:s}=this.context;const i=s.substr(e,t);const o=i.length===t&&/^[0-9a-fA-F]+$/.test(i);const a=o?parseInt(i,16):NaN;if(isNaN(a)){r.push(new n.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,t+2)}`));return s.substr(e-2,t+2)}return String.fromCodePoint(a)}parse(e,t){this.context=e;const{src:r}=e;let s=QuoteDouble.endOfQuote(r,t+1);this.valueRange=new n.Range(t,s);s=n.Node.endOfWhiteSpace(r,s);s=this.parseComment(s);return s}}class QuoteSingle extends n.Node{static endOfQuote(e,t){let r=e[t];while(r){if(r==="'"){if(e[t+1]!=="'")break;r=e[t+=2]}else{r=e[t+=1]}}return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[];const{start:t,end:r}=this.valueRange;const{indent:s,src:i}=this.context;if(i[r-1]!=="'")e.push(new n.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=t+1;ae?i.slice(e,a+1):t}else{o+=t}}return e.length>0?{errors:e,str:o}:o}parse(e,t){this.context=e;const{src:r}=e;let s=QuoteSingle.endOfQuote(r,t+1);this.valueRange=new n.Range(t,s);s=n.Node.endOfWhiteSpace(r,s);s=this.parseComment(s);return s}}function createNewNode(e,t){switch(e){case n.Type.ALIAS:return new Alias(e,t);case n.Type.BLOCK_FOLDED:case n.Type.BLOCK_LITERAL:return new BlockValue(e,t);case n.Type.FLOW_MAP:case n.Type.FLOW_SEQ:return new FlowCollection(e,t);case n.Type.MAP_KEY:case n.Type.MAP_VALUE:case n.Type.SEQ_ITEM:return new CollectionItem(e,t);case n.Type.COMMENT:case n.Type.PLAIN:return new n.PlainValue(e,t);case n.Type.QUOTE_DOUBLE:return new QuoteDouble(e,t);case n.Type.QUOTE_SINGLE:return new QuoteSingle(e,t);default:return null}}class ParseContext{static parseType(e,t,r){switch(e[t]){case"*":return n.Type.ALIAS;case">":return n.Type.BLOCK_FOLDED;case"|":return n.Type.BLOCK_LITERAL;case"{":return n.Type.FLOW_MAP;case"[":return n.Type.FLOW_SEQ;case"?":return!r&&n.Node.atBlank(e,t+1,true)?n.Type.MAP_KEY:n.Type.PLAIN;case":":return!r&&n.Node.atBlank(e,t+1,true)?n.Type.MAP_VALUE:n.Type.PLAIN;case"-":return!r&&n.Node.atBlank(e,t+1,true)?n.Type.SEQ_ITEM:n.Type.PLAIN;case'"':return n.Type.QUOTE_DOUBLE;case"'":return n.Type.QUOTE_SINGLE;default:return n.Type.PLAIN}}constructor(e={},{atLineStart:t,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){n._defineProperty(this,"parseNode",(e,t)=>{if(n.Node.atDocumentBoundary(this.src,t))return null;const r=new ParseContext(this,e);const{props:s,type:i,valueStart:o}=r.parseProps(t);const a=createNewNode(i,s);let l=a.parse(r,o);a.range=new n.Range(t,l);if(l<=t){a.error=new Error(`Node#parse consumed no characters`);a.error.parseEnd=l;a.error.source=a;a.range.end=t+1}if(r.nodeStartsCollection(a)){if(!a.error&&!r.atLineStart&&r.parent.type===n.Type.DOCUMENT){a.error=new n.YAMLSyntaxError(a,"Block collection must not have preceding content here (e.g. directives-end indicator)")}const e=new Collection(a);l=e.parse(new ParseContext(r),l);e.range=new n.Range(t,l);return e}return a});this.atLineStart=t!=null?t:e.atLineStart||false;this.inCollection=r!=null?r:e.inCollection||false;this.inFlow=s!=null?s:e.inFlow||false;this.indent=i!=null?i:e.indent;this.lineStart=o!=null?o:e.lineStart;this.parent=a!=null?a:e.parent||{};this.root=e.root;this.src=e.src}nodeStartsCollection(e){const{inCollection:t,inFlow:r,src:s}=this;if(t||r)return false;if(e instanceof CollectionItem)return true;let i=e.range.end;if(s[i]==="\n"||s[i-1]==="\n")return false;i=n.Node.endOfWhiteSpace(s,i);return s[i]===":"}parseProps(e){const{inFlow:t,parent:r,src:s}=this;const i=[];let o=false;e=this.atLineStart?n.Node.endOfIndent(s,e):n.Node.endOfWhiteSpace(s,e);let a=s[e];while(a===n.Char.ANCHOR||a===n.Char.COMMENT||a===n.Char.TAG||a==="\n"){if(a==="\n"){const t=e+1;const i=n.Node.endOfIndent(s,t);const a=i-(t+this.indent);const l=r.type===n.Type.SEQ_ITEM&&r.context.atLineStart;if(!n.Node.nextNodeIsIndented(s[i],a,!l))break;this.atLineStart=true;this.lineStart=t;o=false;e=i}else if(a===n.Char.COMMENT){const t=n.Node.endOfLine(s,e+1);i.push(new n.Range(e,t));e=t}else{let t=n.Node.endOfIdentifier(s,e+1);if(a===n.Char.TAG&&s[t]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,t+13))){t=n.Node.endOfIdentifier(s,t+5)}i.push(new n.Range(e,t));o=true;e=n.Node.endOfWhiteSpace(s,t)}a=s[e]}if(o&&a===":"&&n.Node.atBlank(s,e+1,true))e-=1;const l=ParseContext.parseType(s,e,t);return{props:i,type:l,valueStart:e}}}function parse(e){const t=[];if(e.indexOf("\r")!==-1){e=e.replace(/\r\n?/g,(e,r)=>{if(e.length>1)t.push(r);return"\n"})}const r=[];let n=0;do{const t=new Document;const s=new ParseContext({src:e});n=t.parse(s,n);r.push(t)}while(n{if(t.length===0)return false;for(let e=1;er.join("...\n"));return r}t.parse=parse},390:(e,t,r)=>{"use strict";var n=r(6580);function addCommentBefore(e,t,r){if(!r)return e;const n=r.replace(/[\s\S]^/gm,`$&${t}#`);return`#${n}\n${t}${e}`}function addComment(e,t,r){return!r?e:r.indexOf("\n")===-1?`${e} #${r}`:`${e}\n`+r.replace(/^/gm,`${t||""}#`)}class Node{}function toJSON(e,t,r){if(Array.isArray(e))return e.map((e,t)=>toJSON(e,String(t),r));if(e&&typeof e.toJSON==="function"){const n=r&&r.anchors&&r.anchors.get(e);if(n)r.onCreate=(e=>{n.res=e;delete r.onCreate});const s=e.toJSON(t,r);if(n&&r.onCreate)r.onCreate(s);return s}if((!r||!r.keep)&&typeof e==="bigint")return Number(e);return e}class Scalar extends Node{constructor(e){super();this.value=e}toJSON(e,t){return t&&t.keep?this.value:toJSON(this.value,e,t)}toString(){return String(this.value)}}function collectionFromPath(e,t,r){let n=r;for(let e=t.length-1;e>=0;--e){const r=t[e];const s=Number.isInteger(r)&&r>=0?[]:{};s[r]=n;n=s}return e.createNode(n,false)}const s=e=>e==null||typeof e==="object"&&e[Symbol.iterator]().next().done;class Collection extends Node{constructor(e){super();n._defineProperty(this,"items",[]);this.schema=e}addIn(e,t){if(s(e))this.add(t);else{const[r,...n]=e;const s=this.get(r,true);if(s instanceof Collection)s.addIn(n,t);else if(s===undefined&&this.schema)this.set(r,collectionFromPath(this.schema,n,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn([e,...t]){if(t.length===0)return this.delete(e);const r=this.get(e,true);if(r instanceof Collection)return r.deleteIn(t);else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`)}getIn([e,...t],r){const n=this.get(e,true);if(t.length===0)return!r&&n instanceof Scalar?n.value:n;else return n instanceof Collection?n.getIn(t,r):undefined}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return false;const t=e.value;return t==null||t instanceof Scalar&&t.value==null&&!t.commentBefore&&!t.comment&&!t.tag})}hasIn([e,...t]){if(t.length===0)return this.has(e);const r=this.get(e,true);return r instanceof Collection?r.hasIn(t):false}setIn([e,...t],r){if(t.length===0){this.set(e,r)}else{const n=this.get(e,true);if(n instanceof Collection)n.setIn(t,r);else if(n===undefined&&this.schema)this.set(e,collectionFromPath(this.schema,t,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`)}}toJSON(){return null}toString(e,{blockItem:t,flowChars:r,isMap:s,itemIndent:i},o,a){const{indent:l,indentStep:c,stringify:f}=e;const u=this.type===n.Type.FLOW_MAP||this.type===n.Type.FLOW_SEQ||e.inFlow;if(u)i+=c;const h=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:h,indent:i,inFlow:u,type:null});let p=false;let d=false;const g=this.items.reduce((t,r,n)=>{let s;if(r){if(!p&&r.spaceBefore)t.push({type:"comment",str:""});if(r.commentBefore)r.commentBefore.match(/^.*$/gm).forEach(e=>{t.push({type:"comment",str:`#${e}`})});if(r.comment)s=r.comment;if(u&&(!p&&r.spaceBefore||r.commentBefore||r.comment||r.key&&(r.key.commentBefore||r.key.comment)||r.value&&(r.value.commentBefore||r.value.comment)))d=true}p=false;let o=f(r,e,()=>s=null,()=>p=true);if(u&&!d&&o.includes("\n"))d=true;if(u&&ne.str);if(d||n.reduce((e,t)=>e+t.length+2,2)>Collection.maxFlowStringSingleLineLength){w=e;for(const e of n){w+=e?`\n${c}${l}${e}`:"\n"}w+=`\n${l}${t}`}else{w=`${e} ${n.join(" ")} ${t}`}}else{const e=g.map(t);w=e.shift();for(const t of e)w+=t?`\n${l}${t}`:"\n"}if(this.comment){w+="\n"+this.comment.replace(/^/gm,`${l}#`);if(o)o()}else if(p&&a)a();return w}}n._defineProperty(Collection,"maxFlowStringSingleLineLength",60);function asItemIndex(e){let t=e instanceof Scalar?e.value:e;if(t&&typeof t==="string")t=Number(t);return Number.isInteger(t)&&t>=0?t:null}class YAMLSeq extends Collection{add(e){this.items.push(e)}delete(e){const t=asItemIndex(e);if(typeof t!=="number")return false;const r=this.items.splice(t,1);return r.length>0}get(e,t){const r=asItemIndex(e);if(typeof r!=="number")return undefined;const n=this.items[r];return!t&&n instanceof Scalar?n.value:n}has(e){const t=asItemIndex(e);return typeof t==="number"&&te.type==="comment"?e.str:`- ${e.str}`,flowChars:{start:"[",end:"]"},isMap:false,itemIndent:(e.indent||"")+" "},t,r)}}const i=(e,t,r)=>{if(t===null)return"";if(typeof t!=="object")return String(t);if(e instanceof Node&&r&&r.doc)return e.toString({anchors:{},doc:r.doc,indent:"",indentStep:r.indentStep,inFlow:true,inStringifyKey:true,stringify:r.stringify});return JSON.stringify(t)};class Pair extends Node{constructor(e,t=null){super();this.key=e;this.value=t;this.type=Pair.Type.PAIR}get commentBefore(){return this.key instanceof Node?this.key.commentBefore:undefined}set commentBefore(e){if(this.key==null)this.key=new Scalar(null);if(this.key instanceof Node)this.key.commentBefore=e;else{const e="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(e)}}addToJSMap(e,t){const r=toJSON(this.key,"",e);if(t instanceof Map){const n=toJSON(this.value,r,e);t.set(r,n)}else if(t instanceof Set){t.add(r)}else{const n=i(this.key,r,e);t[n]=toJSON(this.value,n,e)}return t}toJSON(e,t){const r=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,r)}toString(e,t,r){if(!e||!e.doc)return JSON.stringify(this);const{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options;let{key:a,value:l}=this;let c=a instanceof Node&&a.comment;if(o){if(c){throw new Error("With simple keys, key nodes cannot have comments")}if(a instanceof Collection){const e="With simple keys, collection cannot be used as a key value";throw new Error(e)}}const f=!o&&(!a||c||a instanceof Collection||a.type===n.Type.BLOCK_FOLDED||a.type===n.Type.BLOCK_LITERAL);const{doc:u,indent:h,indentStep:p,stringify:d}=e;e=Object.assign({},e,{implicitKey:!f,indent:h+p});let g=false;let w=d(a,e,()=>c=null,()=>g=true);w=addComment(w,e.indent,c);if(e.allNullValues&&!o){if(this.comment){w=addComment(w,e.indent,this.comment);if(t)t()}else if(g&&!c&&r)r();return e.inFlow?w:`? ${w}`}w=f?`? ${w}\n${h}:`:`${w}:`;if(this.comment){w=addComment(w,e.indent,this.comment);if(t)t()}let y="";let m=null;if(l instanceof Node){if(l.spaceBefore)y="\n";if(l.commentBefore){const t=l.commentBefore.replace(/^/gm,`${e.indent}#`);y+=`\n${t}`}m=l.comment}else if(l&&typeof l==="object"){l=u.schema.createNode(l,true)}e.implicitKey=false;if(!f&&!this.comment&&l instanceof Scalar)e.indentAtStart=w.length+1;g=false;if(!i&&s>=2&&!e.inFlow&&!f&&l instanceof YAMLSeq&&l.type!==n.Type.FLOW_SEQ&&!l.tag&&!u.anchors.getName(l)){e.indent=e.indent.substr(2)}const S=d(l,e,()=>m=null,()=>g=true);let b=" ";if(y||this.comment){b=`${y}\n${e.indent}`}else if(!f&&l instanceof Collection){const t=S[0]==="["||S[0]==="{";if(!t||S.includes("\n"))b=`\n${e.indent}`}if(g&&!m&&r)r();return addComment(w+b+S,e.indent,m)}}n._defineProperty(Pair,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});const o=(e,t)=>{if(e instanceof Alias){const r=t.get(e.source);return r.count*r.aliasCount}else if(e instanceof Collection){let r=0;for(const n of e.items){const e=o(n,t);if(e>r)r=e}return r}else if(e instanceof Pair){const r=o(e.key,t);const n=o(e.value,t);return Math.max(r,n)}return 1};class Alias extends Node{static stringify({range:e,source:t},{anchors:r,doc:n,implicitKey:s,inStringifyKey:i}){let o=Object.keys(r).find(e=>r[e]===t);if(!o&&i)o=n.anchors.getName(t)||n.anchors.newName();if(o)return`*${o}${s?" ":""}`;const a=n.anchors.getName(t)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${a} [${e}]`)}constructor(e){super();this.source=e;this.type=n.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,t){if(!t)return toJSON(this.source,e,t);const{anchors:r,maxAliasCount:s}=t;const i=r.get(this.source);if(!i||i.res===undefined){const e="This should not happen: Alias anchor was not resolved?";if(this.cstNode)throw new n.YAMLReferenceError(this.cstNode,e);else throw new ReferenceError(e)}if(s>=0){i.count+=1;if(i.aliasCount===0)i.aliasCount=o(this.source,r);if(i.count*i.aliasCount>s){const e="Excessive alias count indicates a resource exhaustion attack";if(this.cstNode)throw new n.YAMLReferenceError(this.cstNode,e);else throw new ReferenceError(e)}}return i.res}toString(e){return Alias.stringify(this,e)}}n._defineProperty(Alias,"default",true);function findPair(e,t){const r=t instanceof Scalar?t.value:t;for(const n of e){if(n instanceof Pair){if(n.key===t||n.key===r)return n;if(n.key&&n.key.value===r)return n}}return undefined}class YAMLMap extends Collection{add(e,t){if(!e)e=new Pair(e);else if(!(e instanceof Pair))e=new Pair(e.key||e,e.value);const r=findPair(this.items,e.key);const n=this.schema&&this.schema.sortMapEntries;if(r){if(t)r.value=e.value;else throw new Error(`Key ${e.key} already set`)}else if(n){const t=this.items.findIndex(t=>n(e,t)<0);if(t===-1)this.items.push(e);else this.items.splice(t,0,e)}else{this.items.push(e)}}delete(e){const t=findPair(this.items,e);if(!t)return false;const r=this.items.splice(this.items.indexOf(t),1);return r.length>0}get(e,t){const r=findPair(this.items,e);const n=r&&r.value;return!t&&n instanceof Scalar?n.value:n}has(e){return!!findPair(this.items,e)}set(e,t){this.add(new Pair(e,t),true)}toJSON(e,t,r){const n=r?new r:t&&t.mapAsMap?new Map:{};if(t&&t.onCreate)t.onCreate(n);for(const e of this.items)e.addToJSMap(t,n);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items){if(!(e instanceof Pair))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`)}return super.toString(e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},isMap:true,itemIndent:e.indent||""},t,r)}}const a="<<";class Merge extends Pair{constructor(e){if(e instanceof Pair){let t=e.value;if(!(t instanceof YAMLSeq)){t=new YAMLSeq;t.items.push(e.value);t.range=e.value.range}super(e.key,t);this.range=e.range}else{super(new Scalar(a),new YAMLSeq)}this.type=Pair.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:r}of this.value.items){if(!(r instanceof YAMLMap))throw new Error("Merge sources must be maps");const n=r.toJSON(null,e,Map);for(const[e,r]of n){if(t instanceof Map){if(!t.has(e))t.set(e,r)}else if(t instanceof Set){t.add(e)}else{if(!Object.prototype.hasOwnProperty.call(t,e))t[e]=r}}}return t}toString(e,t){const r=this.value;if(r.items.length>1)return super.toString(e,t);this.value=r.items[0];const n=super.toString(e,t);this.value=r;return n}}const l={defaultType:n.Type.BLOCK_LITERAL,lineWidth:76};const c={trueStr:"true",falseStr:"false"};const f={asBigInt:false};const u={nullStr:"null"};const h={defaultType:n.Type.PLAIN,doubleQuoted:{jsonEncoding:false,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function resolveScalar(e,t,r){for(const{format:r,test:n,resolve:s}of t){if(n){const t=e.match(n);if(t){let e=s.apply(null,t);if(!(e instanceof Scalar))e=new Scalar(e);if(r)e.format=r;return e}}}if(r)e=r(e);return new Scalar(e)}const p="flow";const d="block";const g="quoted";const w=(e,t)=>{let r=e[t+1];while(r===" "||r==="\t"){do{r=e[t+=1]}while(r&&r!=="\n");r=e[t+1]}return t};function foldFlowLines(e,t,r,{indentAtStart:n,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return e;const l=Math.max(1+i,1+s-t.length);if(e.length<=l)return e;const c=[];const f={};let u=s-(typeof n==="number"?n:t.length);let h=undefined;let p=undefined;let y=false;let m=-1;if(r===d){m=w(e,m);if(m!==-1)u=m+l}for(let t;t=e[m+=1];){if(r===g&&t==="\\"){switch(e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}}if(t==="\n"){if(r===d)m=w(e,m);u=m+l;h=undefined}else{if(t===" "&&p&&p!==" "&&p!=="\n"&&p!=="\t"){const t=e[m+1];if(t&&t!==" "&&t!=="\n"&&t!=="\t")h=m}if(m>=u){if(h){c.push(h);u=h+l;h=undefined}else if(r===g){while(p===" "||p==="\t"){p=t;t=e[m+=1];y=true}c.push(m-2);f[m-2]=true;u=m-2+l;h=undefined}else{y=true}}}p=t}if(y&&a)a();if(c.length===0)return e;if(o)o();let S=e.slice(0,c[0]);for(let n=0;ne?Object.assign({indentAtStart:e},h.fold):h.fold;const m=e=>/^(%|---|\.\.\.)/m.test(e);function lineLengthOverLimit(e,t){const r=e.length;if(r<=t)return false;for(let n=0,s=0;nt)return true;s=n+1;if(r-s<=t)return false}}return true}function doubleQuotedString(e,t){const{implicitKey:r}=t;const{jsonEncoding:n,minMultiLineLength:s}=h.doubleQuoted;const i=JSON.stringify(e);if(n)return i;const o=t.indent||(m(e)?" ":"");let a="";let l=0;for(let e=0,t=i[e];t;t=i[++e]){if(t===" "&&i[e+1]==="\\"&&i[e+2]==="n"){a+=i.slice(l,e)+"\\ ";e+=1;l=e;t="\\"}if(t==="\\")switch(i[e+1]){case"u":{a+=i.slice(l,e);const t=i.substr(e+2,4);switch(t){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:if(t.substr(0,2)==="00")a+="\\x"+t.substr(2);else a+=i.substr(e,6)}e+=5;l=e+1}break;case"n":if(r||i[e+2]==='"'||i.length";if(!r)return f+"\n";let u="";let p="";r=r.replace(/[\n\t ]*$/,e=>{const t=e.indexOf("\n");if(t===-1){f+="-"}else if(r===e||t!==e.length-1){f+="+";if(o)o()}p=e.replace(/\n$/,"");return""}).replace(/^[\n ]*/,e=>{if(e.indexOf(" ")!==-1)f+=l;const t=e.match(/ +$/);if(t){u=e.slice(0,-t[0].length);return t[0]}else{u=e;return""}});if(p)p=p.replace(/\n+(?!\n|$)/g,`$&${a}`);if(u)u=u.replace(/\n+/g,`$&${a}`);if(e){f+=" #"+e.replace(/ ?[\r\n]+/g," ");if(i)i()}if(!r)return`${f}${l}\n${a}${p}`;if(c){r=r.replace(/\n+/g,`$&${a}`);return`${f}\n${a}${u}${r}${p}`}r=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${a}`);const g=foldFlowLines(`${u}${r}${p}`,a,d,h.fold);return`${f}\n${a}${g}`}function plainString(e,t,r,s){const{comment:i,type:o,value:a}=e;const{actualString:l,implicitKey:c,indent:f,inFlow:u}=t;if(c&&/[\n[\]{},]/.test(a)||u&&/[[\]{},]/.test(a)){return doubleQuotedString(a,t)}if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)){return c||u||a.indexOf("\n")===-1?a.indexOf('"')!==-1&&a.indexOf("'")===-1?singleQuotedString(a,t):doubleQuotedString(a,t):blockString(e,t,r,s)}if(!c&&!u&&o!==n.Type.PLAIN&&a.indexOf("\n")!==-1){return blockString(e,t,r,s)}if(f===""&&m(a)){t.forceBlockIndent=true;return blockString(e,t,r,s)}const h=a.replace(/\n+/g,`$&\n${f}`);if(l){const{tags:e}=t.doc.schema;const r=resolveScalar(h,e,e.scalarFallback).value;if(typeof r!=="string")return doubleQuotedString(a,t)}const d=c?h:foldFlowLines(h,f,p,y(t));if(i&&!u&&(d.indexOf("\n")!==-1||i.indexOf("\n")!==-1)){if(r)r();return addCommentBefore(d,f,i)}return d}function stringifyString(e,t,r,s){const{defaultType:i}=h;const{implicitKey:o,inFlow:a}=t;let{type:l,value:c}=e;if(typeof c!=="string"){c=String(c);e=Object.assign({},e,{value:c})}const f=i=>{switch(i){case n.Type.BLOCK_FOLDED:case n.Type.BLOCK_LITERAL:return blockString(e,t,r,s);case n.Type.QUOTE_DOUBLE:return doubleQuotedString(c,t);case n.Type.QUOTE_SINGLE:return singleQuotedString(c,t);case n.Type.PLAIN:return plainString(e,t,r,s);default:return null}};if(l!==n.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)){l=n.Type.QUOTE_DOUBLE}else if((o||a)&&(l===n.Type.BLOCK_FOLDED||l===n.Type.BLOCK_LITERAL)){l=n.Type.QUOTE_DOUBLE}let u=f(l);if(u===null){u=f(i);if(u===null)throw new Error(`Unsupported default string type ${i}`)}return u}function stringifyNumber({format:e,minFractionDigits:t,tag:r,value:n}){if(typeof n==="bigint")return String(n);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let s=JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let e=s.indexOf(".");if(e<0){e=s.length;s+="."}let r=t-(s.length-e-1);while(r-- >0)s+="0"}return s}function checkFlowCollectionEnd(e,t){let r,s;switch(t.type){case n.Type.FLOW_MAP:r="}";s="flow map";break;case n.Type.FLOW_SEQ:r="]";s="flow sequence";break;default:e.push(new n.YAMLSemanticError(t,"Not a flow collection!?"));return}let i;for(let e=t.items.length-1;e>=0;--e){const r=t.items[e];if(!r||r.type!==n.Type.COMMENT){i=r;break}}if(i&&i.char!==r){const o=`Expected ${s} to end with ${r}`;let a;if(typeof i.offset==="number"){a=new n.YAMLSemanticError(t,o);a.offset=i.offset+1}else{a=new n.YAMLSemanticError(i,o);if(i.range&&i.range.end)a.offset=i.range.end-i.range.start}e.push(a)}}function checkFlowCommentSpace(e,t){const r=t.context.src[t.range.start-1];if(r!=="\n"&&r!=="\t"&&r!==" "){const r="Comments must be separated from other tokens by white space characters";e.push(new n.YAMLSemanticError(t,r))}}function getLongKeyError(e,t){const r=String(t);const s=r.substr(0,8)+"..."+r.substr(-8);return new n.YAMLSemanticError(e,`The "${s}" key is too long`)}function resolveComments(e,t){for(const{afterKey:r,before:n,comment:s}of t){let t=e.items[n];if(!t){if(s!==undefined){if(e.comment)e.comment+="\n"+s;else e.comment=s}}else{if(r&&t.value)t=t.value;if(s===undefined){if(r||!t.commentBefore)t.spaceBefore=true}else{if(t.commentBefore)t.commentBefore+="\n"+s;else t.commentBefore=s}}}}function resolveString(e,t){const r=t.strValue;if(!r)return"";if(typeof r==="string")return r;r.errors.forEach(r=>{if(!r.source)r.source=t;e.errors.push(r)});return r.str}function resolveTagHandle(e,t){const{handle:r,suffix:s}=t.tag;let i=e.tagPrefixes.find(e=>e.handle===r);if(!i){const s=e.getDefaults().tagPrefixes;if(s)i=s.find(e=>e.handle===r);if(!i)throw new n.YAMLSemanticError(t,`The ${r} tag handle is non-default and was not declared.`)}if(!s)throw new n.YAMLSemanticError(t,`The ${r} tag has no suffix.`);if(r==="!"&&(e.version||e.options.version)==="1.0"){if(s[0]==="^"){e.warnings.push(new n.YAMLWarning(t,"YAML 1.0 ^ tag expansion is not supported"));return s}if(/[:/]/.test(s)){const e=s.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${s}`}}return i.prefix+decodeURIComponent(s)}function resolveTagName(e,t){const{tag:r,type:s}=t;let i=false;if(r){const{handle:s,suffix:o,verbatim:a}=r;if(a){if(a!=="!"&&a!=="!!")return a;const r=`Verbatim tags aren't resolved, so ${a} is invalid.`;e.errors.push(new n.YAMLSemanticError(t,r))}else if(s==="!"&&!o){i=true}else{try{return resolveTagHandle(e,t)}catch(t){e.errors.push(t)}}}switch(s){case n.Type.BLOCK_FOLDED:case n.Type.BLOCK_LITERAL:case n.Type.QUOTE_DOUBLE:case n.Type.QUOTE_SINGLE:return n.defaultTags.STR;case n.Type.FLOW_MAP:case n.Type.MAP:return n.defaultTags.MAP;case n.Type.FLOW_SEQ:case n.Type.SEQ:return n.defaultTags.SEQ;case n.Type.PLAIN:return i?n.defaultTags.STR:null;default:return null}}function resolveByTagName(e,t,r){const{tags:n}=e.schema;const s=[];for(const i of n){if(i.tag===r){if(i.test)s.push(i);else{const r=i.resolve(e,t);return r instanceof Collection?r:new Scalar(r)}}}const i=resolveString(e,t);if(typeof i==="string"&&s.length>0)return resolveScalar(i,s,n.scalarFallback);return null}function getFallbackTagName({type:e}){switch(e){case n.Type.FLOW_MAP:case n.Type.MAP:return n.defaultTags.MAP;case n.Type.FLOW_SEQ:case n.Type.SEQ:return n.defaultTags.SEQ;default:return n.defaultTags.STR}}function resolveTag(e,t,r){try{const n=resolveByTagName(e,t,r);if(n){if(r&&t.tag)n.tag=r;return n}}catch(r){if(!r.source)r.source=t;e.errors.push(r);return null}try{const s=getFallbackTagName(t);if(!s)throw new Error(`The tag ${r} is unavailable`);const i=`The tag ${r} is unavailable, falling back to ${s}`;e.warnings.push(new n.YAMLWarning(t,i));const o=resolveByTagName(e,t,s);o.tag=r;return o}catch(r){const s=new n.YAMLReferenceError(t,r.message);s.stack=r.stack;e.errors.push(s);return null}}const S=e=>{if(!e)return false;const{type:t}=e;return t===n.Type.MAP_KEY||t===n.Type.MAP_VALUE||t===n.Type.SEQ_ITEM};function resolveNodeProps(e,t){const r={before:[],after:[]};let s=false;let i=false;const o=S(t.context.parent)?t.context.parent.props.concat(t.props):t.props;for(const{start:a,end:l}of o){switch(t.context.src[a]){case n.Char.COMMENT:{if(!t.commentHasRequiredWhitespace(a)){const r="Comments must be separated from other tokens by white space characters";e.push(new n.YAMLSemanticError(t,r))}const{header:s,valueRange:i}=t;const o=i&&(a>i.start||s&&a>s.start)?r.after:r.before;o.push(t.context.src.slice(a+1,l));break}case n.Char.ANCHOR:if(s){const r="A node can have at most one anchor";e.push(new n.YAMLSemanticError(t,r))}s=true;break;case n.Char.TAG:if(i){const r="A node can have at most one tag";e.push(new n.YAMLSemanticError(t,r))}i=true;break}}return{comments:r,hasAnchor:s,hasTag:i}}function resolveNodeValue(e,t){const{anchors:r,errors:s,schema:i}=e;if(t.type===n.Type.ALIAS){const e=t.rawValue;const i=r.getNode(e);if(!i){const r=`Aliased anchor not found: ${e}`;s.push(new n.YAMLReferenceError(t,r));return null}const o=new Alias(i);r._cstAliases.push(o);return o}const o=resolveTagName(e,t);if(o)return resolveTag(e,t,o);if(t.type!==n.Type.PLAIN){const e=`Failed to resolve ${t.type} node here`;s.push(new n.YAMLSyntaxError(t,e));return null}try{const r=resolveString(e,t);return resolveScalar(r,i.tags,i.tags.scalarFallback)}catch(e){if(!e.source)e.source=t;s.push(e);return null}}function resolveNode(e,t){if(!t)return null;if(t.error)e.errors.push(t.error);const{comments:r,hasAnchor:s,hasTag:i}=resolveNodeProps(e.errors,t);if(s){const{anchors:r}=e;const n=t.anchor;const s=r.getNode(n);if(s)r.map[r.newName(n)]=s;r.map[n]=t}if(t.type===n.Type.ALIAS&&(s||i)){const r="An alias node must not specify any properties";e.errors.push(new n.YAMLSemanticError(t,r))}const o=resolveNodeValue(e,t);if(o){o.range=[t.range.start,t.range.end];if(e.options.keepCstNodes)o.cstNode=t;if(e.options.keepNodeTypes)o.type=t.type;const n=r.before.join("\n");if(n){o.commentBefore=o.commentBefore?`${o.commentBefore}\n${n}`:n}const s=r.after.join("\n");if(s)o.comment=o.comment?`${o.comment}\n${s}`:s}return t.resolved=o}function resolveMap(e,t){if(t.type!==n.Type.MAP&&t.type!==n.Type.FLOW_MAP){const r=`A ${t.type} node cannot be resolved as a mapping`;e.errors.push(new n.YAMLSyntaxError(t,r));return null}const{comments:r,items:s}=t.type===n.Type.FLOW_MAP?resolveFlowMapItems(e,t):resolveBlockMapItems(e,t);const i=new YAMLMap;i.items=s;resolveComments(i,r);let o=false;for(let r=0;r{if(e instanceof Alias){const{type:t}=e.source;if(t===n.Type.MAP||t===n.Type.FLOW_MAP)return false;return o="Merge nodes aliases can only point to maps"}return o="Merge nodes can only have Alias nodes as values"});if(o)e.errors.push(new n.YAMLSemanticError(t,o))}else{for(let o=r+1;o{if(s.length===0)return false;const{start:i}=s[0];if(t&&i>t.valueRange.start)return false;if(r[i]!==n.Char.COMMENT)return false;for(let t=e;t0){r=new n.PlainValue(n.Type.PLAIN,[]);r.context={parent:l,src:l.context.src};const e=l.range.start+1;r.range={start:e,end:e};r.valueRange={start:e,end:e};if(typeof l.range.origStart==="number"){const e=l.range.origStart+1;r.range.origStart=r.range.origEnd=e;r.valueRange.origStart=r.valueRange.origEnd=e}}const a=new Pair(i,resolveNode(e,r));resolvePairComment(l,a);s.push(a);if(i&&typeof o==="number"){if(l.range.start>o+1024)e.errors.push(getLongKeyError(t,i))}i=undefined;o=null}break;default:if(i!==undefined)s.push(new Pair(i));i=resolveNode(e,l);o=l.range.start;if(l.error)e.errors.push(l.error);e:for(let r=a+1;;++r){const s=t.items[r];switch(s&&s.type){case n.Type.BLANK_LINE:case n.Type.COMMENT:continue e;case n.Type.MAP_VALUE:break e;default:{const t="Implicit map keys need to be followed by map values";e.errors.push(new n.YAMLSemanticError(l,t));break e}}}if(l.valueRangeContainsNewline){const t="Implicit map keys need to be on a single line";e.errors.push(new n.YAMLSemanticError(l,t))}}}if(i!==undefined)s.push(new Pair(i));return{comments:r,items:s}}function resolveFlowMapItems(e,t){const r=[];const s=[];let i=undefined;let o=false;let a="{";for(let l=0;le instanceof Pair&&e.key instanceof Collection)){const r="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new n.YAMLWarning(t,r))}t.resolved=i;return i}function resolveBlockSeqItems(e,t){const r=[];const s=[];for(let i=0;ia+1024)e.errors.push(getLongKeyError(t,o));const{src:s}=c.context;for(let t=a;t{"use strict";var n=r(6580);var s=r(390);const i={identify:e=>e instanceof Uint8Array,default:false,tag:"tag:yaml.org,2002:binary",resolve:(e,t)=>{const r=s.resolveString(e,t);if(typeof Buffer==="function"){return Buffer.from(r,"base64")}else if(typeof atob==="function"){const e=atob(r.replace(/[\n\r]/g,""));const t=new Uint8Array(e.length);for(let r=0;r{let l;if(typeof Buffer==="function"){l=r instanceof Buffer?r.toString("base64"):Buffer.from(r.buffer).toString("base64")}else if(typeof btoa==="function"){let e="";for(let t=0;t1){const e="Each pair must have its own sequence indicator";throw new n.YAMLSemanticError(t,e)}const e=i.items[0]||new s.Pair;if(i.commentBefore)e.commentBefore=e.commentBefore?`${i.commentBefore}\n${e.commentBefore}`:i.commentBefore;if(i.comment)e.comment=e.comment?`${i.comment}\n${e.comment}`:i.comment;i=e}r.items[e]=i instanceof s.Pair?i:new s.Pair(i)}return r}function createPairs(e,t,r){const n=new s.YAMLSeq(e);n.tag="tag:yaml.org,2002:pairs";for(const s of t){let t,i;if(Array.isArray(s)){if(s.length===2){t=s[0];i=s[1]}else throw new TypeError(`Expected [key, value] tuple: ${s}`)}else if(s&&s instanceof Object){const e=Object.keys(s);if(e.length===1){t=e[0];i=s[t]}else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else{t=s}const o=e.createPair(t,i,r);n.items.push(o)}return n}const o={default:false,tag:"tag:yaml.org,2002:pairs",resolve:parsePairs,createNode:createPairs};class YAMLOMap extends s.YAMLSeq{constructor(){super();n._defineProperty(this,"add",s.YAMLMap.prototype.add.bind(this));n._defineProperty(this,"delete",s.YAMLMap.prototype.delete.bind(this));n._defineProperty(this,"get",s.YAMLMap.prototype.get.bind(this));n._defineProperty(this,"has",s.YAMLMap.prototype.has.bind(this));n._defineProperty(this,"set",s.YAMLMap.prototype.set.bind(this));this.tag=YAMLOMap.tag}toJSON(e,t){const r=new Map;if(t&&t.onCreate)t.onCreate(r);for(const e of this.items){let n,i;if(e instanceof s.Pair){n=s.toJSON(e.key,"",t);i=s.toJSON(e.value,n,t)}else{n=s.toJSON(e,"",t)}if(r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,i)}return r}}n._defineProperty(YAMLOMap,"tag","tag:yaml.org,2002:omap");function parseOMap(e,t){const r=parsePairs(e,t);const i=[];for(const{key:e}of r.items){if(e instanceof s.Scalar){if(i.includes(e.value)){const e="Ordered maps must not include duplicate keys";throw new n.YAMLSemanticError(t,e)}else{i.push(e.value)}}}return Object.assign(new YAMLOMap,r)}function createOMap(e,t,r){const n=createPairs(e,t,r);const s=new YAMLOMap;s.items=n.items;return s}const a={identify:e=>e instanceof Map,nodeClass:YAMLOMap,default:false,tag:"tag:yaml.org,2002:omap",resolve:parseOMap,createNode:createOMap};class YAMLSet extends s.YAMLMap{constructor(){super();this.tag=YAMLSet.tag}add(e){const t=e instanceof s.Pair?e:new s.Pair(e);const r=s.findPair(this.items,t.key);if(!r)this.items.push(t)}get(e,t){const r=s.findPair(this.items,e);return!t&&r instanceof s.Pair?r.key instanceof s.Scalar?r.key.value:r.key:r}set(e,t){if(typeof t!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const r=s.findPair(this.items,e);if(r&&!t){this.items.splice(this.items.indexOf(r),1)}else if(!r&&t){this.items.push(new s.Pair(e))}}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,r);else throw new Error("Set items must all have null values")}}n._defineProperty(YAMLSet,"tag","tag:yaml.org,2002:set");function parseSet(e,t){const r=s.resolveMap(e,t);if(!r.hasAllNullValues())throw new n.YAMLSemanticError(t,"Set items must all have null values");return Object.assign(new YAMLSet,r)}function createSet(e,t,r){const n=new YAMLSet;for(const s of t)n.items.push(e.createPair(s,null,r));return n}const l={identify:e=>e instanceof Set,nodeClass:YAMLSet,default:false,tag:"tag:yaml.org,2002:set",resolve:parseSet,createNode:createSet};const c=(e,t)=>{const r=t.split(":").reduce((e,t)=>e*60+Number(t),0);return e==="-"?-r:r};const f=({value:e})=>{if(isNaN(e)||!isFinite(e))return s.stringifyNumber(e);let t="";if(e<0){t="-";e=Math.abs(e)}const r=[e%60];if(e<60){r.unshift(0)}else{e=Math.round((e-r[0])/60);r.unshift(e%60);if(e>=60){e=Math.round((e-r[0])/60);r.unshift(e)}}return t+r.map(e=>e<10?"0"+String(e):String(e)).join(":").replace(/000000\d*$/,"")};const u={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,r)=>c(t,r.replace(/_/g,"")),stringify:f};const h={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(e,t,r)=>c(t,r.replace(/_/g,"")),stringify:f};const p={identify:e=>e instanceof Date,default:true,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:(e,t,r,n,s,i,o,a,l)=>{if(a)a=(a+"00").substr(1,3);let f=Date.UTC(t,r-1,n,s||0,i||0,o||0,a||0);if(l&&l!=="Z"){let e=c(l[0],l.slice(1));if(Math.abs(e)<30)e*=60;f-=6e4*e}return new Date(f)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function shouldWarn(e){const t=typeof process!=="undefined"&&process.env||{};if(e){if(typeof YAML_SILENCE_DEPRECATION_WARNINGS!=="undefined")return!YAML_SILENCE_DEPRECATION_WARNINGS;return!t.YAML_SILENCE_DEPRECATION_WARNINGS}if(typeof YAML_SILENCE_WARNINGS!=="undefined")return!YAML_SILENCE_WARNINGS;return!t.YAML_SILENCE_WARNINGS}function warn(e,t){if(shouldWarn(false)){const r=typeof process!=="undefined"&&process.emitWarning;if(r)r(e,t);else{console.warn(t?`${t}: ${e}`:e)}}}function warnFileDeprecation(e){if(shouldWarn(true)){const t=e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");warn(`The endpoint 'yaml/${t}' will be removed in a future release.`,"DeprecationWarning")}}const d={};function warnOptionDeprecation(e,t){if(!d[e]&&shouldWarn(true)){d[e]=true;let r=`The option '${e}' will be removed in a future release`;r+=t?`, use '${t}' instead.`:".";warn(r,"DeprecationWarning")}}t.binary=i;t.floatTime=h;t.intTime=u;t.omap=a;t.pairs=o;t.set=l;t.timestamp=p;t.warn=warn;t.warnFileDeprecation=warnFileDeprecation;t.warnOptionDeprecation=warnOptionDeprecation},1310:(e,t,r)=>{e.exports=r(4884).YAML},4638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Explorer=void 0;var n=_interopRequireDefault(r(5622));var s=r(4135);var i=r(1238);var o=r(6905);var a=r(6427);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class Explorer extends s.ExplorerBase{constructor(e){super(e)}async search(e=process.cwd()){const t=await(0,a.getDirectory)(e);const r=await this.searchFromDirectory(t);return r}async searchFromDirectory(e){const t=n.default.resolve(process.cwd(),e);const r=async()=>{const e=await this.searchDirectory(t);const r=this.nextDirectoryToSearch(t,e);if(r){return this.searchFromDirectory(r)}const n=await this.config.transform(e);return n};if(this.searchCache){return(0,o.cacheWrapper)(this.searchCache,t,r)}return r()}async searchDirectory(e){for await(const t of this.config.searchPlaces){const r=await this.loadSearchPlace(e,t);if(this.shouldSearchStopWithResult(r)===true){return r}}return null}async loadSearchPlace(e,t){const r=n.default.join(e,t);const s=await(0,i.readFile)(r);const o=await this.createCosmiconfigResult(r,s);return o}async loadFileContent(e,t){if(t===null){return null}if(t.trim()===""){return undefined}const r=this.getLoaderEntryForFile(e);const n=await r(e,t);return n}async createCosmiconfigResult(e,t){const r=await this.loadFileContent(e,t);const n=this.loadedContentToCosmiconfigResult(e,r);return n}async load(e){this.validateFilePath(e);const t=n.default.resolve(process.cwd(),e);const r=async()=>{const e=await(0,i.readFile)(t,{throwNotFound:true});const r=await this.createCosmiconfigResult(t,e);const n=await this.config.transform(r);return n};if(this.loadCache){return(0,o.cacheWrapper)(this.loadCache,t,r)}return r()}}t.Explorer=Explorer},4135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getExtensionDescription=getExtensionDescription;t.ExplorerBase=void 0;var n=_interopRequireDefault(r(5622));var s=r(8751);var i=r(1719);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class ExplorerBase{constructor(e){if(e.cache===true){this.loadCache=new Map;this.searchCache=new Map}this.config=e;this.validateConfig()}clearLoadCache(){if(this.loadCache){this.loadCache.clear()}}clearSearchCache(){if(this.searchCache){this.searchCache.clear()}}clearCaches(){this.clearLoadCache();this.clearSearchCache()}validateConfig(){const e=this.config;e.searchPlaces.forEach(t=>{const r=n.default.extname(t)||"noExt";const s=e.loaders[r];if(!s){throw new Error(`No loader specified for ${getExtensionDescription(t)}, so searchPlaces item "${t}" is invalid`)}if(typeof s!=="function"){throw new Error(`loader for ${getExtensionDescription(t)} is not a function (type provided: "${typeof s}"), so searchPlaces item "${t}" is invalid`)}})}shouldSearchStopWithResult(e){if(e===null)return false;if(e.isEmpty&&this.config.ignoreEmptySearchPlaces)return false;return true}nextDirectoryToSearch(e,t){if(this.shouldSearchStopWithResult(t)){return null}const r=nextDirUp(e);if(r===e||e===this.config.stopDir){return null}return r}loadPackageProp(e,t){const r=s.loaders.loadJson(e,t);const n=(0,i.getPropertyByPath)(r,this.config.packageProp);return n||null}getLoaderEntryForFile(e){if(n.default.basename(e)==="package.json"){const e=this.loadPackageProp.bind(this);return e}const t=n.default.extname(e)||"noExt";const r=this.config.loaders[t];if(!r){throw new Error(`No loader specified for ${getExtensionDescription(e)}`)}return r}loadedContentToCosmiconfigResult(e,t){if(t===null){return null}if(t===undefined){return{filepath:e,config:undefined,isEmpty:true}}return{config:t,filepath:e}}validateFilePath(e){if(!e){throw new Error("load must pass a non-empty string")}}}t.ExplorerBase=ExplorerBase;function nextDirUp(e){return n.default.dirname(e)}function getExtensionDescription(e){const t=n.default.extname(e);return t?`extension "${t}"`:"files without extensions"}},6239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ExplorerSync=void 0;var n=_interopRequireDefault(r(5622));var s=r(4135);var i=r(1238);var o=r(6905);var a=r(6427);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class ExplorerSync extends s.ExplorerBase{constructor(e){super(e)}searchSync(e=process.cwd()){const t=(0,a.getDirectorySync)(e);const r=this.searchFromDirectorySync(t);return r}searchFromDirectorySync(e){const t=n.default.resolve(process.cwd(),e);const r=()=>{const e=this.searchDirectorySync(t);const r=this.nextDirectoryToSearch(t,e);if(r){return this.searchFromDirectorySync(r)}const n=this.config.transform(e);return n};if(this.searchCache){return(0,o.cacheWrapperSync)(this.searchCache,t,r)}return r()}searchDirectorySync(e){for(const t of this.config.searchPlaces){const r=this.loadSearchPlaceSync(e,t);if(this.shouldSearchStopWithResult(r)===true){return r}}return null}loadSearchPlaceSync(e,t){const r=n.default.join(e,t);const s=(0,i.readFileSync)(r);const o=this.createCosmiconfigResultSync(r,s);return o}loadFileContentSync(e,t){if(t===null){return null}if(t.trim()===""){return undefined}const r=this.getLoaderEntryForFile(e);const n=r(e,t);return n}createCosmiconfigResultSync(e,t){const r=this.loadFileContentSync(e,t);const n=this.loadedContentToCosmiconfigResult(e,r);return n}loadSync(e){this.validateFilePath(e);const t=n.default.resolve(process.cwd(),e);const r=()=>{const e=(0,i.readFileSync)(t,{throwNotFound:true});const r=this.createCosmiconfigResultSync(t,e);const n=this.config.transform(r);return n};if(this.loadCache){return(0,o.cacheWrapperSync)(this.loadCache,t,r)}return r()}}t.ExplorerSync=ExplorerSync},6905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cacheWrapper=cacheWrapper;t.cacheWrapperSync=cacheWrapperSync;async function cacheWrapper(e,t,r){const n=e.get(t);if(n!==undefined){return n}const s=await r();e.set(t,s);return s}function cacheWrapperSync(e,t,r){const n=e.get(t);if(n!==undefined){return n}const s=r();e.set(t,s);return s}},6427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getDirectory=getDirectory;t.getDirectorySync=getDirectorySync;var n=_interopRequireDefault(r(5622));var s=r(3433);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}async function getDirectory(e){const t=await(0,s.isDirectory)(e);if(t===true){return e}const r=n.default.dirname(e);return r}function getDirectorySync(e){const t=(0,s.isDirectorySync)(e);if(t===true){return e}const r=n.default.dirname(e);return r}},1719:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getPropertyByPath=getPropertyByPath;function getPropertyByPath(e,t){if(typeof t==="string"&&Object.prototype.hasOwnProperty.call(e,t)){return e[t]}const r=typeof t==="string"?t.split("."):t;return r.reduce((e,t)=>{if(e===undefined){return e}return e[t]},e)}},4066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cosmiconfig=cosmiconfig;t.cosmiconfigSync=cosmiconfigSync;t.defaultLoaders=void 0;var n=_interopRequireDefault(r(2087));var s=r(4638);var i=r(6239);var o=r(8751);var a=r(1943);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cosmiconfig(e,t={}){const r=normalizeOptions(e,t);const n=new s.Explorer(r);return{search:n.search.bind(n),load:n.load.bind(n),clearLoadCache:n.clearLoadCache.bind(n),clearSearchCache:n.clearSearchCache.bind(n),clearCaches:n.clearCaches.bind(n)}}function cosmiconfigSync(e,t={}){const r=normalizeOptions(e,t);const n=new i.ExplorerSync(r);return{search:n.searchSync.bind(n),load:n.loadSync.bind(n),clearLoadCache:n.clearLoadCache.bind(n),clearSearchCache:n.clearSearchCache.bind(n),clearCaches:n.clearCaches.bind(n)}}const l=Object.freeze({".cjs":o.loaders.loadJs,".js":o.loaders.loadJs,".json":o.loaders.loadJson,".yaml":o.loaders.loadYaml,".yml":o.loaders.loadYaml,noExt:o.loaders.loadYaml});t.defaultLoaders=l;const c=function identity(e){return e};function normalizeOptions(e,t){const r={packageProp:e,searchPlaces:["package.json",`.${e}rc`,`.${e}rc.json`,`.${e}rc.yaml`,`.${e}rc.yml`,`.${e}rc.js`,`.${e}rc.cjs`,`${e}.config.js`,`${e}.config.cjs`],ignoreEmptySearchPlaces:true,stopDir:n.default.homedir(),cache:true,transform:c,loaders:l};const s={...r,...t,loaders:{...r.loaders,...t.loaders}};return s}},8751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.loaders=void 0;let n;const s=function loadJs(e){if(n===undefined){n=r(9900)}const t=n(e);return t};let i;const o=function loadJson(e,t){if(i===undefined){i=r(6615)}try{const r=i(t);return r}catch(t){t.message=`JSON Error in ${e}:\n${t.message}`;throw t}};let a;const l=function loadYaml(e,t){if(a===undefined){a=r(1310)}try{const r=a.parse(t,{prettyErrors:true});return r}catch(t){t.message=`YAML Error in ${e}:\n${t.message}`;throw t}};const c={loadJs:s,loadJson:o,loadYaml:l};t.loaders=c},1238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.readFile=readFile;t.readFileSync=readFileSync;var n=_interopRequireDefault(r(5747));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}async function fsReadFileAsync(e,t){return new Promise((r,s)=>{n.default.readFile(e,t,(e,t)=>{if(e){s(e);return}r(t)})})}async function readFile(e,t={}){const r=t.throwNotFound===true;try{const t=await fsReadFileAsync(e,"utf8");return t}catch(e){if(r===false&&e.code==="ENOENT"){return null}throw e}}function readFileSync(e,t={}){const r=t.throwNotFound===true;try{const t=n.default.readFileSync(e,"utf8");return t}catch(e){if(r===false&&e.code==="ENOENT"){return null}throw e}}},1943:()=>{"use strict"},6615:(e,t,r)=>{"use strict";const n=r(8361);const s=r(8335);const{default:i}=r(9036);const{codeFrameColumns:o}=r(6553);const a=n("JSONError",{fileName:n.append("in %s"),codeFrame:n.append("\n\n%s\n")});e.exports=((e,t,r)=>{if(typeof t==="string"){r=t;t=null}try{try{return JSON.parse(e,t)}catch(r){s(e,t);throw r}}catch(t){t.message=t.message.replace(/\n/g,"");const n=t.message.match(/in JSON at position (\d+) while parsing near/);const s=new a(t);if(r){s.fileName=r}if(n&&n.length>0){const t=new i(e);const r=Number(n[1]);const a=t.locationForIndex(r);const l=o(e,{start:{line:a.line+1,column:a.column+1}},{highlightCode:true});s.codeFrame=l}throw s}})},3433:(e,t,r)=>{"use strict";const{promisify:n}=r(1669);const s=r(5747);async function isType(e,t,r){if(typeof r!=="string"){throw new TypeError(`Expected a string, got ${typeof r}`)}try{const i=await n(s[e])(r);return i[t]()}catch(e){if(e.code==="ENOENT"){return false}throw e}}function isTypeSync(e,t,r){if(typeof r!=="string"){throw new TypeError(`Expected a string, got ${typeof r}`)}try{return s[e](r)[t]()}catch(e){if(e.code==="ENOENT"){return false}throw e}}t.isFile=isType.bind(null,"stat","isFile");t.isDirectory=isType.bind(null,"stat","isDirectory");t.isSymlink=isType.bind(null,"lstat","isSymbolicLink");t.isFileSync=isTypeSync.bind(null,"statSync","isFile");t.isDirectorySync=isTypeSync.bind(null,"statSync","isDirectory");t.isSymlinkSync=isTypeSync.bind(null,"lstatSync","isSymbolicLink")},1657:e=>{"use strict";class SyntaxError extends Error{constructor(e){super(e);const{line:t,column:r,reason:n,plugin:s,file:i}=e;this.name="SyntaxError";this.message=`${this.name}\n\n`;if(typeof t!=="undefined"){this.message+=`(${t}:${r}) `}this.message+=s?`${s}: `:"";this.message+=i?`${i} `:" ";this.message+=`${n}`;const o=e.showSourceCode();if(o){this.message+=`\n\n${o}\n`}this.stack=false}}e.exports=SyntaxError},5962:e=>{"use strict";class Warning extends Error{constructor(e){super(e);const{text:t,line:r,column:n,plugin:s}=e;this.name="Warning";this.message=`${this.name}\n\n`;if(typeof r!=="undefined"){this.message+=`(${r}:${n}) `}this.message+=s?`${s}: `:"";this.message+=`${t}`;this.stack=false}}e.exports=Warning},5365:(e,t,r)=>{"use strict";e.exports=r(6347).default},6347:(e,t,r)=>{"use strict";var n;n={value:true};t.default=loader;var s=r(8710);var i=_interopRequireDefault(r(3225));var o=_interopRequireDefault(r(7001));var a=r(2519);var l=_interopRequireDefault(r(4698));var c=_interopRequireDefault(r(5962));var f=_interopRequireDefault(r(1657));var u=_interopRequireDefault(r(7988));var h=r(1405);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}async function loader(e,t,r){const n=(0,s.getOptions)(this);(0,i.default)(u.default,n,{name:"PostCSS Loader",baseDataPath:"options"});const p=this.async();const d=typeof n.postcssOptions==="undefined"||typeof n.postcssOptions.config==="undefined"?true:n.postcssOptions.config;let g;if(d){try{g=await(0,h.loadConfig)(this,d)}catch(e){p(e);return}}const w=typeof n.sourceMap!=="undefined"?n.sourceMap:this.sourceMap;const{plugins:y,processOptions:m}=(0,h.getPostcssOptions)(this,g,n.postcssOptions);if(w){m.map={inline:false,annotation:false,...m.map}}if(t&&m.map){m.map.prev=(0,h.normalizeSourceMap)(t,this.context)}let S;if(r&&r.ast&&r.ast.type==="postcss"&&(0,a.satisfies)(r.ast.version,`^${l.default.version}`)){({root:S}=r.ast)}if(!S&&n.execute){e=(0,h.exec)(e,this)}let b;try{b=await(0,o.default)(y).process(S||e,m)}catch(e){if(e.file){this.addDependency(e.file)}if(e.name==="CssSyntaxError"){p(new f.default(e))}else{p(e)}return}for(const e of b.warnings()){this.emitWarning(new c.default(e))}for(const e of b.messages){if(e.type==="dependency"){this.addDependency(e.file)}if(e.type==="asset"&&e.content&&e.file){this.emitFile(e.file,e.content,e.sourceMap,e.info)}}let O=b.map?b.map.toJSON():undefined;if(O&&w){O=(0,h.normalizeSourceMapAfterPostcss)(O,this.context)}const A={type:"postcss",version:b.processor.version,root:b.root};p(null,b.css,O,{ast:A})}},1405:(e,t,r)=>{"use strict";e=r.nmd(e);Object.defineProperty(t,"__esModule",{value:true});t.loadConfig=loadConfig;t.getPostcssOptions=getPostcssOptions;t.exec=exec;t.normalizeSourceMap=normalizeSourceMap;t.normalizeSourceMapAfterPostcss=normalizeSourceMapAfterPostcss;var n=_interopRequireDefault(r(5622));var s=_interopRequireDefault(r(2282));var i=r(241);var o=r(4066);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const a=e;const l=(e,t)=>new Promise((r,n)=>{e.stat(t,(e,t)=>{if(e){n(e)}r(t)})});function exec(e,t){const{resource:r,context:n}=t;const i=new s.default(r,a);i.paths=s.default._nodeModulePaths(n);i.filename=r;i._compile(e,r);return i.exports}async function loadConfig(e,t){const r=typeof t==="string"?n.default.resolve(t):n.default.dirname(e.resourcePath);let s;try{s=await l(e.fs,r)}catch(e){throw new Error(`No PostCSS config found in: ${r}`)}const a=(0,o.cosmiconfig)("postcss");let c;try{if(s.isFile()){c=await a.load(r)}else{c=await a.search(r)}}catch(e){throw e}if(!c){return{}}e.addDependency(c.filepath);if(c.isEmpty){return c}if(typeof c.config==="function"){const t={mode:e.mode,file:e.resourcePath,webpackLoaderContext:e};c.config=c.config(t)}c=(0,i.klona)(c);return c}function loadPlugin(e,t,r){try{if(!t||Object.keys(t).length===0){const t=require(e);if(t.default){return t.default}return t}const n=require(e);if(n.default){return n.default(t)}return n(t)}catch(t){throw new Error(`Loading PostCSS "${e}" plugin failed: ${t.message}\n\n(@${r})`)}}function pluginFactory(){const e=new Map;return t=>{if(typeof t==="undefined"){return e}if(Array.isArray(t)){for(const r of t){if(Array.isArray(r)){const[t,n]=r;e.set(t,n)}else if(r&&typeof r==="function"){e.set(r)}else if(r&&Object.keys(r).length===1&&(typeof r[Object.keys(r)[0]]==="object"||typeof r[Object.keys(r)[0]]==="boolean")&&r[Object.keys(r)[0]]!==null){const[t]=Object.keys(r);const n=r[t];if(n===false){e.delete(t)}else{e.set(t,n)}}else if(r){e.set(r)}}}else{const r=Object.entries(t);for(const[t,n]of r){if(n===false){e.delete(t)}else{e.set(t,n)}}}return e}}function getPostcssOptions(e,t={},r={}){const s=e.resourcePath;let o=r;if(typeof o==="function"){o=o(e)}let a=[];try{const r=pluginFactory();if(t.config&&t.config.plugins){r(t.config.plugins)}r(o.plugins);a=[...r()].map(e=>{const[t,r]=e;if(typeof t==="string"){return loadPlugin(t,r,s)}return t})}catch(t){e.emitError(t)}const l=t.config||{};if(l.from){l.from=n.default.resolve(n.default.dirname(t.filepath),l.from)}if(l.to){l.to=n.default.resolve(n.default.dirname(t.filepath),l.to)}delete l.plugins;const c=(0,i.klona)(o);if(c.from){c.from=n.default.resolve(e.rootContext,c.from)}if(c.to){c.to=n.default.resolve(e.rootContext,c.to)}delete c.config;delete c.plugins;const f={from:s,to:s,map:false,...l,...c};if(typeof f.parser==="string"){try{f.parser=require(f.parser)}catch(t){e.emitError(new Error(`Loading PostCSS "${f.parser}" parser failed: ${t.message}\n\n(@${s})`))}}if(typeof f.stringifier==="string"){try{f.stringifier=require(f.stringifier)}catch(t){e.emitError(new Error(`Loading PostCSS "${f.stringifier}" stringifier failed: ${t.message}\n\n(@${s})`))}}if(typeof f.syntax==="string"){try{f.syntax=require(f.syntax)}catch(t){e.emitError(new Error(`Loading PostCSS "${f.syntax}" syntax failed: ${t.message}\n\n(@${s})`))}}if(f.map===true){f.map={inline:true}}return{plugins:a,processOptions:f}}const c=/^[a-z]:[/\\]|^\\\\/i;const f=/^[a-z0-9+\-.]+:/i;function getURLType(e){if(e[0]==="/"){if(e[1]==="/"){return"scheme-relative"}return"path-absolute"}if(c.test(e)){return"path-absolute"}return f.test(e)?"absolute":"path-relative"}function normalizeSourceMap(e,t){let r=e;if(typeof r==="string"){r=JSON.parse(r)}delete r.file;const{sourceRoot:s}=r;delete r.sourceRoot;if(r.sources){r.sources=r.sources.map(e=>{const r=getURLType(e);if(r==="path-relative"||r==="path-absolute"){const i=r==="path-relative"&&s?n.default.resolve(s,n.default.normalize(e)):n.default.normalize(e);return n.default.relative(t,i)}return e})}return r}function normalizeSourceMapAfterPostcss(e,t){const r=e;delete r.file;r.sourceRoot="";r.sources=r.sources.map(e=>{if(e.indexOf("<")===0){return e}const r=getURLType(e);if(r==="path-relative"){return n.default.resolve(t,e)}return e});return r}},4193:(e,t,r)=>{"use strict";let n=r(6919);class AtRule extends n{constructor(e){super(e);this.type="atrule"}append(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.append(...e)}prepend(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.prepend(...e)}}e.exports=AtRule;AtRule.default=AtRule;n.registerAtRule(AtRule)},7592:(e,t,r)=>{"use strict";let n=r(8557);class Comment extends n{constructor(e){super(e);this.type="comment"}}e.exports=Comment;Comment.default=Comment},6919:(e,t,r)=>{"use strict";let n=r(3522);let{isClean:s}=r(2594);let i=r(7592);let o=r(8557);let a,l,c;function cleanSource(e){return e.map(e=>{if(e.nodes)e.nodes=cleanSource(e.nodes);delete e.source;return e})}function markDirtyUp(e){e[s]=false;if(e.proxyOf.nodes){for(let t of e.proxyOf.nodes){markDirtyUp(t)}}}function rebuild(e){if(e.type==="atrule"){Object.setPrototypeOf(e,c.prototype)}else if(e.type==="rule"){Object.setPrototypeOf(e,l.prototype)}else if(e.type==="decl"){Object.setPrototypeOf(e,n.prototype)}else if(e.type==="comment"){Object.setPrototypeOf(e,i.prototype)}if(e.nodes){e.nodes.forEach(e=>{rebuild(e)})}}class Container extends o{push(e){e.parent=this;this.proxyOf.nodes.push(e);return this}each(e){if(!this.proxyOf.nodes)return undefined;let t=this.getIterator();let r,n;while(this.indexes[t]{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}if(n!==false&&t.walk){n=t.walk(e)}return n})}walkDecls(e,t){if(!t){t=e;return this.walk((e,r)=>{if(e.type==="decl"){return t(e,r)}})}if(e instanceof RegExp){return this.walk((r,n)=>{if(r.type==="decl"&&e.test(r.prop)){return t(r,n)}})}return this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e){return t(r,n)}})}walkRules(e,t){if(!t){t=e;return this.walk((e,r)=>{if(e.type==="rule"){return t(e,r)}})}if(e instanceof RegExp){return this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector)){return t(r,n)}})}return this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e){return t(r,n)}})}walkAtRules(e,t){if(!t){t=e;return this.walk((e,r)=>{if(e.type==="atrule"){return t(e,r)}})}if(e instanceof RegExp){return this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name)){return t(r,n)}})}return this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e){return t(r,n)}})}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment"){return e(t,r)}})}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}this.markDirty();return this}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes){this.indexes[t]=this.indexes[t]+e.length}}this.markDirty();return this}cleanRaws(e){super.cleanRaws(e);if(this.nodes){for(let t of this.nodes)t.cleanRaws(e)}}insertBefore(e,t){e=this.index(e);let r=e===0?"prepend":false;let n=this.normalize(t,this.proxyOf.nodes[e],r).reverse();for(let t of n)this.proxyOf.nodes.splice(e,0,t);let s;for(let t in this.indexes){s=this.indexes[t];if(e<=s){this.indexes[t]=s+n.length}}this.markDirty();return this}insertAfter(e,t){e=this.index(e);let r=this.normalize(t,this.proxyOf.nodes[e]).reverse();for(let t of r)this.proxyOf.nodes.splice(e+1,0,t);let n;for(let t in this.indexes){n=this.indexes[t];if(e=e){this.indexes[r]=t-1}}this.markDirty();return this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=undefined;this.proxyOf.nodes=[];this.markDirty();return this}replaceValues(e,t,r){if(!r){r=t;t={}}this.walkDecls(n=>{if(t.props&&!t.props.includes(n.prop))return;if(t.fast&&!n.value.includes(t.fast))return;n.value=n.value.replace(e,r)});this.markDirty();return this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){if(typeof e==="number")return e;if(e.proxyOf)e=e.proxyOf;return this.proxyOf.nodes.indexOf(e)}get first(){if(!this.proxyOf.nodes)return undefined;return this.proxyOf.nodes[0]}get last(){if(!this.proxyOf.nodes)return undefined;return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,t){if(typeof e==="string"){e=cleanSource(a(e).nodes)}else if(Array.isArray(e)){e=e.slice(0);for(let t of e){if(t.parent)t.parent.removeChild(t,"ignore")}}else if(e.type==="root"){e=e.nodes.slice(0);for(let t of e){if(t.parent)t.parent.removeChild(t,"ignore")}}else if(e.type){e=[e]}else if(e.prop){if(typeof e.value==="undefined"){throw new Error("Value field is missed in node creation")}else if(typeof e.value!=="string"){e.value=String(e.value)}e=[new n(e)]}else if(e.selector){e=[new l(e)]}else if(e.name){e=[new c(e)]}else if(e.text){e=[new i(e)]}else{throw new Error("Unknown node type in node creation")}let r=e.map(e=>{if(typeof e.markDirty!=="function")rebuild(e);if(e.parent)e.parent.removeChild(e);if(e[s])markDirtyUp(e);if(typeof e.raws.before==="undefined"){if(t&&typeof t.raws.before!=="undefined"){e.raws.before=t.raws.before.replace(/\S/g,"")}}e.parent=this;return e});return r}getProxyProcessor(){return{set(e,t,r){if(e[t]===r)return true;e[t]=r;if(t==="name"||t==="params"||t==="selector"){e.markDirty()}return true},get(e,t){if(t==="proxyOf"){return e}else if(!e[t]){return e[t]}else if(t==="each"||typeof t==="string"&&t.startsWith("walk")){return(...r)=>{return e[t](...r.map(e=>{if(typeof e==="function"){return(t,r)=>e(t.toProxy(),r)}else{return e}}))}}else if(t==="every"||t==="some"){return r=>{return e[t]((e,...t)=>r(e.toProxy(),...t))}}else if(t==="root"){return()=>e.root().toProxy()}else if(t==="nodes"){return e.nodes.map(e=>e.toProxy())}else if(t==="first"||t==="last"){return e[t].toProxy()}else{return e[t]}}}}getIterator(){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let e=this.lastEach;this.indexes[e]=0;return e}}Container.registerParse=(e=>{a=e});Container.registerRule=(e=>{l=e});Container.registerAtRule=(e=>{c=e});e.exports=Container;Container.default=Container},3279:(e,t,r)=>{"use strict";let{red:n,bold:s,gray:i,options:o}=r(8210);let a=r(1040);class CssSyntaxError extends Error{constructor(e,t,r,n,s,i){super(e);this.name="CssSyntaxError";this.reason=e;if(s){this.file=s}if(n){this.source=n}if(i){this.plugin=i}if(typeof t!=="undefined"&&typeof r!=="undefined"){this.line=t;this.column=r}this.setMessage();if(Error.captureStackTrace){Error.captureStackTrace(this,CssSyntaxError)}}setMessage(){this.message=this.plugin?this.plugin+": ":"";this.message+=this.file?this.file:"";if(typeof this.line!=="undefined"){this.message+=":"+this.line+":"+this.column}this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;if(e==null)e=o.enabled;if(a){if(e)t=a(t)}let r=t.split(/\r?\n/);let l=Math.max(this.line-3,0);let c=Math.min(this.line+2,r.length);let f=String(c).length;let u,h;if(e){u=(e=>s(n(e)));h=(e=>i(e))}else{u=h=(e=>e)}return r.slice(l,c).map((e,t)=>{let r=l+1+t;let n=" "+(" "+r).slice(-f)+" | ";if(r===this.line){let t=h(n.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+h(n)+e+"\n "+t+u("^")}return" "+h(n)+e}).join("\n")}toString(){let e=this.showSourceCode();if(e){e="\n\n"+e+"\n"}return this.name+": "+this.message+e}}e.exports=CssSyntaxError;CssSyntaxError.default=CssSyntaxError},3522:(e,t,r)=>{"use strict";let n=r(8557);class Declaration extends n{constructor(e){if(e&&typeof e.value!=="undefined"&&typeof e.value!=="string"){e={...e,value:String(e.value)}}super(e);this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}e.exports=Declaration;Declaration.default=Declaration},2690:(e,t,r)=>{"use strict";let{fileURLToPath:n,pathToFileURL:s}=r(8835);let{resolve:i,isAbsolute:o}=r(5622);let{nanoid:a}=r(6313);let l=r(9897);let c=r(1040);let f=r(3279);let u=r(1090);class Input{constructor(e,t={}){if(e===null||typeof e==="undefined"||typeof e==="object"&&!e.toString){throw new Error(`PostCSS received ${e} instead of CSS string`)}this.css=e.toString();if(this.css[0]==="\ufeff"||this.css[0]==="￾"){this.hasBOM=true;this.css=this.css.slice(1)}else{this.hasBOM=false}if(t.from){if(/^\w+:\/\//.test(t.from)||o(t.from)){this.file=t.from}else{this.file=i(t.from)}}let r=new u(this.css,t);if(r.text){this.map=r;let e=r.consumer().file;if(!this.file&&e)this.file=this.mapResolve(e)}if(!this.file){this.id=""}if(this.map)this.map.file=this.from}fromOffset(e){let t=l(this.css);this.fromOffset=(e=>t.fromIndex(e));return this.fromOffset(e)}error(e,t,r,n={}){let i;if(!r){let e=this.fromOffset(t);t=e.line;r=e.col}let o=this.origin(t,r);if(o){i=new f(e,o.line,o.column,o.source,o.file,n.plugin)}else{i=new f(e,t,r,this.css,this.file,n.plugin)}i.input={line:t,column:r,source:this.css};if(this.file){i.input.url=s(this.file).toString();i.input.file=this.file}return i}origin(e,t){if(!this.map)return false;let r=this.map.consumer();let i=r.originalPositionFor({line:e,column:t});if(!i.source)return false;let a;if(o(i.source)){a=s(i.source)}else{a=new URL(i.source,this.map.consumer().sourceRoot||s(this.map.mapFile))}let l={url:a.toString(),line:i.line,column:i.column};if(a.protocol==="file:"){l.file=n(a)}let c=r.sourceContentFor(i.source);if(c)l.source=c;return l}mapResolve(e){if(/^\w+:\/\//.test(e)){return e}return i(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}}e.exports=Input;Input.default=Input;if(c&&c.registerInput){c.registerInput(Input)}},6310:(e,t,r)=>{"use strict";let n=r(3091);let{isClean:s}=r(2594);let i=r(4793);let o=r(1600);let a=r(6846);let l=r(2128);let c=r(2630);const f={root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"};const u=0;function isPromise(e){return typeof e==="object"&&typeof e.then==="function"}function getEvents(e){let t=false;let r=f[e.type];if(e.type==="decl"){t=e.prop.toLowerCase()}else if(e.type==="atrule"){t=e.name.toLowerCase()}if(t&&e.append){return[r,r+"-"+t,u,r+"Exit",r+"Exit-"+t]}else if(t){return[r,r+"-"+t,r+"Exit",r+"Exit-"+t]}else if(e.append){return[r,u,r+"Exit"]}else{return[r,r+"Exit"]}}function toStack(e){let t;if(e.type==="root"){t=["Root",u,"RootExit"]}else{t=getEvents(e)}return{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function cleanMarks(e){e[s]=false;if(e.nodes)e.nodes.forEach(e=>cleanMarks(e));return e}let h={};class LazyResult{constructor(e,t,r){this.stringified=false;this.processed=false;let n;if(typeof t==="object"&&t!==null&&t.type==="root"){n=cleanMarks(t)}else if(t instanceof LazyResult||t instanceof a){n=cleanMarks(t.root);if(t.map){if(typeof r.map==="undefined")r.map={};if(!r.map.inline)r.map.inline=false;r.map.prev=t.map}}else{let e=l;if(r.syntax)e=r.syntax.parse;if(r.parser)e=r.parser;if(e.parse)e=e.parse;try{n=e(t,r)}catch(e){this.processed=true;this.error=e}}this.result=new a(e,n,r);this.helpers={...h,result:this.result,postcss:h};this.plugins=this.processor.plugins.map(e=>{if(typeof e==="object"&&e.prepare){return{...e,...e.prepare(this.result)}}else{return e}})}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){if(process.env.NODE_ENV!=="production"){if(!("from"in this.opts)){o("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(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}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}sync(){if(this.error)throw this.error;if(this.processed)return this.result;this.processed=true;if(this.processing){throw this.getAsyncError()}for(let e of this.plugins){let t=this.runOnRoot(e);if(isPromise(t)){throw this.getAsyncError()}}this.prepareVisitors();if(this.hasListener){let e=this.result.root;while(!e[s]){e[s]=true;this.walkSync(e)}if(this.listeners.OnceExit){this.visitSync(this.listeners.OnceExit,e)}}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true;this.sync();let e=this.result.opts;let t=i;if(e.syntax)t=e.syntax.stringify;if(e.stringifier)t=e.stringifier;if(t.stringify)t=t.stringify;let r=new n(t,this.result.root,this.result.opts);let s=r.generate();this.result.css=s[0];this.result.map=s[1];return this.result}walkSync(e){e[s]=true;let t=getEvents(e);for(let r of t){if(r===u){if(e.nodes){e.each(e=>{if(!e[s])this.walkSync(e)})}}else{let t=this.listeners[r];if(t){if(this.visitSync(t,e.toProxy()))return}}}}visitSync(e,t){for(let[r,n]of e){this.result.lastPlugin=r;let e;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!=="root"&&!t.parent)return true;if(isPromise(e)){throw this.getAsyncError()}}}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==="object"&&e.Once){return e.Once(this.result.root,this.helpers)}else if(typeof e==="function"){return e(this.result.root,this.result)}}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t)t.addToError(e);this.error=e;if(e.name==="CssSyntaxError"&&!e.plugin){e.plugin=r.postcssPlugin;e.setMessage()}else if(r.postcssVersion){if(process.env.NODE_ENV!=="production"){let e=r.postcssPlugin;let t=r.postcssVersion;let n=this.result.processor.version;let s=t.split(".");let i=n.split(".");if(s[0]!==i[0]||parseInt(s[1])>parseInt(i[1])){console.error("Unknown error from PostCSS plugin. Your current PostCSS "+"version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}}}catch(e){if(console&&console.error)console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e0){let e=this.visitTick(t);if(isPromise(e)){try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}}if(this.listeners.OnceExit){for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}}this.processed=true;return this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{if(!this.listeners[t])this.listeners[t]=[];this.listeners[t].push([e,r])};for(let t of this.plugins){if(typeof t==="object"){for(let r of["Root","Declaration","Rule","AtRule","Comment","DeclarationExit","RuleExit","AtRuleExit","CommentExit","RootExit","OnceExit"]){if(typeof t[r]==="object"){for(let n in t[r]){if(n==="*"){e(t,r,t[r][n])}else{e(t,r+"-"+n.toLowerCase(),t[r][n])}}}else if(typeof t[r]==="function"){e(t,r,t[r])}}}}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1];let{node:r,visitors:n}=t;if(r.type!=="root"&&!r.parent){e.pop();return}if(n.length>0&&t.visitorIndex{h=e});e.exports=LazyResult;LazyResult.default=LazyResult;c.registerLazyResult(LazyResult)},1608:e=>{"use strict";let t={split(e,t,r){let n=[];let s="";let i=false;let o=0;let a=false;let l=false;for(let r of e){if(a){if(l){l=false}else if(r==="\\"){l=true}else if(r===a){a=false}}else if(r==='"'||r==="'"){a=r}else if(r==="("){o+=1}else if(r===")"){if(o>0)o-=1}else if(o===0){if(t.includes(r))i=true}if(i){if(s!=="")n.push(s.trim());s="";i=false}else{s+=r}}if(r||s!=="")n.push(s.trim());return n},space(e){let r=[" ","\n","\t"];return t.split(e,r)},comma(e){return t.split(e,[","],true)}};e.exports=t;t.default=t},3091:(e,t,r)=>{"use strict";let{dirname:n,resolve:s,relative:i,sep:o}=r(5622);let{pathToFileURL:a}=r(8835);let l=r(6241);class MapGenerator{constructor(e,t,r){this.stringify=e;this.mapOpts=r.map||{};this.root=t;this.opts=r}isMap(){if(typeof this.opts.map!=="undefined"){return!!this.opts.map}return this.previous().length>0}previous(){if(!this.previousMaps){this.previousMaps=[];this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;if(!this.previousMaps.includes(t)){this.previousMaps.push(t)}}})}return this.previousMaps}isInline(){if(typeof this.mapOpts.inline!=="undefined"){return this.mapOpts.inline}let e=this.mapOpts.annotation;if(typeof e!=="undefined"&&e!==true){return false}if(this.previous().length){return this.previous().some(e=>e.inline)}return true}isSourcesContent(){if(typeof this.mapOpts.sourcesContent!=="undefined"){return this.mapOpts.sourcesContent}if(this.previous().length){return this.previous().some(e=>e.withContent())}return true}clearAnnotation(){if(this.mapOpts.annotation===false)return;let e;for(let t=this.root.nodes.length-1;t>=0;t--){e=this.root.nodes[t];if(e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0){this.root.removeChild(t)}}}setSourcesContent(){let e={};this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=true;this.map.setSourceContent(this.toUrl(this.path(r)),t.source.input.css)}}})}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file));let r=e.root||n(e.file);let s;if(this.mapOpts.sourcesContent===false){s=new l.SourceMapConsumer(e.text);if(s.sourcesContent){s.sourcesContent=s.sourcesContent.map(()=>null)}}else{s=e.consumer()}this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}isAnnotation(){if(this.isInline()){return true}if(typeof this.mapOpts.annotation!=="undefined"){return this.mapOpts.annotation}if(this.previous().length){return this.previous().some(e=>e.annotation)}return true}toBase64(e){if(Buffer){return Buffer.from(e).toString("base64")}else{return window.btoa(unescape(encodeURIComponent(e)))}}addAnnotation(){let e;if(this.isInline()){e="data:application/json;base64,"+this.toBase64(this.map.toString())}else if(typeof this.mapOpts.annotation==="string"){e=this.mapOpts.annotation}else if(typeof this.mapOpts.annotation==="function"){e=this.mapOpts.annotation(this.opts.to,this.root)}else{e=this.outputFile()+".map"}let t="\n";if(this.css.includes("\r\n"))t="\r\n";this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){if(this.opts.to){return this.path(this.opts.to)}if(this.opts.from){return this.path(this.opts.from)}return"to.css"}generateMap(){this.generateString();if(this.isSourcesContent())this.setSourcesContent();if(this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline()){return[this.css]}return[this.css,this.map]}path(e){if(e.indexOf("<")===0)return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?n(this.opts.to):".";if(typeof this.mapOpts.annotation==="string"){t=n(s(t,this.mapOpts.annotation))}e=i(t,e);return e}toUrl(e){if(o==="\\"){e=e.replace(/\\/g,"/")}return encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from){return this.toUrl(this.mapOpts.from)}else if(this.mapOpts.absolute){return a(e.source.input.from).toString()}else{return this.toUrl(this.path(e.source.input.from))}}generateString(){this.css="";this.map=new l.SourceMapGenerator({file:this.outputFile()});let e=1;let t=1;let r,n;this.stringify(this.root,(s,i,o)=>{this.css+=s;if(i&&o!=="end"){if(i.source&&i.source.start){this.map.addMapping({source:this.sourcePath(i),generated:{line:e,column:t-1},original:{line:i.source.start.line,column:i.source.start.column-1}})}else{this.map.addMapping({source:"",original:{line:1,column:0},generated:{line:e,column:t-1}})}}r=s.match(/\n/g);if(r){e+=r.length;n=s.lastIndexOf("\n");t=s.length-n}else{t+=s.length}if(i&&o!=="start"){let r=i.parent||{raws:{}};if(i.type!=="decl"||i!==r.last||r.raws.semicolon){if(i.source&&i.source.end){this.map.addMapping({source:this.sourcePath(i),generated:{line:e,column:t-2},original:{line:i.source.end.line,column:i.source.end.column-1}})}else{this.map.addMapping({source:"",original:{line:1,column:0},generated:{line:e,column:t-1}})}}}})}generate(){this.clearAnnotation();if(this.isMap()){return this.generateMap()}let e="";this.stringify(this.root,t=>{e+=t});return[e]}}e.exports=MapGenerator},8557:(e,t,r)=>{"use strict";let n=r(3279);let s=r(9414);let{isClean:i}=r(2594);let o=r(4793);function cloneNode(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)){continue}if(n==="proxyCache")continue;let s=e[n];let i=typeof s;if(n==="parent"&&i==="object"){if(t)r[n]=t}else if(n==="source"){r[n]=s}else if(Array.isArray(s)){r[n]=s.map(e=>cloneNode(e,r))}else{if(i==="object"&&s!==null)s=cloneNode(s);r[n]=s}}return r}class Node{constructor(e={}){this.raws={};this[i]=false;for(let t in e){if(t==="nodes"){this.nodes=[];for(let r of e[t]){if(typeof r.clone==="function"){this.append(r.clone())}else{this.append(r)}}}else{this[t]=e[t]}}}error(e,t={}){if(this.source){let r=this.positionBy(t);return this.source.input.error(e,r.line,r.column,t)}return new n(e)}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this}toString(e=o){if(e.stringify)e=e.stringify;let t="";e(this,e=>{t+=e});return t}clone(e={}){let t=cloneNode(this);for(let r in e){t[r]=e[r]}return t}cloneBefore(e={}){let t=this.clone(e);this.parent.insertBefore(this,t);return t}cloneAfter(e={}){let t=this.clone(e);this.parent.insertAfter(this,t);return t}replaceWith(...e){if(this.parent){let t=this;let r=false;for(let n of e){if(n===this){r=true}else if(r){this.parent.insertAfter(t,n);t=n}else{this.parent.insertBefore(t,n)}}if(!r){this.remove()}}return this}next(){if(!this.parent)return undefined;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return undefined;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){this.parent.insertBefore(this,e);return this}after(e){this.parent.insertAfter(this,e);return this}root(){let e=this;while(e.parent)e=e.parent;return e}raw(e,t){let r=new s;return r.raw(this,e,t)}cleanRaws(e){delete this.raws.before;delete this.raws.after;if(!e)delete this.raws.between}toJSON(){let e={};for(let t in this){if(!Object.prototype.hasOwnProperty.call(this,t)){continue}if(t==="parent")continue;let r=this[t];if(Array.isArray(r)){e[t]=r.map(e=>{if(typeof e==="object"&&e.toJSON){return e.toJSON()}else{return e}})}else if(typeof r==="object"&&r.toJSON){e[t]=r.toJSON()}else{e[t]=r}}return e}positionInside(e){let t=this.toString();let r=this.source.start.column;let n=this.source.start.line;for(let s=0;se.root().toProxy()}else{return e[t]}}}}toProxy(){if(!this.proxyCache){this.proxyCache=new Proxy(this,this.getProxyProcessor())}return this.proxyCache}addToError(e){e.postcssNode=this;if(e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}markDirty(){if(this[i]){this[i]=false;let e=this;while(e=e.parent){e[i]=false}}}get proxyOf(){return this}}e.exports=Node;Node.default=Node},2128:(e,t,r)=>{"use strict";let n=r(6919);let s=r(5613);let i=r(2690);function parse(e,t){let r=new i(e,t);let n=new s(r);try{n.parse()}catch(e){if(process.env.NODE_ENV!=="production"){if(e.name==="CssSyntaxError"&&t&&t.from){if(/\.scss$/i.test(t.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(t.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(t.from)){e.message+="\nYou tried to parse Less with "+"the standard CSS parser; "+"try again with the postcss-less parser"}}}throw e}return n.root}e.exports=parse;parse.default=parse;n.registerParse(parse)},5613:(e,t,r)=>{"use strict";let n=r(3522);let s=r(5790);let i=r(7592);let o=r(4193);let a=r(2630);let l=r(2234);class Parser{constructor(e){this.input=e;this.root=new a;this.current=this.root;this.spaces="";this.semicolon=false;this.customProperty=false;this.createTokenizer();this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=s(this.input)}parse(){let e;while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();switch(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()}comment(e){let t=new i;this.init(t,e[2]);t.source.end=this.getPosition(e[3]||e[2]);let r=e[1].slice(2,-2);if(/^\s*$/.test(r)){t.text="";t.raws.left=r;t.raws.right=""}else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2];t.raws.left=e[1];t.raws.right=e[3]}}emptyRule(e){let t=new l;this.init(t,e[2]);t.selector="";t.raws.between="";this.current=t}other(e){let t=false;let r=null;let n=false;let s=null;let i=[];let o=e[1].startsWith("--");let a=[];let l=e;while(l){r=l[0];a.push(l);if(r==="("||r==="["){if(!s)s=l;i.push(r==="("?")":"]")}else if(o&&n&&r==="{"){if(!s)s=l;i.push("}")}else if(i.length===0){if(r===";"){if(n){this.decl(a,o);return}else{break}}else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop());t=true;break}else if(r===":"){n=true}}else if(r===i[i.length-1]){i.pop();if(i.length===0)s=null}l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())t=true;if(i.length>0)this.unclosedBracket(s);if(t&&n){while(a.length){l=a[a.length-1][0];if(l!=="space"&&l!=="comment")break;this.tokenizer.back(a.pop())}this.decl(a,o)}else{this.unknownWord(a)}}rule(e){e.pop();let t=new l;this.init(t,e[0][2]);t.raws.between=this.spacesAndCommentsFromEnd(e);this.raw(t,"selector",e);this.current=t}decl(e,t){let r=new n;this.init(r,e[0][2]);let s=e[e.length-1];if(s[0]===";"){this.semicolon=true;e.pop()}r.source.end=this.getPosition(s[3]||s[2]);while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);r.raws.before+=e.shift()[1]}r.source.start=this.getPosition(e[0][2]);r.prop="";while(e.length){let t=e[0][0];if(t===":"||t==="space"||t==="comment"){break}r.prop+=e.shift()[1]}r.raws.between="";let i;while(e.length){i=e.shift();if(i[0]===":"){r.raws.between+=i[1];break}else{if(i[0]==="word"&&/\w/.test(i[1])){this.unknownWord([i])}r.raws.between+=i[1]}}if(r.prop[0]==="_"||r.prop[0]==="*"){r.raws.before+=r.prop[0];r.prop=r.prop.slice(1)}let o=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){i=e[t];if(i[1].toLowerCase()==="!important"){r.important=true;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n;if(n!==" !important")r.raws.important=n;break}else if(i[1].toLowerCase()==="important"){let n=e.slice(0);let s="";for(let e=t;e>0;e--){let t=n[e][0];if(s.trim().indexOf("!")===0&&t!=="space"){break}s=n.pop()[1]+s}if(s.trim().indexOf("!")===0){r.important=true;r.raws.important=s;e=n}}if(i[0]!=="space"&&i[0]!=="comment"){break}}let a=e.some(e=>e[0]!=="space"&&e[0]!=="comment");this.raw(r,"value",e);if(a){r.raws.between+=o}else{r.value=o+r.value}if(r.value.includes(":")&&!t){this.checkMissedSemicolon(e)}}atrule(e){let t=new o;t.name=e[1].slice(1);if(t.name===""){this.unnamedAtrule(t,e)}this.init(t,e[2]);let r;let n;let s;let i=false;let a=false;let l=[];let c=[];while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();r=e[0];if(r==="("||r==="["){c.push(r==="("?")":"]")}else if(r==="{"&&c.length>0){c.push("}")}else if(r===c[c.length-1]){c.pop()}if(c.length===0){if(r===";"){t.source.end=this.getPosition(e[2]);this.semicolon=true;break}else if(r==="{"){a=true;break}else if(r==="}"){if(l.length>0){s=l.length-1;n=l[s];while(n&&n[0]==="space"){n=l[--s]}if(n){t.source.end=this.getPosition(n[3]||n[2])}}this.end(e);break}else{l.push(e)}}else{l.push(e)}if(this.tokenizer.endOfFile()){i=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(l);if(l.length){t.raws.afterName=this.spacesAndCommentsFromStart(l);this.raw(t,"params",l);if(i){e=l[l.length-1];t.source.end=this.getPosition(e[3]||e[2]);this.spaces=t.raws.between;t.raws.between=""}}else{t.raws.afterName="";t.params=""}if(a){t.nodes=[];this.current=t}}end(e){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(e[2]);this.current=this.current.parent}else{this.unexpectedClose(e)}}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}freeSemicolon(e){this.spaces+=e[1];if(this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];if(e&&e.type==="rule"&&!e.raws.ownSemicolon){e.raws.ownSemicolon=this.spaces;this.spaces=""}}}getPosition(e){let t=this.input.fromOffset(e);return{offset:e,line:t.line,column:t.col}}init(e,t){this.current.push(e);e.source={start:this.getPosition(t),input:this.input};e.raws.before=this.spaces;this.spaces="";if(e.type!=="comment")this.semicolon=false}raw(e,t,r){let n,s;let i=r.length;let o="";let a=true;let l,c;let f=/^([#.|])?(\w)+/i;for(let t=0;te+t[1],"");e.raws[t]={value:o,raw:n}}e[t]=o}spacesAndCommentsFromEnd(e){let t;let r="";while(e.length){t=e[e.length-1][0];if(t!=="space"&&t!=="comment")break;r=e.pop()[1]+r}return r}spacesAndCommentsFromStart(e){let t;let r="";while(e.length){t=e[0][0];if(t!=="space"&&t!=="comment")break;r+=e.shift()[1]}return r}spacesFromEnd(e){let t;let r="";while(e.length){t=e[e.length-1][0];if(t!=="space")break;r=e.pop()[1]+r}return r}stringFrom(e,t){let r="";for(let n=t;n=0;s--){n=e[s];if(n[0]!=="space"){r+=1;if(r===2)break}}throw this.input.error("Missed semicolon",n[2])}}e.exports=Parser},7001:(e,t,r)=>{"use strict";let n=r(3279);let s=r(3522);let i=r(6310);let o=r(6919);let a=r(9189);let l=r(4793);let c=r(7143);let f=r(7592);let u=r(4193);let h=r(6846);let p=r(2690);let d=r(2128);let g=r(1608);let w=r(2234);let y=r(2630);let m=r(8557);function postcss(...e){if(e.length===1&&Array.isArray(e[0])){e=e[0]}return new a(e,postcss)}postcss.plugin=function plugin(e,t){if(console&&console.warn){console.warn("postcss.plugin was deprecated. Migration guide:\n"+"https://evilmartians.com/chronicles/postcss-8-plugin-migration");if(process.env.LANG&&process.env.LANG.startsWith("cn")){console.warn("postcss.plugin 被弃用. 迁移指南:\n"+"https://www.w3ctech.com/topic/2226")}}function creator(...r){let n=t(...r);n.postcssPlugin=e;n.postcssVersion=(new a).version;return n}let r;Object.defineProperty(creator,"postcss",{get(){if(!r)r=creator();return r}});creator.process=function(e,t,r){return postcss([creator(r)]).process(e,t)};return creator};postcss.stringify=l;postcss.parse=d;postcss.list=g;postcss.comment=(e=>new f(e));postcss.atRule=(e=>new u(e));postcss.decl=(e=>new s(e));postcss.rule=(e=>new w(e));postcss.root=(e=>new y(e));postcss.CssSyntaxError=n;postcss.Declaration=s;postcss.Container=o;postcss.Comment=f;postcss.Warning=c;postcss.AtRule=u;postcss.Result=h;postcss.Input=p;postcss.Rule=w;postcss.Root=y;postcss.Node=m;i.registerPostcss(postcss);e.exports=postcss;postcss.default=postcss},1090:(e,t,r)=>{"use strict";let{existsSync:n,readFileSync:s}=r(5747);let{dirname:i,join:o}=r(5622);let a=r(6241);function fromBase64(e){if(Buffer){return Buffer.from(e,"base64").toString()}else{return window.atob(e)}}class PreviousMap{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e);this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:undefined;let n=this.loadMap(t.from,r);if(!this.mapFile&&t.from){this.mapFile=t.from}if(this.mapFile)this.root=i(this.mapFile);if(n)this.text=n}consumer(){if(!this.consumerCache){this.consumerCache=new a.SourceMapConsumer(this.text)}return this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){if(!e)return false;return e.substr(0,t.length)===t}getAnnotationURL(e){return e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//)[1].trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=.*\s*\*\//gm);if(t&&t.length>0){let e=t[t.length-1];if(e){this.annotation=this.getAnnotationURL(e)}}}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/;let r=/^data:application\/json;base64,/;let n=/^data:application\/json;charset=utf-?8,/;let s=/^data:application\/json,/;if(n.test(e)||s.test(e)){return decodeURIComponent(e.substr(RegExp.lastMatch.length))}if(t.test(e)||r.test(e)){return fromBase64(e.substr(RegExp.lastMatch.length))}let i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}loadFile(e){this.root=i(e);if(n(e)){this.mapFile=e;return s(e,"utf-8").toString().trim()}}loadMap(e,t){if(t===false)return false;if(t){if(typeof t==="string"){return t}else if(typeof t==="function"){let r=t(e);if(r){let e=this.loadFile(r);if(!e){throw new Error("Unable to load previous source map: "+r.toString())}return e}}else if(t instanceof a.SourceMapConsumer){return a.SourceMapGenerator.fromSourceMap(t).toString()}else if(t instanceof a.SourceMapGenerator){return t.toString()}else if(this.isMap(t)){return JSON.stringify(t)}else{throw new Error("Unsupported previous source map format: "+t.toString())}}else if(this.inline){return this.decodeInline(this.annotation)}else if(this.annotation){let t=this.annotation;if(e)t=o(i(e),t);return this.loadFile(t)}}isMap(e){if(typeof e!=="object")return false;return typeof e.mappings==="string"||typeof e._mappings==="string"||Array.isArray(e.sections)}}e.exports=PreviousMap;PreviousMap.default=PreviousMap},9189:(e,t,r)=>{"use strict";let n=r(6310);let s=r(2630);class Processor{constructor(e=[]){this.version="8.1.7";this.plugins=this.normalize(e)}use(e){this.plugins=this.plugins.concat(this.normalize([e]));return this}process(e,t={}){if(this.plugins.length===0&&t.parser===t.stringifier&&!t.hideNothingWarning){if(process.env.NODE_ENV!=="production"){if(typeof console!=="undefined"&&console.warn){console.warn("You did not set any plugins, parser, or stringifier. "+"Right now, PostCSS does nothing. Pick plugins for your case "+"on https://www.postcss.parts/ and use them in postcss.config.js.")}}}return new n(this,e,t)}normalize(e){let t=[];for(let r of e){if(r.postcss===true){r=r()}else if(r.postcss){r=r.postcss}if(typeof r==="object"&&Array.isArray(r.plugins)){t=t.concat(r.plugins)}else if(typeof r==="object"&&r.postcssPlugin){t.push(r)}else if(typeof r==="function"){t.push(r)}else if(typeof r==="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production"){throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use "+"one of the syntax/parser/stringifier options as outlined "+"in your PostCSS runner documentation.")}}else{throw new Error(r+" is not a PostCSS plugin")}}return t}}e.exports=Processor;Processor.default=Processor;s.registerProcessor(Processor)},6846:(e,t,r)=>{"use strict";let n=r(7143);class Result{constructor(e,t,r){this.processor=e;this.messages=[];this.root=t;this.opts=r;this.css=undefined;this.map=undefined}toString(){return this.css}warn(e,t={}){if(!t.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin){t.plugin=this.lastPlugin.postcssPlugin}}let r=new n(e,t);this.messages.push(r);return r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}}e.exports=Result;Result.default=Result},2630:(e,t,r)=>{"use strict";let n=r(6919);let s,i;class Root extends n{constructor(e){super(e);this.type="root";if(!this.nodes)this.nodes=[]}removeChild(e,t){let r=this.index(e);if(!t&&r===0&&this.nodes.length>1){this.nodes[1].raws.before=this.nodes[r].raws.before}return super.removeChild(e)}normalize(e,t,r){let n=super.normalize(e);if(t){if(r==="prepend"){if(this.nodes.length>1){t.raws.before=this.nodes[1].raws.before}else{delete t.raws.before}}else if(this.first!==t){for(let e of n){e.raws.before=t.raws.before}}}return n}toResult(e={}){let t=new s(new i,this,e);return t.stringify()}}Root.registerLazyResult=(e=>{s=e});Root.registerProcessor=(e=>{i=e});e.exports=Root;Root.default=Root},2234:(e,t,r)=>{"use strict";let n=r(6919);let s=r(1608);class Rule extends n{constructor(e){super(e);this.type="rule";if(!this.nodes)this.nodes=[]}get selectors(){return s.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null;let r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}e.exports=Rule;Rule.default=Rule;n.registerRule(Rule)},9414:e=>{"use strict";const t={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:false};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}class Stringifier{constructor(e){this.builder=e}stringify(e,t){this[e.type](e,t)}root(e){this.root=e;this.body(e);if(e.raws.after)this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft");let r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon");let n=e.prop+r+this.rawValue(e,"value");if(e.important){n+=e.raws.important||" !important"}if(t)n+=";";this.builder(n,e)}rule(e){this.block(e,this.rawValue(e,"selector"));if(e.raws.ownSemicolon){this.builder(e.raws.ownSemicolon,e,"end")}}atrule(e,t){let r="@"+e.name;let n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!=="undefined"){r+=e.raws.afterName}else if(n){r+=" "}if(e.nodes){this.block(e,r+n)}else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}body(e){let t=e.nodes.length-1;while(t>0){if(e.nodes[t].type!=="comment")break;t-=1}let r=this.raw(e,"semicolon");for(let n=0;n{s=e.raws[r];if(typeof s!=="undefined")return false})}}if(typeof s==="undefined")s=t[n];o.rawCache[n]=s;return s}rawSemicolon(e){let t;e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type==="decl"){t=e.raws.semicolon;if(typeof t!=="undefined")return false}});return t}rawEmptyBody(e){let t;e.walk(e=>{if(e.nodes&&e.nodes.length===0){t=e.raws.after;if(typeof t!=="undefined")return false}});return t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e){if(typeof r.raws.before!=="undefined"){let e=r.raws.before.split("\n");t=e[e.length-1];t=t.replace(/\S/g,"");return false}}});return t}rawBeforeComment(e,t){let r;e.walkComments(e=>{if(typeof e.raws.before!=="undefined"){r=e.raws.before;if(r.includes("\n")){r=r.replace(/[^\n]+$/,"")}return false}});if(typeof r==="undefined"){r=this.raw(t,null,"beforeDecl")}else if(r){r=r.replace(/\S/g,"")}return r}rawBeforeDecl(e,t){let r;e.walkDecls(e=>{if(typeof e.raws.before!=="undefined"){r=e.raws.before;if(r.includes("\n")){r=r.replace(/[^\n]+$/,"")}return false}});if(typeof r==="undefined"){r=this.raw(t,null,"beforeRule")}else if(r){r=r.replace(/\S/g,"")}return r}rawBeforeRule(e){let t;e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)){if(typeof r.raws.before!=="undefined"){t=r.raws.before;if(t.includes("\n")){t=t.replace(/[^\n]+$/,"")}return false}}});if(t)t=t.replace(/\S/g,"");return t}rawBeforeClose(e){let t;e.walk(e=>{if(e.nodes&&e.nodes.length>0){if(typeof e.raws.after!=="undefined"){t=e.raws.after;if(t.includes("\n")){t=t.replace(/[^\n]+$/,"")}return false}}});if(t)t=t.replace(/\S/g,"");return t}rawBeforeOpen(e){let t;e.walk(e=>{if(e.type!=="decl"){t=e.raws.between;if(typeof t!=="undefined")return false}});return t}rawColon(e){let t;e.walkDecls(e=>{if(typeof e.raws.between!=="undefined"){t=e.raws.between.replace(/[^\s:]/g,"");return false}});return t}beforeAfter(e,t){let r;if(e.type==="decl"){r=this.raw(e,null,"beforeDecl")}else if(e.type==="comment"){r=this.raw(e,null,"beforeComment")}else if(t==="before"){r=this.raw(e,null,"beforeRule")}else{r=this.raw(e,null,"beforeClose")}let n=e.parent;let s=0;while(n&&n.type!=="root"){s+=1;n=n.parent}if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length){for(let e=0;e{"use strict";let n=r(9414);function stringify(e,t){let r=new n(t);r.stringify(e)}e.exports=stringify;stringify.default=stringify},2594:e=>{"use strict";e.exports.isClean=Symbol("isClean")},1040:(e,t,r)=>{"use strict";let{cyan:n,gray:s,green:i,yellow:o,magenta:a}=r(8210);let l=r(5790);let c;function registerInput(e){c=e}const f={brackets:n,"at-word":n,comment:s,string:i,class:o,hash:a,call:n,"(":n,")":n,"{":o,"}":o,"[":o,"]":o,":":o,";":o};function getTokenType([e,t],r){if(e==="word"){if(t[0]==="."){return"class"}if(t[0]==="#"){return"hash"}}if(!r.endOfFile()){let e=r.nextToken();r.back(e);if(e[0]==="brackets"||e[0]==="(")return"call"}return e}function terminalHighlight(e){let t=l(new c(e),{ignoreErrors:true});let r="";while(!t.endOfFile()){let e=t.nextToken();let n=f[getTokenType(e,t)];if(n){r+=e[1].split(/\r?\n/).map(e=>n(e)).join("\n")}else{r+=e[1]}}return r}terminalHighlight.registerInput=registerInput;e.exports=terminalHighlight},5790:e=>{"use strict";const t="'".charCodeAt(0);const r='"'.charCodeAt(0);const n="\\".charCodeAt(0);const s="/".charCodeAt(0);const i="\n".charCodeAt(0);const o=" ".charCodeAt(0);const a="\f".charCodeAt(0);const l="\t".charCodeAt(0);const c="\r".charCodeAt(0);const f="[".charCodeAt(0);const u="]".charCodeAt(0);const h="(".charCodeAt(0);const p=")".charCodeAt(0);const d="{".charCodeAt(0);const g="}".charCodeAt(0);const w=";".charCodeAt(0);const y="*".charCodeAt(0);const m=":".charCodeAt(0);const S="@".charCodeAt(0);const b=/[\t\n\f\r "#'()/;[\\\]{}]/g;const O=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g;const A=/.[\n"'(/\\]/;const E=/[\da-f]/i;e.exports=function tokenizer(e,M={}){let N=e.css.valueOf();let C=M.ignoreErrors;let T,L,R,v,_;let x,$,D,F,B;let I=N.length;let P=0;let Y=[];let j=[];function position(){return P}function unclosed(t){throw e.error("Unclosed "+t,P)}function endOfFile(){return j.length===0&&P>=I}function nextToken(e){if(j.length)return j.pop();if(P>=I)return;let M=e?e.ignoreUnclosed:false;T=N.charCodeAt(P);switch(T){case i:case o:case l:case c:case a:{L=P;do{L+=1;T=N.charCodeAt(L)}while(T===o||T===i||T===l||T===c||T===a);B=["space",N.slice(P,L)];P=L-1;break}case f:case u:case d:case g:case m:case w:case p:{let e=String.fromCharCode(T);B=[e,e,P];break}case h:{D=Y.length?Y.pop()[1]:"";F=N.charCodeAt(P+1);if(D==="url"&&F!==t&&F!==r&&F!==o&&F!==i&&F!==l&&F!==a&&F!==c){L=P;do{x=false;L=N.indexOf(")",L+1);if(L===-1){if(C||M){L=P;break}else{unclosed("bracket")}}$=L;while(N.charCodeAt($-1)===n){$-=1;x=!x}}while(x);B=["brackets",N.slice(P,L+1),P,L];P=L}else{L=N.indexOf(")",P+1);v=N.slice(P,L+1);if(L===-1||A.test(v)){B=["(","(",P]}else{B=["brackets",v,P,L];P=L}}break}case t:case r:{R=T===t?"'":'"';L=P;do{x=false;L=N.indexOf(R,L+1);if(L===-1){if(C||M){L=P+1;break}else{unclosed("string")}}$=L;while(N.charCodeAt($-1)===n){$-=1;x=!x}}while(x);B=["string",N.slice(P,L+1),P,L];P=L;break}case S:{b.lastIndex=P+1;b.test(N);if(b.lastIndex===0){L=N.length-1}else{L=b.lastIndex-2}B=["at-word",N.slice(P,L+1),P,L];P=L;break}case n:{L=P;_=true;while(N.charCodeAt(L+1)===n){L+=1;_=!_}T=N.charCodeAt(L+1);if(_&&T!==s&&T!==o&&T!==i&&T!==l&&T!==c&&T!==a){L+=1;if(E.test(N.charAt(L))){while(E.test(N.charAt(L+1))){L+=1}if(N.charCodeAt(L+1)===o){L+=1}}}B=["word",N.slice(P,L+1),P,L];P=L;break}default:{if(T===s&&N.charCodeAt(P+1)===y){L=N.indexOf("*/",P+2)+1;if(L===0){if(C||M){L=N.length}else{unclosed("comment")}}B=["comment",N.slice(P,L+1),P,L];P=L}else{O.lastIndex=P+1;O.test(N);if(O.lastIndex===0){L=N.length-1}else{L=O.lastIndex-2}B=["word",N.slice(P,L+1),P,L];Y.push(B);P=L}break}}P++;return B}function back(e){j.push(e)}return{back:back,nextToken:nextToken,endOfFile:endOfFile,position:position}}},1600:e=>{"use strict";let t={};e.exports=function warnOnce(e){if(t[e])return;t[e]=true;if(typeof console!=="undefined"&&console.warn){console.warn(e)}}},7143:e=>{"use strict";class Warning{constructor(e,t={}){this.type="warning";this.text=e;if(t.node&&t.node.source){let e=t.node.positionBy(t);this.line=e.line;this.column=e.column}for(let e in t)this[e]=t[e]}toString(){if(this.node){return this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message}if(this.plugin){return this.plugin+": "+this.text}return this.text}}e.exports=Warning;Warning.default=Warning},8210:(e,t)=>{let r=!("NO_COLOR"in process.env)&&("FORCE_COLOR"in process.env||process.platform==="win32"||process.stdout!=null&&process.stdout.isTTY&&process.env.TERM&&process.env.TERM!=="dumb");const n=(e,t,n,s)=>i=>r?e+(~(i+="").indexOf(t,4)?i.replace(n,s):i)+t:i;const s=(e,t)=>{return n(`[${e}m`,`[${t}m`,new RegExp(`\\x1b\\[${t}m`,"g"),`[${e}m`)};t.options=Object.defineProperty({},"enabled",{get:()=>r,set:e=>r=e});t.reset=s(0,0);t.bold=n("","",/\x1b\[22m/g,"");t.dim=n("","",/\x1b\[22m/g,"");t.italic=s(3,23);t.underline=s(4,24);t.inverse=s(7,27);t.hidden=s(8,28);t.strikethrough=s(9,29);t.black=s(30,39);t.red=s(31,39);t.green=s(32,39);t.yellow=s(33,39);t.blue=s(34,39);t.magenta=s(35,39);t.cyan=s(36,39);t.white=s(37,39);t.gray=s(90,39);t.bgBlack=s(40,49);t.bgRed=s(41,49);t.bgGreen=s(42,49);t.bgYellow=s(43,49);t.bgBlue=s(44,49);t.bgMagenta=s(45,49);t.bgCyan=s(46,49);t.bgWhite=s(47,49);t.blackBright=s(90,39);t.redBright=s(91,39);t.greenBright=s(92,39);t.yellowBright=s(93,39);t.blueBright=s(94,39);t.magentaBright=s(95,39);t.cyanBright=s(96,39);t.whiteBright=s(97,39);t.bgBlackBright=s(100,49);t.bgRedBright=s(101,49);t.bgGreenBright=s(102,49);t.bgYellowBright=s(103,49);t.bgBlueBright=s(104,49);t.bgMagentaBright=s(105,49);t.bgCyanBright=s(106,49);t.bgWhiteBright=s(107,49)},6313:e=>{let t="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";let r=(e,t)=>{return()=>{let r="";let n=t;while(n--){r+=e[Math.random()*e.length|0]}return r}};let n=(e=21)=>{let r="";let n=e;while(n--){r+=t[Math.random()*64|0]}return r};e.exports={nanoid:n,customAlphabet:r}},7988:e=>{"use strict";e.exports=JSON.parse('{"type":"object","properties":{"postcssOptions":{"description":"Options to pass through to `Postcss`.","anyOf":[{"type":"object","additionalProperties":true,"properties":{"config":{"description":"Allows to specify PostCSS Config Path (https://github.com/postcss/postcss-loader#config)","anyOf":[{"description":"Allows to specify the path to the configuration file","type":"string"},{"description":"Enables/Disables autoloading config","type":"boolean"}]}}},{"instanceof":"Function"}]},"execute":{"description":"Enables/Disables PostCSS parser support in \'CSS-in-JS\' (https://github.com/postcss/postcss-loader#execute)","type":"boolean"},"sourceMap":{"description":"Enables/Disables generation of source maps (https://github.com/postcss/postcss-loader#sourcemap)","type":"boolean"}},"additionalProperties":false}')},4698:e=>{"use strict";e.exports=JSON.parse('{"name":"postcss","version":"8.1.7","description":"Tool for transforming styles with JS plugins","engines":{"node":"^10 || ^12 || >=14"},"exports":{".":{"require":"./lib/postcss.js","import":"./lib/postcss.mjs","types":"./lib/postcss.d.ts"},"./":"./"},"main":"./lib/postcss.js","types":"./lib/postcss.d.ts","keywords":["css","postcss","rework","preprocessor","parser","source map","transform","manipulation","transpiler"],"funding":{"type":"opencollective","url":"https://opencollective.com/postcss/"},"author":"Andrey Sitnik ","license":"MIT","homepage":"https://postcss.org/","repository":"postcss/postcss","dependencies":{"colorette":"^1.2.1","line-column":"^1.0.2","nanoid":"^3.1.16","source-map":"^0.6.1"},"browser":{"./lib/terminal-highlight":false,"colorette":false,"fs":false}}')},2242:e=>{"use strict";e.exports=require("chalk")},5747:e=>{"use strict";e.exports=require("fs")},8710:e=>{"use strict";e.exports=require("loader-utils")},2282:e=>{"use strict";e.exports=require("module")},3225:e=>{"use strict";e.exports=require("next/dist/compiled/schema-utils")},2519:e=>{"use strict";e.exports=require("next/dist/compiled/semver")},6241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},8835:e=>{"use strict";e.exports=require("url")},1669:e=>{"use strict";e.exports=require("util")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={id:r,loaded:false,exports:{}};var s=true;try{e[r](n,n.exports,__webpack_require__);s=false}finally{if(s)delete t[r]}n.loaded=true;return n.exports}(()=>{__webpack_require__.nmd=(e=>{e.paths=[];if(!e.children)e.children=[];return e})})();__webpack_require__.ab=__dirname+"/";return __webpack_require__(5365)})(); \ No newline at end of file +module.exports=(()=>{var e={6553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.codeFrameColumns=codeFrameColumns;t.default=_default;var n=_interopRequireWildcard(r(9571));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e){if(Object.prototype.hasOwnProperty.call(e,s)){var i=n?Object.getOwnPropertyDescriptor(e,s):null;if(i&&(i.get||i.set)){Object.defineProperty(r,s,i)}else{r[s]=e[s]}}}r.default=e;if(t){t.set(e,r)}return r}let s=false;function getDefs(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}const i=/\r\n|[\n\r\u2028\u2029]/;function getMarkerLines(e,t,r){const n=Object.assign({column:0,line:-1},e.start);const s=Object.assign({},n,e.end);const{linesAbove:i=2,linesBelow:o=3}=r||{};const a=n.line;const l=n.column;const c=s.line;const f=s.column;let u=Math.max(a-(i+1),0);let h=Math.min(t.length,c+o);if(a===-1){u=0}if(c===-1){h=t.length}const p=c-a;const d={};if(p){for(let e=0;e<=p;e++){const r=e+a;if(!l){d[r]=true}else if(e===0){const e=t[r-1].length;d[r]=[l,e-l+1]}else if(e===p){d[r]=[0,f]}else{const n=t[r-e].length;d[r]=[0,n]}}}else{if(l===f){if(l){d[a]=[l,0]}else{d[a]=true}}else{d[a]=[l,f-l]}}return{start:u,end:h,markerLines:d}}function codeFrameColumns(e,t,r={}){const s=(r.highlightCode||r.forceColor)&&(0,n.shouldHighlight)(r);const o=(0,n.getChalk)(r);const a=getDefs(o);const l=(e,t)=>{return s?e(t):t};const c=e.split(i);const{start:f,end:u,markerLines:h}=getMarkerLines(t,c,r);const p=t.start&&typeof t.start.column==="number";const d=String(u).length;const g=s?(0,n.default)(e,r):e;let w=g.split(i).slice(f,u).map((e,t)=>{const n=f+1+t;const s=` ${n}`.slice(-d);const i=` ${s} | `;const o=h[n];const c=!h[n+1];if(o){let t="";if(Array.isArray(o)){const n=e.slice(0,Math.max(o[0]-1,0)).replace(/[^\t]/g," ");const s=o[1]||1;t=["\n ",l(a.gutter,i.replace(/\d/g," ")),n,l(a.marker,"^").repeat(s)].join("");if(c&&r.message){t+=" "+l(a.message,r.message)}}return[l(a.marker,">"),l(a.gutter,i),e,t].join("")}else{return` ${l(a.gutter,i)}${e}`}}).join("\n");if(r.message&&!p){w=`${" ".repeat(d+1)}${r.message}\n${w}`}if(s){return o.reset(w)}else{return w}}function _default(e,t,r,n={}){if(!s){s=true;const e="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning){process.emitWarning(e,"DeprecationWarning")}else{const t=new Error(e);t.name="DeprecationWarning";console.warn(new Error(e))}}r=Math.max(r,0);const i={start:{column:r,line:t}};return codeFrameColumns(e,i,n)}},4705:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isIdentifierStart=isIdentifierStart;t.isIdentifierChar=isIdentifierChar;t.isIdentifierName=isIdentifierName;let r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";let n="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const s=new RegExp("["+r+"]");const i=new RegExp("["+r+n+"]");r=n=null;const o=[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,157,310,10,21,11,7,153,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,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,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,85,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,159,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,230,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,35,56,264,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,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,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,2357,44,11,6,17,0,370,43,1301,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,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938];const a=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,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,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function isInAstralSet(e,t){let r=65536;for(let n=0,s=t.length;ne)return false;r+=t[n+1];if(r>=e)return true}return false}function isIdentifierStart(e){if(e<65)return e===36;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&s.test(String.fromCharCode(e))}return isInAstralSet(e,o)}function isIdentifierChar(e){if(e<48)return e===36;if(e<58)return true;if(e<65)return false;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&i.test(String.fromCharCode(e))}return isInAstralSet(e,o)||isInAstralSet(e,a)}function isIdentifierName(e){let t=true;for(let r=0,n=Array.from(e);r{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"isIdentifierName",{enumerable:true,get:function(){return n.isIdentifierName}});Object.defineProperty(t,"isIdentifierChar",{enumerable:true,get:function(){return n.isIdentifierChar}});Object.defineProperty(t,"isIdentifierStart",{enumerable:true,get:function(){return n.isIdentifierStart}});Object.defineProperty(t,"isReservedWord",{enumerable:true,get:function(){return s.isReservedWord}});Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:true,get:function(){return s.isStrictBindOnlyReservedWord}});Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:true,get:function(){return s.isStrictBindReservedWord}});Object.defineProperty(t,"isStrictReservedWord",{enumerable:true,get:function(){return s.isStrictReservedWord}});Object.defineProperty(t,"isKeyword",{enumerable:true,get:function(){return s.isKeyword}});var n=r(4705);var s=r(8755)},8755:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isReservedWord=isReservedWord;t.isStrictReservedWord=isStrictReservedWord;t.isStrictBindOnlyReservedWord=isStrictBindOnlyReservedWord;t.isStrictBindReservedWord=isStrictBindReservedWord;t.isKeyword=isKeyword;const r={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]};const n=new Set(r.keyword);const s=new Set(r.strict);const i=new Set(r.strictBind);function isReservedWord(e,t){return t&&e==="await"||e==="enum"}function isStrictReservedWord(e,t){return isReservedWord(e,t)||s.has(e)}function isStrictBindOnlyReservedWord(e){return i.has(e)}function isStrictBindReservedWord(e,t){return isStrictReservedWord(e,t)||isStrictBindOnlyReservedWord(e)}function isKeyword(e){return n.has(e)}},9571:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shouldHighlight=shouldHighlight;t.getChalk=getChalk;t.default=highlight;var n=_interopRequireWildcard(r(2388));var s=r(4246);var i=_interopRequireDefault(r(2242));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e){if(Object.prototype.hasOwnProperty.call(e,s)){var i=n?Object.getOwnPropertyDescriptor(e,s):null;if(i&&(i.get||i.set)){Object.defineProperty(r,s,i)}else{r[s]=e[s]}}}r.default=e;if(t){t.set(e,r)}return r}function getDefs(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold}}const o=/\r\n|[\n\r\u2028\u2029]/;const a=/^[a-z][\w-]*$/i;const l=/^[()[\]{}]$/;function getTokenType(e){const[t,r]=e.slice(-2);const i=(0,n.matchToToken)(e);if(i.type==="name"){if((0,s.isKeyword)(i.value)||(0,s.isReservedWord)(i.value)){return"keyword"}if(a.test(i.value)&&(r[t-1]==="<"||r.substr(t-2,2)=="n(e)).join("\n")}else{return t[0]}})}function shouldHighlight(e){return i.default.supportsColor||e.forceColor}function getChalk(e){let t=i.default;if(e.forceColor){t=new i.default.constructor({enabled:true,level:1})}return t}function highlight(e,t={}){if(shouldHighlight(t)){const r=getChalk(t);const n=getDefs(r);return highlightTokens(n,e)}else{return e}}},726:e=>{"use strict";const t=()=>{const e=Error.prepareStackTrace;Error.prepareStackTrace=((e,t)=>t);const t=(new Error).stack.slice(1);Error.prepareStackTrace=e;return t};e.exports=t;e.exports.default=t},8361:(e,t,r)=>{"use strict";var n=r(1669);var s=r(237);var i=function errorEx(e,t){if(!e||e.constructor!==String){t=e||{};e=Error.name}var r=function ErrorEXError(n){if(!this){return new ErrorEXError(n)}n=n instanceof Error?n.message:n||this.message;Error.call(this,n);Error.captureStackTrace(this,r);this.name=e;Object.defineProperty(this,"message",{configurable:true,enumerable:false,get:function(){var e=n.split(/\r?\n/g);for(var r in t){if(!t.hasOwnProperty(r)){continue}var i=t[r];if("message"in i){e=i.message(this[r],e)||e;if(!s(e)){e=[e]}}}return e.join("\n")},set:function(e){n=e}});var i=null;var o=Object.getOwnPropertyDescriptor(this,"stack");var a=o.get;var l=o.value;delete o.value;delete o.writable;o.set=function(e){i=e};o.get=function(){var e=(i||(a?a.call(this):l)).split(/\r?\n+/g);if(!i){e[0]=this.name+": "+this.message}var r=1;for(var n in t){if(!t.hasOwnProperty(n)){continue}var s=t[n];if("line"in s){var o=s.line(this[n]);if(o){e.splice(r++,0," "+o)}}if("stack"in s){s.stack(this[n],e)}}return e.join("\n")};Object.defineProperty(this,"stack",o)};if(Object.setPrototypeOf){Object.setPrototypeOf(r.prototype,Error.prototype);Object.setPrototypeOf(r,Error)}else{n.inherits(r,Error)}return r};i.append=function(e,t){return{message:function(r,n){r=r||t;if(r){n[0]+=" "+e.replace("%s",r.toString())}return n}}};i.line=function(e,t){return{line:function(r){r=r||t;if(r){return e.replace("%s",r.toString())}return null}}};e.exports=i},9900:(e,t,r)=>{"use strict";const n=r(5622);const s=r(4101);const i=r(5281);e.exports=(e=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}const t=i(__filename);const r=s(n.dirname(t),e);const o=require.cache[r];if(o&&o.parent){let e=o.parent.children.length;while(e--){if(o.parent.children[e].id===r){o.parent.children.splice(e,1)}}}delete require.cache[r];const a=require.cache[t];return a===undefined?require(r):a.require(r)})},4101:(e,t,r)=>{"use strict";const n=r(5622);const s=r(2282);const i=r(5747);const o=(e,t,r)=>{if(typeof e!=="string"){throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof e}\``)}if(typeof t!=="string"){throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof t}\``)}try{e=i.realpathSync(e)}catch(t){if(t.code==="ENOENT"){e=n.resolve(e)}else if(r){return null}else{throw t}}const o=n.join(e,"noop.js");const a=()=>s._resolveFilename(t,{id:o,filename:o,paths:s._nodeModulePaths(e)});if(r){try{return a()}catch(e){return null}}return a()};e.exports=((e,t)=>o(e,t));e.exports.silent=((e,t)=>o(e,t,true))},237:e=>{"use strict";e.exports=function isArrayish(e){if(!e){return false}return e instanceof Array||Array.isArray(e)||e.length>=0&&e.splice instanceof Function}},1352:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return t.call(e)=="[object Array]"}},2388:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;t.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:undefined};if(e[1])t.type="string",t.closed=!!(e[3]||e[4]);else if(e[5])t.type="comment";else if(e[6])t.type="comment",t.closed=!!e[7];else if(e[8])t.type="regex";else if(e[9])t.type="number";else if(e[10])t.type="name";else if(e[11])t.type="punctuator";else if(e[12])t.type="whitespace";return t}},8335:e=>{"use strict";e.exports=parseJson;function parseJson(e,t,r){r=r||20;try{return JSON.parse(e,t)}catch(t){if(typeof e!=="string"){const t=Array.isArray(e)&&e.length===0;const r="Cannot parse "+(t?"an empty array":String(e));throw new TypeError(r)}const n=t.message.match(/^Unexpected token.*position\s+(\d+)/i);const s=n?+n[1]:t.message.match(/^Unexpected end of JSON.*/i)?e.length-1:null;if(s!=null){const n=s<=r?0:s-r;const i=s+r>=e.length?e.length:s+r;t.message+=` while parsing near '${n===0?"":"..."}${e.slice(n,i)}${i===e.length?"":"..."}'`}else{t.message+=` while parsing '${e.slice(0,r*2)}'`}throw t}}},241:(e,t)=>{function set(e,t,r){if(typeof r.value==="object")r.value=klona(r.value);if(!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"){Object.defineProperty(e,t,r)}else e[t]=r.value}function klona(e){if(typeof e!=="object")return e;var t=0,r,n,s,i=Object.prototype.toString.call(e);if(i==="[object Object]"){s=Object.create(e.__proto__||null)}else if(i==="[object Array]"){s=Array(e.length)}else if(i==="[object Set]"){s=new Set;e.forEach(function(e){s.add(klona(e))})}else if(i==="[object Map]"){s=new Map;e.forEach(function(e,t){s.set(klona(t),klona(e))})}else if(i==="[object Date]"){s=new Date(+e)}else if(i==="[object RegExp]"){s=new RegExp(e.source,e.flags)}else if(i==="[object DataView]"){s=new e.constructor(klona(e.buffer))}else if(i==="[object ArrayBuffer]"){s=e.slice(0)}else if(i.slice(-6)==="Array]"){s=new e.constructor(e)}if(s){for(n=Object.getOwnPropertySymbols(e);t{"use strict";var n=r(1352);var s=r(4943);var i=Array.prototype.slice;e.exports=LineColumnFinder;function LineColumnFinder(e,t){if(!(this instanceof LineColumnFinder)){if(typeof t==="number"){return new LineColumnFinder(e).fromIndex(t)}return new LineColumnFinder(e,t)}this.str=e||"";this.lineToIndex=buildLineToIndex(this.str);t=t||{};this.origin=typeof t.origin==="undefined"?1:t.origin}LineColumnFinder.prototype.fromIndex=function(e){if(e<0||e>=this.str.length||isNaN(e)){return null}var t=findLowerIndexInRangeArray(e,this.lineToIndex);return{line:t+this.origin,col:e-this.lineToIndex[t]+this.origin}};LineColumnFinder.prototype.toIndex=function(e,t){if(typeof t==="undefined"){if(n(e)&&e.length>=2){return this.toIndex(e[0],e[1])}if(s(e)&&"line"in e&&("col"in e||"column"in e)){return this.toIndex(e.line,"col"in e?e.col:e.column)}return-1}if(isNaN(e)||isNaN(t)){return-1}e-=this.origin;t-=this.origin;if(e>=0&&t>=0&&e=t[t.length-1]){return t.length-1}var r=0,n=t.length-2,s;while(r>1);if(e=t[s+1]){r=s+1}else{r=s;break}}return r}},4943:(e,t,r)=>{"use strict";var n=r(1352);e.exports=function isObject(e){return e!=null&&typeof e==="object"&&n(e)===false}},9036:(e,t)=>{"use strict";var r="\n";var n="\r";var s=function(){function LinesAndColumns(e){this.string=e;var t=[0];for(var s=0;sthis.string.length){return null}var t=0;var r=this.offsets;while(r[t+1]<=e){t++}var n=e-r[t];return{line:t,column:n}};LinesAndColumns.prototype.indexForLocation=function(e){var t=e.line,r=e.column;if(t<0||t>=this.offsets.length){return null}if(r<0||r>this.lengthOfLine(t)){return null}return this.offsets[t]+r};LinesAndColumns.prototype.lengthOfLine=function(e){var t=this.offsets[e];var r=e===this.offsets.length-1?this.string.length:this.offsets[e+1];return r-t};return LinesAndColumns}();t.__esModule=true;t.default=s},5281:(e,t,r)=>{"use strict";const n=r(726);e.exports=(e=>{const t=n();if(!e){return t[2].getFileName()}let r=false;t.shift();for(const n of t){const t=n.getFileName();if(typeof t!=="string"){continue}if(t===e){r=true;continue}if(t==="module.js"){continue}if(r&&t!==e){return t}}})},1230:(e,t,r)=>{"use strict";var n=r(6580);var s=r(390);var i=r(3616);const o={anchorPrefix:"a",customTags:null,indent:2,indentSeq:true,keepCstNodes:false,keepNodeTypes:true,keepBlobsInJSON:true,mapAsMap:false,maxAliasCount:100,prettyErrors:false,simpleKeys:false,version:"1.2"};const a={get binary(){return s.binaryOptions},set binary(e){Object.assign(s.binaryOptions,e)},get bool(){return s.boolOptions},set bool(e){Object.assign(s.boolOptions,e)},get int(){return s.intOptions},set int(e){Object.assign(s.intOptions,e)},get null(){return s.nullOptions},set null(e){Object.assign(s.nullOptions,e)},get str(){return s.strOptions},set str(e){Object.assign(s.strOptions,e)}};const l={"1.0":{schema:"yaml-1.1",merge:true,tagPrefixes:[{handle:"!",prefix:n.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:true,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:n.defaultTagPrefix}]},1.2:{schema:"core",merge:false,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:n.defaultTagPrefix}]}};function stringifyTag(e,t){if((e.version||e.options.version)==="1.0"){const e=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return"!"+e[1];const r=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return r?`!${r[1]}/${r[2]}`:`!${t.replace(/^tag:/,"")}`}let r=e.tagPrefixes.find(e=>t.indexOf(e.prefix)===0);if(!r){const n=e.getDefaults().tagPrefixes;r=n&&n.find(e=>t.indexOf(e.prefix)===0)}if(!r)return t[0]==="!"?t:`!<${t}>`;const n=t.substr(r.prefix.length).replace(/[!,[\]{}]/g,e=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[e]);return r.handle+n}function getTagObject(e,t){if(t instanceof s.Alias)return s.Alias;if(t.tag){const r=e.filter(e=>e.tag===t.tag);if(r.length>0)return r.find(e=>e.format===t.format)||r[0]}let r,n;if(t instanceof s.Scalar){n=t.value;const s=e.filter(e=>e.identify&&e.identify(n)||e.class&&n instanceof e.class);r=s.find(e=>e.format===t.format)||s.find(e=>!e.format)}else{n=t;r=e.find(e=>e.nodeClass&&n instanceof e.nodeClass)}if(!r){const e=n&&n.constructor?n.constructor.name:typeof n;throw new Error(`Tag not resolved for ${e} value`)}return r}function stringifyProps(e,t,{anchors:r,doc:n}){const s=[];const i=n.anchors.getName(e);if(i){r[i]=e;s.push(`&${i}`)}if(e.tag){s.push(stringifyTag(n,e.tag))}else if(!t.default){s.push(stringifyTag(n,t.tag))}return s.join(" ")}function stringify(e,t,r,n){const{anchors:i,schema:o}=t.doc;let a;if(!(e instanceof s.Node)){const t={aliasNodes:[],onTagObj:e=>a=e,prevObjects:new Map};e=o.createNode(e,true,null,t);for(const e of t.aliasNodes){e.source=e.source.node;let t=i.getName(e.source);if(!t){t=i.newName();i.map[t]=e.source}}}if(e instanceof s.Pair)return e.toString(t,r,n);if(!a)a=getTagObject(o.tags,e);const l=stringifyProps(e,a,t);if(l.length>0)t.indentAtStart=(t.indentAtStart||0)+l.length+1;const c=typeof a.stringify==="function"?a.stringify(e,t,r,n):e instanceof s.Scalar?s.stringifyString(e,t,r,n):e.toString(t,r,n);if(!l)return c;return e instanceof s.Scalar||c[0]==="{"||c[0]==="["?`${l} ${c}`:`${l}\n${t.indent}${c}`}class Anchors{static validAnchorNode(e){return e instanceof s.Scalar||e instanceof s.YAMLSeq||e instanceof s.YAMLMap}constructor(e){n._defineProperty(this,"map",{});this.prefix=e}createAlias(e,t){this.setAnchor(e,t);return new s.Alias(e)}createMergePair(...e){const t=new s.Merge;t.value.items=e.map(e=>{if(e instanceof s.Alias){if(e.source instanceof s.YAMLMap)return e}else if(e instanceof s.YAMLMap){return this.createAlias(e)}throw new Error("Merge sources must be Map nodes or their Aliases")});return t}getName(e){const{map:t}=this;return Object.keys(t).find(r=>t[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){if(!e)e=this.prefix;const t=Object.keys(this.map);for(let r=1;true;++r){const n=`${e}${r}`;if(!t.includes(n))return n}}resolveNodes(){const{map:e,_cstAliases:t}=this;Object.keys(e).forEach(t=>{e[t]=e[t].resolved});t.forEach(e=>{e.source=e.source.resolved});delete this._cstAliases}setAnchor(e,t){if(e!=null&&!Anchors.validAnchorNode(e)){throw new Error("Anchors may only be set for Scalar, Seq and Map nodes")}if(t&&/[\x00-\x19\s,[\]{}]/.test(t)){throw new Error("Anchor names must not contain whitespace or control characters")}const{map:r}=this;const n=e&&Object.keys(r).find(t=>r[t]===e);if(n){if(!t){return n}else if(n!==t){delete r[n];r[t]=e}}else{if(!t){if(!e)return null;t=this.newName()}r[t]=e}return t}}const c=(e,t)=>{if(e&&typeof e==="object"){const{tag:r}=e;if(e instanceof s.Collection){if(r)t[r]=true;e.items.forEach(e=>c(e,t))}else if(e instanceof s.Pair){c(e.key,t);c(e.value,t)}else if(e instanceof s.Scalar){if(r)t[r]=true}}return t};const f=e=>Object.keys(c(e,{}));function parseContents(e,t){const r={before:[],after:[]};let i=undefined;let o=false;for(const a of t){if(a.valueRange){if(i!==undefined){const t="Document contains trailing content not separated by a ... or --- line";e.errors.push(new n.YAMLSyntaxError(a,t));break}const t=s.resolveNode(e,a);if(o){t.spaceBefore=true;o=false}i=t}else if(a.comment!==null){const e=i===undefined?r.before:r.after;e.push(a.comment)}else if(a.type===n.Type.BLANK_LINE){o=true;if(i===undefined&&r.before.length>0&&!e.commentBefore){e.commentBefore=r.before.join("\n");r.before=[]}}}e.contents=i||null;if(!i){e.comment=r.before.concat(r.after).join("\n")||null}else{const t=r.before.join("\n");if(t){const e=i instanceof s.Collection&&i.items[0]?i.items[0]:i;e.commentBefore=e.commentBefore?`${t}\n${e.commentBefore}`:t}e.comment=r.after.join("\n")||null}}function resolveTagDirective({tagPrefixes:e},t){const[r,s]=t.parameters;if(!r||!s){const e="Insufficient parameters given for %TAG directive";throw new n.YAMLSemanticError(t,e)}if(e.some(e=>e.handle===r)){const e="The %TAG directive must only be given at most once per handle in the same document.";throw new n.YAMLSemanticError(t,e)}return{handle:r,prefix:s}}function resolveYamlDirective(e,t){let[r]=t.parameters;if(t.name==="YAML:1.0")r="1.0";if(!r){const e="Insufficient parameters given for %YAML directive";throw new n.YAMLSemanticError(t,e)}if(!l[r]){const s=e.version||e.options.version;const i=`Document will be parsed as YAML ${s} rather than YAML ${r}`;e.warnings.push(new n.YAMLWarning(t,i))}return r}function parseDirectives(e,t,r){const s=[];let i=false;for(const r of t){const{comment:t,name:o}=r;switch(o){case"TAG":try{e.tagPrefixes.push(resolveTagDirective(e,r))}catch(t){e.errors.push(t)}i=true;break;case"YAML":case"YAML:1.0":if(e.version){const t="The %YAML directive must only be given at most once per document.";e.errors.push(new n.YAMLSemanticError(r,t))}try{e.version=resolveYamlDirective(e,r)}catch(t){e.errors.push(t)}i=true;break;default:if(o){const t=`YAML only supports %TAG and %YAML directives, and not %${o}`;e.warnings.push(new n.YAMLWarning(r,t))}}if(t)s.push(t)}if(r&&!i&&"1.1"===(e.version||r.version||e.options.version)){const t=({handle:e,prefix:t})=>({handle:e,prefix:t});e.tagPrefixes=r.tagPrefixes.map(t);e.version=r.version}e.commentBefore=s.join("\n")||null}function assertCollection(e){if(e instanceof s.Collection)return true;throw new Error("Expected a YAML collection as document contents")}class Document{constructor(e){this.anchors=new Anchors(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){assertCollection(this.contents);return this.contents.add(e)}addIn(e,t){assertCollection(this.contents);this.contents.addIn(e,t)}delete(e){assertCollection(this.contents);return this.contents.delete(e)}deleteIn(e){if(s.isEmptyPath(e)){if(this.contents==null)return false;this.contents=null;return true}assertCollection(this.contents);return this.contents.deleteIn(e)}getDefaults(){return Document.defaults[this.version]||Document.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof s.Collection?this.contents.get(e,t):undefined}getIn(e,t){if(s.isEmptyPath(e))return!t&&this.contents instanceof s.Scalar?this.contents.value:this.contents;return this.contents instanceof s.Collection?this.contents.getIn(e,t):undefined}has(e){return this.contents instanceof s.Collection?this.contents.has(e):false}hasIn(e){if(s.isEmptyPath(e))return this.contents!==undefined;return this.contents instanceof s.Collection?this.contents.hasIn(e):false}set(e,t){assertCollection(this.contents);this.contents.set(e,t)}setIn(e,t){if(s.isEmptyPath(e))this.contents=t;else{assertCollection(this.contents);this.contents.setIn(e,t)}}setSchema(e,t){if(!e&&!t&&this.schema)return;if(typeof e==="number")e=e.toFixed(1);if(e==="1.0"||e==="1.1"||e==="1.2"){if(this.version)this.version=e;else this.options.version=e;delete this.options.schema}else if(e&&typeof e==="string"){this.options.schema=e}if(Array.isArray(t))this.options.customTags=t;const r=Object.assign({},this.getDefaults(),this.options);this.schema=new i.Schema(r)}parse(e,t){if(this.options.keepCstNodes)this.cstNode=e;if(this.options.keepNodeTypes)this.type="DOCUMENT";const{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o){if(!o.source)o.source=this;this.errors.push(o)}parseDirectives(this,r,t);if(i)this.directivesEndMarker=true;this.range=a?[a.start,a.end]:null;this.setSchema();this.anchors._cstAliases=[];parseContents(this,s);this.anchors.resolveNodes();if(this.options.prettyErrors){for(const e of this.errors)if(e instanceof n.YAMLError)e.makePretty();for(const e of this.warnings)if(e instanceof n.YAMLError)e.makePretty()}return this}listNonDefaultTags(){return f(this.contents).filter(e=>e.indexOf(i.Schema.defaultPrefix)!==0)}setTagPrefix(e,t){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(t){const r=this.tagPrefixes.find(t=>t.handle===e);if(r)r.prefix=t;else this.tagPrefixes.push({handle:e,prefix:t})}else{this.tagPrefixes=this.tagPrefixes.filter(t=>t.handle!==e)}}toJSON(e,t){const{keepBlobsInJSON:r,mapAsMap:n,maxAliasCount:i}=this.options;const o=r&&(typeof e!=="string"||!(this.contents instanceof s.Scalar));const a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!n,maxAliasCount:i,stringify:stringify};const l=Object.keys(this.anchors.map);if(l.length>0)a.anchors=new Map(l.map(e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}]));const c=s.toJSON(this.contents,e,a);if(typeof t==="function"&&a.anchors)for(const{count:e,res:r}of a.anchors.values())t(r,e);return c}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");const e=this.options.indent;if(!Number.isInteger(e)||e<=0){const t=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${t}`)}this.setSchema();const t=[];let r=false;if(this.version){let e="%YAML 1.2";if(this.schema.name==="yaml-1.1"){if(this.version==="1.0")e="%YAML:1.0";else if(this.version==="1.1")e="%YAML 1.1"}t.push(e);r=true}const n=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:e,prefix:s})=>{if(n.some(e=>e.indexOf(s)===0)){t.push(`%TAG ${e} ${s}`);r=true}});if(r||this.directivesEndMarker)t.push("---");if(this.commentBefore){if(r||!this.directivesEndMarker)t.unshift("");t.unshift(this.commentBefore.replace(/^/gm,"#"))}const i={anchors:{},doc:this,indent:"",indentStep:" ".repeat(e),stringify:stringify};let o=false;let a=null;if(this.contents){if(this.contents instanceof s.Node){if(this.contents.spaceBefore&&(r||this.directivesEndMarker))t.push("");if(this.contents.commentBefore)t.push(this.contents.commentBefore.replace(/^/gm,"#"));i.forceBlockIndent=!!this.comment;a=this.contents.comment}const e=a?null:()=>o=true;const n=stringify(this.contents,i,()=>a=null,e);t.push(s.addComment(n,"",a))}else if(this.contents!==undefined){t.push(stringify(this.contents,i))}if(this.comment){if((!o||a)&&t[t.length-1]!=="")t.push("");t.push(this.comment.replace(/^/gm,"#"))}return t.join("\n")+"\n"}}n._defineProperty(Document,"defaults",l);t.Document=Document;t.defaultOptions=o;t.scalarOptions=a},6580:(e,t)=>{"use strict";const r={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."};const n={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"};const s="tag:yaml.org,2002:";const i={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function findLineStarts(e){const t=[0];let r=e.indexOf("\n");while(r!==-1){r+=1;t.push(r);r=e.indexOf("\n",r)}return t}function getSrcInfo(e){let t,r;if(typeof e==="string"){t=findLineStarts(e);r=e}else{if(Array.isArray(e))e=e[0];if(e&&e.context){if(!e.lineStarts)e.lineStarts=findLineStarts(e.context.src);t=e.lineStarts;r=e.context.src}}return{lineStarts:t,src:r}}function getLinePos(e,t){if(typeof e!=="number"||e<0)return null;const{lineStarts:r,src:n}=getSrcInfo(t);if(!r||!n||e>n.length)return null;for(let t=0;t=1)||e>r.length)return null;const s=r[e-1];let i=r[e];while(i&&i>s&&n[i-1]==="\n")--i;return n.slice(s,i)}function getPrettyContext({start:e,end:t},r,n=80){let s=getLine(e.line,r);if(!s)return null;let{col:i}=e;if(s.length>n){if(i<=n-10){s=s.substr(0,n-1)+"…"}else{const e=Math.round(n/2);if(s.length>i+e)s=s.substr(0,i+e-1)+"…";i-=s.length-n;s="…"+s.substr(1-n)}}let o=1;let a="";if(t){if(t.line===e.line&&i+(t.col-e.col)<=n+1){o=t.col-e.col}else{o=Math.min(s.length+1,n)-i;a="…"}}const l=i>1?" ".repeat(i-1):"";const c="^".repeat(o);return`${s}\n${l}${c}${a}`}class Range{static copy(e){return new Range(e.start,e.end)}constructor(e,t){this.start=e;this.end=t||e}isEmpty(){return typeof this.start!=="number"||!this.end||this.end<=this.start}setOrigRange(e,t){const{start:r,end:n}=this;if(e.length===0||n<=e[0]){this.origStart=r;this.origEnd=n;return t}let s=t;while(sr)break;else++s}this.origStart=r+s;const i=s;while(s=n)break;else++s}this.origEnd=n+s;return i}}class Node{static addStringTerminator(e,t,r){if(r[r.length-1]==="\n")return r;const n=Node.endOfWhiteSpace(e,t);return n>=e.length||e[n]==="\n"?r+"\n":r}static atDocumentBoundary(e,t,n){const s=e[t];if(!s)return true;const i=e[t-1];if(i&&i!=="\n")return false;if(n){if(s!==n)return false}else{if(s!==r.DIRECTIVES_END&&s!==r.DOCUMENT_END)return false}const o=e[t+1];const a=e[t+2];if(o!==s||a!==s)return false;const l=e[t+3];return!l||l==="\n"||l==="\t"||l===" "}static endOfIdentifier(e,t){let r=e[t];const n=r==="<";const s=n?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];while(r&&s.indexOf(r)===-1)r=e[t+=1];if(n&&r===">")t+=1;return t}static endOfIndent(e,t){let r=e[t];while(r===" ")r=e[t+=1];return t}static endOfLine(e,t){let r=e[t];while(r&&r!=="\n")r=e[t+=1];return t}static endOfWhiteSpace(e,t){let r=e[t];while(r==="\t"||r===" ")r=e[t+=1];return t}static startOfLine(e,t){let r=e[t-1];if(r==="\n")return t;while(r&&r!=="\n")r=e[t-=1];return t+1}static endOfBlockIndent(e,t,r){const n=Node.endOfIndent(e,r);if(n>r+t){return n}else{const t=Node.endOfWhiteSpace(e,n);const r=e[t];if(!r||r==="\n")return t}return null}static atBlank(e,t,r){const n=e[t];return n==="\n"||n==="\t"||n===" "||r&&!n}static nextNodeIsIndented(e,t,r){if(!e||t<0)return false;if(t>0)return true;return r&&e==="-"}static normalizeOffset(e,t){const r=e[t];return!r?t:r!=="\n"&&e[t-1]==="\n"?t-1:Node.endOfWhiteSpace(e,t)}static foldNewline(e,t,r){let n=0;let s=false;let i="";let o=e[t+1];while(o===" "||o==="\t"||o==="\n"){switch(o){case"\n":n=0;t+=1;i+="\n";break;case"\t":if(n<=r)s=true;t=Node.endOfWhiteSpace(e,t+2)-1;break;case" ":n+=1;t+=1;break}o=e[t+1]}if(!i)i=" ";if(o&&n<=r)s=true;return{fold:i,offset:t,error:s}}constructor(e,t,r){Object.defineProperty(this,"context",{value:r||null,writable:true});this.error=null;this.range=null;this.valueRange=null;this.props=t||[];this.type=e;this.value=null}getPropValue(e,t,r){if(!this.context)return null;const{src:n}=this.context;const s=this.props[e];return s&&n[s.start]===t?n.slice(s.start+(r?1:0),s.end):null}get anchor(){for(let e=0;e0?e.join("\n"):null}commentHasRequiredWhitespace(e){const{src:t}=this.context;if(this.header&&e===this.header.end)return false;if(!this.valueRange)return false;const{end:r}=this.valueRange;return e!==r||Node.atBlank(t,r-1)}get hasComment(){if(this.context){const{src:e}=this.context;for(let t=0;tr.setOrigRange(e,t));return t}toString(){const{context:{src:e},range:t,value:r}=this;if(r!=null)return r;const n=e.slice(t.start,t.end);return Node.addStringTerminator(e,t.end,n)}}class YAMLError extends Error{constructor(e,t,r){if(!r||!(t instanceof Node))throw new Error(`Invalid arguments for new ${e}`);super();this.name=e;this.message=r;this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;const e=this.source.context&&this.source.context.root;if(typeof this.offset==="number"){this.range=new Range(this.offset,this.offset+1);const t=e&&getLinePos(this.offset,e);if(t){const e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else{this.range=this.source.range;this.linePos=this.source.rangeAsLinePos}if(this.linePos){const{line:t,col:r}=this.linePos.start;this.message+=` at line ${t}, column ${r}`;const n=e&&getPrettyContext(this.linePos,e);if(n)this.message+=`:\n\n${n}\n`}delete this.source}}class YAMLReferenceError extends YAMLError{constructor(e,t){super("YAMLReferenceError",e,t)}}class YAMLSemanticError extends YAMLError{constructor(e,t){super("YAMLSemanticError",e,t)}}class YAMLSyntaxError extends YAMLError{constructor(e,t){super("YAMLSyntaxError",e,t)}}class YAMLWarning extends YAMLError{constructor(e,t){super("YAMLWarning",e,t)}}function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}class PlainValue extends Node{static endOfLine(e,t,r){let n=e[t];let s=t;while(n&&n!=="\n"){if(r&&(n==="["||n==="]"||n==="{"||n==="}"||n===","))break;const t=e[s+1];if(n===":"&&(!t||t==="\n"||t==="\t"||t===" "||r&&t===","))break;if((n===" "||n==="\t")&&t==="#")break;s+=1;n=t}return s}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{src:r}=this.context;let n=r[t-1];while(ei?r.slice(i,n+1):e}else{s+=e}}const i=r[e];switch(i){case"\t":{const e="Plain value cannot start with a tab character";const t=[new YAMLSemanticError(this,e)];return{errors:t,str:s}}case"@":case"`":{const e=`Plain value cannot start with reserved character ${i}`;const t=[new YAMLSemanticError(this,e)];return{errors:t,str:s}}default:return s}}parseBlockValue(e){const{indent:t,inFlow:r,src:n}=this.context;let s=e;let i=e;for(let e=n[s];e==="\n";e=n[s]){if(Node.atDocumentBoundary(n,s+1))break;const e=Node.endOfBlockIndent(n,t,s+1);if(e===null||n[e]==="#")break;if(n[e]==="\n"){s=e}else{i=PlainValue.endOfLine(n,e,r);s=i}}if(this.valueRange.isEmpty())this.valueRange.start=e;this.valueRange.end=i;return i}parse(e,t){this.context=e;const{inFlow:r,src:n}=e;let s=t;const i=n[s];if(i&&i!=="#"&&i!=="\n"){s=PlainValue.endOfLine(n,t,r)}this.valueRange=new Range(t,s);s=Node.endOfWhiteSpace(n,s);s=this.parseComment(s);if(!this.hasComment||this.valueRange.isEmpty()){s=this.parseBlockValue(s)}return s}}t.Char=r;t.Node=Node;t.PlainValue=PlainValue;t.Range=Range;t.Type=n;t.YAMLError=YAMLError;t.YAMLReferenceError=YAMLReferenceError;t.YAMLSemanticError=YAMLSemanticError;t.YAMLSyntaxError=YAMLSyntaxError;t.YAMLWarning=YAMLWarning;t._defineProperty=_defineProperty;t.defaultTagPrefix=s;t.defaultTags=i},3616:(e,t,r)=>{"use strict";var n=r(6580);var s=r(390);var i=r(5655);function createMap(e,t,r){const n=new s.YAMLMap(e);if(t instanceof Map){for(const[s,i]of t)n.items.push(e.createPair(s,i,r))}else if(t&&typeof t==="object"){for(const s of Object.keys(t))n.items.push(e.createPair(s,t[s],r))}if(typeof e.sortMapEntries==="function"){n.items.sort(e.sortMapEntries)}return n}const o={createNode:createMap,default:true,nodeClass:s.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:s.resolveMap};function createSeq(e,t,r){const n=new s.YAMLSeq(e);if(t&&t[Symbol.iterator]){for(const s of t){const t=e.createNode(s,r.wrapScalars,null,r);n.items.push(t)}}return n}const a={createNode:createSeq,default:true,nodeClass:s.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:s.resolveSeq};const l={identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify(e,t,r,n){t=Object.assign({actualString:true},t);return s.stringifyString(e,t,r,n)},options:s.strOptions};const c=[o,a,l];const f=e=>typeof e==="bigint"||Number.isInteger(e);const u=(e,t,r)=>s.intOptions.asBigInt?BigInt(e):parseInt(t,r);function intStringify(e,t,r){const{value:n}=e;if(f(n)&&n>=0)return r+n.toString(t);return s.stringifyNumber(e)}const h={identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new s.Scalar(null):null,default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr};const p={identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>e[0]==="t"||e[0]==="T",options:s.boolOptions,stringify:({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr};const d={identify:e=>f(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>u(e,t,8),options:s.intOptions,stringify:e=>intStringify(e,8,"0o")};const g={identify:f,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>u(e,e,10),options:s.intOptions,stringify:s.stringifyNumber};const w={identify:e=>f(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>u(e,t,16),options:s.intOptions,stringify:e=>intStringify(e,16,"0x")};const y={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber};const m={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify:({value:e})=>Number(e).toExponential()};const S={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,r){const n=t||r;const i=new s.Scalar(parseFloat(e));if(n&&n[n.length-1]==="0")i.minFractionDigits=n.length;return i},stringify:s.stringifyNumber};const b=c.concat([h,p,d,g,w,y,m,S]);const O=e=>typeof e==="bigint"||Number.isInteger(e);const A=({value:e})=>JSON.stringify(e);const E=[o,a,{identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:s.resolveString,stringify:A},{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new s.Scalar(null):null,default:true,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:A},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>e==="true",stringify:A},{identify:O,default:true,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>s.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>O(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:A}];E.scalarFallback=(e=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)});const M=({value:e})=>e?s.boolOptions.trueStr:s.boolOptions.falseStr;const N=e=>typeof e==="bigint"||Number.isInteger(e);function intResolve$1(e,t,r){let n=t.replace(/_/g,"");if(s.intOptions.asBigInt){switch(r){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const t=BigInt(n);return e==="-"?BigInt(-1)*t:t}const i=parseInt(n,r);return e==="-"?-1*i:i}function intStringify$1(e,t,r){const{value:n}=e;if(N(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return s.stringifyNumber(e)}const C=c.concat([{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new s.Scalar(null):null,default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:s.nullOptions,stringify:()=>s.nullOptions.nullStr},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>true,options:s.boolOptions,stringify:M},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>false,options:s.boolOptions,stringify:M},{identify:N,default:true,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,r)=>intResolve$1(t,r,2),stringify:e=>intStringify$1(e,2,"0b")},{identify:N,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,r)=>intResolve$1(t,r,8),stringify:e=>intStringify$1(e,8,"0")},{identify:N,default:true,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,r)=>intResolve$1(t,r,10),stringify:s.stringifyNumber},{identify:N,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,r)=>intResolve$1(t,r,16),stringify:e=>intStringify$1(e,16,"0x")},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify:({value:e})=>Number(e).toExponential()},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){const r=new s.Scalar(parseFloat(e.replace(/_/g,"")));if(t){const e=t.replace(/_/g,"");if(e[e.length-1]==="0")r.minFractionDigits=e.length}return r},stringify:s.stringifyNumber}],i.binary,i.omap,i.pairs,i.set,i.intTime,i.floatTime,i.timestamp);const T={core:b,failsafe:c,json:E,yaml11:C};const L={binary:i.binary,bool:p,float:S,floatExp:m,floatNaN:y,floatTime:i.floatTime,int:g,intHex:w,intOct:d,intTime:i.intTime,map:o,null:h,omap:i.omap,pairs:i.pairs,seq:a,set:i.set,timestamp:i.timestamp};function findTagObject(e,t,r){if(t){const e=r.filter(e=>e.tag===t);const n=e.find(e=>!e.format)||e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format)}function createNode(e,t,r){if(e instanceof s.Node)return e;const{defaultPrefix:n,onTagObj:i,prevObjects:l,schema:c,wrapScalars:f}=r;if(t&&t.startsWith("!!"))t=n+t.slice(2);let u=findTagObject(e,t,c.tags);if(!u){if(typeof e.toJSON==="function")e=e.toJSON();if(typeof e!=="object")return f?new s.Scalar(e):e;u=e instanceof Map?o:e[Symbol.iterator]?a:o}if(i){i(u);delete r.onTagObj}const h={};if(e&&typeof e==="object"&&l){const t=l.get(e);if(t){const e=new s.Alias(t);r.aliasNodes.push(e);return e}h.value=e;l.set(e,h)}h.node=u.createNode?u.createNode(r.schema,e,r):f?new s.Scalar(e):e;if(t&&h.node instanceof s.Node)h.node.tag=t;return h.node}function getSchemaTags(e,t,r,n){let s=e[n.replace(/\W/g,"")];if(!s){const t=Object.keys(e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${t}`)}if(Array.isArray(r)){for(const e of r)s=s.concat(e)}else if(typeof r==="function"){s=r(s.slice())}for(let e=0;eJSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag "${r}"; use one of ${e}`)}s[e]=n}}return s}const R=(e,t)=>e.keyt.key?1:0;class Schema{constructor({customTags:e,merge:t,schema:r,sortMapEntries:n,tags:s}){this.merge=!!t;this.name=r;this.sortMapEntries=n===true?R:n||null;if(!e&&s)i.warnOptionDeprecation("tags","customTags");this.tags=getSchemaTags(T,L,e||s,r)}createNode(e,t,r,n){const s={defaultPrefix:Schema.defaultPrefix,schema:this,wrapScalars:t};const i=n?Object.assign(n,s):s;return createNode(e,r,i)}createPair(e,t,r){if(!r)r={wrapScalars:true};const n=this.createNode(e,r.wrapScalars,null,r);const i=this.createNode(t,r.wrapScalars,null,r);return new s.Pair(n,i)}}n._defineProperty(Schema,"defaultPrefix",n.defaultTagPrefix);n._defineProperty(Schema,"defaultTags",n.defaultTags);t.Schema=Schema},4884:(e,t,r)=>{"use strict";var n=r(6580);var s=r(2488);r(390);var i=r(1230);var o=r(3616);var a=r(5655);function createNode(e,t=true,r){if(r===undefined&&typeof t==="string"){r=t;t=true}const n=Object.assign({},i.Document.defaults[i.defaultOptions.version],i.defaultOptions);const s=new o.Schema(n);return s.createNode(e,t,r)}class Document extends i.Document{constructor(e){super(Object.assign({},i.defaultOptions,e))}}function parseAllDocuments(e,t){const r=[];let n;for(const i of s.parse(e)){const e=new Document(t);e.parse(i,n);r.push(e);n=e}return r}function parseDocument(e,t){const r=s.parse(e);const i=new Document(t).parse(r[0]);if(r.length>1){const e="Source contains multiple documents; please use YAML.parseAllDocuments()";i.errors.unshift(new n.YAMLSemanticError(r[1],e))}return i}function parse(e,t){const r=parseDocument(e,t);r.warnings.forEach(e=>a.warn(e));if(r.errors.length>0)throw r.errors[0];return r.toJSON()}function stringify(e,t){const r=new Document(t);r.contents=e;return String(r)}const l={createNode:createNode,defaultOptions:i.defaultOptions,Document:Document,parse:parse,parseAllDocuments:parseAllDocuments,parseCST:s.parse,parseDocument:parseDocument,scalarOptions:i.scalarOptions,stringify:stringify};t.YAML=l},2488:(e,t,r)=>{"use strict";var n=r(6580);class BlankLine extends n.Node{constructor(){super(n.Type.BLANK_LINE)}get includesTrailingLines(){return true}parse(e,t){this.context=e;this.range=new n.Range(t,t+1);return t+1}}class CollectionItem extends n.Node{constructor(e,t){super(e,t);this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,t){this.context=e;const{parseNode:r,src:s}=e;let{atLineStart:i,lineStart:o}=e;if(!i&&this.type===n.Type.SEQ_ITEM)this.error=new n.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line");const a=i?t-o:e.indent;let l=n.Node.endOfWhiteSpace(s,t+1);let c=s[l];const f=c==="#";const u=[];let h=null;while(c==="\n"||c==="#"){if(c==="#"){const e=n.Node.endOfLine(s,l+1);u.push(new n.Range(l,e));l=e}else{i=true;o=l+1;const e=n.Node.endOfWhiteSpace(s,o);if(s[e]==="\n"&&u.length===0){h=new BlankLine;o=h.parse({src:s},o)}l=n.Node.endOfIndent(s,o)}c=s[l]}if(n.Node.nextNodeIsIndented(c,l-(o+a),this.type!==n.Type.SEQ_ITEM)){this.node=r({atLineStart:i,inCollection:false,indent:a,lineStart:o,parent:this},l)}else if(c&&o>t+1){l=o-1}if(this.node){if(h){const t=e.parent.items||e.parent.contents;if(t)t.push(h)}if(u.length)Array.prototype.push.apply(this.props,u);l=this.node.range.end}else{if(f){const e=u[0];this.props.push(e);l=e.end}else{l=n.Node.endOfLine(s,t+1)}}const p=this.node?this.node.valueRange.end:l;this.valueRange=new n.Range(t,p);return l}setOrigRanges(e,t){t=super.setOrigRanges(e,t);return this.node?this.node.setOrigRanges(e,t):t}toString(){const{context:{src:e},node:t,range:r,value:s}=this;if(s!=null)return s;const i=t?e.slice(r.start,t.range.start)+String(t):e.slice(r.start,r.end);return n.Node.addStringTerminator(e,r.end,i)}}class Comment extends n.Node{constructor(){super(n.Type.COMMENT)}parse(e,t){this.context=e;const r=this.parseComment(t);this.range=new n.Range(t,r);return r}}function grabCollectionEndComments(e){let t=e;while(t instanceof CollectionItem)t=t.node;if(!(t instanceof Collection))return null;const r=t.items.length;let s=-1;for(let e=r-1;e>=0;--e){const r=t.items[e];if(r.type===n.Type.COMMENT){const{indent:t,lineStart:n}=r.context;if(t>0&&r.range.start>=n+t)break;s=e}else if(r.type===n.Type.BLANK_LINE)s=e;else break}if(s===-1)return null;const i=t.items.splice(s,r-s);const o=i[0].range.start;while(true){t.range.end=o;if(t.valueRange&&t.valueRange.end>o)t.valueRange.end=o;if(t===e)break;t=t.context.parent}return i}class Collection extends n.Node{static nextContentHasIndent(e,t,r){const s=n.Node.endOfLine(e,t)+1;t=n.Node.endOfWhiteSpace(e,s);const i=e[t];if(!i)return false;if(t>=s+r)return true;if(i!=="#"&&i!=="\n")return false;return Collection.nextContentHasIndent(e,t,r)}constructor(e){super(e.type===n.Type.SEQ_ITEM?n.Type.SEQ:n.Type.MAP);for(let t=e.props.length-1;t>=0;--t){if(e.props[t].start0}parse(e,t){this.context=e;const{parseNode:r,src:s}=e;let i=n.Node.startOfLine(s,t);const o=this.items[0];o.context.parent=this;this.valueRange=n.Range.copy(o.valueRange);const a=o.range.start-o.context.lineStart;let l=t;l=n.Node.normalizeOffset(s,l);let c=s[l];let f=n.Node.endOfWhiteSpace(s,i)===l;let u=false;while(c){while(c==="\n"||c==="#"){if(f&&c==="\n"&&!u){const e=new BlankLine;l=e.parse({src:s},l);this.valueRange.end=l;if(l>=s.length){c=null;break}this.items.push(e);l-=1}else if(c==="#"){if(l=s.length){c=null;break}}i=l+1;l=n.Node.endOfIndent(s,i);if(n.Node.atBlank(s,l)){const e=n.Node.endOfWhiteSpace(s,l);const t=s[e];if(!t||t==="\n"||t==="#"){l=e}}c=s[l];f=true}if(!c){break}if(l!==i+a&&(f||c!==":")){if(lt)l=i;break}else if(!this.error){const e="All collection items must start at the same column";this.error=new n.YAMLSyntaxError(this,e)}}if(o.type===n.Type.SEQ_ITEM){if(c!=="-"){if(i>t)l=i;break}}else if(c==="-"&&!this.error){const e=s[l+1];if(!e||e==="\n"||e==="\t"||e===" "){const e="A collection cannot be both a mapping and a sequence";this.error=new n.YAMLSyntaxError(this,e)}}const e=r({atLineStart:f,inCollection:true,indent:a,lineStart:i,parent:this},l);if(!e)return l;this.items.push(e);this.valueRange.end=e.valueRange.end;l=n.Node.normalizeOffset(s,e.range.end);c=s[l];f=false;u=e.includesTrailingLines;if(c){let e=l-1;let t=s[e];while(t===" "||t==="\t")t=s[--e];if(t==="\n"){i=e+1;f=true}}const h=grabCollectionEndComments(e);if(h)Array.prototype.push.apply(this.items,h)}return l}setOrigRanges(e,t){t=super.setOrigRanges(e,t);this.items.forEach(r=>{t=r.setOrigRanges(e,t)});return t}toString(){const{context:{src:e},items:t,range:r,value:s}=this;if(s!=null)return s;let i=e.slice(r.start,t[0].range.start)+String(t[0]);for(let e=1;e0){this.contents=this.directives;this.directives=[]}return i}}if(t[i]){this.directivesEndMarker=new n.Range(i,i+3);return i+3}if(s){this.error=new n.YAMLSemanticError(this,"Missing directives-end indicator line")}else if(this.directives.length>0){this.contents=this.directives;this.directives=[]}return i}parseContents(e){const{parseNode:t,src:r}=this.context;if(!this.contents)this.contents=[];let s=e;while(r[s-1]==="-")s-=1;let i=n.Node.endOfWhiteSpace(r,e);let o=s===e;this.valueRange=new n.Range(i);while(!n.Node.atDocumentBoundary(r,i,n.Char.DOCUMENT_END)){switch(r[i]){case"\n":if(o){const e=new BlankLine;i=e.parse({src:r},i);if(i{t=r.setOrigRanges(e,t)});if(this.directivesEndMarker)t=this.directivesEndMarker.setOrigRange(e,t);this.contents.forEach(r=>{t=r.setOrigRanges(e,t)});if(this.documentEndMarker)t=this.documentEndMarker.setOrigRange(e,t);return t}toString(){const{contents:e,directives:t,value:r}=this;if(r!=null)return r;let s=t.join("");if(e.length>0){if(t.length>0||e[0].type===n.Type.COMMENT)s+="---\n";s+=e.join("")}if(s[s.length-1]!=="\n")s+="\n";return s}}class Alias extends n.Node{parse(e,t){this.context=e;const{src:r}=e;let s=n.Node.endOfIdentifier(r,t+1);this.valueRange=new n.Range(t+1,s);s=n.Node.endOfWhiteSpace(r,s);s=this.parseComment(s);return s}}const s={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"};class BlockValue extends n.Node{constructor(e,t){super(e,t);this.blockIndent=null;this.chomping=s.CLIP;this.header=null}get includesTrailingLines(){return this.chomping===s.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;const{indent:r,src:i}=this.context;if(this.valueRange.isEmpty())return"";let o=null;let a=i[t-1];while(a==="\n"||a==="\t"||a===" "){t-=1;if(t<=e){if(this.chomping===s.KEEP)break;else return""}if(a==="\n")o=t;a=i[t-1]}let l=t+1;if(o){if(this.chomping===s.KEEP){l=o;t=this.valueRange.end}else{t=o}}const c=r+this.blockIndent;const f=this.type===n.Type.BLOCK_FOLDED;let u=true;let h="";let p="";let d=false;for(let r=e;rl){l=c}}else if(s&&s!=="\n"&&c{if(r instanceof n.Node){t=r.setOrigRanges(e,t)}else if(e.length===0){r.origOffset=r.offset}else{let n=t;while(nr.offset)break;else++n}r.origOffset=r.offset+n;t=n}});return t}toString(){const{context:{src:e},items:t,range:r,value:s}=this;if(s!=null)return s;const i=t.filter(e=>e instanceof n.Node);let o="";let a=r.start;i.forEach(t=>{const r=e.slice(a,t.range.start);a=t.range.end;o+=r+String(t);if(o[o.length-1]==="\n"&&e[a-1]!=="\n"&&e[a]==="\n"){a+=1}});o+=e.slice(a,r.end);return n.Node.addStringTerminator(e,r.end,o)}}class QuoteDouble extends n.Node{static endOfQuote(e,t){let r=e[t];while(r&&r!=='"'){t+=r==="\\"?2:1;r=e[t]}return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[];const{start:t,end:r}=this.valueRange;const{indent:s,src:i}=this.context;if(i[r-1]!=='"')e.push(new n.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=t+1;ae?i.slice(e,a+1):t}else{o+=t}}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,t,r){const{src:s}=this.context;const i=s.substr(e,t);const o=i.length===t&&/^[0-9a-fA-F]+$/.test(i);const a=o?parseInt(i,16):NaN;if(isNaN(a)){r.push(new n.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,t+2)}`));return s.substr(e-2,t+2)}return String.fromCodePoint(a)}parse(e,t){this.context=e;const{src:r}=e;let s=QuoteDouble.endOfQuote(r,t+1);this.valueRange=new n.Range(t,s);s=n.Node.endOfWhiteSpace(r,s);s=this.parseComment(s);return s}}class QuoteSingle extends n.Node{static endOfQuote(e,t){let r=e[t];while(r){if(r==="'"){if(e[t+1]!=="'")break;r=e[t+=2]}else{r=e[t+=1]}}return t+1}get strValue(){if(!this.valueRange||!this.context)return null;const e=[];const{start:t,end:r}=this.valueRange;const{indent:s,src:i}=this.context;if(i[r-1]!=="'")e.push(new n.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=t+1;ae?i.slice(e,a+1):t}else{o+=t}}return e.length>0?{errors:e,str:o}:o}parse(e,t){this.context=e;const{src:r}=e;let s=QuoteSingle.endOfQuote(r,t+1);this.valueRange=new n.Range(t,s);s=n.Node.endOfWhiteSpace(r,s);s=this.parseComment(s);return s}}function createNewNode(e,t){switch(e){case n.Type.ALIAS:return new Alias(e,t);case n.Type.BLOCK_FOLDED:case n.Type.BLOCK_LITERAL:return new BlockValue(e,t);case n.Type.FLOW_MAP:case n.Type.FLOW_SEQ:return new FlowCollection(e,t);case n.Type.MAP_KEY:case n.Type.MAP_VALUE:case n.Type.SEQ_ITEM:return new CollectionItem(e,t);case n.Type.COMMENT:case n.Type.PLAIN:return new n.PlainValue(e,t);case n.Type.QUOTE_DOUBLE:return new QuoteDouble(e,t);case n.Type.QUOTE_SINGLE:return new QuoteSingle(e,t);default:return null}}class ParseContext{static parseType(e,t,r){switch(e[t]){case"*":return n.Type.ALIAS;case">":return n.Type.BLOCK_FOLDED;case"|":return n.Type.BLOCK_LITERAL;case"{":return n.Type.FLOW_MAP;case"[":return n.Type.FLOW_SEQ;case"?":return!r&&n.Node.atBlank(e,t+1,true)?n.Type.MAP_KEY:n.Type.PLAIN;case":":return!r&&n.Node.atBlank(e,t+1,true)?n.Type.MAP_VALUE:n.Type.PLAIN;case"-":return!r&&n.Node.atBlank(e,t+1,true)?n.Type.SEQ_ITEM:n.Type.PLAIN;case'"':return n.Type.QUOTE_DOUBLE;case"'":return n.Type.QUOTE_SINGLE;default:return n.Type.PLAIN}}constructor(e={},{atLineStart:t,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){n._defineProperty(this,"parseNode",(e,t)=>{if(n.Node.atDocumentBoundary(this.src,t))return null;const r=new ParseContext(this,e);const{props:s,type:i,valueStart:o}=r.parseProps(t);const a=createNewNode(i,s);let l=a.parse(r,o);a.range=new n.Range(t,l);if(l<=t){a.error=new Error(`Node#parse consumed no characters`);a.error.parseEnd=l;a.error.source=a;a.range.end=t+1}if(r.nodeStartsCollection(a)){if(!a.error&&!r.atLineStart&&r.parent.type===n.Type.DOCUMENT){a.error=new n.YAMLSyntaxError(a,"Block collection must not have preceding content here (e.g. directives-end indicator)")}const e=new Collection(a);l=e.parse(new ParseContext(r),l);e.range=new n.Range(t,l);return e}return a});this.atLineStart=t!=null?t:e.atLineStart||false;this.inCollection=r!=null?r:e.inCollection||false;this.inFlow=s!=null?s:e.inFlow||false;this.indent=i!=null?i:e.indent;this.lineStart=o!=null?o:e.lineStart;this.parent=a!=null?a:e.parent||{};this.root=e.root;this.src=e.src}nodeStartsCollection(e){const{inCollection:t,inFlow:r,src:s}=this;if(t||r)return false;if(e instanceof CollectionItem)return true;let i=e.range.end;if(s[i]==="\n"||s[i-1]==="\n")return false;i=n.Node.endOfWhiteSpace(s,i);return s[i]===":"}parseProps(e){const{inFlow:t,parent:r,src:s}=this;const i=[];let o=false;e=this.atLineStart?n.Node.endOfIndent(s,e):n.Node.endOfWhiteSpace(s,e);let a=s[e];while(a===n.Char.ANCHOR||a===n.Char.COMMENT||a===n.Char.TAG||a==="\n"){if(a==="\n"){const t=e+1;const i=n.Node.endOfIndent(s,t);const a=i-(t+this.indent);const l=r.type===n.Type.SEQ_ITEM&&r.context.atLineStart;if(!n.Node.nextNodeIsIndented(s[i],a,!l))break;this.atLineStart=true;this.lineStart=t;o=false;e=i}else if(a===n.Char.COMMENT){const t=n.Node.endOfLine(s,e+1);i.push(new n.Range(e,t));e=t}else{let t=n.Node.endOfIdentifier(s,e+1);if(a===n.Char.TAG&&s[t]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,t+13))){t=n.Node.endOfIdentifier(s,t+5)}i.push(new n.Range(e,t));o=true;e=n.Node.endOfWhiteSpace(s,t)}a=s[e]}if(o&&a===":"&&n.Node.atBlank(s,e+1,true))e-=1;const l=ParseContext.parseType(s,e,t);return{props:i,type:l,valueStart:e}}}function parse(e){const t=[];if(e.indexOf("\r")!==-1){e=e.replace(/\r\n?/g,(e,r)=>{if(e.length>1)t.push(r);return"\n"})}const r=[];let n=0;do{const t=new Document;const s=new ParseContext({src:e});n=t.parse(s,n);r.push(t)}while(n{if(t.length===0)return false;for(let e=1;er.join("...\n"));return r}t.parse=parse},390:(e,t,r)=>{"use strict";var n=r(6580);function addCommentBefore(e,t,r){if(!r)return e;const n=r.replace(/[\s\S]^/gm,`$&${t}#`);return`#${n}\n${t}${e}`}function addComment(e,t,r){return!r?e:r.indexOf("\n")===-1?`${e} #${r}`:`${e}\n`+r.replace(/^/gm,`${t||""}#`)}class Node{}function toJSON(e,t,r){if(Array.isArray(e))return e.map((e,t)=>toJSON(e,String(t),r));if(e&&typeof e.toJSON==="function"){const n=r&&r.anchors&&r.anchors.get(e);if(n)r.onCreate=(e=>{n.res=e;delete r.onCreate});const s=e.toJSON(t,r);if(n&&r.onCreate)r.onCreate(s);return s}if((!r||!r.keep)&&typeof e==="bigint")return Number(e);return e}class Scalar extends Node{constructor(e){super();this.value=e}toJSON(e,t){return t&&t.keep?this.value:toJSON(this.value,e,t)}toString(){return String(this.value)}}function collectionFromPath(e,t,r){let n=r;for(let e=t.length-1;e>=0;--e){const r=t[e];const s=Number.isInteger(r)&&r>=0?[]:{};s[r]=n;n=s}return e.createNode(n,false)}const s=e=>e==null||typeof e==="object"&&e[Symbol.iterator]().next().done;class Collection extends Node{constructor(e){super();n._defineProperty(this,"items",[]);this.schema=e}addIn(e,t){if(s(e))this.add(t);else{const[r,...n]=e;const s=this.get(r,true);if(s instanceof Collection)s.addIn(n,t);else if(s===undefined&&this.schema)this.set(r,collectionFromPath(this.schema,n,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn([e,...t]){if(t.length===0)return this.delete(e);const r=this.get(e,true);if(r instanceof Collection)return r.deleteIn(t);else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`)}getIn([e,...t],r){const n=this.get(e,true);if(t.length===0)return!r&&n instanceof Scalar?n.value:n;else return n instanceof Collection?n.getIn(t,r):undefined}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return false;const t=e.value;return t==null||t instanceof Scalar&&t.value==null&&!t.commentBefore&&!t.comment&&!t.tag})}hasIn([e,...t]){if(t.length===0)return this.has(e);const r=this.get(e,true);return r instanceof Collection?r.hasIn(t):false}setIn([e,...t],r){if(t.length===0){this.set(e,r)}else{const n=this.get(e,true);if(n instanceof Collection)n.setIn(t,r);else if(n===undefined&&this.schema)this.set(e,collectionFromPath(this.schema,t,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${t}`)}}toJSON(){return null}toString(e,{blockItem:t,flowChars:r,isMap:s,itemIndent:i},o,a){const{indent:l,indentStep:c,stringify:f}=e;const u=this.type===n.Type.FLOW_MAP||this.type===n.Type.FLOW_SEQ||e.inFlow;if(u)i+=c;const h=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:h,indent:i,inFlow:u,type:null});let p=false;let d=false;const g=this.items.reduce((t,r,n)=>{let s;if(r){if(!p&&r.spaceBefore)t.push({type:"comment",str:""});if(r.commentBefore)r.commentBefore.match(/^.*$/gm).forEach(e=>{t.push({type:"comment",str:`#${e}`})});if(r.comment)s=r.comment;if(u&&(!p&&r.spaceBefore||r.commentBefore||r.comment||r.key&&(r.key.commentBefore||r.key.comment)||r.value&&(r.value.commentBefore||r.value.comment)))d=true}p=false;let o=f(r,e,()=>s=null,()=>p=true);if(u&&!d&&o.includes("\n"))d=true;if(u&&ne.str);if(d||n.reduce((e,t)=>e+t.length+2,2)>Collection.maxFlowStringSingleLineLength){w=e;for(const e of n){w+=e?`\n${c}${l}${e}`:"\n"}w+=`\n${l}${t}`}else{w=`${e} ${n.join(" ")} ${t}`}}else{const e=g.map(t);w=e.shift();for(const t of e)w+=t?`\n${l}${t}`:"\n"}if(this.comment){w+="\n"+this.comment.replace(/^/gm,`${l}#`);if(o)o()}else if(p&&a)a();return w}}n._defineProperty(Collection,"maxFlowStringSingleLineLength",60);function asItemIndex(e){let t=e instanceof Scalar?e.value:e;if(t&&typeof t==="string")t=Number(t);return Number.isInteger(t)&&t>=0?t:null}class YAMLSeq extends Collection{add(e){this.items.push(e)}delete(e){const t=asItemIndex(e);if(typeof t!=="number")return false;const r=this.items.splice(t,1);return r.length>0}get(e,t){const r=asItemIndex(e);if(typeof r!=="number")return undefined;const n=this.items[r];return!t&&n instanceof Scalar?n.value:n}has(e){const t=asItemIndex(e);return typeof t==="number"&&te.type==="comment"?e.str:`- ${e.str}`,flowChars:{start:"[",end:"]"},isMap:false,itemIndent:(e.indent||"")+" "},t,r)}}const i=(e,t,r)=>{if(t===null)return"";if(typeof t!=="object")return String(t);if(e instanceof Node&&r&&r.doc)return e.toString({anchors:{},doc:r.doc,indent:"",indentStep:r.indentStep,inFlow:true,inStringifyKey:true,stringify:r.stringify});return JSON.stringify(t)};class Pair extends Node{constructor(e,t=null){super();this.key=e;this.value=t;this.type=Pair.Type.PAIR}get commentBefore(){return this.key instanceof Node?this.key.commentBefore:undefined}set commentBefore(e){if(this.key==null)this.key=new Scalar(null);if(this.key instanceof Node)this.key.commentBefore=e;else{const e="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(e)}}addToJSMap(e,t){const r=toJSON(this.key,"",e);if(t instanceof Map){const n=toJSON(this.value,r,e);t.set(r,n)}else if(t instanceof Set){t.add(r)}else{const n=i(this.key,r,e);t[n]=toJSON(this.value,n,e)}return t}toJSON(e,t){const r=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,r)}toString(e,t,r){if(!e||!e.doc)return JSON.stringify(this);const{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options;let{key:a,value:l}=this;let c=a instanceof Node&&a.comment;if(o){if(c){throw new Error("With simple keys, key nodes cannot have comments")}if(a instanceof Collection){const e="With simple keys, collection cannot be used as a key value";throw new Error(e)}}const f=!o&&(!a||c||a instanceof Collection||a.type===n.Type.BLOCK_FOLDED||a.type===n.Type.BLOCK_LITERAL);const{doc:u,indent:h,indentStep:p,stringify:d}=e;e=Object.assign({},e,{implicitKey:!f,indent:h+p});let g=false;let w=d(a,e,()=>c=null,()=>g=true);w=addComment(w,e.indent,c);if(e.allNullValues&&!o){if(this.comment){w=addComment(w,e.indent,this.comment);if(t)t()}else if(g&&!c&&r)r();return e.inFlow?w:`? ${w}`}w=f?`? ${w}\n${h}:`:`${w}:`;if(this.comment){w=addComment(w,e.indent,this.comment);if(t)t()}let y="";let m=null;if(l instanceof Node){if(l.spaceBefore)y="\n";if(l.commentBefore){const t=l.commentBefore.replace(/^/gm,`${e.indent}#`);y+=`\n${t}`}m=l.comment}else if(l&&typeof l==="object"){l=u.schema.createNode(l,true)}e.implicitKey=false;if(!f&&!this.comment&&l instanceof Scalar)e.indentAtStart=w.length+1;g=false;if(!i&&s>=2&&!e.inFlow&&!f&&l instanceof YAMLSeq&&l.type!==n.Type.FLOW_SEQ&&!l.tag&&!u.anchors.getName(l)){e.indent=e.indent.substr(2)}const S=d(l,e,()=>m=null,()=>g=true);let b=" ";if(y||this.comment){b=`${y}\n${e.indent}`}else if(!f&&l instanceof Collection){const t=S[0]==="["||S[0]==="{";if(!t||S.includes("\n"))b=`\n${e.indent}`}if(g&&!m&&r)r();return addComment(w+b+S,e.indent,m)}}n._defineProperty(Pair,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});const o=(e,t)=>{if(e instanceof Alias){const r=t.get(e.source);return r.count*r.aliasCount}else if(e instanceof Collection){let r=0;for(const n of e.items){const e=o(n,t);if(e>r)r=e}return r}else if(e instanceof Pair){const r=o(e.key,t);const n=o(e.value,t);return Math.max(r,n)}return 1};class Alias extends Node{static stringify({range:e,source:t},{anchors:r,doc:n,implicitKey:s,inStringifyKey:i}){let o=Object.keys(r).find(e=>r[e]===t);if(!o&&i)o=n.anchors.getName(t)||n.anchors.newName();if(o)return`*${o}${s?" ":""}`;const a=n.anchors.getName(t)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${a} [${e}]`)}constructor(e){super();this.source=e;this.type=n.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,t){if(!t)return toJSON(this.source,e,t);const{anchors:r,maxAliasCount:s}=t;const i=r.get(this.source);if(!i||i.res===undefined){const e="This should not happen: Alias anchor was not resolved?";if(this.cstNode)throw new n.YAMLReferenceError(this.cstNode,e);else throw new ReferenceError(e)}if(s>=0){i.count+=1;if(i.aliasCount===0)i.aliasCount=o(this.source,r);if(i.count*i.aliasCount>s){const e="Excessive alias count indicates a resource exhaustion attack";if(this.cstNode)throw new n.YAMLReferenceError(this.cstNode,e);else throw new ReferenceError(e)}}return i.res}toString(e){return Alias.stringify(this,e)}}n._defineProperty(Alias,"default",true);function findPair(e,t){const r=t instanceof Scalar?t.value:t;for(const n of e){if(n instanceof Pair){if(n.key===t||n.key===r)return n;if(n.key&&n.key.value===r)return n}}return undefined}class YAMLMap extends Collection{add(e,t){if(!e)e=new Pair(e);else if(!(e instanceof Pair))e=new Pair(e.key||e,e.value);const r=findPair(this.items,e.key);const n=this.schema&&this.schema.sortMapEntries;if(r){if(t)r.value=e.value;else throw new Error(`Key ${e.key} already set`)}else if(n){const t=this.items.findIndex(t=>n(e,t)<0);if(t===-1)this.items.push(e);else this.items.splice(t,0,e)}else{this.items.push(e)}}delete(e){const t=findPair(this.items,e);if(!t)return false;const r=this.items.splice(this.items.indexOf(t),1);return r.length>0}get(e,t){const r=findPair(this.items,e);const n=r&&r.value;return!t&&n instanceof Scalar?n.value:n}has(e){return!!findPair(this.items,e)}set(e,t){this.add(new Pair(e,t),true)}toJSON(e,t,r){const n=r?new r:t&&t.mapAsMap?new Map:{};if(t&&t.onCreate)t.onCreate(n);for(const e of this.items)e.addToJSMap(t,n);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items){if(!(e instanceof Pair))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`)}return super.toString(e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},isMap:true,itemIndent:e.indent||""},t,r)}}const a="<<";class Merge extends Pair{constructor(e){if(e instanceof Pair){let t=e.value;if(!(t instanceof YAMLSeq)){t=new YAMLSeq;t.items.push(e.value);t.range=e.value.range}super(e.key,t);this.range=e.range}else{super(new Scalar(a),new YAMLSeq)}this.type=Pair.Type.MERGE_PAIR}addToJSMap(e,t){for(const{source:r}of this.value.items){if(!(r instanceof YAMLMap))throw new Error("Merge sources must be maps");const n=r.toJSON(null,e,Map);for(const[e,r]of n){if(t instanceof Map){if(!t.has(e))t.set(e,r)}else if(t instanceof Set){t.add(e)}else{if(!Object.prototype.hasOwnProperty.call(t,e))t[e]=r}}}return t}toString(e,t){const r=this.value;if(r.items.length>1)return super.toString(e,t);this.value=r.items[0];const n=super.toString(e,t);this.value=r;return n}}const l={defaultType:n.Type.BLOCK_LITERAL,lineWidth:76};const c={trueStr:"true",falseStr:"false"};const f={asBigInt:false};const u={nullStr:"null"};const h={defaultType:n.Type.PLAIN,doubleQuoted:{jsonEncoding:false,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function resolveScalar(e,t,r){for(const{format:r,test:n,resolve:s}of t){if(n){const t=e.match(n);if(t){let e=s.apply(null,t);if(!(e instanceof Scalar))e=new Scalar(e);if(r)e.format=r;return e}}}if(r)e=r(e);return new Scalar(e)}const p="flow";const d="block";const g="quoted";const w=(e,t)=>{let r=e[t+1];while(r===" "||r==="\t"){do{r=e[t+=1]}while(r&&r!=="\n");r=e[t+1]}return t};function foldFlowLines(e,t,r,{indentAtStart:n,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return e;const l=Math.max(1+i,1+s-t.length);if(e.length<=l)return e;const c=[];const f={};let u=s-(typeof n==="number"?n:t.length);let h=undefined;let p=undefined;let y=false;let m=-1;if(r===d){m=w(e,m);if(m!==-1)u=m+l}for(let t;t=e[m+=1];){if(r===g&&t==="\\"){switch(e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}}if(t==="\n"){if(r===d)m=w(e,m);u=m+l;h=undefined}else{if(t===" "&&p&&p!==" "&&p!=="\n"&&p!=="\t"){const t=e[m+1];if(t&&t!==" "&&t!=="\n"&&t!=="\t")h=m}if(m>=u){if(h){c.push(h);u=h+l;h=undefined}else if(r===g){while(p===" "||p==="\t"){p=t;t=e[m+=1];y=true}c.push(m-2);f[m-2]=true;u=m-2+l;h=undefined}else{y=true}}}p=t}if(y&&a)a();if(c.length===0)return e;if(o)o();let S=e.slice(0,c[0]);for(let n=0;ne?Object.assign({indentAtStart:e},h.fold):h.fold;const m=e=>/^(%|---|\.\.\.)/m.test(e);function lineLengthOverLimit(e,t){const r=e.length;if(r<=t)return false;for(let n=0,s=0;nt)return true;s=n+1;if(r-s<=t)return false}}return true}function doubleQuotedString(e,t){const{implicitKey:r}=t;const{jsonEncoding:n,minMultiLineLength:s}=h.doubleQuoted;const i=JSON.stringify(e);if(n)return i;const o=t.indent||(m(e)?" ":"");let a="";let l=0;for(let e=0,t=i[e];t;t=i[++e]){if(t===" "&&i[e+1]==="\\"&&i[e+2]==="n"){a+=i.slice(l,e)+"\\ ";e+=1;l=e;t="\\"}if(t==="\\")switch(i[e+1]){case"u":{a+=i.slice(l,e);const t=i.substr(e+2,4);switch(t){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:if(t.substr(0,2)==="00")a+="\\x"+t.substr(2);else a+=i.substr(e,6)}e+=5;l=e+1}break;case"n":if(r||i[e+2]==='"'||i.length";if(!r)return f+"\n";let u="";let p="";r=r.replace(/[\n\t ]*$/,e=>{const t=e.indexOf("\n");if(t===-1){f+="-"}else if(r===e||t!==e.length-1){f+="+";if(o)o()}p=e.replace(/\n$/,"");return""}).replace(/^[\n ]*/,e=>{if(e.indexOf(" ")!==-1)f+=l;const t=e.match(/ +$/);if(t){u=e.slice(0,-t[0].length);return t[0]}else{u=e;return""}});if(p)p=p.replace(/\n+(?!\n|$)/g,`$&${a}`);if(u)u=u.replace(/\n+/g,`$&${a}`);if(e){f+=" #"+e.replace(/ ?[\r\n]+/g," ");if(i)i()}if(!r)return`${f}${l}\n${a}${p}`;if(c){r=r.replace(/\n+/g,`$&${a}`);return`${f}\n${a}${u}${r}${p}`}r=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${a}`);const g=foldFlowLines(`${u}${r}${p}`,a,d,h.fold);return`${f}\n${a}${g}`}function plainString(e,t,r,s){const{comment:i,type:o,value:a}=e;const{actualString:l,implicitKey:c,indent:f,inFlow:u}=t;if(c&&/[\n[\]{},]/.test(a)||u&&/[[\]{},]/.test(a)){return doubleQuotedString(a,t)}if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)){return c||u||a.indexOf("\n")===-1?a.indexOf('"')!==-1&&a.indexOf("'")===-1?singleQuotedString(a,t):doubleQuotedString(a,t):blockString(e,t,r,s)}if(!c&&!u&&o!==n.Type.PLAIN&&a.indexOf("\n")!==-1){return blockString(e,t,r,s)}if(f===""&&m(a)){t.forceBlockIndent=true;return blockString(e,t,r,s)}const h=a.replace(/\n+/g,`$&\n${f}`);if(l){const{tags:e}=t.doc.schema;const r=resolveScalar(h,e,e.scalarFallback).value;if(typeof r!=="string")return doubleQuotedString(a,t)}const d=c?h:foldFlowLines(h,f,p,y(t));if(i&&!u&&(d.indexOf("\n")!==-1||i.indexOf("\n")!==-1)){if(r)r();return addCommentBefore(d,f,i)}return d}function stringifyString(e,t,r,s){const{defaultType:i}=h;const{implicitKey:o,inFlow:a}=t;let{type:l,value:c}=e;if(typeof c!=="string"){c=String(c);e=Object.assign({},e,{value:c})}const f=i=>{switch(i){case n.Type.BLOCK_FOLDED:case n.Type.BLOCK_LITERAL:return blockString(e,t,r,s);case n.Type.QUOTE_DOUBLE:return doubleQuotedString(c,t);case n.Type.QUOTE_SINGLE:return singleQuotedString(c,t);case n.Type.PLAIN:return plainString(e,t,r,s);default:return null}};if(l!==n.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)){l=n.Type.QUOTE_DOUBLE}else if((o||a)&&(l===n.Type.BLOCK_FOLDED||l===n.Type.BLOCK_LITERAL)){l=n.Type.QUOTE_DOUBLE}let u=f(l);if(u===null){u=f(i);if(u===null)throw new Error(`Unsupported default string type ${i}`)}return u}function stringifyNumber({format:e,minFractionDigits:t,tag:r,value:n}){if(typeof n==="bigint")return String(n);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let s=JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let e=s.indexOf(".");if(e<0){e=s.length;s+="."}let r=t-(s.length-e-1);while(r-- >0)s+="0"}return s}function checkFlowCollectionEnd(e,t){let r,s;switch(t.type){case n.Type.FLOW_MAP:r="}";s="flow map";break;case n.Type.FLOW_SEQ:r="]";s="flow sequence";break;default:e.push(new n.YAMLSemanticError(t,"Not a flow collection!?"));return}let i;for(let e=t.items.length-1;e>=0;--e){const r=t.items[e];if(!r||r.type!==n.Type.COMMENT){i=r;break}}if(i&&i.char!==r){const o=`Expected ${s} to end with ${r}`;let a;if(typeof i.offset==="number"){a=new n.YAMLSemanticError(t,o);a.offset=i.offset+1}else{a=new n.YAMLSemanticError(i,o);if(i.range&&i.range.end)a.offset=i.range.end-i.range.start}e.push(a)}}function checkFlowCommentSpace(e,t){const r=t.context.src[t.range.start-1];if(r!=="\n"&&r!=="\t"&&r!==" "){const r="Comments must be separated from other tokens by white space characters";e.push(new n.YAMLSemanticError(t,r))}}function getLongKeyError(e,t){const r=String(t);const s=r.substr(0,8)+"..."+r.substr(-8);return new n.YAMLSemanticError(e,`The "${s}" key is too long`)}function resolveComments(e,t){for(const{afterKey:r,before:n,comment:s}of t){let t=e.items[n];if(!t){if(s!==undefined){if(e.comment)e.comment+="\n"+s;else e.comment=s}}else{if(r&&t.value)t=t.value;if(s===undefined){if(r||!t.commentBefore)t.spaceBefore=true}else{if(t.commentBefore)t.commentBefore+="\n"+s;else t.commentBefore=s}}}}function resolveString(e,t){const r=t.strValue;if(!r)return"";if(typeof r==="string")return r;r.errors.forEach(r=>{if(!r.source)r.source=t;e.errors.push(r)});return r.str}function resolveTagHandle(e,t){const{handle:r,suffix:s}=t.tag;let i=e.tagPrefixes.find(e=>e.handle===r);if(!i){const s=e.getDefaults().tagPrefixes;if(s)i=s.find(e=>e.handle===r);if(!i)throw new n.YAMLSemanticError(t,`The ${r} tag handle is non-default and was not declared.`)}if(!s)throw new n.YAMLSemanticError(t,`The ${r} tag has no suffix.`);if(r==="!"&&(e.version||e.options.version)==="1.0"){if(s[0]==="^"){e.warnings.push(new n.YAMLWarning(t,"YAML 1.0 ^ tag expansion is not supported"));return s}if(/[:/]/.test(s)){const e=s.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${s}`}}return i.prefix+decodeURIComponent(s)}function resolveTagName(e,t){const{tag:r,type:s}=t;let i=false;if(r){const{handle:s,suffix:o,verbatim:a}=r;if(a){if(a!=="!"&&a!=="!!")return a;const r=`Verbatim tags aren't resolved, so ${a} is invalid.`;e.errors.push(new n.YAMLSemanticError(t,r))}else if(s==="!"&&!o){i=true}else{try{return resolveTagHandle(e,t)}catch(t){e.errors.push(t)}}}switch(s){case n.Type.BLOCK_FOLDED:case n.Type.BLOCK_LITERAL:case n.Type.QUOTE_DOUBLE:case n.Type.QUOTE_SINGLE:return n.defaultTags.STR;case n.Type.FLOW_MAP:case n.Type.MAP:return n.defaultTags.MAP;case n.Type.FLOW_SEQ:case n.Type.SEQ:return n.defaultTags.SEQ;case n.Type.PLAIN:return i?n.defaultTags.STR:null;default:return null}}function resolveByTagName(e,t,r){const{tags:n}=e.schema;const s=[];for(const i of n){if(i.tag===r){if(i.test)s.push(i);else{const r=i.resolve(e,t);return r instanceof Collection?r:new Scalar(r)}}}const i=resolveString(e,t);if(typeof i==="string"&&s.length>0)return resolveScalar(i,s,n.scalarFallback);return null}function getFallbackTagName({type:e}){switch(e){case n.Type.FLOW_MAP:case n.Type.MAP:return n.defaultTags.MAP;case n.Type.FLOW_SEQ:case n.Type.SEQ:return n.defaultTags.SEQ;default:return n.defaultTags.STR}}function resolveTag(e,t,r){try{const n=resolveByTagName(e,t,r);if(n){if(r&&t.tag)n.tag=r;return n}}catch(r){if(!r.source)r.source=t;e.errors.push(r);return null}try{const s=getFallbackTagName(t);if(!s)throw new Error(`The tag ${r} is unavailable`);const i=`The tag ${r} is unavailable, falling back to ${s}`;e.warnings.push(new n.YAMLWarning(t,i));const o=resolveByTagName(e,t,s);o.tag=r;return o}catch(r){const s=new n.YAMLReferenceError(t,r.message);s.stack=r.stack;e.errors.push(s);return null}}const S=e=>{if(!e)return false;const{type:t}=e;return t===n.Type.MAP_KEY||t===n.Type.MAP_VALUE||t===n.Type.SEQ_ITEM};function resolveNodeProps(e,t){const r={before:[],after:[]};let s=false;let i=false;const o=S(t.context.parent)?t.context.parent.props.concat(t.props):t.props;for(const{start:a,end:l}of o){switch(t.context.src[a]){case n.Char.COMMENT:{if(!t.commentHasRequiredWhitespace(a)){const r="Comments must be separated from other tokens by white space characters";e.push(new n.YAMLSemanticError(t,r))}const{header:s,valueRange:i}=t;const o=i&&(a>i.start||s&&a>s.start)?r.after:r.before;o.push(t.context.src.slice(a+1,l));break}case n.Char.ANCHOR:if(s){const r="A node can have at most one anchor";e.push(new n.YAMLSemanticError(t,r))}s=true;break;case n.Char.TAG:if(i){const r="A node can have at most one tag";e.push(new n.YAMLSemanticError(t,r))}i=true;break}}return{comments:r,hasAnchor:s,hasTag:i}}function resolveNodeValue(e,t){const{anchors:r,errors:s,schema:i}=e;if(t.type===n.Type.ALIAS){const e=t.rawValue;const i=r.getNode(e);if(!i){const r=`Aliased anchor not found: ${e}`;s.push(new n.YAMLReferenceError(t,r));return null}const o=new Alias(i);r._cstAliases.push(o);return o}const o=resolveTagName(e,t);if(o)return resolveTag(e,t,o);if(t.type!==n.Type.PLAIN){const e=`Failed to resolve ${t.type} node here`;s.push(new n.YAMLSyntaxError(t,e));return null}try{const r=resolveString(e,t);return resolveScalar(r,i.tags,i.tags.scalarFallback)}catch(e){if(!e.source)e.source=t;s.push(e);return null}}function resolveNode(e,t){if(!t)return null;if(t.error)e.errors.push(t.error);const{comments:r,hasAnchor:s,hasTag:i}=resolveNodeProps(e.errors,t);if(s){const{anchors:r}=e;const n=t.anchor;const s=r.getNode(n);if(s)r.map[r.newName(n)]=s;r.map[n]=t}if(t.type===n.Type.ALIAS&&(s||i)){const r="An alias node must not specify any properties";e.errors.push(new n.YAMLSemanticError(t,r))}const o=resolveNodeValue(e,t);if(o){o.range=[t.range.start,t.range.end];if(e.options.keepCstNodes)o.cstNode=t;if(e.options.keepNodeTypes)o.type=t.type;const n=r.before.join("\n");if(n){o.commentBefore=o.commentBefore?`${o.commentBefore}\n${n}`:n}const s=r.after.join("\n");if(s)o.comment=o.comment?`${o.comment}\n${s}`:s}return t.resolved=o}function resolveMap(e,t){if(t.type!==n.Type.MAP&&t.type!==n.Type.FLOW_MAP){const r=`A ${t.type} node cannot be resolved as a mapping`;e.errors.push(new n.YAMLSyntaxError(t,r));return null}const{comments:r,items:s}=t.type===n.Type.FLOW_MAP?resolveFlowMapItems(e,t):resolveBlockMapItems(e,t);const i=new YAMLMap;i.items=s;resolveComments(i,r);let o=false;for(let r=0;r{if(e instanceof Alias){const{type:t}=e.source;if(t===n.Type.MAP||t===n.Type.FLOW_MAP)return false;return o="Merge nodes aliases can only point to maps"}return o="Merge nodes can only have Alias nodes as values"});if(o)e.errors.push(new n.YAMLSemanticError(t,o))}else{for(let o=r+1;o{if(s.length===0)return false;const{start:i}=s[0];if(t&&i>t.valueRange.start)return false;if(r[i]!==n.Char.COMMENT)return false;for(let t=e;t0){r=new n.PlainValue(n.Type.PLAIN,[]);r.context={parent:l,src:l.context.src};const e=l.range.start+1;r.range={start:e,end:e};r.valueRange={start:e,end:e};if(typeof l.range.origStart==="number"){const e=l.range.origStart+1;r.range.origStart=r.range.origEnd=e;r.valueRange.origStart=r.valueRange.origEnd=e}}const a=new Pair(i,resolveNode(e,r));resolvePairComment(l,a);s.push(a);if(i&&typeof o==="number"){if(l.range.start>o+1024)e.errors.push(getLongKeyError(t,i))}i=undefined;o=null}break;default:if(i!==undefined)s.push(new Pair(i));i=resolveNode(e,l);o=l.range.start;if(l.error)e.errors.push(l.error);e:for(let r=a+1;;++r){const s=t.items[r];switch(s&&s.type){case n.Type.BLANK_LINE:case n.Type.COMMENT:continue e;case n.Type.MAP_VALUE:break e;default:{const t="Implicit map keys need to be followed by map values";e.errors.push(new n.YAMLSemanticError(l,t));break e}}}if(l.valueRangeContainsNewline){const t="Implicit map keys need to be on a single line";e.errors.push(new n.YAMLSemanticError(l,t))}}}if(i!==undefined)s.push(new Pair(i));return{comments:r,items:s}}function resolveFlowMapItems(e,t){const r=[];const s=[];let i=undefined;let o=false;let a="{";for(let l=0;le instanceof Pair&&e.key instanceof Collection)){const r="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new n.YAMLWarning(t,r))}t.resolved=i;return i}function resolveBlockSeqItems(e,t){const r=[];const s=[];for(let i=0;ia+1024)e.errors.push(getLongKeyError(t,o));const{src:s}=c.context;for(let t=a;t{"use strict";var n=r(6580);var s=r(390);const i={identify:e=>e instanceof Uint8Array,default:false,tag:"tag:yaml.org,2002:binary",resolve:(e,t)=>{const r=s.resolveString(e,t);if(typeof Buffer==="function"){return Buffer.from(r,"base64")}else if(typeof atob==="function"){const e=atob(r.replace(/[\n\r]/g,""));const t=new Uint8Array(e.length);for(let r=0;r{let l;if(typeof Buffer==="function"){l=r instanceof Buffer?r.toString("base64"):Buffer.from(r.buffer).toString("base64")}else if(typeof btoa==="function"){let e="";for(let t=0;t1){const e="Each pair must have its own sequence indicator";throw new n.YAMLSemanticError(t,e)}const e=i.items[0]||new s.Pair;if(i.commentBefore)e.commentBefore=e.commentBefore?`${i.commentBefore}\n${e.commentBefore}`:i.commentBefore;if(i.comment)e.comment=e.comment?`${i.comment}\n${e.comment}`:i.comment;i=e}r.items[e]=i instanceof s.Pair?i:new s.Pair(i)}return r}function createPairs(e,t,r){const n=new s.YAMLSeq(e);n.tag="tag:yaml.org,2002:pairs";for(const s of t){let t,i;if(Array.isArray(s)){if(s.length===2){t=s[0];i=s[1]}else throw new TypeError(`Expected [key, value] tuple: ${s}`)}else if(s&&s instanceof Object){const e=Object.keys(s);if(e.length===1){t=e[0];i=s[t]}else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else{t=s}const o=e.createPair(t,i,r);n.items.push(o)}return n}const o={default:false,tag:"tag:yaml.org,2002:pairs",resolve:parsePairs,createNode:createPairs};class YAMLOMap extends s.YAMLSeq{constructor(){super();n._defineProperty(this,"add",s.YAMLMap.prototype.add.bind(this));n._defineProperty(this,"delete",s.YAMLMap.prototype.delete.bind(this));n._defineProperty(this,"get",s.YAMLMap.prototype.get.bind(this));n._defineProperty(this,"has",s.YAMLMap.prototype.has.bind(this));n._defineProperty(this,"set",s.YAMLMap.prototype.set.bind(this));this.tag=YAMLOMap.tag}toJSON(e,t){const r=new Map;if(t&&t.onCreate)t.onCreate(r);for(const e of this.items){let n,i;if(e instanceof s.Pair){n=s.toJSON(e.key,"",t);i=s.toJSON(e.value,n,t)}else{n=s.toJSON(e,"",t)}if(r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,i)}return r}}n._defineProperty(YAMLOMap,"tag","tag:yaml.org,2002:omap");function parseOMap(e,t){const r=parsePairs(e,t);const i=[];for(const{key:e}of r.items){if(e instanceof s.Scalar){if(i.includes(e.value)){const e="Ordered maps must not include duplicate keys";throw new n.YAMLSemanticError(t,e)}else{i.push(e.value)}}}return Object.assign(new YAMLOMap,r)}function createOMap(e,t,r){const n=createPairs(e,t,r);const s=new YAMLOMap;s.items=n.items;return s}const a={identify:e=>e instanceof Map,nodeClass:YAMLOMap,default:false,tag:"tag:yaml.org,2002:omap",resolve:parseOMap,createNode:createOMap};class YAMLSet extends s.YAMLMap{constructor(){super();this.tag=YAMLSet.tag}add(e){const t=e instanceof s.Pair?e:new s.Pair(e);const r=s.findPair(this.items,t.key);if(!r)this.items.push(t)}get(e,t){const r=s.findPair(this.items,e);return!t&&r instanceof s.Pair?r.key instanceof s.Scalar?r.key.value:r.key:r}set(e,t){if(typeof t!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const r=s.findPair(this.items,e);if(r&&!t){this.items.splice(this.items.indexOf(r),1)}else if(!r&&t){this.items.push(new s.Pair(e))}}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,r);else throw new Error("Set items must all have null values")}}n._defineProperty(YAMLSet,"tag","tag:yaml.org,2002:set");function parseSet(e,t){const r=s.resolveMap(e,t);if(!r.hasAllNullValues())throw new n.YAMLSemanticError(t,"Set items must all have null values");return Object.assign(new YAMLSet,r)}function createSet(e,t,r){const n=new YAMLSet;for(const s of t)n.items.push(e.createPair(s,null,r));return n}const l={identify:e=>e instanceof Set,nodeClass:YAMLSet,default:false,tag:"tag:yaml.org,2002:set",resolve:parseSet,createNode:createSet};const c=(e,t)=>{const r=t.split(":").reduce((e,t)=>e*60+Number(t),0);return e==="-"?-r:r};const f=({value:e})=>{if(isNaN(e)||!isFinite(e))return s.stringifyNumber(e);let t="";if(e<0){t="-";e=Math.abs(e)}const r=[e%60];if(e<60){r.unshift(0)}else{e=Math.round((e-r[0])/60);r.unshift(e%60);if(e>=60){e=Math.round((e-r[0])/60);r.unshift(e)}}return t+r.map(e=>e<10?"0"+String(e):String(e)).join(":").replace(/000000\d*$/,"")};const u={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,r)=>c(t,r.replace(/_/g,"")),stringify:f};const h={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(e,t,r)=>c(t,r.replace(/_/g,"")),stringify:f};const p={identify:e=>e instanceof Date,default:true,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:(e,t,r,n,s,i,o,a,l)=>{if(a)a=(a+"00").substr(1,3);let f=Date.UTC(t,r-1,n,s||0,i||0,o||0,a||0);if(l&&l!=="Z"){let e=c(l[0],l.slice(1));if(Math.abs(e)<30)e*=60;f-=6e4*e}return new Date(f)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function shouldWarn(e){const t=typeof process!=="undefined"&&process.env||{};if(e){if(typeof YAML_SILENCE_DEPRECATION_WARNINGS!=="undefined")return!YAML_SILENCE_DEPRECATION_WARNINGS;return!t.YAML_SILENCE_DEPRECATION_WARNINGS}if(typeof YAML_SILENCE_WARNINGS!=="undefined")return!YAML_SILENCE_WARNINGS;return!t.YAML_SILENCE_WARNINGS}function warn(e,t){if(shouldWarn(false)){const r=typeof process!=="undefined"&&process.emitWarning;if(r)r(e,t);else{console.warn(t?`${t}: ${e}`:e)}}}function warnFileDeprecation(e){if(shouldWarn(true)){const t=e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");warn(`The endpoint 'yaml/${t}' will be removed in a future release.`,"DeprecationWarning")}}const d={};function warnOptionDeprecation(e,t){if(!d[e]&&shouldWarn(true)){d[e]=true;let r=`The option '${e}' will be removed in a future release`;r+=t?`, use '${t}' instead.`:".";warn(r,"DeprecationWarning")}}t.binary=i;t.floatTime=h;t.intTime=u;t.omap=a;t.pairs=o;t.set=l;t.timestamp=p;t.warn=warn;t.warnFileDeprecation=warnFileDeprecation;t.warnOptionDeprecation=warnOptionDeprecation},1310:(e,t,r)=>{e.exports=r(4884).YAML},4638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Explorer=void 0;var n=_interopRequireDefault(r(5622));var s=r(4135);var i=r(1238);var o=r(6905);var a=r(6427);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class Explorer extends s.ExplorerBase{constructor(e){super(e)}async search(e=process.cwd()){const t=await(0,a.getDirectory)(e);const r=await this.searchFromDirectory(t);return r}async searchFromDirectory(e){const t=n.default.resolve(process.cwd(),e);const r=async()=>{const e=await this.searchDirectory(t);const r=this.nextDirectoryToSearch(t,e);if(r){return this.searchFromDirectory(r)}const n=await this.config.transform(e);return n};if(this.searchCache){return(0,o.cacheWrapper)(this.searchCache,t,r)}return r()}async searchDirectory(e){for await(const t of this.config.searchPlaces){const r=await this.loadSearchPlace(e,t);if(this.shouldSearchStopWithResult(r)===true){return r}}return null}async loadSearchPlace(e,t){const r=n.default.join(e,t);const s=await(0,i.readFile)(r);const o=await this.createCosmiconfigResult(r,s);return o}async loadFileContent(e,t){if(t===null){return null}if(t.trim()===""){return undefined}const r=this.getLoaderEntryForFile(e);const n=await r(e,t);return n}async createCosmiconfigResult(e,t){const r=await this.loadFileContent(e,t);const n=this.loadedContentToCosmiconfigResult(e,r);return n}async load(e){this.validateFilePath(e);const t=n.default.resolve(process.cwd(),e);const r=async()=>{const e=await(0,i.readFile)(t,{throwNotFound:true});const r=await this.createCosmiconfigResult(t,e);const n=await this.config.transform(r);return n};if(this.loadCache){return(0,o.cacheWrapper)(this.loadCache,t,r)}return r()}}t.Explorer=Explorer},4135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getExtensionDescription=getExtensionDescription;t.ExplorerBase=void 0;var n=_interopRequireDefault(r(5622));var s=r(8751);var i=r(1719);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class ExplorerBase{constructor(e){if(e.cache===true){this.loadCache=new Map;this.searchCache=new Map}this.config=e;this.validateConfig()}clearLoadCache(){if(this.loadCache){this.loadCache.clear()}}clearSearchCache(){if(this.searchCache){this.searchCache.clear()}}clearCaches(){this.clearLoadCache();this.clearSearchCache()}validateConfig(){const e=this.config;e.searchPlaces.forEach(t=>{const r=n.default.extname(t)||"noExt";const s=e.loaders[r];if(!s){throw new Error(`No loader specified for ${getExtensionDescription(t)}, so searchPlaces item "${t}" is invalid`)}if(typeof s!=="function"){throw new Error(`loader for ${getExtensionDescription(t)} is not a function (type provided: "${typeof s}"), so searchPlaces item "${t}" is invalid`)}})}shouldSearchStopWithResult(e){if(e===null)return false;if(e.isEmpty&&this.config.ignoreEmptySearchPlaces)return false;return true}nextDirectoryToSearch(e,t){if(this.shouldSearchStopWithResult(t)){return null}const r=nextDirUp(e);if(r===e||e===this.config.stopDir){return null}return r}loadPackageProp(e,t){const r=s.loaders.loadJson(e,t);const n=(0,i.getPropertyByPath)(r,this.config.packageProp);return n||null}getLoaderEntryForFile(e){if(n.default.basename(e)==="package.json"){const e=this.loadPackageProp.bind(this);return e}const t=n.default.extname(e)||"noExt";const r=this.config.loaders[t];if(!r){throw new Error(`No loader specified for ${getExtensionDescription(e)}`)}return r}loadedContentToCosmiconfigResult(e,t){if(t===null){return null}if(t===undefined){return{filepath:e,config:undefined,isEmpty:true}}return{config:t,filepath:e}}validateFilePath(e){if(!e){throw new Error("load must pass a non-empty string")}}}t.ExplorerBase=ExplorerBase;function nextDirUp(e){return n.default.dirname(e)}function getExtensionDescription(e){const t=n.default.extname(e);return t?`extension "${t}"`:"files without extensions"}},6239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ExplorerSync=void 0;var n=_interopRequireDefault(r(5622));var s=r(4135);var i=r(1238);var o=r(6905);var a=r(6427);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class ExplorerSync extends s.ExplorerBase{constructor(e){super(e)}searchSync(e=process.cwd()){const t=(0,a.getDirectorySync)(e);const r=this.searchFromDirectorySync(t);return r}searchFromDirectorySync(e){const t=n.default.resolve(process.cwd(),e);const r=()=>{const e=this.searchDirectorySync(t);const r=this.nextDirectoryToSearch(t,e);if(r){return this.searchFromDirectorySync(r)}const n=this.config.transform(e);return n};if(this.searchCache){return(0,o.cacheWrapperSync)(this.searchCache,t,r)}return r()}searchDirectorySync(e){for(const t of this.config.searchPlaces){const r=this.loadSearchPlaceSync(e,t);if(this.shouldSearchStopWithResult(r)===true){return r}}return null}loadSearchPlaceSync(e,t){const r=n.default.join(e,t);const s=(0,i.readFileSync)(r);const o=this.createCosmiconfigResultSync(r,s);return o}loadFileContentSync(e,t){if(t===null){return null}if(t.trim()===""){return undefined}const r=this.getLoaderEntryForFile(e);const n=r(e,t);return n}createCosmiconfigResultSync(e,t){const r=this.loadFileContentSync(e,t);const n=this.loadedContentToCosmiconfigResult(e,r);return n}loadSync(e){this.validateFilePath(e);const t=n.default.resolve(process.cwd(),e);const r=()=>{const e=(0,i.readFileSync)(t,{throwNotFound:true});const r=this.createCosmiconfigResultSync(t,e);const n=this.config.transform(r);return n};if(this.loadCache){return(0,o.cacheWrapperSync)(this.loadCache,t,r)}return r()}}t.ExplorerSync=ExplorerSync},6905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cacheWrapper=cacheWrapper;t.cacheWrapperSync=cacheWrapperSync;async function cacheWrapper(e,t,r){const n=e.get(t);if(n!==undefined){return n}const s=await r();e.set(t,s);return s}function cacheWrapperSync(e,t,r){const n=e.get(t);if(n!==undefined){return n}const s=r();e.set(t,s);return s}},6427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getDirectory=getDirectory;t.getDirectorySync=getDirectorySync;var n=_interopRequireDefault(r(5622));var s=r(3433);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}async function getDirectory(e){const t=await(0,s.isDirectory)(e);if(t===true){return e}const r=n.default.dirname(e);return r}function getDirectorySync(e){const t=(0,s.isDirectorySync)(e);if(t===true){return e}const r=n.default.dirname(e);return r}},1719:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getPropertyByPath=getPropertyByPath;function getPropertyByPath(e,t){if(typeof t==="string"&&Object.prototype.hasOwnProperty.call(e,t)){return e[t]}const r=typeof t==="string"?t.split("."):t;return r.reduce((e,t)=>{if(e===undefined){return e}return e[t]},e)}},4066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.cosmiconfig=cosmiconfig;t.cosmiconfigSync=cosmiconfigSync;t.defaultLoaders=void 0;var n=_interopRequireDefault(r(2087));var s=r(4638);var i=r(6239);var o=r(8751);var a=r(1943);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cosmiconfig(e,t={}){const r=normalizeOptions(e,t);const n=new s.Explorer(r);return{search:n.search.bind(n),load:n.load.bind(n),clearLoadCache:n.clearLoadCache.bind(n),clearSearchCache:n.clearSearchCache.bind(n),clearCaches:n.clearCaches.bind(n)}}function cosmiconfigSync(e,t={}){const r=normalizeOptions(e,t);const n=new i.ExplorerSync(r);return{search:n.searchSync.bind(n),load:n.loadSync.bind(n),clearLoadCache:n.clearLoadCache.bind(n),clearSearchCache:n.clearSearchCache.bind(n),clearCaches:n.clearCaches.bind(n)}}const l=Object.freeze({".cjs":o.loaders.loadJs,".js":o.loaders.loadJs,".json":o.loaders.loadJson,".yaml":o.loaders.loadYaml,".yml":o.loaders.loadYaml,noExt:o.loaders.loadYaml});t.defaultLoaders=l;const c=function identity(e){return e};function normalizeOptions(e,t){const r={packageProp:e,searchPlaces:["package.json",`.${e}rc`,`.${e}rc.json`,`.${e}rc.yaml`,`.${e}rc.yml`,`.${e}rc.js`,`.${e}rc.cjs`,`${e}.config.js`,`${e}.config.cjs`],ignoreEmptySearchPlaces:true,stopDir:n.default.homedir(),cache:true,transform:c,loaders:l};const s={...r,...t,loaders:{...r.loaders,...t.loaders}};return s}},8751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.loaders=void 0;let n;const s=function loadJs(e){if(n===undefined){n=r(9900)}const t=n(e);return t};let i;const o=function loadJson(e,t){if(i===undefined){i=r(6615)}try{const r=i(t);return r}catch(t){t.message=`JSON Error in ${e}:\n${t.message}`;throw t}};let a;const l=function loadYaml(e,t){if(a===undefined){a=r(1310)}try{const r=a.parse(t,{prettyErrors:true});return r}catch(t){t.message=`YAML Error in ${e}:\n${t.message}`;throw t}};const c={loadJs:s,loadJson:o,loadYaml:l};t.loaders=c},1238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.readFile=readFile;t.readFileSync=readFileSync;var n=_interopRequireDefault(r(5747));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}async function fsReadFileAsync(e,t){return new Promise((r,s)=>{n.default.readFile(e,t,(e,t)=>{if(e){s(e);return}r(t)})})}async function readFile(e,t={}){const r=t.throwNotFound===true;try{const t=await fsReadFileAsync(e,"utf8");return t}catch(e){if(r===false&&e.code==="ENOENT"){return null}throw e}}function readFileSync(e,t={}){const r=t.throwNotFound===true;try{const t=n.default.readFileSync(e,"utf8");return t}catch(e){if(r===false&&e.code==="ENOENT"){return null}throw e}}},1943:()=>{"use strict"},6615:(e,t,r)=>{"use strict";const n=r(8361);const s=r(8335);const{default:i}=r(9036);const{codeFrameColumns:o}=r(6553);const a=n("JSONError",{fileName:n.append("in %s"),codeFrame:n.append("\n\n%s\n")});e.exports=((e,t,r)=>{if(typeof t==="string"){r=t;t=null}try{try{return JSON.parse(e,t)}catch(r){s(e,t);throw r}}catch(t){t.message=t.message.replace(/\n/g,"");const n=t.message.match(/in JSON at position (\d+) while parsing near/);const s=new a(t);if(r){s.fileName=r}if(n&&n.length>0){const t=new i(e);const r=Number(n[1]);const a=t.locationForIndex(r);const l=o(e,{start:{line:a.line+1,column:a.column+1}},{highlightCode:true});s.codeFrame=l}throw s}})},3433:(e,t,r)=>{"use strict";const{promisify:n}=r(1669);const s=r(5747);async function isType(e,t,r){if(typeof r!=="string"){throw new TypeError(`Expected a string, got ${typeof r}`)}try{const i=await n(s[e])(r);return i[t]()}catch(e){if(e.code==="ENOENT"){return false}throw e}}function isTypeSync(e,t,r){if(typeof r!=="string"){throw new TypeError(`Expected a string, got ${typeof r}`)}try{return s[e](r)[t]()}catch(e){if(e.code==="ENOENT"){return false}throw e}}t.isFile=isType.bind(null,"stat","isFile");t.isDirectory=isType.bind(null,"stat","isDirectory");t.isSymlink=isType.bind(null,"lstat","isSymbolicLink");t.isFileSync=isTypeSync.bind(null,"statSync","isFile");t.isDirectorySync=isTypeSync.bind(null,"statSync","isDirectory");t.isSymlinkSync=isTypeSync.bind(null,"lstatSync","isSymbolicLink")},1657:e=>{"use strict";class SyntaxError extends Error{constructor(e){super(e);const{line:t,column:r,reason:n,plugin:s,file:i}=e;this.name="SyntaxError";this.message=`${this.name}\n\n`;if(typeof t!=="undefined"){this.message+=`(${t}:${r}) `}this.message+=s?`${s}: `:"";this.message+=i?`${i} `:" ";this.message+=`${n}`;const o=e.showSourceCode();if(o){this.message+=`\n\n${o}\n`}this.stack=false}}e.exports=SyntaxError},5962:e=>{"use strict";class Warning extends Error{constructor(e){super(e);const{text:t,line:r,column:n,plugin:s}=e;this.name="Warning";this.message=`${this.name}\n\n`;if(typeof r!=="undefined"){this.message+=`(${r}:${n}) `}this.message+=s?`${s}: `:"";this.message+=`${t}`;this.stack=false}}e.exports=Warning},5365:(e,t,r)=>{"use strict";e.exports=r(6347).default},6347:(e,t,r)=>{"use strict";var n;n={value:true};t.default=loader;var s=r(8710);var i=_interopRequireDefault(r(3225));var o=_interopRequireDefault(r(7001));var a=r(2519);var l=_interopRequireDefault(r(4698));var c=_interopRequireDefault(r(5962));var f=_interopRequireDefault(r(1657));var u=_interopRequireDefault(r(7988));var h=r(1405);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}async function loader(e,t,r){const n=(0,s.getOptions)(this);(0,i.default)(u.default,n,{name:"PostCSS Loader",baseDataPath:"options"});const p=this.async();const d=typeof n.postcssOptions==="undefined"||typeof n.postcssOptions.config==="undefined"?true:n.postcssOptions.config;let g;if(d){try{g=await(0,h.loadConfig)(this,d)}catch(e){p(e);return}}const w=typeof n.sourceMap!=="undefined"?n.sourceMap:this.sourceMap;const{plugins:y,processOptions:m}=(0,h.getPostcssOptions)(this,g,n.postcssOptions);if(w){m.map={inline:false,annotation:false,...m.map}}if(t&&m.map){m.map.prev=(0,h.normalizeSourceMap)(t,this.context)}let S;if(r&&r.ast&&r.ast.type==="postcss"&&(0,a.satisfies)(r.ast.version,`^${l.default.version}`)){({root:S}=r.ast)}if(!S&&n.execute){e=(0,h.exec)(e,this)}let b;try{b=await(0,o.default)(y).process(S||e,m)}catch(e){if(e.file){this.addDependency(e.file)}if(e.name==="CssSyntaxError"){p(new f.default(e))}else{p(e)}return}for(const e of b.warnings()){this.emitWarning(new c.default(e))}for(const e of b.messages){if(e.type==="dependency"){this.addDependency(e.file)}if(e.type==="asset"&&e.content&&e.file){this.emitFile(e.file,e.content,e.sourceMap,e.info)}}let O=b.map?b.map.toJSON():undefined;if(O&&w){O=(0,h.normalizeSourceMapAfterPostcss)(O,this.context)}const A={type:"postcss",version:b.processor.version,root:b.root};p(null,b.css,O,{ast:A})}},1405:(e,t,r)=>{"use strict";e=r.nmd(e);Object.defineProperty(t,"__esModule",{value:true});t.loadConfig=loadConfig;t.getPostcssOptions=getPostcssOptions;t.exec=exec;t.normalizeSourceMap=normalizeSourceMap;t.normalizeSourceMapAfterPostcss=normalizeSourceMapAfterPostcss;var n=_interopRequireDefault(r(5622));var s=_interopRequireDefault(r(2282));var i=r(241);var o=r(4066);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const a=e;const l=(e,t)=>new Promise((r,n)=>{e.stat(t,(e,t)=>{if(e){n(e)}r(t)})});function exec(e,t){const{resource:r,context:n}=t;const i=new s.default(r,a);i.paths=s.default._nodeModulePaths(n);i.filename=r;i._compile(e,r);return i.exports}async function loadConfig(e,t){const r=typeof t==="string"?n.default.resolve(t):n.default.dirname(e.resourcePath);let s;try{s=await l(e.fs,r)}catch(e){throw new Error(`No PostCSS config found in: ${r}`)}const a=(0,o.cosmiconfig)("postcss");let c;try{if(s.isFile()){c=await a.load(r)}else{c=await a.search(r)}}catch(e){throw e}if(!c){return{}}e.addDependency(c.filepath);if(c.isEmpty){return c}if(typeof c.config==="function"){const t={mode:e.mode,file:e.resourcePath,webpackLoaderContext:e};c.config=c.config(t)}c=(0,i.klona)(c);return c}function loadPlugin(e,t,r){try{if(!t||Object.keys(t).length===0){const t=require(e);if(t.default){return t.default}return t}const n=require(e);if(n.default){return n.default(t)}return n(t)}catch(t){throw new Error(`Loading PostCSS "${e}" plugin failed: ${t.message}\n\n(@${r})`)}}function pluginFactory(){const e=new Map;return t=>{if(typeof t==="undefined"){return e}if(Array.isArray(t)){for(const r of t){if(Array.isArray(r)){const[t,n]=r;e.set(t,n)}else if(r&&typeof r==="function"){e.set(r)}else if(r&&Object.keys(r).length===1&&(typeof r[Object.keys(r)[0]]==="object"||typeof r[Object.keys(r)[0]]==="boolean")&&r[Object.keys(r)[0]]!==null){const[t]=Object.keys(r);const n=r[t];if(n===false){e.delete(t)}else{e.set(t,n)}}else if(r){e.set(r)}}}else{const r=Object.entries(t);for(const[t,n]of r){if(n===false){e.delete(t)}else{e.set(t,n)}}}return e}}function getPostcssOptions(e,t={},r={}){const s=e.resourcePath;let o=r;if(typeof o==="function"){o=o(e)}let a=[];try{const r=pluginFactory();if(t.config&&t.config.plugins){r(t.config.plugins)}r(o.plugins);a=[...r()].map(e=>{const[t,r]=e;if(typeof t==="string"){return loadPlugin(t,r,s)}return t})}catch(t){e.emitError(t)}const l=t.config||{};if(l.from){l.from=n.default.resolve(n.default.dirname(t.filepath),l.from)}if(l.to){l.to=n.default.resolve(n.default.dirname(t.filepath),l.to)}delete l.plugins;const c=(0,i.klona)(o);if(c.from){c.from=n.default.resolve(e.rootContext,c.from)}if(c.to){c.to=n.default.resolve(e.rootContext,c.to)}delete c.config;delete c.plugins;const f={from:s,to:s,map:false,...l,...c};if(typeof f.parser==="string"){try{f.parser=require(f.parser)}catch(t){e.emitError(new Error(`Loading PostCSS "${f.parser}" parser failed: ${t.message}\n\n(@${s})`))}}if(typeof f.stringifier==="string"){try{f.stringifier=require(f.stringifier)}catch(t){e.emitError(new Error(`Loading PostCSS "${f.stringifier}" stringifier failed: ${t.message}\n\n(@${s})`))}}if(typeof f.syntax==="string"){try{f.syntax=require(f.syntax)}catch(t){e.emitError(new Error(`Loading PostCSS "${f.syntax}" syntax failed: ${t.message}\n\n(@${s})`))}}if(f.map===true){f.map={inline:true}}return{plugins:a,processOptions:f}}const c=/^[a-z]:[/\\]|^\\\\/i;const f=/^[a-z0-9+\-.]+:/i;function getURLType(e){if(e[0]==="/"){if(e[1]==="/"){return"scheme-relative"}return"path-absolute"}if(c.test(e)){return"path-absolute"}return f.test(e)?"absolute":"path-relative"}function normalizeSourceMap(e,t){let r=e;if(typeof r==="string"){r=JSON.parse(r)}delete r.file;const{sourceRoot:s}=r;delete r.sourceRoot;if(r.sources){r.sources=r.sources.map(e=>{const r=getURLType(e);if(r==="path-relative"||r==="path-absolute"){const i=r==="path-relative"&&s?n.default.resolve(s,n.default.normalize(e)):n.default.normalize(e);return n.default.relative(t,i)}return e})}return r}function normalizeSourceMapAfterPostcss(e,t){const r=e;delete r.file;r.sourceRoot="";r.sources=r.sources.map(e=>{if(e.indexOf("<")===0){return e}const r=getURLType(e);if(r==="path-relative"){return n.default.resolve(t,e)}return e});return r}},4193:(e,t,r)=>{"use strict";let n=r(6919);class AtRule extends n{constructor(e){super(e);this.type="atrule"}append(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.append(...e)}prepend(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.prepend(...e)}}e.exports=AtRule;AtRule.default=AtRule;n.registerAtRule(AtRule)},7592:(e,t,r)=>{"use strict";let n=r(8557);class Comment extends n{constructor(e){super(e);this.type="comment"}}e.exports=Comment;Comment.default=Comment},6919:(e,t,r)=>{"use strict";let n=r(3522);let{isClean:s}=r(2594);let i=r(7592);let o=r(8557);let a,l,c;function cleanSource(e){return e.map(e=>{if(e.nodes)e.nodes=cleanSource(e.nodes);delete e.source;return e})}function markDirtyUp(e){e[s]=false;if(e.proxyOf.nodes){for(let t of e.proxyOf.nodes){markDirtyUp(t)}}}function rebuild(e){if(e.type==="atrule"){Object.setPrototypeOf(e,c.prototype)}else if(e.type==="rule"){Object.setPrototypeOf(e,l.prototype)}else if(e.type==="decl"){Object.setPrototypeOf(e,n.prototype)}else if(e.type==="comment"){Object.setPrototypeOf(e,i.prototype)}if(e.nodes){e.nodes.forEach(e=>{rebuild(e)})}}class Container extends o{push(e){e.parent=this;this.proxyOf.nodes.push(e);return this}each(e){if(!this.proxyOf.nodes)return undefined;let t=this.getIterator();let r,n;while(this.indexes[t]{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}if(n!==false&&t.walk){n=t.walk(e)}return n})}walkDecls(e,t){if(!t){t=e;return this.walk((e,r)=>{if(e.type==="decl"){return t(e,r)}})}if(e instanceof RegExp){return this.walk((r,n)=>{if(r.type==="decl"&&e.test(r.prop)){return t(r,n)}})}return this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e){return t(r,n)}})}walkRules(e,t){if(!t){t=e;return this.walk((e,r)=>{if(e.type==="rule"){return t(e,r)}})}if(e instanceof RegExp){return this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector)){return t(r,n)}})}return this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e){return t(r,n)}})}walkAtRules(e,t){if(!t){t=e;return this.walk((e,r)=>{if(e.type==="atrule"){return t(e,r)}})}if(e instanceof RegExp){return this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name)){return t(r,n)}})}return this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e){return t(r,n)}})}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment"){return e(t,r)}})}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}this.markDirty();return this}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes){this.indexes[t]=this.indexes[t]+e.length}}this.markDirty();return this}cleanRaws(e){super.cleanRaws(e);if(this.nodes){for(let t of this.nodes)t.cleanRaws(e)}}insertBefore(e,t){e=this.index(e);let r=e===0?"prepend":false;let n=this.normalize(t,this.proxyOf.nodes[e],r).reverse();for(let t of n)this.proxyOf.nodes.splice(e,0,t);let s;for(let t in this.indexes){s=this.indexes[t];if(e<=s){this.indexes[t]=s+n.length}}this.markDirty();return this}insertAfter(e,t){e=this.index(e);let r=this.normalize(t,this.proxyOf.nodes[e]).reverse();for(let t of r)this.proxyOf.nodes.splice(e+1,0,t);let n;for(let t in this.indexes){n=this.indexes[t];if(e=e){this.indexes[r]=t-1}}this.markDirty();return this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=undefined;this.proxyOf.nodes=[];this.markDirty();return this}replaceValues(e,t,r){if(!r){r=t;t={}}this.walkDecls(n=>{if(t.props&&!t.props.includes(n.prop))return;if(t.fast&&!n.value.includes(t.fast))return;n.value=n.value.replace(e,r)});this.markDirty();return this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){if(typeof e==="number")return e;if(e.proxyOf)e=e.proxyOf;return this.proxyOf.nodes.indexOf(e)}get first(){if(!this.proxyOf.nodes)return undefined;return this.proxyOf.nodes[0]}get last(){if(!this.proxyOf.nodes)return undefined;return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,t){if(typeof e==="string"){e=cleanSource(a(e).nodes)}else if(Array.isArray(e)){e=e.slice(0);for(let t of e){if(t.parent)t.parent.removeChild(t,"ignore")}}else if(e.type==="root"){e=e.nodes.slice(0);for(let t of e){if(t.parent)t.parent.removeChild(t,"ignore")}}else if(e.type){e=[e]}else if(e.prop){if(typeof e.value==="undefined"){throw new Error("Value field is missed in node creation")}else if(typeof e.value!=="string"){e.value=String(e.value)}e=[new n(e)]}else if(e.selector){e=[new l(e)]}else if(e.name){e=[new c(e)]}else if(e.text){e=[new i(e)]}else{throw new Error("Unknown node type in node creation")}let r=e.map(e=>{if(typeof e.markDirty!=="function")rebuild(e);if(e.parent)e.parent.removeChild(e);if(e[s])markDirtyUp(e);if(typeof e.raws.before==="undefined"){if(t&&typeof t.raws.before!=="undefined"){e.raws.before=t.raws.before.replace(/\S/g,"")}}e.parent=this;return e});return r}getProxyProcessor(){return{set(e,t,r){if(e[t]===r)return true;e[t]=r;if(t==="name"||t==="params"||t==="selector"){e.markDirty()}return true},get(e,t){if(t==="proxyOf"){return e}else if(!e[t]){return e[t]}else if(t==="each"||typeof t==="string"&&t.startsWith("walk")){return(...r)=>{return e[t](...r.map(e=>{if(typeof e==="function"){return(t,r)=>e(t.toProxy(),r)}else{return e}}))}}else if(t==="every"||t==="some"){return r=>{return e[t]((e,...t)=>r(e.toProxy(),...t))}}else if(t==="root"){return()=>e.root().toProxy()}else if(t==="nodes"){return e.nodes.map(e=>e.toProxy())}else if(t==="first"||t==="last"){return e[t].toProxy()}else{return e[t]}}}}getIterator(){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let e=this.lastEach;this.indexes[e]=0;return e}}Container.registerParse=(e=>{a=e});Container.registerRule=(e=>{l=e});Container.registerAtRule=(e=>{c=e});e.exports=Container;Container.default=Container},3279:(e,t,r)=>{"use strict";let{red:n,bold:s,gray:i,options:o}=r(8210);let a=r(1040);class CssSyntaxError extends Error{constructor(e,t,r,n,s,i){super(e);this.name="CssSyntaxError";this.reason=e;if(s){this.file=s}if(n){this.source=n}if(i){this.plugin=i}if(typeof t!=="undefined"&&typeof r!=="undefined"){this.line=t;this.column=r}this.setMessage();if(Error.captureStackTrace){Error.captureStackTrace(this,CssSyntaxError)}}setMessage(){this.message=this.plugin?this.plugin+": ":"";this.message+=this.file?this.file:"";if(typeof this.line!=="undefined"){this.message+=":"+this.line+":"+this.column}this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;if(e==null)e=o.enabled;if(a){if(e)t=a(t)}let r=t.split(/\r?\n/);let l=Math.max(this.line-3,0);let c=Math.min(this.line+2,r.length);let f=String(c).length;let u,h;if(e){u=(e=>s(n(e)));h=(e=>i(e))}else{u=h=(e=>e)}return r.slice(l,c).map((e,t)=>{let r=l+1+t;let n=" "+(" "+r).slice(-f)+" | ";if(r===this.line){let t=h(n.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+h(n)+e+"\n "+t+u("^")}return" "+h(n)+e}).join("\n")}toString(){let e=this.showSourceCode();if(e){e="\n\n"+e+"\n"}return this.name+": "+this.message+e}}e.exports=CssSyntaxError;CssSyntaxError.default=CssSyntaxError},3522:(e,t,r)=>{"use strict";let n=r(8557);class Declaration extends n{constructor(e){if(e&&typeof e.value!=="undefined"&&typeof e.value!=="string"){e={...e,value:String(e.value)}}super(e);this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}e.exports=Declaration;Declaration.default=Declaration},2690:(e,t,r)=>{"use strict";let{fileURLToPath:n,pathToFileURL:s}=r(8835);let{resolve:i,isAbsolute:o}=r(5622);let{nanoid:a}=r(6313);let l=r(9897);let c=r(1040);let f=r(3279);let u=r(1090);class Input{constructor(e,t={}){if(e===null||typeof e==="undefined"||typeof e==="object"&&!e.toString){throw new Error(`PostCSS received ${e} instead of CSS string`)}this.css=e.toString();if(this.css[0]==="\ufeff"||this.css[0]==="￾"){this.hasBOM=true;this.css=this.css.slice(1)}else{this.hasBOM=false}if(t.from){if(/^\w+:\/\//.test(t.from)||o(t.from)){this.file=t.from}else{this.file=i(t.from)}}let r=new u(this.css,t);if(r.text){this.map=r;let e=r.consumer().file;if(!this.file&&e)this.file=this.mapResolve(e)}if(!this.file){this.id=""}if(this.map)this.map.file=this.from}fromOffset(e){let t=l(this.css);this.fromOffset=(e=>t.fromIndex(e));return this.fromOffset(e)}error(e,t,r,n={}){let i;if(!r){let e=this.fromOffset(t);t=e.line;r=e.col}let o=this.origin(t,r);if(o){i=new f(e,o.line,o.column,o.source,o.file,n.plugin)}else{i=new f(e,t,r,this.css,this.file,n.plugin)}i.input={line:t,column:r,source:this.css};if(this.file){i.input.url=s(this.file).toString();i.input.file=this.file}return i}origin(e,t){if(!this.map)return false;let r=this.map.consumer();let i=r.originalPositionFor({line:e,column:t});if(!i.source)return false;let a;if(o(i.source)){a=s(i.source)}else{a=new URL(i.source,this.map.consumer().sourceRoot||s(this.map.mapFile))}let l={url:a.toString(),line:i.line,column:i.column};if(a.protocol==="file:"){l.file=n(a)}let c=r.sourceContentFor(i.source);if(c)l.source=c;return l}mapResolve(e){if(/^\w+:\/\//.test(e)){return e}return i(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}}e.exports=Input;Input.default=Input;if(c&&c.registerInput){c.registerInput(Input)}},6310:(e,t,r)=>{"use strict";let n=r(3091);let{isClean:s}=r(2594);let i=r(4793);let o=r(1600);let a=r(6846);let l=r(2128);let c=r(2630);const f={root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"};const u=0;function isPromise(e){return typeof e==="object"&&typeof e.then==="function"}function getEvents(e){let t=false;let r=f[e.type];if(e.type==="decl"){t=e.prop.toLowerCase()}else if(e.type==="atrule"){t=e.name.toLowerCase()}if(t&&e.append){return[r,r+"-"+t,u,r+"Exit",r+"Exit-"+t]}else if(t){return[r,r+"-"+t,r+"Exit",r+"Exit-"+t]}else if(e.append){return[r,u,r+"Exit"]}else{return[r,r+"Exit"]}}function toStack(e){let t;if(e.type==="root"){t=["Root",u,"RootExit"]}else{t=getEvents(e)}return{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function cleanMarks(e){e[s]=false;if(e.nodes)e.nodes.forEach(e=>cleanMarks(e));return e}let h={};class LazyResult{constructor(e,t,r){this.stringified=false;this.processed=false;let n;if(typeof t==="object"&&t!==null&&t.type==="root"){n=cleanMarks(t)}else if(t instanceof LazyResult||t instanceof a){n=cleanMarks(t.root);if(t.map){if(typeof r.map==="undefined")r.map={};if(!r.map.inline)r.map.inline=false;r.map.prev=t.map}}else{let e=l;if(r.syntax)e=r.syntax.parse;if(r.parser)e=r.parser;if(e.parse)e=e.parse;try{n=e(t,r)}catch(e){this.processed=true;this.error=e}}this.result=new a(e,n,r);this.helpers={...h,result:this.result,postcss:h};this.plugins=this.processor.plugins.map(e=>{if(typeof e==="object"&&e.prepare){return{...e,...e.prepare(this.result)}}else{return e}})}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){if(process.env.NODE_ENV!=="production"){if(!("from"in this.opts)){o("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(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}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}sync(){if(this.error)throw this.error;if(this.processed)return this.result;this.processed=true;if(this.processing){throw this.getAsyncError()}for(let e of this.plugins){let t=this.runOnRoot(e);if(isPromise(t)){throw this.getAsyncError()}}this.prepareVisitors();if(this.hasListener){let e=this.result.root;while(!e[s]){e[s]=true;this.walkSync(e)}if(this.listeners.OnceExit){this.visitSync(this.listeners.OnceExit,e)}}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true;this.sync();let e=this.result.opts;let t=i;if(e.syntax)t=e.syntax.stringify;if(e.stringifier)t=e.stringifier;if(t.stringify)t=t.stringify;let r=new n(t,this.result.root,this.result.opts);let s=r.generate();this.result.css=s[0];this.result.map=s[1];return this.result}walkSync(e){e[s]=true;let t=getEvents(e);for(let r of t){if(r===u){if(e.nodes){e.each(e=>{if(!e[s])this.walkSync(e)})}}else{let t=this.listeners[r];if(t){if(this.visitSync(t,e.toProxy()))return}}}}visitSync(e,t){for(let[r,n]of e){this.result.lastPlugin=r;let e;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!=="root"&&!t.parent)return true;if(isPromise(e)){throw this.getAsyncError()}}}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==="object"&&e.Once){return e.Once(this.result.root,this.helpers)}else if(typeof e==="function"){return e(this.result.root,this.result)}}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t)t.addToError(e);this.error=e;if(e.name==="CssSyntaxError"&&!e.plugin){e.plugin=r.postcssPlugin;e.setMessage()}else if(r.postcssVersion){if(process.env.NODE_ENV!=="production"){let e=r.postcssPlugin;let t=r.postcssVersion;let n=this.result.processor.version;let s=t.split(".");let i=n.split(".");if(s[0]!==i[0]||parseInt(s[1])>parseInt(i[1])){console.error("Unknown error from PostCSS plugin. Your current PostCSS "+"version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}}}catch(e){if(console&&console.error)console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e0){let e=this.visitTick(t);if(isPromise(e)){try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}}if(this.listeners.OnceExit){for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}}this.processed=true;return this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{if(!this.listeners[t])this.listeners[t]=[];this.listeners[t].push([e,r])};for(let t of this.plugins){if(typeof t==="object"){for(let r of["Root","Declaration","Rule","AtRule","Comment","DeclarationExit","RuleExit","AtRuleExit","CommentExit","RootExit","OnceExit"]){if(typeof t[r]==="object"){for(let n in t[r]){if(n==="*"){e(t,r,t[r][n])}else{e(t,r+"-"+n.toLowerCase(),t[r][n])}}}else if(typeof t[r]==="function"){e(t,r,t[r])}}}}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1];let{node:r,visitors:n}=t;if(r.type!=="root"&&!r.parent){e.pop();return}if(n.length>0&&t.visitorIndex{h=e});e.exports=LazyResult;LazyResult.default=LazyResult;c.registerLazyResult(LazyResult)},1608:e=>{"use strict";let t={split(e,t,r){let n=[];let s="";let i=false;let o=0;let a=false;let l=false;for(let r of e){if(a){if(l){l=false}else if(r==="\\"){l=true}else if(r===a){a=false}}else if(r==='"'||r==="'"){a=r}else if(r==="("){o+=1}else if(r===")"){if(o>0)o-=1}else if(o===0){if(t.includes(r))i=true}if(i){if(s!=="")n.push(s.trim());s="";i=false}else{s+=r}}if(r||s!=="")n.push(s.trim());return n},space(e){let r=[" ","\n","\t"];return t.split(e,r)},comma(e){return t.split(e,[","],true)}};e.exports=t;t.default=t},3091:(e,t,r)=>{"use strict";let{dirname:n,resolve:s,relative:i,sep:o}=r(5622);let{pathToFileURL:a}=r(8835);let l=r(6241);class MapGenerator{constructor(e,t,r){this.stringify=e;this.mapOpts=r.map||{};this.root=t;this.opts=r}isMap(){if(typeof this.opts.map!=="undefined"){return!!this.opts.map}return this.previous().length>0}previous(){if(!this.previousMaps){this.previousMaps=[];this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;if(!this.previousMaps.includes(t)){this.previousMaps.push(t)}}})}return this.previousMaps}isInline(){if(typeof this.mapOpts.inline!=="undefined"){return this.mapOpts.inline}let e=this.mapOpts.annotation;if(typeof e!=="undefined"&&e!==true){return false}if(this.previous().length){return this.previous().some(e=>e.inline)}return true}isSourcesContent(){if(typeof this.mapOpts.sourcesContent!=="undefined"){return this.mapOpts.sourcesContent}if(this.previous().length){return this.previous().some(e=>e.withContent())}return true}clearAnnotation(){if(this.mapOpts.annotation===false)return;let e;for(let t=this.root.nodes.length-1;t>=0;t--){e=this.root.nodes[t];if(e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0){this.root.removeChild(t)}}}setSourcesContent(){let e={};this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=true;this.map.setSourceContent(this.toUrl(this.path(r)),t.source.input.css)}}})}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file));let r=e.root||n(e.file);let s;if(this.mapOpts.sourcesContent===false){s=new l.SourceMapConsumer(e.text);if(s.sourcesContent){s.sourcesContent=s.sourcesContent.map(()=>null)}}else{s=e.consumer()}this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}isAnnotation(){if(this.isInline()){return true}if(typeof this.mapOpts.annotation!=="undefined"){return this.mapOpts.annotation}if(this.previous().length){return this.previous().some(e=>e.annotation)}return true}toBase64(e){if(Buffer){return Buffer.from(e).toString("base64")}else{return window.btoa(unescape(encodeURIComponent(e)))}}addAnnotation(){let e;if(this.isInline()){e="data:application/json;base64,"+this.toBase64(this.map.toString())}else if(typeof this.mapOpts.annotation==="string"){e=this.mapOpts.annotation}else if(typeof this.mapOpts.annotation==="function"){e=this.mapOpts.annotation(this.opts.to,this.root)}else{e=this.outputFile()+".map"}let t="\n";if(this.css.includes("\r\n"))t="\r\n";this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){if(this.opts.to){return this.path(this.opts.to)}if(this.opts.from){return this.path(this.opts.from)}return"to.css"}generateMap(){this.generateString();if(this.isSourcesContent())this.setSourcesContent();if(this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline()){return[this.css]}return[this.css,this.map]}path(e){if(e.indexOf("<")===0)return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?n(this.opts.to):".";if(typeof this.mapOpts.annotation==="string"){t=n(s(t,this.mapOpts.annotation))}e=i(t,e);return e}toUrl(e){if(o==="\\"){e=e.replace(/\\/g,"/")}return encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from){return this.toUrl(this.mapOpts.from)}else if(this.mapOpts.absolute){return a(e.source.input.from).toString()}else{return this.toUrl(this.path(e.source.input.from))}}generateString(){this.css="";this.map=new l.SourceMapGenerator({file:this.outputFile()});let e=1;let t=1;let r,n;this.stringify(this.root,(s,i,o)=>{this.css+=s;if(i&&o!=="end"){if(i.source&&i.source.start){this.map.addMapping({source:this.sourcePath(i),generated:{line:e,column:t-1},original:{line:i.source.start.line,column:i.source.start.column-1}})}else{this.map.addMapping({source:"",original:{line:1,column:0},generated:{line:e,column:t-1}})}}r=s.match(/\n/g);if(r){e+=r.length;n=s.lastIndexOf("\n");t=s.length-n}else{t+=s.length}if(i&&o!=="start"){let r=i.parent||{raws:{}};if(i.type!=="decl"||i!==r.last||r.raws.semicolon){if(i.source&&i.source.end){this.map.addMapping({source:this.sourcePath(i),generated:{line:e,column:t-2},original:{line:i.source.end.line,column:i.source.end.column-1}})}else{this.map.addMapping({source:"",original:{line:1,column:0},generated:{line:e,column:t-1}})}}}})}generate(){this.clearAnnotation();if(this.isMap()){return this.generateMap()}let e="";this.stringify(this.root,t=>{e+=t});return[e]}}e.exports=MapGenerator},8557:(e,t,r)=>{"use strict";let n=r(3279);let s=r(9414);let{isClean:i}=r(2594);let o=r(4793);function cloneNode(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)){continue}if(n==="proxyCache")continue;let s=e[n];let i=typeof s;if(n==="parent"&&i==="object"){if(t)r[n]=t}else if(n==="source"){r[n]=s}else if(Array.isArray(s)){r[n]=s.map(e=>cloneNode(e,r))}else{if(i==="object"&&s!==null)s=cloneNode(s);r[n]=s}}return r}class Node{constructor(e={}){this.raws={};this[i]=false;for(let t in e){if(t==="nodes"){this.nodes=[];for(let r of e[t]){if(typeof r.clone==="function"){this.append(r.clone())}else{this.append(r)}}}else{this[t]=e[t]}}}error(e,t={}){if(this.source){let r=this.positionBy(t);return this.source.input.error(e,r.line,r.column,t)}return new n(e)}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this}toString(e=o){if(e.stringify)e=e.stringify;let t="";e(this,e=>{t+=e});return t}clone(e={}){let t=cloneNode(this);for(let r in e){t[r]=e[r]}return t}cloneBefore(e={}){let t=this.clone(e);this.parent.insertBefore(this,t);return t}cloneAfter(e={}){let t=this.clone(e);this.parent.insertAfter(this,t);return t}replaceWith(...e){if(this.parent){let t=this;let r=false;for(let n of e){if(n===this){r=true}else if(r){this.parent.insertAfter(t,n);t=n}else{this.parent.insertBefore(t,n)}}if(!r){this.remove()}}return this}next(){if(!this.parent)return undefined;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return undefined;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){this.parent.insertBefore(this,e);return this}after(e){this.parent.insertAfter(this,e);return this}root(){let e=this;while(e.parent)e=e.parent;return e}raw(e,t){let r=new s;return r.raw(this,e,t)}cleanRaws(e){delete this.raws.before;delete this.raws.after;if(!e)delete this.raws.between}toJSON(){let e={};for(let t in this){if(!Object.prototype.hasOwnProperty.call(this,t)){continue}if(t==="parent")continue;let r=this[t];if(Array.isArray(r)){e[t]=r.map(e=>{if(typeof e==="object"&&e.toJSON){return e.toJSON()}else{return e}})}else if(typeof r==="object"&&r.toJSON){e[t]=r.toJSON()}else{e[t]=r}}return e}positionInside(e){let t=this.toString();let r=this.source.start.column;let n=this.source.start.line;for(let s=0;se.root().toProxy()}else{return e[t]}}}}toProxy(){if(!this.proxyCache){this.proxyCache=new Proxy(this,this.getProxyProcessor())}return this.proxyCache}addToError(e){e.postcssNode=this;if(e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}markDirty(){if(this[i]){this[i]=false;let e=this;while(e=e.parent){e[i]=false}}}get proxyOf(){return this}}e.exports=Node;Node.default=Node},2128:(e,t,r)=>{"use strict";let n=r(6919);let s=r(5613);let i=r(2690);function parse(e,t){let r=new i(e,t);let n=new s(r);try{n.parse()}catch(e){if(process.env.NODE_ENV!=="production"){if(e.name==="CssSyntaxError"&&t&&t.from){if(/\.scss$/i.test(t.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(t.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(t.from)){e.message+="\nYou tried to parse Less with "+"the standard CSS parser; "+"try again with the postcss-less parser"}}}throw e}return n.root}e.exports=parse;parse.default=parse;n.registerParse(parse)},5613:(e,t,r)=>{"use strict";let n=r(3522);let s=r(5790);let i=r(7592);let o=r(4193);let a=r(2630);let l=r(2234);class Parser{constructor(e){this.input=e;this.root=new a;this.current=this.root;this.spaces="";this.semicolon=false;this.customProperty=false;this.createTokenizer();this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=s(this.input)}parse(){let e;while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();switch(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()}comment(e){let t=new i;this.init(t,e[2]);t.source.end=this.getPosition(e[3]||e[2]);let r=e[1].slice(2,-2);if(/^\s*$/.test(r)){t.text="";t.raws.left=r;t.raws.right=""}else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2];t.raws.left=e[1];t.raws.right=e[3]}}emptyRule(e){let t=new l;this.init(t,e[2]);t.selector="";t.raws.between="";this.current=t}other(e){let t=false;let r=null;let n=false;let s=null;let i=[];let o=e[1].startsWith("--");let a=[];let l=e;while(l){r=l[0];a.push(l);if(r==="("||r==="["){if(!s)s=l;i.push(r==="("?")":"]")}else if(o&&n&&r==="{"){if(!s)s=l;i.push("}")}else if(i.length===0){if(r===";"){if(n){this.decl(a,o);return}else{break}}else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop());t=true;break}else if(r===":"){n=true}}else if(r===i[i.length-1]){i.pop();if(i.length===0)s=null}l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())t=true;if(i.length>0)this.unclosedBracket(s);if(t&&n){while(a.length){l=a[a.length-1][0];if(l!=="space"&&l!=="comment")break;this.tokenizer.back(a.pop())}this.decl(a,o)}else{this.unknownWord(a)}}rule(e){e.pop();let t=new l;this.init(t,e[0][2]);t.raws.between=this.spacesAndCommentsFromEnd(e);this.raw(t,"selector",e);this.current=t}decl(e,t){let r=new n;this.init(r,e[0][2]);let s=e[e.length-1];if(s[0]===";"){this.semicolon=true;e.pop()}r.source.end=this.getPosition(s[3]||s[2]);while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);r.raws.before+=e.shift()[1]}r.source.start=this.getPosition(e[0][2]);r.prop="";while(e.length){let t=e[0][0];if(t===":"||t==="space"||t==="comment"){break}r.prop+=e.shift()[1]}r.raws.between="";let i;while(e.length){i=e.shift();if(i[0]===":"){r.raws.between+=i[1];break}else{if(i[0]==="word"&&/\w/.test(i[1])){this.unknownWord([i])}r.raws.between+=i[1]}}if(r.prop[0]==="_"||r.prop[0]==="*"){r.raws.before+=r.prop[0];r.prop=r.prop.slice(1)}let o=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){i=e[t];if(i[1].toLowerCase()==="!important"){r.important=true;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n;if(n!==" !important")r.raws.important=n;break}else if(i[1].toLowerCase()==="important"){let n=e.slice(0);let s="";for(let e=t;e>0;e--){let t=n[e][0];if(s.trim().indexOf("!")===0&&t!=="space"){break}s=n.pop()[1]+s}if(s.trim().indexOf("!")===0){r.important=true;r.raws.important=s;e=n}}if(i[0]!=="space"&&i[0]!=="comment"){break}}let a=e.some(e=>e[0]!=="space"&&e[0]!=="comment");this.raw(r,"value",e);if(a){r.raws.between+=o}else{r.value=o+r.value}if(r.value.includes(":")&&!t){this.checkMissedSemicolon(e)}}atrule(e){let t=new o;t.name=e[1].slice(1);if(t.name===""){this.unnamedAtrule(t,e)}this.init(t,e[2]);let r;let n;let s;let i=false;let a=false;let l=[];let c=[];while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();r=e[0];if(r==="("||r==="["){c.push(r==="("?")":"]")}else if(r==="{"&&c.length>0){c.push("}")}else if(r===c[c.length-1]){c.pop()}if(c.length===0){if(r===";"){t.source.end=this.getPosition(e[2]);this.semicolon=true;break}else if(r==="{"){a=true;break}else if(r==="}"){if(l.length>0){s=l.length-1;n=l[s];while(n&&n[0]==="space"){n=l[--s]}if(n){t.source.end=this.getPosition(n[3]||n[2])}}this.end(e);break}else{l.push(e)}}else{l.push(e)}if(this.tokenizer.endOfFile()){i=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(l);if(l.length){t.raws.afterName=this.spacesAndCommentsFromStart(l);this.raw(t,"params",l);if(i){e=l[l.length-1];t.source.end=this.getPosition(e[3]||e[2]);this.spaces=t.raws.between;t.raws.between=""}}else{t.raws.afterName="";t.params=""}if(a){t.nodes=[];this.current=t}}end(e){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(e[2]);this.current=this.current.parent}else{this.unexpectedClose(e)}}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}freeSemicolon(e){this.spaces+=e[1];if(this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];if(e&&e.type==="rule"&&!e.raws.ownSemicolon){e.raws.ownSemicolon=this.spaces;this.spaces=""}}}getPosition(e){let t=this.input.fromOffset(e);return{offset:e,line:t.line,column:t.col}}init(e,t){this.current.push(e);e.source={start:this.getPosition(t),input:this.input};e.raws.before=this.spaces;this.spaces="";if(e.type!=="comment")this.semicolon=false}raw(e,t,r){let n,s;let i=r.length;let o="";let a=true;let l,c;let f=/^([#.|])?(\w)+/i;for(let t=0;te+t[1],"");e.raws[t]={value:o,raw:n}}e[t]=o}spacesAndCommentsFromEnd(e){let t;let r="";while(e.length){t=e[e.length-1][0];if(t!=="space"&&t!=="comment")break;r=e.pop()[1]+r}return r}spacesAndCommentsFromStart(e){let t;let r="";while(e.length){t=e[0][0];if(t!=="space"&&t!=="comment")break;r+=e.shift()[1]}return r}spacesFromEnd(e){let t;let r="";while(e.length){t=e[e.length-1][0];if(t!=="space")break;r=e.pop()[1]+r}return r}stringFrom(e,t){let r="";for(let n=t;n=0;s--){n=e[s];if(n[0]!=="space"){r+=1;if(r===2)break}}throw this.input.error("Missed semicolon",n[2])}}e.exports=Parser},7001:(e,t,r)=>{"use strict";let n=r(3279);let s=r(3522);let i=r(6310);let o=r(6919);let a=r(9189);let l=r(4793);let c=r(7143);let f=r(7592);let u=r(4193);let h=r(6846);let p=r(2690);let d=r(2128);let g=r(1608);let w=r(2234);let y=r(2630);let m=r(8557);function postcss(...e){if(e.length===1&&Array.isArray(e[0])){e=e[0]}return new a(e,postcss)}postcss.plugin=function plugin(e,t){if(console&&console.warn){console.warn("postcss.plugin was deprecated. Migration guide:\n"+"https://evilmartians.com/chronicles/postcss-8-plugin-migration");if(process.env.LANG&&process.env.LANG.startsWith("cn")){console.warn("postcss.plugin 被弃用. 迁移指南:\n"+"https://www.w3ctech.com/topic/2226")}}function creator(...r){let n=t(...r);n.postcssPlugin=e;n.postcssVersion=(new a).version;return n}let r;Object.defineProperty(creator,"postcss",{get(){if(!r)r=creator();return r}});creator.process=function(e,t,r){return postcss([creator(r)]).process(e,t)};return creator};postcss.stringify=l;postcss.parse=d;postcss.list=g;postcss.comment=(e=>new f(e));postcss.atRule=(e=>new u(e));postcss.decl=(e=>new s(e));postcss.rule=(e=>new w(e));postcss.root=(e=>new y(e));postcss.CssSyntaxError=n;postcss.Declaration=s;postcss.Container=o;postcss.Comment=f;postcss.Warning=c;postcss.AtRule=u;postcss.Result=h;postcss.Input=p;postcss.Rule=w;postcss.Root=y;postcss.Node=m;i.registerPostcss(postcss);e.exports=postcss;postcss.default=postcss},1090:(e,t,r)=>{"use strict";let{existsSync:n,readFileSync:s}=r(5747);let{dirname:i,join:o}=r(5622);let a=r(6241);function fromBase64(e){if(Buffer){return Buffer.from(e,"base64").toString()}else{return window.atob(e)}}class PreviousMap{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e);this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:undefined;let n=this.loadMap(t.from,r);if(!this.mapFile&&t.from){this.mapFile=t.from}if(this.mapFile)this.root=i(this.mapFile);if(n)this.text=n}consumer(){if(!this.consumerCache){this.consumerCache=new a.SourceMapConsumer(this.text)}return this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){if(!e)return false;return e.substr(0,t.length)===t}getAnnotationURL(e){return e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//)[1].trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=.*\s*\*\//gm);if(t&&t.length>0){let e=t[t.length-1];if(e){this.annotation=this.getAnnotationURL(e)}}}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/;let r=/^data:application\/json;base64,/;let n=/^data:application\/json;charset=utf-?8,/;let s=/^data:application\/json,/;if(n.test(e)||s.test(e)){return decodeURIComponent(e.substr(RegExp.lastMatch.length))}if(t.test(e)||r.test(e)){return fromBase64(e.substr(RegExp.lastMatch.length))}let i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}loadFile(e){this.root=i(e);if(n(e)){this.mapFile=e;return s(e,"utf-8").toString().trim()}}loadMap(e,t){if(t===false)return false;if(t){if(typeof t==="string"){return t}else if(typeof t==="function"){let r=t(e);if(r){let e=this.loadFile(r);if(!e){throw new Error("Unable to load previous source map: "+r.toString())}return e}}else if(t instanceof a.SourceMapConsumer){return a.SourceMapGenerator.fromSourceMap(t).toString()}else if(t instanceof a.SourceMapGenerator){return t.toString()}else if(this.isMap(t)){return JSON.stringify(t)}else{throw new Error("Unsupported previous source map format: "+t.toString())}}else if(this.inline){return this.decodeInline(this.annotation)}else if(this.annotation){let t=this.annotation;if(e)t=o(i(e),t);return this.loadFile(t)}}isMap(e){if(typeof e!=="object")return false;return typeof e.mappings==="string"||typeof e._mappings==="string"||Array.isArray(e.sections)}}e.exports=PreviousMap;PreviousMap.default=PreviousMap},9189:(e,t,r)=>{"use strict";let n=r(6310);let s=r(2630);class Processor{constructor(e=[]){this.version="8.1.7";this.plugins=this.normalize(e)}use(e){this.plugins=this.plugins.concat(this.normalize([e]));return this}process(e,t={}){if(this.plugins.length===0&&t.parser===t.stringifier&&!t.hideNothingWarning){if(process.env.NODE_ENV!=="production"){if(typeof console!=="undefined"&&console.warn){console.warn("You did not set any plugins, parser, or stringifier. "+"Right now, PostCSS does nothing. Pick plugins for your case "+"on https://www.postcss.parts/ and use them in postcss.config.js.")}}}return new n(this,e,t)}normalize(e){let t=[];for(let r of e){if(r.postcss===true){r=r()}else if(r.postcss){r=r.postcss}if(typeof r==="object"&&Array.isArray(r.plugins)){t=t.concat(r.plugins)}else if(typeof r==="object"&&r.postcssPlugin){t.push(r)}else if(typeof r==="function"){t.push(r)}else if(typeof r==="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production"){throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use "+"one of the syntax/parser/stringifier options as outlined "+"in your PostCSS runner documentation.")}}else{throw new Error(r+" is not a PostCSS plugin")}}return t}}e.exports=Processor;Processor.default=Processor;s.registerProcessor(Processor)},6846:(e,t,r)=>{"use strict";let n=r(7143);class Result{constructor(e,t,r){this.processor=e;this.messages=[];this.root=t;this.opts=r;this.css=undefined;this.map=undefined}toString(){return this.css}warn(e,t={}){if(!t.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin){t.plugin=this.lastPlugin.postcssPlugin}}let r=new n(e,t);this.messages.push(r);return r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}}e.exports=Result;Result.default=Result},2630:(e,t,r)=>{"use strict";let n=r(6919);let s,i;class Root extends n{constructor(e){super(e);this.type="root";if(!this.nodes)this.nodes=[]}removeChild(e,t){let r=this.index(e);if(!t&&r===0&&this.nodes.length>1){this.nodes[1].raws.before=this.nodes[r].raws.before}return super.removeChild(e)}normalize(e,t,r){let n=super.normalize(e);if(t){if(r==="prepend"){if(this.nodes.length>1){t.raws.before=this.nodes[1].raws.before}else{delete t.raws.before}}else if(this.first!==t){for(let e of n){e.raws.before=t.raws.before}}}return n}toResult(e={}){let t=new s(new i,this,e);return t.stringify()}}Root.registerLazyResult=(e=>{s=e});Root.registerProcessor=(e=>{i=e});e.exports=Root;Root.default=Root},2234:(e,t,r)=>{"use strict";let n=r(6919);let s=r(1608);class Rule extends n{constructor(e){super(e);this.type="rule";if(!this.nodes)this.nodes=[]}get selectors(){return s.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null;let r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}e.exports=Rule;Rule.default=Rule;n.registerRule(Rule)},9414:e=>{"use strict";const t={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:false};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}class Stringifier{constructor(e){this.builder=e}stringify(e,t){this[e.type](e,t)}root(e){this.root=e;this.body(e);if(e.raws.after)this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft");let r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon");let n=e.prop+r+this.rawValue(e,"value");if(e.important){n+=e.raws.important||" !important"}if(t)n+=";";this.builder(n,e)}rule(e){this.block(e,this.rawValue(e,"selector"));if(e.raws.ownSemicolon){this.builder(e.raws.ownSemicolon,e,"end")}}atrule(e,t){let r="@"+e.name;let n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!=="undefined"){r+=e.raws.afterName}else if(n){r+=" "}if(e.nodes){this.block(e,r+n)}else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}body(e){let t=e.nodes.length-1;while(t>0){if(e.nodes[t].type!=="comment")break;t-=1}let r=this.raw(e,"semicolon");for(let n=0;n{s=e.raws[r];if(typeof s!=="undefined")return false})}}if(typeof s==="undefined")s=t[n];o.rawCache[n]=s;return s}rawSemicolon(e){let t;e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type==="decl"){t=e.raws.semicolon;if(typeof t!=="undefined")return false}});return t}rawEmptyBody(e){let t;e.walk(e=>{if(e.nodes&&e.nodes.length===0){t=e.raws.after;if(typeof t!=="undefined")return false}});return t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e){if(typeof r.raws.before!=="undefined"){let e=r.raws.before.split("\n");t=e[e.length-1];t=t.replace(/\S/g,"");return false}}});return t}rawBeforeComment(e,t){let r;e.walkComments(e=>{if(typeof e.raws.before!=="undefined"){r=e.raws.before;if(r.includes("\n")){r=r.replace(/[^\n]+$/,"")}return false}});if(typeof r==="undefined"){r=this.raw(t,null,"beforeDecl")}else if(r){r=r.replace(/\S/g,"")}return r}rawBeforeDecl(e,t){let r;e.walkDecls(e=>{if(typeof e.raws.before!=="undefined"){r=e.raws.before;if(r.includes("\n")){r=r.replace(/[^\n]+$/,"")}return false}});if(typeof r==="undefined"){r=this.raw(t,null,"beforeRule")}else if(r){r=r.replace(/\S/g,"")}return r}rawBeforeRule(e){let t;e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)){if(typeof r.raws.before!=="undefined"){t=r.raws.before;if(t.includes("\n")){t=t.replace(/[^\n]+$/,"")}return false}}});if(t)t=t.replace(/\S/g,"");return t}rawBeforeClose(e){let t;e.walk(e=>{if(e.nodes&&e.nodes.length>0){if(typeof e.raws.after!=="undefined"){t=e.raws.after;if(t.includes("\n")){t=t.replace(/[^\n]+$/,"")}return false}}});if(t)t=t.replace(/\S/g,"");return t}rawBeforeOpen(e){let t;e.walk(e=>{if(e.type!=="decl"){t=e.raws.between;if(typeof t!=="undefined")return false}});return t}rawColon(e){let t;e.walkDecls(e=>{if(typeof e.raws.between!=="undefined"){t=e.raws.between.replace(/[^\s:]/g,"");return false}});return t}beforeAfter(e,t){let r;if(e.type==="decl"){r=this.raw(e,null,"beforeDecl")}else if(e.type==="comment"){r=this.raw(e,null,"beforeComment")}else if(t==="before"){r=this.raw(e,null,"beforeRule")}else{r=this.raw(e,null,"beforeClose")}let n=e.parent;let s=0;while(n&&n.type!=="root"){s+=1;n=n.parent}if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length){for(let e=0;e{"use strict";let n=r(9414);function stringify(e,t){let r=new n(t);r.stringify(e)}e.exports=stringify;stringify.default=stringify},2594:e=>{"use strict";e.exports.isClean=Symbol("isClean")},1040:(e,t,r)=>{"use strict";let{cyan:n,gray:s,green:i,yellow:o,magenta:a}=r(8210);let l=r(5790);let c;function registerInput(e){c=e}const f={brackets:n,"at-word":n,comment:s,string:i,class:o,hash:a,call:n,"(":n,")":n,"{":o,"}":o,"[":o,"]":o,":":o,";":o};function getTokenType([e,t],r){if(e==="word"){if(t[0]==="."){return"class"}if(t[0]==="#"){return"hash"}}if(!r.endOfFile()){let e=r.nextToken();r.back(e);if(e[0]==="brackets"||e[0]==="(")return"call"}return e}function terminalHighlight(e){let t=l(new c(e),{ignoreErrors:true});let r="";while(!t.endOfFile()){let e=t.nextToken();let n=f[getTokenType(e,t)];if(n){r+=e[1].split(/\r?\n/).map(e=>n(e)).join("\n")}else{r+=e[1]}}return r}terminalHighlight.registerInput=registerInput;e.exports=terminalHighlight},5790:e=>{"use strict";const t="'".charCodeAt(0);const r='"'.charCodeAt(0);const n="\\".charCodeAt(0);const s="/".charCodeAt(0);const i="\n".charCodeAt(0);const o=" ".charCodeAt(0);const a="\f".charCodeAt(0);const l="\t".charCodeAt(0);const c="\r".charCodeAt(0);const f="[".charCodeAt(0);const u="]".charCodeAt(0);const h="(".charCodeAt(0);const p=")".charCodeAt(0);const d="{".charCodeAt(0);const g="}".charCodeAt(0);const w=";".charCodeAt(0);const y="*".charCodeAt(0);const m=":".charCodeAt(0);const S="@".charCodeAt(0);const b=/[\t\n\f\r "#'()/;[\\\]{}]/g;const O=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g;const A=/.[\n"'(/\\]/;const E=/[\da-f]/i;e.exports=function tokenizer(e,M={}){let N=e.css.valueOf();let C=M.ignoreErrors;let T,L,R,v,_;let x,$,D,F,B;let I=N.length;let P=0;let Y=[];let j=[];function position(){return P}function unclosed(t){throw e.error("Unclosed "+t,P)}function endOfFile(){return j.length===0&&P>=I}function nextToken(e){if(j.length)return j.pop();if(P>=I)return;let M=e?e.ignoreUnclosed:false;T=N.charCodeAt(P);switch(T){case i:case o:case l:case c:case a:{L=P;do{L+=1;T=N.charCodeAt(L)}while(T===o||T===i||T===l||T===c||T===a);B=["space",N.slice(P,L)];P=L-1;break}case f:case u:case d:case g:case m:case w:case p:{let e=String.fromCharCode(T);B=[e,e,P];break}case h:{D=Y.length?Y.pop()[1]:"";F=N.charCodeAt(P+1);if(D==="url"&&F!==t&&F!==r&&F!==o&&F!==i&&F!==l&&F!==a&&F!==c){L=P;do{x=false;L=N.indexOf(")",L+1);if(L===-1){if(C||M){L=P;break}else{unclosed("bracket")}}$=L;while(N.charCodeAt($-1)===n){$-=1;x=!x}}while(x);B=["brackets",N.slice(P,L+1),P,L];P=L}else{L=N.indexOf(")",P+1);v=N.slice(P,L+1);if(L===-1||A.test(v)){B=["(","(",P]}else{B=["brackets",v,P,L];P=L}}break}case t:case r:{R=T===t?"'":'"';L=P;do{x=false;L=N.indexOf(R,L+1);if(L===-1){if(C||M){L=P+1;break}else{unclosed("string")}}$=L;while(N.charCodeAt($-1)===n){$-=1;x=!x}}while(x);B=["string",N.slice(P,L+1),P,L];P=L;break}case S:{b.lastIndex=P+1;b.test(N);if(b.lastIndex===0){L=N.length-1}else{L=b.lastIndex-2}B=["at-word",N.slice(P,L+1),P,L];P=L;break}case n:{L=P;_=true;while(N.charCodeAt(L+1)===n){L+=1;_=!_}T=N.charCodeAt(L+1);if(_&&T!==s&&T!==o&&T!==i&&T!==l&&T!==c&&T!==a){L+=1;if(E.test(N.charAt(L))){while(E.test(N.charAt(L+1))){L+=1}if(N.charCodeAt(L+1)===o){L+=1}}}B=["word",N.slice(P,L+1),P,L];P=L;break}default:{if(T===s&&N.charCodeAt(P+1)===y){L=N.indexOf("*/",P+2)+1;if(L===0){if(C||M){L=N.length}else{unclosed("comment")}}B=["comment",N.slice(P,L+1),P,L];P=L}else{O.lastIndex=P+1;O.test(N);if(O.lastIndex===0){L=N.length-1}else{L=O.lastIndex-2}B=["word",N.slice(P,L+1),P,L];Y.push(B);P=L}break}}P++;return B}function back(e){j.push(e)}return{back:back,nextToken:nextToken,endOfFile:endOfFile,position:position}}},1600:e=>{"use strict";let t={};e.exports=function warnOnce(e){if(t[e])return;t[e]=true;if(typeof console!=="undefined"&&console.warn){console.warn(e)}}},7143:e=>{"use strict";class Warning{constructor(e,t={}){this.type="warning";this.text=e;if(t.node&&t.node.source){let e=t.node.positionBy(t);this.line=e.line;this.column=e.column}for(let e in t)this[e]=t[e]}toString(){if(this.node){return this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message}if(this.plugin){return this.plugin+": "+this.text}return this.text}}e.exports=Warning;Warning.default=Warning},8210:(e,t)=>{let r=!("NO_COLOR"in process.env)&&("FORCE_COLOR"in process.env||process.platform==="win32"||process.stdout!=null&&process.stdout.isTTY&&process.env.TERM&&process.env.TERM!=="dumb");const n=(e,t,n,s)=>i=>r?e+(~(i+="").indexOf(t,4)?i.replace(n,s):i)+t:i;const s=(e,t)=>{return n(`[${e}m`,`[${t}m`,new RegExp(`\\x1b\\[${t}m`,"g"),`[${e}m`)};t.options=Object.defineProperty({},"enabled",{get:()=>r,set:e=>r=e});t.reset=s(0,0);t.bold=n("","",/\x1b\[22m/g,"");t.dim=n("","",/\x1b\[22m/g,"");t.italic=s(3,23);t.underline=s(4,24);t.inverse=s(7,27);t.hidden=s(8,28);t.strikethrough=s(9,29);t.black=s(30,39);t.red=s(31,39);t.green=s(32,39);t.yellow=s(33,39);t.blue=s(34,39);t.magenta=s(35,39);t.cyan=s(36,39);t.white=s(37,39);t.gray=s(90,39);t.bgBlack=s(40,49);t.bgRed=s(41,49);t.bgGreen=s(42,49);t.bgYellow=s(43,49);t.bgBlue=s(44,49);t.bgMagenta=s(45,49);t.bgCyan=s(46,49);t.bgWhite=s(47,49);t.blackBright=s(90,39);t.redBright=s(91,39);t.greenBright=s(92,39);t.yellowBright=s(93,39);t.blueBright=s(94,39);t.magentaBright=s(95,39);t.cyanBright=s(96,39);t.whiteBright=s(97,39);t.bgBlackBright=s(100,49);t.bgRedBright=s(101,49);t.bgGreenBright=s(102,49);t.bgYellowBright=s(103,49);t.bgBlueBright=s(104,49);t.bgMagentaBright=s(105,49);t.bgCyanBright=s(106,49);t.bgWhiteBright=s(107,49)},6313:e=>{let t="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";let r=(e,t)=>{return()=>{let r="";let n=t;while(n--){r+=e[Math.random()*e.length|0]}return r}};let n=(e=21)=>{let r="";let n=e;while(n--){r+=t[Math.random()*64|0]}return r};e.exports={nanoid:n,customAlphabet:r}},7988:e=>{"use strict";e.exports=JSON.parse('{"type":"object","properties":{"postcssOptions":{"description":"Options to pass through to `Postcss`.","anyOf":[{"type":"object","additionalProperties":true,"properties":{"config":{"description":"Allows to specify PostCSS Config Path (https://github.com/postcss/postcss-loader#config)","anyOf":[{"description":"Allows to specify the path to the configuration file","type":"string"},{"description":"Enables/Disables autoloading config","type":"boolean"}]}}},{"instanceof":"Function"}]},"execute":{"description":"Enables/Disables PostCSS parser support in \'CSS-in-JS\' (https://github.com/postcss/postcss-loader#execute)","type":"boolean"},"sourceMap":{"description":"Enables/Disables generation of source maps (https://github.com/postcss/postcss-loader#sourcemap)","type":"boolean"}},"additionalProperties":false}')},4698:e=>{"use strict";e.exports=JSON.parse('{"name":"postcss","version":"8.1.7","description":"Tool for transforming styles with JS plugins","engines":{"node":"^10 || ^12 || >=14"},"exports":{".":{"require":"./lib/postcss.js","import":"./lib/postcss.mjs","types":"./lib/postcss.d.ts"},"./":"./"},"main":"./lib/postcss.js","types":"./lib/postcss.d.ts","keywords":["css","postcss","rework","preprocessor","parser","source map","transform","manipulation","transpiler"],"funding":{"type":"opencollective","url":"https://opencollective.com/postcss/"},"author":"Andrey Sitnik ","license":"MIT","homepage":"https://postcss.org/","repository":"postcss/postcss","dependencies":{"colorette":"^1.2.1","line-column":"^1.0.2","nanoid":"^3.1.16","source-map":"^0.6.1"},"browser":{"./lib/terminal-highlight":false,"colorette":false,"fs":false}}')},2242:e=>{"use strict";e.exports=require("chalk")},5747:e=>{"use strict";e.exports=require("fs")},8710:e=>{"use strict";e.exports=require("loader-utils")},2282:e=>{"use strict";e.exports=require("module")},3225:e=>{"use strict";e.exports=require("next/dist/compiled/schema-utils")},2519:e=>{"use strict";e.exports=require("next/dist/compiled/semver")},6241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},8835:e=>{"use strict";e.exports=require("url")},1669:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var n=t[r]={id:r,loaded:false,exports:{}};var s=true;try{e[r](n,n.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}n.loaded=true;return n.exports}(()=>{__nccwpck_require__.nmd=(e=>{e.paths=[];if(!e.children)e.children=[];return e})})();__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(5365)})(); \ No newline at end of file diff --git a/packages/next/compiled/postcss-preset-env/index.js b/packages/next/compiled/postcss-preset-env/index.js index e05fd07d4924bba..57dc9f2b632b1b7 100644 --- a/packages/next/compiled/postcss-preset-env/index.js +++ b/packages/next/compiled/postcss-preset-env/index.js @@ -1 +1 @@ -module.exports=(()=>{var e={3094:e=>{"use strict";e.exports=JSON.parse('[{"id":"all-property","title":"`all` Property","description":"A property for defining the reset of all properties of an element","specification":"https://www.w3.org/TR/css-cascade-3/#all-shorthand","stage":3,"caniuse":"css-all","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/all"},"example":"a {\\n all: initial;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/maximkoretskiy/postcss-initial"}]},{"id":"any-link-pseudo-class","title":"`:any-link` Hyperlink Pseudo-Class","description":"A pseudo-class for matching anchor elements independent of whether they have been visited","specification":"https://www.w3.org/TR/selectors-4/#any-link-pseudo","stage":2,"caniuse":"css-any-link","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:any-link"},"example":"nav :any-link > span {\\n background-color: yellow;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-pseudo-class-any-link"}]},{"id":"blank-pseudo-class","title":"`:blank` Empty-Value Pseudo-Class","description":"A pseudo-class for matching form elements when they are empty","specification":"https://drafts.csswg.org/selectors-4/#blank","stage":1,"example":"input:blank {\\n background-color: yellow;\\n}","polyfills":[{"type":"JavaScript Library","link":"https://github.com/csstools/css-blank-pseudo"},{"type":"PostCSS Plugin","link":"https://github.com/csstools/css-blank-pseudo"}]},{"id":"break-properties","title":"Break Properties","description":"Properties for defining the break behavior between and within boxes","specification":"https://www.w3.org/TR/css-break-3/#breaking-controls","stage":3,"caniuse":"multicolumn","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/break-after"},"example":"a {\\n break-inside: avoid;\\n break-before: avoid-column;\\n break-after: always;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/shrpne/postcss-page-break"}]},{"id":"case-insensitive-attributes","title":"Case-Insensitive Attributes","description":"An attribute selector matching attribute values case-insensitively","specification":"https://www.w3.org/TR/selectors-4/#attribute-case","stage":2,"caniuse":"css-case-insensitive","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors"},"example":"[frame=hsides i] {\\n border-style: solid none;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/Semigradsky/postcss-attribute-case-insensitive"}]},{"id":"color-adjust","title":"`color-adjust` Property","description":"The color-adjust property is a non-standard CSS extension that can be used to force printing of background colors and images","specification":"https://www.w3.org/TR/css-color-4/#color-adjust","stage":2,"caniuse":"css-color-adjust","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/color-adjust"},"example":".background {\\n background-color:#ccc;\\n}\\n.background.color-adjust {\\n color-adjust: economy;\\n}\\n.background.color-adjust-exact {\\n color-adjust: exact;\\n}"},{"id":"color-functional-notation","title":"Color Functional Notation","description":"A space and slash separated notation for specifying colors","specification":"https://drafts.csswg.org/css-color/#ref-for-funcdef-rgb%E2%91%A1%E2%91%A0","stage":1,"example":"em {\\n background-color: hsl(120deg 100% 25%);\\n box-shadow: 0 0 0 10px hwb(120deg 100% 25% / 80%);\\n color: rgb(0 255 0);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-color-functional-notation"}]},{"id":"color-mod-function","title":"`color-mod()` Function","description":"A function for modifying colors","specification":"https://www.w3.org/TR/css-color-4/#funcdef-color-mod","stage":-1,"example":"p {\\n color: color-mod(black alpha(50%));\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-color-mod-function"}]},{"id":"custom-media-queries","title":"Custom Media Queries","description":"An at-rule for defining aliases that represent media queries","specification":"https://drafts.csswg.org/mediaqueries-5/#at-ruledef-custom-media","stage":1,"example":"@custom-media --narrow-window (max-width: 30em);\\n\\n@media (--narrow-window) {}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-custom-media"}]},{"id":"custom-properties","title":"Custom Properties","description":"A syntax for defining custom values accepted by all CSS properties","specification":"https://www.w3.org/TR/css-variables-1/","stage":3,"caniuse":"css-variables","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/var"},"example":"img {\\n --some-length: 32px;\\n\\n height: var(--some-length);\\n width: var(--some-length);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-custom-properties"}]},{"id":"custom-property-sets","title":"Custom Property Sets","description":"A syntax for storing properties in named variables, referenceable in other style rules","specification":"https://tabatkins.github.io/specs/css-apply-rule/","stage":-1,"caniuse":"css-apply-rule","example":"img {\\n --some-length-styles: {\\n height: 32px;\\n width: 32px;\\n };\\n\\n @apply --some-length-styles;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/pascalduez/postcss-apply"}]},{"id":"custom-selectors","title":"Custom Selectors","description":"An at-rule for defining aliases that represent selectors","specification":"https://drafts.csswg.org/css-extensions/#custom-selectors","stage":1,"example":"@custom-selector :--heading h1, h2, h3, h4, h5, h6;\\n\\narticle :--heading + p {}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-custom-selectors"}]},{"id":"dir-pseudo-class","title":"`:dir` Directionality Pseudo-Class","description":"A pseudo-class for matching elements based on their directionality","specification":"https://www.w3.org/TR/selectors-4/#dir-pseudo","stage":2,"caniuse":"css-dir-pseudo","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:dir"},"example":"blockquote:dir(rtl) {\\n margin-right: 10px;\\n}\\n\\nblockquote:dir(ltr) {\\n margin-left: 10px;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-dir-pseudo-class"}]},{"id":"double-position-gradients","title":"Double Position Gradients","description":"A syntax for using two positions in a gradient.","specification":"https://www.w3.org/TR/css-images-4/#color-stop-syntax","stage":2,"caniuse-compat":{"and_chr":{"71":"y"},"chrome":{"71":"y"}},"example":".pie_chart {\\n background-image: conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-double-position-gradients"}]},{"id":"environment-variables","title":"Custom Environment Variables","description":"A syntax for using custom values accepted by CSS globally","specification":"https://drafts.csswg.org/css-env-1/","stage":0,"caniuse-compat":{"and_chr":{"69":"y"},"chrome":{"69":"y"},"ios_saf":{"11.2":"y"},"safari":{"11.2":"y"}},"docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/env"},"example":"@media (max-width: env(--brand-small)) {\\n body {\\n padding: env(--brand-spacing);\\n }\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-env-function"}]},{"id":"focus-visible-pseudo-class","title":"`:focus-visible` Focus-Indicated Pseudo-Class","description":"A pseudo-class for matching focused elements that indicate that focus to a user","specification":"https://www.w3.org/TR/selectors-4/#focus-visible-pseudo","stage":2,"caniuse":"css-focus-visible","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible"},"example":":focus:not(:focus-visible) {\\n outline: 0;\\n}","polyfills":[{"type":"JavaScript Library","link":"https://github.com/WICG/focus-visible"},{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-focus-visible"}]},{"id":"focus-within-pseudo-class","title":"`:focus-within` Focus Container Pseudo-Class","description":"A pseudo-class for matching elements that are either focused or that have focused descendants","specification":"https://www.w3.org/TR/selectors-4/#focus-within-pseudo","stage":2,"caniuse":"css-focus-within","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-within"},"example":"form:focus-within {\\n background: rgba(0, 0, 0, 0.3);\\n}","polyfills":[{"type":"JavaScript Library","link":"https://github.com/jonathantneal/focus-within"},{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-focus-within"}]},{"id":"font-variant-property","title":"`font-variant` Property","description":"A property for defining the usage of alternate glyphs in a font","specification":"https://www.w3.org/TR/css-fonts-3/#propdef-font-variant","stage":3,"caniuse":"font-variant-alternates","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant"},"example":"h2 {\\n font-variant: small-caps;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-font-variant"}]},{"id":"gap-properties","title":"Gap Properties","description":"Properties for defining gutters within a layout","specification":"https://www.w3.org/TR/css-grid-1/#gutters","stage":3,"caniuse-compat":{"chrome":{"66":"y"},"edge":{"16":"y"},"firefox":{"61":"y"},"safari":{"11.2":"y","TP":"y"}},"docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/gap"},"example":".grid-1 {\\n gap: 20px;\\n}\\n\\n.grid-2 {\\n column-gap: 40px;\\n row-gap: 20px;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-gap-properties"}]},{"id":"gray-function","title":"`gray()` Function","description":"A function for specifying fully desaturated colors","specification":"https://www.w3.org/TR/css-color-4/#funcdef-gray","stage":2,"example":"p {\\n color: gray(50);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-color-gray"}]},{"id":"grid-layout","title":"Grid Layout","description":"A syntax for using a grid concept to lay out content","specification":"https://www.w3.org/TR/css-grid-1/","stage":3,"caniuse":"css-grid","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/grid"},"example":"section {\\n display: grid;\\n grid-template-columns: 100px 100px 100px;\\n grid-gap: 10px;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/autoprefixer"}]},{"id":"has-pseudo-class","title":"`:has()` Relational Pseudo-Class","description":"A pseudo-class for matching ancestor and sibling elements","specification":"https://www.w3.org/TR/selectors-4/#has-pseudo","stage":2,"caniuse":"css-has","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:has"},"example":"a:has(> img) {\\n display: block;\\n}","polyfills":[{"type":"JavaScript Library","link":"https://github.com/csstools/css-has-pseudo"},{"type":"PostCSS Plugin","link":"https://github.com/csstools/css-has-pseudo"}]},{"id":"hexadecimal-alpha-notation","title":"Hexadecimal Alpha Notation","description":"A 4 & 8 character hex color notation for specifying the opacity level","specification":"https://www.w3.org/TR/css-color-4/#hex-notation","stage":2,"caniuse":"css-rrggbbaa","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Syntax_2"},"example":"section {\\n background-color: #f3f3f3f3;\\n color: #0003;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-color-hex-alpha"}]},{"id":"hwb-function","title":"`hwb()` Function","description":"A function for specifying colors by hue and then a degree of whiteness and blackness to mix into it","specification":"https://www.w3.org/TR/css-color-4/#funcdef-hwb","stage":2,"example":"p {\\n color: hwb(120 44% 50%);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-color-hwb"}]},{"id":"image-set-function","title":"`image-set()` Function","description":"A function for specifying image sources based on the user’s resolution","specification":"https://www.w3.org/TR/css-images-4/#image-set-notation","stage":2,"caniuse":"css-image-set","example":"p {\\n background-image: image-set(\\n \\"foo.png\\" 1x,\\n \\"foo-2x.png\\" 2x,\\n \\"foo-print.png\\" 600dpi\\n );\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-image-set-function"}]},{"id":"in-out-of-range-pseudo-class","title":"`:in-range` and `:out-of-range` Pseudo-Classes","description":"A pseudo-class for matching elements that have range limitations","specification":"https://www.w3.org/TR/selectors-4/#range-pseudos","stage":2,"caniuse":"css-in-out-of-range","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:in-range"},"example":"input:in-range {\\n background-color: rgba(0, 255, 0, 0.25);\\n}\\ninput:out-of-range {\\n background-color: rgba(255, 0, 0, 0.25);\\n border: 2px solid red;\\n}"},{"id":"lab-function","title":"`lab()` Function","description":"A function for specifying colors expressed in the CIE Lab color space","specification":"https://www.w3.org/TR/css-color-4/#funcdef-lab","stage":2,"example":"body {\\n color: lab(240 50 20);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-lab-function"}]},{"id":"lch-function","title":"`lch()` Function","description":"A function for specifying colors expressed in the CIE Lab color space with chroma and hue","specification":"https://www.w3.org/TR/css-color-4/#funcdef-lch","stage":2,"example":"body {\\n color: lch(53 105 40);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-lab-function"}]},{"id":"logical-properties-and-values","title":"Logical Properties and Values","description":"Flow-relative (left-to-right or right-to-left) properties and values","specification":"https://www.w3.org/TR/css-logical-1/","stage":2,"caniuse":"css-logical-props","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties"},"example":"span:first-child {\\n float: inline-start;\\n margin-inline-start: 10px;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-logical-properties"}]},{"id":"matches-pseudo-class","title":"`:matches()` Matches-Any Pseudo-Class","description":"A pseudo-class for matching elements in a selector list","specification":"https://www.w3.org/TR/selectors-4/#matches-pseudo","stage":2,"caniuse":"css-matches-pseudo","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:matches"},"example":"p:matches(:first-child, .special) {\\n margin-top: 1em;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-selector-matches"}]},{"id":"media-query-ranges","title":"Media Query Ranges","description":"A syntax for defining media query ranges using ordinary comparison operators","specification":"https://www.w3.org/TR/mediaqueries-4/#range-context","stage":3,"docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax_improvements_in_Level_4"},"example":"@media (width < 480px) {}\\n\\n@media (480px <= width < 768px) {}\\n\\n@media (width >= 768px) {}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-media-minmax"}]},{"id":"nesting-rules","title":"Nesting Rules","description":"A syntax for nesting relative rules within rules","specification":"https://drafts.csswg.org/css-nesting-1/","stage":1,"example":"article {\\n & p {\\n color: #333;\\n }\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-nesting"}]},{"id":"not-pseudo-class","title":"`:not()` Negation List Pseudo-Class","description":"A pseudo-class for ignoring elements in a selector list","specification":"https://www.w3.org/TR/selectors-4/#negation-pseudo","stage":2,"caniuse":"css-not-sel-list","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:not"},"example":"p:not(:first-child, .special) {\\n margin-top: 1em;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-selector-not"}]},{"id":"overflow-property","title":"`overflow` Shorthand Property","description":"A property for defining `overflow-x` and `overflow-y`","specification":"https://www.w3.org/TR/css-overflow-3/#propdef-overflow","stage":2,"caniuse":"css-overflow","caniuse-compat":{"and_chr":{"68":"y"},"and_ff":{"61":"y"},"chrome":{"68":"y"},"firefox":{"61":"y"}},"docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/overflow"},"example":"html {\\n overflow: hidden auto;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-overflow-shorthand"}]},{"id":"overflow-wrap-property","title":"`overflow-wrap` Property","description":"A property for defining whether to insert line breaks within words to prevent overflowing","specification":"https://www.w3.org/TR/css-text-3/#overflow-wrap-property","stage":2,"caniuse":"wordwrap","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap"},"example":"p {\\n overflow-wrap: break-word;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/mattdimu/postcss-replace-overflow-wrap"}]},{"id":"overscroll-behavior-property","title":"`overscroll-behavior` Property","description":"Properties for controlling when the scroll position of a scroll container reaches the edge of a scrollport","specification":"https://drafts.csswg.org/css-overscroll-behavior","stage":1,"caniuse":"css-overscroll-behavior","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior"},"example":".messages {\\n height: 220px;\\n overflow: auto;\\n overscroll-behavior-y: contain;\\n}\\n\\nbody {\\n margin: 0;\\n overscroll-behavior: none;\\n}"},{"id":"place-properties","title":"Place Properties","description":"Properties for defining alignment within a layout","specification":"https://www.w3.org/TR/css-align-3/#place-items-property","stage":2,"caniuse-compat":{"chrome":{"59":"y"},"firefox":{"45":"y"}},"docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/place-content"},"example":".example {\\n place-content: flex-end;\\n place-items: center / space-between;\\n place-self: flex-start / center;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-place"}]},{"id":"prefers-color-scheme-query","title":"`prefers-color-scheme` Media Query","description":"A media query to detect if the user has requested the system use a light or dark color theme","specification":"https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme","stage":1,"caniuse":"prefers-color-scheme","caniuse-compat":{"ios_saf":{"12.1":"y"},"safari":{"12.1":"y"}},"example":"body {\\n background-color: white;\\n color: black;\\n}\\n\\n@media (prefers-color-scheme: dark) {\\n body {\\n background-color: black;\\n color: white;\\n }\\n}","polyfills":[{"type":"JavaScript Library","link":"https://github.com/csstools/css-prefers-color-scheme"},{"type":"PostCSS Plugin","link":"https://github.com/csstools/css-prefers-color-scheme"}]},{"id":"prefers-reduced-motion-query","title":"`prefers-reduced-motion` Media Query","description":"A media query to detect if the user has requested less animation and general motion on the page","specification":"https://drafts.csswg.org/mediaqueries-5/#prefers-reduced-motion","stage":1,"caniuse":"prefers-reduced-motion","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion"},"example":".animation {\\n animation: vibrate 0.3s linear infinite both; \\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n .animation {\\n animation: none;\\n }\\n}"},{"id":"read-only-write-pseudo-class","title":"`:read-only` and `:read-write` selectors","description":"Pseudo-classes to match elements which are considered user-alterable","specification":"https://www.w3.org/TR/selectors-4/#rw-pseudos","stage":2,"caniuse":"css-read-only-write","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:read-only"},"example":"input:read-only {\\n background-color: #ccc;\\n}"},{"id":"rebeccapurple-color","title":"`rebeccapurple` Color","description":"A particularly lovely shade of purple in memory of Rebecca Alison Meyer","specification":"https://www.w3.org/TR/css-color-4/#valdef-color-rebeccapurple","stage":2,"caniuse":"css-rebeccapurple","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/color_value"},"example":"html {\\n color: rebeccapurple;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-color-rebeccapurple"}]},{"id":"system-ui-font-family","title":"`system-ui` Font Family","description":"A generic font used to match the user’s interface","specification":"https://www.w3.org/TR/css-fonts-4/#system-ui-def","stage":2,"caniuse":"font-family-system-ui","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Syntax"},"example":"body {\\n font-family: system-ui;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/JLHwung/postcss-font-family-system-ui"}]},{"id":"when-else-rules","title":"When/Else Rules","description":"At-rules for specifying media queries and support queries in a single grammar","specification":"https://tabatkins.github.io/specs/css-when-else/","stage":0,"example":"@when media(width >= 640px) and (supports(display: flex) or supports(display: grid)) {\\n /* A */\\n} @else media(pointer: coarse) {\\n /* B */\\n} @else {\\n /* C */\\n}"},{"id":"where-pseudo-class","title":"`:where()` Zero-Specificity Pseudo-Class","description":"A pseudo-class for matching elements in a selector list without contributing specificity","specification":"https://drafts.csswg.org/selectors-4/#where-pseudo","stage":1,"example":"a:where(:not(:hover)) {\\n text-decoration: none;\\n}"}]')},9614:e=>{"use strict";e.exports=JSON.parse('[{"prop":"animation","initial":"${animation-name} ${animation-duration} ${animation-timing-function} ${animation-delay} ${animation-iteration-count} ${animation-direction} ${animation-fill-mode} ${animation-play-state}","combined":true},{"prop":"animation-delay","initial":"0s"},{"prop":"animation-direction","initial":"normal"},{"prop":"animation-duration","initial":"0s"},{"prop":"animation-fill-mode","initial":"none"},{"prop":"animation-iteration-count","initial":"1"},{"prop":"animation-name","initial":"none"},{"prop":"animation-play-state","initial":"running"},{"prop":"animation-timing-function","initial":"ease"},{"prop":"backface-visibility","initial":"visible","basic":true},{"prop":"background","initial":"${background-color} ${background-image} ${background-repeat} ${background-position} / ${background-size} ${background-origin} ${background-clip} ${background-attachment}","combined":true},{"prop":"background-attachment","initial":"scroll"},{"prop":"background-clip","initial":"border-box"},{"prop":"background-color","initial":"transparent"},{"prop":"background-image","initial":"none"},{"prop":"background-origin","initial":"padding-box"},{"prop":"background-position","initial":"0 0"},{"prop":"background-position-x","initial":"0"},{"prop":"background-position-y","initial":"0"},{"prop":"background-repeat","initial":"repeat"},{"prop":"background-size","initial":"auto auto"},{"prop":"border","initial":"${border-width} ${border-style} ${border-color}","combined":true},{"prop":"border-style","initial":"none"},{"prop":"border-width","initial":"medium"},{"prop":"border-color","initial":"currentColor"},{"prop":"border-bottom","initial":"0"},{"prop":"border-bottom-color","initial":"currentColor"},{"prop":"border-bottom-left-radius","initial":"0"},{"prop":"border-bottom-right-radius","initial":"0"},{"prop":"border-bottom-style","initial":"none"},{"prop":"border-bottom-width","initial":"medium"},{"prop":"border-collapse","initial":"separate","basic":true,"inherited":true},{"prop":"border-image","initial":"none","basic":true},{"prop":"border-left","initial":"0"},{"prop":"border-left-color","initial":"currentColor"},{"prop":"border-left-style","initial":"none"},{"prop":"border-left-width","initial":"medium"},{"prop":"border-radius","initial":"0","basic":true},{"prop":"border-right","initial":"0"},{"prop":"border-right-color","initial":"currentColor"},{"prop":"border-right-style","initial":"none"},{"prop":"border-right-width","initial":"medium"},{"prop":"border-spacing","initial":"0","basic":true,"inherited":true},{"prop":"border-top","initial":"0"},{"prop":"border-top-color","initial":"currentColor"},{"prop":"border-top-left-radius","initial":"0"},{"prop":"border-top-right-radius","initial":"0"},{"prop":"border-top-style","initial":"none"},{"prop":"border-top-width","initial":"medium"},{"prop":"bottom","initial":"auto","basic":true},{"prop":"box-shadow","initial":"none","basic":true},{"prop":"box-sizing","initial":"content-box","basic":true},{"prop":"caption-side","initial":"top","basic":true,"inherited":true},{"prop":"clear","initial":"none","basic":true},{"prop":"clip","initial":"auto","basic":true},{"prop":"color","initial":"#000","basic":true},{"prop":"columns","initial":"auto","basic":true},{"prop":"column-count","initial":"auto","basic":true},{"prop":"column-fill","initial":"balance","basic":true},{"prop":"column-gap","initial":"normal","basic":true},{"prop":"column-rule","initial":"${column-rule-width} ${column-rule-style} ${column-rule-color}","combined":true},{"prop":"column-rule-color","initial":"currentColor"},{"prop":"column-rule-style","initial":"none"},{"prop":"column-rule-width","initial":"medium"},{"prop":"column-span","initial":"1","basic":true},{"prop":"column-width","initial":"auto","basic":true},{"prop":"content","initial":"normal","basic":true},{"prop":"counter-increment","initial":"none","basic":true},{"prop":"counter-reset","initial":"none","basic":true},{"prop":"cursor","initial":"auto","basic":true,"inherited":true},{"prop":"direction","initial":"ltr","basic":true,"inherited":true},{"prop":"display","initial":"inline","basic":true},{"prop":"empty-cells","initial":"show","basic":true,"inherited":true},{"prop":"float","initial":"none","basic":true},{"prop":"font","contains":["font-style","font-variant","font-weight","font-stretch","font-size","line-height","font-family"],"basic":true,"inherited":true},{"prop":"font-family","initial":"serif"},{"prop":"font-size","initial":"medium"},{"prop":"font-style","initial":"normal"},{"prop":"font-variant","initial":"normal"},{"prop":"font-weight","initial":"normal"},{"prop":"font-stretch","initial":"normal"},{"prop":"line-height","initial":"normal","inherited":true},{"prop":"height","initial":"auto","basic":true},{"prop":"hyphens","initial":"none","basic":true,"inherited":true},{"prop":"left","initial":"auto","basic":true},{"prop":"letter-spacing","initial":"normal","basic":true,"inherited":true},{"prop":"list-style","initial":"${list-style-type} ${list-style-position} ${list-style-image}","combined":true,"inherited":true},{"prop":"list-style-image","initial":"none"},{"prop":"list-style-position","initial":"outside"},{"prop":"list-style-type","initial":"disc"},{"prop":"margin","initial":"0","basic":true},{"prop":"margin-bottom","initial":"0"},{"prop":"margin-left","initial":"0"},{"prop":"margin-right","initial":"0"},{"prop":"margin-top","initial":"0"},{"prop":"max-height","initial":"none","basic":true},{"prop":"max-width","initial":"none","basic":true},{"prop":"min-height","initial":"0","basic":true},{"prop":"min-width","initial":"0","basic":true},{"prop":"opacity","initial":"1","basic":true},{"prop":"orphans","initial":"2","basic":true},{"prop":"outline","initial":"${outline-width} ${outline-style} ${outline-color}","combined":true},{"prop":"outline-color","initial":"invert"},{"prop":"outline-style","initial":"none"},{"prop":"outline-width","initial":"medium"},{"prop":"overflow","initial":"visible","basic":true},{"prop":"overflow-x","initial":"visible","basic":true},{"prop":"overflow-y","initial":"visible","basic":true},{"prop":"padding","initial":"0","basic":true},{"prop":"padding-bottom","initial":"0"},{"prop":"padding-left","initial":"0"},{"prop":"padding-right","initial":"0"},{"prop":"padding-top","initial":"0"},{"prop":"page-break-after","initial":"auto","basic":true},{"prop":"page-break-before","initial":"auto","basic":true},{"prop":"page-break-inside","initial":"auto","basic":true},{"prop":"perspective","initial":"none","basic":true},{"prop":"perspective-origin","initial":"50% 50%","basic":true},{"prop":"position","initial":"static","basic":true},{"prop":"quotes","initial":"“ ” ‘ ’"},{"prop":"right","initial":"auto","basic":true},{"prop":"tab-size","initial":"8","basic":true,"inherited":true},{"prop":"table-layout","initial":"auto","basic":true},{"prop":"text-align","initial":"left","basic":true,"inherited":true},{"prop":"text-align-last","initial":"auto","basic":true,"inherited":true},{"prop":"text-decoration","initial":"${text-decoration-line}","combined":true},{"prop":"text-decoration-color","initial":"inherited"},{"prop":"text-decoration-color","initial":"currentColor"},{"prop":"text-decoration-line","initial":"none"},{"prop":"text-decoration-style","initial":"solid"},{"prop":"text-indent","initial":"0","basic":true,"inherited":true},{"prop":"text-shadow","initial":"none","basic":true,"inherited":true},{"prop":"text-transform","initial":"none","basic":true,"inherited":true},{"prop":"top","initial":"auto","basic":true},{"prop":"transform","initial":"none","basic":true},{"prop":"transform-origin","initial":"50% 50% 0","basic":true},{"prop":"transform-style","initial":"flat","basic":true},{"prop":"transition","initial":"${transition-property} ${transition-duration} ${transition-timing-function} ${transition-delay}","combined":true},{"prop":"transition-delay","initial":"0s"},{"prop":"transition-duration","initial":"0s"},{"prop":"transition-property","initial":"none"},{"prop":"transition-timing-function","initial":"ease"},{"prop":"unicode-bidi","initial":"normal","basic":true},{"prop":"vertical-align","initial":"baseline","basic":true},{"prop":"visibility","initial":"visible","basic":true,"inherited":true},{"prop":"white-space","initial":"normal","basic":true,"inherited":true},{"prop":"widows","initial":"2","basic":true,"inherited":true},{"prop":"width","initial":"auto","basic":true},{"prop":"word-spacing","initial":"normal","basic":true,"inherited":true},{"prop":"z-index","initial":"auto","basic":true}]')},4567:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});function rgb2hue(e,r,t){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;var i=rgb2value(e,r,t);var o=rgb2whiteness(e,r,t);var s=i-o;if(s){var a=i===e?(r-t)/s:i===r?(t-e)/s:(e-r)/s;var u=i===e?a<0?360/60:0/60:i===r?120/60:240/60;var f=(a+u)*60;return f}else{return n}}function hue2rgb(e,r,t){var n=t<0?t+360:t>360?t-360:t;var i=n*6<360?e+(r-e)*n/60:n*2<360?r:n*3<720?e+(r-e)*(240-n)/60:e;return i}function rgb2value(e,r,t){var n=Math.max(e,r,t);return n}function rgb2whiteness(e,r,t){var n=Math.min(e,r,t);return n}function matrix(e,r){return r.map(function(r){return r.reduce(function(r,t,n){return r+e[n]*t},0)})}var t=96.42;var n=100;var i=82.49;var o=Math.pow(6,3)/Math.pow(29,3);var s=Math.pow(29,3)/Math.pow(3,3);function rgb2hsl(e,r,t,n){var i=rgb2hue(e,r,t,n);var o=rgb2value(e,r,t);var s=rgb2whiteness(e,r,t);var a=o-s;var u=(o+s)/2;var f=a===0?0:a/(100-Math.abs(2*u-100))*100;return[i,f,u]}function hsl2rgb(e,r,t){var n=t<=50?t*(r+100)/100:t+r-t*r/100;var i=t*2-n;var o=[hue2rgb(i,n,e+120),hue2rgb(i,n,e),hue2rgb(i,n,e-120)],s=o[0],a=o[1],u=o[2];return[s,a,u]}var a=function(){function sliceIterator(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(i)throw o}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function rgb2hwb(e,r,t,n){var i=rgb2hue(e,r,t,n);var o=rgb2whiteness(e,r,t);var s=rgb2value(e,r,t);var a=100-s;return[i,o,a]}function hwb2rgb(e,r,t,n){var i=hsl2rgb(e,100,50,n).map(function(e){return e*(100-r-t)/100+r}),o=a(i,3),s=o[0],u=o[1],f=o[2];return[s,u,f]}var u=function(){function sliceIterator(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(i)throw o}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function rgb2hsv(e,r,t,n){var i=rgb2value(e,r,t);var o=rgb2whiteness(e,r,t);var s=rgb2hue(e,r,t,n);var a=i===o?0:(i-o)/i*100;return[s,a,i]}function hsv2rgb(e,r,t){var n=Math.floor(e/60);var i=e/60-n&1?e/60-n:1-e/60-n;var o=t*(100-r)/100;var s=t*(100-r*i)/100;var a=n===5?[t,o,s]:n===4?[s,o,t]:n===3?[o,s,t]:n===2?[o,t,s]:n===1?[s,t,o]:[t,s,o],f=u(a,3),c=f[0],l=f[1],p=f[2];return[c,l,p]}var f=function(){function sliceIterator(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(i)throw o}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function rgb2xyz(e,r,t){var n=[e,r,t].map(function(e){return e>4.045?Math.pow((e+5.5)/105.5,2.4)*100:e/12.92}),i=f(n,3),o=i[0],s=i[1],a=i[2];var u=matrix([o,s,a],[[.4124564,.3575761,.1804375],[.2126729,.7151522,.072175],[.0193339,.119192,.9503041]]),c=f(u,3),l=c[0],p=c[1],h=c[2];return[l,p,h]}function xyz2rgb(e,r,t){var n=matrix([e,r,t],[[3.2404542,-1.5371385,-.4985314],[-.969266,1.8760108,.041556],[.0556434,-.2040259,1.0572252]]),i=f(n,3),o=i[0],s=i[1],a=i[2];var u=[o,s,a].map(function(e){return e>.31308?1.055*Math.pow(e/100,1/2.4)*100-5.5:12.92*e}),c=f(u,3),l=c[0],p=c[1],h=c[2];return[l,p,h]}function hsl2hsv(e,r,t){var n=r*(t<50?t:100-t)/100;var i=n===0?0:2*n/(t+n)*100;var o=t+n;return[e,i,o]}function hsv2hsl(e,r,t){var n=(200-r)*t/100;var i=n===0||n===200?0:r*t/100/(n<=100?n:200-n)*100,o=n*5/10;return[e,i,o]}function hwb2hsv(e,r,t){var n=e,i=t===100?0:100-r/(100-t)*100,o=100-t;return[n,i,o]}function hsv2hwb(e,r,t){var n=e,i=(100-r)*t/100,o=100-t;return[n,i,o]}var c=function(){function sliceIterator(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(i)throw o}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function lab2xyz(e,r,a){var u=(e+16)/116;var f=r/500+u;var l=u-a/200;var p=Math.pow(f,3)>o?Math.pow(f,3):(116*f-16)/s,h=e>s*o?Math.pow((e+16)/116,3):e/s,B=Math.pow(l,3)>o?Math.pow(l,3):(116*l-16)/s;var v=matrix([p*t,h*n,B*i],[[.9555766,-.0230393,.0631636],[-.0282895,1.0099416,.0210077],[.0122982,-.020483,1.3299098]]),d=c(v,3),b=d[0],y=d[1],g=d[2];return[b,y,g]}function xyz2lab(e,r,a){var u=matrix([e,r,a],[[1.0478112,.0228866,-.050127],[.0295424,.9904844,-.0170491],[-.0092345,.0150436,.7521316]]),f=c(u,3),l=f[0],p=f[1],h=f[2];var B=[l/t,p/n,h/i].map(function(e){return e>o?Math.cbrt(e):(s*e+16)/116}),v=c(B,3),d=v[0],b=v[1],y=v[2];var g=116*b-16,m=500*(d-b),C=200*(b-y);return[g,m,C]}function lab2lch(e,r,t){var n=[Math.sqrt(Math.pow(r,2)+Math.pow(t,2)),Math.atan2(t,r)*180/Math.PI],i=n[0],o=n[1];return[e,i,o]}function lch2lab(e,r,t){var n=r*Math.cos(t*Math.PI/180),i=r*Math.sin(t*Math.PI/180);return[e,n,i]}var l=function(){function sliceIterator(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(i)throw o}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function rgb2lab(e,r,t){var n=rgb2xyz(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=xyz2lab(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function lab2rgb(e,r,t){var n=lab2xyz(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=xyz2rgb(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function rgb2lch(e,r,t){var n=rgb2xyz(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=xyz2lab(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=lab2lch(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];return[d,b,y]}function lch2rgb(e,r,t){var n=lch2lab(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=lab2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2rgb(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];return[d,b,y]}function hwb2hsl(e,r,t){var n=hwb2hsv(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=hsv2hsl(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function hsl2hwb(e,r,t){var n=hsl2hsv(e,r,t),i=l(n,3),o=i[1],s=i[2];var a=hsv2hwb(e,o,s),u=l(a,3),f=u[1],c=u[2];return[e,f,c]}function hsl2lab(e,r,t){var n=hsl2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];return[d,b,y]}function lab2hsl(e,r,t,n){var i=lab2xyz(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=xyz2rgb(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=rgb2hsl(p,h,B,n),d=l(v,3),b=d[0],y=d[1],g=d[2];return[b,y,g]}function hsl2lch(e,r,t){var n=hsl2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];var g=lab2lch(d,b,y),m=l(g,3),C=m[0],w=m[1],S=m[2];return[C,w,S]}function lch2hsl(e,r,t,n){var i=lch2lab(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=lab2xyz(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=xyz2rgb(p,h,B),d=l(v,3),b=d[0],y=d[1],g=d[2];var m=rgb2hsl(b,y,g,n),C=l(m,3),w=C[0],S=C[1],O=C[2];return[w,S,O]}function hsl2xyz(e,r,t){var n=hsl2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function xyz2hsl(e,r,t,n){var i=xyz2rgb(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=rgb2hsl(s,a,u,n),c=l(f,3),p=c[0],h=c[1],B=c[2];return[p,h,B]}function hwb2lab(e,r,t){var n=hwb2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];return[d,b,y]}function lab2hwb(e,r,t,n){var i=lab2xyz(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=xyz2rgb(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=rgb2hwb(p,h,B,n),d=l(v,3),b=d[0],y=d[1],g=d[2];return[b,y,g]}function hwb2lch(e,r,t){var n=hwb2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];var g=lab2lch(d,b,y),m=l(g,3),C=m[0],w=m[1],S=m[2];return[C,w,S]}function lch2hwb(e,r,t,n){var i=lch2lab(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=lab2xyz(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=xyz2rgb(p,h,B),d=l(v,3),b=d[0],y=d[1],g=d[2];var m=rgb2hwb(b,y,g,n),C=l(m,3),w=C[0],S=C[1],O=C[2];return[w,S,O]}function hwb2xyz(e,r,t){var n=hwb2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function xyz2hwb(e,r,t,n){var i=xyz2rgb(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=rgb2hwb(s,a,u,n),c=l(f,3),p=c[0],h=c[1],B=c[2];return[p,h,B]}function hsv2lab(e,r,t){var n=hsv2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];return[d,b,y]}function lab2hsv(e,r,t,n){var i=lab2xyz(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=xyz2rgb(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=rgb2hsv(p,h,B,n),d=l(v,3),b=d[0],y=d[1],g=d[2];return[b,y,g]}function hsv2lch(e,r,t){var n=hsv2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];var g=lab2lch(d,b,y),m=l(g,3),C=m[0],w=m[1],S=m[2];return[C,w,S]}function lch2hsv(e,r,t,n){var i=lch2lab(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=lab2xyz(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=xyz2rgb(p,h,B),d=l(v,3),b=d[0],y=d[1],g=d[2];var m=rgb2hsv(b,y,g,n),C=l(m,3),w=C[0],S=C[1],O=C[2];return[w,S,O]}function hsv2xyz(e,r,t){var n=hsv2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function xyz2hsv(e,r,t,n){var i=xyz2rgb(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=rgb2hsv(s,a,u,n),c=l(f,3),p=c[0],h=c[1],B=c[2];return[p,h,B]}function xyz2lch(e,r,t){var n=xyz2lab(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=lab2lch(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function lch2xyz(e,r,t){var n=lch2lab(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=lab2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}var p={rgb2hsl:rgb2hsl,rgb2hwb:rgb2hwb,rgb2lab:rgb2lab,rgb2lch:rgb2lch,rgb2hsv:rgb2hsv,rgb2xyz:rgb2xyz,hsl2rgb:hsl2rgb,hsl2hwb:hsl2hwb,hsl2lab:hsl2lab,hsl2lch:hsl2lch,hsl2hsv:hsl2hsv,hsl2xyz:hsl2xyz,hwb2rgb:hwb2rgb,hwb2hsl:hwb2hsl,hwb2lab:hwb2lab,hwb2lch:hwb2lch,hwb2hsv:hwb2hsv,hwb2xyz:hwb2xyz,lab2rgb:lab2rgb,lab2hsl:lab2hsl,lab2hwb:lab2hwb,lab2lch:lab2lch,lab2hsv:lab2hsv,lab2xyz:lab2xyz,lch2rgb:lch2rgb,lch2hsl:lch2hsl,lch2hwb:lch2hwb,lch2lab:lch2lab,lch2hsv:lch2hsv,lch2xyz:lch2xyz,hsv2rgb:hsv2rgb,hsv2hsl:hsv2hsl,hsv2hwb:hsv2hwb,hsv2lab:hsv2lab,hsv2lch:hsv2lch,hsv2xyz:hsv2xyz,xyz2rgb:xyz2rgb,xyz2hsl:xyz2hsl,xyz2hwb:xyz2hwb,xyz2lab:xyz2lab,xyz2lch:xyz2lch,xyz2hsv:xyz2hsv,rgb2hue:rgb2hue};r.rgb2hsl=rgb2hsl;r.rgb2hwb=rgb2hwb;r.rgb2lab=rgb2lab;r.rgb2lch=rgb2lch;r.rgb2hsv=rgb2hsv;r.rgb2xyz=rgb2xyz;r.hsl2rgb=hsl2rgb;r.hsl2hwb=hsl2hwb;r.hsl2lab=hsl2lab;r.hsl2lch=hsl2lch;r.hsl2hsv=hsl2hsv;r.hsl2xyz=hsl2xyz;r.hwb2rgb=hwb2rgb;r.hwb2hsl=hwb2hsl;r.hwb2lab=hwb2lab;r.hwb2lch=hwb2lch;r.hwb2hsv=hwb2hsv;r.hwb2xyz=hwb2xyz;r.lab2rgb=lab2rgb;r.lab2hsl=lab2hsl;r.lab2hwb=lab2hwb;r.lab2lch=lab2lch;r.lab2hsv=lab2hsv;r.lab2xyz=lab2xyz;r.lch2rgb=lch2rgb;r.lch2hsl=lch2hsl;r.lch2hwb=lch2hwb;r.lch2lab=lch2lab;r.lch2hsv=lch2hsv;r.lch2xyz=lch2xyz;r.hsv2rgb=hsv2rgb;r.hsv2hsl=hsv2hsl;r.hsv2hwb=hsv2hwb;r.hsv2lab=hsv2lab;r.hsv2lch=hsv2lch;r.hsv2xyz=hsv2xyz;r.xyz2rgb=xyz2rgb;r.xyz2hsl=xyz2hsl;r.xyz2hwb=xyz2hwb;r.xyz2lab=xyz2lab;r.xyz2lch=xyz2lch;r.xyz2hsv=xyz2hsv;r.rgb2hue=rgb2hue;r.default=p},4394:(e,r,t)=>{"use strict";var n=t(4338).feature;function browsersSort(e,r){e=e.split(" ");r=r.split(" ");if(e[0]>r[0]){return 1}else if(e[0]=t.length)break;s=t[o++]}else{o=t.next();if(o.done)break;s=o.value}var a=s;i[a]=Object.assign({},r)}}function add(e,r){for(var t=e,n=Array.isArray(t),o=0,t=n?t:t[Symbol.iterator]();;){var s;if(n){if(o>=t.length)break;s=t[o++]}else{o=t.next();if(o.done)break;s=o.value}var a=s;i[a].browsers=i[a].browsers.concat(r.browsers).sort(browsersSort)}}e.exports=i;f(t(9888),function(e){return prefix(["border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],{mistakes:["-khtml-","-ms-","-o-"],feature:"border-radius",browsers:e})});f(t(5861),function(e){return prefix(["box-shadow"],{mistakes:["-khtml-"],feature:"css-boxshadow",browsers:e})});f(t(8252),function(e){return prefix(["animation","animation-name","animation-duration","animation-delay","animation-direction","animation-fill-mode","animation-iteration-count","animation-play-state","animation-timing-function","@keyframes"],{mistakes:["-khtml-","-ms-"],feature:"css-animation",browsers:e})});f(t(5056),function(e){return prefix(["transition","transition-property","transition-duration","transition-delay","transition-timing-function"],{mistakes:["-khtml-","-ms-"],browsers:e,feature:"css-transitions"})});f(t(762),function(e){return prefix(["transform","transform-origin"],{feature:"transforms2d",browsers:e})});var o=t(58);f(o,function(e){prefix(["perspective","perspective-origin"],{feature:"transforms3d",browsers:e});return prefix(["transform-style"],{mistakes:["-ms-","-o-"],browsers:e,feature:"transforms3d"})});f(o,{match:/y\sx|y\s#2/},function(e){return prefix(["backface-visibility"],{mistakes:["-ms-","-o-"],feature:"transforms3d",browsers:e})});var s=t(1407);f(s,{match:/y\sx/},function(e){return prefix(["linear-gradient","repeating-linear-gradient","radial-gradient","repeating-radial-gradient"],{props:["background","background-image","border-image","mask","list-style","list-style-image","content","mask-image"],mistakes:["-ms-"],feature:"css-gradients",browsers:e})});f(s,{match:/a\sx/},function(e){e=e.map(function(e){if(/firefox|op/.test(e)){return e}else{return e+" old"}});return add(["linear-gradient","repeating-linear-gradient","radial-gradient","repeating-radial-gradient"],{feature:"css-gradients",browsers:e})});f(t(7759),function(e){return prefix(["box-sizing"],{feature:"css3-boxsizing",browsers:e})});f(t(9237),function(e){return prefix(["filter"],{feature:"css-filters",browsers:e})});f(t(6192),function(e){return prefix(["filter-function"],{props:["background","background-image","border-image","mask","list-style","list-style-image","content","mask-image"],feature:"css-filter-function",browsers:e})});var a=t(3613);f(a,{match:/y\sx|y\s#2/},function(e){return prefix(["backdrop-filter"],{feature:"css-backdrop-filter",browsers:e})});f(t(9666),function(e){return prefix(["element"],{props:["background","background-image","border-image","mask","list-style","list-style-image","content","mask-image"],feature:"css-element-function",browsers:e})});f(t(1448),function(e){prefix(["columns","column-width","column-gap","column-rule","column-rule-color","column-rule-width","column-count","column-rule-style","column-span","column-fill"],{feature:"multicolumn",browsers:e});var r=e.filter(function(e){return!/firefox/.test(e)});prefix(["break-before","break-after","break-inside"],{feature:"multicolumn",browsers:r})});f(t(7511),function(e){return prefix(["user-select"],{mistakes:["-khtml-"],feature:"user-select-none",browsers:e})});var u=t(3714);f(u,{match:/a\sx/},function(e){e=e.map(function(e){if(/ie|firefox/.test(e)){return e}else{return e+" 2009"}});prefix(["display-flex","inline-flex"],{props:["display"],feature:"flexbox",browsers:e});prefix(["flex","flex-grow","flex-shrink","flex-basis"],{feature:"flexbox",browsers:e});prefix(["flex-direction","flex-wrap","flex-flow","justify-content","order","align-items","align-self","align-content"],{feature:"flexbox",browsers:e})});f(u,{match:/y\sx/},function(e){add(["display-flex","inline-flex"],{feature:"flexbox",browsers:e});add(["flex","flex-grow","flex-shrink","flex-basis"],{feature:"flexbox",browsers:e});add(["flex-direction","flex-wrap","flex-flow","justify-content","order","align-items","align-self","align-content"],{feature:"flexbox",browsers:e})});f(t(3807),function(e){return prefix(["calc"],{props:["*"],feature:"calc",browsers:e})});f(t(2259),function(e){return prefix(["background-origin","background-size"],{feature:"background-img-opts",browsers:e})});f(t(1302),function(e){return prefix(["background-clip"],{feature:"background-clip-text",browsers:e})});f(t(7011),function(e){return prefix(["font-feature-settings","font-variant-ligatures","font-language-override"],{feature:"font-feature",browsers:e})});f(t(9195),function(e){return prefix(["font-kerning"],{feature:"font-kerning",browsers:e})});f(t(9847),function(e){return prefix(["border-image"],{feature:"border-image",browsers:e})});f(t(3347),function(e){return prefix(["::selection"],{selector:true,feature:"css-selection",browsers:e})});f(t(5117),function(e){prefix(["::placeholder"],{selector:true,feature:"css-placeholder",browsers:e.concat(["ie 10 old","ie 11 old","firefox 18 old"])})});f(t(9747),function(e){return prefix(["hyphens"],{feature:"css-hyphens",browsers:e})});var c=t(5833);f(c,function(e){return prefix([":fullscreen"],{selector:true,feature:"fullscreen",browsers:e})});f(c,{match:/x(\s#2|$)/},function(e){return prefix(["::backdrop"],{selector:true,feature:"fullscreen",browsers:e})});f(t(9807),function(e){return prefix(["tab-size"],{feature:"css3-tabsize",browsers:e})});var l=t(3794);var p=["width","min-width","max-width","height","min-height","max-height","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size","grid","grid-template","grid-template-rows","grid-template-columns","grid-auto-columns","grid-auto-rows"];f(l,function(e){return prefix(["max-content","min-content"],{props:p,feature:"intrinsic-width",browsers:e})});f(l,{match:/x|\s#4/},function(e){return prefix(["fill","fill-available","stretch"],{props:p,feature:"intrinsic-width",browsers:e})});f(l,{match:/x|\s#5/},function(e){return prefix(["fit-content"],{props:p,feature:"intrinsic-width",browsers:e})});f(t(8546),function(e){return prefix(["zoom-in","zoom-out"],{props:["cursor"],feature:"css3-cursors-newer",browsers:e})});f(t(4528),function(e){return prefix(["grab","grabbing"],{props:["cursor"],feature:"css3-cursors-grab",browsers:e})});f(t(3727),function(e){return prefix(["sticky"],{props:["position"],feature:"css-sticky",browsers:e})});f(t(6714),function(e){return prefix(["touch-action"],{feature:"pointer",browsers:e})});var h=t(6848);f(h,function(e){return prefix(["text-decoration-style","text-decoration-color","text-decoration-line","text-decoration"],{feature:"text-decoration",browsers:e})});f(h,{match:/x.*#[235]/},function(e){return prefix(["text-decoration-skip","text-decoration-skip-ink"],{feature:"text-decoration",browsers:e})});f(t(6421),function(e){return prefix(["text-size-adjust"],{feature:"text-size-adjust",browsers:e})});f(t(4613),function(e){prefix(["mask-clip","mask-composite","mask-image","mask-origin","mask-repeat","mask-border-repeat","mask-border-source"],{feature:"css-masks",browsers:e});prefix(["mask","mask-position","mask-size","mask-border","mask-border-outset","mask-border-width","mask-border-slice"],{feature:"css-masks",browsers:e})});f(t(147),function(e){return prefix(["clip-path"],{feature:"css-clip-path",browsers:e})});f(t(4016),function(e){return prefix(["box-decoration-break"],{feature:"css-boxdecorationbreak",browsers:e})});f(t(5147),function(e){return prefix(["object-fit","object-position"],{feature:"object-fit",browsers:e})});f(t(4298),function(e){return prefix(["shape-margin","shape-outside","shape-image-threshold"],{feature:"css-shapes",browsers:e})});f(t(123),function(e){return prefix(["text-overflow"],{feature:"text-overflow",browsers:e})});f(t(1779),function(e){return prefix(["@viewport"],{feature:"css-deviceadaptation",browsers:e})});var B=t(3588);f(B,{match:/( x($| )|a #2)/},function(e){return prefix(["@resolution"],{feature:"css-media-resolution",browsers:e})});f(t(9533),function(e){return prefix(["text-align-last"],{feature:"css-text-align-last",browsers:e})});var v=t(7794);f(v,{match:/y x|a x #1/},function(e){return prefix(["pixelated"],{props:["image-rendering"],feature:"css-crisp-edges",browsers:e})});f(v,{match:/a x #2/},function(e){return prefix(["image-rendering"],{feature:"css-crisp-edges",browsers:e})});var d=t(471);f(d,function(e){return prefix(["border-inline-start","border-inline-end","margin-inline-start","margin-inline-end","padding-inline-start","padding-inline-end"],{feature:"css-logical-props",browsers:e})});f(d,{match:/x\s#2/},function(e){return prefix(["border-block-start","border-block-end","margin-block-start","margin-block-end","padding-block-start","padding-block-end"],{feature:"css-logical-props",browsers:e})});var b=t(8672);f(b,{match:/#2|x/},function(e){return prefix(["appearance"],{feature:"css-appearance",browsers:e})});f(t(87),function(e){return prefix(["scroll-snap-type","scroll-snap-coordinate","scroll-snap-destination","scroll-snap-points-x","scroll-snap-points-y"],{feature:"css-snappoints",browsers:e})});f(t(5969),function(e){return prefix(["flow-into","flow-from","region-fragment"],{feature:"css-regions",browsers:e})});f(t(4197),function(e){return prefix(["image-set"],{props:["background","background-image","border-image","cursor","mask","mask-image","list-style","list-style-image","content"],feature:"css-image-set",browsers:e})});var y=t(8307);f(y,{match:/a|x/},function(e){return prefix(["writing-mode"],{feature:"css-writing-mode",browsers:e})});f(t(3323),function(e){return prefix(["cross-fade"],{props:["background","background-image","border-image","mask","list-style","list-style-image","content","mask-image"],feature:"css-cross-fade",browsers:e})});f(t(3502),function(e){return prefix([":read-only",":read-write"],{selector:true,feature:"css-read-only-write",browsers:e})});f(t(5802),function(e){return prefix(["text-emphasis","text-emphasis-position","text-emphasis-style","text-emphasis-color"],{feature:"text-emphasis",browsers:e})});var g=t(7776);f(g,function(e){prefix(["display-grid","inline-grid"],{props:["display"],feature:"css-grid",browsers:e});prefix(["grid-template-columns","grid-template-rows","grid-row-start","grid-column-start","grid-row-end","grid-column-end","grid-row","grid-column","grid-area","grid-template","grid-template-areas","place-self"],{feature:"css-grid",browsers:e})});f(g,{match:/a x/},function(e){return prefix(["grid-column-align","grid-row-align"],{feature:"css-grid",browsers:e})});f(t(8422),function(e){return prefix(["text-spacing"],{feature:"css-text-spacing",browsers:e})});f(t(1977),function(e){return prefix([":any-link"],{selector:true,feature:"css-any-link",browsers:e})});var m=t(1456);f(m,function(e){return prefix(["isolate"],{props:["unicode-bidi"],feature:"css-unicode-bidi",browsers:e})});f(m,{match:/y x|a x #2/},function(e){return prefix(["plaintext"],{props:["unicode-bidi"],feature:"css-unicode-bidi",browsers:e})});f(m,{match:/y x/},function(e){return prefix(["isolate-override"],{props:["unicode-bidi"],feature:"css-unicode-bidi",browsers:e})});var C=t(3043);f(C,{match:/a #1/},function(e){return prefix(["overscroll-behavior"],{feature:"css-overscroll-behavior",browsers:e})});f(t(664),function(e){return prefix(["color-adjust"],{feature:"css-color-adjust",browsers:e})});f(t(3100),function(e){return prefix(["text-orientation"],{feature:"css-text-orientation",browsers:e})})},7997:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;if(!r||r===s){this.add(e,s)}}};return AtRule}(n);e.exports=i},3501:(e,r,t)=>{"use strict";var n=t(3561);var i=t(4633);var o=t(4338).agents;var s=t(2242);var a=t(2319);var u=t(811);var f=t(4394);var c=t(6741);var l="\n"+" Replace Autoprefixer `browsers` option to Browserslist config.\n"+" Use `browserslist` key in `package.json` or `.browserslistrc` file.\n"+"\n"+" Using `browsers` option can cause errors. Browserslist config \n"+" can be used for Babel, Autoprefixer, postcss-normalize and other tools.\n"+"\n"+" If you really need to use option, rename it to `overrideBrowserslist`.\n"+"\n"+" Learn more at:\n"+" https://github.com/browserslist/browserslist#readme\n"+" https://twitter.com/browserslist\n"+"\n";function isPlainObject(e){return Object.prototype.toString.apply(e)==="[object Object]"}var p={};function timeCapsule(e,r){if(r.browsers.selected.length===0){return}if(r.add.selectors.length>0){return}if(Object.keys(r.add).length>2){return}e.warn("Greetings, time traveller. "+"We are in the golden age of prefix-less CSS, "+"where Autoprefixer is no longer needed for your stylesheet.")}e.exports=i.plugin("autoprefixer",function(){for(var r=arguments.length,t=new Array(r),n=0;n{"use strict";function last(e){return e[e.length-1]}var r={parse:function parse(e){var r=[""];var t=[r];for(var n=e,i=Array.isArray(n),o=0,n=i?n:n[Symbol.iterator]();;){var s;if(i){if(o>=n.length)break;s=n[o++]}else{o=n.next();if(o.done)break;s=o.value}var a=s;if(a==="("){r=[""];last(t).push(r);t.push(r);continue}if(a===")"){t.pop();r=last(t);r.push("");continue}r[r.length-1]+=a}return t[0]},stringify:function stringify(e){var t="";for(var n=e,i=Array.isArray(n),o=0,n=i?n:n[Symbol.iterator]();;){var s;if(i){if(o>=n.length)break;s=n[o++]}else{o=n.next();if(o.done)break;s=o.value}var a=s;if(typeof a==="object"){t+="("+r.stringify(a)+")";continue}t+=a}return t}};e.exports=r},2319:(e,r,t)=>{"use strict";var n=t(3561);var i=t(4338).agents;var o=t(772);var s=function(){Browsers.prefixes=function prefixes(){if(this.prefixesCache){return this.prefixesCache}this.prefixesCache=[];for(var e in i){this.prefixesCache.push("-"+i[e].prefix+"-")}this.prefixesCache=o.uniq(this.prefixesCache).sort(function(e,r){return r.length-e.length});return this.prefixesCache};Browsers.withPrefix=function withPrefix(e){if(!this.prefixesRegexp){this.prefixesRegexp=new RegExp(this.prefixes().join("|"))}return this.prefixesRegexp.test(e)};function Browsers(e,r,t,n){this.data=e;this.options=t||{};this.browserslistOpts=n||{};this.selected=this.parse(r)}var e=Browsers.prototype;e.parse=function parse(e){var r={};for(var t in this.browserslistOpts){r[t]=this.browserslistOpts[t]}r.path=this.options.from;r.env=this.options.env;return n(e,r)};e.prefix=function prefix(e){var r=e.split(" "),t=r[0],n=r[1];var i=this.data[t];var prefix=i.prefix_exceptions&&i.prefix_exceptions[n];if(!prefix){prefix=i.prefix}return"-"+prefix+"-"};e.isSelected=function isSelected(e){return this.selected.includes(e)};return Browsers}();e.exports=s},5753:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=t.length)break;s=t[o++]}else{o=t.next();if(o.done)break;s=o.value}var a=s;if(a===r){continue}if(e.includes(a)){return true}}return false};r.set=function set(e,r){e.prop=this.prefixed(e.prop,r);return e};r.needCascade=function needCascade(e){if(!e._autoprefixerCascade){e._autoprefixerCascade=this.all.options.cascade!==false&&e.raw("before").includes("\n")}return e._autoprefixerCascade};r.maxPrefixed=function maxPrefixed(e,r){if(r._autoprefixerMax){return r._autoprefixerMax}var t=0;for(var n=e,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{s=n.next();if(s.done)break;a=s.value}var u=a;u=o.removeNote(u);if(u.length>t){t=u.length}}r._autoprefixerMax=t;return r._autoprefixerMax};r.calcBefore=function calcBefore(e,r,t){if(t===void 0){t=""}var n=this.maxPrefixed(e,r);var i=n-o.removeNote(t).length;var s=r.raw("before");if(i>0){s+=Array(i).fill(" ").join("")}return s};r.restoreBefore=function restoreBefore(e){var r=e.raw("before").split("\n");var t=r[r.length-1];this.all.group(e).up(function(e){var r=e.raw("before").split("\n");var n=r[r.length-1];if(n.length{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";e.exports=function(e){var r;if(e==="-webkit- 2009"||e==="-moz-"){r=2009}else if(e==="-ms-"){r=2012}else if(e==="-webkit-"){r="final"}if(e==="-webkit- 2009"){e="-webkit-"}return[r,e]}},9315:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=i.length)break;a=i[s++]}else{s=i.next();if(s.done)break;a=s.value}var u=a;if(u.type==="function"&&u.value===this.name){u.nodes=this.newDirection(u.nodes);u.nodes=this.normalize(u.nodes);if(r==="-webkit- old"){var f=this.oldWebkit(u);if(!f){return false}}else{u.nodes=this.convertDirection(u.nodes);u.value=r+u.value}}}return t.toString()};r.replaceFirst=function replaceFirst(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;if(r==="before"&&s.type==="space"){r="at"}else if(r==="at"&&s.value==="at"){r="after"}else if(r==="after"&&s.type==="space"){return true}else if(s.type==="div"){break}else{r="before"}}return false};r.convertDirection=function convertDirection(e){if(e.length>0){if(e[0].value==="to"){this.fixDirection(e)}else if(e[0].value.includes("deg")){this.fixAngle(e)}else if(this.isRadial(e)){this.fixRadial(e)}}return e};r.fixDirection=function fixDirection(e){e.splice(0,2);for(var r=e,t=Array.isArray(r),n=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(n>=r.length)break;i=r[n++]}else{n=r.next();if(n.done)break;i=n.value}var o=i;if(o.type==="div"){break}if(o.type==="word"){o.value=this.revertDirection(o.value)}}};r.fixAngle=function fixAngle(e){var r=e[0].value;r=parseFloat(r);r=Math.abs(450-r)%360;r=this.roundFloat(r,3);e[0].value=r+"deg"};r.fixRadial=function fixRadial(e){var r=[];var t=[];var n,i,o,s,a;for(s=0;s=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u;i[i.length-1].push(f);if(f.type==="div"&&f.value===","){i.push([])}}this.oldDirection(i);this.colorStops(i);e.nodes=[];for(var c=0,l=i;c=n.length)break;s=n[o++]}else{o=n.next();if(o.done)break;s=o.value}var a=s;if(a.type==="word"){t.push(a.value.toLowerCase())}}t=t.join(" ");var u=this.oldDirections[t]||t;e[0]=[{type:"word",value:u},r];return e[0]}};r.cloneDiv=function cloneDiv(e){for(var r=e,t=Array.isArray(r),n=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(n>=r.length)break;i=r[n++]}else{n=r.next();if(n.done)break;i=n.value}var o=i;if(o.type==="div"&&o.value===","){return o}}return{type:"div",value:",",after:" "}};r.colorStops=function colorStops(e){var r=[];for(var t=0;t{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n1){r.cloneBefore({prop:"-ms-grid-rows",value:u({value:"repeat("+d.length+", auto)",gap:v.row}),raws:{}})}c({gap:v,hasColumns:p,decl:r,result:i});var b=o({rows:d,gap:v});s(b,r,i);return r};return GridTemplateAreas}(n);_defineProperty(p,"names",["grid-template-areas"]);e.exports=p},5193:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n0;var b=Boolean(h);var y=Boolean(B);u({gap:c,hasColumns:y,decl:r,result:i});s(v,r,i);if(b&&y||d){r.cloneBefore({prop:"-ms-grid-rows",value:h,raws:{}})}if(y){r.cloneBefore({prop:"-ms-grid-columns",value:B,raws:{}})}return r};return GridTemplate}(n);_defineProperty(c,"names",["grid-template"]);e.exports=c},5224:(e,r,t)=>{"use strict";var n=t(23);var i=t(4633).list;var o=t(772).uniq;var s=t(772).escapeRegexp;var a=t(772).splitSelector;function convert(e){if(e&&e.length===2&&e[0]==="span"&&parseInt(e[1],10)>0){return[false,parseInt(e[1],10)]}if(e&&e.length===1&&parseInt(e[0],10)>0){return[parseInt(e[0],10),false]}return[false,false]}function translate(e,r,t){var n=e[r];var i=e[t];if(!n){return[false,false]}var o=convert(n),s=o[0],a=o[1];var u=convert(i),f=u[0],c=u[1];if(s&&!i){return[s,false]}if(a&&f){return[f-a,a]}if(s&&c){return[s,c]}if(s&&f){return[s,f-s]}return[false,false]}function parse(e){var r=n(e.value);var t=[];var i=0;t[i]=[];for(var o=r.nodes,s=Array.isArray(o),a=0,o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u;if(f.type==="div"){i+=1;t[i]=[]}else if(f.type==="word"){t[i].push(f.value)}}return t}function insertDecl(e,r,t){if(t&&!e.parent.some(function(e){return e.prop==="-ms-"+r})){e.cloneBefore({prop:"-ms-"+r,value:t.toString()})}}function prefixTrackProp(e){var r=e.prop,t=e.prefix;return t+r.replace("template-","")}function transformRepeat(e,r){var t=e.nodes;var i=r.gap;var o=t.reduce(function(e,r){if(r.type==="div"&&r.value===","){e.key="size"}else{e[e.key].push(n.stringify(r))}return e},{key:"count",size:[],count:[]}),s=o.count,a=o.size;if(i){var u=function(){a=a.filter(function(e){return e.trim()});var e=[];var r=function _loop(r){a.forEach(function(t,n){if(n>0||r>1){e.push(i)}e.push(t)})};for(var t=1;t<=s;t++){r(t)}return{v:e.join(" ")}}();if(typeof u==="object")return u.v}return"("+a.join("")+")["+s.join("")+"]"}function prefixTrackValue(e){var r=e.value,t=e.gap;var i=n(r).nodes.reduce(function(e,r){if(r.type==="function"&&r.value==="repeat"){return e.concat({type:"word",value:transformRepeat(r,{gap:t})})}if(t&&r.type==="space"){return e.concat({type:"space",value:" "},{type:"word",value:t},r)}return e.concat(r)},[]);return n.stringify(i)}var u=/^\.+$/;function track(e,r){return{start:e,end:r,span:r-e}}function getColumns(e){return e.trim().split(/\s+/g)}function parseGridAreas(e){var r=e.rows,t=e.gap;return r.reduce(function(e,r,n){if(t.row)n*=2;if(r.trim()==="")return e;getColumns(r).forEach(function(r,i){if(u.test(r))return;if(t.column)i*=2;if(typeof e[r]==="undefined"){e[r]={column:track(i+1,i+2),row:track(n+1,n+2)}}else{var o=e[r],s=o.column,a=o.row;s.start=Math.min(s.start,i+1);s.end=Math.max(s.end,i+2);s.span=s.end-s.start;a.start=Math.min(a.start,n+1);a.end=Math.max(a.end,n+2);a.span=a.end-a.start}});return e},{})}function testTrack(e){return e.type==="word"&&/^\[.+]$/.test(e.value)}function verifyRowSize(e){if(e.areas.length>e.rows.length){e.rows.push("auto")}return e}function parseTemplate(e){var r=e.decl,t=e.gap;var i=n(r.value).nodes.reduce(function(e,r){var t=r.type,i=r.value;if(testTrack(r)||t==="space")return e;if(t==="string"){e=verifyRowSize(e);e.areas.push(i)}if(t==="word"||t==="function"){e[e.key].push(n.stringify(r))}if(t==="div"&&i==="/"){e.key="columns";e=verifyRowSize(e)}return e},{key:"rows",columns:[],rows:[],areas:[]});return{areas:parseGridAreas({rows:i.areas,gap:t}),columns:prefixTrackValue({value:i.columns.join(" "),gap:t.column}),rows:prefixTrackValue({value:i.rows.join(" "),gap:t.row})}}function getMSDecls(e,r,t){if(r===void 0){r=false}if(t===void 0){t=false}return[].concat({prop:"-ms-grid-row",value:String(e.row.start)},e.row.span>1||r?{prop:"-ms-grid-row-span",value:String(e.row.span)}:[],{prop:"-ms-grid-column",value:String(e.column.start)},e.column.span>1||t?{prop:"-ms-grid-column-span",value:String(e.column.span)}:[])}function getParentMedia(e){if(e.type==="atrule"&&e.name==="media"){return e}if(!e.parent){return false}return getParentMedia(e.parent)}function changeDuplicateAreaSelectors(e,r){e=e.map(function(e){var r=i.space(e);var t=i.comma(e);if(r.length>t.length){e=r.slice(-1).join("")}return e});return e.map(function(e){var t=r.map(function(r,t){var n=t===0?"":" ";return""+n+r+" > "+e});return t})}function selectorsEqual(e,r){return e.selectors.some(function(e){return r.selectors.some(function(r){return r===e})})}function parseGridTemplatesData(e){var r=[];e.walkDecls(/grid-template(-areas)?$/,function(e){var t=e.parent;var n=getParentMedia(t);var i=getGridGap(e);var s=inheritGridGap(e,i);var a=parseTemplate({decl:e,gap:s||i}),u=a.areas;var f=Object.keys(u);if(f.length===0){return true}var c=r.reduce(function(e,r,t){var n=r.allAreas;var i=n&&f.some(function(e){return n.includes(e)});return i?t:e},null);if(c!==null){var l=r[c],p=l.allAreas,h=l.rules;var B=h.some(function(e){return e.hasDuplicates===false&&selectorsEqual(e,t)});var v=false;var d=h.reduce(function(e,r){if(!r.params&&selectorsEqual(r,t)){v=true;return r.duplicateAreaNames}if(!v){f.forEach(function(t){if(r.areas[t]){e.push(t)}})}return o(e)},[]);h.forEach(function(e){f.forEach(function(r){var t=e.areas[r];if(t&&t.row.span!==u[r].row.span){u[r].row.updateSpan=true}if(t&&t.column.span!==u[r].column.span){u[r].column.updateSpan=true}})});r[c].allAreas=o([].concat(p,f));r[c].rules.push({hasDuplicates:!B,params:n.params,selectors:t.selectors,node:t,duplicateAreaNames:d,areas:u})}else{r.push({allAreas:f,areasCount:0,rules:[{hasDuplicates:false,duplicateRules:[],params:n.params,selectors:t.selectors,node:t,duplicateAreaNames:[],areas:u}]})}return undefined});return r}function insertAreas(e,r){var t=parseGridTemplatesData(e);if(t.length===0){return undefined}var n={};e.walkDecls("grid-area",function(o){var s=o.parent;var a=s.first.prop==="-ms-grid-row";var u=getParentMedia(s);if(r(o)){return undefined}var f=u?e.index(u):e.index(s);var c=o.value;var l=t.filter(function(e){return e.allAreas.includes(c)})[0];if(!l){return true}var p=l.allAreas[l.allAreas.length-1];var h=i.space(s.selector);var B=i.comma(s.selector);var v=h.length>1&&h.length>B.length;if(a){return false}if(!n[p]){n[p]={}}var d=false;for(var b=l.rules,y=Array.isArray(b),g=0,b=y?b:b[Symbol.iterator]();;){var m;if(y){if(g>=b.length)break;m=b[g++]}else{g=b.next();if(g.done)break;m=g.value}var C=m;var w=C.areas[c];var S=C.duplicateAreaNames.includes(c);if(!w){var O=e.index(n[p].lastRule);if(f>O){n[p].lastRule=u||s}continue}if(C.params&&!n[p][C.params]){n[p][C.params]=[]}if((!C.hasDuplicates||!S)&&!C.params){getMSDecls(w,false,false).reverse().forEach(function(e){return s.prepend(Object.assign(e,{raws:{between:o.raws.between}}))});n[p].lastRule=s;d=true}else if(C.hasDuplicates&&!C.params&&!v){(function(){var e=s.clone();e.removeAll();getMSDecls(w,w.row.updateSpan,w.column.updateSpan).reverse().forEach(function(r){return e.prepend(Object.assign(r,{raws:{between:o.raws.between}}))});e.selectors=changeDuplicateAreaSelectors(e.selectors,C.selectors);if(n[p].lastRule){n[p].lastRule.after(e)}n[p].lastRule=e;d=true})()}else if(C.hasDuplicates&&!C.params&&v&&s.selector.includes(C.selectors[0])){s.walkDecls(/-ms-grid-(row|column)/,function(e){return e.remove()});getMSDecls(w,w.row.updateSpan,w.column.updateSpan).reverse().forEach(function(e){return s.prepend(Object.assign(e,{raws:{between:o.raws.between}}))})}else if(C.params){(function(){var r=s.clone();r.removeAll();getMSDecls(w,w.row.updateSpan,w.column.updateSpan).reverse().forEach(function(e){return r.prepend(Object.assign(e,{raws:{between:o.raws.between}}))});if(C.hasDuplicates&&S){r.selectors=changeDuplicateAreaSelectors(r.selectors,C.selectors)}r.raws=C.node.raws;if(e.index(C.node.parent)>f){C.node.parent.append(r)}else{n[p][C.params].push(r)}if(!d){n[p].lastRule=u||s}})()}}return undefined});Object.keys(n).forEach(function(e){var r=n[e];var t=r.lastRule;Object.keys(r).reverse().filter(function(e){return e!=="lastRule"}).forEach(function(e){if(r[e].length>0&&t){t.after({name:"media",params:e});t.next().append(r[e])}})});return undefined}function warnMissedAreas(e,r,t){var n=Object.keys(e);r.root().walkDecls("grid-area",function(e){n=n.filter(function(r){return r!==e.value})});if(n.length>0){r.warn(t,"Can not find grid areas: "+n.join(", "))}return undefined}function warnTemplateSelectorNotFound(e,r){var t=e.parent;var n=e.root();var o=false;var s=i.space(t.selector).filter(function(e){return e!==">"}).slice(0,-1);if(s.length>0){var a=false;var u=null;n.walkDecls(/grid-template(-areas)?$/,function(r){var t=r.parent;var n=t.selectors;var f=parseTemplate({decl:r,gap:getGridGap(r)}),c=f.areas;var l=c[e.value];for(var p=n,h=Array.isArray(p),B=0,p=h?p:p[Symbol.iterator]();;){var v;if(h){if(B>=p.length)break;v=p[B++]}else{B=p.next();if(B.done)break;v=B.value}var d=v;if(a){break}var b=i.space(d).filter(function(e){return e!==">"});a=b.every(function(e,r){return e===s[r]})}if(a||!l){return true}if(!u){u=t.selector}if(u&&u!==t.selector){o=true}return undefined});if(!a&&o){e.warn(r,"Autoprefixer cannot find a grid-template "+('containing the duplicate grid-area "'+e.value+'" ')+("with full selector matching: "+s.join(" ")))}}}function warnIfGridRowColumnExists(e,r){var t=e.parent;var n=[];t.walkDecls(/^grid-(row|column)/,function(e){if(!e.prop.endsWith("-end")&&!e.value.startsWith("span")){n.push(e)}});if(n.length>0){n.forEach(function(e){e.warn(r,"You already have a grid-area declaration present in the rule. "+("You should use either grid-area or "+e.prop+", not both"))})}return undefined}function getGridGap(e){var r={};var t=/^(grid-)?((row|column)-)?gap$/;e.parent.walkDecls(t,function(e){var t=e.prop,i=e.value;if(/^(grid-)?gap$/.test(t)){var o=n(i).nodes,s=o[0],a=o[2];r.row=s&&n.stringify(s);r.column=a?n.stringify(a):r.row}if(/^(grid-)?row-gap$/.test(t))r.row=i;if(/^(grid-)?column-gap$/.test(t))r.column=i});return r}function parseMediaParams(e){if(!e){return false}var r=n(e);var t;var i;r.walk(function(e){if(e.type==="word"&&/min|max/g.test(e.value)){t=e.value}else if(e.value.includes("px")){i=parseInt(e.value.replace(/\D/g,""))}});return[t,i]}function shouldInheritGap(e,r){var t;var n=a(e);var i=a(r);if(n[0].lengthi[0].length){var o=n[0].reduce(function(e,r,t){var n=r[0];var o=i[0][0][0];if(n===o){return t}return false},false);if(o){t=i[0].every(function(e,r){return e.every(function(e,t){return n[0].slice(o)[r][t]===e})})}}else{t=i.some(function(e){return e.every(function(e,r){return e.every(function(e,t){return n[0][r][t]===e})})})}return t}function inheritGridGap(e,r){var t=e.parent;var n=getParentMedia(t);var i=t.root();var o=a(t.selector);if(Object.keys(r).length>0){return false}var u=parseMediaParams(n.params),f=u[0];var c=o[0];var l=s(c[c.length-1][0]);var p=new RegExp("("+l+"$)|("+l+"[,.])");var h;i.walkRules(p,function(e){var r;if(t.toString()===e.toString()){return false}e.walkDecls("grid-gap",function(e){return r=getGridGap(e)});if(!r||Object.keys(r).length===0){return true}if(!shouldInheritGap(t.selector,e.selector)){return true}var n=getParentMedia(e);if(n){var i=parseMediaParams(n.params)[0];if(i===f){h=r;return true}}else{h=r;return true}return undefined});if(h&&Object.keys(h).length>0){return h}return false}function warnGridGap(e){var r=e.gap,t=e.hasColumns,n=e.decl,i=e.result;var o=r.row&&r.column;if(!t&&(o||r.column&&!r.row)){delete r.column;n.warn(i,"Can not implement grid-gap without grid-template-columns")}}function normalizeRowColumn(e){var r=n(e).nodes.reduce(function(e,r){if(r.type==="function"&&r.value==="repeat"){var t="count";var i=r.nodes.reduce(function(e,r){if(r.type==="word"&&t==="count"){e[0]=Math.abs(parseInt(r.value));return e}if(r.type==="div"&&r.value===","){t="value";return e}if(t==="value"){e[1]+=n.stringify(r)}return e},[0,""]),o=i[0],s=i[1];if(o){for(var a=0;a *:nth-child("+(c.length-r)+")")}).join(", ");var s=i.clone().removeAll();s.selector=o;s.append({prop:"-ms-grid-row",value:n.start});s.append({prop:"-ms-grid-column",value:t.start});i.after(s)});return undefined}e.exports={parse:parse,translate:translate,parseTemplate:parseTemplate,parseGridAreas:parseGridAreas,warnMissedAreas:warnMissedAreas,insertAreas:insertAreas,insertDecl:insertDecl,prefixTrackProp:prefixTrackProp,prefixTrackValue:prefixTrackValue,getGridGap:getGridGap,warnGridGap:warnGridGap,warnTemplateSelectorNotFound:warnTemplateSelectorNotFound,warnIfGridRowColumnExists:warnIfGridRowColumnExists,inheritGridGap:inheritGridGap,autoplaceGridItems:autoplaceGridItems}},3463:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=r.length)break;i=r[n++]}else{n=r.next();if(n.done)break;i=n.value}var o=i;if(e.value.includes(o+"(")){return true}}return false};r.set=function set(r,t){r=e.prototype.set.call(this,r,t);if(t==="-ms-"){r.value=r.value.replace(/rotatez/gi,"rotate")}return r};r.insert=function insert(r,t,n){if(t==="-ms-"){if(!this.contain3d(r)&&!this.keyframeParents(r)){return e.prototype.insert.call(this,r,t,n)}}else if(t==="-o-"){if(!this.contain3d(r)){return e.prototype.insert.call(this,r,t,n)}}else{return e.prototype.insert.call(this,r,t,n)}return undefined};return TransformDecl}(n);_defineProperty(i,"names",["transform","transform-origin"]);_defineProperty(i,"functions3d",["matrix3d","translate3d","translateZ","scale3d","scaleZ","rotate3d","rotateX","rotateY","perspective"]);e.exports=i},3251:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";var n=t(3561);function capitalize(e){return e.slice(0,1).toUpperCase()+e.slice(1)}var i={ie:"IE",ie_mob:"IE Mobile",ios_saf:"iOS",op_mini:"Opera Mini",op_mob:"Opera Mobile",and_chr:"Chrome for Android",and_ff:"Firefox for Android",and_uc:"UC for Android"};function prefix(e,r,t){var n=" "+e;if(t)n+=" *";n+=": ";n+=r.map(function(e){return e.replace(/^-(.*)-$/g,"$1")}).join(", ");n+="\n";return n}e.exports=function(e){if(e.browsers.selected.length===0){return"No browsers selected"}var r={};for(var t=e.browsers.selected,o=Array.isArray(t),s=0,t=o?t:t[Symbol.iterator]();;){var a;if(o){if(s>=t.length)break;a=t[s++]}else{s=t.next();if(s.done)break;a=s.value}var u=a;var f=u.split(" ");var c=f[0];var l=f[1];c=i[c]||capitalize(c);if(r[c]){r[c].push(l)}else{r[c]=[l]}}var p="Browsers:\n";for(var h in r){var B=r[h];B=B.sort(function(e,r){return parseFloat(r)-parseFloat(e)});p+=" "+h+": "+B.join(", ")+"\n"}var v=n.coverage(e.browsers.selected);var d=Math.round(v*100)/100;p+="\nThese browsers account for "+d+"% of all users globally\n";var b=[];for(var y in e.add){var g=e.add[y];if(y[0]==="@"&&g.prefixes){b.push(prefix(y,g.prefixes))}}if(b.length>0){p+="\nAt-Rules:\n"+b.sort().join("")}var m=[];for(var C=e.add.selectors,w=Array.isArray(C),S=0,C=w?C:C[Symbol.iterator]();;){var O;if(w){if(S>=C.length)break;O=C[S++]}else{S=C.next();if(S.done)break;O=S.value}var T=O;if(T.prefixes){m.push(prefix(T.name,T.prefixes))}}if(m.length>0){p+="\nSelectors:\n"+m.sort().join("")}var E=[];var k=[];var P=false;for(var D in e.add){var A=e.add[D];if(D[0]!=="@"&&A.prefixes){var R=D.indexOf("grid-")===0;if(R)P=true;k.push(prefix(D,A.prefixes,R))}if(!Array.isArray(A.values)){continue}for(var F=A.values,x=Array.isArray(F),j=0,F=x?F:F[Symbol.iterator]();;){var I;if(x){if(j>=F.length)break;I=F[j++]}else{j=F.next();if(j.done)break;I=j.value}var M=I;var N=M.name.includes("grid");if(N)P=true;var _=prefix(M.name,M.prefixes,N);if(!E.includes(_)){E.push(_)}}}if(k.length>0){p+="\nProperties:\n"+k.sort().join("")}if(E.length>0){p+="\nValues:\n"+E.sort().join("")}if(P){p+="\n* - Prefixes will be added only on grid: true option.\n"}if(!b.length&&!m.length&&!k.length&&!E.length){p+="\nAwesome! Your browsers don't require any vendor prefixes."+"\nNow you can remove Autoprefixer from build steps."}return p}},7471:e=>{"use strict";var r=function(){function OldSelector(e,r){this.prefix=r;this.prefixed=e.prefixed(this.prefix);this.regexp=e.regexp(this.prefix);this.prefixeds=e.possible().map(function(r){return[e.prefixed(r),e.regexp(r)]});this.unprefixed=e.name;this.nameRegexp=e.regexp()}var e=OldSelector.prototype;e.isHack=function isHack(e){var r=e.parent.index(e)+1;var t=e.parent.nodes;while(r=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u,c=f[0],l=f[1];if(n.includes(c)&&n.match(l)){i=true;break}}if(!i){return true}r+=1}return true};e.check=function check(e){if(!e.selector.includes(this.prefixed)){return false}if(!e.selector.match(this.regexp)){return false}if(this.isHack(e)){return false}return true};return OldSelector}();e.exports=r},6661:(e,r,t)=>{"use strict";var n=t(772);var i=function(){function OldValue(e,r,t,i){this.unprefixed=e;this.prefixed=r;this.string=t||r;this.regexp=i||n.regexp(r)}var e=OldValue.prototype;e.check=function check(e){if(e.includes(this.string)){return!!e.match(this.regexp)}return false};return OldValue}();e.exports=i},8428:(e,r,t)=>{"use strict";var n=t(4633).vendor;var i=t(2319);var o=t(772);function _clone(e,r){var t=new e.constructor;for(var n=0,i=Object.keys(e||{});n=s.length)break;f=s[u++]}else{u=s.next();if(u.done)break;f=u.value}var c=f;if(this.add(e,c,i.concat([c]),r)){i.push(c)}}return i};e.clone=function clone(e,r){return Prefixer.clone(e,r)};return Prefixer}();e.exports=s},811:(e,r,t)=>{"use strict";var n=t(4633).vendor;var i=t(5753);var o=t(9514);var s=t(7080);var a=t(8120);var u=t(3817);var f=t(2319);var c=t(4806);var l=t(7997);var p=t(1882);var h=t(772);c.hack(t(9231));c.hack(t(9478));i.hack(t(3629));i.hack(t(7017));i.hack(t(972));i.hack(t(1763));i.hack(t(3331));i.hack(t(7106));i.hack(t(3392));i.hack(t(9315));i.hack(t(6658));i.hack(t(1036));i.hack(t(7912));i.hack(t(7335));i.hack(t(3686));i.hack(t(5041));i.hack(t(7447));i.hack(t(9116));i.hack(t(180));i.hack(t(3251));i.hack(t(5035));i.hack(t(517));i.hack(t(5836));i.hack(t(1041));i.hack(t(3305));i.hack(t(4802));i.hack(t(657));i.hack(t(9423));i.hack(t(5193));i.hack(t(8322));i.hack(t(4689));i.hack(t(9801));i.hack(t(2112));i.hack(t(3463));i.hack(t(1262));i.hack(t(7509));i.hack(t(9936));i.hack(t(5230));i.hack(t(1150));i.hack(t(8360));i.hack(t(2456));i.hack(t(5422));i.hack(t(2681));i.hack(t(1719));i.hack(t(487));i.hack(t(9228));p.hack(t(2433));p.hack(t(1138));p.hack(t(4581));p.hack(t(291));p.hack(t(8485));p.hack(t(3692));p.hack(t(1665));p.hack(t(133));var B={};var v=function(){function Prefixes(e,r,t){if(t===void 0){t={}}this.data=e;this.browsers=r;this.options=t;var n=this.preprocess(this.select(this.data));this.add=n[0];this.remove=n[1];this.transition=new s(this);this.processor=new a(this)}var e=Prefixes.prototype;e.cleaner=function cleaner(){if(this.cleanerCache){return this.cleanerCache}if(this.browsers.selected.length){var e=new f(this.browsers.data,[]);this.cleanerCache=new Prefixes(this.data,e,this.options)}else{return this}return this.cleanerCache};e.select=function select(e){var r=this;var t={add:{},remove:{}};var n=function _loop(n){var i=e[n];var o=i.browsers.map(function(e){var r=e.split(" ");return{browser:r[0]+" "+r[1],note:r[2]}});var s=o.filter(function(e){return e.note}).map(function(e){return r.browsers.prefix(e.browser)+" "+e.note});s=h.uniq(s);o=o.filter(function(e){return r.browsers.isSelected(e.browser)}).map(function(e){var t=r.browsers.prefix(e.browser);if(e.note){return t+" "+e.note}else{return t}});o=r.sort(h.uniq(o));if(r.options.flexbox==="no-2009"){o=o.filter(function(e){return!e.includes("2009")})}var a=i.browsers.map(function(e){return r.browsers.prefix(e)});if(i.mistakes){a=a.concat(i.mistakes)}a=a.concat(s);a=h.uniq(a);if(o.length){t.add[n]=o;if(o.length=f.length)break;v=f[B++]}else{B=f.next();if(B.done)break;v=B.value}var d=v;if(!r[d]){r[d]={values:[]}}r[d].values.push(a)}}else{var b=r[t]&&r[t].values||[];r[t]=i.load(t,n,this);r[t].values=b}}}var y={selectors:[]};for(var g in e.remove){var m=e.remove[g];if(this.data[g].selector){var C=c.load(g,m);for(var w=m,S=Array.isArray(w),O=0,w=S?w:w[Symbol.iterator]();;){var T;if(S){if(O>=w.length)break;T=w[O++]}else{O=w.next();if(O.done)break;T=O.value}var E=T;y.selectors.push(C.old(E))}}else if(g==="@keyframes"||g==="@viewport"){for(var k=m,P=Array.isArray(k),D=0,k=P?k:k[Symbol.iterator]();;){var A;if(P){if(D>=k.length)break;A=k[D++]}else{D=k.next();if(D.done)break;A=D.value}var R=A;var F="@"+R+g.slice(1);y[F]={remove:true}}}else if(g==="@resolution"){y[g]=new o(g,m,this)}else{var x=this.data[g].props;if(x){var j=p.load(g,[],this);for(var I=m,M=Array.isArray(I),N=0,I=M?I:I[Symbol.iterator]();;){var _;if(M){if(N>=I.length)break;_=I[N++]}else{N=I.next();if(N.done)break;_=N.value}var L=_;var q=j.old(L);if(q){for(var G=x,J=Array.isArray(G),U=0,G=J?G:G[Symbol.iterator]();;){var H;if(J){if(U>=G.length)break;H=G[U++]}else{U=G.next();if(U.done)break;H=U.value}var Q=H;if(!y[Q]){y[Q]={}}if(!y[Q].values){y[Q].values=[]}y[Q].values.push(q)}}}}else{for(var K=m,W=Array.isArray(K),Y=0,K=W?K:K[Symbol.iterator]();;){var z;if(W){if(Y>=K.length)break;z=K[Y++]}else{Y=K.next();if(Y.done)break;z=Y.value}var $=z;var X=this.decl(g).old(g,$);if(g==="align-self"){var Z=r[g]&&r[g].prefixes;if(Z){if($==="-webkit- 2009"&&Z.includes("-webkit-")){continue}else if($==="-webkit-"&&Z.includes("-webkit- 2009")){continue}}}for(var V=X,ee=Array.isArray(V),re=0,V=ee?V:V[Symbol.iterator]();;){var te;if(ee){if(re>=V.length)break;te=V[re++]}else{re=V.next();if(re.done)break;te=re.value}var ne=te;if(!y[ne]){y[ne]={}}y[ne].remove=true}}}}}return[r,y]};e.decl=function decl(e){var decl=B[e];if(decl){return decl}else{B[e]=i.load(e);return B[e]}};e.unprefixed=function unprefixed(e){var r=this.normalize(n.unprefixed(e));if(r==="flex-direction"){r="flex-flow"}return r};e.normalize=function normalize(e){return this.decl(e).normalize(e)};e.prefixed=function prefixed(e,r){e=n.unprefixed(e);return this.decl(e).prefixed(e,r)};e.values=function values(e,r){var t=this[e];var n=t["*"]&&t["*"].values;var values=t[r]&&t[r].values;if(n&&values){return h.uniq(n.concat(values))}else{return n||values||[]}};e.group=function group(e){var r=this;var t=e.parent;var n=t.index(e);var i=t.nodes.length;var o=this.unprefixed(e.prop);var s=function checker(e,s){n+=e;while(n>=0&&n{"use strict";var n=t(23);var i=t(1882);var o=t(5224).insertAreas;var s=/(^|[^-])linear-gradient\(\s*(top|left|right|bottom)/i;var a=/(^|[^-])radial-gradient\(\s*\d+(\w*|%)\s+\d+(\w*|%)\s*,/i;var u=/(!\s*)?autoprefixer:\s*ignore\s+next/i;var f=/(!\s*)?autoprefixer\s*grid:\s*(on|off|(no-)?autoplace)/i;var c=["width","height","min-width","max-width","min-height","max-height","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size"];function hasGridTemplate(e){return e.parent.some(function(e){return e.prop==="grid-template"||e.prop==="grid-template-areas"})}function hasRowsAndColumns(e){var r=e.parent.some(function(e){return e.prop==="grid-template-rows"});var t=e.parent.some(function(e){return e.prop==="grid-template-columns"});return r&&t}var l=function(){function Processor(e){this.prefixes=e}var e=Processor.prototype;e.add=function add(e,r){var t=this;var u=this.prefixes.add["@resolution"];var f=this.prefixes.add["@keyframes"];var l=this.prefixes.add["@viewport"];var p=this.prefixes.add["@supports"];e.walkAtRules(function(e){if(e.name==="keyframes"){if(!t.disabled(e,r)){return f&&f.process(e)}}else if(e.name==="viewport"){if(!t.disabled(e,r)){return l&&l.process(e)}}else if(e.name==="supports"){if(t.prefixes.options.supports!==false&&!t.disabled(e,r)){return p.process(e)}}else if(e.name==="media"&&e.params.includes("-resolution")){if(!t.disabled(e,r)){return u&&u.process(e)}}return undefined});e.walkRules(function(e){if(t.disabled(e,r))return undefined;return t.prefixes.add.selectors.map(function(t){return t.process(e,r)})});function insideGrid(e){return e.parent.nodes.some(function(e){if(e.type!=="decl")return false;var r=e.prop==="display"&&/(inline-)?grid/.test(e.value);var t=e.prop.startsWith("grid-template");var n=/^grid-([A-z]+-)?gap/.test(e.prop);return r||t||n})}function insideFlex(e){return e.parent.some(function(e){return e.prop==="display"&&/(inline-)?flex/.test(e.value)})}var h=this.gridStatus(e,r)&&this.prefixes.add["grid-area"]&&this.prefixes.add["grid-area"].prefixes;e.walkDecls(function(e){if(t.disabledDecl(e,r))return undefined;var i=e.parent;var o=e.prop;var u=e.value;if(o==="grid-row-span"){r.warn("grid-row-span is not part of final Grid Layout. Use grid-row.",{node:e});return undefined}else if(o==="grid-column-span"){r.warn("grid-column-span is not part of final Grid Layout. Use grid-column.",{node:e});return undefined}else if(o==="display"&&u==="box"){r.warn("You should write display: flex by final spec "+"instead of display: box",{node:e});return undefined}else if(o==="text-emphasis-position"){if(u==="under"||u==="over"){r.warn("You should use 2 values for text-emphasis-position "+"For example, `under left` instead of just `under`.",{node:e})}}else if(/^(align|justify|place)-(items|content)$/.test(o)&&insideFlex(e)){if(u==="start"||u==="end"){r.warn(u+" value has mixed support, consider using "+("flex-"+u+" instead"),{node:e})}}else if(o==="text-decoration-skip"&&u==="ink"){r.warn("Replace text-decoration-skip: ink to "+"text-decoration-skip-ink: auto, because spec had been changed",{node:e})}else{if(h){if(/^(align|justify|place)-items$/.test(o)&&insideGrid(e)){var f=o.replace("-items","-self");r.warn("IE does not support "+o+" on grid containers. "+("Try using "+f+" on child elements instead: ")+(e.parent.selector+" > * { "+f+": "+e.value+" }"),{node:e})}else if(/^(align|justify|place)-content$/.test(o)&&insideGrid(e)){r.warn("IE does not support "+e.prop+" on grid containers",{node:e})}else if(o==="display"&&e.value==="contents"){r.warn("Please do not use display: contents; "+"if you have grid setting enabled",{node:e});return undefined}else if(e.prop==="grid-gap"){var l=t.gridStatus(e,r);if(l==="autoplace"&&!hasRowsAndColumns(e)&&!hasGridTemplate(e)){r.warn("grid-gap only works if grid-template(-areas) is being "+"used or both rows and columns have been declared "+"and cells have not been manually "+"placed inside the explicit grid",{node:e})}else if((l===true||l==="no-autoplace")&&!hasGridTemplate(e)){r.warn("grid-gap only works if grid-template(-areas) is being used",{node:e})}}else if(o==="grid-auto-columns"){r.warn("grid-auto-columns is not supported by IE",{node:e});return undefined}else if(o==="grid-auto-rows"){r.warn("grid-auto-rows is not supported by IE",{node:e});return undefined}else if(o==="grid-auto-flow"){var p=i.some(function(e){return e.prop==="grid-template-rows"});var B=i.some(function(e){return e.prop==="grid-template-columns"});if(hasGridTemplate(e)){r.warn("grid-auto-flow is not supported by IE",{node:e})}else if(u.includes("dense")){r.warn("grid-auto-flow: dense is not supported by IE",{node:e})}else if(!p&&!B){r.warn("grid-auto-flow works only if grid-template-rows and "+"grid-template-columns are present in the same rule",{node:e})}return undefined}else if(u.includes("auto-fit")){r.warn("auto-fit value is not supported by IE",{node:e,word:"auto-fit"});return undefined}else if(u.includes("auto-fill")){r.warn("auto-fill value is not supported by IE",{node:e,word:"auto-fill"});return undefined}else if(o.startsWith("grid-template")&&u.includes("[")){r.warn("Autoprefixer currently does not support line names. "+"Try using grid-template-areas instead.",{node:e,word:"["})}}if(u.includes("radial-gradient")){if(a.test(e.value)){r.warn("Gradient has outdated direction syntax. "+"New syntax is like `closest-side at 0 0` "+"instead of `0 0, closest-side`.",{node:e})}else{var v=n(u);for(var d=v.nodes,b=Array.isArray(d),y=0,d=b?d:d[Symbol.iterator]();;){var g;if(b){if(y>=d.length)break;g=d[y++]}else{y=d.next();if(y.done)break;g=y.value}var m=g;if(m.type==="function"&&m.value==="radial-gradient"){for(var C=m.nodes,w=Array.isArray(C),S=0,C=w?C:C[Symbol.iterator]();;){var O;if(w){if(S>=C.length)break;O=C[S++]}else{S=C.next();if(S.done)break;O=S.value}var T=O;if(T.type==="word"){if(T.value==="cover"){r.warn("Gradient has outdated direction syntax. "+"Replace `cover` to `farthest-corner`.",{node:e})}else if(T.value==="contain"){r.warn("Gradient has outdated direction syntax. "+"Replace `contain` to `closest-side`.",{node:e})}}}}}}}if(u.includes("linear-gradient")){if(s.test(u)){r.warn("Gradient has outdated direction syntax. "+"New syntax is like `to left` instead of `right`.",{node:e})}}}if(c.includes(e.prop)){if(!e.value.includes("-fill-available")){if(e.value.includes("fill-available")){r.warn("Replace fill-available to stretch, "+"because spec had been changed",{node:e})}else if(e.value.includes("fill")){var E=n(u);if(E.nodes.some(function(e){return e.type==="word"&&e.value==="fill"})){r.warn("Replace fill to stretch, because spec had been changed",{node:e})}}}}var k;if(e.prop==="transition"||e.prop==="transition-property"){return t.prefixes.transition.add(e,r)}else if(e.prop==="align-self"){var P=t.displayType(e);if(P!=="grid"&&t.prefixes.options.flexbox!==false){k=t.prefixes.add["align-self"];if(k&&k.prefixes){k.process(e)}}if(P!=="flex"&&t.gridStatus(e,r)!==false){k=t.prefixes.add["grid-row-align"];if(k&&k.prefixes){return k.process(e,r)}}}else if(e.prop==="justify-self"){var D=t.displayType(e);if(D!=="flex"&&t.gridStatus(e,r)!==false){k=t.prefixes.add["grid-column-align"];if(k&&k.prefixes){return k.process(e,r)}}}else if(e.prop==="place-self"){k=t.prefixes.add["place-self"];if(k&&k.prefixes&&t.gridStatus(e,r)!==false){return k.process(e,r)}}else{k=t.prefixes.add[e.prop];if(k&&k.prefixes){return k.process(e,r)}}return undefined});if(this.gridStatus(e,r)){o(e,this.disabled)}return e.walkDecls(function(e){if(t.disabledValue(e,r))return;var n=t.prefixes.unprefixed(e.prop);var o=t.prefixes.values("add",n);if(Array.isArray(o)){for(var s=o,a=Array.isArray(s),u=0,s=a?s:s[Symbol.iterator]();;){var f;if(a){if(u>=s.length)break;f=s[u++]}else{u=s.next();if(u.done)break;f=u.value}var c=f;if(c.process)c.process(e,r)}}i.save(t.prefixes,e)})};e.remove=function remove(e,r){var t=this;var n=this.prefixes.remove["@resolution"];e.walkAtRules(function(e,i){if(t.prefixes.remove["@"+e.name]){if(!t.disabled(e,r)){e.parent.removeChild(i)}}else if(e.name==="media"&&e.params.includes("-resolution")&&n){n.clean(e)}});var i=function _loop(){if(s){if(a>=o.length)return"break";u=o[a++]}else{a=o.next();if(a.done)return"break";u=a.value}var n=u;e.walkRules(function(e,i){if(n.check(e)){if(!t.disabled(e,r)){e.parent.removeChild(i)}}})};for(var o=this.prefixes.remove.selectors,s=Array.isArray(o),a=0,o=s?o:o[Symbol.iterator]();;){var u;var f=i();if(f==="break")break}return e.walkDecls(function(e,n){if(t.disabled(e,r))return;var i=e.parent;var o=t.prefixes.unprefixed(e.prop);if(e.prop==="transition"||e.prop==="transition-property"){t.prefixes.transition.remove(e)}if(t.prefixes.remove[e.prop]&&t.prefixes.remove[e.prop].remove){var s=t.prefixes.group(e).down(function(e){return t.prefixes.normalize(e.prop)===o});if(o==="flex-flow"){s=true}if(e.prop==="-webkit-box-orient"){var a={"flex-direction":true,"flex-flow":true};if(!e.parent.some(function(e){return a[e.prop]}))return}if(s&&!t.withHackValue(e)){if(e.raw("before").includes("\n")){t.reduceSpaces(e)}i.removeChild(n);return}}for(var u=t.prefixes.values("remove",o),f=Array.isArray(u),c=0,u=f?u:u[Symbol.iterator]();;){var l;if(f){if(c>=u.length)break;l=u[c++]}else{c=u.next();if(c.done)break;l=c.value}var p=l;if(!p.check)continue;if(!p.check(e.value))continue;o=p.unprefixed;var h=t.prefixes.group(e).down(function(e){return e.value.includes(o)});if(h){i.removeChild(n);return}}})};e.withHackValue=function withHackValue(e){return e.prop==="-webkit-background-clip"&&e.value==="text"};e.disabledValue=function disabledValue(e,r){if(this.gridStatus(e,r)===false&&e.type==="decl"){if(e.prop==="display"&&e.value.includes("grid")){return true}}if(this.prefixes.options.flexbox===false&&e.type==="decl"){if(e.prop==="display"&&e.value.includes("flex")){return true}}return this.disabled(e,r)};e.disabledDecl=function disabledDecl(e,r){if(this.gridStatus(e,r)===false&&e.type==="decl"){if(e.prop.includes("grid")||e.prop==="justify-items"){return true}}if(this.prefixes.options.flexbox===false&&e.type==="decl"){var t=["order","justify-content","align-items","align-content"];if(e.prop.includes("flex")||t.includes(e.prop)){return true}}return this.disabled(e,r)};e.disabled=function disabled(e,r){if(!e)return false;if(e._autoprefixerDisabled!==undefined){return e._autoprefixerDisabled}if(e.parent){var t=e.prev();if(t&&t.type==="comment"&&u.test(t.text)){e._autoprefixerDisabled=true;e._autoprefixerSelfDisabled=true;return true}}var n=null;if(e.nodes){var i;e.each(function(e){if(e.type!=="comment")return;if(/(!\s*)?autoprefixer:\s*(off|on)/i.test(e.text)){if(typeof i!=="undefined"){r.warn("Second Autoprefixer control comment "+"was ignored. Autoprefixer applies control "+"comment to whole block, not to next rules.",{node:e})}else{i=/on/i.test(e.text)}}});if(i!==undefined){n=!i}}if(!e.nodes||n===null){if(e.parent){var o=this.disabled(e.parent,r);if(e.parent._autoprefixerSelfDisabled===true){n=false}else{n=o}}else{n=false}}e._autoprefixerDisabled=n;return n};e.reduceSpaces=function reduceSpaces(e){var r=false;this.prefixes.group(e).up(function(){r=true;return true});if(r){return}var t=e.raw("before").split("\n");var n=t[t.length-1].length;var i=false;this.prefixes.group(e).down(function(e){t=e.raw("before").split("\n");var r=t.length-1;if(t[r].length>n){if(i===false){i=t[r].length-n}t[r]=t[r].slice(0,-i);e.raws.before=t.join("\n")}})};e.displayType=function displayType(e){for(var r=e.parent.nodes,t=Array.isArray(r),n=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(n>=r.length)break;i=r[n++]}else{n=r.next();if(n.done)break;i=n.value}var o=i;if(o.prop!=="display"){continue}if(o.value.includes("flex")){return"flex"}if(o.value.includes("grid")){return"grid"}}return false};e.gridStatus=function gridStatus(e,r){if(!e)return false;if(e._autoprefixerGridStatus!==undefined){return e._autoprefixerGridStatus}var t=null;if(e.nodes){var n;e.each(function(e){if(e.type!=="comment")return;if(f.test(e.text)){var t=/:\s*autoplace/i.test(e.text);var i=/no-autoplace/i.test(e.text);if(typeof n!=="undefined"){r.warn("Second Autoprefixer grid control comment was "+"ignored. Autoprefixer applies control comments to the whole "+"block, not to the next rules.",{node:e})}else if(t){n="autoplace"}else if(i){n=true}else{n=/on/i.test(e.text)}}});if(n!==undefined){t=n}}if(e.type==="atrule"&&e.name==="supports"){var i=e.params;if(i.includes("grid")&&i.includes("auto")){t=false}}if(!e.nodes||t===null){if(e.parent){var o=this.gridStatus(e.parent,r);if(e.parent._autoprefixerSelfDisabled===true){t=false}else{t=o}}else if(typeof this.prefixes.options.grid!=="undefined"){t=this.prefixes.options.grid}else if(typeof process.env.AUTOPREFIXER_GRID!=="undefined"){if(process.env.AUTOPREFIXER_GRID==="autoplace"){t="autoplace"}else{t=true}}else{t=false}}e._autoprefixerGridStatus=t;return t};return Processor}();e.exports=l},9514:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=t.length)break;s=t[i++]}else{i=t.next();if(i.done)break;s=i.value}var a=s;this.bad.push(this.prefixName(a,"min"));this.bad.push(this.prefixName(a,"max"))}}e.params=o.editList(e.params,function(e){return e.filter(function(e){return r.bad.every(function(r){return!e.includes(r)})})})};r.process=function process(e){var r=this;var t=this.parentPrefix(e);var n=t?[t]:this.prefixes;e.params=o.editList(e.params,function(e,t){for(var i=e,u=Array.isArray(i),f=0,i=u?i:i[Symbol.iterator]();;){var c;if(u){if(f>=i.length)break;c=i[f++]}else{f=i.next();if(f.done)break;c=f.value}var l=c;if(!l.includes("min-resolution")&&!l.includes("max-resolution")){t.push(l);continue}var p=function _loop(){if(B){if(v>=h.length)return"break";d=h[v++]}else{v=h.next();if(v.done)return"break";d=v.value}var e=d;var n=l.replace(s,function(t){var n=t.match(a);return r.prefixQuery(e,n[1],n[2],n[3],n[4])});t.push(n)};for(var h=n,B=Array.isArray(h),v=0,h=B?h:h[Symbol.iterator]();;){var d;var b=p();if(b==="break")break}t.push(l)}return o.uniq(t)})};return Resolution}(i);e.exports=u},4806:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=s.length)return"break";f=s[u++]}else{u=s.next();if(u.done)return"break";f=u.value}var e=f;prefixeds[e]=n.map(function(t){return r.replace(t,e)}).join(", ")};for(var s=this.possible(),a=Array.isArray(s),u=0,s=a?s:s[Symbol.iterator]();;){var f;var c=o();if(c==="break")break}}else{for(var l=this.possible(),p=Array.isArray(l),h=0,l=p?l:l[Symbol.iterator]();;){var B;if(p){if(h>=l.length)break;B=l[h++]}else{h=l.next();if(h.done)break;B=h.value}var v=B;prefixeds[v]=this.replace(e.selector,v)}}e._autoprefixerPrefixeds[this.name]=prefixeds;return e._autoprefixerPrefixeds};r.already=function already(e,r,t){var n=e.parent.index(e)-1;while(n>=0){var i=e.parent.nodes[n];if(i.type!=="rule"){return false}var o=false;for(var s in r[this.name]){var a=r[this.name][s];if(i.selector===a){if(t===s){return true}else{o=true;break}}}if(!o){return false}n-=1}return false};r.replace=function replace(e,r){return e.replace(this.regexp(),"$1"+this.prefixed(r))};r.add=function add(e,r){var t=this.prefixeds(e);if(this.already(e,t,r)){return}var n=this.clone(e,{selector:t[this.name][r]});e.parent.insertBefore(e,n)};r.old=function old(e){return new o(this,e)};return Selector}(s);e.exports=f},3817:(e,r,t)=>{"use strict";var n=t(4633);var i=t(4338).feature(t(7036));var o=t(2319);var s=t(6689);var a=t(1882);var u=t(772);var f=[];for(var c in i.stats){var l=i.stats[c];for(var p in l){var h=l[p];if(/y/.test(h)){f.push(c+" "+p)}}}var B=function(){function Supports(e,r){this.Prefixes=e;this.all=r}var e=Supports.prototype;e.prefixer=function prefixer(){if(this.prefixerCache){return this.prefixerCache}var e=this.all.browsers.selected.filter(function(e){return f.includes(e)});var r=new o(this.all.browsers.data,e,this.all.options);this.prefixerCache=new this.Prefixes(this.all.data,r,this.all.options);return this.prefixerCache};e.parse=function parse(e){var r=e.split(":");var t=r[0];var n=r[1];if(!n)n="";return[t.trim(),n.trim()]};e.virtual=function virtual(e){var r=this.parse(e),t=r[0],i=r[1];var o=n.parse("a{}").first;o.append({prop:t,value:i,raws:{before:""}});return o};e.prefixed=function prefixed(e){var r=this.virtual(e);if(this.disabled(r.first)){return r.nodes}var t={warn:function warn(){return null}};var n=this.prefixer().add[r.first.prop];n&&n.process&&n.process(r.first,t);for(var i=r.nodes,o=Array.isArray(i),s=0,i=o?i:i[Symbol.iterator]();;){var u;if(o){if(s>=i.length)break;u=i[s++]}else{s=i.next();if(s.done)break;u=s.value}var f=u;for(var c=this.prefixer().values("add",r.first.prop),l=Array.isArray(c),p=0,c=l?c:c[Symbol.iterator]();;){var h;if(l){if(p>=c.length)break;h=c[p++]}else{p=c.next();if(p.done)break;h=p.value}var B=h;B.process(f)}a.save(this.all,f)}return r.nodes};e.isNot=function isNot(e){return typeof e==="string"&&/not\s*/i.test(e)};e.isOr=function isOr(e){return typeof e==="string"&&/\s*or\s*/i.test(e)};e.isProp=function isProp(e){return typeof e==="object"&&e.length===1&&typeof e[0]==="string"};e.isHack=function isHack(e,r){var t=new RegExp("(\\(|\\s)"+u.escapeRegexp(r)+":");return!t.test(e)};e.toRemove=function toRemove(e,r){var t=this.parse(e),n=t[0],i=t[1];var o=this.all.unprefixed(n);var s=this.all.cleaner();if(s.remove[n]&&s.remove[n].remove&&!this.isHack(r,o)){return true}for(var a=s.values("remove",o),u=Array.isArray(a),f=0,a=u?a:a[Symbol.iterator]();;){var c;if(u){if(f>=a.length)break;c=a[f++]}else{f=a.next();if(f.done)break;c=f.value}var l=c;if(l.check(i)){return true}}return false};e.remove=function remove(e,r){var t=0;while(t=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;r.push([s.prop+": "+s.value]);r.push(" or ")}r[r.length-1]="";return r};e.normalize=function normalize(e){var r=this;if(typeof e!=="object"){return e}e=e.filter(function(e){return e!==""});if(typeof e[0]==="string"&&e[0].includes(":")){return[s.stringify(e)]}return e.map(function(e){return r.normalize(e)})};e.add=function add(e,r){var t=this;return e.map(function(e){if(t.isProp(e)){var n=t.prefixed(e[0]);if(n.length>1){return t.convert(n)}return e}if(typeof e==="object"){return t.add(e,r)}return e})};e.process=function process(e){var r=s.parse(e.params);r=this.normalize(r);r=this.remove(r,e.params);r=this.add(r,e.params);r=this.cleanBrackets(r);e.params=s.stringify(r)};e.disabled=function disabled(e){if(!this.all.options.grid){if(e.prop==="display"&&e.value.includes("grid")){return true}if(e.prop.includes("grid")||e.prop==="justify-items"){return true}}if(this.all.options.flexbox===false){if(e.prop==="display"&&e.value.includes("flex")){return true}var r=["order","justify-content","align-items","align-content"];if(e.prop.includes("flex")||r.includes(e.prop)){return true}}return false};return Supports}();e.exports=B},7080:(e,r,t)=>{"use strict";function _defineProperty(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}var n=t(23);var i=t(4633).vendor;var o=t(4633).list;var s=t(2319);var a=function(){function Transition(e){_defineProperty(this,"props",["transition","transition-property"]);this.prefixes=e}var e=Transition.prototype;e.add=function add(e,r){var t=this;var n,i;var add=this.prefixes.add[e.prop];var o=this.ruleVendorPrefixes(e);var s=o||add&&add.prefixes||[];var a=this.parse(e.value);var u=a.map(function(e){return t.findProp(e)});var f=[];if(u.some(function(e){return e[0]==="-"})){return}for(var c=a,l=Array.isArray(c),p=0,c=l?c:c[Symbol.iterator]();;){var h;if(l){if(p>=c.length)break;h=c[p++]}else{p=c.next();if(p.done)break;h=p.value}var B=h;i=this.findProp(B);if(i[0]==="-")continue;var v=this.prefixes.add[i];if(!v||!v.prefixes)continue;for(var d=v.prefixes,b=Array.isArray(d),y=0,d=b?d:d[Symbol.iterator]();;){if(b){if(y>=d.length)break;n=d[y++]}else{y=d.next();if(y.done)break;n=y.value}if(o&&!o.some(function(e){return n.includes(e)})){continue}var g=this.prefixes.prefixed(i,n);if(g!=="-ms-transform"&&!u.includes(g)){if(!this.disabled(i,n)){f.push(this.clone(i,g,B))}}}}a=a.concat(f);var m=this.stringify(a);var C=this.stringify(this.cleanFromUnprefixed(a,"-webkit-"));if(s.includes("-webkit-")){this.cloneBefore(e,"-webkit-"+e.prop,C)}this.cloneBefore(e,e.prop,C);if(s.includes("-o-")){var w=this.stringify(this.cleanFromUnprefixed(a,"-o-"));this.cloneBefore(e,"-o-"+e.prop,w)}for(var S=s,O=Array.isArray(S),T=0,S=O?S:S[Symbol.iterator]();;){if(O){if(T>=S.length)break;n=S[T++]}else{T=S.next();if(T.done)break;n=T.value}if(n!=="-webkit-"&&n!=="-o-"){var E=this.stringify(this.cleanOtherPrefixes(a,n));this.cloneBefore(e,n+e.prop,E)}}if(m!==e.value&&!this.already(e,e.prop,m)){this.checkForWarning(r,e);e.cloneBefore();e.value=m}};e.findProp=function findProp(e){var r=e[0].value;if(/^\d/.test(r)){for(var t=e.entries(),n=Array.isArray(t),i=0,t=n?t:t[Symbol.iterator]();;){var o;if(n){if(i>=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o,a=s[0],u=s[1];if(a!==0&&u.type==="word"){return u.value}}}return r};e.already=function already(e,r,t){return e.parent.some(function(e){return e.prop===r&&e.value===t})};e.cloneBefore=function cloneBefore(e,r,t){if(!this.already(e,r,t)){e.cloneBefore({prop:r,value:t})}};e.checkForWarning=function checkForWarning(e,r){if(r.prop!=="transition-property"){return}r.parent.each(function(t){if(t.type!=="decl"){return undefined}if(t.prop.indexOf("transition-")!==0){return undefined}if(t.prop==="transition-property"){return undefined}if(o.comma(t.value).length>1){r.warn(e,"Replace transition-property to transition, "+"because Autoprefixer could not support "+"any cases of transition-property "+"and other transition-*")}return false})};e.remove=function remove(e){var r=this;var t=this.parse(e.value);t=t.filter(function(e){var t=r.prefixes.remove[r.findProp(e)];return!t||!t.remove});var n=this.stringify(t);if(e.value===n){return}if(t.length===0){e.remove();return}var i=e.parent.some(function(r){return r.prop===e.prop&&r.value===n});var o=e.parent.some(function(r){return r!==e&&r.prop===e.prop&&r.value.length>n.length});if(i||o){e.remove();return}e.value=n};e.parse=function parse(e){var r=n(e);var t=[];var i=[];for(var o=r.nodes,s=Array.isArray(o),a=0,o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u;i.push(f);if(f.type==="div"&&f.value===","){t.push(i);i=[]}}t.push(i);return t.filter(function(e){return e.length>0})};e.stringify=function stringify(e){if(e.length===0){return""}var r=[];for(var t=e,i=Array.isArray(t),o=0,t=i?t:t[Symbol.iterator]();;){var s;if(i){if(o>=t.length)break;s=t[o++]}else{o=t.next();if(o.done)break;s=o.value}var a=s;if(a[a.length-1].type!=="div"){a.push(this.div(e))}r=r.concat(a)}if(r[0].type==="div"){r=r.slice(1)}if(r[r.length-1].type==="div"){r=r.slice(0,+-2+1||0)}return n.stringify({nodes:r})};e.clone=function clone(e,r,t){var n=[];var i=false;for(var o=t,s=Array.isArray(o),a=0,o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u;if(!i&&f.type==="word"&&f.value===e){n.push({type:"word",value:r});i=true}else{n.push(f)}}return n};e.div=function div(e){for(var r=e,t=Array.isArray(r),n=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(n>=r.length)break;i=r[n++]}else{n=r.next();if(n.done)break;i=n.value}var o=i;for(var s=o,a=Array.isArray(s),u=0,s=a?s:s[Symbol.iterator]();;){var f;if(a){if(u>=s.length)break;f=s[u++]}else{u=s.next();if(u.done)break;f=u.value}var c=f;if(c.type==="div"&&c.value===","){return c}}}return{type:"div",value:",",after:" "}};e.cleanOtherPrefixes=function cleanOtherPrefixes(e,r){var t=this;return e.filter(function(e){var n=i.prefix(t.findProp(e));return n===""||n===r})};e.cleanFromUnprefixed=function cleanFromUnprefixed(e,r){var t=this;var n=e.map(function(e){return t.findProp(e)}).filter(function(e){return e.slice(0,r.length)===r}).map(function(e){return t.prefixes.unprefixed(e)});var o=[];for(var s=e,a=Array.isArray(s),u=0,s=a?s:s[Symbol.iterator]();;){var f;if(a){if(u>=s.length)break;f=s[u++]}else{u=s.next();if(u.done)break;f=u.value}var c=f;var l=this.findProp(c);var p=i.prefix(l);if(!n.includes(l)&&(p===r||p==="")){o.push(c)}}return o};e.disabled=function disabled(e,r){var t=["order","justify-content","align-self","align-content"];if(e.includes("flex")||t.includes(e)){if(this.prefixes.options.flexbox===false){return true}if(this.prefixes.options.flexbox==="no-2009"){return r.includes("2009")}}return undefined};e.ruleVendorPrefixes=function ruleVendorPrefixes(e){var r=e.parent;if(r.type!=="rule"){return false}else if(!r.selector.includes(":-")){return false}var t=s.prefixes().filter(function(e){return r.selector.includes(":"+e)});return t.length>0?t:false};return Transition}();e.exports=a},772:(e,r,t)=>{"use strict";var n=t(4633).list;e.exports={error:function error(e){var r=new Error(e);r.autoprefixer=true;throw r},uniq:function uniq(e){var r=[];for(var t=e,n=Array.isArray(t),i=0,t=n?t:t[Symbol.iterator]();;){var o;if(n){if(i>=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;if(!r.includes(s)){r.push(s)}}return r},removeNote:function removeNote(e){if(!e.includes(" ")){return e}return e.split(" ")[0]},escapeRegexp:function escapeRegexp(e){return e.replace(/[$()*+-.?[\\\]^{|}]/g,"\\$&")},regexp:function regexp(e,r){if(r===void 0){r=true}if(r){e=this.escapeRegexp(e)}return new RegExp("(^|[\\s,(])("+e+"($|[\\s(,]))","gi")},editList:function editList(e,r){var t=n.comma(e);var i=r(t,[]);if(t===i){return e}var o=e.match(/,\s*/);o=o?o[0]:", ";return i.join(o)},splitSelector:function splitSelector(e){return n.comma(e).map(function(e){return n.space(e).map(function(e){return e.split(/(?=\.|#)/g)})})}}},1882:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{var n=t(2731);var i=t(2355);var o=t(3856);function ValueParser(e){if(this instanceof ValueParser){this.nodes=n(e);return this}return new ValueParser(e)}ValueParser.prototype.toString=function(){return Array.isArray(this.nodes)?o(this.nodes):""};ValueParser.prototype.walk=function(e,r){i(this.nodes,e,r);return this};ValueParser.unit=t(2137);ValueParser.walk=i;ValueParser.stringify=o;e.exports=ValueParser},2731:e=>{var r="(".charCodeAt(0);var t=")".charCodeAt(0);var n="'".charCodeAt(0);var i='"'.charCodeAt(0);var o="\\".charCodeAt(0);var s="/".charCodeAt(0);var a=",".charCodeAt(0);var u=":".charCodeAt(0);var f="*".charCodeAt(0);var c="u".charCodeAt(0);var l="U".charCodeAt(0);var p="+".charCodeAt(0);var h=/^[a-f0-9?-]+$/i;e.exports=function(e){var B=[];var v=e;var d,b,y,g,m,C,w,S;var O=0;var T=v.charCodeAt(O);var E=v.length;var k=[{nodes:B}];var P=0;var D;var A="";var R="";var F="";while(O{function stringifyNode(e,r){var t=e.type;var n=e.value;var i;var o;if(r&&(o=r(e))!==undefined){return o}else if(t==="word"||t==="space"){return n}else if(t==="string"){i=e.quote||"";return i+n+(e.unclosed?"":i)}else if(t==="comment"){return"/*"+n+(e.unclosed?"":"*/")}else if(t==="div"){return(e.before||"")+n+(e.after||"")}else if(Array.isArray(e.nodes)){i=stringify(e.nodes,r);if(t!=="function"){return i}return n+"("+(e.before||"")+i+(e.after||"")+(e.unclosed?"":")")}return n}function stringify(e,r){var t,n;if(Array.isArray(e)){t="";for(n=e.length-1;~n;n-=1){t=stringifyNode(e[n],r)+t}return t}return stringifyNode(e,r)}e.exports=stringify},2137:e=>{var r="-".charCodeAt(0);var t="+".charCodeAt(0);var n=".".charCodeAt(0);var i="e".charCodeAt(0);var o="E".charCodeAt(0);function likeNumber(e){var i=e.charCodeAt(0);var o;if(i===t||i===r){o=e.charCodeAt(1);if(o>=48&&o<=57){return true}var s=e.charCodeAt(2);if(o===n&&s>=48&&s<=57){return true}return false}if(i===n){o=e.charCodeAt(1);if(o>=48&&o<=57){return true}return false}if(i>=48&&i<=57){return true}return false}e.exports=function(e){var s=0;var a=e.length;var u;var f;var c;if(a===0||!likeNumber(e)){return false}u=e.charCodeAt(s);if(u===t||u===r){s++}while(s57){break}s+=1}u=e.charCodeAt(s);f=e.charCodeAt(s+1);if(u===n&&f>=48&&f<=57){s+=2;while(s57){break}s+=1}}u=e.charCodeAt(s);f=e.charCodeAt(s+1);c=e.charCodeAt(s+2);if((u===i||u===o)&&(f>=48&&f<=57||(f===t||f===r)&&c>=48&&c<=57)){s+=f===t||f===r?3:2;while(s57){break}s+=1}}return{number:e.slice(0,s),unit:e.slice(s)}}},2355:e=>{e.exports=function walk(e,r,t){var n,i,o,s;for(n=0,i=e.length;n{"use strict";e.exports=balanced;function balanced(e,r,t){if(e instanceof RegExp)e=maybeMatch(e,t);if(r instanceof RegExp)r=maybeMatch(r,t);var n=range(e,r,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+e.length,n[1]),post:t.slice(n[1]+r.length)}}function maybeMatch(e,r){var t=r.match(e);return t?t[0]:null}balanced.range=range;function range(e,r,t){var n,i,o,s,a;var u=t.indexOf(e);var f=t.indexOf(r,u+1);var c=u;if(u>=0&&f>0){n=[];o=t.length;while(c>=0&&!a){if(c==u){n.push(c);u=t.indexOf(e,c+1)}else if(n.length==1){a=[n.pop(),f]}else{i=n.pop();if(i=0?u:f}if(n.length){a=[o,s]}}return a}},1302:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{36:"KB P M R S YB U",257:"I J K L",548:"C N D"},C:{1:"3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",16:"0 1 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB",130:"2"},D:{36:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{16:"dB WB",36:"G Y O F H E A B C N D fB gB hB iB XB T Q mB nB"},F:{16:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{16:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{16:"CC"},I:{16:"bB G M DC EC FC GC aB HC IC"},J:{16:"F A"},K:{16:"A B C DB T ZB Q"},L:{16:"U"},M:{16:"OB"},N:{16:"A B"},O:{16:"JC"},P:{16:"G KC LC MC NC OC XB PC QC"},Q:{16:"RC"},R:{16:"SC"},S:{130:"jB"}},B:1,C:"CSS3 Background-clip: text"}},2259:e=>{e.exports={A:{A:{1:"E A B",2:"O F H lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB",36:"sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",516:"G Y O F H E A B C N D"},E:{1:"F H E A B C N D hB iB XB T Q mB nB",772:"G Y O dB WB fB gB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V qB rB T ZB tB Q",2:"E oB",36:"pB"},G:{1:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",4:"WB uB aB xB",516:"TC"},H:{132:"CC"},I:{1:"M HC IC",36:"DC",516:"bB G GC aB",548:"EC FC"},J:{1:"F A"},K:{1:"A B C DB T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS3 Background-image options"}},9847:e=>{e.exports={A:{A:{1:"B",2:"O F H E A lB"},B:{1:"D I J K L KB P M R S YB U",129:"C N"},C:{1:"4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",260:"0 1 2 3 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",804:"G Y O F H E A B C N D kB sB"},D:{1:"AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",260:"5 6 7 8 9",388:"0 1 2 3 4 k l m n o p q r s t u v w x y z",1412:"I J K L Z a b c d e f g h i j",1956:"G Y O F H E A B C N D"},E:{129:"A B C N D iB XB T Q mB nB",1412:"O F H E gB hB",1956:"G Y dB WB fB"},F:{1:"0 1 2 3 4 5 6 7 8 9 x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E oB pB",260:"s t u v w",388:"I J K L Z a b c d e f g h i j k l m n o p q r",1796:"qB rB",1828:"B C T ZB tB Q"},G:{129:"D 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",1412:"H xB yB zB 0B",1956:"WB uB aB TC"},H:{1828:"CC"},I:{388:"M HC IC",1956:"bB G DC EC FC GC aB"},J:{1412:"A",1924:"F"},K:{1:"DB",2:"A",1828:"B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{1:"B",2:"A"},O:{388:"JC"},P:{1:"MC NC OC XB PC QC",260:"KC LC",388:"G"},Q:{260:"RC"},R:{260:"SC"},S:{260:"jB"}},B:4,C:"CSS3 Border images"}},9888:e=>{e.exports={A:{A:{1:"E A B",2:"O F H lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",257:"0 1 2 3 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",289:"bB kB sB",292:"eB"},D:{1:"0 1 2 3 4 5 6 7 8 9 Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G"},E:{1:"Y F H E A B C N D hB iB XB T Q mB nB",33:"G dB WB",129:"O fB gB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V qB rB T ZB tB Q",2:"E oB pB"},G:{1:"H D uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"WB"},H:{2:"CC"},I:{1:"bB G M EC FC GC aB HC IC",33:"DC"},J:{1:"F A"},K:{1:"B C DB T ZB Q",2:"A"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{257:"jB"}},B:4,C:"CSS3 Border-radius (rounded corners)"}},3807:e=>{e.exports={A:{A:{2:"O F H lB",260:"E",516:"A B"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB sB",33:"G Y O F H E A B C N D I"},D:{1:"0 1 2 3 4 5 6 7 8 9 g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L",33:"Z a b c d e f"},E:{1:"F H E A B C N D gB hB iB XB T Q mB nB",2:"G Y dB WB fB",33:"O"},F:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q"},G:{1:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC",33:"xB"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB",132:"HC IC"},J:{1:"A",2:"F"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"calc() as CSS unit value"}},8252:e=>{e.exports={A:{A:{1:"A B",2:"O F H E lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G kB sB",33:"Y O F H E A B C N D I"},D:{1:"0 1 2 3 4 5 6 7 8 9 x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w"},E:{1:"E A B C N D iB XB T Q mB nB",2:"dB WB",33:"O F H fB gB hB",292:"G Y"},F:{1:"0 1 2 3 4 5 6 7 8 9 k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E B oB pB qB rB T ZB tB",33:"C I J K L Z a b c d e f g h i j"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"H xB yB zB",164:"WB uB aB TC"},H:{2:"CC"},I:{1:"M",33:"G GC aB HC IC",164:"bB DC EC FC"},J:{33:"F A"},K:{1:"DB Q",2:"A B C T ZB"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{33:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS Animation"}},1977:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J K L"},C:{1:"4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",16:"eB",33:"0 1 2 3 bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB"},D:{1:"JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",16:"G Y O F H E A B C N D",33:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB"},E:{1:"E A B C N D iB XB T Q mB nB",16:"G Y O dB WB fB",33:"F H gB hB"},F:{1:"6 7 8 9 AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"0 1 2 3 4 5 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",16:"WB uB aB TC",33:"H xB yB zB"},H:{2:"CC"},I:{1:"M",16:"bB G DC EC FC GC aB",33:"HC IC"},J:{16:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{33:"JC"},P:{1:"OC XB PC QC",16:"G",33:"KC LC MC NC"},Q:{1:"RC"},R:{1:"SC"},S:{33:"jB"}},B:5,C:"CSS :any-link selector"}},8672:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"S YB U",33:"R",164:"KB P M",388:"C N D I J K L"},C:{1:"P M OB R S",164:"0 1 2 3 4 5 6 7 8 9 p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB",676:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o kB sB"},D:{1:"S YB U vB wB cB",33:"R",164:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M"},E:{164:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{2:"E B C oB pB qB rB T ZB tB Q",33:"FB W V",164:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB"},G:{164:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{164:"bB G M DC EC FC GC aB HC IC"},J:{164:"F A"},K:{2:"A B C T ZB Q",164:"DB"},L:{1:"U"},M:{164:"OB"},N:{2:"A",388:"B"},O:{164:"JC"},P:{164:"G KC LC MC NC OC XB PC QC"},Q:{164:"RC"},R:{164:"SC"},S:{164:"jB"}},B:5,C:"CSS Appearance"}},3613:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J",257:"K L"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB kB sB",578:"FB W V VB QB RB SB TB UB KB P M OB R S"},D:{1:"SB TB UB KB P M R S YB U vB wB cB",2:"0 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",194:"1 2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB"},E:{2:"G Y O F H dB WB fB gB hB",33:"E A B C N D iB XB T Q mB nB"},F:{1:"IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b c d e f g h i j k l m n oB pB qB rB T ZB tB Q",194:"0 1 2 3 4 5 6 7 8 9 o p q r s t u v w x y z AB BB CB EB GB HB"},G:{2:"H WB uB aB TC xB yB zB",33:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{578:"OB"},N:{2:"A B"},O:{2:"JC"},P:{1:"QC",2:"G",194:"KC LC MC NC OC XB PC"},Q:{194:"RC"},R:{194:"SC"},S:{2:"jB"}},B:7,C:"CSS Backdrop Filter"}},4016:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",164:"KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l kB sB"},D:{2:"G Y O F H E A B C N D I J K L Z a b",164:"0 1 2 3 4 5 6 7 8 9 c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O dB WB fB",164:"F H E A B C N D gB hB iB XB T Q mB nB"},F:{2:"E oB pB qB rB",129:"B C T ZB tB Q",164:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"WB uB aB TC xB",164:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{132:"CC"},I:{2:"bB G DC EC FC GC aB",164:"M HC IC"},J:{2:"F",164:"A"},K:{2:"A",129:"B C T ZB Q",164:"DB"},L:{164:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{164:"G KC LC MC NC OC XB PC QC"},Q:{164:"RC"},R:{164:"SC"},S:{1:"jB"}},B:5,C:"CSS box-decoration-break"}},5861:e=>{e.exports={A:{A:{1:"E A B",2:"O F H lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",33:"kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E"},E:{1:"O F H E A B C N D fB gB hB iB XB T Q mB nB",33:"Y",164:"G dB WB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V qB rB T ZB tB Q",2:"E oB pB"},G:{1:"H D TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"uB aB",164:"WB"},H:{2:"CC"},I:{1:"G M GC aB HC IC",164:"bB DC EC FC"},J:{1:"A",33:"F"},K:{1:"B C DB T ZB Q",2:"A"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS3 Box-shadow"}},147:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K",260:"KB P M R S YB U",3138:"L"},C:{1:"8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",132:"0 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB",644:"1 2 3 4 5 6 7"},D:{2:"G Y O F H E A B C N D I J K L Z a b c d",260:"9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",292:"0 1 2 3 4 5 6 7 8 e f g h i j k l m n o p q r s t u v w x y z"},E:{2:"G Y O dB WB fB gB",292:"F H E A B C N D hB iB XB T Q mB nB"},F:{2:"E B C oB pB qB rB T ZB tB Q",260:"0 1 2 3 4 5 6 7 8 9 w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",292:"I J K L Z a b c d e f g h i j k l m n o p q r s t u v"},G:{2:"WB uB aB TC xB",292:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB",260:"M",292:"HC IC"},J:{2:"F A"},K:{2:"A B C T ZB Q",260:"DB"},L:{260:"U"},M:{1:"OB"},N:{2:"A B"},O:{292:"JC"},P:{292:"G KC LC MC NC OC XB PC QC"},Q:{292:"RC"},R:{260:"SC"},S:{644:"jB"}},B:4,C:"CSS clip-path property (for HTML)"}},664:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",33:"KB P M R S YB U"},C:{1:"2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"0 1 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB"},D:{16:"G Y O F H E A B C N D I J K L",33:"0 1 2 3 4 5 6 7 8 9 Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y dB WB fB",33:"O F H E A B C N D gB hB iB XB T Q mB nB"},F:{2:"E B C oB pB qB rB T ZB tB Q",33:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{16:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{16:"bB G M DC EC FC GC aB HC IC"},J:{16:"F A"},K:{2:"A B C DB T ZB Q"},L:{16:"U"},M:{1:"OB"},N:{16:"A B"},O:{16:"JC"},P:{16:"G KC LC MC NC OC XB PC QC"},Q:{33:"RC"},R:{16:"SC"},S:{1:"jB"}},B:5,C:"CSS color-adjust"}},7794:e=>{e.exports={A:{A:{2:"O lB",2340:"F H E A B"},B:{2:"C N D I J K L",1025:"KB P M R S YB U"},C:{2:"eB bB kB",513:"JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",545:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB sB"},D:{2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u",1025:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"A B C N D XB T Q mB nB",2:"G Y dB WB fB",164:"O",4644:"F H E gB hB iB"},F:{2:"E B I J K L Z a b c d e f g h oB pB qB rB T ZB",545:"C tB Q",1025:"0 1 2 3 4 5 6 7 8 9 i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB",4260:"TC xB",4644:"H yB zB 0B 1B"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB HC IC",1025:"M"},J:{2:"F",4260:"A"},K:{2:"A B T ZB",545:"C Q",1025:"DB"},L:{1025:"U"},M:{545:"OB"},N:{2340:"A B"},O:{1:"JC"},P:{1025:"G KC LC MC NC OC XB PC QC"},Q:{1025:"RC"},R:{1025:"SC"},S:{4097:"jB"}},B:7,C:"Crisp edges/pixelated images"}},3323:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",33:"KB P M R S YB U"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"G Y O F H E A B C N D I J",33:"0 1 2 3 4 5 6 7 8 9 K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"A B C N D XB T Q mB nB",2:"G Y dB WB",33:"O F H E fB gB hB iB"},F:{2:"E B C oB pB qB rB T ZB tB Q",33:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB",33:"H TC xB yB zB 0B 1B"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB",33:"M HC IC"},J:{2:"F A"},K:{2:"A B C T ZB Q",33:"DB"},L:{33:"U"},M:{2:"OB"},N:{2:"A B"},O:{33:"JC"},P:{33:"G KC LC MC NC OC XB PC QC"},Q:{33:"RC"},R:{33:"SC"},S:{2:"jB"}},B:4,C:"CSS Cross-Fade Function"}},1779:e=>{e.exports={A:{A:{2:"O F H E lB",164:"A B"},B:{66:"KB P M R S YB U",164:"C N D I J K L"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i",66:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{2:"E B C I J K L Z a b c d e f g h i j k l m n o p q r s t oB pB qB rB T ZB tB Q",66:"0 1 2 3 4 5 6 7 8 9 u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{292:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A DB",292:"B C T ZB Q"},L:{2:"U"},M:{2:"OB"},N:{164:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{66:"RC"},R:{2:"SC"},S:{2:"jB"}},B:5,C:"CSS Device Adaptation"}},9666:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L KB P M R S YB U"},C:{33:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",164:"eB bB kB sB"},D:{2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{2:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{2:"U"},M:{33:"OB"},N:{2:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{2:"RC"},R:{2:"SC"},S:{33:"jB"}},B:5,C:"CSS element() function"}},7036:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e f g h"},E:{1:"E A B C N D iB XB T Q mB nB",2:"G Y O F H dB WB fB gB hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E B C oB pB qB rB T ZB tB"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"H WB uB aB TC xB yB zB"},H:{1:"CC"},I:{1:"M HC IC",2:"bB G DC EC FC GC aB"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS Feature Queries"}},6192:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L KB P M R S YB U"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"A B C N D iB XB T Q mB nB",2:"G Y O F H dB WB fB gB hB",33:"E"},F:{2:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"H WB uB aB TC xB yB zB",33:"0B 1B"},H:{2:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{2:"U"},M:{2:"OB"},N:{2:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{2:"RC"},R:{2:"SC"},S:{2:"jB"}},B:5,C:"CSS filter() function"}},9237:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",1028:"N D I J K L",1346:"C"},C:{1:"0 1 2 3 4 5 6 7 8 9 p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB",196:"o",516:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n sB"},D:{1:"7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K",33:"0 1 2 3 4 5 6 L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{1:"A B C N D iB XB T Q mB nB",2:"G Y dB WB fB",33:"O F H E gB hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"I J K L Z a b c d e f g h i j k l m n o p q r s t"},G:{1:"D 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC",33:"H xB yB zB 0B"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB",33:"HC IC"},J:{2:"F",33:"A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"MC NC OC XB PC QC",33:"G KC LC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS Filter Effects"}},1407:e=>{e.exports={A:{A:{1:"A B",2:"O F H E lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB",260:"J K L Z a b c d e f g h i j k l m n o p",292:"G Y O F H E A B C N D I sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"A B C N D I J K L Z a b c d e f",548:"G Y O F H E"},E:{2:"dB WB",260:"F H E A B C N D gB hB iB XB T Q mB nB",292:"O fB",804:"G Y"},F:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E B oB pB qB rB",33:"C tB",164:"T ZB"},G:{260:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",292:"TC xB",804:"WB uB aB"},H:{2:"CC"},I:{1:"M HC IC",33:"G GC aB",548:"bB DC EC FC"},J:{1:"A",548:"F"},K:{1:"DB Q",2:"A B",33:"C",164:"T ZB"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS Gradients"}},7776:e=>{e.exports={A:{A:{2:"O F H lB",8:"E",292:"A B"},B:{1:"J K L KB P M R S YB U",292:"C N D I"},C:{1:"8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L kB sB",8:"Z a b c d e f g h i j k l m n o p q r s t",584:"0 1 2 3 4 5 u v w x y z",1025:"6 7"},D:{1:"CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e",8:"f g h i",200:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB",1025:"BB"},E:{1:"B C N D XB T Q mB nB",2:"G Y dB WB fB",8:"O F H E A gB hB iB"},F:{1:"0 1 2 3 4 5 6 7 8 9 y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b c d e f g h oB pB qB rB T ZB tB Q",200:"i j k l m n o p q r s t u v w x"},G:{1:"D 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC",8:"H xB yB zB 0B 1B 2B"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC",8:"aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{292:"A B"},O:{1:"JC"},P:{1:"LC MC NC OC XB PC QC",2:"KC",8:"G"},Q:{1:"RC"},R:{2:"SC"},S:{1:"jB"}},B:4,C:"CSS Grid Layout (level 1)"}},9747:e=>{e.exports={A:{A:{2:"O F H E lB",33:"A B"},B:{33:"C N D I J K L",132:"KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y kB sB",33:"O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w"},D:{1:"wB cB",2:"0 1 2 3 4 5 6 7 8 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",132:"9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB"},E:{2:"G Y dB WB",33:"O F H E A B C N D fB gB hB iB XB T Q mB nB"},F:{2:"E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v oB pB qB rB T ZB tB Q",132:"0 1 2 3 4 5 6 7 8 9 w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"WB uB",33:"H D aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{4:"JC"},P:{1:"LC MC NC OC XB PC QC",2:"G",132:"KC"},Q:{2:"RC"},R:{132:"SC"},S:{1:"jB"}},B:5,C:"CSS Hyphenation"}},4197:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",33:"KB P M R S YB U"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"G Y O F H E A B C N D I J K L Z a",33:"0 1 2 3 4 5 6 7 8 9 b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y dB WB fB",33:"O F H E gB hB iB",129:"A B C N D XB T Q mB nB"},F:{2:"E B C oB pB qB rB T ZB tB Q",33:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"WB uB aB TC",33:"H xB yB zB 0B 1B",129:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB",33:"M HC IC"},J:{2:"F",33:"A"},K:{2:"A B C T ZB Q",33:"DB"},L:{33:"U"},M:{2:"OB"},N:{2:"A B"},O:{33:"JC"},P:{33:"G KC LC MC NC OC XB PC QC"},Q:{33:"RC"},R:{33:"SC"},S:{2:"jB"}},B:5,C:"CSS image-set"}},471:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",3588:"KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB",164:"bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u kB sB"},D:{292:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB",2052:"vB wB cB",3588:"NB FB W V VB QB RB SB TB UB KB P M R S YB U"},E:{292:"G Y O F H E A B C dB WB fB gB hB iB XB T",2052:"nB",3588:"N D Q mB"},F:{2:"E B C oB pB qB rB T ZB tB Q",292:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",3588:"AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{292:"H WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B",3588:"D 7B 8B 9B AC BC"},H:{2:"CC"},I:{292:"bB G DC EC FC GC aB HC IC",3588:"M"},J:{292:"F A"},K:{2:"A B C T ZB Q",3588:"DB"},L:{3588:"U"},M:{1:"OB"},N:{2:"A B"},O:{292:"JC"},P:{292:"G KC LC MC NC OC",3588:"XB PC QC"},Q:{3588:"RC"},R:{3588:"SC"},S:{3588:"jB"}},B:5,C:"CSS Logical Properties"}},4613:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J",164:"KB P M R S YB U",3138:"K",12292:"L"},C:{1:"7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",260:"0 1 2 3 4 5 6 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB"},D:{164:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"dB WB",164:"G Y O F H E A B C N D fB gB hB iB XB T Q mB nB"},F:{2:"E B C oB pB qB rB T ZB tB Q",164:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{164:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{164:"M HC IC",676:"bB G DC EC FC GC aB"},J:{164:"F A"},K:{2:"A B C T ZB Q",164:"DB"},L:{164:"U"},M:{1:"OB"},N:{2:"A B"},O:{164:"JC"},P:{164:"G KC LC MC NC OC XB PC QC"},Q:{164:"RC"},R:{164:"SC"},S:{260:"jB"}},B:4,C:"CSS Masks"}},3588:e=>{e.exports={A:{A:{2:"O F H lB",132:"E A B"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",260:"G Y O F H E A B C N D I kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",548:"G Y O F H E A B C N D I J K L Z a b c d e f g h i"},E:{2:"dB WB",548:"G Y O F H E A B C N D fB gB hB iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E",548:"B C oB pB qB rB T ZB tB"},G:{16:"WB",548:"H D uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{132:"CC"},I:{1:"M HC IC",16:"DC EC",548:"bB G FC GC aB"},J:{548:"F A"},K:{1:"DB Q",548:"A B C T ZB"},L:{1:"U"},M:{1:"OB"},N:{132:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:2,C:"Media Queries: resolution feature"}},3043:e=>{e.exports={A:{A:{2:"O F H E lB",132:"A B"},B:{1:"KB P M R S YB U",132:"C N D I J K",516:"L"},C:{1:"DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB kB sB"},D:{1:"JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB",260:"HB IB"},E:{2:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{1:"6 7 8 9 AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"0 1 2 3 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z oB pB qB rB T ZB tB Q",260:"4 5"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{1:"U"},M:{2:"OB"},N:{132:"A B"},O:{2:"JC"},P:{1:"NC OC XB PC QC",2:"G KC LC MC"},Q:{1:"RC"},R:{2:"SC"},S:{2:"jB"}},B:7,C:"CSS overscroll-behavior"}},5117:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",36:"C N D I J K L"},C:{1:"5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L kB sB",33:"0 1 2 3 4 Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},D:{1:"BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",36:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB"},E:{1:"B C N D XB T Q mB nB",2:"G dB WB",36:"Y O F H E A fB gB hB iB"},F:{1:"0 1 2 3 4 5 6 7 8 9 y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",36:"I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x"},G:{1:"D 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB",36:"H aB TC xB yB zB 0B 1B 2B"},H:{2:"CC"},I:{1:"M",36:"bB G DC EC FC GC aB HC IC"},J:{36:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{36:"A B"},O:{1:"JC"},P:{1:"MC NC OC XB PC QC",36:"G KC LC"},Q:{1:"RC"},R:{1:"SC"},S:{33:"jB"}},B:5,C:"::placeholder CSS pseudo-element"}},3502:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"N D I J K L KB P M R S YB U",2:"C"},C:{1:"UB KB P M OB R S",16:"eB",33:"0 1 2 3 4 5 6 7 8 9 bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",16:"G Y O F H E A B C N D",132:"I J K L Z a b c d e f g h i j k l m n o p"},E:{1:"E A B C N D iB XB T Q mB nB",16:"dB WB",132:"G Y O F H fB gB hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",16:"E B oB pB qB rB T",132:"C I J K L Z a b c ZB tB Q"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",16:"WB uB",132:"H aB TC xB yB zB"},H:{2:"CC"},I:{1:"M",16:"DC EC",132:"bB G FC GC aB HC IC"},J:{1:"A",132:"F"},K:{1:"DB",2:"A B T",132:"C ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{33:"jB"}},B:1,C:"CSS :read-only and :read-write selectors"}},5969:e=>{e.exports={A:{A:{2:"O F H E lB",420:"A B"},B:{2:"KB P M R S YB U",420:"C N D I J K L"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",36:"I J K L",66:"Z a b c d e f g h i j k l m n o"},E:{2:"G Y O C N D dB WB fB T Q mB nB",33:"F H E A B gB hB iB XB"},F:{2:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{2:"D WB uB aB TC xB 5B 6B 7B 8B 9B AC BC",33:"H yB zB 0B 1B 2B 3B 4B"},H:{2:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{2:"U"},M:{2:"OB"},N:{420:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{2:"RC"},R:{2:"SC"},S:{2:"jB"}},B:5,C:"CSS Regions"}},3347:e=>{e.exports={A:{A:{1:"E A B",2:"O F H lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q",2:"E"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M HC IC",2:"bB G DC EC FC GC aB"},J:{1:"A",2:"F"},K:{1:"C DB ZB Q",16:"A B T"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{33:"jB"}},B:5,C:"::selection CSS pseudo-element"}},4298:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J K L"},C:{1:"GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"0 1 2 3 4 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB",322:"5 6 7 8 9 AB BB CB DB EB PB"},D:{1:"0 1 2 3 4 5 6 7 8 9 r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n",194:"o p q"},E:{1:"B C N D XB T Q mB nB",2:"G Y O F dB WB fB gB",33:"H E A hB iB"},F:{1:"0 1 2 3 4 5 6 7 8 9 e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b c d oB pB qB rB T ZB tB Q"},G:{1:"D 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC xB yB",33:"H zB 0B 1B 2B"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{2:"jB"}},B:4,C:"CSS Shapes Level 1"}},87:e=>{e.exports={A:{A:{2:"O F H E lB",6308:"A",6436:"B"},B:{1:"KB P M R S YB U",6436:"C N D I J K L"},C:{1:"MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s kB sB",2052:"0 1 2 3 4 5 6 7 8 9 t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB"},D:{1:"NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB",8258:"X LB MB"},E:{1:"B C N D T Q mB nB",2:"G Y O F H dB WB fB gB hB",3108:"E A iB XB"},F:{1:"IB JB X LB MB NB FB W V",2:"0 1 2 3 4 5 6 7 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z oB pB qB rB T ZB tB Q",8258:"8 9 AB BB CB EB GB HB"},G:{1:"D 4B 5B 6B 7B 8B 9B AC BC",2:"H WB uB aB TC xB yB zB",3108:"0B 1B 2B 3B"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{2:"JC"},P:{1:"XB PC QC",2:"G KC LC MC NC OC"},Q:{2:"RC"},R:{2:"SC"},S:{2052:"jB"}},B:4,C:"CSS Scroll Snap"}},3727:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I",1028:"KB P M R S YB U",4100:"J K L"},C:{1:"DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f kB sB",194:"g h i j k l",516:"0 1 2 3 4 5 6 7 8 9 m n o p q r s t u v w x y z AB BB CB"},D:{2:"0 1 2 3 4 5 G Y O F H E A B C N D I J K L Z a b c r s t u v w x y z",322:"6 7 8 9 d e f g h i j k l m n o p q",1028:"AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"N D mB nB",2:"G Y O dB WB fB",33:"H E A B C hB iB XB T Q",2084:"F gB"},F:{2:"E B C I J K L Z a b c d e f g h i j k l m n o p q r s oB pB qB rB T ZB tB Q",322:"t u v",1028:"0 1 2 3 4 5 6 7 8 9 w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{1:"D 8B 9B AC BC",2:"WB uB aB TC",33:"H zB 0B 1B 2B 3B 4B 5B 6B 7B",2084:"xB yB"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB HC IC",1028:"M"},J:{2:"F A"},K:{2:"A B C T ZB Q",1028:"DB"},L:{1028:"U"},M:{1:"OB"},N:{2:"A B"},O:{1028:"JC"},P:{1:"LC MC NC OC XB PC QC",2:"G KC"},Q:{1028:"RC"},R:{2:"SC"},S:{516:"jB"}},B:5,C:"CSS position:sticky"}},9533:e=>{e.exports={A:{A:{132:"O F H E A B lB"},B:{1:"KB P M R S YB U",4:"C N D I J K L"},C:{1:"3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B kB sB",33:"0 1 2 C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},D:{1:"1 2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o",322:"0 p q r s t u v w x y z"},E:{2:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b oB pB qB rB T ZB tB Q",578:"c d e f g h i j k l m n"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{132:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",2:"G"},Q:{2:"RC"},R:{1:"SC"},S:{33:"jB"}},B:5,C:"CSS3 text-align-last"}},3100:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J K L"},C:{1:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r kB sB",194:"s t u"},D:{1:"2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"0 1 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{2:"G Y O F H E dB WB fB gB hB iB",16:"A",33:"B C N D XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b c d e f g h i j k l m n o oB pB qB rB T ZB tB Q"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"H WB uB aB TC xB yB zB 0B 1B"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",2:"G"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS text-orientation"}},8422:e=>{e.exports={A:{A:{2:"O F lB",161:"H E A B"},B:{2:"KB P M R S YB U",161:"C N D I J K L"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{2:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{2:"U"},M:{2:"OB"},N:{16:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{2:"RC"},R:{2:"SC"},S:{2:"jB"}},B:5,C:"CSS Text 4 text-spacing"}},5056:e=>{e.exports={A:{A:{1:"A B",2:"O F H E lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB sB",33:"Y O F H E A B C N D I",164:"G"},D:{1:"0 1 2 3 4 5 6 7 8 9 g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E A B C N D I J K L Z a b c d e f"},E:{1:"F H E A B C N D gB hB iB XB T Q mB nB",33:"O fB",164:"G Y dB WB"},F:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E oB pB",33:"C",164:"B qB rB T ZB tB"},G:{1:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"xB",164:"WB uB aB TC"},H:{2:"CC"},I:{1:"M HC IC",33:"bB G DC EC FC GC aB"},J:{1:"A",33:"F"},K:{1:"DB Q",33:"C",164:"A B T ZB"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS3 Transitions"}},1456:e=>{e.exports={A:{A:{132:"O F H E A B lB"},B:{1:"KB P M R S YB U",132:"C N D I J K L"},C:{1:"4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"0 1 2 3 K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",132:"eB bB G Y O F H E kB sB",292:"A B C N D I J"},D:{1:"2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",132:"G Y O F H E A B C N D I J",548:"0 1 K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{132:"G Y O F H dB WB fB gB hB",548:"E A B C N D iB XB T Q mB nB"},F:{132:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{132:"H WB uB aB TC xB yB zB",548:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{16:"CC"},I:{1:"M",16:"bB G DC EC FC GC aB HC IC"},J:{16:"F A"},K:{16:"A B C DB T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{132:"A B"},O:{16:"JC"},P:{1:"KC LC MC NC OC XB PC QC",16:"G"},Q:{16:"RC"},R:{16:"SC"},S:{33:"jB"}},B:4,C:"CSS unicode-bidi property"}},8307:e=>{e.exports={A:{A:{132:"O F H E A B lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p kB sB",322:"q r s t u"},D:{1:"2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O",16:"F",33:"0 1 H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{1:"B C N D T Q mB nB",2:"G dB WB",16:"Y",33:"O F H E A fB gB hB iB XB"},F:{1:"0 1 2 3 4 5 6 7 8 9 p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"I J K L Z a b c d e f g h i j k l m n o"},G:{1:"D 4B 5B 6B 7B 8B 9B AC BC",16:"WB uB aB",33:"H TC xB yB zB 0B 1B 2B 3B"},H:{2:"CC"},I:{1:"M",2:"DC EC FC",33:"bB G GC aB HC IC"},J:{33:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{36:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",33:"G"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS writing-mode property"}},7759:e=>{e.exports={A:{A:{1:"H E A B",8:"O F lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E"},E:{1:"O F H E A B C N D fB gB hB iB XB T Q mB nB",33:"G Y dB WB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q",2:"E"},G:{1:"H D TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"WB uB aB"},H:{1:"CC"},I:{1:"G M GC aB HC IC",33:"bB DC EC FC"},J:{1:"A",33:"F"},K:{1:"A B C DB T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS3 Box-sizing"}},4528:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"I J K L KB P M R S YB U",2:"C N D"},C:{1:"0 1 2 3 4 5 6 7 8 9 h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g kB sB"},D:{1:"MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB"},E:{1:"B C N D T Q mB nB",33:"G Y O F H E A dB WB fB gB hB iB XB"},F:{1:"9 C AB BB CB EB GB HB IB JB X LB MB NB FB W V tB Q",2:"E B oB pB qB rB T ZB",33:"0 1 2 3 4 5 6 7 8 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{33:"F A"},K:{2:"A B C T ZB Q",33:"DB"},L:{1:"U"},M:{2:"OB"},N:{2:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{33:"RC"},R:{2:"SC"},S:{2:"jB"}},B:3,C:"CSS grab & grabbing cursors"}},8546:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"eB bB G Y O F H E A B C N D I J K L Z a b c d kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q"},E:{1:"E A B C N D iB XB T Q mB nB",33:"G Y O F H dB WB fB gB hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 C e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V tB Q",2:"E B oB pB qB rB T ZB",33:"I J K L Z a b c d"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{33:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{2:"OB"},N:{2:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{2:"RC"},R:{2:"SC"},S:{2:"jB"}},B:4,C:"CSS3 Cursors: zoom-in & zoom-out"}},9807:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J K L"},C:{2:"eB bB kB sB",33:"7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",164:"0 1 2 3 4 5 6 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},D:{1:"0 1 2 3 4 5 6 7 8 9 w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a",132:"b c d e f g h i j k l m n o p q r s t u v"},E:{1:"D mB nB",2:"G Y O dB WB fB",132:"F H E A B C N gB hB iB XB T Q"},F:{1:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E oB pB qB",132:"I J K L Z a b c d e f g h i",164:"B C rB T ZB tB Q"},G:{1:"D BC",2:"WB uB aB TC xB",132:"H yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC"},H:{164:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB",132:"HC IC"},J:{132:"F A"},K:{1:"DB",2:"A",164:"B C T ZB Q"},L:{1:"U"},M:{33:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{164:"jB"}},B:5,C:"CSS3 tab-size"}},3714:e=>{e.exports={A:{A:{2:"O F H E lB",1028:"B",1316:"A"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",164:"eB bB G Y O F H E A B C N D I J K L Z a b kB sB",516:"c d e f g h"},D:{1:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"b c d e f g h i",164:"G Y O F H E A B C N D I J K L Z a"},E:{1:"E A B C N D iB XB T Q mB nB",33:"F H gB hB",164:"G Y O dB WB fB"},F:{1:"0 1 2 3 4 5 6 7 8 9 K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E B C oB pB qB rB T ZB tB",33:"I J"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"H yB zB",164:"WB uB aB TC xB"},H:{1:"CC"},I:{1:"M HC IC",164:"bB G DC EC FC GC aB"},J:{1:"A",164:"F"},K:{1:"DB Q",2:"A B C T ZB"},L:{1:"U"},M:{1:"OB"},N:{1:"B",292:"A"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS Flexible Box Layout Module"}},7011:e=>{e.exports={A:{A:{1:"A B",2:"O F H E lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB sB",33:"I J K L Z a b c d e f g h i j k l m n",164:"G Y O F H E A B C N D"},D:{1:"2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I",33:"0 1 b c d e f g h i j k l m n o p q r s t u v w x y z",292:"J K L Z a"},E:{1:"A B C N D iB XB T Q mB nB",2:"F H E dB WB gB hB",4:"G Y O fB"},F:{1:"0 1 2 3 4 5 6 7 8 9 p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"I J K L Z a b c d e f g h i j k l m n o"},G:{1:"D 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"H yB zB 0B",4:"WB uB aB TC xB"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB",33:"HC IC"},J:{2:"F",33:"A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",33:"G"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS font-feature-settings"}},9195:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J K L"},C:{1:"0 1 2 3 4 5 6 7 8 9 o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d kB sB",194:"e f g h i j k l m n"},D:{1:"0 1 2 3 4 5 6 7 8 9 n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i",33:"j k l m"},E:{1:"A B C N D iB XB T Q mB nB",2:"G Y O dB WB fB gB",33:"F H E hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I oB pB qB rB T ZB tB Q",33:"J K L Z"},G:{2:"WB uB aB TC xB yB",33:"H D zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M IC",2:"bB G DC EC FC GC aB",33:"HC"},J:{2:"F",33:"A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS3 font-kerning"}},5833:e=>{e.exports={A:{A:{2:"O F H E A lB",548:"B"},B:{1:"KB P M R S YB U",516:"C N D I J K L"},C:{1:"IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E kB sB",676:"0 A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",1700:"1 2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB"},D:{1:"W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D",676:"I J K L Z",804:"0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB"},E:{2:"G Y dB WB",676:"fB",804:"O F H E A B C N D gB hB iB XB T Q mB nB"},F:{1:"IB JB X LB MB NB FB W V Q",2:"E B C oB pB qB rB T ZB tB",804:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB"},G:{2:"H WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B",2052:"D 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F",292:"A"},K:{2:"A B C T ZB Q",804:"DB"},L:{804:"U"},M:{1:"OB"},N:{2:"A",548:"B"},O:{804:"JC"},P:{1:"XB PC QC",804:"G KC LC MC NC OC"},Q:{804:"RC"},R:{804:"SC"},S:{1:"jB"}},B:1,C:"Full Screen API"}},3794:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",1537:"KB P M R S YB U"},C:{2:"eB",932:"0 1 2 3 4 5 6 7 8 9 bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB kB sB",2308:"X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S"},D:{2:"G Y O F H E A B C N D I J K L Z a b",545:"c d e f g h i j k l m n o p q r s t u v w x y z",1537:"0 1 2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O dB WB fB",516:"B C N D T Q mB nB",548:"E A iB XB",676:"F H gB hB"},F:{2:"E B C oB pB qB rB T ZB tB Q",513:"o",545:"I J K L Z a b c d e f g h i j k l m",1537:"0 1 2 3 4 5 6 7 8 9 n p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"WB uB aB TC xB",548:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",676:"H yB zB"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB",545:"HC IC",1537:"M"},J:{2:"F",545:"A"},K:{2:"A B C T ZB Q",1537:"DB"},L:{1537:"U"},M:{2340:"OB"},N:{2:"A B"},O:{1:"JC"},P:{545:"G",1537:"KC LC MC NC OC XB PC QC"},Q:{545:"RC"},R:{1537:"SC"},S:{932:"jB"}},B:5,C:"Intrinsic & Extrinsic Sizing"}},1448:e=>{e.exports={A:{A:{1:"A B",2:"O F H E lB"},B:{1:"C N D I J K L",516:"KB P M R S YB U"},C:{132:"6 7 8 9 AB BB CB DB EB PB GB HB IB",164:"0 1 2 3 4 5 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB",516:"JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S"},D:{420:"0 1 2 3 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",516:"4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"A B C N D XB T Q mB nB",132:"E iB",164:"F H hB",420:"G Y O dB WB fB gB"},F:{1:"C T ZB tB Q",2:"E B oB pB qB rB",420:"I J K L Z a b c d e f g h i j k l m n o p q",516:"0 1 2 3 4 5 6 7 8 9 r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",132:"0B 1B",164:"H yB zB",420:"WB uB aB TC xB"},H:{1:"CC"},I:{420:"bB G DC EC FC GC aB HC IC",516:"M"},J:{420:"F A"},K:{1:"C T ZB Q",2:"A B",516:"DB"},L:{516:"U"},M:{132:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",420:"G"},Q:{132:"RC"},R:{132:"SC"},S:{164:"jB"}},B:4,C:"CSS3 Multiple column layout"}},5147:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I",260:"J K L"},C:{1:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k"},E:{1:"A B C N D XB T Q mB nB",2:"G Y O F dB WB fB gB",132:"H E hB iB"},F:{1:"0 1 2 3 4 5 6 7 8 9 Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E I J K L oB pB qB",33:"B C rB T ZB tB Q"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC xB yB",132:"H zB 0B 1B"},H:{33:"CC"},I:{1:"M IC",2:"bB G DC EC FC GC aB HC"},J:{2:"F A"},K:{1:"DB",2:"A",33:"B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS3 object-fit/object-position"}},6714:e=>{e.exports={A:{A:{1:"B",2:"O F H E lB",164:"A"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y kB sB",8:"O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u",328:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB"},D:{1:"9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b",8:"0 1 2 3 4 5 c d e f g h i j k l m n o p q r s t u v w x y z",584:"6 7 8"},E:{1:"N D mB nB",2:"G Y O dB WB fB",8:"F H E A B C gB hB iB XB T",1096:"Q"},F:{1:"0 1 2 3 4 5 6 7 8 9 w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",8:"I J K L Z a b c d e f g h i j k l m n o p q r s",584:"t u v"},G:{1:"D 9B AC BC",8:"H WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B",6148:"8B"},H:{2:"CC"},I:{1:"M",8:"bB G DC EC FC GC aB HC IC"},J:{8:"F A"},K:{1:"DB",2:"A",8:"B C T ZB Q"},L:{1:"U"},M:{328:"OB"},N:{1:"B",36:"A"},O:{8:"JC"},P:{1:"LC MC NC OC XB PC QC",2:"KC",8:"G"},Q:{1:"RC"},R:{2:"SC"},S:{328:"jB"}},B:2,C:"Pointer events"}},6848:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",2052:"KB P M R S YB U"},C:{2:"eB bB G Y kB sB",1028:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",1060:"O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p"},D:{2:"G Y O F H E A B C N D I J K L Z a b c d e f",226:"0 1 2 3 4 5 6 7 8 9 g h i j k l m n o p q r s t u v w x y z AB",2052:"BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O F dB WB fB gB",772:"N D Q mB nB",804:"H E A B C iB XB T",1316:"hB"},F:{2:"E B C I J K L Z a b c d e f g h i j k l m n o oB pB qB rB T ZB tB Q",226:"p q r s t u v w x",2052:"0 1 2 3 4 5 6 7 8 9 y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"WB uB aB TC xB yB",292:"H D zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C T ZB Q",2052:"DB"},L:{2052:"U"},M:{1:"OB"},N:{2:"A B"},O:{2052:"JC"},P:{2:"G KC LC",2052:"MC NC OC XB PC QC"},Q:{2:"RC"},R:{1:"SC"},S:{1028:"jB"}},B:4,C:"text-decoration styling"}},5802:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",164:"KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y kB sB",322:"z"},D:{2:"G Y O F H E A B C N D I J K L Z a b c d e",164:"0 1 2 3 4 5 6 7 8 9 f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"H E A B C N D hB iB XB T Q mB nB",2:"G Y O dB WB fB",164:"F gB"},F:{2:"E B C oB pB qB rB T ZB tB Q",164:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{1:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC xB"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB",164:"M HC IC"},J:{2:"F",164:"A"},K:{2:"A B C T ZB Q",164:"DB"},L:{164:"U"},M:{1:"OB"},N:{2:"A B"},O:{164:"JC"},P:{164:"G KC LC MC NC OC XB PC QC"},Q:{164:"RC"},R:{164:"SC"},S:{1:"jB"}},B:4,C:"text-emphasis styling"}},123:e=>{e.exports={A:{A:{1:"O F H E A B",2:"lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",8:"eB bB G Y O kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V T ZB tB Q",33:"E oB pB qB rB"},G:{1:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{1:"CC"},I:{1:"bB G M DC EC FC GC aB HC IC"},J:{1:"F A"},K:{1:"DB Q",33:"A B C T ZB"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS3 Text-overflow"}},6421:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",33:"C N D I J K L"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{1:"8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"0 1 2 3 4 5 6 7 G Y O F H E A B C N D I J K L Z a b c d e f h i j k l m n o p q r s t u v w x y z",258:"g"},E:{2:"G Y O F H E A B C N D dB WB gB hB iB XB T Q mB nB",258:"fB"},F:{1:"0 1 2 3 4 5 6 7 8 9 x z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w y oB pB qB rB T ZB tB Q"},G:{2:"WB uB aB",33:"H D TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{33:"OB"},N:{161:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",2:"G"},Q:{2:"RC"},R:{2:"SC"},S:{2:"jB"}},B:7,C:"CSS text-size-adjust"}},762:e=>{e.exports={A:{A:{2:"lB",8:"O F H",129:"A B",161:"E"},B:{1:"K L KB P M R S YB U",129:"C N D I J"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",33:"G Y O F H E A B C N D I kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p"},E:{1:"E A B C N D iB XB T Q mB nB",33:"G Y O F H dB WB fB gB hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E oB pB",33:"B C I J K L Z a b c qB rB T ZB tB"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"H WB uB aB TC xB yB zB"},H:{2:"CC"},I:{1:"M",33:"bB G DC EC FC GC aB HC IC"},J:{33:"F A"},K:{1:"B C DB T ZB Q",2:"A"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS3 2D Transforms"}},58:e=>{e.exports={A:{A:{2:"O F H E lB",132:"A B"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E kB sB",33:"A B C N D I"},D:{1:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B",33:"C N D I J K L Z a b c d e f g h i j k l m n o p"},E:{2:"dB WB",33:"G Y O F H fB gB hB",257:"E A B C N D iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"I J K L Z a b c"},G:{33:"H WB uB aB TC xB yB zB",257:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"DC EC FC",33:"bB G GC aB HC IC"},J:{33:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{132:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS3 3D Transforms"}},7511:e=>{e.exports={A:{A:{2:"O F H E lB",33:"A B"},B:{1:"KB P M R S YB U",33:"C N D I J K L"},C:{1:"NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB kB sB"},D:{1:"8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"0 1 2 3 4 5 6 7 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{33:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"I J K L Z a b c d e f g h i j k l m n o p q r s t u"},G:{33:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",33:"bB G DC EC FC GC aB HC IC"},J:{33:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{33:"A B"},O:{2:"JC"},P:{1:"LC MC NC OC XB PC QC",33:"G KC"},Q:{1:"RC"},R:{2:"SC"},S:{33:"jB"}},B:5,C:"CSS user-select: none"}},9883:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));const i=/:blank([^\w-]|$)/gi;var o=n.plugin("css-blank-pseudo",e=>{const r=String(Object(e).replaceWith||"[blank]");const t=Boolean("preserve"in Object(e)?e.preserve:true);return e=>{e.walkRules(i,e=>{const n=e.selector.replace(i,(e,t)=>{return`${r}${t}`});const o=e.clone({selector:n});if(t){e.before(o)}else{e.replaceWith(o)}})}});e.exports=o},8410:e=>{"use strict";var r={};var t=r.hasOwnProperty;var n=function merge(e,r){if(!e){return r}var n={};for(var i in r){n[i]=t.call(e,i)?e[i]:r[i]}return n};var i=/[ -,\.\/;-@\[-\^`\{-~]/;var o=/[ -,\.\/;-@\[\]\^`\{-~]/;var s=/['"\\]/;var a=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var u=function cssesc(e,r){r=n(r,cssesc.options);if(r.quotes!="single"&&r.quotes!="double"){r.quotes="single"}var t=r.quotes=="double"?'"':"'";var s=r.isIdentifier;var u=e.charAt(0);var f="";var c=0;var l=e.length;while(c126){if(h>=55296&&h<=56319&&c{"use strict";r.__esModule=true;var n=t(653);var i=_interopRequireDefault(n);var o=t(6231);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=function parser(e){return new i.default(e)};Object.assign(a,s);delete a.__esModule;r.default=a;e.exports=r["default"]},8168:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parser);this.rule=e;this.options=Object.assign({lossy:false,safe:false},r);this.position=0;this.css=typeof this.rule==="string"?this.rule:this.rule.selector;this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var t=getTokenSourceSpan(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new p.default({source:t});this.root.errorGenerator=this._errorGenerator();var n=new B.default({source:{start:{line:1,column:1}}});this.root.append(n);this.current=n;this.loop()}Parser.prototype._errorGenerator=function _errorGenerator(){var e=this;return function(r,t){if(typeof e.rule==="string"){return new Error(r)}return e.rule.error(r,t)}};Parser.prototype.attribute=function attribute(){var e=[];var r=this.currToken;this.position++;while(this.position1&&arguments[1]!==undefined?arguments[1]:false;var n="";var i="";e.forEach(function(e){var o=r.lossySpace(e.spaces.before,t);var s=r.lossySpace(e.rawSpaceBefore,t);n+=o+r.lossySpace(e.spaces.after,t&&o.length===0);i+=o+e.value+r.lossySpace(e.rawSpaceAfter,t&&s.length===0)});if(i===n){i=undefined}var o={space:n,rawSpace:i};return o};Parser.prototype.isNamedCombinator=function isNamedCombinator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position;return this.tokens[e+0]&&this.tokens[e+0][N.FIELDS.TYPE]===q.slash&&this.tokens[e+1]&&this.tokens[e+1][N.FIELDS.TYPE]===q.word&&this.tokens[e+2]&&this.tokens[e+2][N.FIELDS.TYPE]===q.slash};Parser.prototype.namedCombinator=function namedCombinator(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]);var r=(0,U.unesc)(e).toLowerCase();var t={};if(r!==e){t.value="/"+e+"/"}var n=new F.default({value:"/"+r+"/",source:getSource(this.currToken[N.FIELDS.START_LINE],this.currToken[N.FIELDS.START_COL],this.tokens[this.position+2][N.FIELDS.END_LINE],this.tokens[this.position+2][N.FIELDS.END_COL]),sourceIndex:this.currToken[N.FIELDS.START_POS],raws:t});this.position=this.position+3;return n}else{this.unexpected()}};Parser.prototype.combinator=function combinator(){var e=this;if(this.content()==="|"){return this.namespace()}var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][N.FIELDS.TYPE]===q.comma){var t=this.parseWhitespaceEquivalentTokens(r);if(t.length>0){var n=this.current.last;if(n){var i=this.convertWhitespaceNodesToSpace(t),o=i.space,s=i.rawSpace;if(s!==undefined){n.rawSpaceAfter+=s}n.spaces.after+=o}else{t.forEach(function(r){return e.newNode(r)})}}return}var a=this.currToken;var u=undefined;if(r>this.position){u=this.parseWhitespaceEquivalentTokens(r)}var f=void 0;if(this.isNamedCombinator()){f=this.namedCombinator()}else if(this.currToken[N.FIELDS.TYPE]===q.combinator){f=new F.default({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[N.FIELDS.START_POS]});this.position++}else if(H[this.currToken[N.FIELDS.TYPE]]){}else if(!u){this.unexpected()}if(f){if(u){var c=this.convertWhitespaceNodesToSpace(u),l=c.space,p=c.rawSpace;f.spaces.before=l;f.rawSpaceBefore=p}}else{var h=this.convertWhitespaceNodesToSpace(u,true),B=h.space,v=h.rawSpace;if(!v){v=B}var d={};var b={spaces:{}};if(B.endsWith(" ")&&v.endsWith(" ")){d.before=B.slice(0,B.length-1);b.spaces.before=v.slice(0,v.length-1)}else if(B.startsWith(" ")&&v.startsWith(" ")){d.after=B.slice(1);b.spaces.after=v.slice(1)}else{b.value=v}f=new F.default({value:" ",source:getTokenSourceSpan(a,this.tokens[this.position-1]),sourceIndex:a[N.FIELDS.START_POS],spaces:d,raws:b})}if(this.currToken&&this.currToken[N.FIELDS.TYPE]===q.space){f.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(f)};Parser.prototype.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var e=new B.default({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(e);this.current=e;this.position++};Parser.prototype.comment=function comment(){var e=this.currToken;this.newNode(new y.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.error=function error(e,r){throw this.root.error(e,r)};Parser.prototype.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[N.FIELDS.START_POS]})};Parser.prototype.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[N.FIELDS.START_POS])};Parser.prototype.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[N.FIELDS.START_POS])};Parser.prototype.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[N.FIELDS.START_POS])};Parser.prototype.namespace=function namespace(){var e=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[N.FIELDS.TYPE]===q.word){this.position++;return this.word(e)}else if(this.nextToken[N.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(e)}};Parser.prototype.nesting=function nesting(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var r=this.currToken;this.newNode(new j.default({value:this.content(),source:getTokenSource(r),sourceIndex:r[N.FIELDS.START_POS]}));this.position++};Parser.prototype.parentheses=function parentheses(){var e=this.current.last;var r=1;this.position++;if(e&&e.type===J.PSEUDO){var t=new B.default({source:{start:tokenStart(this.tokens[this.position-1])}});var n=this.current;e.append(t);this.current=t;while(this.position1&&e.nextToken&&e.nextToken[N.FIELDS.TYPE]===q.openParenthesis){e.error("Misplaced parenthesis.",{index:e.nextToken[N.FIELDS.START_POS]})}})}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[N.FIELDS.START_POS])}};Parser.prototype.space=function space(){var e=this.content();if(this.position===0||this.prevToken[N.FIELDS.TYPE]===q.comma||this.prevToken[N.FIELDS.TYPE]===q.openParenthesis){this.spaces=this.optionalSpace(e);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[N.FIELDS.TYPE]===q.comma||this.nextToken[N.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(e);this.position++}else{this.combinator()}};Parser.prototype.string=function string(){var e=this.currToken;this.newNode(new O.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.universal=function universal(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}var t=this.currToken;this.newNode(new A.default({value:this.content(),source:getTokenSource(t),sourceIndex:t[N.FIELDS.START_POS]}),e);this.position++};Parser.prototype.splitWord=function splitWord(e,r){var t=this;var n=this.nextToken;var i=this.content();while(n&&~[q.dollar,q.caret,q.equals,q.word].indexOf(n[N.FIELDS.TYPE])){this.position++;var o=this.content();i+=o;if(o.lastIndexOf("\\")===o.length-1){var s=this.nextToken;if(s&&s[N.FIELDS.TYPE]===q.space){i+=this.requiredSpace(this.content(s));this.position++}}n=this.nextToken}var a=(0,u.default)(i,".").filter(function(e){return i[e-1]!=="\\"});var f=(0,u.default)(i,"#");var l=(0,u.default)(i,"#{");if(l.length){f=f.filter(function(e){return!~l.indexOf(e)})}var p=(0,M.default)((0,c.default)([0].concat(a,f)));p.forEach(function(n,o){var s=p[o+1]||i.length;var u=i.slice(n,s);if(o===0&&r){return r.call(t,u,p.length)}var c=void 0;var l=t.currToken;var h=l[N.FIELDS.START_POS]+p[o];var B=getSource(l[1],l[2]+n,l[3],l[2]+(s-1));if(~a.indexOf(n)){var v={value:u.slice(1),source:B,sourceIndex:h};c=new d.default(unescapeProp(v,"value"))}else if(~f.indexOf(n)){var b={value:u.slice(1),source:B,sourceIndex:h};c=new m.default(unescapeProp(b,"value"))}else{var y={value:u,source:B,sourceIndex:h};unescapeProp(y,"value");c=new w.default(y)}t.newNode(c,e);e=null});this.position++};Parser.prototype.word=function word(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}return this.splitWord(e)};Parser.prototype.loop=function loop(){while(this.position0&&arguments[0]!==undefined?arguments[0]:this.currToken;return this.css.slice(e[N.FIELDS.START_POS],e[N.FIELDS.END_POS])};Parser.prototype.locateNextMeaningfulToken=function locateNextMeaningfulToken(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position+1;var r=e;while(r{"use strict";r.__esModule=true;var n=t(8168);var i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=function(){function Processor(e,r){_classCallCheck(this,Processor);this.func=e||function noop(){};this.funcRes=null;this.options=r}Processor.prototype._shouldUpdateSelector=function _shouldUpdateSelector(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=Object.assign({},this.options,r);if(t.updateSelector===false){return false}else{return typeof e!=="string"}};Processor.prototype._isLossy=function _isLossy(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=Object.assign({},this.options,e);if(r.lossless===false){return true}else{return false}};Processor.prototype._root=function _root(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=new i.default(e,this._parseOptions(r));return t.root};Processor.prototype._parseOptions=function _parseOptions(e){return{lossy:this._isLossy(e)}};Processor.prototype._run=function _run(e){var r=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new Promise(function(n,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(n){var i=undefined;if(r._shouldUpdateSelector(e,t)){i=o.toString();e.selector=i}return{transform:n,root:o,string:i}}).then(n,i)}catch(e){i(e);return}})};Processor.prototype._runSync=function _runSync(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=this._root(e,r);var n=this.func(t);if(n&&typeof n.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var i=undefined;if(r.updateSelector&&typeof e!=="string"){i=t.toString();e.selector=i}return{transform:n,root:t,string:i}};Processor.prototype.ast=function ast(e,r){return this._run(e,r).then(function(e){return e.root})};Processor.prototype.astSync=function astSync(e,r){return this._runSync(e,r).root};Processor.prototype.transform=function transform(e,r){return this._run(e,r).then(function(e){return e.transform})};Processor.prototype.transformSync=function transformSync(e,r){return this._runSync(e,r).transform};Processor.prototype.process=function process(e,r){return this._run(e,r).then(function(e){return e.string||e.root.toString()})};Processor.prototype.processSync=function processSync(e,r){var t=this._runSync(e,r);return t.string||t.root.toString()};return Processor}();r.default=o;e.exports=r["default"]},48:(e,r,t)=>{"use strict";r.__esModule=true;var n;var i=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Attribute);var t=_possibleConstructorReturn(this,e.call(this,handleDeprecatedContructorOpts(r)));t.type=l.ATTRIBUTE;t.raws=t.raws||{};Object.defineProperty(t.raws,"unquoted",{get:h(function(){return t.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:h(function(){return t.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")});t._constructed=true;return t}Attribute.prototype.getQuotedValue=function getQuotedValue(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=this._determineQuoteMark(e);var t=g[r];var n=(0,s.default)(this._value,t);return n};Attribute.prototype._determineQuoteMark=function _determineQuoteMark(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)};Attribute.prototype.setValue=function setValue(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this._value=e;this._quoteMark=this._determineQuoteMark(r);this._syncRawValue()};Attribute.prototype.smartQuoteMark=function smartQuoteMark(e){var r=this.value;var t=r.replace(/[^']/g,"").length;var n=r.replace(/[^"]/g,"").length;if(t+n===0){var i=(0,s.default)(r,{isIdentifier:true});if(i===r){return Attribute.NO_QUOTE}else{var o=this.preferredQuoteMark(e);if(o===Attribute.NO_QUOTE){var a=this.quoteMark||e.quoteMark||Attribute.DOUBLE_QUOTE;var u=g[a];var f=(0,s.default)(r,u);if(f.length1&&arguments[1]!==undefined?arguments[1]:e;var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:defaultAttrConcat;var n=this._spacesFor(r);return t(this.stringifyProperty(e),n)};Attribute.prototype.offsetOf=function offsetOf(e){var r=1;var t=this._spacesFor("attribute");r+=t.before.length;if(e==="namespace"||e==="ns"){return this.namespace?r:-1}if(e==="attributeNS"){return r}r+=this.namespaceString.length;if(this.namespace){r+=1}if(e==="attribute"){return r}r+=this.stringifyProperty("attribute").length;r+=t.after.length;var n=this._spacesFor("operator");r+=n.before.length;var i=this.stringifyProperty("operator");if(e==="operator"){return i?r:-1}r+=i.length;r+=n.after.length;var o=this._spacesFor("value");r+=o.before.length;var s=this.stringifyProperty("value");if(e==="value"){return s?r:-1}r+=s.length;r+=o.after.length;var a=this._spacesFor("insensitive");r+=a.before.length;if(e==="insensitive"){return this.insensitive?r:-1}return-1};Attribute.prototype.toString=function toString(){var e=this;var r=[this.rawSpaceBefore,"["];r.push(this._stringFor("qualifiedAttribute","attribute"));if(this.operator&&this.value){r.push(this._stringFor("operator"));r.push(this._stringFor("value"));r.push(this._stringFor("insensitiveFlag","insensitive",function(r,t){if(r.length>0&&!e.quoted&&t.before.length===0&&!(e.spaces.value&&e.spaces.value.after)){t.before=" "}return defaultAttrConcat(r,t)}))}r.push("]");r.push(this.rawSpaceAfter);return r.join("")};i(Attribute,[{key:"quoted",get:function get(){var e=this.quoteMark;return e==="'"||e==='"'},set:function set(e){d()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(e){if(!this._constructed){this._quoteMark=e;return}if(this._quoteMark!==e){this._quoteMark=e;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(e){if(this._constructed){var r=unescapeValue(e),t=r.deprecatedUsage,n=r.unescaped,i=r.quoteMark;if(t){v()}if(n===this._value&&i===this._quoteMark){return}this._value=n;this._quoteMark=i;this._syncRawValue()}else{this._value=e}}},{key:"attribute",get:function get(){return this._attribute},set:function set(e){this._handleEscapes("attribute",e);this._attribute=e}}]);return Attribute}(c.default);y.NO_QUOTE=null;y.SINGLE_QUOTE="'";y.DOUBLE_QUOTE='"';r.default=y;var g=(n={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},n[null]={isIdentifier:true},n);function defaultAttrConcat(e,r){return""+r.before+e+r.after}},3570:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(3877);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Combinator,e);function Combinator(r){_classCallCheck(this,Combinator);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMBINATOR;return t}return Combinator}(i.default);r.default=s;e.exports=r["default"]},6941:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3877);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Comment,e);function Comment(r){_classCallCheck(this,Comment);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMMENT;return t}return Comment}(i.default);r.default=s;e.exports=r["default"]},9283:(e,r,t)=>{"use strict";r.__esModule=true;r.universal=r.tag=r.string=r.selector=r.root=r.pseudo=r.nesting=r.id=r.comment=r.combinator=r.className=r.attribute=undefined;var n=t(48);var i=_interopRequireDefault(n);var o=t(3570);var s=_interopRequireDefault(o);var a=t(1187);var u=_interopRequireDefault(a);var f=t(6941);var c=_interopRequireDefault(f);var l=t(9511);var p=_interopRequireDefault(l);var h=t(3529);var B=_interopRequireDefault(h);var v=t(6867);var d=_interopRequireDefault(v);var b=t(9073);var y=_interopRequireDefault(b);var g=t(4020);var m=_interopRequireDefault(g);var C=t(1848);var w=_interopRequireDefault(C);var S=t(7415);var O=_interopRequireDefault(S);var T=t(8013);var E=_interopRequireDefault(T);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var k=r.attribute=function attribute(e){return new i.default(e)};var P=r.className=function className(e){return new s.default(e)};var D=r.combinator=function combinator(e){return new u.default(e)};var A=r.comment=function comment(e){return new c.default(e)};var R=r.id=function id(e){return new p.default(e)};var F=r.nesting=function nesting(e){return new B.default(e)};var x=r.pseudo=function pseudo(e){return new d.default(e)};var j=r.root=function root(e){return new y.default(e)};var I=r.selector=function selector(e){return new m.default(e)};var M=r.string=function string(e){return new w.default(e)};var N=r.tag=function tag(e){return new O.default(e)};var _=r.universal=function universal(e){return new E.default(e)}},1559:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t=e){this.indexes[t]=r-1}}return this};Container.prototype.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};Container.prototype.empty=function empty(){return this.removeAll()};Container.prototype.insertAfter=function insertAfter(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t+1,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(t<=n){this.indexes[i]=n+1}}return this};Container.prototype.insertBefore=function insertBefore(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(n<=t){this.indexes[i]=n+1}}return this};Container.prototype._findChildAtPosition=function _findChildAtPosition(e,r){var t=undefined;this.each(function(n){if(n.atPosition){var i=n.atPosition(e,r);if(i){t=i;return false}}else if(n.isAtPosition(e,r)){t=n;return false}});return t};Container.prototype.atPosition=function atPosition(e,r){if(this.isAtPosition(e,r)){return this._findChildAtPosition(e,r)||this}else{return undefined}};Container.prototype._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};Container.prototype.each=function each(e){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var r=this.lastEach;this.indexes[r]=0;if(!this.length){return undefined}var t=void 0,n=void 0;while(this.indexes[r]{"use strict";r.__esModule=true;r.isUniversal=r.isTag=r.isString=r.isSelector=r.isRoot=r.isPseudo=r.isNesting=r.isIdentifier=r.isComment=r.isCombinator=r.isClassName=r.isAttribute=undefined;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i;r.isNode=isNode;r.isPseudoElement=isPseudoElement;r.isPseudoClass=isPseudoClass;r.isContainer=isContainer;r.isNamespace=isNamespace;var o=t(2261);var s=(i={},i[o.ATTRIBUTE]=true,i[o.CLASS]=true,i[o.COMBINATOR]=true,i[o.COMMENT]=true,i[o.ID]=true,i[o.NESTING]=true,i[o.PSEUDO]=true,i[o.ROOT]=true,i[o.SELECTOR]=true,i[o.STRING]=true,i[o.TAG]=true,i[o.UNIVERSAL]=true,i);function isNode(e){return(typeof e==="undefined"?"undefined":n(e))==="object"&&s[e.type]}function isNodeType(e,r){return isNode(r)&&r.type===e}var a=r.isAttribute=isNodeType.bind(null,o.ATTRIBUTE);var u=r.isClassName=isNodeType.bind(null,o.CLASS);var f=r.isCombinator=isNodeType.bind(null,o.COMBINATOR);var c=r.isComment=isNodeType.bind(null,o.COMMENT);var l=r.isIdentifier=isNodeType.bind(null,o.ID);var p=r.isNesting=isNodeType.bind(null,o.NESTING);var h=r.isPseudo=isNodeType.bind(null,o.PSEUDO);var B=r.isRoot=isNodeType.bind(null,o.ROOT);var v=r.isSelector=isNodeType.bind(null,o.SELECTOR);var d=r.isString=isNodeType.bind(null,o.STRING);var b=r.isTag=isNodeType.bind(null,o.TAG);var y=r.isUniversal=isNodeType.bind(null,o.UNIVERSAL);function isPseudoElement(e){return h(e)&&e.value&&(e.value.startsWith("::")||e.value===":before"||e.value===":after")}function isPseudoClass(e){return h(e)&&!isPseudoElement(e)}function isContainer(e){return!!(isNode(e)&&e.walk)}function isNamespace(e){return a(e)||b(e)}},9511:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3877);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(ID,e);function ID(r){_classCallCheck(this,ID);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.ID;return t}ID.prototype.toString=function toString(){return[this.rawSpaceBefore,String("#"+this.stringifyProperty("value")),this.rawSpaceAfter].join("")};return ID}(i.default);r.default=s;e.exports=r["default"]},6231:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(2261);Object.keys(n).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return n[e]}})});var i=t(9283);Object.keys(i).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return i[e]}})});var o=t(7472);Object.keys(o).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return o[e]}})})},5288:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(3877);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Nesting,e);function Nesting(r){_classCallCheck(this,Nesting);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.NESTING;t.value="&";return t}return Nesting}(i.default);r.default=s;e.exports=r["default"]},3877:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Node);Object.assign(this,e);this.spaces=this.spaces||{};this.spaces.before=this.spaces.before||"";this.spaces.after=this.spaces.after||""}Node.prototype.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};Node.prototype.replaceWith=function replaceWith(){if(this.parent){for(var e in arguments){this.parent.insertBefore(this,arguments[e])}this.remove()}return this};Node.prototype.next=function next(){return this.parent.at(this.parent.index(this)+1)};Node.prototype.prev=function prev(){return this.parent.at(this.parent.index(this)-1)};Node.prototype.clone=function clone(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=s(this);for(var t in e){r[t]=e[t]}return r};Node.prototype.appendToPropertyAndEscape=function appendToPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}var n=this[e];var i=this.raws[e];this[e]=n+r;if(i||t!==r){this.raws[e]=(i||n)+t}else{delete this.raws[e]}};Node.prototype.setPropertyAndEscape=function setPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}this[e]=r;this.raws[e]=t};Node.prototype.setPropertyWithoutEscape=function setPropertyWithoutEscape(e,r){this[e]=r;if(this.raws){delete this.raws[e]}};Node.prototype.isAtPosition=function isAtPosition(e,r){if(this.source&&this.source.start&&this.source.end){if(this.source.start.line>e){return false}if(this.source.end.liner){return false}if(this.source.end.line===e&&this.source.end.column{"use strict";r.__esModule=true;var n=t(1559);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Pseudo,e);function Pseudo(r){_classCallCheck(this,Pseudo);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.PSEUDO;return t}Pseudo.prototype.toString=function toString(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")};return Pseudo}(i.default);r.default=s;e.exports=r["default"]},9073:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(1559);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Selector,e);function Selector(r){_classCallCheck(this,Selector);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.SELECTOR;return t}return Selector}(i.default);r.default=s;e.exports=r["default"]},1848:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3877);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(String,e);function String(r){_classCallCheck(this,String);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.STRING;return t}return String}(i.default);r.default=s;e.exports=r["default"]},7415:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(5288);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Tag,e);function Tag(r){_classCallCheck(this,Tag);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.TAG;return t}return Tag}(i.default);r.default=s;e.exports=r["default"]},2261:(e,r)=>{"use strict";r.__esModule=true;var t=r.TAG="tag";var n=r.STRING="string";var i=r.SELECTOR="selector";var o=r.ROOT="root";var s=r.PSEUDO="pseudo";var a=r.NESTING="nesting";var u=r.ID="id";var f=r.COMMENT="comment";var c=r.COMBINATOR="combinator";var l=r.CLASS="class";var p=r.ATTRIBUTE="attribute";var h=r.UNIVERSAL="universal"},8013:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(5288);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Universal,e);function Universal(r){_classCallCheck(this,Universal);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.UNIVERSAL;t.value="*";return t}return Universal}(i.default);r.default=s;e.exports=r["default"]},627:(e,r)=>{"use strict";r.__esModule=true;r.default=sortAscending;function sortAscending(e){return e.sort(function(e,r){return e-r})}e.exports=r["default"]},6417:(e,r)=>{"use strict";r.__esModule=true;var t=r.ampersand=38;var n=r.asterisk=42;var i=r.at=64;var o=r.comma=44;var s=r.colon=58;var a=r.semicolon=59;var u=r.openParenthesis=40;var f=r.closeParenthesis=41;var c=r.openSquare=91;var l=r.closeSquare=93;var p=r.dollar=36;var h=r.tilde=126;var B=r.caret=94;var v=r.plus=43;var d=r.equals=61;var b=r.pipe=124;var y=r.greaterThan=62;var g=r.space=32;var m=r.singleQuote=39;var C=r.doubleQuote=34;var w=r.slash=47;var S=r.bang=33;var O=r.backslash=92;var T=r.cr=13;var E=r.feed=12;var k=r.newline=10;var P=r.tab=9;var D=r.str=m;var A=r.comment=-1;var R=r.word=-2;var F=r.combinator=-3},2771:(e,r,t)=>{"use strict";r.__esModule=true;r.FIELDS=undefined;var n,i;r.default=tokenize;var o=t(6417);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}var a=(n={},n[s.tab]=true,n[s.newline]=true,n[s.cr]=true,n[s.feed]=true,n);var u=(i={},i[s.space]=true,i[s.tab]=true,i[s.newline]=true,i[s.cr]=true,i[s.feed]=true,i[s.ampersand]=true,i[s.asterisk]=true,i[s.bang]=true,i[s.comma]=true,i[s.colon]=true,i[s.semicolon]=true,i[s.openParenthesis]=true,i[s.closeParenthesis]=true,i[s.openSquare]=true,i[s.closeSquare]=true,i[s.singleQuote]=true,i[s.doubleQuote]=true,i[s.plus]=true,i[s.pipe]=true,i[s.tilde]=true,i[s.greaterThan]=true,i[s.equals]=true,i[s.dollar]=true,i[s.caret]=true,i[s.slash]=true,i);var f={};var c="0123456789abcdefABCDEF";for(var l=0;l0){g=a+d;m=y-b[d].length}else{g=a;m=o}w=s.comment;a=g;h=g;p=y-m}else if(c===s.slash){y=u;w=c;h=a;p=u-o;f=y+1}else{y=consumeWord(t,u);w=s.word;h=a;p=y-o}f=y+1;break}r.push([w,a,u-o,h,p,u,f]);if(m){o=m;m=null}u=f}return r}},6358:(e,r)=>{"use strict";r.__esModule=true;r.default=ensureObject;function ensureObject(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){e[i]={}}e=e[i]}}e.exports=r["default"]},2194:(e,r)=>{"use strict";r.__esModule=true;r.default=getProp;function getProp(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){return undefined}e=e[i]}return e}e.exports=r["default"]},1044:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(2322);Object.defineProperty(r,"unesc",{enumerable:true,get:function get(){return _interopRequireDefault(n).default}});var i=t(2194);Object.defineProperty(r,"getProp",{enumerable:true,get:function get(){return _interopRequireDefault(i).default}});var o=t(6358);Object.defineProperty(r,"ensureObject",{enumerable:true,get:function get(){return _interopRequireDefault(o).default}});var s=t(7706);Object.defineProperty(r,"stripComments",{enumerable:true,get:function get(){return _interopRequireDefault(s).default}});function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},7706:(e,r)=>{"use strict";r.__esModule=true;r.default=stripComments;function stripComments(e){var r="";var t=e.indexOf("/*");var n=0;while(t>=0){r=r+e.slice(n,t);var i=e.indexOf("*/",t+2);if(i<0){return r}n=i+2;t=e.indexOf("/*",n)}r=r+e.slice(n);return r}e.exports=r["default"]},2322:(e,r)=>{"use strict";r.__esModule=true;r.default=unesc;var t=/\\(?:([0-9a-fA-F]{6})|([0-9a-fA-F]{1,5})(?: |(?![0-9a-fA-F])))/g;var n=/\\(.)/g;function unesc(e){e=e.replace(t,function(e,r,t){var n=r||t;var i=parseInt(n,16);return String.fromCharCode(i)});e=e.replace(n,function(e,r){return r});return e}e.exports=r["default"]},9555:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(7712));var i=_interopDefault(t(4633));const o=/:has/;var s=i.plugin("css-has-pseudo",e=>{const r=Boolean("preserve"in Object(e)?e.preserve:true);return e=>{e.walkRules(o,e=>{const t=n(e=>{e.walkPseudos(e=>{if(e.value===":has"&&e.nodes){const r=checkIfParentIsNot(e);e.value=r?":not-has":":has";const t=n.attribute({attribute:encodeURIComponent(String(e)).replace(/%3A/g,":").replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/%2C/g,",").replace(/[():%\[\],]/g,"\\$&")});if(r){e.parent.parent.replaceWith(t)}else{e.replaceWith(t)}}})}).processSync(e.selector);const i=e.clone({selector:t});if(r){e.before(i)}else{e.replaceWith(i)}})}});function checkIfParentIsNot(e){return Object(Object(e.parent).parent).type==="pseudo"&&e.parent.parent.value===":not"}e.exports=s},2207:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));const i=/^media$/i;const o=/\(\s*prefers-color-scheme\s*:\s*(dark|light|no-preference)\s*\)/i;const s={dark:48,light:70,"no-preference":22};const a=(e,r)=>`(color-index: ${s[r.toLowerCase()]})`;var u=n.plugin("postcss-prefers-color-scheme",e=>{const r="preserve"in Object(e)?e.preserve:true;return e=>{e.walkAtRules(i,e=>{const t=e.params;const n=t.replace(o,a);if(t!==n){if(r){e.cloneBefore({params:n})}else{e.params=n}}})}});e.exports=u},5202:e=>{e.exports=function flatten(e,r){r=typeof r=="number"?r:Infinity;if(!r){if(Array.isArray(e)){return e.map(function(e){return e})}return e}return _flatten(e,1);function _flatten(e,t){return e.reduce(function(e,n){if(Array.isArray(n)&&t{"use strict";e.exports=((e,r)=>{r=r||process.argv;const t=e.startsWith("-")?"":e.length===1?"-":"--";const n=r.indexOf(t+e);const i=r.indexOf("--");return n!==-1&&(i===-1?true:n{e.exports=function(e,r){var t=-1,n=[];while((t=e.indexOf(r,t+1))!==-1)n.push(t);return n}},7478:e=>{var r=/<%=([\s\S]+?)%>/g;e.exports=r},8589:(e,r,t)=>{e=t.nmd(e);var n=t(7478),i=t(1623);var o=800,s=16;var a=1/0,u=9007199254740991;var f="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",p="[object Boolean]",h="[object Date]",B="[object DOMException]",v="[object Error]",d="[object Function]",b="[object GeneratorFunction]",y="[object Map]",g="[object Number]",m="[object Null]",C="[object Object]",w="[object Proxy]",S="[object RegExp]",O="[object Set]",T="[object String]",E="[object Symbol]",k="[object Undefined]",P="[object WeakMap]";var D="[object ArrayBuffer]",A="[object DataView]",R="[object Float32Array]",F="[object Float64Array]",x="[object Int8Array]",j="[object Int16Array]",I="[object Int32Array]",M="[object Uint8Array]",N="[object Uint8ClampedArray]",_="[object Uint16Array]",L="[object Uint32Array]";var q=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,J=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var U=/[\\^$.*+?()[\]{}|]/g;var H=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var Q=/^\[object .+?Constructor\]$/;var K=/^(?:0|[1-9]\d*)$/;var W=/($^)/;var Y=/['\n\r\u2028\u2029\\]/g;var z={};z[R]=z[F]=z[x]=z[j]=z[I]=z[M]=z[N]=z[_]=z[L]=true;z[f]=z[c]=z[D]=z[p]=z[A]=z[h]=z[v]=z[d]=z[y]=z[g]=z[C]=z[S]=z[O]=z[T]=z[P]=false;var $={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var X=typeof global=="object"&&global&&global.Object===Object&&global;var Z=typeof self=="object"&&self&&self.Object===Object&&self;var V=X||Z||Function("return this")();var ee=true&&r&&!r.nodeType&&r;var re=ee&&"object"=="object"&&e&&!e.nodeType&&e;var te=re&&re.exports===ee;var ne=te&&X.process;var ie=function(){try{var e=re&&re.require&&re.require("util").types;if(e){return e}return ne&&ne.binding&&ne.binding("util")}catch(e){}}();var oe=ie&&ie.isTypedArray;function apply(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function arrayMap(e,r){var t=-1,n=e==null?0:e.length,i=Array(n);while(++t1?t[i-1]:undefined,s=i>2?t[2]:undefined;o=e.length>3&&typeof o=="function"?(i--,o):undefined;if(s&&isIterateeCall(t[0],t[1],s)){o=i<3?undefined:o;i=1}r=Object(r);while(++n-1&&e%1==0&&e0){if(++r>=o){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}function toSource(e){if(e!=null){try{return fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eq(e,r){return e===r||e!==e&&r!==r}var De=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&ce.call(e,"callee")&&!ye.call(e,"callee")};var Ae=Array.isArray;function isArrayLike(e){return e!=null&&isLength(e.length)&&!isFunction(e)}var Re=Ce||stubFalse;function isError(e){if(!isObjectLike(e)){return false}var r=baseGetTag(e);return r==v||r==B||typeof e.message=="string"&&typeof e.name=="string"&&!isPlainObject(e)}function isFunction(e){if(!isObject(e)){return false}var r=baseGetTag(e);return r==d||r==b||r==l||r==w}function isLength(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=u}function isObject(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function isObjectLike(e){return e!=null&&typeof e=="object"}function isPlainObject(e){if(!isObjectLike(e)||baseGetTag(e)!=C){return false}var r=be(e);if(r===null){return true}var t=ce.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&fe.call(t)==he}function isSymbol(e){return typeof e=="symbol"||isObjectLike(e)&&baseGetTag(e)==E}var Fe=oe?baseUnary(oe):baseIsTypedArray;function toString(e){return e==null?"":baseToString(e)}var xe=createAssigner(function(e,r,t,n){copyObject(r,keysIn(r),e,n)});function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}function keysIn(e){return isArrayLike(e)?arrayLikeKeys(e,true):baseKeysIn(e)}function template(e,r,t){var o=i.imports._.templateSettings||i;if(t&&isIterateeCall(e,r,t)){r=undefined}e=toString(e);r=xe({},r,o,customDefaultsAssignIn);var s=xe({},r.imports,o.imports,customDefaultsAssignIn),a=keys(s),u=baseValues(s,a);var f,c,l=0,p=r.interpolate||W,h="__p += '";var B=RegExp((r.escape||W).source+"|"+p.source+"|"+(p===n?H:W).source+"|"+(r.evaluate||W).source+"|$","g");var v=ce.call(r,"sourceURL")?"//# sourceURL="+(r.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";e.replace(B,function(r,t,n,i,o,s){n||(n=i);h+=e.slice(l,s).replace(Y,escapeStringChar);if(t){f=true;h+="' +\n__e("+t+") +\n'"}if(o){c=true;h+="';\n"+o+";\n__p += '"}if(n){h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}l=s+r.length;return r});h+="';\n";var d=ce.call(r,"variable")&&r.variable;if(!d){h="with (obj) {\n"+h+"\n}\n"}h=(c?h.replace(q,""):h).replace(G,"$1").replace(J,"$1;");h="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(f?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var b=je(function(){return Function(a,v+"return "+h).apply(undefined,u)});b.source=h;if(isError(b)){throw b}return b}var je=baseRest(function(e,r){try{return apply(e,undefined,r)}catch(e){return isError(e)?e:new Error(e)}});function constant(e){return function(){return e}}function identity(e){return e}function stubFalse(){return false}e.exports=template},1623:(e,r,t)=>{var n=t(7478);var i=1/0;var o="[object Null]",s="[object Symbol]",a="[object Undefined]";var u=/[&<>"']/g,f=RegExp(u.source);var c=/<%-([\s\S]+?)%>/g,l=/<%([\s\S]+?)%>/g;var p={"&":"&","<":"<",">":">",'"':""","'":"'"};var h=typeof global=="object"&&global&&global.Object===Object&&global;var B=typeof self=="object"&&self&&self.Object===Object&&self;var v=h||B||Function("return this")();function arrayMap(e,r){var t=-1,n=e==null?0:e.length,i=Array(n);while(++t{"use strict";e.exports={wrap:wrapRange,limit:limitRange,validate:validateRange,test:testRange,curry:curry,name:name};function wrapRange(e,r,t){var n=r-e;return((t-e)%n+n)%n+e}function limitRange(e,r,t){return Math.max(e,Math.min(r,t))}function validateRange(e,r,t,n,i){if(!testRange(e,r,t,n,i)){throw new Error(t+" is outside of range ["+e+","+r+")")}return t}function testRange(e,r,t,n,i){return!(tr||i&&t===r||n&&t===e)}function name(e,r,t,n){return(t?"(":"[")+e+","+r+(n?")":"]")}function curry(e,r,t,n){var i=name.bind(null,e,r,t,n);return{wrap:wrapRange.bind(null,e,r),limit:limitRange.bind(null,e,r),validate:function(i){return validateRange(e,r,i,t,n)},test:function(i){return testRange(e,r,i,t,n)},toString:i,name:i}}},9108:e=>{"use strict";var r=Math.abs;var t=Math.round;function almostEq(e,t){return r(e-t)<=9.5367432e-7}function GCD(e,r){if(almostEq(r,0))return e;return GCD(r,e%r)}function findPrecision(e){var r=1;while(!almostEq(t(e*r)/r,e)){r*=10}return r}function num2fraction(e){if(e===0||e==="0")return"0";if(typeof e==="string"){e=parseFloat(e)}var n=findPrecision(e);var i=e*n;var o=r(GCD(i,n));var s=i/o;var a=n/o;return t(s)+"/"+t(a)}e.exports=num2fraction},2347:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var n=t(4633);var i=_interopRequireDefault(n);var o=t(3507);var s=_interopRequireDefault(o);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function nodeIsInsensitiveAttribute(e){return e.type==="attribute"&&e.insensitive}function selectorHasInsensitiveAttribute(e){return e.some(nodeIsInsensitiveAttribute)}function transformString(e,r,t){var n=t.charAt(r);if(n===""){return e}var i=e.map(function(e){return e+n});var o=n.toLocaleUpperCase();if(o!==n){i=i.concat(e.map(function(e){return e+o}))}return transformString(i,r+1,t)}function createSensitiveAtributes(e){var r=transformString([""],0,e.value);return r.map(function(r){var t=e.clone({spaces:{after:e.spaces.after,before:e.spaces.before},insensitive:false});t.setValue(r);return t})}function createNewSelectors(e){var r=[s.default.selector()];e.walk(function(e){if(!nodeIsInsensitiveAttribute(e)){r.forEach(function(r){r.append(e.clone())});return}var t=createSensitiveAtributes(e);var n=[];t.forEach(function(e){r.forEach(function(r){var t=r.clone();t.append(e);n.push(t)})});r=n});return r}function transform(e){var r=[];e.each(function(e){if(selectorHasInsensitiveAttribute(e)){r=r.concat(createNewSelectors(e));e.remove()}});if(r.length){r.forEach(function(r){return e.append(r)})}}var a=/i(\s*\/\*[\W\w]*?\*\/)*\s*\]/;r.default=i.default.plugin("postcss-attribute-case-insensitive",function(){return function(e){e.walkRules(a,function(e){e.selector=(0,s.default)(transform).processSync(e.selector)})}});e.exports=r.default},6608:e=>{"use strict";var r={};var t=r.hasOwnProperty;var n=function merge(e,r){if(!e){return r}var n={};for(var i in r){n[i]=t.call(e,i)?e[i]:r[i]}return n};var i=/[ -,\.\/;-@\[-\^`\{-~]/;var o=/[ -,\.\/;-@\[\]\^`\{-~]/;var s=/['"\\]/;var a=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var u=function cssesc(e,r){r=n(r,cssesc.options);if(r.quotes!="single"&&r.quotes!="double"){r.quotes="single"}var t=r.quotes=="double"?'"':"'";var s=r.isIdentifier;var u=e.charAt(0);var f="";var c=0;var l=e.length;while(c126){if(h>=55296&&h<=56319&&c{"use strict";r.__esModule=true;var n=t(5160);var i=_interopRequireDefault(n);var o=t(3966);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=function parser(e){return new i.default(e)};Object.assign(a,s);delete a.__esModule;r.default=a;e.exports=r["default"]},3373:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parser);this.rule=e;this.options=Object.assign({lossy:false,safe:false},r);this.position=0;this.css=typeof this.rule==="string"?this.rule:this.rule.selector;this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var t=getTokenSourceSpan(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new p.default({source:t});this.root.errorGenerator=this._errorGenerator();var n=new B.default({source:{start:{line:1,column:1}}});this.root.append(n);this.current=n;this.loop()}Parser.prototype._errorGenerator=function _errorGenerator(){var e=this;return function(r,t){if(typeof e.rule==="string"){return new Error(r)}return e.rule.error(r,t)}};Parser.prototype.attribute=function attribute(){var e=[];var r=this.currToken;this.position++;while(this.position1&&arguments[1]!==undefined?arguments[1]:false;var n="";var i="";e.forEach(function(e){var o=r.lossySpace(e.spaces.before,t);var s=r.lossySpace(e.rawSpaceBefore,t);n+=o+r.lossySpace(e.spaces.after,t&&o.length===0);i+=o+e.value+r.lossySpace(e.rawSpaceAfter,t&&s.length===0)});if(i===n){i=undefined}var o={space:n,rawSpace:i};return o};Parser.prototype.isNamedCombinator=function isNamedCombinator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position;return this.tokens[e+0]&&this.tokens[e+0][N.FIELDS.TYPE]===q.slash&&this.tokens[e+1]&&this.tokens[e+1][N.FIELDS.TYPE]===q.word&&this.tokens[e+2]&&this.tokens[e+2][N.FIELDS.TYPE]===q.slash};Parser.prototype.namedCombinator=function namedCombinator(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]);var r=(0,U.unesc)(e).toLowerCase();var t={};if(r!==e){t.value="/"+e+"/"}var n=new F.default({value:"/"+r+"/",source:getSource(this.currToken[N.FIELDS.START_LINE],this.currToken[N.FIELDS.START_COL],this.tokens[this.position+2][N.FIELDS.END_LINE],this.tokens[this.position+2][N.FIELDS.END_COL]),sourceIndex:this.currToken[N.FIELDS.START_POS],raws:t});this.position=this.position+3;return n}else{this.unexpected()}};Parser.prototype.combinator=function combinator(){var e=this;if(this.content()==="|"){return this.namespace()}var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][N.FIELDS.TYPE]===q.comma){var t=this.parseWhitespaceEquivalentTokens(r);if(t.length>0){var n=this.current.last;if(n){var i=this.convertWhitespaceNodesToSpace(t),o=i.space,s=i.rawSpace;if(s!==undefined){n.rawSpaceAfter+=s}n.spaces.after+=o}else{t.forEach(function(r){return e.newNode(r)})}}return}var a=this.currToken;var u=undefined;if(r>this.position){u=this.parseWhitespaceEquivalentTokens(r)}var f=void 0;if(this.isNamedCombinator()){f=this.namedCombinator()}else if(this.currToken[N.FIELDS.TYPE]===q.combinator){f=new F.default({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[N.FIELDS.START_POS]});this.position++}else if(H[this.currToken[N.FIELDS.TYPE]]){}else if(!u){this.unexpected()}if(f){if(u){var c=this.convertWhitespaceNodesToSpace(u),l=c.space,p=c.rawSpace;f.spaces.before=l;f.rawSpaceBefore=p}}else{var h=this.convertWhitespaceNodesToSpace(u,true),B=h.space,v=h.rawSpace;if(!v){v=B}var d={};var b={spaces:{}};if(B.endsWith(" ")&&v.endsWith(" ")){d.before=B.slice(0,B.length-1);b.spaces.before=v.slice(0,v.length-1)}else if(B.startsWith(" ")&&v.startsWith(" ")){d.after=B.slice(1);b.spaces.after=v.slice(1)}else{b.value=v}f=new F.default({value:" ",source:getTokenSourceSpan(a,this.tokens[this.position-1]),sourceIndex:a[N.FIELDS.START_POS],spaces:d,raws:b})}if(this.currToken&&this.currToken[N.FIELDS.TYPE]===q.space){f.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(f)};Parser.prototype.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var e=new B.default({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(e);this.current=e;this.position++};Parser.prototype.comment=function comment(){var e=this.currToken;this.newNode(new y.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.error=function error(e,r){throw this.root.error(e,r)};Parser.prototype.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[N.FIELDS.START_POS]})};Parser.prototype.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[N.FIELDS.START_POS])};Parser.prototype.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[N.FIELDS.START_POS])};Parser.prototype.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[N.FIELDS.START_POS])};Parser.prototype.namespace=function namespace(){var e=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[N.FIELDS.TYPE]===q.word){this.position++;return this.word(e)}else if(this.nextToken[N.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(e)}};Parser.prototype.nesting=function nesting(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var r=this.currToken;this.newNode(new j.default({value:this.content(),source:getTokenSource(r),sourceIndex:r[N.FIELDS.START_POS]}));this.position++};Parser.prototype.parentheses=function parentheses(){var e=this.current.last;var r=1;this.position++;if(e&&e.type===J.PSEUDO){var t=new B.default({source:{start:tokenStart(this.tokens[this.position-1])}});var n=this.current;e.append(t);this.current=t;while(this.position1&&e.nextToken&&e.nextToken[N.FIELDS.TYPE]===q.openParenthesis){e.error("Misplaced parenthesis.",{index:e.nextToken[N.FIELDS.START_POS]})}})}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[N.FIELDS.START_POS])}};Parser.prototype.space=function space(){var e=this.content();if(this.position===0||this.prevToken[N.FIELDS.TYPE]===q.comma||this.prevToken[N.FIELDS.TYPE]===q.openParenthesis){this.spaces=this.optionalSpace(e);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[N.FIELDS.TYPE]===q.comma||this.nextToken[N.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(e);this.position++}else{this.combinator()}};Parser.prototype.string=function string(){var e=this.currToken;this.newNode(new O.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.universal=function universal(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}var t=this.currToken;this.newNode(new A.default({value:this.content(),source:getTokenSource(t),sourceIndex:t[N.FIELDS.START_POS]}),e);this.position++};Parser.prototype.splitWord=function splitWord(e,r){var t=this;var n=this.nextToken;var i=this.content();while(n&&~[q.dollar,q.caret,q.equals,q.word].indexOf(n[N.FIELDS.TYPE])){this.position++;var o=this.content();i+=o;if(o.lastIndexOf("\\")===o.length-1){var s=this.nextToken;if(s&&s[N.FIELDS.TYPE]===q.space){i+=this.requiredSpace(this.content(s));this.position++}}n=this.nextToken}var a=(0,u.default)(i,".").filter(function(e){return i[e-1]!=="\\"});var f=(0,u.default)(i,"#");var l=(0,u.default)(i,"#{");if(l.length){f=f.filter(function(e){return!~l.indexOf(e)})}var p=(0,M.default)((0,c.default)([0].concat(a,f)));p.forEach(function(n,o){var s=p[o+1]||i.length;var u=i.slice(n,s);if(o===0&&r){return r.call(t,u,p.length)}var c=void 0;var l=t.currToken;var h=l[N.FIELDS.START_POS]+p[o];var B=getSource(l[1],l[2]+n,l[3],l[2]+(s-1));if(~a.indexOf(n)){var v={value:u.slice(1),source:B,sourceIndex:h};c=new d.default(unescapeProp(v,"value"))}else if(~f.indexOf(n)){var b={value:u.slice(1),source:B,sourceIndex:h};c=new m.default(unescapeProp(b,"value"))}else{var y={value:u,source:B,sourceIndex:h};unescapeProp(y,"value");c=new w.default(y)}t.newNode(c,e);e=null});this.position++};Parser.prototype.word=function word(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}return this.splitWord(e)};Parser.prototype.loop=function loop(){while(this.position0&&arguments[0]!==undefined?arguments[0]:this.currToken;return this.css.slice(e[N.FIELDS.START_POS],e[N.FIELDS.END_POS])};Parser.prototype.locateNextMeaningfulToken=function locateNextMeaningfulToken(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position+1;var r=e;while(r{"use strict";r.__esModule=true;var n=t(3373);var i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=function(){function Processor(e,r){_classCallCheck(this,Processor);this.func=e||function noop(){};this.funcRes=null;this.options=r}Processor.prototype._shouldUpdateSelector=function _shouldUpdateSelector(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=Object.assign({},this.options,r);if(t.updateSelector===false){return false}else{return typeof e!=="string"}};Processor.prototype._isLossy=function _isLossy(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=Object.assign({},this.options,e);if(r.lossless===false){return true}else{return false}};Processor.prototype._root=function _root(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=new i.default(e,this._parseOptions(r));return t.root};Processor.prototype._parseOptions=function _parseOptions(e){return{lossy:this._isLossy(e)}};Processor.prototype._run=function _run(e){var r=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new Promise(function(n,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(n){var i=undefined;if(r._shouldUpdateSelector(e,t)){i=o.toString();e.selector=i}return{transform:n,root:o,string:i}}).then(n,i)}catch(e){i(e);return}})};Processor.prototype._runSync=function _runSync(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=this._root(e,r);var n=this.func(t);if(n&&typeof n.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var i=undefined;if(r.updateSelector&&typeof e!=="string"){i=t.toString();e.selector=i}return{transform:n,root:t,string:i}};Processor.prototype.ast=function ast(e,r){return this._run(e,r).then(function(e){return e.root})};Processor.prototype.astSync=function astSync(e,r){return this._runSync(e,r).root};Processor.prototype.transform=function transform(e,r){return this._run(e,r).then(function(e){return e.transform})};Processor.prototype.transformSync=function transformSync(e,r){return this._runSync(e,r).transform};Processor.prototype.process=function process(e,r){return this._run(e,r).then(function(e){return e.string||e.root.toString()})};Processor.prototype.processSync=function processSync(e,r){var t=this._runSync(e,r);return t.string||t.root.toString()};return Processor}();r.default=o;e.exports=r["default"]},8448:(e,r,t)=>{"use strict";r.__esModule=true;var n;var i=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Attribute);var t=_possibleConstructorReturn(this,e.call(this,handleDeprecatedContructorOpts(r)));t.type=l.ATTRIBUTE;t.raws=t.raws||{};Object.defineProperty(t.raws,"unquoted",{get:h(function(){return t.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:h(function(){return t.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")});t._constructed=true;return t}Attribute.prototype.getQuotedValue=function getQuotedValue(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=this._determineQuoteMark(e);var t=g[r];var n=(0,s.default)(this._value,t);return n};Attribute.prototype._determineQuoteMark=function _determineQuoteMark(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)};Attribute.prototype.setValue=function setValue(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this._value=e;this._quoteMark=this._determineQuoteMark(r);this._syncRawValue()};Attribute.prototype.smartQuoteMark=function smartQuoteMark(e){var r=this.value;var t=r.replace(/[^']/g,"").length;var n=r.replace(/[^"]/g,"").length;if(t+n===0){var i=(0,s.default)(r,{isIdentifier:true});if(i===r){return Attribute.NO_QUOTE}else{var o=this.preferredQuoteMark(e);if(o===Attribute.NO_QUOTE){var a=this.quoteMark||e.quoteMark||Attribute.DOUBLE_QUOTE;var u=g[a];var f=(0,s.default)(r,u);if(f.length1&&arguments[1]!==undefined?arguments[1]:e;var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:defaultAttrConcat;var n=this._spacesFor(r);return t(this.stringifyProperty(e),n)};Attribute.prototype.offsetOf=function offsetOf(e){var r=1;var t=this._spacesFor("attribute");r+=t.before.length;if(e==="namespace"||e==="ns"){return this.namespace?r:-1}if(e==="attributeNS"){return r}r+=this.namespaceString.length;if(this.namespace){r+=1}if(e==="attribute"){return r}r+=this.stringifyProperty("attribute").length;r+=t.after.length;var n=this._spacesFor("operator");r+=n.before.length;var i=this.stringifyProperty("operator");if(e==="operator"){return i?r:-1}r+=i.length;r+=n.after.length;var o=this._spacesFor("value");r+=o.before.length;var s=this.stringifyProperty("value");if(e==="value"){return s?r:-1}r+=s.length;r+=o.after.length;var a=this._spacesFor("insensitive");r+=a.before.length;if(e==="insensitive"){return this.insensitive?r:-1}return-1};Attribute.prototype.toString=function toString(){var e=this;var r=[this.rawSpaceBefore,"["];r.push(this._stringFor("qualifiedAttribute","attribute"));if(this.operator&&this.value){r.push(this._stringFor("operator"));r.push(this._stringFor("value"));r.push(this._stringFor("insensitiveFlag","insensitive",function(r,t){if(r.length>0&&!e.quoted&&t.before.length===0&&!(e.spaces.value&&e.spaces.value.after)){t.before=" "}return defaultAttrConcat(r,t)}))}r.push("]");r.push(this.rawSpaceAfter);return r.join("")};i(Attribute,[{key:"quoted",get:function get(){var e=this.quoteMark;return e==="'"||e==='"'},set:function set(e){d()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(e){if(!this._constructed){this._quoteMark=e;return}if(this._quoteMark!==e){this._quoteMark=e;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(e){if(this._constructed){var r=unescapeValue(e),t=r.deprecatedUsage,n=r.unescaped,i=r.quoteMark;if(t){v()}if(n===this._value&&i===this._quoteMark){return}this._value=n;this._quoteMark=i;this._syncRawValue()}else{this._value=e}}},{key:"attribute",get:function get(){return this._attribute},set:function set(e){this._handleEscapes("attribute",e);this._attribute=e}}]);return Attribute}(c.default);y.NO_QUOTE=null;y.SINGLE_QUOTE="'";y.DOUBLE_QUOTE='"';r.default=y;var g=(n={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},n[null]={isIdentifier:true},n);function defaultAttrConcat(e,r){return""+r.before+e+r.after}},3556:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(3366);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Combinator,e);function Combinator(r){_classCallCheck(this,Combinator);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMBINATOR;return t}return Combinator}(i.default);r.default=s;e.exports=r["default"]},3522:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3366);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Comment,e);function Comment(r){_classCallCheck(this,Comment);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMMENT;return t}return Comment}(i.default);r.default=s;e.exports=r["default"]},6001:(e,r,t)=>{"use strict";r.__esModule=true;r.universal=r.tag=r.string=r.selector=r.root=r.pseudo=r.nesting=r.id=r.comment=r.combinator=r.className=r.attribute=undefined;var n=t(8448);var i=_interopRequireDefault(n);var o=t(3556);var s=_interopRequireDefault(o);var a=t(4310);var u=_interopRequireDefault(a);var f=t(3522);var c=_interopRequireDefault(f);var l=t(6545);var p=_interopRequireDefault(l);var h=t(2704);var B=_interopRequireDefault(h);var v=t(9173);var d=_interopRequireDefault(v);var b=t(7792);var y=_interopRequireDefault(b);var g=t(5396);var m=_interopRequireDefault(g);var C=t(6776);var w=_interopRequireDefault(C);var S=t(2066);var O=_interopRequireDefault(S);var T=t(707);var E=_interopRequireDefault(T);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var k=r.attribute=function attribute(e){return new i.default(e)};var P=r.className=function className(e){return new s.default(e)};var D=r.combinator=function combinator(e){return new u.default(e)};var A=r.comment=function comment(e){return new c.default(e)};var R=r.id=function id(e){return new p.default(e)};var F=r.nesting=function nesting(e){return new B.default(e)};var x=r.pseudo=function pseudo(e){return new d.default(e)};var j=r.root=function root(e){return new y.default(e)};var I=r.selector=function selector(e){return new m.default(e)};var M=r.string=function string(e){return new w.default(e)};var N=r.tag=function tag(e){return new O.default(e)};var _=r.universal=function universal(e){return new E.default(e)}},7507:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t=e){this.indexes[t]=r-1}}return this};Container.prototype.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};Container.prototype.empty=function empty(){return this.removeAll()};Container.prototype.insertAfter=function insertAfter(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t+1,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(t<=n){this.indexes[i]=n+1}}return this};Container.prototype.insertBefore=function insertBefore(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(n<=t){this.indexes[i]=n+1}}return this};Container.prototype._findChildAtPosition=function _findChildAtPosition(e,r){var t=undefined;this.each(function(n){if(n.atPosition){var i=n.atPosition(e,r);if(i){t=i;return false}}else if(n.isAtPosition(e,r)){t=n;return false}});return t};Container.prototype.atPosition=function atPosition(e,r){if(this.isAtPosition(e,r)){return this._findChildAtPosition(e,r)||this}else{return undefined}};Container.prototype._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};Container.prototype.each=function each(e){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var r=this.lastEach;this.indexes[r]=0;if(!this.length){return undefined}var t=void 0,n=void 0;while(this.indexes[r]{"use strict";r.__esModule=true;r.isUniversal=r.isTag=r.isString=r.isSelector=r.isRoot=r.isPseudo=r.isNesting=r.isIdentifier=r.isComment=r.isCombinator=r.isClassName=r.isAttribute=undefined;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i;r.isNode=isNode;r.isPseudoElement=isPseudoElement;r.isPseudoClass=isPseudoClass;r.isContainer=isContainer;r.isNamespace=isNamespace;var o=t(4436);var s=(i={},i[o.ATTRIBUTE]=true,i[o.CLASS]=true,i[o.COMBINATOR]=true,i[o.COMMENT]=true,i[o.ID]=true,i[o.NESTING]=true,i[o.PSEUDO]=true,i[o.ROOT]=true,i[o.SELECTOR]=true,i[o.STRING]=true,i[o.TAG]=true,i[o.UNIVERSAL]=true,i);function isNode(e){return(typeof e==="undefined"?"undefined":n(e))==="object"&&s[e.type]}function isNodeType(e,r){return isNode(r)&&r.type===e}var a=r.isAttribute=isNodeType.bind(null,o.ATTRIBUTE);var u=r.isClassName=isNodeType.bind(null,o.CLASS);var f=r.isCombinator=isNodeType.bind(null,o.COMBINATOR);var c=r.isComment=isNodeType.bind(null,o.COMMENT);var l=r.isIdentifier=isNodeType.bind(null,o.ID);var p=r.isNesting=isNodeType.bind(null,o.NESTING);var h=r.isPseudo=isNodeType.bind(null,o.PSEUDO);var B=r.isRoot=isNodeType.bind(null,o.ROOT);var v=r.isSelector=isNodeType.bind(null,o.SELECTOR);var d=r.isString=isNodeType.bind(null,o.STRING);var b=r.isTag=isNodeType.bind(null,o.TAG);var y=r.isUniversal=isNodeType.bind(null,o.UNIVERSAL);function isPseudoElement(e){return h(e)&&e.value&&(e.value.startsWith("::")||e.value===":before"||e.value===":after")}function isPseudoClass(e){return h(e)&&!isPseudoElement(e)}function isContainer(e){return!!(isNode(e)&&e.walk)}function isNamespace(e){return a(e)||b(e)}},6545:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3366);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(ID,e);function ID(r){_classCallCheck(this,ID);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.ID;return t}ID.prototype.toString=function toString(){return[this.rawSpaceBefore,String("#"+this.stringifyProperty("value")),this.rawSpaceAfter].join("")};return ID}(i.default);r.default=s;e.exports=r["default"]},3966:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(4436);Object.keys(n).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return n[e]}})});var i=t(6001);Object.keys(i).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return i[e]}})});var o=t(5771);Object.keys(o).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return o[e]}})})},8807:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(3366);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Nesting,e);function Nesting(r){_classCallCheck(this,Nesting);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.NESTING;t.value="&";return t}return Nesting}(i.default);r.default=s;e.exports=r["default"]},3366:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Node);Object.assign(this,e);this.spaces=this.spaces||{};this.spaces.before=this.spaces.before||"";this.spaces.after=this.spaces.after||""}Node.prototype.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};Node.prototype.replaceWith=function replaceWith(){if(this.parent){for(var e in arguments){this.parent.insertBefore(this,arguments[e])}this.remove()}return this};Node.prototype.next=function next(){return this.parent.at(this.parent.index(this)+1)};Node.prototype.prev=function prev(){return this.parent.at(this.parent.index(this)-1)};Node.prototype.clone=function clone(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=s(this);for(var t in e){r[t]=e[t]}return r};Node.prototype.appendToPropertyAndEscape=function appendToPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}var n=this[e];var i=this.raws[e];this[e]=n+r;if(i||t!==r){this.raws[e]=(i||n)+t}else{delete this.raws[e]}};Node.prototype.setPropertyAndEscape=function setPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}this[e]=r;this.raws[e]=t};Node.prototype.setPropertyWithoutEscape=function setPropertyWithoutEscape(e,r){this[e]=r;if(this.raws){delete this.raws[e]}};Node.prototype.isAtPosition=function isAtPosition(e,r){if(this.source&&this.source.start&&this.source.end){if(this.source.start.line>e){return false}if(this.source.end.liner){return false}if(this.source.end.line===e&&this.source.end.column{"use strict";r.__esModule=true;var n=t(7507);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Pseudo,e);function Pseudo(r){_classCallCheck(this,Pseudo);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.PSEUDO;return t}Pseudo.prototype.toString=function toString(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")};return Pseudo}(i.default);r.default=s;e.exports=r["default"]},7792:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(7507);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Selector,e);function Selector(r){_classCallCheck(this,Selector);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.SELECTOR;return t}return Selector}(i.default);r.default=s;e.exports=r["default"]},6776:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3366);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(String,e);function String(r){_classCallCheck(this,String);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.STRING;return t}return String}(i.default);r.default=s;e.exports=r["default"]},2066:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(8807);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Tag,e);function Tag(r){_classCallCheck(this,Tag);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.TAG;return t}return Tag}(i.default);r.default=s;e.exports=r["default"]},4436:(e,r)=>{"use strict";r.__esModule=true;var t=r.TAG="tag";var n=r.STRING="string";var i=r.SELECTOR="selector";var o=r.ROOT="root";var s=r.PSEUDO="pseudo";var a=r.NESTING="nesting";var u=r.ID="id";var f=r.COMMENT="comment";var c=r.COMBINATOR="combinator";var l=r.CLASS="class";var p=r.ATTRIBUTE="attribute";var h=r.UNIVERSAL="universal"},707:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(8807);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Universal,e);function Universal(r){_classCallCheck(this,Universal);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.UNIVERSAL;t.value="*";return t}return Universal}(i.default);r.default=s;e.exports=r["default"]},4772:(e,r)=>{"use strict";r.__esModule=true;r.default=sortAscending;function sortAscending(e){return e.sort(function(e,r){return e-r})}e.exports=r["default"]},1406:(e,r)=>{"use strict";r.__esModule=true;var t=r.ampersand=38;var n=r.asterisk=42;var i=r.at=64;var o=r.comma=44;var s=r.colon=58;var a=r.semicolon=59;var u=r.openParenthesis=40;var f=r.closeParenthesis=41;var c=r.openSquare=91;var l=r.closeSquare=93;var p=r.dollar=36;var h=r.tilde=126;var B=r.caret=94;var v=r.plus=43;var d=r.equals=61;var b=r.pipe=124;var y=r.greaterThan=62;var g=r.space=32;var m=r.singleQuote=39;var C=r.doubleQuote=34;var w=r.slash=47;var S=r.bang=33;var O=r.backslash=92;var T=r.cr=13;var E=r.feed=12;var k=r.newline=10;var P=r.tab=9;var D=r.str=m;var A=r.comment=-1;var R=r.word=-2;var F=r.combinator=-3},2258:(e,r,t)=>{"use strict";r.__esModule=true;r.FIELDS=undefined;var n,i;r.default=tokenize;var o=t(1406);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}var a=(n={},n[s.tab]=true,n[s.newline]=true,n[s.cr]=true,n[s.feed]=true,n);var u=(i={},i[s.space]=true,i[s.tab]=true,i[s.newline]=true,i[s.cr]=true,i[s.feed]=true,i[s.ampersand]=true,i[s.asterisk]=true,i[s.bang]=true,i[s.comma]=true,i[s.colon]=true,i[s.semicolon]=true,i[s.openParenthesis]=true,i[s.closeParenthesis]=true,i[s.openSquare]=true,i[s.closeSquare]=true,i[s.singleQuote]=true,i[s.doubleQuote]=true,i[s.plus]=true,i[s.pipe]=true,i[s.tilde]=true,i[s.greaterThan]=true,i[s.equals]=true,i[s.dollar]=true,i[s.caret]=true,i[s.slash]=true,i);var f={};var c="0123456789abcdefABCDEF";for(var l=0;l0){g=a+d;m=y-b[d].length}else{g=a;m=o}w=s.comment;a=g;h=g;p=y-m}else if(c===s.slash){y=u;w=c;h=a;p=u-o;f=y+1}else{y=consumeWord(t,u);w=s.word;h=a;p=y-o}f=y+1;break}r.push([w,a,u-o,h,p,u,f]);if(m){o=m;m=null}u=f}return r}},8039:(e,r)=>{"use strict";r.__esModule=true;r.default=ensureObject;function ensureObject(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){e[i]={}}e=e[i]}}e.exports=r["default"]},9501:(e,r)=>{"use strict";r.__esModule=true;r.default=getProp;function getProp(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){return undefined}e=e[i]}return e}e.exports=r["default"]},6266:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(1010);Object.defineProperty(r,"unesc",{enumerable:true,get:function get(){return _interopRequireDefault(n).default}});var i=t(9501);Object.defineProperty(r,"getProp",{enumerable:true,get:function get(){return _interopRequireDefault(i).default}});var o=t(8039);Object.defineProperty(r,"ensureObject",{enumerable:true,get:function get(){return _interopRequireDefault(o).default}});var s=t(6972);Object.defineProperty(r,"stripComments",{enumerable:true,get:function get(){return _interopRequireDefault(s).default}});function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},6972:(e,r)=>{"use strict";r.__esModule=true;r.default=stripComments;function stripComments(e){var r="";var t=e.indexOf("/*");var n=0;while(t>=0){r=r+e.slice(n,t);var i=e.indexOf("*/",t+2);if(i<0){return r}n=i+2;t=e.indexOf("/*",n)}r=r+e.slice(n);return r}e.exports=r["default"]},1010:(e,r)=>{"use strict";r.__esModule=true;r.default=unesc;var t=/\\(?:([0-9a-fA-F]{6})|([0-9a-fA-F]{1,5})(?: |(?![0-9a-fA-F])))/g;var n=/\\(.)/g;function unesc(e){e=e.replace(t,function(e,r,t){var n=r||t;var i=parseInt(n,16);return String.fromCharCode(i)});e=e.replace(n,function(e,r){return r});return e}e.exports=r["default"]},7814:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=n.plugin("postcss-color-functional-notation",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):false;return e=>{e.walkDecls(e=>{const t=e.value;if(u.test(t)){const n=i(t).parse();n.walkType("func",e=>{if(f.test(e.value)){const r=e.nodes.slice(1,-1);const t=P(e,r);const n=D(e,r);const i=A(e,r);if(t||n||i){const t=r[3];const n=r[4];if(n){if(g(n)&&!d(n)){n.unit="";n.value=String(n.value/100)}if(C(e)){e.value+="a"}}else if(w(e)){e.value=e.value.slice(0,-1)}if(t&&O(t)){t.replaceWith(R())}if(i){r[0].unit=r[1].unit=r[2].unit="";r[0].value=String(Math.floor(r[0].value*255/100));r[1].value=String(Math.floor(r[1].value*255/100));r[2].value=String(Math.floor(r[2].value*255/100))}e.nodes.splice(3,0,[R()]);e.nodes.splice(2,0,[R()])}}});const o=String(n);if(o!==t){if(r){e.cloneBefore({value:o})}else{e.value=o}}}})}});const s=/^%?$/i;const a=/^calc$/i;const u=/(^|[^\w-])(hsla?|rgba?)\(/i;const f=/^(hsla?|rgba?)$/i;const c=/^hsla?$/i;const l=/^(hsl|rgb)$/i;const p=/^(hsla|rgba)$/i;const h=/^(deg|grad|rad|turn)?$/i;const B=/^rgba?$/i;const v=e=>d(e)||e.type==="number"&&s.test(e.unit);const d=e=>e.type==="func"&&a.test(e.value);const b=e=>d(e)||e.type==="number"&&h.test(e.unit);const y=e=>d(e)||e.type==="number"&&e.unit==="";const g=e=>d(e)||e.type==="number"&&(e.unit==="%"||e.unit===""&&e.value==="0");const m=e=>e.type==="func"&&c.test(e.value);const C=e=>e.type==="func"&&l.test(e.value);const w=e=>e.type==="func"&&p.test(e.value);const S=e=>e.type==="func"&&B.test(e.value);const O=e=>e.type==="operator"&&e.value==="/";const T=[b,g,g,O,v];const E=[y,y,y,O,v];const k=[g,g,g,O,v];const P=(e,r)=>m(e)&&r.every((e,r)=>typeof T[r]==="function"&&T[r](e));const D=(e,r)=>S(e)&&r.every((e,r)=>typeof E[r]==="function"&&E[r](e));const A=(e,r)=>S(e)&&r.every((e,r)=>typeof k[r]==="function"&&k[r](e));const R=()=>i.comma({value:","});e.exports=o},489:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=t(4567);function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_nonIterableRest()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"]!=null)s["return"]()}finally{if(i)throw o}}return t}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var s=n.plugin("postcss-color-gray",e=>r=>{r.walkDecls(r=>{if(u(r)){const t=r.value;const n=i(t).parse();n.walk(e=>{const r=S(e),t=_slicedToArray(r,2),n=t[0],s=t[1];if(n!==undefined){e.value="rgb";const r=o.lab2rgb(n,0,0).map(e=>Math.max(Math.min(Math.round(e*2.55),255),0)),t=_slicedToArray(r,3),a=t[0],u=t[1],f=t[2];const c=e.first;const l=e.last;e.removeAll().append(c).append(i.number({value:a})).append(i.comma({value:","})).append(i.number({value:u})).append(i.comma({value:","})).append(i.number({value:f}));if(s<1){e.value+="a";e.append(i.comma({value:","})).append(i.number({value:s}))}e.append(l)}});const s=n.toString();if(t!==s){if(Object(e).preserve){r.cloneBefore({value:s})}else{r.value=s}}}})});const a=/(^|[^\w-])gray\(/i;const u=e=>a.test(Object(e).value);const f=e=>Object(e).type==="number";const c=e=>Object(e).type==="operator";const l=e=>Object(e).type==="func";const p=/^calc$/i;const h=e=>l(e)&&p.test(e.value);const B=/^gray$/i;const v=e=>l(e)&&B.test(e.value)&&e.nodes&&e.nodes.length;const d=e=>f(e)&&e.unit==="%";const b=e=>f(e)&&e.unit==="";const y=e=>c(e)&&e.value==="/";const g=e=>b(e)?Number(e.value):undefined;const m=e=>y(e)?null:undefined;const C=e=>h(e)?String(e):b(e)?Number(e.value):d(e)?Number(e.value)/100:undefined;const w=[g,m,C];const S=e=>{const r=[];if(v(e)){const t=e.nodes.slice(1,-1);for(const e in t){const n=typeof w[e]==="function"?w[e](t[e]):undefined;if(n!==undefined){if(n!==null){r.push(n)}}else{return[]}}return r}else{return[]}};e.exports=s},8157:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=n.plugin("postcss-color-hex-alpha",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):false;return e=>{e.walkDecls(e=>{if(a(e)){const t=i(e.value).parse();f(t,e=>{if(l(e)){e.replaceWith(p(e))}});const n=String(t);if(e.value!==n){if(r){e.cloneBefore({value:n})}else{e.value=n}}}})}});const s=/#([0-9A-Fa-f]{4}(?:[0-9A-Fa-f]{4})?)\b/;const a=e=>s.test(e.value);const u=/^#([0-9A-Fa-f]{4}(?:[0-9A-Fa-f]{4})?)$/;const f=(e,r)=>{if(Object(e.nodes).length){e.nodes.slice().forEach(e=>{r(e);f(e,r)})}};const c=1e5;const l=e=>e.type==="word"&&u.test(e.value);const p=e=>{const r=e.value;const t=`0x${r.length===5?r.slice(1).replace(/[0-9A-f]/g,"$&$&"):r.slice(1)}`;const n=[parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),parseInt(t.slice(6,8),16),Math.round(parseInt(t.slice(8,10),16)/255*c)/c],o=n[0],s=n[1],a=n[2],u=n[3];const f=i.func({value:"rgba",raws:Object.assign({},e.raws)});f.append(i.paren({value:"("}));f.append(i.number({value:o}));f.append(i.comma({value:","}));f.append(i.number({value:s}));f.append(i.comma({value:","}));f.append(i.number({value:a}));f.append(i.comma({value:","}));f.append(i.number({value:u}));f.append(i.paren({value:")"}));return f};e.exports=o},8881:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(9448));var i=_interopDefault(t(5747));var o=_interopDefault(t(5622));var s=_interopDefault(t(4633));var a=t(4567);function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}function _defineProperty(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function _objectSpread(e){for(var r=1;r{const o=l(e)?t:p(e)?i:null;if(o){e.nodes.slice().forEach(e=>{if(h(e)){const t=e.prop;o[t]=n(e.value).parse();if(!r.preserve){e.remove()}}});if(!r.preserve&&B(e)){e.remove()}}});return _objectSpread({},t,i)}const u=/^html$/i;const f=/^:root$/i;const c=/^--[A-z][\w-]*$/;const l=e=>e.type==="rule"&&u.test(e.selector)&&Object(e.nodes).length;const p=e=>e.type==="rule"&&f.test(e.selector)&&Object(e.nodes).length;const h=e=>e.type==="decl"&&c.test(e.prop);const B=e=>Object(e.nodes).length===0;function importCustomPropertiesFromCSSAST(e){return getCustomProperties(e,{preserve:true})}function importCustomPropertiesFromCSSFile(e){return _importCustomPropertiesFromCSSFile.apply(this,arguments)}function _importCustomPropertiesFromCSSFile(){_importCustomPropertiesFromCSSFile=_asyncToGenerator(function*(e){const r=yield v(e);const t=s.parse(r,{from:e});return importCustomPropertiesFromCSSAST(t)});return _importCustomPropertiesFromCSSFile.apply(this,arguments)}function importCustomPropertiesFromObject(e){const r=Object.assign({},Object(e).customProperties||Object(e)["custom-properties"]);for(const e in r){r[e]=n(r[e]).parse()}return r}function importCustomPropertiesFromJSONFile(e){return _importCustomPropertiesFromJSONFile.apply(this,arguments)}function _importCustomPropertiesFromJSONFile(){_importCustomPropertiesFromJSONFile=_asyncToGenerator(function*(e){const r=yield d(e);return importCustomPropertiesFromObject(r)});return _importCustomPropertiesFromJSONFile.apply(this,arguments)}function importCustomPropertiesFromJSFile(e){return _importCustomPropertiesFromJSFile.apply(this,arguments)}function _importCustomPropertiesFromJSFile(){_importCustomPropertiesFromJSFile=_asyncToGenerator(function*(e){const r=yield Promise.resolve(require(e));return importCustomPropertiesFromObject(r)});return _importCustomPropertiesFromJSFile.apply(this,arguments)}function importCustomPropertiesFromSources(e){return e.map(e=>{if(e instanceof Promise){return e}else if(e instanceof Function){return e()}const r=e===Object(e)?e:{from:String(e)};if(r.customProperties||r["custom-properties"]){return r}const t=o.resolve(String(r.from||""));const n=(r.type||o.extname(t).slice(1)).toLowerCase();return{type:n,from:t}}).reduce(function(){var e=_asyncToGenerator(function*(e,r){const t=yield r,n=t.type,i=t.from;if(n==="ast"){return Object.assign(yield e,importCustomPropertiesFromCSSAST(i))}if(n==="css"){return Object.assign(yield e,yield importCustomPropertiesFromCSSFile(i))}if(n==="js"){return Object.assign(yield e,yield importCustomPropertiesFromJSFile(i))}if(n==="json"){return Object.assign(yield e,yield importCustomPropertiesFromJSONFile(i))}return Object.assign(yield e,yield importCustomPropertiesFromObject(yield r))});return function(r,t){return e.apply(this,arguments)}}(),{})}const v=e=>new Promise((r,t)=>{i.readFile(e,"utf8",(e,n)=>{if(e){t(e)}else{r(n)}})});const d=function(){var e=_asyncToGenerator(function*(e){return JSON.parse(yield v(e))});return function readJSON(r){return e.apply(this,arguments)}}();function convertDtoD(e){return e%360}function convertGtoD(e){return e*.9%360}function convertRtoD(e){return e*180/Math.PI%360}function convertTtoD(e){return e*360%360}function convertNtoRGB(e){const r={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};return r[e]&&r[e].map(e=>e/2.55)}function convertHtoRGB(e){const r=(e.match(b)||[]).slice(1),t=_slicedToArray(r,8),n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],f=t[6],c=t[7];if(a!==undefined||n!==undefined){const e=a!==undefined?parseInt(a,16):n!==undefined?parseInt(n+n,16):0;const r=u!==undefined?parseInt(u,16):i!==undefined?parseInt(i+i,16):0;const t=f!==undefined?parseInt(f,16):o!==undefined?parseInt(o+o,16):0;const l=c!==undefined?parseInt(c,16):s!==undefined?parseInt(s+s,16):255;return[e,r,t,l].map(e=>e/2.55)}return undefined}const b=/^#(?:([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?)$/i;class Color{constructor(e){this.color=Object(Object(e).color||e);this.color.colorspace=this.color.colorspace?this.color.colorspace:"red"in e&&"green"in e&&"blue"in e?"rgb":"hue"in e&&"saturation"in e&&"lightness"in e?"hsl":"hue"in e&&"whiteness"in e&&"blackness"in e?"hwb":"unknown";if(e.colorspace==="rgb"){this.color.hue=a.rgb2hue(e.red,e.green,e.blue,e.hue||0)}}alpha(e){const r=this.color;return e===undefined?r.alpha:new Color(assign(r,{alpha:e}))}blackness(e){const r=color2hwb(this.color);return e===undefined?r.blackness:new Color(assign(r,{blackness:e}))}blend(e,r,t="rgb"){const n=this.color;return new Color(blend(n,e,r,t))}blenda(e,r,t="rgb"){const n=this.color;return new Color(blend(n,e,r,t,true))}blue(e){const r=color2rgb(this.color);return e===undefined?r.blue:new Color(assign(r,{blue:e}))}contrast(e){const r=this.color;return new Color(contrast(r,e))}green(e){const r=color2rgb(this.color);return e===undefined?r.green:new Color(assign(r,{green:e}))}hue(e){const r=color2hsl(this.color);return e===undefined?r.hue:new Color(assign(r,{hue:e}))}lightness(e){const r=color2hsl(this.color);return e===undefined?r.lightness:new Color(assign(r,{lightness:e}))}red(e){const r=color2rgb(this.color);return e===undefined?r.red:new Color(assign(r,{red:e}))}rgb(e,r,t){const n=color2rgb(this.color);return new Color(assign(n,{red:e,green:r,blue:t}))}saturation(e){const r=color2hsl(this.color);return e===undefined?r.saturation:new Color(assign(r,{saturation:e}))}shade(e){const r=color2hwb(this.color);const t={hue:0,whiteness:0,blackness:100,colorspace:"hwb"};const n="rgb";return e===undefined?r.blackness:new Color(blend(r,t,e,n))}tint(e){const r=color2hwb(this.color);const t={hue:0,whiteness:100,blackness:0,colorspace:"hwb"};const n="rgb";return e===undefined?r.blackness:new Color(blend(r,t,e,n))}whiteness(e){const r=color2hwb(this.color);return e===undefined?r.whiteness:new Color(assign(r,{whiteness:e}))}toHSL(){return color2hslString(this.color)}toHWB(){return color2hwbString(this.color)}toLegacy(){return color2legacyString(this.color)}toRGB(){return color2rgbString(this.color)}toRGBLegacy(){return color2rgbLegacyString(this.color)}toString(){return color2string(this.color)}}function blend(e,r,t,n,i){const o=t/100;const s=1-o;if(n==="hsl"){const t=color2hsl(e),n=t.hue,a=t.saturation,u=t.lightness,f=t.alpha;const c=color2hsl(r),l=c.hue,p=c.saturation,h=c.lightness,B=c.alpha;const v=n*s+l*o,d=a*s+p*o,b=u*s+h*o,y=i?f*s+B*o:f;return{hue:v,saturation:d,lightness:b,alpha:y,colorspace:"hsl"}}else if(n==="hwb"){const t=color2hwb(e),n=t.hue,a=t.whiteness,u=t.blackness,f=t.alpha;const c=color2hwb(r),l=c.hue,p=c.whiteness,h=c.blackness,B=c.alpha;const v=n*s+l*o,d=a*s+p*o,b=u*s+h*o,y=i?f*s+B*o:f;return{hue:v,whiteness:d,blackness:b,alpha:y,colorspace:"hwb"}}else{const t=color2rgb(e),n=t.red,a=t.green,u=t.blue,f=t.alpha;const c=color2rgb(r),l=c.red,p=c.green,h=c.blue,B=c.alpha;const v=n*s+l*o,d=a*s+p*o,b=u*s+h*o,y=i?f*s+B*o:f;return{red:v,green:d,blue:b,alpha:y,colorspace:"rgb"}}}function assign(e,r){const t=Object.assign({},e);Object.keys(r).forEach(n=>{const i=n==="hue";const o=!i&&y.test(n);const s=normalize(r[n],n);t[n]=s;if(o){t.hue=a.rgb2hue(t.red,t.green,t.blue,e.hue||0)}});return t}function normalize(e,r){const t=r==="hue";const n=0;const i=t?360:100;const o=Math.min(Math.max(t?e%360:e,n),i);return o}function color2rgb(e){const r=e.colorspace==="hsl"?a.hsl2rgb(e.hue,e.saturation,e.lightness):e.colorspace==="hwb"?a.hwb2rgb(e.hue,e.whiteness,e.blackness):[e.red,e.green,e.blue],t=_slicedToArray(r,3),n=t[0],i=t[1],o=t[2];return{red:n,green:i,blue:o,hue:e.hue,alpha:e.alpha,colorspace:"rgb"}}function color2hsl(e){const r=e.colorspace==="rgb"?a.rgb2hsl(e.red,e.green,e.blue,e.hue):e.colorspace==="hwb"?a.hwb2hsl(e.hue,e.whiteness,e.blackness):[e.hue,e.saturation,e.lightness],t=_slicedToArray(r,3),n=t[0],i=t[1],o=t[2];return{hue:n,saturation:i,lightness:o,alpha:e.alpha,colorspace:"hsl"}}function color2hwb(e){const r=e.colorspace==="rgb"?a.rgb2hwb(e.red,e.green,e.blue,e.hue):e.colorspace==="hsl"?a.hsl2hwb(e.hue,e.saturation,e.lightness):[e.hue,e.whiteness,e.blackness],t=_slicedToArray(r,3),n=t[0],i=t[1],o=t[2];return{hue:n,whiteness:i,blackness:o,alpha:e.alpha,colorspace:"hwb"}}function contrast(e,r){const t=color2hwb(e);const n=color2rgb(e);const i=rgb2luminance(n.red,n.green,n.blue);const o=i<.5?{hue:t.hue,whiteness:100,blackness:0,alpha:t.alpha,colorspace:"hwb"}:{hue:t.hue,whiteness:0,blackness:100,alpha:t.alpha,colorspace:"hwb"};const s=colors2contrast(e,o);const a=s>4.5?colors2contrastRatioColor(t,o):o;return blend(o,a,r,"hwb",false)}function colors2contrast(e,r){const t=color2rgb(e);const n=color2rgb(r);const i=rgb2luminance(t.red,t.green,t.blue);const o=rgb2luminance(n.red,n.green,n.blue);return i>o?(i+.05)/(o+.05):(o+.05)/(i+.05)}function rgb2luminance(e,r,t){const n=[channel2luminance(e),channel2luminance(r),channel2luminance(t)],i=n[0],o=n[1],s=n[2];const a=.2126*i+.7152*o+.0722*s;return a}function channel2luminance(e){const r=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4);return r}function colors2contrastRatioColor(e,r){const t=Object.assign({},e);let n=e.whiteness;let i=e.blackness;let o=r.whiteness;let s=r.blackness;while(Math.abs(n-o)>100||Math.abs(i-s)>100){const r=Math.round((o+n)/2);const a=Math.round((s+i)/2);t.whiteness=r;t.blackness=a;if(colors2contrast(t,e)>4.5){o=r;s=a}else{n=r;i=a}}return t}const y=/^(blue|green|red)$/i;function color2string(e){return e.colorspace==="hsl"?color2hslString(e):e.colorspace==="hwb"?color2hwbString(e):color2rgbString(e)}function color2hslString(e){const r=color2hsl(e);const t=r.alpha===100;const n=r.hue;const i=Math.round(r.saturation*1e10)/1e10;const o=Math.round(r.lightness*1e10)/1e10;const s=Math.round(r.alpha*1e10)/1e10;return`hsl(${n} ${i}% ${o}%${t?"":` / ${s}%`})`}function color2hwbString(e){const r=color2hwb(e);const t=r.alpha===100;const n=r.hue;const i=Math.round(r.whiteness*1e10)/1e10;const o=Math.round(r.blackness*1e10)/1e10;const s=Math.round(r.alpha*1e10)/1e10;return`hwb(${n} ${i}% ${o}%${t?"":` / ${s}%`})`}function color2rgbString(e){const r=color2rgb(e);const t=r.alpha===100;const n=Math.round(r.red*1e10)/1e10;const i=Math.round(r.green*1e10)/1e10;const o=Math.round(r.blue*1e10)/1e10;const s=Math.round(r.alpha*1e10)/1e10;return`rgb(${n}% ${i}% ${o}%${t?"":` / ${s}%`})`}function color2legacyString(e){return e.colorspace==="hsl"?color2hslLegacyString(e):color2rgbLegacyString(e)}function color2rgbLegacyString(e){const r=color2rgb(e);const t=r.alpha===100;const n=t?"rgb":"rgba";const i=Math.round(r.red*255/100);const o=Math.round(r.green*255/100);const s=Math.round(r.blue*255/100);const a=Math.round(r.alpha/100*1e10)/1e10;return`${n}(${i}, ${o}, ${s}${t?"":`, ${a}`})`}function color2hslLegacyString(e){const r=color2hsl(e);const t=r.alpha===100;const n=t?"hsl":"hsla";const i=r.hue;const o=Math.round(r.saturation*1e10)/1e10;const s=Math.round(r.lightness*1e10)/1e10;const a=Math.round(r.alpha/100*1e10)/1e10;return`${n}(${i}, ${o}%, ${s}%${t?"":`, ${a}`})`}function manageUnresolved(e,r,t,n){if("warn"===r.unresolved){r.decl.warn(r.result,n,{word:t})}else if("ignore"!==r.unresolved){throw r.decl.error(n,{word:t})}}function transformAST(e,r){e.nodes.slice(0).forEach(e=>{if(isColorModFunction(e)){if(r.transformVars){transformVariables(e,r)}const t=transformColorModFunction(e,r);if(t){e.replaceWith(n.word({raws:e.raws,value:r.stringifier(t)}))}}else if(e.nodes&&Object(e.nodes).length){transformAST(e,r)}})}function transformVariables(e,r){walk(e,e=>{if(isVariable(e)){const t=transformArgsByParams(e,[[transformWord,isComma,transformNode]]),n=_slicedToArray(t,2),i=n[0],o=n[1];if(i in r.customProperties){let t=r.customProperties[i];if(N.test(t)){const e=t.clone();transformVariables(e,r);t=e}if(t.nodes.length===1&&t.nodes[0].nodes.length){t.nodes[0].nodes.forEach(r=>{e.parent.insertBefore(e,r)})}e.remove()}else if(o&&o.nodes.length===1&&o.nodes[0].nodes.length){transformVariables(o,r);e.replaceWith(...o.nodes[0].nodes[0])}}})}function transformColor(e,r){if(isRGBFunction(e)){return transformRGBFunction(e,r)}else if(isHSLFunction(e)){return transformHSLFunction(e,r)}else if(isHWBFunction(e)){return transformHWBFunction(e,r)}else if(isColorModFunction(e)){return transformColorModFunction(e,r)}else if(isHexColor(e)){return transformHexColor(e,r)}else if(isNamedColor(e)){return transformNamedColor(e,r)}else{return manageUnresolved(e,r,e.value,`Expected a color`)}}function transformRGBFunction(e,r){const t=transformArgsByParams(e,[[transformPercentage,transformPercentage,transformPercentage,isSlash,transformAlpha],[transformRGBNumber,transformRGBNumber,transformRGBNumber,isSlash,transformAlpha],[transformPercentage,isComma,transformPercentage,isComma,transformPercentage,isComma,transformAlpha],[transformRGBNumber,isComma,transformRGBNumber,isComma,transformRGBNumber,isComma,transformAlpha]]),n=_slicedToArray(t,4),i=n[0],o=n[1],s=n[2],a=n[3],u=a===void 0?100:a;if(i!==undefined){const e=new Color({red:i,green:o,blue:s,alpha:u,colorspace:"rgb"});return e}else{return manageUnresolved(e,r,e.value,`Expected a valid rgb() function`)}}function transformHSLFunction(e,r){const t=transformArgsByParams(e,[[transformHue,transformPercentage,transformPercentage,isSlash,transformAlpha],[transformHue,isComma,transformPercentage,isComma,transformPercentage,isComma,transformAlpha]]),n=_slicedToArray(t,4),i=n[0],o=n[1],s=n[2],a=n[3],u=a===void 0?100:a;if(s!==undefined){const e=new Color({hue:i,saturation:o,lightness:s,alpha:u,colorspace:"hsl"});return e}else{return manageUnresolved(e,r,e.value,`Expected a valid hsl() function`)}}function transformHWBFunction(e,r){const t=transformArgsByParams(e,[[transformHue,transformPercentage,transformPercentage,isSlash,transformAlpha]]),n=_slicedToArray(t,4),i=n[0],o=n[1],s=n[2],a=n[3],u=a===void 0?100:a;if(s!==undefined){const e=new Color({hue:i,whiteness:o,blackness:s,alpha:u,colorspace:"hwb"});return e}else{return manageUnresolved(e,r,e.value,`Expected a valid hwb() function`)}}function transformColorModFunction(e,r){const t=(e.nodes||[]).slice(1,-1)||[],n=_toArray(t),i=n[0],o=n.slice(1);if(i!==undefined){const t=isHue(i)?new Color({hue:transformHue(i,r),saturation:100,lightness:50,alpha:100,colorspace:"hsl"}):transformColor(i,r);if(t){const e=transformColorByAdjusters(t,o,r);return e}else{return manageUnresolved(e,r,e.value,`Expected a valid color`)}}else{return manageUnresolved(e,r,e.value,`Expected a valid color-mod() function`)}}function transformHexColor(e,r){if(E.test(e.value)){const r=convertHtoRGB(e.value),t=_slicedToArray(r,4),n=t[0],i=t[1],o=t[2],s=t[3];const a=new Color({red:n,green:i,blue:o,alpha:s});return a}else{return manageUnresolved(e,r,e.value,`Expected a valid hex color`)}}function transformNamedColor(e,r){if(isNamedColor(e)){const r=convertNtoRGB(e.value),t=_slicedToArray(r,3),n=t[0],i=t[1],o=t[2];const s=new Color({red:n,green:i,blue:o,alpha:100,colorspace:"rgb"});return s}else{return manageUnresolved(e,r,e.value,`Expected a valid named-color`)}}function transformColorByAdjusters(e,r,t){const n=r.reduce((e,r)=>{if(isAlphaBlueGreenRedAdjuster(r)){return transformAlphaBlueGreenRedAdjuster(e,r,t)}else if(isRGBAdjuster(r)){return transformRGBAdjuster(e,r,t)}else if(isHueAdjuster(r)){return transformHueAdjuster(e,r,t)}else if(isBlacknessLightnessSaturationWhitenessAdjuster(r)){return transformBlacknessLightnessSaturationWhitenessAdjuster(e,r,t)}else if(isShadeTintAdjuster(r)){return transformShadeTintAdjuster(e,r,t)}else if(isBlendAdjuster(r)){return transformBlendAdjuster(e,r,r.value==="blenda",t)}else if(isContrastAdjuster(r)){return transformContrastAdjuster(e,r,t)}else{manageUnresolved(r,t,r.value,`Expected a valid color adjuster`);return e}},e);return n}function transformAlphaBlueGreenRedAdjuster(e,r,t){const n=transformArgsByParams(r,g.test(r.value)?[[transformMinusPlusOperator,transformAlpha],[transformTimesOperator,transformPercentage],[transformAlpha]]:[[transformMinusPlusOperator,transformPercentage],[transformMinusPlusOperator,transformRGBNumber],[transformTimesOperator,transformPercentage],[transformPercentage],[transformRGBNumber]]),i=_slicedToArray(n,2),o=i[0],s=i[1];if(o!==undefined){const t=r.value.toLowerCase().replace(g,"alpha");const n=e[t]();const i=s!==undefined?o==="+"?n+Number(s):o==="-"?n-Number(s):o==="*"?n*Number(s):Number(s):Number(o);const a=e[t](i);return a}else{return manageUnresolved(r,t,r.value,`Expected a valid modifier()`)}}function transformRGBAdjuster(e,r,t){const n=transformArgsByParams(r,[[transformMinusPlusOperator,transformPercentage,transformPercentage,transformPercentage],[transformMinusPlusOperator,transformRGBNumber,transformRGBNumber,transformRGBNumber],[transformMinusPlusOperator,transformHexColor],[transformTimesOperator,transformPercentage]]),i=_slicedToArray(n,4),o=i[0],s=i[1],a=i[2],u=i[3];if(s!==undefined&&s.color){const r=e.rgb(o==="+"?e.red()+s.red():e.red()-s.red(),o==="+"?e.green()+s.green():e.green()-s.green(),o==="+"?e.blue()+s.blue():e.blue()-s.blue());return r}else if(o!==undefined&&R.test(o)){const r=e.rgb(o==="+"?e.red()+s:e.red()-s,o==="+"?e.green()+a:e.green()-a,o==="+"?e.blue()+u:e.blue()-u);return r}else if(o!==undefined&&s!==undefined){const r=e.rgb(e.red()*s,e.green()*s,e.blue()*s);return r}else{return manageUnresolved(r,t,r.value,`Expected a valid rgb() adjuster`)}}function transformBlendAdjuster(e,r,t,n){const i=transformArgsByParams(r,[[transformColor,transformPercentage,transformColorSpace]]),o=_slicedToArray(i,3),s=o[0],a=o[1],u=o[2],f=u===void 0?"rgb":u;if(a!==undefined){const r=t?e.blenda(s.color,a,f):e.blend(s.color,a,f);return r}else{return manageUnresolved(r,n,r.value,`Expected a valid blend() adjuster)`)}}function transformContrastAdjuster(e,r,t){const n=transformArgsByParams(r,[[transformPercentage]]),i=_slicedToArray(n,1),o=i[0];if(o!==undefined){const r=e.contrast(o);return r}else{return manageUnresolved(r,t,r.value,`Expected a valid contrast() adjuster)`)}}function transformHueAdjuster(e,r,t){const n=transformArgsByParams(r,[[transformMinusPlusTimesOperator,transformHue],[transformHue]]),i=_slicedToArray(n,2),o=i[0],s=i[1];if(o!==undefined){const r=e.hue();const t=s!==undefined?o==="+"?r+Number(s):o==="-"?r-Number(s):o==="*"?r*Number(s):Number(s):Number(o);return e.hue(t)}else{return manageUnresolved(r,t,r.value,`Expected a valid hue() function)`)}}function transformBlacknessLightnessSaturationWhitenessAdjuster(e,r,t){const n=r.value.toLowerCase().replace(/^b$/,"blackness").replace(/^l$/,"lightness").replace(/^s$/,"saturation").replace(/^w$/,"whiteness");const i=transformArgsByParams(r,[[transformMinusPlusTimesOperator,transformPercentage],[transformPercentage]]),o=_slicedToArray(i,2),s=o[0],a=o[1];if(s!==undefined){const r=e[n]();const t=a!==undefined?s==="+"?r+Number(a):s==="-"?r-Number(a):s==="*"?r*Number(a):Number(a):Number(s);return e[n](t)}else{return manageUnresolved(r,t,r.value,`Expected a valid ${n}() function)`)}}function transformShadeTintAdjuster(e,r,t){const n=r.value.toLowerCase();const i=transformArgsByParams(r,[[transformPercentage]]),o=_slicedToArray(i,1),s=o[0];if(s!==undefined){const r=Number(s);return e[n](r)}else{return manageUnresolved(r,t,r.value,`Expected valid ${n}() arguments`)}}function transformColorSpace(e,r){if(isColorSpace(e)){return e.value}else{return manageUnresolved(e,r,e.value,`Expected a valid color space)`)}}function transformAlpha(e,r){if(isNumber(e)){return e.value*100}else if(isPercentage(e)){return transformPercentage(e,r)}else{return manageUnresolved(e,r,e.value,`Expected a valid alpha value)`)}}function transformRGBNumber(e,r){if(isNumber(e)){return e.value/2.55}else{return manageUnresolved(e,r,e.value,`Expected a valid RGB value)`)}}function transformHue(e,r){if(isHue(e)){const r=e.unit.toLowerCase();if(r==="grad"){return convertGtoD(e.value)}else if(r==="rad"){return convertRtoD(e.value)}else if(r==="turn"){return convertTtoD(e.value)}else{return convertDtoD(e.value)}}else{return manageUnresolved(e,r,e.value,`Expected a valid hue`)}}function transformPercentage(e,r){if(isPercentage(e)){return Number(e.value)}else{return manageUnresolved(e,r,e.value,`Expected a valid hue`)}}function transformMinusPlusOperator(e,r){if(isMinusPlusOperator(e)){return e.value}else{return manageUnresolved(e,r,e.value,`Expected a plus or minus operator`)}}function transformTimesOperator(e,r){if(isTimesOperator(e)){return e.value}else{return manageUnresolved(e,r,e.value,`Expected a times operator`)}}function transformMinusPlusTimesOperator(e,r){if(isMinusPlusTimesOperator(e)){return e.value}else{return manageUnresolved(e,r,e.value,`Expected a plus, minus, or times operator`)}}function transformWord(e,r){if(isWord(e)){return e.value}else{return manageUnresolved(e,r,e.value,`Expected a valid word`)}}function transformNode(e){return Object(e)}function transformArgsByParams(e,r){const t=(e.nodes||[]).slice(1,-1);const n={unresolved:"ignore"};return r.map(e=>t.map((r,t)=>typeof e[t]==="function"?e[t](r,n):undefined).filter(e=>typeof e!=="boolean")).filter(e=>e.every(e=>e!==undefined))[0]||[]}function walk(e,r){r(e);if(Object(e.nodes).length){e.nodes.slice().forEach(e=>{walk(e,r)})}}function isVariable(e){return Object(e).type==="func"&&M.test(e.value)}function isAlphaBlueGreenRedAdjuster(e){return Object(e).type==="func"&&m.test(e.value)}function isRGBAdjuster(e){return Object(e).type==="func"&&x.test(e.value)}function isHueAdjuster(e){return Object(e).type==="func"&&D.test(e.value)}function isBlacknessLightnessSaturationWhitenessAdjuster(e){return Object(e).type==="func"&&C.test(e.value)}function isShadeTintAdjuster(e){return Object(e).type==="func"&&I.test(e.value)}function isBlendAdjuster(e){return Object(e).type==="func"&&w.test(e.value)}function isContrastAdjuster(e){return Object(e).type==="func"&&T.test(e.value)}function isRGBFunction(e){return Object(e).type==="func"&&j.test(e.value)}function isHSLFunction(e){return Object(e).type==="func"&&k.test(e.value)}function isHWBFunction(e){return Object(e).type==="func"&&A.test(e.value)}function isColorModFunction(e){return Object(e).type==="func"&&S.test(e.value)}function isNamedColor(e){return Object(e).type==="word"&&Boolean(convertNtoRGB(e.value))}function isHexColor(e){return Object(e).type==="word"&&E.test(e.value)}function isColorSpace(e){return Object(e).type==="word"&&O.test(e.value)}function isHue(e){return Object(e).type==="number"&&P.test(e.unit)}function isComma(e){return Object(e).type==="comma"}function isSlash(e){return Object(e).type==="operator"&&e.value==="/"}function isNumber(e){return Object(e).type==="number"&&e.unit===""}function isMinusPlusOperator(e){return Object(e).type==="operator"&&R.test(e.value)}function isMinusPlusTimesOperator(e){return Object(e).type==="operator"&&F.test(e.value)}function isTimesOperator(e){return Object(e).type==="operator"&&_.test(e.value)}function isPercentage(e){return Object(e).type==="number"&&(e.unit==="%"||e.value==="0")}function isWord(e){return Object(e).type==="word"}const g=/^a(lpha)?$/i;const m=/^(a(lpha)?|blue|green|red)$/i;const C=/^(b(lackness)?|l(ightness)?|s(aturation)?|w(hiteness)?)$/i;const w=/^blenda?$/i;const S=/^color-mod$/i;const O=/^(hsl|hwb|rgb)$/i;const T=/^contrast$/i;const E=/^#(?:([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?)$/i;const k=/^hsla?$/i;const P=/^(deg|grad|rad|turn)?$/i;const D=/^h(ue)?$/i;const A=/^hwb$/i;const R=/^[+-]$/;const F=/^[*+-]$/;const x=/^rgb$/i;const j=/^rgba?$/i;const I=/^(shade|tint)$/i;const M=/^var$/i;const N=/(^|[^\w-])var\(/i;const _=/^[*]$/;var L=s.plugin("postcss-color-mod-function",e=>{const r=String(Object(e).unresolved||"throw").toLowerCase();const t=Object(e).stringifier||(e=>e.toLegacy());const i=[].concat(Object(e).importFrom||[]);const o="transformVars"in Object(e)?e.transformVars:true;const s=importCustomPropertiesFromSources(i);return function(){var e=_asyncToGenerator(function*(e,i){const a=Object.assign(yield s,getCustomProperties(e,{preserve:true}));e.walkDecls(e=>{const s=e.value;if(q.test(s)){const u=n(s,{loose:true}).parse();transformAST(u,{unresolved:r,stringifier:t,transformVars:o,decl:e,result:i,customProperties:a});const f=u.toString();if(s!==f){e.value=f}}})});return function(r,t){return e.apply(this,arguments)}}()});const q=/(^|[^\w-])color-mod\(/i;e.exports=L},9971:(e,r,t)=>{const n=t(4633);const i=t(9448);const o="#639";const s=/(^|[^\w-])rebeccapurple([^\w-]|$)/;e.exports=n.plugin("postcss-color-rebeccapurple",()=>e=>{e.walkDecls(e=>{const r=e.value;if(r&&s.test(r)){const t=i(r).parse();t.walk(e=>{if(e.type==="word"&&e.value==="rebeccapurple"){e.value=o}});e.value=t.toString()}})})},4731:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(5747));var o=_interopDefault(t(5622));function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}function _defineProperty(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function _objectSpread(e){for(var r=1;r0){o-=1}}else if(o===0){if(r&&h.test(n+a)){i=true}else if(!r&&a===","){i=true}}if(i){t.push(r?new MediaExpression(n+a):new MediaQuery(n));n="";i=false}else{n+=a}}if(n!==""){t.push(r?new MediaExpression(n):new MediaQuery(n))}return t}class MediaQueryList{constructor(e){this.nodes=parse(e)}invert(){this.nodes.forEach(e=>{e.invert()});return this}clone(){return new MediaQueryList(String(this))}toString(){return this.nodes.join(",")}}class MediaQuery{constructor(e){const r=e.match(B),t=_slicedToArray(r,4),n=t[1],i=t[2],o=t[3];const s=i.match(v)||[],a=_slicedToArray(s,9),u=a[1],f=u===void 0?"":u,c=a[2],l=c===void 0?" ":c,p=a[3],h=p===void 0?"":p,d=a[4],b=d===void 0?"":d,y=a[5],g=y===void 0?"":y,m=a[6],C=m===void 0?"":m,w=a[7],S=w===void 0?"":w,O=a[8],T=O===void 0?"":O;const E={before:n,after:o,afterModifier:l,originalModifier:f||"",beforeAnd:b,and:g,beforeExpression:C};const k=parse(S||T,true);Object.assign(this,{modifier:f,type:h,raws:E,nodes:k})}clone(e){const r=new MediaQuery(String(this));Object.assign(r,e);return r}invert(){this.modifier=this.modifier?"":this.raws.originalModifier;return this}toString(){const e=this.raws;return`${e.before}${this.modifier}${this.modifier?`${e.afterModifier}`:""}${this.type}${e.beforeAnd}${e.and}${e.beforeExpression}${this.nodes.join("")}${this.raws.after}`}}class MediaExpression{constructor(e){const r=e.match(h)||[null,e],t=_slicedToArray(r,5),n=t[1],i=t[2],o=i===void 0?"":i,s=t[3],a=s===void 0?"":s,u=t[4],f=u===void 0?"":u;const c={after:o,and:a,afterAnd:f};Object.assign(this,{value:n,raws:c})}clone(e){const r=new MediaExpression(String(this));Object.assign(r,e);return r}toString(){const e=this.raws;return`${this.value}${e.after}${e.and}${e.afterAnd}`}}const s="(not|only)";const a="(all|print|screen|speech)";const u="([\\W\\w]*)";const f="([\\W\\w]+)";const c="(\\s*)";const l="(\\s+)";const p="(?:(\\s+)(and))";const h=new RegExp(`^${f}(?:${p}${l})$`,"i");const B=new RegExp(`^${c}${u}${c}$`);const v=new RegExp(`^(?:${s}${l})?(?:${a}(?:${p}${l}${f})?|${f})$`,"i");var d=e=>new MediaQueryList(e);var b=(e,r)=>{const t={};e.nodes.slice().forEach(e=>{if(m(e)){const n=e.params.match(g),i=_slicedToArray(n,3),o=i[1],s=i[2];t[o]=d(s);if(!Object(r).preserve){e.remove()}}});return t};const y=/^custom-media$/i;const g=/^(--[A-z][\w-]*)\s+([\W\w]+)\s*$/;const m=e=>e.type==="atrule"&&y.test(e.name)&&g.test(e.params);function getCustomMediaFromCSSFile(e){return _getCustomMediaFromCSSFile.apply(this,arguments)}function _getCustomMediaFromCSSFile(){_getCustomMediaFromCSSFile=_asyncToGenerator(function*(e){const r=yield C(e);const t=n.parse(r,{from:e});return b(t,{preserve:true})});return _getCustomMediaFromCSSFile.apply(this,arguments)}function getCustomMediaFromObject(e){const r=Object.assign({},Object(e).customMedia,Object(e)["custom-media"]);for(const e in r){r[e]=d(r[e])}return r}function getCustomMediaFromJSONFile(e){return _getCustomMediaFromJSONFile.apply(this,arguments)}function _getCustomMediaFromJSONFile(){_getCustomMediaFromJSONFile=_asyncToGenerator(function*(e){const r=yield w(e);return getCustomMediaFromObject(r)});return _getCustomMediaFromJSONFile.apply(this,arguments)}function getCustomMediaFromJSFile(e){return _getCustomMediaFromJSFile.apply(this,arguments)}function _getCustomMediaFromJSFile(){_getCustomMediaFromJSFile=_asyncToGenerator(function*(e){const r=yield Promise.resolve(require(e));return getCustomMediaFromObject(r)});return _getCustomMediaFromJSFile.apply(this,arguments)}function getCustomMediaFromSources(e){return e.map(e=>{if(e instanceof Promise){return e}else if(e instanceof Function){return e()}const r=e===Object(e)?e:{from:String(e)};if(Object(r).customMedia||Object(r)["custom-media"]){return r}const t=o.resolve(String(r.from||""));const n=(r.type||o.extname(t).slice(1)).toLowerCase();return{type:n,from:t}}).reduce(function(){var e=_asyncToGenerator(function*(e,r){const t=yield r,n=t.type,i=t.from;if(n==="css"||n==="pcss"){return Object.assign(yield e,yield getCustomMediaFromCSSFile(i))}if(n==="js"){return Object.assign(yield e,yield getCustomMediaFromJSFile(i))}if(n==="json"){return Object.assign(yield e,yield getCustomMediaFromJSONFile(i))}return Object.assign(yield e,getCustomMediaFromObject(yield r))});return function(r,t){return e.apply(this,arguments)}}(),{})}const C=e=>new Promise((r,t)=>{i.readFile(e,"utf8",(e,n)=>{if(e){t(e)}else{r(n)}})});const w=function(){var e=_asyncToGenerator(function*(e){return JSON.parse(yield C(e))});return function readJSON(r){return e.apply(this,arguments)}}();function transformMediaList(e,r){let t=e.nodes.length-1;while(t>=0){const n=transformMedia(e.nodes[t],r);if(n.length){e.nodes.splice(t,1,...n)}--t}return e}function transformMedia(e,r){const t=[];for(const u in e.nodes){const f=e.nodes[u],c=f.value,l=f.nodes;const p=c.replace(S,"$1");if(p in r){var n=true;var i=false;var o=undefined;try{for(var s=r[p].nodes[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){const n=a.value;const i=e.modifier!==n.modifier?e.modifier||n.modifier:"";const o=e.clone({modifier:i,raws:!i||e.modifier?_objectSpread({},e.raws):_objectSpread({},n.raws),type:e.type||n.type});if(o.type===n.type){Object.assign(o.raws,{and:n.raws.and,beforeAnd:n.raws.beforeAnd,beforeExpression:n.raws.beforeExpression})}o.nodes.splice(u,1,...n.clone().nodes.map(r=>{if(e.nodes[u].raws.and){r.raws=_objectSpread({},e.nodes[u].raws)}r.spaces=_objectSpread({},e.nodes[u].spaces);return r}));const s=O(r,p);const f=transformMedia(o,s);if(f.length){t.push(...f)}else{t.push(o)}}}catch(e){i=true;o=e}finally{try{if(!n&&s.return!=null){s.return()}}finally{if(i){throw o}}}return t}else if(l&&l.length){transformMediaList(e.nodes[u],r)}}return t}const S=/\((--[A-z][\w-]*)\)/;const O=(e,r)=>{const t=Object.assign({},e);delete t[r];return t};var T=(e,r,t)=>{e.walkAtRules(E,e=>{if(k.test(e.params)){const n=d(e.params);const i=String(transformMediaList(n,r));if(t.preserve){e.cloneBefore({params:i})}else{e.params=i}}})};const E=/^media$/i;const k=/\(--[A-z][\w-]*\)/;function writeCustomMediaToCssFile(e,r){return _writeCustomMediaToCssFile.apply(this,arguments)}function _writeCustomMediaToCssFile(){_writeCustomMediaToCssFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`@custom-media ${t} ${r[t]};`);return e},[]).join("\n");const n=`${t}\n`;yield D(e,n)});return _writeCustomMediaToCssFile.apply(this,arguments)}function writeCustomMediaToJsonFile(e,r){return _writeCustomMediaToJsonFile.apply(this,arguments)}function _writeCustomMediaToJsonFile(){_writeCustomMediaToJsonFile=_asyncToGenerator(function*(e,r){const t=JSON.stringify({"custom-media":r},null," ");const n=`${t}\n`;yield D(e,n)});return _writeCustomMediaToJsonFile.apply(this,arguments)}function writeCustomMediaToCjsFile(e,r){return _writeCustomMediaToCjsFile.apply(this,arguments)}function _writeCustomMediaToCjsFile(){_writeCustomMediaToCjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t\t'${A(t)}': '${A(r[t])}'`);return e},[]).join(",\n");const n=`module.exports = {\n\tcustomMedia: {\n${t}\n\t}\n};\n`;yield D(e,n)});return _writeCustomMediaToCjsFile.apply(this,arguments)}function writeCustomMediaToMjsFile(e,r){return _writeCustomMediaToMjsFile.apply(this,arguments)}function _writeCustomMediaToMjsFile(){_writeCustomMediaToMjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t'${A(t)}': '${A(r[t])}'`);return e},[]).join(",\n");const n=`export const customMedia = {\n${t}\n};\n`;yield D(e,n)});return _writeCustomMediaToMjsFile.apply(this,arguments)}function writeCustomMediaToExports(e,r){return Promise.all(r.map(function(){var r=_asyncToGenerator(function*(r){if(r instanceof Function){yield r(P(e))}else{const t=r===Object(r)?r:{to:String(r)};const n=t.toJSON||P;if("customMedia"in t){t.customMedia=n(e)}else if("custom-media"in t){t["custom-media"]=n(e)}else{const r=String(t.to||"");const i=(t.type||o.extname(r).slice(1)).toLowerCase();const s=n(e);if(i==="css"){yield writeCustomMediaToCssFile(r,s)}if(i==="js"){yield writeCustomMediaToCjsFile(r,s)}if(i==="json"){yield writeCustomMediaToJsonFile(r,s)}if(i==="mjs"){yield writeCustomMediaToMjsFile(r,s)}}}});return function(e){return r.apply(this,arguments)}}()))}const P=e=>{return Object.keys(e).reduce((r,t)=>{r[t]=String(e[t]);return r},{})};const D=(e,r)=>new Promise((t,n)=>{i.writeFile(e,r,e=>{if(e){n(e)}else{t()}})});const A=e=>e.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\n/g,"\\n").replace(/\r/g,"\\r");var R=n.plugin("postcss-custom-media",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):false;const t=[].concat(Object(e).importFrom||[]);const n=[].concat(Object(e).exportTo||[]);const i=getCustomMediaFromSources(t);return function(){var e=_asyncToGenerator(function*(e){const t=Object.assign(yield i,b(e,{preserve:r}));yield writeCustomMediaToExports(t,n);T(e,t,{preserve:r})});return function(r){return e.apply(this,arguments)}}()});e.exports=R},8713:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=_interopDefault(t(5747));var s=_interopDefault(t(5622));function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}function parse(e){return i(e).parse()}function isBlockIgnored(e){var r=e.selector?e:e.parent;return/(!\s*)?postcss-custom-properties:\s*off\b/i.test(r.toString())}function isRuleIgnored(e){var r=e.prev();return Boolean(isBlockIgnored(e)||r&&r.type==="comment"&&/(!\s*)?postcss-custom-properties:\s*ignore\s+next\b/i.test(r.text))}function getCustomPropertiesFromRoot(e,r){const t={};const n={};e.nodes.slice().forEach(e=>{const i=c(e)?t:l(e)?n:null;if(i){e.nodes.slice().forEach(e=>{if(p(e)&&!isBlockIgnored(e)){const t=e.prop;i[t]=parse(e.value).nodes;if(!r.preserve){e.remove()}}});if(!r.preserve&&h(e)&&!isBlockIgnored(e)){e.remove()}}});return Object.assign({},t,n)}const a=/^html$/i;const u=/^:root$/i;const f=/^--[A-z][\w-]*$/;const c=e=>e.type==="rule"&&a.test(e.selector)&&Object(e.nodes).length;const l=e=>e.type==="rule"&&u.test(e.selector)&&Object(e.nodes).length;const p=e=>e.type==="decl"&&f.test(e.prop);const h=e=>Object(e.nodes).length===0;function getCustomPropertiesFromCSSFile(e){return _getCustomPropertiesFromCSSFile.apply(this,arguments)}function _getCustomPropertiesFromCSSFile(){_getCustomPropertiesFromCSSFile=_asyncToGenerator(function*(e){const r=yield B(e);const t=n.parse(r,{from:e});return getCustomPropertiesFromRoot(t,{preserve:true})});return _getCustomPropertiesFromCSSFile.apply(this,arguments)}function getCustomPropertiesFromObject(e){const r=Object.assign({},Object(e).customProperties,Object(e)["custom-properties"]);for(const e in r){r[e]=parse(String(r[e])).nodes}return r}function getCustomPropertiesFromJSONFile(e){return _getCustomPropertiesFromJSONFile.apply(this,arguments)}function _getCustomPropertiesFromJSONFile(){_getCustomPropertiesFromJSONFile=_asyncToGenerator(function*(e){const r=yield v(e);return getCustomPropertiesFromObject(r)});return _getCustomPropertiesFromJSONFile.apply(this,arguments)}function getCustomPropertiesFromJSFile(e){return _getCustomPropertiesFromJSFile.apply(this,arguments)}function _getCustomPropertiesFromJSFile(){_getCustomPropertiesFromJSFile=_asyncToGenerator(function*(e){const r=yield Promise.resolve(require(e));return getCustomPropertiesFromObject(r)});return _getCustomPropertiesFromJSFile.apply(this,arguments)}function getCustomPropertiesFromImports(e){return e.map(e=>{if(e instanceof Promise){return e}else if(e instanceof Function){return e()}const r=e===Object(e)?e:{from:String(e)};if(r.customProperties||r["custom-properties"]){return r}const t=s.resolve(String(r.from||""));const n=(r.type||s.extname(t).slice(1)).toLowerCase();return{type:n,from:t}}).reduce(function(){var e=_asyncToGenerator(function*(e,r){const t=yield r,n=t.type,i=t.from;if(n==="css"){return Object.assign(yield e,yield getCustomPropertiesFromCSSFile(i))}if(n==="js"){return Object.assign(yield e,yield getCustomPropertiesFromJSFile(i))}if(n==="json"){return Object.assign(yield e,yield getCustomPropertiesFromJSONFile(i))}return Object.assign(yield e,yield getCustomPropertiesFromObject(yield r))});return function(r,t){return e.apply(this,arguments)}}(),{})}const B=e=>new Promise((r,t)=>{o.readFile(e,"utf8",(e,n)=>{if(e){t(e)}else{r(n)}})});const v=function(){var e=_asyncToGenerator(function*(e){return JSON.parse(yield B(e))});return function readJSON(r){return e.apply(this,arguments)}}();function transformValueAST(e,r){if(e.nodes&&e.nodes.length){e.nodes.slice().forEach(t=>{if(b(t)){const n=t.nodes.slice(1,-1),i=n[0],o=n[1],s=n.slice(2);const a=i.value;if(a in Object(r)){const e=y(r[a],t.raws.before);t.replaceWith(...e);retransformValueAST({nodes:e},r,a)}else if(s.length){const n=e.nodes.indexOf(t);if(n!==-1){e.nodes.splice(n,1,...y(s,t.raws.before))}transformValueAST(e,r)}}else{transformValueAST(t,r)}})}return e}function retransformValueAST(e,r,t){const n=Object.assign({},r);delete n[t];return transformValueAST(e,n)}const d=/^var$/i;const b=e=>e.type==="func"&&d.test(e.value)&&Object(e.nodes).length>0;const y=(e,r)=>{const t=g(e,null);if(t[0]){t[0].raws.before=r}return t};const g=(e,r)=>e.map(e=>m(e,r));const m=(e,r)=>{const t=new e.constructor(e);for(const n in e){if(n==="parent"){t.parent=r}else if(Object(e[n]).constructor===Array){t[n]=g(e.nodes,t)}else if(Object(e[n]).constructor===Object){t[n]=Object.assign({},e[n])}}return t};var C=(e,r,t)=>{e.walkDecls(e=>{if(O(e)&&!isRuleIgnored(e)){const n=e.value;const i=parse(n);const o=String(transformValueAST(i,r));if(o!==n){if(t.preserve){e.cloneBefore({value:o})}else{e.value=o}}}})};const w=/^--[A-z][\w-]*$/;const S=/(^|[^\w-])var\([\W\w]+\)/;const O=e=>!w.test(e.prop)&&S.test(e.value);function writeCustomPropertiesToCssFile(e,r){return _writeCustomPropertiesToCssFile.apply(this,arguments)}function _writeCustomPropertiesToCssFile(){_writeCustomPropertiesToCssFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t${t}: ${r[t]};`);return e},[]).join("\n");const n=`:root {\n${t}\n}\n`;yield E(e,n)});return _writeCustomPropertiesToCssFile.apply(this,arguments)}function writeCustomPropertiesToJsonFile(e,r){return _writeCustomPropertiesToJsonFile.apply(this,arguments)}function _writeCustomPropertiesToJsonFile(){_writeCustomPropertiesToJsonFile=_asyncToGenerator(function*(e,r){const t=JSON.stringify({"custom-properties":r},null," ");const n=`${t}\n`;yield E(e,n)});return _writeCustomPropertiesToJsonFile.apply(this,arguments)}function writeCustomPropertiesToCjsFile(e,r){return _writeCustomPropertiesToCjsFile.apply(this,arguments)}function _writeCustomPropertiesToCjsFile(){_writeCustomPropertiesToCjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t\t'${k(t)}': '${k(r[t])}'`);return e},[]).join(",\n");const n=`module.exports = {\n\tcustomProperties: {\n${t}\n\t}\n};\n`;yield E(e,n)});return _writeCustomPropertiesToCjsFile.apply(this,arguments)}function writeCustomPropertiesToMjsFile(e,r){return _writeCustomPropertiesToMjsFile.apply(this,arguments)}function _writeCustomPropertiesToMjsFile(){_writeCustomPropertiesToMjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t'${k(t)}': '${k(r[t])}'`);return e},[]).join(",\n");const n=`export const customProperties = {\n${t}\n};\n`;yield E(e,n)});return _writeCustomPropertiesToMjsFile.apply(this,arguments)}function writeCustomPropertiesToExports(e,r){return Promise.all(r.map(function(){var r=_asyncToGenerator(function*(r){if(r instanceof Function){yield r(T(e))}else{const t=r===Object(r)?r:{to:String(r)};const n=t.toJSON||T;if("customProperties"in t){t.customProperties=n(e)}else if("custom-properties"in t){t["custom-properties"]=n(e)}else{const r=String(t.to||"");const i=(t.type||s.extname(t.to).slice(1)).toLowerCase();const o=n(e);if(i==="css"){yield writeCustomPropertiesToCssFile(r,o)}if(i==="js"){yield writeCustomPropertiesToCjsFile(r,o)}if(i==="json"){yield writeCustomPropertiesToJsonFile(r,o)}if(i==="mjs"){yield writeCustomPropertiesToMjsFile(r,o)}}}});return function(e){return r.apply(this,arguments)}}()))}const T=e=>{return Object.keys(e).reduce((r,t)=>{r[t]=String(e[t]);return r},{})};const E=(e,r)=>new Promise((t,n)=>{o.writeFile(e,r,e=>{if(e){n(e)}else{t()}})});const k=e=>e.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\n/g,"\\n").replace(/\r/g,"\\r");var P=n.plugin("postcss-custom-properties",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;const t=[].concat(Object(e).importFrom||[]);const n=[].concat(Object(e).exportTo||[]);const i=getCustomPropertiesFromImports(t);const o=e=>{const t=getCustomPropertiesFromRoot(e,{preserve:r});C(e,t,{preserve:r})};const s=function(){var e=_asyncToGenerator(function*(e){const t=Object.assign({},yield i,getCustomPropertiesFromRoot(e,{preserve:r}));yield writeCustomPropertiesToExports(t,n);C(e,t,{preserve:r})});return function asyncTransform(r){return e.apply(this,arguments)}}();const a=t.length===0&&n.length===0;return a?o:s});e.exports=P},8758:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(2152));var i=_interopDefault(t(5747));var o=_interopDefault(t(5622));var s=_interopDefault(t(4633));function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}function _defineProperty(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function _objectSpread(e){for(var r=1;r{let r;n(e=>{r=e}).processSync(e);return r};var u=(e,r)=>{const t={};e.nodes.slice().forEach(e=>{if(l(e)){const n=e.params.match(c),i=_slicedToArray(n,3),o=i[1],s=i[2];t[o]=a(s);if(!Object(r).preserve){e.remove()}}});return t};const f=/^custom-selector$/i;const c=/^(:--[A-z][\w-]*)\s+([\W\w]+)\s*$/;const l=e=>e.type==="atrule"&&f.test(e.name)&&c.test(e.params);function transformSelectorList(e,r){let t=e.nodes.length-1;while(t>=0){const n=transformSelector(e.nodes[t],r);if(n.length){e.nodes.splice(t,1,...n)}--t}return e}function transformSelector(e,r){const t=[];for(const u in e.nodes){const f=e.nodes[u],c=f.value,l=f.nodes;if(c in r){var n=true;var i=false;var o=undefined;try{for(var s=r[c].nodes[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){const n=a.value;const i=e.clone();i.nodes.splice(u,1,...n.clone().nodes.map(r=>{r.spaces=_objectSpread({},e.nodes[u].spaces);return r}));const o=transformSelector(i,r);d(i.nodes,Number(u));if(o.length){t.push(...o)}else{t.push(i)}}}catch(e){i=true;o=e}finally{try{if(!n&&s.return!=null){s.return()}}finally{if(i){throw o}}}return t}else if(l&&l.length){transformSelectorList(e.nodes[u],r)}}return t}const p=/^(tag|universal)$/;const h=/^(class|id|pseudo|tag|universal)$/;const B=e=>p.test(Object(e).type);const v=e=>h.test(Object(e).type);const d=(e,r)=>{if(r&&B(e[r])&&v(e[r-1])){let t=r-1;while(t&&v(e[t])){--t}if(t{e.walkRules(y,e=>{const i=n(e=>{transformSelectorList(e,r,t)}).processSync(e.selector);if(t.preserve){e.cloneBefore({selector:i})}else{e.selector=i}})};const y=/:--[A-z][\w-]*/;function importCustomSelectorsFromCSSAST(e){return u(e)}function importCustomSelectorsFromCSSFile(e){return _importCustomSelectorsFromCSSFile.apply(this,arguments)}function _importCustomSelectorsFromCSSFile(){_importCustomSelectorsFromCSSFile=_asyncToGenerator(function*(e){const r=yield g(o.resolve(e));const t=s.parse(r,{from:o.resolve(e)});return importCustomSelectorsFromCSSAST(t)});return _importCustomSelectorsFromCSSFile.apply(this,arguments)}function importCustomSelectorsFromObject(e){const r=Object.assign({},Object(e).customSelectors||Object(e)["custom-selectors"]);for(const e in r){r[e]=a(r[e])}return r}function importCustomSelectorsFromJSONFile(e){return _importCustomSelectorsFromJSONFile.apply(this,arguments)}function _importCustomSelectorsFromJSONFile(){_importCustomSelectorsFromJSONFile=_asyncToGenerator(function*(e){const r=yield m(o.resolve(e));return importCustomSelectorsFromObject(r)});return _importCustomSelectorsFromJSONFile.apply(this,arguments)}function importCustomSelectorsFromJSFile(e){return _importCustomSelectorsFromJSFile.apply(this,arguments)}function _importCustomSelectorsFromJSFile(){_importCustomSelectorsFromJSFile=_asyncToGenerator(function*(e){const r=yield Promise.resolve(require(o.resolve(e)));return importCustomSelectorsFromObject(r)});return _importCustomSelectorsFromJSFile.apply(this,arguments)}function importCustomSelectorsFromSources(e){return e.map(e=>{if(e instanceof Promise){return e}else if(e instanceof Function){return e()}const r=e===Object(e)?e:{from:String(e)};if(Object(r).customSelectors||Object(r)["custom-selectors"]){return r}const t=String(r.from||"");const n=(r.type||o.extname(t).slice(1)).toLowerCase();return{type:n,from:t}}).reduce(function(){var e=_asyncToGenerator(function*(e,r){const t=yield r,n=t.type,i=t.from;if(n==="ast"){return Object.assign(e,importCustomSelectorsFromCSSAST(i))}if(n==="css"){return Object.assign(e,yield importCustomSelectorsFromCSSFile(i))}if(n==="js"){return Object.assign(e,yield importCustomSelectorsFromJSFile(i))}if(n==="json"){return Object.assign(e,yield importCustomSelectorsFromJSONFile(i))}return Object.assign(e,importCustomSelectorsFromObject(yield r))});return function(r,t){return e.apply(this,arguments)}}(),{})}const g=e=>new Promise((r,t)=>{i.readFile(e,"utf8",(e,n)=>{if(e){t(e)}else{r(n)}})});const m=function(){var e=_asyncToGenerator(function*(e){return JSON.parse(yield g(e))});return function readJSON(r){return e.apply(this,arguments)}}();function exportCustomSelectorsToCssFile(e,r){return _exportCustomSelectorsToCssFile.apply(this,arguments)}function _exportCustomSelectorsToCssFile(){_exportCustomSelectorsToCssFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`@custom-selector ${t} ${r[t]};`);return e},[]).join("\n");const n=`${t}\n`;yield w(e,n)});return _exportCustomSelectorsToCssFile.apply(this,arguments)}function exportCustomSelectorsToJsonFile(e,r){return _exportCustomSelectorsToJsonFile.apply(this,arguments)}function _exportCustomSelectorsToJsonFile(){_exportCustomSelectorsToJsonFile=_asyncToGenerator(function*(e,r){const t=JSON.stringify({"custom-selectors":r},null," ");const n=`${t}\n`;yield w(e,n)});return _exportCustomSelectorsToJsonFile.apply(this,arguments)}function exportCustomSelectorsToCjsFile(e,r){return _exportCustomSelectorsToCjsFile.apply(this,arguments)}function _exportCustomSelectorsToCjsFile(){_exportCustomSelectorsToCjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t\t'${S(t)}': '${S(r[t])}'`);return e},[]).join(",\n");const n=`module.exports = {\n\tcustomSelectors: {\n${t}\n\t}\n};\n`;yield w(e,n)});return _exportCustomSelectorsToCjsFile.apply(this,arguments)}function exportCustomSelectorsToMjsFile(e,r){return _exportCustomSelectorsToMjsFile.apply(this,arguments)}function _exportCustomSelectorsToMjsFile(){_exportCustomSelectorsToMjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t'${S(t)}': '${S(r[t])}'`);return e},[]).join(",\n");const n=`export const customSelectors = {\n${t}\n};\n`;yield w(e,n)});return _exportCustomSelectorsToMjsFile.apply(this,arguments)}function exportCustomSelectorsToDestinations(e,r){return Promise.all(r.map(function(){var r=_asyncToGenerator(function*(r){if(r instanceof Function){yield r(C(e))}else{const t=r===Object(r)?r:{to:String(r)};const n=t.toJSON||C;if("customSelectors"in t){t.customSelectors=n(e)}else if("custom-selectors"in t){t["custom-selectors"]=n(e)}else{const r=String(t.to||"");const i=(t.type||o.extname(t.to).slice(1)).toLowerCase();const s=n(e);if(i==="css"){yield exportCustomSelectorsToCssFile(r,s)}if(i==="js"){yield exportCustomSelectorsToCjsFile(r,s)}if(i==="json"){yield exportCustomSelectorsToJsonFile(r,s)}if(i==="mjs"){yield exportCustomSelectorsToMjsFile(r,s)}}}});return function(e){return r.apply(this,arguments)}}()))}const C=e=>{return Object.keys(e).reduce((r,t)=>{r[t]=String(e[t]);return r},{})};const w=(e,r)=>new Promise((t,n)=>{i.writeFile(e,r,e=>{if(e){n(e)}else{t()}})});const S=e=>e.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\n/g,"\\n").replace(/\r/g,"\\r");var O=s.plugin("postcss-custom-selectors",e=>{const r=Boolean(Object(e).preserve);const t=[].concat(Object(e).importFrom||[]);const n=[].concat(Object(e).exportTo||[]);const i=importCustomSelectorsFromSources(t);return function(){var e=_asyncToGenerator(function*(e){const t=Object.assign(yield i,u(e,{preserve:r}));yield exportCustomSelectorsToDestinations(t,n);b(e,t,{preserve:r})});return function(r){return e.apply(this,arguments)}}()});e.exports=O},666:e=>{"use strict";var r={};var t=r.hasOwnProperty;var n=function merge(e,r){if(!e){return r}var n={};for(var i in r){n[i]=t.call(e,i)?e[i]:r[i]}return n};var i=/[ -,\.\/;-@\[-\^`\{-~]/;var o=/[ -,\.\/;-@\[\]\^`\{-~]/;var s=/['"\\]/;var a=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var u=function cssesc(e,r){r=n(r,cssesc.options);if(r.quotes!="single"&&r.quotes!="double"){r.quotes="single"}var t=r.quotes=="double"?'"':"'";var s=r.isIdentifier;var u=e.charAt(0);var f="";var c=0;var l=e.length;while(c126){if(h>=55296&&h<=56319&&c{"use strict";r.__esModule=true;var n=t(7291);var i=_interopRequireDefault(n);var o=t(2341);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=function parser(e){return new i.default(e)};Object.assign(a,s);delete a.__esModule;r.default=a;e.exports=r["default"]},1387:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parser);this.rule=e;this.options=Object.assign({lossy:false,safe:false},r);this.position=0;this.css=typeof this.rule==="string"?this.rule:this.rule.selector;this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var t=getTokenSourceSpan(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new p.default({source:t});this.root.errorGenerator=this._errorGenerator();var n=new B.default({source:{start:{line:1,column:1}}});this.root.append(n);this.current=n;this.loop()}Parser.prototype._errorGenerator=function _errorGenerator(){var e=this;return function(r,t){if(typeof e.rule==="string"){return new Error(r)}return e.rule.error(r,t)}};Parser.prototype.attribute=function attribute(){var e=[];var r=this.currToken;this.position++;while(this.position1&&arguments[1]!==undefined?arguments[1]:false;var n="";var i="";e.forEach(function(e){var o=r.lossySpace(e.spaces.before,t);var s=r.lossySpace(e.rawSpaceBefore,t);n+=o+r.lossySpace(e.spaces.after,t&&o.length===0);i+=o+e.value+r.lossySpace(e.rawSpaceAfter,t&&s.length===0)});if(i===n){i=undefined}var o={space:n,rawSpace:i};return o};Parser.prototype.isNamedCombinator=function isNamedCombinator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position;return this.tokens[e+0]&&this.tokens[e+0][N.FIELDS.TYPE]===q.slash&&this.tokens[e+1]&&this.tokens[e+1][N.FIELDS.TYPE]===q.word&&this.tokens[e+2]&&this.tokens[e+2][N.FIELDS.TYPE]===q.slash};Parser.prototype.namedCombinator=function namedCombinator(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]);var r=(0,U.unesc)(e).toLowerCase();var t={};if(r!==e){t.value="/"+e+"/"}var n=new F.default({value:"/"+r+"/",source:getSource(this.currToken[N.FIELDS.START_LINE],this.currToken[N.FIELDS.START_COL],this.tokens[this.position+2][N.FIELDS.END_LINE],this.tokens[this.position+2][N.FIELDS.END_COL]),sourceIndex:this.currToken[N.FIELDS.START_POS],raws:t});this.position=this.position+3;return n}else{this.unexpected()}};Parser.prototype.combinator=function combinator(){var e=this;if(this.content()==="|"){return this.namespace()}var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][N.FIELDS.TYPE]===q.comma){var t=this.parseWhitespaceEquivalentTokens(r);if(t.length>0){var n=this.current.last;if(n){var i=this.convertWhitespaceNodesToSpace(t),o=i.space,s=i.rawSpace;if(s!==undefined){n.rawSpaceAfter+=s}n.spaces.after+=o}else{t.forEach(function(r){return e.newNode(r)})}}return}var a=this.currToken;var u=undefined;if(r>this.position){u=this.parseWhitespaceEquivalentTokens(r)}var f=void 0;if(this.isNamedCombinator()){f=this.namedCombinator()}else if(this.currToken[N.FIELDS.TYPE]===q.combinator){f=new F.default({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[N.FIELDS.START_POS]});this.position++}else if(H[this.currToken[N.FIELDS.TYPE]]){}else if(!u){this.unexpected()}if(f){if(u){var c=this.convertWhitespaceNodesToSpace(u),l=c.space,p=c.rawSpace;f.spaces.before=l;f.rawSpaceBefore=p}}else{var h=this.convertWhitespaceNodesToSpace(u,true),B=h.space,v=h.rawSpace;if(!v){v=B}var d={};var b={spaces:{}};if(B.endsWith(" ")&&v.endsWith(" ")){d.before=B.slice(0,B.length-1);b.spaces.before=v.slice(0,v.length-1)}else if(B.startsWith(" ")&&v.startsWith(" ")){d.after=B.slice(1);b.spaces.after=v.slice(1)}else{b.value=v}f=new F.default({value:" ",source:getTokenSourceSpan(a,this.tokens[this.position-1]),sourceIndex:a[N.FIELDS.START_POS],spaces:d,raws:b})}if(this.currToken&&this.currToken[N.FIELDS.TYPE]===q.space){f.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(f)};Parser.prototype.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var e=new B.default({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(e);this.current=e;this.position++};Parser.prototype.comment=function comment(){var e=this.currToken;this.newNode(new y.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.error=function error(e,r){throw this.root.error(e,r)};Parser.prototype.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[N.FIELDS.START_POS]})};Parser.prototype.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[N.FIELDS.START_POS])};Parser.prototype.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[N.FIELDS.START_POS])};Parser.prototype.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[N.FIELDS.START_POS])};Parser.prototype.namespace=function namespace(){var e=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[N.FIELDS.TYPE]===q.word){this.position++;return this.word(e)}else if(this.nextToken[N.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(e)}};Parser.prototype.nesting=function nesting(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var r=this.currToken;this.newNode(new j.default({value:this.content(),source:getTokenSource(r),sourceIndex:r[N.FIELDS.START_POS]}));this.position++};Parser.prototype.parentheses=function parentheses(){var e=this.current.last;var r=1;this.position++;if(e&&e.type===J.PSEUDO){var t=new B.default({source:{start:tokenStart(this.tokens[this.position-1])}});var n=this.current;e.append(t);this.current=t;while(this.position1&&e.nextToken&&e.nextToken[N.FIELDS.TYPE]===q.openParenthesis){e.error("Misplaced parenthesis.",{index:e.nextToken[N.FIELDS.START_POS]})}})}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[N.FIELDS.START_POS])}};Parser.prototype.space=function space(){var e=this.content();if(this.position===0||this.prevToken[N.FIELDS.TYPE]===q.comma||this.prevToken[N.FIELDS.TYPE]===q.openParenthesis){this.spaces=this.optionalSpace(e);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[N.FIELDS.TYPE]===q.comma||this.nextToken[N.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(e);this.position++}else{this.combinator()}};Parser.prototype.string=function string(){var e=this.currToken;this.newNode(new O.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.universal=function universal(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}var t=this.currToken;this.newNode(new A.default({value:this.content(),source:getTokenSource(t),sourceIndex:t[N.FIELDS.START_POS]}),e);this.position++};Parser.prototype.splitWord=function splitWord(e,r){var t=this;var n=this.nextToken;var i=this.content();while(n&&~[q.dollar,q.caret,q.equals,q.word].indexOf(n[N.FIELDS.TYPE])){this.position++;var o=this.content();i+=o;if(o.lastIndexOf("\\")===o.length-1){var s=this.nextToken;if(s&&s[N.FIELDS.TYPE]===q.space){i+=this.requiredSpace(this.content(s));this.position++}}n=this.nextToken}var a=(0,u.default)(i,".").filter(function(e){return i[e-1]!=="\\"});var f=(0,u.default)(i,"#");var l=(0,u.default)(i,"#{");if(l.length){f=f.filter(function(e){return!~l.indexOf(e)})}var p=(0,M.default)((0,c.default)([0].concat(a,f)));p.forEach(function(n,o){var s=p[o+1]||i.length;var u=i.slice(n,s);if(o===0&&r){return r.call(t,u,p.length)}var c=void 0;var l=t.currToken;var h=l[N.FIELDS.START_POS]+p[o];var B=getSource(l[1],l[2]+n,l[3],l[2]+(s-1));if(~a.indexOf(n)){var v={value:u.slice(1),source:B,sourceIndex:h};c=new d.default(unescapeProp(v,"value"))}else if(~f.indexOf(n)){var b={value:u.slice(1),source:B,sourceIndex:h};c=new m.default(unescapeProp(b,"value"))}else{var y={value:u,source:B,sourceIndex:h};unescapeProp(y,"value");c=new w.default(y)}t.newNode(c,e);e=null});this.position++};Parser.prototype.word=function word(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}return this.splitWord(e)};Parser.prototype.loop=function loop(){while(this.position0&&arguments[0]!==undefined?arguments[0]:this.currToken;return this.css.slice(e[N.FIELDS.START_POS],e[N.FIELDS.END_POS])};Parser.prototype.locateNextMeaningfulToken=function locateNextMeaningfulToken(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position+1;var r=e;while(r{"use strict";r.__esModule=true;var n=t(1387);var i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=function(){function Processor(e,r){_classCallCheck(this,Processor);this.func=e||function noop(){};this.funcRes=null;this.options=r}Processor.prototype._shouldUpdateSelector=function _shouldUpdateSelector(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=Object.assign({},this.options,r);if(t.updateSelector===false){return false}else{return typeof e!=="string"}};Processor.prototype._isLossy=function _isLossy(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=Object.assign({},this.options,e);if(r.lossless===false){return true}else{return false}};Processor.prototype._root=function _root(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=new i.default(e,this._parseOptions(r));return t.root};Processor.prototype._parseOptions=function _parseOptions(e){return{lossy:this._isLossy(e)}};Processor.prototype._run=function _run(e){var r=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new Promise(function(n,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(n){var i=undefined;if(r._shouldUpdateSelector(e,t)){i=o.toString();e.selector=i}return{transform:n,root:o,string:i}}).then(n,i)}catch(e){i(e);return}})};Processor.prototype._runSync=function _runSync(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=this._root(e,r);var n=this.func(t);if(n&&typeof n.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var i=undefined;if(r.updateSelector&&typeof e!=="string"){i=t.toString();e.selector=i}return{transform:n,root:t,string:i}};Processor.prototype.ast=function ast(e,r){return this._run(e,r).then(function(e){return e.root})};Processor.prototype.astSync=function astSync(e,r){return this._runSync(e,r).root};Processor.prototype.transform=function transform(e,r){return this._run(e,r).then(function(e){return e.transform})};Processor.prototype.transformSync=function transformSync(e,r){return this._runSync(e,r).transform};Processor.prototype.process=function process(e,r){return this._run(e,r).then(function(e){return e.string||e.root.toString()})};Processor.prototype.processSync=function processSync(e,r){var t=this._runSync(e,r);return t.string||t.root.toString()};return Processor}();r.default=o;e.exports=r["default"]},3982:(e,r,t)=>{"use strict";r.__esModule=true;var n;var i=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Attribute);var t=_possibleConstructorReturn(this,e.call(this,handleDeprecatedContructorOpts(r)));t.type=l.ATTRIBUTE;t.raws=t.raws||{};Object.defineProperty(t.raws,"unquoted",{get:h(function(){return t.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:h(function(){return t.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")});t._constructed=true;return t}Attribute.prototype.getQuotedValue=function getQuotedValue(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=this._determineQuoteMark(e);var t=g[r];var n=(0,s.default)(this._value,t);return n};Attribute.prototype._determineQuoteMark=function _determineQuoteMark(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)};Attribute.prototype.setValue=function setValue(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this._value=e;this._quoteMark=this._determineQuoteMark(r);this._syncRawValue()};Attribute.prototype.smartQuoteMark=function smartQuoteMark(e){var r=this.value;var t=r.replace(/[^']/g,"").length;var n=r.replace(/[^"]/g,"").length;if(t+n===0){var i=(0,s.default)(r,{isIdentifier:true});if(i===r){return Attribute.NO_QUOTE}else{var o=this.preferredQuoteMark(e);if(o===Attribute.NO_QUOTE){var a=this.quoteMark||e.quoteMark||Attribute.DOUBLE_QUOTE;var u=g[a];var f=(0,s.default)(r,u);if(f.length1&&arguments[1]!==undefined?arguments[1]:e;var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:defaultAttrConcat;var n=this._spacesFor(r);return t(this.stringifyProperty(e),n)};Attribute.prototype.offsetOf=function offsetOf(e){var r=1;var t=this._spacesFor("attribute");r+=t.before.length;if(e==="namespace"||e==="ns"){return this.namespace?r:-1}if(e==="attributeNS"){return r}r+=this.namespaceString.length;if(this.namespace){r+=1}if(e==="attribute"){return r}r+=this.stringifyProperty("attribute").length;r+=t.after.length;var n=this._spacesFor("operator");r+=n.before.length;var i=this.stringifyProperty("operator");if(e==="operator"){return i?r:-1}r+=i.length;r+=n.after.length;var o=this._spacesFor("value");r+=o.before.length;var s=this.stringifyProperty("value");if(e==="value"){return s?r:-1}r+=s.length;r+=o.after.length;var a=this._spacesFor("insensitive");r+=a.before.length;if(e==="insensitive"){return this.insensitive?r:-1}return-1};Attribute.prototype.toString=function toString(){var e=this;var r=[this.rawSpaceBefore,"["];r.push(this._stringFor("qualifiedAttribute","attribute"));if(this.operator&&this.value){r.push(this._stringFor("operator"));r.push(this._stringFor("value"));r.push(this._stringFor("insensitiveFlag","insensitive",function(r,t){if(r.length>0&&!e.quoted&&t.before.length===0&&!(e.spaces.value&&e.spaces.value.after)){t.before=" "}return defaultAttrConcat(r,t)}))}r.push("]");r.push(this.rawSpaceAfter);return r.join("")};i(Attribute,[{key:"quoted",get:function get(){var e=this.quoteMark;return e==="'"||e==='"'},set:function set(e){d()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(e){if(!this._constructed){this._quoteMark=e;return}if(this._quoteMark!==e){this._quoteMark=e;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(e){if(this._constructed){var r=unescapeValue(e),t=r.deprecatedUsage,n=r.unescaped,i=r.quoteMark;if(t){v()}if(n===this._value&&i===this._quoteMark){return}this._value=n;this._quoteMark=i;this._syncRawValue()}else{this._value=e}}},{key:"attribute",get:function get(){return this._attribute},set:function set(e){this._handleEscapes("attribute",e);this._attribute=e}}]);return Attribute}(c.default);y.NO_QUOTE=null;y.SINGLE_QUOTE="'";y.DOUBLE_QUOTE='"';r.default=y;var g=(n={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},n[null]={isIdentifier:true},n);function defaultAttrConcat(e,r){return""+r.before+e+r.after}},3687:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(917);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Combinator,e);function Combinator(r){_classCallCheck(this,Combinator);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMBINATOR;return t}return Combinator}(i.default);r.default=s;e.exports=r["default"]},9211:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(917);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Comment,e);function Comment(r){_classCallCheck(this,Comment);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMMENT;return t}return Comment}(i.default);r.default=s;e.exports=r["default"]},5420:(e,r,t)=>{"use strict";r.__esModule=true;r.universal=r.tag=r.string=r.selector=r.root=r.pseudo=r.nesting=r.id=r.comment=r.combinator=r.className=r.attribute=undefined;var n=t(3982);var i=_interopRequireDefault(n);var o=t(3687);var s=_interopRequireDefault(o);var a=t(4274);var u=_interopRequireDefault(a);var f=t(9211);var c=_interopRequireDefault(f);var l=t(7732);var p=_interopRequireDefault(l);var h=t(3589);var B=_interopRequireDefault(h);var v=t(1692);var d=_interopRequireDefault(v);var b=t(6522);var y=_interopRequireDefault(b);var g=t(3390);var m=_interopRequireDefault(g);var C=t(1989);var w=_interopRequireDefault(C);var S=t(5535);var O=_interopRequireDefault(S);var T=t(9479);var E=_interopRequireDefault(T);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var k=r.attribute=function attribute(e){return new i.default(e)};var P=r.className=function className(e){return new s.default(e)};var D=r.combinator=function combinator(e){return new u.default(e)};var A=r.comment=function comment(e){return new c.default(e)};var R=r.id=function id(e){return new p.default(e)};var F=r.nesting=function nesting(e){return new B.default(e)};var x=r.pseudo=function pseudo(e){return new d.default(e)};var j=r.root=function root(e){return new y.default(e)};var I=r.selector=function selector(e){return new m.default(e)};var M=r.string=function string(e){return new w.default(e)};var N=r.tag=function tag(e){return new O.default(e)};var _=r.universal=function universal(e){return new E.default(e)}},8541:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t=e){this.indexes[t]=r-1}}return this};Container.prototype.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};Container.prototype.empty=function empty(){return this.removeAll()};Container.prototype.insertAfter=function insertAfter(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t+1,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(t<=n){this.indexes[i]=n+1}}return this};Container.prototype.insertBefore=function insertBefore(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(n<=t){this.indexes[i]=n+1}}return this};Container.prototype._findChildAtPosition=function _findChildAtPosition(e,r){var t=undefined;this.each(function(n){if(n.atPosition){var i=n.atPosition(e,r);if(i){t=i;return false}}else if(n.isAtPosition(e,r)){t=n;return false}});return t};Container.prototype.atPosition=function atPosition(e,r){if(this.isAtPosition(e,r)){return this._findChildAtPosition(e,r)||this}else{return undefined}};Container.prototype._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};Container.prototype.each=function each(e){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var r=this.lastEach;this.indexes[r]=0;if(!this.length){return undefined}var t=void 0,n=void 0;while(this.indexes[r]{"use strict";r.__esModule=true;r.isUniversal=r.isTag=r.isString=r.isSelector=r.isRoot=r.isPseudo=r.isNesting=r.isIdentifier=r.isComment=r.isCombinator=r.isClassName=r.isAttribute=undefined;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i;r.isNode=isNode;r.isPseudoElement=isPseudoElement;r.isPseudoClass=isPseudoClass;r.isContainer=isContainer;r.isNamespace=isNamespace;var o=t(9151);var s=(i={},i[o.ATTRIBUTE]=true,i[o.CLASS]=true,i[o.COMBINATOR]=true,i[o.COMMENT]=true,i[o.ID]=true,i[o.NESTING]=true,i[o.PSEUDO]=true,i[o.ROOT]=true,i[o.SELECTOR]=true,i[o.STRING]=true,i[o.TAG]=true,i[o.UNIVERSAL]=true,i);function isNode(e){return(typeof e==="undefined"?"undefined":n(e))==="object"&&s[e.type]}function isNodeType(e,r){return isNode(r)&&r.type===e}var a=r.isAttribute=isNodeType.bind(null,o.ATTRIBUTE);var u=r.isClassName=isNodeType.bind(null,o.CLASS);var f=r.isCombinator=isNodeType.bind(null,o.COMBINATOR);var c=r.isComment=isNodeType.bind(null,o.COMMENT);var l=r.isIdentifier=isNodeType.bind(null,o.ID);var p=r.isNesting=isNodeType.bind(null,o.NESTING);var h=r.isPseudo=isNodeType.bind(null,o.PSEUDO);var B=r.isRoot=isNodeType.bind(null,o.ROOT);var v=r.isSelector=isNodeType.bind(null,o.SELECTOR);var d=r.isString=isNodeType.bind(null,o.STRING);var b=r.isTag=isNodeType.bind(null,o.TAG);var y=r.isUniversal=isNodeType.bind(null,o.UNIVERSAL);function isPseudoElement(e){return h(e)&&e.value&&(e.value.startsWith("::")||e.value===":before"||e.value===":after")}function isPseudoClass(e){return h(e)&&!isPseudoElement(e)}function isContainer(e){return!!(isNode(e)&&e.walk)}function isNamespace(e){return a(e)||b(e)}},7732:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(917);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(ID,e);function ID(r){_classCallCheck(this,ID);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.ID;return t}ID.prototype.toString=function toString(){return[this.rawSpaceBefore,String("#"+this.stringifyProperty("value")),this.rawSpaceAfter].join("")};return ID}(i.default);r.default=s;e.exports=r["default"]},2341:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(9151);Object.keys(n).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return n[e]}})});var i=t(5420);Object.keys(i).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return i[e]}})});var o=t(8526);Object.keys(o).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return o[e]}})})},6512:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(917);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Nesting,e);function Nesting(r){_classCallCheck(this,Nesting);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.NESTING;t.value="&";return t}return Nesting}(i.default);r.default=s;e.exports=r["default"]},917:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Node);Object.assign(this,e);this.spaces=this.spaces||{};this.spaces.before=this.spaces.before||"";this.spaces.after=this.spaces.after||""}Node.prototype.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};Node.prototype.replaceWith=function replaceWith(){if(this.parent){for(var e in arguments){this.parent.insertBefore(this,arguments[e])}this.remove()}return this};Node.prototype.next=function next(){return this.parent.at(this.parent.index(this)+1)};Node.prototype.prev=function prev(){return this.parent.at(this.parent.index(this)-1)};Node.prototype.clone=function clone(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=s(this);for(var t in e){r[t]=e[t]}return r};Node.prototype.appendToPropertyAndEscape=function appendToPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}var n=this[e];var i=this.raws[e];this[e]=n+r;if(i||t!==r){this.raws[e]=(i||n)+t}else{delete this.raws[e]}};Node.prototype.setPropertyAndEscape=function setPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}this[e]=r;this.raws[e]=t};Node.prototype.setPropertyWithoutEscape=function setPropertyWithoutEscape(e,r){this[e]=r;if(this.raws){delete this.raws[e]}};Node.prototype.isAtPosition=function isAtPosition(e,r){if(this.source&&this.source.start&&this.source.end){if(this.source.start.line>e){return false}if(this.source.end.liner){return false}if(this.source.end.line===e&&this.source.end.column{"use strict";r.__esModule=true;var n=t(8541);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Pseudo,e);function Pseudo(r){_classCallCheck(this,Pseudo);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.PSEUDO;return t}Pseudo.prototype.toString=function toString(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")};return Pseudo}(i.default);r.default=s;e.exports=r["default"]},6522:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(8541);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Selector,e);function Selector(r){_classCallCheck(this,Selector);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.SELECTOR;return t}return Selector}(i.default);r.default=s;e.exports=r["default"]},1989:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(917);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(String,e);function String(r){_classCallCheck(this,String);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.STRING;return t}return String}(i.default);r.default=s;e.exports=r["default"]},5535:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(6512);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Tag,e);function Tag(r){_classCallCheck(this,Tag);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.TAG;return t}return Tag}(i.default);r.default=s;e.exports=r["default"]},9151:(e,r)=>{"use strict";r.__esModule=true;var t=r.TAG="tag";var n=r.STRING="string";var i=r.SELECTOR="selector";var o=r.ROOT="root";var s=r.PSEUDO="pseudo";var a=r.NESTING="nesting";var u=r.ID="id";var f=r.COMMENT="comment";var c=r.COMBINATOR="combinator";var l=r.CLASS="class";var p=r.ATTRIBUTE="attribute";var h=r.UNIVERSAL="universal"},9479:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(6512);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Universal,e);function Universal(r){_classCallCheck(this,Universal);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.UNIVERSAL;t.value="*";return t}return Universal}(i.default);r.default=s;e.exports=r["default"]},7813:(e,r)=>{"use strict";r.__esModule=true;r.default=sortAscending;function sortAscending(e){return e.sort(function(e,r){return e-r})}e.exports=r["default"]},9676:(e,r)=>{"use strict";r.__esModule=true;var t=r.ampersand=38;var n=r.asterisk=42;var i=r.at=64;var o=r.comma=44;var s=r.colon=58;var a=r.semicolon=59;var u=r.openParenthesis=40;var f=r.closeParenthesis=41;var c=r.openSquare=91;var l=r.closeSquare=93;var p=r.dollar=36;var h=r.tilde=126;var B=r.caret=94;var v=r.plus=43;var d=r.equals=61;var b=r.pipe=124;var y=r.greaterThan=62;var g=r.space=32;var m=r.singleQuote=39;var C=r.doubleQuote=34;var w=r.slash=47;var S=r.bang=33;var O=r.backslash=92;var T=r.cr=13;var E=r.feed=12;var k=r.newline=10;var P=r.tab=9;var D=r.str=m;var A=r.comment=-1;var R=r.word=-2;var F=r.combinator=-3},7210:(e,r,t)=>{"use strict";r.__esModule=true;r.FIELDS=undefined;var n,i;r.default=tokenize;var o=t(9676);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}var a=(n={},n[s.tab]=true,n[s.newline]=true,n[s.cr]=true,n[s.feed]=true,n);var u=(i={},i[s.space]=true,i[s.tab]=true,i[s.newline]=true,i[s.cr]=true,i[s.feed]=true,i[s.ampersand]=true,i[s.asterisk]=true,i[s.bang]=true,i[s.comma]=true,i[s.colon]=true,i[s.semicolon]=true,i[s.openParenthesis]=true,i[s.closeParenthesis]=true,i[s.openSquare]=true,i[s.closeSquare]=true,i[s.singleQuote]=true,i[s.doubleQuote]=true,i[s.plus]=true,i[s.pipe]=true,i[s.tilde]=true,i[s.greaterThan]=true,i[s.equals]=true,i[s.dollar]=true,i[s.caret]=true,i[s.slash]=true,i);var f={};var c="0123456789abcdefABCDEF";for(var l=0;l0){g=a+d;m=y-b[d].length}else{g=a;m=o}w=s.comment;a=g;h=g;p=y-m}else if(c===s.slash){y=u;w=c;h=a;p=u-o;f=y+1}else{y=consumeWord(t,u);w=s.word;h=a;p=y-o}f=y+1;break}r.push([w,a,u-o,h,p,u,f]);if(m){o=m;m=null}u=f}return r}},560:(e,r)=>{"use strict";r.__esModule=true;r.default=ensureObject;function ensureObject(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){e[i]={}}e=e[i]}}e.exports=r["default"]},456:(e,r)=>{"use strict";r.__esModule=true;r.default=getProp;function getProp(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){return undefined}e=e[i]}return e}e.exports=r["default"]},2196:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3806);Object.defineProperty(r,"unesc",{enumerable:true,get:function get(){return _interopRequireDefault(n).default}});var i=t(456);Object.defineProperty(r,"getProp",{enumerable:true,get:function get(){return _interopRequireDefault(i).default}});var o=t(560);Object.defineProperty(r,"ensureObject",{enumerable:true,get:function get(){return _interopRequireDefault(o).default}});var s=t(7012);Object.defineProperty(r,"stripComments",{enumerable:true,get:function get(){return _interopRequireDefault(s).default}});function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},7012:(e,r)=>{"use strict";r.__esModule=true;r.default=stripComments;function stripComments(e){var r="";var t=e.indexOf("/*");var n=0;while(t>=0){r=r+e.slice(n,t);var i=e.indexOf("*/",t+2);if(i<0){return r}n=i+2;t=e.indexOf("/*",n)}r=r+e.slice(n);return r}e.exports=r["default"]},3806:(e,r)=>{"use strict";r.__esModule=true;r.default=unesc;var t=/\\(?:([0-9a-fA-F]{6})|([0-9a-fA-F]{1,5})(?: |(?![0-9a-fA-F])))/g;var n=/\\(.)/g;function unesc(e){e=e.replace(t,function(e,r,t){var n=r||t;var i=parseInt(n,16);return String.fromCharCode(i)});e=e.replace(n,function(e,r){return r});return e}e.exports=r["default"]},3650:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9182));var o=n.plugin("postcss-dir-pseudo-class",e=>{const r=Object(e).dir;const t=Boolean(Object(e).preserve);return e=>{e.walkRules(/:dir\([^\)]*\)/,e=>{let n=e;if(t){n=e.cloneBefore()}n.selector=i(e=>{e.nodes.forEach(e=>{e.walk(t=>{if("pseudo"===t.type&&":dir"===t.value){const n=t.prev();const o=t.next();const s=n&&n.type&&"combinator"===n.type&&" "===n.value;const a=o&&o.type&&"combinator"===o.type&&" "===o.value;if(s&&(a||!o)){t.replaceWith(i.universal())}else{t.remove()}const u=e.nodes[0];const f=u&&"combinator"===u.type&&" "===u.value;const c=u&&"tag"===u.type&&"html"===u.value;const l=u&&"pseudo"===u.type&&":root"===u.value;if(u&&!c&&!l&&!f){e.prepend(i.combinator({value:" "}))}const p=t.nodes.toString();const h=r===p;const B=i.attribute({attribute:"dir",operator:"=",quoteMark:'"',value:`"${p}"`});const v=i.pseudo({value:`${c||l?"":"html"}:not`});v.append(i.attribute({attribute:"dir",operator:"=",quoteMark:'"',value:`"${"ltr"===p?"rtl":"ltr"}"`}));if(h){if(c){e.insertAfter(u,v)}else{e.prepend(v)}}else if(c){e.insertAfter(u,B)}else{e.prepend(B)}}})})}).processSync(n.selector)})}});e.exports=o},3730:e=>{"use strict";var r={};var t=r.hasOwnProperty;var n=function merge(e,r){if(!e){return r}var n={};for(var i in r){n[i]=t.call(e,i)?e[i]:r[i]}return n};var i=/[ -,\.\/;-@\[-\^`\{-~]/;var o=/[ -,\.\/;-@\[\]\^`\{-~]/;var s=/['"\\]/;var a=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var u=function cssesc(e,r){r=n(r,cssesc.options);if(r.quotes!="single"&&r.quotes!="double"){r.quotes="single"}var t=r.quotes=="double"?'"':"'";var s=r.isIdentifier;var u=e.charAt(0);var f="";var c=0;var l=e.length;while(c126){if(h>=55296&&h<=56319&&c{"use strict";r.__esModule=true;var n=t(7274);var i=_interopRequireDefault(n);var o=t(3639);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=function parser(e){return new i.default(e)};Object.assign(a,s);delete a.__esModule;r.default=a;e.exports=r["default"]},1927:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parser);this.rule=e;this.options=Object.assign({lossy:false,safe:false},r);this.position=0;this.css=typeof this.rule==="string"?this.rule:this.rule.selector;this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var t=getTokenSourceSpan(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new p.default({source:t});this.root.errorGenerator=this._errorGenerator();var n=new B.default({source:{start:{line:1,column:1}}});this.root.append(n);this.current=n;this.loop()}Parser.prototype._errorGenerator=function _errorGenerator(){var e=this;return function(r,t){if(typeof e.rule==="string"){return new Error(r)}return e.rule.error(r,t)}};Parser.prototype.attribute=function attribute(){var e=[];var r=this.currToken;this.position++;while(this.position1&&arguments[1]!==undefined?arguments[1]:false;var n="";var i="";e.forEach(function(e){var o=r.lossySpace(e.spaces.before,t);var s=r.lossySpace(e.rawSpaceBefore,t);n+=o+r.lossySpace(e.spaces.after,t&&o.length===0);i+=o+e.value+r.lossySpace(e.rawSpaceAfter,t&&s.length===0)});if(i===n){i=undefined}var o={space:n,rawSpace:i};return o};Parser.prototype.isNamedCombinator=function isNamedCombinator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position;return this.tokens[e+0]&&this.tokens[e+0][N.FIELDS.TYPE]===q.slash&&this.tokens[e+1]&&this.tokens[e+1][N.FIELDS.TYPE]===q.word&&this.tokens[e+2]&&this.tokens[e+2][N.FIELDS.TYPE]===q.slash};Parser.prototype.namedCombinator=function namedCombinator(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]);var r=(0,U.unesc)(e).toLowerCase();var t={};if(r!==e){t.value="/"+e+"/"}var n=new F.default({value:"/"+r+"/",source:getSource(this.currToken[N.FIELDS.START_LINE],this.currToken[N.FIELDS.START_COL],this.tokens[this.position+2][N.FIELDS.END_LINE],this.tokens[this.position+2][N.FIELDS.END_COL]),sourceIndex:this.currToken[N.FIELDS.START_POS],raws:t});this.position=this.position+3;return n}else{this.unexpected()}};Parser.prototype.combinator=function combinator(){var e=this;if(this.content()==="|"){return this.namespace()}var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][N.FIELDS.TYPE]===q.comma){var t=this.parseWhitespaceEquivalentTokens(r);if(t.length>0){var n=this.current.last;if(n){var i=this.convertWhitespaceNodesToSpace(t),o=i.space,s=i.rawSpace;if(s!==undefined){n.rawSpaceAfter+=s}n.spaces.after+=o}else{t.forEach(function(r){return e.newNode(r)})}}return}var a=this.currToken;var u=undefined;if(r>this.position){u=this.parseWhitespaceEquivalentTokens(r)}var f=void 0;if(this.isNamedCombinator()){f=this.namedCombinator()}else if(this.currToken[N.FIELDS.TYPE]===q.combinator){f=new F.default({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[N.FIELDS.START_POS]});this.position++}else if(H[this.currToken[N.FIELDS.TYPE]]){}else if(!u){this.unexpected()}if(f){if(u){var c=this.convertWhitespaceNodesToSpace(u),l=c.space,p=c.rawSpace;f.spaces.before=l;f.rawSpaceBefore=p}}else{var h=this.convertWhitespaceNodesToSpace(u,true),B=h.space,v=h.rawSpace;if(!v){v=B}var d={};var b={spaces:{}};if(B.endsWith(" ")&&v.endsWith(" ")){d.before=B.slice(0,B.length-1);b.spaces.before=v.slice(0,v.length-1)}else if(B.startsWith(" ")&&v.startsWith(" ")){d.after=B.slice(1);b.spaces.after=v.slice(1)}else{b.value=v}f=new F.default({value:" ",source:getTokenSourceSpan(a,this.tokens[this.position-1]),sourceIndex:a[N.FIELDS.START_POS],spaces:d,raws:b})}if(this.currToken&&this.currToken[N.FIELDS.TYPE]===q.space){f.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(f)};Parser.prototype.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var e=new B.default({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(e);this.current=e;this.position++};Parser.prototype.comment=function comment(){var e=this.currToken;this.newNode(new y.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.error=function error(e,r){throw this.root.error(e,r)};Parser.prototype.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[N.FIELDS.START_POS]})};Parser.prototype.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[N.FIELDS.START_POS])};Parser.prototype.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[N.FIELDS.START_POS])};Parser.prototype.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[N.FIELDS.START_POS])};Parser.prototype.namespace=function namespace(){var e=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[N.FIELDS.TYPE]===q.word){this.position++;return this.word(e)}else if(this.nextToken[N.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(e)}};Parser.prototype.nesting=function nesting(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var r=this.currToken;this.newNode(new j.default({value:this.content(),source:getTokenSource(r),sourceIndex:r[N.FIELDS.START_POS]}));this.position++};Parser.prototype.parentheses=function parentheses(){var e=this.current.last;var r=1;this.position++;if(e&&e.type===J.PSEUDO){var t=new B.default({source:{start:tokenStart(this.tokens[this.position-1])}});var n=this.current;e.append(t);this.current=t;while(this.position1&&e.nextToken&&e.nextToken[N.FIELDS.TYPE]===q.openParenthesis){e.error("Misplaced parenthesis.",{index:e.nextToken[N.FIELDS.START_POS]})}})}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[N.FIELDS.START_POS])}};Parser.prototype.space=function space(){var e=this.content();if(this.position===0||this.prevToken[N.FIELDS.TYPE]===q.comma||this.prevToken[N.FIELDS.TYPE]===q.openParenthesis){this.spaces=this.optionalSpace(e);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[N.FIELDS.TYPE]===q.comma||this.nextToken[N.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(e);this.position++}else{this.combinator()}};Parser.prototype.string=function string(){var e=this.currToken;this.newNode(new O.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.universal=function universal(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}var t=this.currToken;this.newNode(new A.default({value:this.content(),source:getTokenSource(t),sourceIndex:t[N.FIELDS.START_POS]}),e);this.position++};Parser.prototype.splitWord=function splitWord(e,r){var t=this;var n=this.nextToken;var i=this.content();while(n&&~[q.dollar,q.caret,q.equals,q.word].indexOf(n[N.FIELDS.TYPE])){this.position++;var o=this.content();i+=o;if(o.lastIndexOf("\\")===o.length-1){var s=this.nextToken;if(s&&s[N.FIELDS.TYPE]===q.space){i+=this.requiredSpace(this.content(s));this.position++}}n=this.nextToken}var a=(0,u.default)(i,".").filter(function(e){return i[e-1]!=="\\"});var f=(0,u.default)(i,"#");var l=(0,u.default)(i,"#{");if(l.length){f=f.filter(function(e){return!~l.indexOf(e)})}var p=(0,M.default)((0,c.default)([0].concat(a,f)));p.forEach(function(n,o){var s=p[o+1]||i.length;var u=i.slice(n,s);if(o===0&&r){return r.call(t,u,p.length)}var c=void 0;var l=t.currToken;var h=l[N.FIELDS.START_POS]+p[o];var B=getSource(l[1],l[2]+n,l[3],l[2]+(s-1));if(~a.indexOf(n)){var v={value:u.slice(1),source:B,sourceIndex:h};c=new d.default(unescapeProp(v,"value"))}else if(~f.indexOf(n)){var b={value:u.slice(1),source:B,sourceIndex:h};c=new m.default(unescapeProp(b,"value"))}else{var y={value:u,source:B,sourceIndex:h};unescapeProp(y,"value");c=new w.default(y)}t.newNode(c,e);e=null});this.position++};Parser.prototype.word=function word(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}return this.splitWord(e)};Parser.prototype.loop=function loop(){while(this.position0&&arguments[0]!==undefined?arguments[0]:this.currToken;return this.css.slice(e[N.FIELDS.START_POS],e[N.FIELDS.END_POS])};Parser.prototype.locateNextMeaningfulToken=function locateNextMeaningfulToken(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position+1;var r=e;while(r{"use strict";r.__esModule=true;var n=t(1927);var i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=function(){function Processor(e,r){_classCallCheck(this,Processor);this.func=e||function noop(){};this.funcRes=null;this.options=r}Processor.prototype._shouldUpdateSelector=function _shouldUpdateSelector(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=Object.assign({},this.options,r);if(t.updateSelector===false){return false}else{return typeof e!=="string"}};Processor.prototype._isLossy=function _isLossy(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=Object.assign({},this.options,e);if(r.lossless===false){return true}else{return false}};Processor.prototype._root=function _root(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=new i.default(e,this._parseOptions(r));return t.root};Processor.prototype._parseOptions=function _parseOptions(e){return{lossy:this._isLossy(e)}};Processor.prototype._run=function _run(e){var r=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new Promise(function(n,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(n){var i=undefined;if(r._shouldUpdateSelector(e,t)){i=o.toString();e.selector=i}return{transform:n,root:o,string:i}}).then(n,i)}catch(e){i(e);return}})};Processor.prototype._runSync=function _runSync(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=this._root(e,r);var n=this.func(t);if(n&&typeof n.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var i=undefined;if(r.updateSelector&&typeof e!=="string"){i=t.toString();e.selector=i}return{transform:n,root:t,string:i}};Processor.prototype.ast=function ast(e,r){return this._run(e,r).then(function(e){return e.root})};Processor.prototype.astSync=function astSync(e,r){return this._runSync(e,r).root};Processor.prototype.transform=function transform(e,r){return this._run(e,r).then(function(e){return e.transform})};Processor.prototype.transformSync=function transformSync(e,r){return this._runSync(e,r).transform};Processor.prototype.process=function process(e,r){return this._run(e,r).then(function(e){return e.string||e.root.toString()})};Processor.prototype.processSync=function processSync(e,r){var t=this._runSync(e,r);return t.string||t.root.toString()};return Processor}();r.default=o;e.exports=r["default"]},8067:(e,r,t)=>{"use strict";r.__esModule=true;var n;var i=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Attribute);var t=_possibleConstructorReturn(this,e.call(this,handleDeprecatedContructorOpts(r)));t.type=l.ATTRIBUTE;t.raws=t.raws||{};Object.defineProperty(t.raws,"unquoted",{get:h(function(){return t.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:h(function(){return t.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")});t._constructed=true;return t}Attribute.prototype.getQuotedValue=function getQuotedValue(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=this._determineQuoteMark(e);var t=g[r];var n=(0,s.default)(this._value,t);return n};Attribute.prototype._determineQuoteMark=function _determineQuoteMark(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)};Attribute.prototype.setValue=function setValue(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this._value=e;this._quoteMark=this._determineQuoteMark(r);this._syncRawValue()};Attribute.prototype.smartQuoteMark=function smartQuoteMark(e){var r=this.value;var t=r.replace(/[^']/g,"").length;var n=r.replace(/[^"]/g,"").length;if(t+n===0){var i=(0,s.default)(r,{isIdentifier:true});if(i===r){return Attribute.NO_QUOTE}else{var o=this.preferredQuoteMark(e);if(o===Attribute.NO_QUOTE){var a=this.quoteMark||e.quoteMark||Attribute.DOUBLE_QUOTE;var u=g[a];var f=(0,s.default)(r,u);if(f.length1&&arguments[1]!==undefined?arguments[1]:e;var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:defaultAttrConcat;var n=this._spacesFor(r);return t(this.stringifyProperty(e),n)};Attribute.prototype.offsetOf=function offsetOf(e){var r=1;var t=this._spacesFor("attribute");r+=t.before.length;if(e==="namespace"||e==="ns"){return this.namespace?r:-1}if(e==="attributeNS"){return r}r+=this.namespaceString.length;if(this.namespace){r+=1}if(e==="attribute"){return r}r+=this.stringifyProperty("attribute").length;r+=t.after.length;var n=this._spacesFor("operator");r+=n.before.length;var i=this.stringifyProperty("operator");if(e==="operator"){return i?r:-1}r+=i.length;r+=n.after.length;var o=this._spacesFor("value");r+=o.before.length;var s=this.stringifyProperty("value");if(e==="value"){return s?r:-1}r+=s.length;r+=o.after.length;var a=this._spacesFor("insensitive");r+=a.before.length;if(e==="insensitive"){return this.insensitive?r:-1}return-1};Attribute.prototype.toString=function toString(){var e=this;var r=[this.rawSpaceBefore,"["];r.push(this._stringFor("qualifiedAttribute","attribute"));if(this.operator&&this.value){r.push(this._stringFor("operator"));r.push(this._stringFor("value"));r.push(this._stringFor("insensitiveFlag","insensitive",function(r,t){if(r.length>0&&!e.quoted&&t.before.length===0&&!(e.spaces.value&&e.spaces.value.after)){t.before=" "}return defaultAttrConcat(r,t)}))}r.push("]");r.push(this.rawSpaceAfter);return r.join("")};i(Attribute,[{key:"quoted",get:function get(){var e=this.quoteMark;return e==="'"||e==='"'},set:function set(e){d()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(e){if(!this._constructed){this._quoteMark=e;return}if(this._quoteMark!==e){this._quoteMark=e;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(e){if(this._constructed){var r=unescapeValue(e),t=r.deprecatedUsage,n=r.unescaped,i=r.quoteMark;if(t){v()}if(n===this._value&&i===this._quoteMark){return}this._value=n;this._quoteMark=i;this._syncRawValue()}else{this._value=e}}},{key:"attribute",get:function get(){return this._attribute},set:function set(e){this._handleEscapes("attribute",e);this._attribute=e}}]);return Attribute}(c.default);y.NO_QUOTE=null;y.SINGLE_QUOTE="'";y.DOUBLE_QUOTE='"';r.default=y;var g=(n={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},n[null]={isIdentifier:true},n);function defaultAttrConcat(e,r){return""+r.before+e+r.after}},3198:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(4944);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Combinator,e);function Combinator(r){_classCallCheck(this,Combinator);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMBINATOR;return t}return Combinator}(i.default);r.default=s;e.exports=r["default"]},7517:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(4944);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Comment,e);function Comment(r){_classCallCheck(this,Comment);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMMENT;return t}return Comment}(i.default);r.default=s;e.exports=r["default"]},9338:(e,r,t)=>{"use strict";r.__esModule=true;r.universal=r.tag=r.string=r.selector=r.root=r.pseudo=r.nesting=r.id=r.comment=r.combinator=r.className=r.attribute=undefined;var n=t(8067);var i=_interopRequireDefault(n);var o=t(3198);var s=_interopRequireDefault(o);var a=t(6931);var u=_interopRequireDefault(a);var f=t(7517);var c=_interopRequireDefault(f);var l=t(1931);var p=_interopRequireDefault(l);var h=t(4712);var B=_interopRequireDefault(h);var v=t(7614);var d=_interopRequireDefault(v);var b=t(1026);var y=_interopRequireDefault(b);var g=t(5445);var m=_interopRequireDefault(g);var C=t(6959);var w=_interopRequireDefault(C);var S=t(5546);var O=_interopRequireDefault(S);var T=t(4411);var E=_interopRequireDefault(T);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var k=r.attribute=function attribute(e){return new i.default(e)};var P=r.className=function className(e){return new s.default(e)};var D=r.combinator=function combinator(e){return new u.default(e)};var A=r.comment=function comment(e){return new c.default(e)};var R=r.id=function id(e){return new p.default(e)};var F=r.nesting=function nesting(e){return new B.default(e)};var x=r.pseudo=function pseudo(e){return new d.default(e)};var j=r.root=function root(e){return new y.default(e)};var I=r.selector=function selector(e){return new m.default(e)};var M=r.string=function string(e){return new w.default(e)};var N=r.tag=function tag(e){return new O.default(e)};var _=r.universal=function universal(e){return new E.default(e)}},3130:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t=e){this.indexes[t]=r-1}}return this};Container.prototype.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};Container.prototype.empty=function empty(){return this.removeAll()};Container.prototype.insertAfter=function insertAfter(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t+1,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(t<=n){this.indexes[i]=n+1}}return this};Container.prototype.insertBefore=function insertBefore(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(n<=t){this.indexes[i]=n+1}}return this};Container.prototype._findChildAtPosition=function _findChildAtPosition(e,r){var t=undefined;this.each(function(n){if(n.atPosition){var i=n.atPosition(e,r);if(i){t=i;return false}}else if(n.isAtPosition(e,r)){t=n;return false}});return t};Container.prototype.atPosition=function atPosition(e,r){if(this.isAtPosition(e,r)){return this._findChildAtPosition(e,r)||this}else{return undefined}};Container.prototype._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};Container.prototype.each=function each(e){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var r=this.lastEach;this.indexes[r]=0;if(!this.length){return undefined}var t=void 0,n=void 0;while(this.indexes[r]{"use strict";r.__esModule=true;r.isUniversal=r.isTag=r.isString=r.isSelector=r.isRoot=r.isPseudo=r.isNesting=r.isIdentifier=r.isComment=r.isCombinator=r.isClassName=r.isAttribute=undefined;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i;r.isNode=isNode;r.isPseudoElement=isPseudoElement;r.isPseudoClass=isPseudoClass;r.isContainer=isContainer;r.isNamespace=isNamespace;var o=t(2958);var s=(i={},i[o.ATTRIBUTE]=true,i[o.CLASS]=true,i[o.COMBINATOR]=true,i[o.COMMENT]=true,i[o.ID]=true,i[o.NESTING]=true,i[o.PSEUDO]=true,i[o.ROOT]=true,i[o.SELECTOR]=true,i[o.STRING]=true,i[o.TAG]=true,i[o.UNIVERSAL]=true,i);function isNode(e){return(typeof e==="undefined"?"undefined":n(e))==="object"&&s[e.type]}function isNodeType(e,r){return isNode(r)&&r.type===e}var a=r.isAttribute=isNodeType.bind(null,o.ATTRIBUTE);var u=r.isClassName=isNodeType.bind(null,o.CLASS);var f=r.isCombinator=isNodeType.bind(null,o.COMBINATOR);var c=r.isComment=isNodeType.bind(null,o.COMMENT);var l=r.isIdentifier=isNodeType.bind(null,o.ID);var p=r.isNesting=isNodeType.bind(null,o.NESTING);var h=r.isPseudo=isNodeType.bind(null,o.PSEUDO);var B=r.isRoot=isNodeType.bind(null,o.ROOT);var v=r.isSelector=isNodeType.bind(null,o.SELECTOR);var d=r.isString=isNodeType.bind(null,o.STRING);var b=r.isTag=isNodeType.bind(null,o.TAG);var y=r.isUniversal=isNodeType.bind(null,o.UNIVERSAL);function isPseudoElement(e){return h(e)&&e.value&&(e.value.startsWith("::")||e.value===":before"||e.value===":after")}function isPseudoClass(e){return h(e)&&!isPseudoElement(e)}function isContainer(e){return!!(isNode(e)&&e.walk)}function isNamespace(e){return a(e)||b(e)}},1931:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(4944);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(ID,e);function ID(r){_classCallCheck(this,ID);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.ID;return t}ID.prototype.toString=function toString(){return[this.rawSpaceBefore,String("#"+this.stringifyProperty("value")),this.rawSpaceAfter].join("")};return ID}(i.default);r.default=s;e.exports=r["default"]},3639:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(2958);Object.keys(n).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return n[e]}})});var i=t(9338);Object.keys(i).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return i[e]}})});var o=t(6924);Object.keys(o).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return o[e]}})})},7264:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(4944);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Nesting,e);function Nesting(r){_classCallCheck(this,Nesting);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.NESTING;t.value="&";return t}return Nesting}(i.default);r.default=s;e.exports=r["default"]},4944:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Node);Object.assign(this,e);this.spaces=this.spaces||{};this.spaces.before=this.spaces.before||"";this.spaces.after=this.spaces.after||""}Node.prototype.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};Node.prototype.replaceWith=function replaceWith(){if(this.parent){for(var e in arguments){this.parent.insertBefore(this,arguments[e])}this.remove()}return this};Node.prototype.next=function next(){return this.parent.at(this.parent.index(this)+1)};Node.prototype.prev=function prev(){return this.parent.at(this.parent.index(this)-1)};Node.prototype.clone=function clone(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=s(this);for(var t in e){r[t]=e[t]}return r};Node.prototype.appendToPropertyAndEscape=function appendToPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}var n=this[e];var i=this.raws[e];this[e]=n+r;if(i||t!==r){this.raws[e]=(i||n)+t}else{delete this.raws[e]}};Node.prototype.setPropertyAndEscape=function setPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}this[e]=r;this.raws[e]=t};Node.prototype.setPropertyWithoutEscape=function setPropertyWithoutEscape(e,r){this[e]=r;if(this.raws){delete this.raws[e]}};Node.prototype.isAtPosition=function isAtPosition(e,r){if(this.source&&this.source.start&&this.source.end){if(this.source.start.line>e){return false}if(this.source.end.liner){return false}if(this.source.end.line===e&&this.source.end.column{"use strict";r.__esModule=true;var n=t(3130);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Pseudo,e);function Pseudo(r){_classCallCheck(this,Pseudo);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.PSEUDO;return t}Pseudo.prototype.toString=function toString(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")};return Pseudo}(i.default);r.default=s;e.exports=r["default"]},1026:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(3130);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Selector,e);function Selector(r){_classCallCheck(this,Selector);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.SELECTOR;return t}return Selector}(i.default);r.default=s;e.exports=r["default"]},6959:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(4944);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(String,e);function String(r){_classCallCheck(this,String);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.STRING;return t}return String}(i.default);r.default=s;e.exports=r["default"]},5546:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(7264);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Tag,e);function Tag(r){_classCallCheck(this,Tag);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.TAG;return t}return Tag}(i.default);r.default=s;e.exports=r["default"]},2958:(e,r)=>{"use strict";r.__esModule=true;var t=r.TAG="tag";var n=r.STRING="string";var i=r.SELECTOR="selector";var o=r.ROOT="root";var s=r.PSEUDO="pseudo";var a=r.NESTING="nesting";var u=r.ID="id";var f=r.COMMENT="comment";var c=r.COMBINATOR="combinator";var l=r.CLASS="class";var p=r.ATTRIBUTE="attribute";var h=r.UNIVERSAL="universal"},4411:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(7264);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Universal,e);function Universal(r){_classCallCheck(this,Universal);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.UNIVERSAL;t.value="*";return t}return Universal}(i.default);r.default=s;e.exports=r["default"]},9611:(e,r)=>{"use strict";r.__esModule=true;r.default=sortAscending;function sortAscending(e){return e.sort(function(e,r){return e-r})}e.exports=r["default"]},5791:(e,r)=>{"use strict";r.__esModule=true;var t=r.ampersand=38;var n=r.asterisk=42;var i=r.at=64;var o=r.comma=44;var s=r.colon=58;var a=r.semicolon=59;var u=r.openParenthesis=40;var f=r.closeParenthesis=41;var c=r.openSquare=91;var l=r.closeSquare=93;var p=r.dollar=36;var h=r.tilde=126;var B=r.caret=94;var v=r.plus=43;var d=r.equals=61;var b=r.pipe=124;var y=r.greaterThan=62;var g=r.space=32;var m=r.singleQuote=39;var C=r.doubleQuote=34;var w=r.slash=47;var S=r.bang=33;var O=r.backslash=92;var T=r.cr=13;var E=r.feed=12;var k=r.newline=10;var P=r.tab=9;var D=r.str=m;var A=r.comment=-1;var R=r.word=-2;var F=r.combinator=-3},26:(e,r,t)=>{"use strict";r.__esModule=true;r.FIELDS=undefined;var n,i;r.default=tokenize;var o=t(5791);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}var a=(n={},n[s.tab]=true,n[s.newline]=true,n[s.cr]=true,n[s.feed]=true,n);var u=(i={},i[s.space]=true,i[s.tab]=true,i[s.newline]=true,i[s.cr]=true,i[s.feed]=true,i[s.ampersand]=true,i[s.asterisk]=true,i[s.bang]=true,i[s.comma]=true,i[s.colon]=true,i[s.semicolon]=true,i[s.openParenthesis]=true,i[s.closeParenthesis]=true,i[s.openSquare]=true,i[s.closeSquare]=true,i[s.singleQuote]=true,i[s.doubleQuote]=true,i[s.plus]=true,i[s.pipe]=true,i[s.tilde]=true,i[s.greaterThan]=true,i[s.equals]=true,i[s.dollar]=true,i[s.caret]=true,i[s.slash]=true,i);var f={};var c="0123456789abcdefABCDEF";for(var l=0;l0){g=a+d;m=y-b[d].length}else{g=a;m=o}w=s.comment;a=g;h=g;p=y-m}else if(c===s.slash){y=u;w=c;h=a;p=u-o;f=y+1}else{y=consumeWord(t,u);w=s.word;h=a;p=y-o}f=y+1;break}r.push([w,a,u-o,h,p,u,f]);if(m){o=m;m=null}u=f}return r}},7315:(e,r)=>{"use strict";r.__esModule=true;r.default=ensureObject;function ensureObject(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){e[i]={}}e=e[i]}}e.exports=r["default"]},5558:(e,r)=>{"use strict";r.__esModule=true;r.default=getProp;function getProp(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){return undefined}e=e[i]}return e}e.exports=r["default"]},4225:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(310);Object.defineProperty(r,"unesc",{enumerable:true,get:function get(){return _interopRequireDefault(n).default}});var i=t(5558);Object.defineProperty(r,"getProp",{enumerable:true,get:function get(){return _interopRequireDefault(i).default}});var o=t(7315);Object.defineProperty(r,"ensureObject",{enumerable:true,get:function get(){return _interopRequireDefault(o).default}});var s=t(51);Object.defineProperty(r,"stripComments",{enumerable:true,get:function get(){return _interopRequireDefault(s).default}});function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},51:(e,r)=>{"use strict";r.__esModule=true;r.default=stripComments;function stripComments(e){var r="";var t=e.indexOf("/*");var n=0;while(t>=0){r=r+e.slice(n,t);var i=e.indexOf("*/",t+2);if(i<0){return r}n=i+2;t=e.indexOf("/*",n)}r=r+e.slice(n);return r}e.exports=r["default"]},310:(e,r)=>{"use strict";r.__esModule=true;r.default=unesc;var t=/\\(?:([0-9a-fA-F]{6})|([0-9a-fA-F]{1,5})(?: |(?![0-9a-fA-F])))/g;var n=/\\(.)/g;function unesc(e){e=e.replace(t,function(e,r,t){var n=r||t;var i=parseInt(n,16);return String.fromCharCode(i)});e=e.replace(n,function(e,r){return r});return e}e.exports=r["default"]},3030:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=n.plugin("postcss-double-position-gradients",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;return e=>{e.walkDecls(e=>{const t=e.value;if(s.test(t)){const n=i(t).parse();n.walkFunctionNodes(e=>{if(a.test(e.value)){const r=e.nodes.slice(1,-1);r.forEach((t,n)=>{const o=Object(r[n-1]);const s=Object(r[n-2]);const a=s.type&&o.type==="number"&&t.type==="number";if(a){const r=s.clone();const n=i.comma({value:",",raws:{after:" "}});e.insertBefore(t,n);e.insertBefore(t,r)}})}});const o=n.toString();if(t!==o){e.cloneBefore({value:o});if(!r){e.remove()}}}})}});const s=/(repeating-)?(conic|linear|radial)-gradient\([\W\w]*\)/i;const a=/^(repeating-)?(conic|linear|radial)-gradient$/i;e.exports=o},5538:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(9448));var i=_interopDefault(t(5747));var o=_interopDefault(t(5622));var s=_interopDefault(t(4633));function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}const a=/^--/;var u=e=>{const r=String(e.nodes.slice(1,-1));return a.test(r)?r:undefined};var f=(e,r)=>{const t=u(e);if(typeof t==="string"&&t in r){e.replaceWith(...c(r[t],e.raws.before))}};const c=(e,r)=>{const t=l(e,null);if(t[0]){t[0].raws.before=r}return t};const l=(e,r)=>e.map(e=>p(e,r));const p=(e,r)=>{const t=new e.constructor(e);for(const n in e){if(n==="parent"){t.parent=r}else if(Object(e[n]).constructor===Array){t[n]=l(e.nodes,t)}else if(Object(e[n]).constructor===Object){t[n]=Object.assign({},e[n])}}return t};var h=e=>e&&e.type==="func"&&e.value==="env";function walk(e,r){e.nodes.slice(0).forEach(e=>{if(e.nodes){walk(e,r)}if(h(e)){r(e)}})}var B=(e,r)=>{const t=n(e).parse();walk(t,e=>{f(e,r)});return String(t)};var v=e=>e&&e.type==="atrule";var d=e=>e&&e.type==="decl";var b=e=>v(e)&&e.params||d(e)&&e.value;function setSupportedValue(e,r){if(v(e)){e.params=r}if(d(e)){e.value=r}}function importEnvironmentVariablesFromObject(e){const r=Object.assign({},Object(e).environmentVariables||Object(e)["environment-variables"]);for(const e in r){r[e]=n(r[e]).parse().nodes}return r}function importEnvironmentVariablesFromJSONFile(e){return _importEnvironmentVariablesFromJSONFile.apply(this,arguments)}function _importEnvironmentVariablesFromJSONFile(){_importEnvironmentVariablesFromJSONFile=_asyncToGenerator(function*(e){const r=yield g(o.resolve(e));return importEnvironmentVariablesFromObject(r)});return _importEnvironmentVariablesFromJSONFile.apply(this,arguments)}function importEnvironmentVariablesFromJSFile(e){return _importEnvironmentVariablesFromJSFile.apply(this,arguments)}function _importEnvironmentVariablesFromJSFile(){_importEnvironmentVariablesFromJSFile=_asyncToGenerator(function*(e){const r=yield Promise.resolve(require(o.resolve(e)));return importEnvironmentVariablesFromObject(r)});return _importEnvironmentVariablesFromJSFile.apply(this,arguments)}function importEnvironmentVariablesFromSources(e){return e.map(e=>{if(e instanceof Promise){return e}else if(e instanceof Function){return e()}const r=e===Object(e)?e:{from:String(e)};if(r.environmentVariables||r["environment-variables"]){return r}const t=String(r.from||"");const n=(r.type||o.extname(t).slice(1)).toLowerCase();return{type:n,from:t}}).reduce(function(){var e=_asyncToGenerator(function*(e,r){const t=yield r,n=t.type,i=t.from;if(n==="js"){return Object.assign(e,yield importEnvironmentVariablesFromJSFile(i))}if(n==="json"){return Object.assign(e,yield importEnvironmentVariablesFromJSONFile(i))}return Object.assign(e,importEnvironmentVariablesFromObject(yield r))});return function(r,t){return e.apply(this,arguments)}}(),{})}const y=e=>new Promise((r,t)=>{i.readFile(e,"utf8",(e,n)=>{if(e){t(e)}else{r(n)}})});const g=function(){var e=_asyncToGenerator(function*(e){return JSON.parse(yield y(e))});return function readJSON(r){return e.apply(this,arguments)}}();var m=s.plugin("postcss-env-fn",e=>{const r=[].concat(Object(e).importFrom||[]);const t=importEnvironmentVariablesFromSources(r);return function(){var e=_asyncToGenerator(function*(e){const r=yield t;e.walk(e=>{const t=b(e);if(t){const n=B(t,r);if(n!==t){setSupportedValue(e,n)}}})});return function(r){return e.apply(this,arguments)}}()});e.exports=m},9642:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));const i=/:focus-visible([^\w-]|$)/gi;var o=n.plugin("postcss-focus-visible",e=>{const r=String(Object(e).replaceWith||".focus-visible");const t=Boolean("preserve"in Object(e)?e.preserve:true);return e=>{e.walkRules(i,e=>{const n=e.selector.replace(i,(e,t)=>{return`${r}${t}`});const o=e.clone({selector:n});if(t){e.before(o)}else{e.replaceWith(o)}})}});e.exports=o},8059:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));const i=/:focus-within([^\w-]|$)/gi;var o=n.plugin("postcss-focus-within",e=>{const r=String(Object(e).replaceWith||"[focus-within]");const t=Boolean("preserve"in Object(e)?e.preserve:true);return e=>{e.walkRules(i,e=>{const n=e.selector.replace(i,(e,t)=>{return`${r}${t}`});const o=e.clone({selector:n});if(t){e.before(o)}else{e.replaceWith(o)}})}});e.exports=o},3203:(e,r,t)=>{var n=t(4633);var i={"font-variant-ligatures":{"common-ligatures":'"liga", "clig"',"no-common-ligatures":'"liga", "clig off"',"discretionary-ligatures":'"dlig"',"no-discretionary-ligatures":'"dlig" off',"historical-ligatures":'"hlig"',"no-historical-ligatures":'"hlig" off',contextual:'"calt"',"no-contextual":'"calt" off'},"font-variant-position":{sub:'"subs"',super:'"sups"',normal:'"subs" off, "sups" off'},"font-variant-caps":{"small-caps":'"c2sc"',"all-small-caps":'"smcp", "c2sc"',"petite-caps":'"pcap"',"all-petite-caps":'"pcap", "c2pc"',unicase:'"unic"',"titling-caps":'"titl"'},"font-variant-numeric":{"lining-nums":'"lnum"',"oldstyle-nums":'"onum"',"proportional-nums":'"pnum"',"tabular-nums":'"tnum"',"diagonal-fractions":'"frac"',"stacked-fractions":'"afrc"',ordinal:'"ordn"',"slashed-zero":'"zero"'},"font-kerning":{normal:'"kern"',none:'"kern" off'},"font-variant":{normal:"normal",inherit:"inherit"}};for(var o in i){var s=i[o];for(var a in s){if(!(a in i["font-variant"])){i["font-variant"][a]=s[a]}}}function getFontFeatureSettingsPrevTo(e){var r=null;e.parent.walkDecls(function(e){if(e.prop==="font-feature-settings"){r=e}});if(r===null){r=e.clone();r.prop="font-feature-settings";r.value="";e.parent.insertBefore(e,r)}return r}e.exports=n.plugin("postcss-font-variant",function(){return function(e){e.walkRules(function(e){var r=null;e.walkDecls(function(e){if(!i[e.prop]){return null}var t=e.value;if(e.prop==="font-variant"){t=e.value.split(/\s+/g).map(function(e){return i["font-variant"][e]}).join(", ")}else if(i[e.prop][e.value]){t=i[e.prop][e.value]}if(r===null){r=getFontFeatureSettingsPrevTo(e)}if(r.value&&r.value!==t){r.value+=", "+t}else{r.value=t}})})}})},9547:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));const i=/^(column-gap|gap|row-gap)$/i;var o=n.plugin("postcss-gap-properties",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;return e=>{e.walkDecls(i,e=>{e.cloneBefore({prop:`grid-${e.prop}`});if(!r){e.remove()}})}});e.exports=o},4287:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=e=>Object(e).type==="comma";const s=/^(-webkit-)?image-set$/i;var a=e=>Object(e).type==="func"&&/^(cross-fade|image|(repeating-)?(conic|linear|radial)-gradient|url)$/i.test(e.value)&&!(e.parent.parent&&e.parent.parent.type==="func"&&s.test(e.parent.parent.value))?String(e):Object(e).type==="string"?e.value:false;const u={dpcm:2.54,dpi:1,dppx:96,x:96};var f=(e,r)=>{if(Object(e).type==="number"&&e.unit in u){const t=Number(e.value)*u[e.unit.toLowerCase()];const i=Math.floor(t/u.x*100)/100;if(t in r){return false}else{const e=r[t]=n.atRule({name:"media",params:`(-webkit-min-device-pixel-ratio: ${i}), (min-resolution: ${t}dpi)`});return e}}else{return false}};var c=(e,r,t)=>{if(e.oninvalid==="warn"){e.decl.warn(e.result,r,{word:String(t)})}else if(e.oninvalid==="throw"){throw e.decl.error(r,{word:String(t)})}};var l=(e,r,t)=>{const n=r.parent;const i={};let s=e.length;let u=-1;while(ue-r).map(e=>i[e]);if(l.length){const e=l[0].nodes[0].nodes[0];if(l.length===1){r.value=e.value}else{const i=n.nodes;const o=i.slice(0,i.indexOf(r)).concat(e);if(o.length){const e=n.cloneBefore().removeAll();e.append(o)}n.before(l.slice(1));if(!t.preserve){r.remove();if(!n.nodes.length){n.remove()}}}}};const p=/(^|[^\w-])(-webkit-)?image-set\(/;const h=/^(-webkit-)?image-set$/i;var B=n.plugin("postcss-image-set-function",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;const t="oninvalid"in Object(e)?e.oninvalid:"ignore";return(e,n)=>{e.walkDecls(e=>{const o=e.value;if(p.test(o)){const s=i(o).parse();s.walkType("func",i=>{if(h.test(i.value)){l(i.nodes.slice(1,-1),e,{decl:e,oninvalid:t,preserve:r,result:n})}})}})}});e.exports=B},7501:(e,r,t)=>{var n=t(4633);var i=t(7552);e.exports=n.plugin("postcss-initial",function(e){e=e||{};e.reset=e.reset||"all";e.replace=e.replace||false;var r=i(e.reset==="inherited");var t=function(e,r){var t=false;r.parent.walkDecls(function(e){if(e.prop===r.prop&&e.value!==r.value){t=true}});return t};return function(n){n.walkDecls(function(n){if(n.value.indexOf("initial")<0){return}var i=r(n.prop,n.value);if(i.length===0)return;i.forEach(function(e){if(!t(n.prop,n)){n.cloneBefore(e)}});if(e.replace===true){n.remove()}})}})},7552:(e,r,t)=>{var n=t(8589);var i=t(9614);function _getRulesMap(e){return e.filter(function(e){return!e.combined}).reduce(function(e,r){e[r.prop.replace(/\-/g,"")]=r.initial;return e},{})}function _compileDecls(e){var r=_getRulesMap(e);return e.map(function(e){if(e.combined&&e.initial){var t=n(e.initial.replace(/\-/g,""));e.initial=t(r)}return e})}function _getRequirements(e){return e.reduce(function(e,r){if(!r.contains)return e;return r.contains.reduce(function(e,t){e[t]=r;return e},e)},{})}function _expandContainments(e){var r=_getRequirements(e);return e.filter(function(e){return!e.contains}).map(function(e){var t=r[e.prop];if(t){e.requiredBy=t.prop;e.basic=e.basic||t.basic;e.inherited=e.inherited||t.inherited}return e})}var o=_expandContainments(_compileDecls(i));function _clearDecls(e,r){return e.map(function(e){return{prop:e.prop,value:r.replace(/initial/g,e.initial)}})}function _allDecls(e){return o.filter(function(r){var t=r.combined||r.basic;if(e)return t&&r.inherited;return t})}function _concreteDecl(e){return o.filter(function(r){return e===r.prop||e===r.requiredBy})}function makeFallbackFunction(e){return function(r,t){var n;if(r==="all"){n=_allDecls(e)}else{n=_concreteDecl(r)}return _clearDecls(n,t)}}e.exports=makeFallbackFunction},7972:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=t(4567);var i=_interopDefault(t(4633));var o=_interopDefault(t(9448));var s=i.plugin("postcss-lab-function",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):false;return e=>{e.walkDecls(e=>{const t=e.value;if(a.test(t)){const i=o(t).parse();i.walkType("func",e=>{if(u.test(e.value)){const r=e.nodes.slice(1,-1);const t=f.test(e.value);const i=c.test(e.value);const o=!i&&S(r);const s=!i&&O(r);const a=i&&T(r);if(o||s){e.value="rgb";const i=r[3];const o=r[4];if(o){if(y(o)&&!v(o)){o.unit="";o.value=String(o.value/100)}if(o.value==="1"){i.remove();o.remove()}else{e.value+="a"}}if(i&&g(i)){i.replaceWith(E())}const s=t?n.lab2rgb:n.lch2rgb;const a=s(...[r[0].value,r[1].value,r[2].value].map(e=>parseFloat(e))).map(e=>Math.max(Math.min(parseInt(e*2.55),255),0));r[0].value=String(a[0]);r[1].value=String(a[1]);r[2].value=String(a[2]);e.nodes.splice(3,0,[E()]);e.nodes.splice(2,0,[E()])}else if(a){e.value="rgb";const t=r[2];const i=n.lab2rgb(...[r[0].value,0,0].map(e=>parseFloat(e))).map(e=>Math.max(Math.min(parseInt(e*2.55),255),0));e.removeAll().append(P("(")).append(k(i[0])).append(E()).append(k(i[1])).append(E()).append(k(i[2])).append(P(")"));if(t){if(y(t)&&!v(t)){t.unit="";t.value=String(t.value/100)}if(t.value!=="1"){e.value+="a";e.insertBefore(e.last,E()).insertBefore(e.last,t)}}}}});const s=String(i);if(r){e.cloneBefore({value:s})}else{e.value=s}}})}});const a=/(^|[^\w-])(lab|lch|gray)\(/i;const u=/^(lab|lch|gray)$/i;const f=/^lab$/i;const c=/^gray$/i;const l=/^%?$/i;const p=/^calc$/i;const h=/^(deg|grad|rad|turn)?$/i;const B=e=>v(e)||e.type==="number"&&l.test(e.unit);const v=e=>e.type==="func"&&p.test(e.value);const d=e=>v(e)||e.type==="number"&&h.test(e.unit);const b=e=>v(e)||e.type==="number"&&e.unit==="";const y=e=>v(e)||e.type==="number"&&e.unit==="%";const g=e=>e.type==="operator"&&e.value==="/";const m=[b,b,b,g,B];const C=[b,b,d,g,B];const w=[b,g,B];const S=e=>e.every((e,r)=>typeof m[r]==="function"&&m[r](e));const O=e=>e.every((e,r)=>typeof C[r]==="function"&&C[r](e));const T=e=>e.every((e,r)=>typeof w[r]==="function"&&w[r](e));const E=()=>o.comma({value:","});const k=e=>o.number({value:e});const P=e=>o.paren({value:e});e.exports=s},562:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=(e,r)=>{const t=Object(e.parent).type==="rule"?e.parent.clone({raws:{}}).removeAll():n.rule({selector:"&"});t.selectors=t.selectors.map(e=>`${e}:dir(${r})`);return t};const o=/^\s*logical\s+/i;const s=/^border(-width|-style|-color)?$/i;const a=/^border-(block|block-start|block-end|inline|inline-start|inline-end|start|end)(-(width|style|color))?$/i;var u={border:(e,r,t)=>{const n=o.test(r[0]);if(n){r[0]=r[0].replace(o,"")}const a=[e.clone({prop:`border-top${e.prop.replace(s,"$1")}`,value:r[0]}),e.clone({prop:`border-left${e.prop.replace(s,"$1")}`,value:r[1]||r[0]}),e.clone({prop:`border-bottom${e.prop.replace(s,"$1")}`,value:r[2]||r[0]}),e.clone({prop:`border-right${e.prop.replace(s,"$1")}`,value:r[3]||r[1]||r[0]})];const u=[e.clone({prop:`border-top${e.prop.replace(s,"$1")}`,value:r[0]}),e.clone({prop:`border-right${e.prop.replace(s,"$1")}`,value:r[1]||r[0]}),e.clone({prop:`border-bottom${e.prop.replace(s,"$1")}`,value:r[2]||r[0]}),e.clone({prop:`border-left${e.prop.replace(s,"$1")}`,value:r[3]||r[1]||r[0]})];return n?1===r.length?e.clone({value:e.value.replace(o,"")}):!r[3]||r[3]===r[1]?[e.clone({prop:`border-top${e.prop.replace(s,"$1")}`,value:r[0]}),e.clone({prop:`border-right${e.prop.replace(s,"$1")}`,value:r[3]||r[1]||r[0]}),e.clone({prop:`border-bottom${e.prop.replace(s,"$1")}`,value:r[2]||r[0]}),e.clone({prop:`border-left${e.prop.replace(s,"$1")}`,value:r[1]||r[0]})]:"ltr"===t?a:"rtl"===t?u:[i(e,"ltr").append(a),i(e,"rtl").append(u)]:null},"border-block":(e,r)=>[e.clone({prop:`border-top${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-bottom${e.prop.replace(a,"$2")}`,value:r[0]})],"border-block-start":e=>{e.prop="border-top"},"border-block-end":e=>{e.prop="border-bottom"},"border-inline":(e,r,t)=>{const n=[e.clone({prop:`border-left${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-right${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];const o=[e.clone({prop:`border-right${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-left${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];const s=1===r.length||2===r.length&&r[0]===r[1];return s?n:"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"border-inline-start":(e,r,t)=>{const n=e.clone({prop:`border-left${e.prop.replace(a,"$2")}`});const o=e.clone({prop:`border-right${e.prop.replace(a,"$2")}`});return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"border-inline-end":(e,r,t)=>{const n=e.clone({prop:`border-right${e.prop.replace(a,"$2")}`});const o=e.clone({prop:`border-left${e.prop.replace(a,"$2")}`});return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"border-start":(e,r,t)=>{const n=[e.clone({prop:`border-top${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-left${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];const o=[e.clone({prop:`border-top${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-right${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"border-end":(e,r,t)=>{const n=[e.clone({prop:`border-bottom${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-right${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];const o=[e.clone({prop:`border-bottom${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-left${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]}};var f=(e,r,t)=>{const n=e.clone({value:"left"});const o=e.clone({value:"right"});return/^inline-start$/i.test(e.value)?"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]:/^inline-end$/i.test(e.value)?"ltr"===t?o:"rtl"===t?n:[i(e,"ltr").append(o),i(e,"rtl").append(n)]:null};var c=(e,r,t)=>{if("logical"!==r[0]){return[e.clone({prop:"top",value:r[0]}),e.clone({prop:"right",value:r[1]||r[0]}),e.clone({prop:"bottom",value:r[2]||r[0]}),e.clone({prop:"left",value:r[3]||r[1]||r[0]})]}const n=!r[4]||r[4]===r[2];const o=[e.clone({prop:"top",value:r[1]}),e.clone({prop:"left",value:r[2]||r[1]}),e.clone({prop:"bottom",value:r[3]||r[1]}),e.clone({prop:"right",value:r[4]||r[2]||r[1]})];const s=[e.clone({prop:"top",value:r[1]}),e.clone({prop:"right",value:r[2]||r[1]}),e.clone({prop:"bottom",value:r[3]||r[1]}),e.clone({prop:"left",value:r[4]||r[2]||r[1]})];return n||"ltr"===t?o:"rtl"===t?s:[i(e,"ltr").append(o),i(e,"rtl").append(s)]};var l=e=>/^block$/i.test(e.value)?e.clone({value:"vertical"}):/^inline$/i.test(e.value)?e.clone({value:"horizontal"}):null;var p=/^(inset|margin|padding)(?:-(block|block-start|block-end|inline|inline-start|inline-end|start|end))$/i;var h=/^inset-/i;var B=(e,r,t)=>e.clone({prop:`${e.prop.replace(p,"$1")}${r}`.replace(h,""),value:t});var v={block:(e,r)=>[B(e,"-top",r[0]),B(e,"-bottom",r[1]||r[0])],"block-start":e=>{e.prop=e.prop.replace(p,"$1-top").replace(h,"")},"block-end":e=>{e.prop=e.prop.replace(p,"$1-bottom").replace(h,"")},inline:(e,r,t)=>{const n=[B(e,"-left",r[0]),B(e,"-right",r[1]||r[0])];const o=[B(e,"-right",r[0]),B(e,"-left",r[1]||r[0])];const s=1===r.length||2===r.length&&r[0]===r[1];return s?n:"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"inline-start":(e,r,t)=>{const n=B(e,"-left",e.value);const o=B(e,"-right",e.value);return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"inline-end":(e,r,t)=>{const n=B(e,"-right",e.value);const o=B(e,"-left",e.value);return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},start:(e,r,t)=>{const n=[B(e,"-top",r[0]),B(e,"-left",r[1]||r[0])];const o=[B(e,"-top",r[0]),B(e,"-right",r[1]||r[0])];return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},end:(e,r,t)=>{const n=[B(e,"-bottom",r[0]),B(e,"-right",r[1]||r[0])];const o=[B(e,"-bottom",r[0]),B(e,"-left",r[1]||r[0])];return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]}};var d=/^(min-|max-)?(block|inline)-(size)$/i;var b=e=>{e.prop=e.prop.replace(d,(e,r,t)=>`${r||""}${"block"===t?"height":"width"}`)};var y=(e,r,t)=>{if("logical"!==r[0]){return null}const n=!r[4]||r[4]===r[2];const o=e.clone({value:[r[1],r[4]||r[2]||r[1],r[3]||r[1],r[2]||r[1]].join(" ")});const s=e.clone({value:[r[1],r[2]||r[1],r[3]||r[1],r[4]||r[2]||r[1]].join(" ")});return n?e.clone({value:e.value.replace(/^\s*logical\s+/i,"")}):"ltr"===t?o:"rtl"===t?s:[i(e,"ltr").append(o),i(e,"rtl").append(s)]};var g=(e,r,t)=>{const n=e.clone({value:"left"});const o=e.clone({value:"right"});return/^start$/i.test(e.value)?"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]:/^end$/i.test(e.value)?"ltr"===t?o:"rtl"===t?n:[i(e,"ltr").append(o),i(e,"rtl").append(n)]:null};function splitByComma(e,r){return splitByRegExp(e,/^,$/,r)}function splitBySpace(e,r){return splitByRegExp(e,/^\s$/,r)}function splitBySlash(e,r){return splitByRegExp(e,/^\/$/,r)}function splitByRegExp(e,r,t){const n=[];let i="";let o=false;let s=0;let a=-1;while(++a0){s-=1}}else if(s===0){if(r.test(u)){o=true}}if(o){if(!t||i.trim()){n.push(t?i.trim():i)}if(!t){n.push(u)}i="";o=false}else{i+=u}}if(i!==""){n.push(t?i.trim():i)}return n}var m=(e,r,t)=>{const n=[];const o=[];splitByComma(e.value).forEach(e=>{let r=false;splitBySpace(e).forEach((e,t,i)=>{if(e in C){r=true;C[e].ltr.forEach(e=>{const r=i.slice();r.splice(t,1,e);if(n.length&&!/^,$/.test(n[n.length-1])){n.push(",")}n.push(r.join(""))});C[e].rtl.forEach(e=>{const r=i.slice();r.splice(t,1,e);if(o.length&&!/^,$/.test(o[o.length-1])){o.push(",")}o.push(r.join(""))})}});if(!r){n.push(e);o.push(e)}});const s=e.clone({value:n.join("")});const a=e.clone({value:o.join("")});return n.length&&"ltr"===t?s:o.length&&"rtl"===t?a:s.value!==a.value?[i(e,"ltr").append(s),i(e,"rtl").append(a)]:null};const C={"border-block":{ltr:["border-top","border-bottom"],rtl:["border-top","border-bottom"]},"border-block-color":{ltr:["border-top-color","border-bottom-color"],rtl:["border-top-color","border-bottom-color"]},"border-block-end":{ltr:["border-bottom"],rtl:["border-bottom"]},"border-block-end-color":{ltr:["border-bottom-color"],rtl:["border-bottom-color"]},"border-block-end-style":{ltr:["border-bottom-style"],rtl:["border-bottom-style"]},"border-block-end-width":{ltr:["border-bottom-width"],rtl:["border-bottom-width"]},"border-block-start":{ltr:["border-top"],rtl:["border-top"]},"border-block-start-color":{ltr:["border-top-color"],rtl:["border-top-color"]},"border-block-start-style":{ltr:["border-top-style"],rtl:["border-top-style"]},"border-block-start-width":{ltr:["border-top-width"],rtl:["border-top-width"]},"border-block-style":{ltr:["border-top-style","border-bottom-style"],rtl:["border-top-style","border-bottom-style"]},"border-block-width":{ltr:["border-top-width","border-bottom-width"],rtl:["border-top-width","border-bottom-width"]},"border-end":{ltr:["border-bottom","border-right"],rtl:["border-bottom","border-left"]},"border-end-color":{ltr:["border-bottom-color","border-right-color"],rtl:["border-bottom-color","border-left-color"]},"border-end-style":{ltr:["border-bottom-style","border-right-style"],rtl:["border-bottom-style","border-left-style"]},"border-end-width":{ltr:["border-bottom-width","border-right-width"],rtl:["border-bottom-width","border-left-width"]},"border-inline":{ltr:["border-left","border-right"],rtl:["border-left","border-right"]},"border-inline-color":{ltr:["border-left-color","border-right-color"],rtl:["border-left-color","border-right-color"]},"border-inline-end":{ltr:["border-right"],rtl:["border-left"]},"border-inline-end-color":{ltr:["border-right-color"],rtl:["border-left-color"]},"border-inline-end-style":{ltr:["border-right-style"],rtl:["border-left-style"]},"border-inline-end-width":{ltr:["border-right-width"],rtl:["border-left-width"]},"border-inline-start":{ltr:["border-left"],rtl:["border-right"]},"border-inline-start-color":{ltr:["border-left-color"],rtl:["border-right-color"]},"border-inline-start-style":{ltr:["border-left-style"],rtl:["border-right-style"]},"border-inline-start-width":{ltr:["border-left-width"],rtl:["border-right-width"]},"border-inline-style":{ltr:["border-left-style","border-right-style"],rtl:["border-left-style","border-right-style"]},"border-inline-width":{ltr:["border-left-width","border-right-width"],rtl:["border-left-width","border-right-width"]},"border-start":{ltr:["border-top","border-left"],rtl:["border-top","border-right"]},"border-start-color":{ltr:["border-top-color","border-left-color"],rtl:["border-top-color","border-right-color"]},"border-start-style":{ltr:["border-top-style","border-left-style"],rtl:["border-top-style","border-right-style"]},"border-start-width":{ltr:["border-top-width","border-left-width"],rtl:["border-top-width","border-right-width"]},"block-size":{ltr:["height"],rtl:["height"]},"inline-size":{ltr:["width"],rtl:["width"]},inset:{ltr:["top","right","bottom","left"],rtl:["top","right","bottom","left"]},"inset-block":{ltr:["top","bottom"],rtl:["top","bottom"]},"inset-block-start":{ltr:["top"],rtl:["top"]},"inset-block-end":{ltr:["bottom"],rtl:["bottom"]},"inset-end":{ltr:["bottom","right"],rtl:["bottom","left"]},"inset-inline":{ltr:["left","right"],rtl:["left","right"]},"inset-inline-start":{ltr:["left"],rtl:["right"]},"inset-inline-end":{ltr:["right"],rtl:["left"]},"inset-start":{ltr:["top","left"],rtl:["top","right"]},"margin-block":{ltr:["margin-top","margin-bottom"],rtl:["margin-top","margin-bottom"]},"margin-block-start":{ltr:["margin-top"],rtl:["margin-top"]},"margin-block-end":{ltr:["margin-bottom"],rtl:["margin-bottom"]},"margin-end":{ltr:["margin-bottom","margin-right"],rtl:["margin-bottom","margin-left"]},"margin-inline":{ltr:["margin-left","margin-right"],rtl:["margin-left","margin-right"]},"margin-inline-start":{ltr:["margin-left"],rtl:["margin-right"]},"margin-inline-end":{ltr:["margin-right"],rtl:["margin-left"]},"margin-start":{ltr:["margin-top","margin-left"],rtl:["margin-top","margin-right"]},"padding-block":{ltr:["padding-top","padding-bottom"],rtl:["padding-top","padding-bottom"]},"padding-block-start":{ltr:["padding-top"],rtl:["padding-top"]},"padding-block-end":{ltr:["padding-bottom"],rtl:["padding-bottom"]},"padding-end":{ltr:["padding-bottom","padding-right"],rtl:["padding-bottom","padding-left"]},"padding-inline":{ltr:["padding-left","padding-right"],rtl:["padding-left","padding-right"]},"padding-inline-start":{ltr:["padding-left"],rtl:["padding-right"]},"padding-inline-end":{ltr:["padding-right"],rtl:["padding-left"]},"padding-start":{ltr:["padding-top","padding-left"],rtl:["padding-top","padding-right"]}};var w=/^(?:(inset|margin|padding)(?:-(block|block-start|block-end|inline|inline-start|inline-end|start|end))|(min-|max-)?(block|inline)-(size))$/i;const S={border:u["border"],"border-width":u["border"],"border-style":u["border"],"border-color":u["border"],"border-block":u["border-block"],"border-block-width":u["border-block"],"border-block-style":u["border-block"],"border-block-color":u["border-block"],"border-block-start":u["border-block-start"],"border-block-start-width":u["border-block-start"],"border-block-start-style":u["border-block-start"],"border-block-start-color":u["border-block-start"],"border-block-end":u["border-block-end"],"border-block-end-width":u["border-block-end"],"border-block-end-style":u["border-block-end"],"border-block-end-color":u["border-block-end"],"border-inline":u["border-inline"],"border-inline-width":u["border-inline"],"border-inline-style":u["border-inline"],"border-inline-color":u["border-inline"],"border-inline-start":u["border-inline-start"],"border-inline-start-width":u["border-inline-start"],"border-inline-start-style":u["border-inline-start"],"border-inline-start-color":u["border-inline-start"],"border-inline-end":u["border-inline-end"],"border-inline-end-width":u["border-inline-end"],"border-inline-end-style":u["border-inline-end"],"border-inline-end-color":u["border-inline-end"],"border-start":u["border-start"],"border-start-width":u["border-start"],"border-start-style":u["border-start"],"border-start-color":u["border-start"],"border-end":u["border-end"],"border-end-width":u["border-end"],"border-end-style":u["border-end"],"border-end-color":u["border-end"],clear:f,inset:c,margin:y,padding:y,block:v["block"],"block-start":v["block-start"],"block-end":v["block-end"],inline:v["inline"],"inline-start":v["inline-start"],"inline-end":v["inline-end"],start:v["start"],end:v["end"],float:f,resize:l,size:b,"text-align":g,transition:m,"transition-property":m};const O=/^border(-block|-inline|-start|-end)?(-width|-style|-color)?$/i;var T=n.plugin("postcss-logical-properties",e=>{const r=Boolean(Object(e).preserve);const t=!r&&typeof Object(e).dir==="string"?/^rtl$/i.test(e.dir)?"rtl":"ltr":false;return e=>{e.walkDecls(e=>{const n=e.parent;const i=O.test(e.prop)?splitBySlash(e.value,true):splitBySpace(e.value,true);const o=e.prop.replace(w,"$2$5").toLowerCase();if(o in S){const s=S[o](e,i,t);if(s){[].concat(s).forEach(r=>{if(r.type==="rule"){n.before(r)}else{e.before(r)}});if(!r){e.remove();if(!n.nodes.length){n.remove()}}}}})}});e.exports=T},601:(e,r,t)=>{var n=t(4633);e.exports=n.plugin("postcss-media-minmax",function(){return function(e){var r={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};var t=Object.keys(r);var n=.001;var i={">":1,"<":-1};var o={">":"min","<":"max"};function create_query(e,t,s,a,u){return a.replace(/([-\d\.]+)(.*)/,function(a,u,f){var c=parseFloat(u);if(parseFloat(u)||s){if(!s){if(f==="px"&&c===parseInt(u,10)){u=c+i[t]}else{u=Number(Math.round(parseFloat(u)+n*i[t]+"e6")+"e-6")}}}else{u=i[t]+r[e]}return"("+o[t]+"-"+e+": "+u+f+")"})}e.walkAtRules(function(e,r){if(e.name!=="media"&&e.name!=="custom-media"){return}e.params=e.params.replace(/\(\s*([a-z-]+?)\s*([<>])(=?)\s*((?:-?\d*\.?(?:\s*\/?\s*)?\d+[a-z]*)?)\s*\)/gi,function(r,n,i,o,s){var a="";if(t.indexOf(n)>-1){return create_query(n,i,o,s,e.params)}return r});e.params=e.params.replace(/\(\s*((?:-?\d*\.?(?:\s*\/?\s*)?\d+[a-z]*)?)\s*(<|>)(=?)\s*([a-z-]+)\s*(<|>)(=?)\s*((?:-?\d*\.?(?:\s*\/?\s*)?\d+[a-z]*)?)\s*\)/gi,function(e,r,n,i,o,s,a,u){if(t.indexOf(o)>-1){if(n==="<"&&s==="<"||n===">"&&s===">"){var f=n==="<"?r:u;var c=n==="<"?u:r;var l=i;var p=a;if(n===">"){l=a;p=i}return create_query(o,">",l,f)+" and "+create_query(o,"<",p,c)}}return e})})}})},9717:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=t(4633);var i=_interopDefault(n);function shiftNodesBeforeParent(e){const r=e.parent;const t=r.index(e);if(t){r.cloneBefore().removeAll().append(r.nodes.slice(0,t))}r.before(e);return r}function cleanupParent(e){if(!e.nodes.length){e.remove()}}var o=/&(?:[^\w-|]|$)/;const s=/&/g;function mergeSelectors(e,r){return e.reduce((e,t)=>e.concat(r.map(e=>e.replace(s,t))),[])}function transformRuleWithinRule(e){const r=shiftNodesBeforeParent(e);e.selectors=mergeSelectors(r.selectors,e.selectors);const t=e.type==="rule"&&r.type==="rule"&&e.selector===r.selector||e.type==="atrule"&&r.type==="atrule"&&e.params===r.params;if(t){e.append(...r.nodes)}cleanupParent(r)}const a=e=>e.type==="rule"&&Object(e.parent).type==="rule"&&e.selectors.every(e=>e.trim().lastIndexOf("&")===0&&o.test(e));const u=n.list.comma;function transformNestRuleWithinRule(e){const r=shiftNodesBeforeParent(e);const t=r.clone().removeAll().append(e.nodes);e.replaceWith(t);t.selectors=mergeSelectors(r.selectors,u(e.params));cleanupParent(r);walk(t)}const f=e=>e.type==="atrule"&&e.name==="nest"&&Object(e.parent).type==="rule"&&u(e.params).every(e=>e.split("&").length===2&&o.test(e));var c=["document","media","supports"];function atruleWithinRule(e){const r=shiftNodesBeforeParent(e);const t=r.clone().removeAll().append(e.nodes);e.append(t);cleanupParent(r);walk(t)}const l=e=>e.type==="atrule"&&c.indexOf(e.name)!==-1&&Object(e.parent).type==="rule";const p=n.list.comma;function mergeParams(e,r){return p(e).map(e=>p(r).map(r=>`${e} and ${r}`).join(", ")).join(", ")}function transformAtruleWithinAtrule(e){const r=shiftNodesBeforeParent(e);e.params=mergeParams(r.params,e.params);cleanupParent(r)}const h=e=>e.type==="atrule"&&c.indexOf(e.name)!==-1&&Object(e.parent).type==="atrule"&&e.name===e.parent.name;function walk(e){e.nodes.slice(0).forEach(r=>{if(r.parent===e){if(a(r)){transformRuleWithinRule(r)}else if(f(r)){transformNestRuleWithinRule(r)}else if(l(r)){atruleWithinRule(r)}else if(h(r)){transformAtruleWithinAtrule(r)}if(Object(r.nodes).length){walk(r)}}})}var B=i.plugin("postcss-nesting",()=>walk);e.exports=B},498:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_nonIterableRest()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}const i=n.list.space;const o=/^overflow$/i;var s=n.plugin("postcss-overflow-shorthand",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;return e=>{e.walkDecls(o,e=>{const t=i(e.value),n=_toArray(t),o=n[0],s=n[1],a=n.slice(2);if(s&&!a.length){e.cloneBefore({prop:`${e.prop}-x`,value:o});e.cloneBefore({prop:`${e.prop}-y`,value:s});if(!r){e.remove()}}})}});e.exports=s},2841:(e,r,t)=>{var n=t(4633);e.exports=n.plugin("postcss-page-break",function(){return function(e){e.walkDecls(/^break-(inside|before|after)/,function(e){if(e.value.search(/column|region/)>=0){return}var r;switch(e.value){case"page":r="always";break;case"avoid-page":r="avoid";break;default:r=e.value}e.cloneBefore({prop:"page-"+e.prop,value:r})})}})},1431:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));const o=/^place-(content|items|self)/;var s=n.plugin("postcss-place",e=>{const r="preserve"in Object(e)?Boolean(e.prefix):true;return e=>{e.walkDecls(o,e=>{const t=e.prop.match(o)[1];const n=i(e.value).parse();const s=n.nodes[0].nodes;const a=s.length===1?e.value:String(s.slice(0,1)).trim();const u=s.length===1?e.value:String(s.slice(1)).trim();e.cloneBefore({prop:`align-${t}`,value:a});e.cloneBefore({prop:`justify-${t}`,value:u});if(!r){e.remove()}})}});e.exports=s},7435:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(3501));var i=_interopDefault(t(3561));var o=_interopDefault(t(3094));var s=_interopDefault(t(4633));var a=_interopDefault(t(2347));var u=_interopDefault(t(9883));var f=_interopDefault(t(7814));var c=_interopDefault(t(489));var l=_interopDefault(t(8157));var p=_interopDefault(t(8881));var h=_interopDefault(t(9971));var B=_interopDefault(t(4731));var v=_interopDefault(t(8713));var d=_interopDefault(t(8758));var b=_interopDefault(t(3650));var y=_interopDefault(t(3030));var g=_interopDefault(t(5538));var m=_interopDefault(t(9642));var C=_interopDefault(t(8059));var w=_interopDefault(t(3203));var S=_interopDefault(t(9547));var O=_interopDefault(t(9555));var T=_interopDefault(t(4287));var E=_interopDefault(t(7501));var k=_interopDefault(t(7972));var P=_interopDefault(t(562));var D=_interopDefault(t(601));var A=_interopDefault(t(9717));var R=_interopDefault(t(498));var F=_interopDefault(t(2841));var x=_interopDefault(t(1431));var j=_interopDefault(t(2207));var I=_interopDefault(t(1832));var M=_interopDefault(t(9020));var N=_interopDefault(t(40));var _=_interopDefault(t(8158));var L=t(4338);var q=_interopDefault(t(5747));var G=_interopDefault(t(5622));var J=s.plugin("postcss-system-ui-font",()=>e=>{e.walkDecls(U,e=>{e.value=e.value.replace(K,W)})});const U=/(?:^(?:-|\\002d){2})|(?:^font(?:-family)?$)/i;const H="[\\f\\n\\r\\x09\\x20]";const Q=["system-ui","-apple-system","Segoe UI","Roboto","Ubuntu","Cantarell","Noto Sans","sans-serif"];const K=new RegExp(`(^|,|${H}+)(?:system-ui${H}*)(?:,${H}*(?:${Q.join("|")})${H}*)?(,|$)`,"i");const W=`$1${Q.join(", ")}$2`;var Y={"all-property":E,"any-link-pseudo-class":I,"blank-pseudo-class":u,"break-properties":F,"case-insensitive-attributes":a,"color-functional-notation":f,"color-mod-function":p,"custom-media-queries":B,"custom-properties":v,"custom-selectors":d,"dir-pseudo-class":b,"double-position-gradients":y,"environment-variables":g,"focus-visible-pseudo-class":m,"focus-within-pseudo-class":C,"font-variant-property":w,"gap-properties":S,"gray-function":c,"has-pseudo-class":O,"hexadecimal-alpha-notation":l,"image-set-function":T,"lab-function":k,"logical-properties-and-values":P,"matches-pseudo-class":N,"media-query-ranges":D,"nesting-rules":A,"not-pseudo-class":_,"overflow-property":R,"overflow-wrap-property":M,"place-properties":x,"prefers-color-scheme-query":j,"rebeccapurple-color":h,"system-ui-font-family":J};function getTransformedInsertions(e,r){return Object.keys(e).map(t=>[].concat(e[t]).map(e=>({[r]:true,plugin:e,id:t}))).reduce((e,r)=>e.concat(r),[])}function getUnsupportedBrowsersByFeature(e){const r=L.features[e];if(r){const e=L.feature(r).stats;const t=Object.keys(e).reduce((r,t)=>r.concat(Object.keys(e[t]).filter(r=>e[t][r].indexOf("y")!==0).map(e=>`${t} ${e}`)),[]);return t}else{return["> 0%"]}}var z=["custom-media-queries","custom-properties","environment-variables","image-set-function","media-query-ranges","prefers-color-scheme-query","nesting-rules","custom-selectors","any-link-pseudo-class","case-insensitive-attributes","focus-visible-pseudo-class","focus-within-pseudo-class","matches-pseudo-class","not-pseudo-class","logical-properties-and-values","dir-pseudo-class","all-property","color-functional-notation","double-position-gradients","gray-function","hexadecimal-alpha-notation","lab-function","rebeccapurple-color","color-mod-function","blank-pseudo-class","break-properties","font-variant-property","has-pseudo-class","gap-properties","overflow-property","overflow-wrap-property","place-properties","system-ui-font-family"];function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}function getCustomMediaAsCss(e){const r=Object.keys(e).reduce((r,t)=>{r.push(`@custom-media ${t} ${e[t]};`);return r},[]).join("\n");const t=`${r}\n`;return t}function getCustomPropertiesAsCss(e){const r=Object.keys(e).reduce((r,t)=>{r.push(`\t${t}: ${e[t]};`);return r},[]).join("\n");const t=`:root {\n${r}\n}\n`;return t}function getCustomSelectorsAsCss(e){const r=Object.keys(e).reduce((r,t)=>{r.push(`@custom-selector ${t} ${e[t]};`);return r},[]).join("\n");const t=`${r}\n`;return t}function writeExportsToCssFile(e,r,t,n){return _writeExportsToCssFile.apply(this,arguments)}function _writeExportsToCssFile(){_writeExportsToCssFile=_asyncToGenerator(function*(e,r,t,n){const i=getCustomPropertiesAsCss(t);const o=getCustomMediaAsCss(r);const s=getCustomSelectorsAsCss(n);const a=`${o}\n${s}\n${i}`;yield writeFile(e,a)});return _writeExportsToCssFile.apply(this,arguments)}function writeExportsToJsonFile(e,r,t,n){return _writeExportsToJsonFile.apply(this,arguments)}function _writeExportsToJsonFile(){_writeExportsToJsonFile=_asyncToGenerator(function*(e,r,t,n){const i=JSON.stringify({"custom-media":r,"custom-properties":t,"custom-selectors":n},null," ");const o=`${i}\n`;yield writeFile(e,o)});return _writeExportsToJsonFile.apply(this,arguments)}function getObjectWithKeyAsCjs(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t\t'${escapeForJS(t)}': '${escapeForJS(r[t])}'`);return e},[]).join(",\n");const n=`\n\t${e}: {\n${t}\n\t}`;return n}function writeExportsToCjsFile(e,r,t,n){return _writeExportsToCjsFile.apply(this,arguments)}function _writeExportsToCjsFile(){_writeExportsToCjsFile=_asyncToGenerator(function*(e,r,t,n){const i=getObjectWithKeyAsCjs("customMedia",r);const o=getObjectWithKeyAsCjs("customProperties",t);const s=getObjectWithKeyAsCjs("customSelectors",n);const a=`module.exports = {${i},${o},${s}\n};\n`;yield writeFile(e,a)});return _writeExportsToCjsFile.apply(this,arguments)}function getObjectWithKeyAsMjs(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t'${escapeForJS(t)}': '${escapeForJS(r[t])}'`);return e},[]).join(",\n");const n=`export const ${e} = {\n${t}\n};\n`;return n}function writeExportsToMjsFile(e,r,t,n){return _writeExportsToMjsFile.apply(this,arguments)}function _writeExportsToMjsFile(){_writeExportsToMjsFile=_asyncToGenerator(function*(e,r,t,n){const i=getObjectWithKeyAsMjs("customMedia",r);const o=getObjectWithKeyAsMjs("customProperties",t);const s=getObjectWithKeyAsMjs("customSelectors",n);const a=`${i}\n${o}\n${s}`;yield writeFile(e,a)});return _writeExportsToMjsFile.apply(this,arguments)}function writeToExports(e,r){return Promise.all([].concat(r).map(function(){var r=_asyncToGenerator(function*(r){if(r instanceof Function){yield r({customMedia:getObjectWithStringifiedKeys(e.customMedia),customProperties:getObjectWithStringifiedKeys(e.customProperties),customSelectors:getObjectWithStringifiedKeys(e.customSelectors)})}else{const t=r===Object(r)?r:{to:String(r)};const n=t.toJSON||getObjectWithStringifiedKeys;if("customMedia"in t||"customProperties"in t||"customSelectors"in t){t.customMedia=n(e.customMedia);t.customProperties=n(e.customProperties);t.customSelectors=n(e.customSelectors)}else if("custom-media"in t||"custom-properties"in t||"custom-selectors"in t){t["custom-media"]=n(e.customMedia);t["custom-properties"]=n(e.customProperties);t["custom-selectors"]=n(e.customSelectors)}else{const r=String(t.to||"");const i=(t.type||G.extname(t.to).slice(1)).toLowerCase();const o=n(e.customMedia);const s=n(e.customProperties);const a=n(e.customSelectors);if(i==="css"){yield writeExportsToCssFile(r,o,s,a)}if(i==="js"){yield writeExportsToCjsFile(r,o,s,a)}if(i==="json"){yield writeExportsToJsonFile(r,o,s,a)}if(i==="mjs"){yield writeExportsToMjsFile(r,o,s,a)}}}});return function(e){return r.apply(this,arguments)}}()))}function getObjectWithStringifiedKeys(e){return Object.keys(e).reduce((r,t)=>{r[t]=String(e[t]);return r},{})}function writeFile(e,r){return new Promise((t,n)=>{q.writeFile(e,r,e=>{if(e){n(e)}else{t()}})})}function escapeForJS(e){return e.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}var $=s.plugin("postcss-preset-env",e=>{const r=Object(Object(e).features);const t=Object(Object(e).insertBefore);const s=Object(Object(e).insertAfter);const a=Object(e).browsers;const u="stage"in Object(e)?e.stage===false?5:parseInt(e.stage)||0:2;const f=Object(e).autoprefixer;const c=X(Object(e));const l=f===false?()=>{}:n(Object.assign({overrideBrowserslist:a},f));const p=o.concat(getTransformedInsertions(t,"insertBefore"),getTransformedInsertions(s,"insertAfter")).filter(e=>e.insertBefore||e.id in Y).sort((e,r)=>z.indexOf(e.id)-z.indexOf(r.id)||(e.insertBefore?-1:r.insertBefore?1:0)||(e.insertAfter?1:r.insertAfter?-1:0)).map(e=>{const r=getUnsupportedBrowsersByFeature(e.caniuse);return e.insertBefore||e.insertAfter?{browsers:r,plugin:e.plugin,id:`${e.insertBefore?"before":"after"}-${e.id}`,stage:6}:{browsers:r,plugin:Y[e.id],id:e.id,stage:e.stage}});const h=p.filter(e=>e.id in r?r[e.id]:e.stage>=u).map(e=>({browsers:e.browsers,plugin:typeof e.plugin.process==="function"?r[e.id]===true?c?e.plugin(Object.assign({},c)):e.plugin():c?e.plugin(Object.assign({},c,r[e.id])):e.plugin(Object.assign({},r[e.id])):e.plugin,id:e.id}));const B=i(a,{ignoreUnknownVersions:true});const v=h.filter(e=>B.some(r=>i(e.browsers,{ignoreUnknownVersions:true}).some(e=>e===r)));return(r,t)=>{const n=v.reduce((e,r)=>e.then(()=>r.plugin(t.root,t)),Promise.resolve()).then(()=>l(t.root,t)).then(()=>{if(Object(e).exportTo){writeToExports(c.exportTo,e.exportTo)}});return n}});const X=e=>{if("importFrom"in e||"exportTo"in e||"preserve"in e){const r={};if("importFrom"in e){r.importFrom=e.importFrom}if("exportTo"in e){r.exportTo={customMedia:{},customProperties:{},customSelectors:{}}}if("preserve"in e){r.preserve=e.preserve}return r}return false};e.exports=$},1832:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(741));const o=/:any-link/;var s=n.plugin("postcss-pseudo-class-any-link",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;return e=>{e.walkRules(o,e=>{const t=e.raws.selector&&e.raws.selector.raw||e.selector;if(t[t.length-1]!==":"){const n=i(e=>{let r;let t;let n;let i;let o;let s=-1;while(n=e.nodes[++s]){t=-1;while(r=n.nodes[++t]){if(r.value===":any-link"){i=n.clone();o=n.clone();i.nodes[t].value=":link";o.nodes[t].value=":visited";e.nodes.splice(s--,1,i,o);break}}}}).processSync(t);if(n!==t){if(r){e.cloneBefore({selector:n})}else{e.selector=n}}}})}});e.exports=s},9018:e=>{"use strict";var r={};var t=r.hasOwnProperty;var n=function merge(e,r){if(!e){return r}var n={};for(var i in r){n[i]=t.call(e,i)?e[i]:r[i]}return n};var i=/[ -,\.\/;-@\[-\^`\{-~]/;var o=/[ -,\.\/;-@\[\]\^`\{-~]/;var s=/['"\\]/;var a=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var u=function cssesc(e,r){r=n(r,cssesc.options);if(r.quotes!="single"&&r.quotes!="double"){r.quotes="single"}var t=r.quotes=="double"?'"':"'";var s=r.isIdentifier;var u=e.charAt(0);var f="";var c=0;var l=e.length;while(c126){if(h>=55296&&h<=56319&&c{"use strict";r.__esModule=true;var n=t(268);var i=_interopRequireDefault(n);var o=t(5848);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=function parser(e){return new i.default(e)};Object.assign(a,s);delete a.__esModule;r.default=a;e.exports=r["default"]},4682:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parser);this.rule=e;this.options=Object.assign({lossy:false,safe:false},r);this.position=0;this.css=typeof this.rule==="string"?this.rule:this.rule.selector;this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var t=getTokenSourceSpan(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new p.default({source:t});this.root.errorGenerator=this._errorGenerator();var n=new B.default({source:{start:{line:1,column:1}}});this.root.append(n);this.current=n;this.loop()}Parser.prototype._errorGenerator=function _errorGenerator(){var e=this;return function(r,t){if(typeof e.rule==="string"){return new Error(r)}return e.rule.error(r,t)}};Parser.prototype.attribute=function attribute(){var e=[];var r=this.currToken;this.position++;while(this.position1&&arguments[1]!==undefined?arguments[1]:false;var n="";var i="";e.forEach(function(e){var o=r.lossySpace(e.spaces.before,t);var s=r.lossySpace(e.rawSpaceBefore,t);n+=o+r.lossySpace(e.spaces.after,t&&o.length===0);i+=o+e.value+r.lossySpace(e.rawSpaceAfter,t&&s.length===0)});if(i===n){i=undefined}var o={space:n,rawSpace:i};return o};Parser.prototype.isNamedCombinator=function isNamedCombinator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position;return this.tokens[e+0]&&this.tokens[e+0][N.FIELDS.TYPE]===q.slash&&this.tokens[e+1]&&this.tokens[e+1][N.FIELDS.TYPE]===q.word&&this.tokens[e+2]&&this.tokens[e+2][N.FIELDS.TYPE]===q.slash};Parser.prototype.namedCombinator=function namedCombinator(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]);var r=(0,U.unesc)(e).toLowerCase();var t={};if(r!==e){t.value="/"+e+"/"}var n=new F.default({value:"/"+r+"/",source:getSource(this.currToken[N.FIELDS.START_LINE],this.currToken[N.FIELDS.START_COL],this.tokens[this.position+2][N.FIELDS.END_LINE],this.tokens[this.position+2][N.FIELDS.END_COL]),sourceIndex:this.currToken[N.FIELDS.START_POS],raws:t});this.position=this.position+3;return n}else{this.unexpected()}};Parser.prototype.combinator=function combinator(){var e=this;if(this.content()==="|"){return this.namespace()}var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][N.FIELDS.TYPE]===q.comma){var t=this.parseWhitespaceEquivalentTokens(r);if(t.length>0){var n=this.current.last;if(n){var i=this.convertWhitespaceNodesToSpace(t),o=i.space,s=i.rawSpace;if(s!==undefined){n.rawSpaceAfter+=s}n.spaces.after+=o}else{t.forEach(function(r){return e.newNode(r)})}}return}var a=this.currToken;var u=undefined;if(r>this.position){u=this.parseWhitespaceEquivalentTokens(r)}var f=void 0;if(this.isNamedCombinator()){f=this.namedCombinator()}else if(this.currToken[N.FIELDS.TYPE]===q.combinator){f=new F.default({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[N.FIELDS.START_POS]});this.position++}else if(H[this.currToken[N.FIELDS.TYPE]]){}else if(!u){this.unexpected()}if(f){if(u){var c=this.convertWhitespaceNodesToSpace(u),l=c.space,p=c.rawSpace;f.spaces.before=l;f.rawSpaceBefore=p}}else{var h=this.convertWhitespaceNodesToSpace(u,true),B=h.space,v=h.rawSpace;if(!v){v=B}var d={};var b={spaces:{}};if(B.endsWith(" ")&&v.endsWith(" ")){d.before=B.slice(0,B.length-1);b.spaces.before=v.slice(0,v.length-1)}else if(B.startsWith(" ")&&v.startsWith(" ")){d.after=B.slice(1);b.spaces.after=v.slice(1)}else{b.value=v}f=new F.default({value:" ",source:getTokenSourceSpan(a,this.tokens[this.position-1]),sourceIndex:a[N.FIELDS.START_POS],spaces:d,raws:b})}if(this.currToken&&this.currToken[N.FIELDS.TYPE]===q.space){f.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(f)};Parser.prototype.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var e=new B.default({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(e);this.current=e;this.position++};Parser.prototype.comment=function comment(){var e=this.currToken;this.newNode(new y.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.error=function error(e,r){throw this.root.error(e,r)};Parser.prototype.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[N.FIELDS.START_POS]})};Parser.prototype.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[N.FIELDS.START_POS])};Parser.prototype.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[N.FIELDS.START_POS])};Parser.prototype.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[N.FIELDS.START_POS])};Parser.prototype.namespace=function namespace(){var e=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[N.FIELDS.TYPE]===q.word){this.position++;return this.word(e)}else if(this.nextToken[N.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(e)}};Parser.prototype.nesting=function nesting(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var r=this.currToken;this.newNode(new j.default({value:this.content(),source:getTokenSource(r),sourceIndex:r[N.FIELDS.START_POS]}));this.position++};Parser.prototype.parentheses=function parentheses(){var e=this.current.last;var r=1;this.position++;if(e&&e.type===J.PSEUDO){var t=new B.default({source:{start:tokenStart(this.tokens[this.position-1])}});var n=this.current;e.append(t);this.current=t;while(this.position1&&e.nextToken&&e.nextToken[N.FIELDS.TYPE]===q.openParenthesis){e.error("Misplaced parenthesis.",{index:e.nextToken[N.FIELDS.START_POS]})}})}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[N.FIELDS.START_POS])}};Parser.prototype.space=function space(){var e=this.content();if(this.position===0||this.prevToken[N.FIELDS.TYPE]===q.comma||this.prevToken[N.FIELDS.TYPE]===q.openParenthesis){this.spaces=this.optionalSpace(e);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[N.FIELDS.TYPE]===q.comma||this.nextToken[N.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(e);this.position++}else{this.combinator()}};Parser.prototype.string=function string(){var e=this.currToken;this.newNode(new O.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.universal=function universal(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}var t=this.currToken;this.newNode(new A.default({value:this.content(),source:getTokenSource(t),sourceIndex:t[N.FIELDS.START_POS]}),e);this.position++};Parser.prototype.splitWord=function splitWord(e,r){var t=this;var n=this.nextToken;var i=this.content();while(n&&~[q.dollar,q.caret,q.equals,q.word].indexOf(n[N.FIELDS.TYPE])){this.position++;var o=this.content();i+=o;if(o.lastIndexOf("\\")===o.length-1){var s=this.nextToken;if(s&&s[N.FIELDS.TYPE]===q.space){i+=this.requiredSpace(this.content(s));this.position++}}n=this.nextToken}var a=(0,u.default)(i,".").filter(function(e){return i[e-1]!=="\\"});var f=(0,u.default)(i,"#");var l=(0,u.default)(i,"#{");if(l.length){f=f.filter(function(e){return!~l.indexOf(e)})}var p=(0,M.default)((0,c.default)([0].concat(a,f)));p.forEach(function(n,o){var s=p[o+1]||i.length;var u=i.slice(n,s);if(o===0&&r){return r.call(t,u,p.length)}var c=void 0;var l=t.currToken;var h=l[N.FIELDS.START_POS]+p[o];var B=getSource(l[1],l[2]+n,l[3],l[2]+(s-1));if(~a.indexOf(n)){var v={value:u.slice(1),source:B,sourceIndex:h};c=new d.default(unescapeProp(v,"value"))}else if(~f.indexOf(n)){var b={value:u.slice(1),source:B,sourceIndex:h};c=new m.default(unescapeProp(b,"value"))}else{var y={value:u,source:B,sourceIndex:h};unescapeProp(y,"value");c=new w.default(y)}t.newNode(c,e);e=null});this.position++};Parser.prototype.word=function word(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}return this.splitWord(e)};Parser.prototype.loop=function loop(){while(this.position0&&arguments[0]!==undefined?arguments[0]:this.currToken;return this.css.slice(e[N.FIELDS.START_POS],e[N.FIELDS.END_POS])};Parser.prototype.locateNextMeaningfulToken=function locateNextMeaningfulToken(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position+1;var r=e;while(r{"use strict";r.__esModule=true;var n=t(4682);var i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=function(){function Processor(e,r){_classCallCheck(this,Processor);this.func=e||function noop(){};this.funcRes=null;this.options=r}Processor.prototype._shouldUpdateSelector=function _shouldUpdateSelector(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=Object.assign({},this.options,r);if(t.updateSelector===false){return false}else{return typeof e!=="string"}};Processor.prototype._isLossy=function _isLossy(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=Object.assign({},this.options,e);if(r.lossless===false){return true}else{return false}};Processor.prototype._root=function _root(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=new i.default(e,this._parseOptions(r));return t.root};Processor.prototype._parseOptions=function _parseOptions(e){return{lossy:this._isLossy(e)}};Processor.prototype._run=function _run(e){var r=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new Promise(function(n,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(n){var i=undefined;if(r._shouldUpdateSelector(e,t)){i=o.toString();e.selector=i}return{transform:n,root:o,string:i}}).then(n,i)}catch(e){i(e);return}})};Processor.prototype._runSync=function _runSync(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=this._root(e,r);var n=this.func(t);if(n&&typeof n.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var i=undefined;if(r.updateSelector&&typeof e!=="string"){i=t.toString();e.selector=i}return{transform:n,root:t,string:i}};Processor.prototype.ast=function ast(e,r){return this._run(e,r).then(function(e){return e.root})};Processor.prototype.astSync=function astSync(e,r){return this._runSync(e,r).root};Processor.prototype.transform=function transform(e,r){return this._run(e,r).then(function(e){return e.transform})};Processor.prototype.transformSync=function transformSync(e,r){return this._runSync(e,r).transform};Processor.prototype.process=function process(e,r){return this._run(e,r).then(function(e){return e.string||e.root.toString()})};Processor.prototype.processSync=function processSync(e,r){var t=this._runSync(e,r);return t.string||t.root.toString()};return Processor}();r.default=o;e.exports=r["default"]},7239:(e,r,t)=>{"use strict";r.__esModule=true;var n;var i=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Attribute);var t=_possibleConstructorReturn(this,e.call(this,handleDeprecatedContructorOpts(r)));t.type=l.ATTRIBUTE;t.raws=t.raws||{};Object.defineProperty(t.raws,"unquoted",{get:h(function(){return t.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:h(function(){return t.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")});t._constructed=true;return t}Attribute.prototype.getQuotedValue=function getQuotedValue(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=this._determineQuoteMark(e);var t=g[r];var n=(0,s.default)(this._value,t);return n};Attribute.prototype._determineQuoteMark=function _determineQuoteMark(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)};Attribute.prototype.setValue=function setValue(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this._value=e;this._quoteMark=this._determineQuoteMark(r);this._syncRawValue()};Attribute.prototype.smartQuoteMark=function smartQuoteMark(e){var r=this.value;var t=r.replace(/[^']/g,"").length;var n=r.replace(/[^"]/g,"").length;if(t+n===0){var i=(0,s.default)(r,{isIdentifier:true});if(i===r){return Attribute.NO_QUOTE}else{var o=this.preferredQuoteMark(e);if(o===Attribute.NO_QUOTE){var a=this.quoteMark||e.quoteMark||Attribute.DOUBLE_QUOTE;var u=g[a];var f=(0,s.default)(r,u);if(f.length1&&arguments[1]!==undefined?arguments[1]:e;var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:defaultAttrConcat;var n=this._spacesFor(r);return t(this.stringifyProperty(e),n)};Attribute.prototype.offsetOf=function offsetOf(e){var r=1;var t=this._spacesFor("attribute");r+=t.before.length;if(e==="namespace"||e==="ns"){return this.namespace?r:-1}if(e==="attributeNS"){return r}r+=this.namespaceString.length;if(this.namespace){r+=1}if(e==="attribute"){return r}r+=this.stringifyProperty("attribute").length;r+=t.after.length;var n=this._spacesFor("operator");r+=n.before.length;var i=this.stringifyProperty("operator");if(e==="operator"){return i?r:-1}r+=i.length;r+=n.after.length;var o=this._spacesFor("value");r+=o.before.length;var s=this.stringifyProperty("value");if(e==="value"){return s?r:-1}r+=s.length;r+=o.after.length;var a=this._spacesFor("insensitive");r+=a.before.length;if(e==="insensitive"){return this.insensitive?r:-1}return-1};Attribute.prototype.toString=function toString(){var e=this;var r=[this.rawSpaceBefore,"["];r.push(this._stringFor("qualifiedAttribute","attribute"));if(this.operator&&this.value){r.push(this._stringFor("operator"));r.push(this._stringFor("value"));r.push(this._stringFor("insensitiveFlag","insensitive",function(r,t){if(r.length>0&&!e.quoted&&t.before.length===0&&!(e.spaces.value&&e.spaces.value.after)){t.before=" "}return defaultAttrConcat(r,t)}))}r.push("]");r.push(this.rawSpaceAfter);return r.join("")};i(Attribute,[{key:"quoted",get:function get(){var e=this.quoteMark;return e==="'"||e==='"'},set:function set(e){d()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(e){if(!this._constructed){this._quoteMark=e;return}if(this._quoteMark!==e){this._quoteMark=e;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(e){if(this._constructed){var r=unescapeValue(e),t=r.deprecatedUsage,n=r.unescaped,i=r.quoteMark;if(t){v()}if(n===this._value&&i===this._quoteMark){return}this._value=n;this._quoteMark=i;this._syncRawValue()}else{this._value=e}}},{key:"attribute",get:function get(){return this._attribute},set:function set(e){this._handleEscapes("attribute",e);this._attribute=e}}]);return Attribute}(c.default);y.NO_QUOTE=null;y.SINGLE_QUOTE="'";y.DOUBLE_QUOTE='"';r.default=y;var g=(n={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},n[null]={isIdentifier:true},n);function defaultAttrConcat(e,r){return""+r.before+e+r.after}},2961:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(5387);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Combinator,e);function Combinator(r){_classCallCheck(this,Combinator);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMBINATOR;return t}return Combinator}(i.default);r.default=s;e.exports=r["default"]},2622:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(5387);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Comment,e);function Comment(r){_classCallCheck(this,Comment);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMMENT;return t}return Comment}(i.default);r.default=s;e.exports=r["default"]},4649:(e,r,t)=>{"use strict";r.__esModule=true;r.universal=r.tag=r.string=r.selector=r.root=r.pseudo=r.nesting=r.id=r.comment=r.combinator=r.className=r.attribute=undefined;var n=t(7239);var i=_interopRequireDefault(n);var o=t(2961);var s=_interopRequireDefault(o);var a=t(415);var u=_interopRequireDefault(a);var f=t(2622);var c=_interopRequireDefault(f);var l=t(6856);var p=_interopRequireDefault(l);var h=t(7939);var B=_interopRequireDefault(h);var v=t(9189);var d=_interopRequireDefault(v);var b=t(7156);var y=_interopRequireDefault(b);var g=t(8727);var m=_interopRequireDefault(g);var C=t(1572);var w=_interopRequireDefault(C);var S=t(2252);var O=_interopRequireDefault(S);var T=t(3447);var E=_interopRequireDefault(T);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var k=r.attribute=function attribute(e){return new i.default(e)};var P=r.className=function className(e){return new s.default(e)};var D=r.combinator=function combinator(e){return new u.default(e)};var A=r.comment=function comment(e){return new c.default(e)};var R=r.id=function id(e){return new p.default(e)};var F=r.nesting=function nesting(e){return new B.default(e)};var x=r.pseudo=function pseudo(e){return new d.default(e)};var j=r.root=function root(e){return new y.default(e)};var I=r.selector=function selector(e){return new m.default(e)};var M=r.string=function string(e){return new w.default(e)};var N=r.tag=function tag(e){return new O.default(e)};var _=r.universal=function universal(e){return new E.default(e)}},8837:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t=e){this.indexes[t]=r-1}}return this};Container.prototype.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};Container.prototype.empty=function empty(){return this.removeAll()};Container.prototype.insertAfter=function insertAfter(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t+1,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(t<=n){this.indexes[i]=n+1}}return this};Container.prototype.insertBefore=function insertBefore(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(n<=t){this.indexes[i]=n+1}}return this};Container.prototype._findChildAtPosition=function _findChildAtPosition(e,r){var t=undefined;this.each(function(n){if(n.atPosition){var i=n.atPosition(e,r);if(i){t=i;return false}}else if(n.isAtPosition(e,r)){t=n;return false}});return t};Container.prototype.atPosition=function atPosition(e,r){if(this.isAtPosition(e,r)){return this._findChildAtPosition(e,r)||this}else{return undefined}};Container.prototype._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};Container.prototype.each=function each(e){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var r=this.lastEach;this.indexes[r]=0;if(!this.length){return undefined}var t=void 0,n=void 0;while(this.indexes[r]{"use strict";r.__esModule=true;r.isUniversal=r.isTag=r.isString=r.isSelector=r.isRoot=r.isPseudo=r.isNesting=r.isIdentifier=r.isComment=r.isCombinator=r.isClassName=r.isAttribute=undefined;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i;r.isNode=isNode;r.isPseudoElement=isPseudoElement;r.isPseudoClass=isPseudoClass;r.isContainer=isContainer;r.isNamespace=isNamespace;var o=t(9);var s=(i={},i[o.ATTRIBUTE]=true,i[o.CLASS]=true,i[o.COMBINATOR]=true,i[o.COMMENT]=true,i[o.ID]=true,i[o.NESTING]=true,i[o.PSEUDO]=true,i[o.ROOT]=true,i[o.SELECTOR]=true,i[o.STRING]=true,i[o.TAG]=true,i[o.UNIVERSAL]=true,i);function isNode(e){return(typeof e==="undefined"?"undefined":n(e))==="object"&&s[e.type]}function isNodeType(e,r){return isNode(r)&&r.type===e}var a=r.isAttribute=isNodeType.bind(null,o.ATTRIBUTE);var u=r.isClassName=isNodeType.bind(null,o.CLASS);var f=r.isCombinator=isNodeType.bind(null,o.COMBINATOR);var c=r.isComment=isNodeType.bind(null,o.COMMENT);var l=r.isIdentifier=isNodeType.bind(null,o.ID);var p=r.isNesting=isNodeType.bind(null,o.NESTING);var h=r.isPseudo=isNodeType.bind(null,o.PSEUDO);var B=r.isRoot=isNodeType.bind(null,o.ROOT);var v=r.isSelector=isNodeType.bind(null,o.SELECTOR);var d=r.isString=isNodeType.bind(null,o.STRING);var b=r.isTag=isNodeType.bind(null,o.TAG);var y=r.isUniversal=isNodeType.bind(null,o.UNIVERSAL);function isPseudoElement(e){return h(e)&&e.value&&(e.value.startsWith("::")||e.value===":before"||e.value===":after")}function isPseudoClass(e){return h(e)&&!isPseudoElement(e)}function isContainer(e){return!!(isNode(e)&&e.walk)}function isNamespace(e){return a(e)||b(e)}},6856:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(5387);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(ID,e);function ID(r){_classCallCheck(this,ID);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.ID;return t}ID.prototype.toString=function toString(){return[this.rawSpaceBefore,String("#"+this.stringifyProperty("value")),this.rawSpaceAfter].join("")};return ID}(i.default);r.default=s;e.exports=r["default"]},5848:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(9);Object.keys(n).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return n[e]}})});var i=t(4649);Object.keys(i).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return i[e]}})});var o=t(7910);Object.keys(o).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return o[e]}})})},7937:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(5387);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Nesting,e);function Nesting(r){_classCallCheck(this,Nesting);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.NESTING;t.value="&";return t}return Nesting}(i.default);r.default=s;e.exports=r["default"]},5387:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Node);Object.assign(this,e);this.spaces=this.spaces||{};this.spaces.before=this.spaces.before||"";this.spaces.after=this.spaces.after||""}Node.prototype.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};Node.prototype.replaceWith=function replaceWith(){if(this.parent){for(var e in arguments){this.parent.insertBefore(this,arguments[e])}this.remove()}return this};Node.prototype.next=function next(){return this.parent.at(this.parent.index(this)+1)};Node.prototype.prev=function prev(){return this.parent.at(this.parent.index(this)-1)};Node.prototype.clone=function clone(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=s(this);for(var t in e){r[t]=e[t]}return r};Node.prototype.appendToPropertyAndEscape=function appendToPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}var n=this[e];var i=this.raws[e];this[e]=n+r;if(i||t!==r){this.raws[e]=(i||n)+t}else{delete this.raws[e]}};Node.prototype.setPropertyAndEscape=function setPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}this[e]=r;this.raws[e]=t};Node.prototype.setPropertyWithoutEscape=function setPropertyWithoutEscape(e,r){this[e]=r;if(this.raws){delete this.raws[e]}};Node.prototype.isAtPosition=function isAtPosition(e,r){if(this.source&&this.source.start&&this.source.end){if(this.source.start.line>e){return false}if(this.source.end.liner){return false}if(this.source.end.line===e&&this.source.end.column{"use strict";r.__esModule=true;var n=t(8837);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Pseudo,e);function Pseudo(r){_classCallCheck(this,Pseudo);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.PSEUDO;return t}Pseudo.prototype.toString=function toString(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")};return Pseudo}(i.default);r.default=s;e.exports=r["default"]},7156:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(8837);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Selector,e);function Selector(r){_classCallCheck(this,Selector);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.SELECTOR;return t}return Selector}(i.default);r.default=s;e.exports=r["default"]},1572:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(5387);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(String,e);function String(r){_classCallCheck(this,String);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.STRING;return t}return String}(i.default);r.default=s;e.exports=r["default"]},2252:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(7937);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Tag,e);function Tag(r){_classCallCheck(this,Tag);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.TAG;return t}return Tag}(i.default);r.default=s;e.exports=r["default"]},9:(e,r)=>{"use strict";r.__esModule=true;var t=r.TAG="tag";var n=r.STRING="string";var i=r.SELECTOR="selector";var o=r.ROOT="root";var s=r.PSEUDO="pseudo";var a=r.NESTING="nesting";var u=r.ID="id";var f=r.COMMENT="comment";var c=r.COMBINATOR="combinator";var l=r.CLASS="class";var p=r.ATTRIBUTE="attribute";var h=r.UNIVERSAL="universal"},3447:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(7937);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Universal,e);function Universal(r){_classCallCheck(this,Universal);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.UNIVERSAL;t.value="*";return t}return Universal}(i.default);r.default=s;e.exports=r["default"]},1949:(e,r)=>{"use strict";r.__esModule=true;r.default=sortAscending;function sortAscending(e){return e.sort(function(e,r){return e-r})}e.exports=r["default"]},7620:(e,r)=>{"use strict";r.__esModule=true;var t=r.ampersand=38;var n=r.asterisk=42;var i=r.at=64;var o=r.comma=44;var s=r.colon=58;var a=r.semicolon=59;var u=r.openParenthesis=40;var f=r.closeParenthesis=41;var c=r.openSquare=91;var l=r.closeSquare=93;var p=r.dollar=36;var h=r.tilde=126;var B=r.caret=94;var v=r.plus=43;var d=r.equals=61;var b=r.pipe=124;var y=r.greaterThan=62;var g=r.space=32;var m=r.singleQuote=39;var C=r.doubleQuote=34;var w=r.slash=47;var S=r.bang=33;var O=r.backslash=92;var T=r.cr=13;var E=r.feed=12;var k=r.newline=10;var P=r.tab=9;var D=r.str=m;var A=r.comment=-1;var R=r.word=-2;var F=r.combinator=-3},6317:(e,r,t)=>{"use strict";r.__esModule=true;r.FIELDS=undefined;var n,i;r.default=tokenize;var o=t(7620);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}var a=(n={},n[s.tab]=true,n[s.newline]=true,n[s.cr]=true,n[s.feed]=true,n);var u=(i={},i[s.space]=true,i[s.tab]=true,i[s.newline]=true,i[s.cr]=true,i[s.feed]=true,i[s.ampersand]=true,i[s.asterisk]=true,i[s.bang]=true,i[s.comma]=true,i[s.colon]=true,i[s.semicolon]=true,i[s.openParenthesis]=true,i[s.closeParenthesis]=true,i[s.openSquare]=true,i[s.closeSquare]=true,i[s.singleQuote]=true,i[s.doubleQuote]=true,i[s.plus]=true,i[s.pipe]=true,i[s.tilde]=true,i[s.greaterThan]=true,i[s.equals]=true,i[s.dollar]=true,i[s.caret]=true,i[s.slash]=true,i);var f={};var c="0123456789abcdefABCDEF";for(var l=0;l0){g=a+d;m=y-b[d].length}else{g=a;m=o}w=s.comment;a=g;h=g;p=y-m}else if(c===s.slash){y=u;w=c;h=a;p=u-o;f=y+1}else{y=consumeWord(t,u);w=s.word;h=a;p=y-o}f=y+1;break}r.push([w,a,u-o,h,p,u,f]);if(m){o=m;m=null}u=f}return r}},2058:(e,r)=>{"use strict";r.__esModule=true;r.default=ensureObject;function ensureObject(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){e[i]={}}e=e[i]}}e.exports=r["default"]},4600:(e,r)=>{"use strict";r.__esModule=true;r.default=getProp;function getProp(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){return undefined}e=e[i]}return e}e.exports=r["default"]},6913:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(6474);Object.defineProperty(r,"unesc",{enumerable:true,get:function get(){return _interopRequireDefault(n).default}});var i=t(4600);Object.defineProperty(r,"getProp",{enumerable:true,get:function get(){return _interopRequireDefault(i).default}});var o=t(2058);Object.defineProperty(r,"ensureObject",{enumerable:true,get:function get(){return _interopRequireDefault(o).default}});var s=t(6817);Object.defineProperty(r,"stripComments",{enumerable:true,get:function get(){return _interopRequireDefault(s).default}});function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},6817:(e,r)=>{"use strict";r.__esModule=true;r.default=stripComments;function stripComments(e){var r="";var t=e.indexOf("/*");var n=0;while(t>=0){r=r+e.slice(n,t);var i=e.indexOf("*/",t+2);if(i<0){return r}n=i+2;t=e.indexOf("/*",n)}r=r+e.slice(n);return r}e.exports=r["default"]},6474:(e,r)=>{"use strict";r.__esModule=true;r.default=unesc;var t=/\\(?:([0-9a-fA-F]{6})|([0-9a-fA-F]{1,5})(?: |(?![0-9a-fA-F])))/g;var n=/\\(.)/g;function unesc(e){e=e.replace(t,function(e,r,t){var n=r||t;var i=parseInt(n,16);return String.fromCharCode(i)});e=e.replace(n,function(e,r){return r});return e}e.exports=r["default"]},9020:(e,r,t)=>{var n=t(4633);e.exports=n.plugin("postcss-replace-overflow-wrap",function(e){e=e||{};var r=e.method||"replace";return function(e){e.walkDecls("overflow-wrap",function(e){e.cloneBefore({prop:"word-wrap"});if(r==="replace"){e.remove()}})}})},40:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var n=t(4633);var i=_interopRequireDefault(n);var o=t(8746);var s=_interopRequireDefault(o);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function explodeSelectors(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return function(r){r.walkRules(function(r){if(r.selector&&r.selector.indexOf(":matches")>-1){r.selector=(0,s.default)(r,e)}})}}r.default=i.default.plugin("postcss-selector-matches",explodeSelectors);e.exports=r.default},8746:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.default=replaceRuleSelector;var n=t(7009);var i=_interopRequireDefault(n);var o=t(587);var s=_interopRequireDefault(o);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _toConsumableArray(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r-1){var t=[];var n=e.match(/^\s+/);var o=n?n[0]:"";var u=i.default.comma(e);u.forEach(function(e){var n=e.indexOf(a);var u=e.slice(0,n);var f=e.slice(n);var c=(0,s.default)("(",")",f);var l=c&&c.body?i.default.comma(c.body).reduce(function(e,t){return[].concat(_toConsumableArray(e),_toConsumableArray(explodeSelector(t,r)))},[]):[f];var p=c&&c.post?explodeSelector(c.post,r):[];var h=void 0;if(p.length===0){if(n===-1||u.indexOf(" ")>-1){h=l.map(function(e){return o+u+e})}else{h=l.map(function(e){return normalizeSelector(e,o,u)})}}else{h=[];p.forEach(function(e){l.forEach(function(r){h.push(o+u+r+e)})})}t=[].concat(_toConsumableArray(t),_toConsumableArray(h))});return t}return[e]}function replaceRuleSelector(e,r){var t=e.raws&&e.raws.before?e.raws.before.split("\n").pop():"";return explodeSelector(e.selector,r).join(","+(r.lineBreak?"\n"+t:" "))}e.exports=r.default},8158:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var n=t(4633);var i=_interopRequireDefault(n);var o=t(7009);var s=_interopRequireDefault(o);var a=t(587);var u=_interopRequireDefault(a);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function explodeSelector(e,r){var t=locatePseudoClass(r,e);if(r&&t>-1){var n=r.slice(0,t);var i=(0,u.default)("(",")",r.slice(t));var o=i.body?s.default.comma(i.body).map(function(r){return explodeSelector(e,r)}).join(`)${e}(`):"";var a=i.post?explodeSelector(e,i.post):"";return`${n}${e}(${o})${a}`}return r}var f={};function locatePseudoClass(e,r){f[r]=f[r]||new RegExp(`([^\\\\]|^)${r}`);var t=f[r];var n=e.search(t);if(n===-1){return-1}return n+e.slice(n).indexOf(r)}function explodeSelectors(e){return function(){return function(r){r.walkRules(function(r){if(r.selector&&r.selector.indexOf(e)>-1){r.selector=explodeSelector(e,r.selector)}})}}}r.default=i.default.plugin("postcss-selector-not",explodeSelectors(":not"));e.exports=r.default},2334:(e,r,t)=>{"use strict";const n=t(9745);class AtWord extends n{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("")}}n.registerWalker(AtWord);e.exports=AtWord},1776:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Colon extends i{constructor(e){super(e);this.type="colon"}}n.registerWalker(Colon);e.exports=Colon},6429:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Comma extends i{constructor(e){super(e);this.type="comma"}}n.registerWalker(Comma);e.exports=Comma},8688:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Comment extends i{constructor(e){super(e);this.type="comment";this.inline=Object(e).inline||false}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}}n.registerWalker(Comment);e.exports=Comment},9745:(e,r,t)=>{"use strict";const n=t(7203);class Container extends n{constructor(e){super(e);if(!this.nodes){this.nodes=[]}}push(e){e.parent=this;this.nodes.push(e);return this}each(e){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let r=this.lastEach,t,n;this.indexes[r]=0;if(!this.nodes)return undefined;while(this.indexes[r]{let n=e(r,t);if(n!==false&&r.walk){n=r.walk(e)}return n})}walkType(e,r){if(!e||!r){throw new Error("Parameters {type} and {callback} are required.")}const t=typeof e==="function";return this.walk((n,i)=>{if(t&&n instanceof e||!t&&n.type===e){return r.call(this,n,i)}})}append(e){e.parent=this;this.nodes.push(e);return this}prepend(e){e.parent=this;this.nodes.unshift(e);return this}cleanRaws(e){super.cleanRaws(e);if(this.nodes){for(let r of this.nodes)r.cleanRaws(e)}}insertAfter(e,r){let t=this.index(e),n;this.nodes.splice(t+1,0,r);for(let e in this.indexes){n=this.indexes[e];if(t<=n){this.indexes[e]=n+this.nodes.length}}return this}insertBefore(e,r){let t=this.index(e),n;this.nodes.splice(t,0,r);for(let e in this.indexes){n=this.indexes[e];if(t<=n){this.indexes[e]=n+this.nodes.length}}return this}removeChild(e){e=this.index(e);this.nodes[e].parent=undefined;this.nodes.splice(e,1);let r;for(let t in this.indexes){r=this.indexes[t];if(r>=e){this.indexes[t]=r-1}}return this}removeAll(){for(let e of this.nodes)e.parent=undefined;this.nodes=[];return this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){if(typeof e==="number"){return e}else{return this.nodes.indexOf(e)}}get first(){if(!this.nodes)return undefined;return this.nodes[0]}get last(){if(!this.nodes)return undefined;return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");if(this.value){e=this.value+e}if(this.raws.before){e=this.raws.before+e}if(this.raws.after){e+=this.raws.after}return e}}Container.registerWalker=(e=>{let r="walk"+e.name;if(r.lastIndexOf("s")!==r.length-1){r+="s"}if(Container.prototype[r]){return}Container.prototype[r]=function(r){return this.walkType(e,r)}});e.exports=Container},7016:e=>{"use strict";class ParserError extends Error{constructor(e){super(e);this.name=this.constructor.name;this.message=e||"An error ocurred while parsing.";if(typeof Error.captureStackTrace==="function"){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error(e).stack}}}e.exports=ParserError},4828:e=>{"use strict";class TokenizeError extends Error{constructor(e){super(e);this.name=this.constructor.name;this.message=e||"An error ocurred while tokzenizing.";if(typeof Error.captureStackTrace==="function"){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error(e).stack}}}e.exports=TokenizeError},7615:(e,r,t)=>{"use strict";const n=t(9745);class FunctionNode extends n{constructor(e){super(e);this.type="func";this.unbalanced=-1}}n.registerWalker(FunctionNode);e.exports=FunctionNode},9448:(e,r,t)=>{"use strict";const n=t(3663);const i=t(2334);const o=t(1776);const s=t(6429);const a=t(8688);const u=t(7615);const f=t(2541);const c=t(6005);const l=t(6827);const p=t(3300);const h=t(2897);const B=t(2964);const v=t(2945);let d=function(e,r){return new n(e,r)};d.atword=function(e){return new i(e)};d.colon=function(e){return new o(Object.assign({value:":"},e))};d.comma=function(e){return new s(Object.assign({value:","},e))};d.comment=function(e){return new a(e)};d.func=function(e){return new u(e)};d.number=function(e){return new f(e)};d.operator=function(e){return new c(e)};d.paren=function(e){return new l(Object.assign({value:"("},e))};d.string=function(e){return new p(Object.assign({quote:"'"},e))};d.value=function(e){return new B(e)};d.word=function(e){return new v(e)};d.unicodeRange=function(e){return new h(e)};e.exports=d},7203:e=>{"use strict";let r=function(e,t){let n=new e.constructor;for(let i in e){if(!e.hasOwnProperty(i))continue;let o=e[i],s=typeof o;if(i==="parent"&&s==="object"){if(t)n[i]=t}else if(i==="source"){n[i]=o}else if(o instanceof Array){n[i]=o.map(e=>r(e,n))}else if(i!=="before"&&i!=="after"&&i!=="between"&&i!=="semicolon"){if(s==="object"&&o!==null)o=r(o);n[i]=o}}return n};e.exports=class Node{constructor(e){e=e||{};this.raws={before:"",after:""};for(let r in e){this[r]=e[r]}}remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this}toString(){return[this.raws.before,String(this.value),this.raws.after].join("")}clone(e){e=e||{};let t=r(this);for(let r in e){t[r]=e[r]}return t}cloneBefore(e){e=e||{};let r=this.clone(e);this.parent.insertBefore(this,r);return r}cloneAfter(e){e=e||{};let r=this.clone(e);this.parent.insertAfter(this,r);return r}replaceWith(){let e=Array.prototype.slice.call(arguments);if(this.parent){for(let r of e){this.parent.insertBefore(this,r)}this.remove()}return this}moveTo(e){this.cleanRaws(this.root()===e.root());this.remove();e.append(this);return this}moveBefore(e){this.cleanRaws(this.root()===e.root());this.remove();e.parent.insertBefore(e,this);return this}moveAfter(e){this.cleanRaws(this.root()===e.root());this.remove();e.parent.insertAfter(e,this);return 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 r in this){if(!this.hasOwnProperty(r))continue;if(r==="parent")continue;let t=this[r];if(t instanceof Array){e[r]=t.map(e=>{if(typeof e==="object"&&e.toJSON){return e.toJSON()}else{return e}})}else if(typeof t==="object"&&t.toJSON){e[r]=t.toJSON()}else{e[r]=t}}return e}root(){let e=this;while(e.parent)e=e.parent;return e}cleanRaws(e){delete this.raws.before;delete this.raws.after;if(!e)delete this.raws.between}positionInside(e){let r=this.toString(),t=this.source.start.column,n=this.source.start.line;for(let i=0;i{"use strict";const n=t(9745);const i=t(7203);class NumberNode extends i{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("")}}n.registerWalker(NumberNode);e.exports=NumberNode},6005:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Operator extends i{constructor(e){super(e);this.type="operator"}}n.registerWalker(Operator);e.exports=Operator},6827:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Parenthesis extends i{constructor(e){super(e);this.type="paren";this.parenType=""}}n.registerWalker(Parenthesis);e.exports=Parenthesis},3663:(e,r,t)=>{"use strict";const n=t(2413);const i=t(2964);const o=t(2334);const s=t(1776);const a=t(6429);const u=t(8688);const f=t(7615);const c=t(2541);const l=t(6005);const p=t(6827);const h=t(3300);const B=t(2945);const v=t(2897);const d=t(868);const b=t(5202);const y=t(4751);const g=t(5632);const m=t(7016);function sortAscending(e){return e.sort((e,r)=>e-r)}e.exports=class Parser{constructor(e,r){const t={loose:false};this.cache=[];this.input=e;this.options=Object.assign({},t,r);this.position=0;this.unbalanced=0;this.root=new n;let o=new i;this.root.append(o);this.current=o;this.tokens=d(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new s({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 a({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=false,r=this.currToken[1].replace(/\/\*|\*\//g,""),t;if(this.options.loose&&r.startsWith("//")){r=r.substring(2);e=true}t=new u({value:r,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(t);this.position++}error(e,r){throw new m(e+` at line: ${r[2]}, column ${r[3]}`)}loop(){while(this.position0){if(this.current.type==="func"&&this.current.value==="calc"){if(this.prevToken[0]!=="space"&&this.prevToken[0]!=="("){this.error("Syntax Error",this.currToken)}else if(this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"){this.error("Syntax Error",this.currToken)}else if(this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("){this.error("Syntax Error",this.currToken)}}else if(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator"){this.error("Syntax Error",this.currToken)}}}if(!this.options.loose){if(this.nextToken[0]==="word"){return this.word()}}else{if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word"){return this.word()}}}r=new l({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++;return this.newNode(r)}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,r=this.position+1,t=this.currToken,n;while(r=this.tokens.length-1&&!this.current.unbalanced){return}this.current.unbalanced--;if(this.current.unbalanced<0){this.error("Expected opening parenthesis",e)}if(!this.current.unbalanced&&this.cache.length){this.current=this.cache.pop()}}space(){let e=this.currToken;if(this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"){this.current.last.raws.after+=e[1];this.position++}else{this.spaces=e[1];this.position++}}unicodeRange(){let e=this.currToken;this.newNode(new v({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,r=this.currToken[1],t=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/,n=/^(?!\#([a-z0-9]+))[\#\{\}]/gi,i,s;if(!n.test(r)){while(e&&e[0]==="word"){this.position++;let t=this.currToken[1];r+=t;e=this.nextToken}}i=y(r,"@");s=sortAscending(g(b([[0],i])));s.forEach((n,a)=>{let u=s[a+1]||r.length,l=r.slice(n,u),p;if(~i.indexOf(n)){p=new o({value:l.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+n},end:{line:this.currToken[4],column:this.currToken[3]+(u-1)}},sourceIndex:this.currToken[6]+s[a]})}else if(t.test(this.currToken[1])){let e=l.replace(t,"");p=new c({value:l.replace(e,""),source:{start:{line:this.currToken[2],column:this.currToken[3]+n},end:{line:this.currToken[4],column:this.currToken[3]+(u-1)}},sourceIndex:this.currToken[6]+s[a],unit:e})}else{p=new(e&&e[0]==="("?f:B)({value:l,source:{start:{line:this.currToken[2],column:this.currToken[3]+n},end:{line:this.currToken[4],column:this.currToken[3]+(u-1)}},sourceIndex:this.currToken[6]+s[a]});if(p.constructor.name==="Word"){p.isHex=/^#(.+)/.test(l);p.isColor=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(l)}else{this.cache.push(this.current)}}this.newNode(p)});this.position++}string(){let e=this.currToken,r=this.currToken[1],t=/^(\"|\')/,n=t.test(r),i="",o;if(n){i=r.match(t)[0];r=r.slice(1,r.length-1)}o=new h({value:r,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){if(this.spaces){e.raws.before+=this.spaces;this.spaces=""}return 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]}}},2413:(e,r,t)=>{"use strict";const n=t(9745);e.exports=class Root extends n{constructor(e){super(e);this.type="root"}}},3300:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class StringNode extends i{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("")}}n.registerWalker(StringNode);e.exports=StringNode},868:(e,r,t)=>{"use strict";const n="{".charCodeAt(0);const i="}".charCodeAt(0);const o="(".charCodeAt(0);const s=")".charCodeAt(0);const a="'".charCodeAt(0);const u='"'.charCodeAt(0);const f="\\".charCodeAt(0);const c="/".charCodeAt(0);const l=".".charCodeAt(0);const p=",".charCodeAt(0);const h=":".charCodeAt(0);const B="*".charCodeAt(0);const v="-".charCodeAt(0);const d="+".charCodeAt(0);const b="#".charCodeAt(0);const y="\n".charCodeAt(0);const g=" ".charCodeAt(0);const m="\f".charCodeAt(0);const C="\t".charCodeAt(0);const w="\r".charCodeAt(0);const S="@".charCodeAt(0);const O="e".charCodeAt(0);const T="E".charCodeAt(0);const E="0".charCodeAt(0);const k="9".charCodeAt(0);const P="u".charCodeAt(0);const D="U".charCodeAt(0);const A=/[ \n\t\r\{\(\)'"\\;,/]/g;const R=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;const F=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g;const x=/^[a-z0-9]/i;const j=/^[a-f0-9?\-]/i;const I=t(1669);const M=t(4828);e.exports=function tokenize(e,r){r=r||{};let t=[],N=e.valueOf(),_=N.length,L=-1,q=1,G=0,J=0,U=null,H,Q,K,W,Y,z,$,X,Z,V,ee,re;function unclosed(e){let r=I.format("Unclosed %s at line: %d, column: %d, token: %d",e,q,G-L,G);throw new M(r)}function tokenizeError(){let e=I.format("Syntax error at line: %d, column: %d, token: %d",q,G-L,G);throw new M(e)}while(G<_){H=N.charCodeAt(G);if(H===y){L=G;q+=1}switch(H){case y:case g:case C:case w:case m:Q=G;do{Q+=1;H=N.charCodeAt(Q);if(H===y){L=Q;q+=1}}while(H===g||H===y||H===C||H===w||H===m);t.push(["space",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1;break;case h:Q=G+1;t.push(["colon",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1;break;case p:Q=G+1;t.push(["comma",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1;break;case n:t.push(["{","{",q,G-L,q,Q-L,G]);break;case i:t.push(["}","}",q,G-L,q,Q-L,G]);break;case o:J++;U=!U&&J===1&&t.length>0&&t[t.length-1][0]==="word"&&t[t.length-1][1]==="url";t.push(["(","(",q,G-L,q,Q-L,G]);break;case s:J--;U=U&&J>0;t.push([")",")",q,G-L,q,Q-L,G]);break;case a:case u:K=H===a?"'":'"';Q=G;do{V=false;Q=N.indexOf(K,Q+1);if(Q===-1){unclosed("quote",K)}ee=Q;while(N.charCodeAt(ee-1)===f){ee-=1;V=!V}}while(V);t.push(["string",N.slice(G,Q+1),q,G-L,q,Q-L,G]);G=Q;break;case S:A.lastIndex=G+1;A.test(N);if(A.lastIndex===0){Q=N.length-1}else{Q=A.lastIndex-2}t.push(["atword",N.slice(G,Q+1),q,G-L,q,Q-L,G]);G=Q;break;case f:Q=G;H=N.charCodeAt(Q+1);if($&&(H!==c&&H!==g&&H!==y&&H!==C&&H!==w&&H!==m)){Q+=1}t.push(["word",N.slice(G,Q+1),q,G-L,q,Q-L,G]);G=Q;break;case d:case v:case B:Q=G+1;re=N.slice(G+1,Q+1);let e=N.slice(G-1,G);if(H===v&&re.charCodeAt(0)===v){Q++;t.push(["word",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1;break}t.push(["operator",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1;break;default:if(H===c&&(N.charCodeAt(G+1)===B||r.loose&&!U&&N.charCodeAt(G+1)===c)){const e=N.charCodeAt(G+1)===B;if(e){Q=N.indexOf("*/",G+2)+1;if(Q===0){unclosed("comment","*/")}}else{const e=N.indexOf("\n",G+2);Q=e!==-1?e-1:_}z=N.slice(G,Q+1);W=z.split("\n");Y=W.length-1;if(Y>0){X=q+Y;Z=Q-W[Y].length}else{X=q;Z=L}t.push(["comment",z,q,G-L,X,Q-Z,G]);L=Z;q=X;G=Q}else if(H===b&&!x.test(N.slice(G+1,G+2))){Q=G+1;t.push(["#",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1}else if((H===P||H===D)&&N.charCodeAt(G+1)===d){Q=G+2;do{Q+=1;H=N.charCodeAt(Q)}while(Q<_&&j.test(N.slice(Q,Q+1)));t.push(["unicoderange",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1}else if(H===c){Q=G+1;t.push(["operator",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1}else{let e=R;if(H>=E&&H<=k){e=F}e.lastIndex=G+1;e.test(N);if(e.lastIndex===0){Q=N.length-1}else{Q=e.lastIndex-2}if(e===F||H===l){let e=N.charCodeAt(Q),r=N.charCodeAt(Q+1),t=N.charCodeAt(Q+2);if((e===O||e===T)&&(r===v||r===d)&&(t>=E&&t<=k)){F.lastIndex=Q+2;F.test(N);if(F.lastIndex===0){Q=N.length-1}else{Q=F.lastIndex-2}}}t.push(["word",N.slice(G,Q+1),q,G-L,q,Q-L,G]);G=Q}break}G++}return t}},2897:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class UnicodeRange extends i{constructor(e){super(e);this.type="unicode-range"}}n.registerWalker(UnicodeRange);e.exports=UnicodeRange},2964:(e,r,t)=>{"use strict";const n=t(9745);e.exports=class Value extends n{constructor(e){super(e);this.type="value";this.unbalanced=0}}},2945:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Word extends i{constructor(e){super(e);this.type="word"}}n.registerWalker(Word);e.exports=Word},4217:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(5878));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}var i=function(e){_inheritsLoose(AtRule,e);function AtRule(r){var t;t=e.call(this,r)||this;t.type="atrule";return t}var r=AtRule.prototype;r.append=function append(){var r;if(!this.nodes)this.nodes=[];for(var t=arguments.length,n=new Array(t),i=0;i{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(1497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}var i=function(e){_inheritsLoose(Comment,e);function Comment(r){var t;t=e.call(this,r)||this;t.type="comment";return t}return Comment}(n.default);var o=i;r.default=o;e.exports=r.default},5878:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(3605));var i=_interopRequireDefault(t(8259));var o=_interopRequireDefault(t(1497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,r){for(var t=0;t=a.length)break;c=a[f++]}else{f=a.next();if(f.done)break;c=f.value}var l=c;this.nodes.push(l)}}return this};r.prepend=function prepend(){for(var e=arguments.length,r=new Array(e),t=0;t=n.length)break;s=n[o++]}else{o=n.next();if(o.done)break;s=o.value}var a=s;var u=this.normalize(a,this.first,"prepend").reverse();for(var f=u,c=Array.isArray(f),l=0,f=c?f:f[Symbol.iterator]();;){var p;if(c){if(l>=f.length)break;p=f[l++]}else{l=f.next();if(l.done)break;p=l.value}var h=p;this.nodes.unshift(h)}for(var B in this.indexes){this.indexes[B]=this.indexes[B]+u.length}}return this};r.cleanRaws=function cleanRaws(r){e.prototype.cleanRaws.call(this,r);if(this.nodes){for(var t=this.nodes,n=Array.isArray(t),i=0,t=n?t:t[Symbol.iterator]();;){var o;if(n){if(i>=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;s.cleanRaws(r)}}};r.insertBefore=function insertBefore(e,r){e=this.index(e);var t=e===0?"prepend":false;var n=this.normalize(r,this.nodes[e],t).reverse();for(var i=n,o=Array.isArray(i),s=0,i=o?i:i[Symbol.iterator]();;){var a;if(o){if(s>=i.length)break;a=i[s++]}else{s=i.next();if(s.done)break;a=s.value}var u=a;this.nodes.splice(e,0,u)}var f;for(var c in this.indexes){f=this.indexes[c];if(e<=f){this.indexes[c]=f+n.length}}return this};r.insertAfter=function insertAfter(e,r){e=this.index(e);var t=this.normalize(r,this.nodes[e]).reverse();for(var n=t,i=Array.isArray(n),o=0,n=i?n:n[Symbol.iterator]();;){var s;if(i){if(o>=n.length)break;s=n[o++]}else{o=n.next();if(o.done)break;s=o.value}var a=s;this.nodes.splice(e+1,0,a)}var u;for(var f in this.indexes){u=this.indexes[f];if(e=e){this.indexes[t]=r-1}}return this};r.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};r.replaceValues=function replaceValues(e,r,t){if(!t){t=r;r={}}this.walkDecls(function(n){if(r.props&&r.props.indexOf(n.prop)===-1)return;if(r.fast&&n.value.indexOf(r.fast)===-1)return;n.value=n.value.replace(e,t)});return this};r.every=function every(e){return this.nodes.every(e)};r.some=function some(e){return this.nodes.some(e)};r.index=function index(e){if(typeof e==="number"){return e}return this.nodes.indexOf(e)};r.normalize=function normalize(e,r){var o=this;if(typeof e==="string"){var s=t(3749);e=cleanSource(s(e).nodes)}else if(Array.isArray(e)){e=e.slice(0);for(var a=e,u=Array.isArray(a),f=0,a=u?a:a[Symbol.iterator]();;){var c;if(u){if(f>=a.length)break;c=a[f++]}else{f=a.next();if(f.done)break;c=f.value}var l=c;if(l.parent)l.parent.removeChild(l,"ignore")}}else if(e.type==="root"){e=e.nodes.slice(0);for(var p=e,h=Array.isArray(p),B=0,p=h?p:p[Symbol.iterator]();;){var v;if(h){if(B>=p.length)break;v=p[B++]}else{B=p.next();if(B.done)break;v=B.value}var d=v;if(d.parent)d.parent.removeChild(d,"ignore")}}else if(e.type){e=[e]}else if(e.prop){if(typeof e.value==="undefined"){throw new Error("Value field is missed in node creation")}else if(typeof e.value!=="string"){e.value=String(e.value)}e=[new n.default(e)]}else if(e.selector){var b=t(7797);e=[new b(e)]}else if(e.name){var y=t(4217);e=[new y(e)]}else if(e.text){e=[new i.default(e)]}else{throw new Error("Unknown node type in node creation")}var g=e.map(function(e){if(e.parent)e.parent.removeChild(e);if(typeof e.raws.before==="undefined"){if(r&&typeof r.raws.before!=="undefined"){e.raws.before=r.raws.before.replace(/[^\s]/g,"")}}e.parent=o;return e});return g};_createClass(Container,[{key:"first",get:function get(){if(!this.nodes)return undefined;return this.nodes[0]}},{key:"last",get:function get(){if(!this.nodes)return undefined;return this.nodes[this.nodes.length-1]}}]);return Container}(o.default);var a=s;r.default=a;e.exports=r.default},9535:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(8327));var i=_interopRequireDefault(t(2242));var o=_interopRequireDefault(t(8300));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _assertThisInitialized(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}function _wrapNativeSuper(e){var r=typeof Map==="function"?new Map:undefined;_wrapNativeSuper=function _wrapNativeSuper(e){if(e===null||!_isNativeFunction(e))return e;if(typeof e!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof r!=="undefined"){if(r.has(e))return r.get(e);r.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,e)};return _wrapNativeSuper(e)}function isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}function _construct(e,r,t){if(isNativeReflectConstruct()){_construct=Reflect.construct}else{_construct=function _construct(e,r,t){var n=[null];n.push.apply(n,r);var i=Function.bind.apply(e,n);var o=new i;if(t)_setPrototypeOf(o,t.prototype);return o}}return _construct.apply(null,arguments)}function _isNativeFunction(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function _setPrototypeOf(e,r){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,r){e.__proto__=r;return e};return _setPrototypeOf(e,r)}function _getPrototypeOf(e){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(e)}var s=function(e){_inheritsLoose(CssSyntaxError,e);function CssSyntaxError(r,t,n,i,o,s){var a;a=e.call(this,r)||this;a.name="CssSyntaxError";a.reason=r;if(o){a.file=o}if(i){a.source=i}if(s){a.plugin=s}if(typeof t!=="undefined"&&typeof n!=="undefined"){a.line=t;a.column=n}a.setMessage();if(Error.captureStackTrace){Error.captureStackTrace(_assertThisInitialized(a),CssSyntaxError)}return a}var r=CssSyntaxError.prototype;r.setMessage=function setMessage(){this.message=this.plugin?this.plugin+": ":"";this.message+=this.file?this.file:"";if(typeof this.line!=="undefined"){this.message+=":"+this.line+":"+this.column}this.message+=": "+this.reason};r.showSourceCode=function showSourceCode(e){var r=this;if(!this.source)return"";var t=this.source;if(o.default){if(typeof e==="undefined")e=n.default.stdout;if(e)t=(0,o.default)(t)}var s=t.split(/\r?\n/);var a=Math.max(this.line-3,0);var u=Math.min(this.line+2,s.length);var f=String(u).length;function mark(r){if(e&&i.default.red){return i.default.red.bold(r)}return r}function aside(r){if(e&&i.default.gray){return i.default.gray(r)}return r}return s.slice(a,u).map(function(e,t){var n=a+1+t;var i=" "+(" "+n).slice(-f)+" | ";if(n===r.line){var o=aside(i.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," ");return mark(">")+aside(i)+e+"\n "+o+mark("^")}return" "+aside(i)+e}).join("\n")};r.toString=function toString(){var e=this.showSourceCode();if(e){e="\n\n"+e+"\n"}return this.name+": "+this.message+e};return CssSyntaxError}(_wrapNativeSuper(Error));var a=s;r.default=a;e.exports=r.default},3605:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(1497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}var i=function(e){_inheritsLoose(Declaration,e);function Declaration(r){var t;t=e.call(this,r)||this;t.type="decl";return t}return Declaration}(n.default);var o=i;r.default=o;e.exports=r.default},4905:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(5622));var i=_interopRequireDefault(t(9535));var o=_interopRequireDefault(t(2713));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,r){for(var t=0;t"}if(this.map)this.map.file=this.from}var e=Input.prototype;e.error=function error(e,r,t,n){if(n===void 0){n={}}var o;var s=this.origin(r,t);if(s){o=new i.default(e,s.line,s.column,s.source,s.file,n.plugin)}else{o=new i.default(e,r,t,this.css,this.file,n.plugin)}o.input={line:r,column:t,source:this.css};if(this.file)o.input.file=this.file;return o};e.origin=function origin(e,r){if(!this.map)return false;var t=this.map.consumer();var n=t.originalPositionFor({line:e,column:r});if(!n.source)return false;var i={file:this.mapResolve(n.source),line:n.line,column:n.column};var o=t.sourceContentFor(n.source);if(o)i.source=o;return i};e.mapResolve=function mapResolve(e){if(/^\w+:\/\//.test(e)){return e}return n.default.resolve(this.map.consumer().sourceRoot||".",e)};_createClass(Input,[{key:"from",get:function get(){return this.file||this.id}}]);return Input}();var u=a;r.default=u;e.exports=r.default},1169:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(3595));var i=_interopRequireDefault(t(7549));var o=_interopRequireDefault(t(3831));var s=_interopRequireDefault(t(7613));var a=_interopRequireDefault(t(3749));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,r){for(var t=0;tparseInt(s[1])){console.error("Unknown error from PostCSS plugin. Your current PostCSS "+"version is "+i+", but "+t+" uses "+n+". Perhaps this is the source of the error below.")}}}}catch(e){if(console&&console.error)console.error(e)}};e.asyncTick=function asyncTick(e,r){var t=this;if(this.plugin>=this.processor.plugins.length){this.processed=true;return e()}try{var n=this.processor.plugins[this.plugin];var i=this.run(n);this.plugin+=1;if(isPromise(i)){i.then(function(){t.asyncTick(e,r)}).catch(function(e){t.handleError(e,n);t.processed=true;r(e)})}else{this.asyncTick(e,r)}}catch(e){this.processed=true;r(e)}};e.async=function async(){var e=this;if(this.processed){return new Promise(function(r,t){if(e.error){t(e.error)}else{r(e.stringify())}})}if(this.processing){return this.processing}this.processing=new Promise(function(r,t){if(e.error)return t(e.error);e.plugin=0;e.asyncTick(r,t)}).then(function(){e.processed=true;return e.stringify()});return this.processing};e.sync=function sync(){if(this.processed)return this.result;this.processed=true;if(this.processing){throw new Error("Use process(css).then(cb) to work with async plugins")}if(this.error)throw this.error;for(var e=this.result.processor.plugins,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;var o=this.run(i);if(isPromise(o)){throw new Error("Use process(css).then(cb) to work with async plugins")}}return this.result};e.run=function run(e){this.result.lastPlugin=e;try{return e(this.result.root,this.result)}catch(r){this.handleError(r,e);throw r}};e.stringify=function stringify(){if(this.stringified)return this.result;this.stringified=true;this.sync();var e=this.result.opts;var r=i.default;if(e.syntax)r=e.syntax.stringify;if(e.stringifier)r=e.stringifier;if(r.stringify)r=r.stringify;var t=new n.default(r,this.result.root,this.result.opts);var o=t.generate();this.result.css=o[0];this.result.map=o[1];return this.result};_createClass(LazyResult,[{key:"processor",get:function get(){return this.result.processor}},{key:"opts",get:function get(){return this.result.opts}},{key:"css",get:function get(){return this.stringify().css}},{key:"content",get:function get(){return this.stringify().content}},{key:"map",get:function get(){return this.stringify().map}},{key:"root",get:function get(){return this.sync().root}},{key:"messages",get:function get(){return this.sync().messages}}]);return LazyResult}();var f=u;r.default=f;e.exports=r.default},7009:(e,r)=>{"use strict";r.__esModule=true;r.default=void 0;var t={split:function split(e,r,t){var n=[];var i="";var split=false;var o=0;var s=false;var a=false;for(var u=0;u0)o-=1}else if(o===0){if(r.indexOf(f)!==-1)split=true}if(split){if(i!=="")n.push(i.trim());i="";split=false}else{i+=f}}if(t||i!=="")n.push(i.trim());return n},space:function space(e){var r=[" ","\n","\t"];return t.split(e,r)},comma:function comma(e){return t.split(e,[","],true)}};var n=t;r.default=n;e.exports=r.default},3595:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(6241));var i=_interopRequireDefault(t(5622));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var o=function(){function MapGenerator(e,r,t){this.stringify=e;this.mapOpts=t.map||{};this.root=r;this.opts=t}var e=MapGenerator.prototype;e.isMap=function isMap(){if(typeof this.opts.map!=="undefined"){return!!this.opts.map}return this.previous().length>0};e.previous=function previous(){var e=this;if(!this.previousMaps){this.previousMaps=[];this.root.walk(function(r){if(r.source&&r.source.input.map){var t=r.source.input.map;if(e.previousMaps.indexOf(t)===-1){e.previousMaps.push(t)}}})}return this.previousMaps};e.isInline=function isInline(){if(typeof this.mapOpts.inline!=="undefined"){return this.mapOpts.inline}var e=this.mapOpts.annotation;if(typeof e!=="undefined"&&e!==true){return false}if(this.previous().length){return this.previous().some(function(e){return e.inline})}return true};e.isSourcesContent=function isSourcesContent(){if(typeof this.mapOpts.sourcesContent!=="undefined"){return this.mapOpts.sourcesContent}if(this.previous().length){return this.previous().some(function(e){return e.withContent()})}return true};e.clearAnnotation=function clearAnnotation(){if(this.mapOpts.annotation===false)return;var e;for(var r=this.root.nodes.length-1;r>=0;r--){e=this.root.nodes[r];if(e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0){this.root.removeChild(r)}}};e.setSourcesContent=function setSourcesContent(){var e=this;var r={};this.root.walk(function(t){if(t.source){var n=t.source.input.from;if(n&&!r[n]){r[n]=true;var i=e.relative(n);e.map.setSourceContent(i,t.source.input.css)}}})};e.applyPrevMaps=function applyPrevMaps(){for(var e=this.previous(),r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var o;if(r){if(t>=e.length)break;o=e[t++]}else{t=e.next();if(t.done)break;o=t.value}var s=o;var a=this.relative(s.file);var u=s.root||i.default.dirname(s.file);var f=void 0;if(this.mapOpts.sourcesContent===false){f=new n.default.SourceMapConsumer(s.text);if(f.sourcesContent){f.sourcesContent=f.sourcesContent.map(function(){return null})}}else{f=s.consumer()}this.map.applySourceMap(f,a,this.relative(u))}};e.isAnnotation=function isAnnotation(){if(this.isInline()){return true}if(typeof this.mapOpts.annotation!=="undefined"){return this.mapOpts.annotation}if(this.previous().length){return this.previous().some(function(e){return e.annotation})}return true};e.toBase64=function toBase64(e){if(Buffer){return Buffer.from(e).toString("base64")}return window.btoa(unescape(encodeURIComponent(e)))};e.addAnnotation=function addAnnotation(){var e;if(this.isInline()){e="data:application/json;base64,"+this.toBase64(this.map.toString())}else if(typeof this.mapOpts.annotation==="string"){e=this.mapOpts.annotation}else{e=this.outputFile()+".map"}var r="\n";if(this.css.indexOf("\r\n")!==-1)r="\r\n";this.css+=r+"/*# sourceMappingURL="+e+" */"};e.outputFile=function outputFile(){if(this.opts.to){return this.relative(this.opts.to)}if(this.opts.from){return this.relative(this.opts.from)}return"to.css"};e.generateMap=function generateMap(){this.generateString();if(this.isSourcesContent())this.setSourcesContent();if(this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline()){return[this.css]}return[this.css,this.map]};e.relative=function relative(e){if(e.indexOf("<")===0)return e;if(/^\w+:\/\//.test(e))return e;var r=this.opts.to?i.default.dirname(this.opts.to):".";if(typeof this.mapOpts.annotation==="string"){r=i.default.dirname(i.default.resolve(r,this.mapOpts.annotation))}e=i.default.relative(r,e);if(i.default.sep==="\\"){return e.replace(/\\/g,"/")}return e};e.sourcePath=function sourcePath(e){if(this.mapOpts.from){return this.mapOpts.from}return this.relative(e.source.input.from)};e.generateString=function generateString(){var e=this;this.css="";this.map=new n.default.SourceMapGenerator({file:this.outputFile()});var r=1;var t=1;var i,o;this.stringify(this.root,function(n,s,a){e.css+=n;if(s&&a!=="end"){if(s.source&&s.source.start){e.map.addMapping({source:e.sourcePath(s),generated:{line:r,column:t-1},original:{line:s.source.start.line,column:s.source.start.column-1}})}else{e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:r,column:t-1}})}}i=n.match(/\n/g);if(i){r+=i.length;o=n.lastIndexOf("\n");t=n.length-o}else{t+=n.length}if(s&&a!=="start"){var u=s.parent||{raws:{}};if(s.type!=="decl"||s!==u.last||u.raws.semicolon){if(s.source&&s.source.end){e.map.addMapping({source:e.sourcePath(s),generated:{line:r,column:t-2},original:{line:s.source.end.line,column:s.source.end.column-1}})}else{e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:r,column:t-1}})}}}})};e.generate=function generate(){this.clearAnnotation();if(this.isMap()){return this.generateMap()}var e="";this.stringify(this.root,function(r){e+=r});return[e]};return MapGenerator}();var s=o;r.default=s;e.exports=r.default},1497:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(9535));var i=_interopRequireDefault(t(3935));var o=_interopRequireDefault(t(7549));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneNode(e,r){var t=new e.constructor;for(var n in e){if(!e.hasOwnProperty(n))continue;var i=e[n];var o=typeof i;if(n==="parent"&&o==="object"){if(r)t[n]=r}else if(n==="source"){t[n]=i}else if(i instanceof Array){t[n]=i.map(function(e){return cloneNode(e,t)})}else{if(o==="object"&&i!==null)i=cloneNode(i);t[n]=i}}return t}var s=function(){function Node(e){if(e===void 0){e={}}this.raws={};if(process.env.NODE_ENV!=="production"){if(typeof e!=="object"&&typeof e!=="undefined"){throw new Error("PostCSS nodes constructor accepts object, not "+JSON.stringify(e))}}for(var r in e){this[r]=e[r]}}var e=Node.prototype;e.error=function error(e,r){if(r===void 0){r={}}if(this.source){var t=this.positionBy(r);return this.source.input.error(e,t.line,t.column,r)}return new n.default(e)};e.warn=function warn(e,r,t){var n={node:this};for(var i in t){n[i]=t[i]}return e.warn(r,n)};e.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};e.toString=function toString(e){if(e===void 0){e=o.default}if(e.stringify)e=e.stringify;var r="";e(this,function(e){r+=e});return r};e.clone=function clone(e){if(e===void 0){e={}}var r=cloneNode(this);for(var t in e){r[t]=e[t]}return r};e.cloneBefore=function cloneBefore(e){if(e===void 0){e={}}var r=this.clone(e);this.parent.insertBefore(this,r);return r};e.cloneAfter=function cloneAfter(e){if(e===void 0){e={}}var r=this.clone(e);this.parent.insertAfter(this,r);return r};e.replaceWith=function replaceWith(){if(this.parent){for(var e=arguments.length,r=new Array(e),t=0;t{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(9570));var i=_interopRequireDefault(t(4905));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e,r){var t=new i.default(e,r);var o=new n.default(t);try{o.parse()}catch(e){if(process.env.NODE_ENV!=="production"){if(e.name==="CssSyntaxError"&&r&&r.from){if(/\.scss$/i.test(r.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(r.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(r.from)){e.message+="\nYou tried to parse Less with "+"the standard CSS parser; "+"try again with the postcss-less parser"}}}throw e}return o.root}var o=parse;r.default=o;e.exports=r.default},9570:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(3605));var i=_interopRequireDefault(t(1926));var o=_interopRequireDefault(t(8259));var s=_interopRequireDefault(t(4217));var a=_interopRequireDefault(t(5907));var u=_interopRequireDefault(t(7797));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var f=function(){function Parser(e){this.input=e;this.root=new a.default;this.current=this.root;this.spaces="";this.semicolon=false;this.createTokenizer();this.root.source={input:e,start:{line:1,column:1}}}var e=Parser.prototype;e.createTokenizer=function createTokenizer(){this.tokenizer=(0,i.default)(this.input)};e.parse=function parse(){var e;while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();switch(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()};e.comment=function comment(e){var r=new o.default;this.init(r,e[2],e[3]);r.source.end={line:e[4],column:e[5]};var t=e[1].slice(2,-2);if(/^\s*$/.test(t)){r.text="";r.raws.left=t;r.raws.right=""}else{var n=t.match(/^(\s*)([^]*[^\s])(\s*)$/);r.text=n[2];r.raws.left=n[1];r.raws.right=n[3]}};e.emptyRule=function emptyRule(e){var r=new u.default;this.init(r,e[2],e[3]);r.selector="";r.raws.between="";this.current=r};e.other=function other(e){var r=false;var t=null;var n=false;var i=null;var o=[];var s=[];var a=e;while(a){t=a[0];s.push(a);if(t==="("||t==="["){if(!i)i=a;o.push(t==="("?")":"]")}else if(o.length===0){if(t===";"){if(n){this.decl(s);return}else{break}}else if(t==="{"){this.rule(s);return}else if(t==="}"){this.tokenizer.back(s.pop());r=true;break}else if(t===":"){n=true}}else if(t===o[o.length-1]){o.pop();if(o.length===0)i=null}a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())r=true;if(o.length>0)this.unclosedBracket(i);if(r&&n){while(s.length){a=s[s.length-1][0];if(a!=="space"&&a!=="comment")break;this.tokenizer.back(s.pop())}this.decl(s)}else{this.unknownWord(s)}};e.rule=function rule(e){e.pop();var r=new u.default;this.init(r,e[0][2],e[0][3]);r.raws.between=this.spacesAndCommentsFromEnd(e);this.raw(r,"selector",e);this.current=r};e.decl=function decl(e){var r=new n.default;this.init(r);var t=e[e.length-1];if(t[0]===";"){this.semicolon=true;e.pop()}if(t[4]){r.source.end={line:t[4],column:t[5]}}else{r.source.end={line:t[2],column:t[3]}}while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);r.raws.before+=e.shift()[1]}r.source.start={line:e[0][2],column:e[0][3]};r.prop="";while(e.length){var i=e[0][0];if(i===":"||i==="space"||i==="comment"){break}r.prop+=e.shift()[1]}r.raws.between="";var o;while(e.length){o=e.shift();if(o[0]===":"){r.raws.between+=o[1];break}else{if(o[0]==="word"&&/\w/.test(o[1])){this.unknownWord([o])}r.raws.between+=o[1]}}if(r.prop[0]==="_"||r.prop[0]==="*"){r.raws.before+=r.prop[0];r.prop=r.prop.slice(1)}r.raws.between+=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(var s=e.length-1;s>0;s--){o=e[s];if(o[1].toLowerCase()==="!important"){r.important=true;var a=this.stringFrom(e,s);a=this.spacesFromEnd(e)+a;if(a!==" !important")r.raws.important=a;break}else if(o[1].toLowerCase()==="important"){var u=e.slice(0);var f="";for(var c=s;c>0;c--){var l=u[c][0];if(f.trim().indexOf("!")===0&&l!=="space"){break}f=u.pop()[1]+f}if(f.trim().indexOf("!")===0){r.important=true;r.raws.important=f;e=u}}if(o[0]!=="space"&&o[0]!=="comment"){break}}this.raw(r,"value",e);if(r.value.indexOf(":")!==-1)this.checkMissedSemicolon(e)};e.atrule=function atrule(e){var r=new s.default;r.name=e[1].slice(1);if(r.name===""){this.unnamedAtrule(r,e)}this.init(r,e[2],e[3]);var t;var n;var i=false;var o=false;var a=[];while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();if(e[0]===";"){r.source.end={line:e[2],column:e[3]};this.semicolon=true;break}else if(e[0]==="{"){o=true;break}else if(e[0]==="}"){if(a.length>0){n=a.length-1;t=a[n];while(t&&t[0]==="space"){t=a[--n]}if(t){r.source.end={line:t[4],column:t[5]}}}this.end(e);break}else{a.push(e)}if(this.tokenizer.endOfFile()){i=true;break}}r.raws.between=this.spacesAndCommentsFromEnd(a);if(a.length){r.raws.afterName=this.spacesAndCommentsFromStart(a);this.raw(r,"params",a);if(i){e=a[a.length-1];r.source.end={line:e[4],column:e[5]};this.spaces=r.raws.between;r.raws.between=""}}else{r.raws.afterName="";r.params=""}if(o){r.nodes=[];this.current=r}};e.end=function end(e){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={line:e[2],column:e[3]};this.current=this.current.parent}else{this.unexpectedClose(e)}};e.endFile=function 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};e.freeSemicolon=function freeSemicolon(e){this.spaces+=e[1];if(this.current.nodes){var r=this.current.nodes[this.current.nodes.length-1];if(r&&r.type==="rule"&&!r.raws.ownSemicolon){r.raws.ownSemicolon=this.spaces;this.spaces=""}}};e.init=function init(e,r,t){this.current.push(e);e.source={start:{line:r,column:t},input:this.input};e.raws.before=this.spaces;this.spaces="";if(e.type!=="comment")this.semicolon=false};e.raw=function raw(e,r,t){var n,i;var o=t.length;var s="";var a=true;var u,f;var c=/^([.|#])?([\w])+/i;for(var l=0;l=0;i--){n=e[i];if(n[0]!=="space"){t+=1;if(t===2)break}}throw this.input.error("Missed semicolon",n[2],n[3])};return Parser}();r.default=f;e.exports=r.default},4633:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(3605));var i=_interopRequireDefault(t(8074));var o=_interopRequireDefault(t(7549));var s=_interopRequireDefault(t(8259));var a=_interopRequireDefault(t(4217));var u=_interopRequireDefault(t(216));var f=_interopRequireDefault(t(3749));var c=_interopRequireDefault(t(7009));var l=_interopRequireDefault(t(7797));var p=_interopRequireDefault(t(5907));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function postcss(){for(var e=arguments.length,r=new Array(e),t=0;t{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(6241));var i=_interopRequireDefault(t(5622));var o=_interopRequireDefault(t(5747));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function fromBase64(e){if(Buffer){return Buffer.from(e,"base64").toString()}else{return window.atob(e)}}var s=function(){function PreviousMap(e,r){this.loadAnnotation(e);this.inline=this.startWith(this.annotation,"data:");var t=r.map?r.map.prev:undefined;var n=this.loadMap(r.from,t);if(n)this.text=n}var e=PreviousMap.prototype;e.consumer=function consumer(){if(!this.consumerCache){this.consumerCache=new n.default.SourceMapConsumer(this.text)}return this.consumerCache};e.withContent=function withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)};e.startWith=function startWith(e,r){if(!e)return false;return e.substr(0,r.length)===r};e.getAnnotationURL=function getAnnotationURL(e){return e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//)[1].trim()};e.loadAnnotation=function loadAnnotation(e){var r=e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//gm);if(r&&r.length>0){var t=r[r.length-1];if(t){this.annotation=this.getAnnotationURL(t)}}};e.decodeInline=function decodeInline(e){var r=/^data:application\/json;charset=utf-?8;base64,/;var t=/^data:application\/json;base64,/;var n="data:application/json,";if(this.startWith(e,n)){return decodeURIComponent(e.substr(n.length))}if(r.test(e)||t.test(e)){return fromBase64(e.substr(RegExp.lastMatch.length))}var i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)};e.loadMap=function loadMap(e,r){if(r===false)return false;if(r){if(typeof r==="string"){return r}else if(typeof r==="function"){var t=r(e);if(t&&o.default.existsSync&&o.default.existsSync(t)){return o.default.readFileSync(t,"utf-8").toString().trim()}else{throw new Error("Unable to load previous source map: "+t.toString())}}else if(r instanceof n.default.SourceMapConsumer){return n.default.SourceMapGenerator.fromSourceMap(r).toString()}else if(r instanceof n.default.SourceMapGenerator){return r.toString()}else if(this.isMap(r)){return JSON.stringify(r)}else{throw new Error("Unsupported previous source map format: "+r.toString())}}else if(this.inline){return this.decodeInline(this.annotation)}else if(this.annotation){var s=this.annotation;if(e)s=i.default.join(i.default.dirname(e),s);this.root=i.default.dirname(s);if(o.default.existsSync&&o.default.existsSync(s)){return o.default.readFileSync(s,"utf-8").toString().trim()}else{return false}}};e.isMap=function isMap(e){if(typeof e!=="object")return false;return typeof e.mappings==="string"||typeof e._mappings==="string"};return PreviousMap}();var a=s;r.default=a;e.exports=r.default},8074:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(1169));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i=function(){function Processor(e){if(e===void 0){e=[]}this.version="7.0.32";this.plugins=this.normalize(e)}var e=Processor.prototype;e.use=function use(e){this.plugins=this.plugins.concat(this.normalize([e]));return this};e.process=function(e){function process(r){return e.apply(this,arguments)}process.toString=function(){return e.toString()};return process}(function(e,r){if(r===void 0){r={}}if(this.plugins.length===0&&r.parser===r.stringifier){if(process.env.NODE_ENV!=="production"){if(typeof console!=="undefined"&&console.warn){console.warn("You did not set any plugins, parser, or stringifier. "+"Right now, PostCSS does nothing. Pick plugins for your case "+"on https://www.postcss.parts/ and use them in postcss.config.js.")}}}return new n.default(this,e,r)});e.normalize=function normalize(e){var r=[];for(var t=e,n=Array.isArray(t),i=0,t=n?t:t[Symbol.iterator]();;){var o;if(n){if(i>=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;if(s.postcss)s=s.postcss;if(typeof s==="object"&&Array.isArray(s.plugins)){r=r.concat(s.plugins)}else if(typeof s==="function"){r.push(s)}else if(typeof s==="object"&&(s.parse||s.stringify)){if(process.env.NODE_ENV!=="production"){throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use "+"one of the syntax/parser/stringifier options as outlined "+"in your PostCSS runner documentation.")}}else{throw new Error(s+" is not a PostCSS plugin")}}return r};return Processor}();var o=i;r.default=o;e.exports=r.default},7613:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(7338));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(5878));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}var i=function(e){_inheritsLoose(Root,e);function Root(r){var t;t=e.call(this,r)||this;t.type="root";if(!t.nodes)t.nodes=[];return t}var r=Root.prototype;r.removeChild=function removeChild(r,t){var n=this.index(r);if(!t&&n===0&&this.nodes.length>1){this.nodes[1].raws.before=this.nodes[n].raws.before}return e.prototype.removeChild.call(this,r)};r.normalize=function normalize(r,t,n){var i=e.prototype.normalize.call(this,r);if(t){if(n==="prepend"){if(this.nodes.length>1){t.raws.before=this.nodes[1].raws.before}else{delete t.raws.before}}else if(this.first!==t){for(var o=i,s=Array.isArray(o),a=0,o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u;f.raws.before=t.raws.before}}}return i};r.toResult=function toResult(e){if(e===void 0){e={}}var r=t(1169);var n=t(8074);var i=new r(new n,this,e);return i.stringify()};return Root}(n.default);var o=i;r.default=o;e.exports=r.default},7797:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(5878));var i=_interopRequireDefault(t(7009));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;r.default=void 0;var t={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:false};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}var n=function(){function Stringifier(e){this.builder=e}var e=Stringifier.prototype;e.stringify=function stringify(e,r){this[e.type](e,r)};e.root=function root(e){this.body(e);if(e.raws.after)this.builder(e.raws.after)};e.comment=function comment(e){var r=this.raw(e,"left","commentLeft");var t=this.raw(e,"right","commentRight");this.builder("/*"+r+e.text+t+"*/",e)};e.decl=function decl(e,r){var t=this.raw(e,"between","colon");var n=e.prop+t+this.rawValue(e,"value");if(e.important){n+=e.raws.important||" !important"}if(r)n+=";";this.builder(n,e)};e.rule=function rule(e){this.block(e,this.rawValue(e,"selector"));if(e.raws.ownSemicolon){this.builder(e.raws.ownSemicolon,e,"end")}};e.atrule=function atrule(e,r){var t="@"+e.name;var n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!=="undefined"){t+=e.raws.afterName}else if(n){t+=" "}if(e.nodes){this.block(e,t+n)}else{var i=(e.raws.between||"")+(r?";":"");this.builder(t+n+i,e)}};e.body=function body(e){var r=e.nodes.length-1;while(r>0){if(e.nodes[r].type!=="comment")break;r-=1}var t=this.raw(e,"semicolon");for(var n=0;n0){if(typeof e.raws.after!=="undefined"){r=e.raws.after;if(r.indexOf("\n")!==-1){r=r.replace(/[^\n]+$/,"")}return false}}});if(r)r=r.replace(/[^\s]/g,"");return r};e.rawBeforeOpen=function rawBeforeOpen(e){var r;e.walk(function(e){if(e.type!=="decl"){r=e.raws.between;if(typeof r!=="undefined")return false}});return r};e.rawColon=function rawColon(e){var r;e.walkDecls(function(e){if(typeof e.raws.between!=="undefined"){r=e.raws.between.replace(/[^\s:]/g,"");return false}});return r};e.beforeAfter=function beforeAfter(e,r){var t;if(e.type==="decl"){t=this.raw(e,null,"beforeDecl")}else if(e.type==="comment"){t=this.raw(e,null,"beforeComment")}else if(r==="before"){t=this.raw(e,null,"beforeRule")}else{t=this.raw(e,null,"beforeClose")}var n=e.parent;var i=0;while(n&&n.type!=="root"){i+=1;n=n.parent}if(t.indexOf("\n")!==-1){var o=this.raw(e,null,"indent");if(o.length){for(var s=0;s{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(3935));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringify(e,r){var t=new n.default(r);t.stringify(e)}var i=stringify;r.default=i;e.exports=r.default},8300:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(2242));var i=_interopRequireDefault(t(1926));var o=_interopRequireDefault(t(4905));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s={brackets:n.default.cyan,"at-word":n.default.cyan,comment:n.default.gray,string:n.default.green,class:n.default.yellow,call:n.default.cyan,hash:n.default.magenta,"(":n.default.cyan,")":n.default.cyan,"{":n.default.yellow,"}":n.default.yellow,"[":n.default.yellow,"]":n.default.yellow,":":n.default.yellow,";":n.default.yellow};function getTokenType(e,r){var t=e[0],n=e[1];if(t==="word"){if(n[0]==="."){return"class"}if(n[0]==="#"){return"hash"}}if(!r.endOfFile()){var i=r.nextToken();r.back(i);if(i[0]==="brackets"||i[0]==="(")return"call"}return t}function terminalHighlight(e){var r=(0,i.default)(new o.default(e),{ignoreErrors:true});var t="";var n=function _loop(){var e=r.nextToken();var n=s[getTokenType(e,r)];if(n){t+=e[1].split(/\r?\n/).map(function(e){return n(e)}).join("\n")}else{t+=e[1]}};while(!r.endOfFile()){n()}return t}var a=terminalHighlight;r.default=a;e.exports=r.default},1926:(e,r)=>{"use strict";r.__esModule=true;r.default=tokenizer;var t="'".charCodeAt(0);var n='"'.charCodeAt(0);var i="\\".charCodeAt(0);var o="/".charCodeAt(0);var s="\n".charCodeAt(0);var a=" ".charCodeAt(0);var u="\f".charCodeAt(0);var f="\t".charCodeAt(0);var c="\r".charCodeAt(0);var l="[".charCodeAt(0);var p="]".charCodeAt(0);var h="(".charCodeAt(0);var B=")".charCodeAt(0);var v="{".charCodeAt(0);var d="}".charCodeAt(0);var b=";".charCodeAt(0);var y="*".charCodeAt(0);var g=":".charCodeAt(0);var m="@".charCodeAt(0);var C=/[ \n\t\r\f{}()'"\\;/[\]#]/g;var w=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g;var S=/.[\\/("'\n]/;var O=/[a-f0-9]/i;function tokenizer(e,r){if(r===void 0){r={}}var T=e.css.valueOf();var E=r.ignoreErrors;var k,P,D,A,R,F,x;var j,I,M,N,_,L,q;var G=T.length;var J=-1;var U=1;var H=0;var Q=[];var K=[];function position(){return H}function unclosed(r){throw e.error("Unclosed "+r,U,H-J)}function endOfFile(){return K.length===0&&H>=G}function nextToken(e){if(K.length)return K.pop();if(H>=G)return;var r=e?e.ignoreUnclosed:false;k=T.charCodeAt(H);if(k===s||k===u||k===c&&T.charCodeAt(H+1)!==s){J=H;U+=1}switch(k){case s:case a:case f:case c:case u:P=H;do{P+=1;k=T.charCodeAt(P);if(k===s){J=P;U+=1}}while(k===a||k===s||k===f||k===c||k===u);q=["space",T.slice(H,P)];H=P-1;break;case l:case p:case v:case d:case g:case b:case B:var W=String.fromCharCode(k);q=[W,W,U,H-J];break;case h:_=Q.length?Q.pop()[1]:"";L=T.charCodeAt(H+1);if(_==="url"&&L!==t&&L!==n&&L!==a&&L!==s&&L!==f&&L!==u&&L!==c){P=H;do{M=false;P=T.indexOf(")",P+1);if(P===-1){if(E||r){P=H;break}else{unclosed("bracket")}}N=P;while(T.charCodeAt(N-1)===i){N-=1;M=!M}}while(M);q=["brackets",T.slice(H,P+1),U,H-J,U,P-J];H=P}else{P=T.indexOf(")",H+1);F=T.slice(H,P+1);if(P===-1||S.test(F)){q=["(","(",U,H-J]}else{q=["brackets",F,U,H-J,U,P-J];H=P}}break;case t:case n:D=k===t?"'":'"';P=H;do{M=false;P=T.indexOf(D,P+1);if(P===-1){if(E||r){P=H+1;break}else{unclosed("string")}}N=P;while(T.charCodeAt(N-1)===i){N-=1;M=!M}}while(M);F=T.slice(H,P+1);A=F.split("\n");R=A.length-1;if(R>0){j=U+R;I=P-A[R].length}else{j=U;I=J}q=["string",T.slice(H,P+1),U,H-J,j,P-I];J=I;U=j;H=P;break;case m:C.lastIndex=H+1;C.test(T);if(C.lastIndex===0){P=T.length-1}else{P=C.lastIndex-2}q=["at-word",T.slice(H,P+1),U,H-J,U,P-J];H=P;break;case i:P=H;x=true;while(T.charCodeAt(P+1)===i){P+=1;x=!x}k=T.charCodeAt(P+1);if(x&&k!==o&&k!==a&&k!==s&&k!==f&&k!==c&&k!==u){P+=1;if(O.test(T.charAt(P))){while(O.test(T.charAt(P+1))){P+=1}if(T.charCodeAt(P+1)===a){P+=1}}}q=["word",T.slice(H,P+1),U,H-J,U,P-J];H=P;break;default:if(k===o&&T.charCodeAt(H+1)===y){P=T.indexOf("*/",H+2)+1;if(P===0){if(E||r){P=T.length}else{unclosed("comment")}}F=T.slice(H,P+1);A=F.split("\n");R=A.length-1;if(R>0){j=U+R;I=P-A[R].length}else{j=U;I=J}q=["comment",F,U,H-J,j,P-I];J=I;U=j;H=P}else{w.lastIndex=H+1;w.test(T);if(w.lastIndex===0){P=T.length-1}else{P=w.lastIndex-2}q=["word",T.slice(H,P+1),U,H-J,U,P-J];Q.push(q);H=P}break}H++;return q}function back(e){K.push(e)}return{back:back,nextToken:nextToken,endOfFile:endOfFile,position:position}}e.exports=r.default},216:(e,r)=>{"use strict";r.__esModule=true;r.default=void 0;var t={prefix:function prefix(e){var r=e.match(/^(-\w+-)/);if(r){return r[0]}return""},unprefixed:function unprefixed(e){return e.replace(/^-\w+-/,"")}};var n=t;r.default=n;e.exports=r.default},3831:(e,r)=>{"use strict";r.__esModule=true;r.default=warnOnce;var t={};function warnOnce(e){if(t[e])return;t[e]=true;if(typeof console!=="undefined"&&console.warn){console.warn(e)}}e.exports=r.default},7338:(e,r)=>{"use strict";r.__esModule=true;r.default=void 0;var t=function(){function Warning(e,r){if(r===void 0){r={}}this.type="warning";this.text=e;if(r.node&&r.node.source){var t=r.node.positionBy(r);this.line=t.line;this.column=t.column}for(var n in r){this[n]=r[n]}}var e=Warning.prototype;e.toString=function toString(){if(this.node){return this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message}if(this.plugin){return this.plugin+": "+this.text}return this.text};return Warning}();var n=t;r.default=n;e.exports=r.default},8327:(e,r,t)=>{"use strict";const n=t(2087);const i=t(8379);const{env:o}=process;let s;if(i("no-color")||i("no-colors")||i("color=false")||i("color=never")){s=0}else if(i("color")||i("colors")||i("color=true")||i("color=always")){s=1}if("FORCE_COLOR"in o){if(o.FORCE_COLOR===true||o.FORCE_COLOR==="true"){s=1}else if(o.FORCE_COLOR===false||o.FORCE_COLOR==="false"){s=0}else{s=o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(s===0){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!e.isTTY&&s===undefined){return 0}const r=s||0;if(o.TERM==="dumb"){return r}if(process.platform==="win32"){const e=n.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in o){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in o)||o.CI_NAME==="codeship"){return 1}return r}if("TEAMCITY_VERSION"in o){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0}if(o.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(o.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)){return 1}if("COLORTERM"in o){return 1}return r}function getSupportLevel(e){const r=supportsColor(e);return translateLevel(r)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},5632:e=>{"use strict";function unique_pred(e,r){var t=1,n=e.length,i=e[0],o=e[0];for(var s=1;s{"use strict";e.exports=require("browserslist")},4338:e=>{"use strict";e.exports=require("caniuse-lite")},2242:e=>{"use strict";e.exports=require("chalk")},5747:e=>{"use strict";e.exports=require("fs")},6241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},1669:e=>{"use strict";e.exports=require("util")}};var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var n=r[t]={id:t,loaded:false,exports:{}};var i=true;try{e[t](n,n.exports,__webpack_require__);i=false}finally{if(i)delete r[t]}n.loaded=true;return n.exports}(()=>{__webpack_require__.nmd=(e=>{e.paths=[];if(!e.children)e.children=[];return e})})();__webpack_require__.ab=__dirname+"/";return __webpack_require__(7435)})(); \ No newline at end of file +module.exports=(()=>{var e={3094:e=>{"use strict";e.exports=JSON.parse('[{"id":"all-property","title":"`all` Property","description":"A property for defining the reset of all properties of an element","specification":"https://www.w3.org/TR/css-cascade-3/#all-shorthand","stage":3,"caniuse":"css-all","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/all"},"example":"a {\\n all: initial;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/maximkoretskiy/postcss-initial"}]},{"id":"any-link-pseudo-class","title":"`:any-link` Hyperlink Pseudo-Class","description":"A pseudo-class for matching anchor elements independent of whether they have been visited","specification":"https://www.w3.org/TR/selectors-4/#any-link-pseudo","stage":2,"caniuse":"css-any-link","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:any-link"},"example":"nav :any-link > span {\\n background-color: yellow;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-pseudo-class-any-link"}]},{"id":"blank-pseudo-class","title":"`:blank` Empty-Value Pseudo-Class","description":"A pseudo-class for matching form elements when they are empty","specification":"https://drafts.csswg.org/selectors-4/#blank","stage":1,"example":"input:blank {\\n background-color: yellow;\\n}","polyfills":[{"type":"JavaScript Library","link":"https://github.com/csstools/css-blank-pseudo"},{"type":"PostCSS Plugin","link":"https://github.com/csstools/css-blank-pseudo"}]},{"id":"break-properties","title":"Break Properties","description":"Properties for defining the break behavior between and within boxes","specification":"https://www.w3.org/TR/css-break-3/#breaking-controls","stage":3,"caniuse":"multicolumn","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/break-after"},"example":"a {\\n break-inside: avoid;\\n break-before: avoid-column;\\n break-after: always;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/shrpne/postcss-page-break"}]},{"id":"case-insensitive-attributes","title":"Case-Insensitive Attributes","description":"An attribute selector matching attribute values case-insensitively","specification":"https://www.w3.org/TR/selectors-4/#attribute-case","stage":2,"caniuse":"css-case-insensitive","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors"},"example":"[frame=hsides i] {\\n border-style: solid none;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/Semigradsky/postcss-attribute-case-insensitive"}]},{"id":"color-adjust","title":"`color-adjust` Property","description":"The color-adjust property is a non-standard CSS extension that can be used to force printing of background colors and images","specification":"https://www.w3.org/TR/css-color-4/#color-adjust","stage":2,"caniuse":"css-color-adjust","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/color-adjust"},"example":".background {\\n background-color:#ccc;\\n}\\n.background.color-adjust {\\n color-adjust: economy;\\n}\\n.background.color-adjust-exact {\\n color-adjust: exact;\\n}"},{"id":"color-functional-notation","title":"Color Functional Notation","description":"A space and slash separated notation for specifying colors","specification":"https://drafts.csswg.org/css-color/#ref-for-funcdef-rgb%E2%91%A1%E2%91%A0","stage":1,"example":"em {\\n background-color: hsl(120deg 100% 25%);\\n box-shadow: 0 0 0 10px hwb(120deg 100% 25% / 80%);\\n color: rgb(0 255 0);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-color-functional-notation"}]},{"id":"color-mod-function","title":"`color-mod()` Function","description":"A function for modifying colors","specification":"https://www.w3.org/TR/css-color-4/#funcdef-color-mod","stage":-1,"example":"p {\\n color: color-mod(black alpha(50%));\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-color-mod-function"}]},{"id":"custom-media-queries","title":"Custom Media Queries","description":"An at-rule for defining aliases that represent media queries","specification":"https://drafts.csswg.org/mediaqueries-5/#at-ruledef-custom-media","stage":1,"example":"@custom-media --narrow-window (max-width: 30em);\\n\\n@media (--narrow-window) {}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-custom-media"}]},{"id":"custom-properties","title":"Custom Properties","description":"A syntax for defining custom values accepted by all CSS properties","specification":"https://www.w3.org/TR/css-variables-1/","stage":3,"caniuse":"css-variables","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/var"},"example":"img {\\n --some-length: 32px;\\n\\n height: var(--some-length);\\n width: var(--some-length);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-custom-properties"}]},{"id":"custom-property-sets","title":"Custom Property Sets","description":"A syntax for storing properties in named variables, referenceable in other style rules","specification":"https://tabatkins.github.io/specs/css-apply-rule/","stage":-1,"caniuse":"css-apply-rule","example":"img {\\n --some-length-styles: {\\n height: 32px;\\n width: 32px;\\n };\\n\\n @apply --some-length-styles;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/pascalduez/postcss-apply"}]},{"id":"custom-selectors","title":"Custom Selectors","description":"An at-rule for defining aliases that represent selectors","specification":"https://drafts.csswg.org/css-extensions/#custom-selectors","stage":1,"example":"@custom-selector :--heading h1, h2, h3, h4, h5, h6;\\n\\narticle :--heading + p {}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-custom-selectors"}]},{"id":"dir-pseudo-class","title":"`:dir` Directionality Pseudo-Class","description":"A pseudo-class for matching elements based on their directionality","specification":"https://www.w3.org/TR/selectors-4/#dir-pseudo","stage":2,"caniuse":"css-dir-pseudo","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:dir"},"example":"blockquote:dir(rtl) {\\n margin-right: 10px;\\n}\\n\\nblockquote:dir(ltr) {\\n margin-left: 10px;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-dir-pseudo-class"}]},{"id":"double-position-gradients","title":"Double Position Gradients","description":"A syntax for using two positions in a gradient.","specification":"https://www.w3.org/TR/css-images-4/#color-stop-syntax","stage":2,"caniuse-compat":{"and_chr":{"71":"y"},"chrome":{"71":"y"}},"example":".pie_chart {\\n background-image: conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-double-position-gradients"}]},{"id":"environment-variables","title":"Custom Environment Variables","description":"A syntax for using custom values accepted by CSS globally","specification":"https://drafts.csswg.org/css-env-1/","stage":0,"caniuse-compat":{"and_chr":{"69":"y"},"chrome":{"69":"y"},"ios_saf":{"11.2":"y"},"safari":{"11.2":"y"}},"docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/env"},"example":"@media (max-width: env(--brand-small)) {\\n body {\\n padding: env(--brand-spacing);\\n }\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-env-function"}]},{"id":"focus-visible-pseudo-class","title":"`:focus-visible` Focus-Indicated Pseudo-Class","description":"A pseudo-class for matching focused elements that indicate that focus to a user","specification":"https://www.w3.org/TR/selectors-4/#focus-visible-pseudo","stage":2,"caniuse":"css-focus-visible","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible"},"example":":focus:not(:focus-visible) {\\n outline: 0;\\n}","polyfills":[{"type":"JavaScript Library","link":"https://github.com/WICG/focus-visible"},{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-focus-visible"}]},{"id":"focus-within-pseudo-class","title":"`:focus-within` Focus Container Pseudo-Class","description":"A pseudo-class for matching elements that are either focused or that have focused descendants","specification":"https://www.w3.org/TR/selectors-4/#focus-within-pseudo","stage":2,"caniuse":"css-focus-within","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-within"},"example":"form:focus-within {\\n background: rgba(0, 0, 0, 0.3);\\n}","polyfills":[{"type":"JavaScript Library","link":"https://github.com/jonathantneal/focus-within"},{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-focus-within"}]},{"id":"font-variant-property","title":"`font-variant` Property","description":"A property for defining the usage of alternate glyphs in a font","specification":"https://www.w3.org/TR/css-fonts-3/#propdef-font-variant","stage":3,"caniuse":"font-variant-alternates","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant"},"example":"h2 {\\n font-variant: small-caps;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-font-variant"}]},{"id":"gap-properties","title":"Gap Properties","description":"Properties for defining gutters within a layout","specification":"https://www.w3.org/TR/css-grid-1/#gutters","stage":3,"caniuse-compat":{"chrome":{"66":"y"},"edge":{"16":"y"},"firefox":{"61":"y"},"safari":{"11.2":"y","TP":"y"}},"docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/gap"},"example":".grid-1 {\\n gap: 20px;\\n}\\n\\n.grid-2 {\\n column-gap: 40px;\\n row-gap: 20px;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-gap-properties"}]},{"id":"gray-function","title":"`gray()` Function","description":"A function for specifying fully desaturated colors","specification":"https://www.w3.org/TR/css-color-4/#funcdef-gray","stage":2,"example":"p {\\n color: gray(50);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-color-gray"}]},{"id":"grid-layout","title":"Grid Layout","description":"A syntax for using a grid concept to lay out content","specification":"https://www.w3.org/TR/css-grid-1/","stage":3,"caniuse":"css-grid","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/grid"},"example":"section {\\n display: grid;\\n grid-template-columns: 100px 100px 100px;\\n grid-gap: 10px;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/autoprefixer"}]},{"id":"has-pseudo-class","title":"`:has()` Relational Pseudo-Class","description":"A pseudo-class for matching ancestor and sibling elements","specification":"https://www.w3.org/TR/selectors-4/#has-pseudo","stage":2,"caniuse":"css-has","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:has"},"example":"a:has(> img) {\\n display: block;\\n}","polyfills":[{"type":"JavaScript Library","link":"https://github.com/csstools/css-has-pseudo"},{"type":"PostCSS Plugin","link":"https://github.com/csstools/css-has-pseudo"}]},{"id":"hexadecimal-alpha-notation","title":"Hexadecimal Alpha Notation","description":"A 4 & 8 character hex color notation for specifying the opacity level","specification":"https://www.w3.org/TR/css-color-4/#hex-notation","stage":2,"caniuse":"css-rrggbbaa","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Syntax_2"},"example":"section {\\n background-color: #f3f3f3f3;\\n color: #0003;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-color-hex-alpha"}]},{"id":"hwb-function","title":"`hwb()` Function","description":"A function for specifying colors by hue and then a degree of whiteness and blackness to mix into it","specification":"https://www.w3.org/TR/css-color-4/#funcdef-hwb","stage":2,"example":"p {\\n color: hwb(120 44% 50%);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-color-hwb"}]},{"id":"image-set-function","title":"`image-set()` Function","description":"A function for specifying image sources based on the user’s resolution","specification":"https://www.w3.org/TR/css-images-4/#image-set-notation","stage":2,"caniuse":"css-image-set","example":"p {\\n background-image: image-set(\\n \\"foo.png\\" 1x,\\n \\"foo-2x.png\\" 2x,\\n \\"foo-print.png\\" 600dpi\\n );\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-image-set-function"}]},{"id":"in-out-of-range-pseudo-class","title":"`:in-range` and `:out-of-range` Pseudo-Classes","description":"A pseudo-class for matching elements that have range limitations","specification":"https://www.w3.org/TR/selectors-4/#range-pseudos","stage":2,"caniuse":"css-in-out-of-range","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:in-range"},"example":"input:in-range {\\n background-color: rgba(0, 255, 0, 0.25);\\n}\\ninput:out-of-range {\\n background-color: rgba(255, 0, 0, 0.25);\\n border: 2px solid red;\\n}"},{"id":"lab-function","title":"`lab()` Function","description":"A function for specifying colors expressed in the CIE Lab color space","specification":"https://www.w3.org/TR/css-color-4/#funcdef-lab","stage":2,"example":"body {\\n color: lab(240 50 20);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-lab-function"}]},{"id":"lch-function","title":"`lch()` Function","description":"A function for specifying colors expressed in the CIE Lab color space with chroma and hue","specification":"https://www.w3.org/TR/css-color-4/#funcdef-lch","stage":2,"example":"body {\\n color: lch(53 105 40);\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-lab-function"}]},{"id":"logical-properties-and-values","title":"Logical Properties and Values","description":"Flow-relative (left-to-right or right-to-left) properties and values","specification":"https://www.w3.org/TR/css-logical-1/","stage":2,"caniuse":"css-logical-props","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties"},"example":"span:first-child {\\n float: inline-start;\\n margin-inline-start: 10px;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-logical-properties"}]},{"id":"matches-pseudo-class","title":"`:matches()` Matches-Any Pseudo-Class","description":"A pseudo-class for matching elements in a selector list","specification":"https://www.w3.org/TR/selectors-4/#matches-pseudo","stage":2,"caniuse":"css-matches-pseudo","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:matches"},"example":"p:matches(:first-child, .special) {\\n margin-top: 1em;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-selector-matches"}]},{"id":"media-query-ranges","title":"Media Query Ranges","description":"A syntax for defining media query ranges using ordinary comparison operators","specification":"https://www.w3.org/TR/mediaqueries-4/#range-context","stage":3,"docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax_improvements_in_Level_4"},"example":"@media (width < 480px) {}\\n\\n@media (480px <= width < 768px) {}\\n\\n@media (width >= 768px) {}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-media-minmax"}]},{"id":"nesting-rules","title":"Nesting Rules","description":"A syntax for nesting relative rules within rules","specification":"https://drafts.csswg.org/css-nesting-1/","stage":1,"example":"article {\\n & p {\\n color: #333;\\n }\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-nesting"}]},{"id":"not-pseudo-class","title":"`:not()` Negation List Pseudo-Class","description":"A pseudo-class for ignoring elements in a selector list","specification":"https://www.w3.org/TR/selectors-4/#negation-pseudo","stage":2,"caniuse":"css-not-sel-list","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:not"},"example":"p:not(:first-child, .special) {\\n margin-top: 1em;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-selector-not"}]},{"id":"overflow-property","title":"`overflow` Shorthand Property","description":"A property for defining `overflow-x` and `overflow-y`","specification":"https://www.w3.org/TR/css-overflow-3/#propdef-overflow","stage":2,"caniuse":"css-overflow","caniuse-compat":{"and_chr":{"68":"y"},"and_ff":{"61":"y"},"chrome":{"68":"y"},"firefox":{"61":"y"}},"docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/overflow"},"example":"html {\\n overflow: hidden auto;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-overflow-shorthand"}]},{"id":"overflow-wrap-property","title":"`overflow-wrap` Property","description":"A property for defining whether to insert line breaks within words to prevent overflowing","specification":"https://www.w3.org/TR/css-text-3/#overflow-wrap-property","stage":2,"caniuse":"wordwrap","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap"},"example":"p {\\n overflow-wrap: break-word;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/mattdimu/postcss-replace-overflow-wrap"}]},{"id":"overscroll-behavior-property","title":"`overscroll-behavior` Property","description":"Properties for controlling when the scroll position of a scroll container reaches the edge of a scrollport","specification":"https://drafts.csswg.org/css-overscroll-behavior","stage":1,"caniuse":"css-overscroll-behavior","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior"},"example":".messages {\\n height: 220px;\\n overflow: auto;\\n overscroll-behavior-y: contain;\\n}\\n\\nbody {\\n margin: 0;\\n overscroll-behavior: none;\\n}"},{"id":"place-properties","title":"Place Properties","description":"Properties for defining alignment within a layout","specification":"https://www.w3.org/TR/css-align-3/#place-items-property","stage":2,"caniuse-compat":{"chrome":{"59":"y"},"firefox":{"45":"y"}},"docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/place-content"},"example":".example {\\n place-content: flex-end;\\n place-items: center / space-between;\\n place-self: flex-start / center;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/jonathantneal/postcss-place"}]},{"id":"prefers-color-scheme-query","title":"`prefers-color-scheme` Media Query","description":"A media query to detect if the user has requested the system use a light or dark color theme","specification":"https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme","stage":1,"caniuse":"prefers-color-scheme","caniuse-compat":{"ios_saf":{"12.1":"y"},"safari":{"12.1":"y"}},"example":"body {\\n background-color: white;\\n color: black;\\n}\\n\\n@media (prefers-color-scheme: dark) {\\n body {\\n background-color: black;\\n color: white;\\n }\\n}","polyfills":[{"type":"JavaScript Library","link":"https://github.com/csstools/css-prefers-color-scheme"},{"type":"PostCSS Plugin","link":"https://github.com/csstools/css-prefers-color-scheme"}]},{"id":"prefers-reduced-motion-query","title":"`prefers-reduced-motion` Media Query","description":"A media query to detect if the user has requested less animation and general motion on the page","specification":"https://drafts.csswg.org/mediaqueries-5/#prefers-reduced-motion","stage":1,"caniuse":"prefers-reduced-motion","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion"},"example":".animation {\\n animation: vibrate 0.3s linear infinite both; \\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n .animation {\\n animation: none;\\n }\\n}"},{"id":"read-only-write-pseudo-class","title":"`:read-only` and `:read-write` selectors","description":"Pseudo-classes to match elements which are considered user-alterable","specification":"https://www.w3.org/TR/selectors-4/#rw-pseudos","stage":2,"caniuse":"css-read-only-write","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/:read-only"},"example":"input:read-only {\\n background-color: #ccc;\\n}"},{"id":"rebeccapurple-color","title":"`rebeccapurple` Color","description":"A particularly lovely shade of purple in memory of Rebecca Alison Meyer","specification":"https://www.w3.org/TR/css-color-4/#valdef-color-rebeccapurple","stage":2,"caniuse":"css-rebeccapurple","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/color_value"},"example":"html {\\n color: rebeccapurple;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/postcss/postcss-color-rebeccapurple"}]},{"id":"system-ui-font-family","title":"`system-ui` Font Family","description":"A generic font used to match the user’s interface","specification":"https://www.w3.org/TR/css-fonts-4/#system-ui-def","stage":2,"caniuse":"font-family-system-ui","docs":{"mdn":"https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Syntax"},"example":"body {\\n font-family: system-ui;\\n}","polyfills":[{"type":"PostCSS Plugin","link":"https://github.com/JLHwung/postcss-font-family-system-ui"}]},{"id":"when-else-rules","title":"When/Else Rules","description":"At-rules for specifying media queries and support queries in a single grammar","specification":"https://tabatkins.github.io/specs/css-when-else/","stage":0,"example":"@when media(width >= 640px) and (supports(display: flex) or supports(display: grid)) {\\n /* A */\\n} @else media(pointer: coarse) {\\n /* B */\\n} @else {\\n /* C */\\n}"},{"id":"where-pseudo-class","title":"`:where()` Zero-Specificity Pseudo-Class","description":"A pseudo-class for matching elements in a selector list without contributing specificity","specification":"https://drafts.csswg.org/selectors-4/#where-pseudo","stage":1,"example":"a:where(:not(:hover)) {\\n text-decoration: none;\\n}"}]')},9614:e=>{"use strict";e.exports=JSON.parse('[{"prop":"animation","initial":"${animation-name} ${animation-duration} ${animation-timing-function} ${animation-delay} ${animation-iteration-count} ${animation-direction} ${animation-fill-mode} ${animation-play-state}","combined":true},{"prop":"animation-delay","initial":"0s"},{"prop":"animation-direction","initial":"normal"},{"prop":"animation-duration","initial":"0s"},{"prop":"animation-fill-mode","initial":"none"},{"prop":"animation-iteration-count","initial":"1"},{"prop":"animation-name","initial":"none"},{"prop":"animation-play-state","initial":"running"},{"prop":"animation-timing-function","initial":"ease"},{"prop":"backface-visibility","initial":"visible","basic":true},{"prop":"background","initial":"${background-color} ${background-image} ${background-repeat} ${background-position} / ${background-size} ${background-origin} ${background-clip} ${background-attachment}","combined":true},{"prop":"background-attachment","initial":"scroll"},{"prop":"background-clip","initial":"border-box"},{"prop":"background-color","initial":"transparent"},{"prop":"background-image","initial":"none"},{"prop":"background-origin","initial":"padding-box"},{"prop":"background-position","initial":"0 0"},{"prop":"background-position-x","initial":"0"},{"prop":"background-position-y","initial":"0"},{"prop":"background-repeat","initial":"repeat"},{"prop":"background-size","initial":"auto auto"},{"prop":"border","initial":"${border-width} ${border-style} ${border-color}","combined":true},{"prop":"border-style","initial":"none"},{"prop":"border-width","initial":"medium"},{"prop":"border-color","initial":"currentColor"},{"prop":"border-bottom","initial":"0"},{"prop":"border-bottom-color","initial":"currentColor"},{"prop":"border-bottom-left-radius","initial":"0"},{"prop":"border-bottom-right-radius","initial":"0"},{"prop":"border-bottom-style","initial":"none"},{"prop":"border-bottom-width","initial":"medium"},{"prop":"border-collapse","initial":"separate","basic":true,"inherited":true},{"prop":"border-image","initial":"none","basic":true},{"prop":"border-left","initial":"0"},{"prop":"border-left-color","initial":"currentColor"},{"prop":"border-left-style","initial":"none"},{"prop":"border-left-width","initial":"medium"},{"prop":"border-radius","initial":"0","basic":true},{"prop":"border-right","initial":"0"},{"prop":"border-right-color","initial":"currentColor"},{"prop":"border-right-style","initial":"none"},{"prop":"border-right-width","initial":"medium"},{"prop":"border-spacing","initial":"0","basic":true,"inherited":true},{"prop":"border-top","initial":"0"},{"prop":"border-top-color","initial":"currentColor"},{"prop":"border-top-left-radius","initial":"0"},{"prop":"border-top-right-radius","initial":"0"},{"prop":"border-top-style","initial":"none"},{"prop":"border-top-width","initial":"medium"},{"prop":"bottom","initial":"auto","basic":true},{"prop":"box-shadow","initial":"none","basic":true},{"prop":"box-sizing","initial":"content-box","basic":true},{"prop":"caption-side","initial":"top","basic":true,"inherited":true},{"prop":"clear","initial":"none","basic":true},{"prop":"clip","initial":"auto","basic":true},{"prop":"color","initial":"#000","basic":true},{"prop":"columns","initial":"auto","basic":true},{"prop":"column-count","initial":"auto","basic":true},{"prop":"column-fill","initial":"balance","basic":true},{"prop":"column-gap","initial":"normal","basic":true},{"prop":"column-rule","initial":"${column-rule-width} ${column-rule-style} ${column-rule-color}","combined":true},{"prop":"column-rule-color","initial":"currentColor"},{"prop":"column-rule-style","initial":"none"},{"prop":"column-rule-width","initial":"medium"},{"prop":"column-span","initial":"1","basic":true},{"prop":"column-width","initial":"auto","basic":true},{"prop":"content","initial":"normal","basic":true},{"prop":"counter-increment","initial":"none","basic":true},{"prop":"counter-reset","initial":"none","basic":true},{"prop":"cursor","initial":"auto","basic":true,"inherited":true},{"prop":"direction","initial":"ltr","basic":true,"inherited":true},{"prop":"display","initial":"inline","basic":true},{"prop":"empty-cells","initial":"show","basic":true,"inherited":true},{"prop":"float","initial":"none","basic":true},{"prop":"font","contains":["font-style","font-variant","font-weight","font-stretch","font-size","line-height","font-family"],"basic":true,"inherited":true},{"prop":"font-family","initial":"serif"},{"prop":"font-size","initial":"medium"},{"prop":"font-style","initial":"normal"},{"prop":"font-variant","initial":"normal"},{"prop":"font-weight","initial":"normal"},{"prop":"font-stretch","initial":"normal"},{"prop":"line-height","initial":"normal","inherited":true},{"prop":"height","initial":"auto","basic":true},{"prop":"hyphens","initial":"none","basic":true,"inherited":true},{"prop":"left","initial":"auto","basic":true},{"prop":"letter-spacing","initial":"normal","basic":true,"inherited":true},{"prop":"list-style","initial":"${list-style-type} ${list-style-position} ${list-style-image}","combined":true,"inherited":true},{"prop":"list-style-image","initial":"none"},{"prop":"list-style-position","initial":"outside"},{"prop":"list-style-type","initial":"disc"},{"prop":"margin","initial":"0","basic":true},{"prop":"margin-bottom","initial":"0"},{"prop":"margin-left","initial":"0"},{"prop":"margin-right","initial":"0"},{"prop":"margin-top","initial":"0"},{"prop":"max-height","initial":"none","basic":true},{"prop":"max-width","initial":"none","basic":true},{"prop":"min-height","initial":"0","basic":true},{"prop":"min-width","initial":"0","basic":true},{"prop":"opacity","initial":"1","basic":true},{"prop":"orphans","initial":"2","basic":true},{"prop":"outline","initial":"${outline-width} ${outline-style} ${outline-color}","combined":true},{"prop":"outline-color","initial":"invert"},{"prop":"outline-style","initial":"none"},{"prop":"outline-width","initial":"medium"},{"prop":"overflow","initial":"visible","basic":true},{"prop":"overflow-x","initial":"visible","basic":true},{"prop":"overflow-y","initial":"visible","basic":true},{"prop":"padding","initial":"0","basic":true},{"prop":"padding-bottom","initial":"0"},{"prop":"padding-left","initial":"0"},{"prop":"padding-right","initial":"0"},{"prop":"padding-top","initial":"0"},{"prop":"page-break-after","initial":"auto","basic":true},{"prop":"page-break-before","initial":"auto","basic":true},{"prop":"page-break-inside","initial":"auto","basic":true},{"prop":"perspective","initial":"none","basic":true},{"prop":"perspective-origin","initial":"50% 50%","basic":true},{"prop":"position","initial":"static","basic":true},{"prop":"quotes","initial":"“ ” ‘ ’"},{"prop":"right","initial":"auto","basic":true},{"prop":"tab-size","initial":"8","basic":true,"inherited":true},{"prop":"table-layout","initial":"auto","basic":true},{"prop":"text-align","initial":"left","basic":true,"inherited":true},{"prop":"text-align-last","initial":"auto","basic":true,"inherited":true},{"prop":"text-decoration","initial":"${text-decoration-line}","combined":true},{"prop":"text-decoration-color","initial":"inherited"},{"prop":"text-decoration-color","initial":"currentColor"},{"prop":"text-decoration-line","initial":"none"},{"prop":"text-decoration-style","initial":"solid"},{"prop":"text-indent","initial":"0","basic":true,"inherited":true},{"prop":"text-shadow","initial":"none","basic":true,"inherited":true},{"prop":"text-transform","initial":"none","basic":true,"inherited":true},{"prop":"top","initial":"auto","basic":true},{"prop":"transform","initial":"none","basic":true},{"prop":"transform-origin","initial":"50% 50% 0","basic":true},{"prop":"transform-style","initial":"flat","basic":true},{"prop":"transition","initial":"${transition-property} ${transition-duration} ${transition-timing-function} ${transition-delay}","combined":true},{"prop":"transition-delay","initial":"0s"},{"prop":"transition-duration","initial":"0s"},{"prop":"transition-property","initial":"none"},{"prop":"transition-timing-function","initial":"ease"},{"prop":"unicode-bidi","initial":"normal","basic":true},{"prop":"vertical-align","initial":"baseline","basic":true},{"prop":"visibility","initial":"visible","basic":true,"inherited":true},{"prop":"white-space","initial":"normal","basic":true,"inherited":true},{"prop":"widows","initial":"2","basic":true,"inherited":true},{"prop":"width","initial":"auto","basic":true},{"prop":"word-spacing","initial":"normal","basic":true,"inherited":true},{"prop":"z-index","initial":"auto","basic":true}]')},4567:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});function rgb2hue(e,r,t){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;var i=rgb2value(e,r,t);var o=rgb2whiteness(e,r,t);var s=i-o;if(s){var a=i===e?(r-t)/s:i===r?(t-e)/s:(e-r)/s;var u=i===e?a<0?360/60:0/60:i===r?120/60:240/60;var f=(a+u)*60;return f}else{return n}}function hue2rgb(e,r,t){var n=t<0?t+360:t>360?t-360:t;var i=n*6<360?e+(r-e)*n/60:n*2<360?r:n*3<720?e+(r-e)*(240-n)/60:e;return i}function rgb2value(e,r,t){var n=Math.max(e,r,t);return n}function rgb2whiteness(e,r,t){var n=Math.min(e,r,t);return n}function matrix(e,r){return r.map(function(r){return r.reduce(function(r,t,n){return r+e[n]*t},0)})}var t=96.42;var n=100;var i=82.49;var o=Math.pow(6,3)/Math.pow(29,3);var s=Math.pow(29,3)/Math.pow(3,3);function rgb2hsl(e,r,t,n){var i=rgb2hue(e,r,t,n);var o=rgb2value(e,r,t);var s=rgb2whiteness(e,r,t);var a=o-s;var u=(o+s)/2;var f=a===0?0:a/(100-Math.abs(2*u-100))*100;return[i,f,u]}function hsl2rgb(e,r,t){var n=t<=50?t*(r+100)/100:t+r-t*r/100;var i=t*2-n;var o=[hue2rgb(i,n,e+120),hue2rgb(i,n,e),hue2rgb(i,n,e-120)],s=o[0],a=o[1],u=o[2];return[s,a,u]}var a=function(){function sliceIterator(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(i)throw o}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function rgb2hwb(e,r,t,n){var i=rgb2hue(e,r,t,n);var o=rgb2whiteness(e,r,t);var s=rgb2value(e,r,t);var a=100-s;return[i,o,a]}function hwb2rgb(e,r,t,n){var i=hsl2rgb(e,100,50,n).map(function(e){return e*(100-r-t)/100+r}),o=a(i,3),s=o[0],u=o[1],f=o[2];return[s,u,f]}var u=function(){function sliceIterator(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(i)throw o}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function rgb2hsv(e,r,t,n){var i=rgb2value(e,r,t);var o=rgb2whiteness(e,r,t);var s=rgb2hue(e,r,t,n);var a=i===o?0:(i-o)/i*100;return[s,a,i]}function hsv2rgb(e,r,t){var n=Math.floor(e/60);var i=e/60-n&1?e/60-n:1-e/60-n;var o=t*(100-r)/100;var s=t*(100-r*i)/100;var a=n===5?[t,o,s]:n===4?[s,o,t]:n===3?[o,s,t]:n===2?[o,t,s]:n===1?[s,t,o]:[t,s,o],f=u(a,3),c=f[0],l=f[1],p=f[2];return[c,l,p]}var f=function(){function sliceIterator(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(i)throw o}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function rgb2xyz(e,r,t){var n=[e,r,t].map(function(e){return e>4.045?Math.pow((e+5.5)/105.5,2.4)*100:e/12.92}),i=f(n,3),o=i[0],s=i[1],a=i[2];var u=matrix([o,s,a],[[.4124564,.3575761,.1804375],[.2126729,.7151522,.072175],[.0193339,.119192,.9503041]]),c=f(u,3),l=c[0],p=c[1],h=c[2];return[l,p,h]}function xyz2rgb(e,r,t){var n=matrix([e,r,t],[[3.2404542,-1.5371385,-.4985314],[-.969266,1.8760108,.041556],[.0556434,-.2040259,1.0572252]]),i=f(n,3),o=i[0],s=i[1],a=i[2];var u=[o,s,a].map(function(e){return e>.31308?1.055*Math.pow(e/100,1/2.4)*100-5.5:12.92*e}),c=f(u,3),l=c[0],p=c[1],h=c[2];return[l,p,h]}function hsl2hsv(e,r,t){var n=r*(t<50?t:100-t)/100;var i=n===0?0:2*n/(t+n)*100;var o=t+n;return[e,i,o]}function hsv2hsl(e,r,t){var n=(200-r)*t/100;var i=n===0||n===200?0:r*t/100/(n<=100?n:200-n)*100,o=n*5/10;return[e,i,o]}function hwb2hsv(e,r,t){var n=e,i=t===100?0:100-r/(100-t)*100,o=100-t;return[n,i,o]}function hsv2hwb(e,r,t){var n=e,i=(100-r)*t/100,o=100-t;return[n,i,o]}var c=function(){function sliceIterator(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(i)throw o}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function lab2xyz(e,r,a){var u=(e+16)/116;var f=r/500+u;var l=u-a/200;var p=Math.pow(f,3)>o?Math.pow(f,3):(116*f-16)/s,h=e>s*o?Math.pow((e+16)/116,3):e/s,B=Math.pow(l,3)>o?Math.pow(l,3):(116*l-16)/s;var v=matrix([p*t,h*n,B*i],[[.9555766,-.0230393,.0631636],[-.0282895,1.0099416,.0210077],[.0122982,-.020483,1.3299098]]),d=c(v,3),b=d[0],y=d[1],g=d[2];return[b,y,g]}function xyz2lab(e,r,a){var u=matrix([e,r,a],[[1.0478112,.0228866,-.050127],[.0295424,.9904844,-.0170491],[-.0092345,.0150436,.7521316]]),f=c(u,3),l=f[0],p=f[1],h=f[2];var B=[l/t,p/n,h/i].map(function(e){return e>o?Math.cbrt(e):(s*e+16)/116}),v=c(B,3),d=v[0],b=v[1],y=v[2];var g=116*b-16,m=500*(d-b),C=200*(b-y);return[g,m,C]}function lab2lch(e,r,t){var n=[Math.sqrt(Math.pow(r,2)+Math.pow(t,2)),Math.atan2(t,r)*180/Math.PI],i=n[0],o=n[1];return[e,i,o]}function lch2lab(e,r,t){var n=r*Math.cos(t*Math.PI/180),i=r*Math.sin(t*Math.PI/180);return[e,n,i]}var l=function(){function sliceIterator(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(i)throw o}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();function rgb2lab(e,r,t){var n=rgb2xyz(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=xyz2lab(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function lab2rgb(e,r,t){var n=lab2xyz(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=xyz2rgb(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function rgb2lch(e,r,t){var n=rgb2xyz(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=xyz2lab(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=lab2lch(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];return[d,b,y]}function lch2rgb(e,r,t){var n=lch2lab(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=lab2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2rgb(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];return[d,b,y]}function hwb2hsl(e,r,t){var n=hwb2hsv(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=hsv2hsl(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function hsl2hwb(e,r,t){var n=hsl2hsv(e,r,t),i=l(n,3),o=i[1],s=i[2];var a=hsv2hwb(e,o,s),u=l(a,3),f=u[1],c=u[2];return[e,f,c]}function hsl2lab(e,r,t){var n=hsl2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];return[d,b,y]}function lab2hsl(e,r,t,n){var i=lab2xyz(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=xyz2rgb(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=rgb2hsl(p,h,B,n),d=l(v,3),b=d[0],y=d[1],g=d[2];return[b,y,g]}function hsl2lch(e,r,t){var n=hsl2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];var g=lab2lch(d,b,y),m=l(g,3),C=m[0],w=m[1],S=m[2];return[C,w,S]}function lch2hsl(e,r,t,n){var i=lch2lab(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=lab2xyz(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=xyz2rgb(p,h,B),d=l(v,3),b=d[0],y=d[1],g=d[2];var m=rgb2hsl(b,y,g,n),C=l(m,3),w=C[0],S=C[1],O=C[2];return[w,S,O]}function hsl2xyz(e,r,t){var n=hsl2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function xyz2hsl(e,r,t,n){var i=xyz2rgb(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=rgb2hsl(s,a,u,n),c=l(f,3),p=c[0],h=c[1],B=c[2];return[p,h,B]}function hwb2lab(e,r,t){var n=hwb2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];return[d,b,y]}function lab2hwb(e,r,t,n){var i=lab2xyz(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=xyz2rgb(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=rgb2hwb(p,h,B,n),d=l(v,3),b=d[0],y=d[1],g=d[2];return[b,y,g]}function hwb2lch(e,r,t){var n=hwb2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];var g=lab2lch(d,b,y),m=l(g,3),C=m[0],w=m[1],S=m[2];return[C,w,S]}function lch2hwb(e,r,t,n){var i=lch2lab(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=lab2xyz(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=xyz2rgb(p,h,B),d=l(v,3),b=d[0],y=d[1],g=d[2];var m=rgb2hwb(b,y,g,n),C=l(m,3),w=C[0],S=C[1],O=C[2];return[w,S,O]}function hwb2xyz(e,r,t){var n=hwb2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function xyz2hwb(e,r,t,n){var i=xyz2rgb(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=rgb2hwb(s,a,u,n),c=l(f,3),p=c[0],h=c[1],B=c[2];return[p,h,B]}function hsv2lab(e,r,t){var n=hsv2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];return[d,b,y]}function lab2hsv(e,r,t,n){var i=lab2xyz(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=xyz2rgb(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=rgb2hsv(p,h,B,n),d=l(v,3),b=d[0],y=d[1],g=d[2];return[b,y,g]}function hsv2lch(e,r,t){var n=hsv2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];var B=xyz2lab(c,p,h),v=l(B,3),d=v[0],b=v[1],y=v[2];var g=lab2lch(d,b,y),m=l(g,3),C=m[0],w=m[1],S=m[2];return[C,w,S]}function lch2hsv(e,r,t,n){var i=lch2lab(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=lab2xyz(s,a,u),c=l(f,3),p=c[0],h=c[1],B=c[2];var v=xyz2rgb(p,h,B),d=l(v,3),b=d[0],y=d[1],g=d[2];var m=rgb2hsv(b,y,g,n),C=l(m,3),w=C[0],S=C[1],O=C[2];return[w,S,O]}function hsv2xyz(e,r,t){var n=hsv2rgb(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=rgb2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function xyz2hsv(e,r,t,n){var i=xyz2rgb(e,r,t),o=l(i,3),s=o[0],a=o[1],u=o[2];var f=rgb2hsv(s,a,u,n),c=l(f,3),p=c[0],h=c[1],B=c[2];return[p,h,B]}function xyz2lch(e,r,t){var n=xyz2lab(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=lab2lch(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}function lch2xyz(e,r,t){var n=lch2lab(e,r,t),i=l(n,3),o=i[0],s=i[1],a=i[2];var u=lab2xyz(o,s,a),f=l(u,3),c=f[0],p=f[1],h=f[2];return[c,p,h]}var p={rgb2hsl:rgb2hsl,rgb2hwb:rgb2hwb,rgb2lab:rgb2lab,rgb2lch:rgb2lch,rgb2hsv:rgb2hsv,rgb2xyz:rgb2xyz,hsl2rgb:hsl2rgb,hsl2hwb:hsl2hwb,hsl2lab:hsl2lab,hsl2lch:hsl2lch,hsl2hsv:hsl2hsv,hsl2xyz:hsl2xyz,hwb2rgb:hwb2rgb,hwb2hsl:hwb2hsl,hwb2lab:hwb2lab,hwb2lch:hwb2lch,hwb2hsv:hwb2hsv,hwb2xyz:hwb2xyz,lab2rgb:lab2rgb,lab2hsl:lab2hsl,lab2hwb:lab2hwb,lab2lch:lab2lch,lab2hsv:lab2hsv,lab2xyz:lab2xyz,lch2rgb:lch2rgb,lch2hsl:lch2hsl,lch2hwb:lch2hwb,lch2lab:lch2lab,lch2hsv:lch2hsv,lch2xyz:lch2xyz,hsv2rgb:hsv2rgb,hsv2hsl:hsv2hsl,hsv2hwb:hsv2hwb,hsv2lab:hsv2lab,hsv2lch:hsv2lch,hsv2xyz:hsv2xyz,xyz2rgb:xyz2rgb,xyz2hsl:xyz2hsl,xyz2hwb:xyz2hwb,xyz2lab:xyz2lab,xyz2lch:xyz2lch,xyz2hsv:xyz2hsv,rgb2hue:rgb2hue};r.rgb2hsl=rgb2hsl;r.rgb2hwb=rgb2hwb;r.rgb2lab=rgb2lab;r.rgb2lch=rgb2lch;r.rgb2hsv=rgb2hsv;r.rgb2xyz=rgb2xyz;r.hsl2rgb=hsl2rgb;r.hsl2hwb=hsl2hwb;r.hsl2lab=hsl2lab;r.hsl2lch=hsl2lch;r.hsl2hsv=hsl2hsv;r.hsl2xyz=hsl2xyz;r.hwb2rgb=hwb2rgb;r.hwb2hsl=hwb2hsl;r.hwb2lab=hwb2lab;r.hwb2lch=hwb2lch;r.hwb2hsv=hwb2hsv;r.hwb2xyz=hwb2xyz;r.lab2rgb=lab2rgb;r.lab2hsl=lab2hsl;r.lab2hwb=lab2hwb;r.lab2lch=lab2lch;r.lab2hsv=lab2hsv;r.lab2xyz=lab2xyz;r.lch2rgb=lch2rgb;r.lch2hsl=lch2hsl;r.lch2hwb=lch2hwb;r.lch2lab=lch2lab;r.lch2hsv=lch2hsv;r.lch2xyz=lch2xyz;r.hsv2rgb=hsv2rgb;r.hsv2hsl=hsv2hsl;r.hsv2hwb=hsv2hwb;r.hsv2lab=hsv2lab;r.hsv2lch=hsv2lch;r.hsv2xyz=hsv2xyz;r.xyz2rgb=xyz2rgb;r.xyz2hsl=xyz2hsl;r.xyz2hwb=xyz2hwb;r.xyz2lab=xyz2lab;r.xyz2lch=xyz2lch;r.xyz2hsv=xyz2hsv;r.rgb2hue=rgb2hue;r.default=p},4394:(e,r,t)=>{"use strict";var n=t(4338).feature;function browsersSort(e,r){e=e.split(" ");r=r.split(" ");if(e[0]>r[0]){return 1}else if(e[0]=t.length)break;s=t[o++]}else{o=t.next();if(o.done)break;s=o.value}var a=s;i[a]=Object.assign({},r)}}function add(e,r){for(var t=e,n=Array.isArray(t),o=0,t=n?t:t[Symbol.iterator]();;){var s;if(n){if(o>=t.length)break;s=t[o++]}else{o=t.next();if(o.done)break;s=o.value}var a=s;i[a].browsers=i[a].browsers.concat(r.browsers).sort(browsersSort)}}e.exports=i;f(t(9888),function(e){return prefix(["border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],{mistakes:["-khtml-","-ms-","-o-"],feature:"border-radius",browsers:e})});f(t(5861),function(e){return prefix(["box-shadow"],{mistakes:["-khtml-"],feature:"css-boxshadow",browsers:e})});f(t(8252),function(e){return prefix(["animation","animation-name","animation-duration","animation-delay","animation-direction","animation-fill-mode","animation-iteration-count","animation-play-state","animation-timing-function","@keyframes"],{mistakes:["-khtml-","-ms-"],feature:"css-animation",browsers:e})});f(t(5056),function(e){return prefix(["transition","transition-property","transition-duration","transition-delay","transition-timing-function"],{mistakes:["-khtml-","-ms-"],browsers:e,feature:"css-transitions"})});f(t(762),function(e){return prefix(["transform","transform-origin"],{feature:"transforms2d",browsers:e})});var o=t(58);f(o,function(e){prefix(["perspective","perspective-origin"],{feature:"transforms3d",browsers:e});return prefix(["transform-style"],{mistakes:["-ms-","-o-"],browsers:e,feature:"transforms3d"})});f(o,{match:/y\sx|y\s#2/},function(e){return prefix(["backface-visibility"],{mistakes:["-ms-","-o-"],feature:"transforms3d",browsers:e})});var s=t(1407);f(s,{match:/y\sx/},function(e){return prefix(["linear-gradient","repeating-linear-gradient","radial-gradient","repeating-radial-gradient"],{props:["background","background-image","border-image","mask","list-style","list-style-image","content","mask-image"],mistakes:["-ms-"],feature:"css-gradients",browsers:e})});f(s,{match:/a\sx/},function(e){e=e.map(function(e){if(/firefox|op/.test(e)){return e}else{return e+" old"}});return add(["linear-gradient","repeating-linear-gradient","radial-gradient","repeating-radial-gradient"],{feature:"css-gradients",browsers:e})});f(t(7759),function(e){return prefix(["box-sizing"],{feature:"css3-boxsizing",browsers:e})});f(t(9237),function(e){return prefix(["filter"],{feature:"css-filters",browsers:e})});f(t(6192),function(e){return prefix(["filter-function"],{props:["background","background-image","border-image","mask","list-style","list-style-image","content","mask-image"],feature:"css-filter-function",browsers:e})});var a=t(3613);f(a,{match:/y\sx|y\s#2/},function(e){return prefix(["backdrop-filter"],{feature:"css-backdrop-filter",browsers:e})});f(t(9666),function(e){return prefix(["element"],{props:["background","background-image","border-image","mask","list-style","list-style-image","content","mask-image"],feature:"css-element-function",browsers:e})});f(t(1448),function(e){prefix(["columns","column-width","column-gap","column-rule","column-rule-color","column-rule-width","column-count","column-rule-style","column-span","column-fill"],{feature:"multicolumn",browsers:e});var r=e.filter(function(e){return!/firefox/.test(e)});prefix(["break-before","break-after","break-inside"],{feature:"multicolumn",browsers:r})});f(t(7511),function(e){return prefix(["user-select"],{mistakes:["-khtml-"],feature:"user-select-none",browsers:e})});var u=t(3714);f(u,{match:/a\sx/},function(e){e=e.map(function(e){if(/ie|firefox/.test(e)){return e}else{return e+" 2009"}});prefix(["display-flex","inline-flex"],{props:["display"],feature:"flexbox",browsers:e});prefix(["flex","flex-grow","flex-shrink","flex-basis"],{feature:"flexbox",browsers:e});prefix(["flex-direction","flex-wrap","flex-flow","justify-content","order","align-items","align-self","align-content"],{feature:"flexbox",browsers:e})});f(u,{match:/y\sx/},function(e){add(["display-flex","inline-flex"],{feature:"flexbox",browsers:e});add(["flex","flex-grow","flex-shrink","flex-basis"],{feature:"flexbox",browsers:e});add(["flex-direction","flex-wrap","flex-flow","justify-content","order","align-items","align-self","align-content"],{feature:"flexbox",browsers:e})});f(t(3807),function(e){return prefix(["calc"],{props:["*"],feature:"calc",browsers:e})});f(t(2259),function(e){return prefix(["background-origin","background-size"],{feature:"background-img-opts",browsers:e})});f(t(1302),function(e){return prefix(["background-clip"],{feature:"background-clip-text",browsers:e})});f(t(7011),function(e){return prefix(["font-feature-settings","font-variant-ligatures","font-language-override"],{feature:"font-feature",browsers:e})});f(t(9195),function(e){return prefix(["font-kerning"],{feature:"font-kerning",browsers:e})});f(t(9847),function(e){return prefix(["border-image"],{feature:"border-image",browsers:e})});f(t(3347),function(e){return prefix(["::selection"],{selector:true,feature:"css-selection",browsers:e})});f(t(5117),function(e){prefix(["::placeholder"],{selector:true,feature:"css-placeholder",browsers:e.concat(["ie 10 old","ie 11 old","firefox 18 old"])})});f(t(9747),function(e){return prefix(["hyphens"],{feature:"css-hyphens",browsers:e})});var c=t(5833);f(c,function(e){return prefix([":fullscreen"],{selector:true,feature:"fullscreen",browsers:e})});f(c,{match:/x(\s#2|$)/},function(e){return prefix(["::backdrop"],{selector:true,feature:"fullscreen",browsers:e})});f(t(9807),function(e){return prefix(["tab-size"],{feature:"css3-tabsize",browsers:e})});var l=t(3794);var p=["width","min-width","max-width","height","min-height","max-height","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size","grid","grid-template","grid-template-rows","grid-template-columns","grid-auto-columns","grid-auto-rows"];f(l,function(e){return prefix(["max-content","min-content"],{props:p,feature:"intrinsic-width",browsers:e})});f(l,{match:/x|\s#4/},function(e){return prefix(["fill","fill-available","stretch"],{props:p,feature:"intrinsic-width",browsers:e})});f(l,{match:/x|\s#5/},function(e){return prefix(["fit-content"],{props:p,feature:"intrinsic-width",browsers:e})});f(t(8546),function(e){return prefix(["zoom-in","zoom-out"],{props:["cursor"],feature:"css3-cursors-newer",browsers:e})});f(t(4528),function(e){return prefix(["grab","grabbing"],{props:["cursor"],feature:"css3-cursors-grab",browsers:e})});f(t(3727),function(e){return prefix(["sticky"],{props:["position"],feature:"css-sticky",browsers:e})});f(t(6714),function(e){return prefix(["touch-action"],{feature:"pointer",browsers:e})});var h=t(6848);f(h,function(e){return prefix(["text-decoration-style","text-decoration-color","text-decoration-line","text-decoration"],{feature:"text-decoration",browsers:e})});f(h,{match:/x.*#[235]/},function(e){return prefix(["text-decoration-skip","text-decoration-skip-ink"],{feature:"text-decoration",browsers:e})});f(t(6421),function(e){return prefix(["text-size-adjust"],{feature:"text-size-adjust",browsers:e})});f(t(4613),function(e){prefix(["mask-clip","mask-composite","mask-image","mask-origin","mask-repeat","mask-border-repeat","mask-border-source"],{feature:"css-masks",browsers:e});prefix(["mask","mask-position","mask-size","mask-border","mask-border-outset","mask-border-width","mask-border-slice"],{feature:"css-masks",browsers:e})});f(t(147),function(e){return prefix(["clip-path"],{feature:"css-clip-path",browsers:e})});f(t(4016),function(e){return prefix(["box-decoration-break"],{feature:"css-boxdecorationbreak",browsers:e})});f(t(5147),function(e){return prefix(["object-fit","object-position"],{feature:"object-fit",browsers:e})});f(t(4298),function(e){return prefix(["shape-margin","shape-outside","shape-image-threshold"],{feature:"css-shapes",browsers:e})});f(t(123),function(e){return prefix(["text-overflow"],{feature:"text-overflow",browsers:e})});f(t(1779),function(e){return prefix(["@viewport"],{feature:"css-deviceadaptation",browsers:e})});var B=t(3588);f(B,{match:/( x($| )|a #2)/},function(e){return prefix(["@resolution"],{feature:"css-media-resolution",browsers:e})});f(t(9533),function(e){return prefix(["text-align-last"],{feature:"css-text-align-last",browsers:e})});var v=t(7794);f(v,{match:/y x|a x #1/},function(e){return prefix(["pixelated"],{props:["image-rendering"],feature:"css-crisp-edges",browsers:e})});f(v,{match:/a x #2/},function(e){return prefix(["image-rendering"],{feature:"css-crisp-edges",browsers:e})});var d=t(471);f(d,function(e){return prefix(["border-inline-start","border-inline-end","margin-inline-start","margin-inline-end","padding-inline-start","padding-inline-end"],{feature:"css-logical-props",browsers:e})});f(d,{match:/x\s#2/},function(e){return prefix(["border-block-start","border-block-end","margin-block-start","margin-block-end","padding-block-start","padding-block-end"],{feature:"css-logical-props",browsers:e})});var b=t(8672);f(b,{match:/#2|x/},function(e){return prefix(["appearance"],{feature:"css-appearance",browsers:e})});f(t(87),function(e){return prefix(["scroll-snap-type","scroll-snap-coordinate","scroll-snap-destination","scroll-snap-points-x","scroll-snap-points-y"],{feature:"css-snappoints",browsers:e})});f(t(5969),function(e){return prefix(["flow-into","flow-from","region-fragment"],{feature:"css-regions",browsers:e})});f(t(4197),function(e){return prefix(["image-set"],{props:["background","background-image","border-image","cursor","mask","mask-image","list-style","list-style-image","content"],feature:"css-image-set",browsers:e})});var y=t(8307);f(y,{match:/a|x/},function(e){return prefix(["writing-mode"],{feature:"css-writing-mode",browsers:e})});f(t(3323),function(e){return prefix(["cross-fade"],{props:["background","background-image","border-image","mask","list-style","list-style-image","content","mask-image"],feature:"css-cross-fade",browsers:e})});f(t(3502),function(e){return prefix([":read-only",":read-write"],{selector:true,feature:"css-read-only-write",browsers:e})});f(t(5802),function(e){return prefix(["text-emphasis","text-emphasis-position","text-emphasis-style","text-emphasis-color"],{feature:"text-emphasis",browsers:e})});var g=t(7776);f(g,function(e){prefix(["display-grid","inline-grid"],{props:["display"],feature:"css-grid",browsers:e});prefix(["grid-template-columns","grid-template-rows","grid-row-start","grid-column-start","grid-row-end","grid-column-end","grid-row","grid-column","grid-area","grid-template","grid-template-areas","place-self"],{feature:"css-grid",browsers:e})});f(g,{match:/a x/},function(e){return prefix(["grid-column-align","grid-row-align"],{feature:"css-grid",browsers:e})});f(t(8422),function(e){return prefix(["text-spacing"],{feature:"css-text-spacing",browsers:e})});f(t(1977),function(e){return prefix([":any-link"],{selector:true,feature:"css-any-link",browsers:e})});var m=t(1456);f(m,function(e){return prefix(["isolate"],{props:["unicode-bidi"],feature:"css-unicode-bidi",browsers:e})});f(m,{match:/y x|a x #2/},function(e){return prefix(["plaintext"],{props:["unicode-bidi"],feature:"css-unicode-bidi",browsers:e})});f(m,{match:/y x/},function(e){return prefix(["isolate-override"],{props:["unicode-bidi"],feature:"css-unicode-bidi",browsers:e})});var C=t(3043);f(C,{match:/a #1/},function(e){return prefix(["overscroll-behavior"],{feature:"css-overscroll-behavior",browsers:e})});f(t(664),function(e){return prefix(["color-adjust"],{feature:"css-color-adjust",browsers:e})});f(t(3100),function(e){return prefix(["text-orientation"],{feature:"css-text-orientation",browsers:e})})},7997:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;if(!r||r===s){this.add(e,s)}}};return AtRule}(n);e.exports=i},3501:(e,r,t)=>{"use strict";var n=t(3561);var i=t(4633);var o=t(4338).agents;var s=t(2242);var a=t(2319);var u=t(811);var f=t(4394);var c=t(6741);var l="\n"+" Replace Autoprefixer `browsers` option to Browserslist config.\n"+" Use `browserslist` key in `package.json` or `.browserslistrc` file.\n"+"\n"+" Using `browsers` option can cause errors. Browserslist config \n"+" can be used for Babel, Autoprefixer, postcss-normalize and other tools.\n"+"\n"+" If you really need to use option, rename it to `overrideBrowserslist`.\n"+"\n"+" Learn more at:\n"+" https://github.com/browserslist/browserslist#readme\n"+" https://twitter.com/browserslist\n"+"\n";function isPlainObject(e){return Object.prototype.toString.apply(e)==="[object Object]"}var p={};function timeCapsule(e,r){if(r.browsers.selected.length===0){return}if(r.add.selectors.length>0){return}if(Object.keys(r.add).length>2){return}e.warn("Greetings, time traveller. "+"We are in the golden age of prefix-less CSS, "+"where Autoprefixer is no longer needed for your stylesheet.")}e.exports=i.plugin("autoprefixer",function(){for(var r=arguments.length,t=new Array(r),n=0;n{"use strict";function last(e){return e[e.length-1]}var r={parse:function parse(e){var r=[""];var t=[r];for(var n=e,i=Array.isArray(n),o=0,n=i?n:n[Symbol.iterator]();;){var s;if(i){if(o>=n.length)break;s=n[o++]}else{o=n.next();if(o.done)break;s=o.value}var a=s;if(a==="("){r=[""];last(t).push(r);t.push(r);continue}if(a===")"){t.pop();r=last(t);r.push("");continue}r[r.length-1]+=a}return t[0]},stringify:function stringify(e){var t="";for(var n=e,i=Array.isArray(n),o=0,n=i?n:n[Symbol.iterator]();;){var s;if(i){if(o>=n.length)break;s=n[o++]}else{o=n.next();if(o.done)break;s=o.value}var a=s;if(typeof a==="object"){t+="("+r.stringify(a)+")";continue}t+=a}return t}};e.exports=r},2319:(e,r,t)=>{"use strict";var n=t(3561);var i=t(4338).agents;var o=t(772);var s=function(){Browsers.prefixes=function prefixes(){if(this.prefixesCache){return this.prefixesCache}this.prefixesCache=[];for(var e in i){this.prefixesCache.push("-"+i[e].prefix+"-")}this.prefixesCache=o.uniq(this.prefixesCache).sort(function(e,r){return r.length-e.length});return this.prefixesCache};Browsers.withPrefix=function withPrefix(e){if(!this.prefixesRegexp){this.prefixesRegexp=new RegExp(this.prefixes().join("|"))}return this.prefixesRegexp.test(e)};function Browsers(e,r,t,n){this.data=e;this.options=t||{};this.browserslistOpts=n||{};this.selected=this.parse(r)}var e=Browsers.prototype;e.parse=function parse(e){var r={};for(var t in this.browserslistOpts){r[t]=this.browserslistOpts[t]}r.path=this.options.from;r.env=this.options.env;return n(e,r)};e.prefix=function prefix(e){var r=e.split(" "),t=r[0],n=r[1];var i=this.data[t];var prefix=i.prefix_exceptions&&i.prefix_exceptions[n];if(!prefix){prefix=i.prefix}return"-"+prefix+"-"};e.isSelected=function isSelected(e){return this.selected.includes(e)};return Browsers}();e.exports=s},5753:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=t.length)break;s=t[o++]}else{o=t.next();if(o.done)break;s=o.value}var a=s;if(a===r){continue}if(e.includes(a)){return true}}return false};r.set=function set(e,r){e.prop=this.prefixed(e.prop,r);return e};r.needCascade=function needCascade(e){if(!e._autoprefixerCascade){e._autoprefixerCascade=this.all.options.cascade!==false&&e.raw("before").includes("\n")}return e._autoprefixerCascade};r.maxPrefixed=function maxPrefixed(e,r){if(r._autoprefixerMax){return r._autoprefixerMax}var t=0;for(var n=e,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{s=n.next();if(s.done)break;a=s.value}var u=a;u=o.removeNote(u);if(u.length>t){t=u.length}}r._autoprefixerMax=t;return r._autoprefixerMax};r.calcBefore=function calcBefore(e,r,t){if(t===void 0){t=""}var n=this.maxPrefixed(e,r);var i=n-o.removeNote(t).length;var s=r.raw("before");if(i>0){s+=Array(i).fill(" ").join("")}return s};r.restoreBefore=function restoreBefore(e){var r=e.raw("before").split("\n");var t=r[r.length-1];this.all.group(e).up(function(e){var r=e.raw("before").split("\n");var n=r[r.length-1];if(n.length{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";e.exports=function(e){var r;if(e==="-webkit- 2009"||e==="-moz-"){r=2009}else if(e==="-ms-"){r=2012}else if(e==="-webkit-"){r="final"}if(e==="-webkit- 2009"){e="-webkit-"}return[r,e]}},9315:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=i.length)break;a=i[s++]}else{s=i.next();if(s.done)break;a=s.value}var u=a;if(u.type==="function"&&u.value===this.name){u.nodes=this.newDirection(u.nodes);u.nodes=this.normalize(u.nodes);if(r==="-webkit- old"){var f=this.oldWebkit(u);if(!f){return false}}else{u.nodes=this.convertDirection(u.nodes);u.value=r+u.value}}}return t.toString()};r.replaceFirst=function replaceFirst(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;if(r==="before"&&s.type==="space"){r="at"}else if(r==="at"&&s.value==="at"){r="after"}else if(r==="after"&&s.type==="space"){return true}else if(s.type==="div"){break}else{r="before"}}return false};r.convertDirection=function convertDirection(e){if(e.length>0){if(e[0].value==="to"){this.fixDirection(e)}else if(e[0].value.includes("deg")){this.fixAngle(e)}else if(this.isRadial(e)){this.fixRadial(e)}}return e};r.fixDirection=function fixDirection(e){e.splice(0,2);for(var r=e,t=Array.isArray(r),n=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(n>=r.length)break;i=r[n++]}else{n=r.next();if(n.done)break;i=n.value}var o=i;if(o.type==="div"){break}if(o.type==="word"){o.value=this.revertDirection(o.value)}}};r.fixAngle=function fixAngle(e){var r=e[0].value;r=parseFloat(r);r=Math.abs(450-r)%360;r=this.roundFloat(r,3);e[0].value=r+"deg"};r.fixRadial=function fixRadial(e){var r=[];var t=[];var n,i,o,s,a;for(s=0;s=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u;i[i.length-1].push(f);if(f.type==="div"&&f.value===","){i.push([])}}this.oldDirection(i);this.colorStops(i);e.nodes=[];for(var c=0,l=i;c=n.length)break;s=n[o++]}else{o=n.next();if(o.done)break;s=o.value}var a=s;if(a.type==="word"){t.push(a.value.toLowerCase())}}t=t.join(" ");var u=this.oldDirections[t]||t;e[0]=[{type:"word",value:u},r];return e[0]}};r.cloneDiv=function cloneDiv(e){for(var r=e,t=Array.isArray(r),n=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(n>=r.length)break;i=r[n++]}else{n=r.next();if(n.done)break;i=n.value}var o=i;if(o.type==="div"&&o.value===","){return o}}return{type:"div",value:",",after:" "}};r.colorStops=function colorStops(e){var r=[];for(var t=0;t{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n1){r.cloneBefore({prop:"-ms-grid-rows",value:u({value:"repeat("+d.length+", auto)",gap:v.row}),raws:{}})}c({gap:v,hasColumns:p,decl:r,result:i});var b=o({rows:d,gap:v});s(b,r,i);return r};return GridTemplateAreas}(n);_defineProperty(p,"names",["grid-template-areas"]);e.exports=p},5193:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n0;var b=Boolean(h);var y=Boolean(B);u({gap:c,hasColumns:y,decl:r,result:i});s(v,r,i);if(b&&y||d){r.cloneBefore({prop:"-ms-grid-rows",value:h,raws:{}})}if(y){r.cloneBefore({prop:"-ms-grid-columns",value:B,raws:{}})}return r};return GridTemplate}(n);_defineProperty(c,"names",["grid-template"]);e.exports=c},5224:(e,r,t)=>{"use strict";var n=t(23);var i=t(4633).list;var o=t(772).uniq;var s=t(772).escapeRegexp;var a=t(772).splitSelector;function convert(e){if(e&&e.length===2&&e[0]==="span"&&parseInt(e[1],10)>0){return[false,parseInt(e[1],10)]}if(e&&e.length===1&&parseInt(e[0],10)>0){return[parseInt(e[0],10),false]}return[false,false]}function translate(e,r,t){var n=e[r];var i=e[t];if(!n){return[false,false]}var o=convert(n),s=o[0],a=o[1];var u=convert(i),f=u[0],c=u[1];if(s&&!i){return[s,false]}if(a&&f){return[f-a,a]}if(s&&c){return[s,c]}if(s&&f){return[s,f-s]}return[false,false]}function parse(e){var r=n(e.value);var t=[];var i=0;t[i]=[];for(var o=r.nodes,s=Array.isArray(o),a=0,o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u;if(f.type==="div"){i+=1;t[i]=[]}else if(f.type==="word"){t[i].push(f.value)}}return t}function insertDecl(e,r,t){if(t&&!e.parent.some(function(e){return e.prop==="-ms-"+r})){e.cloneBefore({prop:"-ms-"+r,value:t.toString()})}}function prefixTrackProp(e){var r=e.prop,t=e.prefix;return t+r.replace("template-","")}function transformRepeat(e,r){var t=e.nodes;var i=r.gap;var o=t.reduce(function(e,r){if(r.type==="div"&&r.value===","){e.key="size"}else{e[e.key].push(n.stringify(r))}return e},{key:"count",size:[],count:[]}),s=o.count,a=o.size;if(i){var u=function(){a=a.filter(function(e){return e.trim()});var e=[];var r=function _loop(r){a.forEach(function(t,n){if(n>0||r>1){e.push(i)}e.push(t)})};for(var t=1;t<=s;t++){r(t)}return{v:e.join(" ")}}();if(typeof u==="object")return u.v}return"("+a.join("")+")["+s.join("")+"]"}function prefixTrackValue(e){var r=e.value,t=e.gap;var i=n(r).nodes.reduce(function(e,r){if(r.type==="function"&&r.value==="repeat"){return e.concat({type:"word",value:transformRepeat(r,{gap:t})})}if(t&&r.type==="space"){return e.concat({type:"space",value:" "},{type:"word",value:t},r)}return e.concat(r)},[]);return n.stringify(i)}var u=/^\.+$/;function track(e,r){return{start:e,end:r,span:r-e}}function getColumns(e){return e.trim().split(/\s+/g)}function parseGridAreas(e){var r=e.rows,t=e.gap;return r.reduce(function(e,r,n){if(t.row)n*=2;if(r.trim()==="")return e;getColumns(r).forEach(function(r,i){if(u.test(r))return;if(t.column)i*=2;if(typeof e[r]==="undefined"){e[r]={column:track(i+1,i+2),row:track(n+1,n+2)}}else{var o=e[r],s=o.column,a=o.row;s.start=Math.min(s.start,i+1);s.end=Math.max(s.end,i+2);s.span=s.end-s.start;a.start=Math.min(a.start,n+1);a.end=Math.max(a.end,n+2);a.span=a.end-a.start}});return e},{})}function testTrack(e){return e.type==="word"&&/^\[.+]$/.test(e.value)}function verifyRowSize(e){if(e.areas.length>e.rows.length){e.rows.push("auto")}return e}function parseTemplate(e){var r=e.decl,t=e.gap;var i=n(r.value).nodes.reduce(function(e,r){var t=r.type,i=r.value;if(testTrack(r)||t==="space")return e;if(t==="string"){e=verifyRowSize(e);e.areas.push(i)}if(t==="word"||t==="function"){e[e.key].push(n.stringify(r))}if(t==="div"&&i==="/"){e.key="columns";e=verifyRowSize(e)}return e},{key:"rows",columns:[],rows:[],areas:[]});return{areas:parseGridAreas({rows:i.areas,gap:t}),columns:prefixTrackValue({value:i.columns.join(" "),gap:t.column}),rows:prefixTrackValue({value:i.rows.join(" "),gap:t.row})}}function getMSDecls(e,r,t){if(r===void 0){r=false}if(t===void 0){t=false}return[].concat({prop:"-ms-grid-row",value:String(e.row.start)},e.row.span>1||r?{prop:"-ms-grid-row-span",value:String(e.row.span)}:[],{prop:"-ms-grid-column",value:String(e.column.start)},e.column.span>1||t?{prop:"-ms-grid-column-span",value:String(e.column.span)}:[])}function getParentMedia(e){if(e.type==="atrule"&&e.name==="media"){return e}if(!e.parent){return false}return getParentMedia(e.parent)}function changeDuplicateAreaSelectors(e,r){e=e.map(function(e){var r=i.space(e);var t=i.comma(e);if(r.length>t.length){e=r.slice(-1).join("")}return e});return e.map(function(e){var t=r.map(function(r,t){var n=t===0?"":" ";return""+n+r+" > "+e});return t})}function selectorsEqual(e,r){return e.selectors.some(function(e){return r.selectors.some(function(r){return r===e})})}function parseGridTemplatesData(e){var r=[];e.walkDecls(/grid-template(-areas)?$/,function(e){var t=e.parent;var n=getParentMedia(t);var i=getGridGap(e);var s=inheritGridGap(e,i);var a=parseTemplate({decl:e,gap:s||i}),u=a.areas;var f=Object.keys(u);if(f.length===0){return true}var c=r.reduce(function(e,r,t){var n=r.allAreas;var i=n&&f.some(function(e){return n.includes(e)});return i?t:e},null);if(c!==null){var l=r[c],p=l.allAreas,h=l.rules;var B=h.some(function(e){return e.hasDuplicates===false&&selectorsEqual(e,t)});var v=false;var d=h.reduce(function(e,r){if(!r.params&&selectorsEqual(r,t)){v=true;return r.duplicateAreaNames}if(!v){f.forEach(function(t){if(r.areas[t]){e.push(t)}})}return o(e)},[]);h.forEach(function(e){f.forEach(function(r){var t=e.areas[r];if(t&&t.row.span!==u[r].row.span){u[r].row.updateSpan=true}if(t&&t.column.span!==u[r].column.span){u[r].column.updateSpan=true}})});r[c].allAreas=o([].concat(p,f));r[c].rules.push({hasDuplicates:!B,params:n.params,selectors:t.selectors,node:t,duplicateAreaNames:d,areas:u})}else{r.push({allAreas:f,areasCount:0,rules:[{hasDuplicates:false,duplicateRules:[],params:n.params,selectors:t.selectors,node:t,duplicateAreaNames:[],areas:u}]})}return undefined});return r}function insertAreas(e,r){var t=parseGridTemplatesData(e);if(t.length===0){return undefined}var n={};e.walkDecls("grid-area",function(o){var s=o.parent;var a=s.first.prop==="-ms-grid-row";var u=getParentMedia(s);if(r(o)){return undefined}var f=u?e.index(u):e.index(s);var c=o.value;var l=t.filter(function(e){return e.allAreas.includes(c)})[0];if(!l){return true}var p=l.allAreas[l.allAreas.length-1];var h=i.space(s.selector);var B=i.comma(s.selector);var v=h.length>1&&h.length>B.length;if(a){return false}if(!n[p]){n[p]={}}var d=false;for(var b=l.rules,y=Array.isArray(b),g=0,b=y?b:b[Symbol.iterator]();;){var m;if(y){if(g>=b.length)break;m=b[g++]}else{g=b.next();if(g.done)break;m=g.value}var C=m;var w=C.areas[c];var S=C.duplicateAreaNames.includes(c);if(!w){var O=e.index(n[p].lastRule);if(f>O){n[p].lastRule=u||s}continue}if(C.params&&!n[p][C.params]){n[p][C.params]=[]}if((!C.hasDuplicates||!S)&&!C.params){getMSDecls(w,false,false).reverse().forEach(function(e){return s.prepend(Object.assign(e,{raws:{between:o.raws.between}}))});n[p].lastRule=s;d=true}else if(C.hasDuplicates&&!C.params&&!v){(function(){var e=s.clone();e.removeAll();getMSDecls(w,w.row.updateSpan,w.column.updateSpan).reverse().forEach(function(r){return e.prepend(Object.assign(r,{raws:{between:o.raws.between}}))});e.selectors=changeDuplicateAreaSelectors(e.selectors,C.selectors);if(n[p].lastRule){n[p].lastRule.after(e)}n[p].lastRule=e;d=true})()}else if(C.hasDuplicates&&!C.params&&v&&s.selector.includes(C.selectors[0])){s.walkDecls(/-ms-grid-(row|column)/,function(e){return e.remove()});getMSDecls(w,w.row.updateSpan,w.column.updateSpan).reverse().forEach(function(e){return s.prepend(Object.assign(e,{raws:{between:o.raws.between}}))})}else if(C.params){(function(){var r=s.clone();r.removeAll();getMSDecls(w,w.row.updateSpan,w.column.updateSpan).reverse().forEach(function(e){return r.prepend(Object.assign(e,{raws:{between:o.raws.between}}))});if(C.hasDuplicates&&S){r.selectors=changeDuplicateAreaSelectors(r.selectors,C.selectors)}r.raws=C.node.raws;if(e.index(C.node.parent)>f){C.node.parent.append(r)}else{n[p][C.params].push(r)}if(!d){n[p].lastRule=u||s}})()}}return undefined});Object.keys(n).forEach(function(e){var r=n[e];var t=r.lastRule;Object.keys(r).reverse().filter(function(e){return e!=="lastRule"}).forEach(function(e){if(r[e].length>0&&t){t.after({name:"media",params:e});t.next().append(r[e])}})});return undefined}function warnMissedAreas(e,r,t){var n=Object.keys(e);r.root().walkDecls("grid-area",function(e){n=n.filter(function(r){return r!==e.value})});if(n.length>0){r.warn(t,"Can not find grid areas: "+n.join(", "))}return undefined}function warnTemplateSelectorNotFound(e,r){var t=e.parent;var n=e.root();var o=false;var s=i.space(t.selector).filter(function(e){return e!==">"}).slice(0,-1);if(s.length>0){var a=false;var u=null;n.walkDecls(/grid-template(-areas)?$/,function(r){var t=r.parent;var n=t.selectors;var f=parseTemplate({decl:r,gap:getGridGap(r)}),c=f.areas;var l=c[e.value];for(var p=n,h=Array.isArray(p),B=0,p=h?p:p[Symbol.iterator]();;){var v;if(h){if(B>=p.length)break;v=p[B++]}else{B=p.next();if(B.done)break;v=B.value}var d=v;if(a){break}var b=i.space(d).filter(function(e){return e!==">"});a=b.every(function(e,r){return e===s[r]})}if(a||!l){return true}if(!u){u=t.selector}if(u&&u!==t.selector){o=true}return undefined});if(!a&&o){e.warn(r,"Autoprefixer cannot find a grid-template "+('containing the duplicate grid-area "'+e.value+'" ')+("with full selector matching: "+s.join(" ")))}}}function warnIfGridRowColumnExists(e,r){var t=e.parent;var n=[];t.walkDecls(/^grid-(row|column)/,function(e){if(!e.prop.endsWith("-end")&&!e.value.startsWith("span")){n.push(e)}});if(n.length>0){n.forEach(function(e){e.warn(r,"You already have a grid-area declaration present in the rule. "+("You should use either grid-area or "+e.prop+", not both"))})}return undefined}function getGridGap(e){var r={};var t=/^(grid-)?((row|column)-)?gap$/;e.parent.walkDecls(t,function(e){var t=e.prop,i=e.value;if(/^(grid-)?gap$/.test(t)){var o=n(i).nodes,s=o[0],a=o[2];r.row=s&&n.stringify(s);r.column=a?n.stringify(a):r.row}if(/^(grid-)?row-gap$/.test(t))r.row=i;if(/^(grid-)?column-gap$/.test(t))r.column=i});return r}function parseMediaParams(e){if(!e){return false}var r=n(e);var t;var i;r.walk(function(e){if(e.type==="word"&&/min|max/g.test(e.value)){t=e.value}else if(e.value.includes("px")){i=parseInt(e.value.replace(/\D/g,""))}});return[t,i]}function shouldInheritGap(e,r){var t;var n=a(e);var i=a(r);if(n[0].lengthi[0].length){var o=n[0].reduce(function(e,r,t){var n=r[0];var o=i[0][0][0];if(n===o){return t}return false},false);if(o){t=i[0].every(function(e,r){return e.every(function(e,t){return n[0].slice(o)[r][t]===e})})}}else{t=i.some(function(e){return e.every(function(e,r){return e.every(function(e,t){return n[0][r][t]===e})})})}return t}function inheritGridGap(e,r){var t=e.parent;var n=getParentMedia(t);var i=t.root();var o=a(t.selector);if(Object.keys(r).length>0){return false}var u=parseMediaParams(n.params),f=u[0];var c=o[0];var l=s(c[c.length-1][0]);var p=new RegExp("("+l+"$)|("+l+"[,.])");var h;i.walkRules(p,function(e){var r;if(t.toString()===e.toString()){return false}e.walkDecls("grid-gap",function(e){return r=getGridGap(e)});if(!r||Object.keys(r).length===0){return true}if(!shouldInheritGap(t.selector,e.selector)){return true}var n=getParentMedia(e);if(n){var i=parseMediaParams(n.params)[0];if(i===f){h=r;return true}}else{h=r;return true}return undefined});if(h&&Object.keys(h).length>0){return h}return false}function warnGridGap(e){var r=e.gap,t=e.hasColumns,n=e.decl,i=e.result;var o=r.row&&r.column;if(!t&&(o||r.column&&!r.row)){delete r.column;n.warn(i,"Can not implement grid-gap without grid-template-columns")}}function normalizeRowColumn(e){var r=n(e).nodes.reduce(function(e,r){if(r.type==="function"&&r.value==="repeat"){var t="count";var i=r.nodes.reduce(function(e,r){if(r.type==="word"&&t==="count"){e[0]=Math.abs(parseInt(r.value));return e}if(r.type==="div"&&r.value===","){t="value";return e}if(t==="value"){e[1]+=n.stringify(r)}return e},[0,""]),o=i[0],s=i[1];if(o){for(var a=0;a *:nth-child("+(c.length-r)+")")}).join(", ");var s=i.clone().removeAll();s.selector=o;s.append({prop:"-ms-grid-row",value:n.start});s.append({prop:"-ms-grid-column",value:t.start});i.after(s)});return undefined}e.exports={parse:parse,translate:translate,parseTemplate:parseTemplate,parseGridAreas:parseGridAreas,warnMissedAreas:warnMissedAreas,insertAreas:insertAreas,insertDecl:insertDecl,prefixTrackProp:prefixTrackProp,prefixTrackValue:prefixTrackValue,getGridGap:getGridGap,warnGridGap:warnGridGap,warnTemplateSelectorNotFound:warnTemplateSelectorNotFound,warnIfGridRowColumnExists:warnIfGridRowColumnExists,inheritGridGap:inheritGridGap,autoplaceGridItems:autoplaceGridItems}},3463:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=r.length)break;i=r[n++]}else{n=r.next();if(n.done)break;i=n.value}var o=i;if(e.value.includes(o+"(")){return true}}return false};r.set=function set(r,t){r=e.prototype.set.call(this,r,t);if(t==="-ms-"){r.value=r.value.replace(/rotatez/gi,"rotate")}return r};r.insert=function insert(r,t,n){if(t==="-ms-"){if(!this.contain3d(r)&&!this.keyframeParents(r)){return e.prototype.insert.call(this,r,t,n)}}else if(t==="-o-"){if(!this.contain3d(r)){return e.prototype.insert.call(this,r,t,n)}}else{return e.prototype.insert.call(this,r,t,n)}return undefined};return TransformDecl}(n);_defineProperty(i,"names",["transform","transform-origin"]);_defineProperty(i,"functions3d",["matrix3d","translate3d","translateZ","scale3d","scaleZ","rotate3d","rotateX","rotateY","perspective"]);e.exports=i},3251:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{"use strict";var n=t(3561);function capitalize(e){return e.slice(0,1).toUpperCase()+e.slice(1)}var i={ie:"IE",ie_mob:"IE Mobile",ios_saf:"iOS",op_mini:"Opera Mini",op_mob:"Opera Mobile",and_chr:"Chrome for Android",and_ff:"Firefox for Android",and_uc:"UC for Android"};function prefix(e,r,t){var n=" "+e;if(t)n+=" *";n+=": ";n+=r.map(function(e){return e.replace(/^-(.*)-$/g,"$1")}).join(", ");n+="\n";return n}e.exports=function(e){if(e.browsers.selected.length===0){return"No browsers selected"}var r={};for(var t=e.browsers.selected,o=Array.isArray(t),s=0,t=o?t:t[Symbol.iterator]();;){var a;if(o){if(s>=t.length)break;a=t[s++]}else{s=t.next();if(s.done)break;a=s.value}var u=a;var f=u.split(" ");var c=f[0];var l=f[1];c=i[c]||capitalize(c);if(r[c]){r[c].push(l)}else{r[c]=[l]}}var p="Browsers:\n";for(var h in r){var B=r[h];B=B.sort(function(e,r){return parseFloat(r)-parseFloat(e)});p+=" "+h+": "+B.join(", ")+"\n"}var v=n.coverage(e.browsers.selected);var d=Math.round(v*100)/100;p+="\nThese browsers account for "+d+"% of all users globally\n";var b=[];for(var y in e.add){var g=e.add[y];if(y[0]==="@"&&g.prefixes){b.push(prefix(y,g.prefixes))}}if(b.length>0){p+="\nAt-Rules:\n"+b.sort().join("")}var m=[];for(var C=e.add.selectors,w=Array.isArray(C),S=0,C=w?C:C[Symbol.iterator]();;){var O;if(w){if(S>=C.length)break;O=C[S++]}else{S=C.next();if(S.done)break;O=S.value}var T=O;if(T.prefixes){m.push(prefix(T.name,T.prefixes))}}if(m.length>0){p+="\nSelectors:\n"+m.sort().join("")}var E=[];var k=[];var P=false;for(var D in e.add){var A=e.add[D];if(D[0]!=="@"&&A.prefixes){var R=D.indexOf("grid-")===0;if(R)P=true;k.push(prefix(D,A.prefixes,R))}if(!Array.isArray(A.values)){continue}for(var F=A.values,x=Array.isArray(F),j=0,F=x?F:F[Symbol.iterator]();;){var I;if(x){if(j>=F.length)break;I=F[j++]}else{j=F.next();if(j.done)break;I=j.value}var M=I;var N=M.name.includes("grid");if(N)P=true;var _=prefix(M.name,M.prefixes,N);if(!E.includes(_)){E.push(_)}}}if(k.length>0){p+="\nProperties:\n"+k.sort().join("")}if(E.length>0){p+="\nValues:\n"+E.sort().join("")}if(P){p+="\n* - Prefixes will be added only on grid: true option.\n"}if(!b.length&&!m.length&&!k.length&&!E.length){p+="\nAwesome! Your browsers don't require any vendor prefixes."+"\nNow you can remove Autoprefixer from build steps."}return p}},7471:e=>{"use strict";var r=function(){function OldSelector(e,r){this.prefix=r;this.prefixed=e.prefixed(this.prefix);this.regexp=e.regexp(this.prefix);this.prefixeds=e.possible().map(function(r){return[e.prefixed(r),e.regexp(r)]});this.unprefixed=e.name;this.nameRegexp=e.regexp()}var e=OldSelector.prototype;e.isHack=function isHack(e){var r=e.parent.index(e)+1;var t=e.parent.nodes;while(r=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u,c=f[0],l=f[1];if(n.includes(c)&&n.match(l)){i=true;break}}if(!i){return true}r+=1}return true};e.check=function check(e){if(!e.selector.includes(this.prefixed)){return false}if(!e.selector.match(this.regexp)){return false}if(this.isHack(e)){return false}return true};return OldSelector}();e.exports=r},6661:(e,r,t)=>{"use strict";var n=t(772);var i=function(){function OldValue(e,r,t,i){this.unprefixed=e;this.prefixed=r;this.string=t||r;this.regexp=i||n.regexp(r)}var e=OldValue.prototype;e.check=function check(e){if(e.includes(this.string)){return!!e.match(this.regexp)}return false};return OldValue}();e.exports=i},8428:(e,r,t)=>{"use strict";var n=t(4633).vendor;var i=t(2319);var o=t(772);function _clone(e,r){var t=new e.constructor;for(var n=0,i=Object.keys(e||{});n=s.length)break;f=s[u++]}else{u=s.next();if(u.done)break;f=u.value}var c=f;if(this.add(e,c,i.concat([c]),r)){i.push(c)}}return i};e.clone=function clone(e,r){return Prefixer.clone(e,r)};return Prefixer}();e.exports=s},811:(e,r,t)=>{"use strict";var n=t(4633).vendor;var i=t(5753);var o=t(9514);var s=t(7080);var a=t(8120);var u=t(3817);var f=t(2319);var c=t(4806);var l=t(7997);var p=t(1882);var h=t(772);c.hack(t(9231));c.hack(t(9478));i.hack(t(3629));i.hack(t(7017));i.hack(t(972));i.hack(t(1763));i.hack(t(3331));i.hack(t(7106));i.hack(t(3392));i.hack(t(9315));i.hack(t(6658));i.hack(t(1036));i.hack(t(7912));i.hack(t(7335));i.hack(t(3686));i.hack(t(5041));i.hack(t(7447));i.hack(t(9116));i.hack(t(180));i.hack(t(3251));i.hack(t(5035));i.hack(t(517));i.hack(t(5836));i.hack(t(1041));i.hack(t(3305));i.hack(t(4802));i.hack(t(657));i.hack(t(9423));i.hack(t(5193));i.hack(t(8322));i.hack(t(4689));i.hack(t(9801));i.hack(t(2112));i.hack(t(3463));i.hack(t(1262));i.hack(t(7509));i.hack(t(9936));i.hack(t(5230));i.hack(t(1150));i.hack(t(8360));i.hack(t(2456));i.hack(t(5422));i.hack(t(2681));i.hack(t(1719));i.hack(t(487));i.hack(t(9228));p.hack(t(2433));p.hack(t(1138));p.hack(t(4581));p.hack(t(291));p.hack(t(8485));p.hack(t(3692));p.hack(t(1665));p.hack(t(133));var B={};var v=function(){function Prefixes(e,r,t){if(t===void 0){t={}}this.data=e;this.browsers=r;this.options=t;var n=this.preprocess(this.select(this.data));this.add=n[0];this.remove=n[1];this.transition=new s(this);this.processor=new a(this)}var e=Prefixes.prototype;e.cleaner=function cleaner(){if(this.cleanerCache){return this.cleanerCache}if(this.browsers.selected.length){var e=new f(this.browsers.data,[]);this.cleanerCache=new Prefixes(this.data,e,this.options)}else{return this}return this.cleanerCache};e.select=function select(e){var r=this;var t={add:{},remove:{}};var n=function _loop(n){var i=e[n];var o=i.browsers.map(function(e){var r=e.split(" ");return{browser:r[0]+" "+r[1],note:r[2]}});var s=o.filter(function(e){return e.note}).map(function(e){return r.browsers.prefix(e.browser)+" "+e.note});s=h.uniq(s);o=o.filter(function(e){return r.browsers.isSelected(e.browser)}).map(function(e){var t=r.browsers.prefix(e.browser);if(e.note){return t+" "+e.note}else{return t}});o=r.sort(h.uniq(o));if(r.options.flexbox==="no-2009"){o=o.filter(function(e){return!e.includes("2009")})}var a=i.browsers.map(function(e){return r.browsers.prefix(e)});if(i.mistakes){a=a.concat(i.mistakes)}a=a.concat(s);a=h.uniq(a);if(o.length){t.add[n]=o;if(o.length=f.length)break;v=f[B++]}else{B=f.next();if(B.done)break;v=B.value}var d=v;if(!r[d]){r[d]={values:[]}}r[d].values.push(a)}}else{var b=r[t]&&r[t].values||[];r[t]=i.load(t,n,this);r[t].values=b}}}var y={selectors:[]};for(var g in e.remove){var m=e.remove[g];if(this.data[g].selector){var C=c.load(g,m);for(var w=m,S=Array.isArray(w),O=0,w=S?w:w[Symbol.iterator]();;){var T;if(S){if(O>=w.length)break;T=w[O++]}else{O=w.next();if(O.done)break;T=O.value}var E=T;y.selectors.push(C.old(E))}}else if(g==="@keyframes"||g==="@viewport"){for(var k=m,P=Array.isArray(k),D=0,k=P?k:k[Symbol.iterator]();;){var A;if(P){if(D>=k.length)break;A=k[D++]}else{D=k.next();if(D.done)break;A=D.value}var R=A;var F="@"+R+g.slice(1);y[F]={remove:true}}}else if(g==="@resolution"){y[g]=new o(g,m,this)}else{var x=this.data[g].props;if(x){var j=p.load(g,[],this);for(var I=m,M=Array.isArray(I),N=0,I=M?I:I[Symbol.iterator]();;){var _;if(M){if(N>=I.length)break;_=I[N++]}else{N=I.next();if(N.done)break;_=N.value}var L=_;var q=j.old(L);if(q){for(var G=x,J=Array.isArray(G),U=0,G=J?G:G[Symbol.iterator]();;){var H;if(J){if(U>=G.length)break;H=G[U++]}else{U=G.next();if(U.done)break;H=U.value}var Q=H;if(!y[Q]){y[Q]={}}if(!y[Q].values){y[Q].values=[]}y[Q].values.push(q)}}}}else{for(var K=m,W=Array.isArray(K),Y=0,K=W?K:K[Symbol.iterator]();;){var z;if(W){if(Y>=K.length)break;z=K[Y++]}else{Y=K.next();if(Y.done)break;z=Y.value}var $=z;var X=this.decl(g).old(g,$);if(g==="align-self"){var Z=r[g]&&r[g].prefixes;if(Z){if($==="-webkit- 2009"&&Z.includes("-webkit-")){continue}else if($==="-webkit-"&&Z.includes("-webkit- 2009")){continue}}}for(var V=X,ee=Array.isArray(V),re=0,V=ee?V:V[Symbol.iterator]();;){var te;if(ee){if(re>=V.length)break;te=V[re++]}else{re=V.next();if(re.done)break;te=re.value}var ne=te;if(!y[ne]){y[ne]={}}y[ne].remove=true}}}}}return[r,y]};e.decl=function decl(e){var decl=B[e];if(decl){return decl}else{B[e]=i.load(e);return B[e]}};e.unprefixed=function unprefixed(e){var r=this.normalize(n.unprefixed(e));if(r==="flex-direction"){r="flex-flow"}return r};e.normalize=function normalize(e){return this.decl(e).normalize(e)};e.prefixed=function prefixed(e,r){e=n.unprefixed(e);return this.decl(e).prefixed(e,r)};e.values=function values(e,r){var t=this[e];var n=t["*"]&&t["*"].values;var values=t[r]&&t[r].values;if(n&&values){return h.uniq(n.concat(values))}else{return n||values||[]}};e.group=function group(e){var r=this;var t=e.parent;var n=t.index(e);var i=t.nodes.length;var o=this.unprefixed(e.prop);var s=function checker(e,s){n+=e;while(n>=0&&n{"use strict";var n=t(23);var i=t(1882);var o=t(5224).insertAreas;var s=/(^|[^-])linear-gradient\(\s*(top|left|right|bottom)/i;var a=/(^|[^-])radial-gradient\(\s*\d+(\w*|%)\s+\d+(\w*|%)\s*,/i;var u=/(!\s*)?autoprefixer:\s*ignore\s+next/i;var f=/(!\s*)?autoprefixer\s*grid:\s*(on|off|(no-)?autoplace)/i;var c=["width","height","min-width","max-width","min-height","max-height","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size"];function hasGridTemplate(e){return e.parent.some(function(e){return e.prop==="grid-template"||e.prop==="grid-template-areas"})}function hasRowsAndColumns(e){var r=e.parent.some(function(e){return e.prop==="grid-template-rows"});var t=e.parent.some(function(e){return e.prop==="grid-template-columns"});return r&&t}var l=function(){function Processor(e){this.prefixes=e}var e=Processor.prototype;e.add=function add(e,r){var t=this;var u=this.prefixes.add["@resolution"];var f=this.prefixes.add["@keyframes"];var l=this.prefixes.add["@viewport"];var p=this.prefixes.add["@supports"];e.walkAtRules(function(e){if(e.name==="keyframes"){if(!t.disabled(e,r)){return f&&f.process(e)}}else if(e.name==="viewport"){if(!t.disabled(e,r)){return l&&l.process(e)}}else if(e.name==="supports"){if(t.prefixes.options.supports!==false&&!t.disabled(e,r)){return p.process(e)}}else if(e.name==="media"&&e.params.includes("-resolution")){if(!t.disabled(e,r)){return u&&u.process(e)}}return undefined});e.walkRules(function(e){if(t.disabled(e,r))return undefined;return t.prefixes.add.selectors.map(function(t){return t.process(e,r)})});function insideGrid(e){return e.parent.nodes.some(function(e){if(e.type!=="decl")return false;var r=e.prop==="display"&&/(inline-)?grid/.test(e.value);var t=e.prop.startsWith("grid-template");var n=/^grid-([A-z]+-)?gap/.test(e.prop);return r||t||n})}function insideFlex(e){return e.parent.some(function(e){return e.prop==="display"&&/(inline-)?flex/.test(e.value)})}var h=this.gridStatus(e,r)&&this.prefixes.add["grid-area"]&&this.prefixes.add["grid-area"].prefixes;e.walkDecls(function(e){if(t.disabledDecl(e,r))return undefined;var i=e.parent;var o=e.prop;var u=e.value;if(o==="grid-row-span"){r.warn("grid-row-span is not part of final Grid Layout. Use grid-row.",{node:e});return undefined}else if(o==="grid-column-span"){r.warn("grid-column-span is not part of final Grid Layout. Use grid-column.",{node:e});return undefined}else if(o==="display"&&u==="box"){r.warn("You should write display: flex by final spec "+"instead of display: box",{node:e});return undefined}else if(o==="text-emphasis-position"){if(u==="under"||u==="over"){r.warn("You should use 2 values for text-emphasis-position "+"For example, `under left` instead of just `under`.",{node:e})}}else if(/^(align|justify|place)-(items|content)$/.test(o)&&insideFlex(e)){if(u==="start"||u==="end"){r.warn(u+" value has mixed support, consider using "+("flex-"+u+" instead"),{node:e})}}else if(o==="text-decoration-skip"&&u==="ink"){r.warn("Replace text-decoration-skip: ink to "+"text-decoration-skip-ink: auto, because spec had been changed",{node:e})}else{if(h){if(/^(align|justify|place)-items$/.test(o)&&insideGrid(e)){var f=o.replace("-items","-self");r.warn("IE does not support "+o+" on grid containers. "+("Try using "+f+" on child elements instead: ")+(e.parent.selector+" > * { "+f+": "+e.value+" }"),{node:e})}else if(/^(align|justify|place)-content$/.test(o)&&insideGrid(e)){r.warn("IE does not support "+e.prop+" on grid containers",{node:e})}else if(o==="display"&&e.value==="contents"){r.warn("Please do not use display: contents; "+"if you have grid setting enabled",{node:e});return undefined}else if(e.prop==="grid-gap"){var l=t.gridStatus(e,r);if(l==="autoplace"&&!hasRowsAndColumns(e)&&!hasGridTemplate(e)){r.warn("grid-gap only works if grid-template(-areas) is being "+"used or both rows and columns have been declared "+"and cells have not been manually "+"placed inside the explicit grid",{node:e})}else if((l===true||l==="no-autoplace")&&!hasGridTemplate(e)){r.warn("grid-gap only works if grid-template(-areas) is being used",{node:e})}}else if(o==="grid-auto-columns"){r.warn("grid-auto-columns is not supported by IE",{node:e});return undefined}else if(o==="grid-auto-rows"){r.warn("grid-auto-rows is not supported by IE",{node:e});return undefined}else if(o==="grid-auto-flow"){var p=i.some(function(e){return e.prop==="grid-template-rows"});var B=i.some(function(e){return e.prop==="grid-template-columns"});if(hasGridTemplate(e)){r.warn("grid-auto-flow is not supported by IE",{node:e})}else if(u.includes("dense")){r.warn("grid-auto-flow: dense is not supported by IE",{node:e})}else if(!p&&!B){r.warn("grid-auto-flow works only if grid-template-rows and "+"grid-template-columns are present in the same rule",{node:e})}return undefined}else if(u.includes("auto-fit")){r.warn("auto-fit value is not supported by IE",{node:e,word:"auto-fit"});return undefined}else if(u.includes("auto-fill")){r.warn("auto-fill value is not supported by IE",{node:e,word:"auto-fill"});return undefined}else if(o.startsWith("grid-template")&&u.includes("[")){r.warn("Autoprefixer currently does not support line names. "+"Try using grid-template-areas instead.",{node:e,word:"["})}}if(u.includes("radial-gradient")){if(a.test(e.value)){r.warn("Gradient has outdated direction syntax. "+"New syntax is like `closest-side at 0 0` "+"instead of `0 0, closest-side`.",{node:e})}else{var v=n(u);for(var d=v.nodes,b=Array.isArray(d),y=0,d=b?d:d[Symbol.iterator]();;){var g;if(b){if(y>=d.length)break;g=d[y++]}else{y=d.next();if(y.done)break;g=y.value}var m=g;if(m.type==="function"&&m.value==="radial-gradient"){for(var C=m.nodes,w=Array.isArray(C),S=0,C=w?C:C[Symbol.iterator]();;){var O;if(w){if(S>=C.length)break;O=C[S++]}else{S=C.next();if(S.done)break;O=S.value}var T=O;if(T.type==="word"){if(T.value==="cover"){r.warn("Gradient has outdated direction syntax. "+"Replace `cover` to `farthest-corner`.",{node:e})}else if(T.value==="contain"){r.warn("Gradient has outdated direction syntax. "+"Replace `contain` to `closest-side`.",{node:e})}}}}}}}if(u.includes("linear-gradient")){if(s.test(u)){r.warn("Gradient has outdated direction syntax. "+"New syntax is like `to left` instead of `right`.",{node:e})}}}if(c.includes(e.prop)){if(!e.value.includes("-fill-available")){if(e.value.includes("fill-available")){r.warn("Replace fill-available to stretch, "+"because spec had been changed",{node:e})}else if(e.value.includes("fill")){var E=n(u);if(E.nodes.some(function(e){return e.type==="word"&&e.value==="fill"})){r.warn("Replace fill to stretch, because spec had been changed",{node:e})}}}}var k;if(e.prop==="transition"||e.prop==="transition-property"){return t.prefixes.transition.add(e,r)}else if(e.prop==="align-self"){var P=t.displayType(e);if(P!=="grid"&&t.prefixes.options.flexbox!==false){k=t.prefixes.add["align-self"];if(k&&k.prefixes){k.process(e)}}if(P!=="flex"&&t.gridStatus(e,r)!==false){k=t.prefixes.add["grid-row-align"];if(k&&k.prefixes){return k.process(e,r)}}}else if(e.prop==="justify-self"){var D=t.displayType(e);if(D!=="flex"&&t.gridStatus(e,r)!==false){k=t.prefixes.add["grid-column-align"];if(k&&k.prefixes){return k.process(e,r)}}}else if(e.prop==="place-self"){k=t.prefixes.add["place-self"];if(k&&k.prefixes&&t.gridStatus(e,r)!==false){return k.process(e,r)}}else{k=t.prefixes.add[e.prop];if(k&&k.prefixes){return k.process(e,r)}}return undefined});if(this.gridStatus(e,r)){o(e,this.disabled)}return e.walkDecls(function(e){if(t.disabledValue(e,r))return;var n=t.prefixes.unprefixed(e.prop);var o=t.prefixes.values("add",n);if(Array.isArray(o)){for(var s=o,a=Array.isArray(s),u=0,s=a?s:s[Symbol.iterator]();;){var f;if(a){if(u>=s.length)break;f=s[u++]}else{u=s.next();if(u.done)break;f=u.value}var c=f;if(c.process)c.process(e,r)}}i.save(t.prefixes,e)})};e.remove=function remove(e,r){var t=this;var n=this.prefixes.remove["@resolution"];e.walkAtRules(function(e,i){if(t.prefixes.remove["@"+e.name]){if(!t.disabled(e,r)){e.parent.removeChild(i)}}else if(e.name==="media"&&e.params.includes("-resolution")&&n){n.clean(e)}});var i=function _loop(){if(s){if(a>=o.length)return"break";u=o[a++]}else{a=o.next();if(a.done)return"break";u=a.value}var n=u;e.walkRules(function(e,i){if(n.check(e)){if(!t.disabled(e,r)){e.parent.removeChild(i)}}})};for(var o=this.prefixes.remove.selectors,s=Array.isArray(o),a=0,o=s?o:o[Symbol.iterator]();;){var u;var f=i();if(f==="break")break}return e.walkDecls(function(e,n){if(t.disabled(e,r))return;var i=e.parent;var o=t.prefixes.unprefixed(e.prop);if(e.prop==="transition"||e.prop==="transition-property"){t.prefixes.transition.remove(e)}if(t.prefixes.remove[e.prop]&&t.prefixes.remove[e.prop].remove){var s=t.prefixes.group(e).down(function(e){return t.prefixes.normalize(e.prop)===o});if(o==="flex-flow"){s=true}if(e.prop==="-webkit-box-orient"){var a={"flex-direction":true,"flex-flow":true};if(!e.parent.some(function(e){return a[e.prop]}))return}if(s&&!t.withHackValue(e)){if(e.raw("before").includes("\n")){t.reduceSpaces(e)}i.removeChild(n);return}}for(var u=t.prefixes.values("remove",o),f=Array.isArray(u),c=0,u=f?u:u[Symbol.iterator]();;){var l;if(f){if(c>=u.length)break;l=u[c++]}else{c=u.next();if(c.done)break;l=c.value}var p=l;if(!p.check)continue;if(!p.check(e.value))continue;o=p.unprefixed;var h=t.prefixes.group(e).down(function(e){return e.value.includes(o)});if(h){i.removeChild(n);return}}})};e.withHackValue=function withHackValue(e){return e.prop==="-webkit-background-clip"&&e.value==="text"};e.disabledValue=function disabledValue(e,r){if(this.gridStatus(e,r)===false&&e.type==="decl"){if(e.prop==="display"&&e.value.includes("grid")){return true}}if(this.prefixes.options.flexbox===false&&e.type==="decl"){if(e.prop==="display"&&e.value.includes("flex")){return true}}return this.disabled(e,r)};e.disabledDecl=function disabledDecl(e,r){if(this.gridStatus(e,r)===false&&e.type==="decl"){if(e.prop.includes("grid")||e.prop==="justify-items"){return true}}if(this.prefixes.options.flexbox===false&&e.type==="decl"){var t=["order","justify-content","align-items","align-content"];if(e.prop.includes("flex")||t.includes(e.prop)){return true}}return this.disabled(e,r)};e.disabled=function disabled(e,r){if(!e)return false;if(e._autoprefixerDisabled!==undefined){return e._autoprefixerDisabled}if(e.parent){var t=e.prev();if(t&&t.type==="comment"&&u.test(t.text)){e._autoprefixerDisabled=true;e._autoprefixerSelfDisabled=true;return true}}var n=null;if(e.nodes){var i;e.each(function(e){if(e.type!=="comment")return;if(/(!\s*)?autoprefixer:\s*(off|on)/i.test(e.text)){if(typeof i!=="undefined"){r.warn("Second Autoprefixer control comment "+"was ignored. Autoprefixer applies control "+"comment to whole block, not to next rules.",{node:e})}else{i=/on/i.test(e.text)}}});if(i!==undefined){n=!i}}if(!e.nodes||n===null){if(e.parent){var o=this.disabled(e.parent,r);if(e.parent._autoprefixerSelfDisabled===true){n=false}else{n=o}}else{n=false}}e._autoprefixerDisabled=n;return n};e.reduceSpaces=function reduceSpaces(e){var r=false;this.prefixes.group(e).up(function(){r=true;return true});if(r){return}var t=e.raw("before").split("\n");var n=t[t.length-1].length;var i=false;this.prefixes.group(e).down(function(e){t=e.raw("before").split("\n");var r=t.length-1;if(t[r].length>n){if(i===false){i=t[r].length-n}t[r]=t[r].slice(0,-i);e.raws.before=t.join("\n")}})};e.displayType=function displayType(e){for(var r=e.parent.nodes,t=Array.isArray(r),n=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(n>=r.length)break;i=r[n++]}else{n=r.next();if(n.done)break;i=n.value}var o=i;if(o.prop!=="display"){continue}if(o.value.includes("flex")){return"flex"}if(o.value.includes("grid")){return"grid"}}return false};e.gridStatus=function gridStatus(e,r){if(!e)return false;if(e._autoprefixerGridStatus!==undefined){return e._autoprefixerGridStatus}var t=null;if(e.nodes){var n;e.each(function(e){if(e.type!=="comment")return;if(f.test(e.text)){var t=/:\s*autoplace/i.test(e.text);var i=/no-autoplace/i.test(e.text);if(typeof n!=="undefined"){r.warn("Second Autoprefixer grid control comment was "+"ignored. Autoprefixer applies control comments to the whole "+"block, not to the next rules.",{node:e})}else if(t){n="autoplace"}else if(i){n=true}else{n=/on/i.test(e.text)}}});if(n!==undefined){t=n}}if(e.type==="atrule"&&e.name==="supports"){var i=e.params;if(i.includes("grid")&&i.includes("auto")){t=false}}if(!e.nodes||t===null){if(e.parent){var o=this.gridStatus(e.parent,r);if(e.parent._autoprefixerSelfDisabled===true){t=false}else{t=o}}else if(typeof this.prefixes.options.grid!=="undefined"){t=this.prefixes.options.grid}else if(typeof process.env.AUTOPREFIXER_GRID!=="undefined"){if(process.env.AUTOPREFIXER_GRID==="autoplace"){t="autoplace"}else{t=true}}else{t=false}}e._autoprefixerGridStatus=t;return t};return Processor}();e.exports=l},9514:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=t.length)break;s=t[i++]}else{i=t.next();if(i.done)break;s=i.value}var a=s;this.bad.push(this.prefixName(a,"min"));this.bad.push(this.prefixName(a,"max"))}}e.params=o.editList(e.params,function(e){return e.filter(function(e){return r.bad.every(function(r){return!e.includes(r)})})})};r.process=function process(e){var r=this;var t=this.parentPrefix(e);var n=t?[t]:this.prefixes;e.params=o.editList(e.params,function(e,t){for(var i=e,u=Array.isArray(i),f=0,i=u?i:i[Symbol.iterator]();;){var c;if(u){if(f>=i.length)break;c=i[f++]}else{f=i.next();if(f.done)break;c=f.value}var l=c;if(!l.includes("min-resolution")&&!l.includes("max-resolution")){t.push(l);continue}var p=function _loop(){if(B){if(v>=h.length)return"break";d=h[v++]}else{v=h.next();if(v.done)return"break";d=v.value}var e=d;var n=l.replace(s,function(t){var n=t.match(a);return r.prefixQuery(e,n[1],n[2],n[3],n[4])});t.push(n)};for(var h=n,B=Array.isArray(h),v=0,h=B?h:h[Symbol.iterator]();;){var d;var b=p();if(b==="break")break}t.push(l)}return o.uniq(t)})};return Resolution}(i);e.exports=u},4806:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n=s.length)return"break";f=s[u++]}else{u=s.next();if(u.done)return"break";f=u.value}var e=f;prefixeds[e]=n.map(function(t){return r.replace(t,e)}).join(", ")};for(var s=this.possible(),a=Array.isArray(s),u=0,s=a?s:s[Symbol.iterator]();;){var f;var c=o();if(c==="break")break}}else{for(var l=this.possible(),p=Array.isArray(l),h=0,l=p?l:l[Symbol.iterator]();;){var B;if(p){if(h>=l.length)break;B=l[h++]}else{h=l.next();if(h.done)break;B=h.value}var v=B;prefixeds[v]=this.replace(e.selector,v)}}e._autoprefixerPrefixeds[this.name]=prefixeds;return e._autoprefixerPrefixeds};r.already=function already(e,r,t){var n=e.parent.index(e)-1;while(n>=0){var i=e.parent.nodes[n];if(i.type!=="rule"){return false}var o=false;for(var s in r[this.name]){var a=r[this.name][s];if(i.selector===a){if(t===s){return true}else{o=true;break}}}if(!o){return false}n-=1}return false};r.replace=function replace(e,r){return e.replace(this.regexp(),"$1"+this.prefixed(r))};r.add=function add(e,r){var t=this.prefixeds(e);if(this.already(e,t,r)){return}var n=this.clone(e,{selector:t[this.name][r]});e.parent.insertBefore(e,n)};r.old=function old(e){return new o(this,e)};return Selector}(s);e.exports=f},3817:(e,r,t)=>{"use strict";var n=t(4633);var i=t(4338).feature(t(7036));var o=t(2319);var s=t(6689);var a=t(1882);var u=t(772);var f=[];for(var c in i.stats){var l=i.stats[c];for(var p in l){var h=l[p];if(/y/.test(h)){f.push(c+" "+p)}}}var B=function(){function Supports(e,r){this.Prefixes=e;this.all=r}var e=Supports.prototype;e.prefixer=function prefixer(){if(this.prefixerCache){return this.prefixerCache}var e=this.all.browsers.selected.filter(function(e){return f.includes(e)});var r=new o(this.all.browsers.data,e,this.all.options);this.prefixerCache=new this.Prefixes(this.all.data,r,this.all.options);return this.prefixerCache};e.parse=function parse(e){var r=e.split(":");var t=r[0];var n=r[1];if(!n)n="";return[t.trim(),n.trim()]};e.virtual=function virtual(e){var r=this.parse(e),t=r[0],i=r[1];var o=n.parse("a{}").first;o.append({prop:t,value:i,raws:{before:""}});return o};e.prefixed=function prefixed(e){var r=this.virtual(e);if(this.disabled(r.first)){return r.nodes}var t={warn:function warn(){return null}};var n=this.prefixer().add[r.first.prop];n&&n.process&&n.process(r.first,t);for(var i=r.nodes,o=Array.isArray(i),s=0,i=o?i:i[Symbol.iterator]();;){var u;if(o){if(s>=i.length)break;u=i[s++]}else{s=i.next();if(s.done)break;u=s.value}var f=u;for(var c=this.prefixer().values("add",r.first.prop),l=Array.isArray(c),p=0,c=l?c:c[Symbol.iterator]();;){var h;if(l){if(p>=c.length)break;h=c[p++]}else{p=c.next();if(p.done)break;h=p.value}var B=h;B.process(f)}a.save(this.all,f)}return r.nodes};e.isNot=function isNot(e){return typeof e==="string"&&/not\s*/i.test(e)};e.isOr=function isOr(e){return typeof e==="string"&&/\s*or\s*/i.test(e)};e.isProp=function isProp(e){return typeof e==="object"&&e.length===1&&typeof e[0]==="string"};e.isHack=function isHack(e,r){var t=new RegExp("(\\(|\\s)"+u.escapeRegexp(r)+":");return!t.test(e)};e.toRemove=function toRemove(e,r){var t=this.parse(e),n=t[0],i=t[1];var o=this.all.unprefixed(n);var s=this.all.cleaner();if(s.remove[n]&&s.remove[n].remove&&!this.isHack(r,o)){return true}for(var a=s.values("remove",o),u=Array.isArray(a),f=0,a=u?a:a[Symbol.iterator]();;){var c;if(u){if(f>=a.length)break;c=a[f++]}else{f=a.next();if(f.done)break;c=f.value}var l=c;if(l.check(i)){return true}}return false};e.remove=function remove(e,r){var t=0;while(t=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;r.push([s.prop+": "+s.value]);r.push(" or ")}r[r.length-1]="";return r};e.normalize=function normalize(e){var r=this;if(typeof e!=="object"){return e}e=e.filter(function(e){return e!==""});if(typeof e[0]==="string"&&e[0].includes(":")){return[s.stringify(e)]}return e.map(function(e){return r.normalize(e)})};e.add=function add(e,r){var t=this;return e.map(function(e){if(t.isProp(e)){var n=t.prefixed(e[0]);if(n.length>1){return t.convert(n)}return e}if(typeof e==="object"){return t.add(e,r)}return e})};e.process=function process(e){var r=s.parse(e.params);r=this.normalize(r);r=this.remove(r,e.params);r=this.add(r,e.params);r=this.cleanBrackets(r);e.params=s.stringify(r)};e.disabled=function disabled(e){if(!this.all.options.grid){if(e.prop==="display"&&e.value.includes("grid")){return true}if(e.prop.includes("grid")||e.prop==="justify-items"){return true}}if(this.all.options.flexbox===false){if(e.prop==="display"&&e.value.includes("flex")){return true}var r=["order","justify-content","align-items","align-content"];if(e.prop.includes("flex")||r.includes(e.prop)){return true}}return false};return Supports}();e.exports=B},7080:(e,r,t)=>{"use strict";function _defineProperty(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}var n=t(23);var i=t(4633).vendor;var o=t(4633).list;var s=t(2319);var a=function(){function Transition(e){_defineProperty(this,"props",["transition","transition-property"]);this.prefixes=e}var e=Transition.prototype;e.add=function add(e,r){var t=this;var n,i;var add=this.prefixes.add[e.prop];var o=this.ruleVendorPrefixes(e);var s=o||add&&add.prefixes||[];var a=this.parse(e.value);var u=a.map(function(e){return t.findProp(e)});var f=[];if(u.some(function(e){return e[0]==="-"})){return}for(var c=a,l=Array.isArray(c),p=0,c=l?c:c[Symbol.iterator]();;){var h;if(l){if(p>=c.length)break;h=c[p++]}else{p=c.next();if(p.done)break;h=p.value}var B=h;i=this.findProp(B);if(i[0]==="-")continue;var v=this.prefixes.add[i];if(!v||!v.prefixes)continue;for(var d=v.prefixes,b=Array.isArray(d),y=0,d=b?d:d[Symbol.iterator]();;){if(b){if(y>=d.length)break;n=d[y++]}else{y=d.next();if(y.done)break;n=y.value}if(o&&!o.some(function(e){return n.includes(e)})){continue}var g=this.prefixes.prefixed(i,n);if(g!=="-ms-transform"&&!u.includes(g)){if(!this.disabled(i,n)){f.push(this.clone(i,g,B))}}}}a=a.concat(f);var m=this.stringify(a);var C=this.stringify(this.cleanFromUnprefixed(a,"-webkit-"));if(s.includes("-webkit-")){this.cloneBefore(e,"-webkit-"+e.prop,C)}this.cloneBefore(e,e.prop,C);if(s.includes("-o-")){var w=this.stringify(this.cleanFromUnprefixed(a,"-o-"));this.cloneBefore(e,"-o-"+e.prop,w)}for(var S=s,O=Array.isArray(S),T=0,S=O?S:S[Symbol.iterator]();;){if(O){if(T>=S.length)break;n=S[T++]}else{T=S.next();if(T.done)break;n=T.value}if(n!=="-webkit-"&&n!=="-o-"){var E=this.stringify(this.cleanOtherPrefixes(a,n));this.cloneBefore(e,n+e.prop,E)}}if(m!==e.value&&!this.already(e,e.prop,m)){this.checkForWarning(r,e);e.cloneBefore();e.value=m}};e.findProp=function findProp(e){var r=e[0].value;if(/^\d/.test(r)){for(var t=e.entries(),n=Array.isArray(t),i=0,t=n?t:t[Symbol.iterator]();;){var o;if(n){if(i>=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o,a=s[0],u=s[1];if(a!==0&&u.type==="word"){return u.value}}}return r};e.already=function already(e,r,t){return e.parent.some(function(e){return e.prop===r&&e.value===t})};e.cloneBefore=function cloneBefore(e,r,t){if(!this.already(e,r,t)){e.cloneBefore({prop:r,value:t})}};e.checkForWarning=function checkForWarning(e,r){if(r.prop!=="transition-property"){return}r.parent.each(function(t){if(t.type!=="decl"){return undefined}if(t.prop.indexOf("transition-")!==0){return undefined}if(t.prop==="transition-property"){return undefined}if(o.comma(t.value).length>1){r.warn(e,"Replace transition-property to transition, "+"because Autoprefixer could not support "+"any cases of transition-property "+"and other transition-*")}return false})};e.remove=function remove(e){var r=this;var t=this.parse(e.value);t=t.filter(function(e){var t=r.prefixes.remove[r.findProp(e)];return!t||!t.remove});var n=this.stringify(t);if(e.value===n){return}if(t.length===0){e.remove();return}var i=e.parent.some(function(r){return r.prop===e.prop&&r.value===n});var o=e.parent.some(function(r){return r!==e&&r.prop===e.prop&&r.value.length>n.length});if(i||o){e.remove();return}e.value=n};e.parse=function parse(e){var r=n(e);var t=[];var i=[];for(var o=r.nodes,s=Array.isArray(o),a=0,o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u;i.push(f);if(f.type==="div"&&f.value===","){t.push(i);i=[]}}t.push(i);return t.filter(function(e){return e.length>0})};e.stringify=function stringify(e){if(e.length===0){return""}var r=[];for(var t=e,i=Array.isArray(t),o=0,t=i?t:t[Symbol.iterator]();;){var s;if(i){if(o>=t.length)break;s=t[o++]}else{o=t.next();if(o.done)break;s=o.value}var a=s;if(a[a.length-1].type!=="div"){a.push(this.div(e))}r=r.concat(a)}if(r[0].type==="div"){r=r.slice(1)}if(r[r.length-1].type==="div"){r=r.slice(0,+-2+1||0)}return n.stringify({nodes:r})};e.clone=function clone(e,r,t){var n=[];var i=false;for(var o=t,s=Array.isArray(o),a=0,o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u;if(!i&&f.type==="word"&&f.value===e){n.push({type:"word",value:r});i=true}else{n.push(f)}}return n};e.div=function div(e){for(var r=e,t=Array.isArray(r),n=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(n>=r.length)break;i=r[n++]}else{n=r.next();if(n.done)break;i=n.value}var o=i;for(var s=o,a=Array.isArray(s),u=0,s=a?s:s[Symbol.iterator]();;){var f;if(a){if(u>=s.length)break;f=s[u++]}else{u=s.next();if(u.done)break;f=u.value}var c=f;if(c.type==="div"&&c.value===","){return c}}}return{type:"div",value:",",after:" "}};e.cleanOtherPrefixes=function cleanOtherPrefixes(e,r){var t=this;return e.filter(function(e){var n=i.prefix(t.findProp(e));return n===""||n===r})};e.cleanFromUnprefixed=function cleanFromUnprefixed(e,r){var t=this;var n=e.map(function(e){return t.findProp(e)}).filter(function(e){return e.slice(0,r.length)===r}).map(function(e){return t.prefixes.unprefixed(e)});var o=[];for(var s=e,a=Array.isArray(s),u=0,s=a?s:s[Symbol.iterator]();;){var f;if(a){if(u>=s.length)break;f=s[u++]}else{u=s.next();if(u.done)break;f=u.value}var c=f;var l=this.findProp(c);var p=i.prefix(l);if(!n.includes(l)&&(p===r||p==="")){o.push(c)}}return o};e.disabled=function disabled(e,r){var t=["order","justify-content","align-self","align-content"];if(e.includes("flex")||t.includes(e)){if(this.prefixes.options.flexbox===false){return true}if(this.prefixes.options.flexbox==="no-2009"){return r.includes("2009")}}return undefined};e.ruleVendorPrefixes=function ruleVendorPrefixes(e){var r=e.parent;if(r.type!=="rule"){return false}else if(!r.selector.includes(":-")){return false}var t=s.prefixes().filter(function(e){return r.selector.includes(":"+e)});return t.length>0?t:false};return Transition}();e.exports=a},772:(e,r,t)=>{"use strict";var n=t(4633).list;e.exports={error:function error(e){var r=new Error(e);r.autoprefixer=true;throw r},uniq:function uniq(e){var r=[];for(var t=e,n=Array.isArray(t),i=0,t=n?t:t[Symbol.iterator]();;){var o;if(n){if(i>=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;if(!r.includes(s)){r.push(s)}}return r},removeNote:function removeNote(e){if(!e.includes(" ")){return e}return e.split(" ")[0]},escapeRegexp:function escapeRegexp(e){return e.replace(/[$()*+-.?[\\\]^{|}]/g,"\\$&")},regexp:function regexp(e,r){if(r===void 0){r=true}if(r){e=this.escapeRegexp(e)}return new RegExp("(^|[\\s,(])("+e+"($|[\\s(,]))","gi")},editList:function editList(e,r){var t=n.comma(e);var i=r(t,[]);if(t===i){return e}var o=e.match(/,\s*/);o=o?o[0]:", ";return i.join(o)},splitSelector:function splitSelector(e){return n.comma(e).map(function(e){return n.space(e).map(function(e){return e.split(/(?=\.|#)/g)})})}}},1882:(e,r,t)=>{"use strict";function _defaults(e,r){var t=Object.getOwnPropertyNames(r);for(var n=0;n{var n=t(2731);var i=t(2355);var o=t(3856);function ValueParser(e){if(this instanceof ValueParser){this.nodes=n(e);return this}return new ValueParser(e)}ValueParser.prototype.toString=function(){return Array.isArray(this.nodes)?o(this.nodes):""};ValueParser.prototype.walk=function(e,r){i(this.nodes,e,r);return this};ValueParser.unit=t(2137);ValueParser.walk=i;ValueParser.stringify=o;e.exports=ValueParser},2731:e=>{var r="(".charCodeAt(0);var t=")".charCodeAt(0);var n="'".charCodeAt(0);var i='"'.charCodeAt(0);var o="\\".charCodeAt(0);var s="/".charCodeAt(0);var a=",".charCodeAt(0);var u=":".charCodeAt(0);var f="*".charCodeAt(0);var c="u".charCodeAt(0);var l="U".charCodeAt(0);var p="+".charCodeAt(0);var h=/^[a-f0-9?-]+$/i;e.exports=function(e){var B=[];var v=e;var d,b,y,g,m,C,w,S;var O=0;var T=v.charCodeAt(O);var E=v.length;var k=[{nodes:B}];var P=0;var D;var A="";var R="";var F="";while(O{function stringifyNode(e,r){var t=e.type;var n=e.value;var i;var o;if(r&&(o=r(e))!==undefined){return o}else if(t==="word"||t==="space"){return n}else if(t==="string"){i=e.quote||"";return i+n+(e.unclosed?"":i)}else if(t==="comment"){return"/*"+n+(e.unclosed?"":"*/")}else if(t==="div"){return(e.before||"")+n+(e.after||"")}else if(Array.isArray(e.nodes)){i=stringify(e.nodes,r);if(t!=="function"){return i}return n+"("+(e.before||"")+i+(e.after||"")+(e.unclosed?"":")")}return n}function stringify(e,r){var t,n;if(Array.isArray(e)){t="";for(n=e.length-1;~n;n-=1){t=stringifyNode(e[n],r)+t}return t}return stringifyNode(e,r)}e.exports=stringify},2137:e=>{var r="-".charCodeAt(0);var t="+".charCodeAt(0);var n=".".charCodeAt(0);var i="e".charCodeAt(0);var o="E".charCodeAt(0);function likeNumber(e){var i=e.charCodeAt(0);var o;if(i===t||i===r){o=e.charCodeAt(1);if(o>=48&&o<=57){return true}var s=e.charCodeAt(2);if(o===n&&s>=48&&s<=57){return true}return false}if(i===n){o=e.charCodeAt(1);if(o>=48&&o<=57){return true}return false}if(i>=48&&i<=57){return true}return false}e.exports=function(e){var s=0;var a=e.length;var u;var f;var c;if(a===0||!likeNumber(e)){return false}u=e.charCodeAt(s);if(u===t||u===r){s++}while(s57){break}s+=1}u=e.charCodeAt(s);f=e.charCodeAt(s+1);if(u===n&&f>=48&&f<=57){s+=2;while(s57){break}s+=1}}u=e.charCodeAt(s);f=e.charCodeAt(s+1);c=e.charCodeAt(s+2);if((u===i||u===o)&&(f>=48&&f<=57||(f===t||f===r)&&c>=48&&c<=57)){s+=f===t||f===r?3:2;while(s57){break}s+=1}}return{number:e.slice(0,s),unit:e.slice(s)}}},2355:e=>{e.exports=function walk(e,r,t){var n,i,o,s;for(n=0,i=e.length;n{"use strict";e.exports=balanced;function balanced(e,r,t){if(e instanceof RegExp)e=maybeMatch(e,t);if(r instanceof RegExp)r=maybeMatch(r,t);var n=range(e,r,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+e.length,n[1]),post:t.slice(n[1]+r.length)}}function maybeMatch(e,r){var t=r.match(e);return t?t[0]:null}balanced.range=range;function range(e,r,t){var n,i,o,s,a;var u=t.indexOf(e);var f=t.indexOf(r,u+1);var c=u;if(u>=0&&f>0){n=[];o=t.length;while(c>=0&&!a){if(c==u){n.push(c);u=t.indexOf(e,c+1)}else if(n.length==1){a=[n.pop(),f]}else{i=n.pop();if(i=0?u:f}if(n.length){a=[o,s]}}return a}},1302:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{36:"KB P M R S YB U",257:"I J K L",548:"C N D"},C:{1:"3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",16:"0 1 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB",130:"2"},D:{36:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{16:"dB WB",36:"G Y O F H E A B C N D fB gB hB iB XB T Q mB nB"},F:{16:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{16:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{16:"CC"},I:{16:"bB G M DC EC FC GC aB HC IC"},J:{16:"F A"},K:{16:"A B C DB T ZB Q"},L:{16:"U"},M:{16:"OB"},N:{16:"A B"},O:{16:"JC"},P:{16:"G KC LC MC NC OC XB PC QC"},Q:{16:"RC"},R:{16:"SC"},S:{130:"jB"}},B:1,C:"CSS3 Background-clip: text"}},2259:e=>{e.exports={A:{A:{1:"E A B",2:"O F H lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB",36:"sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",516:"G Y O F H E A B C N D"},E:{1:"F H E A B C N D hB iB XB T Q mB nB",772:"G Y O dB WB fB gB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V qB rB T ZB tB Q",2:"E oB",36:"pB"},G:{1:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",4:"WB uB aB xB",516:"TC"},H:{132:"CC"},I:{1:"M HC IC",36:"DC",516:"bB G GC aB",548:"EC FC"},J:{1:"F A"},K:{1:"A B C DB T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS3 Background-image options"}},9847:e=>{e.exports={A:{A:{1:"B",2:"O F H E A lB"},B:{1:"D I J K L KB P M R S YB U",129:"C N"},C:{1:"4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",260:"0 1 2 3 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",804:"G Y O F H E A B C N D kB sB"},D:{1:"AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",260:"5 6 7 8 9",388:"0 1 2 3 4 k l m n o p q r s t u v w x y z",1412:"I J K L Z a b c d e f g h i j",1956:"G Y O F H E A B C N D"},E:{129:"A B C N D iB XB T Q mB nB",1412:"O F H E gB hB",1956:"G Y dB WB fB"},F:{1:"0 1 2 3 4 5 6 7 8 9 x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E oB pB",260:"s t u v w",388:"I J K L Z a b c d e f g h i j k l m n o p q r",1796:"qB rB",1828:"B C T ZB tB Q"},G:{129:"D 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",1412:"H xB yB zB 0B",1956:"WB uB aB TC"},H:{1828:"CC"},I:{388:"M HC IC",1956:"bB G DC EC FC GC aB"},J:{1412:"A",1924:"F"},K:{1:"DB",2:"A",1828:"B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{1:"B",2:"A"},O:{388:"JC"},P:{1:"MC NC OC XB PC QC",260:"KC LC",388:"G"},Q:{260:"RC"},R:{260:"SC"},S:{260:"jB"}},B:4,C:"CSS3 Border images"}},9888:e=>{e.exports={A:{A:{1:"E A B",2:"O F H lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",257:"0 1 2 3 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",289:"bB kB sB",292:"eB"},D:{1:"0 1 2 3 4 5 6 7 8 9 Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G"},E:{1:"Y F H E A B C N D hB iB XB T Q mB nB",33:"G dB WB",129:"O fB gB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V qB rB T ZB tB Q",2:"E oB pB"},G:{1:"H D uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"WB"},H:{2:"CC"},I:{1:"bB G M EC FC GC aB HC IC",33:"DC"},J:{1:"F A"},K:{1:"B C DB T ZB Q",2:"A"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{257:"jB"}},B:4,C:"CSS3 Border-radius (rounded corners)"}},3807:e=>{e.exports={A:{A:{2:"O F H lB",260:"E",516:"A B"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB sB",33:"G Y O F H E A B C N D I"},D:{1:"0 1 2 3 4 5 6 7 8 9 g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L",33:"Z a b c d e f"},E:{1:"F H E A B C N D gB hB iB XB T Q mB nB",2:"G Y dB WB fB",33:"O"},F:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q"},G:{1:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC",33:"xB"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB",132:"HC IC"},J:{1:"A",2:"F"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"calc() as CSS unit value"}},8252:e=>{e.exports={A:{A:{1:"A B",2:"O F H E lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G kB sB",33:"Y O F H E A B C N D I"},D:{1:"0 1 2 3 4 5 6 7 8 9 x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w"},E:{1:"E A B C N D iB XB T Q mB nB",2:"dB WB",33:"O F H fB gB hB",292:"G Y"},F:{1:"0 1 2 3 4 5 6 7 8 9 k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E B oB pB qB rB T ZB tB",33:"C I J K L Z a b c d e f g h i j"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"H xB yB zB",164:"WB uB aB TC"},H:{2:"CC"},I:{1:"M",33:"G GC aB HC IC",164:"bB DC EC FC"},J:{33:"F A"},K:{1:"DB Q",2:"A B C T ZB"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{33:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS Animation"}},1977:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J K L"},C:{1:"4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",16:"eB",33:"0 1 2 3 bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB"},D:{1:"JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",16:"G Y O F H E A B C N D",33:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB"},E:{1:"E A B C N D iB XB T Q mB nB",16:"G Y O dB WB fB",33:"F H gB hB"},F:{1:"6 7 8 9 AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"0 1 2 3 4 5 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",16:"WB uB aB TC",33:"H xB yB zB"},H:{2:"CC"},I:{1:"M",16:"bB G DC EC FC GC aB",33:"HC IC"},J:{16:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{33:"JC"},P:{1:"OC XB PC QC",16:"G",33:"KC LC MC NC"},Q:{1:"RC"},R:{1:"SC"},S:{33:"jB"}},B:5,C:"CSS :any-link selector"}},8672:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"S YB U",33:"R",164:"KB P M",388:"C N D I J K L"},C:{1:"P M OB R S",164:"0 1 2 3 4 5 6 7 8 9 p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB",676:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o kB sB"},D:{1:"S YB U vB wB cB",33:"R",164:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M"},E:{164:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{2:"E B C oB pB qB rB T ZB tB Q",33:"FB W V",164:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB"},G:{164:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{164:"bB G M DC EC FC GC aB HC IC"},J:{164:"F A"},K:{2:"A B C T ZB Q",164:"DB"},L:{1:"U"},M:{164:"OB"},N:{2:"A",388:"B"},O:{164:"JC"},P:{164:"G KC LC MC NC OC XB PC QC"},Q:{164:"RC"},R:{164:"SC"},S:{164:"jB"}},B:5,C:"CSS Appearance"}},3613:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J",257:"K L"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB kB sB",578:"FB W V VB QB RB SB TB UB KB P M OB R S"},D:{1:"SB TB UB KB P M R S YB U vB wB cB",2:"0 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",194:"1 2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB"},E:{2:"G Y O F H dB WB fB gB hB",33:"E A B C N D iB XB T Q mB nB"},F:{1:"IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b c d e f g h i j k l m n oB pB qB rB T ZB tB Q",194:"0 1 2 3 4 5 6 7 8 9 o p q r s t u v w x y z AB BB CB EB GB HB"},G:{2:"H WB uB aB TC xB yB zB",33:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{578:"OB"},N:{2:"A B"},O:{2:"JC"},P:{1:"QC",2:"G",194:"KC LC MC NC OC XB PC"},Q:{194:"RC"},R:{194:"SC"},S:{2:"jB"}},B:7,C:"CSS Backdrop Filter"}},4016:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",164:"KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l kB sB"},D:{2:"G Y O F H E A B C N D I J K L Z a b",164:"0 1 2 3 4 5 6 7 8 9 c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O dB WB fB",164:"F H E A B C N D gB hB iB XB T Q mB nB"},F:{2:"E oB pB qB rB",129:"B C T ZB tB Q",164:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"WB uB aB TC xB",164:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{132:"CC"},I:{2:"bB G DC EC FC GC aB",164:"M HC IC"},J:{2:"F",164:"A"},K:{2:"A",129:"B C T ZB Q",164:"DB"},L:{164:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{164:"G KC LC MC NC OC XB PC QC"},Q:{164:"RC"},R:{164:"SC"},S:{1:"jB"}},B:5,C:"CSS box-decoration-break"}},5861:e=>{e.exports={A:{A:{1:"E A B",2:"O F H lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",33:"kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E"},E:{1:"O F H E A B C N D fB gB hB iB XB T Q mB nB",33:"Y",164:"G dB WB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V qB rB T ZB tB Q",2:"E oB pB"},G:{1:"H D TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"uB aB",164:"WB"},H:{2:"CC"},I:{1:"G M GC aB HC IC",164:"bB DC EC FC"},J:{1:"A",33:"F"},K:{1:"B C DB T ZB Q",2:"A"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS3 Box-shadow"}},147:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K",260:"KB P M R S YB U",3138:"L"},C:{1:"8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",132:"0 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB",644:"1 2 3 4 5 6 7"},D:{2:"G Y O F H E A B C N D I J K L Z a b c d",260:"9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",292:"0 1 2 3 4 5 6 7 8 e f g h i j k l m n o p q r s t u v w x y z"},E:{2:"G Y O dB WB fB gB",292:"F H E A B C N D hB iB XB T Q mB nB"},F:{2:"E B C oB pB qB rB T ZB tB Q",260:"0 1 2 3 4 5 6 7 8 9 w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",292:"I J K L Z a b c d e f g h i j k l m n o p q r s t u v"},G:{2:"WB uB aB TC xB",292:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB",260:"M",292:"HC IC"},J:{2:"F A"},K:{2:"A B C T ZB Q",260:"DB"},L:{260:"U"},M:{1:"OB"},N:{2:"A B"},O:{292:"JC"},P:{292:"G KC LC MC NC OC XB PC QC"},Q:{292:"RC"},R:{260:"SC"},S:{644:"jB"}},B:4,C:"CSS clip-path property (for HTML)"}},664:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",33:"KB P M R S YB U"},C:{1:"2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"0 1 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB"},D:{16:"G Y O F H E A B C N D I J K L",33:"0 1 2 3 4 5 6 7 8 9 Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y dB WB fB",33:"O F H E A B C N D gB hB iB XB T Q mB nB"},F:{2:"E B C oB pB qB rB T ZB tB Q",33:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{16:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{16:"bB G M DC EC FC GC aB HC IC"},J:{16:"F A"},K:{2:"A B C DB T ZB Q"},L:{16:"U"},M:{1:"OB"},N:{16:"A B"},O:{16:"JC"},P:{16:"G KC LC MC NC OC XB PC QC"},Q:{33:"RC"},R:{16:"SC"},S:{1:"jB"}},B:5,C:"CSS color-adjust"}},7794:e=>{e.exports={A:{A:{2:"O lB",2340:"F H E A B"},B:{2:"C N D I J K L",1025:"KB P M R S YB U"},C:{2:"eB bB kB",513:"JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",545:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB sB"},D:{2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u",1025:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"A B C N D XB T Q mB nB",2:"G Y dB WB fB",164:"O",4644:"F H E gB hB iB"},F:{2:"E B I J K L Z a b c d e f g h oB pB qB rB T ZB",545:"C tB Q",1025:"0 1 2 3 4 5 6 7 8 9 i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB",4260:"TC xB",4644:"H yB zB 0B 1B"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB HC IC",1025:"M"},J:{2:"F",4260:"A"},K:{2:"A B T ZB",545:"C Q",1025:"DB"},L:{1025:"U"},M:{545:"OB"},N:{2340:"A B"},O:{1:"JC"},P:{1025:"G KC LC MC NC OC XB PC QC"},Q:{1025:"RC"},R:{1025:"SC"},S:{4097:"jB"}},B:7,C:"Crisp edges/pixelated images"}},3323:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",33:"KB P M R S YB U"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"G Y O F H E A B C N D I J",33:"0 1 2 3 4 5 6 7 8 9 K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"A B C N D XB T Q mB nB",2:"G Y dB WB",33:"O F H E fB gB hB iB"},F:{2:"E B C oB pB qB rB T ZB tB Q",33:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB",33:"H TC xB yB zB 0B 1B"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB",33:"M HC IC"},J:{2:"F A"},K:{2:"A B C T ZB Q",33:"DB"},L:{33:"U"},M:{2:"OB"},N:{2:"A B"},O:{33:"JC"},P:{33:"G KC LC MC NC OC XB PC QC"},Q:{33:"RC"},R:{33:"SC"},S:{2:"jB"}},B:4,C:"CSS Cross-Fade Function"}},1779:e=>{e.exports={A:{A:{2:"O F H E lB",164:"A B"},B:{66:"KB P M R S YB U",164:"C N D I J K L"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i",66:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{2:"E B C I J K L Z a b c d e f g h i j k l m n o p q r s t oB pB qB rB T ZB tB Q",66:"0 1 2 3 4 5 6 7 8 9 u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{292:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A DB",292:"B C T ZB Q"},L:{2:"U"},M:{2:"OB"},N:{164:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{66:"RC"},R:{2:"SC"},S:{2:"jB"}},B:5,C:"CSS Device Adaptation"}},9666:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L KB P M R S YB U"},C:{33:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",164:"eB bB kB sB"},D:{2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{2:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{2:"U"},M:{33:"OB"},N:{2:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{2:"RC"},R:{2:"SC"},S:{33:"jB"}},B:5,C:"CSS element() function"}},7036:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e f g h"},E:{1:"E A B C N D iB XB T Q mB nB",2:"G Y O F H dB WB fB gB hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E B C oB pB qB rB T ZB tB"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"H WB uB aB TC xB yB zB"},H:{1:"CC"},I:{1:"M HC IC",2:"bB G DC EC FC GC aB"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS Feature Queries"}},6192:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L KB P M R S YB U"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"A B C N D iB XB T Q mB nB",2:"G Y O F H dB WB fB gB hB",33:"E"},F:{2:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"H WB uB aB TC xB yB zB",33:"0B 1B"},H:{2:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{2:"U"},M:{2:"OB"},N:{2:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{2:"RC"},R:{2:"SC"},S:{2:"jB"}},B:5,C:"CSS filter() function"}},9237:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",1028:"N D I J K L",1346:"C"},C:{1:"0 1 2 3 4 5 6 7 8 9 p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB",196:"o",516:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n sB"},D:{1:"7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K",33:"0 1 2 3 4 5 6 L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{1:"A B C N D iB XB T Q mB nB",2:"G Y dB WB fB",33:"O F H E gB hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"I J K L Z a b c d e f g h i j k l m n o p q r s t"},G:{1:"D 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC",33:"H xB yB zB 0B"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB",33:"HC IC"},J:{2:"F",33:"A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"MC NC OC XB PC QC",33:"G KC LC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS Filter Effects"}},1407:e=>{e.exports={A:{A:{1:"A B",2:"O F H E lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB",260:"J K L Z a b c d e f g h i j k l m n o p",292:"G Y O F H E A B C N D I sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"A B C N D I J K L Z a b c d e f",548:"G Y O F H E"},E:{2:"dB WB",260:"F H E A B C N D gB hB iB XB T Q mB nB",292:"O fB",804:"G Y"},F:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E B oB pB qB rB",33:"C tB",164:"T ZB"},G:{260:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",292:"TC xB",804:"WB uB aB"},H:{2:"CC"},I:{1:"M HC IC",33:"G GC aB",548:"bB DC EC FC"},J:{1:"A",548:"F"},K:{1:"DB Q",2:"A B",33:"C",164:"T ZB"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS Gradients"}},7776:e=>{e.exports={A:{A:{2:"O F H lB",8:"E",292:"A B"},B:{1:"J K L KB P M R S YB U",292:"C N D I"},C:{1:"8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L kB sB",8:"Z a b c d e f g h i j k l m n o p q r s t",584:"0 1 2 3 4 5 u v w x y z",1025:"6 7"},D:{1:"CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e",8:"f g h i",200:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB",1025:"BB"},E:{1:"B C N D XB T Q mB nB",2:"G Y dB WB fB",8:"O F H E A gB hB iB"},F:{1:"0 1 2 3 4 5 6 7 8 9 y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b c d e f g h oB pB qB rB T ZB tB Q",200:"i j k l m n o p q r s t u v w x"},G:{1:"D 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC",8:"H xB yB zB 0B 1B 2B"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC",8:"aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{292:"A B"},O:{1:"JC"},P:{1:"LC MC NC OC XB PC QC",2:"KC",8:"G"},Q:{1:"RC"},R:{2:"SC"},S:{1:"jB"}},B:4,C:"CSS Grid Layout (level 1)"}},9747:e=>{e.exports={A:{A:{2:"O F H E lB",33:"A B"},B:{33:"C N D I J K L",132:"KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y kB sB",33:"O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w"},D:{1:"wB cB",2:"0 1 2 3 4 5 6 7 8 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",132:"9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB"},E:{2:"G Y dB WB",33:"O F H E A B C N D fB gB hB iB XB T Q mB nB"},F:{2:"E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v oB pB qB rB T ZB tB Q",132:"0 1 2 3 4 5 6 7 8 9 w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"WB uB",33:"H D aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{4:"JC"},P:{1:"LC MC NC OC XB PC QC",2:"G",132:"KC"},Q:{2:"RC"},R:{132:"SC"},S:{1:"jB"}},B:5,C:"CSS Hyphenation"}},4197:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",33:"KB P M R S YB U"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"G Y O F H E A B C N D I J K L Z a",33:"0 1 2 3 4 5 6 7 8 9 b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y dB WB fB",33:"O F H E gB hB iB",129:"A B C N D XB T Q mB nB"},F:{2:"E B C oB pB qB rB T ZB tB Q",33:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"WB uB aB TC",33:"H xB yB zB 0B 1B",129:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB",33:"M HC IC"},J:{2:"F",33:"A"},K:{2:"A B C T ZB Q",33:"DB"},L:{33:"U"},M:{2:"OB"},N:{2:"A B"},O:{33:"JC"},P:{33:"G KC LC MC NC OC XB PC QC"},Q:{33:"RC"},R:{33:"SC"},S:{2:"jB"}},B:5,C:"CSS image-set"}},471:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",3588:"KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB",164:"bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u kB sB"},D:{292:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB",2052:"vB wB cB",3588:"NB FB W V VB QB RB SB TB UB KB P M R S YB U"},E:{292:"G Y O F H E A B C dB WB fB gB hB iB XB T",2052:"nB",3588:"N D Q mB"},F:{2:"E B C oB pB qB rB T ZB tB Q",292:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",3588:"AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{292:"H WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B",3588:"D 7B 8B 9B AC BC"},H:{2:"CC"},I:{292:"bB G DC EC FC GC aB HC IC",3588:"M"},J:{292:"F A"},K:{2:"A B C T ZB Q",3588:"DB"},L:{3588:"U"},M:{1:"OB"},N:{2:"A B"},O:{292:"JC"},P:{292:"G KC LC MC NC OC",3588:"XB PC QC"},Q:{3588:"RC"},R:{3588:"SC"},S:{3588:"jB"}},B:5,C:"CSS Logical Properties"}},4613:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J",164:"KB P M R S YB U",3138:"K",12292:"L"},C:{1:"7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",260:"0 1 2 3 4 5 6 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB"},D:{164:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"dB WB",164:"G Y O F H E A B C N D fB gB hB iB XB T Q mB nB"},F:{2:"E B C oB pB qB rB T ZB tB Q",164:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{164:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{164:"M HC IC",676:"bB G DC EC FC GC aB"},J:{164:"F A"},K:{2:"A B C T ZB Q",164:"DB"},L:{164:"U"},M:{1:"OB"},N:{2:"A B"},O:{164:"JC"},P:{164:"G KC LC MC NC OC XB PC QC"},Q:{164:"RC"},R:{164:"SC"},S:{260:"jB"}},B:4,C:"CSS Masks"}},3588:e=>{e.exports={A:{A:{2:"O F H lB",132:"E A B"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",260:"G Y O F H E A B C N D I kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",548:"G Y O F H E A B C N D I J K L Z a b c d e f g h i"},E:{2:"dB WB",548:"G Y O F H E A B C N D fB gB hB iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E",548:"B C oB pB qB rB T ZB tB"},G:{16:"WB",548:"H D uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{132:"CC"},I:{1:"M HC IC",16:"DC EC",548:"bB G FC GC aB"},J:{548:"F A"},K:{1:"DB Q",548:"A B C T ZB"},L:{1:"U"},M:{1:"OB"},N:{132:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:2,C:"Media Queries: resolution feature"}},3043:e=>{e.exports={A:{A:{2:"O F H E lB",132:"A B"},B:{1:"KB P M R S YB U",132:"C N D I J K",516:"L"},C:{1:"DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB kB sB"},D:{1:"JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB",260:"HB IB"},E:{2:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{1:"6 7 8 9 AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"0 1 2 3 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z oB pB qB rB T ZB tB Q",260:"4 5"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{1:"U"},M:{2:"OB"},N:{132:"A B"},O:{2:"JC"},P:{1:"NC OC XB PC QC",2:"G KC LC MC"},Q:{1:"RC"},R:{2:"SC"},S:{2:"jB"}},B:7,C:"CSS overscroll-behavior"}},5117:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",36:"C N D I J K L"},C:{1:"5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L kB sB",33:"0 1 2 3 4 Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},D:{1:"BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",36:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB"},E:{1:"B C N D XB T Q mB nB",2:"G dB WB",36:"Y O F H E A fB gB hB iB"},F:{1:"0 1 2 3 4 5 6 7 8 9 y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",36:"I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x"},G:{1:"D 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB",36:"H aB TC xB yB zB 0B 1B 2B"},H:{2:"CC"},I:{1:"M",36:"bB G DC EC FC GC aB HC IC"},J:{36:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{36:"A B"},O:{1:"JC"},P:{1:"MC NC OC XB PC QC",36:"G KC LC"},Q:{1:"RC"},R:{1:"SC"},S:{33:"jB"}},B:5,C:"::placeholder CSS pseudo-element"}},3502:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"N D I J K L KB P M R S YB U",2:"C"},C:{1:"UB KB P M OB R S",16:"eB",33:"0 1 2 3 4 5 6 7 8 9 bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",16:"G Y O F H E A B C N D",132:"I J K L Z a b c d e f g h i j k l m n o p"},E:{1:"E A B C N D iB XB T Q mB nB",16:"dB WB",132:"G Y O F H fB gB hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",16:"E B oB pB qB rB T",132:"C I J K L Z a b c ZB tB Q"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",16:"WB uB",132:"H aB TC xB yB zB"},H:{2:"CC"},I:{1:"M",16:"DC EC",132:"bB G FC GC aB HC IC"},J:{1:"A",132:"F"},K:{1:"DB",2:"A B T",132:"C ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{33:"jB"}},B:1,C:"CSS :read-only and :read-write selectors"}},5969:e=>{e.exports={A:{A:{2:"O F H E lB",420:"A B"},B:{2:"KB P M R S YB U",420:"C N D I J K L"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",36:"I J K L",66:"Z a b c d e f g h i j k l m n o"},E:{2:"G Y O C N D dB WB fB T Q mB nB",33:"F H E A B gB hB iB XB"},F:{2:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{2:"D WB uB aB TC xB 5B 6B 7B 8B 9B AC BC",33:"H yB zB 0B 1B 2B 3B 4B"},H:{2:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{2:"U"},M:{2:"OB"},N:{420:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{2:"RC"},R:{2:"SC"},S:{2:"jB"}},B:5,C:"CSS Regions"}},3347:e=>{e.exports={A:{A:{1:"E A B",2:"O F H lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q",2:"E"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M HC IC",2:"bB G DC EC FC GC aB"},J:{1:"A",2:"F"},K:{1:"C DB ZB Q",16:"A B T"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{33:"jB"}},B:5,C:"::selection CSS pseudo-element"}},4298:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J K L"},C:{1:"GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"0 1 2 3 4 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB",322:"5 6 7 8 9 AB BB CB DB EB PB"},D:{1:"0 1 2 3 4 5 6 7 8 9 r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n",194:"o p q"},E:{1:"B C N D XB T Q mB nB",2:"G Y O F dB WB fB gB",33:"H E A hB iB"},F:{1:"0 1 2 3 4 5 6 7 8 9 e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b c d oB pB qB rB T ZB tB Q"},G:{1:"D 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC xB yB",33:"H zB 0B 1B 2B"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{2:"jB"}},B:4,C:"CSS Shapes Level 1"}},87:e=>{e.exports={A:{A:{2:"O F H E lB",6308:"A",6436:"B"},B:{1:"KB P M R S YB U",6436:"C N D I J K L"},C:{1:"MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s kB sB",2052:"0 1 2 3 4 5 6 7 8 9 t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB"},D:{1:"NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB",8258:"X LB MB"},E:{1:"B C N D T Q mB nB",2:"G Y O F H dB WB fB gB hB",3108:"E A iB XB"},F:{1:"IB JB X LB MB NB FB W V",2:"0 1 2 3 4 5 6 7 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z oB pB qB rB T ZB tB Q",8258:"8 9 AB BB CB EB GB HB"},G:{1:"D 4B 5B 6B 7B 8B 9B AC BC",2:"H WB uB aB TC xB yB zB",3108:"0B 1B 2B 3B"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{2:"JC"},P:{1:"XB PC QC",2:"G KC LC MC NC OC"},Q:{2:"RC"},R:{2:"SC"},S:{2052:"jB"}},B:4,C:"CSS Scroll Snap"}},3727:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I",1028:"KB P M R S YB U",4100:"J K L"},C:{1:"DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f kB sB",194:"g h i j k l",516:"0 1 2 3 4 5 6 7 8 9 m n o p q r s t u v w x y z AB BB CB"},D:{2:"0 1 2 3 4 5 G Y O F H E A B C N D I J K L Z a b c r s t u v w x y z",322:"6 7 8 9 d e f g h i j k l m n o p q",1028:"AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"N D mB nB",2:"G Y O dB WB fB",33:"H E A B C hB iB XB T Q",2084:"F gB"},F:{2:"E B C I J K L Z a b c d e f g h i j k l m n o p q r s oB pB qB rB T ZB tB Q",322:"t u v",1028:"0 1 2 3 4 5 6 7 8 9 w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{1:"D 8B 9B AC BC",2:"WB uB aB TC",33:"H zB 0B 1B 2B 3B 4B 5B 6B 7B",2084:"xB yB"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB HC IC",1028:"M"},J:{2:"F A"},K:{2:"A B C T ZB Q",1028:"DB"},L:{1028:"U"},M:{1:"OB"},N:{2:"A B"},O:{1028:"JC"},P:{1:"LC MC NC OC XB PC QC",2:"G KC"},Q:{1028:"RC"},R:{2:"SC"},S:{516:"jB"}},B:5,C:"CSS position:sticky"}},9533:e=>{e.exports={A:{A:{132:"O F H E A B lB"},B:{1:"KB P M R S YB U",4:"C N D I J K L"},C:{1:"3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B kB sB",33:"0 1 2 C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},D:{1:"1 2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o",322:"0 p q r s t u v w x y z"},E:{2:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b oB pB qB rB T ZB tB Q",578:"c d e f g h i j k l m n"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{132:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",2:"G"},Q:{2:"RC"},R:{1:"SC"},S:{33:"jB"}},B:5,C:"CSS3 text-align-last"}},3100:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J K L"},C:{1:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r kB sB",194:"s t u"},D:{1:"2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"0 1 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{2:"G Y O F H E dB WB fB gB hB iB",16:"A",33:"B C N D XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b c d e f g h i j k l m n o oB pB qB rB T ZB tB Q"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"H WB uB aB TC xB yB zB 0B 1B"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",2:"G"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS text-orientation"}},8422:e=>{e.exports={A:{A:{2:"O F lB",161:"H E A B"},B:{2:"KB P M R S YB U",161:"C N D I J K L"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{2:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{2:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C DB T ZB Q"},L:{2:"U"},M:{2:"OB"},N:{16:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{2:"RC"},R:{2:"SC"},S:{2:"jB"}},B:5,C:"CSS Text 4 text-spacing"}},5056:e=>{e.exports={A:{A:{1:"A B",2:"O F H E lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB sB",33:"Y O F H E A B C N D I",164:"G"},D:{1:"0 1 2 3 4 5 6 7 8 9 g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E A B C N D I J K L Z a b c d e f"},E:{1:"F H E A B C N D gB hB iB XB T Q mB nB",33:"O fB",164:"G Y dB WB"},F:{1:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E oB pB",33:"C",164:"B qB rB T ZB tB"},G:{1:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"xB",164:"WB uB aB TC"},H:{2:"CC"},I:{1:"M HC IC",33:"bB G DC EC FC GC aB"},J:{1:"A",33:"F"},K:{1:"DB Q",33:"C",164:"A B T ZB"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS3 Transitions"}},1456:e=>{e.exports={A:{A:{132:"O F H E A B lB"},B:{1:"KB P M R S YB U",132:"C N D I J K L"},C:{1:"4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"0 1 2 3 K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",132:"eB bB G Y O F H E kB sB",292:"A B C N D I J"},D:{1:"2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",132:"G Y O F H E A B C N D I J",548:"0 1 K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{132:"G Y O F H dB WB fB gB hB",548:"E A B C N D iB XB T Q mB nB"},F:{132:"0 1 2 3 4 5 6 7 8 9 E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q"},G:{132:"H WB uB aB TC xB yB zB",548:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{16:"CC"},I:{1:"M",16:"bB G DC EC FC GC aB HC IC"},J:{16:"F A"},K:{16:"A B C DB T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{132:"A B"},O:{16:"JC"},P:{1:"KC LC MC NC OC XB PC QC",16:"G"},Q:{16:"RC"},R:{16:"SC"},S:{33:"jB"}},B:4,C:"CSS unicode-bidi property"}},8307:e=>{e.exports={A:{A:{132:"O F H E A B lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p kB sB",322:"q r s t u"},D:{1:"2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O",16:"F",33:"0 1 H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{1:"B C N D T Q mB nB",2:"G dB WB",16:"Y",33:"O F H E A fB gB hB iB XB"},F:{1:"0 1 2 3 4 5 6 7 8 9 p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"I J K L Z a b c d e f g h i j k l m n o"},G:{1:"D 4B 5B 6B 7B 8B 9B AC BC",16:"WB uB aB",33:"H TC xB yB zB 0B 1B 2B 3B"},H:{2:"CC"},I:{1:"M",2:"DC EC FC",33:"bB G GC aB HC IC"},J:{33:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{36:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",33:"G"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS writing-mode property"}},7759:e=>{e.exports={A:{A:{1:"H E A B",8:"O F lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E"},E:{1:"O F H E A B C N D fB gB hB iB XB T Q mB nB",33:"G Y dB WB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V oB pB qB rB T ZB tB Q",2:"E"},G:{1:"H D TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"WB uB aB"},H:{1:"CC"},I:{1:"G M GC aB HC IC",33:"bB DC EC FC"},J:{1:"A",33:"F"},K:{1:"A B C DB T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS3 Box-sizing"}},4528:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"I J K L KB P M R S YB U",2:"C N D"},C:{1:"0 1 2 3 4 5 6 7 8 9 h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g kB sB"},D:{1:"MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB"},E:{1:"B C N D T Q mB nB",33:"G Y O F H E A dB WB fB gB hB iB XB"},F:{1:"9 C AB BB CB EB GB HB IB JB X LB MB NB FB W V tB Q",2:"E B oB pB qB rB T ZB",33:"0 1 2 3 4 5 6 7 8 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{33:"F A"},K:{2:"A B C T ZB Q",33:"DB"},L:{1:"U"},M:{2:"OB"},N:{2:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{33:"RC"},R:{2:"SC"},S:{2:"jB"}},B:3,C:"CSS grab & grabbing cursors"}},8546:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"eB bB G Y O F H E A B C N D I J K L Z a b c d kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q"},E:{1:"E A B C N D iB XB T Q mB nB",33:"G Y O F H dB WB fB gB hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 C e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V tB Q",2:"E B oB pB qB rB T ZB",33:"I J K L Z a b c d"},G:{2:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{33:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{2:"OB"},N:{2:"A B"},O:{2:"JC"},P:{2:"G KC LC MC NC OC XB PC QC"},Q:{2:"RC"},R:{2:"SC"},S:{2:"jB"}},B:4,C:"CSS3 Cursors: zoom-in & zoom-out"}},9807:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J K L"},C:{2:"eB bB kB sB",33:"7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",164:"0 1 2 3 4 5 6 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},D:{1:"0 1 2 3 4 5 6 7 8 9 w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a",132:"b c d e f g h i j k l m n o p q r s t u v"},E:{1:"D mB nB",2:"G Y O dB WB fB",132:"F H E A B C N gB hB iB XB T Q"},F:{1:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E oB pB qB",132:"I J K L Z a b c d e f g h i",164:"B C rB T ZB tB Q"},G:{1:"D BC",2:"WB uB aB TC xB",132:"H yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC"},H:{164:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB",132:"HC IC"},J:{132:"F A"},K:{1:"DB",2:"A",164:"B C T ZB Q"},L:{1:"U"},M:{33:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{164:"jB"}},B:5,C:"CSS3 tab-size"}},3714:e=>{e.exports={A:{A:{2:"O F H E lB",1028:"B",1316:"A"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",164:"eB bB G Y O F H E A B C N D I J K L Z a b kB sB",516:"c d e f g h"},D:{1:"0 1 2 3 4 5 6 7 8 9 j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"b c d e f g h i",164:"G Y O F H E A B C N D I J K L Z a"},E:{1:"E A B C N D iB XB T Q mB nB",33:"F H gB hB",164:"G Y O dB WB fB"},F:{1:"0 1 2 3 4 5 6 7 8 9 K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E B C oB pB qB rB T ZB tB",33:"I J"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"H yB zB",164:"WB uB aB TC xB"},H:{1:"CC"},I:{1:"M HC IC",164:"bB G DC EC FC GC aB"},J:{1:"A",164:"F"},K:{1:"DB Q",2:"A B C T ZB"},L:{1:"U"},M:{1:"OB"},N:{1:"B",292:"A"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS Flexible Box Layout Module"}},7011:e=>{e.exports={A:{A:{1:"A B",2:"O F H E lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB kB sB",33:"I J K L Z a b c d e f g h i j k l m n",164:"G Y O F H E A B C N D"},D:{1:"2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I",33:"0 1 b c d e f g h i j k l m n o p q r s t u v w x y z",292:"J K L Z a"},E:{1:"A B C N D iB XB T Q mB nB",2:"F H E dB WB gB hB",4:"G Y O fB"},F:{1:"0 1 2 3 4 5 6 7 8 9 p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"I J K L Z a b c d e f g h i j k l m n o"},G:{1:"D 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"H yB zB 0B",4:"WB uB aB TC xB"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB",33:"HC IC"},J:{2:"F",33:"A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",33:"G"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS font-feature-settings"}},9195:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I J K L"},C:{1:"0 1 2 3 4 5 6 7 8 9 o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d kB sB",194:"e f g h i j k l m n"},D:{1:"0 1 2 3 4 5 6 7 8 9 n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i",33:"j k l m"},E:{1:"A B C N D iB XB T Q mB nB",2:"G Y O dB WB fB gB",33:"F H E hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I oB pB qB rB T ZB tB Q",33:"J K L Z"},G:{2:"WB uB aB TC xB yB",33:"H D zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M IC",2:"bB G DC EC FC GC aB",33:"HC"},J:{2:"F",33:"A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS3 font-kerning"}},5833:e=>{e.exports={A:{A:{2:"O F H E A lB",548:"B"},B:{1:"KB P M R S YB U",516:"C N D I J K L"},C:{1:"IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E kB sB",676:"0 A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",1700:"1 2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB"},D:{1:"W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D",676:"I J K L Z",804:"0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB"},E:{2:"G Y dB WB",676:"fB",804:"O F H E A B C N D gB hB iB XB T Q mB nB"},F:{1:"IB JB X LB MB NB FB W V Q",2:"E B C oB pB qB rB T ZB tB",804:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB"},G:{2:"H WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B",2052:"D 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{2:"bB G M DC EC FC GC aB HC IC"},J:{2:"F",292:"A"},K:{2:"A B C T ZB Q",804:"DB"},L:{804:"U"},M:{1:"OB"},N:{2:"A",548:"B"},O:{804:"JC"},P:{1:"XB PC QC",804:"G KC LC MC NC OC"},Q:{804:"RC"},R:{804:"SC"},S:{1:"jB"}},B:1,C:"Full Screen API"}},3794:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",1537:"KB P M R S YB U"},C:{2:"eB",932:"0 1 2 3 4 5 6 7 8 9 bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB kB sB",2308:"X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S"},D:{2:"G Y O F H E A B C N D I J K L Z a b",545:"c d e f g h i j k l m n o p q r s t u v w x y z",1537:"0 1 2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O dB WB fB",516:"B C N D T Q mB nB",548:"E A iB XB",676:"F H gB hB"},F:{2:"E B C oB pB qB rB T ZB tB Q",513:"o",545:"I J K L Z a b c d e f g h i j k l m",1537:"0 1 2 3 4 5 6 7 8 9 n p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"WB uB aB TC xB",548:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",676:"H yB zB"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB",545:"HC IC",1537:"M"},J:{2:"F",545:"A"},K:{2:"A B C T ZB Q",1537:"DB"},L:{1537:"U"},M:{2340:"OB"},N:{2:"A B"},O:{1:"JC"},P:{545:"G",1537:"KC LC MC NC OC XB PC QC"},Q:{545:"RC"},R:{1537:"SC"},S:{932:"jB"}},B:5,C:"Intrinsic & Extrinsic Sizing"}},1448:e=>{e.exports={A:{A:{1:"A B",2:"O F H E lB"},B:{1:"C N D I J K L",516:"KB P M R S YB U"},C:{132:"6 7 8 9 AB BB CB DB EB PB GB HB IB",164:"0 1 2 3 4 5 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z kB sB",516:"JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S"},D:{420:"0 1 2 3 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z",516:"4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"A B C N D XB T Q mB nB",132:"E iB",164:"F H hB",420:"G Y O dB WB fB gB"},F:{1:"C T ZB tB Q",2:"E B oB pB qB rB",420:"I J K L Z a b c d e f g h i j k l m n o p q",516:"0 1 2 3 4 5 6 7 8 9 r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",132:"0B 1B",164:"H yB zB",420:"WB uB aB TC xB"},H:{1:"CC"},I:{420:"bB G DC EC FC GC aB HC IC",516:"M"},J:{420:"F A"},K:{1:"C T ZB Q",2:"A B",516:"DB"},L:{516:"U"},M:{132:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",420:"G"},Q:{132:"RC"},R:{132:"SC"},S:{164:"jB"}},B:4,C:"CSS3 Multiple column layout"}},5147:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",2:"C N D I",260:"J K L"},C:{1:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k"},E:{1:"A B C N D XB T Q mB nB",2:"G Y O F dB WB fB gB",132:"H E hB iB"},F:{1:"0 1 2 3 4 5 6 7 8 9 Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E I J K L oB pB qB",33:"B C rB T ZB tB Q"},G:{1:"D 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC xB yB",132:"H zB 0B 1B"},H:{33:"CC"},I:{1:"M IC",2:"bB G DC EC FC GC aB HC"},J:{2:"F A"},K:{1:"DB",2:"A",33:"B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{2:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS3 object-fit/object-position"}},6714:e=>{e.exports={A:{A:{1:"B",2:"O F H E lB",164:"A"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y kB sB",8:"O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u",328:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB"},D:{1:"9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B C N D I J K L Z a b",8:"0 1 2 3 4 5 c d e f g h i j k l m n o p q r s t u v w x y z",584:"6 7 8"},E:{1:"N D mB nB",2:"G Y O dB WB fB",8:"F H E A B C gB hB iB XB T",1096:"Q"},F:{1:"0 1 2 3 4 5 6 7 8 9 w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",8:"I J K L Z a b c d e f g h i j k l m n o p q r s",584:"t u v"},G:{1:"D 9B AC BC",8:"H WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B",6148:"8B"},H:{2:"CC"},I:{1:"M",8:"bB G DC EC FC GC aB HC IC"},J:{8:"F A"},K:{1:"DB",2:"A",8:"B C T ZB Q"},L:{1:"U"},M:{328:"OB"},N:{1:"B",36:"A"},O:{8:"JC"},P:{1:"LC MC NC OC XB PC QC",2:"KC",8:"G"},Q:{1:"RC"},R:{2:"SC"},S:{328:"jB"}},B:2,C:"Pointer events"}},6848:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",2052:"KB P M R S YB U"},C:{2:"eB bB G Y kB sB",1028:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",1060:"O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p"},D:{2:"G Y O F H E A B C N D I J K L Z a b c d e f",226:"0 1 2 3 4 5 6 7 8 9 g h i j k l m n o p q r s t u v w x y z AB",2052:"BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{2:"G Y O F dB WB fB gB",772:"N D Q mB nB",804:"H E A B C iB XB T",1316:"hB"},F:{2:"E B C I J K L Z a b c d e f g h i j k l m n o oB pB qB rB T ZB tB Q",226:"p q r s t u v w x",2052:"0 1 2 3 4 5 6 7 8 9 y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{2:"WB uB aB TC xB yB",292:"H D zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{2:"A B C T ZB Q",2052:"DB"},L:{2052:"U"},M:{1:"OB"},N:{2:"A B"},O:{2052:"JC"},P:{2:"G KC LC",2052:"MC NC OC XB PC QC"},Q:{2:"RC"},R:{1:"SC"},S:{1028:"jB"}},B:4,C:"text-decoration styling"}},5802:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{2:"C N D I J K L",164:"KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y kB sB",322:"z"},D:{2:"G Y O F H E A B C N D I J K L Z a b c d e",164:"0 1 2 3 4 5 6 7 8 9 f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"H E A B C N D hB iB XB T Q mB nB",2:"G Y O dB WB fB",164:"F gB"},F:{2:"E B C oB pB qB rB T ZB tB Q",164:"0 1 2 3 4 5 6 7 8 9 I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V"},G:{1:"H D yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",2:"WB uB aB TC xB"},H:{2:"CC"},I:{2:"bB G DC EC FC GC aB",164:"M HC IC"},J:{2:"F",164:"A"},K:{2:"A B C T ZB Q",164:"DB"},L:{164:"U"},M:{1:"OB"},N:{2:"A B"},O:{164:"JC"},P:{164:"G KC LC MC NC OC XB PC QC"},Q:{164:"RC"},R:{164:"SC"},S:{1:"jB"}},B:4,C:"text-emphasis styling"}},123:e=>{e.exports={A:{A:{1:"O F H E A B",2:"lB"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",8:"eB bB G Y O kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB"},E:{1:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V T ZB tB Q",33:"E oB pB qB rB"},G:{1:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{1:"CC"},I:{1:"bB G M DC EC FC GC aB HC IC"},J:{1:"F A"},K:{1:"DB Q",33:"A B C T ZB"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:4,C:"CSS3 Text-overflow"}},6421:e=>{e.exports={A:{A:{2:"O F H E A B lB"},B:{1:"KB P M R S YB U",33:"C N D I J K L"},C:{2:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S kB sB"},D:{1:"8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"0 1 2 3 4 5 6 7 G Y O F H E A B C N D I J K L Z a b c d e f h i j k l m n o p q r s t u v w x y z",258:"g"},E:{2:"G Y O F H E A B C N D dB WB gB hB iB XB T Q mB nB",258:"fB"},F:{1:"0 1 2 3 4 5 6 7 8 9 x z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C I J K L Z a b c d e f g h i j k l m n o p q r s t u v w y oB pB qB rB T ZB tB Q"},G:{2:"WB uB aB",33:"H D TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"bB G DC EC FC GC aB HC IC"},J:{2:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{33:"OB"},N:{161:"A B"},O:{1:"JC"},P:{1:"KC LC MC NC OC XB PC QC",2:"G"},Q:{2:"RC"},R:{2:"SC"},S:{2:"jB"}},B:7,C:"CSS text-size-adjust"}},762:e=>{e.exports={A:{A:{2:"lB",8:"O F H",129:"A B",161:"E"},B:{1:"K L KB P M R S YB U",129:"C N D I J"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB",33:"G Y O F H E A B C N D I kB sB"},D:{1:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p"},E:{1:"E A B C N D iB XB T Q mB nB",33:"G Y O F H dB WB fB gB hB"},F:{1:"0 1 2 3 4 5 6 7 8 9 d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V Q",2:"E oB pB",33:"B C I J K L Z a b c qB rB T ZB tB"},G:{1:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC",33:"H WB uB aB TC xB yB zB"},H:{2:"CC"},I:{1:"M",33:"bB G DC EC FC GC aB HC IC"},J:{33:"F A"},K:{1:"B C DB T ZB Q",2:"A"},L:{1:"U"},M:{1:"OB"},N:{1:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS3 2D Transforms"}},58:e=>{e.exports={A:{A:{2:"O F H E lB",132:"A B"},B:{1:"C N D I J K L KB P M R S YB U"},C:{1:"0 1 2 3 4 5 6 7 8 9 J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M OB R S",2:"eB bB G Y O F H E kB sB",33:"A B C N D I"},D:{1:"0 1 2 3 4 5 6 7 8 9 q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",2:"G Y O F H E A B",33:"C N D I J K L Z a b c d e f g h i j k l m n o p"},E:{2:"dB WB",33:"G Y O F H fB gB hB",257:"E A B C N D iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 d e f g h i j k l m n o p q r s t u v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"I J K L Z a b c"},G:{33:"H WB uB aB TC xB yB zB",257:"D 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",2:"DC EC FC",33:"bB G GC aB HC IC"},J:{33:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{132:"A B"},O:{1:"JC"},P:{1:"G KC LC MC NC OC XB PC QC"},Q:{1:"RC"},R:{1:"SC"},S:{1:"jB"}},B:5,C:"CSS3 3D Transforms"}},7511:e=>{e.exports={A:{A:{2:"O F H E lB",33:"A B"},B:{1:"KB P M R S YB U",33:"C N D I J K L"},C:{1:"NB FB W V VB QB RB SB TB UB KB P M OB R S",33:"0 1 2 3 4 5 6 7 8 9 eB bB G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB PB GB HB IB JB X LB MB kB sB"},D:{1:"8 9 AB BB CB DB EB PB GB HB IB JB X LB MB NB FB W V VB QB RB SB TB UB KB P M R S YB U vB wB cB",33:"0 1 2 3 4 5 6 7 G Y O F H E A B C N D I J K L Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{33:"G Y O F H E A B C N D dB WB fB gB hB iB XB T Q mB nB"},F:{1:"0 1 2 3 4 5 6 7 8 9 v w x y z AB BB CB EB GB HB IB JB X LB MB NB FB W V",2:"E B C oB pB qB rB T ZB tB Q",33:"I J K L Z a b c d e f g h i j k l m n o p q r s t u"},G:{33:"H D WB uB aB TC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC"},H:{2:"CC"},I:{1:"M",33:"bB G DC EC FC GC aB HC IC"},J:{33:"F A"},K:{1:"DB",2:"A B C T ZB Q"},L:{1:"U"},M:{1:"OB"},N:{33:"A B"},O:{2:"JC"},P:{1:"LC MC NC OC XB PC QC",33:"G KC"},Q:{1:"RC"},R:{2:"SC"},S:{33:"jB"}},B:5,C:"CSS user-select: none"}},9883:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));const i=/:blank([^\w-]|$)/gi;var o=n.plugin("css-blank-pseudo",e=>{const r=String(Object(e).replaceWith||"[blank]");const t=Boolean("preserve"in Object(e)?e.preserve:true);return e=>{e.walkRules(i,e=>{const n=e.selector.replace(i,(e,t)=>{return`${r}${t}`});const o=e.clone({selector:n});if(t){e.before(o)}else{e.replaceWith(o)}})}});e.exports=o},8410:e=>{"use strict";var r={};var t=r.hasOwnProperty;var n=function merge(e,r){if(!e){return r}var n={};for(var i in r){n[i]=t.call(e,i)?e[i]:r[i]}return n};var i=/[ -,\.\/;-@\[-\^`\{-~]/;var o=/[ -,\.\/;-@\[\]\^`\{-~]/;var s=/['"\\]/;var a=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var u=function cssesc(e,r){r=n(r,cssesc.options);if(r.quotes!="single"&&r.quotes!="double"){r.quotes="single"}var t=r.quotes=="double"?'"':"'";var s=r.isIdentifier;var u=e.charAt(0);var f="";var c=0;var l=e.length;while(c126){if(h>=55296&&h<=56319&&c{"use strict";r.__esModule=true;var n=t(653);var i=_interopRequireDefault(n);var o=t(6231);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=function parser(e){return new i.default(e)};Object.assign(a,s);delete a.__esModule;r.default=a;e.exports=r["default"]},8168:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parser);this.rule=e;this.options=Object.assign({lossy:false,safe:false},r);this.position=0;this.css=typeof this.rule==="string"?this.rule:this.rule.selector;this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var t=getTokenSourceSpan(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new p.default({source:t});this.root.errorGenerator=this._errorGenerator();var n=new B.default({source:{start:{line:1,column:1}}});this.root.append(n);this.current=n;this.loop()}Parser.prototype._errorGenerator=function _errorGenerator(){var e=this;return function(r,t){if(typeof e.rule==="string"){return new Error(r)}return e.rule.error(r,t)}};Parser.prototype.attribute=function attribute(){var e=[];var r=this.currToken;this.position++;while(this.position1&&arguments[1]!==undefined?arguments[1]:false;var n="";var i="";e.forEach(function(e){var o=r.lossySpace(e.spaces.before,t);var s=r.lossySpace(e.rawSpaceBefore,t);n+=o+r.lossySpace(e.spaces.after,t&&o.length===0);i+=o+e.value+r.lossySpace(e.rawSpaceAfter,t&&s.length===0)});if(i===n){i=undefined}var o={space:n,rawSpace:i};return o};Parser.prototype.isNamedCombinator=function isNamedCombinator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position;return this.tokens[e+0]&&this.tokens[e+0][N.FIELDS.TYPE]===q.slash&&this.tokens[e+1]&&this.tokens[e+1][N.FIELDS.TYPE]===q.word&&this.tokens[e+2]&&this.tokens[e+2][N.FIELDS.TYPE]===q.slash};Parser.prototype.namedCombinator=function namedCombinator(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]);var r=(0,U.unesc)(e).toLowerCase();var t={};if(r!==e){t.value="/"+e+"/"}var n=new F.default({value:"/"+r+"/",source:getSource(this.currToken[N.FIELDS.START_LINE],this.currToken[N.FIELDS.START_COL],this.tokens[this.position+2][N.FIELDS.END_LINE],this.tokens[this.position+2][N.FIELDS.END_COL]),sourceIndex:this.currToken[N.FIELDS.START_POS],raws:t});this.position=this.position+3;return n}else{this.unexpected()}};Parser.prototype.combinator=function combinator(){var e=this;if(this.content()==="|"){return this.namespace()}var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][N.FIELDS.TYPE]===q.comma){var t=this.parseWhitespaceEquivalentTokens(r);if(t.length>0){var n=this.current.last;if(n){var i=this.convertWhitespaceNodesToSpace(t),o=i.space,s=i.rawSpace;if(s!==undefined){n.rawSpaceAfter+=s}n.spaces.after+=o}else{t.forEach(function(r){return e.newNode(r)})}}return}var a=this.currToken;var u=undefined;if(r>this.position){u=this.parseWhitespaceEquivalentTokens(r)}var f=void 0;if(this.isNamedCombinator()){f=this.namedCombinator()}else if(this.currToken[N.FIELDS.TYPE]===q.combinator){f=new F.default({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[N.FIELDS.START_POS]});this.position++}else if(H[this.currToken[N.FIELDS.TYPE]]){}else if(!u){this.unexpected()}if(f){if(u){var c=this.convertWhitespaceNodesToSpace(u),l=c.space,p=c.rawSpace;f.spaces.before=l;f.rawSpaceBefore=p}}else{var h=this.convertWhitespaceNodesToSpace(u,true),B=h.space,v=h.rawSpace;if(!v){v=B}var d={};var b={spaces:{}};if(B.endsWith(" ")&&v.endsWith(" ")){d.before=B.slice(0,B.length-1);b.spaces.before=v.slice(0,v.length-1)}else if(B.startsWith(" ")&&v.startsWith(" ")){d.after=B.slice(1);b.spaces.after=v.slice(1)}else{b.value=v}f=new F.default({value:" ",source:getTokenSourceSpan(a,this.tokens[this.position-1]),sourceIndex:a[N.FIELDS.START_POS],spaces:d,raws:b})}if(this.currToken&&this.currToken[N.FIELDS.TYPE]===q.space){f.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(f)};Parser.prototype.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var e=new B.default({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(e);this.current=e;this.position++};Parser.prototype.comment=function comment(){var e=this.currToken;this.newNode(new y.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.error=function error(e,r){throw this.root.error(e,r)};Parser.prototype.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[N.FIELDS.START_POS]})};Parser.prototype.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[N.FIELDS.START_POS])};Parser.prototype.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[N.FIELDS.START_POS])};Parser.prototype.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[N.FIELDS.START_POS])};Parser.prototype.namespace=function namespace(){var e=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[N.FIELDS.TYPE]===q.word){this.position++;return this.word(e)}else if(this.nextToken[N.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(e)}};Parser.prototype.nesting=function nesting(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var r=this.currToken;this.newNode(new j.default({value:this.content(),source:getTokenSource(r),sourceIndex:r[N.FIELDS.START_POS]}));this.position++};Parser.prototype.parentheses=function parentheses(){var e=this.current.last;var r=1;this.position++;if(e&&e.type===J.PSEUDO){var t=new B.default({source:{start:tokenStart(this.tokens[this.position-1])}});var n=this.current;e.append(t);this.current=t;while(this.position1&&e.nextToken&&e.nextToken[N.FIELDS.TYPE]===q.openParenthesis){e.error("Misplaced parenthesis.",{index:e.nextToken[N.FIELDS.START_POS]})}})}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[N.FIELDS.START_POS])}};Parser.prototype.space=function space(){var e=this.content();if(this.position===0||this.prevToken[N.FIELDS.TYPE]===q.comma||this.prevToken[N.FIELDS.TYPE]===q.openParenthesis){this.spaces=this.optionalSpace(e);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[N.FIELDS.TYPE]===q.comma||this.nextToken[N.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(e);this.position++}else{this.combinator()}};Parser.prototype.string=function string(){var e=this.currToken;this.newNode(new O.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.universal=function universal(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}var t=this.currToken;this.newNode(new A.default({value:this.content(),source:getTokenSource(t),sourceIndex:t[N.FIELDS.START_POS]}),e);this.position++};Parser.prototype.splitWord=function splitWord(e,r){var t=this;var n=this.nextToken;var i=this.content();while(n&&~[q.dollar,q.caret,q.equals,q.word].indexOf(n[N.FIELDS.TYPE])){this.position++;var o=this.content();i+=o;if(o.lastIndexOf("\\")===o.length-1){var s=this.nextToken;if(s&&s[N.FIELDS.TYPE]===q.space){i+=this.requiredSpace(this.content(s));this.position++}}n=this.nextToken}var a=(0,u.default)(i,".").filter(function(e){return i[e-1]!=="\\"});var f=(0,u.default)(i,"#");var l=(0,u.default)(i,"#{");if(l.length){f=f.filter(function(e){return!~l.indexOf(e)})}var p=(0,M.default)((0,c.default)([0].concat(a,f)));p.forEach(function(n,o){var s=p[o+1]||i.length;var u=i.slice(n,s);if(o===0&&r){return r.call(t,u,p.length)}var c=void 0;var l=t.currToken;var h=l[N.FIELDS.START_POS]+p[o];var B=getSource(l[1],l[2]+n,l[3],l[2]+(s-1));if(~a.indexOf(n)){var v={value:u.slice(1),source:B,sourceIndex:h};c=new d.default(unescapeProp(v,"value"))}else if(~f.indexOf(n)){var b={value:u.slice(1),source:B,sourceIndex:h};c=new m.default(unescapeProp(b,"value"))}else{var y={value:u,source:B,sourceIndex:h};unescapeProp(y,"value");c=new w.default(y)}t.newNode(c,e);e=null});this.position++};Parser.prototype.word=function word(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}return this.splitWord(e)};Parser.prototype.loop=function loop(){while(this.position0&&arguments[0]!==undefined?arguments[0]:this.currToken;return this.css.slice(e[N.FIELDS.START_POS],e[N.FIELDS.END_POS])};Parser.prototype.locateNextMeaningfulToken=function locateNextMeaningfulToken(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position+1;var r=e;while(r{"use strict";r.__esModule=true;var n=t(8168);var i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=function(){function Processor(e,r){_classCallCheck(this,Processor);this.func=e||function noop(){};this.funcRes=null;this.options=r}Processor.prototype._shouldUpdateSelector=function _shouldUpdateSelector(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=Object.assign({},this.options,r);if(t.updateSelector===false){return false}else{return typeof e!=="string"}};Processor.prototype._isLossy=function _isLossy(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=Object.assign({},this.options,e);if(r.lossless===false){return true}else{return false}};Processor.prototype._root=function _root(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=new i.default(e,this._parseOptions(r));return t.root};Processor.prototype._parseOptions=function _parseOptions(e){return{lossy:this._isLossy(e)}};Processor.prototype._run=function _run(e){var r=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new Promise(function(n,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(n){var i=undefined;if(r._shouldUpdateSelector(e,t)){i=o.toString();e.selector=i}return{transform:n,root:o,string:i}}).then(n,i)}catch(e){i(e);return}})};Processor.prototype._runSync=function _runSync(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=this._root(e,r);var n=this.func(t);if(n&&typeof n.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var i=undefined;if(r.updateSelector&&typeof e!=="string"){i=t.toString();e.selector=i}return{transform:n,root:t,string:i}};Processor.prototype.ast=function ast(e,r){return this._run(e,r).then(function(e){return e.root})};Processor.prototype.astSync=function astSync(e,r){return this._runSync(e,r).root};Processor.prototype.transform=function transform(e,r){return this._run(e,r).then(function(e){return e.transform})};Processor.prototype.transformSync=function transformSync(e,r){return this._runSync(e,r).transform};Processor.prototype.process=function process(e,r){return this._run(e,r).then(function(e){return e.string||e.root.toString()})};Processor.prototype.processSync=function processSync(e,r){var t=this._runSync(e,r);return t.string||t.root.toString()};return Processor}();r.default=o;e.exports=r["default"]},48:(e,r,t)=>{"use strict";r.__esModule=true;var n;var i=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Attribute);var t=_possibleConstructorReturn(this,e.call(this,handleDeprecatedContructorOpts(r)));t.type=l.ATTRIBUTE;t.raws=t.raws||{};Object.defineProperty(t.raws,"unquoted",{get:h(function(){return t.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:h(function(){return t.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")});t._constructed=true;return t}Attribute.prototype.getQuotedValue=function getQuotedValue(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=this._determineQuoteMark(e);var t=g[r];var n=(0,s.default)(this._value,t);return n};Attribute.prototype._determineQuoteMark=function _determineQuoteMark(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)};Attribute.prototype.setValue=function setValue(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this._value=e;this._quoteMark=this._determineQuoteMark(r);this._syncRawValue()};Attribute.prototype.smartQuoteMark=function smartQuoteMark(e){var r=this.value;var t=r.replace(/[^']/g,"").length;var n=r.replace(/[^"]/g,"").length;if(t+n===0){var i=(0,s.default)(r,{isIdentifier:true});if(i===r){return Attribute.NO_QUOTE}else{var o=this.preferredQuoteMark(e);if(o===Attribute.NO_QUOTE){var a=this.quoteMark||e.quoteMark||Attribute.DOUBLE_QUOTE;var u=g[a];var f=(0,s.default)(r,u);if(f.length1&&arguments[1]!==undefined?arguments[1]:e;var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:defaultAttrConcat;var n=this._spacesFor(r);return t(this.stringifyProperty(e),n)};Attribute.prototype.offsetOf=function offsetOf(e){var r=1;var t=this._spacesFor("attribute");r+=t.before.length;if(e==="namespace"||e==="ns"){return this.namespace?r:-1}if(e==="attributeNS"){return r}r+=this.namespaceString.length;if(this.namespace){r+=1}if(e==="attribute"){return r}r+=this.stringifyProperty("attribute").length;r+=t.after.length;var n=this._spacesFor("operator");r+=n.before.length;var i=this.stringifyProperty("operator");if(e==="operator"){return i?r:-1}r+=i.length;r+=n.after.length;var o=this._spacesFor("value");r+=o.before.length;var s=this.stringifyProperty("value");if(e==="value"){return s?r:-1}r+=s.length;r+=o.after.length;var a=this._spacesFor("insensitive");r+=a.before.length;if(e==="insensitive"){return this.insensitive?r:-1}return-1};Attribute.prototype.toString=function toString(){var e=this;var r=[this.rawSpaceBefore,"["];r.push(this._stringFor("qualifiedAttribute","attribute"));if(this.operator&&this.value){r.push(this._stringFor("operator"));r.push(this._stringFor("value"));r.push(this._stringFor("insensitiveFlag","insensitive",function(r,t){if(r.length>0&&!e.quoted&&t.before.length===0&&!(e.spaces.value&&e.spaces.value.after)){t.before=" "}return defaultAttrConcat(r,t)}))}r.push("]");r.push(this.rawSpaceAfter);return r.join("")};i(Attribute,[{key:"quoted",get:function get(){var e=this.quoteMark;return e==="'"||e==='"'},set:function set(e){d()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(e){if(!this._constructed){this._quoteMark=e;return}if(this._quoteMark!==e){this._quoteMark=e;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(e){if(this._constructed){var r=unescapeValue(e),t=r.deprecatedUsage,n=r.unescaped,i=r.quoteMark;if(t){v()}if(n===this._value&&i===this._quoteMark){return}this._value=n;this._quoteMark=i;this._syncRawValue()}else{this._value=e}}},{key:"attribute",get:function get(){return this._attribute},set:function set(e){this._handleEscapes("attribute",e);this._attribute=e}}]);return Attribute}(c.default);y.NO_QUOTE=null;y.SINGLE_QUOTE="'";y.DOUBLE_QUOTE='"';r.default=y;var g=(n={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},n[null]={isIdentifier:true},n);function defaultAttrConcat(e,r){return""+r.before+e+r.after}},3570:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(3877);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Combinator,e);function Combinator(r){_classCallCheck(this,Combinator);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMBINATOR;return t}return Combinator}(i.default);r.default=s;e.exports=r["default"]},6941:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3877);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Comment,e);function Comment(r){_classCallCheck(this,Comment);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMMENT;return t}return Comment}(i.default);r.default=s;e.exports=r["default"]},9283:(e,r,t)=>{"use strict";r.__esModule=true;r.universal=r.tag=r.string=r.selector=r.root=r.pseudo=r.nesting=r.id=r.comment=r.combinator=r.className=r.attribute=undefined;var n=t(48);var i=_interopRequireDefault(n);var o=t(3570);var s=_interopRequireDefault(o);var a=t(1187);var u=_interopRequireDefault(a);var f=t(6941);var c=_interopRequireDefault(f);var l=t(9511);var p=_interopRequireDefault(l);var h=t(3529);var B=_interopRequireDefault(h);var v=t(6867);var d=_interopRequireDefault(v);var b=t(9073);var y=_interopRequireDefault(b);var g=t(4020);var m=_interopRequireDefault(g);var C=t(1848);var w=_interopRequireDefault(C);var S=t(7415);var O=_interopRequireDefault(S);var T=t(8013);var E=_interopRequireDefault(T);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var k=r.attribute=function attribute(e){return new i.default(e)};var P=r.className=function className(e){return new s.default(e)};var D=r.combinator=function combinator(e){return new u.default(e)};var A=r.comment=function comment(e){return new c.default(e)};var R=r.id=function id(e){return new p.default(e)};var F=r.nesting=function nesting(e){return new B.default(e)};var x=r.pseudo=function pseudo(e){return new d.default(e)};var j=r.root=function root(e){return new y.default(e)};var I=r.selector=function selector(e){return new m.default(e)};var M=r.string=function string(e){return new w.default(e)};var N=r.tag=function tag(e){return new O.default(e)};var _=r.universal=function universal(e){return new E.default(e)}},1559:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t=e){this.indexes[t]=r-1}}return this};Container.prototype.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};Container.prototype.empty=function empty(){return this.removeAll()};Container.prototype.insertAfter=function insertAfter(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t+1,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(t<=n){this.indexes[i]=n+1}}return this};Container.prototype.insertBefore=function insertBefore(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(n<=t){this.indexes[i]=n+1}}return this};Container.prototype._findChildAtPosition=function _findChildAtPosition(e,r){var t=undefined;this.each(function(n){if(n.atPosition){var i=n.atPosition(e,r);if(i){t=i;return false}}else if(n.isAtPosition(e,r)){t=n;return false}});return t};Container.prototype.atPosition=function atPosition(e,r){if(this.isAtPosition(e,r)){return this._findChildAtPosition(e,r)||this}else{return undefined}};Container.prototype._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};Container.prototype.each=function each(e){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var r=this.lastEach;this.indexes[r]=0;if(!this.length){return undefined}var t=void 0,n=void 0;while(this.indexes[r]{"use strict";r.__esModule=true;r.isUniversal=r.isTag=r.isString=r.isSelector=r.isRoot=r.isPseudo=r.isNesting=r.isIdentifier=r.isComment=r.isCombinator=r.isClassName=r.isAttribute=undefined;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i;r.isNode=isNode;r.isPseudoElement=isPseudoElement;r.isPseudoClass=isPseudoClass;r.isContainer=isContainer;r.isNamespace=isNamespace;var o=t(2261);var s=(i={},i[o.ATTRIBUTE]=true,i[o.CLASS]=true,i[o.COMBINATOR]=true,i[o.COMMENT]=true,i[o.ID]=true,i[o.NESTING]=true,i[o.PSEUDO]=true,i[o.ROOT]=true,i[o.SELECTOR]=true,i[o.STRING]=true,i[o.TAG]=true,i[o.UNIVERSAL]=true,i);function isNode(e){return(typeof e==="undefined"?"undefined":n(e))==="object"&&s[e.type]}function isNodeType(e,r){return isNode(r)&&r.type===e}var a=r.isAttribute=isNodeType.bind(null,o.ATTRIBUTE);var u=r.isClassName=isNodeType.bind(null,o.CLASS);var f=r.isCombinator=isNodeType.bind(null,o.COMBINATOR);var c=r.isComment=isNodeType.bind(null,o.COMMENT);var l=r.isIdentifier=isNodeType.bind(null,o.ID);var p=r.isNesting=isNodeType.bind(null,o.NESTING);var h=r.isPseudo=isNodeType.bind(null,o.PSEUDO);var B=r.isRoot=isNodeType.bind(null,o.ROOT);var v=r.isSelector=isNodeType.bind(null,o.SELECTOR);var d=r.isString=isNodeType.bind(null,o.STRING);var b=r.isTag=isNodeType.bind(null,o.TAG);var y=r.isUniversal=isNodeType.bind(null,o.UNIVERSAL);function isPseudoElement(e){return h(e)&&e.value&&(e.value.startsWith("::")||e.value===":before"||e.value===":after")}function isPseudoClass(e){return h(e)&&!isPseudoElement(e)}function isContainer(e){return!!(isNode(e)&&e.walk)}function isNamespace(e){return a(e)||b(e)}},9511:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3877);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(ID,e);function ID(r){_classCallCheck(this,ID);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.ID;return t}ID.prototype.toString=function toString(){return[this.rawSpaceBefore,String("#"+this.stringifyProperty("value")),this.rawSpaceAfter].join("")};return ID}(i.default);r.default=s;e.exports=r["default"]},6231:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(2261);Object.keys(n).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return n[e]}})});var i=t(9283);Object.keys(i).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return i[e]}})});var o=t(7472);Object.keys(o).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return o[e]}})})},5288:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(3877);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Nesting,e);function Nesting(r){_classCallCheck(this,Nesting);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.NESTING;t.value="&";return t}return Nesting}(i.default);r.default=s;e.exports=r["default"]},3877:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Node);Object.assign(this,e);this.spaces=this.spaces||{};this.spaces.before=this.spaces.before||"";this.spaces.after=this.spaces.after||""}Node.prototype.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};Node.prototype.replaceWith=function replaceWith(){if(this.parent){for(var e in arguments){this.parent.insertBefore(this,arguments[e])}this.remove()}return this};Node.prototype.next=function next(){return this.parent.at(this.parent.index(this)+1)};Node.prototype.prev=function prev(){return this.parent.at(this.parent.index(this)-1)};Node.prototype.clone=function clone(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=s(this);for(var t in e){r[t]=e[t]}return r};Node.prototype.appendToPropertyAndEscape=function appendToPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}var n=this[e];var i=this.raws[e];this[e]=n+r;if(i||t!==r){this.raws[e]=(i||n)+t}else{delete this.raws[e]}};Node.prototype.setPropertyAndEscape=function setPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}this[e]=r;this.raws[e]=t};Node.prototype.setPropertyWithoutEscape=function setPropertyWithoutEscape(e,r){this[e]=r;if(this.raws){delete this.raws[e]}};Node.prototype.isAtPosition=function isAtPosition(e,r){if(this.source&&this.source.start&&this.source.end){if(this.source.start.line>e){return false}if(this.source.end.liner){return false}if(this.source.end.line===e&&this.source.end.column{"use strict";r.__esModule=true;var n=t(1559);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Pseudo,e);function Pseudo(r){_classCallCheck(this,Pseudo);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.PSEUDO;return t}Pseudo.prototype.toString=function toString(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")};return Pseudo}(i.default);r.default=s;e.exports=r["default"]},9073:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(1559);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Selector,e);function Selector(r){_classCallCheck(this,Selector);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.SELECTOR;return t}return Selector}(i.default);r.default=s;e.exports=r["default"]},1848:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3877);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(String,e);function String(r){_classCallCheck(this,String);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.STRING;return t}return String}(i.default);r.default=s;e.exports=r["default"]},7415:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(5288);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Tag,e);function Tag(r){_classCallCheck(this,Tag);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.TAG;return t}return Tag}(i.default);r.default=s;e.exports=r["default"]},2261:(e,r)=>{"use strict";r.__esModule=true;var t=r.TAG="tag";var n=r.STRING="string";var i=r.SELECTOR="selector";var o=r.ROOT="root";var s=r.PSEUDO="pseudo";var a=r.NESTING="nesting";var u=r.ID="id";var f=r.COMMENT="comment";var c=r.COMBINATOR="combinator";var l=r.CLASS="class";var p=r.ATTRIBUTE="attribute";var h=r.UNIVERSAL="universal"},8013:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(5288);var i=_interopRequireDefault(n);var o=t(2261);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Universal,e);function Universal(r){_classCallCheck(this,Universal);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.UNIVERSAL;t.value="*";return t}return Universal}(i.default);r.default=s;e.exports=r["default"]},627:(e,r)=>{"use strict";r.__esModule=true;r.default=sortAscending;function sortAscending(e){return e.sort(function(e,r){return e-r})}e.exports=r["default"]},6417:(e,r)=>{"use strict";r.__esModule=true;var t=r.ampersand=38;var n=r.asterisk=42;var i=r.at=64;var o=r.comma=44;var s=r.colon=58;var a=r.semicolon=59;var u=r.openParenthesis=40;var f=r.closeParenthesis=41;var c=r.openSquare=91;var l=r.closeSquare=93;var p=r.dollar=36;var h=r.tilde=126;var B=r.caret=94;var v=r.plus=43;var d=r.equals=61;var b=r.pipe=124;var y=r.greaterThan=62;var g=r.space=32;var m=r.singleQuote=39;var C=r.doubleQuote=34;var w=r.slash=47;var S=r.bang=33;var O=r.backslash=92;var T=r.cr=13;var E=r.feed=12;var k=r.newline=10;var P=r.tab=9;var D=r.str=m;var A=r.comment=-1;var R=r.word=-2;var F=r.combinator=-3},2771:(e,r,t)=>{"use strict";r.__esModule=true;r.FIELDS=undefined;var n,i;r.default=tokenize;var o=t(6417);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}var a=(n={},n[s.tab]=true,n[s.newline]=true,n[s.cr]=true,n[s.feed]=true,n);var u=(i={},i[s.space]=true,i[s.tab]=true,i[s.newline]=true,i[s.cr]=true,i[s.feed]=true,i[s.ampersand]=true,i[s.asterisk]=true,i[s.bang]=true,i[s.comma]=true,i[s.colon]=true,i[s.semicolon]=true,i[s.openParenthesis]=true,i[s.closeParenthesis]=true,i[s.openSquare]=true,i[s.closeSquare]=true,i[s.singleQuote]=true,i[s.doubleQuote]=true,i[s.plus]=true,i[s.pipe]=true,i[s.tilde]=true,i[s.greaterThan]=true,i[s.equals]=true,i[s.dollar]=true,i[s.caret]=true,i[s.slash]=true,i);var f={};var c="0123456789abcdefABCDEF";for(var l=0;l0){g=a+d;m=y-b[d].length}else{g=a;m=o}w=s.comment;a=g;h=g;p=y-m}else if(c===s.slash){y=u;w=c;h=a;p=u-o;f=y+1}else{y=consumeWord(t,u);w=s.word;h=a;p=y-o}f=y+1;break}r.push([w,a,u-o,h,p,u,f]);if(m){o=m;m=null}u=f}return r}},6358:(e,r)=>{"use strict";r.__esModule=true;r.default=ensureObject;function ensureObject(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){e[i]={}}e=e[i]}}e.exports=r["default"]},2194:(e,r)=>{"use strict";r.__esModule=true;r.default=getProp;function getProp(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){return undefined}e=e[i]}return e}e.exports=r["default"]},1044:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(2322);Object.defineProperty(r,"unesc",{enumerable:true,get:function get(){return _interopRequireDefault(n).default}});var i=t(2194);Object.defineProperty(r,"getProp",{enumerable:true,get:function get(){return _interopRequireDefault(i).default}});var o=t(6358);Object.defineProperty(r,"ensureObject",{enumerable:true,get:function get(){return _interopRequireDefault(o).default}});var s=t(7706);Object.defineProperty(r,"stripComments",{enumerable:true,get:function get(){return _interopRequireDefault(s).default}});function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},7706:(e,r)=>{"use strict";r.__esModule=true;r.default=stripComments;function stripComments(e){var r="";var t=e.indexOf("/*");var n=0;while(t>=0){r=r+e.slice(n,t);var i=e.indexOf("*/",t+2);if(i<0){return r}n=i+2;t=e.indexOf("/*",n)}r=r+e.slice(n);return r}e.exports=r["default"]},2322:(e,r)=>{"use strict";r.__esModule=true;r.default=unesc;var t=/\\(?:([0-9a-fA-F]{6})|([0-9a-fA-F]{1,5})(?: |(?![0-9a-fA-F])))/g;var n=/\\(.)/g;function unesc(e){e=e.replace(t,function(e,r,t){var n=r||t;var i=parseInt(n,16);return String.fromCharCode(i)});e=e.replace(n,function(e,r){return r});return e}e.exports=r["default"]},9555:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(7712));var i=_interopDefault(t(4633));const o=/:has/;var s=i.plugin("css-has-pseudo",e=>{const r=Boolean("preserve"in Object(e)?e.preserve:true);return e=>{e.walkRules(o,e=>{const t=n(e=>{e.walkPseudos(e=>{if(e.value===":has"&&e.nodes){const r=checkIfParentIsNot(e);e.value=r?":not-has":":has";const t=n.attribute({attribute:encodeURIComponent(String(e)).replace(/%3A/g,":").replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/%2C/g,",").replace(/[():%\[\],]/g,"\\$&")});if(r){e.parent.parent.replaceWith(t)}else{e.replaceWith(t)}}})}).processSync(e.selector);const i=e.clone({selector:t});if(r){e.before(i)}else{e.replaceWith(i)}})}});function checkIfParentIsNot(e){return Object(Object(e.parent).parent).type==="pseudo"&&e.parent.parent.value===":not"}e.exports=s},2207:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));const i=/^media$/i;const o=/\(\s*prefers-color-scheme\s*:\s*(dark|light|no-preference)\s*\)/i;const s={dark:48,light:70,"no-preference":22};const a=(e,r)=>`(color-index: ${s[r.toLowerCase()]})`;var u=n.plugin("postcss-prefers-color-scheme",e=>{const r="preserve"in Object(e)?e.preserve:true;return e=>{e.walkAtRules(i,e=>{const t=e.params;const n=t.replace(o,a);if(t!==n){if(r){e.cloneBefore({params:n})}else{e.params=n}}})}});e.exports=u},5202:e=>{e.exports=function flatten(e,r){r=typeof r=="number"?r:Infinity;if(!r){if(Array.isArray(e)){return e.map(function(e){return e})}return e}return _flatten(e,1);function _flatten(e,t){return e.reduce(function(e,n){if(Array.isArray(n)&&t{"use strict";e.exports=((e,r)=>{r=r||process.argv;const t=e.startsWith("-")?"":e.length===1?"-":"--";const n=r.indexOf(t+e);const i=r.indexOf("--");return n!==-1&&(i===-1?true:n{e.exports=function(e,r){var t=-1,n=[];while((t=e.indexOf(r,t+1))!==-1)n.push(t);return n}},7478:e=>{var r=/<%=([\s\S]+?)%>/g;e.exports=r},8589:(e,r,t)=>{e=t.nmd(e);var n=t(7478),i=t(1623);var o=800,s=16;var a=1/0,u=9007199254740991;var f="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",p="[object Boolean]",h="[object Date]",B="[object DOMException]",v="[object Error]",d="[object Function]",b="[object GeneratorFunction]",y="[object Map]",g="[object Number]",m="[object Null]",C="[object Object]",w="[object Proxy]",S="[object RegExp]",O="[object Set]",T="[object String]",E="[object Symbol]",k="[object Undefined]",P="[object WeakMap]";var D="[object ArrayBuffer]",A="[object DataView]",R="[object Float32Array]",F="[object Float64Array]",x="[object Int8Array]",j="[object Int16Array]",I="[object Int32Array]",M="[object Uint8Array]",N="[object Uint8ClampedArray]",_="[object Uint16Array]",L="[object Uint32Array]";var q=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,J=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var U=/[\\^$.*+?()[\]{}|]/g;var H=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var Q=/^\[object .+?Constructor\]$/;var K=/^(?:0|[1-9]\d*)$/;var W=/($^)/;var Y=/['\n\r\u2028\u2029\\]/g;var z={};z[R]=z[F]=z[x]=z[j]=z[I]=z[M]=z[N]=z[_]=z[L]=true;z[f]=z[c]=z[D]=z[p]=z[A]=z[h]=z[v]=z[d]=z[y]=z[g]=z[C]=z[S]=z[O]=z[T]=z[P]=false;var $={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var X=typeof global=="object"&&global&&global.Object===Object&&global;var Z=typeof self=="object"&&self&&self.Object===Object&&self;var V=X||Z||Function("return this")();var ee=true&&r&&!r.nodeType&&r;var re=ee&&"object"=="object"&&e&&!e.nodeType&&e;var te=re&&re.exports===ee;var ne=te&&X.process;var ie=function(){try{var e=re&&re.require&&re.require("util").types;if(e){return e}return ne&&ne.binding&&ne.binding("util")}catch(e){}}();var oe=ie&&ie.isTypedArray;function apply(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function arrayMap(e,r){var t=-1,n=e==null?0:e.length,i=Array(n);while(++t1?t[i-1]:undefined,s=i>2?t[2]:undefined;o=e.length>3&&typeof o=="function"?(i--,o):undefined;if(s&&isIterateeCall(t[0],t[1],s)){o=i<3?undefined:o;i=1}r=Object(r);while(++n-1&&e%1==0&&e0){if(++r>=o){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}function toSource(e){if(e!=null){try{return fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eq(e,r){return e===r||e!==e&&r!==r}var De=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&ce.call(e,"callee")&&!ye.call(e,"callee")};var Ae=Array.isArray;function isArrayLike(e){return e!=null&&isLength(e.length)&&!isFunction(e)}var Re=Ce||stubFalse;function isError(e){if(!isObjectLike(e)){return false}var r=baseGetTag(e);return r==v||r==B||typeof e.message=="string"&&typeof e.name=="string"&&!isPlainObject(e)}function isFunction(e){if(!isObject(e)){return false}var r=baseGetTag(e);return r==d||r==b||r==l||r==w}function isLength(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=u}function isObject(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function isObjectLike(e){return e!=null&&typeof e=="object"}function isPlainObject(e){if(!isObjectLike(e)||baseGetTag(e)!=C){return false}var r=be(e);if(r===null){return true}var t=ce.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&fe.call(t)==he}function isSymbol(e){return typeof e=="symbol"||isObjectLike(e)&&baseGetTag(e)==E}var Fe=oe?baseUnary(oe):baseIsTypedArray;function toString(e){return e==null?"":baseToString(e)}var xe=createAssigner(function(e,r,t,n){copyObject(r,keysIn(r),e,n)});function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}function keysIn(e){return isArrayLike(e)?arrayLikeKeys(e,true):baseKeysIn(e)}function template(e,r,t){var o=i.imports._.templateSettings||i;if(t&&isIterateeCall(e,r,t)){r=undefined}e=toString(e);r=xe({},r,o,customDefaultsAssignIn);var s=xe({},r.imports,o.imports,customDefaultsAssignIn),a=keys(s),u=baseValues(s,a);var f,c,l=0,p=r.interpolate||W,h="__p += '";var B=RegExp((r.escape||W).source+"|"+p.source+"|"+(p===n?H:W).source+"|"+(r.evaluate||W).source+"|$","g");var v=ce.call(r,"sourceURL")?"//# sourceURL="+(r.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";e.replace(B,function(r,t,n,i,o,s){n||(n=i);h+=e.slice(l,s).replace(Y,escapeStringChar);if(t){f=true;h+="' +\n__e("+t+") +\n'"}if(o){c=true;h+="';\n"+o+";\n__p += '"}if(n){h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}l=s+r.length;return r});h+="';\n";var d=ce.call(r,"variable")&&r.variable;if(!d){h="with (obj) {\n"+h+"\n}\n"}h=(c?h.replace(q,""):h).replace(G,"$1").replace(J,"$1;");h="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(f?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var b=je(function(){return Function(a,v+"return "+h).apply(undefined,u)});b.source=h;if(isError(b)){throw b}return b}var je=baseRest(function(e,r){try{return apply(e,undefined,r)}catch(e){return isError(e)?e:new Error(e)}});function constant(e){return function(){return e}}function identity(e){return e}function stubFalse(){return false}e.exports=template},1623:(e,r,t)=>{var n=t(7478);var i=1/0;var o="[object Null]",s="[object Symbol]",a="[object Undefined]";var u=/[&<>"']/g,f=RegExp(u.source);var c=/<%-([\s\S]+?)%>/g,l=/<%([\s\S]+?)%>/g;var p={"&":"&","<":"<",">":">",'"':""","'":"'"};var h=typeof global=="object"&&global&&global.Object===Object&&global;var B=typeof self=="object"&&self&&self.Object===Object&&self;var v=h||B||Function("return this")();function arrayMap(e,r){var t=-1,n=e==null?0:e.length,i=Array(n);while(++t{"use strict";e.exports={wrap:wrapRange,limit:limitRange,validate:validateRange,test:testRange,curry:curry,name:name};function wrapRange(e,r,t){var n=r-e;return((t-e)%n+n)%n+e}function limitRange(e,r,t){return Math.max(e,Math.min(r,t))}function validateRange(e,r,t,n,i){if(!testRange(e,r,t,n,i)){throw new Error(t+" is outside of range ["+e+","+r+")")}return t}function testRange(e,r,t,n,i){return!(tr||i&&t===r||n&&t===e)}function name(e,r,t,n){return(t?"(":"[")+e+","+r+(n?")":"]")}function curry(e,r,t,n){var i=name.bind(null,e,r,t,n);return{wrap:wrapRange.bind(null,e,r),limit:limitRange.bind(null,e,r),validate:function(i){return validateRange(e,r,i,t,n)},test:function(i){return testRange(e,r,i,t,n)},toString:i,name:i}}},9108:e=>{"use strict";var r=Math.abs;var t=Math.round;function almostEq(e,t){return r(e-t)<=9.5367432e-7}function GCD(e,r){if(almostEq(r,0))return e;return GCD(r,e%r)}function findPrecision(e){var r=1;while(!almostEq(t(e*r)/r,e)){r*=10}return r}function num2fraction(e){if(e===0||e==="0")return"0";if(typeof e==="string"){e=parseFloat(e)}var n=findPrecision(e);var i=e*n;var o=r(GCD(i,n));var s=i/o;var a=n/o;return t(s)+"/"+t(a)}e.exports=num2fraction},2347:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var n=t(4633);var i=_interopRequireDefault(n);var o=t(3507);var s=_interopRequireDefault(o);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function nodeIsInsensitiveAttribute(e){return e.type==="attribute"&&e.insensitive}function selectorHasInsensitiveAttribute(e){return e.some(nodeIsInsensitiveAttribute)}function transformString(e,r,t){var n=t.charAt(r);if(n===""){return e}var i=e.map(function(e){return e+n});var o=n.toLocaleUpperCase();if(o!==n){i=i.concat(e.map(function(e){return e+o}))}return transformString(i,r+1,t)}function createSensitiveAtributes(e){var r=transformString([""],0,e.value);return r.map(function(r){var t=e.clone({spaces:{after:e.spaces.after,before:e.spaces.before},insensitive:false});t.setValue(r);return t})}function createNewSelectors(e){var r=[s.default.selector()];e.walk(function(e){if(!nodeIsInsensitiveAttribute(e)){r.forEach(function(r){r.append(e.clone())});return}var t=createSensitiveAtributes(e);var n=[];t.forEach(function(e){r.forEach(function(r){var t=r.clone();t.append(e);n.push(t)})});r=n});return r}function transform(e){var r=[];e.each(function(e){if(selectorHasInsensitiveAttribute(e)){r=r.concat(createNewSelectors(e));e.remove()}});if(r.length){r.forEach(function(r){return e.append(r)})}}var a=/i(\s*\/\*[\W\w]*?\*\/)*\s*\]/;r.default=i.default.plugin("postcss-attribute-case-insensitive",function(){return function(e){e.walkRules(a,function(e){e.selector=(0,s.default)(transform).processSync(e.selector)})}});e.exports=r.default},6608:e=>{"use strict";var r={};var t=r.hasOwnProperty;var n=function merge(e,r){if(!e){return r}var n={};for(var i in r){n[i]=t.call(e,i)?e[i]:r[i]}return n};var i=/[ -,\.\/;-@\[-\^`\{-~]/;var o=/[ -,\.\/;-@\[\]\^`\{-~]/;var s=/['"\\]/;var a=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var u=function cssesc(e,r){r=n(r,cssesc.options);if(r.quotes!="single"&&r.quotes!="double"){r.quotes="single"}var t=r.quotes=="double"?'"':"'";var s=r.isIdentifier;var u=e.charAt(0);var f="";var c=0;var l=e.length;while(c126){if(h>=55296&&h<=56319&&c{"use strict";r.__esModule=true;var n=t(5160);var i=_interopRequireDefault(n);var o=t(3966);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=function parser(e){return new i.default(e)};Object.assign(a,s);delete a.__esModule;r.default=a;e.exports=r["default"]},3373:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parser);this.rule=e;this.options=Object.assign({lossy:false,safe:false},r);this.position=0;this.css=typeof this.rule==="string"?this.rule:this.rule.selector;this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var t=getTokenSourceSpan(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new p.default({source:t});this.root.errorGenerator=this._errorGenerator();var n=new B.default({source:{start:{line:1,column:1}}});this.root.append(n);this.current=n;this.loop()}Parser.prototype._errorGenerator=function _errorGenerator(){var e=this;return function(r,t){if(typeof e.rule==="string"){return new Error(r)}return e.rule.error(r,t)}};Parser.prototype.attribute=function attribute(){var e=[];var r=this.currToken;this.position++;while(this.position1&&arguments[1]!==undefined?arguments[1]:false;var n="";var i="";e.forEach(function(e){var o=r.lossySpace(e.spaces.before,t);var s=r.lossySpace(e.rawSpaceBefore,t);n+=o+r.lossySpace(e.spaces.after,t&&o.length===0);i+=o+e.value+r.lossySpace(e.rawSpaceAfter,t&&s.length===0)});if(i===n){i=undefined}var o={space:n,rawSpace:i};return o};Parser.prototype.isNamedCombinator=function isNamedCombinator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position;return this.tokens[e+0]&&this.tokens[e+0][N.FIELDS.TYPE]===q.slash&&this.tokens[e+1]&&this.tokens[e+1][N.FIELDS.TYPE]===q.word&&this.tokens[e+2]&&this.tokens[e+2][N.FIELDS.TYPE]===q.slash};Parser.prototype.namedCombinator=function namedCombinator(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]);var r=(0,U.unesc)(e).toLowerCase();var t={};if(r!==e){t.value="/"+e+"/"}var n=new F.default({value:"/"+r+"/",source:getSource(this.currToken[N.FIELDS.START_LINE],this.currToken[N.FIELDS.START_COL],this.tokens[this.position+2][N.FIELDS.END_LINE],this.tokens[this.position+2][N.FIELDS.END_COL]),sourceIndex:this.currToken[N.FIELDS.START_POS],raws:t});this.position=this.position+3;return n}else{this.unexpected()}};Parser.prototype.combinator=function combinator(){var e=this;if(this.content()==="|"){return this.namespace()}var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][N.FIELDS.TYPE]===q.comma){var t=this.parseWhitespaceEquivalentTokens(r);if(t.length>0){var n=this.current.last;if(n){var i=this.convertWhitespaceNodesToSpace(t),o=i.space,s=i.rawSpace;if(s!==undefined){n.rawSpaceAfter+=s}n.spaces.after+=o}else{t.forEach(function(r){return e.newNode(r)})}}return}var a=this.currToken;var u=undefined;if(r>this.position){u=this.parseWhitespaceEquivalentTokens(r)}var f=void 0;if(this.isNamedCombinator()){f=this.namedCombinator()}else if(this.currToken[N.FIELDS.TYPE]===q.combinator){f=new F.default({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[N.FIELDS.START_POS]});this.position++}else if(H[this.currToken[N.FIELDS.TYPE]]){}else if(!u){this.unexpected()}if(f){if(u){var c=this.convertWhitespaceNodesToSpace(u),l=c.space,p=c.rawSpace;f.spaces.before=l;f.rawSpaceBefore=p}}else{var h=this.convertWhitespaceNodesToSpace(u,true),B=h.space,v=h.rawSpace;if(!v){v=B}var d={};var b={spaces:{}};if(B.endsWith(" ")&&v.endsWith(" ")){d.before=B.slice(0,B.length-1);b.spaces.before=v.slice(0,v.length-1)}else if(B.startsWith(" ")&&v.startsWith(" ")){d.after=B.slice(1);b.spaces.after=v.slice(1)}else{b.value=v}f=new F.default({value:" ",source:getTokenSourceSpan(a,this.tokens[this.position-1]),sourceIndex:a[N.FIELDS.START_POS],spaces:d,raws:b})}if(this.currToken&&this.currToken[N.FIELDS.TYPE]===q.space){f.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(f)};Parser.prototype.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var e=new B.default({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(e);this.current=e;this.position++};Parser.prototype.comment=function comment(){var e=this.currToken;this.newNode(new y.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.error=function error(e,r){throw this.root.error(e,r)};Parser.prototype.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[N.FIELDS.START_POS]})};Parser.prototype.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[N.FIELDS.START_POS])};Parser.prototype.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[N.FIELDS.START_POS])};Parser.prototype.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[N.FIELDS.START_POS])};Parser.prototype.namespace=function namespace(){var e=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[N.FIELDS.TYPE]===q.word){this.position++;return this.word(e)}else if(this.nextToken[N.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(e)}};Parser.prototype.nesting=function nesting(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var r=this.currToken;this.newNode(new j.default({value:this.content(),source:getTokenSource(r),sourceIndex:r[N.FIELDS.START_POS]}));this.position++};Parser.prototype.parentheses=function parentheses(){var e=this.current.last;var r=1;this.position++;if(e&&e.type===J.PSEUDO){var t=new B.default({source:{start:tokenStart(this.tokens[this.position-1])}});var n=this.current;e.append(t);this.current=t;while(this.position1&&e.nextToken&&e.nextToken[N.FIELDS.TYPE]===q.openParenthesis){e.error("Misplaced parenthesis.",{index:e.nextToken[N.FIELDS.START_POS]})}})}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[N.FIELDS.START_POS])}};Parser.prototype.space=function space(){var e=this.content();if(this.position===0||this.prevToken[N.FIELDS.TYPE]===q.comma||this.prevToken[N.FIELDS.TYPE]===q.openParenthesis){this.spaces=this.optionalSpace(e);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[N.FIELDS.TYPE]===q.comma||this.nextToken[N.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(e);this.position++}else{this.combinator()}};Parser.prototype.string=function string(){var e=this.currToken;this.newNode(new O.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.universal=function universal(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}var t=this.currToken;this.newNode(new A.default({value:this.content(),source:getTokenSource(t),sourceIndex:t[N.FIELDS.START_POS]}),e);this.position++};Parser.prototype.splitWord=function splitWord(e,r){var t=this;var n=this.nextToken;var i=this.content();while(n&&~[q.dollar,q.caret,q.equals,q.word].indexOf(n[N.FIELDS.TYPE])){this.position++;var o=this.content();i+=o;if(o.lastIndexOf("\\")===o.length-1){var s=this.nextToken;if(s&&s[N.FIELDS.TYPE]===q.space){i+=this.requiredSpace(this.content(s));this.position++}}n=this.nextToken}var a=(0,u.default)(i,".").filter(function(e){return i[e-1]!=="\\"});var f=(0,u.default)(i,"#");var l=(0,u.default)(i,"#{");if(l.length){f=f.filter(function(e){return!~l.indexOf(e)})}var p=(0,M.default)((0,c.default)([0].concat(a,f)));p.forEach(function(n,o){var s=p[o+1]||i.length;var u=i.slice(n,s);if(o===0&&r){return r.call(t,u,p.length)}var c=void 0;var l=t.currToken;var h=l[N.FIELDS.START_POS]+p[o];var B=getSource(l[1],l[2]+n,l[3],l[2]+(s-1));if(~a.indexOf(n)){var v={value:u.slice(1),source:B,sourceIndex:h};c=new d.default(unescapeProp(v,"value"))}else if(~f.indexOf(n)){var b={value:u.slice(1),source:B,sourceIndex:h};c=new m.default(unescapeProp(b,"value"))}else{var y={value:u,source:B,sourceIndex:h};unescapeProp(y,"value");c=new w.default(y)}t.newNode(c,e);e=null});this.position++};Parser.prototype.word=function word(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}return this.splitWord(e)};Parser.prototype.loop=function loop(){while(this.position0&&arguments[0]!==undefined?arguments[0]:this.currToken;return this.css.slice(e[N.FIELDS.START_POS],e[N.FIELDS.END_POS])};Parser.prototype.locateNextMeaningfulToken=function locateNextMeaningfulToken(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position+1;var r=e;while(r{"use strict";r.__esModule=true;var n=t(3373);var i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=function(){function Processor(e,r){_classCallCheck(this,Processor);this.func=e||function noop(){};this.funcRes=null;this.options=r}Processor.prototype._shouldUpdateSelector=function _shouldUpdateSelector(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=Object.assign({},this.options,r);if(t.updateSelector===false){return false}else{return typeof e!=="string"}};Processor.prototype._isLossy=function _isLossy(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=Object.assign({},this.options,e);if(r.lossless===false){return true}else{return false}};Processor.prototype._root=function _root(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=new i.default(e,this._parseOptions(r));return t.root};Processor.prototype._parseOptions=function _parseOptions(e){return{lossy:this._isLossy(e)}};Processor.prototype._run=function _run(e){var r=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new Promise(function(n,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(n){var i=undefined;if(r._shouldUpdateSelector(e,t)){i=o.toString();e.selector=i}return{transform:n,root:o,string:i}}).then(n,i)}catch(e){i(e);return}})};Processor.prototype._runSync=function _runSync(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=this._root(e,r);var n=this.func(t);if(n&&typeof n.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var i=undefined;if(r.updateSelector&&typeof e!=="string"){i=t.toString();e.selector=i}return{transform:n,root:t,string:i}};Processor.prototype.ast=function ast(e,r){return this._run(e,r).then(function(e){return e.root})};Processor.prototype.astSync=function astSync(e,r){return this._runSync(e,r).root};Processor.prototype.transform=function transform(e,r){return this._run(e,r).then(function(e){return e.transform})};Processor.prototype.transformSync=function transformSync(e,r){return this._runSync(e,r).transform};Processor.prototype.process=function process(e,r){return this._run(e,r).then(function(e){return e.string||e.root.toString()})};Processor.prototype.processSync=function processSync(e,r){var t=this._runSync(e,r);return t.string||t.root.toString()};return Processor}();r.default=o;e.exports=r["default"]},8448:(e,r,t)=>{"use strict";r.__esModule=true;var n;var i=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Attribute);var t=_possibleConstructorReturn(this,e.call(this,handleDeprecatedContructorOpts(r)));t.type=l.ATTRIBUTE;t.raws=t.raws||{};Object.defineProperty(t.raws,"unquoted",{get:h(function(){return t.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:h(function(){return t.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")});t._constructed=true;return t}Attribute.prototype.getQuotedValue=function getQuotedValue(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=this._determineQuoteMark(e);var t=g[r];var n=(0,s.default)(this._value,t);return n};Attribute.prototype._determineQuoteMark=function _determineQuoteMark(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)};Attribute.prototype.setValue=function setValue(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this._value=e;this._quoteMark=this._determineQuoteMark(r);this._syncRawValue()};Attribute.prototype.smartQuoteMark=function smartQuoteMark(e){var r=this.value;var t=r.replace(/[^']/g,"").length;var n=r.replace(/[^"]/g,"").length;if(t+n===0){var i=(0,s.default)(r,{isIdentifier:true});if(i===r){return Attribute.NO_QUOTE}else{var o=this.preferredQuoteMark(e);if(o===Attribute.NO_QUOTE){var a=this.quoteMark||e.quoteMark||Attribute.DOUBLE_QUOTE;var u=g[a];var f=(0,s.default)(r,u);if(f.length1&&arguments[1]!==undefined?arguments[1]:e;var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:defaultAttrConcat;var n=this._spacesFor(r);return t(this.stringifyProperty(e),n)};Attribute.prototype.offsetOf=function offsetOf(e){var r=1;var t=this._spacesFor("attribute");r+=t.before.length;if(e==="namespace"||e==="ns"){return this.namespace?r:-1}if(e==="attributeNS"){return r}r+=this.namespaceString.length;if(this.namespace){r+=1}if(e==="attribute"){return r}r+=this.stringifyProperty("attribute").length;r+=t.after.length;var n=this._spacesFor("operator");r+=n.before.length;var i=this.stringifyProperty("operator");if(e==="operator"){return i?r:-1}r+=i.length;r+=n.after.length;var o=this._spacesFor("value");r+=o.before.length;var s=this.stringifyProperty("value");if(e==="value"){return s?r:-1}r+=s.length;r+=o.after.length;var a=this._spacesFor("insensitive");r+=a.before.length;if(e==="insensitive"){return this.insensitive?r:-1}return-1};Attribute.prototype.toString=function toString(){var e=this;var r=[this.rawSpaceBefore,"["];r.push(this._stringFor("qualifiedAttribute","attribute"));if(this.operator&&this.value){r.push(this._stringFor("operator"));r.push(this._stringFor("value"));r.push(this._stringFor("insensitiveFlag","insensitive",function(r,t){if(r.length>0&&!e.quoted&&t.before.length===0&&!(e.spaces.value&&e.spaces.value.after)){t.before=" "}return defaultAttrConcat(r,t)}))}r.push("]");r.push(this.rawSpaceAfter);return r.join("")};i(Attribute,[{key:"quoted",get:function get(){var e=this.quoteMark;return e==="'"||e==='"'},set:function set(e){d()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(e){if(!this._constructed){this._quoteMark=e;return}if(this._quoteMark!==e){this._quoteMark=e;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(e){if(this._constructed){var r=unescapeValue(e),t=r.deprecatedUsage,n=r.unescaped,i=r.quoteMark;if(t){v()}if(n===this._value&&i===this._quoteMark){return}this._value=n;this._quoteMark=i;this._syncRawValue()}else{this._value=e}}},{key:"attribute",get:function get(){return this._attribute},set:function set(e){this._handleEscapes("attribute",e);this._attribute=e}}]);return Attribute}(c.default);y.NO_QUOTE=null;y.SINGLE_QUOTE="'";y.DOUBLE_QUOTE='"';r.default=y;var g=(n={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},n[null]={isIdentifier:true},n);function defaultAttrConcat(e,r){return""+r.before+e+r.after}},3556:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(3366);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Combinator,e);function Combinator(r){_classCallCheck(this,Combinator);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMBINATOR;return t}return Combinator}(i.default);r.default=s;e.exports=r["default"]},3522:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3366);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Comment,e);function Comment(r){_classCallCheck(this,Comment);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMMENT;return t}return Comment}(i.default);r.default=s;e.exports=r["default"]},6001:(e,r,t)=>{"use strict";r.__esModule=true;r.universal=r.tag=r.string=r.selector=r.root=r.pseudo=r.nesting=r.id=r.comment=r.combinator=r.className=r.attribute=undefined;var n=t(8448);var i=_interopRequireDefault(n);var o=t(3556);var s=_interopRequireDefault(o);var a=t(4310);var u=_interopRequireDefault(a);var f=t(3522);var c=_interopRequireDefault(f);var l=t(6545);var p=_interopRequireDefault(l);var h=t(2704);var B=_interopRequireDefault(h);var v=t(9173);var d=_interopRequireDefault(v);var b=t(7792);var y=_interopRequireDefault(b);var g=t(5396);var m=_interopRequireDefault(g);var C=t(6776);var w=_interopRequireDefault(C);var S=t(2066);var O=_interopRequireDefault(S);var T=t(707);var E=_interopRequireDefault(T);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var k=r.attribute=function attribute(e){return new i.default(e)};var P=r.className=function className(e){return new s.default(e)};var D=r.combinator=function combinator(e){return new u.default(e)};var A=r.comment=function comment(e){return new c.default(e)};var R=r.id=function id(e){return new p.default(e)};var F=r.nesting=function nesting(e){return new B.default(e)};var x=r.pseudo=function pseudo(e){return new d.default(e)};var j=r.root=function root(e){return new y.default(e)};var I=r.selector=function selector(e){return new m.default(e)};var M=r.string=function string(e){return new w.default(e)};var N=r.tag=function tag(e){return new O.default(e)};var _=r.universal=function universal(e){return new E.default(e)}},7507:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t=e){this.indexes[t]=r-1}}return this};Container.prototype.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};Container.prototype.empty=function empty(){return this.removeAll()};Container.prototype.insertAfter=function insertAfter(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t+1,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(t<=n){this.indexes[i]=n+1}}return this};Container.prototype.insertBefore=function insertBefore(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(n<=t){this.indexes[i]=n+1}}return this};Container.prototype._findChildAtPosition=function _findChildAtPosition(e,r){var t=undefined;this.each(function(n){if(n.atPosition){var i=n.atPosition(e,r);if(i){t=i;return false}}else if(n.isAtPosition(e,r)){t=n;return false}});return t};Container.prototype.atPosition=function atPosition(e,r){if(this.isAtPosition(e,r)){return this._findChildAtPosition(e,r)||this}else{return undefined}};Container.prototype._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};Container.prototype.each=function each(e){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var r=this.lastEach;this.indexes[r]=0;if(!this.length){return undefined}var t=void 0,n=void 0;while(this.indexes[r]{"use strict";r.__esModule=true;r.isUniversal=r.isTag=r.isString=r.isSelector=r.isRoot=r.isPseudo=r.isNesting=r.isIdentifier=r.isComment=r.isCombinator=r.isClassName=r.isAttribute=undefined;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i;r.isNode=isNode;r.isPseudoElement=isPseudoElement;r.isPseudoClass=isPseudoClass;r.isContainer=isContainer;r.isNamespace=isNamespace;var o=t(4436);var s=(i={},i[o.ATTRIBUTE]=true,i[o.CLASS]=true,i[o.COMBINATOR]=true,i[o.COMMENT]=true,i[o.ID]=true,i[o.NESTING]=true,i[o.PSEUDO]=true,i[o.ROOT]=true,i[o.SELECTOR]=true,i[o.STRING]=true,i[o.TAG]=true,i[o.UNIVERSAL]=true,i);function isNode(e){return(typeof e==="undefined"?"undefined":n(e))==="object"&&s[e.type]}function isNodeType(e,r){return isNode(r)&&r.type===e}var a=r.isAttribute=isNodeType.bind(null,o.ATTRIBUTE);var u=r.isClassName=isNodeType.bind(null,o.CLASS);var f=r.isCombinator=isNodeType.bind(null,o.COMBINATOR);var c=r.isComment=isNodeType.bind(null,o.COMMENT);var l=r.isIdentifier=isNodeType.bind(null,o.ID);var p=r.isNesting=isNodeType.bind(null,o.NESTING);var h=r.isPseudo=isNodeType.bind(null,o.PSEUDO);var B=r.isRoot=isNodeType.bind(null,o.ROOT);var v=r.isSelector=isNodeType.bind(null,o.SELECTOR);var d=r.isString=isNodeType.bind(null,o.STRING);var b=r.isTag=isNodeType.bind(null,o.TAG);var y=r.isUniversal=isNodeType.bind(null,o.UNIVERSAL);function isPseudoElement(e){return h(e)&&e.value&&(e.value.startsWith("::")||e.value===":before"||e.value===":after")}function isPseudoClass(e){return h(e)&&!isPseudoElement(e)}function isContainer(e){return!!(isNode(e)&&e.walk)}function isNamespace(e){return a(e)||b(e)}},6545:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3366);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(ID,e);function ID(r){_classCallCheck(this,ID);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.ID;return t}ID.prototype.toString=function toString(){return[this.rawSpaceBefore,String("#"+this.stringifyProperty("value")),this.rawSpaceAfter].join("")};return ID}(i.default);r.default=s;e.exports=r["default"]},3966:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(4436);Object.keys(n).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return n[e]}})});var i=t(6001);Object.keys(i).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return i[e]}})});var o=t(5771);Object.keys(o).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return o[e]}})})},8807:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(3366);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Nesting,e);function Nesting(r){_classCallCheck(this,Nesting);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.NESTING;t.value="&";return t}return Nesting}(i.default);r.default=s;e.exports=r["default"]},3366:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Node);Object.assign(this,e);this.spaces=this.spaces||{};this.spaces.before=this.spaces.before||"";this.spaces.after=this.spaces.after||""}Node.prototype.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};Node.prototype.replaceWith=function replaceWith(){if(this.parent){for(var e in arguments){this.parent.insertBefore(this,arguments[e])}this.remove()}return this};Node.prototype.next=function next(){return this.parent.at(this.parent.index(this)+1)};Node.prototype.prev=function prev(){return this.parent.at(this.parent.index(this)-1)};Node.prototype.clone=function clone(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=s(this);for(var t in e){r[t]=e[t]}return r};Node.prototype.appendToPropertyAndEscape=function appendToPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}var n=this[e];var i=this.raws[e];this[e]=n+r;if(i||t!==r){this.raws[e]=(i||n)+t}else{delete this.raws[e]}};Node.prototype.setPropertyAndEscape=function setPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}this[e]=r;this.raws[e]=t};Node.prototype.setPropertyWithoutEscape=function setPropertyWithoutEscape(e,r){this[e]=r;if(this.raws){delete this.raws[e]}};Node.prototype.isAtPosition=function isAtPosition(e,r){if(this.source&&this.source.start&&this.source.end){if(this.source.start.line>e){return false}if(this.source.end.liner){return false}if(this.source.end.line===e&&this.source.end.column{"use strict";r.__esModule=true;var n=t(7507);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Pseudo,e);function Pseudo(r){_classCallCheck(this,Pseudo);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.PSEUDO;return t}Pseudo.prototype.toString=function toString(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")};return Pseudo}(i.default);r.default=s;e.exports=r["default"]},7792:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(7507);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Selector,e);function Selector(r){_classCallCheck(this,Selector);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.SELECTOR;return t}return Selector}(i.default);r.default=s;e.exports=r["default"]},6776:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3366);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(String,e);function String(r){_classCallCheck(this,String);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.STRING;return t}return String}(i.default);r.default=s;e.exports=r["default"]},2066:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(8807);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Tag,e);function Tag(r){_classCallCheck(this,Tag);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.TAG;return t}return Tag}(i.default);r.default=s;e.exports=r["default"]},4436:(e,r)=>{"use strict";r.__esModule=true;var t=r.TAG="tag";var n=r.STRING="string";var i=r.SELECTOR="selector";var o=r.ROOT="root";var s=r.PSEUDO="pseudo";var a=r.NESTING="nesting";var u=r.ID="id";var f=r.COMMENT="comment";var c=r.COMBINATOR="combinator";var l=r.CLASS="class";var p=r.ATTRIBUTE="attribute";var h=r.UNIVERSAL="universal"},707:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(8807);var i=_interopRequireDefault(n);var o=t(4436);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Universal,e);function Universal(r){_classCallCheck(this,Universal);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.UNIVERSAL;t.value="*";return t}return Universal}(i.default);r.default=s;e.exports=r["default"]},4772:(e,r)=>{"use strict";r.__esModule=true;r.default=sortAscending;function sortAscending(e){return e.sort(function(e,r){return e-r})}e.exports=r["default"]},1406:(e,r)=>{"use strict";r.__esModule=true;var t=r.ampersand=38;var n=r.asterisk=42;var i=r.at=64;var o=r.comma=44;var s=r.colon=58;var a=r.semicolon=59;var u=r.openParenthesis=40;var f=r.closeParenthesis=41;var c=r.openSquare=91;var l=r.closeSquare=93;var p=r.dollar=36;var h=r.tilde=126;var B=r.caret=94;var v=r.plus=43;var d=r.equals=61;var b=r.pipe=124;var y=r.greaterThan=62;var g=r.space=32;var m=r.singleQuote=39;var C=r.doubleQuote=34;var w=r.slash=47;var S=r.bang=33;var O=r.backslash=92;var T=r.cr=13;var E=r.feed=12;var k=r.newline=10;var P=r.tab=9;var D=r.str=m;var A=r.comment=-1;var R=r.word=-2;var F=r.combinator=-3},2258:(e,r,t)=>{"use strict";r.__esModule=true;r.FIELDS=undefined;var n,i;r.default=tokenize;var o=t(1406);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}var a=(n={},n[s.tab]=true,n[s.newline]=true,n[s.cr]=true,n[s.feed]=true,n);var u=(i={},i[s.space]=true,i[s.tab]=true,i[s.newline]=true,i[s.cr]=true,i[s.feed]=true,i[s.ampersand]=true,i[s.asterisk]=true,i[s.bang]=true,i[s.comma]=true,i[s.colon]=true,i[s.semicolon]=true,i[s.openParenthesis]=true,i[s.closeParenthesis]=true,i[s.openSquare]=true,i[s.closeSquare]=true,i[s.singleQuote]=true,i[s.doubleQuote]=true,i[s.plus]=true,i[s.pipe]=true,i[s.tilde]=true,i[s.greaterThan]=true,i[s.equals]=true,i[s.dollar]=true,i[s.caret]=true,i[s.slash]=true,i);var f={};var c="0123456789abcdefABCDEF";for(var l=0;l0){g=a+d;m=y-b[d].length}else{g=a;m=o}w=s.comment;a=g;h=g;p=y-m}else if(c===s.slash){y=u;w=c;h=a;p=u-o;f=y+1}else{y=consumeWord(t,u);w=s.word;h=a;p=y-o}f=y+1;break}r.push([w,a,u-o,h,p,u,f]);if(m){o=m;m=null}u=f}return r}},8039:(e,r)=>{"use strict";r.__esModule=true;r.default=ensureObject;function ensureObject(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){e[i]={}}e=e[i]}}e.exports=r["default"]},9501:(e,r)=>{"use strict";r.__esModule=true;r.default=getProp;function getProp(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){return undefined}e=e[i]}return e}e.exports=r["default"]},6266:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(1010);Object.defineProperty(r,"unesc",{enumerable:true,get:function get(){return _interopRequireDefault(n).default}});var i=t(9501);Object.defineProperty(r,"getProp",{enumerable:true,get:function get(){return _interopRequireDefault(i).default}});var o=t(8039);Object.defineProperty(r,"ensureObject",{enumerable:true,get:function get(){return _interopRequireDefault(o).default}});var s=t(6972);Object.defineProperty(r,"stripComments",{enumerable:true,get:function get(){return _interopRequireDefault(s).default}});function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},6972:(e,r)=>{"use strict";r.__esModule=true;r.default=stripComments;function stripComments(e){var r="";var t=e.indexOf("/*");var n=0;while(t>=0){r=r+e.slice(n,t);var i=e.indexOf("*/",t+2);if(i<0){return r}n=i+2;t=e.indexOf("/*",n)}r=r+e.slice(n);return r}e.exports=r["default"]},1010:(e,r)=>{"use strict";r.__esModule=true;r.default=unesc;var t=/\\(?:([0-9a-fA-F]{6})|([0-9a-fA-F]{1,5})(?: |(?![0-9a-fA-F])))/g;var n=/\\(.)/g;function unesc(e){e=e.replace(t,function(e,r,t){var n=r||t;var i=parseInt(n,16);return String.fromCharCode(i)});e=e.replace(n,function(e,r){return r});return e}e.exports=r["default"]},7814:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=n.plugin("postcss-color-functional-notation",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):false;return e=>{e.walkDecls(e=>{const t=e.value;if(u.test(t)){const n=i(t).parse();n.walkType("func",e=>{if(f.test(e.value)){const r=e.nodes.slice(1,-1);const t=P(e,r);const n=D(e,r);const i=A(e,r);if(t||n||i){const t=r[3];const n=r[4];if(n){if(g(n)&&!d(n)){n.unit="";n.value=String(n.value/100)}if(C(e)){e.value+="a"}}else if(w(e)){e.value=e.value.slice(0,-1)}if(t&&O(t)){t.replaceWith(R())}if(i){r[0].unit=r[1].unit=r[2].unit="";r[0].value=String(Math.floor(r[0].value*255/100));r[1].value=String(Math.floor(r[1].value*255/100));r[2].value=String(Math.floor(r[2].value*255/100))}e.nodes.splice(3,0,[R()]);e.nodes.splice(2,0,[R()])}}});const o=String(n);if(o!==t){if(r){e.cloneBefore({value:o})}else{e.value=o}}}})}});const s=/^%?$/i;const a=/^calc$/i;const u=/(^|[^\w-])(hsla?|rgba?)\(/i;const f=/^(hsla?|rgba?)$/i;const c=/^hsla?$/i;const l=/^(hsl|rgb)$/i;const p=/^(hsla|rgba)$/i;const h=/^(deg|grad|rad|turn)?$/i;const B=/^rgba?$/i;const v=e=>d(e)||e.type==="number"&&s.test(e.unit);const d=e=>e.type==="func"&&a.test(e.value);const b=e=>d(e)||e.type==="number"&&h.test(e.unit);const y=e=>d(e)||e.type==="number"&&e.unit==="";const g=e=>d(e)||e.type==="number"&&(e.unit==="%"||e.unit===""&&e.value==="0");const m=e=>e.type==="func"&&c.test(e.value);const C=e=>e.type==="func"&&l.test(e.value);const w=e=>e.type==="func"&&p.test(e.value);const S=e=>e.type==="func"&&B.test(e.value);const O=e=>e.type==="operator"&&e.value==="/";const T=[b,g,g,O,v];const E=[y,y,y,O,v];const k=[g,g,g,O,v];const P=(e,r)=>m(e)&&r.every((e,r)=>typeof T[r]==="function"&&T[r](e));const D=(e,r)=>S(e)&&r.every((e,r)=>typeof E[r]==="function"&&E[r](e));const A=(e,r)=>S(e)&&r.every((e,r)=>typeof k[r]==="function"&&k[r](e));const R=()=>i.comma({value:","});e.exports=o},489:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=t(4567);function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_nonIterableRest()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,r){var t=[];var n=true;var i=false;var o=undefined;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){t.push(a.value);if(r&&t.length===r)break}}catch(e){i=true;o=e}finally{try{if(!n&&s["return"]!=null)s["return"]()}finally{if(i)throw o}}return t}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var s=n.plugin("postcss-color-gray",e=>r=>{r.walkDecls(r=>{if(u(r)){const t=r.value;const n=i(t).parse();n.walk(e=>{const r=S(e),t=_slicedToArray(r,2),n=t[0],s=t[1];if(n!==undefined){e.value="rgb";const r=o.lab2rgb(n,0,0).map(e=>Math.max(Math.min(Math.round(e*2.55),255),0)),t=_slicedToArray(r,3),a=t[0],u=t[1],f=t[2];const c=e.first;const l=e.last;e.removeAll().append(c).append(i.number({value:a})).append(i.comma({value:","})).append(i.number({value:u})).append(i.comma({value:","})).append(i.number({value:f}));if(s<1){e.value+="a";e.append(i.comma({value:","})).append(i.number({value:s}))}e.append(l)}});const s=n.toString();if(t!==s){if(Object(e).preserve){r.cloneBefore({value:s})}else{r.value=s}}}})});const a=/(^|[^\w-])gray\(/i;const u=e=>a.test(Object(e).value);const f=e=>Object(e).type==="number";const c=e=>Object(e).type==="operator";const l=e=>Object(e).type==="func";const p=/^calc$/i;const h=e=>l(e)&&p.test(e.value);const B=/^gray$/i;const v=e=>l(e)&&B.test(e.value)&&e.nodes&&e.nodes.length;const d=e=>f(e)&&e.unit==="%";const b=e=>f(e)&&e.unit==="";const y=e=>c(e)&&e.value==="/";const g=e=>b(e)?Number(e.value):undefined;const m=e=>y(e)?null:undefined;const C=e=>h(e)?String(e):b(e)?Number(e.value):d(e)?Number(e.value)/100:undefined;const w=[g,m,C];const S=e=>{const r=[];if(v(e)){const t=e.nodes.slice(1,-1);for(const e in t){const n=typeof w[e]==="function"?w[e](t[e]):undefined;if(n!==undefined){if(n!==null){r.push(n)}}else{return[]}}return r}else{return[]}};e.exports=s},8157:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=n.plugin("postcss-color-hex-alpha",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):false;return e=>{e.walkDecls(e=>{if(a(e)){const t=i(e.value).parse();f(t,e=>{if(l(e)){e.replaceWith(p(e))}});const n=String(t);if(e.value!==n){if(r){e.cloneBefore({value:n})}else{e.value=n}}}})}});const s=/#([0-9A-Fa-f]{4}(?:[0-9A-Fa-f]{4})?)\b/;const a=e=>s.test(e.value);const u=/^#([0-9A-Fa-f]{4}(?:[0-9A-Fa-f]{4})?)$/;const f=(e,r)=>{if(Object(e.nodes).length){e.nodes.slice().forEach(e=>{r(e);f(e,r)})}};const c=1e5;const l=e=>e.type==="word"&&u.test(e.value);const p=e=>{const r=e.value;const t=`0x${r.length===5?r.slice(1).replace(/[0-9A-f]/g,"$&$&"):r.slice(1)}`;const n=[parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),parseInt(t.slice(6,8),16),Math.round(parseInt(t.slice(8,10),16)/255*c)/c],o=n[0],s=n[1],a=n[2],u=n[3];const f=i.func({value:"rgba",raws:Object.assign({},e.raws)});f.append(i.paren({value:"("}));f.append(i.number({value:o}));f.append(i.comma({value:","}));f.append(i.number({value:s}));f.append(i.comma({value:","}));f.append(i.number({value:a}));f.append(i.comma({value:","}));f.append(i.number({value:u}));f.append(i.paren({value:")"}));return f};e.exports=o},8881:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(9448));var i=_interopDefault(t(5747));var o=_interopDefault(t(5622));var s=_interopDefault(t(4633));var a=t(4567);function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}function _defineProperty(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function _objectSpread(e){for(var r=1;r{const o=l(e)?t:p(e)?i:null;if(o){e.nodes.slice().forEach(e=>{if(h(e)){const t=e.prop;o[t]=n(e.value).parse();if(!r.preserve){e.remove()}}});if(!r.preserve&&B(e)){e.remove()}}});return _objectSpread({},t,i)}const u=/^html$/i;const f=/^:root$/i;const c=/^--[A-z][\w-]*$/;const l=e=>e.type==="rule"&&u.test(e.selector)&&Object(e.nodes).length;const p=e=>e.type==="rule"&&f.test(e.selector)&&Object(e.nodes).length;const h=e=>e.type==="decl"&&c.test(e.prop);const B=e=>Object(e.nodes).length===0;function importCustomPropertiesFromCSSAST(e){return getCustomProperties(e,{preserve:true})}function importCustomPropertiesFromCSSFile(e){return _importCustomPropertiesFromCSSFile.apply(this,arguments)}function _importCustomPropertiesFromCSSFile(){_importCustomPropertiesFromCSSFile=_asyncToGenerator(function*(e){const r=yield v(e);const t=s.parse(r,{from:e});return importCustomPropertiesFromCSSAST(t)});return _importCustomPropertiesFromCSSFile.apply(this,arguments)}function importCustomPropertiesFromObject(e){const r=Object.assign({},Object(e).customProperties||Object(e)["custom-properties"]);for(const e in r){r[e]=n(r[e]).parse()}return r}function importCustomPropertiesFromJSONFile(e){return _importCustomPropertiesFromJSONFile.apply(this,arguments)}function _importCustomPropertiesFromJSONFile(){_importCustomPropertiesFromJSONFile=_asyncToGenerator(function*(e){const r=yield d(e);return importCustomPropertiesFromObject(r)});return _importCustomPropertiesFromJSONFile.apply(this,arguments)}function importCustomPropertiesFromJSFile(e){return _importCustomPropertiesFromJSFile.apply(this,arguments)}function _importCustomPropertiesFromJSFile(){_importCustomPropertiesFromJSFile=_asyncToGenerator(function*(e){const r=yield Promise.resolve(require(e));return importCustomPropertiesFromObject(r)});return _importCustomPropertiesFromJSFile.apply(this,arguments)}function importCustomPropertiesFromSources(e){return e.map(e=>{if(e instanceof Promise){return e}else if(e instanceof Function){return e()}const r=e===Object(e)?e:{from:String(e)};if(r.customProperties||r["custom-properties"]){return r}const t=o.resolve(String(r.from||""));const n=(r.type||o.extname(t).slice(1)).toLowerCase();return{type:n,from:t}}).reduce(function(){var e=_asyncToGenerator(function*(e,r){const t=yield r,n=t.type,i=t.from;if(n==="ast"){return Object.assign(yield e,importCustomPropertiesFromCSSAST(i))}if(n==="css"){return Object.assign(yield e,yield importCustomPropertiesFromCSSFile(i))}if(n==="js"){return Object.assign(yield e,yield importCustomPropertiesFromJSFile(i))}if(n==="json"){return Object.assign(yield e,yield importCustomPropertiesFromJSONFile(i))}return Object.assign(yield e,yield importCustomPropertiesFromObject(yield r))});return function(r,t){return e.apply(this,arguments)}}(),{})}const v=e=>new Promise((r,t)=>{i.readFile(e,"utf8",(e,n)=>{if(e){t(e)}else{r(n)}})});const d=function(){var e=_asyncToGenerator(function*(e){return JSON.parse(yield v(e))});return function readJSON(r){return e.apply(this,arguments)}}();function convertDtoD(e){return e%360}function convertGtoD(e){return e*.9%360}function convertRtoD(e){return e*180/Math.PI%360}function convertTtoD(e){return e*360%360}function convertNtoRGB(e){const r={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};return r[e]&&r[e].map(e=>e/2.55)}function convertHtoRGB(e){const r=(e.match(b)||[]).slice(1),t=_slicedToArray(r,8),n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],f=t[6],c=t[7];if(a!==undefined||n!==undefined){const e=a!==undefined?parseInt(a,16):n!==undefined?parseInt(n+n,16):0;const r=u!==undefined?parseInt(u,16):i!==undefined?parseInt(i+i,16):0;const t=f!==undefined?parseInt(f,16):o!==undefined?parseInt(o+o,16):0;const l=c!==undefined?parseInt(c,16):s!==undefined?parseInt(s+s,16):255;return[e,r,t,l].map(e=>e/2.55)}return undefined}const b=/^#(?:([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?)$/i;class Color{constructor(e){this.color=Object(Object(e).color||e);this.color.colorspace=this.color.colorspace?this.color.colorspace:"red"in e&&"green"in e&&"blue"in e?"rgb":"hue"in e&&"saturation"in e&&"lightness"in e?"hsl":"hue"in e&&"whiteness"in e&&"blackness"in e?"hwb":"unknown";if(e.colorspace==="rgb"){this.color.hue=a.rgb2hue(e.red,e.green,e.blue,e.hue||0)}}alpha(e){const r=this.color;return e===undefined?r.alpha:new Color(assign(r,{alpha:e}))}blackness(e){const r=color2hwb(this.color);return e===undefined?r.blackness:new Color(assign(r,{blackness:e}))}blend(e,r,t="rgb"){const n=this.color;return new Color(blend(n,e,r,t))}blenda(e,r,t="rgb"){const n=this.color;return new Color(blend(n,e,r,t,true))}blue(e){const r=color2rgb(this.color);return e===undefined?r.blue:new Color(assign(r,{blue:e}))}contrast(e){const r=this.color;return new Color(contrast(r,e))}green(e){const r=color2rgb(this.color);return e===undefined?r.green:new Color(assign(r,{green:e}))}hue(e){const r=color2hsl(this.color);return e===undefined?r.hue:new Color(assign(r,{hue:e}))}lightness(e){const r=color2hsl(this.color);return e===undefined?r.lightness:new Color(assign(r,{lightness:e}))}red(e){const r=color2rgb(this.color);return e===undefined?r.red:new Color(assign(r,{red:e}))}rgb(e,r,t){const n=color2rgb(this.color);return new Color(assign(n,{red:e,green:r,blue:t}))}saturation(e){const r=color2hsl(this.color);return e===undefined?r.saturation:new Color(assign(r,{saturation:e}))}shade(e){const r=color2hwb(this.color);const t={hue:0,whiteness:0,blackness:100,colorspace:"hwb"};const n="rgb";return e===undefined?r.blackness:new Color(blend(r,t,e,n))}tint(e){const r=color2hwb(this.color);const t={hue:0,whiteness:100,blackness:0,colorspace:"hwb"};const n="rgb";return e===undefined?r.blackness:new Color(blend(r,t,e,n))}whiteness(e){const r=color2hwb(this.color);return e===undefined?r.whiteness:new Color(assign(r,{whiteness:e}))}toHSL(){return color2hslString(this.color)}toHWB(){return color2hwbString(this.color)}toLegacy(){return color2legacyString(this.color)}toRGB(){return color2rgbString(this.color)}toRGBLegacy(){return color2rgbLegacyString(this.color)}toString(){return color2string(this.color)}}function blend(e,r,t,n,i){const o=t/100;const s=1-o;if(n==="hsl"){const t=color2hsl(e),n=t.hue,a=t.saturation,u=t.lightness,f=t.alpha;const c=color2hsl(r),l=c.hue,p=c.saturation,h=c.lightness,B=c.alpha;const v=n*s+l*o,d=a*s+p*o,b=u*s+h*o,y=i?f*s+B*o:f;return{hue:v,saturation:d,lightness:b,alpha:y,colorspace:"hsl"}}else if(n==="hwb"){const t=color2hwb(e),n=t.hue,a=t.whiteness,u=t.blackness,f=t.alpha;const c=color2hwb(r),l=c.hue,p=c.whiteness,h=c.blackness,B=c.alpha;const v=n*s+l*o,d=a*s+p*o,b=u*s+h*o,y=i?f*s+B*o:f;return{hue:v,whiteness:d,blackness:b,alpha:y,colorspace:"hwb"}}else{const t=color2rgb(e),n=t.red,a=t.green,u=t.blue,f=t.alpha;const c=color2rgb(r),l=c.red,p=c.green,h=c.blue,B=c.alpha;const v=n*s+l*o,d=a*s+p*o,b=u*s+h*o,y=i?f*s+B*o:f;return{red:v,green:d,blue:b,alpha:y,colorspace:"rgb"}}}function assign(e,r){const t=Object.assign({},e);Object.keys(r).forEach(n=>{const i=n==="hue";const o=!i&&y.test(n);const s=normalize(r[n],n);t[n]=s;if(o){t.hue=a.rgb2hue(t.red,t.green,t.blue,e.hue||0)}});return t}function normalize(e,r){const t=r==="hue";const n=0;const i=t?360:100;const o=Math.min(Math.max(t?e%360:e,n),i);return o}function color2rgb(e){const r=e.colorspace==="hsl"?a.hsl2rgb(e.hue,e.saturation,e.lightness):e.colorspace==="hwb"?a.hwb2rgb(e.hue,e.whiteness,e.blackness):[e.red,e.green,e.blue],t=_slicedToArray(r,3),n=t[0],i=t[1],o=t[2];return{red:n,green:i,blue:o,hue:e.hue,alpha:e.alpha,colorspace:"rgb"}}function color2hsl(e){const r=e.colorspace==="rgb"?a.rgb2hsl(e.red,e.green,e.blue,e.hue):e.colorspace==="hwb"?a.hwb2hsl(e.hue,e.whiteness,e.blackness):[e.hue,e.saturation,e.lightness],t=_slicedToArray(r,3),n=t[0],i=t[1],o=t[2];return{hue:n,saturation:i,lightness:o,alpha:e.alpha,colorspace:"hsl"}}function color2hwb(e){const r=e.colorspace==="rgb"?a.rgb2hwb(e.red,e.green,e.blue,e.hue):e.colorspace==="hsl"?a.hsl2hwb(e.hue,e.saturation,e.lightness):[e.hue,e.whiteness,e.blackness],t=_slicedToArray(r,3),n=t[0],i=t[1],o=t[2];return{hue:n,whiteness:i,blackness:o,alpha:e.alpha,colorspace:"hwb"}}function contrast(e,r){const t=color2hwb(e);const n=color2rgb(e);const i=rgb2luminance(n.red,n.green,n.blue);const o=i<.5?{hue:t.hue,whiteness:100,blackness:0,alpha:t.alpha,colorspace:"hwb"}:{hue:t.hue,whiteness:0,blackness:100,alpha:t.alpha,colorspace:"hwb"};const s=colors2contrast(e,o);const a=s>4.5?colors2contrastRatioColor(t,o):o;return blend(o,a,r,"hwb",false)}function colors2contrast(e,r){const t=color2rgb(e);const n=color2rgb(r);const i=rgb2luminance(t.red,t.green,t.blue);const o=rgb2luminance(n.red,n.green,n.blue);return i>o?(i+.05)/(o+.05):(o+.05)/(i+.05)}function rgb2luminance(e,r,t){const n=[channel2luminance(e),channel2luminance(r),channel2luminance(t)],i=n[0],o=n[1],s=n[2];const a=.2126*i+.7152*o+.0722*s;return a}function channel2luminance(e){const r=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4);return r}function colors2contrastRatioColor(e,r){const t=Object.assign({},e);let n=e.whiteness;let i=e.blackness;let o=r.whiteness;let s=r.blackness;while(Math.abs(n-o)>100||Math.abs(i-s)>100){const r=Math.round((o+n)/2);const a=Math.round((s+i)/2);t.whiteness=r;t.blackness=a;if(colors2contrast(t,e)>4.5){o=r;s=a}else{n=r;i=a}}return t}const y=/^(blue|green|red)$/i;function color2string(e){return e.colorspace==="hsl"?color2hslString(e):e.colorspace==="hwb"?color2hwbString(e):color2rgbString(e)}function color2hslString(e){const r=color2hsl(e);const t=r.alpha===100;const n=r.hue;const i=Math.round(r.saturation*1e10)/1e10;const o=Math.round(r.lightness*1e10)/1e10;const s=Math.round(r.alpha*1e10)/1e10;return`hsl(${n} ${i}% ${o}%${t?"":` / ${s}%`})`}function color2hwbString(e){const r=color2hwb(e);const t=r.alpha===100;const n=r.hue;const i=Math.round(r.whiteness*1e10)/1e10;const o=Math.round(r.blackness*1e10)/1e10;const s=Math.round(r.alpha*1e10)/1e10;return`hwb(${n} ${i}% ${o}%${t?"":` / ${s}%`})`}function color2rgbString(e){const r=color2rgb(e);const t=r.alpha===100;const n=Math.round(r.red*1e10)/1e10;const i=Math.round(r.green*1e10)/1e10;const o=Math.round(r.blue*1e10)/1e10;const s=Math.round(r.alpha*1e10)/1e10;return`rgb(${n}% ${i}% ${o}%${t?"":` / ${s}%`})`}function color2legacyString(e){return e.colorspace==="hsl"?color2hslLegacyString(e):color2rgbLegacyString(e)}function color2rgbLegacyString(e){const r=color2rgb(e);const t=r.alpha===100;const n=t?"rgb":"rgba";const i=Math.round(r.red*255/100);const o=Math.round(r.green*255/100);const s=Math.round(r.blue*255/100);const a=Math.round(r.alpha/100*1e10)/1e10;return`${n}(${i}, ${o}, ${s}${t?"":`, ${a}`})`}function color2hslLegacyString(e){const r=color2hsl(e);const t=r.alpha===100;const n=t?"hsl":"hsla";const i=r.hue;const o=Math.round(r.saturation*1e10)/1e10;const s=Math.round(r.lightness*1e10)/1e10;const a=Math.round(r.alpha/100*1e10)/1e10;return`${n}(${i}, ${o}%, ${s}%${t?"":`, ${a}`})`}function manageUnresolved(e,r,t,n){if("warn"===r.unresolved){r.decl.warn(r.result,n,{word:t})}else if("ignore"!==r.unresolved){throw r.decl.error(n,{word:t})}}function transformAST(e,r){e.nodes.slice(0).forEach(e=>{if(isColorModFunction(e)){if(r.transformVars){transformVariables(e,r)}const t=transformColorModFunction(e,r);if(t){e.replaceWith(n.word({raws:e.raws,value:r.stringifier(t)}))}}else if(e.nodes&&Object(e.nodes).length){transformAST(e,r)}})}function transformVariables(e,r){walk(e,e=>{if(isVariable(e)){const t=transformArgsByParams(e,[[transformWord,isComma,transformNode]]),n=_slicedToArray(t,2),i=n[0],o=n[1];if(i in r.customProperties){let t=r.customProperties[i];if(N.test(t)){const e=t.clone();transformVariables(e,r);t=e}if(t.nodes.length===1&&t.nodes[0].nodes.length){t.nodes[0].nodes.forEach(r=>{e.parent.insertBefore(e,r)})}e.remove()}else if(o&&o.nodes.length===1&&o.nodes[0].nodes.length){transformVariables(o,r);e.replaceWith(...o.nodes[0].nodes[0])}}})}function transformColor(e,r){if(isRGBFunction(e)){return transformRGBFunction(e,r)}else if(isHSLFunction(e)){return transformHSLFunction(e,r)}else if(isHWBFunction(e)){return transformHWBFunction(e,r)}else if(isColorModFunction(e)){return transformColorModFunction(e,r)}else if(isHexColor(e)){return transformHexColor(e,r)}else if(isNamedColor(e)){return transformNamedColor(e,r)}else{return manageUnresolved(e,r,e.value,`Expected a color`)}}function transformRGBFunction(e,r){const t=transformArgsByParams(e,[[transformPercentage,transformPercentage,transformPercentage,isSlash,transformAlpha],[transformRGBNumber,transformRGBNumber,transformRGBNumber,isSlash,transformAlpha],[transformPercentage,isComma,transformPercentage,isComma,transformPercentage,isComma,transformAlpha],[transformRGBNumber,isComma,transformRGBNumber,isComma,transformRGBNumber,isComma,transformAlpha]]),n=_slicedToArray(t,4),i=n[0],o=n[1],s=n[2],a=n[3],u=a===void 0?100:a;if(i!==undefined){const e=new Color({red:i,green:o,blue:s,alpha:u,colorspace:"rgb"});return e}else{return manageUnresolved(e,r,e.value,`Expected a valid rgb() function`)}}function transformHSLFunction(e,r){const t=transformArgsByParams(e,[[transformHue,transformPercentage,transformPercentage,isSlash,transformAlpha],[transformHue,isComma,transformPercentage,isComma,transformPercentage,isComma,transformAlpha]]),n=_slicedToArray(t,4),i=n[0],o=n[1],s=n[2],a=n[3],u=a===void 0?100:a;if(s!==undefined){const e=new Color({hue:i,saturation:o,lightness:s,alpha:u,colorspace:"hsl"});return e}else{return manageUnresolved(e,r,e.value,`Expected a valid hsl() function`)}}function transformHWBFunction(e,r){const t=transformArgsByParams(e,[[transformHue,transformPercentage,transformPercentage,isSlash,transformAlpha]]),n=_slicedToArray(t,4),i=n[0],o=n[1],s=n[2],a=n[3],u=a===void 0?100:a;if(s!==undefined){const e=new Color({hue:i,whiteness:o,blackness:s,alpha:u,colorspace:"hwb"});return e}else{return manageUnresolved(e,r,e.value,`Expected a valid hwb() function`)}}function transformColorModFunction(e,r){const t=(e.nodes||[]).slice(1,-1)||[],n=_toArray(t),i=n[0],o=n.slice(1);if(i!==undefined){const t=isHue(i)?new Color({hue:transformHue(i,r),saturation:100,lightness:50,alpha:100,colorspace:"hsl"}):transformColor(i,r);if(t){const e=transformColorByAdjusters(t,o,r);return e}else{return manageUnresolved(e,r,e.value,`Expected a valid color`)}}else{return manageUnresolved(e,r,e.value,`Expected a valid color-mod() function`)}}function transformHexColor(e,r){if(E.test(e.value)){const r=convertHtoRGB(e.value),t=_slicedToArray(r,4),n=t[0],i=t[1],o=t[2],s=t[3];const a=new Color({red:n,green:i,blue:o,alpha:s});return a}else{return manageUnresolved(e,r,e.value,`Expected a valid hex color`)}}function transformNamedColor(e,r){if(isNamedColor(e)){const r=convertNtoRGB(e.value),t=_slicedToArray(r,3),n=t[0],i=t[1],o=t[2];const s=new Color({red:n,green:i,blue:o,alpha:100,colorspace:"rgb"});return s}else{return manageUnresolved(e,r,e.value,`Expected a valid named-color`)}}function transformColorByAdjusters(e,r,t){const n=r.reduce((e,r)=>{if(isAlphaBlueGreenRedAdjuster(r)){return transformAlphaBlueGreenRedAdjuster(e,r,t)}else if(isRGBAdjuster(r)){return transformRGBAdjuster(e,r,t)}else if(isHueAdjuster(r)){return transformHueAdjuster(e,r,t)}else if(isBlacknessLightnessSaturationWhitenessAdjuster(r)){return transformBlacknessLightnessSaturationWhitenessAdjuster(e,r,t)}else if(isShadeTintAdjuster(r)){return transformShadeTintAdjuster(e,r,t)}else if(isBlendAdjuster(r)){return transformBlendAdjuster(e,r,r.value==="blenda",t)}else if(isContrastAdjuster(r)){return transformContrastAdjuster(e,r,t)}else{manageUnresolved(r,t,r.value,`Expected a valid color adjuster`);return e}},e);return n}function transformAlphaBlueGreenRedAdjuster(e,r,t){const n=transformArgsByParams(r,g.test(r.value)?[[transformMinusPlusOperator,transformAlpha],[transformTimesOperator,transformPercentage],[transformAlpha]]:[[transformMinusPlusOperator,transformPercentage],[transformMinusPlusOperator,transformRGBNumber],[transformTimesOperator,transformPercentage],[transformPercentage],[transformRGBNumber]]),i=_slicedToArray(n,2),o=i[0],s=i[1];if(o!==undefined){const t=r.value.toLowerCase().replace(g,"alpha");const n=e[t]();const i=s!==undefined?o==="+"?n+Number(s):o==="-"?n-Number(s):o==="*"?n*Number(s):Number(s):Number(o);const a=e[t](i);return a}else{return manageUnresolved(r,t,r.value,`Expected a valid modifier()`)}}function transformRGBAdjuster(e,r,t){const n=transformArgsByParams(r,[[transformMinusPlusOperator,transformPercentage,transformPercentage,transformPercentage],[transformMinusPlusOperator,transformRGBNumber,transformRGBNumber,transformRGBNumber],[transformMinusPlusOperator,transformHexColor],[transformTimesOperator,transformPercentage]]),i=_slicedToArray(n,4),o=i[0],s=i[1],a=i[2],u=i[3];if(s!==undefined&&s.color){const r=e.rgb(o==="+"?e.red()+s.red():e.red()-s.red(),o==="+"?e.green()+s.green():e.green()-s.green(),o==="+"?e.blue()+s.blue():e.blue()-s.blue());return r}else if(o!==undefined&&R.test(o)){const r=e.rgb(o==="+"?e.red()+s:e.red()-s,o==="+"?e.green()+a:e.green()-a,o==="+"?e.blue()+u:e.blue()-u);return r}else if(o!==undefined&&s!==undefined){const r=e.rgb(e.red()*s,e.green()*s,e.blue()*s);return r}else{return manageUnresolved(r,t,r.value,`Expected a valid rgb() adjuster`)}}function transformBlendAdjuster(e,r,t,n){const i=transformArgsByParams(r,[[transformColor,transformPercentage,transformColorSpace]]),o=_slicedToArray(i,3),s=o[0],a=o[1],u=o[2],f=u===void 0?"rgb":u;if(a!==undefined){const r=t?e.blenda(s.color,a,f):e.blend(s.color,a,f);return r}else{return manageUnresolved(r,n,r.value,`Expected a valid blend() adjuster)`)}}function transformContrastAdjuster(e,r,t){const n=transformArgsByParams(r,[[transformPercentage]]),i=_slicedToArray(n,1),o=i[0];if(o!==undefined){const r=e.contrast(o);return r}else{return manageUnresolved(r,t,r.value,`Expected a valid contrast() adjuster)`)}}function transformHueAdjuster(e,r,t){const n=transformArgsByParams(r,[[transformMinusPlusTimesOperator,transformHue],[transformHue]]),i=_slicedToArray(n,2),o=i[0],s=i[1];if(o!==undefined){const r=e.hue();const t=s!==undefined?o==="+"?r+Number(s):o==="-"?r-Number(s):o==="*"?r*Number(s):Number(s):Number(o);return e.hue(t)}else{return manageUnresolved(r,t,r.value,`Expected a valid hue() function)`)}}function transformBlacknessLightnessSaturationWhitenessAdjuster(e,r,t){const n=r.value.toLowerCase().replace(/^b$/,"blackness").replace(/^l$/,"lightness").replace(/^s$/,"saturation").replace(/^w$/,"whiteness");const i=transformArgsByParams(r,[[transformMinusPlusTimesOperator,transformPercentage],[transformPercentage]]),o=_slicedToArray(i,2),s=o[0],a=o[1];if(s!==undefined){const r=e[n]();const t=a!==undefined?s==="+"?r+Number(a):s==="-"?r-Number(a):s==="*"?r*Number(a):Number(a):Number(s);return e[n](t)}else{return manageUnresolved(r,t,r.value,`Expected a valid ${n}() function)`)}}function transformShadeTintAdjuster(e,r,t){const n=r.value.toLowerCase();const i=transformArgsByParams(r,[[transformPercentage]]),o=_slicedToArray(i,1),s=o[0];if(s!==undefined){const r=Number(s);return e[n](r)}else{return manageUnresolved(r,t,r.value,`Expected valid ${n}() arguments`)}}function transformColorSpace(e,r){if(isColorSpace(e)){return e.value}else{return manageUnresolved(e,r,e.value,`Expected a valid color space)`)}}function transformAlpha(e,r){if(isNumber(e)){return e.value*100}else if(isPercentage(e)){return transformPercentage(e,r)}else{return manageUnresolved(e,r,e.value,`Expected a valid alpha value)`)}}function transformRGBNumber(e,r){if(isNumber(e)){return e.value/2.55}else{return manageUnresolved(e,r,e.value,`Expected a valid RGB value)`)}}function transformHue(e,r){if(isHue(e)){const r=e.unit.toLowerCase();if(r==="grad"){return convertGtoD(e.value)}else if(r==="rad"){return convertRtoD(e.value)}else if(r==="turn"){return convertTtoD(e.value)}else{return convertDtoD(e.value)}}else{return manageUnresolved(e,r,e.value,`Expected a valid hue`)}}function transformPercentage(e,r){if(isPercentage(e)){return Number(e.value)}else{return manageUnresolved(e,r,e.value,`Expected a valid hue`)}}function transformMinusPlusOperator(e,r){if(isMinusPlusOperator(e)){return e.value}else{return manageUnresolved(e,r,e.value,`Expected a plus or minus operator`)}}function transformTimesOperator(e,r){if(isTimesOperator(e)){return e.value}else{return manageUnresolved(e,r,e.value,`Expected a times operator`)}}function transformMinusPlusTimesOperator(e,r){if(isMinusPlusTimesOperator(e)){return e.value}else{return manageUnresolved(e,r,e.value,`Expected a plus, minus, or times operator`)}}function transformWord(e,r){if(isWord(e)){return e.value}else{return manageUnresolved(e,r,e.value,`Expected a valid word`)}}function transformNode(e){return Object(e)}function transformArgsByParams(e,r){const t=(e.nodes||[]).slice(1,-1);const n={unresolved:"ignore"};return r.map(e=>t.map((r,t)=>typeof e[t]==="function"?e[t](r,n):undefined).filter(e=>typeof e!=="boolean")).filter(e=>e.every(e=>e!==undefined))[0]||[]}function walk(e,r){r(e);if(Object(e.nodes).length){e.nodes.slice().forEach(e=>{walk(e,r)})}}function isVariable(e){return Object(e).type==="func"&&M.test(e.value)}function isAlphaBlueGreenRedAdjuster(e){return Object(e).type==="func"&&m.test(e.value)}function isRGBAdjuster(e){return Object(e).type==="func"&&x.test(e.value)}function isHueAdjuster(e){return Object(e).type==="func"&&D.test(e.value)}function isBlacknessLightnessSaturationWhitenessAdjuster(e){return Object(e).type==="func"&&C.test(e.value)}function isShadeTintAdjuster(e){return Object(e).type==="func"&&I.test(e.value)}function isBlendAdjuster(e){return Object(e).type==="func"&&w.test(e.value)}function isContrastAdjuster(e){return Object(e).type==="func"&&T.test(e.value)}function isRGBFunction(e){return Object(e).type==="func"&&j.test(e.value)}function isHSLFunction(e){return Object(e).type==="func"&&k.test(e.value)}function isHWBFunction(e){return Object(e).type==="func"&&A.test(e.value)}function isColorModFunction(e){return Object(e).type==="func"&&S.test(e.value)}function isNamedColor(e){return Object(e).type==="word"&&Boolean(convertNtoRGB(e.value))}function isHexColor(e){return Object(e).type==="word"&&E.test(e.value)}function isColorSpace(e){return Object(e).type==="word"&&O.test(e.value)}function isHue(e){return Object(e).type==="number"&&P.test(e.unit)}function isComma(e){return Object(e).type==="comma"}function isSlash(e){return Object(e).type==="operator"&&e.value==="/"}function isNumber(e){return Object(e).type==="number"&&e.unit===""}function isMinusPlusOperator(e){return Object(e).type==="operator"&&R.test(e.value)}function isMinusPlusTimesOperator(e){return Object(e).type==="operator"&&F.test(e.value)}function isTimesOperator(e){return Object(e).type==="operator"&&_.test(e.value)}function isPercentage(e){return Object(e).type==="number"&&(e.unit==="%"||e.value==="0")}function isWord(e){return Object(e).type==="word"}const g=/^a(lpha)?$/i;const m=/^(a(lpha)?|blue|green|red)$/i;const C=/^(b(lackness)?|l(ightness)?|s(aturation)?|w(hiteness)?)$/i;const w=/^blenda?$/i;const S=/^color-mod$/i;const O=/^(hsl|hwb|rgb)$/i;const T=/^contrast$/i;const E=/^#(?:([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?)$/i;const k=/^hsla?$/i;const P=/^(deg|grad|rad|turn)?$/i;const D=/^h(ue)?$/i;const A=/^hwb$/i;const R=/^[+-]$/;const F=/^[*+-]$/;const x=/^rgb$/i;const j=/^rgba?$/i;const I=/^(shade|tint)$/i;const M=/^var$/i;const N=/(^|[^\w-])var\(/i;const _=/^[*]$/;var L=s.plugin("postcss-color-mod-function",e=>{const r=String(Object(e).unresolved||"throw").toLowerCase();const t=Object(e).stringifier||(e=>e.toLegacy());const i=[].concat(Object(e).importFrom||[]);const o="transformVars"in Object(e)?e.transformVars:true;const s=importCustomPropertiesFromSources(i);return function(){var e=_asyncToGenerator(function*(e,i){const a=Object.assign(yield s,getCustomProperties(e,{preserve:true}));e.walkDecls(e=>{const s=e.value;if(q.test(s)){const u=n(s,{loose:true}).parse();transformAST(u,{unresolved:r,stringifier:t,transformVars:o,decl:e,result:i,customProperties:a});const f=u.toString();if(s!==f){e.value=f}}})});return function(r,t){return e.apply(this,arguments)}}()});const q=/(^|[^\w-])color-mod\(/i;e.exports=L},9971:(e,r,t)=>{const n=t(4633);const i=t(9448);const o="#639";const s=/(^|[^\w-])rebeccapurple([^\w-]|$)/;e.exports=n.plugin("postcss-color-rebeccapurple",()=>e=>{e.walkDecls(e=>{const r=e.value;if(r&&s.test(r)){const t=i(r).parse();t.walk(e=>{if(e.type==="word"&&e.value==="rebeccapurple"){e.value=o}});e.value=t.toString()}})})},4731:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(5747));var o=_interopDefault(t(5622));function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}function _defineProperty(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function _objectSpread(e){for(var r=1;r0){o-=1}}else if(o===0){if(r&&h.test(n+a)){i=true}else if(!r&&a===","){i=true}}if(i){t.push(r?new MediaExpression(n+a):new MediaQuery(n));n="";i=false}else{n+=a}}if(n!==""){t.push(r?new MediaExpression(n):new MediaQuery(n))}return t}class MediaQueryList{constructor(e){this.nodes=parse(e)}invert(){this.nodes.forEach(e=>{e.invert()});return this}clone(){return new MediaQueryList(String(this))}toString(){return this.nodes.join(",")}}class MediaQuery{constructor(e){const r=e.match(B),t=_slicedToArray(r,4),n=t[1],i=t[2],o=t[3];const s=i.match(v)||[],a=_slicedToArray(s,9),u=a[1],f=u===void 0?"":u,c=a[2],l=c===void 0?" ":c,p=a[3],h=p===void 0?"":p,d=a[4],b=d===void 0?"":d,y=a[5],g=y===void 0?"":y,m=a[6],C=m===void 0?"":m,w=a[7],S=w===void 0?"":w,O=a[8],T=O===void 0?"":O;const E={before:n,after:o,afterModifier:l,originalModifier:f||"",beforeAnd:b,and:g,beforeExpression:C};const k=parse(S||T,true);Object.assign(this,{modifier:f,type:h,raws:E,nodes:k})}clone(e){const r=new MediaQuery(String(this));Object.assign(r,e);return r}invert(){this.modifier=this.modifier?"":this.raws.originalModifier;return this}toString(){const e=this.raws;return`${e.before}${this.modifier}${this.modifier?`${e.afterModifier}`:""}${this.type}${e.beforeAnd}${e.and}${e.beforeExpression}${this.nodes.join("")}${this.raws.after}`}}class MediaExpression{constructor(e){const r=e.match(h)||[null,e],t=_slicedToArray(r,5),n=t[1],i=t[2],o=i===void 0?"":i,s=t[3],a=s===void 0?"":s,u=t[4],f=u===void 0?"":u;const c={after:o,and:a,afterAnd:f};Object.assign(this,{value:n,raws:c})}clone(e){const r=new MediaExpression(String(this));Object.assign(r,e);return r}toString(){const e=this.raws;return`${this.value}${e.after}${e.and}${e.afterAnd}`}}const s="(not|only)";const a="(all|print|screen|speech)";const u="([\\W\\w]*)";const f="([\\W\\w]+)";const c="(\\s*)";const l="(\\s+)";const p="(?:(\\s+)(and))";const h=new RegExp(`^${f}(?:${p}${l})$`,"i");const B=new RegExp(`^${c}${u}${c}$`);const v=new RegExp(`^(?:${s}${l})?(?:${a}(?:${p}${l}${f})?|${f})$`,"i");var d=e=>new MediaQueryList(e);var b=(e,r)=>{const t={};e.nodes.slice().forEach(e=>{if(m(e)){const n=e.params.match(g),i=_slicedToArray(n,3),o=i[1],s=i[2];t[o]=d(s);if(!Object(r).preserve){e.remove()}}});return t};const y=/^custom-media$/i;const g=/^(--[A-z][\w-]*)\s+([\W\w]+)\s*$/;const m=e=>e.type==="atrule"&&y.test(e.name)&&g.test(e.params);function getCustomMediaFromCSSFile(e){return _getCustomMediaFromCSSFile.apply(this,arguments)}function _getCustomMediaFromCSSFile(){_getCustomMediaFromCSSFile=_asyncToGenerator(function*(e){const r=yield C(e);const t=n.parse(r,{from:e});return b(t,{preserve:true})});return _getCustomMediaFromCSSFile.apply(this,arguments)}function getCustomMediaFromObject(e){const r=Object.assign({},Object(e).customMedia,Object(e)["custom-media"]);for(const e in r){r[e]=d(r[e])}return r}function getCustomMediaFromJSONFile(e){return _getCustomMediaFromJSONFile.apply(this,arguments)}function _getCustomMediaFromJSONFile(){_getCustomMediaFromJSONFile=_asyncToGenerator(function*(e){const r=yield w(e);return getCustomMediaFromObject(r)});return _getCustomMediaFromJSONFile.apply(this,arguments)}function getCustomMediaFromJSFile(e){return _getCustomMediaFromJSFile.apply(this,arguments)}function _getCustomMediaFromJSFile(){_getCustomMediaFromJSFile=_asyncToGenerator(function*(e){const r=yield Promise.resolve(require(e));return getCustomMediaFromObject(r)});return _getCustomMediaFromJSFile.apply(this,arguments)}function getCustomMediaFromSources(e){return e.map(e=>{if(e instanceof Promise){return e}else if(e instanceof Function){return e()}const r=e===Object(e)?e:{from:String(e)};if(Object(r).customMedia||Object(r)["custom-media"]){return r}const t=o.resolve(String(r.from||""));const n=(r.type||o.extname(t).slice(1)).toLowerCase();return{type:n,from:t}}).reduce(function(){var e=_asyncToGenerator(function*(e,r){const t=yield r,n=t.type,i=t.from;if(n==="css"||n==="pcss"){return Object.assign(yield e,yield getCustomMediaFromCSSFile(i))}if(n==="js"){return Object.assign(yield e,yield getCustomMediaFromJSFile(i))}if(n==="json"){return Object.assign(yield e,yield getCustomMediaFromJSONFile(i))}return Object.assign(yield e,getCustomMediaFromObject(yield r))});return function(r,t){return e.apply(this,arguments)}}(),{})}const C=e=>new Promise((r,t)=>{i.readFile(e,"utf8",(e,n)=>{if(e){t(e)}else{r(n)}})});const w=function(){var e=_asyncToGenerator(function*(e){return JSON.parse(yield C(e))});return function readJSON(r){return e.apply(this,arguments)}}();function transformMediaList(e,r){let t=e.nodes.length-1;while(t>=0){const n=transformMedia(e.nodes[t],r);if(n.length){e.nodes.splice(t,1,...n)}--t}return e}function transformMedia(e,r){const t=[];for(const u in e.nodes){const f=e.nodes[u],c=f.value,l=f.nodes;const p=c.replace(S,"$1");if(p in r){var n=true;var i=false;var o=undefined;try{for(var s=r[p].nodes[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){const n=a.value;const i=e.modifier!==n.modifier?e.modifier||n.modifier:"";const o=e.clone({modifier:i,raws:!i||e.modifier?_objectSpread({},e.raws):_objectSpread({},n.raws),type:e.type||n.type});if(o.type===n.type){Object.assign(o.raws,{and:n.raws.and,beforeAnd:n.raws.beforeAnd,beforeExpression:n.raws.beforeExpression})}o.nodes.splice(u,1,...n.clone().nodes.map(r=>{if(e.nodes[u].raws.and){r.raws=_objectSpread({},e.nodes[u].raws)}r.spaces=_objectSpread({},e.nodes[u].spaces);return r}));const s=O(r,p);const f=transformMedia(o,s);if(f.length){t.push(...f)}else{t.push(o)}}}catch(e){i=true;o=e}finally{try{if(!n&&s.return!=null){s.return()}}finally{if(i){throw o}}}return t}else if(l&&l.length){transformMediaList(e.nodes[u],r)}}return t}const S=/\((--[A-z][\w-]*)\)/;const O=(e,r)=>{const t=Object.assign({},e);delete t[r];return t};var T=(e,r,t)=>{e.walkAtRules(E,e=>{if(k.test(e.params)){const n=d(e.params);const i=String(transformMediaList(n,r));if(t.preserve){e.cloneBefore({params:i})}else{e.params=i}}})};const E=/^media$/i;const k=/\(--[A-z][\w-]*\)/;function writeCustomMediaToCssFile(e,r){return _writeCustomMediaToCssFile.apply(this,arguments)}function _writeCustomMediaToCssFile(){_writeCustomMediaToCssFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`@custom-media ${t} ${r[t]};`);return e},[]).join("\n");const n=`${t}\n`;yield D(e,n)});return _writeCustomMediaToCssFile.apply(this,arguments)}function writeCustomMediaToJsonFile(e,r){return _writeCustomMediaToJsonFile.apply(this,arguments)}function _writeCustomMediaToJsonFile(){_writeCustomMediaToJsonFile=_asyncToGenerator(function*(e,r){const t=JSON.stringify({"custom-media":r},null," ");const n=`${t}\n`;yield D(e,n)});return _writeCustomMediaToJsonFile.apply(this,arguments)}function writeCustomMediaToCjsFile(e,r){return _writeCustomMediaToCjsFile.apply(this,arguments)}function _writeCustomMediaToCjsFile(){_writeCustomMediaToCjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t\t'${A(t)}': '${A(r[t])}'`);return e},[]).join(",\n");const n=`module.exports = {\n\tcustomMedia: {\n${t}\n\t}\n};\n`;yield D(e,n)});return _writeCustomMediaToCjsFile.apply(this,arguments)}function writeCustomMediaToMjsFile(e,r){return _writeCustomMediaToMjsFile.apply(this,arguments)}function _writeCustomMediaToMjsFile(){_writeCustomMediaToMjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t'${A(t)}': '${A(r[t])}'`);return e},[]).join(",\n");const n=`export const customMedia = {\n${t}\n};\n`;yield D(e,n)});return _writeCustomMediaToMjsFile.apply(this,arguments)}function writeCustomMediaToExports(e,r){return Promise.all(r.map(function(){var r=_asyncToGenerator(function*(r){if(r instanceof Function){yield r(P(e))}else{const t=r===Object(r)?r:{to:String(r)};const n=t.toJSON||P;if("customMedia"in t){t.customMedia=n(e)}else if("custom-media"in t){t["custom-media"]=n(e)}else{const r=String(t.to||"");const i=(t.type||o.extname(r).slice(1)).toLowerCase();const s=n(e);if(i==="css"){yield writeCustomMediaToCssFile(r,s)}if(i==="js"){yield writeCustomMediaToCjsFile(r,s)}if(i==="json"){yield writeCustomMediaToJsonFile(r,s)}if(i==="mjs"){yield writeCustomMediaToMjsFile(r,s)}}}});return function(e){return r.apply(this,arguments)}}()))}const P=e=>{return Object.keys(e).reduce((r,t)=>{r[t]=String(e[t]);return r},{})};const D=(e,r)=>new Promise((t,n)=>{i.writeFile(e,r,e=>{if(e){n(e)}else{t()}})});const A=e=>e.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\n/g,"\\n").replace(/\r/g,"\\r");var R=n.plugin("postcss-custom-media",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):false;const t=[].concat(Object(e).importFrom||[]);const n=[].concat(Object(e).exportTo||[]);const i=getCustomMediaFromSources(t);return function(){var e=_asyncToGenerator(function*(e){const t=Object.assign(yield i,b(e,{preserve:r}));yield writeCustomMediaToExports(t,n);T(e,t,{preserve:r})});return function(r){return e.apply(this,arguments)}}()});e.exports=R},8713:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=_interopDefault(t(5747));var s=_interopDefault(t(5622));function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}function parse(e){return i(e).parse()}function isBlockIgnored(e){var r=e.selector?e:e.parent;return/(!\s*)?postcss-custom-properties:\s*off\b/i.test(r.toString())}function isRuleIgnored(e){var r=e.prev();return Boolean(isBlockIgnored(e)||r&&r.type==="comment"&&/(!\s*)?postcss-custom-properties:\s*ignore\s+next\b/i.test(r.text))}function getCustomPropertiesFromRoot(e,r){const t={};const n={};e.nodes.slice().forEach(e=>{const i=c(e)?t:l(e)?n:null;if(i){e.nodes.slice().forEach(e=>{if(p(e)&&!isBlockIgnored(e)){const t=e.prop;i[t]=parse(e.value).nodes;if(!r.preserve){e.remove()}}});if(!r.preserve&&h(e)&&!isBlockIgnored(e)){e.remove()}}});return Object.assign({},t,n)}const a=/^html$/i;const u=/^:root$/i;const f=/^--[A-z][\w-]*$/;const c=e=>e.type==="rule"&&a.test(e.selector)&&Object(e.nodes).length;const l=e=>e.type==="rule"&&u.test(e.selector)&&Object(e.nodes).length;const p=e=>e.type==="decl"&&f.test(e.prop);const h=e=>Object(e.nodes).length===0;function getCustomPropertiesFromCSSFile(e){return _getCustomPropertiesFromCSSFile.apply(this,arguments)}function _getCustomPropertiesFromCSSFile(){_getCustomPropertiesFromCSSFile=_asyncToGenerator(function*(e){const r=yield B(e);const t=n.parse(r,{from:e});return getCustomPropertiesFromRoot(t,{preserve:true})});return _getCustomPropertiesFromCSSFile.apply(this,arguments)}function getCustomPropertiesFromObject(e){const r=Object.assign({},Object(e).customProperties,Object(e)["custom-properties"]);for(const e in r){r[e]=parse(String(r[e])).nodes}return r}function getCustomPropertiesFromJSONFile(e){return _getCustomPropertiesFromJSONFile.apply(this,arguments)}function _getCustomPropertiesFromJSONFile(){_getCustomPropertiesFromJSONFile=_asyncToGenerator(function*(e){const r=yield v(e);return getCustomPropertiesFromObject(r)});return _getCustomPropertiesFromJSONFile.apply(this,arguments)}function getCustomPropertiesFromJSFile(e){return _getCustomPropertiesFromJSFile.apply(this,arguments)}function _getCustomPropertiesFromJSFile(){_getCustomPropertiesFromJSFile=_asyncToGenerator(function*(e){const r=yield Promise.resolve(require(e));return getCustomPropertiesFromObject(r)});return _getCustomPropertiesFromJSFile.apply(this,arguments)}function getCustomPropertiesFromImports(e){return e.map(e=>{if(e instanceof Promise){return e}else if(e instanceof Function){return e()}const r=e===Object(e)?e:{from:String(e)};if(r.customProperties||r["custom-properties"]){return r}const t=s.resolve(String(r.from||""));const n=(r.type||s.extname(t).slice(1)).toLowerCase();return{type:n,from:t}}).reduce(function(){var e=_asyncToGenerator(function*(e,r){const t=yield r,n=t.type,i=t.from;if(n==="css"){return Object.assign(yield e,yield getCustomPropertiesFromCSSFile(i))}if(n==="js"){return Object.assign(yield e,yield getCustomPropertiesFromJSFile(i))}if(n==="json"){return Object.assign(yield e,yield getCustomPropertiesFromJSONFile(i))}return Object.assign(yield e,yield getCustomPropertiesFromObject(yield r))});return function(r,t){return e.apply(this,arguments)}}(),{})}const B=e=>new Promise((r,t)=>{o.readFile(e,"utf8",(e,n)=>{if(e){t(e)}else{r(n)}})});const v=function(){var e=_asyncToGenerator(function*(e){return JSON.parse(yield B(e))});return function readJSON(r){return e.apply(this,arguments)}}();function transformValueAST(e,r){if(e.nodes&&e.nodes.length){e.nodes.slice().forEach(t=>{if(b(t)){const n=t.nodes.slice(1,-1),i=n[0],o=n[1],s=n.slice(2);const a=i.value;if(a in Object(r)){const e=y(r[a],t.raws.before);t.replaceWith(...e);retransformValueAST({nodes:e},r,a)}else if(s.length){const n=e.nodes.indexOf(t);if(n!==-1){e.nodes.splice(n,1,...y(s,t.raws.before))}transformValueAST(e,r)}}else{transformValueAST(t,r)}})}return e}function retransformValueAST(e,r,t){const n=Object.assign({},r);delete n[t];return transformValueAST(e,n)}const d=/^var$/i;const b=e=>e.type==="func"&&d.test(e.value)&&Object(e.nodes).length>0;const y=(e,r)=>{const t=g(e,null);if(t[0]){t[0].raws.before=r}return t};const g=(e,r)=>e.map(e=>m(e,r));const m=(e,r)=>{const t=new e.constructor(e);for(const n in e){if(n==="parent"){t.parent=r}else if(Object(e[n]).constructor===Array){t[n]=g(e.nodes,t)}else if(Object(e[n]).constructor===Object){t[n]=Object.assign({},e[n])}}return t};var C=(e,r,t)=>{e.walkDecls(e=>{if(O(e)&&!isRuleIgnored(e)){const n=e.value;const i=parse(n);const o=String(transformValueAST(i,r));if(o!==n){if(t.preserve){e.cloneBefore({value:o})}else{e.value=o}}}})};const w=/^--[A-z][\w-]*$/;const S=/(^|[^\w-])var\([\W\w]+\)/;const O=e=>!w.test(e.prop)&&S.test(e.value);function writeCustomPropertiesToCssFile(e,r){return _writeCustomPropertiesToCssFile.apply(this,arguments)}function _writeCustomPropertiesToCssFile(){_writeCustomPropertiesToCssFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t${t}: ${r[t]};`);return e},[]).join("\n");const n=`:root {\n${t}\n}\n`;yield E(e,n)});return _writeCustomPropertiesToCssFile.apply(this,arguments)}function writeCustomPropertiesToJsonFile(e,r){return _writeCustomPropertiesToJsonFile.apply(this,arguments)}function _writeCustomPropertiesToJsonFile(){_writeCustomPropertiesToJsonFile=_asyncToGenerator(function*(e,r){const t=JSON.stringify({"custom-properties":r},null," ");const n=`${t}\n`;yield E(e,n)});return _writeCustomPropertiesToJsonFile.apply(this,arguments)}function writeCustomPropertiesToCjsFile(e,r){return _writeCustomPropertiesToCjsFile.apply(this,arguments)}function _writeCustomPropertiesToCjsFile(){_writeCustomPropertiesToCjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t\t'${k(t)}': '${k(r[t])}'`);return e},[]).join(",\n");const n=`module.exports = {\n\tcustomProperties: {\n${t}\n\t}\n};\n`;yield E(e,n)});return _writeCustomPropertiesToCjsFile.apply(this,arguments)}function writeCustomPropertiesToMjsFile(e,r){return _writeCustomPropertiesToMjsFile.apply(this,arguments)}function _writeCustomPropertiesToMjsFile(){_writeCustomPropertiesToMjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t'${k(t)}': '${k(r[t])}'`);return e},[]).join(",\n");const n=`export const customProperties = {\n${t}\n};\n`;yield E(e,n)});return _writeCustomPropertiesToMjsFile.apply(this,arguments)}function writeCustomPropertiesToExports(e,r){return Promise.all(r.map(function(){var r=_asyncToGenerator(function*(r){if(r instanceof Function){yield r(T(e))}else{const t=r===Object(r)?r:{to:String(r)};const n=t.toJSON||T;if("customProperties"in t){t.customProperties=n(e)}else if("custom-properties"in t){t["custom-properties"]=n(e)}else{const r=String(t.to||"");const i=(t.type||s.extname(t.to).slice(1)).toLowerCase();const o=n(e);if(i==="css"){yield writeCustomPropertiesToCssFile(r,o)}if(i==="js"){yield writeCustomPropertiesToCjsFile(r,o)}if(i==="json"){yield writeCustomPropertiesToJsonFile(r,o)}if(i==="mjs"){yield writeCustomPropertiesToMjsFile(r,o)}}}});return function(e){return r.apply(this,arguments)}}()))}const T=e=>{return Object.keys(e).reduce((r,t)=>{r[t]=String(e[t]);return r},{})};const E=(e,r)=>new Promise((t,n)=>{o.writeFile(e,r,e=>{if(e){n(e)}else{t()}})});const k=e=>e.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\n/g,"\\n").replace(/\r/g,"\\r");var P=n.plugin("postcss-custom-properties",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;const t=[].concat(Object(e).importFrom||[]);const n=[].concat(Object(e).exportTo||[]);const i=getCustomPropertiesFromImports(t);const o=e=>{const t=getCustomPropertiesFromRoot(e,{preserve:r});C(e,t,{preserve:r})};const s=function(){var e=_asyncToGenerator(function*(e){const t=Object.assign({},yield i,getCustomPropertiesFromRoot(e,{preserve:r}));yield writeCustomPropertiesToExports(t,n);C(e,t,{preserve:r})});return function asyncTransform(r){return e.apply(this,arguments)}}();const a=t.length===0&&n.length===0;return a?o:s});e.exports=P},8758:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(2152));var i=_interopDefault(t(5747));var o=_interopDefault(t(5622));var s=_interopDefault(t(4633));function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}function _defineProperty(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function _objectSpread(e){for(var r=1;r{let r;n(e=>{r=e}).processSync(e);return r};var u=(e,r)=>{const t={};e.nodes.slice().forEach(e=>{if(l(e)){const n=e.params.match(c),i=_slicedToArray(n,3),o=i[1],s=i[2];t[o]=a(s);if(!Object(r).preserve){e.remove()}}});return t};const f=/^custom-selector$/i;const c=/^(:--[A-z][\w-]*)\s+([\W\w]+)\s*$/;const l=e=>e.type==="atrule"&&f.test(e.name)&&c.test(e.params);function transformSelectorList(e,r){let t=e.nodes.length-1;while(t>=0){const n=transformSelector(e.nodes[t],r);if(n.length){e.nodes.splice(t,1,...n)}--t}return e}function transformSelector(e,r){const t=[];for(const u in e.nodes){const f=e.nodes[u],c=f.value,l=f.nodes;if(c in r){var n=true;var i=false;var o=undefined;try{for(var s=r[c].nodes[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){const n=a.value;const i=e.clone();i.nodes.splice(u,1,...n.clone().nodes.map(r=>{r.spaces=_objectSpread({},e.nodes[u].spaces);return r}));const o=transformSelector(i,r);d(i.nodes,Number(u));if(o.length){t.push(...o)}else{t.push(i)}}}catch(e){i=true;o=e}finally{try{if(!n&&s.return!=null){s.return()}}finally{if(i){throw o}}}return t}else if(l&&l.length){transformSelectorList(e.nodes[u],r)}}return t}const p=/^(tag|universal)$/;const h=/^(class|id|pseudo|tag|universal)$/;const B=e=>p.test(Object(e).type);const v=e=>h.test(Object(e).type);const d=(e,r)=>{if(r&&B(e[r])&&v(e[r-1])){let t=r-1;while(t&&v(e[t])){--t}if(t{e.walkRules(y,e=>{const i=n(e=>{transformSelectorList(e,r,t)}).processSync(e.selector);if(t.preserve){e.cloneBefore({selector:i})}else{e.selector=i}})};const y=/:--[A-z][\w-]*/;function importCustomSelectorsFromCSSAST(e){return u(e)}function importCustomSelectorsFromCSSFile(e){return _importCustomSelectorsFromCSSFile.apply(this,arguments)}function _importCustomSelectorsFromCSSFile(){_importCustomSelectorsFromCSSFile=_asyncToGenerator(function*(e){const r=yield g(o.resolve(e));const t=s.parse(r,{from:o.resolve(e)});return importCustomSelectorsFromCSSAST(t)});return _importCustomSelectorsFromCSSFile.apply(this,arguments)}function importCustomSelectorsFromObject(e){const r=Object.assign({},Object(e).customSelectors||Object(e)["custom-selectors"]);for(const e in r){r[e]=a(r[e])}return r}function importCustomSelectorsFromJSONFile(e){return _importCustomSelectorsFromJSONFile.apply(this,arguments)}function _importCustomSelectorsFromJSONFile(){_importCustomSelectorsFromJSONFile=_asyncToGenerator(function*(e){const r=yield m(o.resolve(e));return importCustomSelectorsFromObject(r)});return _importCustomSelectorsFromJSONFile.apply(this,arguments)}function importCustomSelectorsFromJSFile(e){return _importCustomSelectorsFromJSFile.apply(this,arguments)}function _importCustomSelectorsFromJSFile(){_importCustomSelectorsFromJSFile=_asyncToGenerator(function*(e){const r=yield Promise.resolve(require(o.resolve(e)));return importCustomSelectorsFromObject(r)});return _importCustomSelectorsFromJSFile.apply(this,arguments)}function importCustomSelectorsFromSources(e){return e.map(e=>{if(e instanceof Promise){return e}else if(e instanceof Function){return e()}const r=e===Object(e)?e:{from:String(e)};if(Object(r).customSelectors||Object(r)["custom-selectors"]){return r}const t=String(r.from||"");const n=(r.type||o.extname(t).slice(1)).toLowerCase();return{type:n,from:t}}).reduce(function(){var e=_asyncToGenerator(function*(e,r){const t=yield r,n=t.type,i=t.from;if(n==="ast"){return Object.assign(e,importCustomSelectorsFromCSSAST(i))}if(n==="css"){return Object.assign(e,yield importCustomSelectorsFromCSSFile(i))}if(n==="js"){return Object.assign(e,yield importCustomSelectorsFromJSFile(i))}if(n==="json"){return Object.assign(e,yield importCustomSelectorsFromJSONFile(i))}return Object.assign(e,importCustomSelectorsFromObject(yield r))});return function(r,t){return e.apply(this,arguments)}}(),{})}const g=e=>new Promise((r,t)=>{i.readFile(e,"utf8",(e,n)=>{if(e){t(e)}else{r(n)}})});const m=function(){var e=_asyncToGenerator(function*(e){return JSON.parse(yield g(e))});return function readJSON(r){return e.apply(this,arguments)}}();function exportCustomSelectorsToCssFile(e,r){return _exportCustomSelectorsToCssFile.apply(this,arguments)}function _exportCustomSelectorsToCssFile(){_exportCustomSelectorsToCssFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`@custom-selector ${t} ${r[t]};`);return e},[]).join("\n");const n=`${t}\n`;yield w(e,n)});return _exportCustomSelectorsToCssFile.apply(this,arguments)}function exportCustomSelectorsToJsonFile(e,r){return _exportCustomSelectorsToJsonFile.apply(this,arguments)}function _exportCustomSelectorsToJsonFile(){_exportCustomSelectorsToJsonFile=_asyncToGenerator(function*(e,r){const t=JSON.stringify({"custom-selectors":r},null," ");const n=`${t}\n`;yield w(e,n)});return _exportCustomSelectorsToJsonFile.apply(this,arguments)}function exportCustomSelectorsToCjsFile(e,r){return _exportCustomSelectorsToCjsFile.apply(this,arguments)}function _exportCustomSelectorsToCjsFile(){_exportCustomSelectorsToCjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t\t'${S(t)}': '${S(r[t])}'`);return e},[]).join(",\n");const n=`module.exports = {\n\tcustomSelectors: {\n${t}\n\t}\n};\n`;yield w(e,n)});return _exportCustomSelectorsToCjsFile.apply(this,arguments)}function exportCustomSelectorsToMjsFile(e,r){return _exportCustomSelectorsToMjsFile.apply(this,arguments)}function _exportCustomSelectorsToMjsFile(){_exportCustomSelectorsToMjsFile=_asyncToGenerator(function*(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t'${S(t)}': '${S(r[t])}'`);return e},[]).join(",\n");const n=`export const customSelectors = {\n${t}\n};\n`;yield w(e,n)});return _exportCustomSelectorsToMjsFile.apply(this,arguments)}function exportCustomSelectorsToDestinations(e,r){return Promise.all(r.map(function(){var r=_asyncToGenerator(function*(r){if(r instanceof Function){yield r(C(e))}else{const t=r===Object(r)?r:{to:String(r)};const n=t.toJSON||C;if("customSelectors"in t){t.customSelectors=n(e)}else if("custom-selectors"in t){t["custom-selectors"]=n(e)}else{const r=String(t.to||"");const i=(t.type||o.extname(t.to).slice(1)).toLowerCase();const s=n(e);if(i==="css"){yield exportCustomSelectorsToCssFile(r,s)}if(i==="js"){yield exportCustomSelectorsToCjsFile(r,s)}if(i==="json"){yield exportCustomSelectorsToJsonFile(r,s)}if(i==="mjs"){yield exportCustomSelectorsToMjsFile(r,s)}}}});return function(e){return r.apply(this,arguments)}}()))}const C=e=>{return Object.keys(e).reduce((r,t)=>{r[t]=String(e[t]);return r},{})};const w=(e,r)=>new Promise((t,n)=>{i.writeFile(e,r,e=>{if(e){n(e)}else{t()}})});const S=e=>e.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\n/g,"\\n").replace(/\r/g,"\\r");var O=s.plugin("postcss-custom-selectors",e=>{const r=Boolean(Object(e).preserve);const t=[].concat(Object(e).importFrom||[]);const n=[].concat(Object(e).exportTo||[]);const i=importCustomSelectorsFromSources(t);return function(){var e=_asyncToGenerator(function*(e){const t=Object.assign(yield i,u(e,{preserve:r}));yield exportCustomSelectorsToDestinations(t,n);b(e,t,{preserve:r})});return function(r){return e.apply(this,arguments)}}()});e.exports=O},666:e=>{"use strict";var r={};var t=r.hasOwnProperty;var n=function merge(e,r){if(!e){return r}var n={};for(var i in r){n[i]=t.call(e,i)?e[i]:r[i]}return n};var i=/[ -,\.\/;-@\[-\^`\{-~]/;var o=/[ -,\.\/;-@\[\]\^`\{-~]/;var s=/['"\\]/;var a=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var u=function cssesc(e,r){r=n(r,cssesc.options);if(r.quotes!="single"&&r.quotes!="double"){r.quotes="single"}var t=r.quotes=="double"?'"':"'";var s=r.isIdentifier;var u=e.charAt(0);var f="";var c=0;var l=e.length;while(c126){if(h>=55296&&h<=56319&&c{"use strict";r.__esModule=true;var n=t(7291);var i=_interopRequireDefault(n);var o=t(2341);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=function parser(e){return new i.default(e)};Object.assign(a,s);delete a.__esModule;r.default=a;e.exports=r["default"]},1387:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parser);this.rule=e;this.options=Object.assign({lossy:false,safe:false},r);this.position=0;this.css=typeof this.rule==="string"?this.rule:this.rule.selector;this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var t=getTokenSourceSpan(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new p.default({source:t});this.root.errorGenerator=this._errorGenerator();var n=new B.default({source:{start:{line:1,column:1}}});this.root.append(n);this.current=n;this.loop()}Parser.prototype._errorGenerator=function _errorGenerator(){var e=this;return function(r,t){if(typeof e.rule==="string"){return new Error(r)}return e.rule.error(r,t)}};Parser.prototype.attribute=function attribute(){var e=[];var r=this.currToken;this.position++;while(this.position1&&arguments[1]!==undefined?arguments[1]:false;var n="";var i="";e.forEach(function(e){var o=r.lossySpace(e.spaces.before,t);var s=r.lossySpace(e.rawSpaceBefore,t);n+=o+r.lossySpace(e.spaces.after,t&&o.length===0);i+=o+e.value+r.lossySpace(e.rawSpaceAfter,t&&s.length===0)});if(i===n){i=undefined}var o={space:n,rawSpace:i};return o};Parser.prototype.isNamedCombinator=function isNamedCombinator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position;return this.tokens[e+0]&&this.tokens[e+0][N.FIELDS.TYPE]===q.slash&&this.tokens[e+1]&&this.tokens[e+1][N.FIELDS.TYPE]===q.word&&this.tokens[e+2]&&this.tokens[e+2][N.FIELDS.TYPE]===q.slash};Parser.prototype.namedCombinator=function namedCombinator(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]);var r=(0,U.unesc)(e).toLowerCase();var t={};if(r!==e){t.value="/"+e+"/"}var n=new F.default({value:"/"+r+"/",source:getSource(this.currToken[N.FIELDS.START_LINE],this.currToken[N.FIELDS.START_COL],this.tokens[this.position+2][N.FIELDS.END_LINE],this.tokens[this.position+2][N.FIELDS.END_COL]),sourceIndex:this.currToken[N.FIELDS.START_POS],raws:t});this.position=this.position+3;return n}else{this.unexpected()}};Parser.prototype.combinator=function combinator(){var e=this;if(this.content()==="|"){return this.namespace()}var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][N.FIELDS.TYPE]===q.comma){var t=this.parseWhitespaceEquivalentTokens(r);if(t.length>0){var n=this.current.last;if(n){var i=this.convertWhitespaceNodesToSpace(t),o=i.space,s=i.rawSpace;if(s!==undefined){n.rawSpaceAfter+=s}n.spaces.after+=o}else{t.forEach(function(r){return e.newNode(r)})}}return}var a=this.currToken;var u=undefined;if(r>this.position){u=this.parseWhitespaceEquivalentTokens(r)}var f=void 0;if(this.isNamedCombinator()){f=this.namedCombinator()}else if(this.currToken[N.FIELDS.TYPE]===q.combinator){f=new F.default({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[N.FIELDS.START_POS]});this.position++}else if(H[this.currToken[N.FIELDS.TYPE]]){}else if(!u){this.unexpected()}if(f){if(u){var c=this.convertWhitespaceNodesToSpace(u),l=c.space,p=c.rawSpace;f.spaces.before=l;f.rawSpaceBefore=p}}else{var h=this.convertWhitespaceNodesToSpace(u,true),B=h.space,v=h.rawSpace;if(!v){v=B}var d={};var b={spaces:{}};if(B.endsWith(" ")&&v.endsWith(" ")){d.before=B.slice(0,B.length-1);b.spaces.before=v.slice(0,v.length-1)}else if(B.startsWith(" ")&&v.startsWith(" ")){d.after=B.slice(1);b.spaces.after=v.slice(1)}else{b.value=v}f=new F.default({value:" ",source:getTokenSourceSpan(a,this.tokens[this.position-1]),sourceIndex:a[N.FIELDS.START_POS],spaces:d,raws:b})}if(this.currToken&&this.currToken[N.FIELDS.TYPE]===q.space){f.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(f)};Parser.prototype.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var e=new B.default({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(e);this.current=e;this.position++};Parser.prototype.comment=function comment(){var e=this.currToken;this.newNode(new y.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.error=function error(e,r){throw this.root.error(e,r)};Parser.prototype.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[N.FIELDS.START_POS]})};Parser.prototype.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[N.FIELDS.START_POS])};Parser.prototype.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[N.FIELDS.START_POS])};Parser.prototype.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[N.FIELDS.START_POS])};Parser.prototype.namespace=function namespace(){var e=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[N.FIELDS.TYPE]===q.word){this.position++;return this.word(e)}else if(this.nextToken[N.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(e)}};Parser.prototype.nesting=function nesting(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var r=this.currToken;this.newNode(new j.default({value:this.content(),source:getTokenSource(r),sourceIndex:r[N.FIELDS.START_POS]}));this.position++};Parser.prototype.parentheses=function parentheses(){var e=this.current.last;var r=1;this.position++;if(e&&e.type===J.PSEUDO){var t=new B.default({source:{start:tokenStart(this.tokens[this.position-1])}});var n=this.current;e.append(t);this.current=t;while(this.position1&&e.nextToken&&e.nextToken[N.FIELDS.TYPE]===q.openParenthesis){e.error("Misplaced parenthesis.",{index:e.nextToken[N.FIELDS.START_POS]})}})}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[N.FIELDS.START_POS])}};Parser.prototype.space=function space(){var e=this.content();if(this.position===0||this.prevToken[N.FIELDS.TYPE]===q.comma||this.prevToken[N.FIELDS.TYPE]===q.openParenthesis){this.spaces=this.optionalSpace(e);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[N.FIELDS.TYPE]===q.comma||this.nextToken[N.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(e);this.position++}else{this.combinator()}};Parser.prototype.string=function string(){var e=this.currToken;this.newNode(new O.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.universal=function universal(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}var t=this.currToken;this.newNode(new A.default({value:this.content(),source:getTokenSource(t),sourceIndex:t[N.FIELDS.START_POS]}),e);this.position++};Parser.prototype.splitWord=function splitWord(e,r){var t=this;var n=this.nextToken;var i=this.content();while(n&&~[q.dollar,q.caret,q.equals,q.word].indexOf(n[N.FIELDS.TYPE])){this.position++;var o=this.content();i+=o;if(o.lastIndexOf("\\")===o.length-1){var s=this.nextToken;if(s&&s[N.FIELDS.TYPE]===q.space){i+=this.requiredSpace(this.content(s));this.position++}}n=this.nextToken}var a=(0,u.default)(i,".").filter(function(e){return i[e-1]!=="\\"});var f=(0,u.default)(i,"#");var l=(0,u.default)(i,"#{");if(l.length){f=f.filter(function(e){return!~l.indexOf(e)})}var p=(0,M.default)((0,c.default)([0].concat(a,f)));p.forEach(function(n,o){var s=p[o+1]||i.length;var u=i.slice(n,s);if(o===0&&r){return r.call(t,u,p.length)}var c=void 0;var l=t.currToken;var h=l[N.FIELDS.START_POS]+p[o];var B=getSource(l[1],l[2]+n,l[3],l[2]+(s-1));if(~a.indexOf(n)){var v={value:u.slice(1),source:B,sourceIndex:h};c=new d.default(unescapeProp(v,"value"))}else if(~f.indexOf(n)){var b={value:u.slice(1),source:B,sourceIndex:h};c=new m.default(unescapeProp(b,"value"))}else{var y={value:u,source:B,sourceIndex:h};unescapeProp(y,"value");c=new w.default(y)}t.newNode(c,e);e=null});this.position++};Parser.prototype.word=function word(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}return this.splitWord(e)};Parser.prototype.loop=function loop(){while(this.position0&&arguments[0]!==undefined?arguments[0]:this.currToken;return this.css.slice(e[N.FIELDS.START_POS],e[N.FIELDS.END_POS])};Parser.prototype.locateNextMeaningfulToken=function locateNextMeaningfulToken(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position+1;var r=e;while(r{"use strict";r.__esModule=true;var n=t(1387);var i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=function(){function Processor(e,r){_classCallCheck(this,Processor);this.func=e||function noop(){};this.funcRes=null;this.options=r}Processor.prototype._shouldUpdateSelector=function _shouldUpdateSelector(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=Object.assign({},this.options,r);if(t.updateSelector===false){return false}else{return typeof e!=="string"}};Processor.prototype._isLossy=function _isLossy(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=Object.assign({},this.options,e);if(r.lossless===false){return true}else{return false}};Processor.prototype._root=function _root(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=new i.default(e,this._parseOptions(r));return t.root};Processor.prototype._parseOptions=function _parseOptions(e){return{lossy:this._isLossy(e)}};Processor.prototype._run=function _run(e){var r=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new Promise(function(n,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(n){var i=undefined;if(r._shouldUpdateSelector(e,t)){i=o.toString();e.selector=i}return{transform:n,root:o,string:i}}).then(n,i)}catch(e){i(e);return}})};Processor.prototype._runSync=function _runSync(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=this._root(e,r);var n=this.func(t);if(n&&typeof n.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var i=undefined;if(r.updateSelector&&typeof e!=="string"){i=t.toString();e.selector=i}return{transform:n,root:t,string:i}};Processor.prototype.ast=function ast(e,r){return this._run(e,r).then(function(e){return e.root})};Processor.prototype.astSync=function astSync(e,r){return this._runSync(e,r).root};Processor.prototype.transform=function transform(e,r){return this._run(e,r).then(function(e){return e.transform})};Processor.prototype.transformSync=function transformSync(e,r){return this._runSync(e,r).transform};Processor.prototype.process=function process(e,r){return this._run(e,r).then(function(e){return e.string||e.root.toString()})};Processor.prototype.processSync=function processSync(e,r){var t=this._runSync(e,r);return t.string||t.root.toString()};return Processor}();r.default=o;e.exports=r["default"]},3982:(e,r,t)=>{"use strict";r.__esModule=true;var n;var i=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Attribute);var t=_possibleConstructorReturn(this,e.call(this,handleDeprecatedContructorOpts(r)));t.type=l.ATTRIBUTE;t.raws=t.raws||{};Object.defineProperty(t.raws,"unquoted",{get:h(function(){return t.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:h(function(){return t.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")});t._constructed=true;return t}Attribute.prototype.getQuotedValue=function getQuotedValue(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=this._determineQuoteMark(e);var t=g[r];var n=(0,s.default)(this._value,t);return n};Attribute.prototype._determineQuoteMark=function _determineQuoteMark(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)};Attribute.prototype.setValue=function setValue(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this._value=e;this._quoteMark=this._determineQuoteMark(r);this._syncRawValue()};Attribute.prototype.smartQuoteMark=function smartQuoteMark(e){var r=this.value;var t=r.replace(/[^']/g,"").length;var n=r.replace(/[^"]/g,"").length;if(t+n===0){var i=(0,s.default)(r,{isIdentifier:true});if(i===r){return Attribute.NO_QUOTE}else{var o=this.preferredQuoteMark(e);if(o===Attribute.NO_QUOTE){var a=this.quoteMark||e.quoteMark||Attribute.DOUBLE_QUOTE;var u=g[a];var f=(0,s.default)(r,u);if(f.length1&&arguments[1]!==undefined?arguments[1]:e;var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:defaultAttrConcat;var n=this._spacesFor(r);return t(this.stringifyProperty(e),n)};Attribute.prototype.offsetOf=function offsetOf(e){var r=1;var t=this._spacesFor("attribute");r+=t.before.length;if(e==="namespace"||e==="ns"){return this.namespace?r:-1}if(e==="attributeNS"){return r}r+=this.namespaceString.length;if(this.namespace){r+=1}if(e==="attribute"){return r}r+=this.stringifyProperty("attribute").length;r+=t.after.length;var n=this._spacesFor("operator");r+=n.before.length;var i=this.stringifyProperty("operator");if(e==="operator"){return i?r:-1}r+=i.length;r+=n.after.length;var o=this._spacesFor("value");r+=o.before.length;var s=this.stringifyProperty("value");if(e==="value"){return s?r:-1}r+=s.length;r+=o.after.length;var a=this._spacesFor("insensitive");r+=a.before.length;if(e==="insensitive"){return this.insensitive?r:-1}return-1};Attribute.prototype.toString=function toString(){var e=this;var r=[this.rawSpaceBefore,"["];r.push(this._stringFor("qualifiedAttribute","attribute"));if(this.operator&&this.value){r.push(this._stringFor("operator"));r.push(this._stringFor("value"));r.push(this._stringFor("insensitiveFlag","insensitive",function(r,t){if(r.length>0&&!e.quoted&&t.before.length===0&&!(e.spaces.value&&e.spaces.value.after)){t.before=" "}return defaultAttrConcat(r,t)}))}r.push("]");r.push(this.rawSpaceAfter);return r.join("")};i(Attribute,[{key:"quoted",get:function get(){var e=this.quoteMark;return e==="'"||e==='"'},set:function set(e){d()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(e){if(!this._constructed){this._quoteMark=e;return}if(this._quoteMark!==e){this._quoteMark=e;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(e){if(this._constructed){var r=unescapeValue(e),t=r.deprecatedUsage,n=r.unescaped,i=r.quoteMark;if(t){v()}if(n===this._value&&i===this._quoteMark){return}this._value=n;this._quoteMark=i;this._syncRawValue()}else{this._value=e}}},{key:"attribute",get:function get(){return this._attribute},set:function set(e){this._handleEscapes("attribute",e);this._attribute=e}}]);return Attribute}(c.default);y.NO_QUOTE=null;y.SINGLE_QUOTE="'";y.DOUBLE_QUOTE='"';r.default=y;var g=(n={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},n[null]={isIdentifier:true},n);function defaultAttrConcat(e,r){return""+r.before+e+r.after}},3687:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(917);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Combinator,e);function Combinator(r){_classCallCheck(this,Combinator);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMBINATOR;return t}return Combinator}(i.default);r.default=s;e.exports=r["default"]},9211:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(917);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Comment,e);function Comment(r){_classCallCheck(this,Comment);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMMENT;return t}return Comment}(i.default);r.default=s;e.exports=r["default"]},5420:(e,r,t)=>{"use strict";r.__esModule=true;r.universal=r.tag=r.string=r.selector=r.root=r.pseudo=r.nesting=r.id=r.comment=r.combinator=r.className=r.attribute=undefined;var n=t(3982);var i=_interopRequireDefault(n);var o=t(3687);var s=_interopRequireDefault(o);var a=t(4274);var u=_interopRequireDefault(a);var f=t(9211);var c=_interopRequireDefault(f);var l=t(7732);var p=_interopRequireDefault(l);var h=t(3589);var B=_interopRequireDefault(h);var v=t(1692);var d=_interopRequireDefault(v);var b=t(6522);var y=_interopRequireDefault(b);var g=t(3390);var m=_interopRequireDefault(g);var C=t(1989);var w=_interopRequireDefault(C);var S=t(5535);var O=_interopRequireDefault(S);var T=t(9479);var E=_interopRequireDefault(T);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var k=r.attribute=function attribute(e){return new i.default(e)};var P=r.className=function className(e){return new s.default(e)};var D=r.combinator=function combinator(e){return new u.default(e)};var A=r.comment=function comment(e){return new c.default(e)};var R=r.id=function id(e){return new p.default(e)};var F=r.nesting=function nesting(e){return new B.default(e)};var x=r.pseudo=function pseudo(e){return new d.default(e)};var j=r.root=function root(e){return new y.default(e)};var I=r.selector=function selector(e){return new m.default(e)};var M=r.string=function string(e){return new w.default(e)};var N=r.tag=function tag(e){return new O.default(e)};var _=r.universal=function universal(e){return new E.default(e)}},8541:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t=e){this.indexes[t]=r-1}}return this};Container.prototype.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};Container.prototype.empty=function empty(){return this.removeAll()};Container.prototype.insertAfter=function insertAfter(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t+1,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(t<=n){this.indexes[i]=n+1}}return this};Container.prototype.insertBefore=function insertBefore(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(n<=t){this.indexes[i]=n+1}}return this};Container.prototype._findChildAtPosition=function _findChildAtPosition(e,r){var t=undefined;this.each(function(n){if(n.atPosition){var i=n.atPosition(e,r);if(i){t=i;return false}}else if(n.isAtPosition(e,r)){t=n;return false}});return t};Container.prototype.atPosition=function atPosition(e,r){if(this.isAtPosition(e,r)){return this._findChildAtPosition(e,r)||this}else{return undefined}};Container.prototype._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};Container.prototype.each=function each(e){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var r=this.lastEach;this.indexes[r]=0;if(!this.length){return undefined}var t=void 0,n=void 0;while(this.indexes[r]{"use strict";r.__esModule=true;r.isUniversal=r.isTag=r.isString=r.isSelector=r.isRoot=r.isPseudo=r.isNesting=r.isIdentifier=r.isComment=r.isCombinator=r.isClassName=r.isAttribute=undefined;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i;r.isNode=isNode;r.isPseudoElement=isPseudoElement;r.isPseudoClass=isPseudoClass;r.isContainer=isContainer;r.isNamespace=isNamespace;var o=t(9151);var s=(i={},i[o.ATTRIBUTE]=true,i[o.CLASS]=true,i[o.COMBINATOR]=true,i[o.COMMENT]=true,i[o.ID]=true,i[o.NESTING]=true,i[o.PSEUDO]=true,i[o.ROOT]=true,i[o.SELECTOR]=true,i[o.STRING]=true,i[o.TAG]=true,i[o.UNIVERSAL]=true,i);function isNode(e){return(typeof e==="undefined"?"undefined":n(e))==="object"&&s[e.type]}function isNodeType(e,r){return isNode(r)&&r.type===e}var a=r.isAttribute=isNodeType.bind(null,o.ATTRIBUTE);var u=r.isClassName=isNodeType.bind(null,o.CLASS);var f=r.isCombinator=isNodeType.bind(null,o.COMBINATOR);var c=r.isComment=isNodeType.bind(null,o.COMMENT);var l=r.isIdentifier=isNodeType.bind(null,o.ID);var p=r.isNesting=isNodeType.bind(null,o.NESTING);var h=r.isPseudo=isNodeType.bind(null,o.PSEUDO);var B=r.isRoot=isNodeType.bind(null,o.ROOT);var v=r.isSelector=isNodeType.bind(null,o.SELECTOR);var d=r.isString=isNodeType.bind(null,o.STRING);var b=r.isTag=isNodeType.bind(null,o.TAG);var y=r.isUniversal=isNodeType.bind(null,o.UNIVERSAL);function isPseudoElement(e){return h(e)&&e.value&&(e.value.startsWith("::")||e.value===":before"||e.value===":after")}function isPseudoClass(e){return h(e)&&!isPseudoElement(e)}function isContainer(e){return!!(isNode(e)&&e.walk)}function isNamespace(e){return a(e)||b(e)}},7732:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(917);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(ID,e);function ID(r){_classCallCheck(this,ID);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.ID;return t}ID.prototype.toString=function toString(){return[this.rawSpaceBefore,String("#"+this.stringifyProperty("value")),this.rawSpaceAfter].join("")};return ID}(i.default);r.default=s;e.exports=r["default"]},2341:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(9151);Object.keys(n).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return n[e]}})});var i=t(5420);Object.keys(i).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return i[e]}})});var o=t(8526);Object.keys(o).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return o[e]}})})},6512:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(917);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Nesting,e);function Nesting(r){_classCallCheck(this,Nesting);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.NESTING;t.value="&";return t}return Nesting}(i.default);r.default=s;e.exports=r["default"]},917:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Node);Object.assign(this,e);this.spaces=this.spaces||{};this.spaces.before=this.spaces.before||"";this.spaces.after=this.spaces.after||""}Node.prototype.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};Node.prototype.replaceWith=function replaceWith(){if(this.parent){for(var e in arguments){this.parent.insertBefore(this,arguments[e])}this.remove()}return this};Node.prototype.next=function next(){return this.parent.at(this.parent.index(this)+1)};Node.prototype.prev=function prev(){return this.parent.at(this.parent.index(this)-1)};Node.prototype.clone=function clone(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=s(this);for(var t in e){r[t]=e[t]}return r};Node.prototype.appendToPropertyAndEscape=function appendToPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}var n=this[e];var i=this.raws[e];this[e]=n+r;if(i||t!==r){this.raws[e]=(i||n)+t}else{delete this.raws[e]}};Node.prototype.setPropertyAndEscape=function setPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}this[e]=r;this.raws[e]=t};Node.prototype.setPropertyWithoutEscape=function setPropertyWithoutEscape(e,r){this[e]=r;if(this.raws){delete this.raws[e]}};Node.prototype.isAtPosition=function isAtPosition(e,r){if(this.source&&this.source.start&&this.source.end){if(this.source.start.line>e){return false}if(this.source.end.liner){return false}if(this.source.end.line===e&&this.source.end.column{"use strict";r.__esModule=true;var n=t(8541);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Pseudo,e);function Pseudo(r){_classCallCheck(this,Pseudo);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.PSEUDO;return t}Pseudo.prototype.toString=function toString(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")};return Pseudo}(i.default);r.default=s;e.exports=r["default"]},6522:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(8541);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Selector,e);function Selector(r){_classCallCheck(this,Selector);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.SELECTOR;return t}return Selector}(i.default);r.default=s;e.exports=r["default"]},1989:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(917);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(String,e);function String(r){_classCallCheck(this,String);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.STRING;return t}return String}(i.default);r.default=s;e.exports=r["default"]},5535:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(6512);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Tag,e);function Tag(r){_classCallCheck(this,Tag);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.TAG;return t}return Tag}(i.default);r.default=s;e.exports=r["default"]},9151:(e,r)=>{"use strict";r.__esModule=true;var t=r.TAG="tag";var n=r.STRING="string";var i=r.SELECTOR="selector";var o=r.ROOT="root";var s=r.PSEUDO="pseudo";var a=r.NESTING="nesting";var u=r.ID="id";var f=r.COMMENT="comment";var c=r.COMBINATOR="combinator";var l=r.CLASS="class";var p=r.ATTRIBUTE="attribute";var h=r.UNIVERSAL="universal"},9479:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(6512);var i=_interopRequireDefault(n);var o=t(9151);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Universal,e);function Universal(r){_classCallCheck(this,Universal);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.UNIVERSAL;t.value="*";return t}return Universal}(i.default);r.default=s;e.exports=r["default"]},7813:(e,r)=>{"use strict";r.__esModule=true;r.default=sortAscending;function sortAscending(e){return e.sort(function(e,r){return e-r})}e.exports=r["default"]},9676:(e,r)=>{"use strict";r.__esModule=true;var t=r.ampersand=38;var n=r.asterisk=42;var i=r.at=64;var o=r.comma=44;var s=r.colon=58;var a=r.semicolon=59;var u=r.openParenthesis=40;var f=r.closeParenthesis=41;var c=r.openSquare=91;var l=r.closeSquare=93;var p=r.dollar=36;var h=r.tilde=126;var B=r.caret=94;var v=r.plus=43;var d=r.equals=61;var b=r.pipe=124;var y=r.greaterThan=62;var g=r.space=32;var m=r.singleQuote=39;var C=r.doubleQuote=34;var w=r.slash=47;var S=r.bang=33;var O=r.backslash=92;var T=r.cr=13;var E=r.feed=12;var k=r.newline=10;var P=r.tab=9;var D=r.str=m;var A=r.comment=-1;var R=r.word=-2;var F=r.combinator=-3},7210:(e,r,t)=>{"use strict";r.__esModule=true;r.FIELDS=undefined;var n,i;r.default=tokenize;var o=t(9676);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}var a=(n={},n[s.tab]=true,n[s.newline]=true,n[s.cr]=true,n[s.feed]=true,n);var u=(i={},i[s.space]=true,i[s.tab]=true,i[s.newline]=true,i[s.cr]=true,i[s.feed]=true,i[s.ampersand]=true,i[s.asterisk]=true,i[s.bang]=true,i[s.comma]=true,i[s.colon]=true,i[s.semicolon]=true,i[s.openParenthesis]=true,i[s.closeParenthesis]=true,i[s.openSquare]=true,i[s.closeSquare]=true,i[s.singleQuote]=true,i[s.doubleQuote]=true,i[s.plus]=true,i[s.pipe]=true,i[s.tilde]=true,i[s.greaterThan]=true,i[s.equals]=true,i[s.dollar]=true,i[s.caret]=true,i[s.slash]=true,i);var f={};var c="0123456789abcdefABCDEF";for(var l=0;l0){g=a+d;m=y-b[d].length}else{g=a;m=o}w=s.comment;a=g;h=g;p=y-m}else if(c===s.slash){y=u;w=c;h=a;p=u-o;f=y+1}else{y=consumeWord(t,u);w=s.word;h=a;p=y-o}f=y+1;break}r.push([w,a,u-o,h,p,u,f]);if(m){o=m;m=null}u=f}return r}},560:(e,r)=>{"use strict";r.__esModule=true;r.default=ensureObject;function ensureObject(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){e[i]={}}e=e[i]}}e.exports=r["default"]},456:(e,r)=>{"use strict";r.__esModule=true;r.default=getProp;function getProp(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){return undefined}e=e[i]}return e}e.exports=r["default"]},2196:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(3806);Object.defineProperty(r,"unesc",{enumerable:true,get:function get(){return _interopRequireDefault(n).default}});var i=t(456);Object.defineProperty(r,"getProp",{enumerable:true,get:function get(){return _interopRequireDefault(i).default}});var o=t(560);Object.defineProperty(r,"ensureObject",{enumerable:true,get:function get(){return _interopRequireDefault(o).default}});var s=t(7012);Object.defineProperty(r,"stripComments",{enumerable:true,get:function get(){return _interopRequireDefault(s).default}});function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},7012:(e,r)=>{"use strict";r.__esModule=true;r.default=stripComments;function stripComments(e){var r="";var t=e.indexOf("/*");var n=0;while(t>=0){r=r+e.slice(n,t);var i=e.indexOf("*/",t+2);if(i<0){return r}n=i+2;t=e.indexOf("/*",n)}r=r+e.slice(n);return r}e.exports=r["default"]},3806:(e,r)=>{"use strict";r.__esModule=true;r.default=unesc;var t=/\\(?:([0-9a-fA-F]{6})|([0-9a-fA-F]{1,5})(?: |(?![0-9a-fA-F])))/g;var n=/\\(.)/g;function unesc(e){e=e.replace(t,function(e,r,t){var n=r||t;var i=parseInt(n,16);return String.fromCharCode(i)});e=e.replace(n,function(e,r){return r});return e}e.exports=r["default"]},3650:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9182));var o=n.plugin("postcss-dir-pseudo-class",e=>{const r=Object(e).dir;const t=Boolean(Object(e).preserve);return e=>{e.walkRules(/:dir\([^\)]*\)/,e=>{let n=e;if(t){n=e.cloneBefore()}n.selector=i(e=>{e.nodes.forEach(e=>{e.walk(t=>{if("pseudo"===t.type&&":dir"===t.value){const n=t.prev();const o=t.next();const s=n&&n.type&&"combinator"===n.type&&" "===n.value;const a=o&&o.type&&"combinator"===o.type&&" "===o.value;if(s&&(a||!o)){t.replaceWith(i.universal())}else{t.remove()}const u=e.nodes[0];const f=u&&"combinator"===u.type&&" "===u.value;const c=u&&"tag"===u.type&&"html"===u.value;const l=u&&"pseudo"===u.type&&":root"===u.value;if(u&&!c&&!l&&!f){e.prepend(i.combinator({value:" "}))}const p=t.nodes.toString();const h=r===p;const B=i.attribute({attribute:"dir",operator:"=",quoteMark:'"',value:`"${p}"`});const v=i.pseudo({value:`${c||l?"":"html"}:not`});v.append(i.attribute({attribute:"dir",operator:"=",quoteMark:'"',value:`"${"ltr"===p?"rtl":"ltr"}"`}));if(h){if(c){e.insertAfter(u,v)}else{e.prepend(v)}}else if(c){e.insertAfter(u,B)}else{e.prepend(B)}}})})}).processSync(n.selector)})}});e.exports=o},3730:e=>{"use strict";var r={};var t=r.hasOwnProperty;var n=function merge(e,r){if(!e){return r}var n={};for(var i in r){n[i]=t.call(e,i)?e[i]:r[i]}return n};var i=/[ -,\.\/;-@\[-\^`\{-~]/;var o=/[ -,\.\/;-@\[\]\^`\{-~]/;var s=/['"\\]/;var a=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var u=function cssesc(e,r){r=n(r,cssesc.options);if(r.quotes!="single"&&r.quotes!="double"){r.quotes="single"}var t=r.quotes=="double"?'"':"'";var s=r.isIdentifier;var u=e.charAt(0);var f="";var c=0;var l=e.length;while(c126){if(h>=55296&&h<=56319&&c{"use strict";r.__esModule=true;var n=t(7274);var i=_interopRequireDefault(n);var o=t(3639);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=function parser(e){return new i.default(e)};Object.assign(a,s);delete a.__esModule;r.default=a;e.exports=r["default"]},1927:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parser);this.rule=e;this.options=Object.assign({lossy:false,safe:false},r);this.position=0;this.css=typeof this.rule==="string"?this.rule:this.rule.selector;this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var t=getTokenSourceSpan(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new p.default({source:t});this.root.errorGenerator=this._errorGenerator();var n=new B.default({source:{start:{line:1,column:1}}});this.root.append(n);this.current=n;this.loop()}Parser.prototype._errorGenerator=function _errorGenerator(){var e=this;return function(r,t){if(typeof e.rule==="string"){return new Error(r)}return e.rule.error(r,t)}};Parser.prototype.attribute=function attribute(){var e=[];var r=this.currToken;this.position++;while(this.position1&&arguments[1]!==undefined?arguments[1]:false;var n="";var i="";e.forEach(function(e){var o=r.lossySpace(e.spaces.before,t);var s=r.lossySpace(e.rawSpaceBefore,t);n+=o+r.lossySpace(e.spaces.after,t&&o.length===0);i+=o+e.value+r.lossySpace(e.rawSpaceAfter,t&&s.length===0)});if(i===n){i=undefined}var o={space:n,rawSpace:i};return o};Parser.prototype.isNamedCombinator=function isNamedCombinator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position;return this.tokens[e+0]&&this.tokens[e+0][N.FIELDS.TYPE]===q.slash&&this.tokens[e+1]&&this.tokens[e+1][N.FIELDS.TYPE]===q.word&&this.tokens[e+2]&&this.tokens[e+2][N.FIELDS.TYPE]===q.slash};Parser.prototype.namedCombinator=function namedCombinator(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]);var r=(0,U.unesc)(e).toLowerCase();var t={};if(r!==e){t.value="/"+e+"/"}var n=new F.default({value:"/"+r+"/",source:getSource(this.currToken[N.FIELDS.START_LINE],this.currToken[N.FIELDS.START_COL],this.tokens[this.position+2][N.FIELDS.END_LINE],this.tokens[this.position+2][N.FIELDS.END_COL]),sourceIndex:this.currToken[N.FIELDS.START_POS],raws:t});this.position=this.position+3;return n}else{this.unexpected()}};Parser.prototype.combinator=function combinator(){var e=this;if(this.content()==="|"){return this.namespace()}var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][N.FIELDS.TYPE]===q.comma){var t=this.parseWhitespaceEquivalentTokens(r);if(t.length>0){var n=this.current.last;if(n){var i=this.convertWhitespaceNodesToSpace(t),o=i.space,s=i.rawSpace;if(s!==undefined){n.rawSpaceAfter+=s}n.spaces.after+=o}else{t.forEach(function(r){return e.newNode(r)})}}return}var a=this.currToken;var u=undefined;if(r>this.position){u=this.parseWhitespaceEquivalentTokens(r)}var f=void 0;if(this.isNamedCombinator()){f=this.namedCombinator()}else if(this.currToken[N.FIELDS.TYPE]===q.combinator){f=new F.default({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[N.FIELDS.START_POS]});this.position++}else if(H[this.currToken[N.FIELDS.TYPE]]){}else if(!u){this.unexpected()}if(f){if(u){var c=this.convertWhitespaceNodesToSpace(u),l=c.space,p=c.rawSpace;f.spaces.before=l;f.rawSpaceBefore=p}}else{var h=this.convertWhitespaceNodesToSpace(u,true),B=h.space,v=h.rawSpace;if(!v){v=B}var d={};var b={spaces:{}};if(B.endsWith(" ")&&v.endsWith(" ")){d.before=B.slice(0,B.length-1);b.spaces.before=v.slice(0,v.length-1)}else if(B.startsWith(" ")&&v.startsWith(" ")){d.after=B.slice(1);b.spaces.after=v.slice(1)}else{b.value=v}f=new F.default({value:" ",source:getTokenSourceSpan(a,this.tokens[this.position-1]),sourceIndex:a[N.FIELDS.START_POS],spaces:d,raws:b})}if(this.currToken&&this.currToken[N.FIELDS.TYPE]===q.space){f.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(f)};Parser.prototype.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var e=new B.default({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(e);this.current=e;this.position++};Parser.prototype.comment=function comment(){var e=this.currToken;this.newNode(new y.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.error=function error(e,r){throw this.root.error(e,r)};Parser.prototype.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[N.FIELDS.START_POS]})};Parser.prototype.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[N.FIELDS.START_POS])};Parser.prototype.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[N.FIELDS.START_POS])};Parser.prototype.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[N.FIELDS.START_POS])};Parser.prototype.namespace=function namespace(){var e=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[N.FIELDS.TYPE]===q.word){this.position++;return this.word(e)}else if(this.nextToken[N.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(e)}};Parser.prototype.nesting=function nesting(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var r=this.currToken;this.newNode(new j.default({value:this.content(),source:getTokenSource(r),sourceIndex:r[N.FIELDS.START_POS]}));this.position++};Parser.prototype.parentheses=function parentheses(){var e=this.current.last;var r=1;this.position++;if(e&&e.type===J.PSEUDO){var t=new B.default({source:{start:tokenStart(this.tokens[this.position-1])}});var n=this.current;e.append(t);this.current=t;while(this.position1&&e.nextToken&&e.nextToken[N.FIELDS.TYPE]===q.openParenthesis){e.error("Misplaced parenthesis.",{index:e.nextToken[N.FIELDS.START_POS]})}})}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[N.FIELDS.START_POS])}};Parser.prototype.space=function space(){var e=this.content();if(this.position===0||this.prevToken[N.FIELDS.TYPE]===q.comma||this.prevToken[N.FIELDS.TYPE]===q.openParenthesis){this.spaces=this.optionalSpace(e);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[N.FIELDS.TYPE]===q.comma||this.nextToken[N.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(e);this.position++}else{this.combinator()}};Parser.prototype.string=function string(){var e=this.currToken;this.newNode(new O.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.universal=function universal(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}var t=this.currToken;this.newNode(new A.default({value:this.content(),source:getTokenSource(t),sourceIndex:t[N.FIELDS.START_POS]}),e);this.position++};Parser.prototype.splitWord=function splitWord(e,r){var t=this;var n=this.nextToken;var i=this.content();while(n&&~[q.dollar,q.caret,q.equals,q.word].indexOf(n[N.FIELDS.TYPE])){this.position++;var o=this.content();i+=o;if(o.lastIndexOf("\\")===o.length-1){var s=this.nextToken;if(s&&s[N.FIELDS.TYPE]===q.space){i+=this.requiredSpace(this.content(s));this.position++}}n=this.nextToken}var a=(0,u.default)(i,".").filter(function(e){return i[e-1]!=="\\"});var f=(0,u.default)(i,"#");var l=(0,u.default)(i,"#{");if(l.length){f=f.filter(function(e){return!~l.indexOf(e)})}var p=(0,M.default)((0,c.default)([0].concat(a,f)));p.forEach(function(n,o){var s=p[o+1]||i.length;var u=i.slice(n,s);if(o===0&&r){return r.call(t,u,p.length)}var c=void 0;var l=t.currToken;var h=l[N.FIELDS.START_POS]+p[o];var B=getSource(l[1],l[2]+n,l[3],l[2]+(s-1));if(~a.indexOf(n)){var v={value:u.slice(1),source:B,sourceIndex:h};c=new d.default(unescapeProp(v,"value"))}else if(~f.indexOf(n)){var b={value:u.slice(1),source:B,sourceIndex:h};c=new m.default(unescapeProp(b,"value"))}else{var y={value:u,source:B,sourceIndex:h};unescapeProp(y,"value");c=new w.default(y)}t.newNode(c,e);e=null});this.position++};Parser.prototype.word=function word(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}return this.splitWord(e)};Parser.prototype.loop=function loop(){while(this.position0&&arguments[0]!==undefined?arguments[0]:this.currToken;return this.css.slice(e[N.FIELDS.START_POS],e[N.FIELDS.END_POS])};Parser.prototype.locateNextMeaningfulToken=function locateNextMeaningfulToken(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position+1;var r=e;while(r{"use strict";r.__esModule=true;var n=t(1927);var i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=function(){function Processor(e,r){_classCallCheck(this,Processor);this.func=e||function noop(){};this.funcRes=null;this.options=r}Processor.prototype._shouldUpdateSelector=function _shouldUpdateSelector(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=Object.assign({},this.options,r);if(t.updateSelector===false){return false}else{return typeof e!=="string"}};Processor.prototype._isLossy=function _isLossy(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=Object.assign({},this.options,e);if(r.lossless===false){return true}else{return false}};Processor.prototype._root=function _root(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=new i.default(e,this._parseOptions(r));return t.root};Processor.prototype._parseOptions=function _parseOptions(e){return{lossy:this._isLossy(e)}};Processor.prototype._run=function _run(e){var r=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new Promise(function(n,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(n){var i=undefined;if(r._shouldUpdateSelector(e,t)){i=o.toString();e.selector=i}return{transform:n,root:o,string:i}}).then(n,i)}catch(e){i(e);return}})};Processor.prototype._runSync=function _runSync(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=this._root(e,r);var n=this.func(t);if(n&&typeof n.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var i=undefined;if(r.updateSelector&&typeof e!=="string"){i=t.toString();e.selector=i}return{transform:n,root:t,string:i}};Processor.prototype.ast=function ast(e,r){return this._run(e,r).then(function(e){return e.root})};Processor.prototype.astSync=function astSync(e,r){return this._runSync(e,r).root};Processor.prototype.transform=function transform(e,r){return this._run(e,r).then(function(e){return e.transform})};Processor.prototype.transformSync=function transformSync(e,r){return this._runSync(e,r).transform};Processor.prototype.process=function process(e,r){return this._run(e,r).then(function(e){return e.string||e.root.toString()})};Processor.prototype.processSync=function processSync(e,r){var t=this._runSync(e,r);return t.string||t.root.toString()};return Processor}();r.default=o;e.exports=r["default"]},8067:(e,r,t)=>{"use strict";r.__esModule=true;var n;var i=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Attribute);var t=_possibleConstructorReturn(this,e.call(this,handleDeprecatedContructorOpts(r)));t.type=l.ATTRIBUTE;t.raws=t.raws||{};Object.defineProperty(t.raws,"unquoted",{get:h(function(){return t.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:h(function(){return t.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")});t._constructed=true;return t}Attribute.prototype.getQuotedValue=function getQuotedValue(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=this._determineQuoteMark(e);var t=g[r];var n=(0,s.default)(this._value,t);return n};Attribute.prototype._determineQuoteMark=function _determineQuoteMark(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)};Attribute.prototype.setValue=function setValue(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this._value=e;this._quoteMark=this._determineQuoteMark(r);this._syncRawValue()};Attribute.prototype.smartQuoteMark=function smartQuoteMark(e){var r=this.value;var t=r.replace(/[^']/g,"").length;var n=r.replace(/[^"]/g,"").length;if(t+n===0){var i=(0,s.default)(r,{isIdentifier:true});if(i===r){return Attribute.NO_QUOTE}else{var o=this.preferredQuoteMark(e);if(o===Attribute.NO_QUOTE){var a=this.quoteMark||e.quoteMark||Attribute.DOUBLE_QUOTE;var u=g[a];var f=(0,s.default)(r,u);if(f.length1&&arguments[1]!==undefined?arguments[1]:e;var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:defaultAttrConcat;var n=this._spacesFor(r);return t(this.stringifyProperty(e),n)};Attribute.prototype.offsetOf=function offsetOf(e){var r=1;var t=this._spacesFor("attribute");r+=t.before.length;if(e==="namespace"||e==="ns"){return this.namespace?r:-1}if(e==="attributeNS"){return r}r+=this.namespaceString.length;if(this.namespace){r+=1}if(e==="attribute"){return r}r+=this.stringifyProperty("attribute").length;r+=t.after.length;var n=this._spacesFor("operator");r+=n.before.length;var i=this.stringifyProperty("operator");if(e==="operator"){return i?r:-1}r+=i.length;r+=n.after.length;var o=this._spacesFor("value");r+=o.before.length;var s=this.stringifyProperty("value");if(e==="value"){return s?r:-1}r+=s.length;r+=o.after.length;var a=this._spacesFor("insensitive");r+=a.before.length;if(e==="insensitive"){return this.insensitive?r:-1}return-1};Attribute.prototype.toString=function toString(){var e=this;var r=[this.rawSpaceBefore,"["];r.push(this._stringFor("qualifiedAttribute","attribute"));if(this.operator&&this.value){r.push(this._stringFor("operator"));r.push(this._stringFor("value"));r.push(this._stringFor("insensitiveFlag","insensitive",function(r,t){if(r.length>0&&!e.quoted&&t.before.length===0&&!(e.spaces.value&&e.spaces.value.after)){t.before=" "}return defaultAttrConcat(r,t)}))}r.push("]");r.push(this.rawSpaceAfter);return r.join("")};i(Attribute,[{key:"quoted",get:function get(){var e=this.quoteMark;return e==="'"||e==='"'},set:function set(e){d()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(e){if(!this._constructed){this._quoteMark=e;return}if(this._quoteMark!==e){this._quoteMark=e;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(e){if(this._constructed){var r=unescapeValue(e),t=r.deprecatedUsage,n=r.unescaped,i=r.quoteMark;if(t){v()}if(n===this._value&&i===this._quoteMark){return}this._value=n;this._quoteMark=i;this._syncRawValue()}else{this._value=e}}},{key:"attribute",get:function get(){return this._attribute},set:function set(e){this._handleEscapes("attribute",e);this._attribute=e}}]);return Attribute}(c.default);y.NO_QUOTE=null;y.SINGLE_QUOTE="'";y.DOUBLE_QUOTE='"';r.default=y;var g=(n={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},n[null]={isIdentifier:true},n);function defaultAttrConcat(e,r){return""+r.before+e+r.after}},3198:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(4944);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Combinator,e);function Combinator(r){_classCallCheck(this,Combinator);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMBINATOR;return t}return Combinator}(i.default);r.default=s;e.exports=r["default"]},7517:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(4944);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Comment,e);function Comment(r){_classCallCheck(this,Comment);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMMENT;return t}return Comment}(i.default);r.default=s;e.exports=r["default"]},9338:(e,r,t)=>{"use strict";r.__esModule=true;r.universal=r.tag=r.string=r.selector=r.root=r.pseudo=r.nesting=r.id=r.comment=r.combinator=r.className=r.attribute=undefined;var n=t(8067);var i=_interopRequireDefault(n);var o=t(3198);var s=_interopRequireDefault(o);var a=t(6931);var u=_interopRequireDefault(a);var f=t(7517);var c=_interopRequireDefault(f);var l=t(1931);var p=_interopRequireDefault(l);var h=t(4712);var B=_interopRequireDefault(h);var v=t(7614);var d=_interopRequireDefault(v);var b=t(1026);var y=_interopRequireDefault(b);var g=t(5445);var m=_interopRequireDefault(g);var C=t(6959);var w=_interopRequireDefault(C);var S=t(5546);var O=_interopRequireDefault(S);var T=t(4411);var E=_interopRequireDefault(T);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var k=r.attribute=function attribute(e){return new i.default(e)};var P=r.className=function className(e){return new s.default(e)};var D=r.combinator=function combinator(e){return new u.default(e)};var A=r.comment=function comment(e){return new c.default(e)};var R=r.id=function id(e){return new p.default(e)};var F=r.nesting=function nesting(e){return new B.default(e)};var x=r.pseudo=function pseudo(e){return new d.default(e)};var j=r.root=function root(e){return new y.default(e)};var I=r.selector=function selector(e){return new m.default(e)};var M=r.string=function string(e){return new w.default(e)};var N=r.tag=function tag(e){return new O.default(e)};var _=r.universal=function universal(e){return new E.default(e)}},3130:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t=e){this.indexes[t]=r-1}}return this};Container.prototype.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};Container.prototype.empty=function empty(){return this.removeAll()};Container.prototype.insertAfter=function insertAfter(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t+1,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(t<=n){this.indexes[i]=n+1}}return this};Container.prototype.insertBefore=function insertBefore(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(n<=t){this.indexes[i]=n+1}}return this};Container.prototype._findChildAtPosition=function _findChildAtPosition(e,r){var t=undefined;this.each(function(n){if(n.atPosition){var i=n.atPosition(e,r);if(i){t=i;return false}}else if(n.isAtPosition(e,r)){t=n;return false}});return t};Container.prototype.atPosition=function atPosition(e,r){if(this.isAtPosition(e,r)){return this._findChildAtPosition(e,r)||this}else{return undefined}};Container.prototype._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};Container.prototype.each=function each(e){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var r=this.lastEach;this.indexes[r]=0;if(!this.length){return undefined}var t=void 0,n=void 0;while(this.indexes[r]{"use strict";r.__esModule=true;r.isUniversal=r.isTag=r.isString=r.isSelector=r.isRoot=r.isPseudo=r.isNesting=r.isIdentifier=r.isComment=r.isCombinator=r.isClassName=r.isAttribute=undefined;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i;r.isNode=isNode;r.isPseudoElement=isPseudoElement;r.isPseudoClass=isPseudoClass;r.isContainer=isContainer;r.isNamespace=isNamespace;var o=t(2958);var s=(i={},i[o.ATTRIBUTE]=true,i[o.CLASS]=true,i[o.COMBINATOR]=true,i[o.COMMENT]=true,i[o.ID]=true,i[o.NESTING]=true,i[o.PSEUDO]=true,i[o.ROOT]=true,i[o.SELECTOR]=true,i[o.STRING]=true,i[o.TAG]=true,i[o.UNIVERSAL]=true,i);function isNode(e){return(typeof e==="undefined"?"undefined":n(e))==="object"&&s[e.type]}function isNodeType(e,r){return isNode(r)&&r.type===e}var a=r.isAttribute=isNodeType.bind(null,o.ATTRIBUTE);var u=r.isClassName=isNodeType.bind(null,o.CLASS);var f=r.isCombinator=isNodeType.bind(null,o.COMBINATOR);var c=r.isComment=isNodeType.bind(null,o.COMMENT);var l=r.isIdentifier=isNodeType.bind(null,o.ID);var p=r.isNesting=isNodeType.bind(null,o.NESTING);var h=r.isPseudo=isNodeType.bind(null,o.PSEUDO);var B=r.isRoot=isNodeType.bind(null,o.ROOT);var v=r.isSelector=isNodeType.bind(null,o.SELECTOR);var d=r.isString=isNodeType.bind(null,o.STRING);var b=r.isTag=isNodeType.bind(null,o.TAG);var y=r.isUniversal=isNodeType.bind(null,o.UNIVERSAL);function isPseudoElement(e){return h(e)&&e.value&&(e.value.startsWith("::")||e.value===":before"||e.value===":after")}function isPseudoClass(e){return h(e)&&!isPseudoElement(e)}function isContainer(e){return!!(isNode(e)&&e.walk)}function isNamespace(e){return a(e)||b(e)}},1931:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(4944);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(ID,e);function ID(r){_classCallCheck(this,ID);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.ID;return t}ID.prototype.toString=function toString(){return[this.rawSpaceBefore,String("#"+this.stringifyProperty("value")),this.rawSpaceAfter].join("")};return ID}(i.default);r.default=s;e.exports=r["default"]},3639:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(2958);Object.keys(n).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return n[e]}})});var i=t(9338);Object.keys(i).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return i[e]}})});var o=t(6924);Object.keys(o).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return o[e]}})})},7264:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(4944);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Nesting,e);function Nesting(r){_classCallCheck(this,Nesting);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.NESTING;t.value="&";return t}return Nesting}(i.default);r.default=s;e.exports=r["default"]},4944:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Node);Object.assign(this,e);this.spaces=this.spaces||{};this.spaces.before=this.spaces.before||"";this.spaces.after=this.spaces.after||""}Node.prototype.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};Node.prototype.replaceWith=function replaceWith(){if(this.parent){for(var e in arguments){this.parent.insertBefore(this,arguments[e])}this.remove()}return this};Node.prototype.next=function next(){return this.parent.at(this.parent.index(this)+1)};Node.prototype.prev=function prev(){return this.parent.at(this.parent.index(this)-1)};Node.prototype.clone=function clone(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=s(this);for(var t in e){r[t]=e[t]}return r};Node.prototype.appendToPropertyAndEscape=function appendToPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}var n=this[e];var i=this.raws[e];this[e]=n+r;if(i||t!==r){this.raws[e]=(i||n)+t}else{delete this.raws[e]}};Node.prototype.setPropertyAndEscape=function setPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}this[e]=r;this.raws[e]=t};Node.prototype.setPropertyWithoutEscape=function setPropertyWithoutEscape(e,r){this[e]=r;if(this.raws){delete this.raws[e]}};Node.prototype.isAtPosition=function isAtPosition(e,r){if(this.source&&this.source.start&&this.source.end){if(this.source.start.line>e){return false}if(this.source.end.liner){return false}if(this.source.end.line===e&&this.source.end.column{"use strict";r.__esModule=true;var n=t(3130);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Pseudo,e);function Pseudo(r){_classCallCheck(this,Pseudo);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.PSEUDO;return t}Pseudo.prototype.toString=function toString(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")};return Pseudo}(i.default);r.default=s;e.exports=r["default"]},1026:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(3130);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Selector,e);function Selector(r){_classCallCheck(this,Selector);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.SELECTOR;return t}return Selector}(i.default);r.default=s;e.exports=r["default"]},6959:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(4944);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(String,e);function String(r){_classCallCheck(this,String);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.STRING;return t}return String}(i.default);r.default=s;e.exports=r["default"]},5546:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(7264);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Tag,e);function Tag(r){_classCallCheck(this,Tag);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.TAG;return t}return Tag}(i.default);r.default=s;e.exports=r["default"]},2958:(e,r)=>{"use strict";r.__esModule=true;var t=r.TAG="tag";var n=r.STRING="string";var i=r.SELECTOR="selector";var o=r.ROOT="root";var s=r.PSEUDO="pseudo";var a=r.NESTING="nesting";var u=r.ID="id";var f=r.COMMENT="comment";var c=r.COMBINATOR="combinator";var l=r.CLASS="class";var p=r.ATTRIBUTE="attribute";var h=r.UNIVERSAL="universal"},4411:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(7264);var i=_interopRequireDefault(n);var o=t(2958);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Universal,e);function Universal(r){_classCallCheck(this,Universal);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.UNIVERSAL;t.value="*";return t}return Universal}(i.default);r.default=s;e.exports=r["default"]},9611:(e,r)=>{"use strict";r.__esModule=true;r.default=sortAscending;function sortAscending(e){return e.sort(function(e,r){return e-r})}e.exports=r["default"]},5791:(e,r)=>{"use strict";r.__esModule=true;var t=r.ampersand=38;var n=r.asterisk=42;var i=r.at=64;var o=r.comma=44;var s=r.colon=58;var a=r.semicolon=59;var u=r.openParenthesis=40;var f=r.closeParenthesis=41;var c=r.openSquare=91;var l=r.closeSquare=93;var p=r.dollar=36;var h=r.tilde=126;var B=r.caret=94;var v=r.plus=43;var d=r.equals=61;var b=r.pipe=124;var y=r.greaterThan=62;var g=r.space=32;var m=r.singleQuote=39;var C=r.doubleQuote=34;var w=r.slash=47;var S=r.bang=33;var O=r.backslash=92;var T=r.cr=13;var E=r.feed=12;var k=r.newline=10;var P=r.tab=9;var D=r.str=m;var A=r.comment=-1;var R=r.word=-2;var F=r.combinator=-3},26:(e,r,t)=>{"use strict";r.__esModule=true;r.FIELDS=undefined;var n,i;r.default=tokenize;var o=t(5791);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}var a=(n={},n[s.tab]=true,n[s.newline]=true,n[s.cr]=true,n[s.feed]=true,n);var u=(i={},i[s.space]=true,i[s.tab]=true,i[s.newline]=true,i[s.cr]=true,i[s.feed]=true,i[s.ampersand]=true,i[s.asterisk]=true,i[s.bang]=true,i[s.comma]=true,i[s.colon]=true,i[s.semicolon]=true,i[s.openParenthesis]=true,i[s.closeParenthesis]=true,i[s.openSquare]=true,i[s.closeSquare]=true,i[s.singleQuote]=true,i[s.doubleQuote]=true,i[s.plus]=true,i[s.pipe]=true,i[s.tilde]=true,i[s.greaterThan]=true,i[s.equals]=true,i[s.dollar]=true,i[s.caret]=true,i[s.slash]=true,i);var f={};var c="0123456789abcdefABCDEF";for(var l=0;l0){g=a+d;m=y-b[d].length}else{g=a;m=o}w=s.comment;a=g;h=g;p=y-m}else if(c===s.slash){y=u;w=c;h=a;p=u-o;f=y+1}else{y=consumeWord(t,u);w=s.word;h=a;p=y-o}f=y+1;break}r.push([w,a,u-o,h,p,u,f]);if(m){o=m;m=null}u=f}return r}},7315:(e,r)=>{"use strict";r.__esModule=true;r.default=ensureObject;function ensureObject(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){e[i]={}}e=e[i]}}e.exports=r["default"]},5558:(e,r)=>{"use strict";r.__esModule=true;r.default=getProp;function getProp(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){return undefined}e=e[i]}return e}e.exports=r["default"]},4225:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(310);Object.defineProperty(r,"unesc",{enumerable:true,get:function get(){return _interopRequireDefault(n).default}});var i=t(5558);Object.defineProperty(r,"getProp",{enumerable:true,get:function get(){return _interopRequireDefault(i).default}});var o=t(7315);Object.defineProperty(r,"ensureObject",{enumerable:true,get:function get(){return _interopRequireDefault(o).default}});var s=t(51);Object.defineProperty(r,"stripComments",{enumerable:true,get:function get(){return _interopRequireDefault(s).default}});function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},51:(e,r)=>{"use strict";r.__esModule=true;r.default=stripComments;function stripComments(e){var r="";var t=e.indexOf("/*");var n=0;while(t>=0){r=r+e.slice(n,t);var i=e.indexOf("*/",t+2);if(i<0){return r}n=i+2;t=e.indexOf("/*",n)}r=r+e.slice(n);return r}e.exports=r["default"]},310:(e,r)=>{"use strict";r.__esModule=true;r.default=unesc;var t=/\\(?:([0-9a-fA-F]{6})|([0-9a-fA-F]{1,5})(?: |(?![0-9a-fA-F])))/g;var n=/\\(.)/g;function unesc(e){e=e.replace(t,function(e,r,t){var n=r||t;var i=parseInt(n,16);return String.fromCharCode(i)});e=e.replace(n,function(e,r){return r});return e}e.exports=r["default"]},3030:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=n.plugin("postcss-double-position-gradients",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;return e=>{e.walkDecls(e=>{const t=e.value;if(s.test(t)){const n=i(t).parse();n.walkFunctionNodes(e=>{if(a.test(e.value)){const r=e.nodes.slice(1,-1);r.forEach((t,n)=>{const o=Object(r[n-1]);const s=Object(r[n-2]);const a=s.type&&o.type==="number"&&t.type==="number";if(a){const r=s.clone();const n=i.comma({value:",",raws:{after:" "}});e.insertBefore(t,n);e.insertBefore(t,r)}})}});const o=n.toString();if(t!==o){e.cloneBefore({value:o});if(!r){e.remove()}}}})}});const s=/(repeating-)?(conic|linear|radial)-gradient\([\W\w]*\)/i;const a=/^(repeating-)?(conic|linear|radial)-gradient$/i;e.exports=o},5538:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(9448));var i=_interopDefault(t(5747));var o=_interopDefault(t(5622));var s=_interopDefault(t(4633));function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}const a=/^--/;var u=e=>{const r=String(e.nodes.slice(1,-1));return a.test(r)?r:undefined};var f=(e,r)=>{const t=u(e);if(typeof t==="string"&&t in r){e.replaceWith(...c(r[t],e.raws.before))}};const c=(e,r)=>{const t=l(e,null);if(t[0]){t[0].raws.before=r}return t};const l=(e,r)=>e.map(e=>p(e,r));const p=(e,r)=>{const t=new e.constructor(e);for(const n in e){if(n==="parent"){t.parent=r}else if(Object(e[n]).constructor===Array){t[n]=l(e.nodes,t)}else if(Object(e[n]).constructor===Object){t[n]=Object.assign({},e[n])}}return t};var h=e=>e&&e.type==="func"&&e.value==="env";function walk(e,r){e.nodes.slice(0).forEach(e=>{if(e.nodes){walk(e,r)}if(h(e)){r(e)}})}var B=(e,r)=>{const t=n(e).parse();walk(t,e=>{f(e,r)});return String(t)};var v=e=>e&&e.type==="atrule";var d=e=>e&&e.type==="decl";var b=e=>v(e)&&e.params||d(e)&&e.value;function setSupportedValue(e,r){if(v(e)){e.params=r}if(d(e)){e.value=r}}function importEnvironmentVariablesFromObject(e){const r=Object.assign({},Object(e).environmentVariables||Object(e)["environment-variables"]);for(const e in r){r[e]=n(r[e]).parse().nodes}return r}function importEnvironmentVariablesFromJSONFile(e){return _importEnvironmentVariablesFromJSONFile.apply(this,arguments)}function _importEnvironmentVariablesFromJSONFile(){_importEnvironmentVariablesFromJSONFile=_asyncToGenerator(function*(e){const r=yield g(o.resolve(e));return importEnvironmentVariablesFromObject(r)});return _importEnvironmentVariablesFromJSONFile.apply(this,arguments)}function importEnvironmentVariablesFromJSFile(e){return _importEnvironmentVariablesFromJSFile.apply(this,arguments)}function _importEnvironmentVariablesFromJSFile(){_importEnvironmentVariablesFromJSFile=_asyncToGenerator(function*(e){const r=yield Promise.resolve(require(o.resolve(e)));return importEnvironmentVariablesFromObject(r)});return _importEnvironmentVariablesFromJSFile.apply(this,arguments)}function importEnvironmentVariablesFromSources(e){return e.map(e=>{if(e instanceof Promise){return e}else if(e instanceof Function){return e()}const r=e===Object(e)?e:{from:String(e)};if(r.environmentVariables||r["environment-variables"]){return r}const t=String(r.from||"");const n=(r.type||o.extname(t).slice(1)).toLowerCase();return{type:n,from:t}}).reduce(function(){var e=_asyncToGenerator(function*(e,r){const t=yield r,n=t.type,i=t.from;if(n==="js"){return Object.assign(e,yield importEnvironmentVariablesFromJSFile(i))}if(n==="json"){return Object.assign(e,yield importEnvironmentVariablesFromJSONFile(i))}return Object.assign(e,importEnvironmentVariablesFromObject(yield r))});return function(r,t){return e.apply(this,arguments)}}(),{})}const y=e=>new Promise((r,t)=>{i.readFile(e,"utf8",(e,n)=>{if(e){t(e)}else{r(n)}})});const g=function(){var e=_asyncToGenerator(function*(e){return JSON.parse(yield y(e))});return function readJSON(r){return e.apply(this,arguments)}}();var m=s.plugin("postcss-env-fn",e=>{const r=[].concat(Object(e).importFrom||[]);const t=importEnvironmentVariablesFromSources(r);return function(){var e=_asyncToGenerator(function*(e){const r=yield t;e.walk(e=>{const t=b(e);if(t){const n=B(t,r);if(n!==t){setSupportedValue(e,n)}}})});return function(r){return e.apply(this,arguments)}}()});e.exports=m},9642:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));const i=/:focus-visible([^\w-]|$)/gi;var o=n.plugin("postcss-focus-visible",e=>{const r=String(Object(e).replaceWith||".focus-visible");const t=Boolean("preserve"in Object(e)?e.preserve:true);return e=>{e.walkRules(i,e=>{const n=e.selector.replace(i,(e,t)=>{return`${r}${t}`});const o=e.clone({selector:n});if(t){e.before(o)}else{e.replaceWith(o)}})}});e.exports=o},8059:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));const i=/:focus-within([^\w-]|$)/gi;var o=n.plugin("postcss-focus-within",e=>{const r=String(Object(e).replaceWith||"[focus-within]");const t=Boolean("preserve"in Object(e)?e.preserve:true);return e=>{e.walkRules(i,e=>{const n=e.selector.replace(i,(e,t)=>{return`${r}${t}`});const o=e.clone({selector:n});if(t){e.before(o)}else{e.replaceWith(o)}})}});e.exports=o},3203:(e,r,t)=>{var n=t(4633);var i={"font-variant-ligatures":{"common-ligatures":'"liga", "clig"',"no-common-ligatures":'"liga", "clig off"',"discretionary-ligatures":'"dlig"',"no-discretionary-ligatures":'"dlig" off',"historical-ligatures":'"hlig"',"no-historical-ligatures":'"hlig" off',contextual:'"calt"',"no-contextual":'"calt" off'},"font-variant-position":{sub:'"subs"',super:'"sups"',normal:'"subs" off, "sups" off'},"font-variant-caps":{"small-caps":'"c2sc"',"all-small-caps":'"smcp", "c2sc"',"petite-caps":'"pcap"',"all-petite-caps":'"pcap", "c2pc"',unicase:'"unic"',"titling-caps":'"titl"'},"font-variant-numeric":{"lining-nums":'"lnum"',"oldstyle-nums":'"onum"',"proportional-nums":'"pnum"',"tabular-nums":'"tnum"',"diagonal-fractions":'"frac"',"stacked-fractions":'"afrc"',ordinal:'"ordn"',"slashed-zero":'"zero"'},"font-kerning":{normal:'"kern"',none:'"kern" off'},"font-variant":{normal:"normal",inherit:"inherit"}};for(var o in i){var s=i[o];for(var a in s){if(!(a in i["font-variant"])){i["font-variant"][a]=s[a]}}}function getFontFeatureSettingsPrevTo(e){var r=null;e.parent.walkDecls(function(e){if(e.prop==="font-feature-settings"){r=e}});if(r===null){r=e.clone();r.prop="font-feature-settings";r.value="";e.parent.insertBefore(e,r)}return r}e.exports=n.plugin("postcss-font-variant",function(){return function(e){e.walkRules(function(e){var r=null;e.walkDecls(function(e){if(!i[e.prop]){return null}var t=e.value;if(e.prop==="font-variant"){t=e.value.split(/\s+/g).map(function(e){return i["font-variant"][e]}).join(", ")}else if(i[e.prop][e.value]){t=i[e.prop][e.value]}if(r===null){r=getFontFeatureSettingsPrevTo(e)}if(r.value&&r.value!==t){r.value+=", "+t}else{r.value=t}})})}})},9547:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));const i=/^(column-gap|gap|row-gap)$/i;var o=n.plugin("postcss-gap-properties",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;return e=>{e.walkDecls(i,e=>{e.cloneBefore({prop:`grid-${e.prop}`});if(!r){e.remove()}})}});e.exports=o},4287:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));var o=e=>Object(e).type==="comma";const s=/^(-webkit-)?image-set$/i;var a=e=>Object(e).type==="func"&&/^(cross-fade|image|(repeating-)?(conic|linear|radial)-gradient|url)$/i.test(e.value)&&!(e.parent.parent&&e.parent.parent.type==="func"&&s.test(e.parent.parent.value))?String(e):Object(e).type==="string"?e.value:false;const u={dpcm:2.54,dpi:1,dppx:96,x:96};var f=(e,r)=>{if(Object(e).type==="number"&&e.unit in u){const t=Number(e.value)*u[e.unit.toLowerCase()];const i=Math.floor(t/u.x*100)/100;if(t in r){return false}else{const e=r[t]=n.atRule({name:"media",params:`(-webkit-min-device-pixel-ratio: ${i}), (min-resolution: ${t}dpi)`});return e}}else{return false}};var c=(e,r,t)=>{if(e.oninvalid==="warn"){e.decl.warn(e.result,r,{word:String(t)})}else if(e.oninvalid==="throw"){throw e.decl.error(r,{word:String(t)})}};var l=(e,r,t)=>{const n=r.parent;const i={};let s=e.length;let u=-1;while(ue-r).map(e=>i[e]);if(l.length){const e=l[0].nodes[0].nodes[0];if(l.length===1){r.value=e.value}else{const i=n.nodes;const o=i.slice(0,i.indexOf(r)).concat(e);if(o.length){const e=n.cloneBefore().removeAll();e.append(o)}n.before(l.slice(1));if(!t.preserve){r.remove();if(!n.nodes.length){n.remove()}}}}};const p=/(^|[^\w-])(-webkit-)?image-set\(/;const h=/^(-webkit-)?image-set$/i;var B=n.plugin("postcss-image-set-function",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;const t="oninvalid"in Object(e)?e.oninvalid:"ignore";return(e,n)=>{e.walkDecls(e=>{const o=e.value;if(p.test(o)){const s=i(o).parse();s.walkType("func",i=>{if(h.test(i.value)){l(i.nodes.slice(1,-1),e,{decl:e,oninvalid:t,preserve:r,result:n})}})}})}});e.exports=B},7501:(e,r,t)=>{var n=t(4633);var i=t(7552);e.exports=n.plugin("postcss-initial",function(e){e=e||{};e.reset=e.reset||"all";e.replace=e.replace||false;var r=i(e.reset==="inherited");var t=function(e,r){var t=false;r.parent.walkDecls(function(e){if(e.prop===r.prop&&e.value!==r.value){t=true}});return t};return function(n){n.walkDecls(function(n){if(n.value.indexOf("initial")<0){return}var i=r(n.prop,n.value);if(i.length===0)return;i.forEach(function(e){if(!t(n.prop,n)){n.cloneBefore(e)}});if(e.replace===true){n.remove()}})}})},7552:(e,r,t)=>{var n=t(8589);var i=t(9614);function _getRulesMap(e){return e.filter(function(e){return!e.combined}).reduce(function(e,r){e[r.prop.replace(/\-/g,"")]=r.initial;return e},{})}function _compileDecls(e){var r=_getRulesMap(e);return e.map(function(e){if(e.combined&&e.initial){var t=n(e.initial.replace(/\-/g,""));e.initial=t(r)}return e})}function _getRequirements(e){return e.reduce(function(e,r){if(!r.contains)return e;return r.contains.reduce(function(e,t){e[t]=r;return e},e)},{})}function _expandContainments(e){var r=_getRequirements(e);return e.filter(function(e){return!e.contains}).map(function(e){var t=r[e.prop];if(t){e.requiredBy=t.prop;e.basic=e.basic||t.basic;e.inherited=e.inherited||t.inherited}return e})}var o=_expandContainments(_compileDecls(i));function _clearDecls(e,r){return e.map(function(e){return{prop:e.prop,value:r.replace(/initial/g,e.initial)}})}function _allDecls(e){return o.filter(function(r){var t=r.combined||r.basic;if(e)return t&&r.inherited;return t})}function _concreteDecl(e){return o.filter(function(r){return e===r.prop||e===r.requiredBy})}function makeFallbackFunction(e){return function(r,t){var n;if(r==="all"){n=_allDecls(e)}else{n=_concreteDecl(r)}return _clearDecls(n,t)}}e.exports=makeFallbackFunction},7972:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=t(4567);var i=_interopDefault(t(4633));var o=_interopDefault(t(9448));var s=i.plugin("postcss-lab-function",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):false;return e=>{e.walkDecls(e=>{const t=e.value;if(a.test(t)){const i=o(t).parse();i.walkType("func",e=>{if(u.test(e.value)){const r=e.nodes.slice(1,-1);const t=f.test(e.value);const i=c.test(e.value);const o=!i&&S(r);const s=!i&&O(r);const a=i&&T(r);if(o||s){e.value="rgb";const i=r[3];const o=r[4];if(o){if(y(o)&&!v(o)){o.unit="";o.value=String(o.value/100)}if(o.value==="1"){i.remove();o.remove()}else{e.value+="a"}}if(i&&g(i)){i.replaceWith(E())}const s=t?n.lab2rgb:n.lch2rgb;const a=s(...[r[0].value,r[1].value,r[2].value].map(e=>parseFloat(e))).map(e=>Math.max(Math.min(parseInt(e*2.55),255),0));r[0].value=String(a[0]);r[1].value=String(a[1]);r[2].value=String(a[2]);e.nodes.splice(3,0,[E()]);e.nodes.splice(2,0,[E()])}else if(a){e.value="rgb";const t=r[2];const i=n.lab2rgb(...[r[0].value,0,0].map(e=>parseFloat(e))).map(e=>Math.max(Math.min(parseInt(e*2.55),255),0));e.removeAll().append(P("(")).append(k(i[0])).append(E()).append(k(i[1])).append(E()).append(k(i[2])).append(P(")"));if(t){if(y(t)&&!v(t)){t.unit="";t.value=String(t.value/100)}if(t.value!=="1"){e.value+="a";e.insertBefore(e.last,E()).insertBefore(e.last,t)}}}}});const s=String(i);if(r){e.cloneBefore({value:s})}else{e.value=s}}})}});const a=/(^|[^\w-])(lab|lch|gray)\(/i;const u=/^(lab|lch|gray)$/i;const f=/^lab$/i;const c=/^gray$/i;const l=/^%?$/i;const p=/^calc$/i;const h=/^(deg|grad|rad|turn)?$/i;const B=e=>v(e)||e.type==="number"&&l.test(e.unit);const v=e=>e.type==="func"&&p.test(e.value);const d=e=>v(e)||e.type==="number"&&h.test(e.unit);const b=e=>v(e)||e.type==="number"&&e.unit==="";const y=e=>v(e)||e.type==="number"&&e.unit==="%";const g=e=>e.type==="operator"&&e.value==="/";const m=[b,b,b,g,B];const C=[b,b,d,g,B];const w=[b,g,B];const S=e=>e.every((e,r)=>typeof m[r]==="function"&&m[r](e));const O=e=>e.every((e,r)=>typeof C[r]==="function"&&C[r](e));const T=e=>e.every((e,r)=>typeof w[r]==="function"&&w[r](e));const E=()=>o.comma({value:","});const k=e=>o.number({value:e});const P=e=>o.paren({value:e});e.exports=s},562:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=(e,r)=>{const t=Object(e.parent).type==="rule"?e.parent.clone({raws:{}}).removeAll():n.rule({selector:"&"});t.selectors=t.selectors.map(e=>`${e}:dir(${r})`);return t};const o=/^\s*logical\s+/i;const s=/^border(-width|-style|-color)?$/i;const a=/^border-(block|block-start|block-end|inline|inline-start|inline-end|start|end)(-(width|style|color))?$/i;var u={border:(e,r,t)=>{const n=o.test(r[0]);if(n){r[0]=r[0].replace(o,"")}const a=[e.clone({prop:`border-top${e.prop.replace(s,"$1")}`,value:r[0]}),e.clone({prop:`border-left${e.prop.replace(s,"$1")}`,value:r[1]||r[0]}),e.clone({prop:`border-bottom${e.prop.replace(s,"$1")}`,value:r[2]||r[0]}),e.clone({prop:`border-right${e.prop.replace(s,"$1")}`,value:r[3]||r[1]||r[0]})];const u=[e.clone({prop:`border-top${e.prop.replace(s,"$1")}`,value:r[0]}),e.clone({prop:`border-right${e.prop.replace(s,"$1")}`,value:r[1]||r[0]}),e.clone({prop:`border-bottom${e.prop.replace(s,"$1")}`,value:r[2]||r[0]}),e.clone({prop:`border-left${e.prop.replace(s,"$1")}`,value:r[3]||r[1]||r[0]})];return n?1===r.length?e.clone({value:e.value.replace(o,"")}):!r[3]||r[3]===r[1]?[e.clone({prop:`border-top${e.prop.replace(s,"$1")}`,value:r[0]}),e.clone({prop:`border-right${e.prop.replace(s,"$1")}`,value:r[3]||r[1]||r[0]}),e.clone({prop:`border-bottom${e.prop.replace(s,"$1")}`,value:r[2]||r[0]}),e.clone({prop:`border-left${e.prop.replace(s,"$1")}`,value:r[1]||r[0]})]:"ltr"===t?a:"rtl"===t?u:[i(e,"ltr").append(a),i(e,"rtl").append(u)]:null},"border-block":(e,r)=>[e.clone({prop:`border-top${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-bottom${e.prop.replace(a,"$2")}`,value:r[0]})],"border-block-start":e=>{e.prop="border-top"},"border-block-end":e=>{e.prop="border-bottom"},"border-inline":(e,r,t)=>{const n=[e.clone({prop:`border-left${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-right${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];const o=[e.clone({prop:`border-right${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-left${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];const s=1===r.length||2===r.length&&r[0]===r[1];return s?n:"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"border-inline-start":(e,r,t)=>{const n=e.clone({prop:`border-left${e.prop.replace(a,"$2")}`});const o=e.clone({prop:`border-right${e.prop.replace(a,"$2")}`});return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"border-inline-end":(e,r,t)=>{const n=e.clone({prop:`border-right${e.prop.replace(a,"$2")}`});const o=e.clone({prop:`border-left${e.prop.replace(a,"$2")}`});return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"border-start":(e,r,t)=>{const n=[e.clone({prop:`border-top${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-left${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];const o=[e.clone({prop:`border-top${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-right${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"border-end":(e,r,t)=>{const n=[e.clone({prop:`border-bottom${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-right${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];const o=[e.clone({prop:`border-bottom${e.prop.replace(a,"$2")}`,value:r[0]}),e.clone({prop:`border-left${e.prop.replace(a,"$2")}`,value:r[1]||r[0]})];return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]}};var f=(e,r,t)=>{const n=e.clone({value:"left"});const o=e.clone({value:"right"});return/^inline-start$/i.test(e.value)?"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]:/^inline-end$/i.test(e.value)?"ltr"===t?o:"rtl"===t?n:[i(e,"ltr").append(o),i(e,"rtl").append(n)]:null};var c=(e,r,t)=>{if("logical"!==r[0]){return[e.clone({prop:"top",value:r[0]}),e.clone({prop:"right",value:r[1]||r[0]}),e.clone({prop:"bottom",value:r[2]||r[0]}),e.clone({prop:"left",value:r[3]||r[1]||r[0]})]}const n=!r[4]||r[4]===r[2];const o=[e.clone({prop:"top",value:r[1]}),e.clone({prop:"left",value:r[2]||r[1]}),e.clone({prop:"bottom",value:r[3]||r[1]}),e.clone({prop:"right",value:r[4]||r[2]||r[1]})];const s=[e.clone({prop:"top",value:r[1]}),e.clone({prop:"right",value:r[2]||r[1]}),e.clone({prop:"bottom",value:r[3]||r[1]}),e.clone({prop:"left",value:r[4]||r[2]||r[1]})];return n||"ltr"===t?o:"rtl"===t?s:[i(e,"ltr").append(o),i(e,"rtl").append(s)]};var l=e=>/^block$/i.test(e.value)?e.clone({value:"vertical"}):/^inline$/i.test(e.value)?e.clone({value:"horizontal"}):null;var p=/^(inset|margin|padding)(?:-(block|block-start|block-end|inline|inline-start|inline-end|start|end))$/i;var h=/^inset-/i;var B=(e,r,t)=>e.clone({prop:`${e.prop.replace(p,"$1")}${r}`.replace(h,""),value:t});var v={block:(e,r)=>[B(e,"-top",r[0]),B(e,"-bottom",r[1]||r[0])],"block-start":e=>{e.prop=e.prop.replace(p,"$1-top").replace(h,"")},"block-end":e=>{e.prop=e.prop.replace(p,"$1-bottom").replace(h,"")},inline:(e,r,t)=>{const n=[B(e,"-left",r[0]),B(e,"-right",r[1]||r[0])];const o=[B(e,"-right",r[0]),B(e,"-left",r[1]||r[0])];const s=1===r.length||2===r.length&&r[0]===r[1];return s?n:"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"inline-start":(e,r,t)=>{const n=B(e,"-left",e.value);const o=B(e,"-right",e.value);return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},"inline-end":(e,r,t)=>{const n=B(e,"-right",e.value);const o=B(e,"-left",e.value);return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},start:(e,r,t)=>{const n=[B(e,"-top",r[0]),B(e,"-left",r[1]||r[0])];const o=[B(e,"-top",r[0]),B(e,"-right",r[1]||r[0])];return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]},end:(e,r,t)=>{const n=[B(e,"-bottom",r[0]),B(e,"-right",r[1]||r[0])];const o=[B(e,"-bottom",r[0]),B(e,"-left",r[1]||r[0])];return"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]}};var d=/^(min-|max-)?(block|inline)-(size)$/i;var b=e=>{e.prop=e.prop.replace(d,(e,r,t)=>`${r||""}${"block"===t?"height":"width"}`)};var y=(e,r,t)=>{if("logical"!==r[0]){return null}const n=!r[4]||r[4]===r[2];const o=e.clone({value:[r[1],r[4]||r[2]||r[1],r[3]||r[1],r[2]||r[1]].join(" ")});const s=e.clone({value:[r[1],r[2]||r[1],r[3]||r[1],r[4]||r[2]||r[1]].join(" ")});return n?e.clone({value:e.value.replace(/^\s*logical\s+/i,"")}):"ltr"===t?o:"rtl"===t?s:[i(e,"ltr").append(o),i(e,"rtl").append(s)]};var g=(e,r,t)=>{const n=e.clone({value:"left"});const o=e.clone({value:"right"});return/^start$/i.test(e.value)?"ltr"===t?n:"rtl"===t?o:[i(e,"ltr").append(n),i(e,"rtl").append(o)]:/^end$/i.test(e.value)?"ltr"===t?o:"rtl"===t?n:[i(e,"ltr").append(o),i(e,"rtl").append(n)]:null};function splitByComma(e,r){return splitByRegExp(e,/^,$/,r)}function splitBySpace(e,r){return splitByRegExp(e,/^\s$/,r)}function splitBySlash(e,r){return splitByRegExp(e,/^\/$/,r)}function splitByRegExp(e,r,t){const n=[];let i="";let o=false;let s=0;let a=-1;while(++a0){s-=1}}else if(s===0){if(r.test(u)){o=true}}if(o){if(!t||i.trim()){n.push(t?i.trim():i)}if(!t){n.push(u)}i="";o=false}else{i+=u}}if(i!==""){n.push(t?i.trim():i)}return n}var m=(e,r,t)=>{const n=[];const o=[];splitByComma(e.value).forEach(e=>{let r=false;splitBySpace(e).forEach((e,t,i)=>{if(e in C){r=true;C[e].ltr.forEach(e=>{const r=i.slice();r.splice(t,1,e);if(n.length&&!/^,$/.test(n[n.length-1])){n.push(",")}n.push(r.join(""))});C[e].rtl.forEach(e=>{const r=i.slice();r.splice(t,1,e);if(o.length&&!/^,$/.test(o[o.length-1])){o.push(",")}o.push(r.join(""))})}});if(!r){n.push(e);o.push(e)}});const s=e.clone({value:n.join("")});const a=e.clone({value:o.join("")});return n.length&&"ltr"===t?s:o.length&&"rtl"===t?a:s.value!==a.value?[i(e,"ltr").append(s),i(e,"rtl").append(a)]:null};const C={"border-block":{ltr:["border-top","border-bottom"],rtl:["border-top","border-bottom"]},"border-block-color":{ltr:["border-top-color","border-bottom-color"],rtl:["border-top-color","border-bottom-color"]},"border-block-end":{ltr:["border-bottom"],rtl:["border-bottom"]},"border-block-end-color":{ltr:["border-bottom-color"],rtl:["border-bottom-color"]},"border-block-end-style":{ltr:["border-bottom-style"],rtl:["border-bottom-style"]},"border-block-end-width":{ltr:["border-bottom-width"],rtl:["border-bottom-width"]},"border-block-start":{ltr:["border-top"],rtl:["border-top"]},"border-block-start-color":{ltr:["border-top-color"],rtl:["border-top-color"]},"border-block-start-style":{ltr:["border-top-style"],rtl:["border-top-style"]},"border-block-start-width":{ltr:["border-top-width"],rtl:["border-top-width"]},"border-block-style":{ltr:["border-top-style","border-bottom-style"],rtl:["border-top-style","border-bottom-style"]},"border-block-width":{ltr:["border-top-width","border-bottom-width"],rtl:["border-top-width","border-bottom-width"]},"border-end":{ltr:["border-bottom","border-right"],rtl:["border-bottom","border-left"]},"border-end-color":{ltr:["border-bottom-color","border-right-color"],rtl:["border-bottom-color","border-left-color"]},"border-end-style":{ltr:["border-bottom-style","border-right-style"],rtl:["border-bottom-style","border-left-style"]},"border-end-width":{ltr:["border-bottom-width","border-right-width"],rtl:["border-bottom-width","border-left-width"]},"border-inline":{ltr:["border-left","border-right"],rtl:["border-left","border-right"]},"border-inline-color":{ltr:["border-left-color","border-right-color"],rtl:["border-left-color","border-right-color"]},"border-inline-end":{ltr:["border-right"],rtl:["border-left"]},"border-inline-end-color":{ltr:["border-right-color"],rtl:["border-left-color"]},"border-inline-end-style":{ltr:["border-right-style"],rtl:["border-left-style"]},"border-inline-end-width":{ltr:["border-right-width"],rtl:["border-left-width"]},"border-inline-start":{ltr:["border-left"],rtl:["border-right"]},"border-inline-start-color":{ltr:["border-left-color"],rtl:["border-right-color"]},"border-inline-start-style":{ltr:["border-left-style"],rtl:["border-right-style"]},"border-inline-start-width":{ltr:["border-left-width"],rtl:["border-right-width"]},"border-inline-style":{ltr:["border-left-style","border-right-style"],rtl:["border-left-style","border-right-style"]},"border-inline-width":{ltr:["border-left-width","border-right-width"],rtl:["border-left-width","border-right-width"]},"border-start":{ltr:["border-top","border-left"],rtl:["border-top","border-right"]},"border-start-color":{ltr:["border-top-color","border-left-color"],rtl:["border-top-color","border-right-color"]},"border-start-style":{ltr:["border-top-style","border-left-style"],rtl:["border-top-style","border-right-style"]},"border-start-width":{ltr:["border-top-width","border-left-width"],rtl:["border-top-width","border-right-width"]},"block-size":{ltr:["height"],rtl:["height"]},"inline-size":{ltr:["width"],rtl:["width"]},inset:{ltr:["top","right","bottom","left"],rtl:["top","right","bottom","left"]},"inset-block":{ltr:["top","bottom"],rtl:["top","bottom"]},"inset-block-start":{ltr:["top"],rtl:["top"]},"inset-block-end":{ltr:["bottom"],rtl:["bottom"]},"inset-end":{ltr:["bottom","right"],rtl:["bottom","left"]},"inset-inline":{ltr:["left","right"],rtl:["left","right"]},"inset-inline-start":{ltr:["left"],rtl:["right"]},"inset-inline-end":{ltr:["right"],rtl:["left"]},"inset-start":{ltr:["top","left"],rtl:["top","right"]},"margin-block":{ltr:["margin-top","margin-bottom"],rtl:["margin-top","margin-bottom"]},"margin-block-start":{ltr:["margin-top"],rtl:["margin-top"]},"margin-block-end":{ltr:["margin-bottom"],rtl:["margin-bottom"]},"margin-end":{ltr:["margin-bottom","margin-right"],rtl:["margin-bottom","margin-left"]},"margin-inline":{ltr:["margin-left","margin-right"],rtl:["margin-left","margin-right"]},"margin-inline-start":{ltr:["margin-left"],rtl:["margin-right"]},"margin-inline-end":{ltr:["margin-right"],rtl:["margin-left"]},"margin-start":{ltr:["margin-top","margin-left"],rtl:["margin-top","margin-right"]},"padding-block":{ltr:["padding-top","padding-bottom"],rtl:["padding-top","padding-bottom"]},"padding-block-start":{ltr:["padding-top"],rtl:["padding-top"]},"padding-block-end":{ltr:["padding-bottom"],rtl:["padding-bottom"]},"padding-end":{ltr:["padding-bottom","padding-right"],rtl:["padding-bottom","padding-left"]},"padding-inline":{ltr:["padding-left","padding-right"],rtl:["padding-left","padding-right"]},"padding-inline-start":{ltr:["padding-left"],rtl:["padding-right"]},"padding-inline-end":{ltr:["padding-right"],rtl:["padding-left"]},"padding-start":{ltr:["padding-top","padding-left"],rtl:["padding-top","padding-right"]}};var w=/^(?:(inset|margin|padding)(?:-(block|block-start|block-end|inline|inline-start|inline-end|start|end))|(min-|max-)?(block|inline)-(size))$/i;const S={border:u["border"],"border-width":u["border"],"border-style":u["border"],"border-color":u["border"],"border-block":u["border-block"],"border-block-width":u["border-block"],"border-block-style":u["border-block"],"border-block-color":u["border-block"],"border-block-start":u["border-block-start"],"border-block-start-width":u["border-block-start"],"border-block-start-style":u["border-block-start"],"border-block-start-color":u["border-block-start"],"border-block-end":u["border-block-end"],"border-block-end-width":u["border-block-end"],"border-block-end-style":u["border-block-end"],"border-block-end-color":u["border-block-end"],"border-inline":u["border-inline"],"border-inline-width":u["border-inline"],"border-inline-style":u["border-inline"],"border-inline-color":u["border-inline"],"border-inline-start":u["border-inline-start"],"border-inline-start-width":u["border-inline-start"],"border-inline-start-style":u["border-inline-start"],"border-inline-start-color":u["border-inline-start"],"border-inline-end":u["border-inline-end"],"border-inline-end-width":u["border-inline-end"],"border-inline-end-style":u["border-inline-end"],"border-inline-end-color":u["border-inline-end"],"border-start":u["border-start"],"border-start-width":u["border-start"],"border-start-style":u["border-start"],"border-start-color":u["border-start"],"border-end":u["border-end"],"border-end-width":u["border-end"],"border-end-style":u["border-end"],"border-end-color":u["border-end"],clear:f,inset:c,margin:y,padding:y,block:v["block"],"block-start":v["block-start"],"block-end":v["block-end"],inline:v["inline"],"inline-start":v["inline-start"],"inline-end":v["inline-end"],start:v["start"],end:v["end"],float:f,resize:l,size:b,"text-align":g,transition:m,"transition-property":m};const O=/^border(-block|-inline|-start|-end)?(-width|-style|-color)?$/i;var T=n.plugin("postcss-logical-properties",e=>{const r=Boolean(Object(e).preserve);const t=!r&&typeof Object(e).dir==="string"?/^rtl$/i.test(e.dir)?"rtl":"ltr":false;return e=>{e.walkDecls(e=>{const n=e.parent;const i=O.test(e.prop)?splitBySlash(e.value,true):splitBySpace(e.value,true);const o=e.prop.replace(w,"$2$5").toLowerCase();if(o in S){const s=S[o](e,i,t);if(s){[].concat(s).forEach(r=>{if(r.type==="rule"){n.before(r)}else{e.before(r)}});if(!r){e.remove();if(!n.nodes.length){n.remove()}}}}})}});e.exports=T},601:(e,r,t)=>{var n=t(4633);e.exports=n.plugin("postcss-media-minmax",function(){return function(e){var r={width:"px",height:"px","device-width":"px","device-height":"px","aspect-ratio":"","device-aspect-ratio":"",color:"","color-index":"",monochrome:"",resolution:"dpi"};var t=Object.keys(r);var n=.001;var i={">":1,"<":-1};var o={">":"min","<":"max"};function create_query(e,t,s,a,u){return a.replace(/([-\d\.]+)(.*)/,function(a,u,f){var c=parseFloat(u);if(parseFloat(u)||s){if(!s){if(f==="px"&&c===parseInt(u,10)){u=c+i[t]}else{u=Number(Math.round(parseFloat(u)+n*i[t]+"e6")+"e-6")}}}else{u=i[t]+r[e]}return"("+o[t]+"-"+e+": "+u+f+")"})}e.walkAtRules(function(e,r){if(e.name!=="media"&&e.name!=="custom-media"){return}e.params=e.params.replace(/\(\s*([a-z-]+?)\s*([<>])(=?)\s*((?:-?\d*\.?(?:\s*\/?\s*)?\d+[a-z]*)?)\s*\)/gi,function(r,n,i,o,s){var a="";if(t.indexOf(n)>-1){return create_query(n,i,o,s,e.params)}return r});e.params=e.params.replace(/\(\s*((?:-?\d*\.?(?:\s*\/?\s*)?\d+[a-z]*)?)\s*(<|>)(=?)\s*([a-z-]+)\s*(<|>)(=?)\s*((?:-?\d*\.?(?:\s*\/?\s*)?\d+[a-z]*)?)\s*\)/gi,function(e,r,n,i,o,s,a,u){if(t.indexOf(o)>-1){if(n==="<"&&s==="<"||n===">"&&s===">"){var f=n==="<"?r:u;var c=n==="<"?u:r;var l=i;var p=a;if(n===">"){l=a;p=i}return create_query(o,">",l,f)+" and "+create_query(o,"<",p,c)}}return e})})}})},9717:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=t(4633);var i=_interopDefault(n);function shiftNodesBeforeParent(e){const r=e.parent;const t=r.index(e);if(t){r.cloneBefore().removeAll().append(r.nodes.slice(0,t))}r.before(e);return r}function cleanupParent(e){if(!e.nodes.length){e.remove()}}var o=/&(?:[^\w-|]|$)/;const s=/&/g;function mergeSelectors(e,r){return e.reduce((e,t)=>e.concat(r.map(e=>e.replace(s,t))),[])}function transformRuleWithinRule(e){const r=shiftNodesBeforeParent(e);e.selectors=mergeSelectors(r.selectors,e.selectors);const t=e.type==="rule"&&r.type==="rule"&&e.selector===r.selector||e.type==="atrule"&&r.type==="atrule"&&e.params===r.params;if(t){e.append(...r.nodes)}cleanupParent(r)}const a=e=>e.type==="rule"&&Object(e.parent).type==="rule"&&e.selectors.every(e=>e.trim().lastIndexOf("&")===0&&o.test(e));const u=n.list.comma;function transformNestRuleWithinRule(e){const r=shiftNodesBeforeParent(e);const t=r.clone().removeAll().append(e.nodes);e.replaceWith(t);t.selectors=mergeSelectors(r.selectors,u(e.params));cleanupParent(r);walk(t)}const f=e=>e.type==="atrule"&&e.name==="nest"&&Object(e.parent).type==="rule"&&u(e.params).every(e=>e.split("&").length===2&&o.test(e));var c=["document","media","supports"];function atruleWithinRule(e){const r=shiftNodesBeforeParent(e);const t=r.clone().removeAll().append(e.nodes);e.append(t);cleanupParent(r);walk(t)}const l=e=>e.type==="atrule"&&c.indexOf(e.name)!==-1&&Object(e.parent).type==="rule";const p=n.list.comma;function mergeParams(e,r){return p(e).map(e=>p(r).map(r=>`${e} and ${r}`).join(", ")).join(", ")}function transformAtruleWithinAtrule(e){const r=shiftNodesBeforeParent(e);e.params=mergeParams(r.params,e.params);cleanupParent(r)}const h=e=>e.type==="atrule"&&c.indexOf(e.name)!==-1&&Object(e.parent).type==="atrule"&&e.name===e.parent.name;function walk(e){e.nodes.slice(0).forEach(r=>{if(r.parent===e){if(a(r)){transformRuleWithinRule(r)}else if(f(r)){transformNestRuleWithinRule(r)}else if(l(r)){atruleWithinRule(r)}else if(h(r)){transformAtruleWithinAtrule(r)}if(Object(r.nodes).length){walk(r)}}})}var B=i.plugin("postcss-nesting",()=>walk);e.exports=B},498:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_nonIterableRest()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}const i=n.list.space;const o=/^overflow$/i;var s=n.plugin("postcss-overflow-shorthand",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;return e=>{e.walkDecls(o,e=>{const t=i(e.value),n=_toArray(t),o=n[0],s=n[1],a=n.slice(2);if(s&&!a.length){e.cloneBefore({prop:`${e.prop}-x`,value:o});e.cloneBefore({prop:`${e.prop}-y`,value:s});if(!r){e.remove()}}})}});e.exports=s},2841:(e,r,t)=>{var n=t(4633);e.exports=n.plugin("postcss-page-break",function(){return function(e){e.walkDecls(/^break-(inside|before|after)/,function(e){if(e.value.search(/column|region/)>=0){return}var r;switch(e.value){case"page":r="always";break;case"avoid-page":r="avoid";break;default:r=e.value}e.cloneBefore({prop:"page-"+e.prop,value:r})})}})},1431:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(9448));const o=/^place-(content|items|self)/;var s=n.plugin("postcss-place",e=>{const r="preserve"in Object(e)?Boolean(e.prefix):true;return e=>{e.walkDecls(o,e=>{const t=e.prop.match(o)[1];const n=i(e.value).parse();const s=n.nodes[0].nodes;const a=s.length===1?e.value:String(s.slice(0,1)).trim();const u=s.length===1?e.value:String(s.slice(1)).trim();e.cloneBefore({prop:`align-${t}`,value:a});e.cloneBefore({prop:`justify-${t}`,value:u});if(!r){e.remove()}})}});e.exports=s},7435:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(3501));var i=_interopDefault(t(3561));var o=_interopDefault(t(3094));var s=_interopDefault(t(4633));var a=_interopDefault(t(2347));var u=_interopDefault(t(9883));var f=_interopDefault(t(7814));var c=_interopDefault(t(489));var l=_interopDefault(t(8157));var p=_interopDefault(t(8881));var h=_interopDefault(t(9971));var B=_interopDefault(t(4731));var v=_interopDefault(t(8713));var d=_interopDefault(t(8758));var b=_interopDefault(t(3650));var y=_interopDefault(t(3030));var g=_interopDefault(t(5538));var m=_interopDefault(t(9642));var C=_interopDefault(t(8059));var w=_interopDefault(t(3203));var S=_interopDefault(t(9547));var O=_interopDefault(t(9555));var T=_interopDefault(t(4287));var E=_interopDefault(t(7501));var k=_interopDefault(t(7972));var P=_interopDefault(t(562));var D=_interopDefault(t(601));var A=_interopDefault(t(9717));var R=_interopDefault(t(498));var F=_interopDefault(t(2841));var x=_interopDefault(t(1431));var j=_interopDefault(t(2207));var I=_interopDefault(t(1832));var M=_interopDefault(t(9020));var N=_interopDefault(t(40));var _=_interopDefault(t(8158));var L=t(4338);var q=_interopDefault(t(5747));var G=_interopDefault(t(5622));var J=s.plugin("postcss-system-ui-font",()=>e=>{e.walkDecls(U,e=>{e.value=e.value.replace(K,W)})});const U=/(?:^(?:-|\\002d){2})|(?:^font(?:-family)?$)/i;const H="[\\f\\n\\r\\x09\\x20]";const Q=["system-ui","-apple-system","Segoe UI","Roboto","Ubuntu","Cantarell","Noto Sans","sans-serif"];const K=new RegExp(`(^|,|${H}+)(?:system-ui${H}*)(?:,${H}*(?:${Q.join("|")})${H}*)?(,|$)`,"i");const W=`$1${Q.join(", ")}$2`;var Y={"all-property":E,"any-link-pseudo-class":I,"blank-pseudo-class":u,"break-properties":F,"case-insensitive-attributes":a,"color-functional-notation":f,"color-mod-function":p,"custom-media-queries":B,"custom-properties":v,"custom-selectors":d,"dir-pseudo-class":b,"double-position-gradients":y,"environment-variables":g,"focus-visible-pseudo-class":m,"focus-within-pseudo-class":C,"font-variant-property":w,"gap-properties":S,"gray-function":c,"has-pseudo-class":O,"hexadecimal-alpha-notation":l,"image-set-function":T,"lab-function":k,"logical-properties-and-values":P,"matches-pseudo-class":N,"media-query-ranges":D,"nesting-rules":A,"not-pseudo-class":_,"overflow-property":R,"overflow-wrap-property":M,"place-properties":x,"prefers-color-scheme-query":j,"rebeccapurple-color":h,"system-ui-font-family":J};function getTransformedInsertions(e,r){return Object.keys(e).map(t=>[].concat(e[t]).map(e=>({[r]:true,plugin:e,id:t}))).reduce((e,r)=>e.concat(r),[])}function getUnsupportedBrowsersByFeature(e){const r=L.features[e];if(r){const e=L.feature(r).stats;const t=Object.keys(e).reduce((r,t)=>r.concat(Object.keys(e[t]).filter(r=>e[t][r].indexOf("y")!==0).map(e=>`${t} ${e}`)),[]);return t}else{return["> 0%"]}}var z=["custom-media-queries","custom-properties","environment-variables","image-set-function","media-query-ranges","prefers-color-scheme-query","nesting-rules","custom-selectors","any-link-pseudo-class","case-insensitive-attributes","focus-visible-pseudo-class","focus-within-pseudo-class","matches-pseudo-class","not-pseudo-class","logical-properties-and-values","dir-pseudo-class","all-property","color-functional-notation","double-position-gradients","gray-function","hexadecimal-alpha-notation","lab-function","rebeccapurple-color","color-mod-function","blank-pseudo-class","break-properties","font-variant-property","has-pseudo-class","gap-properties","overflow-property","overflow-wrap-property","place-properties","system-ui-font-family"];function asyncGeneratorStep(e,r,t,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){t(e);return}if(a.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(undefined)})}}function getCustomMediaAsCss(e){const r=Object.keys(e).reduce((r,t)=>{r.push(`@custom-media ${t} ${e[t]};`);return r},[]).join("\n");const t=`${r}\n`;return t}function getCustomPropertiesAsCss(e){const r=Object.keys(e).reduce((r,t)=>{r.push(`\t${t}: ${e[t]};`);return r},[]).join("\n");const t=`:root {\n${r}\n}\n`;return t}function getCustomSelectorsAsCss(e){const r=Object.keys(e).reduce((r,t)=>{r.push(`@custom-selector ${t} ${e[t]};`);return r},[]).join("\n");const t=`${r}\n`;return t}function writeExportsToCssFile(e,r,t,n){return _writeExportsToCssFile.apply(this,arguments)}function _writeExportsToCssFile(){_writeExportsToCssFile=_asyncToGenerator(function*(e,r,t,n){const i=getCustomPropertiesAsCss(t);const o=getCustomMediaAsCss(r);const s=getCustomSelectorsAsCss(n);const a=`${o}\n${s}\n${i}`;yield writeFile(e,a)});return _writeExportsToCssFile.apply(this,arguments)}function writeExportsToJsonFile(e,r,t,n){return _writeExportsToJsonFile.apply(this,arguments)}function _writeExportsToJsonFile(){_writeExportsToJsonFile=_asyncToGenerator(function*(e,r,t,n){const i=JSON.stringify({"custom-media":r,"custom-properties":t,"custom-selectors":n},null," ");const o=`${i}\n`;yield writeFile(e,o)});return _writeExportsToJsonFile.apply(this,arguments)}function getObjectWithKeyAsCjs(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t\t'${escapeForJS(t)}': '${escapeForJS(r[t])}'`);return e},[]).join(",\n");const n=`\n\t${e}: {\n${t}\n\t}`;return n}function writeExportsToCjsFile(e,r,t,n){return _writeExportsToCjsFile.apply(this,arguments)}function _writeExportsToCjsFile(){_writeExportsToCjsFile=_asyncToGenerator(function*(e,r,t,n){const i=getObjectWithKeyAsCjs("customMedia",r);const o=getObjectWithKeyAsCjs("customProperties",t);const s=getObjectWithKeyAsCjs("customSelectors",n);const a=`module.exports = {${i},${o},${s}\n};\n`;yield writeFile(e,a)});return _writeExportsToCjsFile.apply(this,arguments)}function getObjectWithKeyAsMjs(e,r){const t=Object.keys(r).reduce((e,t)=>{e.push(`\t'${escapeForJS(t)}': '${escapeForJS(r[t])}'`);return e},[]).join(",\n");const n=`export const ${e} = {\n${t}\n};\n`;return n}function writeExportsToMjsFile(e,r,t,n){return _writeExportsToMjsFile.apply(this,arguments)}function _writeExportsToMjsFile(){_writeExportsToMjsFile=_asyncToGenerator(function*(e,r,t,n){const i=getObjectWithKeyAsMjs("customMedia",r);const o=getObjectWithKeyAsMjs("customProperties",t);const s=getObjectWithKeyAsMjs("customSelectors",n);const a=`${i}\n${o}\n${s}`;yield writeFile(e,a)});return _writeExportsToMjsFile.apply(this,arguments)}function writeToExports(e,r){return Promise.all([].concat(r).map(function(){var r=_asyncToGenerator(function*(r){if(r instanceof Function){yield r({customMedia:getObjectWithStringifiedKeys(e.customMedia),customProperties:getObjectWithStringifiedKeys(e.customProperties),customSelectors:getObjectWithStringifiedKeys(e.customSelectors)})}else{const t=r===Object(r)?r:{to:String(r)};const n=t.toJSON||getObjectWithStringifiedKeys;if("customMedia"in t||"customProperties"in t||"customSelectors"in t){t.customMedia=n(e.customMedia);t.customProperties=n(e.customProperties);t.customSelectors=n(e.customSelectors)}else if("custom-media"in t||"custom-properties"in t||"custom-selectors"in t){t["custom-media"]=n(e.customMedia);t["custom-properties"]=n(e.customProperties);t["custom-selectors"]=n(e.customSelectors)}else{const r=String(t.to||"");const i=(t.type||G.extname(t.to).slice(1)).toLowerCase();const o=n(e.customMedia);const s=n(e.customProperties);const a=n(e.customSelectors);if(i==="css"){yield writeExportsToCssFile(r,o,s,a)}if(i==="js"){yield writeExportsToCjsFile(r,o,s,a)}if(i==="json"){yield writeExportsToJsonFile(r,o,s,a)}if(i==="mjs"){yield writeExportsToMjsFile(r,o,s,a)}}}});return function(e){return r.apply(this,arguments)}}()))}function getObjectWithStringifiedKeys(e){return Object.keys(e).reduce((r,t)=>{r[t]=String(e[t]);return r},{})}function writeFile(e,r){return new Promise((t,n)=>{q.writeFile(e,r,e=>{if(e){n(e)}else{t()}})})}function escapeForJS(e){return e.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}var $=s.plugin("postcss-preset-env",e=>{const r=Object(Object(e).features);const t=Object(Object(e).insertBefore);const s=Object(Object(e).insertAfter);const a=Object(e).browsers;const u="stage"in Object(e)?e.stage===false?5:parseInt(e.stage)||0:2;const f=Object(e).autoprefixer;const c=X(Object(e));const l=f===false?()=>{}:n(Object.assign({overrideBrowserslist:a},f));const p=o.concat(getTransformedInsertions(t,"insertBefore"),getTransformedInsertions(s,"insertAfter")).filter(e=>e.insertBefore||e.id in Y).sort((e,r)=>z.indexOf(e.id)-z.indexOf(r.id)||(e.insertBefore?-1:r.insertBefore?1:0)||(e.insertAfter?1:r.insertAfter?-1:0)).map(e=>{const r=getUnsupportedBrowsersByFeature(e.caniuse);return e.insertBefore||e.insertAfter?{browsers:r,plugin:e.plugin,id:`${e.insertBefore?"before":"after"}-${e.id}`,stage:6}:{browsers:r,plugin:Y[e.id],id:e.id,stage:e.stage}});const h=p.filter(e=>e.id in r?r[e.id]:e.stage>=u).map(e=>({browsers:e.browsers,plugin:typeof e.plugin.process==="function"?r[e.id]===true?c?e.plugin(Object.assign({},c)):e.plugin():c?e.plugin(Object.assign({},c,r[e.id])):e.plugin(Object.assign({},r[e.id])):e.plugin,id:e.id}));const B=i(a,{ignoreUnknownVersions:true});const v=h.filter(e=>B.some(r=>i(e.browsers,{ignoreUnknownVersions:true}).some(e=>e===r)));return(r,t)=>{const n=v.reduce((e,r)=>e.then(()=>r.plugin(t.root,t)),Promise.resolve()).then(()=>l(t.root,t)).then(()=>{if(Object(e).exportTo){writeToExports(c.exportTo,e.exportTo)}});return n}});const X=e=>{if("importFrom"in e||"exportTo"in e||"preserve"in e){const r={};if("importFrom"in e){r.importFrom=e.importFrom}if("exportTo"in e){r.exportTo={customMedia:{},customProperties:{},customSelectors:{}}}if("preserve"in e){r.preserve=e.preserve}return r}return false};e.exports=$},1832:(e,r,t)=>{"use strict";function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var n=_interopDefault(t(4633));var i=_interopDefault(t(741));const o=/:any-link/;var s=n.plugin("postcss-pseudo-class-any-link",e=>{const r="preserve"in Object(e)?Boolean(e.preserve):true;return e=>{e.walkRules(o,e=>{const t=e.raws.selector&&e.raws.selector.raw||e.selector;if(t[t.length-1]!==":"){const n=i(e=>{let r;let t;let n;let i;let o;let s=-1;while(n=e.nodes[++s]){t=-1;while(r=n.nodes[++t]){if(r.value===":any-link"){i=n.clone();o=n.clone();i.nodes[t].value=":link";o.nodes[t].value=":visited";e.nodes.splice(s--,1,i,o);break}}}}).processSync(t);if(n!==t){if(r){e.cloneBefore({selector:n})}else{e.selector=n}}}})}});e.exports=s},9018:e=>{"use strict";var r={};var t=r.hasOwnProperty;var n=function merge(e,r){if(!e){return r}var n={};for(var i in r){n[i]=t.call(e,i)?e[i]:r[i]}return n};var i=/[ -,\.\/;-@\[-\^`\{-~]/;var o=/[ -,\.\/;-@\[\]\^`\{-~]/;var s=/['"\\]/;var a=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;var u=function cssesc(e,r){r=n(r,cssesc.options);if(r.quotes!="single"&&r.quotes!="double"){r.quotes="single"}var t=r.quotes=="double"?'"':"'";var s=r.isIdentifier;var u=e.charAt(0);var f="";var c=0;var l=e.length;while(c126){if(h>=55296&&h<=56319&&c{"use strict";r.__esModule=true;var n=t(268);var i=_interopRequireDefault(n);var o=t(5848);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a=function parser(e){return new i.default(e)};Object.assign(a,s);delete a.__esModule;r.default=a;e.exports=r["default"]},4682:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parser);this.rule=e;this.options=Object.assign({lossy:false,safe:false},r);this.position=0;this.css=typeof this.rule==="string"?this.rule:this.rule.selector;this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var t=getTokenSourceSpan(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new p.default({source:t});this.root.errorGenerator=this._errorGenerator();var n=new B.default({source:{start:{line:1,column:1}}});this.root.append(n);this.current=n;this.loop()}Parser.prototype._errorGenerator=function _errorGenerator(){var e=this;return function(r,t){if(typeof e.rule==="string"){return new Error(r)}return e.rule.error(r,t)}};Parser.prototype.attribute=function attribute(){var e=[];var r=this.currToken;this.position++;while(this.position1&&arguments[1]!==undefined?arguments[1]:false;var n="";var i="";e.forEach(function(e){var o=r.lossySpace(e.spaces.before,t);var s=r.lossySpace(e.rawSpaceBefore,t);n+=o+r.lossySpace(e.spaces.after,t&&o.length===0);i+=o+e.value+r.lossySpace(e.rawSpaceAfter,t&&s.length===0)});if(i===n){i=undefined}var o={space:n,rawSpace:i};return o};Parser.prototype.isNamedCombinator=function isNamedCombinator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position;return this.tokens[e+0]&&this.tokens[e+0][N.FIELDS.TYPE]===q.slash&&this.tokens[e+1]&&this.tokens[e+1][N.FIELDS.TYPE]===q.word&&this.tokens[e+2]&&this.tokens[e+2][N.FIELDS.TYPE]===q.slash};Parser.prototype.namedCombinator=function namedCombinator(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]);var r=(0,U.unesc)(e).toLowerCase();var t={};if(r!==e){t.value="/"+e+"/"}var n=new F.default({value:"/"+r+"/",source:getSource(this.currToken[N.FIELDS.START_LINE],this.currToken[N.FIELDS.START_COL],this.tokens[this.position+2][N.FIELDS.END_LINE],this.tokens[this.position+2][N.FIELDS.END_COL]),sourceIndex:this.currToken[N.FIELDS.START_POS],raws:t});this.position=this.position+3;return n}else{this.unexpected()}};Parser.prototype.combinator=function combinator(){var e=this;if(this.content()==="|"){return this.namespace()}var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][N.FIELDS.TYPE]===q.comma){var t=this.parseWhitespaceEquivalentTokens(r);if(t.length>0){var n=this.current.last;if(n){var i=this.convertWhitespaceNodesToSpace(t),o=i.space,s=i.rawSpace;if(s!==undefined){n.rawSpaceAfter+=s}n.spaces.after+=o}else{t.forEach(function(r){return e.newNode(r)})}}return}var a=this.currToken;var u=undefined;if(r>this.position){u=this.parseWhitespaceEquivalentTokens(r)}var f=void 0;if(this.isNamedCombinator()){f=this.namedCombinator()}else if(this.currToken[N.FIELDS.TYPE]===q.combinator){f=new F.default({value:this.content(),source:getTokenSource(this.currToken),sourceIndex:this.currToken[N.FIELDS.START_POS]});this.position++}else if(H[this.currToken[N.FIELDS.TYPE]]){}else if(!u){this.unexpected()}if(f){if(u){var c=this.convertWhitespaceNodesToSpace(u),l=c.space,p=c.rawSpace;f.spaces.before=l;f.rawSpaceBefore=p}}else{var h=this.convertWhitespaceNodesToSpace(u,true),B=h.space,v=h.rawSpace;if(!v){v=B}var d={};var b={spaces:{}};if(B.endsWith(" ")&&v.endsWith(" ")){d.before=B.slice(0,B.length-1);b.spaces.before=v.slice(0,v.length-1)}else if(B.startsWith(" ")&&v.startsWith(" ")){d.after=B.slice(1);b.spaces.after=v.slice(1)}else{b.value=v}f=new F.default({value:" ",source:getTokenSourceSpan(a,this.tokens[this.position-1]),sourceIndex:a[N.FIELDS.START_POS],spaces:d,raws:b})}if(this.currToken&&this.currToken[N.FIELDS.TYPE]===q.space){f.spaces.after=this.optionalSpace(this.content());this.position++}return this.newNode(f)};Parser.prototype.comma=function comma(){if(this.position===this.tokens.length-1){this.root.trailingComma=true;this.position++;return}this.current._inferEndPosition();var e=new B.default({source:{start:tokenStart(this.tokens[this.position+1])}});this.current.parent.append(e);this.current=e;this.position++};Parser.prototype.comment=function comment(){var e=this.currToken;this.newNode(new y.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.error=function error(e,r){throw this.root.error(e,r)};Parser.prototype.missingBackslash=function missingBackslash(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[N.FIELDS.START_POS]})};Parser.prototype.missingParenthesis=function missingParenthesis(){return this.expected("opening parenthesis",this.currToken[N.FIELDS.START_POS])};Parser.prototype.missingSquareBracket=function missingSquareBracket(){return this.expected("opening square bracket",this.currToken[N.FIELDS.START_POS])};Parser.prototype.unexpected=function unexpected(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[N.FIELDS.START_POS])};Parser.prototype.namespace=function namespace(){var e=this.prevToken&&this.content(this.prevToken)||true;if(this.nextToken[N.FIELDS.TYPE]===q.word){this.position++;return this.word(e)}else if(this.nextToken[N.FIELDS.TYPE]===q.asterisk){this.position++;return this.universal(e)}};Parser.prototype.nesting=function nesting(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var r=this.currToken;this.newNode(new j.default({value:this.content(),source:getTokenSource(r),sourceIndex:r[N.FIELDS.START_POS]}));this.position++};Parser.prototype.parentheses=function parentheses(){var e=this.current.last;var r=1;this.position++;if(e&&e.type===J.PSEUDO){var t=new B.default({source:{start:tokenStart(this.tokens[this.position-1])}});var n=this.current;e.append(t);this.current=t;while(this.position1&&e.nextToken&&e.nextToken[N.FIELDS.TYPE]===q.openParenthesis){e.error("Misplaced parenthesis.",{index:e.nextToken[N.FIELDS.START_POS]})}})}else{return this.expected(["pseudo-class","pseudo-element"],this.currToken[N.FIELDS.START_POS])}};Parser.prototype.space=function space(){var e=this.content();if(this.position===0||this.prevToken[N.FIELDS.TYPE]===q.comma||this.prevToken[N.FIELDS.TYPE]===q.openParenthesis){this.spaces=this.optionalSpace(e);this.position++}else if(this.position===this.tokens.length-1||this.nextToken[N.FIELDS.TYPE]===q.comma||this.nextToken[N.FIELDS.TYPE]===q.closeParenthesis){this.current.last.spaces.after=this.optionalSpace(e);this.position++}else{this.combinator()}};Parser.prototype.string=function string(){var e=this.currToken;this.newNode(new O.default({value:this.content(),source:getTokenSource(e),sourceIndex:e[N.FIELDS.START_POS]}));this.position++};Parser.prototype.universal=function universal(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}var t=this.currToken;this.newNode(new A.default({value:this.content(),source:getTokenSource(t),sourceIndex:t[N.FIELDS.START_POS]}),e);this.position++};Parser.prototype.splitWord=function splitWord(e,r){var t=this;var n=this.nextToken;var i=this.content();while(n&&~[q.dollar,q.caret,q.equals,q.word].indexOf(n[N.FIELDS.TYPE])){this.position++;var o=this.content();i+=o;if(o.lastIndexOf("\\")===o.length-1){var s=this.nextToken;if(s&&s[N.FIELDS.TYPE]===q.space){i+=this.requiredSpace(this.content(s));this.position++}}n=this.nextToken}var a=(0,u.default)(i,".").filter(function(e){return i[e-1]!=="\\"});var f=(0,u.default)(i,"#");var l=(0,u.default)(i,"#{");if(l.length){f=f.filter(function(e){return!~l.indexOf(e)})}var p=(0,M.default)((0,c.default)([0].concat(a,f)));p.forEach(function(n,o){var s=p[o+1]||i.length;var u=i.slice(n,s);if(o===0&&r){return r.call(t,u,p.length)}var c=void 0;var l=t.currToken;var h=l[N.FIELDS.START_POS]+p[o];var B=getSource(l[1],l[2]+n,l[3],l[2]+(s-1));if(~a.indexOf(n)){var v={value:u.slice(1),source:B,sourceIndex:h};c=new d.default(unescapeProp(v,"value"))}else if(~f.indexOf(n)){var b={value:u.slice(1),source:B,sourceIndex:h};c=new m.default(unescapeProp(b,"value"))}else{var y={value:u,source:B,sourceIndex:h};unescapeProp(y,"value");c=new w.default(y)}t.newNode(c,e);e=null});this.position++};Parser.prototype.word=function word(e){var r=this.nextToken;if(r&&this.content(r)==="|"){this.position++;return this.namespace()}return this.splitWord(e)};Parser.prototype.loop=function loop(){while(this.position0&&arguments[0]!==undefined?arguments[0]:this.currToken;return this.css.slice(e[N.FIELDS.START_POS],e[N.FIELDS.END_POS])};Parser.prototype.locateNextMeaningfulToken=function locateNextMeaningfulToken(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.position+1;var r=e;while(r{"use strict";r.__esModule=true;var n=t(4682);var i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=function(){function Processor(e,r){_classCallCheck(this,Processor);this.func=e||function noop(){};this.funcRes=null;this.options=r}Processor.prototype._shouldUpdateSelector=function _shouldUpdateSelector(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=Object.assign({},this.options,r);if(t.updateSelector===false){return false}else{return typeof e!=="string"}};Processor.prototype._isLossy=function _isLossy(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=Object.assign({},this.options,e);if(r.lossless===false){return true}else{return false}};Processor.prototype._root=function _root(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=new i.default(e,this._parseOptions(r));return t.root};Processor.prototype._parseOptions=function _parseOptions(e){return{lossy:this._isLossy(e)}};Processor.prototype._run=function _run(e){var r=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new Promise(function(n,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(n){var i=undefined;if(r._shouldUpdateSelector(e,t)){i=o.toString();e.selector=i}return{transform:n,root:o,string:i}}).then(n,i)}catch(e){i(e);return}})};Processor.prototype._runSync=function _runSync(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var t=this._root(e,r);var n=this.func(t);if(n&&typeof n.then==="function"){throw new Error("Selector processor returned a promise to a synchronous call.")}var i=undefined;if(r.updateSelector&&typeof e!=="string"){i=t.toString();e.selector=i}return{transform:n,root:t,string:i}};Processor.prototype.ast=function ast(e,r){return this._run(e,r).then(function(e){return e.root})};Processor.prototype.astSync=function astSync(e,r){return this._runSync(e,r).root};Processor.prototype.transform=function transform(e,r){return this._run(e,r).then(function(e){return e.transform})};Processor.prototype.transformSync=function transformSync(e,r){return this._runSync(e,r).transform};Processor.prototype.process=function process(e,r){return this._run(e,r).then(function(e){return e.string||e.root.toString()})};Processor.prototype.processSync=function processSync(e,r){var t=this._runSync(e,r);return t.string||t.root.toString()};return Processor}();r.default=o;e.exports=r["default"]},7239:(e,r,t)=>{"use strict";r.__esModule=true;var n;var i=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Attribute);var t=_possibleConstructorReturn(this,e.call(this,handleDeprecatedContructorOpts(r)));t.type=l.ATTRIBUTE;t.raws=t.raws||{};Object.defineProperty(t.raws,"unquoted",{get:h(function(){return t.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:h(function(){return t.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")});t._constructed=true;return t}Attribute.prototype.getQuotedValue=function getQuotedValue(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=this._determineQuoteMark(e);var t=g[r];var n=(0,s.default)(this._value,t);return n};Attribute.prototype._determineQuoteMark=function _determineQuoteMark(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)};Attribute.prototype.setValue=function setValue(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this._value=e;this._quoteMark=this._determineQuoteMark(r);this._syncRawValue()};Attribute.prototype.smartQuoteMark=function smartQuoteMark(e){var r=this.value;var t=r.replace(/[^']/g,"").length;var n=r.replace(/[^"]/g,"").length;if(t+n===0){var i=(0,s.default)(r,{isIdentifier:true});if(i===r){return Attribute.NO_QUOTE}else{var o=this.preferredQuoteMark(e);if(o===Attribute.NO_QUOTE){var a=this.quoteMark||e.quoteMark||Attribute.DOUBLE_QUOTE;var u=g[a];var f=(0,s.default)(r,u);if(f.length1&&arguments[1]!==undefined?arguments[1]:e;var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:defaultAttrConcat;var n=this._spacesFor(r);return t(this.stringifyProperty(e),n)};Attribute.prototype.offsetOf=function offsetOf(e){var r=1;var t=this._spacesFor("attribute");r+=t.before.length;if(e==="namespace"||e==="ns"){return this.namespace?r:-1}if(e==="attributeNS"){return r}r+=this.namespaceString.length;if(this.namespace){r+=1}if(e==="attribute"){return r}r+=this.stringifyProperty("attribute").length;r+=t.after.length;var n=this._spacesFor("operator");r+=n.before.length;var i=this.stringifyProperty("operator");if(e==="operator"){return i?r:-1}r+=i.length;r+=n.after.length;var o=this._spacesFor("value");r+=o.before.length;var s=this.stringifyProperty("value");if(e==="value"){return s?r:-1}r+=s.length;r+=o.after.length;var a=this._spacesFor("insensitive");r+=a.before.length;if(e==="insensitive"){return this.insensitive?r:-1}return-1};Attribute.prototype.toString=function toString(){var e=this;var r=[this.rawSpaceBefore,"["];r.push(this._stringFor("qualifiedAttribute","attribute"));if(this.operator&&this.value){r.push(this._stringFor("operator"));r.push(this._stringFor("value"));r.push(this._stringFor("insensitiveFlag","insensitive",function(r,t){if(r.length>0&&!e.quoted&&t.before.length===0&&!(e.spaces.value&&e.spaces.value.after)){t.before=" "}return defaultAttrConcat(r,t)}))}r.push("]");r.push(this.rawSpaceAfter);return r.join("")};i(Attribute,[{key:"quoted",get:function get(){var e=this.quoteMark;return e==="'"||e==='"'},set:function set(e){d()}},{key:"quoteMark",get:function get(){return this._quoteMark},set:function set(e){if(!this._constructed){this._quoteMark=e;return}if(this._quoteMark!==e){this._quoteMark=e;this._syncRawValue()}}},{key:"qualifiedAttribute",get:function get(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function get(){return this.insensitive?"i":""}},{key:"value",get:function get(){return this._value},set:function set(e){if(this._constructed){var r=unescapeValue(e),t=r.deprecatedUsage,n=r.unescaped,i=r.quoteMark;if(t){v()}if(n===this._value&&i===this._quoteMark){return}this._value=n;this._quoteMark=i;this._syncRawValue()}else{this._value=e}}},{key:"attribute",get:function get(){return this._attribute},set:function set(e){this._handleEscapes("attribute",e);this._attribute=e}}]);return Attribute}(c.default);y.NO_QUOTE=null;y.SINGLE_QUOTE="'";y.DOUBLE_QUOTE='"';r.default=y;var g=(n={"'":{quotes:"single",wrap:true},'"':{quotes:"double",wrap:true}},n[null]={isIdentifier:true},n);function defaultAttrConcat(e,r){return""+r.before+e+r.after}},2961:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(5387);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Combinator,e);function Combinator(r){_classCallCheck(this,Combinator);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMBINATOR;return t}return Combinator}(i.default);r.default=s;e.exports=r["default"]},2622:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(5387);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Comment,e);function Comment(r){_classCallCheck(this,Comment);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.COMMENT;return t}return Comment}(i.default);r.default=s;e.exports=r["default"]},4649:(e,r,t)=>{"use strict";r.__esModule=true;r.universal=r.tag=r.string=r.selector=r.root=r.pseudo=r.nesting=r.id=r.comment=r.combinator=r.className=r.attribute=undefined;var n=t(7239);var i=_interopRequireDefault(n);var o=t(2961);var s=_interopRequireDefault(o);var a=t(415);var u=_interopRequireDefault(a);var f=t(2622);var c=_interopRequireDefault(f);var l=t(6856);var p=_interopRequireDefault(l);var h=t(7939);var B=_interopRequireDefault(h);var v=t(9189);var d=_interopRequireDefault(v);var b=t(7156);var y=_interopRequireDefault(b);var g=t(8727);var m=_interopRequireDefault(g);var C=t(1572);var w=_interopRequireDefault(C);var S=t(2252);var O=_interopRequireDefault(S);var T=t(3447);var E=_interopRequireDefault(T);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var k=r.attribute=function attribute(e){return new i.default(e)};var P=r.className=function className(e){return new s.default(e)};var D=r.combinator=function combinator(e){return new u.default(e)};var A=r.comment=function comment(e){return new c.default(e)};var R=r.id=function id(e){return new p.default(e)};var F=r.nesting=function nesting(e){return new B.default(e)};var x=r.pseudo=function pseudo(e){return new d.default(e)};var j=r.root=function root(e){return new y.default(e)};var I=r.selector=function selector(e){return new m.default(e)};var M=r.string=function string(e){return new w.default(e)};var N=r.tag=function tag(e){return new O.default(e)};var _=r.universal=function universal(e){return new E.default(e)}},8837:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t=e){this.indexes[t]=r-1}}return this};Container.prototype.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};Container.prototype.empty=function empty(){return this.removeAll()};Container.prototype.insertAfter=function insertAfter(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t+1,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(t<=n){this.indexes[i]=n+1}}return this};Container.prototype.insertBefore=function insertBefore(e,r){r.parent=this;var t=this.index(e);this.nodes.splice(t,0,r);r.parent=this;var n=void 0;for(var i in this.indexes){n=this.indexes[i];if(n<=t){this.indexes[i]=n+1}}return this};Container.prototype._findChildAtPosition=function _findChildAtPosition(e,r){var t=undefined;this.each(function(n){if(n.atPosition){var i=n.atPosition(e,r);if(i){t=i;return false}}else if(n.isAtPosition(e,r)){t=n;return false}});return t};Container.prototype.atPosition=function atPosition(e,r){if(this.isAtPosition(e,r)){return this._findChildAtPosition(e,r)||this}else{return undefined}};Container.prototype._inferEndPosition=function _inferEndPosition(){if(this.last&&this.last.source&&this.last.source.end){this.source=this.source||{};this.source.end=this.source.end||{};Object.assign(this.source.end,this.last.source.end)}};Container.prototype.each=function each(e){if(!this.lastEach){this.lastEach=0}if(!this.indexes){this.indexes={}}this.lastEach++;var r=this.lastEach;this.indexes[r]=0;if(!this.length){return undefined}var t=void 0,n=void 0;while(this.indexes[r]{"use strict";r.__esModule=true;r.isUniversal=r.isTag=r.isString=r.isSelector=r.isRoot=r.isPseudo=r.isNesting=r.isIdentifier=r.isComment=r.isCombinator=r.isClassName=r.isAttribute=undefined;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i;r.isNode=isNode;r.isPseudoElement=isPseudoElement;r.isPseudoClass=isPseudoClass;r.isContainer=isContainer;r.isNamespace=isNamespace;var o=t(9);var s=(i={},i[o.ATTRIBUTE]=true,i[o.CLASS]=true,i[o.COMBINATOR]=true,i[o.COMMENT]=true,i[o.ID]=true,i[o.NESTING]=true,i[o.PSEUDO]=true,i[o.ROOT]=true,i[o.SELECTOR]=true,i[o.STRING]=true,i[o.TAG]=true,i[o.UNIVERSAL]=true,i);function isNode(e){return(typeof e==="undefined"?"undefined":n(e))==="object"&&s[e.type]}function isNodeType(e,r){return isNode(r)&&r.type===e}var a=r.isAttribute=isNodeType.bind(null,o.ATTRIBUTE);var u=r.isClassName=isNodeType.bind(null,o.CLASS);var f=r.isCombinator=isNodeType.bind(null,o.COMBINATOR);var c=r.isComment=isNodeType.bind(null,o.COMMENT);var l=r.isIdentifier=isNodeType.bind(null,o.ID);var p=r.isNesting=isNodeType.bind(null,o.NESTING);var h=r.isPseudo=isNodeType.bind(null,o.PSEUDO);var B=r.isRoot=isNodeType.bind(null,o.ROOT);var v=r.isSelector=isNodeType.bind(null,o.SELECTOR);var d=r.isString=isNodeType.bind(null,o.STRING);var b=r.isTag=isNodeType.bind(null,o.TAG);var y=r.isUniversal=isNodeType.bind(null,o.UNIVERSAL);function isPseudoElement(e){return h(e)&&e.value&&(e.value.startsWith("::")||e.value===":before"||e.value===":after")}function isPseudoClass(e){return h(e)&&!isPseudoElement(e)}function isContainer(e){return!!(isNode(e)&&e.walk)}function isNamespace(e){return a(e)||b(e)}},6856:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(5387);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(ID,e);function ID(r){_classCallCheck(this,ID);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.ID;return t}ID.prototype.toString=function toString(){return[this.rawSpaceBefore,String("#"+this.stringifyProperty("value")),this.rawSpaceAfter].join("")};return ID}(i.default);r.default=s;e.exports=r["default"]},5848:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(9);Object.keys(n).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return n[e]}})});var i=t(4649);Object.keys(i).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return i[e]}})});var o=t(7910);Object.keys(o).forEach(function(e){if(e==="default"||e==="__esModule")return;Object.defineProperty(r,e,{enumerable:true,get:function get(){return o[e]}})})},7937:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(5387);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Nesting,e);function Nesting(r){_classCallCheck(this,Nesting);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.NESTING;t.value="&";return t}return Nesting}(i.default);r.default=s;e.exports=r["default"]},5387:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Node);Object.assign(this,e);this.spaces=this.spaces||{};this.spaces.before=this.spaces.before||"";this.spaces.after=this.spaces.after||""}Node.prototype.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};Node.prototype.replaceWith=function replaceWith(){if(this.parent){for(var e in arguments){this.parent.insertBefore(this,arguments[e])}this.remove()}return this};Node.prototype.next=function next(){return this.parent.at(this.parent.index(this)+1)};Node.prototype.prev=function prev(){return this.parent.at(this.parent.index(this)-1)};Node.prototype.clone=function clone(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=s(this);for(var t in e){r[t]=e[t]}return r};Node.prototype.appendToPropertyAndEscape=function appendToPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}var n=this[e];var i=this.raws[e];this[e]=n+r;if(i||t!==r){this.raws[e]=(i||n)+t}else{delete this.raws[e]}};Node.prototype.setPropertyAndEscape=function setPropertyAndEscape(e,r,t){if(!this.raws){this.raws={}}this[e]=r;this.raws[e]=t};Node.prototype.setPropertyWithoutEscape=function setPropertyWithoutEscape(e,r){this[e]=r;if(this.raws){delete this.raws[e]}};Node.prototype.isAtPosition=function isAtPosition(e,r){if(this.source&&this.source.start&&this.source.end){if(this.source.start.line>e){return false}if(this.source.end.liner){return false}if(this.source.end.line===e&&this.source.end.column{"use strict";r.__esModule=true;var n=t(8837);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Pseudo,e);function Pseudo(r){_classCallCheck(this,Pseudo);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.PSEUDO;return t}Pseudo.prototype.toString=function toString(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")};return Pseudo}(i.default);r.default=s;e.exports=r["default"]},7156:(e,r,t)=>{"use strict";r.__esModule=true;var n=function(){function defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;var n=t(8837);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Selector,e);function Selector(r){_classCallCheck(this,Selector);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.SELECTOR;return t}return Selector}(i.default);r.default=s;e.exports=r["default"]},1572:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(5387);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(String,e);function String(r){_classCallCheck(this,String);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.STRING;return t}return String}(i.default);r.default=s;e.exports=r["default"]},2252:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(7937);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Tag,e);function Tag(r){_classCallCheck(this,Tag);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.TAG;return t}return Tag}(i.default);r.default=s;e.exports=r["default"]},9:(e,r)=>{"use strict";r.__esModule=true;var t=r.TAG="tag";var n=r.STRING="string";var i=r.SELECTOR="selector";var o=r.ROOT="root";var s=r.PSEUDO="pseudo";var a=r.NESTING="nesting";var u=r.ID="id";var f=r.COMMENT="comment";var c=r.COMBINATOR="combinator";var l=r.CLASS="class";var p=r.ATTRIBUTE="attribute";var h=r.UNIVERSAL="universal"},3447:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(7937);var i=_interopRequireDefault(n);var o=t(9);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}var s=function(e){_inherits(Universal,e);function Universal(r){_classCallCheck(this,Universal);var t=_possibleConstructorReturn(this,e.call(this,r));t.type=o.UNIVERSAL;t.value="*";return t}return Universal}(i.default);r.default=s;e.exports=r["default"]},1949:(e,r)=>{"use strict";r.__esModule=true;r.default=sortAscending;function sortAscending(e){return e.sort(function(e,r){return e-r})}e.exports=r["default"]},7620:(e,r)=>{"use strict";r.__esModule=true;var t=r.ampersand=38;var n=r.asterisk=42;var i=r.at=64;var o=r.comma=44;var s=r.colon=58;var a=r.semicolon=59;var u=r.openParenthesis=40;var f=r.closeParenthesis=41;var c=r.openSquare=91;var l=r.closeSquare=93;var p=r.dollar=36;var h=r.tilde=126;var B=r.caret=94;var v=r.plus=43;var d=r.equals=61;var b=r.pipe=124;var y=r.greaterThan=62;var g=r.space=32;var m=r.singleQuote=39;var C=r.doubleQuote=34;var w=r.slash=47;var S=r.bang=33;var O=r.backslash=92;var T=r.cr=13;var E=r.feed=12;var k=r.newline=10;var P=r.tab=9;var D=r.str=m;var A=r.comment=-1;var R=r.word=-2;var F=r.combinator=-3},6317:(e,r,t)=>{"use strict";r.__esModule=true;r.FIELDS=undefined;var n,i;r.default=tokenize;var o=t(7620);var s=_interopRequireWildcard(o);function _interopRequireWildcard(e){if(e&&e.__esModule){return e}else{var r={};if(e!=null){for(var t in e){if(Object.prototype.hasOwnProperty.call(e,t))r[t]=e[t]}}r.default=e;return r}}var a=(n={},n[s.tab]=true,n[s.newline]=true,n[s.cr]=true,n[s.feed]=true,n);var u=(i={},i[s.space]=true,i[s.tab]=true,i[s.newline]=true,i[s.cr]=true,i[s.feed]=true,i[s.ampersand]=true,i[s.asterisk]=true,i[s.bang]=true,i[s.comma]=true,i[s.colon]=true,i[s.semicolon]=true,i[s.openParenthesis]=true,i[s.closeParenthesis]=true,i[s.openSquare]=true,i[s.closeSquare]=true,i[s.singleQuote]=true,i[s.doubleQuote]=true,i[s.plus]=true,i[s.pipe]=true,i[s.tilde]=true,i[s.greaterThan]=true,i[s.equals]=true,i[s.dollar]=true,i[s.caret]=true,i[s.slash]=true,i);var f={};var c="0123456789abcdefABCDEF";for(var l=0;l0){g=a+d;m=y-b[d].length}else{g=a;m=o}w=s.comment;a=g;h=g;p=y-m}else if(c===s.slash){y=u;w=c;h=a;p=u-o;f=y+1}else{y=consumeWord(t,u);w=s.word;h=a;p=y-o}f=y+1;break}r.push([w,a,u-o,h,p,u,f]);if(m){o=m;m=null}u=f}return r}},2058:(e,r)=>{"use strict";r.__esModule=true;r.default=ensureObject;function ensureObject(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){e[i]={}}e=e[i]}}e.exports=r["default"]},4600:(e,r)=>{"use strict";r.__esModule=true;r.default=getProp;function getProp(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n0){var i=t.shift();if(!e[i]){return undefined}e=e[i]}return e}e.exports=r["default"]},6913:(e,r,t)=>{"use strict";r.__esModule=true;var n=t(6474);Object.defineProperty(r,"unesc",{enumerable:true,get:function get(){return _interopRequireDefault(n).default}});var i=t(4600);Object.defineProperty(r,"getProp",{enumerable:true,get:function get(){return _interopRequireDefault(i).default}});var o=t(2058);Object.defineProperty(r,"ensureObject",{enumerable:true,get:function get(){return _interopRequireDefault(o).default}});var s=t(6817);Object.defineProperty(r,"stripComments",{enumerable:true,get:function get(){return _interopRequireDefault(s).default}});function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},6817:(e,r)=>{"use strict";r.__esModule=true;r.default=stripComments;function stripComments(e){var r="";var t=e.indexOf("/*");var n=0;while(t>=0){r=r+e.slice(n,t);var i=e.indexOf("*/",t+2);if(i<0){return r}n=i+2;t=e.indexOf("/*",n)}r=r+e.slice(n);return r}e.exports=r["default"]},6474:(e,r)=>{"use strict";r.__esModule=true;r.default=unesc;var t=/\\(?:([0-9a-fA-F]{6})|([0-9a-fA-F]{1,5})(?: |(?![0-9a-fA-F])))/g;var n=/\\(.)/g;function unesc(e){e=e.replace(t,function(e,r,t){var n=r||t;var i=parseInt(n,16);return String.fromCharCode(i)});e=e.replace(n,function(e,r){return r});return e}e.exports=r["default"]},9020:(e,r,t)=>{var n=t(4633);e.exports=n.plugin("postcss-replace-overflow-wrap",function(e){e=e||{};var r=e.method||"replace";return function(e){e.walkDecls("overflow-wrap",function(e){e.cloneBefore({prop:"word-wrap"});if(r==="replace"){e.remove()}})}})},40:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var n=t(4633);var i=_interopRequireDefault(n);var o=t(8746);var s=_interopRequireDefault(o);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function explodeSelectors(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return function(r){r.walkRules(function(r){if(r.selector&&r.selector.indexOf(":matches")>-1){r.selector=(0,s.default)(r,e)}})}}r.default=i.default.plugin("postcss-selector-matches",explodeSelectors);e.exports=r.default},8746:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.default=replaceRuleSelector;var n=t(7009);var i=_interopRequireDefault(n);var o=t(587);var s=_interopRequireDefault(o);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _toConsumableArray(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r-1){var t=[];var n=e.match(/^\s+/);var o=n?n[0]:"";var u=i.default.comma(e);u.forEach(function(e){var n=e.indexOf(a);var u=e.slice(0,n);var f=e.slice(n);var c=(0,s.default)("(",")",f);var l=c&&c.body?i.default.comma(c.body).reduce(function(e,t){return[].concat(_toConsumableArray(e),_toConsumableArray(explodeSelector(t,r)))},[]):[f];var p=c&&c.post?explodeSelector(c.post,r):[];var h=void 0;if(p.length===0){if(n===-1||u.indexOf(" ")>-1){h=l.map(function(e){return o+u+e})}else{h=l.map(function(e){return normalizeSelector(e,o,u)})}}else{h=[];p.forEach(function(e){l.forEach(function(r){h.push(o+u+r+e)})})}t=[].concat(_toConsumableArray(t),_toConsumableArray(h))});return t}return[e]}function replaceRuleSelector(e,r){var t=e.raws&&e.raws.before?e.raws.before.split("\n").pop():"";return explodeSelector(e.selector,r).join(","+(r.lineBreak?"\n"+t:" "))}e.exports=r.default},8158:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var n=t(4633);var i=_interopRequireDefault(n);var o=t(7009);var s=_interopRequireDefault(o);var a=t(587);var u=_interopRequireDefault(a);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function explodeSelector(e,r){var t=locatePseudoClass(r,e);if(r&&t>-1){var n=r.slice(0,t);var i=(0,u.default)("(",")",r.slice(t));var o=i.body?s.default.comma(i.body).map(function(r){return explodeSelector(e,r)}).join(`)${e}(`):"";var a=i.post?explodeSelector(e,i.post):"";return`${n}${e}(${o})${a}`}return r}var f={};function locatePseudoClass(e,r){f[r]=f[r]||new RegExp(`([^\\\\]|^)${r}`);var t=f[r];var n=e.search(t);if(n===-1){return-1}return n+e.slice(n).indexOf(r)}function explodeSelectors(e){return function(){return function(r){r.walkRules(function(r){if(r.selector&&r.selector.indexOf(e)>-1){r.selector=explodeSelector(e,r.selector)}})}}}r.default=i.default.plugin("postcss-selector-not",explodeSelectors(":not"));e.exports=r.default},2334:(e,r,t)=>{"use strict";const n=t(9745);class AtWord extends n{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("")}}n.registerWalker(AtWord);e.exports=AtWord},1776:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Colon extends i{constructor(e){super(e);this.type="colon"}}n.registerWalker(Colon);e.exports=Colon},6429:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Comma extends i{constructor(e){super(e);this.type="comma"}}n.registerWalker(Comma);e.exports=Comma},8688:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Comment extends i{constructor(e){super(e);this.type="comment";this.inline=Object(e).inline||false}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}}n.registerWalker(Comment);e.exports=Comment},9745:(e,r,t)=>{"use strict";const n=t(7203);class Container extends n{constructor(e){super(e);if(!this.nodes){this.nodes=[]}}push(e){e.parent=this;this.nodes.push(e);return this}each(e){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let r=this.lastEach,t,n;this.indexes[r]=0;if(!this.nodes)return undefined;while(this.indexes[r]{let n=e(r,t);if(n!==false&&r.walk){n=r.walk(e)}return n})}walkType(e,r){if(!e||!r){throw new Error("Parameters {type} and {callback} are required.")}const t=typeof e==="function";return this.walk((n,i)=>{if(t&&n instanceof e||!t&&n.type===e){return r.call(this,n,i)}})}append(e){e.parent=this;this.nodes.push(e);return this}prepend(e){e.parent=this;this.nodes.unshift(e);return this}cleanRaws(e){super.cleanRaws(e);if(this.nodes){for(let r of this.nodes)r.cleanRaws(e)}}insertAfter(e,r){let t=this.index(e),n;this.nodes.splice(t+1,0,r);for(let e in this.indexes){n=this.indexes[e];if(t<=n){this.indexes[e]=n+this.nodes.length}}return this}insertBefore(e,r){let t=this.index(e),n;this.nodes.splice(t,0,r);for(let e in this.indexes){n=this.indexes[e];if(t<=n){this.indexes[e]=n+this.nodes.length}}return this}removeChild(e){e=this.index(e);this.nodes[e].parent=undefined;this.nodes.splice(e,1);let r;for(let t in this.indexes){r=this.indexes[t];if(r>=e){this.indexes[t]=r-1}}return this}removeAll(){for(let e of this.nodes)e.parent=undefined;this.nodes=[];return this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){if(typeof e==="number"){return e}else{return this.nodes.indexOf(e)}}get first(){if(!this.nodes)return undefined;return this.nodes[0]}get last(){if(!this.nodes)return undefined;return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");if(this.value){e=this.value+e}if(this.raws.before){e=this.raws.before+e}if(this.raws.after){e+=this.raws.after}return e}}Container.registerWalker=(e=>{let r="walk"+e.name;if(r.lastIndexOf("s")!==r.length-1){r+="s"}if(Container.prototype[r]){return}Container.prototype[r]=function(r){return this.walkType(e,r)}});e.exports=Container},7016:e=>{"use strict";class ParserError extends Error{constructor(e){super(e);this.name=this.constructor.name;this.message=e||"An error ocurred while parsing.";if(typeof Error.captureStackTrace==="function"){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error(e).stack}}}e.exports=ParserError},4828:e=>{"use strict";class TokenizeError extends Error{constructor(e){super(e);this.name=this.constructor.name;this.message=e||"An error ocurred while tokzenizing.";if(typeof Error.captureStackTrace==="function"){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error(e).stack}}}e.exports=TokenizeError},7615:(e,r,t)=>{"use strict";const n=t(9745);class FunctionNode extends n{constructor(e){super(e);this.type="func";this.unbalanced=-1}}n.registerWalker(FunctionNode);e.exports=FunctionNode},9448:(e,r,t)=>{"use strict";const n=t(3663);const i=t(2334);const o=t(1776);const s=t(6429);const a=t(8688);const u=t(7615);const f=t(2541);const c=t(6005);const l=t(6827);const p=t(3300);const h=t(2897);const B=t(2964);const v=t(2945);let d=function(e,r){return new n(e,r)};d.atword=function(e){return new i(e)};d.colon=function(e){return new o(Object.assign({value:":"},e))};d.comma=function(e){return new s(Object.assign({value:","},e))};d.comment=function(e){return new a(e)};d.func=function(e){return new u(e)};d.number=function(e){return new f(e)};d.operator=function(e){return new c(e)};d.paren=function(e){return new l(Object.assign({value:"("},e))};d.string=function(e){return new p(Object.assign({quote:"'"},e))};d.value=function(e){return new B(e)};d.word=function(e){return new v(e)};d.unicodeRange=function(e){return new h(e)};e.exports=d},7203:e=>{"use strict";let r=function(e,t){let n=new e.constructor;for(let i in e){if(!e.hasOwnProperty(i))continue;let o=e[i],s=typeof o;if(i==="parent"&&s==="object"){if(t)n[i]=t}else if(i==="source"){n[i]=o}else if(o instanceof Array){n[i]=o.map(e=>r(e,n))}else if(i!=="before"&&i!=="after"&&i!=="between"&&i!=="semicolon"){if(s==="object"&&o!==null)o=r(o);n[i]=o}}return n};e.exports=class Node{constructor(e){e=e||{};this.raws={before:"",after:""};for(let r in e){this[r]=e[r]}}remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this}toString(){return[this.raws.before,String(this.value),this.raws.after].join("")}clone(e){e=e||{};let t=r(this);for(let r in e){t[r]=e[r]}return t}cloneBefore(e){e=e||{};let r=this.clone(e);this.parent.insertBefore(this,r);return r}cloneAfter(e){e=e||{};let r=this.clone(e);this.parent.insertAfter(this,r);return r}replaceWith(){let e=Array.prototype.slice.call(arguments);if(this.parent){for(let r of e){this.parent.insertBefore(this,r)}this.remove()}return this}moveTo(e){this.cleanRaws(this.root()===e.root());this.remove();e.append(this);return this}moveBefore(e){this.cleanRaws(this.root()===e.root());this.remove();e.parent.insertBefore(e,this);return this}moveAfter(e){this.cleanRaws(this.root()===e.root());this.remove();e.parent.insertAfter(e,this);return 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 r in this){if(!this.hasOwnProperty(r))continue;if(r==="parent")continue;let t=this[r];if(t instanceof Array){e[r]=t.map(e=>{if(typeof e==="object"&&e.toJSON){return e.toJSON()}else{return e}})}else if(typeof t==="object"&&t.toJSON){e[r]=t.toJSON()}else{e[r]=t}}return e}root(){let e=this;while(e.parent)e=e.parent;return e}cleanRaws(e){delete this.raws.before;delete this.raws.after;if(!e)delete this.raws.between}positionInside(e){let r=this.toString(),t=this.source.start.column,n=this.source.start.line;for(let i=0;i{"use strict";const n=t(9745);const i=t(7203);class NumberNode extends i{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("")}}n.registerWalker(NumberNode);e.exports=NumberNode},6005:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Operator extends i{constructor(e){super(e);this.type="operator"}}n.registerWalker(Operator);e.exports=Operator},6827:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Parenthesis extends i{constructor(e){super(e);this.type="paren";this.parenType=""}}n.registerWalker(Parenthesis);e.exports=Parenthesis},3663:(e,r,t)=>{"use strict";const n=t(2413);const i=t(2964);const o=t(2334);const s=t(1776);const a=t(6429);const u=t(8688);const f=t(7615);const c=t(2541);const l=t(6005);const p=t(6827);const h=t(3300);const B=t(2945);const v=t(2897);const d=t(868);const b=t(5202);const y=t(4751);const g=t(5632);const m=t(7016);function sortAscending(e){return e.sort((e,r)=>e-r)}e.exports=class Parser{constructor(e,r){const t={loose:false};this.cache=[];this.input=e;this.options=Object.assign({},t,r);this.position=0;this.unbalanced=0;this.root=new n;let o=new i;this.root.append(o);this.current=o;this.tokens=d(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new s({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 a({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=false,r=this.currToken[1].replace(/\/\*|\*\//g,""),t;if(this.options.loose&&r.startsWith("//")){r=r.substring(2);e=true}t=new u({value:r,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(t);this.position++}error(e,r){throw new m(e+` at line: ${r[2]}, column ${r[3]}`)}loop(){while(this.position0){if(this.current.type==="func"&&this.current.value==="calc"){if(this.prevToken[0]!=="space"&&this.prevToken[0]!=="("){this.error("Syntax Error",this.currToken)}else if(this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"){this.error("Syntax Error",this.currToken)}else if(this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("){this.error("Syntax Error",this.currToken)}}else if(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator"){this.error("Syntax Error",this.currToken)}}}if(!this.options.loose){if(this.nextToken[0]==="word"){return this.word()}}else{if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word"){return this.word()}}}r=new l({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++;return this.newNode(r)}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,r=this.position+1,t=this.currToken,n;while(r=this.tokens.length-1&&!this.current.unbalanced){return}this.current.unbalanced--;if(this.current.unbalanced<0){this.error("Expected opening parenthesis",e)}if(!this.current.unbalanced&&this.cache.length){this.current=this.cache.pop()}}space(){let e=this.currToken;if(this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"){this.current.last.raws.after+=e[1];this.position++}else{this.spaces=e[1];this.position++}}unicodeRange(){let e=this.currToken;this.newNode(new v({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,r=this.currToken[1],t=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/,n=/^(?!\#([a-z0-9]+))[\#\{\}]/gi,i,s;if(!n.test(r)){while(e&&e[0]==="word"){this.position++;let t=this.currToken[1];r+=t;e=this.nextToken}}i=y(r,"@");s=sortAscending(g(b([[0],i])));s.forEach((n,a)=>{let u=s[a+1]||r.length,l=r.slice(n,u),p;if(~i.indexOf(n)){p=new o({value:l.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+n},end:{line:this.currToken[4],column:this.currToken[3]+(u-1)}},sourceIndex:this.currToken[6]+s[a]})}else if(t.test(this.currToken[1])){let e=l.replace(t,"");p=new c({value:l.replace(e,""),source:{start:{line:this.currToken[2],column:this.currToken[3]+n},end:{line:this.currToken[4],column:this.currToken[3]+(u-1)}},sourceIndex:this.currToken[6]+s[a],unit:e})}else{p=new(e&&e[0]==="("?f:B)({value:l,source:{start:{line:this.currToken[2],column:this.currToken[3]+n},end:{line:this.currToken[4],column:this.currToken[3]+(u-1)}},sourceIndex:this.currToken[6]+s[a]});if(p.constructor.name==="Word"){p.isHex=/^#(.+)/.test(l);p.isColor=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(l)}else{this.cache.push(this.current)}}this.newNode(p)});this.position++}string(){let e=this.currToken,r=this.currToken[1],t=/^(\"|\')/,n=t.test(r),i="",o;if(n){i=r.match(t)[0];r=r.slice(1,r.length-1)}o=new h({value:r,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){if(this.spaces){e.raws.before+=this.spaces;this.spaces=""}return 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]}}},2413:(e,r,t)=>{"use strict";const n=t(9745);e.exports=class Root extends n{constructor(e){super(e);this.type="root"}}},3300:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class StringNode extends i{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("")}}n.registerWalker(StringNode);e.exports=StringNode},868:(e,r,t)=>{"use strict";const n="{".charCodeAt(0);const i="}".charCodeAt(0);const o="(".charCodeAt(0);const s=")".charCodeAt(0);const a="'".charCodeAt(0);const u='"'.charCodeAt(0);const f="\\".charCodeAt(0);const c="/".charCodeAt(0);const l=".".charCodeAt(0);const p=",".charCodeAt(0);const h=":".charCodeAt(0);const B="*".charCodeAt(0);const v="-".charCodeAt(0);const d="+".charCodeAt(0);const b="#".charCodeAt(0);const y="\n".charCodeAt(0);const g=" ".charCodeAt(0);const m="\f".charCodeAt(0);const C="\t".charCodeAt(0);const w="\r".charCodeAt(0);const S="@".charCodeAt(0);const O="e".charCodeAt(0);const T="E".charCodeAt(0);const E="0".charCodeAt(0);const k="9".charCodeAt(0);const P="u".charCodeAt(0);const D="U".charCodeAt(0);const A=/[ \n\t\r\{\(\)'"\\;,/]/g;const R=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;const F=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g;const x=/^[a-z0-9]/i;const j=/^[a-f0-9?\-]/i;const I=t(1669);const M=t(4828);e.exports=function tokenize(e,r){r=r||{};let t=[],N=e.valueOf(),_=N.length,L=-1,q=1,G=0,J=0,U=null,H,Q,K,W,Y,z,$,X,Z,V,ee,re;function unclosed(e){let r=I.format("Unclosed %s at line: %d, column: %d, token: %d",e,q,G-L,G);throw new M(r)}function tokenizeError(){let e=I.format("Syntax error at line: %d, column: %d, token: %d",q,G-L,G);throw new M(e)}while(G<_){H=N.charCodeAt(G);if(H===y){L=G;q+=1}switch(H){case y:case g:case C:case w:case m:Q=G;do{Q+=1;H=N.charCodeAt(Q);if(H===y){L=Q;q+=1}}while(H===g||H===y||H===C||H===w||H===m);t.push(["space",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1;break;case h:Q=G+1;t.push(["colon",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1;break;case p:Q=G+1;t.push(["comma",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1;break;case n:t.push(["{","{",q,G-L,q,Q-L,G]);break;case i:t.push(["}","}",q,G-L,q,Q-L,G]);break;case o:J++;U=!U&&J===1&&t.length>0&&t[t.length-1][0]==="word"&&t[t.length-1][1]==="url";t.push(["(","(",q,G-L,q,Q-L,G]);break;case s:J--;U=U&&J>0;t.push([")",")",q,G-L,q,Q-L,G]);break;case a:case u:K=H===a?"'":'"';Q=G;do{V=false;Q=N.indexOf(K,Q+1);if(Q===-1){unclosed("quote",K)}ee=Q;while(N.charCodeAt(ee-1)===f){ee-=1;V=!V}}while(V);t.push(["string",N.slice(G,Q+1),q,G-L,q,Q-L,G]);G=Q;break;case S:A.lastIndex=G+1;A.test(N);if(A.lastIndex===0){Q=N.length-1}else{Q=A.lastIndex-2}t.push(["atword",N.slice(G,Q+1),q,G-L,q,Q-L,G]);G=Q;break;case f:Q=G;H=N.charCodeAt(Q+1);if($&&(H!==c&&H!==g&&H!==y&&H!==C&&H!==w&&H!==m)){Q+=1}t.push(["word",N.slice(G,Q+1),q,G-L,q,Q-L,G]);G=Q;break;case d:case v:case B:Q=G+1;re=N.slice(G+1,Q+1);let e=N.slice(G-1,G);if(H===v&&re.charCodeAt(0)===v){Q++;t.push(["word",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1;break}t.push(["operator",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1;break;default:if(H===c&&(N.charCodeAt(G+1)===B||r.loose&&!U&&N.charCodeAt(G+1)===c)){const e=N.charCodeAt(G+1)===B;if(e){Q=N.indexOf("*/",G+2)+1;if(Q===0){unclosed("comment","*/")}}else{const e=N.indexOf("\n",G+2);Q=e!==-1?e-1:_}z=N.slice(G,Q+1);W=z.split("\n");Y=W.length-1;if(Y>0){X=q+Y;Z=Q-W[Y].length}else{X=q;Z=L}t.push(["comment",z,q,G-L,X,Q-Z,G]);L=Z;q=X;G=Q}else if(H===b&&!x.test(N.slice(G+1,G+2))){Q=G+1;t.push(["#",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1}else if((H===P||H===D)&&N.charCodeAt(G+1)===d){Q=G+2;do{Q+=1;H=N.charCodeAt(Q)}while(Q<_&&j.test(N.slice(Q,Q+1)));t.push(["unicoderange",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1}else if(H===c){Q=G+1;t.push(["operator",N.slice(G,Q),q,G-L,q,Q-L,G]);G=Q-1}else{let e=R;if(H>=E&&H<=k){e=F}e.lastIndex=G+1;e.test(N);if(e.lastIndex===0){Q=N.length-1}else{Q=e.lastIndex-2}if(e===F||H===l){let e=N.charCodeAt(Q),r=N.charCodeAt(Q+1),t=N.charCodeAt(Q+2);if((e===O||e===T)&&(r===v||r===d)&&(t>=E&&t<=k)){F.lastIndex=Q+2;F.test(N);if(F.lastIndex===0){Q=N.length-1}else{Q=F.lastIndex-2}}}t.push(["word",N.slice(G,Q+1),q,G-L,q,Q-L,G]);G=Q}break}G++}return t}},2897:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class UnicodeRange extends i{constructor(e){super(e);this.type="unicode-range"}}n.registerWalker(UnicodeRange);e.exports=UnicodeRange},2964:(e,r,t)=>{"use strict";const n=t(9745);e.exports=class Value extends n{constructor(e){super(e);this.type="value";this.unbalanced=0}}},2945:(e,r,t)=>{"use strict";const n=t(9745);const i=t(7203);class Word extends i{constructor(e){super(e);this.type="word"}}n.registerWalker(Word);e.exports=Word},4217:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(5878));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}var i=function(e){_inheritsLoose(AtRule,e);function AtRule(r){var t;t=e.call(this,r)||this;t.type="atrule";return t}var r=AtRule.prototype;r.append=function append(){var r;if(!this.nodes)this.nodes=[];for(var t=arguments.length,n=new Array(t),i=0;i{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(1497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}var i=function(e){_inheritsLoose(Comment,e);function Comment(r){var t;t=e.call(this,r)||this;t.type="comment";return t}return Comment}(n.default);var o=i;r.default=o;e.exports=r.default},5878:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(3605));var i=_interopRequireDefault(t(8259));var o=_interopRequireDefault(t(1497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,r){for(var t=0;t=a.length)break;c=a[f++]}else{f=a.next();if(f.done)break;c=f.value}var l=c;this.nodes.push(l)}}return this};r.prepend=function prepend(){for(var e=arguments.length,r=new Array(e),t=0;t=n.length)break;s=n[o++]}else{o=n.next();if(o.done)break;s=o.value}var a=s;var u=this.normalize(a,this.first,"prepend").reverse();for(var f=u,c=Array.isArray(f),l=0,f=c?f:f[Symbol.iterator]();;){var p;if(c){if(l>=f.length)break;p=f[l++]}else{l=f.next();if(l.done)break;p=l.value}var h=p;this.nodes.unshift(h)}for(var B in this.indexes){this.indexes[B]=this.indexes[B]+u.length}}return this};r.cleanRaws=function cleanRaws(r){e.prototype.cleanRaws.call(this,r);if(this.nodes){for(var t=this.nodes,n=Array.isArray(t),i=0,t=n?t:t[Symbol.iterator]();;){var o;if(n){if(i>=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;s.cleanRaws(r)}}};r.insertBefore=function insertBefore(e,r){e=this.index(e);var t=e===0?"prepend":false;var n=this.normalize(r,this.nodes[e],t).reverse();for(var i=n,o=Array.isArray(i),s=0,i=o?i:i[Symbol.iterator]();;){var a;if(o){if(s>=i.length)break;a=i[s++]}else{s=i.next();if(s.done)break;a=s.value}var u=a;this.nodes.splice(e,0,u)}var f;for(var c in this.indexes){f=this.indexes[c];if(e<=f){this.indexes[c]=f+n.length}}return this};r.insertAfter=function insertAfter(e,r){e=this.index(e);var t=this.normalize(r,this.nodes[e]).reverse();for(var n=t,i=Array.isArray(n),o=0,n=i?n:n[Symbol.iterator]();;){var s;if(i){if(o>=n.length)break;s=n[o++]}else{o=n.next();if(o.done)break;s=o.value}var a=s;this.nodes.splice(e+1,0,a)}var u;for(var f in this.indexes){u=this.indexes[f];if(e=e){this.indexes[t]=r-1}}return this};r.removeAll=function removeAll(){for(var e=this.nodes,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;i.parent=undefined}this.nodes=[];return this};r.replaceValues=function replaceValues(e,r,t){if(!t){t=r;r={}}this.walkDecls(function(n){if(r.props&&r.props.indexOf(n.prop)===-1)return;if(r.fast&&n.value.indexOf(r.fast)===-1)return;n.value=n.value.replace(e,t)});return this};r.every=function every(e){return this.nodes.every(e)};r.some=function some(e){return this.nodes.some(e)};r.index=function index(e){if(typeof e==="number"){return e}return this.nodes.indexOf(e)};r.normalize=function normalize(e,r){var o=this;if(typeof e==="string"){var s=t(3749);e=cleanSource(s(e).nodes)}else if(Array.isArray(e)){e=e.slice(0);for(var a=e,u=Array.isArray(a),f=0,a=u?a:a[Symbol.iterator]();;){var c;if(u){if(f>=a.length)break;c=a[f++]}else{f=a.next();if(f.done)break;c=f.value}var l=c;if(l.parent)l.parent.removeChild(l,"ignore")}}else if(e.type==="root"){e=e.nodes.slice(0);for(var p=e,h=Array.isArray(p),B=0,p=h?p:p[Symbol.iterator]();;){var v;if(h){if(B>=p.length)break;v=p[B++]}else{B=p.next();if(B.done)break;v=B.value}var d=v;if(d.parent)d.parent.removeChild(d,"ignore")}}else if(e.type){e=[e]}else if(e.prop){if(typeof e.value==="undefined"){throw new Error("Value field is missed in node creation")}else if(typeof e.value!=="string"){e.value=String(e.value)}e=[new n.default(e)]}else if(e.selector){var b=t(7797);e=[new b(e)]}else if(e.name){var y=t(4217);e=[new y(e)]}else if(e.text){e=[new i.default(e)]}else{throw new Error("Unknown node type in node creation")}var g=e.map(function(e){if(e.parent)e.parent.removeChild(e);if(typeof e.raws.before==="undefined"){if(r&&typeof r.raws.before!=="undefined"){e.raws.before=r.raws.before.replace(/[^\s]/g,"")}}e.parent=o;return e});return g};_createClass(Container,[{key:"first",get:function get(){if(!this.nodes)return undefined;return this.nodes[0]}},{key:"last",get:function get(){if(!this.nodes)return undefined;return this.nodes[this.nodes.length-1]}}]);return Container}(o.default);var a=s;r.default=a;e.exports=r.default},9535:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(8327));var i=_interopRequireDefault(t(2242));var o=_interopRequireDefault(t(8300));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _assertThisInitialized(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}function _wrapNativeSuper(e){var r=typeof Map==="function"?new Map:undefined;_wrapNativeSuper=function _wrapNativeSuper(e){if(e===null||!_isNativeFunction(e))return e;if(typeof e!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof r!=="undefined"){if(r.has(e))return r.get(e);r.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,e)};return _wrapNativeSuper(e)}function isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}function _construct(e,r,t){if(isNativeReflectConstruct()){_construct=Reflect.construct}else{_construct=function _construct(e,r,t){var n=[null];n.push.apply(n,r);var i=Function.bind.apply(e,n);var o=new i;if(t)_setPrototypeOf(o,t.prototype);return o}}return _construct.apply(null,arguments)}function _isNativeFunction(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function _setPrototypeOf(e,r){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,r){e.__proto__=r;return e};return _setPrototypeOf(e,r)}function _getPrototypeOf(e){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(e)}var s=function(e){_inheritsLoose(CssSyntaxError,e);function CssSyntaxError(r,t,n,i,o,s){var a;a=e.call(this,r)||this;a.name="CssSyntaxError";a.reason=r;if(o){a.file=o}if(i){a.source=i}if(s){a.plugin=s}if(typeof t!=="undefined"&&typeof n!=="undefined"){a.line=t;a.column=n}a.setMessage();if(Error.captureStackTrace){Error.captureStackTrace(_assertThisInitialized(a),CssSyntaxError)}return a}var r=CssSyntaxError.prototype;r.setMessage=function setMessage(){this.message=this.plugin?this.plugin+": ":"";this.message+=this.file?this.file:"";if(typeof this.line!=="undefined"){this.message+=":"+this.line+":"+this.column}this.message+=": "+this.reason};r.showSourceCode=function showSourceCode(e){var r=this;if(!this.source)return"";var t=this.source;if(o.default){if(typeof e==="undefined")e=n.default.stdout;if(e)t=(0,o.default)(t)}var s=t.split(/\r?\n/);var a=Math.max(this.line-3,0);var u=Math.min(this.line+2,s.length);var f=String(u).length;function mark(r){if(e&&i.default.red){return i.default.red.bold(r)}return r}function aside(r){if(e&&i.default.gray){return i.default.gray(r)}return r}return s.slice(a,u).map(function(e,t){var n=a+1+t;var i=" "+(" "+n).slice(-f)+" | ";if(n===r.line){var o=aside(i.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," ");return mark(">")+aside(i)+e+"\n "+o+mark("^")}return" "+aside(i)+e}).join("\n")};r.toString=function toString(){var e=this.showSourceCode();if(e){e="\n\n"+e+"\n"}return this.name+": "+this.message+e};return CssSyntaxError}(_wrapNativeSuper(Error));var a=s;r.default=a;e.exports=r.default},3605:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(1497));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}var i=function(e){_inheritsLoose(Declaration,e);function Declaration(r){var t;t=e.call(this,r)||this;t.type="decl";return t}return Declaration}(n.default);var o=i;r.default=o;e.exports=r.default},4905:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(5622));var i=_interopRequireDefault(t(9535));var o=_interopRequireDefault(t(2713));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,r){for(var t=0;t"}if(this.map)this.map.file=this.from}var e=Input.prototype;e.error=function error(e,r,t,n){if(n===void 0){n={}}var o;var s=this.origin(r,t);if(s){o=new i.default(e,s.line,s.column,s.source,s.file,n.plugin)}else{o=new i.default(e,r,t,this.css,this.file,n.plugin)}o.input={line:r,column:t,source:this.css};if(this.file)o.input.file=this.file;return o};e.origin=function origin(e,r){if(!this.map)return false;var t=this.map.consumer();var n=t.originalPositionFor({line:e,column:r});if(!n.source)return false;var i={file:this.mapResolve(n.source),line:n.line,column:n.column};var o=t.sourceContentFor(n.source);if(o)i.source=o;return i};e.mapResolve=function mapResolve(e){if(/^\w+:\/\//.test(e)){return e}return n.default.resolve(this.map.consumer().sourceRoot||".",e)};_createClass(Input,[{key:"from",get:function get(){return this.file||this.id}}]);return Input}();var u=a;r.default=u;e.exports=r.default},1169:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(3595));var i=_interopRequireDefault(t(7549));var o=_interopRequireDefault(t(3831));var s=_interopRequireDefault(t(7613));var a=_interopRequireDefault(t(3749));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,r){for(var t=0;tparseInt(s[1])){console.error("Unknown error from PostCSS plugin. Your current PostCSS "+"version is "+i+", but "+t+" uses "+n+". Perhaps this is the source of the error below.")}}}}catch(e){if(console&&console.error)console.error(e)}};e.asyncTick=function asyncTick(e,r){var t=this;if(this.plugin>=this.processor.plugins.length){this.processed=true;return e()}try{var n=this.processor.plugins[this.plugin];var i=this.run(n);this.plugin+=1;if(isPromise(i)){i.then(function(){t.asyncTick(e,r)}).catch(function(e){t.handleError(e,n);t.processed=true;r(e)})}else{this.asyncTick(e,r)}}catch(e){this.processed=true;r(e)}};e.async=function async(){var e=this;if(this.processed){return new Promise(function(r,t){if(e.error){t(e.error)}else{r(e.stringify())}})}if(this.processing){return this.processing}this.processing=new Promise(function(r,t){if(e.error)return t(e.error);e.plugin=0;e.asyncTick(r,t)}).then(function(){e.processed=true;return e.stringify()});return this.processing};e.sync=function sync(){if(this.processed)return this.result;this.processed=true;if(this.processing){throw new Error("Use process(css).then(cb) to work with async plugins")}if(this.error)throw this.error;for(var e=this.result.processor.plugins,r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(t>=e.length)break;n=e[t++]}else{t=e.next();if(t.done)break;n=t.value}var i=n;var o=this.run(i);if(isPromise(o)){throw new Error("Use process(css).then(cb) to work with async plugins")}}return this.result};e.run=function run(e){this.result.lastPlugin=e;try{return e(this.result.root,this.result)}catch(r){this.handleError(r,e);throw r}};e.stringify=function stringify(){if(this.stringified)return this.result;this.stringified=true;this.sync();var e=this.result.opts;var r=i.default;if(e.syntax)r=e.syntax.stringify;if(e.stringifier)r=e.stringifier;if(r.stringify)r=r.stringify;var t=new n.default(r,this.result.root,this.result.opts);var o=t.generate();this.result.css=o[0];this.result.map=o[1];return this.result};_createClass(LazyResult,[{key:"processor",get:function get(){return this.result.processor}},{key:"opts",get:function get(){return this.result.opts}},{key:"css",get:function get(){return this.stringify().css}},{key:"content",get:function get(){return this.stringify().content}},{key:"map",get:function get(){return this.stringify().map}},{key:"root",get:function get(){return this.sync().root}},{key:"messages",get:function get(){return this.sync().messages}}]);return LazyResult}();var f=u;r.default=f;e.exports=r.default},7009:(e,r)=>{"use strict";r.__esModule=true;r.default=void 0;var t={split:function split(e,r,t){var n=[];var i="";var split=false;var o=0;var s=false;var a=false;for(var u=0;u0)o-=1}else if(o===0){if(r.indexOf(f)!==-1)split=true}if(split){if(i!=="")n.push(i.trim());i="";split=false}else{i+=f}}if(t||i!=="")n.push(i.trim());return n},space:function space(e){var r=[" ","\n","\t"];return t.split(e,r)},comma:function comma(e){return t.split(e,[","],true)}};var n=t;r.default=n;e.exports=r.default},3595:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(6241));var i=_interopRequireDefault(t(5622));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var o=function(){function MapGenerator(e,r,t){this.stringify=e;this.mapOpts=t.map||{};this.root=r;this.opts=t}var e=MapGenerator.prototype;e.isMap=function isMap(){if(typeof this.opts.map!=="undefined"){return!!this.opts.map}return this.previous().length>0};e.previous=function previous(){var e=this;if(!this.previousMaps){this.previousMaps=[];this.root.walk(function(r){if(r.source&&r.source.input.map){var t=r.source.input.map;if(e.previousMaps.indexOf(t)===-1){e.previousMaps.push(t)}}})}return this.previousMaps};e.isInline=function isInline(){if(typeof this.mapOpts.inline!=="undefined"){return this.mapOpts.inline}var e=this.mapOpts.annotation;if(typeof e!=="undefined"&&e!==true){return false}if(this.previous().length){return this.previous().some(function(e){return e.inline})}return true};e.isSourcesContent=function isSourcesContent(){if(typeof this.mapOpts.sourcesContent!=="undefined"){return this.mapOpts.sourcesContent}if(this.previous().length){return this.previous().some(function(e){return e.withContent()})}return true};e.clearAnnotation=function clearAnnotation(){if(this.mapOpts.annotation===false)return;var e;for(var r=this.root.nodes.length-1;r>=0;r--){e=this.root.nodes[r];if(e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0){this.root.removeChild(r)}}};e.setSourcesContent=function setSourcesContent(){var e=this;var r={};this.root.walk(function(t){if(t.source){var n=t.source.input.from;if(n&&!r[n]){r[n]=true;var i=e.relative(n);e.map.setSourceContent(i,t.source.input.css)}}})};e.applyPrevMaps=function applyPrevMaps(){for(var e=this.previous(),r=Array.isArray(e),t=0,e=r?e:e[Symbol.iterator]();;){var o;if(r){if(t>=e.length)break;o=e[t++]}else{t=e.next();if(t.done)break;o=t.value}var s=o;var a=this.relative(s.file);var u=s.root||i.default.dirname(s.file);var f=void 0;if(this.mapOpts.sourcesContent===false){f=new n.default.SourceMapConsumer(s.text);if(f.sourcesContent){f.sourcesContent=f.sourcesContent.map(function(){return null})}}else{f=s.consumer()}this.map.applySourceMap(f,a,this.relative(u))}};e.isAnnotation=function isAnnotation(){if(this.isInline()){return true}if(typeof this.mapOpts.annotation!=="undefined"){return this.mapOpts.annotation}if(this.previous().length){return this.previous().some(function(e){return e.annotation})}return true};e.toBase64=function toBase64(e){if(Buffer){return Buffer.from(e).toString("base64")}return window.btoa(unescape(encodeURIComponent(e)))};e.addAnnotation=function addAnnotation(){var e;if(this.isInline()){e="data:application/json;base64,"+this.toBase64(this.map.toString())}else if(typeof this.mapOpts.annotation==="string"){e=this.mapOpts.annotation}else{e=this.outputFile()+".map"}var r="\n";if(this.css.indexOf("\r\n")!==-1)r="\r\n";this.css+=r+"/*# sourceMappingURL="+e+" */"};e.outputFile=function outputFile(){if(this.opts.to){return this.relative(this.opts.to)}if(this.opts.from){return this.relative(this.opts.from)}return"to.css"};e.generateMap=function generateMap(){this.generateString();if(this.isSourcesContent())this.setSourcesContent();if(this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline()){return[this.css]}return[this.css,this.map]};e.relative=function relative(e){if(e.indexOf("<")===0)return e;if(/^\w+:\/\//.test(e))return e;var r=this.opts.to?i.default.dirname(this.opts.to):".";if(typeof this.mapOpts.annotation==="string"){r=i.default.dirname(i.default.resolve(r,this.mapOpts.annotation))}e=i.default.relative(r,e);if(i.default.sep==="\\"){return e.replace(/\\/g,"/")}return e};e.sourcePath=function sourcePath(e){if(this.mapOpts.from){return this.mapOpts.from}return this.relative(e.source.input.from)};e.generateString=function generateString(){var e=this;this.css="";this.map=new n.default.SourceMapGenerator({file:this.outputFile()});var r=1;var t=1;var i,o;this.stringify(this.root,function(n,s,a){e.css+=n;if(s&&a!=="end"){if(s.source&&s.source.start){e.map.addMapping({source:e.sourcePath(s),generated:{line:r,column:t-1},original:{line:s.source.start.line,column:s.source.start.column-1}})}else{e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:r,column:t-1}})}}i=n.match(/\n/g);if(i){r+=i.length;o=n.lastIndexOf("\n");t=n.length-o}else{t+=n.length}if(s&&a!=="start"){var u=s.parent||{raws:{}};if(s.type!=="decl"||s!==u.last||u.raws.semicolon){if(s.source&&s.source.end){e.map.addMapping({source:e.sourcePath(s),generated:{line:r,column:t-2},original:{line:s.source.end.line,column:s.source.end.column-1}})}else{e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:r,column:t-1}})}}}})};e.generate=function generate(){this.clearAnnotation();if(this.isMap()){return this.generateMap()}var e="";this.stringify(this.root,function(r){e+=r});return[e]};return MapGenerator}();var s=o;r.default=s;e.exports=r.default},1497:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(9535));var i=_interopRequireDefault(t(3935));var o=_interopRequireDefault(t(7549));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneNode(e,r){var t=new e.constructor;for(var n in e){if(!e.hasOwnProperty(n))continue;var i=e[n];var o=typeof i;if(n==="parent"&&o==="object"){if(r)t[n]=r}else if(n==="source"){t[n]=i}else if(i instanceof Array){t[n]=i.map(function(e){return cloneNode(e,t)})}else{if(o==="object"&&i!==null)i=cloneNode(i);t[n]=i}}return t}var s=function(){function Node(e){if(e===void 0){e={}}this.raws={};if(process.env.NODE_ENV!=="production"){if(typeof e!=="object"&&typeof e!=="undefined"){throw new Error("PostCSS nodes constructor accepts object, not "+JSON.stringify(e))}}for(var r in e){this[r]=e[r]}}var e=Node.prototype;e.error=function error(e,r){if(r===void 0){r={}}if(this.source){var t=this.positionBy(r);return this.source.input.error(e,t.line,t.column,r)}return new n.default(e)};e.warn=function warn(e,r,t){var n={node:this};for(var i in t){n[i]=t[i]}return e.warn(r,n)};e.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};e.toString=function toString(e){if(e===void 0){e=o.default}if(e.stringify)e=e.stringify;var r="";e(this,function(e){r+=e});return r};e.clone=function clone(e){if(e===void 0){e={}}var r=cloneNode(this);for(var t in e){r[t]=e[t]}return r};e.cloneBefore=function cloneBefore(e){if(e===void 0){e={}}var r=this.clone(e);this.parent.insertBefore(this,r);return r};e.cloneAfter=function cloneAfter(e){if(e===void 0){e={}}var r=this.clone(e);this.parent.insertAfter(this,r);return r};e.replaceWith=function replaceWith(){if(this.parent){for(var e=arguments.length,r=new Array(e),t=0;t{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(9570));var i=_interopRequireDefault(t(4905));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e,r){var t=new i.default(e,r);var o=new n.default(t);try{o.parse()}catch(e){if(process.env.NODE_ENV!=="production"){if(e.name==="CssSyntaxError"&&r&&r.from){if(/\.scss$/i.test(r.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(r.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(r.from)){e.message+="\nYou tried to parse Less with "+"the standard CSS parser; "+"try again with the postcss-less parser"}}}throw e}return o.root}var o=parse;r.default=o;e.exports=r.default},9570:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(3605));var i=_interopRequireDefault(t(1926));var o=_interopRequireDefault(t(8259));var s=_interopRequireDefault(t(4217));var a=_interopRequireDefault(t(5907));var u=_interopRequireDefault(t(7797));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var f=function(){function Parser(e){this.input=e;this.root=new a.default;this.current=this.root;this.spaces="";this.semicolon=false;this.createTokenizer();this.root.source={input:e,start:{line:1,column:1}}}var e=Parser.prototype;e.createTokenizer=function createTokenizer(){this.tokenizer=(0,i.default)(this.input)};e.parse=function parse(){var e;while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();switch(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()};e.comment=function comment(e){var r=new o.default;this.init(r,e[2],e[3]);r.source.end={line:e[4],column:e[5]};var t=e[1].slice(2,-2);if(/^\s*$/.test(t)){r.text="";r.raws.left=t;r.raws.right=""}else{var n=t.match(/^(\s*)([^]*[^\s])(\s*)$/);r.text=n[2];r.raws.left=n[1];r.raws.right=n[3]}};e.emptyRule=function emptyRule(e){var r=new u.default;this.init(r,e[2],e[3]);r.selector="";r.raws.between="";this.current=r};e.other=function other(e){var r=false;var t=null;var n=false;var i=null;var o=[];var s=[];var a=e;while(a){t=a[0];s.push(a);if(t==="("||t==="["){if(!i)i=a;o.push(t==="("?")":"]")}else if(o.length===0){if(t===";"){if(n){this.decl(s);return}else{break}}else if(t==="{"){this.rule(s);return}else if(t==="}"){this.tokenizer.back(s.pop());r=true;break}else if(t===":"){n=true}}else if(t===o[o.length-1]){o.pop();if(o.length===0)i=null}a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())r=true;if(o.length>0)this.unclosedBracket(i);if(r&&n){while(s.length){a=s[s.length-1][0];if(a!=="space"&&a!=="comment")break;this.tokenizer.back(s.pop())}this.decl(s)}else{this.unknownWord(s)}};e.rule=function rule(e){e.pop();var r=new u.default;this.init(r,e[0][2],e[0][3]);r.raws.between=this.spacesAndCommentsFromEnd(e);this.raw(r,"selector",e);this.current=r};e.decl=function decl(e){var r=new n.default;this.init(r);var t=e[e.length-1];if(t[0]===";"){this.semicolon=true;e.pop()}if(t[4]){r.source.end={line:t[4],column:t[5]}}else{r.source.end={line:t[2],column:t[3]}}while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);r.raws.before+=e.shift()[1]}r.source.start={line:e[0][2],column:e[0][3]};r.prop="";while(e.length){var i=e[0][0];if(i===":"||i==="space"||i==="comment"){break}r.prop+=e.shift()[1]}r.raws.between="";var o;while(e.length){o=e.shift();if(o[0]===":"){r.raws.between+=o[1];break}else{if(o[0]==="word"&&/\w/.test(o[1])){this.unknownWord([o])}r.raws.between+=o[1]}}if(r.prop[0]==="_"||r.prop[0]==="*"){r.raws.before+=r.prop[0];r.prop=r.prop.slice(1)}r.raws.between+=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(var s=e.length-1;s>0;s--){o=e[s];if(o[1].toLowerCase()==="!important"){r.important=true;var a=this.stringFrom(e,s);a=this.spacesFromEnd(e)+a;if(a!==" !important")r.raws.important=a;break}else if(o[1].toLowerCase()==="important"){var u=e.slice(0);var f="";for(var c=s;c>0;c--){var l=u[c][0];if(f.trim().indexOf("!")===0&&l!=="space"){break}f=u.pop()[1]+f}if(f.trim().indexOf("!")===0){r.important=true;r.raws.important=f;e=u}}if(o[0]!=="space"&&o[0]!=="comment"){break}}this.raw(r,"value",e);if(r.value.indexOf(":")!==-1)this.checkMissedSemicolon(e)};e.atrule=function atrule(e){var r=new s.default;r.name=e[1].slice(1);if(r.name===""){this.unnamedAtrule(r,e)}this.init(r,e[2],e[3]);var t;var n;var i=false;var o=false;var a=[];while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();if(e[0]===";"){r.source.end={line:e[2],column:e[3]};this.semicolon=true;break}else if(e[0]==="{"){o=true;break}else if(e[0]==="}"){if(a.length>0){n=a.length-1;t=a[n];while(t&&t[0]==="space"){t=a[--n]}if(t){r.source.end={line:t[4],column:t[5]}}}this.end(e);break}else{a.push(e)}if(this.tokenizer.endOfFile()){i=true;break}}r.raws.between=this.spacesAndCommentsFromEnd(a);if(a.length){r.raws.afterName=this.spacesAndCommentsFromStart(a);this.raw(r,"params",a);if(i){e=a[a.length-1];r.source.end={line:e[4],column:e[5]};this.spaces=r.raws.between;r.raws.between=""}}else{r.raws.afterName="";r.params=""}if(o){r.nodes=[];this.current=r}};e.end=function end(e){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={line:e[2],column:e[3]};this.current=this.current.parent}else{this.unexpectedClose(e)}};e.endFile=function 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};e.freeSemicolon=function freeSemicolon(e){this.spaces+=e[1];if(this.current.nodes){var r=this.current.nodes[this.current.nodes.length-1];if(r&&r.type==="rule"&&!r.raws.ownSemicolon){r.raws.ownSemicolon=this.spaces;this.spaces=""}}};e.init=function init(e,r,t){this.current.push(e);e.source={start:{line:r,column:t},input:this.input};e.raws.before=this.spaces;this.spaces="";if(e.type!=="comment")this.semicolon=false};e.raw=function raw(e,r,t){var n,i;var o=t.length;var s="";var a=true;var u,f;var c=/^([.|#])?([\w])+/i;for(var l=0;l=0;i--){n=e[i];if(n[0]!=="space"){t+=1;if(t===2)break}}throw this.input.error("Missed semicolon",n[2],n[3])};return Parser}();r.default=f;e.exports=r.default},4633:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(3605));var i=_interopRequireDefault(t(8074));var o=_interopRequireDefault(t(7549));var s=_interopRequireDefault(t(8259));var a=_interopRequireDefault(t(4217));var u=_interopRequireDefault(t(216));var f=_interopRequireDefault(t(3749));var c=_interopRequireDefault(t(7009));var l=_interopRequireDefault(t(7797));var p=_interopRequireDefault(t(5907));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function postcss(){for(var e=arguments.length,r=new Array(e),t=0;t{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(6241));var i=_interopRequireDefault(t(5622));var o=_interopRequireDefault(t(5747));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function fromBase64(e){if(Buffer){return Buffer.from(e,"base64").toString()}else{return window.atob(e)}}var s=function(){function PreviousMap(e,r){this.loadAnnotation(e);this.inline=this.startWith(this.annotation,"data:");var t=r.map?r.map.prev:undefined;var n=this.loadMap(r.from,t);if(n)this.text=n}var e=PreviousMap.prototype;e.consumer=function consumer(){if(!this.consumerCache){this.consumerCache=new n.default.SourceMapConsumer(this.text)}return this.consumerCache};e.withContent=function withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)};e.startWith=function startWith(e,r){if(!e)return false;return e.substr(0,r.length)===r};e.getAnnotationURL=function getAnnotationURL(e){return e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//)[1].trim()};e.loadAnnotation=function loadAnnotation(e){var r=e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//gm);if(r&&r.length>0){var t=r[r.length-1];if(t){this.annotation=this.getAnnotationURL(t)}}};e.decodeInline=function decodeInline(e){var r=/^data:application\/json;charset=utf-?8;base64,/;var t=/^data:application\/json;base64,/;var n="data:application/json,";if(this.startWith(e,n)){return decodeURIComponent(e.substr(n.length))}if(r.test(e)||t.test(e)){return fromBase64(e.substr(RegExp.lastMatch.length))}var i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)};e.loadMap=function loadMap(e,r){if(r===false)return false;if(r){if(typeof r==="string"){return r}else if(typeof r==="function"){var t=r(e);if(t&&o.default.existsSync&&o.default.existsSync(t)){return o.default.readFileSync(t,"utf-8").toString().trim()}else{throw new Error("Unable to load previous source map: "+t.toString())}}else if(r instanceof n.default.SourceMapConsumer){return n.default.SourceMapGenerator.fromSourceMap(r).toString()}else if(r instanceof n.default.SourceMapGenerator){return r.toString()}else if(this.isMap(r)){return JSON.stringify(r)}else{throw new Error("Unsupported previous source map format: "+r.toString())}}else if(this.inline){return this.decodeInline(this.annotation)}else if(this.annotation){var s=this.annotation;if(e)s=i.default.join(i.default.dirname(e),s);this.root=i.default.dirname(s);if(o.default.existsSync&&o.default.existsSync(s)){return o.default.readFileSync(s,"utf-8").toString().trim()}else{return false}}};e.isMap=function isMap(e){if(typeof e!=="object")return false;return typeof e.mappings==="string"||typeof e._mappings==="string"};return PreviousMap}();var a=s;r.default=a;e.exports=r.default},8074:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(1169));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i=function(){function Processor(e){if(e===void 0){e=[]}this.version="7.0.32";this.plugins=this.normalize(e)}var e=Processor.prototype;e.use=function use(e){this.plugins=this.plugins.concat(this.normalize([e]));return this};e.process=function(e){function process(r){return e.apply(this,arguments)}process.toString=function(){return e.toString()};return process}(function(e,r){if(r===void 0){r={}}if(this.plugins.length===0&&r.parser===r.stringifier){if(process.env.NODE_ENV!=="production"){if(typeof console!=="undefined"&&console.warn){console.warn("You did not set any plugins, parser, or stringifier. "+"Right now, PostCSS does nothing. Pick plugins for your case "+"on https://www.postcss.parts/ and use them in postcss.config.js.")}}}return new n.default(this,e,r)});e.normalize=function normalize(e){var r=[];for(var t=e,n=Array.isArray(t),i=0,t=n?t:t[Symbol.iterator]();;){var o;if(n){if(i>=t.length)break;o=t[i++]}else{i=t.next();if(i.done)break;o=i.value}var s=o;if(s.postcss)s=s.postcss;if(typeof s==="object"&&Array.isArray(s.plugins)){r=r.concat(s.plugins)}else if(typeof s==="function"){r.push(s)}else if(typeof s==="object"&&(s.parse||s.stringify)){if(process.env.NODE_ENV!=="production"){throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use "+"one of the syntax/parser/stringifier options as outlined "+"in your PostCSS runner documentation.")}}else{throw new Error(s+" is not a PostCSS plugin")}}return r};return Processor}();var o=i;r.default=o;e.exports=r.default},7613:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(7338));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(5878));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,r){e.prototype=Object.create(r.prototype);e.prototype.constructor=e;e.__proto__=r}var i=function(e){_inheritsLoose(Root,e);function Root(r){var t;t=e.call(this,r)||this;t.type="root";if(!t.nodes)t.nodes=[];return t}var r=Root.prototype;r.removeChild=function removeChild(r,t){var n=this.index(r);if(!t&&n===0&&this.nodes.length>1){this.nodes[1].raws.before=this.nodes[n].raws.before}return e.prototype.removeChild.call(this,r)};r.normalize=function normalize(r,t,n){var i=e.prototype.normalize.call(this,r);if(t){if(n==="prepend"){if(this.nodes.length>1){t.raws.before=this.nodes[1].raws.before}else{delete t.raws.before}}else if(this.first!==t){for(var o=i,s=Array.isArray(o),a=0,o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{a=o.next();if(a.done)break;u=a.value}var f=u;f.raws.before=t.raws.before}}}return i};r.toResult=function toResult(e){if(e===void 0){e={}}var r=t(1169);var n=t(8074);var i=new r(new n,this,e);return i.stringify()};return Root}(n.default);var o=i;r.default=o;e.exports=r.default},7797:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(5878));var i=_interopRequireDefault(t(7009));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,r){for(var t=0;t{"use strict";r.__esModule=true;r.default=void 0;var t={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:false};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}var n=function(){function Stringifier(e){this.builder=e}var e=Stringifier.prototype;e.stringify=function stringify(e,r){this[e.type](e,r)};e.root=function root(e){this.body(e);if(e.raws.after)this.builder(e.raws.after)};e.comment=function comment(e){var r=this.raw(e,"left","commentLeft");var t=this.raw(e,"right","commentRight");this.builder("/*"+r+e.text+t+"*/",e)};e.decl=function decl(e,r){var t=this.raw(e,"between","colon");var n=e.prop+t+this.rawValue(e,"value");if(e.important){n+=e.raws.important||" !important"}if(r)n+=";";this.builder(n,e)};e.rule=function rule(e){this.block(e,this.rawValue(e,"selector"));if(e.raws.ownSemicolon){this.builder(e.raws.ownSemicolon,e,"end")}};e.atrule=function atrule(e,r){var t="@"+e.name;var n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!=="undefined"){t+=e.raws.afterName}else if(n){t+=" "}if(e.nodes){this.block(e,t+n)}else{var i=(e.raws.between||"")+(r?";":"");this.builder(t+n+i,e)}};e.body=function body(e){var r=e.nodes.length-1;while(r>0){if(e.nodes[r].type!=="comment")break;r-=1}var t=this.raw(e,"semicolon");for(var n=0;n0){if(typeof e.raws.after!=="undefined"){r=e.raws.after;if(r.indexOf("\n")!==-1){r=r.replace(/[^\n]+$/,"")}return false}}});if(r)r=r.replace(/[^\s]/g,"");return r};e.rawBeforeOpen=function rawBeforeOpen(e){var r;e.walk(function(e){if(e.type!=="decl"){r=e.raws.between;if(typeof r!=="undefined")return false}});return r};e.rawColon=function rawColon(e){var r;e.walkDecls(function(e){if(typeof e.raws.between!=="undefined"){r=e.raws.between.replace(/[^\s:]/g,"");return false}});return r};e.beforeAfter=function beforeAfter(e,r){var t;if(e.type==="decl"){t=this.raw(e,null,"beforeDecl")}else if(e.type==="comment"){t=this.raw(e,null,"beforeComment")}else if(r==="before"){t=this.raw(e,null,"beforeRule")}else{t=this.raw(e,null,"beforeClose")}var n=e.parent;var i=0;while(n&&n.type!=="root"){i+=1;n=n.parent}if(t.indexOf("\n")!==-1){var o=this.raw(e,null,"indent");if(o.length){for(var s=0;s{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(3935));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringify(e,r){var t=new n.default(r);t.stringify(e)}var i=stringify;r.default=i;e.exports=r.default},8300:(e,r,t)=>{"use strict";r.__esModule=true;r.default=void 0;var n=_interopRequireDefault(t(2242));var i=_interopRequireDefault(t(1926));var o=_interopRequireDefault(t(4905));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s={brackets:n.default.cyan,"at-word":n.default.cyan,comment:n.default.gray,string:n.default.green,class:n.default.yellow,call:n.default.cyan,hash:n.default.magenta,"(":n.default.cyan,")":n.default.cyan,"{":n.default.yellow,"}":n.default.yellow,"[":n.default.yellow,"]":n.default.yellow,":":n.default.yellow,";":n.default.yellow};function getTokenType(e,r){var t=e[0],n=e[1];if(t==="word"){if(n[0]==="."){return"class"}if(n[0]==="#"){return"hash"}}if(!r.endOfFile()){var i=r.nextToken();r.back(i);if(i[0]==="brackets"||i[0]==="(")return"call"}return t}function terminalHighlight(e){var r=(0,i.default)(new o.default(e),{ignoreErrors:true});var t="";var n=function _loop(){var e=r.nextToken();var n=s[getTokenType(e,r)];if(n){t+=e[1].split(/\r?\n/).map(function(e){return n(e)}).join("\n")}else{t+=e[1]}};while(!r.endOfFile()){n()}return t}var a=terminalHighlight;r.default=a;e.exports=r.default},1926:(e,r)=>{"use strict";r.__esModule=true;r.default=tokenizer;var t="'".charCodeAt(0);var n='"'.charCodeAt(0);var i="\\".charCodeAt(0);var o="/".charCodeAt(0);var s="\n".charCodeAt(0);var a=" ".charCodeAt(0);var u="\f".charCodeAt(0);var f="\t".charCodeAt(0);var c="\r".charCodeAt(0);var l="[".charCodeAt(0);var p="]".charCodeAt(0);var h="(".charCodeAt(0);var B=")".charCodeAt(0);var v="{".charCodeAt(0);var d="}".charCodeAt(0);var b=";".charCodeAt(0);var y="*".charCodeAt(0);var g=":".charCodeAt(0);var m="@".charCodeAt(0);var C=/[ \n\t\r\f{}()'"\\;/[\]#]/g;var w=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g;var S=/.[\\/("'\n]/;var O=/[a-f0-9]/i;function tokenizer(e,r){if(r===void 0){r={}}var T=e.css.valueOf();var E=r.ignoreErrors;var k,P,D,A,R,F,x;var j,I,M,N,_,L,q;var G=T.length;var J=-1;var U=1;var H=0;var Q=[];var K=[];function position(){return H}function unclosed(r){throw e.error("Unclosed "+r,U,H-J)}function endOfFile(){return K.length===0&&H>=G}function nextToken(e){if(K.length)return K.pop();if(H>=G)return;var r=e?e.ignoreUnclosed:false;k=T.charCodeAt(H);if(k===s||k===u||k===c&&T.charCodeAt(H+1)!==s){J=H;U+=1}switch(k){case s:case a:case f:case c:case u:P=H;do{P+=1;k=T.charCodeAt(P);if(k===s){J=P;U+=1}}while(k===a||k===s||k===f||k===c||k===u);q=["space",T.slice(H,P)];H=P-1;break;case l:case p:case v:case d:case g:case b:case B:var W=String.fromCharCode(k);q=[W,W,U,H-J];break;case h:_=Q.length?Q.pop()[1]:"";L=T.charCodeAt(H+1);if(_==="url"&&L!==t&&L!==n&&L!==a&&L!==s&&L!==f&&L!==u&&L!==c){P=H;do{M=false;P=T.indexOf(")",P+1);if(P===-1){if(E||r){P=H;break}else{unclosed("bracket")}}N=P;while(T.charCodeAt(N-1)===i){N-=1;M=!M}}while(M);q=["brackets",T.slice(H,P+1),U,H-J,U,P-J];H=P}else{P=T.indexOf(")",H+1);F=T.slice(H,P+1);if(P===-1||S.test(F)){q=["(","(",U,H-J]}else{q=["brackets",F,U,H-J,U,P-J];H=P}}break;case t:case n:D=k===t?"'":'"';P=H;do{M=false;P=T.indexOf(D,P+1);if(P===-1){if(E||r){P=H+1;break}else{unclosed("string")}}N=P;while(T.charCodeAt(N-1)===i){N-=1;M=!M}}while(M);F=T.slice(H,P+1);A=F.split("\n");R=A.length-1;if(R>0){j=U+R;I=P-A[R].length}else{j=U;I=J}q=["string",T.slice(H,P+1),U,H-J,j,P-I];J=I;U=j;H=P;break;case m:C.lastIndex=H+1;C.test(T);if(C.lastIndex===0){P=T.length-1}else{P=C.lastIndex-2}q=["at-word",T.slice(H,P+1),U,H-J,U,P-J];H=P;break;case i:P=H;x=true;while(T.charCodeAt(P+1)===i){P+=1;x=!x}k=T.charCodeAt(P+1);if(x&&k!==o&&k!==a&&k!==s&&k!==f&&k!==c&&k!==u){P+=1;if(O.test(T.charAt(P))){while(O.test(T.charAt(P+1))){P+=1}if(T.charCodeAt(P+1)===a){P+=1}}}q=["word",T.slice(H,P+1),U,H-J,U,P-J];H=P;break;default:if(k===o&&T.charCodeAt(H+1)===y){P=T.indexOf("*/",H+2)+1;if(P===0){if(E||r){P=T.length}else{unclosed("comment")}}F=T.slice(H,P+1);A=F.split("\n");R=A.length-1;if(R>0){j=U+R;I=P-A[R].length}else{j=U;I=J}q=["comment",F,U,H-J,j,P-I];J=I;U=j;H=P}else{w.lastIndex=H+1;w.test(T);if(w.lastIndex===0){P=T.length-1}else{P=w.lastIndex-2}q=["word",T.slice(H,P+1),U,H-J,U,P-J];Q.push(q);H=P}break}H++;return q}function back(e){K.push(e)}return{back:back,nextToken:nextToken,endOfFile:endOfFile,position:position}}e.exports=r.default},216:(e,r)=>{"use strict";r.__esModule=true;r.default=void 0;var t={prefix:function prefix(e){var r=e.match(/^(-\w+-)/);if(r){return r[0]}return""},unprefixed:function unprefixed(e){return e.replace(/^-\w+-/,"")}};var n=t;r.default=n;e.exports=r.default},3831:(e,r)=>{"use strict";r.__esModule=true;r.default=warnOnce;var t={};function warnOnce(e){if(t[e])return;t[e]=true;if(typeof console!=="undefined"&&console.warn){console.warn(e)}}e.exports=r.default},7338:(e,r)=>{"use strict";r.__esModule=true;r.default=void 0;var t=function(){function Warning(e,r){if(r===void 0){r={}}this.type="warning";this.text=e;if(r.node&&r.node.source){var t=r.node.positionBy(r);this.line=t.line;this.column=t.column}for(var n in r){this[n]=r[n]}}var e=Warning.prototype;e.toString=function toString(){if(this.node){return this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message}if(this.plugin){return this.plugin+": "+this.text}return this.text};return Warning}();var n=t;r.default=n;e.exports=r.default},8327:(e,r,t)=>{"use strict";const n=t(2087);const i=t(8379);const{env:o}=process;let s;if(i("no-color")||i("no-colors")||i("color=false")||i("color=never")){s=0}else if(i("color")||i("colors")||i("color=true")||i("color=always")){s=1}if("FORCE_COLOR"in o){if(o.FORCE_COLOR===true||o.FORCE_COLOR==="true"){s=1}else if(o.FORCE_COLOR===false||o.FORCE_COLOR==="false"){s=0}else{s=o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(s===0){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!e.isTTY&&s===undefined){return 0}const r=s||0;if(o.TERM==="dumb"){return r}if(process.platform==="win32"){const e=n.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in o){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in o)||o.CI_NAME==="codeship"){return 1}return r}if("TEAMCITY_VERSION"in o){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0}if(o.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(o.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)){return 1}if("COLORTERM"in o){return 1}return r}function getSupportLevel(e){const r=supportsColor(e);return translateLevel(r)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},5632:e=>{"use strict";function unique_pred(e,r){var t=1,n=e.length,i=e[0],o=e[0];for(var s=1;s{"use strict";e.exports=require("browserslist")},4338:e=>{"use strict";e.exports=require("caniuse-lite")},2242:e=>{"use strict";e.exports=require("chalk")},5747:e=>{"use strict";e.exports=require("fs")},6241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},1669:e=>{"use strict";e.exports=require("util")}};var r={};function __nccwpck_require__(t){if(r[t]){return r[t].exports}var n=r[t]={id:t,loaded:false,exports:{}};var i=true;try{e[t](n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}n.loaded=true;return n.exports}(()=>{__nccwpck_require__.nmd=(e=>{e.paths=[];if(!e.children)e.children=[];return e})})();__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(7435)})(); \ No newline at end of file diff --git a/packages/next/compiled/postcss-scss/scss-syntax.js b/packages/next/compiled/postcss-scss/scss-syntax.js index 15301e8850fabf6..966cb62e2392181 100644 --- a/packages/next/compiled/postcss-scss/scss-syntax.js +++ b/packages/next/compiled/postcss-scss/scss-syntax.js @@ -1 +1 @@ -module.exports=(()=>{var e={618:(e,r,l)=>{const{Container:t}=l(43);class NestedDeclaration extends t{constructor(e){super(e);this.type="decl";this.isNested=true;if(!this.nodes)this.nodes=[]}}e.exports=NestedDeclaration},327:(e,r,l)=>{let{Input:t}=l(43);let i=l(270);e.exports=function scssParse(e,r){let l=new t(e,r);let f=new i(l);f.parse();return f.root}},270:(e,r,l)=>{let{Comment:t}=l(43);let i=l(552);let f=l(618);let a=l(366);class ScssParser extends i{createTokenizer(){this.tokenizer=a(this.input)}rule(e){let r=false;let l=0;let t="";for(let i of e){if(r){if(i[0]!=="comment"&&i[0]!=="{"){t+=i[1]}}else if(i[0]==="space"&&i[1].includes("\n")){break}else if(i[0]==="("){l+=1}else if(i[0]===")"){l-=1}else if(l===0&&i[0]===":"){r=true}}if(!r||t.trim()===""||/^[#:A-Za-z-]/.test(t)){super.rule(e)}else{e.pop();let r=new f;this.init(r,e[0][2]);let l;for(let r=e.length-1;r>=0;r--){if(e[r][0]!=="space"){l=e[r];break}}if(l[3]){let e=this.input.fromOffset(l[3]);r.source.end={offset:l[3],line:e.line,column:e.col}}else{let e=this.input.fromOffset(l[2]);r.source.end={offset:l[2],line:e.line,column:e.col}}while(e[0][0]!=="word"){r.raws.before+=e.shift()[1]}r.source.start={line:e[0][2],column:e[0][3]};r.prop="";while(e.length){let l=e[0][0];if(l===":"||l==="space"||l==="comment"){break}r.prop+=e.shift()[1]}r.raws.between="";let t;while(e.length){t=e.shift();if(t[0]===":"){r.raws.between+=t[1];break}else{r.raws.between+=t[1]}}if(r.prop[0]==="_"||r.prop[0]==="*"){r.raws.before+=r.prop[0];r.prop=r.prop.slice(1)}r.raws.between+=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(let l=e.length-1;l>0;l--){t=e[l];if(t[1]==="!important"){r.important=true;let t=this.stringFrom(e,l);t=this.spacesFromEnd(e)+t;if(t!==" !important"){r.raws.important=t}break}else if(t[1]==="important"){let t=e.slice(0);let i="";for(let e=l;e>0;e--){let r=t[e][0];if(i.trim().indexOf("!")===0&&r!=="space"){break}i=t.pop()[1]+i}if(i.trim().indexOf("!")===0){r.important=true;r.raws.important=i;e=t}}if(t[0]!=="space"&&t[0]!=="comment"){break}}this.raw(r,"value",e);if(r.value.includes(":")){this.checkMissedSemicolon(e)}this.current=r}}comment(e){if(e[4]==="inline"){let r=new t;this.init(r,e[2]);r.raws.inline=true;let l=this.input.fromOffset(e[3]);r.source.end={offset:e[3],line:l.line,column:l.col};let i=e[1].slice(2);if(/^\s*$/.test(i)){r.text="";r.raws.left=i;r.raws.right=""}else{let e=i.match(/^(\s*)([^]*\S)(\s*)$/);let l=e[2].replace(/(\*\/|\/\*)/g,"*//*");r.text=l;r.raws.left=e[1];r.raws.right=e[3];r.raws.text=e[2]}}else{super.comment(e)}}raw(e,r,l){super.raw(e,r,l);if(e.raws[r]){let t=e.raws[r].raw;e.raws[r].raw=l.reduce((e,r)=>{if(r[0]==="comment"&&r[4]==="inline"){let l=r[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return e+"/*"+l+"*/"}else{return e+r[1]}},"");if(t!==e.raws[r].raw){e.raws[r].scss=t}}}}e.exports=ScssParser},139:(e,r,l)=>{let t=l(779);class ScssStringifier extends t{comment(e){let r=this.raw(e,"left","commentLeft");let l=this.raw(e,"right","commentRight");if(e.raws.inline){let t=e.raws.text||e.text;this.builder("//"+r+t+l,e)}else{this.builder("/*"+r+e.text+l+"*/",e)}}decl(e,r){if(!e.isNested){super.decl(e,r)}else{let r=this.raw(e,"between","colon");let l=e.prop+r+this.rawValue(e,"value");if(e.important){l+=e.raws.important||" !important"}this.builder(l+"{",e,"start");let t;if(e.nodes&&e.nodes.length){this.body(e);t=this.raw(e,"after")}else{t=this.raw(e,"after","emptyBody")}if(t)this.builder(t);this.builder("}",e,"end")}}rawValue(e,r){let l=e[r];let t=e.raws[r];if(t&&t.value===l){return t.scss?t.scss:t.raw}else{return l}}}e.exports=ScssStringifier},886:(e,r,l)=>{let t=l(139);e.exports=function scssStringify(e,r){let l=new t(r);l.stringify(e)}},845:(e,r,l)=>{let t=l(886);let i=l(327);e.exports={parse:i,stringify:t}},366:e=>{"use strict";const r="'".charCodeAt(0);const l='"'.charCodeAt(0);const t="\\".charCodeAt(0);const i="/".charCodeAt(0);const f="\n".charCodeAt(0);const a=" ".charCodeAt(0);const s="\f".charCodeAt(0);const h="\t".charCodeAt(0);const w="\r".charCodeAt(0);const o="[".charCodeAt(0);const u="]".charCodeAt(0);const n="(".charCodeAt(0);const c=")".charCodeAt(0);const m="{".charCodeAt(0);const b="}".charCodeAt(0);const p=";".charCodeAt(0);const y="*".charCodeAt(0);const C=":".charCodeAt(0);const A="@".charCodeAt(0);const d=",".charCodeAt(0);const O="#".charCodeAt(0);const D=/[\t\n\f\r "#'()/;[\\\]{}]/g;const g=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g;const q=/.[\n"'(/\\]/;const z=/[\da-f]/i;const F=/[\n\f\r]/g;e.exports=function scssTokenize(e,V={}){let $=e.css.valueOf();let B=V.ignoreErrors;let k,S,I,_,M;let U,Z,j,G;let J=$.length;let X=0;let Y=[];let v=[];let P;function position(){return X}function unclosed(r){throw e.error("Unclosed "+r,X)}function endOfFile(){return v.length===0&&X>=J}function interpolation(){let e=1;let i=false;let f=false;while(e>0){S+=1;if($.length<=S)unclosed("interpolation");k=$.charCodeAt(S);j=$.charCodeAt(S+1);if(i){if(!f&&k===i){i=false;f=false}else if(k===t){f=!U}else if(f){f=false}}else if(k===r||k===l){i=k}else if(k===b){e-=1}else if(k===O&&j===m){e+=1}}}function nextToken(e){if(v.length)return v.pop();if(X>=J)return;let V=e?e.ignoreUnclosed:false;k=$.charCodeAt(X);switch(k){case f:case a:case h:case w:case s:{S=X;do{S+=1;k=$.charCodeAt(S)}while(k===a||k===f||k===h||k===w||k===s);G=["space",$.slice(X,S)];X=S-1;break}case o:case u:case m:case b:case C:case p:case c:{let e=String.fromCharCode(k);G=[e,e,X];break}case d:{G=["word",",",X,X+1];break}case n:{Z=Y.length?Y.pop()[1]:"";j=$.charCodeAt(X+1);if(Z==="url"&&j!==r&&j!==l){P=1;U=false;S=X+1;while(S<=$.length-1){j=$.charCodeAt(S);if(j===t){U=!U}else if(j===n){P+=1}else if(j===c){P-=1;if(P===0)break}S+=1}_=$.slice(X,S+1);G=["brackets",_,X,S];X=S}else{S=$.indexOf(")",X+1);_=$.slice(X,S+1);if(S===-1||q.test(_)){G=["(","(",X]}else{G=["brackets",_,X,S];X=S}}break}case r:case l:{I=k;S=X;U=false;while(S{"use strict";const r={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:false};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}class Stringifier{constructor(e){this.builder=e}stringify(e,r){this[e.type](e,r)}root(e){this.root=e;this.body(e);if(e.raws.after)this.builder(e.raws.after)}comment(e){let r=this.raw(e,"left","commentLeft");let l=this.raw(e,"right","commentRight");this.builder("/*"+r+e.text+l+"*/",e)}decl(e,r){let l=this.raw(e,"between","colon");let t=e.prop+l+this.rawValue(e,"value");if(e.important){t+=e.raws.important||" !important"}if(r)t+=";";this.builder(t,e)}rule(e){this.block(e,this.rawValue(e,"selector"));if(e.raws.ownSemicolon){this.builder(e.raws.ownSemicolon,e,"end")}}atrule(e,r){let l="@"+e.name;let t=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!=="undefined"){l+=e.raws.afterName}else if(t){l+=" "}if(e.nodes){this.block(e,l+t)}else{let i=(e.raws.between||"")+(r?";":"");this.builder(l+t+i,e)}}body(e){let r=e.nodes.length-1;while(r>0){if(e.nodes[r].type!=="comment")break;r-=1}let l=this.raw(e,"semicolon");for(let t=0;t{i=e.raws[l];if(typeof i!=="undefined")return false})}}if(typeof i==="undefined")i=r[t];a.rawCache[t]=i;return i}rawSemicolon(e){let r;e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type==="decl"){r=e.raws.semicolon;if(typeof r!=="undefined")return false}});return r}rawEmptyBody(e){let r;e.walk(e=>{if(e.nodes&&e.nodes.length===0){r=e.raws.after;if(typeof r!=="undefined")return false}});return r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;e.walk(l=>{let t=l.parent;if(t&&t!==e&&t.parent&&t.parent===e){if(typeof l.raws.before!=="undefined"){let e=l.raws.before.split("\n");r=e[e.length-1];r=r.replace(/\S/g,"");return false}}});return r}rawBeforeComment(e,r){let l;e.walkComments(e=>{if(typeof e.raws.before!=="undefined"){l=e.raws.before;if(l.includes("\n")){l=l.replace(/[^\n]+$/,"")}return false}});if(typeof l==="undefined"){l=this.raw(r,null,"beforeDecl")}else if(l){l=l.replace(/\S/g,"")}return l}rawBeforeDecl(e,r){let l;e.walkDecls(e=>{if(typeof e.raws.before!=="undefined"){l=e.raws.before;if(l.includes("\n")){l=l.replace(/[^\n]+$/,"")}return false}});if(typeof l==="undefined"){l=this.raw(r,null,"beforeRule")}else if(l){l=l.replace(/\S/g,"")}return l}rawBeforeRule(e){let r;e.walk(l=>{if(l.nodes&&(l.parent!==e||e.first!==l)){if(typeof l.raws.before!=="undefined"){r=l.raws.before;if(r.includes("\n")){r=r.replace(/[^\n]+$/,"")}return false}}});if(r)r=r.replace(/\S/g,"");return r}rawBeforeClose(e){let r;e.walk(e=>{if(e.nodes&&e.nodes.length>0){if(typeof e.raws.after!=="undefined"){r=e.raws.after;if(r.includes("\n")){r=r.replace(/[^\n]+$/,"")}return false}}});if(r)r=r.replace(/\S/g,"");return r}rawBeforeOpen(e){let r;e.walk(e=>{if(e.type!=="decl"){r=e.raws.between;if(typeof r!=="undefined")return false}});return r}rawColon(e){let r;e.walkDecls(e=>{if(typeof e.raws.between!=="undefined"){r=e.raws.between.replace(/[^\s:]/g,"");return false}});return r}beforeAfter(e,r){let l;if(e.type==="decl"){l=this.raw(e,null,"beforeDecl")}else if(e.type==="comment"){l=this.raw(e,null,"beforeComment")}else if(r==="before"){l=this.raw(e,null,"beforeRule")}else{l=this.raw(e,null,"beforeClose")}let t=e.parent;let i=0;while(t&&t.type!=="root"){i+=1;t=t.parent}if(l.includes("\n")){let r=this.raw(e,null,"indent");if(r.length){for(let e=0;e{"use strict";e.exports=require("postcss")},552:e=>{"use strict";e.exports=require("postcss/lib/parser")}};var r={};function __webpack_require__(l){if(r[l]){return r[l].exports}var t=r[l]={exports:{}};var i=true;try{e[l](t,t.exports,__webpack_require__);i=false}finally{if(i)delete r[l]}return t.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(845)})(); \ No newline at end of file +module.exports=(()=>{var e={618:(e,r,l)=>{const{Container:t}=l(43);class NestedDeclaration extends t{constructor(e){super(e);this.type="decl";this.isNested=true;if(!this.nodes)this.nodes=[]}}e.exports=NestedDeclaration},327:(e,r,l)=>{let{Input:t}=l(43);let i=l(270);e.exports=function scssParse(e,r){let l=new t(e,r);let f=new i(l);f.parse();return f.root}},270:(e,r,l)=>{let{Comment:t}=l(43);let i=l(552);let f=l(618);let a=l(366);class ScssParser extends i{createTokenizer(){this.tokenizer=a(this.input)}rule(e){let r=false;let l=0;let t="";for(let i of e){if(r){if(i[0]!=="comment"&&i[0]!=="{"){t+=i[1]}}else if(i[0]==="space"&&i[1].includes("\n")){break}else if(i[0]==="("){l+=1}else if(i[0]===")"){l-=1}else if(l===0&&i[0]===":"){r=true}}if(!r||t.trim()===""||/^[#:A-Za-z-]/.test(t)){super.rule(e)}else{e.pop();let r=new f;this.init(r,e[0][2]);let l;for(let r=e.length-1;r>=0;r--){if(e[r][0]!=="space"){l=e[r];break}}if(l[3]){let e=this.input.fromOffset(l[3]);r.source.end={offset:l[3],line:e.line,column:e.col}}else{let e=this.input.fromOffset(l[2]);r.source.end={offset:l[2],line:e.line,column:e.col}}while(e[0][0]!=="word"){r.raws.before+=e.shift()[1]}r.source.start={line:e[0][2],column:e[0][3]};r.prop="";while(e.length){let l=e[0][0];if(l===":"||l==="space"||l==="comment"){break}r.prop+=e.shift()[1]}r.raws.between="";let t;while(e.length){t=e.shift();if(t[0]===":"){r.raws.between+=t[1];break}else{r.raws.between+=t[1]}}if(r.prop[0]==="_"||r.prop[0]==="*"){r.raws.before+=r.prop[0];r.prop=r.prop.slice(1)}r.raws.between+=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(let l=e.length-1;l>0;l--){t=e[l];if(t[1]==="!important"){r.important=true;let t=this.stringFrom(e,l);t=this.spacesFromEnd(e)+t;if(t!==" !important"){r.raws.important=t}break}else if(t[1]==="important"){let t=e.slice(0);let i="";for(let e=l;e>0;e--){let r=t[e][0];if(i.trim().indexOf("!")===0&&r!=="space"){break}i=t.pop()[1]+i}if(i.trim().indexOf("!")===0){r.important=true;r.raws.important=i;e=t}}if(t[0]!=="space"&&t[0]!=="comment"){break}}this.raw(r,"value",e);if(r.value.includes(":")){this.checkMissedSemicolon(e)}this.current=r}}comment(e){if(e[4]==="inline"){let r=new t;this.init(r,e[2]);r.raws.inline=true;let l=this.input.fromOffset(e[3]);r.source.end={offset:e[3],line:l.line,column:l.col};let i=e[1].slice(2);if(/^\s*$/.test(i)){r.text="";r.raws.left=i;r.raws.right=""}else{let e=i.match(/^(\s*)([^]*\S)(\s*)$/);let l=e[2].replace(/(\*\/|\/\*)/g,"*//*");r.text=l;r.raws.left=e[1];r.raws.right=e[3];r.raws.text=e[2]}}else{super.comment(e)}}raw(e,r,l){super.raw(e,r,l);if(e.raws[r]){let t=e.raws[r].raw;e.raws[r].raw=l.reduce((e,r)=>{if(r[0]==="comment"&&r[4]==="inline"){let l=r[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return e+"/*"+l+"*/"}else{return e+r[1]}},"");if(t!==e.raws[r].raw){e.raws[r].scss=t}}}}e.exports=ScssParser},139:(e,r,l)=>{let t=l(779);class ScssStringifier extends t{comment(e){let r=this.raw(e,"left","commentLeft");let l=this.raw(e,"right","commentRight");if(e.raws.inline){let t=e.raws.text||e.text;this.builder("//"+r+t+l,e)}else{this.builder("/*"+r+e.text+l+"*/",e)}}decl(e,r){if(!e.isNested){super.decl(e,r)}else{let r=this.raw(e,"between","colon");let l=e.prop+r+this.rawValue(e,"value");if(e.important){l+=e.raws.important||" !important"}this.builder(l+"{",e,"start");let t;if(e.nodes&&e.nodes.length){this.body(e);t=this.raw(e,"after")}else{t=this.raw(e,"after","emptyBody")}if(t)this.builder(t);this.builder("}",e,"end")}}rawValue(e,r){let l=e[r];let t=e.raws[r];if(t&&t.value===l){return t.scss?t.scss:t.raw}else{return l}}}e.exports=ScssStringifier},886:(e,r,l)=>{let t=l(139);e.exports=function scssStringify(e,r){let l=new t(r);l.stringify(e)}},845:(e,r,l)=>{let t=l(886);let i=l(327);e.exports={parse:i,stringify:t}},366:e=>{"use strict";const r="'".charCodeAt(0);const l='"'.charCodeAt(0);const t="\\".charCodeAt(0);const i="/".charCodeAt(0);const f="\n".charCodeAt(0);const a=" ".charCodeAt(0);const s="\f".charCodeAt(0);const h="\t".charCodeAt(0);const w="\r".charCodeAt(0);const o="[".charCodeAt(0);const u="]".charCodeAt(0);const n="(".charCodeAt(0);const c=")".charCodeAt(0);const m="{".charCodeAt(0);const b="}".charCodeAt(0);const p=";".charCodeAt(0);const y="*".charCodeAt(0);const C=":".charCodeAt(0);const A="@".charCodeAt(0);const d=",".charCodeAt(0);const O="#".charCodeAt(0);const D=/[\t\n\f\r "#'()/;[\\\]{}]/g;const g=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g;const q=/.[\n"'(/\\]/;const z=/[\da-f]/i;const F=/[\n\f\r]/g;e.exports=function scssTokenize(e,V={}){let $=e.css.valueOf();let B=V.ignoreErrors;let k,S,I,_,M;let U,Z,j,G;let J=$.length;let X=0;let Y=[];let v=[];let P;function position(){return X}function unclosed(r){throw e.error("Unclosed "+r,X)}function endOfFile(){return v.length===0&&X>=J}function interpolation(){let e=1;let i=false;let f=false;while(e>0){S+=1;if($.length<=S)unclosed("interpolation");k=$.charCodeAt(S);j=$.charCodeAt(S+1);if(i){if(!f&&k===i){i=false;f=false}else if(k===t){f=!U}else if(f){f=false}}else if(k===r||k===l){i=k}else if(k===b){e-=1}else if(k===O&&j===m){e+=1}}}function nextToken(e){if(v.length)return v.pop();if(X>=J)return;let V=e?e.ignoreUnclosed:false;k=$.charCodeAt(X);switch(k){case f:case a:case h:case w:case s:{S=X;do{S+=1;k=$.charCodeAt(S)}while(k===a||k===f||k===h||k===w||k===s);G=["space",$.slice(X,S)];X=S-1;break}case o:case u:case m:case b:case C:case p:case c:{let e=String.fromCharCode(k);G=[e,e,X];break}case d:{G=["word",",",X,X+1];break}case n:{Z=Y.length?Y.pop()[1]:"";j=$.charCodeAt(X+1);if(Z==="url"&&j!==r&&j!==l){P=1;U=false;S=X+1;while(S<=$.length-1){j=$.charCodeAt(S);if(j===t){U=!U}else if(j===n){P+=1}else if(j===c){P-=1;if(P===0)break}S+=1}_=$.slice(X,S+1);G=["brackets",_,X,S];X=S}else{S=$.indexOf(")",X+1);_=$.slice(X,S+1);if(S===-1||q.test(_)){G=["(","(",X]}else{G=["brackets",_,X,S];X=S}}break}case r:case l:{I=k;S=X;U=false;while(S{"use strict";const r={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:false};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}class Stringifier{constructor(e){this.builder=e}stringify(e,r){this[e.type](e,r)}root(e){this.root=e;this.body(e);if(e.raws.after)this.builder(e.raws.after)}comment(e){let r=this.raw(e,"left","commentLeft");let l=this.raw(e,"right","commentRight");this.builder("/*"+r+e.text+l+"*/",e)}decl(e,r){let l=this.raw(e,"between","colon");let t=e.prop+l+this.rawValue(e,"value");if(e.important){t+=e.raws.important||" !important"}if(r)t+=";";this.builder(t,e)}rule(e){this.block(e,this.rawValue(e,"selector"));if(e.raws.ownSemicolon){this.builder(e.raws.ownSemicolon,e,"end")}}atrule(e,r){let l="@"+e.name;let t=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!=="undefined"){l+=e.raws.afterName}else if(t){l+=" "}if(e.nodes){this.block(e,l+t)}else{let i=(e.raws.between||"")+(r?";":"");this.builder(l+t+i,e)}}body(e){let r=e.nodes.length-1;while(r>0){if(e.nodes[r].type!=="comment")break;r-=1}let l=this.raw(e,"semicolon");for(let t=0;t{i=e.raws[l];if(typeof i!=="undefined")return false})}}if(typeof i==="undefined")i=r[t];a.rawCache[t]=i;return i}rawSemicolon(e){let r;e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type==="decl"){r=e.raws.semicolon;if(typeof r!=="undefined")return false}});return r}rawEmptyBody(e){let r;e.walk(e=>{if(e.nodes&&e.nodes.length===0){r=e.raws.after;if(typeof r!=="undefined")return false}});return r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;e.walk(l=>{let t=l.parent;if(t&&t!==e&&t.parent&&t.parent===e){if(typeof l.raws.before!=="undefined"){let e=l.raws.before.split("\n");r=e[e.length-1];r=r.replace(/\S/g,"");return false}}});return r}rawBeforeComment(e,r){let l;e.walkComments(e=>{if(typeof e.raws.before!=="undefined"){l=e.raws.before;if(l.includes("\n")){l=l.replace(/[^\n]+$/,"")}return false}});if(typeof l==="undefined"){l=this.raw(r,null,"beforeDecl")}else if(l){l=l.replace(/\S/g,"")}return l}rawBeforeDecl(e,r){let l;e.walkDecls(e=>{if(typeof e.raws.before!=="undefined"){l=e.raws.before;if(l.includes("\n")){l=l.replace(/[^\n]+$/,"")}return false}});if(typeof l==="undefined"){l=this.raw(r,null,"beforeRule")}else if(l){l=l.replace(/\S/g,"")}return l}rawBeforeRule(e){let r;e.walk(l=>{if(l.nodes&&(l.parent!==e||e.first!==l)){if(typeof l.raws.before!=="undefined"){r=l.raws.before;if(r.includes("\n")){r=r.replace(/[^\n]+$/,"")}return false}}});if(r)r=r.replace(/\S/g,"");return r}rawBeforeClose(e){let r;e.walk(e=>{if(e.nodes&&e.nodes.length>0){if(typeof e.raws.after!=="undefined"){r=e.raws.after;if(r.includes("\n")){r=r.replace(/[^\n]+$/,"")}return false}}});if(r)r=r.replace(/\S/g,"");return r}rawBeforeOpen(e){let r;e.walk(e=>{if(e.type!=="decl"){r=e.raws.between;if(typeof r!=="undefined")return false}});return r}rawColon(e){let r;e.walkDecls(e=>{if(typeof e.raws.between!=="undefined"){r=e.raws.between.replace(/[^\s:]/g,"");return false}});return r}beforeAfter(e,r){let l;if(e.type==="decl"){l=this.raw(e,null,"beforeDecl")}else if(e.type==="comment"){l=this.raw(e,null,"beforeComment")}else if(r==="before"){l=this.raw(e,null,"beforeRule")}else{l=this.raw(e,null,"beforeClose")}let t=e.parent;let i=0;while(t&&t.type!=="root"){i+=1;t=t.parent}if(l.includes("\n")){let r=this.raw(e,null,"indent");if(r.length){for(let e=0;e{"use strict";e.exports=require("postcss")},552:e=>{"use strict";e.exports=require("postcss/lib/parser")}};var r={};function __nccwpck_require__(l){if(r[l]){return r[l].exports}var t=r[l]={exports:{}};var i=true;try{e[l](t,t.exports,__nccwpck_require__);i=false}finally{if(i)delete r[l]}return t.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(845)})(); \ No newline at end of file diff --git a/packages/next/compiled/recast/main.js b/packages/next/compiled/recast/main.js index 98cf242a14279a7..b1d37a18271475a 100644 --- a/packages/next/compiled/recast/main.js +++ b/packages/next/compiled/recast/main.js @@ -1 +1 @@ -module.exports=(()=>{var e={781:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(574));var s=i(r(8));function default_1(e){e.use(s.default);var t=e.use(n.default);var r=e.use(a.default).defaults;var i=t.Type.def;var u=t.Type.or;i("Noop").bases("Statement").build();i("DoExpression").bases("Expression").build("body").field("body",[i("Statement")]);i("Super").bases("Expression").build();i("BindExpression").bases("Expression").build("object","callee").field("object",u(i("Expression"),null)).field("callee",i("Expression"));i("Decorator").bases("Node").build("expression").field("expression",i("Expression"));i("Property").field("decorators",u([i("Decorator")],null),r["null"]);i("MethodDefinition").field("decorators",u([i("Decorator")],null),r["null"]);i("MetaProperty").bases("Expression").build("meta","property").field("meta",i("Identifier")).field("property",i("Identifier"));i("ParenthesizedExpression").bases("Expression").build("expression").field("expression",i("Expression"));i("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",i("Identifier"));i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local");i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local");i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",u(i("Declaration"),i("Expression")));i("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",u(i("Declaration"),null)).field("specifiers",[i("ExportSpecifier")],r.emptyArray).field("source",u(i("Literal"),null),r["null"]);i("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",i("Identifier"));i("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier"));i("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier"));i("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",u(i("Identifier"),null)).field("source",i("Literal"));i("CommentBlock").bases("Comment").build("value","leading","trailing");i("CommentLine").bases("Comment").build("value","leading","trailing");i("Directive").bases("Node").build("value").field("value",i("DirectiveLiteral"));i("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,r["use strict"]);i("InterpreterDirective").bases("Node").build("value").field("value",String);i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],r.emptyArray);i("Program").bases("Node").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],r.emptyArray).field("interpreter",u(i("InterpreterDirective"),null),r["null"]);i("StringLiteral").bases("Literal").build("value").field("value",String);i("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",u(String,null),r["null"]).field("extra",{rawValue:Number,raw:String},function getDefault(){return{rawValue:this.value,raw:this.value+""}});i("BigIntLiteral").bases("Literal").build("value").field("value",u(String,Number)).field("extra",{rawValue:String,raw:String},function getDefault(){return{rawValue:String(this.value),raw:this.value+"n"}});i("NullLiteral").bases("Literal").build().field("value",null,r["null"]);i("BooleanLiteral").bases("Literal").build("value").field("value",Boolean);i("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)});var l=u(i("Property"),i("ObjectMethod"),i("ObjectProperty"),i("SpreadProperty"),i("SpreadElement"));i("ObjectExpression").bases("Expression").build("properties").field("properties",[l]);i("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",u("method","get","set")).field("key",u(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,r["false"]).field("generator",Boolean,r["false"]).field("async",Boolean,r["false"]).field("accessibility",u(i("Literal"),null),r["null"]).field("decorators",u([i("Decorator")],null),r["null"]);i("ObjectProperty").bases("Node").build("key","value").field("key",u(i("Literal"),i("Identifier"),i("Expression"))).field("value",u(i("Expression"),i("Pattern"))).field("accessibility",u(i("Literal"),null),r["null"]).field("computed",Boolean,r["false"]);var o=u(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassPrivateProperty"),i("ClassMethod"),i("ClassPrivateMethod"));i("ClassBody").bases("Declaration").build("body").field("body",[o]);i("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",u(i("Literal"),i("Identifier"),i("Expression")));i("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",i("PrivateName"));["ClassMethod","ClassPrivateMethod"].forEach(function(e){i(e).field("kind",u("get","set","method","constructor"),function(){return"method"}).field("body",i("BlockStatement")).field("computed",Boolean,r["false"]).field("static",u(Boolean,null),r["null"]).field("abstract",u(Boolean,null),r["null"]).field("access",u("public","private","protected",null),r["null"]).field("accessibility",u("public","private","protected",null),r["null"]).field("decorators",u([i("Decorator")],null),r["null"]).field("optional",u(Boolean,null),r["null"])});i("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",i("PrivateName")).field("value",u(i("Expression"),null),r["null"]);i("PrivateName").bases("Expression","Pattern").build("id").field("id",i("Identifier"));var c=u(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"),i("ObjectProperty"),i("RestProperty"));i("ObjectPattern").bases("Pattern").build("properties").field("properties",[c]).field("decorators",u([i("Decorator")],null),r["null"]);i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression"));i("RestProperty").bases("Node").build("argument").field("argument",i("Expression"));i("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",u(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement"));i("Import").bases("Expression").build()}t.default=default_1;e.exports=t["default"]},716:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(781));var a=i(r(544));function default_1(e){e.use(n.default);e.use(a.default)}t.default=default_1;e.exports=t["default"]},201:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(574));function default_1(e){var t=e.use(n.default);var r=t.Type;var i=r.def;var s=r.or;var u=e.use(a.default);var l=u.defaults;var o=u.geq;i("Printable").field("loc",s(i("SourceLocation"),null),l["null"],true);i("Node").bases("Printable").field("type",String).field("comments",s([i("Comment")],null),l["null"],true);i("SourceLocation").field("start",i("Position")).field("end",i("Position")).field("source",s(String,null),l["null"]);i("Position").field("line",o(1)).field("column",o(0));i("File").bases("Node").build("program","name").field("program",i("Program")).field("name",s(String,null),l["null"]);i("Program").bases("Node").build("body").field("body",[i("Statement")]);i("Function").bases("Node").field("id",s(i("Identifier"),null),l["null"]).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("generator",Boolean,l["false"]).field("async",Boolean,l["false"]);i("Statement").bases("Node");i("EmptyStatement").bases("Statement").build();i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]);i("ExpressionStatement").bases("Statement").build("expression").field("expression",i("Expression"));i("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",i("Expression")).field("consequent",i("Statement")).field("alternate",s(i("Statement"),null),l["null"]);i("LabeledStatement").bases("Statement").build("label","body").field("label",i("Identifier")).field("body",i("Statement"));i("BreakStatement").bases("Statement").build("label").field("label",s(i("Identifier"),null),l["null"]);i("ContinueStatement").bases("Statement").build("label").field("label",s(i("Identifier"),null),l["null"]);i("WithStatement").bases("Statement").build("object","body").field("object",i("Expression")).field("body",i("Statement"));i("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",i("Expression")).field("cases",[i("SwitchCase")]).field("lexical",Boolean,l["false"]);i("ReturnStatement").bases("Statement").build("argument").field("argument",s(i("Expression"),null));i("ThrowStatement").bases("Statement").build("argument").field("argument",i("Expression"));i("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",i("BlockStatement")).field("handler",s(i("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[i("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[i("CatchClause")],l.emptyArray).field("finalizer",s(i("BlockStatement"),null),l["null"]);i("CatchClause").bases("Node").build("param","guard","body").field("param",s(i("Pattern"),null),l["null"]).field("guard",s(i("Expression"),null),l["null"]).field("body",i("BlockStatement"));i("WhileStatement").bases("Statement").build("test","body").field("test",i("Expression")).field("body",i("Statement"));i("DoWhileStatement").bases("Statement").build("body","test").field("body",i("Statement")).field("test",i("Expression"));i("ForStatement").bases("Statement").build("init","test","update","body").field("init",s(i("VariableDeclaration"),i("Expression"),null)).field("test",s(i("Expression"),null)).field("update",s(i("Expression"),null)).field("body",i("Statement"));i("ForInStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement"));i("DebuggerStatement").bases("Statement").build();i("Declaration").bases("Statement");i("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",i("Identifier"));i("FunctionExpression").bases("Function","Expression").build("id","params","body");i("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",s("var","let","const")).field("declarations",[i("VariableDeclarator")]);i("VariableDeclarator").bases("Node").build("id","init").field("id",i("Pattern")).field("init",s(i("Expression"),null),l["null"]);i("Expression").bases("Node");i("ThisExpression").bases("Expression").build();i("ArrayExpression").bases("Expression").build("elements").field("elements",[s(i("Expression"),null)]);i("ObjectExpression").bases("Expression").build("properties").field("properties",[i("Property")]);i("Property").bases("Node").build("kind","key","value").field("kind",s("init","get","set")).field("key",s(i("Literal"),i("Identifier"))).field("value",i("Expression"));i("SequenceExpression").bases("Expression").build("expressions").field("expressions",[i("Expression")]);var c=s("-","+","!","~","typeof","void","delete");i("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",c).field("argument",i("Expression")).field("prefix",Boolean,l["true"]);var h=s("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","**","&","|","^","in","instanceof");i("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",i("Expression")).field("right",i("Expression"));var f=s("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");i("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",s(i("Pattern"),i("MemberExpression"))).field("right",i("Expression"));var p=s("++","--");i("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",i("Expression")).field("prefix",Boolean);var d=s("||","&&");i("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",i("Expression")).field("right",i("Expression"));i("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",i("Expression")).field("consequent",i("Expression")).field("alternate",i("Expression"));i("NewExpression").bases("Expression").build("callee","arguments").field("callee",i("Expression")).field("arguments",[i("Expression")]);i("CallExpression").bases("Expression").build("callee","arguments").field("callee",i("Expression")).field("arguments",[i("Expression")]);i("MemberExpression").bases("Expression").build("object","property","computed").field("object",i("Expression")).field("property",s(i("Identifier"),i("Expression"))).field("computed",Boolean,function(){var e=this.property.type;if(e==="Literal"||e==="MemberExpression"||e==="BinaryExpression"){return true}return false});i("Pattern").bases("Node");i("SwitchCase").bases("Node").build("test","consequent").field("test",s(i("Expression"),null)).field("consequent",[i("Statement")]);i("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,l["false"]);i("Literal").bases("Expression").build("value").field("value",s(String,Boolean,null,Number,RegExp)).field("regex",s({pattern:String,flags:String},null),function(){if(this.value instanceof RegExp){var e="";if(this.value.ignoreCase)e+="i";if(this.value.multiline)e+="m";if(this.value.global)e+="g";return{pattern:this.value.source,flags:e}}return null});i("Comment").bases("Printable").field("value",String).field("leading",Boolean,l["true"]).field("trailing",Boolean,l["false"])}t.default=default_1;e.exports=t["default"]},735:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(574));var s=i(r(201));function default_1(e){e.use(s.default);var t=e.use(n.default);var r=t.Type;var i=t.Type.def;var u=r.or;var l=e.use(a.default);var o=l.defaults;i("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,o["true"]);i("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,o["true"]);var c=u("||","&&","??");i("LogicalExpression").field("operator",c)}t.default=default_1;e.exports=t["default"]},933:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(201));var a=i(r(361));var s=i(r(574));function default_1(e){e.use(n.default);var t=e.use(a.default);var r=t.Type.def;var i=t.Type.or;var u=e.use(s.default).defaults;r("Function").field("generator",Boolean,u["false"]).field("expression",Boolean,u["false"]).field("defaults",[i(r("Expression"),null)],u.emptyArray).field("rest",i(r("Identifier"),null),u["null"]);r("RestElement").bases("Pattern").build("argument").field("argument",r("Pattern")).field("typeAnnotation",i(r("TypeAnnotation"),r("TSTypeAnnotation"),null),u["null"]);r("SpreadElementPattern").bases("Pattern").build("argument").field("argument",r("Pattern"));r("FunctionDeclaration").build("id","params","body","generator","expression");r("FunctionExpression").build("id","params","body","generator","expression");r("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,u["null"]).field("body",i(r("BlockStatement"),r("Expression"))).field("generator",false,u["false"]);r("ForOfStatement").bases("Statement").build("left","right","body").field("left",i(r("VariableDeclaration"),r("Pattern"))).field("right",r("Expression")).field("body",r("Statement"));r("YieldExpression").bases("Expression").build("argument","delegate").field("argument",i(r("Expression"),null)).field("delegate",Boolean,u["false"]);r("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",i(r("Expression"),null));r("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",i(r("Expression"),null));r("ComprehensionBlock").bases("Node").build("left","right","each").field("left",r("Pattern")).field("right",r("Expression")).field("each",Boolean);r("Property").field("key",i(r("Literal"),r("Identifier"),r("Expression"))).field("value",i(r("Expression"),r("Pattern"))).field("method",Boolean,u["false"]).field("shorthand",Boolean,u["false"]).field("computed",Boolean,u["false"]);r("ObjectProperty").field("shorthand",Boolean,u["false"]);r("PropertyPattern").bases("Pattern").build("key","pattern").field("key",i(r("Literal"),r("Identifier"),r("Expression"))).field("pattern",r("Pattern")).field("computed",Boolean,u["false"]);r("ObjectPattern").bases("Pattern").build("properties").field("properties",[i(r("PropertyPattern"),r("Property"))]);r("ArrayPattern").bases("Pattern").build("elements").field("elements",[i(r("Pattern"),null)]);r("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",i("constructor","method","get","set")).field("key",r("Expression")).field("value",r("Function")).field("computed",Boolean,u["false"]).field("static",Boolean,u["false"]);r("SpreadElement").bases("Node").build("argument").field("argument",r("Expression"));r("ArrayExpression").field("elements",[i(r("Expression"),r("SpreadElement"),r("RestElement"),null)]);r("NewExpression").field("arguments",[i(r("Expression"),r("SpreadElement"))]);r("CallExpression").field("arguments",[i(r("Expression"),r("SpreadElement"))]);r("AssignmentPattern").bases("Pattern").build("left","right").field("left",r("Pattern")).field("right",r("Expression"));var l=i(r("MethodDefinition"),r("VariableDeclarator"),r("ClassPropertyDefinition"),r("ClassProperty"));r("ClassProperty").bases("Declaration").build("key").field("key",i(r("Literal"),r("Identifier"),r("Expression"))).field("computed",Boolean,u["false"]);r("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",l);r("ClassBody").bases("Declaration").build("body").field("body",[l]);r("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",i(r("Identifier"),null)).field("body",r("ClassBody")).field("superClass",i(r("Expression"),null),u["null"]);r("ClassExpression").bases("Expression").build("id","body","superClass").field("id",i(r("Identifier"),null),u["null"]).field("body",r("ClassBody")).field("superClass",i(r("Expression"),null),u["null"]);r("Specifier").bases("Node");r("ModuleSpecifier").bases("Specifier").field("local",i(r("Identifier"),null),u["null"]).field("id",i(r("Identifier"),null),u["null"]).field("name",i(r("Identifier"),null),u["null"]);r("ImportSpecifier").bases("ModuleSpecifier").build("id","name");r("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id");r("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id");r("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[i(r("ImportSpecifier"),r("ImportNamespaceSpecifier"),r("ImportDefaultSpecifier"))],u.emptyArray).field("source",r("Literal")).field("importKind",i("value","type"),function(){return"value"});r("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",r("Expression")).field("quasi",r("TemplateLiteral"));r("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[r("TemplateElement")]).field("expressions",[r("Expression")]);r("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)}t.default=default_1;e.exports=t["default"]},8:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(933));var a=i(r(361));var s=i(r(574));function default_1(e){e.use(n.default);var t=e.use(a.default);var r=t.Type.def;var i=t.Type.or;var u=e.use(s.default).defaults;r("Function").field("async",Boolean,u["false"]);r("SpreadProperty").bases("Node").build("argument").field("argument",r("Expression"));r("ObjectExpression").field("properties",[i(r("Property"),r("SpreadProperty"),r("SpreadElement"))]);r("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",r("Pattern"));r("ObjectPattern").field("properties",[i(r("Property"),r("PropertyPattern"),r("SpreadPropertyPattern"))]);r("AwaitExpression").bases("Expression").build("argument","all").field("argument",i(r("Expression"),null)).field("all",Boolean,u["false"])}t.default=default_1;e.exports=t["default"]},188:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(8));var a=i(r(361));var s=i(r(574));function default_1(e){e.use(n.default);var t=e.use(a.default);var r=e.use(s.default).defaults;var i=t.Type.def;var u=t.Type.or;i("VariableDeclaration").field("declarations",[u(i("VariableDeclarator"),i("Identifier"))]);i("Property").field("value",u(i("Expression"),i("Pattern")));i("ArrayPattern").field("elements",[u(i("Pattern"),i("SpreadElement"),null)]);i("ObjectPattern").field("properties",[u(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"))]);i("ExportSpecifier").bases("ModuleSpecifier").build("id","name");i("ExportBatchSpecifier").bases("Specifier").build();i("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",u(i("Declaration"),i("Expression"),null)).field("specifiers",[u(i("ExportSpecifier"),i("ExportBatchSpecifier"))],r.emptyArray).field("source",u(i("Literal"),null),r["null"]);i("Block").bases("Comment").build("value","leading","trailing");i("Line").bases("Comment").build("value","leading","trailing")}t.default=default_1;e.exports=t["default"]},544:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(8));var a=i(r(61));var s=i(r(361));var u=i(r(574));function default_1(e){e.use(n.default);e.use(a.default);var t=e.use(s.default);var r=t.Type.def;var i=t.Type.or;var l=e.use(u.default).defaults;r("Flow").bases("Node");r("FlowType").bases("Flow");r("AnyTypeAnnotation").bases("FlowType").build();r("EmptyTypeAnnotation").bases("FlowType").build();r("MixedTypeAnnotation").bases("FlowType").build();r("VoidTypeAnnotation").bases("FlowType").build();r("NumberTypeAnnotation").bases("FlowType").build();r("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String);r("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String);r("StringTypeAnnotation").bases("FlowType").build();r("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String);r("BooleanTypeAnnotation").bases("FlowType").build();r("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String);r("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",r("FlowType"));r("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",r("FlowType"));r("NullLiteralTypeAnnotation").bases("FlowType").build();r("NullTypeAnnotation").bases("FlowType").build();r("ThisTypeAnnotation").bases("FlowType").build();r("ExistsTypeAnnotation").bases("FlowType").build();r("ExistentialTypeParam").bases("FlowType").build();r("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[r("FunctionTypeParam")]).field("returnType",r("FlowType")).field("rest",i(r("FunctionTypeParam"),null)).field("typeParameters",i(r("TypeParameterDeclaration"),null));r("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",r("Identifier")).field("typeAnnotation",r("FlowType")).field("optional",Boolean);r("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",r("FlowType"));r("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[i(r("ObjectTypeProperty"),r("ObjectTypeSpreadProperty"))]).field("indexers",[r("ObjectTypeIndexer")],l.emptyArray).field("callProperties",[r("ObjectTypeCallProperty")],l.emptyArray).field("inexact",i(Boolean,void 0),l["undefined"]).field("exact",Boolean,l["false"]).field("internalSlots",[r("ObjectTypeInternalSlot")],l.emptyArray);r("Variance").bases("Node").build("kind").field("kind",i("plus","minus"));var o=i(r("Variance"),"plus","minus",null);r("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",i(r("Literal"),r("Identifier"))).field("value",r("FlowType")).field("optional",Boolean).field("variance",o,l["null"]);r("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",r("Identifier")).field("key",r("FlowType")).field("value",r("FlowType")).field("variance",o,l["null"]);r("ObjectTypeCallProperty").bases("Node").build("value").field("value",r("FunctionTypeAnnotation")).field("static",Boolean,l["false"]);r("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",i(r("Identifier"),r("QualifiedTypeIdentifier"))).field("id",r("Identifier"));r("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",i(r("Identifier"),r("QualifiedTypeIdentifier"))).field("typeParameters",i(r("TypeParameterInstantiation"),null));r("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",r("Identifier")).field("property",i(r("MemberTypeAnnotation"),r("GenericTypeAnnotation")));r("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]);r("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]);r("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",r("FlowType"));r("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",r("FlowType"));r("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",r("Identifier")).field("value",r("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean);r("TypeParameterDeclaration").bases("Node").build("params").field("params",[r("TypeParameter")]);r("TypeParameterInstantiation").bases("Node").build("params").field("params",[r("FlowType")]);r("TypeParameter").bases("FlowType").build("name","variance","bound").field("name",String).field("variance",o,l["null"]).field("bound",i(r("TypeAnnotation"),null),l["null"]);r("ClassProperty").field("variance",o,l["null"]);r("ClassImplements").bases("Node").build("id").field("id",r("Identifier")).field("superClass",i(r("Expression"),null),l["null"]).field("typeParameters",i(r("TypeParameterInstantiation"),null),l["null"]);r("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",r("ObjectTypeAnnotation")).field("extends",i([r("InterfaceExtends")],null),l["null"]);r("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",r("Identifier")).field("typeParameters",i(r("TypeParameterDeclaration"),null),l["null"]).field("body",r("ObjectTypeAnnotation")).field("extends",[r("InterfaceExtends")]);r("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends");r("InterfaceExtends").bases("Node").build("id").field("id",r("Identifier")).field("typeParameters",i(r("TypeParameterInstantiation"),null),l["null"]);r("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",r("Identifier")).field("typeParameters",i(r("TypeParameterDeclaration"),null)).field("right",r("FlowType"));r("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",r("Identifier")).field("typeParameters",i(r("TypeParameterDeclaration"),null)).field("impltype",r("FlowType")).field("supertype",r("FlowType"));r("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right");r("DeclareOpaqueType").bases("TypeAlias").build("id","typeParameters","supertype");r("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",r("Expression")).field("typeAnnotation",r("TypeAnnotation"));r("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]);r("DeclareVariable").bases("Statement").build("id").field("id",r("Identifier"));r("DeclareFunction").bases("Statement").build("id").field("id",r("Identifier"));r("DeclareClass").bases("InterfaceDeclaration").build("id");r("DeclareModule").bases("Statement").build("id","body").field("id",i(r("Identifier"),r("Literal"))).field("body",r("BlockStatement"));r("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",r("TypeAnnotation"));r("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(r("DeclareVariable"),r("DeclareFunction"),r("DeclareClass"),r("FlowType"),null)).field("specifiers",[i(r("ExportSpecifier"),r("ExportBatchSpecifier"))],l.emptyArray).field("source",i(r("Literal"),null),l["null"]);r("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",i(r("Literal"),null),l["null"]);r("FlowPredicate").bases("Flow");r("InferredPredicate").bases("FlowPredicate").build();r("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",r("Expression"));r("CallExpression").field("typeArguments",i(null,r("TypeParameterInstantiation")),l["null"]);r("NewExpression").field("typeArguments",i(null,r("TypeParameterInstantiation")),l["null"])}t.default=default_1;e.exports=t["default"]},894:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(8));var a=i(r(361));var s=i(r(574));function default_1(e){e.use(n.default);var t=e.use(a.default);var r=t.Type.def;var i=t.Type.or;var u=e.use(s.default).defaults;r("JSXAttribute").bases("Node").build("name","value").field("name",i(r("JSXIdentifier"),r("JSXNamespacedName"))).field("value",i(r("Literal"),r("JSXExpressionContainer"),null),u["null"]);r("JSXIdentifier").bases("Identifier").build("name").field("name",String);r("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",r("JSXIdentifier")).field("name",r("JSXIdentifier"));r("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",i(r("JSXIdentifier"),r("JSXMemberExpression"))).field("property",r("JSXIdentifier")).field("computed",Boolean,u.false);var l=i(r("JSXIdentifier"),r("JSXNamespacedName"),r("JSXMemberExpression"));r("JSXSpreadAttribute").bases("Node").build("argument").field("argument",r("Expression"));var o=[i(r("JSXAttribute"),r("JSXSpreadAttribute"))];r("JSXExpressionContainer").bases("Expression").build("expression").field("expression",r("Expression"));r("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",r("JSXOpeningElement")).field("closingElement",i(r("JSXClosingElement"),null),u["null"]).field("children",[i(r("JSXElement"),r("JSXExpressionContainer"),r("JSXFragment"),r("JSXText"),r("Literal"))],u.emptyArray).field("name",l,function(){return this.openingElement.name},true).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},true).field("attributes",o,function(){return this.openingElement.attributes},true);r("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",l).field("attributes",o,u.emptyArray).field("selfClosing",Boolean,u["false"]);r("JSXClosingElement").bases("Node").build("name").field("name",l);r("JSXFragment").bases("Expression").build("openingElement","closingElement","children").field("openingElement",r("JSXOpeningFragment")).field("closingElement",r("JSXClosingFragment")).field("children",[i(r("JSXElement"),r("JSXExpressionContainer"),r("JSXFragment"),r("JSXText"),r("Literal"))],u.emptyArray);r("JSXOpeningFragment").bases("Node").build();r("JSXClosingFragment").bases("Node").build();r("JSXText").bases("Literal").build("value").field("value",String);r("JSXEmptyExpression").bases("Expression").build();r("JSXSpreadChild").bases("Expression").build("expression").field("expression",r("Expression"))}t.default=default_1;e.exports=t["default"]},61:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(574));function default_1(e){var t=e.use(n.default);var r=t.Type.def;var i=t.Type.or;var s=e.use(a.default).defaults;var u=i(r("TypeAnnotation"),r("TSTypeAnnotation"),null);var l=i(r("TypeParameterDeclaration"),r("TSTypeParameterDeclaration"),null);r("Identifier").field("typeAnnotation",u,s["null"]);r("ObjectPattern").field("typeAnnotation",u,s["null"]);r("Function").field("returnType",u,s["null"]).field("typeParameters",l,s["null"]);r("ClassProperty").build("key","value","typeAnnotation","static").field("value",i(r("Expression"),null)).field("static",Boolean,s["false"]).field("typeAnnotation",u,s["null"]);["ClassDeclaration","ClassExpression"].forEach(function(e){r(e).field("typeParameters",l,s["null"]).field("superTypeParameters",i(r("TypeParameterInstantiation"),r("TSTypeParameterInstantiation"),null),s["null"]).field("implements",i([r("ClassImplements")],[r("TSExpressionWithTypeArguments")]),s.emptyArray)})}t.default=default_1;e.exports=t["default"]},284:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(781));var a=i(r(61));var s=i(r(361));var u=i(r(574));function default_1(e){e.use(n.default);e.use(a.default);var t=e.use(s.default);var r=t.namedTypes;var i=t.Type.def;var l=t.Type.or;var o=e.use(u.default).defaults;var c=t.Type.from(function(e,t){if(r.StringLiteral&&r.StringLiteral.check(e,t)){return true}if(r.Literal&&r.Literal.check(e,t)&&typeof e.value==="string"){return true}return false},"StringLiteral");i("TSType").bases("Node");var h=l(i("Identifier"),i("TSQualifiedName"));i("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",h);i("TSHasOptionalTypeParameterInstantiation").field("typeParameters",l(i("TSTypeParameterInstantiation"),null),o["null"]);i("TSHasOptionalTypeParameters").field("typeParameters",l(i("TSTypeParameterDeclaration"),null,void 0),o["null"]);i("TSHasOptionalTypeAnnotation").field("typeAnnotation",l(i("TSTypeAnnotation"),null),o["null"]);i("TSQualifiedName").bases("Node").build("left","right").field("left",h).field("right",h);i("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",i("Expression")).field("typeAnnotation",i("TSType")).field("extra",l({parenthesized:Boolean},null),o["null"]);i("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",i("Expression"));["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSThisType"].forEach(function(e){i(e).bases("TSType").build()});i("TSArrayType").bases("TSType").build("elementType").field("elementType",i("TSType"));i("TSLiteralType").bases("TSType").build("literal").field("literal",l(i("NumericLiteral"),i("StringLiteral"),i("BooleanLiteral"),i("TemplateLiteral"),i("UnaryExpression")));["TSUnionType","TSIntersectionType"].forEach(function(e){i(e).bases("TSType").build("types").field("types",[i("TSType")])});i("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",i("TSType")).field("extendsType",i("TSType")).field("trueType",i("TSType")).field("falseType",i("TSType"));i("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",i("TSTypeParameter"));i("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",i("TSType"));var f=[l(i("Identifier"),i("RestElement"),i("ArrayPattern"),i("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(function(e){i(e).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",f)});i("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,o["false"]).field("async",Boolean,o["false"]).field("generator",Boolean,o["false"]).field("id",l(i("Identifier"),null),o["null"]).field("params",[i("Pattern")]).field("returnType",l(i("TSTypeAnnotation"),i("Noop"),null),o["null"]);i("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,o["false"]).field("generator",Boolean,o["false"]).field("params",[i("Pattern")]).field("abstract",Boolean,o["false"]).field("accessibility",l("public","private","protected",void 0),o["undefined"]).field("static",Boolean,o["false"]).field("computed",Boolean,o["false"]).field("optional",Boolean,o["false"]).field("key",l(i("Identifier"),i("StringLiteral"),i("NumericLiteral"),i("Expression"))).field("kind",l("get","set","method","constructor"),function getDefault(){return"method"}).field("access",l("public","private","protected",void 0),o["undefined"]).field("decorators",l([i("Decorator")],null),o["null"]).field("returnType",l(i("TSTypeAnnotation"),i("Noop"),null),o["null"]);i("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",l(Boolean,"+","-"),o["false"]).field("typeParameter",i("TSTypeParameter")).field("optional",l(Boolean,"+","-"),o["false"]).field("typeAnnotation",l(i("TSType"),null),o["null"]);i("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[i("TSType")]);i("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",i("TSType"));i("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",i("TSType"));i("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",i("TSType")).field("indexType",i("TSType"));i("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",i("TSType"));i("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",l(i("TSType"),i("TSTypeAnnotation")));i("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[i("Identifier")]).field("readonly",Boolean,o["false"]);i("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",i("Expression")).field("computed",Boolean,o["false"]).field("readonly",Boolean,o["false"]).field("optional",Boolean,o["false"]).field("initializer",l(i("Expression"),null),o["null"]);i("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",i("Expression")).field("computed",Boolean,o["false"]).field("optional",Boolean,o["false"]).field("parameters",f);i("TSTypePredicate").bases("TSTypeAnnotation").build("parameterName","typeAnnotation").field("parameterName",l(i("Identifier"),i("TSThisType"))).field("typeAnnotation",i("TSTypeAnnotation"));["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(function(e){i(e).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",f)});i("TSEnumMember").bases("Node").build("id","initializer").field("id",l(i("Identifier"),c)).field("initializer",l(i("Expression"),null),o["null"]);i("TSTypeQuery").bases("TSType").build("exprName").field("exprName",l(h,i("TSImportType")));var p=l(i("TSCallSignatureDeclaration"),i("TSConstructSignatureDeclaration"),i("TSIndexSignature"),i("TSMethodSignature"),i("TSPropertySignature"));i("TSTypeLiteral").bases("TSType").build("members").field("members",[p]);i("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",String).field("constraint",l(i("TSType"),void 0),o["undefined"]).field("default",l(i("TSType"),void 0),o["undefined"]);i("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",i("TSType")).field("expression",i("Expression")).field("extra",l({parenthesized:Boolean},null),o["null"]);i("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[i("TSTypeParameter")]);i("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[i("TSType")]);i("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",i("Identifier")).field("const",Boolean,o["false"]).field("declare",Boolean,o["false"]).field("members",[i("TSEnumMember")]).field("initializer",l(i("Expression"),null),o["null"]);i("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",i("Identifier")).field("declare",Boolean,o["false"]).field("typeAnnotation",i("TSType"));i("TSModuleBlock").bases("Node").build("body").field("body",[i("Statement")]);i("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",l(c,h)).field("declare",Boolean,o["false"]).field("global",Boolean,o["false"]).field("body",l(i("TSModuleBlock"),i("TSModuleDeclaration"),null),o["null"]);i("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",c).field("qualifier",l(h,void 0),o["undefined"]);i("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",i("Identifier")).field("isExport",Boolean,o["false"]).field("moduleReference",l(h,i("TSExternalModuleReference")));i("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",c);i("TSExportAssignment").bases("Statement").build("expression").field("expression",i("Expression"));i("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",i("Identifier"));i("TSInterfaceBody").bases("Node").build("body").field("body",[p]);i("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",h);i("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",h).field("declare",Boolean,o["false"]).field("extends",l([i("TSExpressionWithTypeArguments")],null),o["null"]).field("body",i("TSInterfaceBody"));i("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",l("public","private","protected",void 0),o["undefined"]).field("readonly",Boolean,o["false"]).field("parameter",l(i("Identifier"),i("AssignmentPattern")));i("ClassProperty").field("access",l("public","private","protected",void 0),o["undefined"]);i("ClassBody").field("body",[l(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassPrivateProperty"),i("ClassMethod"),i("ClassPrivateMethod"),i("TSDeclareMethod"),p)])}t.default=default_1;e.exports=t["default"]},997:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(504));var s=i(r(500));var u=i(r(890));var l=i(r(724));function default_1(e){var t=createFork();var r=t.use(n.default);e.forEach(t.use);r.finalize();var i=t.use(a.default);return{Type:r.Type,builtInTypes:r.builtInTypes,namedTypes:r.namedTypes,builders:r.builders,defineMethod:r.defineMethod,getFieldNames:r.getFieldNames,getFieldValue:r.getFieldValue,eachField:r.eachField,someField:r.someField,getSupertypeNames:r.getSupertypeNames,getBuilderName:r.getBuilderName,astNodesAreEquivalent:t.use(s.default),finalize:r.finalize,Path:t.use(u.default),NodePath:t.use(l.default),PathVisitor:i,use:t.use,visit:i.visit}}t.default=default_1;function createFork(){var e=[];var t=[];function use(i){var n=e.indexOf(i);if(n===-1){n=e.length;e.push(i);t[n]=i(r)}return t[n]}var r={use:use};return r}e.exports=t["default"]},895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var r;(function(e){})(r=t.namedTypes||(t.namedTypes={}))},500:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));function default_1(e){var t=e.use(n.default);var r=t.getFieldNames;var i=t.getFieldValue;var a=t.builtInTypes.array;var s=t.builtInTypes.object;var u=t.builtInTypes.Date;var l=t.builtInTypes.RegExp;var o=Object.prototype.hasOwnProperty;function astNodesAreEquivalent(e,t,r){if(a.check(r)){r.length=0}else{r=null}return areEquivalent(e,t,r)}astNodesAreEquivalent.assert=function(e,t){var r=[];if(!astNodesAreEquivalent(e,t,r)){if(r.length===0){if(e!==t){throw new Error("Nodes must be equal")}}else{throw new Error("Nodes differ in the following path: "+r.map(subscriptForProperty).join(""))}}};function subscriptForProperty(e){if(/[_$a-z][_$a-z0-9]*/i.test(e)){return"."+e}return"["+JSON.stringify(e)+"]"}function areEquivalent(e,t,r){if(e===t){return true}if(a.check(e)){return arraysAreEquivalent(e,t,r)}if(s.check(e)){return objectsAreEquivalent(e,t,r)}if(u.check(e)){return u.check(t)&&+e===+t}if(l.check(e)){return l.check(t)&&(e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase)}return e==t}function arraysAreEquivalent(e,t,r){a.assert(e);var i=e.length;if(!a.check(t)||t.length!==i){if(r){r.push("length")}return false}for(var n=0;nc){return true}if(l===c&&this.name==="right"){if(n.right!==a){throw new Error("Nodes must be equal")}return true}}default:return false}case"SequenceExpression":switch(n.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(n.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return n.type==="MemberExpression"&&u.check(i.value)&&this.name==="object"&&n.object===i;case"AssignmentExpression":case"ConditionalExpression":switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&n.callee===i;case"ConditionalExpression":return this.name==="test"&&n.test===i;case"MemberExpression":return this.name==="object"&&n.object===i;default:return false}default:if(n.type==="NewExpression"&&this.name==="callee"&&n.callee===i){return containsCallExpression(i)}}if(e!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(e){return r.BinaryExpression.check(e)||r.LogicalExpression.check(e)}function isUnaryLike(e){return r.UnaryExpression.check(e)||r.SpreadElement&&r.SpreadElement.check(e)||r.SpreadProperty&&r.SpreadProperty.check(e)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){p[e]=t})});function containsCallExpression(e){if(r.CallExpression.check(e)){return true}if(l.check(e)){return e.some(containsCallExpression)}if(r.Node.check(e)){return t.someField(e,function(e,t){return containsCallExpression(t)})}return false}f.canBeFirstInStatement=function(){var e=this.node;return!r.FunctionExpression.check(e)&&!r.ObjectExpression.check(e)};f.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(e){for(var t,i;e.parent;e=e.parent){t=e.node;i=e.parent.node;if(r.BlockStatement.check(i)&&e.parent.name==="body"&&e.name===0){if(i.body[0]!==t){throw new Error("Nodes must be equal")}return true}if(r.ExpressionStatement.check(i)&&e.name==="expression"){if(i.expression!==t){throw new Error("Nodes must be equal")}return true}if(r.SequenceExpression.check(i)&&e.parent.name==="expressions"&&e.name===0){if(i.expressions[0]!==t){throw new Error("Nodes must be equal")}continue}if(r.CallExpression.check(i)&&e.name==="callee"){if(i.callee!==t){throw new Error("Nodes must be equal")}continue}if(r.MemberExpression.check(i)&&e.name==="object"){if(i.object!==t){throw new Error("Nodes must be equal")}continue}if(r.ConditionalExpression.check(i)&&e.name==="test"){if(i.test!==t){throw new Error("Nodes must be equal")}continue}if(isBinary(i)&&e.name==="left"){if(i.left!==t){throw new Error("Nodes must be equal")}continue}if(r.UnaryExpression.check(i)&&!i.prefix&&e.name==="argument"){if(i.argument!==t){throw new Error("Nodes must be equal")}continue}return false}return true}function cleanUpNodesAfterPrune(e){if(r.VariableDeclaration.check(e.node)){var t=e.get("declarations").value;if(!t||t.length===0){return e.prune()}}else if(r.ExpressionStatement.check(e.node)){if(!e.get("expression").value){return e.prune()}}else if(r.IfStatement.check(e.node)){cleanUpIfStatementAfterPrune(e)}return e}function cleanUpIfStatementAfterPrune(e){var t=e.get("test").value;var n=e.get("alternate").value;var a=e.get("consequent").value;if(!a&&!n){var s=i.expressionStatement(t);e.replace(s)}else if(!a&&n){var u=i.unaryExpression("!",t,true);if(r.UnaryExpression.check(t)&&t.operator==="!"){u=t.argument}e.get("test").replace(u);e.get("consequent").replace(n);e.get("alternate").replace()}}return h}t.default=nodePathPlugin;e.exports=t["default"]},504:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(724));var s=Object.prototype.hasOwnProperty;function pathVisitorPlugin(e){var t=e.use(n.default);var r=e.use(a.default);var i=t.builtInTypes.array;var u=t.builtInTypes.object;var l=t.builtInTypes.function;var o;var c=function PathVisitor(){if(!(this instanceof PathVisitor)){throw new Error("PathVisitor constructor cannot be invoked without 'new'")}this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=s.call(this._methodNameTable,"Block")||s.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false};function computeMethodNameTable(e){var r=Object.create(null);for(var i in e){if(/^visit[A-Z]/.test(i)){r[i.slice("visit".length)]=true}}var n=t.computeSupertypeLookupTable(r);var a=Object.create(null);var s=Object.keys(n);var u=s.length;for(var o=0;o=0){n[e.name=s]=e}}else{i[e.name]=e.value;n[e.name]=e}if(i[e.name]!==e.value){throw new Error("")}if(e.parentPath.get(e.name)!==e){throw new Error("")}return e}u.replace=function replace(e){var t=[];var i=this.parentPath.value;var n=getChildCache(this.parentPath);var a=arguments.length;repairRelationshipWithParent(this);if(r.check(i)){var s=i.length;var u=getMoves(this.parentPath,a-1,this.name+1);var l=[this.name,1];for(var o=0;o=e},a+" >= "+e)}var s={null:function(){return null},emptyArray:function(){return[]},false:function(){return false},true:function(){return true},undefined:function(){},"use strict":function(){return"use strict"}};var u=r.or(i.string,i.number,i.boolean,i.null,i.undefined);var l=r.from(function(e){if(e===null)return true;var t=typeof e;if(t==="object"||t==="function"){return false}return true},u.toString());return{geq:geq,defaults:s,isPrimitive:l}}t.default=default_1;e.exports=t["default"]},361:function(e,t){"use strict";var r=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(t.hasOwnProperty(r))e[r]=t[r]};return e(t,r)};return function(t,r){e(t,r);function __(){this.constructor=t}t.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});var i=Object.prototype;var n=i.toString;var a=i.hasOwnProperty;var s=function(){function BaseType(){}BaseType.prototype.assert=function(e,t){if(!this.check(e,t)){var r=shallowStringify(e);throw new Error(r+" does not match type "+this)}return true};BaseType.prototype.arrayOf=function(){var e=this;return new u(e)};return BaseType}();var u=function(e){r(ArrayType,e);function ArrayType(t){var r=e.call(this)||this;r.elemType=t;r.kind="ArrayType";return r}ArrayType.prototype.toString=function(){return"["+this.elemType+"]"};ArrayType.prototype.check=function(e,t){var r=this;return Array.isArray(e)&&e.every(function(e){return r.elemType.check(e,t)})};return ArrayType}(s);var l=function(e){r(IdentityType,e);function IdentityType(t){var r=e.call(this)||this;r.value=t;r.kind="IdentityType";return r}IdentityType.prototype.toString=function(){return String(this.value)};IdentityType.prototype.check=function(e,t){var r=e===this.value;if(!r&&typeof t==="function"){t(this,e)}return r};return IdentityType}(s);var o=function(e){r(ObjectType,e);function ObjectType(t){var r=e.call(this)||this;r.fields=t;r.kind="ObjectType";return r}ObjectType.prototype.toString=function(){return"{ "+this.fields.join(", ")+" }"};ObjectType.prototype.check=function(e,t){return n.call(e)===n.call({})&&this.fields.every(function(r){return r.type.check(e[r.name],t)})};return ObjectType}(s);var c=function(e){r(OrType,e);function OrType(t){var r=e.call(this)||this;r.types=t;r.kind="OrType";return r}OrType.prototype.toString=function(){return this.types.join(" | ")};OrType.prototype.check=function(e,t){return this.types.some(function(r){return r.check(e,t)})};return OrType}(s);var h=function(e){r(PredicateType,e);function PredicateType(t,r){var i=e.call(this)||this;i.name=t;i.predicate=r;i.kind="PredicateType";return i}PredicateType.prototype.toString=function(){return this.name};PredicateType.prototype.check=function(e,t){var r=this.predicate(e,t);if(!r&&typeof t==="function"){t(this,e)}return r};return PredicateType}(s);var f=function(){function Def(e,t){this.type=e;this.typeName=t;this.baseNames=[];this.ownFields=Object.create(null);this.allSupertypes=Object.create(null);this.supertypeList=[];this.allFields=Object.create(null);this.fieldNames=[];this.finalized=false;this.buildable=false;this.buildParams=[]}Def.prototype.isSupertypeOf=function(e){if(e instanceof Def){if(this.finalized!==true||e.finalized!==true){throw new Error("")}return a.call(e.allSupertypes,this.typeName)}else{throw new Error(e+" is not a Def")}};Def.prototype.checkAllFields=function(e,t){var r=this.allFields;if(this.finalized!==true){throw new Error(""+this.typeName)}function checkFieldByName(i){var n=r[i];var a=n.type;var s=n.getValue(e);return a.check(s,t)}return e!==null&&typeof e==="object"&&Object.keys(r).every(checkFieldByName)};Def.prototype.bases=function(){var e=[];for(var t=0;t=0){return s[n]}if(typeof r!=="string"){throw new Error("missing name")}return new h(r,e)}return new l(e)},def:function(e){return a.call(A,e)?A[e]:A[e]=new T(e)},hasDef:function(e){return a.call(A,e)}};var i=[];var s=[];var d={};function defBuiltInType(e,t){var r=n.call(e);var a=new h(t,function(e){return n.call(e)===r});d[t]=a;if(e&&typeof e.constructor==="function"){i.push(e.constructor);s.push(a)}return a}var m=defBuiltInType("truthy","string");var v=defBuiltInType(function(){},"function");var y=defBuiltInType([],"array");var x=defBuiltInType({},"object");var E=defBuiltInType(/./,"RegExp");var S=defBuiltInType(new Date,"Date");var D=defBuiltInType(3,"number");var b=defBuiltInType(true,"boolean");var g=defBuiltInType(null,"null");var C=defBuiltInType(void 0,"undefined");var A=Object.create(null);function defFromValue(e){if(e&&typeof e==="object"){var t=e.type;if(typeof t==="string"&&a.call(A,t)){var r=A[t];if(r.finalized){return r}}}return null}var T=function(e){r(DefImpl,e);function DefImpl(t){var r=e.call(this,new h(t,function(e,t){return r.check(e,t)}),t)||this;return r}DefImpl.prototype.check=function(e,t){if(this.finalized!==true){throw new Error("prematurely checking unfinalized type "+this.typeName)}if(e===null||typeof e!=="object"){return false}var r=defFromValue(e);if(!r){if(this.typeName==="SourceLocation"||this.typeName==="Position"){return this.checkAllFields(e,t)}return false}if(t&&r===this){return this.checkAllFields(e,t)}if(!this.isSupertypeOf(r)){return false}if(!t){return true}return r.checkAllFields(e,t)&&this.checkAllFields(e,false)};DefImpl.prototype.build=function(){var e=this;var t=[];for(var r=0;r=0){wrapExpressionBuilderWithStatement(this.typeName)}}};return DefImpl}(f);function getSupertypeNames(e){if(!a.call(A,e)){throw new Error("")}var t=A[e];if(t.finalized!==true){throw new Error("")}return t.supertypeList.slice(1)}function computeSupertypeLookupTable(e){var t={};var r=Object.keys(A);var i=r.length;for(var n=0;n=0;--n){var a=this.leading[n];if(t.end.offset>=a.start){r.unshift(a.comment);this.leading.splice(n,1);this.trailing.splice(n,1)}}if(r.length){e.innerComments=r}}};CommentHandler.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var i=this.trailing[r];if(i.start>=e.end.offset){t.unshift(i.comment)}}this.trailing.length=0;return t}var n=this.stack[this.stack.length-1];if(n&&n.node.trailingComments){var a=n.node.trailingComments[0];if(a&&a.range[0]>=e.end.offset){t=n.node.trailingComments;delete n.node.trailingComments}}return t};CommentHandler.prototype.findLeadingComments=function(e){var t=[];var r;while(this.stack.length>0){var i=this.stack[this.stack.length-1];if(i&&i.start>=e.start.offset){r=i.node;this.stack.pop()}else{break}}if(r){var n=r.leadingComments?r.leadingComments.length:0;for(var a=n-1;a>=0;--a){var s=r.leadingComments[a];if(s.range[1]<=e.start.offset){t.unshift(s);r.leadingComments.splice(a,1)}}if(r.leadingComments&&r.leadingComments.length===0){delete r.leadingComments}return t}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];if(i.start<=e.start.offset){t.unshift(i.comment);this.leading.splice(a,1)}}return t};CommentHandler.prototype.visitNode=function(e,t){if(e.type===i.Syntax.Program&&e.body.length>0){return}this.insertInnerComments(e,t);var r=this.findTrailingComments(t);var n=this.findLeadingComments(t);if(n.length>0){e.leadingComments=n}if(r.length>0){e.trailingComments=r}this.stack.push({node:e,start:t.start.offset})};CommentHandler.prototype.visitComment=function(e,t){var r=e.type[0]==="L"?"Line":"Block";var i={type:r,value:e.value};if(e.range){i.range=e.range}if(e.loc){i.loc=e.loc}this.comments.push(i);if(this.attach){var n={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};if(e.loc){n.comment.loc=e.loc}e.type=r;this.leading.push(n);this.trailing.push(n)}};CommentHandler.prototype.visit=function(e,t){if(e.type==="LineComment"){this.visitComment(e,t)}else if(e.type==="BlockComment"){this.visitComment(e,t)}else if(this.attach){this.visitNode(e,t)}};return CommentHandler}();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(t.hasOwnProperty(r))e[r]=t[r]};return function(t,r){e(t,r);function __(){this.constructor=t}t.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});var n=r(4);var a=r(5);var s=r(6);var u=r(7);var l=r(8);var o=r(13);var c=r(14);o.TokenName[100]="JSXIdentifier";o.TokenName[101]="JSXText";function getQualifiedElementName(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:var r=e;t=r.name;break;case s.JSXSyntax.JSXNamespacedName:var i=e;t=getQualifiedElementName(i.namespace)+":"+getQualifiedElementName(i.name);break;case s.JSXSyntax.JSXMemberExpression:var n=e;t=getQualifiedElementName(n.object)+"."+getQualifiedElementName(n.property);break;default:break}return t}var h=function(e){i(JSXParser,e);function JSXParser(t,r,i){return e.call(this,t,r,i)||this}JSXParser.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)};JSXParser.prototype.startJSX=function(){this.scanner.index=this.startMarker.index;this.scanner.lineNumber=this.startMarker.line;this.scanner.lineStart=this.startMarker.index-this.startMarker.column};JSXParser.prototype.finishJSX=function(){this.nextToken()};JSXParser.prototype.reenterJSX=function(){this.startJSX();this.expectJSX("}");if(this.config.tokens){this.tokens.pop()}};JSXParser.prototype.createJSXNode=function(){this.collectComments();return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.scanXHTMLEntity=function(e){var t="&";var r=true;var i=false;var a=false;var s=false;while(!this.scanner.eof()&&r&&!i){var u=this.scanner.source[this.scanner.index];if(u===e){break}i=u===";";t+=u;++this.scanner.index;if(!i){switch(t.length){case 2:a=u==="#";break;case 3:if(a){s=u==="x";r=s||n.Character.isDecimalDigit(u.charCodeAt(0));a=a&&!s}break;default:r=r&&!(a&&!n.Character.isDecimalDigit(u.charCodeAt(0)));r=r&&!(s&&!n.Character.isHexDigit(u.charCodeAt(0)));break}}}if(r&&i&&t.length>2){var l=t.substr(1,t.length-2);if(a&&l.length>1){t=String.fromCharCode(parseInt(l.substr(1),10))}else if(s&&l.length>2){t=String.fromCharCode(parseInt("0"+l.substr(1),16))}else if(!a&&!s&&c.XHTMLEntities[l]){t=c.XHTMLEntities[l]}}return t};JSXParser.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(e===60||e===62||e===47||e===58||e===61||e===123||e===125){var t=this.scanner.source[this.scanner.index++];return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(e===34||e===39){var r=this.scanner.index;var i=this.scanner.source[this.scanner.index++];var a="";while(!this.scanner.eof()){var s=this.scanner.source[this.scanner.index++];if(s===i){break}else if(s==="&"){a+=this.scanXHTMLEntity(i)}else{a+=s}}return{type:8,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===46){var u=this.scanner.source.charCodeAt(this.scanner.index+1);var l=this.scanner.source.charCodeAt(this.scanner.index+2);var t=u===46&&l===46?"...":".";var r=this.scanner.index;this.scanner.index+=t.length;return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===96){return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index}}if(n.Character.isIdentifierStart(e)&&e!==92){var r=this.scanner.index;++this.scanner.index;while(!this.scanner.eof()){var s=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(s)&&s!==92){++this.scanner.index}else if(s===45){++this.scanner.index}else{break}}var o=this.scanner.source.slice(r,this.scanner.index);return{type:100,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}return this.scanner.lex()};JSXParser.prototype.nextJSXToken=function(){this.collectComments();this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;if(this.config.tokens){this.tokens.push(this.convertToken(e))}return e};JSXParser.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.scanner.index;var t="";while(!this.scanner.eof()){var r=this.scanner.source[this.scanner.index];if(r==="{"||r==="<"){break}++this.scanner.index;t+=r;if(n.Character.isLineTerminator(r.charCodeAt(0))){++this.scanner.lineNumber;if(r==="\r"&&this.scanner.source[this.scanner.index]==="\n"){++this.scanner.index}this.scanner.lineStart=this.scanner.index}}this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};if(t.length>0&&this.config.tokens){this.tokens.push(this.convertToken(i))}return i};JSXParser.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();this.scanner.restoreState(e);return t};JSXParser.prototype.expectJSX=function(e){var t=this.nextJSXToken();if(t.type!==7||t.value!==e){this.throwUnexpectedToken(t)}};JSXParser.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===7&&t.value===e};JSXParser.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==100){this.throwUnexpectedToken(t)}return this.finalize(e,new a.JSXIdentifier(t.value))};JSXParser.prototype.parseJSXElementName=function(){var e=this.createJSXNode();var t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(r,i))}else if(this.matchJSX(".")){while(this.matchJSX(".")){var n=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(n,s))}}return t};JSXParser.prototype.parseJSXAttributeName=function(){var e=this.createJSXNode();var t;var r=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=r;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(i,n))}else{t=r}return t};JSXParser.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==8){this.throwUnexpectedToken(t)}var r=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,r))};JSXParser.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.finishJSX();if(this.match("}")){this.tolerateError("JSX attributes must only be assigned a non-empty expression")}var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()};JSXParser.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode();var t=this.parseJSXAttributeName();var r=null;if(this.matchJSX("=")){this.expectJSX("=");r=this.parseJSXAttributeValue()}return this.finalize(e,new a.JSXAttribute(t,r))};JSXParser.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.expectJSX("...");this.finishJSX();var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXSpreadAttribute(t))};JSXParser.prototype.parseJSXAttributes=function(){var e=[];while(!this.matchJSX("/")&&!this.matchJSX(">")){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e};JSXParser.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName();var r=this.parseJSXAttributes();var i=this.matchJSX("/");if(i){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(t,i,r))};JSXParser.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();this.expectJSX("<");if(this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();this.expectJSX(">");return this.finalize(e,new a.JSXClosingElement(t))}var r=this.parseJSXElementName();var i=this.parseJSXAttributes();var n=this.matchJSX("/");if(n){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(r,n,i))};JSXParser.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();this.collectComments();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;return this.finalize(e,new a.JSXEmptyExpression)};JSXParser.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;if(this.matchJSX("}")){t=this.parseJSXEmptyExpression();this.expectJSX("}")}else{this.finishJSX();t=this.parseAssignmentExpression();this.reenterJSX()}return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXChildren=function(){var e=[];while(!this.scanner.eof()){var t=this.createJSXChildNode();var r=this.nextJSXText();if(r.start0){var u=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing));e=t[t.length-1];e.children.push(u);t.pop()}else{break}}}return e};JSXParser.prototype.parseJSXElement=function(){var e=this.createJSXNode();var t=this.parseJSXOpeningElement();var r=[];var i=null;if(!t.selfClosing){var n=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:r});r=n.children;i=n.closing}return this.finalize(e,new a.JSXElement(t,r,i))};JSXParser.prototype.parseJSXRoot=function(){if(this.config.tokens){this.tokens.pop()}this.startJSX();var e=this.parseJSXElement();this.finishJSX();return e};JSXParser.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")};return JSXParser}(l.Parser);t.JSXParser=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return e===10||e===13||e===8232||e===8233},isIdentifierStart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(6);var n=function(){function JSXClosingElement(e){this.type=i.JSXSyntax.JSXClosingElement;this.name=e}return JSXClosingElement}();t.JSXClosingElement=n;var a=function(){function JSXElement(e,t,r){this.type=i.JSXSyntax.JSXElement;this.openingElement=e;this.children=t;this.closingElement=r}return JSXElement}();t.JSXElement=a;var s=function(){function JSXEmptyExpression(){this.type=i.JSXSyntax.JSXEmptyExpression}return JSXEmptyExpression}();t.JSXEmptyExpression=s;var u=function(){function JSXExpressionContainer(e){this.type=i.JSXSyntax.JSXExpressionContainer;this.expression=e}return JSXExpressionContainer}();t.JSXExpressionContainer=u;var l=function(){function JSXIdentifier(e){this.type=i.JSXSyntax.JSXIdentifier;this.name=e}return JSXIdentifier}();t.JSXIdentifier=l;var o=function(){function JSXMemberExpression(e,t){this.type=i.JSXSyntax.JSXMemberExpression;this.object=e;this.property=t}return JSXMemberExpression}();t.JSXMemberExpression=o;var c=function(){function JSXAttribute(e,t){this.type=i.JSXSyntax.JSXAttribute;this.name=e;this.value=t}return JSXAttribute}();t.JSXAttribute=c;var h=function(){function JSXNamespacedName(e,t){this.type=i.JSXSyntax.JSXNamespacedName;this.namespace=e;this.name=t}return JSXNamespacedName}();t.JSXNamespacedName=h;var f=function(){function JSXOpeningElement(e,t,r){this.type=i.JSXSyntax.JSXOpeningElement;this.name=e;this.selfClosing=t;this.attributes=r}return JSXOpeningElement}();t.JSXOpeningElement=f;var p=function(){function JSXSpreadAttribute(e){this.type=i.JSXSyntax.JSXSpreadAttribute;this.argument=e}return JSXSpreadAttribute}();t.JSXSpreadAttribute=p;var d=function(){function JSXText(e,t){this.type=i.JSXSyntax.JSXText;this.value=e;this.raw=t}return JSXText}();t.JSXText=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2);var n=function(){function ArrayExpression(e){this.type=i.Syntax.ArrayExpression;this.elements=e}return ArrayExpression}();t.ArrayExpression=n;var a=function(){function ArrayPattern(e){this.type=i.Syntax.ArrayPattern;this.elements=e}return ArrayPattern}();t.ArrayPattern=a;var s=function(){function ArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=false}return ArrowFunctionExpression}();t.ArrowFunctionExpression=s;var u=function(){function AssignmentExpression(e,t,r){this.type=i.Syntax.AssignmentExpression;this.operator=e;this.left=t;this.right=r}return AssignmentExpression}();t.AssignmentExpression=u;var l=function(){function AssignmentPattern(e,t){this.type=i.Syntax.AssignmentPattern;this.left=e;this.right=t}return AssignmentPattern}();t.AssignmentPattern=l;var o=function(){function AsyncArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=true}return AsyncArrowFunctionExpression}();t.AsyncArrowFunctionExpression=o;var c=function(){function AsyncFunctionDeclaration(e,t,r){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionDeclaration}();t.AsyncFunctionDeclaration=c;var h=function(){function AsyncFunctionExpression(e,t,r){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionExpression}();t.AsyncFunctionExpression=h;var f=function(){function AwaitExpression(e){this.type=i.Syntax.AwaitExpression;this.argument=e}return AwaitExpression}();t.AwaitExpression=f;var p=function(){function BinaryExpression(e,t,r){var n=e==="||"||e==="&&";this.type=n?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression;this.operator=e;this.left=t;this.right=r}return BinaryExpression}();t.BinaryExpression=p;var d=function(){function BlockStatement(e){this.type=i.Syntax.BlockStatement;this.body=e}return BlockStatement}();t.BlockStatement=d;var m=function(){function BreakStatement(e){this.type=i.Syntax.BreakStatement;this.label=e}return BreakStatement}();t.BreakStatement=m;var v=function(){function CallExpression(e,t){this.type=i.Syntax.CallExpression;this.callee=e;this.arguments=t}return CallExpression}();t.CallExpression=v;var y=function(){function CatchClause(e,t){this.type=i.Syntax.CatchClause;this.param=e;this.body=t}return CatchClause}();t.CatchClause=y;var x=function(){function ClassBody(e){this.type=i.Syntax.ClassBody;this.body=e}return ClassBody}();t.ClassBody=x;var E=function(){function ClassDeclaration(e,t,r){this.type=i.Syntax.ClassDeclaration;this.id=e;this.superClass=t;this.body=r}return ClassDeclaration}();t.ClassDeclaration=E;var S=function(){function ClassExpression(e,t,r){this.type=i.Syntax.ClassExpression;this.id=e;this.superClass=t;this.body=r}return ClassExpression}();t.ClassExpression=S;var D=function(){function ComputedMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=true;this.object=e;this.property=t}return ComputedMemberExpression}();t.ComputedMemberExpression=D;var b=function(){function ConditionalExpression(e,t,r){this.type=i.Syntax.ConditionalExpression;this.test=e;this.consequent=t;this.alternate=r}return ConditionalExpression}();t.ConditionalExpression=b;var g=function(){function ContinueStatement(e){this.type=i.Syntax.ContinueStatement;this.label=e}return ContinueStatement}();t.ContinueStatement=g;var C=function(){function DebuggerStatement(){this.type=i.Syntax.DebuggerStatement}return DebuggerStatement}();t.DebuggerStatement=C;var A=function(){function Directive(e,t){this.type=i.Syntax.ExpressionStatement;this.expression=e;this.directive=t}return Directive}();t.Directive=A;var T=function(){function DoWhileStatement(e,t){this.type=i.Syntax.DoWhileStatement;this.body=e;this.test=t}return DoWhileStatement}();t.DoWhileStatement=T;var F=function(){function EmptyStatement(){this.type=i.Syntax.EmptyStatement}return EmptyStatement}();t.EmptyStatement=F;var w=function(){function ExportAllDeclaration(e){this.type=i.Syntax.ExportAllDeclaration;this.source=e}return ExportAllDeclaration}();t.ExportAllDeclaration=w;var P=function(){function ExportDefaultDeclaration(e){this.type=i.Syntax.ExportDefaultDeclaration;this.declaration=e}return ExportDefaultDeclaration}();t.ExportDefaultDeclaration=P;var k=function(){function ExportNamedDeclaration(e,t,r){this.type=i.Syntax.ExportNamedDeclaration;this.declaration=e;this.specifiers=t;this.source=r}return ExportNamedDeclaration}();t.ExportNamedDeclaration=k;var B=function(){function ExportSpecifier(e,t){this.type=i.Syntax.ExportSpecifier;this.exported=t;this.local=e}return ExportSpecifier}();t.ExportSpecifier=B;var M=function(){function ExpressionStatement(e){this.type=i.Syntax.ExpressionStatement;this.expression=e}return ExpressionStatement}();t.ExpressionStatement=M;var I=function(){function ForInStatement(e,t,r){this.type=i.Syntax.ForInStatement;this.left=e;this.right=t;this.body=r;this.each=false}return ForInStatement}();t.ForInStatement=I;var N=function(){function ForOfStatement(e,t,r){this.type=i.Syntax.ForOfStatement;this.left=e;this.right=t;this.body=r}return ForOfStatement}();t.ForOfStatement=N;var O=function(){function ForStatement(e,t,r,n){this.type=i.Syntax.ForStatement;this.init=e;this.test=t;this.update=r;this.body=n}return ForStatement}();t.ForStatement=O;var j=function(){function FunctionDeclaration(e,t,r,n){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionDeclaration}();t.FunctionDeclaration=j;var X=function(){function FunctionExpression(e,t,r,n){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionExpression}();t.FunctionExpression=X;var J=function(){function Identifier(e){this.type=i.Syntax.Identifier;this.name=e}return Identifier}();t.Identifier=J;var L=function(){function IfStatement(e,t,r){this.type=i.Syntax.IfStatement;this.test=e;this.consequent=t;this.alternate=r}return IfStatement}();t.IfStatement=L;var z=function(){function ImportDeclaration(e,t){this.type=i.Syntax.ImportDeclaration;this.specifiers=e;this.source=t}return ImportDeclaration}();t.ImportDeclaration=z;var U=function(){function ImportDefaultSpecifier(e){this.type=i.Syntax.ImportDefaultSpecifier;this.local=e}return ImportDefaultSpecifier}();t.ImportDefaultSpecifier=U;var R=function(){function ImportNamespaceSpecifier(e){this.type=i.Syntax.ImportNamespaceSpecifier;this.local=e}return ImportNamespaceSpecifier}();t.ImportNamespaceSpecifier=R;var q=function(){function ImportSpecifier(e,t){this.type=i.Syntax.ImportSpecifier;this.local=e;this.imported=t}return ImportSpecifier}();t.ImportSpecifier=q;var V=function(){function LabeledStatement(e,t){this.type=i.Syntax.LabeledStatement;this.label=e;this.body=t}return LabeledStatement}();t.LabeledStatement=V;var W=function(){function Literal(e,t){this.type=i.Syntax.Literal;this.value=e;this.raw=t}return Literal}();t.Literal=W;var K=function(){function MetaProperty(e,t){this.type=i.Syntax.MetaProperty;this.meta=e;this.property=t}return MetaProperty}();t.MetaProperty=K;var H=function(){function MethodDefinition(e,t,r,n,a){this.type=i.Syntax.MethodDefinition;this.key=e;this.computed=t;this.value=r;this.kind=n;this.static=a}return MethodDefinition}();t.MethodDefinition=H;var Y=function(){function Module(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="module"}return Module}();t.Module=Y;var G=function(){function NewExpression(e,t){this.type=i.Syntax.NewExpression;this.callee=e;this.arguments=t}return NewExpression}();t.NewExpression=G;var Q=function(){function ObjectExpression(e){this.type=i.Syntax.ObjectExpression;this.properties=e}return ObjectExpression}();t.ObjectExpression=Q;var $=function(){function ObjectPattern(e){this.type=i.Syntax.ObjectPattern;this.properties=e}return ObjectPattern}();t.ObjectPattern=$;var Z=function(){function Property(e,t,r,n,a,s){this.type=i.Syntax.Property;this.key=t;this.computed=r;this.value=n;this.kind=e;this.method=a;this.shorthand=s}return Property}();t.Property=Z;var _=function(){function RegexLiteral(e,t,r,n){this.type=i.Syntax.Literal;this.value=e;this.raw=t;this.regex={pattern:r,flags:n}}return RegexLiteral}();t.RegexLiteral=_;var ee=function(){function RestElement(e){this.type=i.Syntax.RestElement;this.argument=e}return RestElement}();t.RestElement=ee;var te=function(){function ReturnStatement(e){this.type=i.Syntax.ReturnStatement;this.argument=e}return ReturnStatement}();t.ReturnStatement=te;var re=function(){function Script(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="script"}return Script}();t.Script=re;var ie=function(){function SequenceExpression(e){this.type=i.Syntax.SequenceExpression;this.expressions=e}return SequenceExpression}();t.SequenceExpression=ie;var ne=function(){function SpreadElement(e){this.type=i.Syntax.SpreadElement;this.argument=e}return SpreadElement}();t.SpreadElement=ne;var ae=function(){function StaticMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=false;this.object=e;this.property=t}return StaticMemberExpression}();t.StaticMemberExpression=ae;var se=function(){function Super(){this.type=i.Syntax.Super}return Super}();t.Super=se;var ue=function(){function SwitchCase(e,t){this.type=i.Syntax.SwitchCase;this.test=e;this.consequent=t}return SwitchCase}();t.SwitchCase=ue;var le=function(){function SwitchStatement(e,t){this.type=i.Syntax.SwitchStatement;this.discriminant=e;this.cases=t}return SwitchStatement}();t.SwitchStatement=le;var oe=function(){function TaggedTemplateExpression(e,t){this.type=i.Syntax.TaggedTemplateExpression;this.tag=e;this.quasi=t}return TaggedTemplateExpression}();t.TaggedTemplateExpression=oe;var ce=function(){function TemplateElement(e,t){this.type=i.Syntax.TemplateElement;this.value=e;this.tail=t}return TemplateElement}();t.TemplateElement=ce;var he=function(){function TemplateLiteral(e,t){this.type=i.Syntax.TemplateLiteral;this.quasis=e;this.expressions=t}return TemplateLiteral}();t.TemplateLiteral=he;var fe=function(){function ThisExpression(){this.type=i.Syntax.ThisExpression}return ThisExpression}();t.ThisExpression=fe;var pe=function(){function ThrowStatement(e){this.type=i.Syntax.ThrowStatement;this.argument=e}return ThrowStatement}();t.ThrowStatement=pe;var de=function(){function TryStatement(e,t,r){this.type=i.Syntax.TryStatement;this.block=e;this.handler=t;this.finalizer=r}return TryStatement}();t.TryStatement=de;var me=function(){function UnaryExpression(e,t){this.type=i.Syntax.UnaryExpression;this.operator=e;this.argument=t;this.prefix=true}return UnaryExpression}();t.UnaryExpression=me;var ve=function(){function UpdateExpression(e,t,r){this.type=i.Syntax.UpdateExpression;this.operator=e;this.argument=t;this.prefix=r}return UpdateExpression}();t.UpdateExpression=ve;var ye=function(){function VariableDeclaration(e,t){this.type=i.Syntax.VariableDeclaration;this.declarations=e;this.kind=t}return VariableDeclaration}();t.VariableDeclaration=ye;var xe=function(){function VariableDeclarator(e,t){this.type=i.Syntax.VariableDeclarator;this.id=e;this.init=t}return VariableDeclarator}();t.VariableDeclarator=xe;var Ee=function(){function WhileStatement(e,t){this.type=i.Syntax.WhileStatement;this.test=e;this.body=t}return WhileStatement}();t.WhileStatement=Ee;var Se=function(){function WithStatement(e,t){this.type=i.Syntax.WithStatement;this.object=e;this.body=t}return WithStatement}();t.WithStatement=Se;var De=function(){function YieldExpression(e,t){this.type=i.Syntax.YieldExpression;this.argument=e;this.delegate=t}return YieldExpression}();t.YieldExpression=De},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(10);var a=r(11);var s=r(7);var u=r(12);var l=r(2);var o=r(13);var c="ArrowParameterPlaceHolder";var h=function(){function Parser(e,t,r){if(t===void 0){t={}}this.config={range:typeof t.range==="boolean"&&t.range,loc:typeof t.loc==="boolean"&&t.loc,source:null,tokens:typeof t.tokens==="boolean"&&t.tokens,comment:typeof t.comment==="boolean"&&t.comment,tolerant:typeof t.tolerant==="boolean"&&t.tolerant};if(this.config.loc&&t.source&&t.source!==null){this.config.source=String(t.source)}this.delegate=r;this.errorHandler=new n.ErrorHandler;this.errorHandler.tolerant=this.config.tolerant;this.scanner=new u.Scanner(e,this.errorHandler);this.scanner.trackComment=this.config.comment;this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11};this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0};this.hasLineTerminator=false;this.context={isModule:false,await:false,allowIn:true,allowStrictDirective:true,allowYield:true,firstCoverInitializedNameError:null,isAssignmentTarget:false,isBindingElement:false,inFunctionBody:false,inIteration:false,inSwitch:false,labelSet:{},strict:false};this.tokens=[];this.startMarker={index:0,line:this.scanner.lineNumber,column:0};this.lastMarker={index:0,line:this.scanner.lineNumber,column:0};this.nextToken();this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}Parser.prototype.throwError=function(e){var t=[];for(var r=1;r0&&this.delegate){for(var t=0;t>="||e===">>>="||e==="&="||e==="^="||e==="|="};Parser.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);if(this.context.firstCoverInitializedNameError!==null){this.throwUnexpectedToken(this.context.firstCoverInitializedNameError)}this.context.isBindingElement=t;this.context.isAssignmentTarget=r;this.context.firstCoverInitializedNameError=i;return n};Parser.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);this.context.isBindingElement=this.context.isBindingElement&&t;this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r;this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError;return n};Parser.prototype.consumeSemicolon=function(){if(this.match(";")){this.nextToken()}else if(!this.hasLineTerminator){if(this.lookahead.type!==2&&!this.match("}")){this.throwUnexpectedToken(this.lookahead)}this.lastMarker.index=this.startMarker.index;this.lastMarker.line=this.startMarker.line;this.lastMarker.column=this.startMarker.column}};Parser.prototype.parsePrimaryExpression=function(){var e=this.createNode();var t;var r,i;switch(this.lookahead.type){case 3:if((this.context.isModule||this.context.await)&&this.lookahead.value==="await"){this.tolerateUnexpectedToken(this.lookahead)}t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new s.Identifier(this.nextToken().value));break;case 6:case 8:if(this.context.strict&&this.lookahead.octal){this.tolerateUnexpectedToken(this.lookahead,a.Messages.StrictOctalLiteral)}this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new s.Literal(r.value,i));break;case 1:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new s.Literal(r.value==="true",i));break;case 5:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new s.Literal(null,i));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=false;t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.scanner.index=this.startMarker.index;r=this.nextRegexToken();i=this.getTokenRaw(r);t=this.finalize(e,new s.RegexLiteral(r.regex,i,r.pattern,r.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:if(!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")){t=this.parseIdentifierName()}else if(!this.context.strict&&this.matchKeyword("let")){t=this.finalize(e,new s.Identifier(this.nextToken().value))}else{this.context.isAssignmentTarget=false;this.context.isBindingElement=false;if(this.matchKeyword("function")){t=this.parseFunctionExpression()}else if(this.matchKeyword("this")){this.nextToken();t=this.finalize(e,new s.ThisExpression)}else if(this.matchKeyword("class")){t=this.parseClassExpression()}else{t=this.throwUnexpectedToken(this.nextToken())}}break;default:t=this.throwUnexpectedToken(this.nextToken())}return t};Parser.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new s.SpreadElement(t))};Parser.prototype.parseArrayInitializer=function(){var e=this.createNode();var t=[];this.expect("[");while(!this.match("]")){if(this.match(",")){this.nextToken();t.push(null)}else if(this.match("...")){var r=this.parseSpreadElement();if(!this.match("]")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.expect(",")}t.push(r)}else{t.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(e,new s.ArrayExpression(t))};Parser.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var t=this.context.strict;var r=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);if(this.context.strict&&e.firstRestricted){this.tolerateUnexpectedToken(e.firstRestricted,e.message)}if(this.context.strict&&e.stricted){this.tolerateUnexpectedToken(e.stricted,e.message)}this.context.strict=t;this.context.allowStrictDirective=r;return i};Parser.prototype.parsePropertyMethodFunction=function(){var e=false;var t=this.createNode();var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(t,new s.FunctionExpression(null,i.params,n,e))};Parser.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode();var t=this.context.allowYield;var r=this.context.await;this.context.allowYield=false;this.context.await=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=t;this.context.await=r;return this.finalize(e,new s.AsyncFunctionExpression(null,i.params,n))};Parser.prototype.parseObjectPropertyKey=function(){var e=this.createNode();var t=this.nextToken();var r;switch(t.type){case 8:case 6:if(this.context.strict&&t.octal){this.tolerateUnexpectedToken(t,a.Messages.StrictOctalLiteral)}var i=this.getTokenRaw(t);r=this.finalize(e,new s.Literal(t.value,i));break;case 3:case 1:case 5:case 4:r=this.finalize(e,new s.Identifier(t.value));break;case 7:if(t.value==="["){r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.expect("]")}else{r=this.throwUnexpectedToken(t)}break;default:r=this.throwUnexpectedToken(t)}return r};Parser.prototype.isPropertyKey=function(e,t){return e.type===l.Syntax.Identifier&&e.name===t||e.type===l.Syntax.Literal&&e.value===t};Parser.prototype.parseObjectProperty=function(e){var t=this.createNode();var r=this.lookahead;var i;var n=null;var u=null;var l=false;var o=false;var c=false;var h=false;if(r.type===3){var f=r.value;this.nextToken();l=this.match("[");h=!this.hasLineTerminator&&f==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(",");n=h?this.parseObjectPropertyKey():this.finalize(t,new s.Identifier(f))}else if(this.match("*")){this.nextToken()}else{l=this.match("[");n=this.parseObjectPropertyKey()}var p=this.qualifiedPropertyName(this.lookahead);if(r.type===3&&!h&&r.value==="get"&&p){i="get";l=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;u=this.parseGetterMethod()}else if(r.type===3&&!h&&r.value==="set"&&p){i="set";l=this.match("[");n=this.parseObjectPropertyKey();u=this.parseSetterMethod()}else if(r.type===7&&r.value==="*"&&p){i="init";l=this.match("[");n=this.parseObjectPropertyKey();u=this.parseGeneratorMethod();o=true}else{if(!n){this.throwUnexpectedToken(this.lookahead)}i="init";if(this.match(":")&&!h){if(!l&&this.isPropertyKey(n,"__proto__")){if(e.value){this.tolerateError(a.Messages.DuplicateProtoProperty)}e.value=true}this.nextToken();u=this.inheritCoverGrammar(this.parseAssignmentExpression)}else if(this.match("(")){u=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();o=true}else if(r.type===3){var f=this.finalize(t,new s.Identifier(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead;this.nextToken();c=true;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);u=this.finalize(t,new s.AssignmentPattern(f,d))}else{c=true;u=f}}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(t,new s.Property(i,n,l,u,o,c))};Parser.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");var t=[];var r={value:false};while(!this.match("}")){t.push(this.parseObjectProperty(r));if(!this.match("}")){this.expectCommaSeparator()}}this.expect("}");return this.finalize(e,new s.ObjectExpression(t))};Parser.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode();var t=this.nextToken();var r=t.value;var n=t.cooked;return this.finalize(e,new s.TemplateElement({raw:r,cooked:n},t.tail))};Parser.prototype.parseTemplateElement=function(){if(this.lookahead.type!==10){this.throwUnexpectedToken()}var e=this.createNode();var t=this.nextToken();var r=t.value;var i=t.cooked;return this.finalize(e,new s.TemplateElement({raw:r,cooked:i},t.tail))};Parser.prototype.parseTemplateLiteral=function(){var e=this.createNode();var t=[];var r=[];var i=this.parseTemplateHead();r.push(i);while(!i.tail){t.push(this.parseExpression());i=this.parseTemplateElement();r.push(i)}return this.finalize(e,new s.TemplateLiteral(r,t))};Parser.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:e.type=l.Syntax.RestElement;this.reinterpretExpressionAsPattern(e.argument);break;case l.Syntax.ArrayExpression:e.type=l.Syntax.ArrayPattern;for(var t=0;t")){this.expect("=>")}e={type:c,params:[],async:false}}else{var t=this.lookahead;var r=[];if(this.match("...")){e=this.parseRestElement(r);this.expect(")");if(!this.match("=>")){this.expect("=>")}e={type:c,params:[e],async:false}}else{var i=false;this.context.isBindingElement=true;e=this.inheritCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];this.context.isAssignmentTarget=false;n.push(e);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();if(this.match(")")){this.nextToken();for(var a=0;a")){this.expect("=>")}this.context.isBindingElement=false;for(var a=0;a")){if(e.type===l.Syntax.Identifier&&e.name==="yield"){i=true;e={type:c,params:[e],async:false}}if(!i){if(!this.context.isBindingElement){this.throwUnexpectedToken(this.lookahead)}if(e.type===l.Syntax.SequenceExpression){for(var a=0;a")){for(var l=0;l0){this.nextToken();this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=[e,this.lookahead];var a=t;var u=this.isolateCoverGrammar(this.parseExponentiationExpression);var l=[a,r.value,u];var o=[i];while(true){i=this.binaryPrecedence(this.lookahead);if(i<=0){break}while(l.length>2&&i<=o[o.length-1]){u=l.pop();var c=l.pop();o.pop();a=l.pop();n.pop();var h=this.startNode(n[n.length-1]);l.push(this.finalize(h,new s.BinaryExpression(c,a,u)))}l.push(this.nextToken().value);o.push(i);n.push(this.lookahead);l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var f=l.length-1;t=l[f];var p=n.pop();while(f>1){var d=n.pop();var m=p&&p.lineStart;var h=this.startNode(d,m);var c=l[f-1];t=this.finalize(h,new s.BinaryExpression(c,l[f-2],t));f-=2;p=d}}return t};Parser.prototype.parseConditionalExpression=function(){var e=this.lookahead;var t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=true;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r;this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new s.ConditionalExpression(t,i,n));this.context.isAssignmentTarget=false;this.context.isBindingElement=false}return t};Parser.prototype.checkPatternParam=function(e,t){switch(t.type){case l.Syntax.Identifier:this.validateParam(e,t,t.name);break;case l.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case l.Syntax.ArrayPattern:for(var r=0;r")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=e.async;var u=this.reinterpretAsCoverFormalsList(e);if(u){if(this.hasLineTerminator){this.tolerateUnexpectedToken(this.lookahead)}this.context.firstCoverInitializedNameError=null;var o=this.context.strict;var h=this.context.allowStrictDirective;this.context.allowStrictDirective=u.simple;var f=this.context.allowYield;var p=this.context.await;this.context.allowYield=true;this.context.await=n;var d=this.startNode(t);this.expect("=>");var m=void 0;if(this.match("{")){var v=this.context.allowIn;this.context.allowIn=true;m=this.parseFunctionSourceElements();this.context.allowIn=v}else{m=this.isolateCoverGrammar(this.parseAssignmentExpression)}var y=m.type!==l.Syntax.BlockStatement;if(this.context.strict&&u.firstRestricted){this.throwUnexpectedToken(u.firstRestricted,u.message)}if(this.context.strict&&u.stricted){this.tolerateUnexpectedToken(u.stricted,u.message)}e=n?this.finalize(d,new s.AsyncArrowFunctionExpression(u.params,m,y)):this.finalize(d,new s.ArrowFunctionExpression(u.params,m,y));this.context.strict=o;this.context.allowStrictDirective=h;this.context.allowYield=f;this.context.await=p}}else{if(this.matchAssign()){if(!this.context.isAssignmentTarget){this.tolerateError(a.Messages.InvalidLHSInAssignment)}if(this.context.strict&&e.type===l.Syntax.Identifier){var x=e;if(this.scanner.isRestrictedWord(x.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictLHSAssignment)}if(this.scanner.isStrictModeReservedWord(x.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}}if(!this.match("=")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false}else{this.reinterpretExpressionAsPattern(e)}r=this.nextToken();var E=r.value;var S=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new s.AssignmentExpression(E,e,S));this.context.firstCoverInitializedNameError=null}}}return e};Parser.prototype.parseExpression=function(){var e=this.lookahead;var t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];r.push(t);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();r.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}t=this.finalize(this.startNode(e),new s.SequenceExpression(r))}return t};Parser.prototype.parseStatementListItem=function(){var e;this.context.isAssignmentTarget=true;this.context.isBindingElement=true;if(this.lookahead.type===4){switch(this.lookahead.value){case"export":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalExportDeclaration)}e=this.parseExportDeclaration();break;case"import":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalImportDeclaration)}e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:false});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:false}):this.parseStatement();break;default:e=this.parseStatement();break}}else{e=this.parseStatement()}return e};Parser.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");var t=[];while(true){if(this.match("}")){break}t.push(this.parseStatementListItem())}this.expect("}");return this.finalize(e,new s.BlockStatement(t))};Parser.prototype.parseLexicalBinding=function(e,t){var r=this.createNode();var i=[];var n=this.parsePattern(i,e);if(this.context.strict&&n.type===l.Syntax.Identifier){if(this.scanner.isRestrictedWord(n.name)){this.tolerateError(a.Messages.StrictVarName)}}var u=null;if(e==="const"){if(!this.matchKeyword("in")&&!this.matchContextualKeyword("of")){if(this.match("=")){this.nextToken();u=this.isolateCoverGrammar(this.parseAssignmentExpression)}else{this.throwError(a.Messages.DeclarationMissingInitializer,"const")}}}else if(!t.inFor&&n.type!==l.Syntax.Identifier||this.match("=")){this.expect("=");u=this.isolateCoverGrammar(this.parseAssignmentExpression)}return this.finalize(r,new s.VariableDeclarator(n,u))};Parser.prototype.parseBindingList=function(e,t){var r=[this.parseLexicalBinding(e,t)];while(this.match(",")){this.nextToken();r.push(this.parseLexicalBinding(e,t))}return r};Parser.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();this.scanner.restoreState(e);return t.type===3||t.type===7&&t.value==="["||t.type===7&&t.value==="{"||t.type===4&&t.value==="let"||t.type===4&&t.value==="yield"};Parser.prototype.parseLexicalDeclaration=function(e){var t=this.createNode();var r=this.nextToken().value;i.assert(r==="let"||r==="const","Lexical declaration must be either let or const");var n=this.parseBindingList(r,e);this.consumeSemicolon();return this.finalize(t,new s.VariableDeclaration(n,r))};Parser.prototype.parseBindingRestElement=function(e,t){var r=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(r,new s.RestElement(i))};Parser.prototype.parseArrayPattern=function(e,t){var r=this.createNode();this.expect("[");var i=[];while(!this.match("]")){if(this.match(",")){this.nextToken();i.push(null)}else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}else{i.push(this.parsePatternWithDefault(e,t))}if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(r,new s.ArrayPattern(i))};Parser.prototype.parsePropertyPattern=function(e,t){var r=this.createNode();var i=false;var n=false;var a=false;var u;var l;if(this.lookahead.type===3){var o=this.lookahead;u=this.parseVariableIdentifier();var c=this.finalize(r,new s.Identifier(o.value));if(this.match("=")){e.push(o);n=true;this.nextToken();var h=this.parseAssignmentExpression();l=this.finalize(this.startNode(o),new s.AssignmentPattern(c,h))}else if(!this.match(":")){e.push(o);n=true;l=c}else{this.expect(":");l=this.parsePatternWithDefault(e,t)}}else{i=this.match("[");u=this.parseObjectPropertyKey();this.expect(":");l=this.parsePatternWithDefault(e,t)}return this.finalize(r,new s.Property("init",u,i,l,a,n))};Parser.prototype.parseObjectPattern=function(e,t){var r=this.createNode();var i=[];this.expect("{");while(!this.match("}")){i.push(this.parsePropertyPattern(e,t));if(!this.match("}")){this.expect(",")}}this.expect("}");return this.finalize(r,new s.ObjectPattern(i))};Parser.prototype.parsePattern=function(e,t){var r;if(this.match("[")){r=this.parseArrayPattern(e,t)}else if(this.match("{")){r=this.parseObjectPattern(e,t)}else{if(this.matchKeyword("let")&&(t==="const"||t==="let")){this.tolerateUnexpectedToken(this.lookahead,a.Messages.LetInLexicalBinding)}e.push(this.lookahead);r=this.parseVariableIdentifier(t)}return r};Parser.prototype.parsePatternWithDefault=function(e,t){var r=this.lookahead;var i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var n=this.context.allowYield;this.context.allowYield=true;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=n;i=this.finalize(this.startNode(r),new s.AssignmentPattern(i,a))}return i};Parser.prototype.parseVariableIdentifier=function(e){var t=this.createNode();var r=this.nextToken();if(r.type===4&&r.value==="yield"){if(this.context.strict){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else if(!this.context.allowYield){this.throwUnexpectedToken(r)}}else if(r.type!==3){if(this.context.strict&&r.type===4&&this.scanner.isStrictModeReservedWord(r.value)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else{if(this.context.strict||r.value!=="let"||e!=="var"){this.throwUnexpectedToken(r)}}}else if((this.context.isModule||this.context.await)&&r.type===3&&r.value==="await"){this.tolerateUnexpectedToken(r)}return this.finalize(t,new s.Identifier(r.value))};Parser.prototype.parseVariableDeclaration=function(e){var t=this.createNode();var r=[];var i=this.parsePattern(r,"var");if(this.context.strict&&i.type===l.Syntax.Identifier){if(this.scanner.isRestrictedWord(i.name)){this.tolerateError(a.Messages.StrictVarName)}}var n=null;if(this.match("=")){this.nextToken();n=this.isolateCoverGrammar(this.parseAssignmentExpression)}else if(i.type!==l.Syntax.Identifier&&!e.inFor){this.expect("=")}return this.finalize(t,new s.VariableDeclarator(i,n))};Parser.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor};var r=[];r.push(this.parseVariableDeclaration(t));while(this.match(",")){this.nextToken();r.push(this.parseVariableDeclaration(t))}return r};Parser.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:false});this.consumeSemicolon();return this.finalize(e,new s.VariableDeclaration(t,"var"))};Parser.prototype.parseEmptyStatement=function(){var e=this.createNode();this.expect(";");return this.finalize(e,new s.EmptyStatement)};Parser.prototype.parseExpressionStatement=function(){var e=this.createNode();var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new s.ExpressionStatement(t))};Parser.prototype.parseIfClause=function(){if(this.context.strict&&this.matchKeyword("function")){this.tolerateError(a.Messages.StrictFunction)}return this.parseStatement()};Parser.prototype.parseIfStatement=function(){var e=this.createNode();var t;var r=null;this.expectKeyword("if");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new s.EmptyStatement)}else{this.expect(")");t=this.parseIfClause();if(this.matchKeyword("else")){this.nextToken();r=this.parseIfClause()}}return this.finalize(e,new s.IfStatement(i,t,r))};Parser.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=true;var r=this.parseStatement();this.context.inIteration=t;this.expectKeyword("while");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken())}else{this.expect(")");if(this.match(";")){this.nextToken()}}return this.finalize(e,new s.DoWhileStatement(r,i))};Parser.prototype.parseWhileStatement=function(){var e=this.createNode();var t;this.expectKeyword("while");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new s.EmptyStatement)}else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=true;t=this.parseStatement();this.context.inIteration=i}return this.finalize(e,new s.WhileStatement(r,t))};Parser.prototype.parseForStatement=function(){var e=null;var t=null;var r=null;var i=true;var n,u;var o=this.createNode();this.expectKeyword("for");this.expect("(");if(this.match(";")){this.nextToken()}else{if(this.matchKeyword("var")){e=this.createNode();this.nextToken();var c=this.context.allowIn;this.context.allowIn=false;var h=this.parseVariableDeclarationList({inFor:true});this.context.allowIn=c;if(h.length===1&&this.matchKeyword("in")){var f=h[0];if(f.init&&(f.id.type===l.Syntax.ArrayPattern||f.id.type===l.Syntax.ObjectPattern||this.context.strict)){this.tolerateError(a.Messages.ForInOfLoopInitializer,"for-in")}e=this.finalize(e,new s.VariableDeclaration(h,"var"));this.nextToken();n=e;u=this.parseExpression();e=null}else if(h.length===1&&h[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new s.VariableDeclaration(h,"var"));this.nextToken();n=e;u=this.parseAssignmentExpression();e=null;i=false}else{e=this.finalize(e,new s.VariableDeclaration(h,"var"));this.expect(";")}}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();var p=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in"){e=this.finalize(e,new s.Identifier(p));this.nextToken();n=e;u=this.parseExpression();e=null}else{var c=this.context.allowIn;this.context.allowIn=false;var h=this.parseBindingList(p,{inFor:true});this.context.allowIn=c;if(h.length===1&&h[0].init===null&&this.matchKeyword("in")){e=this.finalize(e,new s.VariableDeclaration(h,p));this.nextToken();n=e;u=this.parseExpression();e=null}else if(h.length===1&&h[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new s.VariableDeclaration(h,p));this.nextToken();n=e;u=this.parseAssignmentExpression();e=null;i=false}else{this.consumeSemicolon();e=this.finalize(e,new s.VariableDeclaration(h,p))}}}else{var d=this.lookahead;var c=this.context.allowIn;this.context.allowIn=false;e=this.inheritCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=c;if(this.matchKeyword("in")){if(!this.context.isAssignmentTarget||e.type===l.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForIn)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;u=this.parseExpression();e=null}else if(this.matchContextualKeyword("of")){if(!this.context.isAssignmentTarget||e.type===l.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForLoop)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;u=this.parseAssignmentExpression();e=null;i=false}else{if(this.match(",")){var m=[e];while(this.match(",")){this.nextToken();m.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}e=this.finalize(this.startNode(d),new s.SequenceExpression(m))}this.expect(";")}}}if(typeof n==="undefined"){if(!this.match(";")){t=this.parseExpression()}this.expect(";");if(!this.match(")")){r=this.parseExpression()}}var v;if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());v=this.finalize(this.createNode(),new s.EmptyStatement)}else{this.expect(")");var y=this.context.inIteration;this.context.inIteration=true;v=this.isolateCoverGrammar(this.parseStatement);this.context.inIteration=y}return typeof n==="undefined"?this.finalize(o,new s.ForStatement(e,t,r,v)):i?this.finalize(o,new s.ForInStatement(n,u,v)):this.finalize(o,new s.ForOfStatement(n,u,v))};Parser.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();t=r;var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}}this.consumeSemicolon();if(t===null&&!this.context.inIteration){this.throwError(a.Messages.IllegalContinue)}return this.finalize(e,new s.ContinueStatement(t))};Parser.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}t=r}this.consumeSemicolon();if(t===null&&!this.context.inIteration&&!this.context.inSwitch){this.throwError(a.Messages.IllegalBreak)}return this.finalize(e,new s.BreakStatement(t))};Parser.prototype.parseReturnStatement=function(){if(!this.context.inFunctionBody){this.tolerateError(a.Messages.IllegalReturn)}var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10;var r=t?this.parseExpression():null;this.consumeSemicolon();return this.finalize(e,new s.ReturnStatement(r))};Parser.prototype.parseWithStatement=function(){if(this.context.strict){this.tolerateError(a.Messages.StrictModeWith)}var e=this.createNode();var t;this.expectKeyword("with");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new s.EmptyStatement)}else{this.expect(")");t=this.parseStatement()}return this.finalize(e,new s.WithStatement(r,t))};Parser.prototype.parseSwitchCase=function(){var e=this.createNode();var t;if(this.matchKeyword("default")){this.nextToken();t=null}else{this.expectKeyword("case");t=this.parseExpression()}this.expect(":");var r=[];while(true){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case")){break}r.push(this.parseStatementListItem())}return this.finalize(e,new s.SwitchCase(t,r))};Parser.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch");this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=true;var i=[];var n=false;this.expect("{");while(true){if(this.match("}")){break}var u=this.parseSwitchCase();if(u.test===null){if(n){this.throwError(a.Messages.MultipleDefaultsInSwitch)}n=true}i.push(u)}this.expect("}");this.context.inSwitch=r;return this.finalize(e,new s.SwitchStatement(t,i))};Parser.prototype.parseLabelledStatement=function(){var e=this.createNode();var t=this.parseExpression();var r;if(t.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var i=t;var n="$"+i.name;if(Object.prototype.hasOwnProperty.call(this.context.labelSet,n)){this.throwError(a.Messages.Redeclaration,"Label",i.name)}this.context.labelSet[n]=true;var u=void 0;if(this.matchKeyword("class")){this.tolerateUnexpectedToken(this.lookahead);u=this.parseClassDeclaration()}else if(this.matchKeyword("function")){var o=this.lookahead;var c=this.parseFunctionDeclaration();if(this.context.strict){this.tolerateUnexpectedToken(o,a.Messages.StrictFunction)}else if(c.generator){this.tolerateUnexpectedToken(o,a.Messages.GeneratorInLegacyContext)}u=c}else{u=this.parseStatement()}delete this.context.labelSet[n];r=new s.LabeledStatement(i,u)}else{this.consumeSemicolon();r=new s.ExpressionStatement(t)}return this.finalize(e,r)};Parser.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw");if(this.hasLineTerminator){this.throwError(a.Messages.NewlineAfterThrow)}var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new s.ThrowStatement(t))};Parser.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch");this.expect("(");if(this.match(")")){this.throwUnexpectedToken(this.lookahead)}var t=[];var r=this.parsePattern(t);var i={};for(var n=0;n0){this.tolerateError(a.Messages.BadGetterArity)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new s.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseSetterMethod=function(){var e=this.createNode();var t=false;var r=this.context.allowYield;this.context.allowYield=!t;var i=this.parseFormalParameters();if(i.params.length!==1){this.tolerateError(a.Messages.BadSetterArity)}else if(i.params[0]instanceof s.RestElement){this.tolerateError(a.Messages.BadSetterRestParameter)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new s.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseGeneratorMethod=function(){var e=this.createNode();var t=true;var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();this.context.allowYield=false;var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new s.FunctionExpression(null,i.params,n,t))};Parser.prototype.isStartOfExpression=function(){var e=true;var t=this.lookahead.value;switch(this.lookahead.type){case 7:e=t==="["||t==="("||t==="{"||t==="+"||t==="-"||t==="!"||t==="~"||t==="++"||t==="--"||t==="/"||t==="/=";break;case 4:e=t==="class"||t==="delete"||t==="function"||t==="let"||t==="new"||t==="super"||t==="this"||t==="typeof"||t==="void"||t==="yield";break;default:break}return e};Parser.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null;var r=false;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=false;r=this.match("*");if(r){this.nextToken();t=this.parseAssignmentExpression()}else if(this.isStartOfExpression()){t=this.parseAssignmentExpression()}this.context.allowYield=i}return this.finalize(e,new s.YieldExpression(t,r))};Parser.prototype.parseClassElement=function(e){var t=this.lookahead;var r=this.createNode();var i="";var n=null;var u=null;var l=false;var o=false;var c=false;var h=false;if(this.match("*")){this.nextToken()}else{l=this.match("[");n=this.parseObjectPropertyKey();var f=n;if(f.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))){t=this.lookahead;c=true;l=this.match("[");if(this.match("*")){this.nextToken()}else{n=this.parseObjectPropertyKey()}}if(t.type===3&&!this.hasLineTerminator&&t.value==="async"){var p=this.lookahead.value;if(p!==":"&&p!=="("&&p!=="*"){h=true;t=this.lookahead;n=this.parseObjectPropertyKey();if(t.type===3&&t.value==="constructor"){this.tolerateUnexpectedToken(t,a.Messages.ConstructorIsAsync)}}}}var d=this.qualifiedPropertyName(this.lookahead);if(t.type===3){if(t.value==="get"&&d){i="get";l=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;u=this.parseGetterMethod()}else if(t.value==="set"&&d){i="set";l=this.match("[");n=this.parseObjectPropertyKey();u=this.parseSetterMethod()}}else if(t.type===7&&t.value==="*"&&d){i="init";l=this.match("[");n=this.parseObjectPropertyKey();u=this.parseGeneratorMethod();o=true}if(!i&&n&&this.match("(")){i="init";u=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();o=true}if(!i){this.throwUnexpectedToken(this.lookahead)}if(i==="init"){i="method"}if(!l){if(c&&this.isPropertyKey(n,"prototype")){this.throwUnexpectedToken(t,a.Messages.StaticPrototype)}if(!c&&this.isPropertyKey(n,"constructor")){if(i!=="method"||!o||u&&u.generator){this.throwUnexpectedToken(t,a.Messages.ConstructorSpecialMethod)}if(e.value){this.throwUnexpectedToken(t,a.Messages.DuplicateConstructor)}else{e.value=true}i="constructor"}}return this.finalize(r,new s.MethodDefinition(n,l,u,i,c))};Parser.prototype.parseClassElementList=function(){var e=[];var t={value:false};this.expect("{");while(!this.match("}")){if(this.match(";")){this.nextToken()}else{e.push(this.parseClassElement(t))}}this.expect("}");return e};Parser.prototype.parseClassBody=function(){var e=this.createNode();var t=this.parseClassElementList();return this.finalize(e,new s.ClassBody(t))};Parser.prototype.parseClassDeclaration=function(e){var t=this.createNode();var r=this.context.strict;this.context.strict=true;this.expectKeyword("class");var i=e&&this.lookahead.type!==3?null:this.parseVariableIdentifier();var n=null;if(this.matchKeyword("extends")){this.nextToken();n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var a=this.parseClassBody();this.context.strict=r;return this.finalize(t,new s.ClassDeclaration(i,n,a))};Parser.prototype.parseClassExpression=function(){var e=this.createNode();var t=this.context.strict;this.context.strict=true;this.expectKeyword("class");var r=this.lookahead.type===3?this.parseVariableIdentifier():null;var i=null;if(this.matchKeyword("extends")){this.nextToken();i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var n=this.parseClassBody();this.context.strict=t;return this.finalize(e,new s.ClassExpression(r,i,n))};Parser.prototype.parseModule=function(){this.context.strict=true;this.context.isModule=true;this.scanner.isModule=true;var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new s.Module(t))};Parser.prototype.parseScript=function(){var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new s.Script(t))};Parser.prototype.parseModuleSpecifier=function(){var e=this.createNode();if(this.lookahead.type!==8){this.throwError(a.Messages.InvalidModuleSpecifier)}var t=this.nextToken();var r=this.getTokenRaw(t);return this.finalize(e,new s.Literal(t.value,r))};Parser.prototype.parseImportSpecifier=function(){var e=this.createNode();var t;var r;if(this.lookahead.type===3){t=this.parseVariableIdentifier();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}}else{t=this.parseIdentifierName();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(e,new s.ImportSpecifier(r,t))};Parser.prototype.parseNamedImports=function(){this.expect("{");var e=[];while(!this.match("}")){e.push(this.parseImportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");return e};Parser.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();return this.finalize(e,new s.ImportDefaultSpecifier(t))};Parser.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*");if(!this.matchContextualKeyword("as")){this.throwError(a.Messages.NoAsAfterImportNamespace)}this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new s.ImportNamespaceSpecifier(t))};Parser.prototype.parseImportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalImportDeclaration)}var e=this.createNode();this.expectKeyword("import");var t;var r=[];if(this.lookahead.type===8){t=this.parseModuleSpecifier()}else{if(this.match("{")){r=r.concat(this.parseNamedImports())}else if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")){r.push(this.parseImportDefaultSpecifier());if(this.match(",")){this.nextToken();if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.match("{")){r=r.concat(this.parseNamedImports())}else{this.throwUnexpectedToken(this.lookahead)}}}else{this.throwUnexpectedToken(this.nextToken())}if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();t=this.parseModuleSpecifier()}this.consumeSemicolon();return this.finalize(e,new s.ImportDeclaration(r,t))};Parser.prototype.parseExportSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();var r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseIdentifierName()}return this.finalize(e,new s.ExportSpecifier(t,r))};Parser.prototype.parseExportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalExportDeclaration)}var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default")){this.nextToken();if(this.matchKeyword("function")){var r=this.parseFunctionDeclaration(true);t=this.finalize(e,new s.ExportDefaultDeclaration(r))}else if(this.matchKeyword("class")){var r=this.parseClassDeclaration(true);t=this.finalize(e,new s.ExportDefaultDeclaration(r))}else if(this.matchContextualKeyword("async")){var r=this.matchAsyncFunction()?this.parseFunctionDeclaration(true):this.parseAssignmentExpression();t=this.finalize(e,new s.ExportDefaultDeclaration(r))}else{if(this.matchContextualKeyword("from")){this.throwError(a.Messages.UnexpectedToken,this.lookahead.value)}var r=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon();t=this.finalize(e,new s.ExportDefaultDeclaration(r))}}else if(this.match("*")){this.nextToken();if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var n=this.parseModuleSpecifier();this.consumeSemicolon();t=this.finalize(e,new s.ExportAllDeclaration(n))}else if(this.lookahead.type===4){var r=void 0;switch(this.lookahead.value){case"let":case"const":r=this.parseLexicalDeclaration({inFor:false});break;case"var":case"class":case"function":r=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new s.ExportNamedDeclaration(r,[],null))}else if(this.matchAsyncFunction()){var r=this.parseFunctionDeclaration();t=this.finalize(e,new s.ExportNamedDeclaration(r,[],null))}else{var u=[];var l=null;var o=false;this.expect("{");while(!this.match("}")){o=o||this.matchKeyword("default");u.push(this.parseExportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");if(this.matchContextualKeyword("from")){this.nextToken();l=this.parseModuleSpecifier();this.consumeSemicolon()}else if(o){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}else{this.consumeSemicolon()}t=this.finalize(e,new s.ExportNamedDeclaration(null,u,l))}return t};return Parser}();t.Parser=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function assert(e,t){if(!e){throw new Error("ASSERT: "+t)}}t.assert=assert},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=function(){function ErrorHandler(){this.errors=[];this.tolerant=false}ErrorHandler.prototype.recordError=function(e){this.errors.push(e)};ErrorHandler.prototype.tolerate=function(e){if(this.tolerant){this.recordError(e)}else{throw e}};ErrorHandler.prototype.constructError=function(e,t){var r=new Error(e);try{throw r}catch(e){if(Object.create&&Object.defineProperty){r=Object.create(e);Object.defineProperty(r,"column",{value:t})}}return r};ErrorHandler.prototype.createError=function(e,t,r,i){var n="Line "+t+": "+i;var a=this.constructError(n,r);a.index=e;a.lineNumber=t;a.description=i;return a};ErrorHandler.prototype.throwError=function(e,t,r,i){throw this.createError(e,t,r,i)};ErrorHandler.prototype.tolerateError=function(e,t,r,i){var n=this.createError(e,t,r,i);if(this.tolerant){this.recordError(n)}else{throw n}};return ErrorHandler}();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(4);var a=r(11);function hexValue(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function octalValue(e){return"01234567".indexOf(e)}var s=function(){function Scanner(e,t){this.source=e;this.errorHandler=t;this.trackComment=false;this.isModule=false;this.length=e.length;this.index=0;this.lineNumber=e.length>0?1:0;this.lineStart=0;this.curlyStack=[]}Scanner.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}};Scanner.prototype.restoreState=function(e){this.index=e.index;this.lineNumber=e.lineNumber;this.lineStart=e.lineStart};Scanner.prototype.eof=function(){return this.index>=this.length};Scanner.prototype.throwUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.tolerateUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.skipSingleLineComment=function(e){var t=[];var r,i;if(this.trackComment){t=[];r=this.index-e;i={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}}}while(!this.eof()){var a=this.source.charCodeAt(this.index);++this.index;if(n.Character.isLineTerminator(a)){if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:false,slice:[r+e,this.index-1],range:[r,this.index-1],loc:i};t.push(s)}if(a===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;return t}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:false,slice:[r+e,this.index],range:[r,this.index],loc:i};t.push(s)}return t};Scanner.prototype.skipMultiLineComment=function(){var e=[];var t,r;if(this.trackComment){e=[];t=this.index-2;r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}}}while(!this.eof()){var i=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(i)){if(i===13&&this.source.charCodeAt(this.index+1)===10){++this.index}++this.lineNumber;++this.index;this.lineStart=this.index}else if(i===42){if(this.source.charCodeAt(this.index+1)===47){this.index+=2;if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(a)}return e}++this.index}else{++this.index}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(a)}this.tolerateUnexpectedToken();return e};Scanner.prototype.scanComments=function(){var e;if(this.trackComment){e=[]}var t=this.index===0;while(!this.eof()){var r=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(r)){++this.index}else if(n.Character.isLineTerminator(r)){++this.index;if(r===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;t=true}else if(r===47){r=this.source.charCodeAt(this.index+1);if(r===47){this.index+=2;var i=this.skipSingleLineComment(2);if(this.trackComment){e=e.concat(i)}t=true}else if(r===42){this.index+=2;var i=this.skipMultiLineComment();if(this.trackComment){e=e.concat(i)}}else{break}}else if(t&&r===45){if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var i=this.skipSingleLineComment(3);if(this.trackComment){e=e.concat(i)}}else{break}}else if(r===60&&!this.isModule){if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var i=this.skipSingleLineComment(4);if(this.trackComment){e=e.concat(i)}}else{break}}else{break}}return e};Scanner.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return true;default:return false}};Scanner.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}};Scanner.prototype.isRestrictedWord=function(e){return e==="eval"||e==="arguments"};Scanner.prototype.isKeyword=function(e){switch(e.length){case 2:return e==="if"||e==="in"||e==="do";case 3:return e==="var"||e==="for"||e==="new"||e==="try"||e==="let";case 4:return e==="this"||e==="else"||e==="case"||e==="void"||e==="with"||e==="enum";case 5:return e==="while"||e==="break"||e==="catch"||e==="throw"||e==="const"||e==="yield"||e==="class"||e==="super";case 6:return e==="return"||e==="typeof"||e==="delete"||e==="switch"||e==="export"||e==="import";case 7:return e==="default"||e==="finally"||e==="extends";case 8:return e==="function"||e==="continue"||e==="debugger";case 10:return e==="instanceof";default:return false}};Scanner.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){var i=t;t=(i-55296)*1024+r-56320+65536}}return t};Scanner.prototype.scanHexEscape=function(e){var t=e==="u"?4:2;var r=0;for(var i=0;i1114111||e!=="}"){this.throwUnexpectedToken()}return n.Character.fromCodePoint(t)};Scanner.prototype.getIdentifier=function(){var e=this.index++;while(!this.eof()){var t=this.source.charCodeAt(this.index);if(t===92){this.index=e;return this.getComplexIdentifier()}else if(t>=55296&&t<57343){this.index=e;return this.getComplexIdentifier()}if(n.Character.isIdentifierPart(t)){++this.index}else{break}}return this.source.slice(e,this.index)};Scanner.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index);var t=n.Character.fromCodePoint(e);this.index+=t.length;var r;if(e===92){if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierStart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t=r}while(!this.eof()){e=this.codePointAt(this.index);if(!n.Character.isIdentifierPart(e)){break}r=n.Character.fromCodePoint(e);t+=r;this.index+=r.length;if(e===92){t=t.substr(0,t.length-1);if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierPart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t+=r}}return t};Scanner.prototype.octalToDecimal=function(e){var t=e!=="0";var r=octalValue(e);if(!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){t=true;r=r*8+octalValue(this.source[this.index++]);if("0123".indexOf(e)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){r=r*8+octalValue(this.source[this.index++])}}return{code:r,octal:t}};Scanner.prototype.scanIdentifier=function(){var e;var t=this.index;var r=this.source.charCodeAt(t)===92?this.getComplexIdentifier():this.getIdentifier();if(r.length===1){e=3}else if(this.isKeyword(r)){e=4}else if(r==="null"){e=5}else if(r==="true"||r==="false"){e=1}else{e=3}if(e!==3&&t+r.length!==this.index){var i=this.index;this.index=t;this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord);this.index=i}return{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanPunctuator=function(){var e=this.index;var t=this.source[this.index];switch(t){case"(":case"{":if(t==="{"){this.curlyStack.push("{")}++this.index;break;case".":++this.index;if(this.source[this.index]==="."&&this.source[this.index+1]==="."){this.index+=2;t="..."}break;case"}":++this.index;this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4);if(t===">>>="){this.index+=4}else{t=t.substr(0,3);if(t==="==="||t==="!=="||t===">>>"||t==="<<="||t===">>="||t==="**="){this.index+=3}else{t=t.substr(0,2);if(t==="&&"||t==="||"||t==="=="||t==="!="||t==="+="||t==="-="||t==="*="||t==="/="||t==="++"||t==="--"||t==="<<"||t===">>"||t==="&="||t==="|="||t==="^="||t==="%="||t==="<="||t===">="||t==="=>"||t==="**"){this.index+=2}else{t=this.source[this.index];if("<>=!+-*%&|^/".indexOf(t)>=0){++this.index}}}}}if(this.index===e){this.throwUnexpectedToken()}return{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanHexLiteral=function(e){var t="";while(!this.eof()){if(!n.Character.isHexDigit(this.source.charCodeAt(this.index))){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanBinaryLiteral=function(e){var t="";var r;while(!this.eof()){r=this.source[this.index];if(r!=="0"&&r!=="1"){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(!this.eof()){r=this.source.charCodeAt(this.index);if(n.Character.isIdentifierStart(r)||n.Character.isDecimalDigit(r)){this.throwUnexpectedToken()}}return{type:6,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanOctalLiteral=function(e,t){var r="";var i=false;if(n.Character.isOctalDigit(e.charCodeAt(0))){i=true;r="0"+this.source[this.index++]}else{++this.index}while(!this.eof()){if(!n.Character.isOctalDigit(this.source.charCodeAt(this.index))){break}r+=this.source[this.index++]}if(!i&&r.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt(r,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0){i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,i){var s=parseInt(t||i,16);if(s>1114111){n.throwUnexpectedToken(a.Messages.InvalidRegExp)}if(s<=65535){return String.fromCharCode(s)}return r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r)}try{RegExp(i)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}};Scanner.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert(e==="/","Regular expression literal must start with a slash");var t=this.source[this.index++];var r=false;var s=false;while(!this.eof()){e=this.source[this.index++];t+=e;if(e==="\\"){e=this.source[this.index++];if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}t+=e}else if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}else if(r){if(e==="]"){r=false}}else{if(e==="/"){s=true;break}else if(e==="["){r=true}}}if(!s){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}return t.substr(1,t.length-2)};Scanner.prototype.scanRegExpFlags=function(){var e="";var t="";while(!this.eof()){var r=this.source[this.index];if(!n.Character.isIdentifierPart(r.charCodeAt(0))){break}++this.index;if(r==="\\"&&!this.eof()){r=this.source[this.index];if(r==="u"){++this.index;var i=this.index;var a=this.scanHexEscape("u");if(a!==null){t+=a;for(e+="\\u";i=55296&&e<57343){if(n.Character.isIdentifierStart(this.codePointAt(this.index))){return this.scanIdentifier()}}return this.scanPunctuator()};return Scanner}();t.Scanner=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TokenName={};t.TokenName[1]="Boolean";t.TokenName[2]="";t.TokenName[3]="Identifier";t.TokenName[4]="Keyword";t.TokenName[5]="Null";t.TokenName[6]="Numeric";t.TokenName[7]="Punctuator";t.TokenName[8]="String";t.TokenName[9]="RegularExpression";t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(10);var n=r(12);var a=r(13);var s=function(){function Reader(){this.values=[];this.curly=this.paren=-1}Reader.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0};Reader.prototype.isRegexStart=function(){var e=this.values[this.values.length-1];var t=e!==null;switch(e){case"this":case"]":t=false;break;case")":var r=this.values[this.paren-1];t=r==="if"||r==="while"||r==="for"||r==="with";break;case"}":t=false;if(this.values[this.curly-3]==="function"){var i=this.values[this.curly-4];t=i?!this.beforeFunctionExpression(i):false}else if(this.values[this.curly-4]==="function"){var i=this.values[this.curly-5];t=i?!this.beforeFunctionExpression(i):true}break;default:break}return t};Reader.prototype.push=function(e){if(e.type===7||e.type===4){if(e.value==="{"){this.curly=this.values.length}else if(e.value==="("){this.paren=this.values.length}this.values.push(e.value)}else{this.values.push(null)}};return Reader}();var u=function(){function Tokenizer(e,t){this.errorHandler=new i.ErrorHandler;this.errorHandler.tolerant=t?typeof t.tolerant==="boolean"&&t.tolerant:false;this.scanner=new n.Scanner(e,this.errorHandler);this.scanner.trackComment=t?typeof t.comment==="boolean"&&t.comment:false;this.trackRange=t?typeof t.range==="boolean"&&t.range:false;this.trackLoc=t?typeof t.loc==="boolean"&&t.loc:false;this.buffer=[];this.reader=new s}Tokenizer.prototype.errors=function(){return this.errorHandler.errors};Tokenizer.prototype.getNextToken=function(){if(this.buffer.length===0){var e=this.scanner.scanComments();if(this.scanner.trackComment){for(var t=0;t{"use strict";var r=Object;var i=Object.defineProperty;var n=Object.create;function defProp(e,t,n){if(i)try{i.call(r,e,t,{value:n})}catch(r){e[t]=n}else{e[t]=n}}function makeSafeToCall(e){if(e){defProp(e,"call",e.call);defProp(e,"apply",e.apply)}return e}makeSafeToCall(i);makeSafeToCall(n);var a=makeSafeToCall(Object.prototype.hasOwnProperty);var s=makeSafeToCall(Number.prototype.toString);var u=makeSafeToCall(String.prototype.slice);var l=function(){};function create(e){if(n){return n.call(r,e)}l.prototype=e||null;return new l}var o=Math.random;var c=create(null);function makeUniqueKey(){do{var e=internString(u.call(s.call(o(),36),2))}while(a.call(c,e));return c[e]=e}function internString(e){var t={};t[e]=true;return Object.keys(t)[0]}t.makeUniqueKey=makeUniqueKey;var h=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function getOwnPropertyNames(e){for(var t=h(e),r=0,i=0,n=t.length;ri){t[i]=t[r]}++i}}t.length=i;return t};function defaultCreatorFn(e){return create(null)}function makeAccessor(e){var t=makeUniqueKey();var r=create(null);e=e||defaultCreatorFn;function register(i){var n;function vault(t,a){if(t===r){return a?n=null:n||(n=e(i))}}defProp(i,t,vault)}function accessor(e){if(!a.call(e,t))register(e);return e[t](r)}accessor.forget=function(e){if(a.call(e,t))e[t](r,true)};return accessor}t.makeAccessor=makeAccessor},998:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});var a=i(r(357));var s=n(r(593));var u=s.namedTypes;var l=s.builtInTypes.array;var o=s.builtInTypes.object;var c=r(687);var h=r(721);var f=r(495);var p=f.makeUniqueKey();function getSortedChildNodes(e,t,r){if(!e){return}h.fixFaultyLocations(e,t);if(r){if(u.Node.check(e)&&u.SourceLocation.check(e.loc)){for(var i=r.length-1;i>=0;--i){if(h.comparePos(r[i].loc.end,e.loc.start)<=0){break}}r.splice(i+1,0,e);return}}else if(e[p]){return e[p]}var n;if(l.check(e)){n=Object.keys(e)}else if(o.check(e)){n=s.getFieldNames(e)}else{return}if(!r){Object.defineProperty(e,p,{value:r=[],enumerable:false})}for(var i=0,a=n.length;i>1;var u=i[s];if(h.comparePos(u.loc.start,t.loc.start)<=0&&h.comparePos(t.loc.end,u.loc.end)<=0){decorateComment(t.enclosingNode=u,t,r);return}if(h.comparePos(u.loc.end,t.loc.start)<=0){var l=u;n=s+1;continue}if(h.comparePos(t.loc.end,u.loc.start)<=0){var o=u;a=s;continue}throw new Error("Comment location overlaps with node location")}if(l){t.precedingNode=l}if(o){t.followingNode=o}}function attach(e,t,r){if(!l.check(e)){return}var i=[];e.forEach(function(e){e.loc.lines=r;decorateComment(t,e,r);var n=e.precedingNode;var s=e.enclosingNode;var u=e.followingNode;if(n&&u){var l=i.length;if(l>0){var o=i[l-1];a.default.strictEqual(o.precedingNode===e.precedingNode,o.followingNode===e.followingNode);if(o.followingNode!==e.followingNode){breakTies(i,r)}}i.push(e)}else if(n){breakTies(i,r);addTrailingComment(n,e)}else if(u){breakTies(i,r);addLeadingComment(u,e)}else if(s){breakTies(i,r);addDanglingComment(s,e)}else{throw new Error("AST contains no nodes at all?")}});breakTies(i,r);e.forEach(function(e){delete e.precedingNode;delete e.enclosingNode;delete e.followingNode})}t.attach=attach;function breakTies(e,t){var r=e.length;if(r===0){return}var i=e[0].precedingNode;var n=e[0].followingNode;var s=n.loc.start;for(var u=r;u>0;--u){var l=e[u-1];a.default.strictEqual(l.precedingNode,i);a.default.strictEqual(l.followingNode,n);var o=t.sliceString(l.loc.end,s);if(/\S/.test(o)){break}s=l.loc.start}while(u<=r&&(l=e[u])&&(l.type==="Line"||l.type==="CommentLine")&&l.loc.start.column>n.loc.start.column){++u}e.forEach(function(e,t){if(t1){return e[t-2]}return null};f.getValue=function getValue(){var e=this.stack;return e[e.length-1]};f.valueIsDuplicate=function(){var e=this.stack;var t=e.length-1;return e.lastIndexOf(e[t],t-1)>=0};function getNodeHelper(e,t){var r=e.stack;for(var i=r.length-1;i>=0;i-=2){var n=r[i];if(u.Node.check(n)&&--t<0){return n}}return null}f.getNode=function getNode(e){if(e===void 0){e=0}return getNodeHelper(this,~~e)};f.getParentNode=function getParentNode(e){if(e===void 0){e=0}return getNodeHelper(this,~~e+1)};f.getRootValue=function getRootValue(){var e=this.stack;if(e.length%2===0){return e[1]}return e[0]};f.call=function call(e){var t=this.stack;var r=t.length;var i=t[r-1];var n=arguments.length;for(var a=1;a0){var i=r[t.start.token-1];if(i){var n=this.getRootValue().loc;if(c.comparePos(n.start,i.loc.start)<=0){return i}}}return null};f.getNextToken=function(e){e=e||this.getNode();var t=e&&e.loc;var r=t&&t.tokens;if(r&&t.end.tokenc){return true}if(s===c&&i==="right"){a.default.strictEqual(r.right,t);return true}default:return false}case"SequenceExpression":switch(r.type){case"ReturnStatement":return false;case"ForStatement":return false;case"ExpressionStatement":return i!=="expression";default:return true}case"YieldExpression":switch(r.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return r.type==="NullableTypeAnnotation";case"Literal":return r.type==="MemberExpression"&&o.check(t.value)&&i==="object"&&r.object===t;case"NumericLiteral":return r.type==="MemberExpression"&&i==="object"&&r.object===t;case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":case"NewExpression":return i==="callee"&&r.callee===t;case"ConditionalExpression":return i==="test"&&r.test===t;case"MemberExpression":return i==="object"&&r.object===t;default:return false}case"ArrowFunctionExpression":if(u.CallExpression.check(r)&&i==="callee"){return true}if(u.MemberExpression.check(r)&&i==="object"){return true}return isBinary(r);case"ObjectExpression":if(r.type==="ArrowFunctionExpression"&&i==="body"){return true}break;case"TSAsExpression":if(r.type==="ArrowFunctionExpression"&&i==="body"&&t.expression.type==="ObjectExpression"){return true}break;case"CallExpression":if(i==="declaration"&&u.ExportDefaultDeclaration.check(r)&&u.FunctionExpression.check(t.callee)){return true}}if(r.type==="NewExpression"&&i==="callee"&&r.callee===t){return containsCallExpression(t)}if(e!==true&&!this.canBeFirstInStatement()&&this.firstInStatement()){return true}return false};function isBinary(e){return u.BinaryExpression.check(e)||u.LogicalExpression.check(e)}function isUnaryLike(e){return u.UnaryExpression.check(e)||u.SpreadElement&&u.SpreadElement.check(e)||u.SpreadProperty&&u.SpreadProperty.check(e)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%","**"]].forEach(function(e,t){e.forEach(function(e){p[e]=t})});function containsCallExpression(e){if(u.CallExpression.check(e)){return true}if(l.check(e)){return e.some(containsCallExpression)}if(u.Node.check(e)){return s.someField(e,function(e,t){return containsCallExpression(t)})}return false}f.canBeFirstInStatement=function(){var e=this.getNode();if(u.FunctionExpression.check(e)){return false}if(u.ObjectExpression.check(e)){return false}if(u.ClassExpression.check(e)){return false}return true};f.firstInStatement=function(){var e=this.stack;var t,r;var i,n;for(var s=e.length-1;s>=0;s-=2){if(u.Node.check(e[s])){i=t;n=r;t=e[s-1];r=e[s]}if(!r||!n){continue}if(u.BlockStatement.check(r)&&t==="body"&&i===0){a.default.strictEqual(r.body[0],n);return true}if(u.ExpressionStatement.check(r)&&i==="expression"){a.default.strictEqual(r.expression,n);return true}if(u.AssignmentExpression.check(r)&&i==="left"){a.default.strictEqual(r.left,n);return true}if(u.ArrowFunctionExpression.check(r)&&i==="body"){a.default.strictEqual(r.body,n);return true}if(u.SequenceExpression.check(r)&&t==="expressions"&&i===0){a.default.strictEqual(r.expressions[0],n);continue}if(u.CallExpression.check(r)&&i==="callee"){a.default.strictEqual(r.callee,n);continue}if(u.MemberExpression.check(r)&&i==="object"){a.default.strictEqual(r.object,n);continue}if(u.ConditionalExpression.check(r)&&i==="test"){a.default.strictEqual(r.test,n);continue}if(isBinary(r)&&i==="left"){a.default.strictEqual(r.left,n);continue}if(u.UnaryExpression.check(r)&&!r.prefix&&i==="argument"){a.default.strictEqual(r.argument,n);continue}return false}return true};t.default=h},687:function(e,t,r){"use strict";var i=this&&this.__assign||function(){i=Object.assign||function(e){for(var t,r=1,i=arguments.length;r0);this.length=e.length;this.name=t||null;if(this.name){this.mappings.push(new o.default(this,{start:this.firstPos(),end:this.lastPos()}))}}Lines.prototype.toString=function(e){return this.sliceString(this.firstPos(),this.lastPos(),e)};Lines.prototype.getSourceMap=function(e,t){if(!e){return null}var r=this;function updateJSON(r){r=r||{};r.file=e;if(t){r.sourceRoot=t}return r}if(r.cachedSourceMap){return updateJSON(r.cachedSourceMap.toJSON())}var i=new s.default.SourceMapGenerator(updateJSON());var n={};r.mappings.forEach(function(e){var t=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos();var s=r.skipSpaces(e.targetLoc.start)||r.lastPos();while(l.comparePos(t,e.sourceLoc.end)<0&&l.comparePos(s,e.targetLoc.end)<0){var u=e.sourceLines.charAt(t);var o=r.charAt(s);a.default.strictEqual(u,o);var c=e.sourceLines.name;i.addMapping({source:c,original:{line:t.line,column:t.column},generated:{line:s.line,column:s.column}});if(!f.call(n,c)){var h=e.sourceLines.toString();i.setSourceContent(c,h);n[c]=h}r.nextPos(s,true);e.sourceLines.nextPos(t,true)}});r.cachedSourceMap=i;return i.toJSON()};Lines.prototype.bootstrapCharAt=function(e){a.default.strictEqual(typeof e,"object");a.default.strictEqual(typeof e.line,"number");a.default.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,i=this.toString().split(m),n=i[t-1];if(typeof n==="undefined")return"";if(r===n.length&&t=n.length)return"";return n.charAt(r)};Lines.prototype.charAt=function(e){a.default.strictEqual(typeof e,"object");a.default.strictEqual(typeof e.line,"number");a.default.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,i=this,n=i.infos,s=n[t-1],u=r;if(typeof s==="undefined"||u<0)return"";var l=this.getIndentAt(t);if(u=s.sliceEnd)return"";return s.line.charAt(u)};Lines.prototype.stripMargin=function(e,t){if(e===0)return this;a.default.ok(e>0,"negative margin: "+e);if(t&&this.length===1)return this;var r=new Lines(this.infos.map(function(r,n){if(r.line&&(n>0||!t)){r=i({},r,{indent:Math.max(0,r.indent-e)})}return r}));if(this.mappings.length>0){var n=r.mappings;a.default.strictEqual(n.length,0);this.mappings.forEach(function(r){n.push(r.indent(e,t,true))})}return r};Lines.prototype.indent=function(e){if(e===0){return this}var t=new Lines(this.infos.map(function(t){if(t.line&&!t.locked){t=i({},t,{indent:t.indent+e})}return t}));if(this.mappings.length>0){var r=t.mappings;a.default.strictEqual(r.length,0);this.mappings.forEach(function(t){r.push(t.indent(e))})}return t};Lines.prototype.indentTail=function(e){if(e===0){return this}if(this.length<2){return this}var t=new Lines(this.infos.map(function(t,r){if(r>0&&t.line&&!t.locked){t=i({},t,{indent:t.indent+e})}return t}));if(this.mappings.length>0){var r=t.mappings;a.default.strictEqual(r.length,0);this.mappings.forEach(function(t){r.push(t.indent(e,true))})}return t};Lines.prototype.lockIndentTail=function(){if(this.length<2){return this}return new Lines(this.infos.map(function(e,t){return i({},e,{locked:t>0})}))};Lines.prototype.getIndentAt=function(e){a.default.ok(e>=1,"no line "+e+" (line numbers start from 1)");return Math.max(this.infos[e-1].indent,0)};Lines.prototype.guessTabWidth=function(){if(typeof this.cachedTabWidth==="number"){return this.cachedTabWidth}var e=[];var t=0;for(var r=1,i=this.length;r<=i;++r){var n=this.infos[r-1];var a=n.line.slice(n.sliceStart,n.sliceEnd);if(isOnlyWhitespace(a)){continue}var s=Math.abs(n.indent-t);e[s]=~~e[s]+1;t=n.indent}var u=-1;var l=2;for(var o=1;ou){u=e[o];l=o}}return this.cachedTabWidth=l};Lines.prototype.startsWithComment=function(){if(this.infos.length===0){return false}var e=this.infos[0],t=e.sliceStart,r=e.sliceEnd,i=e.line.slice(t,r).trim();return i.length===0||i.slice(0,2)==="//"||i.slice(0,2)==="/*"};Lines.prototype.isOnlyWhitespace=function(){return isOnlyWhitespace(this.toString())};Lines.prototype.isPrecededOnlyByWhitespace=function(e){var t=this.infos[e.line-1];var r=Math.max(t.indent,0);var i=e.column-r;if(i<=0){return true}var n=t.sliceStart;var a=Math.min(n+i,t.sliceEnd);var s=t.line.slice(n,a);return isOnlyWhitespace(s)};Lines.prototype.getLineLength=function(e){var t=this.infos[e-1];return this.getIndentAt(e)+t.sliceEnd-t.sliceStart};Lines.prototype.nextPos=function(e,t){if(t===void 0){t=false}var r=Math.max(e.line,0),i=Math.max(e.column,0);if(i0){r.push(r.pop().slice(0,t.column));r[0]=r[0].slice(e.column)}return fromString(r.join("\n"))};Lines.prototype.slice=function(e,t){if(!t){if(!e){return this}t=this.lastPos()}if(!e){throw new Error("cannot slice with end but not start")}var r=this.infos.slice(e.line-1,t.line);if(e.line===t.line){r[0]=sliceInfo(r[0],e.column,t.column)}else{a.default.ok(e.line0){var n=i.mappings;a.default.strictEqual(n.length,0);this.mappings.forEach(function(r){var i=r.slice(this,e,t);if(i){n.push(i)}},this)}return i};Lines.prototype.bootstrapSliceString=function(e,t,r){return this.slice(e,t).toString(r)};Lines.prototype.sliceString=function(e,t,r){if(e===void 0){e=this.firstPos()}if(t===void 0){t=this.lastPos()}r=u.normalize(r);var i=[];var n=r.tabWidth,a=n===void 0?2:n;for(var s=e.line;s<=t.line;++s){var l=this.infos[s-1];if(s===e.line){if(s===t.line){l=sliceInfo(l,e.column,t.column)}else{l=sliceInfo(l,e.column)}}else if(s===t.line){l=sliceInfo(l,0,t.column)}var o=Math.max(l.indent,0);var c=l.line.slice(0,l.sliceStart);if(r.reuseWhitespace&&isOnlyWhitespace(c)&&countSpaces(c,r.tabWidth)===o){i.push(l.line.slice(0,l.sliceEnd));continue}var h=0;var f=o;if(r.useTabs){h=Math.floor(o/a);f-=h*a}var p="";if(h>0){p+=new Array(h+1).join("\t")}if(f>0){p+=new Array(f+1).join(" ")}p+=l.line.slice(l.sliceStart,l.sliceEnd);i.push(p)}return i.join(r.lineTerminator)};Lines.prototype.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1};Lines.prototype.join=function(e){var t=this;var r=[];var n=[];var a;function appendLines(e){if(e===null){return}if(a){var t=e.infos[0];var s=new Array(t.indent+1).join(" ");var u=r.length;var l=Math.max(a.indent,0)+a.sliceEnd-a.sliceStart;a.line=a.line.slice(0,a.sliceEnd)+s+t.line.slice(t.sliceStart,t.sliceEnd);a.locked=a.locked||t.locked;a.sliceEnd=a.line.length;if(e.mappings.length>0){e.mappings.forEach(function(e){n.push(e.add(u,l))})}}else if(e.mappings.length>0){n.push.apply(n,e.mappings)}e.infos.forEach(function(e,t){if(!a||t>0){a=i({},e);r.push(a)}})}function appendWithSeparator(e,r){if(r>0)appendLines(t);appendLines(e)}e.map(function(e){var t=fromString(e);if(t.isEmpty())return null;return t}).forEach(function(e,r){if(t.isEmpty()){appendLines(e)}else{appendWithSeparator(e,r)}});if(r.length<1)return v;var s=new Lines(r);s.mappings=n;return s};Lines.prototype.concat=function(){var e=[];for(var t=0;t0);var s=Math.ceil(r/t)*t;if(s===r){r+=t}else{r=s}break;case 11:case 12:case 13:case 65279:break;case 32:default:r+=1;break}}return r}t.countSpaces=countSpaces;var d=/^\s*/;var m=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;function fromString(e,t){if(e instanceof c)return e;e+="";var r=t&&t.tabWidth;var i=e.indexOf("\t")<0;var n=!t&&i&&e.length<=p;a.default.ok(r||i,"No tab width specified but encountered tabs in string\n"+e);if(n&&f.call(h,e))return h[e];var s=new c(e.split(m).map(function(e){var t=d.exec(e)[0];return{line:e,indent:countSpaces(t,r),locked:false,sliceStart:t.length,sliceEnd:e.length}}),u.normalize(t).sourceFileName);if(n)h[e]=s;return s}t.fromString=fromString;function isOnlyWhitespace(e){return!/\S/.test(e)}function sliceInfo(e,t,r){var i=e.sliceStart;var n=e.sliceEnd;var s=Math.max(e.indent,0);var u=s+n-i;if(typeof r==="undefined"){r=u}t=Math.max(t,0);r=Math.min(r,u);r=Math.max(r,t);if(r=0);a.default.ok(i<=n);a.default.strictEqual(u,s+n-i);if(e.indent===s&&e.sliceStart===i&&e.sliceEnd===n){return e}return{line:e.line,indent:s,locked:false,sliceStart:i,sliceEnd:n}}function concat(e){return v.join(e)}t.concat=concat;var v=fromString("")},788:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(357));var a=r(721);var s=function(){function Mapping(e,t,r){if(r===void 0){r=t}this.sourceLines=e;this.sourceLoc=t;this.targetLoc=r}Mapping.prototype.slice=function(e,t,r){if(r===void 0){r=e.lastPos()}var i=this.sourceLines;var s=this.sourceLoc;var u=this.targetLoc;function skip(a){var l=s[a];var o=u[a];var c=t;if(a==="end"){c=r}else{n.default.strictEqual(a,"start")}return skipChars(i,l,e,o,c)}if(a.comparePos(t,u.start)<=0){if(a.comparePos(u.end,r)<=0){u={start:subtractPos(u.start,t.line,t.column),end:subtractPos(u.end,t.line,t.column)}}else if(a.comparePos(r,u.start)<=0){return null}else{s={start:s.start,end:skip("end")};u={start:subtractPos(u.start,t.line,t.column),end:subtractPos(r,t.line,t.column)}}}else{if(a.comparePos(u.end,t)<=0){return null}if(a.comparePos(u.end,r)<=0){s={start:skip("start"),end:s.end};u={start:{line:1,column:0},end:subtractPos(u.end,t.line,t.column)}}else{s={start:skip("start"),end:skip("end")};u={start:{line:1,column:0},end:subtractPos(r,t.line,t.column)}}}return new Mapping(this.sourceLines,s,u)};Mapping.prototype.add=function(e,t){return new Mapping(this.sourceLines,this.sourceLoc,{start:addPos(this.targetLoc.start,e,t),end:addPos(this.targetLoc.end,e,t)})};Mapping.prototype.subtract=function(e,t){return new Mapping(this.sourceLines,this.sourceLoc,{start:subtractPos(this.targetLoc.start,e,t),end:subtractPos(this.targetLoc.end,e,t)})};Mapping.prototype.indent=function(e,t,r){if(t===void 0){t=false}if(r===void 0){r=false}if(e===0){return this}var i=this.targetLoc;var n=i.start.line;var a=i.end.line;if(t&&n===1&&a===1){return this}i={start:i.start,end:i.end};if(!t||n>1){var s=i.start.column+e;i.start={line:n,column:r?Math.max(0,s):s}}if(!t||a>1){var u=i.end.column+e;i.end={line:a,column:r?Math.max(0,u):u}}return new Mapping(this.sourceLines,this.sourceLoc,i)};return Mapping}();t.default=s;function addPos(e,t,r){return{line:e.line+t-1,column:e.line===1?e.column+r:e.column}}function subtractPos(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}function skipChars(e,t,r,i,s){var u=a.comparePos(i,s);if(u===0){return t}if(u<0){var l=e.skipSpaces(t)||e.lastPos();var o=r.skipSpaces(i)||r.lastPos();var c=s.line-o.line;l.line+=c;o.line+=c;if(c>0){l.column=0;o.column=0}else{n.default.strictEqual(c,0)}while(a.comparePos(o,s)<0&&r.nextPos(o,true)){n.default.ok(e.nextPos(l,true));n.default.strictEqual(e.charAt(l),r.charAt(o))}}else{var l=e.skipSpaces(t,true)||e.firstPos();var o=r.skipSpaces(i,true)||r.firstPos();var c=s.line-o.line;l.line+=c;o.line+=c;if(c<0){l.column=e.getLineLength(l.line);o.column=r.getLineLength(o.line)}else{n.default.strictEqual(c,0)}while(a.comparePos(s,o)<0&&r.prevPos(o,true)){n.default.ok(e.prevPos(l,true));n.default.strictEqual(e.charAt(l),r.charAt(o))}}return l}},309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i={parser:r(685),tabWidth:4,useTabs:false,reuseWhitespace:true,lineTerminator:r(87).EOL||"\n",wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:false,tolerant:true,quote:null,trailingComma:false,arrayBracketSpacing:false,objectCurlySpacing:true,arrowParensAlways:false,flowObjectCommas:true,tokens:true},n=i.hasOwnProperty;function normalize(e){var t=e||i;function get(e){return n.call(t,e)?t[e]:i[e]}return{tabWidth:+get("tabWidth"),useTabs:!!get("useTabs"),reuseWhitespace:!!get("reuseWhitespace"),lineTerminator:get("lineTerminator"),wrapColumn:Math.max(get("wrapColumn"),0),sourceFileName:get("sourceFileName"),sourceMapName:get("sourceMapName"),sourceRoot:get("sourceRoot"),inputSourceMap:get("inputSourceMap"),parser:get("esprima")||get("parser"),range:get("range"),tolerant:get("tolerant"),quote:get("quote"),trailingComma:get("trailingComma"),arrayBracketSpacing:get("arrayBracketSpacing"),objectCurlySpacing:get("objectCurlySpacing"),arrowParensAlways:get("arrowParensAlways"),flowObjectCommas:get("flowObjectCommas"),tokens:!!get("tokens")}}t.normalize=normalize},382:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});var a=i(r(357));var s=n(r(593));var u=s.builders;var l=s.builtInTypes.object;var o=s.builtInTypes.array;var c=r(309);var h=r(687);var f=r(998);var p=n(r(721));function parse(e,t){t=c.normalize(t);var i=h.fromString(e,t);var n=i.toString({tabWidth:t.tabWidth,reuseWhitespace:false,useTabs:false});var a=[];var s=t.parser.parse(n,{jsx:true,loc:true,locations:true,range:t.range,comment:true,onComment:a,tolerant:p.getOption(t,"tolerant",true),ecmaVersion:6,sourceType:p.getOption(t,"sourceType","module")});var l=Array.isArray(s.tokens)?s.tokens:r(609).tokenize(n,{loc:true});delete s.tokens;l.forEach(function(e){if(typeof e.value!=="string"){e.value=i.sliceString(e.loc.start,e.loc.end)}});if(Array.isArray(s.comments)){a=s.comments;delete s.comments}if(s.loc){p.fixFaultyLocations(s,i)}else{s.loc={start:i.firstPos(),end:i.lastPos()}}s.loc.lines=i;s.loc.indent=0;var o;var m;if(s.type==="Program"){m=s;o=u.file(s,t.sourceFileName||null);o.loc={start:i.firstPos(),end:i.lastPos(),lines:i,indent:0}}else if(s.type==="File"){o=s;m=o.program}if(t.tokens){o.tokens=l}var v=p.getTrueLoc({type:m.type,loc:m.loc,body:[],comments:a},i);m.loc.start=v.start;m.loc.end=v.end;f.attach(a,m.body.length?o.program:o,i);return new d(i,l).copy(o)}t.parse=parse;var d=function TreeCopier(e,t){a.default.ok(this instanceof TreeCopier);this.lines=e;this.tokens=t;this.startTokenIndex=0;this.endTokenIndex=t.length;this.indent=0;this.seen=new Map};var m=d.prototype;m.copy=function(e){if(this.seen.has(e)){return this.seen.get(e)}if(o.check(e)){var t=new Array(e.length);this.seen.set(e,t);e.forEach(function(e,r){t[r]=this.copy(e)},this);return t}if(!l.check(e)){return e}p.fixFaultyLocations(e,this.lines);var t=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:false,enumerable:false,writable:true}});this.seen.set(e,t);var r=e.loc;var i=this.indent;var n=i;var a=this.startTokenIndex;var s=this.endTokenIndex;if(r){if(e.type==="Block"||e.type==="Line"||e.type==="CommentBlock"||e.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(r.start)){n=this.indent=r.start.column}r.lines=this.lines;r.tokens=this.tokens;r.indent=n;this.findTokenRange(r)}var u=Object.keys(e);var c=u.length;for(var h=0;h0){var t=e.tokens[this.startTokenIndex];if(p.comparePos(e.start,t.loc.start)<0){--this.startTokenIndex}else break}while(this.endTokenIndexthis.startTokenIndex){var t=e.tokens[this.endTokenIndex-1];if(p.comparePos(e.end,t.loc.end)<0){--this.endTokenIndex}else break}e.end.token=this.endTokenIndex}},844:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});var a=i(r(357));var s=n(r(687));var u=n(r(593));var l=u.namedTypes.Printable;var o=u.namedTypes.Expression;var c=u.namedTypes.ReturnStatement;var h=u.namedTypes.SourceLocation;var f=r(721);var p=i(r(236));var d=u.builtInTypes.object;var m=u.builtInTypes.array;var v=u.builtInTypes.string;var y=/[0-9a-z_$]/i;var x=function Patcher(e){a.default.ok(this instanceof Patcher);a.default.ok(e instanceof s.Lines);var t=this,r=[];t.replace=function(e,t){if(v.check(t))t=s.fromString(t);r.push({lines:t,start:e.start,end:e.end})};t.get=function(t){t=t||{start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}};var i=t.start,n=[];function pushSlice(t,r){a.default.ok(f.comparePos(t,r)<=0);n.push(e.slice(t,r))}r.sort(function(e,t){return f.comparePos(e.start,t.start)}).forEach(function(e){if(f.comparePos(i,e.start)>0){}else{pushSlice(i,e.start);n.push(e.lines);i=e.end}});pushSlice(i,t.end);return s.concat(n)}};t.Patcher=x;var E=x.prototype;E.tryToReprintComments=function(e,t,r){var i=this;if(!e.comments&&!t.comments){return true}var n=p.default.from(e);var s=p.default.from(t);n.stack.push("comments",getSurroundingComments(e));s.stack.push("comments",getSurroundingComments(t));var u=[];var l=findArrayReprints(n,s,u);if(l&&u.length>0){u.forEach(function(e){var t=e.oldPath.getValue();a.default.ok(t.leading||t.trailing);i.replace(t.loc,r(e.newPath).indentTail(t.loc.indent))})}return l};function getSurroundingComments(e){var t=[];if(e.comments&&e.comments.length>0){e.comments.forEach(function(e){if(e.leading||e.trailing){t.push(e)}})}return t}E.deleteComments=function(e){if(!e.comments){return}var t=this;e.comments.forEach(function(r){if(r.leading){t.replace({start:r.loc.start,end:e.loc.lines.skipSpaces(r.loc.end,false,false)},"")}else if(r.trailing){t.replace({start:e.loc.lines.skipSpaces(r.loc.start,true,false),end:r.loc.end},"")}})};function getReprinter(e){a.default.ok(e instanceof p.default);var t=e.getValue();if(!l.check(t))return;var r=t.original;var i=r&&r.loc;var n=i&&i.lines;var u=[];if(!n||!findReprints(e,u))return;return function(t){var a=new x(n);u.forEach(function(e){var r=e.newPath.getValue();var i=e.oldPath.getValue();h.assert(i.loc,true);var u=!a.tryToReprintComments(r,i,t);if(u){a.deleteComments(i)}var l=t(e.newPath,{includeComments:u,avoidRootParens:i.type===r.type&&e.oldPath.hasParens()}).indentTail(i.loc.indent);var o=needsLeadingSpace(n,i.loc,l);var c=needsTrailingSpace(n,i.loc,l);if(o||c){var f=[];o&&f.push(" ");f.push(l);c&&f.push(" ");l=s.concat(f)}a.replace(i.loc,l)});var l=a.get(i).indentTail(-r.loc.indent);if(e.needsParens()){return s.concat(["(",l,")"])}return l}}t.getReprinter=getReprinter;function needsLeadingSpace(e,t,r){var i=f.copyPos(t.start);var n=e.prevPos(i)&&e.charAt(i);var a=r.charAt(r.firstPos());return n&&y.test(n)&&a&&y.test(a)}function needsTrailingSpace(e,t,r){var i=e.charAt(t.end);var n=r.lastPos();var a=r.prevPos(n)&&r.charAt(n);return a&&y.test(a)&&i&&y.test(i)}function findReprints(e,t){var r=e.getValue();l.assert(r);var i=r.original;l.assert(i);a.default.deepEqual(t,[]);if(r.type!==i.type){return false}var n=new p.default(i);var s=findChildReprints(e,n,t);if(!s){t.length=0}return s}function findAnyReprints(e,t,r){var i=e.getValue();var n=t.getValue();if(i===n)return true;if(m.check(i))return findArrayReprints(e,t,r);if(d.check(i))return findObjectReprints(e,t,r);return false}function findArrayReprints(e,t,r){var i=e.getValue();var n=t.getValue();if(i===n||e.valueIsDuplicate()||t.valueIsDuplicate()){return true}m.assert(i);var a=i.length;if(!(m.check(n)&&n.length===a))return false;for(var s=0;ss){return false}return true}},413:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});var a=i(r(357));var s=r(998);var u=r(687);var l=r(309);var o=r(844);var c=n(r(593));var h=c.namedTypes;var f=c.builtInTypes.string;var p=c.builtInTypes.object;var d=i(r(236));var m=n(r(721));var v=function PrintResult(e,t){a.default.ok(this instanceof PrintResult);f.assert(e);this.code=e;if(t){p.assert(t);this.map=t}};var y=v.prototype;var x=false;y.toString=function(){if(!x){console.warn("Deprecation warning: recast.print now returns an object with "+"a .code property. You appear to be treating the object as a "+"string, which might still work but is strongly discouraged.");x=true}return this.code};var E=new v("");var S=function Printer(e){a.default.ok(this instanceof Printer);var t=e&&e.tabWidth;e=l.normalize(e);e.sourceFileName=null;function makePrintFunctionWith(e,t){e=Object.assign({},e,t);return function(t){return print(t,e)}}function print(r,i){a.default.ok(r instanceof d.default);i=i||{};if(i.includeComments){return s.printComments(r,makePrintFunctionWith(i,{includeComments:false}))}var n=e.tabWidth;if(!t){var u=r.getNode().loc;if(u&&u.lines&&u.lines.guessTabWidth){e.tabWidth=u.lines.guessTabWidth()}}var l=o.getReprinter(r);var c=l?l(print):genericPrint(r,e,i,makePrintFunctionWith(i,{includeComments:true,avoidRootParens:false}));e.tabWidth=n;return c}this.print=function(t){if(!t){return E}var r=print(d.default.from(t),{includeComments:true,avoidRootParens:false});return new v(r.toString(e),m.composeSourceMaps(e.inputSourceMap,r.getSourceMap(e.sourceMapName,e.sourceRoot)))};this.printGenerically=function(t){if(!t){return E}function printGenerically(t){return s.printComments(t,function(t){return genericPrint(t,e,{includeComments:true,avoidRootParens:false},printGenerically)})}var r=d.default.from(t);var i=e.reuseWhitespace;e.reuseWhitespace=false;var n=new v(printGenerically(r).toString(e));e.reuseWhitespace=i;return n}};t.Printer=S;function genericPrint(e,t,r,i){a.default.ok(e instanceof d.default);var n=e.getValue();var s=[];var l=genericPrintNoParens(e,t,i);if(!n||l.isEmpty()){return l}var o=false;var c=printDecorators(e,i);if(c.isEmpty()){if(!r.avoidRootParens){o=e.needsParens()}}else{s.push(c)}if(o){s.unshift("(")}s.push(l);if(o){s.push(")")}return u.concat(s)}function genericPrintNoParens(e,t,r){var i=e.getValue();if(!i){return u.fromString("")}if(typeof i==="string"){return u.fromString(i,t)}h.Printable.assert(i);var n=[];switch(i.type){case"File":return e.call(r,"program");case"Program":if(i.directives){e.each(function(e){n.push(r(e),";\n")},"directives")}if(i.interpreter){n.push(e.call(r,"interpreter"))}n.push(e.call(function(e){return printStatementSequence(e,t,r)},"body"));return u.concat(n);case"Noop":case"EmptyStatement":return u.fromString("");case"ExpressionStatement":return u.concat([e.call(r,"expression"),";"]);case"ParenthesizedExpression":return u.concat(["(",e.call(r,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return u.fromString(" ").join([e.call(r,"left"),i.operator,e.call(r,"right")]);case"AssignmentPattern":return u.concat([e.call(r,"left")," = ",e.call(r,"right")]);case"MemberExpression":case"OptionalMemberExpression":n.push(e.call(r,"object"));var s=e.call(r,"property");var l=i.type==="OptionalMemberExpression"&&i.optional;if(i.computed){n.push(l?"?.[":"[",s,"]")}else{n.push(l?"?.":".",s)}return u.concat(n);case"MetaProperty":return u.concat([e.call(r,"meta"),".",e.call(r,"property")]);case"BindExpression":if(i.object){n.push(e.call(r,"object"))}n.push("::",e.call(r,"callee"));return u.concat(n);case"Path":return u.fromString(".").join(i.body);case"Identifier":return u.concat([u.fromString(i.name,t),i.optional?"?":"",e.call(r,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"ObjectTypeSpreadProperty":case"RestElement":return u.concat(["...",e.call(r,"argument"),e.call(r,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSDeclareFunction":if(i.declare){n.push("declare ")}if(i.async){n.push("async ")}n.push("function");if(i.generator)n.push("*");if(i.id){n.push(" ",e.call(r,"id"),e.call(r,"typeParameters"))}else{if(i.typeParameters){n.push(e.call(r,"typeParameters"))}}n.push("(",printFunctionParams(e,t,r),")",e.call(r,"returnType"));if(i.body){n.push(" ",e.call(r,"body"))}return u.concat(n);case"ArrowFunctionExpression":if(i.async){n.push("async ")}if(i.typeParameters){n.push(e.call(r,"typeParameters"))}if(!t.arrowParensAlways&&i.params.length===1&&!i.rest&&i.params[0].type==="Identifier"&&!i.params[0].typeAnnotation&&!i.returnType){n.push(e.call(r,"params",0))}else{n.push("(",printFunctionParams(e,t,r),")",e.call(r,"returnType"))}n.push(" => ",e.call(r,"body"));return u.concat(n);case"MethodDefinition":return printMethod(e,t,r);case"YieldExpression":n.push("yield");if(i.delegate)n.push("*");if(i.argument)n.push(" ",e.call(r,"argument"));return u.concat(n);case"AwaitExpression":n.push("await");if(i.all)n.push("*");if(i.argument)n.push(" ",e.call(r,"argument"));return u.concat(n);case"ModuleDeclaration":n.push("module",e.call(r,"id"));if(i.source){a.default.ok(!i.body);n.push("from",e.call(r,"source"))}else{n.push(e.call(r,"body"))}return u.fromString(" ").join(n);case"ImportSpecifier":if(i.importKind&&i.importKind!=="value"){n.push(i.importKind+" ")}if(i.imported){n.push(e.call(r,"imported"));if(i.local&&i.local.name!==i.imported.name){n.push(" as ",e.call(r,"local"))}}else if(i.id){n.push(e.call(r,"id"));if(i.name){n.push(" as ",e.call(r,"name"))}}return u.concat(n);case"ExportSpecifier":if(i.local){n.push(e.call(r,"local"));if(i.exported&&i.exported.name!==i.local.name){n.push(" as ",e.call(r,"exported"))}}else if(i.id){n.push(e.call(r,"id"));if(i.name){n.push(" as ",e.call(r,"name"))}}return u.concat(n);case"ExportBatchSpecifier":return u.fromString("*");case"ImportNamespaceSpecifier":n.push("* as ");if(i.local){n.push(e.call(r,"local"))}else if(i.id){n.push(e.call(r,"id"))}return u.concat(n);case"ImportDefaultSpecifier":if(i.local){return e.call(r,"local")}return e.call(r,"id");case"TSExportAssignment":return u.concat(["export = ",e.call(r,"expression")]);case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return printExportDeclaration(e,t,r);case"ExportAllDeclaration":n.push("export *");if(i.exported){n.push(" as ",e.call(r,"exported"))}n.push(" from ",e.call(r,"source"),";");return u.concat(n);case"TSNamespaceExportDeclaration":n.push("export as namespace ",e.call(r,"id"));return maybeAddSemicolon(u.concat(n));case"ExportNamespaceSpecifier":return u.concat(["* as ",e.call(r,"exported")]);case"ExportDefaultSpecifier":return e.call(r,"exported");case"Import":return u.fromString("import",t);case"ImportDeclaration":{n.push("import ");if(i.importKind&&i.importKind!=="value"){n.push(i.importKind+" ")}if(i.specifiers&&i.specifiers.length>0){var o=[];var c=[];e.each(function(e){var t=e.getValue();if(t.type==="ImportSpecifier"){c.push(r(e))}else if(t.type==="ImportDefaultSpecifier"||t.type==="ImportNamespaceSpecifier"){o.push(r(e))}},"specifiers");o.forEach(function(e,t){if(t>0){n.push(", ")}n.push(e)});if(c.length>0){var f=u.fromString(", ").join(c);if(f.getLineLength(1)>t.wrapColumn){f=u.concat([u.fromString(",\n").join(c).indent(t.tabWidth),","])}if(o.length>0){n.push(", ")}if(f.length>1){n.push("{\n",f,"\n}")}else if(t.objectCurlySpacing){n.push("{ ",f," }")}else{n.push("{",f,"}")}}n.push(" from ")}n.push(e.call(r,"source"),";");return u.concat(n)}case"BlockStatement":var p=e.call(function(e){return printStatementSequence(e,t,r)},"body");if(p.isEmpty()){if(!i.directives||i.directives.length===0){return u.fromString("{}")}}n.push("{\n");if(i.directives){e.each(function(e){n.push(maybeAddSemicolon(r(e).indent(t.tabWidth)),i.directives.length>1||!p.isEmpty()?"\n":"")},"directives")}n.push(p.indent(t.tabWidth));n.push("\n}");return u.concat(n);case"ReturnStatement":n.push("return");if(i.argument){var d=e.call(r,"argument");if(d.startsWithComment()||d.length>1&&h.JSXElement&&h.JSXElement.check(i.argument)){n.push(" (\n",d.indent(t.tabWidth),"\n)")}else{n.push(" ",d)}}n.push(";");return u.concat(n);case"CallExpression":case"OptionalCallExpression":n.push(e.call(r,"callee"));if(i.typeParameters){n.push(e.call(r,"typeParameters"))}if(i.typeArguments){n.push(e.call(r,"typeArguments"))}if(i.type==="OptionalCallExpression"&&i.callee.type!=="OptionalMemberExpression"){n.push("?.")}n.push(printArgumentsList(e,t,r));return u.concat(n);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var v=false;var y=i.type==="ObjectTypeAnnotation";var x=t.flowObjectCommas?",":y?";":",";var E=[];if(y){E.push("indexers","callProperties");if(i.internalSlots!=null){E.push("internalSlots")}}E.push("properties");var S=0;E.forEach(function(e){S+=i[e].length});var D=y&&S===1||S===0;var b=i.exact?"{|":"{";var g=i.exact?"|}":"}";n.push(D?b:b+"\n");var C=n.length-1;var A=0;E.forEach(function(i){e.each(function(e){var i=r(e);if(!D){i=i.indent(t.tabWidth)}var a=!y&&i.length>1;if(a&&v){n.push("\n")}n.push(i);if(A0){n.push(x," ")}n.push(T)}else{n.push("\n",T.indent(t.tabWidth))}}n.push(D?g:"\n"+g);if(A!==0&&D&&t.objectCurlySpacing){n[C]=b+" ";n[n.length-1]=" "+g}if(i.typeAnnotation){n.push(e.call(r,"typeAnnotation"))}return u.concat(n);case"PropertyPattern":return u.concat([e.call(r,"key"),": ",e.call(r,"pattern")]);case"ObjectProperty":case"Property":if(i.method||i.kind==="get"||i.kind==="set"){return printMethod(e,t,r)}if(i.shorthand&&i.value.type==="AssignmentPattern"){return e.call(r,"value")}var F=e.call(r,"key");if(i.computed){n.push("[",F,"]")}else{n.push(F)}if(!i.shorthand){n.push(": ",e.call(r,"value"))}return u.concat(n);case"ClassMethod":case"ObjectMethod":case"ClassPrivateMethod":case"TSDeclareMethod":return printMethod(e,t,r);case"PrivateName":return u.concat(["#",e.call(r,"id")]);case"Decorator":return u.concat(["@",e.call(r,"expression")]);case"ArrayExpression":case"ArrayPattern":var w=i.elements,S=w.length;var P=e.map(r,"elements");var k=u.fromString(", ").join(P);var D=k.getLineLength(1)<=t.wrapColumn;if(D){if(t.arrayBracketSpacing){n.push("[ ")}else{n.push("[")}}else{n.push("[\n")}e.each(function(e){var r=e.getName();var i=e.getValue();if(!i){n.push(",")}else{var a=P[r];if(D){if(r>0)n.push(" ")}else{a=a.indent(t.tabWidth)}n.push(a);if(r1){n.push(u.fromString(",\n").join(P).indentTail(i.kind.length+1))}else{n.push(P[0])}var I=e.getParentNode();if(!h.ForStatement.check(I)&&!h.ForInStatement.check(I)&&!(h.ForOfStatement&&h.ForOfStatement.check(I))&&!(h.ForAwaitStatement&&h.ForAwaitStatement.check(I))){n.push(";")}return u.concat(n);case"VariableDeclarator":return i.init?u.fromString(" = ").join([e.call(r,"id"),e.call(r,"init")]):e.call(r,"id");case"WithStatement":return u.concat(["with (",e.call(r,"object"),") ",e.call(r,"body")]);case"IfStatement":var N=adjustClause(e.call(r,"consequent"),t);n.push("if (",e.call(r,"test"),")",N);if(i.alternate)n.push(endsWithBrace(N)?" else":"\nelse",adjustClause(e.call(r,"alternate"),t));return u.concat(n);case"ForStatement":var O=e.call(r,"init"),j=O.length>1?";\n":"; ",X="for (",J=u.fromString(j).join([O,e.call(r,"test"),e.call(r,"update")]).indentTail(X.length),L=u.concat([X,J,")"]),z=adjustClause(e.call(r,"body"),t);n.push(L);if(L.length>1){n.push("\n");z=z.trimLeft()}n.push(z);return u.concat(n);case"WhileStatement":return u.concat(["while (",e.call(r,"test"),")",adjustClause(e.call(r,"body"),t)]);case"ForInStatement":return u.concat([i.each?"for each (":"for (",e.call(r,"left")," in ",e.call(r,"right"),")",adjustClause(e.call(r,"body"),t)]);case"ForOfStatement":case"ForAwaitStatement":n.push("for ");if(i.await||i.type==="ForAwaitStatement"){n.push("await ")}n.push("(",e.call(r,"left")," of ",e.call(r,"right"),")",adjustClause(e.call(r,"body"),t));return u.concat(n);case"DoWhileStatement":var U=u.concat(["do",adjustClause(e.call(r,"body"),t)]);n.push(U);if(endsWithBrace(U))n.push(" while");else n.push("\nwhile");n.push(" (",e.call(r,"test"),");");return u.concat(n);case"DoExpression":var R=e.call(function(e){return printStatementSequence(e,t,r)},"body");return u.concat(["do {\n",R.indent(t.tabWidth),"\n}"]);case"BreakStatement":n.push("break");if(i.label)n.push(" ",e.call(r,"label"));n.push(";");return u.concat(n);case"ContinueStatement":n.push("continue");if(i.label)n.push(" ",e.call(r,"label"));n.push(";");return u.concat(n);case"LabeledStatement":return u.concat([e.call(r,"label"),":\n",e.call(r,"body")]);case"TryStatement":n.push("try ",e.call(r,"block"));if(i.handler){n.push(" ",e.call(r,"handler"))}else if(i.handlers){e.each(function(e){n.push(" ",r(e))},"handlers")}if(i.finalizer){n.push(" finally ",e.call(r,"finalizer"))}return u.concat(n);case"CatchClause":n.push("catch ");if(i.param){n.push("(",e.call(r,"param"))}if(i.guard){n.push(" if ",e.call(r,"guard"))}if(i.param){n.push(") ")}n.push(e.call(r,"body"));return u.concat(n);case"ThrowStatement":return u.concat(["throw ",e.call(r,"argument"),";"]);case"SwitchStatement":return u.concat(["switch (",e.call(r,"discriminant"),") {\n",u.fromString("\n").join(e.map(r,"cases")),"\n}"]);case"SwitchCase":if(i.test)n.push("case ",e.call(r,"test"),":");else n.push("default:");if(i.consequent.length>0){n.push("\n",e.call(function(e){return printStatementSequence(e,t,r)},"consequent").indent(t.tabWidth))}return u.concat(n);case"DebuggerStatement":return u.fromString("debugger;");case"JSXAttribute":n.push(e.call(r,"name"));if(i.value)n.push("=",e.call(r,"value"));return u.concat(n);case"JSXIdentifier":return u.fromString(i.name,t);case"JSXNamespacedName":return u.fromString(":").join([e.call(r,"namespace"),e.call(r,"name")]);case"JSXMemberExpression":return u.fromString(".").join([e.call(r,"object"),e.call(r,"property")]);case"JSXSpreadAttribute":return u.concat(["{...",e.call(r,"argument"),"}"]);case"JSXSpreadChild":return u.concat(["{...",e.call(r,"expression"),"}"]);case"JSXExpressionContainer":return u.concat(["{",e.call(r,"expression"),"}"]);case"JSXElement":case"JSXFragment":var q="opening"+(i.type==="JSXElement"?"Element":"Fragment");var V="closing"+(i.type==="JSXElement"?"Element":"Fragment");var W=e.call(r,q);if(i[q].selfClosing){a.default.ok(!i[V],"unexpected "+V+" element in self-closing "+i.type);return W}var K=u.concat(e.map(function(e){var t=e.getValue();if(h.Literal.check(t)&&typeof t.value==="string"){if(/\S/.test(t.value)){return t.value.replace(/^\s+|\s+$/g,"")}else if(/\n/.test(t.value)){return"\n"}}return r(e)},"children")).indentTail(t.tabWidth);var H=e.call(r,V);return u.concat([W,K,H]);case"JSXOpeningElement":n.push("<",e.call(r,"name"));var Y=[];e.each(function(e){Y.push(" ",r(e))},"attributes");var G=u.concat(Y);var Q=G.length>1||G.getLineLength(1)>t.wrapColumn;if(Q){Y.forEach(function(e,t){if(e===" "){a.default.strictEqual(t%2,0);Y[t]="\n"}});G=u.concat(Y).indentTail(t.tabWidth)}n.push(G,i.selfClosing?" />":">");return u.concat(n);case"JSXClosingElement":return u.concat([""]);case"JSXOpeningFragment":return u.fromString("<>");case"JSXClosingFragment":return u.fromString("");case"JSXText":return u.fromString(i.value,t);case"JSXEmptyExpression":return u.fromString("");case"TypeAnnotatedIdentifier":return u.concat([e.call(r,"annotation")," ",e.call(r,"identifier")]);case"ClassBody":if(i.body.length===0){return u.fromString("{}")}return u.concat(["{\n",e.call(function(e){return printStatementSequence(e,t,r)},"body").indent(t.tabWidth),"\n}"]);case"ClassPropertyDefinition":n.push("static ",e.call(r,"definition"));if(!h.MethodDefinition.check(i.definition))n.push(";");return u.concat(n);case"ClassProperty":var $=i.accessibility||i.access;if(typeof $==="string"){n.push($," ")}if(i.static){n.push("static ")}if(i.abstract){n.push("abstract ")}if(i.readonly){n.push("readonly ")}var F=e.call(r,"key");if(i.computed){F=u.concat(["[",F,"]"])}if(i.variance){F=u.concat([printVariance(e,r),F])}n.push(F);if(i.optional){n.push("?")}if(i.typeAnnotation){n.push(e.call(r,"typeAnnotation"))}if(i.value){n.push(" = ",e.call(r,"value"))}n.push(";");return u.concat(n);case"ClassPrivateProperty":if(i.static){n.push("static ")}n.push(e.call(r,"key"));if(i.typeAnnotation){n.push(e.call(r,"typeAnnotation"))}if(i.value){n.push(" = ",e.call(r,"value"))}n.push(";");return u.concat(n);case"ClassDeclaration":case"ClassExpression":if(i.declare){n.push("declare ")}if(i.abstract){n.push("abstract ")}n.push("class");if(i.id){n.push(" ",e.call(r,"id"))}if(i.typeParameters){n.push(e.call(r,"typeParameters"))}if(i.superClass){n.push(" extends ",e.call(r,"superClass"),e.call(r,"superTypeParameters"))}if(i["implements"]&&i["implements"].length>0){n.push(" implements ",u.fromString(", ").join(e.map(r,"implements")))}n.push(" ",e.call(r,"body"));return u.concat(n);case"TemplateElement":return u.fromString(i.value.raw,t).lockIndentTail();case"TemplateLiteral":var Z=e.map(r,"expressions");n.push("`");e.each(function(e){var t=e.getName();n.push(r(e));if(t0)n.push(" ")}else{s=s.indent(t.tabWidth)}n.push(s);if(r0){n.push(" extends ",u.fromString(", ").join(e.map(r,"extends")))}n.push(" ",e.call(r,"body"));return u.concat(n);case"DeclareClass":return printFlowDeclaration(e,["class ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareFunction":return printFlowDeclaration(e,["function ",e.call(r,"id"),";"]);case"DeclareModule":return printFlowDeclaration(e,["module ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareModuleExports":return printFlowDeclaration(e,["module.exports",e.call(r,"typeAnnotation")]);case"DeclareVariable":return printFlowDeclaration(e,["var ",e.call(r,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return u.concat(["declare ",printExportDeclaration(e,t,r)]);case"InferredPredicate":return u.fromString("%checks",t);case"DeclaredPredicate":return u.concat(["%checks(",e.call(r,"value"),")"]);case"FunctionTypeAnnotation":var _=e.getParentNode(0);var ee=!(h.ObjectTypeCallProperty.check(_)||h.ObjectTypeInternalSlot.check(_)&&_.method||h.DeclareFunction.check(e.getParentNode(2)));var te=ee&&!h.FunctionTypeParam.check(_);if(te){n.push(": ")}n.push("(",printFunctionParams(e,t,r),")");if(i.returnType){n.push(ee?" => ":": ",e.call(r,"returnType"))}return u.concat(n);case"FunctionTypeParam":return u.concat([e.call(r,"name"),i.optional?"?":"",": ",e.call(r,"typeAnnotation")]);case"GenericTypeAnnotation":return u.concat([e.call(r,"id"),e.call(r,"typeParameters")]);case"DeclareInterface":n.push("declare ");case"InterfaceDeclaration":case"TSInterfaceDeclaration":if(i.declare){n.push("declare ")}n.push("interface ",e.call(r,"id"),e.call(r,"typeParameters")," ");if(i["extends"]&&i["extends"].length>0){n.push("extends ",u.fromString(", ").join(e.map(r,"extends"))," ")}if(i.body){n.push(e.call(r,"body"))}return u.concat(n);case"ClassImplements":case"InterfaceExtends":return u.concat([e.call(r,"id"),e.call(r,"typeParameters")]);case"IntersectionTypeAnnotation":return u.fromString(" & ").join(e.map(r,"types"));case"NullableTypeAnnotation":return u.concat(["?",e.call(r,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return u.fromString("null",t);case"ThisTypeAnnotation":return u.fromString("this",t);case"NumberTypeAnnotation":return u.fromString("number",t);case"ObjectTypeCallProperty":return e.call(r,"value");case"ObjectTypeIndexer":return u.concat([printVariance(e,r),"[",e.call(r,"id"),": ",e.call(r,"key"),"]: ",e.call(r,"value")]);case"ObjectTypeProperty":return u.concat([printVariance(e,r),e.call(r,"key"),i.optional?"?":"",": ",e.call(r,"value")]);case"ObjectTypeInternalSlot":return u.concat([i.static?"static ":"","[[",e.call(r,"id"),"]]",i.optional?"?":"",i.value.type!=="FunctionTypeAnnotation"?": ":"",e.call(r,"value")]);case"QualifiedTypeIdentifier":return u.concat([e.call(r,"qualification"),".",e.call(r,"id")]);case"StringLiteralTypeAnnotation":return u.fromString(nodeStr(i.value,t),t);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":a.default.strictEqual(typeof i.value,"number");return u.fromString(JSON.stringify(i.value),t);case"StringTypeAnnotation":return u.fromString("string",t);case"DeclareTypeAlias":n.push("declare ");case"TypeAlias":return u.concat(["type ",e.call(r,"id"),e.call(r,"typeParameters")," = ",e.call(r,"right"),";"]);case"DeclareOpaqueType":n.push("declare ");case"OpaqueType":n.push("opaque type ",e.call(r,"id"),e.call(r,"typeParameters"));if(i["supertype"]){n.push(": ",e.call(r,"supertype"))}if(i["impltype"]){n.push(" = ",e.call(r,"impltype"))}n.push(";");return u.concat(n);case"TypeCastExpression":return u.concat(["(",e.call(r,"expression"),e.call(r,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return u.concat(["<",u.fromString(", ").join(e.map(r,"params")),">"]);case"Variance":if(i.kind==="plus"){return u.fromString("+")}if(i.kind==="minus"){return u.fromString("-")}return u.fromString("");case"TypeParameter":if(i.variance){n.push(printVariance(e,r))}n.push(e.call(r,"name"));if(i.bound){n.push(e.call(r,"bound"))}if(i["default"]){n.push("=",e.call(r,"default"))}return u.concat(n);case"TypeofTypeAnnotation":return u.concat([u.fromString("typeof ",t),e.call(r,"argument")]);case"UnionTypeAnnotation":return u.fromString(" | ").join(e.map(r,"types"));case"VoidTypeAnnotation":return u.fromString("void",t);case"NullTypeAnnotation":return u.fromString("null",t);case"TSType":throw new Error("unprintable type: "+JSON.stringify(i.type));case"TSNumberKeyword":return u.fromString("number",t);case"TSBigIntKeyword":return u.fromString("bigint",t);case"TSObjectKeyword":return u.fromString("object",t);case"TSBooleanKeyword":return u.fromString("boolean",t);case"TSStringKeyword":return u.fromString("string",t);case"TSSymbolKeyword":return u.fromString("symbol",t);case"TSAnyKeyword":return u.fromString("any",t);case"TSVoidKeyword":return u.fromString("void",t);case"TSThisType":return u.fromString("this",t);case"TSNullKeyword":return u.fromString("null",t);case"TSUndefinedKeyword":return u.fromString("undefined",t);case"TSUnknownKeyword":return u.fromString("unknown",t);case"TSNeverKeyword":return u.fromString("never",t);case"TSArrayType":return u.concat([e.call(r,"elementType"),"[]"]);case"TSLiteralType":return e.call(r,"literal");case"TSUnionType":return u.fromString(" | ").join(e.map(r,"types"));case"TSIntersectionType":return u.fromString(" & ").join(e.map(r,"types"));case"TSConditionalType":n.push(e.call(r,"checkType")," extends ",e.call(r,"extendsType")," ? ",e.call(r,"trueType")," : ",e.call(r,"falseType"));return u.concat(n);case"TSInferType":n.push("infer ",e.call(r,"typeParameter"));return u.concat(n);case"TSParenthesizedType":return u.concat(["(",e.call(r,"typeAnnotation"),")"]);case"TSFunctionType":return u.concat([e.call(r,"typeParameters"),"(",printFunctionParams(e,t,r),")",e.call(r,"typeAnnotation")]);case"TSConstructorType":return u.concat(["new ",e.call(r,"typeParameters"),"(",printFunctionParams(e,t,r),")",e.call(r,"typeAnnotation")]);case"TSMappedType":{n.push(i.readonly?"readonly ":"","[",e.call(r,"typeParameter"),"]",i.optional?"?":"");if(i.typeAnnotation){n.push(": ",e.call(r,"typeAnnotation"),";")}return u.concat(["{\n",u.concat(n).indent(t.tabWidth),"\n}"])}case"TSTupleType":return u.concat(["[",u.fromString(", ").join(e.map(r,"elementTypes")),"]"]);case"TSRestType":return u.concat(["...",e.call(r,"typeAnnotation"),"[]"]);case"TSOptionalType":return u.concat([e.call(r,"typeAnnotation"),"?"]);case"TSIndexedAccessType":return u.concat([e.call(r,"objectType"),"[",e.call(r,"indexType"),"]"]);case"TSTypeOperator":return u.concat([e.call(r,"operator")," ",e.call(r,"typeAnnotation")]);case"TSTypeLiteral":{var re=u.fromString(",\n").join(e.map(r,"members"));if(re.isEmpty()){return u.fromString("{}",t)}n.push("{\n",re.indent(t.tabWidth),"\n}");return u.concat(n)}case"TSEnumMember":n.push(e.call(r,"id"));if(i.initializer){n.push(" = ",e.call(r,"initializer"))}return u.concat(n);case"TSTypeQuery":return u.concat(["typeof ",e.call(r,"exprName")]);case"TSParameterProperty":if(i.accessibility){n.push(i.accessibility," ")}if(i.export){n.push("export ")}if(i.static){n.push("static ")}if(i.readonly){n.push("readonly ")}n.push(e.call(r,"parameter"));return u.concat(n);case"TSTypeReference":return u.concat([e.call(r,"typeName"),e.call(r,"typeParameters")]);case"TSQualifiedName":return u.concat([e.call(r,"left"),".",e.call(r,"right")]);case"TSAsExpression":{var ie=i.extra&&i.extra.parenthesized===true;if(ie)n.push("(");n.push(e.call(r,"expression"),u.fromString(" as "),e.call(r,"typeAnnotation"));if(ie)n.push(")");return u.concat(n)}case"TSNonNullExpression":return u.concat([e.call(r,"expression"),"!"]);case"TSTypeAnnotation":{var _=e.getParentNode(0);var ne=": ";if(h.TSFunctionType.check(_)||h.TSConstructorType.check(_)){ne=" => "}if(h.TSTypePredicate.check(_)){ne=" is "}return u.concat([ne,e.call(r,"typeAnnotation")])}case"TSIndexSignature":return u.concat([i.readonly?"readonly ":"","[",e.map(r,"parameters"),"]",e.call(r,"typeAnnotation")]);case"TSPropertySignature":n.push(printVariance(e,r),i.readonly?"readonly ":"");if(i.computed){n.push("[",e.call(r,"key"),"]")}else{n.push(e.call(r,"key"))}n.push(i.optional?"?":"",e.call(r,"typeAnnotation"));return u.concat(n);case"TSMethodSignature":if(i.computed){n.push("[",e.call(r,"key"),"]")}else{n.push(e.call(r,"key"))}if(i.optional){n.push("?")}n.push(e.call(r,"typeParameters"),"(",printFunctionParams(e,t,r),")",e.call(r,"typeAnnotation"));return u.concat(n);case"TSTypePredicate":return u.concat([e.call(r,"parameterName"),e.call(r,"typeAnnotation")]);case"TSCallSignatureDeclaration":return u.concat([e.call(r,"typeParameters"),"(",printFunctionParams(e,t,r),")",e.call(r,"typeAnnotation")]);case"TSConstructSignatureDeclaration":if(i.typeParameters){n.push("new",e.call(r,"typeParameters"))}else{n.push("new ")}n.push("(",printFunctionParams(e,t,r),")",e.call(r,"typeAnnotation"));return u.concat(n);case"TSTypeAliasDeclaration":return u.concat([i.declare?"declare ":"","type ",e.call(r,"id"),e.call(r,"typeParameters")," = ",e.call(r,"typeAnnotation"),";"]);case"TSTypeParameter":n.push(e.call(r,"name"));var _=e.getParentNode(0);var ae=h.TSMappedType.check(_);if(i.constraint){n.push(ae?" in ":" extends ",e.call(r,"constraint"))}if(i["default"]){n.push(" = ",e.call(r,"default"))}return u.concat(n);case"TSTypeAssertion":var ie=i.extra&&i.extra.parenthesized===true;if(ie){n.push("(")}n.push("<",e.call(r,"typeAnnotation"),"> ",e.call(r,"expression"));if(ie){n.push(")")}return u.concat(n);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return u.concat(["<",u.fromString(", ").join(e.map(r,"params")),">"]);case"TSEnumDeclaration":n.push(i.declare?"declare ":"",i.const?"const ":"","enum ",e.call(r,"id"));var se=u.fromString(",\n").join(e.map(r,"members"));if(se.isEmpty()){n.push(" {}")}else{n.push(" {\n",se.indent(t.tabWidth),"\n}")}return u.concat(n);case"TSExpressionWithTypeArguments":return u.concat([e.call(r,"expression"),e.call(r,"typeParameters")]);case"TSInterfaceBody":var ue=u.fromString(";\n").join(e.map(r,"body"));if(ue.isEmpty()){return u.fromString("{}",t)}return u.concat(["{\n",ue.indent(t.tabWidth),";","\n}"]);case"TSImportType":n.push("import(",e.call(r,"argument"),")");if(i.qualifier){n.push(".",e.call(r,"qualifier"))}if(i.typeParameters){n.push(e.call(r,"typeParameters"))}return u.concat(n);case"TSImportEqualsDeclaration":if(i.isExport){n.push("export ")}n.push("import ",e.call(r,"id")," = ",e.call(r,"moduleReference"));return maybeAddSemicolon(u.concat(n));case"TSExternalModuleReference":return u.concat(["require(",e.call(r,"expression"),")"]);case"TSModuleDeclaration":{var le=e.getParentNode();if(le.type==="TSModuleDeclaration"){n.push(".")}else{if(i.declare){n.push("declare ")}if(!i.global){var oe=i.id.type==="StringLiteral"||i.id.type==="Literal"&&typeof i.id.value==="string";if(oe){n.push("module ")}else if(i.loc&&i.loc.lines&&i.id.loc){var ce=i.loc.lines.sliceString(i.loc.start,i.id.loc.start);if(ce.indexOf("module")>=0){n.push("module ")}else{n.push("namespace ")}}else{n.push("namespace ")}}}n.push(e.call(r,"id"));if(i.body&&i.body.type==="TSModuleDeclaration"){n.push(e.call(r,"body"))}else if(i.body){var he=e.call(r,"body");if(he.isEmpty()){n.push(" {}")}else{n.push(" {\n",he.indent(t.tabWidth),"\n}")}}return u.concat(n)}case"TSModuleBlock":return e.call(function(e){return printStatementSequence(e,t,r)},"body");case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:debugger;throw new Error("unknown type: "+JSON.stringify(i.type))}}function printDecorators(e,t){var r=[];var i=e.getValue();if(i.decorators&&i.decorators.length>0&&!m.getParentExportDeclaration(e)){e.each(function(e){r.push(t(e),"\n")},"decorators")}else if(m.isExportDeclaration(i)&&i.declaration&&i.declaration.decorators){e.each(function(e){r.push(t(e),"\n")},"declaration","decorators")}return u.concat(r)}function printStatementSequence(e,t,r){var i=[];var n=false;var s=false;e.each(function(e){var t=e.getValue();if(!t){return}if(t.type==="EmptyStatement"&&!(t.comments&&t.comments.length>0)){return}if(h.Comment.check(t)){n=true}else if(h.Statement.check(t)){s=true}else{f.assert(t)}i.push({node:t,printed:r(e)})});if(n){a.default.strictEqual(s,false,"Comments may appear as statements in otherwise empty statement "+"lists, but may not coexist with non-Comment nodes.")}var l=null;var o=i.length;var c=[];i.forEach(function(e,r){var i=e.printed;var n=e.node;var a=i.length>1;var s=r>0;var u=rr.length){return i}return r}function printMethod(e,t,r){var i=e.getNode();var n=i.kind;var a=[];var s=i.value;if(!h.FunctionExpression.check(s)){s=i}var l=i.accessibility||i.access;if(typeof l==="string"){a.push(l," ")}if(i.static){a.push("static ")}if(i.abstract){a.push("abstract ")}if(i.readonly){a.push("readonly ")}if(s.async){a.push("async ")}if(s.generator){a.push("*")}if(n==="get"||n==="set"){a.push(n," ")}var o=e.call(r,"key");if(i.computed){o=u.concat(["[",o,"]"])}a.push(o);if(i.optional){a.push("?")}if(i===s){a.push(e.call(r,"typeParameters"),"(",printFunctionParams(e,t,r),")",e.call(r,"returnType"));if(i.body){a.push(" ",e.call(r,"body"))}else{a.push(";")}}else{a.push(e.call(r,"value","typeParameters"),"(",e.call(function(e){return printFunctionParams(e,t,r)},"value"),")",e.call(r,"value","returnType"));if(s.body){a.push(" ",e.call(r,"value","body"))}else{a.push(";")}}return u.concat(a)}function printArgumentsList(e,t,r){var i=e.map(r,"arguments");var n=m.isTrailingCommaEnabled(t,"parameters");var a=u.fromString(", ").join(i);if(a.getLineLength(1)>t.wrapColumn){a=u.fromString(",\n").join(i);return u.concat(["(\n",a.indent(t.tabWidth),n?",\n)":"\n)"])}return u.concat(["(",a,")"])}function printFunctionParams(e,t,r){var i=e.getValue();if(i.params){var n=i.params;var a=e.map(r,"params")}else if(i.parameters){n=i.parameters;a=e.map(r,"parameters")}if(i.defaults){e.each(function(e){var t=e.getName();var i=a[t];if(i&&e.getValue()){a[t]=u.concat([i," = ",r(e)])}},"defaults")}if(i.rest){a.push(u.concat(["...",e.call(r,"rest")]))}var s=u.fromString(", ").join(a);if(s.length>1||s.getLineLength(1)>t.wrapColumn){s=u.fromString(",\n").join(a);if(m.isTrailingCommaEnabled(t,"parameters")&&!i.rest&&n[n.length-1].type!=="RestElement"){s=u.concat([s,",\n"])}else{s=u.concat([s,"\n"])}return u.concat(["\n",s.indent(t.tabWidth)])}return s}function printExportDeclaration(e,t,r){var i=e.getValue();var n=["export "];if(i.exportKind&&i.exportKind!=="value"){n.push(i.exportKind+" ")}var a=t.objectCurlySpacing;h.Declaration.assert(i);if(i["default"]||i.type==="ExportDefaultDeclaration"){n.push("default ")}if(i.declaration){n.push(e.call(r,"declaration"))}else if(i.specifiers){if(i.specifiers.length===1&&i.specifiers[0].type==="ExportBatchSpecifier"){n.push("*")}else if(i.specifiers.length===0){n.push("{}")}else if(i.specifiers[0].type==="ExportDefaultSpecifier"){var s=[];var l=[];e.each(function(e){var t=e.getValue();if(t.type==="ExportDefaultSpecifier"){s.push(r(e))}else{l.push(r(e))}},"specifiers");s.forEach(function(e,t){if(t>0){n.push(", ")}n.push(e)});if(l.length>0){var o=u.fromString(", ").join(l);if(o.getLineLength(1)>t.wrapColumn){o=u.concat([u.fromString(",\n").join(l).indent(t.tabWidth),","])}if(s.length>0){n.push(", ")}if(o.length>1){n.push("{\n",o,"\n}")}else if(t.objectCurlySpacing){n.push("{ ",o," }")}else{n.push("{",o,"}")}}}else{n.push(a?"{ ":"{",u.fromString(", ").join(e.map(r,"specifiers")),a?" }":"}")}if(i.source){n.push(" from ",e.call(r,"source"))}}var c=u.concat(n);if(lastNonSpaceCharacter(c)!==";"&&!(i.declaration&&(i.declaration.type==="FunctionDeclaration"||i.declaration.type==="ClassDeclaration"||i.declaration.type==="TSModuleDeclaration"||i.declaration.type==="TSInterfaceDeclaration"||i.declaration.type==="TSEnumDeclaration"))){c=u.concat([c,";"])}return c}function printFlowDeclaration(e,t){var r=m.getParentExportDeclaration(e);if(r){a.default.strictEqual(r.type,"DeclareExportDeclaration")}else{t.unshift("declare ")}return u.concat(t)}function printVariance(e,t){return e.call(function(e){var r=e.getValue();if(r){if(r==="plus"){return u.fromString("+")}if(r==="minus"){return u.fromString("-")}return t(e)}return u.fromString("")},"variance")}function adjustClause(e,t){if(e.length>1)return u.concat([" ",e]);return u.concat(["\n",maybeAddSemicolon(e).indent(t.tabWidth)])}function lastNonSpaceCharacter(e){var t=e.lastPos();do{var r=e.charAt(t);if(/\S/.test(r))return r}while(e.prevPos(t))}function endsWithBrace(e){return lastNonSpaceCharacter(e)==="}"}function swapQuotes(e){return e.replace(/['"]/g,function(e){return e==='"'?"'":'"'})}function nodeStr(e,t){f.assert(e);switch(t.quote){case"auto":var r=JSON.stringify(e);var i=swapQuotes(JSON.stringify(swapQuotes(e)));return r.length>i.length?i:r;case"single":return swapQuotes(JSON.stringify(swapQuotes(e)));case"double":default:return JSON.stringify(e)}}function maybeAddSemicolon(e){var t=lastNonSpaceCharacter(e);if(!t||"\n};".indexOf(t)<0)return u.concat([e,";"]);return e}},721:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});var a=i(r(357));var s=n(r(593));var u=s.namedTypes;var l=i(r(241));var o=l.default.SourceMapConsumer;var c=l.default.SourceMapGenerator;var h=Object.prototype.hasOwnProperty;function getOption(e,t,r){if(e&&h.call(e,t)){return e[t]}return r}t.getOption=getOption;function getUnionOfKeys(){var e=[];for(var t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(721);function parse(e,t){var n=[];var a=r(609).parse(e,{loc:true,locations:true,comment:true,onComment:n,range:i.getOption(t,"range",false),tolerant:i.getOption(t,"tolerant",true),tokens:true});if(!Array.isArray(a.comments)){a.comments=n}return a}t.parse=parse},357:e=>{"use strict";e.exports=require("assert")},747:e=>{"use strict";e.exports=require("fs")},241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},87:e=>{"use strict";e.exports=require("os")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var i=t[r]={exports:{}};var n=true;try{e[r].call(i.exports,i,i.exports,__webpack_require__);n=false}finally{if(n)delete t[r]}return i.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(313)})(); \ No newline at end of file +module.exports=(()=>{var e={781:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(574));var s=i(r(8));function default_1(e){e.use(s.default);var t=e.use(n.default);var r=e.use(a.default).defaults;var i=t.Type.def;var u=t.Type.or;i("Noop").bases("Statement").build();i("DoExpression").bases("Expression").build("body").field("body",[i("Statement")]);i("Super").bases("Expression").build();i("BindExpression").bases("Expression").build("object","callee").field("object",u(i("Expression"),null)).field("callee",i("Expression"));i("Decorator").bases("Node").build("expression").field("expression",i("Expression"));i("Property").field("decorators",u([i("Decorator")],null),r["null"]);i("MethodDefinition").field("decorators",u([i("Decorator")],null),r["null"]);i("MetaProperty").bases("Expression").build("meta","property").field("meta",i("Identifier")).field("property",i("Identifier"));i("ParenthesizedExpression").bases("Expression").build("expression").field("expression",i("Expression"));i("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",i("Identifier"));i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local");i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local");i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",u(i("Declaration"),i("Expression")));i("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",u(i("Declaration"),null)).field("specifiers",[i("ExportSpecifier")],r.emptyArray).field("source",u(i("Literal"),null),r["null"]);i("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",i("Identifier"));i("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier"));i("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier"));i("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",u(i("Identifier"),null)).field("source",i("Literal"));i("CommentBlock").bases("Comment").build("value","leading","trailing");i("CommentLine").bases("Comment").build("value","leading","trailing");i("Directive").bases("Node").build("value").field("value",i("DirectiveLiteral"));i("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,r["use strict"]);i("InterpreterDirective").bases("Node").build("value").field("value",String);i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],r.emptyArray);i("Program").bases("Node").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],r.emptyArray).field("interpreter",u(i("InterpreterDirective"),null),r["null"]);i("StringLiteral").bases("Literal").build("value").field("value",String);i("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",u(String,null),r["null"]).field("extra",{rawValue:Number,raw:String},function getDefault(){return{rawValue:this.value,raw:this.value+""}});i("BigIntLiteral").bases("Literal").build("value").field("value",u(String,Number)).field("extra",{rawValue:String,raw:String},function getDefault(){return{rawValue:String(this.value),raw:this.value+"n"}});i("NullLiteral").bases("Literal").build().field("value",null,r["null"]);i("BooleanLiteral").bases("Literal").build("value").field("value",Boolean);i("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)});var l=u(i("Property"),i("ObjectMethod"),i("ObjectProperty"),i("SpreadProperty"),i("SpreadElement"));i("ObjectExpression").bases("Expression").build("properties").field("properties",[l]);i("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",u("method","get","set")).field("key",u(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,r["false"]).field("generator",Boolean,r["false"]).field("async",Boolean,r["false"]).field("accessibility",u(i("Literal"),null),r["null"]).field("decorators",u([i("Decorator")],null),r["null"]);i("ObjectProperty").bases("Node").build("key","value").field("key",u(i("Literal"),i("Identifier"),i("Expression"))).field("value",u(i("Expression"),i("Pattern"))).field("accessibility",u(i("Literal"),null),r["null"]).field("computed",Boolean,r["false"]);var o=u(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassPrivateProperty"),i("ClassMethod"),i("ClassPrivateMethod"));i("ClassBody").bases("Declaration").build("body").field("body",[o]);i("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",u(i("Literal"),i("Identifier"),i("Expression")));i("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",i("PrivateName"));["ClassMethod","ClassPrivateMethod"].forEach(function(e){i(e).field("kind",u("get","set","method","constructor"),function(){return"method"}).field("body",i("BlockStatement")).field("computed",Boolean,r["false"]).field("static",u(Boolean,null),r["null"]).field("abstract",u(Boolean,null),r["null"]).field("access",u("public","private","protected",null),r["null"]).field("accessibility",u("public","private","protected",null),r["null"]).field("decorators",u([i("Decorator")],null),r["null"]).field("optional",u(Boolean,null),r["null"])});i("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",i("PrivateName")).field("value",u(i("Expression"),null),r["null"]);i("PrivateName").bases("Expression","Pattern").build("id").field("id",i("Identifier"));var c=u(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"),i("ObjectProperty"),i("RestProperty"));i("ObjectPattern").bases("Pattern").build("properties").field("properties",[c]).field("decorators",u([i("Decorator")],null),r["null"]);i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression"));i("RestProperty").bases("Node").build("argument").field("argument",i("Expression"));i("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",u(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement"));i("Import").bases("Expression").build()}t.default=default_1;e.exports=t["default"]},716:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(781));var a=i(r(544));function default_1(e){e.use(n.default);e.use(a.default)}t.default=default_1;e.exports=t["default"]},201:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(574));function default_1(e){var t=e.use(n.default);var r=t.Type;var i=r.def;var s=r.or;var u=e.use(a.default);var l=u.defaults;var o=u.geq;i("Printable").field("loc",s(i("SourceLocation"),null),l["null"],true);i("Node").bases("Printable").field("type",String).field("comments",s([i("Comment")],null),l["null"],true);i("SourceLocation").field("start",i("Position")).field("end",i("Position")).field("source",s(String,null),l["null"]);i("Position").field("line",o(1)).field("column",o(0));i("File").bases("Node").build("program","name").field("program",i("Program")).field("name",s(String,null),l["null"]);i("Program").bases("Node").build("body").field("body",[i("Statement")]);i("Function").bases("Node").field("id",s(i("Identifier"),null),l["null"]).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("generator",Boolean,l["false"]).field("async",Boolean,l["false"]);i("Statement").bases("Node");i("EmptyStatement").bases("Statement").build();i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]);i("ExpressionStatement").bases("Statement").build("expression").field("expression",i("Expression"));i("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",i("Expression")).field("consequent",i("Statement")).field("alternate",s(i("Statement"),null),l["null"]);i("LabeledStatement").bases("Statement").build("label","body").field("label",i("Identifier")).field("body",i("Statement"));i("BreakStatement").bases("Statement").build("label").field("label",s(i("Identifier"),null),l["null"]);i("ContinueStatement").bases("Statement").build("label").field("label",s(i("Identifier"),null),l["null"]);i("WithStatement").bases("Statement").build("object","body").field("object",i("Expression")).field("body",i("Statement"));i("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",i("Expression")).field("cases",[i("SwitchCase")]).field("lexical",Boolean,l["false"]);i("ReturnStatement").bases("Statement").build("argument").field("argument",s(i("Expression"),null));i("ThrowStatement").bases("Statement").build("argument").field("argument",i("Expression"));i("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",i("BlockStatement")).field("handler",s(i("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[i("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[i("CatchClause")],l.emptyArray).field("finalizer",s(i("BlockStatement"),null),l["null"]);i("CatchClause").bases("Node").build("param","guard","body").field("param",s(i("Pattern"),null),l["null"]).field("guard",s(i("Expression"),null),l["null"]).field("body",i("BlockStatement"));i("WhileStatement").bases("Statement").build("test","body").field("test",i("Expression")).field("body",i("Statement"));i("DoWhileStatement").bases("Statement").build("body","test").field("body",i("Statement")).field("test",i("Expression"));i("ForStatement").bases("Statement").build("init","test","update","body").field("init",s(i("VariableDeclaration"),i("Expression"),null)).field("test",s(i("Expression"),null)).field("update",s(i("Expression"),null)).field("body",i("Statement"));i("ForInStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement"));i("DebuggerStatement").bases("Statement").build();i("Declaration").bases("Statement");i("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",i("Identifier"));i("FunctionExpression").bases("Function","Expression").build("id","params","body");i("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",s("var","let","const")).field("declarations",[i("VariableDeclarator")]);i("VariableDeclarator").bases("Node").build("id","init").field("id",i("Pattern")).field("init",s(i("Expression"),null),l["null"]);i("Expression").bases("Node");i("ThisExpression").bases("Expression").build();i("ArrayExpression").bases("Expression").build("elements").field("elements",[s(i("Expression"),null)]);i("ObjectExpression").bases("Expression").build("properties").field("properties",[i("Property")]);i("Property").bases("Node").build("kind","key","value").field("kind",s("init","get","set")).field("key",s(i("Literal"),i("Identifier"))).field("value",i("Expression"));i("SequenceExpression").bases("Expression").build("expressions").field("expressions",[i("Expression")]);var c=s("-","+","!","~","typeof","void","delete");i("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",c).field("argument",i("Expression")).field("prefix",Boolean,l["true"]);var h=s("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","**","&","|","^","in","instanceof");i("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",i("Expression")).field("right",i("Expression"));var f=s("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");i("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",s(i("Pattern"),i("MemberExpression"))).field("right",i("Expression"));var p=s("++","--");i("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",i("Expression")).field("prefix",Boolean);var d=s("||","&&");i("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",i("Expression")).field("right",i("Expression"));i("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",i("Expression")).field("consequent",i("Expression")).field("alternate",i("Expression"));i("NewExpression").bases("Expression").build("callee","arguments").field("callee",i("Expression")).field("arguments",[i("Expression")]);i("CallExpression").bases("Expression").build("callee","arguments").field("callee",i("Expression")).field("arguments",[i("Expression")]);i("MemberExpression").bases("Expression").build("object","property","computed").field("object",i("Expression")).field("property",s(i("Identifier"),i("Expression"))).field("computed",Boolean,function(){var e=this.property.type;if(e==="Literal"||e==="MemberExpression"||e==="BinaryExpression"){return true}return false});i("Pattern").bases("Node");i("SwitchCase").bases("Node").build("test","consequent").field("test",s(i("Expression"),null)).field("consequent",[i("Statement")]);i("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,l["false"]);i("Literal").bases("Expression").build("value").field("value",s(String,Boolean,null,Number,RegExp)).field("regex",s({pattern:String,flags:String},null),function(){if(this.value instanceof RegExp){var e="";if(this.value.ignoreCase)e+="i";if(this.value.multiline)e+="m";if(this.value.global)e+="g";return{pattern:this.value.source,flags:e}}return null});i("Comment").bases("Printable").field("value",String).field("leading",Boolean,l["true"]).field("trailing",Boolean,l["false"])}t.default=default_1;e.exports=t["default"]},735:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(574));var s=i(r(201));function default_1(e){e.use(s.default);var t=e.use(n.default);var r=t.Type;var i=t.Type.def;var u=r.or;var l=e.use(a.default);var o=l.defaults;i("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,o["true"]);i("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,o["true"]);var c=u("||","&&","??");i("LogicalExpression").field("operator",c)}t.default=default_1;e.exports=t["default"]},933:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(201));var a=i(r(361));var s=i(r(574));function default_1(e){e.use(n.default);var t=e.use(a.default);var r=t.Type.def;var i=t.Type.or;var u=e.use(s.default).defaults;r("Function").field("generator",Boolean,u["false"]).field("expression",Boolean,u["false"]).field("defaults",[i(r("Expression"),null)],u.emptyArray).field("rest",i(r("Identifier"),null),u["null"]);r("RestElement").bases("Pattern").build("argument").field("argument",r("Pattern")).field("typeAnnotation",i(r("TypeAnnotation"),r("TSTypeAnnotation"),null),u["null"]);r("SpreadElementPattern").bases("Pattern").build("argument").field("argument",r("Pattern"));r("FunctionDeclaration").build("id","params","body","generator","expression");r("FunctionExpression").build("id","params","body","generator","expression");r("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,u["null"]).field("body",i(r("BlockStatement"),r("Expression"))).field("generator",false,u["false"]);r("ForOfStatement").bases("Statement").build("left","right","body").field("left",i(r("VariableDeclaration"),r("Pattern"))).field("right",r("Expression")).field("body",r("Statement"));r("YieldExpression").bases("Expression").build("argument","delegate").field("argument",i(r("Expression"),null)).field("delegate",Boolean,u["false"]);r("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",i(r("Expression"),null));r("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",i(r("Expression"),null));r("ComprehensionBlock").bases("Node").build("left","right","each").field("left",r("Pattern")).field("right",r("Expression")).field("each",Boolean);r("Property").field("key",i(r("Literal"),r("Identifier"),r("Expression"))).field("value",i(r("Expression"),r("Pattern"))).field("method",Boolean,u["false"]).field("shorthand",Boolean,u["false"]).field("computed",Boolean,u["false"]);r("ObjectProperty").field("shorthand",Boolean,u["false"]);r("PropertyPattern").bases("Pattern").build("key","pattern").field("key",i(r("Literal"),r("Identifier"),r("Expression"))).field("pattern",r("Pattern")).field("computed",Boolean,u["false"]);r("ObjectPattern").bases("Pattern").build("properties").field("properties",[i(r("PropertyPattern"),r("Property"))]);r("ArrayPattern").bases("Pattern").build("elements").field("elements",[i(r("Pattern"),null)]);r("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",i("constructor","method","get","set")).field("key",r("Expression")).field("value",r("Function")).field("computed",Boolean,u["false"]).field("static",Boolean,u["false"]);r("SpreadElement").bases("Node").build("argument").field("argument",r("Expression"));r("ArrayExpression").field("elements",[i(r("Expression"),r("SpreadElement"),r("RestElement"),null)]);r("NewExpression").field("arguments",[i(r("Expression"),r("SpreadElement"))]);r("CallExpression").field("arguments",[i(r("Expression"),r("SpreadElement"))]);r("AssignmentPattern").bases("Pattern").build("left","right").field("left",r("Pattern")).field("right",r("Expression"));var l=i(r("MethodDefinition"),r("VariableDeclarator"),r("ClassPropertyDefinition"),r("ClassProperty"));r("ClassProperty").bases("Declaration").build("key").field("key",i(r("Literal"),r("Identifier"),r("Expression"))).field("computed",Boolean,u["false"]);r("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",l);r("ClassBody").bases("Declaration").build("body").field("body",[l]);r("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",i(r("Identifier"),null)).field("body",r("ClassBody")).field("superClass",i(r("Expression"),null),u["null"]);r("ClassExpression").bases("Expression").build("id","body","superClass").field("id",i(r("Identifier"),null),u["null"]).field("body",r("ClassBody")).field("superClass",i(r("Expression"),null),u["null"]);r("Specifier").bases("Node");r("ModuleSpecifier").bases("Specifier").field("local",i(r("Identifier"),null),u["null"]).field("id",i(r("Identifier"),null),u["null"]).field("name",i(r("Identifier"),null),u["null"]);r("ImportSpecifier").bases("ModuleSpecifier").build("id","name");r("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id");r("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id");r("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[i(r("ImportSpecifier"),r("ImportNamespaceSpecifier"),r("ImportDefaultSpecifier"))],u.emptyArray).field("source",r("Literal")).field("importKind",i("value","type"),function(){return"value"});r("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",r("Expression")).field("quasi",r("TemplateLiteral"));r("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[r("TemplateElement")]).field("expressions",[r("Expression")]);r("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)}t.default=default_1;e.exports=t["default"]},8:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(933));var a=i(r(361));var s=i(r(574));function default_1(e){e.use(n.default);var t=e.use(a.default);var r=t.Type.def;var i=t.Type.or;var u=e.use(s.default).defaults;r("Function").field("async",Boolean,u["false"]);r("SpreadProperty").bases("Node").build("argument").field("argument",r("Expression"));r("ObjectExpression").field("properties",[i(r("Property"),r("SpreadProperty"),r("SpreadElement"))]);r("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",r("Pattern"));r("ObjectPattern").field("properties",[i(r("Property"),r("PropertyPattern"),r("SpreadPropertyPattern"))]);r("AwaitExpression").bases("Expression").build("argument","all").field("argument",i(r("Expression"),null)).field("all",Boolean,u["false"])}t.default=default_1;e.exports=t["default"]},188:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(8));var a=i(r(361));var s=i(r(574));function default_1(e){e.use(n.default);var t=e.use(a.default);var r=e.use(s.default).defaults;var i=t.Type.def;var u=t.Type.or;i("VariableDeclaration").field("declarations",[u(i("VariableDeclarator"),i("Identifier"))]);i("Property").field("value",u(i("Expression"),i("Pattern")));i("ArrayPattern").field("elements",[u(i("Pattern"),i("SpreadElement"),null)]);i("ObjectPattern").field("properties",[u(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"))]);i("ExportSpecifier").bases("ModuleSpecifier").build("id","name");i("ExportBatchSpecifier").bases("Specifier").build();i("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",u(i("Declaration"),i("Expression"),null)).field("specifiers",[u(i("ExportSpecifier"),i("ExportBatchSpecifier"))],r.emptyArray).field("source",u(i("Literal"),null),r["null"]);i("Block").bases("Comment").build("value","leading","trailing");i("Line").bases("Comment").build("value","leading","trailing")}t.default=default_1;e.exports=t["default"]},544:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(8));var a=i(r(61));var s=i(r(361));var u=i(r(574));function default_1(e){e.use(n.default);e.use(a.default);var t=e.use(s.default);var r=t.Type.def;var i=t.Type.or;var l=e.use(u.default).defaults;r("Flow").bases("Node");r("FlowType").bases("Flow");r("AnyTypeAnnotation").bases("FlowType").build();r("EmptyTypeAnnotation").bases("FlowType").build();r("MixedTypeAnnotation").bases("FlowType").build();r("VoidTypeAnnotation").bases("FlowType").build();r("NumberTypeAnnotation").bases("FlowType").build();r("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String);r("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String);r("StringTypeAnnotation").bases("FlowType").build();r("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String);r("BooleanTypeAnnotation").bases("FlowType").build();r("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String);r("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",r("FlowType"));r("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",r("FlowType"));r("NullLiteralTypeAnnotation").bases("FlowType").build();r("NullTypeAnnotation").bases("FlowType").build();r("ThisTypeAnnotation").bases("FlowType").build();r("ExistsTypeAnnotation").bases("FlowType").build();r("ExistentialTypeParam").bases("FlowType").build();r("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[r("FunctionTypeParam")]).field("returnType",r("FlowType")).field("rest",i(r("FunctionTypeParam"),null)).field("typeParameters",i(r("TypeParameterDeclaration"),null));r("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",r("Identifier")).field("typeAnnotation",r("FlowType")).field("optional",Boolean);r("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",r("FlowType"));r("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[i(r("ObjectTypeProperty"),r("ObjectTypeSpreadProperty"))]).field("indexers",[r("ObjectTypeIndexer")],l.emptyArray).field("callProperties",[r("ObjectTypeCallProperty")],l.emptyArray).field("inexact",i(Boolean,void 0),l["undefined"]).field("exact",Boolean,l["false"]).field("internalSlots",[r("ObjectTypeInternalSlot")],l.emptyArray);r("Variance").bases("Node").build("kind").field("kind",i("plus","minus"));var o=i(r("Variance"),"plus","minus",null);r("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",i(r("Literal"),r("Identifier"))).field("value",r("FlowType")).field("optional",Boolean).field("variance",o,l["null"]);r("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",r("Identifier")).field("key",r("FlowType")).field("value",r("FlowType")).field("variance",o,l["null"]);r("ObjectTypeCallProperty").bases("Node").build("value").field("value",r("FunctionTypeAnnotation")).field("static",Boolean,l["false"]);r("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",i(r("Identifier"),r("QualifiedTypeIdentifier"))).field("id",r("Identifier"));r("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",i(r("Identifier"),r("QualifiedTypeIdentifier"))).field("typeParameters",i(r("TypeParameterInstantiation"),null));r("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",r("Identifier")).field("property",i(r("MemberTypeAnnotation"),r("GenericTypeAnnotation")));r("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]);r("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]);r("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",r("FlowType"));r("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",r("FlowType"));r("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",r("Identifier")).field("value",r("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean);r("TypeParameterDeclaration").bases("Node").build("params").field("params",[r("TypeParameter")]);r("TypeParameterInstantiation").bases("Node").build("params").field("params",[r("FlowType")]);r("TypeParameter").bases("FlowType").build("name","variance","bound").field("name",String).field("variance",o,l["null"]).field("bound",i(r("TypeAnnotation"),null),l["null"]);r("ClassProperty").field("variance",o,l["null"]);r("ClassImplements").bases("Node").build("id").field("id",r("Identifier")).field("superClass",i(r("Expression"),null),l["null"]).field("typeParameters",i(r("TypeParameterInstantiation"),null),l["null"]);r("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",r("ObjectTypeAnnotation")).field("extends",i([r("InterfaceExtends")],null),l["null"]);r("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",r("Identifier")).field("typeParameters",i(r("TypeParameterDeclaration"),null),l["null"]).field("body",r("ObjectTypeAnnotation")).field("extends",[r("InterfaceExtends")]);r("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends");r("InterfaceExtends").bases("Node").build("id").field("id",r("Identifier")).field("typeParameters",i(r("TypeParameterInstantiation"),null),l["null"]);r("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",r("Identifier")).field("typeParameters",i(r("TypeParameterDeclaration"),null)).field("right",r("FlowType"));r("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",r("Identifier")).field("typeParameters",i(r("TypeParameterDeclaration"),null)).field("impltype",r("FlowType")).field("supertype",r("FlowType"));r("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right");r("DeclareOpaqueType").bases("TypeAlias").build("id","typeParameters","supertype");r("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",r("Expression")).field("typeAnnotation",r("TypeAnnotation"));r("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]);r("DeclareVariable").bases("Statement").build("id").field("id",r("Identifier"));r("DeclareFunction").bases("Statement").build("id").field("id",r("Identifier"));r("DeclareClass").bases("InterfaceDeclaration").build("id");r("DeclareModule").bases("Statement").build("id","body").field("id",i(r("Identifier"),r("Literal"))).field("body",r("BlockStatement"));r("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",r("TypeAnnotation"));r("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(r("DeclareVariable"),r("DeclareFunction"),r("DeclareClass"),r("FlowType"),null)).field("specifiers",[i(r("ExportSpecifier"),r("ExportBatchSpecifier"))],l.emptyArray).field("source",i(r("Literal"),null),l["null"]);r("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",i(r("Literal"),null),l["null"]);r("FlowPredicate").bases("Flow");r("InferredPredicate").bases("FlowPredicate").build();r("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",r("Expression"));r("CallExpression").field("typeArguments",i(null,r("TypeParameterInstantiation")),l["null"]);r("NewExpression").field("typeArguments",i(null,r("TypeParameterInstantiation")),l["null"])}t.default=default_1;e.exports=t["default"]},894:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(8));var a=i(r(361));var s=i(r(574));function default_1(e){e.use(n.default);var t=e.use(a.default);var r=t.Type.def;var i=t.Type.or;var u=e.use(s.default).defaults;r("JSXAttribute").bases("Node").build("name","value").field("name",i(r("JSXIdentifier"),r("JSXNamespacedName"))).field("value",i(r("Literal"),r("JSXExpressionContainer"),null),u["null"]);r("JSXIdentifier").bases("Identifier").build("name").field("name",String);r("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",r("JSXIdentifier")).field("name",r("JSXIdentifier"));r("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",i(r("JSXIdentifier"),r("JSXMemberExpression"))).field("property",r("JSXIdentifier")).field("computed",Boolean,u.false);var l=i(r("JSXIdentifier"),r("JSXNamespacedName"),r("JSXMemberExpression"));r("JSXSpreadAttribute").bases("Node").build("argument").field("argument",r("Expression"));var o=[i(r("JSXAttribute"),r("JSXSpreadAttribute"))];r("JSXExpressionContainer").bases("Expression").build("expression").field("expression",r("Expression"));r("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",r("JSXOpeningElement")).field("closingElement",i(r("JSXClosingElement"),null),u["null"]).field("children",[i(r("JSXElement"),r("JSXExpressionContainer"),r("JSXFragment"),r("JSXText"),r("Literal"))],u.emptyArray).field("name",l,function(){return this.openingElement.name},true).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},true).field("attributes",o,function(){return this.openingElement.attributes},true);r("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",l).field("attributes",o,u.emptyArray).field("selfClosing",Boolean,u["false"]);r("JSXClosingElement").bases("Node").build("name").field("name",l);r("JSXFragment").bases("Expression").build("openingElement","closingElement","children").field("openingElement",r("JSXOpeningFragment")).field("closingElement",r("JSXClosingFragment")).field("children",[i(r("JSXElement"),r("JSXExpressionContainer"),r("JSXFragment"),r("JSXText"),r("Literal"))],u.emptyArray);r("JSXOpeningFragment").bases("Node").build();r("JSXClosingFragment").bases("Node").build();r("JSXText").bases("Literal").build("value").field("value",String);r("JSXEmptyExpression").bases("Expression").build();r("JSXSpreadChild").bases("Expression").build("expression").field("expression",r("Expression"))}t.default=default_1;e.exports=t["default"]},61:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(574));function default_1(e){var t=e.use(n.default);var r=t.Type.def;var i=t.Type.or;var s=e.use(a.default).defaults;var u=i(r("TypeAnnotation"),r("TSTypeAnnotation"),null);var l=i(r("TypeParameterDeclaration"),r("TSTypeParameterDeclaration"),null);r("Identifier").field("typeAnnotation",u,s["null"]);r("ObjectPattern").field("typeAnnotation",u,s["null"]);r("Function").field("returnType",u,s["null"]).field("typeParameters",l,s["null"]);r("ClassProperty").build("key","value","typeAnnotation","static").field("value",i(r("Expression"),null)).field("static",Boolean,s["false"]).field("typeAnnotation",u,s["null"]);["ClassDeclaration","ClassExpression"].forEach(function(e){r(e).field("typeParameters",l,s["null"]).field("superTypeParameters",i(r("TypeParameterInstantiation"),r("TSTypeParameterInstantiation"),null),s["null"]).field("implements",i([r("ClassImplements")],[r("TSExpressionWithTypeArguments")]),s.emptyArray)})}t.default=default_1;e.exports=t["default"]},284:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(781));var a=i(r(61));var s=i(r(361));var u=i(r(574));function default_1(e){e.use(n.default);e.use(a.default);var t=e.use(s.default);var r=t.namedTypes;var i=t.Type.def;var l=t.Type.or;var o=e.use(u.default).defaults;var c=t.Type.from(function(e,t){if(r.StringLiteral&&r.StringLiteral.check(e,t)){return true}if(r.Literal&&r.Literal.check(e,t)&&typeof e.value==="string"){return true}return false},"StringLiteral");i("TSType").bases("Node");var h=l(i("Identifier"),i("TSQualifiedName"));i("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",h);i("TSHasOptionalTypeParameterInstantiation").field("typeParameters",l(i("TSTypeParameterInstantiation"),null),o["null"]);i("TSHasOptionalTypeParameters").field("typeParameters",l(i("TSTypeParameterDeclaration"),null,void 0),o["null"]);i("TSHasOptionalTypeAnnotation").field("typeAnnotation",l(i("TSTypeAnnotation"),null),o["null"]);i("TSQualifiedName").bases("Node").build("left","right").field("left",h).field("right",h);i("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",i("Expression")).field("typeAnnotation",i("TSType")).field("extra",l({parenthesized:Boolean},null),o["null"]);i("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",i("Expression"));["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSThisType"].forEach(function(e){i(e).bases("TSType").build()});i("TSArrayType").bases("TSType").build("elementType").field("elementType",i("TSType"));i("TSLiteralType").bases("TSType").build("literal").field("literal",l(i("NumericLiteral"),i("StringLiteral"),i("BooleanLiteral"),i("TemplateLiteral"),i("UnaryExpression")));["TSUnionType","TSIntersectionType"].forEach(function(e){i(e).bases("TSType").build("types").field("types",[i("TSType")])});i("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",i("TSType")).field("extendsType",i("TSType")).field("trueType",i("TSType")).field("falseType",i("TSType"));i("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",i("TSTypeParameter"));i("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",i("TSType"));var f=[l(i("Identifier"),i("RestElement"),i("ArrayPattern"),i("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(function(e){i(e).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",f)});i("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,o["false"]).field("async",Boolean,o["false"]).field("generator",Boolean,o["false"]).field("id",l(i("Identifier"),null),o["null"]).field("params",[i("Pattern")]).field("returnType",l(i("TSTypeAnnotation"),i("Noop"),null),o["null"]);i("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,o["false"]).field("generator",Boolean,o["false"]).field("params",[i("Pattern")]).field("abstract",Boolean,o["false"]).field("accessibility",l("public","private","protected",void 0),o["undefined"]).field("static",Boolean,o["false"]).field("computed",Boolean,o["false"]).field("optional",Boolean,o["false"]).field("key",l(i("Identifier"),i("StringLiteral"),i("NumericLiteral"),i("Expression"))).field("kind",l("get","set","method","constructor"),function getDefault(){return"method"}).field("access",l("public","private","protected",void 0),o["undefined"]).field("decorators",l([i("Decorator")],null),o["null"]).field("returnType",l(i("TSTypeAnnotation"),i("Noop"),null),o["null"]);i("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",l(Boolean,"+","-"),o["false"]).field("typeParameter",i("TSTypeParameter")).field("optional",l(Boolean,"+","-"),o["false"]).field("typeAnnotation",l(i("TSType"),null),o["null"]);i("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[i("TSType")]);i("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",i("TSType"));i("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",i("TSType"));i("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",i("TSType")).field("indexType",i("TSType"));i("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",i("TSType"));i("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",l(i("TSType"),i("TSTypeAnnotation")));i("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[i("Identifier")]).field("readonly",Boolean,o["false"]);i("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",i("Expression")).field("computed",Boolean,o["false"]).field("readonly",Boolean,o["false"]).field("optional",Boolean,o["false"]).field("initializer",l(i("Expression"),null),o["null"]);i("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",i("Expression")).field("computed",Boolean,o["false"]).field("optional",Boolean,o["false"]).field("parameters",f);i("TSTypePredicate").bases("TSTypeAnnotation").build("parameterName","typeAnnotation").field("parameterName",l(i("Identifier"),i("TSThisType"))).field("typeAnnotation",i("TSTypeAnnotation"));["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(function(e){i(e).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",f)});i("TSEnumMember").bases("Node").build("id","initializer").field("id",l(i("Identifier"),c)).field("initializer",l(i("Expression"),null),o["null"]);i("TSTypeQuery").bases("TSType").build("exprName").field("exprName",l(h,i("TSImportType")));var p=l(i("TSCallSignatureDeclaration"),i("TSConstructSignatureDeclaration"),i("TSIndexSignature"),i("TSMethodSignature"),i("TSPropertySignature"));i("TSTypeLiteral").bases("TSType").build("members").field("members",[p]);i("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",String).field("constraint",l(i("TSType"),void 0),o["undefined"]).field("default",l(i("TSType"),void 0),o["undefined"]);i("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",i("TSType")).field("expression",i("Expression")).field("extra",l({parenthesized:Boolean},null),o["null"]);i("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[i("TSTypeParameter")]);i("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[i("TSType")]);i("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",i("Identifier")).field("const",Boolean,o["false"]).field("declare",Boolean,o["false"]).field("members",[i("TSEnumMember")]).field("initializer",l(i("Expression"),null),o["null"]);i("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",i("Identifier")).field("declare",Boolean,o["false"]).field("typeAnnotation",i("TSType"));i("TSModuleBlock").bases("Node").build("body").field("body",[i("Statement")]);i("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",l(c,h)).field("declare",Boolean,o["false"]).field("global",Boolean,o["false"]).field("body",l(i("TSModuleBlock"),i("TSModuleDeclaration"),null),o["null"]);i("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",c).field("qualifier",l(h,void 0),o["undefined"]);i("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",i("Identifier")).field("isExport",Boolean,o["false"]).field("moduleReference",l(h,i("TSExternalModuleReference")));i("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",c);i("TSExportAssignment").bases("Statement").build("expression").field("expression",i("Expression"));i("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",i("Identifier"));i("TSInterfaceBody").bases("Node").build("body").field("body",[p]);i("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",h);i("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",h).field("declare",Boolean,o["false"]).field("extends",l([i("TSExpressionWithTypeArguments")],null),o["null"]).field("body",i("TSInterfaceBody"));i("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",l("public","private","protected",void 0),o["undefined"]).field("readonly",Boolean,o["false"]).field("parameter",l(i("Identifier"),i("AssignmentPattern")));i("ClassProperty").field("access",l("public","private","protected",void 0),o["undefined"]);i("ClassBody").field("body",[l(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassPrivateProperty"),i("ClassMethod"),i("ClassPrivateMethod"),i("TSDeclareMethod"),p)])}t.default=default_1;e.exports=t["default"]},997:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(504));var s=i(r(500));var u=i(r(890));var l=i(r(724));function default_1(e){var t=createFork();var r=t.use(n.default);e.forEach(t.use);r.finalize();var i=t.use(a.default);return{Type:r.Type,builtInTypes:r.builtInTypes,namedTypes:r.namedTypes,builders:r.builders,defineMethod:r.defineMethod,getFieldNames:r.getFieldNames,getFieldValue:r.getFieldValue,eachField:r.eachField,someField:r.someField,getSupertypeNames:r.getSupertypeNames,getBuilderName:r.getBuilderName,astNodesAreEquivalent:t.use(s.default),finalize:r.finalize,Path:t.use(u.default),NodePath:t.use(l.default),PathVisitor:i,use:t.use,visit:i.visit}}t.default=default_1;function createFork(){var e=[];var t=[];function use(i){var n=e.indexOf(i);if(n===-1){n=e.length;e.push(i);t[n]=i(r)}return t[n]}var r={use:use};return r}e.exports=t["default"]},895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var r;(function(e){})(r=t.namedTypes||(t.namedTypes={}))},500:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));function default_1(e){var t=e.use(n.default);var r=t.getFieldNames;var i=t.getFieldValue;var a=t.builtInTypes.array;var s=t.builtInTypes.object;var u=t.builtInTypes.Date;var l=t.builtInTypes.RegExp;var o=Object.prototype.hasOwnProperty;function astNodesAreEquivalent(e,t,r){if(a.check(r)){r.length=0}else{r=null}return areEquivalent(e,t,r)}astNodesAreEquivalent.assert=function(e,t){var r=[];if(!astNodesAreEquivalent(e,t,r)){if(r.length===0){if(e!==t){throw new Error("Nodes must be equal")}}else{throw new Error("Nodes differ in the following path: "+r.map(subscriptForProperty).join(""))}}};function subscriptForProperty(e){if(/[_$a-z][_$a-z0-9]*/i.test(e)){return"."+e}return"["+JSON.stringify(e)+"]"}function areEquivalent(e,t,r){if(e===t){return true}if(a.check(e)){return arraysAreEquivalent(e,t,r)}if(s.check(e)){return objectsAreEquivalent(e,t,r)}if(u.check(e)){return u.check(t)&&+e===+t}if(l.check(e)){return l.check(t)&&(e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase)}return e==t}function arraysAreEquivalent(e,t,r){a.assert(e);var i=e.length;if(!a.check(t)||t.length!==i){if(r){r.push("length")}return false}for(var n=0;nc){return true}if(l===c&&this.name==="right"){if(n.right!==a){throw new Error("Nodes must be equal")}return true}}default:return false}case"SequenceExpression":switch(n.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(n.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return n.type==="MemberExpression"&&u.check(i.value)&&this.name==="object"&&n.object===i;case"AssignmentExpression":case"ConditionalExpression":switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&n.callee===i;case"ConditionalExpression":return this.name==="test"&&n.test===i;case"MemberExpression":return this.name==="object"&&n.object===i;default:return false}default:if(n.type==="NewExpression"&&this.name==="callee"&&n.callee===i){return containsCallExpression(i)}}if(e!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(e){return r.BinaryExpression.check(e)||r.LogicalExpression.check(e)}function isUnaryLike(e){return r.UnaryExpression.check(e)||r.SpreadElement&&r.SpreadElement.check(e)||r.SpreadProperty&&r.SpreadProperty.check(e)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){p[e]=t})});function containsCallExpression(e){if(r.CallExpression.check(e)){return true}if(l.check(e)){return e.some(containsCallExpression)}if(r.Node.check(e)){return t.someField(e,function(e,t){return containsCallExpression(t)})}return false}f.canBeFirstInStatement=function(){var e=this.node;return!r.FunctionExpression.check(e)&&!r.ObjectExpression.check(e)};f.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(e){for(var t,i;e.parent;e=e.parent){t=e.node;i=e.parent.node;if(r.BlockStatement.check(i)&&e.parent.name==="body"&&e.name===0){if(i.body[0]!==t){throw new Error("Nodes must be equal")}return true}if(r.ExpressionStatement.check(i)&&e.name==="expression"){if(i.expression!==t){throw new Error("Nodes must be equal")}return true}if(r.SequenceExpression.check(i)&&e.parent.name==="expressions"&&e.name===0){if(i.expressions[0]!==t){throw new Error("Nodes must be equal")}continue}if(r.CallExpression.check(i)&&e.name==="callee"){if(i.callee!==t){throw new Error("Nodes must be equal")}continue}if(r.MemberExpression.check(i)&&e.name==="object"){if(i.object!==t){throw new Error("Nodes must be equal")}continue}if(r.ConditionalExpression.check(i)&&e.name==="test"){if(i.test!==t){throw new Error("Nodes must be equal")}continue}if(isBinary(i)&&e.name==="left"){if(i.left!==t){throw new Error("Nodes must be equal")}continue}if(r.UnaryExpression.check(i)&&!i.prefix&&e.name==="argument"){if(i.argument!==t){throw new Error("Nodes must be equal")}continue}return false}return true}function cleanUpNodesAfterPrune(e){if(r.VariableDeclaration.check(e.node)){var t=e.get("declarations").value;if(!t||t.length===0){return e.prune()}}else if(r.ExpressionStatement.check(e.node)){if(!e.get("expression").value){return e.prune()}}else if(r.IfStatement.check(e.node)){cleanUpIfStatementAfterPrune(e)}return e}function cleanUpIfStatementAfterPrune(e){var t=e.get("test").value;var n=e.get("alternate").value;var a=e.get("consequent").value;if(!a&&!n){var s=i.expressionStatement(t);e.replace(s)}else if(!a&&n){var u=i.unaryExpression("!",t,true);if(r.UnaryExpression.check(t)&&t.operator==="!"){u=t.argument}e.get("test").replace(u);e.get("consequent").replace(n);e.get("alternate").replace()}}return h}t.default=nodePathPlugin;e.exports=t["default"]},504:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(361));var a=i(r(724));var s=Object.prototype.hasOwnProperty;function pathVisitorPlugin(e){var t=e.use(n.default);var r=e.use(a.default);var i=t.builtInTypes.array;var u=t.builtInTypes.object;var l=t.builtInTypes.function;var o;var c=function PathVisitor(){if(!(this instanceof PathVisitor)){throw new Error("PathVisitor constructor cannot be invoked without 'new'")}this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=s.call(this._methodNameTable,"Block")||s.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false};function computeMethodNameTable(e){var r=Object.create(null);for(var i in e){if(/^visit[A-Z]/.test(i)){r[i.slice("visit".length)]=true}}var n=t.computeSupertypeLookupTable(r);var a=Object.create(null);var s=Object.keys(n);var u=s.length;for(var o=0;o=0){n[e.name=s]=e}}else{i[e.name]=e.value;n[e.name]=e}if(i[e.name]!==e.value){throw new Error("")}if(e.parentPath.get(e.name)!==e){throw new Error("")}return e}u.replace=function replace(e){var t=[];var i=this.parentPath.value;var n=getChildCache(this.parentPath);var a=arguments.length;repairRelationshipWithParent(this);if(r.check(i)){var s=i.length;var u=getMoves(this.parentPath,a-1,this.name+1);var l=[this.name,1];for(var o=0;o=e},a+" >= "+e)}var s={null:function(){return null},emptyArray:function(){return[]},false:function(){return false},true:function(){return true},undefined:function(){},"use strict":function(){return"use strict"}};var u=r.or(i.string,i.number,i.boolean,i.null,i.undefined);var l=r.from(function(e){if(e===null)return true;var t=typeof e;if(t==="object"||t==="function"){return false}return true},u.toString());return{geq:geq,defaults:s,isPrimitive:l}}t.default=default_1;e.exports=t["default"]},361:function(e,t){"use strict";var r=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(t.hasOwnProperty(r))e[r]=t[r]};return e(t,r)};return function(t,r){e(t,r);function __(){this.constructor=t}t.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});var i=Object.prototype;var n=i.toString;var a=i.hasOwnProperty;var s=function(){function BaseType(){}BaseType.prototype.assert=function(e,t){if(!this.check(e,t)){var r=shallowStringify(e);throw new Error(r+" does not match type "+this)}return true};BaseType.prototype.arrayOf=function(){var e=this;return new u(e)};return BaseType}();var u=function(e){r(ArrayType,e);function ArrayType(t){var r=e.call(this)||this;r.elemType=t;r.kind="ArrayType";return r}ArrayType.prototype.toString=function(){return"["+this.elemType+"]"};ArrayType.prototype.check=function(e,t){var r=this;return Array.isArray(e)&&e.every(function(e){return r.elemType.check(e,t)})};return ArrayType}(s);var l=function(e){r(IdentityType,e);function IdentityType(t){var r=e.call(this)||this;r.value=t;r.kind="IdentityType";return r}IdentityType.prototype.toString=function(){return String(this.value)};IdentityType.prototype.check=function(e,t){var r=e===this.value;if(!r&&typeof t==="function"){t(this,e)}return r};return IdentityType}(s);var o=function(e){r(ObjectType,e);function ObjectType(t){var r=e.call(this)||this;r.fields=t;r.kind="ObjectType";return r}ObjectType.prototype.toString=function(){return"{ "+this.fields.join(", ")+" }"};ObjectType.prototype.check=function(e,t){return n.call(e)===n.call({})&&this.fields.every(function(r){return r.type.check(e[r.name],t)})};return ObjectType}(s);var c=function(e){r(OrType,e);function OrType(t){var r=e.call(this)||this;r.types=t;r.kind="OrType";return r}OrType.prototype.toString=function(){return this.types.join(" | ")};OrType.prototype.check=function(e,t){return this.types.some(function(r){return r.check(e,t)})};return OrType}(s);var h=function(e){r(PredicateType,e);function PredicateType(t,r){var i=e.call(this)||this;i.name=t;i.predicate=r;i.kind="PredicateType";return i}PredicateType.prototype.toString=function(){return this.name};PredicateType.prototype.check=function(e,t){var r=this.predicate(e,t);if(!r&&typeof t==="function"){t(this,e)}return r};return PredicateType}(s);var f=function(){function Def(e,t){this.type=e;this.typeName=t;this.baseNames=[];this.ownFields=Object.create(null);this.allSupertypes=Object.create(null);this.supertypeList=[];this.allFields=Object.create(null);this.fieldNames=[];this.finalized=false;this.buildable=false;this.buildParams=[]}Def.prototype.isSupertypeOf=function(e){if(e instanceof Def){if(this.finalized!==true||e.finalized!==true){throw new Error("")}return a.call(e.allSupertypes,this.typeName)}else{throw new Error(e+" is not a Def")}};Def.prototype.checkAllFields=function(e,t){var r=this.allFields;if(this.finalized!==true){throw new Error(""+this.typeName)}function checkFieldByName(i){var n=r[i];var a=n.type;var s=n.getValue(e);return a.check(s,t)}return e!==null&&typeof e==="object"&&Object.keys(r).every(checkFieldByName)};Def.prototype.bases=function(){var e=[];for(var t=0;t=0){return s[n]}if(typeof r!=="string"){throw new Error("missing name")}return new h(r,e)}return new l(e)},def:function(e){return a.call(A,e)?A[e]:A[e]=new T(e)},hasDef:function(e){return a.call(A,e)}};var i=[];var s=[];var d={};function defBuiltInType(e,t){var r=n.call(e);var a=new h(t,function(e){return n.call(e)===r});d[t]=a;if(e&&typeof e.constructor==="function"){i.push(e.constructor);s.push(a)}return a}var m=defBuiltInType("truthy","string");var v=defBuiltInType(function(){},"function");var y=defBuiltInType([],"array");var x=defBuiltInType({},"object");var E=defBuiltInType(/./,"RegExp");var S=defBuiltInType(new Date,"Date");var D=defBuiltInType(3,"number");var b=defBuiltInType(true,"boolean");var g=defBuiltInType(null,"null");var C=defBuiltInType(void 0,"undefined");var A=Object.create(null);function defFromValue(e){if(e&&typeof e==="object"){var t=e.type;if(typeof t==="string"&&a.call(A,t)){var r=A[t];if(r.finalized){return r}}}return null}var T=function(e){r(DefImpl,e);function DefImpl(t){var r=e.call(this,new h(t,function(e,t){return r.check(e,t)}),t)||this;return r}DefImpl.prototype.check=function(e,t){if(this.finalized!==true){throw new Error("prematurely checking unfinalized type "+this.typeName)}if(e===null||typeof e!=="object"){return false}var r=defFromValue(e);if(!r){if(this.typeName==="SourceLocation"||this.typeName==="Position"){return this.checkAllFields(e,t)}return false}if(t&&r===this){return this.checkAllFields(e,t)}if(!this.isSupertypeOf(r)){return false}if(!t){return true}return r.checkAllFields(e,t)&&this.checkAllFields(e,false)};DefImpl.prototype.build=function(){var e=this;var t=[];for(var r=0;r=0){wrapExpressionBuilderWithStatement(this.typeName)}}};return DefImpl}(f);function getSupertypeNames(e){if(!a.call(A,e)){throw new Error("")}var t=A[e];if(t.finalized!==true){throw new Error("")}return t.supertypeList.slice(1)}function computeSupertypeLookupTable(e){var t={};var r=Object.keys(A);var i=r.length;for(var n=0;n=0;--n){var a=this.leading[n];if(t.end.offset>=a.start){r.unshift(a.comment);this.leading.splice(n,1);this.trailing.splice(n,1)}}if(r.length){e.innerComments=r}}};CommentHandler.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var i=this.trailing[r];if(i.start>=e.end.offset){t.unshift(i.comment)}}this.trailing.length=0;return t}var n=this.stack[this.stack.length-1];if(n&&n.node.trailingComments){var a=n.node.trailingComments[0];if(a&&a.range[0]>=e.end.offset){t=n.node.trailingComments;delete n.node.trailingComments}}return t};CommentHandler.prototype.findLeadingComments=function(e){var t=[];var r;while(this.stack.length>0){var i=this.stack[this.stack.length-1];if(i&&i.start>=e.start.offset){r=i.node;this.stack.pop()}else{break}}if(r){var n=r.leadingComments?r.leadingComments.length:0;for(var a=n-1;a>=0;--a){var s=r.leadingComments[a];if(s.range[1]<=e.start.offset){t.unshift(s);r.leadingComments.splice(a,1)}}if(r.leadingComments&&r.leadingComments.length===0){delete r.leadingComments}return t}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];if(i.start<=e.start.offset){t.unshift(i.comment);this.leading.splice(a,1)}}return t};CommentHandler.prototype.visitNode=function(e,t){if(e.type===i.Syntax.Program&&e.body.length>0){return}this.insertInnerComments(e,t);var r=this.findTrailingComments(t);var n=this.findLeadingComments(t);if(n.length>0){e.leadingComments=n}if(r.length>0){e.trailingComments=r}this.stack.push({node:e,start:t.start.offset})};CommentHandler.prototype.visitComment=function(e,t){var r=e.type[0]==="L"?"Line":"Block";var i={type:r,value:e.value};if(e.range){i.range=e.range}if(e.loc){i.loc=e.loc}this.comments.push(i);if(this.attach){var n={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};if(e.loc){n.comment.loc=e.loc}e.type=r;this.leading.push(n);this.trailing.push(n)}};CommentHandler.prototype.visit=function(e,t){if(e.type==="LineComment"){this.visitComment(e,t)}else if(e.type==="BlockComment"){this.visitComment(e,t)}else if(this.attach){this.visitNode(e,t)}};return CommentHandler}();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(t.hasOwnProperty(r))e[r]=t[r]};return function(t,r){e(t,r);function __(){this.constructor=t}t.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});var n=r(4);var a=r(5);var s=r(6);var u=r(7);var l=r(8);var o=r(13);var c=r(14);o.TokenName[100]="JSXIdentifier";o.TokenName[101]="JSXText";function getQualifiedElementName(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:var r=e;t=r.name;break;case s.JSXSyntax.JSXNamespacedName:var i=e;t=getQualifiedElementName(i.namespace)+":"+getQualifiedElementName(i.name);break;case s.JSXSyntax.JSXMemberExpression:var n=e;t=getQualifiedElementName(n.object)+"."+getQualifiedElementName(n.property);break;default:break}return t}var h=function(e){i(JSXParser,e);function JSXParser(t,r,i){return e.call(this,t,r,i)||this}JSXParser.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)};JSXParser.prototype.startJSX=function(){this.scanner.index=this.startMarker.index;this.scanner.lineNumber=this.startMarker.line;this.scanner.lineStart=this.startMarker.index-this.startMarker.column};JSXParser.prototype.finishJSX=function(){this.nextToken()};JSXParser.prototype.reenterJSX=function(){this.startJSX();this.expectJSX("}");if(this.config.tokens){this.tokens.pop()}};JSXParser.prototype.createJSXNode=function(){this.collectComments();return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.scanXHTMLEntity=function(e){var t="&";var r=true;var i=false;var a=false;var s=false;while(!this.scanner.eof()&&r&&!i){var u=this.scanner.source[this.scanner.index];if(u===e){break}i=u===";";t+=u;++this.scanner.index;if(!i){switch(t.length){case 2:a=u==="#";break;case 3:if(a){s=u==="x";r=s||n.Character.isDecimalDigit(u.charCodeAt(0));a=a&&!s}break;default:r=r&&!(a&&!n.Character.isDecimalDigit(u.charCodeAt(0)));r=r&&!(s&&!n.Character.isHexDigit(u.charCodeAt(0)));break}}}if(r&&i&&t.length>2){var l=t.substr(1,t.length-2);if(a&&l.length>1){t=String.fromCharCode(parseInt(l.substr(1),10))}else if(s&&l.length>2){t=String.fromCharCode(parseInt("0"+l.substr(1),16))}else if(!a&&!s&&c.XHTMLEntities[l]){t=c.XHTMLEntities[l]}}return t};JSXParser.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(e===60||e===62||e===47||e===58||e===61||e===123||e===125){var t=this.scanner.source[this.scanner.index++];return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(e===34||e===39){var r=this.scanner.index;var i=this.scanner.source[this.scanner.index++];var a="";while(!this.scanner.eof()){var s=this.scanner.source[this.scanner.index++];if(s===i){break}else if(s==="&"){a+=this.scanXHTMLEntity(i)}else{a+=s}}return{type:8,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===46){var u=this.scanner.source.charCodeAt(this.scanner.index+1);var l=this.scanner.source.charCodeAt(this.scanner.index+2);var t=u===46&&l===46?"...":".";var r=this.scanner.index;this.scanner.index+=t.length;return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===96){return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index}}if(n.Character.isIdentifierStart(e)&&e!==92){var r=this.scanner.index;++this.scanner.index;while(!this.scanner.eof()){var s=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(s)&&s!==92){++this.scanner.index}else if(s===45){++this.scanner.index}else{break}}var o=this.scanner.source.slice(r,this.scanner.index);return{type:100,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}return this.scanner.lex()};JSXParser.prototype.nextJSXToken=function(){this.collectComments();this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;if(this.config.tokens){this.tokens.push(this.convertToken(e))}return e};JSXParser.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.scanner.index;var t="";while(!this.scanner.eof()){var r=this.scanner.source[this.scanner.index];if(r==="{"||r==="<"){break}++this.scanner.index;t+=r;if(n.Character.isLineTerminator(r.charCodeAt(0))){++this.scanner.lineNumber;if(r==="\r"&&this.scanner.source[this.scanner.index]==="\n"){++this.scanner.index}this.scanner.lineStart=this.scanner.index}}this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};if(t.length>0&&this.config.tokens){this.tokens.push(this.convertToken(i))}return i};JSXParser.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();this.scanner.restoreState(e);return t};JSXParser.prototype.expectJSX=function(e){var t=this.nextJSXToken();if(t.type!==7||t.value!==e){this.throwUnexpectedToken(t)}};JSXParser.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===7&&t.value===e};JSXParser.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==100){this.throwUnexpectedToken(t)}return this.finalize(e,new a.JSXIdentifier(t.value))};JSXParser.prototype.parseJSXElementName=function(){var e=this.createJSXNode();var t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(r,i))}else if(this.matchJSX(".")){while(this.matchJSX(".")){var n=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(n,s))}}return t};JSXParser.prototype.parseJSXAttributeName=function(){var e=this.createJSXNode();var t;var r=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=r;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(i,n))}else{t=r}return t};JSXParser.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==8){this.throwUnexpectedToken(t)}var r=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,r))};JSXParser.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.finishJSX();if(this.match("}")){this.tolerateError("JSX attributes must only be assigned a non-empty expression")}var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()};JSXParser.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode();var t=this.parseJSXAttributeName();var r=null;if(this.matchJSX("=")){this.expectJSX("=");r=this.parseJSXAttributeValue()}return this.finalize(e,new a.JSXAttribute(t,r))};JSXParser.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.expectJSX("...");this.finishJSX();var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXSpreadAttribute(t))};JSXParser.prototype.parseJSXAttributes=function(){var e=[];while(!this.matchJSX("/")&&!this.matchJSX(">")){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e};JSXParser.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName();var r=this.parseJSXAttributes();var i=this.matchJSX("/");if(i){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(t,i,r))};JSXParser.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();this.expectJSX("<");if(this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();this.expectJSX(">");return this.finalize(e,new a.JSXClosingElement(t))}var r=this.parseJSXElementName();var i=this.parseJSXAttributes();var n=this.matchJSX("/");if(n){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(r,n,i))};JSXParser.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();this.collectComments();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;return this.finalize(e,new a.JSXEmptyExpression)};JSXParser.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;if(this.matchJSX("}")){t=this.parseJSXEmptyExpression();this.expectJSX("}")}else{this.finishJSX();t=this.parseAssignmentExpression();this.reenterJSX()}return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXChildren=function(){var e=[];while(!this.scanner.eof()){var t=this.createJSXChildNode();var r=this.nextJSXText();if(r.start0){var u=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing));e=t[t.length-1];e.children.push(u);t.pop()}else{break}}}return e};JSXParser.prototype.parseJSXElement=function(){var e=this.createJSXNode();var t=this.parseJSXOpeningElement();var r=[];var i=null;if(!t.selfClosing){var n=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:r});r=n.children;i=n.closing}return this.finalize(e,new a.JSXElement(t,r,i))};JSXParser.prototype.parseJSXRoot=function(){if(this.config.tokens){this.tokens.pop()}this.startJSX();var e=this.parseJSXElement();this.finishJSX();return e};JSXParser.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")};return JSXParser}(l.Parser);t.JSXParser=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return e===10||e===13||e===8232||e===8233},isIdentifierStart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(6);var n=function(){function JSXClosingElement(e){this.type=i.JSXSyntax.JSXClosingElement;this.name=e}return JSXClosingElement}();t.JSXClosingElement=n;var a=function(){function JSXElement(e,t,r){this.type=i.JSXSyntax.JSXElement;this.openingElement=e;this.children=t;this.closingElement=r}return JSXElement}();t.JSXElement=a;var s=function(){function JSXEmptyExpression(){this.type=i.JSXSyntax.JSXEmptyExpression}return JSXEmptyExpression}();t.JSXEmptyExpression=s;var u=function(){function JSXExpressionContainer(e){this.type=i.JSXSyntax.JSXExpressionContainer;this.expression=e}return JSXExpressionContainer}();t.JSXExpressionContainer=u;var l=function(){function JSXIdentifier(e){this.type=i.JSXSyntax.JSXIdentifier;this.name=e}return JSXIdentifier}();t.JSXIdentifier=l;var o=function(){function JSXMemberExpression(e,t){this.type=i.JSXSyntax.JSXMemberExpression;this.object=e;this.property=t}return JSXMemberExpression}();t.JSXMemberExpression=o;var c=function(){function JSXAttribute(e,t){this.type=i.JSXSyntax.JSXAttribute;this.name=e;this.value=t}return JSXAttribute}();t.JSXAttribute=c;var h=function(){function JSXNamespacedName(e,t){this.type=i.JSXSyntax.JSXNamespacedName;this.namespace=e;this.name=t}return JSXNamespacedName}();t.JSXNamespacedName=h;var f=function(){function JSXOpeningElement(e,t,r){this.type=i.JSXSyntax.JSXOpeningElement;this.name=e;this.selfClosing=t;this.attributes=r}return JSXOpeningElement}();t.JSXOpeningElement=f;var p=function(){function JSXSpreadAttribute(e){this.type=i.JSXSyntax.JSXSpreadAttribute;this.argument=e}return JSXSpreadAttribute}();t.JSXSpreadAttribute=p;var d=function(){function JSXText(e,t){this.type=i.JSXSyntax.JSXText;this.value=e;this.raw=t}return JSXText}();t.JSXText=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2);var n=function(){function ArrayExpression(e){this.type=i.Syntax.ArrayExpression;this.elements=e}return ArrayExpression}();t.ArrayExpression=n;var a=function(){function ArrayPattern(e){this.type=i.Syntax.ArrayPattern;this.elements=e}return ArrayPattern}();t.ArrayPattern=a;var s=function(){function ArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=false}return ArrowFunctionExpression}();t.ArrowFunctionExpression=s;var u=function(){function AssignmentExpression(e,t,r){this.type=i.Syntax.AssignmentExpression;this.operator=e;this.left=t;this.right=r}return AssignmentExpression}();t.AssignmentExpression=u;var l=function(){function AssignmentPattern(e,t){this.type=i.Syntax.AssignmentPattern;this.left=e;this.right=t}return AssignmentPattern}();t.AssignmentPattern=l;var o=function(){function AsyncArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=true}return AsyncArrowFunctionExpression}();t.AsyncArrowFunctionExpression=o;var c=function(){function AsyncFunctionDeclaration(e,t,r){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionDeclaration}();t.AsyncFunctionDeclaration=c;var h=function(){function AsyncFunctionExpression(e,t,r){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionExpression}();t.AsyncFunctionExpression=h;var f=function(){function AwaitExpression(e){this.type=i.Syntax.AwaitExpression;this.argument=e}return AwaitExpression}();t.AwaitExpression=f;var p=function(){function BinaryExpression(e,t,r){var n=e==="||"||e==="&&";this.type=n?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression;this.operator=e;this.left=t;this.right=r}return BinaryExpression}();t.BinaryExpression=p;var d=function(){function BlockStatement(e){this.type=i.Syntax.BlockStatement;this.body=e}return BlockStatement}();t.BlockStatement=d;var m=function(){function BreakStatement(e){this.type=i.Syntax.BreakStatement;this.label=e}return BreakStatement}();t.BreakStatement=m;var v=function(){function CallExpression(e,t){this.type=i.Syntax.CallExpression;this.callee=e;this.arguments=t}return CallExpression}();t.CallExpression=v;var y=function(){function CatchClause(e,t){this.type=i.Syntax.CatchClause;this.param=e;this.body=t}return CatchClause}();t.CatchClause=y;var x=function(){function ClassBody(e){this.type=i.Syntax.ClassBody;this.body=e}return ClassBody}();t.ClassBody=x;var E=function(){function ClassDeclaration(e,t,r){this.type=i.Syntax.ClassDeclaration;this.id=e;this.superClass=t;this.body=r}return ClassDeclaration}();t.ClassDeclaration=E;var S=function(){function ClassExpression(e,t,r){this.type=i.Syntax.ClassExpression;this.id=e;this.superClass=t;this.body=r}return ClassExpression}();t.ClassExpression=S;var D=function(){function ComputedMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=true;this.object=e;this.property=t}return ComputedMemberExpression}();t.ComputedMemberExpression=D;var b=function(){function ConditionalExpression(e,t,r){this.type=i.Syntax.ConditionalExpression;this.test=e;this.consequent=t;this.alternate=r}return ConditionalExpression}();t.ConditionalExpression=b;var g=function(){function ContinueStatement(e){this.type=i.Syntax.ContinueStatement;this.label=e}return ContinueStatement}();t.ContinueStatement=g;var C=function(){function DebuggerStatement(){this.type=i.Syntax.DebuggerStatement}return DebuggerStatement}();t.DebuggerStatement=C;var A=function(){function Directive(e,t){this.type=i.Syntax.ExpressionStatement;this.expression=e;this.directive=t}return Directive}();t.Directive=A;var T=function(){function DoWhileStatement(e,t){this.type=i.Syntax.DoWhileStatement;this.body=e;this.test=t}return DoWhileStatement}();t.DoWhileStatement=T;var F=function(){function EmptyStatement(){this.type=i.Syntax.EmptyStatement}return EmptyStatement}();t.EmptyStatement=F;var w=function(){function ExportAllDeclaration(e){this.type=i.Syntax.ExportAllDeclaration;this.source=e}return ExportAllDeclaration}();t.ExportAllDeclaration=w;var P=function(){function ExportDefaultDeclaration(e){this.type=i.Syntax.ExportDefaultDeclaration;this.declaration=e}return ExportDefaultDeclaration}();t.ExportDefaultDeclaration=P;var k=function(){function ExportNamedDeclaration(e,t,r){this.type=i.Syntax.ExportNamedDeclaration;this.declaration=e;this.specifiers=t;this.source=r}return ExportNamedDeclaration}();t.ExportNamedDeclaration=k;var B=function(){function ExportSpecifier(e,t){this.type=i.Syntax.ExportSpecifier;this.exported=t;this.local=e}return ExportSpecifier}();t.ExportSpecifier=B;var M=function(){function ExpressionStatement(e){this.type=i.Syntax.ExpressionStatement;this.expression=e}return ExpressionStatement}();t.ExpressionStatement=M;var I=function(){function ForInStatement(e,t,r){this.type=i.Syntax.ForInStatement;this.left=e;this.right=t;this.body=r;this.each=false}return ForInStatement}();t.ForInStatement=I;var N=function(){function ForOfStatement(e,t,r){this.type=i.Syntax.ForOfStatement;this.left=e;this.right=t;this.body=r}return ForOfStatement}();t.ForOfStatement=N;var O=function(){function ForStatement(e,t,r,n){this.type=i.Syntax.ForStatement;this.init=e;this.test=t;this.update=r;this.body=n}return ForStatement}();t.ForStatement=O;var j=function(){function FunctionDeclaration(e,t,r,n){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionDeclaration}();t.FunctionDeclaration=j;var X=function(){function FunctionExpression(e,t,r,n){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionExpression}();t.FunctionExpression=X;var J=function(){function Identifier(e){this.type=i.Syntax.Identifier;this.name=e}return Identifier}();t.Identifier=J;var L=function(){function IfStatement(e,t,r){this.type=i.Syntax.IfStatement;this.test=e;this.consequent=t;this.alternate=r}return IfStatement}();t.IfStatement=L;var z=function(){function ImportDeclaration(e,t){this.type=i.Syntax.ImportDeclaration;this.specifiers=e;this.source=t}return ImportDeclaration}();t.ImportDeclaration=z;var U=function(){function ImportDefaultSpecifier(e){this.type=i.Syntax.ImportDefaultSpecifier;this.local=e}return ImportDefaultSpecifier}();t.ImportDefaultSpecifier=U;var R=function(){function ImportNamespaceSpecifier(e){this.type=i.Syntax.ImportNamespaceSpecifier;this.local=e}return ImportNamespaceSpecifier}();t.ImportNamespaceSpecifier=R;var q=function(){function ImportSpecifier(e,t){this.type=i.Syntax.ImportSpecifier;this.local=e;this.imported=t}return ImportSpecifier}();t.ImportSpecifier=q;var V=function(){function LabeledStatement(e,t){this.type=i.Syntax.LabeledStatement;this.label=e;this.body=t}return LabeledStatement}();t.LabeledStatement=V;var W=function(){function Literal(e,t){this.type=i.Syntax.Literal;this.value=e;this.raw=t}return Literal}();t.Literal=W;var K=function(){function MetaProperty(e,t){this.type=i.Syntax.MetaProperty;this.meta=e;this.property=t}return MetaProperty}();t.MetaProperty=K;var H=function(){function MethodDefinition(e,t,r,n,a){this.type=i.Syntax.MethodDefinition;this.key=e;this.computed=t;this.value=r;this.kind=n;this.static=a}return MethodDefinition}();t.MethodDefinition=H;var Y=function(){function Module(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="module"}return Module}();t.Module=Y;var G=function(){function NewExpression(e,t){this.type=i.Syntax.NewExpression;this.callee=e;this.arguments=t}return NewExpression}();t.NewExpression=G;var Q=function(){function ObjectExpression(e){this.type=i.Syntax.ObjectExpression;this.properties=e}return ObjectExpression}();t.ObjectExpression=Q;var $=function(){function ObjectPattern(e){this.type=i.Syntax.ObjectPattern;this.properties=e}return ObjectPattern}();t.ObjectPattern=$;var Z=function(){function Property(e,t,r,n,a,s){this.type=i.Syntax.Property;this.key=t;this.computed=r;this.value=n;this.kind=e;this.method=a;this.shorthand=s}return Property}();t.Property=Z;var _=function(){function RegexLiteral(e,t,r,n){this.type=i.Syntax.Literal;this.value=e;this.raw=t;this.regex={pattern:r,flags:n}}return RegexLiteral}();t.RegexLiteral=_;var ee=function(){function RestElement(e){this.type=i.Syntax.RestElement;this.argument=e}return RestElement}();t.RestElement=ee;var te=function(){function ReturnStatement(e){this.type=i.Syntax.ReturnStatement;this.argument=e}return ReturnStatement}();t.ReturnStatement=te;var re=function(){function Script(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="script"}return Script}();t.Script=re;var ie=function(){function SequenceExpression(e){this.type=i.Syntax.SequenceExpression;this.expressions=e}return SequenceExpression}();t.SequenceExpression=ie;var ne=function(){function SpreadElement(e){this.type=i.Syntax.SpreadElement;this.argument=e}return SpreadElement}();t.SpreadElement=ne;var ae=function(){function StaticMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=false;this.object=e;this.property=t}return StaticMemberExpression}();t.StaticMemberExpression=ae;var se=function(){function Super(){this.type=i.Syntax.Super}return Super}();t.Super=se;var ue=function(){function SwitchCase(e,t){this.type=i.Syntax.SwitchCase;this.test=e;this.consequent=t}return SwitchCase}();t.SwitchCase=ue;var le=function(){function SwitchStatement(e,t){this.type=i.Syntax.SwitchStatement;this.discriminant=e;this.cases=t}return SwitchStatement}();t.SwitchStatement=le;var oe=function(){function TaggedTemplateExpression(e,t){this.type=i.Syntax.TaggedTemplateExpression;this.tag=e;this.quasi=t}return TaggedTemplateExpression}();t.TaggedTemplateExpression=oe;var ce=function(){function TemplateElement(e,t){this.type=i.Syntax.TemplateElement;this.value=e;this.tail=t}return TemplateElement}();t.TemplateElement=ce;var he=function(){function TemplateLiteral(e,t){this.type=i.Syntax.TemplateLiteral;this.quasis=e;this.expressions=t}return TemplateLiteral}();t.TemplateLiteral=he;var fe=function(){function ThisExpression(){this.type=i.Syntax.ThisExpression}return ThisExpression}();t.ThisExpression=fe;var pe=function(){function ThrowStatement(e){this.type=i.Syntax.ThrowStatement;this.argument=e}return ThrowStatement}();t.ThrowStatement=pe;var de=function(){function TryStatement(e,t,r){this.type=i.Syntax.TryStatement;this.block=e;this.handler=t;this.finalizer=r}return TryStatement}();t.TryStatement=de;var me=function(){function UnaryExpression(e,t){this.type=i.Syntax.UnaryExpression;this.operator=e;this.argument=t;this.prefix=true}return UnaryExpression}();t.UnaryExpression=me;var ve=function(){function UpdateExpression(e,t,r){this.type=i.Syntax.UpdateExpression;this.operator=e;this.argument=t;this.prefix=r}return UpdateExpression}();t.UpdateExpression=ve;var ye=function(){function VariableDeclaration(e,t){this.type=i.Syntax.VariableDeclaration;this.declarations=e;this.kind=t}return VariableDeclaration}();t.VariableDeclaration=ye;var xe=function(){function VariableDeclarator(e,t){this.type=i.Syntax.VariableDeclarator;this.id=e;this.init=t}return VariableDeclarator}();t.VariableDeclarator=xe;var Ee=function(){function WhileStatement(e,t){this.type=i.Syntax.WhileStatement;this.test=e;this.body=t}return WhileStatement}();t.WhileStatement=Ee;var Se=function(){function WithStatement(e,t){this.type=i.Syntax.WithStatement;this.object=e;this.body=t}return WithStatement}();t.WithStatement=Se;var De=function(){function YieldExpression(e,t){this.type=i.Syntax.YieldExpression;this.argument=e;this.delegate=t}return YieldExpression}();t.YieldExpression=De},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(10);var a=r(11);var s=r(7);var u=r(12);var l=r(2);var o=r(13);var c="ArrowParameterPlaceHolder";var h=function(){function Parser(e,t,r){if(t===void 0){t={}}this.config={range:typeof t.range==="boolean"&&t.range,loc:typeof t.loc==="boolean"&&t.loc,source:null,tokens:typeof t.tokens==="boolean"&&t.tokens,comment:typeof t.comment==="boolean"&&t.comment,tolerant:typeof t.tolerant==="boolean"&&t.tolerant};if(this.config.loc&&t.source&&t.source!==null){this.config.source=String(t.source)}this.delegate=r;this.errorHandler=new n.ErrorHandler;this.errorHandler.tolerant=this.config.tolerant;this.scanner=new u.Scanner(e,this.errorHandler);this.scanner.trackComment=this.config.comment;this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11};this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0};this.hasLineTerminator=false;this.context={isModule:false,await:false,allowIn:true,allowStrictDirective:true,allowYield:true,firstCoverInitializedNameError:null,isAssignmentTarget:false,isBindingElement:false,inFunctionBody:false,inIteration:false,inSwitch:false,labelSet:{},strict:false};this.tokens=[];this.startMarker={index:0,line:this.scanner.lineNumber,column:0};this.lastMarker={index:0,line:this.scanner.lineNumber,column:0};this.nextToken();this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}Parser.prototype.throwError=function(e){var t=[];for(var r=1;r0&&this.delegate){for(var t=0;t>="||e===">>>="||e==="&="||e==="^="||e==="|="};Parser.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);if(this.context.firstCoverInitializedNameError!==null){this.throwUnexpectedToken(this.context.firstCoverInitializedNameError)}this.context.isBindingElement=t;this.context.isAssignmentTarget=r;this.context.firstCoverInitializedNameError=i;return n};Parser.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);this.context.isBindingElement=this.context.isBindingElement&&t;this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r;this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError;return n};Parser.prototype.consumeSemicolon=function(){if(this.match(";")){this.nextToken()}else if(!this.hasLineTerminator){if(this.lookahead.type!==2&&!this.match("}")){this.throwUnexpectedToken(this.lookahead)}this.lastMarker.index=this.startMarker.index;this.lastMarker.line=this.startMarker.line;this.lastMarker.column=this.startMarker.column}};Parser.prototype.parsePrimaryExpression=function(){var e=this.createNode();var t;var r,i;switch(this.lookahead.type){case 3:if((this.context.isModule||this.context.await)&&this.lookahead.value==="await"){this.tolerateUnexpectedToken(this.lookahead)}t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new s.Identifier(this.nextToken().value));break;case 6:case 8:if(this.context.strict&&this.lookahead.octal){this.tolerateUnexpectedToken(this.lookahead,a.Messages.StrictOctalLiteral)}this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new s.Literal(r.value,i));break;case 1:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new s.Literal(r.value==="true",i));break;case 5:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new s.Literal(null,i));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=false;t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.scanner.index=this.startMarker.index;r=this.nextRegexToken();i=this.getTokenRaw(r);t=this.finalize(e,new s.RegexLiteral(r.regex,i,r.pattern,r.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:if(!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")){t=this.parseIdentifierName()}else if(!this.context.strict&&this.matchKeyword("let")){t=this.finalize(e,new s.Identifier(this.nextToken().value))}else{this.context.isAssignmentTarget=false;this.context.isBindingElement=false;if(this.matchKeyword("function")){t=this.parseFunctionExpression()}else if(this.matchKeyword("this")){this.nextToken();t=this.finalize(e,new s.ThisExpression)}else if(this.matchKeyword("class")){t=this.parseClassExpression()}else{t=this.throwUnexpectedToken(this.nextToken())}}break;default:t=this.throwUnexpectedToken(this.nextToken())}return t};Parser.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new s.SpreadElement(t))};Parser.prototype.parseArrayInitializer=function(){var e=this.createNode();var t=[];this.expect("[");while(!this.match("]")){if(this.match(",")){this.nextToken();t.push(null)}else if(this.match("...")){var r=this.parseSpreadElement();if(!this.match("]")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.expect(",")}t.push(r)}else{t.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(e,new s.ArrayExpression(t))};Parser.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var t=this.context.strict;var r=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);if(this.context.strict&&e.firstRestricted){this.tolerateUnexpectedToken(e.firstRestricted,e.message)}if(this.context.strict&&e.stricted){this.tolerateUnexpectedToken(e.stricted,e.message)}this.context.strict=t;this.context.allowStrictDirective=r;return i};Parser.prototype.parsePropertyMethodFunction=function(){var e=false;var t=this.createNode();var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(t,new s.FunctionExpression(null,i.params,n,e))};Parser.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode();var t=this.context.allowYield;var r=this.context.await;this.context.allowYield=false;this.context.await=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=t;this.context.await=r;return this.finalize(e,new s.AsyncFunctionExpression(null,i.params,n))};Parser.prototype.parseObjectPropertyKey=function(){var e=this.createNode();var t=this.nextToken();var r;switch(t.type){case 8:case 6:if(this.context.strict&&t.octal){this.tolerateUnexpectedToken(t,a.Messages.StrictOctalLiteral)}var i=this.getTokenRaw(t);r=this.finalize(e,new s.Literal(t.value,i));break;case 3:case 1:case 5:case 4:r=this.finalize(e,new s.Identifier(t.value));break;case 7:if(t.value==="["){r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.expect("]")}else{r=this.throwUnexpectedToken(t)}break;default:r=this.throwUnexpectedToken(t)}return r};Parser.prototype.isPropertyKey=function(e,t){return e.type===l.Syntax.Identifier&&e.name===t||e.type===l.Syntax.Literal&&e.value===t};Parser.prototype.parseObjectProperty=function(e){var t=this.createNode();var r=this.lookahead;var i;var n=null;var u=null;var l=false;var o=false;var c=false;var h=false;if(r.type===3){var f=r.value;this.nextToken();l=this.match("[");h=!this.hasLineTerminator&&f==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(",");n=h?this.parseObjectPropertyKey():this.finalize(t,new s.Identifier(f))}else if(this.match("*")){this.nextToken()}else{l=this.match("[");n=this.parseObjectPropertyKey()}var p=this.qualifiedPropertyName(this.lookahead);if(r.type===3&&!h&&r.value==="get"&&p){i="get";l=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;u=this.parseGetterMethod()}else if(r.type===3&&!h&&r.value==="set"&&p){i="set";l=this.match("[");n=this.parseObjectPropertyKey();u=this.parseSetterMethod()}else if(r.type===7&&r.value==="*"&&p){i="init";l=this.match("[");n=this.parseObjectPropertyKey();u=this.parseGeneratorMethod();o=true}else{if(!n){this.throwUnexpectedToken(this.lookahead)}i="init";if(this.match(":")&&!h){if(!l&&this.isPropertyKey(n,"__proto__")){if(e.value){this.tolerateError(a.Messages.DuplicateProtoProperty)}e.value=true}this.nextToken();u=this.inheritCoverGrammar(this.parseAssignmentExpression)}else if(this.match("(")){u=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();o=true}else if(r.type===3){var f=this.finalize(t,new s.Identifier(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead;this.nextToken();c=true;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);u=this.finalize(t,new s.AssignmentPattern(f,d))}else{c=true;u=f}}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(t,new s.Property(i,n,l,u,o,c))};Parser.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");var t=[];var r={value:false};while(!this.match("}")){t.push(this.parseObjectProperty(r));if(!this.match("}")){this.expectCommaSeparator()}}this.expect("}");return this.finalize(e,new s.ObjectExpression(t))};Parser.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode();var t=this.nextToken();var r=t.value;var n=t.cooked;return this.finalize(e,new s.TemplateElement({raw:r,cooked:n},t.tail))};Parser.prototype.parseTemplateElement=function(){if(this.lookahead.type!==10){this.throwUnexpectedToken()}var e=this.createNode();var t=this.nextToken();var r=t.value;var i=t.cooked;return this.finalize(e,new s.TemplateElement({raw:r,cooked:i},t.tail))};Parser.prototype.parseTemplateLiteral=function(){var e=this.createNode();var t=[];var r=[];var i=this.parseTemplateHead();r.push(i);while(!i.tail){t.push(this.parseExpression());i=this.parseTemplateElement();r.push(i)}return this.finalize(e,new s.TemplateLiteral(r,t))};Parser.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:e.type=l.Syntax.RestElement;this.reinterpretExpressionAsPattern(e.argument);break;case l.Syntax.ArrayExpression:e.type=l.Syntax.ArrayPattern;for(var t=0;t")){this.expect("=>")}e={type:c,params:[],async:false}}else{var t=this.lookahead;var r=[];if(this.match("...")){e=this.parseRestElement(r);this.expect(")");if(!this.match("=>")){this.expect("=>")}e={type:c,params:[e],async:false}}else{var i=false;this.context.isBindingElement=true;e=this.inheritCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];this.context.isAssignmentTarget=false;n.push(e);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();if(this.match(")")){this.nextToken();for(var a=0;a")){this.expect("=>")}this.context.isBindingElement=false;for(var a=0;a")){if(e.type===l.Syntax.Identifier&&e.name==="yield"){i=true;e={type:c,params:[e],async:false}}if(!i){if(!this.context.isBindingElement){this.throwUnexpectedToken(this.lookahead)}if(e.type===l.Syntax.SequenceExpression){for(var a=0;a")){for(var l=0;l0){this.nextToken();this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=[e,this.lookahead];var a=t;var u=this.isolateCoverGrammar(this.parseExponentiationExpression);var l=[a,r.value,u];var o=[i];while(true){i=this.binaryPrecedence(this.lookahead);if(i<=0){break}while(l.length>2&&i<=o[o.length-1]){u=l.pop();var c=l.pop();o.pop();a=l.pop();n.pop();var h=this.startNode(n[n.length-1]);l.push(this.finalize(h,new s.BinaryExpression(c,a,u)))}l.push(this.nextToken().value);o.push(i);n.push(this.lookahead);l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var f=l.length-1;t=l[f];var p=n.pop();while(f>1){var d=n.pop();var m=p&&p.lineStart;var h=this.startNode(d,m);var c=l[f-1];t=this.finalize(h,new s.BinaryExpression(c,l[f-2],t));f-=2;p=d}}return t};Parser.prototype.parseConditionalExpression=function(){var e=this.lookahead;var t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=true;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r;this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new s.ConditionalExpression(t,i,n));this.context.isAssignmentTarget=false;this.context.isBindingElement=false}return t};Parser.prototype.checkPatternParam=function(e,t){switch(t.type){case l.Syntax.Identifier:this.validateParam(e,t,t.name);break;case l.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case l.Syntax.ArrayPattern:for(var r=0;r")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=e.async;var u=this.reinterpretAsCoverFormalsList(e);if(u){if(this.hasLineTerminator){this.tolerateUnexpectedToken(this.lookahead)}this.context.firstCoverInitializedNameError=null;var o=this.context.strict;var h=this.context.allowStrictDirective;this.context.allowStrictDirective=u.simple;var f=this.context.allowYield;var p=this.context.await;this.context.allowYield=true;this.context.await=n;var d=this.startNode(t);this.expect("=>");var m=void 0;if(this.match("{")){var v=this.context.allowIn;this.context.allowIn=true;m=this.parseFunctionSourceElements();this.context.allowIn=v}else{m=this.isolateCoverGrammar(this.parseAssignmentExpression)}var y=m.type!==l.Syntax.BlockStatement;if(this.context.strict&&u.firstRestricted){this.throwUnexpectedToken(u.firstRestricted,u.message)}if(this.context.strict&&u.stricted){this.tolerateUnexpectedToken(u.stricted,u.message)}e=n?this.finalize(d,new s.AsyncArrowFunctionExpression(u.params,m,y)):this.finalize(d,new s.ArrowFunctionExpression(u.params,m,y));this.context.strict=o;this.context.allowStrictDirective=h;this.context.allowYield=f;this.context.await=p}}else{if(this.matchAssign()){if(!this.context.isAssignmentTarget){this.tolerateError(a.Messages.InvalidLHSInAssignment)}if(this.context.strict&&e.type===l.Syntax.Identifier){var x=e;if(this.scanner.isRestrictedWord(x.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictLHSAssignment)}if(this.scanner.isStrictModeReservedWord(x.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}}if(!this.match("=")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false}else{this.reinterpretExpressionAsPattern(e)}r=this.nextToken();var E=r.value;var S=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new s.AssignmentExpression(E,e,S));this.context.firstCoverInitializedNameError=null}}}return e};Parser.prototype.parseExpression=function(){var e=this.lookahead;var t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];r.push(t);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();r.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}t=this.finalize(this.startNode(e),new s.SequenceExpression(r))}return t};Parser.prototype.parseStatementListItem=function(){var e;this.context.isAssignmentTarget=true;this.context.isBindingElement=true;if(this.lookahead.type===4){switch(this.lookahead.value){case"export":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalExportDeclaration)}e=this.parseExportDeclaration();break;case"import":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalImportDeclaration)}e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:false});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:false}):this.parseStatement();break;default:e=this.parseStatement();break}}else{e=this.parseStatement()}return e};Parser.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");var t=[];while(true){if(this.match("}")){break}t.push(this.parseStatementListItem())}this.expect("}");return this.finalize(e,new s.BlockStatement(t))};Parser.prototype.parseLexicalBinding=function(e,t){var r=this.createNode();var i=[];var n=this.parsePattern(i,e);if(this.context.strict&&n.type===l.Syntax.Identifier){if(this.scanner.isRestrictedWord(n.name)){this.tolerateError(a.Messages.StrictVarName)}}var u=null;if(e==="const"){if(!this.matchKeyword("in")&&!this.matchContextualKeyword("of")){if(this.match("=")){this.nextToken();u=this.isolateCoverGrammar(this.parseAssignmentExpression)}else{this.throwError(a.Messages.DeclarationMissingInitializer,"const")}}}else if(!t.inFor&&n.type!==l.Syntax.Identifier||this.match("=")){this.expect("=");u=this.isolateCoverGrammar(this.parseAssignmentExpression)}return this.finalize(r,new s.VariableDeclarator(n,u))};Parser.prototype.parseBindingList=function(e,t){var r=[this.parseLexicalBinding(e,t)];while(this.match(",")){this.nextToken();r.push(this.parseLexicalBinding(e,t))}return r};Parser.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();this.scanner.restoreState(e);return t.type===3||t.type===7&&t.value==="["||t.type===7&&t.value==="{"||t.type===4&&t.value==="let"||t.type===4&&t.value==="yield"};Parser.prototype.parseLexicalDeclaration=function(e){var t=this.createNode();var r=this.nextToken().value;i.assert(r==="let"||r==="const","Lexical declaration must be either let or const");var n=this.parseBindingList(r,e);this.consumeSemicolon();return this.finalize(t,new s.VariableDeclaration(n,r))};Parser.prototype.parseBindingRestElement=function(e,t){var r=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(r,new s.RestElement(i))};Parser.prototype.parseArrayPattern=function(e,t){var r=this.createNode();this.expect("[");var i=[];while(!this.match("]")){if(this.match(",")){this.nextToken();i.push(null)}else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}else{i.push(this.parsePatternWithDefault(e,t))}if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(r,new s.ArrayPattern(i))};Parser.prototype.parsePropertyPattern=function(e,t){var r=this.createNode();var i=false;var n=false;var a=false;var u;var l;if(this.lookahead.type===3){var o=this.lookahead;u=this.parseVariableIdentifier();var c=this.finalize(r,new s.Identifier(o.value));if(this.match("=")){e.push(o);n=true;this.nextToken();var h=this.parseAssignmentExpression();l=this.finalize(this.startNode(o),new s.AssignmentPattern(c,h))}else if(!this.match(":")){e.push(o);n=true;l=c}else{this.expect(":");l=this.parsePatternWithDefault(e,t)}}else{i=this.match("[");u=this.parseObjectPropertyKey();this.expect(":");l=this.parsePatternWithDefault(e,t)}return this.finalize(r,new s.Property("init",u,i,l,a,n))};Parser.prototype.parseObjectPattern=function(e,t){var r=this.createNode();var i=[];this.expect("{");while(!this.match("}")){i.push(this.parsePropertyPattern(e,t));if(!this.match("}")){this.expect(",")}}this.expect("}");return this.finalize(r,new s.ObjectPattern(i))};Parser.prototype.parsePattern=function(e,t){var r;if(this.match("[")){r=this.parseArrayPattern(e,t)}else if(this.match("{")){r=this.parseObjectPattern(e,t)}else{if(this.matchKeyword("let")&&(t==="const"||t==="let")){this.tolerateUnexpectedToken(this.lookahead,a.Messages.LetInLexicalBinding)}e.push(this.lookahead);r=this.parseVariableIdentifier(t)}return r};Parser.prototype.parsePatternWithDefault=function(e,t){var r=this.lookahead;var i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var n=this.context.allowYield;this.context.allowYield=true;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=n;i=this.finalize(this.startNode(r),new s.AssignmentPattern(i,a))}return i};Parser.prototype.parseVariableIdentifier=function(e){var t=this.createNode();var r=this.nextToken();if(r.type===4&&r.value==="yield"){if(this.context.strict){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else if(!this.context.allowYield){this.throwUnexpectedToken(r)}}else if(r.type!==3){if(this.context.strict&&r.type===4&&this.scanner.isStrictModeReservedWord(r.value)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else{if(this.context.strict||r.value!=="let"||e!=="var"){this.throwUnexpectedToken(r)}}}else if((this.context.isModule||this.context.await)&&r.type===3&&r.value==="await"){this.tolerateUnexpectedToken(r)}return this.finalize(t,new s.Identifier(r.value))};Parser.prototype.parseVariableDeclaration=function(e){var t=this.createNode();var r=[];var i=this.parsePattern(r,"var");if(this.context.strict&&i.type===l.Syntax.Identifier){if(this.scanner.isRestrictedWord(i.name)){this.tolerateError(a.Messages.StrictVarName)}}var n=null;if(this.match("=")){this.nextToken();n=this.isolateCoverGrammar(this.parseAssignmentExpression)}else if(i.type!==l.Syntax.Identifier&&!e.inFor){this.expect("=")}return this.finalize(t,new s.VariableDeclarator(i,n))};Parser.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor};var r=[];r.push(this.parseVariableDeclaration(t));while(this.match(",")){this.nextToken();r.push(this.parseVariableDeclaration(t))}return r};Parser.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:false});this.consumeSemicolon();return this.finalize(e,new s.VariableDeclaration(t,"var"))};Parser.prototype.parseEmptyStatement=function(){var e=this.createNode();this.expect(";");return this.finalize(e,new s.EmptyStatement)};Parser.prototype.parseExpressionStatement=function(){var e=this.createNode();var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new s.ExpressionStatement(t))};Parser.prototype.parseIfClause=function(){if(this.context.strict&&this.matchKeyword("function")){this.tolerateError(a.Messages.StrictFunction)}return this.parseStatement()};Parser.prototype.parseIfStatement=function(){var e=this.createNode();var t;var r=null;this.expectKeyword("if");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new s.EmptyStatement)}else{this.expect(")");t=this.parseIfClause();if(this.matchKeyword("else")){this.nextToken();r=this.parseIfClause()}}return this.finalize(e,new s.IfStatement(i,t,r))};Parser.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=true;var r=this.parseStatement();this.context.inIteration=t;this.expectKeyword("while");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken())}else{this.expect(")");if(this.match(";")){this.nextToken()}}return this.finalize(e,new s.DoWhileStatement(r,i))};Parser.prototype.parseWhileStatement=function(){var e=this.createNode();var t;this.expectKeyword("while");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new s.EmptyStatement)}else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=true;t=this.parseStatement();this.context.inIteration=i}return this.finalize(e,new s.WhileStatement(r,t))};Parser.prototype.parseForStatement=function(){var e=null;var t=null;var r=null;var i=true;var n,u;var o=this.createNode();this.expectKeyword("for");this.expect("(");if(this.match(";")){this.nextToken()}else{if(this.matchKeyword("var")){e=this.createNode();this.nextToken();var c=this.context.allowIn;this.context.allowIn=false;var h=this.parseVariableDeclarationList({inFor:true});this.context.allowIn=c;if(h.length===1&&this.matchKeyword("in")){var f=h[0];if(f.init&&(f.id.type===l.Syntax.ArrayPattern||f.id.type===l.Syntax.ObjectPattern||this.context.strict)){this.tolerateError(a.Messages.ForInOfLoopInitializer,"for-in")}e=this.finalize(e,new s.VariableDeclaration(h,"var"));this.nextToken();n=e;u=this.parseExpression();e=null}else if(h.length===1&&h[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new s.VariableDeclaration(h,"var"));this.nextToken();n=e;u=this.parseAssignmentExpression();e=null;i=false}else{e=this.finalize(e,new s.VariableDeclaration(h,"var"));this.expect(";")}}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();var p=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in"){e=this.finalize(e,new s.Identifier(p));this.nextToken();n=e;u=this.parseExpression();e=null}else{var c=this.context.allowIn;this.context.allowIn=false;var h=this.parseBindingList(p,{inFor:true});this.context.allowIn=c;if(h.length===1&&h[0].init===null&&this.matchKeyword("in")){e=this.finalize(e,new s.VariableDeclaration(h,p));this.nextToken();n=e;u=this.parseExpression();e=null}else if(h.length===1&&h[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new s.VariableDeclaration(h,p));this.nextToken();n=e;u=this.parseAssignmentExpression();e=null;i=false}else{this.consumeSemicolon();e=this.finalize(e,new s.VariableDeclaration(h,p))}}}else{var d=this.lookahead;var c=this.context.allowIn;this.context.allowIn=false;e=this.inheritCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=c;if(this.matchKeyword("in")){if(!this.context.isAssignmentTarget||e.type===l.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForIn)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;u=this.parseExpression();e=null}else if(this.matchContextualKeyword("of")){if(!this.context.isAssignmentTarget||e.type===l.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForLoop)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;u=this.parseAssignmentExpression();e=null;i=false}else{if(this.match(",")){var m=[e];while(this.match(",")){this.nextToken();m.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}e=this.finalize(this.startNode(d),new s.SequenceExpression(m))}this.expect(";")}}}if(typeof n==="undefined"){if(!this.match(";")){t=this.parseExpression()}this.expect(";");if(!this.match(")")){r=this.parseExpression()}}var v;if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());v=this.finalize(this.createNode(),new s.EmptyStatement)}else{this.expect(")");var y=this.context.inIteration;this.context.inIteration=true;v=this.isolateCoverGrammar(this.parseStatement);this.context.inIteration=y}return typeof n==="undefined"?this.finalize(o,new s.ForStatement(e,t,r,v)):i?this.finalize(o,new s.ForInStatement(n,u,v)):this.finalize(o,new s.ForOfStatement(n,u,v))};Parser.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();t=r;var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}}this.consumeSemicolon();if(t===null&&!this.context.inIteration){this.throwError(a.Messages.IllegalContinue)}return this.finalize(e,new s.ContinueStatement(t))};Parser.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}t=r}this.consumeSemicolon();if(t===null&&!this.context.inIteration&&!this.context.inSwitch){this.throwError(a.Messages.IllegalBreak)}return this.finalize(e,new s.BreakStatement(t))};Parser.prototype.parseReturnStatement=function(){if(!this.context.inFunctionBody){this.tolerateError(a.Messages.IllegalReturn)}var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10;var r=t?this.parseExpression():null;this.consumeSemicolon();return this.finalize(e,new s.ReturnStatement(r))};Parser.prototype.parseWithStatement=function(){if(this.context.strict){this.tolerateError(a.Messages.StrictModeWith)}var e=this.createNode();var t;this.expectKeyword("with");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new s.EmptyStatement)}else{this.expect(")");t=this.parseStatement()}return this.finalize(e,new s.WithStatement(r,t))};Parser.prototype.parseSwitchCase=function(){var e=this.createNode();var t;if(this.matchKeyword("default")){this.nextToken();t=null}else{this.expectKeyword("case");t=this.parseExpression()}this.expect(":");var r=[];while(true){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case")){break}r.push(this.parseStatementListItem())}return this.finalize(e,new s.SwitchCase(t,r))};Parser.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch");this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=true;var i=[];var n=false;this.expect("{");while(true){if(this.match("}")){break}var u=this.parseSwitchCase();if(u.test===null){if(n){this.throwError(a.Messages.MultipleDefaultsInSwitch)}n=true}i.push(u)}this.expect("}");this.context.inSwitch=r;return this.finalize(e,new s.SwitchStatement(t,i))};Parser.prototype.parseLabelledStatement=function(){var e=this.createNode();var t=this.parseExpression();var r;if(t.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var i=t;var n="$"+i.name;if(Object.prototype.hasOwnProperty.call(this.context.labelSet,n)){this.throwError(a.Messages.Redeclaration,"Label",i.name)}this.context.labelSet[n]=true;var u=void 0;if(this.matchKeyword("class")){this.tolerateUnexpectedToken(this.lookahead);u=this.parseClassDeclaration()}else if(this.matchKeyword("function")){var o=this.lookahead;var c=this.parseFunctionDeclaration();if(this.context.strict){this.tolerateUnexpectedToken(o,a.Messages.StrictFunction)}else if(c.generator){this.tolerateUnexpectedToken(o,a.Messages.GeneratorInLegacyContext)}u=c}else{u=this.parseStatement()}delete this.context.labelSet[n];r=new s.LabeledStatement(i,u)}else{this.consumeSemicolon();r=new s.ExpressionStatement(t)}return this.finalize(e,r)};Parser.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw");if(this.hasLineTerminator){this.throwError(a.Messages.NewlineAfterThrow)}var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new s.ThrowStatement(t))};Parser.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch");this.expect("(");if(this.match(")")){this.throwUnexpectedToken(this.lookahead)}var t=[];var r=this.parsePattern(t);var i={};for(var n=0;n0){this.tolerateError(a.Messages.BadGetterArity)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new s.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseSetterMethod=function(){var e=this.createNode();var t=false;var r=this.context.allowYield;this.context.allowYield=!t;var i=this.parseFormalParameters();if(i.params.length!==1){this.tolerateError(a.Messages.BadSetterArity)}else if(i.params[0]instanceof s.RestElement){this.tolerateError(a.Messages.BadSetterRestParameter)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new s.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseGeneratorMethod=function(){var e=this.createNode();var t=true;var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();this.context.allowYield=false;var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new s.FunctionExpression(null,i.params,n,t))};Parser.prototype.isStartOfExpression=function(){var e=true;var t=this.lookahead.value;switch(this.lookahead.type){case 7:e=t==="["||t==="("||t==="{"||t==="+"||t==="-"||t==="!"||t==="~"||t==="++"||t==="--"||t==="/"||t==="/=";break;case 4:e=t==="class"||t==="delete"||t==="function"||t==="let"||t==="new"||t==="super"||t==="this"||t==="typeof"||t==="void"||t==="yield";break;default:break}return e};Parser.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null;var r=false;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=false;r=this.match("*");if(r){this.nextToken();t=this.parseAssignmentExpression()}else if(this.isStartOfExpression()){t=this.parseAssignmentExpression()}this.context.allowYield=i}return this.finalize(e,new s.YieldExpression(t,r))};Parser.prototype.parseClassElement=function(e){var t=this.lookahead;var r=this.createNode();var i="";var n=null;var u=null;var l=false;var o=false;var c=false;var h=false;if(this.match("*")){this.nextToken()}else{l=this.match("[");n=this.parseObjectPropertyKey();var f=n;if(f.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))){t=this.lookahead;c=true;l=this.match("[");if(this.match("*")){this.nextToken()}else{n=this.parseObjectPropertyKey()}}if(t.type===3&&!this.hasLineTerminator&&t.value==="async"){var p=this.lookahead.value;if(p!==":"&&p!=="("&&p!=="*"){h=true;t=this.lookahead;n=this.parseObjectPropertyKey();if(t.type===3&&t.value==="constructor"){this.tolerateUnexpectedToken(t,a.Messages.ConstructorIsAsync)}}}}var d=this.qualifiedPropertyName(this.lookahead);if(t.type===3){if(t.value==="get"&&d){i="get";l=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;u=this.parseGetterMethod()}else if(t.value==="set"&&d){i="set";l=this.match("[");n=this.parseObjectPropertyKey();u=this.parseSetterMethod()}}else if(t.type===7&&t.value==="*"&&d){i="init";l=this.match("[");n=this.parseObjectPropertyKey();u=this.parseGeneratorMethod();o=true}if(!i&&n&&this.match("(")){i="init";u=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();o=true}if(!i){this.throwUnexpectedToken(this.lookahead)}if(i==="init"){i="method"}if(!l){if(c&&this.isPropertyKey(n,"prototype")){this.throwUnexpectedToken(t,a.Messages.StaticPrototype)}if(!c&&this.isPropertyKey(n,"constructor")){if(i!=="method"||!o||u&&u.generator){this.throwUnexpectedToken(t,a.Messages.ConstructorSpecialMethod)}if(e.value){this.throwUnexpectedToken(t,a.Messages.DuplicateConstructor)}else{e.value=true}i="constructor"}}return this.finalize(r,new s.MethodDefinition(n,l,u,i,c))};Parser.prototype.parseClassElementList=function(){var e=[];var t={value:false};this.expect("{");while(!this.match("}")){if(this.match(";")){this.nextToken()}else{e.push(this.parseClassElement(t))}}this.expect("}");return e};Parser.prototype.parseClassBody=function(){var e=this.createNode();var t=this.parseClassElementList();return this.finalize(e,new s.ClassBody(t))};Parser.prototype.parseClassDeclaration=function(e){var t=this.createNode();var r=this.context.strict;this.context.strict=true;this.expectKeyword("class");var i=e&&this.lookahead.type!==3?null:this.parseVariableIdentifier();var n=null;if(this.matchKeyword("extends")){this.nextToken();n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var a=this.parseClassBody();this.context.strict=r;return this.finalize(t,new s.ClassDeclaration(i,n,a))};Parser.prototype.parseClassExpression=function(){var e=this.createNode();var t=this.context.strict;this.context.strict=true;this.expectKeyword("class");var r=this.lookahead.type===3?this.parseVariableIdentifier():null;var i=null;if(this.matchKeyword("extends")){this.nextToken();i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var n=this.parseClassBody();this.context.strict=t;return this.finalize(e,new s.ClassExpression(r,i,n))};Parser.prototype.parseModule=function(){this.context.strict=true;this.context.isModule=true;this.scanner.isModule=true;var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new s.Module(t))};Parser.prototype.parseScript=function(){var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new s.Script(t))};Parser.prototype.parseModuleSpecifier=function(){var e=this.createNode();if(this.lookahead.type!==8){this.throwError(a.Messages.InvalidModuleSpecifier)}var t=this.nextToken();var r=this.getTokenRaw(t);return this.finalize(e,new s.Literal(t.value,r))};Parser.prototype.parseImportSpecifier=function(){var e=this.createNode();var t;var r;if(this.lookahead.type===3){t=this.parseVariableIdentifier();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}}else{t=this.parseIdentifierName();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(e,new s.ImportSpecifier(r,t))};Parser.prototype.parseNamedImports=function(){this.expect("{");var e=[];while(!this.match("}")){e.push(this.parseImportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");return e};Parser.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();return this.finalize(e,new s.ImportDefaultSpecifier(t))};Parser.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*");if(!this.matchContextualKeyword("as")){this.throwError(a.Messages.NoAsAfterImportNamespace)}this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new s.ImportNamespaceSpecifier(t))};Parser.prototype.parseImportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalImportDeclaration)}var e=this.createNode();this.expectKeyword("import");var t;var r=[];if(this.lookahead.type===8){t=this.parseModuleSpecifier()}else{if(this.match("{")){r=r.concat(this.parseNamedImports())}else if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")){r.push(this.parseImportDefaultSpecifier());if(this.match(",")){this.nextToken();if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.match("{")){r=r.concat(this.parseNamedImports())}else{this.throwUnexpectedToken(this.lookahead)}}}else{this.throwUnexpectedToken(this.nextToken())}if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();t=this.parseModuleSpecifier()}this.consumeSemicolon();return this.finalize(e,new s.ImportDeclaration(r,t))};Parser.prototype.parseExportSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();var r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseIdentifierName()}return this.finalize(e,new s.ExportSpecifier(t,r))};Parser.prototype.parseExportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalExportDeclaration)}var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default")){this.nextToken();if(this.matchKeyword("function")){var r=this.parseFunctionDeclaration(true);t=this.finalize(e,new s.ExportDefaultDeclaration(r))}else if(this.matchKeyword("class")){var r=this.parseClassDeclaration(true);t=this.finalize(e,new s.ExportDefaultDeclaration(r))}else if(this.matchContextualKeyword("async")){var r=this.matchAsyncFunction()?this.parseFunctionDeclaration(true):this.parseAssignmentExpression();t=this.finalize(e,new s.ExportDefaultDeclaration(r))}else{if(this.matchContextualKeyword("from")){this.throwError(a.Messages.UnexpectedToken,this.lookahead.value)}var r=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon();t=this.finalize(e,new s.ExportDefaultDeclaration(r))}}else if(this.match("*")){this.nextToken();if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var n=this.parseModuleSpecifier();this.consumeSemicolon();t=this.finalize(e,new s.ExportAllDeclaration(n))}else if(this.lookahead.type===4){var r=void 0;switch(this.lookahead.value){case"let":case"const":r=this.parseLexicalDeclaration({inFor:false});break;case"var":case"class":case"function":r=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new s.ExportNamedDeclaration(r,[],null))}else if(this.matchAsyncFunction()){var r=this.parseFunctionDeclaration();t=this.finalize(e,new s.ExportNamedDeclaration(r,[],null))}else{var u=[];var l=null;var o=false;this.expect("{");while(!this.match("}")){o=o||this.matchKeyword("default");u.push(this.parseExportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");if(this.matchContextualKeyword("from")){this.nextToken();l=this.parseModuleSpecifier();this.consumeSemicolon()}else if(o){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}else{this.consumeSemicolon()}t=this.finalize(e,new s.ExportNamedDeclaration(null,u,l))}return t};return Parser}();t.Parser=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function assert(e,t){if(!e){throw new Error("ASSERT: "+t)}}t.assert=assert},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=function(){function ErrorHandler(){this.errors=[];this.tolerant=false}ErrorHandler.prototype.recordError=function(e){this.errors.push(e)};ErrorHandler.prototype.tolerate=function(e){if(this.tolerant){this.recordError(e)}else{throw e}};ErrorHandler.prototype.constructError=function(e,t){var r=new Error(e);try{throw r}catch(e){if(Object.create&&Object.defineProperty){r=Object.create(e);Object.defineProperty(r,"column",{value:t})}}return r};ErrorHandler.prototype.createError=function(e,t,r,i){var n="Line "+t+": "+i;var a=this.constructError(n,r);a.index=e;a.lineNumber=t;a.description=i;return a};ErrorHandler.prototype.throwError=function(e,t,r,i){throw this.createError(e,t,r,i)};ErrorHandler.prototype.tolerateError=function(e,t,r,i){var n=this.createError(e,t,r,i);if(this.tolerant){this.recordError(n)}else{throw n}};return ErrorHandler}();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(4);var a=r(11);function hexValue(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function octalValue(e){return"01234567".indexOf(e)}var s=function(){function Scanner(e,t){this.source=e;this.errorHandler=t;this.trackComment=false;this.isModule=false;this.length=e.length;this.index=0;this.lineNumber=e.length>0?1:0;this.lineStart=0;this.curlyStack=[]}Scanner.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}};Scanner.prototype.restoreState=function(e){this.index=e.index;this.lineNumber=e.lineNumber;this.lineStart=e.lineStart};Scanner.prototype.eof=function(){return this.index>=this.length};Scanner.prototype.throwUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.tolerateUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.skipSingleLineComment=function(e){var t=[];var r,i;if(this.trackComment){t=[];r=this.index-e;i={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}}}while(!this.eof()){var a=this.source.charCodeAt(this.index);++this.index;if(n.Character.isLineTerminator(a)){if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:false,slice:[r+e,this.index-1],range:[r,this.index-1],loc:i};t.push(s)}if(a===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;return t}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:false,slice:[r+e,this.index],range:[r,this.index],loc:i};t.push(s)}return t};Scanner.prototype.skipMultiLineComment=function(){var e=[];var t,r;if(this.trackComment){e=[];t=this.index-2;r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}}}while(!this.eof()){var i=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(i)){if(i===13&&this.source.charCodeAt(this.index+1)===10){++this.index}++this.lineNumber;++this.index;this.lineStart=this.index}else if(i===42){if(this.source.charCodeAt(this.index+1)===47){this.index+=2;if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(a)}return e}++this.index}else{++this.index}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(a)}this.tolerateUnexpectedToken();return e};Scanner.prototype.scanComments=function(){var e;if(this.trackComment){e=[]}var t=this.index===0;while(!this.eof()){var r=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(r)){++this.index}else if(n.Character.isLineTerminator(r)){++this.index;if(r===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;t=true}else if(r===47){r=this.source.charCodeAt(this.index+1);if(r===47){this.index+=2;var i=this.skipSingleLineComment(2);if(this.trackComment){e=e.concat(i)}t=true}else if(r===42){this.index+=2;var i=this.skipMultiLineComment();if(this.trackComment){e=e.concat(i)}}else{break}}else if(t&&r===45){if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var i=this.skipSingleLineComment(3);if(this.trackComment){e=e.concat(i)}}else{break}}else if(r===60&&!this.isModule){if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var i=this.skipSingleLineComment(4);if(this.trackComment){e=e.concat(i)}}else{break}}else{break}}return e};Scanner.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return true;default:return false}};Scanner.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}};Scanner.prototype.isRestrictedWord=function(e){return e==="eval"||e==="arguments"};Scanner.prototype.isKeyword=function(e){switch(e.length){case 2:return e==="if"||e==="in"||e==="do";case 3:return e==="var"||e==="for"||e==="new"||e==="try"||e==="let";case 4:return e==="this"||e==="else"||e==="case"||e==="void"||e==="with"||e==="enum";case 5:return e==="while"||e==="break"||e==="catch"||e==="throw"||e==="const"||e==="yield"||e==="class"||e==="super";case 6:return e==="return"||e==="typeof"||e==="delete"||e==="switch"||e==="export"||e==="import";case 7:return e==="default"||e==="finally"||e==="extends";case 8:return e==="function"||e==="continue"||e==="debugger";case 10:return e==="instanceof";default:return false}};Scanner.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){var i=t;t=(i-55296)*1024+r-56320+65536}}return t};Scanner.prototype.scanHexEscape=function(e){var t=e==="u"?4:2;var r=0;for(var i=0;i1114111||e!=="}"){this.throwUnexpectedToken()}return n.Character.fromCodePoint(t)};Scanner.prototype.getIdentifier=function(){var e=this.index++;while(!this.eof()){var t=this.source.charCodeAt(this.index);if(t===92){this.index=e;return this.getComplexIdentifier()}else if(t>=55296&&t<57343){this.index=e;return this.getComplexIdentifier()}if(n.Character.isIdentifierPart(t)){++this.index}else{break}}return this.source.slice(e,this.index)};Scanner.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index);var t=n.Character.fromCodePoint(e);this.index+=t.length;var r;if(e===92){if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierStart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t=r}while(!this.eof()){e=this.codePointAt(this.index);if(!n.Character.isIdentifierPart(e)){break}r=n.Character.fromCodePoint(e);t+=r;this.index+=r.length;if(e===92){t=t.substr(0,t.length-1);if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierPart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t+=r}}return t};Scanner.prototype.octalToDecimal=function(e){var t=e!=="0";var r=octalValue(e);if(!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){t=true;r=r*8+octalValue(this.source[this.index++]);if("0123".indexOf(e)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){r=r*8+octalValue(this.source[this.index++])}}return{code:r,octal:t}};Scanner.prototype.scanIdentifier=function(){var e;var t=this.index;var r=this.source.charCodeAt(t)===92?this.getComplexIdentifier():this.getIdentifier();if(r.length===1){e=3}else if(this.isKeyword(r)){e=4}else if(r==="null"){e=5}else if(r==="true"||r==="false"){e=1}else{e=3}if(e!==3&&t+r.length!==this.index){var i=this.index;this.index=t;this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord);this.index=i}return{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanPunctuator=function(){var e=this.index;var t=this.source[this.index];switch(t){case"(":case"{":if(t==="{"){this.curlyStack.push("{")}++this.index;break;case".":++this.index;if(this.source[this.index]==="."&&this.source[this.index+1]==="."){this.index+=2;t="..."}break;case"}":++this.index;this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4);if(t===">>>="){this.index+=4}else{t=t.substr(0,3);if(t==="==="||t==="!=="||t===">>>"||t==="<<="||t===">>="||t==="**="){this.index+=3}else{t=t.substr(0,2);if(t==="&&"||t==="||"||t==="=="||t==="!="||t==="+="||t==="-="||t==="*="||t==="/="||t==="++"||t==="--"||t==="<<"||t===">>"||t==="&="||t==="|="||t==="^="||t==="%="||t==="<="||t===">="||t==="=>"||t==="**"){this.index+=2}else{t=this.source[this.index];if("<>=!+-*%&|^/".indexOf(t)>=0){++this.index}}}}}if(this.index===e){this.throwUnexpectedToken()}return{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanHexLiteral=function(e){var t="";while(!this.eof()){if(!n.Character.isHexDigit(this.source.charCodeAt(this.index))){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanBinaryLiteral=function(e){var t="";var r;while(!this.eof()){r=this.source[this.index];if(r!=="0"&&r!=="1"){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(!this.eof()){r=this.source.charCodeAt(this.index);if(n.Character.isIdentifierStart(r)||n.Character.isDecimalDigit(r)){this.throwUnexpectedToken()}}return{type:6,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanOctalLiteral=function(e,t){var r="";var i=false;if(n.Character.isOctalDigit(e.charCodeAt(0))){i=true;r="0"+this.source[this.index++]}else{++this.index}while(!this.eof()){if(!n.Character.isOctalDigit(this.source.charCodeAt(this.index))){break}r+=this.source[this.index++]}if(!i&&r.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt(r,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0){i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,i){var s=parseInt(t||i,16);if(s>1114111){n.throwUnexpectedToken(a.Messages.InvalidRegExp)}if(s<=65535){return String.fromCharCode(s)}return r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r)}try{RegExp(i)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}};Scanner.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert(e==="/","Regular expression literal must start with a slash");var t=this.source[this.index++];var r=false;var s=false;while(!this.eof()){e=this.source[this.index++];t+=e;if(e==="\\"){e=this.source[this.index++];if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}t+=e}else if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}else if(r){if(e==="]"){r=false}}else{if(e==="/"){s=true;break}else if(e==="["){r=true}}}if(!s){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}return t.substr(1,t.length-2)};Scanner.prototype.scanRegExpFlags=function(){var e="";var t="";while(!this.eof()){var r=this.source[this.index];if(!n.Character.isIdentifierPart(r.charCodeAt(0))){break}++this.index;if(r==="\\"&&!this.eof()){r=this.source[this.index];if(r==="u"){++this.index;var i=this.index;var a=this.scanHexEscape("u");if(a!==null){t+=a;for(e+="\\u";i=55296&&e<57343){if(n.Character.isIdentifierStart(this.codePointAt(this.index))){return this.scanIdentifier()}}return this.scanPunctuator()};return Scanner}();t.Scanner=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TokenName={};t.TokenName[1]="Boolean";t.TokenName[2]="";t.TokenName[3]="Identifier";t.TokenName[4]="Keyword";t.TokenName[5]="Null";t.TokenName[6]="Numeric";t.TokenName[7]="Punctuator";t.TokenName[8]="String";t.TokenName[9]="RegularExpression";t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(10);var n=r(12);var a=r(13);var s=function(){function Reader(){this.values=[];this.curly=this.paren=-1}Reader.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0};Reader.prototype.isRegexStart=function(){var e=this.values[this.values.length-1];var t=e!==null;switch(e){case"this":case"]":t=false;break;case")":var r=this.values[this.paren-1];t=r==="if"||r==="while"||r==="for"||r==="with";break;case"}":t=false;if(this.values[this.curly-3]==="function"){var i=this.values[this.curly-4];t=i?!this.beforeFunctionExpression(i):false}else if(this.values[this.curly-4]==="function"){var i=this.values[this.curly-5];t=i?!this.beforeFunctionExpression(i):true}break;default:break}return t};Reader.prototype.push=function(e){if(e.type===7||e.type===4){if(e.value==="{"){this.curly=this.values.length}else if(e.value==="("){this.paren=this.values.length}this.values.push(e.value)}else{this.values.push(null)}};return Reader}();var u=function(){function Tokenizer(e,t){this.errorHandler=new i.ErrorHandler;this.errorHandler.tolerant=t?typeof t.tolerant==="boolean"&&t.tolerant:false;this.scanner=new n.Scanner(e,this.errorHandler);this.scanner.trackComment=t?typeof t.comment==="boolean"&&t.comment:false;this.trackRange=t?typeof t.range==="boolean"&&t.range:false;this.trackLoc=t?typeof t.loc==="boolean"&&t.loc:false;this.buffer=[];this.reader=new s}Tokenizer.prototype.errors=function(){return this.errorHandler.errors};Tokenizer.prototype.getNextToken=function(){if(this.buffer.length===0){var e=this.scanner.scanComments();if(this.scanner.trackComment){for(var t=0;t{"use strict";var r=Object;var i=Object.defineProperty;var n=Object.create;function defProp(e,t,n){if(i)try{i.call(r,e,t,{value:n})}catch(r){e[t]=n}else{e[t]=n}}function makeSafeToCall(e){if(e){defProp(e,"call",e.call);defProp(e,"apply",e.apply)}return e}makeSafeToCall(i);makeSafeToCall(n);var a=makeSafeToCall(Object.prototype.hasOwnProperty);var s=makeSafeToCall(Number.prototype.toString);var u=makeSafeToCall(String.prototype.slice);var l=function(){};function create(e){if(n){return n.call(r,e)}l.prototype=e||null;return new l}var o=Math.random;var c=create(null);function makeUniqueKey(){do{var e=internString(u.call(s.call(o(),36),2))}while(a.call(c,e));return c[e]=e}function internString(e){var t={};t[e]=true;return Object.keys(t)[0]}t.makeUniqueKey=makeUniqueKey;var h=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function getOwnPropertyNames(e){for(var t=h(e),r=0,i=0,n=t.length;ri){t[i]=t[r]}++i}}t.length=i;return t};function defaultCreatorFn(e){return create(null)}function makeAccessor(e){var t=makeUniqueKey();var r=create(null);e=e||defaultCreatorFn;function register(i){var n;function vault(t,a){if(t===r){return a?n=null:n||(n=e(i))}}defProp(i,t,vault)}function accessor(e){if(!a.call(e,t))register(e);return e[t](r)}accessor.forget=function(e){if(a.call(e,t))e[t](r,true)};return accessor}t.makeAccessor=makeAccessor},998:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});var a=i(r(357));var s=n(r(593));var u=s.namedTypes;var l=s.builtInTypes.array;var o=s.builtInTypes.object;var c=r(687);var h=r(721);var f=r(495);var p=f.makeUniqueKey();function getSortedChildNodes(e,t,r){if(!e){return}h.fixFaultyLocations(e,t);if(r){if(u.Node.check(e)&&u.SourceLocation.check(e.loc)){for(var i=r.length-1;i>=0;--i){if(h.comparePos(r[i].loc.end,e.loc.start)<=0){break}}r.splice(i+1,0,e);return}}else if(e[p]){return e[p]}var n;if(l.check(e)){n=Object.keys(e)}else if(o.check(e)){n=s.getFieldNames(e)}else{return}if(!r){Object.defineProperty(e,p,{value:r=[],enumerable:false})}for(var i=0,a=n.length;i>1;var u=i[s];if(h.comparePos(u.loc.start,t.loc.start)<=0&&h.comparePos(t.loc.end,u.loc.end)<=0){decorateComment(t.enclosingNode=u,t,r);return}if(h.comparePos(u.loc.end,t.loc.start)<=0){var l=u;n=s+1;continue}if(h.comparePos(t.loc.end,u.loc.start)<=0){var o=u;a=s;continue}throw new Error("Comment location overlaps with node location")}if(l){t.precedingNode=l}if(o){t.followingNode=o}}function attach(e,t,r){if(!l.check(e)){return}var i=[];e.forEach(function(e){e.loc.lines=r;decorateComment(t,e,r);var n=e.precedingNode;var s=e.enclosingNode;var u=e.followingNode;if(n&&u){var l=i.length;if(l>0){var o=i[l-1];a.default.strictEqual(o.precedingNode===e.precedingNode,o.followingNode===e.followingNode);if(o.followingNode!==e.followingNode){breakTies(i,r)}}i.push(e)}else if(n){breakTies(i,r);addTrailingComment(n,e)}else if(u){breakTies(i,r);addLeadingComment(u,e)}else if(s){breakTies(i,r);addDanglingComment(s,e)}else{throw new Error("AST contains no nodes at all?")}});breakTies(i,r);e.forEach(function(e){delete e.precedingNode;delete e.enclosingNode;delete e.followingNode})}t.attach=attach;function breakTies(e,t){var r=e.length;if(r===0){return}var i=e[0].precedingNode;var n=e[0].followingNode;var s=n.loc.start;for(var u=r;u>0;--u){var l=e[u-1];a.default.strictEqual(l.precedingNode,i);a.default.strictEqual(l.followingNode,n);var o=t.sliceString(l.loc.end,s);if(/\S/.test(o)){break}s=l.loc.start}while(u<=r&&(l=e[u])&&(l.type==="Line"||l.type==="CommentLine")&&l.loc.start.column>n.loc.start.column){++u}e.forEach(function(e,t){if(t1){return e[t-2]}return null};f.getValue=function getValue(){var e=this.stack;return e[e.length-1]};f.valueIsDuplicate=function(){var e=this.stack;var t=e.length-1;return e.lastIndexOf(e[t],t-1)>=0};function getNodeHelper(e,t){var r=e.stack;for(var i=r.length-1;i>=0;i-=2){var n=r[i];if(u.Node.check(n)&&--t<0){return n}}return null}f.getNode=function getNode(e){if(e===void 0){e=0}return getNodeHelper(this,~~e)};f.getParentNode=function getParentNode(e){if(e===void 0){e=0}return getNodeHelper(this,~~e+1)};f.getRootValue=function getRootValue(){var e=this.stack;if(e.length%2===0){return e[1]}return e[0]};f.call=function call(e){var t=this.stack;var r=t.length;var i=t[r-1];var n=arguments.length;for(var a=1;a0){var i=r[t.start.token-1];if(i){var n=this.getRootValue().loc;if(c.comparePos(n.start,i.loc.start)<=0){return i}}}return null};f.getNextToken=function(e){e=e||this.getNode();var t=e&&e.loc;var r=t&&t.tokens;if(r&&t.end.tokenc){return true}if(s===c&&i==="right"){a.default.strictEqual(r.right,t);return true}default:return false}case"SequenceExpression":switch(r.type){case"ReturnStatement":return false;case"ForStatement":return false;case"ExpressionStatement":return i!=="expression";default:return true}case"YieldExpression":switch(r.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return r.type==="NullableTypeAnnotation";case"Literal":return r.type==="MemberExpression"&&o.check(t.value)&&i==="object"&&r.object===t;case"NumericLiteral":return r.type==="MemberExpression"&&i==="object"&&r.object===t;case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":case"NewExpression":return i==="callee"&&r.callee===t;case"ConditionalExpression":return i==="test"&&r.test===t;case"MemberExpression":return i==="object"&&r.object===t;default:return false}case"ArrowFunctionExpression":if(u.CallExpression.check(r)&&i==="callee"){return true}if(u.MemberExpression.check(r)&&i==="object"){return true}return isBinary(r);case"ObjectExpression":if(r.type==="ArrowFunctionExpression"&&i==="body"){return true}break;case"TSAsExpression":if(r.type==="ArrowFunctionExpression"&&i==="body"&&t.expression.type==="ObjectExpression"){return true}break;case"CallExpression":if(i==="declaration"&&u.ExportDefaultDeclaration.check(r)&&u.FunctionExpression.check(t.callee)){return true}}if(r.type==="NewExpression"&&i==="callee"&&r.callee===t){return containsCallExpression(t)}if(e!==true&&!this.canBeFirstInStatement()&&this.firstInStatement()){return true}return false};function isBinary(e){return u.BinaryExpression.check(e)||u.LogicalExpression.check(e)}function isUnaryLike(e){return u.UnaryExpression.check(e)||u.SpreadElement&&u.SpreadElement.check(e)||u.SpreadProperty&&u.SpreadProperty.check(e)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%","**"]].forEach(function(e,t){e.forEach(function(e){p[e]=t})});function containsCallExpression(e){if(u.CallExpression.check(e)){return true}if(l.check(e)){return e.some(containsCallExpression)}if(u.Node.check(e)){return s.someField(e,function(e,t){return containsCallExpression(t)})}return false}f.canBeFirstInStatement=function(){var e=this.getNode();if(u.FunctionExpression.check(e)){return false}if(u.ObjectExpression.check(e)){return false}if(u.ClassExpression.check(e)){return false}return true};f.firstInStatement=function(){var e=this.stack;var t,r;var i,n;for(var s=e.length-1;s>=0;s-=2){if(u.Node.check(e[s])){i=t;n=r;t=e[s-1];r=e[s]}if(!r||!n){continue}if(u.BlockStatement.check(r)&&t==="body"&&i===0){a.default.strictEqual(r.body[0],n);return true}if(u.ExpressionStatement.check(r)&&i==="expression"){a.default.strictEqual(r.expression,n);return true}if(u.AssignmentExpression.check(r)&&i==="left"){a.default.strictEqual(r.left,n);return true}if(u.ArrowFunctionExpression.check(r)&&i==="body"){a.default.strictEqual(r.body,n);return true}if(u.SequenceExpression.check(r)&&t==="expressions"&&i===0){a.default.strictEqual(r.expressions[0],n);continue}if(u.CallExpression.check(r)&&i==="callee"){a.default.strictEqual(r.callee,n);continue}if(u.MemberExpression.check(r)&&i==="object"){a.default.strictEqual(r.object,n);continue}if(u.ConditionalExpression.check(r)&&i==="test"){a.default.strictEqual(r.test,n);continue}if(isBinary(r)&&i==="left"){a.default.strictEqual(r.left,n);continue}if(u.UnaryExpression.check(r)&&!r.prefix&&i==="argument"){a.default.strictEqual(r.argument,n);continue}return false}return true};t.default=h},687:function(e,t,r){"use strict";var i=this&&this.__assign||function(){i=Object.assign||function(e){for(var t,r=1,i=arguments.length;r0);this.length=e.length;this.name=t||null;if(this.name){this.mappings.push(new o.default(this,{start:this.firstPos(),end:this.lastPos()}))}}Lines.prototype.toString=function(e){return this.sliceString(this.firstPos(),this.lastPos(),e)};Lines.prototype.getSourceMap=function(e,t){if(!e){return null}var r=this;function updateJSON(r){r=r||{};r.file=e;if(t){r.sourceRoot=t}return r}if(r.cachedSourceMap){return updateJSON(r.cachedSourceMap.toJSON())}var i=new s.default.SourceMapGenerator(updateJSON());var n={};r.mappings.forEach(function(e){var t=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos();var s=r.skipSpaces(e.targetLoc.start)||r.lastPos();while(l.comparePos(t,e.sourceLoc.end)<0&&l.comparePos(s,e.targetLoc.end)<0){var u=e.sourceLines.charAt(t);var o=r.charAt(s);a.default.strictEqual(u,o);var c=e.sourceLines.name;i.addMapping({source:c,original:{line:t.line,column:t.column},generated:{line:s.line,column:s.column}});if(!f.call(n,c)){var h=e.sourceLines.toString();i.setSourceContent(c,h);n[c]=h}r.nextPos(s,true);e.sourceLines.nextPos(t,true)}});r.cachedSourceMap=i;return i.toJSON()};Lines.prototype.bootstrapCharAt=function(e){a.default.strictEqual(typeof e,"object");a.default.strictEqual(typeof e.line,"number");a.default.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,i=this.toString().split(m),n=i[t-1];if(typeof n==="undefined")return"";if(r===n.length&&t=n.length)return"";return n.charAt(r)};Lines.prototype.charAt=function(e){a.default.strictEqual(typeof e,"object");a.default.strictEqual(typeof e.line,"number");a.default.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,i=this,n=i.infos,s=n[t-1],u=r;if(typeof s==="undefined"||u<0)return"";var l=this.getIndentAt(t);if(u=s.sliceEnd)return"";return s.line.charAt(u)};Lines.prototype.stripMargin=function(e,t){if(e===0)return this;a.default.ok(e>0,"negative margin: "+e);if(t&&this.length===1)return this;var r=new Lines(this.infos.map(function(r,n){if(r.line&&(n>0||!t)){r=i({},r,{indent:Math.max(0,r.indent-e)})}return r}));if(this.mappings.length>0){var n=r.mappings;a.default.strictEqual(n.length,0);this.mappings.forEach(function(r){n.push(r.indent(e,t,true))})}return r};Lines.prototype.indent=function(e){if(e===0){return this}var t=new Lines(this.infos.map(function(t){if(t.line&&!t.locked){t=i({},t,{indent:t.indent+e})}return t}));if(this.mappings.length>0){var r=t.mappings;a.default.strictEqual(r.length,0);this.mappings.forEach(function(t){r.push(t.indent(e))})}return t};Lines.prototype.indentTail=function(e){if(e===0){return this}if(this.length<2){return this}var t=new Lines(this.infos.map(function(t,r){if(r>0&&t.line&&!t.locked){t=i({},t,{indent:t.indent+e})}return t}));if(this.mappings.length>0){var r=t.mappings;a.default.strictEqual(r.length,0);this.mappings.forEach(function(t){r.push(t.indent(e,true))})}return t};Lines.prototype.lockIndentTail=function(){if(this.length<2){return this}return new Lines(this.infos.map(function(e,t){return i({},e,{locked:t>0})}))};Lines.prototype.getIndentAt=function(e){a.default.ok(e>=1,"no line "+e+" (line numbers start from 1)");return Math.max(this.infos[e-1].indent,0)};Lines.prototype.guessTabWidth=function(){if(typeof this.cachedTabWidth==="number"){return this.cachedTabWidth}var e=[];var t=0;for(var r=1,i=this.length;r<=i;++r){var n=this.infos[r-1];var a=n.line.slice(n.sliceStart,n.sliceEnd);if(isOnlyWhitespace(a)){continue}var s=Math.abs(n.indent-t);e[s]=~~e[s]+1;t=n.indent}var u=-1;var l=2;for(var o=1;ou){u=e[o];l=o}}return this.cachedTabWidth=l};Lines.prototype.startsWithComment=function(){if(this.infos.length===0){return false}var e=this.infos[0],t=e.sliceStart,r=e.sliceEnd,i=e.line.slice(t,r).trim();return i.length===0||i.slice(0,2)==="//"||i.slice(0,2)==="/*"};Lines.prototype.isOnlyWhitespace=function(){return isOnlyWhitespace(this.toString())};Lines.prototype.isPrecededOnlyByWhitespace=function(e){var t=this.infos[e.line-1];var r=Math.max(t.indent,0);var i=e.column-r;if(i<=0){return true}var n=t.sliceStart;var a=Math.min(n+i,t.sliceEnd);var s=t.line.slice(n,a);return isOnlyWhitespace(s)};Lines.prototype.getLineLength=function(e){var t=this.infos[e-1];return this.getIndentAt(e)+t.sliceEnd-t.sliceStart};Lines.prototype.nextPos=function(e,t){if(t===void 0){t=false}var r=Math.max(e.line,0),i=Math.max(e.column,0);if(i0){r.push(r.pop().slice(0,t.column));r[0]=r[0].slice(e.column)}return fromString(r.join("\n"))};Lines.prototype.slice=function(e,t){if(!t){if(!e){return this}t=this.lastPos()}if(!e){throw new Error("cannot slice with end but not start")}var r=this.infos.slice(e.line-1,t.line);if(e.line===t.line){r[0]=sliceInfo(r[0],e.column,t.column)}else{a.default.ok(e.line0){var n=i.mappings;a.default.strictEqual(n.length,0);this.mappings.forEach(function(r){var i=r.slice(this,e,t);if(i){n.push(i)}},this)}return i};Lines.prototype.bootstrapSliceString=function(e,t,r){return this.slice(e,t).toString(r)};Lines.prototype.sliceString=function(e,t,r){if(e===void 0){e=this.firstPos()}if(t===void 0){t=this.lastPos()}r=u.normalize(r);var i=[];var n=r.tabWidth,a=n===void 0?2:n;for(var s=e.line;s<=t.line;++s){var l=this.infos[s-1];if(s===e.line){if(s===t.line){l=sliceInfo(l,e.column,t.column)}else{l=sliceInfo(l,e.column)}}else if(s===t.line){l=sliceInfo(l,0,t.column)}var o=Math.max(l.indent,0);var c=l.line.slice(0,l.sliceStart);if(r.reuseWhitespace&&isOnlyWhitespace(c)&&countSpaces(c,r.tabWidth)===o){i.push(l.line.slice(0,l.sliceEnd));continue}var h=0;var f=o;if(r.useTabs){h=Math.floor(o/a);f-=h*a}var p="";if(h>0){p+=new Array(h+1).join("\t")}if(f>0){p+=new Array(f+1).join(" ")}p+=l.line.slice(l.sliceStart,l.sliceEnd);i.push(p)}return i.join(r.lineTerminator)};Lines.prototype.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1};Lines.prototype.join=function(e){var t=this;var r=[];var n=[];var a;function appendLines(e){if(e===null){return}if(a){var t=e.infos[0];var s=new Array(t.indent+1).join(" ");var u=r.length;var l=Math.max(a.indent,0)+a.sliceEnd-a.sliceStart;a.line=a.line.slice(0,a.sliceEnd)+s+t.line.slice(t.sliceStart,t.sliceEnd);a.locked=a.locked||t.locked;a.sliceEnd=a.line.length;if(e.mappings.length>0){e.mappings.forEach(function(e){n.push(e.add(u,l))})}}else if(e.mappings.length>0){n.push.apply(n,e.mappings)}e.infos.forEach(function(e,t){if(!a||t>0){a=i({},e);r.push(a)}})}function appendWithSeparator(e,r){if(r>0)appendLines(t);appendLines(e)}e.map(function(e){var t=fromString(e);if(t.isEmpty())return null;return t}).forEach(function(e,r){if(t.isEmpty()){appendLines(e)}else{appendWithSeparator(e,r)}});if(r.length<1)return v;var s=new Lines(r);s.mappings=n;return s};Lines.prototype.concat=function(){var e=[];for(var t=0;t0);var s=Math.ceil(r/t)*t;if(s===r){r+=t}else{r=s}break;case 11:case 12:case 13:case 65279:break;case 32:default:r+=1;break}}return r}t.countSpaces=countSpaces;var d=/^\s*/;var m=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;function fromString(e,t){if(e instanceof c)return e;e+="";var r=t&&t.tabWidth;var i=e.indexOf("\t")<0;var n=!t&&i&&e.length<=p;a.default.ok(r||i,"No tab width specified but encountered tabs in string\n"+e);if(n&&f.call(h,e))return h[e];var s=new c(e.split(m).map(function(e){var t=d.exec(e)[0];return{line:e,indent:countSpaces(t,r),locked:false,sliceStart:t.length,sliceEnd:e.length}}),u.normalize(t).sourceFileName);if(n)h[e]=s;return s}t.fromString=fromString;function isOnlyWhitespace(e){return!/\S/.test(e)}function sliceInfo(e,t,r){var i=e.sliceStart;var n=e.sliceEnd;var s=Math.max(e.indent,0);var u=s+n-i;if(typeof r==="undefined"){r=u}t=Math.max(t,0);r=Math.min(r,u);r=Math.max(r,t);if(r=0);a.default.ok(i<=n);a.default.strictEqual(u,s+n-i);if(e.indent===s&&e.sliceStart===i&&e.sliceEnd===n){return e}return{line:e.line,indent:s,locked:false,sliceStart:i,sliceEnd:n}}function concat(e){return v.join(e)}t.concat=concat;var v=fromString("")},788:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});var n=i(r(357));var a=r(721);var s=function(){function Mapping(e,t,r){if(r===void 0){r=t}this.sourceLines=e;this.sourceLoc=t;this.targetLoc=r}Mapping.prototype.slice=function(e,t,r){if(r===void 0){r=e.lastPos()}var i=this.sourceLines;var s=this.sourceLoc;var u=this.targetLoc;function skip(a){var l=s[a];var o=u[a];var c=t;if(a==="end"){c=r}else{n.default.strictEqual(a,"start")}return skipChars(i,l,e,o,c)}if(a.comparePos(t,u.start)<=0){if(a.comparePos(u.end,r)<=0){u={start:subtractPos(u.start,t.line,t.column),end:subtractPos(u.end,t.line,t.column)}}else if(a.comparePos(r,u.start)<=0){return null}else{s={start:s.start,end:skip("end")};u={start:subtractPos(u.start,t.line,t.column),end:subtractPos(r,t.line,t.column)}}}else{if(a.comparePos(u.end,t)<=0){return null}if(a.comparePos(u.end,r)<=0){s={start:skip("start"),end:s.end};u={start:{line:1,column:0},end:subtractPos(u.end,t.line,t.column)}}else{s={start:skip("start"),end:skip("end")};u={start:{line:1,column:0},end:subtractPos(r,t.line,t.column)}}}return new Mapping(this.sourceLines,s,u)};Mapping.prototype.add=function(e,t){return new Mapping(this.sourceLines,this.sourceLoc,{start:addPos(this.targetLoc.start,e,t),end:addPos(this.targetLoc.end,e,t)})};Mapping.prototype.subtract=function(e,t){return new Mapping(this.sourceLines,this.sourceLoc,{start:subtractPos(this.targetLoc.start,e,t),end:subtractPos(this.targetLoc.end,e,t)})};Mapping.prototype.indent=function(e,t,r){if(t===void 0){t=false}if(r===void 0){r=false}if(e===0){return this}var i=this.targetLoc;var n=i.start.line;var a=i.end.line;if(t&&n===1&&a===1){return this}i={start:i.start,end:i.end};if(!t||n>1){var s=i.start.column+e;i.start={line:n,column:r?Math.max(0,s):s}}if(!t||a>1){var u=i.end.column+e;i.end={line:a,column:r?Math.max(0,u):u}}return new Mapping(this.sourceLines,this.sourceLoc,i)};return Mapping}();t.default=s;function addPos(e,t,r){return{line:e.line+t-1,column:e.line===1?e.column+r:e.column}}function subtractPos(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}function skipChars(e,t,r,i,s){var u=a.comparePos(i,s);if(u===0){return t}if(u<0){var l=e.skipSpaces(t)||e.lastPos();var o=r.skipSpaces(i)||r.lastPos();var c=s.line-o.line;l.line+=c;o.line+=c;if(c>0){l.column=0;o.column=0}else{n.default.strictEqual(c,0)}while(a.comparePos(o,s)<0&&r.nextPos(o,true)){n.default.ok(e.nextPos(l,true));n.default.strictEqual(e.charAt(l),r.charAt(o))}}else{var l=e.skipSpaces(t,true)||e.firstPos();var o=r.skipSpaces(i,true)||r.firstPos();var c=s.line-o.line;l.line+=c;o.line+=c;if(c<0){l.column=e.getLineLength(l.line);o.column=r.getLineLength(o.line)}else{n.default.strictEqual(c,0)}while(a.comparePos(s,o)<0&&r.prevPos(o,true)){n.default.ok(e.prevPos(l,true));n.default.strictEqual(e.charAt(l),r.charAt(o))}}return l}},309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i={parser:r(685),tabWidth:4,useTabs:false,reuseWhitespace:true,lineTerminator:r(87).EOL||"\n",wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:false,tolerant:true,quote:null,trailingComma:false,arrayBracketSpacing:false,objectCurlySpacing:true,arrowParensAlways:false,flowObjectCommas:true,tokens:true},n=i.hasOwnProperty;function normalize(e){var t=e||i;function get(e){return n.call(t,e)?t[e]:i[e]}return{tabWidth:+get("tabWidth"),useTabs:!!get("useTabs"),reuseWhitespace:!!get("reuseWhitespace"),lineTerminator:get("lineTerminator"),wrapColumn:Math.max(get("wrapColumn"),0),sourceFileName:get("sourceFileName"),sourceMapName:get("sourceMapName"),sourceRoot:get("sourceRoot"),inputSourceMap:get("inputSourceMap"),parser:get("esprima")||get("parser"),range:get("range"),tolerant:get("tolerant"),quote:get("quote"),trailingComma:get("trailingComma"),arrayBracketSpacing:get("arrayBracketSpacing"),objectCurlySpacing:get("objectCurlySpacing"),arrowParensAlways:get("arrowParensAlways"),flowObjectCommas:get("flowObjectCommas"),tokens:!!get("tokens")}}t.normalize=normalize},382:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});var a=i(r(357));var s=n(r(593));var u=s.builders;var l=s.builtInTypes.object;var o=s.builtInTypes.array;var c=r(309);var h=r(687);var f=r(998);var p=n(r(721));function parse(e,t){t=c.normalize(t);var i=h.fromString(e,t);var n=i.toString({tabWidth:t.tabWidth,reuseWhitespace:false,useTabs:false});var a=[];var s=t.parser.parse(n,{jsx:true,loc:true,locations:true,range:t.range,comment:true,onComment:a,tolerant:p.getOption(t,"tolerant",true),ecmaVersion:6,sourceType:p.getOption(t,"sourceType","module")});var l=Array.isArray(s.tokens)?s.tokens:r(609).tokenize(n,{loc:true});delete s.tokens;l.forEach(function(e){if(typeof e.value!=="string"){e.value=i.sliceString(e.loc.start,e.loc.end)}});if(Array.isArray(s.comments)){a=s.comments;delete s.comments}if(s.loc){p.fixFaultyLocations(s,i)}else{s.loc={start:i.firstPos(),end:i.lastPos()}}s.loc.lines=i;s.loc.indent=0;var o;var m;if(s.type==="Program"){m=s;o=u.file(s,t.sourceFileName||null);o.loc={start:i.firstPos(),end:i.lastPos(),lines:i,indent:0}}else if(s.type==="File"){o=s;m=o.program}if(t.tokens){o.tokens=l}var v=p.getTrueLoc({type:m.type,loc:m.loc,body:[],comments:a},i);m.loc.start=v.start;m.loc.end=v.end;f.attach(a,m.body.length?o.program:o,i);return new d(i,l).copy(o)}t.parse=parse;var d=function TreeCopier(e,t){a.default.ok(this instanceof TreeCopier);this.lines=e;this.tokens=t;this.startTokenIndex=0;this.endTokenIndex=t.length;this.indent=0;this.seen=new Map};var m=d.prototype;m.copy=function(e){if(this.seen.has(e)){return this.seen.get(e)}if(o.check(e)){var t=new Array(e.length);this.seen.set(e,t);e.forEach(function(e,r){t[r]=this.copy(e)},this);return t}if(!l.check(e)){return e}p.fixFaultyLocations(e,this.lines);var t=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:false,enumerable:false,writable:true}});this.seen.set(e,t);var r=e.loc;var i=this.indent;var n=i;var a=this.startTokenIndex;var s=this.endTokenIndex;if(r){if(e.type==="Block"||e.type==="Line"||e.type==="CommentBlock"||e.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(r.start)){n=this.indent=r.start.column}r.lines=this.lines;r.tokens=this.tokens;r.indent=n;this.findTokenRange(r)}var u=Object.keys(e);var c=u.length;for(var h=0;h0){var t=e.tokens[this.startTokenIndex];if(p.comparePos(e.start,t.loc.start)<0){--this.startTokenIndex}else break}while(this.endTokenIndexthis.startTokenIndex){var t=e.tokens[this.endTokenIndex-1];if(p.comparePos(e.end,t.loc.end)<0){--this.endTokenIndex}else break}e.end.token=this.endTokenIndex}},844:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});var a=i(r(357));var s=n(r(687));var u=n(r(593));var l=u.namedTypes.Printable;var o=u.namedTypes.Expression;var c=u.namedTypes.ReturnStatement;var h=u.namedTypes.SourceLocation;var f=r(721);var p=i(r(236));var d=u.builtInTypes.object;var m=u.builtInTypes.array;var v=u.builtInTypes.string;var y=/[0-9a-z_$]/i;var x=function Patcher(e){a.default.ok(this instanceof Patcher);a.default.ok(e instanceof s.Lines);var t=this,r=[];t.replace=function(e,t){if(v.check(t))t=s.fromString(t);r.push({lines:t,start:e.start,end:e.end})};t.get=function(t){t=t||{start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}};var i=t.start,n=[];function pushSlice(t,r){a.default.ok(f.comparePos(t,r)<=0);n.push(e.slice(t,r))}r.sort(function(e,t){return f.comparePos(e.start,t.start)}).forEach(function(e){if(f.comparePos(i,e.start)>0){}else{pushSlice(i,e.start);n.push(e.lines);i=e.end}});pushSlice(i,t.end);return s.concat(n)}};t.Patcher=x;var E=x.prototype;E.tryToReprintComments=function(e,t,r){var i=this;if(!e.comments&&!t.comments){return true}var n=p.default.from(e);var s=p.default.from(t);n.stack.push("comments",getSurroundingComments(e));s.stack.push("comments",getSurroundingComments(t));var u=[];var l=findArrayReprints(n,s,u);if(l&&u.length>0){u.forEach(function(e){var t=e.oldPath.getValue();a.default.ok(t.leading||t.trailing);i.replace(t.loc,r(e.newPath).indentTail(t.loc.indent))})}return l};function getSurroundingComments(e){var t=[];if(e.comments&&e.comments.length>0){e.comments.forEach(function(e){if(e.leading||e.trailing){t.push(e)}})}return t}E.deleteComments=function(e){if(!e.comments){return}var t=this;e.comments.forEach(function(r){if(r.leading){t.replace({start:r.loc.start,end:e.loc.lines.skipSpaces(r.loc.end,false,false)},"")}else if(r.trailing){t.replace({start:e.loc.lines.skipSpaces(r.loc.start,true,false),end:r.loc.end},"")}})};function getReprinter(e){a.default.ok(e instanceof p.default);var t=e.getValue();if(!l.check(t))return;var r=t.original;var i=r&&r.loc;var n=i&&i.lines;var u=[];if(!n||!findReprints(e,u))return;return function(t){var a=new x(n);u.forEach(function(e){var r=e.newPath.getValue();var i=e.oldPath.getValue();h.assert(i.loc,true);var u=!a.tryToReprintComments(r,i,t);if(u){a.deleteComments(i)}var l=t(e.newPath,{includeComments:u,avoidRootParens:i.type===r.type&&e.oldPath.hasParens()}).indentTail(i.loc.indent);var o=needsLeadingSpace(n,i.loc,l);var c=needsTrailingSpace(n,i.loc,l);if(o||c){var f=[];o&&f.push(" ");f.push(l);c&&f.push(" ");l=s.concat(f)}a.replace(i.loc,l)});var l=a.get(i).indentTail(-r.loc.indent);if(e.needsParens()){return s.concat(["(",l,")"])}return l}}t.getReprinter=getReprinter;function needsLeadingSpace(e,t,r){var i=f.copyPos(t.start);var n=e.prevPos(i)&&e.charAt(i);var a=r.charAt(r.firstPos());return n&&y.test(n)&&a&&y.test(a)}function needsTrailingSpace(e,t,r){var i=e.charAt(t.end);var n=r.lastPos();var a=r.prevPos(n)&&r.charAt(n);return a&&y.test(a)&&i&&y.test(i)}function findReprints(e,t){var r=e.getValue();l.assert(r);var i=r.original;l.assert(i);a.default.deepEqual(t,[]);if(r.type!==i.type){return false}var n=new p.default(i);var s=findChildReprints(e,n,t);if(!s){t.length=0}return s}function findAnyReprints(e,t,r){var i=e.getValue();var n=t.getValue();if(i===n)return true;if(m.check(i))return findArrayReprints(e,t,r);if(d.check(i))return findObjectReprints(e,t,r);return false}function findArrayReprints(e,t,r){var i=e.getValue();var n=t.getValue();if(i===n||e.valueIsDuplicate()||t.valueIsDuplicate()){return true}m.assert(i);var a=i.length;if(!(m.check(n)&&n.length===a))return false;for(var s=0;ss){return false}return true}},413:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});var a=i(r(357));var s=r(998);var u=r(687);var l=r(309);var o=r(844);var c=n(r(593));var h=c.namedTypes;var f=c.builtInTypes.string;var p=c.builtInTypes.object;var d=i(r(236));var m=n(r(721));var v=function PrintResult(e,t){a.default.ok(this instanceof PrintResult);f.assert(e);this.code=e;if(t){p.assert(t);this.map=t}};var y=v.prototype;var x=false;y.toString=function(){if(!x){console.warn("Deprecation warning: recast.print now returns an object with "+"a .code property. You appear to be treating the object as a "+"string, which might still work but is strongly discouraged.");x=true}return this.code};var E=new v("");var S=function Printer(e){a.default.ok(this instanceof Printer);var t=e&&e.tabWidth;e=l.normalize(e);e.sourceFileName=null;function makePrintFunctionWith(e,t){e=Object.assign({},e,t);return function(t){return print(t,e)}}function print(r,i){a.default.ok(r instanceof d.default);i=i||{};if(i.includeComments){return s.printComments(r,makePrintFunctionWith(i,{includeComments:false}))}var n=e.tabWidth;if(!t){var u=r.getNode().loc;if(u&&u.lines&&u.lines.guessTabWidth){e.tabWidth=u.lines.guessTabWidth()}}var l=o.getReprinter(r);var c=l?l(print):genericPrint(r,e,i,makePrintFunctionWith(i,{includeComments:true,avoidRootParens:false}));e.tabWidth=n;return c}this.print=function(t){if(!t){return E}var r=print(d.default.from(t),{includeComments:true,avoidRootParens:false});return new v(r.toString(e),m.composeSourceMaps(e.inputSourceMap,r.getSourceMap(e.sourceMapName,e.sourceRoot)))};this.printGenerically=function(t){if(!t){return E}function printGenerically(t){return s.printComments(t,function(t){return genericPrint(t,e,{includeComments:true,avoidRootParens:false},printGenerically)})}var r=d.default.from(t);var i=e.reuseWhitespace;e.reuseWhitespace=false;var n=new v(printGenerically(r).toString(e));e.reuseWhitespace=i;return n}};t.Printer=S;function genericPrint(e,t,r,i){a.default.ok(e instanceof d.default);var n=e.getValue();var s=[];var l=genericPrintNoParens(e,t,i);if(!n||l.isEmpty()){return l}var o=false;var c=printDecorators(e,i);if(c.isEmpty()){if(!r.avoidRootParens){o=e.needsParens()}}else{s.push(c)}if(o){s.unshift("(")}s.push(l);if(o){s.push(")")}return u.concat(s)}function genericPrintNoParens(e,t,r){var i=e.getValue();if(!i){return u.fromString("")}if(typeof i==="string"){return u.fromString(i,t)}h.Printable.assert(i);var n=[];switch(i.type){case"File":return e.call(r,"program");case"Program":if(i.directives){e.each(function(e){n.push(r(e),";\n")},"directives")}if(i.interpreter){n.push(e.call(r,"interpreter"))}n.push(e.call(function(e){return printStatementSequence(e,t,r)},"body"));return u.concat(n);case"Noop":case"EmptyStatement":return u.fromString("");case"ExpressionStatement":return u.concat([e.call(r,"expression"),";"]);case"ParenthesizedExpression":return u.concat(["(",e.call(r,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return u.fromString(" ").join([e.call(r,"left"),i.operator,e.call(r,"right")]);case"AssignmentPattern":return u.concat([e.call(r,"left")," = ",e.call(r,"right")]);case"MemberExpression":case"OptionalMemberExpression":n.push(e.call(r,"object"));var s=e.call(r,"property");var l=i.type==="OptionalMemberExpression"&&i.optional;if(i.computed){n.push(l?"?.[":"[",s,"]")}else{n.push(l?"?.":".",s)}return u.concat(n);case"MetaProperty":return u.concat([e.call(r,"meta"),".",e.call(r,"property")]);case"BindExpression":if(i.object){n.push(e.call(r,"object"))}n.push("::",e.call(r,"callee"));return u.concat(n);case"Path":return u.fromString(".").join(i.body);case"Identifier":return u.concat([u.fromString(i.name,t),i.optional?"?":"",e.call(r,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"ObjectTypeSpreadProperty":case"RestElement":return u.concat(["...",e.call(r,"argument"),e.call(r,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSDeclareFunction":if(i.declare){n.push("declare ")}if(i.async){n.push("async ")}n.push("function");if(i.generator)n.push("*");if(i.id){n.push(" ",e.call(r,"id"),e.call(r,"typeParameters"))}else{if(i.typeParameters){n.push(e.call(r,"typeParameters"))}}n.push("(",printFunctionParams(e,t,r),")",e.call(r,"returnType"));if(i.body){n.push(" ",e.call(r,"body"))}return u.concat(n);case"ArrowFunctionExpression":if(i.async){n.push("async ")}if(i.typeParameters){n.push(e.call(r,"typeParameters"))}if(!t.arrowParensAlways&&i.params.length===1&&!i.rest&&i.params[0].type==="Identifier"&&!i.params[0].typeAnnotation&&!i.returnType){n.push(e.call(r,"params",0))}else{n.push("(",printFunctionParams(e,t,r),")",e.call(r,"returnType"))}n.push(" => ",e.call(r,"body"));return u.concat(n);case"MethodDefinition":return printMethod(e,t,r);case"YieldExpression":n.push("yield");if(i.delegate)n.push("*");if(i.argument)n.push(" ",e.call(r,"argument"));return u.concat(n);case"AwaitExpression":n.push("await");if(i.all)n.push("*");if(i.argument)n.push(" ",e.call(r,"argument"));return u.concat(n);case"ModuleDeclaration":n.push("module",e.call(r,"id"));if(i.source){a.default.ok(!i.body);n.push("from",e.call(r,"source"))}else{n.push(e.call(r,"body"))}return u.fromString(" ").join(n);case"ImportSpecifier":if(i.importKind&&i.importKind!=="value"){n.push(i.importKind+" ")}if(i.imported){n.push(e.call(r,"imported"));if(i.local&&i.local.name!==i.imported.name){n.push(" as ",e.call(r,"local"))}}else if(i.id){n.push(e.call(r,"id"));if(i.name){n.push(" as ",e.call(r,"name"))}}return u.concat(n);case"ExportSpecifier":if(i.local){n.push(e.call(r,"local"));if(i.exported&&i.exported.name!==i.local.name){n.push(" as ",e.call(r,"exported"))}}else if(i.id){n.push(e.call(r,"id"));if(i.name){n.push(" as ",e.call(r,"name"))}}return u.concat(n);case"ExportBatchSpecifier":return u.fromString("*");case"ImportNamespaceSpecifier":n.push("* as ");if(i.local){n.push(e.call(r,"local"))}else if(i.id){n.push(e.call(r,"id"))}return u.concat(n);case"ImportDefaultSpecifier":if(i.local){return e.call(r,"local")}return e.call(r,"id");case"TSExportAssignment":return u.concat(["export = ",e.call(r,"expression")]);case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return printExportDeclaration(e,t,r);case"ExportAllDeclaration":n.push("export *");if(i.exported){n.push(" as ",e.call(r,"exported"))}n.push(" from ",e.call(r,"source"),";");return u.concat(n);case"TSNamespaceExportDeclaration":n.push("export as namespace ",e.call(r,"id"));return maybeAddSemicolon(u.concat(n));case"ExportNamespaceSpecifier":return u.concat(["* as ",e.call(r,"exported")]);case"ExportDefaultSpecifier":return e.call(r,"exported");case"Import":return u.fromString("import",t);case"ImportDeclaration":{n.push("import ");if(i.importKind&&i.importKind!=="value"){n.push(i.importKind+" ")}if(i.specifiers&&i.specifiers.length>0){var o=[];var c=[];e.each(function(e){var t=e.getValue();if(t.type==="ImportSpecifier"){c.push(r(e))}else if(t.type==="ImportDefaultSpecifier"||t.type==="ImportNamespaceSpecifier"){o.push(r(e))}},"specifiers");o.forEach(function(e,t){if(t>0){n.push(", ")}n.push(e)});if(c.length>0){var f=u.fromString(", ").join(c);if(f.getLineLength(1)>t.wrapColumn){f=u.concat([u.fromString(",\n").join(c).indent(t.tabWidth),","])}if(o.length>0){n.push(", ")}if(f.length>1){n.push("{\n",f,"\n}")}else if(t.objectCurlySpacing){n.push("{ ",f," }")}else{n.push("{",f,"}")}}n.push(" from ")}n.push(e.call(r,"source"),";");return u.concat(n)}case"BlockStatement":var p=e.call(function(e){return printStatementSequence(e,t,r)},"body");if(p.isEmpty()){if(!i.directives||i.directives.length===0){return u.fromString("{}")}}n.push("{\n");if(i.directives){e.each(function(e){n.push(maybeAddSemicolon(r(e).indent(t.tabWidth)),i.directives.length>1||!p.isEmpty()?"\n":"")},"directives")}n.push(p.indent(t.tabWidth));n.push("\n}");return u.concat(n);case"ReturnStatement":n.push("return");if(i.argument){var d=e.call(r,"argument");if(d.startsWithComment()||d.length>1&&h.JSXElement&&h.JSXElement.check(i.argument)){n.push(" (\n",d.indent(t.tabWidth),"\n)")}else{n.push(" ",d)}}n.push(";");return u.concat(n);case"CallExpression":case"OptionalCallExpression":n.push(e.call(r,"callee"));if(i.typeParameters){n.push(e.call(r,"typeParameters"))}if(i.typeArguments){n.push(e.call(r,"typeArguments"))}if(i.type==="OptionalCallExpression"&&i.callee.type!=="OptionalMemberExpression"){n.push("?.")}n.push(printArgumentsList(e,t,r));return u.concat(n);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var v=false;var y=i.type==="ObjectTypeAnnotation";var x=t.flowObjectCommas?",":y?";":",";var E=[];if(y){E.push("indexers","callProperties");if(i.internalSlots!=null){E.push("internalSlots")}}E.push("properties");var S=0;E.forEach(function(e){S+=i[e].length});var D=y&&S===1||S===0;var b=i.exact?"{|":"{";var g=i.exact?"|}":"}";n.push(D?b:b+"\n");var C=n.length-1;var A=0;E.forEach(function(i){e.each(function(e){var i=r(e);if(!D){i=i.indent(t.tabWidth)}var a=!y&&i.length>1;if(a&&v){n.push("\n")}n.push(i);if(A0){n.push(x," ")}n.push(T)}else{n.push("\n",T.indent(t.tabWidth))}}n.push(D?g:"\n"+g);if(A!==0&&D&&t.objectCurlySpacing){n[C]=b+" ";n[n.length-1]=" "+g}if(i.typeAnnotation){n.push(e.call(r,"typeAnnotation"))}return u.concat(n);case"PropertyPattern":return u.concat([e.call(r,"key"),": ",e.call(r,"pattern")]);case"ObjectProperty":case"Property":if(i.method||i.kind==="get"||i.kind==="set"){return printMethod(e,t,r)}if(i.shorthand&&i.value.type==="AssignmentPattern"){return e.call(r,"value")}var F=e.call(r,"key");if(i.computed){n.push("[",F,"]")}else{n.push(F)}if(!i.shorthand){n.push(": ",e.call(r,"value"))}return u.concat(n);case"ClassMethod":case"ObjectMethod":case"ClassPrivateMethod":case"TSDeclareMethod":return printMethod(e,t,r);case"PrivateName":return u.concat(["#",e.call(r,"id")]);case"Decorator":return u.concat(["@",e.call(r,"expression")]);case"ArrayExpression":case"ArrayPattern":var w=i.elements,S=w.length;var P=e.map(r,"elements");var k=u.fromString(", ").join(P);var D=k.getLineLength(1)<=t.wrapColumn;if(D){if(t.arrayBracketSpacing){n.push("[ ")}else{n.push("[")}}else{n.push("[\n")}e.each(function(e){var r=e.getName();var i=e.getValue();if(!i){n.push(",")}else{var a=P[r];if(D){if(r>0)n.push(" ")}else{a=a.indent(t.tabWidth)}n.push(a);if(r1){n.push(u.fromString(",\n").join(P).indentTail(i.kind.length+1))}else{n.push(P[0])}var I=e.getParentNode();if(!h.ForStatement.check(I)&&!h.ForInStatement.check(I)&&!(h.ForOfStatement&&h.ForOfStatement.check(I))&&!(h.ForAwaitStatement&&h.ForAwaitStatement.check(I))){n.push(";")}return u.concat(n);case"VariableDeclarator":return i.init?u.fromString(" = ").join([e.call(r,"id"),e.call(r,"init")]):e.call(r,"id");case"WithStatement":return u.concat(["with (",e.call(r,"object"),") ",e.call(r,"body")]);case"IfStatement":var N=adjustClause(e.call(r,"consequent"),t);n.push("if (",e.call(r,"test"),")",N);if(i.alternate)n.push(endsWithBrace(N)?" else":"\nelse",adjustClause(e.call(r,"alternate"),t));return u.concat(n);case"ForStatement":var O=e.call(r,"init"),j=O.length>1?";\n":"; ",X="for (",J=u.fromString(j).join([O,e.call(r,"test"),e.call(r,"update")]).indentTail(X.length),L=u.concat([X,J,")"]),z=adjustClause(e.call(r,"body"),t);n.push(L);if(L.length>1){n.push("\n");z=z.trimLeft()}n.push(z);return u.concat(n);case"WhileStatement":return u.concat(["while (",e.call(r,"test"),")",adjustClause(e.call(r,"body"),t)]);case"ForInStatement":return u.concat([i.each?"for each (":"for (",e.call(r,"left")," in ",e.call(r,"right"),")",adjustClause(e.call(r,"body"),t)]);case"ForOfStatement":case"ForAwaitStatement":n.push("for ");if(i.await||i.type==="ForAwaitStatement"){n.push("await ")}n.push("(",e.call(r,"left")," of ",e.call(r,"right"),")",adjustClause(e.call(r,"body"),t));return u.concat(n);case"DoWhileStatement":var U=u.concat(["do",adjustClause(e.call(r,"body"),t)]);n.push(U);if(endsWithBrace(U))n.push(" while");else n.push("\nwhile");n.push(" (",e.call(r,"test"),");");return u.concat(n);case"DoExpression":var R=e.call(function(e){return printStatementSequence(e,t,r)},"body");return u.concat(["do {\n",R.indent(t.tabWidth),"\n}"]);case"BreakStatement":n.push("break");if(i.label)n.push(" ",e.call(r,"label"));n.push(";");return u.concat(n);case"ContinueStatement":n.push("continue");if(i.label)n.push(" ",e.call(r,"label"));n.push(";");return u.concat(n);case"LabeledStatement":return u.concat([e.call(r,"label"),":\n",e.call(r,"body")]);case"TryStatement":n.push("try ",e.call(r,"block"));if(i.handler){n.push(" ",e.call(r,"handler"))}else if(i.handlers){e.each(function(e){n.push(" ",r(e))},"handlers")}if(i.finalizer){n.push(" finally ",e.call(r,"finalizer"))}return u.concat(n);case"CatchClause":n.push("catch ");if(i.param){n.push("(",e.call(r,"param"))}if(i.guard){n.push(" if ",e.call(r,"guard"))}if(i.param){n.push(") ")}n.push(e.call(r,"body"));return u.concat(n);case"ThrowStatement":return u.concat(["throw ",e.call(r,"argument"),";"]);case"SwitchStatement":return u.concat(["switch (",e.call(r,"discriminant"),") {\n",u.fromString("\n").join(e.map(r,"cases")),"\n}"]);case"SwitchCase":if(i.test)n.push("case ",e.call(r,"test"),":");else n.push("default:");if(i.consequent.length>0){n.push("\n",e.call(function(e){return printStatementSequence(e,t,r)},"consequent").indent(t.tabWidth))}return u.concat(n);case"DebuggerStatement":return u.fromString("debugger;");case"JSXAttribute":n.push(e.call(r,"name"));if(i.value)n.push("=",e.call(r,"value"));return u.concat(n);case"JSXIdentifier":return u.fromString(i.name,t);case"JSXNamespacedName":return u.fromString(":").join([e.call(r,"namespace"),e.call(r,"name")]);case"JSXMemberExpression":return u.fromString(".").join([e.call(r,"object"),e.call(r,"property")]);case"JSXSpreadAttribute":return u.concat(["{...",e.call(r,"argument"),"}"]);case"JSXSpreadChild":return u.concat(["{...",e.call(r,"expression"),"}"]);case"JSXExpressionContainer":return u.concat(["{",e.call(r,"expression"),"}"]);case"JSXElement":case"JSXFragment":var q="opening"+(i.type==="JSXElement"?"Element":"Fragment");var V="closing"+(i.type==="JSXElement"?"Element":"Fragment");var W=e.call(r,q);if(i[q].selfClosing){a.default.ok(!i[V],"unexpected "+V+" element in self-closing "+i.type);return W}var K=u.concat(e.map(function(e){var t=e.getValue();if(h.Literal.check(t)&&typeof t.value==="string"){if(/\S/.test(t.value)){return t.value.replace(/^\s+|\s+$/g,"")}else if(/\n/.test(t.value)){return"\n"}}return r(e)},"children")).indentTail(t.tabWidth);var H=e.call(r,V);return u.concat([W,K,H]);case"JSXOpeningElement":n.push("<",e.call(r,"name"));var Y=[];e.each(function(e){Y.push(" ",r(e))},"attributes");var G=u.concat(Y);var Q=G.length>1||G.getLineLength(1)>t.wrapColumn;if(Q){Y.forEach(function(e,t){if(e===" "){a.default.strictEqual(t%2,0);Y[t]="\n"}});G=u.concat(Y).indentTail(t.tabWidth)}n.push(G,i.selfClosing?" />":">");return u.concat(n);case"JSXClosingElement":return u.concat([""]);case"JSXOpeningFragment":return u.fromString("<>");case"JSXClosingFragment":return u.fromString("");case"JSXText":return u.fromString(i.value,t);case"JSXEmptyExpression":return u.fromString("");case"TypeAnnotatedIdentifier":return u.concat([e.call(r,"annotation")," ",e.call(r,"identifier")]);case"ClassBody":if(i.body.length===0){return u.fromString("{}")}return u.concat(["{\n",e.call(function(e){return printStatementSequence(e,t,r)},"body").indent(t.tabWidth),"\n}"]);case"ClassPropertyDefinition":n.push("static ",e.call(r,"definition"));if(!h.MethodDefinition.check(i.definition))n.push(";");return u.concat(n);case"ClassProperty":var $=i.accessibility||i.access;if(typeof $==="string"){n.push($," ")}if(i.static){n.push("static ")}if(i.abstract){n.push("abstract ")}if(i.readonly){n.push("readonly ")}var F=e.call(r,"key");if(i.computed){F=u.concat(["[",F,"]"])}if(i.variance){F=u.concat([printVariance(e,r),F])}n.push(F);if(i.optional){n.push("?")}if(i.typeAnnotation){n.push(e.call(r,"typeAnnotation"))}if(i.value){n.push(" = ",e.call(r,"value"))}n.push(";");return u.concat(n);case"ClassPrivateProperty":if(i.static){n.push("static ")}n.push(e.call(r,"key"));if(i.typeAnnotation){n.push(e.call(r,"typeAnnotation"))}if(i.value){n.push(" = ",e.call(r,"value"))}n.push(";");return u.concat(n);case"ClassDeclaration":case"ClassExpression":if(i.declare){n.push("declare ")}if(i.abstract){n.push("abstract ")}n.push("class");if(i.id){n.push(" ",e.call(r,"id"))}if(i.typeParameters){n.push(e.call(r,"typeParameters"))}if(i.superClass){n.push(" extends ",e.call(r,"superClass"),e.call(r,"superTypeParameters"))}if(i["implements"]&&i["implements"].length>0){n.push(" implements ",u.fromString(", ").join(e.map(r,"implements")))}n.push(" ",e.call(r,"body"));return u.concat(n);case"TemplateElement":return u.fromString(i.value.raw,t).lockIndentTail();case"TemplateLiteral":var Z=e.map(r,"expressions");n.push("`");e.each(function(e){var t=e.getName();n.push(r(e));if(t0)n.push(" ")}else{s=s.indent(t.tabWidth)}n.push(s);if(r0){n.push(" extends ",u.fromString(", ").join(e.map(r,"extends")))}n.push(" ",e.call(r,"body"));return u.concat(n);case"DeclareClass":return printFlowDeclaration(e,["class ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareFunction":return printFlowDeclaration(e,["function ",e.call(r,"id"),";"]);case"DeclareModule":return printFlowDeclaration(e,["module ",e.call(r,"id")," ",e.call(r,"body")]);case"DeclareModuleExports":return printFlowDeclaration(e,["module.exports",e.call(r,"typeAnnotation")]);case"DeclareVariable":return printFlowDeclaration(e,["var ",e.call(r,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return u.concat(["declare ",printExportDeclaration(e,t,r)]);case"InferredPredicate":return u.fromString("%checks",t);case"DeclaredPredicate":return u.concat(["%checks(",e.call(r,"value"),")"]);case"FunctionTypeAnnotation":var _=e.getParentNode(0);var ee=!(h.ObjectTypeCallProperty.check(_)||h.ObjectTypeInternalSlot.check(_)&&_.method||h.DeclareFunction.check(e.getParentNode(2)));var te=ee&&!h.FunctionTypeParam.check(_);if(te){n.push(": ")}n.push("(",printFunctionParams(e,t,r),")");if(i.returnType){n.push(ee?" => ":": ",e.call(r,"returnType"))}return u.concat(n);case"FunctionTypeParam":return u.concat([e.call(r,"name"),i.optional?"?":"",": ",e.call(r,"typeAnnotation")]);case"GenericTypeAnnotation":return u.concat([e.call(r,"id"),e.call(r,"typeParameters")]);case"DeclareInterface":n.push("declare ");case"InterfaceDeclaration":case"TSInterfaceDeclaration":if(i.declare){n.push("declare ")}n.push("interface ",e.call(r,"id"),e.call(r,"typeParameters")," ");if(i["extends"]&&i["extends"].length>0){n.push("extends ",u.fromString(", ").join(e.map(r,"extends"))," ")}if(i.body){n.push(e.call(r,"body"))}return u.concat(n);case"ClassImplements":case"InterfaceExtends":return u.concat([e.call(r,"id"),e.call(r,"typeParameters")]);case"IntersectionTypeAnnotation":return u.fromString(" & ").join(e.map(r,"types"));case"NullableTypeAnnotation":return u.concat(["?",e.call(r,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return u.fromString("null",t);case"ThisTypeAnnotation":return u.fromString("this",t);case"NumberTypeAnnotation":return u.fromString("number",t);case"ObjectTypeCallProperty":return e.call(r,"value");case"ObjectTypeIndexer":return u.concat([printVariance(e,r),"[",e.call(r,"id"),": ",e.call(r,"key"),"]: ",e.call(r,"value")]);case"ObjectTypeProperty":return u.concat([printVariance(e,r),e.call(r,"key"),i.optional?"?":"",": ",e.call(r,"value")]);case"ObjectTypeInternalSlot":return u.concat([i.static?"static ":"","[[",e.call(r,"id"),"]]",i.optional?"?":"",i.value.type!=="FunctionTypeAnnotation"?": ":"",e.call(r,"value")]);case"QualifiedTypeIdentifier":return u.concat([e.call(r,"qualification"),".",e.call(r,"id")]);case"StringLiteralTypeAnnotation":return u.fromString(nodeStr(i.value,t),t);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":a.default.strictEqual(typeof i.value,"number");return u.fromString(JSON.stringify(i.value),t);case"StringTypeAnnotation":return u.fromString("string",t);case"DeclareTypeAlias":n.push("declare ");case"TypeAlias":return u.concat(["type ",e.call(r,"id"),e.call(r,"typeParameters")," = ",e.call(r,"right"),";"]);case"DeclareOpaqueType":n.push("declare ");case"OpaqueType":n.push("opaque type ",e.call(r,"id"),e.call(r,"typeParameters"));if(i["supertype"]){n.push(": ",e.call(r,"supertype"))}if(i["impltype"]){n.push(" = ",e.call(r,"impltype"))}n.push(";");return u.concat(n);case"TypeCastExpression":return u.concat(["(",e.call(r,"expression"),e.call(r,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return u.concat(["<",u.fromString(", ").join(e.map(r,"params")),">"]);case"Variance":if(i.kind==="plus"){return u.fromString("+")}if(i.kind==="minus"){return u.fromString("-")}return u.fromString("");case"TypeParameter":if(i.variance){n.push(printVariance(e,r))}n.push(e.call(r,"name"));if(i.bound){n.push(e.call(r,"bound"))}if(i["default"]){n.push("=",e.call(r,"default"))}return u.concat(n);case"TypeofTypeAnnotation":return u.concat([u.fromString("typeof ",t),e.call(r,"argument")]);case"UnionTypeAnnotation":return u.fromString(" | ").join(e.map(r,"types"));case"VoidTypeAnnotation":return u.fromString("void",t);case"NullTypeAnnotation":return u.fromString("null",t);case"TSType":throw new Error("unprintable type: "+JSON.stringify(i.type));case"TSNumberKeyword":return u.fromString("number",t);case"TSBigIntKeyword":return u.fromString("bigint",t);case"TSObjectKeyword":return u.fromString("object",t);case"TSBooleanKeyword":return u.fromString("boolean",t);case"TSStringKeyword":return u.fromString("string",t);case"TSSymbolKeyword":return u.fromString("symbol",t);case"TSAnyKeyword":return u.fromString("any",t);case"TSVoidKeyword":return u.fromString("void",t);case"TSThisType":return u.fromString("this",t);case"TSNullKeyword":return u.fromString("null",t);case"TSUndefinedKeyword":return u.fromString("undefined",t);case"TSUnknownKeyword":return u.fromString("unknown",t);case"TSNeverKeyword":return u.fromString("never",t);case"TSArrayType":return u.concat([e.call(r,"elementType"),"[]"]);case"TSLiteralType":return e.call(r,"literal");case"TSUnionType":return u.fromString(" | ").join(e.map(r,"types"));case"TSIntersectionType":return u.fromString(" & ").join(e.map(r,"types"));case"TSConditionalType":n.push(e.call(r,"checkType")," extends ",e.call(r,"extendsType")," ? ",e.call(r,"trueType")," : ",e.call(r,"falseType"));return u.concat(n);case"TSInferType":n.push("infer ",e.call(r,"typeParameter"));return u.concat(n);case"TSParenthesizedType":return u.concat(["(",e.call(r,"typeAnnotation"),")"]);case"TSFunctionType":return u.concat([e.call(r,"typeParameters"),"(",printFunctionParams(e,t,r),")",e.call(r,"typeAnnotation")]);case"TSConstructorType":return u.concat(["new ",e.call(r,"typeParameters"),"(",printFunctionParams(e,t,r),")",e.call(r,"typeAnnotation")]);case"TSMappedType":{n.push(i.readonly?"readonly ":"","[",e.call(r,"typeParameter"),"]",i.optional?"?":"");if(i.typeAnnotation){n.push(": ",e.call(r,"typeAnnotation"),";")}return u.concat(["{\n",u.concat(n).indent(t.tabWidth),"\n}"])}case"TSTupleType":return u.concat(["[",u.fromString(", ").join(e.map(r,"elementTypes")),"]"]);case"TSRestType":return u.concat(["...",e.call(r,"typeAnnotation"),"[]"]);case"TSOptionalType":return u.concat([e.call(r,"typeAnnotation"),"?"]);case"TSIndexedAccessType":return u.concat([e.call(r,"objectType"),"[",e.call(r,"indexType"),"]"]);case"TSTypeOperator":return u.concat([e.call(r,"operator")," ",e.call(r,"typeAnnotation")]);case"TSTypeLiteral":{var re=u.fromString(",\n").join(e.map(r,"members"));if(re.isEmpty()){return u.fromString("{}",t)}n.push("{\n",re.indent(t.tabWidth),"\n}");return u.concat(n)}case"TSEnumMember":n.push(e.call(r,"id"));if(i.initializer){n.push(" = ",e.call(r,"initializer"))}return u.concat(n);case"TSTypeQuery":return u.concat(["typeof ",e.call(r,"exprName")]);case"TSParameterProperty":if(i.accessibility){n.push(i.accessibility," ")}if(i.export){n.push("export ")}if(i.static){n.push("static ")}if(i.readonly){n.push("readonly ")}n.push(e.call(r,"parameter"));return u.concat(n);case"TSTypeReference":return u.concat([e.call(r,"typeName"),e.call(r,"typeParameters")]);case"TSQualifiedName":return u.concat([e.call(r,"left"),".",e.call(r,"right")]);case"TSAsExpression":{var ie=i.extra&&i.extra.parenthesized===true;if(ie)n.push("(");n.push(e.call(r,"expression"),u.fromString(" as "),e.call(r,"typeAnnotation"));if(ie)n.push(")");return u.concat(n)}case"TSNonNullExpression":return u.concat([e.call(r,"expression"),"!"]);case"TSTypeAnnotation":{var _=e.getParentNode(0);var ne=": ";if(h.TSFunctionType.check(_)||h.TSConstructorType.check(_)){ne=" => "}if(h.TSTypePredicate.check(_)){ne=" is "}return u.concat([ne,e.call(r,"typeAnnotation")])}case"TSIndexSignature":return u.concat([i.readonly?"readonly ":"","[",e.map(r,"parameters"),"]",e.call(r,"typeAnnotation")]);case"TSPropertySignature":n.push(printVariance(e,r),i.readonly?"readonly ":"");if(i.computed){n.push("[",e.call(r,"key"),"]")}else{n.push(e.call(r,"key"))}n.push(i.optional?"?":"",e.call(r,"typeAnnotation"));return u.concat(n);case"TSMethodSignature":if(i.computed){n.push("[",e.call(r,"key"),"]")}else{n.push(e.call(r,"key"))}if(i.optional){n.push("?")}n.push(e.call(r,"typeParameters"),"(",printFunctionParams(e,t,r),")",e.call(r,"typeAnnotation"));return u.concat(n);case"TSTypePredicate":return u.concat([e.call(r,"parameterName"),e.call(r,"typeAnnotation")]);case"TSCallSignatureDeclaration":return u.concat([e.call(r,"typeParameters"),"(",printFunctionParams(e,t,r),")",e.call(r,"typeAnnotation")]);case"TSConstructSignatureDeclaration":if(i.typeParameters){n.push("new",e.call(r,"typeParameters"))}else{n.push("new ")}n.push("(",printFunctionParams(e,t,r),")",e.call(r,"typeAnnotation"));return u.concat(n);case"TSTypeAliasDeclaration":return u.concat([i.declare?"declare ":"","type ",e.call(r,"id"),e.call(r,"typeParameters")," = ",e.call(r,"typeAnnotation"),";"]);case"TSTypeParameter":n.push(e.call(r,"name"));var _=e.getParentNode(0);var ae=h.TSMappedType.check(_);if(i.constraint){n.push(ae?" in ":" extends ",e.call(r,"constraint"))}if(i["default"]){n.push(" = ",e.call(r,"default"))}return u.concat(n);case"TSTypeAssertion":var ie=i.extra&&i.extra.parenthesized===true;if(ie){n.push("(")}n.push("<",e.call(r,"typeAnnotation"),"> ",e.call(r,"expression"));if(ie){n.push(")")}return u.concat(n);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return u.concat(["<",u.fromString(", ").join(e.map(r,"params")),">"]);case"TSEnumDeclaration":n.push(i.declare?"declare ":"",i.const?"const ":"","enum ",e.call(r,"id"));var se=u.fromString(",\n").join(e.map(r,"members"));if(se.isEmpty()){n.push(" {}")}else{n.push(" {\n",se.indent(t.tabWidth),"\n}")}return u.concat(n);case"TSExpressionWithTypeArguments":return u.concat([e.call(r,"expression"),e.call(r,"typeParameters")]);case"TSInterfaceBody":var ue=u.fromString(";\n").join(e.map(r,"body"));if(ue.isEmpty()){return u.fromString("{}",t)}return u.concat(["{\n",ue.indent(t.tabWidth),";","\n}"]);case"TSImportType":n.push("import(",e.call(r,"argument"),")");if(i.qualifier){n.push(".",e.call(r,"qualifier"))}if(i.typeParameters){n.push(e.call(r,"typeParameters"))}return u.concat(n);case"TSImportEqualsDeclaration":if(i.isExport){n.push("export ")}n.push("import ",e.call(r,"id")," = ",e.call(r,"moduleReference"));return maybeAddSemicolon(u.concat(n));case"TSExternalModuleReference":return u.concat(["require(",e.call(r,"expression"),")"]);case"TSModuleDeclaration":{var le=e.getParentNode();if(le.type==="TSModuleDeclaration"){n.push(".")}else{if(i.declare){n.push("declare ")}if(!i.global){var oe=i.id.type==="StringLiteral"||i.id.type==="Literal"&&typeof i.id.value==="string";if(oe){n.push("module ")}else if(i.loc&&i.loc.lines&&i.id.loc){var ce=i.loc.lines.sliceString(i.loc.start,i.id.loc.start);if(ce.indexOf("module")>=0){n.push("module ")}else{n.push("namespace ")}}else{n.push("namespace ")}}}n.push(e.call(r,"id"));if(i.body&&i.body.type==="TSModuleDeclaration"){n.push(e.call(r,"body"))}else if(i.body){var he=e.call(r,"body");if(he.isEmpty()){n.push(" {}")}else{n.push(" {\n",he.indent(t.tabWidth),"\n}")}}return u.concat(n)}case"TSModuleBlock":return e.call(function(e){return printStatementSequence(e,t,r)},"body");case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:debugger;throw new Error("unknown type: "+JSON.stringify(i.type))}}function printDecorators(e,t){var r=[];var i=e.getValue();if(i.decorators&&i.decorators.length>0&&!m.getParentExportDeclaration(e)){e.each(function(e){r.push(t(e),"\n")},"decorators")}else if(m.isExportDeclaration(i)&&i.declaration&&i.declaration.decorators){e.each(function(e){r.push(t(e),"\n")},"declaration","decorators")}return u.concat(r)}function printStatementSequence(e,t,r){var i=[];var n=false;var s=false;e.each(function(e){var t=e.getValue();if(!t){return}if(t.type==="EmptyStatement"&&!(t.comments&&t.comments.length>0)){return}if(h.Comment.check(t)){n=true}else if(h.Statement.check(t)){s=true}else{f.assert(t)}i.push({node:t,printed:r(e)})});if(n){a.default.strictEqual(s,false,"Comments may appear as statements in otherwise empty statement "+"lists, but may not coexist with non-Comment nodes.")}var l=null;var o=i.length;var c=[];i.forEach(function(e,r){var i=e.printed;var n=e.node;var a=i.length>1;var s=r>0;var u=rr.length){return i}return r}function printMethod(e,t,r){var i=e.getNode();var n=i.kind;var a=[];var s=i.value;if(!h.FunctionExpression.check(s)){s=i}var l=i.accessibility||i.access;if(typeof l==="string"){a.push(l," ")}if(i.static){a.push("static ")}if(i.abstract){a.push("abstract ")}if(i.readonly){a.push("readonly ")}if(s.async){a.push("async ")}if(s.generator){a.push("*")}if(n==="get"||n==="set"){a.push(n," ")}var o=e.call(r,"key");if(i.computed){o=u.concat(["[",o,"]"])}a.push(o);if(i.optional){a.push("?")}if(i===s){a.push(e.call(r,"typeParameters"),"(",printFunctionParams(e,t,r),")",e.call(r,"returnType"));if(i.body){a.push(" ",e.call(r,"body"))}else{a.push(";")}}else{a.push(e.call(r,"value","typeParameters"),"(",e.call(function(e){return printFunctionParams(e,t,r)},"value"),")",e.call(r,"value","returnType"));if(s.body){a.push(" ",e.call(r,"value","body"))}else{a.push(";")}}return u.concat(a)}function printArgumentsList(e,t,r){var i=e.map(r,"arguments");var n=m.isTrailingCommaEnabled(t,"parameters");var a=u.fromString(", ").join(i);if(a.getLineLength(1)>t.wrapColumn){a=u.fromString(",\n").join(i);return u.concat(["(\n",a.indent(t.tabWidth),n?",\n)":"\n)"])}return u.concat(["(",a,")"])}function printFunctionParams(e,t,r){var i=e.getValue();if(i.params){var n=i.params;var a=e.map(r,"params")}else if(i.parameters){n=i.parameters;a=e.map(r,"parameters")}if(i.defaults){e.each(function(e){var t=e.getName();var i=a[t];if(i&&e.getValue()){a[t]=u.concat([i," = ",r(e)])}},"defaults")}if(i.rest){a.push(u.concat(["...",e.call(r,"rest")]))}var s=u.fromString(", ").join(a);if(s.length>1||s.getLineLength(1)>t.wrapColumn){s=u.fromString(",\n").join(a);if(m.isTrailingCommaEnabled(t,"parameters")&&!i.rest&&n[n.length-1].type!=="RestElement"){s=u.concat([s,",\n"])}else{s=u.concat([s,"\n"])}return u.concat(["\n",s.indent(t.tabWidth)])}return s}function printExportDeclaration(e,t,r){var i=e.getValue();var n=["export "];if(i.exportKind&&i.exportKind!=="value"){n.push(i.exportKind+" ")}var a=t.objectCurlySpacing;h.Declaration.assert(i);if(i["default"]||i.type==="ExportDefaultDeclaration"){n.push("default ")}if(i.declaration){n.push(e.call(r,"declaration"))}else if(i.specifiers){if(i.specifiers.length===1&&i.specifiers[0].type==="ExportBatchSpecifier"){n.push("*")}else if(i.specifiers.length===0){n.push("{}")}else if(i.specifiers[0].type==="ExportDefaultSpecifier"){var s=[];var l=[];e.each(function(e){var t=e.getValue();if(t.type==="ExportDefaultSpecifier"){s.push(r(e))}else{l.push(r(e))}},"specifiers");s.forEach(function(e,t){if(t>0){n.push(", ")}n.push(e)});if(l.length>0){var o=u.fromString(", ").join(l);if(o.getLineLength(1)>t.wrapColumn){o=u.concat([u.fromString(",\n").join(l).indent(t.tabWidth),","])}if(s.length>0){n.push(", ")}if(o.length>1){n.push("{\n",o,"\n}")}else if(t.objectCurlySpacing){n.push("{ ",o," }")}else{n.push("{",o,"}")}}}else{n.push(a?"{ ":"{",u.fromString(", ").join(e.map(r,"specifiers")),a?" }":"}")}if(i.source){n.push(" from ",e.call(r,"source"))}}var c=u.concat(n);if(lastNonSpaceCharacter(c)!==";"&&!(i.declaration&&(i.declaration.type==="FunctionDeclaration"||i.declaration.type==="ClassDeclaration"||i.declaration.type==="TSModuleDeclaration"||i.declaration.type==="TSInterfaceDeclaration"||i.declaration.type==="TSEnumDeclaration"))){c=u.concat([c,";"])}return c}function printFlowDeclaration(e,t){var r=m.getParentExportDeclaration(e);if(r){a.default.strictEqual(r.type,"DeclareExportDeclaration")}else{t.unshift("declare ")}return u.concat(t)}function printVariance(e,t){return e.call(function(e){var r=e.getValue();if(r){if(r==="plus"){return u.fromString("+")}if(r==="minus"){return u.fromString("-")}return t(e)}return u.fromString("")},"variance")}function adjustClause(e,t){if(e.length>1)return u.concat([" ",e]);return u.concat(["\n",maybeAddSemicolon(e).indent(t.tabWidth)])}function lastNonSpaceCharacter(e){var t=e.lastPos();do{var r=e.charAt(t);if(/\S/.test(r))return r}while(e.prevPos(t))}function endsWithBrace(e){return lastNonSpaceCharacter(e)==="}"}function swapQuotes(e){return e.replace(/['"]/g,function(e){return e==='"'?"'":'"'})}function nodeStr(e,t){f.assert(e);switch(t.quote){case"auto":var r=JSON.stringify(e);var i=swapQuotes(JSON.stringify(swapQuotes(e)));return r.length>i.length?i:r;case"single":return swapQuotes(JSON.stringify(swapQuotes(e)));case"double":default:return JSON.stringify(e)}}function maybeAddSemicolon(e){var t=lastNonSpaceCharacter(e);if(!t||"\n};".indexOf(t)<0)return u.concat([e,";"]);return e}},721:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});var a=i(r(357));var s=n(r(593));var u=s.namedTypes;var l=i(r(241));var o=l.default.SourceMapConsumer;var c=l.default.SourceMapGenerator;var h=Object.prototype.hasOwnProperty;function getOption(e,t,r){if(e&&h.call(e,t)){return e[t]}return r}t.getOption=getOption;function getUnionOfKeys(){var e=[];for(var t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(721);function parse(e,t){var n=[];var a=r(609).parse(e,{loc:true,locations:true,comment:true,onComment:n,range:i.getOption(t,"range",false),tolerant:i.getOption(t,"tolerant",true),tokens:true});if(!Array.isArray(a.comments)){a.comments=n}return a}t.parse=parse},357:e=>{"use strict";e.exports=require("assert")},747:e=>{"use strict";e.exports=require("fs")},241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},87:e=>{"use strict";e.exports=require("os")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var i=t[r]={exports:{}};var n=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}return i.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(313)})(); \ No newline at end of file diff --git a/packages/next/compiled/sass-loader/LICENSE b/packages/next/compiled/sass-loader/LICENSE new file mode 100644 index 000000000000000..3d5fa7325883ae8 --- /dev/null +++ b/packages/next/compiled/sass-loader/LICENSE @@ -0,0 +1,20 @@ +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. \ No newline at end of file diff --git a/packages/next/compiled/sass-loader/cjs.js b/packages/next/compiled/sass-loader/cjs.js new file mode 100644 index 000000000000000..ad33385ce33fd44 --- /dev/null +++ b/packages/next/compiled/sass-loader/cjs.js @@ -0,0 +1 @@ +module.exports=(()=>{var __webpack_modules__={613:e=>{"use strict";e.exports=JSON.parse('{"type":"object","properties":{"implementation":{"description":"The implementation of the sass to be used (https://github.com/webpack-contrib/sass-loader#implementation).","type":"object"},"sassOptions":{"description":"Options for `node-sass` or `sass` (`Dart Sass`) implementation. (https://github.com/webpack-contrib/sass-loader#implementation).","anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]},"additionalData":{"description":"Prepends/Appends `Sass`/`SCSS` code before the actual entry file (https://github.com/webpack-contrib/sass-loader#additionaldata).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps (https://github.com/webpack-contrib/sass-loader#sourcemap).","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer (https://github.com/webpack-contrib/sass-loader#webpackimporter).","type":"boolean"}},"additionalProperties":false}')},241:(e,t)=>{function set(e,t,s){if(typeof s.value==="object")s.value=klona(s.value);if(!s.enumerable||s.get||s.set||!s.configurable||!s.writable||t==="__proto__"){Object.defineProperty(e,t,s)}else e[t]=s.value}function klona(e){if(typeof e!=="object")return e;var t=0,s,r,a,o=Object.prototype.toString.call(e);if(o==="[object Object]"){a=Object.create(e.__proto__||null)}else if(o==="[object Array]"){a=Array(e.length)}else if(o==="[object Set]"){a=new Set;e.forEach(function(e){a.add(klona(e))})}else if(o==="[object Map]"){a=new Map;e.forEach(function(e,t){a.set(klona(t),klona(e))})}else if(o==="[object Date]"){a=new Date(+e)}else if(o==="[object RegExp]"){a=new RegExp(e.source,e.flags)}else if(o==="[object DataView]"){a=new e.constructor(klona(e.buffer))}else if(o==="[object ArrayBuffer]"){a=e.slice(0)}else if(o.slice(-6)==="Array]"){a=new e.constructor(e)}if(a){for(r=Object.getOwnPropertySymbols(e);t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;class SassError extends Error{constructor(e){super();this.name="SassError";this.originalSassError=e;this.loc={line:e.line,column:e.column};this.message=`${this.name}: ${this.originalSassError.message}`;if(this.originalSassError.formatted){this.message=`${this.name}: ${this.originalSassError.formatted.replace(/^Error: /,"")}`;this.hideStack=true;Error.captureStackTrace(this,this.constructor)}}}var s=SassError;t.default=s},52:(e,t,s)=>{"use strict";const r=s(252);e.exports=r.default},252:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var r=_interopRequireDefault(s(622));var a=s(286);var o=s(710);var n=_interopRequireDefault(s(613));var i=s(409);var c=_interopRequireDefault(s(76));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function loader(e){const t=(0,o.getOptions)(this);(0,a.validate)(n.default,t,{name:"Sass Loader",baseDataPath:"options"});const s=(0,i.getSassImplementation)(t.implementation);const u=typeof t.sourceMap==="boolean"?t.sourceMap:this.sourceMap;const l=(0,i.getSassOptions)(this,t,e,s,u);const p=typeof t.webpackImporter==="boolean"?t.webpackImporter:true;if(p){const{includePaths:e}=l;l.importer.push((0,i.getWebpackImporter)(this,s,e))}const d=this.async();const _=(0,i.getRenderFunctionFromSassImplementation)(s);_(l,(e,t)=>{if(e){if(e.file){this.addDependency(r.default.normalize(e.file))}d(new c.default(e));return}let s=t.map?JSON.parse(t.map):null;if(s&&u){s=(0,i.normalizeSourceMap)(s,this.rootContext)}t.stats.includedFiles.forEach(e=>{this.addDependency(r.default.normalize(e))});d(null,t.css.toString(),s)})}var u=loader;t.default=u},409:(__unused_webpack_module,exports,__nccwpck_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getSassImplementation=getSassImplementation;exports.getSassOptions=getSassOptions;exports.getWebpackResolver=getWebpackResolver;exports.getWebpackImporter=getWebpackImporter;exports.getRenderFunctionFromSassImplementation=getRenderFunctionFromSassImplementation;exports.normalizeSourceMap=normalizeSourceMap;var _url=_interopRequireDefault(__nccwpck_require__(835));var _path=_interopRequireDefault(__nccwpck_require__(622));var _semver=_interopRequireDefault(__nccwpck_require__(519));var _full=__nccwpck_require__(241);var _loaderUtils=__nccwpck_require__(710);var _neoAsync=_interopRequireDefault(__nccwpck_require__(386));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getDefaultSassImplementation(){let sassImplPkg="sass";try{require.resolve("sass")}catch(error){try{eval("require.resolve('node-sass')");sassImplPkg="node-sass"}catch(e){sassImplPkg="sass"}}return require(sassImplPkg)}function getSassImplementation(e){let t=e;if(!t){t=getDefaultSassImplementation()}const{info:s}=t;if(!s){throw new Error("Unknown Sass implementation.")}const r=s.split("\t");if(r.length<2){throw new Error(`Unknown Sass implementation "${s}".`)}const[a,o]=r;if(a==="dart-sass"){if(!_semver.default.satisfies(o,"^1.3.0")){throw new Error(`Dart Sass version ${o} is incompatible with ^1.3.0.`)}return t}else if(a==="node-sass"){if(!_semver.default.satisfies(o,"^4.0.0 || ^5.0.0")){throw new Error(`Node Sass version ${o} is incompatible with ^4.0.0 || ^5.0.0.`)}return t}throw new Error(`Unknown Sass implementation "${a}".`)}function isProductionLikeMode(e){return e.mode==="production"||!e.mode}function proxyCustomImporters(e,t){return[].concat(e).map(e=>{return function proxyImporter(...s){this.webpackLoaderContext=t;return e.apply(this,s)}})}function getSassOptions(e,t,s,r,a){const o=(0,_full.klona)(t.sassOptions?typeof t.sassOptions==="function"?t.sassOptions(e)||{}:t.sassOptions:{});const n=r.info.includes("dart-sass");if(n){const e=!o.fiber&&o.fiber!==false;if(e){let e;try{e=require.resolve("fibers")}catch(e){}if(e){o.fiber=require(e)}}else if(o.fiber===false){delete o.fiber}}else{delete o.fiber}o.file=e.resourcePath;o.data=t.additionalData?typeof t.additionalData==="function"?t.additionalData(s,e):`${t.additionalData}\n${s}`:s;if(!o.outputStyle&&isProductionLikeMode(e)){o.outputStyle="compressed"}if(a){o.sourceMap=true;o.outFile=_path.default.join(e.rootContext,"style.css.map");o.sourceMapContents=true;o.omitSourceMapUrl=true;o.sourceMapEmbed=false}const{resourcePath:i}=e;const c=_path.default.extname(i);if(c&&c.toLowerCase()===".sass"&&typeof o.indentedSyntax==="undefined"){o.indentedSyntax=true}else{o.indentedSyntax=Boolean(o.indentedSyntax)}o.importer=o.importer?proxyCustomImporters(Array.isArray(o.importer)?o.importer:[o.importer],e):[];o.includePaths=[].concat(process.cwd()).concat(o.includePaths||[]).concat(process.env.SASS_PATH?process.env.SASS_PATH.split(process.platform==="win32"?";":":"):[]);return o}const isModuleImport=/^~([^/]+|[^/]+\/|@[^/]+[/][^/]+|@[^/]+\/?|@[^/]+[/][^/]+\/)$/;function getPossibleRequests(e,t=false,s=false){const r=(0,_loaderUtils.urlToRequest)(e,t&&s);if(t&&isModuleImport.test(e)){return[...new Set([r,e])]}const a=_path.default.extname(r).toLowerCase();if(a===".css"){return[]}const o=_path.default.dirname(r);const n=_path.default.basename(r);return[...new Set([`${o}/_${n}`,r].concat(t?[`${_path.default.dirname(e)}/_${n}`,e]:[]))]}function promiseResolve(e){return(t,s)=>new Promise((r,a)=>{e(t,s,(e,t)=>{if(e){a(e)}else{r(t)}})})}const IS_SPECIAL_MODULE_IMPORT=/^~[^/]+$/;const IS_NATIVE_WIN32_PATH=/^[a-z]:[/\\]|^\\\\/i;function getWebpackResolver(e,t,s=[],r=false){async function startResolving(e){if(e.length===0){return Promise.reject()}const[{possibleRequests:t}]=e;if(t.length===0){return Promise.reject()}const[{resolve:s,context:r}]=e;try{return await s(r,t[0])}catch(s){const[,...r]=t;if(r.length===0){const[,...t]=e;return startResolving(t)}e[0].possibleRequests=r;return startResolving(e)}}const a=t.info.includes("dart-sass");const o=promiseResolve(e({alias:[],aliasFields:[],conditionNames:[],descriptionFiles:[],extensions:[".sass",".scss",".css"],exportsFields:[],mainFields:[],mainFiles:["_index","index"],modules:[],restrictions:[/\.((sa|sc|c)ss)$/i]}));const n=promiseResolve(e({conditionNames:["sass","style"],mainFields:["sass","style","main","..."],mainFiles:["_index","index","..."],extensions:[".sass",".scss",".css"],restrictions:[/\.((sa|sc|c)ss)$/i]}));return(e,t)=>{const i=t;const c=i.slice(0,5).toLowerCase()==="file:";if(c){try{t=_url.default.fileURLToPath(i)}catch(e){t=t.slice(7)}}let u=[];const l=!IS_SPECIAL_MODULE_IMPORT.test(t)&&!c&&!i.startsWith("/")&&!IS_NATIVE_WIN32_PATH.test(i);if(s.length>0&&l){const r=getPossibleRequests(t);if(!a){u=u.concat({resolve:o,context:_path.default.dirname(e),possibleRequests:r})}u=u.concat(s.map(e=>({resolve:o,context:e,possibleRequests:r})))}const p=getPossibleRequests(t,true,r);u=u.concat({resolve:n,context:_path.default.dirname(e),possibleRequests:p});return startResolving(u)}}const matchCss=/\.css$/i;function getWebpackImporter(e,t,s){const r=getWebpackResolver(e.getResolve,t,s,e.rootContext);return(t,s,a)=>{r(s,t).then(t=>{e.addDependency(_path.default.normalize(t));a({file:t.replace(matchCss,"")})}).catch(()=>{a({file:t})})}}let nodeSassJobQueue=null;function getRenderFunctionFromSassImplementation(e){const t=e.info.includes("dart-sass");if(t){return e.render.bind(e)}if(nodeSassJobQueue===null){const t=Number(process.env.UV_THREADPOOL_SIZE||4);nodeSassJobQueue=_neoAsync.default.queue(e.render.bind(e),t-1)}return nodeSassJobQueue.push.bind(nodeSassJobQueue)}const ABSOLUTE_SCHEME=/^[A-Za-z0-9+\-.]+:/;function getURLType(e){if(e[0]==="/"){if(e[1]==="/"){return"scheme-relative"}return"path-absolute"}if(IS_NATIVE_WIN32_PATH.test(e)){return"path-absolute"}return ABSOLUTE_SCHEME.test(e)?"absolute":"path-relative"}function normalizeSourceMap(e,t){const s=e;delete s.file;s.sourceRoot="";s.sources=s.sources.map(e=>{const s=getURLType(e);if(s==="path-relative"){return _path.default.resolve(t,_path.default.normalize(e))}return e});return s}},710:e=>{"use strict";e.exports=require("loader-utils")},386:e=>{"use strict";e.exports=require("next/dist/compiled/neo-async")},286:e=>{"use strict";e.exports=require("next/dist/compiled/schema-utils3")},519:e=>{"use strict";e.exports=require("next/dist/compiled/semver")},622:e=>{"use strict";e.exports=require("path")},835:e=>{"use strict";e.exports=require("url")}};var __webpack_module_cache__={};function __nccwpck_require__(e){if(__webpack_module_cache__[e]){return __webpack_module_cache__[e].exports}var t=__webpack_module_cache__[e]={exports:{}};var s=true;try{__webpack_modules__[e](t,t.exports,__nccwpck_require__);s=false}finally{if(s)delete __webpack_module_cache__[e]}return t.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(52)})(); \ No newline at end of file diff --git a/packages/next/compiled/sass-loader/package.json b/packages/next/compiled/sass-loader/package.json new file mode 100644 index 000000000000000..91526a6dccf9b2d --- /dev/null +++ b/packages/next/compiled/sass-loader/package.json @@ -0,0 +1 @@ +{"name":"sass-loader","main":"cjs.js","author":"J. Tangelder","license":"MIT"} diff --git a/packages/next/compiled/schema-utils/index.js b/packages/next/compiled/schema-utils/index.js index 9968c33f0edeb0a..551a6db86050ac5 100644 --- a/packages/next/compiled/schema-utils/index.js +++ b/packages/next/compiled/schema-utils/index.js @@ -1 +1 @@ -module.exports=(()=>{var e={601:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},8938:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},2133:(e,n,f)=>{"use strict";var s=f(2670);e.exports=defineKeywords;function defineKeywords(e,n){if(Array.isArray(n)){for(var f=0;f{"use strict";var s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;var l=/t|\s/i;var v={date:compareDate,time:compareTime,"date-time":compareDateTime};var r={type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:false};e.exports=function(e){var n="format"+e;return function defFunc(s){defFunc.definition={type:"string",inline:f(7194),statements:true,errors:"full",dependencies:["format"],metaSchema:{anyOf:[{type:"string"},r]}};s.addKeyword(n,defFunc.definition);s.addKeyword("formatExclusive"+e,{dependencies:["format"+e],metaSchema:{anyOf:[{type:"boolean"},r]}});extendFormats(s);return s}};function extendFormats(e){var n=e._formats;for(var f in v){var s=n[f];if(typeof s!="object"||s instanceof RegExp||!s.validate)s=n[f]={validate:s};if(!s.compare)s.compare=v[f]}}function compareDate(e,n){if(!(e&&n))return;if(e>n)return 1;if(en)return 1;if(e{"use strict";e.exports={metaSchemaRef:metaSchemaRef};var n="http://json-schema.org/draft-07/schema";function metaSchemaRef(e){var f=e._opts.defaultMeta;if(typeof f=="string")return{$ref:f};if(e.getSchema(n))return{$ref:n};console.warn("meta schema not defined");return{}}},5541:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e,n){if(!e)return true;var f=Object.keys(n.properties);if(f.length==0)return true;return{required:f}},metaSchema:{type:"boolean"},dependencies:["properties"]};e.addKeyword("allRequired",defFunc.definition);return e}},7039:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){if(e.length==0)return true;if(e.length==1)return{required:e};var n=e.map(function(e){return{required:[e]}});return{anyOf:n}},metaSchema:{type:"array",items:{type:"string"}}};e.addKeyword("anyRequired",defFunc.definition);return e}},1673:(e,n,f)=>{"use strict";var s=f(3733);e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){var n=[];for(var f in e)n.push(getSchema(f,e[f]));return{allOf:n}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:s.metaSchemaRef(e)}};e.addKeyword("deepProperties",defFunc.definition);return e};function getSchema(e,n){var f=e.split("/");var s={};var l=s;for(var v=1;v{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",inline:function(e,n,f){var s="";for(var l=0;l{"use strict";e.exports=function generate__formatLimit(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j="valid"+l;s+="var "+j+" = undefined;";if(e.opts.format===false){s+=" "+j+" = true; ";return s}var w=e.schema.format,F=e.opts.$data&&w.$data,E="";if(F){var A=e.util.getData(w.$data,v,e.dataPathArr),N="format"+l,a="compare"+l;s+=" var "+N+" = formats["+A+"] , "+a+" = "+N+" && "+N+".compare;"}else{var N=e.formats[w];if(!(N&&N.compare)){s+=" "+j+" = true; ";return s}var a="formats"+e.util.getProperty(w)+".compare"}var z=n=="formatMaximum",x="formatExclusive"+(z?"Maximum":"Minimum"),q=e.schema[x],O=e.opts.$data&&q&&q.$data,Q=z?"<":">",U="result"+l;var I=e.opts.$data&&r&&r.$data,T;if(I){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";T="schema"+l}else{T=r}if(O){var J=e.util.getData(q.$data,v,e.dataPathArr),L="exclusive"+l,M="op"+l,C="' + "+M+" + '";s+=" var schemaExcl"+l+" = "+J+"; ";J="schemaExcl"+l;s+=" if (typeof "+J+" != 'boolean' && "+J+" !== undefined) { "+j+" = false; ";var p=x;var H=H||[];H.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: '"+x+" should be boolean' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var G=s;s=H.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+G+"]); "}else{s+=" validate.errors = ["+G+"]; return false; "}}else{s+=" var err = "+G+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){E+="}";s+=" else { "}if(I){s+=" if ("+T+" === undefined) "+j+" = true; else if (typeof "+T+" != 'string') "+j+" = false; else { ";E+="}"}if(F){s+=" if (!"+a+") "+j+" = true; else { ";E+="}"}s+=" var "+U+" = "+a+"("+R+", ";if(I){s+=""+T}else{s+=""+e.util.toQuotedString(r)}s+=" ); if ("+U+" === undefined) "+j+" = false; var "+L+" = "+J+" === true; if ("+j+" === undefined) { "+j+" = "+L+" ? "+U+" "+Q+" 0 : "+U+" "+Q+"= 0; } if (!"+j+") var op"+l+" = "+L+" ? '"+Q+"' : '"+Q+"=';"}else{var L=q===true,C=Q;if(!L)C+="=";var M="'"+C+"'";if(I){s+=" if ("+T+" === undefined) "+j+" = true; else if (typeof "+T+" != 'string') "+j+" = false; else { ";E+="}"}if(F){s+=" if (!"+a+") "+j+" = true; else { ";E+="}"}s+=" var "+U+" = "+a+"("+R+", ";if(I){s+=""+T}else{s+=""+e.util.toQuotedString(r)}s+=" ); if ("+U+" === undefined) "+j+" = false; if ("+j+" === undefined) "+j+" = "+U+" "+Q;if(!L){s+="="}s+=" 0;"}s+=""+E+"if (!"+j+") { ";var p=n;var H=H||[];H.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { comparison: "+M+", limit: ";if(I){s+=""+T}else{s+=""+e.util.toQuotedString(r)}s+=" , exclusive: "+L+" } ";if(e.opts.messages!==false){s+=" , message: 'should be "+C+' "';if(I){s+="' + "+T+" + '"}else{s+=""+e.util.escapeQuotes(r)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(I){s+="validate.schema"+g}else{s+=""+e.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var G=s;s=H.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+G+"]); "}else{s+=" validate.errors = ["+G+"]; return false; "}}else{s+=" var err = "+G+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="}";return s}},3724:e=>{"use strict";e.exports=function generate_patternRequired(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="key"+l,w="idx"+l,F="patternMatched"+l,E="dataProperties"+l,A="",N=e.opts.ownProperties;s+="var "+R+" = true;";if(N){s+=" var "+E+" = undefined;"}var a=r;if(a){var z,x=-1,q=a.length-1;while(x{"use strict";e.exports=function generate_switch(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A="ifPassed"+e.level,N=w.baseId,a;s+="var "+A+";";var z=r;if(z){var x,q=-1,O=z.length-1;while(q0:e.util.schemaHasRules(x.if,e.RULES.all))){s+=" var "+j+" = errors; ";var Q=e.compositeRule;e.compositeRule=w.compositeRule=true;w.createErrors=false;w.schema=x.if;w.schemaPath=g+"["+q+"].if";w.errSchemaPath=b+"/"+q+"/if";s+=" "+e.validate(w)+" ";w.baseId=N;w.createErrors=true;e.compositeRule=w.compositeRule=Q;s+=" "+A+" = "+E+"; if ("+A+") { ";if(typeof x.then=="boolean"){if(x.then===false){var U=U||[];U.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"switch"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { caseIndex: "+q+" } ";if(e.opts.messages!==false){s+=" , message: 'should pass \"switch\" keyword validation' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var I=s;s=U.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}s+=" var "+E+" = "+x.then+"; "}else{w.schema=x.then;w.schemaPath=g+"["+q+"].then";w.errSchemaPath=b+"/"+q+"/then";s+=" "+e.validate(w)+" ";w.baseId=N}s+=" } else { errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; } } "}else{s+=" "+A+" = true; ";if(typeof x.then=="boolean"){if(x.then===false){var U=U||[];U.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"switch"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { caseIndex: "+q+" } ";if(e.opts.messages!==false){s+=" , message: 'should pass \"switch\" keyword validation' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var I=s;s=U.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}s+=" var "+E+" = "+x.then+"; "}else{w.schema=x.then;w.schemaPath=g+"["+q+"].then";w.errSchemaPath=b+"/"+q+"/then";s+=" "+e.validate(w)+" ";w.baseId=N}}a=x.continue}}s+=""+F+"var "+R+" = "+E+";";return s}},2107:e=>{"use strict";var n={};var f={timestamp:function(){return Date.now()},datetime:function(){return(new Date).toISOString()},date:function(){return(new Date).toISOString().slice(0,10)},time:function(){return(new Date).toISOString().slice(11)},random:function(){return Math.random()},randomint:function(e){var n=e&&e.max||2;return function(){return Math.floor(Math.random()*n)}},seq:function(e){var f=e&&e.name||"";n[f]=n[f]||0;return function(){return n[f]++}}};e.exports=function defFunc(e){defFunc.definition={compile:function(e,n,f){var s={};for(var l in e){var v=e[l];var r=getDefault(typeof v=="string"?v:v.func);s[l]=r.length?r(v.args):r}return f.opts.useDefaults&&!f.compositeRule?assignDefaults:noop;function assignDefaults(n){for(var l in e){if(n[l]===undefined||f.opts.useDefaults=="empty"&&(n[l]===null||n[l]===""))n[l]=s[l]()}return true}function noop(){return true}},DEFAULTS:f,metaSchema:{type:"object",additionalProperties:{type:["string","object"],additionalProperties:false,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}}};e.addKeyword("dynamicDefaults",defFunc.definition);return e;function getDefault(e){var n=f[e];if(n)return n;throw new Error('invalid "dynamicDefaults" keyword property value: '+e)}}},6153:(e,n,f)=>{"use strict";e.exports=f(2784)("Maximum")},4409:(e,n,f)=>{"use strict";e.exports=f(2784)("Minimum")},2670:(e,n,f)=>{"use strict";e.exports={instanceof:f(2479),range:f(9159),regexp:f(3284),typeof:f(2608),dynamicDefaults:f(2107),allRequired:f(5541),anyRequired:f(7039),oneRequired:f(2135),prohibited:f(3115),uniqueItemProperties:f(3786),deepProperties:f(1673),deepRequired:f(2541),formatMinimum:f(4409),formatMaximum:f(6153),patternRequired:f(5844),switch:f(682),select:f(2308),transform:f(159)}},2479:e=>{"use strict";var n={Object:Object,Array:Array,Function:Function,Number:Number,String:String,Date:Date,RegExp:RegExp};e.exports=function defFunc(e){if(typeof Buffer!="undefined")n.Buffer=Buffer;if(typeof Promise!="undefined")n.Promise=Promise;defFunc.definition={compile:function(e){if(typeof e=="string"){var n=getConstructor(e);return function(e){return e instanceof n}}var f=e.map(getConstructor);return function(e){for(var n=0;n{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){if(e.length==0)return true;if(e.length==1)return{required:e};var n=e.map(function(e){return{required:[e]}});return{oneOf:n}},metaSchema:{type:"array",items:{type:"string"}}};e.addKeyword("oneRequired",defFunc.definition);return e}},5844:(e,n,f)=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",inline:f(3724),statements:true,errors:"full",metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:true}};e.addKeyword("patternRequired",defFunc.definition);return e}},3115:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){if(e.length==0)return true;if(e.length==1)return{not:{required:e}};var n=e.map(function(e){return{required:[e]}});return{not:{anyOf:n}}},metaSchema:{type:"array",items:{type:"string"}}};e.addKeyword("prohibited",defFunc.definition);return e}},9159:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"number",macro:function(e,n){var f=e[0],s=e[1],l=n.exclusiveRange;validateRangeSchema(f,s,l);return l===true?{exclusiveMinimum:f,exclusiveMaximum:s}:{minimum:f,maximum:s}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}};e.addKeyword("range",defFunc.definition);e.addKeyword("exclusiveRange");return e;function validateRangeSchema(e,n,f){if(f!==undefined&&typeof f!="boolean")throw new Error("Invalid schema for exclusiveRange keyword, should be boolean");if(e>n||f&&e==n)throw new Error("There are no numbers in range")}}},3284:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"string",inline:function(e,n,f){return getRegExp()+".test(data"+(e.dataLevel||"")+")";function getRegExp(){try{if(typeof f=="object")return new RegExp(f.pattern,f.flags);var e=f.match(/^\/(.*)\/([gimuy]*)$/);if(e)return new RegExp(e[1],e[2]);throw new Error("cannot parse string into RegExp")}catch(e){console.error("regular expression",f,"is invalid");throw e}}},metaSchema:{type:["string","object"],properties:{pattern:{type:"string"},flags:{type:"string"}},required:["pattern"],additionalProperties:false}};e.addKeyword("regexp",defFunc.definition);return e}},2308:(e,n,f)=>{"use strict";var s=f(3733);e.exports=function defFunc(e){if(!e._opts.$data){console.warn("keyword select requires $data option");return e}var n=s.metaSchemaRef(e);var f=[];defFunc.definition={validate:function v(e,n,f){if(f.selectCases===undefined)throw new Error('keyword "selectCases" is absent');var s=getCompiledSchemas(f,false);var l=s.cases[e];if(l===undefined)l=s.default;if(typeof l=="boolean")return l;var r=l(n);if(!r)v.errors=l.errors;return r},$data:true,metaSchema:{type:["string","number","boolean","null"]}};e.addKeyword("select",defFunc.definition);e.addKeyword("selectCases",{compile:function(e,n){var f=getCompiledSchemas(n);for(var s in e)f.cases[s]=compileOrBoolean(e[s]);return function(){return true}},valid:true,metaSchema:{type:"object",additionalProperties:n}});e.addKeyword("selectDefault",{compile:function(e,n){var f=getCompiledSchemas(n);f.default=compileOrBoolean(e);return function(){return true}},valid:true,metaSchema:n});return e;function getCompiledSchemas(e,n){var s;f.some(function(n){if(n.parentSchema===e){s=n;return true}});if(!s&&n!==false){s={parentSchema:e,cases:{},default:true};f.push(s)}return s}function compileOrBoolean(n){return typeof n=="boolean"?n:e.compile(n)}}},682:(e,n,f)=>{"use strict";var s=f(3733);e.exports=function defFunc(e){if(e.RULES.keywords.switch&&e.RULES.keywords.if)return;var n=s.metaSchemaRef(e);defFunc.definition={inline:f(608),statements:true,errors:"full",metaSchema:{type:"array",items:{required:["then"],properties:{if:n,then:{anyOf:[{type:"boolean"},n]},continue:{type:"boolean"}},additionalProperties:false,dependencies:{continue:["if"]}}}};e.addKeyword("switch",defFunc.definition);return e}},159:e=>{"use strict";e.exports=function defFunc(e){var n={trimLeft:function(e){return e.replace(/^[\s]+/,"")},trimRight:function(e){return e.replace(/[\s]+$/,"")},trim:function(e){return e.trim()},toLowerCase:function(e){return e.toLowerCase()},toUpperCase:function(e){return e.toUpperCase()},toEnumCase:function(e,n){return n.hash[makeHashTableKey(e)]||e}};defFunc.definition={type:"string",errors:false,modifying:true,valid:true,compile:function(e,f){var s;if(e.indexOf("toEnumCase")!==-1){s={hash:{}};if(!f.enum)throw new Error('Missing enum. To use `transform:["toEnumCase"]`, `enum:[...]` is required.');for(var l=f.enum.length;l--;l){var v=f.enum[l];if(typeof v!=="string")continue;var r=makeHashTableKey(v);if(s.hash[r])throw new Error('Invalid enum uniqueness. To use `transform:["toEnumCase"]`, all values must be unique when case insensitive.');s.hash[r]=v}}return function(f,l,v,r){if(!v)return;for(var g=0,b=e.length;g{"use strict";var n=["undefined","string","number","object","function","boolean","symbol"];e.exports=function defFunc(e){defFunc.definition={inline:function(e,n,f){var s="data"+(e.dataLevel||"");if(typeof f=="string")return"typeof "+s+' == "'+f+'"';f="validate.schema"+e.schemaPath+"."+n;return f+".indexOf(typeof "+s+") >= 0"},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}};e.addKeyword("typeof",defFunc.definition);return e}},3786:e=>{"use strict";var n=["number","integer","string","boolean","null"];e.exports=function defFunc(e){defFunc.definition={type:"array",compile:function(e,n,f){var s=f.util.equal;var l=getScalarKeys(e,n);return function(n){if(n.length>1){for(var f=0;f=0})}},1414:(e,n,f)=>{"use strict";var s=f(1645),l=f(2630),v=f(7246),r=f(7837),g=f(3600),b=f(9290),d=f(1665),p=f(6989),R=f(6057);e.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=f(75);var j=f(8093);Ajv.prototype.addKeyword=j.add;Ajv.prototype.getKeyword=j.get;Ajv.prototype.removeKeyword=j.remove;Ajv.prototype.validateKeyword=j.validate;var w=f(2718);Ajv.ValidationError=w.Validation;Ajv.MissingRefError=w.MissingRef;Ajv.$dataMetaSchema=p;var F="http://json-schema.org/draft-07/schema";var E=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var A=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=R.copy(e)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=b(e.format);this._cache=e.cache||new v;this._loadingSchemas={};this._compilations=[];this.RULES=d();this._getId=chooseGetId(e);e.loopRequired=e.loopRequired||Infinity;if(e.errorDataPath=="property")e._errorDataPathProperty=true;if(e.serialize===undefined)e.serialize=g;this._metaOpts=getMetaSchemaOptions(this);if(e.formats)addInitialFormats(this);if(e.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof e.meta=="object")this.addMetaSchema(e.meta);if(e.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(e,n){var f;if(typeof e=="string"){f=this.getSchema(e);if(!f)throw new Error('no schema with key or ref "'+e+'"')}else{var s=this._addSchema(e);f=s.validate||this._compile(s)}var l=f(n);if(f.$async!==true)this.errors=f.errors;return l}function compile(e,n){var f=this._addSchema(e,undefined,n);return f.validate||this._compile(f)}function addSchema(e,n,f,s){if(Array.isArray(e)){for(var v=0;v{"use strict";var n=e.exports=function Cache(){this._cache={}};n.prototype.put=function Cache_put(e,n){this._cache[e]=n};n.prototype.get=function Cache_get(e){return this._cache[e]};n.prototype.del=function Cache_del(e){delete this._cache[e]};n.prototype.clear=function Cache_clear(){this._cache={}}},75:(e,n,f)=>{"use strict";var s=f(2718).MissingRef;e.exports=compileAsync;function compileAsync(e,n,f){var l=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof n=="function"){f=n;n=undefined}var v=loadMetaSchemaOf(e).then(function(){var f=l._addSchema(e,undefined,n);return f.validate||_compileAsync(f)});if(f){v.then(function(e){f(null,e)},f)}return v;function loadMetaSchemaOf(e){var n=e.$schema;return n&&!l.getSchema(n)?compileAsync.call(l,{$ref:n},true):Promise.resolve()}function _compileAsync(e){try{return l._compile(e)}catch(e){if(e instanceof s)return loadMissingSchema(e);throw e}function loadMissingSchema(f){var s=f.missingSchema;if(added(s))throw new Error("Schema "+s+" is loaded but "+f.missingRef+" cannot be resolved");var v=l._loadingSchemas[s];if(!v){v=l._loadingSchemas[s]=l._opts.loadSchema(s);v.then(removePromise,removePromise)}return v.then(function(e){if(!added(s)){return loadMetaSchemaOf(e).then(function(){if(!added(s))l.addSchema(e,s,undefined,n)})}}).then(function(){return _compileAsync(e)});function removePromise(){delete l._loadingSchemas[s]}function added(e){return l._refs[e]||l._schemas[e]}}}}},2718:(e,n,f)=>{"use strict";var s=f(2630);e.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(e){this.message="validation failed";this.errors=e;this.ajv=this.validation=true}MissingRefError.message=function(e,n){return"can't resolve reference "+n+" from id "+e};function MissingRefError(e,n,f){this.message=f||MissingRefError.message(e,n);this.missingRef=s.url(e,n);this.missingSchema=s.normalizeId(s.fullPath(this.missingRef))}function errorSubclass(e){e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;return e}},9290:(e,n,f)=>{"use strict";var s=f(6057);var l=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var v=[0,31,28,31,30,31,30,31,31,30,31,30,31];var r=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var g=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var d=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var p=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var R=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var j=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var w=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var F=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var E=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;e.exports=formats;function formats(e){e=e=="full"?"full":"fast";return s.copy(formats[e])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":p,url:R,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:g,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:j,"json-pointer":w,"json-pointer-uri-fragment":F,"relative-json-pointer":E};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":d,"uri-template":p,url:R,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:g,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:j,"json-pointer":w,"json-pointer-uri-fragment":F,"relative-json-pointer":E};function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function date(e){var n=e.match(l);if(!n)return false;var f=+n[1];var s=+n[2];var r=+n[3];return s>=1&&s<=12&&r>=1&&r<=(s==2&&isLeapYear(f)?29:v[s])}function time(e,n){var f=e.match(r);if(!f)return false;var s=f[1];var l=f[2];var v=f[3];var g=f[5];return(s<=23&&l<=59&&v<=59||s==23&&l==59&&v==60)&&(!n||g)}var A=/t|\s/i;function date_time(e){var n=e.split(A);return n.length==2&&date(n[0])&&time(n[1],true)}var N=/\/|:/;function uri(e){return N.test(e)&&b.test(e)}var a=/[^\\]\\Z/;function regex(e){if(a.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},1645:(e,n,f)=>{"use strict";var s=f(2630),l=f(6057),v=f(2718),r=f(3600);var g=f(6131);var b=l.ucs2length;var d=f(3933);var p=v.Validation;e.exports=compile;function compile(e,n,f,R){var j=this,w=this._opts,F=[undefined],E={},A=[],N={},a=[],z={},x=[];n=n||{schema:e,refVal:F,refs:E};var q=checkCompiling.call(this,e,n,R);var O=this._compilations[q.index];if(q.compiling)return O.callValidate=callValidate;var Q=this._formats;var U=this.RULES;try{var I=localCompile(e,n,f,R);O.validate=I;var T=O.callValidate;if(T){T.schema=I.schema;T.errors=null;T.refs=I.refs;T.refVal=I.refVal;T.root=I.root;T.$async=I.$async;if(w.sourceCode)T.source=I.source}return I}finally{endCompiling.call(this,e,n,R)}function callValidate(){var e=O.validate;var n=e.apply(this,arguments);callValidate.errors=e.errors;return n}function localCompile(e,f,r,R){var N=!f||f&&f.schema==e;if(f.schema!=n.schema)return compile.call(j,e,f,r,R);var z=e.$async===true;var q=g({isTop:true,schema:e,isRoot:N,baseId:R,root:f,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:v.MissingRef,RULES:U,validate:g,util:l,resolve:s,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:w,formats:Q,logger:j.logger,self:j});q=vars(F,refValCode)+vars(A,patternCode)+vars(a,defaultCode)+vars(x,customRuleCode)+q;if(w.processCode)q=w.processCode(q,e);var O;try{var I=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",q);O=I(j,U,Q,n,F,a,x,d,b,p);F[0]=O}catch(e){j.logger.error("Error compiling schema, function code:",q);throw e}O.schema=e;O.errors=null;O.refs=E;O.refVal=F;O.root=N?O:f;if(z)O.$async=true;if(w.sourceCode===true){O.source={code:q,patterns:A,defaults:a}}return O}function resolveRef(e,l,v){l=s.url(e,l);var r=E[l];var g,b;if(r!==undefined){g=F[r];b="refVal["+r+"]";return resolvedRef(g,b)}if(!v&&n.refs){var d=n.refs[l];if(d!==undefined){g=n.refVal[d];b=addLocalRef(l,g);return resolvedRef(g,b)}}b=addLocalRef(l);var p=s.call(j,localCompile,n,l);if(p===undefined){var R=f&&f[l];if(R){p=s.inlineRef(R,w.inlineRefs)?R:compile.call(j,R,n,f,e)}}if(p===undefined){removeLocalRef(l)}else{replaceLocalRef(l,p);return resolvedRef(p,b)}}function addLocalRef(e,n){var f=F.length;F[f]=n;E[e]=f;return"refVal"+f}function removeLocalRef(e){delete E[e]}function replaceLocalRef(e,n){var f=E[e];F[f]=n}function resolvedRef(e,n){return typeof e=="object"||typeof e=="boolean"?{code:n,schema:e,inline:true}:{code:n,$async:e&&!!e.$async}}function usePattern(e){var n=N[e];if(n===undefined){n=N[e]=A.length;A[n]=e}return"pattern"+n}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return l.toQuotedString(e);case"object":if(e===null)return"null";var n=r(e);var f=z[n];if(f===undefined){f=z[n]=a.length;a[f]=e}return"default"+f}}function useCustomRule(e,n,f,s){if(j._opts.validateSchema!==false){var l=e.definition.dependencies;if(l&&!l.every(function(e){return Object.prototype.hasOwnProperty.call(f,e)}))throw new Error("parent schema must have all required keywords: "+l.join(","));var v=e.definition.validateSchema;if(v){var r=v(n);if(!r){var g="keyword schema is invalid: "+j.errorsText(v.errors);if(j._opts.validateSchema=="log")j.logger.error(g);else throw new Error(g)}}}var b=e.definition.compile,d=e.definition.inline,p=e.definition.macro;var R;if(b){R=b.call(j,n,f,s)}else if(p){R=p.call(j,n,f,s);if(w.validateSchema!==false)j.validateSchema(R,true)}else if(d){R=d.call(j,s,e.keyword,n,f)}else{R=e.definition.validate;if(!R)return}if(R===undefined)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var F=x.length;x[F]=R;return{code:"customRule"+F,validate:R}}}function checkCompiling(e,n,f){var s=compIndex.call(this,e,n,f);if(s>=0)return{index:s,compiling:true};s=this._compilations.length;this._compilations[s]={schema:e,root:n,baseId:f};return{index:s,compiling:false}}function endCompiling(e,n,f){var s=compIndex.call(this,e,n,f);if(s>=0)this._compilations.splice(s,1)}function compIndex(e,n,f){for(var s=0;s{"use strict";var s=f(4007),l=f(3933),v=f(6057),r=f(7837),g=f(2437);e.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(e,n,f){var s=this._refs[f];if(typeof s=="string"){if(this._refs[s])s=this._refs[s];else return resolve.call(this,e,n,s)}s=s||this._schemas[f];if(s instanceof r){return inlineRef(s.schema,this._opts.inlineRefs)?s.schema:s.validate||this._compile(s)}var l=resolveSchema.call(this,n,f);var v,g,b;if(l){v=l.schema;n=l.root;b=l.baseId}if(v instanceof r){g=v.validate||e.call(this,v.schema,n,undefined,b)}else if(v!==undefined){g=inlineRef(v,this._opts.inlineRefs)?v:e.call(this,v,n,undefined,b)}return g}function resolveSchema(e,n){var f=s.parse(n),l=_getFullPath(f),v=getFullPath(this._getId(e.schema));if(Object.keys(e.schema).length===0||l!==v){var g=normalizeId(l);var b=this._refs[g];if(typeof b=="string"){return resolveRecursive.call(this,e,b,f)}else if(b instanceof r){if(!b.validate)this._compile(b);e=b}else{b=this._schemas[g];if(b instanceof r){if(!b.validate)this._compile(b);if(g==normalizeId(n))return{schema:b,root:e,baseId:v};e=b}else{return}}if(!e.schema)return;v=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,f,v,e.schema,e)}function resolveRecursive(e,n,f){var s=resolveSchema.call(this,e,n);if(s){var l=s.schema;var v=s.baseId;e=s.root;var r=this._getId(l);if(r)v=resolveUrl(v,r);return getJsonPointer.call(this,f,v,l,e)}}var b=v.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,n,f,s){e.fragment=e.fragment||"";if(e.fragment.slice(0,1)!="/")return;var l=e.fragment.split("/");for(var r=1;r{"use strict";var s=f(4124),l=f(6057).toHash;e.exports=function rules(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var n=["type","$comment"];var f=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var v=["number","integer","string","array","object","boolean","null"];e.all=l(n);e.types=l(v);e.forEach(function(f){f.rules=f.rules.map(function(f){var l;if(typeof f=="object"){var v=Object.keys(f)[0];l=f[v];f=v;l.forEach(function(f){n.push(f);e.all[f]=true})}n.push(f);var r=e.all[f]={keyword:f,code:s[f],implements:l};return r});e.all.$comment={keyword:"$comment",code:s.$comment};if(f.type)e.types[f.type]=f});e.keywords=l(n.concat(f));e.custom={};return e}},7837:(e,n,f)=>{"use strict";var s=f(6057);e.exports=SchemaObject;function SchemaObject(e){s.copy(e,this)}},9652:e=>{"use strict";e.exports=function ucs2length(e){var n=0,f=e.length,s=0,l;while(s=55296&&l<=56319&&s{"use strict";e.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:f(3933),ucs2length:f(9652),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(e,n){n=n||{};for(var f in e)n[f]=e[f];return n}function checkDataType(e,n,f,s){var l=s?" !== ":" === ",v=s?" || ":" && ",r=s?"!":"",g=s?"":"!";switch(e){case"null":return n+l+"null";case"array":return r+"Array.isArray("+n+")";case"object":return"("+r+n+v+"typeof "+n+l+'"object"'+v+g+"Array.isArray("+n+"))";case"integer":return"(typeof "+n+l+'"number"'+v+g+"("+n+" % 1)"+v+n+l+n+(f?v+r+"isFinite("+n+")":"")+")";case"number":return"(typeof "+n+l+'"'+e+'"'+(f?v+r+"isFinite("+n+")":"")+")";default:return"typeof "+n+l+'"'+e+'"'}}function checkDataTypes(e,n,f){switch(e.length){case 1:return checkDataType(e[0],n,f,true);default:var s="";var l=toHash(e);if(l.array&&l.object){s=l.null?"(":"(!"+n+" || ";s+="typeof "+n+' !== "object")';delete l.null;delete l.array;delete l.object}if(l.number)delete l.integer;for(var v in l)s+=(s?" && ":"")+checkDataType(v,n,f,true);return s}}var s=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(e,n){if(Array.isArray(n)){var f=[];for(var l=0;l=n)throw new Error("Cannot access property/index "+s+" levels up, current level is "+n);return f[n-s]}if(s>n)throw new Error("Cannot access data "+s+" levels up, current level is "+n);v="data"+(n-s||"");if(!l)return v}var d=v;var p=l.split("/");for(var R=0;R{"use strict";var n=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,f){for(var s=0;s{"use strict";var s=f(8938);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:s.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:s.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},3711:e=>{"use strict";e.exports=function generate__limit(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}var F=n=="maximum",E=F?"exclusiveMaximum":"exclusiveMinimum",A=e.schema[E],N=e.opts.$data&&A&&A.$data,a=F?"<":">",z=F?">":"<",p=undefined;if(!(j||typeof r=="number"||r===undefined)){throw new Error(n+" must be number")}if(!(N||A===undefined||typeof A=="number"||typeof A=="boolean")){throw new Error(E+" must be number or boolean")}if(N){var x=e.util.getData(A.$data,v,e.dataPathArr),q="exclusive"+l,O="exclType"+l,Q="exclIsNumber"+l,U="op"+l,I="' + "+U+" + '";s+=" var schemaExcl"+l+" = "+x+"; ";x="schemaExcl"+l;s+=" var "+q+"; var "+O+" = typeof "+x+"; if ("+O+" != 'boolean' && "+O+" != 'undefined' && "+O+" != 'number') { ";var p=E;var T=T||[];T.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: '"+E+" should be boolean' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var J=s;s=T.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+J+"]); "}else{s+=" validate.errors = ["+J+"]; return false; "}}else{s+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" "+O+" == 'number' ? ( ("+q+" = "+w+" === undefined || "+x+" "+a+"= "+w+") ? "+R+" "+z+"= "+x+" : "+R+" "+z+" "+w+" ) : ( ("+q+" = "+x+" === true) ? "+R+" "+z+"= "+w+" : "+R+" "+z+" "+w+" ) || "+R+" !== "+R+") { var op"+l+" = "+q+" ? '"+a+"' : '"+a+"='; ";if(r===undefined){p=E;b=e.errSchemaPath+"/"+E;w=x;j=N}}else{var Q=typeof A=="number",I=a;if(Q&&j){var U="'"+I+"'";s+=" if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" ( "+w+" === undefined || "+A+" "+a+"= "+w+" ? "+R+" "+z+"= "+A+" : "+R+" "+z+" "+w+" ) || "+R+" !== "+R+") { "}else{if(Q&&r===undefined){q=true;p=E;b=e.errSchemaPath+"/"+E;w=A;z+="="}else{if(Q)w=Math[F?"min":"max"](A,r);if(A===(Q?w:true)){q=true;p=E;b=e.errSchemaPath+"/"+E;z+="="}else{q=false;I+="="}}var U="'"+I+"'";s+=" if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" "+R+" "+z+" "+w+" || "+R+" !== "+R+") { "}}p=p||n;var T=T||[];T.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { comparison: "+U+", limit: "+w+", exclusive: "+q+" } ";if(e.opts.messages!==false){s+=" , message: 'should be "+I+" ";if(j){s+="' + "+w}else{s+=""+w+"'"}}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var J=s;s=T.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+J+"]); "}else{s+=" validate.errors = ["+J+"]; return false; "}}else{s+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){s+=" else { "}return s}},5675:e=>{"use strict";e.exports=function generate__limitItems(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!(j||typeof r=="number")){throw new Error(n+" must be number")}var F=n=="maxItems"?">":"<";s+="if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" "+R+".length "+F+" "+w+") { ";var p=n;var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+w+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have ";if(n=="maxItems"){s+="more"}else{s+="fewer"}s+=" than ";if(j){s+="' + "+w+" + '"}else{s+=""+r}s+=" items' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},6051:e=>{"use strict";e.exports=function generate__limitLength(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!(j||typeof r=="number")){throw new Error(n+" must be number")}var F=n=="maxLength"?">":"<";s+="if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}if(e.opts.unicode===false){s+=" "+R+".length "}else{s+=" ucs2length("+R+") "}s+=" "+F+" "+w+") { ";var p=n;var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+w+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT be ";if(n=="maxLength"){s+="longer"}else{s+="shorter"}s+=" than ";if(j){s+="' + "+w+" + '"}else{s+=""+r}s+=" characters' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},7043:e=>{"use strict";e.exports=function generate__limitProperties(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!(j||typeof r=="number")){throw new Error(n+" must be number")}var F=n=="maxProperties"?">":"<";s+="if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" Object.keys("+R+").length "+F+" "+w+") { ";var p=n;var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+w+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have ";if(n=="maxProperties"){s+="more"}else{s+="fewer"}s+=" than ";if(j){s+="' + "+w+" + '"}else{s+=""+r}s+=" properties' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},3639:e=>{"use strict";e.exports=function generate_allOf(e,n,f){var s=" ";var l=e.schema[n];var v=e.schemaPath+e.util.getProperty(n);var r=e.errSchemaPath+"/"+n;var g=!e.opts.allErrors;var b=e.util.copy(e);var d="";b.level++;var p="valid"+b.level;var R=b.baseId,j=true;var w=l;if(w){var F,E=-1,A=w.length-1;while(E0||F===false:e.util.schemaHasRules(F,e.RULES.all)){j=false;b.schema=F;b.schemaPath=v+"["+E+"]";b.errSchemaPath=r+"/"+E;s+=" "+e.validate(b)+" ";b.baseId=R;if(g){s+=" if ("+p+") { ";d+="}"}}}}if(g){if(j){s+=" if (true) { "}else{s+=" "+d.slice(0,-1)+" "}}return s}},1256:e=>{"use strict";e.exports=function generate_anyOf(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A=r.every(function(n){return e.opts.strictKeywords?typeof n=="object"&&Object.keys(n).length>0||n===false:e.util.schemaHasRules(n,e.RULES.all)});if(A){var N=w.baseId;s+=" var "+j+" = errors; var "+R+" = false; ";var a=e.compositeRule;e.compositeRule=w.compositeRule=true;var z=r;if(z){var x,q=-1,O=z.length-1;while(q{"use strict";e.exports=function generate_comment(e,n,f){var s=" ";var l=e.schema[n];var v=e.errSchemaPath+"/"+n;var r=!e.opts.allErrors;var g=e.util.toQuotedString(l);if(e.opts.$comment===true){s+=" console.log("+g+");"}else if(typeof e.opts.$comment=="function"){s+=" self._opts.$comment("+g+", "+e.util.toQuotedString(v)+", validate.root.schema);"}return s}},184:e=>{"use strict";e.exports=function generate_const(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!j){s+=" var schema"+l+" = validate.schema"+g+";"}s+="var "+R+" = equal("+p+", schema"+l+"); if (!"+R+") { ";var F=F||[];F.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { allowedValue: schema"+l+" } ";if(e.opts.messages!==false){s+=" , message: 'should be equal to constant' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var E=s;s=F.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+E+"]); "}else{s+=" validate.errors = ["+E+"]; return false; "}}else{s+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(d){s+=" else { "}return s}},7419:e=>{"use strict";e.exports=function generate_contains(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A="i"+l,N=w.dataLevel=e.dataLevel+1,a="data"+N,z=e.baseId,x=e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all);s+="var "+j+" = errors;var "+R+";";if(x){var q=e.compositeRule;e.compositeRule=w.compositeRule=true;w.schema=r;w.schemaPath=g;w.errSchemaPath=b;s+=" var "+E+" = false; for (var "+A+" = 0; "+A+" < "+p+".length; "+A+"++) { ";w.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,true);var O=p+"["+A+"]";w.dataPathArr[N]=A;var Q=e.validate(w);w.baseId=z;if(e.util.varOccurences(Q,a)<2){s+=" "+e.util.varReplace(Q,a,O)+" "}else{s+=" var "+a+" = "+O+"; "+Q+" "}s+=" if ("+E+") break; } ";e.compositeRule=w.compositeRule=q;s+=" "+F+" if (!"+E+") {"}else{s+=" if ("+p+".length == 0) {"}var U=U||[];U.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should contain a valid item' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var I=s;s=U.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { ";if(x){s+=" errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; } "}if(e.opts.allErrors){s+=" } "}return s}},7921:e=>{"use strict";e.exports=function generate_custom(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j="valid"+l;var w="errs__"+l;var F=e.opts.$data&&r&&r.$data,E;if(F){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";E="schema"+l}else{E=r}var A=this,N="definition"+l,a=A.definition,z="";var x,q,O,Q,U;if(F&&a.$data){U="keywordValidate"+l;var I=a.validateSchema;s+=" var "+N+" = RULES.custom['"+n+"'].definition; var "+U+" = "+N+".validate;"}else{Q=e.useCustomRule(A,r,e.schema,e);if(!Q)return;E="validate.schema"+g;U=Q.code;x=a.compile;q=a.inline;O=a.macro}var T=U+".errors",J="i"+l,L="ruleErr"+l,M=a.async;if(M&&!e.async)throw new Error("async keyword in sync schema");if(!(q||O)){s+=""+T+" = null;"}s+="var "+w+" = errors;var "+j+";";if(F&&a.$data){z+="}";s+=" if ("+E+" === undefined) { "+j+" = true; } else { ";if(I){z+="}";s+=" "+j+" = "+N+".validateSchema("+E+"); if ("+j+") { "}}if(q){if(a.statements){s+=" "+Q.validate+" "}else{s+=" "+j+" = "+Q.validate+"; "}}else if(O){var C=e.util.copy(e);var z="";C.level++;var H="valid"+C.level;C.schema=Q.validate;C.schemaPath="";var G=e.compositeRule;e.compositeRule=C.compositeRule=true;var Y=e.validate(C).replace(/validate\.schema/g,U);e.compositeRule=C.compositeRule=G;s+=" "+Y}else{var W=W||[];W.push(s);s="";s+=" "+U+".call( ";if(e.opts.passContext){s+="this"}else{s+="self"}if(x||a.schema===false){s+=" , "+R+" "}else{s+=" , "+E+" , "+R+" , validate.schema"+e.schemaPath+" "}s+=" , (dataPath || '')";if(e.errorPath!='""'){s+=" + "+e.errorPath}var X=v?"data"+(v-1||""):"parentData",c=v?e.dataPathArr[v]:"parentDataProperty";s+=" , "+X+" , "+c+" , rootData ) ";var B=s;s=W.pop();if(a.errors===false){s+=" "+j+" = ";if(M){s+="await "}s+=""+B+"; "}else{if(M){T="customErrors"+l;s+=" var "+T+" = null; try { "+j+" = await "+B+"; } catch (e) { "+j+" = false; if (e instanceof ValidationError) "+T+" = e.errors; else throw e; } "}else{s+=" "+T+" = null; "+j+" = "+B+"; "}}}if(a.modifying){s+=" if ("+X+") "+R+" = "+X+"["+c+"];"}s+=""+z;if(a.valid){if(d){s+=" if (true) { "}}else{s+=" if ( ";if(a.valid===undefined){s+=" !";if(O){s+=""+H}else{s+=""+j}}else{s+=" "+!a.valid+" "}s+=") { ";p=A.keyword;var W=W||[];W.push(s);s="";var W=W||[];W.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { keyword: '"+A.keyword+"' } ";if(e.opts.messages!==false){s+=" , message: 'should pass \""+A.keyword+"\" keyword validation' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var Z=s;s=W.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+Z+"]); "}else{s+=" validate.errors = ["+Z+"]; return false; "}}else{s+=" var err = "+Z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var y=s;s=W.pop();if(q){if(a.errors){if(a.errors!="full"){s+=" for (var "+J+"="+w+"; "+J+"{"use strict";e.exports=function generate_dependencies(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);var w="";j.level++;var F="valid"+j.level;var E={},A={},N=e.opts.ownProperties;for(q in r){if(q=="__proto__")continue;var a=r[q];var z=Array.isArray(a)?A:E;z[q]=a}s+="var "+R+" = errors;";var x=e.errorPath;s+="var missing"+l+";";for(var q in A){z=A[q];if(z.length){s+=" if ( "+p+e.util.getProperty(q)+" !== undefined ";if(N){s+=" && Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(q)+"') "}if(d){s+=" && ( ";var O=z;if(O){var Q,U=-1,I=O.length-1;while(U0||a===false:e.util.schemaHasRules(a,e.RULES.all)){s+=" "+F+" = true; if ( "+p+e.util.getProperty(q)+" !== undefined ";if(N){s+=" && Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(q)+"') "}s+=") { ";j.schema=a;j.schemaPath=g+e.util.getProperty(q);j.errSchemaPath=b+"/"+e.util.escapeFragment(q);s+=" "+e.validate(j)+" ";j.baseId=X;s+=" } ";if(d){s+=" if ("+F+") { ";w+="}"}}}if(d){s+=" "+w+" if ("+R+" == errors) {"}return s}},9795:e=>{"use strict";e.exports=function generate_enum(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}var F="i"+l,E="schema"+l;if(!j){s+=" var "+E+" = validate.schema"+g+";"}s+="var "+R+";";if(j){s+=" if (schema"+l+" === undefined) "+R+" = true; else if (!Array.isArray(schema"+l+")) "+R+" = false; else {"}s+=""+R+" = false;for (var "+F+"=0; "+F+"<"+E+".length; "+F+"++) if (equal("+p+", "+E+"["+F+"])) { "+R+" = true; break; }";if(j){s+=" } "}s+=" if (!"+R+") { ";var A=A||[];A.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { allowedValues: schema"+l+" } ";if(e.opts.messages!==false){s+=" , message: 'should be equal to one of the allowed values' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var N=s;s=A.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+N+"]); "}else{s+=" validate.errors = ["+N+"]; return false; "}}else{s+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(d){s+=" else { "}return s}},5801:e=>{"use strict";e.exports=function generate_format(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");if(e.opts.format===false){if(d){s+=" if (true) { "}return s}var R=e.opts.$data&&r&&r.$data,j;if(R){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";j="schema"+l}else{j=r}var w=e.opts.unknownFormats,F=Array.isArray(w);if(R){var E="format"+l,A="isObject"+l,N="formatType"+l;s+=" var "+E+" = formats["+j+"]; var "+A+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+N+" = "+A+" && "+E+".type || 'string'; if ("+A+") { ";if(e.async){s+=" var async"+l+" = "+E+".async; "}s+=" "+E+" = "+E+".validate; } if ( ";if(R){s+=" ("+j+" !== undefined && typeof "+j+" != 'string') || "}s+=" (";if(w!="ignore"){s+=" ("+j+" && !"+E+" ";if(F){s+=" && self._opts.unknownFormats.indexOf("+j+") == -1 "}s+=") || "}s+=" ("+E+" && "+N+" == '"+f+"' && !(typeof "+E+" == 'function' ? ";if(e.async){s+=" (async"+l+" ? await "+E+"("+p+") : "+E+"("+p+")) "}else{s+=" "+E+"("+p+") "}s+=" : "+E+".test("+p+"))))) {"}else{var E=e.formats[r];if(!E){if(w=="ignore"){e.logger.warn('unknown format "'+r+'" ignored in schema at path "'+e.errSchemaPath+'"');if(d){s+=" if (true) { "}return s}else if(F&&w.indexOf(r)>=0){if(d){s+=" if (true) { "}return s}else{throw new Error('unknown format "'+r+'" is used in schema at path "'+e.errSchemaPath+'"')}}var A=typeof E=="object"&&!(E instanceof RegExp)&&E.validate;var N=A&&E.type||"string";if(A){var a=E.async===true;E=E.validate}if(N!=f){if(d){s+=" if (true) { "}return s}if(a){if(!e.async)throw new Error("async format in sync schema");var z="formats"+e.util.getProperty(r)+".validate";s+=" if (!(await "+z+"("+p+"))) { "}else{s+=" if (! ";var z="formats"+e.util.getProperty(r);if(A)z+=".validate";if(typeof E=="function"){s+=" "+z+"("+p+") "}else{s+=" "+z+".test("+p+") "}s+=") { "}}var x=x||[];x.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { format: ";if(R){s+=""+j}else{s+=""+e.util.toQuotedString(r)}s+=" } ";if(e.opts.messages!==false){s+=" , message: 'should match format \"";if(R){s+="' + "+j+" + '"}else{s+=""+e.util.escapeQuotes(r)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(R){s+="validate.schema"+g}else{s+=""+e.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var q=s;s=x.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+q+"]); "}else{s+=" validate.errors = ["+q+"]; return false; "}}else{s+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){s+=" else { "}return s}},4962:e=>{"use strict";e.exports=function generate_if(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);w.level++;var F="valid"+w.level;var E=e.schema["then"],A=e.schema["else"],N=E!==undefined&&(e.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===false:e.util.schemaHasRules(E,e.RULES.all)),a=A!==undefined&&(e.opts.strictKeywords?typeof A=="object"&&Object.keys(A).length>0||A===false:e.util.schemaHasRules(A,e.RULES.all)),z=w.baseId;if(N||a){var x;w.createErrors=false;w.schema=r;w.schemaPath=g;w.errSchemaPath=b;s+=" var "+j+" = errors; var "+R+" = true; ";var q=e.compositeRule;e.compositeRule=w.compositeRule=true;s+=" "+e.validate(w)+" ";w.baseId=z;w.createErrors=true;s+=" errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; } ";e.compositeRule=w.compositeRule=q;if(N){s+=" if ("+F+") { ";w.schema=e.schema["then"];w.schemaPath=e.schemaPath+".then";w.errSchemaPath=e.errSchemaPath+"/then";s+=" "+e.validate(w)+" ";w.baseId=z;s+=" "+R+" = "+F+"; ";if(N&&a){x="ifClause"+l;s+=" var "+x+" = 'then'; "}else{x="'then'"}s+=" } ";if(a){s+=" else { "}}else{s+=" if (!"+F+") { "}if(a){w.schema=e.schema["else"];w.schemaPath=e.schemaPath+".else";w.errSchemaPath=e.errSchemaPath+"/else";s+=" "+e.validate(w)+" ";w.baseId=z;s+=" "+R+" = "+F+"; ";if(N&&a){x="ifClause"+l;s+=" var "+x+" = 'else'; "}else{x="'else'"}s+=" } "}s+=" if (!"+R+") { var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { failingKeyword: "+x+" } ";if(e.opts.messages!==false){s+=" , message: 'should match \"' + "+x+" + '\" schema' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+=" } ";if(d){s+=" else { "}}else{if(d){s+=" if (true) { "}}return s}},4124:(e,n,f)=>{"use strict";e.exports={$ref:f(5746),allOf:f(3639),anyOf:f(1256),$comment:f(2660),const:f(184),contains:f(7419),dependencies:f(7299),enum:f(9795),format:f(5801),if:f(4962),items:f(9623),maximum:f(3711),minimum:f(3711),maxItems:f(5675),minItems:f(5675),maxLength:f(6051),minLength:f(6051),maxProperties:f(7043),minProperties:f(7043),multipleOf:f(9251),not:f(7739),oneOf:f(6857),pattern:f(8099),properties:f(9438),propertyNames:f(3466),required:f(8430),uniqueItems:f(2207),validate:f(6131)}},9623:e=>{"use strict";e.exports=function generate_items(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A="i"+l,N=w.dataLevel=e.dataLevel+1,a="data"+N,z=e.baseId;s+="var "+j+" = errors;var "+R+";";if(Array.isArray(r)){var x=e.schema.additionalItems;if(x===false){s+=" "+R+" = "+p+".length <= "+r.length+"; ";var q=b;b=e.errSchemaPath+"/additionalItems";s+=" if (!"+R+") { ";var O=O||[];O.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+r.length+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have more than "+r.length+" items' "}if(e.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var Q=s;s=O.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+Q+"]); "}else{s+=" validate.errors = ["+Q+"]; return false; "}}else{s+=" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";b=q;if(d){F+="}";s+=" else { "}}var U=r;if(U){var I,T=-1,J=U.length-1;while(T0||I===false:e.util.schemaHasRules(I,e.RULES.all)){s+=" "+E+" = true; if ("+p+".length > "+T+") { ";var L=p+"["+T+"]";w.schema=I;w.schemaPath=g+"["+T+"]";w.errSchemaPath=b+"/"+T;w.errorPath=e.util.getPathExpr(e.errorPath,T,e.opts.jsonPointers,true);w.dataPathArr[N]=T;var M=e.validate(w);w.baseId=z;if(e.util.varOccurences(M,a)<2){s+=" "+e.util.varReplace(M,a,L)+" "}else{s+=" var "+a+" = "+L+"; "+M+" "}s+=" } ";if(d){s+=" if ("+E+") { ";F+="}"}}}}if(typeof x=="object"&&(e.opts.strictKeywords?typeof x=="object"&&Object.keys(x).length>0||x===false:e.util.schemaHasRules(x,e.RULES.all))){w.schema=x;w.schemaPath=e.schemaPath+".additionalItems";w.errSchemaPath=e.errSchemaPath+"/additionalItems";s+=" "+E+" = true; if ("+p+".length > "+r.length+") { for (var "+A+" = "+r.length+"; "+A+" < "+p+".length; "+A+"++) { ";w.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,true);var L=p+"["+A+"]";w.dataPathArr[N]=A;var M=e.validate(w);w.baseId=z;if(e.util.varOccurences(M,a)<2){s+=" "+e.util.varReplace(M,a,L)+" "}else{s+=" var "+a+" = "+L+"; "+M+" "}if(d){s+=" if (!"+E+") break; "}s+=" } } ";if(d){s+=" if ("+E+") { ";F+="}"}}}else if(e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)){w.schema=r;w.schemaPath=g;w.errSchemaPath=b;s+=" for (var "+A+" = "+0+"; "+A+" < "+p+".length; "+A+"++) { ";w.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,true);var L=p+"["+A+"]";w.dataPathArr[N]=A;var M=e.validate(w);w.baseId=z;if(e.util.varOccurences(M,a)<2){s+=" "+e.util.varReplace(M,a,L)+" "}else{s+=" var "+a+" = "+L+"; "+M+" "}if(d){s+=" if (!"+E+") break; "}s+=" }"}if(d){s+=" "+F+" if ("+j+" == errors) {"}return s}},9251:e=>{"use strict";e.exports=function generate_multipleOf(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R=e.opts.$data&&r&&r.$data,j;if(R){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";j="schema"+l}else{j=r}if(!(R||typeof r=="number")){throw new Error(n+" must be number")}s+="var division"+l+";if (";if(R){s+=" "+j+" !== undefined && ( typeof "+j+" != 'number' || "}s+=" (division"+l+" = "+p+" / "+j+", ";if(e.opts.multipleOfPrecision){s+=" Math.abs(Math.round(division"+l+") - division"+l+") > 1e-"+e.opts.multipleOfPrecision+" "}else{s+=" division"+l+" !== parseInt(division"+l+") "}s+=" ) ";if(R){s+=" ) "}s+=" ) { ";var w=w||[];w.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { multipleOf: "+j+" } ";if(e.opts.messages!==false){s+=" , message: 'should be multiple of ";if(R){s+="' + "+j}else{s+=""+j+"'"}}if(e.opts.verbose){s+=" , schema: ";if(R){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var F=s;s=w.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+F+"]); "}else{s+=" validate.errors = ["+F+"]; return false; "}}else{s+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},7739:e=>{"use strict";e.exports=function generate_not(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);j.level++;var w="valid"+j.level;if(e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)){j.schema=r;j.schemaPath=g;j.errSchemaPath=b;s+=" var "+R+" = errors; ";var F=e.compositeRule;e.compositeRule=j.compositeRule=true;j.createErrors=false;var E;if(j.opts.allErrors){E=j.opts.allErrors;j.opts.allErrors=false}s+=" "+e.validate(j)+" ";j.createErrors=true;if(E)j.opts.allErrors=E;e.compositeRule=j.compositeRule=F;s+=" if ("+w+") { ";var A=A||[];A.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var N=s;s=A.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+N+"]); "}else{s+=" validate.errors = ["+N+"]; return false; "}}else{s+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { errors = "+R+"; if (vErrors !== null) { if ("+R+") vErrors.length = "+R+"; else vErrors = null; } ";if(e.opts.allErrors){s+=" } "}}else{s+=" var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(d){s+=" if (false) { "}}return s}},6857:e=>{"use strict";e.exports=function generate_oneOf(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A=w.baseId,N="prevValid"+l,a="passingSchemas"+l;s+="var "+j+" = errors , "+N+" = false , "+R+" = false , "+a+" = null; ";var z=e.compositeRule;e.compositeRule=w.compositeRule=true;var x=r;if(x){var q,O=-1,Q=x.length-1;while(O0||q===false:e.util.schemaHasRules(q,e.RULES.all)){w.schema=q;w.schemaPath=g+"["+O+"]";w.errSchemaPath=b+"/"+O;s+=" "+e.validate(w)+" ";w.baseId=A}else{s+=" var "+E+" = true; "}if(O){s+=" if ("+E+" && "+N+") { "+R+" = false; "+a+" = ["+a+", "+O+"]; } else { ";F+="}"}s+=" if ("+E+") { "+R+" = "+N+" = true; "+a+" = "+O+"; }"}}e.compositeRule=w.compositeRule=z;s+=""+F+"if (!"+R+") { var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { passingSchemas: "+a+" } ";if(e.opts.messages!==false){s+=" , message: 'should match exactly one schema in oneOf' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+="} else { errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; }";if(e.opts.allErrors){s+=" } "}return s}},8099:e=>{"use strict";e.exports=function generate_pattern(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R=e.opts.$data&&r&&r.$data,j;if(R){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";j="schema"+l}else{j=r}var w=R?"(new RegExp("+j+"))":e.usePattern(r);s+="if ( ";if(R){s+=" ("+j+" !== undefined && typeof "+j+" != 'string') || "}s+=" !"+w+".test("+p+") ) { ";var F=F||[];F.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { pattern: ";if(R){s+=""+j}else{s+=""+e.util.toQuotedString(r)}s+=" } ";if(e.opts.messages!==false){s+=" , message: 'should match pattern \"";if(R){s+="' + "+j+" + '"}else{s+=""+e.util.escapeQuotes(r)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(R){s+="validate.schema"+g}else{s+=""+e.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var E=s;s=F.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+E+"]); "}else{s+=" validate.errors = ["+E+"]; return false; "}}else{s+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},9438:e=>{"use strict";e.exports=function generate_properties(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);var w="";j.level++;var F="valid"+j.level;var E="key"+l,A="idx"+l,N=j.dataLevel=e.dataLevel+1,a="data"+N,z="dataProperties"+l;var x=Object.keys(r||{}).filter(notProto),q=e.schema.patternProperties||{},O=Object.keys(q).filter(notProto),Q=e.schema.additionalProperties,U=x.length||O.length,I=Q===false,T=typeof Q=="object"&&Object.keys(Q).length,J=e.opts.removeAdditional,L=I||T||J,M=e.opts.ownProperties,C=e.baseId;var H=e.schema.required;if(H&&!(e.opts.$data&&H.$data)&&H.length8){s+=" || validate.schema"+g+".hasOwnProperty("+E+") "}else{var Y=x;if(Y){var W,X=-1,c=Y.length-1;while(X0||t===false:e.util.schemaHasRules(t,e.RULES.all)){var ee=e.util.getProperty(W),P=p+ee,ne=_&&t.default!==undefined;j.schema=t;j.schemaPath=g+ee;j.errSchemaPath=b+"/"+e.util.escapeFragment(W);j.errorPath=e.util.getPath(e.errorPath,W,e.opts.jsonPointers);j.dataPathArr[N]=e.util.toQuotedString(W);var i=e.validate(j);j.baseId=C;if(e.util.varOccurences(i,a)<2){i=e.util.varReplace(i,a,P);var fe=P}else{var fe=a;s+=" var "+a+" = "+P+"; "}if(ne){s+=" "+i+" "}else{if(G&&G[W]){s+=" if ( "+fe+" === undefined ";if(M){s+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(W)+"') "}s+=") { "+F+" = false; ";var K=e.errorPath,V=b,se=e.util.escapeQuotes(W);if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPath(K,W,e.opts.jsonPointers)}b=e.errSchemaPath+"/required";var k=k||[];k.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { missingProperty: '"+se+"' } ";if(e.opts.messages!==false){s+=" , message: '";if(e.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+se+"\\'"}s+="' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var h=s;s=k.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+h+"]); "}else{s+=" validate.errors = ["+h+"]; return false; "}}else{s+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}b=V;e.errorPath=K;s+=" } else { "}else{if(d){s+=" if ( "+fe+" === undefined ";if(M){s+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(W)+"') "}s+=") { "+F+" = true; } else { "}else{s+=" if ("+fe+" !== undefined ";if(M){s+=" && Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(W)+"') "}s+=" ) { "}}s+=" "+i+" } "}}if(d){s+=" if ("+F+") { ";w+="}"}}}}if(O.length){var le=O;if(le){var Z,ve=-1,re=le.length-1;while(ve0||t===false:e.util.schemaHasRules(t,e.RULES.all)){j.schema=t;j.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(Z);j.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(Z);if(M){s+=" "+z+" = "+z+" || Object.keys("+p+"); for (var "+A+"=0; "+A+"<"+z+".length; "+A+"++) { var "+E+" = "+z+"["+A+"]; "}else{s+=" for (var "+E+" in "+p+") { "}s+=" if ("+e.usePattern(Z)+".test("+E+")) { ";j.errorPath=e.util.getPathExpr(e.errorPath,E,e.opts.jsonPointers);var P=p+"["+E+"]";j.dataPathArr[N]=E;var i=e.validate(j);j.baseId=C;if(e.util.varOccurences(i,a)<2){s+=" "+e.util.varReplace(i,a,P)+" "}else{s+=" var "+a+" = "+P+"; "+i+" "}if(d){s+=" if (!"+F+") break; "}s+=" } ";if(d){s+=" else "+F+" = true; "}s+=" } ";if(d){s+=" if ("+F+") { ";w+="}"}}}}}if(d){s+=" "+w+" if ("+R+" == errors) {"}return s}},3466:e=>{"use strict";e.exports=function generate_propertyNames(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);var w="";j.level++;var F="valid"+j.level;s+="var "+R+" = errors;";if(e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)){j.schema=r;j.schemaPath=g;j.errSchemaPath=b;var E="key"+l,A="idx"+l,N="i"+l,a="' + "+E+" + '",z=j.dataLevel=e.dataLevel+1,x="data"+z,q="dataProperties"+l,O=e.opts.ownProperties,Q=e.baseId;if(O){s+=" var "+q+" = undefined; "}if(O){s+=" "+q+" = "+q+" || Object.keys("+p+"); for (var "+A+"=0; "+A+"<"+q+".length; "+A+"++) { var "+E+" = "+q+"["+A+"]; "}else{s+=" for (var "+E+" in "+p+") { "}s+=" var startErrs"+l+" = errors; ";var U=E;var I=e.compositeRule;e.compositeRule=j.compositeRule=true;var T=e.validate(j);j.baseId=Q;if(e.util.varOccurences(T,x)<2){s+=" "+e.util.varReplace(T,x,U)+" "}else{s+=" var "+x+" = "+U+"; "+T+" "}e.compositeRule=j.compositeRule=I;s+=" if (!"+F+") { for (var "+N+"=startErrs"+l+"; "+N+"{"use strict";e.exports=function generate_ref(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.errSchemaPath+"/"+n;var b=!e.opts.allErrors;var d="data"+(v||"");var p="valid"+l;var R,j;if(r=="#"||r=="#/"){if(e.isRoot){R=e.async;j="validate"}else{R=e.root.schema.$async===true;j="root.refVal[0]"}}else{var w=e.resolveRef(e.baseId,r,e.isRoot);if(w===undefined){var F=e.MissingRefError.message(e.baseId,r);if(e.opts.missingRefs=="fail"){e.logger.error(F);var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"$ref"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: { ref: '"+e.util.escapeQuotes(r)+"' } ";if(e.opts.messages!==false){s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(r)+"' "}if(e.opts.verbose){s+=" , schema: "+e.util.toQuotedString(r)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&b){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}if(b){s+=" if (false) { "}}else if(e.opts.missingRefs=="ignore"){e.logger.warn(F);if(b){s+=" if (true) { "}}else{throw new e.MissingRefError(e.baseId,r,F)}}else if(w.inline){var N=e.util.copy(e);N.level++;var a="valid"+N.level;N.schema=w.schema;N.schemaPath="";N.errSchemaPath=r;var z=e.validate(N).replace(/validate\.schema/g,w.code);s+=" "+z+" ";if(b){s+=" if ("+a+") { "}}else{R=w.$async===true||e.async&&w.$async!==false;j=w.code}}if(j){var E=E||[];E.push(s);s="";if(e.opts.passContext){s+=" "+j+".call(this, "}else{s+=" "+j+"( "}s+=" "+d+", (dataPath || '')";if(e.errorPath!='""'){s+=" + "+e.errorPath}var x=v?"data"+(v-1||""):"parentData",q=v?e.dataPathArr[v]:"parentDataProperty";s+=" , "+x+" , "+q+", rootData) ";var O=s;s=E.pop();if(R){if(!e.async)throw new Error("async schema referenced by sync schema");if(b){s+=" var "+p+"; "}s+=" try { await "+O+"; ";if(b){s+=" "+p+" = true; "}s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ";if(b){s+=" "+p+" = false; "}s+=" } ";if(b){s+=" if ("+p+") { "}}else{s+=" if (!"+O+") { if (vErrors === null) vErrors = "+j+".errors; else vErrors = vErrors.concat("+j+".errors); errors = vErrors.length; } ";if(b){s+=" else { "}}}return s}},8430:e=>{"use strict";e.exports=function generate_required(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}var F="schema"+l;if(!j){if(r.length0||x===false:e.util.schemaHasRules(x,e.RULES.all)))){E[E.length]=N}}}}else{var E=r}}if(j||E.length){var q=e.errorPath,O=j||E.length>=e.opts.loopRequired,Q=e.opts.ownProperties;if(d){s+=" var missing"+l+"; ";if(O){if(!j){s+=" var "+F+" = validate.schema"+g+"; "}var U="i"+l,I="schema"+l+"["+U+"]",T="' + "+I+" + '";if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPathExpr(q,I,e.opts.jsonPointers)}s+=" var "+R+" = true; ";if(j){s+=" if (schema"+l+" === undefined) "+R+" = true; else if (!Array.isArray(schema"+l+")) "+R+" = false; else {"}s+=" for (var "+U+" = 0; "+U+" < "+F+".length; "+U+"++) { "+R+" = "+p+"["+F+"["+U+"]] !== undefined ";if(Q){s+=" && Object.prototype.hasOwnProperty.call("+p+", "+F+"["+U+"]) "}s+="; if (!"+R+") break; } ";if(j){s+=" } "}s+=" if (!"+R+") { ";var J=J||[];J.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { missingProperty: '"+T+"' } ";if(e.opts.messages!==false){s+=" , message: '";if(e.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+T+"\\'"}s+="' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var L=s;s=J.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+L+"]); "}else{s+=" validate.errors = ["+L+"]; return false; "}}else{s+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { "}else{s+=" if ( ";var M=E;if(M){var C,U=-1,H=M.length-1;while(U{"use strict";e.exports=function generate_uniqueItems(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if((r||j)&&e.opts.uniqueItems!==false){if(j){s+=" var "+R+"; if ("+w+" === false || "+w+" === undefined) "+R+" = true; else if (typeof "+w+" != 'boolean') "+R+" = false; else { "}s+=" var i = "+p+".length , "+R+" = true , j; if (i > 1) { ";var F=e.schema.items&&e.schema.items.type,E=Array.isArray(F);if(!F||F=="object"||F=="array"||E&&(F.indexOf("object")>=0||F.indexOf("array")>=0)){s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+R+" = false; break outer; } } } "}else{s+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ";var A="checkDataType"+(E?"s":"");s+=" if ("+e.util[A](F,"item",e.opts.strictNumbers,true)+") continue; ";if(E){s+=" if (typeof item == 'string') item = '\"' + item; "}s+=" if (typeof itemIndices[item] == 'number') { "+R+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}s+=" } ";if(j){s+=" } "}s+=" if (!"+R+") { ";var N=N||[];N.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { i: i, j: j } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var a=s;s=N.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+a+"]); "}else{s+=" validate.errors = ["+a+"]; return false; "}}else{s+=" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){s+=" else { "}}else{if(d){s+=" if (true) { "}}return s}},6131:e=>{"use strict";e.exports=function generate_validate(e,n,f){var s="";var l=e.schema.$async===true,v=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),r=e.self._getId(e.schema);if(e.opts.strictKeywords){var g=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(g){var b="unknown keyword: "+g;if(e.opts.strictKeywords==="log")e.logger.warn(b);else throw new Error(b)}}if(e.isTop){s+=" var validate = ";if(l){e.async=true;s+="async "}s+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if(r&&(e.opts.sourceCode||e.opts.processCode)){s+=" "+("/*# sourceURL="+r+" */")+" "}}if(typeof e.schema=="boolean"||!(v||e.schema.$ref)){var n="false schema";var d=e.level;var p=e.dataLevel;var R=e.schema[n];var j=e.schemaPath+e.util.getProperty(n);var w=e.errSchemaPath+"/"+n;var F=!e.opts.allErrors;var E;var A="data"+(p||"");var N="valid"+d;if(e.schema===false){if(e.isTop){F=true}else{s+=" var "+N+" = false; "}var a=a||[];a.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(E||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'boolean schema is false' "}if(e.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+A+" "}s+=" } "}else{s+=" {} "}var z=s;s=a.pop();if(!e.compositeRule&&F){if(e.async){s+=" throw new ValidationError(["+z+"]); "}else{s+=" validate.errors = ["+z+"]; return false; "}}else{s+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(e.isTop){if(l){s+=" return data; "}else{s+=" validate.errors = null; return true; "}}else{s+=" var "+N+" = true; "}}if(e.isTop){s+=" }; return validate; "}return s}if(e.isTop){var x=e.isTop,d=e.level=0,p=e.dataLevel=0,A="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema));e.baseId=e.baseId||e.rootId;delete e.isTop;e.dataPathArr=[""];if(e.schema.default!==undefined&&e.opts.useDefaults&&e.opts.strictDefaults){var q="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(q);else throw new Error(q)}s+=" var vErrors = null; ";s+=" var errors = 0; ";s+=" if (rootData === undefined) rootData = data; "}else{var d=e.level,p=e.dataLevel,A="data"+(p||"");if(r)e.baseId=e.resolve.url(e.baseId,r);if(l&&!e.async)throw new Error("async schema in sync schema");s+=" var errs_"+d+" = errors;"}var N="valid"+d,F=!e.opts.allErrors,O="",Q="";var E;var U=e.schema.type,I=Array.isArray(U);if(U&&e.opts.nullable&&e.schema.nullable===true){if(I){if(U.indexOf("null")==-1)U=U.concat("null")}else if(U!="null"){U=[U,"null"];I=true}}if(I&&U.length==1){U=U[0];I=false}if(e.schema.$ref&&v){if(e.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)')}else if(e.opts.extendRefs!==true){v=false;e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')}}if(e.schema.$comment&&e.opts.$comment){s+=" "+e.RULES.all.$comment.code(e,"$comment")}if(U){if(e.opts.coerceTypes){var T=e.util.coerceToTypes(e.opts.coerceTypes,U)}var J=e.RULES.types[U];if(T||I||J===true||J&&!$shouldUseGroup(J)){var j=e.schemaPath+".type",w=e.errSchemaPath+"/type";var j=e.schemaPath+".type",w=e.errSchemaPath+"/type",L=I?"checkDataTypes":"checkDataType";s+=" if ("+e.util[L](U,A,e.opts.strictNumbers,true)+") { ";if(T){var M="dataType"+d,C="coerced"+d;s+=" var "+M+" = typeof "+A+"; var "+C+" = undefined; ";if(e.opts.coerceTypes=="array"){s+=" if ("+M+" == 'object' && Array.isArray("+A+") && "+A+".length == 1) { "+A+" = "+A+"[0]; "+M+" = typeof "+A+"; if ("+e.util.checkDataType(e.schema.type,A,e.opts.strictNumbers)+") "+C+" = "+A+"; } "}s+=" if ("+C+" !== undefined) ; ";var H=T;if(H){var G,Y=-1,W=H.length-1;while(Y{"use strict";var s=/^[a-z_$][a-z0-9_$-]*$/i;var l=f(7921);var v=f(5533);e.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(e,n){var f=this.RULES;if(f.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!s.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(n){this.validateKeyword(n,true);var v=n.type;if(Array.isArray(v)){for(var r=0;r{"use strict";e.exports=function equal(e,n){if(e===n)return true;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return false;var f,s,l;if(Array.isArray(e)){f=e.length;if(f!=n.length)return false;for(s=f;s--!==0;)if(!equal(e[s],n[s]))return false;return true}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();l=Object.keys(e);f=l.length;if(f!==Object.keys(n).length)return false;for(s=f;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,l[s]))return false;for(s=f;s--!==0;){var v=l[s];if(!equal(e[v],n[v]))return false}return true}return e!==e&&n!==n}},3600:e=>{"use strict";e.exports=function(e,n){if(!n)n={};if(typeof n==="function")n={cmp:n};var f=typeof n.cycles==="boolean"?n.cycles:false;var s=n.cmp&&function(e){return function(n){return function(f,s){var l={key:f,value:n[f]};var v={key:s,value:n[s]};return e(l,v)}}}(n.cmp);var l=[];return function stringify(e){if(e&&e.toJSON&&typeof e.toJSON==="function"){e=e.toJSON()}if(e===undefined)return;if(typeof e=="number")return isFinite(e)?""+e:"null";if(typeof e!=="object")return JSON.stringify(e);var n,v;if(Array.isArray(e)){v="[";for(n=0;n{"use strict";var n=e.exports=function(e,n,f){if(typeof n=="function"){f=n;n={}}f=n.cb||f;var s=typeof f=="function"?f:f.pre||function(){};var l=f.post||function(){};_traverse(n,s,l,e,"",e)};n.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true};n.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};n.propsKeywords={definitions:true,properties:true,patternProperties:true,dependencies:true};n.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,f,s,l,v,r,g,b,d,p){if(l&&typeof l=="object"&&!Array.isArray(l)){f(l,v,r,g,b,d,p);for(var R in l){var j=l[R];if(Array.isArray(j)){if(R in n.arrayKeywords){for(var w=0;w{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=void 0;const{stringHints:s,numberHints:l}=f(3638);const v={type:1,not:1,oneOf:1,anyOf:1,if:1,enum:1,const:1,instanceof:1,required:2,pattern:2,patternRequired:2,format:2,formatMinimum:2,formatMaximum:2,minimum:2,exclusiveMinimum:2,maximum:2,exclusiveMaximum:2,multipleOf:2,uniqueItems:2,contains:2,minLength:2,maxLength:2,minItems:2,maxItems:2,minProperties:2,maxProperties:2,dependencies:2,propertyNames:2,additionalItems:2,additionalProperties:2,absolutePath:2};function filterMax(e,n){const f=e.reduce((e,f)=>Math.max(e,n(f)),0);return e.filter(e=>n(e)===f)}function filterChildren(e){let n=e;n=filterMax(n,e=>e.dataPath?e.dataPath.length:0);n=filterMax(n,e=>v[e.keyword]||2);return n}function findAllChildren(e,n){let f=e.length-1;const s=n=>e[f].schemaPath.indexOf(n)!==0;while(f>-1&&!n.every(s)){if(e[f].keyword==="anyOf"||e[f].keyword==="oneOf"){const n=extractRefs(e[f]);const s=findAllChildren(e.slice(0,f),n.concat(e[f].schemaPath));f=s-1}else{f-=1}}return f+1}function extractRefs(e){const{schema:n}=e;if(!Array.isArray(n)){return[]}return n.map(({$ref:e})=>e).filter(e=>e)}function groupChildrenByFirstChild(e){const n=[];let f=e.length-1;while(f>0){const s=e[f];if(s.keyword==="anyOf"||s.keyword==="oneOf"){const l=extractRefs(s);const v=findAllChildren(e.slice(0,f),l.concat(s.schemaPath));if(v!==f){n.push(Object.assign({},s,{children:e.slice(v,f)}));f=v}else{n.push(s)}}else{n.push(s)}f-=1}if(f===0){n.push(e[f])}return n.reverse()}function indent(e,n){return e.replace(/\n(?!$)/g,`\n${n}`)}function hasNotInSchema(e){return!!e.not}function findFirstTypedSchema(e){if(hasNotInSchema(e)){return findFirstTypedSchema(e.not)}return e}function canApplyNot(e){const n=findFirstTypedSchema(e);return likeNumber(n)||likeInteger(n)||likeString(n)||likeNull(n)||likeBoolean(n)}function isObject(e){return typeof e==="object"&&e!==null}function likeNumber(e){return e.type==="number"||typeof e.minimum!=="undefined"||typeof e.exclusiveMinimum!=="undefined"||typeof e.maximum!=="undefined"||typeof e.exclusiveMaximum!=="undefined"||typeof e.multipleOf!=="undefined"}function likeInteger(e){return e.type==="integer"||typeof e.minimum!=="undefined"||typeof e.exclusiveMinimum!=="undefined"||typeof e.maximum!=="undefined"||typeof e.exclusiveMaximum!=="undefined"||typeof e.multipleOf!=="undefined"}function likeString(e){return e.type==="string"||typeof e.minLength!=="undefined"||typeof e.maxLength!=="undefined"||typeof e.pattern!=="undefined"||typeof e.format!=="undefined"||typeof e.formatMinimum!=="undefined"||typeof e.formatMaximum!=="undefined"}function likeBoolean(e){return e.type==="boolean"}function likeArray(e){return e.type==="array"||typeof e.minItems==="number"||typeof e.maxItems==="number"||typeof e.uniqueItems!=="undefined"||typeof e.items!=="undefined"||typeof e.additionalItems!=="undefined"||typeof e.contains!=="undefined"}function likeObject(e){return e.type==="object"||typeof e.minProperties!=="undefined"||typeof e.maxProperties!=="undefined"||typeof e.required!=="undefined"||typeof e.properties!=="undefined"||typeof e.patternProperties!=="undefined"||typeof e.additionalProperties!=="undefined"||typeof e.dependencies!=="undefined"||typeof e.propertyNames!=="undefined"||typeof e.patternRequired!=="undefined"}function likeNull(e){return e.type==="null"}function getArticle(e){if(/^[aeiou]/i.test(e)){return"an"}return"a"}function getSchemaNonTypes(e){if(!e){return""}if(!e.type){if(likeNumber(e)||likeInteger(e)){return" | should be any non-number"}if(likeString(e)){return" | should be any non-string"}if(likeArray(e)){return" | should be any non-array"}if(likeObject(e)){return" | should be any non-object"}}return""}function formatHints(e){return e.length>0?`(${e.join(", ")})`:""}function getHints(e,n){if(likeNumber(e)||likeInteger(e)){return l(e,n)}else if(likeString(e)){return s(e,n)}return[]}class ValidationError extends Error{constructor(e,n,f={}){super();this.name="ValidationError";this.errors=e;this.schema=n;let s;let l;if(n.title&&(!f.name||!f.baseDataPath)){const e=n.title.match(/^(.+) (.+)$/);if(e){if(!f.name){[,s]=e}if(!f.baseDataPath){[,,l]=e}}}this.headerName=f.name||s||"Object";this.baseDataPath=f.baseDataPath||l||"configuration";this.postFormatter=f.postFormatter||null;const v=`Invalid ${this.baseDataPath} object. ${this.headerName} has been initialized using ${getArticle(this.baseDataPath)} ${this.baseDataPath} object that does not match the API schema.\n`;this.message=`${v}${this.formatValidationErrors(e)}`;Error.captureStackTrace(this,this.constructor)}getSchemaPart(e){const n=e.split("/");let f=this.schema;for(let e=1;e{if(!l){return this.formatSchema(n,s,f)}if(f.includes(n)){return"(recursive)"}return this.formatSchema(n,s,f.concat(e))};if(hasNotInSchema(e)&&!likeObject(e)){if(canApplyNot(e.not)){s=!n;return l(e.not)}const f=!e.not.not;const v=n?"":"non ";s=!n;return f?v+l(e.not):l(e.not)}if(e.instanceof){const{instanceof:n}=e;const f=!Array.isArray(n)?[n]:n;return f.map(e=>e==="Function"?"function":e).join(" | ")}if(e.enum){return e.enum.map(e=>JSON.stringify(e)).join(" | ")}if(typeof e.const!=="undefined"){return JSON.stringify(e.const)}if(e.oneOf){return e.oneOf.map(e=>l(e,true)).join(" | ")}if(e.anyOf){return e.anyOf.map(e=>l(e,true)).join(" | ")}if(e.allOf){return e.allOf.map(e=>l(e,true)).join(" & ")}if(e.if){const{if:n,then:f,else:s}=e;return`${n?`if ${l(n)}`:""}${f?` then ${l(f)}`:""}${s?` else ${l(s)}`:""}`}if(e.$ref){return l(this.getSchemaPart(e.$ref),true)}if(likeNumber(e)||likeInteger(e)){const[f,...s]=getHints(e,n);const l=`${f}${s.length>0?` ${formatHints(s)}`:""}`;return n?l:s.length>0?`non-${f} | ${l}`:`non-${f}`}if(likeString(e)){const[f,...s]=getHints(e,n);const l=`${f}${s.length>0?` ${formatHints(s)}`:""}`;return n?l:l==="string"?"non-string":`non-string | ${l}`}if(likeBoolean(e)){return`${n?"":"non-"}boolean`}if(likeArray(e)){s=true;const n=[];if(typeof e.minItems==="number"){n.push(`should not have fewer than ${e.minItems} item${e.minItems>1?"s":""}`)}if(typeof e.maxItems==="number"){n.push(`should not have more than ${e.maxItems} item${e.maxItems>1?"s":""}`)}if(e.uniqueItems){n.push("should not have duplicate items")}const f=typeof e.additionalItems==="undefined"||Boolean(e.additionalItems);let v="";if(e.items){if(Array.isArray(e.items)&&e.items.length>0){v=`${e.items.map(e=>l(e)).join(", ")}`;if(f){if(e.additionalItems&&isObject(e.additionalItems)&&Object.keys(e.additionalItems).length>0){n.push(`additional items should be ${l(e.additionalItems)}`)}}}else if(e.items&&Object.keys(e.items).length>0){v=`${l(e.items)}`}else{v="any"}}else{v="any"}if(e.contains&&Object.keys(e.contains).length>0){n.push(`should contains at least one ${this.formatSchema(e.contains)} item`)}return`[${v}${f?", ...":""}]${n.length>0?` (${n.join(", ")})`:""}`}if(likeObject(e)){s=true;const n=[];if(typeof e.minProperties==="number"){n.push(`should not have fewer than ${e.minProperties} ${e.minProperties>1?"properties":"property"}`)}if(typeof e.maxProperties==="number"){n.push(`should not have more than ${e.maxProperties} ${e.minProperties&&e.minProperties>1?"properties":"property"}`)}if(e.patternProperties&&Object.keys(e.patternProperties).length>0){const f=Object.keys(e.patternProperties);n.push(`additional property names should match pattern${f.length>1?"s":""} ${f.map(e=>JSON.stringify(e)).join(" | ")}`)}const f=e.properties?Object.keys(e.properties):[];const v=e.required?e.required:[];const r=[...new Set([].concat(v).concat(f))];const g=r.map(e=>{const n=v.includes(e);return`${e}${n?"":"?"}`}).concat(typeof e.additionalProperties==="undefined"||Boolean(e.additionalProperties)?e.additionalProperties&&isObject(e.additionalProperties)?[`: ${l(e.additionalProperties)}`]:["…"]:[]).join(", ");const{dependencies:b,propertyNames:d,patternRequired:p}=e;if(b){Object.keys(b).forEach(e=>{const f=b[e];if(Array.isArray(f)){n.push(`should have ${f.length>1?"properties":"property"} ${f.map(e=>`'${e}'`).join(", ")} when property '${e}' is present`)}else{n.push(`should be valid according to the schema ${l(f)} when property '${e}' is present`)}})}if(d&&Object.keys(d).length>0){n.push(`each property name should match format ${JSON.stringify(e.propertyNames.format)}`)}if(p&&p.length>0){n.push(`should have property matching pattern ${p.map(e=>JSON.stringify(e))}`)}return`object {${g?` ${g} `:""}}${n.length>0?` (${n.join(", ")})`:""}`}if(likeNull(e)){return`${n?"":"non-"}null`}if(Array.isArray(e.type)){return`${e.type.join(" | ")}`}return JSON.stringify(e,null,2)}getSchemaPartText(e,n,f=false,s=true){if(!e){return""}if(Array.isArray(n)){for(let f=0;f ${e.description}`}return l}getSchemaPartDescription(e){if(!e){return""}while(e.$ref){e=this.getSchemaPart(e.$ref)}if(e.description){return`\n-> ${e.description}`}return""}formatValidationError(e){const{keyword:n,dataPath:f}=e;const s=`${this.baseDataPath}${f}`;switch(n){case"type":{const{parentSchema:n,params:f}=e;switch(f.type){case"number":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"integer":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"string":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"boolean":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"array":return`${s} should be an array:\n${this.getSchemaPartText(n)}`;case"object":return`${s} should be an object:\n${this.getSchemaPartText(n)}`;case"null":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;default:return`${s} should be:\n${this.getSchemaPartText(n)}`}}case"instanceof":{const{parentSchema:n}=e;return`${s} should be an instance of ${this.getSchemaPartText(n,false,true)}`}case"pattern":{const{params:n,parentSchema:f}=e;const{pattern:l}=n;return`${s} should match pattern ${JSON.stringify(l)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"format":{const{params:n,parentSchema:f}=e;const{format:l}=n;return`${s} should match format ${JSON.stringify(l)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"formatMinimum":case"formatMaximum":{const{params:n,parentSchema:f}=e;const{comparison:l,limit:v}=n;return`${s} should be ${l} ${JSON.stringify(v)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minimum":case"maximum":case"exclusiveMinimum":case"exclusiveMaximum":{const{parentSchema:n,params:f}=e;const{comparison:l,limit:v}=f;const[,...r]=getHints(n,true);if(r.length===0){r.push(`should be ${l} ${v}`)}return`${s} ${r.join(" ")}${getSchemaNonTypes(n)}.${this.getSchemaPartDescription(n)}`}case"multipleOf":{const{params:n,parentSchema:f}=e;const{multipleOf:l}=n;return`${s} should be multiple of ${l}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"patternRequired":{const{params:n,parentSchema:f}=e;const{missingPattern:l}=n;return`${s} should have property matching pattern ${JSON.stringify(l)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minLength":{const{params:n,parentSchema:f}=e;const{limit:l}=n;if(l===1){return`${s} should be an non-empty string${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}const v=l-1;return`${s} should be longer than ${v} character${v>1?"s":""}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minItems":{const{params:n,parentSchema:f}=e;const{limit:l}=n;if(l===1){return`${s} should be an non-empty array${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}return`${s} should not have fewer than ${l} items${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minProperties":{const{params:n,parentSchema:f}=e;const{limit:l}=n;if(l===1){return`${s} should be an non-empty object${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}return`${s} should not have fewer than ${l} properties${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"maxLength":{const{params:n,parentSchema:f}=e;const{limit:l}=n;const v=l+1;return`${s} should be shorter than ${v} character${v>1?"s":""}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"maxItems":{const{params:n,parentSchema:f}=e;const{limit:l}=n;return`${s} should not have more than ${l} items${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"maxProperties":{const{params:n,parentSchema:f}=e;const{limit:l}=n;return`${s} should not have more than ${l} properties${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"uniqueItems":{const{params:n,parentSchema:f}=e;const{i:l}=n;return`${s} should not contain the item '${e.data[l]}' twice${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"additionalItems":{const{params:n,parentSchema:f}=e;const{limit:l}=n;return`${s} should not have more than ${l} items${getSchemaNonTypes(f)}. These items are valid:\n${this.getSchemaPartText(f)}`}case"contains":{const{parentSchema:n}=e;return`${s} should contains at least one ${this.getSchemaPartText(n,["contains"])} item${getSchemaNonTypes(n)}.`}case"required":{const{parentSchema:n,params:f}=e;const l=f.missingProperty.replace(/^\./,"");const v=n&&Boolean(n.properties&&n.properties[l]);return`${s} misses the property '${l}'${getSchemaNonTypes(n)}.${v?` Should be:\n${this.getSchemaPartText(n,["properties",l])}`:this.getSchemaPartDescription(n)}`}case"additionalProperties":{const{params:n,parentSchema:f}=e;const{additionalProperty:l}=n;return`${s} has an unknown property '${l}'${getSchemaNonTypes(f)}. These properties are valid:\n${this.getSchemaPartText(f)}`}case"dependencies":{const{params:n,parentSchema:f}=e;const{property:l,deps:v}=n;const r=v.split(",").map(e=>`'${e.trim()}'`).join(", ");return`${s} should have properties ${r} when property '${l}' is present${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"propertyNames":{const{params:n,parentSchema:f,schema:l}=e;const{propertyName:v}=n;return`${s} property name '${v}' is invalid${getSchemaNonTypes(f)}. Property names should be match format ${JSON.stringify(l.format)}.${this.getSchemaPartDescription(f)}`}case"enum":{const{parentSchema:n}=e;if(n&&n.enum&&n.enum.length===1){return`${s} should be ${this.getSchemaPartText(n,false,true)}`}return`${s} should be one of these:\n${this.getSchemaPartText(n)}`}case"const":{const{parentSchema:n}=e;return`${s} should be equal to constant ${this.getSchemaPartText(n,false,true)}`}case"not":{const n=likeObject(e.parentSchema)?`\n${this.getSchemaPartText(e.parentSchema)}`:"";const f=this.getSchemaPartText(e.schema,false,false,false);if(canApplyNot(e.schema)){return`${s} should be any ${f}${n}.`}const{schema:l,parentSchema:v}=e;return`${s} should not be ${this.getSchemaPartText(l,false,true)}${v&&likeObject(v)?`\n${this.getSchemaPartText(v)}`:""}`}case"oneOf":case"anyOf":{const{parentSchema:n,children:f}=e;if(f&&f.length>0){if(e.schema.length===1){const e=f[f.length-1];const s=f.slice(0,f.length-1);return this.formatValidationError(Object.assign({},e,{children:s,parentSchema:Object.assign({},n,e.parentSchema)}))}let l=filterChildren(f);if(l.length===1){return this.formatValidationError(l[0])}l=groupChildrenByFirstChild(l);return`${s} should be one of these:\n${this.getSchemaPartText(n)}\nDetails:\n${l.map(e=>` * ${indent(this.formatValidationError(e)," ")}`).join("\n")}`}return`${s} should be one of these:\n${this.getSchemaPartText(n)}`}case"if":{const{params:n,parentSchema:f}=e;const{failingKeyword:l}=n;return`${s} should match "${l}" schema:\n${this.getSchemaPartText(f,[l])}`}case"absolutePath":{const{message:n,parentSchema:f}=e;return`${s}: ${n}${this.getSchemaPartDescription(f)}`}default:{const{message:n,parentSchema:f}=e;const l=JSON.stringify(e,null,2);return`${s} ${n} (${l}).\n${this.getSchemaPartText(f,false)}`}}}formatValidationErrors(e){return e.map(e=>{let n=this.formatValidationError(e);if(this.postFormatter){n=this.postFormatter(n,e)}return` - ${indent(n," ")}`}).join("\n")}}var r=ValidationError;n.default=r},3664:(e,n,f)=>{"use strict";const s=f(9240);e.exports=s.default},943:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=void 0;function errorMessage(e,n,f){return{dataPath:undefined,schemaPath:undefined,keyword:"absolutePath",params:{absolutePath:f},message:e,parentSchema:n}}function getErrorFor(e,n,f){const s=e?`The provided value ${JSON.stringify(f)} is not an absolute path!`:`A relative path is expected. However, the provided value ${JSON.stringify(f)} is an absolute path!`;return errorMessage(s,n,f)}function addAbsolutePathKeyword(e){e.addKeyword("absolutePath",{errors:true,type:"string",compile(e,n){const f=s=>{let l=true;const v=s.includes("!");if(v){f.errors=[errorMessage(`The provided value ${JSON.stringify(s)} contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.`,n,s)];l=false}const r=e===/^(?:[A-Za-z]:(\\|\/)|\\\\|\/)/.test(s);if(!r){f.errors=[getErrorFor(e,n,s)];l=false}return l};f.errors=[];return f}});return e}var f=addAbsolutePathKeyword;n.default=f},7941:e=>{"use strict";class Range{static getOperator(e,n){if(e==="left"){return n?">":">="}return n?"<":"<="}static formatRight(e,n,f){if(n===false){return Range.formatLeft(e,!n,!f)}return`should be ${Range.getOperator("right",f)} ${e}`}static formatLeft(e,n,f){if(n===false){return Range.formatRight(e,!n,!f)}return`should be ${Range.getOperator("left",f)} ${e}`}static formatRange(e,n,f,s,l){let v="should be";v+=` ${Range.getOperator(l?"left":"right",l?f:!f)} ${e} `;v+=l?"and":"or";v+=` ${Range.getOperator(l?"right":"left",l?s:!s)} ${n}`;return v}static getRangeValue(e,n){let f=n?Infinity:-Infinity;let s=-1;const l=n?([e])=>e<=f:([e])=>e>=f;for(let n=0;n-1){return e[s]}return[Infinity,true]}constructor(){this._left=[];this._right=[]}left(e,n=false){this._left.push([e,n])}right(e,n=false){this._right.push([e,n])}format(e=true){const[n,f]=Range.getRangeValue(this._left,e);const[s,l]=Range.getRangeValue(this._right,!e);if(!Number.isFinite(n)&&!Number.isFinite(s)){return""}const v=f?n+1:n;const r=l?s-1:s;if(v===r){return`should be ${e?"":"!"}= ${v}`}if(Number.isFinite(n)&&!Number.isFinite(s)){return Range.formatLeft(n,e,f)}if(!Number.isFinite(n)&&Number.isFinite(s)){return Range.formatRight(s,e,l)}return Range.formatRange(n,s,f,l,e)}}e.exports=Range},3638:(e,n,f)=>{"use strict";const s=f(7941);e.exports.stringHints=function stringHints(e,n){const f=[];let s="string";const l={...e};if(!n){const e=l.minLength;const n=l.formatMinimum;const f=l.formatExclusiveMaximum;l.minLength=l.maxLength;l.maxLength=e;l.formatMinimum=l.formatMaximum;l.formatMaximum=n;l.formatExclusiveMaximum=!l.formatExclusiveMinimum;l.formatExclusiveMinimum=!f}if(typeof l.minLength==="number"){if(l.minLength===1){s="non-empty string"}else{const e=Math.max(l.minLength-1,0);f.push(`should be longer than ${e} character${e>1?"s":""}`)}}if(typeof l.maxLength==="number"){if(l.maxLength===0){s="empty string"}else{const e=l.maxLength+1;f.push(`should be shorter than ${e} character${e>1?"s":""}`)}}if(l.pattern){f.push(`should${n?"":" not"} match pattern ${JSON.stringify(l.pattern)}`)}if(l.format){f.push(`should${n?"":" not"} match format ${JSON.stringify(l.format)}`)}if(l.formatMinimum){f.push(`should be ${l.formatExclusiveMinimum?">":">="} ${JSON.stringify(l.formatMinimum)}`)}if(l.formatMaximum){f.push(`should be ${l.formatExclusiveMaximum?"<":"<="} ${JSON.stringify(l.formatMaximum)}`)}return[s].concat(f)};e.exports.numberHints=function numberHints(e,n){const f=[e.type==="integer"?"integer":"number"];const l=new s;if(typeof e.minimum==="number"){l.left(e.minimum)}if(typeof e.exclusiveMinimum==="number"){l.left(e.exclusiveMinimum,true)}if(typeof e.maximum==="number"){l.right(e.maximum)}if(typeof e.exclusiveMaximum==="number"){l.right(e.exclusiveMaximum,true)}const v=l.format(n);if(v){f.push(v)}if(typeof e.multipleOf==="number"){f.push(`should${n?"":" not"} be multiple of ${e.multipleOf}`)}return f}},9240:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=void 0;var s=_interopRequireDefault(f(943));var l=_interopRequireDefault(f(321));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const v=f(1414);const r=f(2133);const g=new v({allErrors:true,verbose:true,$data:true});r(g,["instanceof","formatMinimum","formatMaximum","patternRequired"]);(0,s.default)(g);function validate(e,n,f){let s=[];if(Array.isArray(n)){s=Array.from(n,n=>validateObject(e,n));s.forEach((e,n)=>{const f=e=>{e.dataPath=`[${n}]${e.dataPath}`;if(e.children){e.children.forEach(f)}};e.forEach(f)});s=s.reduce((e,n)=>{e.push(...n);return e},[])}else{s=validateObject(e,n)}if(s.length>0){throw new l.default(s,e,f)}}function validateObject(e,n){const f=g.compile(e);const s=f(n);if(s)return[];return f.errors?filterErrors(f.errors):[]}function filterErrors(e){let n=[];for(const f of e){const{dataPath:e}=f;let s=[];n=n.filter(n=>{if(n.dataPath.includes(e)){if(n.children){s=s.concat(n.children.slice(0))}n.children=undefined;s.push(n);return false}return true});if(s.length){f.children=s}n.push(f)}return n}validate.ValidationError=l.default;validate.ValidateError=l.default;var b=validate;n.default=b},4007:function(e,n){(function(e,f){true?f(n):0})(this,function(e){"use strict";function merge(){for(var e=arguments.length,n=Array(e),f=0;f1){n[0]=n[0].slice(0,-1);var s=n.length-1;for(var l=1;l= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var a=r-g;var z=Math.floor;var x=String.fromCharCode;function error$1(e){throw new RangeError(N[e])}function map(e,n){var f=[];var s=e.length;while(s--){f[s]=n(e[s])}return f}function mapDomain(e,n){var f=e.split("@");var s="";if(f.length>1){s=f[0]+"@";e=f[1]}e=e.replace(A,".");var l=e.split(".");var v=map(l,n).join(".");return s+v}function ucs2decode(e){var n=[];var f=0;var s=e.length;while(f=55296&&l<=56319&&f>1;e+=z(e/n);for(;e>a*b>>1;s+=r){e=z(e/a)}return z(s+(a+1)*e/(e+d))};var I=function decode(e){var n=[];var f=e.length;var s=0;var l=j;var d=R;var p=e.lastIndexOf(w);if(p<0){p=0}for(var F=0;F=128){error$1("not-basic")}n.push(e.charCodeAt(F))}for(var E=p>0?p+1:0;E=f){error$1("invalid-input")}var x=O(e.charCodeAt(E++));if(x>=r||x>z((v-s)/N)){error$1("overflow")}s+=x*N;var q=a<=d?g:a>=d+b?b:a-d;if(xz(v/Q)){error$1("overflow")}N*=Q}var I=n.length+1;d=U(s-A,I,A==0);if(z(s/I)>v-l){error$1("overflow")}l+=z(s/I);s%=I;n.splice(s++,0,l)}return String.fromCodePoint.apply(String,n)};var T=function encode(e){var n=[];e=ucs2decode(e);var f=e.length;var s=j;var l=0;var d=R;var p=true;var F=false;var E=undefined;try{for(var A=e[Symbol.iterator](),N;!(p=(N=A.next()).done);p=true){var a=N.value;if(a<128){n.push(x(a))}}}catch(e){F=true;E=e}finally{try{if(!p&&A.return){A.return()}}finally{if(F){throw E}}}var q=n.length;var O=q;if(q){n.push(w)}while(O=s&&Hz((v-l)/G)){error$1("overflow")}l+=(I-s)*G;s=I;var Y=true;var W=false;var X=undefined;try{for(var c=e[Symbol.iterator](),B;!(Y=(B=c.next()).done);Y=true){var Z=B.value;if(Zv){error$1("overflow")}if(Z==s){var y=l;for(var D=r;;D+=r){var K=D<=d?g:D>=d+b?b:D-d;if(y>6|192).toString(16).toUpperCase()+"%"+(n&63|128).toString(16).toUpperCase();else f="%"+(n>>12|224).toString(16).toUpperCase()+"%"+(n>>6&63|128).toString(16).toUpperCase()+"%"+(n&63|128).toString(16).toUpperCase();return f}function pctDecChars(e){var n="";var f=0;var s=e.length;while(f=194&&l<224){if(s-f>=6){var v=parseInt(e.substr(f+4,2),16);n+=String.fromCharCode((l&31)<<6|v&63)}else{n+=e.substr(f,6)}f+=6}else if(l>=224){if(s-f>=9){var r=parseInt(e.substr(f+4,2),16);var g=parseInt(e.substr(f+7,2),16);n+=String.fromCharCode((l&15)<<12|(r&63)<<6|g&63)}else{n+=e.substr(f,9)}f+=9}else{n+=e.substr(f,3);f+=3}}return n}function _normalizeComponentEncoding(e,n){function decodeUnreserved(e){var f=pctDecChars(e);return!f.match(n.UNRESERVED)?e:f}if(e.scheme)e.scheme=String(e.scheme).replace(n.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(n.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_USERINFO,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(n.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(n.NOT_HOST,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(n.PCT_ENCODED,decodeUnreserved).replace(e.scheme?n.NOT_PATH:n.NOT_PATH_NOSCHEME,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_QUERY,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_FRAGMENT,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,n){var f=e.match(n.IPV4ADDRESS)||[];var l=s(f,2),v=l[1];if(v){return v.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,n){var f=e.match(n.IPV6ADDRESS)||[];var l=s(f,3),v=l[1],r=l[2];if(v){var g=v.toLowerCase().split("::").reverse(),b=s(g,2),d=b[0],p=b[1];var R=p?p.split(":").map(_stripLeadingZeros):[];var j=d.split(":").map(_stripLeadingZeros);var w=n.IPV4ADDRESS.test(j[j.length-1]);var F=w?7:8;var E=j.length-F;var A=Array(F);for(var N=0;N1){var q=A.slice(0,z.index);var O=A.slice(z.index+z.length);x=q.join(":")+"::"+O.join(":")}else{x=A.join(":")}if(r){x+="%"+r}return x}else{return e}}var H=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var G="".match(/(){0}/)[1]===undefined;function parse(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var l={};var v=s.iri!==false?f:n;if(s.reference==="suffix")e=(s.scheme?s.scheme+":":"")+"//"+e;var r=e.match(H);if(r){if(G){l.scheme=r[1];l.userinfo=r[3];l.host=r[4];l.port=parseInt(r[5],10);l.path=r[6]||"";l.query=r[7];l.fragment=r[8];if(isNaN(l.port)){l.port=r[5]}}else{l.scheme=r[1]||undefined;l.userinfo=e.indexOf("@")!==-1?r[3]:undefined;l.host=e.indexOf("//")!==-1?r[4]:undefined;l.port=parseInt(r[5],10);l.path=r[6]||"";l.query=e.indexOf("?")!==-1?r[7]:undefined;l.fragment=e.indexOf("#")!==-1?r[8]:undefined;if(isNaN(l.port)){l.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:undefined}}if(l.host){l.host=_normalizeIPv6(_normalizeIPv4(l.host,v),v)}if(l.scheme===undefined&&l.userinfo===undefined&&l.host===undefined&&l.port===undefined&&!l.path&&l.query===undefined){l.reference="same-document"}else if(l.scheme===undefined){l.reference="relative"}else if(l.fragment===undefined){l.reference="absolute"}else{l.reference="uri"}if(s.reference&&s.reference!=="suffix"&&s.reference!==l.reference){l.error=l.error||"URI is not a "+s.reference+" reference."}var g=C[(s.scheme||l.scheme||"").toLowerCase()];if(!s.unicodeSupport&&(!g||!g.unicodeSupport)){if(l.host&&(s.domainHost||g&&g.domainHost)){try{l.host=M.toASCII(l.host.replace(v.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){l.error=l.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(l,n)}else{_normalizeComponentEncoding(l,v)}if(g&&g.parse){g.parse(l,s)}}else{l.error=l.error||"URI can not be parsed."}return l}function _recomposeAuthority(e,s){var l=s.iri!==false?f:n;var v=[];if(e.userinfo!==undefined){v.push(e.userinfo);v.push("@")}if(e.host!==undefined){v.push(_normalizeIPv6(_normalizeIPv4(String(e.host),l),l).replace(l.IPV6ADDRESS,function(e,n,f){return"["+n+(f?"%25"+f:"")+"]"}))}if(typeof e.port==="number"){v.push(":");v.push(e.port.toString(10))}return v.length?v.join(""):undefined}var Y=/^\.\.?\//;var W=/^\/\.(\/|$)/;var X=/^\/\.\.(\/|$)/;var c=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var n=[];while(e.length){if(e.match(Y)){e=e.replace(Y,"")}else if(e.match(W)){e=e.replace(W,"/")}else if(e.match(X)){e=e.replace(X,"/");n.pop()}else if(e==="."||e===".."){e=""}else{var f=e.match(c);if(f){var s=f[0];e=e.slice(s.length);n.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return n.join("")}function serialize(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var l=s.iri?f:n;var v=[];var r=C[(s.scheme||e.scheme||"").toLowerCase()];if(r&&r.serialize)r.serialize(e,s);if(e.host){if(l.IPV6ADDRESS.test(e.host)){}else if(s.domainHost||r&&r.domainHost){try{e.host=!s.iri?M.toASCII(e.host.replace(l.PCT_ENCODED,pctDecChars).toLowerCase()):M.toUnicode(e.host)}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(!s.iri?"ASCII":"Unicode")+" via punycode: "+n}}}_normalizeComponentEncoding(e,l);if(s.reference!=="suffix"&&e.scheme){v.push(e.scheme);v.push(":")}var g=_recomposeAuthority(e,s);if(g!==undefined){if(s.reference!=="suffix"){v.push("//")}v.push(g);if(e.path&&e.path.charAt(0)!=="/"){v.push("/")}}if(e.path!==undefined){var b=e.path;if(!s.absolutePath&&(!r||!r.absolutePath)){b=removeDotSegments(b)}if(g===undefined){b=b.replace(/^\/\//,"/%2F")}v.push(b)}if(e.query!==undefined){v.push("?");v.push(e.query)}if(e.fragment!==undefined){v.push("#");v.push(e.fragment)}return v.join("")}function resolveComponents(e,n){var f=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var s=arguments[3];var l={};if(!s){e=parse(serialize(e,f),f);n=parse(serialize(n,f),f)}f=f||{};if(!f.tolerant&&n.scheme){l.scheme=n.scheme;l.userinfo=n.userinfo;l.host=n.host;l.port=n.port;l.path=removeDotSegments(n.path||"");l.query=n.query}else{if(n.userinfo!==undefined||n.host!==undefined||n.port!==undefined){l.userinfo=n.userinfo;l.host=n.host;l.port=n.port;l.path=removeDotSegments(n.path||"");l.query=n.query}else{if(!n.path){l.path=e.path;if(n.query!==undefined){l.query=n.query}else{l.query=e.query}}else{if(n.path.charAt(0)==="/"){l.path=removeDotSegments(n.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){l.path="/"+n.path}else if(!e.path){l.path=n.path}else{l.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+n.path}l.path=removeDotSegments(l.path)}l.query=n.query}l.userinfo=e.userinfo;l.host=e.host;l.port=e.port}l.scheme=e.scheme}l.fragment=n.fragment;return l}function resolve(e,n,f){var s=assign({scheme:"null"},f);return serialize(resolveComponents(parse(e,s),parse(n,s),s,true),s)}function normalize(e,n){if(typeof e==="string"){e=serialize(parse(e,n),n)}else if(typeOf(e)==="object"){e=parse(serialize(e,n),n)}return e}function equal(e,n,f){if(typeof e==="string"){e=serialize(parse(e,f),f)}else if(typeOf(e)==="object"){e=serialize(e,f)}if(typeof n==="string"){n=serialize(parse(n,f),f)}else if(typeOf(n)==="object"){n=serialize(n,f)}return e===n}function escapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?n.ESCAPE:f.ESCAPE,pctEncChar)}function unescapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?n.PCT_ENCODED:f.PCT_ENCODED,pctDecChars)}var B={scheme:"http",domainHost:true,parse:function parse(e,n){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,n){if(e.port===(String(e.scheme).toLowerCase()!=="https"?80:443)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var Z={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};var y={};var D=true;var K="[A-Za-z0-9\\-\\.\\_\\~"+(D?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var m="[0-9A-Fa-f]";var V=subexp(subexp("%[EFef]"+m+"%"+m+m+"%"+m+m)+"|"+subexp("%[89A-Fa-f]"+m+"%"+m+m)+"|"+subexp("%"+m+m));var k="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var h="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var S=merge(h,'[\\"\\\\]');var P="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var i=new RegExp(K,"g");var _=new RegExp(V,"g");var u=new RegExp(merge("[^]",k,"[\\.]",'[\\"]',S),"g");var o=new RegExp(merge("[^]",K,P),"g");var $=o;function decodeUnreserved(e){var n=pctDecChars(e);return!n.match(i)?e:n}var t={scheme:"mailto",parse:function parse$$1(e,n){var f=e;var s=f.to=f.path?f.path.split(","):[];f.path=undefined;if(f.query){var l=false;var v={};var r=f.query.split("&");for(var g=0,b=r.length;g{var e={601:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},8938:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},2133:(e,n,f)=>{"use strict";var s=f(2670);e.exports=defineKeywords;function defineKeywords(e,n){if(Array.isArray(n)){for(var f=0;f{"use strict";var s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;var l=/t|\s/i;var v={date:compareDate,time:compareTime,"date-time":compareDateTime};var r={type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:false};e.exports=function(e){var n="format"+e;return function defFunc(s){defFunc.definition={type:"string",inline:f(7194),statements:true,errors:"full",dependencies:["format"],metaSchema:{anyOf:[{type:"string"},r]}};s.addKeyword(n,defFunc.definition);s.addKeyword("formatExclusive"+e,{dependencies:["format"+e],metaSchema:{anyOf:[{type:"boolean"},r]}});extendFormats(s);return s}};function extendFormats(e){var n=e._formats;for(var f in v){var s=n[f];if(typeof s!="object"||s instanceof RegExp||!s.validate)s=n[f]={validate:s};if(!s.compare)s.compare=v[f]}}function compareDate(e,n){if(!(e&&n))return;if(e>n)return 1;if(en)return 1;if(e{"use strict";e.exports={metaSchemaRef:metaSchemaRef};var n="http://json-schema.org/draft-07/schema";function metaSchemaRef(e){var f=e._opts.defaultMeta;if(typeof f=="string")return{$ref:f};if(e.getSchema(n))return{$ref:n};console.warn("meta schema not defined");return{}}},5541:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e,n){if(!e)return true;var f=Object.keys(n.properties);if(f.length==0)return true;return{required:f}},metaSchema:{type:"boolean"},dependencies:["properties"]};e.addKeyword("allRequired",defFunc.definition);return e}},7039:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){if(e.length==0)return true;if(e.length==1)return{required:e};var n=e.map(function(e){return{required:[e]}});return{anyOf:n}},metaSchema:{type:"array",items:{type:"string"}}};e.addKeyword("anyRequired",defFunc.definition);return e}},1673:(e,n,f)=>{"use strict";var s=f(3733);e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){var n=[];for(var f in e)n.push(getSchema(f,e[f]));return{allOf:n}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:s.metaSchemaRef(e)}};e.addKeyword("deepProperties",defFunc.definition);return e};function getSchema(e,n){var f=e.split("/");var s={};var l=s;for(var v=1;v{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",inline:function(e,n,f){var s="";for(var l=0;l{"use strict";e.exports=function generate__formatLimit(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j="valid"+l;s+="var "+j+" = undefined;";if(e.opts.format===false){s+=" "+j+" = true; ";return s}var w=e.schema.format,F=e.opts.$data&&w.$data,E="";if(F){var A=e.util.getData(w.$data,v,e.dataPathArr),N="format"+l,a="compare"+l;s+=" var "+N+" = formats["+A+"] , "+a+" = "+N+" && "+N+".compare;"}else{var N=e.formats[w];if(!(N&&N.compare)){s+=" "+j+" = true; ";return s}var a="formats"+e.util.getProperty(w)+".compare"}var z=n=="formatMaximum",x="formatExclusive"+(z?"Maximum":"Minimum"),q=e.schema[x],O=e.opts.$data&&q&&q.$data,Q=z?"<":">",U="result"+l;var I=e.opts.$data&&r&&r.$data,T;if(I){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";T="schema"+l}else{T=r}if(O){var J=e.util.getData(q.$data,v,e.dataPathArr),L="exclusive"+l,M="op"+l,C="' + "+M+" + '";s+=" var schemaExcl"+l+" = "+J+"; ";J="schemaExcl"+l;s+=" if (typeof "+J+" != 'boolean' && "+J+" !== undefined) { "+j+" = false; ";var p=x;var H=H||[];H.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: '"+x+" should be boolean' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var G=s;s=H.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+G+"]); "}else{s+=" validate.errors = ["+G+"]; return false; "}}else{s+=" var err = "+G+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){E+="}";s+=" else { "}if(I){s+=" if ("+T+" === undefined) "+j+" = true; else if (typeof "+T+" != 'string') "+j+" = false; else { ";E+="}"}if(F){s+=" if (!"+a+") "+j+" = true; else { ";E+="}"}s+=" var "+U+" = "+a+"("+R+", ";if(I){s+=""+T}else{s+=""+e.util.toQuotedString(r)}s+=" ); if ("+U+" === undefined) "+j+" = false; var "+L+" = "+J+" === true; if ("+j+" === undefined) { "+j+" = "+L+" ? "+U+" "+Q+" 0 : "+U+" "+Q+"= 0; } if (!"+j+") var op"+l+" = "+L+" ? '"+Q+"' : '"+Q+"=';"}else{var L=q===true,C=Q;if(!L)C+="=";var M="'"+C+"'";if(I){s+=" if ("+T+" === undefined) "+j+" = true; else if (typeof "+T+" != 'string') "+j+" = false; else { ";E+="}"}if(F){s+=" if (!"+a+") "+j+" = true; else { ";E+="}"}s+=" var "+U+" = "+a+"("+R+", ";if(I){s+=""+T}else{s+=""+e.util.toQuotedString(r)}s+=" ); if ("+U+" === undefined) "+j+" = false; if ("+j+" === undefined) "+j+" = "+U+" "+Q;if(!L){s+="="}s+=" 0;"}s+=""+E+"if (!"+j+") { ";var p=n;var H=H||[];H.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { comparison: "+M+", limit: ";if(I){s+=""+T}else{s+=""+e.util.toQuotedString(r)}s+=" , exclusive: "+L+" } ";if(e.opts.messages!==false){s+=" , message: 'should be "+C+' "';if(I){s+="' + "+T+" + '"}else{s+=""+e.util.escapeQuotes(r)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(I){s+="validate.schema"+g}else{s+=""+e.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var G=s;s=H.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+G+"]); "}else{s+=" validate.errors = ["+G+"]; return false; "}}else{s+=" var err = "+G+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="}";return s}},3724:e=>{"use strict";e.exports=function generate_patternRequired(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="key"+l,w="idx"+l,F="patternMatched"+l,E="dataProperties"+l,A="",N=e.opts.ownProperties;s+="var "+R+" = true;";if(N){s+=" var "+E+" = undefined;"}var a=r;if(a){var z,x=-1,q=a.length-1;while(x{"use strict";e.exports=function generate_switch(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A="ifPassed"+e.level,N=w.baseId,a;s+="var "+A+";";var z=r;if(z){var x,q=-1,O=z.length-1;while(q0:e.util.schemaHasRules(x.if,e.RULES.all))){s+=" var "+j+" = errors; ";var Q=e.compositeRule;e.compositeRule=w.compositeRule=true;w.createErrors=false;w.schema=x.if;w.schemaPath=g+"["+q+"].if";w.errSchemaPath=b+"/"+q+"/if";s+=" "+e.validate(w)+" ";w.baseId=N;w.createErrors=true;e.compositeRule=w.compositeRule=Q;s+=" "+A+" = "+E+"; if ("+A+") { ";if(typeof x.then=="boolean"){if(x.then===false){var U=U||[];U.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"switch"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { caseIndex: "+q+" } ";if(e.opts.messages!==false){s+=" , message: 'should pass \"switch\" keyword validation' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var I=s;s=U.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}s+=" var "+E+" = "+x.then+"; "}else{w.schema=x.then;w.schemaPath=g+"["+q+"].then";w.errSchemaPath=b+"/"+q+"/then";s+=" "+e.validate(w)+" ";w.baseId=N}s+=" } else { errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; } } "}else{s+=" "+A+" = true; ";if(typeof x.then=="boolean"){if(x.then===false){var U=U||[];U.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"switch"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { caseIndex: "+q+" } ";if(e.opts.messages!==false){s+=" , message: 'should pass \"switch\" keyword validation' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var I=s;s=U.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}s+=" var "+E+" = "+x.then+"; "}else{w.schema=x.then;w.schemaPath=g+"["+q+"].then";w.errSchemaPath=b+"/"+q+"/then";s+=" "+e.validate(w)+" ";w.baseId=N}}a=x.continue}}s+=""+F+"var "+R+" = "+E+";";return s}},2107:e=>{"use strict";var n={};var f={timestamp:function(){return Date.now()},datetime:function(){return(new Date).toISOString()},date:function(){return(new Date).toISOString().slice(0,10)},time:function(){return(new Date).toISOString().slice(11)},random:function(){return Math.random()},randomint:function(e){var n=e&&e.max||2;return function(){return Math.floor(Math.random()*n)}},seq:function(e){var f=e&&e.name||"";n[f]=n[f]||0;return function(){return n[f]++}}};e.exports=function defFunc(e){defFunc.definition={compile:function(e,n,f){var s={};for(var l in e){var v=e[l];var r=getDefault(typeof v=="string"?v:v.func);s[l]=r.length?r(v.args):r}return f.opts.useDefaults&&!f.compositeRule?assignDefaults:noop;function assignDefaults(n){for(var l in e){if(n[l]===undefined||f.opts.useDefaults=="empty"&&(n[l]===null||n[l]===""))n[l]=s[l]()}return true}function noop(){return true}},DEFAULTS:f,metaSchema:{type:"object",additionalProperties:{type:["string","object"],additionalProperties:false,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}}};e.addKeyword("dynamicDefaults",defFunc.definition);return e;function getDefault(e){var n=f[e];if(n)return n;throw new Error('invalid "dynamicDefaults" keyword property value: '+e)}}},6153:(e,n,f)=>{"use strict";e.exports=f(2784)("Maximum")},4409:(e,n,f)=>{"use strict";e.exports=f(2784)("Minimum")},2670:(e,n,f)=>{"use strict";e.exports={instanceof:f(2479),range:f(9159),regexp:f(3284),typeof:f(2608),dynamicDefaults:f(2107),allRequired:f(5541),anyRequired:f(7039),oneRequired:f(2135),prohibited:f(3115),uniqueItemProperties:f(3786),deepProperties:f(1673),deepRequired:f(2541),formatMinimum:f(4409),formatMaximum:f(6153),patternRequired:f(5844),switch:f(682),select:f(2308),transform:f(159)}},2479:e=>{"use strict";var n={Object:Object,Array:Array,Function:Function,Number:Number,String:String,Date:Date,RegExp:RegExp};e.exports=function defFunc(e){if(typeof Buffer!="undefined")n.Buffer=Buffer;if(typeof Promise!="undefined")n.Promise=Promise;defFunc.definition={compile:function(e){if(typeof e=="string"){var n=getConstructor(e);return function(e){return e instanceof n}}var f=e.map(getConstructor);return function(e){for(var n=0;n{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){if(e.length==0)return true;if(e.length==1)return{required:e};var n=e.map(function(e){return{required:[e]}});return{oneOf:n}},metaSchema:{type:"array",items:{type:"string"}}};e.addKeyword("oneRequired",defFunc.definition);return e}},5844:(e,n,f)=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",inline:f(3724),statements:true,errors:"full",metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:true}};e.addKeyword("patternRequired",defFunc.definition);return e}},3115:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){if(e.length==0)return true;if(e.length==1)return{not:{required:e}};var n=e.map(function(e){return{required:[e]}});return{not:{anyOf:n}}},metaSchema:{type:"array",items:{type:"string"}}};e.addKeyword("prohibited",defFunc.definition);return e}},9159:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"number",macro:function(e,n){var f=e[0],s=e[1],l=n.exclusiveRange;validateRangeSchema(f,s,l);return l===true?{exclusiveMinimum:f,exclusiveMaximum:s}:{minimum:f,maximum:s}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}};e.addKeyword("range",defFunc.definition);e.addKeyword("exclusiveRange");return e;function validateRangeSchema(e,n,f){if(f!==undefined&&typeof f!="boolean")throw new Error("Invalid schema for exclusiveRange keyword, should be boolean");if(e>n||f&&e==n)throw new Error("There are no numbers in range")}}},3284:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"string",inline:function(e,n,f){return getRegExp()+".test(data"+(e.dataLevel||"")+")";function getRegExp(){try{if(typeof f=="object")return new RegExp(f.pattern,f.flags);var e=f.match(/^\/(.*)\/([gimuy]*)$/);if(e)return new RegExp(e[1],e[2]);throw new Error("cannot parse string into RegExp")}catch(e){console.error("regular expression",f,"is invalid");throw e}}},metaSchema:{type:["string","object"],properties:{pattern:{type:"string"},flags:{type:"string"}},required:["pattern"],additionalProperties:false}};e.addKeyword("regexp",defFunc.definition);return e}},2308:(e,n,f)=>{"use strict";var s=f(3733);e.exports=function defFunc(e){if(!e._opts.$data){console.warn("keyword select requires $data option");return e}var n=s.metaSchemaRef(e);var f=[];defFunc.definition={validate:function v(e,n,f){if(f.selectCases===undefined)throw new Error('keyword "selectCases" is absent');var s=getCompiledSchemas(f,false);var l=s.cases[e];if(l===undefined)l=s.default;if(typeof l=="boolean")return l;var r=l(n);if(!r)v.errors=l.errors;return r},$data:true,metaSchema:{type:["string","number","boolean","null"]}};e.addKeyword("select",defFunc.definition);e.addKeyword("selectCases",{compile:function(e,n){var f=getCompiledSchemas(n);for(var s in e)f.cases[s]=compileOrBoolean(e[s]);return function(){return true}},valid:true,metaSchema:{type:"object",additionalProperties:n}});e.addKeyword("selectDefault",{compile:function(e,n){var f=getCompiledSchemas(n);f.default=compileOrBoolean(e);return function(){return true}},valid:true,metaSchema:n});return e;function getCompiledSchemas(e,n){var s;f.some(function(n){if(n.parentSchema===e){s=n;return true}});if(!s&&n!==false){s={parentSchema:e,cases:{},default:true};f.push(s)}return s}function compileOrBoolean(n){return typeof n=="boolean"?n:e.compile(n)}}},682:(e,n,f)=>{"use strict";var s=f(3733);e.exports=function defFunc(e){if(e.RULES.keywords.switch&&e.RULES.keywords.if)return;var n=s.metaSchemaRef(e);defFunc.definition={inline:f(608),statements:true,errors:"full",metaSchema:{type:"array",items:{required:["then"],properties:{if:n,then:{anyOf:[{type:"boolean"},n]},continue:{type:"boolean"}},additionalProperties:false,dependencies:{continue:["if"]}}}};e.addKeyword("switch",defFunc.definition);return e}},159:e=>{"use strict";e.exports=function defFunc(e){var n={trimLeft:function(e){return e.replace(/^[\s]+/,"")},trimRight:function(e){return e.replace(/[\s]+$/,"")},trim:function(e){return e.trim()},toLowerCase:function(e){return e.toLowerCase()},toUpperCase:function(e){return e.toUpperCase()},toEnumCase:function(e,n){return n.hash[makeHashTableKey(e)]||e}};defFunc.definition={type:"string",errors:false,modifying:true,valid:true,compile:function(e,f){var s;if(e.indexOf("toEnumCase")!==-1){s={hash:{}};if(!f.enum)throw new Error('Missing enum. To use `transform:["toEnumCase"]`, `enum:[...]` is required.');for(var l=f.enum.length;l--;l){var v=f.enum[l];if(typeof v!=="string")continue;var r=makeHashTableKey(v);if(s.hash[r])throw new Error('Invalid enum uniqueness. To use `transform:["toEnumCase"]`, all values must be unique when case insensitive.');s.hash[r]=v}}return function(f,l,v,r){if(!v)return;for(var g=0,b=e.length;g{"use strict";var n=["undefined","string","number","object","function","boolean","symbol"];e.exports=function defFunc(e){defFunc.definition={inline:function(e,n,f){var s="data"+(e.dataLevel||"");if(typeof f=="string")return"typeof "+s+' == "'+f+'"';f="validate.schema"+e.schemaPath+"."+n;return f+".indexOf(typeof "+s+") >= 0"},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}};e.addKeyword("typeof",defFunc.definition);return e}},3786:e=>{"use strict";var n=["number","integer","string","boolean","null"];e.exports=function defFunc(e){defFunc.definition={type:"array",compile:function(e,n,f){var s=f.util.equal;var l=getScalarKeys(e,n);return function(n){if(n.length>1){for(var f=0;f=0})}},1414:(e,n,f)=>{"use strict";var s=f(1645),l=f(2630),v=f(7246),r=f(7837),g=f(3600),b=f(9290),d=f(1665),p=f(6989),R=f(6057);e.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=f(75);var j=f(8093);Ajv.prototype.addKeyword=j.add;Ajv.prototype.getKeyword=j.get;Ajv.prototype.removeKeyword=j.remove;Ajv.prototype.validateKeyword=j.validate;var w=f(2718);Ajv.ValidationError=w.Validation;Ajv.MissingRefError=w.MissingRef;Ajv.$dataMetaSchema=p;var F="http://json-schema.org/draft-07/schema";var E=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var A=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=R.copy(e)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=b(e.format);this._cache=e.cache||new v;this._loadingSchemas={};this._compilations=[];this.RULES=d();this._getId=chooseGetId(e);e.loopRequired=e.loopRequired||Infinity;if(e.errorDataPath=="property")e._errorDataPathProperty=true;if(e.serialize===undefined)e.serialize=g;this._metaOpts=getMetaSchemaOptions(this);if(e.formats)addInitialFormats(this);if(e.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof e.meta=="object")this.addMetaSchema(e.meta);if(e.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(e,n){var f;if(typeof e=="string"){f=this.getSchema(e);if(!f)throw new Error('no schema with key or ref "'+e+'"')}else{var s=this._addSchema(e);f=s.validate||this._compile(s)}var l=f(n);if(f.$async!==true)this.errors=f.errors;return l}function compile(e,n){var f=this._addSchema(e,undefined,n);return f.validate||this._compile(f)}function addSchema(e,n,f,s){if(Array.isArray(e)){for(var v=0;v{"use strict";var n=e.exports=function Cache(){this._cache={}};n.prototype.put=function Cache_put(e,n){this._cache[e]=n};n.prototype.get=function Cache_get(e){return this._cache[e]};n.prototype.del=function Cache_del(e){delete this._cache[e]};n.prototype.clear=function Cache_clear(){this._cache={}}},75:(e,n,f)=>{"use strict";var s=f(2718).MissingRef;e.exports=compileAsync;function compileAsync(e,n,f){var l=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof n=="function"){f=n;n=undefined}var v=loadMetaSchemaOf(e).then(function(){var f=l._addSchema(e,undefined,n);return f.validate||_compileAsync(f)});if(f){v.then(function(e){f(null,e)},f)}return v;function loadMetaSchemaOf(e){var n=e.$schema;return n&&!l.getSchema(n)?compileAsync.call(l,{$ref:n},true):Promise.resolve()}function _compileAsync(e){try{return l._compile(e)}catch(e){if(e instanceof s)return loadMissingSchema(e);throw e}function loadMissingSchema(f){var s=f.missingSchema;if(added(s))throw new Error("Schema "+s+" is loaded but "+f.missingRef+" cannot be resolved");var v=l._loadingSchemas[s];if(!v){v=l._loadingSchemas[s]=l._opts.loadSchema(s);v.then(removePromise,removePromise)}return v.then(function(e){if(!added(s)){return loadMetaSchemaOf(e).then(function(){if(!added(s))l.addSchema(e,s,undefined,n)})}}).then(function(){return _compileAsync(e)});function removePromise(){delete l._loadingSchemas[s]}function added(e){return l._refs[e]||l._schemas[e]}}}}},2718:(e,n,f)=>{"use strict";var s=f(2630);e.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(e){this.message="validation failed";this.errors=e;this.ajv=this.validation=true}MissingRefError.message=function(e,n){return"can't resolve reference "+n+" from id "+e};function MissingRefError(e,n,f){this.message=f||MissingRefError.message(e,n);this.missingRef=s.url(e,n);this.missingSchema=s.normalizeId(s.fullPath(this.missingRef))}function errorSubclass(e){e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;return e}},9290:(e,n,f)=>{"use strict";var s=f(6057);var l=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var v=[0,31,28,31,30,31,30,31,31,30,31,30,31];var r=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var g=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var d=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var p=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var R=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var j=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var w=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var F=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var E=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;e.exports=formats;function formats(e){e=e=="full"?"full":"fast";return s.copy(formats[e])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":p,url:R,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:g,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:j,"json-pointer":w,"json-pointer-uri-fragment":F,"relative-json-pointer":E};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":d,"uri-template":p,url:R,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:g,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:j,"json-pointer":w,"json-pointer-uri-fragment":F,"relative-json-pointer":E};function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function date(e){var n=e.match(l);if(!n)return false;var f=+n[1];var s=+n[2];var r=+n[3];return s>=1&&s<=12&&r>=1&&r<=(s==2&&isLeapYear(f)?29:v[s])}function time(e,n){var f=e.match(r);if(!f)return false;var s=f[1];var l=f[2];var v=f[3];var g=f[5];return(s<=23&&l<=59&&v<=59||s==23&&l==59&&v==60)&&(!n||g)}var A=/t|\s/i;function date_time(e){var n=e.split(A);return n.length==2&&date(n[0])&&time(n[1],true)}var N=/\/|:/;function uri(e){return N.test(e)&&b.test(e)}var a=/[^\\]\\Z/;function regex(e){if(a.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},1645:(e,n,f)=>{"use strict";var s=f(2630),l=f(6057),v=f(2718),r=f(3600);var g=f(6131);var b=l.ucs2length;var d=f(3933);var p=v.Validation;e.exports=compile;function compile(e,n,f,R){var j=this,w=this._opts,F=[undefined],E={},A=[],N={},a=[],z={},x=[];n=n||{schema:e,refVal:F,refs:E};var q=checkCompiling.call(this,e,n,R);var O=this._compilations[q.index];if(q.compiling)return O.callValidate=callValidate;var Q=this._formats;var U=this.RULES;try{var I=localCompile(e,n,f,R);O.validate=I;var T=O.callValidate;if(T){T.schema=I.schema;T.errors=null;T.refs=I.refs;T.refVal=I.refVal;T.root=I.root;T.$async=I.$async;if(w.sourceCode)T.source=I.source}return I}finally{endCompiling.call(this,e,n,R)}function callValidate(){var e=O.validate;var n=e.apply(this,arguments);callValidate.errors=e.errors;return n}function localCompile(e,f,r,R){var N=!f||f&&f.schema==e;if(f.schema!=n.schema)return compile.call(j,e,f,r,R);var z=e.$async===true;var q=g({isTop:true,schema:e,isRoot:N,baseId:R,root:f,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:v.MissingRef,RULES:U,validate:g,util:l,resolve:s,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:w,formats:Q,logger:j.logger,self:j});q=vars(F,refValCode)+vars(A,patternCode)+vars(a,defaultCode)+vars(x,customRuleCode)+q;if(w.processCode)q=w.processCode(q,e);var O;try{var I=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",q);O=I(j,U,Q,n,F,a,x,d,b,p);F[0]=O}catch(e){j.logger.error("Error compiling schema, function code:",q);throw e}O.schema=e;O.errors=null;O.refs=E;O.refVal=F;O.root=N?O:f;if(z)O.$async=true;if(w.sourceCode===true){O.source={code:q,patterns:A,defaults:a}}return O}function resolveRef(e,l,v){l=s.url(e,l);var r=E[l];var g,b;if(r!==undefined){g=F[r];b="refVal["+r+"]";return resolvedRef(g,b)}if(!v&&n.refs){var d=n.refs[l];if(d!==undefined){g=n.refVal[d];b=addLocalRef(l,g);return resolvedRef(g,b)}}b=addLocalRef(l);var p=s.call(j,localCompile,n,l);if(p===undefined){var R=f&&f[l];if(R){p=s.inlineRef(R,w.inlineRefs)?R:compile.call(j,R,n,f,e)}}if(p===undefined){removeLocalRef(l)}else{replaceLocalRef(l,p);return resolvedRef(p,b)}}function addLocalRef(e,n){var f=F.length;F[f]=n;E[e]=f;return"refVal"+f}function removeLocalRef(e){delete E[e]}function replaceLocalRef(e,n){var f=E[e];F[f]=n}function resolvedRef(e,n){return typeof e=="object"||typeof e=="boolean"?{code:n,schema:e,inline:true}:{code:n,$async:e&&!!e.$async}}function usePattern(e){var n=N[e];if(n===undefined){n=N[e]=A.length;A[n]=e}return"pattern"+n}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return l.toQuotedString(e);case"object":if(e===null)return"null";var n=r(e);var f=z[n];if(f===undefined){f=z[n]=a.length;a[f]=e}return"default"+f}}function useCustomRule(e,n,f,s){if(j._opts.validateSchema!==false){var l=e.definition.dependencies;if(l&&!l.every(function(e){return Object.prototype.hasOwnProperty.call(f,e)}))throw new Error("parent schema must have all required keywords: "+l.join(","));var v=e.definition.validateSchema;if(v){var r=v(n);if(!r){var g="keyword schema is invalid: "+j.errorsText(v.errors);if(j._opts.validateSchema=="log")j.logger.error(g);else throw new Error(g)}}}var b=e.definition.compile,d=e.definition.inline,p=e.definition.macro;var R;if(b){R=b.call(j,n,f,s)}else if(p){R=p.call(j,n,f,s);if(w.validateSchema!==false)j.validateSchema(R,true)}else if(d){R=d.call(j,s,e.keyword,n,f)}else{R=e.definition.validate;if(!R)return}if(R===undefined)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var F=x.length;x[F]=R;return{code:"customRule"+F,validate:R}}}function checkCompiling(e,n,f){var s=compIndex.call(this,e,n,f);if(s>=0)return{index:s,compiling:true};s=this._compilations.length;this._compilations[s]={schema:e,root:n,baseId:f};return{index:s,compiling:false}}function endCompiling(e,n,f){var s=compIndex.call(this,e,n,f);if(s>=0)this._compilations.splice(s,1)}function compIndex(e,n,f){for(var s=0;s{"use strict";var s=f(4007),l=f(3933),v=f(6057),r=f(7837),g=f(2437);e.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(e,n,f){var s=this._refs[f];if(typeof s=="string"){if(this._refs[s])s=this._refs[s];else return resolve.call(this,e,n,s)}s=s||this._schemas[f];if(s instanceof r){return inlineRef(s.schema,this._opts.inlineRefs)?s.schema:s.validate||this._compile(s)}var l=resolveSchema.call(this,n,f);var v,g,b;if(l){v=l.schema;n=l.root;b=l.baseId}if(v instanceof r){g=v.validate||e.call(this,v.schema,n,undefined,b)}else if(v!==undefined){g=inlineRef(v,this._opts.inlineRefs)?v:e.call(this,v,n,undefined,b)}return g}function resolveSchema(e,n){var f=s.parse(n),l=_getFullPath(f),v=getFullPath(this._getId(e.schema));if(Object.keys(e.schema).length===0||l!==v){var g=normalizeId(l);var b=this._refs[g];if(typeof b=="string"){return resolveRecursive.call(this,e,b,f)}else if(b instanceof r){if(!b.validate)this._compile(b);e=b}else{b=this._schemas[g];if(b instanceof r){if(!b.validate)this._compile(b);if(g==normalizeId(n))return{schema:b,root:e,baseId:v};e=b}else{return}}if(!e.schema)return;v=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,f,v,e.schema,e)}function resolveRecursive(e,n,f){var s=resolveSchema.call(this,e,n);if(s){var l=s.schema;var v=s.baseId;e=s.root;var r=this._getId(l);if(r)v=resolveUrl(v,r);return getJsonPointer.call(this,f,v,l,e)}}var b=v.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,n,f,s){e.fragment=e.fragment||"";if(e.fragment.slice(0,1)!="/")return;var l=e.fragment.split("/");for(var r=1;r{"use strict";var s=f(4124),l=f(6057).toHash;e.exports=function rules(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var n=["type","$comment"];var f=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var v=["number","integer","string","array","object","boolean","null"];e.all=l(n);e.types=l(v);e.forEach(function(f){f.rules=f.rules.map(function(f){var l;if(typeof f=="object"){var v=Object.keys(f)[0];l=f[v];f=v;l.forEach(function(f){n.push(f);e.all[f]=true})}n.push(f);var r=e.all[f]={keyword:f,code:s[f],implements:l};return r});e.all.$comment={keyword:"$comment",code:s.$comment};if(f.type)e.types[f.type]=f});e.keywords=l(n.concat(f));e.custom={};return e}},7837:(e,n,f)=>{"use strict";var s=f(6057);e.exports=SchemaObject;function SchemaObject(e){s.copy(e,this)}},9652:e=>{"use strict";e.exports=function ucs2length(e){var n=0,f=e.length,s=0,l;while(s=55296&&l<=56319&&s{"use strict";e.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:f(3933),ucs2length:f(9652),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(e,n){n=n||{};for(var f in e)n[f]=e[f];return n}function checkDataType(e,n,f,s){var l=s?" !== ":" === ",v=s?" || ":" && ",r=s?"!":"",g=s?"":"!";switch(e){case"null":return n+l+"null";case"array":return r+"Array.isArray("+n+")";case"object":return"("+r+n+v+"typeof "+n+l+'"object"'+v+g+"Array.isArray("+n+"))";case"integer":return"(typeof "+n+l+'"number"'+v+g+"("+n+" % 1)"+v+n+l+n+(f?v+r+"isFinite("+n+")":"")+")";case"number":return"(typeof "+n+l+'"'+e+'"'+(f?v+r+"isFinite("+n+")":"")+")";default:return"typeof "+n+l+'"'+e+'"'}}function checkDataTypes(e,n,f){switch(e.length){case 1:return checkDataType(e[0],n,f,true);default:var s="";var l=toHash(e);if(l.array&&l.object){s=l.null?"(":"(!"+n+" || ";s+="typeof "+n+' !== "object")';delete l.null;delete l.array;delete l.object}if(l.number)delete l.integer;for(var v in l)s+=(s?" && ":"")+checkDataType(v,n,f,true);return s}}var s=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(e,n){if(Array.isArray(n)){var f=[];for(var l=0;l=n)throw new Error("Cannot access property/index "+s+" levels up, current level is "+n);return f[n-s]}if(s>n)throw new Error("Cannot access data "+s+" levels up, current level is "+n);v="data"+(n-s||"");if(!l)return v}var d=v;var p=l.split("/");for(var R=0;R{"use strict";var n=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,f){for(var s=0;s{"use strict";var s=f(8938);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:s.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:s.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},3711:e=>{"use strict";e.exports=function generate__limit(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}var F=n=="maximum",E=F?"exclusiveMaximum":"exclusiveMinimum",A=e.schema[E],N=e.opts.$data&&A&&A.$data,a=F?"<":">",z=F?">":"<",p=undefined;if(!(j||typeof r=="number"||r===undefined)){throw new Error(n+" must be number")}if(!(N||A===undefined||typeof A=="number"||typeof A=="boolean")){throw new Error(E+" must be number or boolean")}if(N){var x=e.util.getData(A.$data,v,e.dataPathArr),q="exclusive"+l,O="exclType"+l,Q="exclIsNumber"+l,U="op"+l,I="' + "+U+" + '";s+=" var schemaExcl"+l+" = "+x+"; ";x="schemaExcl"+l;s+=" var "+q+"; var "+O+" = typeof "+x+"; if ("+O+" != 'boolean' && "+O+" != 'undefined' && "+O+" != 'number') { ";var p=E;var T=T||[];T.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: '"+E+" should be boolean' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var J=s;s=T.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+J+"]); "}else{s+=" validate.errors = ["+J+"]; return false; "}}else{s+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" "+O+" == 'number' ? ( ("+q+" = "+w+" === undefined || "+x+" "+a+"= "+w+") ? "+R+" "+z+"= "+x+" : "+R+" "+z+" "+w+" ) : ( ("+q+" = "+x+" === true) ? "+R+" "+z+"= "+w+" : "+R+" "+z+" "+w+" ) || "+R+" !== "+R+") { var op"+l+" = "+q+" ? '"+a+"' : '"+a+"='; ";if(r===undefined){p=E;b=e.errSchemaPath+"/"+E;w=x;j=N}}else{var Q=typeof A=="number",I=a;if(Q&&j){var U="'"+I+"'";s+=" if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" ( "+w+" === undefined || "+A+" "+a+"= "+w+" ? "+R+" "+z+"= "+A+" : "+R+" "+z+" "+w+" ) || "+R+" !== "+R+") { "}else{if(Q&&r===undefined){q=true;p=E;b=e.errSchemaPath+"/"+E;w=A;z+="="}else{if(Q)w=Math[F?"min":"max"](A,r);if(A===(Q?w:true)){q=true;p=E;b=e.errSchemaPath+"/"+E;z+="="}else{q=false;I+="="}}var U="'"+I+"'";s+=" if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" "+R+" "+z+" "+w+" || "+R+" !== "+R+") { "}}p=p||n;var T=T||[];T.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { comparison: "+U+", limit: "+w+", exclusive: "+q+" } ";if(e.opts.messages!==false){s+=" , message: 'should be "+I+" ";if(j){s+="' + "+w}else{s+=""+w+"'"}}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var J=s;s=T.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+J+"]); "}else{s+=" validate.errors = ["+J+"]; return false; "}}else{s+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){s+=" else { "}return s}},5675:e=>{"use strict";e.exports=function generate__limitItems(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!(j||typeof r=="number")){throw new Error(n+" must be number")}var F=n=="maxItems"?">":"<";s+="if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" "+R+".length "+F+" "+w+") { ";var p=n;var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+w+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have ";if(n=="maxItems"){s+="more"}else{s+="fewer"}s+=" than ";if(j){s+="' + "+w+" + '"}else{s+=""+r}s+=" items' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},6051:e=>{"use strict";e.exports=function generate__limitLength(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!(j||typeof r=="number")){throw new Error(n+" must be number")}var F=n=="maxLength"?">":"<";s+="if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}if(e.opts.unicode===false){s+=" "+R+".length "}else{s+=" ucs2length("+R+") "}s+=" "+F+" "+w+") { ";var p=n;var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+w+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT be ";if(n=="maxLength"){s+="longer"}else{s+="shorter"}s+=" than ";if(j){s+="' + "+w+" + '"}else{s+=""+r}s+=" characters' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},7043:e=>{"use strict";e.exports=function generate__limitProperties(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!(j||typeof r=="number")){throw new Error(n+" must be number")}var F=n=="maxProperties"?">":"<";s+="if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" Object.keys("+R+").length "+F+" "+w+") { ";var p=n;var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+w+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have ";if(n=="maxProperties"){s+="more"}else{s+="fewer"}s+=" than ";if(j){s+="' + "+w+" + '"}else{s+=""+r}s+=" properties' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},3639:e=>{"use strict";e.exports=function generate_allOf(e,n,f){var s=" ";var l=e.schema[n];var v=e.schemaPath+e.util.getProperty(n);var r=e.errSchemaPath+"/"+n;var g=!e.opts.allErrors;var b=e.util.copy(e);var d="";b.level++;var p="valid"+b.level;var R=b.baseId,j=true;var w=l;if(w){var F,E=-1,A=w.length-1;while(E0||F===false:e.util.schemaHasRules(F,e.RULES.all)){j=false;b.schema=F;b.schemaPath=v+"["+E+"]";b.errSchemaPath=r+"/"+E;s+=" "+e.validate(b)+" ";b.baseId=R;if(g){s+=" if ("+p+") { ";d+="}"}}}}if(g){if(j){s+=" if (true) { "}else{s+=" "+d.slice(0,-1)+" "}}return s}},1256:e=>{"use strict";e.exports=function generate_anyOf(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A=r.every(function(n){return e.opts.strictKeywords?typeof n=="object"&&Object.keys(n).length>0||n===false:e.util.schemaHasRules(n,e.RULES.all)});if(A){var N=w.baseId;s+=" var "+j+" = errors; var "+R+" = false; ";var a=e.compositeRule;e.compositeRule=w.compositeRule=true;var z=r;if(z){var x,q=-1,O=z.length-1;while(q{"use strict";e.exports=function generate_comment(e,n,f){var s=" ";var l=e.schema[n];var v=e.errSchemaPath+"/"+n;var r=!e.opts.allErrors;var g=e.util.toQuotedString(l);if(e.opts.$comment===true){s+=" console.log("+g+");"}else if(typeof e.opts.$comment=="function"){s+=" self._opts.$comment("+g+", "+e.util.toQuotedString(v)+", validate.root.schema);"}return s}},184:e=>{"use strict";e.exports=function generate_const(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!j){s+=" var schema"+l+" = validate.schema"+g+";"}s+="var "+R+" = equal("+p+", schema"+l+"); if (!"+R+") { ";var F=F||[];F.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { allowedValue: schema"+l+" } ";if(e.opts.messages!==false){s+=" , message: 'should be equal to constant' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var E=s;s=F.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+E+"]); "}else{s+=" validate.errors = ["+E+"]; return false; "}}else{s+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(d){s+=" else { "}return s}},7419:e=>{"use strict";e.exports=function generate_contains(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A="i"+l,N=w.dataLevel=e.dataLevel+1,a="data"+N,z=e.baseId,x=e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all);s+="var "+j+" = errors;var "+R+";";if(x){var q=e.compositeRule;e.compositeRule=w.compositeRule=true;w.schema=r;w.schemaPath=g;w.errSchemaPath=b;s+=" var "+E+" = false; for (var "+A+" = 0; "+A+" < "+p+".length; "+A+"++) { ";w.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,true);var O=p+"["+A+"]";w.dataPathArr[N]=A;var Q=e.validate(w);w.baseId=z;if(e.util.varOccurences(Q,a)<2){s+=" "+e.util.varReplace(Q,a,O)+" "}else{s+=" var "+a+" = "+O+"; "+Q+" "}s+=" if ("+E+") break; } ";e.compositeRule=w.compositeRule=q;s+=" "+F+" if (!"+E+") {"}else{s+=" if ("+p+".length == 0) {"}var U=U||[];U.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should contain a valid item' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var I=s;s=U.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { ";if(x){s+=" errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; } "}if(e.opts.allErrors){s+=" } "}return s}},7921:e=>{"use strict";e.exports=function generate_custom(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j="valid"+l;var w="errs__"+l;var F=e.opts.$data&&r&&r.$data,E;if(F){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";E="schema"+l}else{E=r}var A=this,N="definition"+l,a=A.definition,z="";var x,q,O,Q,U;if(F&&a.$data){U="keywordValidate"+l;var I=a.validateSchema;s+=" var "+N+" = RULES.custom['"+n+"'].definition; var "+U+" = "+N+".validate;"}else{Q=e.useCustomRule(A,r,e.schema,e);if(!Q)return;E="validate.schema"+g;U=Q.code;x=a.compile;q=a.inline;O=a.macro}var T=U+".errors",J="i"+l,L="ruleErr"+l,M=a.async;if(M&&!e.async)throw new Error("async keyword in sync schema");if(!(q||O)){s+=""+T+" = null;"}s+="var "+w+" = errors;var "+j+";";if(F&&a.$data){z+="}";s+=" if ("+E+" === undefined) { "+j+" = true; } else { ";if(I){z+="}";s+=" "+j+" = "+N+".validateSchema("+E+"); if ("+j+") { "}}if(q){if(a.statements){s+=" "+Q.validate+" "}else{s+=" "+j+" = "+Q.validate+"; "}}else if(O){var C=e.util.copy(e);var z="";C.level++;var H="valid"+C.level;C.schema=Q.validate;C.schemaPath="";var G=e.compositeRule;e.compositeRule=C.compositeRule=true;var Y=e.validate(C).replace(/validate\.schema/g,U);e.compositeRule=C.compositeRule=G;s+=" "+Y}else{var W=W||[];W.push(s);s="";s+=" "+U+".call( ";if(e.opts.passContext){s+="this"}else{s+="self"}if(x||a.schema===false){s+=" , "+R+" "}else{s+=" , "+E+" , "+R+" , validate.schema"+e.schemaPath+" "}s+=" , (dataPath || '')";if(e.errorPath!='""'){s+=" + "+e.errorPath}var X=v?"data"+(v-1||""):"parentData",c=v?e.dataPathArr[v]:"parentDataProperty";s+=" , "+X+" , "+c+" , rootData ) ";var B=s;s=W.pop();if(a.errors===false){s+=" "+j+" = ";if(M){s+="await "}s+=""+B+"; "}else{if(M){T="customErrors"+l;s+=" var "+T+" = null; try { "+j+" = await "+B+"; } catch (e) { "+j+" = false; if (e instanceof ValidationError) "+T+" = e.errors; else throw e; } "}else{s+=" "+T+" = null; "+j+" = "+B+"; "}}}if(a.modifying){s+=" if ("+X+") "+R+" = "+X+"["+c+"];"}s+=""+z;if(a.valid){if(d){s+=" if (true) { "}}else{s+=" if ( ";if(a.valid===undefined){s+=" !";if(O){s+=""+H}else{s+=""+j}}else{s+=" "+!a.valid+" "}s+=") { ";p=A.keyword;var W=W||[];W.push(s);s="";var W=W||[];W.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { keyword: '"+A.keyword+"' } ";if(e.opts.messages!==false){s+=" , message: 'should pass \""+A.keyword+"\" keyword validation' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var Z=s;s=W.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+Z+"]); "}else{s+=" validate.errors = ["+Z+"]; return false; "}}else{s+=" var err = "+Z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var y=s;s=W.pop();if(q){if(a.errors){if(a.errors!="full"){s+=" for (var "+J+"="+w+"; "+J+"{"use strict";e.exports=function generate_dependencies(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);var w="";j.level++;var F="valid"+j.level;var E={},A={},N=e.opts.ownProperties;for(q in r){if(q=="__proto__")continue;var a=r[q];var z=Array.isArray(a)?A:E;z[q]=a}s+="var "+R+" = errors;";var x=e.errorPath;s+="var missing"+l+";";for(var q in A){z=A[q];if(z.length){s+=" if ( "+p+e.util.getProperty(q)+" !== undefined ";if(N){s+=" && Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(q)+"') "}if(d){s+=" && ( ";var O=z;if(O){var Q,U=-1,I=O.length-1;while(U0||a===false:e.util.schemaHasRules(a,e.RULES.all)){s+=" "+F+" = true; if ( "+p+e.util.getProperty(q)+" !== undefined ";if(N){s+=" && Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(q)+"') "}s+=") { ";j.schema=a;j.schemaPath=g+e.util.getProperty(q);j.errSchemaPath=b+"/"+e.util.escapeFragment(q);s+=" "+e.validate(j)+" ";j.baseId=X;s+=" } ";if(d){s+=" if ("+F+") { ";w+="}"}}}if(d){s+=" "+w+" if ("+R+" == errors) {"}return s}},9795:e=>{"use strict";e.exports=function generate_enum(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}var F="i"+l,E="schema"+l;if(!j){s+=" var "+E+" = validate.schema"+g+";"}s+="var "+R+";";if(j){s+=" if (schema"+l+" === undefined) "+R+" = true; else if (!Array.isArray(schema"+l+")) "+R+" = false; else {"}s+=""+R+" = false;for (var "+F+"=0; "+F+"<"+E+".length; "+F+"++) if (equal("+p+", "+E+"["+F+"])) { "+R+" = true; break; }";if(j){s+=" } "}s+=" if (!"+R+") { ";var A=A||[];A.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { allowedValues: schema"+l+" } ";if(e.opts.messages!==false){s+=" , message: 'should be equal to one of the allowed values' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var N=s;s=A.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+N+"]); "}else{s+=" validate.errors = ["+N+"]; return false; "}}else{s+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(d){s+=" else { "}return s}},5801:e=>{"use strict";e.exports=function generate_format(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");if(e.opts.format===false){if(d){s+=" if (true) { "}return s}var R=e.opts.$data&&r&&r.$data,j;if(R){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";j="schema"+l}else{j=r}var w=e.opts.unknownFormats,F=Array.isArray(w);if(R){var E="format"+l,A="isObject"+l,N="formatType"+l;s+=" var "+E+" = formats["+j+"]; var "+A+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+N+" = "+A+" && "+E+".type || 'string'; if ("+A+") { ";if(e.async){s+=" var async"+l+" = "+E+".async; "}s+=" "+E+" = "+E+".validate; } if ( ";if(R){s+=" ("+j+" !== undefined && typeof "+j+" != 'string') || "}s+=" (";if(w!="ignore"){s+=" ("+j+" && !"+E+" ";if(F){s+=" && self._opts.unknownFormats.indexOf("+j+") == -1 "}s+=") || "}s+=" ("+E+" && "+N+" == '"+f+"' && !(typeof "+E+" == 'function' ? ";if(e.async){s+=" (async"+l+" ? await "+E+"("+p+") : "+E+"("+p+")) "}else{s+=" "+E+"("+p+") "}s+=" : "+E+".test("+p+"))))) {"}else{var E=e.formats[r];if(!E){if(w=="ignore"){e.logger.warn('unknown format "'+r+'" ignored in schema at path "'+e.errSchemaPath+'"');if(d){s+=" if (true) { "}return s}else if(F&&w.indexOf(r)>=0){if(d){s+=" if (true) { "}return s}else{throw new Error('unknown format "'+r+'" is used in schema at path "'+e.errSchemaPath+'"')}}var A=typeof E=="object"&&!(E instanceof RegExp)&&E.validate;var N=A&&E.type||"string";if(A){var a=E.async===true;E=E.validate}if(N!=f){if(d){s+=" if (true) { "}return s}if(a){if(!e.async)throw new Error("async format in sync schema");var z="formats"+e.util.getProperty(r)+".validate";s+=" if (!(await "+z+"("+p+"))) { "}else{s+=" if (! ";var z="formats"+e.util.getProperty(r);if(A)z+=".validate";if(typeof E=="function"){s+=" "+z+"("+p+") "}else{s+=" "+z+".test("+p+") "}s+=") { "}}var x=x||[];x.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { format: ";if(R){s+=""+j}else{s+=""+e.util.toQuotedString(r)}s+=" } ";if(e.opts.messages!==false){s+=" , message: 'should match format \"";if(R){s+="' + "+j+" + '"}else{s+=""+e.util.escapeQuotes(r)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(R){s+="validate.schema"+g}else{s+=""+e.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var q=s;s=x.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+q+"]); "}else{s+=" validate.errors = ["+q+"]; return false; "}}else{s+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){s+=" else { "}return s}},4962:e=>{"use strict";e.exports=function generate_if(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);w.level++;var F="valid"+w.level;var E=e.schema["then"],A=e.schema["else"],N=E!==undefined&&(e.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===false:e.util.schemaHasRules(E,e.RULES.all)),a=A!==undefined&&(e.opts.strictKeywords?typeof A=="object"&&Object.keys(A).length>0||A===false:e.util.schemaHasRules(A,e.RULES.all)),z=w.baseId;if(N||a){var x;w.createErrors=false;w.schema=r;w.schemaPath=g;w.errSchemaPath=b;s+=" var "+j+" = errors; var "+R+" = true; ";var q=e.compositeRule;e.compositeRule=w.compositeRule=true;s+=" "+e.validate(w)+" ";w.baseId=z;w.createErrors=true;s+=" errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; } ";e.compositeRule=w.compositeRule=q;if(N){s+=" if ("+F+") { ";w.schema=e.schema["then"];w.schemaPath=e.schemaPath+".then";w.errSchemaPath=e.errSchemaPath+"/then";s+=" "+e.validate(w)+" ";w.baseId=z;s+=" "+R+" = "+F+"; ";if(N&&a){x="ifClause"+l;s+=" var "+x+" = 'then'; "}else{x="'then'"}s+=" } ";if(a){s+=" else { "}}else{s+=" if (!"+F+") { "}if(a){w.schema=e.schema["else"];w.schemaPath=e.schemaPath+".else";w.errSchemaPath=e.errSchemaPath+"/else";s+=" "+e.validate(w)+" ";w.baseId=z;s+=" "+R+" = "+F+"; ";if(N&&a){x="ifClause"+l;s+=" var "+x+" = 'else'; "}else{x="'else'"}s+=" } "}s+=" if (!"+R+") { var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { failingKeyword: "+x+" } ";if(e.opts.messages!==false){s+=" , message: 'should match \"' + "+x+" + '\" schema' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+=" } ";if(d){s+=" else { "}}else{if(d){s+=" if (true) { "}}return s}},4124:(e,n,f)=>{"use strict";e.exports={$ref:f(5746),allOf:f(3639),anyOf:f(1256),$comment:f(2660),const:f(184),contains:f(7419),dependencies:f(7299),enum:f(9795),format:f(5801),if:f(4962),items:f(9623),maximum:f(3711),minimum:f(3711),maxItems:f(5675),minItems:f(5675),maxLength:f(6051),minLength:f(6051),maxProperties:f(7043),minProperties:f(7043),multipleOf:f(9251),not:f(7739),oneOf:f(6857),pattern:f(8099),properties:f(9438),propertyNames:f(3466),required:f(8430),uniqueItems:f(2207),validate:f(6131)}},9623:e=>{"use strict";e.exports=function generate_items(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A="i"+l,N=w.dataLevel=e.dataLevel+1,a="data"+N,z=e.baseId;s+="var "+j+" = errors;var "+R+";";if(Array.isArray(r)){var x=e.schema.additionalItems;if(x===false){s+=" "+R+" = "+p+".length <= "+r.length+"; ";var q=b;b=e.errSchemaPath+"/additionalItems";s+=" if (!"+R+") { ";var O=O||[];O.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+r.length+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have more than "+r.length+" items' "}if(e.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var Q=s;s=O.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+Q+"]); "}else{s+=" validate.errors = ["+Q+"]; return false; "}}else{s+=" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";b=q;if(d){F+="}";s+=" else { "}}var U=r;if(U){var I,T=-1,J=U.length-1;while(T0||I===false:e.util.schemaHasRules(I,e.RULES.all)){s+=" "+E+" = true; if ("+p+".length > "+T+") { ";var L=p+"["+T+"]";w.schema=I;w.schemaPath=g+"["+T+"]";w.errSchemaPath=b+"/"+T;w.errorPath=e.util.getPathExpr(e.errorPath,T,e.opts.jsonPointers,true);w.dataPathArr[N]=T;var M=e.validate(w);w.baseId=z;if(e.util.varOccurences(M,a)<2){s+=" "+e.util.varReplace(M,a,L)+" "}else{s+=" var "+a+" = "+L+"; "+M+" "}s+=" } ";if(d){s+=" if ("+E+") { ";F+="}"}}}}if(typeof x=="object"&&(e.opts.strictKeywords?typeof x=="object"&&Object.keys(x).length>0||x===false:e.util.schemaHasRules(x,e.RULES.all))){w.schema=x;w.schemaPath=e.schemaPath+".additionalItems";w.errSchemaPath=e.errSchemaPath+"/additionalItems";s+=" "+E+" = true; if ("+p+".length > "+r.length+") { for (var "+A+" = "+r.length+"; "+A+" < "+p+".length; "+A+"++) { ";w.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,true);var L=p+"["+A+"]";w.dataPathArr[N]=A;var M=e.validate(w);w.baseId=z;if(e.util.varOccurences(M,a)<2){s+=" "+e.util.varReplace(M,a,L)+" "}else{s+=" var "+a+" = "+L+"; "+M+" "}if(d){s+=" if (!"+E+") break; "}s+=" } } ";if(d){s+=" if ("+E+") { ";F+="}"}}}else if(e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)){w.schema=r;w.schemaPath=g;w.errSchemaPath=b;s+=" for (var "+A+" = "+0+"; "+A+" < "+p+".length; "+A+"++) { ";w.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,true);var L=p+"["+A+"]";w.dataPathArr[N]=A;var M=e.validate(w);w.baseId=z;if(e.util.varOccurences(M,a)<2){s+=" "+e.util.varReplace(M,a,L)+" "}else{s+=" var "+a+" = "+L+"; "+M+" "}if(d){s+=" if (!"+E+") break; "}s+=" }"}if(d){s+=" "+F+" if ("+j+" == errors) {"}return s}},9251:e=>{"use strict";e.exports=function generate_multipleOf(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R=e.opts.$data&&r&&r.$data,j;if(R){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";j="schema"+l}else{j=r}if(!(R||typeof r=="number")){throw new Error(n+" must be number")}s+="var division"+l+";if (";if(R){s+=" "+j+" !== undefined && ( typeof "+j+" != 'number' || "}s+=" (division"+l+" = "+p+" / "+j+", ";if(e.opts.multipleOfPrecision){s+=" Math.abs(Math.round(division"+l+") - division"+l+") > 1e-"+e.opts.multipleOfPrecision+" "}else{s+=" division"+l+" !== parseInt(division"+l+") "}s+=" ) ";if(R){s+=" ) "}s+=" ) { ";var w=w||[];w.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { multipleOf: "+j+" } ";if(e.opts.messages!==false){s+=" , message: 'should be multiple of ";if(R){s+="' + "+j}else{s+=""+j+"'"}}if(e.opts.verbose){s+=" , schema: ";if(R){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var F=s;s=w.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+F+"]); "}else{s+=" validate.errors = ["+F+"]; return false; "}}else{s+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},7739:e=>{"use strict";e.exports=function generate_not(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);j.level++;var w="valid"+j.level;if(e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)){j.schema=r;j.schemaPath=g;j.errSchemaPath=b;s+=" var "+R+" = errors; ";var F=e.compositeRule;e.compositeRule=j.compositeRule=true;j.createErrors=false;var E;if(j.opts.allErrors){E=j.opts.allErrors;j.opts.allErrors=false}s+=" "+e.validate(j)+" ";j.createErrors=true;if(E)j.opts.allErrors=E;e.compositeRule=j.compositeRule=F;s+=" if ("+w+") { ";var A=A||[];A.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var N=s;s=A.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+N+"]); "}else{s+=" validate.errors = ["+N+"]; return false; "}}else{s+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { errors = "+R+"; if (vErrors !== null) { if ("+R+") vErrors.length = "+R+"; else vErrors = null; } ";if(e.opts.allErrors){s+=" } "}}else{s+=" var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(d){s+=" if (false) { "}}return s}},6857:e=>{"use strict";e.exports=function generate_oneOf(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A=w.baseId,N="prevValid"+l,a="passingSchemas"+l;s+="var "+j+" = errors , "+N+" = false , "+R+" = false , "+a+" = null; ";var z=e.compositeRule;e.compositeRule=w.compositeRule=true;var x=r;if(x){var q,O=-1,Q=x.length-1;while(O0||q===false:e.util.schemaHasRules(q,e.RULES.all)){w.schema=q;w.schemaPath=g+"["+O+"]";w.errSchemaPath=b+"/"+O;s+=" "+e.validate(w)+" ";w.baseId=A}else{s+=" var "+E+" = true; "}if(O){s+=" if ("+E+" && "+N+") { "+R+" = false; "+a+" = ["+a+", "+O+"]; } else { ";F+="}"}s+=" if ("+E+") { "+R+" = "+N+" = true; "+a+" = "+O+"; }"}}e.compositeRule=w.compositeRule=z;s+=""+F+"if (!"+R+") { var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { passingSchemas: "+a+" } ";if(e.opts.messages!==false){s+=" , message: 'should match exactly one schema in oneOf' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+="} else { errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; }";if(e.opts.allErrors){s+=" } "}return s}},8099:e=>{"use strict";e.exports=function generate_pattern(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R=e.opts.$data&&r&&r.$data,j;if(R){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";j="schema"+l}else{j=r}var w=R?"(new RegExp("+j+"))":e.usePattern(r);s+="if ( ";if(R){s+=" ("+j+" !== undefined && typeof "+j+" != 'string') || "}s+=" !"+w+".test("+p+") ) { ";var F=F||[];F.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { pattern: ";if(R){s+=""+j}else{s+=""+e.util.toQuotedString(r)}s+=" } ";if(e.opts.messages!==false){s+=" , message: 'should match pattern \"";if(R){s+="' + "+j+" + '"}else{s+=""+e.util.escapeQuotes(r)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(R){s+="validate.schema"+g}else{s+=""+e.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var E=s;s=F.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+E+"]); "}else{s+=" validate.errors = ["+E+"]; return false; "}}else{s+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},9438:e=>{"use strict";e.exports=function generate_properties(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);var w="";j.level++;var F="valid"+j.level;var E="key"+l,A="idx"+l,N=j.dataLevel=e.dataLevel+1,a="data"+N,z="dataProperties"+l;var x=Object.keys(r||{}).filter(notProto),q=e.schema.patternProperties||{},O=Object.keys(q).filter(notProto),Q=e.schema.additionalProperties,U=x.length||O.length,I=Q===false,T=typeof Q=="object"&&Object.keys(Q).length,J=e.opts.removeAdditional,L=I||T||J,M=e.opts.ownProperties,C=e.baseId;var H=e.schema.required;if(H&&!(e.opts.$data&&H.$data)&&H.length8){s+=" || validate.schema"+g+".hasOwnProperty("+E+") "}else{var Y=x;if(Y){var W,X=-1,c=Y.length-1;while(X0||t===false:e.util.schemaHasRules(t,e.RULES.all)){var ee=e.util.getProperty(W),P=p+ee,ne=_&&t.default!==undefined;j.schema=t;j.schemaPath=g+ee;j.errSchemaPath=b+"/"+e.util.escapeFragment(W);j.errorPath=e.util.getPath(e.errorPath,W,e.opts.jsonPointers);j.dataPathArr[N]=e.util.toQuotedString(W);var i=e.validate(j);j.baseId=C;if(e.util.varOccurences(i,a)<2){i=e.util.varReplace(i,a,P);var fe=P}else{var fe=a;s+=" var "+a+" = "+P+"; "}if(ne){s+=" "+i+" "}else{if(G&&G[W]){s+=" if ( "+fe+" === undefined ";if(M){s+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(W)+"') "}s+=") { "+F+" = false; ";var K=e.errorPath,V=b,se=e.util.escapeQuotes(W);if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPath(K,W,e.opts.jsonPointers)}b=e.errSchemaPath+"/required";var k=k||[];k.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { missingProperty: '"+se+"' } ";if(e.opts.messages!==false){s+=" , message: '";if(e.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+se+"\\'"}s+="' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var h=s;s=k.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+h+"]); "}else{s+=" validate.errors = ["+h+"]; return false; "}}else{s+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}b=V;e.errorPath=K;s+=" } else { "}else{if(d){s+=" if ( "+fe+" === undefined ";if(M){s+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(W)+"') "}s+=") { "+F+" = true; } else { "}else{s+=" if ("+fe+" !== undefined ";if(M){s+=" && Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(W)+"') "}s+=" ) { "}}s+=" "+i+" } "}}if(d){s+=" if ("+F+") { ";w+="}"}}}}if(O.length){var le=O;if(le){var Z,ve=-1,re=le.length-1;while(ve0||t===false:e.util.schemaHasRules(t,e.RULES.all)){j.schema=t;j.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(Z);j.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(Z);if(M){s+=" "+z+" = "+z+" || Object.keys("+p+"); for (var "+A+"=0; "+A+"<"+z+".length; "+A+"++) { var "+E+" = "+z+"["+A+"]; "}else{s+=" for (var "+E+" in "+p+") { "}s+=" if ("+e.usePattern(Z)+".test("+E+")) { ";j.errorPath=e.util.getPathExpr(e.errorPath,E,e.opts.jsonPointers);var P=p+"["+E+"]";j.dataPathArr[N]=E;var i=e.validate(j);j.baseId=C;if(e.util.varOccurences(i,a)<2){s+=" "+e.util.varReplace(i,a,P)+" "}else{s+=" var "+a+" = "+P+"; "+i+" "}if(d){s+=" if (!"+F+") break; "}s+=" } ";if(d){s+=" else "+F+" = true; "}s+=" } ";if(d){s+=" if ("+F+") { ";w+="}"}}}}}if(d){s+=" "+w+" if ("+R+" == errors) {"}return s}},3466:e=>{"use strict";e.exports=function generate_propertyNames(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);var w="";j.level++;var F="valid"+j.level;s+="var "+R+" = errors;";if(e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)){j.schema=r;j.schemaPath=g;j.errSchemaPath=b;var E="key"+l,A="idx"+l,N="i"+l,a="' + "+E+" + '",z=j.dataLevel=e.dataLevel+1,x="data"+z,q="dataProperties"+l,O=e.opts.ownProperties,Q=e.baseId;if(O){s+=" var "+q+" = undefined; "}if(O){s+=" "+q+" = "+q+" || Object.keys("+p+"); for (var "+A+"=0; "+A+"<"+q+".length; "+A+"++) { var "+E+" = "+q+"["+A+"]; "}else{s+=" for (var "+E+" in "+p+") { "}s+=" var startErrs"+l+" = errors; ";var U=E;var I=e.compositeRule;e.compositeRule=j.compositeRule=true;var T=e.validate(j);j.baseId=Q;if(e.util.varOccurences(T,x)<2){s+=" "+e.util.varReplace(T,x,U)+" "}else{s+=" var "+x+" = "+U+"; "+T+" "}e.compositeRule=j.compositeRule=I;s+=" if (!"+F+") { for (var "+N+"=startErrs"+l+"; "+N+"{"use strict";e.exports=function generate_ref(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.errSchemaPath+"/"+n;var b=!e.opts.allErrors;var d="data"+(v||"");var p="valid"+l;var R,j;if(r=="#"||r=="#/"){if(e.isRoot){R=e.async;j="validate"}else{R=e.root.schema.$async===true;j="root.refVal[0]"}}else{var w=e.resolveRef(e.baseId,r,e.isRoot);if(w===undefined){var F=e.MissingRefError.message(e.baseId,r);if(e.opts.missingRefs=="fail"){e.logger.error(F);var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"$ref"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: { ref: '"+e.util.escapeQuotes(r)+"' } ";if(e.opts.messages!==false){s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(r)+"' "}if(e.opts.verbose){s+=" , schema: "+e.util.toQuotedString(r)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&b){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}if(b){s+=" if (false) { "}}else if(e.opts.missingRefs=="ignore"){e.logger.warn(F);if(b){s+=" if (true) { "}}else{throw new e.MissingRefError(e.baseId,r,F)}}else if(w.inline){var N=e.util.copy(e);N.level++;var a="valid"+N.level;N.schema=w.schema;N.schemaPath="";N.errSchemaPath=r;var z=e.validate(N).replace(/validate\.schema/g,w.code);s+=" "+z+" ";if(b){s+=" if ("+a+") { "}}else{R=w.$async===true||e.async&&w.$async!==false;j=w.code}}if(j){var E=E||[];E.push(s);s="";if(e.opts.passContext){s+=" "+j+".call(this, "}else{s+=" "+j+"( "}s+=" "+d+", (dataPath || '')";if(e.errorPath!='""'){s+=" + "+e.errorPath}var x=v?"data"+(v-1||""):"parentData",q=v?e.dataPathArr[v]:"parentDataProperty";s+=" , "+x+" , "+q+", rootData) ";var O=s;s=E.pop();if(R){if(!e.async)throw new Error("async schema referenced by sync schema");if(b){s+=" var "+p+"; "}s+=" try { await "+O+"; ";if(b){s+=" "+p+" = true; "}s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ";if(b){s+=" "+p+" = false; "}s+=" } ";if(b){s+=" if ("+p+") { "}}else{s+=" if (!"+O+") { if (vErrors === null) vErrors = "+j+".errors; else vErrors = vErrors.concat("+j+".errors); errors = vErrors.length; } ";if(b){s+=" else { "}}}return s}},8430:e=>{"use strict";e.exports=function generate_required(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}var F="schema"+l;if(!j){if(r.length0||x===false:e.util.schemaHasRules(x,e.RULES.all)))){E[E.length]=N}}}}else{var E=r}}if(j||E.length){var q=e.errorPath,O=j||E.length>=e.opts.loopRequired,Q=e.opts.ownProperties;if(d){s+=" var missing"+l+"; ";if(O){if(!j){s+=" var "+F+" = validate.schema"+g+"; "}var U="i"+l,I="schema"+l+"["+U+"]",T="' + "+I+" + '";if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPathExpr(q,I,e.opts.jsonPointers)}s+=" var "+R+" = true; ";if(j){s+=" if (schema"+l+" === undefined) "+R+" = true; else if (!Array.isArray(schema"+l+")) "+R+" = false; else {"}s+=" for (var "+U+" = 0; "+U+" < "+F+".length; "+U+"++) { "+R+" = "+p+"["+F+"["+U+"]] !== undefined ";if(Q){s+=" && Object.prototype.hasOwnProperty.call("+p+", "+F+"["+U+"]) "}s+="; if (!"+R+") break; } ";if(j){s+=" } "}s+=" if (!"+R+") { ";var J=J||[];J.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { missingProperty: '"+T+"' } ";if(e.opts.messages!==false){s+=" , message: '";if(e.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+T+"\\'"}s+="' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var L=s;s=J.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+L+"]); "}else{s+=" validate.errors = ["+L+"]; return false; "}}else{s+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { "}else{s+=" if ( ";var M=E;if(M){var C,U=-1,H=M.length-1;while(U{"use strict";e.exports=function generate_uniqueItems(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if((r||j)&&e.opts.uniqueItems!==false){if(j){s+=" var "+R+"; if ("+w+" === false || "+w+" === undefined) "+R+" = true; else if (typeof "+w+" != 'boolean') "+R+" = false; else { "}s+=" var i = "+p+".length , "+R+" = true , j; if (i > 1) { ";var F=e.schema.items&&e.schema.items.type,E=Array.isArray(F);if(!F||F=="object"||F=="array"||E&&(F.indexOf("object")>=0||F.indexOf("array")>=0)){s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+R+" = false; break outer; } } } "}else{s+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ";var A="checkDataType"+(E?"s":"");s+=" if ("+e.util[A](F,"item",e.opts.strictNumbers,true)+") continue; ";if(E){s+=" if (typeof item == 'string') item = '\"' + item; "}s+=" if (typeof itemIndices[item] == 'number') { "+R+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}s+=" } ";if(j){s+=" } "}s+=" if (!"+R+") { ";var N=N||[];N.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { i: i, j: j } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var a=s;s=N.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+a+"]); "}else{s+=" validate.errors = ["+a+"]; return false; "}}else{s+=" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){s+=" else { "}}else{if(d){s+=" if (true) { "}}return s}},6131:e=>{"use strict";e.exports=function generate_validate(e,n,f){var s="";var l=e.schema.$async===true,v=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),r=e.self._getId(e.schema);if(e.opts.strictKeywords){var g=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(g){var b="unknown keyword: "+g;if(e.opts.strictKeywords==="log")e.logger.warn(b);else throw new Error(b)}}if(e.isTop){s+=" var validate = ";if(l){e.async=true;s+="async "}s+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if(r&&(e.opts.sourceCode||e.opts.processCode)){s+=" "+("/*# sourceURL="+r+" */")+" "}}if(typeof e.schema=="boolean"||!(v||e.schema.$ref)){var n="false schema";var d=e.level;var p=e.dataLevel;var R=e.schema[n];var j=e.schemaPath+e.util.getProperty(n);var w=e.errSchemaPath+"/"+n;var F=!e.opts.allErrors;var E;var A="data"+(p||"");var N="valid"+d;if(e.schema===false){if(e.isTop){F=true}else{s+=" var "+N+" = false; "}var a=a||[];a.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(E||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'boolean schema is false' "}if(e.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+A+" "}s+=" } "}else{s+=" {} "}var z=s;s=a.pop();if(!e.compositeRule&&F){if(e.async){s+=" throw new ValidationError(["+z+"]); "}else{s+=" validate.errors = ["+z+"]; return false; "}}else{s+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(e.isTop){if(l){s+=" return data; "}else{s+=" validate.errors = null; return true; "}}else{s+=" var "+N+" = true; "}}if(e.isTop){s+=" }; return validate; "}return s}if(e.isTop){var x=e.isTop,d=e.level=0,p=e.dataLevel=0,A="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema));e.baseId=e.baseId||e.rootId;delete e.isTop;e.dataPathArr=[""];if(e.schema.default!==undefined&&e.opts.useDefaults&&e.opts.strictDefaults){var q="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(q);else throw new Error(q)}s+=" var vErrors = null; ";s+=" var errors = 0; ";s+=" if (rootData === undefined) rootData = data; "}else{var d=e.level,p=e.dataLevel,A="data"+(p||"");if(r)e.baseId=e.resolve.url(e.baseId,r);if(l&&!e.async)throw new Error("async schema in sync schema");s+=" var errs_"+d+" = errors;"}var N="valid"+d,F=!e.opts.allErrors,O="",Q="";var E;var U=e.schema.type,I=Array.isArray(U);if(U&&e.opts.nullable&&e.schema.nullable===true){if(I){if(U.indexOf("null")==-1)U=U.concat("null")}else if(U!="null"){U=[U,"null"];I=true}}if(I&&U.length==1){U=U[0];I=false}if(e.schema.$ref&&v){if(e.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)')}else if(e.opts.extendRefs!==true){v=false;e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')}}if(e.schema.$comment&&e.opts.$comment){s+=" "+e.RULES.all.$comment.code(e,"$comment")}if(U){if(e.opts.coerceTypes){var T=e.util.coerceToTypes(e.opts.coerceTypes,U)}var J=e.RULES.types[U];if(T||I||J===true||J&&!$shouldUseGroup(J)){var j=e.schemaPath+".type",w=e.errSchemaPath+"/type";var j=e.schemaPath+".type",w=e.errSchemaPath+"/type",L=I?"checkDataTypes":"checkDataType";s+=" if ("+e.util[L](U,A,e.opts.strictNumbers,true)+") { ";if(T){var M="dataType"+d,C="coerced"+d;s+=" var "+M+" = typeof "+A+"; var "+C+" = undefined; ";if(e.opts.coerceTypes=="array"){s+=" if ("+M+" == 'object' && Array.isArray("+A+") && "+A+".length == 1) { "+A+" = "+A+"[0]; "+M+" = typeof "+A+"; if ("+e.util.checkDataType(e.schema.type,A,e.opts.strictNumbers)+") "+C+" = "+A+"; } "}s+=" if ("+C+" !== undefined) ; ";var H=T;if(H){var G,Y=-1,W=H.length-1;while(Y{"use strict";var s=/^[a-z_$][a-z0-9_$-]*$/i;var l=f(7921);var v=f(5533);e.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(e,n){var f=this.RULES;if(f.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!s.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(n){this.validateKeyword(n,true);var v=n.type;if(Array.isArray(v)){for(var r=0;r{"use strict";e.exports=function equal(e,n){if(e===n)return true;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return false;var f,s,l;if(Array.isArray(e)){f=e.length;if(f!=n.length)return false;for(s=f;s--!==0;)if(!equal(e[s],n[s]))return false;return true}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();l=Object.keys(e);f=l.length;if(f!==Object.keys(n).length)return false;for(s=f;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,l[s]))return false;for(s=f;s--!==0;){var v=l[s];if(!equal(e[v],n[v]))return false}return true}return e!==e&&n!==n}},3600:e=>{"use strict";e.exports=function(e,n){if(!n)n={};if(typeof n==="function")n={cmp:n};var f=typeof n.cycles==="boolean"?n.cycles:false;var s=n.cmp&&function(e){return function(n){return function(f,s){var l={key:f,value:n[f]};var v={key:s,value:n[s]};return e(l,v)}}}(n.cmp);var l=[];return function stringify(e){if(e&&e.toJSON&&typeof e.toJSON==="function"){e=e.toJSON()}if(e===undefined)return;if(typeof e=="number")return isFinite(e)?""+e:"null";if(typeof e!=="object")return JSON.stringify(e);var n,v;if(Array.isArray(e)){v="[";for(n=0;n{"use strict";var n=e.exports=function(e,n,f){if(typeof n=="function"){f=n;n={}}f=n.cb||f;var s=typeof f=="function"?f:f.pre||function(){};var l=f.post||function(){};_traverse(n,s,l,e,"",e)};n.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true};n.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};n.propsKeywords={definitions:true,properties:true,patternProperties:true,dependencies:true};n.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,f,s,l,v,r,g,b,d,p){if(l&&typeof l=="object"&&!Array.isArray(l)){f(l,v,r,g,b,d,p);for(var R in l){var j=l[R];if(Array.isArray(j)){if(R in n.arrayKeywords){for(var w=0;w{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=void 0;const{stringHints:s,numberHints:l}=f(3638);const v={type:1,not:1,oneOf:1,anyOf:1,if:1,enum:1,const:1,instanceof:1,required:2,pattern:2,patternRequired:2,format:2,formatMinimum:2,formatMaximum:2,minimum:2,exclusiveMinimum:2,maximum:2,exclusiveMaximum:2,multipleOf:2,uniqueItems:2,contains:2,minLength:2,maxLength:2,minItems:2,maxItems:2,minProperties:2,maxProperties:2,dependencies:2,propertyNames:2,additionalItems:2,additionalProperties:2,absolutePath:2};function filterMax(e,n){const f=e.reduce((e,f)=>Math.max(e,n(f)),0);return e.filter(e=>n(e)===f)}function filterChildren(e){let n=e;n=filterMax(n,e=>e.dataPath?e.dataPath.length:0);n=filterMax(n,e=>v[e.keyword]||2);return n}function findAllChildren(e,n){let f=e.length-1;const s=n=>e[f].schemaPath.indexOf(n)!==0;while(f>-1&&!n.every(s)){if(e[f].keyword==="anyOf"||e[f].keyword==="oneOf"){const n=extractRefs(e[f]);const s=findAllChildren(e.slice(0,f),n.concat(e[f].schemaPath));f=s-1}else{f-=1}}return f+1}function extractRefs(e){const{schema:n}=e;if(!Array.isArray(n)){return[]}return n.map(({$ref:e})=>e).filter(e=>e)}function groupChildrenByFirstChild(e){const n=[];let f=e.length-1;while(f>0){const s=e[f];if(s.keyword==="anyOf"||s.keyword==="oneOf"){const l=extractRefs(s);const v=findAllChildren(e.slice(0,f),l.concat(s.schemaPath));if(v!==f){n.push(Object.assign({},s,{children:e.slice(v,f)}));f=v}else{n.push(s)}}else{n.push(s)}f-=1}if(f===0){n.push(e[f])}return n.reverse()}function indent(e,n){return e.replace(/\n(?!$)/g,`\n${n}`)}function hasNotInSchema(e){return!!e.not}function findFirstTypedSchema(e){if(hasNotInSchema(e)){return findFirstTypedSchema(e.not)}return e}function canApplyNot(e){const n=findFirstTypedSchema(e);return likeNumber(n)||likeInteger(n)||likeString(n)||likeNull(n)||likeBoolean(n)}function isObject(e){return typeof e==="object"&&e!==null}function likeNumber(e){return e.type==="number"||typeof e.minimum!=="undefined"||typeof e.exclusiveMinimum!=="undefined"||typeof e.maximum!=="undefined"||typeof e.exclusiveMaximum!=="undefined"||typeof e.multipleOf!=="undefined"}function likeInteger(e){return e.type==="integer"||typeof e.minimum!=="undefined"||typeof e.exclusiveMinimum!=="undefined"||typeof e.maximum!=="undefined"||typeof e.exclusiveMaximum!=="undefined"||typeof e.multipleOf!=="undefined"}function likeString(e){return e.type==="string"||typeof e.minLength!=="undefined"||typeof e.maxLength!=="undefined"||typeof e.pattern!=="undefined"||typeof e.format!=="undefined"||typeof e.formatMinimum!=="undefined"||typeof e.formatMaximum!=="undefined"}function likeBoolean(e){return e.type==="boolean"}function likeArray(e){return e.type==="array"||typeof e.minItems==="number"||typeof e.maxItems==="number"||typeof e.uniqueItems!=="undefined"||typeof e.items!=="undefined"||typeof e.additionalItems!=="undefined"||typeof e.contains!=="undefined"}function likeObject(e){return e.type==="object"||typeof e.minProperties!=="undefined"||typeof e.maxProperties!=="undefined"||typeof e.required!=="undefined"||typeof e.properties!=="undefined"||typeof e.patternProperties!=="undefined"||typeof e.additionalProperties!=="undefined"||typeof e.dependencies!=="undefined"||typeof e.propertyNames!=="undefined"||typeof e.patternRequired!=="undefined"}function likeNull(e){return e.type==="null"}function getArticle(e){if(/^[aeiou]/i.test(e)){return"an"}return"a"}function getSchemaNonTypes(e){if(!e){return""}if(!e.type){if(likeNumber(e)||likeInteger(e)){return" | should be any non-number"}if(likeString(e)){return" | should be any non-string"}if(likeArray(e)){return" | should be any non-array"}if(likeObject(e)){return" | should be any non-object"}}return""}function formatHints(e){return e.length>0?`(${e.join(", ")})`:""}function getHints(e,n){if(likeNumber(e)||likeInteger(e)){return l(e,n)}else if(likeString(e)){return s(e,n)}return[]}class ValidationError extends Error{constructor(e,n,f={}){super();this.name="ValidationError";this.errors=e;this.schema=n;let s;let l;if(n.title&&(!f.name||!f.baseDataPath)){const e=n.title.match(/^(.+) (.+)$/);if(e){if(!f.name){[,s]=e}if(!f.baseDataPath){[,,l]=e}}}this.headerName=f.name||s||"Object";this.baseDataPath=f.baseDataPath||l||"configuration";this.postFormatter=f.postFormatter||null;const v=`Invalid ${this.baseDataPath} object. ${this.headerName} has been initialized using ${getArticle(this.baseDataPath)} ${this.baseDataPath} object that does not match the API schema.\n`;this.message=`${v}${this.formatValidationErrors(e)}`;Error.captureStackTrace(this,this.constructor)}getSchemaPart(e){const n=e.split("/");let f=this.schema;for(let e=1;e{if(!l){return this.formatSchema(n,s,f)}if(f.includes(n)){return"(recursive)"}return this.formatSchema(n,s,f.concat(e))};if(hasNotInSchema(e)&&!likeObject(e)){if(canApplyNot(e.not)){s=!n;return l(e.not)}const f=!e.not.not;const v=n?"":"non ";s=!n;return f?v+l(e.not):l(e.not)}if(e.instanceof){const{instanceof:n}=e;const f=!Array.isArray(n)?[n]:n;return f.map(e=>e==="Function"?"function":e).join(" | ")}if(e.enum){return e.enum.map(e=>JSON.stringify(e)).join(" | ")}if(typeof e.const!=="undefined"){return JSON.stringify(e.const)}if(e.oneOf){return e.oneOf.map(e=>l(e,true)).join(" | ")}if(e.anyOf){return e.anyOf.map(e=>l(e,true)).join(" | ")}if(e.allOf){return e.allOf.map(e=>l(e,true)).join(" & ")}if(e.if){const{if:n,then:f,else:s}=e;return`${n?`if ${l(n)}`:""}${f?` then ${l(f)}`:""}${s?` else ${l(s)}`:""}`}if(e.$ref){return l(this.getSchemaPart(e.$ref),true)}if(likeNumber(e)||likeInteger(e)){const[f,...s]=getHints(e,n);const l=`${f}${s.length>0?` ${formatHints(s)}`:""}`;return n?l:s.length>0?`non-${f} | ${l}`:`non-${f}`}if(likeString(e)){const[f,...s]=getHints(e,n);const l=`${f}${s.length>0?` ${formatHints(s)}`:""}`;return n?l:l==="string"?"non-string":`non-string | ${l}`}if(likeBoolean(e)){return`${n?"":"non-"}boolean`}if(likeArray(e)){s=true;const n=[];if(typeof e.minItems==="number"){n.push(`should not have fewer than ${e.minItems} item${e.minItems>1?"s":""}`)}if(typeof e.maxItems==="number"){n.push(`should not have more than ${e.maxItems} item${e.maxItems>1?"s":""}`)}if(e.uniqueItems){n.push("should not have duplicate items")}const f=typeof e.additionalItems==="undefined"||Boolean(e.additionalItems);let v="";if(e.items){if(Array.isArray(e.items)&&e.items.length>0){v=`${e.items.map(e=>l(e)).join(", ")}`;if(f){if(e.additionalItems&&isObject(e.additionalItems)&&Object.keys(e.additionalItems).length>0){n.push(`additional items should be ${l(e.additionalItems)}`)}}}else if(e.items&&Object.keys(e.items).length>0){v=`${l(e.items)}`}else{v="any"}}else{v="any"}if(e.contains&&Object.keys(e.contains).length>0){n.push(`should contains at least one ${this.formatSchema(e.contains)} item`)}return`[${v}${f?", ...":""}]${n.length>0?` (${n.join(", ")})`:""}`}if(likeObject(e)){s=true;const n=[];if(typeof e.minProperties==="number"){n.push(`should not have fewer than ${e.minProperties} ${e.minProperties>1?"properties":"property"}`)}if(typeof e.maxProperties==="number"){n.push(`should not have more than ${e.maxProperties} ${e.minProperties&&e.minProperties>1?"properties":"property"}`)}if(e.patternProperties&&Object.keys(e.patternProperties).length>0){const f=Object.keys(e.patternProperties);n.push(`additional property names should match pattern${f.length>1?"s":""} ${f.map(e=>JSON.stringify(e)).join(" | ")}`)}const f=e.properties?Object.keys(e.properties):[];const v=e.required?e.required:[];const r=[...new Set([].concat(v).concat(f))];const g=r.map(e=>{const n=v.includes(e);return`${e}${n?"":"?"}`}).concat(typeof e.additionalProperties==="undefined"||Boolean(e.additionalProperties)?e.additionalProperties&&isObject(e.additionalProperties)?[`: ${l(e.additionalProperties)}`]:["…"]:[]).join(", ");const{dependencies:b,propertyNames:d,patternRequired:p}=e;if(b){Object.keys(b).forEach(e=>{const f=b[e];if(Array.isArray(f)){n.push(`should have ${f.length>1?"properties":"property"} ${f.map(e=>`'${e}'`).join(", ")} when property '${e}' is present`)}else{n.push(`should be valid according to the schema ${l(f)} when property '${e}' is present`)}})}if(d&&Object.keys(d).length>0){n.push(`each property name should match format ${JSON.stringify(e.propertyNames.format)}`)}if(p&&p.length>0){n.push(`should have property matching pattern ${p.map(e=>JSON.stringify(e))}`)}return`object {${g?` ${g} `:""}}${n.length>0?` (${n.join(", ")})`:""}`}if(likeNull(e)){return`${n?"":"non-"}null`}if(Array.isArray(e.type)){return`${e.type.join(" | ")}`}return JSON.stringify(e,null,2)}getSchemaPartText(e,n,f=false,s=true){if(!e){return""}if(Array.isArray(n)){for(let f=0;f ${e.description}`}return l}getSchemaPartDescription(e){if(!e){return""}while(e.$ref){e=this.getSchemaPart(e.$ref)}if(e.description){return`\n-> ${e.description}`}return""}formatValidationError(e){const{keyword:n,dataPath:f}=e;const s=`${this.baseDataPath}${f}`;switch(n){case"type":{const{parentSchema:n,params:f}=e;switch(f.type){case"number":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"integer":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"string":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"boolean":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"array":return`${s} should be an array:\n${this.getSchemaPartText(n)}`;case"object":return`${s} should be an object:\n${this.getSchemaPartText(n)}`;case"null":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;default:return`${s} should be:\n${this.getSchemaPartText(n)}`}}case"instanceof":{const{parentSchema:n}=e;return`${s} should be an instance of ${this.getSchemaPartText(n,false,true)}`}case"pattern":{const{params:n,parentSchema:f}=e;const{pattern:l}=n;return`${s} should match pattern ${JSON.stringify(l)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"format":{const{params:n,parentSchema:f}=e;const{format:l}=n;return`${s} should match format ${JSON.stringify(l)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"formatMinimum":case"formatMaximum":{const{params:n,parentSchema:f}=e;const{comparison:l,limit:v}=n;return`${s} should be ${l} ${JSON.stringify(v)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minimum":case"maximum":case"exclusiveMinimum":case"exclusiveMaximum":{const{parentSchema:n,params:f}=e;const{comparison:l,limit:v}=f;const[,...r]=getHints(n,true);if(r.length===0){r.push(`should be ${l} ${v}`)}return`${s} ${r.join(" ")}${getSchemaNonTypes(n)}.${this.getSchemaPartDescription(n)}`}case"multipleOf":{const{params:n,parentSchema:f}=e;const{multipleOf:l}=n;return`${s} should be multiple of ${l}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"patternRequired":{const{params:n,parentSchema:f}=e;const{missingPattern:l}=n;return`${s} should have property matching pattern ${JSON.stringify(l)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minLength":{const{params:n,parentSchema:f}=e;const{limit:l}=n;if(l===1){return`${s} should be an non-empty string${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}const v=l-1;return`${s} should be longer than ${v} character${v>1?"s":""}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minItems":{const{params:n,parentSchema:f}=e;const{limit:l}=n;if(l===1){return`${s} should be an non-empty array${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}return`${s} should not have fewer than ${l} items${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minProperties":{const{params:n,parentSchema:f}=e;const{limit:l}=n;if(l===1){return`${s} should be an non-empty object${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}return`${s} should not have fewer than ${l} properties${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"maxLength":{const{params:n,parentSchema:f}=e;const{limit:l}=n;const v=l+1;return`${s} should be shorter than ${v} character${v>1?"s":""}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"maxItems":{const{params:n,parentSchema:f}=e;const{limit:l}=n;return`${s} should not have more than ${l} items${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"maxProperties":{const{params:n,parentSchema:f}=e;const{limit:l}=n;return`${s} should not have more than ${l} properties${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"uniqueItems":{const{params:n,parentSchema:f}=e;const{i:l}=n;return`${s} should not contain the item '${e.data[l]}' twice${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"additionalItems":{const{params:n,parentSchema:f}=e;const{limit:l}=n;return`${s} should not have more than ${l} items${getSchemaNonTypes(f)}. These items are valid:\n${this.getSchemaPartText(f)}`}case"contains":{const{parentSchema:n}=e;return`${s} should contains at least one ${this.getSchemaPartText(n,["contains"])} item${getSchemaNonTypes(n)}.`}case"required":{const{parentSchema:n,params:f}=e;const l=f.missingProperty.replace(/^\./,"");const v=n&&Boolean(n.properties&&n.properties[l]);return`${s} misses the property '${l}'${getSchemaNonTypes(n)}.${v?` Should be:\n${this.getSchemaPartText(n,["properties",l])}`:this.getSchemaPartDescription(n)}`}case"additionalProperties":{const{params:n,parentSchema:f}=e;const{additionalProperty:l}=n;return`${s} has an unknown property '${l}'${getSchemaNonTypes(f)}. These properties are valid:\n${this.getSchemaPartText(f)}`}case"dependencies":{const{params:n,parentSchema:f}=e;const{property:l,deps:v}=n;const r=v.split(",").map(e=>`'${e.trim()}'`).join(", ");return`${s} should have properties ${r} when property '${l}' is present${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"propertyNames":{const{params:n,parentSchema:f,schema:l}=e;const{propertyName:v}=n;return`${s} property name '${v}' is invalid${getSchemaNonTypes(f)}. Property names should be match format ${JSON.stringify(l.format)}.${this.getSchemaPartDescription(f)}`}case"enum":{const{parentSchema:n}=e;if(n&&n.enum&&n.enum.length===1){return`${s} should be ${this.getSchemaPartText(n,false,true)}`}return`${s} should be one of these:\n${this.getSchemaPartText(n)}`}case"const":{const{parentSchema:n}=e;return`${s} should be equal to constant ${this.getSchemaPartText(n,false,true)}`}case"not":{const n=likeObject(e.parentSchema)?`\n${this.getSchemaPartText(e.parentSchema)}`:"";const f=this.getSchemaPartText(e.schema,false,false,false);if(canApplyNot(e.schema)){return`${s} should be any ${f}${n}.`}const{schema:l,parentSchema:v}=e;return`${s} should not be ${this.getSchemaPartText(l,false,true)}${v&&likeObject(v)?`\n${this.getSchemaPartText(v)}`:""}`}case"oneOf":case"anyOf":{const{parentSchema:n,children:f}=e;if(f&&f.length>0){if(e.schema.length===1){const e=f[f.length-1];const s=f.slice(0,f.length-1);return this.formatValidationError(Object.assign({},e,{children:s,parentSchema:Object.assign({},n,e.parentSchema)}))}let l=filterChildren(f);if(l.length===1){return this.formatValidationError(l[0])}l=groupChildrenByFirstChild(l);return`${s} should be one of these:\n${this.getSchemaPartText(n)}\nDetails:\n${l.map(e=>` * ${indent(this.formatValidationError(e)," ")}`).join("\n")}`}return`${s} should be one of these:\n${this.getSchemaPartText(n)}`}case"if":{const{params:n,parentSchema:f}=e;const{failingKeyword:l}=n;return`${s} should match "${l}" schema:\n${this.getSchemaPartText(f,[l])}`}case"absolutePath":{const{message:n,parentSchema:f}=e;return`${s}: ${n}${this.getSchemaPartDescription(f)}`}default:{const{message:n,parentSchema:f}=e;const l=JSON.stringify(e,null,2);return`${s} ${n} (${l}).\n${this.getSchemaPartText(f,false)}`}}}formatValidationErrors(e){return e.map(e=>{let n=this.formatValidationError(e);if(this.postFormatter){n=this.postFormatter(n,e)}return` - ${indent(n," ")}`}).join("\n")}}var r=ValidationError;n.default=r},3664:(e,n,f)=>{"use strict";const s=f(9240);e.exports=s.default},943:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=void 0;function errorMessage(e,n,f){return{dataPath:undefined,schemaPath:undefined,keyword:"absolutePath",params:{absolutePath:f},message:e,parentSchema:n}}function getErrorFor(e,n,f){const s=e?`The provided value ${JSON.stringify(f)} is not an absolute path!`:`A relative path is expected. However, the provided value ${JSON.stringify(f)} is an absolute path!`;return errorMessage(s,n,f)}function addAbsolutePathKeyword(e){e.addKeyword("absolutePath",{errors:true,type:"string",compile(e,n){const f=s=>{let l=true;const v=s.includes("!");if(v){f.errors=[errorMessage(`The provided value ${JSON.stringify(s)} contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.`,n,s)];l=false}const r=e===/^(?:[A-Za-z]:(\\|\/)|\\\\|\/)/.test(s);if(!r){f.errors=[getErrorFor(e,n,s)];l=false}return l};f.errors=[];return f}});return e}var f=addAbsolutePathKeyword;n.default=f},7941:e=>{"use strict";class Range{static getOperator(e,n){if(e==="left"){return n?">":">="}return n?"<":"<="}static formatRight(e,n,f){if(n===false){return Range.formatLeft(e,!n,!f)}return`should be ${Range.getOperator("right",f)} ${e}`}static formatLeft(e,n,f){if(n===false){return Range.formatRight(e,!n,!f)}return`should be ${Range.getOperator("left",f)} ${e}`}static formatRange(e,n,f,s,l){let v="should be";v+=` ${Range.getOperator(l?"left":"right",l?f:!f)} ${e} `;v+=l?"and":"or";v+=` ${Range.getOperator(l?"right":"left",l?s:!s)} ${n}`;return v}static getRangeValue(e,n){let f=n?Infinity:-Infinity;let s=-1;const l=n?([e])=>e<=f:([e])=>e>=f;for(let n=0;n-1){return e[s]}return[Infinity,true]}constructor(){this._left=[];this._right=[]}left(e,n=false){this._left.push([e,n])}right(e,n=false){this._right.push([e,n])}format(e=true){const[n,f]=Range.getRangeValue(this._left,e);const[s,l]=Range.getRangeValue(this._right,!e);if(!Number.isFinite(n)&&!Number.isFinite(s)){return""}const v=f?n+1:n;const r=l?s-1:s;if(v===r){return`should be ${e?"":"!"}= ${v}`}if(Number.isFinite(n)&&!Number.isFinite(s)){return Range.formatLeft(n,e,f)}if(!Number.isFinite(n)&&Number.isFinite(s)){return Range.formatRight(s,e,l)}return Range.formatRange(n,s,f,l,e)}}e.exports=Range},3638:(e,n,f)=>{"use strict";const s=f(7941);e.exports.stringHints=function stringHints(e,n){const f=[];let s="string";const l={...e};if(!n){const e=l.minLength;const n=l.formatMinimum;const f=l.formatExclusiveMaximum;l.minLength=l.maxLength;l.maxLength=e;l.formatMinimum=l.formatMaximum;l.formatMaximum=n;l.formatExclusiveMaximum=!l.formatExclusiveMinimum;l.formatExclusiveMinimum=!f}if(typeof l.minLength==="number"){if(l.minLength===1){s="non-empty string"}else{const e=Math.max(l.minLength-1,0);f.push(`should be longer than ${e} character${e>1?"s":""}`)}}if(typeof l.maxLength==="number"){if(l.maxLength===0){s="empty string"}else{const e=l.maxLength+1;f.push(`should be shorter than ${e} character${e>1?"s":""}`)}}if(l.pattern){f.push(`should${n?"":" not"} match pattern ${JSON.stringify(l.pattern)}`)}if(l.format){f.push(`should${n?"":" not"} match format ${JSON.stringify(l.format)}`)}if(l.formatMinimum){f.push(`should be ${l.formatExclusiveMinimum?">":">="} ${JSON.stringify(l.formatMinimum)}`)}if(l.formatMaximum){f.push(`should be ${l.formatExclusiveMaximum?"<":"<="} ${JSON.stringify(l.formatMaximum)}`)}return[s].concat(f)};e.exports.numberHints=function numberHints(e,n){const f=[e.type==="integer"?"integer":"number"];const l=new s;if(typeof e.minimum==="number"){l.left(e.minimum)}if(typeof e.exclusiveMinimum==="number"){l.left(e.exclusiveMinimum,true)}if(typeof e.maximum==="number"){l.right(e.maximum)}if(typeof e.exclusiveMaximum==="number"){l.right(e.exclusiveMaximum,true)}const v=l.format(n);if(v){f.push(v)}if(typeof e.multipleOf==="number"){f.push(`should${n?"":" not"} be multiple of ${e.multipleOf}`)}return f}},9240:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=void 0;var s=_interopRequireDefault(f(943));var l=_interopRequireDefault(f(321));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const v=f(1414);const r=f(2133);const g=new v({allErrors:true,verbose:true,$data:true});r(g,["instanceof","formatMinimum","formatMaximum","patternRequired"]);(0,s.default)(g);function validate(e,n,f){let s=[];if(Array.isArray(n)){s=Array.from(n,n=>validateObject(e,n));s.forEach((e,n)=>{const f=e=>{e.dataPath=`[${n}]${e.dataPath}`;if(e.children){e.children.forEach(f)}};e.forEach(f)});s=s.reduce((e,n)=>{e.push(...n);return e},[])}else{s=validateObject(e,n)}if(s.length>0){throw new l.default(s,e,f)}}function validateObject(e,n){const f=g.compile(e);const s=f(n);if(s)return[];return f.errors?filterErrors(f.errors):[]}function filterErrors(e){let n=[];for(const f of e){const{dataPath:e}=f;let s=[];n=n.filter(n=>{if(n.dataPath.includes(e)){if(n.children){s=s.concat(n.children.slice(0))}n.children=undefined;s.push(n);return false}return true});if(s.length){f.children=s}n.push(f)}return n}validate.ValidationError=l.default;validate.ValidateError=l.default;var b=validate;n.default=b},4007:function(e,n){(function(e,f){true?f(n):0})(this,function(e){"use strict";function merge(){for(var e=arguments.length,n=Array(e),f=0;f1){n[0]=n[0].slice(0,-1);var s=n.length-1;for(var l=1;l= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var a=r-g;var z=Math.floor;var x=String.fromCharCode;function error$1(e){throw new RangeError(N[e])}function map(e,n){var f=[];var s=e.length;while(s--){f[s]=n(e[s])}return f}function mapDomain(e,n){var f=e.split("@");var s="";if(f.length>1){s=f[0]+"@";e=f[1]}e=e.replace(A,".");var l=e.split(".");var v=map(l,n).join(".");return s+v}function ucs2decode(e){var n=[];var f=0;var s=e.length;while(f=55296&&l<=56319&&f>1;e+=z(e/n);for(;e>a*b>>1;s+=r){e=z(e/a)}return z(s+(a+1)*e/(e+d))};var I=function decode(e){var n=[];var f=e.length;var s=0;var l=j;var d=R;var p=e.lastIndexOf(w);if(p<0){p=0}for(var F=0;F=128){error$1("not-basic")}n.push(e.charCodeAt(F))}for(var E=p>0?p+1:0;E=f){error$1("invalid-input")}var x=O(e.charCodeAt(E++));if(x>=r||x>z((v-s)/N)){error$1("overflow")}s+=x*N;var q=a<=d?g:a>=d+b?b:a-d;if(xz(v/Q)){error$1("overflow")}N*=Q}var I=n.length+1;d=U(s-A,I,A==0);if(z(s/I)>v-l){error$1("overflow")}l+=z(s/I);s%=I;n.splice(s++,0,l)}return String.fromCodePoint.apply(String,n)};var T=function encode(e){var n=[];e=ucs2decode(e);var f=e.length;var s=j;var l=0;var d=R;var p=true;var F=false;var E=undefined;try{for(var A=e[Symbol.iterator](),N;!(p=(N=A.next()).done);p=true){var a=N.value;if(a<128){n.push(x(a))}}}catch(e){F=true;E=e}finally{try{if(!p&&A.return){A.return()}}finally{if(F){throw E}}}var q=n.length;var O=q;if(q){n.push(w)}while(O=s&&Hz((v-l)/G)){error$1("overflow")}l+=(I-s)*G;s=I;var Y=true;var W=false;var X=undefined;try{for(var c=e[Symbol.iterator](),B;!(Y=(B=c.next()).done);Y=true){var Z=B.value;if(Zv){error$1("overflow")}if(Z==s){var y=l;for(var D=r;;D+=r){var K=D<=d?g:D>=d+b?b:D-d;if(y>6|192).toString(16).toUpperCase()+"%"+(n&63|128).toString(16).toUpperCase();else f="%"+(n>>12|224).toString(16).toUpperCase()+"%"+(n>>6&63|128).toString(16).toUpperCase()+"%"+(n&63|128).toString(16).toUpperCase();return f}function pctDecChars(e){var n="";var f=0;var s=e.length;while(f=194&&l<224){if(s-f>=6){var v=parseInt(e.substr(f+4,2),16);n+=String.fromCharCode((l&31)<<6|v&63)}else{n+=e.substr(f,6)}f+=6}else if(l>=224){if(s-f>=9){var r=parseInt(e.substr(f+4,2),16);var g=parseInt(e.substr(f+7,2),16);n+=String.fromCharCode((l&15)<<12|(r&63)<<6|g&63)}else{n+=e.substr(f,9)}f+=9}else{n+=e.substr(f,3);f+=3}}return n}function _normalizeComponentEncoding(e,n){function decodeUnreserved(e){var f=pctDecChars(e);return!f.match(n.UNRESERVED)?e:f}if(e.scheme)e.scheme=String(e.scheme).replace(n.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(n.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_USERINFO,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(n.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(n.NOT_HOST,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(n.PCT_ENCODED,decodeUnreserved).replace(e.scheme?n.NOT_PATH:n.NOT_PATH_NOSCHEME,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_QUERY,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_FRAGMENT,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,n){var f=e.match(n.IPV4ADDRESS)||[];var l=s(f,2),v=l[1];if(v){return v.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,n){var f=e.match(n.IPV6ADDRESS)||[];var l=s(f,3),v=l[1],r=l[2];if(v){var g=v.toLowerCase().split("::").reverse(),b=s(g,2),d=b[0],p=b[1];var R=p?p.split(":").map(_stripLeadingZeros):[];var j=d.split(":").map(_stripLeadingZeros);var w=n.IPV4ADDRESS.test(j[j.length-1]);var F=w?7:8;var E=j.length-F;var A=Array(F);for(var N=0;N1){var q=A.slice(0,z.index);var O=A.slice(z.index+z.length);x=q.join(":")+"::"+O.join(":")}else{x=A.join(":")}if(r){x+="%"+r}return x}else{return e}}var H=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var G="".match(/(){0}/)[1]===undefined;function parse(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var l={};var v=s.iri!==false?f:n;if(s.reference==="suffix")e=(s.scheme?s.scheme+":":"")+"//"+e;var r=e.match(H);if(r){if(G){l.scheme=r[1];l.userinfo=r[3];l.host=r[4];l.port=parseInt(r[5],10);l.path=r[6]||"";l.query=r[7];l.fragment=r[8];if(isNaN(l.port)){l.port=r[5]}}else{l.scheme=r[1]||undefined;l.userinfo=e.indexOf("@")!==-1?r[3]:undefined;l.host=e.indexOf("//")!==-1?r[4]:undefined;l.port=parseInt(r[5],10);l.path=r[6]||"";l.query=e.indexOf("?")!==-1?r[7]:undefined;l.fragment=e.indexOf("#")!==-1?r[8]:undefined;if(isNaN(l.port)){l.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:undefined}}if(l.host){l.host=_normalizeIPv6(_normalizeIPv4(l.host,v),v)}if(l.scheme===undefined&&l.userinfo===undefined&&l.host===undefined&&l.port===undefined&&!l.path&&l.query===undefined){l.reference="same-document"}else if(l.scheme===undefined){l.reference="relative"}else if(l.fragment===undefined){l.reference="absolute"}else{l.reference="uri"}if(s.reference&&s.reference!=="suffix"&&s.reference!==l.reference){l.error=l.error||"URI is not a "+s.reference+" reference."}var g=C[(s.scheme||l.scheme||"").toLowerCase()];if(!s.unicodeSupport&&(!g||!g.unicodeSupport)){if(l.host&&(s.domainHost||g&&g.domainHost)){try{l.host=M.toASCII(l.host.replace(v.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){l.error=l.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(l,n)}else{_normalizeComponentEncoding(l,v)}if(g&&g.parse){g.parse(l,s)}}else{l.error=l.error||"URI can not be parsed."}return l}function _recomposeAuthority(e,s){var l=s.iri!==false?f:n;var v=[];if(e.userinfo!==undefined){v.push(e.userinfo);v.push("@")}if(e.host!==undefined){v.push(_normalizeIPv6(_normalizeIPv4(String(e.host),l),l).replace(l.IPV6ADDRESS,function(e,n,f){return"["+n+(f?"%25"+f:"")+"]"}))}if(typeof e.port==="number"){v.push(":");v.push(e.port.toString(10))}return v.length?v.join(""):undefined}var Y=/^\.\.?\//;var W=/^\/\.(\/|$)/;var X=/^\/\.\.(\/|$)/;var c=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var n=[];while(e.length){if(e.match(Y)){e=e.replace(Y,"")}else if(e.match(W)){e=e.replace(W,"/")}else if(e.match(X)){e=e.replace(X,"/");n.pop()}else if(e==="."||e===".."){e=""}else{var f=e.match(c);if(f){var s=f[0];e=e.slice(s.length);n.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return n.join("")}function serialize(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var l=s.iri?f:n;var v=[];var r=C[(s.scheme||e.scheme||"").toLowerCase()];if(r&&r.serialize)r.serialize(e,s);if(e.host){if(l.IPV6ADDRESS.test(e.host)){}else if(s.domainHost||r&&r.domainHost){try{e.host=!s.iri?M.toASCII(e.host.replace(l.PCT_ENCODED,pctDecChars).toLowerCase()):M.toUnicode(e.host)}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(!s.iri?"ASCII":"Unicode")+" via punycode: "+n}}}_normalizeComponentEncoding(e,l);if(s.reference!=="suffix"&&e.scheme){v.push(e.scheme);v.push(":")}var g=_recomposeAuthority(e,s);if(g!==undefined){if(s.reference!=="suffix"){v.push("//")}v.push(g);if(e.path&&e.path.charAt(0)!=="/"){v.push("/")}}if(e.path!==undefined){var b=e.path;if(!s.absolutePath&&(!r||!r.absolutePath)){b=removeDotSegments(b)}if(g===undefined){b=b.replace(/^\/\//,"/%2F")}v.push(b)}if(e.query!==undefined){v.push("?");v.push(e.query)}if(e.fragment!==undefined){v.push("#");v.push(e.fragment)}return v.join("")}function resolveComponents(e,n){var f=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var s=arguments[3];var l={};if(!s){e=parse(serialize(e,f),f);n=parse(serialize(n,f),f)}f=f||{};if(!f.tolerant&&n.scheme){l.scheme=n.scheme;l.userinfo=n.userinfo;l.host=n.host;l.port=n.port;l.path=removeDotSegments(n.path||"");l.query=n.query}else{if(n.userinfo!==undefined||n.host!==undefined||n.port!==undefined){l.userinfo=n.userinfo;l.host=n.host;l.port=n.port;l.path=removeDotSegments(n.path||"");l.query=n.query}else{if(!n.path){l.path=e.path;if(n.query!==undefined){l.query=n.query}else{l.query=e.query}}else{if(n.path.charAt(0)==="/"){l.path=removeDotSegments(n.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){l.path="/"+n.path}else if(!e.path){l.path=n.path}else{l.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+n.path}l.path=removeDotSegments(l.path)}l.query=n.query}l.userinfo=e.userinfo;l.host=e.host;l.port=e.port}l.scheme=e.scheme}l.fragment=n.fragment;return l}function resolve(e,n,f){var s=assign({scheme:"null"},f);return serialize(resolveComponents(parse(e,s),parse(n,s),s,true),s)}function normalize(e,n){if(typeof e==="string"){e=serialize(parse(e,n),n)}else if(typeOf(e)==="object"){e=parse(serialize(e,n),n)}return e}function equal(e,n,f){if(typeof e==="string"){e=serialize(parse(e,f),f)}else if(typeOf(e)==="object"){e=serialize(e,f)}if(typeof n==="string"){n=serialize(parse(n,f),f)}else if(typeOf(n)==="object"){n=serialize(n,f)}return e===n}function escapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?n.ESCAPE:f.ESCAPE,pctEncChar)}function unescapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?n.PCT_ENCODED:f.PCT_ENCODED,pctDecChars)}var B={scheme:"http",domainHost:true,parse:function parse(e,n){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,n){if(e.port===(String(e.scheme).toLowerCase()!=="https"?80:443)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var Z={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};var y={};var D=true;var K="[A-Za-z0-9\\-\\.\\_\\~"+(D?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var m="[0-9A-Fa-f]";var V=subexp(subexp("%[EFef]"+m+"%"+m+m+"%"+m+m)+"|"+subexp("%[89A-Fa-f]"+m+"%"+m+m)+"|"+subexp("%"+m+m));var k="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var h="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var S=merge(h,'[\\"\\\\]');var P="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var i=new RegExp(K,"g");var _=new RegExp(V,"g");var u=new RegExp(merge("[^]",k,"[\\.]",'[\\"]',S),"g");var o=new RegExp(merge("[^]",K,P),"g");var $=o;function decodeUnreserved(e){var n=pctDecChars(e);return!n.match(i)?e:n}var t={scheme:"mailto",parse:function parse$$1(e,n){var f=e;var s=f.to=f.path?f.path.split(","):[];f.path=undefined;if(f.query){var l=false;var v={};var r=f.query.split("&");for(var g=0,b=r.length;g{var e={3710:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},6959:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},8630:(e,n,f)=>{"use strict";var s=f(696);e.exports=defineKeywords;function defineKeywords(e,n){if(Array.isArray(n)){for(var f=0;f{"use strict";var s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;var l=/t|\s/i;var v={date:compareDate,time:compareTime,"date-time":compareDateTime};var r={type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:false};e.exports=function(e){var n="format"+e;return function defFunc(s){defFunc.definition={type:"string",inline:f(9687),statements:true,errors:"full",dependencies:["format"],metaSchema:{anyOf:[{type:"string"},r]}};s.addKeyword(n,defFunc.definition);s.addKeyword("formatExclusive"+e,{dependencies:["format"+e],metaSchema:{anyOf:[{type:"boolean"},r]}});extendFormats(s);return s}};function extendFormats(e){var n=e._formats;for(var f in v){var s=n[f];if(typeof s!="object"||s instanceof RegExp||!s.validate)s=n[f]={validate:s};if(!s.compare)s.compare=v[f]}}function compareDate(e,n){if(!(e&&n))return;if(e>n)return 1;if(en)return 1;if(e{"use strict";e.exports={metaSchemaRef:metaSchemaRef};var n="http://json-schema.org/draft-07/schema";function metaSchemaRef(e){var f=e._opts.defaultMeta;if(typeof f=="string")return{$ref:f};if(e.getSchema(n))return{$ref:n};console.warn("meta schema not defined");return{}}},2600:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e,n){if(!e)return true;var f=Object.keys(n.properties);if(f.length==0)return true;return{required:f}},metaSchema:{type:"boolean"},dependencies:["properties"]};e.addKeyword("allRequired",defFunc.definition);return e}},2038:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){if(e.length==0)return true;if(e.length==1)return{required:e};var n=e.map(function(e){return{required:[e]}});return{anyOf:n}},metaSchema:{type:"array",items:{type:"string"}}};e.addKeyword("anyRequired",defFunc.definition);return e}},918:(e,n,f)=>{"use strict";var s=f(3662);e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){var n=[];for(var f in e)n.push(getSchema(f,e[f]));return{allOf:n}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:s.metaSchemaRef(e)}};e.addKeyword("deepProperties",defFunc.definition);return e};function getSchema(e,n){var f=e.split("/");var s={};var l=s;for(var v=1;v{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",inline:function(e,n,f){var s="";for(var l=0;l{"use strict";e.exports=function generate__formatLimit(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j="valid"+l;s+="var "+j+" = undefined;";if(e.opts.format===false){s+=" "+j+" = true; ";return s}var w=e.schema.format,F=e.opts.$data&&w.$data,E="";if(F){var A=e.util.getData(w.$data,v,e.dataPathArr),a="format"+l,N="compare"+l;s+=" var "+a+" = formats["+A+"] , "+N+" = "+a+" && "+a+".compare;"}else{var a=e.formats[w];if(!(a&&a.compare)){s+=" "+j+" = true; ";return s}var N="formats"+e.util.getProperty(w)+".compare"}var z=n=="formatMaximum",x="formatExclusive"+(z?"Maximum":"Minimum"),q=e.schema[x],O=e.opts.$data&&q&&q.$data,Q=z?"<":">",U="result"+l;var I=e.opts.$data&&r&&r.$data,T;if(I){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";T="schema"+l}else{T=r}if(O){var J=e.util.getData(q.$data,v,e.dataPathArr),L="exclusive"+l,M="op"+l,C="' + "+M+" + '";s+=" var schemaExcl"+l+" = "+J+"; ";J="schemaExcl"+l;s+=" if (typeof "+J+" != 'boolean' && "+J+" !== undefined) { "+j+" = false; ";var p=x;var H=H||[];H.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: '"+x+" should be boolean' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var c=s;s=H.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+c+"]); "}else{s+=" validate.errors = ["+c+"]; return false; "}}else{s+=" var err = "+c+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){E+="}";s+=" else { "}if(I){s+=" if ("+T+" === undefined) "+j+" = true; else if (typeof "+T+" != 'string') "+j+" = false; else { ";E+="}"}if(F){s+=" if (!"+N+") "+j+" = true; else { ";E+="}"}s+=" var "+U+" = "+N+"("+R+", ";if(I){s+=""+T}else{s+=""+e.util.toQuotedString(r)}s+=" ); if ("+U+" === undefined) "+j+" = false; var "+L+" = "+J+" === true; if ("+j+" === undefined) { "+j+" = "+L+" ? "+U+" "+Q+" 0 : "+U+" "+Q+"= 0; } if (!"+j+") var op"+l+" = "+L+" ? '"+Q+"' : '"+Q+"=';"}else{var L=q===true,C=Q;if(!L)C+="=";var M="'"+C+"'";if(I){s+=" if ("+T+" === undefined) "+j+" = true; else if (typeof "+T+" != 'string') "+j+" = false; else { ";E+="}"}if(F){s+=" if (!"+N+") "+j+" = true; else { ";E+="}"}s+=" var "+U+" = "+N+"("+R+", ";if(I){s+=""+T}else{s+=""+e.util.toQuotedString(r)}s+=" ); if ("+U+" === undefined) "+j+" = false; if ("+j+" === undefined) "+j+" = "+U+" "+Q;if(!L){s+="="}s+=" 0;"}s+=""+E+"if (!"+j+") { ";var p=n;var H=H||[];H.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { comparison: "+M+", limit: ";if(I){s+=""+T}else{s+=""+e.util.toQuotedString(r)}s+=" , exclusive: "+L+" } ";if(e.opts.messages!==false){s+=" , message: 'should be "+C+' "';if(I){s+="' + "+T+" + '"}else{s+=""+e.util.escapeQuotes(r)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(I){s+="validate.schema"+g}else{s+=""+e.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var c=s;s=H.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+c+"]); "}else{s+=" validate.errors = ["+c+"]; return false; "}}else{s+=" var err = "+c+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="}";return s}},7952:e=>{"use strict";e.exports=function generate_patternRequired(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="key"+l,w="idx"+l,F="patternMatched"+l,E="dataProperties"+l,A="",a=e.opts.ownProperties;s+="var "+R+" = true;";if(a){s+=" var "+E+" = undefined;"}var N=r;if(N){var z,x=-1,q=N.length-1;while(x{"use strict";e.exports=function generate_switch(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A="ifPassed"+e.level,a=w.baseId,N;s+="var "+A+";";var z=r;if(z){var x,q=-1,O=z.length-1;while(q0:e.util.schemaHasRules(x.if,e.RULES.all))){s+=" var "+j+" = errors; ";var Q=e.compositeRule;e.compositeRule=w.compositeRule=true;w.createErrors=false;w.schema=x.if;w.schemaPath=g+"["+q+"].if";w.errSchemaPath=b+"/"+q+"/if";s+=" "+e.validate(w)+" ";w.baseId=a;w.createErrors=true;e.compositeRule=w.compositeRule=Q;s+=" "+A+" = "+E+"; if ("+A+") { ";if(typeof x.then=="boolean"){if(x.then===false){var U=U||[];U.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"switch"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { caseIndex: "+q+" } ";if(e.opts.messages!==false){s+=" , message: 'should pass \"switch\" keyword validation' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var I=s;s=U.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}s+=" var "+E+" = "+x.then+"; "}else{w.schema=x.then;w.schemaPath=g+"["+q+"].then";w.errSchemaPath=b+"/"+q+"/then";s+=" "+e.validate(w)+" ";w.baseId=a}s+=" } else { errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; } } "}else{s+=" "+A+" = true; ";if(typeof x.then=="boolean"){if(x.then===false){var U=U||[];U.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"switch"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { caseIndex: "+q+" } ";if(e.opts.messages!==false){s+=" , message: 'should pass \"switch\" keyword validation' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var I=s;s=U.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}s+=" var "+E+" = "+x.then+"; "}else{w.schema=x.then;w.schemaPath=g+"["+q+"].then";w.errSchemaPath=b+"/"+q+"/then";s+=" "+e.validate(w)+" ";w.baseId=a}}N=x.continue}}s+=""+F+"var "+R+" = "+E+";";return s}},3110:e=>{"use strict";var n={};var f={timestamp:function(){return Date.now()},datetime:function(){return(new Date).toISOString()},date:function(){return(new Date).toISOString().slice(0,10)},time:function(){return(new Date).toISOString().slice(11)},random:function(){return Math.random()},randomint:function(e){var n=e&&e.max||2;return function(){return Math.floor(Math.random()*n)}},seq:function(e){var f=e&&e.name||"";n[f]=n[f]||0;return function(){return n[f]++}}};e.exports=function defFunc(e){defFunc.definition={compile:function(e,n,f){var s={};for(var l in e){var v=e[l];var r=getDefault(typeof v=="string"?v:v.func);s[l]=r.length?r(v.args):r}return f.opts.useDefaults&&!f.compositeRule?assignDefaults:noop;function assignDefaults(n){for(var l in e){if(n[l]===undefined||f.opts.useDefaults=="empty"&&(n[l]===null||n[l]===""))n[l]=s[l]()}return true}function noop(){return true}},DEFAULTS:f,metaSchema:{type:"object",additionalProperties:{type:["string","object"],additionalProperties:false,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}}};e.addKeyword("dynamicDefaults",defFunc.definition);return e;function getDefault(e){var n=f[e];if(n)return n;throw new Error('invalid "dynamicDefaults" keyword property value: '+e)}}},1458:(e,n,f)=>{"use strict";e.exports=f(2514)("Maximum")},1808:(e,n,f)=>{"use strict";e.exports=f(2514)("Minimum")},696:(e,n,f)=>{"use strict";e.exports={instanceof:f(6066),range:f(9415),regexp:f(8608),typeof:f(6408),dynamicDefaults:f(3110),allRequired:f(2600),anyRequired:f(2038),oneRequired:f(3545),prohibited:f(7582),uniqueItemProperties:f(1761),deepProperties:f(918),deepRequired:f(9436),formatMinimum:f(1808),formatMaximum:f(1458),patternRequired:f(2309),switch:f(2137),select:f(8002),transform:f(244)}},6066:e=>{"use strict";var n={Object:Object,Array:Array,Function:Function,Number:Number,String:String,Date:Date,RegExp:RegExp};e.exports=function defFunc(e){if(typeof Buffer!="undefined")n.Buffer=Buffer;if(typeof Promise!="undefined")n.Promise=Promise;defFunc.definition={compile:function(e){if(typeof e=="string"){var n=getConstructor(e);return function(e){return e instanceof n}}var f=e.map(getConstructor);return function(e){for(var n=0;n{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){if(e.length==0)return true;if(e.length==1)return{required:e};var n=e.map(function(e){return{required:[e]}});return{oneOf:n}},metaSchema:{type:"array",items:{type:"string"}}};e.addKeyword("oneRequired",defFunc.definition);return e}},2309:(e,n,f)=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",inline:f(7952),statements:true,errors:"full",metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:true}};e.addKeyword("patternRequired",defFunc.definition);return e}},7582:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"object",macro:function(e){if(e.length==0)return true;if(e.length==1)return{not:{required:e}};var n=e.map(function(e){return{required:[e]}});return{not:{anyOf:n}}},metaSchema:{type:"array",items:{type:"string"}}};e.addKeyword("prohibited",defFunc.definition);return e}},9415:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"number",macro:function(e,n){var f=e[0],s=e[1],l=n.exclusiveRange;validateRangeSchema(f,s,l);return l===true?{exclusiveMinimum:f,exclusiveMaximum:s}:{minimum:f,maximum:s}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}};e.addKeyword("range",defFunc.definition);e.addKeyword("exclusiveRange");return e;function validateRangeSchema(e,n,f){if(f!==undefined&&typeof f!="boolean")throw new Error("Invalid schema for exclusiveRange keyword, should be boolean");if(e>n||f&&e==n)throw new Error("There are no numbers in range")}}},8608:e=>{"use strict";e.exports=function defFunc(e){defFunc.definition={type:"string",inline:function(e,n,f){return getRegExp()+".test(data"+(e.dataLevel||"")+")";function getRegExp(){try{if(typeof f=="object")return new RegExp(f.pattern,f.flags);var e=f.match(/^\/(.*)\/([gimuy]*)$/);if(e)return new RegExp(e[1],e[2]);throw new Error("cannot parse string into RegExp")}catch(e){console.error("regular expression",f,"is invalid");throw e}}},metaSchema:{type:["string","object"],properties:{pattern:{type:"string"},flags:{type:"string"}},required:["pattern"],additionalProperties:false}};e.addKeyword("regexp",defFunc.definition);return e}},8002:(e,n,f)=>{"use strict";var s=f(3662);e.exports=function defFunc(e){if(!e._opts.$data){console.warn("keyword select requires $data option");return e}var n=s.metaSchemaRef(e);var f=[];defFunc.definition={validate:function v(e,n,f){if(f.selectCases===undefined)throw new Error('keyword "selectCases" is absent');var s=getCompiledSchemas(f,false);var l=s.cases[e];if(l===undefined)l=s.default;if(typeof l=="boolean")return l;var r=l(n);if(!r)v.errors=l.errors;return r},$data:true,metaSchema:{type:["string","number","boolean","null"]}};e.addKeyword("select",defFunc.definition);e.addKeyword("selectCases",{compile:function(e,n){var f=getCompiledSchemas(n);for(var s in e)f.cases[s]=compileOrBoolean(e[s]);return function(){return true}},valid:true,metaSchema:{type:"object",additionalProperties:n}});e.addKeyword("selectDefault",{compile:function(e,n){var f=getCompiledSchemas(n);f.default=compileOrBoolean(e);return function(){return true}},valid:true,metaSchema:n});return e;function getCompiledSchemas(e,n){var s;f.some(function(n){if(n.parentSchema===e){s=n;return true}});if(!s&&n!==false){s={parentSchema:e,cases:{},default:true};f.push(s)}return s}function compileOrBoolean(n){return typeof n=="boolean"?n:e.compile(n)}}},2137:(e,n,f)=>{"use strict";var s=f(3662);e.exports=function defFunc(e){if(e.RULES.keywords.switch&&e.RULES.keywords.if)return;var n=s.metaSchemaRef(e);defFunc.definition={inline:f(3073),statements:true,errors:"full",metaSchema:{type:"array",items:{required:["then"],properties:{if:n,then:{anyOf:[{type:"boolean"},n]},continue:{type:"boolean"}},additionalProperties:false,dependencies:{continue:["if"]}}}};e.addKeyword("switch",defFunc.definition);return e}},244:e=>{"use strict";e.exports=function defFunc(e){var n={trimLeft:function(e){return e.replace(/^[\s]+/,"")},trimRight:function(e){return e.replace(/[\s]+$/,"")},trim:function(e){return e.trim()},toLowerCase:function(e){return e.toLowerCase()},toUpperCase:function(e){return e.toUpperCase()},toEnumCase:function(e,n){return n.hash[makeHashTableKey(e)]||e}};defFunc.definition={type:"string",errors:false,modifying:true,valid:true,compile:function(e,f){var s;if(e.indexOf("toEnumCase")!==-1){s={hash:{}};if(!f.enum)throw new Error('Missing enum. To use `transform:["toEnumCase"]`, `enum:[...]` is required.');for(var l=f.enum.length;l--;l){var v=f.enum[l];if(typeof v!=="string")continue;var r=makeHashTableKey(v);if(s.hash[r])throw new Error('Invalid enum uniqueness. To use `transform:["toEnumCase"]`, all values must be unique when case insensitive.');s.hash[r]=v}}return function(f,l,v,r){if(!v)return;for(var g=0,b=e.length;g{"use strict";var n=["undefined","string","number","object","function","boolean","symbol"];e.exports=function defFunc(e){defFunc.definition={inline:function(e,n,f){var s="data"+(e.dataLevel||"");if(typeof f=="string")return"typeof "+s+' == "'+f+'"';f="validate.schema"+e.schemaPath+"."+n;return f+".indexOf(typeof "+s+") >= 0"},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}};e.addKeyword("typeof",defFunc.definition);return e}},1761:e=>{"use strict";var n=["number","integer","string","boolean","null"];e.exports=function defFunc(e){defFunc.definition={type:"array",compile:function(e,n,f){var s=f.util.equal;var l=getScalarKeys(e,n);return function(n){if(n.length>1){for(var f=0;f=0})}},4415:(e,n,f)=>{"use strict";var s=f(7598),l=f(2492),v=f(8424),r=f(974),g=f(3138),b=f(1067),d=f(3066),p=f(8293),R=f(6569);e.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=f(3823);var j=f(8285);Ajv.prototype.addKeyword=j.add;Ajv.prototype.getKeyword=j.get;Ajv.prototype.removeKeyword=j.remove;Ajv.prototype.validateKeyword=j.validate;var w=f(5252);Ajv.ValidationError=w.Validation;Ajv.MissingRefError=w.MissingRef;Ajv.$dataMetaSchema=p;var F="http://json-schema.org/draft-07/schema";var E=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var A=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=R.copy(e)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=b(e.format);this._cache=e.cache||new v;this._loadingSchemas={};this._compilations=[];this.RULES=d();this._getId=chooseGetId(e);e.loopRequired=e.loopRequired||Infinity;if(e.errorDataPath=="property")e._errorDataPathProperty=true;if(e.serialize===undefined)e.serialize=g;this._metaOpts=getMetaSchemaOptions(this);if(e.formats)addInitialFormats(this);if(e.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof e.meta=="object")this.addMetaSchema(e.meta);if(e.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(e,n){var f;if(typeof e=="string"){f=this.getSchema(e);if(!f)throw new Error('no schema with key or ref "'+e+'"')}else{var s=this._addSchema(e);f=s.validate||this._compile(s)}var l=f(n);if(f.$async!==true)this.errors=f.errors;return l}function compile(e,n){var f=this._addSchema(e,undefined,n);return f.validate||this._compile(f)}function addSchema(e,n,f,s){if(Array.isArray(e)){for(var v=0;v{"use strict";var n=e.exports=function Cache(){this._cache={}};n.prototype.put=function Cache_put(e,n){this._cache[e]=n};n.prototype.get=function Cache_get(e){return this._cache[e]};n.prototype.del=function Cache_del(e){delete this._cache[e]};n.prototype.clear=function Cache_clear(){this._cache={}}},3823:(e,n,f)=>{"use strict";var s=f(5252).MissingRef;e.exports=compileAsync;function compileAsync(e,n,f){var l=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof n=="function"){f=n;n=undefined}var v=loadMetaSchemaOf(e).then(function(){var f=l._addSchema(e,undefined,n);return f.validate||_compileAsync(f)});if(f){v.then(function(e){f(null,e)},f)}return v;function loadMetaSchemaOf(e){var n=e.$schema;return n&&!l.getSchema(n)?compileAsync.call(l,{$ref:n},true):Promise.resolve()}function _compileAsync(e){try{return l._compile(e)}catch(e){if(e instanceof s)return loadMissingSchema(e);throw e}function loadMissingSchema(f){var s=f.missingSchema;if(added(s))throw new Error("Schema "+s+" is loaded but "+f.missingRef+" cannot be resolved");var v=l._loadingSchemas[s];if(!v){v=l._loadingSchemas[s]=l._opts.loadSchema(s);v.then(removePromise,removePromise)}return v.then(function(e){if(!added(s)){return loadMetaSchemaOf(e).then(function(){if(!added(s))l.addSchema(e,s,undefined,n)})}}).then(function(){return _compileAsync(e)});function removePromise(){delete l._loadingSchemas[s]}function added(e){return l._refs[e]||l._schemas[e]}}}}},5252:(e,n,f)=>{"use strict";var s=f(2492);e.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(e){this.message="validation failed";this.errors=e;this.ajv=this.validation=true}MissingRefError.message=function(e,n){return"can't resolve reference "+n+" from id "+e};function MissingRefError(e,n,f){this.message=f||MissingRefError.message(e,n);this.missingRef=s.url(e,n);this.missingSchema=s.normalizeId(s.fullPath(this.missingRef))}function errorSubclass(e){e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;return e}},1067:(e,n,f)=>{"use strict";var s=f(6569);var l=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var v=[0,31,28,31,30,31,30,31,31,30,31,30,31];var r=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var g=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var d=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var p=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var R=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var j=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var w=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var F=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var E=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;e.exports=formats;function formats(e){e=e=="full"?"full":"fast";return s.copy(formats[e])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":p,url:R,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:g,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:j,"json-pointer":w,"json-pointer-uri-fragment":F,"relative-json-pointer":E};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":d,"uri-template":p,url:R,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:g,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:j,"json-pointer":w,"json-pointer-uri-fragment":F,"relative-json-pointer":E};function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function date(e){var n=e.match(l);if(!n)return false;var f=+n[1];var s=+n[2];var r=+n[3];return s>=1&&s<=12&&r>=1&&r<=(s==2&&isLeapYear(f)?29:v[s])}function time(e,n){var f=e.match(r);if(!f)return false;var s=f[1];var l=f[2];var v=f[3];var g=f[5];return(s<=23&&l<=59&&v<=59||s==23&&l==59&&v==60)&&(!n||g)}var A=/t|\s/i;function date_time(e){var n=e.split(A);return n.length==2&&date(n[0])&&time(n[1],true)}var a=/\/|:/;function uri(e){return a.test(e)&&b.test(e)}var N=/[^\\]\\Z/;function regex(e){if(N.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},7598:(e,n,f)=>{"use strict";var s=f(2492),l=f(6569),v=f(5252),r=f(3138);var g=f(6183);var b=l.ucs2length;var d=f(5559);var p=v.Validation;e.exports=compile;function compile(e,n,f,R){var j=this,w=this._opts,F=[undefined],E={},A=[],a={},N=[],z={},x=[];n=n||{schema:e,refVal:F,refs:E};var q=checkCompiling.call(this,e,n,R);var O=this._compilations[q.index];if(q.compiling)return O.callValidate=callValidate;var Q=this._formats;var U=this.RULES;try{var I=localCompile(e,n,f,R);O.validate=I;var T=O.callValidate;if(T){T.schema=I.schema;T.errors=null;T.refs=I.refs;T.refVal=I.refVal;T.root=I.root;T.$async=I.$async;if(w.sourceCode)T.source=I.source}return I}finally{endCompiling.call(this,e,n,R)}function callValidate(){var e=O.validate;var n=e.apply(this,arguments);callValidate.errors=e.errors;return n}function localCompile(e,f,r,R){var a=!f||f&&f.schema==e;if(f.schema!=n.schema)return compile.call(j,e,f,r,R);var z=e.$async===true;var q=g({isTop:true,schema:e,isRoot:a,baseId:R,root:f,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:v.MissingRef,RULES:U,validate:g,util:l,resolve:s,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:w,formats:Q,logger:j.logger,self:j});q=vars(F,refValCode)+vars(A,patternCode)+vars(N,defaultCode)+vars(x,customRuleCode)+q;if(w.processCode)q=w.processCode(q,e);var O;try{var I=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",q);O=I(j,U,Q,n,F,N,x,d,b,p);F[0]=O}catch(e){j.logger.error("Error compiling schema, function code:",q);throw e}O.schema=e;O.errors=null;O.refs=E;O.refVal=F;O.root=a?O:f;if(z)O.$async=true;if(w.sourceCode===true){O.source={code:q,patterns:A,defaults:N}}return O}function resolveRef(e,l,v){l=s.url(e,l);var r=E[l];var g,b;if(r!==undefined){g=F[r];b="refVal["+r+"]";return resolvedRef(g,b)}if(!v&&n.refs){var d=n.refs[l];if(d!==undefined){g=n.refVal[d];b=addLocalRef(l,g);return resolvedRef(g,b)}}b=addLocalRef(l);var p=s.call(j,localCompile,n,l);if(p===undefined){var R=f&&f[l];if(R){p=s.inlineRef(R,w.inlineRefs)?R:compile.call(j,R,n,f,e)}}if(p===undefined){removeLocalRef(l)}else{replaceLocalRef(l,p);return resolvedRef(p,b)}}function addLocalRef(e,n){var f=F.length;F[f]=n;E[e]=f;return"refVal"+f}function removeLocalRef(e){delete E[e]}function replaceLocalRef(e,n){var f=E[e];F[f]=n}function resolvedRef(e,n){return typeof e=="object"||typeof e=="boolean"?{code:n,schema:e,inline:true}:{code:n,$async:e&&!!e.$async}}function usePattern(e){var n=a[e];if(n===undefined){n=a[e]=A.length;A[n]=e}return"pattern"+n}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return l.toQuotedString(e);case"object":if(e===null)return"null";var n=r(e);var f=z[n];if(f===undefined){f=z[n]=N.length;N[f]=e}return"default"+f}}function useCustomRule(e,n,f,s){if(j._opts.validateSchema!==false){var l=e.definition.dependencies;if(l&&!l.every(function(e){return Object.prototype.hasOwnProperty.call(f,e)}))throw new Error("parent schema must have all required keywords: "+l.join(","));var v=e.definition.validateSchema;if(v){var r=v(n);if(!r){var g="keyword schema is invalid: "+j.errorsText(v.errors);if(j._opts.validateSchema=="log")j.logger.error(g);else throw new Error(g)}}}var b=e.definition.compile,d=e.definition.inline,p=e.definition.macro;var R;if(b){R=b.call(j,n,f,s)}else if(p){R=p.call(j,n,f,s);if(w.validateSchema!==false)j.validateSchema(R,true)}else if(d){R=d.call(j,s,e.keyword,n,f)}else{R=e.definition.validate;if(!R)return}if(R===undefined)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var F=x.length;x[F]=R;return{code:"customRule"+F,validate:R}}}function checkCompiling(e,n,f){var s=compIndex.call(this,e,n,f);if(s>=0)return{index:s,compiling:true};s=this._compilations.length;this._compilations[s]={schema:e,root:n,baseId:f};return{index:s,compiling:false}}function endCompiling(e,n,f){var s=compIndex.call(this,e,n,f);if(s>=0)this._compilations.splice(s,1)}function compIndex(e,n,f){for(var s=0;s{"use strict";var s=f(9246),l=f(5559),v=f(6569),r=f(974),g=f(4815);e.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(e,n,f){var s=this._refs[f];if(typeof s=="string"){if(this._refs[s])s=this._refs[s];else return resolve.call(this,e,n,s)}s=s||this._schemas[f];if(s instanceof r){return inlineRef(s.schema,this._opts.inlineRefs)?s.schema:s.validate||this._compile(s)}var l=resolveSchema.call(this,n,f);var v,g,b;if(l){v=l.schema;n=l.root;b=l.baseId}if(v instanceof r){g=v.validate||e.call(this,v.schema,n,undefined,b)}else if(v!==undefined){g=inlineRef(v,this._opts.inlineRefs)?v:e.call(this,v,n,undefined,b)}return g}function resolveSchema(e,n){var f=s.parse(n),l=_getFullPath(f),v=getFullPath(this._getId(e.schema));if(Object.keys(e.schema).length===0||l!==v){var g=normalizeId(l);var b=this._refs[g];if(typeof b=="string"){return resolveRecursive.call(this,e,b,f)}else if(b instanceof r){if(!b.validate)this._compile(b);e=b}else{b=this._schemas[g];if(b instanceof r){if(!b.validate)this._compile(b);if(g==normalizeId(n))return{schema:b,root:e,baseId:v};e=b}else{return}}if(!e.schema)return;v=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,f,v,e.schema,e)}function resolveRecursive(e,n,f){var s=resolveSchema.call(this,e,n);if(s){var l=s.schema;var v=s.baseId;e=s.root;var r=this._getId(l);if(r)v=resolveUrl(v,r);return getJsonPointer.call(this,f,v,l,e)}}var b=v.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,n,f,s){e.fragment=e.fragment||"";if(e.fragment.slice(0,1)!="/")return;var l=e.fragment.split("/");for(var r=1;r{"use strict";var s=f(2599),l=f(6569).toHash;e.exports=function rules(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var n=["type","$comment"];var f=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var v=["number","integer","string","array","object","boolean","null"];e.all=l(n);e.types=l(v);e.forEach(function(f){f.rules=f.rules.map(function(f){var l;if(typeof f=="object"){var v=Object.keys(f)[0];l=f[v];f=v;l.forEach(function(f){n.push(f);e.all[f]=true})}n.push(f);var r=e.all[f]={keyword:f,code:s[f],implements:l};return r});e.all.$comment={keyword:"$comment",code:s.$comment};if(f.type)e.types[f.type]=f});e.keywords=l(n.concat(f));e.custom={};return e}},974:(e,n,f)=>{"use strict";var s=f(6569);e.exports=SchemaObject;function SchemaObject(e){s.copy(e,this)}},1251:e=>{"use strict";e.exports=function ucs2length(e){var n=0,f=e.length,s=0,l;while(s=55296&&l<=56319&&s{"use strict";e.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:f(5559),ucs2length:f(1251),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(e,n){n=n||{};for(var f in e)n[f]=e[f];return n}function checkDataType(e,n,f,s){var l=s?" !== ":" === ",v=s?" || ":" && ",r=s?"!":"",g=s?"":"!";switch(e){case"null":return n+l+"null";case"array":return r+"Array.isArray("+n+")";case"object":return"("+r+n+v+"typeof "+n+l+'"object"'+v+g+"Array.isArray("+n+"))";case"integer":return"(typeof "+n+l+'"number"'+v+g+"("+n+" % 1)"+v+n+l+n+(f?v+r+"isFinite("+n+")":"")+")";case"number":return"(typeof "+n+l+'"'+e+'"'+(f?v+r+"isFinite("+n+")":"")+")";default:return"typeof "+n+l+'"'+e+'"'}}function checkDataTypes(e,n,f){switch(e.length){case 1:return checkDataType(e[0],n,f,true);default:var s="";var l=toHash(e);if(l.array&&l.object){s=l.null?"(":"(!"+n+" || ";s+="typeof "+n+' !== "object")';delete l.null;delete l.array;delete l.object}if(l.number)delete l.integer;for(var v in l)s+=(s?" && ":"")+checkDataType(v,n,f,true);return s}}var s=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(e,n){if(Array.isArray(n)){var f=[];for(var l=0;l=n)throw new Error("Cannot access property/index "+s+" levels up, current level is "+n);return f[n-s]}if(s>n)throw new Error("Cannot access data "+s+" levels up, current level is "+n);v="data"+(n-s||"");if(!l)return v}var d=v;var p=l.split("/");for(var R=0;R{"use strict";var n=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,f){for(var s=0;s{"use strict";var s=f(6959);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:s.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:s.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},1954:e=>{"use strict";e.exports=function generate__limit(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}var F=n=="maximum",E=F?"exclusiveMaximum":"exclusiveMinimum",A=e.schema[E],a=e.opts.$data&&A&&A.$data,N=F?"<":">",z=F?">":"<",p=undefined;if(!(j||typeof r=="number"||r===undefined)){throw new Error(n+" must be number")}if(!(a||A===undefined||typeof A=="number"||typeof A=="boolean")){throw new Error(E+" must be number or boolean")}if(a){var x=e.util.getData(A.$data,v,e.dataPathArr),q="exclusive"+l,O="exclType"+l,Q="exclIsNumber"+l,U="op"+l,I="' + "+U+" + '";s+=" var schemaExcl"+l+" = "+x+"; ";x="schemaExcl"+l;s+=" var "+q+"; var "+O+" = typeof "+x+"; if ("+O+" != 'boolean' && "+O+" != 'undefined' && "+O+" != 'number') { ";var p=E;var T=T||[];T.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: '"+E+" should be boolean' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var J=s;s=T.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+J+"]); "}else{s+=" validate.errors = ["+J+"]; return false; "}}else{s+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" "+O+" == 'number' ? ( ("+q+" = "+w+" === undefined || "+x+" "+N+"= "+w+") ? "+R+" "+z+"= "+x+" : "+R+" "+z+" "+w+" ) : ( ("+q+" = "+x+" === true) ? "+R+" "+z+"= "+w+" : "+R+" "+z+" "+w+" ) || "+R+" !== "+R+") { var op"+l+" = "+q+" ? '"+N+"' : '"+N+"='; ";if(r===undefined){p=E;b=e.errSchemaPath+"/"+E;w=x;j=a}}else{var Q=typeof A=="number",I=N;if(Q&&j){var U="'"+I+"'";s+=" if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" ( "+w+" === undefined || "+A+" "+N+"= "+w+" ? "+R+" "+z+"= "+A+" : "+R+" "+z+" "+w+" ) || "+R+" !== "+R+") { "}else{if(Q&&r===undefined){q=true;p=E;b=e.errSchemaPath+"/"+E;w=A;z+="="}else{if(Q)w=Math[F?"min":"max"](A,r);if(A===(Q?w:true)){q=true;p=E;b=e.errSchemaPath+"/"+E;z+="="}else{q=false;I+="="}}var U="'"+I+"'";s+=" if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" "+R+" "+z+" "+w+" || "+R+" !== "+R+") { "}}p=p||n;var T=T||[];T.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { comparison: "+U+", limit: "+w+", exclusive: "+q+" } ";if(e.opts.messages!==false){s+=" , message: 'should be "+I+" ";if(j){s+="' + "+w}else{s+=""+w+"'"}}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var J=s;s=T.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+J+"]); "}else{s+=" validate.errors = ["+J+"]; return false; "}}else{s+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){s+=" else { "}return s}},7523:e=>{"use strict";e.exports=function generate__limitItems(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!(j||typeof r=="number")){throw new Error(n+" must be number")}var F=n=="maxItems"?">":"<";s+="if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" "+R+".length "+F+" "+w+") { ";var p=n;var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+w+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have ";if(n=="maxItems"){s+="more"}else{s+="fewer"}s+=" than ";if(j){s+="' + "+w+" + '"}else{s+=""+r}s+=" items' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},2931:e=>{"use strict";e.exports=function generate__limitLength(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!(j||typeof r=="number")){throw new Error(n+" must be number")}var F=n=="maxLength"?">":"<";s+="if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}if(e.opts.unicode===false){s+=" "+R+".length "}else{s+=" ucs2length("+R+") "}s+=" "+F+" "+w+") { ";var p=n;var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+w+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT be ";if(n=="maxLength"){s+="longer"}else{s+="shorter"}s+=" than ";if(j){s+="' + "+w+" + '"}else{s+=""+r}s+=" characters' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},8691:e=>{"use strict";e.exports=function generate__limitProperties(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!(j||typeof r=="number")){throw new Error(n+" must be number")}var F=n=="maxProperties"?">":"<";s+="if ( ";if(j){s+=" ("+w+" !== undefined && typeof "+w+" != 'number') || "}s+=" Object.keys("+R+").length "+F+" "+w+") { ";var p=n;var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+w+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have ";if(n=="maxProperties"){s+="more"}else{s+="fewer"}s+=" than ";if(j){s+="' + "+w+" + '"}else{s+=""+r}s+=" properties' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},3653:e=>{"use strict";e.exports=function generate_allOf(e,n,f){var s=" ";var l=e.schema[n];var v=e.schemaPath+e.util.getProperty(n);var r=e.errSchemaPath+"/"+n;var g=!e.opts.allErrors;var b=e.util.copy(e);var d="";b.level++;var p="valid"+b.level;var R=b.baseId,j=true;var w=l;if(w){var F,E=-1,A=w.length-1;while(E0||F===false:e.util.schemaHasRules(F,e.RULES.all)){j=false;b.schema=F;b.schemaPath=v+"["+E+"]";b.errSchemaPath=r+"/"+E;s+=" "+e.validate(b)+" ";b.baseId=R;if(g){s+=" if ("+p+") { ";d+="}"}}}}if(g){if(j){s+=" if (true) { "}else{s+=" "+d.slice(0,-1)+" "}}return s}},1554:e=>{"use strict";e.exports=function generate_anyOf(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A=r.every(function(n){return e.opts.strictKeywords?typeof n=="object"&&Object.keys(n).length>0||n===false:e.util.schemaHasRules(n,e.RULES.all)});if(A){var a=w.baseId;s+=" var "+j+" = errors; var "+R+" = false; ";var N=e.compositeRule;e.compositeRule=w.compositeRule=true;var z=r;if(z){var x,q=-1,O=z.length-1;while(q{"use strict";e.exports=function generate_comment(e,n,f){var s=" ";var l=e.schema[n];var v=e.errSchemaPath+"/"+n;var r=!e.opts.allErrors;var g=e.util.toQuotedString(l);if(e.opts.$comment===true){s+=" console.log("+g+");"}else if(typeof e.opts.$comment=="function"){s+=" self._opts.$comment("+g+", "+e.util.toQuotedString(v)+", validate.root.schema);"}return s}},5753:e=>{"use strict";e.exports=function generate_const(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if(!j){s+=" var schema"+l+" = validate.schema"+g+";"}s+="var "+R+" = equal("+p+", schema"+l+"); if (!"+R+") { ";var F=F||[];F.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { allowedValue: schema"+l+" } ";if(e.opts.messages!==false){s+=" , message: 'should be equal to constant' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var E=s;s=F.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+E+"]); "}else{s+=" validate.errors = ["+E+"]; return false; "}}else{s+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(d){s+=" else { "}return s}},4535:e=>{"use strict";e.exports=function generate_contains(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A="i"+l,a=w.dataLevel=e.dataLevel+1,N="data"+a,z=e.baseId,x=e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all);s+="var "+j+" = errors;var "+R+";";if(x){var q=e.compositeRule;e.compositeRule=w.compositeRule=true;w.schema=r;w.schemaPath=g;w.errSchemaPath=b;s+=" var "+E+" = false; for (var "+A+" = 0; "+A+" < "+p+".length; "+A+"++) { ";w.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,true);var O=p+"["+A+"]";w.dataPathArr[a]=A;var Q=e.validate(w);w.baseId=z;if(e.util.varOccurences(Q,N)<2){s+=" "+e.util.varReplace(Q,N,O)+" "}else{s+=" var "+N+" = "+O+"; "+Q+" "}s+=" if ("+E+") break; } ";e.compositeRule=w.compositeRule=q;s+=" "+F+" if (!"+E+") {"}else{s+=" if ("+p+".length == 0) {"}var U=U||[];U.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should contain a valid item' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var I=s;s=U.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { ";if(x){s+=" errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; } "}if(e.opts.allErrors){s+=" } "}return s}},5523:e=>{"use strict";e.exports=function generate_custom(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p;var R="data"+(v||"");var j="valid"+l;var w="errs__"+l;var F=e.opts.$data&&r&&r.$data,E;if(F){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";E="schema"+l}else{E=r}var A=this,a="definition"+l,N=A.definition,z="";var x,q,O,Q,U;if(F&&N.$data){U="keywordValidate"+l;var I=N.validateSchema;s+=" var "+a+" = RULES.custom['"+n+"'].definition; var "+U+" = "+a+".validate;"}else{Q=e.useCustomRule(A,r,e.schema,e);if(!Q)return;E="validate.schema"+g;U=Q.code;x=N.compile;q=N.inline;O=N.macro}var T=U+".errors",J="i"+l,L="ruleErr"+l,M=N.async;if(M&&!e.async)throw new Error("async keyword in sync schema");if(!(q||O)){s+=""+T+" = null;"}s+="var "+w+" = errors;var "+j+";";if(F&&N.$data){z+="}";s+=" if ("+E+" === undefined) { "+j+" = true; } else { ";if(I){z+="}";s+=" "+j+" = "+a+".validateSchema("+E+"); if ("+j+") { "}}if(q){if(N.statements){s+=" "+Q.validate+" "}else{s+=" "+j+" = "+Q.validate+"; "}}else if(O){var C=e.util.copy(e);var z="";C.level++;var H="valid"+C.level;C.schema=Q.validate;C.schemaPath="";var c=e.compositeRule;e.compositeRule=C.compositeRule=true;var G=e.validate(C).replace(/validate\.schema/g,U);e.compositeRule=C.compositeRule=c;s+=" "+G}else{var Y=Y||[];Y.push(s);s="";s+=" "+U+".call( ";if(e.opts.passContext){s+="this"}else{s+="self"}if(x||N.schema===false){s+=" , "+R+" "}else{s+=" , "+E+" , "+R+" , validate.schema"+e.schemaPath+" "}s+=" , (dataPath || '')";if(e.errorPath!='""'){s+=" + "+e.errorPath}var W=v?"data"+(v-1||""):"parentData",X=v?e.dataPathArr[v]:"parentDataProperty";s+=" , "+W+" , "+X+" , rootData ) ";var B=s;s=Y.pop();if(N.errors===false){s+=" "+j+" = ";if(M){s+="await "}s+=""+B+"; "}else{if(M){T="customErrors"+l;s+=" var "+T+" = null; try { "+j+" = await "+B+"; } catch (e) { "+j+" = false; if (e instanceof ValidationError) "+T+" = e.errors; else throw e; } "}else{s+=" "+T+" = null; "+j+" = "+B+"; "}}}if(N.modifying){s+=" if ("+W+") "+R+" = "+W+"["+X+"];"}s+=""+z;if(N.valid){if(d){s+=" if (true) { "}}else{s+=" if ( ";if(N.valid===undefined){s+=" !";if(O){s+=""+H}else{s+=""+j}}else{s+=" "+!N.valid+" "}s+=") { ";p=A.keyword;var Y=Y||[];Y.push(s);s="";var Y=Y||[];Y.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(p||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { keyword: '"+A.keyword+"' } ";if(e.opts.messages!==false){s+=" , message: 'should pass \""+A.keyword+"\" keyword validation' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+R+" "}s+=" } "}else{s+=" {} "}var Z=s;s=Y.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+Z+"]); "}else{s+=" validate.errors = ["+Z+"]; return false; "}}else{s+=" var err = "+Z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var y=s;s=Y.pop();if(q){if(N.errors){if(N.errors!="full"){s+=" for (var "+J+"="+w+"; "+J+"{"use strict";e.exports=function generate_dependencies(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);var w="";j.level++;var F="valid"+j.level;var E={},A={},a=e.opts.ownProperties;for(q in r){if(q=="__proto__")continue;var N=r[q];var z=Array.isArray(N)?A:E;z[q]=N}s+="var "+R+" = errors;";var x=e.errorPath;s+="var missing"+l+";";for(var q in A){z=A[q];if(z.length){s+=" if ( "+p+e.util.getProperty(q)+" !== undefined ";if(a){s+=" && Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(q)+"') "}if(d){s+=" && ( ";var O=z;if(O){var Q,U=-1,I=O.length-1;while(U0||N===false:e.util.schemaHasRules(N,e.RULES.all)){s+=" "+F+" = true; if ( "+p+e.util.getProperty(q)+" !== undefined ";if(a){s+=" && Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(q)+"') "}s+=") { ";j.schema=N;j.schemaPath=g+e.util.getProperty(q);j.errSchemaPath=b+"/"+e.util.escapeFragment(q);s+=" "+e.validate(j)+" ";j.baseId=W;s+=" } ";if(d){s+=" if ("+F+") { ";w+="}"}}}if(d){s+=" "+w+" if ("+R+" == errors) {"}return s}},1216:e=>{"use strict";e.exports=function generate_enum(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}var F="i"+l,E="schema"+l;if(!j){s+=" var "+E+" = validate.schema"+g+";"}s+="var "+R+";";if(j){s+=" if (schema"+l+" === undefined) "+R+" = true; else if (!Array.isArray(schema"+l+")) "+R+" = false; else {"}s+=""+R+" = false;for (var "+F+"=0; "+F+"<"+E+".length; "+F+"++) if (equal("+p+", "+E+"["+F+"])) { "+R+" = true; break; }";if(j){s+=" } "}s+=" if (!"+R+") { ";var A=A||[];A.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { allowedValues: schema"+l+" } ";if(e.opts.messages!==false){s+=" , message: 'should be equal to one of the allowed values' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var a=s;s=A.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+a+"]); "}else{s+=" validate.errors = ["+a+"]; return false; "}}else{s+=" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(d){s+=" else { "}return s}},388:e=>{"use strict";e.exports=function generate_format(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");if(e.opts.format===false){if(d){s+=" if (true) { "}return s}var R=e.opts.$data&&r&&r.$data,j;if(R){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";j="schema"+l}else{j=r}var w=e.opts.unknownFormats,F=Array.isArray(w);if(R){var E="format"+l,A="isObject"+l,a="formatType"+l;s+=" var "+E+" = formats["+j+"]; var "+A+" = typeof "+E+" == 'object' && !("+E+" instanceof RegExp) && "+E+".validate; var "+a+" = "+A+" && "+E+".type || 'string'; if ("+A+") { ";if(e.async){s+=" var async"+l+" = "+E+".async; "}s+=" "+E+" = "+E+".validate; } if ( ";if(R){s+=" ("+j+" !== undefined && typeof "+j+" != 'string') || "}s+=" (";if(w!="ignore"){s+=" ("+j+" && !"+E+" ";if(F){s+=" && self._opts.unknownFormats.indexOf("+j+") == -1 "}s+=") || "}s+=" ("+E+" && "+a+" == '"+f+"' && !(typeof "+E+" == 'function' ? ";if(e.async){s+=" (async"+l+" ? await "+E+"("+p+") : "+E+"("+p+")) "}else{s+=" "+E+"("+p+") "}s+=" : "+E+".test("+p+"))))) {"}else{var E=e.formats[r];if(!E){if(w=="ignore"){e.logger.warn('unknown format "'+r+'" ignored in schema at path "'+e.errSchemaPath+'"');if(d){s+=" if (true) { "}return s}else if(F&&w.indexOf(r)>=0){if(d){s+=" if (true) { "}return s}else{throw new Error('unknown format "'+r+'" is used in schema at path "'+e.errSchemaPath+'"')}}var A=typeof E=="object"&&!(E instanceof RegExp)&&E.validate;var a=A&&E.type||"string";if(A){var N=E.async===true;E=E.validate}if(a!=f){if(d){s+=" if (true) { "}return s}if(N){if(!e.async)throw new Error("async format in sync schema");var z="formats"+e.util.getProperty(r)+".validate";s+=" if (!(await "+z+"("+p+"))) { "}else{s+=" if (! ";var z="formats"+e.util.getProperty(r);if(A)z+=".validate";if(typeof E=="function"){s+=" "+z+"("+p+") "}else{s+=" "+z+".test("+p+") "}s+=") { "}}var x=x||[];x.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { format: ";if(R){s+=""+j}else{s+=""+e.util.toQuotedString(r)}s+=" } ";if(e.opts.messages!==false){s+=" , message: 'should match format \"";if(R){s+="' + "+j+" + '"}else{s+=""+e.util.escapeQuotes(r)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(R){s+="validate.schema"+g}else{s+=""+e.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var q=s;s=x.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+q+"]); "}else{s+=" validate.errors = ["+q+"]; return false; "}}else{s+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){s+=" else { "}return s}},7405:e=>{"use strict";e.exports=function generate_if(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);w.level++;var F="valid"+w.level;var E=e.schema["then"],A=e.schema["else"],a=E!==undefined&&(e.opts.strictKeywords?typeof E=="object"&&Object.keys(E).length>0||E===false:e.util.schemaHasRules(E,e.RULES.all)),N=A!==undefined&&(e.opts.strictKeywords?typeof A=="object"&&Object.keys(A).length>0||A===false:e.util.schemaHasRules(A,e.RULES.all)),z=w.baseId;if(a||N){var x;w.createErrors=false;w.schema=r;w.schemaPath=g;w.errSchemaPath=b;s+=" var "+j+" = errors; var "+R+" = true; ";var q=e.compositeRule;e.compositeRule=w.compositeRule=true;s+=" "+e.validate(w)+" ";w.baseId=z;w.createErrors=true;s+=" errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; } ";e.compositeRule=w.compositeRule=q;if(a){s+=" if ("+F+") { ";w.schema=e.schema["then"];w.schemaPath=e.schemaPath+".then";w.errSchemaPath=e.errSchemaPath+"/then";s+=" "+e.validate(w)+" ";w.baseId=z;s+=" "+R+" = "+F+"; ";if(a&&N){x="ifClause"+l;s+=" var "+x+" = 'then'; "}else{x="'then'"}s+=" } ";if(N){s+=" else { "}}else{s+=" if (!"+F+") { "}if(N){w.schema=e.schema["else"];w.schemaPath=e.schemaPath+".else";w.errSchemaPath=e.errSchemaPath+"/else";s+=" "+e.validate(w)+" ";w.baseId=z;s+=" "+R+" = "+F+"; ";if(a&&N){x="ifClause"+l;s+=" var "+x+" = 'else'; "}else{x="'else'"}s+=" } "}s+=" if (!"+R+") { var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { failingKeyword: "+x+" } ";if(e.opts.messages!==false){s+=" , message: 'should match \"' + "+x+" + '\" schema' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+=" } ";if(d){s+=" else { "}}else{if(d){s+=" if (true) { "}}return s}},2599:(e,n,f)=>{"use strict";e.exports={$ref:f(759),allOf:f(3653),anyOf:f(1554),$comment:f(7146),const:f(5753),contains:f(4535),dependencies:f(4778),enum:f(1216),format:f(388),if:f(7405),items:f(5498),maximum:f(1954),minimum:f(1954),maxItems:f(7523),minItems:f(7523),maxLength:f(2931),minLength:f(2931),maxProperties:f(8691),minProperties:f(8691),multipleOf:f(8842),not:f(1619),oneOf:f(2739),pattern:f(251),properties:f(5986),propertyNames:f(632),required:f(9888),uniqueItems:f(7577),validate:f(6183)}},5498:e=>{"use strict";e.exports=function generate_items(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A="i"+l,a=w.dataLevel=e.dataLevel+1,N="data"+a,z=e.baseId;s+="var "+j+" = errors;var "+R+";";if(Array.isArray(r)){var x=e.schema.additionalItems;if(x===false){s+=" "+R+" = "+p+".length <= "+r.length+"; ";var q=b;b=e.errSchemaPath+"/additionalItems";s+=" if (!"+R+") { ";var O=O||[];O.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { limit: "+r.length+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have more than "+r.length+" items' "}if(e.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var Q=s;s=O.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+Q+"]); "}else{s+=" validate.errors = ["+Q+"]; return false; "}}else{s+=" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";b=q;if(d){F+="}";s+=" else { "}}var U=r;if(U){var I,T=-1,J=U.length-1;while(T0||I===false:e.util.schemaHasRules(I,e.RULES.all)){s+=" "+E+" = true; if ("+p+".length > "+T+") { ";var L=p+"["+T+"]";w.schema=I;w.schemaPath=g+"["+T+"]";w.errSchemaPath=b+"/"+T;w.errorPath=e.util.getPathExpr(e.errorPath,T,e.opts.jsonPointers,true);w.dataPathArr[a]=T;var M=e.validate(w);w.baseId=z;if(e.util.varOccurences(M,N)<2){s+=" "+e.util.varReplace(M,N,L)+" "}else{s+=" var "+N+" = "+L+"; "+M+" "}s+=" } ";if(d){s+=" if ("+E+") { ";F+="}"}}}}if(typeof x=="object"&&(e.opts.strictKeywords?typeof x=="object"&&Object.keys(x).length>0||x===false:e.util.schemaHasRules(x,e.RULES.all))){w.schema=x;w.schemaPath=e.schemaPath+".additionalItems";w.errSchemaPath=e.errSchemaPath+"/additionalItems";s+=" "+E+" = true; if ("+p+".length > "+r.length+") { for (var "+A+" = "+r.length+"; "+A+" < "+p+".length; "+A+"++) { ";w.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,true);var L=p+"["+A+"]";w.dataPathArr[a]=A;var M=e.validate(w);w.baseId=z;if(e.util.varOccurences(M,N)<2){s+=" "+e.util.varReplace(M,N,L)+" "}else{s+=" var "+N+" = "+L+"; "+M+" "}if(d){s+=" if (!"+E+") break; "}s+=" } } ";if(d){s+=" if ("+E+") { ";F+="}"}}}else if(e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)){w.schema=r;w.schemaPath=g;w.errSchemaPath=b;s+=" for (var "+A+" = "+0+"; "+A+" < "+p+".length; "+A+"++) { ";w.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,true);var L=p+"["+A+"]";w.dataPathArr[a]=A;var M=e.validate(w);w.baseId=z;if(e.util.varOccurences(M,N)<2){s+=" "+e.util.varReplace(M,N,L)+" "}else{s+=" var "+N+" = "+L+"; "+M+" "}if(d){s+=" if (!"+E+") break; "}s+=" }"}if(d){s+=" "+F+" if ("+j+" == errors) {"}return s}},8842:e=>{"use strict";e.exports=function generate_multipleOf(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R=e.opts.$data&&r&&r.$data,j;if(R){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";j="schema"+l}else{j=r}if(!(R||typeof r=="number")){throw new Error(n+" must be number")}s+="var division"+l+";if (";if(R){s+=" "+j+" !== undefined && ( typeof "+j+" != 'number' || "}s+=" (division"+l+" = "+p+" / "+j+", ";if(e.opts.multipleOfPrecision){s+=" Math.abs(Math.round(division"+l+") - division"+l+") > 1e-"+e.opts.multipleOfPrecision+" "}else{s+=" division"+l+" !== parseInt(division"+l+") "}s+=" ) ";if(R){s+=" ) "}s+=" ) { ";var w=w||[];w.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { multipleOf: "+j+" } ";if(e.opts.messages!==false){s+=" , message: 'should be multiple of ";if(R){s+="' + "+j}else{s+=""+j+"'"}}if(e.opts.verbose){s+=" , schema: ";if(R){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var F=s;s=w.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+F+"]); "}else{s+=" validate.errors = ["+F+"]; return false; "}}else{s+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},1619:e=>{"use strict";e.exports=function generate_not(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);j.level++;var w="valid"+j.level;if(e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)){j.schema=r;j.schemaPath=g;j.errSchemaPath=b;s+=" var "+R+" = errors; ";var F=e.compositeRule;e.compositeRule=j.compositeRule=true;j.createErrors=false;var E;if(j.opts.allErrors){E=j.opts.allErrors;j.opts.allErrors=false}s+=" "+e.validate(j)+" ";j.createErrors=true;if(E)j.opts.allErrors=E;e.compositeRule=j.compositeRule=F;s+=" if ("+w+") { ";var A=A||[];A.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var a=s;s=A.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+a+"]); "}else{s+=" validate.errors = ["+a+"]; return false; "}}else{s+=" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { errors = "+R+"; if (vErrors !== null) { if ("+R+") vErrors.length = "+R+"; else vErrors = null; } ";if(e.opts.allErrors){s+=" } "}}else{s+=" var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(d){s+=" if (false) { "}}return s}},2739:e=>{"use strict";e.exports=function generate_oneOf(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j="errs__"+l;var w=e.util.copy(e);var F="";w.level++;var E="valid"+w.level;var A=w.baseId,a="prevValid"+l,N="passingSchemas"+l;s+="var "+j+" = errors , "+a+" = false , "+R+" = false , "+N+" = null; ";var z=e.compositeRule;e.compositeRule=w.compositeRule=true;var x=r;if(x){var q,O=-1,Q=x.length-1;while(O0||q===false:e.util.schemaHasRules(q,e.RULES.all)){w.schema=q;w.schemaPath=g+"["+O+"]";w.errSchemaPath=b+"/"+O;s+=" "+e.validate(w)+" ";w.baseId=A}else{s+=" var "+E+" = true; "}if(O){s+=" if ("+E+" && "+a+") { "+R+" = false; "+N+" = ["+N+", "+O+"]; } else { ";F+="}"}s+=" if ("+E+") { "+R+" = "+a+" = true; "+N+" = "+O+"; }"}}e.compositeRule=w.compositeRule=z;s+=""+F+"if (!"+R+") { var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { passingSchemas: "+N+" } ";if(e.opts.messages!==false){s+=" , message: 'should match exactly one schema in oneOf' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+="} else { errors = "+j+"; if (vErrors !== null) { if ("+j+") vErrors.length = "+j+"; else vErrors = null; }";if(e.opts.allErrors){s+=" } "}return s}},251:e=>{"use strict";e.exports=function generate_pattern(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R=e.opts.$data&&r&&r.$data,j;if(R){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";j="schema"+l}else{j=r}var w=R?"(new RegExp("+j+"))":e.usePattern(r);s+="if ( ";if(R){s+=" ("+j+" !== undefined && typeof "+j+" != 'string') || "}s+=" !"+w+".test("+p+") ) { ";var F=F||[];F.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { pattern: ";if(R){s+=""+j}else{s+=""+e.util.toQuotedString(r)}s+=" } ";if(e.opts.messages!==false){s+=" , message: 'should match pattern \"";if(R){s+="' + "+j+" + '"}else{s+=""+e.util.escapeQuotes(r)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(R){s+="validate.schema"+g}else{s+=""+e.util.toQuotedString(r)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var E=s;s=F.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+E+"]); "}else{s+=" validate.errors = ["+E+"]; return false; "}}else{s+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(d){s+=" else { "}return s}},5986:e=>{"use strict";e.exports=function generate_properties(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);var w="";j.level++;var F="valid"+j.level;var E="key"+l,A="idx"+l,a=j.dataLevel=e.dataLevel+1,N="data"+a,z="dataProperties"+l;var x=Object.keys(r||{}).filter(notProto),q=e.schema.patternProperties||{},O=Object.keys(q).filter(notProto),Q=e.schema.additionalProperties,U=x.length||O.length,I=Q===false,T=typeof Q=="object"&&Object.keys(Q).length,J=e.opts.removeAdditional,L=I||T||J,M=e.opts.ownProperties,C=e.baseId;var H=e.schema.required;if(H&&!(e.opts.$data&&H.$data)&&H.length8){s+=" || validate.schema"+g+".hasOwnProperty("+E+") "}else{var G=x;if(G){var Y,W=-1,X=G.length-1;while(W0||t===false:e.util.schemaHasRules(t,e.RULES.all)){var ee=e.util.getProperty(Y),P=p+ee,ne=_&&t.default!==undefined;j.schema=t;j.schemaPath=g+ee;j.errSchemaPath=b+"/"+e.util.escapeFragment(Y);j.errorPath=e.util.getPath(e.errorPath,Y,e.opts.jsonPointers);j.dataPathArr[a]=e.util.toQuotedString(Y);var i=e.validate(j);j.baseId=C;if(e.util.varOccurences(i,N)<2){i=e.util.varReplace(i,N,P);var fe=P}else{var fe=N;s+=" var "+N+" = "+P+"; "}if(ne){s+=" "+i+" "}else{if(c&&c[Y]){s+=" if ( "+fe+" === undefined ";if(M){s+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(Y)+"') "}s+=") { "+F+" = false; ";var K=e.errorPath,V=b,se=e.util.escapeQuotes(Y);if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPath(K,Y,e.opts.jsonPointers)}b=e.errSchemaPath+"/required";var k=k||[];k.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { missingProperty: '"+se+"' } ";if(e.opts.messages!==false){s+=" , message: '";if(e.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+se+"\\'"}s+="' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var h=s;s=k.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+h+"]); "}else{s+=" validate.errors = ["+h+"]; return false; "}}else{s+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}b=V;e.errorPath=K;s+=" } else { "}else{if(d){s+=" if ( "+fe+" === undefined ";if(M){s+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(Y)+"') "}s+=") { "+F+" = true; } else { "}else{s+=" if ("+fe+" !== undefined ";if(M){s+=" && Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(Y)+"') "}s+=" ) { "}}s+=" "+i+" } "}}if(d){s+=" if ("+F+") { ";w+="}"}}}}if(O.length){var le=O;if(le){var Z,ve=-1,re=le.length-1;while(ve0||t===false:e.util.schemaHasRules(t,e.RULES.all)){j.schema=t;j.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(Z);j.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(Z);if(M){s+=" "+z+" = "+z+" || Object.keys("+p+"); for (var "+A+"=0; "+A+"<"+z+".length; "+A+"++) { var "+E+" = "+z+"["+A+"]; "}else{s+=" for (var "+E+" in "+p+") { "}s+=" if ("+e.usePattern(Z)+".test("+E+")) { ";j.errorPath=e.util.getPathExpr(e.errorPath,E,e.opts.jsonPointers);var P=p+"["+E+"]";j.dataPathArr[a]=E;var i=e.validate(j);j.baseId=C;if(e.util.varOccurences(i,N)<2){s+=" "+e.util.varReplace(i,N,P)+" "}else{s+=" var "+N+" = "+P+"; "+i+" "}if(d){s+=" if (!"+F+") break; "}s+=" } ";if(d){s+=" else "+F+" = true; "}s+=" } ";if(d){s+=" if ("+F+") { ";w+="}"}}}}}if(d){s+=" "+w+" if ("+R+" == errors) {"}return s}},632:e=>{"use strict";e.exports=function generate_propertyNames(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="errs__"+l;var j=e.util.copy(e);var w="";j.level++;var F="valid"+j.level;s+="var "+R+" = errors;";if(e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)){j.schema=r;j.schemaPath=g;j.errSchemaPath=b;var E="key"+l,A="idx"+l,a="i"+l,N="' + "+E+" + '",z=j.dataLevel=e.dataLevel+1,x="data"+z,q="dataProperties"+l,O=e.opts.ownProperties,Q=e.baseId;if(O){s+=" var "+q+" = undefined; "}if(O){s+=" "+q+" = "+q+" || Object.keys("+p+"); for (var "+A+"=0; "+A+"<"+q+".length; "+A+"++) { var "+E+" = "+q+"["+A+"]; "}else{s+=" for (var "+E+" in "+p+") { "}s+=" var startErrs"+l+" = errors; ";var U=E;var I=e.compositeRule;e.compositeRule=j.compositeRule=true;var T=e.validate(j);j.baseId=Q;if(e.util.varOccurences(T,x)<2){s+=" "+e.util.varReplace(T,x,U)+" "}else{s+=" var "+x+" = "+U+"; "+T+" "}e.compositeRule=j.compositeRule=I;s+=" if (!"+F+") { for (var "+a+"=startErrs"+l+"; "+a+"{"use strict";e.exports=function generate_ref(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.errSchemaPath+"/"+n;var b=!e.opts.allErrors;var d="data"+(v||"");var p="valid"+l;var R,j;if(r=="#"||r=="#/"){if(e.isRoot){R=e.async;j="validate"}else{R=e.root.schema.$async===true;j="root.refVal[0]"}}else{var w=e.resolveRef(e.baseId,r,e.isRoot);if(w===undefined){var F=e.MissingRefError.message(e.baseId,r);if(e.opts.missingRefs=="fail"){e.logger.error(F);var E=E||[];E.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"$ref"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: { ref: '"+e.util.escapeQuotes(r)+"' } ";if(e.opts.messages!==false){s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(r)+"' "}if(e.opts.verbose){s+=" , schema: "+e.util.toQuotedString(r)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var A=s;s=E.pop();if(!e.compositeRule&&b){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}if(b){s+=" if (false) { "}}else if(e.opts.missingRefs=="ignore"){e.logger.warn(F);if(b){s+=" if (true) { "}}else{throw new e.MissingRefError(e.baseId,r,F)}}else if(w.inline){var a=e.util.copy(e);a.level++;var N="valid"+a.level;a.schema=w.schema;a.schemaPath="";a.errSchemaPath=r;var z=e.validate(a).replace(/validate\.schema/g,w.code);s+=" "+z+" ";if(b){s+=" if ("+N+") { "}}else{R=w.$async===true||e.async&&w.$async!==false;j=w.code}}if(j){var E=E||[];E.push(s);s="";if(e.opts.passContext){s+=" "+j+".call(this, "}else{s+=" "+j+"( "}s+=" "+d+", (dataPath || '')";if(e.errorPath!='""'){s+=" + "+e.errorPath}var x=v?"data"+(v-1||""):"parentData",q=v?e.dataPathArr[v]:"parentDataProperty";s+=" , "+x+" , "+q+", rootData) ";var O=s;s=E.pop();if(R){if(!e.async)throw new Error("async schema referenced by sync schema");if(b){s+=" var "+p+"; "}s+=" try { await "+O+"; ";if(b){s+=" "+p+" = true; "}s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ";if(b){s+=" "+p+" = false; "}s+=" } ";if(b){s+=" if ("+p+") { "}}else{s+=" if (!"+O+") { if (vErrors === null) vErrors = "+j+".errors; else vErrors = vErrors.concat("+j+".errors); errors = vErrors.length; } ";if(b){s+=" else { "}}}return s}},9888:e=>{"use strict";e.exports=function generate_required(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}var F="schema"+l;if(!j){if(r.length0||x===false:e.util.schemaHasRules(x,e.RULES.all)))){E[E.length]=a}}}}else{var E=r}}if(j||E.length){var q=e.errorPath,O=j||E.length>=e.opts.loopRequired,Q=e.opts.ownProperties;if(d){s+=" var missing"+l+"; ";if(O){if(!j){s+=" var "+F+" = validate.schema"+g+"; "}var U="i"+l,I="schema"+l+"["+U+"]",T="' + "+I+" + '";if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPathExpr(q,I,e.opts.jsonPointers)}s+=" var "+R+" = true; ";if(j){s+=" if (schema"+l+" === undefined) "+R+" = true; else if (!Array.isArray(schema"+l+")) "+R+" = false; else {"}s+=" for (var "+U+" = 0; "+U+" < "+F+".length; "+U+"++) { "+R+" = "+p+"["+F+"["+U+"]] !== undefined ";if(Q){s+=" && Object.prototype.hasOwnProperty.call("+p+", "+F+"["+U+"]) "}s+="; if (!"+R+") break; } ";if(j){s+=" } "}s+=" if (!"+R+") { ";var J=J||[];J.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { missingProperty: '"+T+"' } ";if(e.opts.messages!==false){s+=" , message: '";if(e.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+T+"\\'"}s+="' "}if(e.opts.verbose){s+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var L=s;s=J.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+L+"]); "}else{s+=" validate.errors = ["+L+"]; return false; "}}else{s+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { "}else{s+=" if ( ";var M=E;if(M){var C,U=-1,H=M.length-1;while(U{"use strict";e.exports=function generate_uniqueItems(e,n,f){var s=" ";var l=e.level;var v=e.dataLevel;var r=e.schema[n];var g=e.schemaPath+e.util.getProperty(n);var b=e.errSchemaPath+"/"+n;var d=!e.opts.allErrors;var p="data"+(v||"");var R="valid"+l;var j=e.opts.$data&&r&&r.$data,w;if(j){s+=" var schema"+l+" = "+e.util.getData(r.$data,v,e.dataPathArr)+"; ";w="schema"+l}else{w=r}if((r||j)&&e.opts.uniqueItems!==false){if(j){s+=" var "+R+"; if ("+w+" === false || "+w+" === undefined) "+R+" = true; else if (typeof "+w+" != 'boolean') "+R+" = false; else { "}s+=" var i = "+p+".length , "+R+" = true , j; if (i > 1) { ";var F=e.schema.items&&e.schema.items.type,E=Array.isArray(F);if(!F||F=="object"||F=="array"||E&&(F.indexOf("object")>=0||F.indexOf("array")>=0)){s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+R+" = false; break outer; } } } "}else{s+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ";var A="checkDataType"+(E?"s":"");s+=" if ("+e.util[A](F,"item",e.opts.strictNumbers,true)+") continue; ";if(E){s+=" if (typeof item == 'string') item = '\"' + item; "}s+=" if (typeof itemIndices[item] == 'number') { "+R+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}s+=" } ";if(j){s+=" } "}s+=" if (!"+R+") { ";var a=a||[];a.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(b)+" , params: { i: i, j: j } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(e.opts.verbose){s+=" , schema: ";if(j){s+="validate.schema"+g}else{s+=""+r}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}s+=" } "}else{s+=" {} "}var N=s;s=a.pop();if(!e.compositeRule&&d){if(e.async){s+=" throw new ValidationError(["+N+"]); "}else{s+=" validate.errors = ["+N+"]; return false; "}}else{s+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(d){s+=" else { "}}else{if(d){s+=" if (true) { "}}return s}},6183:e=>{"use strict";e.exports=function generate_validate(e,n,f){var s="";var l=e.schema.$async===true,v=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),r=e.self._getId(e.schema);if(e.opts.strictKeywords){var g=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(g){var b="unknown keyword: "+g;if(e.opts.strictKeywords==="log")e.logger.warn(b);else throw new Error(b)}}if(e.isTop){s+=" var validate = ";if(l){e.async=true;s+="async "}s+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if(r&&(e.opts.sourceCode||e.opts.processCode)){s+=" "+("/*# sourceURL="+r+" */")+" "}}if(typeof e.schema=="boolean"||!(v||e.schema.$ref)){var n="false schema";var d=e.level;var p=e.dataLevel;var R=e.schema[n];var j=e.schemaPath+e.util.getProperty(n);var w=e.errSchemaPath+"/"+n;var F=!e.opts.allErrors;var E;var A="data"+(p||"");var a="valid"+d;if(e.schema===false){if(e.isTop){F=true}else{s+=" var "+a+" = false; "}var N=N||[];N.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(E||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(w)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'boolean schema is false' "}if(e.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+A+" "}s+=" } "}else{s+=" {} "}var z=s;s=N.pop();if(!e.compositeRule&&F){if(e.async){s+=" throw new ValidationError(["+z+"]); "}else{s+=" validate.errors = ["+z+"]; return false; "}}else{s+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(e.isTop){if(l){s+=" return data; "}else{s+=" validate.errors = null; return true; "}}else{s+=" var "+a+" = true; "}}if(e.isTop){s+=" }; return validate; "}return s}if(e.isTop){var x=e.isTop,d=e.level=0,p=e.dataLevel=0,A="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema));e.baseId=e.baseId||e.rootId;delete e.isTop;e.dataPathArr=[""];if(e.schema.default!==undefined&&e.opts.useDefaults&&e.opts.strictDefaults){var q="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(q);else throw new Error(q)}s+=" var vErrors = null; ";s+=" var errors = 0; ";s+=" if (rootData === undefined) rootData = data; "}else{var d=e.level,p=e.dataLevel,A="data"+(p||"");if(r)e.baseId=e.resolve.url(e.baseId,r);if(l&&!e.async)throw new Error("async schema in sync schema");s+=" var errs_"+d+" = errors;"}var a="valid"+d,F=!e.opts.allErrors,O="",Q="";var E;var U=e.schema.type,I=Array.isArray(U);if(U&&e.opts.nullable&&e.schema.nullable===true){if(I){if(U.indexOf("null")==-1)U=U.concat("null")}else if(U!="null"){U=[U,"null"];I=true}}if(I&&U.length==1){U=U[0];I=false}if(e.schema.$ref&&v){if(e.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)')}else if(e.opts.extendRefs!==true){v=false;e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')}}if(e.schema.$comment&&e.opts.$comment){s+=" "+e.RULES.all.$comment.code(e,"$comment")}if(U){if(e.opts.coerceTypes){var T=e.util.coerceToTypes(e.opts.coerceTypes,U)}var J=e.RULES.types[U];if(T||I||J===true||J&&!$shouldUseGroup(J)){var j=e.schemaPath+".type",w=e.errSchemaPath+"/type";var j=e.schemaPath+".type",w=e.errSchemaPath+"/type",L=I?"checkDataTypes":"checkDataType";s+=" if ("+e.util[L](U,A,e.opts.strictNumbers,true)+") { ";if(T){var M="dataType"+d,C="coerced"+d;s+=" var "+M+" = typeof "+A+"; var "+C+" = undefined; ";if(e.opts.coerceTypes=="array"){s+=" if ("+M+" == 'object' && Array.isArray("+A+") && "+A+".length == 1) { "+A+" = "+A+"[0]; "+M+" = typeof "+A+"; if ("+e.util.checkDataType(e.schema.type,A,e.opts.strictNumbers)+") "+C+" = "+A+"; } "}s+=" if ("+C+" !== undefined) ; ";var H=T;if(H){var c,G=-1,Y=H.length-1;while(G{"use strict";var s=/^[a-z_$][a-z0-9_$-]*$/i;var l=f(5523);var v=f(5418);e.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(e,n){var f=this.RULES;if(f.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!s.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(n){this.validateKeyword(n,true);var v=n.type;if(Array.isArray(v)){for(var r=0;r{"use strict";e.exports=function equal(e,n){if(e===n)return true;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return false;var f,s,l;if(Array.isArray(e)){f=e.length;if(f!=n.length)return false;for(s=f;s--!==0;)if(!equal(e[s],n[s]))return false;return true}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();l=Object.keys(e);f=l.length;if(f!==Object.keys(n).length)return false;for(s=f;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,l[s]))return false;for(s=f;s--!==0;){var v=l[s];if(!equal(e[v],n[v]))return false}return true}return e!==e&&n!==n}},3138:e=>{"use strict";e.exports=function(e,n){if(!n)n={};if(typeof n==="function")n={cmp:n};var f=typeof n.cycles==="boolean"?n.cycles:false;var s=n.cmp&&function(e){return function(n){return function(f,s){var l={key:f,value:n[f]};var v={key:s,value:n[s]};return e(l,v)}}}(n.cmp);var l=[];return function stringify(e){if(e&&e.toJSON&&typeof e.toJSON==="function"){e=e.toJSON()}if(e===undefined)return;if(typeof e=="number")return isFinite(e)?""+e:"null";if(typeof e!=="object")return JSON.stringify(e);var n,v;if(Array.isArray(e)){v="[";for(n=0;n{"use strict";var n=e.exports=function(e,n,f){if(typeof n=="function"){f=n;n={}}f=n.cb||f;var s=typeof f=="function"?f:f.pre||function(){};var l=f.post||function(){};_traverse(n,s,l,e,"",e)};n.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true};n.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};n.propsKeywords={definitions:true,properties:true,patternProperties:true,dependencies:true};n.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,f,s,l,v,r,g,b,d,p){if(l&&typeof l=="object"&&!Array.isArray(l)){f(l,v,r,g,b,d,p);for(var R in l){var j=l[R];if(Array.isArray(j)){if(R in n.arrayKeywords){for(var w=0;w{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=void 0;const{stringHints:s,numberHints:l}=f(4503);const v={type:1,not:1,oneOf:1,anyOf:1,if:1,enum:1,const:1,instanceof:1,required:2,pattern:2,patternRequired:2,format:2,formatMinimum:2,formatMaximum:2,minimum:2,exclusiveMinimum:2,maximum:2,exclusiveMaximum:2,multipleOf:2,uniqueItems:2,contains:2,minLength:2,maxLength:2,minItems:2,maxItems:2,minProperties:2,maxProperties:2,dependencies:2,propertyNames:2,additionalItems:2,additionalProperties:2,absolutePath:2};function filterMax(e,n){const f=e.reduce((e,f)=>Math.max(e,n(f)),0);return e.filter(e=>n(e)===f)}function filterChildren(e){let n=e;n=filterMax(n,e=>e.dataPath?e.dataPath.length:0);n=filterMax(n,e=>v[e.keyword]||2);return n}function findAllChildren(e,n){let f=e.length-1;const s=n=>e[f].schemaPath.indexOf(n)!==0;while(f>-1&&!n.every(s)){if(e[f].keyword==="anyOf"||e[f].keyword==="oneOf"){const n=extractRefs(e[f]);const s=findAllChildren(e.slice(0,f),n.concat(e[f].schemaPath));f=s-1}else{f-=1}}return f+1}function extractRefs(e){const{schema:n}=e;if(!Array.isArray(n)){return[]}return n.map(({$ref:e})=>e).filter(e=>e)}function groupChildrenByFirstChild(e){const n=[];let f=e.length-1;while(f>0){const s=e[f];if(s.keyword==="anyOf"||s.keyword==="oneOf"){const l=extractRefs(s);const v=findAllChildren(e.slice(0,f),l.concat(s.schemaPath));if(v!==f){n.push(Object.assign({},s,{children:e.slice(v,f)}));f=v}else{n.push(s)}}else{n.push(s)}f-=1}if(f===0){n.push(e[f])}return n.reverse()}function indent(e,n){return e.replace(/\n(?!$)/g,`\n${n}`)}function hasNotInSchema(e){return!!e.not}function findFirstTypedSchema(e){if(hasNotInSchema(e)){return findFirstTypedSchema(e.not)}return e}function canApplyNot(e){const n=findFirstTypedSchema(e);return likeNumber(n)||likeInteger(n)||likeString(n)||likeNull(n)||likeBoolean(n)}function isObject(e){return typeof e==="object"&&e!==null}function likeNumber(e){return e.type==="number"||typeof e.minimum!=="undefined"||typeof e.exclusiveMinimum!=="undefined"||typeof e.maximum!=="undefined"||typeof e.exclusiveMaximum!=="undefined"||typeof e.multipleOf!=="undefined"}function likeInteger(e){return e.type==="integer"||typeof e.minimum!=="undefined"||typeof e.exclusiveMinimum!=="undefined"||typeof e.maximum!=="undefined"||typeof e.exclusiveMaximum!=="undefined"||typeof e.multipleOf!=="undefined"}function likeString(e){return e.type==="string"||typeof e.minLength!=="undefined"||typeof e.maxLength!=="undefined"||typeof e.pattern!=="undefined"||typeof e.format!=="undefined"||typeof e.formatMinimum!=="undefined"||typeof e.formatMaximum!=="undefined"}function likeBoolean(e){return e.type==="boolean"}function likeArray(e){return e.type==="array"||typeof e.minItems==="number"||typeof e.maxItems==="number"||typeof e.uniqueItems!=="undefined"||typeof e.items!=="undefined"||typeof e.additionalItems!=="undefined"||typeof e.contains!=="undefined"}function likeObject(e){return e.type==="object"||typeof e.minProperties!=="undefined"||typeof e.maxProperties!=="undefined"||typeof e.required!=="undefined"||typeof e.properties!=="undefined"||typeof e.patternProperties!=="undefined"||typeof e.additionalProperties!=="undefined"||typeof e.dependencies!=="undefined"||typeof e.propertyNames!=="undefined"||typeof e.patternRequired!=="undefined"}function likeNull(e){return e.type==="null"}function getArticle(e){if(/^[aeiou]/i.test(e)){return"an"}return"a"}function getSchemaNonTypes(e){if(!e){return""}if(!e.type){if(likeNumber(e)||likeInteger(e)){return" | should be any non-number"}if(likeString(e)){return" | should be any non-string"}if(likeArray(e)){return" | should be any non-array"}if(likeObject(e)){return" | should be any non-object"}}return""}function formatHints(e){return e.length>0?`(${e.join(", ")})`:""}function getHints(e,n){if(likeNumber(e)||likeInteger(e)){return l(e,n)}else if(likeString(e)){return s(e,n)}return[]}class ValidationError extends Error{constructor(e,n,f={}){super();this.name="ValidationError";this.errors=e;this.schema=n;let s;let l;if(n.title&&(!f.name||!f.baseDataPath)){const e=n.title.match(/^(.+) (.+)$/);if(e){if(!f.name){[,s]=e}if(!f.baseDataPath){[,,l]=e}}}this.headerName=f.name||s||"Object";this.baseDataPath=f.baseDataPath||l||"configuration";this.postFormatter=f.postFormatter||null;const v=`Invalid ${this.baseDataPath} object. ${this.headerName} has been initialized using ${getArticle(this.baseDataPath)} ${this.baseDataPath} object that does not match the API schema.\n`;this.message=`${v}${this.formatValidationErrors(e)}`;Error.captureStackTrace(this,this.constructor)}getSchemaPart(e){const n=e.split("/");let f=this.schema;for(let e=1;e{if(!l){return this.formatSchema(n,s,f)}if(f.includes(n)){return"(recursive)"}return this.formatSchema(n,s,f.concat(e))};if(hasNotInSchema(e)&&!likeObject(e)){if(canApplyNot(e.not)){s=!n;return l(e.not)}const f=!e.not.not;const v=n?"":"non ";s=!n;return f?v+l(e.not):l(e.not)}if(e.instanceof){const{instanceof:n}=e;const f=!Array.isArray(n)?[n]:n;return f.map(e=>e==="Function"?"function":e).join(" | ")}if(e.enum){return e.enum.map(e=>JSON.stringify(e)).join(" | ")}if(typeof e.const!=="undefined"){return JSON.stringify(e.const)}if(e.oneOf){return e.oneOf.map(e=>l(e,true)).join(" | ")}if(e.anyOf){return e.anyOf.map(e=>l(e,true)).join(" | ")}if(e.allOf){return e.allOf.map(e=>l(e,true)).join(" & ")}if(e.if){const{if:n,then:f,else:s}=e;return`${n?`if ${l(n)}`:""}${f?` then ${l(f)}`:""}${s?` else ${l(s)}`:""}`}if(e.$ref){return l(this.getSchemaPart(e.$ref),true)}if(likeNumber(e)||likeInteger(e)){const[f,...s]=getHints(e,n);const l=`${f}${s.length>0?` ${formatHints(s)}`:""}`;return n?l:s.length>0?`non-${f} | ${l}`:`non-${f}`}if(likeString(e)){const[f,...s]=getHints(e,n);const l=`${f}${s.length>0?` ${formatHints(s)}`:""}`;return n?l:l==="string"?"non-string":`non-string | ${l}`}if(likeBoolean(e)){return`${n?"":"non-"}boolean`}if(likeArray(e)){s=true;const n=[];if(typeof e.minItems==="number"){n.push(`should not have fewer than ${e.minItems} item${e.minItems>1?"s":""}`)}if(typeof e.maxItems==="number"){n.push(`should not have more than ${e.maxItems} item${e.maxItems>1?"s":""}`)}if(e.uniqueItems){n.push("should not have duplicate items")}const f=typeof e.additionalItems==="undefined"||Boolean(e.additionalItems);let v="";if(e.items){if(Array.isArray(e.items)&&e.items.length>0){v=`${e.items.map(e=>l(e)).join(", ")}`;if(f){if(e.additionalItems&&isObject(e.additionalItems)&&Object.keys(e.additionalItems).length>0){n.push(`additional items should be ${l(e.additionalItems)}`)}}}else if(e.items&&Object.keys(e.items).length>0){v=`${l(e.items)}`}else{v="any"}}else{v="any"}if(e.contains&&Object.keys(e.contains).length>0){n.push(`should contains at least one ${this.formatSchema(e.contains)} item`)}return`[${v}${f?", ...":""}]${n.length>0?` (${n.join(", ")})`:""}`}if(likeObject(e)){s=true;const n=[];if(typeof e.minProperties==="number"){n.push(`should not have fewer than ${e.minProperties} ${e.minProperties>1?"properties":"property"}`)}if(typeof e.maxProperties==="number"){n.push(`should not have more than ${e.maxProperties} ${e.minProperties&&e.minProperties>1?"properties":"property"}`)}if(e.patternProperties&&Object.keys(e.patternProperties).length>0){const f=Object.keys(e.patternProperties);n.push(`additional property names should match pattern${f.length>1?"s":""} ${f.map(e=>JSON.stringify(e)).join(" | ")}`)}const f=e.properties?Object.keys(e.properties):[];const v=e.required?e.required:[];const r=[...new Set([].concat(v).concat(f))];const g=r.map(e=>{const n=v.includes(e);return`${e}${n?"":"?"}`}).concat(typeof e.additionalProperties==="undefined"||Boolean(e.additionalProperties)?e.additionalProperties&&isObject(e.additionalProperties)?[`: ${l(e.additionalProperties)}`]:["…"]:[]).join(", ");const{dependencies:b,propertyNames:d,patternRequired:p}=e;if(b){Object.keys(b).forEach(e=>{const f=b[e];if(Array.isArray(f)){n.push(`should have ${f.length>1?"properties":"property"} ${f.map(e=>`'${e}'`).join(", ")} when property '${e}' is present`)}else{n.push(`should be valid according to the schema ${l(f)} when property '${e}' is present`)}})}if(d&&Object.keys(d).length>0){n.push(`each property name should match format ${JSON.stringify(e.propertyNames.format)}`)}if(p&&p.length>0){n.push(`should have property matching pattern ${p.map(e=>JSON.stringify(e))}`)}return`object {${g?` ${g} `:""}}${n.length>0?` (${n.join(", ")})`:""}`}if(likeNull(e)){return`${n?"":"non-"}null`}if(Array.isArray(e.type)){return`${e.type.join(" | ")}`}return JSON.stringify(e,null,2)}getSchemaPartText(e,n,f=false,s=true){if(!e){return""}if(Array.isArray(n)){for(let f=0;f ${e.description}`}return l}getSchemaPartDescription(e){if(!e){return""}while(e.$ref){e=this.getSchemaPart(e.$ref)}if(e.description){return`\n-> ${e.description}`}return""}formatValidationError(e){const{keyword:n,dataPath:f}=e;const s=`${this.baseDataPath}${f}`;switch(n){case"type":{const{parentSchema:n,params:f}=e;switch(f.type){case"number":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"integer":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"string":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"boolean":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;case"array":return`${s} should be an array:\n${this.getSchemaPartText(n)}`;case"object":return`${s} should be an object:\n${this.getSchemaPartText(n)}`;case"null":return`${s} should be a ${this.getSchemaPartText(n,false,true)}`;default:return`${s} should be:\n${this.getSchemaPartText(n)}`}}case"instanceof":{const{parentSchema:n}=e;return`${s} should be an instance of ${this.getSchemaPartText(n,false,true)}`}case"pattern":{const{params:n,parentSchema:f}=e;const{pattern:l}=n;return`${s} should match pattern ${JSON.stringify(l)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"format":{const{params:n,parentSchema:f}=e;const{format:l}=n;return`${s} should match format ${JSON.stringify(l)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"formatMinimum":case"formatMaximum":{const{params:n,parentSchema:f}=e;const{comparison:l,limit:v}=n;return`${s} should be ${l} ${JSON.stringify(v)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minimum":case"maximum":case"exclusiveMinimum":case"exclusiveMaximum":{const{parentSchema:n,params:f}=e;const{comparison:l,limit:v}=f;const[,...r]=getHints(n,true);if(r.length===0){r.push(`should be ${l} ${v}`)}return`${s} ${r.join(" ")}${getSchemaNonTypes(n)}.${this.getSchemaPartDescription(n)}`}case"multipleOf":{const{params:n,parentSchema:f}=e;const{multipleOf:l}=n;return`${s} should be multiple of ${l}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"patternRequired":{const{params:n,parentSchema:f}=e;const{missingPattern:l}=n;return`${s} should have property matching pattern ${JSON.stringify(l)}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minLength":{const{params:n,parentSchema:f}=e;const{limit:l}=n;if(l===1){return`${s} should be an non-empty string${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}const v=l-1;return`${s} should be longer than ${v} character${v>1?"s":""}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minItems":{const{params:n,parentSchema:f}=e;const{limit:l}=n;if(l===1){return`${s} should be an non-empty array${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}return`${s} should not have fewer than ${l} items${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"minProperties":{const{params:n,parentSchema:f}=e;const{limit:l}=n;if(l===1){return`${s} should be an non-empty object${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}return`${s} should not have fewer than ${l} properties${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"maxLength":{const{params:n,parentSchema:f}=e;const{limit:l}=n;const v=l+1;return`${s} should be shorter than ${v} character${v>1?"s":""}${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"maxItems":{const{params:n,parentSchema:f}=e;const{limit:l}=n;return`${s} should not have more than ${l} items${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"maxProperties":{const{params:n,parentSchema:f}=e;const{limit:l}=n;return`${s} should not have more than ${l} properties${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"uniqueItems":{const{params:n,parentSchema:f}=e;const{i:l}=n;return`${s} should not contain the item '${e.data[l]}' twice${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"additionalItems":{const{params:n,parentSchema:f}=e;const{limit:l}=n;return`${s} should not have more than ${l} items${getSchemaNonTypes(f)}. These items are valid:\n${this.getSchemaPartText(f)}`}case"contains":{const{parentSchema:n}=e;return`${s} should contains at least one ${this.getSchemaPartText(n,["contains"])} item${getSchemaNonTypes(n)}.`}case"required":{const{parentSchema:n,params:f}=e;const l=f.missingProperty.replace(/^\./,"");const v=n&&Boolean(n.properties&&n.properties[l]);return`${s} misses the property '${l}'${getSchemaNonTypes(n)}.${v?` Should be:\n${this.getSchemaPartText(n,["properties",l])}`:this.getSchemaPartDescription(n)}`}case"additionalProperties":{const{params:n,parentSchema:f}=e;const{additionalProperty:l}=n;return`${s} has an unknown property '${l}'${getSchemaNonTypes(f)}. These properties are valid:\n${this.getSchemaPartText(f)}`}case"dependencies":{const{params:n,parentSchema:f}=e;const{property:l,deps:v}=n;const r=v.split(",").map(e=>`'${e.trim()}'`).join(", ");return`${s} should have properties ${r} when property '${l}' is present${getSchemaNonTypes(f)}.${this.getSchemaPartDescription(f)}`}case"propertyNames":{const{params:n,parentSchema:f,schema:l}=e;const{propertyName:v}=n;return`${s} property name '${v}' is invalid${getSchemaNonTypes(f)}. Property names should be match format ${JSON.stringify(l.format)}.${this.getSchemaPartDescription(f)}`}case"enum":{const{parentSchema:n}=e;if(n&&n.enum&&n.enum.length===1){return`${s} should be ${this.getSchemaPartText(n,false,true)}`}return`${s} should be one of these:\n${this.getSchemaPartText(n)}`}case"const":{const{parentSchema:n}=e;return`${s} should be equal to constant ${this.getSchemaPartText(n,false,true)}`}case"not":{const n=likeObject(e.parentSchema)?`\n${this.getSchemaPartText(e.parentSchema)}`:"";const f=this.getSchemaPartText(e.schema,false,false,false);if(canApplyNot(e.schema)){return`${s} should be any ${f}${n}.`}const{schema:l,parentSchema:v}=e;return`${s} should not be ${this.getSchemaPartText(l,false,true)}${v&&likeObject(v)?`\n${this.getSchemaPartText(v)}`:""}`}case"oneOf":case"anyOf":{const{parentSchema:n,children:f}=e;if(f&&f.length>0){if(e.schema.length===1){const e=f[f.length-1];const s=f.slice(0,f.length-1);return this.formatValidationError(Object.assign({},e,{children:s,parentSchema:Object.assign({},n,e.parentSchema)}))}let l=filterChildren(f);if(l.length===1){return this.formatValidationError(l[0])}l=groupChildrenByFirstChild(l);return`${s} should be one of these:\n${this.getSchemaPartText(n)}\nDetails:\n${l.map(e=>` * ${indent(this.formatValidationError(e)," ")}`).join("\n")}`}return`${s} should be one of these:\n${this.getSchemaPartText(n)}`}case"if":{const{params:n,parentSchema:f}=e;const{failingKeyword:l}=n;return`${s} should match "${l}" schema:\n${this.getSchemaPartText(f,[l])}`}case"absolutePath":{const{message:n,parentSchema:f}=e;return`${s}: ${n}${this.getSchemaPartDescription(f)}`}default:{const{message:n,parentSchema:f}=e;const l=JSON.stringify(e,null,2);return`${s} ${n} (${l}).\n${this.getSchemaPartText(f,false)}`}}}formatValidationErrors(e){return e.map(e=>{let n=this.formatValidationError(e);if(this.postFormatter){n=this.postFormatter(n,e)}return` - ${indent(n," ")}`}).join("\n")}}var r=ValidationError;n.default=r},1032:(e,n,f)=>{"use strict";const{validate:s,ValidationError:l}=f(6134);e.exports={validate:s,ValidationError:l}},1468:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=void 0;function errorMessage(e,n,f){return{dataPath:undefined,schemaPath:undefined,keyword:"absolutePath",params:{absolutePath:f},message:e,parentSchema:n}}function getErrorFor(e,n,f){const s=e?`The provided value ${JSON.stringify(f)} is not an absolute path!`:`A relative path is expected. However, the provided value ${JSON.stringify(f)} is an absolute path!`;return errorMessage(s,n,f)}function addAbsolutePathKeyword(e){e.addKeyword("absolutePath",{errors:true,type:"string",compile(e,n){const f=s=>{let l=true;const v=s.includes("!");if(v){f.errors=[errorMessage(`The provided value ${JSON.stringify(s)} contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.`,n,s)];l=false}const r=e===/^(?:[A-Za-z]:(\\|\/)|\\\\|\/)/.test(s);if(!r){f.errors=[getErrorFor(e,n,s)];l=false}return l};f.errors=[];return f}});return e}var f=addAbsolutePathKeyword;n.default=f},679:e=>{"use strict";class Range{static getOperator(e,n){if(e==="left"){return n?">":">="}return n?"<":"<="}static formatRight(e,n,f){if(n===false){return Range.formatLeft(e,!n,!f)}return`should be ${Range.getOperator("right",f)} ${e}`}static formatLeft(e,n,f){if(n===false){return Range.formatRight(e,!n,!f)}return`should be ${Range.getOperator("left",f)} ${e}`}static formatRange(e,n,f,s,l){let v="should be";v+=` ${Range.getOperator(l?"left":"right",l?f:!f)} ${e} `;v+=l?"and":"or";v+=` ${Range.getOperator(l?"right":"left",l?s:!s)} ${n}`;return v}static getRangeValue(e,n){let f=n?Infinity:-Infinity;let s=-1;const l=n?([e])=>e<=f:([e])=>e>=f;for(let n=0;n-1){return e[s]}return[Infinity,true]}constructor(){this._left=[];this._right=[]}left(e,n=false){this._left.push([e,n])}right(e,n=false){this._right.push([e,n])}format(e=true){const[n,f]=Range.getRangeValue(this._left,e);const[s,l]=Range.getRangeValue(this._right,!e);if(!Number.isFinite(n)&&!Number.isFinite(s)){return""}const v=f?n+1:n;const r=l?s-1:s;if(v===r){return`should be ${e?"":"!"}= ${v}`}if(Number.isFinite(n)&&!Number.isFinite(s)){return Range.formatLeft(n,e,f)}if(!Number.isFinite(n)&&Number.isFinite(s)){return Range.formatRight(s,e,l)}return Range.formatRange(n,s,f,l,e)}}e.exports=Range},4503:(e,n,f)=>{"use strict";const s=f(679);e.exports.stringHints=function stringHints(e,n){const f=[];let s="string";const l={...e};if(!n){const e=l.minLength;const n=l.formatMinimum;const f=l.formatExclusiveMaximum;l.minLength=l.maxLength;l.maxLength=e;l.formatMinimum=l.formatMaximum;l.formatMaximum=n;l.formatExclusiveMaximum=!l.formatExclusiveMinimum;l.formatExclusiveMinimum=!f}if(typeof l.minLength==="number"){if(l.minLength===1){s="non-empty string"}else{const e=Math.max(l.minLength-1,0);f.push(`should be longer than ${e} character${e>1?"s":""}`)}}if(typeof l.maxLength==="number"){if(l.maxLength===0){s="empty string"}else{const e=l.maxLength+1;f.push(`should be shorter than ${e} character${e>1?"s":""}`)}}if(l.pattern){f.push(`should${n?"":" not"} match pattern ${JSON.stringify(l.pattern)}`)}if(l.format){f.push(`should${n?"":" not"} match format ${JSON.stringify(l.format)}`)}if(l.formatMinimum){f.push(`should be ${l.formatExclusiveMinimum?">":">="} ${JSON.stringify(l.formatMinimum)}`)}if(l.formatMaximum){f.push(`should be ${l.formatExclusiveMaximum?"<":"<="} ${JSON.stringify(l.formatMaximum)}`)}return[s].concat(f)};e.exports.numberHints=function numberHints(e,n){const f=[e.type==="integer"?"integer":"number"];const l=new s;if(typeof e.minimum==="number"){l.left(e.minimum)}if(typeof e.exclusiveMinimum==="number"){l.left(e.exclusiveMinimum,true)}if(typeof e.maximum==="number"){l.right(e.maximum)}if(typeof e.exclusiveMaximum==="number"){l.right(e.exclusiveMaximum,true)}const v=l.format(n);if(v){f.push(v)}if(typeof e.multipleOf==="number"){f.push(`should${n?"":" not"} be multiple of ${e.multipleOf}`)}return f}},6134:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.validate=validate;Object.defineProperty(n,"ValidationError",{enumerable:true,get:function(){return l.default}});var s=_interopRequireDefault(f(1468));var l=_interopRequireDefault(f(4129));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const v=f(4415);const r=f(8630);const g=new v({allErrors:true,verbose:true,$data:true});r(g,["instanceof","formatMinimum","formatMaximum","patternRequired"]);(0,s.default)(g);function validate(e,n,f){let s=[];if(Array.isArray(n)){s=Array.from(n,n=>validateObject(e,n));s.forEach((e,n)=>{const f=e=>{e.dataPath=`[${n}]${e.dataPath}`;if(e.children){e.children.forEach(f)}};e.forEach(f)});s=s.reduce((e,n)=>{e.push(...n);return e},[])}else{s=validateObject(e,n)}if(s.length>0){throw new l.default(s,e,f)}}function validateObject(e,n){const f=g.compile(e);const s=f(n);if(s)return[];return f.errors?filterErrors(f.errors):[]}function filterErrors(e){let n=[];for(const f of e){const{dataPath:e}=f;let s=[];n=n.filter(n=>{if(n.dataPath.includes(e)){if(n.children){s=s.concat(n.children.slice(0))}n.children=undefined;s.push(n);return false}return true});if(s.length){f.children=s}n.push(f)}return n}},9246:function(e,n){(function(e,f){true?f(n):0})(this,function(e){"use strict";function merge(){for(var e=arguments.length,n=Array(e),f=0;f1){n[0]=n[0].slice(0,-1);var s=n.length-1;for(var l=1;l= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var N=r-g;var z=Math.floor;var x=String.fromCharCode;function error$1(e){throw new RangeError(a[e])}function map(e,n){var f=[];var s=e.length;while(s--){f[s]=n(e[s])}return f}function mapDomain(e,n){var f=e.split("@");var s="";if(f.length>1){s=f[0]+"@";e=f[1]}e=e.replace(A,".");var l=e.split(".");var v=map(l,n).join(".");return s+v}function ucs2decode(e){var n=[];var f=0;var s=e.length;while(f=55296&&l<=56319&&f>1;e+=z(e/n);for(;e>N*b>>1;s+=r){e=z(e/N)}return z(s+(N+1)*e/(e+d))};var I=function decode(e){var n=[];var f=e.length;var s=0;var l=j;var d=R;var p=e.lastIndexOf(w);if(p<0){p=0}for(var F=0;F=128){error$1("not-basic")}n.push(e.charCodeAt(F))}for(var E=p>0?p+1:0;E=f){error$1("invalid-input")}var x=O(e.charCodeAt(E++));if(x>=r||x>z((v-s)/a)){error$1("overflow")}s+=x*a;var q=N<=d?g:N>=d+b?b:N-d;if(xz(v/Q)){error$1("overflow")}a*=Q}var I=n.length+1;d=U(s-A,I,A==0);if(z(s/I)>v-l){error$1("overflow")}l+=z(s/I);s%=I;n.splice(s++,0,l)}return String.fromCodePoint.apply(String,n)};var T=function encode(e){var n=[];e=ucs2decode(e);var f=e.length;var s=j;var l=0;var d=R;var p=true;var F=false;var E=undefined;try{for(var A=e[Symbol.iterator](),a;!(p=(a=A.next()).done);p=true){var N=a.value;if(N<128){n.push(x(N))}}}catch(e){F=true;E=e}finally{try{if(!p&&A.return){A.return()}}finally{if(F){throw E}}}var q=n.length;var O=q;if(q){n.push(w)}while(O=s&&Hz((v-l)/c)){error$1("overflow")}l+=(I-s)*c;s=I;var G=true;var Y=false;var W=undefined;try{for(var X=e[Symbol.iterator](),B;!(G=(B=X.next()).done);G=true){var Z=B.value;if(Zv){error$1("overflow")}if(Z==s){var y=l;for(var D=r;;D+=r){var K=D<=d?g:D>=d+b?b:D-d;if(y>6|192).toString(16).toUpperCase()+"%"+(n&63|128).toString(16).toUpperCase();else f="%"+(n>>12|224).toString(16).toUpperCase()+"%"+(n>>6&63|128).toString(16).toUpperCase()+"%"+(n&63|128).toString(16).toUpperCase();return f}function pctDecChars(e){var n="";var f=0;var s=e.length;while(f=194&&l<224){if(s-f>=6){var v=parseInt(e.substr(f+4,2),16);n+=String.fromCharCode((l&31)<<6|v&63)}else{n+=e.substr(f,6)}f+=6}else if(l>=224){if(s-f>=9){var r=parseInt(e.substr(f+4,2),16);var g=parseInt(e.substr(f+7,2),16);n+=String.fromCharCode((l&15)<<12|(r&63)<<6|g&63)}else{n+=e.substr(f,9)}f+=9}else{n+=e.substr(f,3);f+=3}}return n}function _normalizeComponentEncoding(e,n){function decodeUnreserved(e){var f=pctDecChars(e);return!f.match(n.UNRESERVED)?e:f}if(e.scheme)e.scheme=String(e.scheme).replace(n.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(n.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_USERINFO,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(n.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(n.NOT_HOST,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(n.PCT_ENCODED,decodeUnreserved).replace(e.scheme?n.NOT_PATH:n.NOT_PATH_NOSCHEME,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_QUERY,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_FRAGMENT,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,n){var f=e.match(n.IPV4ADDRESS)||[];var l=s(f,2),v=l[1];if(v){return v.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,n){var f=e.match(n.IPV6ADDRESS)||[];var l=s(f,3),v=l[1],r=l[2];if(v){var g=v.toLowerCase().split("::").reverse(),b=s(g,2),d=b[0],p=b[1];var R=p?p.split(":").map(_stripLeadingZeros):[];var j=d.split(":").map(_stripLeadingZeros);var w=n.IPV4ADDRESS.test(j[j.length-1]);var F=w?7:8;var E=j.length-F;var A=Array(F);for(var a=0;a1){var q=A.slice(0,z.index);var O=A.slice(z.index+z.length);x=q.join(":")+"::"+O.join(":")}else{x=A.join(":")}if(r){x+="%"+r}return x}else{return e}}var H=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var c="".match(/(){0}/)[1]===undefined;function parse(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var l={};var v=s.iri!==false?f:n;if(s.reference==="suffix")e=(s.scheme?s.scheme+":":"")+"//"+e;var r=e.match(H);if(r){if(c){l.scheme=r[1];l.userinfo=r[3];l.host=r[4];l.port=parseInt(r[5],10);l.path=r[6]||"";l.query=r[7];l.fragment=r[8];if(isNaN(l.port)){l.port=r[5]}}else{l.scheme=r[1]||undefined;l.userinfo=e.indexOf("@")!==-1?r[3]:undefined;l.host=e.indexOf("//")!==-1?r[4]:undefined;l.port=parseInt(r[5],10);l.path=r[6]||"";l.query=e.indexOf("?")!==-1?r[7]:undefined;l.fragment=e.indexOf("#")!==-1?r[8]:undefined;if(isNaN(l.port)){l.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:undefined}}if(l.host){l.host=_normalizeIPv6(_normalizeIPv4(l.host,v),v)}if(l.scheme===undefined&&l.userinfo===undefined&&l.host===undefined&&l.port===undefined&&!l.path&&l.query===undefined){l.reference="same-document"}else if(l.scheme===undefined){l.reference="relative"}else if(l.fragment===undefined){l.reference="absolute"}else{l.reference="uri"}if(s.reference&&s.reference!=="suffix"&&s.reference!==l.reference){l.error=l.error||"URI is not a "+s.reference+" reference."}var g=C[(s.scheme||l.scheme||"").toLowerCase()];if(!s.unicodeSupport&&(!g||!g.unicodeSupport)){if(l.host&&(s.domainHost||g&&g.domainHost)){try{l.host=M.toASCII(l.host.replace(v.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){l.error=l.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(l,n)}else{_normalizeComponentEncoding(l,v)}if(g&&g.parse){g.parse(l,s)}}else{l.error=l.error||"URI can not be parsed."}return l}function _recomposeAuthority(e,s){var l=s.iri!==false?f:n;var v=[];if(e.userinfo!==undefined){v.push(e.userinfo);v.push("@")}if(e.host!==undefined){v.push(_normalizeIPv6(_normalizeIPv4(String(e.host),l),l).replace(l.IPV6ADDRESS,function(e,n,f){return"["+n+(f?"%25"+f:"")+"]"}))}if(typeof e.port==="number"||typeof e.port==="string"){v.push(":");v.push(String(e.port))}return v.length?v.join(""):undefined}var G=/^\.\.?\//;var Y=/^\/\.(\/|$)/;var W=/^\/\.\.(\/|$)/;var X=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var n=[];while(e.length){if(e.match(G)){e=e.replace(G,"")}else if(e.match(Y)){e=e.replace(Y,"/")}else if(e.match(W)){e=e.replace(W,"/");n.pop()}else if(e==="."||e===".."){e=""}else{var f=e.match(X);if(f){var s=f[0];e=e.slice(s.length);n.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return n.join("")}function serialize(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var l=s.iri?f:n;var v=[];var r=C[(s.scheme||e.scheme||"").toLowerCase()];if(r&&r.serialize)r.serialize(e,s);if(e.host){if(l.IPV6ADDRESS.test(e.host)){}else if(s.domainHost||r&&r.domainHost){try{e.host=!s.iri?M.toASCII(e.host.replace(l.PCT_ENCODED,pctDecChars).toLowerCase()):M.toUnicode(e.host)}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(!s.iri?"ASCII":"Unicode")+" via punycode: "+n}}}_normalizeComponentEncoding(e,l);if(s.reference!=="suffix"&&e.scheme){v.push(e.scheme);v.push(":")}var g=_recomposeAuthority(e,s);if(g!==undefined){if(s.reference!=="suffix"){v.push("//")}v.push(g);if(e.path&&e.path.charAt(0)!=="/"){v.push("/")}}if(e.path!==undefined){var b=e.path;if(!s.absolutePath&&(!r||!r.absolutePath)){b=removeDotSegments(b)}if(g===undefined){b=b.replace(/^\/\//,"/%2F")}v.push(b)}if(e.query!==undefined){v.push("?");v.push(e.query)}if(e.fragment!==undefined){v.push("#");v.push(e.fragment)}return v.join("")}function resolveComponents(e,n){var f=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var s=arguments[3];var l={};if(!s){e=parse(serialize(e,f),f);n=parse(serialize(n,f),f)}f=f||{};if(!f.tolerant&&n.scheme){l.scheme=n.scheme;l.userinfo=n.userinfo;l.host=n.host;l.port=n.port;l.path=removeDotSegments(n.path||"");l.query=n.query}else{if(n.userinfo!==undefined||n.host!==undefined||n.port!==undefined){l.userinfo=n.userinfo;l.host=n.host;l.port=n.port;l.path=removeDotSegments(n.path||"");l.query=n.query}else{if(!n.path){l.path=e.path;if(n.query!==undefined){l.query=n.query}else{l.query=e.query}}else{if(n.path.charAt(0)==="/"){l.path=removeDotSegments(n.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){l.path="/"+n.path}else if(!e.path){l.path=n.path}else{l.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+n.path}l.path=removeDotSegments(l.path)}l.query=n.query}l.userinfo=e.userinfo;l.host=e.host;l.port=e.port}l.scheme=e.scheme}l.fragment=n.fragment;return l}function resolve(e,n,f){var s=assign({scheme:"null"},f);return serialize(resolveComponents(parse(e,s),parse(n,s),s,true),s)}function normalize(e,n){if(typeof e==="string"){e=serialize(parse(e,n),n)}else if(typeOf(e)==="object"){e=parse(serialize(e,n),n)}return e}function equal(e,n,f){if(typeof e==="string"){e=serialize(parse(e,f),f)}else if(typeOf(e)==="object"){e=serialize(e,f)}if(typeof n==="string"){n=serialize(parse(n,f),f)}else if(typeOf(n)==="object"){n=serialize(n,f)}return e===n}function escapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?n.ESCAPE:f.ESCAPE,pctEncChar)}function unescapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?n.PCT_ENCODED:f.PCT_ENCODED,pctDecChars)}var B={scheme:"http",domainHost:true,parse:function parse(e,n){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,n){var f=String(e.scheme).toLowerCase()==="https";if(e.port===(f?443:80)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var Z={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function isSecure(e){return typeof e.secure==="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}var y={scheme:"ws",domainHost:true,parse:function parse(e,n){var f=e;f.secure=isSecure(f);f.resourceName=(f.path||"/")+(f.query?"?"+f.query:"");f.path=undefined;f.query=undefined;return f},serialize:function serialize(e,n){if(e.port===(isSecure(e)?443:80)||e.port===""){e.port=undefined}if(typeof e.secure==="boolean"){e.scheme=e.secure?"wss":"ws";e.secure=undefined}if(e.resourceName){var f=e.resourceName.split("?"),l=s(f,2),v=l[0],r=l[1];e.path=v&&v!=="/"?v:undefined;e.query=r;e.resourceName=undefined}e.fragment=undefined;return e}};var D={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize};var K={};var m=true;var V="[A-Za-z0-9\\-\\.\\_\\~"+(m?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var k="[0-9A-Fa-f]";var h=subexp(subexp("%[EFef]"+k+"%"+k+k+"%"+k+k)+"|"+subexp("%[89A-Fa-f]"+k+"%"+k+k)+"|"+subexp("%"+k+k));var S="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var P="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var i=merge(P,'[\\"\\\\]');var _="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var u=new RegExp(V,"g");var o=new RegExp(h,"g");var $=new RegExp(merge("[^]",S,"[\\.]",'[\\"]',i),"g");var t=new RegExp(merge("[^]",V,_),"g");var ee=t;function decodeUnreserved(e){var n=pctDecChars(e);return!n.match(u)?e:n}var ne={scheme:"mailto",parse:function parse$$1(e,n){var f=e;var s=f.to=f.path?f.path.split(","):[];f.path=undefined;if(f.query){var l=false;var v={};var r=f.query.split("&");for(var g=0,b=r.length;g{var e={532:(e,s,t)=>{const r=Symbol("SemVer ANY");class Comparator{static get ANY(){return r}constructor(e,s){if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!s.loose){return e}else{e=e.value}}a("comparator",e,s);this.options=s;this.loose=!!s.loose;this.parse(e);if(this.semver===r){this.value=""}else{this.value=this.operator+this.semver.version}a("comp",this)}parse(e){const s=this.options.loose?n[o.COMPARATORLOOSE]:n[o.COMPARATOR];const t=e.match(s);if(!t){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=t[1]!==undefined?t[1]:"";if(this.operator==="="){this.operator=""}if(!t[2]){this.semver=r}else{this.semver=new l(t[2],this.options.loose)}}toString(){return this.value}test(e){a("Comparator.test",e,this.options.loose);if(this.semver===r||e===r){return true}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}return i(e,this.operator,this.semver,this.options)}intersects(e,s){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new c(e.value,s).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new c(this.value,s).test(e.semver)}const t=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const r=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const n=this.semver.version===e.semver.version;const o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const a=i(this.semver,"<",e.semver,s)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const l=i(this.semver,">",e.semver,s)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return t||r||n&&o||a||l}}e.exports=Comparator;const{re:n,t:o}=t(523);const i=t(98);const a=t(427);const l=t(88);const c=t(828)},828:(e,s,t)=>{class Range{constructor(e,s){if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!s.loose&&e.includePrerelease===!!s.includePrerelease){return e}else{return new Range(e.raw,s)}}if(e instanceof r){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=s;this.loose=!!s.loose;this.includePrerelease=!!s.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length);if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}this.format()}format(){this.range=this.set.map(e=>{return e.join(" ").trim()}).join("||").trim();return this.range}toString(){return this.range}parseRange(e){const s=this.options.loose;e=e.trim();const t=s?i[a.HYPHENRANGELOOSE]:i[a.HYPHENRANGE];e=e.replace(t,T(this.options.includePrerelease));n("hyphen replace",e);e=e.replace(i[a.COMPARATORTRIM],l);n("comparator trim",e,i[a.COMPARATORTRIM]);e=e.replace(i[a.TILDETRIM],c);e=e.replace(i[a.CARETTRIM],E);e=e.split(/\s+/).join(" ");const o=s?i[a.COMPARATORLOOSE]:i[a.COMPARATOR];return e.split(" ").map(e=>u(e,this.options)).join(" ").split(/\s+/).map(e=>A(e,this.options)).filter(this.options.loose?e=>!!e.match(o):()=>true).map(e=>new r(e,this.options))}intersects(e,s){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(t=>{return f(t,s)&&e.set.some(e=>{return f(e,s)&&t.every(t=>{return e.every(e=>{return t.intersects(e,s)})})})})}test(e){if(!e){return false}if(typeof e==="string"){try{e=new o(e,this.options)}catch(e){return false}}for(let s=0;s{let t=true;const r=e.slice();let n=r.pop();while(t&&r.length){t=r.every(e=>{return n.intersects(e,s)});n=r.pop()}return t};const u=(e,s)=>{n("comp",e,s);e=R(e,s);n("caret",e);e=$(e,s);n("tildes",e);e=N(e,s);n("xrange",e);e=L(e,s);n("stars",e);return e};const h=e=>!e||e.toLowerCase()==="x"||e==="*";const $=(e,s)=>e.trim().split(/\s+/).map(e=>{return I(e,s)}).join(" ");const I=(e,s)=>{const t=s.loose?i[a.TILDELOOSE]:i[a.TILDE];return e.replace(t,(s,t,r,o,i)=>{n("tilde",e,s,t,r,o,i);let a;if(h(t)){a=""}else if(h(r)){a=`>=${t}.0.0 <${+t+1}.0.0-0`}else if(h(o)){a=`>=${t}.${r}.0 <${t}.${+r+1}.0-0`}else if(i){n("replaceTilde pr",i);a=`>=${t}.${r}.${o}-${i} <${t}.${+r+1}.0-0`}else{a=`>=${t}.${r}.${o} <${t}.${+r+1}.0-0`}n("tilde return",a);return a})};const R=(e,s)=>e.trim().split(/\s+/).map(e=>{return p(e,s)}).join(" ");const p=(e,s)=>{n("caret",e,s);const t=s.loose?i[a.CARETLOOSE]:i[a.CARET];const r=s.includePrerelease?"-0":"";return e.replace(t,(s,t,o,i,a)=>{n("caret",e,s,t,o,i,a);let l;if(h(t)){l=""}else if(h(o)){l=`>=${t}.0.0${r} <${+t+1}.0.0-0`}else if(h(i)){if(t==="0"){l=`>=${t}.${o}.0${r} <${t}.${+o+1}.0-0`}else{l=`>=${t}.${o}.0${r} <${+t+1}.0.0-0`}}else if(a){n("replaceCaret pr",a);if(t==="0"){if(o==="0"){l=`>=${t}.${o}.${i}-${a} <${t}.${o}.${+i+1}-0`}else{l=`>=${t}.${o}.${i}-${a} <${t}.${+o+1}.0-0`}}else{l=`>=${t}.${o}.${i}-${a} <${+t+1}.0.0-0`}}else{n("no pr");if(t==="0"){if(o==="0"){l=`>=${t}.${o}.${i}${r} <${t}.${o}.${+i+1}-0`}else{l=`>=${t}.${o}.${i}${r} <${t}.${+o+1}.0-0`}}else{l=`>=${t}.${o}.${i} <${+t+1}.0.0-0`}}n("caret return",l);return l})};const N=(e,s)=>{n("replaceXRanges",e,s);return e.split(/\s+/).map(e=>{return O(e,s)}).join(" ")};const O=(e,s)=>{e=e.trim();const t=s.loose?i[a.XRANGELOOSE]:i[a.XRANGE];return e.replace(t,(t,r,o,i,a,l)=>{n("xRange",e,t,r,o,i,a,l);const c=h(o);const E=c||h(i);const f=E||h(a);const u=f;if(r==="="&&u){r=""}l=s.includePrerelease?"-0":"";if(c){if(r===">"||r==="<"){t="<0.0.0-0"}else{t="*"}}else if(r&&u){if(E){i=0}a=0;if(r===">"){r=">=";if(E){o=+o+1;i=0;a=0}else{i=+i+1;a=0}}else if(r==="<="){r="<";if(E){o=+o+1}else{i=+i+1}}if(r==="<")l="-0";t=`${r+o}.${i}.${a}${l}`}else if(E){t=`>=${o}.0.0${l} <${+o+1}.0.0-0`}else if(f){t=`>=${o}.${i}.0${l} <${o}.${+i+1}.0-0`}n("xRange return",t);return t})};const L=(e,s)=>{n("replaceStars",e,s);return e.trim().replace(i[a.STAR],"")};const A=(e,s)=>{n("replaceGTE0",e,s);return e.trim().replace(i[s.includePrerelease?a.GTE0PRE:a.GTE0],"")};const T=e=>(s,t,r,n,o,i,a,l,c,E,f,u,$)=>{if(h(r)){t=""}else if(h(n)){t=`>=${r}.0.0${e?"-0":""}`}else if(h(o)){t=`>=${r}.${n}.0${e?"-0":""}`}else if(i){t=`>=${t}`}else{t=`>=${t}${e?"-0":""}`}if(h(c)){l=""}else if(h(E)){l=`<${+c+1}.0.0-0`}else if(h(f)){l=`<${c}.${+E+1}.0-0`}else if(u){l=`<=${c}.${E}.${f}-${u}`}else if(e){l=`<${c}.${E}.${+f+1}-0`}else{l=`<=${l}`}return`${t} ${l}`.trim()};const S=(e,s,t)=>{for(let t=0;t0){const r=e[t].semver;if(r.major===s.major&&r.minor===s.minor&&r.patch===s.patch){return true}}}return false}return true}},88:(e,s,t)=>{const r=t(427);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:o}=t(293);const{re:i,t:a}=t(523);const{compareIdentifiers:l}=t(463);class SemVer{constructor(e,s){if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===!!s.loose&&e.includePrerelease===!!s.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}r("SemVer",e,s);this.options=s;this.loose=!!s.loose;this.includePrerelease=!!s.includePrerelease;const t=e.trim().match(s.loose?i[a.LOOSE]:i[a.FULL]);if(!t){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+t[1];this.minor=+t[2];this.patch=+t[3];if(this.major>o||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>o||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>o||this.patch<0){throw new TypeError("Invalid patch version")}if(!t[4]){this.prerelease=[]}else{this.prerelease=t[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const s=+e;if(s>=0&&s=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(s){if(this.prerelease[0]===s){if(isNaN(this.prerelease[1])){this.prerelease=[s,0]}}else{this.prerelease=[s,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},848:(e,s,t)=>{const r=t(925);const n=(e,s)=>{const t=r(e.trim().replace(/^[=v]+/,""),s);return t?t.version:null};e.exports=n},98:(e,s,t)=>{const r=t(898);const n=t(17);const o=t(123);const i=t(522);const a=t(194);const l=t(520);const c=(e,s,t,c)=>{switch(s){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;return e===t;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;return e!==t;case"":case"=":case"==":return r(e,t,c);case"!=":return n(e,t,c);case">":return o(e,t,c);case">=":return i(e,t,c);case"<":return a(e,t,c);case"<=":return l(e,t,c);default:throw new TypeError(`Invalid operator: ${s}`)}};e.exports=c},466:(e,s,t)=>{const r=t(88);const n=t(925);const{re:o,t:i}=t(523);const a=(e,s)=>{if(e instanceof r){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}s=s||{};let t=null;if(!s.rtl){t=e.match(o[i.COERCE])}else{let s;while((s=o[i.COERCERTL].exec(e))&&(!t||t.index+t[0].length!==e.length)){if(!t||s.index+s[0].length!==t.index+t[0].length){t=s}o[i.COERCERTL].lastIndex=s.index+s[1].length+s[2].length}o[i.COERCERTL].lastIndex=-1}if(t===null)return null;return n(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,s)};e.exports=a},156:(e,s,t)=>{const r=t(88);const n=(e,s,t)=>{const n=new r(e,t);const o=new r(s,t);return n.compare(o)||n.compareBuild(o)};e.exports=n},804:(e,s,t)=>{const r=t(309);const n=(e,s)=>r(e,s,true);e.exports=n},309:(e,s,t)=>{const r=t(88);const n=(e,s,t)=>new r(e,t).compare(new r(s,t));e.exports=n},297:(e,s,t)=>{const r=t(925);const n=t(898);const o=(e,s)=>{if(n(e,s)){return null}else{const t=r(e);const n=r(s);const o=t.prerelease.length||n.prerelease.length;const i=o?"pre":"";const a=o?"prerelease":"";for(const e in t){if(e==="major"||e==="minor"||e==="patch"){if(t[e]!==n[e]){return i+e}}}return a}};e.exports=o},898:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)===0;e.exports=n},123:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)>0;e.exports=n},522:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)>=0;e.exports=n},900:(e,s,t)=>{const r=t(88);const n=(e,s,t,n)=>{if(typeof t==="string"){n=t;t=undefined}try{return new r(e,t).inc(s,n).version}catch(e){return null}};e.exports=n},194:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)<0;e.exports=n},520:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)<=0;e.exports=n},688:(e,s,t)=>{const r=t(88);const n=(e,s)=>new r(e,s).major;e.exports=n},447:(e,s,t)=>{const r=t(88);const n=(e,s)=>new r(e,s).minor;e.exports=n},17:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)!==0;e.exports=n},925:(e,s,t)=>{const{MAX_LENGTH:r}=t(293);const{re:n,t:o}=t(523);const i=t(88);const a=(e,s)=>{if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(e instanceof i){return e}if(typeof e!=="string"){return null}if(e.length>r){return null}const t=s.loose?n[o.LOOSE]:n[o.FULL];if(!t.test(e)){return null}try{return new i(e,s)}catch(e){return null}};e.exports=a},866:(e,s,t)=>{const r=t(88);const n=(e,s)=>new r(e,s).patch;e.exports=n},16:(e,s,t)=>{const r=t(925);const n=(e,s)=>{const t=r(e,s);return t&&t.prerelease.length?t.prerelease:null};e.exports=n},417:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(s,e,t);e.exports=n},701:(e,s,t)=>{const r=t(156);const n=(e,s)=>e.sort((e,t)=>r(t,e,s));e.exports=n},55:(e,s,t)=>{const r=t(828);const n=(e,s,t)=>{try{s=new r(s,t)}catch(e){return false}return s.test(e)};e.exports=n},426:(e,s,t)=>{const r=t(156);const n=(e,s)=>e.sort((e,t)=>r(e,t,s));e.exports=n},601:(e,s,t)=>{const r=t(925);const n=(e,s)=>{const t=r(e,s);return t?t.version:null};e.exports=n},383:(e,s,t)=>{const r=t(523);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:t(293).SEMVER_SPEC_VERSION,SemVer:t(88),compareIdentifiers:t(463).compareIdentifiers,rcompareIdentifiers:t(463).rcompareIdentifiers,parse:t(925),valid:t(601),clean:t(848),inc:t(900),diff:t(297),major:t(688),minor:t(447),patch:t(866),prerelease:t(16),compare:t(309),rcompare:t(417),compareLoose:t(804),compareBuild:t(156),sort:t(426),rsort:t(701),gt:t(123),lt:t(194),eq:t(898),neq:t(17),gte:t(522),lte:t(520),cmp:t(98),coerce:t(466),Comparator:t(532),Range:t(828),satisfies:t(55),toComparators:t(706),maxSatisfying:t(579),minSatisfying:t(832),minVersion:t(179),validRange:t(741),outside:t(420),gtr:t(380),ltr:t(323),intersects:t(8),simplifyRange:t(561),subset:t(863)}},293:e=>{const s="2.0.0";const t=256;const r=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:s,MAX_LENGTH:t,MAX_SAFE_INTEGER:r,MAX_SAFE_COMPONENT_LENGTH:n}},427:e=>{const s=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=s},463:e=>{const s=/^[0-9]+$/;const t=(e,t)=>{const r=s.test(e);const n=s.test(t);if(r&&n){e=+e;t=+t}return e===t?0:r&&!n?-1:n&&!r?1:et(s,e);e.exports={compareIdentifiers:t,rcompareIdentifiers:r}},523:(e,s,t)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=t(293);const n=t(427);s=e.exports={};const o=s.re=[];const i=s.src=[];const a=s.t={};let l=0;const c=(e,s,t)=>{const r=l++;n(r,s);a[e]=r;i[r]=s;o[r]=new RegExp(s,t?"g":undefined)};c("NUMERICIDENTIFIER","0|[1-9]\\d*");c("NUMERICIDENTIFIERLOOSE","[0-9]+");c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");c("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.`+`(${i[a.NUMERICIDENTIFIER]})\\.`+`(${i[a.NUMERICIDENTIFIER]})`);c("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[a.NUMERICIDENTIFIERLOOSE]})`);c("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`);c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`);c("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`);c("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`);c("BUILDIDENTIFIER","[0-9A-Za-z-]+");c("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`);c("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`);c("FULL",`^${i[a.FULLPLAIN]}$`);c("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`);c("LOOSE",`^${i[a.LOOSEPLAIN]}$`);c("GTLT","((?:<|>)?=?)");c("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);c("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`);c("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})`+`(?:\\.(${i[a.XRANGEIDENTIFIER]})`+`(?:\\.(${i[a.XRANGEIDENTIFIER]})`+`(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?`+`)?)?`);c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?`+`)?)?`);c("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`);c("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`);c("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${r}})`+`(?:\\.(\\d{1,${r}}))?`+`(?:\\.(\\d{1,${r}}))?`+`(?:$|[^\\d])`);c("COERCERTL",i[a.COERCE],true);c("LONETILDE","(?:~>?)");c("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,true);s.tildeTrimReplace="$1~";c("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`);c("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`);c("LONECARET","(?:\\^)");c("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,true);s.caretTrimReplace="$1^";c("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`);c("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`);c("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`);c("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`);c("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,true);s.comparatorTrimReplace="$1$2$3";c("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${i[a.XRANGEPLAIN]})`+`\\s*$`);c("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${i[a.XRANGEPLAINLOOSE]})`+`\\s*$`);c("STAR","(<|>)?=?\\s*\\*");c("GTE0","^\\s*>=\\s*0.0.0\\s*$");c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},380:(e,s,t)=>{const r=t(420);const n=(e,s,t)=>r(e,s,">",t);e.exports=n},8:(e,s,t)=>{const r=t(828);const n=(e,s,t)=>{e=new r(e,t);s=new r(s,t);return e.intersects(s)};e.exports=n},323:(e,s,t)=>{const r=t(420);const n=(e,s,t)=>r(e,s,"<",t);e.exports=n},579:(e,s,t)=>{const r=t(88);const n=t(828);const o=(e,s,t)=>{let o=null;let i=null;let a=null;try{a=new n(s,t)}catch(e){return null}e.forEach(e=>{if(a.test(e)){if(!o||i.compare(e)===-1){o=e;i=new r(o,t)}}});return o};e.exports=o},832:(e,s,t)=>{const r=t(88);const n=t(828);const o=(e,s,t)=>{let o=null;let i=null;let a=null;try{a=new n(s,t)}catch(e){return null}e.forEach(e=>{if(a.test(e)){if(!o||i.compare(e)===1){o=e;i=new r(o,t)}}});return o};e.exports=o},179:(e,s,t)=>{const r=t(88);const n=t(828);const o=t(123);const i=(e,s)=>{e=new n(e,s);let t=new r("0.0.0");if(e.test(t)){return t}t=new r("0.0.0-0");if(e.test(t)){return t}t=null;for(let s=0;s{const s=new r(e.semver.version);switch(e.operator){case">":if(s.prerelease.length===0){s.patch++}else{s.prerelease.push(0)}s.raw=s.format();case"":case">=":if(!t||o(t,s)){t=s}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})}if(t&&e.test(t)){return t}return null};e.exports=i},420:(e,s,t)=>{const r=t(88);const n=t(532);const{ANY:o}=n;const i=t(828);const a=t(55);const l=t(123);const c=t(194);const E=t(520);const f=t(522);const u=(e,s,t,u)=>{e=new r(e,u);s=new i(s,u);let h,$,I,R,p;switch(t){case">":h=l;$=E;I=c;R=">";p=">=";break;case"<":h=c;$=f;I=l;R="<";p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,s,u)){return false}for(let t=0;t{if(e.semver===o){e=new n(">=0.0.0")}i=i||e;a=a||e;if(h(e.semver,i.semver,u)){i=e}else if(I(e.semver,a.semver,u)){a=e}});if(i.operator===R||i.operator===p){return false}if((!a.operator||a.operator===R)&&$(e,a.semver)){return false}else if(a.operator===p&&I(e,a.semver)){return false}}return true};e.exports=u},561:(e,s,t)=>{const r=t(55);const n=t(309);e.exports=((e,s,t)=>{const o=[];let i=null;let a=null;const l=e.sort((e,s)=>n(e,s,t));for(const e of l){const n=r(e,s,t);if(n){a=e;if(!i)i=e}else{if(a){o.push([i,a])}a=null;i=null}}if(i)o.push([i,null]);const c=[];for(const[e,s]of o){if(e===s)c.push(e);else if(!s&&e===l[0])c.push("*");else if(!s)c.push(`>=${e}`);else if(e===l[0])c.push(`<=${s}`);else c.push(`${e} - ${s}`)}const E=c.join(" || ");const f=typeof s.raw==="string"?s.raw:String(s);return E.length{const r=t(828);const{ANY:n}=t(532);const o=t(55);const i=t(309);const a=(e,s,t)=>{e=new r(e,t);s=new r(s,t);let n=false;e:for(const r of e.set){for(const e of s.set){const s=l(r,e,t);n=n||s!==null;if(s)continue e}if(n)return false}return true};const l=(e,s,t)=>{if(e.length===1&&e[0].semver===n)return s.length===1&&s[0].semver===n;const r=new Set;let a,l;for(const s of e){if(s.operator===">"||s.operator===">=")a=c(a,s,t);else if(s.operator==="<"||s.operator==="<=")l=E(l,s,t);else r.add(s.semver)}if(r.size>1)return null;let f;if(a&&l){f=i(a.semver,l.semver,t);if(f>0)return null;else if(f===0&&(a.operator!==">="||l.operator!=="<="))return null}for(const e of r){if(a&&!o(e,String(a),t))return null;if(l&&!o(e,String(l),t))return null;for(const r of s){if(!o(e,String(r),t))return false}return true}let u,h;let $,I;for(const e of s){I=I||e.operator===">"||e.operator===">=";$=$||e.operator==="<"||e.operator==="<=";if(a){if(e.operator===">"||e.operator===">="){u=c(a,e,t);if(u===e)return false}else if(a.operator===">="&&!o(a.semver,String(e),t))return false}if(l){if(e.operator==="<"||e.operator==="<="){h=E(l,e,t);if(h===e)return false}else if(l.operator==="<="&&!o(l.semver,String(e),t))return false}if(!e.operator&&(l||a)&&f!==0)return false}if(a&&$&&!l&&f!==0)return false;if(l&&I&&!a&&f!==0)return false;return true};const c=(e,s,t)=>{if(!e)return s;const r=i(e.semver,s.semver,t);return r>0?e:r<0?s:s.operator===">"&&e.operator===">="?s:e};const E=(e,s,t)=>{if(!e)return s;const r=i(e.semver,s.semver,t);return r<0?e:r>0?s:s.operator==="<"&&e.operator==="<="?s:e};e.exports=a},706:(e,s,t)=>{const r=t(828);const n=(e,s)=>new r(e,s).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "));e.exports=n},741:(e,s,t)=>{const r=t(828);const n=(e,s)=>{try{return new r(e,s).range||"*"}catch(e){return null}};e.exports=n}};var s={};function __webpack_require__(t){if(s[t]){return s[t].exports}var r=s[t]={exports:{}};var n=true;try{e[t](r,r.exports,__webpack_require__);n=false}finally{if(n)delete s[t]}return r.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(383)})(); \ No newline at end of file +module.exports=(()=>{var e={532:(e,s,t)=>{const r=Symbol("SemVer ANY");class Comparator{static get ANY(){return r}constructor(e,s){if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!s.loose){return e}else{e=e.value}}a("comparator",e,s);this.options=s;this.loose=!!s.loose;this.parse(e);if(this.semver===r){this.value=""}else{this.value=this.operator+this.semver.version}a("comp",this)}parse(e){const s=this.options.loose?n[o.COMPARATORLOOSE]:n[o.COMPARATOR];const t=e.match(s);if(!t){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=t[1]!==undefined?t[1]:"";if(this.operator==="="){this.operator=""}if(!t[2]){this.semver=r}else{this.semver=new l(t[2],this.options.loose)}}toString(){return this.value}test(e){a("Comparator.test",e,this.options.loose);if(this.semver===r||e===r){return true}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}return i(e,this.operator,this.semver,this.options)}intersects(e,s){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new c(e.value,s).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new c(this.value,s).test(e.semver)}const t=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const r=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const n=this.semver.version===e.semver.version;const o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const a=i(this.semver,"<",e.semver,s)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const l=i(this.semver,">",e.semver,s)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return t||r||n&&o||a||l}}e.exports=Comparator;const{re:n,t:o}=t(523);const i=t(98);const a=t(427);const l=t(88);const c=t(828)},828:(e,s,t)=>{class Range{constructor(e,s){if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!s.loose&&e.includePrerelease===!!s.includePrerelease){return e}else{return new Range(e.raw,s)}}if(e instanceof r){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=s;this.loose=!!s.loose;this.includePrerelease=!!s.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length);if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}this.format()}format(){this.range=this.set.map(e=>{return e.join(" ").trim()}).join("||").trim();return this.range}toString(){return this.range}parseRange(e){const s=this.options.loose;e=e.trim();const t=s?i[a.HYPHENRANGELOOSE]:i[a.HYPHENRANGE];e=e.replace(t,T(this.options.includePrerelease));n("hyphen replace",e);e=e.replace(i[a.COMPARATORTRIM],l);n("comparator trim",e,i[a.COMPARATORTRIM]);e=e.replace(i[a.TILDETRIM],c);e=e.replace(i[a.CARETTRIM],E);e=e.split(/\s+/).join(" ");const o=s?i[a.COMPARATORLOOSE]:i[a.COMPARATOR];return e.split(" ").map(e=>u(e,this.options)).join(" ").split(/\s+/).map(e=>A(e,this.options)).filter(this.options.loose?e=>!!e.match(o):()=>true).map(e=>new r(e,this.options))}intersects(e,s){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(t=>{return f(t,s)&&e.set.some(e=>{return f(e,s)&&t.every(t=>{return e.every(e=>{return t.intersects(e,s)})})})})}test(e){if(!e){return false}if(typeof e==="string"){try{e=new o(e,this.options)}catch(e){return false}}for(let s=0;s{let t=true;const r=e.slice();let n=r.pop();while(t&&r.length){t=r.every(e=>{return n.intersects(e,s)});n=r.pop()}return t};const u=(e,s)=>{n("comp",e,s);e=R(e,s);n("caret",e);e=$(e,s);n("tildes",e);e=N(e,s);n("xrange",e);e=L(e,s);n("stars",e);return e};const h=e=>!e||e.toLowerCase()==="x"||e==="*";const $=(e,s)=>e.trim().split(/\s+/).map(e=>{return I(e,s)}).join(" ");const I=(e,s)=>{const t=s.loose?i[a.TILDELOOSE]:i[a.TILDE];return e.replace(t,(s,t,r,o,i)=>{n("tilde",e,s,t,r,o,i);let a;if(h(t)){a=""}else if(h(r)){a=`>=${t}.0.0 <${+t+1}.0.0-0`}else if(h(o)){a=`>=${t}.${r}.0 <${t}.${+r+1}.0-0`}else if(i){n("replaceTilde pr",i);a=`>=${t}.${r}.${o}-${i} <${t}.${+r+1}.0-0`}else{a=`>=${t}.${r}.${o} <${t}.${+r+1}.0-0`}n("tilde return",a);return a})};const R=(e,s)=>e.trim().split(/\s+/).map(e=>{return p(e,s)}).join(" ");const p=(e,s)=>{n("caret",e,s);const t=s.loose?i[a.CARETLOOSE]:i[a.CARET];const r=s.includePrerelease?"-0":"";return e.replace(t,(s,t,o,i,a)=>{n("caret",e,s,t,o,i,a);let l;if(h(t)){l=""}else if(h(o)){l=`>=${t}.0.0${r} <${+t+1}.0.0-0`}else if(h(i)){if(t==="0"){l=`>=${t}.${o}.0${r} <${t}.${+o+1}.0-0`}else{l=`>=${t}.${o}.0${r} <${+t+1}.0.0-0`}}else if(a){n("replaceCaret pr",a);if(t==="0"){if(o==="0"){l=`>=${t}.${o}.${i}-${a} <${t}.${o}.${+i+1}-0`}else{l=`>=${t}.${o}.${i}-${a} <${t}.${+o+1}.0-0`}}else{l=`>=${t}.${o}.${i}-${a} <${+t+1}.0.0-0`}}else{n("no pr");if(t==="0"){if(o==="0"){l=`>=${t}.${o}.${i}${r} <${t}.${o}.${+i+1}-0`}else{l=`>=${t}.${o}.${i}${r} <${t}.${+o+1}.0-0`}}else{l=`>=${t}.${o}.${i} <${+t+1}.0.0-0`}}n("caret return",l);return l})};const N=(e,s)=>{n("replaceXRanges",e,s);return e.split(/\s+/).map(e=>{return O(e,s)}).join(" ")};const O=(e,s)=>{e=e.trim();const t=s.loose?i[a.XRANGELOOSE]:i[a.XRANGE];return e.replace(t,(t,r,o,i,a,l)=>{n("xRange",e,t,r,o,i,a,l);const c=h(o);const E=c||h(i);const f=E||h(a);const u=f;if(r==="="&&u){r=""}l=s.includePrerelease?"-0":"";if(c){if(r===">"||r==="<"){t="<0.0.0-0"}else{t="*"}}else if(r&&u){if(E){i=0}a=0;if(r===">"){r=">=";if(E){o=+o+1;i=0;a=0}else{i=+i+1;a=0}}else if(r==="<="){r="<";if(E){o=+o+1}else{i=+i+1}}if(r==="<")l="-0";t=`${r+o}.${i}.${a}${l}`}else if(E){t=`>=${o}.0.0${l} <${+o+1}.0.0-0`}else if(f){t=`>=${o}.${i}.0${l} <${o}.${+i+1}.0-0`}n("xRange return",t);return t})};const L=(e,s)=>{n("replaceStars",e,s);return e.trim().replace(i[a.STAR],"")};const A=(e,s)=>{n("replaceGTE0",e,s);return e.trim().replace(i[s.includePrerelease?a.GTE0PRE:a.GTE0],"")};const T=e=>(s,t,r,n,o,i,a,l,c,E,f,u,$)=>{if(h(r)){t=""}else if(h(n)){t=`>=${r}.0.0${e?"-0":""}`}else if(h(o)){t=`>=${r}.${n}.0${e?"-0":""}`}else if(i){t=`>=${t}`}else{t=`>=${t}${e?"-0":""}`}if(h(c)){l=""}else if(h(E)){l=`<${+c+1}.0.0-0`}else if(h(f)){l=`<${c}.${+E+1}.0-0`}else if(u){l=`<=${c}.${E}.${f}-${u}`}else if(e){l=`<${c}.${E}.${+f+1}-0`}else{l=`<=${l}`}return`${t} ${l}`.trim()};const S=(e,s,t)=>{for(let t=0;t0){const r=e[t].semver;if(r.major===s.major&&r.minor===s.minor&&r.patch===s.patch){return true}}}return false}return true}},88:(e,s,t)=>{const r=t(427);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:o}=t(293);const{re:i,t:a}=t(523);const{compareIdentifiers:l}=t(463);class SemVer{constructor(e,s){if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===!!s.loose&&e.includePrerelease===!!s.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}r("SemVer",e,s);this.options=s;this.loose=!!s.loose;this.includePrerelease=!!s.includePrerelease;const t=e.trim().match(s.loose?i[a.LOOSE]:i[a.FULL]);if(!t){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+t[1];this.minor=+t[2];this.patch=+t[3];if(this.major>o||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>o||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>o||this.patch<0){throw new TypeError("Invalid patch version")}if(!t[4]){this.prerelease=[]}else{this.prerelease=t[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const s=+e;if(s>=0&&s=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(s){if(this.prerelease[0]===s){if(isNaN(this.prerelease[1])){this.prerelease=[s,0]}}else{this.prerelease=[s,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},848:(e,s,t)=>{const r=t(925);const n=(e,s)=>{const t=r(e.trim().replace(/^[=v]+/,""),s);return t?t.version:null};e.exports=n},98:(e,s,t)=>{const r=t(898);const n=t(17);const o=t(123);const i=t(522);const a=t(194);const l=t(520);const c=(e,s,t,c)=>{switch(s){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;return e===t;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;return e!==t;case"":case"=":case"==":return r(e,t,c);case"!=":return n(e,t,c);case">":return o(e,t,c);case">=":return i(e,t,c);case"<":return a(e,t,c);case"<=":return l(e,t,c);default:throw new TypeError(`Invalid operator: ${s}`)}};e.exports=c},466:(e,s,t)=>{const r=t(88);const n=t(925);const{re:o,t:i}=t(523);const a=(e,s)=>{if(e instanceof r){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}s=s||{};let t=null;if(!s.rtl){t=e.match(o[i.COERCE])}else{let s;while((s=o[i.COERCERTL].exec(e))&&(!t||t.index+t[0].length!==e.length)){if(!t||s.index+s[0].length!==t.index+t[0].length){t=s}o[i.COERCERTL].lastIndex=s.index+s[1].length+s[2].length}o[i.COERCERTL].lastIndex=-1}if(t===null)return null;return n(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,s)};e.exports=a},156:(e,s,t)=>{const r=t(88);const n=(e,s,t)=>{const n=new r(e,t);const o=new r(s,t);return n.compare(o)||n.compareBuild(o)};e.exports=n},804:(e,s,t)=>{const r=t(309);const n=(e,s)=>r(e,s,true);e.exports=n},309:(e,s,t)=>{const r=t(88);const n=(e,s,t)=>new r(e,t).compare(new r(s,t));e.exports=n},297:(e,s,t)=>{const r=t(925);const n=t(898);const o=(e,s)=>{if(n(e,s)){return null}else{const t=r(e);const n=r(s);const o=t.prerelease.length||n.prerelease.length;const i=o?"pre":"";const a=o?"prerelease":"";for(const e in t){if(e==="major"||e==="minor"||e==="patch"){if(t[e]!==n[e]){return i+e}}}return a}};e.exports=o},898:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)===0;e.exports=n},123:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)>0;e.exports=n},522:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)>=0;e.exports=n},900:(e,s,t)=>{const r=t(88);const n=(e,s,t,n)=>{if(typeof t==="string"){n=t;t=undefined}try{return new r(e,t).inc(s,n).version}catch(e){return null}};e.exports=n},194:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)<0;e.exports=n},520:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)<=0;e.exports=n},688:(e,s,t)=>{const r=t(88);const n=(e,s)=>new r(e,s).major;e.exports=n},447:(e,s,t)=>{const r=t(88);const n=(e,s)=>new r(e,s).minor;e.exports=n},17:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(e,s,t)!==0;e.exports=n},925:(e,s,t)=>{const{MAX_LENGTH:r}=t(293);const{re:n,t:o}=t(523);const i=t(88);const a=(e,s)=>{if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(e instanceof i){return e}if(typeof e!=="string"){return null}if(e.length>r){return null}const t=s.loose?n[o.LOOSE]:n[o.FULL];if(!t.test(e)){return null}try{return new i(e,s)}catch(e){return null}};e.exports=a},866:(e,s,t)=>{const r=t(88);const n=(e,s)=>new r(e,s).patch;e.exports=n},16:(e,s,t)=>{const r=t(925);const n=(e,s)=>{const t=r(e,s);return t&&t.prerelease.length?t.prerelease:null};e.exports=n},417:(e,s,t)=>{const r=t(309);const n=(e,s,t)=>r(s,e,t);e.exports=n},701:(e,s,t)=>{const r=t(156);const n=(e,s)=>e.sort((e,t)=>r(t,e,s));e.exports=n},55:(e,s,t)=>{const r=t(828);const n=(e,s,t)=>{try{s=new r(s,t)}catch(e){return false}return s.test(e)};e.exports=n},426:(e,s,t)=>{const r=t(156);const n=(e,s)=>e.sort((e,t)=>r(e,t,s));e.exports=n},601:(e,s,t)=>{const r=t(925);const n=(e,s)=>{const t=r(e,s);return t?t.version:null};e.exports=n},383:(e,s,t)=>{const r=t(523);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:t(293).SEMVER_SPEC_VERSION,SemVer:t(88),compareIdentifiers:t(463).compareIdentifiers,rcompareIdentifiers:t(463).rcompareIdentifiers,parse:t(925),valid:t(601),clean:t(848),inc:t(900),diff:t(297),major:t(688),minor:t(447),patch:t(866),prerelease:t(16),compare:t(309),rcompare:t(417),compareLoose:t(804),compareBuild:t(156),sort:t(426),rsort:t(701),gt:t(123),lt:t(194),eq:t(898),neq:t(17),gte:t(522),lte:t(520),cmp:t(98),coerce:t(466),Comparator:t(532),Range:t(828),satisfies:t(55),toComparators:t(706),maxSatisfying:t(579),minSatisfying:t(832),minVersion:t(179),validRange:t(741),outside:t(420),gtr:t(380),ltr:t(323),intersects:t(8),simplifyRange:t(561),subset:t(863)}},293:e=>{const s="2.0.0";const t=256;const r=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:s,MAX_LENGTH:t,MAX_SAFE_INTEGER:r,MAX_SAFE_COMPONENT_LENGTH:n}},427:e=>{const s=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=s},463:e=>{const s=/^[0-9]+$/;const t=(e,t)=>{const r=s.test(e);const n=s.test(t);if(r&&n){e=+e;t=+t}return e===t?0:r&&!n?-1:n&&!r?1:et(s,e);e.exports={compareIdentifiers:t,rcompareIdentifiers:r}},523:(e,s,t)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=t(293);const n=t(427);s=e.exports={};const o=s.re=[];const i=s.src=[];const a=s.t={};let l=0;const c=(e,s,t)=>{const r=l++;n(r,s);a[e]=r;i[r]=s;o[r]=new RegExp(s,t?"g":undefined)};c("NUMERICIDENTIFIER","0|[1-9]\\d*");c("NUMERICIDENTIFIERLOOSE","[0-9]+");c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");c("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.`+`(${i[a.NUMERICIDENTIFIER]})\\.`+`(${i[a.NUMERICIDENTIFIER]})`);c("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[a.NUMERICIDENTIFIERLOOSE]})`);c("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`);c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`);c("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`);c("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`);c("BUILDIDENTIFIER","[0-9A-Za-z-]+");c("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`);c("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`);c("FULL",`^${i[a.FULLPLAIN]}$`);c("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`);c("LOOSE",`^${i[a.LOOSEPLAIN]}$`);c("GTLT","((?:<|>)?=?)");c("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);c("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`);c("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})`+`(?:\\.(${i[a.XRANGEIDENTIFIER]})`+`(?:\\.(${i[a.XRANGEIDENTIFIER]})`+`(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?`+`)?)?`);c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?`+`)?)?`);c("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`);c("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`);c("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${r}})`+`(?:\\.(\\d{1,${r}}))?`+`(?:\\.(\\d{1,${r}}))?`+`(?:$|[^\\d])`);c("COERCERTL",i[a.COERCE],true);c("LONETILDE","(?:~>?)");c("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,true);s.tildeTrimReplace="$1~";c("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`);c("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`);c("LONECARET","(?:\\^)");c("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,true);s.caretTrimReplace="$1^";c("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`);c("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`);c("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`);c("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`);c("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,true);s.comparatorTrimReplace="$1$2$3";c("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${i[a.XRANGEPLAIN]})`+`\\s*$`);c("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${i[a.XRANGEPLAINLOOSE]})`+`\\s*$`);c("STAR","(<|>)?=?\\s*\\*");c("GTE0","^\\s*>=\\s*0.0.0\\s*$");c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},380:(e,s,t)=>{const r=t(420);const n=(e,s,t)=>r(e,s,">",t);e.exports=n},8:(e,s,t)=>{const r=t(828);const n=(e,s,t)=>{e=new r(e,t);s=new r(s,t);return e.intersects(s)};e.exports=n},323:(e,s,t)=>{const r=t(420);const n=(e,s,t)=>r(e,s,"<",t);e.exports=n},579:(e,s,t)=>{const r=t(88);const n=t(828);const o=(e,s,t)=>{let o=null;let i=null;let a=null;try{a=new n(s,t)}catch(e){return null}e.forEach(e=>{if(a.test(e)){if(!o||i.compare(e)===-1){o=e;i=new r(o,t)}}});return o};e.exports=o},832:(e,s,t)=>{const r=t(88);const n=t(828);const o=(e,s,t)=>{let o=null;let i=null;let a=null;try{a=new n(s,t)}catch(e){return null}e.forEach(e=>{if(a.test(e)){if(!o||i.compare(e)===1){o=e;i=new r(o,t)}}});return o};e.exports=o},179:(e,s,t)=>{const r=t(88);const n=t(828);const o=t(123);const i=(e,s)=>{e=new n(e,s);let t=new r("0.0.0");if(e.test(t)){return t}t=new r("0.0.0-0");if(e.test(t)){return t}t=null;for(let s=0;s{const s=new r(e.semver.version);switch(e.operator){case">":if(s.prerelease.length===0){s.patch++}else{s.prerelease.push(0)}s.raw=s.format();case"":case">=":if(!t||o(t,s)){t=s}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})}if(t&&e.test(t)){return t}return null};e.exports=i},420:(e,s,t)=>{const r=t(88);const n=t(532);const{ANY:o}=n;const i=t(828);const a=t(55);const l=t(123);const c=t(194);const E=t(520);const f=t(522);const u=(e,s,t,u)=>{e=new r(e,u);s=new i(s,u);let h,$,I,R,p;switch(t){case">":h=l;$=E;I=c;R=">";p=">=";break;case"<":h=c;$=f;I=l;R="<";p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,s,u)){return false}for(let t=0;t{if(e.semver===o){e=new n(">=0.0.0")}i=i||e;a=a||e;if(h(e.semver,i.semver,u)){i=e}else if(I(e.semver,a.semver,u)){a=e}});if(i.operator===R||i.operator===p){return false}if((!a.operator||a.operator===R)&&$(e,a.semver)){return false}else if(a.operator===p&&I(e,a.semver)){return false}}return true};e.exports=u},561:(e,s,t)=>{const r=t(55);const n=t(309);e.exports=((e,s,t)=>{const o=[];let i=null;let a=null;const l=e.sort((e,s)=>n(e,s,t));for(const e of l){const n=r(e,s,t);if(n){a=e;if(!i)i=e}else{if(a){o.push([i,a])}a=null;i=null}}if(i)o.push([i,null]);const c=[];for(const[e,s]of o){if(e===s)c.push(e);else if(!s&&e===l[0])c.push("*");else if(!s)c.push(`>=${e}`);else if(e===l[0])c.push(`<=${s}`);else c.push(`${e} - ${s}`)}const E=c.join(" || ");const f=typeof s.raw==="string"?s.raw:String(s);return E.length{const r=t(828);const{ANY:n}=t(532);const o=t(55);const i=t(309);const a=(e,s,t)=>{e=new r(e,t);s=new r(s,t);let n=false;e:for(const r of e.set){for(const e of s.set){const s=l(r,e,t);n=n||s!==null;if(s)continue e}if(n)return false}return true};const l=(e,s,t)=>{if(e.length===1&&e[0].semver===n)return s.length===1&&s[0].semver===n;const r=new Set;let a,l;for(const s of e){if(s.operator===">"||s.operator===">=")a=c(a,s,t);else if(s.operator==="<"||s.operator==="<=")l=E(l,s,t);else r.add(s.semver)}if(r.size>1)return null;let f;if(a&&l){f=i(a.semver,l.semver,t);if(f>0)return null;else if(f===0&&(a.operator!==">="||l.operator!=="<="))return null}for(const e of r){if(a&&!o(e,String(a),t))return null;if(l&&!o(e,String(l),t))return null;for(const r of s){if(!o(e,String(r),t))return false}return true}let u,h;let $,I;for(const e of s){I=I||e.operator===">"||e.operator===">=";$=$||e.operator==="<"||e.operator==="<=";if(a){if(e.operator===">"||e.operator===">="){u=c(a,e,t);if(u===e)return false}else if(a.operator===">="&&!o(a.semver,String(e),t))return false}if(l){if(e.operator==="<"||e.operator==="<="){h=E(l,e,t);if(h===e)return false}else if(l.operator==="<="&&!o(l.semver,String(e),t))return false}if(!e.operator&&(l||a)&&f!==0)return false}if(a&&$&&!l&&f!==0)return false;if(l&&I&&!a&&f!==0)return false;return true};const c=(e,s,t)=>{if(!e)return s;const r=i(e.semver,s.semver,t);return r>0?e:r<0?s:s.operator===">"&&e.operator===">="?s:e};const E=(e,s,t)=>{if(!e)return s;const r=i(e.semver,s.semver,t);return r<0?e:r>0?s:s.operator==="<"&&e.operator==="<="?s:e};e.exports=a},706:(e,s,t)=>{const r=t(828);const n=(e,s)=>new r(e,s).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "));e.exports=n},741:(e,s,t)=>{const r=t(828);const n=(e,s)=>{try{return new r(e,s).range||"*"}catch(e){return null}};e.exports=n}};var s={};function __nccwpck_require__(t){if(s[t]){return s[t].exports}var r=s[t]={exports:{}};var n=true;try{e[t](r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete s[t]}return r.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(383)})(); \ No newline at end of file diff --git a/packages/next/compiled/send/index.js b/packages/next/compiled/send/index.js index ad5ff4d5e98895d..d285b8a8b6ea23b 100644 --- a/packages/next/compiled/send/index.js +++ b/packages/next/compiled/send/index.js @@ -1 +1 @@ -module.exports=(()=>{var __webpack_modules__={14:e=>{"use strict";e.exports=JSON.parse('{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":[],"application/font-woff2":[],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}')},254:e=>{"use strict";e.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},329:(module,__unused_webpack_exports,__webpack_require__)=>{var callSiteToString=__webpack_require__(23).callSiteToString;var eventListenerCount=__webpack_require__(23).eventListenerCount;var relative=__webpack_require__(622).relative;module.exports=depd;var basePath=process.cwd();function containsNamespace(e,t){var a=e.split(/[ ,]+/);var i=String(t).toLowerCase();for(var n=0;n";var a=e.getLineNumber();var i=e.getColumnNumber();if(e.isEval()){t=e.getEvalOrigin()+", "+t}var n=[t,a,i];n.callSite=e;n.name=e.getFunctionName();return n}function defaultMessage(e){var t=e.callSite;var a=e.name;if(!a){a=""}var i=t.getThis();var n=i&&t.getTypeName();if(n==="Object"){n=undefined}if(n==="Function"){n=i.name||n}return n&&t.getMethodName()?n+"."+a:a}function formatPlain(e,t,a){var i=(new Date).toUTCString();var n=i+" "+this._namespace+" deprecated "+e;if(this._traced){for(var r=0;r{"use strict";e.exports=callSiteToString;function callSiteFileLocation(e){var t;var a="";if(e.isNative()){a="native"}else if(e.isEval()){t=e.getScriptNameOrSourceURL();if(!t){a=e.getEvalOrigin()}}else{t=e.getFileName()}if(t){a+=t;var i=e.getLineNumber();if(i!=null){a+=":"+i;var n=e.getColumnNumber();if(n){a+=":"+n}}}return a||"unknown source"}function callSiteToString(e){var t=true;var a=callSiteFileLocation(e);var i=e.getFunctionName();var n=e.isConstructor();var r=!(e.isToplevel()||n);var o="";if(r){var p=e.getMethodName();var s=getConstructorName(e);if(i){if(s&&i.indexOf(s)!==0){o+=s+"."}o+=i;if(p&&i.lastIndexOf("."+p)!==i.length-p.length-1){o+=" [as "+p+"]"}}else{o+=s+"."+(p||"")}}else if(n){o+="new "+(i||"")}else if(i){o+=i}else{t=false;o+=a}if(t){o+=" ("+a+")"}return o}function getConstructorName(e){var t=e.receiver;return t.constructor&&t.constructor.name||null}},438:e=>{"use strict";e.exports=eventListenerCount;function eventListenerCount(e,t){return e.listeners(t).length}},23:(e,t,a)=>{"use strict";var i=a(614).EventEmitter;lazyProperty(e.exports,"callSiteToString",function callSiteToString(){var e=Error.stackTraceLimit;var t={};var i=Error.prepareStackTrace;function prepareObjectStackTrace(e,t){return t}Error.prepareStackTrace=prepareObjectStackTrace;Error.stackTraceLimit=2;Error.captureStackTrace(t);var n=t.stack.slice();Error.prepareStackTrace=i;Error.stackTraceLimit=e;return n[0].toString?toString:a(911)});lazyProperty(e.exports,"eventListenerCount",function eventListenerCount(){return i.listenerCount||a(438)});function lazyProperty(e,t,a){function get(){var i=a();Object.defineProperty(e,t,{configurable:true,enumerable:true,value:i});return i}Object.defineProperty(e,t,{configurable:true,enumerable:true,get:get})}function toString(e){return e.toString()}},313:(e,t,a)=>{"use strict";var i=a(747).ReadStream;var n=a(413);e.exports=destroy;function destroy(e){if(e instanceof i){return destroyReadStream(e)}if(!(e instanceof n)){return e}if(typeof e.destroy==="function"){e.destroy()}return e}function destroyReadStream(e){e.destroy();if(typeof e.close==="function"){e.on("open",onOpenClose)}return e}function onOpenClose(){if(typeof this.fd==="number"){this.close()}}},801:e=>{"use strict";e.exports=first;function first(e,t){if(!Array.isArray(e))throw new TypeError("arg must be an array of [ee, events...] arrays");var a=[];for(var i=0;i{"use strict";e.exports=encodeUrl;var t=/(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g;var a=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g;var i="$1�$2";function encodeUrl(e){return String(e).replace(a,i).replace(t,encodeURI)}},283:e=>{"use strict";var t=/["'&<>]/;e.exports=escapeHtml;function escapeHtml(e){var a=""+e;var i=t.exec(a);if(!i){return a}var n;var r="";var o=0;var p=0;for(o=i.index;o{"use strict";e.exports=etag;var i=a(417);var n=a(747).Stats;var r=Object.prototype.toString;function entitytag(e){if(e.length===0){return'"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'}var t=i.createHash("sha1").update(e,"utf8").digest("base64").substring(0,27);var a=typeof e==="string"?Buffer.byteLength(e,"utf8"):e.length;return'"'+a.toString(16)+"-"+t+'"'}function etag(e,t){if(e==null){throw new TypeError("argument entity is required")}var a=isstats(e);var i=t&&typeof t.weak==="boolean"?t.weak:a;if(!a&&typeof e!=="string"&&!Buffer.isBuffer(e)){throw new TypeError("argument entity must be string, Buffer, or fs.Stats")}var n=a?stattag(e):entitytag(e);return i?"W/"+n:n}function isstats(e){if(typeof n==="function"&&e instanceof n){return true}return e&&typeof e==="object"&&"ctime"in e&&r.call(e.ctime)==="[object Date]"&&"mtime"in e&&r.call(e.mtime)==="[object Date]"&&"ino"in e&&typeof e.ino==="number"&&"size"in e&&typeof e.size==="number"}function stattag(e){var t=e.mtime.getTime().toString(16);var a=e.size.toString(16);return'"'+a+"-"+t+'"'}},989:(e,t,a)=>{try{var i=a(669);if(typeof i.inherits!=="function")throw"";e.exports=i.inherits}catch(t){e.exports=a(350)}},350:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var a=function(){};a.prototype=t.prototype;e.prototype=new a;e.prototype.constructor=e}}}},550:(e,t,a)=>{var i=a(622);var n=a(747);function Mime(){this.types=Object.create(null);this.extensions=Object.create(null)}Mime.prototype.define=function(e){for(var t in e){var a=e[t];for(var i=0;i{"use strict";e.exports=onFinished;e.exports.isFinished=isFinished;var i=a(801);var n=typeof setImmediate==="function"?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))};function onFinished(e,t){if(isFinished(e)!==false){n(t,null,e);return e}attachListener(e,t);return e}function isFinished(e){var t=e.socket;if(typeof e.finished==="boolean"){return Boolean(e.finished||t&&!t.writable)}if(typeof e.complete==="boolean"){return Boolean(e.upgrade||!t||!t.readable||e.complete&&!e.readable)}return undefined}function attachFinishedListener(e,t){var a;var n;var r=false;function onFinish(e){a.cancel();n.cancel();r=true;t(e)}a=n=i([[e,"end","finish"]],onFinish);function onSocket(t){e.removeListener("socket",onSocket);if(r)return;if(a!==n)return;n=i([[t,"error","close"]],onFinish)}if(e.socket){onSocket(e.socket);return}e.on("socket",onSocket);if(e.socket===undefined){patchAssignSocket(e,onSocket)}}function attachListener(e,t){var a=e.__onFinished;if(!a||!a.queue){a=e.__onFinished=createListener(e);attachFinishedListener(e,a)}a.queue.push(t)}function createListener(e){function listener(t){if(e.__onFinished===listener)e.__onFinished=null;if(!listener.queue)return;var a=listener.queue;listener.queue=null;for(var i=0;i{"use strict";e.exports=rangeParser;function rangeParser(e,t,a){if(typeof t!=="string"){throw new TypeError("argument str must be a string")}var i=t.indexOf("=");if(i===-1){return-2}var n=t.slice(i+1).split(",");var r=[];r.type=t.slice(0,i);for(var o=0;oe-1){c=e-1}if(isNaN(s)||isNaN(c)||s>c||s<0){continue}r.push({start:s,end:c})}if(r.length<1){return-1}return a&&a.combine?combineRanges(r):r}function combineRanges(e){var t=e.map(mapWithIndex).sort(sortByRangeStart);for(var a=0,i=1;ir.end+1){t[++a]=n}else if(n.end>r.end){r.end=n.end;r.index=Math.min(r.index,n.index)}}t.length=a+1;var o=t.sort(sortByRangeIndex).map(mapWithoutIndex);o.type=e.type;return o}function mapWithIndex(e,t){return{start:e.start,end:e.end,index:t}}function mapWithoutIndex(e){return{start:e.start,end:e.end}}function sortByRangeIndex(e,t){return e.index-t.index}function sortByRangeStart(e,t){return e.start-t.start}},342:(e,t,a)=>{"use strict";var i=a(599);var n=a(185)("send");var r=a(329)("send");var o=a(313);var p=a(874);var s=a(283);var c=a(542);var l=a(554);var d=a(747);var m=a(550);var u=a(536);var v=a(540);var f=a(320);var x=a(622);var g=a(664);var h=a(413);var b=a(669);var y=x.extname;var w=x.join;var k=x.normalize;var S=x.resolve;var _=x.sep;var j=/^ *bytes=/;var E=60*60*24*365*1e3;var C=/(?:^|[\\/])\.\.(?:[\\/]|$)/;e.exports=send;e.exports.mime=m;function send(e,t,a){return new SendStream(e,t,a)}function SendStream(e,t,a){h.call(this);var i=a||{};this.options=i;this.path=t;this.req=e;this._acceptRanges=i.acceptRanges!==undefined?Boolean(i.acceptRanges):true;this._cacheControl=i.cacheControl!==undefined?Boolean(i.cacheControl):true;this._etag=i.etag!==undefined?Boolean(i.etag):true;this._dotfiles=i.dotfiles!==undefined?i.dotfiles:"ignore";if(this._dotfiles!=="ignore"&&this._dotfiles!=="allow"&&this._dotfiles!=="deny"){throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"')}this._hidden=Boolean(i.hidden);if(i.hidden!==undefined){r("hidden: use dotfiles: '"+(this._hidden?"allow":"ignore")+"' instead")}if(i.dotfiles===undefined){this._dotfiles=undefined}this._extensions=i.extensions!==undefined?normalizeList(i.extensions,"extensions option"):[];this._immutable=i.immutable!==undefined?Boolean(i.immutable):false;this._index=i.index!==undefined?normalizeList(i.index,"index option"):["index.html"];this._lastModified=i.lastModified!==undefined?Boolean(i.lastModified):true;this._maxage=i.maxAge||i.maxage;this._maxage=typeof this._maxage==="string"?u(this._maxage):Number(this._maxage);this._maxage=!isNaN(this._maxage)?Math.min(Math.max(0,this._maxage),E):0;this._root=i.root?S(i.root):null;if(!this._root&&i.from){this.from(i.from)}}b.inherits(SendStream,h);SendStream.prototype.etag=r.function(function etag(e){this._etag=Boolean(e);n("etag %s",this._etag);return this},"send.etag: pass etag as option");SendStream.prototype.hidden=r.function(function hidden(e){this._hidden=Boolean(e);this._dotfiles=undefined;n("hidden %s",this._hidden);return this},"send.hidden: use dotfiles option");SendStream.prototype.index=r.function(function index(e){var index=!e?[]:normalizeList(e,"paths argument");n("index %o",e);this._index=index;return this},"send.index: pass index as option");SendStream.prototype.root=function root(e){this._root=S(String(e));n("root %s",this._root);return this};SendStream.prototype.from=r.function(SendStream.prototype.root,"send.from: pass root as option");SendStream.prototype.root=r.function(SendStream.prototype.root,"send.root: pass root as option");SendStream.prototype.maxage=r.function(function maxage(e){this._maxage=typeof e==="string"?u(e):Number(e);this._maxage=!isNaN(this._maxage)?Math.min(Math.max(0,this._maxage),E):0;n("max-age %d",this._maxage);return this},"send.maxage: pass maxAge as option");SendStream.prototype.error=function error(e,t){if(hasListeners(this,"error")){return this.emit("error",i(e,t,{expose:false}))}var a=this.res;var n=g[e]||String(e);var r=createHtmlDocument("Error",s(n));clearHeaders(a);if(t&&t.headers){setHeaders(a,t.headers)}a.statusCode=e;a.setHeader("Content-Type","text/html; charset=UTF-8");a.setHeader("Content-Length",Buffer.byteLength(r));a.setHeader("Content-Security-Policy","default-src 'none'");a.setHeader("X-Content-Type-Options","nosniff");a.end(r)};SendStream.prototype.hasTrailingSlash=function hasTrailingSlash(){return this.path[this.path.length-1]==="/"};SendStream.prototype.isConditionalGET=function isConditionalGET(){return this.req.headers["if-match"]||this.req.headers["if-unmodified-since"]||this.req.headers["if-none-match"]||this.req.headers["if-modified-since"]};SendStream.prototype.isPreconditionFailure=function isPreconditionFailure(){var e=this.req;var t=this.res;var a=e.headers["if-match"];if(a){var i=t.getHeader("ETag");return!i||a!=="*"&&parseTokenList(a).every(function(e){return e!==i&&e!=="W/"+i&&"W/"+e!==i})}var n=parseHttpDate(e.headers["if-unmodified-since"]);if(!isNaN(n)){var r=parseHttpDate(t.getHeader("Last-Modified"));return isNaN(r)||r>n}return false};SendStream.prototype.removeContentHeaderFields=function removeContentHeaderFields(){var e=this.res;var t=getHeaderNames(e);for(var a=0;a=200&&e<300||e===304};SendStream.prototype.onStatError=function onStatError(e){switch(e.code){case"ENAMETOOLONG":case"ENOENT":case"ENOTDIR":this.error(404,e);break;default:this.error(500,e);break}};SendStream.prototype.isFresh=function isFresh(){return l(this.req.headers,{etag:this.res.getHeader("ETag"),"last-modified":this.res.getHeader("Last-Modified")})};SendStream.prototype.isRangeFresh=function isRangeFresh(){var e=this.req.headers["if-range"];if(!e){return true}if(e.indexOf('"')!==-1){var t=this.res.getHeader("ETag");return Boolean(t&&e.indexOf(t)!==-1)}var a=this.res.getHeader("Last-Modified");return parseHttpDate(a)<=parseHttpDate(e)};SendStream.prototype.redirect=function redirect(e){var t=this.res;if(hasListeners(this,"directory")){this.emit("directory",t,e);return}if(this.hasTrailingSlash()){this.error(403);return}var a=p(collapseLeadingSlashes(this.path+"/"));var i=createHtmlDocument("Redirecting",'Redirecting to '+s(a)+"");t.statusCode=301;t.setHeader("Content-Type","text/html; charset=UTF-8");t.setHeader("Content-Length",Buffer.byteLength(i));t.setHeader("Content-Security-Policy","default-src 'none'");t.setHeader("X-Content-Type-Options","nosniff");t.setHeader("Location",a);t.end(i)};SendStream.prototype.pipe=function pipe(e){var t=this._root;this.res=e;var a=decode(this.path);if(a===-1){this.error(400);return e}if(~a.indexOf("\0")){this.error(400);return e}var i;if(t!==null){if(a){a=k("."+_+a)}if(C.test(a)){n('malicious path "%s"',a);this.error(403);return e}i=a.split(_);a=k(w(t,a))}else{if(C.test(a)){n('malicious path "%s"',a);this.error(403);return e}i=k(a).split(_);a=S(a)}if(containsDotFile(i)){var r=this._dotfiles;if(r===undefined){r=i[i.length-1][0]==="."?this._hidden?"allow":"ignore":"allow"}n('%s dotfile "%s"',r,a);switch(r){case"allow":break;case"deny":this.error(403);return e;case"ignore":default:this.error(404);return e}}if(this._index.length&&this.hasTrailingSlash()){this.sendIndex(a);return e}this.sendFile(a);return e};SendStream.prototype.send=function send(e,t){var a=t.size;var i=this.options;var r={};var o=this.res;var p=this.req;var s=p.headers.range;var c=i.start||0;if(headersSent(o)){this.headersAlreadySent();return}n('pipe "%s"',e);this.setHeader(e,t);this.type(e);if(this.isConditionalGET()){if(this.isPreconditionFailure()){this.error(412);return}if(this.isCachable()&&this.isFresh()){this.notModified();return}}a=Math.max(0,a-c);if(i.end!==undefined){var l=i.end-c+1;if(a>l)a=l}if(this._acceptRanges&&j.test(s)){s=f(a,s,{combine:true});if(!this.isRangeFresh()){n("range stale");s=-2}if(s===-1){n("range unsatisfiable");o.setHeader("Content-Range",contentRange("bytes",a));return this.error(416,{headers:{"Content-Range":o.getHeader("Content-Range")}})}if(s!==-2&&s.length===1){n("range %j",s);o.statusCode=206;o.setHeader("Content-Range",contentRange("bytes",a,s[0]));c+=s[0].start;a=s[0].end-s[0].start+1}}for(var d in i){r[d]=i[d]}r.start=c;r.end=Math.max(c,c+a-1);o.setHeader("Content-Length",a);if(p.method==="HEAD"){o.end();return}this.stream(e,r)};SendStream.prototype.sendFile=function sendFile(e){var t=0;var a=this;n('stat "%s"',e);d.stat(e,function onstat(t,i){if(t&&t.code==="ENOENT"&&!y(e)&&e[e.length-1]!==_){return next(t)}if(t)return a.onStatError(t);if(i.isDirectory())return a.redirect(e);a.emit("file",e,i);a.send(e,i)});function next(i){if(a._extensions.length<=t){return i?a.onStatError(i):a.error(404)}var r=e+"."+a._extensions[t++];n('stat "%s"',r);d.stat(r,function(e,t){if(e)return next(e);if(t.isDirectory())return next();a.emit("file",r,t);a.send(r,t)})}};SendStream.prototype.sendIndex=function sendIndex(e){var t=-1;var a=this;function next(i){if(++t>=a._index.length){if(i)return a.onStatError(i);return a.error(404)}var r=w(e,a._index[t]);n('stat "%s"',r);d.stat(r,function(e,t){if(e)return next(e);if(t.isDirectory())return next();a.emit("file",r,t);a.send(r,t)})}next()};SendStream.prototype.stream=function stream(e,t){var a=false;var i=this;var n=this.res;var stream=d.createReadStream(e,t);this.emit("stream",stream);stream.pipe(n);v(n,function onfinished(){a=true;o(stream)});stream.on("error",function onerror(e){if(a)return;a=true;o(stream);i.onStatError(e)});stream.on("end",function onend(){i.emit("end")})};SendStream.prototype.type=function type(e){var t=this.res;if(t.getHeader("Content-Type"))return;var type=m.lookup(e);if(!type){n("no content-type");return}var a=m.charsets.lookup(type);n("content-type %s",type);t.setHeader("Content-Type",type+(a?"; charset="+a:""))};SendStream.prototype.setHeader=function setHeader(e,t){var a=this.res;this.emit("headers",a,e,t);if(this._acceptRanges&&!a.getHeader("Accept-Ranges")){n("accept ranges");a.setHeader("Accept-Ranges","bytes")}if(this._cacheControl&&!a.getHeader("Cache-Control")){var i="public, max-age="+Math.floor(this._maxage/1e3);if(this._immutable){i+=", immutable"}n("cache-control %s",i);a.setHeader("Cache-Control",i)}if(this._lastModified&&!a.getHeader("Last-Modified")){var r=t.mtime.toUTCString();n("modified %s",r);a.setHeader("Last-Modified",r)}if(this._etag&&!a.getHeader("ETag")){var o=c(t);n("etag %s",o);a.setHeader("ETag",o)}};function clearHeaders(e){var t=getHeaderNames(e);for(var a=0;a1?"/"+e.substr(t):e}function containsDotFile(e){for(var t=0;t1&&a[0]==="."){return true}}return false}function contentRange(e,t,a){return e+" "+(a?a.start+"-"+a.end:"*")+"/"+t}function createHtmlDocument(e,t){return"\n"+'\n'+"\n"+'\n'+""+e+"\n"+"\n"+"\n"+"
"+t+"
\n"+"\n"+"\n"}function decode(e){try{return decodeURIComponent(e)}catch(e){return-1}}function getHeaderNames(e){return typeof e.getHeaderNames!=="function"?Object.keys(e._headers||{}):e.getHeaderNames()}function hasListeners(e,t){var a=typeof e.listenerCount!=="function"?e.listeners(t).length:e.listenerCount(t);return a>0}function headersSent(e){return typeof e.headersSent!=="boolean"?Boolean(e._header):e.headersSent}function normalizeList(e,t){var a=[].concat(e||[]);for(var i=0;i{"use strict";var i=a(329)("http-errors");var n=a(226);var r=a(664);var o=a(989);var p=a(481);e.exports=createError;e.exports.HttpError=createHttpErrorConstructor();populateConstructorExports(e.exports,r.codes,e.exports.HttpError);function codeClass(e){return Number(String(e).charAt(0)+"00")}function createError(){var e;var t;var a=500;var n={};for(var o=0;o=600)){i("non-error status code; use only 4xx or 5xx status codes")}if(typeof a!=="number"||!r[a]&&(a<400||a>=600)){a=500}var s=createError[a]||createError[codeClass(a)];if(!e){e=s?new s(t):new Error(t||r[a]);Error.captureStackTrace(e,createError)}if(!s||!(e instanceof s)||e.status!==a){e.expose=a<500;e.status=e.statusCode=a}for(var c in n){if(c!=="status"&&c!=="statusCode"){e[c]=n[c]}}return e}function createHttpErrorConstructor(){function HttpError(){throw new TypeError("cannot construct abstract class")}o(HttpError,Error);return HttpError}function createClientErrorConstructor(e,t,a){var i=t.match(/Error$/)?t:t+"Error";function ClientError(e){var t=e!=null?e:r[a];var o=new Error(t);Error.captureStackTrace(o,ClientError);n(o,ClientError.prototype);Object.defineProperty(o,"message",{enumerable:true,configurable:true,value:t,writable:true});Object.defineProperty(o,"name",{enumerable:false,configurable:true,value:i,writable:true});return o}o(ClientError,e);nameFunc(ClientError,i);ClientError.prototype.status=a;ClientError.prototype.statusCode=a;ClientError.prototype.expose=true;return ClientError}function createServerErrorConstructor(e,t,a){var i=t.match(/Error$/)?t:t+"Error";function ServerError(e){var t=e!=null?e:r[a];var o=new Error(t);Error.captureStackTrace(o,ServerError);n(o,ServerError.prototype);Object.defineProperty(o,"message",{enumerable:true,configurable:true,value:t,writable:true});Object.defineProperty(o,"name",{enumerable:false,configurable:true,value:i,writable:true});return o}o(ServerError,e);nameFunc(ServerError,i);ServerError.prototype.status=a;ServerError.prototype.statusCode=a;ServerError.prototype.expose=false;return ServerError}function nameFunc(e,t){var a=Object.getOwnPropertyDescriptor(e,"name");if(a&&a.configurable){a.value=t;Object.defineProperty(e,"name",a)}}function populateConstructorExports(e,t,a){t.forEach(function forEachCode(t){var i;var n=p(r[t]);switch(codeClass(t)){case 400:i=createClientErrorConstructor(a,n,t);break;case 500:i=createServerErrorConstructor(a,n,t);break}if(i){e[t]=i;e[n]=i}});e["I'mateapot"]=i.function(e.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}},536:e=>{var t=1e3;var a=t*60;var i=a*60;var n=i*24;var r=n*7;var o=n*365.25;e.exports=function(e,t){t=t||{};var a=typeof e;if(a==="string"&&e.length>0){return parse(e)}else if(a==="number"&&isNaN(e)===false){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var p=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!p){return}var s=parseFloat(p[1]);var c=(p[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*o;case"weeks":case"week":case"w":return s*r;case"days":case"day":case"d":return s*n;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*a;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return undefined}}function fmtShort(e){var r=Math.abs(e);if(r>=n){return Math.round(e/n)+"d"}if(r>=i){return Math.round(e/i)+"h"}if(r>=a){return Math.round(e/a)+"m"}if(r>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var r=Math.abs(e);if(r>=n){return plural(e,r,n,"day")}if(r>=i){return plural(e,r,i,"hour")}if(r>=a){return plural(e,r,a,"minute")}if(r>=t){return plural(e,r,t,"second")}return e+" ms"}function plural(e,t,a,i){var n=t>=a*1.5;return Math.round(e/a)+" "+i+(n?"s":"")}},226:e=>{"use strict";e.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?setProtoOf:mixinProperties);function setProtoOf(e,t){e.__proto__=t;return e}function mixinProperties(e,t){for(var a in t){if(!e.hasOwnProperty(a)){e[a]=t[a]}}return e}},664:(e,t,a)=>{"use strict";var i=a(254);e.exports=status;status.STATUS_CODES=i;status.codes=populateStatusesMap(status,i);status.redirect={300:true,301:true,302:true,303:true,305:true,307:true,308:true};status.empty={204:true,205:true,304:true};status.retry={502:true,503:true,504:true};function populateStatusesMap(e,t){var a=[];Object.keys(t).forEach(function forEachCode(i){var n=t[i];var r=Number(i);e[r]=n;e[n]=r;e[n.toLowerCase()]=r;a.push(r)});return a}function status(e){if(typeof e==="number"){if(!status[e])throw new Error("invalid status code: "+e);return e}if(typeof e!=="string"){throw new TypeError("code must be a number or string")}var t=parseInt(e,10);if(!isNaN(t)){if(!status[t])throw new Error("invalid status code: "+t);return t}t=status[e.toLowerCase()];if(!t)throw new Error('invalid status message: "'+e+'"');return t}},481:e=>{e.exports=toIdentifier;function toIdentifier(e){return e.split(" ").map(function(e){return e.slice(0,1).toUpperCase()+e.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}},417:e=>{"use strict";e.exports=require("crypto")},614:e=>{"use strict";e.exports=require("events")},747:e=>{"use strict";e.exports=require("fs")},185:e=>{"use strict";e.exports=require("next/dist/compiled/debug")},554:e=>{"use strict";e.exports=require("next/dist/compiled/fresh")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}};var __webpack_module_cache__={};function __webpack_require__(e){if(__webpack_module_cache__[e]){return __webpack_module_cache__[e].exports}var t=__webpack_module_cache__[e]={exports:{}};var a=true;try{__webpack_modules__[e](t,t.exports,__webpack_require__);a=false}finally{if(a)delete __webpack_module_cache__[e]}return t.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(342)})(); \ No newline at end of file +module.exports=(()=>{var __webpack_modules__={14:e=>{"use strict";e.exports=JSON.parse('{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":[],"application/font-woff2":[],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}')},254:e=>{"use strict";e.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},329:(module,__unused_webpack_exports,__nccwpck_require__)=>{var callSiteToString=__nccwpck_require__(23).callSiteToString;var eventListenerCount=__nccwpck_require__(23).eventListenerCount;var relative=__nccwpck_require__(622).relative;module.exports=depd;var basePath=process.cwd();function containsNamespace(e,t){var a=e.split(/[ ,]+/);var i=String(t).toLowerCase();for(var n=0;n";var a=e.getLineNumber();var i=e.getColumnNumber();if(e.isEval()){t=e.getEvalOrigin()+", "+t}var n=[t,a,i];n.callSite=e;n.name=e.getFunctionName();return n}function defaultMessage(e){var t=e.callSite;var a=e.name;if(!a){a=""}var i=t.getThis();var n=i&&t.getTypeName();if(n==="Object"){n=undefined}if(n==="Function"){n=i.name||n}return n&&t.getMethodName()?n+"."+a:a}function formatPlain(e,t,a){var i=(new Date).toUTCString();var n=i+" "+this._namespace+" deprecated "+e;if(this._traced){for(var r=0;r{"use strict";e.exports=callSiteToString;function callSiteFileLocation(e){var t;var a="";if(e.isNative()){a="native"}else if(e.isEval()){t=e.getScriptNameOrSourceURL();if(!t){a=e.getEvalOrigin()}}else{t=e.getFileName()}if(t){a+=t;var i=e.getLineNumber();if(i!=null){a+=":"+i;var n=e.getColumnNumber();if(n){a+=":"+n}}}return a||"unknown source"}function callSiteToString(e){var t=true;var a=callSiteFileLocation(e);var i=e.getFunctionName();var n=e.isConstructor();var r=!(e.isToplevel()||n);var o="";if(r){var p=e.getMethodName();var s=getConstructorName(e);if(i){if(s&&i.indexOf(s)!==0){o+=s+"."}o+=i;if(p&&i.lastIndexOf("."+p)!==i.length-p.length-1){o+=" [as "+p+"]"}}else{o+=s+"."+(p||"")}}else if(n){o+="new "+(i||"")}else if(i){o+=i}else{t=false;o+=a}if(t){o+=" ("+a+")"}return o}function getConstructorName(e){var t=e.receiver;return t.constructor&&t.constructor.name||null}},438:e=>{"use strict";e.exports=eventListenerCount;function eventListenerCount(e,t){return e.listeners(t).length}},23:(e,t,a)=>{"use strict";var i=a(614).EventEmitter;lazyProperty(e.exports,"callSiteToString",function callSiteToString(){var e=Error.stackTraceLimit;var t={};var i=Error.prepareStackTrace;function prepareObjectStackTrace(e,t){return t}Error.prepareStackTrace=prepareObjectStackTrace;Error.stackTraceLimit=2;Error.captureStackTrace(t);var n=t.stack.slice();Error.prepareStackTrace=i;Error.stackTraceLimit=e;return n[0].toString?toString:a(911)});lazyProperty(e.exports,"eventListenerCount",function eventListenerCount(){return i.listenerCount||a(438)});function lazyProperty(e,t,a){function get(){var i=a();Object.defineProperty(e,t,{configurable:true,enumerable:true,value:i});return i}Object.defineProperty(e,t,{configurable:true,enumerable:true,get:get})}function toString(e){return e.toString()}},313:(e,t,a)=>{"use strict";var i=a(747).ReadStream;var n=a(413);e.exports=destroy;function destroy(e){if(e instanceof i){return destroyReadStream(e)}if(!(e instanceof n)){return e}if(typeof e.destroy==="function"){e.destroy()}return e}function destroyReadStream(e){e.destroy();if(typeof e.close==="function"){e.on("open",onOpenClose)}return e}function onOpenClose(){if(typeof this.fd==="number"){this.close()}}},801:e=>{"use strict";e.exports=first;function first(e,t){if(!Array.isArray(e))throw new TypeError("arg must be an array of [ee, events...] arrays");var a=[];for(var i=0;i{"use strict";e.exports=encodeUrl;var t=/(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g;var a=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g;var i="$1�$2";function encodeUrl(e){return String(e).replace(a,i).replace(t,encodeURI)}},283:e=>{"use strict";var t=/["'&<>]/;e.exports=escapeHtml;function escapeHtml(e){var a=""+e;var i=t.exec(a);if(!i){return a}var n;var r="";var o=0;var p=0;for(o=i.index;o{"use strict";e.exports=etag;var i=a(417);var n=a(747).Stats;var r=Object.prototype.toString;function entitytag(e){if(e.length===0){return'"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'}var t=i.createHash("sha1").update(e,"utf8").digest("base64").substring(0,27);var a=typeof e==="string"?Buffer.byteLength(e,"utf8"):e.length;return'"'+a.toString(16)+"-"+t+'"'}function etag(e,t){if(e==null){throw new TypeError("argument entity is required")}var a=isstats(e);var i=t&&typeof t.weak==="boolean"?t.weak:a;if(!a&&typeof e!=="string"&&!Buffer.isBuffer(e)){throw new TypeError("argument entity must be string, Buffer, or fs.Stats")}var n=a?stattag(e):entitytag(e);return i?"W/"+n:n}function isstats(e){if(typeof n==="function"&&e instanceof n){return true}return e&&typeof e==="object"&&"ctime"in e&&r.call(e.ctime)==="[object Date]"&&"mtime"in e&&r.call(e.mtime)==="[object Date]"&&"ino"in e&&typeof e.ino==="number"&&"size"in e&&typeof e.size==="number"}function stattag(e){var t=e.mtime.getTime().toString(16);var a=e.size.toString(16);return'"'+a+"-"+t+'"'}},989:(e,t,a)=>{try{var i=a(669);if(typeof i.inherits!=="function")throw"";e.exports=i.inherits}catch(t){e.exports=a(350)}},350:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var a=function(){};a.prototype=t.prototype;e.prototype=new a;e.prototype.constructor=e}}}},550:(e,t,a)=>{var i=a(622);var n=a(747);function Mime(){this.types=Object.create(null);this.extensions=Object.create(null)}Mime.prototype.define=function(e){for(var t in e){var a=e[t];for(var i=0;i{"use strict";e.exports=onFinished;e.exports.isFinished=isFinished;var i=a(801);var n=typeof setImmediate==="function"?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))};function onFinished(e,t){if(isFinished(e)!==false){n(t,null,e);return e}attachListener(e,t);return e}function isFinished(e){var t=e.socket;if(typeof e.finished==="boolean"){return Boolean(e.finished||t&&!t.writable)}if(typeof e.complete==="boolean"){return Boolean(e.upgrade||!t||!t.readable||e.complete&&!e.readable)}return undefined}function attachFinishedListener(e,t){var a;var n;var r=false;function onFinish(e){a.cancel();n.cancel();r=true;t(e)}a=n=i([[e,"end","finish"]],onFinish);function onSocket(t){e.removeListener("socket",onSocket);if(r)return;if(a!==n)return;n=i([[t,"error","close"]],onFinish)}if(e.socket){onSocket(e.socket);return}e.on("socket",onSocket);if(e.socket===undefined){patchAssignSocket(e,onSocket)}}function attachListener(e,t){var a=e.__onFinished;if(!a||!a.queue){a=e.__onFinished=createListener(e);attachFinishedListener(e,a)}a.queue.push(t)}function createListener(e){function listener(t){if(e.__onFinished===listener)e.__onFinished=null;if(!listener.queue)return;var a=listener.queue;listener.queue=null;for(var i=0;i{"use strict";e.exports=rangeParser;function rangeParser(e,t,a){if(typeof t!=="string"){throw new TypeError("argument str must be a string")}var i=t.indexOf("=");if(i===-1){return-2}var n=t.slice(i+1).split(",");var r=[];r.type=t.slice(0,i);for(var o=0;oe-1){c=e-1}if(isNaN(s)||isNaN(c)||s>c||s<0){continue}r.push({start:s,end:c})}if(r.length<1){return-1}return a&&a.combine?combineRanges(r):r}function combineRanges(e){var t=e.map(mapWithIndex).sort(sortByRangeStart);for(var a=0,i=1;ir.end+1){t[++a]=n}else if(n.end>r.end){r.end=n.end;r.index=Math.min(r.index,n.index)}}t.length=a+1;var o=t.sort(sortByRangeIndex).map(mapWithoutIndex);o.type=e.type;return o}function mapWithIndex(e,t){return{start:e.start,end:e.end,index:t}}function mapWithoutIndex(e){return{start:e.start,end:e.end}}function sortByRangeIndex(e,t){return e.index-t.index}function sortByRangeStart(e,t){return e.start-t.start}},342:(e,t,a)=>{"use strict";var i=a(599);var n=a(185)("send");var r=a(329)("send");var o=a(313);var p=a(874);var s=a(283);var c=a(542);var l=a(554);var d=a(747);var m=a(550);var u=a(536);var v=a(540);var f=a(320);var x=a(622);var g=a(664);var h=a(413);var b=a(669);var y=x.extname;var w=x.join;var k=x.normalize;var S=x.resolve;var _=x.sep;var j=/^ *bytes=/;var E=60*60*24*365*1e3;var C=/(?:^|[\\/])\.\.(?:[\\/]|$)/;e.exports=send;e.exports.mime=m;function send(e,t,a){return new SendStream(e,t,a)}function SendStream(e,t,a){h.call(this);var i=a||{};this.options=i;this.path=t;this.req=e;this._acceptRanges=i.acceptRanges!==undefined?Boolean(i.acceptRanges):true;this._cacheControl=i.cacheControl!==undefined?Boolean(i.cacheControl):true;this._etag=i.etag!==undefined?Boolean(i.etag):true;this._dotfiles=i.dotfiles!==undefined?i.dotfiles:"ignore";if(this._dotfiles!=="ignore"&&this._dotfiles!=="allow"&&this._dotfiles!=="deny"){throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"')}this._hidden=Boolean(i.hidden);if(i.hidden!==undefined){r("hidden: use dotfiles: '"+(this._hidden?"allow":"ignore")+"' instead")}if(i.dotfiles===undefined){this._dotfiles=undefined}this._extensions=i.extensions!==undefined?normalizeList(i.extensions,"extensions option"):[];this._immutable=i.immutable!==undefined?Boolean(i.immutable):false;this._index=i.index!==undefined?normalizeList(i.index,"index option"):["index.html"];this._lastModified=i.lastModified!==undefined?Boolean(i.lastModified):true;this._maxage=i.maxAge||i.maxage;this._maxage=typeof this._maxage==="string"?u(this._maxage):Number(this._maxage);this._maxage=!isNaN(this._maxage)?Math.min(Math.max(0,this._maxage),E):0;this._root=i.root?S(i.root):null;if(!this._root&&i.from){this.from(i.from)}}b.inherits(SendStream,h);SendStream.prototype.etag=r.function(function etag(e){this._etag=Boolean(e);n("etag %s",this._etag);return this},"send.etag: pass etag as option");SendStream.prototype.hidden=r.function(function hidden(e){this._hidden=Boolean(e);this._dotfiles=undefined;n("hidden %s",this._hidden);return this},"send.hidden: use dotfiles option");SendStream.prototype.index=r.function(function index(e){var index=!e?[]:normalizeList(e,"paths argument");n("index %o",e);this._index=index;return this},"send.index: pass index as option");SendStream.prototype.root=function root(e){this._root=S(String(e));n("root %s",this._root);return this};SendStream.prototype.from=r.function(SendStream.prototype.root,"send.from: pass root as option");SendStream.prototype.root=r.function(SendStream.prototype.root,"send.root: pass root as option");SendStream.prototype.maxage=r.function(function maxage(e){this._maxage=typeof e==="string"?u(e):Number(e);this._maxage=!isNaN(this._maxage)?Math.min(Math.max(0,this._maxage),E):0;n("max-age %d",this._maxage);return this},"send.maxage: pass maxAge as option");SendStream.prototype.error=function error(e,t){if(hasListeners(this,"error")){return this.emit("error",i(e,t,{expose:false}))}var a=this.res;var n=g[e]||String(e);var r=createHtmlDocument("Error",s(n));clearHeaders(a);if(t&&t.headers){setHeaders(a,t.headers)}a.statusCode=e;a.setHeader("Content-Type","text/html; charset=UTF-8");a.setHeader("Content-Length",Buffer.byteLength(r));a.setHeader("Content-Security-Policy","default-src 'none'");a.setHeader("X-Content-Type-Options","nosniff");a.end(r)};SendStream.prototype.hasTrailingSlash=function hasTrailingSlash(){return this.path[this.path.length-1]==="/"};SendStream.prototype.isConditionalGET=function isConditionalGET(){return this.req.headers["if-match"]||this.req.headers["if-unmodified-since"]||this.req.headers["if-none-match"]||this.req.headers["if-modified-since"]};SendStream.prototype.isPreconditionFailure=function isPreconditionFailure(){var e=this.req;var t=this.res;var a=e.headers["if-match"];if(a){var i=t.getHeader("ETag");return!i||a!=="*"&&parseTokenList(a).every(function(e){return e!==i&&e!=="W/"+i&&"W/"+e!==i})}var n=parseHttpDate(e.headers["if-unmodified-since"]);if(!isNaN(n)){var r=parseHttpDate(t.getHeader("Last-Modified"));return isNaN(r)||r>n}return false};SendStream.prototype.removeContentHeaderFields=function removeContentHeaderFields(){var e=this.res;var t=getHeaderNames(e);for(var a=0;a=200&&e<300||e===304};SendStream.prototype.onStatError=function onStatError(e){switch(e.code){case"ENAMETOOLONG":case"ENOENT":case"ENOTDIR":this.error(404,e);break;default:this.error(500,e);break}};SendStream.prototype.isFresh=function isFresh(){return l(this.req.headers,{etag:this.res.getHeader("ETag"),"last-modified":this.res.getHeader("Last-Modified")})};SendStream.prototype.isRangeFresh=function isRangeFresh(){var e=this.req.headers["if-range"];if(!e){return true}if(e.indexOf('"')!==-1){var t=this.res.getHeader("ETag");return Boolean(t&&e.indexOf(t)!==-1)}var a=this.res.getHeader("Last-Modified");return parseHttpDate(a)<=parseHttpDate(e)};SendStream.prototype.redirect=function redirect(e){var t=this.res;if(hasListeners(this,"directory")){this.emit("directory",t,e);return}if(this.hasTrailingSlash()){this.error(403);return}var a=p(collapseLeadingSlashes(this.path+"/"));var i=createHtmlDocument("Redirecting",'Redirecting to '+s(a)+"");t.statusCode=301;t.setHeader("Content-Type","text/html; charset=UTF-8");t.setHeader("Content-Length",Buffer.byteLength(i));t.setHeader("Content-Security-Policy","default-src 'none'");t.setHeader("X-Content-Type-Options","nosniff");t.setHeader("Location",a);t.end(i)};SendStream.prototype.pipe=function pipe(e){var t=this._root;this.res=e;var a=decode(this.path);if(a===-1){this.error(400);return e}if(~a.indexOf("\0")){this.error(400);return e}var i;if(t!==null){if(a){a=k("."+_+a)}if(C.test(a)){n('malicious path "%s"',a);this.error(403);return e}i=a.split(_);a=k(w(t,a))}else{if(C.test(a)){n('malicious path "%s"',a);this.error(403);return e}i=k(a).split(_);a=S(a)}if(containsDotFile(i)){var r=this._dotfiles;if(r===undefined){r=i[i.length-1][0]==="."?this._hidden?"allow":"ignore":"allow"}n('%s dotfile "%s"',r,a);switch(r){case"allow":break;case"deny":this.error(403);return e;case"ignore":default:this.error(404);return e}}if(this._index.length&&this.hasTrailingSlash()){this.sendIndex(a);return e}this.sendFile(a);return e};SendStream.prototype.send=function send(e,t){var a=t.size;var i=this.options;var r={};var o=this.res;var p=this.req;var s=p.headers.range;var c=i.start||0;if(headersSent(o)){this.headersAlreadySent();return}n('pipe "%s"',e);this.setHeader(e,t);this.type(e);if(this.isConditionalGET()){if(this.isPreconditionFailure()){this.error(412);return}if(this.isCachable()&&this.isFresh()){this.notModified();return}}a=Math.max(0,a-c);if(i.end!==undefined){var l=i.end-c+1;if(a>l)a=l}if(this._acceptRanges&&j.test(s)){s=f(a,s,{combine:true});if(!this.isRangeFresh()){n("range stale");s=-2}if(s===-1){n("range unsatisfiable");o.setHeader("Content-Range",contentRange("bytes",a));return this.error(416,{headers:{"Content-Range":o.getHeader("Content-Range")}})}if(s!==-2&&s.length===1){n("range %j",s);o.statusCode=206;o.setHeader("Content-Range",contentRange("bytes",a,s[0]));c+=s[0].start;a=s[0].end-s[0].start+1}}for(var d in i){r[d]=i[d]}r.start=c;r.end=Math.max(c,c+a-1);o.setHeader("Content-Length",a);if(p.method==="HEAD"){o.end();return}this.stream(e,r)};SendStream.prototype.sendFile=function sendFile(e){var t=0;var a=this;n('stat "%s"',e);d.stat(e,function onstat(t,i){if(t&&t.code==="ENOENT"&&!y(e)&&e[e.length-1]!==_){return next(t)}if(t)return a.onStatError(t);if(i.isDirectory())return a.redirect(e);a.emit("file",e,i);a.send(e,i)});function next(i){if(a._extensions.length<=t){return i?a.onStatError(i):a.error(404)}var r=e+"."+a._extensions[t++];n('stat "%s"',r);d.stat(r,function(e,t){if(e)return next(e);if(t.isDirectory())return next();a.emit("file",r,t);a.send(r,t)})}};SendStream.prototype.sendIndex=function sendIndex(e){var t=-1;var a=this;function next(i){if(++t>=a._index.length){if(i)return a.onStatError(i);return a.error(404)}var r=w(e,a._index[t]);n('stat "%s"',r);d.stat(r,function(e,t){if(e)return next(e);if(t.isDirectory())return next();a.emit("file",r,t);a.send(r,t)})}next()};SendStream.prototype.stream=function stream(e,t){var a=false;var i=this;var n=this.res;var stream=d.createReadStream(e,t);this.emit("stream",stream);stream.pipe(n);v(n,function onfinished(){a=true;o(stream)});stream.on("error",function onerror(e){if(a)return;a=true;o(stream);i.onStatError(e)});stream.on("end",function onend(){i.emit("end")})};SendStream.prototype.type=function type(e){var t=this.res;if(t.getHeader("Content-Type"))return;var type=m.lookup(e);if(!type){n("no content-type");return}var a=m.charsets.lookup(type);n("content-type %s",type);t.setHeader("Content-Type",type+(a?"; charset="+a:""))};SendStream.prototype.setHeader=function setHeader(e,t){var a=this.res;this.emit("headers",a,e,t);if(this._acceptRanges&&!a.getHeader("Accept-Ranges")){n("accept ranges");a.setHeader("Accept-Ranges","bytes")}if(this._cacheControl&&!a.getHeader("Cache-Control")){var i="public, max-age="+Math.floor(this._maxage/1e3);if(this._immutable){i+=", immutable"}n("cache-control %s",i);a.setHeader("Cache-Control",i)}if(this._lastModified&&!a.getHeader("Last-Modified")){var r=t.mtime.toUTCString();n("modified %s",r);a.setHeader("Last-Modified",r)}if(this._etag&&!a.getHeader("ETag")){var o=c(t);n("etag %s",o);a.setHeader("ETag",o)}};function clearHeaders(e){var t=getHeaderNames(e);for(var a=0;a1?"/"+e.substr(t):e}function containsDotFile(e){for(var t=0;t1&&a[0]==="."){return true}}return false}function contentRange(e,t,a){return e+" "+(a?a.start+"-"+a.end:"*")+"/"+t}function createHtmlDocument(e,t){return"\n"+'\n'+"\n"+'\n'+""+e+"\n"+"\n"+"\n"+"
"+t+"
\n"+"\n"+"\n"}function decode(e){try{return decodeURIComponent(e)}catch(e){return-1}}function getHeaderNames(e){return typeof e.getHeaderNames!=="function"?Object.keys(e._headers||{}):e.getHeaderNames()}function hasListeners(e,t){var a=typeof e.listenerCount!=="function"?e.listeners(t).length:e.listenerCount(t);return a>0}function headersSent(e){return typeof e.headersSent!=="boolean"?Boolean(e._header):e.headersSent}function normalizeList(e,t){var a=[].concat(e||[]);for(var i=0;i{"use strict";var i=a(329)("http-errors");var n=a(226);var r=a(664);var o=a(989);var p=a(481);e.exports=createError;e.exports.HttpError=createHttpErrorConstructor();populateConstructorExports(e.exports,r.codes,e.exports.HttpError);function codeClass(e){return Number(String(e).charAt(0)+"00")}function createError(){var e;var t;var a=500;var n={};for(var o=0;o=600)){i("non-error status code; use only 4xx or 5xx status codes")}if(typeof a!=="number"||!r[a]&&(a<400||a>=600)){a=500}var s=createError[a]||createError[codeClass(a)];if(!e){e=s?new s(t):new Error(t||r[a]);Error.captureStackTrace(e,createError)}if(!s||!(e instanceof s)||e.status!==a){e.expose=a<500;e.status=e.statusCode=a}for(var c in n){if(c!=="status"&&c!=="statusCode"){e[c]=n[c]}}return e}function createHttpErrorConstructor(){function HttpError(){throw new TypeError("cannot construct abstract class")}o(HttpError,Error);return HttpError}function createClientErrorConstructor(e,t,a){var i=t.match(/Error$/)?t:t+"Error";function ClientError(e){var t=e!=null?e:r[a];var o=new Error(t);Error.captureStackTrace(o,ClientError);n(o,ClientError.prototype);Object.defineProperty(o,"message",{enumerable:true,configurable:true,value:t,writable:true});Object.defineProperty(o,"name",{enumerable:false,configurable:true,value:i,writable:true});return o}o(ClientError,e);nameFunc(ClientError,i);ClientError.prototype.status=a;ClientError.prototype.statusCode=a;ClientError.prototype.expose=true;return ClientError}function createServerErrorConstructor(e,t,a){var i=t.match(/Error$/)?t:t+"Error";function ServerError(e){var t=e!=null?e:r[a];var o=new Error(t);Error.captureStackTrace(o,ServerError);n(o,ServerError.prototype);Object.defineProperty(o,"message",{enumerable:true,configurable:true,value:t,writable:true});Object.defineProperty(o,"name",{enumerable:false,configurable:true,value:i,writable:true});return o}o(ServerError,e);nameFunc(ServerError,i);ServerError.prototype.status=a;ServerError.prototype.statusCode=a;ServerError.prototype.expose=false;return ServerError}function nameFunc(e,t){var a=Object.getOwnPropertyDescriptor(e,"name");if(a&&a.configurable){a.value=t;Object.defineProperty(e,"name",a)}}function populateConstructorExports(e,t,a){t.forEach(function forEachCode(t){var i;var n=p(r[t]);switch(codeClass(t)){case 400:i=createClientErrorConstructor(a,n,t);break;case 500:i=createServerErrorConstructor(a,n,t);break}if(i){e[t]=i;e[n]=i}});e["I'mateapot"]=i.function(e.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}},536:e=>{var t=1e3;var a=t*60;var i=a*60;var n=i*24;var r=n*7;var o=n*365.25;e.exports=function(e,t){t=t||{};var a=typeof e;if(a==="string"&&e.length>0){return parse(e)}else if(a==="number"&&isNaN(e)===false){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var p=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!p){return}var s=parseFloat(p[1]);var c=(p[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*o;case"weeks":case"week":case"w":return s*r;case"days":case"day":case"d":return s*n;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*a;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return undefined}}function fmtShort(e){var r=Math.abs(e);if(r>=n){return Math.round(e/n)+"d"}if(r>=i){return Math.round(e/i)+"h"}if(r>=a){return Math.round(e/a)+"m"}if(r>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var r=Math.abs(e);if(r>=n){return plural(e,r,n,"day")}if(r>=i){return plural(e,r,i,"hour")}if(r>=a){return plural(e,r,a,"minute")}if(r>=t){return plural(e,r,t,"second")}return e+" ms"}function plural(e,t,a,i){var n=t>=a*1.5;return Math.round(e/a)+" "+i+(n?"s":"")}},226:e=>{"use strict";e.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?setProtoOf:mixinProperties);function setProtoOf(e,t){e.__proto__=t;return e}function mixinProperties(e,t){for(var a in t){if(!e.hasOwnProperty(a)){e[a]=t[a]}}return e}},664:(e,t,a)=>{"use strict";var i=a(254);e.exports=status;status.STATUS_CODES=i;status.codes=populateStatusesMap(status,i);status.redirect={300:true,301:true,302:true,303:true,305:true,307:true,308:true};status.empty={204:true,205:true,304:true};status.retry={502:true,503:true,504:true};function populateStatusesMap(e,t){var a=[];Object.keys(t).forEach(function forEachCode(i){var n=t[i];var r=Number(i);e[r]=n;e[n]=r;e[n.toLowerCase()]=r;a.push(r)});return a}function status(e){if(typeof e==="number"){if(!status[e])throw new Error("invalid status code: "+e);return e}if(typeof e!=="string"){throw new TypeError("code must be a number or string")}var t=parseInt(e,10);if(!isNaN(t)){if(!status[t])throw new Error("invalid status code: "+t);return t}t=status[e.toLowerCase()];if(!t)throw new Error('invalid status message: "'+e+'"');return t}},481:e=>{e.exports=toIdentifier;function toIdentifier(e){return e.split(" ").map(function(e){return e.slice(0,1).toUpperCase()+e.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}},417:e=>{"use strict";e.exports=require("crypto")},614:e=>{"use strict";e.exports=require("events")},747:e=>{"use strict";e.exports=require("fs")},185:e=>{"use strict";e.exports=require("next/dist/compiled/debug")},554:e=>{"use strict";e.exports=require("next/dist/compiled/fresh")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}};var __webpack_module_cache__={};function __nccwpck_require__(e){if(__webpack_module_cache__[e]){return __webpack_module_cache__[e].exports}var t=__webpack_module_cache__[e]={exports:{}};var a=true;try{__webpack_modules__[e](t,t.exports,__nccwpck_require__);a=false}finally{if(a)delete __webpack_module_cache__[e]}return t.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(342)})(); \ No newline at end of file diff --git a/packages/next/compiled/source-map/source-map.js b/packages/next/compiled/source-map/source-map.js index 96d8999274f6c0a..c3fed0f8e3bfbdd 100644 --- a/packages/next/compiled/source-map/source-map.js +++ b/packages/next/compiled/source-map/source-map.js @@ -1 +1 @@ -module.exports=(()=>{var e={392:(e,r,n)=>{var o=n(48);var t=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var o=0,t=e.length;o=0){return r}}else{var n=o.toSetString(e);if(t.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var o=n(727);var t=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&u;i>>>=t;if(i>0){n|=s}r+=o.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var a=0;var c=0;var l,p;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}p=o.decode(e.charCodeAt(r++));if(p===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}l=!!(p&s);p&=u;a=a+(p<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,o,t,i,u){var s=Math.floor((n-e)/2)+e;var a=i(o,t[s],true);if(a===0){return s}else if(a>0){if(n-s>1){return recursiveSearch(s,n,o,t,i,u)}if(u==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,s,o,t,i,u)}if(u==r.LEAST_UPPER_BOUND){return s}else{return e<0?-1:e}}}r.search=function search(e,n,o,t){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,o,t||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(o(n[i],n[i-1],true)!==0){break}--i}return i}},668:(e,r,n)=>{var o=n(48);function generatedPositionAfter(e,r){var n=e.generatedLine;var t=r.generatedLine;var i=e.generatedColumn;var u=r.generatedColumn;return t>n||t==n&&u>=i||o.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(o.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.H=MappingList},792:(e,r)=>{function swap(e,r,n){var o=e[r];e[r]=e[n];e[n]=o}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,o){if(n{var o;var t=n(48);var i=n(108);var u=n(392).I;var s=n(763);var a=n(792).U;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=t.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var o=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var u;switch(i){case SourceMapConsumer.GENERATED_ORDER:u=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:u=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;u.map(function(e){var r=e.source===null?null:this._sources.at(e.source);r=t.computeSourceURL(s,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}},this).forEach(e,o)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=t.getArg(e,"line");var n={source:t.getArg(e,"source"),originalLine:r,originalColumn:t.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var o=[];var u=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(u>=0){var s=this._originalMappings[u];if(e.column===undefined){var a=s.originalLine;while(s&&s.originalLine===a){o.push({line:t.getArg(s,"generatedLine",null),column:t.getArg(s,"generatedColumn",null),lastColumn:t.getArg(s,"lastGeneratedColumn",null)});s=this._originalMappings[++u]}}else{var c=s.originalColumn;while(s&&s.originalLine===r&&s.originalColumn==c){o.push({line:t.getArg(s,"generatedLine",null),column:t.getArg(s,"generatedColumn",null),lastColumn:t.getArg(s,"lastGeneratedColumn",null)});s=this._originalMappings[++u]}}}return o};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=t.parseSourceMapInput(e)}var o=t.getArg(n,"version");var i=t.getArg(n,"sources");var s=t.getArg(n,"names",[]);var a=t.getArg(n,"sourceRoot",null);var c=t.getArg(n,"sourcesContent",null);var l=t.getArg(n,"mappings");var p=t.getArg(n,"file",null);if(o!=this._version){throw new Error("Unsupported version: "+o)}if(a){a=t.normalize(a)}i=i.map(String).map(t.normalize).map(function(e){return a&&t.isAbsolute(a)&&t.isAbsolute(e)?t.relative(a,e):e});this._names=u.fromArray(s.map(String),true);this._sources=u.fromArray(i,true);this._absoluteSources=this._sources.toArray().map(function(e){return t.computeSourceURL(a,e,r)});this.sourceRoot=a;this.sourcesContent=c;this._mappings=l;this._sourceMapURL=r;this.file=p}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=t.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){_.source=c+v[1];c+=v[1];_.originalLine=i+v[2];i=_.originalLine;_.originalLine+=1;_.originalColumn=u+v[3];u=_.originalColumn;if(v.length>4){_.name=l+v[4];l+=v[4]}}m.push(_);if(typeof _.originalLine==="number"){d.push(_)}}}a(m,t.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;a(d,t.compareByOriginalPositions);this.__originalMappings=d};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,o,t,u){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[o]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[o])}return i.search(e,r,t,u)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var i=t.getArg(o,"source",null);if(i!==null){i=this._sources.at(i);i=t.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var u=t.getArg(o,"name",null);if(u!==null){u=this._names.at(u)}return{source:i,line:t.getArg(o,"originalLine",null),column:t.getArg(o,"originalColumn",null),name:u}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null})};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var o=e;if(this.sourceRoot!=null){o=t.relative(this.sourceRoot,o)}var i;if(this.sourceRoot!=null&&(i=t.urlParse(this.sourceRoot))){var u=o.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(u)){return this.sourcesContent[this._sources.indexOf(u)]}if((!i.path||i.path=="/")&&this._sources.has("/"+o)){return this.sourcesContent[this._sources.indexOf("/"+o)]}}if(r){return null}else{throw new Error('"'+o+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=t.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:t.getArg(e,"line"),originalColumn:t.getArg(e,"column")};var o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source){return{line:t.getArg(i,"generatedLine",null),column:t.getArg(i,"generatedColumn",null),lastColumn:t.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};o=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=t.parseSourceMapInput(e)}var o=t.getArg(n,"version");var i=t.getArg(n,"sections");if(o!=this._version){throw new Error("Unsupported version: "+o)}this._sources=new u;this._names=new u;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=t.getArg(e,"offset");var o=t.getArg(n,"line");var i=t.getArg(n,"column");if(o{var o=n(763);var t=n(48);var i=n(392).I;var u=n(668).H;function SourceMapGenerator(e){if(!e){e={}}this._file=t.getArg(e,"file",null);this._sourceRoot=t.getArg(e,"sourceRoot",null);this._skipValidation=t.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new u;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping(function(e){var o={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){o.source=e.source;if(r!=null){o.source=t.relative(r,o.source)}o.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){o.name=e.name}}n.addMapping(o)});e.sources.forEach(function(o){var i=o;if(r!==null){i=t.relative(r,o)}if(!n._sources.has(i)){n._sources.add(i)}var u=e.sourceContentFor(o);if(u!=null){n.setSourceContent(o,u)}});return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=t.getArg(e,"generated");var n=t.getArg(e,"original",null);var o=t.getArg(e,"source",null);var i=t.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,o,i)}if(o!=null){o=String(o);if(!this._sources.has(o)){this._sources.add(o)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=t.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[t.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[t.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var o=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}o=e.file}var u=this._sourceRoot;if(u!=null){o=t.relative(u,o)}var s=new i;var a=new i;this._mappings.unsortedForEach(function(r){if(r.source===o&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=t.join(n,r.source)}if(u!=null){r.source=t.relative(u,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var c=r.source;if(c!=null&&!s.has(c)){s.add(c)}var l=r.name;if(l!=null&&!a.has(l)){a.add(l)}},this);this._sources=s;this._names=a;e.sources.forEach(function(r){var o=e.sourceContentFor(r);if(o!=null){if(n!=null){r=t.join(n,r)}if(u!=null){r=t.relative(u,r)}this.setSourceContent(r,o)}},this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,o){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!o){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:o}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var u=0;var s=0;var a="";var c;var l;var p;var f;var h=this._mappings.toArray();for(var g=0,d=h.length;g0){if(!t.compareByGeneratedPositionsInflated(l,h[g-1])){continue}c+=","}}c+=o.encode(l.generatedColumn-e);e=l.generatedColumn;if(l.source!=null){f=this._sources.indexOf(l.source);c+=o.encode(f-s);s=f;c+=o.encode(l.originalLine-1-i);i=l.originalLine-1;c+=o.encode(l.originalColumn-n);n=l.originalColumn;if(l.name!=null){p=this._names.indexOf(l.name);c+=o.encode(p-u);u=p}}a+=c}return a};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map(function(e){if(!this._sourcesContents){return null}if(r!=null){e=t.relative(r,e)}var n=t.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.SourceMapGenerator=SourceMapGenerator},10:(e,r,n)=>{var o=n(503).SourceMapGenerator;var t=n(48);var i=/(\r?\n)/;var u=10;var s="$$$isSourceNode$$$";function SourceNode(e,r,n,o,t){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=t==null?null:t;this[s]=true;if(o!=null)this.add(o)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var o=new SourceNode;var u=e.split(i);var s=0;var a=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return s=0;r--){this.prepend(e[r])}}else if(e[s]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,o=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var o=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var o=urlParse(e);if(o){if(!o.path){return e}n=o.path}var t=r.isAbsolute(n);var i=n.split(/\/+/);for(var u,s=0,a=i.length-1;a>=0;a--){u=i[a];if(u==="."){i.splice(a,1)}else if(u===".."){s++}else if(s>0){if(u===""){i.splice(a+1,s);s=0}else{i.splice(a,2);s--}}}n=i.join("/");if(n===""){n=t?"/":"."}if(o){o.path=n;return urlGenerate(o)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var t=urlParse(e);if(t){e=t.path||"/"}if(n&&!n.scheme){if(t){n.scheme=t.scheme}return urlGenerate(n)}if(n||r.match(o)){return r}if(t&&!t.host&&!t.path){t.host=r;return urlGenerate(t)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(t){t.path=i;return urlGenerate(t)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var o=e.lastIndexOf("/");if(o<0){return r}e=e.slice(0,o);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var t=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=t?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=t?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var o=strcmp(e.source,r.source);if(o!==0){return o}o=e.originalLine-r.originalLine;if(o!==0){return o}o=e.originalColumn-r.originalColumn;if(o!==0||n){return o}o=e.generatedColumn-r.generatedColumn;if(o!==0){return o}o=e.generatedLine-r.generatedLine;if(o!==0){return o}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var o=e.generatedLine-r.generatedLine;if(o!==0){return o}o=e.generatedColumn-r.generatedColumn;if(o!==0||n){return o}o=strcmp(e.source,r.source);if(o!==0){return o}o=e.originalLine-r.originalLine;if(o!==0){return o}o=e.originalColumn-r.originalColumn;if(o!==0){return o}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var o=urlParse(n);if(!o){throw new Error("sourceMapURL could not be parsed")}if(o.path){var t=o.path.lastIndexOf("/");if(t>=0){o.path=o.path.substring(0,t+1)}}r=join(urlGenerate(o),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},779:(e,r,n)=>{r.SourceMapGenerator=n(503).SourceMapGenerator;r.SourceMapConsumer=n(65).SourceMapConsumer;r.SourceNode=n(10).SourceNode}};var r={};function __webpack_require__(n){if(r[n]){return r[n].exports}var o=r[n]={exports:{}};var t=true;try{e[n](o,o.exports,__webpack_require__);t=false}finally{if(t)delete r[n]}return o.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(779)})(); \ No newline at end of file +module.exports=(()=>{var e={392:(e,r,n)=>{var o=n(48);var t=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var o=0,t=e.length;o=0){return r}}else{var n=o.toSetString(e);if(t.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var o=n(727);var t=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&u;i>>>=t;if(i>0){n|=s}r+=o.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var a=0;var c=0;var l,p;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}p=o.decode(e.charCodeAt(r++));if(p===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}l=!!(p&s);p&=u;a=a+(p<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,o,t,i,u){var s=Math.floor((n-e)/2)+e;var a=i(o,t[s],true);if(a===0){return s}else if(a>0){if(n-s>1){return recursiveSearch(s,n,o,t,i,u)}if(u==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,s,o,t,i,u)}if(u==r.LEAST_UPPER_BOUND){return s}else{return e<0?-1:e}}}r.search=function search(e,n,o,t){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,o,t||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(o(n[i],n[i-1],true)!==0){break}--i}return i}},668:(e,r,n)=>{var o=n(48);function generatedPositionAfter(e,r){var n=e.generatedLine;var t=r.generatedLine;var i=e.generatedColumn;var u=r.generatedColumn;return t>n||t==n&&u>=i||o.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(o.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.H=MappingList},792:(e,r)=>{function swap(e,r,n){var o=e[r];e[r]=e[n];e[n]=o}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,o){if(n{var o;var t=n(48);var i=n(108);var u=n(392).I;var s=n(763);var a=n(792).U;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=t.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var o=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var u;switch(i){case SourceMapConsumer.GENERATED_ORDER:u=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:u=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;u.map(function(e){var r=e.source===null?null:this._sources.at(e.source);r=t.computeSourceURL(s,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}},this).forEach(e,o)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=t.getArg(e,"line");var n={source:t.getArg(e,"source"),originalLine:r,originalColumn:t.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var o=[];var u=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(u>=0){var s=this._originalMappings[u];if(e.column===undefined){var a=s.originalLine;while(s&&s.originalLine===a){o.push({line:t.getArg(s,"generatedLine",null),column:t.getArg(s,"generatedColumn",null),lastColumn:t.getArg(s,"lastGeneratedColumn",null)});s=this._originalMappings[++u]}}else{var c=s.originalColumn;while(s&&s.originalLine===r&&s.originalColumn==c){o.push({line:t.getArg(s,"generatedLine",null),column:t.getArg(s,"generatedColumn",null),lastColumn:t.getArg(s,"lastGeneratedColumn",null)});s=this._originalMappings[++u]}}}return o};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=t.parseSourceMapInput(e)}var o=t.getArg(n,"version");var i=t.getArg(n,"sources");var s=t.getArg(n,"names",[]);var a=t.getArg(n,"sourceRoot",null);var c=t.getArg(n,"sourcesContent",null);var l=t.getArg(n,"mappings");var p=t.getArg(n,"file",null);if(o!=this._version){throw new Error("Unsupported version: "+o)}if(a){a=t.normalize(a)}i=i.map(String).map(t.normalize).map(function(e){return a&&t.isAbsolute(a)&&t.isAbsolute(e)?t.relative(a,e):e});this._names=u.fromArray(s.map(String),true);this._sources=u.fromArray(i,true);this._absoluteSources=this._sources.toArray().map(function(e){return t.computeSourceURL(a,e,r)});this.sourceRoot=a;this.sourcesContent=c;this._mappings=l;this._sourceMapURL=r;this.file=p}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=t.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){_.source=c+v[1];c+=v[1];_.originalLine=i+v[2];i=_.originalLine;_.originalLine+=1;_.originalColumn=u+v[3];u=_.originalColumn;if(v.length>4){_.name=l+v[4];l+=v[4]}}m.push(_);if(typeof _.originalLine==="number"){d.push(_)}}}a(m,t.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;a(d,t.compareByOriginalPositions);this.__originalMappings=d};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,o,t,u){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[o]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[o])}return i.search(e,r,t,u)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var i=t.getArg(o,"source",null);if(i!==null){i=this._sources.at(i);i=t.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var u=t.getArg(o,"name",null);if(u!==null){u=this._names.at(u)}return{source:i,line:t.getArg(o,"originalLine",null),column:t.getArg(o,"originalColumn",null),name:u}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null})};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var o=e;if(this.sourceRoot!=null){o=t.relative(this.sourceRoot,o)}var i;if(this.sourceRoot!=null&&(i=t.urlParse(this.sourceRoot))){var u=o.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(u)){return this.sourcesContent[this._sources.indexOf(u)]}if((!i.path||i.path=="/")&&this._sources.has("/"+o)){return this.sourcesContent[this._sources.indexOf("/"+o)]}}if(r){return null}else{throw new Error('"'+o+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=t.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:t.getArg(e,"line"),originalColumn:t.getArg(e,"column")};var o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source){return{line:t.getArg(i,"generatedLine",null),column:t.getArg(i,"generatedColumn",null),lastColumn:t.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};o=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=t.parseSourceMapInput(e)}var o=t.getArg(n,"version");var i=t.getArg(n,"sections");if(o!=this._version){throw new Error("Unsupported version: "+o)}this._sources=new u;this._names=new u;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=t.getArg(e,"offset");var o=t.getArg(n,"line");var i=t.getArg(n,"column");if(o{var o=n(763);var t=n(48);var i=n(392).I;var u=n(668).H;function SourceMapGenerator(e){if(!e){e={}}this._file=t.getArg(e,"file",null);this._sourceRoot=t.getArg(e,"sourceRoot",null);this._skipValidation=t.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new u;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping(function(e){var o={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){o.source=e.source;if(r!=null){o.source=t.relative(r,o.source)}o.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){o.name=e.name}}n.addMapping(o)});e.sources.forEach(function(o){var i=o;if(r!==null){i=t.relative(r,o)}if(!n._sources.has(i)){n._sources.add(i)}var u=e.sourceContentFor(o);if(u!=null){n.setSourceContent(o,u)}});return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=t.getArg(e,"generated");var n=t.getArg(e,"original",null);var o=t.getArg(e,"source",null);var i=t.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,o,i)}if(o!=null){o=String(o);if(!this._sources.has(o)){this._sources.add(o)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=t.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[t.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[t.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var o=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}o=e.file}var u=this._sourceRoot;if(u!=null){o=t.relative(u,o)}var s=new i;var a=new i;this._mappings.unsortedForEach(function(r){if(r.source===o&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=t.join(n,r.source)}if(u!=null){r.source=t.relative(u,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var c=r.source;if(c!=null&&!s.has(c)){s.add(c)}var l=r.name;if(l!=null&&!a.has(l)){a.add(l)}},this);this._sources=s;this._names=a;e.sources.forEach(function(r){var o=e.sourceContentFor(r);if(o!=null){if(n!=null){r=t.join(n,r)}if(u!=null){r=t.relative(u,r)}this.setSourceContent(r,o)}},this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,o){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!o){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:o}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var u=0;var s=0;var a="";var c;var l;var p;var f;var h=this._mappings.toArray();for(var g=0,d=h.length;g0){if(!t.compareByGeneratedPositionsInflated(l,h[g-1])){continue}c+=","}}c+=o.encode(l.generatedColumn-e);e=l.generatedColumn;if(l.source!=null){f=this._sources.indexOf(l.source);c+=o.encode(f-s);s=f;c+=o.encode(l.originalLine-1-i);i=l.originalLine-1;c+=o.encode(l.originalColumn-n);n=l.originalColumn;if(l.name!=null){p=this._names.indexOf(l.name);c+=o.encode(p-u);u=p}}a+=c}return a};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map(function(e){if(!this._sourcesContents){return null}if(r!=null){e=t.relative(r,e)}var n=t.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.SourceMapGenerator=SourceMapGenerator},10:(e,r,n)=>{var o=n(503).SourceMapGenerator;var t=n(48);var i=/(\r?\n)/;var u=10;var s="$$$isSourceNode$$$";function SourceNode(e,r,n,o,t){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=t==null?null:t;this[s]=true;if(o!=null)this.add(o)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var o=new SourceNode;var u=e.split(i);var s=0;var a=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return s=0;r--){this.prepend(e[r])}}else if(e[s]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,o=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var o=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var o=urlParse(e);if(o){if(!o.path){return e}n=o.path}var t=r.isAbsolute(n);var i=n.split(/\/+/);for(var u,s=0,a=i.length-1;a>=0;a--){u=i[a];if(u==="."){i.splice(a,1)}else if(u===".."){s++}else if(s>0){if(u===""){i.splice(a+1,s);s=0}else{i.splice(a,2);s--}}}n=i.join("/");if(n===""){n=t?"/":"."}if(o){o.path=n;return urlGenerate(o)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var t=urlParse(e);if(t){e=t.path||"/"}if(n&&!n.scheme){if(t){n.scheme=t.scheme}return urlGenerate(n)}if(n||r.match(o)){return r}if(t&&!t.host&&!t.path){t.host=r;return urlGenerate(t)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(t){t.path=i;return urlGenerate(t)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var o=e.lastIndexOf("/");if(o<0){return r}e=e.slice(0,o);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var t=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=t?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=t?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var o=strcmp(e.source,r.source);if(o!==0){return o}o=e.originalLine-r.originalLine;if(o!==0){return o}o=e.originalColumn-r.originalColumn;if(o!==0||n){return o}o=e.generatedColumn-r.generatedColumn;if(o!==0){return o}o=e.generatedLine-r.generatedLine;if(o!==0){return o}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var o=e.generatedLine-r.generatedLine;if(o!==0){return o}o=e.generatedColumn-r.generatedColumn;if(o!==0||n){return o}o=strcmp(e.source,r.source);if(o!==0){return o}o=e.originalLine-r.originalLine;if(o!==0){return o}o=e.originalColumn-r.originalColumn;if(o!==0){return o}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var o=urlParse(n);if(!o){throw new Error("sourceMapURL could not be parsed")}if(o.path){var t=o.path.lastIndexOf("/");if(t>=0){o.path=o.path.substring(0,t+1)}}r=join(urlGenerate(o),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},779:(e,r,n)=>{r.SourceMapGenerator=n(503).SourceMapGenerator;r.SourceMapConsumer=n(65).SourceMapConsumer;r.SourceNode=n(10).SourceNode}};var r={};function __nccwpck_require__(n){if(r[n]){return r[n].exports}var o=r[n]={exports:{}};var t=true;try{e[n](o,o.exports,__nccwpck_require__);t=false}finally{if(t)delete r[n]}return o.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(779)})(); \ No newline at end of file diff --git a/packages/next/compiled/string-hash/index.js b/packages/next/compiled/string-hash/index.js index d871af39dffc2aa..a5be16c6fe76ca6 100644 --- a/packages/next/compiled/string-hash/index.js +++ b/packages/next/compiled/string-hash/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var e={705:e=>{function hash(e){var r=5381,_=e.length;while(_){r=r*33^e.charCodeAt(--_)}return r>>>0}e.exports=hash}};var r={};function __webpack_require__(_){if(r[_]){return r[_].exports}var t=r[_]={exports:{}};var a=true;try{e[_](t,t.exports,__webpack_require__);a=false}finally{if(a)delete r[_]}return t.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(705)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var e={705:e=>{function hash(e){var r=5381,_=e.length;while(_){r=r*33^e.charCodeAt(--_)}return r>>>0}e.exports=hash}};var r={};function __nccwpck_require__(_){if(r[_]){return r[_].exports}var t=r[_]={exports:{}};var a=true;try{e[_](t,t.exports,__nccwpck_require__);a=false}finally{if(a)delete r[_]}return t.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(705)})(); \ No newline at end of file diff --git a/packages/next/compiled/strip-ansi/index.js b/packages/next/compiled/strip-ansi/index.js index 6153bceb87b7d26..cfe50667e6b843c 100644 --- a/packages/next/compiled/strip-ansi/index.js +++ b/packages/next/compiled/strip-ansi/index.js @@ -1 +1 @@ -module.exports=(()=>{"use strict";var e={301:(e,r,t)=>{const _=t(979);e.exports=(e=>typeof e==="string"?e.replace(_(),""):e)},979:e=>{e.exports=(({onlyFirst:e=false}={})=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?undefined:"g")})}};var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var _=r[t]={exports:{}};var n=true;try{e[t](_,_.exports,__webpack_require__);n=false}finally{if(n)delete r[t]}return _.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(301)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var e={301:(e,r,t)=>{const _=t(979);e.exports=(e=>typeof e==="string"?e.replace(_(),""):e)},979:e=>{e.exports=(({onlyFirst:e=false}={})=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?undefined:"g")})}};var r={};function __nccwpck_require__(t){if(r[t]){return r[t].exports}var _=r[t]={exports:{}};var n=true;try{e[t](_,_.exports,__nccwpck_require__);n=false}finally{if(n)delete r[t]}return _.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(301)})(); \ No newline at end of file diff --git a/packages/next/compiled/terser/bundle.min.js b/packages/next/compiled/terser/bundle.min.js index 1d5fd2b9eed31e0..0db7b0b3bf16b10 100644 --- a/packages/next/compiled/terser/bundle.min.js +++ b/packages/next/compiled/terser/bundle.min.js @@ -1 +1 @@ -module.exports=(()=>{var e={89:function(e,t){(function(e,n){true?n(t):0})(this,function(e){"use strict";var t={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"};var n="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";var i={5:n,"5module":n+" export import",6:n+" const class extends export import super"};var r=/^in(stanceof)?$/;var a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var o="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";var s=new RegExp("["+a+"]");var u=new RegExp("["+a+o+"]");a=o=null;var c=[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,157,310,10,21,11,7,153,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,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,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,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,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,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,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,2357,44,11,6,17,0,370,43,1301,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,42710,42,4148,12,221,3,5761,15,7472,3104,541];var l=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,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,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,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,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239];function isInAstralSet(e,t){var n=65536;for(var i=0;ie){return false}n+=t[i+1];if(n>=e){return true}}}function isIdentifierStart(e,t){if(e<65){return e===36}if(e<91){return true}if(e<97){return e===95}if(e<123){return true}if(e<=65535){return e>=170&&s.test(String.fromCharCode(e))}if(t===false){return false}return isInAstralSet(e,c)}function isIdentifierChar(e,t){if(e<48){return e===36}if(e<58){return true}if(e<65){return false}if(e<91){return true}if(e<97){return e===95}if(e<123){return true}if(e<=65535){return e>=170&&u.test(String.fromCharCode(e))}if(t===false){return false}return isInAstralSet(e,c)||isInAstralSet(e,l)}var f=function TokenType(e,t){if(t===void 0)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 binop(e,t){return new f(e,{beforeExpr:true,binop:t})}var p={beforeExpr:true},_={startsExpr:true};var h={};function kw(e,t){if(t===void 0)t={};t.keyword=e;return h[e]=new f(e,t)}var d={num:new f("num",_),regexp:new f("regexp",_),string:new f("string",_),name:new f("name",_),eof:new f("eof"),bracketL:new f("[",{beforeExpr:true,startsExpr:true}),bracketR:new f("]"),braceL:new f("{",{beforeExpr:true,startsExpr:true}),braceR:new f("}"),parenL:new f("(",{beforeExpr:true,startsExpr:true}),parenR:new f(")"),comma:new f(",",p),semi:new f(";",p),colon:new f(":",p),dot:new f("."),question:new f("?",p),arrow:new f("=>",p),template:new f("template"),invalidTemplate:new f("invalidTemplate"),ellipsis:new f("...",p),backQuote:new f("`",_),dollarBraceL:new f("${",{beforeExpr:true,startsExpr:true}),eq:new f("=",{beforeExpr:true,isAssign:true}),assign:new f("_=",{beforeExpr:true,isAssign:true}),incDec:new f("++/--",{prefix:true,postfix:true,startsExpr:true}),prefix:new f("!/~",{beforeExpr:true,prefix:true,startsExpr:true}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("/<=/>=",7),bitShift:binop("<>/>>>",8),plusMin:new f("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new f("**",{beforeExpr:true}),_break:kw("break"),_case:kw("case",p),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",p),_do:kw("do",{isLoop:true,beforeExpr:true}),_else:kw("else",p),_finally:kw("finally"),_for:kw("for",{isLoop:true}),_function:kw("function",_),_if:kw("if"),_return:kw("return",p),_switch:kw("switch"),_throw:kw("throw",p),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:true}),_with:kw("with"),_new:kw("new",{beforeExpr:true,startsExpr:true}),_this:kw("this",_),_super:kw("super",_),_class:kw("class",_),_extends:kw("extends",p),_export:kw("export"),_import:kw("import",_),_null:kw("null",_),_true:kw("true",_),_false:kw("false",_),_in:kw("in",{beforeExpr:true,binop:7}),_instanceof:kw("instanceof",{beforeExpr:true,binop:7}),_typeof:kw("typeof",{beforeExpr:true,prefix:true,startsExpr:true}),_void:kw("void",{beforeExpr:true,prefix:true,startsExpr:true}),_delete:kw("delete",{beforeExpr:true,prefix:true,startsExpr:true})};var m=/\r\n?|\n|\u2028|\u2029/;var E=new RegExp(m.source,"g");function isNewLine(e,t){return e===10||e===13||!t&&(e===8232||e===8233)}var g=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;var v=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;var D=Object.prototype;var b=D.hasOwnProperty;var y=D.toString;function has(e,t){return b.call(e,t)}var k=Array.isArray||function(e){return y.call(e)==="[object Array]"};function wordsRegexp(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var S=function Position(e,t){this.line=e;this.column=t};S.prototype.offset=function offset(e){return new S(this.line,this.column+e)};var T=function SourceLocation(e,t,n){this.start=t;this.end=n;if(e.sourceFile!==null){this.source=e.sourceFile}};function getLineInfo(e,t){for(var n=1,i=0;;){E.lastIndex=i;var r=E.exec(e);if(r&&r.index=2015){t.ecmaVersion-=2009}if(t.allowReserved==null){t.allowReserved=t.ecmaVersion<5}if(k(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}if(k(t.onComment)){t.onComment=pushComment(t,t.onComment)}return t}function pushComment(e,t){return function(n,i,r,a,o,s){var u={type:n?"Block":"Line",value:i,start:r,end:a};if(e.locations){u.loc=new T(this,o,s)}if(e.ranges){u.range=[r,a]}t.push(u)}}var C=1,R=2,x=C|R,F=4,O=8,w=16,M=32,N=64,I=128;function functionFlags(e,t){return R|(e?F:0)|(t?O:0)}var P=0,L=1,B=2,V=3,U=4,z=5;var K=function Parser(e,n,r){this.options=e=getOptions(e);this.sourceFile=e.sourceFile;this.keywords=wordsRegexp(i[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var a="";if(e.allowReserved!==true){for(var o=e.ecmaVersion;;o--){if(a=t[o]){break}}if(e.sourceType==="module"){a+=" await"}}this.reservedWords=wordsRegexp(a);var s=(a?a+" ":"")+t.strict;this.reservedWordsStrict=wordsRegexp(s);this.reservedWordsStrictBind=wordsRegexp(s+" "+t.strictBind);this.input=String(n);this.containsEsc=false;if(r){this.pos=r;this.lineStart=this.input.lastIndexOf("\n",r-1)+1;this.curLine=this.input.slice(0,this.lineStart).split(m).length}else{this.pos=this.lineStart=0;this.curLine=1}this.type=d.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=true;this.inModule=e.sourceType==="module";this.strict=this.inModule||this.strictDirective(this.pos);this.potentialArrowAt=-1;this.yieldPos=this.awaitPos=this.awaitIdentPos=0;this.labels=[];this.undefinedExports={};if(this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"){this.skipLineComment(2)}this.scopeStack=[];this.enterScope(C);this.regexpState=null};var G={inFunction:{configurable:true},inGenerator:{configurable:true},inAsync:{configurable:true},allowSuper:{configurable:true},allowDirectSuper:{configurable:true},treatFunctionsAsVar:{configurable:true}};K.prototype.parse=function parse(){var e=this.options.program||this.startNode();this.nextToken();return this.parseTopLevel(e)};G.inFunction.get=function(){return(this.currentVarScope().flags&R)>0};G.inGenerator.get=function(){return(this.currentVarScope().flags&O)>0};G.inAsync.get=function(){return(this.currentVarScope().flags&F)>0};G.allowSuper.get=function(){return(this.currentThisScope().flags&N)>0};G.allowDirectSuper.get=function(){return(this.currentThisScope().flags&I)>0};G.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};K.prototype.inNonArrowFunction=function inNonArrowFunction(){return(this.currentThisScope().flags&R)>0};K.extend=function extend(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var n=this;for(var i=0;i-1){this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element")}var n=t?e.parenthesizedAssign:e.parenthesizedBind;if(n>-1){this.raiseRecoverable(n,"Parenthesized pattern")}};X.checkExpressionErrors=function(e,t){if(!e){return false}var n=e.shorthandAssign;var i=e.doubleProto;if(!t){return n>=0||i>=0}if(n>=0){this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")}if(i>=0){this.raiseRecoverable(i,"Redefinition of __proto__ property")}};X.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos=6){this.unexpected()}return this.parseFunctionStatement(r,false,!e);case d._class:if(e){this.unexpected()}return this.parseClass(r,true);case d._if:return this.parseIfStatement(r);case d._return:return this.parseReturnStatement(r);case d._switch:return this.parseSwitchStatement(r);case d._throw:return this.parseThrowStatement(r);case d._try:return this.parseTryStatement(r);case d._const:case d._var:a=a||this.value;if(e&&a!=="var"){this.unexpected()}return this.parseVarStatement(r,a);case d._while:return this.parseWhileStatement(r);case d._with:return this.parseWithStatement(r);case d.braceL:return this.parseBlock(true,r);case d.semi:return this.parseEmptyStatement(r);case d._export:case d._import:if(this.options.ecmaVersion>10&&i===d._import){v.lastIndex=this.pos;var o=v.exec(this.input);var s=this.pos+o[0].length,u=this.input.charCodeAt(s);if(u===40){return this.parseExpressionStatement(r,this.parseExpression())}}if(!this.options.allowImportExportEverywhere){if(!t){this.raise(this.start,"'import' and 'export' may only appear at the top level")}if(!this.inModule){this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}}return i===d._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction()){if(e){this.unexpected()}this.next();return this.parseFunctionStatement(r,true,!e)}var c=this.value,l=this.parseExpression();if(i===d.name&&l.type==="Identifier"&&this.eat(d.colon)){return this.parseLabeledStatement(r,c,l,e)}else{return this.parseExpressionStatement(r,l)}}};W.parseBreakContinueStatement=function(e,t){var n=t==="break";this.next();if(this.eat(d.semi)||this.insertSemicolon()){e.label=null}else if(this.type!==d.name){this.unexpected()}else{e.label=this.parseIdent();this.semicolon()}var i=0;for(;i=6){this.eat(d.semi)}else{this.semicolon()}return this.finishNode(e,"DoWhileStatement")};W.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;this.labels.push(q);this.enterScope(0);this.expect(d.parenL);if(this.type===d.semi){if(t>-1){this.unexpected(t)}return this.parseFor(e,null)}var n=this.isLet();if(this.type===d._var||this.type===d._const||n){var i=this.startNode(),r=n?"let":this.value;this.next();this.parseVar(i,true,r);this.finishNode(i,"VariableDeclaration");if((this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&i.declarations.length===1){if(this.options.ecmaVersion>=9){if(this.type===d._in){if(t>-1){this.unexpected(t)}}else{e.await=t>-1}}return this.parseForIn(e,i)}if(t>-1){this.unexpected(t)}return this.parseFor(e,i)}var a=new DestructuringErrors;var o=this.parseExpression(true,a);if(this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of")){if(this.options.ecmaVersion>=9){if(this.type===d._in){if(t>-1){this.unexpected(t)}}else{e.await=t>-1}}this.toAssignable(o,false,a);this.checkLVal(o);return this.parseForIn(e,o)}else{this.checkExpressionErrors(a,true)}if(t>-1){this.unexpected(t)}return this.parseFor(e,o)};W.parseFunctionStatement=function(e,t,n){this.next();return this.parseFunction(e,$|(n?0:Z),false,t)};W.parseIfStatement=function(e){this.next();e.test=this.parseParenExpression();e.consequent=this.parseStatement("if");e.alternate=this.eat(d._else)?this.parseStatement("if"):null;return this.finishNode(e,"IfStatement")};W.parseReturnStatement=function(e){if(!this.inFunction&&!this.options.allowReturnOutsideFunction){this.raise(this.start,"'return' outside of function")}this.next();if(this.eat(d.semi)||this.insertSemicolon()){e.argument=null}else{e.argument=this.parseExpression();this.semicolon()}return this.finishNode(e,"ReturnStatement")};W.parseSwitchStatement=function(e){this.next();e.discriminant=this.parseParenExpression();e.cases=[];this.expect(d.braceL);this.labels.push(Y);this.enterScope(0);var t;for(var n=false;this.type!==d.braceR;){if(this.type===d._case||this.type===d._default){var i=this.type===d._case;if(t){this.finishNode(t,"SwitchCase")}e.cases.push(t=this.startNode());t.consequent=[];this.next();if(i){t.test=this.parseExpression()}else{if(n){this.raiseRecoverable(this.lastTokStart,"Multiple default clauses")}n=true;t.test=null}this.expect(d.colon)}else{if(!t){this.unexpected()}t.consequent.push(this.parseStatement(null))}}this.exitScope();if(t){this.finishNode(t,"SwitchCase")}this.next();this.labels.pop();return this.finishNode(e,"SwitchStatement")};W.parseThrowStatement=function(e){this.next();if(m.test(this.input.slice(this.lastTokEnd,this.start))){this.raise(this.lastTokEnd,"Illegal newline after throw")}e.argument=this.parseExpression();this.semicolon();return this.finishNode(e,"ThrowStatement")};var j=[];W.parseTryStatement=function(e){this.next();e.block=this.parseBlock();e.handler=null;if(this.type===d._catch){var t=this.startNode();this.next();if(this.eat(d.parenL)){t.param=this.parseBindingAtom();var n=t.param.type==="Identifier";this.enterScope(n?M:0);this.checkLVal(t.param,n?U:B);this.expect(d.parenR)}else{if(this.options.ecmaVersion<10){this.unexpected()}t.param=null;this.enterScope(0)}t.body=this.parseBlock(false);this.exitScope();e.handler=this.finishNode(t,"CatchClause")}e.finalizer=this.eat(d._finally)?this.parseBlock():null;if(!e.handler&&!e.finalizer){this.raise(e.start,"Missing catch or finally clause")}return this.finishNode(e,"TryStatement")};W.parseVarStatement=function(e,t){this.next();this.parseVar(e,false,t);this.semicolon();return this.finishNode(e,"VariableDeclaration")};W.parseWhileStatement=function(e){this.next();e.test=this.parseParenExpression();this.labels.push(q);e.body=this.parseStatement("while");this.labels.pop();return this.finishNode(e,"WhileStatement")};W.parseWithStatement=function(e){if(this.strict){this.raise(this.start,"'with' in strict mode")}this.next();e.object=this.parseParenExpression();e.body=this.parseStatement("with");return this.finishNode(e,"WithStatement")};W.parseEmptyStatement=function(e){this.next();return this.finishNode(e,"EmptyStatement")};W.parseLabeledStatement=function(e,t,n,i){for(var r=0,a=this.labels;r=0;u--){var c=this.labels[u];if(c.statementStart===e.start){c.statementStart=this.start;c.kind=s}else{break}}this.labels.push({name:t,kind:s,statementStart:this.start});e.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label");this.labels.pop();e.label=n;return this.finishNode(e,"LabeledStatement")};W.parseExpressionStatement=function(e,t){e.expression=t;this.semicolon();return this.finishNode(e,"ExpressionStatement")};W.parseBlock=function(e,t){if(e===void 0)e=true;if(t===void 0)t=this.startNode();t.body=[];this.expect(d.braceL);if(e){this.enterScope(0)}while(!this.eat(d.braceR)){var n=this.parseStatement(null);t.body.push(n)}if(e){this.exitScope()}return this.finishNode(t,"BlockStatement")};W.parseFor=function(e,t){e.init=t;this.expect(d.semi);e.test=this.type===d.semi?null:this.parseExpression();this.expect(d.semi);e.update=this.type===d.parenR?null:this.parseExpression();this.expect(d.parenR);e.body=this.parseStatement("for");this.exitScope();this.labels.pop();return this.finishNode(e,"ForStatement")};W.parseForIn=function(e,t){var n=this.type===d._in;this.next();if(t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")){this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer")}else if(t.type==="AssignmentPattern"){this.raise(t.start,"Invalid left-hand side in for-loop")}e.left=t;e.right=n?this.parseExpression():this.parseMaybeAssign();this.expect(d.parenR);e.body=this.parseStatement("for");this.exitScope();this.labels.pop();return this.finishNode(e,n?"ForInStatement":"ForOfStatement")};W.parseVar=function(e,t,n){e.declarations=[];e.kind=n;for(;;){var i=this.startNode();this.parseVarId(i,n);if(this.eat(d.eq)){i.init=this.parseMaybeAssign(t)}else if(n==="const"&&!(this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of"))){this.unexpected()}else if(i.id.type!=="Identifier"&&!(t&&(this.type===d._in||this.isContextual("of")))){this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value")}else{i.init=null}e.declarations.push(this.finishNode(i,"VariableDeclarator"));if(!this.eat(d.comma)){break}}return e};W.parseVarId=function(e,t){e.id=this.parseBindingAtom();this.checkLVal(e.id,t==="var"?L:B,false)};var $=1,Z=2,Q=4;W.parseFunction=function(e,t,n,i){this.initFunction(e);if(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i){if(this.type===d.star&&t&Z){this.unexpected()}e.generator=this.eat(d.star)}if(this.options.ecmaVersion>=8){e.async=!!i}if(t&$){e.id=t&Q&&this.type!==d.name?null:this.parseIdent();if(e.id&&!(t&Z)){this.checkLVal(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?L:B:V)}}var r=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;this.enterScope(functionFlags(e.async,e.generator));if(!(t&$)){e.id=this.type===d.name?this.parseIdent():null}this.parseFunctionParams(e);this.parseFunctionBody(e,n,false);this.yieldPos=r;this.awaitPos=a;this.awaitIdentPos=o;return this.finishNode(e,t&$?"FunctionDeclaration":"FunctionExpression")};W.parseFunctionParams=function(e){this.expect(d.parenL);e.params=this.parseBindingList(d.parenR,false,this.options.ecmaVersion>=8);this.checkYieldAwaitInDefaultParams()};W.parseClass=function(e,t){this.next();var n=this.strict;this.strict=true;this.parseClassId(e,t);this.parseClassSuper(e);var i=this.startNode();var r=false;i.body=[];this.expect(d.braceL);while(!this.eat(d.braceR)){var a=this.parseClassElement(e.superClass!==null);if(a){i.body.push(a);if(a.type==="MethodDefinition"&&a.kind==="constructor"){if(r){this.raise(a.start,"Duplicate constructor in the same class")}r=true}}}e.body=this.finishNode(i,"ClassBody");this.strict=n;return this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};W.parseClassElement=function(e){var t=this;if(this.eat(d.semi)){return null}var n=this.startNode();var i=function(e,i){if(i===void 0)i=false;var r=t.start,a=t.startLoc;if(!t.eatContextual(e)){return false}if(t.type!==d.parenL&&(!i||!t.canInsertSemicolon())){return true}if(n.key){t.unexpected()}n.computed=false;n.key=t.startNodeAt(r,a);n.key.name=e;t.finishNode(n.key,"Identifier");return false};n.kind="method";n.static=i("static");var r=this.eat(d.star);var a=false;if(!r){if(this.options.ecmaVersion>=8&&i("async",true)){a=true;r=this.options.ecmaVersion>=9&&this.eat(d.star)}else if(i("get")){n.kind="get"}else if(i("set")){n.kind="set"}}if(!n.key){this.parsePropertyName(n)}var o=n.key;var s=false;if(!n.computed&&!n.static&&(o.type==="Identifier"&&o.name==="constructor"||o.type==="Literal"&&o.value==="constructor")){if(n.kind!=="method"){this.raise(o.start,"Constructor can't have get/set modifier")}if(r){this.raise(o.start,"Constructor can't be a generator")}if(a){this.raise(o.start,"Constructor can't be an async method")}n.kind="constructor";s=e}else if(n.static&&o.type==="Identifier"&&o.name==="prototype"){this.raise(o.start,"Classes may not have a static property named prototype")}this.parseClassMethod(n,r,a,s);if(n.kind==="get"&&n.value.params.length!==0){this.raiseRecoverable(n.value.start,"getter should have no params")}if(n.kind==="set"&&n.value.params.length!==1){this.raiseRecoverable(n.value.start,"setter should have exactly one param")}if(n.kind==="set"&&n.value.params[0].type==="RestElement"){this.raiseRecoverable(n.value.params[0].start,"Setter cannot use rest params")}return n};W.parseClassMethod=function(e,t,n,i){e.value=this.parseMethod(t,n,i);return this.finishNode(e,"MethodDefinition")};W.parseClassId=function(e,t){if(this.type===d.name){e.id=this.parseIdent();if(t){this.checkLVal(e.id,B,false)}}else{if(t===true){this.unexpected()}e.id=null}};W.parseClassSuper=function(e){e.superClass=this.eat(d._extends)?this.parseExprSubscripts():null};W.parseExport=function(e,t){this.next();if(this.eat(d.star)){this.expectContextual("from");if(this.type!==d.string){this.unexpected()}e.source=this.parseExprAtom();this.semicolon();return this.finishNode(e,"ExportAllDeclaration")}if(this.eat(d._default)){this.checkExport(t,"default",this.lastTokStart);var n;if(this.type===d._function||(n=this.isAsyncFunction())){var i=this.startNode();this.next();if(n){this.next()}e.declaration=this.parseFunction(i,$|Q,false,n)}else if(this.type===d._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else{e.declaration=this.parseMaybeAssign();this.semicolon()}return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement()){e.declaration=this.parseStatement(null);if(e.declaration.type==="VariableDeclaration"){this.checkVariableExport(t,e.declaration.declarations)}else{this.checkExport(t,e.declaration.id.name,e.declaration.id.start)}e.specifiers=[];e.source=null}else{e.declaration=null;e.specifiers=this.parseExportSpecifiers(t);if(this.eatContextual("from")){if(this.type!==d.string){this.unexpected()}e.source=this.parseExprAtom()}else{for(var a=0,o=e.specifiers;a=6&&e){switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await"){this.raise(e.start,"Cannot use 'await' as identifier inside an async function")}break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";if(n){this.checkPatternErrors(n,true)}for(var i=0,r=e.properties;i=8&&!a&&o.name==="async"&&!this.canInsertSemicolon()&&this.eat(d._function)){return this.parseFunction(this.startNodeAt(i,r),0,false,true)}if(n&&!this.canInsertSemicolon()){if(this.eat(d.arrow)){return this.parseArrowExpression(this.startNodeAt(i,r),[o],false)}if(this.options.ecmaVersion>=8&&o.name==="async"&&this.type===d.name&&!a){o=this.parseIdent(false);if(this.canInsertSemicolon()||!this.eat(d.arrow)){this.unexpected()}return this.parseArrowExpression(this.startNodeAt(i,r),[o],true)}}return o;case d.regexp:var s=this.value;t=this.parseLiteral(s.value);t.regex={pattern:s.pattern,flags:s.flags};return t;case d.num:case d.string:return this.parseLiteral(this.value);case d._null:case d._true:case d._false:t=this.startNode();t.value=this.type===d._null?null:this.type===d._true;t.raw=this.type.keyword;this.next();return this.finishNode(t,"Literal");case d.parenL:var u=this.start,c=this.parseParenAndDistinguishExpression(n);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)){e.parenthesizedAssign=u}if(e.parenthesizedBind<0){e.parenthesizedBind=u}}return c;case d.bracketL:t=this.startNode();this.next();t.elements=this.parseExprList(d.bracketR,true,true,e);return this.finishNode(t,"ArrayExpression");case d.braceL:return this.parseObj(false,e);case d._function:t=this.startNode();this.next();return this.parseFunction(t,0);case d._class:return this.parseClass(this.startNode(),false);case d._new:return this.parseNew();case d.backQuote:return this.parseTemplate();case d._import:if(this.options.ecmaVersion>=11){return this.parseExprImport()}else{return this.unexpected()}default:this.unexpected()}};ee.parseExprImport=function(){var e=this.startNode();this.next();switch(this.type){case d.parenL:return this.parseDynamicImport(e);default:this.unexpected()}};ee.parseDynamicImport=function(e){this.next();e.source=this.parseMaybeAssign();if(!this.eat(d.parenR)){var t=this.start;if(this.eat(d.comma)&&this.eat(d.parenR)){this.raiseRecoverable(t,"Trailing comma is not allowed in import()")}else{this.unexpected(t)}}return this.finishNode(e,"ImportExpression")};ee.parseLiteral=function(e){var t=this.startNode();t.value=e;t.raw=this.input.slice(this.start,this.end);if(t.raw.charCodeAt(t.raw.length-1)===110){t.bigint=t.raw.slice(0,-1)}this.next();return this.finishNode(t,"Literal")};ee.parseParenExpression=function(){this.expect(d.parenL);var e=this.parseExpression();this.expect(d.parenR);return e};ee.parseParenAndDistinguishExpression=function(e){var t=this.start,n=this.startLoc,i,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,o=this.startLoc;var s=[],u=true,c=false;var l=new DestructuringErrors,f=this.yieldPos,p=this.awaitPos,_;this.yieldPos=0;this.awaitPos=0;while(this.type!==d.parenR){u?u=false:this.expect(d.comma);if(r&&this.afterTrailingComma(d.parenR,true)){c=true;break}else if(this.type===d.ellipsis){_=this.start;s.push(this.parseParenItem(this.parseRestBinding()));if(this.type===d.comma){this.raise(this.start,"Comma is not permitted after the rest element")}break}else{s.push(this.parseMaybeAssign(false,l,this.parseParenItem))}}var h=this.start,m=this.startLoc;this.expect(d.parenR);if(e&&!this.canInsertSemicolon()&&this.eat(d.arrow)){this.checkPatternErrors(l,false);this.checkYieldAwaitInDefaultParams();this.yieldPos=f;this.awaitPos=p;return this.parseParenArrowList(t,n,s)}if(!s.length||c){this.unexpected(this.lastTokStart)}if(_){this.unexpected(_)}this.checkExpressionErrors(l,true);this.yieldPos=f||this.yieldPos;this.awaitPos=p||this.awaitPos;if(s.length>1){i=this.startNodeAt(a,o);i.expressions=s;this.finishNodeAt(i,"SequenceExpression",h,m)}else{i=s[0]}}else{i=this.parseParenExpression()}if(this.options.preserveParens){var E=this.startNodeAt(t,n);E.expression=i;return this.finishNode(E,"ParenthesizedExpression")}else{return i}};ee.parseParenItem=function(e){return e};ee.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var te=[];ee.parseNew=function(){if(this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword new")}var e=this.startNode();var t=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(d.dot)){e.meta=t;var n=this.containsEsc;e.property=this.parseIdent(true);if(e.property.name!=="target"||n){this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target")}if(!this.inNonArrowFunction()){this.raiseRecoverable(e.start,"new.target can only be used in functions")}return this.finishNode(e,"MetaProperty")}var i=this.start,r=this.startLoc,a=this.type===d._import;e.callee=this.parseSubscripts(this.parseExprAtom(),i,r,true);if(a&&e.callee.type==="ImportExpression"){this.raise(i,"Cannot use new with import()")}if(this.eat(d.parenL)){e.arguments=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,false)}else{e.arguments=te}return this.finishNode(e,"NewExpression")};ee.parseTemplateElement=function(e){var t=e.isTagged;var n=this.startNode();if(this.type===d.invalidTemplate){if(!t){this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal")}n.value={raw:this.value,cooked:null}}else{n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value}}this.next();n.tail=this.type===d.backQuote;return this.finishNode(n,"TemplateElement")};ee.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=false;var n=this.startNode();this.next();n.expressions=[];var i=this.parseTemplateElement({isTagged:t});n.quasis=[i];while(!i.tail){if(this.type===d.eof){this.raise(this.pos,"Unterminated template literal")}this.expect(d.dollarBraceL);n.expressions.push(this.parseExpression());this.expect(d.braceR);n.quasis.push(i=this.parseTemplateElement({isTagged:t}))}this.next();return this.finishNode(n,"TemplateLiteral")};ee.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===d.name||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===d.star)&&!m.test(this.input.slice(this.lastTokEnd,this.start))};ee.parseObj=function(e,t){var n=this.startNode(),i=true,r={};n.properties=[];this.next();while(!this.eat(d.braceR)){if(!i){this.expect(d.comma);if(this.options.ecmaVersion>=5&&this.afterTrailingComma(d.braceR)){break}}else{i=false}var a=this.parseProperty(e,t);if(!e){this.checkPropClash(a,r,t)}n.properties.push(a)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};ee.parseProperty=function(e,t){var n=this.startNode(),i,r,a,o;if(this.options.ecmaVersion>=9&&this.eat(d.ellipsis)){if(e){n.argument=this.parseIdent(false);if(this.type===d.comma){this.raise(this.start,"Comma is not permitted after the rest element")}return this.finishNode(n,"RestElement")}if(this.type===d.parenL&&t){if(t.parenthesizedAssign<0){t.parenthesizedAssign=this.start}if(t.parenthesizedBind<0){t.parenthesizedBind=this.start}}n.argument=this.parseMaybeAssign(false,t);if(this.type===d.comma&&t&&t.trailingComma<0){t.trailingComma=this.start}return this.finishNode(n,"SpreadElement")}if(this.options.ecmaVersion>=6){n.method=false;n.shorthand=false;if(e||t){a=this.start;o=this.startLoc}if(!e){i=this.eat(d.star)}}var s=this.containsEsc;this.parsePropertyName(n);if(!e&&!s&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(n)){r=true;i=this.options.ecmaVersion>=9&&this.eat(d.star);this.parsePropertyName(n,t)}else{r=false}this.parsePropertyValue(n,e,i,r,a,o,t,s);return this.finishNode(n,"Property")};ee.parsePropertyValue=function(e,t,n,i,r,a,o,s){if((n||i)&&this.type===d.colon){this.unexpected()}if(this.eat(d.colon)){e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(false,o);e.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===d.parenL){if(t){this.unexpected()}e.kind="init";e.method=true;e.value=this.parseMethod(n,i)}else if(!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==d.comma&&this.type!==d.braceR)){if(n||i){this.unexpected()}e.kind=e.key.name;this.parsePropertyName(e);e.value=this.parseMethod(false);var u=e.kind==="get"?0:1;if(e.value.params.length!==u){var c=e.value.start;if(e.kind==="get"){this.raiseRecoverable(c,"getter should have no params")}else{this.raiseRecoverable(c,"setter should have exactly one param")}}else{if(e.kind==="set"&&e.value.params[0].type==="RestElement"){this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}}}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(n||i){this.unexpected()}this.checkUnreserved(e.key);if(e.key.name==="await"&&!this.awaitIdentPos){this.awaitIdentPos=r}e.kind="init";if(t){e.value=this.parseMaybeDefault(r,a,e.key)}else if(this.type===d.eq&&o){if(o.shorthandAssign<0){o.shorthandAssign=this.start}e.value=this.parseMaybeDefault(r,a,e.key)}else{e.value=e.key}e.shorthand=true}else{this.unexpected()}};ee.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(d.bracketL)){e.computed=true;e.key=this.parseMaybeAssign();this.expect(d.bracketR);return e.key}else{e.computed=false}}return e.key=this.type===d.num||this.type===d.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};ee.initFunction=function(e){e.id=null;if(this.options.ecmaVersion>=6){e.generator=e.expression=false}if(this.options.ecmaVersion>=8){e.async=false}};ee.parseMethod=function(e,t,n){var i=this.startNode(),r=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;this.initFunction(i);if(this.options.ecmaVersion>=6){i.generator=e}if(this.options.ecmaVersion>=8){i.async=!!t}this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;this.enterScope(functionFlags(t,i.generator)|N|(n?I:0));this.expect(d.parenL);i.params=this.parseBindingList(d.parenR,false,this.options.ecmaVersion>=8);this.checkYieldAwaitInDefaultParams();this.parseFunctionBody(i,false,true);this.yieldPos=r;this.awaitPos=a;this.awaitIdentPos=o;return this.finishNode(i,"FunctionExpression")};ee.parseArrowExpression=function(e,t,n){var i=this.yieldPos,r=this.awaitPos,a=this.awaitIdentPos;this.enterScope(functionFlags(n,false)|w);this.initFunction(e);if(this.options.ecmaVersion>=8){e.async=!!n}this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;e.params=this.toAssignableList(t,true);this.parseFunctionBody(e,true,false);this.yieldPos=i;this.awaitPos=r;this.awaitIdentPos=a;return this.finishNode(e,"ArrowFunctionExpression")};ee.parseFunctionBody=function(e,t,n){var i=t&&this.type!==d.braceL;var r=this.strict,a=false;if(i){e.body=this.parseMaybeAssign();e.expression=true;this.checkParams(e,false)}else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!r||o){a=this.strictDirective(this.end);if(a&&o){this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}}var s=this.labels;this.labels=[];if(a){this.strict=true}this.checkParams(e,!r&&!a&&!t&&!n&&this.isSimpleParamList(e.params));e.body=this.parseBlock(false);e.expression=false;this.adaptDirectivePrologue(e.body.body);this.labels=s}this.exitScope();if(this.strict&&e.id){this.checkLVal(e.id,z)}this.strict=r};ee.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);if(this.inModule&&r.flags&C){delete this.undefinedExports[e]}}else if(t===U){var a=this.currentScope();a.lexical.push(e)}else if(t===V){var o=this.currentScope();if(this.treatFunctionsAsVar){i=o.lexical.indexOf(e)>-1}else{i=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1}o.functions.push(e)}else{for(var s=this.scopeStack.length-1;s>=0;--s){var u=this.scopeStack[s];if(u.lexical.indexOf(e)>-1&&!(u.flags&M&&u.lexical[0]===e)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(e)>-1){i=true;break}u.var.push(e);if(this.inModule&&u.flags&C){delete this.undefinedExports[e]}if(u.flags&x){break}}}if(i){this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")}};ie.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1){this.undefinedExports[e.name]=e}};ie.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ie.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&x){return t}}};ie.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&x&&!(t.flags&w)){return t}}};var ae=function Node(e,t,n){this.type="";this.start=t;this.end=0;if(e.options.locations){this.loc=new T(e,n)}if(e.options.directSourceFile){this.sourceFile=e.options.directSourceFile}if(e.options.ranges){this.range=[t,0]}};var oe=K.prototype;oe.startNode=function(){return new ae(this,this.start,this.startLoc)};oe.startNodeAt=function(e,t){return new ae(this,e,t)};function finishNodeAt(e,t,n,i){e.type=t;e.end=n;if(this.options.locations){e.loc.end=i}if(this.options.ranges){e.range[1]=n}return e}oe.finishNode=function(e,t){return finishNodeAt.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};oe.finishNodeAt=function(e,t,n,i){return finishNodeAt.call(this,e,t,n,i)};var se=function TokContext(e,t,n,i,r){this.token=e;this.isExpr=!!t;this.preserveSpace=!!n;this.override=i;this.generator=!!r};var ue={b_stat:new se("{",false),b_expr:new se("{",true),b_tmpl:new se("${",false),p_stat:new se("(",false),p_expr:new se("(",true),q_tmpl:new se("`",true,true,function(e){return e.tryReadTemplateToken()}),f_stat:new se("function",false),f_expr:new se("function",true),f_expr_gen:new se("function",true,false,null,true),f_gen:new se("function",false,false,null,true)};var ce=K.prototype;ce.initialContext=function(){return[ue.b_stat]};ce.braceIsBlock=function(e){var t=this.curContext();if(t===ue.f_expr||t===ue.f_stat){return true}if(e===d.colon&&(t===ue.b_stat||t===ue.b_expr)){return!t.isExpr}if(e===d._return||e===d.name&&this.exprAllowed){return m.test(this.input.slice(this.lastTokEnd,this.start))}if(e===d._else||e===d.semi||e===d.eof||e===d.parenR||e===d.arrow){return true}if(e===d.braceL){return t===ue.b_stat}if(e===d._var||e===d._const||e===d.name){return false}return!this.exprAllowed};ce.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function"){return t.generator}}return false};ce.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===d.dot){this.exprAllowed=false}else if(t=n.updateContext){t.call(this,e)}else{this.exprAllowed=n.beforeExpr}};d.parenR.updateContext=d.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=true;return}var e=this.context.pop();if(e===ue.b_stat&&this.curContext().token==="function"){e=this.context.pop()}this.exprAllowed=!e.isExpr};d.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ue.b_stat:ue.b_expr);this.exprAllowed=true};d.dollarBraceL.updateContext=function(){this.context.push(ue.b_tmpl);this.exprAllowed=true};d.parenL.updateContext=function(e){var t=e===d._if||e===d._for||e===d._with||e===d._while;this.context.push(t?ue.p_stat:ue.p_expr);this.exprAllowed=true};d.incDec.updateContext=function(){};d._function.updateContext=d._class.updateContext=function(e){if(e.beforeExpr&&e!==d.semi&&e!==d._else&&!(e===d._return&&m.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===d.colon||e===d.braceL)&&this.curContext()===ue.b_stat)){this.context.push(ue.f_expr)}else{this.context.push(ue.f_stat)}this.exprAllowed=false};d.backQuote.updateContext=function(){if(this.curContext()===ue.q_tmpl){this.context.pop()}else{this.context.push(ue.q_tmpl)}this.exprAllowed=false};d.star.updateContext=function(e){if(e===d._function){var t=this.context.length-1;if(this.context[t]===ue.f_expr){this.context[t]=ue.f_expr_gen}else{this.context[t]=ue.f_gen}}this.exprAllowed=true};d.name.updateContext=function(e){var t=false;if(this.options.ecmaVersion>=6&&e!==d.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext()){t=true}}this.exprAllowed=t};var le="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";var fe=le+" Extended_Pictographic";var pe=fe;var _e={9:le,10:fe,11:pe};var he="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";var de="Adlam Adlm Ahom 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 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";var me=de+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";var Ee=me+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";var ge={9:de,10:me,11:Ee};var ve={};function buildUnicodeData(e){var t=ve[e]={binary:wordsRegexp(_e[e]+" "+he),nonBinary:{General_Category:wordsRegexp(he),Script:wordsRegexp(ge[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}buildUnicodeData(9);buildUnicodeData(10);buildUnicodeData(11);var De=K.prototype;var be=function RegExpValidationState(e){this.parser=e;this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"");this.unicodeProperties=ve[e.options.ecmaVersion>=11?11:e.options.ecmaVersion];this.source="";this.flags="";this.start=0;this.switchU=false;this.switchN=false;this.pos=0;this.lastIntValue=0;this.lastStringValue="";this.lastAssertionIsQuantifiable=false;this.numCapturingParens=0;this.maxBackReference=0;this.groupNames=[];this.backReferenceNames=[]};be.prototype.reset=function reset(e,t,n){var i=n.indexOf("u")!==-1;this.start=e|0;this.source=t+"";this.flags=n;this.switchU=i&&this.parser.options.ecmaVersion>=6;this.switchN=i&&this.parser.options.ecmaVersion>=9};be.prototype.raise=function raise(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};be.prototype.at=function at(e){var t=this.source;var n=t.length;if(e>=n){return-1}var i=t.charCodeAt(e);if(!this.switchU||i<=55295||i>=57344||e+1>=n){return i}var r=t.charCodeAt(e+1);return r>=56320&&r<=57343?(i<<10)+r-56613888:i};be.prototype.nextIndex=function nextIndex(e){var t=this.source;var n=t.length;if(e>=n){return n}var i=t.charCodeAt(e),r;if(!this.switchU||i<=55295||i>=57344||e+1>=n||(r=t.charCodeAt(e+1))<56320||r>57343){return e+1}return e+2};be.prototype.current=function current(){return this.at(this.pos)};be.prototype.lookahead=function lookahead(){return this.at(this.nextIndex(this.pos))};be.prototype.advance=function advance(){this.pos=this.nextIndex(this.pos)};be.prototype.eat=function eat(e){if(this.current()===e){this.advance();return true}return false};function codePointToString(e){if(e<=65535){return String.fromCharCode(e)}e-=65536;return String.fromCharCode((e>>10)+55296,(e&1023)+56320)}De.validateRegExpFlags=function(e){var t=e.validFlags;var n=e.flags;for(var i=0;i-1){this.raise(e.start,"Duplicate regular expression flag")}}};De.validateRegExpPattern=function(e){this.regexp_pattern(e);if(!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0){e.switchN=true;this.regexp_pattern(e)}};De.regexp_pattern=function(e){e.pos=0;e.lastIntValue=0;e.lastStringValue="";e.lastAssertionIsQuantifiable=false;e.numCapturingParens=0;e.maxBackReference=0;e.groupNames.length=0;e.backReferenceNames.length=0;this.regexp_disjunction(e);if(e.pos!==e.source.length){if(e.eat(41)){e.raise("Unmatched ')'")}if(e.eat(93)||e.eat(125)){e.raise("Lone quantifier brackets")}}if(e.maxBackReference>e.numCapturingParens){e.raise("Invalid escape")}for(var t=0,n=e.backReferenceNames;t=9){n=e.eat(60)}if(e.eat(61)||e.eat(33)){this.regexp_disjunction(e);if(!e.eat(41)){e.raise("Unterminated group")}e.lastAssertionIsQuantifiable=!n;return true}}e.pos=t;return false};De.regexp_eatQuantifier=function(e,t){if(t===void 0)t=false;if(this.regexp_eatQuantifierPrefix(e,t)){e.eat(63);return true}return false};De.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};De.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var i=0,r=-1;if(this.regexp_eatDecimalDigits(e)){i=e.lastIntValue;if(e.eat(44)&&this.regexp_eatDecimalDigits(e)){r=e.lastIntValue}if(e.eat(125)){if(r!==-1&&r=9){this.regexp_groupSpecifier(e)}else if(e.current()===63){e.raise("Invalid group")}this.regexp_disjunction(e);if(e.eat(41)){e.numCapturingParens+=1;return true}e.raise("Unterminated group")}return false};De.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)};De.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,true)){e.raise("Nothing to repeat")}return false};De.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(isSyntaxCharacter(t)){e.lastIntValue=t;e.advance();return true}return false};function isSyntaxCharacter(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}De.regexp_eatPatternCharacters=function(e){var t=e.pos;var n=0;while((n=e.current())!==-1&&!isSyntaxCharacter(n)){e.advance()}return e.pos!==t};De.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();if(t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124){e.advance();return true}return false};De.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){if(e.groupNames.indexOf(e.lastStringValue)!==-1){e.raise("Duplicate capture group name")}e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};De.regexp_eatGroupName=function(e){e.lastStringValue="";if(e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62)){return true}e.raise("Invalid capture group name")}return false};De.regexp_eatRegExpIdentifierName=function(e){e.lastStringValue="";if(this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=codePointToString(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e)){e.lastStringValue+=codePointToString(e.lastIntValue)}return true}return false};De.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos;var n=e.current();e.advance();if(n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e)){n=e.lastIntValue}if(isRegExpIdentifierStart(n)){e.lastIntValue=n;return true}e.pos=t;return false};function isRegExpIdentifierStart(e){return isIdentifierStart(e,true)||e===36||e===95}De.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos;var n=e.current();e.advance();if(n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e)){n=e.lastIntValue}if(isRegExpIdentifierPart(n)){e.lastIntValue=n;return true}e.pos=t;return false};function isRegExpIdentifierPart(e){return isIdentifierChar(e,true)||e===36||e===95||e===8204||e===8205}De.regexp_eatAtomEscape=function(e){if(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)){return true}if(e.switchU){if(e.current()===99){e.raise("Invalid unicode escape")}e.raise("Invalid escape")}return false};De.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU){if(n>e.maxBackReference){e.maxBackReference=n}return true}if(n<=e.numCapturingParens){return true}e.pos=t}return false};De.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e)){e.backReferenceNames.push(e.lastStringValue);return true}e.raise("Invalid named reference")}return false};De.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)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};De.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e)){return true}e.pos=t}return false};De.regexp_eatZero=function(e){if(e.current()===48&&!isDecimalDigit(e.lookahead())){e.lastIntValue=0;e.advance();return true}return false};De.regexp_eatControlEscape=function(e){var t=e.current();if(t===116){e.lastIntValue=9;e.advance();return true}if(t===110){e.lastIntValue=10;e.advance();return true}if(t===118){e.lastIntValue=11;e.advance();return true}if(t===102){e.lastIntValue=12;e.advance();return true}if(t===114){e.lastIntValue=13;e.advance();return true}return false};De.regexp_eatControlLetter=function(e){var t=e.current();if(isControlLetter(t)){e.lastIntValue=t%32;e.advance();return true}return false};function isControlLetter(e){return e>=65&&e<=90||e>=97&&e<=122}De.regexp_eatRegExpUnicodeEscapeSequence=function(e){var t=e.pos;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(e.switchU&&n>=55296&&n<=56319){var i=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(r>=56320&&r<=57343){e.lastIntValue=(n-55296)*1024+(r-56320)+65536;return true}}e.pos=i;e.lastIntValue=n}return true}if(e.switchU&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&isValidUnicode(e.lastIntValue)){return true}if(e.switchU){e.raise("Invalid unicode escape")}e.pos=t}return false};function isValidUnicode(e){return e>=0&&e<=1114111}De.regexp_eatIdentityEscape=function(e){if(e.switchU){if(this.regexp_eatSyntaxCharacter(e)){return true}if(e.eat(47)){e.lastIntValue=47;return true}return false}var t=e.current();if(t!==99&&(!e.switchN||t!==107)){e.lastIntValue=t;e.advance();return true}return false};De.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 true}return false};De.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(isCharacterClassEscape(t)){e.lastIntValue=-1;e.advance();return true}if(e.switchU&&this.options.ecmaVersion>=9&&(t===80||t===112)){e.lastIntValue=-1;e.advance();if(e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125)){return true}e.raise("Invalid property name")}return false};function isCharacterClassEscape(e){return e===100||e===68||e===115||e===83||e===119||e===87}De.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 i=e.lastStringValue;this.regexp_validateUnicodePropertyNameAndValue(e,n,i);return true}}e.pos=t;if(this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;this.regexp_validateUnicodePropertyNameOrValue(e,r);return true}return false};De.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){if(!has(e.unicodeProperties.nonBinary,t)){e.raise("Invalid property name")}if(!e.unicodeProperties.nonBinary[t].test(n)){e.raise("Invalid property value")}};De.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(!e.unicodeProperties.binary.test(t)){e.raise("Invalid property name")}};De.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(isUnicodePropertyNameCharacter(t=e.current())){e.lastStringValue+=codePointToString(t);e.advance()}return e.lastStringValue!==""};function isUnicodePropertyNameCharacter(e){return isControlLetter(e)||e===95}De.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(isUnicodePropertyValueCharacter(t=e.current())){e.lastStringValue+=codePointToString(t);e.advance()}return e.lastStringValue!==""};function isUnicodePropertyValueCharacter(e){return isUnicodePropertyNameCharacter(e)||isDecimalDigit(e)}De.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};De.regexp_eatCharacterClass=function(e){if(e.eat(91)){e.eat(94);this.regexp_classRanges(e);if(e.eat(93)){return true}e.raise("Unterminated character class")}return false};De.regexp_classRanges=function(e){while(this.regexp_eatClassAtom(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;if(e.switchU&&(t===-1||n===-1)){e.raise("Invalid character class")}if(t!==-1&&n!==-1&&t>n){e.raise("Range out of order in character class")}}}};De.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e)){return true}if(e.switchU){var n=e.current();if(n===99||isOctalDigit(n)){e.raise("Invalid class escape")}e.raise("Invalid escape")}e.pos=t}var i=e.current();if(i!==93){e.lastIntValue=i;e.advance();return true}return false};De.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98)){e.lastIntValue=8;return true}if(e.switchU&&e.eat(45)){e.lastIntValue=45;return true}if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e)){return true}e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};De.regexp_eatClassControlLetter=function(e){var t=e.current();if(isDecimalDigit(t)||t===95){e.lastIntValue=t%32;e.advance();return true}return false};De.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2)){return true}if(e.switchU){e.raise("Invalid escape")}e.pos=t}return false};De.regexp_eatDecimalDigits=function(e){var t=e.pos;var n=0;e.lastIntValue=0;while(isDecimalDigit(n=e.current())){e.lastIntValue=10*e.lastIntValue+(n-48);e.advance()}return e.pos!==t};function isDecimalDigit(e){return e>=48&&e<=57}De.regexp_eatHexDigits=function(e){var t=e.pos;var n=0;e.lastIntValue=0;while(isHexDigit(n=e.current())){e.lastIntValue=16*e.lastIntValue+hexToInt(n);e.advance()}return e.pos!==t};function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hexToInt(e){if(e>=65&&e<=70){return 10+(e-65)}if(e>=97&&e<=102){return 10+(e-97)}return e-48}De.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;if(t<=3&&this.regexp_eatOctalDigit(e)){e.lastIntValue=t*64+n*8+e.lastIntValue}else{e.lastIntValue=t*8+n}}else{e.lastIntValue=t}return true}return false};De.regexp_eatOctalDigit=function(e){var t=e.current();if(isOctalDigit(t)){e.lastIntValue=t-48;e.advance();return true}e.lastIntValue=0;return false};function isOctalDigit(e){return e>=48&&e<=55}De.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var i=0;i=this.input.length){return this.finishToken(d.eof)}if(e.override){return e.override(this)}else{this.readToken(this.fullCharCodeAtPos())}};ke.readToken=function(e){if(isIdentifierStart(e,this.options.ecmaVersion>=6)||e===92){return this.readWord()}return this.getTokenFromCode(e)};ke.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344){return e}var t=this.input.charCodeAt(this.pos+1);return(e<<10)+t-56613888};ke.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition();var t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1){this.raise(this.pos-2,"Unterminated comment")}this.pos=n+2;if(this.options.locations){E.lastIndex=t;var i;while((i=E.exec(this.input))&&i.index8&&e<14||e>=5760&&g.test(String.fromCharCode(e))){++this.pos}else{break e}}}};ke.finishToken=function(e,t){this.end=this.pos;if(this.options.locations){this.endLoc=this.curPosition()}var n=this.type;this.type=e;this.value=t;this.updateContext(n)};ke.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57){return this.readNumber(true)}var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46){this.pos+=3;return this.finishToken(d.ellipsis)}else{++this.pos;return this.finishToken(d.dot)}};ke.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed){++this.pos;return this.readRegexp()}if(e===61){return this.finishOp(d.assign,2)}return this.finishOp(d.slash,1)};ke.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1);var n=1;var i=e===42?d.star:d.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42){++n;i=d.starstar;t=this.input.charCodeAt(this.pos+2)}if(t===61){return this.finishOp(d.assign,n+1)}return this.finishOp(i,n)};ke.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){return this.finishOp(e===124?d.logicalOR:d.logicalAND,2)}if(t===61){return this.finishOp(d.assign,2)}return this.finishOp(e===124?d.bitwiseOR:d.bitwiseAND,1)};ke.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61){return this.finishOp(d.assign,2)}return this.finishOp(d.bitwiseXOR,1)};ke.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||m.test(this.input.slice(this.lastTokEnd,this.pos)))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(d.incDec,2)}if(t===61){return this.finishOp(d.assign,2)}return this.finishOp(d.plusMin,1)};ke.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1);var n=1;if(t===e){n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2;if(this.input.charCodeAt(this.pos+n)===61){return this.finishOp(d.assign,n+1)}return this.finishOp(d.bitShift,n)}if(t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45){this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(t===61){n=2}return this.finishOp(d.relational,n)};ke.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61){return this.finishOp(d.equality,this.input.charCodeAt(this.pos+2)===61?3:2)}if(e===61&&t===62&&this.options.ecmaVersion>=6){this.pos+=2;return this.finishToken(d.arrow)}return this.finishOp(e===61?d.eq:d.prefix,1)};ke.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:++this.pos;return this.finishToken(d.parenL);case 41:++this.pos;return this.finishToken(d.parenR);case 59:++this.pos;return this.finishToken(d.semi);case 44:++this.pos;return this.finishToken(d.comma);case 91:++this.pos;return this.finishToken(d.bracketL);case 93:++this.pos;return this.finishToken(d.bracketR);case 123:++this.pos;return this.finishToken(d.braceL);case 125:++this.pos;return this.finishToken(d.braceR);case 58:++this.pos;return this.finishToken(d.colon);case 63:++this.pos;return this.finishToken(d.question);case 96:if(this.options.ecmaVersion<6){break}++this.pos;return this.finishToken(d.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88){return this.readRadixNumber(16)}if(this.options.ecmaVersion>=6){if(t===111||t===79){return this.readRadixNumber(8)}if(t===98||t===66){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(false);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 126:return this.finishOp(d.prefix,1)}this.raise(this.pos,"Unexpected character '"+codePointToString$1(e)+"'")};ke.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);this.pos+=t;return this.finishToken(e,n)};ke.readRegexp=function(){var e,t,n=this.pos;for(;;){if(this.pos>=this.input.length){this.raise(n,"Unterminated regular expression")}var i=this.input.charAt(this.pos);if(m.test(i)){this.raise(n,"Unterminated regular expression")}if(!e){if(i==="["){t=true}else if(i==="]"&&t){t=false}else if(i==="/"&&!t){break}e=i==="\\"}else{e=false}++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var a=this.pos;var o=this.readWord1();if(this.containsEsc){this.unexpected(a)}var s=this.regexpState||(this.regexpState=new be(this));s.reset(n,r,o);this.validateRegExpFlags(s);this.validateRegExpPattern(s);var u=null;try{u=new RegExp(r,o)}catch(e){}return this.finishToken(d.regexp,{pattern:r,flags:o,value:u})};ke.readInt=function(e,t){var n=this.pos,i=0;for(var r=0,a=t==null?Infinity:t;r=97){s=o-97+10}else if(o>=65){s=o-65+10}else if(o>=48&&o<=57){s=o-48}else{s=Infinity}if(s>=e){break}++this.pos;i=i*e+s}if(this.pos===n||t!=null&&this.pos-n!==t){return null}return i};ke.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);if(n==null){this.raise(this.start+2,"Expected number in radix "+e)}if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110){n=typeof BigInt!=="undefined"?BigInt(this.input.slice(t,this.pos)):null;++this.pos}else if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}return this.finishToken(d.num,n)};ke.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10)===null){this.raise(t,"Invalid number")}var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(n&&this.strict){this.raise(t,"Invalid number")}var i=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&i===110){var r=this.input.slice(t,this.pos);var a=typeof BigInt!=="undefined"?BigInt(r):null;++this.pos;if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}return this.finishToken(d.num,a)}if(n&&/[89]/.test(this.input.slice(t,this.pos))){n=false}if(i===46&&!n){++this.pos;this.readInt(10);i=this.input.charCodeAt(this.pos)}if((i===69||i===101)&&!n){i=this.input.charCodeAt(++this.pos);if(i===43||i===45){++this.pos}if(this.readInt(10)===null){this.raise(t,"Invalid number")}}if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}var o=this.input.slice(t,this.pos);var s=n?parseInt(o,8):parseFloat(o);return this.finishToken(d.num,s)};ke.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6){this.unexpected()}var n=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(t>1114111){this.invalidStringToken(n,"Code point out of bounds")}}else{t=this.readHexChar(4)}return t};function codePointToString$1(e){if(e<=65535){return String.fromCharCode(e)}e-=65536;return String.fromCharCode((e>>10)+55296,(e&1023)+56320)}ke.readString=function(e){var t="",n=++this.pos;for(;;){if(this.pos>=this.input.length){this.raise(this.start,"Unterminated string constant")}var i=this.input.charCodeAt(this.pos);if(i===e){break}if(i===92){t+=this.input.slice(n,this.pos);t+=this.readEscapedChar(false);n=this.pos}else{if(isNewLine(i,this.options.ecmaVersion>=10)){this.raise(this.start,"Unterminated string constant")}++this.pos}}t+=this.input.slice(n,this.pos++);return this.finishToken(d.string,t)};var Se={};ke.tryReadTemplateToken=function(){this.inTemplateElement=true;try{this.readTmplToken()}catch(e){if(e===Se){this.readInvalidTemplateToken()}else{throw e}}this.inTemplateElement=false};ke.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9){throw Se}else{this.raise(e,t)}};ke.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length){this.raise(this.start,"Unterminated template")}var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===d.template||this.type===d.invalidTemplate)){if(n===36){this.pos+=2;return this.finishToken(d.dollarBraceL)}else{++this.pos;return this.finishToken(d.backQuote)}}e+=this.input.slice(t,this.pos);return this.finishToken(d.template,e)}if(n===92){e+=this.input.slice(t,this.pos);e+=this.readEscapedChar(true);t=this.pos}else if(isNewLine(n)){e+=this.input.slice(t,this.pos);++this.pos;switch(n){case 13:if(this.input.charCodeAt(this.pos)===10){++this.pos}case 10:e+="\n";break;default:e+=String.fromCharCode(n);break}if(this.options.locations){++this.curLine;this.lineStart=this.pos}t=this.pos}else{++this.pos}}};ke.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0];var r=parseInt(i,8);if(r>255){i=i.slice(0,-1);r=parseInt(i,8)}this.pos+=i.length-1;t=this.input.charCodeAt(this.pos);if((i!=="0"||t===56||t===57)&&(this.strict||e)){this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode")}return String.fromCharCode(r)}if(isNewLine(t)){return""}return String.fromCharCode(t)}};ke.readHexChar=function(e){var t=this.pos;var n=this.readInt(16,e);if(n===null){this.invalidStringToken(t,"Bad character escape sequence")}return n};ke.readWord1=function(){this.containsEsc=false;var e="",t=true,n=this.pos;var i=this.options.ecmaVersion>=6;while(this.pos5&&t<2015)t+=2009;i[n]=t}else{i[n]=e&&HOP(e,n)?e[n]:t[n]}}return i}function noop(){}function return_false(){return false}function return_true(){return true}function return_this(){return this}function return_null(){return null}var i=function(){function MAP(t,n,i){var r=[],a=[],o;function doit(){var s=n(t[o],o);var u=s instanceof Last;if(u)s=s.v;if(s instanceof AtTop){s=s.v;if(s instanceof Splice){a.push.apply(a,i?s.v.slice().reverse():s.v)}else{a.push(s)}}else if(s!==e){if(s instanceof Splice){r.push.apply(r,i?s.v.slice().reverse():s.v)}else{r.push(s)}}return u}if(Array.isArray(t)){if(i){for(o=t.length;--o>=0;)if(doit())break;r.reverse();a.reverse()}else{for(o=0;o=0;){if(e[n]===t)e.splice(n,1)}}function mergeSort(e,t){if(e.length<2)return e.slice();function merge(e,n){var i=[],r=0,a=0,o=0;while(r{n+=e})}return n}function has_annotation(e,t){return e._annotations&t}function set_annotation(e,t){e._annotations|=t}var o="";var s=true;var u="break case catch class const continue debugger default delete do else export extends finally for function if in instanceof let new return switch throw try typeof var void while with";var c="false null true";var l="enum implements import interface package private protected public static super this "+c+" "+u;var f="return new delete throw else case yield await";u=makePredicate(u);l=makePredicate(l);f=makePredicate(f);c=makePredicate(c);var p=makePredicate(characters("+-*&%=<>!?|~^"));var _=/[0-9a-f]/i;var h=/^0x[0-9a-f]+$/i;var d=/^0[0-7]+$/;var m=/^0o[0-7]+$/i;var E=/^0b[01]+$/i;var g=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i;var v=/^(0[xob])?[0-9a-f]+n$/i;var D=makePredicate(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","**","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","||=","&&=","??=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","??","||"]);var b=makePredicate(characters("  \n\r\t\f\v​           \u2028\u2029   \ufeff"));var y=makePredicate(characters("\n\r\u2028\u2029"));var k=makePredicate(characters(";]),:"));var S=makePredicate(characters("[{(,;:"));var T=makePredicate(characters("[]{}(),;:"));var A={ID_Start:/[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])+/};function get_full_char(e,t){if(is_surrogate_pair_head(e.charCodeAt(t))){if(is_surrogate_pair_tail(e.charCodeAt(t+1))){return e.charAt(t)+e.charAt(t+1)}}else if(is_surrogate_pair_tail(e.charCodeAt(t))){if(is_surrogate_pair_head(e.charCodeAt(t-1))){return e.charAt(t-1)+e.charAt(t)}}return e.charAt(t)}function get_full_char_code(e,t){if(is_surrogate_pair_head(e.charCodeAt(t))){return 65536+(e.charCodeAt(t)-55296<<10)+e.charCodeAt(t+1)-56320}return e.charCodeAt(t)}function get_full_char_length(e){var t=0;for(var n=0;n65535){e-=65536;return String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)}return String.fromCharCode(e)}function is_surrogate_pair_head(e){return e>=55296&&e<=56319}function is_surrogate_pair_tail(e){return e>=56320&&e<=57343}function is_digit(e){return e>=48&&e<=57}function is_identifier_start(e){return A.ID_Start.test(e)}function is_identifier_char(e){return A.ID_Continue.test(e)}const C=/^[a-z_$][a-z0-9_$]*$/i;function is_basic_identifier_string(e){return C.test(e)}function is_identifier_string(e,t){if(C.test(e)){return true}if(!t&&/[\ud800-\udfff]/.test(e)){return false}var n=A.ID_Start.exec(e);if(!n||n.index!==0){return false}e=e.slice(n[0].length);if(!e){return true}n=A.ID_Continue.exec(e);return!!n&&n[0].length===e.length}function parse_js_number(e,t=true){if(!t&&e.includes("e")){return NaN}if(h.test(e)){return parseInt(e.substr(2),16)}else if(d.test(e)){return parseInt(e.substr(1),8)}else if(m.test(e)){return parseInt(e.substr(2),8)}else if(E.test(e)){return parseInt(e.substr(2),2)}else if(g.test(e)){return parseFloat(e)}else{var n=parseFloat(e);if(n==e)return n}}class JS_Parse_Error extends Error{constructor(e,t,n,i,r){super();this.name="SyntaxError";this.message=e;this.filename=t;this.line=n;this.col=i;this.pos=r}}function js_error(e,t,n,i,r){throw new JS_Parse_Error(e,t,n,i,r)}function is_token(e,t,n){return e.type==t&&(n==null||e.value==n)}var R={};function tokenizer(e,t,n,i){var r={text:e,filename:t,pos:0,tokpos:0,line:1,tokline:0,col:0,tokcol:0,newline_before:false,regex_allowed:false,brace_counter:0,template_braces:[],comments_before:[],directives:{},directive_stack:[]};function peek(){return get_full_char(r.text,r.pos)}function is_option_chain_op(){const e=r.text.charCodeAt(r.pos+1)===46;if(!e)return false;const t=r.text.charCodeAt(r.pos+2);return t<48||t>57}function next(e,t){var n=get_full_char(r.text,r.pos++);if(e&&!n)throw R;if(y.has(n)){r.newline_before=r.newline_before||!t;++r.line;r.col=0;if(n=="\r"&&peek()=="\n"){++r.pos;n="\n"}}else{if(n.length>1){++r.pos;++r.col}++r.col}return n}function forward(e){while(e--)next()}function looking_at(e){return r.text.substr(r.pos,e.length)==e}function find_eol(){var e=r.text;for(var t=r.pos,n=r.text.length;t="0"&&e<="7"}function read_escaped_char(e,t,n){var i=next(true,e);switch(i.charCodeAt(0)){case 110:return"\n";case 114:return"\r";case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 120:return String.fromCharCode(hex_bytes(2,t));case 117:if(peek()=="{"){next(true);if(peek()==="}")parse_error("Expecting hex-character between {}");while(peek()=="0")next(true);var a,o=find("}",true)-r.pos;if(o>6||(a=hex_bytes(o,t))>1114111){parse_error("Unicode reference out of bounds")}next(true);return from_char_code(a)}return String.fromCharCode(hex_bytes(4,t));case 10:return"";case 13:if(peek()=="\n"){next(true,e);return""}}if(is_octal(i)){if(n&&t){const e=i==="0"&&!is_octal(peek());if(!e){parse_error("Octal escape sequences are not allowed in template strings")}}return read_octal_escape_sequence(i,t)}return i}function read_octal_escape_sequence(e,t){var n=peek();if(n>="0"&&n<="7"){e+=next(true);if(e[0]<="3"&&(n=peek())>="0"&&n<="7")e+=next(true)}if(e==="0")return"\0";if(e.length>0&&next_token.has_directive("use strict")&&t)parse_error("Legacy octal escape sequences are not allowed in strict mode");return String.fromCharCode(parseInt(e,8))}function hex_bytes(e,t){var n=0;for(;e>0;--e){if(!t&&isNaN(parseInt(peek(),16))){return parseInt(n,16)||""}var i=next(true);if(isNaN(parseInt(i,16)))parse_error("Invalid hex-character pattern in string");n+=i}return parseInt(n,16)}var E=with_eof_error("Unterminated string constant",function(){const e=r.pos;var t=next(),n=[];for(;;){var i=next(true,true);if(i=="\\")i=read_escaped_char(true,true);else if(i=="\r"||i=="\n")parse_error("Unterminated string constant");else if(i==t)break;n.push(i)}var a=token("string",n.join(""));o=r.text.slice(e,r.pos);a.quote=t;return a});var g=with_eof_error("Unterminated template",function(e){if(e){r.template_braces.push(r.brace_counter)}var t="",n="",i,a;next(true,true);while((i=next(true,true))!="`"){if(i=="\r"){if(peek()=="\n")++r.pos;i="\n"}else if(i=="$"&&peek()=="{"){next(true,true);r.brace_counter++;a=token(e?"template_head":"template_substitution",t);o=n;s=false;return a}n+=i;if(i=="\\"){var u=r.pos;var c=m&&(m.type==="name"||m.type==="punc"&&(m.value===")"||m.value==="]"));i=read_escaped_char(true,!c,true);n+=r.text.substr(u,r.pos-u)}t+=i}r.template_braces.pop();a=token(e?"template_head":"template_substitution",t);o=n;s=true;return a});function skip_line_comment(e){var t=r.regex_allowed;var n=find_eol(),i;if(n==-1){i=r.text.substr(r.pos);r.pos=r.text.length}else{i=r.text.substring(r.pos,n);r.pos=n}r.col=r.tokcol+(r.pos-r.tokpos);r.comments_before.push(token(e,i,true));r.regex_allowed=t;return next_token}var k=with_eof_error("Unterminated multiline comment",function(){var e=r.regex_allowed;var t=find("*/",true);var n=r.text.substring(r.pos,t).replace(/\r\n|\r|\u2028|\u2029/g,"\n");forward(get_full_char_length(n)+2);r.comments_before.push(token("comment2",n,true));r.newline_before=r.newline_before||n.includes("\n");r.regex_allowed=e;return next_token});var A=with_eof_error("Unterminated identifier name",function(){var e=[],t,n=false;var i=function(){n=true;next();if(peek()!=="u"){parse_error("Expecting UnicodeEscapeSequence -- uXXXX or u{XXXX}")}return read_escaped_char(false,true)};if((t=peek())==="\\"){t=i();if(!is_identifier_start(t)){parse_error("First identifier char is an invalid identifier char")}}else if(is_identifier_start(t)){next()}else{return""}e.push(t);while((t=peek())!=null){if((t=peek())==="\\"){t=i();if(!is_identifier_char(t)){parse_error("Invalid escaped identifier char")}}else{if(!is_identifier_char(t)){break}next()}e.push(t)}const r=e.join("");if(l.has(r)&&n){parse_error("Escaped characters are not allowed in keywords")}return r});var C=with_eof_error("Unterminated regular expression",function(e){var t=false,n,i=false;while(n=next(true))if(y.has(n)){parse_error("Unexpected line terminator")}else if(t){e+="\\"+n;t=false}else if(n=="["){i=true;e+=n}else if(n=="]"&&i){i=false;e+=n}else if(n=="/"&&!i){break}else if(n=="\\"){t=true}else{e+=n}const r=A();return token("regexp","/"+e+"/"+r)});function read_operator(e){function grow(e){if(!peek())return e;var t=e+peek();if(D.has(t)){next();return grow(t)}else{return e}}return token("operator",grow(e||next()))}function handle_slash(){next();switch(peek()){case"/":next();return skip_line_comment("comment1");case"*":next();return k()}return r.regex_allowed?C(""):read_operator("/")}function handle_eq_sign(){next();if(peek()===">"){next();return token("arrow","=>")}else{return read_operator("=")}}function handle_dot(){next();if(is_digit(peek().charCodeAt(0))){return read_num(".")}if(peek()==="."){next();next();return token("expand","...")}return token("punc",".")}function read_word(){var e=A();if(a)return token("name",e);return c.has(e)?token("atom",e):!u.has(e)?token("name",e):D.has(e)?token("operator",e):token("keyword",e)}function with_eof_error(e,t){return function(n){try{return t(n)}catch(t){if(t===R)parse_error(e);else throw t}}}function next_token(e){if(e!=null)return C(e);if(i&&r.pos==0&&looking_at("#!")){start_token();forward(2);skip_line_comment("comment5")}for(;;){skip_whitespace();start_token();if(n){if(looking_at("\x3c!--")){forward(4);skip_line_comment("comment3");continue}if(looking_at("--\x3e")&&r.newline_before){forward(3);skip_line_comment("comment4");continue}}var t=peek();if(!t)return token("eof");var a=t.charCodeAt(0);switch(a){case 34:case 39:return E();case 46:return handle_dot();case 47:{var o=handle_slash();if(o===next_token)continue;return o}case 61:return handle_eq_sign();case 63:{if(!is_option_chain_op())break;next();next();return token("punc","?.")}case 96:return g(true);case 123:r.brace_counter++;break;case 125:r.brace_counter--;if(r.template_braces.length>0&&r.template_braces[r.template_braces.length-1]===r.brace_counter)return g(false);break}if(is_digit(a))return read_num();if(T.has(t))return token("punc",next());if(p.has(t))return read_operator();if(a==92||is_identifier_start(t))return read_word();break}parse_error("Unexpected character '"+t+"'")}next_token.next=next;next_token.peek=peek;next_token.context=function(e){if(e)r=e;return r};next_token.add_directive=function(e){r.directive_stack[r.directive_stack.length-1].push(e);if(r.directives[e]===undefined){r.directives[e]=1}else{r.directives[e]++}};next_token.push_directives_stack=function(){r.directive_stack.push([])};next_token.pop_directives_stack=function(){var e=r.directive_stack[r.directive_stack.length-1];for(var t=0;t0};return next_token}var x=makePredicate(["typeof","void","delete","--","++","!","~","-","+"]);var F=makePredicate(["--","++"]);var O=makePredicate(["=","+=","-=","??=","&&=","||=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&="]);var w=makePredicate(["??=","&&=","||="]);var M=function(e,t){for(var n=0;n","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],{});var N=makePredicate(["atom","num","big_int","string","regexp","name"]);function parse(e,t){const n=new WeakMap;t=defaults(t,{bare_returns:false,ecma:null,expression:false,filename:null,html5_comments:true,module:false,shebang:true,strict:false,toplevel:null},true);var i={input:typeof e=="string"?tokenizer(e,t.filename,t.html5_comments,t.shebang):e,token:null,prev:null,peeked:null,in_function:0,in_async:-1,in_generator:-1,in_directives:true,in_loop:0,labels:[]};i.token=next();function is(e,t){return is_token(i.token,e,t)}function peek(){return i.peeked||(i.peeked=i.input())}function next(){i.prev=i.token;if(!i.peeked)peek();i.token=i.peeked;i.peeked=null;i.in_directives=i.in_directives&&(i.token.type=="string"||is("punc",";"));return i.token}function prev(){return i.prev}function croak(e,t,n,r){var a=i.input.context();js_error(e,a.filename,t!=null?t:a.tokline,n!=null?n:a.tokcol,r!=null?r:a.tokpos)}function token_error(e,t){croak(t,e.line,e.col)}function unexpected(e){if(e==null)e=i.token;token_error(e,"Unexpected token: "+e.type+" ("+e.value+")")}function expect_token(e,t){if(is(e,t)){return next()}token_error(i.token,"Unexpected token "+i.token.type+" «"+i.token.value+"»"+", expected "+e+" «"+t+"»")}function expect(e){return expect_token("punc",e)}function has_newline_before(e){return e.nlb||!e.comments_before.every(e=>!e.nlb)}function can_insert_semicolon(){return!t.strict&&(is("eof")||is("punc","}")||has_newline_before(i.token))}function is_in_generator(){return i.in_generator===i.in_function}function is_in_async(){return i.in_async===i.in_function}function semicolon(e){if(is("punc",";"))next();else if(!e&&!can_insert_semicolon())unexpected()}function parenthesised(){expect("(");var e=S(true);expect(")");return e}function embed_tokens(e){return function _embed_tokens_wrapper(...t){const n=i.token;const r=e(...t);r.start=n;r.end=prev();return r}}function handle_regexp(){if(is("operator","/")||is("operator","/=")){i.peeked=null;i.token=i.input(i.token.value.substr(1))}}var r=embed_tokens(function statement(e,n,r){handle_regexp();switch(i.token.type){case"string":if(i.in_directives){var a=peek();if(!o.includes("\\")&&(is_token(a,"punc",";")||is_token(a,"punc","}")||has_newline_before(a)||is_token(a,"eof"))){i.input.add_directive(i.token.value)}else{i.in_directives=false}}var s=i.in_directives,l=simple_statement();return s&&l.body instanceof Bt?new G(l.body):l;case"template_head":case"num":case"big_int":case"regexp":case"operator":case"atom":return simple_statement();case"name":if(i.token.value=="async"&&is_token(peek(),"keyword","function")){next();next();if(n){croak("functions are not allowed as the body of a loop")}return u(fe,false,true,e)}if(i.token.value=="import"&&!is_token(peek(),"punc","(")&&!is_token(peek(),"punc",".")){next();var _=import_();semicolon();return _}return is_token(peek(),"punc",":")?labeled_statement():simple_statement();case"punc":switch(i.token.value){case"{":return new W({start:i.token,body:block_(),end:prev()});case"[":case"(":return simple_statement();case";":i.in_directives=false;next();return new q;default:unexpected()}case"keyword":switch(i.token.value){case"break":next();return break_cont(be);case"continue":next();return break_cont(ye);case"debugger":next();semicolon();return new K;case"do":next();var h=in_loop(statement);expect_token("keyword","while");var d=parenthesised();semicolon(true);return new Q({body:h,condition:d});case"while":next();return new J({condition:parenthesised(),body:in_loop(function(){return statement(false,true)})});case"for":next();return for_();case"class":next();if(n){croak("classes are not allowed as the body of a loop")}if(r){croak("classes are not allowed as the body of an if")}return class_(ft);case"function":next();if(n){croak("functions are not allowed as the body of a loop")}return u(fe,false,false,e);case"if":next();return if_();case"return":if(i.in_function==0&&!t.bare_returns)croak("'return' outside of function");next();var m=null;if(is("punc",";")){next()}else if(!can_insert_semicolon()){m=S(true);semicolon()}return new ge({value:m});case"switch":next();return new Ae({expression:parenthesised(),body:in_loop(switch_body_)});case"throw":next();if(has_newline_before(i.token))croak("Illegal newline after 'throw'");var m=S(true);semicolon();return new ve({value:m});case"try":next();return try_();case"var":next();var _=c();semicolon();return _;case"let":next();var _=f();semicolon();return _;case"const":next();var _=p();semicolon();return _;case"with":if(i.input.has_directive("use strict")){croak("Strict mode may not include a with statement")}next();return new ie({expression:parenthesised(),body:statement()});case"export":if(!is_token(peek(),"punc","(")){next();var _=export_();if(is("punc",";"))semicolon();return _}}}unexpected()});function labeled_statement(){var e=as_symbol(Ft);if(e.name==="await"&&is_in_async()){token_error(i.prev,"await cannot be used as label inside async function")}if(i.labels.some(t=>t.name===e.name)){croak("Label "+e.name+" defined twice")}expect(":");i.labels.push(e);var t=r();i.labels.pop();if(!(t instanceof $)){e.references.forEach(function(t){if(t instanceof ye){t=t.label.start;croak("Continue label `"+e.name+"` refers to non-IterationStatement.",t.line,t.col,t.pos)}})}return new j({body:t,label:e})}function simple_statement(e){return new X({body:(e=S(true),semicolon(),e)})}function break_cont(e){var t=null,n;if(!can_insert_semicolon()){t=as_symbol(Nt,true)}if(t!=null){n=i.labels.find(e=>e.name===t.name);if(!n)croak("Undefined label "+t.name);t.thedef=n}else if(i.in_loop==0)croak(e.TYPE+" not inside a loop or switch");semicolon();var r=new e({label:t});if(n)n.references.push(r);return r}function for_(){var e="`for await` invalid in this context";var t=i.token;if(t.type=="name"&&t.value=="await"){if(!is_in_async()){token_error(t,e)}next()}else{t=false}expect("(");var n=null;if(!is("punc",";")){n=is("keyword","var")?(next(),c(true)):is("keyword","let")?(next(),f(true)):is("keyword","const")?(next(),p(true)):S(true,true);var r=is("operator","in");var a=is("name","of");if(t&&!a){token_error(t,e)}if(r||a){if(n instanceof Me){if(n.definitions.length>1)token_error(n.start,"Only one variable declaration allowed in for..in loop")}else if(!(is_assignable(n)||(n=to_destructuring(n))instanceof pe)){token_error(n.start,"Invalid left-hand side in for..in loop")}next();if(r){return for_in(n)}else{return for_of(n,!!t)}}}else if(t){token_error(t,e)}return regular_for(n)}function regular_for(e){expect(";");var t=is("punc",";")?null:S(true);expect(";");var n=is("punc",")")?null:S(true);expect(")");return new ee({init:e,condition:t,step:n,body:in_loop(function(){return r(false,true)})})}function for_of(e,t){var n=e instanceof Me?e.definitions[0].name:null;var i=S(true);expect(")");return new ne({await:t,init:e,name:n,object:i,body:in_loop(function(){return r(false,true)})})}function for_in(e){var t=S(true);expect(")");return new te({init:e,object:t,body:in_loop(function(){return r(false,true)})})}var a=function(e,t,n){if(has_newline_before(i.token)){croak("Unexpected newline before arrow (=>)")}expect_token("arrow","=>");var r=_function_body(is("punc","{"),false,n);var a=r instanceof Array&&r.length?r[r.length-1].end:r instanceof Array?e:r.end;return new le({start:e,end:a,async:n,argnames:t,body:r})};var u=function(e,t,n,i){var r=e===fe;var a=is("operator","*");if(a){next()}var o=is("name")?as_symbol(r?bt:St):null;if(r&&!o){if(i){e=ce}else{unexpected()}}if(o&&e!==ue&&!(o instanceof dt))unexpected(prev());var s=[];var u=_function_body(true,a||t,n,o,s);return new e({start:s.start,end:u.end,is_generator:a,async:n,name:o,argnames:s,body:u})};function track_used_binding_identifiers(e,t){var n=new Set;var i=false;var r=false;var a=false;var o=!!t;var s={add_parameter:function(t){if(n.has(t.value)){if(i===false){i=t}s.check_strict()}else{n.add(t.value);if(e){switch(t.value){case"arguments":case"eval":case"yield":if(o){token_error(t,"Unexpected "+t.value+" identifier as parameter inside strict mode")}break;default:if(l.has(t.value)){unexpected()}}}}},mark_default_assignment:function(e){if(r===false){r=e}},mark_spread:function(e){if(a===false){a=e}},mark_strict_mode:function(){o=true},is_strict:function(){return r!==false||a!==false||o},check_strict:function(){if(s.is_strict()&&i!==false){token_error(i,"Parameter "+i.value+" was used already")}}};return s}function parameters(e){var t=track_used_binding_identifiers(true,i.input.has_directive("use strict"));expect("(");while(!is("punc",")")){var n=parameter(t);e.push(n);if(!is("punc",")")){expect(",")}if(n instanceof oe){break}}next()}function parameter(e,t){var n;var r=false;if(e===undefined){e=track_used_binding_identifiers(true,i.input.has_directive("use strict"))}if(is("expand","...")){r=i.token;e.mark_spread(i.token);next()}n=binding_element(e,t);if(is("operator","=")&&r===false){e.mark_default_assignment(i.token);next();n=new tt({start:n.start,left:n,operator:"=",right:S(false),end:i.token})}if(r!==false){if(!is("punc",")")){unexpected()}n=new oe({start:r,expression:n,end:r})}e.check_strict();return n}function binding_element(e,t){var n=[];var r=true;var a=false;var o;var s=i.token;if(e===undefined){e=track_used_binding_identifiers(false,i.input.has_directive("use strict"))}t=t===undefined?Dt:t;if(is("punc","[")){next();while(!is("punc","]")){if(r){r=false}else{expect(",")}if(is("expand","...")){a=true;o=i.token;e.mark_spread(i.token);next()}if(is("punc")){switch(i.token.value){case",":n.push(new Wt({start:i.token,end:i.token}));continue;case"]":break;case"[":case"{":n.push(binding_element(e,t));break;default:unexpected()}}else if(is("name")){e.add_parameter(i.token);n.push(as_symbol(t))}else{croak("Invalid function parameter")}if(is("operator","=")&&a===false){e.mark_default_assignment(i.token);next();n[n.length-1]=new tt({start:n[n.length-1].start,left:n[n.length-1],operator:"=",right:S(false),end:i.token})}if(a){if(!is("punc","]")){croak("Rest element must be last element")}n[n.length-1]=new oe({start:o,expression:n[n.length-1],end:o})}}expect("]");e.check_strict();return new pe({start:s,names:n,is_array:true,end:prev()})}else if(is("punc","{")){next();while(!is("punc","}")){if(r){r=false}else{expect(",")}if(is("expand","...")){a=true;o=i.token;e.mark_spread(i.token);next()}if(is("name")&&(is_token(peek(),"punc")||is_token(peek(),"operator"))&&[",","}","="].includes(peek().value)){e.add_parameter(i.token);var u=prev();var c=as_symbol(t);if(a){n.push(new oe({start:o,expression:c,end:c.end}))}else{n.push(new at({start:u,key:c.name,value:c,end:c.end}))}}else if(is("punc","}")){continue}else{var l=i.token;var f=as_property_name();if(f===null){unexpected(prev())}else if(prev().type==="name"&&!is("punc",":")){n.push(new at({start:prev(),key:f,value:new t({start:prev(),name:f,end:prev()}),end:prev()}))}else{expect(":");n.push(new at({start:l,quote:l.quote,key:f,value:binding_element(e,t),end:prev()}))}}if(a){if(!is("punc","}")){croak("Rest element must be last element")}}else if(is("operator","=")){e.mark_default_assignment(i.token);next();n[n.length-1].value=new tt({start:n[n.length-1].value.start,left:n[n.length-1].value,operator:"=",right:S(false),end:i.token})}}expect("}");e.check_strict();return new pe({start:s,names:n,is_array:false,end:prev()})}else if(is("name")){e.add_parameter(i.token);return as_symbol(t)}else{croak("Invalid function parameter")}}function params_or_seq_(e,t){var n;var r;var a;var o=[];expect("(");while(!is("punc",")")){if(n)unexpected(n);if(is("expand","...")){n=i.token;if(t)r=i.token;next();o.push(new oe({start:prev(),expression:S(),end:i.token}))}else{o.push(S())}if(!is("punc",")")){expect(",");if(is("punc",")")){a=prev();if(t)r=a}}}expect(")");if(e&&is("arrow","=>")){if(n&&a)unexpected(a)}else if(r){unexpected(r)}return o}function _function_body(e,t,n,r,a){var o=i.in_loop;var s=i.labels;var u=i.in_generator;var c=i.in_async;++i.in_function;if(t)i.in_generator=i.in_function;if(n)i.in_async=i.in_function;if(a)parameters(a);if(e)i.in_directives=true;i.in_loop=0;i.labels=[];if(e){i.input.push_directives_stack();var l=block_();if(r)_verify_symbol(r);if(a)a.forEach(_verify_symbol);i.input.pop_directives_stack()}else{var l=[new ge({start:i.token,value:S(false),end:i.token})]}--i.in_function;i.in_loop=o;i.labels=s;i.in_generator=u;i.in_async=c;return l}function _await_expression(){if(!is_in_async()){croak("Unexpected await expression outside async function",i.prev.line,i.prev.col,i.prev.pos)}return new ke({start:prev(),end:i.token,expression:v(true)})}function _yield_expression(){if(!is_in_generator()){croak("Unexpected yield expression outside generator function",i.prev.line,i.prev.col,i.prev.pos)}var e=i.token;var t=false;var n=true;if(can_insert_semicolon()||is("punc")&&k.has(i.token.value)){n=false}else if(is("operator","*")){t=true;next()}return new Se({start:e,is_star:t,expression:n?S():null,end:prev()})}function if_(){var e=parenthesised(),t=r(false,false,true),n=null;if(is("keyword","else")){next();n=r(false,false,true)}return new Te({condition:e,body:t,alternative:n})}function block_(){expect("{");var e=[];while(!is("punc","}")){if(is("eof"))unexpected();e.push(r())}next();return e}function switch_body_(){expect("{");var e=[],t=null,n=null,a;while(!is("punc","}")){if(is("eof"))unexpected();if(is("keyword","case")){if(n)n.end=prev();t=[];n=new xe({start:(a=i.token,next(),a),expression:S(true),body:t});e.push(n);expect(":")}else if(is("keyword","default")){if(n)n.end=prev();t=[];n=new Re({start:(a=i.token,next(),expect(":"),a),body:t});e.push(n)}else{if(!t)unexpected();t.push(r())}}if(n)n.end=prev();next();return e}function try_(){var e=block_(),t=null,n=null;if(is("keyword","catch")){var r=i.token;next();if(is("punc","{")){var a=null}else{expect("(");var a=parameter(undefined,Ct);expect(")")}t=new Oe({start:r,argname:a,body:block_(),end:prev()})}if(is("keyword","finally")){var r=i.token;next();n=new we({start:r,body:block_(),end:prev()})}if(!t&&!n)croak("Missing catch/finally blocks");return new Fe({body:e,bcatch:t,bfinally:n})}function vardefs(e,t){var n=[];var r;for(;;){var a=t==="var"?mt:t==="const"?gt:t==="let"?vt:null;if(is("punc","{")||is("punc","[")){r=new Le({start:i.token,name:binding_element(undefined,a),value:is("operator","=")?(expect_token("operator","="),S(false,e)):null,end:prev()})}else{r=new Le({start:i.token,name:as_symbol(a),value:is("operator","=")?(next(),S(false,e)):!e&&t==="const"?croak("Missing initializer in const declaration"):null,end:prev()});if(r.name.name=="import")croak("Unexpected token: import")}n.push(r);if(!is("punc",","))break;next()}return n}var c=function(e){return new Ne({start:prev(),definitions:vardefs(e,"var"),end:prev()})};var f=function(e){return new Ie({start:prev(),definitions:vardefs(e,"let"),end:prev()})};var p=function(e){return new Pe({start:prev(),definitions:vardefs(e,"const"),end:prev()})};var _=function(e){var t=i.token;expect_token("operator","new");if(is("punc",".")){next();expect_token("name","target");return g(new ht({start:t,end:prev()}),e)}var n=h(false),r;if(is("punc","(")){next();r=expr_list(")",true)}else{r=[]}var a=new Ge({start:t,expression:n,args:r,end:prev()});annotate(a);return g(a,e)};function as_atom_node(){var e=i.token,t;switch(e.type){case"name":t=_make_symbol(Ot);break;case"num":t=new Vt({start:e,end:e,value:e.value,raw:o});break;case"big_int":t=new Ut({start:e,end:e,value:e.value});break;case"string":t=new Bt({start:e,end:e,value:e.value,quote:e.quote});break;case"regexp":const[n,i,r]=e.value.match(/^\/(.*)\/(\w*)$/);t=new zt({start:e,end:e,value:{source:i,flags:r}});break;case"atom":switch(e.value){case"false":t=new jt({start:e,end:e});break;case"true":t=new $t({start:e,end:e});break;case"null":t=new Gt({start:e,end:e});break}break}next();return t}function to_fun_args(e,t){var n=function(e,t){if(t){return new tt({start:e.start,left:e,operator:"=",right:t,end:t.end})}return e};if(e instanceof it){return n(new pe({start:e.start,end:e.end,is_array:false,names:e.properties.map(e=>to_fun_args(e))}),t)}else if(e instanceof at){e.value=to_fun_args(e.value);return n(e,t)}else if(e instanceof Wt){return e}else if(e instanceof pe){e.names=e.names.map(e=>to_fun_args(e));return n(e,t)}else if(e instanceof Ot){return n(new Dt({name:e.name,start:e.start,end:e.end}),t)}else if(e instanceof oe){e.expression=to_fun_args(e.expression);return n(e,t)}else if(e instanceof nt){return n(new pe({start:e.start,end:e.end,is_array:true,names:e.elements.map(e=>to_fun_args(e))}),t)}else if(e instanceof et){return n(to_fun_args(e.left,e.right),t)}else if(e instanceof tt){e.left=to_fun_args(e.left);return e}else{croak("Invalid function parameter",e.start.line,e.start.col)}}var h=function(e,t){if(is("operator","new")){return _(e)}if(is("operator","import")){return import_meta()}var r=i.token;var o;var s=is("name","async")&&(o=peek()).value!="["&&o.type!="arrow"&&as_atom_node();if(is("punc")){switch(i.token.value){case"(":if(s&&!e)break;var c=params_or_seq_(t,!s);if(t&&is("arrow","=>")){return a(r,c.map(e=>to_fun_args(e)),!!s)}var l=s?new Ke({expression:s,args:c}):c.length==1?c[0]:new Xe({expressions:c});if(l.start){const e=r.comments_before.length;n.set(r,e);l.start.comments_before.unshift(...r.comments_before);r.comments_before=l.start.comments_before;if(e==0&&r.comments_before.length>0){var f=r.comments_before[0];if(!f.nlb){f.nlb=r.nlb;r.nlb=false}}r.comments_after=l.start.comments_after}l.start=r;var p=prev();if(l.end){p.comments_before=l.end.comments_before;l.end.comments_after.push(...p.comments_after);p.comments_after=l.end.comments_after}l.end=p;if(l instanceof Ke)annotate(l);return g(l,e);case"[":return g(d(),e);case"{":return g(E(),e)}if(!s)unexpected()}if(t&&is("name")&&is_token(peek(),"arrow")){var h=new Dt({name:i.token.value,start:r,end:r});next();return a(r,[h],!!s)}if(is("keyword","function")){next();var m=u(ce,false,!!s);m.start=r;m.end=prev();return g(m,e)}if(s)return g(s,e);if(is("keyword","class")){next();var v=class_(pt);v.start=r;v.end=prev();return g(v,e)}if(is("template_head")){return g(template_string(),e)}if(N.has(i.token.type)){return g(as_atom_node(),e)}unexpected()};function template_string(){var e=[],t=i.token;e.push(new de({start:i.token,raw:o,value:i.token.value,end:i.token}));while(!s){next();handle_regexp();e.push(S(true));e.push(new de({start:i.token,raw:o,value:i.token.value,end:i.token}))}next();return new he({start:t,segments:e,end:i.token})}function expr_list(e,t,n){var r=true,a=[];while(!is("punc",e)){if(r)r=false;else expect(",");if(t&&is("punc",e))break;if(is("punc",",")&&n){a.push(new Wt({start:i.token,end:i.token}))}else if(is("expand","...")){next();a.push(new oe({start:prev(),expression:S(),end:i.token}))}else{a.push(S(false))}}next();return a}var d=embed_tokens(function(){expect("[");return new nt({elements:expr_list("]",!t.strict,true)})});var m=embed_tokens((e,t)=>{return u(ue,e,t)});var E=embed_tokens(function object_or_destructuring_(){var e=i.token,n=true,r=[];expect("{");while(!is("punc","}")){if(n)n=false;else expect(",");if(!t.strict&&is("punc","}"))break;e=i.token;if(e.type=="expand"){next();r.push(new oe({start:e,expression:S(false),end:prev()}));continue}var a=as_property_name();var o;if(!is("punc",":")){var s=concise_method_or_getset(a,e);if(s){r.push(s);continue}o=new Ot({start:prev(),name:a,end:prev()})}else if(a===null){unexpected(prev())}else{next();o=S(false)}if(is("operator","=")){next();o=new et({start:e,left:o,operator:"=",right:S(false),logical:false,end:prev()})}r.push(new at({start:e,quote:e.quote,key:a instanceof U?a:""+a,value:o,end:prev()}))}next();return new it({properties:r})});function class_(e){var t,n,r,a,o=[];i.input.push_directives_stack();i.input.add_directive("use strict");if(i.token.type=="name"&&i.token.value!="extends"){r=as_symbol(e===ft?Tt:At)}if(e===ft&&!r){unexpected()}if(i.token.value=="extends"){next();a=S(true)}expect("{");while(is("punc",";")){next()}while(!is("punc","}")){t=i.token;n=concise_method_or_getset(as_property_name(),t,true);if(!n){unexpected()}o.push(n);while(is("punc",";")){next()}}i.input.pop_directives_stack();next();return new e({start:t,name:r,extends:a,properties:o,end:prev()})}function concise_method_or_getset(e,t,n){var r=function(e,t){if(typeof e==="string"||typeof e==="number"){return new yt({start:t,name:""+e,end:prev()})}else if(e===null){unexpected()}return e};const a=e=>{if(typeof e==="string"||typeof e==="number"){return new kt({start:c,end:c,name:""+e})}else if(e===null){unexpected()}return e};var o=false;var s=false;var u=false;var c=t;if(n&&e==="static"&&!is("punc","(")){s=true;c=i.token;e=as_property_name()}if(e==="async"&&!is("punc","(")&&!is("punc",",")&&!is("punc","}")&&!is("operator","=")){o=true;c=i.token;e=as_property_name()}if(e===null){u=true;c=i.token;e=as_property_name();if(e===null){unexpected()}}if(is("punc","(")){e=r(e,t);var l=new ut({start:t,static:s,is_generator:u,async:o,key:e,quote:e instanceof yt?c.quote:undefined,value:m(u,o),end:prev()});return l}const f=i.token;if(e=="get"){if(!is("punc")||is("punc","[")){e=r(as_property_name(),t);return new st({start:t,static:s,key:e,quote:e instanceof yt?f.quote:undefined,value:m(),end:prev()})}}else if(e=="set"){if(!is("punc")||is("punc","[")){e=r(as_property_name(),t);return new ot({start:t,static:s,key:e,quote:e instanceof yt?f.quote:undefined,value:m(),end:prev()})}}if(n){const n=a(e);const i=n instanceof kt?c.quote:undefined;if(is("operator","=")){next();return new lt({start:t,static:s,quote:i,key:n,value:S(false),end:prev()})}else if(is("name")||is("punc",";")||is("punc","}")){return new lt({start:t,static:s,quote:i,key:n,end:prev()})}}}function import_(){var e=prev();var t;var n;if(is("name")){t=as_symbol(Rt)}if(is("punc",",")){next()}n=map_names(true);if(n||t){expect_token("name","from")}var r=i.token;if(r.type!=="string"){unexpected()}next();return new Ve({start:e,imported_name:t,imported_names:n,module_name:new Bt({start:r,value:r.value,quote:r.quote,end:r}),end:i.token})}function import_meta(){var e=i.token;expect_token("operator","import");expect_token("punc",".");expect_token("name","meta");return g(new Ue({start:e,end:prev()}),false)}function map_name(e){function make_symbol(e){return new e({name:as_property_name(),start:prev(),end:prev()})}var t=e?xt:Mt;var n=e?Rt:wt;var r=i.token;var a;var o;if(e){a=make_symbol(t)}else{o=make_symbol(n)}if(is("name","as")){next();if(e){o=make_symbol(n)}else{a=make_symbol(t)}}else if(e){o=new n(a)}else{a=new t(o)}return new Be({start:r,foreign_name:a,name:o,end:prev()})}function map_nameAsterisk(e,t){var n=e?xt:Mt;var r=e?Rt:wt;var a=i.token;var o;var s=prev();t=t||new r({name:"*",start:a,end:s});o=new n({name:"*",start:a,end:s});return new Be({start:a,foreign_name:o,name:t,end:s})}function map_names(e){var t;if(is("punc","{")){next();t=[];while(!is("punc","}")){t.push(map_name(e));if(is("punc",",")){next()}}next()}else if(is("operator","*")){var n;next();if(e&&is("name","as")){next();n=as_symbol(e?Rt:Mt)}t=[map_nameAsterisk(e,n)]}return t}function export_(){var e=i.token;var t;var n;if(is("keyword","default")){t=true;next()}else if(n=map_names(false)){if(is("name","from")){next();var a=i.token;if(a.type!=="string"){unexpected()}next();return new ze({start:e,is_default:t,exported_names:n,module_name:new Bt({start:a,value:a.value,quote:a.quote,end:a}),end:prev()})}else{return new ze({start:e,is_default:t,exported_names:n,end:prev()})}}var o;var s;var u;if(is("punc","{")||t&&(is("keyword","class")||is("keyword","function"))&&is_token(peek(),"punc")){s=S(false);semicolon()}else if((o=r(t))instanceof Me&&t){unexpected(o.start)}else if(o instanceof Me||o instanceof se||o instanceof ft){u=o}else if(o instanceof X){s=o.body}else{unexpected(o.start)}return new ze({start:e,is_default:t,exported_value:s,exported_definition:u,end:prev()})}function as_property_name(){var e=i.token;switch(e.type){case"punc":if(e.value==="["){next();var t=S(false);expect("]");return t}else unexpected(e);case"operator":if(e.value==="*"){next();return null}if(!["delete","in","instanceof","new","typeof","void"].includes(e.value)){unexpected(e)}case"name":case"string":case"num":case"big_int":case"keyword":case"atom":next();return e.value;default:unexpected(e)}}function as_name(){var e=i.token;if(e.type!="name")unexpected();next();return e.value}function _make_symbol(e){var t=i.token.value;return new(t=="this"?It:t=="super"?Pt:e)({name:String(t),start:i.token,end:i.token})}function _verify_symbol(e){var t=e.name;if(is_in_generator()&&t=="yield"){token_error(e.start,"Yield cannot be used as identifier inside generators")}if(i.input.has_directive("use strict")){if(t=="yield"){token_error(e.start,"Unexpected yield identifier inside strict mode")}if(e instanceof dt&&(t=="arguments"||t=="eval")){token_error(e.start,"Unexpected "+t+" in strict mode")}}}function as_symbol(e,t){if(!is("name")){if(!t)croak("Name expected");return null}var n=_make_symbol(e);_verify_symbol(n);next();return n}function annotate(e){var t=e.start;var i=t.comments_before;const r=n.get(t);var a=r!=null?r:i.length;while(--a>=0){var o=i[a];if(/[@#]__/.test(o.value)){if(/[@#]__PURE__/.test(o.value)){set_annotation(e,Qt);break}if(/[@#]__INLINE__/.test(o.value)){set_annotation(e,Jt);break}if(/[@#]__NOINLINE__/.test(o.value)){set_annotation(e,en);break}}}}var g=function(e,t,n){var i=e.start;if(is("punc",".")){next();return g(new We({start:i,expression:e,optional:false,property:as_name(),end:prev()}),t,n)}if(is("punc","[")){next();var r=S(true);expect("]");return g(new qe({start:i,expression:e,optional:false,property:r,end:prev()}),t,n)}if(t&&is("punc","(")){next();var a=new Ke({start:i,expression:e,optional:false,args:call_args(),end:prev()});annotate(a);return g(a,true,n)}if(is("punc","?.")){next();let n;if(t&&is("punc","(")){next();const t=new Ke({start:i,optional:true,expression:e,args:call_args(),end:prev()});annotate(t);n=g(t,true,true)}else if(is("name")){n=g(new We({start:i,expression:e,optional:true,property:as_name(),end:prev()}),t,true)}else if(is("punc","[")){next();const r=S(true);expect("]");n=g(new qe({start:i,expression:e,optional:true,property:r,end:prev()}),t,true)}if(!n)unexpected();if(n instanceof Ye)return n;return new Ye({start:i,expression:n,end:prev()})}if(is("template_head")){if(n){unexpected()}return g(new _e({start:i,prefix:e,template_string:template_string(),end:prev()}),t)}return e};function call_args(){var e=[];while(!is("punc",")")){if(is("expand","...")){next();e.push(new oe({start:prev(),expression:S(false),end:prev()}))}else{e.push(S(false))}if(!is("punc",")")){expect(",")}}next();return e}var v=function(e,t){var n=i.token;if(n.type=="name"&&n.value=="await"){if(is_in_async()){next();return _await_expression()}else if(i.input.has_directive("use strict")){token_error(i.token,"Unexpected await identifier inside strict mode")}}if(is("operator")&&x.has(n.value)){next();handle_regexp();var r=make_unary($e,n,v(e));r.start=n;r.end=prev();return r}var a=h(e,t);while(is("operator")&&F.has(i.token.value)&&!has_newline_before(i.token)){if(a instanceof le)unexpected();a=make_unary(Ze,i.token,a);a.start=n;a.end=i.token;next()}return a};function make_unary(e,t,n){var r=t.value;switch(r){case"++":case"--":if(!is_assignable(n))croak("Invalid use of "+r+" operator",t.line,t.col,t.pos);break;case"delete":if(n instanceof Ot&&i.input.has_directive("use strict"))croak("Calling delete on expression not allowed in strict mode",n.start.line,n.start.col,n.start.pos);break}return new e({operator:r,expression:n})}var D=function(e,t,n){var r=is("operator")?i.token.value:null;if(r=="in"&&n)r=null;if(r=="**"&&e instanceof $e&&!is_token(e.start,"punc","(")&&e.operator!=="--"&&e.operator!=="++")unexpected(e.start);var a=r!=null?M[r]:null;if(a!=null&&(a>t||r==="**"&&t===a)){next();var o=D(v(true),a,n);return D(new Qe({start:e.start,left:e,operator:r,right:o,end:o.end}),t,n)}return e};function expr_ops(e){return D(v(true,true),0,e)}var b=function(e){var t=i.token;var n=expr_ops(e);if(is("operator","?")){next();var r=S(false);expect(":");return new Je({start:t,condition:n,consequent:r,alternative:S(false,e),end:prev()})}return n};function is_assignable(e){return e instanceof He||e instanceof Ot}function to_destructuring(e){if(e instanceof it){e=new pe({start:e.start,names:e.properties.map(to_destructuring),is_array:false,end:e.end})}else if(e instanceof nt){var t=[];for(var n=0;n=0;){a+="this."+t[o]+" = props."+t[o]+";"}const s=i&&Object.create(i.prototype);if(s&&s.initialize||n&&n.initialize)a+="this.initialize();";a+="}";a+="this.flags = 0;";a+="}";var u=new Function(a)();if(s){u.prototype=s;u.BASE=i}if(i)i.SUBCLASSES.push(u);u.prototype.CTOR=u;u.prototype.constructor=u;u.PROPS=t||null;u.SELF_PROPS=r;u.SUBCLASSES=[];if(e){u.prototype.TYPE=u.TYPE=e}if(n)for(o in n)if(HOP(n,o)){if(o[0]==="$"){u[o.substr(1)]=n[o]}else{u.prototype[o]=n[o]}}u.DEFMETHOD=function(e,t){this.prototype[e]=t};return u}const I=(e,t)=>Boolean(e.flags&t);const P=(e,t,n)=>{if(n){e.flags|=t}else{e.flags&=~t}};const L=1;const B=2;const V=4;class AST_Token{constructor(e,t,n,i,r,a,o,s,u){this.flags=a?1:0;this.type=e;this.value=t;this.line=n;this.col=i;this.pos=r;this.comments_before=o;this.comments_after=s;this.file=u;Object.seal(this)}get nlb(){return I(this,L)}set nlb(e){P(this,L,e)}get quote(){return!I(this,V)?"":I(this,B)?"'":'"'}set quote(e){P(this,B,e==="'");P(this,V,!!e)}}var U=DEFNODE("Node","start end",{_clone:function(e){if(e){var t=this.clone();return t.transform(new TreeTransformer(function(e){if(e!==t){return e.clone(true)}}))}return new this.CTOR(this)},clone:function(e){return this._clone(e)},$documentation:"Base class of all AST nodes",$propdoc:{start:"[AST_Token] The first token of this node",end:"[AST_Token] The last token of this node"},_walk:function(e){return e._visit(this)},walk:function(e){return this._walk(e)},_children_backwards:()=>{}},null);var z=DEFNODE("Statement",null,{$documentation:"Base class of all statements"});var K=DEFNODE("Debugger",null,{$documentation:"Represents a debugger statement"},z);var G=DEFNODE("Directive","value quote",{$documentation:'Represents a directive, like "use strict";',$propdoc:{value:"[string] The value of this directive as a plain string (it's not an AST_String!)",quote:"[string] the original quote character"}},z);var X=DEFNODE("SimpleStatement","body",{$documentation:"A statement consisting of an expression, i.e. a = 1 + 2",$propdoc:{body:"[AST_Node] an expression node (should not be instanceof AST_Statement)"},_walk:function(e){return e._visit(this,function(){this.body._walk(e)})},_children_backwards(e){e(this.body)}},z);function walk_body(e,t){const n=e.body;for(var i=0,r=n.length;i SymbolDef for all variables/functions defined in this scope",functions:"[Map/S] like `variables`, but only lists function declarations",uses_with:"[boolean/S] tells whether this scope uses the `with` statement",uses_eval:"[boolean/S] tells whether this scope contains a direct call to the global `eval`",parent_scope:"[AST_Scope?/S] link to the parent scope",enclosed:"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",cname:"[integer/S] current index for mangling variables (used internally by the mangler)"},get_defun_scope:function(){var e=this;while(e.is_block_scope()){e=e.parent_scope}return e},clone:function(e,t){var n=this._clone(e);if(e&&this.variables&&t&&!this._block_scope){n.figure_out_scope({},{toplevel:t,parent_scope:this.parent_scope})}else{if(this.variables)n.variables=new Map(this.variables);if(this.functions)n.functions=new Map(this.functions);if(this.enclosed)n.enclosed=this.enclosed.slice();if(this._block_scope)n._block_scope=this._block_scope}return n},pinned:function(){return this.uses_eval||this.uses_with}},H);var ae=DEFNODE("Toplevel","globals",{$documentation:"The toplevel scope",$propdoc:{globals:"[Map/S] a map of name -> SymbolDef for all undeclared names"},wrap_commonjs:function(e){var t=this.body;var n="(function(exports){'$ORIG';})(typeof "+e+"=='undefined'?("+e+"={}):"+e+");";n=parse(n);n=n.transform(new TreeTransformer(function(e){if(e instanceof G&&e.value=="$ORIG"){return i.splice(t)}}));return n},wrap_enclose:function(e){if(typeof e!="string")e="";var t=e.indexOf(":");if(t<0)t=e.length;var n=this.body;return parse(["(function(",e.slice(0,t),'){"$ORIG"})(',e.slice(t+1),")"].join("")).transform(new TreeTransformer(function(e){if(e instanceof G&&e.value=="$ORIG"){return i.splice(n)}}))}},re);var oe=DEFNODE("Expansion","expression",{$documentation:"An expandible argument, such as ...rest, a splat, such as [1,2,...all], or an expansion in a variable declaration, such as var [first, ...rest] = list",$propdoc:{expression:"[AST_Node] the thing to be expanded"},_walk:function(e){return e._visit(this,function(){this.expression.walk(e)})},_children_backwards(e){e(this.expression)}});var se=DEFNODE("Lambda","name argnames uses_arguments is_generator async",{$documentation:"Base class for functions",$propdoc:{name:"[AST_SymbolDeclaration?] the name of this function",argnames:"[AST_SymbolFunarg|AST_Destructuring|AST_Expansion|AST_DefaultAssign*] array of function arguments, destructurings, or expanding arguments",uses_arguments:"[boolean/S] tells whether this function accesses the arguments array",is_generator:"[boolean] is this a generator method",async:"[boolean] is this method async"},args_as_names:function(){var e=[];for(var t=0;t b)"},se);var fe=DEFNODE("Defun",null,{$documentation:"A function definition"},se);var pe=DEFNODE("Destructuring","names is_array",{$documentation:"A destructuring of several names. Used in destructuring assignment and with destructuring function argument names",$propdoc:{names:"[AST_Node*] Array of properties or elements",is_array:"[Boolean] Whether the destructuring represents an object or array"},_walk:function(e){return e._visit(this,function(){this.names.forEach(function(t){t._walk(e)})})},_children_backwards(e){let t=this.names.length;while(t--)e(this.names[t])},all_symbols:function(){var e=[];this.walk(new TreeWalker(function(t){if(t instanceof _t){e.push(t)}}));return e}});var _e=DEFNODE("PrefixedTemplateString","template_string prefix",{$documentation:"A templatestring with a prefix, such as String.raw`foobarbaz`",$propdoc:{template_string:"[AST_TemplateString] The template string",prefix:"[AST_Node] The prefix, which will get called."},_walk:function(e){return e._visit(this,function(){this.prefix._walk(e);this.template_string._walk(e)})},_children_backwards(e){e(this.template_string);e(this.prefix)}});var he=DEFNODE("TemplateString","segments",{$documentation:"A template string literal",$propdoc:{segments:"[AST_Node*] One or more segments, starting with AST_TemplateSegment. AST_Node may follow AST_TemplateSegment, but each AST_Node must be followed by AST_TemplateSegment."},_walk:function(e){return e._visit(this,function(){this.segments.forEach(function(t){t._walk(e)})})},_children_backwards(e){let t=this.segments.length;while(t--)e(this.segments[t])}});var de=DEFNODE("TemplateSegment","value raw",{$documentation:"A segment of a template string literal",$propdoc:{value:"Content of the segment",raw:"Raw source of the segment"}});var me=DEFNODE("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)"},z);var Ee=DEFNODE("Exit","value",{$documentation:"Base class for “exits” (`return` and `throw`)",$propdoc:{value:"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return"},_walk:function(e){return e._visit(this,this.value&&function(){this.value._walk(e)})},_children_backwards(e){if(this.value)e(this.value)}},me);var ge=DEFNODE("Return",null,{$documentation:"A `return` statement"},Ee);var ve=DEFNODE("Throw",null,{$documentation:"A `throw` statement"},Ee);var De=DEFNODE("LoopControl","label",{$documentation:"Base class for loop control statements (`break` and `continue`)",$propdoc:{label:"[AST_LabelRef?] the label, or null if none"},_walk:function(e){return e._visit(this,this.label&&function(){this.label._walk(e)})},_children_backwards(e){if(this.label)e(this.label)}},me);var be=DEFNODE("Break",null,{$documentation:"A `break` statement"},De);var ye=DEFNODE("Continue",null,{$documentation:"A `continue` statement"},De);var ke=DEFNODE("Await","expression",{$documentation:"An `await` statement",$propdoc:{expression:"[AST_Node] the mandatory expression being awaited"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e)})},_children_backwards(e){e(this.expression)}});var Se=DEFNODE("Yield","expression is_star",{$documentation:"A `yield` statement",$propdoc:{expression:"[AST_Node?] the value returned or thrown by this statement; could be null (representing undefined) but only when is_star is set to false",is_star:"[Boolean] Whether this is a yield or yield* statement"},_walk:function(e){return e._visit(this,this.expression&&function(){this.expression._walk(e)})},_children_backwards(e){if(this.expression)e(this.expression)}});var Te=DEFNODE("If","condition alternative",{$documentation:"A `if` statement",$propdoc:{condition:"[AST_Node] the `if` condition",alternative:"[AST_Statement?] the `else` part, or null if not present"},_walk:function(e){return e._visit(this,function(){this.condition._walk(e);this.body._walk(e);if(this.alternative)this.alternative._walk(e)})},_children_backwards(e){if(this.alternative){e(this.alternative)}e(this.body);e(this.condition)}},Y);var Ae=DEFNODE("Switch","expression",{$documentation:"A `switch` statement",$propdoc:{expression:"[AST_Node] the `switch` “discriminant”"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e);walk_body(this,e)})},_children_backwards(e){let t=this.body.length;while(t--)e(this.body[t]);e(this.expression)}},H);var Ce=DEFNODE("SwitchBranch",null,{$documentation:"Base class for `switch` branches"},H);var Re=DEFNODE("Default",null,{$documentation:"A `default` switch branch"},Ce);var xe=DEFNODE("Case","expression",{$documentation:"A `case` switch branch",$propdoc:{expression:"[AST_Node] the `case` expression"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e);walk_body(this,e)})},_children_backwards(e){let t=this.body.length;while(t--)e(this.body[t]);e(this.expression)}},Ce);var Fe=DEFNODE("Try","bcatch bfinally",{$documentation:"A `try` statement",$propdoc:{bcatch:"[AST_Catch?] the catch block, or null if not present",bfinally:"[AST_Finally?] the finally block, or null if not present"},_walk:function(e){return e._visit(this,function(){walk_body(this,e);if(this.bcatch)this.bcatch._walk(e);if(this.bfinally)this.bfinally._walk(e)})},_children_backwards(e){if(this.bfinally)e(this.bfinally);if(this.bcatch)e(this.bcatch);let t=this.body.length;while(t--)e(this.body[t])}},H);var Oe=DEFNODE("Catch","argname",{$documentation:"A `catch` node; only makes sense as part of a `try` statement",$propdoc:{argname:"[AST_SymbolCatch|AST_Destructuring|AST_Expansion|AST_DefaultAssign] symbol for the exception"},_walk:function(e){return e._visit(this,function(){if(this.argname)this.argname._walk(e);walk_body(this,e)})},_children_backwards(e){let t=this.body.length;while(t--)e(this.body[t]);if(this.argname)e(this.argname)}},H);var we=DEFNODE("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},H);var Me=DEFNODE("Definitions","definitions",{$documentation:"Base class for `var` or `const` nodes (variable declarations/initializations)",$propdoc:{definitions:"[AST_VarDef*] array of variable definitions"},_walk:function(e){return e._visit(this,function(){var t=this.definitions;for(var n=0,i=t.length;n a`"},Qe);var nt=DEFNODE("Array","elements",{$documentation:"An array literal",$propdoc:{elements:"[AST_Node*] array of elements"},_walk:function(e){return e._visit(this,function(){var t=this.elements;for(var n=0,i=t.length;nt._walk(e))})},_children_backwards(e){let t=this.properties.length;while(t--)e(this.properties[t]);if(this.extends)e(this.extends);if(this.name)e(this.name)}},re);var lt=DEFNODE("ClassProperty","static quote",{$documentation:"A class property",$propdoc:{static:"[boolean] whether this is a static key",quote:"[string] which quote is being used"},_walk:function(e){return e._visit(this,function(){if(this.key instanceof U)this.key._walk(e);if(this.value instanceof U)this.value._walk(e)})},_children_backwards(e){if(this.value instanceof U)e(this.value);if(this.key instanceof U)e(this.key)},computed_key(){return!(this.key instanceof kt)}},rt);var ft=DEFNODE("DefClass",null,{$documentation:"A class definition"},ct);var pt=DEFNODE("ClassExpression",null,{$documentation:"A class expression."},ct);var _t=DEFNODE("Symbol","scope name thedef",{$propdoc:{name:"[string] name of this symbol",scope:"[AST_Scope/S] the current scope (not necessarily the definition scope)",thedef:"[SymbolDef/S] the definition of this symbol"},$documentation:"Base class for all symbols"});var ht=DEFNODE("NewTarget",null,{$documentation:"A reference to new.target"});var dt=DEFNODE("SymbolDeclaration","init",{$documentation:"A declaration symbol (symbol in var/const, function name or argument, symbol in catch)"},_t);var mt=DEFNODE("SymbolVar",null,{$documentation:"Symbol defining a variable"},dt);var Et=DEFNODE("SymbolBlockDeclaration",null,{$documentation:"Base class for block-scoped declaration symbols"},dt);var gt=DEFNODE("SymbolConst",null,{$documentation:"A constant declaration"},Et);var vt=DEFNODE("SymbolLet",null,{$documentation:"A block-scoped `let` declaration"},Et);var Dt=DEFNODE("SymbolFunarg",null,{$documentation:"Symbol naming a function argument"},mt);var bt=DEFNODE("SymbolDefun",null,{$documentation:"Symbol defining a function"},dt);var yt=DEFNODE("SymbolMethod",null,{$documentation:"Symbol in an object defining a method"},_t);var kt=DEFNODE("SymbolClassProperty",null,{$documentation:"Symbol for a class property"},_t);var St=DEFNODE("SymbolLambda",null,{$documentation:"Symbol naming a function expression"},dt);var Tt=DEFNODE("SymbolDefClass",null,{$documentation:"Symbol naming a class's name in a class declaration. Lexically scoped to its containing scope, and accessible within the class."},Et);var At=DEFNODE("SymbolClass",null,{$documentation:"Symbol naming a class's name. Lexically scoped to the class."},dt);var Ct=DEFNODE("SymbolCatch",null,{$documentation:"Symbol naming the exception in catch"},Et);var Rt=DEFNODE("SymbolImport",null,{$documentation:"Symbol referring to an imported name"},Et);var xt=DEFNODE("SymbolImportForeign",null,{$documentation:"A symbol imported from a module, but it is defined in the other module, and its real name is irrelevant for this module's purposes"},_t);var Ft=DEFNODE("Label","references",{$documentation:"Symbol naming a label (declaration)",$propdoc:{references:"[AST_LoopControl*] a list of nodes referring to this label"},initialize:function(){this.references=[];this.thedef=this}},_t);var Ot=DEFNODE("SymbolRef",null,{$documentation:"Reference to some symbol (not definition/declaration)"},_t);var wt=DEFNODE("SymbolExport",null,{$documentation:"Symbol referring to a name to export"},Ot);var Mt=DEFNODE("SymbolExportForeign",null,{$documentation:"A symbol exported from this module, but it is used in the other module, and its real name is irrelevant for this module's purposes"},_t);var Nt=DEFNODE("LabelRef",null,{$documentation:"Reference to a label symbol"},_t);var It=DEFNODE("This",null,{$documentation:"The `this` symbol"},_t);var Pt=DEFNODE("Super",null,{$documentation:"The `super` symbol"},It);var Lt=DEFNODE("Constant",null,{$documentation:"Base class for all constants",getValue:function(){return this.value}});var Bt=DEFNODE("String","value quote",{$documentation:"A string literal",$propdoc:{value:"[string] the contents of this string",quote:"[string] the original quote character"}},Lt);var Vt=DEFNODE("Number","value raw",{$documentation:"A number literal",$propdoc:{value:"[number] the numeric value",raw:"[string] numeric value as string"}},Lt);var Ut=DEFNODE("BigInt","value",{$documentation:"A big int literal",$propdoc:{value:"[string] big int value"}},Lt);var zt=DEFNODE("RegExp","value",{$documentation:"A regexp literal",$propdoc:{value:"[RegExp] the actual regexp"}},Lt);var Kt=DEFNODE("Atom",null,{$documentation:"Base class for atoms"},Lt);var Gt=DEFNODE("Null",null,{$documentation:"The `null` atom",value:null},Kt);var Xt=DEFNODE("NaN",null,{$documentation:"The impossible value",value:0/0},Kt);var Ht=DEFNODE("Undefined",null,{$documentation:"The `undefined` value",value:function(){}()},Kt);var Wt=DEFNODE("Hole",null,{$documentation:"A hole in an array",value:function(){}()},Kt);var qt=DEFNODE("Infinity",null,{$documentation:"The `Infinity` value",value:1/0},Kt);var Yt=DEFNODE("Boolean",null,{$documentation:"Base class for booleans"},Kt);var jt=DEFNODE("False",null,{$documentation:"The `false` atom",value:false},Yt);var $t=DEFNODE("True",null,{$documentation:"The `true` atom",value:true},Yt);function walk(e,t,n=[e]){const i=n.push.bind(n);while(n.length){const e=n.pop();const r=t(e,n);if(r){if(r===Zt)return true;continue}e._children_backwards(i)}return false}function walk_parent(e,t,n){const i=[e];const r=i.push.bind(i);const a=n?n.slice():[];const o=[];let s;const u={parent:(e=0)=>{if(e===-1){return s}if(n&&e>=a.length){e-=a.length;return n[n.length-(e+1)]}return a[a.length-(1+e)]}};while(i.length){s=i.pop();while(o.length&&i.length==o[o.length-1]){a.pop();o.pop()}const e=t(s,u);if(e){if(e===Zt)return true;continue}const n=i.length;s._children_backwards(r);if(i.length>n){a.push(s);o.push(n-1)}}return false}const Zt=Symbol("abort walk");class TreeWalker{constructor(e){this.visit=e;this.stack=[];this.directives=Object.create(null)}_visit(e,t){this.push(e);var n=this.visit(e,t?function(){t.call(e)}:noop);if(!n&&t){t.call(e)}this.pop();return n}parent(e){return this.stack[this.stack.length-2-(e||0)]}push(e){if(e instanceof se){this.directives=Object.create(this.directives)}else if(e instanceof G&&!this.directives[e.value]){this.directives[e.value]=e}else if(e instanceof ct){this.directives=Object.create(this.directives);if(!this.directives["use strict"]){this.directives["use strict"]=e}}this.stack.push(e)}pop(){var e=this.stack.pop();if(e instanceof se||e instanceof ct){this.directives=Object.getPrototypeOf(this.directives)}}self(){return this.stack[this.stack.length-1]}find_parent(e){var t=this.stack;for(var n=t.length;--n>=0;){var i=t[n];if(i instanceof e)return i}}has_directive(e){var t=this.directives[e];if(t)return t;var n=this.stack[this.stack.length-1];if(n instanceof re&&n.body){for(var i=0;i=0;){var i=t[n];if(i instanceof j&&i.label.name==e.label.name)return i.body}else for(var n=t.length;--n>=0;){var i=t[n];if(i instanceof $||e instanceof be&&i instanceof Ae)return i}}}class TreeTransformer extends TreeWalker{constructor(e,t){super();this.before=e;this.after=t}}const Qt=1;const Jt=2;const en=4;var tn=Object.freeze({__proto__:null,AST_Accessor:ue,AST_Array:nt,AST_Arrow:le,AST_Assign:et,AST_Atom:Kt,AST_Await:ke,AST_BigInt:Ut,AST_Binary:Qe,AST_Block:H,AST_BlockStatement:W,AST_Boolean:Yt,AST_Break:be,AST_Call:Ke,AST_Case:xe,AST_Catch:Oe,AST_Chain:Ye,AST_Class:ct,AST_ClassExpression:pt,AST_ClassProperty:lt,AST_ConciseMethod:ut,AST_Conditional:Je,AST_Const:Pe,AST_Constant:Lt,AST_Continue:ye,AST_Debugger:K,AST_Default:Re,AST_DefaultAssign:tt,AST_DefClass:ft,AST_Definitions:Me,AST_Defun:fe,AST_Destructuring:pe,AST_Directive:G,AST_Do:Q,AST_Dot:We,AST_DWLoop:Z,AST_EmptyStatement:q,AST_Exit:Ee,AST_Expansion:oe,AST_Export:ze,AST_False:jt,AST_Finally:we,AST_For:ee,AST_ForIn:te,AST_ForOf:ne,AST_Function:ce,AST_Hole:Wt,AST_If:Te,AST_Import:Ve,AST_ImportMeta:Ue,AST_Infinity:qt,AST_IterationStatement:$,AST_Jump:me,AST_Label:Ft,AST_LabeledStatement:j,AST_LabelRef:Nt,AST_Lambda:se,AST_Let:Ie,AST_LoopControl:De,AST_NameMapping:Be,AST_NaN:Xt,AST_New:Ge,AST_NewTarget:ht,AST_Node:U,AST_Null:Gt,AST_Number:Vt,AST_Object:it,AST_ObjectGetter:st,AST_ObjectKeyVal:at,AST_ObjectProperty:rt,AST_ObjectSetter:ot,AST_PrefixedTemplateString:_e,AST_PropAccess:He,AST_RegExp:zt,AST_Return:ge,AST_Scope:re,AST_Sequence:Xe,AST_SimpleStatement:X,AST_Statement:z,AST_StatementWithBody:Y,AST_String:Bt,AST_Sub:qe,AST_Super:Pt,AST_Switch:Ae,AST_SwitchBranch:Ce,AST_Symbol:_t,AST_SymbolBlockDeclaration:Et,AST_SymbolCatch:Ct,AST_SymbolClass:At,AST_SymbolClassProperty:kt,AST_SymbolConst:gt,AST_SymbolDeclaration:dt,AST_SymbolDefClass:Tt,AST_SymbolDefun:bt,AST_SymbolExport:wt,AST_SymbolExportForeign:Mt,AST_SymbolFunarg:Dt,AST_SymbolImport:Rt,AST_SymbolImportForeign:xt,AST_SymbolLambda:St,AST_SymbolLet:vt,AST_SymbolMethod:yt,AST_SymbolRef:Ot,AST_SymbolVar:mt,AST_TemplateSegment:de,AST_TemplateString:he,AST_This:It,AST_Throw:ve,AST_Token:AST_Token,AST_Toplevel:ae,AST_True:$t,AST_Try:Fe,AST_Unary:je,AST_UnaryPostfix:Ze,AST_UnaryPrefix:$e,AST_Undefined:Ht,AST_Var:Ne,AST_VarDef:Le,AST_While:J,AST_With:ie,AST_Yield:Se,TreeTransformer:TreeTransformer,TreeWalker:TreeWalker,walk:walk,walk_abort:Zt,walk_body:walk_body,walk_parent:walk_parent,_INLINE:Jt,_NOINLINE:en,_PURE:Qt});function def_transform(e,t){e.DEFMETHOD("transform",function(e,n){let i=undefined;e.push(this);if(e.before)i=e.before(this,t,n);if(i===undefined){i=this;t(i,e);if(e.after){const t=e.after(i,n);if(t!==undefined)i=t}}e.pop();return i})}function do_list(e,t){return i(e,function(e){return e.transform(t,true)})}def_transform(U,noop);def_transform(j,function(e,t){e.label=e.label.transform(t);e.body=e.body.transform(t)});def_transform(X,function(e,t){e.body=e.body.transform(t)});def_transform(H,function(e,t){e.body=do_list(e.body,t)});def_transform(Q,function(e,t){e.body=e.body.transform(t);e.condition=e.condition.transform(t)});def_transform(J,function(e,t){e.condition=e.condition.transform(t);e.body=e.body.transform(t)});def_transform(ee,function(e,t){if(e.init)e.init=e.init.transform(t);if(e.condition)e.condition=e.condition.transform(t);if(e.step)e.step=e.step.transform(t);e.body=e.body.transform(t)});def_transform(te,function(e,t){e.init=e.init.transform(t);e.object=e.object.transform(t);e.body=e.body.transform(t)});def_transform(ie,function(e,t){e.expression=e.expression.transform(t);e.body=e.body.transform(t)});def_transform(Ee,function(e,t){if(e.value)e.value=e.value.transform(t)});def_transform(De,function(e,t){if(e.label)e.label=e.label.transform(t)});def_transform(Te,function(e,t){e.condition=e.condition.transform(t);e.body=e.body.transform(t);if(e.alternative)e.alternative=e.alternative.transform(t)});def_transform(Ae,function(e,t){e.expression=e.expression.transform(t);e.body=do_list(e.body,t)});def_transform(xe,function(e,t){e.expression=e.expression.transform(t);e.body=do_list(e.body,t)});def_transform(Fe,function(e,t){e.body=do_list(e.body,t);if(e.bcatch)e.bcatch=e.bcatch.transform(t);if(e.bfinally)e.bfinally=e.bfinally.transform(t)});def_transform(Oe,function(e,t){if(e.argname)e.argname=e.argname.transform(t);e.body=do_list(e.body,t)});def_transform(Me,function(e,t){e.definitions=do_list(e.definitions,t)});def_transform(Le,function(e,t){e.name=e.name.transform(t);if(e.value)e.value=e.value.transform(t)});def_transform(pe,function(e,t){e.names=do_list(e.names,t)});def_transform(se,function(e,t){if(e.name)e.name=e.name.transform(t);e.argnames=do_list(e.argnames,t);if(e.body instanceof U){e.body=e.body.transform(t)}else{e.body=do_list(e.body,t)}});def_transform(Ke,function(e,t){e.expression=e.expression.transform(t);e.args=do_list(e.args,t)});def_transform(Xe,function(e,t){const n=do_list(e.expressions,t);e.expressions=n.length?n:[new Vt({value:0})]});def_transform(We,function(e,t){e.expression=e.expression.transform(t)});def_transform(qe,function(e,t){e.expression=e.expression.transform(t);e.property=e.property.transform(t)});def_transform(Ye,function(e,t){e.expression=e.expression.transform(t)});def_transform(Se,function(e,t){if(e.expression)e.expression=e.expression.transform(t)});def_transform(ke,function(e,t){e.expression=e.expression.transform(t)});def_transform(je,function(e,t){e.expression=e.expression.transform(t)});def_transform(Qe,function(e,t){e.left=e.left.transform(t);e.right=e.right.transform(t)});def_transform(Je,function(e,t){e.condition=e.condition.transform(t);e.consequent=e.consequent.transform(t);e.alternative=e.alternative.transform(t)});def_transform(nt,function(e,t){e.elements=do_list(e.elements,t)});def_transform(it,function(e,t){e.properties=do_list(e.properties,t)});def_transform(rt,function(e,t){if(e.key instanceof U){e.key=e.key.transform(t)}if(e.value)e.value=e.value.transform(t)});def_transform(ct,function(e,t){if(e.name)e.name=e.name.transform(t);if(e.extends)e.extends=e.extends.transform(t);e.properties=do_list(e.properties,t)});def_transform(oe,function(e,t){e.expression=e.expression.transform(t)});def_transform(Be,function(e,t){e.foreign_name=e.foreign_name.transform(t);e.name=e.name.transform(t)});def_transform(Ve,function(e,t){if(e.imported_name)e.imported_name=e.imported_name.transform(t);if(e.imported_names)do_list(e.imported_names,t);e.module_name=e.module_name.transform(t)});def_transform(ze,function(e,t){if(e.exported_definition)e.exported_definition=e.exported_definition.transform(t);if(e.exported_value)e.exported_value=e.exported_value.transform(t);if(e.exported_names)do_list(e.exported_names,t);if(e.module_name)e.module_name=e.module_name.transform(t)});def_transform(he,function(e,t){e.segments=do_list(e.segments,t)});def_transform(_e,function(e,t){e.prefix=e.prefix.transform(t);e.template_string=e.template_string.transform(t)});(function(){var e=function(e){var t=true;for(var n=0;n1||e.guardedHandlers&&e.guardedHandlers.length){throw new Error("Multiple catch clauses are not supported.")}return new Fe({start:my_start_token(e),end:my_end_token(e),body:from_moz(e.block).body,bcatch:from_moz(t[0]),bfinally:e.finalizer?new we(from_moz(e.finalizer)):null})},Property:function(e){var t=e.key;var n={start:my_start_token(t||e.value),end:my_end_token(e.value),key:t.type=="Identifier"?t.name:t.value,value:from_moz(e.value)};if(e.computed){n.key=from_moz(e.key)}if(e.method){n.is_generator=e.value.generator;n.async=e.value.async;if(!e.computed){n.key=new yt({name:n.key})}else{n.key=from_moz(e.key)}return new ut(n)}if(e.kind=="init"){if(t.type!="Identifier"&&t.type!="Literal"){n.key=from_moz(t)}return new at(n)}if(typeof n.key==="string"||typeof n.key==="number"){n.key=new yt({name:n.key})}n.value=new ue(n.value);if(e.kind=="get")return new st(n);if(e.kind=="set")return new ot(n);if(e.kind=="method"){n.async=e.value.async;n.is_generator=e.value.generator;n.quote=e.computed?'"':null;return new ut(n)}},MethodDefinition:function(e){var t={start:my_start_token(e),end:my_end_token(e),key:e.computed?from_moz(e.key):new yt({name:e.key.name||e.key.value}),value:from_moz(e.value),static:e.static};if(e.kind=="get"){return new st(t)}if(e.kind=="set"){return new ot(t)}t.is_generator=e.value.generator;t.async=e.value.async;return new ut(t)},FieldDefinition:function(e){let t;if(e.computed){t=from_moz(e.key)}else{if(e.key.type!=="Identifier")throw new Error("Non-Identifier key in FieldDefinition");t=from_moz(e.key)}return new lt({start:my_start_token(e),end:my_end_token(e),key:t,value:from_moz(e.value),static:e.static})},ArrayExpression:function(e){return new nt({start:my_start_token(e),end:my_end_token(e),elements:e.elements.map(function(e){return e===null?new Wt:from_moz(e)})})},ObjectExpression:function(e){return new it({start:my_start_token(e),end:my_end_token(e),properties:e.properties.map(function(e){if(e.type==="SpreadElement"){return from_moz(e)}e.type="Property";return from_moz(e)})})},SequenceExpression:function(e){return new Xe({start:my_start_token(e),end:my_end_token(e),expressions:e.expressions.map(from_moz)})},MemberExpression:function(e){return new(e.computed?qe:We)({start:my_start_token(e),end:my_end_token(e),property:e.computed?from_moz(e.property):e.property.name,expression:from_moz(e.object),optional:e.optional||false})},ChainExpression:function(e){return new Ye({start:my_start_token(e),end:my_end_token(e),expression:from_moz(e.expression)})},SwitchCase:function(e){return new(e.test?xe:Re)({start:my_start_token(e),end:my_end_token(e),expression:from_moz(e.test),body:e.consequent.map(from_moz)})},VariableDeclaration:function(e){return new(e.kind==="const"?Pe:e.kind==="let"?Ie:Ne)({start:my_start_token(e),end:my_end_token(e),definitions:e.declarations.map(from_moz)})},ImportDeclaration:function(e){var t=null;var n=null;e.specifiers.forEach(function(e){if(e.type==="ImportSpecifier"){if(!n){n=[]}n.push(new Be({start:my_start_token(e),end:my_end_token(e),foreign_name:from_moz(e.imported),name:from_moz(e.local)}))}else if(e.type==="ImportDefaultSpecifier"){t=from_moz(e.local)}else if(e.type==="ImportNamespaceSpecifier"){if(!n){n=[]}n.push(new Be({start:my_start_token(e),end:my_end_token(e),foreign_name:new xt({name:"*"}),name:from_moz(e.local)}))}});return new Ve({start:my_start_token(e),end:my_end_token(e),imported_name:t,imported_names:n,module_name:from_moz(e.source)})},ExportAllDeclaration:function(e){return new ze({start:my_start_token(e),end:my_end_token(e),exported_names:[new Be({name:new Mt({name:"*"}),foreign_name:new Mt({name:"*"})})],module_name:from_moz(e.source)})},ExportNamedDeclaration:function(e){return new ze({start:my_start_token(e),end:my_end_token(e),exported_definition:from_moz(e.declaration),exported_names:e.specifiers&&e.specifiers.length?e.specifiers.map(function(e){return new Be({foreign_name:from_moz(e.exported),name:from_moz(e.local)})}):null,module_name:from_moz(e.source)})},ExportDefaultDeclaration:function(e){return new ze({start:my_start_token(e),end:my_end_token(e),exported_value:from_moz(e.declaration),is_default:true})},Literal:function(e){var t=e.value,n={start:my_start_token(e),end:my_end_token(e)};var i=e.regex;if(i&&i.pattern){n.value={source:i.pattern,flags:i.flags};return new zt(n)}else if(i){const i=e.raw||t;const r=i.match(/^\/(.*)\/(\w*)$/);if(!r)throw new Error("Invalid regex source "+i);const[a,o,s]=r;n.value={source:o,flags:s};return new zt(n)}if(t===null)return new Gt(n);switch(typeof t){case"string":n.value=t;return new Bt(n);case"number":n.value=t;n.raw=e.raw||t.toString();return new Vt(n);case"boolean":return new(t?$t:jt)(n)}},MetaProperty:function(e){if(e.meta.name==="new"&&e.property.name==="target"){return new ht({start:my_start_token(e),end:my_end_token(e)})}else if(e.meta.name==="import"&&e.property.name==="meta"){return new Ue({start:my_start_token(e),end:my_end_token(e)})}},Identifier:function(e){var t=n[n.length-2];return new(t.type=="LabeledStatement"?Ft:t.type=="VariableDeclarator"&&t.id===e?t.kind=="const"?gt:t.kind=="let"?vt:mt:/Import.*Specifier/.test(t.type)?t.local===e?Rt:xt:t.type=="ExportSpecifier"?t.local===e?wt:Mt:t.type=="FunctionExpression"?t.id===e?St:Dt:t.type=="FunctionDeclaration"?t.id===e?bt:Dt:t.type=="ArrowFunctionExpression"?t.params.includes(e)?Dt:Ot:t.type=="ClassExpression"?t.id===e?At:Ot:t.type=="Property"?t.key===e&&t.computed||t.value===e?Ot:yt:t.type=="FieldDefinition"?t.key===e&&t.computed||t.value===e?Ot:kt:t.type=="ClassDeclaration"?t.id===e?Tt:Ot:t.type=="MethodDefinition"?t.computed?Ot:yt:t.type=="CatchClause"?Ct:t.type=="BreakStatement"||t.type=="ContinueStatement"?Nt:Ot)({start:my_start_token(e),end:my_end_token(e),name:e.name})},BigIntLiteral(e){return new Ut({start:my_start_token(e),end:my_end_token(e),value:e.value})}};t.UpdateExpression=t.UnaryExpression=function To_Moz_Unary(e){var t="prefix"in e?e.prefix:e.type=="UnaryExpression"?true:false;return new(t?$e:Ze)({start:my_start_token(e),end:my_end_token(e),operator:e.operator,expression:from_moz(e.argument)})};t.ClassDeclaration=t.ClassExpression=function From_Moz_Class(e){return new(e.type==="ClassDeclaration"?ft:pt)({start:my_start_token(e),end:my_end_token(e),name:from_moz(e.id),extends:from_moz(e.superClass),properties:e.body.body.map(from_moz)})};map("EmptyStatement",q);map("BlockStatement",W,"body@body");map("IfStatement",Te,"test>condition, consequent>body, alternate>alternative");map("LabeledStatement",j,"label>label, body>body");map("BreakStatement",be,"label>label");map("ContinueStatement",ye,"label>label");map("WithStatement",ie,"object>expression, body>body");map("SwitchStatement",Ae,"discriminant>expression, cases@body");map("ReturnStatement",ge,"argument>value");map("ThrowStatement",ve,"argument>value");map("WhileStatement",J,"test>condition, body>body");map("DoWhileStatement",Q,"test>condition, body>body");map("ForStatement",ee,"init>init, test>condition, update>step, body>body");map("ForInStatement",te,"left>init, right>object, body>body");map("ForOfStatement",ne,"left>init, right>object, body>body, await=await");map("AwaitExpression",ke,"argument>expression");map("YieldExpression",Se,"argument>expression, delegate=is_star");map("DebuggerStatement",K);map("VariableDeclarator",Le,"id>name, init>value");map("CatchClause",Oe,"param>argname, body%body");map("ThisExpression",It);map("Super",Pt);map("BinaryExpression",Qe,"operator=operator, left>left, right>right");map("LogicalExpression",Qe,"operator=operator, left>left, right>right");map("AssignmentExpression",et,"operator=operator, left>left, right>right");map("ConditionalExpression",Je,"test>condition, consequent>consequent, alternate>alternative");map("NewExpression",Ge,"callee>expression, arguments@args");map("CallExpression",Ke,"callee>expression, optional=optional, arguments@args");def_to_moz(ae,function To_Moz_Program(e){return to_moz_scope("Program",e)});def_to_moz(oe,function To_Moz_Spread(e){return{type:to_moz_in_destructuring()?"RestElement":"SpreadElement",argument:to_moz(e.expression)}});def_to_moz(_e,function To_Moz_TaggedTemplateExpression(e){return{type:"TaggedTemplateExpression",tag:to_moz(e.prefix),quasi:to_moz(e.template_string)}});def_to_moz(he,function To_Moz_TemplateLiteral(e){var t=[];var n=[];for(var i=0;i({type:"BigIntLiteral",value:e.value}));Yt.DEFMETHOD("to_mozilla_ast",Lt.prototype.to_mozilla_ast);Gt.DEFMETHOD("to_mozilla_ast",Lt.prototype.to_mozilla_ast);Wt.DEFMETHOD("to_mozilla_ast",function To_Moz_ArrayHole(){return null});H.DEFMETHOD("to_mozilla_ast",W.prototype.to_mozilla_ast);se.DEFMETHOD("to_mozilla_ast",ce.prototype.to_mozilla_ast);function my_start_token(e){var t=e.loc,n=t&&t.start;var i=e.range;return new AST_Token("","",n&&n.line||0,n&&n.column||0,i?i[0]:e.start,false,[],[],t&&t.source)}function my_end_token(e){var t=e.loc,n=t&&t.end;var i=e.range;return new AST_Token("","",n&&n.line||0,n&&n.column||0,i?i[0]:e.end,false,[],[],t&&t.source)}function map(e,n,i){var r="function From_Moz_"+e+"(M){\n";r+="return new U2."+n.name+"({\n"+"start: my_start_token(M),\n"+"end: my_end_token(M)";var a="function To_Moz_"+e+"(M){\n";a+="return {\n"+"type: "+JSON.stringify(e);if(i)i.split(/\s*,\s*/).forEach(function(e){var t=/([a-z0-9$_]+)([=@>%])([a-z0-9$_]+)/i.exec(e);if(!t)throw new Error("Can't understand property map: "+e);var n=t[1],i=t[2],o=t[3];r+=",\n"+o+": ";a+=",\n"+n+": ";switch(i){case"@":r+="M."+n+".map(from_moz)";a+="M."+o+".map(to_moz)";break;case">":r+="from_moz(M."+n+")";a+="to_moz(M."+o+")";break;case"=":r+="M."+n;a+="M."+o;break;case"%":r+="from_moz(M."+n+").body";a+="to_moz_block(M)";break;default:throw new Error("Can't understand operator in propmap: "+e)}});r+="\n})\n}";a+="\n}\n}";r=new Function("U2","my_start_token","my_end_token","from_moz","return("+r+")")(tn,my_start_token,my_end_token,from_moz);a=new Function("to_moz","to_moz_block","to_moz_scope","return("+a+")")(to_moz,to_moz_block,to_moz_scope);t[e]=r;def_to_moz(n,a)}var n=null;function from_moz(e){n.push(e);var i=e!=null?t[e.type](e):null;n.pop();return i}U.from_mozilla_ast=function(e){var t=n;n=[];var i=from_moz(e);n=t;return i};function set_moz_loc(e,t){var n=e.start;var i=e.end;if(!(n&&i)){return t}if(n.pos!=null&&i.endpos!=null){t.range=[n.pos,i.endpos]}if(n.line){t.loc={start:{line:n.line,column:n.col},end:i.endline?{line:i.endline,column:i.endcol}:null};if(n.file){t.loc.source=n.file}}return t}function def_to_moz(e,t){e.DEFMETHOD("to_mozilla_ast",function(e){return set_moz_loc(this,t(this,e))})}var i=null;function to_moz(e){if(i===null){i=[]}i.push(e);var t=e!=null?e.to_mozilla_ast(i[i.length-2]):null;i.pop();if(i.length===0){i=null}return t}function to_moz_in_destructuring(){var e=i.length;while(e--){if(i[e]instanceof pe){return true}}return false}function to_moz_block(e){return{type:"BlockStatement",body:e.body.map(to_moz)}}function to_moz_scope(e,t){var n=t.body.map(to_moz);if(t.body[0]instanceof X&&t.body[0].body instanceof Bt){n.unshift(to_moz(new q(t.body[0])))}return{type:e,body:n}}})();function first_in_statement(e){let t=e.parent(-1);for(let n=0,i;i=e.parent(n);n++){if(i instanceof z&&i.body===t)return true;if(i instanceof Xe&&i.expressions[0]===t||i.TYPE==="Call"&&i.expression===t||i instanceof _e&&i.prefix===t||i instanceof We&&i.expression===t||i instanceof qe&&i.expression===t||i instanceof Je&&i.condition===t||i instanceof Qe&&i.left===t||i instanceof Ze&&i.expression===t){t=i}else{return false}}}function left_is_object(e){if(e instanceof it)return true;if(e instanceof Xe)return left_is_object(e.expressions[0]);if(e.TYPE==="Call")return left_is_object(e.expression);if(e instanceof _e)return left_is_object(e.prefix);if(e instanceof We||e instanceof qe)return left_is_object(e.expression);if(e instanceof Je)return left_is_object(e.condition);if(e instanceof Qe)return left_is_object(e.left);if(e instanceof Ze)return left_is_object(e.expression);return false}const nn=/^$|[;{][\s\n]*$/;const rn=10;const an=32;const on=/[@#]__(PURE|INLINE|NOINLINE)__/g;function is_some_comments(e){return(e.type==="comment2"||e.type==="comment1")&&/@preserve|@lic|@cc_on|^\**!/i.test(e.value)}function OutputStream(e){var t=!e;e=defaults(e,{ascii_only:false,beautify:false,braces:false,comments:"some",ecma:5,ie8:false,indent_level:4,indent_start:0,inline_script:true,keep_numbers:false,keep_quoted_props:false,max_line_len:false,preamble:null,preserve_annotations:false,quote_keys:false,quote_style:0,safari10:false,semicolons:true,shebang:true,shorthand:undefined,source_map:null,webkit:false,width:80,wrap_iife:false,wrap_func_args:true},true);if(e.shorthand===undefined)e.shorthand=e.ecma>5;var n=return_false;if(e.comments){let t=e.comments;if(typeof e.comments==="string"&&/^\/.*\/[a-zA-Z]*$/.test(e.comments)){var i=e.comments.lastIndexOf("/");t=new RegExp(e.comments.substr(1,i-1),e.comments.substr(i+1))}if(t instanceof RegExp){n=function(e){return e.type!="comment5"&&t.test(e.value)}}else if(typeof t==="function"){n=function(e){return e.type!="comment5"&&t(this,e)}}else if(t==="some"){n=is_some_comments}else{n=return_true}}var r=0;var a=0;var o=1;var s=0;var u="";let c=new Set;var l=e.ascii_only?function(t,n){if(e.ecma>=2015&&!e.safari10){t=t.replace(/[\ud800-\udbff][\udc00-\udfff]/g,function(e){var t=get_full_char_code(e,0).toString(16);return"\\u{"+t+"}"})}return t.replace(/[\u0000-\u001f\u007f-\uffff]/g,function(e){var t=e.charCodeAt(0).toString(16);if(t.length<=2&&!n){while(t.length<2)t="0"+t;return"\\x"+t}else{while(t.length<4)t="0"+t;return"\\u"+t}})}:function(e){return e.replace(/[\ud800-\udbff][\udc00-\udfff]|([\ud800-\udbff]|[\udc00-\udfff])/g,function(e,t){if(t){return"\\u"+t.charCodeAt(0).toString(16)}return e})};function make_string(t,n){var i=0,r=0;t=t.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g,function(n,a){switch(n){case'"':++i;return'"';case"'":++r;return"'";case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\v":return e.ie8?"\\x0B":"\\v";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";case"\ufeff":return"\\ufeff";case"\0":return/[0-9]/.test(get_full_char(t,a+1))?"\\x00":"\\0"}return n});function quote_single(){return"'"+t.replace(/\x27/g,"\\'")+"'"}function quote_double(){return'"'+t.replace(/\x22/g,'\\"')+'"'}function quote_template(){return"`"+t.replace(/`/g,"\\`")+"`"}t=l(t);if(n==="`")return quote_template();switch(e.quote_style){case 1:return quote_single();case 2:return quote_double();case 3:return n=="'"?quote_single():quote_double();default:return i>r?quote_single():quote_double()}}function encode_string(t,n){var i=make_string(t,n);if(e.inline_script){i=i.replace(/<\x2f(script)([>\/\t\n\f\r ])/gi,"<\\/$1$2");i=i.replace(/\x3c!--/g,"\\x3c!--");i=i.replace(/--\x3e/g,"--\\x3e")}return i}function make_name(e){e=e.toString();e=l(e,true);return e}function make_indent(t){return" ".repeat(e.indent_start+r-t*e.indent_level)}var f=false;var p=false;var _=false;var h=0;var d=false;var m=false;var E=-1;var g="";var v,D,b=e.source_map&&[];var y=b?function(){b.forEach(function(t){try{e.source_map.add(t.token.file,t.line,t.col,t.token.line,t.token.col,!t.name&&t.token.type=="name"?t.token.value:t.name)}catch(e){}});b=[]}:noop;var k=e.max_line_len?function(){if(a>e.max_line_len){if(h){var t=u.slice(0,h);var n=u.slice(h);if(b){var i=n.length-a;b.forEach(function(e){e.line++;e.col+=i})}u=t+"\n"+n;o++;s++;a=n.length}}if(h){h=0;y()}}:noop;var S=makePredicate("( [ + * / - , . `");function print(t){t=String(t);var n=get_full_char(t,0);if(d&&n){d=false;if(n!=="\n"){print("\n");C()}}if(m&&n){m=false;if(!/[\s;})]/.test(n)){A()}}E=-1;var i=g.charAt(g.length-1);if(_){_=false;if(i===":"&&n==="}"||(!n||!";}".includes(n))&&i!==";"){if(e.semicolons||S.has(n)){u+=";";a++;s++}else{k();if(a>0){u+="\n";s++;o++;a=0}if(/^\s+$/.test(t)){_=true}}if(!e.beautify)p=false}}if(p){if(is_identifier_char(i)&&(is_identifier_char(n)||n=="\\")||n=="/"&&n==i||(n=="+"||n=="-")&&n==g){u+=" ";a++;s++}p=false}if(v){b.push({token:v,name:D,line:o,col:a});v=false;if(!h)y()}u+=t;f=t[t.length-1]=="(";s+=t.length;var r=t.split(/\r?\n/),c=r.length-1;o+=c;a+=r[0].length;if(c>0){k();a=r[c].length}g=t}var T=function(){print("*")};var A=e.beautify?function(){print(" ")}:function(){p=true};var C=e.beautify?function(t){if(e.beautify){print(make_indent(t?.5:0))}}:noop;var R=e.beautify?function(e,t){if(e===true)e=next_indent();var n=r;r=e;var i=t();r=n;return i}:function(e,t){return t()};var x=e.beautify?function(){if(E<0)return print("\n");if(u[E]!="\n"){u=u.slice(0,E)+"\n"+u.slice(E);s++;o++}E++}:e.max_line_len?function(){k();h=u.length}:noop;var F=e.beautify?function(){print(";")}:function(){_=true};function force_semicolon(){_=false;print(";")}function next_indent(){return r+e.indent_level}function with_block(e){var t;print("{");x();R(next_indent(),function(){t=e()});C();print("}");return t}function with_parens(e){print("(");var t=e();print(")");return t}function with_square(e){print("[");var t=e();print("]");return t}function comma(){print(",");A()}function colon(){print(":");A()}var O=b?function(e,t){v=e;D=t}:noop;function get(){if(h){k()}return u}function has_nlb(){let e=u.length-1;while(e>=0){const t=u.charCodeAt(e);if(t===rn){return true}if(t!==an){return false}e--}return true}function filter_comment(t){if(!e.preserve_annotations){t=t.replace(on," ")}if(/^\s*$/.test(t)){return""}return t.replace(/(<\s*\/\s*)(script)/i,"<\\/$2")}function prepend_comments(t){var i=this;var r=t.start;if(!r)return;var a=i.printed_comments;const o=t instanceof Ee&&t.value;if(r.comments_before&&a.has(r.comments_before)){if(o){r.comments_before=[]}else{return}}var u=r.comments_before;if(!u){u=r.comments_before=[]}a.add(u);if(o){var c=new TreeWalker(function(e){var t=c.parent();if(t instanceof Ee||t instanceof Qe&&t.left===e||t.TYPE=="Call"&&t.expression===e||t instanceof Je&&t.condition===e||t instanceof We&&t.expression===e||t instanceof Xe&&t.expressions[0]===e||t instanceof qe&&t.expression===e||t instanceof Ze){if(!e.start)return;var n=e.start.comments_before;if(n&&!a.has(n)){a.add(n);u=u.concat(n)}}else{return true}});c.push(t);t.value.walk(c)}if(s==0){if(u.length>0&&e.shebang&&u[0].type==="comment5"&&!a.has(u[0])){print("#!"+u.shift().value+"\n");C()}var l=e.preamble;if(l){print(l.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g,"\n"))}}u=u.filter(n,t).filter(e=>!a.has(e));if(u.length==0)return;var f=has_nlb();u.forEach(function(e,t){a.add(e);if(!f){if(e.nlb){print("\n");C();f=true}else if(t>0){A()}}if(/comment[134]/.test(e.type)){var n=filter_comment(e.value);if(n){print("//"+n+"\n");C()}f=true}else if(e.type=="comment2"){var n=filter_comment(e.value);if(n){print("/*"+n+"*/")}f=false}});if(!f){if(r.nlb){print("\n");C()}else{A()}}}function append_comments(e,t){var i=this;var r=e.end;if(!r)return;var a=i.printed_comments;var o=r[t?"comments_before":"comments_after"];if(!o||a.has(o))return;if(!(e instanceof z||o.every(e=>!/comment[134]/.test(e.type))))return;a.add(o);var s=u.length;o.filter(n,e).forEach(function(e,n){if(a.has(e))return;a.add(e);m=false;if(d){print("\n");C();d=false}else if(e.nlb&&(n>0||!has_nlb())){print("\n");C()}else if(n>0||!t){A()}if(/comment[134]/.test(e.type)){const t=filter_comment(e.value);if(t){print("//"+t)}d=true}else if(e.type=="comment2"){const t=filter_comment(e.value);if(t){print("/*"+t+"*/")}m=true}});if(u.length>s)E=s}var w=[];return{get:get,toString:get,indent:C,in_directive:false,use_asm:null,active_scope:null,indentation:function(){return r},current_width:function(){return a-r},should_break:function(){return e.width&&this.current_width()>=e.width},has_parens:function(){return f},newline:x,print:print,star:T,space:A,comma:comma,colon:colon,last:function(){return g},semicolon:F,force_semicolon:force_semicolon,to_utf8:l,print_name:function(e){print(make_name(e))},print_string:function(e,t,n){var i=encode_string(e,t);if(n===true&&!i.includes("\\")){if(!nn.test(u)){force_semicolon()}force_semicolon()}print(i)},print_template_string_chars:function(e){var t=encode_string(e,"`").replace(/\${/g,"\\${");return print(t.substr(1,t.length-2))},encode_string:encode_string,next_indent:next_indent,with_indent:R,with_block:with_block,with_parens:with_parens,with_square:with_square,add_mapping:O,option:function(t){return e[t]},printed_comments:c,prepend_comments:t?noop:prepend_comments,append_comments:t||n===return_false?noop:append_comments,line:function(){return o},col:function(){return a},pos:function(){return s},push_node:function(e){w.push(e)},pop_node:function(){return w.pop()},parent:function(e){return w[w.length-2-(e||0)]}}}(function(){function DEFPRINT(e,t){e.DEFMETHOD("_codegen",t)}U.DEFMETHOD("print",function(e,t){var n=this,i=n._codegen;if(n instanceof re){e.active_scope=n}else if(!e.use_asm&&n instanceof G&&n.value=="use asm"){e.use_asm=e.active_scope}function doit(){e.prepend_comments(n);n.add_source_map(e);i(n,e);e.append_comments(n)}e.push_node(n);if(t||n.needs_parens(e)){e.with_parens(doit)}else{doit()}e.pop_node();if(n===e.use_asm){e.use_asm=null}});U.DEFMETHOD("_print",U.prototype.print);U.DEFMETHOD("print_to_string",function(e){var t=OutputStream(e);this.print(t);return t.get()});function PARENS(e,t){if(Array.isArray(e)){e.forEach(function(e){PARENS(e,t)})}else{e.DEFMETHOD("needs_parens",t)}}PARENS(U,return_false);PARENS(ce,function(e){if(!e.has_parens()&&first_in_statement(e)){return true}if(e.option("webkit")){var t=e.parent();if(t instanceof He&&t.expression===this){return true}}if(e.option("wrap_iife")){var t=e.parent();if(t instanceof Ke&&t.expression===this){return true}}if(e.option("wrap_func_args")){var t=e.parent();if(t instanceof Ke&&t.args.includes(this)){return true}}return false});PARENS(le,function(e){var t=e.parent();if(e.option("wrap_func_args")&&t instanceof Ke&&t.args.includes(this)){return true}return t instanceof He&&t.expression===this});PARENS(it,function(e){return!e.has_parens()&&first_in_statement(e)});PARENS(pt,first_in_statement);PARENS(je,function(e){var t=e.parent();return t instanceof He&&t.expression===this||t instanceof Ke&&t.expression===this||t instanceof Qe&&t.operator==="**"&&this instanceof $e&&t.left===this&&this.operator!=="++"&&this.operator!=="--"});PARENS(ke,function(e){var t=e.parent();return t instanceof He&&t.expression===this||t instanceof Ke&&t.expression===this||e.option("safari10")&&t instanceof $e});PARENS(Xe,function(e){var t=e.parent();return t instanceof Ke||t instanceof je||t instanceof Qe||t instanceof Le||t instanceof He||t instanceof nt||t instanceof rt||t instanceof Je||t instanceof le||t instanceof tt||t instanceof oe||t instanceof ne&&this===t.object||t instanceof Se||t instanceof ze});PARENS(Qe,function(e){var t=e.parent();if(t instanceof Ke&&t.expression===this)return true;if(t instanceof je)return true;if(t instanceof He&&t.expression===this)return true;if(t instanceof Qe){const e=t.operator;const n=this.operator;if(n==="??"&&(e==="||"||e==="&&")){return true}if(e==="??"&&(n==="||"||n==="&&")){return true}const i=M[e];const r=M[n];if(i>r||i==r&&(this===t.right||e=="**")){return true}}});PARENS(Se,function(e){var t=e.parent();if(t instanceof Qe&&t.operator!=="=")return true;if(t instanceof Ke&&t.expression===this)return true;if(t instanceof Je&&t.condition===this)return true;if(t instanceof je)return true;if(t instanceof He&&t.expression===this)return true});PARENS(He,function(e){var t=e.parent();if(t instanceof Ge&&t.expression===this){return walk(this,e=>{if(e instanceof re)return true;if(e instanceof Ke){return Zt}})}});PARENS(Ke,function(e){var t=e.parent(),n;if(t instanceof Ge&&t.expression===this||t instanceof ze&&t.is_default&&this.expression instanceof ce)return true;return this.expression instanceof ce&&t instanceof He&&t.expression===this&&(n=e.parent(1))instanceof et&&n.left===t});PARENS(Ge,function(e){var t=e.parent();if(this.args.length===0&&(t instanceof He||t instanceof Ke&&t.expression===this))return true});PARENS(Vt,function(e){var t=e.parent();if(t instanceof He&&t.expression===this){var n=this.getValue();if(n<0||/^0/.test(make_num(n))){return true}}});PARENS(Ut,function(e){var t=e.parent();if(t instanceof He&&t.expression===this){var n=this.getValue();if(n.startsWith("-")){return true}}});PARENS([et,Je],function(e){var t=e.parent();if(t instanceof je)return true;if(t instanceof Qe&&!(t instanceof et))return true;if(t instanceof Ke&&t.expression===this)return true;if(t instanceof Je&&t.condition===this)return true;if(t instanceof He&&t.expression===this)return true;if(this instanceof et&&this.left instanceof pe&&this.left.is_array===false)return true});DEFPRINT(G,function(e,t){t.print_string(e.value,e.quote);t.semicolon()});DEFPRINT(oe,function(e,t){t.print("...");e.expression.print(t)});DEFPRINT(pe,function(e,t){t.print(e.is_array?"[":"{");var n=e.names.length;e.names.forEach(function(e,i){if(i>0)t.comma();e.print(t);if(i==n-1&&e instanceof Wt)t.comma()});t.print(e.is_array?"]":"}")});DEFPRINT(K,function(e,t){t.print("debugger");t.semicolon()});function display_body(e,t,n,i){var r=e.length-1;n.in_directive=i;e.forEach(function(e,i){if(n.in_directive===true&&!(e instanceof G||e instanceof q||e instanceof X&&e.body instanceof Bt)){n.in_directive=false}if(!(e instanceof q)){n.indent();e.print(n);if(!(i==r&&t)){n.newline();if(t)n.newline()}}if(n.in_directive===true&&e instanceof X&&e.body instanceof Bt){n.in_directive=false}});n.in_directive=false}Y.DEFMETHOD("_do_print_body",function(e){force_statement(this.body,e)});DEFPRINT(z,function(e,t){e.body.print(t);t.semicolon()});DEFPRINT(ae,function(e,t){display_body(e.body,true,t,true);t.print("")});DEFPRINT(j,function(e,t){e.label.print(t);t.colon();e.body.print(t)});DEFPRINT(X,function(e,t){e.body.print(t);t.semicolon()});function print_braced_empty(e,t){t.print("{");t.with_indent(t.next_indent(),function(){t.append_comments(e,true)});t.print("}")}function print_braced(e,t,n){if(e.body.length>0){t.with_block(function(){display_body(e.body,false,t,n)})}else print_braced_empty(e,t)}DEFPRINT(W,function(e,t){print_braced(e,t)});DEFPRINT(q,function(e,t){t.semicolon()});DEFPRINT(Q,function(e,t){t.print("do");t.space();make_block(e.body,t);t.space();t.print("while");t.space();t.with_parens(function(){e.condition.print(t)});t.semicolon()});DEFPRINT(J,function(e,t){t.print("while");t.space();t.with_parens(function(){e.condition.print(t)});t.space();e._do_print_body(t)});DEFPRINT(ee,function(e,t){t.print("for");t.space();t.with_parens(function(){if(e.init){if(e.init instanceof Me){e.init.print(t)}else{parenthesize_for_noin(e.init,t,true)}t.print(";");t.space()}else{t.print(";")}if(e.condition){e.condition.print(t);t.print(";");t.space()}else{t.print(";")}if(e.step){e.step.print(t)}});t.space();e._do_print_body(t)});DEFPRINT(te,function(e,t){t.print("for");if(e.await){t.space();t.print("await")}t.space();t.with_parens(function(){e.init.print(t);t.space();t.print(e instanceof ne?"of":"in");t.space();e.object.print(t)});t.space();e._do_print_body(t)});DEFPRINT(ie,function(e,t){t.print("with");t.space();t.with_parens(function(){e.expression.print(t)});t.space();e._do_print_body(t)});se.DEFMETHOD("_do_print",function(e,t){var n=this;if(!t){if(n.async){e.print("async");e.space()}e.print("function");if(n.is_generator){e.star()}if(n.name){e.space()}}if(n.name instanceof _t){n.name.print(e)}else if(t&&n.name instanceof U){e.with_square(function(){n.name.print(e)})}e.with_parens(function(){n.argnames.forEach(function(t,n){if(n)e.comma();t.print(e)})});e.space();print_braced(n,e,true)});DEFPRINT(se,function(e,t){e._do_print(t)});DEFPRINT(_e,function(e,t){var n=e.prefix;var i=n instanceof se||n instanceof Qe||n instanceof Je||n instanceof Xe||n instanceof je||n instanceof We&&n.expression instanceof it;if(i)t.print("(");e.prefix.print(t);if(i)t.print(")");e.template_string.print(t)});DEFPRINT(he,function(e,t){var n=t.parent()instanceof _e;t.print("`");for(var i=0;i");e.space();const r=t.body[0];if(t.body.length===1&&r instanceof ge){const t=r.value;if(!t){e.print("{}")}else if(left_is_object(t)){e.print("(");t.print(e);e.print(")")}else{t.print(e)}}else{print_braced(t,e)}if(i){e.print(")")}});Ee.DEFMETHOD("_do_print",function(e,t){e.print(t);if(this.value){e.space();const t=this.value.start.comments_before;if(t&&t.length&&!e.printed_comments.has(t)){e.print("(");this.value.print(e);e.print(")")}else{this.value.print(e)}}e.semicolon()});DEFPRINT(ge,function(e,t){e._do_print(t,"return")});DEFPRINT(ve,function(e,t){e._do_print(t,"throw")});DEFPRINT(Se,function(e,t){var n=e.is_star?"*":"";t.print("yield"+n);if(e.expression){t.space();e.expression.print(t)}});DEFPRINT(ke,function(e,t){t.print("await");t.space();var n=e.expression;var i=!(n instanceof Ke||n instanceof Ot||n instanceof He||n instanceof je||n instanceof Lt||n instanceof ke||n instanceof it);if(i)t.print("(");e.expression.print(t);if(i)t.print(")")});De.DEFMETHOD("_do_print",function(e,t){e.print(t);if(this.label){e.space();this.label.print(e)}e.semicolon()});DEFPRINT(be,function(e,t){e._do_print(t,"break")});DEFPRINT(ye,function(e,t){e._do_print(t,"continue")});function make_then(e,t){var n=e.body;if(t.option("braces")||t.option("ie8")&&n instanceof Q)return make_block(n,t);if(!n)return t.force_semicolon();while(true){if(n instanceof Te){if(!n.alternative){make_block(e.body,t);return}n=n.alternative}else if(n instanceof Y){n=n.body}else break}force_statement(e.body,t)}DEFPRINT(Te,function(e,t){t.print("if");t.space();t.with_parens(function(){e.condition.print(t)});t.space();if(e.alternative){make_then(e,t);t.space();t.print("else");t.space();if(e.alternative instanceof Te)e.alternative.print(t);else force_statement(e.alternative,t)}else{e._do_print_body(t)}});DEFPRINT(Ae,function(e,t){t.print("switch");t.space();t.with_parens(function(){e.expression.print(t)});t.space();var n=e.body.length-1;if(n<0)print_braced_empty(e,t);else t.with_block(function(){e.body.forEach(function(e,i){t.indent(true);e.print(t);if(i0)t.newline()})})});Ce.DEFMETHOD("_do_print_body",function(e){e.newline();this.body.forEach(function(t){e.indent();t.print(e);e.newline()})});DEFPRINT(Re,function(e,t){t.print("default:");e._do_print_body(t)});DEFPRINT(xe,function(e,t){t.print("case");t.space();e.expression.print(t);t.print(":");e._do_print_body(t)});DEFPRINT(Fe,function(e,t){t.print("try");t.space();print_braced(e,t);if(e.bcatch){t.space();e.bcatch.print(t)}if(e.bfinally){t.space();e.bfinally.print(t)}});DEFPRINT(Oe,function(e,t){t.print("catch");if(e.argname){t.space();t.with_parens(function(){e.argname.print(t)})}t.space();print_braced(e,t)});DEFPRINT(we,function(e,t){t.print("finally");t.space();print_braced(e,t)});Me.DEFMETHOD("_do_print",function(e,t){e.print(t);e.space();this.definitions.forEach(function(t,n){if(n)e.comma();t.print(e)});var n=e.parent();var i=n instanceof ee||n instanceof te;var r=!i||n&&n.init!==this;if(r)e.semicolon()});DEFPRINT(Ie,function(e,t){e._do_print(t,"let")});DEFPRINT(Ne,function(e,t){e._do_print(t,"var")});DEFPRINT(Pe,function(e,t){e._do_print(t,"const")});DEFPRINT(Ve,function(e,t){t.print("import");t.space();if(e.imported_name){e.imported_name.print(t)}if(e.imported_name&&e.imported_names){t.print(",");t.space()}if(e.imported_names){if(e.imported_names.length===1&&e.imported_names[0].foreign_name.name==="*"){e.imported_names[0].print(t)}else{t.print("{");e.imported_names.forEach(function(n,i){t.space();n.print(t);if(i{if(e instanceof re)return true;if(e instanceof Qe&&e.operator=="in"){return Zt}})}e.print(t,i)}DEFPRINT(Le,function(e,t){e.name.print(t);if(e.value){t.space();t.print("=");t.space();var n=t.parent(1);var i=n instanceof ee||n instanceof te;parenthesize_for_noin(e.value,t,i)}});DEFPRINT(Ke,function(e,t){e.expression.print(t);if(e instanceof Ge&&e.args.length===0)return;if(e.expression instanceof Ke||e.expression instanceof se){t.add_mapping(e.start)}if(e.optional)t.print("?.");t.with_parens(function(){e.args.forEach(function(e,n){if(n)t.comma();e.print(t)})})});DEFPRINT(Ge,function(e,t){t.print("new");t.space();Ke.prototype._codegen(e,t)});Xe.DEFMETHOD("_do_print",function(e){this.expressions.forEach(function(t,n){if(n>0){e.comma();if(e.should_break()){e.newline();e.indent()}}t.print(e)})});DEFPRINT(Xe,function(e,t){e._do_print(t)});DEFPRINT(We,function(e,t){var n=e.expression;n.print(t);var i=e.property;var r=l.has(i)?t.option("ie8"):!is_identifier_string(i,t.option("ecma")>=2015||t.option("safari10"));if(e.optional)t.print("?.");if(r){t.print("[");t.add_mapping(e.end);t.print_string(i);t.print("]")}else{if(n instanceof Vt&&n.getValue()>=0){if(!/[xa-f.)]/i.test(t.last())){t.print(".")}}if(!e.optional)t.print(".");t.add_mapping(e.end);t.print_name(i)}});DEFPRINT(qe,function(e,t){e.expression.print(t);if(e.optional)t.print("?.");t.print("[");e.property.print(t);t.print("]")});DEFPRINT(Ye,function(e,t){e.expression.print(t)});DEFPRINT($e,function(e,t){var n=e.operator;t.print(n);if(/^[a-z]/i.test(n)||/[+-]$/.test(n)&&e.expression instanceof $e&&/^[+-]/.test(e.expression.operator)){t.space()}e.expression.print(t)});DEFPRINT(Ze,function(e,t){e.expression.print(t);t.print(e.operator)});DEFPRINT(Qe,function(e,t){var n=e.operator;e.left.print(t);if(n[0]==">"&&e.left instanceof Ze&&e.left.operator=="--"){t.print(" ")}else{t.space()}t.print(n);if((n=="<"||n=="<<")&&e.right instanceof $e&&e.right.operator=="!"&&e.right.expression instanceof $e&&e.right.expression.operator=="--"){t.print(" ")}else{t.space()}e.right.print(t)});DEFPRINT(Je,function(e,t){e.condition.print(t);t.space();t.print("?");t.space();e.consequent.print(t);t.space();t.colon();e.alternative.print(t)});DEFPRINT(nt,function(e,t){t.with_square(function(){var n=e.elements,i=n.length;if(i>0)t.space();n.forEach(function(e,n){if(n)t.comma();e.print(t);if(n===i-1&&e instanceof Wt)t.comma()});if(i>0)t.space()})});DEFPRINT(it,function(e,t){if(e.properties.length>0)t.with_block(function(){e.properties.forEach(function(e,n){if(n){t.print(",");t.newline()}t.indent();e.print(t)});t.newline()});else print_braced_empty(e,t)});DEFPRINT(ct,function(e,t){t.print("class");t.space();if(e.name){e.name.print(t);t.space()}if(e.extends){var n=!(e.extends instanceof Ot)&&!(e.extends instanceof He)&&!(e.extends instanceof pt)&&!(e.extends instanceof ce);t.print("extends");if(n){t.print("(")}else{t.space()}e.extends.print(t);if(n){t.print(")")}else{t.space()}}if(e.properties.length>0)t.with_block(function(){e.properties.forEach(function(e,n){if(n){t.newline()}t.indent();e.print(t)});t.newline()});else t.print("{}")});DEFPRINT(ht,function(e,t){t.print("new.target")});function print_property_name(e,t,n){if(n.option("quote_keys")){return n.print_string(e)}if(""+ +e==e&&e>=0){if(n.option("keep_numbers")){return n.print(e)}return n.print(make_num(e))}var i=l.has(e)?n.option("ie8"):n.option("ecma")<2015||n.option("safari10")?!is_basic_identifier_string(e):!is_identifier_string(e,true);if(i||t&&n.option("keep_quoted_props")){return n.print_string(e,t)}return n.print_name(e)}DEFPRINT(at,function(e,t){function get_name(e){var t=e.definition();return t?t.mangled_name||t.name:e.name}var n=t.option("shorthand");if(n&&e.value instanceof _t&&is_identifier_string(e.key,t.option("ecma")>=2015||t.option("safari10"))&&get_name(e.value)===e.key&&!l.has(e.key)){print_property_name(e.key,e.quote,t)}else if(n&&e.value instanceof tt&&e.value.left instanceof _t&&is_identifier_string(e.key,t.option("ecma")>=2015||t.option("safari10"))&&get_name(e.value.left)===e.key){print_property_name(e.key,e.quote,t);t.space();t.print("=");t.space();e.value.right.print(t)}else{if(!(e.key instanceof U)){print_property_name(e.key,e.quote,t)}else{t.with_square(function(){e.key.print(t)})}t.colon();e.value.print(t)}});DEFPRINT(lt,(e,t)=>{if(e.static){t.print("static");t.space()}if(e.key instanceof kt){print_property_name(e.key.name,e.quote,t)}else{t.print("[");e.key.print(t);t.print("]")}if(e.value){t.print("=");e.value.print(t)}t.semicolon()});rt.DEFMETHOD("_print_getter_setter",function(e,t){var n=this;if(n.static){t.print("static");t.space()}if(e){t.print(e);t.space()}if(n.key instanceof yt){print_property_name(n.key.name,n.quote,t)}else{t.with_square(function(){n.key.print(t)})}n.value._do_print(t,true)});DEFPRINT(ot,function(e,t){e._print_getter_setter("set",t)});DEFPRINT(st,function(e,t){e._print_getter_setter("get",t)});DEFPRINT(ut,function(e,t){var n;if(e.is_generator&&e.async){n="async*"}else if(e.is_generator){n="*"}else if(e.async){n="async"}e._print_getter_setter(n,t)});_t.DEFMETHOD("_do_print",function(e){var t=this.definition();e.print_name(t?t.mangled_name||t.name:this.name)});DEFPRINT(_t,function(e,t){e._do_print(t)});DEFPRINT(Wt,noop);DEFPRINT(It,function(e,t){t.print("this")});DEFPRINT(Pt,function(e,t){t.print("super")});DEFPRINT(Lt,function(e,t){t.print(e.getValue())});DEFPRINT(Bt,function(e,t){t.print_string(e.getValue(),e.quote,t.in_directive)});DEFPRINT(Vt,function(e,t){if((t.option("keep_numbers")||t.use_asm)&&e.raw){t.print(e.raw)}else{t.print(make_num(e.getValue()))}});DEFPRINT(Ut,function(e,t){t.print(e.getValue()+"n")});const e=/(<\s*\/\s*script)/i;const t=(e,t)=>t.replace("/","\\/");DEFPRINT(zt,function(n,i){let{source:r,flags:a}=n.getValue();r=regexp_source_fix(r);a=a?sort_regexp_flags(a):"";r=r.replace(e,t);i.print(i.to_utf8(`/${r}/${a}`));const o=i.parent();if(o instanceof Qe&&/^\w/.test(o.operator)&&o.left===n){i.print(" ")}});function force_statement(e,t){if(t.option("braces")){make_block(e,t)}else{if(!e||e instanceof q)t.force_semicolon();else e.print(t)}}function best_of(e){var t=e[0],n=t.length;for(var i=1;i{return e===null&&t===null||e.TYPE===t.TYPE&&e.shallow_cmp(t)};const un=(e,t)=>{if(!sn(e,t))return false;const n=[e];const i=[t];const r=n.push.bind(n);const a=i.push.bind(i);while(n.length&&i.length){const e=n.pop();const t=i.pop();if(!sn(e,t))return false;e._children_backwards(r);t._children_backwards(a);if(n.length!==i.length){return false}}return n.length==0&&i.length==0};const cn=e=>{const t=Object.keys(e).map(t=>{if(e[t]==="eq"){return`this.${t} === other.${t}`}else if(e[t]==="exist"){return`(this.${t} == null ? other.${t} == null : this.${t} === other.${t})`}else{throw new Error(`mkshallow: Unexpected instruction: ${e[t]}`)}}).join(" && ");return new Function("other","return "+t)};const ln=()=>true;U.prototype.shallow_cmp=function(){throw new Error("did not find a shallow_cmp function for "+this.constructor.name)};K.prototype.shallow_cmp=ln;G.prototype.shallow_cmp=cn({value:"eq"});X.prototype.shallow_cmp=ln;H.prototype.shallow_cmp=ln;q.prototype.shallow_cmp=ln;j.prototype.shallow_cmp=cn({"label.name":"eq"});Q.prototype.shallow_cmp=ln;J.prototype.shallow_cmp=ln;ee.prototype.shallow_cmp=cn({init:"exist",condition:"exist",step:"exist"});te.prototype.shallow_cmp=ln;ne.prototype.shallow_cmp=ln;ie.prototype.shallow_cmp=ln;ae.prototype.shallow_cmp=ln;oe.prototype.shallow_cmp=ln;se.prototype.shallow_cmp=cn({is_generator:"eq",async:"eq"});pe.prototype.shallow_cmp=cn({is_array:"eq"});_e.prototype.shallow_cmp=ln;he.prototype.shallow_cmp=ln;de.prototype.shallow_cmp=cn({value:"eq"});me.prototype.shallow_cmp=ln;De.prototype.shallow_cmp=ln;ke.prototype.shallow_cmp=ln;Se.prototype.shallow_cmp=cn({is_star:"eq"});Te.prototype.shallow_cmp=cn({alternative:"exist"});Ae.prototype.shallow_cmp=ln;Ce.prototype.shallow_cmp=ln;Fe.prototype.shallow_cmp=cn({bcatch:"exist",bfinally:"exist"});Oe.prototype.shallow_cmp=cn({argname:"exist"});we.prototype.shallow_cmp=ln;Me.prototype.shallow_cmp=ln;Le.prototype.shallow_cmp=cn({value:"exist"});Be.prototype.shallow_cmp=ln;Ve.prototype.shallow_cmp=cn({imported_name:"exist",imported_names:"exist"});Ue.prototype.shallow_cmp=ln;ze.prototype.shallow_cmp=cn({exported_definition:"exist",exported_value:"exist",exported_names:"exist",module_name:"eq",is_default:"eq"});Ke.prototype.shallow_cmp=ln;Xe.prototype.shallow_cmp=ln;He.prototype.shallow_cmp=ln;Ye.prototype.shallow_cmp=ln;We.prototype.shallow_cmp=cn({property:"eq"});je.prototype.shallow_cmp=cn({operator:"eq"});Qe.prototype.shallow_cmp=cn({operator:"eq"});Je.prototype.shallow_cmp=ln;nt.prototype.shallow_cmp=ln;it.prototype.shallow_cmp=ln;rt.prototype.shallow_cmp=ln;at.prototype.shallow_cmp=cn({key:"eq"});ot.prototype.shallow_cmp=cn({static:"eq"});st.prototype.shallow_cmp=cn({static:"eq"});ut.prototype.shallow_cmp=cn({static:"eq",is_generator:"eq",async:"eq"});ct.prototype.shallow_cmp=cn({name:"exist",extends:"exist"});lt.prototype.shallow_cmp=cn({static:"eq"});_t.prototype.shallow_cmp=cn({name:"eq"});ht.prototype.shallow_cmp=ln;It.prototype.shallow_cmp=ln;Pt.prototype.shallow_cmp=ln;Bt.prototype.shallow_cmp=cn({value:"eq"});Vt.prototype.shallow_cmp=cn({value:"eq"});Ut.prototype.shallow_cmp=cn({value:"eq"});zt.prototype.shallow_cmp=function(e){return this.value.flags===e.value.flags&&this.value.source===e.value.source};Kt.prototype.shallow_cmp=ln;const fn=1<<0;const pn=1<<1;let _n=null;let hn=null;class SymbolDef{constructor(e,t,n){this.name=t.name;this.orig=[t];this.init=n;this.eliminated=0;this.assignments=0;this.scope=e;this.replaced=0;this.global=false;this.export=0;this.mangled_name=null;this.undeclared=false;this.id=SymbolDef.next_id++;this.chained=false;this.direct_access=false;this.escaped=0;this.recursive_refs=0;this.references=[];this.should_replace=undefined;this.single_use=false;this.fixed=false;Object.seal(this)}fixed_value(){if(!this.fixed||this.fixed instanceof U)return this.fixed;return this.fixed()}unmangleable(e){if(!e)e={};if(_n&&_n.has(this.id)&&keep_name(e.keep_fnames,this.orig[0].name))return true;return this.global&&!e.toplevel||this.export&fn||this.undeclared||!e.eval&&this.scope.pinned()||(this.orig[0]instanceof St||this.orig[0]instanceof bt)&&keep_name(e.keep_fnames,this.orig[0].name)||this.orig[0]instanceof yt||(this.orig[0]instanceof At||this.orig[0]instanceof Tt)&&keep_name(e.keep_classnames,this.orig[0].name)}mangle(e){const t=e.cache&&e.cache.props;if(this.global&&t&&t.has(this.name)){this.mangled_name=t.get(this.name)}else if(!this.mangled_name&&!this.unmangleable(e)){var n=this.scope;var i=this.orig[0];if(e.ie8&&i instanceof St)n=n.parent_scope;const r=redefined_catch_def(this);this.mangled_name=r?r.mangled_name||r.name:n.next_mangled(e,this);if(this.global&&t){t.set(this.name,this.mangled_name)}}}}SymbolDef.next_id=1;function redefined_catch_def(e){if(e.orig[0]instanceof Ct&&e.scope.is_block_scope()){return e.scope.get_defun_scope().variables.get(e.name)}}re.DEFMETHOD("figure_out_scope",function(e,{parent_scope:t=null,toplevel:n=this}={}){e=defaults(e,{cache:null,ie8:false,safari10:false});if(!(n instanceof ae)){throw new Error("Invalid toplevel scope")}var i=this.parent_scope=t;var r=new Map;var a=null;var o=null;var s=[];var u=new TreeWalker((t,n)=>{if(t.is_block_scope()){const r=i;t.block_scope=i=new re(t);i._block_scope=true;const a=t instanceof Oe?r.parent_scope:r;i.init_scope_vars(a);i.uses_with=r.uses_with;i.uses_eval=r.uses_eval;if(e.safari10){if(t instanceof ee||t instanceof te){s.push(i)}}if(t instanceof Ae){const e=i;i=r;t.expression.walk(u);i=e;for(let e=0;e{if(e===t)return true;if(t instanceof Et){return e instanceof St}return!(e instanceof vt||e instanceof gt)})){js_error(`"${t.name}" is redeclared`,t.start.file,t.start.line,t.start.col,t.start.pos)}if(!(t instanceof Dt))mark_export(h,2);if(a!==i){t.mark_enclosed();var h=i.find_variable(t);if(t.thedef!==h){t.thedef=h;t.reference()}}}else if(t instanceof Nt){var d=r.get(t.name);if(!d)throw new Error(string_template("Undefined label {name} [{line},{col}]",{name:t.name,line:t.start.line,col:t.start.col}));t.thedef=d}if(!(i instanceof ae)&&(t instanceof ze||t instanceof Ve)){js_error(`"${t.TYPE}" statement may only appear at the top level`,t.start.file,t.start.line,t.start.col,t.start.pos)}});this.walk(u);function mark_export(e,t){if(o){var n=0;do{t++}while(u.parent(n++)!==o)}var i=u.parent(t);if(e.export=i instanceof ze?fn:0){var r=i.exported_definition;if((r instanceof fe||r instanceof ft)&&i.is_default){e.export=pn}}}const c=this instanceof ae;if(c){this.globals=new Map}var u=new TreeWalker(e=>{if(e instanceof De&&e.label){e.label.thedef.references.push(e);return true}if(e instanceof Ot){var t=e.name;if(t=="eval"&&u.parent()instanceof Ke){for(var i=e.scope;i&&!i.uses_eval;i=i.parent_scope){i.uses_eval=true}}var r;if(u.parent()instanceof Be&&u.parent(1).module_name||!(r=e.scope.find_variable(t))){r=n.def_global(e);if(e instanceof wt)r.export=fn}else if(r.scope instanceof se&&t=="arguments"){r.scope.uses_arguments=true}e.thedef=r;e.reference();if(e.scope.is_block_scope()&&!(r.orig[0]instanceof Et)){e.scope=e.scope.get_defun_scope()}return true}var a;if(e instanceof Ct&&(a=redefined_catch_def(e.definition()))){var i=e.scope;while(i){push_uniq(i.enclosed,a);if(i===a.scope)break;i=i.parent_scope}}});this.walk(u);if(e.ie8||e.safari10){walk(this,e=>{if(e instanceof Ct){var t=e.name;var i=e.thedef.references;var r=e.scope.get_defun_scope();var a=r.find_variable(t)||n.globals.get(t)||r.def_variable(e);i.forEach(function(e){e.thedef=a;e.reference()});e.thedef=a;e.reference();return true}})}if(e.safari10){for(const e of s){e.parent_scope.variables.forEach(function(t){push_uniq(e.enclosed,t)})}}});ae.DEFMETHOD("def_global",function(e){var t=this.globals,n=e.name;if(t.has(n)){return t.get(n)}else{var i=new SymbolDef(this,e);i.undeclared=true;i.global=true;t.set(n,i);return i}});re.DEFMETHOD("init_scope_vars",function(e){this.variables=new Map;this.functions=new Map;this.uses_with=false;this.uses_eval=false;this.parent_scope=e;this.enclosed=[];this.cname=-1});re.DEFMETHOD("conflicting_def",function(e){return this.enclosed.find(t=>t.name===e)||this.variables.has(e)||this.parent_scope&&this.parent_scope.conflicting_def(e)});re.DEFMETHOD("conflicting_def_shallow",function(e){return this.enclosed.find(t=>t.name===e)||this.variables.has(e)});re.DEFMETHOD("add_child_scope",function(e){if(e.parent_scope===this)return;e.parent_scope=this;const t=(()=>{const e=[];let t=this;do{e.push(t)}while(t=t.parent_scope);e.reverse();return e})();const n=new Set(e.enclosed);const i=[];for(const e of t){i.forEach(t=>push_uniq(e.enclosed,t));for(const t of e.variables.values()){if(n.has(t)){push_uniq(i,t);push_uniq(e.enclosed,t)}}}});function find_scopes_visible_from(e){const t=new Set;for(const n of new Set(e)){(function bubble_up(e){if(e==null||t.has(e))return;t.add(e);bubble_up(e.parent_scope)})(n)}return[...t]}re.DEFMETHOD("create_symbol",function(e,{source:t,tentative_name:n,scope:i,conflict_scopes:r=[i],init:a=null}={}){let o;r=find_scopes_visible_from(r);if(n){n=o=n.replace(/(?:^[^a-z_$]|[^a-z0-9_$])/gi,"_");let e=0;while(r.find(e=>e.conflicting_def_shallow(o))){o=n+"$"+e++}}if(!o){throw new Error("No symbol name could be generated in create_symbol()")}const s=make_node(e,t,{name:o,scope:i});this.def_variable(s,a||null);s.mark_enclosed();return s});U.DEFMETHOD("is_block_scope",return_false);ct.DEFMETHOD("is_block_scope",return_false);se.DEFMETHOD("is_block_scope",return_false);ae.DEFMETHOD("is_block_scope",return_false);Ce.DEFMETHOD("is_block_scope",return_false);H.DEFMETHOD("is_block_scope",return_true);re.DEFMETHOD("is_block_scope",function(){return this._block_scope||false});$.DEFMETHOD("is_block_scope",return_true);se.DEFMETHOD("init_scope_vars",function(){re.prototype.init_scope_vars.apply(this,arguments);this.uses_arguments=false;this.def_variable(new Dt({name:"arguments",start:this.start,end:this.end}))});le.DEFMETHOD("init_scope_vars",function(){re.prototype.init_scope_vars.apply(this,arguments);this.uses_arguments=false});_t.DEFMETHOD("mark_enclosed",function(){var e=this.definition();var t=this.scope;while(t){push_uniq(t.enclosed,e);if(t===e.scope)break;t=t.parent_scope}});_t.DEFMETHOD("reference",function(){this.definition().references.push(this);this.mark_enclosed()});re.DEFMETHOD("find_variable",function(e){if(e instanceof _t)e=e.name;return this.variables.get(e)||this.parent_scope&&this.parent_scope.find_variable(e)});re.DEFMETHOD("def_function",function(e,t){var n=this.def_variable(e,t);if(!n.init||n.init instanceof fe)n.init=t;this.functions.set(e.name,n);return n});re.DEFMETHOD("def_variable",function(e,t){var n=this.variables.get(e.name);if(n){n.orig.push(e);if(n.init&&(n.scope!==e.scope||n.init instanceof ce)){n.init=t}}else{n=new SymbolDef(this,e,t);this.variables.set(e.name,n);n.global=!this.parent_scope}return e.thedef=n});function next_mangled(e,t){var n=e.enclosed;e:while(true){var i=dn(++e.cname);if(l.has(i))continue;if(t.reserved.has(i))continue;if(hn&&hn.has(i))continue e;for(let e=n.length;--e>=0;){const r=n[e];const a=r.mangled_name||r.unmangleable(t)&&r.name;if(i==a)continue e}return i}}re.DEFMETHOD("next_mangled",function(e){return next_mangled(this,e)});ae.DEFMETHOD("next_mangled",function(e){let t;const n=this.mangled_names;do{t=next_mangled(this,e)}while(n.has(t));return t});ce.DEFMETHOD("next_mangled",function(e,t){var n=t.orig[0]instanceof Dt&&this.name&&this.name.definition();var i=n?n.mangled_name||n.name:null;while(true){var r=next_mangled(this,e);if(!i||i!=r)return r}});_t.DEFMETHOD("unmangleable",function(e){var t=this.definition();return!t||t.unmangleable(e)});Ft.DEFMETHOD("unmangleable",return_false);_t.DEFMETHOD("unreferenced",function(){return!this.definition().references.length&&!this.scope.pinned()});_t.DEFMETHOD("definition",function(){return this.thedef});_t.DEFMETHOD("global",function(){return this.thedef.global});ae.DEFMETHOD("_default_mangler_options",function(e){e=defaults(e,{eval:false,ie8:false,keep_classnames:false,keep_fnames:false,module:false,reserved:[],toplevel:false});if(e.module)e.toplevel=true;if(!Array.isArray(e.reserved)&&!(e.reserved instanceof Set)){e.reserved=[]}e.reserved=new Set(e.reserved);e.reserved.add("arguments");return e});ae.DEFMETHOD("mangle_names",function(e){e=this._default_mangler_options(e);var t=-1;var n=[];if(e.keep_fnames){_n=new Set}const i=this.mangled_names=new Set;if(e.cache){this.globals.forEach(collect);if(e.cache.props){e.cache.props.forEach(function(e){i.add(e)})}}var r=new TreeWalker(function(i,r){if(i instanceof j){var a=t;r();t=a;return true}if(i instanceof re){i.variables.forEach(collect);return}if(i.is_block_scope()){i.block_scope.variables.forEach(collect);return}if(_n&&i instanceof Le&&i.value instanceof se&&!i.value.name&&keep_name(e.keep_fnames,i.name.name)){_n.add(i.name.definition().id);return}if(i instanceof Ft){let e;do{e=dn(++t)}while(l.has(e));i.mangled_name=e;return true}if(!(e.ie8||e.safari10)&&i instanceof Ct){n.push(i.definition());return}});this.walk(r);if(e.keep_fnames||e.keep_classnames){hn=new Set;n.forEach(t=>{if(t.name.length<6&&t.unmangleable(e)){hn.add(t.name)}})}n.forEach(t=>{t.mangle(e)});_n=null;hn=null;function collect(t){const i=!e.reserved.has(t.name)&&!(t.export&fn);if(i){n.push(t)}}});ae.DEFMETHOD("find_colliding_names",function(e){const t=e.cache&&e.cache.props;const n=new Set;e.reserved.forEach(to_avoid);this.globals.forEach(add_def);this.walk(new TreeWalker(function(e){if(e instanceof re)e.variables.forEach(add_def);if(e instanceof Ct)add_def(e.definition())}));return n;function to_avoid(e){n.add(e)}function add_def(n){var i=n.name;if(n.global&&t&&t.has(i))i=t.get(i);else if(!n.unmangleable(e))return;to_avoid(i)}});ae.DEFMETHOD("expand_names",function(e){dn.reset();dn.sort();e=this._default_mangler_options(e);var t=this.find_colliding_names(e);var n=0;this.globals.forEach(rename);this.walk(new TreeWalker(function(e){if(e instanceof re)e.variables.forEach(rename);if(e instanceof Ct)rename(e.definition())}));function next_name(){var e;do{e=dn(n++)}while(t.has(e)||l.has(e));return e}function rename(t){if(t.global&&e.cache)return;if(t.unmangleable(e))return;if(e.reserved.has(t.name))return;const n=redefined_catch_def(t);const i=t.name=n?n.name:next_name();t.orig.forEach(function(e){e.name=i});t.references.forEach(function(e){e.name=i})}});U.DEFMETHOD("tail_node",return_this);Xe.DEFMETHOD("tail_node",function(){return this.expressions[this.expressions.length-1]});ae.DEFMETHOD("compute_char_frequency",function(e){e=this._default_mangler_options(e);try{U.prototype.print=function(t,n){this._print(t,n);if(this instanceof _t&&!this.unmangleable(e)){dn.consider(this.name,-1)}else if(e.properties){if(this instanceof We){dn.consider(this.property,-1)}else if(this instanceof qe){skip_string(this.property)}}};dn.consider(this.print_to_string(),1)}finally{U.prototype.print=U.prototype._print}dn.sort();function skip_string(e){if(e instanceof Bt){dn.consider(e.value,-1)}else if(e instanceof Je){skip_string(e.consequent);skip_string(e.alternative)}else if(e instanceof Xe){skip_string(e.tail_node())}}});const dn=(()=>{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_".split("");const t="0123456789".split("");let n;let i;function reset(){i=new Map;e.forEach(function(e){i.set(e,0)});t.forEach(function(e){i.set(e,0)})}base54.consider=function(e,t){for(var n=e.length;--n>=0;){i.set(e[n],i.get(e[n])+t)}};function compare(e,t){return i.get(t)-i.get(e)}base54.sort=function(){n=mergeSort(e,compare).concat(mergeSort(t,compare))};base54.reset=reset;reset();function base54(e){var t="",i=54;e++;do{e--;t+=n[e%i];e=Math.floor(e/i);i=64}while(e>0);return t}return base54})();let mn=undefined;U.prototype.size=function(e,t){mn=e&&e.mangle_options;let n=0;walk_parent(this,(e,t)=>{n+=e._size(t)},t||e&&e.stack);mn=undefined;return n};U.prototype._size=(()=>0);K.prototype._size=(()=>8);G.prototype._size=function(){return 2+this.value.length};const En=e=>e.length&&e.length-1;H.prototype._size=function(){return 2+En(this.body)};ae.prototype._size=function(){return En(this.body)};q.prototype._size=(()=>1);j.prototype._size=(()=>2);Q.prototype._size=(()=>9);J.prototype._size=(()=>7);ee.prototype._size=(()=>8);te.prototype._size=(()=>8);ie.prototype._size=(()=>6);oe.prototype._size=(()=>3);const gn=e=>(e.is_generator?1:0)+(e.async?6:0);ue.prototype._size=function(){return gn(this)+4+En(this.argnames)+En(this.body)};ce.prototype._size=function(e){const t=!!first_in_statement(e);return t*2+gn(this)+12+En(this.argnames)+En(this.body)};fe.prototype._size=function(){return gn(this)+13+En(this.argnames)+En(this.body)};le.prototype._size=function(){let e=2+En(this.argnames);if(!(this.argnames.length===1&&this.argnames[0]instanceof _t)){e+=2}return gn(this)+e+(Array.isArray(this.body)?En(this.body):this.body._size())};pe.prototype._size=(()=>2);he.prototype._size=function(){return 2+Math.floor(this.segments.length/2)*3};de.prototype._size=function(){return this.value.length};ge.prototype._size=function(){return this.value?7:6};ve.prototype._size=(()=>6);be.prototype._size=function(){return this.label?6:5};ye.prototype._size=function(){return this.label?9:8};Te.prototype._size=(()=>4);Ae.prototype._size=function(){return 8+En(this.body)};xe.prototype._size=function(){return 5+En(this.body)};Re.prototype._size=function(){return 8+En(this.body)};Fe.prototype._size=function(){return 3+En(this.body)};Oe.prototype._size=function(){let e=7+En(this.body);if(this.argname){e+=2}return e};we.prototype._size=function(){return 7+En(this.body)};const vn=(e,t)=>e+En(t.definitions);Ne.prototype._size=function(){return vn(4,this)};Ie.prototype._size=function(){return vn(4,this)};Pe.prototype._size=function(){return vn(6,this)};Le.prototype._size=function(){return this.value?1:0};Be.prototype._size=function(){return this.name?4:0};Ve.prototype._size=function(){let e=6;if(this.imported_name)e+=1;if(this.imported_name||this.imported_names)e+=5;if(this.imported_names){e+=2+En(this.imported_names)}return e};Ue.prototype._size=(()=>11);ze.prototype._size=function(){let e=7+(this.is_default?8:0);if(this.exported_value){e+=this.exported_value._size()}if(this.exported_names){e+=2+En(this.exported_names)}if(this.module_name){e+=5}return e};Ke.prototype._size=function(){if(this.optional){return 4+En(this.args)}return 2+En(this.args)};Ge.prototype._size=function(){return 6+En(this.args)};Xe.prototype._size=function(){return En(this.expressions)};We.prototype._size=function(){if(this.optional){return this.property.length+2}return this.property.length+1};qe.prototype._size=function(){return this.optional?4:2};je.prototype._size=function(){if(this.operator==="typeof")return 7;if(this.operator==="void")return 5;return this.operator.length};Qe.prototype._size=function(e){if(this.operator==="in")return 4;let t=this.operator.length;if((this.operator==="+"||this.operator==="-")&&this.right instanceof je&&this.right.operator===this.operator){t+=1}if(this.needs_parens(e)){t+=2}return t};Je.prototype._size=(()=>3);nt.prototype._size=function(){return 2+En(this.elements)};it.prototype._size=function(e){let t=2;if(first_in_statement(e)){t+=2}return t+En(this.properties)};const Dn=e=>typeof e==="string"?e.length:0;at.prototype._size=function(){return Dn(this.key)+1};const bn=e=>e?7:0;st.prototype._size=function(){return 5+bn(this.static)+Dn(this.key)};ot.prototype._size=function(){return 5+bn(this.static)+Dn(this.key)};ut.prototype._size=function(){return bn(this.static)+Dn(this.key)+gn(this)};ct.prototype._size=function(){return(this.name?8:7)+(this.extends?8:0)};lt.prototype._size=function(){return bn(this.static)+(typeof this.key==="string"?this.key.length+2:0)+(this.value?1:0)};_t.prototype._size=function(){return!mn||this.definition().unmangleable(mn)?this.name.length:1};kt.prototype._size=function(){return this.name.length};Ot.prototype._size=dt.prototype._size=function(){const{name:e,thedef:t}=this;if(t&&t.global)return e.length;if(e==="arguments")return 9;return _t.prototype._size.call(this)};ht.prototype._size=(()=>10);xt.prototype._size=function(){return this.name.length};Mt.prototype._size=function(){return this.name.length};It.prototype._size=(()=>4);Pt.prototype._size=(()=>5);Bt.prototype._size=function(){return this.value.length+2};Vt.prototype._size=function(){const{value:e}=this;if(e===0)return 1;if(e>0&&Math.floor(e)===e){return Math.floor(Math.log10(e)+1)}return e.toString().length};Ut.prototype._size=function(){return this.value.length};zt.prototype._size=function(){return this.value.toString().length};Gt.prototype._size=(()=>4);Xt.prototype._size=(()=>3);Ht.prototype._size=(()=>6);Wt.prototype._size=(()=>0);qt.prototype._size=(()=>8);$t.prototype._size=(()=>4);jt.prototype._size=(()=>5);ke.prototype._size=(()=>6);Se.prototype._size=(()=>6);const yn=1;const kn=2;const Sn=4;const Tn=8;const An=16;const Cn=32;const Rn=256;const xn=512;const Fn=1024;const On=Rn|xn|Fn;const wn=(e,t)=>e.flags&t;const Mn=(e,t)=>{e.flags|=t};const Nn=(e,t)=>{e.flags&=~t};class Compressor extends TreeWalker{constructor(e,{false_by_default:t=false,mangle_options:n=false}){super();if(e.defaults!==undefined&&!e.defaults)t=true;this.options=defaults(e,{arguments:false,arrows:!t,booleans:!t,booleans_as_integers:false,collapse_vars:!t,comparisons:!t,computed_props:!t,conditionals:!t,dead_code:!t,defaults:true,directives:!t,drop_console:false,drop_debugger:!t,ecma:5,evaluate:!t,expression:false,global_defs:false,hoist_funs:false,hoist_props:!t,hoist_vars:false,ie8:false,if_return:!t,inline:!t,join_vars:!t,keep_classnames:false,keep_fargs:true,keep_fnames:false,keep_infinity:false,loops:!t,module:false,negate_iife:!t,passes:1,properties:!t,pure_getters:!t&&"strict",pure_funcs:null,reduce_funcs:null,reduce_vars:!t,sequences:!t,side_effects:!t,switches:!t,top_retain:null,toplevel:!!(e&&e["top_retain"]),typeofs:!t,unsafe:false,unsafe_arrows:false,unsafe_comps:false,unsafe_Function:false,unsafe_math:false,unsafe_symbols:false,unsafe_methods:false,unsafe_proto:false,unsafe_regexp:false,unsafe_undefined:false,unused:!t,warnings:false},true);var i=this.options["global_defs"];if(typeof i=="object")for(var r in i){if(r[0]==="@"&&HOP(i,r)){i[r.slice(1)]=parse(i[r],{expression:true})}}if(this.options["inline"]===true)this.options["inline"]=3;var a=this.options["pure_funcs"];if(typeof a=="function"){this.pure_funcs=a}else{this.pure_funcs=a?function(e){return!a.includes(e.expression.print_to_string())}:return_true}var o=this.options["top_retain"];if(o instanceof RegExp){this.top_retain=function(e){return o.test(e.name)}}else if(typeof o=="function"){this.top_retain=o}else if(o){if(typeof o=="string"){o=o.split(/,/)}this.top_retain=function(e){return o.includes(e.name)}}if(this.options["module"]){this.directives["use strict"]=true;this.options["toplevel"]=true}var s=this.options["toplevel"];this.toplevel=typeof s=="string"?{funcs:/funcs/.test(s),vars:/vars/.test(s)}:{funcs:s,vars:s};var u=this.options["sequences"];this.sequences_limit=u==1?800:u|0;this.evaluated_regexps=new Map;this._toplevel=undefined;this.mangle_options=n}option(e){return this.options[e]}exposed(e){if(e.export)return true;if(e.global)for(var t=0,n=e.orig.length;t0||this.option("reduce_vars")){this._toplevel.reset_opt_flags(this)}this._toplevel=this._toplevel.transform(this);if(t>1){let e=0;walk(this._toplevel,()=>{e++});if(e=0){r.body[o]=r.body[o].transform(i)}}else if(r instanceof Te){r.body=r.body.transform(i);if(r.alternative){r.alternative=r.alternative.transform(i)}}else if(r instanceof ie){r.body=r.body.transform(i)}return r});n.transform(i)});function read_property(e,t){t=get_value(t);if(t instanceof U)return;var n;if(e instanceof nt){var i=e.elements;if(t=="length")return make_node_from_constant(i.length,e);if(typeof t=="number"&&t in i)n=i[t]}else if(e instanceof it){t=""+t;var r=e.properties;for(var a=r.length;--a>=0;){var o=r[a];if(!(o instanceof at))return;if(!n&&r[a].key===t)n=r[a].value}}return n instanceof Ot&&n.fixed_value()||n}function is_modified(e,t,n,i,r,a){var o=t.parent(r);var s=is_lhs(n,o);if(s)return s;if(!a&&o instanceof Ke&&o.expression===n&&!(i instanceof le)&&!(i instanceof ct)&&!o.is_expr_pure(e)&&(!(i instanceof ce)||!(o instanceof Ge)&&i.contains_this())){return true}if(o instanceof nt){return is_modified(e,t,o,o,r+1)}if(o instanceof at&&n===o.value){var u=t.parent(r+1);return is_modified(e,t,u,u,r+2)}if(o instanceof He&&o.expression===n){var c=read_property(i,o.property);return!a&&is_modified(e,t,o,c,r+1)}}(function(e){e(U,noop);function reset_def(e,t){t.assignments=0;t.chained=false;t.direct_access=false;t.escaped=0;t.recursive_refs=0;t.references=[];t.single_use=undefined;if(t.scope.pinned()){t.fixed=false}else if(t.orig[0]instanceof gt||!e.exposed(t)){t.fixed=t.init}else{t.fixed=false}}function reset_variables(e,t,n){n.variables.forEach(function(n){reset_def(t,n);if(n.fixed===null){e.defs_to_safe_ids.set(n.id,e.safe_ids);mark(e,n,true)}else if(n.fixed){e.loop_ids.set(n.id,e.in_loop);mark(e,n,true)}})}function reset_block_variables(e,t){if(t.block_scope)t.block_scope.variables.forEach(t=>{reset_def(e,t)})}function push(e){e.safe_ids=Object.create(e.safe_ids)}function pop(e){e.safe_ids=Object.getPrototypeOf(e.safe_ids)}function mark(e,t,n){e.safe_ids[t.id]=n}function safe_to_read(e,t){if(t.single_use=="m")return false;if(e.safe_ids[t.id]){if(t.fixed==null){var n=t.orig[0];if(n instanceof Dt||n.name=="arguments")return false;t.fixed=make_node(Ht,n)}return true}return t.fixed instanceof fe}function safe_to_assign(e,t,n,i){if(t.fixed===undefined)return true;let r;if(t.fixed===null&&(r=e.defs_to_safe_ids.get(t.id))){r[t.id]=false;e.defs_to_safe_ids.delete(t.id);return true}if(!HOP(e.safe_ids,t.id))return false;if(!safe_to_read(e,t))return false;if(t.fixed===false)return false;if(t.fixed!=null&&(!i||t.references.length>t.assignments))return false;if(t.fixed instanceof fe){return i instanceof U&&t.fixed.parent_scope===n}return t.orig.every(e=>{return!(e instanceof gt||e instanceof bt||e instanceof St)})}function ref_once(e,t,n){return t.option("unused")&&!n.scope.pinned()&&n.references.length-n.recursive_refs==1&&e.loop_ids.get(n.id)===e.in_loop}function is_immutable(e){if(!e)return false;return e.is_constant()||e instanceof se||e instanceof It}function mark_escaped(e,t,n,i,r,a=0,o=1){var s=e.parent(a);if(r){if(r.is_constant())return;if(r instanceof pt)return}if(s instanceof et&&(s.operator==="="||s.logical)&&i===s.right||s instanceof Ke&&(i!==s.expression||s instanceof Ge)||s instanceof Ee&&i===s.value&&i.scope!==t.scope||s instanceof Le&&i===s.value||s instanceof Se&&i===s.value&&i.scope!==t.scope){if(o>1&&!(r&&r.is_constant_expression(n)))o=1;if(!t.escaped||t.escaped>o)t.escaped=o;return}else if(s instanceof nt||s instanceof ke||s instanceof Qe&&Ln.has(s.operator)||s instanceof Je&&i!==s.condition||s instanceof oe||s instanceof Xe&&i===s.tail_node()){mark_escaped(e,t,n,s,s,a+1,o)}else if(s instanceof at&&i===s.value){var u=e.parent(a+1);mark_escaped(e,t,n,u,u,a+2,o)}else if(s instanceof He&&i===s.expression){r=read_property(r,s.property);mark_escaped(e,t,n,s,r,a+1,o+1);if(r)return}if(a>0)return;if(s instanceof Xe&&i!==s.tail_node())return;if(s instanceof X)return;t.direct_access=true}const t=e=>walk(e,e=>{if(!(e instanceof _t))return;var t=e.definition();if(!t)return;if(e instanceof Ot)t.references.push(e);t.fixed=false});e(ue,function(e,t,n){push(e);reset_variables(e,n,this);t();pop(e);return true});e(et,function(e,n,i){var r=this;if(r.left instanceof pe){t(r.left);return}const a=()=>{if(r.logical){r.left.walk(e);push(e);r.right.walk(e);pop(e);return true}};var o=r.left;if(!(o instanceof Ot))return a();var s=o.definition();var u=safe_to_assign(e,s,o.scope,r.right);s.assignments++;if(!u)return a();var c=s.fixed;if(!c&&r.operator!="="&&!r.logical)return a();var l=r.operator=="=";var f=l?r.right:r;if(is_modified(i,e,r,f,0))return a();s.references.push(o);if(!r.logical){if(!l)s.chained=true;s.fixed=l?function(){return r.right}:function(){return make_node(Qe,r,{operator:r.operator.slice(0,-1),left:c instanceof U?c:c(),right:r.right})}}if(r.logical){mark(e,s,false);push(e);r.right.walk(e);pop(e);return true}mark(e,s,false);r.right.walk(e);mark(e,s,true);mark_escaped(e,s,o.scope,r,f,0,1);return true});e(Qe,function(e){if(!Ln.has(this.operator))return;this.left.walk(e);push(e);this.right.walk(e);pop(e);return true});e(H,function(e,t,n){reset_block_variables(n,this)});e(xe,function(e){push(e);this.expression.walk(e);pop(e);push(e);walk_body(this,e);pop(e);return true});e(ct,function(e,t){Nn(this,An);push(e);t();pop(e);return true});e(Je,function(e){this.condition.walk(e);push(e);this.consequent.walk(e);pop(e);push(e);this.alternative.walk(e);pop(e);return true});e(Ye,function(e,t){const n=e.safe_ids;t();e.safe_ids=n;return true});e(Ke,function(e){this.expression.walk(e);if(this.optional){push(e)}for(const t of this.args)t.walk(e);return true});e(He,function(e){if(!this.optional)return;this.expression.walk(e);push(e);if(this.property instanceof U)this.property.walk(e);return true});e(Re,function(e,t){push(e);t();pop(e);return true});function mark_lambda(e,t,n){Nn(this,An);push(e);reset_variables(e,n,this);if(this.uses_arguments){t();pop(e);return}var i;if(!this.name&&(i=e.parent())instanceof Ke&&i.expression===this&&!i.args.some(e=>e instanceof oe)&&this.argnames.every(e=>e instanceof _t)){this.argnames.forEach((t,n)=>{if(!t.definition)return;var r=t.definition();if(r.orig.length>1)return;if(r.fixed===undefined&&(!this.uses_arguments||e.has_directive("use strict"))){r.fixed=function(){return i.args[n]||make_node(Ht,i)};e.loop_ids.set(r.id,e.in_loop);mark(e,r,true)}else{r.fixed=false}})}t();pop(e);return true}e(se,mark_lambda);e(Q,function(e,t,n){reset_block_variables(n,this);const i=e.in_loop;e.in_loop=this;push(e);this.body.walk(e);if(has_break_or_continue(this)){pop(e);push(e)}this.condition.walk(e);pop(e);e.in_loop=i;return true});e(ee,function(e,t,n){reset_block_variables(n,this);if(this.init)this.init.walk(e);const i=e.in_loop;e.in_loop=this;push(e);if(this.condition)this.condition.walk(e);this.body.walk(e);if(this.step){if(has_break_or_continue(this)){pop(e);push(e)}this.step.walk(e)}pop(e);e.in_loop=i;return true});e(te,function(e,n,i){reset_block_variables(i,this);t(this.init);this.object.walk(e);const r=e.in_loop;e.in_loop=this;push(e);this.body.walk(e);pop(e);e.in_loop=r;return true});e(Te,function(e){this.condition.walk(e);push(e);this.body.walk(e);pop(e);if(this.alternative){push(e);this.alternative.walk(e);pop(e)}return true});e(j,function(e){push(e);this.body.walk(e);pop(e);return true});e(Ct,function(){this.definition().fixed=false});e(Ot,function(e,t,n){var i=this.definition();i.references.push(this);if(i.references.length==1&&!i.fixed&&i.orig[0]instanceof bt){e.loop_ids.set(i.id,e.in_loop)}var r;if(i.fixed===undefined||!safe_to_read(e,i)){i.fixed=false}else if(i.fixed){r=this.fixed_value();if(r instanceof se&&recursive_ref(e,i)){i.recursive_refs++}else if(r&&!n.exposed(i)&&ref_once(e,n,i)){i.single_use=r instanceof se&&!r.pinned()||r instanceof ct||i.scope===this.scope&&r.is_constant_expression()}else{i.single_use=false}if(is_modified(n,e,this,r,0,is_immutable(r))){if(i.single_use){i.single_use="m"}else{i.fixed=false}}}mark_escaped(e,i,this.scope,this,r,0,1)});e(ae,function(e,t,n){this.globals.forEach(function(e){reset_def(n,e)});reset_variables(e,n,this)});e(Fe,function(e,t,n){reset_block_variables(n,this);push(e);walk_body(this,e);pop(e);if(this.bcatch){push(e);this.bcatch.walk(e);pop(e)}if(this.bfinally)this.bfinally.walk(e);return true});e(je,function(e){var t=this;if(t.operator!=="++"&&t.operator!=="--")return;var n=t.expression;if(!(n instanceof Ot))return;var i=n.definition();var r=safe_to_assign(e,i,n.scope,true);i.assignments++;if(!r)return;var a=i.fixed;if(!a)return;i.references.push(n);i.chained=true;i.fixed=function(){return make_node(Qe,t,{operator:t.operator.slice(0,-1),left:make_node($e,t,{operator:"+",expression:a instanceof U?a:a()}),right:make_node(Vt,t,{value:1})})};mark(e,i,true);return true});e(Le,function(e,n){var i=this;if(i.name instanceof pe){t(i.name);return}var r=i.name.definition();if(i.value){if(safe_to_assign(e,r,i.name.scope,i.value)){r.fixed=function(){return i.value};e.loop_ids.set(r.id,e.in_loop);mark(e,r,false);n();mark(e,r,true);return true}else{r.fixed=false}}});e(J,function(e,t,n){reset_block_variables(n,this);const i=e.in_loop;e.in_loop=this;push(e);t();pop(e);e.in_loop=i;return true})})(function(e,t){e.DEFMETHOD("reduce_vars",t)});ae.DEFMETHOD("reset_opt_flags",function(e){const t=this;const n=e.option("reduce_vars");const i=new TreeWalker(function(r,a){Nn(r,On);if(n){if(e.top_retain&&r instanceof fe&&i.parent()===t){Mn(r,Fn)}return r.reduce_vars(i,a,e)}});i.safe_ids=Object.create(null);i.in_loop=null;i.loop_ids=new Map;i.defs_to_safe_ids=new Map;t.walk(i)});_t.DEFMETHOD("fixed_value",function(){var e=this.thedef.fixed;if(!e||e instanceof U)return e;return e()});Ot.DEFMETHOD("is_immutable",function(){var e=this.definition().orig;return e.length==1&&e[0]instanceof St});function is_func_expr(e){return e instanceof le||e instanceof ce}function is_lhs_read_only(e){if(e instanceof It)return true;if(e instanceof Ot)return e.definition().orig[0]instanceof St;if(e instanceof He){e=e.expression;if(e instanceof Ot){if(e.is_immutable())return false;e=e.fixed_value()}if(!e)return true;if(e instanceof zt)return false;if(e instanceof Lt)return true;return is_lhs_read_only(e)}return false}function is_ref_of(e,t){if(!(e instanceof Ot))return false;var n=e.definition().orig;for(var i=n.length;--i>=0;){if(n[i]instanceof t)return true}}function find_scope(e){for(let t=0;;t++){const n=e.parent(t);if(n instanceof ae)return n;if(n instanceof se)return n;if(n.block_scope)return n.block_scope}}function find_variable(e,t){var n,i=0;while(n=e.parent(i++)){if(n instanceof re)break;if(n instanceof Oe&&n.argname){n=n.argname.definition().scope;break}}return n.find_variable(t)}function make_sequence(e,t){if(t.length==1)return t[0];if(t.length==0)throw new Error("trying to create a sequence with length zero!");return make_node(Xe,e,{expressions:t.reduce(merge_sequence,[])})}function make_node_from_constant(e,t){switch(typeof e){case"string":return make_node(Bt,t,{value:e});case"number":if(isNaN(e))return make_node(Xt,t);if(isFinite(e)){return 1/e<0?make_node($e,t,{operator:"-",expression:make_node(Vt,t,{value:-e})}):make_node(Vt,t,{value:e})}return e<0?make_node($e,t,{operator:"-",expression:make_node(qt,t)}):make_node(qt,t);case"boolean":return make_node(e?$t:jt,t);case"undefined":return make_node(Ht,t);default:if(e===null){return make_node(Gt,t,{value:null})}if(e instanceof RegExp){return make_node(zt,t,{value:{source:regexp_source_fix(e.source),flags:e.flags}})}throw new Error(string_template("Can't handle constant of type: {type}",{type:typeof e}))}}function maintain_this_binding(e,t,n){if(e instanceof $e&&e.operator=="delete"||e instanceof Ke&&e.expression===t&&(n instanceof He||n instanceof Ot&&n.name=="eval")){return make_sequence(t,[make_node(Vt,t,{value:0}),n])}return n}function merge_sequence(e,t){if(t instanceof Xe){e.push(...t.expressions)}else{e.push(t)}return e}function as_statement_array(e){if(e===null)return[];if(e instanceof W)return e.body;if(e instanceof q)return[];if(e instanceof z)return[e];throw new Error("Can't convert thing to statement array")}function is_empty(e){if(e===null)return true;if(e instanceof q)return true;if(e instanceof W)return e.body.length==0;return false}function can_be_evicted_from_block(e){return!(e instanceof ft||e instanceof fe||e instanceof Ie||e instanceof Pe||e instanceof ze||e instanceof Ve)}function loop_body(e){if(e instanceof $){return e.body instanceof W?e.body:e}return e}function is_iife_call(e){if(e.TYPE!="Call")return false;return e.expression instanceof ce||is_iife_call(e.expression)}function is_undeclared_ref(e){return e instanceof Ot&&e.definition().undeclared}var In=makePredicate("Array Boolean clearInterval clearTimeout console Date decodeURI decodeURIComponent encodeURI encodeURIComponent Error escape eval EvalError Function isFinite isNaN JSON Math Number parseFloat parseInt RangeError ReferenceError RegExp Object setInterval setTimeout String SyntaxError TypeError unescape URIError");Ot.DEFMETHOD("is_declared",function(e){return!this.definition().undeclared||e.option("unsafe")&&In.has(this.name)});var Pn=makePredicate("Infinity NaN undefined");function is_identifier_atom(e){return e instanceof qt||e instanceof Xt||e instanceof Ht}function tighten_body(e,t){var n,r;var a=t.find_parent(re).get_defun_scope();find_loop_scope_try();var o,s=10;do{o=false;eliminate_spurious_blocks(e);if(t.option("dead_code")){eliminate_dead_code(e,t)}if(t.option("if_return")){handle_if_return(e,t)}if(t.sequences_limit>0){sequencesize(e,t);sequencesize_2(e,t)}if(t.option("join_vars")){join_consecutive_vars(e)}if(t.option("collapse_vars")){collapse(e,t)}}while(o&&s-- >0);function find_loop_scope_try(){var e=t.self(),i=0;do{if(e instanceof Oe||e instanceof we){i++}else if(e instanceof $){n=true}else if(e instanceof re){a=e;break}else if(e instanceof Fe){r=true}}while(e=t.parent(i++))}function collapse(e,t){if(a.pinned())return e;var s;var u=[];var c=e.length;var l=new TreeTransformer(function(e){if(A)return e;if(!T){if(e!==p[_])return e;_++;if(_1||e instanceof $&&!(e instanceof ee)||e instanceof De||e instanceof Fe||e instanceof ie||e instanceof Se||e instanceof ze||e instanceof ct||n instanceof ee&&e!==n.init||!y&&(e instanceof Ot&&!e.is_declared(t)&&!Gn.has(e))||e instanceof Ot&&n instanceof Ke&&has_annotation(n,en)){A=true;return e}if(!E&&(!D||!y)&&(n instanceof Qe&&Ln.has(n.operator)&&n.left!==e||n instanceof Je&&n.condition!==e||n instanceof Te&&n.condition!==e)){E=n}if(R&&!(e instanceof dt)&&g.equivalent_to(e)){if(E){A=true;return e}if(is_lhs(e,n)){if(d)C++;return e}else{C++;if(d&&h instanceof Le)return e}o=A=true;if(h instanceof Ze){return make_node($e,h,h)}if(h instanceof Le){var i=h.name.definition();var a=h.value;if(i.references.length-i.replaced==1&&!t.exposed(i)){i.replaced++;if(S&&is_identifier_atom(a)){return a.transform(t)}else{return maintain_this_binding(n,e,a)}}return make_node(et,h,{operator:"=",logical:false,left:make_node(Ot,h.name,h.name),right:a})}Nn(h,Cn);return h}var s;if(e instanceof Ke||e instanceof Ee&&(b||g instanceof He||may_modify(g))||e instanceof He&&(b||e.expression.may_throw_on_access(t))||e instanceof Ot&&(v.get(e.name)||b&&may_modify(e))||e instanceof Le&&e.value&&(v.has(e.name.name)||b&&may_modify(e.name))||(s=is_lhs(e.left,e))&&(s instanceof He||v.has(s.name))||k&&(r?e.has_side_effects(t):side_effects_external(e))){m=e;if(e instanceof re)A=true}return handle_custom_scan_order(e)},function(e){if(A)return;if(m===e)A=true;if(E===e)E=null});var f=new TreeTransformer(function(e){if(A)return e;if(!T){if(e!==p[_])return e;_++;if(_=0){if(c==0&&t.option("unused"))extract_args();var p=[];extract_candidates(e[c]);while(u.length>0){p=u.pop();var _=0;var h=p[p.length-1];var d=null;var m=null;var E=null;var g=get_lhs(h);if(!g||is_lhs_read_only(g)||g.has_side_effects(t))continue;var v=get_lvalues(h);var D=is_lhs_local(g);if(g instanceof Ot)v.set(g.name,false);var b=value_has_side_effects(h);var y=replace_all_symbols();var k=h.may_throw(t);var S=h.name instanceof Dt;var T=S;var A=false,C=0,R=!s||!T;if(!R){for(var x=t.self().argnames.lastIndexOf(h.name)+1;!A&&xC)C=false;else{A=false;_=0;T=S;for(var F=c;!A&&F!(e instanceof oe))){var i=t.has_directive("use strict");if(i&&!member(i,n.body))i=false;var r=n.argnames.length;s=e.args.slice(r);var a=new Set;for(var o=r;--o>=0;){var c=n.argnames[o];var l=e.args[o];const r=c.definition&&c.definition();const p=r&&r.orig.length>1;if(p)continue;s.unshift(make_node(Le,c,{name:c,value:l}));if(a.has(c.name))continue;a.add(c.name);if(c instanceof oe){var f=e.args.slice(o);if(f.every(e=>!has_overlapping_symbol(n,e,i))){u.unshift([make_node(Le,c,{name:c.expression,value:make_node(nt,e,{elements:f})})])}}else{if(!l){l=make_node(Ht,c).transform(t)}else if(l instanceof se&&l.pinned()||has_overlapping_symbol(n,l,i)){l=null}if(l)u.unshift([make_node(Le,c,{name:c,value:l})])}}}}function extract_candidates(e){p.push(e);if(e instanceof et){if(!e.left.has_side_effects(t)){u.push(p.slice())}extract_candidates(e.right)}else if(e instanceof Qe){extract_candidates(e.left);extract_candidates(e.right)}else if(e instanceof Ke&&!has_annotation(e,en)){extract_candidates(e.expression);e.args.forEach(extract_candidates)}else if(e instanceof xe){extract_candidates(e.expression)}else if(e instanceof Je){extract_candidates(e.condition);extract_candidates(e.consequent);extract_candidates(e.alternative)}else if(e instanceof Me){var n=e.definitions.length;var i=n-200;if(i<0)i=0;for(;i1&&!(e.name instanceof Dt)||(i>1?mangleable_var(e):!t.exposed(n))){return make_node(Ot,e.name,e.name)}}else{const t=e instanceof et?e.left:e.expression;return!is_ref_of(t,gt)&&!is_ref_of(t,vt)&&t}}function get_rvalue(e){if(e instanceof et){return e.right}else{return e.value}}function get_lvalues(e){var n=new Map;if(e instanceof je)return n;var i=new TreeWalker(function(e){var r=e;while(r instanceof He)r=r.expression;if(r instanceof Ot||r instanceof It){n.set(r.name,n.get(r.name)||is_modified(t,i,e,e,0))}});get_rvalue(e).walk(i);return n}function remove_candidate(n){if(n.name instanceof Dt){var r=t.parent(),a=t.self().argnames;var o=a.indexOf(n.name);if(o<0){r.args.length=Math.min(r.args.length,a.length-1)}else{var s=r.args;if(s[o])s[o]=make_node(Vt,s[o],{value:0})}return true}var u=false;return e[c].transform(new TreeTransformer(function(e,t,r){if(u)return e;if(e===n||e.body===n){u=true;if(e instanceof Le){e.value=e.name instanceof gt?make_node(Ht,e.value):null;return e}return r?i.skip:null}},function(e){if(e instanceof Xe)switch(e.expressions.length){case 0:return null;case 1:return e.expressions[0]}}))}function is_lhs_local(e){while(e instanceof He)e=e.expression;return e instanceof Ot&&e.definition().scope===a&&!(n&&(v.has(e.name)||h instanceof je||h instanceof et&&!h.logical&&h.operator!="="))}function value_has_side_effects(e){if(e instanceof je)return Bn.has(e.operator);return get_rvalue(e).has_side_effects(t)}function replace_all_symbols(){if(b)return false;if(d)return true;if(g instanceof Ot){var e=g.definition();if(e.references.length-e.replaced==(h instanceof Le?1:2)){return true}}return false}function may_modify(e){if(!e.definition)return true;var t=e.definition();if(t.orig.length==1&&t.orig[0]instanceof bt)return false;if(t.scope.get_defun_scope()!==a)return true;return!t.references.every(e=>{var t=e.scope.get_defun_scope();if(t.TYPE=="Scope")t=t.parent_scope;return t===a})}function side_effects_external(e,t){if(e instanceof et)return side_effects_external(e.left,true);if(e instanceof je)return side_effects_external(e.expression,true);if(e instanceof Le)return e.value&&side_effects_external(e.value);if(t){if(e instanceof We)return side_effects_external(e.expression,true);if(e instanceof qe)return side_effects_external(e.expression,true);if(e instanceof Ot)return e.definition().scope!==a}return false}}function eliminate_spurious_blocks(e){var t=[];for(var n=0;n=0;){var s=e[a];var u=next_index(a);var c=e[u];if(r&&!c&&s instanceof ge){if(!s.value){o=true;e.splice(a,1);continue}if(s.value instanceof $e&&s.value.operator=="void"){o=true;e[a]=make_node(X,s,{body:s.value.expression});continue}}if(s instanceof Te){var l=aborts(s.body);if(can_merge_flow(l)){if(l.label){remove(l.label.thedef.references,l)}o=true;s=s.clone();s.condition=s.condition.negate(t);var f=as_statement_array_with_return(s.body,l);s.body=make_node(W,s,{body:as_statement_array(s.alternative).concat(extract_functions())});s.alternative=make_node(W,s,{body:f});e[a]=s.transform(t);continue}var l=aborts(s.alternative);if(can_merge_flow(l)){if(l.label){remove(l.label.thedef.references,l)}o=true;s=s.clone();s.body=make_node(W,s.body,{body:as_statement_array(s.body).concat(extract_functions())});var f=as_statement_array_with_return(s.alternative,l);s.alternative=make_node(W,s.alternative,{body:f});e[a]=s.transform(t);continue}}if(s instanceof Te&&s.body instanceof ge){var p=s.body.value;if(!p&&!s.alternative&&(r&&!c||c instanceof ge&&!c.value)){o=true;e[a]=make_node(X,s.condition,{body:s.condition});continue}if(p&&!s.alternative&&c instanceof ge&&c.value){o=true;s=s.clone();s.alternative=c;e[a]=s.transform(t);e.splice(u,1);continue}if(p&&!s.alternative&&(!c&&r&&i||c instanceof ge)){o=true;s=s.clone();s.alternative=c||make_node(ge,s,{value:null});e[a]=s.transform(t);if(c)e.splice(u,1);continue}var _=e[prev_index(a)];if(t.option("sequences")&&r&&!s.alternative&&_ instanceof Te&&_.body instanceof ge&&next_index(u)==e.length&&c instanceof X){o=true;s=s.clone();s.alternative=make_node(W,c,{body:[c,make_node(ge,c,{value:null})]});e[a]=s.transform(t);e.splice(u,1);continue}}}function has_multiple_if_returns(e){var t=0;for(var n=e.length;--n>=0;){var i=e[n];if(i instanceof Te&&i.body instanceof ge){if(++t>1)return true}}return false}function is_return_void(e){return!e||e instanceof $e&&e.operator=="void"}function can_merge_flow(i){if(!i)return false;for(var o=a+1,s=e.length;o=0;){var i=e[n];if(!(i instanceof Ne&&declarations_only(i))){break}}return n}}function eliminate_dead_code(e,t){var n;var i=t.self();for(var r=0,a=0,s=e.length;r!e.value)}function sequencesize(e,t){if(e.length<2)return;var n=[],i=0;function push_seq(){if(!n.length)return;var t=make_sequence(n[0],n);e[i++]=make_node(X,t,{body:t});n=[]}for(var r=0,a=e.length;r=t.sequences_limit)push_seq();var u=s.body;if(n.length>0)u=u.drop_side_effect_free(t);if(u)merge_sequence(n,u)}else if(s instanceof Me&&declarations_only(s)||s instanceof fe){e[i++]=s}else{push_seq();e[i++]=s}}push_seq();e.length=i;if(i!=a)o=true}function to_simple_statement(e,t){if(!(e instanceof W))return e;var n=null;for(var i=0,r=e.body.length;i{if(e instanceof re)return true;if(e instanceof Qe&&e.operator==="in"){return Zt}});if(!e){if(a.init)a.init=cons_seq(a.init);else{a.init=i.body;n--;o=true}}}}else if(a instanceof te){if(!(a.init instanceof Pe)&&!(a.init instanceof Ie)){a.object=cons_seq(a.object)}}else if(a instanceof Te){a.condition=cons_seq(a.condition)}else if(a instanceof Ae){a.expression=cons_seq(a.expression)}else if(a instanceof ie){a.expression=cons_seq(a.expression)}}if(t.option("conditionals")&&a instanceof Te){var s=[];var u=to_simple_statement(a.body,s);var c=to_simple_statement(a.alternative,s);if(u!==false&&c!==false&&s.length>0){var l=s.length;s.push(make_node(Te,a,{condition:a.condition,body:u||make_node(q,a.body),alternative:c}));s.unshift(n,1);[].splice.apply(e,s);r+=l;n+=l+1;i=null;o=true;continue}}e[n++]=a;i=a instanceof X?a:null}e.length=n}function join_object_assignments(e,n){if(!(e instanceof Me))return;var i=e.definitions[e.definitions.length-1];if(!(i.value instanceof it))return;var r;if(n instanceof et&&!n.logical){r=[n]}else if(n instanceof Xe){r=n.expressions.slice()}if(!r)return;var o=false;do{var s=r[0];if(!(s instanceof et))break;if(s.operator!="=")break;if(!(s.left instanceof He))break;var u=s.left.expression;if(!(u instanceof Ot))break;if(i.name.name!=u.name)break;if(!s.right.is_constant_expression(a))break;var c=s.left.property;if(c instanceof U){c=c.evaluate(t)}if(c instanceof U)break;c=""+c;var l=t.option("ecma")<2015&&t.has_directive("use strict")?function(e){return e.key!=c&&(e.key&&e.key.name!=c)}:function(e){return e.key&&e.key.name!=c};if(!i.value.properties.every(l))break;var f=i.value.properties.filter(function(e){return e.key===c})[0];if(!f){i.value.properties.push(make_node(at,s,{key:c,value:s.right}))}else{f.value=new Xe({start:f.start,expressions:[f.value.clone(),s.right.clone()],end:f.end})}r.shift();o=true}while(r.length);return o&&r}function join_consecutive_vars(e){var t;for(var n=0,i=-1,r=e.length;n{if(i instanceof Ne){i.remove_initializers();n.push(i);return true}if(i instanceof fe&&(i===t||!e.has_directive("use strict"))){n.push(i===t?i:make_node(Ne,i,{definitions:[make_node(Le,i,{name:make_node(mt,i.name,i.name),value:null})]}));return true}if(i instanceof ze||i instanceof Ve){n.push(i);return true}if(i instanceof re){return true}})}function get_value(e){if(e instanceof Lt){return e.getValue()}if(e instanceof $e&&e.operator=="void"&&e.expression instanceof Lt){return}return e}function is_undefined(e,t){return wn(e,Tn)||e instanceof Ht||e instanceof $e&&e.operator=="void"&&!e.expression.has_side_effects(t)}(function(e){U.DEFMETHOD("may_throw_on_access",function(e){return!e.option("pure_getters")||this._dot_throw(e)});function is_strict(e){return/strict/.test(e.option("pure_getters"))}e(U,is_strict);e(Gt,return_true);e(Ht,return_true);e(Lt,return_false);e(nt,return_false);e(it,function(e){if(!is_strict(e))return false;for(var t=this.properties.length;--t>=0;)if(this.properties[t]._dot_throw(e))return true;return false});e(ct,return_false);e(rt,return_false);e(st,return_true);e(oe,function(e){return this.expression._dot_throw(e)});e(ce,return_false);e(le,return_false);e(Ze,return_false);e($e,function(){return this.operator=="void"});e(Qe,function(e){return(this.operator=="&&"||this.operator=="||"||this.operator=="??")&&(this.left._dot_throw(e)||this.right._dot_throw(e))});e(et,function(e){if(this.logical)return true;return this.operator=="="&&this.right._dot_throw(e)});e(Je,function(e){return this.consequent._dot_throw(e)||this.alternative._dot_throw(e)});e(We,function(e){if(!is_strict(e))return false;if(this.expression instanceof ce&&this.property=="prototype")return false;return true});e(Ye,function(e){return this.expression._dot_throw(e)});e(Xe,function(e){return this.tail_node()._dot_throw(e)});e(Ot,function(e){if(this.name==="arguments")return false;if(wn(this,Tn))return true;if(!is_strict(e))return false;if(is_undeclared_ref(this)&&this.is_declared(e))return false;if(this.is_immutable())return false;var t=this.fixed_value();return!t||t._dot_throw(e)})})(function(e,t){e.DEFMETHOD("_dot_throw",t)});(function(e){const t=makePredicate("! delete");const n=makePredicate("in instanceof == != === !== < <= >= >");e(U,return_false);e($e,function(){return t.has(this.operator)});e(Qe,function(){return n.has(this.operator)||Ln.has(this.operator)&&this.left.is_boolean()&&this.right.is_boolean()});e(Je,function(){return this.consequent.is_boolean()&&this.alternative.is_boolean()});e(et,function(){return this.operator=="="&&this.right.is_boolean()});e(Xe,function(){return this.tail_node().is_boolean()});e($t,return_true);e(jt,return_true)})(function(e,t){e.DEFMETHOD("is_boolean",t)});(function(e){e(U,return_false);e(Vt,return_true);var t=makePredicate("+ - ~ ++ --");e(je,function(){return t.has(this.operator)});var n=makePredicate("- * / % & | ^ << >> >>>");e(Qe,function(e){return n.has(this.operator)||this.operator=="+"&&this.left.is_number(e)&&this.right.is_number(e)});e(et,function(e){return n.has(this.operator.slice(0,-1))||this.operator=="="&&this.right.is_number(e)});e(Xe,function(e){return this.tail_node().is_number(e)});e(Je,function(e){return this.consequent.is_number(e)&&this.alternative.is_number(e)})})(function(e,t){e.DEFMETHOD("is_number",t)});(function(e){e(U,return_false);e(Bt,return_true);e(he,return_true);e($e,function(){return this.operator=="typeof"});e(Qe,function(e){return this.operator=="+"&&(this.left.is_string(e)||this.right.is_string(e))});e(et,function(e){return(this.operator=="="||this.operator=="+=")&&this.right.is_string(e)});e(Xe,function(e){return this.tail_node().is_string(e)});e(Je,function(e){return this.consequent.is_string(e)&&this.alternative.is_string(e)})})(function(e,t){e.DEFMETHOD("is_string",t)});var Ln=makePredicate("&& || ??");var Bn=makePredicate("delete ++ --");function is_lhs(e,t){if(t instanceof je&&Bn.has(t.operator))return t.expression;if(t instanceof et&&t.left===e)return e}(function(e){function to_node(e,t){if(e instanceof U)return make_node(e.CTOR,t,e);if(Array.isArray(e))return make_node(nt,t,{elements:e.map(function(e){return to_node(e,t)})});if(e&&typeof e=="object"){var n=[];for(var i in e)if(HOP(e,i)){n.push(make_node(at,t,{key:i,value:to_node(e[i],t)}))}return make_node(it,t,{properties:n})}return make_node_from_constant(e,t)}ae.DEFMETHOD("resolve_defines",function(e){if(!e.option("global_defs"))return this;this.figure_out_scope({ie8:e.option("ie8")});return this.transform(new TreeTransformer(function(t){var n=t._find_defs(e,"");if(!n)return;var i=0,r=t,a;while(a=this.parent(i++)){if(!(a instanceof He))break;if(a.expression!==r)break;r=a}if(is_lhs(r,a)){return}return n}))});e(U,noop);e(Ye,function(e,t){return this.expression._find_defs(e,t)});e(We,function(e,t){return this.expression._find_defs(e,"."+this.property+t)});e(dt,function(){if(!this.global())return});e(Ot,function(e,t){if(!this.global())return;var n=e.option("global_defs");var i=this.name+t;if(HOP(n,i))return to_node(n[i],this)})})(function(e,t){e.DEFMETHOD("_find_defs",t)});function best_of_expression(e,t){return e.size()>t.size()?t:e}function best_of_statement(e,t){return best_of_expression(make_node(X,e,{body:e}),make_node(X,t,{body:t})).body}function best_of(e,t,n){return(first_in_statement(e)?best_of_statement:best_of_expression)(t,n)}function convert_to_predicate(e){const t=new Map;for(var n of Object.keys(e)){t.set(n,makePredicate(e[n]))}return t}var Vn=["constructor","toString","valueOf"];var Un=convert_to_predicate({Array:["indexOf","join","lastIndexOf","slice"].concat(Vn),Boolean:Vn,Function:Vn,Number:["toExponential","toFixed","toPrecision"].concat(Vn),Object:Vn,RegExp:["test"].concat(Vn),String:["charAt","charCodeAt","concat","indexOf","italics","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","trim"].concat(Vn)});var zn=convert_to_predicate({Array:["isArray"],Math:["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan","atan2","pow","max","min"],Number:["isFinite","isNaN"],Object:["create","getOwnPropertyDescriptor","getOwnPropertyNames","getPrototypeOf","isExtensible","isFrozen","isSealed","keys"],String:["fromCharCode"]});(function(e){U.DEFMETHOD("evaluate",function(e){if(!e.option("evaluate"))return this;var t=this._eval(e,1);if(!t||t instanceof RegExp)return t;if(typeof t=="function"||typeof t=="object")return this;return t});var t=makePredicate("! ~ - + void");U.DEFMETHOD("is_constant",function(){if(this instanceof Lt){return!(this instanceof zt)}else{return this instanceof $e&&this.expression instanceof Lt&&t.has(this.operator)}});e(z,function(){throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]",this.start))});e(se,return_this);e(ct,return_this);e(U,return_this);e(Lt,function(){return this.getValue()});e(Ut,return_this);e(zt,function(e){let t=e.evaluated_regexps.get(this);if(t===undefined){try{t=(0,eval)(this.print_to_string())}catch(e){t=null}e.evaluated_regexps.set(this,t)}return t||this});e(he,function(){if(this.segments.length!==1)return this;return this.segments[0].value});e(ce,function(e){if(e.option("unsafe")){var t=function(){};t.node=this;t.toString=function(){return this.node.print_to_string()};return t}return this});e(nt,function(e,t){if(e.option("unsafe")){var n=[];for(var i=0,r=this.elements.length;itypeof e==="object"||typeof e==="function"||typeof e==="symbol";e(Qe,function(e,t){if(!i.has(this.operator))t++;var n=this.left._eval(e,t);if(n===this.left)return this;var o=this.right._eval(e,t);if(o===this.right)return this;var s;if(n!=null&&o!=null&&r.has(this.operator)&&a(n)&&a(o)&&typeof n===typeof o){return this}switch(this.operator){case"&&":s=n&&o;break;case"||":s=n||o;break;case"??":s=n!=null?n:o;break;case"|":s=n|o;break;case"&":s=n&o;break;case"^":s=n^o;break;case"+":s=n+o;break;case"*":s=n*o;break;case"**":s=Math.pow(n,o);break;case"/":s=n/o;break;case"%":s=n%o;break;case"-":s=n-o;break;case"<<":s=n<>":s=n>>o;break;case">>>":s=n>>>o;break;case"==":s=n==o;break;case"===":s=n===o;break;case"!=":s=n!=o;break;case"!==":s=n!==o;break;case"<":s=n":s=n>o;break;case">=":s=n>=o;break;default:return this}if(isNaN(s)&&e.find_parent(ie)){return this}return s});e(Je,function(e,t){var n=this.condition._eval(e,t);if(n===this.condition)return this;var i=n?this.consequent:this.alternative;var r=i._eval(e,t);return r===i?this:r});const o=new Set;e(Ot,function(e,t){if(o.has(this))return this;var n=this.fixed_value();if(!n)return this;o.add(this);const i=n._eval(e,t);o.delete(this);if(i===n)return this;if(i&&typeof i=="object"){var r=this.definition().escaped;if(r&&t>r)return this}return i});var s={Array:Array,Math:Math,Number:Number,Object:Object,String:String};var u=convert_to_predicate({Math:["E","LN10","LN2","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],Number:["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"]});e(He,function(e,t){if(this.optional){const n=this.expression._eval(e,t);if(n==null)return undefined}if(e.option("unsafe")){var n=this.property;if(n instanceof U){n=n._eval(e,t);if(n===this.property)return this}var i=this.expression;var r;if(is_undeclared_ref(i)){var a;var o=i.name==="hasOwnProperty"&&n==="call"&&(a=e.parent()&&e.parent().args)&&(a&&a[0]&&a[0].evaluate(e));o=o instanceof We?o.expression:o;if(o==null||o.thedef&&o.thedef.undeclared){return this.clone()}var c=u.get(i.name);if(!c||!c.has(n))return this;r=s[i.name]}else{r=i._eval(e,t+1);if(!r||r===i||!HOP(r,n))return this;if(typeof r=="function")switch(n){case"name":return r.node.name?r.node.name.name:"";case"length":return r.node.argnames.length;default:return this}}return r[n]}return this});e(Ye,function(e,t){const n=this.expression._eval(e,t);return n===this.expression?this:n});e(Ke,function(e,t){var n=this.expression;if(this.optional){const n=this.expression._eval(e,t);if(n==null)return undefined}if(e.option("unsafe")&&n instanceof He){var i=n.property;if(i instanceof U){i=i._eval(e,t);if(i===n.property)return this}var r;var a=n.expression;if(is_undeclared_ref(a)){var o=a.name==="hasOwnProperty"&&i==="call"&&(this.args[0]&&this.args[0].evaluate(e));o=o instanceof We?o.expression:o;if(o==null||o.thedef&&o.thedef.undeclared){return this.clone()}var u=zn.get(a.name);if(!u||!u.has(i))return this;r=s[a.name]}else{r=a._eval(e,t+1);if(r===a||!r)return this;var c=Un.get(r.constructor.name);if(!c||!c.has(i))return this}var l=[];for(var f=0,p=this.args.length;f";return n;case"<":n.operator=">=";return n;case">=":n.operator="<";return n;case">":n.operator="<=";return n}}switch(i){case"==":n.operator="!=";return n;case"!=":n.operator="==";return n;case"===":n.operator="!==";return n;case"!==":n.operator="===";return n;case"&&":n.operator="||";n.left=n.left.negate(e,t);n.right=n.right.negate(e);return best(this,n,t);case"||":n.operator="&&";n.left=n.left.negate(e,t);n.right=n.right.negate(e);return best(this,n,t);case"??":n.right=n.right.negate(e);return best(this,n,t)}return basic_negation(this)})})(function(e,t){e.DEFMETHOD("negate",function(e,n){return t.call(this,e,n)})});var Kn=makePredicate("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError");Ke.DEFMETHOD("is_expr_pure",function(e){if(e.option("unsafe")){var t=this.expression;var n=this.args&&this.args[0]&&this.args[0].evaluate(e);if(t.expression&&t.expression.name==="hasOwnProperty"&&(n==null||n.thedef&&n.thedef.undeclared)){return false}if(is_undeclared_ref(t)&&Kn.has(t.name))return true;let i;if(t instanceof We&&is_undeclared_ref(t.expression)&&(i=zn.get(t.expression.name))&&i.has(t.property)){return true}}return!!has_annotation(this,Qt)||!e.pure_funcs(this)});U.DEFMETHOD("is_call_pure",return_false);We.DEFMETHOD("is_call_pure",function(e){if(!e.option("unsafe"))return;const t=this.expression;let n;if(t instanceof nt){n=Un.get("Array")}else if(t.is_boolean()){n=Un.get("Boolean")}else if(t.is_number(e)){n=Un.get("Number")}else if(t instanceof zt){n=Un.get("RegExp")}else if(t.is_string(e)){n=Un.get("String")}else if(!this.may_throw_on_access(e)){n=Un.get("Object")}return n&&n.has(this.property)});const Gn=new Set(["Number","String","Array","Object","Function","Promise"]);(function(e){e(U,return_true);e(q,return_false);e(Lt,return_false);e(It,return_false);function any(e,t){for(var n=e.length;--n>=0;)if(e[n].has_side_effects(t))return true;return false}e(H,function(e){return any(this.body,e)});e(Ke,function(e){if(!this.is_expr_pure(e)&&(!this.expression.is_call_pure(e)||this.expression.has_side_effects(e))){return true}return any(this.args,e)});e(Ae,function(e){return this.expression.has_side_effects(e)||any(this.body,e)});e(xe,function(e){return this.expression.has_side_effects(e)||any(this.body,e)});e(Fe,function(e){return any(this.body,e)||this.bcatch&&this.bcatch.has_side_effects(e)||this.bfinally&&this.bfinally.has_side_effects(e)});e(Te,function(e){return this.condition.has_side_effects(e)||this.body&&this.body.has_side_effects(e)||this.alternative&&this.alternative.has_side_effects(e)});e(j,function(e){return this.body.has_side_effects(e)});e(X,function(e){return this.body.has_side_effects(e)});e(se,return_false);e(ct,function(e){if(this.extends&&this.extends.has_side_effects(e)){return true}return any(this.properties,e)});e(Qe,function(e){return this.left.has_side_effects(e)||this.right.has_side_effects(e)});e(et,return_true);e(Je,function(e){return this.condition.has_side_effects(e)||this.consequent.has_side_effects(e)||this.alternative.has_side_effects(e)});e(je,function(e){return Bn.has(this.operator)||this.expression.has_side_effects(e)});e(Ot,function(e){return!this.is_declared(e)&&!Gn.has(this.name)});e(kt,return_false);e(dt,return_false);e(it,function(e){return any(this.properties,e)});e(rt,function(e){return this.computed_key()&&this.key.has_side_effects(e)||this.value.has_side_effects(e)});e(lt,function(e){return this.computed_key()&&this.key.has_side_effects(e)||this.static&&this.value&&this.value.has_side_effects(e)});e(ut,function(e){return this.computed_key()&&this.key.has_side_effects(e)});e(st,function(e){return this.computed_key()&&this.key.has_side_effects(e)});e(ot,function(e){return this.computed_key()&&this.key.has_side_effects(e)});e(nt,function(e){return any(this.elements,e)});e(We,function(e){return!this.optional&&this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)});e(qe,function(e){if(this.optional&&is_nullish(this.expression)){return false}return!this.optional&&this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)||this.property.has_side_effects(e)});e(Ye,function(e){return this.expression.has_side_effects(e)});e(Xe,function(e){return any(this.expressions,e)});e(Me,function(e){return any(this.definitions,e)});e(Le,function(){return this.value});e(de,return_false);e(he,function(e){return any(this.segments,e)})})(function(e,t){e.DEFMETHOD("has_side_effects",t)});(function(e){e(U,return_true);e(Lt,return_false);e(q,return_false);e(se,return_false);e(dt,return_false);e(It,return_false);function any(e,t){for(var n=e.length;--n>=0;)if(e[n].may_throw(t))return true;return false}e(ct,function(e){if(this.extends&&this.extends.may_throw(e))return true;return any(this.properties,e)});e(nt,function(e){return any(this.elements,e)});e(et,function(e){if(this.right.may_throw(e))return true;if(!e.has_directive("use strict")&&this.operator=="="&&this.left instanceof Ot){return false}return this.left.may_throw(e)});e(Qe,function(e){return this.left.may_throw(e)||this.right.may_throw(e)});e(H,function(e){return any(this.body,e)});e(Ke,function(e){if(this.optional&&is_nullish(this.expression))return false;if(any(this.args,e))return true;if(this.is_expr_pure(e))return false;if(this.expression.may_throw(e))return true;return!(this.expression instanceof se)||any(this.expression.body,e)});e(xe,function(e){return this.expression.may_throw(e)||any(this.body,e)});e(Je,function(e){return this.condition.may_throw(e)||this.consequent.may_throw(e)||this.alternative.may_throw(e)});e(Me,function(e){return any(this.definitions,e)});e(Te,function(e){return this.condition.may_throw(e)||this.body&&this.body.may_throw(e)||this.alternative&&this.alternative.may_throw(e)});e(j,function(e){return this.body.may_throw(e)});e(it,function(e){return any(this.properties,e)});e(rt,function(e){return this.value.may_throw(e)});e(lt,function(e){return this.computed_key()&&this.key.may_throw(e)||this.static&&this.value&&this.value.may_throw(e)});e(ut,function(e){return this.computed_key()&&this.key.may_throw(e)});e(st,function(e){return this.computed_key()&&this.key.may_throw(e)});e(ot,function(e){return this.computed_key()&&this.key.may_throw(e)});e(ge,function(e){return this.value&&this.value.may_throw(e)});e(Xe,function(e){return any(this.expressions,e)});e(X,function(e){return this.body.may_throw(e)});e(We,function(e){return!this.optional&&this.expression.may_throw_on_access(e)||this.expression.may_throw(e)});e(qe,function(e){if(this.optional&&is_nullish(this.expression))return false;return!this.optional&&this.expression.may_throw_on_access(e)||this.expression.may_throw(e)||this.property.may_throw(e)});e(Ye,function(e){return this.expression.may_throw(e)});e(Ae,function(e){return this.expression.may_throw(e)||any(this.body,e)});e(Ot,function(e){return!this.is_declared(e)&&!Gn.has(this.name)});e(kt,return_false);e(Fe,function(e){return this.bcatch?this.bcatch.may_throw(e):any(this.body,e)||this.bfinally&&this.bfinally.may_throw(e)});e(je,function(e){if(this.operator=="typeof"&&this.expression instanceof Ot)return false;return this.expression.may_throw(e)});e(Le,function(e){if(!this.value)return false;return this.value.may_throw(e)})})(function(e,t){e.DEFMETHOD("may_throw",t)});(function(e){function all_refs_local(e){let t=true;walk(this,n=>{if(n instanceof Ot){if(wn(this,An)){t=false;return Zt}var i=n.definition();if(member(i,this.enclosed)&&!this.variables.has(i.name)){if(e){var r=e.find_variable(n);if(i.undeclared?!r:r===i){t="f";return true}}t=false;return Zt}return true}if(n instanceof It&&this instanceof le){t=false;return Zt}});return t}e(U,return_false);e(Lt,return_true);e(ct,function(e){if(this.extends&&!this.extends.is_constant_expression(e)){return false}for(const t of this.properties){if(t.computed_key()&&!t.key.is_constant_expression(e)){return false}if(t.static&&t.value&&!t.value.is_constant_expression(e)){return false}}return all_refs_local.call(this,e)});e(se,all_refs_local);e(je,function(){return this.expression.is_constant_expression()});e(Qe,function(){return this.left.is_constant_expression()&&this.right.is_constant_expression()});e(nt,function(){return this.elements.every(e=>e.is_constant_expression())});e(it,function(){return this.properties.every(e=>e.is_constant_expression())});e(rt,function(){return!(this.key instanceof U)&&this.value.is_constant_expression()})})(function(e,t){e.DEFMETHOD("is_constant_expression",t)});function aborts(e){return e&&e.aborts()}(function(e){e(z,return_null);e(me,return_this);function block_aborts(){for(var e=0;e{if(e instanceof dt){const n=e.definition();if((t||n.global)&&!o.has(n.id)){o.set(n.id,n)}}})}if(n.value){if(n.name instanceof pe){n.walk(f)}else{var i=n.name.definition();map_add(c,i.id,n.value);if(!i.chained&&n.name.fixed_value()===n.value){s.set(i.id,n)}}if(n.value.has_side_effects(e)){n.value.walk(f)}}});return true}return scan_ref_scoped(i,a)});t.walk(f);f=new TreeWalker(scan_ref_scoped);o.forEach(function(e){var t=c.get(e.id);if(t)t.forEach(function(e){e.walk(f)})});var p=new TreeTransformer(function before(c,f,_){var h=p.parent();if(r){const e=a(c);if(e instanceof Ot){var d=e.definition();var m=o.has(d.id);if(c instanceof et){if(!m||s.has(d.id)&&s.get(d.id)!==c){return maintain_this_binding(h,c,c.right.transform(p))}}else if(!m)return _?i.skip:make_node(Vt,c,{value:0})}}if(l!==t)return;var d;if(c.name&&(c instanceof pt&&!keep_name(e.option("keep_classnames"),(d=c.name.definition()).name)||c instanceof ce&&!keep_name(e.option("keep_fnames"),(d=c.name.definition()).name))){if(!o.has(d.id)||d.orig.length>1)c.name=null}if(c instanceof se&&!(c instanceof ue)){var E=!e.option("keep_fargs");for(var g=c.argnames,v=g.length;--v>=0;){var D=g[v];if(D instanceof oe){D=D.expression}if(D instanceof tt){D=D.left}if(!(D instanceof pe)&&!o.has(D.definition().id)){Mn(D,yn);if(E){g.pop()}}else{E=false}}}if((c instanceof fe||c instanceof ft)&&c!==t){const t=c.name.definition();let r=t.global&&!n||o.has(t.id);if(!r){t.eliminated++;if(c instanceof ft){const t=c.drop_side_effect_free(e);if(t){return make_node(X,c,{body:t})}}return _?i.skip:make_node(q,c)}}if(c instanceof Me&&!(h instanceof te&&h.init===c)){var b=!(h instanceof ae)&&!(c instanceof Ne);var y=[],k=[],S=[];var T=[];c.definitions.forEach(function(t){if(t.value)t.value=t.value.transform(p);var n=t.name instanceof pe;var i=n?new SymbolDef(null,{name:""}):t.name.definition();if(b&&i.global)return S.push(t);if(!(r||b)||n&&(t.name.names.length||t.name.is_array||e.option("pure_getters")!=true)||o.has(i.id)){if(t.value&&s.has(i.id)&&s.get(i.id)!==t){t.value=t.value.drop_side_effect_free(e)}if(t.name instanceof mt){var a=u.get(i.id);if(a.length>1&&(!t.value||i.orig.indexOf(t.name)>i.eliminated)){if(t.value){var l=make_node(Ot,t.name,t.name);i.references.push(l);var f=make_node(et,t,{operator:"=",logical:false,left:l,right:t.value});if(s.get(i.id)===t){s.set(i.id,f)}T.push(f.transform(p))}remove(a,t);i.eliminated++;return}}if(t.value){if(T.length>0){if(S.length>0){T.push(t.value);t.value=make_sequence(t.value,T)}else{y.push(make_node(X,c,{body:make_sequence(c,T)}))}T=[]}S.push(t)}else{k.push(t)}}else if(i.orig[0]instanceof Ct){var _=t.value&&t.value.drop_side_effect_free(e);if(_)T.push(_);t.value=null;k.push(t)}else{var _=t.value&&t.value.drop_side_effect_free(e);if(_){T.push(_)}i.eliminated++}});if(k.length>0||S.length>0){c.definitions=k.concat(S);y.push(c)}if(T.length>0){y.push(make_node(X,c,{body:make_sequence(c,T)}))}switch(y.length){case 0:return _?i.skip:make_node(q,c);case 1:return y[0];default:return _?i.splice(y):make_node(W,c,{body:y})}}if(c instanceof ee){f(c,this);var A;if(c.init instanceof W){A=c.init;c.init=A.body.pop();A.body.push(c)}if(c.init instanceof X){c.init=c.init.body}else if(is_empty(c.init)){c.init=null}return!A?c:_?i.splice(A.body):A}if(c instanceof j&&c.body instanceof ee){f(c,this);if(c.body instanceof W){var A=c.body;c.body=A.body.pop();A.body.push(c);return _?i.splice(A.body):A}return c}if(c instanceof W){f(c,this);if(_&&c.body.every(can_be_evicted_from_block)){return i.splice(c.body)}return c}if(c instanceof re){const e=l;l=c;f(c,this);l=e;return c}});t.transform(p);function scan_ref_scoped(e,n){var i;const r=a(e);if(r instanceof Ot&&!is_ref_of(e.left,Et)&&t.variables.get(r.name)===(i=r.definition())){if(e instanceof et){e.right.walk(f);if(!i.chained&&e.left.fixed_value()===e.right){s.set(i.id,e)}}return true}if(e instanceof Ot){i=e.definition();if(!o.has(i.id)){o.set(i.id,i);if(i.orig[0]instanceof Ct){const e=i.scope.is_block_scope()&&i.scope.get_defun_scope().variables.get(i.name);if(e)o.set(e.id,e)}}return true}if(e instanceof re){var u=l;l=e;n();l=u;return true}}});re.DEFMETHOD("hoist_declarations",function(e){var t=this;if(e.has_directive("use asm"))return t;if(!Array.isArray(t.body))return t;var n=e.option("hoist_funs");var i=e.option("hoist_vars");if(n||i){var r=[];var a=[];var o=new Map,s=0,u=0;walk(t,e=>{if(e instanceof re&&e!==t)return true;if(e instanceof Ne){++u;return true}});i=i&&u>1;var c=new TreeTransformer(function before(u){if(u!==t){if(u instanceof G){r.push(u);return make_node(q,u)}if(n&&u instanceof fe&&!(c.parent()instanceof ze)&&c.parent()===t){a.push(u);return make_node(q,u)}if(i&&u instanceof Ne&&!u.definitions.some(e=>e.name instanceof pe)){u.definitions.forEach(function(e){o.set(e.name.name,e);++s});var l=u.to_assignments(e);var f=c.parent();if(f instanceof te&&f.init===u){if(l==null){var p=u.definitions[0].name;return make_node(Ot,p,p)}return l}if(f instanceof ee&&f.init===u){return l}if(!l)return make_node(q,u);return make_node(X,u,{body:l})}if(u instanceof re)return u}});t=t.transform(c);if(s>0){var l=[];const e=t instanceof se;const n=e?t.args_as_names():null;o.forEach((t,i)=>{if(e&&n.some(e=>e.name===t.name.name)){o.delete(i)}else{t=t.clone();t.value=null;l.push(t);o.set(i,t)}});if(l.length>0){for(var f=0;fe instanceof oe||e.computed_key())){s(o,this);const e=new Map;const n=[];l.properties.forEach(({key:i,value:r})=>{const s=find_scope(a);const c=t.create_symbol(u.CTOR,{source:u,scope:s,conflict_scopes:new Set([s,...u.definition().references.map(e=>e.scope)]),tentative_name:u.name+"_"+i});e.set(String(i),c.definition());n.push(make_node(Le,o,{name:c,value:r}))});r.set(c.id,e);return i.splice(n)}}else if(o instanceof He&&o.expression instanceof Ot){const e=r.get(o.expression.definition().id);if(e){const t=e.get(String(get_value(o.property)));const n=make_node(Ot,o,{name:t.name,scope:o.expression.scope,thedef:t});n.reference({});return n}}});return t.transform(a)});(function(e){function trim(e,t,n){var i=e.length;if(!i)return null;var r=[],a=false;for(var o=0;o0){o[0].body=a.concat(o[0].body)}e.body=o;while(n=o[o.length-1]){var h=n.body[n.body.length-1];if(h instanceof be&&t.loopcontrol_target(h)===e)n.body.pop();if(n.body.length||n instanceof xe&&(s||n.expression.has_side_effects(t)))break;if(o.pop()===s)s=null}if(o.length==0){return make_node(W,e,{body:a.concat(make_node(X,e.expression,{body:e.expression}))}).optimize(t)}if(o.length==1&&(o[0]===u||o[0]===s)){var d=false;var m=new TreeWalker(function(t){if(d||t instanceof se||t instanceof X)return true;if(t instanceof be&&m.loopcontrol_target(t)===e)d=true});e.walk(m);if(!d){var E=o[0].body.slice();var f=o[0].expression;if(f)E.unshift(make_node(X,f,{body:f}));E.unshift(make_node(X,e.expression,{body:e.expression}));return make_node(W,e,{body:E}).optimize(t)}}return e;function eliminate_branch(e,n){if(n&&!aborts(n)){n.body=n.body.concat(e.body)}else{trim_unreachable_code(t,e,a)}}});def_optimize(Fe,function(e,t){tighten_body(e.body,t);if(e.bcatch&&e.bfinally&&e.bfinally.body.every(is_empty))e.bfinally=null;if(t.option("dead_code")&&e.body.every(is_empty)){var n=[];if(e.bcatch){trim_unreachable_code(t,e.bcatch,n)}if(e.bfinally)n.push(...e.bfinally.body);return make_node(W,e,{body:n}).optimize(t)}return e});Me.DEFMETHOD("remove_initializers",function(){var e=[];this.definitions.forEach(function(t){if(t.name instanceof dt){t.value=null;e.push(t)}else{walk(t.name,n=>{if(n instanceof dt){e.push(make_node(Le,t,{name:n,value:null}))}})}});this.definitions=e});Me.DEFMETHOD("to_assignments",function(e){var t=e.option("reduce_vars");var n=[];for(const e of this.definitions){if(e.value){var i=make_node(Ot,e.name,e.name);n.push(make_node(et,e,{operator:"=",logical:false,left:i,right:e.value}));if(t)i.definition().fixed=false}else if(e.value){var r=make_node(Le,e,{name:e.name,value:e.value});var a=make_node(Ne,e,{definitions:[r]});n.push(a)}const o=e.name.definition();o.eliminated++;o.replaced--}if(n.length==0)return null;return make_sequence(this,n)});def_optimize(Me,function(e){if(e.definitions.length==0)return make_node(q,e);return e});def_optimize(Le,function(e){if(e.name instanceof vt&&e.value!=null&&is_undefined(e.value)){e.value=null}return e});def_optimize(Ve,function(e){return e});function retain_top_func(e,t){return t.top_retain&&e instanceof fe&&wn(e,Fn)&&e.name&&t.top_retain(e.name)}def_optimize(Ke,function(e,t){var n=e.expression;var i=n;inline_array_like_spread(e.args);var r=e.args.every(e=>!(e instanceof oe));if(t.option("reduce_vars")&&i instanceof Ot&&!has_annotation(e,en)){const e=i.fixed_value();if(!retain_top_func(e,t)){i=e}}if(e.optional&&is_nullish(i)){return make_node(Ht,e)}var a=i instanceof se;if(a&&i.pinned())return e;if(t.option("unused")&&r&&a&&!i.uses_arguments){var o=0,s=0;for(var u=0,c=e.args.length;u=i.argnames.length;if(f||wn(i.argnames[u],yn)){var l=e.args[u].drop_side_effect_free(t);if(l){e.args[o++]=l}else if(!f){e.args[o++]=make_node(Vt,e.args[u],{value:0});continue}}else{e.args[o++]=e.args[u]}s=o}e.args.length=s}if(t.option("unsafe")){if(is_undeclared_ref(n))switch(n.name){case"Array":if(e.args.length!=1){return make_node(nt,e,{elements:e.args}).optimize(t)}else if(e.args[0]instanceof Vt&&e.args[0].value<=11){const t=[];for(let n=0;n=1&&e.args.length<=2&&e.args.every(e=>{var n=e.evaluate(t);p.push(n);return e!==n})){let[n,i]=p;n=regexp_source_fix(new RegExp(n).source);const r=make_node(zt,e,{value:{source:n,flags:i}});if(r._eval(t)!==r){return r}}break}else if(n instanceof We)switch(n.property){case"toString":if(e.args.length==0&&!n.expression.may_throw_on_access(t)){return make_node(Qe,e,{left:make_node(Bt,e,{value:""}),operator:"+",right:n.expression}).optimize(t)}break;case"join":if(n.expression instanceof nt)e:{var _;if(e.args.length>0){_=e.args[0].evaluate(t);if(_===e.args[0])break e}var h=[];var d=[];for(var u=0,c=n.expression.elements.length;u0){h.push(make_node(Bt,e,{value:d.join(_)}));d.length=0}h.push(m)}}if(d.length>0){h.push(make_node(Bt,e,{value:d.join(_)}))}if(h.length==0)return make_node(Bt,e,{value:""});if(h.length==1){if(h[0].is_string(t)){return h[0]}return make_node(Qe,h[0],{operator:"+",left:make_node(Bt,e,{value:""}),right:h[0]})}if(_==""){var g;if(h[0].is_string(t)||h[1].is_string(t)){g=h.shift()}else{g=make_node(Bt,e,{value:""})}return h.reduce(function(e,t){return make_node(Qe,t,{operator:"+",left:e,right:t})},g).optimize(t)}var l=e.clone();l.expression=l.expression.clone();l.expression.expression=l.expression.expression.clone();l.expression.expression.elements=h;return best_of(t,e,l)}break;case"charAt":if(n.expression.is_string(t)){var v=e.args[0];var D=v?v.evaluate(t):0;if(D!==v){return make_node(qe,n,{expression:n.expression,property:make_node_from_constant(D|0,v||n)}).optimize(t)}}break;case"apply":if(e.args.length==2&&e.args[1]instanceof nt){var b=e.args[1].elements.slice();b.unshift(e.args[0]);return make_node(Ke,e,{expression:make_node(We,n,{expression:n.expression,optional:false,property:"call"}),args:b}).optimize(t)}break;case"call":var y=n.expression;if(y instanceof Ot){y=y.fixed_value()}if(y instanceof se&&!y.contains_this()){return(e.args.length?make_sequence(this,[e.args[0],make_node(Ke,e,{expression:n.expression,args:e.args.slice(1)})]):make_node(Ke,e,{expression:n.expression,args:[]})).optimize(t)}break}}if(t.option("unsafe_Function")&&is_undeclared_ref(n)&&n.name=="Function"){if(e.args.length==0)return make_node(ce,e,{argnames:[],body:[]}).optimize(t);if(e.args.every(e=>e instanceof Bt)){try{var k="n(function("+e.args.slice(0,-1).map(function(e){return e.value}).join(",")+"){"+e.args[e.args.length-1].value+"})";var S=parse(k);var T={ie8:t.option("ie8")};S.figure_out_scope(T);var A=new Compressor(t.options,{mangle_options:t.mangle_options});S=S.transform(A);S.figure_out_scope(T);dn.reset();S.compute_char_frequency(T);S.mangle_names(T);var C;walk(S,e=>{if(is_func_expr(e)){C=e;return Zt}});var k=OutputStream();W.prototype._codegen.call(C,C,k);e.args=[make_node(Bt,e,{value:C.argnames.map(function(e){return e.print_to_string()}).join(",")}),make_node(Bt,e.args[e.args.length-1],{value:k.get().replace(/^{|}$/g,"")})];return e}catch(e){if(!(e instanceof JS_Parse_Error)){throw e}}}}var R=a&&i.body[0];var x=a&&!i.is_generator&&!i.async;var F=x&&t.option("inline")&&!e.is_expr_pure(t);if(F&&R instanceof ge){let n=R.value;if(!n||n.is_constant_expression()){if(n){n=n.clone(true)}else{n=make_node(Ht,e)}const i=e.args.concat(n);return make_sequence(e,i).optimize(t)}if(i.argnames.length===1&&i.argnames[0]instanceof Dt&&e.args.length<2&&n instanceof Ot&&n.name===i.argnames[0].name){const n=(e.args[0]||make_node(Ht)).optimize(t);let i;if(n instanceof He&&(i=t.parent())instanceof Ke&&i.expression===e){return make_sequence(e,[make_node(Vt,e,{value:0}),n])}return n}}if(F){var O,w,M=-1;let a;let o;let s;if(r&&!i.uses_arguments&&!(t.parent()instanceof ct)&&!(i.name&&i instanceof ce)&&(o=can_flatten_body(R))&&(n===i||has_annotation(e,Jt)||t.option("unused")&&(a=n.definition()).references.length==1&&!recursive_ref(t,a)&&i.is_constant_expression(n.scope))&&!has_annotation(e,Qt|en)&&!i.contains_this()&&can_inject_symbols()&&(s=find_scope(t))&&!scope_encloses_variables_in_this_scope(s,i)&&!function in_default_assign(){let e=0;let n;while(n=t.parent(e++)){if(n instanceof tt)return true;if(n instanceof H)break}return false}()&&!(O instanceof ct)){Mn(i,Rn);s.add_child_scope(i);return make_sequence(e,flatten_fn(o)).optimize(t)}}if(F&&has_annotation(e,Jt)){Mn(i,Rn);i=make_node(i.CTOR===fe?ce:i.CTOR,i,i);i.figure_out_scope({},{parent_scope:find_scope(t),toplevel:t.get_toplevel()});return make_node(Ke,e,{expression:i,args:e.args}).optimize(t)}const N=x&&t.option("side_effects")&&i.body.every(is_empty);if(N){var b=e.args.concat(make_node(Ht,e));return make_sequence(e,b).optimize(t)}if(t.option("negate_iife")&&t.parent()instanceof X&&is_iife_call(e)){return e.negate(t,true)}var I=e.evaluate(t);if(I!==e){I=make_node_from_constant(I,e).optimize(t);return best_of(t,I,e)}return e;function return_value(t){if(!t)return make_node(Ht,e);if(t instanceof ge){if(!t.value)return make_node(Ht,e);return t.value.clone(true)}if(t instanceof X){return make_node($e,t,{operator:"void",expression:t.body.clone(true)})}}function can_flatten_body(e){var n=i.body;var r=n.length;if(t.option("inline")<3){return r==1&&return_value(e)}e=null;for(var a=0;a!e.value)){return false}}else if(e){return false}else if(!(o instanceof q)){e=o}}return return_value(e)}function can_inject_args(e,t){for(var n=0,r=i.argnames.length;n=0;){var s=a.definitions[o].name;if(s instanceof pe||e.has(s.name)||Pn.has(s.name)||O.conflicting_def(s.name)){return false}if(w)w.push(s.definition())}}return true}function can_inject_symbols(){var e=new Set;do{O=t.parent(++M);if(O.is_block_scope()&&O.block_scope){O.block_scope.variables.forEach(function(t){e.add(t.name)})}if(O instanceof Oe){if(O.argname){e.add(O.argname.name)}}else if(O instanceof $){w=[]}else if(O instanceof Ot){if(O.fixed_value()instanceof re)return false}}while(!(O instanceof re));var n=!(O instanceof ae)||t.toplevel.vars;var r=t.option("inline");if(!can_inject_vars(e,r>=3&&n))return false;if(!can_inject_args(e,r>=2&&n))return false;return!w||w.length==0||!is_reachable(i,w)}function append_var(t,n,i,r){var a=i.definition();const o=O.variables.has(i.name);if(!o){O.variables.set(i.name,a);O.enclosed.push(a);t.push(make_node(Le,i,{name:i,value:null}))}var s=make_node(Ot,i,i);a.references.push(s);if(r)n.push(make_node(et,e,{operator:"=",logical:false,left:s,right:r.clone()}))}function flatten_args(t,n){var r=i.argnames.length;for(var a=e.args.length;--a>=r;){n.push(e.args[a])}for(a=r;--a>=0;){var o=i.argnames[a];var s=e.args[a];if(wn(o,yn)||!o.name||O.conflicting_def(o.name)){if(s)n.push(s)}else{var u=make_node(mt,o,o);o.definition().orig.push(u);if(!s&&w)s=make_node(Ht,e);append_var(t,n,u,s)}}t.reverse();n.reverse()}function flatten_vars(e,t){var n=t.length;for(var r=0,a=i.body.length;re.name!=l.name)){var f=i.variables.get(l.name);var p=make_node(Ot,l,l);f.references.push(p);t.splice(n++,0,make_node(et,c,{operator:"=",logical:false,left:p,right:make_node(Ht,l)}))}}}}function flatten_fn(e){var n=[];var r=[];flatten_args(n,r);flatten_vars(n,r);r.push(e);if(n.length){const e=O.body.indexOf(t.parent(M-1))+1;O.body.splice(e,0,make_node(Ne,i,{definitions:n}))}return r.map(e=>e.clone(true))}});def_optimize(Ge,function(e,t){if(t.option("unsafe")&&is_undeclared_ref(e.expression)&&["Object","RegExp","Function","Error","Array"].includes(e.expression.name))return make_node(Ke,e,e).transform(t);return e});def_optimize(Xe,function(e,t){if(!t.option("side_effects"))return e;var n=[];filter_for_side_effects();var i=n.length-1;trim_right_for_undefined();if(i==0){e=maintain_this_binding(t.parent(),t.self(),n[0]);if(!(e instanceof Xe))e=e.optimize(t);return e}e.expressions=n;return e;function filter_for_side_effects(){var i=first_in_statement(t);var r=e.expressions.length-1;e.expressions.forEach(function(e,a){if(a0&&is_undefined(n[i],t))i--;if(i0){var n=this.clone();n.right=make_sequence(this.right,t.slice(a));t=t.slice(0,a);t.push(n);return make_sequence(this,t).optimize(e)}}}return this});var Wn=makePredicate("== === != !== * & | ^");function is_object(e){return e instanceof nt||e instanceof se||e instanceof it||e instanceof ct}def_optimize(Qe,function(e,t){function reversible(){return e.left.is_constant()||e.right.is_constant()||!e.left.has_side_effects(t)&&!e.right.has_side_effects(t)}function reverse(t){if(reversible()){if(t)e.operator=t;var n=e.left;e.left=e.right;e.right=n}}if(Wn.has(e.operator)){if(e.right.is_constant()&&!e.left.is_constant()){if(!(e.left instanceof Qe&&M[e.left.operator]>=M[e.operator])){reverse()}}}e=e.lift_sequences(t);if(t.option("comparisons"))switch(e.operator){case"===":case"!==":var n=true;if(e.left.is_string(t)&&e.right.is_string(t)||e.left.is_number(t)&&e.right.is_number(t)||e.left.is_boolean()&&e.right.is_boolean()||e.left.equivalent_to(e.right)){e.operator=e.operator.substr(0,2)}case"==":case"!=":if(!n&&is_undefined(e.left,t)){e.left=make_node(Gt,e.left)}else if(t.option("typeofs")&&e.left instanceof Bt&&e.left.value=="undefined"&&e.right instanceof $e&&e.right.operator=="typeof"){var i=e.right.expression;if(i instanceof Ot?i.is_declared(t):!(i instanceof He&&t.option("ie8"))){e.right=i;e.left=make_node(Ht,e.left).optimize(t);if(e.operator.length==2)e.operator+="="}}else if(e.left instanceof Ot&&e.right instanceof Ot&&e.left.definition()===e.right.definition()&&is_object(e.left.fixed_value())){return make_node(e.operator[0]=="="?$t:jt,e)}break;case"&&":case"||":var r=e.left;if(r.operator==e.operator){r=r.right}if(r instanceof Qe&&r.operator==(e.operator=="&&"?"!==":"===")&&e.right instanceof Qe&&r.operator==e.right.operator&&(is_undefined(r.left,t)&&e.right.left instanceof Gt||r.left instanceof Gt&&is_undefined(e.right.left,t))&&!r.right.has_side_effects(t)&&r.right.equivalent_to(e.right.right)){var a=make_node(Qe,e,{operator:r.operator.slice(0,-1),left:make_node(Gt,e),right:r.right});if(r!==e.left){a=make_node(Qe,e,{operator:e.operator,left:e.left.left,right:a})}return a}break}if(e.operator=="+"&&t.in_boolean_context()){var o=e.left.evaluate(t);var s=e.right.evaluate(t);if(o&&typeof o=="string"){return make_sequence(e,[e.right,make_node($t,e)]).optimize(t)}if(s&&typeof s=="string"){return make_sequence(e,[e.left,make_node($t,e)]).optimize(t)}}if(t.option("comparisons")&&e.is_boolean()){if(!(t.parent()instanceof Qe)||t.parent()instanceof et){var u=make_node($e,e,{operator:"!",expression:e.negate(t,first_in_statement(t))});e=best_of(t,e,u)}if(t.option("unsafe_comps")){switch(e.operator){case"<":reverse(">");break;case"<=":reverse(">=");break}}}if(e.operator=="+"){if(e.right instanceof Bt&&e.right.getValue()==""&&e.left.is_string(t)){return e.left}if(e.left instanceof Bt&&e.left.getValue()==""&&e.right.is_string(t)){return e.right}if(e.left instanceof Qe&&e.left.operator=="+"&&e.left.left instanceof Bt&&e.left.left.getValue()==""&&e.right.is_string(t)){e.left=e.left.right;return e}}if(t.option("evaluate")){switch(e.operator){case"&&":var o=wn(e.left,kn)?true:wn(e.left,Sn)?false:e.left.evaluate(t);if(!o){return maintain_this_binding(t.parent(),t.self(),e.left).optimize(t)}else if(!(o instanceof U)){return make_sequence(e,[e.left,e.right]).optimize(t)}var s=e.right.evaluate(t);if(!s){if(t.in_boolean_context()){return make_sequence(e,[e.left,make_node(jt,e)]).optimize(t)}else{Mn(e,Sn)}}else if(!(s instanceof U)){var c=t.parent();if(c.operator=="&&"&&c.left===t.self()||t.in_boolean_context()){return e.left.optimize(t)}}if(e.left.operator=="||"){var l=e.left.right.evaluate(t);if(!l)return make_node(Je,e,{condition:e.left.left,consequent:e.right,alternative:e.left.right}).optimize(t)}break;case"||":var o=wn(e.left,kn)?true:wn(e.left,Sn)?false:e.left.evaluate(t);if(!o){return make_sequence(e,[e.left,e.right]).optimize(t)}else if(!(o instanceof U)){return maintain_this_binding(t.parent(),t.self(),e.left).optimize(t)}var s=e.right.evaluate(t);if(!s){var c=t.parent();if(c.operator=="||"&&c.left===t.self()||t.in_boolean_context()){return e.left.optimize(t)}}else if(!(s instanceof U)){if(t.in_boolean_context()){return make_sequence(e,[e.left,make_node($t,e)]).optimize(t)}else{Mn(e,kn)}}if(e.left.operator=="&&"){var l=e.left.right.evaluate(t);if(l&&!(l instanceof U))return make_node(Je,e,{condition:e.left.left,consequent:e.left.right,alternative:e.right}).optimize(t)}break;case"??":if(is_nullish(e.left)){return e.right}var o=e.left.evaluate(t);if(!(o instanceof U)){return o==null?e.right:e.left}if(t.in_boolean_context()){const n=e.right.evaluate(t);if(!(n instanceof U)&&!n){return e.left}}}var f=true;switch(e.operator){case"+":if(e.right instanceof Lt&&e.left instanceof Qe&&e.left.operator=="+"&&e.left.is_string(t)){var p=make_node(Qe,e,{operator:"+",left:e.left.right,right:e.right});var _=p.optimize(t);if(p!==_){e=make_node(Qe,e,{operator:"+",left:e.left.left,right:_})}}if(e.left instanceof Qe&&e.left.operator=="+"&&e.left.is_string(t)&&e.right instanceof Qe&&e.right.operator=="+"&&e.right.is_string(t)){var p=make_node(Qe,e,{operator:"+",left:e.left.right,right:e.right.left});var h=p.optimize(t);if(p!==h){e=make_node(Qe,e,{operator:"+",left:make_node(Qe,e.left,{operator:"+",left:e.left.left,right:h}),right:e.right.right})}}if(e.right instanceof $e&&e.right.operator=="-"&&e.left.is_number(t)){e=make_node(Qe,e,{operator:"-",left:e.left,right:e.right.expression});break}if(e.left instanceof $e&&e.left.operator=="-"&&reversible()&&e.right.is_number(t)){e=make_node(Qe,e,{operator:"-",left:e.right,right:e.left.expression});break}if(e.left instanceof he){var d=e.left;var _=e.right.evaluate(t);if(_!=e.right){d.segments[d.segments.length-1].value+=String(_);return d}}if(e.right instanceof he){var _=e.right;var d=e.left.evaluate(t);if(d!=e.left){_.segments[0].value=String(d)+_.segments[0].value;return _}}if(e.left instanceof he&&e.right instanceof he){var d=e.left;var m=d.segments;var _=e.right;m[m.length-1].value+=_.segments[0].value;for(var E=1;E<_.segments.length;E++){m.push(_.segments[E])}return d}case"*":f=t.option("unsafe_math");case"&":case"|":case"^":if(e.left.is_number(t)&&e.right.is_number(t)&&reversible()&&!(e.left instanceof Qe&&e.left.operator!=e.operator&&M[e.left.operator]>=M[e.operator])){var g=make_node(Qe,e,{operator:e.operator,left:e.right,right:e.left});if(e.right instanceof Lt&&!(e.left instanceof Lt)){e=best_of(t,g,e)}else{e=best_of(t,e,g)}}if(f&&e.is_number(t)){if(e.right instanceof Qe&&e.right.operator==e.operator){e=make_node(Qe,e,{operator:e.operator,left:make_node(Qe,e.left,{operator:e.operator,left:e.left,right:e.right.left,start:e.left.start,end:e.right.left.end}),right:e.right.right})}if(e.right instanceof Lt&&e.left instanceof Qe&&e.left.operator==e.operator){if(e.left.left instanceof Lt){e=make_node(Qe,e,{operator:e.operator,left:make_node(Qe,e.left,{operator:e.operator,left:e.left.left,right:e.right,start:e.left.left.start,end:e.right.end}),right:e.left.right})}else if(e.left.right instanceof Lt){e=make_node(Qe,e,{operator:e.operator,left:make_node(Qe,e.left,{operator:e.operator,left:e.left.right,right:e.right,start:e.left.right.start,end:e.right.end}),right:e.left.left})}}if(e.left instanceof Qe&&e.left.operator==e.operator&&e.left.right instanceof Lt&&e.right instanceof Qe&&e.right.operator==e.operator&&e.right.left instanceof Lt){e=make_node(Qe,e,{operator:e.operator,left:make_node(Qe,e.left,{operator:e.operator,left:make_node(Qe,e.left.left,{operator:e.operator,left:e.left.right,right:e.right.left,start:e.left.right.start,end:e.right.left.end}),right:e.left.left}),right:e.right.right})}}}}if(e.right instanceof Qe&&e.right.operator==e.operator&&(Ln.has(e.operator)||e.operator=="+"&&(e.right.left.is_string(t)||e.left.is_string(t)&&e.right.right.is_string(t)))){e.left=make_node(Qe,e.left,{operator:e.operator,left:e.left.transform(t),right:e.right.left.transform(t)});e.right=e.right.right.transform(t);return e.transform(t)}var v=e.evaluate(t);if(v!==e){v=make_node_from_constant(v,e).optimize(t);return best_of(t,v,e)}return e});def_optimize(wt,function(e){return e});function recursive_ref(e,t){var n;for(var i=0;n=e.parent(i);i++){if(n instanceof se||n instanceof ct){var r=n.name;if(r&&r.definition()===t)break}}return n}function within_array_or_object_literal(e){var t,n=0;while(t=e.parent(n++)){if(t instanceof z)return false;if(t instanceof nt||t instanceof at||t instanceof it){return true}}return false}def_optimize(Ot,function(e,t){if(!t.option("ie8")&&is_undeclared_ref(e)&&!t.find_parent(ie)){switch(e.name){case"undefined":return make_node(Ht,e).optimize(t);case"NaN":return make_node(Xt,e).optimize(t);case"Infinity":return make_node(qt,e).optimize(t)}}const n=t.parent();if(t.option("reduce_vars")&&is_lhs(e,n)!==e){const a=e.definition();const o=find_scope(t);if(t.top_retain&&a.global&&t.top_retain(a)){a.fixed=false;a.single_use=false;return e}let s=e.fixed_value();let u=a.single_use&&!(n instanceof Ke&&n.is_expr_pure(t)||has_annotation(n,en))&&!(n instanceof ze&&s instanceof se&&s.name);if(u&&(s instanceof se||s instanceof ct)){if(retain_top_func(s,t)){u=false}else if(a.scope!==e.scope&&(a.escaped==1||wn(s,An)||within_array_or_object_literal(t))){u=false}else if(recursive_ref(t,a)){u=false}else if(a.scope!==e.scope||a.orig[0]instanceof Dt){u=s.is_constant_expression(e.scope);if(u=="f"){var i=e.scope;do{if(i instanceof fe||is_func_expr(i)){Mn(i,An)}}while(i=i.parent_scope)}}}if(u&&s instanceof se){u=a.scope===e.scope&&!scope_encloses_variables_in_this_scope(o,s)||n instanceof Ke&&n.expression===e&&!scope_encloses_variables_in_this_scope(o,s)&&!(s.name&&s.name.definition().recursive_refs>0)}if(u&&s instanceof ct){const e=!s.extends||!s.extends.may_throw(t)&&!s.extends.has_side_effects(t);u=e&&!s.properties.some(e=>e.may_throw(t)||e.has_side_effects(t))}if(u&&s){if(s instanceof ft){Mn(s,Rn);s=make_node(pt,s,s)}if(s instanceof fe){Mn(s,Rn);s=make_node(ce,s,s)}if(a.recursive_refs>0&&s.name instanceof bt){const e=s.name.definition();let t=s.variables.get(s.name.name);let n=t&&t.orig[0];if(!(n instanceof St)){n=make_node(St,s.name,s.name);n.scope=s;s.name=n;t=s.def_function(n)}walk(s,n=>{if(n instanceof Ot&&n.definition()===e){n.thedef=t;t.references.push(n)}})}if((s instanceof se||s instanceof ct)&&s.parent_scope!==o){s=s.clone(true,t.get_toplevel());o.add_child_scope(s)}return s.optimize(t)}if(s){let n;if(s instanceof It){if(!(a.orig[0]instanceof Dt)&&a.references.every(e=>a.scope===e.scope)){n=s}}else{var r=s.evaluate(t);if(r!==s&&(t.option("unsafe_regexp")||!(r instanceof RegExp))){n=make_node_from_constant(r,s)}}if(n){const i=e.size(t);const r=n.size(t);let o=0;if(t.option("unused")&&!t.exposed(a)){o=(i+2+r)/(a.references.length-a.assignments)}if(r<=i+o){return n}}}}return e});function scope_encloses_variables_in_this_scope(e,t){for(const n of t.enclosed){if(t.variables.has(n.name)){continue}const i=e.find_variable(n.name);if(i){if(i===n)continue;return true}}return false}function is_atomic(e,t){return e instanceof Ot||e.TYPE===t.TYPE}def_optimize(Ht,function(e,t){if(t.option("unsafe_undefined")){var n=find_variable(t,"undefined");if(n){var i=make_node(Ot,e,{name:"undefined",scope:n.scope,thedef:n});Mn(i,Tn);return i}}var r=is_lhs(t.self(),t.parent());if(r&&is_atomic(r,e))return e;return make_node($e,e,{operator:"void",expression:make_node(Vt,e,{value:0})})});def_optimize(qt,function(e,t){var n=is_lhs(t.self(),t.parent());if(n&&is_atomic(n,e))return e;if(t.option("keep_infinity")&&!(n&&!is_atomic(n,e))&&!find_variable(t,"Infinity")){return e}return make_node(Qe,e,{operator:"/",left:make_node(Vt,e,{value:1}),right:make_node(Vt,e,{value:0})})});def_optimize(Xt,function(e,t){var n=is_lhs(t.self(),t.parent());if(n&&!is_atomic(n,e)||find_variable(t,"NaN")){return make_node(Qe,e,{operator:"/",left:make_node(Vt,e,{value:0}),right:make_node(Vt,e,{value:0})})}return e});function is_reachable(e,t){const n=e=>{if(e instanceof Ot&&member(e.definition(),t)){return Zt}};return walk_parent(e,(t,i)=>{if(t instanceof re&&t!==e){var r=i.parent();if(r instanceof Ke&&r.expression===t)return;if(walk(t,n))return Zt;return true}})}const qn=makePredicate("+ - / * % >> << >>> | ^ &");const Yn=makePredicate("* | ^ &");def_optimize(et,function(e,t){if(e.logical){return e.lift_sequences(t)}var n;if(t.option("dead_code")&&e.left instanceof Ot&&(n=e.left.definition()).scope===t.find_parent(se)){var i=0,r,a=e;do{r=a;a=t.parent(i++);if(a instanceof Ee){if(in_try(i,a))break;if(is_reachable(n.scope,[n]))break;if(e.operator=="=")return e.right;n.fixed=false;return make_node(Qe,e,{operator:e.operator.slice(0,-1),left:e.left,right:e.right}).optimize(t)}}while(a instanceof Qe&&a.right===r||a instanceof Xe&&a.tail_node()===r)}e=e.lift_sequences(t);if(e.operator=="="&&e.left instanceof Ot&&e.right instanceof Qe){if(e.right.left instanceof Ot&&e.right.left.name==e.left.name&&qn.has(e.right.operator)){e.operator=e.right.operator+"=";e.right=e.right.right}else if(e.right.right instanceof Ot&&e.right.right.name==e.left.name&&Yn.has(e.right.operator)&&!e.right.left.has_side_effects(t)){e.operator=e.right.operator+"=";e.right=e.right.left}}return e;function in_try(n,i){var r=e.right;e.right=make_node(Gt,r);var a=i.may_throw(t);e.right=r;var o=e.left.definition().scope;var s;while((s=t.parent(n++))!==o){if(s instanceof Fe){if(s.bfinally)return true;if(a&&s.bcatch)return true}}}});def_optimize(tt,function(e,t){if(!t.option("evaluate")){return e}var n=e.right.evaluate(t);if(n===undefined){e=e.left}else if(n!==e.right){n=make_node_from_constant(n,e.right);e.right=best_of_expression(n,e.right)}return e});function is_nullish(e){let t;return e instanceof Gt||is_undefined(e)||e instanceof Ot&&(t=e.definition().fixed)instanceof U&&is_nullish(t)||e instanceof He&&e.optional&&is_nullish(e.expression)||e instanceof Ke&&e.optional&&is_nullish(e.expression)||e instanceof Ye&&is_nullish(e.expression)}function is_nullish_check(e,t,n){if(t.may_throw(n))return false;let i;if(e instanceof Qe&&e.operator==="=="&&((i=is_nullish(e.left)&&e.left)||(i=is_nullish(e.right)&&e.right))&&(i===e.left?e.right:e.left).equivalent_to(t)){return true}if(e instanceof Qe&&e.operator==="||"){let n;let i;const r=e=>{if(!(e instanceof Qe&&(e.operator==="==="||e.operator==="=="))){return false}let r=0;let a;if(e.left instanceof Gt){r++;n=e;a=e.right}if(e.right instanceof Gt){r++;n=e;a=e.left}if(is_undefined(e.left)){r++;i=e;a=e.right}if(is_undefined(e.right)){r++;i=e;a=e.left}if(r!==1){return false}if(!a.equivalent_to(t)){return false}return true};if(!r(e.left))return false;if(!r(e.right))return false;if(n&&i&&n!==i){return true}}return false}def_optimize(Je,function(e,t){if(!t.option("conditionals"))return e;if(e.condition instanceof Xe){var n=e.condition.expressions.slice();e.condition=n.pop();n.push(e);return make_sequence(e,n)}var i=e.condition.evaluate(t);if(i!==e.condition){if(i){return maintain_this_binding(t.parent(),t.self(),e.consequent)}else{return maintain_this_binding(t.parent(),t.self(),e.alternative)}}var r=i.negate(t,first_in_statement(t));if(best_of(t,i,r)===r){e=make_node(Je,e,{condition:r,consequent:e.alternative,alternative:e.consequent})}var a=e.condition;var o=e.consequent;var s=e.alternative;if(a instanceof Ot&&o instanceof Ot&&a.definition()===o.definition()){return make_node(Qe,e,{operator:"||",left:a,right:s})}if(o instanceof et&&s instanceof et&&o.operator===s.operator&&o.logical===s.logical&&o.left.equivalent_to(s.left)&&(!e.condition.has_side_effects(t)||o.operator=="="&&!o.left.has_side_effects(t))){return make_node(et,e,{operator:o.operator,left:o.left,logical:o.logical,right:make_node(Je,e,{condition:e.condition,consequent:o.right,alternative:s.right})})}var u;if(o instanceof Ke&&s.TYPE===o.TYPE&&o.args.length>0&&o.args.length==s.args.length&&o.expression.equivalent_to(s.expression)&&!e.condition.has_side_effects(t)&&!o.expression.has_side_effects(t)&&typeof(u=single_arg_diff())=="number"){var c=o.clone();c.args[u]=make_node(Je,e,{condition:e.condition,consequent:o.args[u],alternative:s.args[u]});return c}if(s instanceof Je&&o.equivalent_to(s.consequent)){return make_node(Je,e,{condition:make_node(Qe,e,{operator:"||",left:a,right:s.condition}),consequent:o,alternative:s.alternative}).optimize(t)}if(t.option("ecma")>=2020&&is_nullish_check(a,s,t)){return make_node(Qe,e,{operator:"??",left:s,right:o}).optimize(t)}if(s instanceof Xe&&o.equivalent_to(s.expressions[s.expressions.length-1])){return make_sequence(e,[make_node(Qe,e,{operator:"||",left:a,right:make_sequence(e,s.expressions.slice(0,-1))}),o]).optimize(t)}if(s instanceof Qe&&s.operator=="&&"&&o.equivalent_to(s.right)){return make_node(Qe,e,{operator:"&&",left:make_node(Qe,e,{operator:"||",left:a,right:s.left}),right:o}).optimize(t)}if(o instanceof Je&&o.alternative.equivalent_to(s)){return make_node(Je,e,{condition:make_node(Qe,e,{left:e.condition,operator:"&&",right:o.condition}),consequent:o.consequent,alternative:s})}if(o.equivalent_to(s)){return make_sequence(e,[e.condition,o]).optimize(t)}if(o instanceof Qe&&o.operator=="||"&&o.right.equivalent_to(s)){return make_node(Qe,e,{operator:"||",left:make_node(Qe,e,{operator:"&&",left:e.condition,right:o.left}),right:s}).optimize(t)}var l=t.in_boolean_context();if(is_true(e.consequent)){if(is_false(e.alternative)){return booleanize(e.condition)}return make_node(Qe,e,{operator:"||",left:booleanize(e.condition),right:e.alternative})}if(is_false(e.consequent)){if(is_true(e.alternative)){return booleanize(e.condition.negate(t))}return make_node(Qe,e,{operator:"&&",left:booleanize(e.condition.negate(t)),right:e.alternative})}if(is_true(e.alternative)){return make_node(Qe,e,{operator:"||",left:booleanize(e.condition.negate(t)),right:e.consequent})}if(is_false(e.alternative)){return make_node(Qe,e,{operator:"&&",left:booleanize(e.condition),right:e.consequent})}return e;function booleanize(e){if(e.is_boolean())return e;return make_node($e,e,{operator:"!",expression:e.negate(t)})}function is_true(e){return e instanceof $t||l&&e instanceof Lt&&e.getValue()||e instanceof $e&&e.operator=="!"&&e.expression instanceof Lt&&!e.expression.getValue()}function is_false(e){return e instanceof jt||l&&e instanceof Lt&&!e.getValue()||e instanceof $e&&e.operator=="!"&&e.expression instanceof Lt&&e.expression.getValue()}function single_arg_diff(){var e=o.args;var t=s.args;for(var n=0,i=e.length;n=2015;var i=this.expression;if(i instanceof it){var r=i.properties;for(var a=r.length;--a>=0;){var o=r[a];if(""+(o instanceof ut?o.key.name:o.key)==e){if(!r.every(e=>{return e instanceof at||n&&e instanceof ut&&!e.is_generator}))break;if(!safe_to_flatten(o.value,t))break;return make_node(qe,this,{expression:make_node(nt,i,{elements:r.map(function(e){var t=e.value;if(t instanceof ue)t=make_node(ce,t,t);var n=e.key;if(n instanceof U&&!(n instanceof yt)){return make_sequence(e,[n,t])}return t})}),property:make_node(Vt,this,{value:a})})}}}});def_optimize(qe,function(e,t){var n=e.expression;var i=e.property;if(t.option("properties")){var r=i.evaluate(t);if(r!==i){if(typeof r=="string"){if(r=="undefined"){r=undefined}else{var a=parseFloat(r);if(a.toString()==r){r=a}}}i=e.property=best_of_expression(i,make_node_from_constant(r,i).transform(t));var o=""+r;if(is_basic_identifier_string(o)&&o.length<=i.size()+1){return make_node(We,e,{expression:n,optional:e.optional,property:o,quote:i.quote}).optimize(t)}}}var s;e:if(t.option("arguments")&&n instanceof Ot&&n.name=="arguments"&&n.definition().orig.length==1&&(s=n.scope)instanceof se&&s.uses_arguments&&!(s instanceof le)&&i instanceof Vt){var u=i.getValue();var c=new Set;var l=s.argnames;for(var f=0;f1){_=null}}else if(!_&&!t.option("keep_fargs")&&u=s.argnames.length){_=s.create_symbol(Dt,{source:s,scope:s,tentative_name:"argument_"+s.argnames.length});s.argnames.push(_)}}if(_){var d=make_node(Ot,e,_);d.reference({});Nn(_,yn);return d}}if(is_lhs(e,t.parent()))return e;if(r!==i){var m=e.flatten_object(o,t);if(m){n=e.expression=m.expression;i=e.property=m.property}}if(t.option("properties")&&t.option("side_effects")&&i instanceof Vt&&n instanceof nt){var u=i.getValue();var E=n.elements;var g=E[u];e:if(safe_to_flatten(g,t)){var v=true;var D=[];for(var b=E.length;--b>u;){var a=E[b].drop_side_effect_free(t);if(a){D.unshift(a);if(v&&a.has_side_effects(t))v=false}}if(g instanceof oe)break e;g=g instanceof Wt?make_node(Ht,g):g;if(!v)D.unshift(g);while(--b>=0){var a=E[b];if(a instanceof oe)break e;a=a.drop_side_effect_free(t);if(a)D.unshift(a);else u--}if(v){D.push(g);return make_sequence(e,D).optimize(t)}else return make_node(qe,e,{expression:make_node(nt,n,{elements:D}),property:make_node(Vt,i,{value:u})})}}var y=e.evaluate(t);if(y!==e){y=make_node_from_constant(y,e).optimize(t);return best_of(t,y,e)}if(e.optional&&is_nullish(e.expression)){return make_node(Ht,e)}return e});def_optimize(Ye,function(e,t){e.expression=e.expression.optimize(t);return e});se.DEFMETHOD("contains_this",function(){return walk(this,e=>{if(e instanceof It)return Zt;if(e!==this&&e instanceof re&&!(e instanceof le)){return true}})});def_optimize(We,function(e,t){const n=t.parent();if(is_lhs(e,n))return e;if(t.option("unsafe_proto")&&e.expression instanceof We&&e.expression.property=="prototype"){var i=e.expression.expression;if(is_undeclared_ref(i))switch(i.name){case"Array":e.expression=make_node(nt,e.expression,{elements:[]});break;case"Function":e.expression=make_node(ce,e.expression,{argnames:[],body:[]});break;case"Number":e.expression=make_node(Vt,e.expression,{value:0});break;case"Object":e.expression=make_node(it,e.expression,{properties:[]});break;case"RegExp":e.expression=make_node(zt,e.expression,{value:{source:"t",flags:""}});break;case"String":e.expression=make_node(Bt,e.expression,{value:""});break}}if(!(n instanceof Ke)||!has_annotation(n,en)){const n=e.flatten_object(e.property,t);if(n)return n.optimize(t)}let r=e.evaluate(t);if(r!==e){r=make_node_from_constant(r,e).optimize(t);return best_of(t,r,e)}if(e.optional&&is_nullish(e.expression)){return make_node(Ht,e)}return e});function literals_in_boolean_context(e,t){if(t.in_boolean_context()){return best_of(t,e,make_sequence(e,[e,make_node($t,e)]).optimize(t))}return e}function inline_array_like_spread(e){for(var t=0;te instanceof Wt)){e.splice(t,1,...i.elements);t--}}}}def_optimize(nt,function(e,t){var n=literals_in_boolean_context(e,t);if(n!==e){return n}inline_array_like_spread(e.elements);return e});function inline_object_prop_spread(e){for(var t=0;te instanceof at)){e.splice(t,1,...i.properties);t--}else if(i instanceof Lt&&!(i instanceof Bt)){e.splice(t,1)}}}}def_optimize(it,function(e,t){var n=literals_in_boolean_context(e,t);if(n!==e){return n}inline_object_prop_spread(e.properties);return e});def_optimize(zt,literals_in_boolean_context);def_optimize(ge,function(e,t){if(e.value&&is_undefined(e.value,t)){e.value=null}return e});def_optimize(le,opt_AST_Lambda);def_optimize(ce,function(e,t){e=opt_AST_Lambda(e,t);if(t.option("unsafe_arrows")&&t.option("ecma")>=2015&&!e.name&&!e.is_generator&&!e.uses_arguments&&!e.pinned()){const n=walk(e,e=>{if(e instanceof It)return Zt});if(!n)return make_node(le,e,e).optimize(t)}return e});def_optimize(ct,function(e){return e});def_optimize(Se,function(e,t){if(e.expression&&!e.is_star&&is_undefined(e.expression,t)){e.expression=null}return e});def_optimize(he,function(e,t){if(!t.option("evaluate")||t.parent()instanceof _e){return e}var n=[];for(var i=0;i=2015&&(!(n instanceof RegExp)||n.test(e.key+""))){var i=e.key;var r=e.value;var a=r instanceof le&&Array.isArray(r.body)&&!r.contains_this();if((a||r instanceof ce)&&!r.name){return make_node(ut,e,{async:r.async,is_generator:r.is_generator,key:i instanceof U?i:make_node(yt,e,{name:i}),value:make_node(ue,r,r),quote:e.quote})}}return e});def_optimize(pe,function(e,t){if(t.option("pure_getters")==true&&t.option("unused")&&!e.is_array&&Array.isArray(e.names)&&!is_destructuring_export_decl(t)&&!(e.names[e.names.length-1]instanceof oe)){var n=[];for(var i=0;i1)throw new Error("inline source map only works with singular input");t.sourceMap.content=read_source_map(e[a])}}r=t.parse.toplevel}if(i&&t.mangle.properties.keep_quoted!=="strict"){reserve_quoted_keys(r,i)}if(t.wrap){r=r.wrap_commonjs(t.wrap)}if(t.enclose){r=r.wrap_enclose(t.enclose)}if(n)n.rename=Date.now();if(n)n.compress=Date.now();if(t.compress){r=new Compressor(t.compress,{mangle_options:t.mangle}).compress(r)}if(n)n.scope=Date.now();if(t.mangle)r.figure_out_scope(t.mangle);if(n)n.mangle=Date.now();if(t.mangle){dn.reset();r.compute_char_frequency(t.mangle);r.mangle_names(t.mangle)}if(n)n.properties=Date.now();if(t.mangle&&t.mangle.properties){r=mangle_properties(r,t.mangle.properties)}if(n)n.format=Date.now();var o={};if(t.format.ast){o.ast=r}if(!HOP(t.format,"code")||t.format.code){if(t.sourceMap){t.format.source_map=await SourceMap({file:t.sourceMap.filename,orig:t.sourceMap.content,root:t.sourceMap.root});if(t.sourceMap.includeSources){if(e instanceof ae){throw new Error("original source content unavailable")}else for(var a in e)if(HOP(e,a)){t.format.source_map.get().setSourceContent(a,e[a])}}}delete t.format.ast;delete t.format.code;var s=OutputStream(t.format);r.print(s);o.code=s.get();if(t.sourceMap){if(t.sourceMap.asObject){o.map=t.format.source_map.get().toJSON()}else{o.map=t.format.source_map.toString()}if(t.sourceMap.url=="inline"){var u=typeof o.map==="object"?JSON.stringify(o.map):o.map;o.code+="\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+Zn(u)}else if(t.sourceMap.url){o.code+="\n//# sourceMappingURL="+t.sourceMap.url}}}if(t.nameCache&&t.mangle){if(t.mangle.cache)t.nameCache.vars=cache_to_json(t.mangle.cache);if(t.mangle.properties&&t.mangle.properties.cache){t.nameCache.props=cache_to_json(t.mangle.properties.cache)}}if(t.format&&t.format.source_map){t.format.source_map.destroy()}if(n){n.end=Date.now();o.timings={parse:.001*(n.rename-n.parse),rename:.001*(n.compress-n.rename),compress:.001*(n.scope-n.compress),scope:.001*(n.mangle-n.scope),mangle:.001*(n.properties-n.mangle),properties:.001*(n.format-n.properties),format:.001*(n.end-n.format),total:.001*(n.end-n.start)}}return o}async function run_cli({program:e,packageJson:t,fs:i,path:r}){const a=new Set(["cname","parent_scope","scope","uses_eval","uses_with"]);var o={};var s={compress:false,mangle:false};const u=await _default_options();e.version(t.name+" "+t.version);e.parseArgv=e.parse;e.parse=undefined;if(process.argv.includes("ast"))e.helpInformation=describe_ast;else if(process.argv.includes("options"))e.helpInformation=function(){var e=[];for(var t in u){e.push("--"+(t==="sourceMap"?"source-map":t)+" options:");e.push(format_object(u[t]));e.push("")}return e.join("\n")};e.option("-p, --parse ","Specify parser options.",parse_js());e.option("-c, --compress [options]","Enable compressor/specify compressor options.",parse_js());e.option("-m, --mangle [options]","Mangle names/specify mangler options.",parse_js());e.option("--mangle-props [options]","Mangle properties/specify mangler options.",parse_js());e.option("-f, --format [options]","Format options.",parse_js());e.option("-b, --beautify [options]","Alias for --format beautify=true.",parse_js());e.option("-o, --output ","Output file (default STDOUT).");e.option("--comments [filter]","Preserve copyright comments in the output.");e.option("--config-file ","Read minify() options from JSON file.");e.option("-d, --define [=value]","Global definitions.",parse_js("define"));e.option("--ecma ","Specify ECMAScript release: 5, 2015, 2016 or 2017...");e.option("-e, --enclose [arg[,...][:value[,...]]]","Embed output in a big function with configurable arguments and values.");e.option("--ie8","Support non-standard Internet Explorer 8.");e.option("--keep-classnames","Do not mangle/drop class names.");e.option("--keep-fnames","Do not mangle/drop function names. Useful for code relying on Function.prototype.name.");e.option("--module","Input is an ES6 module");e.option("--name-cache ","File to hold mangled name mappings.");e.option("--rename","Force symbol expansion.");e.option("--no-rename","Disable symbol expansion.");e.option("--safari10","Support non-standard Safari 10.");e.option("--source-map [options]","Enable source map/specify source map options.",parse_js());e.option("--timings","Display operations run time on STDERR.");e.option("--toplevel","Compress and/or mangle variables in toplevel scope.");e.option("--wrap ","Embed everything as a function with “exports” corresponding to “name” globally.");e.arguments("[files...]").parseArgv(process.argv);if(e.configFile){s=JSON.parse(read_file(e.configFile))}if(!e.output&&e.sourceMap&&e.sourceMap.url!="inline"){fatal("ERROR: cannot write source map to STDOUT")}["compress","enclose","ie8","mangle","module","safari10","sourceMap","toplevel","wrap"].forEach(function(t){if(t in e){s[t]=e[t]}});if("ecma"in e){if(e.ecma!=(e.ecma|0))fatal("ERROR: ecma must be an integer");const t=e.ecma|0;if(t>5&&t<2015)s.ecma=t+2009;else s.ecma=t}if(e.beautify||e.format){if(e.beautify&&e.format){fatal("Please only specify one of --beautify or --format")}if(e.beautify){s.format=typeof e.beautify=="object"?e.beautify:{};if(!("beautify"in s.format)){s.format.beautify=true}}if(e.format){s.format=typeof e.format=="object"?e.format:{}}}if(e.comments){if(typeof s.format!="object")s.format={};s.format.comments=typeof e.comments=="string"?e.comments=="false"?false:e.comments:"some"}if(e.define){if(typeof s.compress!="object")s.compress={};if(typeof s.compress.global_defs!="object")s.compress.global_defs={};for(var c in e.define){s.compress.global_defs[c]=e.define[c]}}if(e.keepClassnames){s.keep_classnames=true}if(e.keepFnames){s.keep_fnames=true}if(e.mangleProps){if(e.mangleProps.domprops){delete e.mangleProps.domprops}else{if(typeof e.mangleProps!="object")e.mangleProps={};if(!Array.isArray(e.mangleProps.reserved))e.mangleProps.reserved=[]}if(typeof s.mangle!="object")s.mangle={};s.mangle.properties=e.mangleProps}if(e.nameCache){s.nameCache=JSON.parse(read_file(e.nameCache,"{}"))}if(e.output=="ast"){s.format={ast:true,code:false}}if(e.parse){if(!e.parse.acorn&&!e.parse.spidermonkey){s.parse=e.parse}else if(e.sourceMap&&e.sourceMap.content=="inline"){fatal("ERROR: inline source map only works with built-in parser")}}if(~e.rawArgs.indexOf("--rename")){s.rename=true}else if(!e.rename){s.rename=false}let l=e=>e;if(typeof e.sourceMap=="object"&&"base"in e.sourceMap){l=function(){var t=e.sourceMap.base;delete s.sourceMap.base;return function(e){return r.relative(t,e)}}()}let f;if(s.files&&s.files.length){f=s.files;delete s.files}else if(e.args.length){f=e.args}if(f){simple_glob(f).forEach(function(e){o[l(e)]=read_file(e)})}else{await new Promise(e=>{var t=[];process.stdin.setEncoding("utf8");process.stdin.on("data",function(e){t.push(e)}).on("end",function(){o=[t.join("")];e()});process.stdin.resume()})}await run_cli();function convert_ast(e){return U.from_mozilla_ast(Object.keys(o).reduce(e,null))}async function run_cli(){var t=e.sourceMap&&e.sourceMap.content;if(t&&t!=="inline"){s.sourceMap.content=read_file(t,t)}if(e.timings)s.timings=true;try{if(e.parse){if(e.parse.acorn){o=convert_ast(function(t,i){return n(89).parse(o[i],{ecmaVersion:2018,locations:true,program:t,sourceFile:i,sourceType:s.module||e.parse.module?"module":"script"})})}else if(e.parse.spidermonkey){o=convert_ast(function(e,t){var n=JSON.parse(o[t]);if(!e)return n;e.body=e.body.concat(n.body);return e})}}}catch(e){fatal(e)}let r;try{r=await minify(o,s)}catch(e){if(e.name=="SyntaxError"){print_error("Parse error at "+e.filename+":"+e.line+","+e.col);var u=e.col;var c=o[e.filename].split(/\r?\n/);var l=c[e.line-1];if(!l&&!u){l=c[e.line-2];u=l.length}if(l){var f=70;if(u>f){l=l.slice(u-f);u=f}print_error(l.slice(0,80));print_error(l.slice(0,u).replace(/\S/g," ")+"^")}}if(e.defs){print_error("Supported options:");print_error(format_object(e.defs))}fatal(e);return}if(e.output=="ast"){if(!s.compress&&!s.mangle){r.ast.figure_out_scope({})}console.log(JSON.stringify(r.ast,function(e,t){if(t)switch(e){case"thedef":return symdef(t);case"enclosed":return t.length?t.map(symdef):undefined;case"variables":case"functions":case"globals":return t.size?collect_from_map(t,symdef):undefined}if(a.has(e))return;if(t instanceof AST_Token)return;if(t instanceof Map)return;if(t instanceof U){var n={_class:"AST_"+t.TYPE};if(t.block_scope){n.variables=t.block_scope.variables;n.functions=t.block_scope.functions;n.enclosed=t.block_scope.enclosed}t.CTOR.PROPS.forEach(function(e){n[e]=t[e]});return n}return t},2))}else if(e.output=="spidermonkey"){try{const e=await minify(r.code,{compress:false,mangle:false,format:{ast:true,code:false}});console.log(JSON.stringify(e.ast.to_mozilla_ast(),null,2))}catch(e){fatal(e);return}}else if(e.output){i.writeFileSync(e.output,r.code);if(s.sourceMap&&s.sourceMap.url!=="inline"&&r.map){i.writeFileSync(e.output+".map",r.map)}}else{console.log(r.code)}if(e.nameCache){i.writeFileSync(e.nameCache,JSON.stringify(s.nameCache))}if(r.timings)for(var p in r.timings){print_error("- "+p+": "+r.timings[p].toFixed(3)+"s")}}function fatal(e){if(e instanceof Error)e=e.stack.replace(/^\S*?Error:/,"ERROR:");print_error(e);process.exit(1)}function simple_glob(e){if(Array.isArray(e)){return[].concat.apply([],e.map(simple_glob))}if(e&&e.match(/[*?]/)){var t=r.dirname(e);try{var n=i.readdirSync(t)}catch(e){}if(n){var a="^"+r.basename(e).replace(/[.+^$[\]\\(){}]/g,"\\$&").replace(/\*/g,"[^/\\\\]*").replace(/\?/g,"[^/\\\\]")+"$";var o=process.platform==="win32"?"i":"";var s=new RegExp(a,o);var u=n.filter(function(e){return s.test(e)}).map(function(e){return r.join(t,e)});if(u.length)return u}}return[e]}function read_file(e,t){try{return i.readFileSync(e,"utf8")}catch(e){if((e.code=="ENOENT"||e.code=="ENAMETOOLONG")&&t!=null)return t;fatal(e)}}function parse_js(e){return function(t,n){n=n||{};try{walk(parse(t,{expression:true}),t=>{if(t instanceof et){var i=t.left.print_to_string();var r=t.right;if(e){n[i]=r}else if(r instanceof nt){n[i]=r.elements.map(to_string)}else if(r instanceof zt){r=r.value;n[i]=new RegExp(r.source,r.flags)}else{n[i]=to_string(r)}return true}if(t instanceof _t||t instanceof He){var i=t.print_to_string();n[i]=true;return true}if(!(t instanceof Xe))throw t;function to_string(e){return e instanceof Lt?e.getValue():e.print_to_string({quote_keys:true})}})}catch(i){if(e){fatal("Error parsing arguments for '"+e+"': "+t)}else{n[t]=null}}return n}}function symdef(e){var t=1e6+e.id+" "+e.name;if(e.mangled_name)t+=" "+e.mangled_name;return t}function collect_from_map(e,t){var n=[];e.forEach(function(e){n.push(t(e))});return n}function format_object(e){var t=[];var n="";Object.keys(e).map(function(t){if(n.length!/^\$/.test(e));if(n.length>0){e.space();e.with_parens(function(){n.forEach(function(t,n){if(n)e.space();e.print(t)})})}if(t.documentation){e.space();e.print_string(t.documentation)}if(t.SUBCLASSES.length>0){e.space();e.with_block(function(){t.SUBCLASSES.forEach(function(t){e.indent();doitem(t);e.newline()})})}}doitem(U);return e+"\n"}}async function _default_options(){const e={};Object.keys(infer_options({0:0})).forEach(t=>{const n=infer_options({[t]:{0:0}});if(n)e[t]=n});return e}async function infer_options(e){try{await minify("",e)}catch(e){return e.defs}}e._default_options=_default_options;e._run_cli=run_cli;e.minify=minify})},241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")}};var t={};function __webpack_require__(n){if(t[n]){return t[n].exports}var i=t[n]={exports:{}};var r=true;try{e[n].call(i.exports,i,i.exports,__webpack_require__);r=false}finally{if(r)delete t[n]}return i.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(845)})(); \ No newline at end of file +module.exports=(()=>{var e={89:function(e,t){(function(e,n){true?n(t):0})(this,function(e){"use strict";var t={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"};var n="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";var i={5:n,"5module":n+" export import",6:n+" const class extends export import super"};var r=/^in(stanceof)?$/;var a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var o="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";var s=new RegExp("["+a+"]");var u=new RegExp("["+a+o+"]");a=o=null;var c=[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,157,310,10,21,11,7,153,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,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,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,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,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,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,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,2357,44,11,6,17,0,370,43,1301,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,42710,42,4148,12,221,3,5761,15,7472,3104,541];var l=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,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,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,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,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239];function isInAstralSet(e,t){var n=65536;for(var i=0;ie){return false}n+=t[i+1];if(n>=e){return true}}}function isIdentifierStart(e,t){if(e<65){return e===36}if(e<91){return true}if(e<97){return e===95}if(e<123){return true}if(e<=65535){return e>=170&&s.test(String.fromCharCode(e))}if(t===false){return false}return isInAstralSet(e,c)}function isIdentifierChar(e,t){if(e<48){return e===36}if(e<58){return true}if(e<65){return false}if(e<91){return true}if(e<97){return e===95}if(e<123){return true}if(e<=65535){return e>=170&&u.test(String.fromCharCode(e))}if(t===false){return false}return isInAstralSet(e,c)||isInAstralSet(e,l)}var f=function TokenType(e,t){if(t===void 0)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 binop(e,t){return new f(e,{beforeExpr:true,binop:t})}var p={beforeExpr:true},_={startsExpr:true};var h={};function kw(e,t){if(t===void 0)t={};t.keyword=e;return h[e]=new f(e,t)}var d={num:new f("num",_),regexp:new f("regexp",_),string:new f("string",_),name:new f("name",_),eof:new f("eof"),bracketL:new f("[",{beforeExpr:true,startsExpr:true}),bracketR:new f("]"),braceL:new f("{",{beforeExpr:true,startsExpr:true}),braceR:new f("}"),parenL:new f("(",{beforeExpr:true,startsExpr:true}),parenR:new f(")"),comma:new f(",",p),semi:new f(";",p),colon:new f(":",p),dot:new f("."),question:new f("?",p),arrow:new f("=>",p),template:new f("template"),invalidTemplate:new f("invalidTemplate"),ellipsis:new f("...",p),backQuote:new f("`",_),dollarBraceL:new f("${",{beforeExpr:true,startsExpr:true}),eq:new f("=",{beforeExpr:true,isAssign:true}),assign:new f("_=",{beforeExpr:true,isAssign:true}),incDec:new f("++/--",{prefix:true,postfix:true,startsExpr:true}),prefix:new f("!/~",{beforeExpr:true,prefix:true,startsExpr:true}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("/<=/>=",7),bitShift:binop("<>/>>>",8),plusMin:new f("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new f("**",{beforeExpr:true}),_break:kw("break"),_case:kw("case",p),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",p),_do:kw("do",{isLoop:true,beforeExpr:true}),_else:kw("else",p),_finally:kw("finally"),_for:kw("for",{isLoop:true}),_function:kw("function",_),_if:kw("if"),_return:kw("return",p),_switch:kw("switch"),_throw:kw("throw",p),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:true}),_with:kw("with"),_new:kw("new",{beforeExpr:true,startsExpr:true}),_this:kw("this",_),_super:kw("super",_),_class:kw("class",_),_extends:kw("extends",p),_export:kw("export"),_import:kw("import",_),_null:kw("null",_),_true:kw("true",_),_false:kw("false",_),_in:kw("in",{beforeExpr:true,binop:7}),_instanceof:kw("instanceof",{beforeExpr:true,binop:7}),_typeof:kw("typeof",{beforeExpr:true,prefix:true,startsExpr:true}),_void:kw("void",{beforeExpr:true,prefix:true,startsExpr:true}),_delete:kw("delete",{beforeExpr:true,prefix:true,startsExpr:true})};var m=/\r\n?|\n|\u2028|\u2029/;var E=new RegExp(m.source,"g");function isNewLine(e,t){return e===10||e===13||!t&&(e===8232||e===8233)}var g=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;var v=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;var D=Object.prototype;var b=D.hasOwnProperty;var y=D.toString;function has(e,t){return b.call(e,t)}var k=Array.isArray||function(e){return y.call(e)==="[object Array]"};function wordsRegexp(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var S=function Position(e,t){this.line=e;this.column=t};S.prototype.offset=function offset(e){return new S(this.line,this.column+e)};var T=function SourceLocation(e,t,n){this.start=t;this.end=n;if(e.sourceFile!==null){this.source=e.sourceFile}};function getLineInfo(e,t){for(var n=1,i=0;;){E.lastIndex=i;var r=E.exec(e);if(r&&r.index=2015){t.ecmaVersion-=2009}if(t.allowReserved==null){t.allowReserved=t.ecmaVersion<5}if(k(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}if(k(t.onComment)){t.onComment=pushComment(t,t.onComment)}return t}function pushComment(e,t){return function(n,i,r,a,o,s){var u={type:n?"Block":"Line",value:i,start:r,end:a};if(e.locations){u.loc=new T(this,o,s)}if(e.ranges){u.range=[r,a]}t.push(u)}}var C=1,R=2,x=C|R,F=4,O=8,w=16,M=32,N=64,I=128;function functionFlags(e,t){return R|(e?F:0)|(t?O:0)}var P=0,L=1,B=2,V=3,U=4,z=5;var K=function Parser(e,n,r){this.options=e=getOptions(e);this.sourceFile=e.sourceFile;this.keywords=wordsRegexp(i[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var a="";if(e.allowReserved!==true){for(var o=e.ecmaVersion;;o--){if(a=t[o]){break}}if(e.sourceType==="module"){a+=" await"}}this.reservedWords=wordsRegexp(a);var s=(a?a+" ":"")+t.strict;this.reservedWordsStrict=wordsRegexp(s);this.reservedWordsStrictBind=wordsRegexp(s+" "+t.strictBind);this.input=String(n);this.containsEsc=false;if(r){this.pos=r;this.lineStart=this.input.lastIndexOf("\n",r-1)+1;this.curLine=this.input.slice(0,this.lineStart).split(m).length}else{this.pos=this.lineStart=0;this.curLine=1}this.type=d.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=true;this.inModule=e.sourceType==="module";this.strict=this.inModule||this.strictDirective(this.pos);this.potentialArrowAt=-1;this.yieldPos=this.awaitPos=this.awaitIdentPos=0;this.labels=[];this.undefinedExports={};if(this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"){this.skipLineComment(2)}this.scopeStack=[];this.enterScope(C);this.regexpState=null};var G={inFunction:{configurable:true},inGenerator:{configurable:true},inAsync:{configurable:true},allowSuper:{configurable:true},allowDirectSuper:{configurable:true},treatFunctionsAsVar:{configurable:true}};K.prototype.parse=function parse(){var e=this.options.program||this.startNode();this.nextToken();return this.parseTopLevel(e)};G.inFunction.get=function(){return(this.currentVarScope().flags&R)>0};G.inGenerator.get=function(){return(this.currentVarScope().flags&O)>0};G.inAsync.get=function(){return(this.currentVarScope().flags&F)>0};G.allowSuper.get=function(){return(this.currentThisScope().flags&N)>0};G.allowDirectSuper.get=function(){return(this.currentThisScope().flags&I)>0};G.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};K.prototype.inNonArrowFunction=function inNonArrowFunction(){return(this.currentThisScope().flags&R)>0};K.extend=function extend(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var n=this;for(var i=0;i-1){this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element")}var n=t?e.parenthesizedAssign:e.parenthesizedBind;if(n>-1){this.raiseRecoverable(n,"Parenthesized pattern")}};X.checkExpressionErrors=function(e,t){if(!e){return false}var n=e.shorthandAssign;var i=e.doubleProto;if(!t){return n>=0||i>=0}if(n>=0){this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")}if(i>=0){this.raiseRecoverable(i,"Redefinition of __proto__ property")}};X.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos=6){this.unexpected()}return this.parseFunctionStatement(r,false,!e);case d._class:if(e){this.unexpected()}return this.parseClass(r,true);case d._if:return this.parseIfStatement(r);case d._return:return this.parseReturnStatement(r);case d._switch:return this.parseSwitchStatement(r);case d._throw:return this.parseThrowStatement(r);case d._try:return this.parseTryStatement(r);case d._const:case d._var:a=a||this.value;if(e&&a!=="var"){this.unexpected()}return this.parseVarStatement(r,a);case d._while:return this.parseWhileStatement(r);case d._with:return this.parseWithStatement(r);case d.braceL:return this.parseBlock(true,r);case d.semi:return this.parseEmptyStatement(r);case d._export:case d._import:if(this.options.ecmaVersion>10&&i===d._import){v.lastIndex=this.pos;var o=v.exec(this.input);var s=this.pos+o[0].length,u=this.input.charCodeAt(s);if(u===40){return this.parseExpressionStatement(r,this.parseExpression())}}if(!this.options.allowImportExportEverywhere){if(!t){this.raise(this.start,"'import' and 'export' may only appear at the top level")}if(!this.inModule){this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}}return i===d._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction()){if(e){this.unexpected()}this.next();return this.parseFunctionStatement(r,true,!e)}var c=this.value,l=this.parseExpression();if(i===d.name&&l.type==="Identifier"&&this.eat(d.colon)){return this.parseLabeledStatement(r,c,l,e)}else{return this.parseExpressionStatement(r,l)}}};W.parseBreakContinueStatement=function(e,t){var n=t==="break";this.next();if(this.eat(d.semi)||this.insertSemicolon()){e.label=null}else if(this.type!==d.name){this.unexpected()}else{e.label=this.parseIdent();this.semicolon()}var i=0;for(;i=6){this.eat(d.semi)}else{this.semicolon()}return this.finishNode(e,"DoWhileStatement")};W.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;this.labels.push(q);this.enterScope(0);this.expect(d.parenL);if(this.type===d.semi){if(t>-1){this.unexpected(t)}return this.parseFor(e,null)}var n=this.isLet();if(this.type===d._var||this.type===d._const||n){var i=this.startNode(),r=n?"let":this.value;this.next();this.parseVar(i,true,r);this.finishNode(i,"VariableDeclaration");if((this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&i.declarations.length===1){if(this.options.ecmaVersion>=9){if(this.type===d._in){if(t>-1){this.unexpected(t)}}else{e.await=t>-1}}return this.parseForIn(e,i)}if(t>-1){this.unexpected(t)}return this.parseFor(e,i)}var a=new DestructuringErrors;var o=this.parseExpression(true,a);if(this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of")){if(this.options.ecmaVersion>=9){if(this.type===d._in){if(t>-1){this.unexpected(t)}}else{e.await=t>-1}}this.toAssignable(o,false,a);this.checkLVal(o);return this.parseForIn(e,o)}else{this.checkExpressionErrors(a,true)}if(t>-1){this.unexpected(t)}return this.parseFor(e,o)};W.parseFunctionStatement=function(e,t,n){this.next();return this.parseFunction(e,$|(n?0:Z),false,t)};W.parseIfStatement=function(e){this.next();e.test=this.parseParenExpression();e.consequent=this.parseStatement("if");e.alternate=this.eat(d._else)?this.parseStatement("if"):null;return this.finishNode(e,"IfStatement")};W.parseReturnStatement=function(e){if(!this.inFunction&&!this.options.allowReturnOutsideFunction){this.raise(this.start,"'return' outside of function")}this.next();if(this.eat(d.semi)||this.insertSemicolon()){e.argument=null}else{e.argument=this.parseExpression();this.semicolon()}return this.finishNode(e,"ReturnStatement")};W.parseSwitchStatement=function(e){this.next();e.discriminant=this.parseParenExpression();e.cases=[];this.expect(d.braceL);this.labels.push(Y);this.enterScope(0);var t;for(var n=false;this.type!==d.braceR;){if(this.type===d._case||this.type===d._default){var i=this.type===d._case;if(t){this.finishNode(t,"SwitchCase")}e.cases.push(t=this.startNode());t.consequent=[];this.next();if(i){t.test=this.parseExpression()}else{if(n){this.raiseRecoverable(this.lastTokStart,"Multiple default clauses")}n=true;t.test=null}this.expect(d.colon)}else{if(!t){this.unexpected()}t.consequent.push(this.parseStatement(null))}}this.exitScope();if(t){this.finishNode(t,"SwitchCase")}this.next();this.labels.pop();return this.finishNode(e,"SwitchStatement")};W.parseThrowStatement=function(e){this.next();if(m.test(this.input.slice(this.lastTokEnd,this.start))){this.raise(this.lastTokEnd,"Illegal newline after throw")}e.argument=this.parseExpression();this.semicolon();return this.finishNode(e,"ThrowStatement")};var j=[];W.parseTryStatement=function(e){this.next();e.block=this.parseBlock();e.handler=null;if(this.type===d._catch){var t=this.startNode();this.next();if(this.eat(d.parenL)){t.param=this.parseBindingAtom();var n=t.param.type==="Identifier";this.enterScope(n?M:0);this.checkLVal(t.param,n?U:B);this.expect(d.parenR)}else{if(this.options.ecmaVersion<10){this.unexpected()}t.param=null;this.enterScope(0)}t.body=this.parseBlock(false);this.exitScope();e.handler=this.finishNode(t,"CatchClause")}e.finalizer=this.eat(d._finally)?this.parseBlock():null;if(!e.handler&&!e.finalizer){this.raise(e.start,"Missing catch or finally clause")}return this.finishNode(e,"TryStatement")};W.parseVarStatement=function(e,t){this.next();this.parseVar(e,false,t);this.semicolon();return this.finishNode(e,"VariableDeclaration")};W.parseWhileStatement=function(e){this.next();e.test=this.parseParenExpression();this.labels.push(q);e.body=this.parseStatement("while");this.labels.pop();return this.finishNode(e,"WhileStatement")};W.parseWithStatement=function(e){if(this.strict){this.raise(this.start,"'with' in strict mode")}this.next();e.object=this.parseParenExpression();e.body=this.parseStatement("with");return this.finishNode(e,"WithStatement")};W.parseEmptyStatement=function(e){this.next();return this.finishNode(e,"EmptyStatement")};W.parseLabeledStatement=function(e,t,n,i){for(var r=0,a=this.labels;r=0;u--){var c=this.labels[u];if(c.statementStart===e.start){c.statementStart=this.start;c.kind=s}else{break}}this.labels.push({name:t,kind:s,statementStart:this.start});e.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label");this.labels.pop();e.label=n;return this.finishNode(e,"LabeledStatement")};W.parseExpressionStatement=function(e,t){e.expression=t;this.semicolon();return this.finishNode(e,"ExpressionStatement")};W.parseBlock=function(e,t){if(e===void 0)e=true;if(t===void 0)t=this.startNode();t.body=[];this.expect(d.braceL);if(e){this.enterScope(0)}while(!this.eat(d.braceR)){var n=this.parseStatement(null);t.body.push(n)}if(e){this.exitScope()}return this.finishNode(t,"BlockStatement")};W.parseFor=function(e,t){e.init=t;this.expect(d.semi);e.test=this.type===d.semi?null:this.parseExpression();this.expect(d.semi);e.update=this.type===d.parenR?null:this.parseExpression();this.expect(d.parenR);e.body=this.parseStatement("for");this.exitScope();this.labels.pop();return this.finishNode(e,"ForStatement")};W.parseForIn=function(e,t){var n=this.type===d._in;this.next();if(t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")){this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer")}else if(t.type==="AssignmentPattern"){this.raise(t.start,"Invalid left-hand side in for-loop")}e.left=t;e.right=n?this.parseExpression():this.parseMaybeAssign();this.expect(d.parenR);e.body=this.parseStatement("for");this.exitScope();this.labels.pop();return this.finishNode(e,n?"ForInStatement":"ForOfStatement")};W.parseVar=function(e,t,n){e.declarations=[];e.kind=n;for(;;){var i=this.startNode();this.parseVarId(i,n);if(this.eat(d.eq)){i.init=this.parseMaybeAssign(t)}else if(n==="const"&&!(this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of"))){this.unexpected()}else if(i.id.type!=="Identifier"&&!(t&&(this.type===d._in||this.isContextual("of")))){this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value")}else{i.init=null}e.declarations.push(this.finishNode(i,"VariableDeclarator"));if(!this.eat(d.comma)){break}}return e};W.parseVarId=function(e,t){e.id=this.parseBindingAtom();this.checkLVal(e.id,t==="var"?L:B,false)};var $=1,Z=2,Q=4;W.parseFunction=function(e,t,n,i){this.initFunction(e);if(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i){if(this.type===d.star&&t&Z){this.unexpected()}e.generator=this.eat(d.star)}if(this.options.ecmaVersion>=8){e.async=!!i}if(t&$){e.id=t&Q&&this.type!==d.name?null:this.parseIdent();if(e.id&&!(t&Z)){this.checkLVal(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?L:B:V)}}var r=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;this.enterScope(functionFlags(e.async,e.generator));if(!(t&$)){e.id=this.type===d.name?this.parseIdent():null}this.parseFunctionParams(e);this.parseFunctionBody(e,n,false);this.yieldPos=r;this.awaitPos=a;this.awaitIdentPos=o;return this.finishNode(e,t&$?"FunctionDeclaration":"FunctionExpression")};W.parseFunctionParams=function(e){this.expect(d.parenL);e.params=this.parseBindingList(d.parenR,false,this.options.ecmaVersion>=8);this.checkYieldAwaitInDefaultParams()};W.parseClass=function(e,t){this.next();var n=this.strict;this.strict=true;this.parseClassId(e,t);this.parseClassSuper(e);var i=this.startNode();var r=false;i.body=[];this.expect(d.braceL);while(!this.eat(d.braceR)){var a=this.parseClassElement(e.superClass!==null);if(a){i.body.push(a);if(a.type==="MethodDefinition"&&a.kind==="constructor"){if(r){this.raise(a.start,"Duplicate constructor in the same class")}r=true}}}e.body=this.finishNode(i,"ClassBody");this.strict=n;return this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};W.parseClassElement=function(e){var t=this;if(this.eat(d.semi)){return null}var n=this.startNode();var i=function(e,i){if(i===void 0)i=false;var r=t.start,a=t.startLoc;if(!t.eatContextual(e)){return false}if(t.type!==d.parenL&&(!i||!t.canInsertSemicolon())){return true}if(n.key){t.unexpected()}n.computed=false;n.key=t.startNodeAt(r,a);n.key.name=e;t.finishNode(n.key,"Identifier");return false};n.kind="method";n.static=i("static");var r=this.eat(d.star);var a=false;if(!r){if(this.options.ecmaVersion>=8&&i("async",true)){a=true;r=this.options.ecmaVersion>=9&&this.eat(d.star)}else if(i("get")){n.kind="get"}else if(i("set")){n.kind="set"}}if(!n.key){this.parsePropertyName(n)}var o=n.key;var s=false;if(!n.computed&&!n.static&&(o.type==="Identifier"&&o.name==="constructor"||o.type==="Literal"&&o.value==="constructor")){if(n.kind!=="method"){this.raise(o.start,"Constructor can't have get/set modifier")}if(r){this.raise(o.start,"Constructor can't be a generator")}if(a){this.raise(o.start,"Constructor can't be an async method")}n.kind="constructor";s=e}else if(n.static&&o.type==="Identifier"&&o.name==="prototype"){this.raise(o.start,"Classes may not have a static property named prototype")}this.parseClassMethod(n,r,a,s);if(n.kind==="get"&&n.value.params.length!==0){this.raiseRecoverable(n.value.start,"getter should have no params")}if(n.kind==="set"&&n.value.params.length!==1){this.raiseRecoverable(n.value.start,"setter should have exactly one param")}if(n.kind==="set"&&n.value.params[0].type==="RestElement"){this.raiseRecoverable(n.value.params[0].start,"Setter cannot use rest params")}return n};W.parseClassMethod=function(e,t,n,i){e.value=this.parseMethod(t,n,i);return this.finishNode(e,"MethodDefinition")};W.parseClassId=function(e,t){if(this.type===d.name){e.id=this.parseIdent();if(t){this.checkLVal(e.id,B,false)}}else{if(t===true){this.unexpected()}e.id=null}};W.parseClassSuper=function(e){e.superClass=this.eat(d._extends)?this.parseExprSubscripts():null};W.parseExport=function(e,t){this.next();if(this.eat(d.star)){this.expectContextual("from");if(this.type!==d.string){this.unexpected()}e.source=this.parseExprAtom();this.semicolon();return this.finishNode(e,"ExportAllDeclaration")}if(this.eat(d._default)){this.checkExport(t,"default",this.lastTokStart);var n;if(this.type===d._function||(n=this.isAsyncFunction())){var i=this.startNode();this.next();if(n){this.next()}e.declaration=this.parseFunction(i,$|Q,false,n)}else if(this.type===d._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else{e.declaration=this.parseMaybeAssign();this.semicolon()}return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement()){e.declaration=this.parseStatement(null);if(e.declaration.type==="VariableDeclaration"){this.checkVariableExport(t,e.declaration.declarations)}else{this.checkExport(t,e.declaration.id.name,e.declaration.id.start)}e.specifiers=[];e.source=null}else{e.declaration=null;e.specifiers=this.parseExportSpecifiers(t);if(this.eatContextual("from")){if(this.type!==d.string){this.unexpected()}e.source=this.parseExprAtom()}else{for(var a=0,o=e.specifiers;a=6&&e){switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await"){this.raise(e.start,"Cannot use 'await' as identifier inside an async function")}break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";if(n){this.checkPatternErrors(n,true)}for(var i=0,r=e.properties;i=8&&!a&&o.name==="async"&&!this.canInsertSemicolon()&&this.eat(d._function)){return this.parseFunction(this.startNodeAt(i,r),0,false,true)}if(n&&!this.canInsertSemicolon()){if(this.eat(d.arrow)){return this.parseArrowExpression(this.startNodeAt(i,r),[o],false)}if(this.options.ecmaVersion>=8&&o.name==="async"&&this.type===d.name&&!a){o=this.parseIdent(false);if(this.canInsertSemicolon()||!this.eat(d.arrow)){this.unexpected()}return this.parseArrowExpression(this.startNodeAt(i,r),[o],true)}}return o;case d.regexp:var s=this.value;t=this.parseLiteral(s.value);t.regex={pattern:s.pattern,flags:s.flags};return t;case d.num:case d.string:return this.parseLiteral(this.value);case d._null:case d._true:case d._false:t=this.startNode();t.value=this.type===d._null?null:this.type===d._true;t.raw=this.type.keyword;this.next();return this.finishNode(t,"Literal");case d.parenL:var u=this.start,c=this.parseParenAndDistinguishExpression(n);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)){e.parenthesizedAssign=u}if(e.parenthesizedBind<0){e.parenthesizedBind=u}}return c;case d.bracketL:t=this.startNode();this.next();t.elements=this.parseExprList(d.bracketR,true,true,e);return this.finishNode(t,"ArrayExpression");case d.braceL:return this.parseObj(false,e);case d._function:t=this.startNode();this.next();return this.parseFunction(t,0);case d._class:return this.parseClass(this.startNode(),false);case d._new:return this.parseNew();case d.backQuote:return this.parseTemplate();case d._import:if(this.options.ecmaVersion>=11){return this.parseExprImport()}else{return this.unexpected()}default:this.unexpected()}};ee.parseExprImport=function(){var e=this.startNode();this.next();switch(this.type){case d.parenL:return this.parseDynamicImport(e);default:this.unexpected()}};ee.parseDynamicImport=function(e){this.next();e.source=this.parseMaybeAssign();if(!this.eat(d.parenR)){var t=this.start;if(this.eat(d.comma)&&this.eat(d.parenR)){this.raiseRecoverable(t,"Trailing comma is not allowed in import()")}else{this.unexpected(t)}}return this.finishNode(e,"ImportExpression")};ee.parseLiteral=function(e){var t=this.startNode();t.value=e;t.raw=this.input.slice(this.start,this.end);if(t.raw.charCodeAt(t.raw.length-1)===110){t.bigint=t.raw.slice(0,-1)}this.next();return this.finishNode(t,"Literal")};ee.parseParenExpression=function(){this.expect(d.parenL);var e=this.parseExpression();this.expect(d.parenR);return e};ee.parseParenAndDistinguishExpression=function(e){var t=this.start,n=this.startLoc,i,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,o=this.startLoc;var s=[],u=true,c=false;var l=new DestructuringErrors,f=this.yieldPos,p=this.awaitPos,_;this.yieldPos=0;this.awaitPos=0;while(this.type!==d.parenR){u?u=false:this.expect(d.comma);if(r&&this.afterTrailingComma(d.parenR,true)){c=true;break}else if(this.type===d.ellipsis){_=this.start;s.push(this.parseParenItem(this.parseRestBinding()));if(this.type===d.comma){this.raise(this.start,"Comma is not permitted after the rest element")}break}else{s.push(this.parseMaybeAssign(false,l,this.parseParenItem))}}var h=this.start,m=this.startLoc;this.expect(d.parenR);if(e&&!this.canInsertSemicolon()&&this.eat(d.arrow)){this.checkPatternErrors(l,false);this.checkYieldAwaitInDefaultParams();this.yieldPos=f;this.awaitPos=p;return this.parseParenArrowList(t,n,s)}if(!s.length||c){this.unexpected(this.lastTokStart)}if(_){this.unexpected(_)}this.checkExpressionErrors(l,true);this.yieldPos=f||this.yieldPos;this.awaitPos=p||this.awaitPos;if(s.length>1){i=this.startNodeAt(a,o);i.expressions=s;this.finishNodeAt(i,"SequenceExpression",h,m)}else{i=s[0]}}else{i=this.parseParenExpression()}if(this.options.preserveParens){var E=this.startNodeAt(t,n);E.expression=i;return this.finishNode(E,"ParenthesizedExpression")}else{return i}};ee.parseParenItem=function(e){return e};ee.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var te=[];ee.parseNew=function(){if(this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword new")}var e=this.startNode();var t=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(d.dot)){e.meta=t;var n=this.containsEsc;e.property=this.parseIdent(true);if(e.property.name!=="target"||n){this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target")}if(!this.inNonArrowFunction()){this.raiseRecoverable(e.start,"new.target can only be used in functions")}return this.finishNode(e,"MetaProperty")}var i=this.start,r=this.startLoc,a=this.type===d._import;e.callee=this.parseSubscripts(this.parseExprAtom(),i,r,true);if(a&&e.callee.type==="ImportExpression"){this.raise(i,"Cannot use new with import()")}if(this.eat(d.parenL)){e.arguments=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,false)}else{e.arguments=te}return this.finishNode(e,"NewExpression")};ee.parseTemplateElement=function(e){var t=e.isTagged;var n=this.startNode();if(this.type===d.invalidTemplate){if(!t){this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal")}n.value={raw:this.value,cooked:null}}else{n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value}}this.next();n.tail=this.type===d.backQuote;return this.finishNode(n,"TemplateElement")};ee.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=false;var n=this.startNode();this.next();n.expressions=[];var i=this.parseTemplateElement({isTagged:t});n.quasis=[i];while(!i.tail){if(this.type===d.eof){this.raise(this.pos,"Unterminated template literal")}this.expect(d.dollarBraceL);n.expressions.push(this.parseExpression());this.expect(d.braceR);n.quasis.push(i=this.parseTemplateElement({isTagged:t}))}this.next();return this.finishNode(n,"TemplateLiteral")};ee.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===d.name||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===d.star)&&!m.test(this.input.slice(this.lastTokEnd,this.start))};ee.parseObj=function(e,t){var n=this.startNode(),i=true,r={};n.properties=[];this.next();while(!this.eat(d.braceR)){if(!i){this.expect(d.comma);if(this.options.ecmaVersion>=5&&this.afterTrailingComma(d.braceR)){break}}else{i=false}var a=this.parseProperty(e,t);if(!e){this.checkPropClash(a,r,t)}n.properties.push(a)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};ee.parseProperty=function(e,t){var n=this.startNode(),i,r,a,o;if(this.options.ecmaVersion>=9&&this.eat(d.ellipsis)){if(e){n.argument=this.parseIdent(false);if(this.type===d.comma){this.raise(this.start,"Comma is not permitted after the rest element")}return this.finishNode(n,"RestElement")}if(this.type===d.parenL&&t){if(t.parenthesizedAssign<0){t.parenthesizedAssign=this.start}if(t.parenthesizedBind<0){t.parenthesizedBind=this.start}}n.argument=this.parseMaybeAssign(false,t);if(this.type===d.comma&&t&&t.trailingComma<0){t.trailingComma=this.start}return this.finishNode(n,"SpreadElement")}if(this.options.ecmaVersion>=6){n.method=false;n.shorthand=false;if(e||t){a=this.start;o=this.startLoc}if(!e){i=this.eat(d.star)}}var s=this.containsEsc;this.parsePropertyName(n);if(!e&&!s&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(n)){r=true;i=this.options.ecmaVersion>=9&&this.eat(d.star);this.parsePropertyName(n,t)}else{r=false}this.parsePropertyValue(n,e,i,r,a,o,t,s);return this.finishNode(n,"Property")};ee.parsePropertyValue=function(e,t,n,i,r,a,o,s){if((n||i)&&this.type===d.colon){this.unexpected()}if(this.eat(d.colon)){e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(false,o);e.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===d.parenL){if(t){this.unexpected()}e.kind="init";e.method=true;e.value=this.parseMethod(n,i)}else if(!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==d.comma&&this.type!==d.braceR)){if(n||i){this.unexpected()}e.kind=e.key.name;this.parsePropertyName(e);e.value=this.parseMethod(false);var u=e.kind==="get"?0:1;if(e.value.params.length!==u){var c=e.value.start;if(e.kind==="get"){this.raiseRecoverable(c,"getter should have no params")}else{this.raiseRecoverable(c,"setter should have exactly one param")}}else{if(e.kind==="set"&&e.value.params[0].type==="RestElement"){this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}}}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(n||i){this.unexpected()}this.checkUnreserved(e.key);if(e.key.name==="await"&&!this.awaitIdentPos){this.awaitIdentPos=r}e.kind="init";if(t){e.value=this.parseMaybeDefault(r,a,e.key)}else if(this.type===d.eq&&o){if(o.shorthandAssign<0){o.shorthandAssign=this.start}e.value=this.parseMaybeDefault(r,a,e.key)}else{e.value=e.key}e.shorthand=true}else{this.unexpected()}};ee.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(d.bracketL)){e.computed=true;e.key=this.parseMaybeAssign();this.expect(d.bracketR);return e.key}else{e.computed=false}}return e.key=this.type===d.num||this.type===d.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};ee.initFunction=function(e){e.id=null;if(this.options.ecmaVersion>=6){e.generator=e.expression=false}if(this.options.ecmaVersion>=8){e.async=false}};ee.parseMethod=function(e,t,n){var i=this.startNode(),r=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;this.initFunction(i);if(this.options.ecmaVersion>=6){i.generator=e}if(this.options.ecmaVersion>=8){i.async=!!t}this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;this.enterScope(functionFlags(t,i.generator)|N|(n?I:0));this.expect(d.parenL);i.params=this.parseBindingList(d.parenR,false,this.options.ecmaVersion>=8);this.checkYieldAwaitInDefaultParams();this.parseFunctionBody(i,false,true);this.yieldPos=r;this.awaitPos=a;this.awaitIdentPos=o;return this.finishNode(i,"FunctionExpression")};ee.parseArrowExpression=function(e,t,n){var i=this.yieldPos,r=this.awaitPos,a=this.awaitIdentPos;this.enterScope(functionFlags(n,false)|w);this.initFunction(e);if(this.options.ecmaVersion>=8){e.async=!!n}this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;e.params=this.toAssignableList(t,true);this.parseFunctionBody(e,true,false);this.yieldPos=i;this.awaitPos=r;this.awaitIdentPos=a;return this.finishNode(e,"ArrowFunctionExpression")};ee.parseFunctionBody=function(e,t,n){var i=t&&this.type!==d.braceL;var r=this.strict,a=false;if(i){e.body=this.parseMaybeAssign();e.expression=true;this.checkParams(e,false)}else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!r||o){a=this.strictDirective(this.end);if(a&&o){this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}}var s=this.labels;this.labels=[];if(a){this.strict=true}this.checkParams(e,!r&&!a&&!t&&!n&&this.isSimpleParamList(e.params));e.body=this.parseBlock(false);e.expression=false;this.adaptDirectivePrologue(e.body.body);this.labels=s}this.exitScope();if(this.strict&&e.id){this.checkLVal(e.id,z)}this.strict=r};ee.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);if(this.inModule&&r.flags&C){delete this.undefinedExports[e]}}else if(t===U){var a=this.currentScope();a.lexical.push(e)}else if(t===V){var o=this.currentScope();if(this.treatFunctionsAsVar){i=o.lexical.indexOf(e)>-1}else{i=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1}o.functions.push(e)}else{for(var s=this.scopeStack.length-1;s>=0;--s){var u=this.scopeStack[s];if(u.lexical.indexOf(e)>-1&&!(u.flags&M&&u.lexical[0]===e)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(e)>-1){i=true;break}u.var.push(e);if(this.inModule&&u.flags&C){delete this.undefinedExports[e]}if(u.flags&x){break}}}if(i){this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")}};ie.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1){this.undefinedExports[e.name]=e}};ie.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ie.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&x){return t}}};ie.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&x&&!(t.flags&w)){return t}}};var ae=function Node(e,t,n){this.type="";this.start=t;this.end=0;if(e.options.locations){this.loc=new T(e,n)}if(e.options.directSourceFile){this.sourceFile=e.options.directSourceFile}if(e.options.ranges){this.range=[t,0]}};var oe=K.prototype;oe.startNode=function(){return new ae(this,this.start,this.startLoc)};oe.startNodeAt=function(e,t){return new ae(this,e,t)};function finishNodeAt(e,t,n,i){e.type=t;e.end=n;if(this.options.locations){e.loc.end=i}if(this.options.ranges){e.range[1]=n}return e}oe.finishNode=function(e,t){return finishNodeAt.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};oe.finishNodeAt=function(e,t,n,i){return finishNodeAt.call(this,e,t,n,i)};var se=function TokContext(e,t,n,i,r){this.token=e;this.isExpr=!!t;this.preserveSpace=!!n;this.override=i;this.generator=!!r};var ue={b_stat:new se("{",false),b_expr:new se("{",true),b_tmpl:new se("${",false),p_stat:new se("(",false),p_expr:new se("(",true),q_tmpl:new se("`",true,true,function(e){return e.tryReadTemplateToken()}),f_stat:new se("function",false),f_expr:new se("function",true),f_expr_gen:new se("function",true,false,null,true),f_gen:new se("function",false,false,null,true)};var ce=K.prototype;ce.initialContext=function(){return[ue.b_stat]};ce.braceIsBlock=function(e){var t=this.curContext();if(t===ue.f_expr||t===ue.f_stat){return true}if(e===d.colon&&(t===ue.b_stat||t===ue.b_expr)){return!t.isExpr}if(e===d._return||e===d.name&&this.exprAllowed){return m.test(this.input.slice(this.lastTokEnd,this.start))}if(e===d._else||e===d.semi||e===d.eof||e===d.parenR||e===d.arrow){return true}if(e===d.braceL){return t===ue.b_stat}if(e===d._var||e===d._const||e===d.name){return false}return!this.exprAllowed};ce.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function"){return t.generator}}return false};ce.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===d.dot){this.exprAllowed=false}else if(t=n.updateContext){t.call(this,e)}else{this.exprAllowed=n.beforeExpr}};d.parenR.updateContext=d.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=true;return}var e=this.context.pop();if(e===ue.b_stat&&this.curContext().token==="function"){e=this.context.pop()}this.exprAllowed=!e.isExpr};d.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ue.b_stat:ue.b_expr);this.exprAllowed=true};d.dollarBraceL.updateContext=function(){this.context.push(ue.b_tmpl);this.exprAllowed=true};d.parenL.updateContext=function(e){var t=e===d._if||e===d._for||e===d._with||e===d._while;this.context.push(t?ue.p_stat:ue.p_expr);this.exprAllowed=true};d.incDec.updateContext=function(){};d._function.updateContext=d._class.updateContext=function(e){if(e.beforeExpr&&e!==d.semi&&e!==d._else&&!(e===d._return&&m.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===d.colon||e===d.braceL)&&this.curContext()===ue.b_stat)){this.context.push(ue.f_expr)}else{this.context.push(ue.f_stat)}this.exprAllowed=false};d.backQuote.updateContext=function(){if(this.curContext()===ue.q_tmpl){this.context.pop()}else{this.context.push(ue.q_tmpl)}this.exprAllowed=false};d.star.updateContext=function(e){if(e===d._function){var t=this.context.length-1;if(this.context[t]===ue.f_expr){this.context[t]=ue.f_expr_gen}else{this.context[t]=ue.f_gen}}this.exprAllowed=true};d.name.updateContext=function(e){var t=false;if(this.options.ecmaVersion>=6&&e!==d.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext()){t=true}}this.exprAllowed=t};var le="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";var fe=le+" Extended_Pictographic";var pe=fe;var _e={9:le,10:fe,11:pe};var he="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";var de="Adlam Adlm Ahom 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 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";var me=de+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";var Ee=me+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";var ge={9:de,10:me,11:Ee};var ve={};function buildUnicodeData(e){var t=ve[e]={binary:wordsRegexp(_e[e]+" "+he),nonBinary:{General_Category:wordsRegexp(he),Script:wordsRegexp(ge[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}buildUnicodeData(9);buildUnicodeData(10);buildUnicodeData(11);var De=K.prototype;var be=function RegExpValidationState(e){this.parser=e;this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"");this.unicodeProperties=ve[e.options.ecmaVersion>=11?11:e.options.ecmaVersion];this.source="";this.flags="";this.start=0;this.switchU=false;this.switchN=false;this.pos=0;this.lastIntValue=0;this.lastStringValue="";this.lastAssertionIsQuantifiable=false;this.numCapturingParens=0;this.maxBackReference=0;this.groupNames=[];this.backReferenceNames=[]};be.prototype.reset=function reset(e,t,n){var i=n.indexOf("u")!==-1;this.start=e|0;this.source=t+"";this.flags=n;this.switchU=i&&this.parser.options.ecmaVersion>=6;this.switchN=i&&this.parser.options.ecmaVersion>=9};be.prototype.raise=function raise(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};be.prototype.at=function at(e){var t=this.source;var n=t.length;if(e>=n){return-1}var i=t.charCodeAt(e);if(!this.switchU||i<=55295||i>=57344||e+1>=n){return i}var r=t.charCodeAt(e+1);return r>=56320&&r<=57343?(i<<10)+r-56613888:i};be.prototype.nextIndex=function nextIndex(e){var t=this.source;var n=t.length;if(e>=n){return n}var i=t.charCodeAt(e),r;if(!this.switchU||i<=55295||i>=57344||e+1>=n||(r=t.charCodeAt(e+1))<56320||r>57343){return e+1}return e+2};be.prototype.current=function current(){return this.at(this.pos)};be.prototype.lookahead=function lookahead(){return this.at(this.nextIndex(this.pos))};be.prototype.advance=function advance(){this.pos=this.nextIndex(this.pos)};be.prototype.eat=function eat(e){if(this.current()===e){this.advance();return true}return false};function codePointToString(e){if(e<=65535){return String.fromCharCode(e)}e-=65536;return String.fromCharCode((e>>10)+55296,(e&1023)+56320)}De.validateRegExpFlags=function(e){var t=e.validFlags;var n=e.flags;for(var i=0;i-1){this.raise(e.start,"Duplicate regular expression flag")}}};De.validateRegExpPattern=function(e){this.regexp_pattern(e);if(!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0){e.switchN=true;this.regexp_pattern(e)}};De.regexp_pattern=function(e){e.pos=0;e.lastIntValue=0;e.lastStringValue="";e.lastAssertionIsQuantifiable=false;e.numCapturingParens=0;e.maxBackReference=0;e.groupNames.length=0;e.backReferenceNames.length=0;this.regexp_disjunction(e);if(e.pos!==e.source.length){if(e.eat(41)){e.raise("Unmatched ')'")}if(e.eat(93)||e.eat(125)){e.raise("Lone quantifier brackets")}}if(e.maxBackReference>e.numCapturingParens){e.raise("Invalid escape")}for(var t=0,n=e.backReferenceNames;t=9){n=e.eat(60)}if(e.eat(61)||e.eat(33)){this.regexp_disjunction(e);if(!e.eat(41)){e.raise("Unterminated group")}e.lastAssertionIsQuantifiable=!n;return true}}e.pos=t;return false};De.regexp_eatQuantifier=function(e,t){if(t===void 0)t=false;if(this.regexp_eatQuantifierPrefix(e,t)){e.eat(63);return true}return false};De.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};De.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var i=0,r=-1;if(this.regexp_eatDecimalDigits(e)){i=e.lastIntValue;if(e.eat(44)&&this.regexp_eatDecimalDigits(e)){r=e.lastIntValue}if(e.eat(125)){if(r!==-1&&r=9){this.regexp_groupSpecifier(e)}else if(e.current()===63){e.raise("Invalid group")}this.regexp_disjunction(e);if(e.eat(41)){e.numCapturingParens+=1;return true}e.raise("Unterminated group")}return false};De.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)};De.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,true)){e.raise("Nothing to repeat")}return false};De.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(isSyntaxCharacter(t)){e.lastIntValue=t;e.advance();return true}return false};function isSyntaxCharacter(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}De.regexp_eatPatternCharacters=function(e){var t=e.pos;var n=0;while((n=e.current())!==-1&&!isSyntaxCharacter(n)){e.advance()}return e.pos!==t};De.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();if(t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124){e.advance();return true}return false};De.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){if(e.groupNames.indexOf(e.lastStringValue)!==-1){e.raise("Duplicate capture group name")}e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};De.regexp_eatGroupName=function(e){e.lastStringValue="";if(e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62)){return true}e.raise("Invalid capture group name")}return false};De.regexp_eatRegExpIdentifierName=function(e){e.lastStringValue="";if(this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=codePointToString(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e)){e.lastStringValue+=codePointToString(e.lastIntValue)}return true}return false};De.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos;var n=e.current();e.advance();if(n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e)){n=e.lastIntValue}if(isRegExpIdentifierStart(n)){e.lastIntValue=n;return true}e.pos=t;return false};function isRegExpIdentifierStart(e){return isIdentifierStart(e,true)||e===36||e===95}De.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos;var n=e.current();e.advance();if(n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e)){n=e.lastIntValue}if(isRegExpIdentifierPart(n)){e.lastIntValue=n;return true}e.pos=t;return false};function isRegExpIdentifierPart(e){return isIdentifierChar(e,true)||e===36||e===95||e===8204||e===8205}De.regexp_eatAtomEscape=function(e){if(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)){return true}if(e.switchU){if(e.current()===99){e.raise("Invalid unicode escape")}e.raise("Invalid escape")}return false};De.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU){if(n>e.maxBackReference){e.maxBackReference=n}return true}if(n<=e.numCapturingParens){return true}e.pos=t}return false};De.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e)){e.backReferenceNames.push(e.lastStringValue);return true}e.raise("Invalid named reference")}return false};De.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)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};De.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e)){return true}e.pos=t}return false};De.regexp_eatZero=function(e){if(e.current()===48&&!isDecimalDigit(e.lookahead())){e.lastIntValue=0;e.advance();return true}return false};De.regexp_eatControlEscape=function(e){var t=e.current();if(t===116){e.lastIntValue=9;e.advance();return true}if(t===110){e.lastIntValue=10;e.advance();return true}if(t===118){e.lastIntValue=11;e.advance();return true}if(t===102){e.lastIntValue=12;e.advance();return true}if(t===114){e.lastIntValue=13;e.advance();return true}return false};De.regexp_eatControlLetter=function(e){var t=e.current();if(isControlLetter(t)){e.lastIntValue=t%32;e.advance();return true}return false};function isControlLetter(e){return e>=65&&e<=90||e>=97&&e<=122}De.regexp_eatRegExpUnicodeEscapeSequence=function(e){var t=e.pos;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(e.switchU&&n>=55296&&n<=56319){var i=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(r>=56320&&r<=57343){e.lastIntValue=(n-55296)*1024+(r-56320)+65536;return true}}e.pos=i;e.lastIntValue=n}return true}if(e.switchU&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&isValidUnicode(e.lastIntValue)){return true}if(e.switchU){e.raise("Invalid unicode escape")}e.pos=t}return false};function isValidUnicode(e){return e>=0&&e<=1114111}De.regexp_eatIdentityEscape=function(e){if(e.switchU){if(this.regexp_eatSyntaxCharacter(e)){return true}if(e.eat(47)){e.lastIntValue=47;return true}return false}var t=e.current();if(t!==99&&(!e.switchN||t!==107)){e.lastIntValue=t;e.advance();return true}return false};De.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 true}return false};De.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(isCharacterClassEscape(t)){e.lastIntValue=-1;e.advance();return true}if(e.switchU&&this.options.ecmaVersion>=9&&(t===80||t===112)){e.lastIntValue=-1;e.advance();if(e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125)){return true}e.raise("Invalid property name")}return false};function isCharacterClassEscape(e){return e===100||e===68||e===115||e===83||e===119||e===87}De.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 i=e.lastStringValue;this.regexp_validateUnicodePropertyNameAndValue(e,n,i);return true}}e.pos=t;if(this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;this.regexp_validateUnicodePropertyNameOrValue(e,r);return true}return false};De.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){if(!has(e.unicodeProperties.nonBinary,t)){e.raise("Invalid property name")}if(!e.unicodeProperties.nonBinary[t].test(n)){e.raise("Invalid property value")}};De.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(!e.unicodeProperties.binary.test(t)){e.raise("Invalid property name")}};De.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(isUnicodePropertyNameCharacter(t=e.current())){e.lastStringValue+=codePointToString(t);e.advance()}return e.lastStringValue!==""};function isUnicodePropertyNameCharacter(e){return isControlLetter(e)||e===95}De.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(isUnicodePropertyValueCharacter(t=e.current())){e.lastStringValue+=codePointToString(t);e.advance()}return e.lastStringValue!==""};function isUnicodePropertyValueCharacter(e){return isUnicodePropertyNameCharacter(e)||isDecimalDigit(e)}De.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};De.regexp_eatCharacterClass=function(e){if(e.eat(91)){e.eat(94);this.regexp_classRanges(e);if(e.eat(93)){return true}e.raise("Unterminated character class")}return false};De.regexp_classRanges=function(e){while(this.regexp_eatClassAtom(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;if(e.switchU&&(t===-1||n===-1)){e.raise("Invalid character class")}if(t!==-1&&n!==-1&&t>n){e.raise("Range out of order in character class")}}}};De.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e)){return true}if(e.switchU){var n=e.current();if(n===99||isOctalDigit(n)){e.raise("Invalid class escape")}e.raise("Invalid escape")}e.pos=t}var i=e.current();if(i!==93){e.lastIntValue=i;e.advance();return true}return false};De.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98)){e.lastIntValue=8;return true}if(e.switchU&&e.eat(45)){e.lastIntValue=45;return true}if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e)){return true}e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};De.regexp_eatClassControlLetter=function(e){var t=e.current();if(isDecimalDigit(t)||t===95){e.lastIntValue=t%32;e.advance();return true}return false};De.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2)){return true}if(e.switchU){e.raise("Invalid escape")}e.pos=t}return false};De.regexp_eatDecimalDigits=function(e){var t=e.pos;var n=0;e.lastIntValue=0;while(isDecimalDigit(n=e.current())){e.lastIntValue=10*e.lastIntValue+(n-48);e.advance()}return e.pos!==t};function isDecimalDigit(e){return e>=48&&e<=57}De.regexp_eatHexDigits=function(e){var t=e.pos;var n=0;e.lastIntValue=0;while(isHexDigit(n=e.current())){e.lastIntValue=16*e.lastIntValue+hexToInt(n);e.advance()}return e.pos!==t};function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hexToInt(e){if(e>=65&&e<=70){return 10+(e-65)}if(e>=97&&e<=102){return 10+(e-97)}return e-48}De.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;if(t<=3&&this.regexp_eatOctalDigit(e)){e.lastIntValue=t*64+n*8+e.lastIntValue}else{e.lastIntValue=t*8+n}}else{e.lastIntValue=t}return true}return false};De.regexp_eatOctalDigit=function(e){var t=e.current();if(isOctalDigit(t)){e.lastIntValue=t-48;e.advance();return true}e.lastIntValue=0;return false};function isOctalDigit(e){return e>=48&&e<=55}De.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var i=0;i=this.input.length){return this.finishToken(d.eof)}if(e.override){return e.override(this)}else{this.readToken(this.fullCharCodeAtPos())}};ke.readToken=function(e){if(isIdentifierStart(e,this.options.ecmaVersion>=6)||e===92){return this.readWord()}return this.getTokenFromCode(e)};ke.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344){return e}var t=this.input.charCodeAt(this.pos+1);return(e<<10)+t-56613888};ke.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition();var t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1){this.raise(this.pos-2,"Unterminated comment")}this.pos=n+2;if(this.options.locations){E.lastIndex=t;var i;while((i=E.exec(this.input))&&i.index8&&e<14||e>=5760&&g.test(String.fromCharCode(e))){++this.pos}else{break e}}}};ke.finishToken=function(e,t){this.end=this.pos;if(this.options.locations){this.endLoc=this.curPosition()}var n=this.type;this.type=e;this.value=t;this.updateContext(n)};ke.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57){return this.readNumber(true)}var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46){this.pos+=3;return this.finishToken(d.ellipsis)}else{++this.pos;return this.finishToken(d.dot)}};ke.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed){++this.pos;return this.readRegexp()}if(e===61){return this.finishOp(d.assign,2)}return this.finishOp(d.slash,1)};ke.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1);var n=1;var i=e===42?d.star:d.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42){++n;i=d.starstar;t=this.input.charCodeAt(this.pos+2)}if(t===61){return this.finishOp(d.assign,n+1)}return this.finishOp(i,n)};ke.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){return this.finishOp(e===124?d.logicalOR:d.logicalAND,2)}if(t===61){return this.finishOp(d.assign,2)}return this.finishOp(e===124?d.bitwiseOR:d.bitwiseAND,1)};ke.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61){return this.finishOp(d.assign,2)}return this.finishOp(d.bitwiseXOR,1)};ke.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||m.test(this.input.slice(this.lastTokEnd,this.pos)))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(d.incDec,2)}if(t===61){return this.finishOp(d.assign,2)}return this.finishOp(d.plusMin,1)};ke.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1);var n=1;if(t===e){n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2;if(this.input.charCodeAt(this.pos+n)===61){return this.finishOp(d.assign,n+1)}return this.finishOp(d.bitShift,n)}if(t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45){this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(t===61){n=2}return this.finishOp(d.relational,n)};ke.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61){return this.finishOp(d.equality,this.input.charCodeAt(this.pos+2)===61?3:2)}if(e===61&&t===62&&this.options.ecmaVersion>=6){this.pos+=2;return this.finishToken(d.arrow)}return this.finishOp(e===61?d.eq:d.prefix,1)};ke.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:++this.pos;return this.finishToken(d.parenL);case 41:++this.pos;return this.finishToken(d.parenR);case 59:++this.pos;return this.finishToken(d.semi);case 44:++this.pos;return this.finishToken(d.comma);case 91:++this.pos;return this.finishToken(d.bracketL);case 93:++this.pos;return this.finishToken(d.bracketR);case 123:++this.pos;return this.finishToken(d.braceL);case 125:++this.pos;return this.finishToken(d.braceR);case 58:++this.pos;return this.finishToken(d.colon);case 63:++this.pos;return this.finishToken(d.question);case 96:if(this.options.ecmaVersion<6){break}++this.pos;return this.finishToken(d.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88){return this.readRadixNumber(16)}if(this.options.ecmaVersion>=6){if(t===111||t===79){return this.readRadixNumber(8)}if(t===98||t===66){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(false);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 126:return this.finishOp(d.prefix,1)}this.raise(this.pos,"Unexpected character '"+codePointToString$1(e)+"'")};ke.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);this.pos+=t;return this.finishToken(e,n)};ke.readRegexp=function(){var e,t,n=this.pos;for(;;){if(this.pos>=this.input.length){this.raise(n,"Unterminated regular expression")}var i=this.input.charAt(this.pos);if(m.test(i)){this.raise(n,"Unterminated regular expression")}if(!e){if(i==="["){t=true}else if(i==="]"&&t){t=false}else if(i==="/"&&!t){break}e=i==="\\"}else{e=false}++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var a=this.pos;var o=this.readWord1();if(this.containsEsc){this.unexpected(a)}var s=this.regexpState||(this.regexpState=new be(this));s.reset(n,r,o);this.validateRegExpFlags(s);this.validateRegExpPattern(s);var u=null;try{u=new RegExp(r,o)}catch(e){}return this.finishToken(d.regexp,{pattern:r,flags:o,value:u})};ke.readInt=function(e,t){var n=this.pos,i=0;for(var r=0,a=t==null?Infinity:t;r=97){s=o-97+10}else if(o>=65){s=o-65+10}else if(o>=48&&o<=57){s=o-48}else{s=Infinity}if(s>=e){break}++this.pos;i=i*e+s}if(this.pos===n||t!=null&&this.pos-n!==t){return null}return i};ke.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);if(n==null){this.raise(this.start+2,"Expected number in radix "+e)}if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110){n=typeof BigInt!=="undefined"?BigInt(this.input.slice(t,this.pos)):null;++this.pos}else if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}return this.finishToken(d.num,n)};ke.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10)===null){this.raise(t,"Invalid number")}var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(n&&this.strict){this.raise(t,"Invalid number")}var i=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&i===110){var r=this.input.slice(t,this.pos);var a=typeof BigInt!=="undefined"?BigInt(r):null;++this.pos;if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}return this.finishToken(d.num,a)}if(n&&/[89]/.test(this.input.slice(t,this.pos))){n=false}if(i===46&&!n){++this.pos;this.readInt(10);i=this.input.charCodeAt(this.pos)}if((i===69||i===101)&&!n){i=this.input.charCodeAt(++this.pos);if(i===43||i===45){++this.pos}if(this.readInt(10)===null){this.raise(t,"Invalid number")}}if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}var o=this.input.slice(t,this.pos);var s=n?parseInt(o,8):parseFloat(o);return this.finishToken(d.num,s)};ke.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6){this.unexpected()}var n=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(t>1114111){this.invalidStringToken(n,"Code point out of bounds")}}else{t=this.readHexChar(4)}return t};function codePointToString$1(e){if(e<=65535){return String.fromCharCode(e)}e-=65536;return String.fromCharCode((e>>10)+55296,(e&1023)+56320)}ke.readString=function(e){var t="",n=++this.pos;for(;;){if(this.pos>=this.input.length){this.raise(this.start,"Unterminated string constant")}var i=this.input.charCodeAt(this.pos);if(i===e){break}if(i===92){t+=this.input.slice(n,this.pos);t+=this.readEscapedChar(false);n=this.pos}else{if(isNewLine(i,this.options.ecmaVersion>=10)){this.raise(this.start,"Unterminated string constant")}++this.pos}}t+=this.input.slice(n,this.pos++);return this.finishToken(d.string,t)};var Se={};ke.tryReadTemplateToken=function(){this.inTemplateElement=true;try{this.readTmplToken()}catch(e){if(e===Se){this.readInvalidTemplateToken()}else{throw e}}this.inTemplateElement=false};ke.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9){throw Se}else{this.raise(e,t)}};ke.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length){this.raise(this.start,"Unterminated template")}var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===d.template||this.type===d.invalidTemplate)){if(n===36){this.pos+=2;return this.finishToken(d.dollarBraceL)}else{++this.pos;return this.finishToken(d.backQuote)}}e+=this.input.slice(t,this.pos);return this.finishToken(d.template,e)}if(n===92){e+=this.input.slice(t,this.pos);e+=this.readEscapedChar(true);t=this.pos}else if(isNewLine(n)){e+=this.input.slice(t,this.pos);++this.pos;switch(n){case 13:if(this.input.charCodeAt(this.pos)===10){++this.pos}case 10:e+="\n";break;default:e+=String.fromCharCode(n);break}if(this.options.locations){++this.curLine;this.lineStart=this.pos}t=this.pos}else{++this.pos}}};ke.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0];var r=parseInt(i,8);if(r>255){i=i.slice(0,-1);r=parseInt(i,8)}this.pos+=i.length-1;t=this.input.charCodeAt(this.pos);if((i!=="0"||t===56||t===57)&&(this.strict||e)){this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode")}return String.fromCharCode(r)}if(isNewLine(t)){return""}return String.fromCharCode(t)}};ke.readHexChar=function(e){var t=this.pos;var n=this.readInt(16,e);if(n===null){this.invalidStringToken(t,"Bad character escape sequence")}return n};ke.readWord1=function(){this.containsEsc=false;var e="",t=true,n=this.pos;var i=this.options.ecmaVersion>=6;while(this.pos5&&t<2015)t+=2009;i[n]=t}else{i[n]=e&&HOP(e,n)?e[n]:t[n]}}return i}function noop(){}function return_false(){return false}function return_true(){return true}function return_this(){return this}function return_null(){return null}var i=function(){function MAP(t,n,i){var r=[],a=[],o;function doit(){var s=n(t[o],o);var u=s instanceof Last;if(u)s=s.v;if(s instanceof AtTop){s=s.v;if(s instanceof Splice){a.push.apply(a,i?s.v.slice().reverse():s.v)}else{a.push(s)}}else if(s!==e){if(s instanceof Splice){r.push.apply(r,i?s.v.slice().reverse():s.v)}else{r.push(s)}}return u}if(Array.isArray(t)){if(i){for(o=t.length;--o>=0;)if(doit())break;r.reverse();a.reverse()}else{for(o=0;o=0;){if(e[n]===t)e.splice(n,1)}}function mergeSort(e,t){if(e.length<2)return e.slice();function merge(e,n){var i=[],r=0,a=0,o=0;while(r{n+=e})}return n}function has_annotation(e,t){return e._annotations&t}function set_annotation(e,t){e._annotations|=t}var o="";var s=true;var u="break case catch class const continue debugger default delete do else export extends finally for function if in instanceof let new return switch throw try typeof var void while with";var c="false null true";var l="enum implements import interface package private protected public static super this "+c+" "+u;var f="return new delete throw else case yield await";u=makePredicate(u);l=makePredicate(l);f=makePredicate(f);c=makePredicate(c);var p=makePredicate(characters("+-*&%=<>!?|~^"));var _=/[0-9a-f]/i;var h=/^0x[0-9a-f]+$/i;var d=/^0[0-7]+$/;var m=/^0o[0-7]+$/i;var E=/^0b[01]+$/i;var g=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i;var v=/^(0[xob])?[0-9a-f]+n$/i;var D=makePredicate(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","**","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","||=","&&=","??=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","??","||"]);var b=makePredicate(characters("  \n\r\t\f\v​           \u2028\u2029   \ufeff"));var y=makePredicate(characters("\n\r\u2028\u2029"));var k=makePredicate(characters(";]),:"));var S=makePredicate(characters("[{(,;:"));var T=makePredicate(characters("[]{}(),;:"));var A={ID_Start:/[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])+/};function get_full_char(e,t){if(is_surrogate_pair_head(e.charCodeAt(t))){if(is_surrogate_pair_tail(e.charCodeAt(t+1))){return e.charAt(t)+e.charAt(t+1)}}else if(is_surrogate_pair_tail(e.charCodeAt(t))){if(is_surrogate_pair_head(e.charCodeAt(t-1))){return e.charAt(t-1)+e.charAt(t)}}return e.charAt(t)}function get_full_char_code(e,t){if(is_surrogate_pair_head(e.charCodeAt(t))){return 65536+(e.charCodeAt(t)-55296<<10)+e.charCodeAt(t+1)-56320}return e.charCodeAt(t)}function get_full_char_length(e){var t=0;for(var n=0;n65535){e-=65536;return String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)}return String.fromCharCode(e)}function is_surrogate_pair_head(e){return e>=55296&&e<=56319}function is_surrogate_pair_tail(e){return e>=56320&&e<=57343}function is_digit(e){return e>=48&&e<=57}function is_identifier_start(e){return A.ID_Start.test(e)}function is_identifier_char(e){return A.ID_Continue.test(e)}const C=/^[a-z_$][a-z0-9_$]*$/i;function is_basic_identifier_string(e){return C.test(e)}function is_identifier_string(e,t){if(C.test(e)){return true}if(!t&&/[\ud800-\udfff]/.test(e)){return false}var n=A.ID_Start.exec(e);if(!n||n.index!==0){return false}e=e.slice(n[0].length);if(!e){return true}n=A.ID_Continue.exec(e);return!!n&&n[0].length===e.length}function parse_js_number(e,t=true){if(!t&&e.includes("e")){return NaN}if(h.test(e)){return parseInt(e.substr(2),16)}else if(d.test(e)){return parseInt(e.substr(1),8)}else if(m.test(e)){return parseInt(e.substr(2),8)}else if(E.test(e)){return parseInt(e.substr(2),2)}else if(g.test(e)){return parseFloat(e)}else{var n=parseFloat(e);if(n==e)return n}}class JS_Parse_Error extends Error{constructor(e,t,n,i,r){super();this.name="SyntaxError";this.message=e;this.filename=t;this.line=n;this.col=i;this.pos=r}}function js_error(e,t,n,i,r){throw new JS_Parse_Error(e,t,n,i,r)}function is_token(e,t,n){return e.type==t&&(n==null||e.value==n)}var R={};function tokenizer(e,t,n,i){var r={text:e,filename:t,pos:0,tokpos:0,line:1,tokline:0,col:0,tokcol:0,newline_before:false,regex_allowed:false,brace_counter:0,template_braces:[],comments_before:[],directives:{},directive_stack:[]};function peek(){return get_full_char(r.text,r.pos)}function is_option_chain_op(){const e=r.text.charCodeAt(r.pos+1)===46;if(!e)return false;const t=r.text.charCodeAt(r.pos+2);return t<48||t>57}function next(e,t){var n=get_full_char(r.text,r.pos++);if(e&&!n)throw R;if(y.has(n)){r.newline_before=r.newline_before||!t;++r.line;r.col=0;if(n=="\r"&&peek()=="\n"){++r.pos;n="\n"}}else{if(n.length>1){++r.pos;++r.col}++r.col}return n}function forward(e){while(e--)next()}function looking_at(e){return r.text.substr(r.pos,e.length)==e}function find_eol(){var e=r.text;for(var t=r.pos,n=r.text.length;t="0"&&e<="7"}function read_escaped_char(e,t,n){var i=next(true,e);switch(i.charCodeAt(0)){case 110:return"\n";case 114:return"\r";case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 120:return String.fromCharCode(hex_bytes(2,t));case 117:if(peek()=="{"){next(true);if(peek()==="}")parse_error("Expecting hex-character between {}");while(peek()=="0")next(true);var a,o=find("}",true)-r.pos;if(o>6||(a=hex_bytes(o,t))>1114111){parse_error("Unicode reference out of bounds")}next(true);return from_char_code(a)}return String.fromCharCode(hex_bytes(4,t));case 10:return"";case 13:if(peek()=="\n"){next(true,e);return""}}if(is_octal(i)){if(n&&t){const e=i==="0"&&!is_octal(peek());if(!e){parse_error("Octal escape sequences are not allowed in template strings")}}return read_octal_escape_sequence(i,t)}return i}function read_octal_escape_sequence(e,t){var n=peek();if(n>="0"&&n<="7"){e+=next(true);if(e[0]<="3"&&(n=peek())>="0"&&n<="7")e+=next(true)}if(e==="0")return"\0";if(e.length>0&&next_token.has_directive("use strict")&&t)parse_error("Legacy octal escape sequences are not allowed in strict mode");return String.fromCharCode(parseInt(e,8))}function hex_bytes(e,t){var n=0;for(;e>0;--e){if(!t&&isNaN(parseInt(peek(),16))){return parseInt(n,16)||""}var i=next(true);if(isNaN(parseInt(i,16)))parse_error("Invalid hex-character pattern in string");n+=i}return parseInt(n,16)}var E=with_eof_error("Unterminated string constant",function(){const e=r.pos;var t=next(),n=[];for(;;){var i=next(true,true);if(i=="\\")i=read_escaped_char(true,true);else if(i=="\r"||i=="\n")parse_error("Unterminated string constant");else if(i==t)break;n.push(i)}var a=token("string",n.join(""));o=r.text.slice(e,r.pos);a.quote=t;return a});var g=with_eof_error("Unterminated template",function(e){if(e){r.template_braces.push(r.brace_counter)}var t="",n="",i,a;next(true,true);while((i=next(true,true))!="`"){if(i=="\r"){if(peek()=="\n")++r.pos;i="\n"}else if(i=="$"&&peek()=="{"){next(true,true);r.brace_counter++;a=token(e?"template_head":"template_substitution",t);o=n;s=false;return a}n+=i;if(i=="\\"){var u=r.pos;var c=m&&(m.type==="name"||m.type==="punc"&&(m.value===")"||m.value==="]"));i=read_escaped_char(true,!c,true);n+=r.text.substr(u,r.pos-u)}t+=i}r.template_braces.pop();a=token(e?"template_head":"template_substitution",t);o=n;s=true;return a});function skip_line_comment(e){var t=r.regex_allowed;var n=find_eol(),i;if(n==-1){i=r.text.substr(r.pos);r.pos=r.text.length}else{i=r.text.substring(r.pos,n);r.pos=n}r.col=r.tokcol+(r.pos-r.tokpos);r.comments_before.push(token(e,i,true));r.regex_allowed=t;return next_token}var k=with_eof_error("Unterminated multiline comment",function(){var e=r.regex_allowed;var t=find("*/",true);var n=r.text.substring(r.pos,t).replace(/\r\n|\r|\u2028|\u2029/g,"\n");forward(get_full_char_length(n)+2);r.comments_before.push(token("comment2",n,true));r.newline_before=r.newline_before||n.includes("\n");r.regex_allowed=e;return next_token});var A=with_eof_error("Unterminated identifier name",function(){var e=[],t,n=false;var i=function(){n=true;next();if(peek()!=="u"){parse_error("Expecting UnicodeEscapeSequence -- uXXXX or u{XXXX}")}return read_escaped_char(false,true)};if((t=peek())==="\\"){t=i();if(!is_identifier_start(t)){parse_error("First identifier char is an invalid identifier char")}}else if(is_identifier_start(t)){next()}else{return""}e.push(t);while((t=peek())!=null){if((t=peek())==="\\"){t=i();if(!is_identifier_char(t)){parse_error("Invalid escaped identifier char")}}else{if(!is_identifier_char(t)){break}next()}e.push(t)}const r=e.join("");if(l.has(r)&&n){parse_error("Escaped characters are not allowed in keywords")}return r});var C=with_eof_error("Unterminated regular expression",function(e){var t=false,n,i=false;while(n=next(true))if(y.has(n)){parse_error("Unexpected line terminator")}else if(t){e+="\\"+n;t=false}else if(n=="["){i=true;e+=n}else if(n=="]"&&i){i=false;e+=n}else if(n=="/"&&!i){break}else if(n=="\\"){t=true}else{e+=n}const r=A();return token("regexp","/"+e+"/"+r)});function read_operator(e){function grow(e){if(!peek())return e;var t=e+peek();if(D.has(t)){next();return grow(t)}else{return e}}return token("operator",grow(e||next()))}function handle_slash(){next();switch(peek()){case"/":next();return skip_line_comment("comment1");case"*":next();return k()}return r.regex_allowed?C(""):read_operator("/")}function handle_eq_sign(){next();if(peek()===">"){next();return token("arrow","=>")}else{return read_operator("=")}}function handle_dot(){next();if(is_digit(peek().charCodeAt(0))){return read_num(".")}if(peek()==="."){next();next();return token("expand","...")}return token("punc",".")}function read_word(){var e=A();if(a)return token("name",e);return c.has(e)?token("atom",e):!u.has(e)?token("name",e):D.has(e)?token("operator",e):token("keyword",e)}function with_eof_error(e,t){return function(n){try{return t(n)}catch(t){if(t===R)parse_error(e);else throw t}}}function next_token(e){if(e!=null)return C(e);if(i&&r.pos==0&&looking_at("#!")){start_token();forward(2);skip_line_comment("comment5")}for(;;){skip_whitespace();start_token();if(n){if(looking_at("\x3c!--")){forward(4);skip_line_comment("comment3");continue}if(looking_at("--\x3e")&&r.newline_before){forward(3);skip_line_comment("comment4");continue}}var t=peek();if(!t)return token("eof");var a=t.charCodeAt(0);switch(a){case 34:case 39:return E();case 46:return handle_dot();case 47:{var o=handle_slash();if(o===next_token)continue;return o}case 61:return handle_eq_sign();case 63:{if(!is_option_chain_op())break;next();next();return token("punc","?.")}case 96:return g(true);case 123:r.brace_counter++;break;case 125:r.brace_counter--;if(r.template_braces.length>0&&r.template_braces[r.template_braces.length-1]===r.brace_counter)return g(false);break}if(is_digit(a))return read_num();if(T.has(t))return token("punc",next());if(p.has(t))return read_operator();if(a==92||is_identifier_start(t))return read_word();break}parse_error("Unexpected character '"+t+"'")}next_token.next=next;next_token.peek=peek;next_token.context=function(e){if(e)r=e;return r};next_token.add_directive=function(e){r.directive_stack[r.directive_stack.length-1].push(e);if(r.directives[e]===undefined){r.directives[e]=1}else{r.directives[e]++}};next_token.push_directives_stack=function(){r.directive_stack.push([])};next_token.pop_directives_stack=function(){var e=r.directive_stack[r.directive_stack.length-1];for(var t=0;t0};return next_token}var x=makePredicate(["typeof","void","delete","--","++","!","~","-","+"]);var F=makePredicate(["--","++"]);var O=makePredicate(["=","+=","-=","??=","&&=","||=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&="]);var w=makePredicate(["??=","&&=","||="]);var M=function(e,t){for(var n=0;n","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],{});var N=makePredicate(["atom","num","big_int","string","regexp","name"]);function parse(e,t){const n=new WeakMap;t=defaults(t,{bare_returns:false,ecma:null,expression:false,filename:null,html5_comments:true,module:false,shebang:true,strict:false,toplevel:null},true);var i={input:typeof e=="string"?tokenizer(e,t.filename,t.html5_comments,t.shebang):e,token:null,prev:null,peeked:null,in_function:0,in_async:-1,in_generator:-1,in_directives:true,in_loop:0,labels:[]};i.token=next();function is(e,t){return is_token(i.token,e,t)}function peek(){return i.peeked||(i.peeked=i.input())}function next(){i.prev=i.token;if(!i.peeked)peek();i.token=i.peeked;i.peeked=null;i.in_directives=i.in_directives&&(i.token.type=="string"||is("punc",";"));return i.token}function prev(){return i.prev}function croak(e,t,n,r){var a=i.input.context();js_error(e,a.filename,t!=null?t:a.tokline,n!=null?n:a.tokcol,r!=null?r:a.tokpos)}function token_error(e,t){croak(t,e.line,e.col)}function unexpected(e){if(e==null)e=i.token;token_error(e,"Unexpected token: "+e.type+" ("+e.value+")")}function expect_token(e,t){if(is(e,t)){return next()}token_error(i.token,"Unexpected token "+i.token.type+" «"+i.token.value+"»"+", expected "+e+" «"+t+"»")}function expect(e){return expect_token("punc",e)}function has_newline_before(e){return e.nlb||!e.comments_before.every(e=>!e.nlb)}function can_insert_semicolon(){return!t.strict&&(is("eof")||is("punc","}")||has_newline_before(i.token))}function is_in_generator(){return i.in_generator===i.in_function}function is_in_async(){return i.in_async===i.in_function}function semicolon(e){if(is("punc",";"))next();else if(!e&&!can_insert_semicolon())unexpected()}function parenthesised(){expect("(");var e=S(true);expect(")");return e}function embed_tokens(e){return function _embed_tokens_wrapper(...t){const n=i.token;const r=e(...t);r.start=n;r.end=prev();return r}}function handle_regexp(){if(is("operator","/")||is("operator","/=")){i.peeked=null;i.token=i.input(i.token.value.substr(1))}}var r=embed_tokens(function statement(e,n,r){handle_regexp();switch(i.token.type){case"string":if(i.in_directives){var a=peek();if(!o.includes("\\")&&(is_token(a,"punc",";")||is_token(a,"punc","}")||has_newline_before(a)||is_token(a,"eof"))){i.input.add_directive(i.token.value)}else{i.in_directives=false}}var s=i.in_directives,l=simple_statement();return s&&l.body instanceof Bt?new G(l.body):l;case"template_head":case"num":case"big_int":case"regexp":case"operator":case"atom":return simple_statement();case"name":if(i.token.value=="async"&&is_token(peek(),"keyword","function")){next();next();if(n){croak("functions are not allowed as the body of a loop")}return u(fe,false,true,e)}if(i.token.value=="import"&&!is_token(peek(),"punc","(")&&!is_token(peek(),"punc",".")){next();var _=import_();semicolon();return _}return is_token(peek(),"punc",":")?labeled_statement():simple_statement();case"punc":switch(i.token.value){case"{":return new W({start:i.token,body:block_(),end:prev()});case"[":case"(":return simple_statement();case";":i.in_directives=false;next();return new q;default:unexpected()}case"keyword":switch(i.token.value){case"break":next();return break_cont(be);case"continue":next();return break_cont(ye);case"debugger":next();semicolon();return new K;case"do":next();var h=in_loop(statement);expect_token("keyword","while");var d=parenthesised();semicolon(true);return new Q({body:h,condition:d});case"while":next();return new J({condition:parenthesised(),body:in_loop(function(){return statement(false,true)})});case"for":next();return for_();case"class":next();if(n){croak("classes are not allowed as the body of a loop")}if(r){croak("classes are not allowed as the body of an if")}return class_(ft);case"function":next();if(n){croak("functions are not allowed as the body of a loop")}return u(fe,false,false,e);case"if":next();return if_();case"return":if(i.in_function==0&&!t.bare_returns)croak("'return' outside of function");next();var m=null;if(is("punc",";")){next()}else if(!can_insert_semicolon()){m=S(true);semicolon()}return new ge({value:m});case"switch":next();return new Ae({expression:parenthesised(),body:in_loop(switch_body_)});case"throw":next();if(has_newline_before(i.token))croak("Illegal newline after 'throw'");var m=S(true);semicolon();return new ve({value:m});case"try":next();return try_();case"var":next();var _=c();semicolon();return _;case"let":next();var _=f();semicolon();return _;case"const":next();var _=p();semicolon();return _;case"with":if(i.input.has_directive("use strict")){croak("Strict mode may not include a with statement")}next();return new ie({expression:parenthesised(),body:statement()});case"export":if(!is_token(peek(),"punc","(")){next();var _=export_();if(is("punc",";"))semicolon();return _}}}unexpected()});function labeled_statement(){var e=as_symbol(Ft);if(e.name==="await"&&is_in_async()){token_error(i.prev,"await cannot be used as label inside async function")}if(i.labels.some(t=>t.name===e.name)){croak("Label "+e.name+" defined twice")}expect(":");i.labels.push(e);var t=r();i.labels.pop();if(!(t instanceof $)){e.references.forEach(function(t){if(t instanceof ye){t=t.label.start;croak("Continue label `"+e.name+"` refers to non-IterationStatement.",t.line,t.col,t.pos)}})}return new j({body:t,label:e})}function simple_statement(e){return new X({body:(e=S(true),semicolon(),e)})}function break_cont(e){var t=null,n;if(!can_insert_semicolon()){t=as_symbol(Nt,true)}if(t!=null){n=i.labels.find(e=>e.name===t.name);if(!n)croak("Undefined label "+t.name);t.thedef=n}else if(i.in_loop==0)croak(e.TYPE+" not inside a loop or switch");semicolon();var r=new e({label:t});if(n)n.references.push(r);return r}function for_(){var e="`for await` invalid in this context";var t=i.token;if(t.type=="name"&&t.value=="await"){if(!is_in_async()){token_error(t,e)}next()}else{t=false}expect("(");var n=null;if(!is("punc",";")){n=is("keyword","var")?(next(),c(true)):is("keyword","let")?(next(),f(true)):is("keyword","const")?(next(),p(true)):S(true,true);var r=is("operator","in");var a=is("name","of");if(t&&!a){token_error(t,e)}if(r||a){if(n instanceof Me){if(n.definitions.length>1)token_error(n.start,"Only one variable declaration allowed in for..in loop")}else if(!(is_assignable(n)||(n=to_destructuring(n))instanceof pe)){token_error(n.start,"Invalid left-hand side in for..in loop")}next();if(r){return for_in(n)}else{return for_of(n,!!t)}}}else if(t){token_error(t,e)}return regular_for(n)}function regular_for(e){expect(";");var t=is("punc",";")?null:S(true);expect(";");var n=is("punc",")")?null:S(true);expect(")");return new ee({init:e,condition:t,step:n,body:in_loop(function(){return r(false,true)})})}function for_of(e,t){var n=e instanceof Me?e.definitions[0].name:null;var i=S(true);expect(")");return new ne({await:t,init:e,name:n,object:i,body:in_loop(function(){return r(false,true)})})}function for_in(e){var t=S(true);expect(")");return new te({init:e,object:t,body:in_loop(function(){return r(false,true)})})}var a=function(e,t,n){if(has_newline_before(i.token)){croak("Unexpected newline before arrow (=>)")}expect_token("arrow","=>");var r=_function_body(is("punc","{"),false,n);var a=r instanceof Array&&r.length?r[r.length-1].end:r instanceof Array?e:r.end;return new le({start:e,end:a,async:n,argnames:t,body:r})};var u=function(e,t,n,i){var r=e===fe;var a=is("operator","*");if(a){next()}var o=is("name")?as_symbol(r?bt:St):null;if(r&&!o){if(i){e=ce}else{unexpected()}}if(o&&e!==ue&&!(o instanceof dt))unexpected(prev());var s=[];var u=_function_body(true,a||t,n,o,s);return new e({start:s.start,end:u.end,is_generator:a,async:n,name:o,argnames:s,body:u})};function track_used_binding_identifiers(e,t){var n=new Set;var i=false;var r=false;var a=false;var o=!!t;var s={add_parameter:function(t){if(n.has(t.value)){if(i===false){i=t}s.check_strict()}else{n.add(t.value);if(e){switch(t.value){case"arguments":case"eval":case"yield":if(o){token_error(t,"Unexpected "+t.value+" identifier as parameter inside strict mode")}break;default:if(l.has(t.value)){unexpected()}}}}},mark_default_assignment:function(e){if(r===false){r=e}},mark_spread:function(e){if(a===false){a=e}},mark_strict_mode:function(){o=true},is_strict:function(){return r!==false||a!==false||o},check_strict:function(){if(s.is_strict()&&i!==false){token_error(i,"Parameter "+i.value+" was used already")}}};return s}function parameters(e){var t=track_used_binding_identifiers(true,i.input.has_directive("use strict"));expect("(");while(!is("punc",")")){var n=parameter(t);e.push(n);if(!is("punc",")")){expect(",")}if(n instanceof oe){break}}next()}function parameter(e,t){var n;var r=false;if(e===undefined){e=track_used_binding_identifiers(true,i.input.has_directive("use strict"))}if(is("expand","...")){r=i.token;e.mark_spread(i.token);next()}n=binding_element(e,t);if(is("operator","=")&&r===false){e.mark_default_assignment(i.token);next();n=new tt({start:n.start,left:n,operator:"=",right:S(false),end:i.token})}if(r!==false){if(!is("punc",")")){unexpected()}n=new oe({start:r,expression:n,end:r})}e.check_strict();return n}function binding_element(e,t){var n=[];var r=true;var a=false;var o;var s=i.token;if(e===undefined){e=track_used_binding_identifiers(false,i.input.has_directive("use strict"))}t=t===undefined?Dt:t;if(is("punc","[")){next();while(!is("punc","]")){if(r){r=false}else{expect(",")}if(is("expand","...")){a=true;o=i.token;e.mark_spread(i.token);next()}if(is("punc")){switch(i.token.value){case",":n.push(new Wt({start:i.token,end:i.token}));continue;case"]":break;case"[":case"{":n.push(binding_element(e,t));break;default:unexpected()}}else if(is("name")){e.add_parameter(i.token);n.push(as_symbol(t))}else{croak("Invalid function parameter")}if(is("operator","=")&&a===false){e.mark_default_assignment(i.token);next();n[n.length-1]=new tt({start:n[n.length-1].start,left:n[n.length-1],operator:"=",right:S(false),end:i.token})}if(a){if(!is("punc","]")){croak("Rest element must be last element")}n[n.length-1]=new oe({start:o,expression:n[n.length-1],end:o})}}expect("]");e.check_strict();return new pe({start:s,names:n,is_array:true,end:prev()})}else if(is("punc","{")){next();while(!is("punc","}")){if(r){r=false}else{expect(",")}if(is("expand","...")){a=true;o=i.token;e.mark_spread(i.token);next()}if(is("name")&&(is_token(peek(),"punc")||is_token(peek(),"operator"))&&[",","}","="].includes(peek().value)){e.add_parameter(i.token);var u=prev();var c=as_symbol(t);if(a){n.push(new oe({start:o,expression:c,end:c.end}))}else{n.push(new at({start:u,key:c.name,value:c,end:c.end}))}}else if(is("punc","}")){continue}else{var l=i.token;var f=as_property_name();if(f===null){unexpected(prev())}else if(prev().type==="name"&&!is("punc",":")){n.push(new at({start:prev(),key:f,value:new t({start:prev(),name:f,end:prev()}),end:prev()}))}else{expect(":");n.push(new at({start:l,quote:l.quote,key:f,value:binding_element(e,t),end:prev()}))}}if(a){if(!is("punc","}")){croak("Rest element must be last element")}}else if(is("operator","=")){e.mark_default_assignment(i.token);next();n[n.length-1].value=new tt({start:n[n.length-1].value.start,left:n[n.length-1].value,operator:"=",right:S(false),end:i.token})}}expect("}");e.check_strict();return new pe({start:s,names:n,is_array:false,end:prev()})}else if(is("name")){e.add_parameter(i.token);return as_symbol(t)}else{croak("Invalid function parameter")}}function params_or_seq_(e,t){var n;var r;var a;var o=[];expect("(");while(!is("punc",")")){if(n)unexpected(n);if(is("expand","...")){n=i.token;if(t)r=i.token;next();o.push(new oe({start:prev(),expression:S(),end:i.token}))}else{o.push(S())}if(!is("punc",")")){expect(",");if(is("punc",")")){a=prev();if(t)r=a}}}expect(")");if(e&&is("arrow","=>")){if(n&&a)unexpected(a)}else if(r){unexpected(r)}return o}function _function_body(e,t,n,r,a){var o=i.in_loop;var s=i.labels;var u=i.in_generator;var c=i.in_async;++i.in_function;if(t)i.in_generator=i.in_function;if(n)i.in_async=i.in_function;if(a)parameters(a);if(e)i.in_directives=true;i.in_loop=0;i.labels=[];if(e){i.input.push_directives_stack();var l=block_();if(r)_verify_symbol(r);if(a)a.forEach(_verify_symbol);i.input.pop_directives_stack()}else{var l=[new ge({start:i.token,value:S(false),end:i.token})]}--i.in_function;i.in_loop=o;i.labels=s;i.in_generator=u;i.in_async=c;return l}function _await_expression(){if(!is_in_async()){croak("Unexpected await expression outside async function",i.prev.line,i.prev.col,i.prev.pos)}return new ke({start:prev(),end:i.token,expression:v(true)})}function _yield_expression(){if(!is_in_generator()){croak("Unexpected yield expression outside generator function",i.prev.line,i.prev.col,i.prev.pos)}var e=i.token;var t=false;var n=true;if(can_insert_semicolon()||is("punc")&&k.has(i.token.value)){n=false}else if(is("operator","*")){t=true;next()}return new Se({start:e,is_star:t,expression:n?S():null,end:prev()})}function if_(){var e=parenthesised(),t=r(false,false,true),n=null;if(is("keyword","else")){next();n=r(false,false,true)}return new Te({condition:e,body:t,alternative:n})}function block_(){expect("{");var e=[];while(!is("punc","}")){if(is("eof"))unexpected();e.push(r())}next();return e}function switch_body_(){expect("{");var e=[],t=null,n=null,a;while(!is("punc","}")){if(is("eof"))unexpected();if(is("keyword","case")){if(n)n.end=prev();t=[];n=new xe({start:(a=i.token,next(),a),expression:S(true),body:t});e.push(n);expect(":")}else if(is("keyword","default")){if(n)n.end=prev();t=[];n=new Re({start:(a=i.token,next(),expect(":"),a),body:t});e.push(n)}else{if(!t)unexpected();t.push(r())}}if(n)n.end=prev();next();return e}function try_(){var e=block_(),t=null,n=null;if(is("keyword","catch")){var r=i.token;next();if(is("punc","{")){var a=null}else{expect("(");var a=parameter(undefined,Ct);expect(")")}t=new Oe({start:r,argname:a,body:block_(),end:prev()})}if(is("keyword","finally")){var r=i.token;next();n=new we({start:r,body:block_(),end:prev()})}if(!t&&!n)croak("Missing catch/finally blocks");return new Fe({body:e,bcatch:t,bfinally:n})}function vardefs(e,t){var n=[];var r;for(;;){var a=t==="var"?mt:t==="const"?gt:t==="let"?vt:null;if(is("punc","{")||is("punc","[")){r=new Le({start:i.token,name:binding_element(undefined,a),value:is("operator","=")?(expect_token("operator","="),S(false,e)):null,end:prev()})}else{r=new Le({start:i.token,name:as_symbol(a),value:is("operator","=")?(next(),S(false,e)):!e&&t==="const"?croak("Missing initializer in const declaration"):null,end:prev()});if(r.name.name=="import")croak("Unexpected token: import")}n.push(r);if(!is("punc",","))break;next()}return n}var c=function(e){return new Ne({start:prev(),definitions:vardefs(e,"var"),end:prev()})};var f=function(e){return new Ie({start:prev(),definitions:vardefs(e,"let"),end:prev()})};var p=function(e){return new Pe({start:prev(),definitions:vardefs(e,"const"),end:prev()})};var _=function(e){var t=i.token;expect_token("operator","new");if(is("punc",".")){next();expect_token("name","target");return g(new ht({start:t,end:prev()}),e)}var n=h(false),r;if(is("punc","(")){next();r=expr_list(")",true)}else{r=[]}var a=new Ge({start:t,expression:n,args:r,end:prev()});annotate(a);return g(a,e)};function as_atom_node(){var e=i.token,t;switch(e.type){case"name":t=_make_symbol(Ot);break;case"num":t=new Vt({start:e,end:e,value:e.value,raw:o});break;case"big_int":t=new Ut({start:e,end:e,value:e.value});break;case"string":t=new Bt({start:e,end:e,value:e.value,quote:e.quote});break;case"regexp":const[n,i,r]=e.value.match(/^\/(.*)\/(\w*)$/);t=new zt({start:e,end:e,value:{source:i,flags:r}});break;case"atom":switch(e.value){case"false":t=new jt({start:e,end:e});break;case"true":t=new $t({start:e,end:e});break;case"null":t=new Gt({start:e,end:e});break}break}next();return t}function to_fun_args(e,t){var n=function(e,t){if(t){return new tt({start:e.start,left:e,operator:"=",right:t,end:t.end})}return e};if(e instanceof it){return n(new pe({start:e.start,end:e.end,is_array:false,names:e.properties.map(e=>to_fun_args(e))}),t)}else if(e instanceof at){e.value=to_fun_args(e.value);return n(e,t)}else if(e instanceof Wt){return e}else if(e instanceof pe){e.names=e.names.map(e=>to_fun_args(e));return n(e,t)}else if(e instanceof Ot){return n(new Dt({name:e.name,start:e.start,end:e.end}),t)}else if(e instanceof oe){e.expression=to_fun_args(e.expression);return n(e,t)}else if(e instanceof nt){return n(new pe({start:e.start,end:e.end,is_array:true,names:e.elements.map(e=>to_fun_args(e))}),t)}else if(e instanceof et){return n(to_fun_args(e.left,e.right),t)}else if(e instanceof tt){e.left=to_fun_args(e.left);return e}else{croak("Invalid function parameter",e.start.line,e.start.col)}}var h=function(e,t){if(is("operator","new")){return _(e)}if(is("operator","import")){return import_meta()}var r=i.token;var o;var s=is("name","async")&&(o=peek()).value!="["&&o.type!="arrow"&&as_atom_node();if(is("punc")){switch(i.token.value){case"(":if(s&&!e)break;var c=params_or_seq_(t,!s);if(t&&is("arrow","=>")){return a(r,c.map(e=>to_fun_args(e)),!!s)}var l=s?new Ke({expression:s,args:c}):c.length==1?c[0]:new Xe({expressions:c});if(l.start){const e=r.comments_before.length;n.set(r,e);l.start.comments_before.unshift(...r.comments_before);r.comments_before=l.start.comments_before;if(e==0&&r.comments_before.length>0){var f=r.comments_before[0];if(!f.nlb){f.nlb=r.nlb;r.nlb=false}}r.comments_after=l.start.comments_after}l.start=r;var p=prev();if(l.end){p.comments_before=l.end.comments_before;l.end.comments_after.push(...p.comments_after);p.comments_after=l.end.comments_after}l.end=p;if(l instanceof Ke)annotate(l);return g(l,e);case"[":return g(d(),e);case"{":return g(E(),e)}if(!s)unexpected()}if(t&&is("name")&&is_token(peek(),"arrow")){var h=new Dt({name:i.token.value,start:r,end:r});next();return a(r,[h],!!s)}if(is("keyword","function")){next();var m=u(ce,false,!!s);m.start=r;m.end=prev();return g(m,e)}if(s)return g(s,e);if(is("keyword","class")){next();var v=class_(pt);v.start=r;v.end=prev();return g(v,e)}if(is("template_head")){return g(template_string(),e)}if(N.has(i.token.type)){return g(as_atom_node(),e)}unexpected()};function template_string(){var e=[],t=i.token;e.push(new de({start:i.token,raw:o,value:i.token.value,end:i.token}));while(!s){next();handle_regexp();e.push(S(true));e.push(new de({start:i.token,raw:o,value:i.token.value,end:i.token}))}next();return new he({start:t,segments:e,end:i.token})}function expr_list(e,t,n){var r=true,a=[];while(!is("punc",e)){if(r)r=false;else expect(",");if(t&&is("punc",e))break;if(is("punc",",")&&n){a.push(new Wt({start:i.token,end:i.token}))}else if(is("expand","...")){next();a.push(new oe({start:prev(),expression:S(),end:i.token}))}else{a.push(S(false))}}next();return a}var d=embed_tokens(function(){expect("[");return new nt({elements:expr_list("]",!t.strict,true)})});var m=embed_tokens((e,t)=>{return u(ue,e,t)});var E=embed_tokens(function object_or_destructuring_(){var e=i.token,n=true,r=[];expect("{");while(!is("punc","}")){if(n)n=false;else expect(",");if(!t.strict&&is("punc","}"))break;e=i.token;if(e.type=="expand"){next();r.push(new oe({start:e,expression:S(false),end:prev()}));continue}var a=as_property_name();var o;if(!is("punc",":")){var s=concise_method_or_getset(a,e);if(s){r.push(s);continue}o=new Ot({start:prev(),name:a,end:prev()})}else if(a===null){unexpected(prev())}else{next();o=S(false)}if(is("operator","=")){next();o=new et({start:e,left:o,operator:"=",right:S(false),logical:false,end:prev()})}r.push(new at({start:e,quote:e.quote,key:a instanceof U?a:""+a,value:o,end:prev()}))}next();return new it({properties:r})});function class_(e){var t,n,r,a,o=[];i.input.push_directives_stack();i.input.add_directive("use strict");if(i.token.type=="name"&&i.token.value!="extends"){r=as_symbol(e===ft?Tt:At)}if(e===ft&&!r){unexpected()}if(i.token.value=="extends"){next();a=S(true)}expect("{");while(is("punc",";")){next()}while(!is("punc","}")){t=i.token;n=concise_method_or_getset(as_property_name(),t,true);if(!n){unexpected()}o.push(n);while(is("punc",";")){next()}}i.input.pop_directives_stack();next();return new e({start:t,name:r,extends:a,properties:o,end:prev()})}function concise_method_or_getset(e,t,n){var r=function(e,t){if(typeof e==="string"||typeof e==="number"){return new yt({start:t,name:""+e,end:prev()})}else if(e===null){unexpected()}return e};const a=e=>{if(typeof e==="string"||typeof e==="number"){return new kt({start:c,end:c,name:""+e})}else if(e===null){unexpected()}return e};var o=false;var s=false;var u=false;var c=t;if(n&&e==="static"&&!is("punc","(")){s=true;c=i.token;e=as_property_name()}if(e==="async"&&!is("punc","(")&&!is("punc",",")&&!is("punc","}")&&!is("operator","=")){o=true;c=i.token;e=as_property_name()}if(e===null){u=true;c=i.token;e=as_property_name();if(e===null){unexpected()}}if(is("punc","(")){e=r(e,t);var l=new ut({start:t,static:s,is_generator:u,async:o,key:e,quote:e instanceof yt?c.quote:undefined,value:m(u,o),end:prev()});return l}const f=i.token;if(e=="get"){if(!is("punc")||is("punc","[")){e=r(as_property_name(),t);return new st({start:t,static:s,key:e,quote:e instanceof yt?f.quote:undefined,value:m(),end:prev()})}}else if(e=="set"){if(!is("punc")||is("punc","[")){e=r(as_property_name(),t);return new ot({start:t,static:s,key:e,quote:e instanceof yt?f.quote:undefined,value:m(),end:prev()})}}if(n){const n=a(e);const i=n instanceof kt?c.quote:undefined;if(is("operator","=")){next();return new lt({start:t,static:s,quote:i,key:n,value:S(false),end:prev()})}else if(is("name")||is("punc",";")||is("punc","}")){return new lt({start:t,static:s,quote:i,key:n,end:prev()})}}}function import_(){var e=prev();var t;var n;if(is("name")){t=as_symbol(Rt)}if(is("punc",",")){next()}n=map_names(true);if(n||t){expect_token("name","from")}var r=i.token;if(r.type!=="string"){unexpected()}next();return new Ve({start:e,imported_name:t,imported_names:n,module_name:new Bt({start:r,value:r.value,quote:r.quote,end:r}),end:i.token})}function import_meta(){var e=i.token;expect_token("operator","import");expect_token("punc",".");expect_token("name","meta");return g(new Ue({start:e,end:prev()}),false)}function map_name(e){function make_symbol(e){return new e({name:as_property_name(),start:prev(),end:prev()})}var t=e?xt:Mt;var n=e?Rt:wt;var r=i.token;var a;var o;if(e){a=make_symbol(t)}else{o=make_symbol(n)}if(is("name","as")){next();if(e){o=make_symbol(n)}else{a=make_symbol(t)}}else if(e){o=new n(a)}else{a=new t(o)}return new Be({start:r,foreign_name:a,name:o,end:prev()})}function map_nameAsterisk(e,t){var n=e?xt:Mt;var r=e?Rt:wt;var a=i.token;var o;var s=prev();t=t||new r({name:"*",start:a,end:s});o=new n({name:"*",start:a,end:s});return new Be({start:a,foreign_name:o,name:t,end:s})}function map_names(e){var t;if(is("punc","{")){next();t=[];while(!is("punc","}")){t.push(map_name(e));if(is("punc",",")){next()}}next()}else if(is("operator","*")){var n;next();if(e&&is("name","as")){next();n=as_symbol(e?Rt:Mt)}t=[map_nameAsterisk(e,n)]}return t}function export_(){var e=i.token;var t;var n;if(is("keyword","default")){t=true;next()}else if(n=map_names(false)){if(is("name","from")){next();var a=i.token;if(a.type!=="string"){unexpected()}next();return new ze({start:e,is_default:t,exported_names:n,module_name:new Bt({start:a,value:a.value,quote:a.quote,end:a}),end:prev()})}else{return new ze({start:e,is_default:t,exported_names:n,end:prev()})}}var o;var s;var u;if(is("punc","{")||t&&(is("keyword","class")||is("keyword","function"))&&is_token(peek(),"punc")){s=S(false);semicolon()}else if((o=r(t))instanceof Me&&t){unexpected(o.start)}else if(o instanceof Me||o instanceof se||o instanceof ft){u=o}else if(o instanceof X){s=o.body}else{unexpected(o.start)}return new ze({start:e,is_default:t,exported_value:s,exported_definition:u,end:prev()})}function as_property_name(){var e=i.token;switch(e.type){case"punc":if(e.value==="["){next();var t=S(false);expect("]");return t}else unexpected(e);case"operator":if(e.value==="*"){next();return null}if(!["delete","in","instanceof","new","typeof","void"].includes(e.value)){unexpected(e)}case"name":case"string":case"num":case"big_int":case"keyword":case"atom":next();return e.value;default:unexpected(e)}}function as_name(){var e=i.token;if(e.type!="name")unexpected();next();return e.value}function _make_symbol(e){var t=i.token.value;return new(t=="this"?It:t=="super"?Pt:e)({name:String(t),start:i.token,end:i.token})}function _verify_symbol(e){var t=e.name;if(is_in_generator()&&t=="yield"){token_error(e.start,"Yield cannot be used as identifier inside generators")}if(i.input.has_directive("use strict")){if(t=="yield"){token_error(e.start,"Unexpected yield identifier inside strict mode")}if(e instanceof dt&&(t=="arguments"||t=="eval")){token_error(e.start,"Unexpected "+t+" in strict mode")}}}function as_symbol(e,t){if(!is("name")){if(!t)croak("Name expected");return null}var n=_make_symbol(e);_verify_symbol(n);next();return n}function annotate(e){var t=e.start;var i=t.comments_before;const r=n.get(t);var a=r!=null?r:i.length;while(--a>=0){var o=i[a];if(/[@#]__/.test(o.value)){if(/[@#]__PURE__/.test(o.value)){set_annotation(e,Qt);break}if(/[@#]__INLINE__/.test(o.value)){set_annotation(e,Jt);break}if(/[@#]__NOINLINE__/.test(o.value)){set_annotation(e,en);break}}}}var g=function(e,t,n){var i=e.start;if(is("punc",".")){next();return g(new We({start:i,expression:e,optional:false,property:as_name(),end:prev()}),t,n)}if(is("punc","[")){next();var r=S(true);expect("]");return g(new qe({start:i,expression:e,optional:false,property:r,end:prev()}),t,n)}if(t&&is("punc","(")){next();var a=new Ke({start:i,expression:e,optional:false,args:call_args(),end:prev()});annotate(a);return g(a,true,n)}if(is("punc","?.")){next();let n;if(t&&is("punc","(")){next();const t=new Ke({start:i,optional:true,expression:e,args:call_args(),end:prev()});annotate(t);n=g(t,true,true)}else if(is("name")){n=g(new We({start:i,expression:e,optional:true,property:as_name(),end:prev()}),t,true)}else if(is("punc","[")){next();const r=S(true);expect("]");n=g(new qe({start:i,expression:e,optional:true,property:r,end:prev()}),t,true)}if(!n)unexpected();if(n instanceof Ye)return n;return new Ye({start:i,expression:n,end:prev()})}if(is("template_head")){if(n){unexpected()}return g(new _e({start:i,prefix:e,template_string:template_string(),end:prev()}),t)}return e};function call_args(){var e=[];while(!is("punc",")")){if(is("expand","...")){next();e.push(new oe({start:prev(),expression:S(false),end:prev()}))}else{e.push(S(false))}if(!is("punc",")")){expect(",")}}next();return e}var v=function(e,t){var n=i.token;if(n.type=="name"&&n.value=="await"){if(is_in_async()){next();return _await_expression()}else if(i.input.has_directive("use strict")){token_error(i.token,"Unexpected await identifier inside strict mode")}}if(is("operator")&&x.has(n.value)){next();handle_regexp();var r=make_unary($e,n,v(e));r.start=n;r.end=prev();return r}var a=h(e,t);while(is("operator")&&F.has(i.token.value)&&!has_newline_before(i.token)){if(a instanceof le)unexpected();a=make_unary(Ze,i.token,a);a.start=n;a.end=i.token;next()}return a};function make_unary(e,t,n){var r=t.value;switch(r){case"++":case"--":if(!is_assignable(n))croak("Invalid use of "+r+" operator",t.line,t.col,t.pos);break;case"delete":if(n instanceof Ot&&i.input.has_directive("use strict"))croak("Calling delete on expression not allowed in strict mode",n.start.line,n.start.col,n.start.pos);break}return new e({operator:r,expression:n})}var D=function(e,t,n){var r=is("operator")?i.token.value:null;if(r=="in"&&n)r=null;if(r=="**"&&e instanceof $e&&!is_token(e.start,"punc","(")&&e.operator!=="--"&&e.operator!=="++")unexpected(e.start);var a=r!=null?M[r]:null;if(a!=null&&(a>t||r==="**"&&t===a)){next();var o=D(v(true),a,n);return D(new Qe({start:e.start,left:e,operator:r,right:o,end:o.end}),t,n)}return e};function expr_ops(e){return D(v(true,true),0,e)}var b=function(e){var t=i.token;var n=expr_ops(e);if(is("operator","?")){next();var r=S(false);expect(":");return new Je({start:t,condition:n,consequent:r,alternative:S(false,e),end:prev()})}return n};function is_assignable(e){return e instanceof He||e instanceof Ot}function to_destructuring(e){if(e instanceof it){e=new pe({start:e.start,names:e.properties.map(to_destructuring),is_array:false,end:e.end})}else if(e instanceof nt){var t=[];for(var n=0;n=0;){a+="this."+t[o]+" = props."+t[o]+";"}const s=i&&Object.create(i.prototype);if(s&&s.initialize||n&&n.initialize)a+="this.initialize();";a+="}";a+="this.flags = 0;";a+="}";var u=new Function(a)();if(s){u.prototype=s;u.BASE=i}if(i)i.SUBCLASSES.push(u);u.prototype.CTOR=u;u.prototype.constructor=u;u.PROPS=t||null;u.SELF_PROPS=r;u.SUBCLASSES=[];if(e){u.prototype.TYPE=u.TYPE=e}if(n)for(o in n)if(HOP(n,o)){if(o[0]==="$"){u[o.substr(1)]=n[o]}else{u.prototype[o]=n[o]}}u.DEFMETHOD=function(e,t){this.prototype[e]=t};return u}const I=(e,t)=>Boolean(e.flags&t);const P=(e,t,n)=>{if(n){e.flags|=t}else{e.flags&=~t}};const L=1;const B=2;const V=4;class AST_Token{constructor(e,t,n,i,r,a,o,s,u){this.flags=a?1:0;this.type=e;this.value=t;this.line=n;this.col=i;this.pos=r;this.comments_before=o;this.comments_after=s;this.file=u;Object.seal(this)}get nlb(){return I(this,L)}set nlb(e){P(this,L,e)}get quote(){return!I(this,V)?"":I(this,B)?"'":'"'}set quote(e){P(this,B,e==="'");P(this,V,!!e)}}var U=DEFNODE("Node","start end",{_clone:function(e){if(e){var t=this.clone();return t.transform(new TreeTransformer(function(e){if(e!==t){return e.clone(true)}}))}return new this.CTOR(this)},clone:function(e){return this._clone(e)},$documentation:"Base class of all AST nodes",$propdoc:{start:"[AST_Token] The first token of this node",end:"[AST_Token] The last token of this node"},_walk:function(e){return e._visit(this)},walk:function(e){return this._walk(e)},_children_backwards:()=>{}},null);var z=DEFNODE("Statement",null,{$documentation:"Base class of all statements"});var K=DEFNODE("Debugger",null,{$documentation:"Represents a debugger statement"},z);var G=DEFNODE("Directive","value quote",{$documentation:'Represents a directive, like "use strict";',$propdoc:{value:"[string] The value of this directive as a plain string (it's not an AST_String!)",quote:"[string] the original quote character"}},z);var X=DEFNODE("SimpleStatement","body",{$documentation:"A statement consisting of an expression, i.e. a = 1 + 2",$propdoc:{body:"[AST_Node] an expression node (should not be instanceof AST_Statement)"},_walk:function(e){return e._visit(this,function(){this.body._walk(e)})},_children_backwards(e){e(this.body)}},z);function walk_body(e,t){const n=e.body;for(var i=0,r=n.length;i SymbolDef for all variables/functions defined in this scope",functions:"[Map/S] like `variables`, but only lists function declarations",uses_with:"[boolean/S] tells whether this scope uses the `with` statement",uses_eval:"[boolean/S] tells whether this scope contains a direct call to the global `eval`",parent_scope:"[AST_Scope?/S] link to the parent scope",enclosed:"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",cname:"[integer/S] current index for mangling variables (used internally by the mangler)"},get_defun_scope:function(){var e=this;while(e.is_block_scope()){e=e.parent_scope}return e},clone:function(e,t){var n=this._clone(e);if(e&&this.variables&&t&&!this._block_scope){n.figure_out_scope({},{toplevel:t,parent_scope:this.parent_scope})}else{if(this.variables)n.variables=new Map(this.variables);if(this.functions)n.functions=new Map(this.functions);if(this.enclosed)n.enclosed=this.enclosed.slice();if(this._block_scope)n._block_scope=this._block_scope}return n},pinned:function(){return this.uses_eval||this.uses_with}},H);var ae=DEFNODE("Toplevel","globals",{$documentation:"The toplevel scope",$propdoc:{globals:"[Map/S] a map of name -> SymbolDef for all undeclared names"},wrap_commonjs:function(e){var t=this.body;var n="(function(exports){'$ORIG';})(typeof "+e+"=='undefined'?("+e+"={}):"+e+");";n=parse(n);n=n.transform(new TreeTransformer(function(e){if(e instanceof G&&e.value=="$ORIG"){return i.splice(t)}}));return n},wrap_enclose:function(e){if(typeof e!="string")e="";var t=e.indexOf(":");if(t<0)t=e.length;var n=this.body;return parse(["(function(",e.slice(0,t),'){"$ORIG"})(',e.slice(t+1),")"].join("")).transform(new TreeTransformer(function(e){if(e instanceof G&&e.value=="$ORIG"){return i.splice(n)}}))}},re);var oe=DEFNODE("Expansion","expression",{$documentation:"An expandible argument, such as ...rest, a splat, such as [1,2,...all], or an expansion in a variable declaration, such as var [first, ...rest] = list",$propdoc:{expression:"[AST_Node] the thing to be expanded"},_walk:function(e){return e._visit(this,function(){this.expression.walk(e)})},_children_backwards(e){e(this.expression)}});var se=DEFNODE("Lambda","name argnames uses_arguments is_generator async",{$documentation:"Base class for functions",$propdoc:{name:"[AST_SymbolDeclaration?] the name of this function",argnames:"[AST_SymbolFunarg|AST_Destructuring|AST_Expansion|AST_DefaultAssign*] array of function arguments, destructurings, or expanding arguments",uses_arguments:"[boolean/S] tells whether this function accesses the arguments array",is_generator:"[boolean] is this a generator method",async:"[boolean] is this method async"},args_as_names:function(){var e=[];for(var t=0;t b)"},se);var fe=DEFNODE("Defun",null,{$documentation:"A function definition"},se);var pe=DEFNODE("Destructuring","names is_array",{$documentation:"A destructuring of several names. Used in destructuring assignment and with destructuring function argument names",$propdoc:{names:"[AST_Node*] Array of properties or elements",is_array:"[Boolean] Whether the destructuring represents an object or array"},_walk:function(e){return e._visit(this,function(){this.names.forEach(function(t){t._walk(e)})})},_children_backwards(e){let t=this.names.length;while(t--)e(this.names[t])},all_symbols:function(){var e=[];this.walk(new TreeWalker(function(t){if(t instanceof _t){e.push(t)}}));return e}});var _e=DEFNODE("PrefixedTemplateString","template_string prefix",{$documentation:"A templatestring with a prefix, such as String.raw`foobarbaz`",$propdoc:{template_string:"[AST_TemplateString] The template string",prefix:"[AST_Node] The prefix, which will get called."},_walk:function(e){return e._visit(this,function(){this.prefix._walk(e);this.template_string._walk(e)})},_children_backwards(e){e(this.template_string);e(this.prefix)}});var he=DEFNODE("TemplateString","segments",{$documentation:"A template string literal",$propdoc:{segments:"[AST_Node*] One or more segments, starting with AST_TemplateSegment. AST_Node may follow AST_TemplateSegment, but each AST_Node must be followed by AST_TemplateSegment."},_walk:function(e){return e._visit(this,function(){this.segments.forEach(function(t){t._walk(e)})})},_children_backwards(e){let t=this.segments.length;while(t--)e(this.segments[t])}});var de=DEFNODE("TemplateSegment","value raw",{$documentation:"A segment of a template string literal",$propdoc:{value:"Content of the segment",raw:"Raw source of the segment"}});var me=DEFNODE("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)"},z);var Ee=DEFNODE("Exit","value",{$documentation:"Base class for “exits” (`return` and `throw`)",$propdoc:{value:"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return"},_walk:function(e){return e._visit(this,this.value&&function(){this.value._walk(e)})},_children_backwards(e){if(this.value)e(this.value)}},me);var ge=DEFNODE("Return",null,{$documentation:"A `return` statement"},Ee);var ve=DEFNODE("Throw",null,{$documentation:"A `throw` statement"},Ee);var De=DEFNODE("LoopControl","label",{$documentation:"Base class for loop control statements (`break` and `continue`)",$propdoc:{label:"[AST_LabelRef?] the label, or null if none"},_walk:function(e){return e._visit(this,this.label&&function(){this.label._walk(e)})},_children_backwards(e){if(this.label)e(this.label)}},me);var be=DEFNODE("Break",null,{$documentation:"A `break` statement"},De);var ye=DEFNODE("Continue",null,{$documentation:"A `continue` statement"},De);var ke=DEFNODE("Await","expression",{$documentation:"An `await` statement",$propdoc:{expression:"[AST_Node] the mandatory expression being awaited"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e)})},_children_backwards(e){e(this.expression)}});var Se=DEFNODE("Yield","expression is_star",{$documentation:"A `yield` statement",$propdoc:{expression:"[AST_Node?] the value returned or thrown by this statement; could be null (representing undefined) but only when is_star is set to false",is_star:"[Boolean] Whether this is a yield or yield* statement"},_walk:function(e){return e._visit(this,this.expression&&function(){this.expression._walk(e)})},_children_backwards(e){if(this.expression)e(this.expression)}});var Te=DEFNODE("If","condition alternative",{$documentation:"A `if` statement",$propdoc:{condition:"[AST_Node] the `if` condition",alternative:"[AST_Statement?] the `else` part, or null if not present"},_walk:function(e){return e._visit(this,function(){this.condition._walk(e);this.body._walk(e);if(this.alternative)this.alternative._walk(e)})},_children_backwards(e){if(this.alternative){e(this.alternative)}e(this.body);e(this.condition)}},Y);var Ae=DEFNODE("Switch","expression",{$documentation:"A `switch` statement",$propdoc:{expression:"[AST_Node] the `switch` “discriminant”"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e);walk_body(this,e)})},_children_backwards(e){let t=this.body.length;while(t--)e(this.body[t]);e(this.expression)}},H);var Ce=DEFNODE("SwitchBranch",null,{$documentation:"Base class for `switch` branches"},H);var Re=DEFNODE("Default",null,{$documentation:"A `default` switch branch"},Ce);var xe=DEFNODE("Case","expression",{$documentation:"A `case` switch branch",$propdoc:{expression:"[AST_Node] the `case` expression"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e);walk_body(this,e)})},_children_backwards(e){let t=this.body.length;while(t--)e(this.body[t]);e(this.expression)}},Ce);var Fe=DEFNODE("Try","bcatch bfinally",{$documentation:"A `try` statement",$propdoc:{bcatch:"[AST_Catch?] the catch block, or null if not present",bfinally:"[AST_Finally?] the finally block, or null if not present"},_walk:function(e){return e._visit(this,function(){walk_body(this,e);if(this.bcatch)this.bcatch._walk(e);if(this.bfinally)this.bfinally._walk(e)})},_children_backwards(e){if(this.bfinally)e(this.bfinally);if(this.bcatch)e(this.bcatch);let t=this.body.length;while(t--)e(this.body[t])}},H);var Oe=DEFNODE("Catch","argname",{$documentation:"A `catch` node; only makes sense as part of a `try` statement",$propdoc:{argname:"[AST_SymbolCatch|AST_Destructuring|AST_Expansion|AST_DefaultAssign] symbol for the exception"},_walk:function(e){return e._visit(this,function(){if(this.argname)this.argname._walk(e);walk_body(this,e)})},_children_backwards(e){let t=this.body.length;while(t--)e(this.body[t]);if(this.argname)e(this.argname)}},H);var we=DEFNODE("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},H);var Me=DEFNODE("Definitions","definitions",{$documentation:"Base class for `var` or `const` nodes (variable declarations/initializations)",$propdoc:{definitions:"[AST_VarDef*] array of variable definitions"},_walk:function(e){return e._visit(this,function(){var t=this.definitions;for(var n=0,i=t.length;n a`"},Qe);var nt=DEFNODE("Array","elements",{$documentation:"An array literal",$propdoc:{elements:"[AST_Node*] array of elements"},_walk:function(e){return e._visit(this,function(){var t=this.elements;for(var n=0,i=t.length;nt._walk(e))})},_children_backwards(e){let t=this.properties.length;while(t--)e(this.properties[t]);if(this.extends)e(this.extends);if(this.name)e(this.name)}},re);var lt=DEFNODE("ClassProperty","static quote",{$documentation:"A class property",$propdoc:{static:"[boolean] whether this is a static key",quote:"[string] which quote is being used"},_walk:function(e){return e._visit(this,function(){if(this.key instanceof U)this.key._walk(e);if(this.value instanceof U)this.value._walk(e)})},_children_backwards(e){if(this.value instanceof U)e(this.value);if(this.key instanceof U)e(this.key)},computed_key(){return!(this.key instanceof kt)}},rt);var ft=DEFNODE("DefClass",null,{$documentation:"A class definition"},ct);var pt=DEFNODE("ClassExpression",null,{$documentation:"A class expression."},ct);var _t=DEFNODE("Symbol","scope name thedef",{$propdoc:{name:"[string] name of this symbol",scope:"[AST_Scope/S] the current scope (not necessarily the definition scope)",thedef:"[SymbolDef/S] the definition of this symbol"},$documentation:"Base class for all symbols"});var ht=DEFNODE("NewTarget",null,{$documentation:"A reference to new.target"});var dt=DEFNODE("SymbolDeclaration","init",{$documentation:"A declaration symbol (symbol in var/const, function name or argument, symbol in catch)"},_t);var mt=DEFNODE("SymbolVar",null,{$documentation:"Symbol defining a variable"},dt);var Et=DEFNODE("SymbolBlockDeclaration",null,{$documentation:"Base class for block-scoped declaration symbols"},dt);var gt=DEFNODE("SymbolConst",null,{$documentation:"A constant declaration"},Et);var vt=DEFNODE("SymbolLet",null,{$documentation:"A block-scoped `let` declaration"},Et);var Dt=DEFNODE("SymbolFunarg",null,{$documentation:"Symbol naming a function argument"},mt);var bt=DEFNODE("SymbolDefun",null,{$documentation:"Symbol defining a function"},dt);var yt=DEFNODE("SymbolMethod",null,{$documentation:"Symbol in an object defining a method"},_t);var kt=DEFNODE("SymbolClassProperty",null,{$documentation:"Symbol for a class property"},_t);var St=DEFNODE("SymbolLambda",null,{$documentation:"Symbol naming a function expression"},dt);var Tt=DEFNODE("SymbolDefClass",null,{$documentation:"Symbol naming a class's name in a class declaration. Lexically scoped to its containing scope, and accessible within the class."},Et);var At=DEFNODE("SymbolClass",null,{$documentation:"Symbol naming a class's name. Lexically scoped to the class."},dt);var Ct=DEFNODE("SymbolCatch",null,{$documentation:"Symbol naming the exception in catch"},Et);var Rt=DEFNODE("SymbolImport",null,{$documentation:"Symbol referring to an imported name"},Et);var xt=DEFNODE("SymbolImportForeign",null,{$documentation:"A symbol imported from a module, but it is defined in the other module, and its real name is irrelevant for this module's purposes"},_t);var Ft=DEFNODE("Label","references",{$documentation:"Symbol naming a label (declaration)",$propdoc:{references:"[AST_LoopControl*] a list of nodes referring to this label"},initialize:function(){this.references=[];this.thedef=this}},_t);var Ot=DEFNODE("SymbolRef",null,{$documentation:"Reference to some symbol (not definition/declaration)"},_t);var wt=DEFNODE("SymbolExport",null,{$documentation:"Symbol referring to a name to export"},Ot);var Mt=DEFNODE("SymbolExportForeign",null,{$documentation:"A symbol exported from this module, but it is used in the other module, and its real name is irrelevant for this module's purposes"},_t);var Nt=DEFNODE("LabelRef",null,{$documentation:"Reference to a label symbol"},_t);var It=DEFNODE("This",null,{$documentation:"The `this` symbol"},_t);var Pt=DEFNODE("Super",null,{$documentation:"The `super` symbol"},It);var Lt=DEFNODE("Constant",null,{$documentation:"Base class for all constants",getValue:function(){return this.value}});var Bt=DEFNODE("String","value quote",{$documentation:"A string literal",$propdoc:{value:"[string] the contents of this string",quote:"[string] the original quote character"}},Lt);var Vt=DEFNODE("Number","value raw",{$documentation:"A number literal",$propdoc:{value:"[number] the numeric value",raw:"[string] numeric value as string"}},Lt);var Ut=DEFNODE("BigInt","value",{$documentation:"A big int literal",$propdoc:{value:"[string] big int value"}},Lt);var zt=DEFNODE("RegExp","value",{$documentation:"A regexp literal",$propdoc:{value:"[RegExp] the actual regexp"}},Lt);var Kt=DEFNODE("Atom",null,{$documentation:"Base class for atoms"},Lt);var Gt=DEFNODE("Null",null,{$documentation:"The `null` atom",value:null},Kt);var Xt=DEFNODE("NaN",null,{$documentation:"The impossible value",value:0/0},Kt);var Ht=DEFNODE("Undefined",null,{$documentation:"The `undefined` value",value:function(){}()},Kt);var Wt=DEFNODE("Hole",null,{$documentation:"A hole in an array",value:function(){}()},Kt);var qt=DEFNODE("Infinity",null,{$documentation:"The `Infinity` value",value:1/0},Kt);var Yt=DEFNODE("Boolean",null,{$documentation:"Base class for booleans"},Kt);var jt=DEFNODE("False",null,{$documentation:"The `false` atom",value:false},Yt);var $t=DEFNODE("True",null,{$documentation:"The `true` atom",value:true},Yt);function walk(e,t,n=[e]){const i=n.push.bind(n);while(n.length){const e=n.pop();const r=t(e,n);if(r){if(r===Zt)return true;continue}e._children_backwards(i)}return false}function walk_parent(e,t,n){const i=[e];const r=i.push.bind(i);const a=n?n.slice():[];const o=[];let s;const u={parent:(e=0)=>{if(e===-1){return s}if(n&&e>=a.length){e-=a.length;return n[n.length-(e+1)]}return a[a.length-(1+e)]}};while(i.length){s=i.pop();while(o.length&&i.length==o[o.length-1]){a.pop();o.pop()}const e=t(s,u);if(e){if(e===Zt)return true;continue}const n=i.length;s._children_backwards(r);if(i.length>n){a.push(s);o.push(n-1)}}return false}const Zt=Symbol("abort walk");class TreeWalker{constructor(e){this.visit=e;this.stack=[];this.directives=Object.create(null)}_visit(e,t){this.push(e);var n=this.visit(e,t?function(){t.call(e)}:noop);if(!n&&t){t.call(e)}this.pop();return n}parent(e){return this.stack[this.stack.length-2-(e||0)]}push(e){if(e instanceof se){this.directives=Object.create(this.directives)}else if(e instanceof G&&!this.directives[e.value]){this.directives[e.value]=e}else if(e instanceof ct){this.directives=Object.create(this.directives);if(!this.directives["use strict"]){this.directives["use strict"]=e}}this.stack.push(e)}pop(){var e=this.stack.pop();if(e instanceof se||e instanceof ct){this.directives=Object.getPrototypeOf(this.directives)}}self(){return this.stack[this.stack.length-1]}find_parent(e){var t=this.stack;for(var n=t.length;--n>=0;){var i=t[n];if(i instanceof e)return i}}has_directive(e){var t=this.directives[e];if(t)return t;var n=this.stack[this.stack.length-1];if(n instanceof re&&n.body){for(var i=0;i=0;){var i=t[n];if(i instanceof j&&i.label.name==e.label.name)return i.body}else for(var n=t.length;--n>=0;){var i=t[n];if(i instanceof $||e instanceof be&&i instanceof Ae)return i}}}class TreeTransformer extends TreeWalker{constructor(e,t){super();this.before=e;this.after=t}}const Qt=1;const Jt=2;const en=4;var tn=Object.freeze({__proto__:null,AST_Accessor:ue,AST_Array:nt,AST_Arrow:le,AST_Assign:et,AST_Atom:Kt,AST_Await:ke,AST_BigInt:Ut,AST_Binary:Qe,AST_Block:H,AST_BlockStatement:W,AST_Boolean:Yt,AST_Break:be,AST_Call:Ke,AST_Case:xe,AST_Catch:Oe,AST_Chain:Ye,AST_Class:ct,AST_ClassExpression:pt,AST_ClassProperty:lt,AST_ConciseMethod:ut,AST_Conditional:Je,AST_Const:Pe,AST_Constant:Lt,AST_Continue:ye,AST_Debugger:K,AST_Default:Re,AST_DefaultAssign:tt,AST_DefClass:ft,AST_Definitions:Me,AST_Defun:fe,AST_Destructuring:pe,AST_Directive:G,AST_Do:Q,AST_Dot:We,AST_DWLoop:Z,AST_EmptyStatement:q,AST_Exit:Ee,AST_Expansion:oe,AST_Export:ze,AST_False:jt,AST_Finally:we,AST_For:ee,AST_ForIn:te,AST_ForOf:ne,AST_Function:ce,AST_Hole:Wt,AST_If:Te,AST_Import:Ve,AST_ImportMeta:Ue,AST_Infinity:qt,AST_IterationStatement:$,AST_Jump:me,AST_Label:Ft,AST_LabeledStatement:j,AST_LabelRef:Nt,AST_Lambda:se,AST_Let:Ie,AST_LoopControl:De,AST_NameMapping:Be,AST_NaN:Xt,AST_New:Ge,AST_NewTarget:ht,AST_Node:U,AST_Null:Gt,AST_Number:Vt,AST_Object:it,AST_ObjectGetter:st,AST_ObjectKeyVal:at,AST_ObjectProperty:rt,AST_ObjectSetter:ot,AST_PrefixedTemplateString:_e,AST_PropAccess:He,AST_RegExp:zt,AST_Return:ge,AST_Scope:re,AST_Sequence:Xe,AST_SimpleStatement:X,AST_Statement:z,AST_StatementWithBody:Y,AST_String:Bt,AST_Sub:qe,AST_Super:Pt,AST_Switch:Ae,AST_SwitchBranch:Ce,AST_Symbol:_t,AST_SymbolBlockDeclaration:Et,AST_SymbolCatch:Ct,AST_SymbolClass:At,AST_SymbolClassProperty:kt,AST_SymbolConst:gt,AST_SymbolDeclaration:dt,AST_SymbolDefClass:Tt,AST_SymbolDefun:bt,AST_SymbolExport:wt,AST_SymbolExportForeign:Mt,AST_SymbolFunarg:Dt,AST_SymbolImport:Rt,AST_SymbolImportForeign:xt,AST_SymbolLambda:St,AST_SymbolLet:vt,AST_SymbolMethod:yt,AST_SymbolRef:Ot,AST_SymbolVar:mt,AST_TemplateSegment:de,AST_TemplateString:he,AST_This:It,AST_Throw:ve,AST_Token:AST_Token,AST_Toplevel:ae,AST_True:$t,AST_Try:Fe,AST_Unary:je,AST_UnaryPostfix:Ze,AST_UnaryPrefix:$e,AST_Undefined:Ht,AST_Var:Ne,AST_VarDef:Le,AST_While:J,AST_With:ie,AST_Yield:Se,TreeTransformer:TreeTransformer,TreeWalker:TreeWalker,walk:walk,walk_abort:Zt,walk_body:walk_body,walk_parent:walk_parent,_INLINE:Jt,_NOINLINE:en,_PURE:Qt});function def_transform(e,t){e.DEFMETHOD("transform",function(e,n){let i=undefined;e.push(this);if(e.before)i=e.before(this,t,n);if(i===undefined){i=this;t(i,e);if(e.after){const t=e.after(i,n);if(t!==undefined)i=t}}e.pop();return i})}function do_list(e,t){return i(e,function(e){return e.transform(t,true)})}def_transform(U,noop);def_transform(j,function(e,t){e.label=e.label.transform(t);e.body=e.body.transform(t)});def_transform(X,function(e,t){e.body=e.body.transform(t)});def_transform(H,function(e,t){e.body=do_list(e.body,t)});def_transform(Q,function(e,t){e.body=e.body.transform(t);e.condition=e.condition.transform(t)});def_transform(J,function(e,t){e.condition=e.condition.transform(t);e.body=e.body.transform(t)});def_transform(ee,function(e,t){if(e.init)e.init=e.init.transform(t);if(e.condition)e.condition=e.condition.transform(t);if(e.step)e.step=e.step.transform(t);e.body=e.body.transform(t)});def_transform(te,function(e,t){e.init=e.init.transform(t);e.object=e.object.transform(t);e.body=e.body.transform(t)});def_transform(ie,function(e,t){e.expression=e.expression.transform(t);e.body=e.body.transform(t)});def_transform(Ee,function(e,t){if(e.value)e.value=e.value.transform(t)});def_transform(De,function(e,t){if(e.label)e.label=e.label.transform(t)});def_transform(Te,function(e,t){e.condition=e.condition.transform(t);e.body=e.body.transform(t);if(e.alternative)e.alternative=e.alternative.transform(t)});def_transform(Ae,function(e,t){e.expression=e.expression.transform(t);e.body=do_list(e.body,t)});def_transform(xe,function(e,t){e.expression=e.expression.transform(t);e.body=do_list(e.body,t)});def_transform(Fe,function(e,t){e.body=do_list(e.body,t);if(e.bcatch)e.bcatch=e.bcatch.transform(t);if(e.bfinally)e.bfinally=e.bfinally.transform(t)});def_transform(Oe,function(e,t){if(e.argname)e.argname=e.argname.transform(t);e.body=do_list(e.body,t)});def_transform(Me,function(e,t){e.definitions=do_list(e.definitions,t)});def_transform(Le,function(e,t){e.name=e.name.transform(t);if(e.value)e.value=e.value.transform(t)});def_transform(pe,function(e,t){e.names=do_list(e.names,t)});def_transform(se,function(e,t){if(e.name)e.name=e.name.transform(t);e.argnames=do_list(e.argnames,t);if(e.body instanceof U){e.body=e.body.transform(t)}else{e.body=do_list(e.body,t)}});def_transform(Ke,function(e,t){e.expression=e.expression.transform(t);e.args=do_list(e.args,t)});def_transform(Xe,function(e,t){const n=do_list(e.expressions,t);e.expressions=n.length?n:[new Vt({value:0})]});def_transform(We,function(e,t){e.expression=e.expression.transform(t)});def_transform(qe,function(e,t){e.expression=e.expression.transform(t);e.property=e.property.transform(t)});def_transform(Ye,function(e,t){e.expression=e.expression.transform(t)});def_transform(Se,function(e,t){if(e.expression)e.expression=e.expression.transform(t)});def_transform(ke,function(e,t){e.expression=e.expression.transform(t)});def_transform(je,function(e,t){e.expression=e.expression.transform(t)});def_transform(Qe,function(e,t){e.left=e.left.transform(t);e.right=e.right.transform(t)});def_transform(Je,function(e,t){e.condition=e.condition.transform(t);e.consequent=e.consequent.transform(t);e.alternative=e.alternative.transform(t)});def_transform(nt,function(e,t){e.elements=do_list(e.elements,t)});def_transform(it,function(e,t){e.properties=do_list(e.properties,t)});def_transform(rt,function(e,t){if(e.key instanceof U){e.key=e.key.transform(t)}if(e.value)e.value=e.value.transform(t)});def_transform(ct,function(e,t){if(e.name)e.name=e.name.transform(t);if(e.extends)e.extends=e.extends.transform(t);e.properties=do_list(e.properties,t)});def_transform(oe,function(e,t){e.expression=e.expression.transform(t)});def_transform(Be,function(e,t){e.foreign_name=e.foreign_name.transform(t);e.name=e.name.transform(t)});def_transform(Ve,function(e,t){if(e.imported_name)e.imported_name=e.imported_name.transform(t);if(e.imported_names)do_list(e.imported_names,t);e.module_name=e.module_name.transform(t)});def_transform(ze,function(e,t){if(e.exported_definition)e.exported_definition=e.exported_definition.transform(t);if(e.exported_value)e.exported_value=e.exported_value.transform(t);if(e.exported_names)do_list(e.exported_names,t);if(e.module_name)e.module_name=e.module_name.transform(t)});def_transform(he,function(e,t){e.segments=do_list(e.segments,t)});def_transform(_e,function(e,t){e.prefix=e.prefix.transform(t);e.template_string=e.template_string.transform(t)});(function(){var e=function(e){var t=true;for(var n=0;n1||e.guardedHandlers&&e.guardedHandlers.length){throw new Error("Multiple catch clauses are not supported.")}return new Fe({start:my_start_token(e),end:my_end_token(e),body:from_moz(e.block).body,bcatch:from_moz(t[0]),bfinally:e.finalizer?new we(from_moz(e.finalizer)):null})},Property:function(e){var t=e.key;var n={start:my_start_token(t||e.value),end:my_end_token(e.value),key:t.type=="Identifier"?t.name:t.value,value:from_moz(e.value)};if(e.computed){n.key=from_moz(e.key)}if(e.method){n.is_generator=e.value.generator;n.async=e.value.async;if(!e.computed){n.key=new yt({name:n.key})}else{n.key=from_moz(e.key)}return new ut(n)}if(e.kind=="init"){if(t.type!="Identifier"&&t.type!="Literal"){n.key=from_moz(t)}return new at(n)}if(typeof n.key==="string"||typeof n.key==="number"){n.key=new yt({name:n.key})}n.value=new ue(n.value);if(e.kind=="get")return new st(n);if(e.kind=="set")return new ot(n);if(e.kind=="method"){n.async=e.value.async;n.is_generator=e.value.generator;n.quote=e.computed?'"':null;return new ut(n)}},MethodDefinition:function(e){var t={start:my_start_token(e),end:my_end_token(e),key:e.computed?from_moz(e.key):new yt({name:e.key.name||e.key.value}),value:from_moz(e.value),static:e.static};if(e.kind=="get"){return new st(t)}if(e.kind=="set"){return new ot(t)}t.is_generator=e.value.generator;t.async=e.value.async;return new ut(t)},FieldDefinition:function(e){let t;if(e.computed){t=from_moz(e.key)}else{if(e.key.type!=="Identifier")throw new Error("Non-Identifier key in FieldDefinition");t=from_moz(e.key)}return new lt({start:my_start_token(e),end:my_end_token(e),key:t,value:from_moz(e.value),static:e.static})},ArrayExpression:function(e){return new nt({start:my_start_token(e),end:my_end_token(e),elements:e.elements.map(function(e){return e===null?new Wt:from_moz(e)})})},ObjectExpression:function(e){return new it({start:my_start_token(e),end:my_end_token(e),properties:e.properties.map(function(e){if(e.type==="SpreadElement"){return from_moz(e)}e.type="Property";return from_moz(e)})})},SequenceExpression:function(e){return new Xe({start:my_start_token(e),end:my_end_token(e),expressions:e.expressions.map(from_moz)})},MemberExpression:function(e){return new(e.computed?qe:We)({start:my_start_token(e),end:my_end_token(e),property:e.computed?from_moz(e.property):e.property.name,expression:from_moz(e.object),optional:e.optional||false})},ChainExpression:function(e){return new Ye({start:my_start_token(e),end:my_end_token(e),expression:from_moz(e.expression)})},SwitchCase:function(e){return new(e.test?xe:Re)({start:my_start_token(e),end:my_end_token(e),expression:from_moz(e.test),body:e.consequent.map(from_moz)})},VariableDeclaration:function(e){return new(e.kind==="const"?Pe:e.kind==="let"?Ie:Ne)({start:my_start_token(e),end:my_end_token(e),definitions:e.declarations.map(from_moz)})},ImportDeclaration:function(e){var t=null;var n=null;e.specifiers.forEach(function(e){if(e.type==="ImportSpecifier"){if(!n){n=[]}n.push(new Be({start:my_start_token(e),end:my_end_token(e),foreign_name:from_moz(e.imported),name:from_moz(e.local)}))}else if(e.type==="ImportDefaultSpecifier"){t=from_moz(e.local)}else if(e.type==="ImportNamespaceSpecifier"){if(!n){n=[]}n.push(new Be({start:my_start_token(e),end:my_end_token(e),foreign_name:new xt({name:"*"}),name:from_moz(e.local)}))}});return new Ve({start:my_start_token(e),end:my_end_token(e),imported_name:t,imported_names:n,module_name:from_moz(e.source)})},ExportAllDeclaration:function(e){return new ze({start:my_start_token(e),end:my_end_token(e),exported_names:[new Be({name:new Mt({name:"*"}),foreign_name:new Mt({name:"*"})})],module_name:from_moz(e.source)})},ExportNamedDeclaration:function(e){return new ze({start:my_start_token(e),end:my_end_token(e),exported_definition:from_moz(e.declaration),exported_names:e.specifiers&&e.specifiers.length?e.specifiers.map(function(e){return new Be({foreign_name:from_moz(e.exported),name:from_moz(e.local)})}):null,module_name:from_moz(e.source)})},ExportDefaultDeclaration:function(e){return new ze({start:my_start_token(e),end:my_end_token(e),exported_value:from_moz(e.declaration),is_default:true})},Literal:function(e){var t=e.value,n={start:my_start_token(e),end:my_end_token(e)};var i=e.regex;if(i&&i.pattern){n.value={source:i.pattern,flags:i.flags};return new zt(n)}else if(i){const i=e.raw||t;const r=i.match(/^\/(.*)\/(\w*)$/);if(!r)throw new Error("Invalid regex source "+i);const[a,o,s]=r;n.value={source:o,flags:s};return new zt(n)}if(t===null)return new Gt(n);switch(typeof t){case"string":n.value=t;return new Bt(n);case"number":n.value=t;n.raw=e.raw||t.toString();return new Vt(n);case"boolean":return new(t?$t:jt)(n)}},MetaProperty:function(e){if(e.meta.name==="new"&&e.property.name==="target"){return new ht({start:my_start_token(e),end:my_end_token(e)})}else if(e.meta.name==="import"&&e.property.name==="meta"){return new Ue({start:my_start_token(e),end:my_end_token(e)})}},Identifier:function(e){var t=n[n.length-2];return new(t.type=="LabeledStatement"?Ft:t.type=="VariableDeclarator"&&t.id===e?t.kind=="const"?gt:t.kind=="let"?vt:mt:/Import.*Specifier/.test(t.type)?t.local===e?Rt:xt:t.type=="ExportSpecifier"?t.local===e?wt:Mt:t.type=="FunctionExpression"?t.id===e?St:Dt:t.type=="FunctionDeclaration"?t.id===e?bt:Dt:t.type=="ArrowFunctionExpression"?t.params.includes(e)?Dt:Ot:t.type=="ClassExpression"?t.id===e?At:Ot:t.type=="Property"?t.key===e&&t.computed||t.value===e?Ot:yt:t.type=="FieldDefinition"?t.key===e&&t.computed||t.value===e?Ot:kt:t.type=="ClassDeclaration"?t.id===e?Tt:Ot:t.type=="MethodDefinition"?t.computed?Ot:yt:t.type=="CatchClause"?Ct:t.type=="BreakStatement"||t.type=="ContinueStatement"?Nt:Ot)({start:my_start_token(e),end:my_end_token(e),name:e.name})},BigIntLiteral(e){return new Ut({start:my_start_token(e),end:my_end_token(e),value:e.value})}};t.UpdateExpression=t.UnaryExpression=function To_Moz_Unary(e){var t="prefix"in e?e.prefix:e.type=="UnaryExpression"?true:false;return new(t?$e:Ze)({start:my_start_token(e),end:my_end_token(e),operator:e.operator,expression:from_moz(e.argument)})};t.ClassDeclaration=t.ClassExpression=function From_Moz_Class(e){return new(e.type==="ClassDeclaration"?ft:pt)({start:my_start_token(e),end:my_end_token(e),name:from_moz(e.id),extends:from_moz(e.superClass),properties:e.body.body.map(from_moz)})};map("EmptyStatement",q);map("BlockStatement",W,"body@body");map("IfStatement",Te,"test>condition, consequent>body, alternate>alternative");map("LabeledStatement",j,"label>label, body>body");map("BreakStatement",be,"label>label");map("ContinueStatement",ye,"label>label");map("WithStatement",ie,"object>expression, body>body");map("SwitchStatement",Ae,"discriminant>expression, cases@body");map("ReturnStatement",ge,"argument>value");map("ThrowStatement",ve,"argument>value");map("WhileStatement",J,"test>condition, body>body");map("DoWhileStatement",Q,"test>condition, body>body");map("ForStatement",ee,"init>init, test>condition, update>step, body>body");map("ForInStatement",te,"left>init, right>object, body>body");map("ForOfStatement",ne,"left>init, right>object, body>body, await=await");map("AwaitExpression",ke,"argument>expression");map("YieldExpression",Se,"argument>expression, delegate=is_star");map("DebuggerStatement",K);map("VariableDeclarator",Le,"id>name, init>value");map("CatchClause",Oe,"param>argname, body%body");map("ThisExpression",It);map("Super",Pt);map("BinaryExpression",Qe,"operator=operator, left>left, right>right");map("LogicalExpression",Qe,"operator=operator, left>left, right>right");map("AssignmentExpression",et,"operator=operator, left>left, right>right");map("ConditionalExpression",Je,"test>condition, consequent>consequent, alternate>alternative");map("NewExpression",Ge,"callee>expression, arguments@args");map("CallExpression",Ke,"callee>expression, optional=optional, arguments@args");def_to_moz(ae,function To_Moz_Program(e){return to_moz_scope("Program",e)});def_to_moz(oe,function To_Moz_Spread(e){return{type:to_moz_in_destructuring()?"RestElement":"SpreadElement",argument:to_moz(e.expression)}});def_to_moz(_e,function To_Moz_TaggedTemplateExpression(e){return{type:"TaggedTemplateExpression",tag:to_moz(e.prefix),quasi:to_moz(e.template_string)}});def_to_moz(he,function To_Moz_TemplateLiteral(e){var t=[];var n=[];for(var i=0;i({type:"BigIntLiteral",value:e.value}));Yt.DEFMETHOD("to_mozilla_ast",Lt.prototype.to_mozilla_ast);Gt.DEFMETHOD("to_mozilla_ast",Lt.prototype.to_mozilla_ast);Wt.DEFMETHOD("to_mozilla_ast",function To_Moz_ArrayHole(){return null});H.DEFMETHOD("to_mozilla_ast",W.prototype.to_mozilla_ast);se.DEFMETHOD("to_mozilla_ast",ce.prototype.to_mozilla_ast);function my_start_token(e){var t=e.loc,n=t&&t.start;var i=e.range;return new AST_Token("","",n&&n.line||0,n&&n.column||0,i?i[0]:e.start,false,[],[],t&&t.source)}function my_end_token(e){var t=e.loc,n=t&&t.end;var i=e.range;return new AST_Token("","",n&&n.line||0,n&&n.column||0,i?i[0]:e.end,false,[],[],t&&t.source)}function map(e,n,i){var r="function From_Moz_"+e+"(M){\n";r+="return new U2."+n.name+"({\n"+"start: my_start_token(M),\n"+"end: my_end_token(M)";var a="function To_Moz_"+e+"(M){\n";a+="return {\n"+"type: "+JSON.stringify(e);if(i)i.split(/\s*,\s*/).forEach(function(e){var t=/([a-z0-9$_]+)([=@>%])([a-z0-9$_]+)/i.exec(e);if(!t)throw new Error("Can't understand property map: "+e);var n=t[1],i=t[2],o=t[3];r+=",\n"+o+": ";a+=",\n"+n+": ";switch(i){case"@":r+="M."+n+".map(from_moz)";a+="M."+o+".map(to_moz)";break;case">":r+="from_moz(M."+n+")";a+="to_moz(M."+o+")";break;case"=":r+="M."+n;a+="M."+o;break;case"%":r+="from_moz(M."+n+").body";a+="to_moz_block(M)";break;default:throw new Error("Can't understand operator in propmap: "+e)}});r+="\n})\n}";a+="\n}\n}";r=new Function("U2","my_start_token","my_end_token","from_moz","return("+r+")")(tn,my_start_token,my_end_token,from_moz);a=new Function("to_moz","to_moz_block","to_moz_scope","return("+a+")")(to_moz,to_moz_block,to_moz_scope);t[e]=r;def_to_moz(n,a)}var n=null;function from_moz(e){n.push(e);var i=e!=null?t[e.type](e):null;n.pop();return i}U.from_mozilla_ast=function(e){var t=n;n=[];var i=from_moz(e);n=t;return i};function set_moz_loc(e,t){var n=e.start;var i=e.end;if(!(n&&i)){return t}if(n.pos!=null&&i.endpos!=null){t.range=[n.pos,i.endpos]}if(n.line){t.loc={start:{line:n.line,column:n.col},end:i.endline?{line:i.endline,column:i.endcol}:null};if(n.file){t.loc.source=n.file}}return t}function def_to_moz(e,t){e.DEFMETHOD("to_mozilla_ast",function(e){return set_moz_loc(this,t(this,e))})}var i=null;function to_moz(e){if(i===null){i=[]}i.push(e);var t=e!=null?e.to_mozilla_ast(i[i.length-2]):null;i.pop();if(i.length===0){i=null}return t}function to_moz_in_destructuring(){var e=i.length;while(e--){if(i[e]instanceof pe){return true}}return false}function to_moz_block(e){return{type:"BlockStatement",body:e.body.map(to_moz)}}function to_moz_scope(e,t){var n=t.body.map(to_moz);if(t.body[0]instanceof X&&t.body[0].body instanceof Bt){n.unshift(to_moz(new q(t.body[0])))}return{type:e,body:n}}})();function first_in_statement(e){let t=e.parent(-1);for(let n=0,i;i=e.parent(n);n++){if(i instanceof z&&i.body===t)return true;if(i instanceof Xe&&i.expressions[0]===t||i.TYPE==="Call"&&i.expression===t||i instanceof _e&&i.prefix===t||i instanceof We&&i.expression===t||i instanceof qe&&i.expression===t||i instanceof Je&&i.condition===t||i instanceof Qe&&i.left===t||i instanceof Ze&&i.expression===t){t=i}else{return false}}}function left_is_object(e){if(e instanceof it)return true;if(e instanceof Xe)return left_is_object(e.expressions[0]);if(e.TYPE==="Call")return left_is_object(e.expression);if(e instanceof _e)return left_is_object(e.prefix);if(e instanceof We||e instanceof qe)return left_is_object(e.expression);if(e instanceof Je)return left_is_object(e.condition);if(e instanceof Qe)return left_is_object(e.left);if(e instanceof Ze)return left_is_object(e.expression);return false}const nn=/^$|[;{][\s\n]*$/;const rn=10;const an=32;const on=/[@#]__(PURE|INLINE|NOINLINE)__/g;function is_some_comments(e){return(e.type==="comment2"||e.type==="comment1")&&/@preserve|@lic|@cc_on|^\**!/i.test(e.value)}function OutputStream(e){var t=!e;e=defaults(e,{ascii_only:false,beautify:false,braces:false,comments:"some",ecma:5,ie8:false,indent_level:4,indent_start:0,inline_script:true,keep_numbers:false,keep_quoted_props:false,max_line_len:false,preamble:null,preserve_annotations:false,quote_keys:false,quote_style:0,safari10:false,semicolons:true,shebang:true,shorthand:undefined,source_map:null,webkit:false,width:80,wrap_iife:false,wrap_func_args:true},true);if(e.shorthand===undefined)e.shorthand=e.ecma>5;var n=return_false;if(e.comments){let t=e.comments;if(typeof e.comments==="string"&&/^\/.*\/[a-zA-Z]*$/.test(e.comments)){var i=e.comments.lastIndexOf("/");t=new RegExp(e.comments.substr(1,i-1),e.comments.substr(i+1))}if(t instanceof RegExp){n=function(e){return e.type!="comment5"&&t.test(e.value)}}else if(typeof t==="function"){n=function(e){return e.type!="comment5"&&t(this,e)}}else if(t==="some"){n=is_some_comments}else{n=return_true}}var r=0;var a=0;var o=1;var s=0;var u="";let c=new Set;var l=e.ascii_only?function(t,n){if(e.ecma>=2015&&!e.safari10){t=t.replace(/[\ud800-\udbff][\udc00-\udfff]/g,function(e){var t=get_full_char_code(e,0).toString(16);return"\\u{"+t+"}"})}return t.replace(/[\u0000-\u001f\u007f-\uffff]/g,function(e){var t=e.charCodeAt(0).toString(16);if(t.length<=2&&!n){while(t.length<2)t="0"+t;return"\\x"+t}else{while(t.length<4)t="0"+t;return"\\u"+t}})}:function(e){return e.replace(/[\ud800-\udbff][\udc00-\udfff]|([\ud800-\udbff]|[\udc00-\udfff])/g,function(e,t){if(t){return"\\u"+t.charCodeAt(0).toString(16)}return e})};function make_string(t,n){var i=0,r=0;t=t.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g,function(n,a){switch(n){case'"':++i;return'"';case"'":++r;return"'";case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\v":return e.ie8?"\\x0B":"\\v";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";case"\ufeff":return"\\ufeff";case"\0":return/[0-9]/.test(get_full_char(t,a+1))?"\\x00":"\\0"}return n});function quote_single(){return"'"+t.replace(/\x27/g,"\\'")+"'"}function quote_double(){return'"'+t.replace(/\x22/g,'\\"')+'"'}function quote_template(){return"`"+t.replace(/`/g,"\\`")+"`"}t=l(t);if(n==="`")return quote_template();switch(e.quote_style){case 1:return quote_single();case 2:return quote_double();case 3:return n=="'"?quote_single():quote_double();default:return i>r?quote_single():quote_double()}}function encode_string(t,n){var i=make_string(t,n);if(e.inline_script){i=i.replace(/<\x2f(script)([>\/\t\n\f\r ])/gi,"<\\/$1$2");i=i.replace(/\x3c!--/g,"\\x3c!--");i=i.replace(/--\x3e/g,"--\\x3e")}return i}function make_name(e){e=e.toString();e=l(e,true);return e}function make_indent(t){return" ".repeat(e.indent_start+r-t*e.indent_level)}var f=false;var p=false;var _=false;var h=0;var d=false;var m=false;var E=-1;var g="";var v,D,b=e.source_map&&[];var y=b?function(){b.forEach(function(t){try{e.source_map.add(t.token.file,t.line,t.col,t.token.line,t.token.col,!t.name&&t.token.type=="name"?t.token.value:t.name)}catch(e){}});b=[]}:noop;var k=e.max_line_len?function(){if(a>e.max_line_len){if(h){var t=u.slice(0,h);var n=u.slice(h);if(b){var i=n.length-a;b.forEach(function(e){e.line++;e.col+=i})}u=t+"\n"+n;o++;s++;a=n.length}}if(h){h=0;y()}}:noop;var S=makePredicate("( [ + * / - , . `");function print(t){t=String(t);var n=get_full_char(t,0);if(d&&n){d=false;if(n!=="\n"){print("\n");C()}}if(m&&n){m=false;if(!/[\s;})]/.test(n)){A()}}E=-1;var i=g.charAt(g.length-1);if(_){_=false;if(i===":"&&n==="}"||(!n||!";}".includes(n))&&i!==";"){if(e.semicolons||S.has(n)){u+=";";a++;s++}else{k();if(a>0){u+="\n";s++;o++;a=0}if(/^\s+$/.test(t)){_=true}}if(!e.beautify)p=false}}if(p){if(is_identifier_char(i)&&(is_identifier_char(n)||n=="\\")||n=="/"&&n==i||(n=="+"||n=="-")&&n==g){u+=" ";a++;s++}p=false}if(v){b.push({token:v,name:D,line:o,col:a});v=false;if(!h)y()}u+=t;f=t[t.length-1]=="(";s+=t.length;var r=t.split(/\r?\n/),c=r.length-1;o+=c;a+=r[0].length;if(c>0){k();a=r[c].length}g=t}var T=function(){print("*")};var A=e.beautify?function(){print(" ")}:function(){p=true};var C=e.beautify?function(t){if(e.beautify){print(make_indent(t?.5:0))}}:noop;var R=e.beautify?function(e,t){if(e===true)e=next_indent();var n=r;r=e;var i=t();r=n;return i}:function(e,t){return t()};var x=e.beautify?function(){if(E<0)return print("\n");if(u[E]!="\n"){u=u.slice(0,E)+"\n"+u.slice(E);s++;o++}E++}:e.max_line_len?function(){k();h=u.length}:noop;var F=e.beautify?function(){print(";")}:function(){_=true};function force_semicolon(){_=false;print(";")}function next_indent(){return r+e.indent_level}function with_block(e){var t;print("{");x();R(next_indent(),function(){t=e()});C();print("}");return t}function with_parens(e){print("(");var t=e();print(")");return t}function with_square(e){print("[");var t=e();print("]");return t}function comma(){print(",");A()}function colon(){print(":");A()}var O=b?function(e,t){v=e;D=t}:noop;function get(){if(h){k()}return u}function has_nlb(){let e=u.length-1;while(e>=0){const t=u.charCodeAt(e);if(t===rn){return true}if(t!==an){return false}e--}return true}function filter_comment(t){if(!e.preserve_annotations){t=t.replace(on," ")}if(/^\s*$/.test(t)){return""}return t.replace(/(<\s*\/\s*)(script)/i,"<\\/$2")}function prepend_comments(t){var i=this;var r=t.start;if(!r)return;var a=i.printed_comments;const o=t instanceof Ee&&t.value;if(r.comments_before&&a.has(r.comments_before)){if(o){r.comments_before=[]}else{return}}var u=r.comments_before;if(!u){u=r.comments_before=[]}a.add(u);if(o){var c=new TreeWalker(function(e){var t=c.parent();if(t instanceof Ee||t instanceof Qe&&t.left===e||t.TYPE=="Call"&&t.expression===e||t instanceof Je&&t.condition===e||t instanceof We&&t.expression===e||t instanceof Xe&&t.expressions[0]===e||t instanceof qe&&t.expression===e||t instanceof Ze){if(!e.start)return;var n=e.start.comments_before;if(n&&!a.has(n)){a.add(n);u=u.concat(n)}}else{return true}});c.push(t);t.value.walk(c)}if(s==0){if(u.length>0&&e.shebang&&u[0].type==="comment5"&&!a.has(u[0])){print("#!"+u.shift().value+"\n");C()}var l=e.preamble;if(l){print(l.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g,"\n"))}}u=u.filter(n,t).filter(e=>!a.has(e));if(u.length==0)return;var f=has_nlb();u.forEach(function(e,t){a.add(e);if(!f){if(e.nlb){print("\n");C();f=true}else if(t>0){A()}}if(/comment[134]/.test(e.type)){var n=filter_comment(e.value);if(n){print("//"+n+"\n");C()}f=true}else if(e.type=="comment2"){var n=filter_comment(e.value);if(n){print("/*"+n+"*/")}f=false}});if(!f){if(r.nlb){print("\n");C()}else{A()}}}function append_comments(e,t){var i=this;var r=e.end;if(!r)return;var a=i.printed_comments;var o=r[t?"comments_before":"comments_after"];if(!o||a.has(o))return;if(!(e instanceof z||o.every(e=>!/comment[134]/.test(e.type))))return;a.add(o);var s=u.length;o.filter(n,e).forEach(function(e,n){if(a.has(e))return;a.add(e);m=false;if(d){print("\n");C();d=false}else if(e.nlb&&(n>0||!has_nlb())){print("\n");C()}else if(n>0||!t){A()}if(/comment[134]/.test(e.type)){const t=filter_comment(e.value);if(t){print("//"+t)}d=true}else if(e.type=="comment2"){const t=filter_comment(e.value);if(t){print("/*"+t+"*/")}m=true}});if(u.length>s)E=s}var w=[];return{get:get,toString:get,indent:C,in_directive:false,use_asm:null,active_scope:null,indentation:function(){return r},current_width:function(){return a-r},should_break:function(){return e.width&&this.current_width()>=e.width},has_parens:function(){return f},newline:x,print:print,star:T,space:A,comma:comma,colon:colon,last:function(){return g},semicolon:F,force_semicolon:force_semicolon,to_utf8:l,print_name:function(e){print(make_name(e))},print_string:function(e,t,n){var i=encode_string(e,t);if(n===true&&!i.includes("\\")){if(!nn.test(u)){force_semicolon()}force_semicolon()}print(i)},print_template_string_chars:function(e){var t=encode_string(e,"`").replace(/\${/g,"\\${");return print(t.substr(1,t.length-2))},encode_string:encode_string,next_indent:next_indent,with_indent:R,with_block:with_block,with_parens:with_parens,with_square:with_square,add_mapping:O,option:function(t){return e[t]},printed_comments:c,prepend_comments:t?noop:prepend_comments,append_comments:t||n===return_false?noop:append_comments,line:function(){return o},col:function(){return a},pos:function(){return s},push_node:function(e){w.push(e)},pop_node:function(){return w.pop()},parent:function(e){return w[w.length-2-(e||0)]}}}(function(){function DEFPRINT(e,t){e.DEFMETHOD("_codegen",t)}U.DEFMETHOD("print",function(e,t){var n=this,i=n._codegen;if(n instanceof re){e.active_scope=n}else if(!e.use_asm&&n instanceof G&&n.value=="use asm"){e.use_asm=e.active_scope}function doit(){e.prepend_comments(n);n.add_source_map(e);i(n,e);e.append_comments(n)}e.push_node(n);if(t||n.needs_parens(e)){e.with_parens(doit)}else{doit()}e.pop_node();if(n===e.use_asm){e.use_asm=null}});U.DEFMETHOD("_print",U.prototype.print);U.DEFMETHOD("print_to_string",function(e){var t=OutputStream(e);this.print(t);return t.get()});function PARENS(e,t){if(Array.isArray(e)){e.forEach(function(e){PARENS(e,t)})}else{e.DEFMETHOD("needs_parens",t)}}PARENS(U,return_false);PARENS(ce,function(e){if(!e.has_parens()&&first_in_statement(e)){return true}if(e.option("webkit")){var t=e.parent();if(t instanceof He&&t.expression===this){return true}}if(e.option("wrap_iife")){var t=e.parent();if(t instanceof Ke&&t.expression===this){return true}}if(e.option("wrap_func_args")){var t=e.parent();if(t instanceof Ke&&t.args.includes(this)){return true}}return false});PARENS(le,function(e){var t=e.parent();if(e.option("wrap_func_args")&&t instanceof Ke&&t.args.includes(this)){return true}return t instanceof He&&t.expression===this});PARENS(it,function(e){return!e.has_parens()&&first_in_statement(e)});PARENS(pt,first_in_statement);PARENS(je,function(e){var t=e.parent();return t instanceof He&&t.expression===this||t instanceof Ke&&t.expression===this||t instanceof Qe&&t.operator==="**"&&this instanceof $e&&t.left===this&&this.operator!=="++"&&this.operator!=="--"});PARENS(ke,function(e){var t=e.parent();return t instanceof He&&t.expression===this||t instanceof Ke&&t.expression===this||e.option("safari10")&&t instanceof $e});PARENS(Xe,function(e){var t=e.parent();return t instanceof Ke||t instanceof je||t instanceof Qe||t instanceof Le||t instanceof He||t instanceof nt||t instanceof rt||t instanceof Je||t instanceof le||t instanceof tt||t instanceof oe||t instanceof ne&&this===t.object||t instanceof Se||t instanceof ze});PARENS(Qe,function(e){var t=e.parent();if(t instanceof Ke&&t.expression===this)return true;if(t instanceof je)return true;if(t instanceof He&&t.expression===this)return true;if(t instanceof Qe){const e=t.operator;const n=this.operator;if(n==="??"&&(e==="||"||e==="&&")){return true}if(e==="??"&&(n==="||"||n==="&&")){return true}const i=M[e];const r=M[n];if(i>r||i==r&&(this===t.right||e=="**")){return true}}});PARENS(Se,function(e){var t=e.parent();if(t instanceof Qe&&t.operator!=="=")return true;if(t instanceof Ke&&t.expression===this)return true;if(t instanceof Je&&t.condition===this)return true;if(t instanceof je)return true;if(t instanceof He&&t.expression===this)return true});PARENS(He,function(e){var t=e.parent();if(t instanceof Ge&&t.expression===this){return walk(this,e=>{if(e instanceof re)return true;if(e instanceof Ke){return Zt}})}});PARENS(Ke,function(e){var t=e.parent(),n;if(t instanceof Ge&&t.expression===this||t instanceof ze&&t.is_default&&this.expression instanceof ce)return true;return this.expression instanceof ce&&t instanceof He&&t.expression===this&&(n=e.parent(1))instanceof et&&n.left===t});PARENS(Ge,function(e){var t=e.parent();if(this.args.length===0&&(t instanceof He||t instanceof Ke&&t.expression===this))return true});PARENS(Vt,function(e){var t=e.parent();if(t instanceof He&&t.expression===this){var n=this.getValue();if(n<0||/^0/.test(make_num(n))){return true}}});PARENS(Ut,function(e){var t=e.parent();if(t instanceof He&&t.expression===this){var n=this.getValue();if(n.startsWith("-")){return true}}});PARENS([et,Je],function(e){var t=e.parent();if(t instanceof je)return true;if(t instanceof Qe&&!(t instanceof et))return true;if(t instanceof Ke&&t.expression===this)return true;if(t instanceof Je&&t.condition===this)return true;if(t instanceof He&&t.expression===this)return true;if(this instanceof et&&this.left instanceof pe&&this.left.is_array===false)return true});DEFPRINT(G,function(e,t){t.print_string(e.value,e.quote);t.semicolon()});DEFPRINT(oe,function(e,t){t.print("...");e.expression.print(t)});DEFPRINT(pe,function(e,t){t.print(e.is_array?"[":"{");var n=e.names.length;e.names.forEach(function(e,i){if(i>0)t.comma();e.print(t);if(i==n-1&&e instanceof Wt)t.comma()});t.print(e.is_array?"]":"}")});DEFPRINT(K,function(e,t){t.print("debugger");t.semicolon()});function display_body(e,t,n,i){var r=e.length-1;n.in_directive=i;e.forEach(function(e,i){if(n.in_directive===true&&!(e instanceof G||e instanceof q||e instanceof X&&e.body instanceof Bt)){n.in_directive=false}if(!(e instanceof q)){n.indent();e.print(n);if(!(i==r&&t)){n.newline();if(t)n.newline()}}if(n.in_directive===true&&e instanceof X&&e.body instanceof Bt){n.in_directive=false}});n.in_directive=false}Y.DEFMETHOD("_do_print_body",function(e){force_statement(this.body,e)});DEFPRINT(z,function(e,t){e.body.print(t);t.semicolon()});DEFPRINT(ae,function(e,t){display_body(e.body,true,t,true);t.print("")});DEFPRINT(j,function(e,t){e.label.print(t);t.colon();e.body.print(t)});DEFPRINT(X,function(e,t){e.body.print(t);t.semicolon()});function print_braced_empty(e,t){t.print("{");t.with_indent(t.next_indent(),function(){t.append_comments(e,true)});t.print("}")}function print_braced(e,t,n){if(e.body.length>0){t.with_block(function(){display_body(e.body,false,t,n)})}else print_braced_empty(e,t)}DEFPRINT(W,function(e,t){print_braced(e,t)});DEFPRINT(q,function(e,t){t.semicolon()});DEFPRINT(Q,function(e,t){t.print("do");t.space();make_block(e.body,t);t.space();t.print("while");t.space();t.with_parens(function(){e.condition.print(t)});t.semicolon()});DEFPRINT(J,function(e,t){t.print("while");t.space();t.with_parens(function(){e.condition.print(t)});t.space();e._do_print_body(t)});DEFPRINT(ee,function(e,t){t.print("for");t.space();t.with_parens(function(){if(e.init){if(e.init instanceof Me){e.init.print(t)}else{parenthesize_for_noin(e.init,t,true)}t.print(";");t.space()}else{t.print(";")}if(e.condition){e.condition.print(t);t.print(";");t.space()}else{t.print(";")}if(e.step){e.step.print(t)}});t.space();e._do_print_body(t)});DEFPRINT(te,function(e,t){t.print("for");if(e.await){t.space();t.print("await")}t.space();t.with_parens(function(){e.init.print(t);t.space();t.print(e instanceof ne?"of":"in");t.space();e.object.print(t)});t.space();e._do_print_body(t)});DEFPRINT(ie,function(e,t){t.print("with");t.space();t.with_parens(function(){e.expression.print(t)});t.space();e._do_print_body(t)});se.DEFMETHOD("_do_print",function(e,t){var n=this;if(!t){if(n.async){e.print("async");e.space()}e.print("function");if(n.is_generator){e.star()}if(n.name){e.space()}}if(n.name instanceof _t){n.name.print(e)}else if(t&&n.name instanceof U){e.with_square(function(){n.name.print(e)})}e.with_parens(function(){n.argnames.forEach(function(t,n){if(n)e.comma();t.print(e)})});e.space();print_braced(n,e,true)});DEFPRINT(se,function(e,t){e._do_print(t)});DEFPRINT(_e,function(e,t){var n=e.prefix;var i=n instanceof se||n instanceof Qe||n instanceof Je||n instanceof Xe||n instanceof je||n instanceof We&&n.expression instanceof it;if(i)t.print("(");e.prefix.print(t);if(i)t.print(")");e.template_string.print(t)});DEFPRINT(he,function(e,t){var n=t.parent()instanceof _e;t.print("`");for(var i=0;i");e.space();const r=t.body[0];if(t.body.length===1&&r instanceof ge){const t=r.value;if(!t){e.print("{}")}else if(left_is_object(t)){e.print("(");t.print(e);e.print(")")}else{t.print(e)}}else{print_braced(t,e)}if(i){e.print(")")}});Ee.DEFMETHOD("_do_print",function(e,t){e.print(t);if(this.value){e.space();const t=this.value.start.comments_before;if(t&&t.length&&!e.printed_comments.has(t)){e.print("(");this.value.print(e);e.print(")")}else{this.value.print(e)}}e.semicolon()});DEFPRINT(ge,function(e,t){e._do_print(t,"return")});DEFPRINT(ve,function(e,t){e._do_print(t,"throw")});DEFPRINT(Se,function(e,t){var n=e.is_star?"*":"";t.print("yield"+n);if(e.expression){t.space();e.expression.print(t)}});DEFPRINT(ke,function(e,t){t.print("await");t.space();var n=e.expression;var i=!(n instanceof Ke||n instanceof Ot||n instanceof He||n instanceof je||n instanceof Lt||n instanceof ke||n instanceof it);if(i)t.print("(");e.expression.print(t);if(i)t.print(")")});De.DEFMETHOD("_do_print",function(e,t){e.print(t);if(this.label){e.space();this.label.print(e)}e.semicolon()});DEFPRINT(be,function(e,t){e._do_print(t,"break")});DEFPRINT(ye,function(e,t){e._do_print(t,"continue")});function make_then(e,t){var n=e.body;if(t.option("braces")||t.option("ie8")&&n instanceof Q)return make_block(n,t);if(!n)return t.force_semicolon();while(true){if(n instanceof Te){if(!n.alternative){make_block(e.body,t);return}n=n.alternative}else if(n instanceof Y){n=n.body}else break}force_statement(e.body,t)}DEFPRINT(Te,function(e,t){t.print("if");t.space();t.with_parens(function(){e.condition.print(t)});t.space();if(e.alternative){make_then(e,t);t.space();t.print("else");t.space();if(e.alternative instanceof Te)e.alternative.print(t);else force_statement(e.alternative,t)}else{e._do_print_body(t)}});DEFPRINT(Ae,function(e,t){t.print("switch");t.space();t.with_parens(function(){e.expression.print(t)});t.space();var n=e.body.length-1;if(n<0)print_braced_empty(e,t);else t.with_block(function(){e.body.forEach(function(e,i){t.indent(true);e.print(t);if(i0)t.newline()})})});Ce.DEFMETHOD("_do_print_body",function(e){e.newline();this.body.forEach(function(t){e.indent();t.print(e);e.newline()})});DEFPRINT(Re,function(e,t){t.print("default:");e._do_print_body(t)});DEFPRINT(xe,function(e,t){t.print("case");t.space();e.expression.print(t);t.print(":");e._do_print_body(t)});DEFPRINT(Fe,function(e,t){t.print("try");t.space();print_braced(e,t);if(e.bcatch){t.space();e.bcatch.print(t)}if(e.bfinally){t.space();e.bfinally.print(t)}});DEFPRINT(Oe,function(e,t){t.print("catch");if(e.argname){t.space();t.with_parens(function(){e.argname.print(t)})}t.space();print_braced(e,t)});DEFPRINT(we,function(e,t){t.print("finally");t.space();print_braced(e,t)});Me.DEFMETHOD("_do_print",function(e,t){e.print(t);e.space();this.definitions.forEach(function(t,n){if(n)e.comma();t.print(e)});var n=e.parent();var i=n instanceof ee||n instanceof te;var r=!i||n&&n.init!==this;if(r)e.semicolon()});DEFPRINT(Ie,function(e,t){e._do_print(t,"let")});DEFPRINT(Ne,function(e,t){e._do_print(t,"var")});DEFPRINT(Pe,function(e,t){e._do_print(t,"const")});DEFPRINT(Ve,function(e,t){t.print("import");t.space();if(e.imported_name){e.imported_name.print(t)}if(e.imported_name&&e.imported_names){t.print(",");t.space()}if(e.imported_names){if(e.imported_names.length===1&&e.imported_names[0].foreign_name.name==="*"){e.imported_names[0].print(t)}else{t.print("{");e.imported_names.forEach(function(n,i){t.space();n.print(t);if(i{if(e instanceof re)return true;if(e instanceof Qe&&e.operator=="in"){return Zt}})}e.print(t,i)}DEFPRINT(Le,function(e,t){e.name.print(t);if(e.value){t.space();t.print("=");t.space();var n=t.parent(1);var i=n instanceof ee||n instanceof te;parenthesize_for_noin(e.value,t,i)}});DEFPRINT(Ke,function(e,t){e.expression.print(t);if(e instanceof Ge&&e.args.length===0)return;if(e.expression instanceof Ke||e.expression instanceof se){t.add_mapping(e.start)}if(e.optional)t.print("?.");t.with_parens(function(){e.args.forEach(function(e,n){if(n)t.comma();e.print(t)})})});DEFPRINT(Ge,function(e,t){t.print("new");t.space();Ke.prototype._codegen(e,t)});Xe.DEFMETHOD("_do_print",function(e){this.expressions.forEach(function(t,n){if(n>0){e.comma();if(e.should_break()){e.newline();e.indent()}}t.print(e)})});DEFPRINT(Xe,function(e,t){e._do_print(t)});DEFPRINT(We,function(e,t){var n=e.expression;n.print(t);var i=e.property;var r=l.has(i)?t.option("ie8"):!is_identifier_string(i,t.option("ecma")>=2015||t.option("safari10"));if(e.optional)t.print("?.");if(r){t.print("[");t.add_mapping(e.end);t.print_string(i);t.print("]")}else{if(n instanceof Vt&&n.getValue()>=0){if(!/[xa-f.)]/i.test(t.last())){t.print(".")}}if(!e.optional)t.print(".");t.add_mapping(e.end);t.print_name(i)}});DEFPRINT(qe,function(e,t){e.expression.print(t);if(e.optional)t.print("?.");t.print("[");e.property.print(t);t.print("]")});DEFPRINT(Ye,function(e,t){e.expression.print(t)});DEFPRINT($e,function(e,t){var n=e.operator;t.print(n);if(/^[a-z]/i.test(n)||/[+-]$/.test(n)&&e.expression instanceof $e&&/^[+-]/.test(e.expression.operator)){t.space()}e.expression.print(t)});DEFPRINT(Ze,function(e,t){e.expression.print(t);t.print(e.operator)});DEFPRINT(Qe,function(e,t){var n=e.operator;e.left.print(t);if(n[0]==">"&&e.left instanceof Ze&&e.left.operator=="--"){t.print(" ")}else{t.space()}t.print(n);if((n=="<"||n=="<<")&&e.right instanceof $e&&e.right.operator=="!"&&e.right.expression instanceof $e&&e.right.expression.operator=="--"){t.print(" ")}else{t.space()}e.right.print(t)});DEFPRINT(Je,function(e,t){e.condition.print(t);t.space();t.print("?");t.space();e.consequent.print(t);t.space();t.colon();e.alternative.print(t)});DEFPRINT(nt,function(e,t){t.with_square(function(){var n=e.elements,i=n.length;if(i>0)t.space();n.forEach(function(e,n){if(n)t.comma();e.print(t);if(n===i-1&&e instanceof Wt)t.comma()});if(i>0)t.space()})});DEFPRINT(it,function(e,t){if(e.properties.length>0)t.with_block(function(){e.properties.forEach(function(e,n){if(n){t.print(",");t.newline()}t.indent();e.print(t)});t.newline()});else print_braced_empty(e,t)});DEFPRINT(ct,function(e,t){t.print("class");t.space();if(e.name){e.name.print(t);t.space()}if(e.extends){var n=!(e.extends instanceof Ot)&&!(e.extends instanceof He)&&!(e.extends instanceof pt)&&!(e.extends instanceof ce);t.print("extends");if(n){t.print("(")}else{t.space()}e.extends.print(t);if(n){t.print(")")}else{t.space()}}if(e.properties.length>0)t.with_block(function(){e.properties.forEach(function(e,n){if(n){t.newline()}t.indent();e.print(t)});t.newline()});else t.print("{}")});DEFPRINT(ht,function(e,t){t.print("new.target")});function print_property_name(e,t,n){if(n.option("quote_keys")){return n.print_string(e)}if(""+ +e==e&&e>=0){if(n.option("keep_numbers")){return n.print(e)}return n.print(make_num(e))}var i=l.has(e)?n.option("ie8"):n.option("ecma")<2015||n.option("safari10")?!is_basic_identifier_string(e):!is_identifier_string(e,true);if(i||t&&n.option("keep_quoted_props")){return n.print_string(e,t)}return n.print_name(e)}DEFPRINT(at,function(e,t){function get_name(e){var t=e.definition();return t?t.mangled_name||t.name:e.name}var n=t.option("shorthand");if(n&&e.value instanceof _t&&is_identifier_string(e.key,t.option("ecma")>=2015||t.option("safari10"))&&get_name(e.value)===e.key&&!l.has(e.key)){print_property_name(e.key,e.quote,t)}else if(n&&e.value instanceof tt&&e.value.left instanceof _t&&is_identifier_string(e.key,t.option("ecma")>=2015||t.option("safari10"))&&get_name(e.value.left)===e.key){print_property_name(e.key,e.quote,t);t.space();t.print("=");t.space();e.value.right.print(t)}else{if(!(e.key instanceof U)){print_property_name(e.key,e.quote,t)}else{t.with_square(function(){e.key.print(t)})}t.colon();e.value.print(t)}});DEFPRINT(lt,(e,t)=>{if(e.static){t.print("static");t.space()}if(e.key instanceof kt){print_property_name(e.key.name,e.quote,t)}else{t.print("[");e.key.print(t);t.print("]")}if(e.value){t.print("=");e.value.print(t)}t.semicolon()});rt.DEFMETHOD("_print_getter_setter",function(e,t){var n=this;if(n.static){t.print("static");t.space()}if(e){t.print(e);t.space()}if(n.key instanceof yt){print_property_name(n.key.name,n.quote,t)}else{t.with_square(function(){n.key.print(t)})}n.value._do_print(t,true)});DEFPRINT(ot,function(e,t){e._print_getter_setter("set",t)});DEFPRINT(st,function(e,t){e._print_getter_setter("get",t)});DEFPRINT(ut,function(e,t){var n;if(e.is_generator&&e.async){n="async*"}else if(e.is_generator){n="*"}else if(e.async){n="async"}e._print_getter_setter(n,t)});_t.DEFMETHOD("_do_print",function(e){var t=this.definition();e.print_name(t?t.mangled_name||t.name:this.name)});DEFPRINT(_t,function(e,t){e._do_print(t)});DEFPRINT(Wt,noop);DEFPRINT(It,function(e,t){t.print("this")});DEFPRINT(Pt,function(e,t){t.print("super")});DEFPRINT(Lt,function(e,t){t.print(e.getValue())});DEFPRINT(Bt,function(e,t){t.print_string(e.getValue(),e.quote,t.in_directive)});DEFPRINT(Vt,function(e,t){if((t.option("keep_numbers")||t.use_asm)&&e.raw){t.print(e.raw)}else{t.print(make_num(e.getValue()))}});DEFPRINT(Ut,function(e,t){t.print(e.getValue()+"n")});const e=/(<\s*\/\s*script)/i;const t=(e,t)=>t.replace("/","\\/");DEFPRINT(zt,function(n,i){let{source:r,flags:a}=n.getValue();r=regexp_source_fix(r);a=a?sort_regexp_flags(a):"";r=r.replace(e,t);i.print(i.to_utf8(`/${r}/${a}`));const o=i.parent();if(o instanceof Qe&&/^\w/.test(o.operator)&&o.left===n){i.print(" ")}});function force_statement(e,t){if(t.option("braces")){make_block(e,t)}else{if(!e||e instanceof q)t.force_semicolon();else e.print(t)}}function best_of(e){var t=e[0],n=t.length;for(var i=1;i{return e===null&&t===null||e.TYPE===t.TYPE&&e.shallow_cmp(t)};const un=(e,t)=>{if(!sn(e,t))return false;const n=[e];const i=[t];const r=n.push.bind(n);const a=i.push.bind(i);while(n.length&&i.length){const e=n.pop();const t=i.pop();if(!sn(e,t))return false;e._children_backwards(r);t._children_backwards(a);if(n.length!==i.length){return false}}return n.length==0&&i.length==0};const cn=e=>{const t=Object.keys(e).map(t=>{if(e[t]==="eq"){return`this.${t} === other.${t}`}else if(e[t]==="exist"){return`(this.${t} == null ? other.${t} == null : this.${t} === other.${t})`}else{throw new Error(`mkshallow: Unexpected instruction: ${e[t]}`)}}).join(" && ");return new Function("other","return "+t)};const ln=()=>true;U.prototype.shallow_cmp=function(){throw new Error("did not find a shallow_cmp function for "+this.constructor.name)};K.prototype.shallow_cmp=ln;G.prototype.shallow_cmp=cn({value:"eq"});X.prototype.shallow_cmp=ln;H.prototype.shallow_cmp=ln;q.prototype.shallow_cmp=ln;j.prototype.shallow_cmp=cn({"label.name":"eq"});Q.prototype.shallow_cmp=ln;J.prototype.shallow_cmp=ln;ee.prototype.shallow_cmp=cn({init:"exist",condition:"exist",step:"exist"});te.prototype.shallow_cmp=ln;ne.prototype.shallow_cmp=ln;ie.prototype.shallow_cmp=ln;ae.prototype.shallow_cmp=ln;oe.prototype.shallow_cmp=ln;se.prototype.shallow_cmp=cn({is_generator:"eq",async:"eq"});pe.prototype.shallow_cmp=cn({is_array:"eq"});_e.prototype.shallow_cmp=ln;he.prototype.shallow_cmp=ln;de.prototype.shallow_cmp=cn({value:"eq"});me.prototype.shallow_cmp=ln;De.prototype.shallow_cmp=ln;ke.prototype.shallow_cmp=ln;Se.prototype.shallow_cmp=cn({is_star:"eq"});Te.prototype.shallow_cmp=cn({alternative:"exist"});Ae.prototype.shallow_cmp=ln;Ce.prototype.shallow_cmp=ln;Fe.prototype.shallow_cmp=cn({bcatch:"exist",bfinally:"exist"});Oe.prototype.shallow_cmp=cn({argname:"exist"});we.prototype.shallow_cmp=ln;Me.prototype.shallow_cmp=ln;Le.prototype.shallow_cmp=cn({value:"exist"});Be.prototype.shallow_cmp=ln;Ve.prototype.shallow_cmp=cn({imported_name:"exist",imported_names:"exist"});Ue.prototype.shallow_cmp=ln;ze.prototype.shallow_cmp=cn({exported_definition:"exist",exported_value:"exist",exported_names:"exist",module_name:"eq",is_default:"eq"});Ke.prototype.shallow_cmp=ln;Xe.prototype.shallow_cmp=ln;He.prototype.shallow_cmp=ln;Ye.prototype.shallow_cmp=ln;We.prototype.shallow_cmp=cn({property:"eq"});je.prototype.shallow_cmp=cn({operator:"eq"});Qe.prototype.shallow_cmp=cn({operator:"eq"});Je.prototype.shallow_cmp=ln;nt.prototype.shallow_cmp=ln;it.prototype.shallow_cmp=ln;rt.prototype.shallow_cmp=ln;at.prototype.shallow_cmp=cn({key:"eq"});ot.prototype.shallow_cmp=cn({static:"eq"});st.prototype.shallow_cmp=cn({static:"eq"});ut.prototype.shallow_cmp=cn({static:"eq",is_generator:"eq",async:"eq"});ct.prototype.shallow_cmp=cn({name:"exist",extends:"exist"});lt.prototype.shallow_cmp=cn({static:"eq"});_t.prototype.shallow_cmp=cn({name:"eq"});ht.prototype.shallow_cmp=ln;It.prototype.shallow_cmp=ln;Pt.prototype.shallow_cmp=ln;Bt.prototype.shallow_cmp=cn({value:"eq"});Vt.prototype.shallow_cmp=cn({value:"eq"});Ut.prototype.shallow_cmp=cn({value:"eq"});zt.prototype.shallow_cmp=function(e){return this.value.flags===e.value.flags&&this.value.source===e.value.source};Kt.prototype.shallow_cmp=ln;const fn=1<<0;const pn=1<<1;let _n=null;let hn=null;class SymbolDef{constructor(e,t,n){this.name=t.name;this.orig=[t];this.init=n;this.eliminated=0;this.assignments=0;this.scope=e;this.replaced=0;this.global=false;this.export=0;this.mangled_name=null;this.undeclared=false;this.id=SymbolDef.next_id++;this.chained=false;this.direct_access=false;this.escaped=0;this.recursive_refs=0;this.references=[];this.should_replace=undefined;this.single_use=false;this.fixed=false;Object.seal(this)}fixed_value(){if(!this.fixed||this.fixed instanceof U)return this.fixed;return this.fixed()}unmangleable(e){if(!e)e={};if(_n&&_n.has(this.id)&&keep_name(e.keep_fnames,this.orig[0].name))return true;return this.global&&!e.toplevel||this.export&fn||this.undeclared||!e.eval&&this.scope.pinned()||(this.orig[0]instanceof St||this.orig[0]instanceof bt)&&keep_name(e.keep_fnames,this.orig[0].name)||this.orig[0]instanceof yt||(this.orig[0]instanceof At||this.orig[0]instanceof Tt)&&keep_name(e.keep_classnames,this.orig[0].name)}mangle(e){const t=e.cache&&e.cache.props;if(this.global&&t&&t.has(this.name)){this.mangled_name=t.get(this.name)}else if(!this.mangled_name&&!this.unmangleable(e)){var n=this.scope;var i=this.orig[0];if(e.ie8&&i instanceof St)n=n.parent_scope;const r=redefined_catch_def(this);this.mangled_name=r?r.mangled_name||r.name:n.next_mangled(e,this);if(this.global&&t){t.set(this.name,this.mangled_name)}}}}SymbolDef.next_id=1;function redefined_catch_def(e){if(e.orig[0]instanceof Ct&&e.scope.is_block_scope()){return e.scope.get_defun_scope().variables.get(e.name)}}re.DEFMETHOD("figure_out_scope",function(e,{parent_scope:t=null,toplevel:n=this}={}){e=defaults(e,{cache:null,ie8:false,safari10:false});if(!(n instanceof ae)){throw new Error("Invalid toplevel scope")}var i=this.parent_scope=t;var r=new Map;var a=null;var o=null;var s=[];var u=new TreeWalker((t,n)=>{if(t.is_block_scope()){const r=i;t.block_scope=i=new re(t);i._block_scope=true;const a=t instanceof Oe?r.parent_scope:r;i.init_scope_vars(a);i.uses_with=r.uses_with;i.uses_eval=r.uses_eval;if(e.safari10){if(t instanceof ee||t instanceof te){s.push(i)}}if(t instanceof Ae){const e=i;i=r;t.expression.walk(u);i=e;for(let e=0;e{if(e===t)return true;if(t instanceof Et){return e instanceof St}return!(e instanceof vt||e instanceof gt)})){js_error(`"${t.name}" is redeclared`,t.start.file,t.start.line,t.start.col,t.start.pos)}if(!(t instanceof Dt))mark_export(h,2);if(a!==i){t.mark_enclosed();var h=i.find_variable(t);if(t.thedef!==h){t.thedef=h;t.reference()}}}else if(t instanceof Nt){var d=r.get(t.name);if(!d)throw new Error(string_template("Undefined label {name} [{line},{col}]",{name:t.name,line:t.start.line,col:t.start.col}));t.thedef=d}if(!(i instanceof ae)&&(t instanceof ze||t instanceof Ve)){js_error(`"${t.TYPE}" statement may only appear at the top level`,t.start.file,t.start.line,t.start.col,t.start.pos)}});this.walk(u);function mark_export(e,t){if(o){var n=0;do{t++}while(u.parent(n++)!==o)}var i=u.parent(t);if(e.export=i instanceof ze?fn:0){var r=i.exported_definition;if((r instanceof fe||r instanceof ft)&&i.is_default){e.export=pn}}}const c=this instanceof ae;if(c){this.globals=new Map}var u=new TreeWalker(e=>{if(e instanceof De&&e.label){e.label.thedef.references.push(e);return true}if(e instanceof Ot){var t=e.name;if(t=="eval"&&u.parent()instanceof Ke){for(var i=e.scope;i&&!i.uses_eval;i=i.parent_scope){i.uses_eval=true}}var r;if(u.parent()instanceof Be&&u.parent(1).module_name||!(r=e.scope.find_variable(t))){r=n.def_global(e);if(e instanceof wt)r.export=fn}else if(r.scope instanceof se&&t=="arguments"){r.scope.uses_arguments=true}e.thedef=r;e.reference();if(e.scope.is_block_scope()&&!(r.orig[0]instanceof Et)){e.scope=e.scope.get_defun_scope()}return true}var a;if(e instanceof Ct&&(a=redefined_catch_def(e.definition()))){var i=e.scope;while(i){push_uniq(i.enclosed,a);if(i===a.scope)break;i=i.parent_scope}}});this.walk(u);if(e.ie8||e.safari10){walk(this,e=>{if(e instanceof Ct){var t=e.name;var i=e.thedef.references;var r=e.scope.get_defun_scope();var a=r.find_variable(t)||n.globals.get(t)||r.def_variable(e);i.forEach(function(e){e.thedef=a;e.reference()});e.thedef=a;e.reference();return true}})}if(e.safari10){for(const e of s){e.parent_scope.variables.forEach(function(t){push_uniq(e.enclosed,t)})}}});ae.DEFMETHOD("def_global",function(e){var t=this.globals,n=e.name;if(t.has(n)){return t.get(n)}else{var i=new SymbolDef(this,e);i.undeclared=true;i.global=true;t.set(n,i);return i}});re.DEFMETHOD("init_scope_vars",function(e){this.variables=new Map;this.functions=new Map;this.uses_with=false;this.uses_eval=false;this.parent_scope=e;this.enclosed=[];this.cname=-1});re.DEFMETHOD("conflicting_def",function(e){return this.enclosed.find(t=>t.name===e)||this.variables.has(e)||this.parent_scope&&this.parent_scope.conflicting_def(e)});re.DEFMETHOD("conflicting_def_shallow",function(e){return this.enclosed.find(t=>t.name===e)||this.variables.has(e)});re.DEFMETHOD("add_child_scope",function(e){if(e.parent_scope===this)return;e.parent_scope=this;const t=(()=>{const e=[];let t=this;do{e.push(t)}while(t=t.parent_scope);e.reverse();return e})();const n=new Set(e.enclosed);const i=[];for(const e of t){i.forEach(t=>push_uniq(e.enclosed,t));for(const t of e.variables.values()){if(n.has(t)){push_uniq(i,t);push_uniq(e.enclosed,t)}}}});function find_scopes_visible_from(e){const t=new Set;for(const n of new Set(e)){(function bubble_up(e){if(e==null||t.has(e))return;t.add(e);bubble_up(e.parent_scope)})(n)}return[...t]}re.DEFMETHOD("create_symbol",function(e,{source:t,tentative_name:n,scope:i,conflict_scopes:r=[i],init:a=null}={}){let o;r=find_scopes_visible_from(r);if(n){n=o=n.replace(/(?:^[^a-z_$]|[^a-z0-9_$])/gi,"_");let e=0;while(r.find(e=>e.conflicting_def_shallow(o))){o=n+"$"+e++}}if(!o){throw new Error("No symbol name could be generated in create_symbol()")}const s=make_node(e,t,{name:o,scope:i});this.def_variable(s,a||null);s.mark_enclosed();return s});U.DEFMETHOD("is_block_scope",return_false);ct.DEFMETHOD("is_block_scope",return_false);se.DEFMETHOD("is_block_scope",return_false);ae.DEFMETHOD("is_block_scope",return_false);Ce.DEFMETHOD("is_block_scope",return_false);H.DEFMETHOD("is_block_scope",return_true);re.DEFMETHOD("is_block_scope",function(){return this._block_scope||false});$.DEFMETHOD("is_block_scope",return_true);se.DEFMETHOD("init_scope_vars",function(){re.prototype.init_scope_vars.apply(this,arguments);this.uses_arguments=false;this.def_variable(new Dt({name:"arguments",start:this.start,end:this.end}))});le.DEFMETHOD("init_scope_vars",function(){re.prototype.init_scope_vars.apply(this,arguments);this.uses_arguments=false});_t.DEFMETHOD("mark_enclosed",function(){var e=this.definition();var t=this.scope;while(t){push_uniq(t.enclosed,e);if(t===e.scope)break;t=t.parent_scope}});_t.DEFMETHOD("reference",function(){this.definition().references.push(this);this.mark_enclosed()});re.DEFMETHOD("find_variable",function(e){if(e instanceof _t)e=e.name;return this.variables.get(e)||this.parent_scope&&this.parent_scope.find_variable(e)});re.DEFMETHOD("def_function",function(e,t){var n=this.def_variable(e,t);if(!n.init||n.init instanceof fe)n.init=t;this.functions.set(e.name,n);return n});re.DEFMETHOD("def_variable",function(e,t){var n=this.variables.get(e.name);if(n){n.orig.push(e);if(n.init&&(n.scope!==e.scope||n.init instanceof ce)){n.init=t}}else{n=new SymbolDef(this,e,t);this.variables.set(e.name,n);n.global=!this.parent_scope}return e.thedef=n});function next_mangled(e,t){var n=e.enclosed;e:while(true){var i=dn(++e.cname);if(l.has(i))continue;if(t.reserved.has(i))continue;if(hn&&hn.has(i))continue e;for(let e=n.length;--e>=0;){const r=n[e];const a=r.mangled_name||r.unmangleable(t)&&r.name;if(i==a)continue e}return i}}re.DEFMETHOD("next_mangled",function(e){return next_mangled(this,e)});ae.DEFMETHOD("next_mangled",function(e){let t;const n=this.mangled_names;do{t=next_mangled(this,e)}while(n.has(t));return t});ce.DEFMETHOD("next_mangled",function(e,t){var n=t.orig[0]instanceof Dt&&this.name&&this.name.definition();var i=n?n.mangled_name||n.name:null;while(true){var r=next_mangled(this,e);if(!i||i!=r)return r}});_t.DEFMETHOD("unmangleable",function(e){var t=this.definition();return!t||t.unmangleable(e)});Ft.DEFMETHOD("unmangleable",return_false);_t.DEFMETHOD("unreferenced",function(){return!this.definition().references.length&&!this.scope.pinned()});_t.DEFMETHOD("definition",function(){return this.thedef});_t.DEFMETHOD("global",function(){return this.thedef.global});ae.DEFMETHOD("_default_mangler_options",function(e){e=defaults(e,{eval:false,ie8:false,keep_classnames:false,keep_fnames:false,module:false,reserved:[],toplevel:false});if(e.module)e.toplevel=true;if(!Array.isArray(e.reserved)&&!(e.reserved instanceof Set)){e.reserved=[]}e.reserved=new Set(e.reserved);e.reserved.add("arguments");return e});ae.DEFMETHOD("mangle_names",function(e){e=this._default_mangler_options(e);var t=-1;var n=[];if(e.keep_fnames){_n=new Set}const i=this.mangled_names=new Set;if(e.cache){this.globals.forEach(collect);if(e.cache.props){e.cache.props.forEach(function(e){i.add(e)})}}var r=new TreeWalker(function(i,r){if(i instanceof j){var a=t;r();t=a;return true}if(i instanceof re){i.variables.forEach(collect);return}if(i.is_block_scope()){i.block_scope.variables.forEach(collect);return}if(_n&&i instanceof Le&&i.value instanceof se&&!i.value.name&&keep_name(e.keep_fnames,i.name.name)){_n.add(i.name.definition().id);return}if(i instanceof Ft){let e;do{e=dn(++t)}while(l.has(e));i.mangled_name=e;return true}if(!(e.ie8||e.safari10)&&i instanceof Ct){n.push(i.definition());return}});this.walk(r);if(e.keep_fnames||e.keep_classnames){hn=new Set;n.forEach(t=>{if(t.name.length<6&&t.unmangleable(e)){hn.add(t.name)}})}n.forEach(t=>{t.mangle(e)});_n=null;hn=null;function collect(t){const i=!e.reserved.has(t.name)&&!(t.export&fn);if(i){n.push(t)}}});ae.DEFMETHOD("find_colliding_names",function(e){const t=e.cache&&e.cache.props;const n=new Set;e.reserved.forEach(to_avoid);this.globals.forEach(add_def);this.walk(new TreeWalker(function(e){if(e instanceof re)e.variables.forEach(add_def);if(e instanceof Ct)add_def(e.definition())}));return n;function to_avoid(e){n.add(e)}function add_def(n){var i=n.name;if(n.global&&t&&t.has(i))i=t.get(i);else if(!n.unmangleable(e))return;to_avoid(i)}});ae.DEFMETHOD("expand_names",function(e){dn.reset();dn.sort();e=this._default_mangler_options(e);var t=this.find_colliding_names(e);var n=0;this.globals.forEach(rename);this.walk(new TreeWalker(function(e){if(e instanceof re)e.variables.forEach(rename);if(e instanceof Ct)rename(e.definition())}));function next_name(){var e;do{e=dn(n++)}while(t.has(e)||l.has(e));return e}function rename(t){if(t.global&&e.cache)return;if(t.unmangleable(e))return;if(e.reserved.has(t.name))return;const n=redefined_catch_def(t);const i=t.name=n?n.name:next_name();t.orig.forEach(function(e){e.name=i});t.references.forEach(function(e){e.name=i})}});U.DEFMETHOD("tail_node",return_this);Xe.DEFMETHOD("tail_node",function(){return this.expressions[this.expressions.length-1]});ae.DEFMETHOD("compute_char_frequency",function(e){e=this._default_mangler_options(e);try{U.prototype.print=function(t,n){this._print(t,n);if(this instanceof _t&&!this.unmangleable(e)){dn.consider(this.name,-1)}else if(e.properties){if(this instanceof We){dn.consider(this.property,-1)}else if(this instanceof qe){skip_string(this.property)}}};dn.consider(this.print_to_string(),1)}finally{U.prototype.print=U.prototype._print}dn.sort();function skip_string(e){if(e instanceof Bt){dn.consider(e.value,-1)}else if(e instanceof Je){skip_string(e.consequent);skip_string(e.alternative)}else if(e instanceof Xe){skip_string(e.tail_node())}}});const dn=(()=>{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_".split("");const t="0123456789".split("");let n;let i;function reset(){i=new Map;e.forEach(function(e){i.set(e,0)});t.forEach(function(e){i.set(e,0)})}base54.consider=function(e,t){for(var n=e.length;--n>=0;){i.set(e[n],i.get(e[n])+t)}};function compare(e,t){return i.get(t)-i.get(e)}base54.sort=function(){n=mergeSort(e,compare).concat(mergeSort(t,compare))};base54.reset=reset;reset();function base54(e){var t="",i=54;e++;do{e--;t+=n[e%i];e=Math.floor(e/i);i=64}while(e>0);return t}return base54})();let mn=undefined;U.prototype.size=function(e,t){mn=e&&e.mangle_options;let n=0;walk_parent(this,(e,t)=>{n+=e._size(t)},t||e&&e.stack);mn=undefined;return n};U.prototype._size=(()=>0);K.prototype._size=(()=>8);G.prototype._size=function(){return 2+this.value.length};const En=e=>e.length&&e.length-1;H.prototype._size=function(){return 2+En(this.body)};ae.prototype._size=function(){return En(this.body)};q.prototype._size=(()=>1);j.prototype._size=(()=>2);Q.prototype._size=(()=>9);J.prototype._size=(()=>7);ee.prototype._size=(()=>8);te.prototype._size=(()=>8);ie.prototype._size=(()=>6);oe.prototype._size=(()=>3);const gn=e=>(e.is_generator?1:0)+(e.async?6:0);ue.prototype._size=function(){return gn(this)+4+En(this.argnames)+En(this.body)};ce.prototype._size=function(e){const t=!!first_in_statement(e);return t*2+gn(this)+12+En(this.argnames)+En(this.body)};fe.prototype._size=function(){return gn(this)+13+En(this.argnames)+En(this.body)};le.prototype._size=function(){let e=2+En(this.argnames);if(!(this.argnames.length===1&&this.argnames[0]instanceof _t)){e+=2}return gn(this)+e+(Array.isArray(this.body)?En(this.body):this.body._size())};pe.prototype._size=(()=>2);he.prototype._size=function(){return 2+Math.floor(this.segments.length/2)*3};de.prototype._size=function(){return this.value.length};ge.prototype._size=function(){return this.value?7:6};ve.prototype._size=(()=>6);be.prototype._size=function(){return this.label?6:5};ye.prototype._size=function(){return this.label?9:8};Te.prototype._size=(()=>4);Ae.prototype._size=function(){return 8+En(this.body)};xe.prototype._size=function(){return 5+En(this.body)};Re.prototype._size=function(){return 8+En(this.body)};Fe.prototype._size=function(){return 3+En(this.body)};Oe.prototype._size=function(){let e=7+En(this.body);if(this.argname){e+=2}return e};we.prototype._size=function(){return 7+En(this.body)};const vn=(e,t)=>e+En(t.definitions);Ne.prototype._size=function(){return vn(4,this)};Ie.prototype._size=function(){return vn(4,this)};Pe.prototype._size=function(){return vn(6,this)};Le.prototype._size=function(){return this.value?1:0};Be.prototype._size=function(){return this.name?4:0};Ve.prototype._size=function(){let e=6;if(this.imported_name)e+=1;if(this.imported_name||this.imported_names)e+=5;if(this.imported_names){e+=2+En(this.imported_names)}return e};Ue.prototype._size=(()=>11);ze.prototype._size=function(){let e=7+(this.is_default?8:0);if(this.exported_value){e+=this.exported_value._size()}if(this.exported_names){e+=2+En(this.exported_names)}if(this.module_name){e+=5}return e};Ke.prototype._size=function(){if(this.optional){return 4+En(this.args)}return 2+En(this.args)};Ge.prototype._size=function(){return 6+En(this.args)};Xe.prototype._size=function(){return En(this.expressions)};We.prototype._size=function(){if(this.optional){return this.property.length+2}return this.property.length+1};qe.prototype._size=function(){return this.optional?4:2};je.prototype._size=function(){if(this.operator==="typeof")return 7;if(this.operator==="void")return 5;return this.operator.length};Qe.prototype._size=function(e){if(this.operator==="in")return 4;let t=this.operator.length;if((this.operator==="+"||this.operator==="-")&&this.right instanceof je&&this.right.operator===this.operator){t+=1}if(this.needs_parens(e)){t+=2}return t};Je.prototype._size=(()=>3);nt.prototype._size=function(){return 2+En(this.elements)};it.prototype._size=function(e){let t=2;if(first_in_statement(e)){t+=2}return t+En(this.properties)};const Dn=e=>typeof e==="string"?e.length:0;at.prototype._size=function(){return Dn(this.key)+1};const bn=e=>e?7:0;st.prototype._size=function(){return 5+bn(this.static)+Dn(this.key)};ot.prototype._size=function(){return 5+bn(this.static)+Dn(this.key)};ut.prototype._size=function(){return bn(this.static)+Dn(this.key)+gn(this)};ct.prototype._size=function(){return(this.name?8:7)+(this.extends?8:0)};lt.prototype._size=function(){return bn(this.static)+(typeof this.key==="string"?this.key.length+2:0)+(this.value?1:0)};_t.prototype._size=function(){return!mn||this.definition().unmangleable(mn)?this.name.length:1};kt.prototype._size=function(){return this.name.length};Ot.prototype._size=dt.prototype._size=function(){const{name:e,thedef:t}=this;if(t&&t.global)return e.length;if(e==="arguments")return 9;return _t.prototype._size.call(this)};ht.prototype._size=(()=>10);xt.prototype._size=function(){return this.name.length};Mt.prototype._size=function(){return this.name.length};It.prototype._size=(()=>4);Pt.prototype._size=(()=>5);Bt.prototype._size=function(){return this.value.length+2};Vt.prototype._size=function(){const{value:e}=this;if(e===0)return 1;if(e>0&&Math.floor(e)===e){return Math.floor(Math.log10(e)+1)}return e.toString().length};Ut.prototype._size=function(){return this.value.length};zt.prototype._size=function(){return this.value.toString().length};Gt.prototype._size=(()=>4);Xt.prototype._size=(()=>3);Ht.prototype._size=(()=>6);Wt.prototype._size=(()=>0);qt.prototype._size=(()=>8);$t.prototype._size=(()=>4);jt.prototype._size=(()=>5);ke.prototype._size=(()=>6);Se.prototype._size=(()=>6);const yn=1;const kn=2;const Sn=4;const Tn=8;const An=16;const Cn=32;const Rn=256;const xn=512;const Fn=1024;const On=Rn|xn|Fn;const wn=(e,t)=>e.flags&t;const Mn=(e,t)=>{e.flags|=t};const Nn=(e,t)=>{e.flags&=~t};class Compressor extends TreeWalker{constructor(e,{false_by_default:t=false,mangle_options:n=false}){super();if(e.defaults!==undefined&&!e.defaults)t=true;this.options=defaults(e,{arguments:false,arrows:!t,booleans:!t,booleans_as_integers:false,collapse_vars:!t,comparisons:!t,computed_props:!t,conditionals:!t,dead_code:!t,defaults:true,directives:!t,drop_console:false,drop_debugger:!t,ecma:5,evaluate:!t,expression:false,global_defs:false,hoist_funs:false,hoist_props:!t,hoist_vars:false,ie8:false,if_return:!t,inline:!t,join_vars:!t,keep_classnames:false,keep_fargs:true,keep_fnames:false,keep_infinity:false,loops:!t,module:false,negate_iife:!t,passes:1,properties:!t,pure_getters:!t&&"strict",pure_funcs:null,reduce_funcs:null,reduce_vars:!t,sequences:!t,side_effects:!t,switches:!t,top_retain:null,toplevel:!!(e&&e["top_retain"]),typeofs:!t,unsafe:false,unsafe_arrows:false,unsafe_comps:false,unsafe_Function:false,unsafe_math:false,unsafe_symbols:false,unsafe_methods:false,unsafe_proto:false,unsafe_regexp:false,unsafe_undefined:false,unused:!t,warnings:false},true);var i=this.options["global_defs"];if(typeof i=="object")for(var r in i){if(r[0]==="@"&&HOP(i,r)){i[r.slice(1)]=parse(i[r],{expression:true})}}if(this.options["inline"]===true)this.options["inline"]=3;var a=this.options["pure_funcs"];if(typeof a=="function"){this.pure_funcs=a}else{this.pure_funcs=a?function(e){return!a.includes(e.expression.print_to_string())}:return_true}var o=this.options["top_retain"];if(o instanceof RegExp){this.top_retain=function(e){return o.test(e.name)}}else if(typeof o=="function"){this.top_retain=o}else if(o){if(typeof o=="string"){o=o.split(/,/)}this.top_retain=function(e){return o.includes(e.name)}}if(this.options["module"]){this.directives["use strict"]=true;this.options["toplevel"]=true}var s=this.options["toplevel"];this.toplevel=typeof s=="string"?{funcs:/funcs/.test(s),vars:/vars/.test(s)}:{funcs:s,vars:s};var u=this.options["sequences"];this.sequences_limit=u==1?800:u|0;this.evaluated_regexps=new Map;this._toplevel=undefined;this.mangle_options=n}option(e){return this.options[e]}exposed(e){if(e.export)return true;if(e.global)for(var t=0,n=e.orig.length;t0||this.option("reduce_vars")){this._toplevel.reset_opt_flags(this)}this._toplevel=this._toplevel.transform(this);if(t>1){let e=0;walk(this._toplevel,()=>{e++});if(e=0){r.body[o]=r.body[o].transform(i)}}else if(r instanceof Te){r.body=r.body.transform(i);if(r.alternative){r.alternative=r.alternative.transform(i)}}else if(r instanceof ie){r.body=r.body.transform(i)}return r});n.transform(i)});function read_property(e,t){t=get_value(t);if(t instanceof U)return;var n;if(e instanceof nt){var i=e.elements;if(t=="length")return make_node_from_constant(i.length,e);if(typeof t=="number"&&t in i)n=i[t]}else if(e instanceof it){t=""+t;var r=e.properties;for(var a=r.length;--a>=0;){var o=r[a];if(!(o instanceof at))return;if(!n&&r[a].key===t)n=r[a].value}}return n instanceof Ot&&n.fixed_value()||n}function is_modified(e,t,n,i,r,a){var o=t.parent(r);var s=is_lhs(n,o);if(s)return s;if(!a&&o instanceof Ke&&o.expression===n&&!(i instanceof le)&&!(i instanceof ct)&&!o.is_expr_pure(e)&&(!(i instanceof ce)||!(o instanceof Ge)&&i.contains_this())){return true}if(o instanceof nt){return is_modified(e,t,o,o,r+1)}if(o instanceof at&&n===o.value){var u=t.parent(r+1);return is_modified(e,t,u,u,r+2)}if(o instanceof He&&o.expression===n){var c=read_property(i,o.property);return!a&&is_modified(e,t,o,c,r+1)}}(function(e){e(U,noop);function reset_def(e,t){t.assignments=0;t.chained=false;t.direct_access=false;t.escaped=0;t.recursive_refs=0;t.references=[];t.single_use=undefined;if(t.scope.pinned()){t.fixed=false}else if(t.orig[0]instanceof gt||!e.exposed(t)){t.fixed=t.init}else{t.fixed=false}}function reset_variables(e,t,n){n.variables.forEach(function(n){reset_def(t,n);if(n.fixed===null){e.defs_to_safe_ids.set(n.id,e.safe_ids);mark(e,n,true)}else if(n.fixed){e.loop_ids.set(n.id,e.in_loop);mark(e,n,true)}})}function reset_block_variables(e,t){if(t.block_scope)t.block_scope.variables.forEach(t=>{reset_def(e,t)})}function push(e){e.safe_ids=Object.create(e.safe_ids)}function pop(e){e.safe_ids=Object.getPrototypeOf(e.safe_ids)}function mark(e,t,n){e.safe_ids[t.id]=n}function safe_to_read(e,t){if(t.single_use=="m")return false;if(e.safe_ids[t.id]){if(t.fixed==null){var n=t.orig[0];if(n instanceof Dt||n.name=="arguments")return false;t.fixed=make_node(Ht,n)}return true}return t.fixed instanceof fe}function safe_to_assign(e,t,n,i){if(t.fixed===undefined)return true;let r;if(t.fixed===null&&(r=e.defs_to_safe_ids.get(t.id))){r[t.id]=false;e.defs_to_safe_ids.delete(t.id);return true}if(!HOP(e.safe_ids,t.id))return false;if(!safe_to_read(e,t))return false;if(t.fixed===false)return false;if(t.fixed!=null&&(!i||t.references.length>t.assignments))return false;if(t.fixed instanceof fe){return i instanceof U&&t.fixed.parent_scope===n}return t.orig.every(e=>{return!(e instanceof gt||e instanceof bt||e instanceof St)})}function ref_once(e,t,n){return t.option("unused")&&!n.scope.pinned()&&n.references.length-n.recursive_refs==1&&e.loop_ids.get(n.id)===e.in_loop}function is_immutable(e){if(!e)return false;return e.is_constant()||e instanceof se||e instanceof It}function mark_escaped(e,t,n,i,r,a=0,o=1){var s=e.parent(a);if(r){if(r.is_constant())return;if(r instanceof pt)return}if(s instanceof et&&(s.operator==="="||s.logical)&&i===s.right||s instanceof Ke&&(i!==s.expression||s instanceof Ge)||s instanceof Ee&&i===s.value&&i.scope!==t.scope||s instanceof Le&&i===s.value||s instanceof Se&&i===s.value&&i.scope!==t.scope){if(o>1&&!(r&&r.is_constant_expression(n)))o=1;if(!t.escaped||t.escaped>o)t.escaped=o;return}else if(s instanceof nt||s instanceof ke||s instanceof Qe&&Ln.has(s.operator)||s instanceof Je&&i!==s.condition||s instanceof oe||s instanceof Xe&&i===s.tail_node()){mark_escaped(e,t,n,s,s,a+1,o)}else if(s instanceof at&&i===s.value){var u=e.parent(a+1);mark_escaped(e,t,n,u,u,a+2,o)}else if(s instanceof He&&i===s.expression){r=read_property(r,s.property);mark_escaped(e,t,n,s,r,a+1,o+1);if(r)return}if(a>0)return;if(s instanceof Xe&&i!==s.tail_node())return;if(s instanceof X)return;t.direct_access=true}const t=e=>walk(e,e=>{if(!(e instanceof _t))return;var t=e.definition();if(!t)return;if(e instanceof Ot)t.references.push(e);t.fixed=false});e(ue,function(e,t,n){push(e);reset_variables(e,n,this);t();pop(e);return true});e(et,function(e,n,i){var r=this;if(r.left instanceof pe){t(r.left);return}const a=()=>{if(r.logical){r.left.walk(e);push(e);r.right.walk(e);pop(e);return true}};var o=r.left;if(!(o instanceof Ot))return a();var s=o.definition();var u=safe_to_assign(e,s,o.scope,r.right);s.assignments++;if(!u)return a();var c=s.fixed;if(!c&&r.operator!="="&&!r.logical)return a();var l=r.operator=="=";var f=l?r.right:r;if(is_modified(i,e,r,f,0))return a();s.references.push(o);if(!r.logical){if(!l)s.chained=true;s.fixed=l?function(){return r.right}:function(){return make_node(Qe,r,{operator:r.operator.slice(0,-1),left:c instanceof U?c:c(),right:r.right})}}if(r.logical){mark(e,s,false);push(e);r.right.walk(e);pop(e);return true}mark(e,s,false);r.right.walk(e);mark(e,s,true);mark_escaped(e,s,o.scope,r,f,0,1);return true});e(Qe,function(e){if(!Ln.has(this.operator))return;this.left.walk(e);push(e);this.right.walk(e);pop(e);return true});e(H,function(e,t,n){reset_block_variables(n,this)});e(xe,function(e){push(e);this.expression.walk(e);pop(e);push(e);walk_body(this,e);pop(e);return true});e(ct,function(e,t){Nn(this,An);push(e);t();pop(e);return true});e(Je,function(e){this.condition.walk(e);push(e);this.consequent.walk(e);pop(e);push(e);this.alternative.walk(e);pop(e);return true});e(Ye,function(e,t){const n=e.safe_ids;t();e.safe_ids=n;return true});e(Ke,function(e){this.expression.walk(e);if(this.optional){push(e)}for(const t of this.args)t.walk(e);return true});e(He,function(e){if(!this.optional)return;this.expression.walk(e);push(e);if(this.property instanceof U)this.property.walk(e);return true});e(Re,function(e,t){push(e);t();pop(e);return true});function mark_lambda(e,t,n){Nn(this,An);push(e);reset_variables(e,n,this);if(this.uses_arguments){t();pop(e);return}var i;if(!this.name&&(i=e.parent())instanceof Ke&&i.expression===this&&!i.args.some(e=>e instanceof oe)&&this.argnames.every(e=>e instanceof _t)){this.argnames.forEach((t,n)=>{if(!t.definition)return;var r=t.definition();if(r.orig.length>1)return;if(r.fixed===undefined&&(!this.uses_arguments||e.has_directive("use strict"))){r.fixed=function(){return i.args[n]||make_node(Ht,i)};e.loop_ids.set(r.id,e.in_loop);mark(e,r,true)}else{r.fixed=false}})}t();pop(e);return true}e(se,mark_lambda);e(Q,function(e,t,n){reset_block_variables(n,this);const i=e.in_loop;e.in_loop=this;push(e);this.body.walk(e);if(has_break_or_continue(this)){pop(e);push(e)}this.condition.walk(e);pop(e);e.in_loop=i;return true});e(ee,function(e,t,n){reset_block_variables(n,this);if(this.init)this.init.walk(e);const i=e.in_loop;e.in_loop=this;push(e);if(this.condition)this.condition.walk(e);this.body.walk(e);if(this.step){if(has_break_or_continue(this)){pop(e);push(e)}this.step.walk(e)}pop(e);e.in_loop=i;return true});e(te,function(e,n,i){reset_block_variables(i,this);t(this.init);this.object.walk(e);const r=e.in_loop;e.in_loop=this;push(e);this.body.walk(e);pop(e);e.in_loop=r;return true});e(Te,function(e){this.condition.walk(e);push(e);this.body.walk(e);pop(e);if(this.alternative){push(e);this.alternative.walk(e);pop(e)}return true});e(j,function(e){push(e);this.body.walk(e);pop(e);return true});e(Ct,function(){this.definition().fixed=false});e(Ot,function(e,t,n){var i=this.definition();i.references.push(this);if(i.references.length==1&&!i.fixed&&i.orig[0]instanceof bt){e.loop_ids.set(i.id,e.in_loop)}var r;if(i.fixed===undefined||!safe_to_read(e,i)){i.fixed=false}else if(i.fixed){r=this.fixed_value();if(r instanceof se&&recursive_ref(e,i)){i.recursive_refs++}else if(r&&!n.exposed(i)&&ref_once(e,n,i)){i.single_use=r instanceof se&&!r.pinned()||r instanceof ct||i.scope===this.scope&&r.is_constant_expression()}else{i.single_use=false}if(is_modified(n,e,this,r,0,is_immutable(r))){if(i.single_use){i.single_use="m"}else{i.fixed=false}}}mark_escaped(e,i,this.scope,this,r,0,1)});e(ae,function(e,t,n){this.globals.forEach(function(e){reset_def(n,e)});reset_variables(e,n,this)});e(Fe,function(e,t,n){reset_block_variables(n,this);push(e);walk_body(this,e);pop(e);if(this.bcatch){push(e);this.bcatch.walk(e);pop(e)}if(this.bfinally)this.bfinally.walk(e);return true});e(je,function(e){var t=this;if(t.operator!=="++"&&t.operator!=="--")return;var n=t.expression;if(!(n instanceof Ot))return;var i=n.definition();var r=safe_to_assign(e,i,n.scope,true);i.assignments++;if(!r)return;var a=i.fixed;if(!a)return;i.references.push(n);i.chained=true;i.fixed=function(){return make_node(Qe,t,{operator:t.operator.slice(0,-1),left:make_node($e,t,{operator:"+",expression:a instanceof U?a:a()}),right:make_node(Vt,t,{value:1})})};mark(e,i,true);return true});e(Le,function(e,n){var i=this;if(i.name instanceof pe){t(i.name);return}var r=i.name.definition();if(i.value){if(safe_to_assign(e,r,i.name.scope,i.value)){r.fixed=function(){return i.value};e.loop_ids.set(r.id,e.in_loop);mark(e,r,false);n();mark(e,r,true);return true}else{r.fixed=false}}});e(J,function(e,t,n){reset_block_variables(n,this);const i=e.in_loop;e.in_loop=this;push(e);t();pop(e);e.in_loop=i;return true})})(function(e,t){e.DEFMETHOD("reduce_vars",t)});ae.DEFMETHOD("reset_opt_flags",function(e){const t=this;const n=e.option("reduce_vars");const i=new TreeWalker(function(r,a){Nn(r,On);if(n){if(e.top_retain&&r instanceof fe&&i.parent()===t){Mn(r,Fn)}return r.reduce_vars(i,a,e)}});i.safe_ids=Object.create(null);i.in_loop=null;i.loop_ids=new Map;i.defs_to_safe_ids=new Map;t.walk(i)});_t.DEFMETHOD("fixed_value",function(){var e=this.thedef.fixed;if(!e||e instanceof U)return e;return e()});Ot.DEFMETHOD("is_immutable",function(){var e=this.definition().orig;return e.length==1&&e[0]instanceof St});function is_func_expr(e){return e instanceof le||e instanceof ce}function is_lhs_read_only(e){if(e instanceof It)return true;if(e instanceof Ot)return e.definition().orig[0]instanceof St;if(e instanceof He){e=e.expression;if(e instanceof Ot){if(e.is_immutable())return false;e=e.fixed_value()}if(!e)return true;if(e instanceof zt)return false;if(e instanceof Lt)return true;return is_lhs_read_only(e)}return false}function is_ref_of(e,t){if(!(e instanceof Ot))return false;var n=e.definition().orig;for(var i=n.length;--i>=0;){if(n[i]instanceof t)return true}}function find_scope(e){for(let t=0;;t++){const n=e.parent(t);if(n instanceof ae)return n;if(n instanceof se)return n;if(n.block_scope)return n.block_scope}}function find_variable(e,t){var n,i=0;while(n=e.parent(i++)){if(n instanceof re)break;if(n instanceof Oe&&n.argname){n=n.argname.definition().scope;break}}return n.find_variable(t)}function make_sequence(e,t){if(t.length==1)return t[0];if(t.length==0)throw new Error("trying to create a sequence with length zero!");return make_node(Xe,e,{expressions:t.reduce(merge_sequence,[])})}function make_node_from_constant(e,t){switch(typeof e){case"string":return make_node(Bt,t,{value:e});case"number":if(isNaN(e))return make_node(Xt,t);if(isFinite(e)){return 1/e<0?make_node($e,t,{operator:"-",expression:make_node(Vt,t,{value:-e})}):make_node(Vt,t,{value:e})}return e<0?make_node($e,t,{operator:"-",expression:make_node(qt,t)}):make_node(qt,t);case"boolean":return make_node(e?$t:jt,t);case"undefined":return make_node(Ht,t);default:if(e===null){return make_node(Gt,t,{value:null})}if(e instanceof RegExp){return make_node(zt,t,{value:{source:regexp_source_fix(e.source),flags:e.flags}})}throw new Error(string_template("Can't handle constant of type: {type}",{type:typeof e}))}}function maintain_this_binding(e,t,n){if(e instanceof $e&&e.operator=="delete"||e instanceof Ke&&e.expression===t&&(n instanceof He||n instanceof Ot&&n.name=="eval")){return make_sequence(t,[make_node(Vt,t,{value:0}),n])}return n}function merge_sequence(e,t){if(t instanceof Xe){e.push(...t.expressions)}else{e.push(t)}return e}function as_statement_array(e){if(e===null)return[];if(e instanceof W)return e.body;if(e instanceof q)return[];if(e instanceof z)return[e];throw new Error("Can't convert thing to statement array")}function is_empty(e){if(e===null)return true;if(e instanceof q)return true;if(e instanceof W)return e.body.length==0;return false}function can_be_evicted_from_block(e){return!(e instanceof ft||e instanceof fe||e instanceof Ie||e instanceof Pe||e instanceof ze||e instanceof Ve)}function loop_body(e){if(e instanceof $){return e.body instanceof W?e.body:e}return e}function is_iife_call(e){if(e.TYPE!="Call")return false;return e.expression instanceof ce||is_iife_call(e.expression)}function is_undeclared_ref(e){return e instanceof Ot&&e.definition().undeclared}var In=makePredicate("Array Boolean clearInterval clearTimeout console Date decodeURI decodeURIComponent encodeURI encodeURIComponent Error escape eval EvalError Function isFinite isNaN JSON Math Number parseFloat parseInt RangeError ReferenceError RegExp Object setInterval setTimeout String SyntaxError TypeError unescape URIError");Ot.DEFMETHOD("is_declared",function(e){return!this.definition().undeclared||e.option("unsafe")&&In.has(this.name)});var Pn=makePredicate("Infinity NaN undefined");function is_identifier_atom(e){return e instanceof qt||e instanceof Xt||e instanceof Ht}function tighten_body(e,t){var n,r;var a=t.find_parent(re).get_defun_scope();find_loop_scope_try();var o,s=10;do{o=false;eliminate_spurious_blocks(e);if(t.option("dead_code")){eliminate_dead_code(e,t)}if(t.option("if_return")){handle_if_return(e,t)}if(t.sequences_limit>0){sequencesize(e,t);sequencesize_2(e,t)}if(t.option("join_vars")){join_consecutive_vars(e)}if(t.option("collapse_vars")){collapse(e,t)}}while(o&&s-- >0);function find_loop_scope_try(){var e=t.self(),i=0;do{if(e instanceof Oe||e instanceof we){i++}else if(e instanceof $){n=true}else if(e instanceof re){a=e;break}else if(e instanceof Fe){r=true}}while(e=t.parent(i++))}function collapse(e,t){if(a.pinned())return e;var s;var u=[];var c=e.length;var l=new TreeTransformer(function(e){if(A)return e;if(!T){if(e!==p[_])return e;_++;if(_1||e instanceof $&&!(e instanceof ee)||e instanceof De||e instanceof Fe||e instanceof ie||e instanceof Se||e instanceof ze||e instanceof ct||n instanceof ee&&e!==n.init||!y&&(e instanceof Ot&&!e.is_declared(t)&&!Gn.has(e))||e instanceof Ot&&n instanceof Ke&&has_annotation(n,en)){A=true;return e}if(!E&&(!D||!y)&&(n instanceof Qe&&Ln.has(n.operator)&&n.left!==e||n instanceof Je&&n.condition!==e||n instanceof Te&&n.condition!==e)){E=n}if(R&&!(e instanceof dt)&&g.equivalent_to(e)){if(E){A=true;return e}if(is_lhs(e,n)){if(d)C++;return e}else{C++;if(d&&h instanceof Le)return e}o=A=true;if(h instanceof Ze){return make_node($e,h,h)}if(h instanceof Le){var i=h.name.definition();var a=h.value;if(i.references.length-i.replaced==1&&!t.exposed(i)){i.replaced++;if(S&&is_identifier_atom(a)){return a.transform(t)}else{return maintain_this_binding(n,e,a)}}return make_node(et,h,{operator:"=",logical:false,left:make_node(Ot,h.name,h.name),right:a})}Nn(h,Cn);return h}var s;if(e instanceof Ke||e instanceof Ee&&(b||g instanceof He||may_modify(g))||e instanceof He&&(b||e.expression.may_throw_on_access(t))||e instanceof Ot&&(v.get(e.name)||b&&may_modify(e))||e instanceof Le&&e.value&&(v.has(e.name.name)||b&&may_modify(e.name))||(s=is_lhs(e.left,e))&&(s instanceof He||v.has(s.name))||k&&(r?e.has_side_effects(t):side_effects_external(e))){m=e;if(e instanceof re)A=true}return handle_custom_scan_order(e)},function(e){if(A)return;if(m===e)A=true;if(E===e)E=null});var f=new TreeTransformer(function(e){if(A)return e;if(!T){if(e!==p[_])return e;_++;if(_=0){if(c==0&&t.option("unused"))extract_args();var p=[];extract_candidates(e[c]);while(u.length>0){p=u.pop();var _=0;var h=p[p.length-1];var d=null;var m=null;var E=null;var g=get_lhs(h);if(!g||is_lhs_read_only(g)||g.has_side_effects(t))continue;var v=get_lvalues(h);var D=is_lhs_local(g);if(g instanceof Ot)v.set(g.name,false);var b=value_has_side_effects(h);var y=replace_all_symbols();var k=h.may_throw(t);var S=h.name instanceof Dt;var T=S;var A=false,C=0,R=!s||!T;if(!R){for(var x=t.self().argnames.lastIndexOf(h.name)+1;!A&&xC)C=false;else{A=false;_=0;T=S;for(var F=c;!A&&F!(e instanceof oe))){var i=t.has_directive("use strict");if(i&&!member(i,n.body))i=false;var r=n.argnames.length;s=e.args.slice(r);var a=new Set;for(var o=r;--o>=0;){var c=n.argnames[o];var l=e.args[o];const r=c.definition&&c.definition();const p=r&&r.orig.length>1;if(p)continue;s.unshift(make_node(Le,c,{name:c,value:l}));if(a.has(c.name))continue;a.add(c.name);if(c instanceof oe){var f=e.args.slice(o);if(f.every(e=>!has_overlapping_symbol(n,e,i))){u.unshift([make_node(Le,c,{name:c.expression,value:make_node(nt,e,{elements:f})})])}}else{if(!l){l=make_node(Ht,c).transform(t)}else if(l instanceof se&&l.pinned()||has_overlapping_symbol(n,l,i)){l=null}if(l)u.unshift([make_node(Le,c,{name:c,value:l})])}}}}function extract_candidates(e){p.push(e);if(e instanceof et){if(!e.left.has_side_effects(t)){u.push(p.slice())}extract_candidates(e.right)}else if(e instanceof Qe){extract_candidates(e.left);extract_candidates(e.right)}else if(e instanceof Ke&&!has_annotation(e,en)){extract_candidates(e.expression);e.args.forEach(extract_candidates)}else if(e instanceof xe){extract_candidates(e.expression)}else if(e instanceof Je){extract_candidates(e.condition);extract_candidates(e.consequent);extract_candidates(e.alternative)}else if(e instanceof Me){var n=e.definitions.length;var i=n-200;if(i<0)i=0;for(;i1&&!(e.name instanceof Dt)||(i>1?mangleable_var(e):!t.exposed(n))){return make_node(Ot,e.name,e.name)}}else{const t=e instanceof et?e.left:e.expression;return!is_ref_of(t,gt)&&!is_ref_of(t,vt)&&t}}function get_rvalue(e){if(e instanceof et){return e.right}else{return e.value}}function get_lvalues(e){var n=new Map;if(e instanceof je)return n;var i=new TreeWalker(function(e){var r=e;while(r instanceof He)r=r.expression;if(r instanceof Ot||r instanceof It){n.set(r.name,n.get(r.name)||is_modified(t,i,e,e,0))}});get_rvalue(e).walk(i);return n}function remove_candidate(n){if(n.name instanceof Dt){var r=t.parent(),a=t.self().argnames;var o=a.indexOf(n.name);if(o<0){r.args.length=Math.min(r.args.length,a.length-1)}else{var s=r.args;if(s[o])s[o]=make_node(Vt,s[o],{value:0})}return true}var u=false;return e[c].transform(new TreeTransformer(function(e,t,r){if(u)return e;if(e===n||e.body===n){u=true;if(e instanceof Le){e.value=e.name instanceof gt?make_node(Ht,e.value):null;return e}return r?i.skip:null}},function(e){if(e instanceof Xe)switch(e.expressions.length){case 0:return null;case 1:return e.expressions[0]}}))}function is_lhs_local(e){while(e instanceof He)e=e.expression;return e instanceof Ot&&e.definition().scope===a&&!(n&&(v.has(e.name)||h instanceof je||h instanceof et&&!h.logical&&h.operator!="="))}function value_has_side_effects(e){if(e instanceof je)return Bn.has(e.operator);return get_rvalue(e).has_side_effects(t)}function replace_all_symbols(){if(b)return false;if(d)return true;if(g instanceof Ot){var e=g.definition();if(e.references.length-e.replaced==(h instanceof Le?1:2)){return true}}return false}function may_modify(e){if(!e.definition)return true;var t=e.definition();if(t.orig.length==1&&t.orig[0]instanceof bt)return false;if(t.scope.get_defun_scope()!==a)return true;return!t.references.every(e=>{var t=e.scope.get_defun_scope();if(t.TYPE=="Scope")t=t.parent_scope;return t===a})}function side_effects_external(e,t){if(e instanceof et)return side_effects_external(e.left,true);if(e instanceof je)return side_effects_external(e.expression,true);if(e instanceof Le)return e.value&&side_effects_external(e.value);if(t){if(e instanceof We)return side_effects_external(e.expression,true);if(e instanceof qe)return side_effects_external(e.expression,true);if(e instanceof Ot)return e.definition().scope!==a}return false}}function eliminate_spurious_blocks(e){var t=[];for(var n=0;n=0;){var s=e[a];var u=next_index(a);var c=e[u];if(r&&!c&&s instanceof ge){if(!s.value){o=true;e.splice(a,1);continue}if(s.value instanceof $e&&s.value.operator=="void"){o=true;e[a]=make_node(X,s,{body:s.value.expression});continue}}if(s instanceof Te){var l=aborts(s.body);if(can_merge_flow(l)){if(l.label){remove(l.label.thedef.references,l)}o=true;s=s.clone();s.condition=s.condition.negate(t);var f=as_statement_array_with_return(s.body,l);s.body=make_node(W,s,{body:as_statement_array(s.alternative).concat(extract_functions())});s.alternative=make_node(W,s,{body:f});e[a]=s.transform(t);continue}var l=aborts(s.alternative);if(can_merge_flow(l)){if(l.label){remove(l.label.thedef.references,l)}o=true;s=s.clone();s.body=make_node(W,s.body,{body:as_statement_array(s.body).concat(extract_functions())});var f=as_statement_array_with_return(s.alternative,l);s.alternative=make_node(W,s.alternative,{body:f});e[a]=s.transform(t);continue}}if(s instanceof Te&&s.body instanceof ge){var p=s.body.value;if(!p&&!s.alternative&&(r&&!c||c instanceof ge&&!c.value)){o=true;e[a]=make_node(X,s.condition,{body:s.condition});continue}if(p&&!s.alternative&&c instanceof ge&&c.value){o=true;s=s.clone();s.alternative=c;e[a]=s.transform(t);e.splice(u,1);continue}if(p&&!s.alternative&&(!c&&r&&i||c instanceof ge)){o=true;s=s.clone();s.alternative=c||make_node(ge,s,{value:null});e[a]=s.transform(t);if(c)e.splice(u,1);continue}var _=e[prev_index(a)];if(t.option("sequences")&&r&&!s.alternative&&_ instanceof Te&&_.body instanceof ge&&next_index(u)==e.length&&c instanceof X){o=true;s=s.clone();s.alternative=make_node(W,c,{body:[c,make_node(ge,c,{value:null})]});e[a]=s.transform(t);e.splice(u,1);continue}}}function has_multiple_if_returns(e){var t=0;for(var n=e.length;--n>=0;){var i=e[n];if(i instanceof Te&&i.body instanceof ge){if(++t>1)return true}}return false}function is_return_void(e){return!e||e instanceof $e&&e.operator=="void"}function can_merge_flow(i){if(!i)return false;for(var o=a+1,s=e.length;o=0;){var i=e[n];if(!(i instanceof Ne&&declarations_only(i))){break}}return n}}function eliminate_dead_code(e,t){var n;var i=t.self();for(var r=0,a=0,s=e.length;r!e.value)}function sequencesize(e,t){if(e.length<2)return;var n=[],i=0;function push_seq(){if(!n.length)return;var t=make_sequence(n[0],n);e[i++]=make_node(X,t,{body:t});n=[]}for(var r=0,a=e.length;r=t.sequences_limit)push_seq();var u=s.body;if(n.length>0)u=u.drop_side_effect_free(t);if(u)merge_sequence(n,u)}else if(s instanceof Me&&declarations_only(s)||s instanceof fe){e[i++]=s}else{push_seq();e[i++]=s}}push_seq();e.length=i;if(i!=a)o=true}function to_simple_statement(e,t){if(!(e instanceof W))return e;var n=null;for(var i=0,r=e.body.length;i{if(e instanceof re)return true;if(e instanceof Qe&&e.operator==="in"){return Zt}});if(!e){if(a.init)a.init=cons_seq(a.init);else{a.init=i.body;n--;o=true}}}}else if(a instanceof te){if(!(a.init instanceof Pe)&&!(a.init instanceof Ie)){a.object=cons_seq(a.object)}}else if(a instanceof Te){a.condition=cons_seq(a.condition)}else if(a instanceof Ae){a.expression=cons_seq(a.expression)}else if(a instanceof ie){a.expression=cons_seq(a.expression)}}if(t.option("conditionals")&&a instanceof Te){var s=[];var u=to_simple_statement(a.body,s);var c=to_simple_statement(a.alternative,s);if(u!==false&&c!==false&&s.length>0){var l=s.length;s.push(make_node(Te,a,{condition:a.condition,body:u||make_node(q,a.body),alternative:c}));s.unshift(n,1);[].splice.apply(e,s);r+=l;n+=l+1;i=null;o=true;continue}}e[n++]=a;i=a instanceof X?a:null}e.length=n}function join_object_assignments(e,n){if(!(e instanceof Me))return;var i=e.definitions[e.definitions.length-1];if(!(i.value instanceof it))return;var r;if(n instanceof et&&!n.logical){r=[n]}else if(n instanceof Xe){r=n.expressions.slice()}if(!r)return;var o=false;do{var s=r[0];if(!(s instanceof et))break;if(s.operator!="=")break;if(!(s.left instanceof He))break;var u=s.left.expression;if(!(u instanceof Ot))break;if(i.name.name!=u.name)break;if(!s.right.is_constant_expression(a))break;var c=s.left.property;if(c instanceof U){c=c.evaluate(t)}if(c instanceof U)break;c=""+c;var l=t.option("ecma")<2015&&t.has_directive("use strict")?function(e){return e.key!=c&&(e.key&&e.key.name!=c)}:function(e){return e.key&&e.key.name!=c};if(!i.value.properties.every(l))break;var f=i.value.properties.filter(function(e){return e.key===c})[0];if(!f){i.value.properties.push(make_node(at,s,{key:c,value:s.right}))}else{f.value=new Xe({start:f.start,expressions:[f.value.clone(),s.right.clone()],end:f.end})}r.shift();o=true}while(r.length);return o&&r}function join_consecutive_vars(e){var t;for(var n=0,i=-1,r=e.length;n{if(i instanceof Ne){i.remove_initializers();n.push(i);return true}if(i instanceof fe&&(i===t||!e.has_directive("use strict"))){n.push(i===t?i:make_node(Ne,i,{definitions:[make_node(Le,i,{name:make_node(mt,i.name,i.name),value:null})]}));return true}if(i instanceof ze||i instanceof Ve){n.push(i);return true}if(i instanceof re){return true}})}function get_value(e){if(e instanceof Lt){return e.getValue()}if(e instanceof $e&&e.operator=="void"&&e.expression instanceof Lt){return}return e}function is_undefined(e,t){return wn(e,Tn)||e instanceof Ht||e instanceof $e&&e.operator=="void"&&!e.expression.has_side_effects(t)}(function(e){U.DEFMETHOD("may_throw_on_access",function(e){return!e.option("pure_getters")||this._dot_throw(e)});function is_strict(e){return/strict/.test(e.option("pure_getters"))}e(U,is_strict);e(Gt,return_true);e(Ht,return_true);e(Lt,return_false);e(nt,return_false);e(it,function(e){if(!is_strict(e))return false;for(var t=this.properties.length;--t>=0;)if(this.properties[t]._dot_throw(e))return true;return false});e(ct,return_false);e(rt,return_false);e(st,return_true);e(oe,function(e){return this.expression._dot_throw(e)});e(ce,return_false);e(le,return_false);e(Ze,return_false);e($e,function(){return this.operator=="void"});e(Qe,function(e){return(this.operator=="&&"||this.operator=="||"||this.operator=="??")&&(this.left._dot_throw(e)||this.right._dot_throw(e))});e(et,function(e){if(this.logical)return true;return this.operator=="="&&this.right._dot_throw(e)});e(Je,function(e){return this.consequent._dot_throw(e)||this.alternative._dot_throw(e)});e(We,function(e){if(!is_strict(e))return false;if(this.expression instanceof ce&&this.property=="prototype")return false;return true});e(Ye,function(e){return this.expression._dot_throw(e)});e(Xe,function(e){return this.tail_node()._dot_throw(e)});e(Ot,function(e){if(this.name==="arguments")return false;if(wn(this,Tn))return true;if(!is_strict(e))return false;if(is_undeclared_ref(this)&&this.is_declared(e))return false;if(this.is_immutable())return false;var t=this.fixed_value();return!t||t._dot_throw(e)})})(function(e,t){e.DEFMETHOD("_dot_throw",t)});(function(e){const t=makePredicate("! delete");const n=makePredicate("in instanceof == != === !== < <= >= >");e(U,return_false);e($e,function(){return t.has(this.operator)});e(Qe,function(){return n.has(this.operator)||Ln.has(this.operator)&&this.left.is_boolean()&&this.right.is_boolean()});e(Je,function(){return this.consequent.is_boolean()&&this.alternative.is_boolean()});e(et,function(){return this.operator=="="&&this.right.is_boolean()});e(Xe,function(){return this.tail_node().is_boolean()});e($t,return_true);e(jt,return_true)})(function(e,t){e.DEFMETHOD("is_boolean",t)});(function(e){e(U,return_false);e(Vt,return_true);var t=makePredicate("+ - ~ ++ --");e(je,function(){return t.has(this.operator)});var n=makePredicate("- * / % & | ^ << >> >>>");e(Qe,function(e){return n.has(this.operator)||this.operator=="+"&&this.left.is_number(e)&&this.right.is_number(e)});e(et,function(e){return n.has(this.operator.slice(0,-1))||this.operator=="="&&this.right.is_number(e)});e(Xe,function(e){return this.tail_node().is_number(e)});e(Je,function(e){return this.consequent.is_number(e)&&this.alternative.is_number(e)})})(function(e,t){e.DEFMETHOD("is_number",t)});(function(e){e(U,return_false);e(Bt,return_true);e(he,return_true);e($e,function(){return this.operator=="typeof"});e(Qe,function(e){return this.operator=="+"&&(this.left.is_string(e)||this.right.is_string(e))});e(et,function(e){return(this.operator=="="||this.operator=="+=")&&this.right.is_string(e)});e(Xe,function(e){return this.tail_node().is_string(e)});e(Je,function(e){return this.consequent.is_string(e)&&this.alternative.is_string(e)})})(function(e,t){e.DEFMETHOD("is_string",t)});var Ln=makePredicate("&& || ??");var Bn=makePredicate("delete ++ --");function is_lhs(e,t){if(t instanceof je&&Bn.has(t.operator))return t.expression;if(t instanceof et&&t.left===e)return e}(function(e){function to_node(e,t){if(e instanceof U)return make_node(e.CTOR,t,e);if(Array.isArray(e))return make_node(nt,t,{elements:e.map(function(e){return to_node(e,t)})});if(e&&typeof e=="object"){var n=[];for(var i in e)if(HOP(e,i)){n.push(make_node(at,t,{key:i,value:to_node(e[i],t)}))}return make_node(it,t,{properties:n})}return make_node_from_constant(e,t)}ae.DEFMETHOD("resolve_defines",function(e){if(!e.option("global_defs"))return this;this.figure_out_scope({ie8:e.option("ie8")});return this.transform(new TreeTransformer(function(t){var n=t._find_defs(e,"");if(!n)return;var i=0,r=t,a;while(a=this.parent(i++)){if(!(a instanceof He))break;if(a.expression!==r)break;r=a}if(is_lhs(r,a)){return}return n}))});e(U,noop);e(Ye,function(e,t){return this.expression._find_defs(e,t)});e(We,function(e,t){return this.expression._find_defs(e,"."+this.property+t)});e(dt,function(){if(!this.global())return});e(Ot,function(e,t){if(!this.global())return;var n=e.option("global_defs");var i=this.name+t;if(HOP(n,i))return to_node(n[i],this)})})(function(e,t){e.DEFMETHOD("_find_defs",t)});function best_of_expression(e,t){return e.size()>t.size()?t:e}function best_of_statement(e,t){return best_of_expression(make_node(X,e,{body:e}),make_node(X,t,{body:t})).body}function best_of(e,t,n){return(first_in_statement(e)?best_of_statement:best_of_expression)(t,n)}function convert_to_predicate(e){const t=new Map;for(var n of Object.keys(e)){t.set(n,makePredicate(e[n]))}return t}var Vn=["constructor","toString","valueOf"];var Un=convert_to_predicate({Array:["indexOf","join","lastIndexOf","slice"].concat(Vn),Boolean:Vn,Function:Vn,Number:["toExponential","toFixed","toPrecision"].concat(Vn),Object:Vn,RegExp:["test"].concat(Vn),String:["charAt","charCodeAt","concat","indexOf","italics","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","trim"].concat(Vn)});var zn=convert_to_predicate({Array:["isArray"],Math:["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan","atan2","pow","max","min"],Number:["isFinite","isNaN"],Object:["create","getOwnPropertyDescriptor","getOwnPropertyNames","getPrototypeOf","isExtensible","isFrozen","isSealed","keys"],String:["fromCharCode"]});(function(e){U.DEFMETHOD("evaluate",function(e){if(!e.option("evaluate"))return this;var t=this._eval(e,1);if(!t||t instanceof RegExp)return t;if(typeof t=="function"||typeof t=="object")return this;return t});var t=makePredicate("! ~ - + void");U.DEFMETHOD("is_constant",function(){if(this instanceof Lt){return!(this instanceof zt)}else{return this instanceof $e&&this.expression instanceof Lt&&t.has(this.operator)}});e(z,function(){throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]",this.start))});e(se,return_this);e(ct,return_this);e(U,return_this);e(Lt,function(){return this.getValue()});e(Ut,return_this);e(zt,function(e){let t=e.evaluated_regexps.get(this);if(t===undefined){try{t=(0,eval)(this.print_to_string())}catch(e){t=null}e.evaluated_regexps.set(this,t)}return t||this});e(he,function(){if(this.segments.length!==1)return this;return this.segments[0].value});e(ce,function(e){if(e.option("unsafe")){var t=function(){};t.node=this;t.toString=function(){return this.node.print_to_string()};return t}return this});e(nt,function(e,t){if(e.option("unsafe")){var n=[];for(var i=0,r=this.elements.length;itypeof e==="object"||typeof e==="function"||typeof e==="symbol";e(Qe,function(e,t){if(!i.has(this.operator))t++;var n=this.left._eval(e,t);if(n===this.left)return this;var o=this.right._eval(e,t);if(o===this.right)return this;var s;if(n!=null&&o!=null&&r.has(this.operator)&&a(n)&&a(o)&&typeof n===typeof o){return this}switch(this.operator){case"&&":s=n&&o;break;case"||":s=n||o;break;case"??":s=n!=null?n:o;break;case"|":s=n|o;break;case"&":s=n&o;break;case"^":s=n^o;break;case"+":s=n+o;break;case"*":s=n*o;break;case"**":s=Math.pow(n,o);break;case"/":s=n/o;break;case"%":s=n%o;break;case"-":s=n-o;break;case"<<":s=n<>":s=n>>o;break;case">>>":s=n>>>o;break;case"==":s=n==o;break;case"===":s=n===o;break;case"!=":s=n!=o;break;case"!==":s=n!==o;break;case"<":s=n":s=n>o;break;case">=":s=n>=o;break;default:return this}if(isNaN(s)&&e.find_parent(ie)){return this}return s});e(Je,function(e,t){var n=this.condition._eval(e,t);if(n===this.condition)return this;var i=n?this.consequent:this.alternative;var r=i._eval(e,t);return r===i?this:r});const o=new Set;e(Ot,function(e,t){if(o.has(this))return this;var n=this.fixed_value();if(!n)return this;o.add(this);const i=n._eval(e,t);o.delete(this);if(i===n)return this;if(i&&typeof i=="object"){var r=this.definition().escaped;if(r&&t>r)return this}return i});var s={Array:Array,Math:Math,Number:Number,Object:Object,String:String};var u=convert_to_predicate({Math:["E","LN10","LN2","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],Number:["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"]});e(He,function(e,t){if(this.optional){const n=this.expression._eval(e,t);if(n==null)return undefined}if(e.option("unsafe")){var n=this.property;if(n instanceof U){n=n._eval(e,t);if(n===this.property)return this}var i=this.expression;var r;if(is_undeclared_ref(i)){var a;var o=i.name==="hasOwnProperty"&&n==="call"&&(a=e.parent()&&e.parent().args)&&(a&&a[0]&&a[0].evaluate(e));o=o instanceof We?o.expression:o;if(o==null||o.thedef&&o.thedef.undeclared){return this.clone()}var c=u.get(i.name);if(!c||!c.has(n))return this;r=s[i.name]}else{r=i._eval(e,t+1);if(!r||r===i||!HOP(r,n))return this;if(typeof r=="function")switch(n){case"name":return r.node.name?r.node.name.name:"";case"length":return r.node.argnames.length;default:return this}}return r[n]}return this});e(Ye,function(e,t){const n=this.expression._eval(e,t);return n===this.expression?this:n});e(Ke,function(e,t){var n=this.expression;if(this.optional){const n=this.expression._eval(e,t);if(n==null)return undefined}if(e.option("unsafe")&&n instanceof He){var i=n.property;if(i instanceof U){i=i._eval(e,t);if(i===n.property)return this}var r;var a=n.expression;if(is_undeclared_ref(a)){var o=a.name==="hasOwnProperty"&&i==="call"&&(this.args[0]&&this.args[0].evaluate(e));o=o instanceof We?o.expression:o;if(o==null||o.thedef&&o.thedef.undeclared){return this.clone()}var u=zn.get(a.name);if(!u||!u.has(i))return this;r=s[a.name]}else{r=a._eval(e,t+1);if(r===a||!r)return this;var c=Un.get(r.constructor.name);if(!c||!c.has(i))return this}var l=[];for(var f=0,p=this.args.length;f";return n;case"<":n.operator=">=";return n;case">=":n.operator="<";return n;case">":n.operator="<=";return n}}switch(i){case"==":n.operator="!=";return n;case"!=":n.operator="==";return n;case"===":n.operator="!==";return n;case"!==":n.operator="===";return n;case"&&":n.operator="||";n.left=n.left.negate(e,t);n.right=n.right.negate(e);return best(this,n,t);case"||":n.operator="&&";n.left=n.left.negate(e,t);n.right=n.right.negate(e);return best(this,n,t);case"??":n.right=n.right.negate(e);return best(this,n,t)}return basic_negation(this)})})(function(e,t){e.DEFMETHOD("negate",function(e,n){return t.call(this,e,n)})});var Kn=makePredicate("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError");Ke.DEFMETHOD("is_expr_pure",function(e){if(e.option("unsafe")){var t=this.expression;var n=this.args&&this.args[0]&&this.args[0].evaluate(e);if(t.expression&&t.expression.name==="hasOwnProperty"&&(n==null||n.thedef&&n.thedef.undeclared)){return false}if(is_undeclared_ref(t)&&Kn.has(t.name))return true;let i;if(t instanceof We&&is_undeclared_ref(t.expression)&&(i=zn.get(t.expression.name))&&i.has(t.property)){return true}}return!!has_annotation(this,Qt)||!e.pure_funcs(this)});U.DEFMETHOD("is_call_pure",return_false);We.DEFMETHOD("is_call_pure",function(e){if(!e.option("unsafe"))return;const t=this.expression;let n;if(t instanceof nt){n=Un.get("Array")}else if(t.is_boolean()){n=Un.get("Boolean")}else if(t.is_number(e)){n=Un.get("Number")}else if(t instanceof zt){n=Un.get("RegExp")}else if(t.is_string(e)){n=Un.get("String")}else if(!this.may_throw_on_access(e)){n=Un.get("Object")}return n&&n.has(this.property)});const Gn=new Set(["Number","String","Array","Object","Function","Promise"]);(function(e){e(U,return_true);e(q,return_false);e(Lt,return_false);e(It,return_false);function any(e,t){for(var n=e.length;--n>=0;)if(e[n].has_side_effects(t))return true;return false}e(H,function(e){return any(this.body,e)});e(Ke,function(e){if(!this.is_expr_pure(e)&&(!this.expression.is_call_pure(e)||this.expression.has_side_effects(e))){return true}return any(this.args,e)});e(Ae,function(e){return this.expression.has_side_effects(e)||any(this.body,e)});e(xe,function(e){return this.expression.has_side_effects(e)||any(this.body,e)});e(Fe,function(e){return any(this.body,e)||this.bcatch&&this.bcatch.has_side_effects(e)||this.bfinally&&this.bfinally.has_side_effects(e)});e(Te,function(e){return this.condition.has_side_effects(e)||this.body&&this.body.has_side_effects(e)||this.alternative&&this.alternative.has_side_effects(e)});e(j,function(e){return this.body.has_side_effects(e)});e(X,function(e){return this.body.has_side_effects(e)});e(se,return_false);e(ct,function(e){if(this.extends&&this.extends.has_side_effects(e)){return true}return any(this.properties,e)});e(Qe,function(e){return this.left.has_side_effects(e)||this.right.has_side_effects(e)});e(et,return_true);e(Je,function(e){return this.condition.has_side_effects(e)||this.consequent.has_side_effects(e)||this.alternative.has_side_effects(e)});e(je,function(e){return Bn.has(this.operator)||this.expression.has_side_effects(e)});e(Ot,function(e){return!this.is_declared(e)&&!Gn.has(this.name)});e(kt,return_false);e(dt,return_false);e(it,function(e){return any(this.properties,e)});e(rt,function(e){return this.computed_key()&&this.key.has_side_effects(e)||this.value.has_side_effects(e)});e(lt,function(e){return this.computed_key()&&this.key.has_side_effects(e)||this.static&&this.value&&this.value.has_side_effects(e)});e(ut,function(e){return this.computed_key()&&this.key.has_side_effects(e)});e(st,function(e){return this.computed_key()&&this.key.has_side_effects(e)});e(ot,function(e){return this.computed_key()&&this.key.has_side_effects(e)});e(nt,function(e){return any(this.elements,e)});e(We,function(e){return!this.optional&&this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)});e(qe,function(e){if(this.optional&&is_nullish(this.expression)){return false}return!this.optional&&this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)||this.property.has_side_effects(e)});e(Ye,function(e){return this.expression.has_side_effects(e)});e(Xe,function(e){return any(this.expressions,e)});e(Me,function(e){return any(this.definitions,e)});e(Le,function(){return this.value});e(de,return_false);e(he,function(e){return any(this.segments,e)})})(function(e,t){e.DEFMETHOD("has_side_effects",t)});(function(e){e(U,return_true);e(Lt,return_false);e(q,return_false);e(se,return_false);e(dt,return_false);e(It,return_false);function any(e,t){for(var n=e.length;--n>=0;)if(e[n].may_throw(t))return true;return false}e(ct,function(e){if(this.extends&&this.extends.may_throw(e))return true;return any(this.properties,e)});e(nt,function(e){return any(this.elements,e)});e(et,function(e){if(this.right.may_throw(e))return true;if(!e.has_directive("use strict")&&this.operator=="="&&this.left instanceof Ot){return false}return this.left.may_throw(e)});e(Qe,function(e){return this.left.may_throw(e)||this.right.may_throw(e)});e(H,function(e){return any(this.body,e)});e(Ke,function(e){if(this.optional&&is_nullish(this.expression))return false;if(any(this.args,e))return true;if(this.is_expr_pure(e))return false;if(this.expression.may_throw(e))return true;return!(this.expression instanceof se)||any(this.expression.body,e)});e(xe,function(e){return this.expression.may_throw(e)||any(this.body,e)});e(Je,function(e){return this.condition.may_throw(e)||this.consequent.may_throw(e)||this.alternative.may_throw(e)});e(Me,function(e){return any(this.definitions,e)});e(Te,function(e){return this.condition.may_throw(e)||this.body&&this.body.may_throw(e)||this.alternative&&this.alternative.may_throw(e)});e(j,function(e){return this.body.may_throw(e)});e(it,function(e){return any(this.properties,e)});e(rt,function(e){return this.value.may_throw(e)});e(lt,function(e){return this.computed_key()&&this.key.may_throw(e)||this.static&&this.value&&this.value.may_throw(e)});e(ut,function(e){return this.computed_key()&&this.key.may_throw(e)});e(st,function(e){return this.computed_key()&&this.key.may_throw(e)});e(ot,function(e){return this.computed_key()&&this.key.may_throw(e)});e(ge,function(e){return this.value&&this.value.may_throw(e)});e(Xe,function(e){return any(this.expressions,e)});e(X,function(e){return this.body.may_throw(e)});e(We,function(e){return!this.optional&&this.expression.may_throw_on_access(e)||this.expression.may_throw(e)});e(qe,function(e){if(this.optional&&is_nullish(this.expression))return false;return!this.optional&&this.expression.may_throw_on_access(e)||this.expression.may_throw(e)||this.property.may_throw(e)});e(Ye,function(e){return this.expression.may_throw(e)});e(Ae,function(e){return this.expression.may_throw(e)||any(this.body,e)});e(Ot,function(e){return!this.is_declared(e)&&!Gn.has(this.name)});e(kt,return_false);e(Fe,function(e){return this.bcatch?this.bcatch.may_throw(e):any(this.body,e)||this.bfinally&&this.bfinally.may_throw(e)});e(je,function(e){if(this.operator=="typeof"&&this.expression instanceof Ot)return false;return this.expression.may_throw(e)});e(Le,function(e){if(!this.value)return false;return this.value.may_throw(e)})})(function(e,t){e.DEFMETHOD("may_throw",t)});(function(e){function all_refs_local(e){let t=true;walk(this,n=>{if(n instanceof Ot){if(wn(this,An)){t=false;return Zt}var i=n.definition();if(member(i,this.enclosed)&&!this.variables.has(i.name)){if(e){var r=e.find_variable(n);if(i.undeclared?!r:r===i){t="f";return true}}t=false;return Zt}return true}if(n instanceof It&&this instanceof le){t=false;return Zt}});return t}e(U,return_false);e(Lt,return_true);e(ct,function(e){if(this.extends&&!this.extends.is_constant_expression(e)){return false}for(const t of this.properties){if(t.computed_key()&&!t.key.is_constant_expression(e)){return false}if(t.static&&t.value&&!t.value.is_constant_expression(e)){return false}}return all_refs_local.call(this,e)});e(se,all_refs_local);e(je,function(){return this.expression.is_constant_expression()});e(Qe,function(){return this.left.is_constant_expression()&&this.right.is_constant_expression()});e(nt,function(){return this.elements.every(e=>e.is_constant_expression())});e(it,function(){return this.properties.every(e=>e.is_constant_expression())});e(rt,function(){return!(this.key instanceof U)&&this.value.is_constant_expression()})})(function(e,t){e.DEFMETHOD("is_constant_expression",t)});function aborts(e){return e&&e.aborts()}(function(e){e(z,return_null);e(me,return_this);function block_aborts(){for(var e=0;e{if(e instanceof dt){const n=e.definition();if((t||n.global)&&!o.has(n.id)){o.set(n.id,n)}}})}if(n.value){if(n.name instanceof pe){n.walk(f)}else{var i=n.name.definition();map_add(c,i.id,n.value);if(!i.chained&&n.name.fixed_value()===n.value){s.set(i.id,n)}}if(n.value.has_side_effects(e)){n.value.walk(f)}}});return true}return scan_ref_scoped(i,a)});t.walk(f);f=new TreeWalker(scan_ref_scoped);o.forEach(function(e){var t=c.get(e.id);if(t)t.forEach(function(e){e.walk(f)})});var p=new TreeTransformer(function before(c,f,_){var h=p.parent();if(r){const e=a(c);if(e instanceof Ot){var d=e.definition();var m=o.has(d.id);if(c instanceof et){if(!m||s.has(d.id)&&s.get(d.id)!==c){return maintain_this_binding(h,c,c.right.transform(p))}}else if(!m)return _?i.skip:make_node(Vt,c,{value:0})}}if(l!==t)return;var d;if(c.name&&(c instanceof pt&&!keep_name(e.option("keep_classnames"),(d=c.name.definition()).name)||c instanceof ce&&!keep_name(e.option("keep_fnames"),(d=c.name.definition()).name))){if(!o.has(d.id)||d.orig.length>1)c.name=null}if(c instanceof se&&!(c instanceof ue)){var E=!e.option("keep_fargs");for(var g=c.argnames,v=g.length;--v>=0;){var D=g[v];if(D instanceof oe){D=D.expression}if(D instanceof tt){D=D.left}if(!(D instanceof pe)&&!o.has(D.definition().id)){Mn(D,yn);if(E){g.pop()}}else{E=false}}}if((c instanceof fe||c instanceof ft)&&c!==t){const t=c.name.definition();let r=t.global&&!n||o.has(t.id);if(!r){t.eliminated++;if(c instanceof ft){const t=c.drop_side_effect_free(e);if(t){return make_node(X,c,{body:t})}}return _?i.skip:make_node(q,c)}}if(c instanceof Me&&!(h instanceof te&&h.init===c)){var b=!(h instanceof ae)&&!(c instanceof Ne);var y=[],k=[],S=[];var T=[];c.definitions.forEach(function(t){if(t.value)t.value=t.value.transform(p);var n=t.name instanceof pe;var i=n?new SymbolDef(null,{name:""}):t.name.definition();if(b&&i.global)return S.push(t);if(!(r||b)||n&&(t.name.names.length||t.name.is_array||e.option("pure_getters")!=true)||o.has(i.id)){if(t.value&&s.has(i.id)&&s.get(i.id)!==t){t.value=t.value.drop_side_effect_free(e)}if(t.name instanceof mt){var a=u.get(i.id);if(a.length>1&&(!t.value||i.orig.indexOf(t.name)>i.eliminated)){if(t.value){var l=make_node(Ot,t.name,t.name);i.references.push(l);var f=make_node(et,t,{operator:"=",logical:false,left:l,right:t.value});if(s.get(i.id)===t){s.set(i.id,f)}T.push(f.transform(p))}remove(a,t);i.eliminated++;return}}if(t.value){if(T.length>0){if(S.length>0){T.push(t.value);t.value=make_sequence(t.value,T)}else{y.push(make_node(X,c,{body:make_sequence(c,T)}))}T=[]}S.push(t)}else{k.push(t)}}else if(i.orig[0]instanceof Ct){var _=t.value&&t.value.drop_side_effect_free(e);if(_)T.push(_);t.value=null;k.push(t)}else{var _=t.value&&t.value.drop_side_effect_free(e);if(_){T.push(_)}i.eliminated++}});if(k.length>0||S.length>0){c.definitions=k.concat(S);y.push(c)}if(T.length>0){y.push(make_node(X,c,{body:make_sequence(c,T)}))}switch(y.length){case 0:return _?i.skip:make_node(q,c);case 1:return y[0];default:return _?i.splice(y):make_node(W,c,{body:y})}}if(c instanceof ee){f(c,this);var A;if(c.init instanceof W){A=c.init;c.init=A.body.pop();A.body.push(c)}if(c.init instanceof X){c.init=c.init.body}else if(is_empty(c.init)){c.init=null}return!A?c:_?i.splice(A.body):A}if(c instanceof j&&c.body instanceof ee){f(c,this);if(c.body instanceof W){var A=c.body;c.body=A.body.pop();A.body.push(c);return _?i.splice(A.body):A}return c}if(c instanceof W){f(c,this);if(_&&c.body.every(can_be_evicted_from_block)){return i.splice(c.body)}return c}if(c instanceof re){const e=l;l=c;f(c,this);l=e;return c}});t.transform(p);function scan_ref_scoped(e,n){var i;const r=a(e);if(r instanceof Ot&&!is_ref_of(e.left,Et)&&t.variables.get(r.name)===(i=r.definition())){if(e instanceof et){e.right.walk(f);if(!i.chained&&e.left.fixed_value()===e.right){s.set(i.id,e)}}return true}if(e instanceof Ot){i=e.definition();if(!o.has(i.id)){o.set(i.id,i);if(i.orig[0]instanceof Ct){const e=i.scope.is_block_scope()&&i.scope.get_defun_scope().variables.get(i.name);if(e)o.set(e.id,e)}}return true}if(e instanceof re){var u=l;l=e;n();l=u;return true}}});re.DEFMETHOD("hoist_declarations",function(e){var t=this;if(e.has_directive("use asm"))return t;if(!Array.isArray(t.body))return t;var n=e.option("hoist_funs");var i=e.option("hoist_vars");if(n||i){var r=[];var a=[];var o=new Map,s=0,u=0;walk(t,e=>{if(e instanceof re&&e!==t)return true;if(e instanceof Ne){++u;return true}});i=i&&u>1;var c=new TreeTransformer(function before(u){if(u!==t){if(u instanceof G){r.push(u);return make_node(q,u)}if(n&&u instanceof fe&&!(c.parent()instanceof ze)&&c.parent()===t){a.push(u);return make_node(q,u)}if(i&&u instanceof Ne&&!u.definitions.some(e=>e.name instanceof pe)){u.definitions.forEach(function(e){o.set(e.name.name,e);++s});var l=u.to_assignments(e);var f=c.parent();if(f instanceof te&&f.init===u){if(l==null){var p=u.definitions[0].name;return make_node(Ot,p,p)}return l}if(f instanceof ee&&f.init===u){return l}if(!l)return make_node(q,u);return make_node(X,u,{body:l})}if(u instanceof re)return u}});t=t.transform(c);if(s>0){var l=[];const e=t instanceof se;const n=e?t.args_as_names():null;o.forEach((t,i)=>{if(e&&n.some(e=>e.name===t.name.name)){o.delete(i)}else{t=t.clone();t.value=null;l.push(t);o.set(i,t)}});if(l.length>0){for(var f=0;fe instanceof oe||e.computed_key())){s(o,this);const e=new Map;const n=[];l.properties.forEach(({key:i,value:r})=>{const s=find_scope(a);const c=t.create_symbol(u.CTOR,{source:u,scope:s,conflict_scopes:new Set([s,...u.definition().references.map(e=>e.scope)]),tentative_name:u.name+"_"+i});e.set(String(i),c.definition());n.push(make_node(Le,o,{name:c,value:r}))});r.set(c.id,e);return i.splice(n)}}else if(o instanceof He&&o.expression instanceof Ot){const e=r.get(o.expression.definition().id);if(e){const t=e.get(String(get_value(o.property)));const n=make_node(Ot,o,{name:t.name,scope:o.expression.scope,thedef:t});n.reference({});return n}}});return t.transform(a)});(function(e){function trim(e,t,n){var i=e.length;if(!i)return null;var r=[],a=false;for(var o=0;o0){o[0].body=a.concat(o[0].body)}e.body=o;while(n=o[o.length-1]){var h=n.body[n.body.length-1];if(h instanceof be&&t.loopcontrol_target(h)===e)n.body.pop();if(n.body.length||n instanceof xe&&(s||n.expression.has_side_effects(t)))break;if(o.pop()===s)s=null}if(o.length==0){return make_node(W,e,{body:a.concat(make_node(X,e.expression,{body:e.expression}))}).optimize(t)}if(o.length==1&&(o[0]===u||o[0]===s)){var d=false;var m=new TreeWalker(function(t){if(d||t instanceof se||t instanceof X)return true;if(t instanceof be&&m.loopcontrol_target(t)===e)d=true});e.walk(m);if(!d){var E=o[0].body.slice();var f=o[0].expression;if(f)E.unshift(make_node(X,f,{body:f}));E.unshift(make_node(X,e.expression,{body:e.expression}));return make_node(W,e,{body:E}).optimize(t)}}return e;function eliminate_branch(e,n){if(n&&!aborts(n)){n.body=n.body.concat(e.body)}else{trim_unreachable_code(t,e,a)}}});def_optimize(Fe,function(e,t){tighten_body(e.body,t);if(e.bcatch&&e.bfinally&&e.bfinally.body.every(is_empty))e.bfinally=null;if(t.option("dead_code")&&e.body.every(is_empty)){var n=[];if(e.bcatch){trim_unreachable_code(t,e.bcatch,n)}if(e.bfinally)n.push(...e.bfinally.body);return make_node(W,e,{body:n}).optimize(t)}return e});Me.DEFMETHOD("remove_initializers",function(){var e=[];this.definitions.forEach(function(t){if(t.name instanceof dt){t.value=null;e.push(t)}else{walk(t.name,n=>{if(n instanceof dt){e.push(make_node(Le,t,{name:n,value:null}))}})}});this.definitions=e});Me.DEFMETHOD("to_assignments",function(e){var t=e.option("reduce_vars");var n=[];for(const e of this.definitions){if(e.value){var i=make_node(Ot,e.name,e.name);n.push(make_node(et,e,{operator:"=",logical:false,left:i,right:e.value}));if(t)i.definition().fixed=false}else if(e.value){var r=make_node(Le,e,{name:e.name,value:e.value});var a=make_node(Ne,e,{definitions:[r]});n.push(a)}const o=e.name.definition();o.eliminated++;o.replaced--}if(n.length==0)return null;return make_sequence(this,n)});def_optimize(Me,function(e){if(e.definitions.length==0)return make_node(q,e);return e});def_optimize(Le,function(e){if(e.name instanceof vt&&e.value!=null&&is_undefined(e.value)){e.value=null}return e});def_optimize(Ve,function(e){return e});function retain_top_func(e,t){return t.top_retain&&e instanceof fe&&wn(e,Fn)&&e.name&&t.top_retain(e.name)}def_optimize(Ke,function(e,t){var n=e.expression;var i=n;inline_array_like_spread(e.args);var r=e.args.every(e=>!(e instanceof oe));if(t.option("reduce_vars")&&i instanceof Ot&&!has_annotation(e,en)){const e=i.fixed_value();if(!retain_top_func(e,t)){i=e}}if(e.optional&&is_nullish(i)){return make_node(Ht,e)}var a=i instanceof se;if(a&&i.pinned())return e;if(t.option("unused")&&r&&a&&!i.uses_arguments){var o=0,s=0;for(var u=0,c=e.args.length;u=i.argnames.length;if(f||wn(i.argnames[u],yn)){var l=e.args[u].drop_side_effect_free(t);if(l){e.args[o++]=l}else if(!f){e.args[o++]=make_node(Vt,e.args[u],{value:0});continue}}else{e.args[o++]=e.args[u]}s=o}e.args.length=s}if(t.option("unsafe")){if(is_undeclared_ref(n))switch(n.name){case"Array":if(e.args.length!=1){return make_node(nt,e,{elements:e.args}).optimize(t)}else if(e.args[0]instanceof Vt&&e.args[0].value<=11){const t=[];for(let n=0;n=1&&e.args.length<=2&&e.args.every(e=>{var n=e.evaluate(t);p.push(n);return e!==n})){let[n,i]=p;n=regexp_source_fix(new RegExp(n).source);const r=make_node(zt,e,{value:{source:n,flags:i}});if(r._eval(t)!==r){return r}}break}else if(n instanceof We)switch(n.property){case"toString":if(e.args.length==0&&!n.expression.may_throw_on_access(t)){return make_node(Qe,e,{left:make_node(Bt,e,{value:""}),operator:"+",right:n.expression}).optimize(t)}break;case"join":if(n.expression instanceof nt)e:{var _;if(e.args.length>0){_=e.args[0].evaluate(t);if(_===e.args[0])break e}var h=[];var d=[];for(var u=0,c=n.expression.elements.length;u0){h.push(make_node(Bt,e,{value:d.join(_)}));d.length=0}h.push(m)}}if(d.length>0){h.push(make_node(Bt,e,{value:d.join(_)}))}if(h.length==0)return make_node(Bt,e,{value:""});if(h.length==1){if(h[0].is_string(t)){return h[0]}return make_node(Qe,h[0],{operator:"+",left:make_node(Bt,e,{value:""}),right:h[0]})}if(_==""){var g;if(h[0].is_string(t)||h[1].is_string(t)){g=h.shift()}else{g=make_node(Bt,e,{value:""})}return h.reduce(function(e,t){return make_node(Qe,t,{operator:"+",left:e,right:t})},g).optimize(t)}var l=e.clone();l.expression=l.expression.clone();l.expression.expression=l.expression.expression.clone();l.expression.expression.elements=h;return best_of(t,e,l)}break;case"charAt":if(n.expression.is_string(t)){var v=e.args[0];var D=v?v.evaluate(t):0;if(D!==v){return make_node(qe,n,{expression:n.expression,property:make_node_from_constant(D|0,v||n)}).optimize(t)}}break;case"apply":if(e.args.length==2&&e.args[1]instanceof nt){var b=e.args[1].elements.slice();b.unshift(e.args[0]);return make_node(Ke,e,{expression:make_node(We,n,{expression:n.expression,optional:false,property:"call"}),args:b}).optimize(t)}break;case"call":var y=n.expression;if(y instanceof Ot){y=y.fixed_value()}if(y instanceof se&&!y.contains_this()){return(e.args.length?make_sequence(this,[e.args[0],make_node(Ke,e,{expression:n.expression,args:e.args.slice(1)})]):make_node(Ke,e,{expression:n.expression,args:[]})).optimize(t)}break}}if(t.option("unsafe_Function")&&is_undeclared_ref(n)&&n.name=="Function"){if(e.args.length==0)return make_node(ce,e,{argnames:[],body:[]}).optimize(t);if(e.args.every(e=>e instanceof Bt)){try{var k="n(function("+e.args.slice(0,-1).map(function(e){return e.value}).join(",")+"){"+e.args[e.args.length-1].value+"})";var S=parse(k);var T={ie8:t.option("ie8")};S.figure_out_scope(T);var A=new Compressor(t.options,{mangle_options:t.mangle_options});S=S.transform(A);S.figure_out_scope(T);dn.reset();S.compute_char_frequency(T);S.mangle_names(T);var C;walk(S,e=>{if(is_func_expr(e)){C=e;return Zt}});var k=OutputStream();W.prototype._codegen.call(C,C,k);e.args=[make_node(Bt,e,{value:C.argnames.map(function(e){return e.print_to_string()}).join(",")}),make_node(Bt,e.args[e.args.length-1],{value:k.get().replace(/^{|}$/g,"")})];return e}catch(e){if(!(e instanceof JS_Parse_Error)){throw e}}}}var R=a&&i.body[0];var x=a&&!i.is_generator&&!i.async;var F=x&&t.option("inline")&&!e.is_expr_pure(t);if(F&&R instanceof ge){let n=R.value;if(!n||n.is_constant_expression()){if(n){n=n.clone(true)}else{n=make_node(Ht,e)}const i=e.args.concat(n);return make_sequence(e,i).optimize(t)}if(i.argnames.length===1&&i.argnames[0]instanceof Dt&&e.args.length<2&&n instanceof Ot&&n.name===i.argnames[0].name){const n=(e.args[0]||make_node(Ht)).optimize(t);let i;if(n instanceof He&&(i=t.parent())instanceof Ke&&i.expression===e){return make_sequence(e,[make_node(Vt,e,{value:0}),n])}return n}}if(F){var O,w,M=-1;let a;let o;let s;if(r&&!i.uses_arguments&&!(t.parent()instanceof ct)&&!(i.name&&i instanceof ce)&&(o=can_flatten_body(R))&&(n===i||has_annotation(e,Jt)||t.option("unused")&&(a=n.definition()).references.length==1&&!recursive_ref(t,a)&&i.is_constant_expression(n.scope))&&!has_annotation(e,Qt|en)&&!i.contains_this()&&can_inject_symbols()&&(s=find_scope(t))&&!scope_encloses_variables_in_this_scope(s,i)&&!function in_default_assign(){let e=0;let n;while(n=t.parent(e++)){if(n instanceof tt)return true;if(n instanceof H)break}return false}()&&!(O instanceof ct)){Mn(i,Rn);s.add_child_scope(i);return make_sequence(e,flatten_fn(o)).optimize(t)}}if(F&&has_annotation(e,Jt)){Mn(i,Rn);i=make_node(i.CTOR===fe?ce:i.CTOR,i,i);i.figure_out_scope({},{parent_scope:find_scope(t),toplevel:t.get_toplevel()});return make_node(Ke,e,{expression:i,args:e.args}).optimize(t)}const N=x&&t.option("side_effects")&&i.body.every(is_empty);if(N){var b=e.args.concat(make_node(Ht,e));return make_sequence(e,b).optimize(t)}if(t.option("negate_iife")&&t.parent()instanceof X&&is_iife_call(e)){return e.negate(t,true)}var I=e.evaluate(t);if(I!==e){I=make_node_from_constant(I,e).optimize(t);return best_of(t,I,e)}return e;function return_value(t){if(!t)return make_node(Ht,e);if(t instanceof ge){if(!t.value)return make_node(Ht,e);return t.value.clone(true)}if(t instanceof X){return make_node($e,t,{operator:"void",expression:t.body.clone(true)})}}function can_flatten_body(e){var n=i.body;var r=n.length;if(t.option("inline")<3){return r==1&&return_value(e)}e=null;for(var a=0;a!e.value)){return false}}else if(e){return false}else if(!(o instanceof q)){e=o}}return return_value(e)}function can_inject_args(e,t){for(var n=0,r=i.argnames.length;n=0;){var s=a.definitions[o].name;if(s instanceof pe||e.has(s.name)||Pn.has(s.name)||O.conflicting_def(s.name)){return false}if(w)w.push(s.definition())}}return true}function can_inject_symbols(){var e=new Set;do{O=t.parent(++M);if(O.is_block_scope()&&O.block_scope){O.block_scope.variables.forEach(function(t){e.add(t.name)})}if(O instanceof Oe){if(O.argname){e.add(O.argname.name)}}else if(O instanceof $){w=[]}else if(O instanceof Ot){if(O.fixed_value()instanceof re)return false}}while(!(O instanceof re));var n=!(O instanceof ae)||t.toplevel.vars;var r=t.option("inline");if(!can_inject_vars(e,r>=3&&n))return false;if(!can_inject_args(e,r>=2&&n))return false;return!w||w.length==0||!is_reachable(i,w)}function append_var(t,n,i,r){var a=i.definition();const o=O.variables.has(i.name);if(!o){O.variables.set(i.name,a);O.enclosed.push(a);t.push(make_node(Le,i,{name:i,value:null}))}var s=make_node(Ot,i,i);a.references.push(s);if(r)n.push(make_node(et,e,{operator:"=",logical:false,left:s,right:r.clone()}))}function flatten_args(t,n){var r=i.argnames.length;for(var a=e.args.length;--a>=r;){n.push(e.args[a])}for(a=r;--a>=0;){var o=i.argnames[a];var s=e.args[a];if(wn(o,yn)||!o.name||O.conflicting_def(o.name)){if(s)n.push(s)}else{var u=make_node(mt,o,o);o.definition().orig.push(u);if(!s&&w)s=make_node(Ht,e);append_var(t,n,u,s)}}t.reverse();n.reverse()}function flatten_vars(e,t){var n=t.length;for(var r=0,a=i.body.length;re.name!=l.name)){var f=i.variables.get(l.name);var p=make_node(Ot,l,l);f.references.push(p);t.splice(n++,0,make_node(et,c,{operator:"=",logical:false,left:p,right:make_node(Ht,l)}))}}}}function flatten_fn(e){var n=[];var r=[];flatten_args(n,r);flatten_vars(n,r);r.push(e);if(n.length){const e=O.body.indexOf(t.parent(M-1))+1;O.body.splice(e,0,make_node(Ne,i,{definitions:n}))}return r.map(e=>e.clone(true))}});def_optimize(Ge,function(e,t){if(t.option("unsafe")&&is_undeclared_ref(e.expression)&&["Object","RegExp","Function","Error","Array"].includes(e.expression.name))return make_node(Ke,e,e).transform(t);return e});def_optimize(Xe,function(e,t){if(!t.option("side_effects"))return e;var n=[];filter_for_side_effects();var i=n.length-1;trim_right_for_undefined();if(i==0){e=maintain_this_binding(t.parent(),t.self(),n[0]);if(!(e instanceof Xe))e=e.optimize(t);return e}e.expressions=n;return e;function filter_for_side_effects(){var i=first_in_statement(t);var r=e.expressions.length-1;e.expressions.forEach(function(e,a){if(a0&&is_undefined(n[i],t))i--;if(i0){var n=this.clone();n.right=make_sequence(this.right,t.slice(a));t=t.slice(0,a);t.push(n);return make_sequence(this,t).optimize(e)}}}return this});var Wn=makePredicate("== === != !== * & | ^");function is_object(e){return e instanceof nt||e instanceof se||e instanceof it||e instanceof ct}def_optimize(Qe,function(e,t){function reversible(){return e.left.is_constant()||e.right.is_constant()||!e.left.has_side_effects(t)&&!e.right.has_side_effects(t)}function reverse(t){if(reversible()){if(t)e.operator=t;var n=e.left;e.left=e.right;e.right=n}}if(Wn.has(e.operator)){if(e.right.is_constant()&&!e.left.is_constant()){if(!(e.left instanceof Qe&&M[e.left.operator]>=M[e.operator])){reverse()}}}e=e.lift_sequences(t);if(t.option("comparisons"))switch(e.operator){case"===":case"!==":var n=true;if(e.left.is_string(t)&&e.right.is_string(t)||e.left.is_number(t)&&e.right.is_number(t)||e.left.is_boolean()&&e.right.is_boolean()||e.left.equivalent_to(e.right)){e.operator=e.operator.substr(0,2)}case"==":case"!=":if(!n&&is_undefined(e.left,t)){e.left=make_node(Gt,e.left)}else if(t.option("typeofs")&&e.left instanceof Bt&&e.left.value=="undefined"&&e.right instanceof $e&&e.right.operator=="typeof"){var i=e.right.expression;if(i instanceof Ot?i.is_declared(t):!(i instanceof He&&t.option("ie8"))){e.right=i;e.left=make_node(Ht,e.left).optimize(t);if(e.operator.length==2)e.operator+="="}}else if(e.left instanceof Ot&&e.right instanceof Ot&&e.left.definition()===e.right.definition()&&is_object(e.left.fixed_value())){return make_node(e.operator[0]=="="?$t:jt,e)}break;case"&&":case"||":var r=e.left;if(r.operator==e.operator){r=r.right}if(r instanceof Qe&&r.operator==(e.operator=="&&"?"!==":"===")&&e.right instanceof Qe&&r.operator==e.right.operator&&(is_undefined(r.left,t)&&e.right.left instanceof Gt||r.left instanceof Gt&&is_undefined(e.right.left,t))&&!r.right.has_side_effects(t)&&r.right.equivalent_to(e.right.right)){var a=make_node(Qe,e,{operator:r.operator.slice(0,-1),left:make_node(Gt,e),right:r.right});if(r!==e.left){a=make_node(Qe,e,{operator:e.operator,left:e.left.left,right:a})}return a}break}if(e.operator=="+"&&t.in_boolean_context()){var o=e.left.evaluate(t);var s=e.right.evaluate(t);if(o&&typeof o=="string"){return make_sequence(e,[e.right,make_node($t,e)]).optimize(t)}if(s&&typeof s=="string"){return make_sequence(e,[e.left,make_node($t,e)]).optimize(t)}}if(t.option("comparisons")&&e.is_boolean()){if(!(t.parent()instanceof Qe)||t.parent()instanceof et){var u=make_node($e,e,{operator:"!",expression:e.negate(t,first_in_statement(t))});e=best_of(t,e,u)}if(t.option("unsafe_comps")){switch(e.operator){case"<":reverse(">");break;case"<=":reverse(">=");break}}}if(e.operator=="+"){if(e.right instanceof Bt&&e.right.getValue()==""&&e.left.is_string(t)){return e.left}if(e.left instanceof Bt&&e.left.getValue()==""&&e.right.is_string(t)){return e.right}if(e.left instanceof Qe&&e.left.operator=="+"&&e.left.left instanceof Bt&&e.left.left.getValue()==""&&e.right.is_string(t)){e.left=e.left.right;return e}}if(t.option("evaluate")){switch(e.operator){case"&&":var o=wn(e.left,kn)?true:wn(e.left,Sn)?false:e.left.evaluate(t);if(!o){return maintain_this_binding(t.parent(),t.self(),e.left).optimize(t)}else if(!(o instanceof U)){return make_sequence(e,[e.left,e.right]).optimize(t)}var s=e.right.evaluate(t);if(!s){if(t.in_boolean_context()){return make_sequence(e,[e.left,make_node(jt,e)]).optimize(t)}else{Mn(e,Sn)}}else if(!(s instanceof U)){var c=t.parent();if(c.operator=="&&"&&c.left===t.self()||t.in_boolean_context()){return e.left.optimize(t)}}if(e.left.operator=="||"){var l=e.left.right.evaluate(t);if(!l)return make_node(Je,e,{condition:e.left.left,consequent:e.right,alternative:e.left.right}).optimize(t)}break;case"||":var o=wn(e.left,kn)?true:wn(e.left,Sn)?false:e.left.evaluate(t);if(!o){return make_sequence(e,[e.left,e.right]).optimize(t)}else if(!(o instanceof U)){return maintain_this_binding(t.parent(),t.self(),e.left).optimize(t)}var s=e.right.evaluate(t);if(!s){var c=t.parent();if(c.operator=="||"&&c.left===t.self()||t.in_boolean_context()){return e.left.optimize(t)}}else if(!(s instanceof U)){if(t.in_boolean_context()){return make_sequence(e,[e.left,make_node($t,e)]).optimize(t)}else{Mn(e,kn)}}if(e.left.operator=="&&"){var l=e.left.right.evaluate(t);if(l&&!(l instanceof U))return make_node(Je,e,{condition:e.left.left,consequent:e.left.right,alternative:e.right}).optimize(t)}break;case"??":if(is_nullish(e.left)){return e.right}var o=e.left.evaluate(t);if(!(o instanceof U)){return o==null?e.right:e.left}if(t.in_boolean_context()){const n=e.right.evaluate(t);if(!(n instanceof U)&&!n){return e.left}}}var f=true;switch(e.operator){case"+":if(e.right instanceof Lt&&e.left instanceof Qe&&e.left.operator=="+"&&e.left.is_string(t)){var p=make_node(Qe,e,{operator:"+",left:e.left.right,right:e.right});var _=p.optimize(t);if(p!==_){e=make_node(Qe,e,{operator:"+",left:e.left.left,right:_})}}if(e.left instanceof Qe&&e.left.operator=="+"&&e.left.is_string(t)&&e.right instanceof Qe&&e.right.operator=="+"&&e.right.is_string(t)){var p=make_node(Qe,e,{operator:"+",left:e.left.right,right:e.right.left});var h=p.optimize(t);if(p!==h){e=make_node(Qe,e,{operator:"+",left:make_node(Qe,e.left,{operator:"+",left:e.left.left,right:h}),right:e.right.right})}}if(e.right instanceof $e&&e.right.operator=="-"&&e.left.is_number(t)){e=make_node(Qe,e,{operator:"-",left:e.left,right:e.right.expression});break}if(e.left instanceof $e&&e.left.operator=="-"&&reversible()&&e.right.is_number(t)){e=make_node(Qe,e,{operator:"-",left:e.right,right:e.left.expression});break}if(e.left instanceof he){var d=e.left;var _=e.right.evaluate(t);if(_!=e.right){d.segments[d.segments.length-1].value+=String(_);return d}}if(e.right instanceof he){var _=e.right;var d=e.left.evaluate(t);if(d!=e.left){_.segments[0].value=String(d)+_.segments[0].value;return _}}if(e.left instanceof he&&e.right instanceof he){var d=e.left;var m=d.segments;var _=e.right;m[m.length-1].value+=_.segments[0].value;for(var E=1;E<_.segments.length;E++){m.push(_.segments[E])}return d}case"*":f=t.option("unsafe_math");case"&":case"|":case"^":if(e.left.is_number(t)&&e.right.is_number(t)&&reversible()&&!(e.left instanceof Qe&&e.left.operator!=e.operator&&M[e.left.operator]>=M[e.operator])){var g=make_node(Qe,e,{operator:e.operator,left:e.right,right:e.left});if(e.right instanceof Lt&&!(e.left instanceof Lt)){e=best_of(t,g,e)}else{e=best_of(t,e,g)}}if(f&&e.is_number(t)){if(e.right instanceof Qe&&e.right.operator==e.operator){e=make_node(Qe,e,{operator:e.operator,left:make_node(Qe,e.left,{operator:e.operator,left:e.left,right:e.right.left,start:e.left.start,end:e.right.left.end}),right:e.right.right})}if(e.right instanceof Lt&&e.left instanceof Qe&&e.left.operator==e.operator){if(e.left.left instanceof Lt){e=make_node(Qe,e,{operator:e.operator,left:make_node(Qe,e.left,{operator:e.operator,left:e.left.left,right:e.right,start:e.left.left.start,end:e.right.end}),right:e.left.right})}else if(e.left.right instanceof Lt){e=make_node(Qe,e,{operator:e.operator,left:make_node(Qe,e.left,{operator:e.operator,left:e.left.right,right:e.right,start:e.left.right.start,end:e.right.end}),right:e.left.left})}}if(e.left instanceof Qe&&e.left.operator==e.operator&&e.left.right instanceof Lt&&e.right instanceof Qe&&e.right.operator==e.operator&&e.right.left instanceof Lt){e=make_node(Qe,e,{operator:e.operator,left:make_node(Qe,e.left,{operator:e.operator,left:make_node(Qe,e.left.left,{operator:e.operator,left:e.left.right,right:e.right.left,start:e.left.right.start,end:e.right.left.end}),right:e.left.left}),right:e.right.right})}}}}if(e.right instanceof Qe&&e.right.operator==e.operator&&(Ln.has(e.operator)||e.operator=="+"&&(e.right.left.is_string(t)||e.left.is_string(t)&&e.right.right.is_string(t)))){e.left=make_node(Qe,e.left,{operator:e.operator,left:e.left.transform(t),right:e.right.left.transform(t)});e.right=e.right.right.transform(t);return e.transform(t)}var v=e.evaluate(t);if(v!==e){v=make_node_from_constant(v,e).optimize(t);return best_of(t,v,e)}return e});def_optimize(wt,function(e){return e});function recursive_ref(e,t){var n;for(var i=0;n=e.parent(i);i++){if(n instanceof se||n instanceof ct){var r=n.name;if(r&&r.definition()===t)break}}return n}function within_array_or_object_literal(e){var t,n=0;while(t=e.parent(n++)){if(t instanceof z)return false;if(t instanceof nt||t instanceof at||t instanceof it){return true}}return false}def_optimize(Ot,function(e,t){if(!t.option("ie8")&&is_undeclared_ref(e)&&!t.find_parent(ie)){switch(e.name){case"undefined":return make_node(Ht,e).optimize(t);case"NaN":return make_node(Xt,e).optimize(t);case"Infinity":return make_node(qt,e).optimize(t)}}const n=t.parent();if(t.option("reduce_vars")&&is_lhs(e,n)!==e){const a=e.definition();const o=find_scope(t);if(t.top_retain&&a.global&&t.top_retain(a)){a.fixed=false;a.single_use=false;return e}let s=e.fixed_value();let u=a.single_use&&!(n instanceof Ke&&n.is_expr_pure(t)||has_annotation(n,en))&&!(n instanceof ze&&s instanceof se&&s.name);if(u&&(s instanceof se||s instanceof ct)){if(retain_top_func(s,t)){u=false}else if(a.scope!==e.scope&&(a.escaped==1||wn(s,An)||within_array_or_object_literal(t))){u=false}else if(recursive_ref(t,a)){u=false}else if(a.scope!==e.scope||a.orig[0]instanceof Dt){u=s.is_constant_expression(e.scope);if(u=="f"){var i=e.scope;do{if(i instanceof fe||is_func_expr(i)){Mn(i,An)}}while(i=i.parent_scope)}}}if(u&&s instanceof se){u=a.scope===e.scope&&!scope_encloses_variables_in_this_scope(o,s)||n instanceof Ke&&n.expression===e&&!scope_encloses_variables_in_this_scope(o,s)&&!(s.name&&s.name.definition().recursive_refs>0)}if(u&&s instanceof ct){const e=!s.extends||!s.extends.may_throw(t)&&!s.extends.has_side_effects(t);u=e&&!s.properties.some(e=>e.may_throw(t)||e.has_side_effects(t))}if(u&&s){if(s instanceof ft){Mn(s,Rn);s=make_node(pt,s,s)}if(s instanceof fe){Mn(s,Rn);s=make_node(ce,s,s)}if(a.recursive_refs>0&&s.name instanceof bt){const e=s.name.definition();let t=s.variables.get(s.name.name);let n=t&&t.orig[0];if(!(n instanceof St)){n=make_node(St,s.name,s.name);n.scope=s;s.name=n;t=s.def_function(n)}walk(s,n=>{if(n instanceof Ot&&n.definition()===e){n.thedef=t;t.references.push(n)}})}if((s instanceof se||s instanceof ct)&&s.parent_scope!==o){s=s.clone(true,t.get_toplevel());o.add_child_scope(s)}return s.optimize(t)}if(s){let n;if(s instanceof It){if(!(a.orig[0]instanceof Dt)&&a.references.every(e=>a.scope===e.scope)){n=s}}else{var r=s.evaluate(t);if(r!==s&&(t.option("unsafe_regexp")||!(r instanceof RegExp))){n=make_node_from_constant(r,s)}}if(n){const i=e.size(t);const r=n.size(t);let o=0;if(t.option("unused")&&!t.exposed(a)){o=(i+2+r)/(a.references.length-a.assignments)}if(r<=i+o){return n}}}}return e});function scope_encloses_variables_in_this_scope(e,t){for(const n of t.enclosed){if(t.variables.has(n.name)){continue}const i=e.find_variable(n.name);if(i){if(i===n)continue;return true}}return false}function is_atomic(e,t){return e instanceof Ot||e.TYPE===t.TYPE}def_optimize(Ht,function(e,t){if(t.option("unsafe_undefined")){var n=find_variable(t,"undefined");if(n){var i=make_node(Ot,e,{name:"undefined",scope:n.scope,thedef:n});Mn(i,Tn);return i}}var r=is_lhs(t.self(),t.parent());if(r&&is_atomic(r,e))return e;return make_node($e,e,{operator:"void",expression:make_node(Vt,e,{value:0})})});def_optimize(qt,function(e,t){var n=is_lhs(t.self(),t.parent());if(n&&is_atomic(n,e))return e;if(t.option("keep_infinity")&&!(n&&!is_atomic(n,e))&&!find_variable(t,"Infinity")){return e}return make_node(Qe,e,{operator:"/",left:make_node(Vt,e,{value:1}),right:make_node(Vt,e,{value:0})})});def_optimize(Xt,function(e,t){var n=is_lhs(t.self(),t.parent());if(n&&!is_atomic(n,e)||find_variable(t,"NaN")){return make_node(Qe,e,{operator:"/",left:make_node(Vt,e,{value:0}),right:make_node(Vt,e,{value:0})})}return e});function is_reachable(e,t){const n=e=>{if(e instanceof Ot&&member(e.definition(),t)){return Zt}};return walk_parent(e,(t,i)=>{if(t instanceof re&&t!==e){var r=i.parent();if(r instanceof Ke&&r.expression===t)return;if(walk(t,n))return Zt;return true}})}const qn=makePredicate("+ - / * % >> << >>> | ^ &");const Yn=makePredicate("* | ^ &");def_optimize(et,function(e,t){if(e.logical){return e.lift_sequences(t)}var n;if(t.option("dead_code")&&e.left instanceof Ot&&(n=e.left.definition()).scope===t.find_parent(se)){var i=0,r,a=e;do{r=a;a=t.parent(i++);if(a instanceof Ee){if(in_try(i,a))break;if(is_reachable(n.scope,[n]))break;if(e.operator=="=")return e.right;n.fixed=false;return make_node(Qe,e,{operator:e.operator.slice(0,-1),left:e.left,right:e.right}).optimize(t)}}while(a instanceof Qe&&a.right===r||a instanceof Xe&&a.tail_node()===r)}e=e.lift_sequences(t);if(e.operator=="="&&e.left instanceof Ot&&e.right instanceof Qe){if(e.right.left instanceof Ot&&e.right.left.name==e.left.name&&qn.has(e.right.operator)){e.operator=e.right.operator+"=";e.right=e.right.right}else if(e.right.right instanceof Ot&&e.right.right.name==e.left.name&&Yn.has(e.right.operator)&&!e.right.left.has_side_effects(t)){e.operator=e.right.operator+"=";e.right=e.right.left}}return e;function in_try(n,i){var r=e.right;e.right=make_node(Gt,r);var a=i.may_throw(t);e.right=r;var o=e.left.definition().scope;var s;while((s=t.parent(n++))!==o){if(s instanceof Fe){if(s.bfinally)return true;if(a&&s.bcatch)return true}}}});def_optimize(tt,function(e,t){if(!t.option("evaluate")){return e}var n=e.right.evaluate(t);if(n===undefined){e=e.left}else if(n!==e.right){n=make_node_from_constant(n,e.right);e.right=best_of_expression(n,e.right)}return e});function is_nullish(e){let t;return e instanceof Gt||is_undefined(e)||e instanceof Ot&&(t=e.definition().fixed)instanceof U&&is_nullish(t)||e instanceof He&&e.optional&&is_nullish(e.expression)||e instanceof Ke&&e.optional&&is_nullish(e.expression)||e instanceof Ye&&is_nullish(e.expression)}function is_nullish_check(e,t,n){if(t.may_throw(n))return false;let i;if(e instanceof Qe&&e.operator==="=="&&((i=is_nullish(e.left)&&e.left)||(i=is_nullish(e.right)&&e.right))&&(i===e.left?e.right:e.left).equivalent_to(t)){return true}if(e instanceof Qe&&e.operator==="||"){let n;let i;const r=e=>{if(!(e instanceof Qe&&(e.operator==="==="||e.operator==="=="))){return false}let r=0;let a;if(e.left instanceof Gt){r++;n=e;a=e.right}if(e.right instanceof Gt){r++;n=e;a=e.left}if(is_undefined(e.left)){r++;i=e;a=e.right}if(is_undefined(e.right)){r++;i=e;a=e.left}if(r!==1){return false}if(!a.equivalent_to(t)){return false}return true};if(!r(e.left))return false;if(!r(e.right))return false;if(n&&i&&n!==i){return true}}return false}def_optimize(Je,function(e,t){if(!t.option("conditionals"))return e;if(e.condition instanceof Xe){var n=e.condition.expressions.slice();e.condition=n.pop();n.push(e);return make_sequence(e,n)}var i=e.condition.evaluate(t);if(i!==e.condition){if(i){return maintain_this_binding(t.parent(),t.self(),e.consequent)}else{return maintain_this_binding(t.parent(),t.self(),e.alternative)}}var r=i.negate(t,first_in_statement(t));if(best_of(t,i,r)===r){e=make_node(Je,e,{condition:r,consequent:e.alternative,alternative:e.consequent})}var a=e.condition;var o=e.consequent;var s=e.alternative;if(a instanceof Ot&&o instanceof Ot&&a.definition()===o.definition()){return make_node(Qe,e,{operator:"||",left:a,right:s})}if(o instanceof et&&s instanceof et&&o.operator===s.operator&&o.logical===s.logical&&o.left.equivalent_to(s.left)&&(!e.condition.has_side_effects(t)||o.operator=="="&&!o.left.has_side_effects(t))){return make_node(et,e,{operator:o.operator,left:o.left,logical:o.logical,right:make_node(Je,e,{condition:e.condition,consequent:o.right,alternative:s.right})})}var u;if(o instanceof Ke&&s.TYPE===o.TYPE&&o.args.length>0&&o.args.length==s.args.length&&o.expression.equivalent_to(s.expression)&&!e.condition.has_side_effects(t)&&!o.expression.has_side_effects(t)&&typeof(u=single_arg_diff())=="number"){var c=o.clone();c.args[u]=make_node(Je,e,{condition:e.condition,consequent:o.args[u],alternative:s.args[u]});return c}if(s instanceof Je&&o.equivalent_to(s.consequent)){return make_node(Je,e,{condition:make_node(Qe,e,{operator:"||",left:a,right:s.condition}),consequent:o,alternative:s.alternative}).optimize(t)}if(t.option("ecma")>=2020&&is_nullish_check(a,s,t)){return make_node(Qe,e,{operator:"??",left:s,right:o}).optimize(t)}if(s instanceof Xe&&o.equivalent_to(s.expressions[s.expressions.length-1])){return make_sequence(e,[make_node(Qe,e,{operator:"||",left:a,right:make_sequence(e,s.expressions.slice(0,-1))}),o]).optimize(t)}if(s instanceof Qe&&s.operator=="&&"&&o.equivalent_to(s.right)){return make_node(Qe,e,{operator:"&&",left:make_node(Qe,e,{operator:"||",left:a,right:s.left}),right:o}).optimize(t)}if(o instanceof Je&&o.alternative.equivalent_to(s)){return make_node(Je,e,{condition:make_node(Qe,e,{left:e.condition,operator:"&&",right:o.condition}),consequent:o.consequent,alternative:s})}if(o.equivalent_to(s)){return make_sequence(e,[e.condition,o]).optimize(t)}if(o instanceof Qe&&o.operator=="||"&&o.right.equivalent_to(s)){return make_node(Qe,e,{operator:"||",left:make_node(Qe,e,{operator:"&&",left:e.condition,right:o.left}),right:s}).optimize(t)}var l=t.in_boolean_context();if(is_true(e.consequent)){if(is_false(e.alternative)){return booleanize(e.condition)}return make_node(Qe,e,{operator:"||",left:booleanize(e.condition),right:e.alternative})}if(is_false(e.consequent)){if(is_true(e.alternative)){return booleanize(e.condition.negate(t))}return make_node(Qe,e,{operator:"&&",left:booleanize(e.condition.negate(t)),right:e.alternative})}if(is_true(e.alternative)){return make_node(Qe,e,{operator:"||",left:booleanize(e.condition.negate(t)),right:e.consequent})}if(is_false(e.alternative)){return make_node(Qe,e,{operator:"&&",left:booleanize(e.condition),right:e.consequent})}return e;function booleanize(e){if(e.is_boolean())return e;return make_node($e,e,{operator:"!",expression:e.negate(t)})}function is_true(e){return e instanceof $t||l&&e instanceof Lt&&e.getValue()||e instanceof $e&&e.operator=="!"&&e.expression instanceof Lt&&!e.expression.getValue()}function is_false(e){return e instanceof jt||l&&e instanceof Lt&&!e.getValue()||e instanceof $e&&e.operator=="!"&&e.expression instanceof Lt&&e.expression.getValue()}function single_arg_diff(){var e=o.args;var t=s.args;for(var n=0,i=e.length;n=2015;var i=this.expression;if(i instanceof it){var r=i.properties;for(var a=r.length;--a>=0;){var o=r[a];if(""+(o instanceof ut?o.key.name:o.key)==e){if(!r.every(e=>{return e instanceof at||n&&e instanceof ut&&!e.is_generator}))break;if(!safe_to_flatten(o.value,t))break;return make_node(qe,this,{expression:make_node(nt,i,{elements:r.map(function(e){var t=e.value;if(t instanceof ue)t=make_node(ce,t,t);var n=e.key;if(n instanceof U&&!(n instanceof yt)){return make_sequence(e,[n,t])}return t})}),property:make_node(Vt,this,{value:a})})}}}});def_optimize(qe,function(e,t){var n=e.expression;var i=e.property;if(t.option("properties")){var r=i.evaluate(t);if(r!==i){if(typeof r=="string"){if(r=="undefined"){r=undefined}else{var a=parseFloat(r);if(a.toString()==r){r=a}}}i=e.property=best_of_expression(i,make_node_from_constant(r,i).transform(t));var o=""+r;if(is_basic_identifier_string(o)&&o.length<=i.size()+1){return make_node(We,e,{expression:n,optional:e.optional,property:o,quote:i.quote}).optimize(t)}}}var s;e:if(t.option("arguments")&&n instanceof Ot&&n.name=="arguments"&&n.definition().orig.length==1&&(s=n.scope)instanceof se&&s.uses_arguments&&!(s instanceof le)&&i instanceof Vt){var u=i.getValue();var c=new Set;var l=s.argnames;for(var f=0;f1){_=null}}else if(!_&&!t.option("keep_fargs")&&u=s.argnames.length){_=s.create_symbol(Dt,{source:s,scope:s,tentative_name:"argument_"+s.argnames.length});s.argnames.push(_)}}if(_){var d=make_node(Ot,e,_);d.reference({});Nn(_,yn);return d}}if(is_lhs(e,t.parent()))return e;if(r!==i){var m=e.flatten_object(o,t);if(m){n=e.expression=m.expression;i=e.property=m.property}}if(t.option("properties")&&t.option("side_effects")&&i instanceof Vt&&n instanceof nt){var u=i.getValue();var E=n.elements;var g=E[u];e:if(safe_to_flatten(g,t)){var v=true;var D=[];for(var b=E.length;--b>u;){var a=E[b].drop_side_effect_free(t);if(a){D.unshift(a);if(v&&a.has_side_effects(t))v=false}}if(g instanceof oe)break e;g=g instanceof Wt?make_node(Ht,g):g;if(!v)D.unshift(g);while(--b>=0){var a=E[b];if(a instanceof oe)break e;a=a.drop_side_effect_free(t);if(a)D.unshift(a);else u--}if(v){D.push(g);return make_sequence(e,D).optimize(t)}else return make_node(qe,e,{expression:make_node(nt,n,{elements:D}),property:make_node(Vt,i,{value:u})})}}var y=e.evaluate(t);if(y!==e){y=make_node_from_constant(y,e).optimize(t);return best_of(t,y,e)}if(e.optional&&is_nullish(e.expression)){return make_node(Ht,e)}return e});def_optimize(Ye,function(e,t){e.expression=e.expression.optimize(t);return e});se.DEFMETHOD("contains_this",function(){return walk(this,e=>{if(e instanceof It)return Zt;if(e!==this&&e instanceof re&&!(e instanceof le)){return true}})});def_optimize(We,function(e,t){const n=t.parent();if(is_lhs(e,n))return e;if(t.option("unsafe_proto")&&e.expression instanceof We&&e.expression.property=="prototype"){var i=e.expression.expression;if(is_undeclared_ref(i))switch(i.name){case"Array":e.expression=make_node(nt,e.expression,{elements:[]});break;case"Function":e.expression=make_node(ce,e.expression,{argnames:[],body:[]});break;case"Number":e.expression=make_node(Vt,e.expression,{value:0});break;case"Object":e.expression=make_node(it,e.expression,{properties:[]});break;case"RegExp":e.expression=make_node(zt,e.expression,{value:{source:"t",flags:""}});break;case"String":e.expression=make_node(Bt,e.expression,{value:""});break}}if(!(n instanceof Ke)||!has_annotation(n,en)){const n=e.flatten_object(e.property,t);if(n)return n.optimize(t)}let r=e.evaluate(t);if(r!==e){r=make_node_from_constant(r,e).optimize(t);return best_of(t,r,e)}if(e.optional&&is_nullish(e.expression)){return make_node(Ht,e)}return e});function literals_in_boolean_context(e,t){if(t.in_boolean_context()){return best_of(t,e,make_sequence(e,[e,make_node($t,e)]).optimize(t))}return e}function inline_array_like_spread(e){for(var t=0;te instanceof Wt)){e.splice(t,1,...i.elements);t--}}}}def_optimize(nt,function(e,t){var n=literals_in_boolean_context(e,t);if(n!==e){return n}inline_array_like_spread(e.elements);return e});function inline_object_prop_spread(e){for(var t=0;te instanceof at)){e.splice(t,1,...i.properties);t--}else if(i instanceof Lt&&!(i instanceof Bt)){e.splice(t,1)}}}}def_optimize(it,function(e,t){var n=literals_in_boolean_context(e,t);if(n!==e){return n}inline_object_prop_spread(e.properties);return e});def_optimize(zt,literals_in_boolean_context);def_optimize(ge,function(e,t){if(e.value&&is_undefined(e.value,t)){e.value=null}return e});def_optimize(le,opt_AST_Lambda);def_optimize(ce,function(e,t){e=opt_AST_Lambda(e,t);if(t.option("unsafe_arrows")&&t.option("ecma")>=2015&&!e.name&&!e.is_generator&&!e.uses_arguments&&!e.pinned()){const n=walk(e,e=>{if(e instanceof It)return Zt});if(!n)return make_node(le,e,e).optimize(t)}return e});def_optimize(ct,function(e){return e});def_optimize(Se,function(e,t){if(e.expression&&!e.is_star&&is_undefined(e.expression,t)){e.expression=null}return e});def_optimize(he,function(e,t){if(!t.option("evaluate")||t.parent()instanceof _e){return e}var n=[];for(var i=0;i=2015&&(!(n instanceof RegExp)||n.test(e.key+""))){var i=e.key;var r=e.value;var a=r instanceof le&&Array.isArray(r.body)&&!r.contains_this();if((a||r instanceof ce)&&!r.name){return make_node(ut,e,{async:r.async,is_generator:r.is_generator,key:i instanceof U?i:make_node(yt,e,{name:i}),value:make_node(ue,r,r),quote:e.quote})}}return e});def_optimize(pe,function(e,t){if(t.option("pure_getters")==true&&t.option("unused")&&!e.is_array&&Array.isArray(e.names)&&!is_destructuring_export_decl(t)&&!(e.names[e.names.length-1]instanceof oe)){var n=[];for(var i=0;i1)throw new Error("inline source map only works with singular input");t.sourceMap.content=read_source_map(e[a])}}r=t.parse.toplevel}if(i&&t.mangle.properties.keep_quoted!=="strict"){reserve_quoted_keys(r,i)}if(t.wrap){r=r.wrap_commonjs(t.wrap)}if(t.enclose){r=r.wrap_enclose(t.enclose)}if(n)n.rename=Date.now();if(n)n.compress=Date.now();if(t.compress){r=new Compressor(t.compress,{mangle_options:t.mangle}).compress(r)}if(n)n.scope=Date.now();if(t.mangle)r.figure_out_scope(t.mangle);if(n)n.mangle=Date.now();if(t.mangle){dn.reset();r.compute_char_frequency(t.mangle);r.mangle_names(t.mangle)}if(n)n.properties=Date.now();if(t.mangle&&t.mangle.properties){r=mangle_properties(r,t.mangle.properties)}if(n)n.format=Date.now();var o={};if(t.format.ast){o.ast=r}if(!HOP(t.format,"code")||t.format.code){if(t.sourceMap){t.format.source_map=await SourceMap({file:t.sourceMap.filename,orig:t.sourceMap.content,root:t.sourceMap.root});if(t.sourceMap.includeSources){if(e instanceof ae){throw new Error("original source content unavailable")}else for(var a in e)if(HOP(e,a)){t.format.source_map.get().setSourceContent(a,e[a])}}}delete t.format.ast;delete t.format.code;var s=OutputStream(t.format);r.print(s);o.code=s.get();if(t.sourceMap){if(t.sourceMap.asObject){o.map=t.format.source_map.get().toJSON()}else{o.map=t.format.source_map.toString()}if(t.sourceMap.url=="inline"){var u=typeof o.map==="object"?JSON.stringify(o.map):o.map;o.code+="\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+Zn(u)}else if(t.sourceMap.url){o.code+="\n//# sourceMappingURL="+t.sourceMap.url}}}if(t.nameCache&&t.mangle){if(t.mangle.cache)t.nameCache.vars=cache_to_json(t.mangle.cache);if(t.mangle.properties&&t.mangle.properties.cache){t.nameCache.props=cache_to_json(t.mangle.properties.cache)}}if(t.format&&t.format.source_map){t.format.source_map.destroy()}if(n){n.end=Date.now();o.timings={parse:.001*(n.rename-n.parse),rename:.001*(n.compress-n.rename),compress:.001*(n.scope-n.compress),scope:.001*(n.mangle-n.scope),mangle:.001*(n.properties-n.mangle),properties:.001*(n.format-n.properties),format:.001*(n.end-n.format),total:.001*(n.end-n.start)}}return o}async function run_cli({program:e,packageJson:t,fs:i,path:r}){const a=new Set(["cname","parent_scope","scope","uses_eval","uses_with"]);var o={};var s={compress:false,mangle:false};const u=await _default_options();e.version(t.name+" "+t.version);e.parseArgv=e.parse;e.parse=undefined;if(process.argv.includes("ast"))e.helpInformation=describe_ast;else if(process.argv.includes("options"))e.helpInformation=function(){var e=[];for(var t in u){e.push("--"+(t==="sourceMap"?"source-map":t)+" options:");e.push(format_object(u[t]));e.push("")}return e.join("\n")};e.option("-p, --parse ","Specify parser options.",parse_js());e.option("-c, --compress [options]","Enable compressor/specify compressor options.",parse_js());e.option("-m, --mangle [options]","Mangle names/specify mangler options.",parse_js());e.option("--mangle-props [options]","Mangle properties/specify mangler options.",parse_js());e.option("-f, --format [options]","Format options.",parse_js());e.option("-b, --beautify [options]","Alias for --format beautify=true.",parse_js());e.option("-o, --output ","Output file (default STDOUT).");e.option("--comments [filter]","Preserve copyright comments in the output.");e.option("--config-file ","Read minify() options from JSON file.");e.option("-d, --define [=value]","Global definitions.",parse_js("define"));e.option("--ecma ","Specify ECMAScript release: 5, 2015, 2016 or 2017...");e.option("-e, --enclose [arg[,...][:value[,...]]]","Embed output in a big function with configurable arguments and values.");e.option("--ie8","Support non-standard Internet Explorer 8.");e.option("--keep-classnames","Do not mangle/drop class names.");e.option("--keep-fnames","Do not mangle/drop function names. Useful for code relying on Function.prototype.name.");e.option("--module","Input is an ES6 module");e.option("--name-cache ","File to hold mangled name mappings.");e.option("--rename","Force symbol expansion.");e.option("--no-rename","Disable symbol expansion.");e.option("--safari10","Support non-standard Safari 10.");e.option("--source-map [options]","Enable source map/specify source map options.",parse_js());e.option("--timings","Display operations run time on STDERR.");e.option("--toplevel","Compress and/or mangle variables in toplevel scope.");e.option("--wrap ","Embed everything as a function with “exports” corresponding to “name” globally.");e.arguments("[files...]").parseArgv(process.argv);if(e.configFile){s=JSON.parse(read_file(e.configFile))}if(!e.output&&e.sourceMap&&e.sourceMap.url!="inline"){fatal("ERROR: cannot write source map to STDOUT")}["compress","enclose","ie8","mangle","module","safari10","sourceMap","toplevel","wrap"].forEach(function(t){if(t in e){s[t]=e[t]}});if("ecma"in e){if(e.ecma!=(e.ecma|0))fatal("ERROR: ecma must be an integer");const t=e.ecma|0;if(t>5&&t<2015)s.ecma=t+2009;else s.ecma=t}if(e.beautify||e.format){if(e.beautify&&e.format){fatal("Please only specify one of --beautify or --format")}if(e.beautify){s.format=typeof e.beautify=="object"?e.beautify:{};if(!("beautify"in s.format)){s.format.beautify=true}}if(e.format){s.format=typeof e.format=="object"?e.format:{}}}if(e.comments){if(typeof s.format!="object")s.format={};s.format.comments=typeof e.comments=="string"?e.comments=="false"?false:e.comments:"some"}if(e.define){if(typeof s.compress!="object")s.compress={};if(typeof s.compress.global_defs!="object")s.compress.global_defs={};for(var c in e.define){s.compress.global_defs[c]=e.define[c]}}if(e.keepClassnames){s.keep_classnames=true}if(e.keepFnames){s.keep_fnames=true}if(e.mangleProps){if(e.mangleProps.domprops){delete e.mangleProps.domprops}else{if(typeof e.mangleProps!="object")e.mangleProps={};if(!Array.isArray(e.mangleProps.reserved))e.mangleProps.reserved=[]}if(typeof s.mangle!="object")s.mangle={};s.mangle.properties=e.mangleProps}if(e.nameCache){s.nameCache=JSON.parse(read_file(e.nameCache,"{}"))}if(e.output=="ast"){s.format={ast:true,code:false}}if(e.parse){if(!e.parse.acorn&&!e.parse.spidermonkey){s.parse=e.parse}else if(e.sourceMap&&e.sourceMap.content=="inline"){fatal("ERROR: inline source map only works with built-in parser")}}if(~e.rawArgs.indexOf("--rename")){s.rename=true}else if(!e.rename){s.rename=false}let l=e=>e;if(typeof e.sourceMap=="object"&&"base"in e.sourceMap){l=function(){var t=e.sourceMap.base;delete s.sourceMap.base;return function(e){return r.relative(t,e)}}()}let f;if(s.files&&s.files.length){f=s.files;delete s.files}else if(e.args.length){f=e.args}if(f){simple_glob(f).forEach(function(e){o[l(e)]=read_file(e)})}else{await new Promise(e=>{var t=[];process.stdin.setEncoding("utf8");process.stdin.on("data",function(e){t.push(e)}).on("end",function(){o=[t.join("")];e()});process.stdin.resume()})}await run_cli();function convert_ast(e){return U.from_mozilla_ast(Object.keys(o).reduce(e,null))}async function run_cli(){var t=e.sourceMap&&e.sourceMap.content;if(t&&t!=="inline"){s.sourceMap.content=read_file(t,t)}if(e.timings)s.timings=true;try{if(e.parse){if(e.parse.acorn){o=convert_ast(function(t,i){return n(89).parse(o[i],{ecmaVersion:2018,locations:true,program:t,sourceFile:i,sourceType:s.module||e.parse.module?"module":"script"})})}else if(e.parse.spidermonkey){o=convert_ast(function(e,t){var n=JSON.parse(o[t]);if(!e)return n;e.body=e.body.concat(n.body);return e})}}}catch(e){fatal(e)}let r;try{r=await minify(o,s)}catch(e){if(e.name=="SyntaxError"){print_error("Parse error at "+e.filename+":"+e.line+","+e.col);var u=e.col;var c=o[e.filename].split(/\r?\n/);var l=c[e.line-1];if(!l&&!u){l=c[e.line-2];u=l.length}if(l){var f=70;if(u>f){l=l.slice(u-f);u=f}print_error(l.slice(0,80));print_error(l.slice(0,u).replace(/\S/g," ")+"^")}}if(e.defs){print_error("Supported options:");print_error(format_object(e.defs))}fatal(e);return}if(e.output=="ast"){if(!s.compress&&!s.mangle){r.ast.figure_out_scope({})}console.log(JSON.stringify(r.ast,function(e,t){if(t)switch(e){case"thedef":return symdef(t);case"enclosed":return t.length?t.map(symdef):undefined;case"variables":case"functions":case"globals":return t.size?collect_from_map(t,symdef):undefined}if(a.has(e))return;if(t instanceof AST_Token)return;if(t instanceof Map)return;if(t instanceof U){var n={_class:"AST_"+t.TYPE};if(t.block_scope){n.variables=t.block_scope.variables;n.functions=t.block_scope.functions;n.enclosed=t.block_scope.enclosed}t.CTOR.PROPS.forEach(function(e){n[e]=t[e]});return n}return t},2))}else if(e.output=="spidermonkey"){try{const e=await minify(r.code,{compress:false,mangle:false,format:{ast:true,code:false}});console.log(JSON.stringify(e.ast.to_mozilla_ast(),null,2))}catch(e){fatal(e);return}}else if(e.output){i.writeFileSync(e.output,r.code);if(s.sourceMap&&s.sourceMap.url!=="inline"&&r.map){i.writeFileSync(e.output+".map",r.map)}}else{console.log(r.code)}if(e.nameCache){i.writeFileSync(e.nameCache,JSON.stringify(s.nameCache))}if(r.timings)for(var p in r.timings){print_error("- "+p+": "+r.timings[p].toFixed(3)+"s")}}function fatal(e){if(e instanceof Error)e=e.stack.replace(/^\S*?Error:/,"ERROR:");print_error(e);process.exit(1)}function simple_glob(e){if(Array.isArray(e)){return[].concat.apply([],e.map(simple_glob))}if(e&&e.match(/[*?]/)){var t=r.dirname(e);try{var n=i.readdirSync(t)}catch(e){}if(n){var a="^"+r.basename(e).replace(/[.+^$[\]\\(){}]/g,"\\$&").replace(/\*/g,"[^/\\\\]*").replace(/\?/g,"[^/\\\\]")+"$";var o=process.platform==="win32"?"i":"";var s=new RegExp(a,o);var u=n.filter(function(e){return s.test(e)}).map(function(e){return r.join(t,e)});if(u.length)return u}}return[e]}function read_file(e,t){try{return i.readFileSync(e,"utf8")}catch(e){if((e.code=="ENOENT"||e.code=="ENAMETOOLONG")&&t!=null)return t;fatal(e)}}function parse_js(e){return function(t,n){n=n||{};try{walk(parse(t,{expression:true}),t=>{if(t instanceof et){var i=t.left.print_to_string();var r=t.right;if(e){n[i]=r}else if(r instanceof nt){n[i]=r.elements.map(to_string)}else if(r instanceof zt){r=r.value;n[i]=new RegExp(r.source,r.flags)}else{n[i]=to_string(r)}return true}if(t instanceof _t||t instanceof He){var i=t.print_to_string();n[i]=true;return true}if(!(t instanceof Xe))throw t;function to_string(e){return e instanceof Lt?e.getValue():e.print_to_string({quote_keys:true})}})}catch(i){if(e){fatal("Error parsing arguments for '"+e+"': "+t)}else{n[t]=null}}return n}}function symdef(e){var t=1e6+e.id+" "+e.name;if(e.mangled_name)t+=" "+e.mangled_name;return t}function collect_from_map(e,t){var n=[];e.forEach(function(e){n.push(t(e))});return n}function format_object(e){var t=[];var n="";Object.keys(e).map(function(t){if(n.length!/^\$/.test(e));if(n.length>0){e.space();e.with_parens(function(){n.forEach(function(t,n){if(n)e.space();e.print(t)})})}if(t.documentation){e.space();e.print_string(t.documentation)}if(t.SUBCLASSES.length>0){e.space();e.with_block(function(){t.SUBCLASSES.forEach(function(t){e.indent();doitem(t);e.newline()})})}}doitem(U);return e+"\n"}}async function _default_options(){const e={};Object.keys(infer_options({0:0})).forEach(t=>{const n=infer_options({[t]:{0:0}});if(n)e[t]=n});return e}async function infer_options(e){try{await minify("",e)}catch(e){return e.defs}}e._default_options=_default_options;e._run_cli=run_cli;e.minify=minify})},241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")}};var t={};function __nccwpck_require__(n){if(t[n]){return t[n].exports}var i=t[n]={exports:{}};var r=true;try{e[n].call(i.exports,i,i.exports,__nccwpck_require__);r=false}finally{if(r)delete t[n]}return i.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(845)})(); \ No newline at end of file diff --git a/packages/next/compiled/text-table/index.js b/packages/next/compiled/text-table/index.js index 94a19503dc2d0f2..ef8426b2078ca24 100644 --- a/packages/next/compiled/text-table/index.js +++ b/packages/next/compiled/text-table/index.js @@ -1 +1 @@ -module.exports=(()=>{var r={401:r=>{r.exports=function(r,n){if(!n)n={};var e=n.hsep===undefined?" ":n.hsep;var t=n.align||[];var a=n.stringLength||function(r){return String(r).length};var u=reduce(r,function(r,n){forEach(n,function(n,e){var t=dotindex(n);if(!r[e]||t>r[e])r[e]=t});return r},[]);var o=map(r,function(r){return map(r,function(r,n){var e=String(r);if(t[n]==="."){var o=dotindex(e);var f=u[n]+(/\./.test(e)?1:2)-(a(e)-o);return e+Array(f).join(" ")}else return e})});var f=reduce(o,function(r,n){forEach(n,function(n,e){var t=a(n);if(!r[e]||t>r[e])r[e]=t});return r},[]);return map(o,function(r){return map(r,function(r,n){var e=f[n]-a(r)||0;var u=Array(Math.max(e+1,1)).join(" ");if(t[n]==="r"||t[n]==="."){return u+r}if(t[n]==="c"){return Array(Math.ceil(e/2+1)).join(" ")+r+Array(Math.floor(e/2+1)).join(" ")}return r+u}).join(e).replace(/\s+$/,"")}).join("\n")};function dotindex(r){var n=/\.[^.]*$/.exec(r);return n?n.index+1:r.length}function reduce(r,n,e){if(r.reduce)return r.reduce(n,e);var t=0;var a=arguments.length>=3?e:r[t++];for(;t{var r={401:r=>{r.exports=function(r,n){if(!n)n={};var e=n.hsep===undefined?" ":n.hsep;var t=n.align||[];var a=n.stringLength||function(r){return String(r).length};var u=reduce(r,function(r,n){forEach(n,function(n,e){var t=dotindex(n);if(!r[e]||t>r[e])r[e]=t});return r},[]);var o=map(r,function(r){return map(r,function(r,n){var e=String(r);if(t[n]==="."){var o=dotindex(e);var f=u[n]+(/\./.test(e)?1:2)-(a(e)-o);return e+Array(f).join(" ")}else return e})});var f=reduce(o,function(r,n){forEach(n,function(n,e){var t=a(n);if(!r[e]||t>r[e])r[e]=t});return r},[]);return map(o,function(r){return map(r,function(r,n){var e=f[n]-a(r)||0;var u=Array(Math.max(e+1,1)).join(" ");if(t[n]==="r"||t[n]==="."){return u+r}if(t[n]==="c"){return Array(Math.ceil(e/2+1)).join(" ")+r+Array(Math.floor(e/2+1)).join(" ")}return r+u}).join(e).replace(/\s+$/,"")}).join("\n")};function dotindex(r){var n=/\.[^.]*$/.exec(r);return n?n.index+1:r.length}function reduce(r,n,e){if(r.reduce)return r.reduce(n,e);var t=0;var a=arguments.length>=3?e:r[t++];for(;t{var e={664:function(e,n){(function(e,t){"use strict";true?t(n):0})(this,function(e){"use strict";var n=function noop(){};var t=function throwError(){throw new Error("Callback was already called.")};var r=5;var f=0;var u="object";var o="function";var a=Array.isArray;var i=Object.keys;var l=Array.prototype.push;var s=typeof Symbol===o&&Symbol.iterator;var h,c,y;createImmediate();var v=createEach(arrayEach,baseEach,symbolEach);var d=createMap(arrayEachIndex,baseEachIndex,symbolEachIndex,true);var p=createMap(arrayEachIndex,baseEachKey,symbolEachKey,false);var I=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,true);var g=createFilterSeries(true);var m=createFilterLimit(true);var W=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,false);var b=createFilterSeries(false);var w=createFilterLimit(false);var j=createDetect(arrayEachValue,baseEachValue,symbolEachValue,true);var C=createDetectSeries(true);var K=createDetectLimit(true);var L=createEvery(arrayEachValue,baseEachValue,symbolEachValue);var _=createEverySeries();var A=createEveryLimit();var O=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,true);var S=createPickSeries(true);var E=createPickLimit(true);var B=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,false);var D=createPickSeries(false);var P=createPickLimit(false);var N=createTransform(arrayEachResult,baseEachResult,symbolEachResult);var V=createSortBy(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue);var J=createConcat(arrayEachIndex,baseEachIndex,symbolEachIndex);var R=createGroupBy(arrayEachValue,baseEachValue,symbolEachValue);var q=createParallel(arrayEachFunc,baseEachFunc);var F=createApplyEach(d);var x=createApplyEach(mapSeries);var M=createLogger("log");var Q=createLogger("dir");var $={VERSION:"2.6.2",each:v,eachSeries:eachSeries,eachLimit:eachLimit,forEach:v,forEachSeries:eachSeries,forEachLimit:eachLimit,eachOf:v,eachOfSeries:eachSeries,eachOfLimit:eachLimit,forEachOf:v,forEachOfSeries:eachSeries,forEachOfLimit:eachLimit,map:d,mapSeries:mapSeries,mapLimit:mapLimit,mapValues:p,mapValuesSeries:mapValuesSeries,mapValuesLimit:mapValuesLimit,filter:I,filterSeries:g,filterLimit:m,select:I,selectSeries:g,selectLimit:m,reject:W,rejectSeries:b,rejectLimit:w,detect:j,detectSeries:C,detectLimit:K,find:j,findSeries:C,findLimit:K,pick:O,pickSeries:S,pickLimit:E,omit:B,omitSeries:D,omitLimit:P,reduce:reduce,inject:reduce,foldl:reduce,reduceRight:reduceRight,foldr:reduceRight,transform:N,transformSeries:transformSeries,transformLimit:transformLimit,sortBy:V,sortBySeries:sortBySeries,sortByLimit:sortByLimit,some:some,someSeries:someSeries,someLimit:someLimit,any:some,anySeries:someSeries,anyLimit:someLimit,every:L,everySeries:_,everyLimit:A,all:L,allSeries:_,allLimit:A,concat:J,concatSeries:concatSeries,concatLimit:concatLimit,groupBy:R,groupBySeries:groupBySeries,groupByLimit:groupByLimit,parallel:q,series:series,parallelLimit:parallelLimit,tryEach:tryEach,waterfall:waterfall,angelFall:angelFall,angelfall:angelFall,whilst:whilst,doWhilst:doWhilst,until:until,doUntil:doUntil,during:during,doDuring:doDuring,forever:forever,compose:compose,seq:seq,applyEach:F,applyEachSeries:x,queue:queue,priorityQueue:priorityQueue,cargo:cargo,auto:auto,autoInject:autoInject,retry:retry,retryable:retryable,iterator:iterator,times:times,timesSeries:timesSeries,timesLimit:timesLimit,race:race,apply:apply,nextTick:c,setImmediate:y,memoize:memoize,unmemoize:unmemoize,ensureAsync:ensureAsync,constant:constant,asyncify:asyncify,wrapSync:asyncify,log:M,dir:Q,reflect:reflect,reflectAll:reflectAll,timeout:timeout,createLogger:createLogger,safe:safe,fast:fast};e["default"]=$;baseEachSync($,function(n,t){e[t]=n},i($));function createImmediate(e){var n=function delay(e){var n=slice(arguments,1);setTimeout(function(){e.apply(null,n)})};y=typeof setImmediate===o?setImmediate:n;if(typeof process===u&&typeof process.nextTick===o){h=/^v0.10/.test(process.version)?y:process.nextTick;c=/^v0/.test(process.version)?y:process.nextTick}else{c=h=y}if(e===false){h=function(e){e()}}}function createArray(e){var n=-1;var t=e.length;var r=Array(t);while(++n=n&&e[o]>=r){o--}if(u>o){break}swap(e,f,u++,o--)}return u}function swap(e,n,t,r){var f=e[t];e[t]=e[r];e[r]=f;var u=n[t];n[t]=n[r];n[r]=u}function quickSort(e,n,t,r){if(n===t){return}var f=n;while(++f<=t&&e[n]===e[f]){var u=f-1;if(r[u]>r[f]){var o=r[u];r[u]=r[f];r[f]=o}}if(f>t){return}var a=e[n]>e[f]?n:f;f=partition(e,n,t,e[a],r);quickSort(e,n,f-1,r);quickSort(e,f,t,r)}function makeConcatResult(e){var t=[];arrayEachSync(e,function(e){if(e===n){return}if(a(e)){l.apply(t,e)}else{t.push(e)}});return t}function arrayEach(e,n,t){var r=-1;var f=e.length;if(n.length===3){while(++rc?c:f,m);function arrayIterator(){y=w++;if(yl?l:r,I);function arrayIterator(){if(ml?l:r,g);function arrayIterator(){c=W++;if(cl?l:r,I);function arrayIterator(){c=W++;if(cc?c:f,m);function arrayIterator(){y=b++;if(yc?c:f,m);function arrayIterator(){y=w++;if(yl?l:t,I);function arrayIterator(){c=W++;if(cl?l:r,W);function arrayIterator(){if(w=2){l.apply(g,slice(arguments,1))}if(e){f(e,g)}else if(++m===o){p=t;f(null,g)}else if(I){h(p)}else{I=true;p()}I=false}}function concatLimit(e,r,f,o){o=o||n;var l,c,y,v,d,p;var I=false;var g=0;var m=0;if(a(e)){l=e.length;d=f.length===3?arrayIteratorWithIndex:arrayIterator}else if(!e){}else if(s&&e[s]){l=Infinity;p=[];y=e[s]();d=f.length===3?symbolIteratorWithKey:symbolIterator}else if(typeof e===u){var W=i(e);l=W.length;d=f.length===3?objectIteratorWithKey:objectIterator}if(!l||isNaN(r)||r<1){return o(null,[])}p=p||Array(l);timesSync(r>l?l:r,d);function arrayIterator(){if(gl?l:r,g);function arrayIterator(){if(Wo?o:r,v);function arrayIterator(){l=p++;if(l1){var f=slice(arguments,1);return r.apply(this,f)}else{return r}}}function DLL(){this.head=null;this.tail=null;this.length=0}DLL.prototype._removeLink=function(e){var n=e.prev;var t=e.next;if(n){n.next=t}else{this.head=t}if(t){t.prev=n}else{this.tail=n}e.prev=null;e.next=null;this.length--;return e};DLL.prototype.empty=DLL;DLL.prototype._setInitial=function(e){this.length=1;this.head=this.tail=e};DLL.prototype.insertBefore=function(e,n){n.prev=e.prev;n.next=e;if(e.prev){e.prev.next=n}else{this.head=n}e.prev=n;this.length++};DLL.prototype.unshift=function(e){if(this.head){this.insertBefore(this.head,e)}else{this._setInitial(e)}};DLL.prototype.push=function(e){var n=this.tail;if(n){e.prev=n;e.next=n.next;this.tail=e;n.next=e;this.length++}else{this._setInitial(e)}};DLL.prototype.shift=function(){return this.head&&this._removeLink(this.head)};DLL.prototype.splice=function(e){var n;var t=[];while(e--&&(n=this.shift())){t.push(n)}return t};DLL.prototype.remove=function(e){var n=this.head;while(n){if(e(n)){this._removeLink(n)}n=n.next}return this};function baseQueue(e,r,f,u){if(f===undefined){f=1}else if(isNaN(f)||f<1){throw new Error("Concurrency must not be zero")}var o=0;var i=[];var s,c;var y={_tasks:new DLL,concurrency:f,payload:u,saturated:n,unsaturated:n,buffer:f/4,empty:n,drain:n,error:n,started:false,paused:false,push:push,kill:kill,unshift:unshift,remove:remove,process:e?runQueue:runCargo,length:getLength,running:running,workersList:getWorkersList,idle:idle,pause:pause,resume:resume,_worker:r};return y;function push(e,n){_insert(e,n)}function unshift(e,n){_insert(e,n,true)}function _exec(e){var n={data:e,callback:s};if(c){y._tasks.unshift(n)}else{y._tasks.push(n)}h(y.process)}function _insert(e,t,r){if(t==null){t=n}else if(typeof t!=="function"){throw new Error("task callback must be a function")}y.started=true;var f=a(e)?e:[e];if(e===undefined||!f.length){if(y.idle()){h(y.drain)}return}c=r;s=t;arrayEachSync(f,_exec);s=undefined}function kill(){y.drain=n;y._tasks.empty()}function _next(e,n){var r=false;return function done(f,u){if(r){t()}r=true;o--;var a;var l=-1;var s=i.length;var h=-1;var c=n.length;var y=arguments.length>2;var v=y&&createArray(arguments);while(++h=l.priority){l=l.next}while(i--){var s={data:u[i],priority:t,callback:f};if(l){r._tasks.insertBefore(l,s)}else{r._tasks.push(s)}h(r.process)}}}function cargo(e,n){return baseQueue(false,e,1,n)}function auto(e,r,f){if(typeof r===o){f=r;r=null}var u=i(e);var l=u.length;var s={};if(l===0){return f(null,s)}var h=0;var c=new DLL;var y=Object.create(null);f=onlyOnce(f||n);r=r||l;baseEachSync(e,iterator,u);proceedQueue();function iterator(e,r){var o,i;if(!a(e)){o=e;i=0;c.push([o,i,done]);return}var v=e.length-1;o=e[v];i=v;if(v===0){c.push([o,i,done]);return}var d=-1;while(++d=e){f(null,u);f=t}else if(o){h(iterate)}else{o=true;iterate()}o=false}}function timesLimit(e,r,f,u){u=u||n;e=+e;if(isNaN(e)||e<1||isNaN(r)||r<1){return u(null,[])}var o=Array(e);var a=false;var i=0;var l=0;timesSync(r>e?e:r,iterate);function iterate(){var n=i++;if(n=e){u(null,o);u=t}else if(a){h(iterate)}else{a=true;iterate()}a=false}}}function race(e,t){t=once(t||n);var r,f;var o=-1;if(a(e)){r=e.length;while(++o2){t=slice(arguments,1)}n(null,{value:t})}}}function reflectAll(e){var n,t;if(a(e)){n=Array(e.length);arrayEachSync(e,iterate)}else if(e&&typeof e===u){t=i(e);n={};baseEachSync(e,iterate,t)}return n;function iterate(e,t){n[t]=reflect(e)}}function createLogger(e){return function(e){var n=slice(arguments,1);n.push(done);e.apply(null,n)};function done(n){if(typeof console===u){if(n){if(console.error){console.error(n)}return}if(console[e]){var t=slice(arguments,1);arrayEachSync(t,function(n){console[e](n)})}}}}function safe(){createImmediate();return e}function fast(){createImmediate(false);return e}})},944:(e,n,t)=>{"use strict";e.exports=t(664).mapSeries},536:(e,n,t)=>{"use strict";e.exports=t(664).queue},473:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});const t=(e,n,t)=>{const r=(e.stack||"").split("\n").filter(e=>e.trim().startsWith("at"));const f=n.split("\n").filter(e=>e.trim().startsWith("at"));const u=f.slice(0,f.length-r.length).join("\n");r.unshift(u);r.unshift(e.message);r.unshift(`Thread Loader (Worker ${t})`);return r.join("\n")};class WorkerError extends Error{constructor(e,n){super(e);this.name=e.name;this.message=e.message;Error.captureStackTrace(this,this.constructor);this.stack=t(e,this.stack,n)}}n.default=WorkerError},94:(e,n,t)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(129);var f=_interopRequireDefault(r);var u=t(536);var o=_interopRequireDefault(u);var a=t(944);var i=_interopRequireDefault(a);var l=t(111);var s=_interopRequireDefault(l);var h=t(473);var c=_interopRequireDefault(h);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const y=t.ab+"worker.js";let v=0;class PoolWorker{constructor(e,n){this.disposed=false;this.nextJobId=0;this.jobs=Object.create(null);this.activeJobs=0;this.onJobDone=n;this.id=v;v+=1;const r=(e.nodeArgs||[]).filter(e=>!!e);this.worker=f.default.spawn(process.execPath,[].concat(r).concat(t.ab+"worker.js",e.parallelJobs),{detached:true,stdio:["ignore","pipe","pipe","pipe","pipe"]});this.worker.unref();if(!this.worker.stdio){throw new Error(`Failed to create the worker pool with workerId: ${v} and ${""}configuration: ${JSON.stringify(e)}. Please verify if you hit the OS open files limit.`)}const[,,,u,o]=this.worker.stdio;this.readPipe=u;this.writePipe=o;this.listenStdOutAndErrFromWorker(this.worker.stdout,this.worker.stderr);this.readNextMessage()}listenStdOutAndErrFromWorker(e,n){if(e){e.on("data",this.writeToStdout)}if(n){n.on("data",this.writeToStderr)}}ignoreStdOutAndErrFromWorker(e,n){if(e){e.removeListener("data",this.writeToStdout)}if(n){n.removeListener("data",this.writeToStderr)}}writeToStdout(e){if(!this.disposed){process.stdout.write(e)}}writeToStderr(e){if(!this.disposed){process.stderr.write(e)}}run(e,n){const t=this.nextJobId;this.nextJobId+=1;this.jobs[t]={data:e,callback:n};this.activeJobs+=1;this.writeJson({type:"job",id:t,data:e})}warmup(e){this.writeJson({type:"warmup",requires:e})}writeJson(e){const n=Buffer.alloc(4);const t=Buffer.from(JSON.stringify(e),"utf-8");n.writeInt32BE(t.length,0);this.writePipe.write(n);this.writePipe.write(t)}writeEnd(){const e=Buffer.alloc(4);e.writeInt32BE(0,0);this.writePipe.write(e)}readNextMessage(){this.state="read length";this.readBuffer(4,(e,n)=>{if(e){console.error(`Failed to communicate with worker (read length) ${e}`);return}this.state="length read";const t=n.readInt32BE(0);this.state="read message";this.readBuffer(t,(e,n)=>{if(e){console.error(`Failed to communicate with worker (read message) ${e}`);return}this.state="message read";const t=n.toString("utf-8");const r=JSON.parse(t);this.state="process message";this.onWorkerMessage(r,e=>{if(e){console.error(`Failed to communicate with worker (process message) ${e}`);return}this.state="soon next";setImmediate(()=>this.readNextMessage())})})})}onWorkerMessage(e,n){const{type:t,id:r}=e;switch(t){case"job":{const{data:t,error:f,result:u}=e;(0,i.default)(t,(e,n)=>this.readBuffer(e,n),(e,t)=>{const{callback:o}=this.jobs[r];const a=(e,t)=>{if(o){delete this.jobs[r];this.activeJobs-=1;this.onJobDone();if(e){o(e instanceof Error?e:new Error(e),t)}else{o(null,t)}}n()};if(e){a(e);return}let i=0;if(u.result){u.result=u.result.map(e=>{if(e.buffer){const n=t[i];i+=1;if(e.string){return n.toString("utf-8")}return n}return e.data})}if(f){a(this.fromErrorObj(f),u);return}a(null,u)});break}case"resolve":{const{context:t,request:f,questionId:u}=e;const{data:o}=this.jobs[r];o.resolve(t,f,(e,n)=>{this.writeJson({type:"result",id:u,error:e?{message:e.message,details:e.details,missing:e.missing}:null,result:n})});n();break}case"emitWarning":{const{data:t}=e;const{data:f}=this.jobs[r];f.emitWarning(this.fromErrorObj(t));n();break}case"emitError":{const{data:t}=e;const{data:f}=this.jobs[r];f.emitError(this.fromErrorObj(t));n();break}default:{console.error(`Unexpected worker message ${t} in WorkerPool.`);n();break}}}fromErrorObj(e){let n;if(typeof e==="string"){n={message:e}}else{n=e}return new c.default(n,this.id)}readBuffer(e,n){(0,s.default)(this.readPipe,e,n)}dispose(){if(!this.disposed){this.disposed=true;this.ignoreStdOutAndErrFromWorker(this.worker.stdout,this.worker.stderr);this.writeEnd()}}}class WorkerPool{constructor(e){this.options=e||{};this.numberOfWorkers=e.numberOfWorkers;this.poolTimeout=e.poolTimeout;this.workerNodeArgs=e.workerNodeArgs;this.workerParallelJobs=e.workerParallelJobs;this.workers=new Set;this.activeJobs=0;this.timeout=null;this.poolQueue=(0,o.default)(this.distributeJob.bind(this),e.poolParallelJobs);this.terminated=false;this.setupLifeCycle()}isAbleToRun(){return!this.terminated}terminate(){if(this.terminated){return}this.terminated=true;this.poolQueue.kill();this.disposeWorkers(true)}setupLifeCycle(){process.on("exit",()=>{this.terminate()})}run(e,n){if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.activeJobs+=1;this.poolQueue.push(e,n)}distributeJob(e,n){let t;for(const e of this.workers){if(!t||e.activeJobs=this.numberOfWorkers)){t.run(e,n);return}const r=this.createWorker();r.run(e,n)}createWorker(){const e=new PoolWorker({nodeArgs:this.workerNodeArgs,parallelJobs:this.workerParallelJobs},()=>this.onJobDone());this.workers.add(e);return e}warmup(e){while(this.workers.sizethis.disposeWorkers(),this.poolTimeout)}}disposeWorkers(e){if(!this.options.poolRespawn&&!e){this.terminate();return}if(this.activeJobs===0||e){for(const e of this.workers){e.dispose()}this.workers.clear()}}}n.default=WorkerPool},322:(e,n,t)=>{"use strict";e.exports=t(551)},551:(e,n,t)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.warmup=n.pitch=undefined;var r=t(710);var f=_interopRequireDefault(r);var u=t(554);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function pitch(){const e=f.default.getOptions(this)||{};const n=(0,u.getPool)(e);if(!n.isAbleToRun()){return}const t=this.async();n.run({loaders:this.loaders.slice(this.loaderIndex+1).map(e=>{return{loader:e.path,options:e.options,ident:e.ident}}),resource:this.resourcePath+(this.resourceQuery||""),sourceMap:this.sourceMap,emitError:this.emitError,emitWarning:this.emitWarning,resolve:this.resolve,target:this.target,minimize:this.minimize,resourceQuery:this.resourceQuery,optionsContext:this.rootContext||this.options.context},(e,n)=>{if(n){n.fileDependencies.forEach(e=>this.addDependency(e));n.contextDependencies.forEach(e=>this.addContextDependency(e))}if(e){t(e);return}t(null,...n.result)})}function warmup(e,n){const t=(0,u.getPool)(e);t.warmup(n)}n.pitch=pitch;n.warmup=warmup},111:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=readBuffer;function readBuffer(e,n,t){if(n===0){t(null,Buffer.alloc(0));return}let r=n;const f=[];const u=()=>{const u=o=>{let a=o;let i;if(a.length>r){i=a.slice(r);a=a.slice(0,r);r=0}else{r-=a.length}f.push(a);if(r===0){e.removeListener("data",u);e.pause();if(i){e.unshift(i)}t(null,Buffer.concat(f,n))}};e.on("data",u);e.resume()};u()}},554:(e,n,t)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.getPool=undefined;var r=t(87);var f=_interopRequireDefault(r);var u=t(94);var o=_interopRequireDefault(u);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const a=Object.create(null);function calculateNumberOfWorkers(){const e=f.default.cpus()||{length:1};return Math.max(1,e.length-1)}function getPool(e){const n={name:e.name||"",numberOfWorkers:e.workers||calculateNumberOfWorkers(),workerNodeArgs:e.workerNodeArgs,workerParallelJobs:e.workerParallelJobs||20,poolTimeout:e.poolTimeout||500,poolParallelJobs:e.poolParallelJobs||200,poolRespawn:e.poolRespawn||false};const t=JSON.stringify(n);a[t]=a[t]||new o.default(n);const r=a[t];return r}n.getPool=getPool},129:e=>{"use strict";e.exports=require("child_process")},710:e=>{"use strict";e.exports=require("loader-utils")},87:e=>{"use strict";e.exports=require("os")}};var n={};function __webpack_require__(t){if(n[t]){return n[t].exports}var r=n[t]={exports:{}};var f=true;try{e[t].call(r.exports,r,r.exports,__webpack_require__);f=false}finally{if(f)delete n[t]}return r.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(322)})(); \ No newline at end of file +module.exports=(()=>{var e={664:function(e,n){(function(e,t){"use strict";true?t(n):0})(this,function(e){"use strict";var n=function noop(){};var t=function throwError(){throw new Error("Callback was already called.")};var r=5;var f=0;var u="object";var o="function";var a=Array.isArray;var i=Object.keys;var l=Array.prototype.push;var s=typeof Symbol===o&&Symbol.iterator;var h,c,y;createImmediate();var v=createEach(arrayEach,baseEach,symbolEach);var d=createMap(arrayEachIndex,baseEachIndex,symbolEachIndex,true);var p=createMap(arrayEachIndex,baseEachKey,symbolEachKey,false);var I=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,true);var g=createFilterSeries(true);var m=createFilterLimit(true);var W=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,false);var b=createFilterSeries(false);var w=createFilterLimit(false);var j=createDetect(arrayEachValue,baseEachValue,symbolEachValue,true);var C=createDetectSeries(true);var K=createDetectLimit(true);var L=createEvery(arrayEachValue,baseEachValue,symbolEachValue);var _=createEverySeries();var A=createEveryLimit();var O=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,true);var S=createPickSeries(true);var E=createPickLimit(true);var B=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,false);var D=createPickSeries(false);var P=createPickLimit(false);var N=createTransform(arrayEachResult,baseEachResult,symbolEachResult);var V=createSortBy(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue);var J=createConcat(arrayEachIndex,baseEachIndex,symbolEachIndex);var R=createGroupBy(arrayEachValue,baseEachValue,symbolEachValue);var q=createParallel(arrayEachFunc,baseEachFunc);var F=createApplyEach(d);var x=createApplyEach(mapSeries);var M=createLogger("log");var Q=createLogger("dir");var $={VERSION:"2.6.2",each:v,eachSeries:eachSeries,eachLimit:eachLimit,forEach:v,forEachSeries:eachSeries,forEachLimit:eachLimit,eachOf:v,eachOfSeries:eachSeries,eachOfLimit:eachLimit,forEachOf:v,forEachOfSeries:eachSeries,forEachOfLimit:eachLimit,map:d,mapSeries:mapSeries,mapLimit:mapLimit,mapValues:p,mapValuesSeries:mapValuesSeries,mapValuesLimit:mapValuesLimit,filter:I,filterSeries:g,filterLimit:m,select:I,selectSeries:g,selectLimit:m,reject:W,rejectSeries:b,rejectLimit:w,detect:j,detectSeries:C,detectLimit:K,find:j,findSeries:C,findLimit:K,pick:O,pickSeries:S,pickLimit:E,omit:B,omitSeries:D,omitLimit:P,reduce:reduce,inject:reduce,foldl:reduce,reduceRight:reduceRight,foldr:reduceRight,transform:N,transformSeries:transformSeries,transformLimit:transformLimit,sortBy:V,sortBySeries:sortBySeries,sortByLimit:sortByLimit,some:some,someSeries:someSeries,someLimit:someLimit,any:some,anySeries:someSeries,anyLimit:someLimit,every:L,everySeries:_,everyLimit:A,all:L,allSeries:_,allLimit:A,concat:J,concatSeries:concatSeries,concatLimit:concatLimit,groupBy:R,groupBySeries:groupBySeries,groupByLimit:groupByLimit,parallel:q,series:series,parallelLimit:parallelLimit,tryEach:tryEach,waterfall:waterfall,angelFall:angelFall,angelfall:angelFall,whilst:whilst,doWhilst:doWhilst,until:until,doUntil:doUntil,during:during,doDuring:doDuring,forever:forever,compose:compose,seq:seq,applyEach:F,applyEachSeries:x,queue:queue,priorityQueue:priorityQueue,cargo:cargo,auto:auto,autoInject:autoInject,retry:retry,retryable:retryable,iterator:iterator,times:times,timesSeries:timesSeries,timesLimit:timesLimit,race:race,apply:apply,nextTick:c,setImmediate:y,memoize:memoize,unmemoize:unmemoize,ensureAsync:ensureAsync,constant:constant,asyncify:asyncify,wrapSync:asyncify,log:M,dir:Q,reflect:reflect,reflectAll:reflectAll,timeout:timeout,createLogger:createLogger,safe:safe,fast:fast};e["default"]=$;baseEachSync($,function(n,t){e[t]=n},i($));function createImmediate(e){var n=function delay(e){var n=slice(arguments,1);setTimeout(function(){e.apply(null,n)})};y=typeof setImmediate===o?setImmediate:n;if(typeof process===u&&typeof process.nextTick===o){h=/^v0.10/.test(process.version)?y:process.nextTick;c=/^v0/.test(process.version)?y:process.nextTick}else{c=h=y}if(e===false){h=function(e){e()}}}function createArray(e){var n=-1;var t=e.length;var r=Array(t);while(++n=n&&e[o]>=r){o--}if(u>o){break}swap(e,f,u++,o--)}return u}function swap(e,n,t,r){var f=e[t];e[t]=e[r];e[r]=f;var u=n[t];n[t]=n[r];n[r]=u}function quickSort(e,n,t,r){if(n===t){return}var f=n;while(++f<=t&&e[n]===e[f]){var u=f-1;if(r[u]>r[f]){var o=r[u];r[u]=r[f];r[f]=o}}if(f>t){return}var a=e[n]>e[f]?n:f;f=partition(e,n,t,e[a],r);quickSort(e,n,f-1,r);quickSort(e,f,t,r)}function makeConcatResult(e){var t=[];arrayEachSync(e,function(e){if(e===n){return}if(a(e)){l.apply(t,e)}else{t.push(e)}});return t}function arrayEach(e,n,t){var r=-1;var f=e.length;if(n.length===3){while(++rc?c:f,m);function arrayIterator(){y=w++;if(yl?l:r,I);function arrayIterator(){if(ml?l:r,g);function arrayIterator(){c=W++;if(cl?l:r,I);function arrayIterator(){c=W++;if(cc?c:f,m);function arrayIterator(){y=b++;if(yc?c:f,m);function arrayIterator(){y=w++;if(yl?l:t,I);function arrayIterator(){c=W++;if(cl?l:r,W);function arrayIterator(){if(w=2){l.apply(g,slice(arguments,1))}if(e){f(e,g)}else if(++m===o){p=t;f(null,g)}else if(I){h(p)}else{I=true;p()}I=false}}function concatLimit(e,r,f,o){o=o||n;var l,c,y,v,d,p;var I=false;var g=0;var m=0;if(a(e)){l=e.length;d=f.length===3?arrayIteratorWithIndex:arrayIterator}else if(!e){}else if(s&&e[s]){l=Infinity;p=[];y=e[s]();d=f.length===3?symbolIteratorWithKey:symbolIterator}else if(typeof e===u){var W=i(e);l=W.length;d=f.length===3?objectIteratorWithKey:objectIterator}if(!l||isNaN(r)||r<1){return o(null,[])}p=p||Array(l);timesSync(r>l?l:r,d);function arrayIterator(){if(gl?l:r,g);function arrayIterator(){if(Wo?o:r,v);function arrayIterator(){l=p++;if(l1){var f=slice(arguments,1);return r.apply(this,f)}else{return r}}}function DLL(){this.head=null;this.tail=null;this.length=0}DLL.prototype._removeLink=function(e){var n=e.prev;var t=e.next;if(n){n.next=t}else{this.head=t}if(t){t.prev=n}else{this.tail=n}e.prev=null;e.next=null;this.length--;return e};DLL.prototype.empty=DLL;DLL.prototype._setInitial=function(e){this.length=1;this.head=this.tail=e};DLL.prototype.insertBefore=function(e,n){n.prev=e.prev;n.next=e;if(e.prev){e.prev.next=n}else{this.head=n}e.prev=n;this.length++};DLL.prototype.unshift=function(e){if(this.head){this.insertBefore(this.head,e)}else{this._setInitial(e)}};DLL.prototype.push=function(e){var n=this.tail;if(n){e.prev=n;e.next=n.next;this.tail=e;n.next=e;this.length++}else{this._setInitial(e)}};DLL.prototype.shift=function(){return this.head&&this._removeLink(this.head)};DLL.prototype.splice=function(e){var n;var t=[];while(e--&&(n=this.shift())){t.push(n)}return t};DLL.prototype.remove=function(e){var n=this.head;while(n){if(e(n)){this._removeLink(n)}n=n.next}return this};function baseQueue(e,r,f,u){if(f===undefined){f=1}else if(isNaN(f)||f<1){throw new Error("Concurrency must not be zero")}var o=0;var i=[];var s,c;var y={_tasks:new DLL,concurrency:f,payload:u,saturated:n,unsaturated:n,buffer:f/4,empty:n,drain:n,error:n,started:false,paused:false,push:push,kill:kill,unshift:unshift,remove:remove,process:e?runQueue:runCargo,length:getLength,running:running,workersList:getWorkersList,idle:idle,pause:pause,resume:resume,_worker:r};return y;function push(e,n){_insert(e,n)}function unshift(e,n){_insert(e,n,true)}function _exec(e){var n={data:e,callback:s};if(c){y._tasks.unshift(n)}else{y._tasks.push(n)}h(y.process)}function _insert(e,t,r){if(t==null){t=n}else if(typeof t!=="function"){throw new Error("task callback must be a function")}y.started=true;var f=a(e)?e:[e];if(e===undefined||!f.length){if(y.idle()){h(y.drain)}return}c=r;s=t;arrayEachSync(f,_exec);s=undefined}function kill(){y.drain=n;y._tasks.empty()}function _next(e,n){var r=false;return function done(f,u){if(r){t()}r=true;o--;var a;var l=-1;var s=i.length;var h=-1;var c=n.length;var y=arguments.length>2;var v=y&&createArray(arguments);while(++h=l.priority){l=l.next}while(i--){var s={data:u[i],priority:t,callback:f};if(l){r._tasks.insertBefore(l,s)}else{r._tasks.push(s)}h(r.process)}}}function cargo(e,n){return baseQueue(false,e,1,n)}function auto(e,r,f){if(typeof r===o){f=r;r=null}var u=i(e);var l=u.length;var s={};if(l===0){return f(null,s)}var h=0;var c=new DLL;var y=Object.create(null);f=onlyOnce(f||n);r=r||l;baseEachSync(e,iterator,u);proceedQueue();function iterator(e,r){var o,i;if(!a(e)){o=e;i=0;c.push([o,i,done]);return}var v=e.length-1;o=e[v];i=v;if(v===0){c.push([o,i,done]);return}var d=-1;while(++d=e){f(null,u);f=t}else if(o){h(iterate)}else{o=true;iterate()}o=false}}function timesLimit(e,r,f,u){u=u||n;e=+e;if(isNaN(e)||e<1||isNaN(r)||r<1){return u(null,[])}var o=Array(e);var a=false;var i=0;var l=0;timesSync(r>e?e:r,iterate);function iterate(){var n=i++;if(n=e){u(null,o);u=t}else if(a){h(iterate)}else{a=true;iterate()}a=false}}}function race(e,t){t=once(t||n);var r,f;var o=-1;if(a(e)){r=e.length;while(++o2){t=slice(arguments,1)}n(null,{value:t})}}}function reflectAll(e){var n,t;if(a(e)){n=Array(e.length);arrayEachSync(e,iterate)}else if(e&&typeof e===u){t=i(e);n={};baseEachSync(e,iterate,t)}return n;function iterate(e,t){n[t]=reflect(e)}}function createLogger(e){return function(e){var n=slice(arguments,1);n.push(done);e.apply(null,n)};function done(n){if(typeof console===u){if(n){if(console.error){console.error(n)}return}if(console[e]){var t=slice(arguments,1);arrayEachSync(t,function(n){console[e](n)})}}}}function safe(){createImmediate();return e}function fast(){createImmediate(false);return e}})},944:(e,n,t)=>{"use strict";e.exports=t(664).mapSeries},536:(e,n,t)=>{"use strict";e.exports=t(664).queue},473:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});const t=(e,n,t)=>{const r=(e.stack||"").split("\n").filter(e=>e.trim().startsWith("at"));const f=n.split("\n").filter(e=>e.trim().startsWith("at"));const u=f.slice(0,f.length-r.length).join("\n");r.unshift(u);r.unshift(e.message);r.unshift(`Thread Loader (Worker ${t})`);return r.join("\n")};class WorkerError extends Error{constructor(e,n){super(e);this.name=e.name;this.message=e.message;Error.captureStackTrace(this,this.constructor);this.stack=t(e,this.stack,n)}}n.default=WorkerError},94:(e,n,t)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(129);var f=_interopRequireDefault(r);var u=t(536);var o=_interopRequireDefault(u);var a=t(944);var i=_interopRequireDefault(a);var l=t(111);var s=_interopRequireDefault(l);var h=t(473);var c=_interopRequireDefault(h);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const y=t.ab+"worker.js";let v=0;class PoolWorker{constructor(e,n){this.disposed=false;this.nextJobId=0;this.jobs=Object.create(null);this.activeJobs=0;this.onJobDone=n;this.id=v;v+=1;const r=(e.nodeArgs||[]).filter(e=>!!e);this.worker=f.default.spawn(process.execPath,[].concat(r).concat(t.ab+"worker.js",e.parallelJobs),{detached:true,stdio:["ignore","pipe","pipe","pipe","pipe"]});this.worker.unref();if(!this.worker.stdio){throw new Error(`Failed to create the worker pool with workerId: ${v} and ${""}configuration: ${JSON.stringify(e)}. Please verify if you hit the OS open files limit.`)}const[,,,u,o]=this.worker.stdio;this.readPipe=u;this.writePipe=o;this.listenStdOutAndErrFromWorker(this.worker.stdout,this.worker.stderr);this.readNextMessage()}listenStdOutAndErrFromWorker(e,n){if(e){e.on("data",this.writeToStdout)}if(n){n.on("data",this.writeToStderr)}}ignoreStdOutAndErrFromWorker(e,n){if(e){e.removeListener("data",this.writeToStdout)}if(n){n.removeListener("data",this.writeToStderr)}}writeToStdout(e){if(!this.disposed){process.stdout.write(e)}}writeToStderr(e){if(!this.disposed){process.stderr.write(e)}}run(e,n){const t=this.nextJobId;this.nextJobId+=1;this.jobs[t]={data:e,callback:n};this.activeJobs+=1;this.writeJson({type:"job",id:t,data:e})}warmup(e){this.writeJson({type:"warmup",requires:e})}writeJson(e){const n=Buffer.alloc(4);const t=Buffer.from(JSON.stringify(e),"utf-8");n.writeInt32BE(t.length,0);this.writePipe.write(n);this.writePipe.write(t)}writeEnd(){const e=Buffer.alloc(4);e.writeInt32BE(0,0);this.writePipe.write(e)}readNextMessage(){this.state="read length";this.readBuffer(4,(e,n)=>{if(e){console.error(`Failed to communicate with worker (read length) ${e}`);return}this.state="length read";const t=n.readInt32BE(0);this.state="read message";this.readBuffer(t,(e,n)=>{if(e){console.error(`Failed to communicate with worker (read message) ${e}`);return}this.state="message read";const t=n.toString("utf-8");const r=JSON.parse(t);this.state="process message";this.onWorkerMessage(r,e=>{if(e){console.error(`Failed to communicate with worker (process message) ${e}`);return}this.state="soon next";setImmediate(()=>this.readNextMessage())})})})}onWorkerMessage(e,n){const{type:t,id:r}=e;switch(t){case"job":{const{data:t,error:f,result:u}=e;(0,i.default)(t,(e,n)=>this.readBuffer(e,n),(e,t)=>{const{callback:o}=this.jobs[r];const a=(e,t)=>{if(o){delete this.jobs[r];this.activeJobs-=1;this.onJobDone();if(e){o(e instanceof Error?e:new Error(e),t)}else{o(null,t)}}n()};if(e){a(e);return}let i=0;if(u.result){u.result=u.result.map(e=>{if(e.buffer){const n=t[i];i+=1;if(e.string){return n.toString("utf-8")}return n}return e.data})}if(f){a(this.fromErrorObj(f),u);return}a(null,u)});break}case"resolve":{const{context:t,request:f,questionId:u}=e;const{data:o}=this.jobs[r];o.resolve(t,f,(e,n)=>{this.writeJson({type:"result",id:u,error:e?{message:e.message,details:e.details,missing:e.missing}:null,result:n})});n();break}case"emitWarning":{const{data:t}=e;const{data:f}=this.jobs[r];f.emitWarning(this.fromErrorObj(t));n();break}case"emitError":{const{data:t}=e;const{data:f}=this.jobs[r];f.emitError(this.fromErrorObj(t));n();break}default:{console.error(`Unexpected worker message ${t} in WorkerPool.`);n();break}}}fromErrorObj(e){let n;if(typeof e==="string"){n={message:e}}else{n=e}return new c.default(n,this.id)}readBuffer(e,n){(0,s.default)(this.readPipe,e,n)}dispose(){if(!this.disposed){this.disposed=true;this.ignoreStdOutAndErrFromWorker(this.worker.stdout,this.worker.stderr);this.writeEnd()}}}class WorkerPool{constructor(e){this.options=e||{};this.numberOfWorkers=e.numberOfWorkers;this.poolTimeout=e.poolTimeout;this.workerNodeArgs=e.workerNodeArgs;this.workerParallelJobs=e.workerParallelJobs;this.workers=new Set;this.activeJobs=0;this.timeout=null;this.poolQueue=(0,o.default)(this.distributeJob.bind(this),e.poolParallelJobs);this.terminated=false;this.setupLifeCycle()}isAbleToRun(){return!this.terminated}terminate(){if(this.terminated){return}this.terminated=true;this.poolQueue.kill();this.disposeWorkers(true)}setupLifeCycle(){process.on("exit",()=>{this.terminate()})}run(e,n){if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.activeJobs+=1;this.poolQueue.push(e,n)}distributeJob(e,n){let t;for(const e of this.workers){if(!t||e.activeJobs=this.numberOfWorkers)){t.run(e,n);return}const r=this.createWorker();r.run(e,n)}createWorker(){const e=new PoolWorker({nodeArgs:this.workerNodeArgs,parallelJobs:this.workerParallelJobs},()=>this.onJobDone());this.workers.add(e);return e}warmup(e){while(this.workers.sizethis.disposeWorkers(),this.poolTimeout)}}disposeWorkers(e){if(!this.options.poolRespawn&&!e){this.terminate();return}if(this.activeJobs===0||e){for(const e of this.workers){e.dispose()}this.workers.clear()}}}n.default=WorkerPool},322:(e,n,t)=>{"use strict";e.exports=t(551)},551:(e,n,t)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.warmup=n.pitch=undefined;var r=t(710);var f=_interopRequireDefault(r);var u=t(554);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function pitch(){const e=f.default.getOptions(this)||{};const n=(0,u.getPool)(e);if(!n.isAbleToRun()){return}const t=this.async();n.run({loaders:this.loaders.slice(this.loaderIndex+1).map(e=>{return{loader:e.path,options:e.options,ident:e.ident}}),resource:this.resourcePath+(this.resourceQuery||""),sourceMap:this.sourceMap,emitError:this.emitError,emitWarning:this.emitWarning,resolve:this.resolve,target:this.target,minimize:this.minimize,resourceQuery:this.resourceQuery,optionsContext:this.rootContext||this.options.context},(e,n)=>{if(n){n.fileDependencies.forEach(e=>this.addDependency(e));n.contextDependencies.forEach(e=>this.addContextDependency(e))}if(e){t(e);return}t(null,...n.result)})}function warmup(e,n){const t=(0,u.getPool)(e);t.warmup(n)}n.pitch=pitch;n.warmup=warmup},111:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=readBuffer;function readBuffer(e,n,t){if(n===0){t(null,Buffer.alloc(0));return}let r=n;const f=[];const u=()=>{const u=o=>{let a=o;let i;if(a.length>r){i=a.slice(r);a=a.slice(0,r);r=0}else{r-=a.length}f.push(a);if(r===0){e.removeListener("data",u);e.pause();if(i){e.unshift(i)}t(null,Buffer.concat(f,n))}};e.on("data",u);e.resume()};u()}},554:(e,n,t)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.getPool=undefined;var r=t(87);var f=_interopRequireDefault(r);var u=t(94);var o=_interopRequireDefault(u);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const a=Object.create(null);function calculateNumberOfWorkers(){const e=f.default.cpus()||{length:1};return Math.max(1,e.length-1)}function getPool(e){const n={name:e.name||"",numberOfWorkers:e.workers||calculateNumberOfWorkers(),workerNodeArgs:e.workerNodeArgs,workerParallelJobs:e.workerParallelJobs||20,poolTimeout:e.poolTimeout||500,poolParallelJobs:e.poolParallelJobs||200,poolRespawn:e.poolRespawn||false};const t=JSON.stringify(n);a[t]=a[t]||new o.default(n);const r=a[t];return r}n.getPool=getPool},129:e=>{"use strict";e.exports=require("child_process")},710:e=>{"use strict";e.exports=require("loader-utils")},87:e=>{"use strict";e.exports=require("os")}};var n={};function __nccwpck_require__(t){if(n[t]){return n[t].exports}var r=n[t]={exports:{}};var f=true;try{e[t].call(r.exports,r,r.exports,__nccwpck_require__);f=false}finally{if(f)delete n[t]}return r.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(322)})(); \ No newline at end of file diff --git a/packages/next/compiled/thread-loader/worker.js b/packages/next/compiled/thread-loader/worker.js index 85a7224420b39db..b5276d6b7c888df 100644 --- a/packages/next/compiled/thread-loader/worker.js +++ b/packages/next/compiled/thread-loader/worker.js @@ -1 +1 @@ -module.exports=(()=>{var n={664:function(n,e){(function(n,f){"use strict";true?f(e):0})(this,function(n){"use strict";var e=function noop(){};var f=function throwError(){throw new Error("Callback was already called.")};var r=5;var t=0;var u="object";var a="function";var o=Array.isArray;var l=Object.keys;var i=Array.prototype.push;var s=typeof Symbol===a&&Symbol.iterator;var h,y,c;createImmediate();var v=createEach(arrayEach,baseEach,symbolEach);var I=createMap(arrayEachIndex,baseEachIndex,symbolEachIndex,true);var p=createMap(arrayEachIndex,baseEachKey,symbolEachKey,false);var d=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,true);var g=createFilterSeries(true);var m=createFilterLimit(true);var W=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,false);var C=createFilterSeries(false);var j=createFilterLimit(false);var b=createDetect(arrayEachValue,baseEachValue,symbolEachValue,true);var w=createDetectSeries(true);var K=createDetectLimit(true);var L=createEvery(arrayEachValue,baseEachValue,symbolEachValue);var _=createEverySeries();var A=createEveryLimit();var O=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,true);var S=createPickSeries(true);var B=createPickLimit(true);var V=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,false);var E=createPickSeries(false);var D=createPickLimit(false);var N=createTransform(arrayEachResult,baseEachResult,symbolEachResult);var R=createSortBy(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue);var q=createConcat(arrayEachIndex,baseEachIndex,symbolEachIndex);var F=createGroupBy(arrayEachValue,baseEachValue,symbolEachValue);var P=createParallel(arrayEachFunc,baseEachFunc);var x=createApplyEach(I);var Q=createApplyEach(mapSeries);var M=createLogger("log");var J=createLogger("dir");var $={VERSION:"2.6.2",each:v,eachSeries:eachSeries,eachLimit:eachLimit,forEach:v,forEachSeries:eachSeries,forEachLimit:eachLimit,eachOf:v,eachOfSeries:eachSeries,eachOfLimit:eachLimit,forEachOf:v,forEachOfSeries:eachSeries,forEachOfLimit:eachLimit,map:I,mapSeries:mapSeries,mapLimit:mapLimit,mapValues:p,mapValuesSeries:mapValuesSeries,mapValuesLimit:mapValuesLimit,filter:d,filterSeries:g,filterLimit:m,select:d,selectSeries:g,selectLimit:m,reject:W,rejectSeries:C,rejectLimit:j,detect:b,detectSeries:w,detectLimit:K,find:b,findSeries:w,findLimit:K,pick:O,pickSeries:S,pickLimit:B,omit:V,omitSeries:E,omitLimit:D,reduce:reduce,inject:reduce,foldl:reduce,reduceRight:reduceRight,foldr:reduceRight,transform:N,transformSeries:transformSeries,transformLimit:transformLimit,sortBy:R,sortBySeries:sortBySeries,sortByLimit:sortByLimit,some:some,someSeries:someSeries,someLimit:someLimit,any:some,anySeries:someSeries,anyLimit:someLimit,every:L,everySeries:_,everyLimit:A,all:L,allSeries:_,allLimit:A,concat:q,concatSeries:concatSeries,concatLimit:concatLimit,groupBy:F,groupBySeries:groupBySeries,groupByLimit:groupByLimit,parallel:P,series:series,parallelLimit:parallelLimit,tryEach:tryEach,waterfall:waterfall,angelFall:angelFall,angelfall:angelFall,whilst:whilst,doWhilst:doWhilst,until:until,doUntil:doUntil,during:during,doDuring:doDuring,forever:forever,compose:compose,seq:seq,applyEach:x,applyEachSeries:Q,queue:queue,priorityQueue:priorityQueue,cargo:cargo,auto:auto,autoInject:autoInject,retry:retry,retryable:retryable,iterator:iterator,times:times,timesSeries:timesSeries,timesLimit:timesLimit,race:race,apply:apply,nextTick:y,setImmediate:c,memoize:memoize,unmemoize:unmemoize,ensureAsync:ensureAsync,constant:constant,asyncify:asyncify,wrapSync:asyncify,log:M,dir:J,reflect:reflect,reflectAll:reflectAll,timeout:timeout,createLogger:createLogger,safe:safe,fast:fast};n["default"]=$;baseEachSync($,function(e,f){n[f]=e},l($));function createImmediate(n){var e=function delay(n){var e=slice(arguments,1);setTimeout(function(){n.apply(null,e)})};c=typeof setImmediate===a?setImmediate:e;if(typeof process===u&&typeof process.nextTick===a){h=/^v0.10/.test(process.version)?c:process.nextTick;y=/^v0/.test(process.version)?c:process.nextTick}else{y=h=c}if(n===false){h=function(n){n()}}}function createArray(n){var e=-1;var f=n.length;var r=Array(f);while(++e=e&&n[a]>=r){a--}if(u>a){break}swap(n,t,u++,a--)}return u}function swap(n,e,f,r){var t=n[f];n[f]=n[r];n[r]=t;var u=e[f];e[f]=e[r];e[r]=u}function quickSort(n,e,f,r){if(e===f){return}var t=e;while(++t<=f&&n[e]===n[t]){var u=t-1;if(r[u]>r[t]){var a=r[u];r[u]=r[t];r[t]=a}}if(t>f){return}var o=n[e]>n[t]?e:t;t=partition(n,e,f,n[o],r);quickSort(n,e,t-1,r);quickSort(n,t,f,r)}function makeConcatResult(n){var f=[];arrayEachSync(n,function(n){if(n===e){return}if(o(n)){i.apply(f,n)}else{f.push(n)}});return f}function arrayEach(n,e,f){var r=-1;var t=n.length;if(e.length===3){while(++ry?y:t,m);function arrayIterator(){c=j++;if(ci?i:r,d);function arrayIterator(){if(mi?i:r,g);function arrayIterator(){y=W++;if(yi?i:r,d);function arrayIterator(){y=W++;if(yy?y:t,m);function arrayIterator(){c=C++;if(cy?y:t,m);function arrayIterator(){c=j++;if(ci?i:f,d);function arrayIterator(){y=W++;if(yi?i:r,W);function arrayIterator(){if(j=2){i.apply(g,slice(arguments,1))}if(n){t(n,g)}else if(++m===a){p=f;t(null,g)}else if(d){h(p)}else{d=true;p()}d=false}}function concatLimit(n,r,t,a){a=a||e;var i,y,c,v,I,p;var d=false;var g=0;var m=0;if(o(n)){i=n.length;I=t.length===3?arrayIteratorWithIndex:arrayIterator}else if(!n){}else if(s&&n[s]){i=Infinity;p=[];c=n[s]();I=t.length===3?symbolIteratorWithKey:symbolIterator}else if(typeof n===u){var W=l(n);i=W.length;I=t.length===3?objectIteratorWithKey:objectIterator}if(!i||isNaN(r)||r<1){return a(null,[])}p=p||Array(i);timesSync(r>i?i:r,I);function arrayIterator(){if(gi?i:r,g);function arrayIterator(){if(Wa?a:r,v);function arrayIterator(){i=p++;if(i1){var t=slice(arguments,1);return r.apply(this,t)}else{return r}}}function DLL(){this.head=null;this.tail=null;this.length=0}DLL.prototype._removeLink=function(n){var e=n.prev;var f=n.next;if(e){e.next=f}else{this.head=f}if(f){f.prev=e}else{this.tail=e}n.prev=null;n.next=null;this.length--;return n};DLL.prototype.empty=DLL;DLL.prototype._setInitial=function(n){this.length=1;this.head=this.tail=n};DLL.prototype.insertBefore=function(n,e){e.prev=n.prev;e.next=n;if(n.prev){n.prev.next=e}else{this.head=e}n.prev=e;this.length++};DLL.prototype.unshift=function(n){if(this.head){this.insertBefore(this.head,n)}else{this._setInitial(n)}};DLL.prototype.push=function(n){var e=this.tail;if(e){n.prev=e;n.next=e.next;this.tail=n;e.next=n;this.length++}else{this._setInitial(n)}};DLL.prototype.shift=function(){return this.head&&this._removeLink(this.head)};DLL.prototype.splice=function(n){var e;var f=[];while(n--&&(e=this.shift())){f.push(e)}return f};DLL.prototype.remove=function(n){var e=this.head;while(e){if(n(e)){this._removeLink(e)}e=e.next}return this};function baseQueue(n,r,t,u){if(t===undefined){t=1}else if(isNaN(t)||t<1){throw new Error("Concurrency must not be zero")}var a=0;var l=[];var s,y;var c={_tasks:new DLL,concurrency:t,payload:u,saturated:e,unsaturated:e,buffer:t/4,empty:e,drain:e,error:e,started:false,paused:false,push:push,kill:kill,unshift:unshift,remove:remove,process:n?runQueue:runCargo,length:getLength,running:running,workersList:getWorkersList,idle:idle,pause:pause,resume:resume,_worker:r};return c;function push(n,e){_insert(n,e)}function unshift(n,e){_insert(n,e,true)}function _exec(n){var e={data:n,callback:s};if(y){c._tasks.unshift(e)}else{c._tasks.push(e)}h(c.process)}function _insert(n,f,r){if(f==null){f=e}else if(typeof f!=="function"){throw new Error("task callback must be a function")}c.started=true;var t=o(n)?n:[n];if(n===undefined||!t.length){if(c.idle()){h(c.drain)}return}y=r;s=f;arrayEachSync(t,_exec);s=undefined}function kill(){c.drain=e;c._tasks.empty()}function _next(n,e){var r=false;return function done(t,u){if(r){f()}r=true;a--;var o;var i=-1;var s=l.length;var h=-1;var y=e.length;var c=arguments.length>2;var v=c&&createArray(arguments);while(++h=i.priority){i=i.next}while(l--){var s={data:u[l],priority:f,callback:t};if(i){r._tasks.insertBefore(i,s)}else{r._tasks.push(s)}h(r.process)}}}function cargo(n,e){return baseQueue(false,n,1,e)}function auto(n,r,t){if(typeof r===a){t=r;r=null}var u=l(n);var i=u.length;var s={};if(i===0){return t(null,s)}var h=0;var y=new DLL;var c=Object.create(null);t=onlyOnce(t||e);r=r||i;baseEachSync(n,iterator,u);proceedQueue();function iterator(n,r){var a,l;if(!o(n)){a=n;l=0;y.push([a,l,done]);return}var v=n.length-1;a=n[v];l=v;if(v===0){y.push([a,l,done]);return}var I=-1;while(++I=n){t(null,u);t=f}else if(a){h(iterate)}else{a=true;iterate()}a=false}}function timesLimit(n,r,t,u){u=u||e;n=+n;if(isNaN(n)||n<1||isNaN(r)||r<1){return u(null,[])}var a=Array(n);var o=false;var l=0;var i=0;timesSync(r>n?n:r,iterate);function iterate(){var e=l++;if(e=n){u(null,a);u=f}else if(o){h(iterate)}else{o=true;iterate()}o=false}}}function race(n,f){f=once(f||e);var r,t;var a=-1;if(o(n)){r=n.length;while(++a2){f=slice(arguments,1)}e(null,{value:f})}}}function reflectAll(n){var e,f;if(o(n)){e=Array(n.length);arrayEachSync(n,iterate)}else if(n&&typeof n===u){f=l(n);e={};baseEachSync(n,iterate,f)}return e;function iterate(n,f){e[f]=reflect(n)}}function createLogger(n){return function(n){var e=slice(arguments,1);e.push(done);n.apply(null,e)};function done(e){if(typeof console===u){if(e){if(console.error){console.error(e)}return}if(console[n]){var f=slice(arguments,1);arrayEachSync(f,function(e){console[n](e)})}}}}function safe(){createImmediate();return n}function fast(){createImmediate(false);return n}})},536:(n,e,f)=>{"use strict";n.exports=f(664).queue},111:(n,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=readBuffer;function readBuffer(n,e,f){if(e===0){f(null,Buffer.alloc(0));return}let r=e;const t=[];const u=()=>{const u=a=>{let o=a;let l;if(o.length>r){l=o.slice(r);o=o.slice(0,r);r=0}else{r-=o.length}t.push(o);if(r===0){n.removeListener("data",u);n.pause();if(l){n.unshift(l)}f(null,Buffer.concat(t,e))}};n.on("data",u);n.resume()};u()}},745:(n,e,f)=>{"use strict";var r=f(747);var t=_interopRequireDefault(r);var u=f(282);var a=_interopRequireDefault(u);var o=f(811);var l=_interopRequireDefault(o);var i=f(536);var s=_interopRequireDefault(i);var h=f(111);var y=_interopRequireDefault(h);function _interopRequireDefault(n){return n&&n.__esModule?n:{default:n}}const c=t.default.createWriteStream(null,{fd:3});const v=t.default.createReadStream(null,{fd:4});c.on("finish",onTerminateWrite);v.on("end",onTerminateRead);c.on("close",onTerminateWrite);v.on("close",onTerminateRead);v.on("error",onError);c.on("error",onError);const I=+process.argv[2]||20;let p=false;let d=0;const g=Object.create(null);function onError(n){console.error(n)}function onTerminateRead(){terminateRead()}function onTerminateWrite(){terminateWrite()}function writePipeWrite(...n){if(!p){c.write(...n)}}function writePipeCork(){if(!p){c.cork()}}function writePipeUncork(){if(!p){c.uncork()}}function terminateRead(){p=true;v.removeAllListeners()}function terminateWrite(){p=true;c.removeAllListeners()}function terminate(){terminateRead();terminateWrite()}function toErrorObj(n){return{message:n.message,details:n.details,stack:n.stack,hideStack:n.hideStack}}function toNativeError(n){if(!n)return null;const e=new Error(n.message);e.details=n.details;e.missing=n.missing;return e}function writeJson(n){writePipeCork();process.nextTick(()=>{writePipeUncork()});const e=Buffer.alloc(4);const f=Buffer.from(JSON.stringify(n),"utf-8");e.writeInt32BE(f.length,0);writePipeWrite(e);writePipeWrite(f)}const m=(0,s.default)(({id:n,data:e},f)=>{try{l.default.runLoaders({loaders:e.loaders,resource:e.resource,readResource:t.default.readFile.bind(t.default),context:{version:2,resolve:(e,f,r)=>{g[d]=r;writeJson({type:"resolve",id:n,questionId:d,context:e,request:f});d+=1},emitWarning:e=>{writeJson({type:"emitWarning",id:n,data:toErrorObj(e)})},emitError:e=>{writeJson({type:"emitError",id:n,data:toErrorObj(e)})},exec:(n,e)=>{const f=new a.default(e,undefined);f.paths=a.default._nodeModulePaths(undefined.context);f.filename=e;f._compile(n,e);return f.exports},options:{context:e.optionsContext},webpack:true,"thread-loader":true,sourceMap:e.sourceMap,target:e.target,minimize:e.minimize,resourceQuery:e.resourceQuery}},(e,r)=>{const{result:t,cacheable:u,fileDependencies:a,contextDependencies:o}=r;const l=[];const i=Array.isArray(t)&&t.map(n=>{const e=Buffer.isBuffer(n);if(e){l.push(n);return{buffer:true}}if(typeof n==="string"){const e=Buffer.from(n,"utf-8");l.push(e);return{buffer:true,string:true}}return{data:n}});writeJson({type:"job",id:n,error:e&&toErrorObj(e),result:{result:i,cacheable:u,fileDependencies:a,contextDependencies:o},data:l.map(n=>n.length)});l.forEach(n=>{writePipeWrite(n)});setImmediate(f)})}catch(e){writeJson({type:"job",id:n,error:toErrorObj(e)});f()}},I);function dispose(){terminate();m.kill();process.exit(0)}function onMessage(n){try{const{type:e,id:f}=n;switch(e){case"job":{m.push(n);break}case"result":{const{error:e,result:r}=n;const t=g[f];if(t){const n=toNativeError(e);t(n,r)}else{console.error(`Worker got unexpected result id ${f}`)}delete g[f];break}case"warmup":{const{requires:e}=n;e.forEach(n=>require(n));break}default:{console.error(`Worker got unexpected job type ${e}`);break}}}catch(n){console.error(`Error in worker ${n}`)}}function readNextMessage(){(0,y.default)(v,4,(n,e)=>{if(n){console.error(`Failed to communicate with main process (read length) ${n}`);return}const f=e.length&&e.readInt32BE(0);if(f===0){dispose();return}(0,y.default)(v,f,(n,e)=>{if(p){return}if(n){console.error(`Failed to communicate with main process (read message) ${n}`);return}const f=e.toString("utf-8");const r=JSON.parse(f);onMessage(r);setImmediate(()=>readNextMessage())})})}readNextMessage()},747:n=>{"use strict";n.exports=require("fs")},811:n=>{"use strict";n.exports=require("loader-runner")},282:n=>{"use strict";n.exports=require("module")}};var e={};function __webpack_require__(f){if(e[f]){return e[f].exports}var r=e[f]={exports:{}};var t=true;try{n[f].call(r.exports,r,r.exports,__webpack_require__);t=false}finally{if(t)delete e[f]}return r.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(745)})(); \ No newline at end of file +module.exports=(()=>{var e={736:e=>{"use strict";class LoadingLoaderError extends Error{constructor(e){super(e);this.name="LoaderRunnerError";Error.captureStackTrace(this,this.constructor)}}e.exports=LoadingLoaderError},278:(e,n,r)=>{var t=r(747);var f=t.readFile.bind(t);var u=r(384);function utf8BufferToString(e){var n=e.toString("utf-8");if(n.charCodeAt(0)===65279){return n.substr(1)}else{return n}}function splitQuery(e){var n=e.indexOf("?");if(n<0)return[e,""];return[e.substr(0,n),e.substr(n)]}function dirname(e){if(e==="/")return"/";var n=e.lastIndexOf("/");var r=e.lastIndexOf("\\");var t=e.indexOf("/");var f=e.indexOf("\\");var u=n>r?n:r;var a=n>r?t:f;if(u<0)return e;if(u===a)return e.substr(0,u+1);return e.substr(0,u)}function createLoaderObject(e){var n={path:null,query:null,options:null,ident:null,normal:null,pitch:null,raw:null,data:null,pitchExecuted:false,normalExecuted:false};Object.defineProperty(n,"request",{enumerable:true,get:function(){return n.path+n.query},set:function(e){if(typeof e==="string"){var r=splitQuery(e);n.path=r[0];n.query=r[1];n.options=undefined;n.ident=undefined}else{if(!e.loader)throw new Error("request should be a string or object with loader and object ("+JSON.stringify(e)+")");n.path=e.loader;n.options=e.options;n.ident=e.ident;if(n.options===null)n.query="";else if(n.options===undefined)n.query="";else if(typeof n.options==="string")n.query="?"+n.options;else if(n.ident)n.query="??"+n.ident;else if(typeof n.options==="object"&&n.options.ident)n.query="??"+n.options.ident;else n.query="?"+JSON.stringify(n.options)}}});n.request=e;if(Object.preventExtensions){Object.preventExtensions(n)}return n}function runSyncOrAsync(e,n,r,t){var f=true;var u=false;var a=false;var o=false;n.async=function async(){if(u){if(o)return;throw new Error("async(): The callback was already called.")}f=false;return i};var i=n.callback=function(){if(u){if(o)return;throw new Error("callback(): The callback was already called.")}u=true;f=false;try{t.apply(null,arguments)}catch(e){a=true;throw e}};try{var l=function LOADER_EXECUTION(){return e.apply(n,r)}();if(f){u=true;if(l===undefined)return t();if(l&&typeof l==="object"&&typeof l.then==="function"){return l.then(function(e){t(null,e)},t)}return t(null,l)}}catch(e){if(a)throw e;if(u){if(typeof e==="object"&&e.stack)console.error(e.stack);else console.error(e);return}u=true;o=true;t(e)}}function convertArgs(e,n){if(!n&&Buffer.isBuffer(e[0]))e[0]=utf8BufferToString(e[0]);else if(n&&typeof e[0]==="string")e[0]=new Buffer(e[0],"utf-8")}function iteratePitchingLoaders(e,n,r){if(n.loaderIndex>=n.loaders.length)return processResource(e,n,r);var t=n.loaders[n.loaderIndex];if(t.pitchExecuted){n.loaderIndex++;return iteratePitchingLoaders(e,n,r)}u(t,function(f){if(f){n.cacheable(false);return r(f)}var u=t.pitch;t.pitchExecuted=true;if(!u)return iteratePitchingLoaders(e,n,r);runSyncOrAsync(u,n,[n.remainingRequest,n.previousRequest,t.data={}],function(t){if(t)return r(t);var f=Array.prototype.slice.call(arguments,1);if(f.length>0){n.loaderIndex--;iterateNormalLoaders(e,n,f,r)}else{iteratePitchingLoaders(e,n,r)}})})}function processResource(e,n,r){n.loaderIndex=n.loaders.length-1;var t=n.resourcePath;if(t){n.addDependency(t);e.readResource(t,function(t,f){if(t)return r(t);e.resourceBuffer=f;iterateNormalLoaders(e,n,[f],r)})}else{iterateNormalLoaders(e,n,[null],r)}}function iterateNormalLoaders(e,n,r,t){if(n.loaderIndex<0)return t(null,r);var f=n.loaders[n.loaderIndex];if(f.normalExecuted){n.loaderIndex--;return iterateNormalLoaders(e,n,r,t)}var u=f.normal;f.normalExecuted=true;if(!u){return iterateNormalLoaders(e,n,r,t)}convertArgs(r,f.raw);runSyncOrAsync(u,n,r,function(r){if(r)return t(r);var f=Array.prototype.slice.call(arguments,1);iterateNormalLoaders(e,n,f,t)})}n.getContext=function getContext(e){var n=splitQuery(e);return dirname(n[0])};n.runLoaders=function runLoaders(e,n){var r=e.resource||"";var t=e.loaders||[];var u=e.context||{};var a=e.readResource||f;var o=r&&splitQuery(r);var i=o?o[0]:undefined;var l=o?o[1]:undefined;var s=i?dirname(i):null;var c=true;var h=[];var y=[];t=t.map(createLoaderObject);u.context=s;u.loaderIndex=0;u.loaders=t;u.resourcePath=i;u.resourceQuery=l;u.async=null;u.callback=null;u.cacheable=function cacheable(e){if(e===false){c=false}};u.dependency=u.addDependency=function addDependency(e){h.push(e)};u.addContextDependency=function addContextDependency(e){y.push(e)};u.getDependencies=function getDependencies(){return h.slice()};u.getContextDependencies=function getContextDependencies(){return y.slice()};u.clearDependencies=function clearDependencies(){h.length=0;y.length=0;c=true};Object.defineProperty(u,"resource",{enumerable:true,get:function(){if(u.resourcePath===undefined)return undefined;return u.resourcePath+u.resourceQuery},set:function(e){var n=e&&splitQuery(e);u.resourcePath=n?n[0]:undefined;u.resourceQuery=n?n[1]:undefined}});Object.defineProperty(u,"request",{enumerable:true,get:function(){return u.loaders.map(function(e){return e.request}).concat(u.resource||"").join("!")}});Object.defineProperty(u,"remainingRequest",{enumerable:true,get:function(){if(u.loaderIndex>=u.loaders.length-1&&!u.resource)return"";return u.loaders.slice(u.loaderIndex+1).map(function(e){return e.request}).concat(u.resource||"").join("!")}});Object.defineProperty(u,"currentRequest",{enumerable:true,get:function(){return u.loaders.slice(u.loaderIndex).map(function(e){return e.request}).concat(u.resource||"").join("!")}});Object.defineProperty(u,"previousRequest",{enumerable:true,get:function(){return u.loaders.slice(0,u.loaderIndex).map(function(e){return e.request}).join("!")}});Object.defineProperty(u,"query",{enumerable:true,get:function(){var e=u.loaders[u.loaderIndex];return e.options&&typeof e.options==="object"?e.options:e.query}});Object.defineProperty(u,"data",{enumerable:true,get:function(){return u.loaders[u.loaderIndex].data}});if(Object.preventExtensions){Object.preventExtensions(u)}var d={resourceBuffer:null,readResource:a};iteratePitchingLoaders(d,u,function(e,r){if(e){return n(e,{cacheable:c,fileDependencies:h,contextDependencies:y})}n(null,{result:r,resourceBuffer:d.resourceBuffer,cacheable:c,fileDependencies:h,contextDependencies:y})})}},384:(e,n,r)=>{var t=r(736);e.exports=function loadLoader(e,n){if(typeof System==="object"&&typeof System.import==="function"){System.import(e.path).catch(n).then(function(r){e.normal=typeof r==="function"?r:r.default;e.pitch=r.pitch;e.raw=r.raw;if(typeof e.normal!=="function"&&typeof e.pitch!=="function"){return n(new t("Module '"+e.path+"' is not a loader (must have normal or pitch function)"))}n()})}else{try{var r=require(e.path)}catch(r){if(r instanceof Error&&r.code==="EMFILE"){var f=loadLoader.bind(null,e,n);if(typeof setImmediate==="function"){return setImmediate(f)}else{return process.nextTick(f)}}return n(r)}if(typeof r!=="function"&&typeof r!=="object"){return n(new t("Module '"+e.path+"' is not a loader (export function or es6 module)"))}e.normal=typeof r==="function"?r:r.default;e.pitch=r.pitch;e.raw=r.raw;if(typeof e.normal!=="function"&&typeof e.pitch!=="function"){return n(new t("Module '"+e.path+"' is not a loader (must have normal or pitch function)"))}n()}}},664:function(e,n){(function(e,r){"use strict";true?r(n):0})(this,function(e){"use strict";var n=function noop(){};var r=function throwError(){throw new Error("Callback was already called.")};var t=5;var f=0;var u="object";var a="function";var o=Array.isArray;var i=Object.keys;var l=Array.prototype.push;var s=typeof Symbol===a&&Symbol.iterator;var c,h,y;createImmediate();var d=createEach(arrayEach,baseEach,symbolEach);var v=createMap(arrayEachIndex,baseEachIndex,symbolEachIndex,true);var p=createMap(arrayEachIndex,baseEachKey,symbolEachKey,false);var I=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,true);var g=createFilterSeries(true);var m=createFilterLimit(true);var W=createFilter(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue,false);var C=createFilterSeries(false);var j=createFilterLimit(false);var w=createDetect(arrayEachValue,baseEachValue,symbolEachValue,true);var b=createDetectSeries(true);var L=createDetectLimit(true);var K=createEvery(arrayEachValue,baseEachValue,symbolEachValue);var O=createEverySeries();var A=createEveryLimit();var _=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,true);var S=createPickSeries(true);var E=createPickLimit(true);var x=createPick(arrayEachIndexValue,baseEachKeyValue,symbolEachKeyValue,false);var B=createPickSeries(false);var D=createPickLimit(false);var q=createTransform(arrayEachResult,baseEachResult,symbolEachResult);var N=createSortBy(arrayEachIndexValue,baseEachIndexValue,symbolEachIndexValue);var V=createConcat(arrayEachIndex,baseEachIndex,symbolEachIndex);var R=createGroupBy(arrayEachValue,baseEachValue,symbolEachValue);var P=createParallel(arrayEachFunc,baseEachFunc);var F=createApplyEach(v);var Q=createApplyEach(mapSeries);var M=createLogger("log");var J=createLogger("dir");var $={VERSION:"2.6.2",each:d,eachSeries:eachSeries,eachLimit:eachLimit,forEach:d,forEachSeries:eachSeries,forEachLimit:eachLimit,eachOf:d,eachOfSeries:eachSeries,eachOfLimit:eachLimit,forEachOf:d,forEachOfSeries:eachSeries,forEachOfLimit:eachLimit,map:v,mapSeries:mapSeries,mapLimit:mapLimit,mapValues:p,mapValuesSeries:mapValuesSeries,mapValuesLimit:mapValuesLimit,filter:I,filterSeries:g,filterLimit:m,select:I,selectSeries:g,selectLimit:m,reject:W,rejectSeries:C,rejectLimit:j,detect:w,detectSeries:b,detectLimit:L,find:w,findSeries:b,findLimit:L,pick:_,pickSeries:S,pickLimit:E,omit:x,omitSeries:B,omitLimit:D,reduce:reduce,inject:reduce,foldl:reduce,reduceRight:reduceRight,foldr:reduceRight,transform:q,transformSeries:transformSeries,transformLimit:transformLimit,sortBy:N,sortBySeries:sortBySeries,sortByLimit:sortByLimit,some:some,someSeries:someSeries,someLimit:someLimit,any:some,anySeries:someSeries,anyLimit:someLimit,every:K,everySeries:O,everyLimit:A,all:K,allSeries:O,allLimit:A,concat:V,concatSeries:concatSeries,concatLimit:concatLimit,groupBy:R,groupBySeries:groupBySeries,groupByLimit:groupByLimit,parallel:P,series:series,parallelLimit:parallelLimit,tryEach:tryEach,waterfall:waterfall,angelFall:angelFall,angelfall:angelFall,whilst:whilst,doWhilst:doWhilst,until:until,doUntil:doUntil,during:during,doDuring:doDuring,forever:forever,compose:compose,seq:seq,applyEach:F,applyEachSeries:Q,queue:queue,priorityQueue:priorityQueue,cargo:cargo,auto:auto,autoInject:autoInject,retry:retry,retryable:retryable,iterator:iterator,times:times,timesSeries:timesSeries,timesLimit:timesLimit,race:race,apply:apply,nextTick:h,setImmediate:y,memoize:memoize,unmemoize:unmemoize,ensureAsync:ensureAsync,constant:constant,asyncify:asyncify,wrapSync:asyncify,log:M,dir:J,reflect:reflect,reflectAll:reflectAll,timeout:timeout,createLogger:createLogger,safe:safe,fast:fast};e["default"]=$;baseEachSync($,function(n,r){e[r]=n},i($));function createImmediate(e){var n=function delay(e){var n=slice(arguments,1);setTimeout(function(){e.apply(null,n)})};y=typeof setImmediate===a?setImmediate:n;if(typeof process===u&&typeof process.nextTick===a){c=/^v0.10/.test(process.version)?y:process.nextTick;h=/^v0/.test(process.version)?y:process.nextTick}else{h=c=y}if(e===false){c=function(e){e()}}}function createArray(e){var n=-1;var r=e.length;var t=Array(r);while(++n=n&&e[a]>=t){a--}if(u>a){break}swap(e,f,u++,a--)}return u}function swap(e,n,r,t){var f=e[r];e[r]=e[t];e[t]=f;var u=n[r];n[r]=n[t];n[t]=u}function quickSort(e,n,r,t){if(n===r){return}var f=n;while(++f<=r&&e[n]===e[f]){var u=f-1;if(t[u]>t[f]){var a=t[u];t[u]=t[f];t[f]=a}}if(f>r){return}var o=e[n]>e[f]?n:f;f=partition(e,n,r,e[o],t);quickSort(e,n,f-1,t);quickSort(e,f,r,t)}function makeConcatResult(e){var r=[];arrayEachSync(e,function(e){if(e===n){return}if(o(e)){l.apply(r,e)}else{r.push(e)}});return r}function arrayEach(e,n,r){var t=-1;var f=e.length;if(n.length===3){while(++th?h:f,m);function arrayIterator(){y=j++;if(yl?l:t,I);function arrayIterator(){if(ml?l:t,g);function arrayIterator(){h=W++;if(hl?l:t,I);function arrayIterator(){h=W++;if(hh?h:f,m);function arrayIterator(){y=C++;if(yh?h:f,m);function arrayIterator(){y=j++;if(yl?l:r,I);function arrayIterator(){h=W++;if(hl?l:t,W);function arrayIterator(){if(j=2){l.apply(g,slice(arguments,1))}if(e){f(e,g)}else if(++m===a){p=r;f(null,g)}else if(I){c(p)}else{I=true;p()}I=false}}function concatLimit(e,t,f,a){a=a||n;var l,h,y,d,v,p;var I=false;var g=0;var m=0;if(o(e)){l=e.length;v=f.length===3?arrayIteratorWithIndex:arrayIterator}else if(!e){}else if(s&&e[s]){l=Infinity;p=[];y=e[s]();v=f.length===3?symbolIteratorWithKey:symbolIterator}else if(typeof e===u){var W=i(e);l=W.length;v=f.length===3?objectIteratorWithKey:objectIterator}if(!l||isNaN(t)||t<1){return a(null,[])}p=p||Array(l);timesSync(t>l?l:t,v);function arrayIterator(){if(gl?l:t,g);function arrayIterator(){if(Wa?a:t,d);function arrayIterator(){l=p++;if(l1){var f=slice(arguments,1);return t.apply(this,f)}else{return t}}}function DLL(){this.head=null;this.tail=null;this.length=0}DLL.prototype._removeLink=function(e){var n=e.prev;var r=e.next;if(n){n.next=r}else{this.head=r}if(r){r.prev=n}else{this.tail=n}e.prev=null;e.next=null;this.length--;return e};DLL.prototype.empty=DLL;DLL.prototype._setInitial=function(e){this.length=1;this.head=this.tail=e};DLL.prototype.insertBefore=function(e,n){n.prev=e.prev;n.next=e;if(e.prev){e.prev.next=n}else{this.head=n}e.prev=n;this.length++};DLL.prototype.unshift=function(e){if(this.head){this.insertBefore(this.head,e)}else{this._setInitial(e)}};DLL.prototype.push=function(e){var n=this.tail;if(n){e.prev=n;e.next=n.next;this.tail=e;n.next=e;this.length++}else{this._setInitial(e)}};DLL.prototype.shift=function(){return this.head&&this._removeLink(this.head)};DLL.prototype.splice=function(e){var n;var r=[];while(e--&&(n=this.shift())){r.push(n)}return r};DLL.prototype.remove=function(e){var n=this.head;while(n){if(e(n)){this._removeLink(n)}n=n.next}return this};function baseQueue(e,t,f,u){if(f===undefined){f=1}else if(isNaN(f)||f<1){throw new Error("Concurrency must not be zero")}var a=0;var i=[];var s,h;var y={_tasks:new DLL,concurrency:f,payload:u,saturated:n,unsaturated:n,buffer:f/4,empty:n,drain:n,error:n,started:false,paused:false,push:push,kill:kill,unshift:unshift,remove:remove,process:e?runQueue:runCargo,length:getLength,running:running,workersList:getWorkersList,idle:idle,pause:pause,resume:resume,_worker:t};return y;function push(e,n){_insert(e,n)}function unshift(e,n){_insert(e,n,true)}function _exec(e){var n={data:e,callback:s};if(h){y._tasks.unshift(n)}else{y._tasks.push(n)}c(y.process)}function _insert(e,r,t){if(r==null){r=n}else if(typeof r!=="function"){throw new Error("task callback must be a function")}y.started=true;var f=o(e)?e:[e];if(e===undefined||!f.length){if(y.idle()){c(y.drain)}return}h=t;s=r;arrayEachSync(f,_exec);s=undefined}function kill(){y.drain=n;y._tasks.empty()}function _next(e,n){var t=false;return function done(f,u){if(t){r()}t=true;a--;var o;var l=-1;var s=i.length;var c=-1;var h=n.length;var y=arguments.length>2;var d=y&&createArray(arguments);while(++c=l.priority){l=l.next}while(i--){var s={data:u[i],priority:r,callback:f};if(l){t._tasks.insertBefore(l,s)}else{t._tasks.push(s)}c(t.process)}}}function cargo(e,n){return baseQueue(false,e,1,n)}function auto(e,t,f){if(typeof t===a){f=t;t=null}var u=i(e);var l=u.length;var s={};if(l===0){return f(null,s)}var c=0;var h=new DLL;var y=Object.create(null);f=onlyOnce(f||n);t=t||l;baseEachSync(e,iterator,u);proceedQueue();function iterator(e,t){var a,i;if(!o(e)){a=e;i=0;h.push([a,i,done]);return}var d=e.length-1;a=e[d];i=d;if(d===0){h.push([a,i,done]);return}var v=-1;while(++v=e){f(null,u);f=r}else if(a){c(iterate)}else{a=true;iterate()}a=false}}function timesLimit(e,t,f,u){u=u||n;e=+e;if(isNaN(e)||e<1||isNaN(t)||t<1){return u(null,[])}var a=Array(e);var o=false;var i=0;var l=0;timesSync(t>e?e:t,iterate);function iterate(){var n=i++;if(n=e){u(null,a);u=r}else if(o){c(iterate)}else{o=true;iterate()}o=false}}}function race(e,r){r=once(r||n);var t,f;var a=-1;if(o(e)){t=e.length;while(++a2){r=slice(arguments,1)}n(null,{value:r})}}}function reflectAll(e){var n,r;if(o(e)){n=Array(e.length);arrayEachSync(e,iterate)}else if(e&&typeof e===u){r=i(e);n={};baseEachSync(e,iterate,r)}return n;function iterate(e,r){n[r]=reflect(e)}}function createLogger(e){return function(e){var n=slice(arguments,1);n.push(done);e.apply(null,n)};function done(n){if(typeof console===u){if(n){if(console.error){console.error(n)}return}if(console[e]){var r=slice(arguments,1);arrayEachSync(r,function(n){console[e](n)})}}}}function safe(){createImmediate();return e}function fast(){createImmediate(false);return e}})},536:(e,n,r)=>{"use strict";e.exports=r(664).queue},111:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.default=readBuffer;function readBuffer(e,n,r){if(n===0){r(null,Buffer.alloc(0));return}let t=n;const f=[];const u=()=>{const u=a=>{let o=a;let i;if(o.length>t){i=o.slice(t);o=o.slice(0,t);t=0}else{t-=o.length}f.push(o);if(t===0){e.removeListener("data",u);e.pause();if(i){e.unshift(i)}r(null,Buffer.concat(f,n))}};e.on("data",u);e.resume()};u()}},745:(e,n,r)=>{"use strict";var t=r(747);var f=_interopRequireDefault(t);var u=r(282);var a=_interopRequireDefault(u);var o=r(278);var i=_interopRequireDefault(o);var l=r(536);var s=_interopRequireDefault(l);var c=r(111);var h=_interopRequireDefault(c);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const y=f.default.createWriteStream(null,{fd:3});const d=f.default.createReadStream(null,{fd:4});y.on("finish",onTerminateWrite);d.on("end",onTerminateRead);y.on("close",onTerminateWrite);d.on("close",onTerminateRead);d.on("error",onError);y.on("error",onError);const v=+process.argv[2]||20;let p=false;let I=0;const g=Object.create(null);function onError(e){console.error(e)}function onTerminateRead(){terminateRead()}function onTerminateWrite(){terminateWrite()}function writePipeWrite(...e){if(!p){y.write(...e)}}function writePipeCork(){if(!p){y.cork()}}function writePipeUncork(){if(!p){y.uncork()}}function terminateRead(){p=true;d.removeAllListeners()}function terminateWrite(){p=true;y.removeAllListeners()}function terminate(){terminateRead();terminateWrite()}function toErrorObj(e){return{message:e.message,details:e.details,stack:e.stack,hideStack:e.hideStack}}function toNativeError(e){if(!e)return null;const n=new Error(e.message);n.details=e.details;n.missing=e.missing;return n}function writeJson(e){writePipeCork();process.nextTick(()=>{writePipeUncork()});const n=Buffer.alloc(4);const r=Buffer.from(JSON.stringify(e),"utf-8");n.writeInt32BE(r.length,0);writePipeWrite(n);writePipeWrite(r)}const m=(0,s.default)(({id:e,data:n},r)=>{try{i.default.runLoaders({loaders:n.loaders,resource:n.resource,readResource:f.default.readFile.bind(f.default),context:{version:2,resolve:(n,r,t)=>{g[I]=t;writeJson({type:"resolve",id:e,questionId:I,context:n,request:r});I+=1},emitWarning:n=>{writeJson({type:"emitWarning",id:e,data:toErrorObj(n)})},emitError:n=>{writeJson({type:"emitError",id:e,data:toErrorObj(n)})},exec:(e,n)=>{const r=new a.default(n,undefined);r.paths=a.default._nodeModulePaths(undefined.context);r.filename=n;r._compile(e,n);return r.exports},options:{context:n.optionsContext},webpack:true,"thread-loader":true,sourceMap:n.sourceMap,target:n.target,minimize:n.minimize,resourceQuery:n.resourceQuery}},(n,t)=>{const{result:f,cacheable:u,fileDependencies:a,contextDependencies:o}=t;const i=[];const l=Array.isArray(f)&&f.map(e=>{const n=Buffer.isBuffer(e);if(n){i.push(e);return{buffer:true}}if(typeof e==="string"){const n=Buffer.from(e,"utf-8");i.push(n);return{buffer:true,string:true}}return{data:e}});writeJson({type:"job",id:e,error:n&&toErrorObj(n),result:{result:l,cacheable:u,fileDependencies:a,contextDependencies:o},data:i.map(e=>e.length)});i.forEach(e=>{writePipeWrite(e)});setImmediate(r)})}catch(n){writeJson({type:"job",id:e,error:toErrorObj(n)});r()}},v);function dispose(){terminate();m.kill();process.exit(0)}function onMessage(e){try{const{type:n,id:r}=e;switch(n){case"job":{m.push(e);break}case"result":{const{error:n,result:t}=e;const f=g[r];if(f){const e=toNativeError(n);f(e,t)}else{console.error(`Worker got unexpected result id ${r}`)}delete g[r];break}case"warmup":{const{requires:n}=e;n.forEach(e=>require(e));break}default:{console.error(`Worker got unexpected job type ${n}`);break}}}catch(e){console.error(`Error in worker ${e}`)}}function readNextMessage(){(0,h.default)(d,4,(e,n)=>{if(e){console.error(`Failed to communicate with main process (read length) ${e}`);return}const r=n.length&&n.readInt32BE(0);if(r===0){dispose();return}(0,h.default)(d,r,(e,n)=>{if(p){return}if(e){console.error(`Failed to communicate with main process (read message) ${e}`);return}const r=n.toString("utf-8");const t=JSON.parse(r);onMessage(t);setImmediate(()=>readNextMessage())})})}readNextMessage()},747:e=>{"use strict";e.exports=require("fs")},282:e=>{"use strict";e.exports=require("module")}};var n={};function __nccwpck_require__(r){if(n[r]){return n[r].exports}var t=n[r]={exports:{}};var f=true;try{e[r].call(t.exports,t,t.exports,__nccwpck_require__);f=false}finally{if(f)delete n[r]}return t.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(745)})(); \ No newline at end of file diff --git a/packages/next/compiled/unistore/unistore.js b/packages/next/compiled/unistore/unistore.js index ccc0bce915e49d9..bd283effac52be7 100644 --- a/packages/next/compiled/unistore/unistore.js +++ b/packages/next/compiled/unistore/unistore.js @@ -1 +1 @@ -module.exports=(()=>{var r={164:r=>{function n(r,e){for(var n in e)r[n]=e[n];return r}r.exports=function(t){var i=[];function u(r){for(var e=[],n=0;n{var r={164:r=>{function n(r,e){for(var n in e)r[n]=e[n];return r}r.exports=function(t){var i=[];function u(r){for(var e=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:-1;return{name:t,value:e,delta:0,entries:[],id:i(),isFinal:!1}},r=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var n=new PerformanceObserver(function(t){return t.getEntries().map(e)});return n.observe({type:t,buffered:!0}),n}}catch(t){}},o=!1,u=!1,s=function(t){o=!t.persisted},c=function(){addEventListener("pagehide",s),addEventListener("beforeunload",function(){})},p=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(c(),u=!0),addEventListener("visibilitychange",function(e){var n=e.timeStamp;"hidden"===document.visibilityState&&t({timeStamp:n,isUnloading:o})},{capture:!0,once:e})},l=function(t,e,n,i){var a;return function(){n&&e.isFinal&&n.disconnect(),e.value>=0&&(i||e.isFinal||"hidden"===document.visibilityState)&&(e.delta=e.value-(a||0),(e.delta||e.isFinal||void 0===a)&&(t(e),a=e.value))}},f=function(){return void 0===e&&(e="hidden"===document.visibilityState?0:1/0,p(function(t){var n=t.timeStamp;return e=n},!0)),{get timeStamp(){return e}}},d=function(){return n||(n=new Promise(function(t){return["scroll","keydown","pointerdown"].map(function(e){addEventListener(e,t,{once:!0,passive:!0,capture:!0})})})),n};t.getCLS=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=a("CLS",0),o=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),e())},u=r("layout-shift",o);u&&(e=l(t,i,u,n),p(function(t){var n=t.isUnloading;u.takeRecords().map(o),n&&(i.isFinal=!0),e()}))},t.getFCP=function(t){var e,n=a("FCP"),i=f(),o=r("paint",function(t){"first-contentful-paint"===t.name&&t.startTime1&&void 0!==arguments[1]&&arguments[1],i=a("LCP"),o=f(),u=function(t){var n=t.startTime;n1&&void 0!==arguments[1]?arguments[1]:-1;return{name:t,value:e,delta:0,entries:[],id:i(),isFinal:!1}},r=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var n=new PerformanceObserver(function(t){return t.getEntries().map(e)});return n.observe({type:t,buffered:!0}),n}}catch(t){}},o=!1,u=!1,s=function(t){o=!t.persisted},c=function(){addEventListener("pagehide",s),addEventListener("beforeunload",function(){})},p=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(c(),u=!0),addEventListener("visibilitychange",function(e){var n=e.timeStamp;"hidden"===document.visibilityState&&t({timeStamp:n,isUnloading:o})},{capture:!0,once:e})},l=function(t,e,n,i){var a;return function(){n&&e.isFinal&&n.disconnect(),e.value>=0&&(i||e.isFinal||"hidden"===document.visibilityState)&&(e.delta=e.value-(a||0),(e.delta||e.isFinal||void 0===a)&&(t(e),a=e.value))}},f=function(){return void 0===e&&(e="hidden"===document.visibilityState?0:1/0,p(function(t){var n=t.timeStamp;return e=n},!0)),{get timeStamp(){return e}}},d=function(){return n||(n=new Promise(function(t){return["scroll","keydown","pointerdown"].map(function(e){addEventListener(e,t,{once:!0,passive:!0,capture:!0})})})),n};t.getCLS=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=a("CLS",0),o=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),e())},u=r("layout-shift",o);u&&(e=l(t,i,u,n),p(function(t){var n=t.isUnloading;u.takeRecords().map(o),n&&(i.isFinal=!0),e()}))},t.getFCP=function(t){var e,n=a("FCP"),i=f(),o=r("paint",function(t){"first-contentful-paint"===t.name&&t.startTime1&&void 0!==arguments[1]&&arguments[1],i=a("LCP"),o=f(),u=function(t){var n=t.startTime;n0){e.unfinishedGeneratedLine=i(this.generatedCode);if(e.unfinishedGeneratedLine>0){return n+"A"}else{return n}}else{const t=e.unfinishedGeneratedLine;e.unfinishedGeneratedLine+=i(this.generatedCode);if(t===0&&e.unfinishedGeneratedLine>0){return"A"}else{return""}}}addGeneratedCode(e){this.generatedCode+=e}mapGeneratedCode(e){const t=e(this.generatedCode);return new CodeNode(t)}getNormalizedNodes(){return[this]}merge(e){if(e instanceof CodeNode){this.generatedCode+=e.generatedCode;return this}return false}}e.exports=CodeNode},432:function(e){"use strict";class MappingsContext{constructor(){this.sourcesIndices=new Map;this.sourcesContent=new Map;this.hasSourceContent=false;this.currentOriginalLine=1;this.currentSource=0;this.unfinishedGeneratedLine=false}ensureSource(e,t){let n=this.sourcesIndices.get(e);if(typeof n==="number"){return n}n=this.sourcesIndices.size;this.sourcesIndices.set(e,n);this.sourcesContent.set(e,t);if(typeof t==="string")this.hasSourceContent=true;return n}getArrays(){const e=[];const t=[];for(const n of this.sourcesContent){e.push(n[0]);t.push(n[1])}return{sources:e,sourcesContent:t}}}e.exports=MappingsContext},664:function(e,t,n){"use strict";const r=n(430);const i=n(495).y;const s=n(495).P;const o=";AAAA";class SingleLineNode{constructor(e,t,n,r){this.generatedCode=e;this.originalSource=n;this.source=t;this.line=r||1;this._numberOfLines=i(this.generatedCode);this._endsWithNewLine=e[e.length-1]==="\n"}clone(){return new SingleLineNode(this.generatedCode,this.source,this.originalSource,this.line)}getGeneratedCode(){return this.generatedCode}getMappings(e){if(!this.generatedCode)return"";const t=this._numberOfLines;const n=e.ensureSource(this.source,this.originalSource);let i="A";if(e.unfinishedGeneratedLine)i=","+r.encode(e.unfinishedGeneratedLine);i+=r.encode(n-e.currentSource);i+=r.encode(this.line-e.currentOriginalLine);i+="A";e.currentSource=n;e.currentOriginalLine=this.line;const u=e.unfinishedGeneratedLine=s(this.generatedCode);i+=Array(t).join(o);if(u===0){i+=";"}else{if(t!==0)i+=o}return i}getNormalizedNodes(){return[this]}mapGeneratedCode(e){const t=e(this.generatedCode);return new SingleLineNode(t,this.source,this.originalSource,this.line)}merge(e){if(e instanceof SingleLineNode){return this.mergeSingleLineNode(e)}return false}mergeSingleLineNode(e){if(this.source===e.source&&this.originalSource===e.originalSource){if(this.line===e.line){this.generatedCode+=e.generatedCode;this._numberOfLines+=e._numberOfLines;this._endsWithNewLine=e._endsWithNewLine;return this}else if(this.line+1===e.line&&this._endsWithNewLine&&this._numberOfLines===1&&e._numberOfLines<=1){return new u(this.generatedCode+e.generatedCode,this.source,this.originalSource,this.line)}}return false}}e.exports=SingleLineNode;const u=n(176)},361:function(e,t,n){"use strict";const r=n(667);const i=n(176);const s=n(432);const o=n(495).y;class SourceListMap{constructor(e,t,n){if(Array.isArray(e)){this.children=e}else{this.children=[];if(e||t)this.add(e,t,n)}}add(e,t,n){if(typeof e==="string"){if(t){this.children.push(new i(e,t,n))}else if(this.children.length>0&&this.children[this.children.length-1]instanceof r){this.children[this.children.length-1].addGeneratedCode(e)}else{this.children.push(new r(e))}}else if(e.getMappings&&e.getGeneratedCode){this.children.push(e)}else if(e.children){e.children.forEach(function(e){this.children.push(e)},this)}else{throw new Error("Invalid arguments to SourceListMap.protfotype.add: Expected string, Node or SourceListMap")}}preprend(e,t,n){if(typeof e==="string"){if(t){this.children.unshift(new i(e,t,n))}else if(this.children.length>0&&this.children[this.children.length-1].preprendGeneratedCode){this.children[this.children.length-1].preprendGeneratedCode(e)}else{this.children.unshift(new r(e))}}else if(e.getMappings&&e.getGeneratedCode){this.children.unshift(e)}else if(e.children){e.children.slice().reverse().forEach(function(e){this.children.unshift(e)},this)}else{throw new Error("Invalid arguments to SourceListMap.protfotype.prerend: Expected string, Node or SourceListMap")}}mapGeneratedCode(e){const t=[];this.children.forEach(function(e){e.getNormalizedNodes().forEach(function(e){t.push(e)})});const n=[];t.forEach(function(t){t=t.mapGeneratedCode(e);if(n.length===0){n.push(t)}else{const e=n[n.length-1];const r=e.merge(t);if(r){n[n.length-1]=r}else{n.push(t)}}});return new SourceListMap(n)}toString(){return this.children.map(function(e){return e.getGeneratedCode()}).join("")}toStringWithSourceMap(e){const t=new s;const n=this.children.map(function(e){return e.getGeneratedCode()}).join("");const r=this.children.map(function(e){return e.getMappings(t)}).join("");const i=t.getArrays();return{source:n,map:{version:3,file:e&&e.file,sources:i.sources,sourcesContent:t.hasSourceContent?i.sourcesContent:undefined,mappings:r}}}}e.exports=SourceListMap},176:function(e,t,n){"use strict";const r=n(430);const i=n(495).y;const s=n(495).P;const o=";AACA";class SourceNode{constructor(e,t,n,r){this.generatedCode=e;this.originalSource=n;this.source=t;this.startingLine=r||1;this._numberOfLines=i(this.generatedCode);this._endsWithNewLine=e[e.length-1]==="\n"}clone(){return new SourceNode(this.generatedCode,this.source,this.originalSource,this.startingLine)}getGeneratedCode(){return this.generatedCode}addGeneratedCode(e){this.generatedCode+=e;this._numberOfLines+=i(e);this._endsWithNewLine=e[e.length-1]==="\n"}getMappings(e){if(!this.generatedCode)return"";const t=this._numberOfLines;const n=e.ensureSource(this.source,this.originalSource);let i="A";if(e.unfinishedGeneratedLine)i=","+r.encode(e.unfinishedGeneratedLine);i+=r.encode(n-e.currentSource);i+=r.encode(this.startingLine-e.currentOriginalLine);i+="A";e.currentSource=n;e.currentOriginalLine=this.startingLine+t-1;const u=e.unfinishedGeneratedLine=s(this.generatedCode);i+=Array(t).join(o);if(u===0){i+=";"}else{if(t!==0){i+=o}e.currentOriginalLine++}return i}mapGeneratedCode(e){throw new Error("Cannot map generated code on a SourceMap. Normalize to SingleLineNode first.")}getNormalizedNodes(){var e=[];var t=this.startingLine;var n=this.generatedCode;var r=0;var i=n.length;while(r>1;return t?-n:n}t.encode=function base64VLQ_encode(e){var t="";var n;var r=toVLQSigned(e);do{n=r&u;r>>>=s;if(r>0){n|=a}t+=i.encode(n)}while(r>0);return t};t.decode=function base64VLQ_decode(e,t){var n=0;var r=e.length;var o=0;var c=0;var h,l;do{if(n>=r){throw new Error("Expected more digits in base 64 VLQ value.")}l=i.decode(e.charAt(n++));h=!!(l&a);l&=u;o=o+(l<=0);return t};t.P=function getUnfinishedLine(e){const t=e.lastIndexOf("\n");if(t===-1)return e.length;else return e.length-t-1}},524:function(e,t,n){t.SourceListMap=n(361);n(176);n(664);n(667);n(432);t.fromStringWithSourceMap=n(444)},411:function(e,t,n){"use strict";const r=n(781);class CachedSource extends r{constructor(e){super();this._source=e;this._cachedSource=undefined;this._cachedSize=undefined;this._cachedMaps={};if(e.node)this.node=function(e){return this._source.node(e)};if(e.listMap)this.listMap=function(e){return this._source.listMap(e)}}source(){if(typeof this._cachedSource!=="undefined")return this._cachedSource;return this._cachedSource=this._source.source()}size(){if(typeof this._cachedSize!=="undefined")return this._cachedSize;if(typeof this._cachedSource!=="undefined"){if(Buffer.from.length===1)return new Buffer(this._cachedSource).length;return this._cachedSize=Buffer.byteLength(this._cachedSource)}return this._cachedSize=this._source.size()}sourceAndMap(e){const t=JSON.stringify(e);if(typeof this._cachedSource!=="undefined"&&t in this._cachedMaps)return{source:this._cachedSource,map:this._cachedMaps[t]};else if(typeof this._cachedSource!=="undefined"){return{source:this._cachedSource,map:this._cachedMaps[t]=this._source.map(e)}}else if(t in this._cachedMaps){return{source:this._cachedSource=this._source.source(),map:this._cachedMaps[t]}}const n=this._source.sourceAndMap(e);this._cachedSource=n.source;this._cachedMaps[t]=n.map;return{source:this._cachedSource,map:this._cachedMaps[t]}}map(e){if(!e)e={};const t=JSON.stringify(e);if(t in this._cachedMaps)return this._cachedMaps[t];return this._cachedMaps[t]=this._source.map()}updateHash(e){this._source.updateHash(e)}}e.exports=CachedSource},744:function(e,t,n){"use strict";const r=n(241).SourceNode;const i=n(524).SourceListMap;const s=n(781);class ConcatSource extends s{constructor(){super();this.children=[];for(var e=0;e0)r=n.pop()+r;if(/\n$/.test(e))n.push(t);return r}else{var o=new i(e.line,e.column,e.source,e.children.map(function(e){return cloneAndPrefix(e,t,n)}),e.name);o.sourceContents=e.sourceContents;return o}}class PrefixSource extends r{constructor(e,t){super();this._source=t;this._prefix=e}source(){var e=typeof this._source==="string"?this._source:this._source.source();var t=this._prefix;return t+e.replace(s,"\n"+t)}node(e){var t=this._source.node(e);var n=this._prefix;var r=[];var s=new i;t.walkSourceContents(function(e,t){s.setSourceContent(e,t)});var o=true;t.walk(function(e,t){var s=e.split(/(\n)/);for(var u=0;u=0;--e){n+=t[e]}return n}node(e){var t=this._source.node(e);if(this.replacements.length===0){return t}this._sortReplacements();var n=new ReplacementEnumerator(this.replacements);var r=[];var s=0;var o=Object.create(null);var u=Object.create(null);var a=new i;t.walkSourceContents(function(e,t){a.setSourceContent(e,t);o["$"+e]=t});var c=this._replaceInStringNode.bind(this,r,n,function getOriginalSource(e){var t="$"+e.source;var n=u[t];if(!n){var r=o[t];if(!r)return null;n=r.split("\n").map(function(e){return e+"\n"});u[t]=n}if(e.line>n.length)return null;var i=n[e.line-1];return i.substr(e.column)});t.walk(function(e,t){s=c(e,s,t)});var h=n.footer();if(h){r.push(h)}a.add(r);return a}listMap(e){this._sortReplacements();var t=this._source.listMap(e);var n=0;var r=this.replacements;var i=r.length-1;var s=0;t=t.mapGeneratedCode(function(e){var t=n+e.length;if(s>e.length){s-=e.length;e=""}else{if(s>0){e=e.substr(s);n+=s;s=0}var o="";while(i>=0&&r[i].start=0){o+=r[i].content;i--}if(o){t.add(o)}return t}_splitString(e,t){return t<=0?["",e]:[e.substr(0,t),e.substr(t)]}_replaceInStringNode(e,t,n,r,s,o){var u=undefined;do{var a=t.position-s;if(a<0){a=0}if(a>=r.length||t.done){if(t.emit){var c=new i(o.line,o.column,o.source,r,o.name);e.push(c)}return s+r.length}var h=o.column;var l;if(a>0){l=r.slice(0,a);if(u===undefined){u=n(o)}if(u&&u.length>=a&&u.startsWith(l)){o.column+=a;u=u.substr(a)}}var f=t.next();if(!f){if(a>0){var d=new i(o.line,h,o.source,l,o.name);e.push(d)}if(t.value){e.push(new i(o.line,o.column,o.source,t.value,o.name||t.name))}}r=r.substr(a);s+=a}while(true)}}class ReplacementEnumerator{constructor(e){this.replacements=e||[];this.index=this.replacements.length;this.done=false;this.emit=false;this.next()}next(){if(this.done)return true;if(this.emit){var e=this.replacements[this.index];var t=Math.floor(e.end+1);this.position=t;this.value=e.content;this.name=e.name}else{this.index--;if(this.index<0){this.done=true}else{var n=this.replacements[this.index];var r=Math.floor(n.start);this.position=r}}if(this.position<0)this.position=0;this.emit=!this.emit;return this.emit}footer(){if(!this.done&&!this.emit)this.next();if(this.done){return[]}else{var e="";for(var t=this.index;t>=0;t--){var n=this.replacements[t];e+=n.content}return e}}}n(733)(ReplaceSource.prototype);e.exports=ReplaceSource},781:function(e,t,n){"use strict";var r=n(241).SourceNode;var i=n(241).SourceMapConsumer;class Source{source(){throw new Error("Abstract")}size(){if(Buffer.from.length===1)return new Buffer(this.source()).length;return Buffer.byteLength(this.source())}map(e){return null}sourceAndMap(e){return{source:this.source(),map:this.map()}}node(){throw new Error("Abstract")}listNode(){throw new Error("Abstract")}updateHash(e){var t=this.source();e.update(t||"")}}e.exports=Source},733:function(e){"use strict";e.exports=function mixinSourceAndMap(e){e.map=function(e){e=e||{};if(e.columns===false){return this.listMap(e).toStringWithSourceMap({file:"x"}).map}return this.node(e).toStringWithSourceMap({file:"x"}).map.toJSON()};e.sourceAndMap=function(e){e=e||{};if(e.columns===false){return this.listMap(e).toStringWithSourceMap({file:"x"})}var t=this.node(e).toStringWithSourceMap({file:"x"});return{source:t.code,map:t.map.toJSON()}}}},203:function(e,t,n){"use strict";var r=n(241).SourceNode;var i=n(241).SourceMapConsumer;var s=n(241).SourceMapGenerator;var o=n(524).SourceListMap;var u=n(524).fromStringWithSourceMap;var a=n(781);var c=n(540);class SourceMapSource extends a{constructor(e,t,n,r,i,s){super();this._value=e;this._name=t;this._sourceMap=n;this._originalSource=r;this._innerSourceMap=i;this._removeOriginalSource=s}source(){return this._value}node(e){var t=this._sourceMap;var n=r.fromStringWithSourceMap(this._value,new i(t));n.setSourceContent(this._name,this._originalSource);var s=this._innerSourceMap;if(s){n=c(n,new i(s),this._name,this._removeOriginalSource)}return n}listMap(e){e=e||{};if(e.module===false)return new o(this._value,this._name,this._value);return u(this._value,typeof this._sourceMap==="string"?JSON.parse(this._sourceMap):this._sourceMap)}updateHash(e){e.update(this._value);if(this._originalSource)e.update(this._originalSource)}}n(733)(SourceMapSource.prototype);e.exports=SourceMapSource},540:function(e,t,n){"use strict";var r=n(241).SourceNode;var i=n(241).SourceMapConsumer;var s=function(e,t,n,s){var o=new r;var u=[];var a={};var c={};var h={};var l={};t.eachMapping(function(e){(c[e.generatedLine]=c[e.generatedLine]||[]).push(e)},null,i.GENERATED_ORDER);e.walkSourceContents(function(e,t){a["$"+e]=t});var f=a["$"+n];var d=f?f.split("\n"):undefined;e.walk(function(e,i){var f;if(i.source===n&&i.line&&c[i.line]){var p;var v=c[i.line];for(var _=0;_0){var C=S.slice(p.generatedColumn,i.column);var b=L.slice(p.originalColumn,p.originalColumn+x);if(C===b){p=Object.assign({},p,{originalColumn:p.originalColumn+x,generatedColumn:i.column})}}if(!p.name&&i.name){g=L.slice(p.originalColumn,p.originalColumn+i.name.length)===i.name}}}f=p.source;u.push(new r(p.originalLine,p.originalColumn,f,e,g?i.name:p.name));if(!("$"+f in h)){h["$"+f]=true;var y=t.sourceContentFor(f,true);if(y){o.setSourceContent(f,y)}}return}}if(s&&i.source===n||!i.source){u.push(e);return}f=i.source;u.push(new r(i.line,i.column,f,e,i.name));if("$"+f in a){if(!("$"+f in h)){o.setSourceContent(f,a["$"+f]);delete a["$"+f]}}});o.add(u);return o};e.exports=s},368:function(e,t,n){t.Source=n(781);t.RawSource=n(76);t.OriginalSource=n(221);t.SourceMapSource=n(203);t.LineToLineMappedSource=n(820);t.CachedSource=n(411);t.ConcatSource=n(744);t.ReplaceSource=n(22);t.PrefixSource=n(141)},241:function(e){"use strict";e.exports=require("next/dist/compiled/source-map")}};var t={};function __nccwpck_require__(n){if(t[n]){return t[n].exports}var r=t[n]={exports:{}};var i=true;try{e[n](r,r.exports,__nccwpck_require__);i=false}finally{if(i)delete t[n]}return r.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(368)}(); \ No newline at end of file diff --git a/packages/next/compiled/webpack-sources/package.json b/packages/next/compiled/webpack-sources/package.json new file mode 100644 index 000000000000000..acd3193c9f72756 --- /dev/null +++ b/packages/next/compiled/webpack-sources/package.json @@ -0,0 +1 @@ +{"name":"webpack-sources","main":"index.js","author":"Tobias Koppers @sokra","license":"MIT"} diff --git a/packages/next/compiled/webpack-sources2/LICENSE b/packages/next/compiled/webpack-sources2/LICENSE new file mode 100644 index 000000000000000..7c6f8955dc016fb --- /dev/null +++ b/packages/next/compiled/webpack-sources2/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 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/packages/next/compiled/webpack-sources2/index.js b/packages/next/compiled/webpack-sources2/index.js new file mode 100644 index 000000000000000..3000d2d920d99b5 --- /dev/null +++ b/packages/next/compiled/webpack-sources2/index.js @@ -0,0 +1 @@ +module.exports=function(){var e={233:function(e,t,s){"use strict";const n=s(335).y;const i=s(335).P;class CodeNode{constructor(e){this.generatedCode=e}clone(){return new CodeNode(this.generatedCode)}getGeneratedCode(){return this.generatedCode}getMappings(e){const t=n(this.generatedCode);const s=Array(t+1).join(";");if(t>0){e.unfinishedGeneratedLine=i(this.generatedCode);if(e.unfinishedGeneratedLine>0){return s+"A"}else{return s}}else{const t=e.unfinishedGeneratedLine;e.unfinishedGeneratedLine+=i(this.generatedCode);if(t===0&&e.unfinishedGeneratedLine>0){return"A"}else{return""}}}addGeneratedCode(e){this.generatedCode+=e}mapGeneratedCode(e){const t=e(this.generatedCode);return new CodeNode(t)}getNormalizedNodes(){return[this]}merge(e){if(e instanceof CodeNode){this.generatedCode+=e.generatedCode;return this}return false}}e.exports=CodeNode},940:function(e){"use strict";class MappingsContext{constructor(){this.sourcesIndices=new Map;this.sourcesContent=new Map;this.hasSourceContent=false;this.currentOriginalLine=1;this.currentSource=0;this.unfinishedGeneratedLine=false}ensureSource(e,t){let s=this.sourcesIndices.get(e);if(typeof s==="number"){return s}s=this.sourcesIndices.size;this.sourcesIndices.set(e,s);this.sourcesContent.set(e,t);if(typeof t==="string")this.hasSourceContent=true;return s}getArrays(){const e=[];const t=[];for(const s of this.sourcesContent){e.push(s[0]);t.push(s[1])}return{sources:e,sourcesContent:t}}}e.exports=MappingsContext},482:function(e,t,s){"use strict";const n=s(439);const i=s(335).y;const r=s(335).P;const u=";AAAA";class SingleLineNode{constructor(e,t,s,n){this.generatedCode=e;this.originalSource=s;this.source=t;this.line=n||1;this._numberOfLines=i(this.generatedCode);this._endsWithNewLine=e[e.length-1]==="\n"}clone(){return new SingleLineNode(this.generatedCode,this.source,this.originalSource,this.line)}getGeneratedCode(){return this.generatedCode}getMappings(e){if(!this.generatedCode)return"";const t=this._numberOfLines;const s=e.ensureSource(this.source,this.originalSource);let i="A";if(e.unfinishedGeneratedLine)i=","+n.encode(e.unfinishedGeneratedLine);i+=n.encode(s-e.currentSource);i+=n.encode(this.line-e.currentOriginalLine);i+="A";e.currentSource=s;e.currentOriginalLine=this.line;const o=e.unfinishedGeneratedLine=r(this.generatedCode);i+=Array(t).join(u);if(o===0){i+=";"}else{if(t!==0)i+=u}return i}getNormalizedNodes(){return[this]}mapGeneratedCode(e){const t=e(this.generatedCode);return new SingleLineNode(t,this.source,this.originalSource,this.line)}merge(e){if(e instanceof SingleLineNode){return this.mergeSingleLineNode(e)}return false}mergeSingleLineNode(e){if(this.source===e.source&&this.originalSource===e.originalSource){if(this.line===e.line){this.generatedCode+=e.generatedCode;this._numberOfLines+=e._numberOfLines;this._endsWithNewLine=e._endsWithNewLine;return this}else if(this.line+1===e.line&&this._endsWithNewLine&&this._numberOfLines===1&&e._numberOfLines<=1){return new o(this.generatedCode+e.generatedCode,this.source,this.originalSource,this.line)}}return false}}e.exports=SingleLineNode;const o=s(839)},950:function(e,t,s){"use strict";const n=s(233);const i=s(839);const r=s(940);const u=s(335).y;class SourceListMap{constructor(e,t,s){if(Array.isArray(e)){this.children=e}else{this.children=[];if(e||t)this.add(e,t,s)}}add(e,t,s){if(typeof e==="string"){if(t){this.children.push(new i(e,t,s))}else if(this.children.length>0&&this.children[this.children.length-1]instanceof n){this.children[this.children.length-1].addGeneratedCode(e)}else{this.children.push(new n(e))}}else if(e.getMappings&&e.getGeneratedCode){this.children.push(e)}else if(e.children){e.children.forEach(function(e){this.children.push(e)},this)}else{throw new Error("Invalid arguments to SourceListMap.protfotype.add: Expected string, Node or SourceListMap")}}preprend(e,t,s){if(typeof e==="string"){if(t){this.children.unshift(new i(e,t,s))}else if(this.children.length>0&&this.children[this.children.length-1].preprendGeneratedCode){this.children[this.children.length-1].preprendGeneratedCode(e)}else{this.children.unshift(new n(e))}}else if(e.getMappings&&e.getGeneratedCode){this.children.unshift(e)}else if(e.children){e.children.slice().reverse().forEach(function(e){this.children.unshift(e)},this)}else{throw new Error("Invalid arguments to SourceListMap.protfotype.prerend: Expected string, Node or SourceListMap")}}mapGeneratedCode(e){const t=[];this.children.forEach(function(e){e.getNormalizedNodes().forEach(function(e){t.push(e)})});const s=[];t.forEach(function(t){t=t.mapGeneratedCode(e);if(s.length===0){s.push(t)}else{const e=s[s.length-1];const n=e.merge(t);if(n){s[s.length-1]=n}else{s.push(t)}}});return new SourceListMap(s)}toString(){return this.children.map(function(e){return e.getGeneratedCode()}).join("")}toStringWithSourceMap(e){const t=new r;const s=this.children.map(function(e){return e.getGeneratedCode()}).join("");const n=this.children.map(function(e){return e.getMappings(t)}).join("");const i=t.getArrays();return{source:s,map:{version:3,file:e&&e.file,sources:i.sources,sourcesContent:t.hasSourceContent?i.sourcesContent:undefined,mappings:n}}}}e.exports=SourceListMap},839:function(e,t,s){"use strict";const n=s(439);const i=s(335).y;const r=s(335).P;const u=";AACA";class SourceNode{constructor(e,t,s,n){this.generatedCode=e;this.originalSource=s;this.source=t;this.startingLine=n||1;this._numberOfLines=i(this.generatedCode);this._endsWithNewLine=e[e.length-1]==="\n"}clone(){return new SourceNode(this.generatedCode,this.source,this.originalSource,this.startingLine)}getGeneratedCode(){return this.generatedCode}addGeneratedCode(e){this.generatedCode+=e;this._numberOfLines+=i(e);this._endsWithNewLine=e[e.length-1]==="\n"}getMappings(e){if(!this.generatedCode)return"";const t=this._numberOfLines;const s=e.ensureSource(this.source,this.originalSource);let i="A";if(e.unfinishedGeneratedLine)i=","+n.encode(e.unfinishedGeneratedLine);i+=n.encode(s-e.currentSource);i+=n.encode(this.startingLine-e.currentOriginalLine);i+="A";e.currentSource=s;e.currentOriginalLine=this.startingLine+t-1;const o=e.unfinishedGeneratedLine=r(this.generatedCode);i+=Array(t).join(u);if(o===0){i+=";"}else{if(t!==0){i+=u}e.currentOriginalLine++}return i}mapGeneratedCode(e){throw new Error("Cannot map generated code on a SourceMap. Normalize to SingleLineNode first.")}getNormalizedNodes(){var e=[];var t=this.startingLine;var s=this.generatedCode;var n=0;var i=s.length;while(n>1;return t?-s:s}t.encode=function base64VLQ_encode(e){var t="";var s;var n=toVLQSigned(e);do{s=n&o;n>>>=r;if(n>0){s|=f}t+=i.encode(s)}while(n>0);return t};t.decode=function base64VLQ_decode(e,t){var s=0;var n=e.length;var u=0;var c=0;var h,a;do{if(s>=n){throw new Error("Expected more digits in base 64 VLQ value.")}a=i.decode(e.charAt(s++));h=!!(a&f);a&=o;u=u+(a<=0);return t};t.P=function getUnfinishedLine(e){const t=e.lastIndexOf("\n");if(t===-1)return e.length;else return e.length-t-1}},728:function(e,t,s){t.SourceListMap=s(950);t.SourceNode=s(839);t.SingleLineNode=s(482);t.CodeNode=s(233);t.MappingsContext=s(940);t.fromStringWithSourceMap=s(835)},357:function(e,t,s){"use strict";const n=s(598);const i=e=>{if(typeof e!=="object"||!e)return e;const t=Object.assign({},e);if(e.mappings){t.mappings=Buffer.from(e.mappings,"utf-8")}if(e.sourcesContent){t.sourcesContent=e.sourcesContent.map(e=>e&&Buffer.from(e,"utf-8"))}return t};const r=e=>{if(typeof e!=="object"||!e)return e;const t=Object.assign({},e);if(e.mappings){t.mappings=e.mappings.toString("utf-8")}if(e.sourcesContent){t.sourcesContent=e.sourcesContent.map(e=>e&&e.toString("utf-8"))}return t};class CachedSource extends n{constructor(e,t){super();this._source=e;this._cachedSourceType=t?t.source:undefined;this._cachedSource=undefined;this._cachedBuffer=t?t.buffer:undefined;this._cachedSize=t?t.size:undefined;this._cachedMaps=t?t.maps:new Map;this._cachedHashUpdate=t?t.hash:undefined}getCachedData(){if(this._cachedSource){this.buffer()}const e=new Map;for(const t of this._cachedMaps){if(t[1].bufferedMap===undefined){t[1].bufferedMap=i(t[1].map)}e.set(t[0],{map:undefined,bufferedMap:t[1].bufferedMap})}return{buffer:this._cachedBuffer,source:this._cachedSourceType!==undefined?this._cachedSourceType:typeof this._cachedSource==="string"?true:Buffer.isBuffer(this._cachedSource)?false:undefined,size:this._cachedSize,maps:e,hash:this._cachedHashUpdate}}originalLazy(){return this._source}original(){if(typeof this._source==="function")this._source=this._source();return this._source}source(){if(this._cachedSource!==undefined)return this._cachedSource;if(this._cachedBuffer&&this._cachedSourceType!==undefined){return this._cachedSource=this._cachedSourceType?this._cachedBuffer.toString("utf-8"):this._cachedBuffer}else{return this._cachedSource=this.original().source()}}buffer(){if(typeof this._cachedBuffer!=="undefined")return this._cachedBuffer;if(typeof this._cachedSource!=="undefined"){if(Buffer.isBuffer(this._cachedSource)){return this._cachedBuffer=this._cachedSource}return this._cachedBuffer=Buffer.from(this._cachedSource,"utf-8")}if(typeof this.original().buffer==="function"){return this._cachedBuffer=this.original().buffer()}const e=this.source();if(Buffer.isBuffer(e)){return this._cachedBuffer=e}return this._cachedBuffer=Buffer.from(e,"utf-8")}size(){if(typeof this._cachedSize!=="undefined")return this._cachedSize;if(typeof this._cachedSource!=="undefined"){return this._cachedSize=Buffer.byteLength(this._cachedSource)}if(typeof this._cachedBuffer!=="undefined"){return this._cachedSize=this._cachedBuffer.length}return this._cachedSize=this.original().size()}sourceAndMap(e){const t=e?JSON.stringify(e):"{}";let s=this._cachedMaps.get(t);if(s&&s.map===undefined){s.map=r(s.bufferedMap)}if(typeof this._cachedSource!=="undefined"){if(s===undefined){const s=this.original().map(e);this._cachedMaps.set(t,{map:s,bufferedMap:undefined});return{source:this._cachedSource,map:s}}else{return{source:this._cachedSource,map:s.map}}}else if(s!==undefined){return{source:this._cachedSource=this.original().source(),map:s.map}}else{const s=this.original().sourceAndMap(e);this._cachedSource=s.source;this._cachedMaps.set(t,{map:s.map,bufferedMap:undefined});return s}}map(e){const t=e?JSON.stringify(e):"{}";let s=this._cachedMaps.get(t);if(s!==undefined){if(s.map===undefined){s.map=r(s.bufferedMap)}return s.map}const n=this.original().map(e);this._cachedMaps.set(t,{map:n,bufferedMap:undefined});return n}updateHash(e){if(this._cachedHashUpdate!==undefined){for(const t of this._cachedHashUpdate)e.update(t);return}const t=[];let s=undefined;const n={update:e=>{if(typeof e==="string"&&e.length<10240){if(s===undefined){s=e}else{s+=e;if(s>102400){t.push(Buffer.from(s));s=undefined}}}else{if(s!==undefined){t.push(Buffer.from(s));s=undefined}t.push(e)}}};this.original().updateHash(n);if(s!==undefined){t.push(Buffer.from(s))}for(const s of t)e.update(s);this._cachedHashUpdate=t}}e.exports=CachedSource},973:function(e,t,s){"use strict";const n=s(598);class CompatSource extends n{static from(e){return e instanceof n?e:new CompatSource(e)}constructor(e){super();this._sourceLike=e}source(){return this._sourceLike.source()}buffer(){if(typeof this._sourceLike.buffer==="function"){return this._sourceLike.buffer()}return super.buffer()}size(){if(typeof this._sourceLike.size==="function"){return this._sourceLike.size()}return super.size()}map(e){if(typeof this._sourceLike.map==="function"){return this._sourceLike.map(e)}return super.map(e)}sourceAndMap(e){if(typeof this._sourceLike.sourceAndMap==="function"){return this._sourceLike.sourceAndMap(e)}return super.sourceAndMap(e)}updateHash(e){if(typeof this._sourceLike.updateHash==="function"){return this._sourceLike.updateHash(e)}if(typeof this._sourceLike.map==="function"){throw new Error("A Source-like object with a 'map' method must also provide an 'updateHash' method")}e.update(this.buffer())}}e.exports=CompatSource},944:function(e,t,s){"use strict";const n=s(598);const i=s(891);const{SourceNode:r,SourceMapConsumer:u}=s(241);const{SourceListMap:o,fromStringWithSourceMap:f}=s(728);const{getSourceAndMap:c,getMap:h}=s(791);const a=new WeakSet;class ConcatSource extends n{constructor(){super();this._children=[];for(let e=0;e{if(s===undefined){s=e}else if(Array.isArray(s)){s.push(e)}else{s=[typeof s==="string"?s:s.source(),e]}};const r=e=>{if(s===undefined){s=e}else if(Array.isArray(s)){s.push(e.source())}else{s=[typeof s==="string"?s:s.source(),e.source()]}};const u=()=>{if(Array.isArray(s)){const t=new i(s.join(""));a.add(t);e.push(t)}else if(typeof s==="string"){const t=new i(s);a.add(t);e.push(t)}else{e.push(s)}};for(const i of this._children){if(typeof i==="string"){if(t===undefined){t=i}else{t+=i}}else{if(t!==undefined){n(t);t=undefined}if(a.has(i)){r(i)}else{if(s!==undefined){u();s=undefined}e.push(i)}}}if(t!==undefined){n(t)}if(s!==undefined){u()}this._children=e;this._isOptimized=true}}e.exports=ConcatSource},389:function(e,t,s){"use strict";const n=s(598);const{SourceNode:i}=s(241);const{SourceListMap:r}=s(728);const{getSourceAndMap:u,getMap:o}=s(791);const f=/(?!$)[^\n\r;{}]*[\n\r;{}]*/g;function _splitCode(e){return e.match(f)||[]}class OriginalSource extends n{constructor(e,t){super();const s=Buffer.isBuffer(e);this._value=s?undefined:e;this._valueAsBuffer=s?e:undefined;this._name=t}getName(){return this._name}source(){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}return this._value}buffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}return this._valueAsBuffer}map(e){return o(this,e)}sourceAndMap(e){return u(this,e)}node(e){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}const t=this._value;const s=this._name;const n=t.split("\n");const r=new i(null,null,null,n.map(function(t,r){let u=0;if(e&&e.columns===false){const e=t+(r!==n.length-1?"\n":"");return new i(r+1,0,s,e)}return new i(null,null,null,_splitCode(t+(r!==n.length-1?"\n":"")).map(function(e){if(/^\s*$/.test(e)){u+=e.length;return e}const t=new i(r+1,u,s,e);u+=e.length;return t}))}));r.setSourceContent(s,t);return r}listMap(e){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}return new r(this._value,this._name,this._value)}updateHash(e){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}e.update("OriginalSource");e.update(this._valueAsBuffer);e.update(this._name||"")}}e.exports=OriginalSource},193:function(e,t,s){"use strict";const n=s(598);const i=s(891);const{SourceNode:r}=s(241);const{getSourceAndMap:u,getMap:o}=s(791);const f=/\n(?=.|\s)/g;class PrefixSource extends n{constructor(e,t){super();this._source=typeof t==="string"||Buffer.isBuffer(t)?new i(t,true):t;this._prefix=e}getPrefix(){return this._prefix}original(){return this._source}source(){const e=this._source.source();const t=this._prefix;return t+e.replace(f,"\n"+t)}map(e){return o(this,e)}sourceAndMap(e){return u(this,e)}node(e){const t=this._source.node(e);const s=this._prefix;const n=[];const i=new r;t.walkSourceContents(function(e,t){i.setSourceContent(e,t)});let u=true;t.walk(function(e,t){const i=e.split(/(\n)/);for(let e=0;e{return e.insertIndex-t.insertIndex});return e}replace(e,t,s,n){if(typeof s!=="string")throw new Error("insertion must be a string, but is a "+typeof s);this._replacements.push(new Replacement(e,t,s,this._replacements.length,n));this._isSorted=false}insert(e,t,s){if(typeof t!=="string")throw new Error("insertion must be a string, but is a "+typeof t+": "+t);this._replacements.push(new Replacement(e,e-1,t,this._replacements.length,s));this._isSorted=false}source(){return this._replaceString(this._source.source())}map(e){if(this._replacements.length===0){return this._source.map(e)}return u(this,e)}sourceAndMap(e){if(this._replacements.length===0){return this._source.sourceAndMap(e)}return r(this,e)}original(){return this._source}_sortReplacements(){if(this._isSorted)return;this._replacements.sort(function(e,t){const s=t.end-e.end;if(s!==0)return s;const n=t.start-e.start;if(n!==0)return n;return t.insertIndex-e.insertIndex});this._isSorted=true}_replaceString(e){if(typeof e!=="string")throw new Error("str must be a string, but is a "+typeof e+": "+e);this._sortReplacements();const t=[e];this._replacements.forEach(function(e){const s=t.pop();const n=this._splitString(s,Math.floor(e.end+1));const i=this._splitString(n[0],Math.floor(e.start));t.push(n[1],e.content,i[0])},this);let s="";for(let e=t.length-1;e>=0;--e){s+=t[e]}return s}node(e){const t=o(this._source,e);if(this._replacements.length===0){return t}this._sortReplacements();const s=new ReplacementEnumerator(this._replacements);const n=[];let r=0;const u=Object.create(null);const f=Object.create(null);const c=new i;t.walkSourceContents(function(e,t){c.setSourceContent(e,t);u["$"+e]=t});const h=this._replaceInStringNode.bind(this,n,s,function getOriginalSource(e){const t="$"+e.source;let s=f[t];if(!s){const e=u[t];if(!e)return null;s=e.split("\n").map(function(e){return e+"\n"});f[t]=s}if(e.line>s.length)return null;const n=s[e.line-1];return n.substr(e.column)});t.walk(function(e,t){r=h(e,r,t)});const a=s.footer();if(a){n.push(a)}c.add(n);return c}listMap(e){let t=f(this._source,e);this._sortReplacements();let s=0;const n=this._replacements;let i=n.length-1;let r=0;t=t.mapGeneratedCode(function(e){const t=s+e.length;if(r>e.length){r-=e.length;e=""}else{if(r>0){e=e.substr(r);s+=r;r=0}let u="";while(i>=0&&n[i].start=0){u+=n[i].content;i--}if(u){t.add(u)}return t}_splitString(e,t){return t<=0?["",e]:[e.substr(0,t),e.substr(t)]}_replaceInStringNode(e,t,s,n,r,u){let o=undefined;do{let f=t.position-r;if(f<0){f=0}if(f>=n.length||t.done){if(t.emit){const t=new i(u.line,u.column,u.source,n,u.name);e.push(t)}return r+n.length}const c=u.column;let h;if(f>0){h=n.slice(0,f);if(o===undefined){o=s(u)}if(o&&o.length>=f&&o.startsWith(h)){u.column+=f;o=o.substr(f)}}const a=t.next();if(!a){if(f>0){const t=new i(u.line,c,u.source,h,u.name);e.push(t)}if(t.value){e.push(new i(u.line,u.column,u.source,t.value,u.name||t.name))}}n=n.substr(f);r+=f}while(true)}updateHash(e){this._sortReplacements();e.update("ReplaceSource");this._source.updateHash(e);e.update(this._name||"");for(const t of this._replacements){e.update(`${t.start}`);e.update(`${t.end}`);e.update(`${t.content}`);e.update(`${t.insertIndex}`);e.update(`${t.name}`)}}}class ReplacementEnumerator{constructor(e){this.replacements=e||[];this.index=this.replacements.length;this.done=false;this.emit=false;this.next()}next(){if(this.done)return true;if(this.emit){const e=this.replacements[this.index];const t=Math.floor(e.end+1);this.position=t;this.value=e.content;this.name=e.name}else{this.index--;if(this.index<0){this.done=true}else{const e=this.replacements[this.index];const t=Math.floor(e.start);this.position=t}}if(this.position<0)this.position=0;this.emit=!this.emit;return this.emit}footer(){if(!this.done&&!this.emit)this.next();if(this.done){return[]}else{let e="";for(let t=this.index;t>=0;t--){const s=this.replacements[t];e+=s.content}return e}}}e.exports=ReplaceSource},271:function(e,t,s){"use strict";const n=s(598);class SizeOnlySource extends n{constructor(e){super();this._size=e}_error(){return new Error("Content and Map of this Source is not available (only size() is supported)")}size(){return this._size}source(){throw this._error()}buffer(){throw this._error()}map(e){throw this._error()}updateHash(){throw this._error()}}e.exports=SizeOnlySource},598:function(e){"use strict";class Source{source(){throw new Error("Abstract")}buffer(){const e=this.source();if(Buffer.isBuffer(e))return e;return Buffer.from(e,"utf-8")}size(){return this.buffer().length}map(e){return null}sourceAndMap(e){return{source:this.source(),map:this.map(e)}}updateHash(e){throw new Error("Abstract")}}e.exports=Source},287:function(e,t,s){"use strict";const n=s(598);const{SourceNode:i,SourceMapConsumer:r}=s(241);const{SourceListMap:u,fromStringWithSourceMap:o}=s(728);const{getSourceAndMap:f,getMap:c}=s(791);const h=s(462);class SourceMapSource extends n{constructor(e,t,s,n,i,r){super();const u=Buffer.isBuffer(e);this._valueAsString=u?undefined:e;this._valueAsBuffer=u?e:undefined;this._name=t;this._hasSourceMap=!!s;const o=Buffer.isBuffer(s);const f=typeof s==="string";this._sourceMapAsObject=o||f?undefined:s;this._sourceMapAsString=f?s:undefined;this._sourceMapAsBuffer=o?s:undefined;this._hasOriginalSource=!!n;const c=Buffer.isBuffer(n);this._originalSourceAsString=c?undefined:n;this._originalSourceAsBuffer=c?n:undefined;this._hasInnerSourceMap=!!i;const h=Buffer.isBuffer(i);const a=typeof i==="string";this._innerSourceMapAsObject=h||a?undefined:i;this._innerSourceMapAsString=a?i:undefined;this._innerSourceMapAsBuffer=h?i:undefined;this._removeOriginalSource=r}_ensureValueBuffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._valueAsString,"utf-8")}}_ensureValueString(){if(this._valueAsString===undefined){this._valueAsString=this._valueAsBuffer.toString("utf-8")}}_ensureOriginalSourceBuffer(){if(this._originalSourceAsBuffer===undefined&&this._hasOriginalSource){this._originalSourceAsBuffer=Buffer.from(this._originalSourceAsString,"utf-8")}}_ensureOriginalSourceString(){if(this._originalSourceAsString===undefined&&this._hasOriginalSource){this._originalSourceAsString=this._originalSourceAsBuffer.toString("utf-8")}}_ensureInnerSourceMapObject(){if(this._innerSourceMapAsObject===undefined&&this._hasInnerSourceMap){this._ensureInnerSourceMapString();this._innerSourceMapAsObject=JSON.parse(this._innerSourceMapAsString)}}_ensureInnerSourceMapBuffer(){if(this._innerSourceMapAsBuffer===undefined&&this._hasInnerSourceMap){this._ensureInnerSourceMapString();this._innerSourceMapAsBuffer=Buffer.from(this._innerSourceMapAsString,"utf-8")}}_ensureInnerSourceMapString(){if(this._innerSourceMapAsString===undefined&&this._hasInnerSourceMap){if(this._innerSourceMapAsBuffer!==undefined){this._innerSourceMapAsString=this._innerSourceMapAsBuffer.toString("utf-8")}else{this._innerSourceMapAsString=JSON.stringify(this._innerSourceMapAsObject)}}}_ensureSourceMapObject(){if(this._sourceMapAsObject===undefined){this._ensureSourceMapString();this._sourceMapAsObject=JSON.parse(this._sourceMapAsString)}}_ensureSourceMapBuffer(){if(this._sourceMapAsBuffer===undefined){this._ensureSourceMapString();this._sourceMapAsBuffer=Buffer.from(this._sourceMapAsString,"utf-8")}}_ensureSourceMapString(){if(this._sourceMapAsString===undefined){if(this._sourceMapAsBuffer!==undefined){this._sourceMapAsString=this._sourceMapAsBuffer.toString("utf-8")}else{this._sourceMapAsString=JSON.stringify(this._sourceMapAsObject)}}}getArgsAsBuffers(){this._ensureValueBuffer();this._ensureSourceMapBuffer();this._ensureOriginalSourceBuffer();this._ensureInnerSourceMapBuffer();return[this._valueAsBuffer,this._name,this._sourceMapAsBuffer,this._originalSourceAsBuffer,this._innerSourceMapAsBuffer,this._removeOriginalSource]}source(){this._ensureValueString();return this._valueAsString}map(e){if(!this._hasInnerSourceMap){this._ensureSourceMapObject();return this._sourceMapAsObject}return c(this,e)}sourceAndMap(e){if(!this._hasInnerSourceMap){this._ensureValueString();this._ensureSourceMapObject();return{source:this._valueAsString,map:this._sourceMapAsObject}}return f(this,e)}node(e){this._ensureValueString();this._ensureSourceMapObject();this._ensureOriginalSourceString();let t=i.fromStringWithSourceMap(this._valueAsString,new r(this._sourceMapAsObject));t.setSourceContent(this._name,this._originalSourceAsString);if(this._hasInnerSourceMap){this._ensureInnerSourceMapObject();t=h(t,new r(this._innerSourceMapAsObject),this._name,this._removeOriginalSource)}return t}listMap(e){this._ensureValueString();this._ensureSourceMapObject();e=e||{};if(e.module===false)return new u(this._valueAsString,this._name,this._valueAsString);return o(this._valueAsString,this._sourceMapAsObject)}updateHash(e){this._ensureValueBuffer();this._ensureSourceMapBuffer();this._ensureOriginalSourceBuffer();this._ensureInnerSourceMapBuffer();e.update("SourceMapSource");e.update(this._valueAsBuffer);e.update(this._sourceMapAsBuffer);if(this._hasOriginalSource){e.update(this._originalSourceAsBuffer)}if(this._hasInnerSourceMap){e.update(this._innerSourceMapAsBuffer)}e.update(this._removeOriginalSource?"true":"false")}}e.exports=SourceMapSource},462:function(e,t,s){"use strict";const n=s(241).SourceNode;const i=s(241).SourceMapConsumer;const r=function(e,t,s,r){const u=new n;const o=[];const f={};const c={};const h={};const a={};t.eachMapping(function(e){(c[e.generatedLine]=c[e.generatedLine]||[]).push(e)},null,i.GENERATED_ORDER);const l=(e,t)=>{const s=c[e];let n=0;let i=s.length;while(n>1;if(s[e].generatedColumn<=t){n=e+1}else{i=e}}if(n===0)return undefined;return s[n-1]};e.walkSourceContents(function(e,t){f["$"+e]=t});const d=f["$"+s];const p=d?d.split("\n"):undefined;e.walk(function(e,i){if(i.source===s&&i.line&&c[i.line]){let s=l(i.line,i.column);if(s){let r=false;let f;let c;let l;const d=s.source;if(p&&d&&(f=p[s.generatedLine-1])&&((l=a[d])||(c=t.sourceContentFor(d,true)))){if(!l){l=a[d]=c.split("\n")}const e=l[s.originalLine-1];if(e){const t=i.column-s.generatedColumn;if(t>0){const n=f.slice(s.generatedColumn,i.column);const r=e.slice(s.originalColumn,s.originalColumn+t);if(n===r){s=Object.assign({},s,{originalColumn:s.originalColumn+t,generatedColumn:i.column,name:undefined})}}if(!s.name&&i.name){r=e.slice(s.originalColumn,s.originalColumn+i.name.length)===i.name}}}let _=s.source;if(_&&_!=="."){o.push(new n(s.originalLine,s.originalColumn,_,e,r?i.name:s.name));if(!("$"+_ in h)){h["$"+_]=true;const e=t.sourceContentFor(_,true);if(e){u.setSourceContent(_,e)}}return}}}if(r&&i.source===s||!i.source){o.push(e);return}const d=i.source;o.push(new n(i.line,i.column,d,e,i.name));if("$"+d in f){if(!("$"+d in h)){u.setSourceContent(d,f["$"+d]);delete f["$"+d]}}});u.add(o);return u};e.exports=r},791:function(e,t,s){"use strict";const{SourceNode:n,SourceMapConsumer:i}=s(241);const{SourceListMap:r,fromStringWithSourceMap:u}=s(728);t.getSourceAndMap=((e,t)=>{let s;let n;if(t&&t.columns===false){const i=e.listMap(t).toStringWithSourceMap({file:"x"});s=i.source;n=i.map}else{const i=e.node(t).toStringWithSourceMap({file:"x"});s=i.code;n=i.map.toJSON()}if(!n||!n.sources||n.sources.length===0)n=null;return{source:s,map:n}});t.getMap=((e,t)=>{let s;if(t&&t.columns===false){s=e.listMap(t).toStringWithSourceMap({file:"x"}).map}else{s=e.node(t).toStringWithSourceMap({file:"x"}).map.toJSON()}if(!s||!s.sources||s.sources.length===0)return null;return s});t.getNode=((e,t)=>{if(typeof e.node==="function"){return e.node(t)}else{const s=e.sourceAndMap(t);if(s.map){return n.fromStringWithSourceMap(s.source,new i(s.map))}else{return new n(null,null,null,s.source)}}});t.getListMap=((e,t)=>{if(typeof e.listMap==="function"){return e.listMap(t)}else{const s=e.sourceAndMap(t);if(s.map){return u(s.source,s.map)}else{return new r(s.source)}}})},351:function(e,t,s){const n=(e,s)=>{let n;Object.defineProperty(t,e,{get:()=>{if(s!==undefined){n=s();s=undefined}return n},configurable:true})};n("Source",()=>s(598));n("RawSource",()=>s(891));n("OriginalSource",()=>s(389));n("SourceMapSource",()=>s(287));n("CachedSource",()=>s(357));n("ConcatSource",()=>s(944));n("ReplaceSource",()=>s(588));n("PrefixSource",()=>s(193));n("SizeOnlySource",()=>s(271));n("CompatSource",()=>s(973))},241:function(e){"use strict";e.exports=require("next/dist/compiled/source-map")}};var t={};function __nccwpck_require__(s){if(t[s]){return t[s].exports}var n=t[s]={exports:{}};var i=true;try{e[s](n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete t[s]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(351)}(); \ No newline at end of file diff --git a/packages/next/compiled/webpack-sources2/package.json b/packages/next/compiled/webpack-sources2/package.json new file mode 100644 index 000000000000000..acd3193c9f72756 --- /dev/null +++ b/packages/next/compiled/webpack-sources2/package.json @@ -0,0 +1 @@ +{"name":"webpack-sources","main":"index.js","author":"Tobias Koppers @sokra","license":"MIT"} diff --git a/packages/next/compiled/webpack/HotModuleReplacement.runtime.js b/packages/next/compiled/webpack/HotModuleReplacement.runtime.js new file mode 100644 index 000000000000000..b272b4cdfeb4a28 --- /dev/null +++ b/packages/next/compiled/webpack/HotModuleReplacement.runtime.js @@ -0,0 +1,377 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +var $interceptModuleExecution$ = undefined; +var $moduleCache$ = undefined; +// eslint-disable-next-line no-unused-vars +var $hmrModuleData$ = undefined; +var $hmrDownloadManifest$ = undefined; +var $hmrDownloadUpdateHandlers$ = undefined; +var $hmrInvalidateModuleHandlers$ = undefined; +var __webpack_require__ = undefined; + +module.exports = function () { + var currentModuleData = {}; + var installedModules = $moduleCache$; + + // module and require creation + var currentChildModule; + var currentParents = []; + + // status + var registeredStatusHandlers = []; + var currentStatus = "idle"; + + // while downloading + var blockingPromises; + + // The update info + var currentUpdateApplyHandlers; + var queuedInvalidatedModules; + + // eslint-disable-next-line no-unused-vars + $hmrModuleData$ = currentModuleData; + + $interceptModuleExecution$.push(function (options) { + var module = options.module; + var require = createRequire(options.require, options.id); + module.hot = createModuleHotObject(options.id, module); + module.parents = currentParents; + module.children = []; + currentParents = []; + options.require = require; + }); + + $hmrDownloadUpdateHandlers$ = {}; + $hmrInvalidateModuleHandlers$ = {}; + + function createRequire(require, moduleId) { + var me = installedModules[moduleId]; + if (!me) return require; + var fn = function (request) { + if (me.hot.active) { + if (installedModules[request]) { + var parents = installedModules[request].parents; + if (parents.indexOf(moduleId) === -1) { + parents.push(moduleId); + } + } else { + currentParents = [moduleId]; + currentChildModule = request; + } + if (me.children.indexOf(request) === -1) { + me.children.push(request); + } + } else { + console.warn( + "[HMR] unexpected require(" + + request + + ") from disposed module " + + moduleId + ); + currentParents = []; + } + return require(request); + }; + var createPropertyDescriptor = function (name) { + return { + configurable: true, + enumerable: true, + get: function () { + return require[name]; + }, + set: function (value) { + require[name] = value; + } + }; + }; + for (var name in require) { + if (Object.prototype.hasOwnProperty.call(require, name) && name !== "e") { + Object.defineProperty(fn, name, createPropertyDescriptor(name)); + } + } + fn.e = function (chunkId) { + return trackBlockingPromise(require.e(chunkId)); + }; + return fn; + } + + function createModuleHotObject(moduleId, me) { + var hot = { + // private stuff + _acceptedDependencies: {}, + _declinedDependencies: {}, + _selfAccepted: false, + _selfDeclined: false, + _selfInvalidated: false, + _disposeHandlers: [], + _main: currentChildModule !== moduleId, + _requireSelf: function () { + currentParents = me.parents.slice(); + currentChildModule = moduleId; + __webpack_require__(moduleId); + }, + + // Module API + active: true, + accept: function (dep, callback) { + if (dep === undefined) hot._selfAccepted = true; + else if (typeof dep === "function") hot._selfAccepted = dep; + else if (typeof dep === "object" && dep !== null) + for (var i = 0; i < dep.length; i++) + hot._acceptedDependencies[dep[i]] = callback || function () {}; + else hot._acceptedDependencies[dep] = callback || function () {}; + }, + decline: function (dep) { + if (dep === undefined) hot._selfDeclined = true; + else if (typeof dep === "object" && dep !== null) + for (var i = 0; i < dep.length; i++) + hot._declinedDependencies[dep[i]] = true; + else hot._declinedDependencies[dep] = true; + }, + dispose: function (callback) { + hot._disposeHandlers.push(callback); + }, + addDisposeHandler: function (callback) { + hot._disposeHandlers.push(callback); + }, + removeDisposeHandler: function (callback) { + var idx = hot._disposeHandlers.indexOf(callback); + if (idx >= 0) hot._disposeHandlers.splice(idx, 1); + }, + invalidate: function () { + this._selfInvalidated = true; + switch (currentStatus) { + case "idle": + currentUpdateApplyHandlers = []; + Object.keys($hmrInvalidateModuleHandlers$).forEach(function (key) { + $hmrInvalidateModuleHandlers$[key]( + moduleId, + currentUpdateApplyHandlers + ); + }); + setStatus("ready"); + break; + case "ready": + Object.keys($hmrInvalidateModuleHandlers$).forEach(function (key) { + $hmrInvalidateModuleHandlers$[key]( + moduleId, + currentUpdateApplyHandlers + ); + }); + break; + case "prepare": + case "check": + case "dispose": + case "apply": + (queuedInvalidatedModules = queuedInvalidatedModules || []).push( + moduleId + ); + break; + default: + // ignore requests in error states + break; + } + }, + + // Management API + check: hotCheck, + apply: hotApply, + status: function (l) { + if (!l) return currentStatus; + registeredStatusHandlers.push(l); + }, + addStatusHandler: function (l) { + registeredStatusHandlers.push(l); + }, + removeStatusHandler: function (l) { + var idx = registeredStatusHandlers.indexOf(l); + if (idx >= 0) registeredStatusHandlers.splice(idx, 1); + }, + + //inherit from previous dispose call + data: currentModuleData[moduleId] + }; + currentChildModule = undefined; + return hot; + } + + function setStatus(newStatus) { + currentStatus = newStatus; + for (var i = 0; i < registeredStatusHandlers.length; i++) + registeredStatusHandlers[i].call(null, newStatus); + } + + function trackBlockingPromise(promise) { + switch (currentStatus) { + case "ready": + setStatus("prepare"); + blockingPromises.push(promise); + waitForBlockingPromises(function () { + setStatus("ready"); + }); + return promise; + case "prepare": + blockingPromises.push(promise); + return promise; + default: + return promise; + } + } + + function waitForBlockingPromises(fn) { + if (blockingPromises.length === 0) return fn(); + var blocker = blockingPromises; + blockingPromises = []; + return Promise.all(blocker).then(function () { + return waitForBlockingPromises(fn); + }); + } + + function hotCheck(applyOnUpdate) { + if (currentStatus !== "idle") { + throw new Error("check() is only allowed in idle status"); + } + setStatus("check"); + return $hmrDownloadManifest$().then(function (update) { + if (!update) { + setStatus(applyInvalidatedModules() ? "ready" : "idle"); + return null; + } + + setStatus("prepare"); + + var updatedModules = []; + blockingPromises = []; + currentUpdateApplyHandlers = []; + + return Promise.all( + Object.keys($hmrDownloadUpdateHandlers$).reduce(function ( + promises, + key + ) { + $hmrDownloadUpdateHandlers$[key]( + update.c, + update.r, + update.m, + promises, + currentUpdateApplyHandlers, + updatedModules + ); + return promises; + }, + []) + ).then(function () { + return waitForBlockingPromises(function () { + if (applyOnUpdate) { + return internalApply(applyOnUpdate); + } else { + setStatus("ready"); + + return updatedModules; + } + }); + }); + }); + } + + function hotApply(options) { + if (currentStatus !== "ready") { + return Promise.resolve().then(function () { + throw new Error("apply() is only allowed in ready status"); + }); + } + return internalApply(options); + } + + function internalApply(options) { + options = options || {}; + + applyInvalidatedModules(); + + var results = currentUpdateApplyHandlers.map(function (handler) { + return handler(options); + }); + currentUpdateApplyHandlers = undefined; + + var errors = results + .map(function (r) { + return r.error; + }) + .filter(Boolean); + + if (errors.length > 0) { + setStatus("abort"); + return Promise.resolve().then(function () { + throw errors[0]; + }); + } + + // Now in "dispose" phase + setStatus("dispose"); + + results.forEach(function (result) { + if (result.dispose) result.dispose(); + }); + + // Now in "apply" phase + setStatus("apply"); + + var error; + var reportError = function (err) { + if (!error) error = err; + }; + + var outdatedModules = []; + results.forEach(function (result) { + if (result.apply) { + var modules = result.apply(reportError); + if (modules) { + for (var i = 0; i < modules.length; i++) { + outdatedModules.push(modules[i]); + } + } + } + }); + + // handle errors in accept handlers and self accepted module load + if (error) { + setStatus("fail"); + return Promise.resolve().then(function () { + throw error; + }); + } + + if (queuedInvalidatedModules) { + return internalApply(options).then(function (list) { + outdatedModules.forEach(function (moduleId) { + if (list.indexOf(moduleId) < 0) list.push(moduleId); + }); + return list; + }); + } + + setStatus("idle"); + return Promise.resolve(outdatedModules); + } + + function applyInvalidatedModules() { + if (queuedInvalidatedModules) { + if (!currentUpdateApplyHandlers) currentUpdateApplyHandlers = []; + Object.keys($hmrInvalidateModuleHandlers$).forEach(function (key) { + queuedInvalidatedModules.forEach(function (moduleId) { + $hmrInvalidateModuleHandlers$[key]( + moduleId, + currentUpdateApplyHandlers + ); + }); + }); + queuedInvalidatedModules = undefined; + return true; + } + } +}; diff --git a/packages/next/compiled/webpack/JavascriptHotModuleReplacement.runtime.js b/packages/next/compiled/webpack/JavascriptHotModuleReplacement.runtime.js new file mode 100644 index 000000000000000..60a15089d3f30bd --- /dev/null +++ b/packages/next/compiled/webpack/JavascriptHotModuleReplacement.runtime.js @@ -0,0 +1,431 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +var $installedChunks$ = undefined; +var $loadUpdateChunk$ = undefined; +var $moduleCache$ = undefined; +var $moduleFactories$ = undefined; +var $ensureChunkHandlers$ = undefined; +var $hasOwnProperty$ = undefined; +var $hmrModuleData$ = undefined; +var $hmrDownloadUpdateHandlers$ = undefined; +var $hmrInvalidateModuleHandlers$ = undefined; +var __webpack_require__ = undefined; + +module.exports = function () { + var currentUpdateChunks; + var currentUpdate; + var currentUpdateRemovedChunks; + var currentUpdateRuntime; + function applyHandler(options) { + if ($ensureChunkHandlers$) delete $ensureChunkHandlers$.$key$Hmr; + currentUpdateChunks = undefined; + function getAffectedModuleEffects(updateModuleId) { + var outdatedModules = [updateModuleId]; + var outdatedDependencies = {}; + + var queue = outdatedModules.map(function (id) { + return { + chain: [id], + id: id + }; + }); + while (queue.length > 0) { + var queueItem = queue.pop(); + var moduleId = queueItem.id; + var chain = queueItem.chain; + var module = $moduleCache$[moduleId]; + if ( + !module || + (module.hot._selfAccepted && !module.hot._selfInvalidated) + ) + continue; + if (module.hot._selfDeclined) { + return { + type: "self-declined", + chain: chain, + moduleId: moduleId + }; + } + if (module.hot._main) { + return { + type: "unaccepted", + chain: chain, + moduleId: moduleId + }; + } + for (var i = 0; i < module.parents.length; i++) { + var parentId = module.parents[i]; + var parent = $moduleCache$[parentId]; + if (!parent) continue; + if (parent.hot._declinedDependencies[moduleId]) { + return { + type: "declined", + chain: chain.concat([parentId]), + moduleId: moduleId, + parentId: parentId + }; + } + if (outdatedModules.indexOf(parentId) !== -1) continue; + if (parent.hot._acceptedDependencies[moduleId]) { + if (!outdatedDependencies[parentId]) + outdatedDependencies[parentId] = []; + addAllToSet(outdatedDependencies[parentId], [moduleId]); + continue; + } + delete outdatedDependencies[parentId]; + outdatedModules.push(parentId); + queue.push({ + chain: chain.concat([parentId]), + id: parentId + }); + } + } + + return { + type: "accepted", + moduleId: updateModuleId, + outdatedModules: outdatedModules, + outdatedDependencies: outdatedDependencies + }; + } + + function addAllToSet(a, b) { + for (var i = 0; i < b.length; i++) { + var item = b[i]; + if (a.indexOf(item) === -1) a.push(item); + } + } + + // at begin all updates modules are outdated + // the "outdated" status can propagate to parents if they don't accept the children + var outdatedDependencies = {}; + var outdatedModules = []; + var appliedUpdate = {}; + + var warnUnexpectedRequire = function warnUnexpectedRequire(module) { + console.warn( + "[HMR] unexpected require(" + module.id + ") to disposed module" + ); + }; + + for (var moduleId in currentUpdate) { + if ($hasOwnProperty$(currentUpdate, moduleId)) { + var newModuleFactory = currentUpdate[moduleId]; + /** @type {TODO} */ + var result; + if (newModuleFactory) { + result = getAffectedModuleEffects(moduleId); + } else { + result = { + type: "disposed", + moduleId: moduleId + }; + } + /** @type {Error|false} */ + var abortError = false; + var doApply = false; + var doDispose = false; + var chainInfo = ""; + if (result.chain) { + chainInfo = "\nUpdate propagation: " + result.chain.join(" -> "); + } + switch (result.type) { + case "self-declined": + if (options.onDeclined) options.onDeclined(result); + if (!options.ignoreDeclined) + abortError = new Error( + "Aborted because of self decline: " + + result.moduleId + + chainInfo + ); + break; + case "declined": + if (options.onDeclined) options.onDeclined(result); + if (!options.ignoreDeclined) + abortError = new Error( + "Aborted because of declined dependency: " + + result.moduleId + + " in " + + result.parentId + + chainInfo + ); + break; + case "unaccepted": + if (options.onUnaccepted) options.onUnaccepted(result); + if (!options.ignoreUnaccepted) + abortError = new Error( + "Aborted because " + moduleId + " is not accepted" + chainInfo + ); + break; + case "accepted": + if (options.onAccepted) options.onAccepted(result); + doApply = true; + break; + case "disposed": + if (options.onDisposed) options.onDisposed(result); + doDispose = true; + break; + default: + throw new Error("Unexception type " + result.type); + } + if (abortError) { + return { + error: abortError + }; + } + if (doApply) { + appliedUpdate[moduleId] = newModuleFactory; + addAllToSet(outdatedModules, result.outdatedModules); + for (moduleId in result.outdatedDependencies) { + if ($hasOwnProperty$(result.outdatedDependencies, moduleId)) { + if (!outdatedDependencies[moduleId]) + outdatedDependencies[moduleId] = []; + addAllToSet( + outdatedDependencies[moduleId], + result.outdatedDependencies[moduleId] + ); + } + } + } + if (doDispose) { + addAllToSet(outdatedModules, [result.moduleId]); + appliedUpdate[moduleId] = warnUnexpectedRequire; + } + } + } + currentUpdate = undefined; + + // Store self accepted outdated modules to require them later by the module system + var outdatedSelfAcceptedModules = []; + for (var j = 0; j < outdatedModules.length; j++) { + var outdatedModuleId = outdatedModules[j]; + if ( + $moduleCache$[outdatedModuleId] && + $moduleCache$[outdatedModuleId].hot._selfAccepted && + // removed self-accepted modules should not be required + appliedUpdate[outdatedModuleId] !== warnUnexpectedRequire && + // when called invalidate self-accepting is not possible + !$moduleCache$[outdatedModuleId].hot._selfInvalidated + ) { + outdatedSelfAcceptedModules.push({ + module: outdatedModuleId, + require: $moduleCache$[outdatedModuleId].hot._requireSelf, + errorHandler: $moduleCache$[outdatedModuleId].hot._selfAccepted + }); + } + } + + var moduleOutdatedDependencies; + + return { + dispose: function () { + currentUpdateRemovedChunks.forEach(function (chunkId) { + delete $installedChunks$[chunkId]; + }); + currentUpdateRemovedChunks = undefined; + + var idx; + var queue = outdatedModules.slice(); + while (queue.length > 0) { + var moduleId = queue.pop(); + var module = $moduleCache$[moduleId]; + if (!module) continue; + + var data = {}; + + // Call dispose handlers + var disposeHandlers = module.hot._disposeHandlers; + for (j = 0; j < disposeHandlers.length; j++) { + disposeHandlers[j].call(null, data); + } + $hmrModuleData$[moduleId] = data; + + // disable module (this disables requires from this module) + module.hot.active = false; + + // remove module from cache + delete $moduleCache$[moduleId]; + + // when disposing there is no need to call dispose handler + delete outdatedDependencies[moduleId]; + + // remove "parents" references from all children + for (j = 0; j < module.children.length; j++) { + var child = $moduleCache$[module.children[j]]; + if (!child) continue; + idx = child.parents.indexOf(moduleId); + if (idx >= 0) { + child.parents.splice(idx, 1); + } + } + } + + // remove outdated dependency from module children + var dependency; + for (var outdatedModuleId in outdatedDependencies) { + if ($hasOwnProperty$(outdatedDependencies, outdatedModuleId)) { + module = $moduleCache$[outdatedModuleId]; + if (module) { + moduleOutdatedDependencies = + outdatedDependencies[outdatedModuleId]; + for (j = 0; j < moduleOutdatedDependencies.length; j++) { + dependency = moduleOutdatedDependencies[j]; + idx = module.children.indexOf(dependency); + if (idx >= 0) module.children.splice(idx, 1); + } + } + } + } + }, + apply: function (reportError) { + // insert new code + for (var updateModuleId in appliedUpdate) { + if ($hasOwnProperty$(appliedUpdate, updateModuleId)) { + $moduleFactories$[updateModuleId] = appliedUpdate[updateModuleId]; + } + } + + // run new runtime modules + for (var i = 0; i < currentUpdateRuntime.length; i++) { + currentUpdateRuntime[i](__webpack_require__); + } + + // call accept handlers + for (var outdatedModuleId in outdatedDependencies) { + if ($hasOwnProperty$(outdatedDependencies, outdatedModuleId)) { + var module = $moduleCache$[outdatedModuleId]; + if (module) { + moduleOutdatedDependencies = + outdatedDependencies[outdatedModuleId]; + var callbacks = []; + var dependenciesForCallbacks = []; + for (var j = 0; j < moduleOutdatedDependencies.length; j++) { + var dependency = moduleOutdatedDependencies[j]; + var acceptCallback = + module.hot._acceptedDependencies[dependency]; + if (acceptCallback) { + if (callbacks.indexOf(acceptCallback) !== -1) continue; + callbacks.push(acceptCallback); + dependenciesForCallbacks.push(dependency); + } + } + for (var k = 0; k < callbacks.length; k++) { + try { + callbacks[k].call(null, moduleOutdatedDependencies); + } catch (err) { + if (options.onErrored) { + options.onErrored({ + type: "accept-errored", + moduleId: outdatedModuleId, + dependencyId: dependenciesForCallbacks[k], + error: err + }); + } + if (!options.ignoreErrored) { + reportError(err); + } + } + } + } + } + } + + // Load self accepted modules + for (var o = 0; o < outdatedSelfAcceptedModules.length; o++) { + var item = outdatedSelfAcceptedModules[o]; + var moduleId = item.module; + try { + item.require(moduleId); + } catch (err) { + if (typeof item.errorHandler === "function") { + try { + item.errorHandler(err); + } catch (err2) { + if (options.onErrored) { + options.onErrored({ + type: "self-accept-error-handler-errored", + moduleId: moduleId, + error: err2, + originalError: err + }); + } + if (!options.ignoreErrored) { + reportError(err2); + } + reportError(err); + } + } else { + if (options.onErrored) { + options.onErrored({ + type: "self-accept-errored", + moduleId: moduleId, + error: err + }); + } + if (!options.ignoreErrored) { + reportError(err); + } + } + } + } + + return outdatedModules; + } + }; + } + $hmrInvalidateModuleHandlers$.$key$ = function (moduleId, applyHandlers) { + if (!currentUpdate) { + currentUpdate = {}; + currentUpdateRuntime = []; + currentUpdateRemovedChunks = []; + applyHandlers.push(applyHandler); + } + if (!$hasOwnProperty$(currentUpdate, moduleId)) { + currentUpdate[moduleId] = $moduleFactories$[moduleId]; + } + }; + $hmrDownloadUpdateHandlers$.$key$ = function ( + chunkIds, + removedChunks, + removedModules, + promises, + applyHandlers, + updatedModulesList + ) { + applyHandlers.push(applyHandler); + currentUpdateChunks = {}; + currentUpdateRemovedChunks = removedChunks; + currentUpdate = removedModules.reduce(function (obj, key) { + obj[key] = false; + return obj; + }, {}); + currentUpdateRuntime = []; + chunkIds.forEach(function (chunkId) { + if ( + $hasOwnProperty$($installedChunks$, chunkId) && + $installedChunks$[chunkId] !== undefined + ) { + promises.push($loadUpdateChunk$(chunkId, updatedModulesList)); + currentUpdateChunks[chunkId] = true; + } + }); + if ($ensureChunkHandlers$) { + $ensureChunkHandlers$.$key$Hmr = function (chunkId, promises) { + if ( + currentUpdateChunks && + !$hasOwnProperty$(currentUpdateChunks, chunkId) && + $hasOwnProperty$($installedChunks$, chunkId) && + $installedChunks$[chunkId] !== undefined + ) { + promises.push($loadUpdateChunk$(chunkId)); + currentUpdateChunks[chunkId] = true; + } + }; + } + }; +}; diff --git a/packages/next/compiled/webpack/LICENSE b/packages/next/compiled/webpack/LICENSE new file mode 100644 index 000000000000000..8c11fc7289b7546 --- /dev/null +++ b/packages/next/compiled/webpack/LICENSE @@ -0,0 +1,20 @@ +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/packages/next/compiled/webpack/amd-define.js b/packages/next/compiled/webpack/amd-define.js new file mode 100644 index 000000000000000..74248013c1ee06a --- /dev/null +++ b/packages/next/compiled/webpack/amd-define.js @@ -0,0 +1,55 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 441: +/***/ (function(module) { + +module.exports = function() { + throw new Error("define cannot be used indirect"); +}; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(441); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/compiled/webpack/amd-options.js b/packages/next/compiled/webpack/amd-options.js new file mode 100644 index 000000000000000..103fe8b29190952 --- /dev/null +++ b/packages/next/compiled/webpack/amd-options.js @@ -0,0 +1,54 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 929: +/***/ (function(module) { + +/* globals __webpack_amd_options__ */ +module.exports = __webpack_amd_options__; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(929); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/compiled/webpack/bundle4.js b/packages/next/compiled/webpack/bundle4.js new file mode 100644 index 000000000000000..28b50e13ab3e172 --- /dev/null +++ b/packages/next/compiled/webpack/bundle4.js @@ -0,0 +1,105977 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 90601: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"$id\":\"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\"description\":\"Meta-schema for $data reference (JSON Schema extension proposal)\",\"type\":\"object\",\"required\":[\"$data\"],\"properties\":{\"$data\":{\"type\":\"string\",\"anyOf\":[{\"format\":\"relative-json-pointer\"},{\"format\":\"json-pointer\"}]}},\"additionalProperties\":false}"); + +/***/ }), + +/***/ 98938: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"$id\":\"http://json-schema.org/draft-07/schema#\",\"title\":\"Core schema meta-schema\",\"definitions\":{\"schemaArray\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#\"}},\"nonNegativeInteger\":{\"type\":\"integer\",\"minimum\":0},\"nonNegativeIntegerDefault0\":{\"allOf\":[{\"$ref\":\"#/definitions/nonNegativeInteger\"},{\"default\":0}]},\"simpleTypes\":{\"enum\":[\"array\",\"boolean\",\"integer\",\"null\",\"number\",\"object\",\"string\"]},\"stringArray\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"uniqueItems\":true,\"default\":[]}},\"type\":[\"object\",\"boolean\"],\"properties\":{\"$id\":{\"type\":\"string\",\"format\":\"uri-reference\"},\"$schema\":{\"type\":\"string\",\"format\":\"uri\"},\"$ref\":{\"type\":\"string\",\"format\":\"uri-reference\"},\"$comment\":{\"type\":\"string\"},\"title\":{\"type\":\"string\"},\"description\":{\"type\":\"string\"},\"default\":true,\"readOnly\":{\"type\":\"boolean\",\"default\":false},\"examples\":{\"type\":\"array\",\"items\":true},\"multipleOf\":{\"type\":\"number\",\"exclusiveMinimum\":0},\"maximum\":{\"type\":\"number\"},\"exclusiveMaximum\":{\"type\":\"number\"},\"minimum\":{\"type\":\"number\"},\"exclusiveMinimum\":{\"type\":\"number\"},\"maxLength\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minLength\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"pattern\":{\"type\":\"string\",\"format\":\"regex\"},\"additionalItems\":{\"$ref\":\"#\"},\"items\":{\"anyOf\":[{\"$ref\":\"#\"},{\"$ref\":\"#/definitions/schemaArray\"}],\"default\":true},\"maxItems\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minItems\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"uniqueItems\":{\"type\":\"boolean\",\"default\":false},\"contains\":{\"$ref\":\"#\"},\"maxProperties\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minProperties\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"required\":{\"$ref\":\"#/definitions/stringArray\"},\"additionalProperties\":{\"$ref\":\"#\"},\"definitions\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"properties\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"patternProperties\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"propertyNames\":{\"format\":\"regex\"},\"default\":{}},\"dependencies\":{\"type\":\"object\",\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#\"},{\"$ref\":\"#/definitions/stringArray\"}]}},\"propertyNames\":{\"$ref\":\"#\"},\"const\":true,\"enum\":{\"type\":\"array\",\"items\":true,\"minItems\":1,\"uniqueItems\":true},\"type\":{\"anyOf\":[{\"$ref\":\"#/definitions/simpleTypes\"},{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/simpleTypes\"},\"minItems\":1,\"uniqueItems\":true}]},\"format\":{\"type\":\"string\"},\"contentMediaType\":{\"type\":\"string\"},\"contentEncoding\":{\"type\":\"string\"},\"if\":{\"$ref\":\"#\"},\"then\":{\"$ref\":\"#\"},\"else\":{\"$ref\":\"#\"},\"allOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"anyOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"oneOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"not\":{\"$ref\":\"#\"}},\"default\":true}"); + +/***/ }), + +/***/ 25916: +/***/ (function(module) { + +"use strict"; +module.exports = {"version":"4.2.1"}; + +/***/ }), + +/***/ 35464: +/***/ (function(module) { + +"use strict"; +module.exports = {"i8":"4.3.0"}; + +/***/ }), + +/***/ 11840: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"additionalProperties\":false,\"definitions\":{\"file-conditions\":{\"anyOf\":[{\"instanceof\":\"RegExp\"},{\"type\":\"string\"}]}},\"properties\":{\"test\":{\"anyOf\":[{\"$ref\":\"#/definitions/file-conditions\"},{\"items\":{\"anyOf\":[{\"$ref\":\"#/definitions/file-conditions\"}]},\"type\":\"array\"}]},\"include\":{\"anyOf\":[{\"$ref\":\"#/definitions/file-conditions\"},{\"items\":{\"anyOf\":[{\"$ref\":\"#/definitions/file-conditions\"}]},\"type\":\"array\"}]},\"exclude\":{\"anyOf\":[{\"$ref\":\"#/definitions/file-conditions\"},{\"items\":{\"anyOf\":[{\"$ref\":\"#/definitions/file-conditions\"}]},\"type\":\"array\"}]},\"chunkFilter\":{\"instanceof\":\"Function\"},\"cache\":{\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"string\"}]},\"cacheKeys\":{\"instanceof\":\"Function\"},\"parallel\":{\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"integer\"}]},\"sourceMap\":{\"type\":\"boolean\"},\"minify\":{\"instanceof\":\"Function\"},\"terserOptions\":{\"additionalProperties\":true,\"type\":\"object\"},\"extractComments\":{\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"string\"},{\"instanceof\":\"RegExp\"},{\"instanceof\":\"Function\"},{\"additionalProperties\":false,\"properties\":{\"condition\":{\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"string\"},{\"instanceof\":\"RegExp\"},{\"instanceof\":\"Function\"}]},\"filename\":{\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\"}]},\"banner\":{\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"string\"},{\"instanceof\":\"Function\"}]}},\"type\":\"object\"}]},\"warningsFilter\":{\"instanceof\":\"Function\"}},\"type\":\"object\"}"); + +/***/ }), + +/***/ 92203: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"name\":\"terser\",\"description\":\"JavaScript parser, mangler/compressor and beautifier toolkit for ES6+\",\"homepage\":\"https://terser.org\",\"author\":\"Mihai Bazon (http://lisperator.net/)\",\"license\":\"BSD-2-Clause\",\"version\":\"4.8.0\",\"engines\":{\"node\":\">=6.0.0\"},\"maintainers\":[\"Fábio Santos \"],\"repository\":\"https://github.com/terser/terser\",\"main\":\"dist/bundle.min.js\",\"types\":\"tools/terser.d.ts\",\"bin\":{\"terser\":\"bin/terser\"},\"files\":[\"bin\",\"dist\",\"tools\",\"LICENSE\",\"README.md\",\"CHANGELOG.md\",\"PATRONS.md\"],\"dependencies\":{\"commander\":\"^2.20.0\",\"source-map\":\"~0.6.1\",\"source-map-support\":\"~0.5.12\"},\"devDependencies\":{\"acorn\":\"^7.1.1\",\"astring\":\"^1.4.1\",\"eslint\":\"^6.3.0\",\"eslump\":\"^2.0.0\",\"mocha\":\"^7.1.2\",\"mochallel\":\"^2.0.0\",\"pre-commit\":\"^1.2.2\",\"rimraf\":\"^3.0.0\",\"rollup\":\"2.0.6\",\"rollup-plugin-terser\":\"5.3.0\",\"semver\":\"^7.1.3\"},\"scripts\":{\"test\":\"npm run build -- --configTest && node test/run-tests.js\",\"test:compress\":\"npm run build -- --configTest && node test/compress.js\",\"test:mocha\":\"npm run build -- --configTest && node test/mocha.js\",\"lint\":\"eslint lib\",\"lint-fix\":\"eslint --fix lib\",\"build\":\"rimraf dist/* && rollup --config --silent\",\"prepare\":\"npm run build\",\"postversion\":\"echo 'Remember to update the changelog!'\"},\"keywords\":[\"uglify\",\"terser\",\"uglify-es\",\"uglify-js\",\"minify\",\"minifier\",\"javascript\",\"ecmascript\",\"es5\",\"es6\",\"es7\",\"es8\",\"es2015\",\"es2016\",\"es2017\",\"async\",\"await\"],\"eslintConfig\":{\"parserOptions\":{\"sourceType\":\"module\"},\"env\":{\"es6\":true},\"globals\":{\"describe\":false,\"it\":false,\"require\":false,\"global\":false,\"process\":false},\"rules\":{\"brace-style\":[\"error\",\"1tbs\",{\"allowSingleLine\":true}],\"quotes\":[\"error\",\"double\",\"avoid-escape\"],\"no-debugger\":\"error\",\"no-undef\":\"error\",\"no-unused-vars\":[\"error\",{\"varsIgnorePattern\":\"^_$\"}],\"no-tabs\":\"error\",\"semi\":[\"error\",\"always\"],\"no-extra-semi\":\"error\",\"no-irregular-whitespace\":\"error\",\"space-before-blocks\":[\"error\",\"always\"]}},\"pre-commit\":[\"lint-fix\",\"test\"]}"); + +/***/ }), + +/***/ 9122: +/***/ (function(module) { + +"use strict"; +module.exports = {"i8":"1.4.4"}; + +/***/ }), + +/***/ 11335: +/***/ (function(module) { + +"use strict"; +module.exports = {"i8":"4.0.3"}; + +/***/ }), + +/***/ 71618: +/***/ (function(module) { + +"use strict"; +module.exports = {"i8":"4.44.1"}; + +/***/ }), + +/***/ 37863: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"definitions\":{\"ArrayOfStringOrStringArrayValues\":{\"type\":\"array\",\"items\":{\"description\":\"string or array of strings\",\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"array\",\"items\":{\"description\":\"A non-empty string\",\"type\":\"string\",\"minLength\":1}}]}},\"ArrayOfStringValues\":{\"type\":\"array\",\"items\":{\"description\":\"A non-empty string\",\"type\":\"string\",\"minLength\":1}},\"Entry\":{\"anyOf\":[{\"$ref\":\"#/definitions/EntryDynamic\"},{\"$ref\":\"#/definitions/EntryStatic\"}]},\"EntryDynamic\":{\"description\":\"A Function returning an entry object, an entry string, an entry array or a promise to these things.\",\"instanceof\":\"Function\",\"tsType\":\"(() => EntryStatic | Promise)\"},\"EntryItem\":{\"oneOf\":[{\"description\":\"An entry point without name. The string is resolved to a module which is loaded upon startup.\",\"type\":\"string\",\"minLength\":1},{\"description\":\"An entry point without name. All modules are loaded upon startup. The last one is exported.\",\"anyOf\":[{\"$ref\":\"#/definitions/NonEmptyArrayOfUniqueStringValues\"}]}]},\"EntryObject\":{\"description\":\"Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"An entry point with name\",\"oneOf\":[{\"description\":\"The string is resolved to a module which is loaded upon startup.\",\"type\":\"string\",\"minLength\":1},{\"description\":\"All modules are loaded upon startup. The last one is exported.\",\"anyOf\":[{\"$ref\":\"#/definitions/NonEmptyArrayOfUniqueStringValues\"}]}]},\"minProperties\":1},\"EntryStatic\":{\"oneOf\":[{\"$ref\":\"#/definitions/EntryObject\"},{\"$ref\":\"#/definitions/EntryItem\"}]},\"ExternalItem\":{\"anyOf\":[{\"description\":\"An exact matched dependency becomes external. The same string is used as external dependency.\",\"type\":\"string\"},{\"description\":\"If an dependency matches exactly a property of the object, the property value is used as dependency.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"The dependency used for the external\",\"anyOf\":[{\"type\":\"string\"},{\"type\":\"object\"},{\"$ref\":\"#/definitions/ArrayOfStringValues\"},{\"type\":\"boolean\"}]}},{\"description\":\"Every matched dependency becomes external.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}]},\"Externals\":{\"anyOf\":[{\"description\":\"`function(context, request, callback(err, result))` The function is called on each dependency.\",\"instanceof\":\"Function\",\"tsType\":\"((context: string, request: string, callback: (err?: Error, result?: string) => void) => void)\"},{\"$ref\":\"#/definitions/ExternalItem\"},{\"type\":\"array\",\"items\":{\"description\":\"External configuration\",\"anyOf\":[{\"description\":\"`function(context, request, callback(err, result))` The function is called on each dependency.\",\"instanceof\":\"Function\",\"tsType\":\"((context: string, request: string, callback: (err?: Error, result?: string) => void) => void)\"},{\"$ref\":\"#/definitions/ExternalItem\"}]}}]},\"FilterItemTypes\":{\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"}]},\"FilterTypes\":{\"anyOf\":[{\"$ref\":\"#/definitions/FilterItemTypes\"},{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter\",\"anyOf\":[{\"$ref\":\"#/definitions/FilterItemTypes\"}]}}]},\"LibraryCustomUmdObject\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Name of the exposed AMD library in the UMD\",\"type\":\"string\"},\"commonjs\":{\"description\":\"Name of the exposed commonjs export in the UMD\",\"type\":\"string\"},\"root\":{\"description\":\"Name of the property exposed globally by a UMD library\",\"anyOf\":[{\"type\":\"string\"},{\"$ref\":\"#/definitions/ArrayOfStringValues\"}]}}},\"ModuleOptions\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"defaultRules\":{\"description\":\"An array of rules applied by default for modules.\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"exprContextCritical\":{\"description\":\"Enable warnings for full dynamic dependencies\",\"type\":\"boolean\"},\"exprContextRecursive\":{\"description\":\"Enable recursive directory lookup for full dynamic dependencies\",\"type\":\"boolean\"},\"exprContextRegExp\":{\"description\":\"Sets the default regular expression for full dynamic dependencies\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}]},\"exprContextRequest\":{\"description\":\"Set the default request for full dynamic dependencies\",\"type\":\"string\"},\"noParse\":{\"description\":\"Don't parse files matching. It's matched against the full resolved request.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A regular expression, when matched the module is not parsed\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},\"minItems\":1},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"type\":\"array\",\"items\":{\"description\":\"An absolute path, when the module starts with this path it is not parsed\",\"type\":\"string\",\"absolutePath\":true},\"minItems\":1},{\"type\":\"string\",\"absolutePath\":true}]},\"rules\":{\"description\":\"An array of rules applied for modules.\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"strictExportPresence\":{\"description\":\"Emit errors instead of warnings when imported names don't exist in imported module\",\"type\":\"boolean\"},\"strictThisContextOnImports\":{\"description\":\"Handle the this context correctly according to the spec for namespace objects\",\"type\":\"boolean\"},\"unknownContextCritical\":{\"description\":\"Enable warnings when using the require function in a not statically analyse-able way\",\"type\":\"boolean\"},\"unknownContextRecursive\":{\"description\":\"Enable recursive directory lookup when using the require function in a not statically analyse-able way\",\"type\":\"boolean\"},\"unknownContextRegExp\":{\"description\":\"Sets the regular expression when using the require function in a not statically analyse-able way\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}]},\"unknownContextRequest\":{\"description\":\"Sets the request when using the require function in a not statically analyse-able way\",\"type\":\"string\"},\"unsafeCache\":{\"description\":\"Cache the resolving of module requests\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"wrappedContextCritical\":{\"description\":\"Enable warnings for partial dynamic dependencies\",\"type\":\"boolean\"},\"wrappedContextRecursive\":{\"description\":\"Enable recursive directory lookup for partial dynamic dependencies\",\"type\":\"boolean\"},\"wrappedContextRegExp\":{\"description\":\"Set the inner regular expression for partial dynamic dependencies\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},\"NodeOptions\":{\"type\":\"object\",\"additionalProperties\":{\"description\":\"Include a polyfill for the node.js module\",\"enum\":[false,true,\"mock\",\"empty\"]},\"properties\":{\"Buffer\":{\"description\":\"Include a polyfill for the 'Buffer' variable\",\"enum\":[false,true,\"mock\"]},\"__dirname\":{\"description\":\"Include a polyfill for the '__dirname' variable\",\"enum\":[false,true,\"mock\"]},\"__filename\":{\"description\":\"Include a polyfill for the '__filename' variable\",\"enum\":[false,true,\"mock\"]},\"console\":{\"description\":\"Include a polyfill for the 'console' variable\",\"enum\":[false,true,\"mock\"]},\"global\":{\"description\":\"Include a polyfill for the 'global' variable\",\"type\":\"boolean\"},\"process\":{\"description\":\"Include a polyfill for the 'process' variable\",\"enum\":[false,true,\"mock\"]}}},\"NonEmptyArrayOfUniqueStringValues\":{\"description\":\"A non-empty array of non-empty strings\",\"type\":\"array\",\"items\":{\"description\":\"A non-empty string\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},\"OptimizationOptions\":{\"description\":\"Enables/Disables integrated optimizations\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"checkWasmTypes\":{\"description\":\"Check for incompatible wasm types when importing/exporting from/to ESM\",\"type\":\"boolean\"},\"chunkIds\":{\"description\":\"Define the algorithm to choose chunk ids (named: readable ids for better debugging, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)\",\"enum\":[\"natural\",\"named\",\"size\",\"total-size\",false]},\"concatenateModules\":{\"description\":\"Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer\",\"type\":\"boolean\"},\"flagIncludedChunks\":{\"description\":\"Also flag chunks as loaded which contain a subset of the modules\",\"type\":\"boolean\"},\"hashedModuleIds\":{\"description\":\"Use hashed module id instead module identifiers for better long term caching (deprecated, used moduleIds: hashed instead)\",\"type\":\"boolean\"},\"mangleWasmImports\":{\"description\":\"Reduce size of WASM by changing imports to shorter strings.\",\"type\":\"boolean\"},\"mergeDuplicateChunks\":{\"description\":\"Merge chunks which contain the same modules\",\"type\":\"boolean\"},\"minimize\":{\"description\":\"Enable minimizing the output. Uses optimization.minimizer.\",\"type\":\"boolean\"},\"minimizer\":{\"description\":\"Minimizer(s) to use for minimizing the output\",\"type\":\"array\",\"items\":{\"description\":\"Plugin of type object or instanceof Function\",\"anyOf\":[{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"moduleIds\":{\"description\":\"Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: short hashes as ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)\",\"enum\":[\"natural\",\"named\",\"hashed\",\"size\",\"total-size\",false]},\"namedChunks\":{\"description\":\"Use readable chunk identifiers for better debugging (deprecated, used chunkIds: named instead)\",\"type\":\"boolean\"},\"namedModules\":{\"description\":\"Use readable module identifiers for better debugging (deprecated, used moduleIds: named instead)\",\"type\":\"boolean\"},\"noEmitOnErrors\":{\"description\":\"Avoid emitting assets when errors occur\",\"type\":\"boolean\"},\"nodeEnv\":{\"description\":\"Set process.env.NODE_ENV to a specific value\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"}]},\"occurrenceOrder\":{\"description\":\"Figure out a order of modules which results in the smallest initial bundle\",\"type\":\"boolean\"},\"portableRecords\":{\"description\":\"Generate records with relative paths to be able to move the context folder\",\"type\":\"boolean\"},\"providedExports\":{\"description\":\"Figure out which exports are provided by modules to generate more efficient code\",\"type\":\"boolean\"},\"removeAvailableModules\":{\"description\":\"Removes modules from chunks when these modules are already included in all parents\",\"type\":\"boolean\"},\"removeEmptyChunks\":{\"description\":\"Remove chunks which are empty\",\"type\":\"boolean\"},\"runtimeChunk\":{\"description\":\"Create an additional chunk which contains only the webpack runtime and chunk hash maps\",\"oneOf\":[{\"type\":\"boolean\"},{\"enum\":[\"single\",\"multiple\"]},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"description\":\"The name or name factory for the runtime chunks\",\"oneOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}}}]},\"sideEffects\":{\"description\":\"Skip over modules which are flagged to contain no side effects when exports are not used\",\"type\":\"boolean\"},\"splitChunks\":{\"description\":\"Optimize duplication and caching by splitting chunks by shared modules and cache group\",\"oneOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/OptimizationSplitChunksOptions\"}]},\"usedExports\":{\"description\":\"Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code\",\"type\":\"boolean\"}}},\"OptimizationSplitChunksOptions\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks\",\"type\":\"string\",\"minLength\":1},\"automaticNameMaxLength\":{\"description\":\"Sets the max length for the name of a created chunk\",\"type\":\"number\",\"minimum\":1},\"cacheGroups\":{\"description\":\"Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks)\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Configuration for a cache group\",\"anyOf\":[{\"enum\":[false]},{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"type\":\"string\"},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks\",\"type\":\"string\",\"minLength\":1},\"automaticNameMaxLength\":{\"description\":\"Sets the max length for the name of a created chunk\",\"type\":\"number\",\"minimum\":1},\"automaticNamePrefix\":{\"description\":\"Sets the name prefix for created chunks\",\"type\":\"string\"},\"chunks\":{\"description\":\"Select chunks for determining cache group content (defaults to \\\"initial\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML)\",\"oneOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"enforce\":{\"description\":\"Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group\",\"type\":\"boolean\"},\"enforceSizeThreshold\":{\"description\":\"Size threshold at which splitting is enforced and other restrictions (maxAsyncRequests, maxInitialRequests) are ignored.\",\"type\":\"number\"},\"filename\":{\"description\":\"Sets the template for the filename for created chunks (Only works for initial chunks)\",\"type\":\"string\",\"minLength\":1},\"maxAsyncRequests\":{\"description\":\"Maximum number of requests which are accepted for on-demand loading\",\"type\":\"number\",\"minimum\":1},\"maxInitialRequests\":{\"description\":\"Maximum number of initial chunks which are accepted for an entry point\",\"type\":\"number\",\"minimum\":1},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks\",\"type\":\"number\",\"minimum\":0},\"minChunks\":{\"description\":\"Minimum number of times a module has to be duplicated until it's considered for splitting\",\"type\":\"number\",\"minimum\":1},\"minSize\":{\"description\":\"Minimal size for the created chunk\",\"type\":\"number\",\"minimum\":0},\"name\":{\"description\":\"Give chunks for this cache group a name (chunks with equal name are merged)\",\"oneOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"type\":\"string\"}]},\"priority\":{\"description\":\"Priority of this cache group\",\"type\":\"number\"},\"reuseExistingChunk\":{\"description\":\"Try to reuse existing chunk (with name) when it has matching modules\",\"type\":\"boolean\"},\"test\":{\"description\":\"Assign modules to a cache group\",\"oneOf\":[{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"type\":\"string\"},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}]}}}]},\"not\":{\"description\":\"Using the cacheGroup shorthand syntax with a cache group named 'test' is a potential config error\\nDid you intent to define a cache group with a test instead?\\ncacheGroups: {\\n : {\\n test: ...\\n }\\n}\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"test\":{\"description\":\"The test property is a cache group name, but using the test option of the cache group could be intended instead\",\"anyOf\":[{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"type\":\"string\"},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}]}},\"required\":[\"test\"]}},\"chunks\":{\"description\":\"Select chunks for determining shared modules (defaults to \\\"async\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML)\",\"oneOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"enforceSizeThreshold\":{\"description\":\"Size threshold at which splitting is enforced and other restrictions (maxAsyncRequests, maxInitialRequests) are ignored.\",\"type\":\"number\"},\"fallbackCacheGroup\":{\"description\":\"Options for modules not selected by any other cache group\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks\",\"type\":\"string\",\"minLength\":1},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks\",\"type\":\"number\",\"minimum\":0},\"minSize\":{\"description\":\"Minimal size for the created chunk\",\"type\":\"number\",\"minimum\":0}}},\"filename\":{\"description\":\"Sets the template for the filename for created chunks (Only works for initial chunks)\",\"type\":\"string\",\"minLength\":1},\"hidePathInfo\":{\"description\":\"Prevents exposing path info when creating names for parts splitted by maxSize\",\"type\":\"boolean\"},\"maxAsyncRequests\":{\"description\":\"Maximum number of requests which are accepted for on-demand loading\",\"type\":\"number\",\"minimum\":1},\"maxInitialRequests\":{\"description\":\"Maximum number of initial chunks which are accepted for an entry point\",\"type\":\"number\",\"minimum\":1},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks\",\"type\":\"number\",\"minimum\":0},\"minChunks\":{\"description\":\"Minimum number of times a module has to be duplicated until it's considered for splitting\",\"type\":\"number\",\"minimum\":1},\"minSize\":{\"description\":\"Minimal size for the created chunks\",\"type\":\"number\",\"minimum\":0},\"name\":{\"description\":\"Give chunks created a name (chunks with equal name are merged)\",\"oneOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"type\":\"string\"}]}}},\"OutputOptions\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"auxiliaryComment\":{\"description\":\"Add a comment in the UMD wrapper.\",\"anyOf\":[{\"description\":\"Append the same comment above each import style.\",\"type\":\"string\"},{\"description\":\"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Set comment for `amd` section in UMD\",\"type\":\"string\"},\"commonjs\":{\"description\":\"Set comment for `commonjs` (exports) section in UMD\",\"type\":\"string\"},\"commonjs2\":{\"description\":\"Set comment for `commonjs2` (module.exports) section in UMD\",\"type\":\"string\"},\"root\":{\"description\":\"Set comment for `root` (global variable) section in UMD\",\"type\":\"string\"}}}]},\"chunkCallbackName\":{\"description\":\"The callback function name used by webpack for loading of chunks in WebWorkers.\",\"type\":\"string\"},\"chunkFilename\":{\"description\":\"The filename of non-entry chunks as relative path inside the `output.path` directory.\",\"type\":\"string\",\"absolutePath\":false},\"chunkLoadTimeout\":{\"description\":\"Number of milliseconds before chunk request expires\",\"type\":\"number\"},\"crossOriginLoading\":{\"description\":\"This option enables cross-origin loading of chunks.\",\"enum\":[false,\"anonymous\",\"use-credentials\"]},\"devtoolFallbackModuleFilenameTemplate\":{\"description\":\"Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"devtoolLineToLine\":{\"description\":\"Enable line to line mapped mode for all/specified modules. Line to line mapped mode uses a simple SourceMap where each line of the generated source is mapped to the same line of the original source. It’s a performance optimization. Only use it if your performance need to be better and you are sure that input lines match which generated lines.\",\"anyOf\":[{\"description\":\"`true` enables it for all modules (not recommended)\",\"type\":\"boolean\"},{\"description\":\"An object similar to `module.loaders` enables it for specific files.\",\"type\":\"object\"}]},\"devtoolModuleFilenameTemplate\":{\"description\":\"Filename template string of function for the sources array in a generated SourceMap.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"devtoolNamespace\":{\"description\":\"Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.\",\"type\":\"string\"},\"filename\":{\"description\":\"Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"futureEmitAssets\":{\"description\":\"Use the future version of asset emitting logic, which allows freeing memory of assets after emitting. It could break plugins which assume that assets are still readable after emitting. Will be the new default in the next major version.\",\"type\":\"boolean\"},\"globalObject\":{\"description\":\"An expression which is used to address the global object/scope in runtime code\",\"type\":\"string\",\"minLength\":1},\"hashDigest\":{\"description\":\"Digest type used for the hash\",\"type\":\"string\"},\"hashDigestLength\":{\"description\":\"Number of chars which are used for the hash\",\"type\":\"number\",\"minimum\":1},\"hashFunction\":{\"description\":\"Algorithm used for generation the hash (see node.js crypto package)\",\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"import('../lib/util/createHash').HashConstructor\"}]},\"hashSalt\":{\"description\":\"Any string which is added to the hash to salt it\",\"type\":\"string\",\"minLength\":1},\"hotUpdateChunkFilename\":{\"description\":\"The filename of the Hot Update Chunks. They are inside the output.path directory.\",\"type\":\"string\",\"absolutePath\":false},\"hotUpdateFunction\":{\"description\":\"The JSONP function used by webpack for async loading of hot update chunks.\",\"type\":\"string\"},\"hotUpdateMainFilename\":{\"description\":\"The filename of the Hot Update Main File. It is inside the `output.path` directory.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"jsonpFunction\":{\"description\":\"The JSONP function used by webpack for async loading of chunks.\",\"type\":\"string\"},\"jsonpScriptType\":{\"description\":\"This option enables loading async chunks via a custom script type, such as script type=\\\"module\\\"\",\"enum\":[false,\"text/javascript\",\"module\"]},\"library\":{\"description\":\"If set, export the bundle as library. `output.library` is the name.\",\"anyOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"description\":\"A part of the library name\",\"type\":\"string\"}},{\"$ref\":\"#/definitions/LibraryCustomUmdObject\"}]},\"libraryExport\":{\"description\":\"Specify which export should be exposed as library\",\"anyOf\":[{\"type\":\"string\"},{\"$ref\":\"#/definitions/ArrayOfStringValues\"}]},\"libraryTarget\":{\"description\":\"Type of library\",\"enum\":[\"var\",\"assign\",\"this\",\"window\",\"self\",\"global\",\"commonjs\",\"commonjs2\",\"commonjs-module\",\"amd\",\"amd-require\",\"umd\",\"umd2\",\"jsonp\",\"system\"]},\"path\":{\"description\":\"The output directory as **absolute path** (required).\",\"type\":\"string\",\"absolutePath\":true},\"pathinfo\":{\"description\":\"Include comments with information about the modules.\",\"type\":\"boolean\"},\"publicPath\":{\"description\":\"The `publicPath` specifies the public URL address of the output files when referenced in a browser.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"sourceMapFilename\":{\"description\":\"The filename of the SourceMaps for the JavaScript files. They are inside the `output.path` directory.\",\"type\":\"string\",\"absolutePath\":false},\"sourcePrefix\":{\"description\":\"Prefixes every line of the source in the bundle with this string.\",\"type\":\"string\"},\"strictModuleExceptionHandling\":{\"description\":\"Handles exceptions in module loading correctly at a performance cost.\",\"type\":\"boolean\"},\"umdNamedDefine\":{\"description\":\"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\",\"type\":\"boolean\"},\"webassemblyModuleFilename\":{\"description\":\"The filename of WebAssembly modules as relative path inside the `output.path` directory.\",\"type\":\"string\",\"absolutePath\":false}}},\"PerformanceOptions\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetFilter\":{\"description\":\"Filter function to select assets that are checked\",\"instanceof\":\"Function\",\"tsType\":\"Function\"},\"hints\":{\"description\":\"Sets the format of the hints: warnings, errors or nothing at all\",\"enum\":[false,\"warning\",\"error\"]},\"maxAssetSize\":{\"description\":\"Filesize limit (in bytes) when exceeded, that webpack will provide performance hints\",\"type\":\"number\"},\"maxEntrypointSize\":{\"description\":\"Total size of an entry point (in bytes)\",\"type\":\"number\"}}},\"ResolveOptions\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"alias\":{\"description\":\"Redirect module requests\",\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":{\"description\":\"New request\",\"type\":\"string\"}},{\"type\":\"array\",\"items\":{\"description\":\"Alias configuration\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"alias\":{\"description\":\"New request\",\"type\":\"string\"},\"name\":{\"description\":\"Request to be redirected\",\"type\":\"string\"},\"onlyModule\":{\"description\":\"Redirect only exact matching request\",\"type\":\"boolean\"}}}}]},\"aliasFields\":{\"description\":\"Fields in the description file (package.json) which are used to redirect requests inside the module\",\"anyOf\":[{\"$ref\":\"#/definitions/ArrayOfStringOrStringArrayValues\"}]},\"cachePredicate\":{\"description\":\"Predicate function to decide which requests should be cached\",\"instanceof\":\"Function\",\"tsType\":\"Function\"},\"cacheWithContext\":{\"description\":\"Include the context information in the cache identifier when caching\",\"type\":\"boolean\"},\"concord\":{\"description\":\"Enable concord resolving extras\",\"type\":\"boolean\"},\"descriptionFiles\":{\"description\":\"Filenames used to find a description file\",\"anyOf\":[{\"$ref\":\"#/definitions/ArrayOfStringValues\"}]},\"enforceExtension\":{\"description\":\"Enforce using one of the extensions from the extensions option\",\"type\":\"boolean\"},\"enforceModuleExtension\":{\"description\":\"Enforce using one of the module extensions from the moduleExtensions option\",\"type\":\"boolean\"},\"extensions\":{\"description\":\"Extensions added to the request when trying to find the file\",\"anyOf\":[{\"$ref\":\"#/definitions/ArrayOfStringValues\"}]},\"fileSystem\":{\"description\":\"Filesystem for the resolver\"},\"mainFields\":{\"description\":\"Field names from the description file (package.json) which are used to find the default entry point\",\"anyOf\":[{\"$ref\":\"#/definitions/ArrayOfStringOrStringArrayValues\"}]},\"mainFiles\":{\"description\":\"Filenames used to find the default entry point if there is no description file or main field\",\"anyOf\":[{\"$ref\":\"#/definitions/ArrayOfStringValues\"}]},\"moduleExtensions\":{\"description\":\"Extensions added to the module request when trying to find the module\",\"anyOf\":[{\"$ref\":\"#/definitions/ArrayOfStringValues\"}]},\"modules\":{\"description\":\"Folder names or directory paths where to find modules\",\"anyOf\":[{\"$ref\":\"#/definitions/ArrayOfStringValues\"}]},\"plugins\":{\"description\":\"Plugins for the resolver\",\"type\":\"array\",\"items\":{\"description\":\"Plugin of type object or instanceof Function\",\"anyOf\":[{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"resolver\":{\"description\":\"Custom resolver\"},\"roots\":{\"description\":\"A list of directories in which requests that are server-relative URLs (starting with '/') are resolved. On non-windows system these requests are tried to resolve as absolute path first.\",\"type\":\"array\",\"items\":{\"description\":\"Directory in which requests that are server-relative URLs (starting with '/') are resolved.\",\"type\":\"string\"}},\"symlinks\":{\"description\":\"Enable resolving symlinks to the original location\",\"type\":\"boolean\"},\"unsafeCache\":{\"description\":\"Enable caching of successfully resolved requests\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":true}]},\"useSyncFileSystemCalls\":{\"description\":\"Use synchronous filesystem calls for the resolver\",\"type\":\"boolean\"}}},\"RuleSetCondition\":{\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"},{\"$ref\":\"#/definitions/RuleSetConditions\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"and\":{\"description\":\"Logical AND\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"exclude\":{\"description\":\"Exclude all modules matching any of these conditions\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"include\":{\"description\":\"Exclude all modules matching not any of these conditions\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"not\":{\"description\":\"Logical NOT\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"or\":{\"description\":\"Logical OR\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"test\":{\"description\":\"Exclude all modules matching any of these conditions\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]}}}]},\"RuleSetConditionAbsolute\":{\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"},{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"and\":{\"description\":\"Logical AND\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"exclude\":{\"description\":\"Exclude all modules matching any of these conditions\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"include\":{\"description\":\"Exclude all modules matching not any of these conditions\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"not\":{\"description\":\"Logical NOT\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"or\":{\"description\":\"Logical OR\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"test\":{\"description\":\"Exclude all modules matching any of these conditions\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]}}}]},\"RuleSetConditionOrConditions\":{\"description\":\"One or multiple rule conditions\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"},{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"RuleSetConditionOrConditionsAbsolute\":{\"description\":\"One or multiple rule conditions\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"},{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"RuleSetConditions\":{\"type\":\"array\",\"items\":{\"description\":\"A rule condition\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"}]}},\"RuleSetConditionsAbsolute\":{\"type\":\"array\",\"items\":{\"description\":\"A rule condition\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"}]}},\"RuleSetLoader\":{\"type\":\"string\",\"minLength\":1},\"RuleSetQuery\":{\"anyOf\":[{\"type\":\"object\"},{\"type\":\"string\"}]},\"RuleSetRule\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"compiler\":{\"description\":\"Match the child compiler name\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"enforce\":{\"description\":\"Enforce this rule as pre or post step\",\"enum\":[\"pre\",\"post\"]},\"exclude\":{\"description\":\"Shortcut for resource.exclude\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"include\":{\"description\":\"Shortcut for resource.include\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"issuer\":{\"description\":\"Match the issuer of the module (The module pointing to this module)\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"loader\":{\"description\":\"Shortcut for use.loader\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"},{\"$ref\":\"#/definitions/RuleSetUse\"}]},\"loaders\":{\"description\":\"Shortcut for use.loader\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetUse\"}]},\"oneOf\":{\"description\":\"Only execute the first matching rule in this array\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"options\":{\"description\":\"Shortcut for use.options\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetQuery\"}]},\"parser\":{\"description\":\"Options for parsing\",\"type\":\"object\",\"additionalProperties\":true},\"query\":{\"description\":\"Shortcut for use.query\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetQuery\"}]},\"realResource\":{\"description\":\"Match rules with custom resource name\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"resolve\":{\"description\":\"Options for the resolver\",\"type\":\"object\",\"anyOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"resource\":{\"description\":\"Match the resource path of the module\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"resourceQuery\":{\"description\":\"Match the resource query of the module\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"rules\":{\"description\":\"Match and execute these rules when this rule is matched\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"sideEffects\":{\"description\":\"Flags a module as with or without side effects\",\"type\":\"boolean\"},\"test\":{\"description\":\"Shortcut for resource.test\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"type\":{\"description\":\"Module type to use for the module\",\"enum\":[\"javascript/auto\",\"javascript/dynamic\",\"javascript/esm\",\"json\",\"webassembly/experimental\"]},\"use\":{\"description\":\"Modifiers applied to the module when rule is matched\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetUse\"}]}}},\"RuleSetRules\":{\"type\":\"array\",\"items\":{\"description\":\"A rule\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"RuleSetUse\":{\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetUseItem\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"type\":\"array\",\"items\":{\"description\":\"An use item\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetUseItem\"}]}}]},\"RuleSetUseItem\":{\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"ident\":{\"description\":\"Unique loader identifier\",\"type\":\"string\"},\"loader\":{\"description\":\"Loader name\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"options\":{\"description\":\"Loader options\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetQuery\"}]},\"query\":{\"description\":\"Loader query\",\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetQuery\"}]}}}]},\"StatsOptions\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"all\":{\"description\":\"fallback value for stats options when an option is not defined (has precedence over local webpack defaults)\",\"type\":\"boolean\"},\"assets\":{\"description\":\"add assets information\",\"type\":\"boolean\"},\"assetsSort\":{\"description\":\"sort the assets by that field\",\"type\":\"string\"},\"builtAt\":{\"description\":\"add built at time information\",\"type\":\"boolean\"},\"cached\":{\"description\":\"add also information about cached (not built) modules\",\"type\":\"boolean\"},\"cachedAssets\":{\"description\":\"Show cached assets (setting this to `false` only shows emitted files)\",\"type\":\"boolean\"},\"children\":{\"description\":\"add children information\",\"type\":\"boolean\"},\"chunkGroups\":{\"description\":\"Display all chunk groups with the corresponding bundles\",\"type\":\"boolean\"},\"chunkModules\":{\"description\":\"add built modules information to chunk information\",\"type\":\"boolean\"},\"chunkOrigins\":{\"description\":\"add the origins of chunks and chunk merging info\",\"type\":\"boolean\"},\"chunks\":{\"description\":\"add chunk information\",\"type\":\"boolean\"},\"chunksSort\":{\"description\":\"sort the chunks by that field\",\"type\":\"string\"},\"colors\":{\"description\":\"Enables/Disables colorful output\",\"oneOf\":[{\"description\":\"`webpack --colors` equivalent\",\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"bold\":{\"description\":\"Custom color for bold text\",\"type\":\"string\"},\"cyan\":{\"description\":\"Custom color for cyan text\",\"type\":\"string\"},\"green\":{\"description\":\"Custom color for green text\",\"type\":\"string\"},\"magenta\":{\"description\":\"Custom color for magenta text\",\"type\":\"string\"},\"red\":{\"description\":\"Custom color for red text\",\"type\":\"string\"},\"yellow\":{\"description\":\"Custom color for yellow text\",\"type\":\"string\"}}}]},\"context\":{\"description\":\"context directory for request shortening\",\"type\":\"string\",\"absolutePath\":true},\"depth\":{\"description\":\"add module depth in module graph\",\"type\":\"boolean\"},\"entrypoints\":{\"description\":\"Display the entry points with the corresponding bundles\",\"type\":\"boolean\"},\"env\":{\"description\":\"add --env information\",\"type\":\"boolean\"},\"errorDetails\":{\"description\":\"add details to errors (like resolving log)\",\"type\":\"boolean\"},\"errors\":{\"description\":\"add errors\",\"type\":\"boolean\"},\"exclude\":{\"description\":\"Please use excludeModules instead.\",\"anyOf\":[{\"$ref\":\"#/definitions/FilterTypes\"},{\"type\":\"boolean\"}]},\"excludeAssets\":{\"description\":\"Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions\",\"anyOf\":[{\"$ref\":\"#/definitions/FilterTypes\"}]},\"excludeModules\":{\"description\":\"Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions\",\"anyOf\":[{\"$ref\":\"#/definitions/FilterTypes\"},{\"type\":\"boolean\"}]},\"hash\":{\"description\":\"add the hash of the compilation\",\"type\":\"boolean\"},\"logging\":{\"description\":\"add logging output\",\"anyOf\":[{\"description\":\"enable/disable logging output (true: shows normal logging output, loglevel: log)\",\"type\":\"boolean\"},{\"description\":\"specify log level of logging output\",\"enum\":[\"none\",\"error\",\"warn\",\"info\",\"log\",\"verbose\"]}]},\"loggingDebug\":{\"description\":\"Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions\",\"anyOf\":[{\"$ref\":\"#/definitions/FilterTypes\"},{\"description\":\"Enable/Disable debug logging for all loggers\",\"type\":\"boolean\"}]},\"loggingTrace\":{\"description\":\"add stack traces to logging output\",\"type\":\"boolean\"},\"maxModules\":{\"description\":\"Set the maximum number of modules to be shown\",\"type\":\"number\"},\"moduleAssets\":{\"description\":\"add information about assets inside modules\",\"type\":\"boolean\"},\"moduleTrace\":{\"description\":\"add dependencies and origin of warnings/errors\",\"type\":\"boolean\"},\"modules\":{\"description\":\"add built modules information\",\"type\":\"boolean\"},\"modulesSort\":{\"description\":\"sort the modules by that field\",\"type\":\"string\"},\"nestedModules\":{\"description\":\"add information about modules nested in other modules (like with module concatenation)\",\"type\":\"boolean\"},\"optimizationBailout\":{\"description\":\"show reasons why optimization bailed out for modules\",\"type\":\"boolean\"},\"outputPath\":{\"description\":\"Add output path information\",\"type\":\"boolean\"},\"performance\":{\"description\":\"add performance hint flags\",\"type\":\"boolean\"},\"providedExports\":{\"description\":\"show exports provided by modules\",\"type\":\"boolean\"},\"publicPath\":{\"description\":\"Add public path information\",\"type\":\"boolean\"},\"reasons\":{\"description\":\"add information about the reasons why modules are included\",\"type\":\"boolean\"},\"source\":{\"description\":\"add the source code of modules\",\"type\":\"boolean\"},\"timings\":{\"description\":\"add timing information\",\"type\":\"boolean\"},\"usedExports\":{\"description\":\"show exports used by modules\",\"type\":\"boolean\"},\"version\":{\"description\":\"add webpack version information\",\"type\":\"boolean\"},\"warnings\":{\"description\":\"add warnings\",\"type\":\"boolean\"},\"warningsFilter\":{\"description\":\"Suppress warnings that match the specified filters. Filters can be Strings, RegExps or Functions\",\"anyOf\":[{\"$ref\":\"#/definitions/FilterTypes\"}]}}},\"WebpackPluginFunction\":{\"description\":\"Function acting as plugin\",\"instanceof\":\"Function\",\"tsType\":\"(this: import('../lib/Compiler'), compiler: import('../lib/Compiler')) => void\"},\"WebpackPluginInstance\":{\"description\":\"Plugin instance\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"apply\":{\"description\":\"The run point of the plugin, required method.\",\"instanceof\":\"Function\",\"tsType\":\"(compiler: import('../lib/Compiler')) => void\"}},\"required\":[\"apply\"]}},\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Set the value of `require.amd` and `define.amd`. Or disable AMD support.\",\"anyOf\":[{\"description\":\"You can pass `false` to disable AMD support.\",\"enum\":[false]},{\"description\":\"You can pass an object to set the value of `require.amd` and `define.amd`.\",\"type\":\"object\"}]},\"bail\":{\"description\":\"Report the first error as a hard error instead of tolerating it.\",\"type\":\"boolean\"},\"cache\":{\"description\":\"Cache generated modules and chunks to improve performance for multiple incremental builds.\",\"anyOf\":[{\"description\":\"You can pass `false` to disable it.\",\"type\":\"boolean\"},{\"description\":\"You can pass an object to enable it and let webpack use the passed object as cache. This way you can share the cache object between multiple compiler calls.\",\"type\":\"object\"}]},\"context\":{\"description\":\"The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.\",\"type\":\"string\",\"absolutePath\":true},\"dependencies\":{\"description\":\"References to other configurations to depend on.\",\"type\":\"array\",\"items\":{\"description\":\"References to another configuration to depend on.\",\"type\":\"string\"}},\"devServer\":{\"description\":\"Options for the webpack-dev-server\",\"type\":\"object\"},\"devtool\":{\"description\":\"A developer tool to enhance debugging.\",\"anyOf\":[{\"type\":\"string\"},{\"enum\":[false]}]},\"entry\":{\"description\":\"The entry point(s) of the compilation.\",\"anyOf\":[{\"$ref\":\"#/definitions/Entry\"}]},\"externals\":{\"description\":\"Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.\",\"anyOf\":[{\"$ref\":\"#/definitions/Externals\"}]},\"infrastructureLogging\":{\"description\":\"Options for infrastructure level logging\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"debug\":{\"description\":\"Enable debug logging for specific loggers\",\"anyOf\":[{\"$ref\":\"#/definitions/FilterTypes\"},{\"description\":\"Enable/Disable debug logging for all loggers\",\"type\":\"boolean\"}]},\"level\":{\"description\":\"Log level\",\"enum\":[\"none\",\"error\",\"warn\",\"info\",\"log\",\"verbose\"]}}},\"loader\":{\"description\":\"Custom values available in the loader context.\",\"type\":\"object\"},\"mode\":{\"description\":\"Enable production optimizations or development hints.\",\"enum\":[\"development\",\"production\",\"none\"]},\"module\":{\"description\":\"Options affecting the normal modules (`NormalModuleFactory`).\",\"anyOf\":[{\"$ref\":\"#/definitions/ModuleOptions\"}]},\"name\":{\"description\":\"Name of the configuration. Used when loading multiple configurations.\",\"type\":\"string\"},\"node\":{\"description\":\"Include polyfills or mocks for various node stuff.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/NodeOptions\"}]},\"optimization\":{\"description\":\"Enables/Disables integrated optimizations\",\"anyOf\":[{\"$ref\":\"#/definitions/OptimizationOptions\"}]},\"output\":{\"description\":\"Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.\",\"anyOf\":[{\"$ref\":\"#/definitions/OutputOptions\"}]},\"parallelism\":{\"description\":\"The number of parallel processed modules in the compilation.\",\"type\":\"number\",\"minimum\":1},\"performance\":{\"description\":\"Configuration for web performance recommendations.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/PerformanceOptions\"}]},\"plugins\":{\"description\":\"Add additional plugins to the compiler.\",\"type\":\"array\",\"items\":{\"description\":\"Plugin of type object or instanceof Function\",\"anyOf\":[{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"profile\":{\"description\":\"Capture timing information for each module.\",\"type\":\"boolean\"},\"recordsInputPath\":{\"description\":\"Store compiler state to a json file.\",\"type\":\"string\",\"absolutePath\":true},\"recordsOutputPath\":{\"description\":\"Load compiler state from a json file.\",\"type\":\"string\",\"absolutePath\":true},\"recordsPath\":{\"description\":\"Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.\",\"type\":\"string\",\"absolutePath\":true},\"resolve\":{\"description\":\"Options for the resolver\",\"anyOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"resolveLoader\":{\"description\":\"Options for the resolver when resolving loaders\",\"anyOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"serve\":{\"description\":\"Options for webpack-serve\",\"type\":\"object\"},\"stats\":{\"description\":\"Used by the webpack CLI program to pass stats options.\",\"anyOf\":[{\"$ref\":\"#/definitions/StatsOptions\"},{\"type\":\"boolean\"},{\"enum\":[\"none\",\"errors-only\",\"minimal\",\"normal\",\"detailed\",\"verbose\",\"errors-warnings\"]}]},\"target\":{\"description\":\"Environment to build for\",\"anyOf\":[{\"enum\":[\"web\",\"webworker\",\"node\",\"async-node\",\"node-webkit\",\"electron-main\",\"electron-renderer\",\"electron-preload\"]},{\"instanceof\":\"Function\",\"tsType\":\"((compiler: import('../lib/Compiler')) => void)\"}]},\"watch\":{\"description\":\"Enter watch mode, which rebuilds on file change.\",\"type\":\"boolean\"},\"watchOptions\":{\"description\":\"Options for the watcher\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"aggregateTimeout\":{\"description\":\"Delay the rebuilt after the first change. Value is a time in ms.\",\"type\":\"number\"},\"ignored\":{\"description\":\"Ignore some files from watching\"},\"poll\":{\"description\":\"Enable polling mode for watching\",\"anyOf\":[{\"description\":\"`true`: use polling.\",\"type\":\"boolean\"},{\"description\":\"`number`: use polling with specified interval.\",\"type\":\"number\"}]},\"stdin\":{\"description\":\"Stop watching when stdin stream has ended\",\"type\":\"boolean\"}}}}}"); + +/***/ }), + +/***/ 10171: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"definitions\":{\"BannerFunction\":{\"description\":\"The banner as function, it will be wrapped in a comment\",\"instanceof\":\"Function\",\"tsType\":\"(data: { hash: string, chunk: import('../../lib/Chunk'), filename: string, basename: string, query: string}) => string\"},\"Rule\":{\"oneOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"minLength\":1}]},\"Rules\":{\"oneOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A rule condition\",\"anyOf\":[{\"$ref\":\"#/definitions/Rule\"}]}},{\"$ref\":\"#/definitions/Rule\"}]}},\"title\":\"BannerPluginArgument\",\"oneOf\":[{\"title\":\"BannerPluginOptions\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"banner\":{\"description\":\"Specifies the banner\",\"anyOf\":[{\"$ref\":\"#/definitions/BannerFunction\"},{\"type\":\"string\"}]},\"entryOnly\":{\"description\":\"If true, the banner will only be added to the entry chunks\",\"type\":\"boolean\"},\"exclude\":{\"description\":\"Exclude all modules matching any of these conditions\",\"anyOf\":[{\"$ref\":\"#/definitions/Rules\"}]},\"include\":{\"description\":\"Include all modules matching any of these conditions\",\"anyOf\":[{\"$ref\":\"#/definitions/Rules\"}]},\"raw\":{\"description\":\"If true, banner will not be wrapped in a comment\",\"type\":\"boolean\"},\"test\":{\"description\":\"Include all modules that pass test assertion\",\"anyOf\":[{\"$ref\":\"#/definitions/Rules\"}]}},\"required\":[\"banner\"]},{\"$ref\":\"#/definitions/BannerFunction\"},{\"description\":\"The banner as string, it will be wrapped in a comment\",\"type\":\"string\",\"minLength\":1}]}"); + +/***/ }), + +/***/ 7303: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"DllPluginOptions\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"context\":{\"description\":\"Context of requests in the manifest file (defaults to the webpack context)\",\"type\":\"string\",\"minLength\":1},\"entryOnly\":{\"description\":\"If true, only entry points will be exposed\",\"type\":\"boolean\"},\"format\":{\"description\":\"If true, manifest json file (output) will be formatted\",\"type\":\"boolean\"},\"name\":{\"description\":\"Name of the exposed dll function (external name, use value of 'output.library')\",\"type\":\"string\",\"minLength\":1},\"path\":{\"description\":\"Absolute path to the manifest json file (output)\",\"type\":\"string\",\"minLength\":1},\"type\":{\"description\":\"Type of the dll bundle (external type, use value of 'output.libraryTarget')\",\"type\":\"string\",\"minLength\":1}},\"required\":[\"path\"]}"); + +/***/ }), + +/***/ 61112: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"definitions\":{\"DllReferencePluginOptionsContent\":{\"description\":\"The mappings from request to module info\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Module info\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"buildMeta\":{\"description\":\"Meta information about the module\",\"type\":\"object\"},\"exports\":{\"description\":\"Information about the provided exports of the module\",\"anyOf\":[{\"description\":\"Exports unknown/dynamic\",\"enum\":[true]},{\"description\":\"List of provided exports of the module\",\"type\":\"array\",\"items\":{\"description\":\"Name of the export\",\"type\":\"string\",\"minLength\":1}}]},\"id\":{\"description\":\"Module ID\",\"anyOf\":[{\"type\":\"number\"},{\"type\":\"string\",\"minLength\":1}]}},\"required\":[\"id\"]},\"minProperties\":1},\"DllReferencePluginOptionsManifest\":{\"description\":\"An object containing content, name and type\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"content\":{\"description\":\"The mappings from request to module info\",\"anyOf\":[{\"$ref\":\"#/definitions/DllReferencePluginOptionsContent\"}]},\"name\":{\"description\":\"The name where the dll is exposed (external name)\",\"type\":\"string\",\"minLength\":1},\"type\":{\"description\":\"The type how the dll is exposed (external type)\",\"anyOf\":[{\"$ref\":\"#/definitions/DllReferencePluginOptionsSourceType\"}]}},\"required\":[\"content\"]},\"DllReferencePluginOptionsSourceType\":{\"description\":\"The type how the dll is exposed (external type)\",\"enum\":[\"var\",\"assign\",\"this\",\"window\",\"global\",\"commonjs\",\"commonjs2\",\"commonjs-module\",\"amd\",\"amd-require\",\"umd\",\"umd2\",\"jsonp\"]}},\"title\":\"DllReferencePluginOptions\",\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"context\":{\"description\":\"(absolute path) context of requests in the manifest (or content property)\",\"type\":\"string\",\"absolutePath\":true},\"extensions\":{\"description\":\"Extensions used to resolve modules in the dll bundle (only used when using 'scope')\",\"type\":\"array\",\"items\":{\"description\":\"An extension\",\"type\":\"string\"}},\"manifest\":{\"description\":\"An object containing content and name or a string to the absolute path of the JSON manifest to be loaded upon compilation\",\"oneOf\":[{\"$ref\":\"#/definitions/DllReferencePluginOptionsManifest\"},{\"type\":\"string\",\"absolutePath\":true}]},\"name\":{\"description\":\"The name where the dll is exposed (external name, defaults to manifest.name)\",\"type\":\"string\",\"minLength\":1},\"scope\":{\"description\":\"Prefix which is used for accessing the content of the dll\",\"type\":\"string\",\"minLength\":1},\"sourceType\":{\"description\":\"How the dll is exposed (libraryTarget, defaults to manifest.type)\",\"anyOf\":[{\"$ref\":\"#/definitions/DllReferencePluginOptionsSourceType\"}]},\"type\":{\"description\":\"The way how the export of the dll bundle is used\",\"enum\":[\"require\",\"object\"]}},\"required\":[\"manifest\"]},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"content\":{\"description\":\"The mappings from request to module info\",\"anyOf\":[{\"$ref\":\"#/definitions/DllReferencePluginOptionsContent\"}]},\"context\":{\"description\":\"(absolute path) context of requests in the manifest (or content property)\",\"type\":\"string\",\"absolutePath\":true},\"extensions\":{\"description\":\"Extensions used to resolve modules in the dll bundle (only used when using 'scope')\",\"type\":\"array\",\"items\":{\"description\":\"An extension\",\"type\":\"string\"}},\"name\":{\"description\":\"The name where the dll is exposed (external name)\",\"type\":\"string\",\"minLength\":1},\"scope\":{\"description\":\"Prefix which is used for accessing the content of the dll\",\"type\":\"string\",\"minLength\":1},\"sourceType\":{\"description\":\"How the dll is exposed (libraryTarget)\",\"anyOf\":[{\"$ref\":\"#/definitions/DllReferencePluginOptionsSourceType\"}]},\"type\":{\"description\":\"The way how the export of the dll bundle is used\",\"enum\":[\"require\",\"object\"]}},\"required\":[\"content\",\"name\"]}]}"); + +/***/ }), + +/***/ 45843: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"HashedModuleIdsPluginOptions\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"context\":{\"description\":\"The context directory for creating names.\",\"type\":\"string\",\"absolutePath\":true},\"hashDigest\":{\"description\":\"The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.\",\"enum\":[\"hex\",\"latin1\",\"base64\"]},\"hashDigestLength\":{\"description\":\"The prefix length of the hash digest to use, defaults to 4.\",\"type\":\"number\",\"minimum\":1},\"hashFunction\":{\"description\":\"The hashing algorithm to use, defaults to 'md5'. All functions from Node.JS' crypto.createHash are supported.\",\"type\":\"string\",\"minLength\":1}}}"); + +/***/ }), + +/***/ 69667: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"IgnorePluginOptions\",\"oneOf\":[{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"contextRegExp\":{\"description\":\"A RegExp to test the context (directory) against\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},\"resourceRegExp\":{\"description\":\"A RegExp to test the request against\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"checkContext\":{\"description\":\"A filter function for context\",\"instanceof\":\"Function\",\"tsType\":\"((context: string) => boolean)\"},\"checkResource\":{\"description\":\"A filter function for resource and context\",\"instanceof\":\"Function\",\"tsType\":\"((resource: string, context: string) => boolean)\"}}}]}"); + +/***/ }), + +/***/ 4994: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"LoaderOptionsPluginOptions\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"debug\":{\"description\":\"Whether loaders should be in debug mode or not. debug will be removed as of webpack 3\",\"type\":\"boolean\"},\"minimize\":{\"description\":\"Where loaders can be switched to minimize mode\",\"type\":\"boolean\"},\"options\":{\"description\":\"A configuration object that can be used to configure older loaders\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"context\":{\"description\":\"The context that can be used to configure older loaders\",\"type\":\"string\",\"absolutePath\":true}}}}}"); + +/***/ }), + +/***/ 26336: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"definitions\":{\"HandlerFunction\":{\"description\":\"Function that executes for every progress step\",\"instanceof\":\"Function\",\"tsType\":\"((percentage: number, msg: string, ...args: string[]) => void)\"},\"ProgressPluginOptions\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"activeModules\":{\"description\":\"Show active modules count and one active module in progress message\",\"type\":\"boolean\"},\"entries\":{\"description\":\"Show entries count in progress message\",\"type\":\"boolean\"},\"handler\":{\"description\":\"Function that executes for every progress step\",\"anyOf\":[{\"$ref\":\"#/definitions/HandlerFunction\"}]},\"modules\":{\"description\":\"Show modules count in progress message\",\"type\":\"boolean\"},\"modulesCount\":{\"description\":\"Minimum modules count to start with. Only for mode=modules. Default: 500\",\"type\":\"number\"},\"profile\":{\"description\":\"Collect profile data for progress steps. Default: false\",\"enum\":[true,false,null]}}}},\"title\":\"ProgressPluginArgument\",\"oneOf\":[{\"$ref\":\"#/definitions/ProgressPluginOptions\"},{\"$ref\":\"#/definitions/HandlerFunction\"}]}"); + +/***/ }), + +/***/ 7368: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"definitions\":{\"rule\":{\"oneOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"minLength\":1}]},\"rules\":{\"oneOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A rule condition\",\"anyOf\":[{\"$ref\":\"#/definitions/rule\"}]}},{\"$ref\":\"#/definitions/rule\"}]}},\"title\":\"SourceMapDevToolPluginOptions\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"append\":{\"description\":\"Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending\",\"oneOf\":[{\"description\":\"Append no SourceMap comment to the bundle, but still generate SourceMaps\",\"enum\":[false,null]},{\"type\":\"string\",\"minLength\":1}]},\"columns\":{\"description\":\"Indicates whether column mappings should be used (defaults to true)\",\"type\":\"boolean\"},\"exclude\":{\"description\":\"Exclude modules that match the given value from source map generation\",\"anyOf\":[{\"$ref\":\"#/definitions/rules\"}]},\"fallbackModuleFilenameTemplate\":{\"description\":\"Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict\",\"oneOf\":[{\"description\":\"Custom function generating the identifer\",\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"type\":\"string\",\"minLength\":1}]},\"fileContext\":{\"description\":\"Path prefix to which the [file] placeholder is relative to\",\"type\":\"string\"},\"filename\":{\"description\":\"Defines the output filename of the SourceMap (will be inlined if no value is provided)\",\"oneOf\":[{\"description\":\"Disable separate SourceMap file and inline SourceMap as DataUrl\",\"enum\":[false,null]},{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1}]},\"include\":{\"description\":\"Include source maps for module paths that match the given value\",\"anyOf\":[{\"$ref\":\"#/definitions/rules\"}]},\"lineToLine\":{\"description\":\"(deprecated) try to map original files line to line to generated files\",\"anyOf\":[{\"type\":\"boolean\"},{\"description\":\"Simplify and speed up source mapping by using line to line source mappings for matched modules\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"exclude\":{\"description\":\"Exclude modules that match the given value from source map generation\",\"anyOf\":[{\"$ref\":\"#/definitions/rules\"}]},\"include\":{\"description\":\"Include source maps for module paths that match the given value\",\"anyOf\":[{\"$ref\":\"#/definitions/rules\"}]},\"test\":{\"description\":\"Include source maps for modules based on their extension (defaults to .js and .css)\",\"anyOf\":[{\"$ref\":\"#/definitions/rules\"}]}}}]},\"module\":{\"description\":\"Indicates whether SourceMaps from loaders should be used (defaults to true)\",\"type\":\"boolean\"},\"moduleFilenameTemplate\":{\"description\":\"Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap\",\"oneOf\":[{\"description\":\"Custom function generating the identifer\",\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"type\":\"string\",\"minLength\":1}]},\"namespace\":{\"description\":\"Namespace prefix to allow multiple webpack roots in the devtools\",\"type\":\"string\"},\"noSources\":{\"description\":\"Omit the 'sourceContents' array from the SourceMap\",\"type\":\"boolean\"},\"publicPath\":{\"description\":\"Provide a custom public path for the SourceMapping comment\",\"type\":\"string\"},\"sourceRoot\":{\"description\":\"Provide a custom value for the 'sourceRoot' property in the SourceMap\",\"type\":\"string\"},\"test\":{\"description\":\"Include source maps for modules based on their extension (defaults to .js and .css)\",\"anyOf\":[{\"$ref\":\"#/definitions/rules\"}]}}}"); + +/***/ }), + +/***/ 97009: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"WatchIgnorePluginOptions\",\"description\":\"A list of RegExps or absolute paths to directories or files that should be ignored\",\"type\":\"array\",\"items\":{\"description\":\"RegExp or absolute path to directories or files that should be ignored\",\"oneOf\":[{\"type\":\"string\"},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}]},\"minItems\":1}"); + +/***/ }), + +/***/ 49049: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"ProfilingPluginOptions\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"outputPath\":{\"description\":\"Path to the output file e.g. `profiling/events.json`. Defaults to `events.json`.\",\"type\":\"string\",\"absolutePath\":false,\"minLength\":4}}}"); + +/***/ }), + +/***/ 71884: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"AggressiveSplittingPluginOptions\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"chunkOverhead\":{\"description\":\"Default: 0\",\"type\":\"number\"},\"entryChunkMultiplicator\":{\"description\":\"Default: 1\",\"type\":\"number\"},\"maxSize\":{\"description\":\"Byte, maxsize of per file. Default: 51200\",\"type\":\"number\"},\"minSize\":{\"description\":\"Byte, split point. Default: 30720\",\"type\":\"number\"}}}"); + +/***/ }), + +/***/ 27993: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"LimitChunkCountPluginOptions\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"maxChunks\":{\"description\":\"Limit the maximum number of chunks using a value greater greater than or equal to 1\",\"type\":\"number\",\"minimum\":1},\"minChunkSize\":{\"description\":\"Set a minimum chunk size\",\"type\":\"number\"}}}"); + +/***/ }), + +/***/ 8670: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"MinChunkSizePluginOptions\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"minChunkSize\":{\"description\":\"Minimum number of characters\",\"type\":\"number\"}},\"required\":[\"minChunkSize\"]}"); + +/***/ }), + +/***/ 88771: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"OccurrenceOrderChunkIdsPluginOptions\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"prioritiseInitial\":{\"description\":\"Prioritise initial size over total size\",\"type\":\"boolean\"}}}"); + +/***/ }), + +/***/ 81430: +/***/ (function(module) { + +"use strict"; +module.exports = JSON.parse("{\"title\":\"OccurrenceOrderModuleIdsPluginOptions\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"prioritiseInitial\":{\"description\":\"Prioritise initial size over total size\",\"type\":\"boolean\"}}}"); + +/***/ }), + +/***/ 95373: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.cloneNode = cloneNode; + +function cloneNode(n) { + // $FlowIgnore + var newObj = {}; + + for (var k in n) { + newObj[k] = n[k]; + } + + return newObj; +} + +/***/ }), + +/***/ 98688: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +var _exportNames = { + numberLiteralFromRaw: true, + withLoc: true, + withRaw: true, + funcParam: true, + indexLiteral: true, + memIndexLiteral: true, + instruction: true, + objectInstruction: true, + traverse: true, + signatures: true, + cloneNode: true +}; +Object.defineProperty(exports, "numberLiteralFromRaw", ({ + enumerable: true, + get: function get() { + return _nodeHelpers.numberLiteralFromRaw; + } +})); +Object.defineProperty(exports, "withLoc", ({ + enumerable: true, + get: function get() { + return _nodeHelpers.withLoc; + } +})); +Object.defineProperty(exports, "withRaw", ({ + enumerable: true, + get: function get() { + return _nodeHelpers.withRaw; + } +})); +Object.defineProperty(exports, "funcParam", ({ + enumerable: true, + get: function get() { + return _nodeHelpers.funcParam; + } +})); +Object.defineProperty(exports, "indexLiteral", ({ + enumerable: true, + get: function get() { + return _nodeHelpers.indexLiteral; + } +})); +Object.defineProperty(exports, "memIndexLiteral", ({ + enumerable: true, + get: function get() { + return _nodeHelpers.memIndexLiteral; + } +})); +Object.defineProperty(exports, "instruction", ({ + enumerable: true, + get: function get() { + return _nodeHelpers.instruction; + } +})); +Object.defineProperty(exports, "objectInstruction", ({ + enumerable: true, + get: function get() { + return _nodeHelpers.objectInstruction; + } +})); +Object.defineProperty(exports, "traverse", ({ + enumerable: true, + get: function get() { + return _traverse.traverse; + } +})); +Object.defineProperty(exports, "signatures", ({ + enumerable: true, + get: function get() { + return _signatures.signatures; + } +})); +Object.defineProperty(exports, "cloneNode", ({ + enumerable: true, + get: function get() { + return _clone.cloneNode; + } +})); + +var _nodes = __webpack_require__(36588); + +Object.keys(_nodes).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _nodes[key]; + } + }); +}); + +var _nodeHelpers = __webpack_require__(69887); + +var _traverse = __webpack_require__(34390); + +var _signatures = __webpack_require__(14004); + +var _utils = __webpack_require__(26038); + +Object.keys(_utils).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _utils[key]; + } + }); +}); + +var _clone = __webpack_require__(95373); + +/***/ }), + +/***/ 69887: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.numberLiteralFromRaw = numberLiteralFromRaw; +exports.instruction = instruction; +exports.objectInstruction = objectInstruction; +exports.withLoc = withLoc; +exports.withRaw = withRaw; +exports.funcParam = funcParam; +exports.indexLiteral = indexLiteral; +exports.memIndexLiteral = memIndexLiteral; + +var _wastParser = __webpack_require__(9016); + +var _nodes = __webpack_require__(36588); + +function numberLiteralFromRaw(rawValue) { + var instructionType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "i32"; + var original = rawValue; // Remove numeric separators _ + + if (typeof rawValue === "string") { + rawValue = rawValue.replace(/_/g, ""); + } + + if (typeof rawValue === "number") { + return (0, _nodes.numberLiteral)(rawValue, String(original)); + } else { + switch (instructionType) { + case "i32": + { + return (0, _nodes.numberLiteral)((0, _wastParser.parse32I)(rawValue), String(original)); + } + + case "u32": + { + return (0, _nodes.numberLiteral)((0, _wastParser.parseU32)(rawValue), String(original)); + } + + case "i64": + { + return (0, _nodes.longNumberLiteral)((0, _wastParser.parse64I)(rawValue), String(original)); + } + + case "f32": + { + return (0, _nodes.floatLiteral)((0, _wastParser.parse32F)(rawValue), (0, _wastParser.isNanLiteral)(rawValue), (0, _wastParser.isInfLiteral)(rawValue), String(original)); + } + // f64 + + default: + { + return (0, _nodes.floatLiteral)((0, _wastParser.parse64F)(rawValue), (0, _wastParser.isNanLiteral)(rawValue), (0, _wastParser.isInfLiteral)(rawValue), String(original)); + } + } + } +} + +function instruction(id) { + var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var namedArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return (0, _nodes.instr)(id, undefined, args, namedArgs); +} + +function objectInstruction(id, object) { + var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + var namedArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + return (0, _nodes.instr)(id, object, args, namedArgs); +} +/** + * Decorators + */ + + +function withLoc(n, end, start) { + var loc = { + start: start, + end: end + }; + n.loc = loc; + return n; +} + +function withRaw(n, raw) { + n.raw = raw; + return n; +} + +function funcParam(valtype, id) { + return { + id: id, + valtype: valtype + }; +} + +function indexLiteral(value) { + // $FlowIgnore + var x = numberLiteralFromRaw(value, "u32"); + return x; +} + +function memIndexLiteral(value) { + // $FlowIgnore + var x = numberLiteralFromRaw(value, "u32"); + return x; +} + +/***/ }), + +/***/ 27110: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.createPath = createPath; + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function findParent(_ref, cb) { + var parentPath = _ref.parentPath; + + if (parentPath == null) { + throw new Error("node is root"); + } + + var currentPath = parentPath; + + while (cb(currentPath) !== false) { + // Hit the root node, stop + // $FlowIgnore + if (currentPath.parentPath == null) { + return null; + } // $FlowIgnore + + + currentPath = currentPath.parentPath; + } + + return currentPath.node; +} + +function insertBefore(context, newNode) { + return insert(context, newNode); +} + +function insertAfter(context, newNode) { + return insert(context, newNode, 1); +} + +function insert(_ref2, newNode) { + var node = _ref2.node, + inList = _ref2.inList, + parentPath = _ref2.parentPath, + parentKey = _ref2.parentKey; + var indexOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + + if (!inList) { + throw new Error('inList' + " error: " + ("insert can only be used for nodes that are within lists" || 0)); + } + + if (!(parentPath != null)) { + throw new Error('parentPath != null' + " error: " + ("Can not remove root node" || 0)); + } + + // $FlowIgnore + var parentList = parentPath.node[parentKey]; + var indexInList = parentList.findIndex(function (n) { + return n === node; + }); + parentList.splice(indexInList + indexOffset, 0, newNode); +} + +function remove(_ref3) { + var node = _ref3.node, + parentKey = _ref3.parentKey, + parentPath = _ref3.parentPath; + + if (!(parentPath != null)) { + throw new Error('parentPath != null' + " error: " + ("Can not remove root node" || 0)); + } + + // $FlowIgnore + var parentNode = parentPath.node; // $FlowIgnore + + var parentProperty = parentNode[parentKey]; + + if (Array.isArray(parentProperty)) { + // $FlowIgnore + parentNode[parentKey] = parentProperty.filter(function (n) { + return n !== node; + }); + } else { + // $FlowIgnore + delete parentNode[parentKey]; + } + + node._deleted = true; +} + +function stop(context) { + context.shouldStop = true; +} + +function replaceWith(context, newNode) { + // $FlowIgnore + var parentNode = context.parentPath.node; // $FlowIgnore + + var parentProperty = parentNode[context.parentKey]; + + if (Array.isArray(parentProperty)) { + var indexInList = parentProperty.findIndex(function (n) { + return n === context.node; + }); + parentProperty.splice(indexInList, 1, newNode); + } else { + // $FlowIgnore + parentNode[context.parentKey] = newNode; + } + + context.node._deleted = true; + context.node = newNode; +} // bind the context to the first argument of node operations + + +function bindNodeOperations(operations, context) { + var keys = Object.keys(operations); + var boundOperations = {}; + keys.forEach(function (key) { + boundOperations[key] = operations[key].bind(null, context); + }); + return boundOperations; +} + +function createPathOperations(context) { + // $FlowIgnore + return bindNodeOperations({ + findParent: findParent, + replaceWith: replaceWith, + remove: remove, + insertBefore: insertBefore, + insertAfter: insertAfter, + stop: stop + }, context); +} + +function createPath(context) { + var path = _extends({}, context); // $FlowIgnore + + + Object.assign(path, createPathOperations(path)); // $FlowIgnore + + return path; +} + +/***/ }), + +/***/ 36588: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.module = _module; +exports.moduleMetadata = moduleMetadata; +exports.moduleNameMetadata = moduleNameMetadata; +exports.functionNameMetadata = functionNameMetadata; +exports.localNameMetadata = localNameMetadata; +exports.binaryModule = binaryModule; +exports.quoteModule = quoteModule; +exports.sectionMetadata = sectionMetadata; +exports.producersSectionMetadata = producersSectionMetadata; +exports.producerMetadata = producerMetadata; +exports.producerMetadataVersionedName = producerMetadataVersionedName; +exports.loopInstruction = loopInstruction; +exports.instr = instr; +exports.ifInstruction = ifInstruction; +exports.stringLiteral = stringLiteral; +exports.numberLiteral = numberLiteral; +exports.longNumberLiteral = longNumberLiteral; +exports.floatLiteral = floatLiteral; +exports.elem = elem; +exports.indexInFuncSection = indexInFuncSection; +exports.valtypeLiteral = valtypeLiteral; +exports.typeInstruction = typeInstruction; +exports.start = start; +exports.globalType = globalType; +exports.leadingComment = leadingComment; +exports.blockComment = blockComment; +exports.data = data; +exports.global = global; +exports.table = table; +exports.memory = memory; +exports.funcImportDescr = funcImportDescr; +exports.moduleImport = moduleImport; +exports.moduleExportDescr = moduleExportDescr; +exports.moduleExport = moduleExport; +exports.limit = limit; +exports.signature = signature; +exports.program = program; +exports.identifier = identifier; +exports.blockInstruction = blockInstruction; +exports.callInstruction = callInstruction; +exports.callIndirectInstruction = callIndirectInstruction; +exports.byteArray = byteArray; +exports.func = func; +exports.internalBrUnless = internalBrUnless; +exports.internalGoto = internalGoto; +exports.internalCallExtern = internalCallExtern; +exports.internalEndAndReturn = internalEndAndReturn; +exports.assertInternalCallExtern = exports.assertInternalGoto = exports.assertInternalBrUnless = exports.assertFunc = exports.assertByteArray = exports.assertCallIndirectInstruction = exports.assertCallInstruction = exports.assertBlockInstruction = exports.assertIdentifier = exports.assertProgram = exports.assertSignature = exports.assertLimit = exports.assertModuleExport = exports.assertModuleExportDescr = exports.assertModuleImport = exports.assertFuncImportDescr = exports.assertMemory = exports.assertTable = exports.assertGlobal = exports.assertData = exports.assertBlockComment = exports.assertLeadingComment = exports.assertGlobalType = exports.assertStart = exports.assertTypeInstruction = exports.assertValtypeLiteral = exports.assertIndexInFuncSection = exports.assertElem = exports.assertFloatLiteral = exports.assertLongNumberLiteral = exports.assertNumberLiteral = exports.assertStringLiteral = exports.assertIfInstruction = exports.assertInstr = exports.assertLoopInstruction = exports.assertProducerMetadataVersionedName = exports.assertProducerMetadata = exports.assertProducersSectionMetadata = exports.assertSectionMetadata = exports.assertQuoteModule = exports.assertBinaryModule = exports.assertLocalNameMetadata = exports.assertFunctionNameMetadata = exports.assertModuleNameMetadata = exports.assertModuleMetadata = exports.assertModule = exports.isIntrinsic = exports.isImportDescr = exports.isNumericLiteral = exports.isExpression = exports.isInstruction = exports.isBlock = exports.isNode = exports.isInternalEndAndReturn = exports.isInternalCallExtern = exports.isInternalGoto = exports.isInternalBrUnless = exports.isFunc = exports.isByteArray = exports.isCallIndirectInstruction = exports.isCallInstruction = exports.isBlockInstruction = exports.isIdentifier = exports.isProgram = exports.isSignature = exports.isLimit = exports.isModuleExport = exports.isModuleExportDescr = exports.isModuleImport = exports.isFuncImportDescr = exports.isMemory = exports.isTable = exports.isGlobal = exports.isData = exports.isBlockComment = exports.isLeadingComment = exports.isGlobalType = exports.isStart = exports.isTypeInstruction = exports.isValtypeLiteral = exports.isIndexInFuncSection = exports.isElem = exports.isFloatLiteral = exports.isLongNumberLiteral = exports.isNumberLiteral = exports.isStringLiteral = exports.isIfInstruction = exports.isInstr = exports.isLoopInstruction = exports.isProducerMetadataVersionedName = exports.isProducerMetadata = exports.isProducersSectionMetadata = exports.isSectionMetadata = exports.isQuoteModule = exports.isBinaryModule = exports.isLocalNameMetadata = exports.isFunctionNameMetadata = exports.isModuleNameMetadata = exports.isModuleMetadata = exports.isModule = void 0; +exports.nodeAndUnionTypes = exports.unionTypesMap = exports.assertInternalEndAndReturn = void 0; + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +// THIS FILE IS AUTOGENERATED +// see scripts/generateNodeUtils.js +function isTypeOf(t) { + return function (n) { + return n.type === t; + }; +} + +function assertTypeOf(t) { + return function (n) { + return function () { + if (!(n.type === t)) { + throw new Error('n.type === t' + " error: " + (undefined || "unknown")); + } + }(); + }; +} + +function _module(id, fields, metadata) { + if (id !== null && id !== undefined) { + if (!(typeof id === "string")) { + throw new Error('typeof id === "string"' + " error: " + ("Argument id must be of type string, given: " + _typeof(id) || 0)); + } + } + + if (!(_typeof(fields) === "object" && typeof fields.length !== "undefined")) { + throw new Error('typeof fields === "object" && typeof fields.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "Module", + id: id, + fields: fields + }; + + if (typeof metadata !== "undefined") { + node.metadata = metadata; + } + + return node; +} + +function moduleMetadata(sections, functionNames, localNames, producers) { + if (!(_typeof(sections) === "object" && typeof sections.length !== "undefined")) { + throw new Error('typeof sections === "object" && typeof sections.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + if (functionNames !== null && functionNames !== undefined) { + if (!(_typeof(functionNames) === "object" && typeof functionNames.length !== "undefined")) { + throw new Error('typeof functionNames === "object" && typeof functionNames.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + } + + if (localNames !== null && localNames !== undefined) { + if (!(_typeof(localNames) === "object" && typeof localNames.length !== "undefined")) { + throw new Error('typeof localNames === "object" && typeof localNames.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + } + + if (producers !== null && producers !== undefined) { + if (!(_typeof(producers) === "object" && typeof producers.length !== "undefined")) { + throw new Error('typeof producers === "object" && typeof producers.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + } + + var node = { + type: "ModuleMetadata", + sections: sections + }; + + if (typeof functionNames !== "undefined" && functionNames.length > 0) { + node.functionNames = functionNames; + } + + if (typeof localNames !== "undefined" && localNames.length > 0) { + node.localNames = localNames; + } + + if (typeof producers !== "undefined" && producers.length > 0) { + node.producers = producers; + } + + return node; +} + +function moduleNameMetadata(value) { + if (!(typeof value === "string")) { + throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); + } + + var node = { + type: "ModuleNameMetadata", + value: value + }; + return node; +} + +function functionNameMetadata(value, index) { + if (!(typeof value === "string")) { + throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); + } + + if (!(typeof index === "number")) { + throw new Error('typeof index === "number"' + " error: " + ("Argument index must be of type number, given: " + _typeof(index) || 0)); + } + + var node = { + type: "FunctionNameMetadata", + value: value, + index: index + }; + return node; +} + +function localNameMetadata(value, localIndex, functionIndex) { + if (!(typeof value === "string")) { + throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); + } + + if (!(typeof localIndex === "number")) { + throw new Error('typeof localIndex === "number"' + " error: " + ("Argument localIndex must be of type number, given: " + _typeof(localIndex) || 0)); + } + + if (!(typeof functionIndex === "number")) { + throw new Error('typeof functionIndex === "number"' + " error: " + ("Argument functionIndex must be of type number, given: " + _typeof(functionIndex) || 0)); + } + + var node = { + type: "LocalNameMetadata", + value: value, + localIndex: localIndex, + functionIndex: functionIndex + }; + return node; +} + +function binaryModule(id, blob) { + if (id !== null && id !== undefined) { + if (!(typeof id === "string")) { + throw new Error('typeof id === "string"' + " error: " + ("Argument id must be of type string, given: " + _typeof(id) || 0)); + } + } + + if (!(_typeof(blob) === "object" && typeof blob.length !== "undefined")) { + throw new Error('typeof blob === "object" && typeof blob.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "BinaryModule", + id: id, + blob: blob + }; + return node; +} + +function quoteModule(id, string) { + if (id !== null && id !== undefined) { + if (!(typeof id === "string")) { + throw new Error('typeof id === "string"' + " error: " + ("Argument id must be of type string, given: " + _typeof(id) || 0)); + } + } + + if (!(_typeof(string) === "object" && typeof string.length !== "undefined")) { + throw new Error('typeof string === "object" && typeof string.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "QuoteModule", + id: id, + string: string + }; + return node; +} + +function sectionMetadata(section, startOffset, size, vectorOfSize) { + if (!(typeof startOffset === "number")) { + throw new Error('typeof startOffset === "number"' + " error: " + ("Argument startOffset must be of type number, given: " + _typeof(startOffset) || 0)); + } + + var node = { + type: "SectionMetadata", + section: section, + startOffset: startOffset, + size: size, + vectorOfSize: vectorOfSize + }; + return node; +} + +function producersSectionMetadata(producers) { + if (!(_typeof(producers) === "object" && typeof producers.length !== "undefined")) { + throw new Error('typeof producers === "object" && typeof producers.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "ProducersSectionMetadata", + producers: producers + }; + return node; +} + +function producerMetadata(language, processedBy, sdk) { + if (!(_typeof(language) === "object" && typeof language.length !== "undefined")) { + throw new Error('typeof language === "object" && typeof language.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + if (!(_typeof(processedBy) === "object" && typeof processedBy.length !== "undefined")) { + throw new Error('typeof processedBy === "object" && typeof processedBy.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + if (!(_typeof(sdk) === "object" && typeof sdk.length !== "undefined")) { + throw new Error('typeof sdk === "object" && typeof sdk.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "ProducerMetadata", + language: language, + processedBy: processedBy, + sdk: sdk + }; + return node; +} + +function producerMetadataVersionedName(name, version) { + if (!(typeof name === "string")) { + throw new Error('typeof name === "string"' + " error: " + ("Argument name must be of type string, given: " + _typeof(name) || 0)); + } + + if (!(typeof version === "string")) { + throw new Error('typeof version === "string"' + " error: " + ("Argument version must be of type string, given: " + _typeof(version) || 0)); + } + + var node = { + type: "ProducerMetadataVersionedName", + name: name, + version: version + }; + return node; +} + +function loopInstruction(label, resulttype, instr) { + if (!(_typeof(instr) === "object" && typeof instr.length !== "undefined")) { + throw new Error('typeof instr === "object" && typeof instr.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "LoopInstruction", + id: "loop", + label: label, + resulttype: resulttype, + instr: instr + }; + return node; +} + +function instr(id, object, args, namedArgs) { + if (!(typeof id === "string")) { + throw new Error('typeof id === "string"' + " error: " + ("Argument id must be of type string, given: " + _typeof(id) || 0)); + } + + if (!(_typeof(args) === "object" && typeof args.length !== "undefined")) { + throw new Error('typeof args === "object" && typeof args.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "Instr", + id: id, + args: args + }; + + if (typeof object !== "undefined") { + node.object = object; + } + + if (typeof namedArgs !== "undefined" && Object.keys(namedArgs).length !== 0) { + node.namedArgs = namedArgs; + } + + return node; +} + +function ifInstruction(testLabel, test, result, consequent, alternate) { + if (!(_typeof(test) === "object" && typeof test.length !== "undefined")) { + throw new Error('typeof test === "object" && typeof test.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + if (!(_typeof(consequent) === "object" && typeof consequent.length !== "undefined")) { + throw new Error('typeof consequent === "object" && typeof consequent.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + if (!(_typeof(alternate) === "object" && typeof alternate.length !== "undefined")) { + throw new Error('typeof alternate === "object" && typeof alternate.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "IfInstruction", + id: "if", + testLabel: testLabel, + test: test, + result: result, + consequent: consequent, + alternate: alternate + }; + return node; +} + +function stringLiteral(value) { + if (!(typeof value === "string")) { + throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); + } + + var node = { + type: "StringLiteral", + value: value + }; + return node; +} + +function numberLiteral(value, raw) { + if (!(typeof value === "number")) { + throw new Error('typeof value === "number"' + " error: " + ("Argument value must be of type number, given: " + _typeof(value) || 0)); + } + + if (!(typeof raw === "string")) { + throw new Error('typeof raw === "string"' + " error: " + ("Argument raw must be of type string, given: " + _typeof(raw) || 0)); + } + + var node = { + type: "NumberLiteral", + value: value, + raw: raw + }; + return node; +} + +function longNumberLiteral(value, raw) { + if (!(typeof raw === "string")) { + throw new Error('typeof raw === "string"' + " error: " + ("Argument raw must be of type string, given: " + _typeof(raw) || 0)); + } + + var node = { + type: "LongNumberLiteral", + value: value, + raw: raw + }; + return node; +} + +function floatLiteral(value, nan, inf, raw) { + if (!(typeof value === "number")) { + throw new Error('typeof value === "number"' + " error: " + ("Argument value must be of type number, given: " + _typeof(value) || 0)); + } + + if (nan !== null && nan !== undefined) { + if (!(typeof nan === "boolean")) { + throw new Error('typeof nan === "boolean"' + " error: " + ("Argument nan must be of type boolean, given: " + _typeof(nan) || 0)); + } + } + + if (inf !== null && inf !== undefined) { + if (!(typeof inf === "boolean")) { + throw new Error('typeof inf === "boolean"' + " error: " + ("Argument inf must be of type boolean, given: " + _typeof(inf) || 0)); + } + } + + if (!(typeof raw === "string")) { + throw new Error('typeof raw === "string"' + " error: " + ("Argument raw must be of type string, given: " + _typeof(raw) || 0)); + } + + var node = { + type: "FloatLiteral", + value: value, + raw: raw + }; + + if (nan === true) { + node.nan = true; + } + + if (inf === true) { + node.inf = true; + } + + return node; +} + +function elem(table, offset, funcs) { + if (!(_typeof(offset) === "object" && typeof offset.length !== "undefined")) { + throw new Error('typeof offset === "object" && typeof offset.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + if (!(_typeof(funcs) === "object" && typeof funcs.length !== "undefined")) { + throw new Error('typeof funcs === "object" && typeof funcs.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "Elem", + table: table, + offset: offset, + funcs: funcs + }; + return node; +} + +function indexInFuncSection(index) { + var node = { + type: "IndexInFuncSection", + index: index + }; + return node; +} + +function valtypeLiteral(name) { + var node = { + type: "ValtypeLiteral", + name: name + }; + return node; +} + +function typeInstruction(id, functype) { + var node = { + type: "TypeInstruction", + id: id, + functype: functype + }; + return node; +} + +function start(index) { + var node = { + type: "Start", + index: index + }; + return node; +} + +function globalType(valtype, mutability) { + var node = { + type: "GlobalType", + valtype: valtype, + mutability: mutability + }; + return node; +} + +function leadingComment(value) { + if (!(typeof value === "string")) { + throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); + } + + var node = { + type: "LeadingComment", + value: value + }; + return node; +} + +function blockComment(value) { + if (!(typeof value === "string")) { + throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); + } + + var node = { + type: "BlockComment", + value: value + }; + return node; +} + +function data(memoryIndex, offset, init) { + var node = { + type: "Data", + memoryIndex: memoryIndex, + offset: offset, + init: init + }; + return node; +} + +function global(globalType, init, name) { + if (!(_typeof(init) === "object" && typeof init.length !== "undefined")) { + throw new Error('typeof init === "object" && typeof init.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "Global", + globalType: globalType, + init: init, + name: name + }; + return node; +} + +function table(elementType, limits, name, elements) { + if (!(limits.type === "Limit")) { + throw new Error('limits.type === "Limit"' + " error: " + ("Argument limits must be of type Limit, given: " + limits.type || 0)); + } + + if (elements !== null && elements !== undefined) { + if (!(_typeof(elements) === "object" && typeof elements.length !== "undefined")) { + throw new Error('typeof elements === "object" && typeof elements.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + } + + var node = { + type: "Table", + elementType: elementType, + limits: limits, + name: name + }; + + if (typeof elements !== "undefined" && elements.length > 0) { + node.elements = elements; + } + + return node; +} + +function memory(limits, id) { + var node = { + type: "Memory", + limits: limits, + id: id + }; + return node; +} + +function funcImportDescr(id, signature) { + var node = { + type: "FuncImportDescr", + id: id, + signature: signature + }; + return node; +} + +function moduleImport(module, name, descr) { + if (!(typeof module === "string")) { + throw new Error('typeof module === "string"' + " error: " + ("Argument module must be of type string, given: " + _typeof(module) || 0)); + } + + if (!(typeof name === "string")) { + throw new Error('typeof name === "string"' + " error: " + ("Argument name must be of type string, given: " + _typeof(name) || 0)); + } + + var node = { + type: "ModuleImport", + module: module, + name: name, + descr: descr + }; + return node; +} + +function moduleExportDescr(exportType, id) { + var node = { + type: "ModuleExportDescr", + exportType: exportType, + id: id + }; + return node; +} + +function moduleExport(name, descr) { + if (!(typeof name === "string")) { + throw new Error('typeof name === "string"' + " error: " + ("Argument name must be of type string, given: " + _typeof(name) || 0)); + } + + var node = { + type: "ModuleExport", + name: name, + descr: descr + }; + return node; +} + +function limit(min, max) { + if (!(typeof min === "number")) { + throw new Error('typeof min === "number"' + " error: " + ("Argument min must be of type number, given: " + _typeof(min) || 0)); + } + + if (max !== null && max !== undefined) { + if (!(typeof max === "number")) { + throw new Error('typeof max === "number"' + " error: " + ("Argument max must be of type number, given: " + _typeof(max) || 0)); + } + } + + var node = { + type: "Limit", + min: min + }; + + if (typeof max !== "undefined") { + node.max = max; + } + + return node; +} + +function signature(params, results) { + if (!(_typeof(params) === "object" && typeof params.length !== "undefined")) { + throw new Error('typeof params === "object" && typeof params.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + if (!(_typeof(results) === "object" && typeof results.length !== "undefined")) { + throw new Error('typeof results === "object" && typeof results.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "Signature", + params: params, + results: results + }; + return node; +} + +function program(body) { + if (!(_typeof(body) === "object" && typeof body.length !== "undefined")) { + throw new Error('typeof body === "object" && typeof body.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "Program", + body: body + }; + return node; +} + +function identifier(value, raw) { + if (!(typeof value === "string")) { + throw new Error('typeof value === "string"' + " error: " + ("Argument value must be of type string, given: " + _typeof(value) || 0)); + } + + if (raw !== null && raw !== undefined) { + if (!(typeof raw === "string")) { + throw new Error('typeof raw === "string"' + " error: " + ("Argument raw must be of type string, given: " + _typeof(raw) || 0)); + } + } + + var node = { + type: "Identifier", + value: value + }; + + if (typeof raw !== "undefined") { + node.raw = raw; + } + + return node; +} + +function blockInstruction(label, instr, result) { + if (!(_typeof(instr) === "object" && typeof instr.length !== "undefined")) { + throw new Error('typeof instr === "object" && typeof instr.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "BlockInstruction", + id: "block", + label: label, + instr: instr, + result: result + }; + return node; +} + +function callInstruction(index, instrArgs, numeric) { + if (instrArgs !== null && instrArgs !== undefined) { + if (!(_typeof(instrArgs) === "object" && typeof instrArgs.length !== "undefined")) { + throw new Error('typeof instrArgs === "object" && typeof instrArgs.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + } + + var node = { + type: "CallInstruction", + id: "call", + index: index + }; + + if (typeof instrArgs !== "undefined" && instrArgs.length > 0) { + node.instrArgs = instrArgs; + } + + if (typeof numeric !== "undefined") { + node.numeric = numeric; + } + + return node; +} + +function callIndirectInstruction(signature, intrs) { + if (intrs !== null && intrs !== undefined) { + if (!(_typeof(intrs) === "object" && typeof intrs.length !== "undefined")) { + throw new Error('typeof intrs === "object" && typeof intrs.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + } + + var node = { + type: "CallIndirectInstruction", + id: "call_indirect", + signature: signature + }; + + if (typeof intrs !== "undefined" && intrs.length > 0) { + node.intrs = intrs; + } + + return node; +} + +function byteArray(values) { + if (!(_typeof(values) === "object" && typeof values.length !== "undefined")) { + throw new Error('typeof values === "object" && typeof values.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + var node = { + type: "ByteArray", + values: values + }; + return node; +} + +function func(name, signature, body, isExternal, metadata) { + if (!(_typeof(body) === "object" && typeof body.length !== "undefined")) { + throw new Error('typeof body === "object" && typeof body.length !== "undefined"' + " error: " + (undefined || "unknown")); + } + + if (isExternal !== null && isExternal !== undefined) { + if (!(typeof isExternal === "boolean")) { + throw new Error('typeof isExternal === "boolean"' + " error: " + ("Argument isExternal must be of type boolean, given: " + _typeof(isExternal) || 0)); + } + } + + var node = { + type: "Func", + name: name, + signature: signature, + body: body + }; + + if (isExternal === true) { + node.isExternal = true; + } + + if (typeof metadata !== "undefined") { + node.metadata = metadata; + } + + return node; +} + +function internalBrUnless(target) { + if (!(typeof target === "number")) { + throw new Error('typeof target === "number"' + " error: " + ("Argument target must be of type number, given: " + _typeof(target) || 0)); + } + + var node = { + type: "InternalBrUnless", + target: target + }; + return node; +} + +function internalGoto(target) { + if (!(typeof target === "number")) { + throw new Error('typeof target === "number"' + " error: " + ("Argument target must be of type number, given: " + _typeof(target) || 0)); + } + + var node = { + type: "InternalGoto", + target: target + }; + return node; +} + +function internalCallExtern(target) { + if (!(typeof target === "number")) { + throw new Error('typeof target === "number"' + " error: " + ("Argument target must be of type number, given: " + _typeof(target) || 0)); + } + + var node = { + type: "InternalCallExtern", + target: target + }; + return node; +} + +function internalEndAndReturn() { + var node = { + type: "InternalEndAndReturn" + }; + return node; +} + +var isModule = isTypeOf("Module"); +exports.isModule = isModule; +var isModuleMetadata = isTypeOf("ModuleMetadata"); +exports.isModuleMetadata = isModuleMetadata; +var isModuleNameMetadata = isTypeOf("ModuleNameMetadata"); +exports.isModuleNameMetadata = isModuleNameMetadata; +var isFunctionNameMetadata = isTypeOf("FunctionNameMetadata"); +exports.isFunctionNameMetadata = isFunctionNameMetadata; +var isLocalNameMetadata = isTypeOf("LocalNameMetadata"); +exports.isLocalNameMetadata = isLocalNameMetadata; +var isBinaryModule = isTypeOf("BinaryModule"); +exports.isBinaryModule = isBinaryModule; +var isQuoteModule = isTypeOf("QuoteModule"); +exports.isQuoteModule = isQuoteModule; +var isSectionMetadata = isTypeOf("SectionMetadata"); +exports.isSectionMetadata = isSectionMetadata; +var isProducersSectionMetadata = isTypeOf("ProducersSectionMetadata"); +exports.isProducersSectionMetadata = isProducersSectionMetadata; +var isProducerMetadata = isTypeOf("ProducerMetadata"); +exports.isProducerMetadata = isProducerMetadata; +var isProducerMetadataVersionedName = isTypeOf("ProducerMetadataVersionedName"); +exports.isProducerMetadataVersionedName = isProducerMetadataVersionedName; +var isLoopInstruction = isTypeOf("LoopInstruction"); +exports.isLoopInstruction = isLoopInstruction; +var isInstr = isTypeOf("Instr"); +exports.isInstr = isInstr; +var isIfInstruction = isTypeOf("IfInstruction"); +exports.isIfInstruction = isIfInstruction; +var isStringLiteral = isTypeOf("StringLiteral"); +exports.isStringLiteral = isStringLiteral; +var isNumberLiteral = isTypeOf("NumberLiteral"); +exports.isNumberLiteral = isNumberLiteral; +var isLongNumberLiteral = isTypeOf("LongNumberLiteral"); +exports.isLongNumberLiteral = isLongNumberLiteral; +var isFloatLiteral = isTypeOf("FloatLiteral"); +exports.isFloatLiteral = isFloatLiteral; +var isElem = isTypeOf("Elem"); +exports.isElem = isElem; +var isIndexInFuncSection = isTypeOf("IndexInFuncSection"); +exports.isIndexInFuncSection = isIndexInFuncSection; +var isValtypeLiteral = isTypeOf("ValtypeLiteral"); +exports.isValtypeLiteral = isValtypeLiteral; +var isTypeInstruction = isTypeOf("TypeInstruction"); +exports.isTypeInstruction = isTypeInstruction; +var isStart = isTypeOf("Start"); +exports.isStart = isStart; +var isGlobalType = isTypeOf("GlobalType"); +exports.isGlobalType = isGlobalType; +var isLeadingComment = isTypeOf("LeadingComment"); +exports.isLeadingComment = isLeadingComment; +var isBlockComment = isTypeOf("BlockComment"); +exports.isBlockComment = isBlockComment; +var isData = isTypeOf("Data"); +exports.isData = isData; +var isGlobal = isTypeOf("Global"); +exports.isGlobal = isGlobal; +var isTable = isTypeOf("Table"); +exports.isTable = isTable; +var isMemory = isTypeOf("Memory"); +exports.isMemory = isMemory; +var isFuncImportDescr = isTypeOf("FuncImportDescr"); +exports.isFuncImportDescr = isFuncImportDescr; +var isModuleImport = isTypeOf("ModuleImport"); +exports.isModuleImport = isModuleImport; +var isModuleExportDescr = isTypeOf("ModuleExportDescr"); +exports.isModuleExportDescr = isModuleExportDescr; +var isModuleExport = isTypeOf("ModuleExport"); +exports.isModuleExport = isModuleExport; +var isLimit = isTypeOf("Limit"); +exports.isLimit = isLimit; +var isSignature = isTypeOf("Signature"); +exports.isSignature = isSignature; +var isProgram = isTypeOf("Program"); +exports.isProgram = isProgram; +var isIdentifier = isTypeOf("Identifier"); +exports.isIdentifier = isIdentifier; +var isBlockInstruction = isTypeOf("BlockInstruction"); +exports.isBlockInstruction = isBlockInstruction; +var isCallInstruction = isTypeOf("CallInstruction"); +exports.isCallInstruction = isCallInstruction; +var isCallIndirectInstruction = isTypeOf("CallIndirectInstruction"); +exports.isCallIndirectInstruction = isCallIndirectInstruction; +var isByteArray = isTypeOf("ByteArray"); +exports.isByteArray = isByteArray; +var isFunc = isTypeOf("Func"); +exports.isFunc = isFunc; +var isInternalBrUnless = isTypeOf("InternalBrUnless"); +exports.isInternalBrUnless = isInternalBrUnless; +var isInternalGoto = isTypeOf("InternalGoto"); +exports.isInternalGoto = isInternalGoto; +var isInternalCallExtern = isTypeOf("InternalCallExtern"); +exports.isInternalCallExtern = isInternalCallExtern; +var isInternalEndAndReturn = isTypeOf("InternalEndAndReturn"); +exports.isInternalEndAndReturn = isInternalEndAndReturn; + +var isNode = function isNode(node) { + return isModule(node) || isModuleMetadata(node) || isModuleNameMetadata(node) || isFunctionNameMetadata(node) || isLocalNameMetadata(node) || isBinaryModule(node) || isQuoteModule(node) || isSectionMetadata(node) || isProducersSectionMetadata(node) || isProducerMetadata(node) || isProducerMetadataVersionedName(node) || isLoopInstruction(node) || isInstr(node) || isIfInstruction(node) || isStringLiteral(node) || isNumberLiteral(node) || isLongNumberLiteral(node) || isFloatLiteral(node) || isElem(node) || isIndexInFuncSection(node) || isValtypeLiteral(node) || isTypeInstruction(node) || isStart(node) || isGlobalType(node) || isLeadingComment(node) || isBlockComment(node) || isData(node) || isGlobal(node) || isTable(node) || isMemory(node) || isFuncImportDescr(node) || isModuleImport(node) || isModuleExportDescr(node) || isModuleExport(node) || isLimit(node) || isSignature(node) || isProgram(node) || isIdentifier(node) || isBlockInstruction(node) || isCallInstruction(node) || isCallIndirectInstruction(node) || isByteArray(node) || isFunc(node) || isInternalBrUnless(node) || isInternalGoto(node) || isInternalCallExtern(node) || isInternalEndAndReturn(node); +}; + +exports.isNode = isNode; + +var isBlock = function isBlock(node) { + return isLoopInstruction(node) || isBlockInstruction(node) || isFunc(node); +}; + +exports.isBlock = isBlock; + +var isInstruction = function isInstruction(node) { + return isLoopInstruction(node) || isInstr(node) || isIfInstruction(node) || isTypeInstruction(node) || isBlockInstruction(node) || isCallInstruction(node) || isCallIndirectInstruction(node); +}; + +exports.isInstruction = isInstruction; + +var isExpression = function isExpression(node) { + return isInstr(node) || isStringLiteral(node) || isNumberLiteral(node) || isLongNumberLiteral(node) || isFloatLiteral(node) || isValtypeLiteral(node) || isIdentifier(node); +}; + +exports.isExpression = isExpression; + +var isNumericLiteral = function isNumericLiteral(node) { + return isNumberLiteral(node) || isLongNumberLiteral(node) || isFloatLiteral(node); +}; + +exports.isNumericLiteral = isNumericLiteral; + +var isImportDescr = function isImportDescr(node) { + return isGlobalType(node) || isTable(node) || isMemory(node) || isFuncImportDescr(node); +}; + +exports.isImportDescr = isImportDescr; + +var isIntrinsic = function isIntrinsic(node) { + return isInternalBrUnless(node) || isInternalGoto(node) || isInternalCallExtern(node) || isInternalEndAndReturn(node); +}; + +exports.isIntrinsic = isIntrinsic; +var assertModule = assertTypeOf("Module"); +exports.assertModule = assertModule; +var assertModuleMetadata = assertTypeOf("ModuleMetadata"); +exports.assertModuleMetadata = assertModuleMetadata; +var assertModuleNameMetadata = assertTypeOf("ModuleNameMetadata"); +exports.assertModuleNameMetadata = assertModuleNameMetadata; +var assertFunctionNameMetadata = assertTypeOf("FunctionNameMetadata"); +exports.assertFunctionNameMetadata = assertFunctionNameMetadata; +var assertLocalNameMetadata = assertTypeOf("LocalNameMetadata"); +exports.assertLocalNameMetadata = assertLocalNameMetadata; +var assertBinaryModule = assertTypeOf("BinaryModule"); +exports.assertBinaryModule = assertBinaryModule; +var assertQuoteModule = assertTypeOf("QuoteModule"); +exports.assertQuoteModule = assertQuoteModule; +var assertSectionMetadata = assertTypeOf("SectionMetadata"); +exports.assertSectionMetadata = assertSectionMetadata; +var assertProducersSectionMetadata = assertTypeOf("ProducersSectionMetadata"); +exports.assertProducersSectionMetadata = assertProducersSectionMetadata; +var assertProducerMetadata = assertTypeOf("ProducerMetadata"); +exports.assertProducerMetadata = assertProducerMetadata; +var assertProducerMetadataVersionedName = assertTypeOf("ProducerMetadataVersionedName"); +exports.assertProducerMetadataVersionedName = assertProducerMetadataVersionedName; +var assertLoopInstruction = assertTypeOf("LoopInstruction"); +exports.assertLoopInstruction = assertLoopInstruction; +var assertInstr = assertTypeOf("Instr"); +exports.assertInstr = assertInstr; +var assertIfInstruction = assertTypeOf("IfInstruction"); +exports.assertIfInstruction = assertIfInstruction; +var assertStringLiteral = assertTypeOf("StringLiteral"); +exports.assertStringLiteral = assertStringLiteral; +var assertNumberLiteral = assertTypeOf("NumberLiteral"); +exports.assertNumberLiteral = assertNumberLiteral; +var assertLongNumberLiteral = assertTypeOf("LongNumberLiteral"); +exports.assertLongNumberLiteral = assertLongNumberLiteral; +var assertFloatLiteral = assertTypeOf("FloatLiteral"); +exports.assertFloatLiteral = assertFloatLiteral; +var assertElem = assertTypeOf("Elem"); +exports.assertElem = assertElem; +var assertIndexInFuncSection = assertTypeOf("IndexInFuncSection"); +exports.assertIndexInFuncSection = assertIndexInFuncSection; +var assertValtypeLiteral = assertTypeOf("ValtypeLiteral"); +exports.assertValtypeLiteral = assertValtypeLiteral; +var assertTypeInstruction = assertTypeOf("TypeInstruction"); +exports.assertTypeInstruction = assertTypeInstruction; +var assertStart = assertTypeOf("Start"); +exports.assertStart = assertStart; +var assertGlobalType = assertTypeOf("GlobalType"); +exports.assertGlobalType = assertGlobalType; +var assertLeadingComment = assertTypeOf("LeadingComment"); +exports.assertLeadingComment = assertLeadingComment; +var assertBlockComment = assertTypeOf("BlockComment"); +exports.assertBlockComment = assertBlockComment; +var assertData = assertTypeOf("Data"); +exports.assertData = assertData; +var assertGlobal = assertTypeOf("Global"); +exports.assertGlobal = assertGlobal; +var assertTable = assertTypeOf("Table"); +exports.assertTable = assertTable; +var assertMemory = assertTypeOf("Memory"); +exports.assertMemory = assertMemory; +var assertFuncImportDescr = assertTypeOf("FuncImportDescr"); +exports.assertFuncImportDescr = assertFuncImportDescr; +var assertModuleImport = assertTypeOf("ModuleImport"); +exports.assertModuleImport = assertModuleImport; +var assertModuleExportDescr = assertTypeOf("ModuleExportDescr"); +exports.assertModuleExportDescr = assertModuleExportDescr; +var assertModuleExport = assertTypeOf("ModuleExport"); +exports.assertModuleExport = assertModuleExport; +var assertLimit = assertTypeOf("Limit"); +exports.assertLimit = assertLimit; +var assertSignature = assertTypeOf("Signature"); +exports.assertSignature = assertSignature; +var assertProgram = assertTypeOf("Program"); +exports.assertProgram = assertProgram; +var assertIdentifier = assertTypeOf("Identifier"); +exports.assertIdentifier = assertIdentifier; +var assertBlockInstruction = assertTypeOf("BlockInstruction"); +exports.assertBlockInstruction = assertBlockInstruction; +var assertCallInstruction = assertTypeOf("CallInstruction"); +exports.assertCallInstruction = assertCallInstruction; +var assertCallIndirectInstruction = assertTypeOf("CallIndirectInstruction"); +exports.assertCallIndirectInstruction = assertCallIndirectInstruction; +var assertByteArray = assertTypeOf("ByteArray"); +exports.assertByteArray = assertByteArray; +var assertFunc = assertTypeOf("Func"); +exports.assertFunc = assertFunc; +var assertInternalBrUnless = assertTypeOf("InternalBrUnless"); +exports.assertInternalBrUnless = assertInternalBrUnless; +var assertInternalGoto = assertTypeOf("InternalGoto"); +exports.assertInternalGoto = assertInternalGoto; +var assertInternalCallExtern = assertTypeOf("InternalCallExtern"); +exports.assertInternalCallExtern = assertInternalCallExtern; +var assertInternalEndAndReturn = assertTypeOf("InternalEndAndReturn"); +exports.assertInternalEndAndReturn = assertInternalEndAndReturn; +var unionTypesMap = { + Module: ["Node"], + ModuleMetadata: ["Node"], + ModuleNameMetadata: ["Node"], + FunctionNameMetadata: ["Node"], + LocalNameMetadata: ["Node"], + BinaryModule: ["Node"], + QuoteModule: ["Node"], + SectionMetadata: ["Node"], + ProducersSectionMetadata: ["Node"], + ProducerMetadata: ["Node"], + ProducerMetadataVersionedName: ["Node"], + LoopInstruction: ["Node", "Block", "Instruction"], + Instr: ["Node", "Expression", "Instruction"], + IfInstruction: ["Node", "Instruction"], + StringLiteral: ["Node", "Expression"], + NumberLiteral: ["Node", "NumericLiteral", "Expression"], + LongNumberLiteral: ["Node", "NumericLiteral", "Expression"], + FloatLiteral: ["Node", "NumericLiteral", "Expression"], + Elem: ["Node"], + IndexInFuncSection: ["Node"], + ValtypeLiteral: ["Node", "Expression"], + TypeInstruction: ["Node", "Instruction"], + Start: ["Node"], + GlobalType: ["Node", "ImportDescr"], + LeadingComment: ["Node"], + BlockComment: ["Node"], + Data: ["Node"], + Global: ["Node"], + Table: ["Node", "ImportDescr"], + Memory: ["Node", "ImportDescr"], + FuncImportDescr: ["Node", "ImportDescr"], + ModuleImport: ["Node"], + ModuleExportDescr: ["Node"], + ModuleExport: ["Node"], + Limit: ["Node"], + Signature: ["Node"], + Program: ["Node"], + Identifier: ["Node", "Expression"], + BlockInstruction: ["Node", "Block", "Instruction"], + CallInstruction: ["Node", "Instruction"], + CallIndirectInstruction: ["Node", "Instruction"], + ByteArray: ["Node"], + Func: ["Node", "Block"], + InternalBrUnless: ["Node", "Intrinsic"], + InternalGoto: ["Node", "Intrinsic"], + InternalCallExtern: ["Node", "Intrinsic"], + InternalEndAndReturn: ["Node", "Intrinsic"] +}; +exports.unionTypesMap = unionTypesMap; +var nodeAndUnionTypes = ["Module", "ModuleMetadata", "ModuleNameMetadata", "FunctionNameMetadata", "LocalNameMetadata", "BinaryModule", "QuoteModule", "SectionMetadata", "ProducersSectionMetadata", "ProducerMetadata", "ProducerMetadataVersionedName", "LoopInstruction", "Instr", "IfInstruction", "StringLiteral", "NumberLiteral", "LongNumberLiteral", "FloatLiteral", "Elem", "IndexInFuncSection", "ValtypeLiteral", "TypeInstruction", "Start", "GlobalType", "LeadingComment", "BlockComment", "Data", "Global", "Table", "Memory", "FuncImportDescr", "ModuleImport", "ModuleExportDescr", "ModuleExport", "Limit", "Signature", "Program", "Identifier", "BlockInstruction", "CallInstruction", "CallIndirectInstruction", "ByteArray", "Func", "InternalBrUnless", "InternalGoto", "InternalCallExtern", "InternalEndAndReturn", "Node", "Block", "Instruction", "Expression", "NumericLiteral", "ImportDescr", "Intrinsic"]; +exports.nodeAndUnionTypes = nodeAndUnionTypes; + +/***/ }), + +/***/ 14004: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.signatures = void 0; + +function sign(input, output) { + return [input, output]; +} + +var u32 = "u32"; +var i32 = "i32"; +var i64 = "i64"; +var f32 = "f32"; +var f64 = "f64"; + +var vector = function vector(t) { + var vecType = [t]; // $FlowIgnore + + vecType.vector = true; + return vecType; +}; + +var controlInstructions = { + unreachable: sign([], []), + nop: sign([], []), + // block ? + // loop ? + // if ? + // if else ? + br: sign([u32], []), + br_if: sign([u32], []), + br_table: sign(vector(u32), []), + return: sign([], []), + call: sign([u32], []), + call_indirect: sign([u32], []) +}; +var parametricInstructions = { + drop: sign([], []), + select: sign([], []) +}; +var variableInstructions = { + get_local: sign([u32], []), + set_local: sign([u32], []), + tee_local: sign([u32], []), + get_global: sign([u32], []), + set_global: sign([u32], []) +}; +var memoryInstructions = { + "i32.load": sign([u32, u32], [i32]), + "i64.load": sign([u32, u32], []), + "f32.load": sign([u32, u32], []), + "f64.load": sign([u32, u32], []), + "i32.load8_s": sign([u32, u32], [i32]), + "i32.load8_u": sign([u32, u32], [i32]), + "i32.load16_s": sign([u32, u32], [i32]), + "i32.load16_u": sign([u32, u32], [i32]), + "i64.load8_s": sign([u32, u32], [i64]), + "i64.load8_u": sign([u32, u32], [i64]), + "i64.load16_s": sign([u32, u32], [i64]), + "i64.load16_u": sign([u32, u32], [i64]), + "i64.load32_s": sign([u32, u32], [i64]), + "i64.load32_u": sign([u32, u32], [i64]), + "i32.store": sign([u32, u32], []), + "i64.store": sign([u32, u32], []), + "f32.store": sign([u32, u32], []), + "f64.store": sign([u32, u32], []), + "i32.store8": sign([u32, u32], []), + "i32.store16": sign([u32, u32], []), + "i64.store8": sign([u32, u32], []), + "i64.store16": sign([u32, u32], []), + "i64.store32": sign([u32, u32], []), + current_memory: sign([], []), + grow_memory: sign([], []) +}; +var numericInstructions = { + "i32.const": sign([i32], [i32]), + "i64.const": sign([i64], [i64]), + "f32.const": sign([f32], [f32]), + "f64.const": sign([f64], [f64]), + "i32.eqz": sign([i32], [i32]), + "i32.eq": sign([i32, i32], [i32]), + "i32.ne": sign([i32, i32], [i32]), + "i32.lt_s": sign([i32, i32], [i32]), + "i32.lt_u": sign([i32, i32], [i32]), + "i32.gt_s": sign([i32, i32], [i32]), + "i32.gt_u": sign([i32, i32], [i32]), + "i32.le_s": sign([i32, i32], [i32]), + "i32.le_u": sign([i32, i32], [i32]), + "i32.ge_s": sign([i32, i32], [i32]), + "i32.ge_u": sign([i32, i32], [i32]), + "i64.eqz": sign([i64], [i64]), + "i64.eq": sign([i64, i64], [i32]), + "i64.ne": sign([i64, i64], [i32]), + "i64.lt_s": sign([i64, i64], [i32]), + "i64.lt_u": sign([i64, i64], [i32]), + "i64.gt_s": sign([i64, i64], [i32]), + "i64.gt_u": sign([i64, i64], [i32]), + "i64.le_s": sign([i64, i64], [i32]), + "i64.le_u": sign([i64, i64], [i32]), + "i64.ge_s": sign([i64, i64], [i32]), + "i64.ge_u": sign([i64, i64], [i32]), + "f32.eq": sign([f32, f32], [i32]), + "f32.ne": sign([f32, f32], [i32]), + "f32.lt": sign([f32, f32], [i32]), + "f32.gt": sign([f32, f32], [i32]), + "f32.le": sign([f32, f32], [i32]), + "f32.ge": sign([f32, f32], [i32]), + "f64.eq": sign([f64, f64], [i32]), + "f64.ne": sign([f64, f64], [i32]), + "f64.lt": sign([f64, f64], [i32]), + "f64.gt": sign([f64, f64], [i32]), + "f64.le": sign([f64, f64], [i32]), + "f64.ge": sign([f64, f64], [i32]), + "i32.clz": sign([i32], [i32]), + "i32.ctz": sign([i32], [i32]), + "i32.popcnt": sign([i32], [i32]), + "i32.add": sign([i32, i32], [i32]), + "i32.sub": sign([i32, i32], [i32]), + "i32.mul": sign([i32, i32], [i32]), + "i32.div_s": sign([i32, i32], [i32]), + "i32.div_u": sign([i32, i32], [i32]), + "i32.rem_s": sign([i32, i32], [i32]), + "i32.rem_u": sign([i32, i32], [i32]), + "i32.and": sign([i32, i32], [i32]), + "i32.or": sign([i32, i32], [i32]), + "i32.xor": sign([i32, i32], [i32]), + "i32.shl": sign([i32, i32], [i32]), + "i32.shr_s": sign([i32, i32], [i32]), + "i32.shr_u": sign([i32, i32], [i32]), + "i32.rotl": sign([i32, i32], [i32]), + "i32.rotr": sign([i32, i32], [i32]), + "i64.clz": sign([i64], [i64]), + "i64.ctz": sign([i64], [i64]), + "i64.popcnt": sign([i64], [i64]), + "i64.add": sign([i64, i64], [i64]), + "i64.sub": sign([i64, i64], [i64]), + "i64.mul": sign([i64, i64], [i64]), + "i64.div_s": sign([i64, i64], [i64]), + "i64.div_u": sign([i64, i64], [i64]), + "i64.rem_s": sign([i64, i64], [i64]), + "i64.rem_u": sign([i64, i64], [i64]), + "i64.and": sign([i64, i64], [i64]), + "i64.or": sign([i64, i64], [i64]), + "i64.xor": sign([i64, i64], [i64]), + "i64.shl": sign([i64, i64], [i64]), + "i64.shr_s": sign([i64, i64], [i64]), + "i64.shr_u": sign([i64, i64], [i64]), + "i64.rotl": sign([i64, i64], [i64]), + "i64.rotr": sign([i64, i64], [i64]), + "f32.abs": sign([f32], [f32]), + "f32.neg": sign([f32], [f32]), + "f32.ceil": sign([f32], [f32]), + "f32.floor": sign([f32], [f32]), + "f32.trunc": sign([f32], [f32]), + "f32.nearest": sign([f32], [f32]), + "f32.sqrt": sign([f32], [f32]), + "f32.add": sign([f32, f32], [f32]), + "f32.sub": sign([f32, f32], [f32]), + "f32.mul": sign([f32, f32], [f32]), + "f32.div": sign([f32, f32], [f32]), + "f32.min": sign([f32, f32], [f32]), + "f32.max": sign([f32, f32], [f32]), + "f32.copysign": sign([f32, f32], [f32]), + "f64.abs": sign([f64], [f64]), + "f64.neg": sign([f64], [f64]), + "f64.ceil": sign([f64], [f64]), + "f64.floor": sign([f64], [f64]), + "f64.trunc": sign([f64], [f64]), + "f64.nearest": sign([f64], [f64]), + "f64.sqrt": sign([f64], [f64]), + "f64.add": sign([f64, f64], [f64]), + "f64.sub": sign([f64, f64], [f64]), + "f64.mul": sign([f64, f64], [f64]), + "f64.div": sign([f64, f64], [f64]), + "f64.min": sign([f64, f64], [f64]), + "f64.max": sign([f64, f64], [f64]), + "f64.copysign": sign([f64, f64], [f64]), + "i32.wrap/i64": sign([i64], [i32]), + "i32.trunc_s/f32": sign([f32], [i32]), + "i32.trunc_u/f32": sign([f32], [i32]), + "i32.trunc_s/f64": sign([f32], [i32]), + "i32.trunc_u/f64": sign([f64], [i32]), + "i64.extend_s/i32": sign([i32], [i64]), + "i64.extend_u/i32": sign([i32], [i64]), + "i64.trunc_s/f32": sign([f32], [i64]), + "i64.trunc_u/f32": sign([f32], [i64]), + "i64.trunc_s/f64": sign([f64], [i64]), + "i64.trunc_u/f64": sign([f64], [i64]), + "f32.convert_s/i32": sign([i32], [f32]), + "f32.convert_u/i32": sign([i32], [f32]), + "f32.convert_s/i64": sign([i64], [f32]), + "f32.convert_u/i64": sign([i64], [f32]), + "f32.demote/f64": sign([f64], [f32]), + "f64.convert_s/i32": sign([i32], [f64]), + "f64.convert_u/i32": sign([i32], [f64]), + "f64.convert_s/i64": sign([i64], [f64]), + "f64.convert_u/i64": sign([i64], [f64]), + "f64.promote/f32": sign([f32], [f64]), + "i32.reinterpret/f32": sign([f32], [i32]), + "i64.reinterpret/f64": sign([f64], [i64]), + "f32.reinterpret/i32": sign([i32], [f32]), + "f64.reinterpret/i64": sign([i64], [f64]) +}; +var signatures = Object.assign({}, controlInstructions, parametricInstructions, variableInstructions, memoryInstructions, numericInstructions); +exports.signatures = signatures; + +/***/ }), + +/***/ 34390: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.traverse = traverse; + +var _nodePath = __webpack_require__(27110); + +var _nodes = __webpack_require__(36588); + +// recursively walks the AST starting at the given node. The callback is invoked for +// and object that has a 'type' property. +function walk(context, callback) { + var stop = false; + + function innerWalk(context, callback) { + if (stop) { + return; + } + + var node = context.node; + + if (node === undefined) { + console.warn("traversing with an empty context"); + return; + } + + if (node._deleted === true) { + return; + } + + var path = (0, _nodePath.createPath)(context); + callback(node.type, path); + + if (path.shouldStop) { + stop = true; + return; + } + + Object.keys(node).forEach(function (prop) { + var value = node[prop]; + + if (value === null || value === undefined) { + return; + } + + var valueAsArray = Array.isArray(value) ? value : [value]; + valueAsArray.forEach(function (childNode) { + if (typeof childNode.type === "string") { + var childContext = { + node: childNode, + parentKey: prop, + parentPath: path, + shouldStop: false, + inList: Array.isArray(value) + }; + innerWalk(childContext, callback); + } + }); + }); + } + + innerWalk(context, callback); +} + +var noop = function noop() {}; + +function traverse(node, visitors) { + var before = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop; + var after = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop; + Object.keys(visitors).forEach(function (visitor) { + if (!_nodes.nodeAndUnionTypes.includes(visitor)) { + throw new Error("Unexpected visitor ".concat(visitor)); + } + }); + var context = { + node: node, + inList: false, + shouldStop: false, + parentPath: null, + parentKey: null + }; + walk(context, function (type, path) { + if (typeof visitors[type] === "function") { + before(type, path); + visitors[type](path); + after(type, path); + } + + var unionTypes = _nodes.unionTypesMap[type]; + + if (!unionTypes) { + throw new Error("Unexpected node type ".concat(type)); + } + + unionTypes.forEach(function (unionType) { + if (typeof visitors[unionType] === "function") { + before(unionType, path); + visitors[unionType](path); + after(unionType, path); + } + }); + }); +} + +/***/ }), + +/***/ 26038: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isAnonymous = isAnonymous; +exports.getSectionMetadata = getSectionMetadata; +exports.getSectionMetadatas = getSectionMetadatas; +exports.sortSectionMetadata = sortSectionMetadata; +exports.orderedInsertNode = orderedInsertNode; +exports.assertHasLoc = assertHasLoc; +exports.getEndOfSection = getEndOfSection; +exports.shiftLoc = shiftLoc; +exports.shiftSection = shiftSection; +exports.signatureForOpcode = signatureForOpcode; +exports.getUniqueNameGenerator = getUniqueNameGenerator; +exports.getStartByteOffset = getStartByteOffset; +exports.getEndByteOffset = getEndByteOffset; +exports.getFunctionBeginingByteOffset = getFunctionBeginingByteOffset; +exports.getEndBlockByteOffset = getEndBlockByteOffset; +exports.getStartBlockByteOffset = getStartBlockByteOffset; + +var _signatures = __webpack_require__(14004); + +var _traverse = __webpack_require__(34390); + +var _helperWasmBytecode = _interopRequireWildcard(__webpack_require__(97527)); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return _sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function isAnonymous(ident) { + return ident.raw === ""; +} + +function getSectionMetadata(ast, name) { + var section; + (0, _traverse.traverse)(ast, { + SectionMetadata: function (_SectionMetadata) { + function SectionMetadata(_x) { + return _SectionMetadata.apply(this, arguments); + } + + SectionMetadata.toString = function () { + return _SectionMetadata.toString(); + }; + + return SectionMetadata; + }(function (_ref) { + var node = _ref.node; + + if (node.section === name) { + section = node; + } + }) + }); + return section; +} + +function getSectionMetadatas(ast, name) { + var sections = []; + (0, _traverse.traverse)(ast, { + SectionMetadata: function (_SectionMetadata2) { + function SectionMetadata(_x2) { + return _SectionMetadata2.apply(this, arguments); + } + + SectionMetadata.toString = function () { + return _SectionMetadata2.toString(); + }; + + return SectionMetadata; + }(function (_ref2) { + var node = _ref2.node; + + if (node.section === name) { + sections.push(node); + } + }) + }); + return sections; +} + +function sortSectionMetadata(m) { + if (m.metadata == null) { + console.warn("sortSectionMetadata: no metadata to sort"); + return; + } // $FlowIgnore + + + m.metadata.sections.sort(function (a, b) { + var aId = _helperWasmBytecode.default.sections[a.section]; + var bId = _helperWasmBytecode.default.sections[b.section]; + + if (typeof aId !== "number" || typeof bId !== "number") { + throw new Error("Section id not found"); + } + + return aId - bId; + }); +} + +function orderedInsertNode(m, n) { + assertHasLoc(n); + var didInsert = false; + + if (n.type === "ModuleExport") { + m.fields.push(n); + return; + } + + m.fields = m.fields.reduce(function (acc, field) { + var fieldEndCol = Infinity; + + if (field.loc != null) { + // $FlowIgnore + fieldEndCol = field.loc.end.column; + } // $FlowIgnore: assertHasLoc ensures that + + + if (didInsert === false && n.loc.start.column < fieldEndCol) { + didInsert = true; + acc.push(n); + } + + acc.push(field); + return acc; + }, []); // Handles empty modules or n is the last element + + if (didInsert === false) { + m.fields.push(n); + } +} + +function assertHasLoc(n) { + if (n.loc == null || n.loc.start == null || n.loc.end == null) { + throw new Error("Internal failure: node (".concat(JSON.stringify(n.type), ") has no location information")); + } +} + +function getEndOfSection(s) { + assertHasLoc(s.size); + return s.startOffset + s.size.value + ( // $FlowIgnore + s.size.loc.end.column - s.size.loc.start.column); +} + +function shiftLoc(node, delta) { + // $FlowIgnore + node.loc.start.column += delta; // $FlowIgnore + + node.loc.end.column += delta; +} + +function shiftSection(ast, node, delta) { + if (node.type !== "SectionMetadata") { + throw new Error("Can not shift node " + JSON.stringify(node.type)); + } + + node.startOffset += delta; + + if (_typeof(node.size.loc) === "object") { + shiftLoc(node.size, delta); + } // Custom sections doesn't have vectorOfSize + + + if (_typeof(node.vectorOfSize) === "object" && _typeof(node.vectorOfSize.loc) === "object") { + shiftLoc(node.vectorOfSize, delta); + } + + var sectionName = node.section; // shift node locations within that section + + (0, _traverse.traverse)(ast, { + Node: function Node(_ref3) { + var node = _ref3.node; + var section = (0, _helperWasmBytecode.getSectionForNode)(node); + + if (section === sectionName && _typeof(node.loc) === "object") { + shiftLoc(node, delta); + } + } + }); +} + +function signatureForOpcode(object, name) { + var opcodeName = name; + + if (object !== undefined && object !== "") { + opcodeName = object + "." + name; + } + + var sign = _signatures.signatures[opcodeName]; + + if (sign == undefined) { + // TODO: Uncomment this when br_table and others has been done + //throw new Error("Invalid opcode: "+opcodeName); + return [object, object]; + } + + return sign[0]; +} + +function getUniqueNameGenerator() { + var inc = {}; + return function () { + var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; + + if (!(prefix in inc)) { + inc[prefix] = 0; + } else { + inc[prefix] = inc[prefix] + 1; + } + + return prefix + "_" + inc[prefix]; + }; +} + +function getStartByteOffset(n) { + // $FlowIgnore + if (typeof n.loc === "undefined" || typeof n.loc.start === "undefined") { + throw new Error( // $FlowIgnore + "Can not get byte offset without loc informations, node: " + String(n.id)); + } + + return n.loc.start.column; +} + +function getEndByteOffset(n) { + // $FlowIgnore + if (typeof n.loc === "undefined" || typeof n.loc.end === "undefined") { + throw new Error("Can not get byte offset without loc informations, node: " + n.type); + } + + return n.loc.end.column; +} + +function getFunctionBeginingByteOffset(n) { + if (!(n.body.length > 0)) { + throw new Error('n.body.length > 0' + " error: " + (undefined || "unknown")); + } + + var _n$body = _slicedToArray(n.body, 1), + firstInstruction = _n$body[0]; + + return getStartByteOffset(firstInstruction); +} + +function getEndBlockByteOffset(n) { + // $FlowIgnore + if (!(n.instr.length > 0 || n.body.length > 0)) { + throw new Error('n.instr.length > 0 || n.body.length > 0' + " error: " + (undefined || "unknown")); + } + + var lastInstruction; + + if (n.instr) { + // $FlowIgnore + lastInstruction = n.instr[n.instr.length - 1]; + } + + if (n.body) { + // $FlowIgnore + lastInstruction = n.body[n.body.length - 1]; + } + + if (!(_typeof(lastInstruction) === "object")) { + throw new Error('typeof lastInstruction === "object"' + " error: " + (undefined || "unknown")); + } + + // $FlowIgnore + return getStartByteOffset(lastInstruction); +} + +function getStartBlockByteOffset(n) { + // $FlowIgnore + if (!(n.instr.length > 0 || n.body.length > 0)) { + throw new Error('n.instr.length > 0 || n.body.length > 0' + " error: " + (undefined || "unknown")); + } + + var fistInstruction; + + if (n.instr) { + // $FlowIgnore + var _n$instr = _slicedToArray(n.instr, 1); + + fistInstruction = _n$instr[0]; + } + + if (n.body) { + // $FlowIgnore + var _n$body2 = _slicedToArray(n.body, 1); + + fistInstruction = _n$body2[0]; + } + + if (!(_typeof(fistInstruction) === "object")) { + throw new Error('typeof fistInstruction === "object"' + " error: " + (undefined || "unknown")); + } + + // $FlowIgnore + return getStartByteOffset(fistInstruction); +} + +/***/ }), + +/***/ 83268: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = parse; + +function parse(input) { + input = input.toUpperCase(); + var splitIndex = input.indexOf("P"); + var mantissa, exponent; + + if (splitIndex !== -1) { + mantissa = input.substring(0, splitIndex); + exponent = parseInt(input.substring(splitIndex + 1)); + } else { + mantissa = input; + exponent = 0; + } + + var dotIndex = mantissa.indexOf("."); + + if (dotIndex !== -1) { + var integerPart = parseInt(mantissa.substring(0, dotIndex), 16); + var sign = Math.sign(integerPart); + integerPart = sign * integerPart; + var fractionLength = mantissa.length - dotIndex - 1; + var fractionalPart = parseInt(mantissa.substring(dotIndex + 1), 16); + var fraction = fractionLength > 0 ? fractionalPart / Math.pow(16, fractionLength) : 0; + + if (sign === 0) { + if (fraction === 0) { + mantissa = sign; + } else { + if (Object.is(sign, -0)) { + mantissa = -fraction; + } else { + mantissa = fraction; + } + } + } else { + mantissa = sign * (integerPart + fraction); + } + } else { + mantissa = parseInt(mantissa, 16); + } + + return mantissa * (splitIndex !== -1 ? Math.pow(2, exponent) : 1); +} + +/***/ }), + +/***/ 36194: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.LinkError = exports.CompileError = exports.RuntimeError = void 0; + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var RuntimeError = +/*#__PURE__*/ +function (_Error) { + _inherits(RuntimeError, _Error); + + function RuntimeError() { + _classCallCheck(this, RuntimeError); + + return _possibleConstructorReturn(this, (RuntimeError.__proto__ || Object.getPrototypeOf(RuntimeError)).apply(this, arguments)); + } + + return RuntimeError; +}(Error); + +exports.RuntimeError = RuntimeError; + +var CompileError = +/*#__PURE__*/ +function (_Error2) { + _inherits(CompileError, _Error2); + + function CompileError() { + _classCallCheck(this, CompileError); + + return _possibleConstructorReturn(this, (CompileError.__proto__ || Object.getPrototypeOf(CompileError)).apply(this, arguments)); + } + + return CompileError; +}(Error); + +exports.CompileError = CompileError; + +var LinkError = +/*#__PURE__*/ +function (_Error3) { + _inherits(LinkError, _Error3); + + function LinkError() { + _classCallCheck(this, LinkError); + + return _possibleConstructorReturn(this, (LinkError.__proto__ || Object.getPrototypeOf(LinkError)).apply(this, arguments)); + } + + return LinkError; +}(Error); + +exports.LinkError = LinkError; + +/***/ }), + +/***/ 57827: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.overrideBytesInBuffer = overrideBytesInBuffer; +exports.makeBuffer = makeBuffer; +exports.fromHexdump = fromHexdump; + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function concatUint8Arrays() { + for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) { + arrays[_key] = arguments[_key]; + } + + var totalLength = arrays.reduce(function (a, b) { + return a + b.length; + }, 0); + var result = new Uint8Array(totalLength); + var offset = 0; + + for (var _i = 0; _i < arrays.length; _i++) { + var arr = arrays[_i]; + + if (arr instanceof Uint8Array === false) { + throw new Error("arr must be of type Uint8Array"); + } + + result.set(arr, offset); + offset += arr.length; + } + + return result; +} + +function overrideBytesInBuffer(buffer, startLoc, endLoc, newBytes) { + var beforeBytes = buffer.slice(0, startLoc); + var afterBytes = buffer.slice(endLoc, buffer.length); // replacement is empty, we can omit it + + if (newBytes.length === 0) { + return concatUint8Arrays(beforeBytes, afterBytes); + } + + var replacement = Uint8Array.from(newBytes); + return concatUint8Arrays(beforeBytes, replacement, afterBytes); +} + +function makeBuffer() { + for (var _len2 = arguments.length, splitedBytes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + splitedBytes[_key2] = arguments[_key2]; + } + + var bytes = [].concat.apply([], splitedBytes); + return new Uint8Array(bytes).buffer; +} + +function fromHexdump(str) { + var lines = str.split("\n"); // remove any leading left whitespace + + lines = lines.map(function (line) { + return line.trim(); + }); + var bytes = lines.reduce(function (acc, line) { + var cols = line.split(" "); // remove the offset, left column + + cols.shift(); + cols = cols.filter(function (x) { + return x !== ""; + }); + var bytes = cols.map(function (x) { + return parseInt(x, 16); + }); + acc.push.apply(acc, _toConsumableArray(bytes)); + return acc; + }, []); + return Buffer.from(bytes); +} + +/***/ }), + +/***/ 48333: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.codeFrameFromAst = codeFrameFromAst; +exports.codeFrameFromSource = codeFrameFromSource; + +var _wastPrinter = __webpack_require__(45378); + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var SHOW_LINES_AROUND_POINTER = 5; + +function repeat(char, nb) { + return Array(nb).fill(char).join(""); +} // TODO(sven): allow arbitrary ast nodes + + +function codeFrameFromAst(ast, loc) { + return codeFrameFromSource((0, _wastPrinter.print)(ast), loc); +} + +function codeFrameFromSource(source, loc) { + var start = loc.start, + end = loc.end; + var length = 1; + + if (_typeof(end) === "object") { + length = end.column - start.column + 1; + } + + return source.split("\n").reduce(function (acc, line, lineNbr) { + if (Math.abs(start.line - lineNbr) < SHOW_LINES_AROUND_POINTER) { + acc += line + "\n"; + } // Add a new line with the pointer padded left + + + if (lineNbr === start.line - 1) { + acc += repeat(" ", start.column - 1); + acc += repeat("^", length); + acc += "\n"; + } + + return acc; + }, ""); +} + +/***/ }), + +/***/ 38902: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.makeTransition = makeTransition; +exports.FSM = void 0; + +function _sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return _sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var STOP = Symbol("STOP"); + +function makeTransition(regex, nextState) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref$n = _ref.n, + n = _ref$n === void 0 ? 1 : _ref$n, + allowedSeparator = _ref.allowedSeparator; + + return function (instance) { + if (allowedSeparator) { + if (instance.input[instance.ptr] === allowedSeparator) { + if (regex.test(instance.input.substring(instance.ptr - 1, instance.ptr))) { + // Consume the separator and stay in current state + return [instance.currentState, 1]; + } else { + return [instance.terminatingState, 0]; + } + } + } + + if (regex.test(instance.input.substring(instance.ptr, instance.ptr + n))) { + return [nextState, n]; + } + + return false; + }; +} + +function combineTransitions(transitions) { + return function () { + var match = false; + var currentTransitions = transitions[this.currentState] || []; + + for (var i = 0; i < currentTransitions.length; ++i) { + match = currentTransitions[i](this); + + if (match !== false) { + break; + } + } + + return match || [this.terminatingState, 0]; + }; +} + +var FSM = +/*#__PURE__*/ +function () { + function FSM(transitions, initialState) { + var terminatingState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : STOP; + + _classCallCheck(this, FSM); + + this.initialState = initialState; + this.terminatingState = terminatingState; + + if (terminatingState === STOP || !transitions[terminatingState]) { + transitions[terminatingState] = []; + } + + this.transitionFunction = combineTransitions.call(this, transitions); + } + + _createClass(FSM, [{ + key: "run", + value: function run(input) { + this.input = input; + this.ptr = 0; + this.currentState = this.initialState; + var value = ""; + var eatLength, nextState; + + while (this.currentState !== this.terminatingState && this.ptr < this.input.length) { + var _transitionFunction = this.transitionFunction(); + + var _transitionFunction2 = _slicedToArray(_transitionFunction, 2); + + nextState = _transitionFunction2[0]; + eatLength = _transitionFunction2[1]; + value += this.input.substring(this.ptr, this.ptr += eatLength); + this.currentState = nextState; + } + + return value; + } + }]); + + return FSM; +}(); + +exports.FSM = FSM; + +/***/ }), + +/***/ 71234: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.moduleContextFromModuleAST = moduleContextFromModuleAST; +exports.ModuleContext = void 0; + +var _ast = __webpack_require__(98688); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function moduleContextFromModuleAST(m) { + var moduleContext = new ModuleContext(); + + if (!(m.type === "Module")) { + throw new Error('m.type === "Module"' + " error: " + (undefined || "unknown")); + } + + m.fields.forEach(function (field) { + switch (field.type) { + case "Start": + { + moduleContext.setStart(field.index); + break; + } + + case "TypeInstruction": + { + moduleContext.addType(field); + break; + } + + case "Func": + { + moduleContext.addFunction(field); + break; + } + + case "Global": + { + moduleContext.defineGlobal(field); + break; + } + + case "ModuleImport": + { + switch (field.descr.type) { + case "GlobalType": + { + moduleContext.importGlobal(field.descr.valtype, field.descr.mutability); + break; + } + + case "Memory": + { + moduleContext.addMemory(field.descr.limits.min, field.descr.limits.max); + break; + } + + case "FuncImportDescr": + { + moduleContext.importFunction(field.descr); + break; + } + + case "Table": + { + // FIXME(sven): not implemented yet + break; + } + + default: + throw new Error("Unsupported ModuleImport of type " + JSON.stringify(field.descr.type)); + } + + break; + } + + case "Memory": + { + moduleContext.addMemory(field.limits.min, field.limits.max); + break; + } + } + }); + return moduleContext; +} +/** + * Module context for type checking + */ + + +var ModuleContext = +/*#__PURE__*/ +function () { + function ModuleContext() { + _classCallCheck(this, ModuleContext); + + this.funcs = []; + this.funcsOffsetByIdentifier = []; + this.types = []; + this.globals = []; + this.globalsOffsetByIdentifier = []; + this.mems = []; // Current stack frame + + this.locals = []; + this.labels = []; + this.return = []; + this.debugName = "unknown"; + this.start = null; + } + /** + * Set start segment + */ + + + _createClass(ModuleContext, [{ + key: "setStart", + value: function setStart(index) { + this.start = index.value; + } + /** + * Get start function + */ + + }, { + key: "getStart", + value: function getStart() { + return this.start; + } + /** + * Reset the active stack frame + */ + + }, { + key: "newContext", + value: function newContext(debugName, expectedResult) { + this.locals = []; + this.labels = [expectedResult]; + this.return = expectedResult; + this.debugName = debugName; + } + /** + * Functions + */ + + }, { + key: "addFunction", + value: function addFunction(func + /*: Func*/ + ) { + // eslint-disable-next-line prefer-const + var _ref = func.signature || {}, + _ref$params = _ref.params, + args = _ref$params === void 0 ? [] : _ref$params, + _ref$results = _ref.results, + result = _ref$results === void 0 ? [] : _ref$results; + + args = args.map(function (arg) { + return arg.valtype; + }); + this.funcs.push({ + args: args, + result: result + }); + + if (typeof func.name !== "undefined") { + this.funcsOffsetByIdentifier[func.name.value] = this.funcs.length - 1; + } + } + }, { + key: "importFunction", + value: function importFunction(funcimport) { + if ((0, _ast.isSignature)(funcimport.signature)) { + // eslint-disable-next-line prefer-const + var _funcimport$signature = funcimport.signature, + args = _funcimport$signature.params, + result = _funcimport$signature.results; + args = args.map(function (arg) { + return arg.valtype; + }); + this.funcs.push({ + args: args, + result: result + }); + } else { + if (!(0, _ast.isNumberLiteral)(funcimport.signature)) { + throw new Error('isNumberLiteral(funcimport.signature)' + " error: " + (undefined || "unknown")); + } + + var typeId = funcimport.signature.value; + + if (!this.hasType(typeId)) { + throw new Error('this.hasType(typeId)' + " error: " + (undefined || "unknown")); + } + + var signature = this.getType(typeId); + this.funcs.push({ + args: signature.params.map(function (arg) { + return arg.valtype; + }), + result: signature.results + }); + } + + if (typeof funcimport.id !== "undefined") { + // imports are first, we can assume their index in the array + this.funcsOffsetByIdentifier[funcimport.id.value] = this.funcs.length - 1; + } + } + }, { + key: "hasFunction", + value: function hasFunction(index) { + return typeof this.getFunction(index) !== "undefined"; + } + }, { + key: "getFunction", + value: function getFunction(index) { + if (typeof index !== "number") { + throw new Error("getFunction only supported for number index"); + } + + return this.funcs[index]; + } + }, { + key: "getFunctionOffsetByIdentifier", + value: function getFunctionOffsetByIdentifier(name) { + if (!(typeof name === "string")) { + throw new Error('typeof name === "string"' + " error: " + (undefined || "unknown")); + } + + return this.funcsOffsetByIdentifier[name]; + } + /** + * Labels + */ + + }, { + key: "addLabel", + value: function addLabel(result) { + this.labels.unshift(result); + } + }, { + key: "hasLabel", + value: function hasLabel(index) { + return this.labels.length > index && index >= 0; + } + }, { + key: "getLabel", + value: function getLabel(index) { + return this.labels[index]; + } + }, { + key: "popLabel", + value: function popLabel() { + this.labels.shift(); + } + /** + * Locals + */ + + }, { + key: "hasLocal", + value: function hasLocal(index) { + return typeof this.getLocal(index) !== "undefined"; + } + }, { + key: "getLocal", + value: function getLocal(index) { + return this.locals[index]; + } + }, { + key: "addLocal", + value: function addLocal(type) { + this.locals.push(type); + } + /** + * Types + */ + + }, { + key: "addType", + value: function addType(type) { + if (!(type.functype.type === "Signature")) { + throw new Error('type.functype.type === "Signature"' + " error: " + (undefined || "unknown")); + } + + this.types.push(type.functype); + } + }, { + key: "hasType", + value: function hasType(index) { + return this.types[index] !== undefined; + } + }, { + key: "getType", + value: function getType(index) { + return this.types[index]; + } + /** + * Globals + */ + + }, { + key: "hasGlobal", + value: function hasGlobal(index) { + return this.globals.length > index && index >= 0; + } + }, { + key: "getGlobal", + value: function getGlobal(index) { + return this.globals[index].type; + } + }, { + key: "getGlobalOffsetByIdentifier", + value: function getGlobalOffsetByIdentifier(name) { + if (!(typeof name === "string")) { + throw new Error('typeof name === "string"' + " error: " + (undefined || "unknown")); + } + + return this.globalsOffsetByIdentifier[name]; + } + }, { + key: "defineGlobal", + value: function defineGlobal(global + /*: Global*/ + ) { + var type = global.globalType.valtype; + var mutability = global.globalType.mutability; + this.globals.push({ + type: type, + mutability: mutability + }); + + if (typeof global.name !== "undefined") { + this.globalsOffsetByIdentifier[global.name.value] = this.globals.length - 1; + } + } + }, { + key: "importGlobal", + value: function importGlobal(type, mutability) { + this.globals.push({ + type: type, + mutability: mutability + }); + } + }, { + key: "isMutableGlobal", + value: function isMutableGlobal(index) { + return this.globals[index].mutability === "var"; + } + }, { + key: "isImmutableGlobal", + value: function isImmutableGlobal(index) { + return this.globals[index].mutability === "const"; + } + /** + * Memories + */ + + }, { + key: "hasMemory", + value: function hasMemory(index) { + return this.mems.length > index && index >= 0; + } + }, { + key: "addMemory", + value: function addMemory(min, max) { + this.mems.push({ + min: min, + max: max + }); + } + }, { + key: "getMemory", + value: function getMemory(index) { + return this.mems[index]; + } + }]); + + return ModuleContext; +}(); + +exports.ModuleContext = ModuleContext; + +/***/ }), + +/***/ 97527: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "getSectionForNode", ({ + enumerable: true, + get: function get() { + return _section.getSectionForNode; + } +})); +exports.default = void 0; + +var _section = __webpack_require__(36996); + +var illegalop = "illegal"; +var magicModuleHeader = [0x00, 0x61, 0x73, 0x6d]; +var moduleVersion = [0x01, 0x00, 0x00, 0x00]; + +function invertMap(obj) { + var keyModifierFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (k) { + return k; + }; + var result = {}; + var keys = Object.keys(obj); + + for (var i = 0, length = keys.length; i < length; i++) { + result[keyModifierFn(obj[keys[i]])] = keys[i]; + } + + return result; +} + +function createSymbolObject(name +/*: string */ +, object +/*: string */ +) +/*: Symbol*/ +{ + var numberOfArgs + /*: number*/ + = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + return { + name: name, + object: object, + numberOfArgs: numberOfArgs + }; +} + +function createSymbol(name +/*: string */ +) +/*: Symbol*/ +{ + var numberOfArgs + /*: number*/ + = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + return { + name: name, + numberOfArgs: numberOfArgs + }; +} + +var types = { + func: 0x60, + result: 0x40 +}; +var exportTypes = { + 0x00: "Func", + 0x01: "Table", + 0x02: "Mem", + 0x03: "Global" +}; +var exportTypesByName = invertMap(exportTypes); +var valtypes = { + 0x7f: "i32", + 0x7e: "i64", + 0x7d: "f32", + 0x7c: "f64", + 0x7b: "v128" +}; +var valtypesByString = invertMap(valtypes); +var tableTypes = { + 0x70: "anyfunc" +}; +var blockTypes = Object.assign({}, valtypes, { + // https://webassembly.github.io/spec/core/binary/types.html#binary-blocktype + 0x40: null, + // https://webassembly.github.io/spec/core/binary/types.html#binary-valtype + 0x7f: "i32", + 0x7e: "i64", + 0x7d: "f32", + 0x7c: "f64" +}); +var globalTypes = { + 0x00: "const", + 0x01: "var" +}; +var globalTypesByString = invertMap(globalTypes); +var importTypes = { + 0x00: "func", + 0x01: "table", + 0x02: "mem", + 0x03: "global" +}; +var sections = { + custom: 0, + type: 1, + import: 2, + func: 3, + table: 4, + memory: 5, + global: 6, + export: 7, + start: 8, + element: 9, + code: 10, + data: 11 +}; +var symbolsByByte = { + 0x00: createSymbol("unreachable"), + 0x01: createSymbol("nop"), + 0x02: createSymbol("block"), + 0x03: createSymbol("loop"), + 0x04: createSymbol("if"), + 0x05: createSymbol("else"), + 0x06: illegalop, + 0x07: illegalop, + 0x08: illegalop, + 0x09: illegalop, + 0x0a: illegalop, + 0x0b: createSymbol("end"), + 0x0c: createSymbol("br", 1), + 0x0d: createSymbol("br_if", 1), + 0x0e: createSymbol("br_table"), + 0x0f: createSymbol("return"), + 0x10: createSymbol("call", 1), + 0x11: createSymbol("call_indirect", 2), + 0x12: illegalop, + 0x13: illegalop, + 0x14: illegalop, + 0x15: illegalop, + 0x16: illegalop, + 0x17: illegalop, + 0x18: illegalop, + 0x19: illegalop, + 0x1a: createSymbol("drop"), + 0x1b: createSymbol("select"), + 0x1c: illegalop, + 0x1d: illegalop, + 0x1e: illegalop, + 0x1f: illegalop, + 0x20: createSymbol("get_local", 1), + 0x21: createSymbol("set_local", 1), + 0x22: createSymbol("tee_local", 1), + 0x23: createSymbol("get_global", 1), + 0x24: createSymbol("set_global", 1), + 0x25: illegalop, + 0x26: illegalop, + 0x27: illegalop, + 0x28: createSymbolObject("load", "u32", 1), + 0x29: createSymbolObject("load", "u64", 1), + 0x2a: createSymbolObject("load", "f32", 1), + 0x2b: createSymbolObject("load", "f64", 1), + 0x2c: createSymbolObject("load8_s", "u32", 1), + 0x2d: createSymbolObject("load8_u", "u32", 1), + 0x2e: createSymbolObject("load16_s", "u32", 1), + 0x2f: createSymbolObject("load16_u", "u32", 1), + 0x30: createSymbolObject("load8_s", "u64", 1), + 0x31: createSymbolObject("load8_u", "u64", 1), + 0x32: createSymbolObject("load16_s", "u64", 1), + 0x33: createSymbolObject("load16_u", "u64", 1), + 0x34: createSymbolObject("load32_s", "u64", 1), + 0x35: createSymbolObject("load32_u", "u64", 1), + 0x36: createSymbolObject("store", "u32", 1), + 0x37: createSymbolObject("store", "u64", 1), + 0x38: createSymbolObject("store", "f32", 1), + 0x39: createSymbolObject("store", "f64", 1), + 0x3a: createSymbolObject("store8", "u32", 1), + 0x3b: createSymbolObject("store16", "u32", 1), + 0x3c: createSymbolObject("store8", "u64", 1), + 0x3d: createSymbolObject("store16", "u64", 1), + 0x3e: createSymbolObject("store32", "u64", 1), + 0x3f: createSymbolObject("current_memory"), + 0x40: createSymbolObject("grow_memory"), + 0x41: createSymbolObject("const", "i32", 1), + 0x42: createSymbolObject("const", "i64", 1), + 0x43: createSymbolObject("const", "f32", 1), + 0x44: createSymbolObject("const", "f64", 1), + 0x45: createSymbolObject("eqz", "i32"), + 0x46: createSymbolObject("eq", "i32"), + 0x47: createSymbolObject("ne", "i32"), + 0x48: createSymbolObject("lt_s", "i32"), + 0x49: createSymbolObject("lt_u", "i32"), + 0x4a: createSymbolObject("gt_s", "i32"), + 0x4b: createSymbolObject("gt_u", "i32"), + 0x4c: createSymbolObject("le_s", "i32"), + 0x4d: createSymbolObject("le_u", "i32"), + 0x4e: createSymbolObject("ge_s", "i32"), + 0x4f: createSymbolObject("ge_u", "i32"), + 0x50: createSymbolObject("eqz", "i64"), + 0x51: createSymbolObject("eq", "i64"), + 0x52: createSymbolObject("ne", "i64"), + 0x53: createSymbolObject("lt_s", "i64"), + 0x54: createSymbolObject("lt_u", "i64"), + 0x55: createSymbolObject("gt_s", "i64"), + 0x56: createSymbolObject("gt_u", "i64"), + 0x57: createSymbolObject("le_s", "i64"), + 0x58: createSymbolObject("le_u", "i64"), + 0x59: createSymbolObject("ge_s", "i64"), + 0x5a: createSymbolObject("ge_u", "i64"), + 0x5b: createSymbolObject("eq", "f32"), + 0x5c: createSymbolObject("ne", "f32"), + 0x5d: createSymbolObject("lt", "f32"), + 0x5e: createSymbolObject("gt", "f32"), + 0x5f: createSymbolObject("le", "f32"), + 0x60: createSymbolObject("ge", "f32"), + 0x61: createSymbolObject("eq", "f64"), + 0x62: createSymbolObject("ne", "f64"), + 0x63: createSymbolObject("lt", "f64"), + 0x64: createSymbolObject("gt", "f64"), + 0x65: createSymbolObject("le", "f64"), + 0x66: createSymbolObject("ge", "f64"), + 0x67: createSymbolObject("clz", "i32"), + 0x68: createSymbolObject("ctz", "i32"), + 0x69: createSymbolObject("popcnt", "i32"), + 0x6a: createSymbolObject("add", "i32"), + 0x6b: createSymbolObject("sub", "i32"), + 0x6c: createSymbolObject("mul", "i32"), + 0x6d: createSymbolObject("div_s", "i32"), + 0x6e: createSymbolObject("div_u", "i32"), + 0x6f: createSymbolObject("rem_s", "i32"), + 0x70: createSymbolObject("rem_u", "i32"), + 0x71: createSymbolObject("and", "i32"), + 0x72: createSymbolObject("or", "i32"), + 0x73: createSymbolObject("xor", "i32"), + 0x74: createSymbolObject("shl", "i32"), + 0x75: createSymbolObject("shr_s", "i32"), + 0x76: createSymbolObject("shr_u", "i32"), + 0x77: createSymbolObject("rotl", "i32"), + 0x78: createSymbolObject("rotr", "i32"), + 0x79: createSymbolObject("clz", "i64"), + 0x7a: createSymbolObject("ctz", "i64"), + 0x7b: createSymbolObject("popcnt", "i64"), + 0x7c: createSymbolObject("add", "i64"), + 0x7d: createSymbolObject("sub", "i64"), + 0x7e: createSymbolObject("mul", "i64"), + 0x7f: createSymbolObject("div_s", "i64"), + 0x80: createSymbolObject("div_u", "i64"), + 0x81: createSymbolObject("rem_s", "i64"), + 0x82: createSymbolObject("rem_u", "i64"), + 0x83: createSymbolObject("and", "i64"), + 0x84: createSymbolObject("or", "i64"), + 0x85: createSymbolObject("xor", "i64"), + 0x86: createSymbolObject("shl", "i64"), + 0x87: createSymbolObject("shr_s", "i64"), + 0x88: createSymbolObject("shr_u", "i64"), + 0x89: createSymbolObject("rotl", "i64"), + 0x8a: createSymbolObject("rotr", "i64"), + 0x8b: createSymbolObject("abs", "f32"), + 0x8c: createSymbolObject("neg", "f32"), + 0x8d: createSymbolObject("ceil", "f32"), + 0x8e: createSymbolObject("floor", "f32"), + 0x8f: createSymbolObject("trunc", "f32"), + 0x90: createSymbolObject("nearest", "f32"), + 0x91: createSymbolObject("sqrt", "f32"), + 0x92: createSymbolObject("add", "f32"), + 0x93: createSymbolObject("sub", "f32"), + 0x94: createSymbolObject("mul", "f32"), + 0x95: createSymbolObject("div", "f32"), + 0x96: createSymbolObject("min", "f32"), + 0x97: createSymbolObject("max", "f32"), + 0x98: createSymbolObject("copysign", "f32"), + 0x99: createSymbolObject("abs", "f64"), + 0x9a: createSymbolObject("neg", "f64"), + 0x9b: createSymbolObject("ceil", "f64"), + 0x9c: createSymbolObject("floor", "f64"), + 0x9d: createSymbolObject("trunc", "f64"), + 0x9e: createSymbolObject("nearest", "f64"), + 0x9f: createSymbolObject("sqrt", "f64"), + 0xa0: createSymbolObject("add", "f64"), + 0xa1: createSymbolObject("sub", "f64"), + 0xa2: createSymbolObject("mul", "f64"), + 0xa3: createSymbolObject("div", "f64"), + 0xa4: createSymbolObject("min", "f64"), + 0xa5: createSymbolObject("max", "f64"), + 0xa6: createSymbolObject("copysign", "f64"), + 0xa7: createSymbolObject("wrap/i64", "i32"), + 0xa8: createSymbolObject("trunc_s/f32", "i32"), + 0xa9: createSymbolObject("trunc_u/f32", "i32"), + 0xaa: createSymbolObject("trunc_s/f64", "i32"), + 0xab: createSymbolObject("trunc_u/f64", "i32"), + 0xac: createSymbolObject("extend_s/i32", "i64"), + 0xad: createSymbolObject("extend_u/i32", "i64"), + 0xae: createSymbolObject("trunc_s/f32", "i64"), + 0xaf: createSymbolObject("trunc_u/f32", "i64"), + 0xb0: createSymbolObject("trunc_s/f64", "i64"), + 0xb1: createSymbolObject("trunc_u/f64", "i64"), + 0xb2: createSymbolObject("convert_s/i32", "f32"), + 0xb3: createSymbolObject("convert_u/i32", "f32"), + 0xb4: createSymbolObject("convert_s/i64", "f32"), + 0xb5: createSymbolObject("convert_u/i64", "f32"), + 0xb6: createSymbolObject("demote/f64", "f32"), + 0xb7: createSymbolObject("convert_s/i32", "f64"), + 0xb8: createSymbolObject("convert_u/i32", "f64"), + 0xb9: createSymbolObject("convert_s/i64", "f64"), + 0xba: createSymbolObject("convert_u/i64", "f64"), + 0xbb: createSymbolObject("promote/f32", "f64"), + 0xbc: createSymbolObject("reinterpret/f32", "i32"), + 0xbd: createSymbolObject("reinterpret/f64", "i64"), + 0xbe: createSymbolObject("reinterpret/i32", "f32"), + 0xbf: createSymbolObject("reinterpret/i64", "f64") +}; +var symbolsByName = invertMap(symbolsByByte, function (obj) { + if (typeof obj.object === "string") { + return "".concat(obj.object, ".").concat(obj.name); + } + + return obj.name; +}); +var _default = { + symbolsByByte: symbolsByByte, + sections: sections, + magicModuleHeader: magicModuleHeader, + moduleVersion: moduleVersion, + types: types, + valtypes: valtypes, + exportTypes: exportTypes, + blockTypes: blockTypes, + tableTypes: tableTypes, + globalTypes: globalTypes, + importTypes: importTypes, + valtypesByString: valtypesByString, + globalTypesByString: globalTypesByString, + exportTypesByName: exportTypesByName, + symbolsByName: symbolsByName +}; +exports.default = _default; + +/***/ }), + +/***/ 36996: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getSectionForNode = getSectionForNode; + +function getSectionForNode(n) { + switch (n.type) { + case "ModuleImport": + return "import"; + + case "CallInstruction": + case "CallIndirectInstruction": + case "Func": + case "Instr": + return "code"; + + case "ModuleExport": + return "export"; + + case "Start": + return "start"; + + case "TypeInstruction": + return "type"; + + case "IndexInFuncSection": + return "func"; + + case "Global": + return "global"; + // No section + + default: + return; + } +} + +/***/ }), + +/***/ 30368: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.createEmptySection = createEmptySection; + +var _wasmGen = __webpack_require__(62394); + +var _helperBuffer = __webpack_require__(57827); + +var _helperWasmBytecode = _interopRequireDefault(__webpack_require__(97527)); + +var t = _interopRequireWildcard(__webpack_require__(98688)); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function findLastSection(ast, forSection) { + var targetSectionId = _helperWasmBytecode.default.sections[forSection]; // $FlowIgnore: metadata can not be empty + + var moduleSections = ast.body[0].metadata.sections; + var lastSection; + var lastId = 0; + + for (var i = 0, len = moduleSections.length; i < len; i++) { + var section = moduleSections[i]; // Ignore custom section since they can actually occur everywhere + + if (section.section === "custom") { + continue; + } + + var sectionId = _helperWasmBytecode.default.sections[section.section]; + + if (targetSectionId > lastId && targetSectionId < sectionId) { + return lastSection; + } + + lastId = sectionId; + lastSection = section; + } + + return lastSection; +} + +function createEmptySection(ast, uint8Buffer, section) { + // previous section after which we are going to insert our section + var lastSection = findLastSection(ast, section); + var start, end; + /** + * It's the first section + */ + + if (lastSection == null || lastSection.section === "custom") { + start = 8 + /* wasm header size */ + ; + end = start; + } else { + start = lastSection.startOffset + lastSection.size.value + 1; + end = start; + } // section id + + + start += 1; + var sizeStartLoc = { + line: -1, + column: start + }; + var sizeEndLoc = { + line: -1, + column: start + 1 + }; // 1 byte for the empty vector + + var size = t.withLoc(t.numberLiteralFromRaw(1), sizeEndLoc, sizeStartLoc); + var vectorOfSizeStartLoc = { + line: -1, + column: sizeEndLoc.column + }; + var vectorOfSizeEndLoc = { + line: -1, + column: sizeEndLoc.column + 1 + }; + var vectorOfSize = t.withLoc(t.numberLiteralFromRaw(0), vectorOfSizeEndLoc, vectorOfSizeStartLoc); + var sectionMetadata = t.sectionMetadata(section, start, size, vectorOfSize); + var sectionBytes = (0, _wasmGen.encodeNode)(sectionMetadata); + uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start - 1, end, sectionBytes); // Add section into the AST for later lookups + + if (_typeof(ast.body[0].metadata) === "object") { + // $FlowIgnore: metadata can not be empty + ast.body[0].metadata.sections.push(sectionMetadata); + t.sortSectionMetadata(ast.body[0]); + } + /** + * Update AST + */ + // Once we hit our section every that is after needs to be shifted by the delta + + + var deltaBytes = +sectionBytes.length; + var encounteredSection = false; + t.traverse(ast, { + SectionMetadata: function SectionMetadata(path) { + if (path.node.section === section) { + encounteredSection = true; + return; + } + + if (encounteredSection === true) { + t.shiftSection(ast, path.node, deltaBytes); + } + } + }); + return { + uint8Buffer: uint8Buffer, + sectionMetadata: sectionMetadata + }; +} + +/***/ }), + +/***/ 37427: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "resizeSectionByteSize", ({ + enumerable: true, + get: function get() { + return _resize.resizeSectionByteSize; + } +})); +Object.defineProperty(exports, "resizeSectionVecSize", ({ + enumerable: true, + get: function get() { + return _resize.resizeSectionVecSize; + } +})); +Object.defineProperty(exports, "createEmptySection", ({ + enumerable: true, + get: function get() { + return _create.createEmptySection; + } +})); +Object.defineProperty(exports, "removeSections", ({ + enumerable: true, + get: function get() { + return _remove.removeSections; + } +})); + +var _resize = __webpack_require__(32230); + +var _create = __webpack_require__(30368); + +var _remove = __webpack_require__(70140); + +/***/ }), + +/***/ 70140: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.removeSections = removeSections; + +var _ast = __webpack_require__(98688); + +var _helperBuffer = __webpack_require__(57827); + +function removeSections(ast, uint8Buffer, section) { + var sectionMetadatas = (0, _ast.getSectionMetadatas)(ast, section); + + if (sectionMetadatas.length === 0) { + throw new Error("Section metadata not found"); + } + + return sectionMetadatas.reverse().reduce(function (uint8Buffer, sectionMetadata) { + var startsIncludingId = sectionMetadata.startOffset - 1; + var ends = section === "start" ? sectionMetadata.size.loc.end.column + 1 : sectionMetadata.startOffset + sectionMetadata.size.value + 1; + var delta = -(ends - startsIncludingId); + /** + * update AST + */ + // Once we hit our section every that is after needs to be shifted by the delta + + var encounteredSection = false; + (0, _ast.traverse)(ast, { + SectionMetadata: function SectionMetadata(path) { + if (path.node.section === section) { + encounteredSection = true; + return path.remove(); + } + + if (encounteredSection === true) { + (0, _ast.shiftSection)(ast, path.node, delta); + } + } + }); // replacement is nothing + + var replacement = []; + return (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, startsIncludingId, ends, replacement); + }, uint8Buffer); +} + +/***/ }), + +/***/ 32230: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.resizeSectionByteSize = resizeSectionByteSize; +exports.resizeSectionVecSize = resizeSectionVecSize; + +var _wasmGen = __webpack_require__(62394); + +var _ast = __webpack_require__(98688); + +var _helperBuffer = __webpack_require__(57827); + +function resizeSectionByteSize(ast, uint8Buffer, section, deltaBytes) { + var sectionMetadata = (0, _ast.getSectionMetadata)(ast, section); + + if (typeof sectionMetadata === "undefined") { + throw new Error("Section metadata not found"); + } + + if (typeof sectionMetadata.size.loc === "undefined") { + throw new Error("SectionMetadata " + section + " has no loc"); + } // keep old node location to be overriden + + + var start = sectionMetadata.size.loc.start.column; + var end = sectionMetadata.size.loc.end.column; + var newSectionSize = sectionMetadata.size.value + deltaBytes; + var newBytes = (0, _wasmGen.encodeU32)(newSectionSize); + /** + * update AST + */ + + sectionMetadata.size.value = newSectionSize; + var oldu32EncodedLen = end - start; + var newu32EncodedLen = newBytes.length; // the new u32 has a different encoded length + + if (newu32EncodedLen !== oldu32EncodedLen) { + var deltaInSizeEncoding = newu32EncodedLen - oldu32EncodedLen; + sectionMetadata.size.loc.end.column = start + newu32EncodedLen; + deltaBytes += deltaInSizeEncoding; // move the vec size pointer size the section size is now smaller + + sectionMetadata.vectorOfSize.loc.start.column += deltaInSizeEncoding; + sectionMetadata.vectorOfSize.loc.end.column += deltaInSizeEncoding; + } // Once we hit our section every that is after needs to be shifted by the delta + + + var encounteredSection = false; + (0, _ast.traverse)(ast, { + SectionMetadata: function SectionMetadata(path) { + if (path.node.section === section) { + encounteredSection = true; + return; + } + + if (encounteredSection === true) { + (0, _ast.shiftSection)(ast, path.node, deltaBytes); + } + } + }); + return (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start, end, newBytes); +} + +function resizeSectionVecSize(ast, uint8Buffer, section, deltaElements) { + var sectionMetadata = (0, _ast.getSectionMetadata)(ast, section); + + if (typeof sectionMetadata === "undefined") { + throw new Error("Section metadata not found"); + } + + if (typeof sectionMetadata.vectorOfSize.loc === "undefined") { + throw new Error("SectionMetadata " + section + " has no loc"); + } // Section has no vector + + + if (sectionMetadata.vectorOfSize.value === -1) { + return uint8Buffer; + } // keep old node location to be overriden + + + var start = sectionMetadata.vectorOfSize.loc.start.column; + var end = sectionMetadata.vectorOfSize.loc.end.column; + var newValue = sectionMetadata.vectorOfSize.value + deltaElements; + var newBytes = (0, _wasmGen.encodeU32)(newValue); // Update AST + + sectionMetadata.vectorOfSize.value = newValue; + sectionMetadata.vectorOfSize.loc.end.column = start + newBytes.length; + return (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start, end, newBytes); +} + +/***/ }), + +/***/ 23408: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.encodeF32 = encodeF32; +exports.encodeF64 = encodeF64; +exports.decodeF32 = decodeF32; +exports.decodeF64 = decodeF64; +exports.DOUBLE_PRECISION_MANTISSA = exports.SINGLE_PRECISION_MANTISSA = exports.NUMBER_OF_BYTE_F64 = exports.NUMBER_OF_BYTE_F32 = void 0; + +var _ieee = __webpack_require__(30848); + +/** + * According to https://webassembly.github.io/spec/binary/values.html#binary-float + * n = 32/8 + */ +var NUMBER_OF_BYTE_F32 = 4; +/** + * According to https://webassembly.github.io/spec/binary/values.html#binary-float + * n = 64/8 + */ + +exports.NUMBER_OF_BYTE_F32 = NUMBER_OF_BYTE_F32; +var NUMBER_OF_BYTE_F64 = 8; +exports.NUMBER_OF_BYTE_F64 = NUMBER_OF_BYTE_F64; +var SINGLE_PRECISION_MANTISSA = 23; +exports.SINGLE_PRECISION_MANTISSA = SINGLE_PRECISION_MANTISSA; +var DOUBLE_PRECISION_MANTISSA = 52; +exports.DOUBLE_PRECISION_MANTISSA = DOUBLE_PRECISION_MANTISSA; + +function encodeF32(v) { + var buffer = []; + (0, _ieee.write)(buffer, v, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32); + return buffer; +} + +function encodeF64(v) { + var buffer = []; + (0, _ieee.write)(buffer, v, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64); + return buffer; +} + +function decodeF32(bytes) { + var buffer = Buffer.from(bytes); + return (0, _ieee.read)(buffer, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32); +} + +function decodeF64(bytes) { + var buffer = Buffer.from(bytes); + return (0, _ieee.read)(buffer, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64); +} + +/***/ }), + +/***/ 83156: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +// Copyright 2012 The Obvious Corporation. + +/* + * bits: Bitwise buffer utilities. The utilities here treat a buffer + * as a little-endian bigint, so the lowest-order bit is bit #0 of + * `buffer[0]`, and the highest-order bit is bit #7 of + * `buffer[buffer.length - 1]`. + */ + +/* + * Modules used + */ + +/* + * Exported bindings + */ + +/** + * Extracts the given number of bits from the buffer at the indicated + * index, returning a simple number as the result. If bits are requested + * that aren't covered by the buffer, the `defaultBit` is used as their + * value. + * + * The `bitLength` must be no more than 32. The `defaultBit` if not + * specified is taken to be `0`. + */ + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.extract = extract; +exports.inject = inject; +exports.getSign = getSign; +exports.highOrder = highOrder; + +function extract(buffer, bitIndex, bitLength, defaultBit) { + if (bitLength < 0 || bitLength > 32) { + throw new Error("Bad value for bitLength."); + } + + if (defaultBit === undefined) { + defaultBit = 0; + } else if (defaultBit !== 0 && defaultBit !== 1) { + throw new Error("Bad value for defaultBit."); + } + + var defaultByte = defaultBit * 0xff; + var result = 0; // All starts are inclusive. The {endByte, endBit} pair is exclusive, but + // if endBit !== 0, then endByte is inclusive. + + var lastBit = bitIndex + bitLength; + var startByte = Math.floor(bitIndex / 8); + var startBit = bitIndex % 8; + var endByte = Math.floor(lastBit / 8); + var endBit = lastBit % 8; + + if (endBit !== 0) { + // `(1 << endBit) - 1` is the mask of all bits up to but not including + // the endBit. + result = get(endByte) & (1 << endBit) - 1; + } + + while (endByte > startByte) { + endByte--; + result = result << 8 | get(endByte); + } + + result >>>= startBit; + return result; + + function get(index) { + var result = buffer[index]; + return result === undefined ? defaultByte : result; + } +} +/** + * Injects the given bits into the given buffer at the given index. Any + * bits in the value beyond the length to set are ignored. + */ + + +function inject(buffer, bitIndex, bitLength, value) { + if (bitLength < 0 || bitLength > 32) { + throw new Error("Bad value for bitLength."); + } + + var lastByte = Math.floor((bitIndex + bitLength - 1) / 8); + + if (bitIndex < 0 || lastByte >= buffer.length) { + throw new Error("Index out of range."); + } // Just keeping it simple, until / unless profiling shows that this + // is a problem. + + + var atByte = Math.floor(bitIndex / 8); + var atBit = bitIndex % 8; + + while (bitLength > 0) { + if (value & 1) { + buffer[atByte] |= 1 << atBit; + } else { + buffer[atByte] &= ~(1 << atBit); + } + + value >>= 1; + bitLength--; + atBit = (atBit + 1) % 8; + + if (atBit === 0) { + atByte++; + } + } +} +/** + * Gets the sign bit of the given buffer. + */ + + +function getSign(buffer) { + return buffer[buffer.length - 1] >>> 7; +} +/** + * Gets the zero-based bit number of the highest-order bit with the + * given value in the given buffer. + * + * If the buffer consists entirely of the other bit value, then this returns + * `-1`. + */ + + +function highOrder(bit, buffer) { + var length = buffer.length; + var fullyWrongByte = (bit ^ 1) * 0xff; // the other-bit extended to a full byte + + while (length > 0 && buffer[length - 1] === fullyWrongByte) { + length--; + } + + if (length === 0) { + // Degenerate case. The buffer consists entirely of ~bit. + return -1; + } + + var byteToCheck = buffer[length - 1]; + var result = length * 8 - 1; + + for (var i = 7; i > 0; i--) { + if ((byteToCheck >> i & 1) === bit) { + break; + } + + result--; + } + + return result; +} + +/***/ }), + +/***/ 84341: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.alloc = alloc; +exports.free = free; +exports.resize = resize; +exports.readInt = readInt; +exports.readUInt = readUInt; +exports.writeInt64 = writeInt64; +exports.writeUInt64 = writeUInt64; +// Copyright 2012 The Obvious Corporation. + +/* + * bufs: Buffer utilities. + */ + +/* + * Module variables + */ + +/** Pool of buffers, where `bufPool[x].length === x`. */ +var bufPool = []; +/** Maximum length of kept temporary buffers. */ + +var TEMP_BUF_MAXIMUM_LENGTH = 20; +/** Minimum exactly-representable 64-bit int. */ + +var MIN_EXACT_INT64 = -0x8000000000000000; +/** Maximum exactly-representable 64-bit int. */ + +var MAX_EXACT_INT64 = 0x7ffffffffffffc00; +/** Maximum exactly-representable 64-bit uint. */ + +var MAX_EXACT_UINT64 = 0xfffffffffffff800; +/** + * The int value consisting just of a 1 in bit #32 (that is, one more + * than the maximum 32-bit unsigned value). + */ + +var BIT_32 = 0x100000000; +/** + * The int value consisting just of a 1 in bit #64 (that is, one more + * than the maximum 64-bit unsigned value). + */ + +var BIT_64 = 0x10000000000000000; +/* + * Helper functions + */ + +/** + * Masks off all but the lowest bit set of the given number. + */ + +function lowestBit(num) { + return num & -num; +} +/** + * Gets whether trying to add the second number to the first is lossy + * (inexact). The first number is meant to be an accumulated result. + */ + + +function isLossyToAdd(accum, num) { + if (num === 0) { + return false; + } + + var lowBit = lowestBit(num); + var added = accum + lowBit; + + if (added === accum) { + return true; + } + + if (added - lowBit !== accum) { + return true; + } + + return false; +} +/* + * Exported functions + */ + +/** + * Allocates a buffer of the given length, which is initialized + * with all zeroes. This returns a buffer from the pool if it is + * available, or a freshly-allocated buffer if not. + */ + + +function alloc(length) { + var result = bufPool[length]; + + if (result) { + bufPool[length] = undefined; + } else { + result = new Buffer(length); + } + + result.fill(0); + return result; +} +/** + * Releases a buffer back to the pool. + */ + + +function free(buffer) { + var length = buffer.length; + + if (length < TEMP_BUF_MAXIMUM_LENGTH) { + bufPool[length] = buffer; + } +} +/** + * Resizes a buffer, returning a new buffer. Returns the argument if + * the length wouldn't actually change. This function is only safe to + * use if the given buffer was allocated within this module (since + * otherwise the buffer might possibly be shared externally). + */ + + +function resize(buffer, length) { + if (length === buffer.length) { + return buffer; + } + + var newBuf = alloc(length); + buffer.copy(newBuf); + free(buffer); + return newBuf; +} +/** + * Reads an arbitrary signed int from a buffer. + */ + + +function readInt(buffer) { + var length = buffer.length; + var positive = buffer[length - 1] < 0x80; + var result = positive ? 0 : -1; + var lossy = false; // Note: We can't use bit manipulation here, since that stops + // working if the result won't fit in a 32-bit int. + + if (length < 7) { + // Common case which can't possibly be lossy (because the result has + // no more than 48 bits, and loss only happens with 54 or more). + for (var i = length - 1; i >= 0; i--) { + result = result * 0x100 + buffer[i]; + } + } else { + for (var _i = length - 1; _i >= 0; _i--) { + var one = buffer[_i]; + result *= 0x100; + + if (isLossyToAdd(result, one)) { + lossy = true; + } + + result += one; + } + } + + return { + value: result, + lossy: lossy + }; +} +/** + * Reads an arbitrary unsigned int from a buffer. + */ + + +function readUInt(buffer) { + var length = buffer.length; + var result = 0; + var lossy = false; // Note: See above in re bit manipulation. + + if (length < 7) { + // Common case which can't possibly be lossy (see above). + for (var i = length - 1; i >= 0; i--) { + result = result * 0x100 + buffer[i]; + } + } else { + for (var _i2 = length - 1; _i2 >= 0; _i2--) { + var one = buffer[_i2]; + result *= 0x100; + + if (isLossyToAdd(result, one)) { + lossy = true; + } + + result += one; + } + } + + return { + value: result, + lossy: lossy + }; +} +/** + * Writes a little-endian 64-bit signed int into a buffer. + */ + + +function writeInt64(value, buffer) { + if (value < MIN_EXACT_INT64 || value > MAX_EXACT_INT64) { + throw new Error("Value out of range."); + } + + if (value < 0) { + value += BIT_64; + } + + writeUInt64(value, buffer); +} +/** + * Writes a little-endian 64-bit unsigned int into a buffer. + */ + + +function writeUInt64(value, buffer) { + if (value < 0 || value > MAX_EXACT_UINT64) { + throw new Error("Value out of range."); + } + + var lowWord = value % BIT_32; + var highWord = Math.floor(value / BIT_32); + buffer.writeUInt32LE(lowWord, 0); + buffer.writeUInt32LE(highWord, 4); +} + +/***/ }), + +/***/ 20942: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.decodeInt64 = decodeInt64; +exports.decodeUInt64 = decodeUInt64; +exports.decodeInt32 = decodeInt32; +exports.decodeUInt32 = decodeUInt32; +exports.encodeU32 = encodeU32; +exports.encodeI32 = encodeI32; +exports.encodeI64 = encodeI64; +exports.MAX_NUMBER_OF_BYTE_U64 = exports.MAX_NUMBER_OF_BYTE_U32 = void 0; + +var _leb = _interopRequireDefault(__webpack_require__(39210)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * According to https://webassembly.github.io/spec/core/binary/values.html#binary-int + * max = ceil(32/7) + */ +var MAX_NUMBER_OF_BYTE_U32 = 5; +/** + * According to https://webassembly.github.io/spec/core/binary/values.html#binary-int + * max = ceil(64/7) + */ + +exports.MAX_NUMBER_OF_BYTE_U32 = MAX_NUMBER_OF_BYTE_U32; +var MAX_NUMBER_OF_BYTE_U64 = 10; +exports.MAX_NUMBER_OF_BYTE_U64 = MAX_NUMBER_OF_BYTE_U64; + +function decodeInt64(encodedBuffer, index) { + return _leb.default.decodeInt64(encodedBuffer, index); +} + +function decodeUInt64(encodedBuffer, index) { + return _leb.default.decodeUInt64(encodedBuffer, index); +} + +function decodeInt32(encodedBuffer, index) { + return _leb.default.decodeInt32(encodedBuffer, index); +} + +function decodeUInt32(encodedBuffer, index) { + return _leb.default.decodeUInt32(encodedBuffer, index); +} + +function encodeU32(v) { + return _leb.default.encodeUInt32(v); +} + +function encodeI32(v) { + return _leb.default.encodeInt32(v); +} + +function encodeI64(v) { + return _leb.default.encodeInt64(v); +} + +/***/ }), + +/***/ 39210: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +// Copyright 2012 The Obvious Corporation. + +/* + * leb: LEB128 utilities. + */ + +/* + * Modules used + */ + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _long = _interopRequireDefault(__webpack_require__(77960)); + +var bits = _interopRequireWildcard(__webpack_require__(83156)); + +var bufs = _interopRequireWildcard(__webpack_require__(84341)); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* + * Module variables + */ + +/** The minimum possible 32-bit signed int. */ +var MIN_INT32 = -0x80000000; +/** The maximum possible 32-bit signed int. */ + +var MAX_INT32 = 0x7fffffff; +/** The maximum possible 32-bit unsigned int. */ + +var MAX_UINT32 = 0xffffffff; +/** The minimum possible 64-bit signed int. */ +// const MIN_INT64 = -0x8000000000000000; + +/** + * The maximum possible 64-bit signed int that is representable as a + * JavaScript number. + */ +// const MAX_INT64 = 0x7ffffffffffffc00; + +/** + * The maximum possible 64-bit unsigned int that is representable as a + * JavaScript number. + */ +// const MAX_UINT64 = 0xfffffffffffff800; + +/* + * Helper functions + */ + +/** + * Determines the number of bits required to encode the number + * represented in the given buffer as a signed value. The buffer is + * taken to represent a signed number in little-endian form. + * + * The number of bits to encode is the (zero-based) bit number of the + * highest-order non-sign-matching bit, plus two. For example: + * + * 11111011 01110101 + * high low + * + * The sign bit here is 1 (that is, it's a negative number). The highest + * bit number that doesn't match the sign is bit #10 (where the lowest-order + * bit is bit #0). So, we have to encode at least 12 bits total. + * + * As a special degenerate case, the numbers 0 and -1 each require just one bit. + */ + +function signedBitCount(buffer) { + return bits.highOrder(bits.getSign(buffer) ^ 1, buffer) + 2; +} +/** + * Determines the number of bits required to encode the number + * represented in the given buffer as an unsigned value. The buffer is + * taken to represent an unsigned number in little-endian form. + * + * The number of bits to encode is the (zero-based) bit number of the + * highest-order 1 bit, plus one. For example: + * + * 00011000 01010011 + * high low + * + * The highest-order 1 bit here is bit #12 (where the lowest-order bit + * is bit #0). So, we have to encode at least 13 bits total. + * + * As a special degenerate case, the number 0 requires 1 bit. + */ + + +function unsignedBitCount(buffer) { + var result = bits.highOrder(1, buffer) + 1; + return result ? result : 1; +} +/** + * Common encoder for both signed and unsigned ints. This takes a + * bigint-ish buffer, returning an LEB128-encoded buffer. + */ + + +function encodeBufferCommon(buffer, signed) { + var signBit; + var bitCount; + + if (signed) { + signBit = bits.getSign(buffer); + bitCount = signedBitCount(buffer); + } else { + signBit = 0; + bitCount = unsignedBitCount(buffer); + } + + var byteCount = Math.ceil(bitCount / 7); + var result = bufs.alloc(byteCount); + + for (var i = 0; i < byteCount; i++) { + var payload = bits.extract(buffer, i * 7, 7, signBit); + result[i] = payload | 0x80; + } // Mask off the top bit of the last byte, to indicate the end of the + // encoding. + + + result[byteCount - 1] &= 0x7f; + return result; +} +/** + * Gets the byte-length of the value encoded in the given buffer at + * the given index. + */ + + +function encodedLength(encodedBuffer, index) { + var result = 0; + + while (encodedBuffer[index + result] >= 0x80) { + result++; + } + + result++; // to account for the last byte + + if (index + result > encodedBuffer.length) {// FIXME(sven): seems to cause false positives + // throw new Error("integer representation too long"); + } + + return result; +} +/** + * Common decoder for both signed and unsigned ints. This takes an + * LEB128-encoded buffer, returning a bigint-ish buffer. + */ + + +function decodeBufferCommon(encodedBuffer, index, signed) { + index = index === undefined ? 0 : index; + var length = encodedLength(encodedBuffer, index); + var bitLength = length * 7; + var byteLength = Math.ceil(bitLength / 8); + var result = bufs.alloc(byteLength); + var outIndex = 0; + + while (length > 0) { + bits.inject(result, outIndex, 7, encodedBuffer[index]); + outIndex += 7; + index++; + length--; + } + + var signBit; + var signByte; + + if (signed) { + // Sign-extend the last byte. + var lastByte = result[byteLength - 1]; + var endBit = outIndex % 8; + + if (endBit !== 0) { + var shift = 32 - endBit; // 32 because JS bit ops work on 32-bit ints. + + lastByte = result[byteLength - 1] = lastByte << shift >> shift & 0xff; + } + + signBit = lastByte >> 7; + signByte = signBit * 0xff; + } else { + signBit = 0; + signByte = 0; + } // Slice off any superfluous bytes, that is, ones that add no meaningful + // bits (because the value would be the same if they were removed). + + + while (byteLength > 1 && result[byteLength - 1] === signByte && (!signed || result[byteLength - 2] >> 7 === signBit)) { + byteLength--; + } + + result = bufs.resize(result, byteLength); + return { + value: result, + nextIndex: index + }; +} +/* + * Exported bindings + */ + + +function encodeIntBuffer(buffer) { + return encodeBufferCommon(buffer, true); +} + +function decodeIntBuffer(encodedBuffer, index) { + return decodeBufferCommon(encodedBuffer, index, true); +} + +function encodeInt32(num) { + var buf = bufs.alloc(4); + buf.writeInt32LE(num, 0); + var result = encodeIntBuffer(buf); + bufs.free(buf); + return result; +} + +function decodeInt32(encodedBuffer, index) { + var result = decodeIntBuffer(encodedBuffer, index); + var parsed = bufs.readInt(result.value); + var value = parsed.value; + bufs.free(result.value); + + if (value < MIN_INT32 || value > MAX_INT32) { + throw new Error("integer too large"); + } + + return { + value: value, + nextIndex: result.nextIndex + }; +} + +function encodeInt64(num) { + var buf = bufs.alloc(8); + bufs.writeInt64(num, buf); + var result = encodeIntBuffer(buf); + bufs.free(buf); + return result; +} + +function decodeInt64(encodedBuffer, index) { + var result = decodeIntBuffer(encodedBuffer, index); + + var value = _long.default.fromBytesLE(result.value, false); + + bufs.free(result.value); + return { + value: value, + nextIndex: result.nextIndex, + lossy: false + }; +} + +function encodeUIntBuffer(buffer) { + return encodeBufferCommon(buffer, false); +} + +function decodeUIntBuffer(encodedBuffer, index) { + return decodeBufferCommon(encodedBuffer, index, false); +} + +function encodeUInt32(num) { + var buf = bufs.alloc(4); + buf.writeUInt32LE(num, 0); + var result = encodeUIntBuffer(buf); + bufs.free(buf); + return result; +} + +function decodeUInt32(encodedBuffer, index) { + var result = decodeUIntBuffer(encodedBuffer, index); + var parsed = bufs.readUInt(result.value); + var value = parsed.value; + bufs.free(result.value); + + if (value > MAX_UINT32) { + throw new Error("integer too large"); + } + + return { + value: value, + nextIndex: result.nextIndex + }; +} + +function encodeUInt64(num) { + var buf = bufs.alloc(8); + bufs.writeUInt64(num, buf); + var result = encodeUIntBuffer(buf); + bufs.free(buf); + return result; +} + +function decodeUInt64(encodedBuffer, index) { + var result = decodeUIntBuffer(encodedBuffer, index); + + var value = _long.default.fromBytesLE(result.value, true); + + bufs.free(result.value); + return { + value: value, + nextIndex: result.nextIndex, + lossy: false + }; +} + +var _default = { + decodeInt32: decodeInt32, + decodeInt64: decodeInt64, + decodeIntBuffer: decodeIntBuffer, + decodeUInt32: decodeUInt32, + decodeUInt64: decodeUInt64, + decodeUIntBuffer: decodeUIntBuffer, + encodeInt32: encodeInt32, + encodeInt64: encodeInt64, + encodeIntBuffer: encodeIntBuffer, + encodeUInt32: encodeUInt32, + encodeUInt64: encodeUInt64, + encodeUIntBuffer: encodeUIntBuffer +}; +exports.default = _default; + +/***/ }), + +/***/ 63202: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.decode = decode; + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); } + +function con(b) { + if ((b & 0xc0) === 0x80) { + return b & 0x3f; + } else { + throw new Error("invalid UTF-8 encoding"); + } +} + +function code(min, n) { + if (n < min || 0xd800 <= n && n < 0xe000 || n >= 0x10000) { + throw new Error("invalid UTF-8 encoding"); + } else { + return n; + } +} + +function decode(bytes) { + return _decode(bytes).map(function (x) { + return String.fromCharCode(x); + }).join(""); +} + +function _decode(bytes) { + if (bytes.length === 0) { + return []; + } + /** + * 1 byte + */ + + + { + var _bytes = _toArray(bytes), + b1 = _bytes[0], + bs = _bytes.slice(1); + + if (b1 < 0x80) { + return [code(0x0, b1)].concat(_toConsumableArray(_decode(bs))); + } + + if (b1 < 0xc0) { + throw new Error("invalid UTF-8 encoding"); + } + } + /** + * 2 bytes + */ + + { + var _bytes2 = _toArray(bytes), + _b = _bytes2[0], + b2 = _bytes2[1], + _bs = _bytes2.slice(2); + + if (_b < 0xe0) { + return [code(0x80, ((_b & 0x1f) << 6) + con(b2))].concat(_toConsumableArray(_decode(_bs))); + } + } + /** + * 3 bytes + */ + + { + var _bytes3 = _toArray(bytes), + _b2 = _bytes3[0], + _b3 = _bytes3[1], + b3 = _bytes3[2], + _bs2 = _bytes3.slice(3); + + if (_b2 < 0xf0) { + return [code(0x800, ((_b2 & 0x0f) << 12) + (con(_b3) << 6) + con(b3))].concat(_toConsumableArray(_decode(_bs2))); + } + } + /** + * 4 bytes + */ + + { + var _bytes4 = _toArray(bytes), + _b4 = _bytes4[0], + _b5 = _bytes4[1], + _b6 = _bytes4[2], + b4 = _bytes4[3], + _bs3 = _bytes4.slice(4); + + if (_b4 < 0xf8) { + return [code(0x10000, (((_b4 & 0x07) << 18) + con(_b5) << 12) + (con(_b6) << 6) + con(b4))].concat(_toConsumableArray(_decode(_bs3))); + } + } + throw new Error("invalid UTF-8 encoding"); +} + +/***/ }), + +/***/ 71812: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.encode = encode; + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); } + +function con(n) { + return 0x80 | n & 0x3f; +} + +function encode(str) { + var arr = str.split("").map(function (x) { + return x.charCodeAt(0); + }); + return _encode(arr); +} + +function _encode(arr) { + if (arr.length === 0) { + return []; + } + + var _arr = _toArray(arr), + n = _arr[0], + ns = _arr.slice(1); + + if (n < 0) { + throw new Error("utf8"); + } + + if (n < 0x80) { + return [n].concat(_toConsumableArray(_encode(ns))); + } + + if (n < 0x800) { + return [0xc0 | n >>> 6, con(n)].concat(_toConsumableArray(_encode(ns))); + } + + if (n < 0x10000) { + return [0xe0 | n >>> 12, con(n >>> 6), con(n)].concat(_toConsumableArray(_encode(ns))); + } + + if (n < 0x110000) { + return [0xf0 | n >>> 18, con(n >>> 12), con(n >>> 6), con(n)].concat(_toConsumableArray(_encode(ns))); + } + + throw new Error("utf8"); +} + +/***/ }), + +/***/ 17715: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "decode", ({ + enumerable: true, + get: function get() { + return _decoder.decode; + } +})); +Object.defineProperty(exports, "encode", ({ + enumerable: true, + get: function get() { + return _encoder.encode; + } +})); + +var _decoder = __webpack_require__(63202); + +var _encoder = __webpack_require__(71812); + +/***/ }), + +/***/ 56550: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.applyOperations = applyOperations; + +var _wasmGen = __webpack_require__(62394); + +var _encoder = __webpack_require__(94261); + +var _ast = __webpack_require__(98688); + +var _helperWasmSection = __webpack_require__(37427); + +var _helperBuffer = __webpack_require__(57827); + +var _helperWasmBytecode = __webpack_require__(97527); + +function _sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return _sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } } + +function shiftLocNodeByDelta(node, delta) { + (0, _ast.assertHasLoc)(node); // $FlowIgnore: assertHasLoc ensures that + + node.loc.start.column += delta; // $FlowIgnore: assertHasLoc ensures that + + node.loc.end.column += delta; +} + +function applyUpdate(ast, uint8Buffer, _ref) { + var _ref2 = _slicedToArray(_ref, 2), + oldNode = _ref2[0], + newNode = _ref2[1]; + + var deltaElements = 0; + (0, _ast.assertHasLoc)(oldNode); + var sectionName = (0, _helperWasmBytecode.getSectionForNode)(newNode); + var replacementByteArray = (0, _wasmGen.encodeNode)(newNode); + /** + * Replace new node as bytes + */ + + uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, // $FlowIgnore: assertHasLoc ensures that + oldNode.loc.start.column, // $FlowIgnore: assertHasLoc ensures that + oldNode.loc.end.column, replacementByteArray); + /** + * Update function body size if needed + */ + + if (sectionName === "code") { + // Find the parent func + (0, _ast.traverse)(ast, { + Func: function Func(_ref3) { + var node = _ref3.node; + var funcHasThisIntr = node.body.find(function (n) { + return n === newNode; + }) !== undefined; // Update func's body size if needed + + if (funcHasThisIntr === true) { + // These are the old functions locations informations + (0, _ast.assertHasLoc)(node); + var oldNodeSize = (0, _wasmGen.encodeNode)(oldNode).length; + var bodySizeDeltaBytes = replacementByteArray.length - oldNodeSize; + + if (bodySizeDeltaBytes !== 0) { + var newValue = node.metadata.bodySize + bodySizeDeltaBytes; + var newByteArray = (0, _encoder.encodeU32)(newValue); // function body size byte + // FIXME(sven): only handles one byte u32 + + var start = node.loc.start.column; + var end = start + 1; + uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start, end, newByteArray); + } + } + } + }); + } + /** + * Update section size + */ + + + var deltaBytes = replacementByteArray.length - ( // $FlowIgnore: assertHasLoc ensures that + oldNode.loc.end.column - oldNode.loc.start.column); // Init location informations + + newNode.loc = { + start: { + line: -1, + column: -1 + }, + end: { + line: -1, + column: -1 + } + }; // Update new node end position + // $FlowIgnore: assertHasLoc ensures that + + newNode.loc.start.column = oldNode.loc.start.column; // $FlowIgnore: assertHasLoc ensures that + + newNode.loc.end.column = // $FlowIgnore: assertHasLoc ensures that + oldNode.loc.start.column + replacementByteArray.length; + return { + uint8Buffer: uint8Buffer, + deltaBytes: deltaBytes, + deltaElements: deltaElements + }; +} + +function applyDelete(ast, uint8Buffer, node) { + var deltaElements = -1; // since we removed an element + + (0, _ast.assertHasLoc)(node); + var sectionName = (0, _helperWasmBytecode.getSectionForNode)(node); + + if (sectionName === "start") { + var sectionMetadata = (0, _ast.getSectionMetadata)(ast, "start"); + /** + * The start section only contains one element, + * we need to remove the whole section + */ + + uint8Buffer = (0, _helperWasmSection.removeSections)(ast, uint8Buffer, "start"); + + var _deltaBytes = -(sectionMetadata.size.value + 1); + /* section id */ + + + return { + uint8Buffer: uint8Buffer, + deltaBytes: _deltaBytes, + deltaElements: deltaElements + }; + } // replacement is nothing + + + var replacement = []; + uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, // $FlowIgnore: assertHasLoc ensures that + node.loc.start.column, // $FlowIgnore: assertHasLoc ensures that + node.loc.end.column, replacement); + /** + * Update section + */ + // $FlowIgnore: assertHasLoc ensures that + + var deltaBytes = -(node.loc.end.column - node.loc.start.column); + return { + uint8Buffer: uint8Buffer, + deltaBytes: deltaBytes, + deltaElements: deltaElements + }; +} + +function applyAdd(ast, uint8Buffer, node) { + var deltaElements = +1; // since we added an element + + var sectionName = (0, _helperWasmBytecode.getSectionForNode)(node); + var sectionMetadata = (0, _ast.getSectionMetadata)(ast, sectionName); // Section doesn't exists, we create an empty one + + if (typeof sectionMetadata === "undefined") { + var res = (0, _helperWasmSection.createEmptySection)(ast, uint8Buffer, sectionName); + uint8Buffer = res.uint8Buffer; + sectionMetadata = res.sectionMetadata; + } + /** + * check that the expressions were ended + */ + + + if ((0, _ast.isFunc)(node)) { + // $FlowIgnore + var body = node.body; + + if (body.length === 0 || body[body.length - 1].id !== "end") { + throw new Error("expressions must be ended"); + } + } + + if ((0, _ast.isGlobal)(node)) { + // $FlowIgnore + var body = node.init; + + if (body.length === 0 || body[body.length - 1].id !== "end") { + throw new Error("expressions must be ended"); + } + } + /** + * Add nodes + */ + + + var newByteArray = (0, _wasmGen.encodeNode)(node); // The size of the section doesn't include the storage of the size itself + // we need to manually add it here + + var start = (0, _ast.getEndOfSection)(sectionMetadata); + var end = start; + /** + * Update section + */ + + var deltaBytes = newByteArray.length; + uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start, end, newByteArray); + node.loc = { + start: { + line: -1, + column: start + }, + end: { + line: -1, + column: start + deltaBytes + } + }; // for func add the additional metadata in the AST + + if (node.type === "Func") { + // the size is the first byte + // FIXME(sven): handle LEB128 correctly here + var bodySize = newByteArray[0]; + node.metadata = { + bodySize: bodySize + }; + } + + if (node.type !== "IndexInFuncSection") { + (0, _ast.orderedInsertNode)(ast.body[0], node); + } + + return { + uint8Buffer: uint8Buffer, + deltaBytes: deltaBytes, + deltaElements: deltaElements + }; +} + +function applyOperations(ast, uint8Buffer, ops) { + ops.forEach(function (op) { + var state; + var sectionName; + + switch (op.kind) { + case "update": + state = applyUpdate(ast, uint8Buffer, [op.oldNode, op.node]); + sectionName = (0, _helperWasmBytecode.getSectionForNode)(op.node); + break; + + case "delete": + state = applyDelete(ast, uint8Buffer, op.node); + sectionName = (0, _helperWasmBytecode.getSectionForNode)(op.node); + break; + + case "add": + state = applyAdd(ast, uint8Buffer, op.node); + sectionName = (0, _helperWasmBytecode.getSectionForNode)(op.node); + break; + + default: + throw new Error("Unknown operation"); + } + /** + * Resize section vec size. + * If the length of the LEB-encoded size changes, this can change + * the byte length of the section and the offset for nodes in the + * section. So we do this first before resizing section byte size + * or shifting following operations' nodes. + */ + + + if (state.deltaElements !== 0 && sectionName !== "start") { + var oldBufferLength = state.uint8Buffer.length; + state.uint8Buffer = (0, _helperWasmSection.resizeSectionVecSize)(ast, state.uint8Buffer, sectionName, state.deltaElements); // Infer bytes added/removed by comparing buffer lengths + + state.deltaBytes += state.uint8Buffer.length - oldBufferLength; + } + /** + * Resize section byte size. + * If the length of the LEB-encoded size changes, this can change + * the offset for nodes in the section. So we do this before + * shifting following operations' nodes. + */ + + + if (state.deltaBytes !== 0 && sectionName !== "start") { + var _oldBufferLength = state.uint8Buffer.length; + state.uint8Buffer = (0, _helperWasmSection.resizeSectionByteSize)(ast, state.uint8Buffer, sectionName, state.deltaBytes); // Infer bytes added/removed by comparing buffer lengths + + state.deltaBytes += state.uint8Buffer.length - _oldBufferLength; + } + /** + * Shift following operation's nodes + */ + + + if (state.deltaBytes !== 0) { + ops.forEach(function (op) { + // We don't need to handle add ops, they are positioning independent + switch (op.kind) { + case "update": + shiftLocNodeByDelta(op.oldNode, state.deltaBytes); + break; + + case "delete": + shiftLocNodeByDelta(op.node, state.deltaBytes); + break; + } + }); + } + + uint8Buffer = state.uint8Buffer; + }); + return uint8Buffer; +} + +/***/ }), + +/***/ 65584: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.edit = edit; +exports.editWithAST = editWithAST; +exports.add = add; +exports.addWithAST = addWithAST; + +var _wasmParser = __webpack_require__(8062); + +var _ast = __webpack_require__(98688); + +var _clone = __webpack_require__(95373); + +var _wasmOpt = __webpack_require__(46421); + +var _helperWasmBytecode = _interopRequireWildcard(__webpack_require__(97527)); + +var _apply = __webpack_require__(56550); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function hashNode(node) { + return JSON.stringify(node); +} + +function preprocess(ab) { + var optBin = (0, _wasmOpt.shrinkPaddedLEB128)(new Uint8Array(ab)); + return optBin.buffer; +} + +function sortBySectionOrder(nodes) { + var originalOrder = new Map(); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _node = _step.value; + originalOrder.set(_node, originalOrder.size); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + nodes.sort(function (a, b) { + var sectionA = (0, _helperWasmBytecode.getSectionForNode)(a); + var sectionB = (0, _helperWasmBytecode.getSectionForNode)(b); + var aId = _helperWasmBytecode.default.sections[sectionA]; + var bId = _helperWasmBytecode.default.sections[sectionB]; + + if (typeof aId !== "number" || typeof bId !== "number") { + throw new Error("Section id not found"); + } + + if (aId === bId) { + // $FlowIgnore originalOrder is filled for all nodes + return originalOrder.get(a) - originalOrder.get(b); + } + + return aId - bId; + }); +} + +function edit(ab, visitors) { + ab = preprocess(ab); + var ast = (0, _wasmParser.decode)(ab); + return editWithAST(ast, ab, visitors); +} + +function editWithAST(ast, ab, visitors) { + var operations = []; + var uint8Buffer = new Uint8Array(ab); + var nodeBefore; + + function before(type, path) { + nodeBefore = (0, _clone.cloneNode)(path.node); + } + + function after(type, path) { + if (path.node._deleted === true) { + operations.push({ + kind: "delete", + node: path.node + }); // $FlowIgnore + } else if (hashNode(nodeBefore) !== hashNode(path.node)) { + operations.push({ + kind: "update", + oldNode: nodeBefore, + node: path.node + }); + } + } + + (0, _ast.traverse)(ast, visitors, before, after); + uint8Buffer = (0, _apply.applyOperations)(ast, uint8Buffer, operations); + return uint8Buffer.buffer; +} + +function add(ab, newNodes) { + ab = preprocess(ab); + var ast = (0, _wasmParser.decode)(ab); + return addWithAST(ast, ab, newNodes); +} + +function addWithAST(ast, ab, newNodes) { + // Sort nodes by insertion order + sortBySectionOrder(newNodes); + var uint8Buffer = new Uint8Array(ab); // Map node into operations + + var operations = newNodes.map(function (n) { + return { + kind: "add", + node: n + }; + }); + uint8Buffer = (0, _apply.applyOperations)(ast, uint8Buffer, operations); + return uint8Buffer.buffer; +} + +/***/ }), + +/***/ 94261: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.encodeVersion = encodeVersion; +exports.encodeHeader = encodeHeader; +exports.encodeU32 = encodeU32; +exports.encodeI32 = encodeI32; +exports.encodeI64 = encodeI64; +exports.encodeVec = encodeVec; +exports.encodeValtype = encodeValtype; +exports.encodeMutability = encodeMutability; +exports.encodeUTF8Vec = encodeUTF8Vec; +exports.encodeLimits = encodeLimits; +exports.encodeModuleImport = encodeModuleImport; +exports.encodeSectionMetadata = encodeSectionMetadata; +exports.encodeCallInstruction = encodeCallInstruction; +exports.encodeCallIndirectInstruction = encodeCallIndirectInstruction; +exports.encodeModuleExport = encodeModuleExport; +exports.encodeTypeInstruction = encodeTypeInstruction; +exports.encodeInstr = encodeInstr; +exports.encodeStringLiteral = encodeStringLiteral; +exports.encodeGlobal = encodeGlobal; +exports.encodeFuncBody = encodeFuncBody; +exports.encodeIndexInFuncSection = encodeIndexInFuncSection; +exports.encodeElem = encodeElem; + +var leb = _interopRequireWildcard(__webpack_require__(20942)); + +var ieee754 = _interopRequireWildcard(__webpack_require__(23408)); + +var utf8 = _interopRequireWildcard(__webpack_require__(17715)); + +var _helperWasmBytecode = _interopRequireDefault(__webpack_require__(97527)); + +var _index = __webpack_require__(62394); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function assertNotIdentifierNode(n) { + if (n.type === "Identifier") { + throw new Error("Unsupported node Identifier"); + } +} + +function encodeVersion(v) { + var bytes = _helperWasmBytecode.default.moduleVersion; + bytes[0] = v; + return bytes; +} + +function encodeHeader() { + return _helperWasmBytecode.default.magicModuleHeader; +} + +function encodeU32(v) { + var uint8view = new Uint8Array(leb.encodeU32(v)); + + var array = _toConsumableArray(uint8view); + + return array; +} + +function encodeI32(v) { + var uint8view = new Uint8Array(leb.encodeI32(v)); + + var array = _toConsumableArray(uint8view); + + return array; +} + +function encodeI64(v) { + var uint8view = new Uint8Array(leb.encodeI64(v)); + + var array = _toConsumableArray(uint8view); + + return array; +} + +function encodeVec(elements) { + var size = encodeU32(elements.length); + return _toConsumableArray(size).concat(_toConsumableArray(elements)); +} + +function encodeValtype(v) { + var byte = _helperWasmBytecode.default.valtypesByString[v]; + + if (typeof byte === "undefined") { + throw new Error("Unknown valtype: " + v); + } + + return parseInt(byte, 10); +} + +function encodeMutability(v) { + var byte = _helperWasmBytecode.default.globalTypesByString[v]; + + if (typeof byte === "undefined") { + throw new Error("Unknown mutability: " + v); + } + + return parseInt(byte, 10); +} + +function encodeUTF8Vec(str) { + return encodeVec(utf8.encode(str)); +} + +function encodeLimits(n) { + var out = []; + + if (typeof n.max === "number") { + out.push(0x01); + out.push.apply(out, _toConsumableArray(encodeU32(n.min))); // $FlowIgnore: ensured by the typeof + + out.push.apply(out, _toConsumableArray(encodeU32(n.max))); + } else { + out.push(0x00); + out.push.apply(out, _toConsumableArray(encodeU32(n.min))); + } + + return out; +} + +function encodeModuleImport(n) { + var out = []; + out.push.apply(out, _toConsumableArray(encodeUTF8Vec(n.module))); + out.push.apply(out, _toConsumableArray(encodeUTF8Vec(n.name))); + + switch (n.descr.type) { + case "GlobalType": + { + out.push(0x03); // $FlowIgnore: GlobalType ensure that these props exists + + out.push(encodeValtype(n.descr.valtype)); // $FlowIgnore: GlobalType ensure that these props exists + + out.push(encodeMutability(n.descr.mutability)); + break; + } + + case "Memory": + { + out.push(0x02); // $FlowIgnore + + out.push.apply(out, _toConsumableArray(encodeLimits(n.descr.limits))); + break; + } + + case "Table": + { + out.push(0x01); + out.push(0x70); // element type + // $FlowIgnore + + out.push.apply(out, _toConsumableArray(encodeLimits(n.descr.limits))); + break; + } + + case "FuncImportDescr": + { + out.push(0x00); // $FlowIgnore + + assertNotIdentifierNode(n.descr.id); // $FlowIgnore + + out.push.apply(out, _toConsumableArray(encodeU32(n.descr.id.value))); + break; + } + + default: + throw new Error("Unsupport operation: encode module import of type: " + n.descr.type); + } + + return out; +} + +function encodeSectionMetadata(n) { + var out = []; + var sectionId = _helperWasmBytecode.default.sections[n.section]; + + if (typeof sectionId === "undefined") { + throw new Error("Unknown section: " + n.section); + } + + if (n.section === "start") { + /** + * This is not implemented yet because it's a special case which + * doesn't have a vector in its section. + */ + throw new Error("Unsupported section encoding of type start"); + } + + out.push(sectionId); + out.push.apply(out, _toConsumableArray(encodeU32(n.size.value))); + out.push.apply(out, _toConsumableArray(encodeU32(n.vectorOfSize.value))); + return out; +} + +function encodeCallInstruction(n) { + var out = []; + assertNotIdentifierNode(n.index); + out.push(0x10); // $FlowIgnore + + out.push.apply(out, _toConsumableArray(encodeU32(n.index.value))); + return out; +} + +function encodeCallIndirectInstruction(n) { + var out = []; // $FlowIgnore + + assertNotIdentifierNode(n.index); + out.push(0x11); // $FlowIgnore + + out.push.apply(out, _toConsumableArray(encodeU32(n.index.value))); // add a reserved byte + + out.push(0x00); + return out; +} + +function encodeModuleExport(n) { + var out = []; + assertNotIdentifierNode(n.descr.id); + var exportTypeByteString = _helperWasmBytecode.default.exportTypesByName[n.descr.exportType]; + + if (typeof exportTypeByteString === "undefined") { + throw new Error("Unknown export of type: " + n.descr.exportType); + } + + var exportTypeByte = parseInt(exportTypeByteString, 10); + out.push.apply(out, _toConsumableArray(encodeUTF8Vec(n.name))); + out.push(exportTypeByte); // $FlowIgnore + + out.push.apply(out, _toConsumableArray(encodeU32(n.descr.id.value))); + return out; +} + +function encodeTypeInstruction(n) { + var out = [0x60]; + var params = n.functype.params.map(function (x) { + return x.valtype; + }).map(encodeValtype); + var results = n.functype.results.map(encodeValtype); + out.push.apply(out, _toConsumableArray(encodeVec(params))); + out.push.apply(out, _toConsumableArray(encodeVec(results))); + return out; +} + +function encodeInstr(n) { + var out = []; + var instructionName = n.id; + + if (typeof n.object === "string") { + instructionName = "".concat(n.object, ".").concat(String(n.id)); + } + + var byteString = _helperWasmBytecode.default.symbolsByName[instructionName]; + + if (typeof byteString === "undefined") { + throw new Error("encodeInstr: unknown instruction " + JSON.stringify(instructionName)); + } + + var byte = parseInt(byteString, 10); + out.push(byte); + + if (n.args) { + n.args.forEach(function (arg) { + var encoder = encodeU32; // find correct encoder + + if (n.object === "i32") { + encoder = encodeI32; + } + + if (n.object === "i64") { + encoder = encodeI64; + } + + if (n.object === "f32") { + encoder = ieee754.encodeF32; + } + + if (n.object === "f64") { + encoder = ieee754.encodeF64; + } + + if (arg.type === "NumberLiteral" || arg.type === "FloatLiteral" || arg.type === "LongNumberLiteral") { + // $FlowIgnore + out.push.apply(out, _toConsumableArray(encoder(arg.value))); + } else { + throw new Error("Unsupported instruction argument encoding " + JSON.stringify(arg.type)); + } + }); + } + + return out; +} + +function encodeExpr(instrs) { + var out = []; + instrs.forEach(function (instr) { + // $FlowIgnore + var n = (0, _index.encodeNode)(instr); + out.push.apply(out, _toConsumableArray(n)); + }); + return out; +} + +function encodeStringLiteral(n) { + return encodeUTF8Vec(n.value); +} + +function encodeGlobal(n) { + var out = []; + var _n$globalType = n.globalType, + valtype = _n$globalType.valtype, + mutability = _n$globalType.mutability; + out.push(encodeValtype(valtype)); + out.push(encodeMutability(mutability)); + out.push.apply(out, _toConsumableArray(encodeExpr(n.init))); + return out; +} + +function encodeFuncBody(n) { + var out = []; + out.push(-1); // temporary function body size + // FIXME(sven): get the func locals? + + var localBytes = encodeVec([]); + out.push.apply(out, _toConsumableArray(localBytes)); + var funcBodyBytes = encodeExpr(n.body); + out[0] = funcBodyBytes.length + localBytes.length; + out.push.apply(out, _toConsumableArray(funcBodyBytes)); + return out; +} + +function encodeIndexInFuncSection(n) { + assertNotIdentifierNode(n.index); // $FlowIgnore + + return encodeU32(n.index.value); +} + +function encodeElem(n) { + var out = []; + assertNotIdentifierNode(n.table); // $FlowIgnore + + out.push.apply(out, _toConsumableArray(encodeU32(n.table.value))); + out.push.apply(out, _toConsumableArray(encodeExpr(n.offset))); // $FlowIgnore + + var funcs = n.funcs.reduce(function (acc, x) { + return _toConsumableArray(acc).concat(_toConsumableArray(encodeU32(x.value))); + }, []); + out.push.apply(out, _toConsumableArray(encodeVec(funcs))); + return out; +} + +/***/ }), + +/***/ 62394: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.encodeNode = encodeNode; +exports.encodeU32 = void 0; + +var encoder = _interopRequireWildcard(__webpack_require__(94261)); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function encodeNode(n) { + switch (n.type) { + case "ModuleImport": + // $FlowIgnore: ModuleImport ensure that the node is well formated + return encoder.encodeModuleImport(n); + + case "SectionMetadata": + // $FlowIgnore: SectionMetadata ensure that the node is well formated + return encoder.encodeSectionMetadata(n); + + case "CallInstruction": + // $FlowIgnore: SectionMetadata ensure that the node is well formated + return encoder.encodeCallInstruction(n); + + case "CallIndirectInstruction": + // $FlowIgnore: SectionMetadata ensure that the node is well formated + return encoder.encodeCallIndirectInstruction(n); + + case "TypeInstruction": + return encoder.encodeTypeInstruction(n); + + case "Instr": + // $FlowIgnore + return encoder.encodeInstr(n); + + case "ModuleExport": + // $FlowIgnore: SectionMetadata ensure that the node is well formated + return encoder.encodeModuleExport(n); + + case "Global": + // $FlowIgnore + return encoder.encodeGlobal(n); + + case "Func": + return encoder.encodeFuncBody(n); + + case "IndexInFuncSection": + return encoder.encodeIndexInFuncSection(n); + + case "StringLiteral": + return encoder.encodeStringLiteral(n); + + case "Elem": + return encoder.encodeElem(n); + + default: + throw new Error("Unsupported encoding for node of type: " + JSON.stringify(n.type)); + } +} + +var encodeU32 = encoder.encodeU32; +exports.encodeU32 = encodeU32; + +/***/ }), + +/***/ 46421: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.shrinkPaddedLEB128 = shrinkPaddedLEB128; + +var _wasmParser = __webpack_require__(8062); + +var _leb = __webpack_require__(15829); + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var OptimizerError = +/*#__PURE__*/ +function (_Error) { + _inherits(OptimizerError, _Error); + + function OptimizerError(name, initalError) { + var _this; + + _classCallCheck(this, OptimizerError); + + _this = _possibleConstructorReturn(this, (OptimizerError.__proto__ || Object.getPrototypeOf(OptimizerError)).call(this, "Error while optimizing: " + name + ": " + initalError.message)); + _this.stack = initalError.stack; + return _this; + } + + return OptimizerError; +}(Error); + +var decoderOpts = { + ignoreCodeSection: true, + ignoreDataSection: true +}; + +function shrinkPaddedLEB128(uint8Buffer) { + try { + var ast = (0, _wasmParser.decode)(uint8Buffer.buffer, decoderOpts); + return (0, _leb.shrinkPaddedLEB128)(ast, uint8Buffer); + } catch (e) { + throw new OptimizerError("shrinkPaddedLEB128", e); + } +} + +/***/ }), + +/***/ 15829: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.shrinkPaddedLEB128 = shrinkPaddedLEB128; + +var _ast = __webpack_require__(98688); + +var _encoder = __webpack_require__(94261); + +var _helperBuffer = __webpack_require__(57827); + +function shiftFollowingSections(ast, _ref, deltaInSizeEncoding) { + var section = _ref.section; + // Once we hit our section every that is after needs to be shifted by the delta + var encounteredSection = false; + (0, _ast.traverse)(ast, { + SectionMetadata: function SectionMetadata(path) { + if (path.node.section === section) { + encounteredSection = true; + return; + } + + if (encounteredSection === true) { + (0, _ast.shiftSection)(ast, path.node, deltaInSizeEncoding); + } + } + }); +} + +function shrinkPaddedLEB128(ast, uint8Buffer) { + (0, _ast.traverse)(ast, { + SectionMetadata: function SectionMetadata(_ref2) { + var node = _ref2.node; + + /** + * Section size + */ + { + var newu32Encoded = (0, _encoder.encodeU32)(node.size.value); + var newu32EncodedLen = newu32Encoded.length; + var start = node.size.loc.start.column; + var end = node.size.loc.end.column; + var oldu32EncodedLen = end - start; + + if (newu32EncodedLen !== oldu32EncodedLen) { + var deltaInSizeEncoding = oldu32EncodedLen - newu32EncodedLen; + uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start, end, newu32Encoded); + shiftFollowingSections(ast, node, -deltaInSizeEncoding); + } + } + } + }); + return uint8Buffer; +} + +/***/ }), + +/***/ 72856: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.decode = decode; + +var _helperApiError = __webpack_require__(36194); + +var ieee754 = _interopRequireWildcard(__webpack_require__(23408)); + +var utf8 = _interopRequireWildcard(__webpack_require__(17715)); + +var t = _interopRequireWildcard(__webpack_require__(98688)); + +var _leb = __webpack_require__(20942); + +var _helperWasmBytecode = _interopRequireDefault(__webpack_require__(97527)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function toHex(n) { + return "0x" + Number(n).toString(16); +} + +function byteArrayEq(l, r) { + if (l.length !== r.length) { + return false; + } + + for (var i = 0; i < l.length; i++) { + if (l[i] !== r[i]) { + return false; + } + } + + return true; +} + +function decode(ab, opts) { + var buf = new Uint8Array(ab); + var getUniqueName = t.getUniqueNameGenerator(); + var offset = 0; + + function getPosition() { + return { + line: -1, + column: offset + }; + } + + function dump(b, msg) { + if (opts.dump === false) return; + var pad = "\t\t\t\t\t\t\t\t\t\t"; + var str = ""; + + if (b.length < 5) { + str = b.map(toHex).join(" "); + } else { + str = "..."; + } + + console.log(toHex(offset) + ":\t", str, pad, ";", msg); + } + + function dumpSep(msg) { + if (opts.dump === false) return; + console.log(";", msg); + } + /** + * TODO(sven): we can atually use a same structure + * we are adding incrementally new features + */ + + + var state = { + elementsInFuncSection: [], + elementsInExportSection: [], + elementsInCodeSection: [], + + /** + * Decode memory from: + * - Memory section + */ + memoriesInModule: [], + + /** + * Decoded types from: + * - Type section + */ + typesInModule: [], + + /** + * Decoded functions from: + * - Function section + * - Import section + */ + functionsInModule: [], + + /** + * Decoded tables from: + * - Table section + */ + tablesInModule: [], + + /** + * Decoded globals from: + * - Global section + */ + globalsInModule: [] + }; + + function isEOF() { + return offset >= buf.length; + } + + function eatBytes(n) { + offset = offset + n; + } + + function readBytesAtOffset(_offset, numberOfBytes) { + var arr = []; + + for (var i = 0; i < numberOfBytes; i++) { + arr.push(buf[_offset + i]); + } + + return arr; + } + + function readBytes(numberOfBytes) { + return readBytesAtOffset(offset, numberOfBytes); + } + + function readF64() { + var bytes = readBytes(ieee754.NUMBER_OF_BYTE_F64); + var value = ieee754.decodeF64(bytes); + + if (Math.sign(value) * value === Infinity) { + return { + value: Math.sign(value), + inf: true, + nextIndex: ieee754.NUMBER_OF_BYTE_F64 + }; + } + + if (isNaN(value)) { + var sign = bytes[bytes.length - 1] >> 7 ? -1 : 1; + var mantissa = 0; + + for (var i = 0; i < bytes.length - 2; ++i) { + mantissa += bytes[i] * Math.pow(256, i); + } + + mantissa += bytes[bytes.length - 2] % 16 * Math.pow(256, bytes.length - 2); + return { + value: sign * mantissa, + nan: true, + nextIndex: ieee754.NUMBER_OF_BYTE_F64 + }; + } + + return { + value: value, + nextIndex: ieee754.NUMBER_OF_BYTE_F64 + }; + } + + function readF32() { + var bytes = readBytes(ieee754.NUMBER_OF_BYTE_F32); + var value = ieee754.decodeF32(bytes); + + if (Math.sign(value) * value === Infinity) { + return { + value: Math.sign(value), + inf: true, + nextIndex: ieee754.NUMBER_OF_BYTE_F32 + }; + } + + if (isNaN(value)) { + var sign = bytes[bytes.length - 1] >> 7 ? -1 : 1; + var mantissa = 0; + + for (var i = 0; i < bytes.length - 2; ++i) { + mantissa += bytes[i] * Math.pow(256, i); + } + + mantissa += bytes[bytes.length - 2] % 128 * Math.pow(256, bytes.length - 2); + return { + value: sign * mantissa, + nan: true, + nextIndex: ieee754.NUMBER_OF_BYTE_F32 + }; + } + + return { + value: value, + nextIndex: ieee754.NUMBER_OF_BYTE_F32 + }; + } + + function readUTF8String() { + var lenu32 = readU32(); // Don't eat any bytes. Instead, peek ahead of the current offset using + // readBytesAtOffset below. This keeps readUTF8String neutral with respect + // to the current offset, just like the other readX functions. + + var strlen = lenu32.value; + dump([strlen], "string length"); + var bytes = readBytesAtOffset(offset + lenu32.nextIndex, strlen); + var value = utf8.decode(bytes); + return { + value: value, + nextIndex: strlen + lenu32.nextIndex + }; + } + /** + * Decode an unsigned 32bits integer + * + * The length will be handled by the leb librairy, we pass the max number of + * byte. + */ + + + function readU32() { + var bytes = readBytes(_leb.MAX_NUMBER_OF_BYTE_U32); + var buffer = Buffer.from(bytes); + return (0, _leb.decodeUInt32)(buffer); + } + + function readVaruint32() { + // where 32 bits = max 4 bytes + var bytes = readBytes(4); + var buffer = Buffer.from(bytes); + return (0, _leb.decodeUInt32)(buffer); + } + + function readVaruint7() { + // where 7 bits = max 1 bytes + var bytes = readBytes(1); + var buffer = Buffer.from(bytes); + return (0, _leb.decodeUInt32)(buffer); + } + /** + * Decode a signed 32bits interger + */ + + + function read32() { + var bytes = readBytes(_leb.MAX_NUMBER_OF_BYTE_U32); + var buffer = Buffer.from(bytes); + return (0, _leb.decodeInt32)(buffer); + } + /** + * Decode a signed 64bits integer + */ + + + function read64() { + var bytes = readBytes(_leb.MAX_NUMBER_OF_BYTE_U64); + var buffer = Buffer.from(bytes); + return (0, _leb.decodeInt64)(buffer); + } + + function readU64() { + var bytes = readBytes(_leb.MAX_NUMBER_OF_BYTE_U64); + var buffer = Buffer.from(bytes); + return (0, _leb.decodeUInt64)(buffer); + } + + function readByte() { + return readBytes(1)[0]; + } + + function parseModuleHeader() { + if (isEOF() === true || offset + 4 > buf.length) { + throw new Error("unexpected end"); + } + + var header = readBytes(4); + + if (byteArrayEq(_helperWasmBytecode.default.magicModuleHeader, header) === false) { + throw new _helperApiError.CompileError("magic header not detected"); + } + + dump(header, "wasm magic header"); + eatBytes(4); + } + + function parseVersion() { + if (isEOF() === true || offset + 4 > buf.length) { + throw new Error("unexpected end"); + } + + var version = readBytes(4); + + if (byteArrayEq(_helperWasmBytecode.default.moduleVersion, version) === false) { + throw new _helperApiError.CompileError("unknown binary version"); + } + + dump(version, "wasm version"); + eatBytes(4); + } + + function parseVec(cast) { + var u32 = readU32(); + var length = u32.value; + eatBytes(u32.nextIndex); + dump([length], "number"); + + if (length === 0) { + return []; + } + + var elements = []; + + for (var i = 0; i < length; i++) { + var byte = readByte(); + eatBytes(1); + var value = cast(byte); + dump([byte], value); + + if (typeof value === "undefined") { + throw new _helperApiError.CompileError("Internal failure: parseVec could not cast the value"); + } + + elements.push(value); + } + + return elements; + } // Type section + // https://webassembly.github.io/spec/binary/modules.html#binary-typesec + + + function parseTypeSection(numberOfTypes) { + var typeInstructionNodes = []; + dump([numberOfTypes], "num types"); + + for (var i = 0; i < numberOfTypes; i++) { + var _startLoc = getPosition(); + + dumpSep("type " + i); + var type = readByte(); + eatBytes(1); + + if (type == _helperWasmBytecode.default.types.func) { + dump([type], "func"); + var paramValtypes = parseVec(function (b) { + return _helperWasmBytecode.default.valtypes[b]; + }); + var params = paramValtypes.map(function (v) { + return t.funcParam( + /*valtype*/ + v); + }); + var result = parseVec(function (b) { + return _helperWasmBytecode.default.valtypes[b]; + }); + typeInstructionNodes.push(function () { + var endLoc = getPosition(); + return t.withLoc(t.typeInstruction(undefined, t.signature(params, result)), endLoc, _startLoc); + }()); + state.typesInModule.push({ + params: params, + result: result + }); + } else { + throw new Error("Unsupported type: " + toHex(type)); + } + } + + return typeInstructionNodes; + } // Import section + // https://webassembly.github.io/spec/binary/modules.html#binary-importsec + + + function parseImportSection(numberOfImports) { + var imports = []; + + for (var i = 0; i < numberOfImports; i++) { + dumpSep("import header " + i); + + var _startLoc2 = getPosition(); + /** + * Module name + */ + + + var moduleName = readUTF8String(); + eatBytes(moduleName.nextIndex); + dump([], "module name (".concat(moduleName.value, ")")); + /** + * Name + */ + + var name = readUTF8String(); + eatBytes(name.nextIndex); + dump([], "name (".concat(name.value, ")")); + /** + * Import descr + */ + + var descrTypeByte = readByte(); + eatBytes(1); + var descrType = _helperWasmBytecode.default.importTypes[descrTypeByte]; + dump([descrTypeByte], "import kind"); + + if (typeof descrType === "undefined") { + throw new _helperApiError.CompileError("Unknown import description type: " + toHex(descrTypeByte)); + } + + var importDescr = void 0; + + if (descrType === "func") { + var indexU32 = readU32(); + var typeindex = indexU32.value; + eatBytes(indexU32.nextIndex); + dump([typeindex], "type index"); + var signature = state.typesInModule[typeindex]; + + if (typeof signature === "undefined") { + throw new _helperApiError.CompileError("function signature not found (".concat(typeindex, ")")); + } + + var id = getUniqueName("func"); + importDescr = t.funcImportDescr(id, t.signature(signature.params, signature.result)); + state.functionsInModule.push({ + id: t.identifier(name.value), + signature: signature, + isExternal: true + }); + } else if (descrType === "global") { + importDescr = parseGlobalType(); + var globalNode = t.global(importDescr, []); + state.globalsInModule.push(globalNode); + } else if (descrType === "table") { + importDescr = parseTableType(i); + } else if (descrType === "mem") { + var memoryNode = parseMemoryType(0); + state.memoriesInModule.push(memoryNode); + importDescr = memoryNode; + } else { + throw new _helperApiError.CompileError("Unsupported import of type: " + descrType); + } + + imports.push(function () { + var endLoc = getPosition(); + return t.withLoc(t.moduleImport(moduleName.value, name.value, importDescr), endLoc, _startLoc2); + }()); + } + + return imports; + } // Function section + // https://webassembly.github.io/spec/binary/modules.html#function-section + + + function parseFuncSection(numberOfFunctions) { + dump([numberOfFunctions], "num funcs"); + + for (var i = 0; i < numberOfFunctions; i++) { + var indexU32 = readU32(); + var typeindex = indexU32.value; + eatBytes(indexU32.nextIndex); + dump([typeindex], "type index"); + var signature = state.typesInModule[typeindex]; + + if (typeof signature === "undefined") { + throw new _helperApiError.CompileError("function signature not found (".concat(typeindex, ")")); + } // preserve anonymous, a name might be resolved later + + + var id = t.withRaw(t.identifier(getUniqueName("func")), ""); + state.functionsInModule.push({ + id: id, + signature: signature, + isExternal: false + }); + } + } // Export section + // https://webassembly.github.io/spec/binary/modules.html#export-section + + + function parseExportSection(numberOfExport) { + dump([numberOfExport], "num exports"); // Parse vector of exports + + for (var i = 0; i < numberOfExport; i++) { + var _startLoc3 = getPosition(); + /** + * Name + */ + + + var name = readUTF8String(); + eatBytes(name.nextIndex); + dump([], "export name (".concat(name.value, ")")); + /** + * exportdescr + */ + + var typeIndex = readByte(); + eatBytes(1); + dump([typeIndex], "export kind"); + var indexu32 = readU32(); + var index = indexu32.value; + eatBytes(indexu32.nextIndex); + dump([index], "export index"); + var id = void 0, + signature = void 0; + + if (_helperWasmBytecode.default.exportTypes[typeIndex] === "Func") { + var func = state.functionsInModule[index]; + + if (typeof func === "undefined") { + throw new _helperApiError.CompileError("unknown function (".concat(index, ")")); + } + + id = t.numberLiteralFromRaw(index, String(index)); + signature = func.signature; + } else if (_helperWasmBytecode.default.exportTypes[typeIndex] === "Table") { + var table = state.tablesInModule[index]; + + if (typeof table === "undefined") { + throw new _helperApiError.CompileError("unknown table ".concat(index)); + } + + id = t.numberLiteralFromRaw(index, String(index)); + signature = null; + } else if (_helperWasmBytecode.default.exportTypes[typeIndex] === "Mem") { + var memNode = state.memoriesInModule[index]; + + if (typeof memNode === "undefined") { + throw new _helperApiError.CompileError("unknown memory ".concat(index)); + } + + id = t.numberLiteralFromRaw(index, String(index)); + signature = null; + } else if (_helperWasmBytecode.default.exportTypes[typeIndex] === "Global") { + var global = state.globalsInModule[index]; + + if (typeof global === "undefined") { + throw new _helperApiError.CompileError("unknown global ".concat(index)); + } + + id = t.numberLiteralFromRaw(index, String(index)); + signature = null; + } else { + console.warn("Unsupported export type: " + toHex(typeIndex)); + return; + } + + var endLoc = getPosition(); + state.elementsInExportSection.push({ + name: name.value, + type: _helperWasmBytecode.default.exportTypes[typeIndex], + signature: signature, + id: id, + index: index, + endLoc: endLoc, + startLoc: _startLoc3 + }); + } + } // Code section + // https://webassembly.github.io/spec/binary/modules.html#code-section + + + function parseCodeSection(numberOfFuncs) { + dump([numberOfFuncs], "number functions"); // Parse vector of function + + for (var i = 0; i < numberOfFuncs; i++) { + var _startLoc4 = getPosition(); + + dumpSep("function body " + i); // the u32 size of the function code in bytes + // Ignore it for now + + var bodySizeU32 = readU32(); + eatBytes(bodySizeU32.nextIndex); + dump([bodySizeU32.value], "function body size"); + var code = []; + /** + * Parse locals + */ + + var funcLocalNumU32 = readU32(); + var funcLocalNum = funcLocalNumU32.value; + eatBytes(funcLocalNumU32.nextIndex); + dump([funcLocalNum], "num locals"); + var locals = []; + + for (var _i = 0; _i < funcLocalNum; _i++) { + var _startLoc5 = getPosition(); + + var localCountU32 = readU32(); + var localCount = localCountU32.value; + eatBytes(localCountU32.nextIndex); + dump([localCount], "num local"); + var valtypeByte = readByte(); + eatBytes(1); + var type = _helperWasmBytecode.default.valtypes[valtypeByte]; + var args = []; + + for (var _i2 = 0; _i2 < localCount; _i2++) { + args.push(t.valtypeLiteral(type)); + } + + var localNode = function () { + var endLoc = getPosition(); + return t.withLoc(t.instruction("local", args), endLoc, _startLoc5); + }(); + + locals.push(localNode); + dump([valtypeByte], type); + + if (typeof type === "undefined") { + throw new _helperApiError.CompileError("Unexpected valtype: " + toHex(valtypeByte)); + } + } + + code.push.apply(code, locals); // Decode instructions until the end + + parseInstructionBlock(code); + var endLoc = getPosition(); + state.elementsInCodeSection.push({ + code: code, + locals: locals, + endLoc: endLoc, + startLoc: _startLoc4, + bodySize: bodySizeU32.value + }); + } + } + + function parseInstructionBlock(code) { + while (true) { + var _startLoc6 = getPosition(); + + var instructionAlreadyCreated = false; + var instructionByte = readByte(); + eatBytes(1); + + if (instructionByte === 0xfe) { + throw new _helperApiError.CompileError("Atomic instructions are not implemented"); + } + + var instruction = _helperWasmBytecode.default.symbolsByByte[instructionByte]; + + if (typeof instruction === "undefined") { + throw new _helperApiError.CompileError("Unexpected instruction: " + toHex(instructionByte)); + } + + if (typeof instruction.object === "string") { + dump([instructionByte], "".concat(instruction.object, ".").concat(instruction.name)); + } else { + dump([instructionByte], instruction.name); + } + /** + * End of the function + */ + + + if (instruction.name === "end") { + var node = function () { + var endLoc = getPosition(); + return t.withLoc(t.instruction(instruction.name), endLoc, _startLoc6); + }(); + + code.push(node); + break; + } + + var args = []; + + if (instruction.name === "loop") { + var _startLoc7 = getPosition(); + + var blocktypeByte = readByte(); + eatBytes(1); + var blocktype = _helperWasmBytecode.default.blockTypes[blocktypeByte]; + dump([blocktypeByte], "blocktype"); + + if (typeof blocktype === "undefined") { + throw new _helperApiError.CompileError("Unexpected blocktype: " + toHex(blocktypeByte)); + } + + var instr = []; + parseInstructionBlock(instr); // preserve anonymous + + var label = t.withRaw(t.identifier(getUniqueName("loop")), ""); + + var loopNode = function () { + var endLoc = getPosition(); + return t.withLoc(t.loopInstruction(label, blocktype, instr), endLoc, _startLoc7); + }(); + + code.push(loopNode); + instructionAlreadyCreated = true; + } else if (instruction.name === "if") { + var _startLoc8 = getPosition(); + + var _blocktypeByte = readByte(); + + eatBytes(1); + var _blocktype = _helperWasmBytecode.default.blockTypes[_blocktypeByte]; + dump([_blocktypeByte], "blocktype"); + + if (typeof _blocktype === "undefined") { + throw new _helperApiError.CompileError("Unexpected blocktype: " + toHex(_blocktypeByte)); + } + + var testIndex = t.withRaw(t.identifier(getUniqueName("if")), ""); + var ifBody = []; + parseInstructionBlock(ifBody); // Defaults to no alternate + + var elseIndex = 0; + + for (elseIndex = 0; elseIndex < ifBody.length; ++elseIndex) { + var _instr = ifBody[elseIndex]; + + if (_instr.type === "Instr" && _instr.id === "else") { + break; + } + } + + var consequentInstr = ifBody.slice(0, elseIndex); + var alternate = ifBody.slice(elseIndex + 1); // wast sugar + + var testInstrs = []; + + var ifNode = function () { + var endLoc = getPosition(); + return t.withLoc(t.ifInstruction(testIndex, testInstrs, _blocktype, consequentInstr, alternate), endLoc, _startLoc8); + }(); + + code.push(ifNode); + instructionAlreadyCreated = true; + } else if (instruction.name === "block") { + var _startLoc9 = getPosition(); + + var _blocktypeByte2 = readByte(); + + eatBytes(1); + var _blocktype2 = _helperWasmBytecode.default.blockTypes[_blocktypeByte2]; + dump([_blocktypeByte2], "blocktype"); + + if (typeof _blocktype2 === "undefined") { + throw new _helperApiError.CompileError("Unexpected blocktype: " + toHex(_blocktypeByte2)); + } + + var _instr2 = []; + parseInstructionBlock(_instr2); // preserve anonymous + + var _label = t.withRaw(t.identifier(getUniqueName("block")), ""); + + var blockNode = function () { + var endLoc = getPosition(); + return t.withLoc(t.blockInstruction(_label, _instr2, _blocktype2), endLoc, _startLoc9); + }(); + + code.push(blockNode); + instructionAlreadyCreated = true; + } else if (instruction.name === "call") { + var indexu32 = readU32(); + var index = indexu32.value; + eatBytes(indexu32.nextIndex); + dump([index], "index"); + + var callNode = function () { + var endLoc = getPosition(); + return t.withLoc(t.callInstruction(t.indexLiteral(index)), endLoc, _startLoc6); + }(); + + code.push(callNode); + instructionAlreadyCreated = true; + } else if (instruction.name === "call_indirect") { + var _startLoc10 = getPosition(); + + var indexU32 = readU32(); + var typeindex = indexU32.value; + eatBytes(indexU32.nextIndex); + dump([typeindex], "type index"); + var signature = state.typesInModule[typeindex]; + + if (typeof signature === "undefined") { + throw new _helperApiError.CompileError("call_indirect signature not found (".concat(typeindex, ")")); + } + + var _callNode = t.callIndirectInstruction(t.signature(signature.params, signature.result), []); + + var flagU32 = readU32(); + var flag = flagU32.value; // 0x00 - reserved byte + + eatBytes(flagU32.nextIndex); + + if (flag !== 0) { + throw new _helperApiError.CompileError("zero flag expected"); + } + + code.push(function () { + var endLoc = getPosition(); + return t.withLoc(_callNode, endLoc, _startLoc10); + }()); + instructionAlreadyCreated = true; + } else if (instruction.name === "br_table") { + var indicesu32 = readU32(); + var indices = indicesu32.value; + eatBytes(indicesu32.nextIndex); + dump([indices], "num indices"); + + for (var i = 0; i <= indices; i++) { + var _indexu = readU32(); + + var _index = _indexu.value; + eatBytes(_indexu.nextIndex); + dump([_index], "index"); + args.push(t.numberLiteralFromRaw(_indexu.value.toString(), "u32")); + } + } else if (instructionByte >= 0x28 && instructionByte <= 0x40) { + /** + * Memory instructions + */ + if (instruction.name === "grow_memory" || instruction.name === "current_memory") { + var _indexU = readU32(); + + var _index2 = _indexU.value; + eatBytes(_indexU.nextIndex); + + if (_index2 !== 0) { + throw new Error("zero flag expected"); + } + + dump([_index2], "index"); + } else { + var aligun32 = readU32(); + var align = aligun32.value; + eatBytes(aligun32.nextIndex); + dump([align], "align"); + var offsetu32 = readU32(); + var _offset2 = offsetu32.value; + eatBytes(offsetu32.nextIndex); + dump([_offset2], "offset"); + } + } else if (instructionByte >= 0x41 && instructionByte <= 0x44) { + /** + * Numeric instructions + */ + if (instruction.object === "i32") { + var value32 = read32(); + var value = value32.value; + eatBytes(value32.nextIndex); + dump([value], "i32 value"); + args.push(t.numberLiteralFromRaw(value)); + } + + if (instruction.object === "u32") { + var valueu32 = readU32(); + var _value = valueu32.value; + eatBytes(valueu32.nextIndex); + dump([_value], "u32 value"); + args.push(t.numberLiteralFromRaw(_value)); + } + + if (instruction.object === "i64") { + var value64 = read64(); + var _value2 = value64.value; + eatBytes(value64.nextIndex); + dump([Number(_value2.toString())], "i64 value"); + var high = _value2.high, + low = _value2.low; + var _node = { + type: "LongNumberLiteral", + value: { + high: high, + low: low + } + }; + args.push(_node); + } + + if (instruction.object === "u64") { + var valueu64 = readU64(); + var _value3 = valueu64.value; + eatBytes(valueu64.nextIndex); + dump([Number(_value3.toString())], "u64 value"); + var _high = _value3.high, + _low = _value3.low; + var _node2 = { + type: "LongNumberLiteral", + value: { + high: _high, + low: _low + } + }; + args.push(_node2); + } + + if (instruction.object === "f32") { + var valuef32 = readF32(); + var _value4 = valuef32.value; + eatBytes(valuef32.nextIndex); + dump([_value4], "f32 value"); + args.push( // $FlowIgnore + t.floatLiteral(_value4, valuef32.nan, valuef32.inf, String(_value4))); + } + + if (instruction.object === "f64") { + var valuef64 = readF64(); + var _value5 = valuef64.value; + eatBytes(valuef64.nextIndex); + dump([_value5], "f64 value"); + args.push( // $FlowIgnore + t.floatLiteral(_value5, valuef64.nan, valuef64.inf, String(_value5))); + } + } else { + for (var _i3 = 0; _i3 < instruction.numberOfArgs; _i3++) { + var u32 = readU32(); + eatBytes(u32.nextIndex); + dump([u32.value], "argument " + _i3); + args.push(t.numberLiteralFromRaw(u32.value)); + } + } + + if (instructionAlreadyCreated === false) { + if (typeof instruction.object === "string") { + var _node3 = function () { + var endLoc = getPosition(); + return t.withLoc(t.objectInstruction(instruction.name, instruction.object, args), endLoc, _startLoc6); + }(); + + code.push(_node3); + } else { + var _node4 = function () { + var endLoc = getPosition(); + return t.withLoc(t.instruction(instruction.name, args), endLoc, _startLoc6); + }(); + + code.push(_node4); + } + } + } + } // https://webassembly.github.io/spec/core/binary/types.html#limits + + + function parseLimits() { + var limitType = readByte(); + eatBytes(1); + dump([limitType], "limit type"); + var min, max; + + if (limitType === 0x01 || limitType === 0x03 // shared limits + ) { + var u32min = readU32(); + min = parseInt(u32min.value); + eatBytes(u32min.nextIndex); + dump([min], "min"); + var u32max = readU32(); + max = parseInt(u32max.value); + eatBytes(u32max.nextIndex); + dump([max], "max"); + } + + if (limitType === 0x00) { + var _u32min = readU32(); + + min = parseInt(_u32min.value); + eatBytes(_u32min.nextIndex); + dump([min], "min"); + } + + return t.limit(min, max); + } // https://webassembly.github.io/spec/core/binary/types.html#binary-tabletype + + + function parseTableType(index) { + var name = t.withRaw(t.identifier(getUniqueName("table")), String(index)); + var elementTypeByte = readByte(); + eatBytes(1); + dump([elementTypeByte], "element type"); + var elementType = _helperWasmBytecode.default.tableTypes[elementTypeByte]; + + if (typeof elementType === "undefined") { + throw new _helperApiError.CompileError("Unknown element type in table: " + toHex(elementType)); + } + + var limits = parseLimits(); + return t.table(elementType, limits, name); + } // https://webassembly.github.io/spec/binary/types.html#global-types + + + function parseGlobalType() { + var valtypeByte = readByte(); + eatBytes(1); + var type = _helperWasmBytecode.default.valtypes[valtypeByte]; + dump([valtypeByte], type); + + if (typeof type === "undefined") { + throw new _helperApiError.CompileError("Unknown valtype: " + toHex(valtypeByte)); + } + + var globalTypeByte = readByte(); + eatBytes(1); + var globalType = _helperWasmBytecode.default.globalTypes[globalTypeByte]; + dump([globalTypeByte], "global type (".concat(globalType, ")")); + + if (typeof globalType === "undefined") { + throw new _helperApiError.CompileError("Invalid mutability: " + toHex(globalTypeByte)); + } + + return t.globalType(type, globalType); + } // function parseNameModule() { + // const lenu32 = readVaruint32(); + // eatBytes(lenu32.nextIndex); + // console.log("len", lenu32); + // const strlen = lenu32.value; + // dump([strlen], "string length"); + // const bytes = readBytes(strlen); + // eatBytes(strlen); + // const value = utf8.decode(bytes); + // return [t.moduleNameMetadata(value)]; + // } + // this section contains an array of function names and indices + + + function parseNameSectionFunctions() { + var functionNames = []; + var numberOfFunctionsu32 = readU32(); + var numbeOfFunctions = numberOfFunctionsu32.value; + eatBytes(numberOfFunctionsu32.nextIndex); + + for (var i = 0; i < numbeOfFunctions; i++) { + var indexu32 = readU32(); + var index = indexu32.value; + eatBytes(indexu32.nextIndex); + var name = readUTF8String(); + eatBytes(name.nextIndex); + functionNames.push(t.functionNameMetadata(name.value, index)); + } + + return functionNames; + } + + function parseNameSectionLocals() { + var localNames = []; + var numbeOfFunctionsu32 = readU32(); + var numbeOfFunctions = numbeOfFunctionsu32.value; + eatBytes(numbeOfFunctionsu32.nextIndex); + + for (var i = 0; i < numbeOfFunctions; i++) { + var functionIndexu32 = readU32(); + var functionIndex = functionIndexu32.value; + eatBytes(functionIndexu32.nextIndex); + var numLocalsu32 = readU32(); + var numLocals = numLocalsu32.value; + eatBytes(numLocalsu32.nextIndex); + + for (var _i4 = 0; _i4 < numLocals; _i4++) { + var localIndexu32 = readU32(); + var localIndex = localIndexu32.value; + eatBytes(localIndexu32.nextIndex); + var name = readUTF8String(); + eatBytes(name.nextIndex); + localNames.push(t.localNameMetadata(name.value, localIndex, functionIndex)); + } + } + + return localNames; + } // this is a custom section used for name resolution + // https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#name-section + + + function parseNameSection(remainingBytes) { + var nameMetadata = []; + var initialOffset = offset; + + while (offset - initialOffset < remainingBytes) { + // name_type + var sectionTypeByte = readVaruint7(); + eatBytes(sectionTypeByte.nextIndex); // name_payload_len + + var subSectionSizeInBytesu32 = readVaruint32(); + eatBytes(subSectionSizeInBytesu32.nextIndex); + + switch (sectionTypeByte.value) { + // case 0: { + // TODO(sven): re-enable that + // Current status: it seems that when we decode the module's name + // no name_payload_len is used. + // + // See https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#name-section + // + // nameMetadata.push(...parseNameModule()); + // break; + // } + case 1: + { + nameMetadata.push.apply(nameMetadata, _toConsumableArray(parseNameSectionFunctions())); + break; + } + + case 2: + { + nameMetadata.push.apply(nameMetadata, _toConsumableArray(parseNameSectionLocals())); + break; + } + + default: + { + // skip unknown subsection + eatBytes(subSectionSizeInBytesu32.value); + } + } + } + + return nameMetadata; + } // this is a custom section used for information about the producers + // https://github.com/WebAssembly/tool-conventions/blob/master/ProducersSection.md + + + function parseProducersSection() { + var metadata = t.producersSectionMetadata([]); // field_count + + var sectionTypeByte = readVaruint32(); + eatBytes(sectionTypeByte.nextIndex); + dump([sectionTypeByte.value], "num of producers"); + var fields = { + language: [], + "processed-by": [], + sdk: [] + }; // fields + + for (var fieldI = 0; fieldI < sectionTypeByte.value; fieldI++) { + // field_name + var fieldName = readUTF8String(); + eatBytes(fieldName.nextIndex); // field_value_count + + var valueCount = readVaruint32(); + eatBytes(valueCount.nextIndex); // field_values + + for (var producerI = 0; producerI < valueCount.value; producerI++) { + var producerName = readUTF8String(); + eatBytes(producerName.nextIndex); + var producerVersion = readUTF8String(); + eatBytes(producerVersion.nextIndex); + fields[fieldName.value].push(t.producerMetadataVersionedName(producerName.value, producerVersion.value)); + } + + metadata.producers.push(fields[fieldName.value]); + } + + return metadata; + } + + function parseGlobalSection(numberOfGlobals) { + var globals = []; + dump([numberOfGlobals], "num globals"); + + for (var i = 0; i < numberOfGlobals; i++) { + var _startLoc11 = getPosition(); + + var globalType = parseGlobalType(); + /** + * Global expressions + */ + + var init = []; + parseInstructionBlock(init); + + var node = function () { + var endLoc = getPosition(); + return t.withLoc(t.global(globalType, init), endLoc, _startLoc11); + }(); + + globals.push(node); + state.globalsInModule.push(node); + } + + return globals; + } + + function parseElemSection(numberOfElements) { + var elems = []; + dump([numberOfElements], "num elements"); + + for (var i = 0; i < numberOfElements; i++) { + var _startLoc12 = getPosition(); + + var tableindexu32 = readU32(); + var tableindex = tableindexu32.value; + eatBytes(tableindexu32.nextIndex); + dump([tableindex], "table index"); + /** + * Parse instructions + */ + + var instr = []; + parseInstructionBlock(instr); + /** + * Parse ( vector function index ) * + */ + + var indicesu32 = readU32(); + var indices = indicesu32.value; + eatBytes(indicesu32.nextIndex); + dump([indices], "num indices"); + var indexValues = []; + + for (var _i5 = 0; _i5 < indices; _i5++) { + var indexu32 = readU32(); + var index = indexu32.value; + eatBytes(indexu32.nextIndex); + dump([index], "index"); + indexValues.push(t.indexLiteral(index)); + } + + var elemNode = function () { + var endLoc = getPosition(); + return t.withLoc(t.elem(t.indexLiteral(tableindex), instr, indexValues), endLoc, _startLoc12); + }(); + + elems.push(elemNode); + } + + return elems; + } // https://webassembly.github.io/spec/core/binary/types.html#memory-types + + + function parseMemoryType(i) { + var limits = parseLimits(); + return t.memory(limits, t.indexLiteral(i)); + } // https://webassembly.github.io/spec/binary/modules.html#table-section + + + function parseTableSection(numberOfElements) { + var tables = []; + dump([numberOfElements], "num elements"); + + for (var i = 0; i < numberOfElements; i++) { + var tablesNode = parseTableType(i); + state.tablesInModule.push(tablesNode); + tables.push(tablesNode); + } + + return tables; + } // https://webassembly.github.io/spec/binary/modules.html#memory-section + + + function parseMemorySection(numberOfElements) { + var memories = []; + dump([numberOfElements], "num elements"); + + for (var i = 0; i < numberOfElements; i++) { + var memoryNode = parseMemoryType(i); + state.memoriesInModule.push(memoryNode); + memories.push(memoryNode); + } + + return memories; + } // https://webassembly.github.io/spec/binary/modules.html#binary-startsec + + + function parseStartSection() { + var startLoc = getPosition(); + var u32 = readU32(); + var startFuncIndex = u32.value; + eatBytes(u32.nextIndex); + dump([startFuncIndex], "index"); + return function () { + var endLoc = getPosition(); + return t.withLoc(t.start(t.indexLiteral(startFuncIndex)), endLoc, startLoc); + }(); + } // https://webassembly.github.io/spec/binary/modules.html#data-section + + + function parseDataSection(numberOfElements) { + var dataEntries = []; + dump([numberOfElements], "num elements"); + + for (var i = 0; i < numberOfElements; i++) { + var memoryIndexu32 = readU32(); + var memoryIndex = memoryIndexu32.value; + eatBytes(memoryIndexu32.nextIndex); + dump([memoryIndex], "memory index"); + var instrs = []; + parseInstructionBlock(instrs); + var hasExtraInstrs = instrs.filter(function (i) { + return i.id !== "end"; + }).length !== 1; + + if (hasExtraInstrs) { + throw new _helperApiError.CompileError("data section offset must be a single instruction"); + } + + var bytes = parseVec(function (b) { + return b; + }); + dump([], "init"); + dataEntries.push(t.data(t.memIndexLiteral(memoryIndex), instrs[0], t.byteArray(bytes))); + } + + return dataEntries; + } // https://webassembly.github.io/spec/binary/modules.html#binary-section + + + function parseSection(sectionIndex) { + var sectionId = readByte(); + eatBytes(1); + + if (sectionId >= sectionIndex || sectionIndex === _helperWasmBytecode.default.sections.custom) { + sectionIndex = sectionId + 1; + } else { + if (sectionId !== _helperWasmBytecode.default.sections.custom) throw new _helperApiError.CompileError("Unexpected section: " + toHex(sectionId)); + } + + var nextSectionIndex = sectionIndex; + var startOffset = offset; + var startLoc = getPosition(); + var u32 = readU32(); + var sectionSizeInBytes = u32.value; + eatBytes(u32.nextIndex); + + var sectionSizeInBytesNode = function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(sectionSizeInBytes), endLoc, startLoc); + }(); + + switch (sectionId) { + case _helperWasmBytecode.default.sections.type: + { + dumpSep("section Type"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _startLoc13 = getPosition(); + + var _u = readU32(); + + var numberOfTypes = _u.value; + eatBytes(_u.nextIndex); + + var _metadata = t.sectionMetadata("type", startOffset, sectionSizeInBytesNode, function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(numberOfTypes), endLoc, _startLoc13); + }()); + + var _nodes = parseTypeSection(numberOfTypes); + + return { + nodes: _nodes, + metadata: _metadata, + nextSectionIndex: nextSectionIndex + }; + } + + case _helperWasmBytecode.default.sections.table: + { + dumpSep("section Table"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _startLoc14 = getPosition(); + + var _u2 = readU32(); + + var numberOfTable = _u2.value; + eatBytes(_u2.nextIndex); + dump([numberOfTable], "num tables"); + + var _metadata2 = t.sectionMetadata("table", startOffset, sectionSizeInBytesNode, function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(numberOfTable), endLoc, _startLoc14); + }()); + + var _nodes2 = parseTableSection(numberOfTable); + + return { + nodes: _nodes2, + metadata: _metadata2, + nextSectionIndex: nextSectionIndex + }; + } + + case _helperWasmBytecode.default.sections.import: + { + dumpSep("section Import"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _startLoc15 = getPosition(); + + var numberOfImportsu32 = readU32(); + var numberOfImports = numberOfImportsu32.value; + eatBytes(numberOfImportsu32.nextIndex); + dump([numberOfImports], "number of imports"); + + var _metadata3 = t.sectionMetadata("import", startOffset, sectionSizeInBytesNode, function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(numberOfImports), endLoc, _startLoc15); + }()); + + var _nodes3 = parseImportSection(numberOfImports); + + return { + nodes: _nodes3, + metadata: _metadata3, + nextSectionIndex: nextSectionIndex + }; + } + + case _helperWasmBytecode.default.sections.func: + { + dumpSep("section Function"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _startLoc16 = getPosition(); + + var numberOfFunctionsu32 = readU32(); + var numberOfFunctions = numberOfFunctionsu32.value; + eatBytes(numberOfFunctionsu32.nextIndex); + + var _metadata4 = t.sectionMetadata("func", startOffset, sectionSizeInBytesNode, function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(numberOfFunctions), endLoc, _startLoc16); + }()); + + parseFuncSection(numberOfFunctions); + var _nodes4 = []; + return { + nodes: _nodes4, + metadata: _metadata4, + nextSectionIndex: nextSectionIndex + }; + } + + case _helperWasmBytecode.default.sections.export: + { + dumpSep("section Export"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _startLoc17 = getPosition(); + + var _u3 = readU32(); + + var numberOfExport = _u3.value; + eatBytes(_u3.nextIndex); + + var _metadata5 = t.sectionMetadata("export", startOffset, sectionSizeInBytesNode, function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(numberOfExport), endLoc, _startLoc17); + }()); + + parseExportSection(numberOfExport); + var _nodes5 = []; + return { + nodes: _nodes5, + metadata: _metadata5, + nextSectionIndex: nextSectionIndex + }; + } + + case _helperWasmBytecode.default.sections.code: + { + dumpSep("section Code"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _startLoc18 = getPosition(); + + var _u4 = readU32(); + + var numberOfFuncs = _u4.value; + eatBytes(_u4.nextIndex); + + var _metadata6 = t.sectionMetadata("code", startOffset, sectionSizeInBytesNode, function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(numberOfFuncs), endLoc, _startLoc18); + }()); + + if (opts.ignoreCodeSection === true) { + var remainingBytes = sectionSizeInBytes - _u4.nextIndex; + eatBytes(remainingBytes); // eat the entire section + } else { + parseCodeSection(numberOfFuncs); + } + + var _nodes6 = []; + return { + nodes: _nodes6, + metadata: _metadata6, + nextSectionIndex: nextSectionIndex + }; + } + + case _helperWasmBytecode.default.sections.start: + { + dumpSep("section Start"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _metadata7 = t.sectionMetadata("start", startOffset, sectionSizeInBytesNode); + + var _nodes7 = [parseStartSection()]; + return { + nodes: _nodes7, + metadata: _metadata7, + nextSectionIndex: nextSectionIndex + }; + } + + case _helperWasmBytecode.default.sections.element: + { + dumpSep("section Element"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _startLoc19 = getPosition(); + + var numberOfElementsu32 = readU32(); + var numberOfElements = numberOfElementsu32.value; + eatBytes(numberOfElementsu32.nextIndex); + + var _metadata8 = t.sectionMetadata("element", startOffset, sectionSizeInBytesNode, function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(numberOfElements), endLoc, _startLoc19); + }()); + + var _nodes8 = parseElemSection(numberOfElements); + + return { + nodes: _nodes8, + metadata: _metadata8, + nextSectionIndex: nextSectionIndex + }; + } + + case _helperWasmBytecode.default.sections.global: + { + dumpSep("section Global"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _startLoc20 = getPosition(); + + var numberOfGlobalsu32 = readU32(); + var numberOfGlobals = numberOfGlobalsu32.value; + eatBytes(numberOfGlobalsu32.nextIndex); + + var _metadata9 = t.sectionMetadata("global", startOffset, sectionSizeInBytesNode, function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(numberOfGlobals), endLoc, _startLoc20); + }()); + + var _nodes9 = parseGlobalSection(numberOfGlobals); + + return { + nodes: _nodes9, + metadata: _metadata9, + nextSectionIndex: nextSectionIndex + }; + } + + case _helperWasmBytecode.default.sections.memory: + { + dumpSep("section Memory"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _startLoc21 = getPosition(); + + var _numberOfElementsu = readU32(); + + var _numberOfElements = _numberOfElementsu.value; + eatBytes(_numberOfElementsu.nextIndex); + + var _metadata10 = t.sectionMetadata("memory", startOffset, sectionSizeInBytesNode, function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(_numberOfElements), endLoc, _startLoc21); + }()); + + var _nodes10 = parseMemorySection(_numberOfElements); + + return { + nodes: _nodes10, + metadata: _metadata10, + nextSectionIndex: nextSectionIndex + }; + } + + case _helperWasmBytecode.default.sections.data: + { + dumpSep("section Data"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + + var _metadata11 = t.sectionMetadata("data", startOffset, sectionSizeInBytesNode); + + var _startLoc22 = getPosition(); + + var _numberOfElementsu2 = readU32(); + + var _numberOfElements2 = _numberOfElementsu2.value; + eatBytes(_numberOfElementsu2.nextIndex); + + _metadata11.vectorOfSize = function () { + var endLoc = getPosition(); + return t.withLoc(t.numberLiteralFromRaw(_numberOfElements2), endLoc, _startLoc22); + }(); + + if (opts.ignoreDataSection === true) { + var _remainingBytes = sectionSizeInBytes - _numberOfElementsu2.nextIndex; + + eatBytes(_remainingBytes); // eat the entire section + + dumpSep("ignore data (" + sectionSizeInBytes + " bytes)"); + return { + nodes: [], + metadata: _metadata11, + nextSectionIndex: nextSectionIndex + }; + } else { + var _nodes11 = parseDataSection(_numberOfElements2); + + return { + nodes: _nodes11, + metadata: _metadata11, + nextSectionIndex: nextSectionIndex + }; + } + } + + case _helperWasmBytecode.default.sections.custom: + { + dumpSep("section Custom"); + dump([sectionId], "section code"); + dump([sectionSizeInBytes], "section size"); + var _metadata12 = [t.sectionMetadata("custom", startOffset, sectionSizeInBytesNode)]; + var sectionName = readUTF8String(); + eatBytes(sectionName.nextIndex); + dump([], "section name (".concat(sectionName.value, ")")); + + var _remainingBytes2 = sectionSizeInBytes - sectionName.nextIndex; + + if (sectionName.value === "name") { + var initialOffset = offset; + + try { + _metadata12.push.apply(_metadata12, _toConsumableArray(parseNameSection(_remainingBytes2))); + } catch (e) { + console.warn("Failed to decode custom \"name\" section @".concat(offset, "; ignoring (").concat(e.message, ").")); + eatBytes(offset - (initialOffset + _remainingBytes2)); + } + } else if (sectionName.value === "producers") { + var _initialOffset = offset; + + try { + _metadata12.push(parseProducersSection()); + } catch (e) { + console.warn("Failed to decode custom \"producers\" section @".concat(offset, "; ignoring (").concat(e.message, ").")); + eatBytes(offset - (_initialOffset + _remainingBytes2)); + } + } else { + // We don't parse the custom section + eatBytes(_remainingBytes2); + dumpSep("ignore custom " + JSON.stringify(sectionName.value) + " section (" + _remainingBytes2 + " bytes)"); + } + + return { + nodes: [], + metadata: _metadata12, + nextSectionIndex: nextSectionIndex + }; + } + } + + throw new _helperApiError.CompileError("Unexpected section: " + toHex(sectionId)); + } + + parseModuleHeader(); + parseVersion(); + var moduleFields = []; + var sectionIndex = 0; + var moduleMetadata = { + sections: [], + functionNames: [], + localNames: [], + producers: [] + }; + /** + * All the generate declaration are going to be stored in our state + */ + + while (offset < buf.length) { + var _parseSection = parseSection(sectionIndex), + _nodes12 = _parseSection.nodes, + _metadata13 = _parseSection.metadata, + nextSectionIndex = _parseSection.nextSectionIndex; + + moduleFields.push.apply(moduleFields, _toConsumableArray(_nodes12)); + var metadataArray = Array.isArray(_metadata13) ? _metadata13 : [_metadata13]; + metadataArray.forEach(function (metadataItem) { + if (metadataItem.type === "FunctionNameMetadata") { + moduleMetadata.functionNames.push(metadataItem); + } else if (metadataItem.type === "LocalNameMetadata") { + moduleMetadata.localNames.push(metadataItem); + } else if (metadataItem.type === "ProducersSectionMetadata") { + moduleMetadata.producers.push(metadataItem); + } else { + moduleMetadata.sections.push(metadataItem); + } + }); // Ignore custom section + + if (nextSectionIndex) { + sectionIndex = nextSectionIndex; + } + } + /** + * Transform the state into AST nodes + */ + + + var funcIndex = 0; + state.functionsInModule.forEach(function (func) { + var params = func.signature.params; + var result = func.signature.result; + var body = []; // External functions doesn't provide any code, can skip it here + + if (func.isExternal === true) { + return; + } + + var decodedElementInCodeSection = state.elementsInCodeSection[funcIndex]; + + if (opts.ignoreCodeSection === false) { + if (typeof decodedElementInCodeSection === "undefined") { + throw new _helperApiError.CompileError("func " + toHex(funcIndex) + " code not found"); + } + + body = decodedElementInCodeSection.code; + } + + funcIndex++; + var funcNode = t.func(func.id, t.signature(params, result), body); + + if (func.isExternal === true) { + funcNode.isExternal = func.isExternal; + } // Add function position in the binary if possible + + + if (opts.ignoreCodeSection === false) { + var _startLoc23 = decodedElementInCodeSection.startLoc, + endLoc = decodedElementInCodeSection.endLoc, + bodySize = decodedElementInCodeSection.bodySize; + funcNode = t.withLoc(funcNode, endLoc, _startLoc23); + funcNode.metadata = { + bodySize: bodySize + }; + } + + moduleFields.push(funcNode); + }); + state.elementsInExportSection.forEach(function (moduleExport) { + /** + * If the export has no id, we won't be able to call it from the outside + * so we can omit it + */ + if (moduleExport.id != null) { + moduleFields.push(t.withLoc(t.moduleExport(moduleExport.name, t.moduleExportDescr(moduleExport.type, moduleExport.id)), moduleExport.endLoc, moduleExport.startLoc)); + } + }); + dumpSep("end of program"); + var module = t.module(null, moduleFields, t.moduleMetadata(moduleMetadata.sections, moduleMetadata.functionNames, moduleMetadata.localNames, moduleMetadata.producers)); + return t.program([module]); +} + +/***/ }), + +/***/ 8062: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.decode = decode; + +var decoder = _interopRequireWildcard(__webpack_require__(72856)); + +var t = _interopRequireWildcard(__webpack_require__(98688)); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +/** + * TODO(sven): I added initial props, but we should rather fix + * https://github.com/xtuc/webassemblyjs/issues/405 + */ +var defaultDecoderOpts = { + dump: false, + ignoreCodeSection: false, + ignoreDataSection: false, + ignoreCustomNameSection: false +}; // traverses the AST, locating function name metadata, which is then +// used to update index-based identifiers with function names + +function restoreFunctionNames(ast) { + var functionNames = []; + t.traverse(ast, { + FunctionNameMetadata: function FunctionNameMetadata(_ref) { + var node = _ref.node; + functionNames.push({ + name: node.value, + index: node.index + }); + } + }); + + if (functionNames.length === 0) { + return; + } + + t.traverse(ast, { + Func: function (_Func) { + function Func(_x) { + return _Func.apply(this, arguments); + } + + Func.toString = function () { + return _Func.toString(); + }; + + return Func; + }(function (_ref2) { + var node = _ref2.node; + // $FlowIgnore + var nodeName = node.name; + var indexBasedFunctionName = nodeName.value; + var index = Number(indexBasedFunctionName.replace("func_", "")); + var functionName = functionNames.find(function (f) { + return f.index === index; + }); + + if (functionName) { + var oldValue = nodeName.value; + nodeName.value = functionName.name; + nodeName.numeric = oldValue; // $FlowIgnore + + delete nodeName.raw; + } + }), + // Also update the reference in the export + ModuleExport: function (_ModuleExport) { + function ModuleExport(_x2) { + return _ModuleExport.apply(this, arguments); + } + + ModuleExport.toString = function () { + return _ModuleExport.toString(); + }; + + return ModuleExport; + }(function (_ref3) { + var node = _ref3.node; + + if (node.descr.exportType === "Func") { + // $FlowIgnore + var nodeName = node.descr.id; + var index = nodeName.value; + var functionName = functionNames.find(function (f) { + return f.index === index; + }); + + if (functionName) { + node.descr.id = t.identifier(functionName.name); + } + } + }), + ModuleImport: function (_ModuleImport) { + function ModuleImport(_x3) { + return _ModuleImport.apply(this, arguments); + } + + ModuleImport.toString = function () { + return _ModuleImport.toString(); + }; + + return ModuleImport; + }(function (_ref4) { + var node = _ref4.node; + + if (node.descr.type === "FuncImportDescr") { + // $FlowIgnore + var indexBasedFunctionName = node.descr.id; + var index = Number(indexBasedFunctionName.replace("func_", "")); + var functionName = functionNames.find(function (f) { + return f.index === index; + }); + + if (functionName) { + // $FlowIgnore + node.descr.id = t.identifier(functionName.name); + } + } + }), + CallInstruction: function (_CallInstruction) { + function CallInstruction(_x4) { + return _CallInstruction.apply(this, arguments); + } + + CallInstruction.toString = function () { + return _CallInstruction.toString(); + }; + + return CallInstruction; + }(function (nodePath) { + var node = nodePath.node; + var index = node.index.value; + var functionName = functionNames.find(function (f) { + return f.index === index; + }); + + if (functionName) { + var oldValue = node.index; + node.index = t.identifier(functionName.name); + node.numeric = oldValue; // $FlowIgnore + + delete node.raw; + } + }) + }); +} + +function restoreLocalNames(ast) { + var localNames = []; + t.traverse(ast, { + LocalNameMetadata: function LocalNameMetadata(_ref5) { + var node = _ref5.node; + localNames.push({ + name: node.value, + localIndex: node.localIndex, + functionIndex: node.functionIndex + }); + } + }); + + if (localNames.length === 0) { + return; + } + + t.traverse(ast, { + Func: function (_Func2) { + function Func(_x5) { + return _Func2.apply(this, arguments); + } + + Func.toString = function () { + return _Func2.toString(); + }; + + return Func; + }(function (_ref6) { + var node = _ref6.node; + var signature = node.signature; + + if (signature.type !== "Signature") { + return; + } // $FlowIgnore + + + var nodeName = node.name; + var indexBasedFunctionName = nodeName.value; + var functionIndex = Number(indexBasedFunctionName.replace("func_", "")); + signature.params.forEach(function (param, paramIndex) { + var paramName = localNames.find(function (f) { + return f.localIndex === paramIndex && f.functionIndex === functionIndex; + }); + + if (paramName && paramName.name !== "") { + param.id = paramName.name; + } + }); + }) + }); +} + +function restoreModuleName(ast) { + t.traverse(ast, { + ModuleNameMetadata: function (_ModuleNameMetadata) { + function ModuleNameMetadata(_x6) { + return _ModuleNameMetadata.apply(this, arguments); + } + + ModuleNameMetadata.toString = function () { + return _ModuleNameMetadata.toString(); + }; + + return ModuleNameMetadata; + }(function (moduleNameMetadataPath) { + // update module + t.traverse(ast, { + Module: function (_Module) { + function Module(_x7) { + return _Module.apply(this, arguments); + } + + Module.toString = function () { + return _Module.toString(); + }; + + return Module; + }(function (_ref7) { + var node = _ref7.node; + var name = moduleNameMetadataPath.node.value; // compatiblity with wast-parser + + if (name === "") { + name = null; + } + + node.id = name; + }) + }); + }) + }); +} + +function decode(buf, customOpts) { + var opts = Object.assign({}, defaultDecoderOpts, customOpts); + var ast = decoder.decode(buf, opts); + + if (opts.ignoreCustomNameSection === false) { + restoreFunctionNames(ast); + restoreLocalNames(ast); + restoreModuleName(ast); + } + + return ast; +} + +/***/ }), + +/***/ 68693: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.parse = parse; + +var _helperCodeFrame = __webpack_require__(48333); + +var t = _interopRequireWildcard(__webpack_require__(98688)); + +var _numberLiterals = __webpack_require__(3425); + +var _stringLiterals = __webpack_require__(27481); + +var _tokenizer = __webpack_require__(57261); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function hasPlugin(name) { + if (name !== "wast") throw new Error("unknow plugin"); + return true; +} + +function isKeyword(token, id) { + return token.type === _tokenizer.tokens.keyword && token.value === id; +} + +function tokenToString(token) { + if (token.type === "keyword") { + return "keyword (".concat(token.value, ")"); + } + + return token.type; +} + +function identifierFromToken(token) { + var _token$loc = token.loc, + end = _token$loc.end, + start = _token$loc.start; + return t.withLoc(t.identifier(token.value), end, start); +} + +function parse(tokensList, source) { + var current = 0; + var getUniqueName = t.getUniqueNameGenerator(); + var state = { + registredExportedElements: [] + }; // But this time we're going to use recursion instead of a `while` loop. So we + // define a `walk` function. + + function walk() { + var token = tokensList[current]; + + function eatToken() { + token = tokensList[++current]; + } + + function getEndLoc() { + var currentToken = token; + + if (typeof currentToken === "undefined") { + var lastToken = tokensList[tokensList.length - 1]; + currentToken = lastToken; + } + + return currentToken.loc.end; + } + + function getStartLoc() { + return token.loc.start; + } + + function eatTokenOfType(type) { + if (token.type !== type) { + throw new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "Assertion error: expected token of type " + type + ", given " + tokenToString(token)); + } + + eatToken(); + } + + function parseExportIndex(token) { + if (token.type === _tokenizer.tokens.identifier) { + var index = identifierFromToken(token); + eatToken(); + return index; + } else if (token.type === _tokenizer.tokens.number) { + var _index = t.numberLiteralFromRaw(token.value); + + eatToken(); + return _index; + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "unknown export index" + ", given " + tokenToString(token)); + }(); + } + } + + function lookaheadAndCheck() { + var len = arguments.length; + + for (var i = 0; i < len; i++) { + var tokenAhead = tokensList[current + i]; + var expectedToken = i < 0 || arguments.length <= i ? undefined : arguments[i]; + + if (tokenAhead.type === "keyword") { + if (isKeyword(tokenAhead, expectedToken) === false) { + return false; + } + } else if (expectedToken !== tokenAhead.type) { + return false; + } + } + + return true; + } // TODO(sven): there is probably a better way to do this + // can refactor it if it get out of hands + + + function maybeIgnoreComment() { + if (typeof token === "undefined") { + // Ignore + return; + } + + while (token.type === _tokenizer.tokens.comment) { + eatToken(); + + if (typeof token === "undefined") { + // Hit the end + break; + } + } + } + /** + * Parses a memory instruction + * + * WAST: + * + * memory: ( memory ? ) + * ( memory ? ( export ) <...> ) + * ( memory ? ( import ) ) + * ( memory ? ( export )* ( data * ) + * memory_sig: ? + * + */ + + + function parseMemory() { + var id = t.identifier(getUniqueName("memory")); + var limits = t.limit(0); + + if (token.type === _tokenizer.tokens.string || token.type === _tokenizer.tokens.identifier) { + id = t.identifier(token.value); + eatToken(); + } else { + id = t.withRaw(id, ""); // preserve anonymous + } + /** + * Maybe data + */ + + + if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.data)) { + eatToken(); // ( + + eatToken(); // data + // TODO(sven): do something with the data collected here + + var stringInitializer = token.value; + eatTokenOfType(_tokenizer.tokens.string); // Update limits accordingly + + limits = t.limit(stringInitializer.length); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + /** + * Maybe export + */ + + + if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.export)) { + eatToken(); // ( + + eatToken(); // export + + if (token.type !== _tokenizer.tokens.string) { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Expected string in export" + ", given " + tokenToString(token)); + }(); + } + + var _name = token.value; + eatToken(); + state.registredExportedElements.push({ + exportType: "Memory", + name: _name, + id: id + }); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + /** + * Memory signature + */ + + + if (token.type === _tokenizer.tokens.number) { + limits = t.limit((0, _numberLiterals.parse32I)(token.value)); + eatToken(); + + if (token.type === _tokenizer.tokens.number) { + limits.max = (0, _numberLiterals.parse32I)(token.value); + eatToken(); + } + } + + return t.memory(limits, id); + } + /** + * Parses a data section + * https://webassembly.github.io/spec/core/text/modules.html#data-segments + * + * WAST: + * + * data: ( data ? ) + */ + + + function parseData() { + // optional memory index + var memidx = 0; + + if (token.type === _tokenizer.tokens.number) { + memidx = token.value; + eatTokenOfType(_tokenizer.tokens.number); // . + } + + eatTokenOfType(_tokenizer.tokens.openParen); + var offset; + + if (token.type === _tokenizer.tokens.valtype) { + eatTokenOfType(_tokenizer.tokens.valtype); // i32 + + eatTokenOfType(_tokenizer.tokens.dot); // . + + if (token.value !== "const") { + throw new Error("constant expression required"); + } + + eatTokenOfType(_tokenizer.tokens.name); // const + + var numberLiteral = t.numberLiteralFromRaw(token.value, "i32"); + offset = t.objectInstruction("const", "i32", [numberLiteral]); + eatToken(); + eatTokenOfType(_tokenizer.tokens.closeParen); + } else { + eatTokenOfType(_tokenizer.tokens.name); // get_global + + var _numberLiteral = t.numberLiteralFromRaw(token.value, "i32"); + + offset = t.instruction("get_global", [_numberLiteral]); + eatToken(); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + var byteArray = (0, _stringLiterals.parseString)(token.value); + eatToken(); // "string" + + return t.data(t.memIndexLiteral(memidx), offset, t.byteArray(byteArray)); + } + /** + * Parses a table instruction + * + * WAST: + * + * table: ( table ? ) + * ( table ? ( export ) <...> ) + * ( table ? ( import ) ) + * ( table ? ( export )* ( elem * ) ) + * + * table_type: ? + * elem_type: anyfunc + * + * elem: ( elem ? (offset * ) * ) + * ( elem ? * ) + */ + + + function parseTable() { + var name = t.identifier(getUniqueName("table")); + var limit = t.limit(0); + var elemIndices = []; + var elemType = "anyfunc"; + + if (token.type === _tokenizer.tokens.string || token.type === _tokenizer.tokens.identifier) { + name = identifierFromToken(token); + eatToken(); + } else { + name = t.withRaw(name, ""); // preserve anonymous + } + + while (token.type !== _tokenizer.tokens.closeParen) { + /** + * Maybe export + */ + if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.elem)) { + eatToken(); // ( + + eatToken(); // elem + + while (token.type === _tokenizer.tokens.identifier) { + elemIndices.push(t.identifier(token.value)); + eatToken(); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + } else if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.export)) { + eatToken(); // ( + + eatToken(); // export + + if (token.type !== _tokenizer.tokens.string) { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Expected string in export" + ", given " + tokenToString(token)); + }(); + } + + var exportName = token.value; + eatToken(); + state.registredExportedElements.push({ + exportType: "Table", + name: exportName, + id: name + }); + eatTokenOfType(_tokenizer.tokens.closeParen); + } else if (isKeyword(token, _tokenizer.keywords.anyfunc)) { + // It's the default value, we can ignore it + eatToken(); // anyfunc + } else if (token.type === _tokenizer.tokens.number) { + /** + * Table type + */ + var min = parseInt(token.value); + eatToken(); + + if (token.type === _tokenizer.tokens.number) { + var max = parseInt(token.value); + eatToken(); + limit = t.limit(min, max); + } else { + limit = t.limit(min); + } + + eatToken(); + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token" + ", given " + tokenToString(token)); + }(); + } + } + + if (elemIndices.length > 0) { + return t.table(elemType, limit, name, elemIndices); + } else { + return t.table(elemType, limit, name); + } + } + /** + * Parses an import statement + * + * WAST: + * + * import: ( import ) + * imkind: ( func ? ) + * ( global ? ) + * ( table ? ) + * ( memory ? ) + * + * global_sig: | ( mut ) + */ + + + function parseImport() { + if (token.type !== _tokenizer.tokens.string) { + throw new Error("Expected a string, " + token.type + " given."); + } + + var moduleName = token.value; + eatToken(); + + if (token.type !== _tokenizer.tokens.string) { + throw new Error("Expected a string, " + token.type + " given."); + } + + var name = token.value; + eatToken(); + eatTokenOfType(_tokenizer.tokens.openParen); + var descr; + + if (isKeyword(token, _tokenizer.keywords.func)) { + eatToken(); // keyword + + var fnParams = []; + var fnResult = []; + var typeRef; + var fnName = t.identifier(getUniqueName("func")); + + if (token.type === _tokenizer.tokens.identifier) { + fnName = identifierFromToken(token); + eatToken(); + } + + while (token.type === _tokenizer.tokens.openParen) { + eatToken(); + + if (lookaheadAndCheck(_tokenizer.keywords.type) === true) { + eatToken(); + typeRef = parseTypeReference(); + } else if (lookaheadAndCheck(_tokenizer.keywords.param) === true) { + eatToken(); + fnParams.push.apply(fnParams, _toConsumableArray(parseFuncParam())); + } else if (lookaheadAndCheck(_tokenizer.keywords.result) === true) { + eatToken(); + fnResult.push.apply(fnResult, _toConsumableArray(parseFuncResult())); + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in import of type" + ", given " + tokenToString(token)); + }(); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + if (typeof fnName === "undefined") { + throw new Error("Imported function must have a name"); + } + + descr = t.funcImportDescr(fnName, typeRef !== undefined ? typeRef : t.signature(fnParams, fnResult)); + } else if (isKeyword(token, _tokenizer.keywords.global)) { + eatToken(); // keyword + + if (token.type === _tokenizer.tokens.openParen) { + eatToken(); // ( + + eatTokenOfType(_tokenizer.tokens.keyword); // mut keyword + + var valtype = token.value; + eatToken(); + descr = t.globalType(valtype, "var"); + eatTokenOfType(_tokenizer.tokens.closeParen); + } else { + var _valtype = token.value; + eatTokenOfType(_tokenizer.tokens.valtype); + descr = t.globalType(_valtype, "const"); + } + } else if (isKeyword(token, _tokenizer.keywords.memory) === true) { + eatToken(); // Keyword + + descr = parseMemory(); + } else if (isKeyword(token, _tokenizer.keywords.table) === true) { + eatToken(); // Keyword + + descr = parseTable(); + } else { + throw new Error("Unsupported import type: " + tokenToString(token)); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.moduleImport(moduleName, name, descr); + } + /** + * Parses a block instruction + * + * WAST: + * + * expr: ( block ? * ) + * instr: block ? * end ? + * block_sig : ( result * )* + * + */ + + + function parseBlock() { + var label = t.identifier(getUniqueName("block")); + var blockResult = null; + var instr = []; + + if (token.type === _tokenizer.tokens.identifier) { + label = identifierFromToken(token); + eatToken(); + } else { + label = t.withRaw(label, ""); // preserve anonymous + } + + while (token.type === _tokenizer.tokens.openParen) { + eatToken(); + + if (lookaheadAndCheck(_tokenizer.keywords.result) === true) { + eatToken(); + blockResult = token.value; + eatToken(); + } else if (lookaheadAndCheck(_tokenizer.tokens.name) === true || lookaheadAndCheck(_tokenizer.tokens.valtype) === true || token.type === "keyword" // is any keyword + ) { + // Instruction + instr.push(parseFuncInstr()); + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in block body of type" + ", given " + tokenToString(token)); + }(); + } + + maybeIgnoreComment(); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + return t.blockInstruction(label, instr, blockResult); + } + /** + * Parses a if instruction + * + * WAST: + * + * expr: + * ( if ? ( then * ) ( else * )? ) + * ( if ? + ( then * ) ( else * )? ) + * + * instr: + * if ? * end ? + * if ? * else ? * end ? + * + * block_sig : ( result * )* + * + */ + + + function parseIf() { + var blockResult = null; + var label = t.identifier(getUniqueName("if")); + var testInstrs = []; + var consequent = []; + var alternate = []; + + if (token.type === _tokenizer.tokens.identifier) { + label = identifierFromToken(token); + eatToken(); + } else { + label = t.withRaw(label, ""); // preserve anonymous + } + + while (token.type === _tokenizer.tokens.openParen) { + eatToken(); // ( + + /** + * Block signature + */ + + if (isKeyword(token, _tokenizer.keywords.result) === true) { + eatToken(); + blockResult = token.value; + eatTokenOfType(_tokenizer.tokens.valtype); + eatTokenOfType(_tokenizer.tokens.closeParen); + continue; + } + /** + * Then + */ + + + if (isKeyword(token, _tokenizer.keywords.then) === true) { + eatToken(); // then + + while (token.type === _tokenizer.tokens.openParen) { + eatToken(); // Instruction + + if (lookaheadAndCheck(_tokenizer.tokens.name) === true || lookaheadAndCheck(_tokenizer.tokens.valtype) === true || token.type === "keyword" // is any keyword + ) { + consequent.push(parseFuncInstr()); + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in consequent body of type" + ", given " + tokenToString(token)); + }(); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + continue; + } + /** + * Alternate + */ + + + if (isKeyword(token, _tokenizer.keywords.else)) { + eatToken(); // else + + while (token.type === _tokenizer.tokens.openParen) { + eatToken(); // Instruction + + if (lookaheadAndCheck(_tokenizer.tokens.name) === true || lookaheadAndCheck(_tokenizer.tokens.valtype) === true || token.type === "keyword" // is any keyword + ) { + alternate.push(parseFuncInstr()); + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in alternate body of type" + ", given " + tokenToString(token)); + }(); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + continue; + } + /** + * Test instruction + */ + + + if (lookaheadAndCheck(_tokenizer.tokens.name) === true || lookaheadAndCheck(_tokenizer.tokens.valtype) === true || token.type === "keyword" // is any keyword + ) { + testInstrs.push(parseFuncInstr()); + eatTokenOfType(_tokenizer.tokens.closeParen); + continue; + } + + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in if body" + ", given " + tokenToString(token)); + }(); + } + + return t.ifInstruction(label, testInstrs, blockResult, consequent, alternate); + } + /** + * Parses a loop instruction + * + * WAT: + * + * blockinstr :: 'loop' I:label rt:resulttype (in:instr*) 'end' id? + * + * WAST: + * + * instr :: loop ? * end ? + * expr :: ( loop ? * ) + * block_sig :: ( result * )* + * + */ + + + function parseLoop() { + var label = t.identifier(getUniqueName("loop")); + var blockResult; + var instr = []; + + if (token.type === _tokenizer.tokens.identifier) { + label = identifierFromToken(token); + eatToken(); + } else { + label = t.withRaw(label, ""); // preserve anonymous + } + + while (token.type === _tokenizer.tokens.openParen) { + eatToken(); + + if (lookaheadAndCheck(_tokenizer.keywords.result) === true) { + eatToken(); + blockResult = token.value; + eatToken(); + } else if (lookaheadAndCheck(_tokenizer.tokens.name) === true || lookaheadAndCheck(_tokenizer.tokens.valtype) === true || token.type === "keyword" // is any keyword + ) { + // Instruction + instr.push(parseFuncInstr()); + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in loop body" + ", given " + tokenToString(token)); + }(); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + return t.loopInstruction(label, blockResult, instr); + } + + function parseCallIndirect() { + var typeRef; + var params = []; + var results = []; + var instrs = []; + + while (token.type !== _tokenizer.tokens.closeParen) { + if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.type)) { + eatToken(); // ( + + eatToken(); // type + + typeRef = parseTypeReference(); + } else if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.param)) { + eatToken(); // ( + + eatToken(); // param + + /** + * Params can be empty: + * (params)` + */ + + if (token.type !== _tokenizer.tokens.closeParen) { + params.push.apply(params, _toConsumableArray(parseFuncParam())); + } + } else if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.result)) { + eatToken(); // ( + + eatToken(); // result + + /** + * Results can be empty: + * (result)` + */ + + if (token.type !== _tokenizer.tokens.closeParen) { + results.push.apply(results, _toConsumableArray(parseFuncResult())); + } + } else { + eatTokenOfType(_tokenizer.tokens.openParen); + instrs.push(parseFuncInstr()); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + return t.callIndirectInstruction(typeRef !== undefined ? typeRef : t.signature(params, results), instrs); + } + /** + * Parses an export instruction + * + * WAT: + * + * export: ( export ) + * exkind: ( func ) + * ( global ) + * ( table ) + * ( memory ) + * var: | + * + */ + + + function parseExport() { + if (token.type !== _tokenizer.tokens.string) { + throw new Error("Expected string after export, got: " + token.type); + } + + var name = token.value; + eatToken(); + var moduleExportDescr = parseModuleExportDescr(); + return t.moduleExport(name, moduleExportDescr); + } + + function parseModuleExportDescr() { + var startLoc = getStartLoc(); + var type = ""; + var index; + eatTokenOfType(_tokenizer.tokens.openParen); + + while (token.type !== _tokenizer.tokens.closeParen) { + if (isKeyword(token, _tokenizer.keywords.func)) { + type = "Func"; + eatToken(); + index = parseExportIndex(token); + } else if (isKeyword(token, _tokenizer.keywords.table)) { + type = "Table"; + eatToken(); + index = parseExportIndex(token); + } else if (isKeyword(token, _tokenizer.keywords.global)) { + type = "Global"; + eatToken(); + index = parseExportIndex(token); + } else if (isKeyword(token, _tokenizer.keywords.memory)) { + type = "Memory"; + eatToken(); + index = parseExportIndex(token); + } + + eatToken(); + } + + if (type === "") { + throw new Error("Unknown export type"); + } + + if (index === undefined) { + throw new Error("Exported function must have a name"); + } + + var node = t.moduleExportDescr(type, index); + var endLoc = getEndLoc(); + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(node, endLoc, startLoc); + } + + function parseModule() { + var name = null; + var isBinary = false; + var isQuote = false; + var moduleFields = []; + + if (token.type === _tokenizer.tokens.identifier) { + name = token.value; + eatToken(); + } + + if (hasPlugin("wast") && token.type === _tokenizer.tokens.name && token.value === "binary") { + eatToken(); + isBinary = true; + } + + if (hasPlugin("wast") && token.type === _tokenizer.tokens.name && token.value === "quote") { + eatToken(); + isQuote = true; + } + + if (isBinary === true) { + var blob = []; + + while (token.type === _tokenizer.tokens.string) { + blob.push(token.value); + eatToken(); + maybeIgnoreComment(); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.binaryModule(name, blob); + } + + if (isQuote === true) { + var string = []; + + while (token.type === _tokenizer.tokens.string) { + string.push(token.value); + eatToken(); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.quoteModule(name, string); + } + + while (token.type !== _tokenizer.tokens.closeParen) { + moduleFields.push(walk()); + + if (state.registredExportedElements.length > 0) { + state.registredExportedElements.forEach(function (decl) { + moduleFields.push(t.moduleExport(decl.name, t.moduleExportDescr(decl.exportType, decl.id))); + }); + state.registredExportedElements = []; + } + + token = tokensList[current]; + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.module(name, moduleFields); + } + /** + * Parses the arguments of an instruction + */ + + + function parseFuncInstrArguments(signature) { + var args = []; + var namedArgs = {}; + var signaturePtr = 0; + + while (token.type === _tokenizer.tokens.name || isKeyword(token, _tokenizer.keywords.offset)) { + var key = token.value; + eatToken(); + eatTokenOfType(_tokenizer.tokens.equal); + var value = void 0; + + if (token.type === _tokenizer.tokens.number) { + value = t.numberLiteralFromRaw(token.value); + } else { + throw new Error("Unexpected type for argument: " + token.type); + } + + namedArgs[key] = value; + eatToken(); + } // $FlowIgnore + + + var signatureLength = signature.vector ? Infinity : signature.length; + + while (token.type !== _tokenizer.tokens.closeParen && ( // $FlowIgnore + token.type === _tokenizer.tokens.openParen || signaturePtr < signatureLength)) { + if (token.type === _tokenizer.tokens.identifier) { + args.push(t.identifier(token.value)); + eatToken(); + } else if (token.type === _tokenizer.tokens.valtype) { + // Handle locals + args.push(t.valtypeLiteral(token.value)); + eatToken(); + } else if (token.type === _tokenizer.tokens.string) { + args.push(t.stringLiteral(token.value)); + eatToken(); + } else if (token.type === _tokenizer.tokens.number) { + args.push( // TODO(sven): refactor the type signature handling + // https://github.com/xtuc/webassemblyjs/pull/129 is a good start + t.numberLiteralFromRaw(token.value, // $FlowIgnore + signature[signaturePtr] || "f64")); // $FlowIgnore + + if (!signature.vector) { + ++signaturePtr; + } + + eatToken(); + } else if (token.type === _tokenizer.tokens.openParen) { + /** + * Maybe some nested instructions + */ + eatToken(); // Instruction + + if (lookaheadAndCheck(_tokenizer.tokens.name) === true || lookaheadAndCheck(_tokenizer.tokens.valtype) === true || token.type === "keyword" // is any keyword + ) { + // $FlowIgnore + args.push(parseFuncInstr()); + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in nested instruction" + ", given " + tokenToString(token)); + }(); + } + + if (token.type === _tokenizer.tokens.closeParen) { + eatToken(); + } + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in instruction argument" + ", given " + tokenToString(token)); + }(); + } + } + + return { + args: args, + namedArgs: namedArgs + }; + } + /** + * Parses an instruction + * + * WAT: + * + * instr :: plaininst + * blockinstr + * + * blockinstr :: 'block' I:label rt:resulttype (in:instr*) 'end' id? + * 'loop' I:label rt:resulttype (in:instr*) 'end' id? + * 'if' I:label rt:resulttype (in:instr*) 'else' id? (in2:intr*) 'end' id? + * + * plaininst :: 'unreachable' + * 'nop' + * 'br' l:labelidx + * 'br_if' l:labelidx + * 'br_table' l*:vec(labelidx) ln:labelidx + * 'return' + * 'call' x:funcidx + * 'call_indirect' x, I:typeuse + * + * WAST: + * + * instr: + * + * + * block ? * end ? + * loop ? * end ? + * if ? * end ? + * if ? * else ? * end ? + * + * expr: + * ( ) + * ( + ) + * ( block ? * ) + * ( loop ? * ) + * ( if ? ( then * ) ( else * )? ) + * ( if ? + ( then * ) ( else * )? ) + * + * op: + * unreachable + * nop + * br + * br_if + * br_table + + * return + * call + * call_indirect + * drop + * select + * get_local + * set_local + * tee_local + * get_global + * set_global + * .load((8|16|32)_)? ? ? + * .store(8|16|32)? ? ? + * current_memory + * grow_memory + * .const + * . + * . + * . + * . + * ./ + * + * func_type: ( type )? * * + */ + + + function parseFuncInstr() { + var startLoc = getStartLoc(); + maybeIgnoreComment(); + /** + * A simple instruction + */ + + if (token.type === _tokenizer.tokens.name || token.type === _tokenizer.tokens.valtype) { + var _name2 = token.value; + var object; + eatToken(); + + if (token.type === _tokenizer.tokens.dot) { + object = _name2; + eatToken(); + + if (token.type !== _tokenizer.tokens.name) { + throw new TypeError("Unknown token: " + token.type + ", name expected"); + } + + _name2 = token.value; + eatToken(); + } + + if (token.type === _tokenizer.tokens.closeParen) { + var _endLoc = token.loc.end; + + if (typeof object === "undefined") { + return t.withLoc(t.instruction(_name2), _endLoc, startLoc); + } else { + return t.withLoc(t.objectInstruction(_name2, object, []), _endLoc, startLoc); + } + } + + var signature = t.signatureForOpcode(object || "", _name2); + + var _parseFuncInstrArgume = parseFuncInstrArguments(signature), + _args = _parseFuncInstrArgume.args, + _namedArgs = _parseFuncInstrArgume.namedArgs; + + var endLoc = token.loc.end; + + if (typeof object === "undefined") { + return t.withLoc(t.instruction(_name2, _args, _namedArgs), endLoc, startLoc); + } else { + return t.withLoc(t.objectInstruction(_name2, object, _args, _namedArgs), endLoc, startLoc); + } + } else if (isKeyword(token, _tokenizer.keywords.loop)) { + /** + * Else a instruction with a keyword (loop or block) + */ + eatToken(); // keyword + + return parseLoop(); + } else if (isKeyword(token, _tokenizer.keywords.block)) { + eatToken(); // keyword + + return parseBlock(); + } else if (isKeyword(token, _tokenizer.keywords.call_indirect)) { + eatToken(); // keyword + + return parseCallIndirect(); + } else if (isKeyword(token, _tokenizer.keywords.call)) { + eatToken(); // keyword + + var index; + + if (token.type === _tokenizer.tokens.identifier) { + index = identifierFromToken(token); + eatToken(); + } else if (token.type === _tokenizer.tokens.number) { + index = t.indexLiteral(token.value); + eatToken(); + } + + var instrArgs = []; // Nested instruction + + while (token.type === _tokenizer.tokens.openParen) { + eatToken(); + instrArgs.push(parseFuncInstr()); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + if (typeof index === "undefined") { + throw new Error("Missing argument in call instruciton"); + } + + if (instrArgs.length > 0) { + return t.callInstruction(index, instrArgs); + } else { + return t.callInstruction(index); + } + } else if (isKeyword(token, _tokenizer.keywords.if)) { + eatToken(); // Keyword + + return parseIf(); + } else if (isKeyword(token, _tokenizer.keywords.module) && hasPlugin("wast")) { + eatToken(); // In WAST you can have a module as an instruction's argument + // we will cast it into a instruction to not break the flow + // $FlowIgnore + + var module = parseModule(); + return module; + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected instruction in function body" + ", given " + tokenToString(token)); + }(); + } + } + /* + * Parses a function + * + * WAT: + * + * functype :: ( 'func' t1:vec(param) t2:vec(result) ) + * param :: ( 'param' id? t:valtype ) + * result :: ( 'result' t:valtype ) + * + * WAST: + * + * func :: ( func ? * * ) + * ( func ? ( export ) <...> ) + * ( func ? ( import ) ) + * func_sig :: ( type )? * * + * param :: ( param * ) | ( param ) + * result :: ( result * ) + * local :: ( local * ) | ( local ) + * + */ + + + function parseFunc() { + var fnName = t.identifier(getUniqueName("func")); + var typeRef; + var fnBody = []; + var fnParams = []; + var fnResult = []; // name + + if (token.type === _tokenizer.tokens.identifier) { + fnName = identifierFromToken(token); + eatToken(); + } else { + fnName = t.withRaw(fnName, ""); // preserve anonymous + } + + maybeIgnoreComment(); + + while (token.type === _tokenizer.tokens.openParen || token.type === _tokenizer.tokens.name || token.type === _tokenizer.tokens.valtype) { + // Instructions without parens + if (token.type === _tokenizer.tokens.name || token.type === _tokenizer.tokens.valtype) { + fnBody.push(parseFuncInstr()); + continue; + } + + eatToken(); + + if (lookaheadAndCheck(_tokenizer.keywords.param) === true) { + eatToken(); + fnParams.push.apply(fnParams, _toConsumableArray(parseFuncParam())); + } else if (lookaheadAndCheck(_tokenizer.keywords.result) === true) { + eatToken(); + fnResult.push.apply(fnResult, _toConsumableArray(parseFuncResult())); + } else if (lookaheadAndCheck(_tokenizer.keywords.export) === true) { + eatToken(); + parseFuncExport(fnName); + } else if (lookaheadAndCheck(_tokenizer.keywords.type) === true) { + eatToken(); + typeRef = parseTypeReference(); + } else if (lookaheadAndCheck(_tokenizer.tokens.name) === true || lookaheadAndCheck(_tokenizer.tokens.valtype) === true || token.type === "keyword" // is any keyword + ) { + // Instruction + fnBody.push(parseFuncInstr()); + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in func body" + ", given " + tokenToString(token)); + }(); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + return t.func(fnName, typeRef !== undefined ? typeRef : t.signature(fnParams, fnResult), fnBody); + } + /** + * Parses shorthand export in func + * + * export :: ( export ) + */ + + + function parseFuncExport(funcId) { + if (token.type !== _tokenizer.tokens.string) { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Function export expected a string" + ", given " + tokenToString(token)); + }(); + } + + var name = token.value; + eatToken(); + /** + * Func export shorthand, we trait it as a syntaxic sugar. + * A export ModuleField will be added later. + * + * We give the anonymous function a generated name and export it. + */ + + var id = t.identifier(funcId.value); + state.registredExportedElements.push({ + exportType: "Func", + name: name, + id: id + }); + } + /** + * Parses a type instruction + * + * WAST: + * + * typedef: ( type ? ( func * * ) ) + */ + + + function parseType() { + var id; + var params = []; + var result = []; + + if (token.type === _tokenizer.tokens.identifier) { + id = identifierFromToken(token); + eatToken(); + } + + if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.func)) { + eatToken(); // ( + + eatToken(); // func + + if (token.type === _tokenizer.tokens.closeParen) { + eatToken(); // function with an empty signature, we can abort here + + return t.typeInstruction(id, t.signature([], [])); + } + + if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.param)) { + eatToken(); // ( + + eatToken(); // param + + params = parseFuncParam(); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.result)) { + eatToken(); // ( + + eatToken(); // result + + result = parseFuncResult(); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + return t.typeInstruction(id, t.signature(params, result)); + } + /** + * Parses a function result + * + * WAST: + * + * result :: ( result * ) + */ + + + function parseFuncResult() { + var results = []; + + while (token.type !== _tokenizer.tokens.closeParen) { + if (token.type !== _tokenizer.tokens.valtype) { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in func result" + ", given " + tokenToString(token)); + }(); + } + + var valtype = token.value; + eatToken(); + results.push(valtype); + } + + return results; + } + /** + * Parses a type reference + * + */ + + + function parseTypeReference() { + var ref; + + if (token.type === _tokenizer.tokens.identifier) { + ref = identifierFromToken(token); + eatToken(); + } else if (token.type === _tokenizer.tokens.number) { + ref = t.numberLiteralFromRaw(token.value); + eatToken(); + } + + return ref; + } + /** + * Parses a global instruction + * + * WAST: + * + * global: ( global ? * ) + * ( global ? ( export ) <...> ) + * ( global ? ( import ) ) + * + * global_sig: | ( mut ) + * + */ + + + function parseGlobal() { + var name = t.identifier(getUniqueName("global")); + var type; // Keep informations in case of a shorthand import + + var importing = null; + maybeIgnoreComment(); + + if (token.type === _tokenizer.tokens.identifier) { + name = identifierFromToken(token); + eatToken(); + } else { + name = t.withRaw(name, ""); // preserve anonymous + } + /** + * maybe export + */ + + + if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.export)) { + eatToken(); // ( + + eatToken(); // export + + var exportName = token.value; + eatTokenOfType(_tokenizer.tokens.string); + state.registredExportedElements.push({ + exportType: "Global", + name: exportName, + id: name + }); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + /** + * maybe import + */ + + + if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.import)) { + eatToken(); // ( + + eatToken(); // import + + var moduleName = token.value; + eatTokenOfType(_tokenizer.tokens.string); + var _name3 = token.value; + eatTokenOfType(_tokenizer.tokens.string); + importing = { + module: moduleName, + name: _name3, + descr: undefined + }; + eatTokenOfType(_tokenizer.tokens.closeParen); + } + /** + * global_sig + */ + + + if (token.type === _tokenizer.tokens.valtype) { + type = t.globalType(token.value, "const"); + eatToken(); + } else if (token.type === _tokenizer.tokens.openParen) { + eatToken(); // ( + + if (isKeyword(token, _tokenizer.keywords.mut) === false) { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unsupported global type, expected mut" + ", given " + tokenToString(token)); + }(); + } + + eatToken(); // mut + + type = t.globalType(token.value, "var"); + eatToken(); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + if (type === undefined) { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Could not determine global type" + ", given " + tokenToString(token)); + }(); + } + + maybeIgnoreComment(); + var init = []; + + if (importing != null) { + importing.descr = type; + init.push(t.moduleImport(importing.module, importing.name, importing.descr)); + } + /** + * instr* + */ + + + while (token.type === _tokenizer.tokens.openParen) { + eatToken(); + init.push(parseFuncInstr()); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + return t.global(type, init, name); + } + /** + * Parses a function param + * + * WAST: + * + * param :: ( param * ) | ( param ) + */ + + + function parseFuncParam() { + var params = []; + var id; + var valtype; + + if (token.type === _tokenizer.tokens.identifier) { + id = token.value; + eatToken(); + } + + if (token.type === _tokenizer.tokens.valtype) { + valtype = token.value; + eatToken(); + params.push({ + id: id, + valtype: valtype + }); + /** + * Shorthand notation for multiple anonymous parameters + * @see https://webassembly.github.io/spec/core/text/types.html#function-types + * @see https://github.com/xtuc/webassemblyjs/issues/6 + */ + + if (id === undefined) { + while (token.type === _tokenizer.tokens.valtype) { + valtype = token.value; + eatToken(); + params.push({ + id: undefined, + valtype: valtype + }); + } + } + } else {// ignore + } + + return params; + } + /** + * Parses an element segments instruction + * + * WAST: + * + * elem: ( elem ? (offset * ) * ) + * ( elem ? * ) + * + * var: | + */ + + + function parseElem() { + var tableIndex = t.indexLiteral(0); + var offset = []; + var funcs = []; + + if (token.type === _tokenizer.tokens.identifier) { + tableIndex = identifierFromToken(token); + eatToken(); + } + + if (token.type === _tokenizer.tokens.number) { + tableIndex = t.indexLiteral(token.value); + eatToken(); + } + + while (token.type !== _tokenizer.tokens.closeParen) { + if (lookaheadAndCheck(_tokenizer.tokens.openParen, _tokenizer.keywords.offset)) { + eatToken(); // ( + + eatToken(); // offset + + while (token.type !== _tokenizer.tokens.closeParen) { + eatTokenOfType(_tokenizer.tokens.openParen); + offset.push(parseFuncInstr()); + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + eatTokenOfType(_tokenizer.tokens.closeParen); + } else if (token.type === _tokenizer.tokens.identifier) { + funcs.push(t.identifier(token.value)); + eatToken(); + } else if (token.type === _tokenizer.tokens.number) { + funcs.push(t.indexLiteral(token.value)); + eatToken(); + } else if (token.type === _tokenizer.tokens.openParen) { + eatToken(); // ( + + offset.push(parseFuncInstr()); + eatTokenOfType(_tokenizer.tokens.closeParen); + } else { + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unsupported token in elem" + ", given " + tokenToString(token)); + }(); + } + } + + return t.elem(tableIndex, offset, funcs); + } + /** + * Parses the start instruction in a module + * + * WAST: + * + * start: ( start ) + * var: | + * + * WAT: + * start ::= ‘(’ ‘start’ x:funcidx ‘)’ + */ + + + function parseStart() { + if (token.type === _tokenizer.tokens.identifier) { + var index = identifierFromToken(token); + eatToken(); + return t.start(index); + } + + if (token.type === _tokenizer.tokens.number) { + var _index2 = t.indexLiteral(token.value); + + eatToken(); + return t.start(_index2); + } + + throw new Error("Unknown start, token: " + tokenToString(token)); + } + + if (token.type === _tokenizer.tokens.openParen) { + eatToken(); + var startLoc = getStartLoc(); + + if (isKeyword(token, _tokenizer.keywords.export)) { + eatToken(); + var node = parseExport(); + + var _endLoc2 = getEndLoc(); + + return t.withLoc(node, _endLoc2, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.loop)) { + eatToken(); + + var _node = parseLoop(); + + var _endLoc3 = getEndLoc(); + + return t.withLoc(_node, _endLoc3, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.func)) { + eatToken(); + + var _node2 = parseFunc(); + + var _endLoc4 = getEndLoc(); + + maybeIgnoreComment(); + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(_node2, _endLoc4, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.module)) { + eatToken(); + + var _node3 = parseModule(); + + var _endLoc5 = getEndLoc(); + + return t.withLoc(_node3, _endLoc5, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.import)) { + eatToken(); + + var _node4 = parseImport(); + + var _endLoc6 = getEndLoc(); + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(_node4, _endLoc6, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.block)) { + eatToken(); + + var _node5 = parseBlock(); + + var _endLoc7 = getEndLoc(); + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(_node5, _endLoc7, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.memory)) { + eatToken(); + + var _node6 = parseMemory(); + + var _endLoc8 = getEndLoc(); + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(_node6, _endLoc8, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.data)) { + eatToken(); + + var _node7 = parseData(); + + var _endLoc9 = getEndLoc(); + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(_node7, _endLoc9, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.table)) { + eatToken(); + + var _node8 = parseTable(); + + var _endLoc10 = getEndLoc(); + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(_node8, _endLoc10, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.global)) { + eatToken(); + + var _node9 = parseGlobal(); + + var _endLoc11 = getEndLoc(); + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(_node9, _endLoc11, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.type)) { + eatToken(); + + var _node10 = parseType(); + + var _endLoc12 = getEndLoc(); + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(_node10, _endLoc12, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.start)) { + eatToken(); + + var _node11 = parseStart(); + + var _endLoc13 = getEndLoc(); + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(_node11, _endLoc13, startLoc); + } + + if (isKeyword(token, _tokenizer.keywords.elem)) { + eatToken(); + + var _node12 = parseElem(); + + var _endLoc14 = getEndLoc(); + + eatTokenOfType(_tokenizer.tokens.closeParen); + return t.withLoc(_node12, _endLoc14, startLoc); + } + + var instruction = parseFuncInstr(); + var endLoc = getEndLoc(); + maybeIgnoreComment(); + + if (_typeof(instruction) === "object") { + if (typeof token !== "undefined") { + eatTokenOfType(_tokenizer.tokens.closeParen); + } + + return t.withLoc(instruction, endLoc, startLoc); + } + } + + if (token.type === _tokenizer.tokens.comment) { + var _startLoc = getStartLoc(); + + var builder = token.opts.type === "leading" ? t.leadingComment : t.blockComment; + + var _node13 = builder(token.value); + + eatToken(); // comment + + var _endLoc15 = getEndLoc(); + + return t.withLoc(_node13, _endLoc15, _startLoc); + } + + throw function () { + return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unknown token" + ", given " + tokenToString(token)); + }(); + } + + var body = []; + + while (current < tokensList.length) { + body.push(walk()); + } + + return t.program(body); +} + +/***/ }), + +/***/ 9016: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +var _exportNames = { + parse: true +}; +exports.parse = parse; + +var parser = _interopRequireWildcard(__webpack_require__(68693)); + +var _tokenizer = __webpack_require__(57261); + +var _numberLiterals = __webpack_require__(3425); + +Object.keys(_numberLiterals).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _numberLiterals[key]; + } + }); +}); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function parse(source) { + var tokens = (0, _tokenizer.tokenize)(source); // We pass the source here to show code frames + + var ast = parser.parse(tokens, source); + return ast; +} + +/***/ }), + +/***/ 3425: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.parse32F = parse32F; +exports.parse64F = parse64F; +exports.parse32I = parse32I; +exports.parseU32 = parseU32; +exports.parse64I = parse64I; +exports.isInfLiteral = isInfLiteral; +exports.isNanLiteral = isNanLiteral; + +var _long = _interopRequireDefault(__webpack_require__(77960)); + +var _floatingPointHexParser = _interopRequireDefault(__webpack_require__(83268)); + +var _helperApiError = __webpack_require__(36194); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse32F(sourceString) { + if (isHexLiteral(sourceString)) { + return (0, _floatingPointHexParser.default)(sourceString); + } + + if (isInfLiteral(sourceString)) { + return sourceString[0] === "-" ? -1 : 1; + } + + if (isNanLiteral(sourceString)) { + return (sourceString[0] === "-" ? -1 : 1) * (sourceString.includes(":") ? parseInt(sourceString.substring(sourceString.indexOf(":") + 1), 16) : 0x400000); + } + + return parseFloat(sourceString); +} + +function parse64F(sourceString) { + if (isHexLiteral(sourceString)) { + return (0, _floatingPointHexParser.default)(sourceString); + } + + if (isInfLiteral(sourceString)) { + return sourceString[0] === "-" ? -1 : 1; + } + + if (isNanLiteral(sourceString)) { + return (sourceString[0] === "-" ? -1 : 1) * (sourceString.includes(":") ? parseInt(sourceString.substring(sourceString.indexOf(":") + 1), 16) : 0x8000000000000); + } + + if (isHexLiteral(sourceString)) { + return (0, _floatingPointHexParser.default)(sourceString); + } + + return parseFloat(sourceString); +} + +function parse32I(sourceString) { + var value = 0; + + if (isHexLiteral(sourceString)) { + value = ~~parseInt(sourceString, 16); + } else if (isDecimalExponentLiteral(sourceString)) { + throw new Error("This number literal format is yet to be implemented."); + } else { + value = parseInt(sourceString, 10); + } + + return value; +} + +function parseU32(sourceString) { + var value = parse32I(sourceString); + + if (value < 0) { + throw new _helperApiError.CompileError("Illegal value for u32: " + sourceString); + } + + return value; +} + +function parse64I(sourceString) { + var long; + + if (isHexLiteral(sourceString)) { + long = _long.default.fromString(sourceString, false, 16); + } else if (isDecimalExponentLiteral(sourceString)) { + throw new Error("This number literal format is yet to be implemented."); + } else { + long = _long.default.fromString(sourceString); + } + + return { + high: long.high, + low: long.low + }; +} + +var NAN_WORD = /^\+?-?nan/; +var INF_WORD = /^\+?-?inf/; + +function isInfLiteral(sourceString) { + return INF_WORD.test(sourceString.toLowerCase()); +} + +function isNanLiteral(sourceString) { + return NAN_WORD.test(sourceString.toLowerCase()); +} + +function isDecimalExponentLiteral(sourceString) { + return !isHexLiteral(sourceString) && sourceString.toUpperCase().includes("E"); +} + +function isHexLiteral(sourceString) { + return sourceString.substring(0, 2).toUpperCase() === "0X" || sourceString.substring(0, 3).toUpperCase() === "-0X"; +} + +/***/ }), + +/***/ 27481: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.parseString = parseString; +// string literal characters cannot contain control codes +var CONTROL_CODES = [0, // null +7, // bell +8, // backspace +9, // horizontal +10, // line feed +11, // vertical tab +12, // form feed +13, // carriage return +26, // Control-Z +27, // escape +127 // delete +]; // escaped sequences can either be a two character hex value, or one of the +// following single character codes + +function decodeControlCharacter(char) { + switch (char) { + case "t": + return 0x09; + + case "n": + return 0x0a; + + case "r": + return 0x0d; + + case '"': + return 0x22; + + case "′": + return 0x27; + + case "\\": + return 0x5c; + } + + return -1; +} + +var ESCAPE_CHAR = 92; // backslash + +var QUOTE_CHAR = 34; // backslash +// parse string as per the spec: +// https://webassembly.github.io/spec/core/multipage/text/values.html#text-string + +function parseString(value) { + var byteArray = []; + var index = 0; + + while (index < value.length) { + var charCode = value.charCodeAt(index); + + if (CONTROL_CODES.indexOf(charCode) !== -1) { + throw new Error("ASCII control characters are not permitted within string literals"); + } + + if (charCode === QUOTE_CHAR) { + throw new Error("quotes are not permitted within string literals"); + } + + if (charCode === ESCAPE_CHAR) { + var firstChar = value.substr(index + 1, 1); + var decodedControlChar = decodeControlCharacter(firstChar); + + if (decodedControlChar !== -1) { + // single character escaped values, e.g. \r + byteArray.push(decodedControlChar); + index += 2; + } else { + // hex escaped values, e.g. \2a + var hexValue = value.substr(index + 1, 2); + + if (!/^[0-9A-F]{2}$/i.test(hexValue)) { + throw new Error("invalid character encoding"); + } + + byteArray.push(parseInt(hexValue, 16)); + index += 3; + } + } else { + // ASCII encoded values + byteArray.push(charCode); + index++; + } + } + + return byteArray; +} + +/***/ }), + +/***/ 57261: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.tokenize = tokenize; +exports.tokens = exports.keywords = void 0; + +var _helperFsm = __webpack_require__(38902); + +var _helperCodeFrame = __webpack_require__(48333); + +// eslint-disable-next-line +function getCodeFrame(source, line, column) { + var loc = { + start: { + line: line, + column: column + } + }; + return "\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, loc) + "\n"; +} + +var WHITESPACE = /\s/; +var PARENS = /\(|\)/; +var LETTERS = /[a-z0-9_/]/i; +var idchar = /[a-z0-9!#$%&*+./:<=>?@\\[\]^_`|~-]/i; +var valtypes = ["i32", "i64", "f32", "f64"]; +var NUMBERS = /[0-9|.|_]/; +var NUMBER_KEYWORDS = /nan|inf/; + +function isNewLine(char) { + return char.charCodeAt(0) === 10 || char.charCodeAt(0) === 13; +} + +function Token(type, value, start, end) { + var opts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + var token = { + type: type, + value: value, + loc: { + start: start, + end: end + } + }; + + if (Object.keys(opts).length > 0) { + // $FlowIgnore + token["opts"] = opts; + } + + return token; +} + +var tokenTypes = { + openParen: "openParen", + closeParen: "closeParen", + number: "number", + string: "string", + name: "name", + identifier: "identifier", + valtype: "valtype", + dot: "dot", + comment: "comment", + equal: "equal", + keyword: "keyword" +}; +var keywords = { + module: "module", + func: "func", + param: "param", + result: "result", + export: "export", + loop: "loop", + block: "block", + if: "if", + then: "then", + else: "else", + call: "call", + call_indirect: "call_indirect", + import: "import", + memory: "memory", + table: "table", + global: "global", + anyfunc: "anyfunc", + mut: "mut", + data: "data", + type: "type", + elem: "elem", + start: "start", + offset: "offset" +}; +exports.keywords = keywords; +var NUMERIC_SEPARATOR = "_"; +/** + * Build the FSM for number literals + */ + +var numberLiteralFSM = new _helperFsm.FSM({ + START: [(0, _helperFsm.makeTransition)(/-|\+/, "AFTER_SIGN"), (0, _helperFsm.makeTransition)(/nan:0x/, "NAN_HEX", { + n: 6 + }), (0, _helperFsm.makeTransition)(/nan|inf/, "STOP", { + n: 3 + }), (0, _helperFsm.makeTransition)(/0x/, "HEX", { + n: 2 + }), (0, _helperFsm.makeTransition)(/[0-9]/, "DEC"), (0, _helperFsm.makeTransition)(/\./, "DEC_FRAC")], + AFTER_SIGN: [(0, _helperFsm.makeTransition)(/nan:0x/, "NAN_HEX", { + n: 6 + }), (0, _helperFsm.makeTransition)(/nan|inf/, "STOP", { + n: 3 + }), (0, _helperFsm.makeTransition)(/0x/, "HEX", { + n: 2 + }), (0, _helperFsm.makeTransition)(/[0-9]/, "DEC"), (0, _helperFsm.makeTransition)(/\./, "DEC_FRAC")], + DEC_FRAC: [(0, _helperFsm.makeTransition)(/[0-9]/, "DEC_FRAC", { + allowedSeparator: NUMERIC_SEPARATOR + }), (0, _helperFsm.makeTransition)(/e|E/, "DEC_SIGNED_EXP")], + DEC: [(0, _helperFsm.makeTransition)(/[0-9]/, "DEC", { + allowedSeparator: NUMERIC_SEPARATOR + }), (0, _helperFsm.makeTransition)(/\./, "DEC_FRAC"), (0, _helperFsm.makeTransition)(/e|E/, "DEC_SIGNED_EXP")], + DEC_SIGNED_EXP: [(0, _helperFsm.makeTransition)(/\+|-/, "DEC_EXP"), (0, _helperFsm.makeTransition)(/[0-9]/, "DEC_EXP")], + DEC_EXP: [(0, _helperFsm.makeTransition)(/[0-9]/, "DEC_EXP", { + allowedSeparator: NUMERIC_SEPARATOR + })], + HEX: [(0, _helperFsm.makeTransition)(/[0-9|A-F|a-f]/, "HEX", { + allowedSeparator: NUMERIC_SEPARATOR + }), (0, _helperFsm.makeTransition)(/\./, "HEX_FRAC"), (0, _helperFsm.makeTransition)(/p|P/, "HEX_SIGNED_EXP")], + HEX_FRAC: [(0, _helperFsm.makeTransition)(/[0-9|A-F|a-f]/, "HEX_FRAC", { + allowedSeparator: NUMERIC_SEPARATOR + }), (0, _helperFsm.makeTransition)(/p|P|/, "HEX_SIGNED_EXP")], + HEX_SIGNED_EXP: [(0, _helperFsm.makeTransition)(/[0-9|+|-]/, "HEX_EXP")], + HEX_EXP: [(0, _helperFsm.makeTransition)(/[0-9]/, "HEX_EXP", { + allowedSeparator: NUMERIC_SEPARATOR + })], + NAN_HEX: [(0, _helperFsm.makeTransition)(/[0-9|A-F|a-f]/, "NAN_HEX", { + allowedSeparator: NUMERIC_SEPARATOR + })], + STOP: [] +}, "START", "STOP"); + +function tokenize(input) { + var current = 0; + var char = input[current]; // Used by SourceLocation + + var column = 1; + var line = 1; + var tokens = []; + /** + * Creates a pushToken function for a given type + */ + + function pushToken(type) { + return function (v) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var startColumn = opts.startColumn || column - String(v).length; + delete opts.startColumn; + var endColumn = opts.endColumn || startColumn + String(v).length - 1; + delete opts.endColumn; + var start = { + line: line, + column: startColumn + }; + var end = { + line: line, + column: endColumn + }; + tokens.push(Token(type, v, start, end, opts)); + }; + } + /** + * Functions to save newly encountered tokens + */ + + + var pushCloseParenToken = pushToken(tokenTypes.closeParen); + var pushOpenParenToken = pushToken(tokenTypes.openParen); + var pushNumberToken = pushToken(tokenTypes.number); + var pushValtypeToken = pushToken(tokenTypes.valtype); + var pushNameToken = pushToken(tokenTypes.name); + var pushIdentifierToken = pushToken(tokenTypes.identifier); + var pushKeywordToken = pushToken(tokenTypes.keyword); + var pushDotToken = pushToken(tokenTypes.dot); + var pushStringToken = pushToken(tokenTypes.string); + var pushCommentToken = pushToken(tokenTypes.comment); + var pushEqualToken = pushToken(tokenTypes.equal); + /** + * Can be used to look at the next character(s). + * + * The default behavior `lookahead()` simply returns the next character without consuming it. + * Letters are always returned in lowercase. + * + * @param {number} length How many characters to query. Default = 1 + * @param {number} offset How many characters to skip forward from current one. Default = 1 + * + */ + + function lookahead() { + var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + return input.substring(current + offset, current + offset + length).toLowerCase(); + } + /** + * Advances the cursor in the input by a certain amount + * + * @param {number} amount How many characters to consume. Default = 1 + */ + + + function eatCharacter() { + var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + column += amount; + current += amount; + char = input[current]; + } + + while (current < input.length) { + // ;; + if (char === ";" && lookahead() === ";") { + var startColumn = column; + eatCharacter(2); + var text = ""; + + while (!isNewLine(char)) { + text += char; + eatCharacter(); + + if (char === undefined) { + break; + } + } + + var endColumn = column; + pushCommentToken(text, { + type: "leading", + startColumn: startColumn, + endColumn: endColumn + }); + continue; + } // (; + + + if (char === "(" && lookahead() === ";") { + var _startColumn = column; + eatCharacter(2); + var _text = ""; // ;) + + while (true) { + char = input[current]; + + if (char === ";" && lookahead() === ")") { + eatCharacter(2); + break; + } + + _text += char; + eatCharacter(); + + if (isNewLine(char)) { + line++; + column = 0; + } + } + + var _endColumn = column; + pushCommentToken(_text, { + type: "block", + startColumn: _startColumn, + endColumn: _endColumn + }); + continue; + } + + if (char === "(") { + pushOpenParenToken(char); + eatCharacter(); + continue; + } + + if (char === "=") { + pushEqualToken(char); + eatCharacter(); + continue; + } + + if (char === ")") { + pushCloseParenToken(char); + eatCharacter(); + continue; + } + + if (isNewLine(char)) { + line++; + eatCharacter(); + column = 0; + continue; + } + + if (WHITESPACE.test(char)) { + eatCharacter(); + continue; + } + + if (char === "$") { + var _startColumn2 = column; + eatCharacter(); + var value = ""; + + while (idchar.test(char)) { + value += char; + eatCharacter(); + } + + var _endColumn2 = column; + pushIdentifierToken(value, { + startColumn: _startColumn2, + endColumn: _endColumn2 + }); + continue; + } + + if (NUMBERS.test(char) || NUMBER_KEYWORDS.test(lookahead(3, 0)) || char === "-" || char === "+") { + var _startColumn3 = column; + + var _value = numberLiteralFSM.run(input.slice(current)); + + if (_value === "") { + throw new Error(getCodeFrame(input, line, column) + "Unexpected character " + JSON.stringify(char)); + } + + pushNumberToken(_value, { + startColumn: _startColumn3 + }); + eatCharacter(_value.length); + + if (char && !PARENS.test(char) && !WHITESPACE.test(char)) { + throw new Error(getCodeFrame(input, line, column) + "Unexpected character " + JSON.stringify(char)); + } + + continue; + } + + if (char === '"') { + var _startColumn4 = column; + var _value2 = ""; + eatCharacter(); // " + + while (char !== '"') { + if (isNewLine(char)) { + throw new Error(getCodeFrame(input, line, column) + "Unexpected character " + JSON.stringify(char)); + } + + _value2 += char; + eatCharacter(); // char + } + + eatCharacter(); // " + + var _endColumn3 = column; + pushStringToken(_value2, { + startColumn: _startColumn4, + endColumn: _endColumn3 + }); + continue; + } + + if (LETTERS.test(char)) { + var _value3 = ""; + var _startColumn5 = column; + + while (char && LETTERS.test(char)) { + _value3 += char; + eatCharacter(); + } + /* + * Handle MemberAccess + */ + + + if (char === ".") { + var dotStartColumn = column; + + if (valtypes.indexOf(_value3) !== -1) { + pushValtypeToken(_value3, { + startColumn: _startColumn5 + }); + } else { + pushNameToken(_value3); + } + + eatCharacter(); + _value3 = ""; + var nameStartColumn = column; + + while (LETTERS.test(char)) { + _value3 += char; + eatCharacter(); + } + + pushDotToken(".", { + startColumn: dotStartColumn + }); + pushNameToken(_value3, { + startColumn: nameStartColumn + }); + continue; + } + /* + * Handle keywords + */ + // $FlowIgnore + + + if (typeof keywords[_value3] === "string") { + pushKeywordToken(_value3, { + startColumn: _startColumn5 + }); + continue; + } + /* + * Handle types + */ + + + if (valtypes.indexOf(_value3) !== -1) { + pushValtypeToken(_value3, { + startColumn: _startColumn5 + }); + continue; + } + /* + * Handle literals + */ + + + pushNameToken(_value3, { + startColumn: _startColumn5 + }); + continue; + } + + throw new Error(getCodeFrame(input, line, column) + "Unexpected character " + JSON.stringify(char)); + } + + return tokens; +} + +var tokens = tokenTypes; +exports.tokens = tokens; + +/***/ }), + +/***/ 45378: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.print = print; + +var _ast = __webpack_require__(98688); + +var _long = _interopRequireDefault(__webpack_require__(77960)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return _sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } } + +var compact = false; +var space = " "; + +var quote = function quote(str) { + return "\"".concat(str, "\""); +}; + +function indent(nb) { + return Array(nb).fill(space + space).join(""); +} // TODO(sven): allow arbitrary ast nodes + + +function print(n) { + if (n.type === "Program") { + return printProgram(n, 0); + } else { + throw new Error("Unsupported node in print of type: " + String(n.type)); + } +} + +function printProgram(n, depth) { + return n.body.reduce(function (acc, child) { + if (child.type === "Module") { + acc += printModule(child, depth + 1); + } + + if (child.type === "Func") { + acc += printFunc(child, depth + 1); + } + + if (child.type === "BlockComment") { + acc += printBlockComment(child); + } + + if (child.type === "LeadingComment") { + acc += printLeadingComment(child); + } + + if (compact === false) { + acc += "\n"; + } + + return acc; + }, ""); +} + +function printTypeInstruction(n) { + var out = ""; + out += "("; + out += "type"; + out += space; + + if (n.id != null) { + out += printIndex(n.id); + out += space; + } + + out += "("; + out += "func"; + n.functype.params.forEach(function (param) { + out += space; + out += "("; + out += "param"; + out += space; + out += printFuncParam(param); + out += ")"; + }); + n.functype.results.forEach(function (result) { + out += space; + out += "("; + out += "result"; + out += space; + out += result; + out += ")"; + }); + out += ")"; // func + + out += ")"; + return out; +} + +function printModule(n, depth) { + var out = "("; + out += "module"; + + if (typeof n.id === "string") { + out += space; + out += n.id; + } + + if (compact === false) { + out += "\n"; + } else { + out += space; + } + + n.fields.forEach(function (field) { + if (compact === false) { + out += indent(depth); + } + + switch (field.type) { + case "Func": + { + out += printFunc(field, depth + 1); + break; + } + + case "TypeInstruction": + { + out += printTypeInstruction(field); + break; + } + + case "Table": + { + out += printTable(field); + break; + } + + case "Global": + { + out += printGlobal(field, depth + 1); + break; + } + + case "ModuleExport": + { + out += printModuleExport(field); + break; + } + + case "ModuleImport": + { + out += printModuleImport(field); + break; + } + + case "Memory": + { + out += printMemory(field); + break; + } + + case "BlockComment": + { + out += printBlockComment(field); + break; + } + + case "LeadingComment": + { + out += printLeadingComment(field); + break; + } + + case "Start": + { + out += printStart(field); + break; + } + + case "Elem": + { + out += printElem(field, depth); + break; + } + + case "Data": + { + out += printData(field, depth); + break; + } + + default: + throw new Error("Unsupported node in printModule: " + String(field.type)); + } + + if (compact === false) { + out += "\n"; + } + }); + out += ")"; + return out; +} + +function printData(n, depth) { + var out = ""; + out += "("; + out += "data"; + out += space; + out += printIndex(n.memoryIndex); + out += space; + out += printInstruction(n.offset, depth); + out += space; + out += '"'; + n.init.values.forEach(function (byte) { + // Avoid non-displayable characters + if (byte <= 31 || byte == 34 || byte == 92 || byte >= 127) { + out += "\\"; + out += ("00" + byte.toString(16)).substr(-2); + } else if (byte > 255) { + throw new Error("Unsupported byte in data segment: " + byte); + } else { + out += String.fromCharCode(byte); + } + }); + out += '"'; + out += ")"; + return out; +} + +function printElem(n, depth) { + var out = ""; + out += "("; + out += "elem"; + out += space; + out += printIndex(n.table); + + var _n$offset = _slicedToArray(n.offset, 1), + firstOffset = _n$offset[0]; + + out += space; + out += "("; + out += "offset"; + out += space; + out += printInstruction(firstOffset, depth); + out += ")"; + n.funcs.forEach(function (func) { + out += space; + out += printIndex(func); + }); + out += ")"; + return out; +} + +function printStart(n) { + var out = ""; + out += "("; + out += "start"; + out += space; + out += printIndex(n.index); + out += ")"; + return out; +} + +function printLeadingComment(n) { + // Don't print leading comments in compact mode + if (compact === true) { + return ""; + } + + var out = ""; + out += ";;"; + out += n.value; + out += "\n"; + return out; +} + +function printBlockComment(n) { + // Don't print block comments in compact mode + if (compact === true) { + return ""; + } + + var out = ""; + out += "(;"; + out += n.value; + out += ";)"; + out += "\n"; + return out; +} + +function printSignature(n) { + var out = ""; + n.params.forEach(function (param) { + out += space; + out += "("; + out += "param"; + out += space; + out += printFuncParam(param); + out += ")"; + }); + n.results.forEach(function (result) { + out += space; + out += "("; + out += "result"; + out += space; + out += result; + out += ")"; + }); + return out; +} + +function printModuleImportDescr(n) { + var out = ""; + + if (n.type === "FuncImportDescr") { + out += "("; + out += "func"; + + if ((0, _ast.isAnonymous)(n.id) === false) { + out += space; + out += printIdentifier(n.id); + } + + out += printSignature(n.signature); + out += ")"; + } + + if (n.type === "GlobalType") { + out += "("; + out += "global"; + out += space; + out += printGlobalType(n); + out += ")"; + } + + if (n.type === "Table") { + out += printTable(n); + } + + return out; +} + +function printModuleImport(n) { + var out = ""; + out += "("; + out += "import"; + out += space; + out += quote(n.module); + out += space; + out += quote(n.name); + out += space; + out += printModuleImportDescr(n.descr); + out += ")"; + return out; +} + +function printGlobalType(n) { + var out = ""; + + if (n.mutability === "var") { + out += "("; + out += "mut"; + out += space; + out += n.valtype; + out += ")"; + } else { + out += n.valtype; + } + + return out; +} + +function printGlobal(n, depth) { + var out = ""; + out += "("; + out += "global"; + out += space; + + if (n.name != null && (0, _ast.isAnonymous)(n.name) === false) { + out += printIdentifier(n.name); + out += space; + } + + out += printGlobalType(n.globalType); + out += space; + n.init.forEach(function (i) { + out += printInstruction(i, depth + 1); + }); + out += ")"; + return out; +} + +function printTable(n) { + var out = ""; + out += "("; + out += "table"; + out += space; + + if (n.name != null && (0, _ast.isAnonymous)(n.name) === false) { + out += printIdentifier(n.name); + out += space; + } + + out += printLimit(n.limits); + out += space; + out += n.elementType; + out += ")"; + return out; +} + +function printFuncParam(n) { + var out = ""; + + if (typeof n.id === "string") { + out += "$" + n.id; + out += space; + } + + out += n.valtype; + return out; +} + +function printFunc(n, depth) { + var out = ""; + out += "("; + out += "func"; + + if (n.name != null) { + if (n.name.type === "Identifier" && (0, _ast.isAnonymous)(n.name) === false) { + out += space; + out += printIdentifier(n.name); + } + } + + if (n.signature.type === "Signature") { + out += printSignature(n.signature); + } else { + var index = n.signature; + out += space; + out += "("; + out += "type"; + out += space; + out += printIndex(index); + out += ")"; + } + + if (n.body.length > 0) { + // func is empty since we ignore the default end instruction + if (n.body.length === 1 && n.body[0].id === "end") { + out += ")"; + return out; + } + + if (compact === false) { + out += "\n"; + } + + n.body.forEach(function (i) { + if (i.id !== "end") { + out += indent(depth); + out += printInstruction(i, depth); + + if (compact === false) { + out += "\n"; + } + } + }); + out += indent(depth - 1) + ")"; + } else { + out += ")"; + } + + return out; +} + +function printInstruction(n, depth) { + switch (n.type) { + case "Instr": + // $FlowIgnore + return printGenericInstruction(n, depth + 1); + + case "BlockInstruction": + // $FlowIgnore + return printBlockInstruction(n, depth + 1); + + case "IfInstruction": + // $FlowIgnore + return printIfInstruction(n, depth + 1); + + case "CallInstruction": + // $FlowIgnore + return printCallInstruction(n, depth + 1); + + case "CallIndirectInstruction": + // $FlowIgnore + return printCallIndirectIntruction(n, depth + 1); + + case "LoopInstruction": + // $FlowIgnore + return printLoopInstruction(n, depth + 1); + + default: + throw new Error("Unsupported instruction: " + JSON.stringify(n.type)); + } +} + +function printCallIndirectIntruction(n, depth) { + var out = ""; + out += "("; + out += "call_indirect"; + + if (n.signature.type === "Signature") { + out += printSignature(n.signature); + } else if (n.signature.type === "Identifier") { + out += space; + out += "("; + out += "type"; + out += space; + out += printIdentifier(n.signature); + out += ")"; + } else { + throw new Error("CallIndirectInstruction: unsupported signature " + JSON.stringify(n.signature.type)); + } + + out += space; + + if (n.intrs != null) { + // $FlowIgnore + n.intrs.forEach(function (i, index) { + // $FlowIgnore + out += printInstruction(i, depth + 1); // $FlowIgnore + + if (index !== n.intrs.length - 1) { + out += space; + } + }); + } + + out += ")"; + return out; +} + +function printLoopInstruction(n, depth) { + var out = ""; + out += "("; + out += "loop"; + + if (n.label != null && (0, _ast.isAnonymous)(n.label) === false) { + out += space; + out += printIdentifier(n.label); + } + + if (typeof n.resulttype === "string") { + out += space; + out += "("; + out += "result"; + out += space; + out += n.resulttype; + out += ")"; + } + + if (n.instr.length > 0) { + n.instr.forEach(function (e) { + if (compact === false) { + out += "\n"; + } + + out += indent(depth); + out += printInstruction(e, depth + 1); + }); + + if (compact === false) { + out += "\n"; + out += indent(depth - 1); + } + } + + out += ")"; + return out; +} + +function printCallInstruction(n, depth) { + var out = ""; + out += "("; + out += "call"; + out += space; + out += printIndex(n.index); + + if (_typeof(n.instrArgs) === "object") { + // $FlowIgnore + n.instrArgs.forEach(function (arg) { + out += space; + out += printFuncInstructionArg(arg, depth + 1); + }); + } + + out += ")"; + return out; +} + +function printIfInstruction(n, depth) { + var out = ""; + out += "("; + out += "if"; + + if (n.testLabel != null && (0, _ast.isAnonymous)(n.testLabel) === false) { + out += space; + out += printIdentifier(n.testLabel); + } + + if (typeof n.result === "string") { + out += space; + out += "("; + out += "result"; + out += space; + out += n.result; + out += ")"; + } + + if (n.test.length > 0) { + out += space; + n.test.forEach(function (i) { + out += printInstruction(i, depth + 1); + }); + } + + if (n.consequent.length > 0) { + if (compact === false) { + out += "\n"; + } + + out += indent(depth); + out += "("; + out += "then"; + depth++; + n.consequent.forEach(function (i) { + if (compact === false) { + out += "\n"; + } + + out += indent(depth); + out += printInstruction(i, depth + 1); + }); + depth--; + + if (compact === false) { + out += "\n"; + out += indent(depth); + } + + out += ")"; + } else { + if (compact === false) { + out += "\n"; + out += indent(depth); + } + + out += "("; + out += "then"; + out += ")"; + } + + if (n.alternate.length > 0) { + if (compact === false) { + out += "\n"; + } + + out += indent(depth); + out += "("; + out += "else"; + depth++; + n.alternate.forEach(function (i) { + if (compact === false) { + out += "\n"; + } + + out += indent(depth); + out += printInstruction(i, depth + 1); + }); + depth--; + + if (compact === false) { + out += "\n"; + out += indent(depth); + } + + out += ")"; + } else { + if (compact === false) { + out += "\n"; + out += indent(depth); + } + + out += "("; + out += "else"; + out += ")"; + } + + if (compact === false) { + out += "\n"; + out += indent(depth - 1); + } + + out += ")"; + return out; +} + +function printBlockInstruction(n, depth) { + var out = ""; + out += "("; + out += "block"; + + if (n.label != null && (0, _ast.isAnonymous)(n.label) === false) { + out += space; + out += printIdentifier(n.label); + } + + if (typeof n.result === "string") { + out += space; + out += "("; + out += "result"; + out += space; + out += n.result; + out += ")"; + } + + if (n.instr.length > 0) { + n.instr.forEach(function (i) { + if (compact === false) { + out += "\n"; + } + + out += indent(depth); + out += printInstruction(i, depth + 1); + }); + + if (compact === false) { + out += "\n"; + } + + out += indent(depth - 1); + out += ")"; + } else { + out += ")"; + } + + return out; +} + +function printGenericInstruction(n, depth) { + var out = ""; + out += "("; + + if (typeof n.object === "string") { + out += n.object; + out += "."; + } + + out += n.id; + n.args.forEach(function (arg) { + out += space; + out += printFuncInstructionArg(arg, depth + 1); + }); + out += ")"; + return out; +} + +function printLongNumberLiteral(n) { + if (typeof n.raw === "string") { + return n.raw; + } + + var _n$value = n.value, + low = _n$value.low, + high = _n$value.high; + var v = new _long.default(low, high); + return v.toString(); +} + +function printFloatLiteral(n) { + if (typeof n.raw === "string") { + return n.raw; + } + + return String(n.value); +} + +function printFuncInstructionArg(n, depth) { + var out = ""; + + if (n.type === "NumberLiteral") { + out += printNumberLiteral(n); + } + + if (n.type === "LongNumberLiteral") { + out += printLongNumberLiteral(n); + } + + if (n.type === "Identifier" && (0, _ast.isAnonymous)(n) === false) { + out += printIdentifier(n); + } + + if (n.type === "ValtypeLiteral") { + out += n.name; + } + + if (n.type === "FloatLiteral") { + out += printFloatLiteral(n); + } + + if ((0, _ast.isInstruction)(n)) { + out += printInstruction(n, depth + 1); + } + + return out; +} + +function printNumberLiteral(n) { + if (typeof n.raw === "string") { + return n.raw; + } + + return String(n.value); +} + +function printModuleExport(n) { + var out = ""; + out += "("; + out += "export"; + out += space; + out += quote(n.name); + + if (n.descr.exportType === "Func") { + out += space; + out += "("; + out += "func"; + out += space; + out += printIndex(n.descr.id); + out += ")"; + } else if (n.descr.exportType === "Global") { + out += space; + out += "("; + out += "global"; + out += space; + out += printIndex(n.descr.id); + out += ")"; + } else if (n.descr.exportType === "Memory" || n.descr.exportType === "Mem") { + out += space; + out += "("; + out += "memory"; + out += space; + out += printIndex(n.descr.id); + out += ")"; + } else if (n.descr.exportType === "Table") { + out += space; + out += "("; + out += "table"; + out += space; + out += printIndex(n.descr.id); + out += ")"; + } else { + throw new Error("printModuleExport: unknown type: " + n.descr.exportType); + } + + out += ")"; + return out; +} + +function printIdentifier(n) { + return "$" + n.value; +} + +function printIndex(n) { + if (n.type === "Identifier") { + return printIdentifier(n); + } else if (n.type === "NumberLiteral") { + return printNumberLiteral(n); + } else { + throw new Error("Unsupported index: " + n.type); + } +} + +function printMemory(n) { + var out = ""; + out += "("; + out += "memory"; + + if (n.id != null) { + out += space; + out += printIndex(n.id); + out += space; + } + + out += printLimit(n.limits); + out += ")"; + return out; +} + +function printLimit(n) { + var out = ""; + out += n.min + ""; + + if (n.max != null) { + out += space; + out += String(n.max); + } + + return out; +} + +/***/ }), + +/***/ 30848: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.read = read; +exports.write = write; + +function read(buffer, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? nBytes - 1 : 0; + var d = isLE ? -1 : 1; + var s = buffer[offset + i]; + i += d; + e = s & (1 << -nBits) - 1; + s >>= -nBits; + nBits += eLen; + + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : (s ? -1 : 1) * Infinity; + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); +} + +function write(buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; + var i = isLE ? 0 : nBytes - 1; + var d = isLE ? 1 : -1; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = e << mLen | m; + eLen += mLen; + + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; +} + + +/***/ }), + +/***/ 77960: +/***/ (function(module) { + +module.exports = Long; + +/** + * wasm optimizations, to do native i64 multiplication and divide + */ +var wasm = null; + +try { + wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([ + 0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11 + ])), {}).exports; +} catch (e) { + // no wasm support :( +} + +/** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @constructor + */ +function Long(low, high, unsigned) { + + /** + * The low 32 bits as a signed value. + * @type {number} + */ + this.low = low | 0; + + /** + * The high 32 bits as a signed value. + * @type {number} + */ + this.high = high | 0; + + /** + * Whether unsigned or not. + * @type {boolean} + */ + this.unsigned = !!unsigned; +} + +// The internal representation of a long is the two given signed, 32-bit values. +// We use 32-bit pieces because these are the size of integers on which +// Javascript performs bit-operations. For operations like addition and +// multiplication, we split each number into 16 bit pieces, which can easily be +// multiplied within Javascript's floating-point representation without overflow +// or change in sign. +// +// In the algorithms below, we frequently reduce the negative case to the +// positive case by negating the input(s) and then post-processing the result. +// Note that we must ALWAYS check specially whether those values are MIN_VALUE +// (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as +// a positive number, it overflows back into a negative). Not handling this +// case would often result in infinite recursion. +// +// Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* +// methods on which they depend. + +/** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @private + */ +Long.prototype.__isLong__; + +Object.defineProperty(Long.prototype, "__isLong__", { value: true }); + +/** + * @function + * @param {*} obj Object + * @returns {boolean} + * @inner + */ +function isLong(obj) { + return (obj && obj["__isLong__"]) === true; +} + +/** + * Tests if the specified object is a Long. + * @function + * @param {*} obj Object + * @returns {boolean} + */ +Long.isLong = isLong; + +/** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner + */ +var INT_CACHE = {}; + +/** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner + */ +var UINT_CACHE = {}; + +/** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ +function fromInt(value, unsigned) { + var obj, cachedObj, cache; + if (unsigned) { + value >>>= 0; + if (cache = (0 <= value && value < 256)) { + cachedObj = UINT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true); + if (cache) + UINT_CACHE[value] = obj; + return obj; + } else { + value |= 0; + if (cache = (-128 <= value && value < 128)) { + cachedObj = INT_CACHE[value]; + if (cachedObj) + return cachedObj; + } + obj = fromBits(value, value < 0 ? -1 : 0, false); + if (cache) + INT_CACHE[value] = obj; + return obj; + } +} + +/** + * Returns a Long representing the given 32 bit integer value. + * @function + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} The corresponding Long value + */ +Long.fromInt = fromInt; + +/** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ +function fromNumber(value, unsigned) { + if (isNaN(value)) + return unsigned ? UZERO : ZERO; + if (unsigned) { + if (value < 0) + return UZERO; + if (value >= TWO_PWR_64_DBL) + return MAX_UNSIGNED_VALUE; + } else { + if (value <= -TWO_PWR_63_DBL) + return MIN_VALUE; + if (value + 1 >= TWO_PWR_63_DBL) + return MAX_VALUE; + } + if (value < 0) + return fromNumber(-value, unsigned).neg(); + return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned); +} + +/** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @function + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} The corresponding Long value + */ +Long.fromNumber = fromNumber; + +/** + * @param {number} lowBits + * @param {number} highBits + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ +function fromBits(lowBits, highBits, unsigned) { + return new Long(lowBits, highBits, unsigned); +} + +/** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @function + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} The corresponding Long value + */ +Long.fromBits = fromBits; + +/** + * @function + * @param {number} base + * @param {number} exponent + * @returns {number} + * @inner + */ +var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) + +/** + * @param {string} str + * @param {(boolean|number)=} unsigned + * @param {number=} radix + * @returns {!Long} + * @inner + */ +function fromString(str, unsigned, radix) { + if (str.length === 0) + throw Error('empty string'); + if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") + return ZERO; + if (typeof unsigned === 'number') { + // For goog.math.long compatibility + radix = unsigned, + unsigned = false; + } else { + unsigned = !! unsigned; + } + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + + var p; + if ((p = str.indexOf('-')) > 0) + throw Error('interior hyphen'); + else if (p === 0) { + return fromString(str.substring(1), unsigned, radix).neg(); + } + + // Do several (8) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 8)); + + var result = ZERO; + for (var i = 0; i < str.length; i += 8) { + var size = Math.min(8, str.length - i), + value = parseInt(str.substring(i, i + size), radix); + if (size < 8) { + var power = fromNumber(pow_dbl(radix, size)); + result = result.mul(power).add(fromNumber(value)); + } else { + result = result.mul(radixToPower); + result = result.add(fromNumber(value)); + } + } + result.unsigned = unsigned; + return result; +} + +/** + * Returns a Long representation of the given string, written using the specified radix. + * @function + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value + */ +Long.fromString = fromString; + +/** + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val + * @param {boolean=} unsigned + * @returns {!Long} + * @inner + */ +function fromValue(val, unsigned) { + if (typeof val === 'number') + return fromNumber(val, unsigned); + if (typeof val === 'string') + return fromString(val, unsigned); + // Throws for non-objects, converts non-instanceof Long: + return fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned); +} + +/** + * Converts the specified value to a Long using the appropriate from* function for its type. + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} + */ +Long.fromValue = fromValue; + +// NOTE: the compiler should inline these constant values below and then remove these variables, so there should be +// no runtime penalty for these. + +/** + * @type {number} + * @const + * @inner + */ +var TWO_PWR_16_DBL = 1 << 16; + +/** + * @type {number} + * @const + * @inner + */ +var TWO_PWR_24_DBL = 1 << 24; + +/** + * @type {number} + * @const + * @inner + */ +var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; + +/** + * @type {number} + * @const + * @inner + */ +var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; + +/** + * @type {number} + * @const + * @inner + */ +var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; + +/** + * @type {!Long} + * @const + * @inner + */ +var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); + +/** + * @type {!Long} + * @inner + */ +var ZERO = fromInt(0); + +/** + * Signed zero. + * @type {!Long} + */ +Long.ZERO = ZERO; + +/** + * @type {!Long} + * @inner + */ +var UZERO = fromInt(0, true); + +/** + * Unsigned zero. + * @type {!Long} + */ +Long.UZERO = UZERO; + +/** + * @type {!Long} + * @inner + */ +var ONE = fromInt(1); + +/** + * Signed one. + * @type {!Long} + */ +Long.ONE = ONE; + +/** + * @type {!Long} + * @inner + */ +var UONE = fromInt(1, true); + +/** + * Unsigned one. + * @type {!Long} + */ +Long.UONE = UONE; + +/** + * @type {!Long} + * @inner + */ +var NEG_ONE = fromInt(-1); + +/** + * Signed negative one. + * @type {!Long} + */ +Long.NEG_ONE = NEG_ONE; + +/** + * @type {!Long} + * @inner + */ +var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false); + +/** + * Maximum signed value. + * @type {!Long} + */ +Long.MAX_VALUE = MAX_VALUE; + +/** + * @type {!Long} + * @inner + */ +var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true); + +/** + * Maximum unsigned value. + * @type {!Long} + */ +Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; + +/** + * @type {!Long} + * @inner + */ +var MIN_VALUE = fromBits(0, 0x80000000|0, false); + +/** + * Minimum signed value. + * @type {!Long} + */ +Long.MIN_VALUE = MIN_VALUE; + +/** + * @alias Long.prototype + * @inner + */ +var LongPrototype = Long.prototype; + +/** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @this {!Long} + * @returns {number} + */ +LongPrototype.toInt = function toInt() { + return this.unsigned ? this.low >>> 0 : this.low; +}; + +/** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @this {!Long} + * @returns {number} + */ +LongPrototype.toNumber = function toNumber() { + if (this.unsigned) + return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0); + return this.high * TWO_PWR_32_DBL + (this.low >>> 0); +}; + +/** + * Converts the Long to a string written in the specified radix. + * @this {!Long} + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range + */ +LongPrototype.toString = function toString(radix) { + radix = radix || 10; + if (radix < 2 || 36 < radix) + throw RangeError('radix'); + if (this.isZero()) + return '0'; + if (this.isNegative()) { // Unsigned Longs are never negative + if (this.eq(MIN_VALUE)) { + // We need to change the Long value before it can be negated, so we remove + // the bottom-most digit in this base and then recurse to do the rest. + var radixLong = fromNumber(radix), + div = this.div(radixLong), + rem1 = div.mul(radixLong).sub(this); + return div.toString(radix) + rem1.toInt().toString(radix); + } else + return '-' + this.neg().toString(radix); + } + + // Do several (6) digits each time through the loop, so as to + // minimize the calls to the very expensive emulated div. + var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), + rem = this; + var result = ''; + while (true) { + var remDiv = rem.div(radixToPower), + intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, + digits = intval.toString(radix); + rem = remDiv; + if (rem.isZero()) + return digits + result; + else { + while (digits.length < 6) + digits = '0' + digits; + result = '' + digits + result; + } + } +}; + +/** + * Gets the high 32 bits as a signed integer. + * @this {!Long} + * @returns {number} Signed high bits + */ +LongPrototype.getHighBits = function getHighBits() { + return this.high; +}; + +/** + * Gets the high 32 bits as an unsigned integer. + * @this {!Long} + * @returns {number} Unsigned high bits + */ +LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { + return this.high >>> 0; +}; + +/** + * Gets the low 32 bits as a signed integer. + * @this {!Long} + * @returns {number} Signed low bits + */ +LongPrototype.getLowBits = function getLowBits() { + return this.low; +}; + +/** + * Gets the low 32 bits as an unsigned integer. + * @this {!Long} + * @returns {number} Unsigned low bits + */ +LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { + return this.low >>> 0; +}; + +/** + * Gets the number of bits needed to represent the absolute value of this Long. + * @this {!Long} + * @returns {number} + */ +LongPrototype.getNumBitsAbs = function getNumBitsAbs() { + if (this.isNegative()) // Unsigned Longs are never negative + return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) + if ((val & (1 << bit)) != 0) + break; + return this.high != 0 ? bit + 33 : bit + 1; +}; + +/** + * Tests if this Long's value equals zero. + * @this {!Long} + * @returns {boolean} + */ +LongPrototype.isZero = function isZero() { + return this.high === 0 && this.low === 0; +}; + +/** + * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}. + * @returns {boolean} + */ +LongPrototype.eqz = LongPrototype.isZero; + +/** + * Tests if this Long's value is negative. + * @this {!Long} + * @returns {boolean} + */ +LongPrototype.isNegative = function isNegative() { + return !this.unsigned && this.high < 0; +}; + +/** + * Tests if this Long's value is positive. + * @this {!Long} + * @returns {boolean} + */ +LongPrototype.isPositive = function isPositive() { + return this.unsigned || this.high >= 0; +}; + +/** + * Tests if this Long's value is odd. + * @this {!Long} + * @returns {boolean} + */ +LongPrototype.isOdd = function isOdd() { + return (this.low & 1) === 1; +}; + +/** + * Tests if this Long's value is even. + * @this {!Long} + * @returns {boolean} + */ +LongPrototype.isEven = function isEven() { + return (this.low & 1) === 0; +}; + +/** + * Tests if this Long's value equals the specified's. + * @this {!Long} + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.equals = function equals(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1) + return false; + return this.high === other.high && this.low === other.low; +}; + +/** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.eq = LongPrototype.equals; + +/** + * Tests if this Long's value differs from the specified's. + * @this {!Long} + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.notEquals = function notEquals(other) { + return !this.eq(/* validates */ other); +}; + +/** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.neq = LongPrototype.notEquals; + +/** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.ne = LongPrototype.notEquals; + +/** + * Tests if this Long's value is less than the specified's. + * @this {!Long} + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.lessThan = function lessThan(other) { + return this.comp(/* validates */ other) < 0; +}; + +/** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.lt = LongPrototype.lessThan; + +/** + * Tests if this Long's value is less than or equal the specified's. + * @this {!Long} + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { + return this.comp(/* validates */ other) <= 0; +}; + +/** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.lte = LongPrototype.lessThanOrEqual; + +/** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.le = LongPrototype.lessThanOrEqual; + +/** + * Tests if this Long's value is greater than the specified's. + * @this {!Long} + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.greaterThan = function greaterThan(other) { + return this.comp(/* validates */ other) > 0; +}; + +/** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.gt = LongPrototype.greaterThan; + +/** + * Tests if this Long's value is greater than or equal the specified's. + * @this {!Long} + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { + return this.comp(/* validates */ other) >= 0; +}; + +/** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.gte = LongPrototype.greaterThanOrEqual; + +/** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} + */ +LongPrototype.ge = LongPrototype.greaterThanOrEqual; + +/** + * Compares this Long's value with the specified's. + * @this {!Long} + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ +LongPrototype.compare = function compare(other) { + if (!isLong(other)) + other = fromValue(other); + if (this.eq(other)) + return 0; + var thisNeg = this.isNegative(), + otherNeg = other.isNegative(); + if (thisNeg && !otherNeg) + return -1; + if (!thisNeg && otherNeg) + return 1; + // At this point the sign bits are the same + if (!this.unsigned) + return this.sub(other).isNegative() ? -1 : 1; + // Both are positive if at least one is unsigned + return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1; +}; + +/** + * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. + * @function + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater + */ +LongPrototype.comp = LongPrototype.compare; + +/** + * Negates this Long's value. + * @this {!Long} + * @returns {!Long} Negated Long + */ +LongPrototype.negate = function negate() { + if (!this.unsigned && this.eq(MIN_VALUE)) + return MIN_VALUE; + return this.not().add(ONE); +}; + +/** + * Negates this Long's value. This is an alias of {@link Long#negate}. + * @function + * @returns {!Long} Negated Long + */ +LongPrototype.neg = LongPrototype.negate; + +/** + * Returns the sum of this and the specified Long. + * @this {!Long} + * @param {!Long|number|string} addend Addend + * @returns {!Long} Sum + */ +LongPrototype.add = function add(addend) { + if (!isLong(addend)) + addend = fromValue(addend); + + // Divide each number into 4 chunks of 16 bits, and then sum the chunks. + + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; + + var b48 = addend.high >>> 16; + var b32 = addend.high & 0xFFFF; + var b16 = addend.low >>> 16; + var b00 = addend.low & 0xFFFF; + + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 + b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 + b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 + b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 + b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); +}; + +/** + * Returns the difference of this and the specified Long. + * @this {!Long} + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ +LongPrototype.subtract = function subtract(subtrahend) { + if (!isLong(subtrahend)) + subtrahend = fromValue(subtrahend); + return this.add(subtrahend.neg()); +}; + +/** + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference + */ +LongPrototype.sub = LongPrototype.subtract; + +/** + * Returns the product of this and the specified Long. + * @this {!Long} + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ +LongPrototype.multiply = function multiply(multiplier) { + if (this.isZero()) + return ZERO; + if (!isLong(multiplier)) + multiplier = fromValue(multiplier); + + // use wasm support if present + if (wasm) { + var low = wasm["mul"](this.low, + this.high, + multiplier.low, + multiplier.high); + return fromBits(low, wasm["get_high"](), this.unsigned); + } + + if (multiplier.isZero()) + return ZERO; + if (this.eq(MIN_VALUE)) + return multiplier.isOdd() ? MIN_VALUE : ZERO; + if (multiplier.eq(MIN_VALUE)) + return this.isOdd() ? MIN_VALUE : ZERO; + + if (this.isNegative()) { + if (multiplier.isNegative()) + return this.neg().mul(multiplier.neg()); + else + return this.neg().mul(multiplier).neg(); + } else if (multiplier.isNegative()) + return this.mul(multiplier.neg()).neg(); + + // If both longs are small, use float multiplication + if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24)) + return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned); + + // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. + // We can skip products that would overflow. + + var a48 = this.high >>> 16; + var a32 = this.high & 0xFFFF; + var a16 = this.low >>> 16; + var a00 = this.low & 0xFFFF; + + var b48 = multiplier.high >>> 16; + var b32 = multiplier.high & 0xFFFF; + var b16 = multiplier.low >>> 16; + var b00 = multiplier.low & 0xFFFF; + + var c48 = 0, c32 = 0, c16 = 0, c00 = 0; + c00 += a00 * b00; + c16 += c00 >>> 16; + c00 &= 0xFFFF; + c16 += a16 * b00; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c16 += a00 * b16; + c32 += c16 >>> 16; + c16 &= 0xFFFF; + c32 += a32 * b00; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a16 * b16; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c32 += a00 * b32; + c48 += c32 >>> 16; + c32 &= 0xFFFF; + c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; + c48 &= 0xFFFF; + return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned); +}; + +/** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product + */ +LongPrototype.mul = LongPrototype.multiply; + +/** + * Returns this Long divided by the specified. The result is signed if this Long is signed or + * unsigned if this Long is unsigned. + * @this {!Long} + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ +LongPrototype.divide = function divide(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + if (divisor.isZero()) + throw Error('division by zero'); + + // use wasm support if present + if (wasm) { + // guard against signed division overflow: the largest + // negative number / -1 would be 1 larger than the largest + // positive number, due to two's complement. + if (!this.unsigned && + this.high === -0x80000000 && + divisor.low === -1 && divisor.high === -1) { + // be consistent with non-wasm code path + return this; + } + var low = (this.unsigned ? wasm["div_u"] : wasm["div_s"])( + this.low, + this.high, + divisor.low, + divisor.high + ); + return fromBits(low, wasm["get_high"](), this.unsigned); + } + + if (this.isZero()) + return this.unsigned ? UZERO : ZERO; + var approx, rem, res; + if (!this.unsigned) { + // This section is only relevant for signed longs and is derived from the + // closure library as a whole. + if (this.eq(MIN_VALUE)) { + if (divisor.eq(ONE) || divisor.eq(NEG_ONE)) + return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE + else if (divisor.eq(MIN_VALUE)) + return ONE; + else { + // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. + var halfThis = this.shr(1); + approx = halfThis.div(divisor).shl(1); + if (approx.eq(ZERO)) { + return divisor.isNegative() ? ONE : NEG_ONE; + } else { + rem = this.sub(divisor.mul(approx)); + res = approx.add(rem.div(divisor)); + return res; + } + } + } else if (divisor.eq(MIN_VALUE)) + return this.unsigned ? UZERO : ZERO; + if (this.isNegative()) { + if (divisor.isNegative()) + return this.neg().div(divisor.neg()); + return this.neg().div(divisor).neg(); + } else if (divisor.isNegative()) + return this.div(divisor.neg()).neg(); + res = ZERO; + } else { + // The algorithm below has not been made for unsigned longs. It's therefore + // required to take special care of the MSB prior to running it. + if (!divisor.unsigned) + divisor = divisor.toUnsigned(); + if (divisor.gt(this)) + return UZERO; + if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true + return UONE; + res = UZERO; + } + + // Repeat the following until the remainder is less than other: find a + // floating-point that approximates remainder / other *from below*, add this + // into the result, and subtract it from the remainder. It is critical that + // the approximate value is less than or equal to the real value so that the + // remainder never becomes negative. + rem = this; + while (rem.gte(divisor)) { + // Approximate the result of division. This may be a little greater or + // smaller than the actual value. + approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber())); + + // We will tweak the approximate result by changing it in the 48-th digit or + // the smallest non-fractional digit, whichever is larger. + var log2 = Math.ceil(Math.log(approx) / Math.LN2), + delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48), + + // Decrease the approximation until it is smaller than the remainder. Note + // that if it is too large, the product overflows and is negative. + approxRes = fromNumber(approx), + approxRem = approxRes.mul(divisor); + while (approxRem.isNegative() || approxRem.gt(rem)) { + approx -= delta; + approxRes = fromNumber(approx, this.unsigned); + approxRem = approxRes.mul(divisor); + } + + // We know the answer can't be zero... and actually, zero would cause + // infinite recursion since we would make no progress. + if (approxRes.isZero()) + approxRes = ONE; + + res = res.add(approxRes); + rem = rem.sub(approxRem); + } + return res; +}; + +/** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient + */ +LongPrototype.div = LongPrototype.divide; + +/** + * Returns this Long modulo the specified. + * @this {!Long} + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ +LongPrototype.modulo = function modulo(divisor) { + if (!isLong(divisor)) + divisor = fromValue(divisor); + + // use wasm support if present + if (wasm) { + var low = (this.unsigned ? wasm["rem_u"] : wasm["rem_s"])( + this.low, + this.high, + divisor.low, + divisor.high + ); + return fromBits(low, wasm["get_high"](), this.unsigned); + } + + return this.sub(this.div(divisor).mul(divisor)); +}; + +/** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ +LongPrototype.mod = LongPrototype.modulo; + +/** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder + */ +LongPrototype.rem = LongPrototype.modulo; + +/** + * Returns the bitwise NOT of this Long. + * @this {!Long} + * @returns {!Long} + */ +LongPrototype.not = function not() { + return fromBits(~this.low, ~this.high, this.unsigned); +}; + +/** + * Returns the bitwise AND of this Long and the specified. + * @this {!Long} + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ +LongPrototype.and = function and(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low & other.low, this.high & other.high, this.unsigned); +}; + +/** + * Returns the bitwise OR of this Long and the specified. + * @this {!Long} + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ +LongPrototype.or = function or(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low | other.low, this.high | other.high, this.unsigned); +}; + +/** + * Returns the bitwise XOR of this Long and the given one. + * @this {!Long} + * @param {!Long|number|string} other Other Long + * @returns {!Long} + */ +LongPrototype.xor = function xor(other) { + if (!isLong(other)) + other = fromValue(other); + return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); +}; + +/** + * Returns this Long with bits shifted to the left by the given amount. + * @this {!Long} + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ +LongPrototype.shiftLeft = function shiftLeft(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned); + else + return fromBits(0, this.low << (numBits - 32), this.unsigned); +}; + +/** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ +LongPrototype.shl = LongPrototype.shiftLeft; + +/** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @this {!Long} + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ +LongPrototype.shiftRight = function shiftRight(numBits) { + if (isLong(numBits)) + numBits = numBits.toInt(); + if ((numBits &= 63) === 0) + return this; + else if (numBits < 32) + return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned); + else + return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned); +}; + +/** + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ +LongPrototype.shr = LongPrototype.shiftRight; + +/** + * Returns this Long with bits logically shifted to the right by the given amount. + * @this {!Long} + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ +LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { + if (isLong(numBits)) numBits = numBits.toInt(); + if ((numBits &= 63) === 0) return this; + if (numBits < 32) return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >>> numBits, this.unsigned); + if (numBits === 32) return fromBits(this.high, 0, this.unsigned); + return fromBits(this.high >>> (numBits - 32), 0, this.unsigned); +}; + +/** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ +LongPrototype.shru = LongPrototype.shiftRightUnsigned; + +/** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long + */ +LongPrototype.shr_u = LongPrototype.shiftRightUnsigned; + +/** + * Returns this Long with bits rotated to the left by the given amount. + * @this {!Long} + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Rotated Long + */ +LongPrototype.rotateLeft = function rotateLeft(numBits) { + var b; + if (isLong(numBits)) numBits = numBits.toInt(); + if ((numBits &= 63) === 0) return this; + if (numBits === 32) return fromBits(this.high, this.low, this.unsigned); + if (numBits < 32) { + b = (32 - numBits); + return fromBits(((this.low << numBits) | (this.high >>> b)), ((this.high << numBits) | (this.low >>> b)), this.unsigned); + } + numBits -= 32; + b = (32 - numBits); + return fromBits(((this.high << numBits) | (this.low >>> b)), ((this.low << numBits) | (this.high >>> b)), this.unsigned); +} +/** + * Returns this Long with bits rotated to the left by the given amount. This is an alias of {@link Long#rotateLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Rotated Long + */ +LongPrototype.rotl = LongPrototype.rotateLeft; + +/** + * Returns this Long with bits rotated to the right by the given amount. + * @this {!Long} + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Rotated Long + */ +LongPrototype.rotateRight = function rotateRight(numBits) { + var b; + if (isLong(numBits)) numBits = numBits.toInt(); + if ((numBits &= 63) === 0) return this; + if (numBits === 32) return fromBits(this.high, this.low, this.unsigned); + if (numBits < 32) { + b = (32 - numBits); + return fromBits(((this.high << b) | (this.low >>> numBits)), ((this.low << b) | (this.high >>> numBits)), this.unsigned); + } + numBits -= 32; + b = (32 - numBits); + return fromBits(((this.low << b) | (this.high >>> numBits)), ((this.high << b) | (this.low >>> numBits)), this.unsigned); +} +/** + * Returns this Long with bits rotated to the right by the given amount. This is an alias of {@link Long#rotateRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Rotated Long + */ +LongPrototype.rotr = LongPrototype.rotateRight; + +/** + * Converts this Long to signed. + * @this {!Long} + * @returns {!Long} Signed long + */ +LongPrototype.toSigned = function toSigned() { + if (!this.unsigned) + return this; + return fromBits(this.low, this.high, false); +}; + +/** + * Converts this Long to unsigned. + * @this {!Long} + * @returns {!Long} Unsigned long + */ +LongPrototype.toUnsigned = function toUnsigned() { + if (this.unsigned) + return this; + return fromBits(this.low, this.high, true); +}; + +/** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @this {!Long} + * @returns {!Array.} Byte representation + */ +LongPrototype.toBytes = function toBytes(le) { + return le ? this.toBytesLE() : this.toBytesBE(); +}; + +/** + * Converts this Long to its little endian byte representation. + * @this {!Long} + * @returns {!Array.} Little endian byte representation + */ +LongPrototype.toBytesLE = function toBytesLE() { + var hi = this.high, + lo = this.low; + return [ + lo & 0xff, + lo >>> 8 & 0xff, + lo >>> 16 & 0xff, + lo >>> 24 , + hi & 0xff, + hi >>> 8 & 0xff, + hi >>> 16 & 0xff, + hi >>> 24 + ]; +}; + +/** + * Converts this Long to its big endian byte representation. + * @this {!Long} + * @returns {!Array.} Big endian byte representation + */ +LongPrototype.toBytesBE = function toBytesBE() { + var hi = this.high, + lo = this.low; + return [ + hi >>> 24 , + hi >>> 16 & 0xff, + hi >>> 8 & 0xff, + hi & 0xff, + lo >>> 24 , + lo >>> 16 & 0xff, + lo >>> 8 & 0xff, + lo & 0xff + ]; +}; + +/** + * Creates a Long from its byte representation. + * @param {!Array.} bytes Byte representation + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {Long} The corresponding Long value + */ +Long.fromBytes = function fromBytes(bytes, unsigned, le) { + return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned); +}; + +/** + * Creates a Long from its little endian byte representation. + * @param {!Array.} bytes Little endian byte representation + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {Long} The corresponding Long value + */ +Long.fromBytesLE = function fromBytesLE(bytes, unsigned) { + return new Long( + bytes[0] | + bytes[1] << 8 | + bytes[2] << 16 | + bytes[3] << 24, + bytes[4] | + bytes[5] << 8 | + bytes[6] << 16 | + bytes[7] << 24, + unsigned + ); +}; + +/** + * Creates a Long from its big endian byte representation. + * @param {!Array.} bytes Big endian byte representation + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {Long} The corresponding Long value + */ +Long.fromBytesBE = function fromBytesBE(bytes, unsigned) { + return new Long( + bytes[4] << 24 | + bytes[5] << 16 | + bytes[6] << 8 | + bytes[7], + bytes[0] << 24 | + bytes[1] << 16 | + bytes[2] << 8 | + bytes[3], + unsigned + ); +}; + + +/***/ }), + +/***/ 82133: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var KEYWORDS = __webpack_require__(72670); + +module.exports = defineKeywords; + + +/** + * Defines one or several keywords in ajv instance + * @param {Ajv} ajv validator instance + * @param {String|Array|undefined} keyword keyword(s) to define + * @return {Ajv} ajv instance (for chaining) + */ +function defineKeywords(ajv, keyword) { + if (Array.isArray(keyword)) { + for (var i=0; i d2) return 1; + if (d1 < d2) return -1; + if (d1 === d2) return 0; +} + + +function compareTime(t1, t2) { + if (!(t1 && t2)) return; + t1 = t1.match(TIME); + t2 = t2.match(TIME); + if (!(t1 && t2)) return; + t1 = t1[1] + t1[2] + t1[3] + (t1[4]||''); + t2 = t2[1] + t2[2] + t2[3] + (t2[4]||''); + if (t1 > t2) return 1; + if (t1 < t2) return -1; + if (t1 === t2) return 0; +} + + +function compareDateTime(dt1, dt2) { + if (!(dt1 && dt2)) return; + dt1 = dt1.split(DATE_TIME_SEPARATOR); + dt2 = dt2.split(DATE_TIME_SEPARATOR); + var res = compareDate(dt1[0], dt2[0]); + if (res === undefined) return; + return res || compareTime(dt1[1], dt2[1]); +} + + +/***/ }), + +/***/ 33733: +/***/ (function(module) { + +"use strict"; + + +module.exports = { + metaSchemaRef: metaSchemaRef +}; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +function metaSchemaRef(ajv) { + var defaultMeta = ajv._opts.defaultMeta; + if (typeof defaultMeta == 'string') return { $ref: defaultMeta }; + if (ajv.getSchema(META_SCHEMA_ID)) return { $ref: META_SCHEMA_ID }; + console.warn('meta schema not defined'); + return {}; +} + + +/***/ }), + +/***/ 25541: +/***/ (function(module) { + +"use strict"; + + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'object', + macro: function (schema, parentSchema) { + if (!schema) return true; + var properties = Object.keys(parentSchema.properties); + if (properties.length == 0) return true; + return {required: properties}; + }, + metaSchema: {type: 'boolean'}, + dependencies: ['properties'] + }; + + ajv.addKeyword('allRequired', defFunc.definition); + return ajv; +}; + + +/***/ }), + +/***/ 97039: +/***/ (function(module) { + +"use strict"; + + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'object', + macro: function (schema) { + if (schema.length == 0) return true; + if (schema.length == 1) return {required: schema}; + var schemas = schema.map(function (prop) { + return {required: [prop]}; + }); + return {anyOf: schemas}; + }, + metaSchema: { + type: 'array', + items: { + type: 'string' + } + } + }; + + ajv.addKeyword('anyRequired', defFunc.definition); + return ajv; +}; + + +/***/ }), + +/***/ 51673: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(33733); + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'object', + macro: function (schema) { + var schemas = []; + for (var pointer in schema) + schemas.push(getSchema(pointer, schema[pointer])); + return {'allOf': schemas}; + }, + metaSchema: { + type: 'object', + propertyNames: { + type: 'string', + format: 'json-pointer' + }, + additionalProperties: util.metaSchemaRef(ajv) + } + }; + + ajv.addKeyword('deepProperties', defFunc.definition); + return ajv; +}; + + +function getSchema(jsonPointer, schema) { + var segments = jsonPointer.split('/'); + var rootSchema = {}; + var pointerSchema = rootSchema; + for (var i=1; i', + $result = 'result' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_formatExclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + if ($isData) { + out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { '; + $closingBraces += '}'; + } + if ($isDataFormat) { + out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { '; + $closingBraces += '}'; + } + out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var ' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = ' + ($exclusive) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + } else { + var $exclusive = $schemaExcl === true, + $opStr = $op; + if (!$exclusive) $opStr += '='; + var $opExpr = '\'' + $opStr + '\''; + if ($isData) { + out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { '; + $closingBraces += '}'; + } + if ($isDataFormat) { + out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { '; + $closingBraces += '}'; + } + out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op); + if (!$exclusive) { + out += '='; + } + out += ' 0;'; + } + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_formatLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '}'; + return out; +} + + +/***/ }), + +/***/ 83724: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_patternRequired(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $matched = 'patternMatched' + $lvl, + $dataProperties = 'dataProperties' + $lvl, + $closingBraces = '', + $ownProperties = it.opts.ownProperties; + out += 'var ' + ($valid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + var arr1 = $schema; + if (arr1) { + var $pProperty, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $pProperty = arr1[i1 += 1]; + out += ' var ' + ($matched) + ' = false; '; + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } '; + var $missingPattern = it.util.escapeQuotes($pProperty); + out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('patternRequired') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingPattern: \'' + ($missingPattern) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have property matching pattern \\\'' + ($missingPattern) + '\\\'\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + } + out += '' + ($closingBraces); + return out; +} + + +/***/ }), + +/***/ 20608: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_switch(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $ifPassed = 'ifPassed' + it.level, + $currentBaseId = $it.baseId, + $shouldContinue; + out += 'var ' + ($ifPassed) + ';'; + var arr1 = $schema; + if (arr1) { + var $sch, $caseIndex = -1, + l1 = arr1.length - 1; + while ($caseIndex < l1) { + $sch = arr1[$caseIndex += 1]; + if ($caseIndex && !$shouldContinue) { + out += ' if (!' + ($ifPassed) + ') { '; + $closingBraces += '}'; + } + if ($sch.if && (it.opts.strictKeywords ? typeof $sch.if == 'object' && Object.keys($sch.if).length > 0 : it.util.schemaHasRules($sch.if, it.RULES.all))) { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + $it.schema = $sch.if; + $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if'; + $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($ifPassed) + ' = ' + ($nextValid) + '; if (' + ($ifPassed) + ') { '; + if (typeof $sch.then == 'boolean') { + if ($sch.then === false) { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "switch" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; '; + } else { + $it.schema = $sch.then; + $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then'; + $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } '; + } else { + out += ' ' + ($ifPassed) + ' = true; '; + if (typeof $sch.then == 'boolean') { + if ($sch.then === false) { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "switch" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; '; + } else { + $it.schema = $sch.then; + $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then'; + $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } + } + $shouldContinue = $sch.continue + } + } + out += '' + ($closingBraces) + 'var ' + ($valid) + ' = ' + ($nextValid) + ';'; + return out; +} + + +/***/ }), + +/***/ 32107: +/***/ (function(module) { + +"use strict"; + + +var sequences = {}; + +var DEFAULTS = { + timestamp: function() { return Date.now(); }, + datetime: function() { return (new Date).toISOString(); }, + date: function() { return (new Date).toISOString().slice(0, 10); }, + time: function() { return (new Date).toISOString().slice(11); }, + random: function() { return Math.random(); }, + randomint: function (args) { + var limit = args && args.max || 2; + return function() { return Math.floor(Math.random() * limit); }; + }, + seq: function (args) { + var name = args && args.name || ''; + sequences[name] = sequences[name] || 0; + return function() { return sequences[name]++; }; + } +}; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + compile: function (schema, parentSchema, it) { + var funcs = {}; + + for (var key in schema) { + var d = schema[key]; + var func = getDefault(typeof d == 'string' ? d : d.func); + funcs[key] = func.length ? func(d.args) : func; + } + + return it.opts.useDefaults && !it.compositeRule + ? assignDefaults + : noop; + + function assignDefaults(data) { + for (var prop in schema){ + if (data[prop] === undefined + || (it.opts.useDefaults == 'empty' + && (data[prop] === null || data[prop] === ''))) + data[prop] = funcs[prop](); + } + return true; + } + + function noop() { return true; } + }, + DEFAULTS: DEFAULTS, + metaSchema: { + type: 'object', + additionalProperties: { + type: ['string', 'object'], + additionalProperties: false, + required: ['func', 'args'], + properties: { + func: { type: 'string' }, + args: { type: 'object' } + } + } + } + }; + + ajv.addKeyword('dynamicDefaults', defFunc.definition); + return ajv; + + function getDefault(d) { + var def = DEFAULTS[d]; + if (def) return def; + throw new Error('invalid "dynamicDefaults" keyword property value: ' + d); + } +}; + + +/***/ }), + +/***/ 46153: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(92784)('Maximum'); + + +/***/ }), + +/***/ 54409: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(92784)('Minimum'); + + +/***/ }), + +/***/ 72670: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +module.exports = { + 'instanceof': __webpack_require__(62479), + range: __webpack_require__(79159), + regexp: __webpack_require__(23284), + 'typeof': __webpack_require__(22608), + dynamicDefaults: __webpack_require__(32107), + allRequired: __webpack_require__(25541), + anyRequired: __webpack_require__(97039), + oneRequired: __webpack_require__(12135), + prohibited: __webpack_require__(63115), + uniqueItemProperties: __webpack_require__(43786), + deepProperties: __webpack_require__(51673), + deepRequired: __webpack_require__(12541), + formatMinimum: __webpack_require__(54409), + formatMaximum: __webpack_require__(46153), + patternRequired: __webpack_require__(5844), + 'switch': __webpack_require__(682), + select: __webpack_require__(22308), + transform: __webpack_require__(40159) +}; + + +/***/ }), + +/***/ 62479: +/***/ (function(module) { + +"use strict"; + + +var CONSTRUCTORS = { + Object: Object, + Array: Array, + Function: Function, + Number: Number, + String: String, + Date: Date, + RegExp: RegExp +}; + +module.exports = function defFunc(ajv) { + /* istanbul ignore else */ + if (typeof Buffer != 'undefined') + CONSTRUCTORS.Buffer = Buffer; + + /* istanbul ignore else */ + if (typeof Promise != 'undefined') + CONSTRUCTORS.Promise = Promise; + + defFunc.definition = { + compile: function (schema) { + if (typeof schema == 'string') { + var Constructor = getConstructor(schema); + return function (data) { + return data instanceof Constructor; + }; + } + + var constructors = schema.map(getConstructor); + return function (data) { + for (var i=0; i max || (exclusive && min == max)) + throw new Error('There are no numbers in range'); + } +}; + + +/***/ }), + +/***/ 23284: +/***/ (function(module) { + +"use strict"; + + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'string', + inline: function (it, keyword, schema) { + return getRegExp() + '.test(data' + (it.dataLevel || '') + ')'; + + function getRegExp() { + try { + if (typeof schema == 'object') + return new RegExp(schema.pattern, schema.flags); + + var rx = schema.match(/^\/(.*)\/([gimuy]*)$/); + if (rx) return new RegExp(rx[1], rx[2]); + throw new Error('cannot parse string into RegExp'); + } catch(e) { + console.error('regular expression', schema, 'is invalid'); + throw e; + } + } + }, + metaSchema: { + type: ['string', 'object'], + properties: { + pattern: { type: 'string' }, + flags: { type: 'string' } + }, + required: ['pattern'], + additionalProperties: false + } + }; + + ajv.addKeyword('regexp', defFunc.definition); + return ajv; +}; + + +/***/ }), + +/***/ 22308: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(33733); + +module.exports = function defFunc(ajv) { + if (!ajv._opts.$data) { + console.warn('keyword select requires $data option'); + return ajv; + } + var metaSchemaRef = util.metaSchemaRef(ajv); + var compiledCaseSchemas = []; + + defFunc.definition = { + validate: function v(schema, data, parentSchema) { + if (parentSchema.selectCases === undefined) + throw new Error('keyword "selectCases" is absent'); + var compiled = getCompiledSchemas(parentSchema, false); + var validate = compiled.cases[schema]; + if (validate === undefined) validate = compiled.default; + if (typeof validate == 'boolean') return validate; + var valid = validate(data); + if (!valid) v.errors = validate.errors; + return valid; + }, + $data: true, + metaSchema: { type: ['string', 'number', 'boolean', 'null'] } + }; + + ajv.addKeyword('select', defFunc.definition); + ajv.addKeyword('selectCases', { + compile: function (schemas, parentSchema) { + var compiled = getCompiledSchemas(parentSchema); + for (var value in schemas) + compiled.cases[value] = compileOrBoolean(schemas[value]); + return function() { return true; }; + }, + valid: true, + metaSchema: { + type: 'object', + additionalProperties: metaSchemaRef + } + }); + ajv.addKeyword('selectDefault', { + compile: function (schema, parentSchema) { + var compiled = getCompiledSchemas(parentSchema); + compiled.default = compileOrBoolean(schema); + return function() { return true; }; + }, + valid: true, + metaSchema: metaSchemaRef + }); + return ajv; + + + function getCompiledSchemas(parentSchema, create) { + var compiled; + compiledCaseSchemas.some(function (c) { + if (c.parentSchema === parentSchema) { + compiled = c; + return true; + } + }); + if (!compiled && create !== false) { + compiled = { + parentSchema: parentSchema, + cases: {}, + default: true + }; + compiledCaseSchemas.push(compiled); + } + return compiled; + } + + function compileOrBoolean(schema) { + return typeof schema == 'boolean' + ? schema + : ajv.compile(schema); + } +}; + + +/***/ }), + +/***/ 682: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(33733); + +module.exports = function defFunc(ajv) { + if (ajv.RULES.keywords.switch && ajv.RULES.keywords.if) return; + + var metaSchemaRef = util.metaSchemaRef(ajv); + + defFunc.definition = { + inline: __webpack_require__(20608), + statements: true, + errors: 'full', + metaSchema: { + type: 'array', + items: { + required: [ 'then' ], + properties: { + 'if': metaSchemaRef, + 'then': { + anyOf: [ + { type: 'boolean' }, + metaSchemaRef + ] + }, + 'continue': { type: 'boolean' } + }, + additionalProperties: false, + dependencies: { + 'continue': [ 'if' ] + } + } + } + }; + + ajv.addKeyword('switch', defFunc.definition); + return ajv; +}; + + +/***/ }), + +/***/ 40159: +/***/ (function(module) { + +"use strict"; + + +module.exports = function defFunc (ajv) { + var transform = { + trimLeft: function (value) { + return value.replace(/^[\s]+/, ''); + }, + trimRight: function (value) { + return value.replace(/[\s]+$/, ''); + }, + trim: function (value) { + return value.trim(); + }, + toLowerCase: function (value) { + return value.toLowerCase(); + }, + toUpperCase: function (value) { + return value.toUpperCase(); + }, + toEnumCase: function (value, cfg) { + return cfg.hash[makeHashTableKey(value)] || value; + } + }; + + defFunc.definition = { + type: 'string', + errors: false, + modifying: true, + valid: true, + compile: function (schema, parentSchema) { + var cfg; + + if (schema.indexOf('toEnumCase') !== -1) { + // build hash table to enum values + cfg = {hash: {}}; + + // requires `enum` in schema + if (!parentSchema.enum) + throw new Error('Missing enum. To use `transform:["toEnumCase"]`, `enum:[...]` is required.'); + for (var i = parentSchema.enum.length; i--; i) { + var v = parentSchema.enum[i]; + if (typeof v !== 'string') continue; + var k = makeHashTableKey(v); + // requires all `enum` values have unique keys + if (cfg.hash[k]) + throw new Error('Invalid enum uniqueness. To use `transform:["toEnumCase"]`, all values must be unique when case insensitive.'); + cfg.hash[k] = v; + } + } + + return function (data, dataPath, object, key) { + // skip if value only + if (!object) return; + + // apply transform in order provided + for (var j = 0, l = schema.length; j < l; j++) + data = transform[schema[j]](data, cfg); + + object[key] = data; + }; + }, + metaSchema: { + type: 'array', + items: { + type: 'string', + enum: [ + 'trimLeft', 'trimRight', 'trim', + 'toLowerCase', 'toUpperCase', 'toEnumCase' + ] + } + } + }; + + ajv.addKeyword('transform', defFunc.definition); + return ajv; + + function makeHashTableKey (value) { + return value.toLowerCase(); + } +}; + + +/***/ }), + +/***/ 22608: +/***/ (function(module) { + +"use strict"; + + +var KNOWN_TYPES = ['undefined', 'string', 'number', 'object', 'function', 'boolean', 'symbol']; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + inline: function (it, keyword, schema) { + var data = 'data' + (it.dataLevel || ''); + if (typeof schema == 'string') return 'typeof ' + data + ' == "' + schema + '"'; + schema = 'validate.schema' + it.schemaPath + '.' + keyword; + return schema + '.indexOf(typeof ' + data + ') >= 0'; + }, + metaSchema: { + anyOf: [ + { + type: 'string', + enum: KNOWN_TYPES + }, + { + type: 'array', + items: { + type: 'string', + enum: KNOWN_TYPES + } + } + ] + } + }; + + ajv.addKeyword('typeof', defFunc.definition); + return ajv; +}; + + +/***/ }), + +/***/ 43786: +/***/ (function(module) { + +"use strict"; + + +var SCALAR_TYPES = ['number', 'integer', 'string', 'boolean', 'null']; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'array', + compile: function(keys, parentSchema, it) { + var equal = it.util.equal; + var scalar = getScalarKeys(keys, parentSchema); + + return function(data) { + if (data.length > 1) { + for (var k=0; k < keys.length; k++) { + var i, key = keys[k]; + if (scalar[k]) { + var hash = {}; + for (i = data.length; i--;) { + if (!data[i] || typeof data[i] != 'object') continue; + var prop = data[i][key]; + if (prop && typeof prop == 'object') continue; + if (typeof prop == 'string') prop = '"' + prop; + if (hash[prop]) return false; + hash[prop] = true; + } + } else { + for (i = data.length; i--;) { + if (!data[i] || typeof data[i] != 'object') continue; + for (var j = i; j--;) { + if (data[j] && typeof data[j] == 'object' && equal(data[i][key], data[j][key])) + return false; + } + } + } + } + } + return true; + }; + }, + metaSchema: { + type: 'array', + items: {type: 'string'} + } + }; + + ajv.addKeyword('uniqueItemProperties', defFunc.definition); + return ajv; +}; + + +function getScalarKeys(keys, schema) { + return keys.map(function(key) { + var properties = schema.items && schema.items.properties; + var propType = properties && properties[key] && properties[key].type; + return Array.isArray(propType) + ? propType.indexOf('object') < 0 && propType.indexOf('array') < 0 + : SCALAR_TYPES.indexOf(propType) >= 0; + }); +} + + +/***/ }), + +/***/ 21414: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var compileSchema = __webpack_require__(51645) + , resolve = __webpack_require__(62630) + , Cache = __webpack_require__(67246) + , SchemaObject = __webpack_require__(27837) + , stableStringify = __webpack_require__(73600) + , formats = __webpack_require__(49290) + , rules = __webpack_require__(91665) + , $dataMetaSchema = __webpack_require__(56989) + , util = __webpack_require__(16057); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = __webpack_require__(40075); +var customKeyword = __webpack_require__(58093); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; +Ajv.prototype.validateKeyword = customKeyword.validate; + +var errorClasses = __webpack_require__(42718); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); + addDefaultMetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); + addInitialSchemas(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: HOSTNAME, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return ((hour <= 23 && minute <= 59 && second <= 59) || + (hour == 23 && minute == 59 && second == 60)) && + (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} + + +/***/ }), + +/***/ 51645: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var resolve = __webpack_require__(62630) + , util = __webpack_require__(16057) + , errorClasses = __webpack_require__(42718) + , stableStringify = __webpack_require__(73600); + +var validateGenerator = __webpack_require__(26131); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = __webpack_require__(63933); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + if (self._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error('parent schema must have all required keywords: ' + deps.join(',')); + + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + + +/***/ }), + +/***/ 16057: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: __webpack_require__(63933), + ucs2length: __webpack_require__(19652), + varOccurences: varOccurences, + varReplace: varReplace, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + schemaUnknownRules: schemaUnknownRules, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, strictNumbers, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data, strictNumbers) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 45675: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 6051: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 17043: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 73639: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + return out; +} + + +/***/ }), + +/***/ 71256: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), + +/***/ 12660: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} + + +/***/ }), + +/***/ 10184: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 27419: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + + +/***/ }), + +/***/ 87921: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + + +/***/ }), + +/***/ 89795: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 85801: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_format(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, + $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 64962: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), + +/***/ 24124: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': __webpack_require__(95746), + allOf: __webpack_require__(73639), + anyOf: __webpack_require__(71256), + '$comment': __webpack_require__(12660), + const: __webpack_require__(10184), + contains: __webpack_require__(27419), + dependencies: __webpack_require__(77299), + 'enum': __webpack_require__(89795), + format: __webpack_require__(85801), + 'if': __webpack_require__(64962), + items: __webpack_require__(49623), + maximum: __webpack_require__(93711), + minimum: __webpack_require__(93711), + maxItems: __webpack_require__(45675), + minItems: __webpack_require__(45675), + maxLength: __webpack_require__(6051), + minLength: __webpack_require__(6051), + maxProperties: __webpack_require__(17043), + minProperties: __webpack_require__(17043), + multipleOf: __webpack_require__(99251), + not: __webpack_require__(67739), + oneOf: __webpack_require__(26857), + pattern: __webpack_require__(28099), + properties: __webpack_require__(59438), + propertyNames: __webpack_require__(53466), + required: __webpack_require__(88430), + uniqueItems: __webpack_require__(12207), + validate: __webpack_require__(26131) +}; + + +/***/ }), + +/***/ 49623: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + + +/***/ }), + +/***/ 99251: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 67739: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + + +/***/ }), + +/***/ 26857: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + + +/***/ }), + +/***/ 28099: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ 59438: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}).filter(notProto), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties).filter(notProto), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { + return p !== '__proto__'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + + +/***/ }), + +/***/ 53466: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} + + +/***/ }), + +/***/ 12207: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), + +/***/ 26131: +/***/ (function(module) { + +"use strict"; + +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [""]; + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; + } + out += ' if (' + ($coerced) + ' !== undefined) ; '; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($type == 'string') { + out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' else { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } if (' + ($coerced) + ' !== undefined) { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; + } + if (it.opts.useDefaults) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + + +/***/ }), + +/***/ 58093: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = __webpack_require__(87921); +var definitionSchema = __webpack_require__(55533); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword +}; + + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + this.validateKeyword(definition, true); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i=0; i + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +module.exports = function diff(arr/*, arrays*/) { + var len = arguments.length; + var idx = 0; + while (++idx < len) { + arr = diffArray(arr, arguments[idx]); + } + return arr; +}; + +function diffArray(one, two) { + if (!Array.isArray(two)) { + return one.slice(); + } + + var tlen = two.length + var olen = one.length; + var idx = -1; + var arr = []; + + while (++idx < olen) { + var ele = one[idx]; + + var hasEle = false; + for (var i = 0; i < tlen; i++) { + var val = two[i]; + + if (ele === val) { + hasEle = true; + break; + } + } + + if (hasEle === false) { + arr.push(ele); + } + } + return arr; +} + + +/***/ }), + +/***/ 27299: +/***/ (function(module) { + +"use strict"; +/*! + * arr-flatten + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +module.exports = function (arr) { + return flat(arr, []); +}; + +function flat(arr, res) { + var i = 0, cur; + var len = arr.length; + for (; i < len; i++) { + cur = arr[i]; + Array.isArray(cur) ? flat(cur, res) : res.push(cur); + } + return res; +} + + +/***/ }), + +/***/ 69123: +/***/ (function(module) { + +"use strict"; + + +module.exports = function union(init) { + if (!Array.isArray(init)) { + throw new TypeError('arr-union expects the first argument to be an array.'); + } + + var len = arguments.length; + var i = 0; + + while (++i < len) { + var arg = arguments[i]; + if (!arg) continue; + + if (!Array.isArray(arg)) { + arg = [arg]; + } + + for (var j = 0; j < arg.length; j++) { + var ele = arg[j]; + + if (init.indexOf(ele) >= 0) { + continue; + } + init.push(ele); + } + } + return init; +}; + + +/***/ }), + +/***/ 19009: +/***/ (function(module) { + +"use strict"; +/*! + * array-unique + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +module.exports = function unique(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var len = arr.length; + var i = -1; + + while (i++ < len) { + var j = i + 1; + + for (; j < arr.length; ++j) { + if (arr[i] === arr[j]) { + arr.splice(j--, 1); + } + } + } + return arr; +}; + +module.exports.immutable = function uniqueImmutable(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var arrLen = arr.length; + var newArr = new Array(arrLen); + + for (var i = 0; i < arrLen; i++) { + newArr[i] = arr[i]; + } + + return module.exports(newArr); +}; + + +/***/ }), + +/***/ 64353: +/***/ (function(module) { + +"use strict"; +/*! + * assign-symbols + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +module.exports = function(receiver, objects) { + if (receiver === null || typeof receiver === 'undefined') { + throw new TypeError('expected first argument to be an object.'); + } + + if (typeof objects === 'undefined' || typeof Symbol === 'undefined') { + return receiver; + } + + if (typeof Object.getOwnPropertySymbols !== 'function') { + return receiver; + } + + var isEnumerable = Object.prototype.propertyIsEnumerable; + var target = Object(receiver); + var len = arguments.length, i = 0; + + while (++i < len) { + var provider = Object(arguments[i]); + var names = Object.getOwnPropertySymbols(provider); + + for (var j = 0; j < names.length; j++) { + var key = names[j]; + + if (isEnumerable.call(provider, key)) { + target[key] = provider[key]; + } + } + } + return target; +}; + + +/***/ }), + +/***/ 83327: +/***/ (function(module) { + +"use strict"; + + +function atob(str) { + return Buffer.from(str, 'base64').toString('binary'); +} + +module.exports = atob.atob = atob; + + +/***/ }), + +/***/ 87263: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(31669); +var define = __webpack_require__(90563); +var CacheBase = __webpack_require__(63375); +var Emitter = __webpack_require__(79458); +var isObject = __webpack_require__(96667); +var merge = __webpack_require__(4870); +var pascal = __webpack_require__(27255); +var cu = __webpack_require__(71523); + +/** + * Optionally define a custom `cache` namespace to use. + */ + +function namespace(name) { + var Cache = name ? CacheBase.namespace(name) : CacheBase; + var fns = []; + + /** + * Create an instance of `Base` with the given `config` and `options`. + * + * ```js + * // initialize with `config` and `options` + * var app = new Base({isApp: true}, {abc: true}); + * app.set('foo', 'bar'); + * + * // values defined with the given `config` object will be on the root of the instance + * console.log(app.baz); //=> undefined + * console.log(app.foo); //=> 'bar' + * // or use `.get` + * console.log(app.get('isApp')); //=> true + * console.log(app.get('foo')); //=> 'bar' + * + * // values defined with the given `options` object will be on `app.options + * console.log(app.options.abc); //=> true + * ``` + * + * @param {Object} `config` If supplied, this object is passed to [cache-base][] to merge onto the the instance upon instantiation. + * @param {Object} `options` If supplied, this object is used to initialize the `base.options` object. + * @api public + */ + + function Base(config, options) { + if (!(this instanceof Base)) { + return new Base(config, options); + } + Cache.call(this, config); + this.is('base'); + this.initBase(config, options); + } + + /** + * Inherit cache-base + */ + + util.inherits(Base, Cache); + + /** + * Add static emitter methods + */ + + Emitter(Base); + + /** + * Initialize `Base` defaults with the given `config` object + */ + + Base.prototype.initBase = function(config, options) { + this.options = merge({}, this.options, options); + this.cache = this.cache || {}; + this.define('registered', {}); + if (name) this[name] = {}; + + // make `app._callbacks` non-enumerable + this.define('_callbacks', this._callbacks); + if (isObject(config)) { + this.visit('set', config); + } + Base.run(this, 'use', fns); + }; + + /** + * Set the given `name` on `app._name` and `app.is*` properties. Used for doing + * lookups in plugins. + * + * ```js + * app.is('foo'); + * console.log(app._name); + * //=> 'foo' + * console.log(app.isFoo); + * //=> true + * app.is('bar'); + * console.log(app.isFoo); + * //=> true + * console.log(app.isBar); + * //=> true + * console.log(app._name); + * //=> 'bar' + * ``` + * @name .is + * @param {String} `name` + * @return {Boolean} + * @api public + */ + + Base.prototype.is = function(name) { + if (typeof name !== 'string') { + throw new TypeError('expected name to be a string'); + } + this.define('is' + pascal(name), true); + this.define('_name', name); + this.define('_appname', name); + return this; + }; + + /** + * Returns true if a plugin has already been registered on an instance. + * + * Plugin implementors are encouraged to use this first thing in a plugin + * to prevent the plugin from being called more than once on the same + * instance. + * + * ```js + * var base = new Base(); + * base.use(function(app) { + * if (app.isRegistered('myPlugin')) return; + * // do stuff to `app` + * }); + * + * // to also record the plugin as being registered + * base.use(function(app) { + * if (app.isRegistered('myPlugin', true)) return; + * // do stuff to `app` + * }); + * ``` + * @name .isRegistered + * @emits `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once. + * @param {String} `name` The plugin name. + * @param {Boolean} `register` If the plugin if not already registered, to record it as being registered pass `true` as the second argument. + * @return {Boolean} Returns true if a plugin is already registered. + * @api public + */ + + Base.prototype.isRegistered = function(name, register) { + if (this.registered.hasOwnProperty(name)) { + return true; + } + if (register !== false) { + this.registered[name] = true; + this.emit('plugin', name); + } + return false; + }; + + /** + * Define a plugin function to be called immediately upon init. Plugins are chainable + * and expose the following arguments to the plugin function: + * + * - `app`: the current instance of `Base` + * - `base`: the [first ancestor instance](#base) of `Base` + * + * ```js + * var app = new Base() + * .use(foo) + * .use(bar) + * .use(baz) + * ``` + * @name .use + * @param {Function} `fn` plugin function to call + * @return {Object} Returns the item instance for chaining. + * @api public + */ + + Base.prototype.use = function(fn) { + fn.call(this, this); + return this; + }; + + /** + * The `.define` method is used for adding non-enumerable property on the instance. + * Dot-notation is **not supported** with `define`. + * + * ```js + * // arbitrary `render` function using lodash `template` + * app.define('render', function(str, locals) { + * return _.template(str)(locals); + * }); + * ``` + * @name .define + * @param {String} `key` The name of the property to define. + * @param {any} `value` + * @return {Object} Returns the instance for chaining. + * @api public + */ + + Base.prototype.define = function(key, val) { + if (isObject(key)) { + return this.visit('define', key); + } + define(this, key, val); + return this; + }; + + /** + * Mix property `key` onto the Base prototype. If base is inherited using + * `Base.extend` this method will be overridden by a new `mixin` method that will + * only add properties to the prototype of the inheriting application. + * + * ```js + * app.mixin('foo', function() { + * // do stuff + * }); + * ``` + * @name .mixin + * @param {String} `key` + * @param {Object|Array} `val` + * @return {Object} Returns the `base` instance for chaining. + * @api public + */ + + Base.prototype.mixin = function(key, val) { + Base.prototype[key] = val; + return this; + }; + + /** + * Non-enumberable mixin array, used by the static [Base.mixin]() method. + */ + + Base.prototype.mixins = Base.prototype.mixins || []; + + /** + * Getter/setter used when creating nested instances of `Base`, for storing a reference + * to the first ancestor instance. This works by setting an instance of `Base` on the `parent` + * property of a "child" instance. The `base` property defaults to the current instance if + * no `parent` property is defined. + * + * ```js + * // create an instance of `Base`, this is our first ("base") instance + * var first = new Base(); + * first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later + * + * // create another instance + * var second = new Base(); + * // create a reference to the first instance (`first`) + * second.parent = first; + * + * // create another instance + * var third = new Base(); + * // create a reference to the previous instance (`second`) + * // repeat this pattern every time a "child" instance is created + * third.parent = second; + * + * // we can always access the first instance using the `base` property + * console.log(first.base.foo); + * //=> 'bar' + * console.log(second.base.foo); + * //=> 'bar' + * console.log(third.base.foo); + * //=> 'bar' + * // and now you know how to get to third base ;) + * ``` + * @name .base + * @api public + */ + + Object.defineProperty(Base.prototype, 'base', { + configurable: true, + get: function() { + return this.parent ? this.parent.base : this; + } + }); + + /** + * Static method for adding global plugin functions that will + * be added to an instance when created. + * + * ```js + * Base.use(function(app) { + * app.foo = 'bar'; + * }); + * var app = new Base(); + * console.log(app.foo); + * //=> 'bar' + * ``` + * @name #use + * @param {Function} `fn` Plugin function to use on each instance. + * @return {Object} Returns the `Base` constructor for chaining + * @api public + */ + + define(Base, 'use', function(fn) { + fns.push(fn); + return Base; + }); + + /** + * Run an array of functions by passing each function + * to a method on the given object specified by the given property. + * + * @param {Object} `obj` Object containing method to use. + * @param {String} `prop` Name of the method on the object to use. + * @param {Array} `arr` Array of functions to pass to the method. + */ + + define(Base, 'run', function(obj, prop, arr) { + var len = arr.length, i = 0; + while (len--) { + obj[prop](arr[i++]); + } + return Base; + }); + + /** + * Static method for inheriting the prototype and static methods of the `Base` class. + * This method greatly simplifies the process of creating inheritance-based applications. + * See [static-extend][] for more details. + * + * ```js + * var extend = cu.extend(Parent); + * Parent.extend(Child); + * + * // optional methods + * Parent.extend(Child, { + * foo: function() {}, + * bar: function() {} + * }); + * ``` + * @name #extend + * @param {Function} `Ctor` constructor to extend + * @param {Object} `methods` Optional prototype properties to mix in. + * @return {Object} Returns the `Base` constructor for chaining + * @api public + */ + + define(Base, 'extend', cu.extend(Base, function(Ctor, Parent) { + Ctor.prototype.mixins = Ctor.prototype.mixins || []; + + define(Ctor, 'mixin', function(fn) { + var mixin = fn(Ctor.prototype, Ctor); + if (typeof mixin === 'function') { + Ctor.prototype.mixins.push(mixin); + } + return Ctor; + }); + + define(Ctor, 'mixins', function(Child) { + Base.run(Child, 'mixin', Ctor.prototype.mixins); + return Ctor; + }); + + Ctor.prototype.mixin = function(key, value) { + Ctor.prototype[key] = value; + return this; + }; + return Base; + })); + + /** + * Used for adding methods to the `Base` prototype, and/or to the prototype of child instances. + * When a mixin function returns a function, the returned function is pushed onto the `.mixins` + * array, making it available to be used on inheriting classes whenever `Base.mixins()` is + * called (e.g. `Base.mixins(Child)`). + * + * ```js + * Base.mixin(function(proto) { + * proto.foo = function(msg) { + * return 'foo ' + msg; + * }; + * }); + * ``` + * @name #mixin + * @param {Function} `fn` Function to call + * @return {Object} Returns the `Base` constructor for chaining + * @api public + */ + + define(Base, 'mixin', function(fn) { + var mixin = fn(Base.prototype, Base); + if (typeof mixin === 'function') { + Base.prototype.mixins.push(mixin); + } + return Base; + }); + + /** + * Static method for running global mixin functions against a child constructor. + * Mixins must be registered before calling this method. + * + * ```js + * Base.extend(Child); + * Base.mixins(Child); + * ``` + * @name #mixins + * @param {Function} `Child` Constructor function of a child class + * @return {Object} Returns the `Base` constructor for chaining + * @api public + */ + + define(Base, 'mixins', function(Child) { + Base.run(Child, 'mixin', Base.prototype.mixins); + return Base; + }); + + /** + * Similar to `util.inherit`, but copies all static properties, prototype properties, and + * getters/setters from `Provider` to `Receiver`. See [class-utils][]{#inherit} for more details. + * + * ```js + * Base.inherit(Foo, Bar); + * ``` + * @name #inherit + * @param {Function} `Receiver` Receiving (child) constructor + * @param {Function} `Provider` Providing (parent) constructor + * @return {Object} Returns the `Base` constructor for chaining + * @api public + */ + + define(Base, 'inherit', cu.inherit); + define(Base, 'bubble', cu.bubble); + return Base; +} + +/** + * Expose `Base` with default settings + */ + +module.exports = namespace(); + +/** + * Allow users to define a namespace + */ + +module.exports.namespace = namespace; + + +/***/ }), + +/***/ 90563: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * define-property + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isDescriptor = __webpack_require__(44133); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; + + +/***/ }), + +/***/ 22706: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +/** + * Module dependencies + */ + +var toRegex = __webpack_require__(51279); +var unique = __webpack_require__(19009); +var extend = __webpack_require__(28727); + +/** + * Local dependencies + */ + +var compilers = __webpack_require__(46109); +var parsers = __webpack_require__(49665); +var Braces = __webpack_require__(68297); +var utils = __webpack_require__(68130); +var MAX_LENGTH = 1024 * 64; +var cache = {}; + +/** + * Convert the given `braces` pattern into a regex-compatible string. By default, only one string is generated for every input string. Set `options.expand` to true to return an array of patterns (similar to Bash or minimatch. Before using `options.expand`, it's recommended that you read the [performance notes](#performance)). + * + * ```js + * var braces = require('braces'); + * console.log(braces('{a,b,c}')); + * //=> ['(a|b|c)'] + * + * console.log(braces('{a,b,c}', {expand: true})); + * //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +function braces(pattern, options) { + var key = utils.createKey(String(pattern), options); + var arr = []; + + var disabled = options && options.cache === false; + if (!disabled && cache.hasOwnProperty(key)) { + return cache[key]; + } + + if (Array.isArray(pattern)) { + for (var i = 0; i < pattern.length; i++) { + arr.push.apply(arr, braces.create(pattern[i], options)); + } + } else { + arr = braces.create(pattern, options); + } + + if (options && options.nodupes === true) { + arr = unique(arr); + } + + if (!disabled) { + cache[key] = arr; + } + return arr; +} + +/** + * Expands a brace pattern into an array. This method is called by the main [braces](#braces) function when `options.expand` is true. Before using this method it's recommended that you read the [performance notes](#performance)) and advantages of using [.optimize](#optimize) instead. + * + * ```js + * var braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = function(pattern, options) { + return braces.create(pattern, extend({}, options, {expand: true})); +}; + +/** + * Expands a brace pattern into a regex-compatible, optimized string. This method is called by the main [braces](#braces) function by default. + * + * ```js + * var braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.optimize = function(pattern, options) { + return braces.create(pattern, options); +}; + +/** + * Processes a brace pattern and returns either an expanded array (if `options.expand` is true), a highly optimized regex-compatible string. This method is called by the main [braces](#braces) function. + * + * ```js + * var braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var maxLength = (options && options.maxLength) || MAX_LENGTH; + if (pattern.length >= maxLength) { + throw new Error('expected pattern to be less than ' + maxLength + ' characters'); + } + + function create() { + if (pattern === '' || pattern.length < 3) { + return [pattern]; + } + + if (utils.isEmptySets(pattern)) { + return []; + } + + if (utils.isQuotedString(pattern)) { + return [pattern.slice(1, -1)]; + } + + var proto = new Braces(options); + var result = !options || options.expand !== true + ? proto.optimize(pattern, options) + : proto.expand(pattern, options); + + // get the generated pattern(s) + var arr = result.output; + + // filter out empty strings if specified + if (options && options.noempty === true) { + arr = arr.filter(Boolean); + } + + // filter out duplicates if specified + if (options && options.nodupes === true) { + arr = unique(arr); + } + + Object.defineProperty(arr, 'result', { + enumerable: false, + value: result + }); + + return arr; + } + + return memoize('create', pattern, options, create); +}; + +/** + * Create a regular expression from the given string `pattern`. + * + * ```js + * var braces = require('braces'); + * + * console.log(braces.makeRe('id-{200..300}')); + * //=> /^(?:id-(20[0-9]|2[1-9][0-9]|300))$/ + * ``` + * @param {String} `pattern` The pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +braces.makeRe = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var maxLength = (options && options.maxLength) || MAX_LENGTH; + if (pattern.length >= maxLength) { + throw new Error('expected pattern to be less than ' + maxLength + ' characters'); + } + + function makeRe() { + var arr = braces(pattern, options); + var opts = extend({strictErrors: false}, options); + return toRegex(arr, opts); + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var braces = require('braces'); + * var ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `pattern` Brace pattern to parse + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = function(pattern, options) { + var proto = new Braces(options); + return proto.parse(pattern, options); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var braces = require('braces'); + * var ast = braces.parse('a/{b,c}/d'); + * console.log(braces.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` AST from [.parse](#parse). If a string is passed it will be parsed first. + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +braces.compile = function(ast, options) { + var proto = new Braces(options); + return proto.compile(ast, options); +}; + +/** + * Clear the regex cache. + * + * ```js + * braces.clearCache(); + * ``` + * @api public + */ + +braces.clearCache = function() { + cache = braces.cache = {}; +}; + +/** + * Memoize a generated regex or function. A unique key is generated + * from the method name, pattern, and user-defined options. Set + * options.memoize to false to disable. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + ':' + pattern, options); + var disabled = options && options.cache === false; + if (disabled) { + braces.clearCache(); + return fn(pattern, options); + } + + if (cache.hasOwnProperty(key)) { + return cache[key]; + } + + var res = fn(pattern, options); + cache[key] = res; + return res; +} + +/** + * Expose `Braces` constructor and methods + * @type {Function} + */ + +braces.Braces = Braces; +braces.compilers = compilers; +braces.parsers = parsers; +braces.cache = cache; + +/** + * Expose `braces` + * @type {Function} + */ + +module.exports = braces; + + +/***/ }), + +/***/ 68297: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var extend = __webpack_require__(28727); +var Snapdragon = __webpack_require__(79285); +var compilers = __webpack_require__(46109); +var parsers = __webpack_require__(49665); +var utils = __webpack_require__(68130); + +/** + * Customize Snapdragon parser and renderer + */ + +function Braces(options) { + this.options = extend({}, options); +} + +/** + * Initialize braces + */ + +Braces.prototype.init = function(options) { + if (this.isInitialized) return; + this.isInitialized = true; + var opts = utils.createOptions({}, this.options, options); + this.snapdragon = this.options.snapdragon || new Snapdragon(opts); + this.compiler = this.snapdragon.compiler; + this.parser = this.snapdragon.parser; + + compilers(this.snapdragon, opts); + parsers(this.snapdragon, opts); + + /** + * Call Snapdragon `.parse` method. When AST is returned, we check to + * see if any unclosed braces are left on the stack and, if so, we iterate + * over the stack and correct the AST so that compilers are called in the correct + * order and unbalance braces are properly escaped. + */ + + utils.define(this.snapdragon, 'parse', function(pattern, options) { + var parsed = Snapdragon.prototype.parse.apply(this, arguments); + this.parser.ast.input = pattern; + + var stack = this.parser.stack; + while (stack.length) { + addParent({type: 'brace.close', val: ''}, stack.pop()); + } + + function addParent(node, parent) { + utils.define(node, 'parent', parent); + parent.nodes.push(node); + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); +}; + +/** + * Decorate `.parse` method + */ + +Braces.prototype.parse = function(ast, options) { + if (ast && typeof ast === 'object' && ast.nodes) return ast; + this.init(options); + return this.snapdragon.parse(ast, options); +}; + +/** + * Decorate `.compile` method + */ + +Braces.prototype.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = this.parse(ast, options); + } else { + this.init(options); + } + return this.snapdragon.compile(ast, options); +}; + +/** + * Expand + */ + +Braces.prototype.expand = function(pattern) { + var ast = this.parse(pattern, {expand: true}); + return this.compile(ast, {expand: true}); +}; + +/** + * Optimize + */ + +Braces.prototype.optimize = function(pattern) { + var ast = this.parse(pattern, {optimize: true}); + return this.compile(ast, {optimize: true}); +}; + +/** + * Expose `Braces` + */ + +module.exports = Braces; + + +/***/ }), + +/***/ 46109: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(68130); + +module.exports = function(braces, options) { + braces.compiler + + /** + * bos + */ + + .set('bos', function() { + if (this.output) return; + this.ast.queue = isEscaped(this.ast) ? [this.ast.val] : []; + this.ast.count = 1; + }) + + /** + * Square brackets + */ + + .set('bracket', function(node) { + var close = node.close; + var open = !node.escaped ? '[' : '\\['; + var negated = node.negated; + var inner = node.inner; + + inner = inner.replace(/\\(?=[\\\w]|$)/g, '\\\\'); + if (inner === ']-') { + inner = '\\]\\-'; + } + + if (negated && inner.indexOf('.') === -1) { + inner += '.'; + } + if (negated && inner.indexOf('/') === -1) { + inner += '/'; + } + + var val = open + negated + inner + close; + var queue = node.parent.queue; + var last = utils.arrayify(queue.pop()); + + queue.push(utils.join(last, val)); + queue.push.apply(queue, []); + }) + + /** + * Brace + */ + + .set('brace', function(node) { + node.queue = isEscaped(node) ? [node.val] : []; + node.count = 1; + return this.mapVisit(node.nodes); + }) + + /** + * Open + */ + + .set('brace.open', function(node) { + node.parent.open = node.val; + }) + + /** + * Inner + */ + + .set('text', function(node) { + var queue = node.parent.queue; + var escaped = node.escaped; + var segs = [node.val]; + + if (node.optimize === false) { + options = utils.extend({}, options, {optimize: false}); + } + + if (node.multiplier > 1) { + node.parent.count *= node.multiplier; + } + + if (options.quantifiers === true && utils.isQuantifier(node.val)) { + escaped = true; + + } else if (node.val.length > 1) { + if (isType(node.parent, 'brace') && !isEscaped(node)) { + var expanded = utils.expand(node.val, options); + segs = expanded.segs; + + if (expanded.isOptimized) { + node.parent.isOptimized = true; + } + + // if nothing was expanded, we probably have a literal brace + if (!segs.length) { + var val = (expanded.val || node.val); + if (options.unescape !== false) { + // unescape unexpanded brace sequence/set separators + val = val.replace(/\\([,.])/g, '$1'); + // strip quotes + val = val.replace(/["'`]/g, ''); + } + + segs = [val]; + escaped = true; + } + } + + } else if (node.val === ',') { + if (options.expand) { + node.parent.queue.push(['']); + segs = ['']; + } else { + segs = ['|']; + } + } else { + escaped = true; + } + + if (escaped && isType(node.parent, 'brace')) { + if (node.parent.nodes.length <= 4 && node.parent.count === 1) { + node.parent.escaped = true; + } else if (node.parent.length <= 3) { + node.parent.escaped = true; + } + } + + if (!hasQueue(node.parent)) { + node.parent.queue = segs; + return; + } + + var last = utils.arrayify(queue.pop()); + if (node.parent.count > 1 && options.expand) { + last = multiply(last, node.parent.count); + node.parent.count = 1; + } + + queue.push(utils.join(utils.flatten(last), segs.shift())); + queue.push.apply(queue, segs); + }) + + /** + * Close + */ + + .set('brace.close', function(node) { + var queue = node.parent.queue; + var prev = node.parent.parent; + var last = prev.queue.pop(); + var open = node.parent.open; + var close = node.val; + + if (open && close && isOptimized(node, options)) { + open = '('; + close = ')'; + } + + // if a close brace exists, and the previous segment is one character + // don't wrap the result in braces or parens + var ele = utils.last(queue); + if (node.parent.count > 1 && options.expand) { + ele = multiply(queue.pop(), node.parent.count); + node.parent.count = 1; + queue.push(ele); + } + + if (close && typeof ele === 'string' && ele.length === 1) { + open = ''; + close = ''; + } + + if ((isLiteralBrace(node, options) || noInner(node)) && !node.parent.hasEmpty) { + queue.push(utils.join(open, queue.pop() || '')); + queue = utils.flatten(utils.join(queue, close)); + } + + if (typeof last === 'undefined') { + prev.queue = [queue]; + } else { + prev.queue.push(utils.flatten(utils.join(last, queue))); + } + }) + + /** + * eos + */ + + .set('eos', function(node) { + if (this.input) return; + + if (options.optimize !== false) { + this.output = utils.last(utils.flatten(this.ast.queue)); + } else if (Array.isArray(utils.last(this.ast.queue))) { + this.output = utils.flatten(this.ast.queue.pop()); + } else { + this.output = utils.flatten(this.ast.queue); + } + + if (node.parent.count > 1 && options.expand) { + this.output = multiply(this.output, node.parent.count); + } + + this.output = utils.arrayify(this.output); + this.ast.queue = []; + }); + +}; + +/** + * Multiply the segments in the current brace level + */ + +function multiply(queue, n, options) { + return utils.flatten(utils.repeat(utils.arrayify(queue), n)); +} + +/** + * Return true if `node` is escaped + */ + +function isEscaped(node) { + return node.escaped === true; +} + +/** + * Returns true if regex parens should be used for sets. If the parent `type` + * is not `brace`, then we're on a root node, which means we should never + * expand segments and open/close braces should be `{}` (since this indicates + * a brace is missing from the set) + */ + +function isOptimized(node, options) { + if (node.parent.isOptimized) return true; + return isType(node.parent, 'brace') + && !isEscaped(node.parent) + && options.expand !== true; +} + +/** + * Returns true if the value in `node` should be wrapped in a literal brace. + * @return {Boolean} + */ + +function isLiteralBrace(node, options) { + return isEscaped(node.parent) || options.optimize !== false; +} + +/** + * Returns true if the given `node` does not have an inner value. + * @return {Boolean} + */ + +function noInner(node, type) { + if (node.parent.queue.length === 1) { + return true; + } + var nodes = node.parent.nodes; + return nodes.length === 3 + && isType(nodes[0], 'brace.open') + && !isType(nodes[1], 'text') + && isType(nodes[2], 'brace.close'); +} + +/** + * Returns true if the given `node` is the given `type` + * @return {Boolean} + */ + +function isType(node, type) { + return typeof node !== 'undefined' && node.type === type; +} + +/** + * Returns true if the given `node` has a non-empty queue. + * @return {Boolean} + */ + +function hasQueue(node) { + return Array.isArray(node.queue) && node.queue.length; +} + + +/***/ }), + +/***/ 49665: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var Node = __webpack_require__(12579); +var utils = __webpack_require__(68130); + +/** + * Braces parsers + */ + +module.exports = function(braces, options) { + braces.parser + .set('bos', function() { + if (!this.parsed) { + this.ast = this.nodes[0] = new Node(this.ast); + } + }) + + /** + * Character parsers + */ + + .set('escape', function() { + var pos = this.position(); + var m = this.match(/^(?:\\(.)|\$\{)/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + var node = pos(new Node({ + type: 'text', + multiplier: 1, + val: m[0] + })); + + if (node.val === '\\\\') { + return node; + } + + if (node.val === '${') { + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + node.val += ch; + if (ch === '\\') { + node.val += str[++idx]; + continue; + } + if (ch === '}') { + break; + } + } + } + + if (this.options.unescape !== false) { + node.val = node.val.replace(/\\([{}])/g, '$1'); + } + + if (last.val === '"' && this.input.charAt(0) === '"') { + last.val = node.val; + this.consume(1); + return; + } + + return concatNodes.call(this, pos, node, prev, options); + }) + + /** + * Brackets: "[...]" (basic, this is overridden by + * other parsers in more advanced implementations) + */ + + .set('bracket', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^(?:\[([!^]?)([^\]]{2,}|\]-)(\]|[^*+?]+)|\[)/); + if (!m) return; + + var prev = this.prev(); + var val = m[0]; + var negated = m[1] ? '^' : ''; + var inner = m[2] || ''; + var close = m[3] || ''; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + var esc = this.input.slice(0, 2); + if (inner === '' && esc === '\\]') { + inner += esc; + this.consume(2); + + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + if (ch === ']') { + close = ch; + break; + } + inner += ch; + } + } + + return pos(new Node({ + type: 'bracket', + val: val, + escaped: close !== ']', + negated: negated, + inner: inner, + close: close + })); + }) + + /** + * Empty braces (we capture these early to + * speed up processing in the compiler) + */ + + .set('multiplier', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^\{((?:,|\{,+\})+)\}/); + if (!m) return; + + this.multiplier = true; + var prev = this.prev(); + var val = m[0]; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + var node = pos(new Node({ + type: 'text', + multiplier: 1, + match: m, + val: val + })); + + return concatNodes.call(this, pos, node, prev, options); + }) + + /** + * Open + */ + + .set('brace.open', function() { + var pos = this.position(); + var m = this.match(/^\{(?!(?:[^\\}]?|,+)\})/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + // if the last parsed character was an extglob character + // we need to _not optimize_ the brace pattern because + // it might be mistaken for an extglob by a downstream parser + if (last && last.val && isExtglobChar(last.val.slice(-1))) { + last.optimize = false; + } + + var open = pos(new Node({ + type: 'brace.open', + val: m[0] + })); + + var node = pos(new Node({ + type: 'brace', + nodes: [] + })); + + node.push(open); + prev.push(node); + this.push('brace', node); + }) + + /** + * Close + */ + + .set('brace.close', function() { + var pos = this.position(); + var m = this.match(/^\}/); + if (!m || !m[0]) return; + + var brace = this.pop('brace'); + var node = pos(new Node({ + type: 'brace.close', + val: m[0] + })); + + if (!this.isType(brace, 'brace')) { + if (this.options.strict) { + throw new Error('missing opening "{"'); + } + node.type = 'text'; + node.multiplier = 0; + node.escaped = true; + return node; + } + + var prev = this.prev(); + var last = utils.last(prev.nodes); + if (last.text) { + var lastNode = utils.last(last.nodes); + if (lastNode.val === ')' && /[!@*?+]\(/.test(last.text)) { + var open = last.nodes[0]; + var text = last.nodes[1]; + if (open.type === 'brace.open' && text && text.type === 'text') { + text.optimize = false; + } + } + } + + if (brace.nodes.length > 2) { + var first = brace.nodes[1]; + if (first.type === 'text' && first.val === ',') { + brace.nodes.splice(1, 1); + brace.nodes.push(first); + } + } + + brace.push(node); + }) + + /** + * Capture boundary characters + */ + + .set('boundary', function() { + var pos = this.position(); + var m = this.match(/^[$^](?!\{)/); + if (!m) return; + return pos(new Node({ + type: 'text', + val: m[0] + })); + }) + + /** + * One or zero, non-comma characters wrapped in braces + */ + + .set('nobrace', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^\{[^,]?\}/); + if (!m) return; + + var prev = this.prev(); + var val = m[0]; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + return pos(new Node({ + type: 'text', + multiplier: 0, + val: val + })); + }) + + /** + * Text + */ + + .set('text', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^((?!\\)[^${}[\]])+/); + if (!m) return; + + var prev = this.prev(); + var val = m[0]; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + var node = pos(new Node({ + type: 'text', + multiplier: 1, + val: val + })); + + return concatNodes.call(this, pos, node, prev, options); + }); +}; + +/** + * Returns true if the character is an extglob character. + */ + +function isExtglobChar(ch) { + return ch === '!' || ch === '@' || ch === '*' || ch === '?' || ch === '+'; +} + +/** + * Combine text nodes, and calculate empty sets (`{,,}`) + * @param {Function} `pos` Function to calculate node position + * @param {Object} `node` AST node + * @return {Object} + */ + +function concatNodes(pos, node, parent, options) { + node.orig = node.val; + var prev = this.prev(); + var last = utils.last(prev.nodes); + var isEscaped = false; + + if (node.val.length > 1) { + var a = node.val.charAt(0); + var b = node.val.slice(-1); + + isEscaped = (a === '"' && b === '"') + || (a === "'" && b === "'") + || (a === '`' && b === '`'); + } + + if (isEscaped && options.unescape !== false) { + node.val = node.val.slice(1, node.val.length - 1); + node.escaped = true; + } + + if (node.match) { + var match = node.match[1]; + if (!match || match.indexOf('}') === -1) { + match = node.match[0]; + } + + // replace each set with a single "," + var val = match.replace(/\{/g, ',').replace(/\}/g, ''); + node.multiplier *= val.length; + node.val = ''; + } + + var simpleText = last.type === 'text' + && last.multiplier === 1 + && node.multiplier === 1 + && node.val; + + if (simpleText) { + last.val += node.val; + return; + } + + prev.push(node); +} + + +/***/ }), + +/***/ 68130: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var splitString = __webpack_require__(33218); +var utils = module.exports; + +/** + * Module dependencies + */ + +utils.extend = __webpack_require__(28727); +utils.flatten = __webpack_require__(27299); +utils.isObject = __webpack_require__(96667); +utils.fillRange = __webpack_require__(35955); +utils.repeat = __webpack_require__(69523); +utils.unique = __webpack_require__(19009); + +utils.define = function(obj, key, val) { + Object.defineProperty(obj, key, { + writable: true, + configurable: true, + enumerable: false, + value: val + }); +}; + +/** + * Returns true if the given string contains only empty brace sets. + */ + +utils.isEmptySets = function(str) { + return /^(?:\{,\})+$/.test(str); +}; + +/** + * Returns true if the given string contains only empty brace sets. + */ + +utils.isQuotedString = function(str) { + var open = str.charAt(0); + if (open === '\'' || open === '"' || open === '`') { + return str.slice(-1) === open; + } + return false; +}; + +/** + * Create the key to use for memoization. The unique key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + var id = pattern; + if (typeof options === 'undefined') { + return id; + } + var keys = Object.keys(options); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + id += ';' + key + '=' + String(options[key]); + } + return id; +}; + +/** + * Normalize options + */ + +utils.createOptions = function(options) { + var opts = utils.extend.apply(null, arguments); + if (typeof opts.expand === 'boolean') { + opts.optimize = !opts.expand; + } + if (typeof opts.optimize === 'boolean') { + opts.expand = !opts.optimize; + } + if (opts.optimize === true) { + opts.makeRe = true; + } + return opts; +}; + +/** + * Join patterns in `a` to patterns in `b` + */ + +utils.join = function(a, b, options) { + options = options || {}; + a = utils.arrayify(a); + b = utils.arrayify(b); + + if (!a.length) return b; + if (!b.length) return a; + + var len = a.length; + var idx = -1; + var arr = []; + + while (++idx < len) { + var val = a[idx]; + if (Array.isArray(val)) { + for (var i = 0; i < val.length; i++) { + val[i] = utils.join(val[i], b, options); + } + arr.push(val); + continue; + } + + for (var j = 0; j < b.length; j++) { + var bval = b[j]; + + if (Array.isArray(bval)) { + arr.push(utils.join(val, bval, options)); + } else { + arr.push(val + bval); + } + } + } + return arr; +}; + +/** + * Split the given string on `,` if not escaped. + */ + +utils.split = function(str, options) { + var opts = utils.extend({sep: ','}, options); + if (typeof opts.keepQuotes !== 'boolean') { + opts.keepQuotes = true; + } + if (opts.unescape === false) { + opts.keepEscaping = true; + } + return splitString(str, opts, utils.escapeBrackets(opts)); +}; + +/** + * Expand ranges or sets in the given `pattern`. + * + * @param {String} `str` + * @param {Object} `options` + * @return {Object} + */ + +utils.expand = function(str, options) { + var opts = utils.extend({rangeLimit: 10000}, options); + var segs = utils.split(str, opts); + var tok = { segs: segs }; + + if (utils.isQuotedString(str)) { + return tok; + } + + if (opts.rangeLimit === true) { + opts.rangeLimit = 10000; + } + + if (segs.length > 1) { + if (opts.optimize === false) { + tok.val = segs[0]; + return tok; + } + + tok.segs = utils.stringifyArray(tok.segs); + } else if (segs.length === 1) { + var arr = str.split('..'); + + if (arr.length === 1) { + tok.val = tok.segs[tok.segs.length - 1] || tok.val || str; + tok.segs = []; + return tok; + } + + if (arr.length === 2 && arr[0] === arr[1]) { + tok.escaped = true; + tok.val = arr[0]; + tok.segs = []; + return tok; + } + + if (arr.length > 1) { + if (opts.optimize !== false) { + opts.optimize = true; + delete opts.expand; + } + + if (opts.optimize !== true) { + var min = Math.min(arr[0], arr[1]); + var max = Math.max(arr[0], arr[1]); + var step = arr[2] || 1; + + if (opts.rangeLimit !== false && ((max - min) / step >= opts.rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + } + + arr.push(opts); + tok.segs = utils.fillRange.apply(null, arr); + + if (!tok.segs.length) { + tok.escaped = true; + tok.val = str; + return tok; + } + + if (opts.optimize === true) { + tok.segs = utils.stringifyArray(tok.segs); + } + + if (tok.segs === '') { + tok.val = str; + } else { + tok.val = tok.segs[0]; + } + return tok; + } + } else { + tok.val = str; + } + return tok; +}; + +/** + * Ensure commas inside brackets and parens are not split. + * @param {Object} `tok` Token from the `split-string` module + * @return {undefined} + */ + +utils.escapeBrackets = function(options) { + return function(tok) { + if (tok.escaped && tok.val === 'b') { + tok.val = '\\b'; + return; + } + + if (tok.val !== '(' && tok.val !== '[') return; + var opts = utils.extend({}, options); + var brackets = []; + var parens = []; + var stack = []; + var val = tok.val; + var str = tok.str; + var i = tok.idx - 1; + + while (++i < str.length) { + var ch = str[i]; + + if (ch === '\\') { + val += (opts.keepEscaping === false ? '' : ch) + str[++i]; + continue; + } + + if (ch === '(') { + parens.push(ch); + stack.push(ch); + } + + if (ch === '[') { + brackets.push(ch); + stack.push(ch); + } + + if (ch === ')') { + parens.pop(); + stack.pop(); + if (!stack.length) { + val += ch; + break; + } + } + + if (ch === ']') { + brackets.pop(); + stack.pop(); + if (!stack.length) { + val += ch; + break; + } + } + val += ch; + } + + tok.split = false; + tok.val = val.slice(1); + tok.idx = i; + }; +}; + +/** + * Returns true if the given string looks like a regex quantifier + * @return {Boolean} + */ + +utils.isQuantifier = function(str) { + return /^(?:[0-9]?,[0-9]|[0-9],)$/.test(str); +}; + +/** + * Cast `val` to an array. + * @param {*} `val` + */ + +utils.stringifyArray = function(arr) { + return [utils.arrayify(arr).join('|')]; +}; + +/** + * Cast `val` to an array. + * @param {*} `val` + */ + +utils.arrayify = function(arr) { + if (typeof arr === 'undefined') { + return []; + } + if (typeof arr === 'string') { + return [arr]; + } + return arr; +}; + +/** + * Returns true if the given `str` is a non-empty string + * @return {Boolean} + */ + +utils.isString = function(str) { + return str != null && typeof str === 'string'; +}; + +/** + * Get the last element from `array` + * @param {Array} `array` + * @return {*} + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +utils.escapeRegex = function(str) { + return str.replace(/\\?([!^*?()[\]{}+?/])/g, '\\$1'); +}; + + +/***/ }), + +/***/ 63375: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isObject = __webpack_require__(96667); +var Emitter = __webpack_require__(79458); +var visit = __webpack_require__(16704); +var toPath = __webpack_require__(71708); +var union = __webpack_require__(7716); +var del = __webpack_require__(5834); +var get = __webpack_require__(89304); +var has = __webpack_require__(41825); +var set = __webpack_require__(34857); + +/** + * Create a `Cache` constructor that when instantiated will + * store values on the given `prop`. + * + * ```js + * var Cache = require('cache-base').namespace('data'); + * var cache = new Cache(); + * + * cache.set('foo', 'bar'); + * //=> {data: {foo: 'bar'}} + * ``` + * @param {String} `prop` The property name to use for storing values. + * @return {Function} Returns a custom `Cache` constructor + * @api public + */ + +function namespace(prop) { + + /** + * Create a new `Cache`. Internally the `Cache` constructor is created using + * the `namespace` function, with `cache` defined as the storage object. + * + * ```js + * var app = new Cache(); + * ``` + * @param {Object} `cache` Optionally pass an object to initialize with. + * @constructor + * @api public + */ + + function Cache(cache) { + if (prop) { + this[prop] = {}; + } + if (cache) { + this.set(cache); + } + } + + /** + * Inherit Emitter + */ + + Emitter(Cache.prototype); + + /** + * Assign `value` to `key`. Also emits `set` with + * the key and value. + * + * ```js + * app.on('set', function(key, val) { + * // do something when `set` is emitted + * }); + * + * app.set(key, value); + * + * // also takes an object or array + * app.set({name: 'Halle'}); + * app.set([{foo: 'bar'}, {baz: 'quux'}]); + * console.log(app); + * //=> {name: 'Halle', foo: 'bar', baz: 'quux'} + * ``` + * + * @name .set + * @emits `set` with `key` and `value` as arguments. + * @param {String} `key` + * @param {any} `value` + * @return {Object} Returns the instance for chaining. + * @api public + */ + + Cache.prototype.set = function(key, val) { + if (Array.isArray(key) && arguments.length === 2) { + key = toPath(key); + } + if (isObject(key) || Array.isArray(key)) { + this.visit('set', key); + } else { + set(prop ? this[prop] : this, key, val); + this.emit('set', key, val); + } + return this; + }; + + /** + * Union `array` to `key`. Also emits `set` with + * the key and value. + * + * ```js + * app.union('a.b', ['foo']); + * app.union('a.b', ['bar']); + * console.log(app.get('a')); + * //=> {b: ['foo', 'bar']} + * ``` + * @name .union + * @param {String} `key` + * @param {any} `value` + * @return {Object} Returns the instance for chaining. + * @api public + */ + + Cache.prototype.union = function(key, val) { + if (Array.isArray(key) && arguments.length === 2) { + key = toPath(key); + } + var ctx = prop ? this[prop] : this; + union(ctx, key, arrayify(val)); + this.emit('union', val); + return this; + }; + + /** + * Return the value of `key`. Dot notation may be used + * to get [nested property values][get-value]. + * + * ```js + * app.set('a.b.c', 'd'); + * app.get('a.b'); + * //=> {c: 'd'} + * + * app.get(['a', 'b']); + * //=> {c: 'd'} + * ``` + * + * @name .get + * @emits `get` with `key` and `value` as arguments. + * @param {String} `key` The name of the property to get. Dot-notation may be used. + * @return {any} Returns the value of `key` + * @api public + */ + + Cache.prototype.get = function(key) { + key = toPath(arguments); + + var ctx = prop ? this[prop] : this; + var val = get(ctx, key); + + this.emit('get', key, val); + return val; + }; + + /** + * Return true if app has a stored value for `key`, + * false only if value is `undefined`. + * + * ```js + * app.set('foo', 'bar'); + * app.has('foo'); + * //=> true + * ``` + * + * @name .has + * @emits `has` with `key` and true or false as arguments. + * @param {String} `key` + * @return {Boolean} + * @api public + */ + + Cache.prototype.has = function(key) { + key = toPath(arguments); + + var ctx = prop ? this[prop] : this; + var val = get(ctx, key); + + var has = typeof val !== 'undefined'; + this.emit('has', key, has); + return has; + }; + + /** + * Delete one or more properties from the instance. + * + * ```js + * app.del(); // delete all + * // or + * app.del('foo'); + * // or + * app.del(['foo', 'bar']); + * ``` + * @name .del + * @emits `del` with the `key` as the only argument. + * @param {String|Array} `key` Property name or array of property names. + * @return {Object} Returns the instance for chaining. + * @api public + */ + + Cache.prototype.del = function(key) { + if (Array.isArray(key)) { + this.visit('del', key); + } else { + del(prop ? this[prop] : this, key); + this.emit('del', key); + } + return this; + }; + + /** + * Reset the entire cache to an empty object. + * + * ```js + * app.clear(); + * ``` + * @api public + */ + + Cache.prototype.clear = function() { + if (prop) { + this[prop] = {}; + } + }; + + /** + * Visit `method` over the properties in the given object, or map + * visit over the object-elements in an array. + * + * @name .visit + * @param {String} `method` The name of the `base` method to call. + * @param {Object|Array} `val` The object or array to iterate over. + * @return {Object} Returns the instance for chaining. + * @api public + */ + + Cache.prototype.visit = function(method, val) { + visit(this, method, val); + return this; + }; + + return Cache; +} + +/** + * Cast val to an array + */ + +function arrayify(val) { + return val ? (Array.isArray(val) ? val : [val]) : []; +} + +/** + * Expose `Cache` + */ + +module.exports = namespace(); + +/** + * Expose `Cache.namespace` + */ + +module.exports.namespace = namespace; + + +/***/ }), + +/***/ 92430: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +/** + * trace-event - A library to create a trace of your node app per + * Google's Trace Event format: + * // JSSTYLED + * https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(29859); +var stream_1 = __webpack_require__(92413); +function evCommon() { + var hrtime = process.hrtime(); // [seconds, nanoseconds] + var ts = hrtime[0] * 1000000 + Math.round(hrtime[1] / 1000); // microseconds + return { + ts: ts, + pid: process.pid, + tid: process.pid // no meaningful tid for node.js + }; +} +var Tracer = /** @class */ (function (_super) { + tslib_1.__extends(Tracer, _super); + function Tracer(opts) { + if (opts === void 0) { opts = {}; } + var _this = _super.call(this) || this; + _this.noStream = false; + _this.events = []; + if (typeof opts !== "object") { + throw new Error("Invalid options passed (must be an object)"); + } + if (opts.parent != null && typeof opts.parent !== "object") { + throw new Error("Invalid option (parent) passed (must be an object)"); + } + if (opts.fields != null && typeof opts.fields !== "object") { + throw new Error("Invalid option (fields) passed (must be an object)"); + } + if (opts.objectMode != null && + (opts.objectMode !== true && opts.objectMode !== false)) { + throw new Error("Invalid option (objectsMode) passed (must be a boolean)"); + } + _this.noStream = opts.noStream || false; + _this.parent = opts.parent; + if (_this.parent) { + _this.fields = Object.assign({}, opts.parent && opts.parent.fields); + } + else { + _this.fields = {}; + } + if (opts.fields) { + Object.assign(_this.fields, opts.fields); + } + if (!_this.fields.cat) { + // trace-viewer *requires* `cat`, so let's have a fallback. + _this.fields.cat = "default"; + } + else if (Array.isArray(_this.fields.cat)) { + _this.fields.cat = _this.fields.cat.join(","); + } + if (!_this.fields.args) { + // trace-viewer *requires* `args`, so let's have a fallback. + _this.fields.args = {}; + } + if (_this.parent) { + // TODO: Not calling Readable ctor here. Does that cause probs? + // Probably if trying to pipe from the child. + // Might want a serpate TracerChild class for these guys. + _this._push = _this.parent._push.bind(_this.parent); + } + else { + _this._objectMode = Boolean(opts.objectMode); + var streamOpts = { objectMode: _this._objectMode }; + if (_this._objectMode) { + _this._push = _this.push; + } + else { + _this._push = _this._pushString; + streamOpts.encoding = "utf8"; + } + stream_1.Readable.call(_this, streamOpts); + } + return _this; + } + /** + * If in no streamMode in order to flush out the trace + * you need to call flush. + */ + Tracer.prototype.flush = function () { + if (this.noStream === true) { + for (var _i = 0, _a = this.events; _i < _a.length; _i++) { + var evt = _a[_i]; + this._push(evt); + } + this._flush(); + } + }; + Tracer.prototype._read = function (_) { }; + Tracer.prototype._pushString = function (ev) { + var separator = ""; + if (!this.firstPush) { + this.push("["); + this.firstPush = true; + } + else { + separator = ",\n"; + } + this.push(separator + JSON.stringify(ev), "utf8"); + }; + Tracer.prototype._flush = function () { + if (!this._objectMode) { + this.push("]"); + } + }; + Tracer.prototype.child = function (fields) { + return new Tracer({ + parent: this, + fields: fields + }); + }; + Tracer.prototype.begin = function (fields) { + return this.mkEventFunc("b")(fields); + }; + Tracer.prototype.end = function (fields) { + return this.mkEventFunc("e")(fields); + }; + Tracer.prototype.completeEvent = function (fields) { + return this.mkEventFunc("X")(fields); + }; + Tracer.prototype.instantEvent = function (fields) { + return this.mkEventFunc("I")(fields); + }; + Tracer.prototype.mkEventFunc = function (ph) { + var _this = this; + return function (fields) { + var ev = evCommon(); + // Assign the event phase. + ev.ph = ph; + if (fields) { + if (typeof fields === "string") { + ev.name = fields; + } + else { + for (var _i = 0, _a = Object.keys(fields); _i < _a.length; _i++) { + var k = _a[_i]; + if (k === "cat") { + ev.cat = fields.cat.join(","); + } + else { + ev[k] = fields[k]; + } + } + } + } + if (!_this.noStream) { + _this._push(ev); + } + else { + _this.events.push(ev); + } + }; + }; + return Tracer; +}(stream_1.Readable)); +exports.Tracer = Tracer; +/* + * These correspond to the "Async events" in the Trace Events doc. + * + * Required fields: + * - name + * - id + * + * Optional fields: + * - cat (array) + * - args (object) + * - TODO: stack fields, other optional fields? + * + * Dev Note: We don't explicitly assert that correct fields are + * used for speed (premature optimization alert!). + */ +//# sourceMappingURL=trace-event.js.map + +/***/ }), + +/***/ 71523: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(31669); +var union = __webpack_require__(69123); +var define = __webpack_require__(5477); +var staticExtend = __webpack_require__(69457); +var isObj = __webpack_require__(96667); + +/** + * Expose class utils + */ + +var cu = module.exports; + +/** + * Expose class utils: `cu` + */ + +cu.isObject = function isObject(val) { + return isObj(val) || typeof val === 'function'; +}; + +/** + * Returns true if an array has any of the given elements, or an + * object has any of the give keys. + * + * ```js + * cu.has(['a', 'b', 'c'], 'c'); + * //=> true + * + * cu.has(['a', 'b', 'c'], ['c', 'z']); + * //=> true + * + * cu.has({a: 'b', c: 'd'}, ['c', 'z']); + * //=> true + * ``` + * @param {Object} `obj` + * @param {String|Array} `val` + * @return {Boolean} + * @api public + */ + +cu.has = function has(obj, val) { + val = cu.arrayify(val); + var len = val.length; + + if (cu.isObject(obj)) { + for (var key in obj) { + if (val.indexOf(key) > -1) { + return true; + } + } + + var keys = cu.nativeKeys(obj); + return cu.has(keys, val); + } + + if (Array.isArray(obj)) { + var arr = obj; + while (len--) { + if (arr.indexOf(val[len]) > -1) { + return true; + } + } + return false; + } + + throw new TypeError('expected an array or object.'); +}; + +/** + * Returns true if an array or object has all of the given values. + * + * ```js + * cu.hasAll(['a', 'b', 'c'], 'c'); + * //=> true + * + * cu.hasAll(['a', 'b', 'c'], ['c', 'z']); + * //=> false + * + * cu.hasAll({a: 'b', c: 'd'}, ['c', 'z']); + * //=> false + * ``` + * @param {Object|Array} `val` + * @param {String|Array} `values` + * @return {Boolean} + * @api public + */ + +cu.hasAll = function hasAll(val, values) { + values = cu.arrayify(values); + var len = values.length; + while (len--) { + if (!cu.has(val, values[len])) { + return false; + } + } + return true; +}; + +/** + * Cast the given value to an array. + * + * ```js + * cu.arrayify('foo'); + * //=> ['foo'] + * + * cu.arrayify(['foo']); + * //=> ['foo'] + * ``` + * + * @param {String|Array} `val` + * @return {Array} + * @api public + */ + +cu.arrayify = function arrayify(val) { + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Noop + */ + +cu.noop = function noop() { + return; +}; + +/** + * Returns the first argument passed to the function. + */ + +cu.identity = function identity(val) { + return val; +}; + +/** + * Returns true if a value has a `contructor` + * + * ```js + * cu.hasConstructor({}); + * //=> true + * + * cu.hasConstructor(Object.create(null)); + * //=> false + * ``` + * @param {Object} `value` + * @return {Boolean} + * @api public + */ + +cu.hasConstructor = function hasConstructor(val) { + return cu.isObject(val) && typeof val.constructor !== 'undefined'; +}; + +/** + * Get the native `ownPropertyNames` from the constructor of the + * given `object`. An empty array is returned if the object does + * not have a constructor. + * + * ```js + * cu.nativeKeys({a: 'b', b: 'c', c: 'd'}) + * //=> ['a', 'b', 'c'] + * + * cu.nativeKeys(function(){}) + * //=> ['length', 'caller'] + * ``` + * + * @param {Object} `obj` Object that has a `constructor`. + * @return {Array} Array of keys. + * @api public + */ + +cu.nativeKeys = function nativeKeys(val) { + if (!cu.hasConstructor(val)) return []; + var keys = Object.getOwnPropertyNames(val); + if ('caller' in val) keys.push('caller'); + return keys; +}; + +/** + * Returns property descriptor `key` if it's an "own" property + * of the given object. + * + * ```js + * function App() {} + * Object.defineProperty(App.prototype, 'count', { + * get: function() { + * return Object.keys(this).length; + * } + * }); + * cu.getDescriptor(App.prototype, 'count'); + * // returns: + * // { + * // get: [Function], + * // set: undefined, + * // enumerable: false, + * // configurable: false + * // } + * ``` + * + * @param {Object} `obj` + * @param {String} `key` + * @return {Object} Returns descriptor `key` + * @api public + */ + +cu.getDescriptor = function getDescriptor(obj, key) { + if (!cu.isObject(obj)) { + throw new TypeError('expected an object.'); + } + if (typeof key !== 'string') { + throw new TypeError('expected key to be a string.'); + } + return Object.getOwnPropertyDescriptor(obj, key); +}; + +/** + * Copy a descriptor from one object to another. + * + * ```js + * function App() {} + * Object.defineProperty(App.prototype, 'count', { + * get: function() { + * return Object.keys(this).length; + * } + * }); + * var obj = {}; + * cu.copyDescriptor(obj, App.prototype, 'count'); + * ``` + * @param {Object} `receiver` + * @param {Object} `provider` + * @param {String} `name` + * @return {Object} + * @api public + */ + +cu.copyDescriptor = function copyDescriptor(receiver, provider, name) { + if (!cu.isObject(receiver)) { + throw new TypeError('expected receiving object to be an object.'); + } + if (!cu.isObject(provider)) { + throw new TypeError('expected providing object to be an object.'); + } + if (typeof name !== 'string') { + throw new TypeError('expected name to be a string.'); + } + + var val = cu.getDescriptor(provider, name); + if (val) Object.defineProperty(receiver, name, val); +}; + +/** + * Copy static properties, prototype properties, and descriptors + * from one object to another. + * + * @param {Object} `receiver` + * @param {Object} `provider` + * @param {String|Array} `omit` One or more properties to omit + * @return {Object} + * @api public + */ + +cu.copy = function copy(receiver, provider, omit) { + if (!cu.isObject(receiver)) { + throw new TypeError('expected receiving object to be an object.'); + } + if (!cu.isObject(provider)) { + throw new TypeError('expected providing object to be an object.'); + } + var props = Object.getOwnPropertyNames(provider); + var keys = Object.keys(provider); + var len = props.length, + key; + omit = cu.arrayify(omit); + + while (len--) { + key = props[len]; + + if (cu.has(keys, key)) { + define(receiver, key, provider[key]); + } else if (!(key in receiver) && !cu.has(omit, key)) { + cu.copyDescriptor(receiver, provider, key); + } + } +}; + +/** + * Inherit the static properties, prototype properties, and descriptors + * from of an object. + * + * @param {Object} `receiver` + * @param {Object} `provider` + * @param {String|Array} `omit` One or more properties to omit + * @return {Object} + * @api public + */ + +cu.inherit = function inherit(receiver, provider, omit) { + if (!cu.isObject(receiver)) { + throw new TypeError('expected receiving object to be an object.'); + } + if (!cu.isObject(provider)) { + throw new TypeError('expected providing object to be an object.'); + } + + var keys = []; + for (var key in provider) { + keys.push(key); + receiver[key] = provider[key]; + } + + keys = keys.concat(cu.arrayify(omit)); + + var a = provider.prototype || provider; + var b = receiver.prototype || receiver; + cu.copy(b, a, keys); +}; + +/** + * Returns a function for extending the static properties, + * prototype properties, and descriptors from the `Parent` + * constructor onto `Child` constructors. + * + * ```js + * var extend = cu.extend(Parent); + * Parent.extend(Child); + * + * // optional methods + * Parent.extend(Child, { + * foo: function() {}, + * bar: function() {} + * }); + * ``` + * @param {Function} `Parent` Parent ctor + * @param {Function} `extend` Optional extend function to handle custom extensions. Useful when updating methods that require a specific prototype. + * @param {Function} `Child` Child ctor + * @param {Object} `proto` Optionally pass additional prototype properties to inherit. + * @return {Object} + * @api public + */ + +cu.extend = function() { + // keep it lazy, instead of assigning to `cu.extend` + return staticExtend.apply(null, arguments); +}; + +/** + * Bubble up events emitted from static methods on the Parent ctor. + * + * @param {Object} `Parent` + * @param {Array} `events` Event names to bubble up + * @api public + */ + +cu.bubble = function(Parent, events) { + events = events || []; + Parent.bubble = function(Child, arr) { + if (Array.isArray(arr)) { + events = union([], events, arr); + } + var len = events.length; + var idx = -1; + while (++idx < len) { + var name = events[idx]; + Parent.on(name, Child.emit.bind(Child, name)); + } + cu.bubble(Child, events); + }; +}; + + +/***/ }), + +/***/ 16704: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * collection-visit + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var visit = __webpack_require__(59248); +var mapVisit = __webpack_require__(11270); + +module.exports = function(collection, method, val) { + var result; + + if (typeof val === 'string' && (method in collection)) { + var args = [].slice.call(arguments, 2); + result = collection[method].apply(collection, args); + } else if (Array.isArray(val)) { + result = mapVisit.apply(null, arguments); + } else { + result = visit.apply(null, arguments); + } + + if (typeof result !== 'undefined') { + return result; + } + + return collection; +}; + + +/***/ }), + +/***/ 79458: +/***/ (function(module) { + + +/** + * Expose `Emitter`. + */ + +if (true) { + module.exports = Emitter; +} + +/** + * Initialize a new `Emitter`. + * + * @api public + */ + +function Emitter(obj) { + if (obj) return mixin(obj); +}; + +/** + * Mixin the emitter properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + +function mixin(obj) { + for (var key in Emitter.prototype) { + obj[key] = Emitter.prototype[key]; + } + return obj; +} + +/** + * Listen on the given `event` with `fn`. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.on = +Emitter.prototype.addEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + (this._callbacks['$' + event] = this._callbacks['$' + event] || []) + .push(fn); + return this; +}; + +/** + * Adds an `event` listener that will be invoked a single + * time then automatically removed. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.once = function(event, fn){ + function on() { + this.off(event, on); + fn.apply(this, arguments); + } + + on.fn = fn; + this.on(event, on); + return this; +}; + +/** + * Remove the given callback for `event` or all + * registered callbacks. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.off = +Emitter.prototype.removeListener = +Emitter.prototype.removeAllListeners = +Emitter.prototype.removeEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + + // all + if (0 == arguments.length) { + this._callbacks = {}; + return this; + } + + // specific event + var callbacks = this._callbacks['$' + event]; + if (!callbacks) return this; + + // remove all handlers + if (1 == arguments.length) { + delete this._callbacks['$' + event]; + return this; + } + + // remove specific handler + var cb; + for (var i = 0; i < callbacks.length; i++) { + cb = callbacks[i]; + if (cb === fn || cb.fn === fn) { + callbacks.splice(i, 1); + break; + } + } + + // Remove event specific arrays for event types that no + // one is subscribed for to avoid memory leak. + if (callbacks.length === 0) { + delete this._callbacks['$' + event]; + } + + return this; +}; + +/** + * Emit `event` with the given args. + * + * @param {String} event + * @param {Mixed} ... + * @return {Emitter} + */ + +Emitter.prototype.emit = function(event){ + this._callbacks = this._callbacks || {}; + + var args = new Array(arguments.length - 1) + , callbacks = this._callbacks['$' + event]; + + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + + if (callbacks) { + callbacks = callbacks.slice(0); + for (var i = 0, len = callbacks.length; i < len; ++i) { + callbacks[i].apply(this, args); + } + } + + return this; +}; + +/** + * Return array of callbacks for `event`. + * + * @param {String} event + * @return {Array} + * @api public + */ + +Emitter.prototype.listeners = function(event){ + this._callbacks = this._callbacks || {}; + return this._callbacks['$' + event] || []; +}; + +/** + * Check if this emitter has `event` handlers. + * + * @param {String} event + * @return {Boolean} + * @api public + */ + +Emitter.prototype.hasListeners = function(event){ + return !! this.listeners(event).length; +}; + + +/***/ }), + +/***/ 3605: +/***/ (function(module) { + +"use strict"; +/*! + * copy-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +/** + * Copy a descriptor from one object to another. + * + * ```js + * function App() { + * this.cache = {}; + * } + * App.prototype.set = function(key, val) { + * this.cache[key] = val; + * return this; + * }; + * Object.defineProperty(App.prototype, 'count', { + * get: function() { + * return Object.keys(this.cache).length; + * } + * }); + * + * copy(App.prototype, 'count', 'len'); + * + * // create an instance + * var app = new App(); + * + * app.set('a', true); + * app.set('b', true); + * app.set('c', true); + * + * console.log(app.count); + * //=> 3 + * console.log(app.len); + * //=> 3 + * ``` + * @name copy + * @param {Object} `receiver` The target object + * @param {Object} `provider` The provider object + * @param {String} `from` The key to copy on provider. + * @param {String} `to` Optionally specify a new key name to use. + * @return {Object} + * @api public + */ + +module.exports = function copyDescriptor(receiver, provider, from, to) { + if (!isObject(provider) && typeof provider !== 'function') { + to = from; + from = provider; + provider = receiver; + } + if (!isObject(receiver) && typeof receiver !== 'function') { + throw new TypeError('expected the first argument to be an object'); + } + if (!isObject(provider) && typeof provider !== 'function') { + throw new TypeError('expected provider to be an object'); + } + + if (typeof to !== 'string') { + to = from; + } + if (typeof from !== 'string') { + throw new TypeError('expected key to be a string'); + } + + if (!(from in provider)) { + throw new Error('property "' + from + '" does not exist'); + } + + var val = Object.getOwnPropertyDescriptor(provider, from); + if (val) Object.defineProperty(receiver, to, val); +}; + +function isObject(val) { + return {}.toString.call(val) === '[object Object]'; +} + + + +/***/ }), + +/***/ 78334: +/***/ (function(__unused_webpack_module, exports) { + +// Copyright Joyent, Inc. and other Node 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. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +/***/ }), + +/***/ 95748: +/***/ (function(module) { + +"use strict"; + +var token = '%[a-f0-9]{2}'; +var singleMatcher = new RegExp(token, 'gi'); +var multiMatcher = new RegExp('(' + token + ')+', 'gi'); + +function decodeComponents(components, split) { + try { + // Try to decode the entire string first + return decodeURIComponent(components.join('')); + } catch (err) { + // Do nothing + } + + if (components.length === 1) { + return components; + } + + split = split || 1; + + // Split the array in 2 parts + var left = components.slice(0, split); + var right = components.slice(split); + + return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right)); +} + +function decode(input) { + try { + return decodeURIComponent(input); + } catch (err) { + var tokens = input.match(singleMatcher); + + for (var i = 1; i < tokens.length; i++) { + input = decodeComponents(tokens, i).join(''); + + tokens = input.match(singleMatcher); + } + + return input; + } +} + +function customDecodeURIComponent(input) { + // Keep track of all the replacements and prefill the map with the `BOM` + var replaceMap = { + '%FE%FF': '\uFFFD\uFFFD', + '%FF%FE': '\uFFFD\uFFFD' + }; + + var match = multiMatcher.exec(input); + while (match) { + try { + // Decode as big chunks as possible + replaceMap[match[0]] = decodeURIComponent(match[0]); + } catch (err) { + var result = decode(match[0]); + + if (result !== match[0]) { + replaceMap[match[0]] = result; + } + } + + match = multiMatcher.exec(input); + } + + // Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else + replaceMap['%C2'] = '\uFFFD'; + + var entries = Object.keys(replaceMap); + + for (var i = 0; i < entries.length; i++) { + // Replace all decoded components + var key = entries[i]; + input = input.replace(new RegExp(key, 'g'), replaceMap[key]); + } + + return input; +} + +module.exports = function (encodedURI) { + if (typeof encodedURI !== 'string') { + throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`'); + } + + try { + encodedURI = encodedURI.replace(/\+/g, ' '); + + // Try the built in decoder first + return decodeURIComponent(encodedURI); + } catch (err) { + // Fallback to a more advanced decoder + return customDecodeURIComponent(encodedURI); + } +}; + + +/***/ }), + +/***/ 5477: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var isDescriptor = __webpack_require__(49924); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; + + +/***/ }), + +/***/ 30138: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-accessor-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var typeOf = __webpack_require__(1057); + +// accessor descriptor properties +var accessor = { + get: 'function', + set: 'function', + configurable: 'boolean', + enumerable: 'boolean' +}; + +function isAccessorDescriptor(obj, prop) { + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (typeOf(obj) !== 'object') { + return false; + } + + if (has(obj, 'value') || has(obj, 'writable')) { + return false; + } + + if (!has(obj, 'get') || typeof obj.get !== 'function') { + return false; + } + + // tldr: it's valid to have "set" be undefined + // "set" might be undefined if `Object.getOwnPropertyDescriptor` + // was used to get the value, and only `get` was defined by the user + if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') { + return false; + } + + for (var key in obj) { + if (!accessor.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === accessor[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +function has(obj, key) { + return {}.hasOwnProperty.call(obj, key); +} + +/** + * Expose `isAccessorDescriptor` + */ + +module.exports = isAccessorDescriptor; + + +/***/ }), + +/***/ 1057: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var isBuffer = __webpack_require__(72195); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + + +/***/ }), + +/***/ 54963: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-data-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var typeOf = __webpack_require__(31072); + +// data descriptor properties +var data = { + configurable: 'boolean', + enumerable: 'boolean', + writable: 'boolean' +}; + +function isDataDescriptor(obj, prop) { + if (typeOf(obj) !== 'object') { + return false; + } + + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (!('value' in obj) && !('writable' in obj)) { + return false; + } + + for (var key in obj) { + if (key === 'value') continue; + + if (!data.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === data[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +/** + * Expose `isDataDescriptor` + */ + +module.exports = isDataDescriptor; + + +/***/ }), + +/***/ 31072: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var isBuffer = __webpack_require__(72195); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + + +/***/ }), + +/***/ 49924: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var typeOf = __webpack_require__(42649); +var isAccessor = __webpack_require__(30138); +var isData = __webpack_require__(54963); + +module.exports = function isDescriptor(obj, key) { + if (typeOf(obj) !== 'object') { + return false; + } + if ('get' in obj) { + return isAccessor(obj, key); + } + return isData(obj, key); +}; + + +/***/ }), + +/***/ 42649: +/***/ (function(module) { + +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + var type = typeof val; + + // primitivies + if (type === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (type === 'string' || val instanceof String) { + return 'string'; + } + if (type === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (type === 'function' || val instanceof Function) { + if (typeof val.constructor.name !== 'undefined' && val.constructor.name.slice(0, 9) === 'Generator') { + return 'generatorfunction'; + } + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + if (type === '[object Promise]') { + return 'promise'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + if (type === '[object Map Iterator]') { + return 'mapiterator'; + } + if (type === '[object Set Iterator]') { + return 'setiterator'; + } + if (type === '[object String Iterator]') { + return 'stringiterator'; + } + if (type === '[object Array Iterator]') { + return 'arrayiterator'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + return val.constructor + && typeof val.constructor.isBuffer === 'function' + && val.constructor.isBuffer(val); +} + + +/***/ }), + +/***/ 89901: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DescriptionFileUtils = __webpack_require__(70232); +const getInnerRequest = __webpack_require__(91878); + +module.exports = class AliasFieldPlugin { + constructor(source, field, target) { + this.source = source; + this.field = field; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("AliasFieldPlugin", (request, resolveContext, callback) => { + if (!request.descriptionFileData) return callback(); + const innerRequest = getInnerRequest(resolver, request); + if (!innerRequest) return callback(); + const fieldData = DescriptionFileUtils.getField( + request.descriptionFileData, + this.field + ); + if (typeof fieldData !== "object") { + if (resolveContext.log) + resolveContext.log( + "Field '" + + this.field + + "' doesn't contain a valid alias configuration" + ); + return callback(); + } + const data1 = fieldData[innerRequest]; + const data2 = fieldData[innerRequest.replace(/^\.\//, "")]; + const data = typeof data1 !== "undefined" ? data1 : data2; + if (data === innerRequest) return callback(); + if (data === undefined) return callback(); + if (data === false) { + const ignoreObj = Object.assign({}, request, { + path: false + }); + return callback(null, ignoreObj); + } + const obj = Object.assign({}, request, { + path: request.descriptionFileRoot, + request: data + }); + resolver.doResolve( + target, + obj, + "aliased from description file " + + request.descriptionFilePath + + " with mapping '" + + innerRequest + + "' to '" + + data + + "'", + resolveContext, + (err, result) => { + if (err) return callback(err); + + // Don't allow other aliasing or raw request + if (result === undefined) return callback(null, null); + callback(null, result); + } + ); + }); + } +}; + + +/***/ }), + +/***/ 15005: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +function startsWith(string, searchString) { + const stringLength = string.length; + const searchLength = searchString.length; + + // early out if the search length is greater than the search string + if (searchLength > stringLength) { + return false; + } + let index = -1; + while (++index < searchLength) { + if (string.charCodeAt(index) !== searchString.charCodeAt(index)) { + return false; + } + } + return true; +} + +module.exports = class AliasPlugin { + constructor(source, options, target) { + this.source = source; + this.options = Array.isArray(options) ? options : [options]; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("AliasPlugin", (request, resolveContext, callback) => { + const innerRequest = request.request || request.path; + if (!innerRequest) return callback(); + for (const item of this.options) { + if ( + innerRequest === item.name || + (!item.onlyModule && startsWith(innerRequest, item.name + "/")) + ) { + if ( + innerRequest !== item.alias && + !startsWith(innerRequest, item.alias + "/") + ) { + const newRequestStr = + item.alias + innerRequest.substr(item.name.length); + const obj = Object.assign({}, request, { + request: newRequestStr + }); + return resolver.doResolve( + target, + obj, + "aliased with mapping '" + + item.name + + "': '" + + item.alias + + "' to '" + + newRequestStr + + "'", + resolveContext, + (err, result) => { + if (err) return callback(err); + + // Don't allow other aliasing or raw request + if (result === undefined) return callback(null, null); + callback(null, result); + } + ); + } + } + } + return callback(); + }); + } +}; + + +/***/ }), + +/***/ 2271: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class AppendPlugin { + constructor(source, appending, target) { + this.source = source; + this.appending = appending; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("AppendPlugin", (request, resolveContext, callback) => { + const obj = Object.assign({}, request, { + path: request.path + this.appending, + relativePath: + request.relativePath && request.relativePath + this.appending + }); + resolver.doResolve( + target, + obj, + this.appending, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 75544: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class Storage { + constructor(duration) { + this.duration = duration; + this.running = new Map(); + this.data = new Map(); + this.levels = []; + if (duration > 0) { + this.levels.push( + new Set(), + new Set(), + new Set(), + new Set(), + new Set(), + new Set(), + new Set(), + new Set(), + new Set() + ); + for (let i = 8000; i < duration; i += 500) this.levels.push(new Set()); + } + this.count = 0; + this.interval = null; + this.needTickCheck = false; + this.nextTick = null; + this.passive = true; + this.tick = this.tick.bind(this); + } + + ensureTick() { + if (!this.interval && this.duration > 0 && !this.nextTick) + this.interval = setInterval( + this.tick, + Math.floor(this.duration / this.levels.length) + ); + } + + finished(name, err, result) { + const callbacks = this.running.get(name); + this.running.delete(name); + if (this.duration > 0) { + this.data.set(name, [err, result]); + const levelData = this.levels[0]; + this.count -= levelData.size; + levelData.add(name); + this.count += levelData.size; + this.ensureTick(); + } + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](err, result); + } + } + + finishedSync(name, err, result) { + if (this.duration > 0) { + this.data.set(name, [err, result]); + const levelData = this.levels[0]; + this.count -= levelData.size; + levelData.add(name); + this.count += levelData.size; + this.ensureTick(); + } + } + + provide(name, provider, callback) { + if (typeof name !== "string") { + callback(new TypeError("path must be a string")); + return; + } + let running = this.running.get(name); + if (running) { + running.push(callback); + return; + } + if (this.duration > 0) { + this.checkTicks(); + const data = this.data.get(name); + if (data) { + return process.nextTick(() => { + callback.apply(null, data); + }); + } + } + this.running.set(name, (running = [callback])); + provider(name, (err, result) => { + this.finished(name, err, result); + }); + } + + provideSync(name, provider) { + if (typeof name !== "string") { + throw new TypeError("path must be a string"); + } + if (this.duration > 0) { + this.checkTicks(); + const data = this.data.get(name); + if (data) { + if (data[0]) throw data[0]; + return data[1]; + } + } + let result; + try { + result = provider(name); + } catch (e) { + this.finishedSync(name, e); + throw e; + } + this.finishedSync(name, null, result); + return result; + } + + tick() { + const decay = this.levels.pop(); + for (let item of decay) { + this.data.delete(item); + } + this.count -= decay.size; + decay.clear(); + this.levels.unshift(decay); + if (this.count === 0) { + clearInterval(this.interval); + this.interval = null; + this.nextTick = null; + return true; + } else if (this.nextTick) { + this.nextTick += Math.floor(this.duration / this.levels.length); + const time = new Date().getTime(); + if (this.nextTick > time) { + this.nextTick = null; + this.interval = setInterval( + this.tick, + Math.floor(this.duration / this.levels.length) + ); + return true; + } + } else if (this.passive) { + clearInterval(this.interval); + this.interval = null; + this.nextTick = + new Date().getTime() + Math.floor(this.duration / this.levels.length); + } else { + this.passive = true; + } + } + + checkTicks() { + this.passive = false; + if (this.nextTick) { + while (!this.tick()); + } + } + + purge(what) { + if (!what) { + this.count = 0; + clearInterval(this.interval); + this.nextTick = null; + this.data.clear(); + this.levels.forEach(level => { + level.clear(); + }); + } else if (typeof what === "string") { + for (let key of this.data.keys()) { + if (key.startsWith(what)) this.data.delete(key); + } + } else { + for (let i = what.length - 1; i >= 0; i--) { + this.purge(what[i]); + } + } + } +} + +module.exports = class CachedInputFileSystem { + constructor(fileSystem, duration) { + this.fileSystem = fileSystem; + this._statStorage = new Storage(duration); + this._readdirStorage = new Storage(duration); + this._readFileStorage = new Storage(duration); + this._readJsonStorage = new Storage(duration); + this._readlinkStorage = new Storage(duration); + + this._stat = this.fileSystem.stat + ? this.fileSystem.stat.bind(this.fileSystem) + : null; + if (!this._stat) this.stat = null; + + this._statSync = this.fileSystem.statSync + ? this.fileSystem.statSync.bind(this.fileSystem) + : null; + if (!this._statSync) this.statSync = null; + + this._readdir = this.fileSystem.readdir + ? this.fileSystem.readdir.bind(this.fileSystem) + : null; + if (!this._readdir) this.readdir = null; + + this._readdirSync = this.fileSystem.readdirSync + ? this.fileSystem.readdirSync.bind(this.fileSystem) + : null; + if (!this._readdirSync) this.readdirSync = null; + + this._readFile = this.fileSystem.readFile + ? this.fileSystem.readFile.bind(this.fileSystem) + : null; + if (!this._readFile) this.readFile = null; + + this._readFileSync = this.fileSystem.readFileSync + ? this.fileSystem.readFileSync.bind(this.fileSystem) + : null; + if (!this._readFileSync) this.readFileSync = null; + + if (this.fileSystem.readJson) { + this._readJson = this.fileSystem.readJson.bind(this.fileSystem); + } else if (this.readFile) { + this._readJson = (path, callback) => { + this.readFile(path, (err, buffer) => { + if (err) return callback(err); + let data; + try { + data = JSON.parse(buffer.toString("utf-8")); + } catch (e) { + return callback(e); + } + callback(null, data); + }); + }; + } else { + this.readJson = null; + } + if (this.fileSystem.readJsonSync) { + this._readJsonSync = this.fileSystem.readJsonSync.bind(this.fileSystem); + } else if (this.readFileSync) { + this._readJsonSync = path => { + const buffer = this.readFileSync(path); + const data = JSON.parse(buffer.toString("utf-8")); + return data; + }; + } else { + this.readJsonSync = null; + } + + this._readlink = this.fileSystem.readlink + ? this.fileSystem.readlink.bind(this.fileSystem) + : null; + if (!this._readlink) this.readlink = null; + + this._readlinkSync = this.fileSystem.readlinkSync + ? this.fileSystem.readlinkSync.bind(this.fileSystem) + : null; + if (!this._readlinkSync) this.readlinkSync = null; + } + + stat(path, callback) { + this._statStorage.provide(path, this._stat, callback); + } + + readdir(path, callback) { + this._readdirStorage.provide(path, this._readdir, callback); + } + + readFile(path, callback) { + this._readFileStorage.provide(path, this._readFile, callback); + } + + readJson(path, callback) { + this._readJsonStorage.provide(path, this._readJson, callback); + } + + readlink(path, callback) { + this._readlinkStorage.provide(path, this._readlink, callback); + } + + statSync(path) { + return this._statStorage.provideSync(path, this._statSync); + } + + readdirSync(path) { + return this._readdirStorage.provideSync(path, this._readdirSync); + } + + readFileSync(path) { + return this._readFileStorage.provideSync(path, this._readFileSync); + } + + readJsonSync(path) { + return this._readJsonStorage.provideSync(path, this._readJsonSync); + } + + readlinkSync(path) { + return this._readlinkStorage.provideSync(path, this._readlinkSync); + } + + purge(what) { + this._statStorage.purge(what); + this._readdirStorage.purge(what); + this._readFileStorage.purge(what); + this._readlinkStorage.purge(what); + this._readJsonStorage.purge(what); + } +}; + + +/***/ }), + +/***/ 56821: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const concord = __webpack_require__(94323); +const DescriptionFileUtils = __webpack_require__(70232); +const forEachBail = __webpack_require__(60059); + +module.exports = class ConcordExtensionsPlugin { + constructor(source, options, target) { + this.source = source; + this.options = options; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "ConcordExtensionsPlugin", + (request, resolveContext, callback) => { + const concordField = DescriptionFileUtils.getField( + request.descriptionFileData, + "concord" + ); + if (!concordField) return callback(); + const extensions = concord.getExtensions( + request.context, + concordField + ); + if (!extensions) return callback(); + forEachBail( + extensions, + (appending, callback) => { + const obj = Object.assign({}, request, { + path: request.path + appending, + relativePath: + request.relativePath && request.relativePath + appending + }); + resolver.doResolve( + target, + obj, + "concord extension: " + appending, + resolveContext, + callback + ); + }, + (err, result) => { + if (err) return callback(err); + + // Don't allow other processing + if (result === undefined) return callback(null, null); + callback(null, result); + } + ); + } + ); + } +}; + + +/***/ }), + +/***/ 27878: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); +const concord = __webpack_require__(94323); +const DescriptionFileUtils = __webpack_require__(70232); + +module.exports = class ConcordMainPlugin { + constructor(source, options, target) { + this.source = source; + this.options = options; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ConcordMainPlugin", (request, resolveContext, callback) => { + if (request.path !== request.descriptionFileRoot) return callback(); + const concordField = DescriptionFileUtils.getField( + request.descriptionFileData, + "concord" + ); + if (!concordField) return callback(); + const mainModule = concord.getMain(request.context, concordField); + if (!mainModule) return callback(); + const obj = Object.assign({}, request, { + request: mainModule + }); + const filename = path.basename(request.descriptionFilePath); + return resolver.doResolve( + target, + obj, + "use " + mainModule + " from " + filename, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 50297: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const concord = __webpack_require__(94323); +const DescriptionFileUtils = __webpack_require__(70232); +const getInnerRequest = __webpack_require__(91878); + +module.exports = class ConcordModulesPlugin { + constructor(source, options, target) { + this.source = source; + this.options = options; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ConcordModulesPlugin", (request, resolveContext, callback) => { + const innerRequest = getInnerRequest(resolver, request); + if (!innerRequest) return callback(); + const concordField = DescriptionFileUtils.getField( + request.descriptionFileData, + "concord" + ); + if (!concordField) return callback(); + const data = concord.matchModule( + request.context, + concordField, + innerRequest + ); + if (data === innerRequest) return callback(); + if (data === undefined) return callback(); + if (data === false) { + const ignoreObj = Object.assign({}, request, { + path: false + }); + return callback(null, ignoreObj); + } + const obj = Object.assign({}, request, { + path: request.descriptionFileRoot, + request: data + }); + resolver.doResolve( + target, + obj, + "aliased from description file " + + request.descriptionFilePath + + " with mapping '" + + innerRequest + + "' to '" + + data + + "'", + resolveContext, + (err, result) => { + if (err) return callback(err); + + // Don't allow other aliasing or raw request + if (result === undefined) return callback(null, null); + callback(null, result); + } + ); + }); + } +}; + + +/***/ }), + +/***/ 95637: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* +MIT License http://www.opensource.org/licenses/mit-license.php +Author Tobias Koppers @sokra +*/ + + +const DescriptionFileUtils = __webpack_require__(70232); + +module.exports = class DescriptionFilePlugin { + constructor(source, filenames, target) { + this.source = source; + this.filenames = [].concat(filenames); + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "DescriptionFilePlugin", + (request, resolveContext, callback) => { + const directory = request.path; + DescriptionFileUtils.loadDescriptionFile( + resolver, + directory, + this.filenames, + resolveContext, + (err, result) => { + if (err) return callback(err); + if (!result) { + if (resolveContext.missing) { + this.filenames.forEach(filename => { + resolveContext.missing.add( + resolver.join(directory, filename) + ); + }); + } + if (resolveContext.log) + resolveContext.log("No description file found"); + return callback(); + } + const relativePath = + "." + + request.path + .substr(result.directory.length) + .replace(/\\/g, "/"); + const obj = Object.assign({}, request, { + descriptionFilePath: result.path, + descriptionFileData: result.content, + descriptionFileRoot: result.directory, + relativePath: relativePath + }); + resolver.doResolve( + target, + obj, + "using description file: " + + result.path + + " (relative path: " + + relativePath + + ")", + resolveContext, + (err, result) => { + if (err) return callback(err); + + // Don't allow other processing + if (result === undefined) return callback(null, null); + callback(null, result); + } + ); + } + ); + } + ); + } +}; + + +/***/ }), + +/***/ 70232: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const forEachBail = __webpack_require__(60059); + +function loadDescriptionFile( + resolver, + directory, + filenames, + resolveContext, + callback +) { + (function findDescriptionFile() { + forEachBail( + filenames, + (filename, callback) => { + const descriptionFilePath = resolver.join(directory, filename); + if (resolver.fileSystem.readJson) { + resolver.fileSystem.readJson(descriptionFilePath, (err, content) => { + if (err) { + if (typeof err.code !== "undefined") return callback(); + return onJson(err); + } + onJson(null, content); + }); + } else { + resolver.fileSystem.readFile(descriptionFilePath, (err, content) => { + if (err) return callback(); + let json; + try { + json = JSON.parse(content); + } catch (e) { + onJson(e); + } + onJson(null, json); + }); + } + + function onJson(err, content) { + if (err) { + if (resolveContext.log) + resolveContext.log( + descriptionFilePath + " (directory description file): " + err + ); + else + err.message = + descriptionFilePath + " (directory description file): " + err; + return callback(err); + } + callback(null, { + content: content, + directory: directory, + path: descriptionFilePath + }); + } + }, + (err, result) => { + if (err) return callback(err); + if (result) { + return callback(null, result); + } else { + directory = cdUp(directory); + if (!directory) { + return callback(); + } else { + return findDescriptionFile(); + } + } + } + ); + })(); +} + +function getField(content, field) { + if (!content) return undefined; + if (Array.isArray(field)) { + let current = content; + for (let j = 0; j < field.length; j++) { + if (current === null || typeof current !== "object") { + current = null; + break; + } + current = current[field[j]]; + } + if (typeof current === "object") { + return current; + } + } else { + if (typeof content[field] === "object") { + return content[field]; + } + } +} + +function cdUp(directory) { + if (directory === "/") return null; + const i = directory.lastIndexOf("/"), + j = directory.lastIndexOf("\\"); + const p = i < 0 ? j : j < 0 ? i : i < j ? j : i; + if (p < 0) return null; + return directory.substr(0, p || 1); +} + +exports.loadDescriptionFile = loadDescriptionFile; +exports.getField = getField; +exports.cdUp = cdUp; + + +/***/ }), + +/***/ 48504: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class DirectoryExistsPlugin { + constructor(source, target) { + this.source = source; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "DirectoryExistsPlugin", + (request, resolveContext, callback) => { + const fs = resolver.fileSystem; + const directory = request.path; + fs.stat(directory, (err, stat) => { + if (err || !stat) { + if (resolveContext.missing) resolveContext.missing.add(directory); + if (resolveContext.log) + resolveContext.log(directory + " doesn't exist"); + return callback(); + } + if (!stat.isDirectory()) { + if (resolveContext.missing) resolveContext.missing.add(directory); + if (resolveContext.log) + resolveContext.log(directory + " is not a directory"); + return callback(); + } + resolver.doResolve( + target, + request, + "existing directory", + resolveContext, + callback + ); + }); + } + ); + } +}; + + +/***/ }), + +/***/ 68372: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class FileExistsPlugin { + constructor(source, target) { + this.source = source; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + const fs = resolver.fileSystem; + resolver + .getHook(this.source) + .tapAsync("FileExistsPlugin", (request, resolveContext, callback) => { + const file = request.path; + fs.stat(file, (err, stat) => { + if (err || !stat) { + if (resolveContext.missing) resolveContext.missing.add(file); + if (resolveContext.log) resolveContext.log(file + " doesn't exist"); + return callback(); + } + if (!stat.isFile()) { + if (resolveContext.missing) resolveContext.missing.add(file); + if (resolveContext.log) resolveContext.log(file + " is not a file"); + return callback(); + } + resolver.doResolve( + target, + request, + "existing file: " + file, + resolveContext, + callback + ); + }); + }); + } +}; + + +/***/ }), + +/***/ 63602: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class FileKindPlugin { + constructor(source, target) { + this.source = source; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("FileKindPlugin", (request, resolveContext, callback) => { + if (request.directory) return callback(); + const obj = Object.assign({}, request); + delete obj.directory; + resolver.doResolve(target, obj, null, resolveContext, callback); + }); + } +}; + + +/***/ }), + +/***/ 31693: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class JoinRequestPlugin { + constructor(source, target) { + this.source = source; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("JoinRequestPlugin", (request, resolveContext, callback) => { + const obj = Object.assign({}, request, { + path: resolver.join(request.path, request.request), + relativePath: + request.relativePath && + resolver.join(request.relativePath, request.request), + request: undefined + }); + resolver.doResolve(target, obj, null, resolveContext, callback); + }); + } +}; + + +/***/ }), + +/***/ 7064: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); + +module.exports = class MainFieldPlugin { + constructor(source, options, target) { + this.source = source; + this.options = options; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("MainFieldPlugin", (request, resolveContext, callback) => { + if (request.path !== request.descriptionFileRoot) return callback(); + if (request.alreadyTriedMainField === request.descriptionFilePath) + return callback(); + const content = request.descriptionFileData; + const filename = path.basename(request.descriptionFilePath); + let mainModule; + const field = this.options.name; + if (Array.isArray(field)) { + let current = content; + for (let j = 0; j < field.length; j++) { + if (current === null || typeof current !== "object") { + current = null; + break; + } + current = current[field[j]]; + } + if (typeof current === "string") { + mainModule = current; + } + } else { + if (typeof content[field] === "string") { + mainModule = content[field]; + } + } + if (!mainModule) return callback(); + if (this.options.forceRelative && !/^\.\.?\//.test(mainModule)) + mainModule = "./" + mainModule; + const obj = Object.assign({}, request, { + request: mainModule, + alreadyTriedMainField: request.descriptionFilePath + }); + return resolver.doResolve( + target, + obj, + "use " + + mainModule + + " from " + + this.options.name + + " in " + + filename, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 23780: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class ModuleAppendPlugin { + constructor(source, appending, target) { + this.source = source; + this.appending = appending; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ModuleAppendPlugin", (request, resolveContext, callback) => { + const i = request.request.indexOf("/"), + j = request.request.indexOf("\\"); + const p = i < 0 ? j : j < 0 ? i : i < j ? i : j; + let moduleName, remainingRequest; + if (p < 0) { + moduleName = request.request; + remainingRequest = ""; + } else { + moduleName = request.request.substr(0, p); + remainingRequest = request.request.substr(p); + } + if (moduleName === "." || moduleName === "..") return callback(); + const moduleFinalName = moduleName + this.appending; + const obj = Object.assign({}, request, { + request: moduleFinalName + remainingRequest + }); + resolver.doResolve( + target, + obj, + "module variation " + moduleFinalName, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 9529: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class ModuleKindPlugin { + constructor(source, target) { + this.source = source; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ModuleKindPlugin", (request, resolveContext, callback) => { + if (!request.module) return callback(); + const obj = Object.assign({}, request); + delete obj.module; + resolver.doResolve( + target, + obj, + "resolve as module", + resolveContext, + (err, result) => { + if (err) return callback(err); + + // Don't allow other alternatives + if (result === undefined) return callback(null, null); + callback(null, result); + } + ); + }); + } +}; + + +/***/ }), + +/***/ 23195: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const forEachBail = __webpack_require__(60059); +const getPaths = __webpack_require__(49395); + +module.exports = class ModulesInHierachicDirectoriesPlugin { + constructor(source, directories, target) { + this.source = source; + this.directories = [].concat(directories); + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "ModulesInHierachicDirectoriesPlugin", + (request, resolveContext, callback) => { + const fs = resolver.fileSystem; + const addrs = getPaths(request.path) + .paths.map(p => { + return this.directories.map(d => resolver.join(p, d)); + }) + .reduce((array, p) => { + array.push.apply(array, p); + return array; + }, []); + forEachBail( + addrs, + (addr, callback) => { + fs.stat(addr, (err, stat) => { + if (!err && stat && stat.isDirectory()) { + const obj = Object.assign({}, request, { + path: addr, + request: "./" + request.request + }); + const message = "looking for modules in " + addr; + return resolver.doResolve( + target, + obj, + message, + resolveContext, + callback + ); + } + if (resolveContext.log) + resolveContext.log( + addr + " doesn't exist or is not a directory" + ); + if (resolveContext.missing) resolveContext.missing.add(addr); + return callback(); + }); + }, + callback + ); + } + ); + } +}; + + +/***/ }), + +/***/ 3092: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class ModulesInRootPlugin { + constructor(source, path, target) { + this.source = source; + this.path = path; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ModulesInRootPlugin", (request, resolveContext, callback) => { + const obj = Object.assign({}, request, { + path: this.path, + request: "./" + request.request + }); + resolver.doResolve( + target, + obj, + "looking for modules in " + this.path, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 50959: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class NextPlugin { + constructor(source, target) { + this.source = source; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("NextPlugin", (request, resolveContext, callback) => { + resolver.doResolve(target, request, null, resolveContext, callback); + }); + } +}; + + +/***/ }), + +/***/ 13445: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const fs = __webpack_require__(82161); + +class NodeJsInputFileSystem { + readdir(path, callback) { + fs.readdir(path, (err, files) => { + callback( + err, + files && + files.map(file => { + return file.normalize ? file.normalize("NFC") : file; + }) + ); + }); + } + + readdirSync(path) { + const files = fs.readdirSync(path); + return ( + files && + files.map(file => { + return file.normalize ? file.normalize("NFC") : file; + }) + ); + } +} + +const fsMethods = [ + "stat", + "statSync", + "readFile", + "readFileSync", + "readlink", + "readlinkSync" +]; + +for (const key of fsMethods) { + Object.defineProperty(NodeJsInputFileSystem.prototype, key, { + configurable: true, + writable: true, + value: fs[key].bind(fs) + }); +} + +module.exports = NodeJsInputFileSystem; + + +/***/ }), + +/***/ 9743: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class ParsePlugin { + constructor(source, target) { + this.source = source; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ParsePlugin", (request, resolveContext, callback) => { + const parsed = resolver.parse(request.request); + const obj = Object.assign({}, request, parsed); + if (request.query && !parsed.query) { + obj.query = request.query; + } + if (parsed && resolveContext.log) { + if (parsed.module) resolveContext.log("Parsed request is a module"); + if (parsed.directory) + resolveContext.log("Parsed request is a directory"); + } + resolver.doResolve(target, obj, null, resolveContext, callback); + }); + } +}; + + +/***/ }), + +/***/ 82797: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const util = __webpack_require__(31669); + +const Tapable = __webpack_require__(72693); +const SyncHook = __webpack_require__(77633); +const AsyncSeriesBailHook = __webpack_require__(89674); +const AsyncSeriesHook = __webpack_require__(55328); +const createInnerContext = __webpack_require__(6369); + +const REGEXP_NOT_MODULE = /^\.$|^\.[\\/]|^\.\.$|^\.\.[\\/]|^\/|^[A-Z]:[\\/]/i; +const REGEXP_DIRECTORY = /[\\/]$/i; + +const memoryFsJoin = __webpack_require__(65775); +const memoizedJoin = new Map(); +const memoryFsNormalize = __webpack_require__(69038); + +function withName(name, hook) { + hook.name = name; + return hook; +} + +function toCamelCase(str) { + return str.replace(/-([a-z])/g, str => str.substr(1).toUpperCase()); +} + +const deprecatedPushToMissing = util.deprecate((set, item) => { + set.add(item); +}, "Resolver: 'missing' is now a Set. Use add instead of push."); + +const deprecatedResolveContextInCallback = util.deprecate(x => { + return x; +}, "Resolver: The callback argument was splitted into resolveContext and callback."); + +const deprecatedHookAsString = util.deprecate(x => { + return x; +}, "Resolver#doResolve: The type arguments (string) is now a hook argument (Hook). Pass a reference to the hook instead."); + +class Resolver extends Tapable { + constructor(fileSystem) { + super(); + this.fileSystem = fileSystem; + this.hooks = { + resolveStep: withName("resolveStep", new SyncHook(["hook", "request"])), + noResolve: withName("noResolve", new SyncHook(["request", "error"])), + resolve: withName( + "resolve", + new AsyncSeriesBailHook(["request", "resolveContext"]) + ), + result: new AsyncSeriesHook(["result", "resolveContext"]) + }; + this._pluginCompat.tap("Resolver: before/after", options => { + if (/^before-/.test(options.name)) { + options.name = options.name.substr(7); + options.stage = -10; + } else if (/^after-/.test(options.name)) { + options.name = options.name.substr(6); + options.stage = 10; + } + }); + this._pluginCompat.tap("Resolver: step hooks", options => { + const name = options.name; + const stepHook = !/^resolve(-s|S)tep$|^no(-r|R)esolve$/.test(name); + if (stepHook) { + options.async = true; + this.ensureHook(name); + const fn = options.fn; + options.fn = (request, resolverContext, callback) => { + const innerCallback = (err, result) => { + if (err) return callback(err); + if (result !== undefined) return callback(null, result); + callback(); + }; + for (const key in resolverContext) { + innerCallback[key] = resolverContext[key]; + } + fn.call(this, request, innerCallback); + }; + } + }); + } + + ensureHook(name) { + if (typeof name !== "string") return name; + name = toCamelCase(name); + if (/^before/.test(name)) { + return this.ensureHook( + name[6].toLowerCase() + name.substr(7) + ).withOptions({ + stage: -10 + }); + } + if (/^after/.test(name)) { + return this.ensureHook( + name[5].toLowerCase() + name.substr(6) + ).withOptions({ + stage: 10 + }); + } + const hook = this.hooks[name]; + if (!hook) { + return (this.hooks[name] = withName( + name, + new AsyncSeriesBailHook(["request", "resolveContext"]) + )); + } + return hook; + } + + getHook(name) { + if (typeof name !== "string") return name; + name = toCamelCase(name); + if (/^before/.test(name)) { + return this.getHook(name[6].toLowerCase() + name.substr(7)).withOptions({ + stage: -10 + }); + } + if (/^after/.test(name)) { + return this.getHook(name[5].toLowerCase() + name.substr(6)).withOptions({ + stage: 10 + }); + } + const hook = this.hooks[name]; + if (!hook) { + throw new Error(`Hook ${name} doesn't exist`); + } + return hook; + } + + resolveSync(context, path, request) { + let err, + result, + sync = false; + this.resolve(context, path, request, {}, (e, r) => { + err = e; + result = r; + sync = true; + }); + if (!sync) + throw new Error( + "Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!" + ); + if (err) throw err; + return result; + } + + resolve(context, path, request, resolveContext, callback) { + // TODO remove in enhanced-resolve 5 + // For backward compatiblity START + if (typeof callback !== "function") { + callback = deprecatedResolveContextInCallback(resolveContext); + // resolveContext is a function containing additional properties + // It's now used for resolveContext and callback + } + // END + const obj = { + context: context, + path: path, + request: request + }; + + const message = "resolve '" + request + "' in '" + path + "'"; + + // Try to resolve assuming there is no error + // We don't log stuff in this case + return this.doResolve( + this.hooks.resolve, + obj, + message, + { + missing: resolveContext.missing, + stack: resolveContext.stack + }, + (err, result) => { + if (!err && result) { + return callback( + null, + result.path === false ? false : result.path + (result.query || ""), + result + ); + } + + const localMissing = new Set(); + // TODO remove in enhanced-resolve 5 + localMissing.push = item => deprecatedPushToMissing(localMissing, item); + const log = []; + + return this.doResolve( + this.hooks.resolve, + obj, + message, + { + log: msg => { + if (resolveContext.log) { + resolveContext.log(msg); + } + log.push(msg); + }, + missing: localMissing, + stack: resolveContext.stack + }, + (err, result) => { + if (err) return callback(err); + + const error = new Error("Can't " + message); + error.details = log.join("\n"); + error.missing = Array.from(localMissing); + this.hooks.noResolve.call(obj, error); + return callback(error); + } + ); + } + ); + } + + doResolve(hook, request, message, resolveContext, callback) { + // TODO remove in enhanced-resolve 5 + // For backward compatiblity START + if (typeof callback !== "function") { + callback = deprecatedResolveContextInCallback(resolveContext); + // resolveContext is a function containing additional properties + // It's now used for resolveContext and callback + } + if (typeof hook === "string") { + const name = toCamelCase(hook); + hook = deprecatedHookAsString(this.hooks[name]); + if (!hook) { + throw new Error(`Hook "${name}" doesn't exist`); + } + } + // END + if (typeof callback !== "function") + throw new Error("callback is not a function " + Array.from(arguments)); + if (!resolveContext) + throw new Error( + "resolveContext is not an object " + Array.from(arguments) + ); + + const stackLine = + hook.name + + ": (" + + request.path + + ") " + + (request.request || "") + + (request.query || "") + + (request.directory ? " directory" : "") + + (request.module ? " module" : ""); + + let newStack; + if (resolveContext.stack) { + newStack = new Set(resolveContext.stack); + if (resolveContext.stack.has(stackLine)) { + // Prevent recursion + const recursionError = new Error( + "Recursion in resolving\nStack:\n " + + Array.from(newStack).join("\n ") + ); + recursionError.recursion = true; + if (resolveContext.log) + resolveContext.log("abort resolving because of recursion"); + return callback(recursionError); + } + newStack.add(stackLine); + } else { + newStack = new Set([stackLine]); + } + this.hooks.resolveStep.call(hook, request); + + if (hook.isUsed()) { + const innerContext = createInnerContext( + { + log: resolveContext.log, + missing: resolveContext.missing, + stack: newStack + }, + message + ); + return hook.callAsync(request, innerContext, (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + callback(); + }); + } else { + callback(); + } + } + + parse(identifier) { + if (identifier === "") return null; + const part = { + request: "", + query: "", + module: false, + directory: false, + file: false + }; + const idxQuery = identifier.indexOf("?"); + if (idxQuery === 0) { + part.query = identifier; + } else if (idxQuery > 0) { + part.request = identifier.slice(0, idxQuery); + part.query = identifier.slice(idxQuery); + } else { + part.request = identifier; + } + if (part.request) { + part.module = this.isModule(part.request); + part.directory = this.isDirectory(part.request); + if (part.directory) { + part.request = part.request.substr(0, part.request.length - 1); + } + } + return part; + } + + isModule(path) { + return !REGEXP_NOT_MODULE.test(path); + } + + isDirectory(path) { + return REGEXP_DIRECTORY.test(path); + } + + join(path, request) { + let cacheEntry; + let pathCache = memoizedJoin.get(path); + if (typeof pathCache === "undefined") { + memoizedJoin.set(path, (pathCache = new Map())); + } else { + cacheEntry = pathCache.get(request); + if (typeof cacheEntry !== "undefined") return cacheEntry; + } + cacheEntry = memoryFsJoin(path, request); + pathCache.set(request, cacheEntry); + return cacheEntry; + } + + normalize(path) { + return memoryFsNormalize(path); + } +} + +module.exports = Resolver; + + +/***/ }), + +/***/ 34129: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Resolver = __webpack_require__(82797); + +const SyncAsyncFileSystemDecorator = __webpack_require__(83230); + +const ParsePlugin = __webpack_require__(9743); +const DescriptionFilePlugin = __webpack_require__(95637); +const NextPlugin = __webpack_require__(50959); +const TryNextPlugin = __webpack_require__(31702); +const ModuleKindPlugin = __webpack_require__(9529); +const FileKindPlugin = __webpack_require__(63602); +const JoinRequestPlugin = __webpack_require__(31693); +const ModulesInHierachicDirectoriesPlugin = __webpack_require__(23195); +const ModulesInRootPlugin = __webpack_require__(3092); +const AliasPlugin = __webpack_require__(15005); +const AliasFieldPlugin = __webpack_require__(89901); +const ConcordExtensionsPlugin = __webpack_require__(56821); +const ConcordMainPlugin = __webpack_require__(27878); +const ConcordModulesPlugin = __webpack_require__(50297); +const DirectoryExistsPlugin = __webpack_require__(48504); +const FileExistsPlugin = __webpack_require__(68372); +const SymlinkPlugin = __webpack_require__(51104); +const MainFieldPlugin = __webpack_require__(7064); +const UseFilePlugin = __webpack_require__(41232); +const AppendPlugin = __webpack_require__(2271); +const RootPlugin = __webpack_require__(32669); +const RestrictionsPlugin = __webpack_require__(49751); +const ResultPlugin = __webpack_require__(19258); +const ModuleAppendPlugin = __webpack_require__(23780); +const UnsafeCachePlugin = __webpack_require__(81809); + +exports.createResolver = function(options) { + //// OPTIONS //// + + // A list of directories to resolve modules from, can be absolute path or folder name + let modules = options.modules || ["node_modules"]; + + // A list of description files to read from + const descriptionFiles = options.descriptionFiles || ["package.json"]; + + // A list of additional resolve plugins which should be applied + // The slice is there to create a copy, because otherwise pushing into plugins + // changes the original options.plugins array, causing duplicate plugins + const plugins = (options.plugins && options.plugins.slice()) || []; + + // A list of main fields in description files + let mainFields = options.mainFields || ["main"]; + + // A list of alias fields in description files + const aliasFields = options.aliasFields || []; + + // A list of main files in directories + const mainFiles = options.mainFiles || ["index"]; + + // A list of extensions which should be tried for files + let extensions = options.extensions || [".js", ".json", ".node"]; + + // Enforce that a extension from extensions must be used + const enforceExtension = options.enforceExtension || false; + + // A list of module extensions which should be tried for modules + let moduleExtensions = options.moduleExtensions || []; + + // Enforce that a extension from moduleExtensions must be used + const enforceModuleExtension = options.enforceModuleExtension || false; + + // A list of module alias configurations or an object which maps key to value + let alias = options.alias || []; + + // Resolve symlinks to their symlinked location + const symlinks = + typeof options.symlinks !== "undefined" ? options.symlinks : true; + + // Resolve to a context instead of a file + const resolveToContext = options.resolveToContext || false; + + // A list of root paths + const roots = options.roots || []; + + const restrictions = options.restrictions || []; + + // Use this cache object to unsafely cache the successful requests + let unsafeCache = options.unsafeCache || false; + + // Whether or not the unsafeCache should include request context as part of the cache key. + const cacheWithContext = + typeof options.cacheWithContext !== "undefined" + ? options.cacheWithContext + : true; + + // Enable concord description file instructions + const enableConcord = options.concord || false; + + // A function which decides whether a request should be cached or not. + // an object is passed with `path` and `request` properties. + const cachePredicate = + options.cachePredicate || + function() { + return true; + }; + + // The file system which should be used + const fileSystem = options.fileSystem; + + // Use only the sync constiants of the file system calls + const useSyncFileSystemCalls = options.useSyncFileSystemCalls; + + // A prepared Resolver to which the plugins are attached + let resolver = options.resolver; + + //// options processing //// + + if (!resolver) { + resolver = new Resolver( + useSyncFileSystemCalls + ? new SyncAsyncFileSystemDecorator(fileSystem) + : fileSystem + ); + } + + extensions = [].concat(extensions); + moduleExtensions = [].concat(moduleExtensions); + + modules = mergeFilteredToArray([].concat(modules), item => { + return !isAbsolutePath(item); + }); + + mainFields = mainFields.map(item => { + if (typeof item === "string" || Array.isArray(item)) { + item = { + name: item, + forceRelative: true + }; + } + return item; + }); + + if (typeof alias === "object" && !Array.isArray(alias)) { + alias = Object.keys(alias).map(key => { + let onlyModule = false; + let obj = alias[key]; + if (/\$$/.test(key)) { + onlyModule = true; + key = key.substr(0, key.length - 1); + } + if (typeof obj === "string") { + obj = { + alias: obj + }; + } + obj = Object.assign( + { + name: key, + onlyModule: onlyModule + }, + obj + ); + return obj; + }); + } + + if (unsafeCache && typeof unsafeCache !== "object") { + unsafeCache = {}; + } + + //// pipeline //// + + resolver.ensureHook("resolve"); + resolver.ensureHook("parsedResolve"); + resolver.ensureHook("describedResolve"); + resolver.ensureHook("rawModule"); + resolver.ensureHook("module"); + resolver.ensureHook("relative"); + resolver.ensureHook("describedRelative"); + resolver.ensureHook("directory"); + resolver.ensureHook("existingDirectory"); + resolver.ensureHook("undescribedRawFile"); + resolver.ensureHook("rawFile"); + resolver.ensureHook("file"); + resolver.ensureHook("existingFile"); + resolver.ensureHook("resolved"); + + // resolve + if (unsafeCache) { + plugins.push( + new UnsafeCachePlugin( + "resolve", + cachePredicate, + unsafeCache, + cacheWithContext, + "new-resolve" + ) + ); + plugins.push(new ParsePlugin("new-resolve", "parsed-resolve")); + } else { + plugins.push(new ParsePlugin("resolve", "parsed-resolve")); + } + + // parsed-resolve + plugins.push( + new DescriptionFilePlugin( + "parsed-resolve", + descriptionFiles, + "described-resolve" + ) + ); + plugins.push(new NextPlugin("after-parsed-resolve", "described-resolve")); + + // described-resolve + if (alias.length > 0) + plugins.push(new AliasPlugin("described-resolve", alias, "resolve")); + if (enableConcord) { + plugins.push(new ConcordModulesPlugin("described-resolve", {}, "resolve")); + } + aliasFields.forEach(item => { + plugins.push(new AliasFieldPlugin("described-resolve", item, "resolve")); + }); + plugins.push(new ModuleKindPlugin("after-described-resolve", "raw-module")); + roots.forEach(root => { + plugins.push(new RootPlugin("after-described-resolve", root, "relative")); + }); + plugins.push(new JoinRequestPlugin("after-described-resolve", "relative")); + + // raw-module + moduleExtensions.forEach(item => { + plugins.push(new ModuleAppendPlugin("raw-module", item, "module")); + }); + if (!enforceModuleExtension) + plugins.push(new TryNextPlugin("raw-module", null, "module")); + + // module + modules.forEach(item => { + if (Array.isArray(item)) + plugins.push( + new ModulesInHierachicDirectoriesPlugin("module", item, "resolve") + ); + else plugins.push(new ModulesInRootPlugin("module", item, "resolve")); + }); + + // relative + plugins.push( + new DescriptionFilePlugin( + "relative", + descriptionFiles, + "described-relative" + ) + ); + plugins.push(new NextPlugin("after-relative", "described-relative")); + + // described-relative + plugins.push(new FileKindPlugin("described-relative", "raw-file")); + plugins.push( + new TryNextPlugin("described-relative", "as directory", "directory") + ); + + // directory + plugins.push(new DirectoryExistsPlugin("directory", "existing-directory")); + + if (resolveToContext) { + // existing-directory + plugins.push(new NextPlugin("existing-directory", "resolved")); + } else { + // existing-directory + if (enableConcord) { + plugins.push(new ConcordMainPlugin("existing-directory", {}, "resolve")); + } + mainFields.forEach(item => { + plugins.push(new MainFieldPlugin("existing-directory", item, "resolve")); + }); + mainFiles.forEach(item => { + plugins.push( + new UseFilePlugin("existing-directory", item, "undescribed-raw-file") + ); + }); + + // undescribed-raw-file + plugins.push( + new DescriptionFilePlugin( + "undescribed-raw-file", + descriptionFiles, + "raw-file" + ) + ); + plugins.push(new NextPlugin("after-undescribed-raw-file", "raw-file")); + + // raw-file + if (!enforceExtension) { + plugins.push(new TryNextPlugin("raw-file", "no extension", "file")); + } + if (enableConcord) { + plugins.push(new ConcordExtensionsPlugin("raw-file", {}, "file")); + } + extensions.forEach(item => { + plugins.push(new AppendPlugin("raw-file", item, "file")); + }); + + // file + if (alias.length > 0) + plugins.push(new AliasPlugin("file", alias, "resolve")); + if (enableConcord) { + plugins.push(new ConcordModulesPlugin("file", {}, "resolve")); + } + aliasFields.forEach(item => { + plugins.push(new AliasFieldPlugin("file", item, "resolve")); + }); + if (symlinks) plugins.push(new SymlinkPlugin("file", "relative")); + plugins.push(new FileExistsPlugin("file", "existing-file")); + + // existing-file + plugins.push(new NextPlugin("existing-file", "resolved")); + } + + // resolved + if (restrictions.length > 0) { + plugins.push(new RestrictionsPlugin(resolver.hooks.resolved, restrictions)); + } + plugins.push(new ResultPlugin(resolver.hooks.resolved)); + + //// RESOLVER //// + + plugins.forEach(plugin => { + plugin.apply(resolver); + }); + + return resolver; +}; + +function mergeFilteredToArray(array, filter) { + return array.reduce((array, item) => { + if (filter(item)) { + const lastElement = array[array.length - 1]; + if (Array.isArray(lastElement)) { + lastElement.push(item); + } else { + array.push([item]); + } + return array; + } else { + array.push(item); + return array; + } + }, []); +} + +function isAbsolutePath(path) { + return /^[A-Z]:|^\//.test(path); +} + + +/***/ }), + +/***/ 49751: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const slashCode = "/".charCodeAt(0); +const backslashCode = "\\".charCodeAt(0); + +const isInside = (path, parent) => { + if (!path.startsWith(parent)) return false; + if (path.length === parent.length) return true; + const charCode = path.charCodeAt(parent.length); + return charCode === slashCode || charCode === backslashCode; +}; + +module.exports = class RestrictionsPlugin { + constructor(source, restrictions) { + this.source = source; + this.restrictions = restrictions; + } + + apply(resolver) { + resolver + .getHook(this.source) + .tapAsync("RestrictionsPlugin", (request, resolveContext, callback) => { + if (typeof request.path === "string") { + const path = request.path; + + for (let i = 0; i < this.restrictions.length; i++) { + const rule = this.restrictions[i]; + if (typeof rule === "string") { + if (!isInside(path, rule)) { + if (resolveContext.log) { + resolveContext.log( + `${path} is not inside of the restriction ${rule}` + ); + } + return callback(null, null); + } + } else if (!rule.test(path)) { + if (resolveContext.log) { + resolveContext.log( + `${path} doesn't match the restriction ${rule}` + ); + } + return callback(null, null); + } + } + } + + callback(); + }); + } +}; + + +/***/ }), + +/***/ 19258: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class ResultPlugin { + constructor(source) { + this.source = source; + } + + apply(resolver) { + this.source.tapAsync( + "ResultPlugin", + (request, resolverContext, callback) => { + const obj = Object.assign({}, request); + if (resolverContext.log) + resolverContext.log("reporting result " + obj.path); + resolver.hooks.result.callAsync(obj, resolverContext, err => { + if (err) return callback(err); + callback(null, obj); + }); + } + ); + } +}; + + +/***/ }), + +/***/ 32669: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +class RootPlugin { + /** + * @param {string | ResolveStepHook} source source hook + * @param {Array} root roots + * @param {string | ResolveStepHook} target target hook + */ + constructor(source, root, target) { + this.root = root; + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + + resolver + .getHook(this.source) + .tapAsync("RootPlugin", (request, resolveContext, callback) => { + const req = request.request; + if (!req) return callback(); + if (!req.startsWith("/")) return callback(); + + const path = resolver.join(this.root, req.slice(1)); + const obj = Object.assign(request, { + path, + relativePath: request.relativePath && path + }); + resolver.doResolve( + target, + obj, + `root path ${this.root}`, + resolveContext, + callback + ); + }); + } +} + +module.exports = RootPlugin; + + +/***/ }), + +/***/ 51104: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const getPaths = __webpack_require__(49395); +const forEachBail = __webpack_require__(60059); + +module.exports = class SymlinkPlugin { + constructor(source, target) { + this.source = source; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + const fs = resolver.fileSystem; + resolver + .getHook(this.source) + .tapAsync("SymlinkPlugin", (request, resolveContext, callback) => { + const pathsResult = getPaths(request.path); + const pathSeqments = pathsResult.seqments; + const paths = pathsResult.paths; + + let containsSymlink = false; + forEachBail.withIndex( + paths, + (path, idx, callback) => { + fs.readlink(path, (err, result) => { + if (!err && result) { + pathSeqments[idx] = result; + containsSymlink = true; + // Shortcut when absolute symlink found + if (/^(\/|[a-zA-Z]:($|\\))/.test(result)) + return callback(null, idx); + } + callback(); + }); + }, + (err, idx) => { + if (!containsSymlink) return callback(); + const resultSeqments = + typeof idx === "number" + ? pathSeqments.slice(0, idx + 1) + : pathSeqments.slice(); + const result = resultSeqments.reverse().reduce((a, b) => { + return resolver.join(a, b); + }); + const obj = Object.assign({}, request, { + path: result + }); + resolver.doResolve( + target, + obj, + "resolved symlink to " + result, + resolveContext, + callback + ); + } + ); + }); + } +}; + + +/***/ }), + +/***/ 83230: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +function SyncAsyncFileSystemDecorator(fs) { + this.fs = fs; + if (fs.statSync) { + this.stat = function(arg, callback) { + let result; + try { + result = fs.statSync(arg); + } catch (e) { + return callback(e); + } + callback(null, result); + }; + } + if (fs.readdirSync) { + this.readdir = function(arg, callback) { + let result; + try { + result = fs.readdirSync(arg); + } catch (e) { + return callback(e); + } + callback(null, result); + }; + } + if (fs.readFileSync) { + this.readFile = function(arg, callback) { + let result; + try { + result = fs.readFileSync(arg); + } catch (e) { + return callback(e); + } + callback(null, result); + }; + } + if (fs.readlinkSync) { + this.readlink = function(arg, callback) { + let result; + try { + result = fs.readlinkSync(arg); + } catch (e) { + return callback(e); + } + callback(null, result); + }; + } + if (fs.readJsonSync) { + this.readJson = function(arg, callback) { + let result; + try { + result = fs.readJsonSync(arg); + } catch (e) { + return callback(e); + } + callback(null, result); + }; + } +} +module.exports = SyncAsyncFileSystemDecorator; + + +/***/ }), + +/***/ 31702: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class TryNextPlugin { + constructor(source, message, target) { + this.source = source; + this.message = message; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("TryNextPlugin", (request, resolveContext, callback) => { + resolver.doResolve( + target, + request, + this.message, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 81809: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +function getCacheId(request, withContext) { + return JSON.stringify({ + context: withContext ? request.context : "", + path: request.path, + query: request.query, + request: request.request + }); +} + +module.exports = class UnsafeCachePlugin { + constructor(source, filterPredicate, cache, withContext, target) { + this.source = source; + this.filterPredicate = filterPredicate; + this.withContext = withContext; + this.cache = cache || {}; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("UnsafeCachePlugin", (request, resolveContext, callback) => { + if (!this.filterPredicate(request)) return callback(); + const cacheId = getCacheId(request, this.withContext); + const cacheEntry = this.cache[cacheId]; + if (cacheEntry) { + return callback(null, cacheEntry); + } + resolver.doResolve( + target, + request, + null, + resolveContext, + (err, result) => { + if (err) return callback(err); + if (result) return callback(null, (this.cache[cacheId] = result)); + callback(); + } + ); + }); + } +}; + + +/***/ }), + +/***/ 41232: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class UseFilePlugin { + constructor(source, filename, target) { + this.source = source; + this.filename = filename; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("UseFilePlugin", (request, resolveContext, callback) => { + const filePath = resolver.join(request.path, this.filename); + const obj = Object.assign({}, request, { + path: filePath, + relativePath: + request.relativePath && + resolver.join(request.relativePath, this.filename) + }); + resolver.doResolve( + target, + obj, + "using path: " + filePath, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 94323: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const globToRegExp = __webpack_require__(82876)/* .globToRegExp */ .P; + +function parseType(type) { + const items = type.split("+"); + const t = items.shift(); + return { + type: t === "*" ? null : t, + features: items + }; +} + +function isTypeMatched(baseType, testedType) { + if (typeof baseType === "string") baseType = parseType(baseType); + if (typeof testedType === "string") testedType = parseType(testedType); + if (testedType.type && testedType.type !== baseType.type) return false; + return testedType.features.every(requiredFeature => { + return baseType.features.indexOf(requiredFeature) >= 0; + }); +} + +function isResourceTypeMatched(baseType, testedType) { + baseType = baseType.split("/"); + testedType = testedType.split("/"); + if (baseType.length !== testedType.length) return false; + for (let i = 0; i < baseType.length; i++) { + if (!isTypeMatched(baseType[i], testedType[i])) return false; + } + return true; +} + +function isResourceTypeSupported(context, type) { + return ( + context.supportedResourceTypes && + context.supportedResourceTypes.some(supportedType => { + return isResourceTypeMatched(supportedType, type); + }) + ); +} + +function isEnvironment(context, env) { + return ( + context.environments && + context.environments.every(environment => { + return isTypeMatched(environment, env); + }) + ); +} + +const globCache = {}; + +function getGlobRegExp(glob) { + const regExp = globCache[glob] || (globCache[glob] = globToRegExp(glob)); + return regExp; +} + +function matchGlob(glob, relativePath) { + const regExp = getGlobRegExp(glob); + return regExp.exec(relativePath); +} + +function isGlobMatched(glob, relativePath) { + return !!matchGlob(glob, relativePath); +} + +function isConditionMatched(context, condition) { + const items = condition.split("|"); + return items.some(function testFn(item) { + item = item.trim(); + const inverted = /^!/.test(item); + if (inverted) return !testFn(item.substr(1)); + if (/^[a-z]+:/.test(item)) { + // match named condition + const match = /^([a-z]+):\s*/.exec(item); + const value = item.substr(match[0].length); + const name = match[1]; + switch (name) { + case "referrer": + return isGlobMatched(value, context.referrer); + default: + return false; + } + } else if (item.indexOf("/") >= 0) { + // match supported type + return isResourceTypeSupported(context, item); + } else { + // match environment + return isEnvironment(context, item); + } + }); +} + +function isKeyMatched(context, key) { + for (;;) { + const match = /^\[([^\]]+)\]\s*/.exec(key); + if (!match) return key; + key = key.substr(match[0].length); + const condition = match[1]; + if (!isConditionMatched(context, condition)) { + return false; + } + } +} + +function getField(context, configuration, field) { + let value; + Object.keys(configuration).forEach(key => { + const pureKey = isKeyMatched(context, key); + if (pureKey === field) { + value = configuration[key]; + } + }); + return value; +} + +function getMain(context, configuration) { + return getField(context, configuration, "main"); +} + +function getExtensions(context, configuration) { + return getField(context, configuration, "extensions"); +} + +function matchModule(context, configuration, request) { + const modulesField = getField(context, configuration, "modules"); + if (!modulesField) return request; + let newRequest = request; + const keys = Object.keys(modulesField); + let iteration = 0; + let match; + let index; + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const pureKey = isKeyMatched(context, key); + match = matchGlob(pureKey, newRequest); + if (match) { + const value = modulesField[key]; + if (typeof value !== "string") { + return value; + } else if (/^\(.+\)$/.test(pureKey)) { + newRequest = newRequest.replace(getGlobRegExp(pureKey), value); + } else { + index = 1; + newRequest = value.replace(/(\/?\*)?\*/g, replaceMatcher); + } + i = -1; + if (iteration++ > keys.length) { + throw new Error("Request '" + request + "' matches recursively"); + } + } + } + return newRequest; + + function replaceMatcher(find) { + switch (find) { + case "/**": { + const m = match[index++]; + return m ? "/" + m : ""; + } + case "**": + case "*": + return match[index++]; + } + } +} + +function matchType(context, configuration, relativePath) { + const typesField = getField(context, configuration, "types"); + if (!typesField) return undefined; + let type; + Object.keys(typesField).forEach(key => { + const pureKey = isKeyMatched(context, key); + if (isGlobMatched(pureKey, relativePath)) { + const value = typesField[key]; + if (!type && /\/\*$/.test(value)) + throw new Error( + "value ('" + + value + + "') of key '" + + key + + "' contains '*', but there is no previous value defined" + ); + type = value.replace(/\/\*$/, "/" + type); + } + }); + return type; +} + +exports.parseType = parseType; +exports.isTypeMatched = isTypeMatched; +exports.isResourceTypeSupported = isResourceTypeSupported; +exports.isEnvironment = isEnvironment; +exports.isGlobMatched = isGlobMatched; +exports.isConditionMatched = isConditionMatched; +exports.isKeyMatched = isKeyMatched; +exports.getField = getField; +exports.getMain = getMain; +exports.getExtensions = getExtensions; +exports.matchModule = matchModule; +exports.matchType = matchType; + + +/***/ }), + +/***/ 6369: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = function createInnerContext( + options, + message, + messageOptional +) { + let messageReported = false; + const childContext = { + log: (() => { + if (!options.log) return undefined; + if (!message) return options.log; + const logFunction = msg => { + if (!messageReported) { + options.log(message); + messageReported = true; + } + options.log(" " + msg); + }; + return logFunction; + })(), + stack: options.stack, + missing: options.missing + }; + return childContext; +}; + + +/***/ }), + +/***/ 60059: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = function forEachBail(array, iterator, callback) { + if (array.length === 0) return callback(); + let currentPos = array.length; + let currentResult; + let done = []; + for (let i = 0; i < array.length; i++) { + const itCb = createIteratorCallback(i); + iterator(array[i], itCb); + if (currentPos === 0) break; + } + + function createIteratorCallback(i) { + return (...args) => { + if (i >= currentPos) return; // ignore + done.push(i); + if (args.length > 0) { + currentPos = i + 1; + done = done.filter(item => { + return item <= i; + }); + currentResult = args; + } + if (done.length === currentPos) { + callback.apply(null, currentResult); + currentPos = 0; + } + }; + } +}; + +module.exports.withIndex = function forEachBailWithIndex( + array, + iterator, + callback +) { + if (array.length === 0) return callback(); + let currentPos = array.length; + let currentResult; + let done = []; + for (let i = 0; i < array.length; i++) { + const itCb = createIteratorCallback(i); + iterator(array[i], i, itCb); + if (currentPos === 0) break; + } + + function createIteratorCallback(i) { + return (...args) => { + if (i >= currentPos) return; // ignore + done.push(i); + if (args.length > 0) { + currentPos = i + 1; + done = done.filter(item => { + return item <= i; + }); + currentResult = args; + } + if (done.length === currentPos) { + callback.apply(null, currentResult); + currentPos = 0; + } + }; + } +}; + + +/***/ }), + +/***/ 91878: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = function getInnerRequest(resolver, request) { + if ( + typeof request.__innerRequest === "string" && + request.__innerRequest_request === request.request && + request.__innerRequest_relativePath === request.relativePath + ) + return request.__innerRequest; + let innerRequest; + if (request.request) { + innerRequest = request.request; + if (/^\.\.?\//.test(innerRequest) && request.relativePath) { + innerRequest = resolver.join(request.relativePath, innerRequest); + } + } else { + innerRequest = request.relativePath; + } + request.__innerRequest_request = request.request; + request.__innerRequest_relativePath = request.relativePath; + return (request.__innerRequest = innerRequest); +}; + + +/***/ }), + +/***/ 49395: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = function getPaths(path) { + const parts = path.split(/(.*?[\\/]+)/); + const paths = [path]; + const seqments = [parts[parts.length - 1]]; + let part = parts[parts.length - 1]; + path = path.substr(0, path.length - part.length - 1); + for (let i = parts.length - 2; i > 2; i -= 2) { + paths.push(path); + part = parts[i]; + path = path.substr(0, path.length - part.length) || "/"; + seqments.push(part.substr(0, part.length - 1)); + } + part = parts[1]; + seqments.push(part); + paths.push(part); + return { + paths: paths, + seqments: seqments + }; +}; + +module.exports.basename = function basename(path) { + const i = path.lastIndexOf("/"), + j = path.lastIndexOf("\\"); + const p = i < 0 ? j : j < 0 ? i : i < j ? j : i; + if (p < 0) return null; + const s = path.substr(p + 1); + return s; +}; + + +/***/ }), + +/***/ 82876: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +function globToRegExp(glob) { + // * [^\\\/]* + // /**/ /.+/ + // ^* \./.+ (concord special) + // ? [^\\\/] + // [!...] [^...] + // [^...] [^...] + // / [\\\/] + // {...,...} (...|...) + // ?(...|...) (...|...)? + // +(...|...) (...|...)+ + // *(...|...) (...|...)* + // @(...|...) (...|...) + if (/^\(.+\)$/.test(glob)) { + // allow to pass an RegExp in brackets + return new RegExp(glob.substr(1, glob.length - 2)); + } + const tokens = tokenize(glob); + const process = createRoot(); + const regExpStr = tokens.map(process).join(""); + return new RegExp("^" + regExpStr + "$"); +} + +const SIMPLE_TOKENS = { + "@(": "one", + "?(": "zero-one", + "+(": "one-many", + "*(": "zero-many", + "|": "segment-sep", + "/**/": "any-path-segments", + "**": "any-path", + "*": "any-path-segment", + "?": "any-char", + "{": "or", + "/": "path-sep", + ",": "comma", + ")": "closing-segment", + "}": "closing-or" +}; + +function tokenize(glob) { + return glob + .split( + /([@?+*]\(|\/\*\*\/|\*\*|[?*]|\[[!^]?(?:[^\]\\]|\\.)+\]|\{|,|\/|[|)}])/g + ) + .map(item => { + if (!item) return null; + const t = SIMPLE_TOKENS[item]; + if (t) { + return { + type: t + }; + } + if (item[0] === "[") { + if (item[1] === "^" || item[1] === "!") { + return { + type: "inverted-char-set", + value: item.substr(2, item.length - 3) + }; + } else { + return { + type: "char-set", + value: item.substr(1, item.length - 2) + }; + } + } + return { + type: "string", + value: item + }; + }) + .filter(Boolean) + .concat({ + type: "end" + }); +} + +function createRoot() { + const inOr = []; + const process = createSeqment(); + let initial = true; + return function(token) { + switch (token.type) { + case "or": + inOr.push(initial); + return "("; + case "comma": + if (inOr.length) { + initial = inOr[inOr.length - 1]; + return "|"; + } else { + return process( + { + type: "string", + value: "," + }, + initial + ); + } + case "closing-or": + if (inOr.length === 0) throw new Error("Unmatched '}'"); + inOr.pop(); + return ")"; + case "end": + if (inOr.length) throw new Error("Unmatched '{'"); + return process(token, initial); + default: { + const result = process(token, initial); + initial = false; + return result; + } + } + }; +} + +function createSeqment() { + const inSeqment = []; + const process = createSimple(); + return function(token, initial) { + switch (token.type) { + case "one": + case "one-many": + case "zero-many": + case "zero-one": + inSeqment.push(token.type); + return "("; + case "segment-sep": + if (inSeqment.length) { + return "|"; + } else { + return process( + { + type: "string", + value: "|" + }, + initial + ); + } + case "closing-segment": { + const segment = inSeqment.pop(); + switch (segment) { + case "one": + return ")"; + case "one-many": + return ")+"; + case "zero-many": + return ")*"; + case "zero-one": + return ")?"; + } + throw new Error("Unexcepted segment " + segment); + } + case "end": + if (inSeqment.length > 0) { + throw new Error("Unmatched segment, missing ')'"); + } + return process(token, initial); + default: + return process(token, initial); + } + }; +} + +function createSimple() { + return function(token, initial) { + switch (token.type) { + case "path-sep": + return "[\\\\/]+"; + case "any-path-segments": + return "[\\\\/]+(?:(.+)[\\\\/]+)?"; + case "any-path": + return "(.*)"; + case "any-path-segment": + if (initial) { + return "\\.[\\\\/]+(?:.*[\\\\/]+)?([^\\\\/]+)"; + } else { + return "([^\\\\/]*)"; + } + case "any-char": + return "[^\\\\/]"; + case "inverted-char-set": + return "[^" + token.value + "]"; + case "char-set": + return "[" + token.value + "]"; + case "string": + return token.value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + case "end": + return ""; + default: + throw new Error("Unsupported token '" + token.type + "'"); + } + }; +} + +exports.P = globToRegExp; + + +/***/ }), + +/***/ 87450: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ResolverFactory = __webpack_require__(34129); + +const NodeJsInputFileSystem = __webpack_require__(13445); +const CachedInputFileSystem = __webpack_require__(75544); + +const nodeFileSystem = new CachedInputFileSystem( + new NodeJsInputFileSystem(), + 4000 +); + +const nodeContext = { + environments: ["node+es3+es5+process+native"] +}; + +const asyncResolver = ResolverFactory.createResolver({ + extensions: [".js", ".json", ".node"], + fileSystem: nodeFileSystem +}); +module.exports = function resolve( + context, + path, + request, + resolveContext, + callback +) { + if (typeof context === "string") { + callback = resolveContext; + resolveContext = request; + request = path; + path = context; + context = nodeContext; + } + if (typeof callback !== "function") { + callback = resolveContext; + } + asyncResolver.resolve(context, path, request, resolveContext, callback); +}; + +const syncResolver = ResolverFactory.createResolver({ + extensions: [".js", ".json", ".node"], + useSyncFileSystemCalls: true, + fileSystem: nodeFileSystem +}); +module.exports.sync = function resolveSync(context, path, request) { + if (typeof context === "string") { + request = path; + path = context; + context = nodeContext; + } + return syncResolver.resolveSync(context, path, request); +}; + +const asyncContextResolver = ResolverFactory.createResolver({ + extensions: [".js", ".json", ".node"], + resolveToContext: true, + fileSystem: nodeFileSystem +}); +module.exports.context = function resolveContext( + context, + path, + request, + resolveContext, + callback +) { + if (typeof context === "string") { + callback = resolveContext; + resolveContext = request; + request = path; + path = context; + context = nodeContext; + } + if (typeof callback !== "function") { + callback = resolveContext; + } + asyncContextResolver.resolve( + context, + path, + request, + resolveContext, + callback + ); +}; + +const syncContextResolver = ResolverFactory.createResolver({ + extensions: [".js", ".json", ".node"], + resolveToContext: true, + useSyncFileSystemCalls: true, + fileSystem: nodeFileSystem +}); +module.exports.context.sync = function resolveContextSync( + context, + path, + request +) { + if (typeof context === "string") { + request = path; + path = context; + context = nodeContext; + } + return syncContextResolver.resolveSync(context, path, request); +}; + +const asyncLoaderResolver = ResolverFactory.createResolver({ + extensions: [".js", ".json", ".node"], + moduleExtensions: ["-loader"], + mainFields: ["loader", "main"], + fileSystem: nodeFileSystem +}); +module.exports.loader = function resolveLoader( + context, + path, + request, + resolveContext, + callback +) { + if (typeof context === "string") { + callback = resolveContext; + resolveContext = request; + request = path; + path = context; + context = nodeContext; + } + if (typeof callback !== "function") { + callback = resolveContext; + } + asyncLoaderResolver.resolve(context, path, request, resolveContext, callback); +}; + +const syncLoaderResolver = ResolverFactory.createResolver({ + extensions: [".js", ".json", ".node"], + moduleExtensions: ["-loader"], + mainFields: ["loader", "main"], + useSyncFileSystemCalls: true, + fileSystem: nodeFileSystem +}); +module.exports.loader.sync = function resolveLoaderSync( + context, + path, + request +) { + if (typeof context === "string") { + request = path; + path = context; + context = nodeContext; + } + return syncLoaderResolver.resolveSync(context, path, request); +}; + +module.exports.create = function create(options) { + options = Object.assign( + { + fileSystem: nodeFileSystem + }, + options + ); + const resolver = ResolverFactory.createResolver(options); + return function(context, path, request, resolveContext, callback) { + if (typeof context === "string") { + callback = resolveContext; + resolveContext = request; + request = path; + path = context; + context = nodeContext; + } + if (typeof callback !== "function") { + callback = resolveContext; + } + resolver.resolve(context, path, request, resolveContext, callback); + }; +}; + +module.exports.create.sync = function createSync(options) { + options = Object.assign( + { + useSyncFileSystemCalls: true, + fileSystem: nodeFileSystem + }, + options + ); + const resolver = ResolverFactory.createResolver(options); + return function(context, path, request) { + if (typeof context === "string") { + request = path; + path = context; + context = nodeContext; + } + return resolver.resolveSync(context, path, request); + }; +}; + +// Export Resolver, FileSystems and Plugins +module.exports.ResolverFactory = ResolverFactory; + +module.exports.NodeJsInputFileSystem = NodeJsInputFileSystem; +module.exports.CachedInputFileSystem = CachedInputFileSystem; + + +/***/ }), + +/***/ 65775: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +const normalize = __webpack_require__(69038); + +const absoluteWinRegExp = /^[A-Z]:([\\\/]|$)/i; +const absoluteNixRegExp = /^\//i; + +module.exports = function join(path, request) { + if(!request) return normalize(path); + if(absoluteWinRegExp.test(request)) return normalize(request.replace(/\//g, "\\")); + if(absoluteNixRegExp.test(request)) return normalize(request); + if(path == "/") return normalize(path + request); + if(absoluteWinRegExp.test(path)) return normalize(path.replace(/\//g, "\\") + "\\" + request.replace(/\//g, "\\")); + if(absoluteNixRegExp.test(path)) return normalize(path + "/" + request); + return normalize(path + "/" + request); +}; + + +/***/ }), + +/***/ 69038: +/***/ (function(module) { + +"use strict"; + + +// eslint-disable-next-line complexity +module.exports = function normalize(path) { + var parts = path.split(/(\\+|\/+)/); + if(parts.length === 1) + return path; + var result = []; + var absolutePathStart = 0; + for(var i = 0, sep = false; i < parts.length; i += 1, sep = !sep) { + var part = parts[i]; + if(i === 0 && /^([A-Z]:)?$/i.test(part)) { + result.push(part); + absolutePathStart = 2; + } else if(sep) { + // UNC paths on Windows begin with a double backslash. + if (i === 1 && parts[0].length === 0 && part === "\\\\") { + result.push(part); + } else { + result.push(part[0]); + } + } else if(part === "..") { + switch(result.length) { + case 0: + // i. e. ".." => ".." + // i. e. "../a/b/c" => "../a/b/c" + result.push(part); + break; + case 2: + // i. e. "a/.." => "" + // i. e. "/.." => "/" + // i. e. "C:\.." => "C:\" + // i. e. "a/../b/c" => "b/c" + // i. e. "/../b/c" => "/b/c" + // i. e. "C:\..\a\b\c" => "C:\a\b\c" + if (result[0] !== ".") { + i += 1; + sep = !sep; + result.length = absolutePathStart; + } else { + result.length = 0; + result.push(part); + } + break; + case 4: + // i. e. "a/b/.." => "a" + // i. e. "/a/.." => "/" + // i. e. "C:\a\.." => "C:\" + // i. e. "/a/../b/c" => "/b/c" + if(absolutePathStart === 0) { + result.length -= 3; + } else { + i += 1; + sep = !sep; + result.length = 2; + } + break; + default: + // i. e. "/a/b/.." => "/a" + // i. e. "/a/b/../c" => "/a/c" + result.length -= 3; + break; + } + } else if(part === ".") { + switch(result.length) { + case 0: + // i. e. "." => "." + // i. e. "./a/b/c" => "./a/b/c" + result.push(part); + break; + case 2: + // i. e. "a/." => "a" + // i. e. "/." => "/" + // i. e. "C:\." => "C:\" + // i. e. "C:\.\a\b\c" => "C:\a\b\c" + if(absolutePathStart === 0) { + result.length -= 1; + } else { + i += 1; + sep = !sep; + } + break; + default: + // i. e. "a/b/." => "a/b" + // i. e. "/a/." => "/" + // i. e. "C:\a\." => "C:\" + // i. e. "a/./b/c" => "a/b/c" + // i. e. "/a/./b/c" => "/a/b/c" + result.length -= 1; + break; + } + } else if(part) { + result.push(part); + } + } + if(result.length === 1 && /^[A-Za-z]:$/.test(result[0])) + return result[0] + "\\"; + return result.join(""); +}; + + +/***/ }), + +/***/ 81744: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var prr = __webpack_require__(59570) + +function init (type, message, cause) { + if (!!message && typeof message != 'string') { + message = message.message || message.name + } + prr(this, { + type : type + , name : type + // can be passed just a 'cause' + , cause : typeof message != 'string' ? message : cause + , message : message + }, 'ewr') +} + +// generic prototype, not intended to be actually used - helpful for `instanceof` +function CustomError (message, cause) { + Error.call(this) + if (Error.captureStackTrace) + Error.captureStackTrace(this, this.constructor) + init.call(this, 'CustomError', message, cause) +} + +CustomError.prototype = new Error() + +function createError (errno, type, proto) { + var err = function (message, cause) { + init.call(this, type, message, cause) + //TODO: the specificity here is stupid, errno should be available everywhere + if (type == 'FilesystemError') { + this.code = this.cause.code + this.path = this.cause.path + this.errno = this.cause.errno + this.message = + (errno.errno[this.cause.errno] + ? errno.errno[this.cause.errno].description + : this.cause.message) + + (this.cause.path ? ' [' + this.cause.path + ']' : '') + } + Error.call(this) + if (Error.captureStackTrace) + Error.captureStackTrace(this, err) + } + err.prototype = !!proto ? new proto() : new CustomError() + return err +} + +module.exports = function (errno) { + var ce = function (type, proto) { + return createError(errno, type, proto) + } + return { + CustomError : CustomError + , FilesystemError : ce('FilesystemError') + , createError : ce + } +} + + +/***/ }), + +/***/ 48916: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var all = module.exports.all = [ + { + errno: -2, + code: 'ENOENT', + description: 'no such file or directory' + }, + { + errno: -1, + code: 'UNKNOWN', + description: 'unknown error' + }, + { + errno: 0, + code: 'OK', + description: 'success' + }, + { + errno: 1, + code: 'EOF', + description: 'end of file' + }, + { + errno: 2, + code: 'EADDRINFO', + description: 'getaddrinfo error' + }, + { + errno: 3, + code: 'EACCES', + description: 'permission denied' + }, + { + errno: 4, + code: 'EAGAIN', + description: 'resource temporarily unavailable' + }, + { + errno: 5, + code: 'EADDRINUSE', + description: 'address already in use' + }, + { + errno: 6, + code: 'EADDRNOTAVAIL', + description: 'address not available' + }, + { + errno: 7, + code: 'EAFNOSUPPORT', + description: 'address family not supported' + }, + { + errno: 8, + code: 'EALREADY', + description: 'connection already in progress' + }, + { + errno: 9, + code: 'EBADF', + description: 'bad file descriptor' + }, + { + errno: 10, + code: 'EBUSY', + description: 'resource busy or locked' + }, + { + errno: 11, + code: 'ECONNABORTED', + description: 'software caused connection abort' + }, + { + errno: 12, + code: 'ECONNREFUSED', + description: 'connection refused' + }, + { + errno: 13, + code: 'ECONNRESET', + description: 'connection reset by peer' + }, + { + errno: 14, + code: 'EDESTADDRREQ', + description: 'destination address required' + }, + { + errno: 15, + code: 'EFAULT', + description: 'bad address in system call argument' + }, + { + errno: 16, + code: 'EHOSTUNREACH', + description: 'host is unreachable' + }, + { + errno: 17, + code: 'EINTR', + description: 'interrupted system call' + }, + { + errno: 18, + code: 'EINVAL', + description: 'invalid argument' + }, + { + errno: 19, + code: 'EISCONN', + description: 'socket is already connected' + }, + { + errno: 20, + code: 'EMFILE', + description: 'too many open files' + }, + { + errno: 21, + code: 'EMSGSIZE', + description: 'message too long' + }, + { + errno: 22, + code: 'ENETDOWN', + description: 'network is down' + }, + { + errno: 23, + code: 'ENETUNREACH', + description: 'network is unreachable' + }, + { + errno: 24, + code: 'ENFILE', + description: 'file table overflow' + }, + { + errno: 25, + code: 'ENOBUFS', + description: 'no buffer space available' + }, + { + errno: 26, + code: 'ENOMEM', + description: 'not enough memory' + }, + { + errno: 27, + code: 'ENOTDIR', + description: 'not a directory' + }, + { + errno: 28, + code: 'EISDIR', + description: 'illegal operation on a directory' + }, + { + errno: 29, + code: 'ENONET', + description: 'machine is not on the network' + }, + { + errno: 31, + code: 'ENOTCONN', + description: 'socket is not connected' + }, + { + errno: 32, + code: 'ENOTSOCK', + description: 'socket operation on non-socket' + }, + { + errno: 33, + code: 'ENOTSUP', + description: 'operation not supported on socket' + }, + { + errno: 34, + code: 'ENOENT', + description: 'no such file or directory' + }, + { + errno: 35, + code: 'ENOSYS', + description: 'function not implemented' + }, + { + errno: 36, + code: 'EPIPE', + description: 'broken pipe' + }, + { + errno: 37, + code: 'EPROTO', + description: 'protocol error' + }, + { + errno: 38, + code: 'EPROTONOSUPPORT', + description: 'protocol not supported' + }, + { + errno: 39, + code: 'EPROTOTYPE', + description: 'protocol wrong type for socket' + }, + { + errno: 40, + code: 'ETIMEDOUT', + description: 'connection timed out' + }, + { + errno: 41, + code: 'ECHARSET', + description: 'invalid Unicode character' + }, + { + errno: 42, + code: 'EAIFAMNOSUPPORT', + description: 'address family for hostname not supported' + }, + { + errno: 44, + code: 'EAISERVICE', + description: 'servname not supported for ai_socktype' + }, + { + errno: 45, + code: 'EAISOCKTYPE', + description: 'ai_socktype not supported' + }, + { + errno: 46, + code: 'ESHUTDOWN', + description: 'cannot send after transport endpoint shutdown' + }, + { + errno: 47, + code: 'EEXIST', + description: 'file already exists' + }, + { + errno: 48, + code: 'ESRCH', + description: 'no such process' + }, + { + errno: 49, + code: 'ENAMETOOLONG', + description: 'name too long' + }, + { + errno: 50, + code: 'EPERM', + description: 'operation not permitted' + }, + { + errno: 51, + code: 'ELOOP', + description: 'too many symbolic links encountered' + }, + { + errno: 52, + code: 'EXDEV', + description: 'cross-device link not permitted' + }, + { + errno: 53, + code: 'ENOTEMPTY', + description: 'directory not empty' + }, + { + errno: 54, + code: 'ENOSPC', + description: 'no space left on device' + }, + { + errno: 55, + code: 'EIO', + description: 'i/o error' + }, + { + errno: 56, + code: 'EROFS', + description: 'read-only file system' + }, + { + errno: 57, + code: 'ENODEV', + description: 'no such device' + }, + { + errno: 58, + code: 'ESPIPE', + description: 'invalid seek' + }, + { + errno: 59, + code: 'ECANCELED', + description: 'operation canceled' + } +] + +module.exports.errno = {} +module.exports.code = {} + +all.forEach(function (error) { + module.exports.errno[error.errno] = error + module.exports.code[error.code] = error +}) + +module.exports.custom = __webpack_require__(81744)(module.exports) +module.exports.create = module.exports.custom.createError + + +/***/ }), + +/***/ 64352: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +/* + Copyright (C) 2014 Yusuke Suzuki + + 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 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. +*/ +(function () { + 'use strict'; + + var estraverse = __webpack_require__(40379); + + function isNode(node) { + if (node == null) { + return false; + } + return typeof node === 'object' && typeof node.type === 'string'; + } + + function isProperty(nodeType, key) { + return (nodeType === estraverse.Syntax.ObjectExpression || nodeType === estraverse.Syntax.ObjectPattern) && key === 'properties'; + } + + function Visitor(visitor, options) { + options = options || {}; + + this.__visitor = visitor || this; + this.__childVisitorKeys = options.childVisitorKeys + ? Object.assign({}, estraverse.VisitorKeys, options.childVisitorKeys) + : estraverse.VisitorKeys; + if (options.fallback === 'iteration') { + this.__fallback = Object.keys; + } else if (typeof options.fallback === 'function') { + this.__fallback = options.fallback; + } + } + + /* Default method for visiting children. + * When you need to call default visiting operation inside custom visiting + * operation, you can use it with `this.visitChildren(node)`. + */ + Visitor.prototype.visitChildren = function (node) { + var type, children, i, iz, j, jz, child; + + if (node == null) { + return; + } + + type = node.type || estraverse.Syntax.Property; + + children = this.__childVisitorKeys[type]; + if (!children) { + if (this.__fallback) { + children = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + type + '.'); + } + } + + for (i = 0, iz = children.length; i < iz; ++i) { + child = node[children[i]]; + if (child) { + if (Array.isArray(child)) { + for (j = 0, jz = child.length; j < jz; ++j) { + if (child[j]) { + if (isNode(child[j]) || isProperty(type, children[i])) { + this.visit(child[j]); + } + } + } + } else if (isNode(child)) { + this.visit(child); + } + } + } + }; + + /* Dispatching node. */ + Visitor.prototype.visit = function (node) { + var type; + + if (node == null) { + return; + } + + type = node.type || estraverse.Syntax.Property; + if (this.__visitor[type]) { + this.__visitor[type].call(this, node); + return; + } + this.visitChildren(node); + }; + + exports.version = __webpack_require__(25916).version; + exports.Visitor = Visitor; + exports.visit = function (node, visitor, options) { + var v = new Visitor(visitor, options); + v.visit(node); + }; +}()); +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 40379: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +/* + Copyright (C) 2012-2013 Yusuke Suzuki + Copyright (C) 2012 Ariya Hidayat + + 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 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. +*/ +/*jslint vars:false, bitwise:true*/ +/*jshint indent:4*/ +/*global exports:true*/ +(function clone(exports) { + 'use strict'; + + var Syntax, + VisitorOption, + VisitorKeys, + BREAK, + SKIP, + REMOVE; + + function deepCopy(obj) { + var ret = {}, key, val; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + val = obj[key]; + if (typeof val === 'object' && val !== null) { + ret[key] = deepCopy(val); + } else { + ret[key] = val; + } + } + } + return ret; + } + + // based on LLVM libc++ upper_bound / lower_bound + // MIT License + + function upperBound(array, func) { + var diff, len, i, current; + + len = array.length; + i = 0; + + while (len) { + diff = len >>> 1; + current = i + diff; + if (func(array[current])) { + len = diff; + } else { + i = current + 1; + len -= diff + 1; + } + } + return i; + } + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + AssignmentPattern: 'AssignmentPattern', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7. + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7. + ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7. + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DirectiveStatement: 'DirectiveStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportAllDeclaration: 'ExportAllDeclaration', + ExportDefaultDeclaration: 'ExportDefaultDeclaration', + ExportNamedDeclaration: 'ExportNamedDeclaration', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7. + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportExpression: 'ImportExpression', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MetaProperty: 'MetaProperty', + MethodDefinition: 'MethodDefinition', + ModuleSpecifier: 'ModuleSpecifier', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + RestElement: 'RestElement', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + Super: 'Super', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + }; + + VisitorKeys = { + AssignmentExpression: ['left', 'right'], + AssignmentPattern: ['left', 'right'], + ArrayExpression: ['elements'], + ArrayPattern: ['elements'], + ArrowFunctionExpression: ['params', 'body'], + AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7. + BlockStatement: ['body'], + BinaryExpression: ['left', 'right'], + BreakStatement: ['label'], + CallExpression: ['callee', 'arguments'], + CatchClause: ['param', 'body'], + ClassBody: ['body'], + ClassDeclaration: ['id', 'superClass', 'body'], + ClassExpression: ['id', 'superClass', 'body'], + ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7. + ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. + ConditionalExpression: ['test', 'consequent', 'alternate'], + ContinueStatement: ['label'], + DebuggerStatement: [], + DirectiveStatement: [], + DoWhileStatement: ['body', 'test'], + EmptyStatement: [], + ExportAllDeclaration: ['source'], + ExportDefaultDeclaration: ['declaration'], + ExportNamedDeclaration: ['declaration', 'specifiers', 'source'], + ExportSpecifier: ['exported', 'local'], + ExpressionStatement: ['expression'], + ForStatement: ['init', 'test', 'update', 'body'], + ForInStatement: ['left', 'right', 'body'], + ForOfStatement: ['left', 'right', 'body'], + FunctionDeclaration: ['id', 'params', 'body'], + FunctionExpression: ['id', 'params', 'body'], + GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. + Identifier: [], + IfStatement: ['test', 'consequent', 'alternate'], + ImportExpression: ['source'], + ImportDeclaration: ['specifiers', 'source'], + ImportDefaultSpecifier: ['local'], + ImportNamespaceSpecifier: ['local'], + ImportSpecifier: ['imported', 'local'], + Literal: [], + LabeledStatement: ['label', 'body'], + LogicalExpression: ['left', 'right'], + MemberExpression: ['object', 'property'], + MetaProperty: ['meta', 'property'], + MethodDefinition: ['key', 'value'], + ModuleSpecifier: [], + NewExpression: ['callee', 'arguments'], + ObjectExpression: ['properties'], + ObjectPattern: ['properties'], + Program: ['body'], + Property: ['key', 'value'], + RestElement: [ 'argument' ], + ReturnStatement: ['argument'], + SequenceExpression: ['expressions'], + SpreadElement: ['argument'], + Super: [], + SwitchStatement: ['discriminant', 'cases'], + SwitchCase: ['test', 'consequent'], + TaggedTemplateExpression: ['tag', 'quasi'], + TemplateElement: [], + TemplateLiteral: ['quasis', 'expressions'], + ThisExpression: [], + ThrowStatement: ['argument'], + TryStatement: ['block', 'handler', 'finalizer'], + UnaryExpression: ['argument'], + UpdateExpression: ['argument'], + VariableDeclaration: ['declarations'], + VariableDeclarator: ['id', 'init'], + WhileStatement: ['test', 'body'], + WithStatement: ['object', 'body'], + YieldExpression: ['argument'] + }; + + // unique id + BREAK = {}; + SKIP = {}; + REMOVE = {}; + + VisitorOption = { + Break: BREAK, + Skip: SKIP, + Remove: REMOVE + }; + + function Reference(parent, key) { + this.parent = parent; + this.key = key; + } + + Reference.prototype.replace = function replace(node) { + this.parent[this.key] = node; + }; + + Reference.prototype.remove = function remove() { + if (Array.isArray(this.parent)) { + this.parent.splice(this.key, 1); + return true; + } else { + this.replace(null); + return false; + } + }; + + function Element(node, path, wrap, ref) { + this.node = node; + this.path = path; + this.wrap = wrap; + this.ref = ref; + } + + function Controller() { } + + // API: + // return property path array from root to current node + Controller.prototype.path = function path() { + var i, iz, j, jz, result, element; + + function addToPath(result, path) { + if (Array.isArray(path)) { + for (j = 0, jz = path.length; j < jz; ++j) { + result.push(path[j]); + } + } else { + result.push(path); + } + } + + // root node + if (!this.__current.path) { + return null; + } + + // first node is sentinel, second node is root element + result = []; + for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { + element = this.__leavelist[i]; + addToPath(result, element.path); + } + addToPath(result, this.__current.path); + return result; + }; + + // API: + // return type of current node + Controller.prototype.type = function () { + var node = this.current(); + return node.type || this.__current.wrap; + }; + + // API: + // return array of parent elements + Controller.prototype.parents = function parents() { + var i, iz, result; + + // first node is sentinel + result = []; + for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { + result.push(this.__leavelist[i].node); + } + + return result; + }; + + // API: + // return current node + Controller.prototype.current = function current() { + return this.__current.node; + }; + + Controller.prototype.__execute = function __execute(callback, element) { + var previous, result; + + result = undefined; + + previous = this.__current; + this.__current = element; + this.__state = null; + if (callback) { + result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); + } + this.__current = previous; + + return result; + }; + + // API: + // notify control skip / break + Controller.prototype.notify = function notify(flag) { + this.__state = flag; + }; + + // API: + // skip child nodes of current node + Controller.prototype.skip = function () { + this.notify(SKIP); + }; + + // API: + // break traversals + Controller.prototype['break'] = function () { + this.notify(BREAK); + }; + + // API: + // remove node + Controller.prototype.remove = function () { + this.notify(REMOVE); + }; + + Controller.prototype.__initialize = function(root, visitor) { + this.visitor = visitor; + this.root = root; + this.__worklist = []; + this.__leavelist = []; + this.__current = null; + this.__state = null; + this.__fallback = null; + if (visitor.fallback === 'iteration') { + this.__fallback = Object.keys; + } else if (typeof visitor.fallback === 'function') { + this.__fallback = visitor.fallback; + } + + this.__keys = VisitorKeys; + if (visitor.keys) { + this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); + } + }; + + function isNode(node) { + if (node == null) { + return false; + } + return typeof node === 'object' && typeof node.type === 'string'; + } + + function isProperty(nodeType, key) { + return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; + } + + Controller.prototype.traverse = function traverse(root, visitor) { + var worklist, + leavelist, + element, + node, + nodeType, + ret, + key, + current, + current2, + candidates, + candidate, + sentinel; + + this.__initialize(root, visitor); + + sentinel = {}; + + // reference + worklist = this.__worklist; + leavelist = this.__leavelist; + + // initialize + worklist.push(new Element(root, null, null, null)); + leavelist.push(new Element(null, null, null, null)); + + while (worklist.length) { + element = worklist.pop(); + + if (element === sentinel) { + element = leavelist.pop(); + + ret = this.__execute(visitor.leave, element); + + if (this.__state === BREAK || ret === BREAK) { + return; + } + continue; + } + + if (element.node) { + + ret = this.__execute(visitor.enter, element); + + if (this.__state === BREAK || ret === BREAK) { + return; + } + + worklist.push(sentinel); + leavelist.push(element); + + if (this.__state === SKIP || ret === SKIP) { + continue; + } + + node = element.node; + nodeType = node.type || element.wrap; + candidates = this.__keys[nodeType]; + if (!candidates) { + if (this.__fallback) { + candidates = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + nodeType + '.'); + } + } + + current = candidates.length; + while ((current -= 1) >= 0) { + key = candidates[current]; + candidate = node[key]; + if (!candidate) { + continue; + } + + if (Array.isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (!candidate[current2]) { + continue; + } + if (isProperty(nodeType, candidates[current])) { + element = new Element(candidate[current2], [key, current2], 'Property', null); + } else if (isNode(candidate[current2])) { + element = new Element(candidate[current2], [key, current2], null, null); + } else { + continue; + } + worklist.push(element); + } + } else if (isNode(candidate)) { + worklist.push(new Element(candidate, key, null, null)); + } + } + } + } + }; + + Controller.prototype.replace = function replace(root, visitor) { + var worklist, + leavelist, + node, + nodeType, + target, + element, + current, + current2, + candidates, + candidate, + sentinel, + outer, + key; + + function removeElem(element) { + var i, + key, + nextElem, + parent; + + if (element.ref.remove()) { + // When the reference is an element of an array. + key = element.ref.key; + parent = element.ref.parent; + + // If removed from array, then decrease following items' keys. + i = worklist.length; + while (i--) { + nextElem = worklist[i]; + if (nextElem.ref && nextElem.ref.parent === parent) { + if (nextElem.ref.key < key) { + break; + } + --nextElem.ref.key; + } + } + } + } + + this.__initialize(root, visitor); + + sentinel = {}; + + // reference + worklist = this.__worklist; + leavelist = this.__leavelist; + + // initialize + outer = { + root: root + }; + element = new Element(root, null, null, new Reference(outer, 'root')); + worklist.push(element); + leavelist.push(element); + + while (worklist.length) { + element = worklist.pop(); + + if (element === sentinel) { + element = leavelist.pop(); + + target = this.__execute(visitor.leave, element); + + // node may be replaced with null, + // so distinguish between undefined and null in this place + if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { + // replace + element.ref.replace(target); + } + + if (this.__state === REMOVE || target === REMOVE) { + removeElem(element); + } + + if (this.__state === BREAK || target === BREAK) { + return outer.root; + } + continue; + } + + target = this.__execute(visitor.enter, element); + + // node may be replaced with null, + // so distinguish between undefined and null in this place + if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { + // replace + element.ref.replace(target); + element.node = target; + } + + if (this.__state === REMOVE || target === REMOVE) { + removeElem(element); + element.node = null; + } + + if (this.__state === BREAK || target === BREAK) { + return outer.root; + } + + // node may be null + node = element.node; + if (!node) { + continue; + } + + worklist.push(sentinel); + leavelist.push(element); + + if (this.__state === SKIP || target === SKIP) { + continue; + } + + nodeType = node.type || element.wrap; + candidates = this.__keys[nodeType]; + if (!candidates) { + if (this.__fallback) { + candidates = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + nodeType + '.'); + } + } + + current = candidates.length; + while ((current -= 1) >= 0) { + key = candidates[current]; + candidate = node[key]; + if (!candidate) { + continue; + } + + if (Array.isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (!candidate[current2]) { + continue; + } + if (isProperty(nodeType, candidates[current])) { + element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); + } else if (isNode(candidate[current2])) { + element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2)); + } else { + continue; + } + worklist.push(element); + } + } else if (isNode(candidate)) { + worklist.push(new Element(candidate, key, null, new Reference(node, key))); + } + } + } + + return outer.root; + }; + + function traverse(root, visitor) { + var controller = new Controller(); + return controller.traverse(root, visitor); + } + + function replace(root, visitor) { + var controller = new Controller(); + return controller.replace(root, visitor); + } + + function extendCommentRange(comment, tokens) { + var target; + + target = upperBound(tokens, function search(token) { + return token.range[0] > comment.range[0]; + }); + + comment.extendedRange = [comment.range[0], comment.range[1]]; + + if (target !== tokens.length) { + comment.extendedRange[1] = tokens[target].range[0]; + } + + target -= 1; + if (target >= 0) { + comment.extendedRange[0] = tokens[target].range[1]; + } + + return comment; + } + + function attachComments(tree, providedComments, tokens) { + // At first, we should calculate extended comment ranges. + var comments = [], comment, len, i, cursor; + + if (!tree.range) { + throw new Error('attachComments needs range information'); + } + + // tokens array is empty, we attach comments to tree as 'leadingComments' + if (!tokens.length) { + if (providedComments.length) { + for (i = 0, len = providedComments.length; i < len; i += 1) { + comment = deepCopy(providedComments[i]); + comment.extendedRange = [0, tree.range[0]]; + comments.push(comment); + } + tree.leadingComments = comments; + } + return tree; + } + + for (i = 0, len = providedComments.length; i < len; i += 1) { + comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); + } + + // This is based on John Freeman's implementation. + cursor = 0; + traverse(tree, { + enter: function (node) { + var comment; + + while (cursor < comments.length) { + comment = comments[cursor]; + if (comment.extendedRange[1] > node.range[0]) { + break; + } + + if (comment.extendedRange[1] === node.range[0]) { + if (!node.leadingComments) { + node.leadingComments = []; + } + node.leadingComments.push(comment); + comments.splice(cursor, 1); + } else { + cursor += 1; + } + } + + // already out of owned node + if (cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + cursor = 0; + traverse(tree, { + leave: function (node) { + var comment; + + while (cursor < comments.length) { + comment = comments[cursor]; + if (node.range[1] < comment.extendedRange[0]) { + break; + } + + if (node.range[1] === comment.extendedRange[0]) { + if (!node.trailingComments) { + node.trailingComments = []; + } + node.trailingComments.push(comment); + comments.splice(cursor, 1); + } else { + cursor += 1; + } + } + + // already out of owned node + if (cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + return tree; + } + + exports.version = __webpack_require__(35464)/* .version */ .i8; + exports.Syntax = Syntax; + exports.traverse = traverse; + exports.replace = replace; + exports.attachComments = attachComments; + exports.VisitorKeys = VisitorKeys; + exports.VisitorOption = VisitorOption; + exports.Controller = Controller; + exports.cloneEnvironment = function () { return clone({}); }; + + return exports; +}(exports)); +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 67913: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +/** + * Local dependencies + */ + +var compilers = __webpack_require__(44102); +var parsers = __webpack_require__(97129); + +/** + * Module dependencies + */ + +var debug = __webpack_require__(31185)('expand-brackets'); +var extend = __webpack_require__(28727); +var Snapdragon = __webpack_require__(79285); +var toRegex = __webpack_require__(51279); + +/** + * Parses the given POSIX character class `pattern` and returns a + * string that can be used for creating regular expressions for matching. + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} + * @api public + */ + +function brackets(pattern, options) { + debug('initializing from <%s>', __filename); + var res = brackets.create(pattern, options); + return res.output; +} + +/** + * Takes an array of strings and a POSIX character class pattern, and returns a new + * array with only the strings that matched the pattern. + * + * ```js + * var brackets = require('expand-brackets'); + * console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]')); + * //=> ['a'] + * + * console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]+')); + * //=> ['a', 'ab'] + * ``` + * @param {Array} `arr` Array of strings to match + * @param {String} `pattern` POSIX character class pattern(s) + * @param {Object} `options` + * @return {Array} + * @api public + */ + +brackets.match = function(arr, pattern, options) { + arr = [].concat(arr); + var opts = extend({}, options); + var isMatch = brackets.matcher(pattern, opts); + var len = arr.length; + var idx = -1; + var res = []; + + while (++idx < len) { + var ele = arr[idx]; + if (isMatch(ele)) { + res.push(ele); + } + } + + if (res.length === 0) { + if (opts.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + + if (opts.nonull === true || opts.nullglob === true) { + return [pattern.split('\\').join('')]; + } + } + return res; +}; + +/** + * Returns true if the specified `string` matches the given + * brackets `pattern`. + * + * ```js + * var brackets = require('expand-brackets'); + * + * console.log(brackets.isMatch('a.a', '[[:alpha:]].[[:alpha:]]')); + * //=> true + * console.log(brackets.isMatch('1.2', '[[:alpha:]].[[:alpha:]]')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Poxis pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +brackets.isMatch = function(str, pattern, options) { + return brackets.matcher(pattern, options)(str); +}; + +/** + * Takes a POSIX character class pattern and returns a matcher function. The returned + * function takes the string to match as its only argument. + * + * ```js + * var brackets = require('expand-brackets'); + * var isMatch = brackets.matcher('[[:lower:]].[[:upper:]]'); + * + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.A')); + * //=> true + * ``` + * @param {String} `pattern` Poxis pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +brackets.matcher = function(pattern, options) { + var re = brackets.makeRe(pattern, options); + return function(str) { + return re.test(str); + }; +}; + +/** + * Create a regular expression from the given `pattern`. + * + * ```js + * var brackets = require('expand-brackets'); + * var re = brackets.makeRe('[[:alpha:]]'); + * console.log(re); + * //=> /^(?:[a-zA-Z])$/ + * ``` + * @param {String} `pattern` The pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +brackets.makeRe = function(pattern, options) { + var res = brackets.create(pattern, options); + var opts = extend({strictErrors: false}, options); + return toRegex(res.output, opts); +}; + +/** + * Parses the given POSIX character class `pattern` and returns an object + * with the compiled `output` and optional source `map`. + * + * ```js + * var brackets = require('expand-brackets'); + * console.log(brackets('[[:alpha:]]')); + * // { options: { source: 'string' }, + * // input: '[[:alpha:]]', + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // not: [Function], + * // escape: [Function], + * // text: [Function], + * // posix: [Function], + * // bracket: [Function], + * // 'bracket.open': [Function], + * // 'bracket.inner': [Function], + * // 'bracket.literal': [Function], + * // 'bracket.close': [Function] }, + * // output: '[a-zA-Z]', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: [ [Object], [Object], [Object] ] }, + * // parsingErrors: [] } + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} + * @api public + */ + +brackets.create = function(pattern, options) { + var snapdragon = (options && options.snapdragon) || new Snapdragon(options); + compilers(snapdragon); + parsers(snapdragon); + + var ast = snapdragon.parse(pattern, options); + ast.input = pattern; + var res = snapdragon.compile(ast, options); + res.input = pattern; + return res; +}; + +/** + * Expose `brackets` constructor, parsers and compilers + */ + +brackets.compilers = compilers; +brackets.parsers = parsers; + +/** + * Expose `brackets` + * @type {Function} + */ + +module.exports = brackets; + + +/***/ }), + +/***/ 44102: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var posix = __webpack_require__(88412); + +module.exports = function(brackets) { + brackets.compiler + + /** + * Escaped characters + */ + + .set('escape', function(node) { + return this.emit('\\' + node.val.replace(/^\\/, ''), node); + }) + + /** + * Text + */ + + .set('text', function(node) { + return this.emit(node.val.replace(/([{}])/g, '\\$1'), node); + }) + + /** + * POSIX character classes + */ + + .set('posix', function(node) { + if (node.val === '[::]') { + return this.emit('\\[::\\]', node); + } + + var val = posix[node.inner]; + if (typeof val === 'undefined') { + val = '[' + node.inner + ']'; + } + return this.emit(val, node); + }) + + /** + * Non-posix brackets + */ + + .set('bracket', function(node) { + return this.mapVisit(node.nodes); + }) + .set('bracket.open', function(node) { + return this.emit(node.val, node); + }) + .set('bracket.inner', function(node) { + var inner = node.val; + + if (inner === '[' || inner === ']') { + return this.emit('\\' + node.val, node); + } + if (inner === '^]') { + return this.emit('^\\]', node); + } + if (inner === '^') { + return this.emit('^', node); + } + + if (/-/.test(inner) && !/(\d-\d|\w-\w)/.test(inner)) { + inner = inner.split('-').join('\\-'); + } + + var isNegated = inner.charAt(0) === '^'; + // add slashes to negated brackets, per spec + if (isNegated && inner.indexOf('/') === -1) { + inner += '/'; + } + if (isNegated && inner.indexOf('.') === -1) { + inner += '.'; + } + + // don't unescape `0` (octal literal) + inner = inner.replace(/\\([1-9])/g, '$1'); + return this.emit(inner, node); + }) + .set('bracket.close', function(node) { + var val = node.val.replace(/^\\/, ''); + if (node.parent.escaped === true) { + return this.emit('\\' + val, node); + } + return this.emit(val, node); + }); +}; + + +/***/ }), + +/***/ 97129: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(34467); +var define = __webpack_require__(5477); + +/** + * Text regex + */ + +var TEXT_REGEX = '(\\[(?=.*\\])|\\])+'; +var not = utils.createRegex(TEXT_REGEX); + +/** + * Brackets parsers + */ + +function parsers(brackets) { + brackets.state = brackets.state || {}; + brackets.parser.sets.bracket = brackets.parser.sets.bracket || []; + brackets.parser + + .capture('escape', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^\\(.)/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[0] + }); + }) + + /** + * Text parser + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + return pos({ + type: 'text', + val: m[0] + }); + }) + + /** + * POSIX character classes: "[[:alpha:][:digits:]]" + */ + + .capture('posix', function() { + var pos = this.position(); + var m = this.match(/^\[:(.*?):\](?=.*\])/); + if (!m) return; + + var inside = this.isInside('bracket'); + if (inside) { + brackets.posix++; + } + + return pos({ + type: 'posix', + insideBracket: inside, + inner: m[1], + val: m[0] + }); + }) + + /** + * Bracket (noop) + */ + + .capture('bracket', function() {}) + + /** + * Open: '[' + */ + + .capture('bracket.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\[(?=.*\])/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + if (parsed.slice(-1) === '\\' && !this.isInside('bracket')) { + last.val = last.val.slice(0, last.val.length - 1); + return pos({ + type: 'escape', + val: m[0] + }); + } + + var open = pos({ + type: 'bracket.open', + val: m[0] + }); + + if (last.type === 'bracket.open' || this.isInside('bracket')) { + open.val = '\\' + open.val; + open.type = 'bracket.inner'; + open.escaped = true; + return open; + } + + var node = pos({ + type: 'bracket', + nodes: [open] + }); + + define(node, 'parent', prev); + define(open, 'parent', node); + this.push('bracket', node); + prev.nodes.push(node); + }) + + /** + * Bracket text + */ + + .capture('bracket.inner', function() { + if (!this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + var next = this.input.charAt(0); + var val = m[0]; + + var node = pos({ + type: 'bracket.inner', + val: val + }); + + if (val === '\\\\') { + return node; + } + + var first = val.charAt(0); + var last = val.slice(-1); + + if (first === '!') { + val = '^' + val.slice(1); + } + + if (last === '\\' || (val === '^' && next === ']')) { + val += this.input[0]; + this.consume(1); + } + + node.val = val; + return node; + }) + + /** + * Close: ']' + */ + + .capture('bracket.close', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\]/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + if (parsed.slice(-1) === '\\' && !this.isInside('bracket')) { + last.val = last.val.slice(0, last.val.length - 1); + + return pos({ + type: 'escape', + val: m[0] + }); + } + + var node = pos({ + type: 'bracket.close', + rest: this.input, + val: m[0] + }); + + if (last.type === 'bracket.open') { + node.type = 'bracket.inner'; + node.escaped = true; + return node; + } + + var bracket = this.pop('bracket'); + if (!this.isType(bracket, 'bracket')) { + if (this.options.strict) { + throw new Error('missing opening "["'); + } + node.type = 'bracket.inner'; + node.escaped = true; + return node; + } + + bracket.nodes.push(node); + define(node, 'parent', bracket); + }); +} + +/** + * Brackets parsers + */ + +module.exports = parsers; + +/** + * Expose text regex + */ + +module.exports.TEXT_REGEX = TEXT_REGEX; + + +/***/ }), + +/***/ 34467: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +var toRegex = __webpack_require__(51279); +var regexNot = __webpack_require__(30931); +var cached; + +/** + * Get the last element from `array` + * @param {Array} `array` + * @return {*} + */ + +exports.last = function(arr) { + return arr[arr.length - 1]; +}; + +/** + * Create and cache regex to use for text nodes + */ + +exports.createRegex = function(pattern, include) { + if (cached) return cached; + var opts = {contains: true, strictClose: false}; + var not = regexNot.create(pattern, opts); + var re; + + if (typeof include === 'string') { + re = toRegex('^(?:' + include + '|' + not + ')', opts); + } else { + re = toRegex(not, opts); + } + + return (cached = re); +}; + + +/***/ }), + +/***/ 28727: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isObject = __webpack_require__(18493); + +module.exports = function extend(o/*, objects*/) { + if (!isObject(o)) { o = {}; } + + var len = arguments.length; + for (var i = 1; i < len; i++) { + var obj = arguments[i]; + + if (isObject(obj)) { + assign(o, obj); + } + } + return o; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + + +/***/ }), + +/***/ 66675: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +/** + * Module dependencies + */ + +var extend = __webpack_require__(28727); +var unique = __webpack_require__(19009); +var toRegex = __webpack_require__(51279); + +/** + * Local dependencies + */ + +var compilers = __webpack_require__(90752); +var parsers = __webpack_require__(32269); +var Extglob = __webpack_require__(31052); +var utils = __webpack_require__(91439); +var MAX_LENGTH = 1024 * 64; + +/** + * Convert the given `extglob` pattern into a regex-compatible string. Returns + * an object with the compiled result and the parsed AST. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob('*.!(*a)')); + * //=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?' + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {String} + * @api public + */ + +function extglob(pattern, options) { + return extglob.create(pattern, options).output; +} + +/** + * Takes an array of strings and an extglob pattern and returns a new + * array that contains only the strings that match the pattern. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob.match(['a.a', 'a.b', 'a.c'], '*.!(*a)')); + * //=> ['a.b', 'a.c'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Extglob pattern + * @param {Object} `options` + * @return {Array} Returns an array of matches + * @api public + */ + +extglob.match = function(list, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + list = utils.arrayify(list); + var isMatch = extglob.matcher(pattern, options); + var len = list.length; + var idx = -1; + var matches = []; + + while (++idx < len) { + var ele = list[idx]; + + if (isMatch(ele)) { + matches.push(ele); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [pattern.split('\\').join('')]; + } + } + + return options.nodupes !== false ? unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given + * extglob `pattern`. + * + * ```js + * var extglob = require('extglob'); + * + * console.log(extglob.isMatch('a.a', '*.!(*a)')); + * //=> false + * console.log(extglob.isMatch('a.b', '*.!(*a)')); + * //=> true + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Extglob pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +extglob.isMatch = function(str, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + if (pattern === str) { + return true; + } + + if (pattern === '' || pattern === ' ' || pattern === '.') { + return pattern === str; + } + + var isMatch = utils.memoize('isMatch', pattern, options, extglob.matcher); + return isMatch(str); +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar to `.isMatch` but + * the pattern can match any part of the string. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(extglob.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +extglob.contains = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + if (pattern === '' || pattern === ' ' || pattern === '.') { + return pattern === str; + } + + var opts = extend({}, options, {contains: true}); + opts.strictClose = false; + opts.strictOpen = false; + return extglob.isMatch(str, pattern, opts); +}; + +/** + * Takes an extglob pattern and returns a matcher function. The returned + * function takes the string to match as its only argument. + * + * ```js + * var extglob = require('extglob'); + * var isMatch = extglob.matcher('*.!(*a)'); + * + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Extglob pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +extglob.matcher = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + function matcher() { + var re = extglob.makeRe(pattern, options); + return function(str) { + return re.test(str); + }; + } + + return utils.memoize('matcher', pattern, options, matcher); +}; + +/** + * Convert the given `extglob` pattern into a regex-compatible string. Returns + * an object with the compiled result and the parsed AST. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob.create('*.!(*a)').output); + * //=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?' + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +extglob.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + function create() { + var ext = new Extglob(options); + var ast = ext.parse(pattern, options); + return ext.compile(ast, options); + } + + return utils.memoize('create', pattern, options, create); +}; + +/** + * Returns an array of matches captured by `pattern` in `string`, or `null` + * if the pattern did not match. + * + * ```js + * var extglob = require('extglob'); + * extglob.capture(pattern, string[, options]); + * + * console.log(extglob.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(extglob.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +extglob.capture = function(pattern, str, options) { + var re = extglob.makeRe(pattern, extend({capture: true}, options)); + + function match() { + return function(string) { + var match = re.exec(string); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = utils.memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given `pattern` and `options`. + * + * ```js + * var extglob = require('extglob'); + * var re = extglob.makeRe('*.!(*a)'); + * console.log(re); + * //=> /^[^\/]*?\.(?![^\/]*?a)[^\/]*?$/ + * ``` + * @param {String} `pattern` The pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +extglob.makeRe = function(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var opts = extend({strictErrors: false}, options); + if (opts.strictErrors === true) opts.strict = true; + var res = extglob.create(pattern, opts); + return toRegex(res.output, opts); + } + + var regex = utils.memoize('makeRe', pattern, options, makeRe); + if (regex.source.length > MAX_LENGTH) { + throw new SyntaxError('potentially malicious regex detected'); + } + + return regex; +}; + +/** + * Cache + */ + +extglob.cache = utils.cache; +extglob.clearCache = function() { + extglob.cache.__data__ = {}; +}; + +/** + * Expose `Extglob` constructor, parsers and compilers + */ + +extglob.Extglob = Extglob; +extglob.compilers = compilers; +extglob.parsers = parsers; + +/** + * Expose `extglob` + * @type {Function} + */ + +module.exports = extglob; + + +/***/ }), + +/***/ 90752: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var brackets = __webpack_require__(67913); + +/** + * Extglob compilers + */ + +module.exports = function(extglob) { + function star() { + if (typeof extglob.options.star === 'function') { + return extglob.options.star.apply(this, arguments); + } + if (typeof extglob.options.star === 'string') { + return extglob.options.star; + } + return '.*?'; + } + + /** + * Use `expand-brackets` compilers + */ + + extglob.use(brackets.compilers); + extglob.compiler + + /** + * Escaped: "\\*" + */ + + .set('escape', function(node) { + return this.emit(node.val, node); + }) + + /** + * Dot: "." + */ + + .set('dot', function(node) { + return this.emit('\\' + node.val, node); + }) + + /** + * Question mark: "?" + */ + + .set('qmark', function(node) { + var val = '[^\\\\/.]'; + var prev = this.prev(); + + if (node.parsed.slice(-1) === '(') { + var ch = node.rest.charAt(0); + if (ch !== '!' && ch !== '=' && ch !== ':') { + return this.emit(val, node); + } + return this.emit(node.val, node); + } + + if (prev.type === 'text' && prev.val) { + return this.emit(val, node); + } + + if (node.val.length > 1) { + val += '{' + node.val.length + '}'; + } + return this.emit(val, node); + }) + + /** + * Plus: "+" + */ + + .set('plus', function(node) { + var prev = node.parsed.slice(-1); + if (prev === ']' || prev === ')') { + return this.emit(node.val, node); + } + var ch = this.output.slice(-1); + if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) { + return this.emit('\\+', node); + } + if (/\w/.test(ch) && !node.inside) { + return this.emit('+\\+?', node); + } + return this.emit('+', node); + }) + + /** + * Star: "*" + */ + + .set('star', function(node) { + var prev = this.prev(); + var prefix = prev.type !== 'text' && prev.type !== 'escape' + ? '(?!\\.)' + : ''; + + return this.emit(prefix + star.call(this, node), node); + }) + + /** + * Parens + */ + + .set('paren', function(node) { + return this.mapVisit(node.nodes); + }) + .set('paren.open', function(node) { + var capture = this.options.capture ? '(' : ''; + + switch (node.parent.prefix) { + case '!': + case '^': + return this.emit(capture + '(?:(?!(?:', node); + case '*': + case '+': + case '?': + case '@': + return this.emit(capture + '(?:', node); + default: { + var val = node.val; + if (this.options.bash === true) { + val = '\\' + val; + } else if (!this.options.capture && val === '(' && node.parent.rest[0] !== '?') { + val += '?:'; + } + + return this.emit(val, node); + } + } + }) + .set('paren.close', function(node) { + var capture = this.options.capture ? ')' : ''; + + switch (node.prefix) { + case '!': + case '^': + var prefix = /^(\)|$)/.test(node.rest) ? '$' : ''; + var str = star.call(this, node); + + // if the extglob has a slash explicitly defined, we know the user wants + // to match slashes, so we need to ensure the "star" regex allows for it + if (node.parent.hasSlash && !this.options.star && this.options.slash !== false) { + str = '.*?'; + } + + return this.emit(prefix + ('))' + str + ')') + capture, node); + case '*': + case '+': + case '?': + return this.emit(')' + node.prefix + capture, node); + case '@': + return this.emit(')' + capture, node); + default: { + var val = (this.options.bash === true ? '\\' : '') + ')'; + return this.emit(val, node); + } + } + }) + + /** + * Text + */ + + .set('text', function(node) { + var val = node.val.replace(/[\[\]]/g, '\\$&'); + return this.emit(val, node); + }); +}; + + +/***/ }), + +/***/ 31052: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +/** + * Module dependencies + */ + +var Snapdragon = __webpack_require__(79285); +var define = __webpack_require__(62250); +var extend = __webpack_require__(28727); + +/** + * Local dependencies + */ + +var compilers = __webpack_require__(90752); +var parsers = __webpack_require__(32269); + +/** + * Customize Snapdragon parser and renderer + */ + +function Extglob(options) { + this.options = extend({source: 'extglob'}, options); + this.snapdragon = this.options.snapdragon || new Snapdragon(this.options); + this.snapdragon.patterns = this.snapdragon.patterns || {}; + this.compiler = this.snapdragon.compiler; + this.parser = this.snapdragon.parser; + + compilers(this.snapdragon); + parsers(this.snapdragon); + + /** + * Override Snapdragon `.parse` method + */ + + define(this.snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.apply(this, arguments); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strict !== true) { + var node = last.nodes[0]; + node.val = '\\' + node.val; + var sibling = node.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + + // add non-enumerable parser reference + define(parsed, 'parser', this.parser); + return parsed; + }); + + /** + * Decorate `.parse` method + */ + + define(this, 'parse', function(ast, options) { + return this.snapdragon.parse.apply(this.snapdragon, arguments); + }); + + /** + * Decorate `.compile` method + */ + + define(this, 'compile', function(ast, options) { + return this.snapdragon.compile.apply(this.snapdragon, arguments); + }); + +} + +/** + * Expose `Extglob` + */ + +module.exports = Extglob; + + +/***/ }), + +/***/ 32269: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var brackets = __webpack_require__(67913); +var define = __webpack_require__(62250); +var utils = __webpack_require__(91439); + +/** + * Characters to use in text regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var TEXT_REGEX = '([!@*?+]?\\(|\\)|[*?.+\\\\]|\\[:?(?=.*\\])|:?\\])+'; +var not = utils.createRegex(TEXT_REGEX); + +/** + * Extglob parsers + */ + +function parsers(extglob) { + extglob.state = extglob.state || {}; + + /** + * Use `expand-brackets` parsers + */ + + extglob.use(brackets.parsers); + extglob.parser.sets.paren = extglob.parser.sets.paren || []; + extglob.parser + + /** + * Extglob open: "*(" + */ + + .capture('paren.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^([!@*?+])?\(/); + if (!m) return; + + var prev = this.prev(); + var prefix = m[1]; + var val = m[0]; + + var open = pos({ + type: 'paren.open', + parsed: parsed, + val: val + }); + + var node = pos({ + type: 'paren', + prefix: prefix, + nodes: [open] + }); + + // if nested negation extglobs, just cancel them out to simplify + if (prefix === '!' && prev.type === 'paren' && prev.prefix === '!') { + prev.prefix = '@'; + node.prefix = '@'; + } + + define(node, 'rest', this.input); + define(node, 'parsed', parsed); + define(node, 'parent', prev); + define(open, 'parent', node); + + this.push('paren', node); + prev.nodes.push(node); + }) + + /** + * Extglob close: ")" + */ + + .capture('paren.close', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\)/); + if (!m) return; + + var parent = this.pop('paren'); + var node = pos({ + type: 'paren.close', + rest: this.input, + parsed: parsed, + val: m[0] + }); + + if (!this.isType(parent, 'paren')) { + if (this.options.strict) { + throw new Error('missing opening paren: "("'); + } + node.escaped = true; + return node; + } + + node.prefix = parent.prefix; + parent.nodes.push(node); + define(node, 'parent', parent); + }) + + /** + * Escape: "\\." + */ + + .capture('escape', function() { + var pos = this.position(); + var m = this.match(/^\\(.)/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[0], + ch: m[1] + }); + }) + + /** + * Question marks: "?" + */ + + .capture('qmark', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\?+(?!\()/); + if (!m) return; + extglob.state.metachar = true; + return pos({ + type: 'qmark', + rest: this.input, + parsed: parsed, + val: m[0] + }); + }) + + /** + * Character parsers + */ + + .capture('star', /^\*(?!\()/) + .capture('plus', /^\+(?!\()/) + .capture('dot', /^\./) + .capture('text', not); +}; + +/** + * Expose text regex string + */ + +module.exports.TEXT_REGEX = TEXT_REGEX; + +/** + * Extglob parsers + */ + +module.exports = parsers; + + +/***/ }), + +/***/ 91439: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var regex = __webpack_require__(30931); +var Cache = __webpack_require__(49908); + +/** + * Utils + */ + +var utils = module.exports; +var cache = utils.cache = new Cache(); + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (!Array.isArray(val)) { + return [val]; + } + return val; +}; + +/** + * Memoize a generated regex or function + */ + +utils.memoize = function(type, pattern, options, fn) { + var key = utils.createKey(type + pattern, options); + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + if (options && options.cache === false) { + return val; + } + + cache.set(type, key, val); + return val; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + var key = pattern; + if (typeof options === 'undefined') { + return key; + } + for (var prop in options) { + key += ';' + prop + '=' + String(options[prop]); + } + return key; +}; + +/** + * Create the regex to use for matching text + */ + +utils.createRegex = function(str) { + var opts = {contains: true, strictClose: false}; + return regex(str, opts); +}; + + +/***/ }), + +/***/ 62250: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * define-property + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isDescriptor = __webpack_require__(44133); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; + + +/***/ }), + +/***/ 63933: +/***/ (function(module) { + +"use strict"; + + +// do not edit .js files directly - edit src/index.jst + + + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + if (a.constructor !== b.constructor) return false; + + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + + + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + var key = keys[i]; + + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + // true if both NaN, false otherwise + return a!==a && b!==b; +}; + + +/***/ }), + +/***/ 73600: +/***/ (function(module) { + +"use strict"; + + +module.exports = function (data, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (node) { + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + if (node === undefined) return; + if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; + if (typeof node !== 'object') return JSON.stringify(node); + + var i, out; + if (Array.isArray(node)) { + out = '['; + for (i = 0; i < node.length; i++) { + if (i) out += ','; + out += stringify(node[i]) || 'null'; + } + return out + ']'; + } + + if (node === null) return 'null'; + + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ''; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node[key]); + + if (!value) continue; + if (out) out += ','; + out += JSON.stringify(key) + ':' + value; + } + seen.splice(seenIndex, 1); + return '{' + out + '}'; + })(data); +}; + + +/***/ }), + +/***/ 35955: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * fill-range + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var util = __webpack_require__(31669); +var isNumber = __webpack_require__(87218); +var extend = __webpack_require__(28727); +var repeat = __webpack_require__(6332); +var toRegex = __webpack_require__(1353); + +/** + * Return a range of numbers or letters. + * + * @param {String} `start` Start of the range + * @param {String} `stop` End of the range + * @param {String} `step` Increment or decrement to use. + * @param {Function} `fn` Custom function to modify each element in the range. + * @return {Array} + */ + +function fillRange(start, stop, step, options) { + if (typeof start === 'undefined') { + return []; + } + + if (typeof stop === 'undefined' || start === stop) { + // special case, for handling negative zero + var isString = typeof start === 'string'; + if (isNumber(start) && !toNumber(start)) { + return [isString ? '0' : 0]; + } + return [start]; + } + + if (typeof step !== 'number' && typeof step !== 'string') { + options = step; + step = undefined; + } + + if (typeof options === 'function') { + options = { transform: options }; + } + + var opts = extend({step: step}, options); + if (opts.step && !isValidNumber(opts.step)) { + if (opts.strictRanges === true) { + throw new TypeError('expected options.step to be a number'); + } + return []; + } + + opts.isNumber = isValidNumber(start) && isValidNumber(stop); + if (!opts.isNumber && !isValid(start, stop)) { + if (opts.strictRanges === true) { + throw new RangeError('invalid range arguments: ' + util.inspect([start, stop])); + } + return []; + } + + opts.isPadded = isPadded(start) || isPadded(stop); + opts.toString = opts.stringify + || typeof opts.step === 'string' + || typeof start === 'string' + || typeof stop === 'string' + || !opts.isNumber; + + if (opts.isPadded) { + opts.maxLength = Math.max(String(start).length, String(stop).length); + } + + // support legacy minimatch/fill-range options + if (typeof opts.optimize === 'boolean') opts.toRegex = opts.optimize; + if (typeof opts.makeRe === 'boolean') opts.toRegex = opts.makeRe; + return expand(start, stop, opts); +} + +function expand(start, stop, options) { + var a = options.isNumber ? toNumber(start) : start.charCodeAt(0); + var b = options.isNumber ? toNumber(stop) : stop.charCodeAt(0); + + var step = Math.abs(toNumber(options.step)) || 1; + if (options.toRegex && step === 1) { + return toRange(a, b, start, stop, options); + } + + var zero = {greater: [], lesser: []}; + var asc = a < b; + var arr = new Array(Math.round((asc ? b - a : a - b) / step)); + var idx = 0; + + while (asc ? a <= b : a >= b) { + var val = options.isNumber ? a : String.fromCharCode(a); + if (options.toRegex && (val >= 0 || !options.isNumber)) { + zero.greater.push(val); + } else { + zero.lesser.push(Math.abs(val)); + } + + if (options.isPadded) { + val = zeros(val, options); + } + + if (options.toString) { + val = String(val); + } + + if (typeof options.transform === 'function') { + arr[idx++] = options.transform(val, a, b, step, idx, arr, options); + } else { + arr[idx++] = val; + } + + if (asc) { + a += step; + } else { + a -= step; + } + } + + if (options.toRegex === true) { + return toSequence(arr, zero, options); + } + return arr; +} + +function toRange(a, b, start, stop, options) { + if (options.isPadded) { + return toRegex(start, stop, options); + } + + if (options.isNumber) { + return toRegex(Math.min(a, b), Math.max(a, b), options); + } + + var start = String.fromCharCode(Math.min(a, b)); + var stop = String.fromCharCode(Math.max(a, b)); + return '[' + start + '-' + stop + ']'; +} + +function toSequence(arr, zeros, options) { + var greater = '', lesser = ''; + if (zeros.greater.length) { + greater = zeros.greater.join('|'); + } + if (zeros.lesser.length) { + lesser = '-(' + zeros.lesser.join('|') + ')'; + } + var res = greater && lesser + ? greater + '|' + lesser + : greater || lesser; + + if (options.capture) { + return '(' + res + ')'; + } + return res; +} + +function zeros(val, options) { + if (options.isPadded) { + var str = String(val); + var len = str.length; + var dash = ''; + if (str.charAt(0) === '-') { + dash = '-'; + str = str.slice(1); + } + var diff = options.maxLength - len; + var pad = repeat('0', diff); + val = (dash + pad + str); + } + if (options.stringify) { + return String(val); + } + return val; +} + +function toNumber(val) { + return Number(val) || 0; +} + +function isPadded(str) { + return /^-?0\d/.test(str); +} + +function isValid(min, max) { + return (isValidNumber(min) || isValidLetter(min)) + && (isValidNumber(max) || isValidLetter(max)); +} + +function isValidLetter(ch) { + return typeof ch === 'string' && ch.length === 1 && /^\w+$/.test(ch); +} + +function isValidNumber(n) { + return isNumber(n) && !/\./.test(n); +} + +/** + * Expose `fillRange` + * @type {Function} + */ + +module.exports = fillRange; + + +/***/ }), + +/***/ 43086: +/***/ (function(module) { + +"use strict"; +/*! + * for-in + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +module.exports = function forIn(obj, fn, thisArg) { + for (var key in obj) { + if (fn.call(thisArg, obj[key], key, obj) === false) { + break; + } + } +}; + + +/***/ }), + +/***/ 49908: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*! + * fragment-cache + * + * Copyright (c) 2016-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var MapCache = __webpack_require__(4337); + +/** + * Create a new `FragmentCache` with an optional object to use for `caches`. + * + * ```js + * var fragment = new FragmentCache(); + * ``` + * @name FragmentCache + * @param {String} `cacheName` + * @return {Object} Returns the [map-cache][] instance. + * @api public + */ + +function FragmentCache(caches) { + this.caches = caches || {}; +} + +/** + * Prototype + */ + +FragmentCache.prototype = { + + /** + * Get cache `name` from the `fragment.caches` object. Creates a new + * `MapCache` if it doesn't already exist. + * + * ```js + * var cache = fragment.cache('files'); + * console.log(fragment.caches.hasOwnProperty('files')); + * //=> true + * ``` + * @name .cache + * @param {String} `cacheName` + * @return {Object} Returns the [map-cache][] instance. + * @api public + */ + + cache: function(cacheName) { + return this.caches[cacheName] || (this.caches[cacheName] = new MapCache()); + }, + + /** + * Set a value for property `key` on cache `name` + * + * ```js + * fragment.set('files', 'somefile.js', new File({path: 'somefile.js'})); + * ``` + * @name .set + * @param {String} `name` + * @param {String} `key` Property name to set + * @param {any} `val` The value of `key` + * @return {Object} The cache instance for chaining + * @api public + */ + + set: function(cacheName, key, val) { + var cache = this.cache(cacheName); + cache.set(key, val); + return cache; + }, + + /** + * Returns true if a non-undefined value is set for `key` on fragment cache `name`. + * + * ```js + * var cache = fragment.cache('files'); + * cache.set('somefile.js'); + * + * console.log(cache.has('somefile.js')); + * //=> true + * + * console.log(cache.has('some-other-file.js')); + * //=> false + * ``` + * @name .has + * @param {String} `name` Cache name + * @param {String} `key` Optionally specify a property to check for on cache `name` + * @return {Boolean} + * @api public + */ + + has: function(cacheName, key) { + return typeof this.get(cacheName, key) !== 'undefined'; + }, + + /** + * Get `name`, or if specified, the value of `key`. Invokes the [cache]() method, + * so that cache `name` will be created it doesn't already exist. If `key` is not passed, + * the entire cache (`name`) is returned. + * + * ```js + * var Vinyl = require('vinyl'); + * var cache = fragment.cache('files'); + * cache.set('somefile.js', new Vinyl({path: 'somefile.js'})); + * console.log(cache.get('somefile.js')); + * //=> + * ``` + * @name .get + * @param {String} `name` + * @return {Object} Returns cache `name`, or the value of `key` if specified + * @api public + */ + + get: function(name, key) { + var cache = this.cache(name); + if (typeof key === 'string') { + return cache.get(key); + } + return cache; + } +}; + +/** + * Expose `FragmentCache` + */ + +exports = module.exports = FragmentCache; + + +/***/ }), + +/***/ 89304: +/***/ (function(module) { + +/*! + * get-value + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function(obj, prop, a, b, c) { + if (!isObject(obj) || !prop) { + return obj; + } + + prop = toString(prop); + + // allowing for multiple properties to be passed as + // a string or array, but much faster (3-4x) than doing + // `[].slice.call(arguments)` + if (a) prop += '.' + toString(a); + if (b) prop += '.' + toString(b); + if (c) prop += '.' + toString(c); + + if (prop in obj) { + return obj[prop]; + } + + var segs = prop.split('.'); + var len = segs.length; + var i = -1; + + while (obj && (++i < len)) { + var key = segs[i]; + while (key[key.length - 1] === '\\') { + key = key.slice(0, -1) + '.' + segs[++i]; + } + obj = obj[key]; + } + return obj; +}; + +function isObject(val) { + return val !== null && (typeof val === 'object' || typeof val === 'function'); +} + +function toString(val) { + if (!val) return ''; + if (Array.isArray(val)) { + return val.join('.'); + } + return val; +} + + +/***/ }), + +/***/ 95581: +/***/ (function(module) { + +"use strict"; + + +module.exports = clone + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: obj.__proto__ } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} + + +/***/ }), + +/***/ 82161: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fs = __webpack_require__(35747) +var polyfills = __webpack_require__(60034) +var legacy = __webpack_require__(7077) +var clone = __webpack_require__(95581) + +var util = __webpack_require__(31669) + +/* istanbul ignore next - node 0.x polyfill */ +var gracefulQueue +var previousSymbol + +/* istanbul ignore else - node 0.x polyfill */ +if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { + gracefulQueue = Symbol.for('graceful-fs.queue') + // This is used in testing by future versions + previousSymbol = Symbol.for('graceful-fs.previous') +} else { + gracefulQueue = '___graceful-fs.queue' + previousSymbol = '___graceful-fs.previous' +} + +function noop () {} + +function publishQueue(context, queue) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue + } + }) +} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +// Once time initialization +if (!fs[gracefulQueue]) { + // This queue can be shared by multiple loaded instances + var queue = global[gracefulQueue] || [] + publishQueue(fs, queue) + + // Patch fs.close/closeSync to shared queue version, because we need + // to retry() whenever a close happens *anywhere* in the program. + // This is essential when multiple graceful-fs instances are + // in play at the same time. + fs.close = (function (fs$close) { + function close (fd, cb) { + return fs$close.call(fs, fd, function (err) { + // This function uses the graceful-fs shared queue + if (!err) { + retry() + } + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) + } + + Object.defineProperty(close, previousSymbol, { + value: fs$close + }) + return close + })(fs.close) + + fs.closeSync = (function (fs$closeSync) { + function closeSync (fd) { + // This function uses the graceful-fs shared queue + fs$closeSync.apply(fs, arguments) + retry() + } + + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }) + return closeSync + })(fs.closeSync) + + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(fs[gracefulQueue]) + __webpack_require__(42357).equal(fs[gracefulQueue].length, 0) + }) + } +} + +if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); +} + +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; +} + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, options, cb) { + var args = [path] + if (typeof options !== 'function') { + args.push(options) + } else { + cb = options + } + args.push(go$readdir$cb) + + return go$readdir(args) + + function go$readdir$cb (err, files) { + if (files && files.sort) + files.sort() + + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [args]]) + + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + } + } + + function go$readdir (args) { + return fs$readdir.apply(fs, args) + } + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } + + var fs$WriteStream = fs.WriteStream + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } + + Object.defineProperty(fs, 'ReadStream', { + get: function () { + return ReadStream + }, + set: function (val) { + ReadStream = val + }, + enumerable: true, + configurable: true + }) + Object.defineProperty(fs, 'WriteStream', { + get: function () { + return WriteStream + }, + set: function (val) { + WriteStream = val + }, + enumerable: true, + configurable: true + }) + + // legacy names + var FileReadStream = ReadStream + Object.defineProperty(fs, 'FileReadStream', { + get: function () { + return FileReadStream + }, + set: function (val) { + FileReadStream = val + }, + enumerable: true, + configurable: true + }) + var FileWriteStream = WriteStream + Object.defineProperty(fs, 'FileWriteStream', { + get: function () { + return FileWriteStream + }, + set: function (val) { + FileWriteStream = val + }, + enumerable: true, + configurable: true + }) + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new fs.ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new fs.WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + fs[gracefulQueue].push(elem) +} + +function retry () { + var elem = fs[gracefulQueue].shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} + + +/***/ }), + +/***/ 7077: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var Stream = __webpack_require__(92413).Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} + + +/***/ }), + +/***/ 60034: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var constants = __webpack_require__(27619) + +var origCwd = process.cwd +var cwd = null + +var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform + +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +var chdir = process.chdir +process.chdir = function(d) { + cwd = null + chdir.call(process, d) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) + + fs.stat = statFix(fs.stat) + fs.fstat = statFix(fs.fstat) + fs.lstat = statFix(fs.lstat) + + fs.statSync = statFixSync(fs.statSync) + fs.fstatSync = statFixSync(fs.fstatSync) + fs.lstatSync = statFixSync(fs.lstatSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + if (cb) process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 60 seconds. + + // Set the timeout this long because some Windows Anti-Virus, such as Parity + // bit9, may lock files for up to a minute, causing npm package install + // failures. Also, take care to yield the scheduler. Windows scheduling gives + // CPU to a busy looping process, which can cause the program causing the lock + // contention to be starved of CPU by node, so the contention doesn't resolve. + if (platform === "win32") { + fs.rename = (function (fs$rename) { return function (from, to, cb) { + var start = Date.now() + var backoff = 0; + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 60000) { + setTimeout(function() { + fs.stat(to, function (stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er) + }) + }, backoff) + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er) + }) + }})(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = (function (fs$read) { + function read (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + + // This ensures `util.promisify` works as it does for native `fs.read`. + read.__proto__ = fs$read + return read + })(fs.read) + + fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) + + function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + } + + function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } + } + + function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + + function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + if (cb) cb.apply(this, arguments) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) + } + } + + function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + return stats; + } + } + + // ENOSYS means that the fs doesn't support the op. Just ignore + // that, because it doesn't matter. + // + // if there's no getuid, or if getuid() is something other + // than 0, and the error is EINVAL or EPERM, then just ignore + // it. + // + // This specific case is a silent failure in cp, install, tar, + // and most other unix tools that manage permissions. + // + // When running as root, or if other types of errors are + // encountered, then it's strict. + function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false + } +} + + +/***/ }), + +/***/ 41825: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * has-value + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var isObject = __webpack_require__(96667); +var hasValues = __webpack_require__(80455); +var get = __webpack_require__(89304); + +module.exports = function(val, prop) { + return hasValues(isObject(val) && prop ? get(val, prop) : val); +}; + + +/***/ }), + +/***/ 80455: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * has-values + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var typeOf = __webpack_require__(54329); +var isNumber = __webpack_require__(87218); + +module.exports = function hasValue(val) { + // is-number checks for NaN and other edge cases + if (isNumber(val)) { + return true; + } + + switch (typeOf(val)) { + case 'null': + case 'boolean': + case 'function': + return true; + case 'string': + case 'arguments': + return val.length !== 0; + case 'error': + return val.message !== ''; + case 'array': + var len = val.length; + if (len === 0) { + return false; + } + for (var i = 0; i < len; i++) { + if (hasValue(val[i])) { + return true; + } + } + return false; + case 'file': + case 'map': + case 'set': + return val.size !== 0; + case 'object': + var keys = Object.keys(val); + if (keys.length === 0) { + return false; + } + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (hasValue(val[key])) { + return true; + } + } + return false; + default: { + return false; + } + } +}; + + +/***/ }), + +/***/ 54329: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var isBuffer = __webpack_require__(72195); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + if (type === '[object Promise]') { + return 'promise'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + + +/***/ }), + +/***/ 2989: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +try { + var util = __webpack_require__(31669); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = __webpack_require__(97350); +} + + +/***/ }), + +/***/ 97350: +/***/ (function(module) { + +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} + + +/***/ }), + +/***/ 13121: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-accessor-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var typeOf = __webpack_require__(97458); + +// accessor descriptor properties +var accessor = { + get: 'function', + set: 'function', + configurable: 'boolean', + enumerable: 'boolean' +}; + +function isAccessorDescriptor(obj, prop) { + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (typeOf(obj) !== 'object') { + return false; + } + + if (has(obj, 'value') || has(obj, 'writable')) { + return false; + } + + if (!has(obj, 'get') || typeof obj.get !== 'function') { + return false; + } + + // tldr: it's valid to have "set" be undefined + // "set" might be undefined if `Object.getOwnPropertyDescriptor` + // was used to get the value, and only `get` was defined by the user + if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') { + return false; + } + + for (var key in obj) { + if (!accessor.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === accessor[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +function has(obj, key) { + return {}.hasOwnProperty.call(obj, key); +} + +/** + * Expose `isAccessorDescriptor` + */ + +module.exports = isAccessorDescriptor; + + +/***/ }), + +/***/ 97458: +/***/ (function(module) { + +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} + + +/***/ }), + +/***/ 72195: +/***/ (function(module) { + +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} + + +/***/ }), + +/***/ 74194: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-data-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var typeOf = __webpack_require__(82401); + +module.exports = function isDataDescriptor(obj, prop) { + // data descriptor properties + var data = { + configurable: 'boolean', + enumerable: 'boolean', + writable: 'boolean' + }; + + if (typeOf(obj) !== 'object') { + return false; + } + + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (!('value' in obj) && !('writable' in obj)) { + return false; + } + + for (var key in obj) { + if (key === 'value') continue; + + if (!data.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === data[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +}; + + +/***/ }), + +/***/ 82401: +/***/ (function(module) { + +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} + + +/***/ }), + +/***/ 44133: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var typeOf = __webpack_require__(46927); +var isAccessor = __webpack_require__(13121); +var isData = __webpack_require__(74194); + +module.exports = function isDescriptor(obj, key) { + if (typeOf(obj) !== 'object') { + return false; + } + if ('get' in obj) { + return isAccessor(obj, key); + } + return isData(obj, key); +}; + + +/***/ }), + +/***/ 46927: +/***/ (function(module) { + +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} + + +/***/ }), + +/***/ 18493: +/***/ (function(module) { + +"use strict"; +/*! + * is-extendable + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +module.exports = function isExtendable(val) { + return typeof val !== 'undefined' && val !== null + && (typeof val === 'object' || typeof val === 'function'); +}; + + +/***/ }), + +/***/ 87218: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-number + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var typeOf = __webpack_require__(48865); + +module.exports = function isNumber(num) { + var type = typeOf(num); + + if (type === 'string') { + if (!num.trim()) return false; + } else if (type !== 'number') { + return false; + } + + return (num - num + 1) >= 0; +}; + + +/***/ }), + +/***/ 81064: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isObject = __webpack_require__(96667); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; + + +/***/ }), + +/***/ 21352: +/***/ (function(module) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + + +/***/ }), + +/***/ 96667: +/***/ (function(module) { + +"use strict"; +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; + + +/***/ }), + +/***/ 48335: +/***/ (function(module) { + +"use strict"; + + +module.exports = parseJson +function parseJson (txt, reviver, context) { + context = context || 20 + try { + return JSON.parse(txt, reviver) + } catch (e) { + if (typeof txt !== 'string') { + const isEmptyArray = Array.isArray(txt) && txt.length === 0 + const errorMessage = 'Cannot parse ' + + (isEmptyArray ? 'an empty array' : String(txt)) + throw new TypeError(errorMessage) + } + const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i) + const errIdx = syntaxErr + ? +syntaxErr[1] + : e.message.match(/^Unexpected end of JSON.*/i) + ? txt.length - 1 + : null + if (errIdx != null) { + const start = errIdx <= context + ? 0 + : errIdx - context + const end = errIdx + context >= txt.length + ? txt.length + : errIdx + context + e.message += ` while parsing near '${ + start === 0 ? '' : '...' + }${txt.slice(start, end)}${ + end === txt.length ? '' : '...' + }'` + } else { + e.message += ` while parsing '${txt.slice(0, context * 2)}'` + } + throw e + } +} + + +/***/ }), + +/***/ 62437: +/***/ (function(module) { + +"use strict"; + + +var traverse = module.exports = function (schema, opts, cb) { + // Legacy support for v0.3.1 and earlier. + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + + cb = opts.cb || cb; + var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; + var post = cb.post || function() {}; + + _traverse(opts, pre, post, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + default: true, + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i j ? i : j; + var idx2 = i > j ? i2 : j2; + if(idx < 0) return path; + if(idx === idx2) return path.substr(0, idx + 1); + return path.substr(0, idx); +} + +function createLoaderObject(loader) { + var obj = { + path: null, + query: null, + options: null, + ident: null, + normal: null, + pitch: null, + raw: null, + data: null, + pitchExecuted: false, + normalExecuted: false + }; + Object.defineProperty(obj, "request", { + enumerable: true, + get: function() { + return obj.path + obj.query; + }, + set: function(value) { + if(typeof value === "string") { + var splittedRequest = splitQuery(value); + obj.path = splittedRequest[0]; + obj.query = splittedRequest[1]; + obj.options = undefined; + obj.ident = undefined; + } else { + if(!value.loader) + throw new Error("request should be a string or object with loader and object (" + JSON.stringify(value) + ")"); + obj.path = value.loader; + obj.options = value.options; + obj.ident = value.ident; + if(obj.options === null) + obj.query = ""; + else if(obj.options === undefined) + obj.query = ""; + else if(typeof obj.options === "string") + obj.query = "?" + obj.options; + else if(obj.ident) + obj.query = "??" + obj.ident; + else if(typeof obj.options === "object" && obj.options.ident) + obj.query = "??" + obj.options.ident; + else + obj.query = "?" + JSON.stringify(obj.options); + } + } + }); + obj.request = loader; + if(Object.preventExtensions) { + Object.preventExtensions(obj); + } + return obj; +} + +function runSyncOrAsync(fn, context, args, callback) { + var isSync = true; + var isDone = false; + var isError = false; // internal error + var reportedError = false; + context.async = function async() { + if(isDone) { + if(reportedError) return; // ignore + throw new Error("async(): The callback was already called."); + } + isSync = false; + return innerCallback; + }; + var innerCallback = context.callback = function() { + if(isDone) { + if(reportedError) return; // ignore + throw new Error("callback(): The callback was already called."); + } + isDone = true; + isSync = false; + try { + callback.apply(null, arguments); + } catch(e) { + isError = true; + throw e; + } + }; + try { + var result = (function LOADER_EXECUTION() { + return fn.apply(context, args); + }()); + if(isSync) { + isDone = true; + if(result === undefined) + return callback(); + if(result && typeof result === "object" && typeof result.then === "function") { + return result.then(function(r) { + callback(null, r); + }, callback); + } + return callback(null, result); + } + } catch(e) { + if(isError) throw e; + if(isDone) { + // loader is already "done", so we cannot use the callback function + // for better debugging we print the error on the console + if(typeof e === "object" && e.stack) console.error(e.stack); + else console.error(e); + return; + } + isDone = true; + reportedError = true; + callback(e); + } + +} + +function convertArgs(args, raw) { + if(!raw && Buffer.isBuffer(args[0])) + args[0] = utf8BufferToString(args[0]); + else if(raw && typeof args[0] === "string") + args[0] = new Buffer(args[0], "utf-8"); // eslint-disable-line +} + +function iteratePitchingLoaders(options, loaderContext, callback) { + // abort after last loader + if(loaderContext.loaderIndex >= loaderContext.loaders.length) + return processResource(options, loaderContext, callback); + + var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; + + // iterate + if(currentLoaderObject.pitchExecuted) { + loaderContext.loaderIndex++; + return iteratePitchingLoaders(options, loaderContext, callback); + } + + // load loader module + loadLoader(currentLoaderObject, function(err) { + if(err) { + loaderContext.cacheable(false); + return callback(err); + } + var fn = currentLoaderObject.pitch; + currentLoaderObject.pitchExecuted = true; + if(!fn) return iteratePitchingLoaders(options, loaderContext, callback); + + runSyncOrAsync( + fn, + loaderContext, [loaderContext.remainingRequest, loaderContext.previousRequest, currentLoaderObject.data = {}], + function(err) { + if(err) return callback(err); + var args = Array.prototype.slice.call(arguments, 1); + if(args.length > 0) { + loaderContext.loaderIndex--; + iterateNormalLoaders(options, loaderContext, args, callback); + } else { + iteratePitchingLoaders(options, loaderContext, callback); + } + } + ); + }); +} + +function processResource(options, loaderContext, callback) { + // set loader index to last loader + loaderContext.loaderIndex = loaderContext.loaders.length - 1; + + var resourcePath = loaderContext.resourcePath; + if(resourcePath) { + loaderContext.addDependency(resourcePath); + options.readResource(resourcePath, function(err, buffer) { + if(err) return callback(err); + options.resourceBuffer = buffer; + iterateNormalLoaders(options, loaderContext, [buffer], callback); + }); + } else { + iterateNormalLoaders(options, loaderContext, [null], callback); + } +} + +function iterateNormalLoaders(options, loaderContext, args, callback) { + if(loaderContext.loaderIndex < 0) + return callback(null, args); + + var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; + + // iterate + if(currentLoaderObject.normalExecuted) { + loaderContext.loaderIndex--; + return iterateNormalLoaders(options, loaderContext, args, callback); + } + + var fn = currentLoaderObject.normal; + currentLoaderObject.normalExecuted = true; + if(!fn) { + return iterateNormalLoaders(options, loaderContext, args, callback); + } + + convertArgs(args, currentLoaderObject.raw); + + runSyncOrAsync(fn, loaderContext, args, function(err) { + if(err) return callback(err); + + var args = Array.prototype.slice.call(arguments, 1); + iterateNormalLoaders(options, loaderContext, args, callback); + }); +} + +exports.getContext = function getContext(resource) { + var splitted = splitQuery(resource); + return dirname(splitted[0]); +}; + +exports.runLoaders = function runLoaders(options, callback) { + // read options + var resource = options.resource || ""; + var loaders = options.loaders || []; + var loaderContext = options.context || {}; + var readResource = options.readResource || readFile; + + // + var splittedResource = resource && splitQuery(resource); + var resourcePath = splittedResource ? splittedResource[0] : undefined; + var resourceQuery = splittedResource ? splittedResource[1] : undefined; + var contextDirectory = resourcePath ? dirname(resourcePath) : null; + + // execution state + var requestCacheable = true; + var fileDependencies = []; + var contextDependencies = []; + + // prepare loader objects + loaders = loaders.map(createLoaderObject); + + loaderContext.context = contextDirectory; + loaderContext.loaderIndex = 0; + loaderContext.loaders = loaders; + loaderContext.resourcePath = resourcePath; + loaderContext.resourceQuery = resourceQuery; + loaderContext.async = null; + loaderContext.callback = null; + loaderContext.cacheable = function cacheable(flag) { + if(flag === false) { + requestCacheable = false; + } + }; + loaderContext.dependency = loaderContext.addDependency = function addDependency(file) { + fileDependencies.push(file); + }; + loaderContext.addContextDependency = function addContextDependency(context) { + contextDependencies.push(context); + }; + loaderContext.getDependencies = function getDependencies() { + return fileDependencies.slice(); + }; + loaderContext.getContextDependencies = function getContextDependencies() { + return contextDependencies.slice(); + }; + loaderContext.clearDependencies = function clearDependencies() { + fileDependencies.length = 0; + contextDependencies.length = 0; + requestCacheable = true; + }; + Object.defineProperty(loaderContext, "resource", { + enumerable: true, + get: function() { + if(loaderContext.resourcePath === undefined) + return undefined; + return loaderContext.resourcePath + loaderContext.resourceQuery; + }, + set: function(value) { + var splittedResource = value && splitQuery(value); + loaderContext.resourcePath = splittedResource ? splittedResource[0] : undefined; + loaderContext.resourceQuery = splittedResource ? splittedResource[1] : undefined; + } + }); + Object.defineProperty(loaderContext, "request", { + enumerable: true, + get: function() { + return loaderContext.loaders.map(function(o) { + return o.request; + }).concat(loaderContext.resource || "").join("!"); + } + }); + Object.defineProperty(loaderContext, "remainingRequest", { + enumerable: true, + get: function() { + if(loaderContext.loaderIndex >= loaderContext.loaders.length - 1 && !loaderContext.resource) + return ""; + return loaderContext.loaders.slice(loaderContext.loaderIndex + 1).map(function(o) { + return o.request; + }).concat(loaderContext.resource || "").join("!"); + } + }); + Object.defineProperty(loaderContext, "currentRequest", { + enumerable: true, + get: function() { + return loaderContext.loaders.slice(loaderContext.loaderIndex).map(function(o) { + return o.request; + }).concat(loaderContext.resource || "").join("!"); + } + }); + Object.defineProperty(loaderContext, "previousRequest", { + enumerable: true, + get: function() { + return loaderContext.loaders.slice(0, loaderContext.loaderIndex).map(function(o) { + return o.request; + }).join("!"); + } + }); + Object.defineProperty(loaderContext, "query", { + enumerable: true, + get: function() { + var entry = loaderContext.loaders[loaderContext.loaderIndex]; + return entry.options && typeof entry.options === "object" ? entry.options : entry.query; + } + }); + Object.defineProperty(loaderContext, "data", { + enumerable: true, + get: function() { + return loaderContext.loaders[loaderContext.loaderIndex].data; + } + }); + + // finish loader context + if(Object.preventExtensions) { + Object.preventExtensions(loaderContext); + } + + var processOptions = { + resourceBuffer: null, + readResource: readResource + }; + iteratePitchingLoaders(processOptions, loaderContext, function(err, result) { + if(err) { + return callback(err, { + cacheable: requestCacheable, + fileDependencies: fileDependencies, + contextDependencies: contextDependencies + }); + } + callback(null, { + result: result, + resourceBuffer: processOptions.resourceBuffer, + cacheable: requestCacheable, + fileDependencies: fileDependencies, + contextDependencies: contextDependencies + }); + }); +}; + + +/***/ }), + +/***/ 5384: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var LoaderLoadingError = __webpack_require__(99736); + +module.exports = function loadLoader(loader, callback) { + if(typeof System === "object" && typeof System.import === "function") { + System.import(loader.path).catch(callback).then(function(module) { + loader.normal = typeof module === "function" ? module : module.default; + loader.pitch = module.pitch; + loader.raw = module.raw; + if(typeof loader.normal !== "function" && typeof loader.pitch !== "function") { + return callback(new LoaderLoadingError( + "Module '" + loader.path + "' is not a loader (must have normal or pitch function)" + )); + } + callback(); + }); + } else { + try { + var module = require(loader.path); + } catch(e) { + // it is possible for node to choke on a require if the FD descriptor + // limit has been reached. give it a chance to recover. + if(e instanceof Error && e.code === "EMFILE") { + var retry = loadLoader.bind(null, loader, callback); + if(typeof setImmediate === "function") { + // node >= 0.9.0 + return setImmediate(retry); + } else { + // node < 0.9.0 + return process.nextTick(retry); + } + } + return callback(e); + } + if(typeof module !== "function" && typeof module !== "object") { + return callback(new LoaderLoadingError( + "Module '" + loader.path + "' is not a loader (export function or es6 module)" + )); + } + loader.normal = typeof module === "function" ? module : module.default; + loader.pitch = module.pitch; + loader.raw = module.raw; + if(typeof loader.normal !== "function" && typeof loader.pitch !== "function") { + return callback(new LoaderLoadingError( + "Module '" + loader.path + "' is not a loader (must have normal or pitch function)" + )); + } + callback(); + } +}; + + +/***/ }), + +/***/ 4337: +/***/ (function(module) { + +"use strict"; +/*! + * map-cache + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var hasOwn = Object.prototype.hasOwnProperty; + +/** + * Expose `MapCache` + */ + +module.exports = MapCache; + +/** + * Creates a cache object to store key/value pairs. + * + * ```js + * var cache = new MapCache(); + * ``` + * + * @api public + */ + +function MapCache(data) { + this.__data__ = data || {}; +} + +/** + * Adds `value` to `key` on the cache. + * + * ```js + * cache.set('foo', 'bar'); + * ``` + * + * @param {String} `key` The key of the value to cache. + * @param {*} `value` The value to cache. + * @returns {Object} Returns the `Cache` object for chaining. + * @api public + */ + +MapCache.prototype.set = function mapSet(key, value) { + if (key !== '__proto__') { + this.__data__[key] = value; + } + return this; +}; + +/** + * Gets the cached value for `key`. + * + * ```js + * cache.get('foo'); + * //=> 'bar' + * ``` + * + * @param {String} `key` The key of the value to get. + * @returns {*} Returns the cached value. + * @api public + */ + +MapCache.prototype.get = function mapGet(key) { + return key === '__proto__' ? undefined : this.__data__[key]; +}; + +/** + * Checks if a cached value for `key` exists. + * + * ```js + * cache.has('foo'); + * //=> true + * ``` + * + * @param {String} `key` The key of the entry to check. + * @returns {Boolean} Returns `true` if an entry for `key` exists, else `false`. + * @api public + */ + +MapCache.prototype.has = function mapHas(key) { + return key !== '__proto__' && hasOwn.call(this.__data__, key); +}; + +/** + * Removes `key` and its value from the cache. + * + * ```js + * cache.del('foo'); + * ``` + * @title .del + * @param {String} `key` The key of the value to remove. + * @returns {Boolean} Returns `true` if the entry was removed successfully, else `false`. + * @api public + */ + +MapCache.prototype.del = function mapDelete(key) { + return this.has(key) && delete this.__data__[key]; +}; + + +/***/ }), + +/***/ 11270: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(31669); +var visit = __webpack_require__(59248); + +/** + * Map `visit` over an array of objects. + * + * @param {Object} `collection` The context in which to invoke `method` + * @param {String} `method` Name of the method to call on `collection` + * @param {Object} `arr` Array of objects. + */ + +module.exports = function mapVisit(collection, method, val) { + if (isObject(val)) { + return visit.apply(null, arguments); + } + + if (!Array.isArray(val)) { + throw new TypeError('expected an array: ' + util.inspect(val)); + } + + var args = [].slice.call(arguments, 3); + + for (var i = 0; i < val.length; i++) { + var ele = val[i]; + if (isObject(ele)) { + visit.apply(null, [collection, method, ele].concat(args)); + } else { + collection[method].apply(collection, [ele].concat(args)); + } + } +}; + +function isObject(val) { + return val && (typeof val === 'function' || (!Array.isArray(val) && typeof val === 'object')); +} + + +/***/ }), + +/***/ 32327: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +var normalize = __webpack_require__(25458); +var errors = __webpack_require__(48916); +var stream = __webpack_require__(68193); + +var ReadableStream = stream.Readable; +var WritableStream = stream.Writable; + +function MemoryFileSystemError(err, path) { + Error.call(this) + if (Error.captureStackTrace) + Error.captureStackTrace(this, arguments.callee) + this.code = err.code; + this.errno = err.errno; + this.message = err.description; + this.path = path; +} +MemoryFileSystemError.prototype = new Error(); + +function MemoryFileSystem(data) { + this.data = data || {}; +} +module.exports = MemoryFileSystem; + +function isDir(item) { + if(typeof item !== "object") return false; + return item[""] === true; +} + +function isFile(item) { + if(typeof item !== "object") return false; + return !item[""]; +} + +function pathToArray(path) { + path = normalize(path); + var nix = /^\//.test(path); + if(!nix) { + if(!/^[A-Za-z]:/.test(path)) { + throw new MemoryFileSystemError(errors.code.EINVAL, path); + } + path = path.replace(/[\\\/]+/g, "\\"); // multi slashs + path = path.split(/[\\\/]/); + path[0] = path[0].toUpperCase(); + } else { + path = path.replace(/\/+/g, "/"); // multi slashs + path = path.substr(1).split("/"); + } + if(!path[path.length-1]) path.pop(); + return path; +} + +function trueFn() { return true; } +function falseFn() { return false; } + +MemoryFileSystem.prototype.meta = function(_path) { + var path = pathToArray(_path); + var current = this.data; + for(var i = 0; i < path.length - 1; i++) { + if(!isDir(current[path[i]])) + return; + current = current[path[i]]; + } + return current[path[i]]; +} + +MemoryFileSystem.prototype.existsSync = function(_path) { + return !!this.meta(_path); +} + +MemoryFileSystem.prototype.statSync = function(_path) { + var current = this.meta(_path); + if(_path === "/" || isDir(current)) { + return { + isFile: falseFn, + isDirectory: trueFn, + isBlockDevice: falseFn, + isCharacterDevice: falseFn, + isSymbolicLink: falseFn, + isFIFO: falseFn, + isSocket: falseFn + }; + } else if(isFile(current)) { + return { + isFile: trueFn, + isDirectory: falseFn, + isBlockDevice: falseFn, + isCharacterDevice: falseFn, + isSymbolicLink: falseFn, + isFIFO: falseFn, + isSocket: falseFn + }; + } else { + throw new MemoryFileSystemError(errors.code.ENOENT, _path); + } +}; + +MemoryFileSystem.prototype.readFileSync = function(_path, encoding) { + var path = pathToArray(_path); + var current = this.data; + for(var i = 0; i < path.length - 1; i++) { + if(!isDir(current[path[i]])) + throw new MemoryFileSystemError(errors.code.ENOENT, _path); + current = current[path[i]]; + } + if(!isFile(current[path[i]])) { + if(isDir(current[path[i]])) + throw new MemoryFileSystemError(errors.code.EISDIR, _path); + else + throw new MemoryFileSystemError(errors.code.ENOENT, _path); + } + current = current[path[i]]; + return encoding ? current.toString(encoding) : current; +}; + +MemoryFileSystem.prototype.readdirSync = function(_path) { + if(_path === "/") return Object.keys(this.data).filter(Boolean); + var path = pathToArray(_path); + var current = this.data; + for(var i = 0; i < path.length - 1; i++) { + if(!isDir(current[path[i]])) + throw new MemoryFileSystemError(errors.code.ENOENT, _path); + current = current[path[i]]; + } + if(!isDir(current[path[i]])) { + if(isFile(current[path[i]])) + throw new MemoryFileSystemError(errors.code.ENOTDIR, _path); + else + throw new MemoryFileSystemError(errors.code.ENOENT, _path); + } + return Object.keys(current[path[i]]).filter(Boolean); +}; + +MemoryFileSystem.prototype.mkdirpSync = function(_path) { + var path = pathToArray(_path); + if(path.length === 0) return; + var current = this.data; + for(var i = 0; i < path.length; i++) { + if(isFile(current[path[i]])) + throw new MemoryFileSystemError(errors.code.ENOTDIR, _path); + else if(!isDir(current[path[i]])) + current[path[i]] = {"":true}; + current = current[path[i]]; + } + return; +}; + +MemoryFileSystem.prototype.mkdirSync = function(_path) { + var path = pathToArray(_path); + if(path.length === 0) return; + var current = this.data; + for(var i = 0; i < path.length - 1; i++) { + if(!isDir(current[path[i]])) + throw new MemoryFileSystemError(errors.code.ENOENT, _path); + current = current[path[i]]; + } + if(isDir(current[path[i]])) + throw new MemoryFileSystemError(errors.code.EEXIST, _path); + else if(isFile(current[path[i]])) + throw new MemoryFileSystemError(errors.code.ENOTDIR, _path); + current[path[i]] = {"":true}; + return; +}; + +MemoryFileSystem.prototype._remove = function(_path, name, testFn) { + var path = pathToArray(_path); + if(path.length === 0) { + throw new MemoryFileSystemError(errors.code.EPERM, _path); + } + var current = this.data; + for(var i = 0; i < path.length - 1; i++) { + if(!isDir(current[path[i]])) + throw new MemoryFileSystemError(errors.code.ENOENT, _path); + current = current[path[i]]; + } + if(!testFn(current[path[i]])) + throw new MemoryFileSystemError(errors.code.ENOENT, _path); + delete current[path[i]]; + return; +}; + +MemoryFileSystem.prototype.rmdirSync = function(_path) { + return this._remove(_path, "Directory", isDir); +}; + +MemoryFileSystem.prototype.unlinkSync = function(_path) { + return this._remove(_path, "File", isFile); +}; + +MemoryFileSystem.prototype.readlinkSync = function(_path) { + throw new MemoryFileSystemError(errors.code.ENOSYS, _path); +}; + +MemoryFileSystem.prototype.writeFileSync = function(_path, content, encoding) { + if(!content && !encoding) throw new Error("No content"); + var path = pathToArray(_path); + if(path.length === 0) { + throw new MemoryFileSystemError(errors.code.EISDIR, _path); + } + var current = this.data; + for(var i = 0; i < path.length - 1; i++) { + if(!isDir(current[path[i]])) + throw new MemoryFileSystemError(errors.code.ENOENT, _path); + current = current[path[i]]; + } + if(isDir(current[path[i]])) + throw new MemoryFileSystemError(errors.code.EISDIR, _path); + current[path[i]] = encoding || typeof content === "string" ? new Buffer(content, encoding) : content; + return; +}; + +MemoryFileSystem.prototype.join = __webpack_require__(89597); +MemoryFileSystem.prototype.pathToArray = pathToArray; +MemoryFileSystem.prototype.normalize = normalize; + +// stream functions + +MemoryFileSystem.prototype.createReadStream = function(path, options) { + var stream = new ReadableStream(); + var done = false; + var data; + try { + data = this.readFileSync(path); + } catch (e) { + stream._read = function() { + if (done) { + return; + } + done = true; + this.emit('error', e); + this.push(null); + }; + return stream; + } + options = options || { }; + options.start = options.start || 0; + options.end = options.end || data.length; + stream._read = function() { + if (done) { + return; + } + done = true; + this.push(data.slice(options.start, options.end)); + this.push(null); + }; + return stream; +}; + +MemoryFileSystem.prototype.createWriteStream = function(path, options) { + var stream = new WritableStream(), self = this; + try { + // Zero the file and make sure it is writable + this.writeFileSync(path, new Buffer(0)); + } catch(e) { + // This or setImmediate? + stream.once('prefinish', function() { + stream.emit('error', e); + }); + return stream; + } + var bl = [ ], len = 0; + stream._write = function(chunk, encoding, callback) { + bl.push(chunk); + len += chunk.length; + self.writeFile(path, Buffer.concat(bl, len), callback); + } + return stream; +}; + +// async functions + +["stat", "readdir", "mkdirp", "rmdir", "unlink", "readlink"].forEach(function(fn) { + MemoryFileSystem.prototype[fn] = function(path, callback) { + try { + var result = this[fn + "Sync"](path); + } catch(e) { + setImmediate(function() { + callback(e); + }); + + return; + } + setImmediate(function() { + callback(null, result); + }); + }; +}); + +["mkdir", "readFile"].forEach(function(fn) { + MemoryFileSystem.prototype[fn] = function(path, optArg, callback) { + if(!callback) { + callback = optArg; + optArg = undefined; + } + try { + var result = this[fn + "Sync"](path, optArg); + } catch(e) { + setImmediate(function() { + callback(e); + }); + + return; + } + setImmediate(function() { + callback(null, result); + }); + }; +}); + +MemoryFileSystem.prototype.exists = function(path, callback) { + return callback(this.existsSync(path)); +} + +MemoryFileSystem.prototype.writeFile = function (path, content, encoding, callback) { + if(!callback) { + callback = encoding; + encoding = undefined; + } + try { + this.writeFileSync(path, content, encoding); + } catch(e) { + return callback(e); + } + return callback(); +}; + + +/***/ }), + +/***/ 89597: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var normalize = __webpack_require__(25458); + +var absoluteWinRegExp = /^[A-Z]:([\\\/]|$)/i; +var absoluteNixRegExp = /^\//i; + +module.exports = function join(path, request) { + if(!request) return normalize(path); + if(absoluteWinRegExp.test(request)) return normalize(request.replace(/\//g, "\\")); + if(absoluteNixRegExp.test(request)) return normalize(request); + if(path == "/") return normalize(path + request); + if(absoluteWinRegExp.test(path)) return normalize(path.replace(/\//g, "\\") + "\\" + request.replace(/\//g, "\\")); + if(absoluteNixRegExp.test(path)) return normalize(path + "/" + request); + return normalize(path + "/" + request); +}; + + +/***/ }), + +/***/ 25458: +/***/ (function(module) { + +module.exports = function normalize(path) { + var parts = path.split(/(\\+|\/+)/); + if(parts.length === 1) + return path; + var result = []; + var absolutePathStart = 0; + for(var i = 0, sep = false; i < parts.length; i++, sep = !sep) { + var part = parts[i]; + if(i === 0 && /^([A-Z]:)?$/i.test(part)) { + result.push(part); + absolutePathStart = 2; + } else if(sep) { + result.push(part[0]); + } else if(part === "..") { + switch(result.length) { + case 0: + // i. e. ".." => ".." + // i. e. "../a/b/c" => "../a/b/c" + result.push(part); + break; + case 2: + // i. e. "a/.." => "" + // i. e. "/.." => "/" + // i. e. "C:\.." => "C:\" + // i. e. "a/../b/c" => "b/c" + // i. e. "/../b/c" => "/b/c" + // i. e. "C:\..\a\b\c" => "C:\a\b\c" + i++; + sep = !sep; + result.length = absolutePathStart; + break; + case 4: + // i. e. "a/b/.." => "a" + // i. e. "/a/.." => "/" + // i. e. "C:\a\.." => "C:\" + // i. e. "/a/../b/c" => "/b/c" + if(absolutePathStart === 0) { + result.length -= 3; + } else { + i++; + sep = !sep; + result.length = 2; + } + break; + default: + // i. e. "/a/b/.." => "/a" + // i. e. "/a/b/../c" => "/a/c" + result.length -= 3; + break; + } + } else if(part === ".") { + switch(result.length) { + case 0: + // i. e. "." => "." + // i. e. "./a/b/c" => "./a/b/c" + result.push(part); + break; + case 2: + // i. e. "a/." => "a" + // i. e. "/." => "/" + // i. e. "C:\." => "C:\" + // i. e. "C:\.\a\b\c" => "C:\a\b\c" + if(absolutePathStart === 0) { + result.length--; + } else { + i++; + sep = !sep; + } + break; + default: + // i. e. "a/b/." => "a/b" + // i. e. "/a/." => "/" + // i. e. "C:\a\." => "C:\" + // i. e. "a/./b/c" => "a/b/c" + // i. e. "/a/./b/c" => "/a/b/c" + result.length--; + break; + } + } else if(part) { + result.push(part); + } + } + if(result.length === 1 && /^[A-Za-z]:$/.test(result)) + return result[0] + "\\"; + return result.join(""); +}; + + +/***/ }), + +/***/ 53024: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +/** + * Module dependencies + */ + +var util = __webpack_require__(31669); +var braces = __webpack_require__(22706); +var toRegex = __webpack_require__(51279); +var extend = __webpack_require__(3767); + +/** + * Local dependencies + */ + +var compilers = __webpack_require__(26113); +var parsers = __webpack_require__(14086); +var cache = __webpack_require__(34743); +var utils = __webpack_require__(63976); +var MAX_LENGTH = 1024 * 64; + +/** + * The main function takes a list of strings and one or more + * glob patterns to use for matching. + * + * ```js + * var mm = require('micromatch'); + * mm(list, patterns[, options]); + * + * console.log(mm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {Array} `list` A list of strings to match + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +function micromatch(list, patterns, options) { + patterns = utils.arrayify(patterns); + list = utils.arrayify(list); + + var len = patterns.length; + if (list.length === 0 || len === 0) { + return []; + } + + if (len === 1) { + return micromatch.match(list, patterns[0], options); + } + + var omit = []; + var keep = []; + var idx = -1; + + while (++idx < len) { + var pattern = patterns[idx]; + + if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, micromatch.match(list, pattern.slice(1), options)); + } else { + keep.push.apply(keep, micromatch.match(list, pattern, options)); + } + } + + var matches = utils.diff(keep, omit); + if (!options || options.nodupes !== false) { + return utils.unique(matches); + } + + return matches; +} + +/** + * Similar to the main function, but `pattern` must be a string. + * + * ```js + * var mm = require('micromatch'); + * mm.match(list, pattern[, options]); + * + * console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); + * //=> ['a.a', 'a.aa'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @api public + */ + +micromatch.match = function(list, pattern, options) { + if (Array.isArray(pattern)) { + throw new TypeError('expected pattern to be a string'); + } + + var unixify = utils.unixify(options); + var isMatch = memoize('match', pattern, options, micromatch.matcher); + var matches = []; + + list = utils.arrayify(list); + var len = list.length; + var idx = -1; + + while (++idx < len) { + var ele = list[idx]; + if (ele === pattern || isMatch(ele)) { + matches.push(utils.value(ele, unixify, options)); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return utils.unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [options.unescape ? utils.unescape(pattern) : pattern]; + } + } + + // if `opts.ignore` was defined, diff ignored list + if (options.ignore) { + matches = micromatch.not(matches, options.ignore, options); + } + + return options.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * ```js + * var mm = require('micromatch'); + * mm.isMatch(string, pattern[, options]); + * + * console.log(mm.isMatch('a.a', '*.a')); + * //=> true + * console.log(mm.isMatch('a.b', '*.a')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the string matches the glob pattern. + * @api public + */ + +micromatch.isMatch = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (isEmptyString(str) || isEmptyString(pattern)) { + return false; + } + + var equals = utils.equalsPattern(options); + if (equals(str)) { + return true; + } + + var isMatch = memoize('isMatch', pattern, options, micromatch.matcher); + return isMatch(str); +}; + +/** + * Returns true if some of the strings in the given `list` match any of the + * given glob `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.some(list, patterns[, options]); + * + * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.some = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + for (var i = 0; i < list.length; i++) { + if (micromatch(list[i], patterns, options).length === 1) { + return true; + } + } + return false; +}; + +/** + * Returns true if every string in the given `list` matches + * any of the given glob `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.every(list, patterns[, options]); + * + * console.log(mm.every('foo.js', ['foo.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.every = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + for (var i = 0; i < list.length; i++) { + if (micromatch(list[i], patterns, options).length !== 1) { + return false; + } + } + return true; +}; + +/** + * Returns true if **any** of the given glob `patterns` + * match the specified `string`. + * + * ```js + * var mm = require('micromatch'); + * mm.any(string, patterns[, options]); + * + * console.log(mm.any('a.a', ['b.*', '*.a'])); + * //=> true + * console.log(mm.any('a.a', 'b.*')); + * //=> false + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.any = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (isEmptyString(str) || isEmptyString(patterns)) { + return false; + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (micromatch.isMatch(str, patterns[i], options)) { + return true; + } + } + return false; +}; + +/** + * Returns true if **all** of the given `patterns` match + * the specified string. + * + * ```js + * var mm = require('micromatch'); + * mm.all(string, patterns[, options]); + * + * console.log(mm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.all = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + if (typeof patterns === 'string') { + patterns = [patterns]; + } + for (var i = 0; i < patterns.length; i++) { + if (!micromatch.isMatch(str, patterns[i], options)) { + return false; + } + } + return true; +}; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.not(list, patterns[, options]); + * + * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +micromatch.not = function(list, patterns, options) { + var opts = extend({}, options); + var ignore = opts.ignore; + delete opts.ignore; + + var unixify = utils.unixify(opts); + list = utils.arrayify(list).map(unixify); + + var matches = utils.diff(list, micromatch(list, patterns, opts)); + if (ignore) { + matches = utils.diff(matches, micromatch(list, ignore)); + } + + return opts.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var mm = require('micromatch'); + * mm.contains(string, pattern[, options]); + * + * console.log(mm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(mm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +micromatch.contains = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + if (isEmptyString(str) || isEmptyString(patterns)) { + return false; + } + + var equals = utils.equalsPattern(patterns, options); + if (equals(str)) { + return true; + } + var contains = utils.containsPattern(patterns, options); + if (contains(str)) { + return true; + } + } + + var opts = extend({}, options, {contains: true}); + return micromatch.any(str, patterns, opts); +}; + +/** + * Returns true if the given pattern and options should enable + * the `matchBase` option. + * @return {Boolean} + * @api private + */ + +micromatch.matchBase = function(pattern, options) { + if (pattern && pattern.indexOf('/') !== -1 || !options) return false; + return options.basename === true || options.matchBase === true; +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * var mm = require('micromatch'); + * mm.matchKeys(object, patterns[, options]); + * + * var obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(mm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +micromatch.matchKeys = function(obj, patterns, options) { + if (!utils.isObject(obj)) { + throw new TypeError('expected the first argument to be an object'); + } + var keys = micromatch(Object.keys(obj), patterns, options); + return utils.pick(obj, keys); +}; + +/** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * var mm = require('micromatch'); + * mm.matcher(pattern[, options]); + * + * var isMatch = mm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {Function} Returns a matcher function. + * @api public + */ + +micromatch.matcher = function matcher(pattern, options) { + if (Array.isArray(pattern)) { + return compose(pattern, options, matcher); + } + + // if pattern is a regex + if (pattern instanceof RegExp) { + return test(pattern); + } + + // if pattern is invalid + if (!utils.isString(pattern)) { + throw new TypeError('expected pattern to be an array, string or regex'); + } + + // if pattern is a non-glob string + if (!utils.hasSpecialChars(pattern)) { + if (options && options.nocase === true) { + pattern = pattern.toLowerCase(); + } + return utils.matchPath(pattern, options); + } + + // if pattern is a glob string + var re = micromatch.makeRe(pattern, options); + + // if `options.matchBase` or `options.basename` is defined + if (micromatch.matchBase(pattern, options)) { + return utils.matchBasename(re, options); + } + + function test(regex) { + var equals = utils.equalsPattern(options); + var unixify = utils.unixify(options); + + return function(str) { + if (equals(str)) { + return true; + } + + if (regex.test(unixify(str))) { + return true; + } + return false; + }; + } + + var fn = test(re); + Object.defineProperty(fn, 'result', { + configurable: true, + enumerable: false, + value: re.result + }); + return fn; +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. + * + * ```js + * var mm = require('micromatch'); + * mm.capture(pattern, string[, options]); + * + * console.log(mm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(mm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +micromatch.capture = function(pattern, str, options) { + var re = micromatch.makeRe(pattern, extend({capture: true}, options)); + var unixify = utils.unixify(options); + + function match() { + return function(string) { + var match = re.exec(unixify(string)); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * var mm = require('micromatch'); + * mm.makeRe(pattern[, options]); + * + * console.log(mm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +micromatch.makeRe = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var result = micromatch.create(pattern, options); + var ast_array = []; + var output = result.map(function(obj) { + obj.ast.state = obj.state; + ast_array.push(obj.ast); + return obj.output; + }); + + var regex = toRegex(output.join('|'), options); + Object.defineProperty(regex, 'result', { + configurable: true, + enumerable: false, + value: ast_array + }); + return regex; + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Expand the given brace `pattern`. + * + * ```js + * var mm = require('micromatch'); + * console.log(mm.braces('foo/{a,b}/bar')); + * //=> ['foo/(a|b)/bar'] + * + * console.log(mm.braces('foo/{a,b}/bar', {expand: true})); + * //=> ['foo/(a|b)/bar'] + * ``` + * @param {String} `pattern` String with brace pattern to expand. + * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. + * @return {Array} + * @api public + */ + +micromatch.braces = function(pattern, options) { + if (typeof pattern !== 'string' && !Array.isArray(pattern)) { + throw new TypeError('expected pattern to be an array or string'); + } + + function expand() { + if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) { + return utils.arrayify(pattern); + } + return braces(pattern, options); + } + + return memoize('braces', pattern, options, expand); +}; + +/** + * Proxy to the [micromatch.braces](#method), for parity with + * minimatch. + */ + +micromatch.braceExpand = function(pattern, options) { + var opts = extend({}, options, {expand: true}); + return micromatch.braces(pattern, opts); +}; + +/** + * Parses the given glob `pattern` and returns an array of abstract syntax + * trees (ASTs), with the compiled `output` and optional source `map` on + * each AST. + * + * ```js + * var mm = require('micromatch'); + * mm.create(pattern[, options]); + * + * console.log(mm.create('abc/*.js')); + * // [{ options: { source: 'string', sourcemap: true }, + * // state: {}, + * // compilers: + * // { ... }, + * // output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: + * // [ ... ], + * // dot: false, + * // input: 'abc/*.js' }, + * // parsingErrors: [], + * // map: + * // { version: 3, + * // sources: [ 'string' ], + * // names: [], + * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', + * // sourcesContent: [ 'abc/*.js' ] }, + * // position: { line: 1, column: 28 }, + * // content: {}, + * // files: {}, + * // idx: 6 }] + * ``` + * @param {String} `pattern` Glob pattern to parse and compile. + * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed. + * @return {Object} Returns an object with the parsed AST, compiled string and optional source map. + * @api public + */ + +micromatch.create = function(pattern, options) { + return memoize('create', pattern, options, function() { + function create(str, opts) { + return micromatch.compile(micromatch.parse(str, opts), opts); + } + + pattern = micromatch.braces(pattern, options); + var len = pattern.length; + var idx = -1; + var res = []; + + while (++idx < len) { + res.push(create(pattern[idx], options)); + } + return res; + }); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var mm = require('micromatch'); + * mm.parse(pattern[, options]); + * + * var ast = mm.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +micromatch.parse = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + function parse() { + var snapdragon = utils.instantiate(null, options); + parsers(snapdragon, options); + + var ast = snapdragon.parse(pattern, options); + utils.define(ast, 'snapdragon', snapdragon); + ast.input = pattern; + return ast; + } + + return memoize('parse', pattern, options, parse); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var mm = require('micromatch'); + * mm.compile(ast[, options]); + * + * var ast = mm.parse('a/{b,c}/d'); + * console.log(mm.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +micromatch.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = micromatch.parse(ast, options); + } + + return memoize('compile', ast.input, options, function() { + var snapdragon = utils.instantiate(ast, options); + compilers(snapdragon, options); + return snapdragon.compile(ast, options); + }); +}; + +/** + * Clear the regex cache. + * + * ```js + * mm.clearCache(); + * ``` + * @api public + */ + +micromatch.clearCache = function() { + micromatch.cache.caches = {}; +}; + +/** + * Returns true if the given value is effectively an empty string + */ + +function isEmptyString(val) { + return String(val) === '' || String(val) === './'; +} + +/** + * Compose a matcher function with the given patterns. + * This allows matcher functions to be compiled once and + * called multiple times. + */ + +function compose(patterns, options, matcher) { + var matchers; + + return memoize('compose', String(patterns), options, function() { + return function(file) { + // delay composition until it's invoked the first time, + // after that it won't be called again + if (!matchers) { + matchers = []; + for (var i = 0; i < patterns.length; i++) { + matchers.push(matcher(patterns[i], options)); + } + } + + var len = matchers.length; + while (len--) { + if (matchers[len](file) === true) { + return true; + } + } + return false; + }; + }); +} + +/** + * Memoize a generated regex or function. A unique key is generated + * from the `type` (usually method name), the `pattern`, and + * user-defined options. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + '=' + pattern, options); + + if (options && options.cache === false) { + return fn(pattern, options); + } + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + cache.set(type, key, val); + return val; +} + +/** + * Expose compiler, parser and cache on `micromatch` + */ + +micromatch.compilers = compilers; +micromatch.parsers = parsers; +micromatch.caches = cache.caches; + +/** + * Expose `micromatch` + * @type {Function} + */ + +module.exports = micromatch; + + +/***/ }), + +/***/ 34743: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +module.exports = new (__webpack_require__(49908))(); + + +/***/ }), + +/***/ 26113: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var nanomatch = __webpack_require__(57925); +var extglob = __webpack_require__(66675); + +module.exports = function(snapdragon) { + var compilers = snapdragon.compiler.compilers; + var opts = snapdragon.options; + + // register nanomatch compilers + snapdragon.use(nanomatch.compilers); + + // get references to some specific nanomatch compilers before they + // are overridden by the extglob and/or custom compilers + var escape = compilers.escape; + var qmark = compilers.qmark; + var slash = compilers.slash; + var star = compilers.star; + var text = compilers.text; + var plus = compilers.plus; + var dot = compilers.dot; + + // register extglob compilers or escape exglobs if disabled + if (opts.extglob === false || opts.noext === true) { + snapdragon.compiler.use(escapeExtglobs); + } else { + snapdragon.use(extglob.compilers); + } + + snapdragon.use(function() { + this.options.star = this.options.star || function(/*node*/) { + return '[^\\\\/]*?'; + }; + }); + + // custom micromatch compilers + snapdragon.compiler + + // reset referenced compiler + .set('dot', dot) + .set('escape', escape) + .set('plus', plus) + .set('slash', slash) + .set('qmark', qmark) + .set('star', star) + .set('text', text); +}; + +function escapeExtglobs(compiler) { + compiler.set('paren', function(node) { + var val = ''; + visit(node, function(tok) { + if (tok.val) val += (/^\W/.test(tok.val) ? '\\' : '') + tok.val; + }); + return this.emit(val, node); + }); + + /** + * Visit `node` with the given `fn` + */ + + function visit(node, fn) { + return node.nodes ? mapVisit(node.nodes, fn) : fn(node); + } + + /** + * Map visit over array of `nodes`. + */ + + function mapVisit(nodes, fn) { + var len = nodes.length; + var idx = -1; + while (++idx < len) { + visit(nodes[idx], fn); + } + } +} + + +/***/ }), + +/***/ 14086: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var extglob = __webpack_require__(66675); +var nanomatch = __webpack_require__(57925); +var regexNot = __webpack_require__(30931); +var toRegex = __webpack_require__(51279); +var not; + +/** + * Characters to use in negation regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var TEXT = '([!@*?+]?\\(|\\)|\\[:?(?=.*?:?\\])|:?\\]|[*+?!^$.\\\\/])+'; +var createNotRegex = function(opts) { + return not || (not = textRegex(TEXT)); +}; + +/** + * Parsers + */ + +module.exports = function(snapdragon) { + var parsers = snapdragon.parser.parsers; + + // register nanomatch parsers + snapdragon.use(nanomatch.parsers); + + // get references to some specific nanomatch parsers before they + // are overridden by the extglob and/or parsers + var escape = parsers.escape; + var slash = parsers.slash; + var qmark = parsers.qmark; + var plus = parsers.plus; + var star = parsers.star; + var dot = parsers.dot; + + // register extglob parsers + snapdragon.use(extglob.parsers); + + // custom micromatch parsers + snapdragon.parser + .use(function() { + // override "notRegex" created in nanomatch parser + this.notRegex = /^\!+(?!\()/; + }) + // reset the referenced parsers + .capture('escape', escape) + .capture('slash', slash) + .capture('qmark', qmark) + .capture('star', star) + .capture('plus', plus) + .capture('dot', dot) + + /** + * Override `text` parser + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(createNotRegex(this.options)); + if (!m || !m[0]) return; + + // escape regex boundary characters and simple brackets + var val = m[0].replace(/([[\]^$])/g, '\\$1'); + + return pos({ + type: 'text', + val: val + }); + }); +}; + +/** + * Create text regex + */ + +function textRegex(pattern) { + var notStr = regexNot.create(pattern, {contains: true, strictClose: false}); + var prefix = '(?:[\\^]|\\\\|'; + return toRegex(prefix + notStr + ')', {strictClose: false}); +} + + +/***/ }), + +/***/ 63976: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var utils = module.exports; +var path = __webpack_require__(85622); + +/** + * Module dependencies + */ + +var Snapdragon = __webpack_require__(79285); +utils.define = __webpack_require__(35851); +utils.diff = __webpack_require__(9455); +utils.extend = __webpack_require__(3767); +utils.pick = __webpack_require__(38509); +utils.typeOf = __webpack_require__(19613); +utils.unique = __webpack_require__(19009); + +/** + * Returns true if the platform is windows, or `path.sep` is `\\`. + * This is defined as a function to allow `path.sep` to be set in unit tests, + * or by the user, if there is a reason to do so. + * @return {Boolean} + */ + +utils.isWindows = function() { + return path.sep === '\\' || process.platform === 'win32'; +}; + +/** + * Get the `Snapdragon` instance to use + */ + +utils.instantiate = function(ast, options) { + var snapdragon; + // if an instance was created by `.parse`, use that instance + if (utils.typeOf(ast) === 'object' && ast.snapdragon) { + snapdragon = ast.snapdragon; + // if the user supplies an instance on options, use that instance + } else if (utils.typeOf(options) === 'object' && options.snapdragon) { + snapdragon = options.snapdragon; + // create a new instance + } else { + snapdragon = new Snapdragon(options); + } + + utils.define(snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.apply(this, arguments); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strictErrors !== true) { + var open = last.nodes[0]; + var inner = last.nodes[1]; + if (last.type === 'bracket') { + if (inner.val.charAt(0) === '[') { + inner.val = '\\' + inner.val; + } + + } else { + open.val = '\\' + open.val; + var sibling = open.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); + + return snapdragon; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + if (utils.typeOf(options) !== 'object') { + return pattern; + } + var val = pattern; + var keys = Object.keys(options); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + val += ';' + key + '=' + String(options[key]); + } + return val; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isString = function(val) { + return typeof val === 'string'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isObject = function(val) { + return utils.typeOf(val) === 'object'; +}; + +/** + * Returns true if the given `str` has special characters + */ + +utils.hasSpecialChars = function(str) { + return /(?:(?:(^|\/)[!.])|[*?+()|\[\]{}]|[+@]\()/.test(str); +}; + +/** + * Escape regex characters in the given string + */ + +utils.escapeRegex = function(str) { + return str.replace(/[-[\]{}()^$|*+?.\\\/\s]/g, '\\$&'); +}; + +/** + * Normalize slashes in the given filepath. + * + * @param {String} `filepath` + * @return {String} + */ + +utils.toPosixPath = function(str) { + return str.replace(/\\+/g, '/'); +}; + +/** + * Strip backslashes before special characters in a string. + * + * @param {String} `str` + * @return {String} + */ + +utils.unescape = function(str) { + return utils.toPosixPath(str.replace(/\\(?=[*+?!.])/g, '')); +}; + +/** + * Strip the prefix from a filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripPrefix = function(str) { + if (str.charAt(0) !== '.') { + return str; + } + var ch = str.charAt(1); + if (utils.isSlash(ch)) { + return str.slice(2); + } + return str; +}; + +/** + * Returns true if the given str is an escaped or + * unescaped path character + */ + +utils.isSlash = function(str) { + return str === '/' || str === '\\/' || str === '\\' || str === '\\\\'; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function(pattern, options) { + return (options && options.contains) + ? utils.containsPattern(pattern, options) + : utils.equalsPattern(pattern, options); +}; + +/** + * Returns true if the given (original) filepath or unixified path are equal + * to the given pattern. + */ + +utils._equals = function(filepath, unixPath, pattern) { + return pattern === filepath || pattern === unixPath; +}; + +/** + * Returns true if the given (original) filepath or unixified path contain + * the given pattern. + */ + +utils._contains = function(filepath, unixPath, pattern) { + return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.equalsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function fn(filepath) { + var equal = utils._equals(filepath, unixify(filepath), pattern); + if (equal === true || options.nocase !== true) { + return equal; + } + var lower = filepath.toLowerCase(); + return utils._equals(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.containsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function(filepath) { + var contains = utils._contains(filepath, unixify(filepath), pattern); + if (contains === true || options.nocase !== true) { + return contains; + } + var lower = filepath.toLowerCase(); + return utils._contains(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` Matching regex + * @return {Function} + */ + +utils.matchBasename = function(re) { + return function(filepath) { + return re.test(path.basename(filepath)); + }; +}; + +/** + * Determines the filepath to return based on the provided options. + * @return {any} + */ + +utils.value = function(str, unixify, options) { + if (options && options.unixify === false) { + return str; + } + return unixify(str); +}; + +/** + * Returns a function that normalizes slashes in a string to forward + * slashes, strips `./` from beginning of paths, and optionally unescapes + * special characters. + * @return {Function} + */ + +utils.unixify = function(options) { + options = options || {}; + return function(filepath) { + if (utils.isWindows() || options.unixify === true) { + filepath = utils.toPosixPath(filepath); + } + if (options.stripPrefix !== false) { + filepath = utils.stripPrefix(filepath); + } + if (options.unescape === true) { + filepath = utils.unescape(filepath); + } + return filepath; + }; +}; + + +/***/ }), + +/***/ 35851: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * define-property + * + * Copyright (c) 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isobject = __webpack_require__(96667); +var isDescriptor = __webpack_require__(44133); +var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) + ? Reflect.defineProperty + : Object.defineProperty; + +module.exports = function defineProperty(obj, key, val) { + if (!isobject(obj) && typeof obj !== 'function' && !Array.isArray(obj)) { + throw new TypeError('expected an object, function, or array'); + } + + if (typeof key !== 'string') { + throw new TypeError('expected "key" to be a string'); + } + + if (isDescriptor(val)) { + define(obj, key, val); + return obj; + } + + define(obj, key, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); + + return obj; +}; + + +/***/ }), + +/***/ 3767: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isExtendable = __webpack_require__(98775); +var assignSymbols = __webpack_require__(64353); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} + + +/***/ }), + +/***/ 98775: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isPlainObject = __webpack_require__(81064); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; + + +/***/ }), + +/***/ 19613: +/***/ (function(module) { + +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} + + +/***/ }), + +/***/ 4870: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isExtendable = __webpack_require__(29502); +var forIn = __webpack_require__(43086); + +function mixinDeep(target, objects) { + var len = arguments.length, i = 0; + while (++i < len) { + var obj = arguments[i]; + if (isObject(obj)) { + forIn(obj, copy, target); + } + } + return target; +} + +/** + * Copy properties from the source object to the + * target object. + * + * @param {*} `val` + * @param {String} `key` + */ + +function copy(val, key) { + if (!isValidKey(key)) { + return; + } + + var obj = this[key]; + if (isObject(val) && isObject(obj)) { + mixinDeep(obj, val); + } else { + this[key] = val; + } +} + +/** + * Returns true if `val` is an object or function. + * + * @param {any} val + * @return {Boolean} + */ + +function isObject(val) { + return isExtendable(val) && !Array.isArray(val); +} + +/** + * Returns true if `key` is a valid key to use when extending objects. + * + * @param {String} `key` + * @return {Boolean} + */ + +function isValidKey(key) { + return key !== '__proto__' && key !== 'constructor' && key !== 'prototype'; +}; + +/** + * Expose `mixinDeep` + */ + +module.exports = mixinDeep; + + +/***/ }), + +/***/ 29502: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isPlainObject = __webpack_require__(81064); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; + + +/***/ }), + +/***/ 57925: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +/** + * Module dependencies + */ + +var util = __webpack_require__(31669); +var toRegex = __webpack_require__(51279); +var extend = __webpack_require__(69148); + +/** + * Local dependencies + */ + +var compilers = __webpack_require__(4756); +var parsers = __webpack_require__(5333); +var cache = __webpack_require__(58250); +var utils = __webpack_require__(41340); +var MAX_LENGTH = 1024 * 64; + +/** + * The main function takes a list of strings and one or more + * glob patterns to use for matching. + * + * ```js + * var nm = require('nanomatch'); + * nm(list, patterns[, options]); + * + * console.log(nm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {Array} `list` A list of strings to match + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +function nanomatch(list, patterns, options) { + patterns = utils.arrayify(patterns); + list = utils.arrayify(list); + + var len = patterns.length; + if (list.length === 0 || len === 0) { + return []; + } + + if (len === 1) { + return nanomatch.match(list, patterns[0], options); + } + + var negated = false; + var omit = []; + var keep = []; + var idx = -1; + + while (++idx < len) { + var pattern = patterns[idx]; + + if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, nanomatch.match(list, pattern.slice(1), options)); + negated = true; + } else { + keep.push.apply(keep, nanomatch.match(list, pattern, options)); + } + } + + // minimatch.match parity + if (negated && keep.length === 0) { + if (options && options.unixify === false) { + keep = list.slice(); + } else { + var unixify = utils.unixify(options); + for (var i = 0; i < list.length; i++) { + keep.push(unixify(list[i])); + } + } + } + + var matches = utils.diff(keep, omit); + if (!options || options.nodupes !== false) { + return utils.unique(matches); + } + + return matches; +} + +/** + * Similar to the main function, but `pattern` must be a string. + * + * ```js + * var nm = require('nanomatch'); + * nm.match(list, pattern[, options]); + * + * console.log(nm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); + * //=> ['a.a', 'a.aa'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @api public + */ + +nanomatch.match = function(list, pattern, options) { + if (Array.isArray(pattern)) { + throw new TypeError('expected pattern to be a string'); + } + + var unixify = utils.unixify(options); + var isMatch = memoize('match', pattern, options, nanomatch.matcher); + var matches = []; + + list = utils.arrayify(list); + var len = list.length; + var idx = -1; + + while (++idx < len) { + var ele = list[idx]; + if (ele === pattern || isMatch(ele)) { + matches.push(utils.value(ele, unixify, options)); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return utils.unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [options.unescape ? utils.unescape(pattern) : pattern]; + } + } + + // if `opts.ignore` was defined, diff ignored list + if (options.ignore) { + matches = nanomatch.not(matches, options.ignore, options); + } + + return options.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * ```js + * var nm = require('nanomatch'); + * nm.isMatch(string, pattern[, options]); + * + * console.log(nm.isMatch('a.a', '*.a')); + * //=> true + * console.log(nm.isMatch('a.b', '*.a')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the string matches the glob pattern. + * @api public + */ + +nanomatch.isMatch = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (utils.isEmptyString(str) || utils.isEmptyString(pattern)) { + return false; + } + + var equals = utils.equalsPattern(options); + if (equals(str)) { + return true; + } + + var isMatch = memoize('isMatch', pattern, options, nanomatch.matcher); + return isMatch(str); +}; + +/** + * Returns true if some of the elements in the given `list` match any of the + * given glob `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.some(list, patterns[, options]); + * + * console.log(nm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(nm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.some = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + + for (var i = 0; i < list.length; i++) { + if (nanomatch(list[i], patterns, options).length === 1) { + return true; + } + } + + return false; +}; + +/** + * Returns true if every element in the given `list` matches + * at least one of the given glob `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.every(list, patterns[, options]); + * + * console.log(nm.every('foo.js', ['foo.js'])); + * // true + * console.log(nm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(nm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(nm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.every = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + + for (var i = 0; i < list.length; i++) { + if (nanomatch(list[i], patterns, options).length !== 1) { + return false; + } + } + + return true; +}; + +/** + * Returns true if **any** of the given glob `patterns` + * match the specified `string`. + * + * ```js + * var nm = require('nanomatch'); + * nm.any(string, patterns[, options]); + * + * console.log(nm.any('a.a', ['b.*', '*.a'])); + * //=> true + * console.log(nm.any('a.a', 'b.*')); + * //=> false + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.any = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) { + return false; + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (nanomatch.isMatch(str, patterns[i], options)) { + return true; + } + } + return false; +}; + +/** + * Returns true if **all** of the given `patterns` + * match the specified string. + * + * ```js + * var nm = require('nanomatch'); + * nm.all(string, patterns[, options]); + * + * console.log(nm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(nm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(nm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(nm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.all = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (!nanomatch.isMatch(str, patterns[i], options)) { + return false; + } + } + return true; +}; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.not(list, patterns[, options]); + * + * console.log(nm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +nanomatch.not = function(list, patterns, options) { + var opts = extend({}, options); + var ignore = opts.ignore; + delete opts.ignore; + + list = utils.arrayify(list); + + var matches = utils.diff(list, nanomatch(list, patterns, opts)); + if (ignore) { + matches = utils.diff(matches, nanomatch(list, ignore)); + } + + return opts.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var nm = require('nanomatch'); + * nm.contains(string, pattern[, options]); + * + * console.log(nm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(nm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +nanomatch.contains = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) { + return false; + } + + var equals = utils.equalsPattern(patterns, options); + if (equals(str)) { + return true; + } + var contains = utils.containsPattern(patterns, options); + if (contains(str)) { + return true; + } + } + + var opts = extend({}, options, {contains: true}); + return nanomatch.any(str, patterns, opts); +}; + +/** + * Returns true if the given pattern and options should enable + * the `matchBase` option. + * @return {Boolean} + * @api private + */ + +nanomatch.matchBase = function(pattern, options) { + if (pattern && pattern.indexOf('/') !== -1 || !options) return false; + return options.basename === true || options.matchBase === true; +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * var nm = require('nanomatch'); + * nm.matchKeys(object, patterns[, options]); + * + * var obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(nm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +nanomatch.matchKeys = function(obj, patterns, options) { + if (!utils.isObject(obj)) { + throw new TypeError('expected the first argument to be an object'); + } + var keys = nanomatch(Object.keys(obj), patterns, options); + return utils.pick(obj, keys); +}; + +/** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * var nm = require('nanomatch'); + * nm.matcher(pattern[, options]); + * + * var isMatch = nm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {Function} Returns a matcher function. + * @api public + */ + +nanomatch.matcher = function matcher(pattern, options) { + if (utils.isEmptyString(pattern)) { + return function() { + return false; + }; + } + + if (Array.isArray(pattern)) { + return compose(pattern, options, matcher); + } + + // if pattern is a regex + if (pattern instanceof RegExp) { + return test(pattern); + } + + // if pattern is invalid + if (!utils.isString(pattern)) { + throw new TypeError('expected pattern to be an array, string or regex'); + } + + // if pattern is a non-glob string + if (!utils.hasSpecialChars(pattern)) { + if (options && options.nocase === true) { + pattern = pattern.toLowerCase(); + } + return utils.matchPath(pattern, options); + } + + // if pattern is a glob string + var re = nanomatch.makeRe(pattern, options); + + // if `options.matchBase` or `options.basename` is defined + if (nanomatch.matchBase(pattern, options)) { + return utils.matchBasename(re, options); + } + + function test(regex) { + var equals = utils.equalsPattern(options); + var unixify = utils.unixify(options); + + return function(str) { + if (equals(str)) { + return true; + } + + if (regex.test(unixify(str))) { + return true; + } + return false; + }; + } + + // create matcher function + var matcherFn = test(re); + // set result object from compiler on matcher function, + // as a non-enumerable property. useful for debugging + utils.define(matcherFn, 'result', re.result); + return matcherFn; +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or + * `null` if the pattern did not match. + * + * ```js + * var nm = require('nanomatch'); + * nm.capture(pattern, string[, options]); + * + * console.log(nm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(nm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +nanomatch.capture = function(pattern, str, options) { + var re = nanomatch.makeRe(pattern, extend({capture: true}, options)); + var unixify = utils.unixify(options); + + function match() { + return function(string) { + var match = re.exec(unixify(string)); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * var nm = require('nanomatch'); + * nm.makeRe(pattern[, options]); + * + * console.log(nm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +nanomatch.makeRe = function(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var opts = utils.extend({wrap: false}, options); + var result = nanomatch.create(pattern, opts); + var regex = toRegex(result.output, opts); + utils.define(regex, 'result', result); + return regex; + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Parses the given glob `pattern` and returns an object with the compiled `output` + * and optional source `map`. + * + * ```js + * var nm = require('nanomatch'); + * nm.create(pattern[, options]); + * + * console.log(nm.create('abc/*.js')); + * // { options: { source: 'string', sourcemap: true }, + * // state: {}, + * // compilers: + * // { ... }, + * // output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: + * // [ ... ], + * // dot: false, + * // input: 'abc/*.js' }, + * // parsingErrors: [], + * // map: + * // { version: 3, + * // sources: [ 'string' ], + * // names: [], + * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', + * // sourcesContent: [ 'abc/*.js' ] }, + * // position: { line: 1, column: 28 }, + * // content: {}, + * // files: {}, + * // idx: 6 } + * ``` + * @param {String} `pattern` Glob pattern to parse and compile. + * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed. + * @return {Object} Returns an object with the parsed AST, compiled string and optional source map. + * @api public + */ + +nanomatch.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + function create() { + return nanomatch.compile(nanomatch.parse(pattern, options), options); + } + return memoize('create', pattern, options, create); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var nm = require('nanomatch'); + * nm.parse(pattern[, options]); + * + * var ast = nm.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +nanomatch.parse = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + function parse() { + var snapdragon = utils.instantiate(null, options); + parsers(snapdragon, options); + + var ast = snapdragon.parse(pattern, options); + utils.define(ast, 'snapdragon', snapdragon); + ast.input = pattern; + return ast; + } + + return memoize('parse', pattern, options, parse); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var nm = require('nanomatch'); + * nm.compile(ast[, options]); + * + * var ast = nm.parse('a/{b,c}/d'); + * console.log(nm.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +nanomatch.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = nanomatch.parse(ast, options); + } + + function compile() { + var snapdragon = utils.instantiate(ast, options); + compilers(snapdragon, options); + return snapdragon.compile(ast, options); + } + + return memoize('compile', ast.input, options, compile); +}; + +/** + * Clear the regex cache. + * + * ```js + * nm.clearCache(); + * ``` + * @api public + */ + +nanomatch.clearCache = function() { + nanomatch.cache.__data__ = {}; +}; + +/** + * Compose a matcher function with the given patterns. + * This allows matcher functions to be compiled once and + * called multiple times. + */ + +function compose(patterns, options, matcher) { + var matchers; + + return memoize('compose', String(patterns), options, function() { + return function(file) { + // delay composition until it's invoked the first time, + // after that it won't be called again + if (!matchers) { + matchers = []; + for (var i = 0; i < patterns.length; i++) { + matchers.push(matcher(patterns[i], options)); + } + } + + var len = matchers.length; + while (len--) { + if (matchers[len](file) === true) { + return true; + } + } + return false; + }; + }); +} + +/** + * Memoize a generated regex or function. A unique key is generated + * from the `type` (usually method name), the `pattern`, and + * user-defined options. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + '=' + pattern, options); + + if (options && options.cache === false) { + return fn(pattern, options); + } + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + cache.set(type, key, val); + return val; +} + +/** + * Expose compiler, parser and cache on `nanomatch` + */ + +nanomatch.compilers = compilers; +nanomatch.parsers = parsers; +nanomatch.cache = cache; + +/** + * Expose `nanomatch` + * @type {Function} + */ + +module.exports = nanomatch; + + +/***/ }), + +/***/ 58250: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +module.exports = new (__webpack_require__(49908))(); + + +/***/ }), + +/***/ 4756: +/***/ (function(module) { + +"use strict"; + + +/** +* Nanomatch compilers +*/ + +module.exports = function(nanomatch, options) { + function slash() { + if (options && typeof options.slash === 'string') { + return options.slash; + } + if (options && typeof options.slash === 'function') { + return options.slash.call(nanomatch); + } + return '\\\\/'; + } + + function star() { + if (options && typeof options.star === 'string') { + return options.star; + } + if (options && typeof options.star === 'function') { + return options.star.call(nanomatch); + } + return '[^' + slash() + ']*?'; + } + + var ast = nanomatch.ast = nanomatch.parser.ast; + ast.state = nanomatch.parser.state; + nanomatch.compiler.state = ast.state; + nanomatch.compiler + + /** + * Negation / escaping + */ + + .set('not', function(node) { + var prev = this.prev(); + if (this.options.nonegate === true || prev.type !== 'bos') { + return this.emit('\\' + node.val, node); + } + return this.emit(node.val, node); + }) + .set('escape', function(node) { + if (this.options.unescape && /^[-\w_.]/.test(node.val)) { + return this.emit(node.val, node); + } + return this.emit('\\' + node.val, node); + }) + .set('quoted', function(node) { + return this.emit(node.val, node); + }) + + /** + * Regex + */ + + .set('dollar', function(node) { + if (node.parent.type === 'bracket') { + return this.emit(node.val, node); + } + return this.emit('\\' + node.val, node); + }) + + /** + * Dot: "." + */ + + .set('dot', function(node) { + if (node.dotfiles === true) this.dotfiles = true; + return this.emit('\\' + node.val, node); + }) + + /** + * Slashes: "/" and "\" + */ + + .set('backslash', function(node) { + return this.emit(node.val, node); + }) + .set('slash', function(node, nodes, i) { + var val = '[' + slash() + ']'; + var parent = node.parent; + var prev = this.prev(); + + // set "node.hasSlash" to true on all ancestor parens nodes + while (parent.type === 'paren' && !parent.hasSlash) { + parent.hasSlash = true; + parent = parent.parent; + } + + if (prev.addQmark) { + val += '?'; + } + + // word boundary + if (node.rest.slice(0, 2) === '\\b') { + return this.emit(val, node); + } + + // globstars + if (node.parsed === '**' || node.parsed === './**') { + this.output = '(?:' + this.output; + return this.emit(val + ')?', node); + } + + // negation + if (node.parsed === '!**' && this.options.nonegate !== true) { + return this.emit(val + '?\\b', node); + } + return this.emit(val, node); + }) + + /** + * Square brackets + */ + + .set('bracket', function(node) { + var close = node.close; + var open = !node.escaped ? '[' : '\\['; + var negated = node.negated; + var inner = node.inner; + var val = node.val; + + if (node.escaped === true) { + inner = inner.replace(/\\?(\W)/g, '\\$1'); + negated = ''; + } + + if (inner === ']-') { + inner = '\\]\\-'; + } + + if (negated && inner.indexOf('.') === -1) { + inner += '.'; + } + if (negated && inner.indexOf('/') === -1) { + inner += '/'; + } + + val = open + negated + inner + close; + return this.emit(val, node); + }) + + /** + * Square: "[.]" (only matches a single character in brackets) + */ + + .set('square', function(node) { + var val = (/^\W/.test(node.val) ? '\\' : '') + node.val; + return this.emit(val, node); + }) + + /** + * Question mark: "?" + */ + + .set('qmark', function(node) { + var prev = this.prev(); + // don't use "slash" variable so that we always avoid + // matching backslashes and slashes with a qmark + var val = '[^.\\\\/]'; + if (this.options.dot || (prev.type !== 'bos' && prev.type !== 'slash')) { + val = '[^\\\\/]'; + } + + if (node.parsed.slice(-1) === '(') { + var ch = node.rest.charAt(0); + if (ch === '!' || ch === '=' || ch === ':') { + return this.emit(node.val, node); + } + } + + if (node.val.length > 1) { + val += '{' + node.val.length + '}'; + } + return this.emit(val, node); + }) + + /** + * Plus + */ + + .set('plus', function(node) { + var prev = node.parsed.slice(-1); + if (prev === ']' || prev === ')') { + return this.emit(node.val, node); + } + if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) { + return this.emit('\\+', node); + } + var ch = this.output.slice(-1); + if (/\w/.test(ch) && !node.inside) { + return this.emit('+\\+?', node); + } + return this.emit('+', node); + }) + + /** + * globstar: '**' + */ + + .set('globstar', function(node, nodes, i) { + if (!this.output) { + this.state.leadingGlobstar = true; + } + + var prev = this.prev(); + var before = this.prev(2); + var next = this.next(); + var after = this.next(2); + var type = prev.type; + var val = node.val; + + if (prev.type === 'slash' && next.type === 'slash') { + if (before.type === 'text') { + this.output += '?'; + + if (after.type !== 'text') { + this.output += '\\b'; + } + } + } + + var parsed = node.parsed; + if (parsed.charAt(0) === '!') { + parsed = parsed.slice(1); + } + + var isInside = node.isInside.paren || node.isInside.brace; + if (parsed && type !== 'slash' && type !== 'bos' && !isInside) { + val = star(); + } else { + val = this.options.dot !== true + ? '(?:(?!(?:[' + slash() + ']|^)\\.).)*?' + : '(?:(?!(?:[' + slash() + ']|^)(?:\\.{1,2})($|[' + slash() + ']))(?!\\.{2}).)*?'; + } + + if ((type === 'slash' || type === 'bos') && this.options.dot !== true) { + val = '(?!\\.)' + val; + } + + if (prev.type === 'slash' && next.type === 'slash' && before.type !== 'text') { + if (after.type === 'text' || after.type === 'star') { + node.addQmark = true; + } + } + + if (this.options.capture) { + val = '(' + val + ')'; + } + + return this.emit(val, node); + }) + + /** + * Star: "*" + */ + + .set('star', function(node, nodes, i) { + var prior = nodes[i - 2] || {}; + var prev = this.prev(); + var next = this.next(); + var type = prev.type; + + function isStart(n) { + return n.type === 'bos' || n.type === 'slash'; + } + + if (this.output === '' && this.options.contains !== true) { + this.output = '(?![' + slash() + '])'; + } + + if (type === 'bracket' && this.options.bash === false) { + var str = next && next.type === 'bracket' ? star() : '*?'; + if (!prev.nodes || prev.nodes[1].type !== 'posix') { + return this.emit(str, node); + } + } + + var prefix = !this.dotfiles && type !== 'text' && type !== 'escape' + ? (this.options.dot ? '(?!(?:^|[' + slash() + '])\\.{1,2}(?:$|[' + slash() + ']))' : '(?!\\.)') + : ''; + + if (isStart(prev) || (isStart(prior) && type === 'not')) { + if (prefix !== '(?!\\.)') { + prefix += '(?!(\\.{2}|\\.[' + slash() + ']))(?=.)'; + } else { + prefix += '(?=.)'; + } + } else if (prefix === '(?!\\.)') { + prefix = ''; + } + + if (prev.type === 'not' && prior.type === 'bos' && this.options.dot === true) { + this.output = '(?!\\.)' + this.output; + } + + var output = prefix + star(); + if (this.options.capture) { + output = '(' + output + ')'; + } + + return this.emit(output, node); + }) + + /** + * Text + */ + + .set('text', function(node) { + return this.emit(node.val, node); + }) + + /** + * End-of-string + */ + + .set('eos', function(node) { + var prev = this.prev(); + var val = node.val; + + this.output = '(?:\\.[' + slash() + '](?=.))?' + this.output; + if (this.state.metachar && prev.type !== 'qmark' && prev.type !== 'slash') { + val += (this.options.contains ? '[' + slash() + ']?' : '(?:[' + slash() + ']|$)'); + } + + return this.emit(val, node); + }); + + /** + * Allow custom compilers to be passed on options + */ + + if (options && typeof options.compilers === 'function') { + options.compilers(nanomatch.compiler); + } +}; + + + +/***/ }), + +/***/ 5333: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var regexNot = __webpack_require__(30931); +var toRegex = __webpack_require__(51279); + +/** + * Characters to use in negation regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var cached; +var NOT_REGEX = '[\\[!*+?$^"\'.\\\\/]+'; +var not = createTextRegex(NOT_REGEX); + +/** + * Nanomatch parsers + */ + +module.exports = function(nanomatch, options) { + var parser = nanomatch.parser; + var opts = parser.options; + + parser.state = { + slashes: 0, + paths: [] + }; + + parser.ast.state = parser.state; + parser + + /** + * Beginning-of-string + */ + + .capture('prefix', function() { + if (this.parsed) return; + var m = this.match(/^\.[\\/]/); + if (!m) return; + this.state.strictOpen = !!this.options.strictOpen; + this.state.addPrefix = true; + }) + + /** + * Escape: "\\." + */ + + .capture('escape', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^(?:\\(.)|([$^]))/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[2] || m[1] + }); + }) + + /** + * Quoted strings + */ + + .capture('quoted', function() { + var pos = this.position(); + var m = this.match(/^["']/); + if (!m) return; + + var quote = m[0]; + if (this.input.indexOf(quote) === -1) { + return pos({ + type: 'escape', + val: quote + }); + } + + var tok = advanceTo(this.input, quote); + this.consume(tok.len); + + return pos({ + type: 'quoted', + val: tok.esc + }); + }) + + /** + * Negations: "!" + */ + + .capture('not', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(this.notRegex || /^!+/); + if (!m) return; + var val = m[0]; + + var isNegated = (val.length % 2) === 1; + if (parsed === '' && !isNegated) { + val = ''; + } + + // if nothing has been parsed, we know `!` is at the start, + // so we need to wrap the result in a negation regex + if (parsed === '' && isNegated && this.options.nonegate !== true) { + this.bos.val = '(?!^(?:'; + this.append = ')$).*'; + val = ''; + } + return pos({ + type: 'not', + val: val + }); + }) + + /** + * Dot: "." + */ + + .capture('dot', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\.+/); + if (!m) return; + + var val = m[0]; + this.state.dot = val === '.' && (parsed === '' || parsed.slice(-1) === '/'); + + return pos({ + type: 'dot', + dotfiles: this.state.dot, + val: val + }); + }) + + /** + * Plus: "+" + */ + + .capture('plus', /^\+(?!\()/) + + /** + * Question mark: "?" + */ + + .capture('qmark', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\?+(?!\()/); + if (!m) return; + + this.state.metachar = true; + this.state.qmark = true; + + return pos({ + type: 'qmark', + parsed: parsed, + val: m[0] + }); + }) + + /** + * Globstar: "**" + */ + + .capture('globstar', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\*{2}(?![*(])(?=[,)/]|$)/); + if (!m) return; + + var type = opts.noglobstar !== true ? 'globstar' : 'star'; + var node = pos({type: type, parsed: parsed}); + this.state.metachar = true; + + while (this.input.slice(0, 4) === '/**/') { + this.input = this.input.slice(3); + } + + node.isInside = { + brace: this.isInside('brace'), + paren: this.isInside('paren') + }; + + if (type === 'globstar') { + this.state.globstar = true; + node.val = '**'; + + } else { + this.state.star = true; + node.val = '*'; + } + + return node; + }) + + /** + * Star: "*" + */ + + .capture('star', function() { + var pos = this.position(); + var starRe = /^(?:\*(?![*(])|[*]{3,}(?!\()|[*]{2}(?![(/]|$)|\*(?=\*\())/; + var m = this.match(starRe); + if (!m) return; + + this.state.metachar = true; + this.state.star = true; + return pos({ + type: 'star', + val: m[0] + }); + }) + + /** + * Slash: "/" + */ + + .capture('slash', function() { + var pos = this.position(); + var m = this.match(/^\//); + if (!m) return; + + this.state.slashes++; + return pos({ + type: 'slash', + val: m[0] + }); + }) + + /** + * Backslash: "\\" + */ + + .capture('backslash', function() { + var pos = this.position(); + var m = this.match(/^\\(?![*+?(){}[\]'"])/); + if (!m) return; + + var val = m[0]; + + if (this.isInside('bracket')) { + val = '\\'; + } else if (val.length > 1) { + val = '\\\\'; + } + + return pos({ + type: 'backslash', + val: val + }); + }) + + /** + * Square: "[.]" + */ + + .capture('square', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^\[([^!^\\])\]/); + if (!m) return; + + return pos({ + type: 'square', + val: m[1] + }); + }) + + /** + * Brackets: "[...]" (basic, this can be overridden by other parsers) + */ + + .capture('bracket', function() { + var pos = this.position(); + var m = this.match(/^(?:\[([!^]?)([^\]]+|\]-)(\]|[^*+?]+)|\[)/); + if (!m) return; + + var val = m[0]; + var negated = m[1] ? '^' : ''; + var inner = (m[2] || '').replace(/\\\\+/, '\\\\'); + var close = m[3] || ''; + + if (m[2] && inner.length < m[2].length) { + val = val.replace(/\\\\+/, '\\\\'); + } + + var esc = this.input.slice(0, 2); + if (inner === '' && esc === '\\]') { + inner += esc; + this.consume(2); + + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + if (ch === ']') { + close = ch; + break; + } + inner += ch; + } + } + + return pos({ + type: 'bracket', + val: val, + escaped: close !== ']', + negated: negated, + inner: inner, + close: close + }); + }) + + /** + * Text + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + return pos({ + type: 'text', + val: m[0] + }); + }); + + /** + * Allow custom parsers to be passed on options + */ + + if (options && typeof options.parsers === 'function') { + options.parsers(nanomatch.parser); + } +}; + +/** + * Advance to the next non-escaped character + */ + +function advanceTo(input, endChar) { + var ch = input.charAt(0); + var tok = { len: 1, val: '', esc: '' }; + var idx = 0; + + function advance() { + if (ch !== '\\') { + tok.esc += '\\' + ch; + tok.val += ch; + } + + ch = input.charAt(++idx); + tok.len++; + + if (ch === '\\') { + advance(); + advance(); + } + } + + while (ch && ch !== endChar) { + advance(); + } + return tok; +} + +/** + * Create text regex + */ + +function createTextRegex(pattern) { + if (cached) return cached; + var opts = {contains: true, strictClose: false}; + var not = regexNot.create(pattern, opts); + var re = toRegex('^(?:[*]\\((?=.)|' + not + ')', opts); + return (cached = re); +} + +/** + * Expose negation string + */ + +module.exports.not = NOT_REGEX; + + +/***/ }), + +/***/ 41340: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var utils = module.exports; +var path = __webpack_require__(85622); + +/** + * Module dependencies + */ + +var isWindows = __webpack_require__(8025)(); +var Snapdragon = __webpack_require__(79285); +utils.define = __webpack_require__(18918); +utils.diff = __webpack_require__(9455); +utils.extend = __webpack_require__(69148); +utils.pick = __webpack_require__(38509); +utils.typeOf = __webpack_require__(42556); +utils.unique = __webpack_require__(19009); + +/** + * Returns true if the given value is effectively an empty string + */ + +utils.isEmptyString = function(val) { + return String(val) === '' || String(val) === './'; +}; + +/** + * Returns true if the platform is windows, or `path.sep` is `\\`. + * This is defined as a function to allow `path.sep` to be set in unit tests, + * or by the user, if there is a reason to do so. + * @return {Boolean} + */ + +utils.isWindows = function() { + return path.sep === '\\' || isWindows === true; +}; + +/** + * Return the last element from an array + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +/** + * Get the `Snapdragon` instance to use + */ + +utils.instantiate = function(ast, options) { + var snapdragon; + // if an instance was created by `.parse`, use that instance + if (utils.typeOf(ast) === 'object' && ast.snapdragon) { + snapdragon = ast.snapdragon; + // if the user supplies an instance on options, use that instance + } else if (utils.typeOf(options) === 'object' && options.snapdragon) { + snapdragon = options.snapdragon; + // create a new instance + } else { + snapdragon = new Snapdragon(options); + } + + utils.define(snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.call(this, str, options); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strictErrors !== true) { + var open = last.nodes[0]; + var inner = last.nodes[1]; + if (last.type === 'bracket') { + if (inner.val.charAt(0) === '[') { + inner.val = '\\' + inner.val; + } + + } else { + open.val = '\\' + open.val; + var sibling = open.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); + + return snapdragon; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + if (typeof options === 'undefined') { + return pattern; + } + var key = pattern; + for (var prop in options) { + if (options.hasOwnProperty(prop)) { + key += ';' + prop + '=' + String(options[prop]); + } + } + return key; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isString = function(val) { + return typeof val === 'string'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isRegex = function(val) { + return utils.typeOf(val) === 'regexp'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isObject = function(val) { + return utils.typeOf(val) === 'object'; +}; + +/** + * Escape regex characters in the given string + */ + +utils.escapeRegex = function(str) { + return str.replace(/[-[\]{}()^$|*+?.\\/\s]/g, '\\$&'); +}; + +/** + * Combines duplicate characters in the provided `input` string. + * @param {String} `input` + * @returns {String} + */ + +utils.combineDupes = function(input, patterns) { + patterns = utils.arrayify(patterns).join('|').split('|'); + patterns = patterns.map(function(s) { + return s.replace(/\\?([+*\\/])/g, '\\$1'); + }); + var substr = patterns.join('|'); + var regex = new RegExp('(' + substr + ')(?=\\1)', 'g'); + return input.replace(regex, ''); +}; + +/** + * Returns true if the given `str` has special characters + */ + +utils.hasSpecialChars = function(str) { + return /(?:(?:(^|\/)[!.])|[*?+()|[\]{}]|[+@]\()/.test(str); +}; + +/** + * Normalize slashes in the given filepath. + * + * @param {String} `filepath` + * @return {String} + */ + +utils.toPosixPath = function(str) { + return str.replace(/\\+/g, '/'); +}; + +/** + * Strip backslashes before special characters in a string. + * + * @param {String} `str` + * @return {String} + */ + +utils.unescape = function(str) { + return utils.toPosixPath(str.replace(/\\(?=[*+?!.])/g, '')); +}; + +/** + * Strip the drive letter from a windows filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripDrive = function(fp) { + return utils.isWindows() ? fp.replace(/^[a-z]:[\\/]+?/i, '/') : fp; +}; + +/** + * Strip the prefix from a filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripPrefix = function(str) { + if (str.charAt(0) === '.' && (str.charAt(1) === '/' || str.charAt(1) === '\\')) { + return str.slice(2); + } + return str; +}; + +/** + * Returns true if `str` is a common character that doesn't need + * to be processed to be used for matching. + * @param {String} `str` + * @return {Boolean} + */ + +utils.isSimpleChar = function(str) { + return str.trim() === '' || str === '.'; +}; + +/** + * Returns true if the given str is an escaped or + * unescaped path character + */ + +utils.isSlash = function(str) { + return str === '/' || str === '\\/' || str === '\\' || str === '\\\\'; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function(pattern, options) { + return (options && options.contains) + ? utils.containsPattern(pattern, options) + : utils.equalsPattern(pattern, options); +}; + +/** + * Returns true if the given (original) filepath or unixified path are equal + * to the given pattern. + */ + +utils._equals = function(filepath, unixPath, pattern) { + return pattern === filepath || pattern === unixPath; +}; + +/** + * Returns true if the given (original) filepath or unixified path contain + * the given pattern. + */ + +utils._contains = function(filepath, unixPath, pattern) { + return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.equalsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function fn(filepath) { + var equal = utils._equals(filepath, unixify(filepath), pattern); + if (equal === true || options.nocase !== true) { + return equal; + } + var lower = filepath.toLowerCase(); + return utils._equals(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.containsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function(filepath) { + var contains = utils._contains(filepath, unixify(filepath), pattern); + if (contains === true || options.nocase !== true) { + return contains; + } + var lower = filepath.toLowerCase(); + return utils._contains(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` Matching regex + * @return {Function} + */ + +utils.matchBasename = function(re) { + return function(filepath) { + return re.test(filepath) || re.test(path.basename(filepath)); + }; +}; + +/** + * Returns the given value unchanced. + * @return {any} + */ + +utils.identity = function(val) { + return val; +}; + +/** + * Determines the filepath to return based on the provided options. + * @return {any} + */ + +utils.value = function(str, unixify, options) { + if (options && options.unixify === false) { + return str; + } + if (options && typeof options.unixify === 'function') { + return options.unixify(str); + } + return unixify(str); +}; + +/** + * Returns a function that normalizes slashes in a string to forward + * slashes, strips `./` from beginning of paths, and optionally unescapes + * special characters. + * @return {Function} + */ + +utils.unixify = function(options) { + var opts = options || {}; + return function(filepath) { + if (opts.stripPrefix !== false) { + filepath = utils.stripPrefix(filepath); + } + if (opts.unescape === true) { + filepath = utils.unescape(filepath); + } + if (opts.unixify === true || utils.isWindows()) { + filepath = utils.toPosixPath(filepath); + } + return filepath; + }; +}; + + +/***/ }), + +/***/ 18918: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * define-property + * + * Copyright (c) 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isobject = __webpack_require__(96667); +var isDescriptor = __webpack_require__(44133); +var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) + ? Reflect.defineProperty + : Object.defineProperty; + +module.exports = function defineProperty(obj, key, val) { + if (!isobject(obj) && typeof obj !== 'function' && !Array.isArray(obj)) { + throw new TypeError('expected an object, function, or array'); + } + + if (typeof key !== 'string') { + throw new TypeError('expected "key" to be a string'); + } + + if (isDescriptor(val)) { + define(obj, key, val); + return obj; + } + + define(obj, key, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); + + return obj; +}; + + +/***/ }), + +/***/ 69148: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isExtendable = __webpack_require__(61781); +var assignSymbols = __webpack_require__(64353); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} + + +/***/ }), + +/***/ 61781: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isPlainObject = __webpack_require__(81064); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; + + +/***/ }), + +/***/ 8025: +/***/ (function(module, exports) { + +/*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +(function(factory) { + if (exports && typeof exports === 'object' && "object" !== 'undefined') { + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + define([], factory); + } else if (typeof window !== 'undefined') { + window.isWindows = factory(); + } else if (typeof global !== 'undefined') { + global.isWindows = factory(); + } else if (typeof self !== 'undefined') { + self.isWindows = factory(); + } else { + this.isWindows = factory(); + } +})(function() { + 'use strict'; + return function isWindows() { + return process && (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE)); + }; +}); + + +/***/ }), + +/***/ 42556: +/***/ (function(module) { + +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} + + +/***/ }), + +/***/ 31368: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var typeOf = __webpack_require__(48865); +var copyDescriptor = __webpack_require__(3605); +var define = __webpack_require__(5477); + +/** + * Copy static properties, prototype properties, and descriptors from one object to another. + * + * ```js + * function App() {} + * var proto = App.prototype; + * App.prototype.set = function() {}; + * App.prototype.get = function() {}; + * + * var obj = {}; + * copy(obj, proto); + * ``` + * @param {Object} `receiver` + * @param {Object} `provider` + * @param {String|Array} `omit` One or more properties to omit + * @return {Object} + * @api public + */ + +function copy(receiver, provider, omit) { + if (!isObject(receiver)) { + throw new TypeError('expected receiving object to be an object.'); + } + if (!isObject(provider)) { + throw new TypeError('expected providing object to be an object.'); + } + + var props = nativeKeys(provider); + var keys = Object.keys(provider); + var len = props.length; + omit = arrayify(omit); + + while (len--) { + var key = props[len]; + + if (has(keys, key)) { + define(receiver, key, provider[key]); + } else if (!(key in receiver) && !has(omit, key)) { + copyDescriptor(receiver, provider, key); + } + } +}; + +/** + * Return true if the given value is an object or function + */ + +function isObject(val) { + return typeOf(val) === 'object' || typeof val === 'function'; +} + +/** + * Returns true if an array has any of the given elements, or an + * object has any of the give keys. + * + * ```js + * has(['a', 'b', 'c'], 'c'); + * //=> true + * + * has(['a', 'b', 'c'], ['c', 'z']); + * //=> true + * + * has({a: 'b', c: 'd'}, ['c', 'z']); + * //=> true + * ``` + * @param {Object} `obj` + * @param {String|Array} `val` + * @return {Boolean} + */ + +function has(obj, val) { + val = arrayify(val); + var len = val.length; + + if (isObject(obj)) { + for (var key in obj) { + if (val.indexOf(key) > -1) { + return true; + } + } + + var keys = nativeKeys(obj); + return has(keys, val); + } + + if (Array.isArray(obj)) { + var arr = obj; + while (len--) { + if (arr.indexOf(val[len]) > -1) { + return true; + } + } + return false; + } + + throw new TypeError('expected an array or object.'); +} + +/** + * Cast the given value to an array. + * + * ```js + * arrayify('foo'); + * //=> ['foo'] + * + * arrayify(['foo']); + * //=> ['foo'] + * ``` + * + * @param {String|Array} `val` + * @return {Array} + */ + +function arrayify(val) { + return val ? (Array.isArray(val) ? val : [val]) : []; +} + +/** + * Returns true if a value has a `contructor` + * + * ```js + * hasConstructor({}); + * //=> true + * + * hasConstructor(Object.create(null)); + * //=> false + * ``` + * @param {Object} `value` + * @return {Boolean} + */ + +function hasConstructor(val) { + return isObject(val) && typeof val.constructor !== 'undefined'; +} + +/** + * Get the native `ownPropertyNames` from the constructor of the + * given `object`. An empty array is returned if the object does + * not have a constructor. + * + * ```js + * nativeKeys({a: 'b', b: 'c', c: 'd'}) + * //=> ['a', 'b', 'c'] + * + * nativeKeys(function(){}) + * //=> ['length', 'caller'] + * ``` + * + * @param {Object} `obj` Object that has a `constructor`. + * @return {Array} Array of keys. + */ + +function nativeKeys(val) { + if (!hasConstructor(val)) return []; + return Object.getOwnPropertyNames(val); +} + +/** + * Expose `copy` + */ + +module.exports = copy; + +/** + * Expose `copy.has` for tests + */ + +module.exports.has = has; + + +/***/ }), + +/***/ 59248: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * object-visit + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isObject = __webpack_require__(96667); + +module.exports = function visit(thisArg, method, target, val) { + if (!isObject(thisArg) && typeof thisArg !== 'function') { + throw new Error('object-visit expects `thisArg` to be an object.'); + } + + if (typeof method !== 'string') { + throw new Error('object-visit expects `method` name to be a string'); + } + + if (typeof thisArg[method] !== 'function') { + return thisArg; + } + + var args = [].slice.call(arguments, 3); + target = target || {}; + + for (var key in target) { + var arr = [key, target[key]].concat(args); + thisArg[method].apply(thisArg, arr); + } + return thisArg; +}; + + +/***/ }), + +/***/ 38509: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * object.pick + * + * Copyright (c) 2014-2015 Jon Schlinkert, contributors. + * Licensed under the MIT License + */ + + + +var isObject = __webpack_require__(96667); + +module.exports = function pick(obj, keys) { + if (!isObject(obj) && typeof obj !== 'function') { + return {}; + } + + var res = {}; + if (typeof keys === 'string') { + if (keys in obj) { + res[keys] = obj[keys]; + } + return res; + } + + var len = keys.length; + var idx = -1; + + while (++idx < len) { + var key = keys[idx]; + if (key in obj) { + res[key] = obj[key]; + } + } + return res; +}; + + +/***/ }), + +/***/ 27255: +/***/ (function(module) { + +/*! + * pascalcase + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +function pascalcase(str) { + if (typeof str !== 'string') { + throw new TypeError('expected a string.'); + } + str = str.replace(/([A-Z])/g, ' $1'); + if (str.length === 1) { return str.toUpperCase(); } + str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase(); + str = str.charAt(0).toUpperCase() + str.slice(1); + return str.replace(/[\W_]+(\w|$)/g, function (_, ch) { + return ch.toUpperCase(); + }); +} + +module.exports = pascalcase; + + +/***/ }), + +/***/ 88412: +/***/ (function(module) { + +"use strict"; + + +/** + * POSIX character classes + */ + +module.exports = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; + + +/***/ }), + +/***/ 58404: +/***/ (function(module) { + +"use strict"; + + +if (typeof process === 'undefined' || + !process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} + + + +/***/ }), + +/***/ 59570: +/***/ (function(module) { + +/*! + * prr + * (c) 2013 Rod Vagg + * https://github.com/rvagg/prr + * License: MIT + */ + +(function (name, context, definition) { + if ( true && module.exports) + module.exports = definition() + else + context[name] = definition() +})('prr', this, function() { + + var setProperty = typeof Object.defineProperty == 'function' + ? function (obj, key, options) { + Object.defineProperty(obj, key, options) + return obj + } + : function (obj, key, options) { // < es5 + obj[key] = options.value + return obj + } + + , makeOptions = function (value, options) { + var oo = typeof options == 'object' + , os = !oo && typeof options == 'string' + , op = function (p) { + return oo + ? !!options[p] + : os + ? options.indexOf(p[0]) > -1 + : false + } + + return { + enumerable : op('enumerable') + , configurable : op('configurable') + , writable : op('writable') + , value : value + } + } + + , prr = function (obj, key, value, options) { + var k + + options = makeOptions(value, options) + + if (typeof key == 'object') { + for (k in key) { + if (Object.hasOwnProperty.call(key, k)) { + options.value = key[k] + setProperty(obj, k, options) + } + } + return obj + } + + return setProperty(obj, key, options) + } + + return prr +}) + +/***/ }), + +/***/ 79822: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +module.exports = __webpack_require__(76417).randomBytes + + +/***/ }), + +/***/ 42770: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node 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. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + + + +/**/ + +var pna = __webpack_require__(58404); +/**/ + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var util = Object.create(__webpack_require__(78334)); +util.inherits = __webpack_require__(2989); +/**/ + +var Readable = __webpack_require__(79341); +var Writable = __webpack_require__(78063); + +util.inherits(Duplex, Readable); + +{ + // avoid scope creep, the keys array can then be collected + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); + +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + + pna.nextTick(cb, err); +}; + +/***/ }), + +/***/ 60143: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node 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. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + + + +module.exports = PassThrough; + +var Transform = __webpack_require__(62826); + +/**/ +var util = Object.create(__webpack_require__(78334)); +util.inherits = __webpack_require__(2989); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; + +/***/ }), + +/***/ 79341: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node 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. + + + +/**/ + +var pna = __webpack_require__(58404); +/**/ + +module.exports = Readable; + +/**/ +var isArray = __webpack_require__(21352); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = __webpack_require__(28614).EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = __webpack_require__(1065); +/**/ + +/**/ + +var Buffer = __webpack_require__(96788).Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +/**/ +var util = Object.create(__webpack_require__(78334)); +util.inherits = __webpack_require__(2989); +/**/ + +/**/ +var debugUtil = __webpack_require__(31669); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = __webpack_require__(28878); +var destroyImpl = __webpack_require__(87915); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +function ReadableState(options, stream) { + Duplex = Duplex || __webpack_require__(42770); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = __webpack_require__(7395)/* .StringDecoder */ .s; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || __webpack_require__(42770); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); +} + +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); + +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; + +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + + return needMoreData(state); +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = __webpack_require__(7395)/* .StringDecoder */ .s; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, unpipeInfo); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this, unpipeInfo); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + + var state = this._readableState; + var paused = false; + + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + + _this.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return this; +}; + +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._readableState.highWaterMark; + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = Buffer.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} + +/***/ }), + +/***/ 62826: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node 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. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + + + +module.exports = Transform; + +var Duplex = __webpack_require__(42770); + +/**/ +var util = Object.create(__webpack_require__(78334)); +util.inherits = __webpack_require__(2989); +/**/ + +util.inherits(Transform, Duplex); + +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } + + ts.writechunk = null; + ts.writecb = null; + + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + + cb(er); + + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); + + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} + +/***/ }), + +/***/ 78063: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node 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. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + + + +/**/ + +var pna = __webpack_require__(58404); +/**/ + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = Object.create(__webpack_require__(78334)); +util.inherits = __webpack_require__(2989); +/**/ + +/**/ +var internalUtil = { + deprecate: __webpack_require__(92262) +}; +/**/ + +/**/ +var Stream = __webpack_require__(1065); +/**/ + +/**/ + +var Buffer = __webpack_require__(96788).Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +var destroyImpl = __webpack_require__(87915); + +util.inherits(Writable, Stream); + +function nop() {} + +function WritableState(options, stream) { + Duplex = Duplex || __webpack_require__(42770); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || __webpack_require__(42770); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + + if (typeof options.final === 'function') this._final = options.final; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + pna.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + pna.nextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} + +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + pna.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } +} + +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); + +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; + +/***/ }), + +/***/ 28878: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Buffer = __webpack_require__(96788).Buffer; +var util = __webpack_require__(31669); + +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} + +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); + + this.head = null; + this.tail = null; + this.length = 0; + } + + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; + + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + }; + + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; + + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + if (this.length === 1) return this.head.data; + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + + return BufferList; +}(); + +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} + +/***/ }), + +/***/ 87915: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +/**/ + +var pna = __webpack_require__(58404); +/**/ + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + pna.nextTick(emitErrorNT, this, err); + } + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + + this._destroy(err || null, function (err) { + if (!cb && err) { + pna.nextTick(emitErrorNT, _this, err); + if (_this._writableState) { + _this._writableState.errorEmitted = true; + } + } else if (cb) { + cb(err); + } + }); + + return this; +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} + +function emitErrorNT(self, err) { + self.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy +}; + +/***/ }), + +/***/ 1065: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +module.exports = __webpack_require__(92413); + + +/***/ }), + +/***/ 96788: +/***/ (function(module, exports, __webpack_require__) { + +/* eslint-disable node/no-deprecated-api */ +var buffer = __webpack_require__(64293) +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} + + +/***/ }), + +/***/ 7395: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node 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. + + + +/**/ + +var Buffer = __webpack_require__(96788).Buffer; +/**/ + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.s = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer.allocUnsafe(nb); +} + +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; + +StringDecoder.prototype.end = utf8End; + +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; + +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; + +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. If an invalid byte is detected, -2 is returned. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return byte >> 6 === 0x02 ? -1 : -2; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + } + return nb; + } + return 0; +} + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'; + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'; + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'; + } + } + } +} + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} + +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} + +// For UTF-8, a replacement character is added when ending on a partial +// character. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'; + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} + +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} + +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); +} + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); +} + +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} + +/***/ }), + +/***/ 68193: +/***/ (function(module, exports, __webpack_require__) { + +var Stream = __webpack_require__(92413); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = __webpack_require__(79341); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = __webpack_require__(78063); + exports.Duplex = __webpack_require__(42770); + exports.Transform = __webpack_require__(62826); + exports.PassThrough = __webpack_require__(60143); +} + + +/***/ }), + +/***/ 30931: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var extend = __webpack_require__(39700); +var safe = __webpack_require__(71217); + +/** + * The main export is a function that takes a `pattern` string and an `options` object. + * + * ```js + & var not = require('regex-not'); + & console.log(not('foo')); + & //=> /^(?:(?!^(?:foo)$).)*$/ + * ``` + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {RegExp} Converts the given `pattern` to a regex using the specified `options`. + * @api public + */ + +function toRegex(pattern, options) { + return new RegExp(toRegex.create(pattern, options)); +} + +/** + * Create a regex-compatible string from the given `pattern` and `options`. + * + * ```js + & var not = require('regex-not'); + & console.log(not.create('foo')); + & //=> '^(?:(?!^(?:foo)$).)*$' + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {String} + * @api public + */ + +toRegex.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var opts = extend({}, options); + if (opts.contains === true) { + opts.strictNegate = false; + } + + var open = opts.strictOpen !== false ? '^' : ''; + var close = opts.strictClose !== false ? '$' : ''; + var endChar = opts.endChar ? opts.endChar : '+'; + var str = pattern; + + if (opts.strictNegate === false) { + str = '(?:(?!(?:' + pattern + ')).)' + endChar; + } else { + str = '(?:(?!^(?:' + pattern + ')$).)' + endChar; + } + + var res = open + str + close; + if (opts.safe === true && safe(res) === false) { + throw new Error('potentially unsafe regular expression: ' + res); + } + + return res; +}; + +/** + * Expose `toRegex` + */ + +module.exports = toRegex; + + +/***/ }), + +/***/ 39700: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isExtendable = __webpack_require__(93295); +var assignSymbols = __webpack_require__(64353); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} + + +/***/ }), + +/***/ 93295: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isPlainObject = __webpack_require__(81064); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; + + +/***/ }), + +/***/ 69523: +/***/ (function(module) { + +"use strict"; +/*! + * repeat-element + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Licensed under the MIT license. + */ + + + +module.exports = function repeat(ele, num) { + var arr = new Array(num); + + for (var i = 0; i < num; i++) { + arr[i] = ele; + } + + return arr; +}; + + +/***/ }), + +/***/ 6332: +/***/ (function(module) { + +"use strict"; +/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +/** + * Results cache + */ + +var res = ''; +var cache; + +/** + * Expose `repeat` + */ + +module.exports = repeat; + +/** + * Repeat the given `string` the specified `number` + * of times. + * + * **Example:** + * + * ```js + * var repeat = require('repeat-string'); + * repeat('A', 5); + * //=> AAAAA + * ``` + * + * @param {String} `string` The string to repeat + * @param {Number} `number` The number of times to repeat the string + * @return {String} Repeated string + * @api public + */ + +function repeat(str, num) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + // cover common, quick use cases + if (num === 1) return str; + if (num === 2) return str + str; + + var max = str.length * num; + if (cache !== str || typeof cache === 'undefined') { + cache = str; + res = ''; + } else if (res.length >= max) { + return res.substr(0, max); + } + + while (max > res.length && num > 1) { + if (num & 1) { + res += str; + } + + num >>= 1; + str += str; + } + + res += str; + res = res.substr(0, max); + return res; +} + + +/***/ }), + +/***/ 25622: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var util = __webpack_require__(10265); +var types = __webpack_require__(40432); +var sets = __webpack_require__(28135); +var positions = __webpack_require__(54771); + + +module.exports = function(regexpStr) { + var i = 0, l, c, + start = { type: types.ROOT, stack: []}, + + // Keep track of last clause/group and stack. + lastGroup = start, + last = start.stack, + groupStack = []; + + + var repeatErr = function(i) { + util.error(regexpStr, 'Nothing to repeat at column ' + (i - 1)); + }; + + // Decode a few escaped characters. + var str = util.strToChars(regexpStr); + l = str.length; + + // Iterate through each character in string. + while (i < l) { + c = str[i++]; + + switch (c) { + // Handle escaped characters, inclues a few sets. + case '\\': + c = str[i++]; + + switch (c) { + case 'b': + last.push(positions.wordBoundary()); + break; + + case 'B': + last.push(positions.nonWordBoundary()); + break; + + case 'w': + last.push(sets.words()); + break; + + case 'W': + last.push(sets.notWords()); + break; + + case 'd': + last.push(sets.ints()); + break; + + case 'D': + last.push(sets.notInts()); + break; + + case 's': + last.push(sets.whitespace()); + break; + + case 'S': + last.push(sets.notWhitespace()); + break; + + default: + // Check if c is integer. + // In which case it's a reference. + if (/\d/.test(c)) { + last.push({ type: types.REFERENCE, value: parseInt(c, 10) }); + + // Escaped character. + } else { + last.push({ type: types.CHAR, value: c.charCodeAt(0) }); + } + } + + break; + + + // Positionals. + case '^': + last.push(positions.begin()); + break; + + case '$': + last.push(positions.end()); + break; + + + // Handle custom sets. + case '[': + // Check if this class is 'anti' i.e. [^abc]. + var not; + if (str[i] === '^') { + not = true; + i++; + } else { + not = false; + } + + // Get all the characters in class. + var classTokens = util.tokenizeClass(str.slice(i), regexpStr); + + // Increase index by length of class. + i += classTokens[1]; + last.push({ + type: types.SET, + set: classTokens[0], + not: not, + }); + + break; + + + // Class of any character except \n. + case '.': + last.push(sets.anyChar()); + break; + + + // Push group onto stack. + case '(': + // Create group. + var group = { + type: types.GROUP, + stack: [], + remember: true, + }; + + c = str[i]; + + // If if this is a special kind of group. + if (c === '?') { + c = str[i + 1]; + i += 2; + + // Match if followed by. + if (c === '=') { + group.followedBy = true; + + // Match if not followed by. + } else if (c === '!') { + group.notFollowedBy = true; + + } else if (c !== ':') { + util.error(regexpStr, + 'Invalid group, character \'' + c + + '\' after \'?\' at column ' + (i - 1)); + } + + group.remember = false; + } + + // Insert subgroup into current group stack. + last.push(group); + + // Remember the current group for when the group closes. + groupStack.push(lastGroup); + + // Make this new group the current group. + lastGroup = group; + last = group.stack; + break; + + + // Pop group out of stack. + case ')': + if (groupStack.length === 0) { + util.error(regexpStr, 'Unmatched ) at column ' + (i - 1)); + } + lastGroup = groupStack.pop(); + + // Check if this group has a PIPE. + // To get back the correct last stack. + last = lastGroup.options ? + lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack; + break; + + + // Use pipe character to give more choices. + case '|': + // Create array where options are if this is the first PIPE + // in this clause. + if (!lastGroup.options) { + lastGroup.options = [lastGroup.stack]; + delete lastGroup.stack; + } + + // Create a new stack and add to options for rest of clause. + var stack = []; + lastGroup.options.push(stack); + last = stack; + break; + + + // Repetition. + // For every repetition, remove last element from last stack + // then insert back a RANGE object. + // This design is chosen because there could be more than + // one repetition symbols in a regex i.e. `a?+{2,3}`. + case '{': + var rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max; + if (rs !== null) { + if (last.length === 0) { + repeatErr(i); + } + min = parseInt(rs[1], 10); + max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min; + i += rs[0].length; + + last.push({ + type: types.REPETITION, + min: min, + max: max, + value: last.pop(), + }); + } else { + last.push({ + type: types.CHAR, + value: 123, + }); + } + break; + + case '?': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: 1, + value: last.pop(), + }); + break; + + case '+': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 1, + max: Infinity, + value: last.pop(), + }); + break; + + case '*': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: Infinity, + value: last.pop(), + }); + break; + + + // Default is a character that is not `\[](){}?+*^$`. + default: + last.push({ + type: types.CHAR, + value: c.charCodeAt(0), + }); + } + + } + + // Check if any groups have not been closed. + if (groupStack.length !== 0) { + util.error(regexpStr, 'Unterminated group'); + } + + return start; +}; + +module.exports.types = types; + + +/***/ }), + +/***/ 54771: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var types = __webpack_require__(40432); + +exports.wordBoundary = function() { + return { type: types.POSITION, value: 'b' }; +}; + +exports.nonWordBoundary = function() { + return { type: types.POSITION, value: 'B' }; +}; + +exports.begin = function() { + return { type: types.POSITION, value: '^' }; +}; + +exports.end = function() { + return { type: types.POSITION, value: '$' }; +}; + + +/***/ }), + +/***/ 28135: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var types = __webpack_require__(40432); + +var INTS = function() { + return [{ type: types.RANGE , from: 48, to: 57 }]; +}; + +var WORDS = function() { + return [ + { type: types.CHAR, value: 95 }, + { type: types.RANGE, from: 97, to: 122 }, + { type: types.RANGE, from: 65, to: 90 } + ].concat(INTS()); +}; + +var WHITESPACE = function() { + return [ + { type: types.CHAR, value: 9 }, + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 11 }, + { type: types.CHAR, value: 12 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 32 }, + { type: types.CHAR, value: 160 }, + { type: types.CHAR, value: 5760 }, + { type: types.CHAR, value: 6158 }, + { type: types.CHAR, value: 8192 }, + { type: types.CHAR, value: 8193 }, + { type: types.CHAR, value: 8194 }, + { type: types.CHAR, value: 8195 }, + { type: types.CHAR, value: 8196 }, + { type: types.CHAR, value: 8197 }, + { type: types.CHAR, value: 8198 }, + { type: types.CHAR, value: 8199 }, + { type: types.CHAR, value: 8200 }, + { type: types.CHAR, value: 8201 }, + { type: types.CHAR, value: 8202 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + { type: types.CHAR, value: 8239 }, + { type: types.CHAR, value: 8287 }, + { type: types.CHAR, value: 12288 }, + { type: types.CHAR, value: 65279 } + ]; +}; + +var NOTANYCHAR = function() { + return [ + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + ]; +}; + +// Predefined class objects. +exports.words = function() { + return { type: types.SET, set: WORDS(), not: false }; +}; + +exports.notWords = function() { + return { type: types.SET, set: WORDS(), not: true }; +}; + +exports.ints = function() { + return { type: types.SET, set: INTS(), not: false }; +}; + +exports.notInts = function() { + return { type: types.SET, set: INTS(), not: true }; +}; + +exports.whitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: false }; +}; + +exports.notWhitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: true }; +}; + +exports.anyChar = function() { + return { type: types.SET, set: NOTANYCHAR(), not: true }; +}; + + +/***/ }), + +/***/ 40432: +/***/ (function(module) { + +module.exports = { + ROOT : 0, + GROUP : 1, + POSITION : 2, + SET : 3, + RANGE : 4, + REPETITION : 5, + REFERENCE : 6, + CHAR : 7, +}; + + +/***/ }), + +/***/ 10265: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var types = __webpack_require__(40432); +var sets = __webpack_require__(28135); + + +// All of these are private and only used by randexp. +// It's assumed that they will always be called with the correct input. + +var CTRL = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?'; +var SLSH = { '0': 0, 't': 9, 'n': 10, 'v': 11, 'f': 12, 'r': 13 }; + +/** + * Finds character representations in str and convert all to + * their respective characters + * + * @param {String} str + * @return {String} + */ +exports.strToChars = function(str) { + /* jshint maxlen: false */ + var chars_regex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g; + str = str.replace(chars_regex, function(s, b, lbs, a16, b16, c8, dctrl, eslsh) { + if (lbs) { + return s; + } + + var code = b ? 8 : + a16 ? parseInt(a16, 16) : + b16 ? parseInt(b16, 16) : + c8 ? parseInt(c8, 8) : + dctrl ? CTRL.indexOf(dctrl) : + SLSH[eslsh]; + + var c = String.fromCharCode(code); + + // Escape special regex characters. + if (/[\[\]{}\^$.|?*+()]/.test(c)) { + c = '\\' + c; + } + + return c; + }); + + return str; +}; + + +/** + * turns class into tokens + * reads str until it encounters a ] not preceeded by a \ + * + * @param {String} str + * @param {String} regexpStr + * @return {Array., Number>} + */ +exports.tokenizeClass = function(str, regexpStr) { + /* jshint maxlen: false */ + var tokens = []; + var regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g; + var rs, c; + + + while ((rs = regexp.exec(str)) != null) { + if (rs[1]) { + tokens.push(sets.words()); + + } else if (rs[2]) { + tokens.push(sets.ints()); + + } else if (rs[3]) { + tokens.push(sets.whitespace()); + + } else if (rs[4]) { + tokens.push(sets.notWords()); + + } else if (rs[5]) { + tokens.push(sets.notInts()); + + } else if (rs[6]) { + tokens.push(sets.notWhitespace()); + + } else if (rs[7]) { + tokens.push({ + type: types.RANGE, + from: (rs[8] || rs[9]).charCodeAt(0), + to: rs[10].charCodeAt(0), + }); + + } else if (c = rs[12]) { + tokens.push({ + type: types.CHAR, + value: c.charCodeAt(0), + }); + + } else { + return [tokens, regexp.lastIndex]; + } + } + + exports.error(regexpStr, 'Unterminated character class'); +}; + + +/** + * Shortcut to throw errors. + * + * @param {String} regexp + * @param {String} msg + */ +exports.error = function(regexp, msg) { + throw new SyntaxError('Invalid regular expression: /' + regexp + '/: ' + msg); +}; + + +/***/ }), + +/***/ 71217: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var parse = __webpack_require__(25622); +var types = parse.types; + +module.exports = function (re, opts) { + if (!opts) opts = {}; + var replimit = opts.limit === undefined ? 25 : opts.limit; + + if (isRegExp(re)) re = re.source; + else if (typeof re !== 'string') re = String(re); + + try { re = parse(re) } + catch (err) { return false } + + var reps = 0; + return (function walk (node, starHeight) { + if (node.type === types.REPETITION) { + starHeight ++; + reps ++; + if (starHeight > 1) return false; + if (reps > replimit) return false; + } + + if (node.options) { + for (var i = 0, len = node.options.length; i < len; i++) { + var ok = walk({ stack: node.options[i] }, starHeight); + if (!ok) return false; + } + } + var stack = node.stack || (node.value && node.value.stack); + if (!stack) return true; + + for (var i = 0; i < stack.length; i++) { + var ok = walk(stack[i], starHeight); + if (!ok) return false; + } + + return true; + })(re, 0); +}; + +function isRegExp (x) { + return {}.toString.call(x) === '[object RegExp]'; +} + + +/***/ }), + +/***/ 85841: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + + +var randomBytes = __webpack_require__(79822); + +// Generate an internal UID to make the regexp pattern harder to guess. +var UID_LENGTH = 16; +var UID = generateUID(); +var PLACE_HOLDER_REGEXP = new RegExp('(\\\\)?"@__(F|R|D|M|S|U|I)-' + UID + '-(\\d+)__@"', 'g'); + +var IS_NATIVE_CODE_REGEXP = /\{\s*\[native code\]\s*\}/g; +var IS_PURE_FUNCTION = /function.*?\(/; +var IS_ARROW_FUNCTION = /.*?=>.*?/; +var UNSAFE_CHARS_REGEXP = /[<>\/\u2028\u2029]/g; + +var RESERVED_SYMBOLS = ['*', 'async']; + +// Mapping of unsafe HTML and invalid JavaScript line terminator chars to their +// Unicode char counterparts which are safe to use in JavaScript strings. +var ESCAPED_CHARS = { + '<' : '\\u003C', + '>' : '\\u003E', + '/' : '\\u002F', + '\u2028': '\\u2028', + '\u2029': '\\u2029' +}; + +function escapeUnsafeChars(unsafeChar) { + return ESCAPED_CHARS[unsafeChar]; +} + +function generateUID() { + var bytes = randomBytes(UID_LENGTH); + var result = ''; + for(var i=0; i arg1+5 + if(IS_ARROW_FUNCTION.test(serializedFn)) { + return serializedFn; + } + + var argsStartsAt = serializedFn.indexOf('('); + var def = serializedFn.substr(0, argsStartsAt) + .trim() + .split(' ') + .filter(function(val) { return val.length > 0 }); + + var nonReservedSymbols = def.filter(function(val) { + return RESERVED_SYMBOLS.indexOf(val) === -1 + }); + + // enhanced literal objects, example: {key() {}} + if(nonReservedSymbols.length > 0) { + return (def.indexOf('async') > -1 ? 'async ' : '') + 'function' + + (def.join('').indexOf('*') > -1 ? '*' : '') + + serializedFn.substr(argsStartsAt); + } + + // arrow functions + return serializedFn; + } + + // Check if the parameter is function + if (options.ignoreFunction && typeof obj === "function") { + obj = undefined; + } + // Protects against `JSON.stringify()` returning `undefined`, by serializing + // to the literal string: "undefined". + if (obj === undefined) { + return String(obj); + } + + var str; + + // Creates a JSON string representation of the value. + // NOTE: Node 0.12 goes into slow mode with extra JSON.stringify() args. + if (options.isJSON && !options.space) { + str = JSON.stringify(obj); + } else { + str = JSON.stringify(obj, options.isJSON ? null : replacer, options.space); + } + + // Protects against `JSON.stringify()` returning `undefined`, by serializing + // to the literal string: "undefined". + if (typeof str !== 'string') { + return String(str); + } + + // Replace unsafe HTML and invalid JavaScript line terminator chars with + // their safe Unicode char counterpart. This _must_ happen before the + // regexps and functions are serialized and added back to the string. + if (options.unsafe !== true) { + str = str.replace(UNSAFE_CHARS_REGEXP, escapeUnsafeChars); + } + + if (functions.length === 0 && regexps.length === 0 && dates.length === 0 && maps.length === 0 && sets.length === 0 && undefs.length === 0 && infinities.length === 0) { + return str; + } + + // Replaces all occurrences of function, regexp, date, map and set placeholders in the + // JSON string with their string representations. If the original value can + // not be found, then `undefined` is used. + return str.replace(PLACE_HOLDER_REGEXP, function (match, backSlash, type, valueIndex) { + // The placeholder may not be preceded by a backslash. This is to prevent + // replacing things like `"a\"@__R--0__@"` and thus outputting + // invalid JS. + if (backSlash) { + return match; + } + + if (type === 'D') { + return "new Date(\"" + dates[valueIndex].toISOString() + "\")"; + } + + if (type === 'R') { + return "new RegExp(" + serialize(regexps[valueIndex].source) + ", \"" + regexps[valueIndex].flags + "\")"; + } + + if (type === 'M') { + return "new Map(" + serialize(Array.from(maps[valueIndex].entries()), options) + ")"; + } + + if (type === 'S') { + return "new Set(" + serialize(Array.from(sets[valueIndex].values()), options) + ")"; + } + + if (type === 'U') { + return 'undefined' + } + + if (type === 'I') { + return infinities[valueIndex]; + } + + var fn = functions[valueIndex]; + + return serializeFunc(fn); + }); +} + + +/***/ }), + +/***/ 34857: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * set-value + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var split = __webpack_require__(33218); +var extend = __webpack_require__(28727); +var isPlainObject = __webpack_require__(81064); +var isObject = __webpack_require__(18493); + +module.exports = function(obj, prop, val) { + if (!isObject(obj)) { + return obj; + } + + if (Array.isArray(prop)) { + prop = [].concat.apply([], prop).join('.'); + } + + if (typeof prop !== 'string') { + return obj; + } + + var keys = split(prop, {sep: '.', brackets: true}).filter(isValidKey); + var len = keys.length; + var idx = -1; + var current = obj; + + while (++idx < len) { + var key = keys[idx]; + if (idx !== len - 1) { + if (!isObject(current[key])) { + current[key] = {}; + } + current = current[key]; + continue; + } + + if (isPlainObject(current[key]) && isPlainObject(val)) { + current[key] = extend({}, current[key], val); + } else { + current[key] = val; + } + } + + return obj; +}; + +function isValidKey(key) { + return key !== '__proto__' && key !== 'constructor' && key !== 'prototype'; +} + + +/***/ }), + +/***/ 12579: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isObject = __webpack_require__(96667); +var define = __webpack_require__(88599); +var utils = __webpack_require__(82071); +var ownNames; + +/** + * Create a new AST `Node` with the given `val` and `type`. + * + * ```js + * var node = new Node('*', 'Star'); + * var node = new Node({type: 'star', val: '*'}); + * ``` + * @name Node + * @param {String|Object} `val` Pass a matched substring, or an object to merge onto the node. + * @param {String} `type` The node type to use when `val` is a string. + * @return {Object} node instance + * @api public + */ + +function Node(val, type, parent) { + if (typeof type !== 'string') { + parent = type; + type = null; + } + + define(this, 'parent', parent); + define(this, 'isNode', true); + define(this, 'expect', null); + + if (typeof type !== 'string' && isObject(val)) { + lazyKeys(); + var keys = Object.keys(val); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (ownNames.indexOf(key) === -1) { + this[key] = val[key]; + } + } + } else { + this.type = type; + this.val = val; + } +} + +/** + * Returns true if the given value is a node. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(Node.isNode(node)); //=> true + * console.log(Node.isNode({})); //=> false + * ``` + * @param {Object} `node` + * @returns {Boolean} + * @api public + */ + +Node.isNode = function(node) { + return utils.isNode(node); +}; + +/** + * Define a non-enumberable property on the node instance. + * Useful for adding properties that shouldn't be extended + * or visible during debugging. + * + * ```js + * var node = new Node(); + * node.define('foo', 'something non-enumerable'); + * ``` + * @param {String} `name` + * @param {any} `val` + * @return {Object} returns the node instance + * @api public + */ + +Node.prototype.define = function(name, val) { + define(this, name, val); + return this; +}; + +/** + * Returns true if `node.val` is an empty string, or `node.nodes` does + * not contain any non-empty text nodes. + * + * ```js + * var node = new Node({type: 'text'}); + * node.isEmpty(); //=> true + * node.val = 'foo'; + * node.isEmpty(); //=> false + * ``` + * @param {Function} `fn` (optional) Filter function that is called on `node` and/or child nodes. `isEmpty` will return false immediately when the filter function returns false on any nodes. + * @return {Boolean} + * @api public + */ + +Node.prototype.isEmpty = function(fn) { + return utils.isEmpty(this, fn); +}; + +/** + * Given node `foo` and node `bar`, push node `bar` onto `foo.nodes`, and + * set `foo` as `bar.parent`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.push(bar); + * ``` + * @param {Object} `node` + * @return {Number} Returns the length of `node.nodes` + * @api public + */ + +Node.prototype.push = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + define(node, 'parent', this); + + this.nodes = this.nodes || []; + return this.nodes.push(node); +}; + +/** + * Given node `foo` and node `bar`, unshift node `bar` onto `foo.nodes`, and + * set `foo` as `bar.parent`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.unshift(bar); + * ``` + * @param {Object} `node` + * @return {Number} Returns the length of `node.nodes` + * @api public + */ + +Node.prototype.unshift = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + define(node, 'parent', this); + + this.nodes = this.nodes || []; + return this.nodes.unshift(node); +}; + +/** + * Pop a node from `node.nodes`. + * + * ```js + * var node = new Node({type: 'foo'}); + * node.push(new Node({type: 'a'})); + * node.push(new Node({type: 'b'})); + * node.push(new Node({type: 'c'})); + * node.push(new Node({type: 'd'})); + * console.log(node.nodes.length); + * //=> 4 + * node.pop(); + * console.log(node.nodes.length); + * //=> 3 + * ``` + * @return {Number} Returns the popped `node` + * @api public + */ + +Node.prototype.pop = function() { + return this.nodes && this.nodes.pop(); +}; + +/** + * Shift a node from `node.nodes`. + * + * ```js + * var node = new Node({type: 'foo'}); + * node.push(new Node({type: 'a'})); + * node.push(new Node({type: 'b'})); + * node.push(new Node({type: 'c'})); + * node.push(new Node({type: 'd'})); + * console.log(node.nodes.length); + * //=> 4 + * node.shift(); + * console.log(node.nodes.length); + * //=> 3 + * ``` + * @return {Object} Returns the shifted `node` + * @api public + */ + +Node.prototype.shift = function() { + return this.nodes && this.nodes.shift(); +}; + +/** + * Remove `node` from `node.nodes`. + * + * ```js + * node.remove(childNode); + * ``` + * @param {Object} `node` + * @return {Object} Returns the removed node. + * @api public + */ + +Node.prototype.remove = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + this.nodes = this.nodes || []; + var idx = node.index; + if (idx !== -1) { + node.index = -1; + return this.nodes.splice(idx, 1); + } + return null; +}; + +/** + * Get the first child node from `node.nodes` that matches the given `type`. + * If `type` is a number, the child node at that index is returned. + * + * ```js + * var child = node.find(1); //<= index of the node to get + * var child = node.find('foo'); //<= node.type of a child node + * var child = node.find(/^(foo|bar)$/); //<= regex to match node.type + * var child = node.find(['foo', 'bar']); //<= array of node.type(s) + * ``` + * @param {String} `type` + * @return {Object} Returns a child node or undefined. + * @api public + */ + +Node.prototype.find = function(type) { + return utils.findNode(this.nodes, type); +}; + +/** + * Return true if the node is the given `type`. + * + * ```js + * var node = new Node({type: 'bar'}); + * cosole.log(node.isType('foo')); // false + * cosole.log(node.isType(/^(foo|bar)$/)); // true + * cosole.log(node.isType(['foo', 'bar'])); // true + * ``` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +Node.prototype.isType = function(type) { + return utils.isType(this, type); +}; + +/** + * Return true if the `node.nodes` has the given `type`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.push(bar); + * + * cosole.log(foo.hasType('qux')); // false + * cosole.log(foo.hasType(/^(qux|bar)$/)); // true + * cosole.log(foo.hasType(['qux', 'bar'])); // true + * ``` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +Node.prototype.hasType = function(type) { + return utils.hasType(this, type); +}; + +/** + * Get the siblings array, or `null` if it doesn't exist. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(bar.siblings.length) // 2 + * console.log(baz.siblings.length) // 2 + * ``` + * @return {Array} + * @api public + */ + +Object.defineProperty(Node.prototype, 'siblings', { + set: function() { + throw new Error('node.siblings is a getter and cannot be defined'); + }, + get: function() { + return this.parent ? this.parent.nodes : null; + } +}); + +/** + * Get the node's current index from `node.parent.nodes`. + * This should always be correct, even when the parent adds nodes. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.unshift(qux); + * + * console.log(bar.index) // 1 + * console.log(baz.index) // 2 + * console.log(qux.index) // 0 + * ``` + * @return {Number} + * @api public + */ + +Object.defineProperty(Node.prototype, 'index', { + set: function(index) { + define(this, 'idx', index); + }, + get: function() { + if (!Array.isArray(this.siblings)) { + return -1; + } + var tok = this.idx !== -1 ? this.siblings[this.idx] : null; + if (tok !== this) { + this.idx = this.siblings.indexOf(this); + } + return this.idx; + } +}); + +/** + * Get the previous node from the siblings array or `null`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(baz.prev.type) // 'bar' + * ``` + * @return {Object} + * @api public + */ + +Object.defineProperty(Node.prototype, 'prev', { + set: function() { + throw new Error('node.prev is a getter and cannot be defined'); + }, + get: function() { + if (Array.isArray(this.siblings)) { + return this.siblings[this.index - 1] || this.parent.prev; + } + return null; + } +}); + +/** + * Get the siblings array, or `null` if it doesn't exist. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(bar.siblings.length) // 2 + * console.log(baz.siblings.length) // 2 + * ``` + * @return {Object} + * @api public + */ + +Object.defineProperty(Node.prototype, 'next', { + set: function() { + throw new Error('node.next is a getter and cannot be defined'); + }, + get: function() { + if (Array.isArray(this.siblings)) { + return this.siblings[this.index + 1] || this.parent.next; + } + return null; + } +}); + +/** + * Get the first node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.first.type) // 'bar' + * ``` + * @return {Object} The first node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'first', { + get: function() { + return this.nodes ? this.nodes[0] : null; + } +}); + +/** + * Get the last node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.last.type) // 'qux' + * ``` + * @return {Object} The last node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'last', { + get: function() { + return this.nodes ? utils.last(this.nodes) : null; + } +}); + +/** + * Get the last node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.last.type) // 'qux' + * ``` + * @return {Object} The last node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'scope', { + get: function() { + if (this.isScope !== true) { + return this.parent ? this.parent.scope : this; + } + return this; + } +}); + +/** + * Get own property names from Node prototype, but only the + * first time `Node` is instantiated + */ + +function lazyKeys() { + if (!ownNames) { + ownNames = Object.getOwnPropertyNames(Node.prototype); + } +} + +/** + * Simplified assertion. Throws an error is `val` is falsey. + */ + +function assert(val, message) { + if (!val) throw new Error(message); +} + +/** + * Expose `Node` + */ + +exports = module.exports = Node; + + +/***/ }), + +/***/ 88599: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * define-property + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isDescriptor = __webpack_require__(44133); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; + + +/***/ }), + +/***/ 82071: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var typeOf = __webpack_require__(48865); +var utils = module.exports; + +/** + * Returns true if the given value is a node. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(utils.isNode(node)); //=> true + * console.log(utils.isNode({})); //=> false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {Boolean} + * @api public + */ + +utils.isNode = function(node) { + return typeOf(node) === 'object' && node.isNode === true; +}; + +/** + * Emit an empty string for the given `node`. + * + * ```js + * // do nothing for beginning-of-string + * snapdragon.compiler.set('bos', utils.noop); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {undefined} + * @api public + */ + +utils.noop = function(node) { + append(this, '', node); +}; + +/** + * Appdend `node.val` to `compiler.output`, exactly as it was created + * by the parser. + * + * ```js + * snapdragon.compiler.set('text', utils.identity); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {undefined} + * @api public + */ + +utils.identity = function(node) { + append(this, node.val, node); +}; + +/** + * Previously named `.emit`, this method appends the given `val` + * to `compiler.output` for the given node. Useful when you know + * what value should be appended advance, regardless of the actual + * value of `node.val`. + * + * ```js + * snapdragon.compiler + * .set('i', function(node) { + * this.mapVisit(node); + * }) + * .set('i.open', utils.append('')) + * .set('i.close', utils.append('')) + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {Function} Returns a compiler middleware function. + * @api public + */ + +utils.append = function(val) { + return function(node) { + append(this, val, node); + }; +}; + +/** + * Used in compiler middleware, this onverts an AST node into + * an empty `text` node and deletes `node.nodes` if it exists. + * The advantage of this method is that, as opposed to completely + * removing the node, indices will not need to be re-calculated + * in sibling nodes, and nothing is appended to the output. + * + * ```js + * utils.toNoop(node); + * // convert `node.nodes` to the given value instead of deleting it + * utils.toNoop(node, []); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Array} `nodes` Optionally pass a new `nodes` value, to replace the existing `node.nodes` array. + * @api public + */ + +utils.toNoop = function(node, nodes) { + if (nodes) { + node.nodes = nodes; + } else { + delete node.nodes; + node.type = 'text'; + node.val = ''; + } +}; + +/** + * Visit `node` with the given `fn`. The built-in `.visit` method in snapdragon + * automatically calls registered compilers, this allows you to pass a visitor + * function. + * + * ```js + * snapdragon.compiler.set('i', function(node) { + * utils.visit(node, function(childNode) { + * // do stuff with "childNode" + * return childNode; + * }); + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `fn` + * @return {Object} returns the node after recursively visiting all child nodes. + * @api public + */ + +utils.visit = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(fn), 'expected a visitor function'); + fn(node); + return node.nodes ? utils.mapVisit(node, fn) : node; +}; + +/** + * Map [visit](#visit) the given `fn` over `node.nodes`. This is called by + * [visit](#visit), use this method if you do not want `fn` to be called on + * the first node. + * + * ```js + * snapdragon.compiler.set('i', function(node) { + * utils.mapVisit(node, function(childNode) { + * // do stuff with "childNode" + * return childNode; + * }); + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Object} `options` + * @param {Function} `fn` + * @return {Object} returns the node + * @api public + */ + +utils.mapVisit = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isArray(node.nodes), 'expected node.nodes to be an array'); + assert(isFunction(fn), 'expected a visitor function'); + + for (var i = 0; i < node.nodes.length; i++) { + utils.visit(node.nodes[i], fn); + } + return node; +}; + +/** + * Unshift an `*.open` node onto `node.nodes`. + * + * ```js + * var Node = require('snapdragon-node'); + * snapdragon.parser.set('brace', function(node) { + * var match = this.match(/^{/); + * if (match) { + * var parent = new Node({type: 'brace'}); + * utils.addOpen(parent, Node); + * console.log(parent.nodes[0]): + * // { type: 'brace.open', val: '' }; + * + * // push the parent "brace" node onto the stack + * this.push(parent); + * + * // return the parent node, so it's also added to the AST + * return brace; + * } + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the created opening node. + * @api public + */ + +utils.addOpen = function(node, Node, val, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + if (typeof val === 'function') { + filter = val; + val = ''; + } + + if (typeof filter === 'function' && !filter(node)) return; + var open = new Node({ type: node.type + '.open', val: val}); + var unshift = node.unshift || node.unshiftNode; + if (typeof unshift === 'function') { + unshift.call(node, open); + } else { + utils.unshiftNode(node, open); + } + return open; +}; + +/** + * Push a `*.close` node onto `node.nodes`. + * + * ```js + * var Node = require('snapdragon-node'); + * snapdragon.parser.set('brace', function(node) { + * var match = this.match(/^}/); + * if (match) { + * var parent = this.parent(); + * if (parent.type !== 'brace') { + * throw new Error('missing opening: ' + '}'); + * } + * + * utils.addClose(parent, Node); + * console.log(parent.nodes[parent.nodes.length - 1]): + * // { type: 'brace.close', val: '' }; + * + * // no need to return a node, since the parent + * // was already added to the AST + * return; + * } + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the created closing node. + * @api public + */ + +utils.addClose = function(node, Node, val, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + if (typeof val === 'function') { + filter = val; + val = ''; + } + + if (typeof filter === 'function' && !filter(node)) return; + var close = new Node({ type: node.type + '.close', val: val}); + var push = node.push || node.pushNode; + if (typeof push === 'function') { + push.call(node, close); + } else { + utils.pushNode(node, close); + } + return close; +}; + +/** + * Wraps the given `node` with `*.open` and `*.close` nodes. + * + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the node + * @api public + */ + +utils.wrapNodes = function(node, Node, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + utils.addOpen(node, Node, filter); + utils.addClose(node, Node, filter); + return node; +}; + +/** + * Push the given `node` onto `parent.nodes`, and set `parent` as `node.parent. + * + * ```js + * var parent = new Node({type: 'foo'}); + * var node = new Node({type: 'bar'}); + * utils.pushNode(parent, node); + * console.log(parent.nodes[0].type) // 'bar' + * console.log(node.parent.type) // 'foo' + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Object} Returns the child node + * @api public + */ + +utils.pushNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + node.define('parent', parent); + parent.nodes = parent.nodes || []; + parent.nodes.push(node); + return node; +}; + +/** + * Unshift `node` onto `parent.nodes`, and set `parent` as `node.parent. + * + * ```js + * var parent = new Node({type: 'foo'}); + * var node = new Node({type: 'bar'}); + * utils.unshiftNode(parent, node); + * console.log(parent.nodes[0].type) // 'bar' + * console.log(node.parent.type) // 'foo' + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {undefined} + * @api public + */ + +utils.unshiftNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + node.define('parent', parent); + parent.nodes = parent.nodes || []; + parent.nodes.unshift(node); +}; + +/** + * Pop the last `node` off of `parent.nodes`. The advantage of + * using this method is that it checks for `node.nodes` and works + * with any version of `snapdragon-node`. + * + * ```js + * var parent = new Node({type: 'foo'}); + * utils.pushNode(parent, new Node({type: 'foo'})); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.popNode(parent); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Number|Undefined} Returns the length of `node.nodes` or undefined. + * @api public + */ + +utils.popNode = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (typeof node.pop === 'function') { + return node.pop(); + } + return node.nodes && node.nodes.pop(); +}; + +/** + * Shift the first `node` off of `parent.nodes`. The advantage of + * using this method is that it checks for `node.nodes` and works + * with any version of `snapdragon-node`. + * + * ```js + * var parent = new Node({type: 'foo'}); + * utils.pushNode(parent, new Node({type: 'foo'})); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.shiftNode(parent); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Number|Undefined} Returns the length of `node.nodes` or undefined. + * @api public + */ + +utils.shiftNode = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (typeof node.shift === 'function') { + return node.shift(); + } + return node.nodes && node.nodes.shift(); +}; + +/** + * Remove the specified `node` from `parent.nodes`. + * + * ```js + * var parent = new Node({type: 'abc'}); + * var foo = new Node({type: 'foo'}); + * utils.pushNode(parent, foo); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.removeNode(parent, foo); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Object|undefined} Returns the removed node, if successful, or undefined if it does not exist on `parent.nodes`. + * @api public + */ + +utils.removeNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent.node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + if (!parent.nodes) { + return null; + } + + if (typeof parent.remove === 'function') { + return parent.remove(node); + } + + var idx = parent.nodes.indexOf(node); + if (idx !== -1) { + return parent.nodes.splice(idx, 1); + } +}; + +/** + * Returns true if `node.type` matches the given `type`. Throws a + * `TypeError` if `node` is not an instance of `Node`. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(utils.isType(node, 'foo')); // false + * console.log(utils.isType(node, 'bar')); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.isType = function(node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + switch (typeOf(type)) { + case 'array': + var types = type.slice(); + for (var i = 0; i < types.length; i++) { + if (utils.isType(node, types[i])) { + return true; + } + } + return false; + case 'string': + return node.type === type; + case 'regexp': + return type.test(node.type); + default: { + throw new TypeError('expected "type" to be an array, string or regexp'); + } + } +}; + +/** + * Returns true if the given `node` has the given `type` in `node.nodes`. + * Throws a `TypeError` if `node` is not an instance of `Node`. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'bar'}), + * new Node({type: 'baz'}) + * ] + * }); + * console.log(utils.hasType(node, 'xyz')); // false + * console.log(utils.hasType(node, 'baz')); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.hasType = function(node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (!Array.isArray(node.nodes)) return false; + for (var i = 0; i < node.nodes.length; i++) { + if (utils.isType(node.nodes[i], type)) { + return true; + } + } + return false; +}; + +/** + * Returns the first node from `node.nodes` of the given `type` + * + * ```js + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'text', val: 'abc'}), + * new Node({type: 'text', val: 'xyz'}) + * ] + * }); + * + * var textNode = utils.firstOfType(node.nodes, 'text'); + * console.log(textNode.val); + * //=> 'abc' + * ``` + * @param {Array} `nodes` + * @param {String} `type` + * @return {Object|undefined} Returns the first matching node or undefined. + * @api public + */ + +utils.firstOfType = function(nodes, type) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + if (utils.isType(node, type)) { + return node; + } + } +}; + +/** + * Returns the node at the specified index, or the first node of the + * given `type` from `node.nodes`. + * + * ```js + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'text', val: 'abc'}), + * new Node({type: 'text', val: 'xyz'}) + * ] + * }); + * + * var nodeOne = utils.findNode(node.nodes, 'text'); + * console.log(nodeOne.val); + * //=> 'abc' + * + * var nodeTwo = utils.findNode(node.nodes, 1); + * console.log(nodeTwo.val); + * //=> 'xyz' + * ``` + * + * @param {Array} `nodes` + * @param {String|Number} `type` Node type or index. + * @return {Object} Returns a node or undefined. + * @api public + */ + +utils.findNode = function(nodes, type) { + if (!Array.isArray(nodes)) { + return null; + } + if (typeof type === 'number') { + return nodes[type]; + } + return utils.firstOfType(nodes, type); +}; + +/** + * Returns true if the given node is an "*.open" node. + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * + * console.log(utils.isOpen(brace)); // false + * console.log(utils.isOpen(open)); // true + * console.log(utils.isOpen(close)); // false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.isOpen = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + return node.type.slice(-5) === '.open'; +}; + +/** + * Returns true if the given node is a "*.close" node. + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * + * console.log(utils.isClose(brace)); // false + * console.log(utils.isClose(open)); // false + * console.log(utils.isClose(close)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.isClose = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + return node.type.slice(-6) === '.close'; +}; + +/** + * Returns true if `node.nodes` **has** an `.open` node + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var open = new Node({type: 'brace.open'}); + * console.log(utils.hasOpen(brace)); // false + * + * brace.pushNode(open); + * console.log(utils.hasOpen(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasOpen = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + var first = node.first || node.nodes ? node.nodes[0] : null; + if (utils.isNode(first)) { + return first.type === node.type + '.open'; + } + return false; +}; + +/** + * Returns true if `node.nodes` **has** a `.close` node + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var close = new Node({type: 'brace.close'}); + * console.log(utils.hasClose(brace)); // false + * + * brace.pushNode(close); + * console.log(utils.hasClose(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasClose = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + var last = node.last || node.nodes ? node.nodes[node.nodes.length - 1] : null; + if (utils.isNode(last)) { + return last.type === node.type + '.close'; + } + return false; +}; + +/** + * Returns true if `node.nodes` has both `.open` and `.close` nodes + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * console.log(utils.hasOpen(brace)); // false + * console.log(utils.hasClose(brace)); // false + * + * brace.pushNode(open); + * brace.pushNode(close); + * console.log(utils.hasOpen(brace)); // true + * console.log(utils.hasClose(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasOpenAndClose = function(node) { + return utils.hasOpen(node) && utils.hasClose(node); +}; + +/** + * Push the given `node` onto the `state.inside` array for the + * given type. This array is used as a specialized "stack" for + * only the given `node.type`. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * utils.addType(state, node); + * console.log(state.inside); + * //=> { brace: [{type: 'brace'}] } + * ``` + * @param {Object} `state` The `compiler.state` object or custom state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Array} Returns the `state.inside` stack for the given type. + * @api public + */ + +utils.addType = function(state, node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + var type = node.parent + ? node.parent.type + : node.type.replace(/\.open$/, ''); + + if (!state.hasOwnProperty('inside')) { + state.inside = {}; + } + if (!state.inside.hasOwnProperty(type)) { + state.inside[type] = []; + } + + var arr = state.inside[type]; + arr.push(node); + return arr; +}; + +/** + * Remove the given `node` from the `state.inside` array for the + * given type. This array is used as a specialized "stack" for + * only the given `node.type`. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * utils.addType(state, node); + * console.log(state.inside); + * //=> { brace: [{type: 'brace'}] } + * utils.removeType(state, node); + * //=> { brace: [] } + * ``` + * @param {Object} `state` The `compiler.state` object or custom state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Array} Returns the `state.inside` stack for the given type. + * @api public + */ + +utils.removeType = function(state, node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + var type = node.parent + ? node.parent.type + : node.type.replace(/\.close$/, ''); + + if (state.inside.hasOwnProperty(type)) { + return state.inside[type].pop(); + } +}; + +/** + * Returns true if `node.val` is an empty string, or `node.nodes` does + * not contain any non-empty text nodes. + * + * ```js + * var node = new Node({type: 'text'}); + * utils.isEmpty(node); //=> true + * node.val = 'foo'; + * utils.isEmpty(node); //=> false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `fn` + * @return {Boolean} + * @api public + */ + +utils.isEmpty = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + if (!Array.isArray(node.nodes)) { + if (node.type !== 'text') { + return true; + } + if (typeof fn === 'function') { + return fn(node, node.parent); + } + return !utils.trim(node.val); + } + + for (var i = 0; i < node.nodes.length; i++) { + var child = node.nodes[i]; + if (utils.isOpen(child) || utils.isClose(child)) { + continue; + } + if (!utils.isEmpty(child, fn)) { + return false; + } + } + + return true; +}; + +/** + * Returns true if the `state.inside` stack for the given type exists + * and has one or more nodes on it. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * console.log(utils.isInsideType(state, 'brace')); //=> false + * utils.addType(state, node); + * console.log(utils.isInsideType(state, 'brace')); //=> true + * utils.removeType(state, node); + * console.log(utils.isInsideType(state, 'brace')); //=> false + * ``` + * @param {Object} `state` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.isInsideType = function(state, type) { + assert(isObject(state), 'expected state to be an object'); + assert(isString(type), 'expected type to be a string'); + + if (!state.hasOwnProperty('inside')) { + return false; + } + + if (!state.inside.hasOwnProperty(type)) { + return false; + } + + return state.inside[type].length > 0; +}; + +/** + * Returns true if `node` is either a child or grand-child of the given `type`, + * or `state.inside[type]` is a non-empty array. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * console.log(utils.isInside(state, open, 'brace')); //=> false + * utils.pushNode(node, open); + * console.log(utils.isInside(state, open, 'brace')); //=> true + * ``` + * @param {Object} `state` Either the `compiler.state` object, if it exists, or a user-supplied state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` The `node.type` to check for. + * @return {Boolean} + * @api public + */ + +utils.isInside = function(state, node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + if (Array.isArray(type)) { + for (var i = 0; i < type.length; i++) { + if (utils.isInside(state, node, type[i])) { + return true; + } + } + return false; + } + + var parent = node.parent; + if (typeof type === 'string') { + return (parent && parent.type === type) || utils.isInsideType(state, type); + } + + if (typeOf(type) === 'regexp') { + if (parent && parent.type && type.test(parent.type)) { + return true; + } + + var keys = Object.keys(state.inside); + var len = keys.length; + var idx = -1; + while (++idx < len) { + var key = keys[idx]; + var val = state.inside[key]; + + if (Array.isArray(val) && val.length !== 0 && type.test(key)) { + return true; + } + } + } + return false; +}; + +/** + * Get the last `n` element from the given `array`. Used for getting + * a node from `node.nodes.` + * + * @param {Array} `array` + * @param {Number} `n` + * @return {undefined} + * @api public + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +/** + * Cast the given `val` to an array. + * + * ```js + * console.log(utils.arrayify('')); + * //=> [] + * console.log(utils.arrayify('foo')); + * //=> ['foo'] + * console.log(utils.arrayify(['foo'])); + * //=> ['foo'] + * ``` + * @param {any} `val` + * @return {Array} + * @api public + */ + +utils.arrayify = function(val) { + if (typeof val === 'string' && val !== '') { + return [val]; + } + if (!Array.isArray(val)) { + return []; + } + return val; +}; + +/** + * Convert the given `val` to a string by joining with `,`. Useful + * for creating a cheerio/CSS/DOM-style selector from a list of strings. + * + * @param {any} `val` + * @return {Array} + * @api public + */ + +utils.stringify = function(val) { + return utils.arrayify(val).join(','); +}; + +/** + * Ensure that the given value is a string and call `.trim()` on it, + * or return an empty string. + * + * @param {String} `str` + * @return {String} + * @api public + */ + +utils.trim = function(str) { + return typeof str === 'string' ? str.trim() : ''; +}; + +/** + * Return true if val is an object + */ + +function isObject(val) { + return typeOf(val) === 'object'; +} + +/** + * Return true if val is a string + */ + +function isString(val) { + return typeof val === 'string'; +} + +/** + * Return true if val is a function + */ + +function isFunction(val) { + return typeof val === 'function'; +} + +/** + * Return true if val is an array + */ + +function isArray(val) { + return Array.isArray(val); +} + +/** + * Shim to ensure the `.append` methods work with any version of snapdragon + */ + +function append(compiler, val, node) { + if (typeof compiler.append !== 'function') { + return compiler.emit(val, node); + } + return compiler.append(val, node); +} + +/** + * Simplified assertion. Throws an error is `val` is falsey. + */ + +function assert(val, message) { + if (!val) throw new Error(message); +} + + +/***/ }), + +/***/ 79285: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var Base = __webpack_require__(87263); +var define = __webpack_require__(5477); +var Compiler = __webpack_require__(33003); +var Parser = __webpack_require__(35573); +var utils = __webpack_require__(622); +var regexCache = {}; +var cache = {}; + +/** + * Create a new instance of `Snapdragon` with the given `options`. + * + * ```js + * var snapdragon = new Snapdragon(); + * ``` + * + * @param {Object} `options` + * @api public + */ + +function Snapdragon(options) { + Base.call(this, null, options); + this.options = utils.extend({source: 'string'}, this.options); + this.compiler = new Compiler(this.options); + this.parser = new Parser(this.options); + + Object.defineProperty(this, 'compilers', { + get: function() { + return this.compiler.compilers; + } + }); + + Object.defineProperty(this, 'parsers', { + get: function() { + return this.parser.parsers; + } + }); + + Object.defineProperty(this, 'regex', { + get: function() { + return this.parser.regex; + } + }); +} + +/** + * Inherit Base + */ + +Base.extend(Snapdragon); + +/** + * Add a parser to `snapdragon.parsers` for capturing the given `type` using + * the specified regex or parser function. A function is useful if you need + * to customize how the token is created and/or have access to the parser + * instance to check options, etc. + * + * ```js + * snapdragon + * .capture('slash', /^\//) + * .capture('dot', function() { + * var pos = this.position(); + * var m = this.match(/^\./); + * if (!m) return; + * return pos({ + * type: 'dot', + * val: m[0] + * }); + * }); + * ``` + * @param {String} `type` + * @param {RegExp|Function} `regex` + * @return {Object} Returns the parser instance for chaining + * @api public + */ + +Snapdragon.prototype.capture = function() { + return this.parser.capture.apply(this.parser, arguments); +}; + +/** + * Register a plugin `fn`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * snapdragon.use(function() { + * console.log(this); //<= snapdragon instance + * console.log(this.parser); //<= parser instance + * console.log(this.compiler); //<= compiler instance + * }); + * ``` + * @param {Object} `fn` + * @api public + */ + +Snapdragon.prototype.use = function(fn) { + fn.call(this, this); + return this; +}; + +/** + * Parse the given `str`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * // register parsers + * snapdragon.parser.use(function() {}); + * + * // parse + * var ast = snapdragon.parse('foo/bar'); + * console.log(ast); + * ``` + * @param {String} `str` + * @param {Object} `options` Set `options.sourcemap` to true to enable source maps. + * @return {Object} Returns an AST. + * @api public + */ + +Snapdragon.prototype.parse = function(str, options) { + this.options = utils.extend({}, this.options, options); + var parsed = this.parser.parse(str, this.options); + + // add non-enumerable parser reference + define(parsed, 'parser', this.parser); + return parsed; +}; + +/** + * Compile the given `AST`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * // register plugins + * snapdragon.use(function() {}); + * // register parser plugins + * snapdragon.parser.use(function() {}); + * // register compiler plugins + * snapdragon.compiler.use(function() {}); + * + * // parse + * var ast = snapdragon.parse('foo/bar'); + * + * // compile + * var res = snapdragon.compile(ast); + * console.log(res.output); + * ``` + * @param {Object} `ast` + * @param {Object} `options` + * @return {Object} Returns an object with an `output` property with the rendered string. + * @api public + */ + +Snapdragon.prototype.compile = function(ast, options) { + this.options = utils.extend({}, this.options, options); + var compiled = this.compiler.compile(ast, this.options); + + // add non-enumerable compiler reference + define(compiled, 'compiler', this.compiler); + return compiled; +}; + +/** + * Expose `Snapdragon` + */ + +module.exports = Snapdragon; + +/** + * Expose `Parser` and `Compiler` + */ + +module.exports.Compiler = Compiler; +module.exports.Parser = Parser; + + +/***/ }), + +/***/ 33003: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var use = __webpack_require__(77709); +var define = __webpack_require__(5477); +var debug = __webpack_require__(31185)('snapdragon:compiler'); +var utils = __webpack_require__(622); + +/** + * Create a new `Compiler` with the given `options`. + * @param {Object} `options` + */ + +function Compiler(options, state) { + debug('initializing', __filename); + this.options = utils.extend({source: 'string'}, options); + this.state = state || {}; + this.compilers = {}; + this.output = ''; + this.set('eos', function(node) { + return this.emit(node.val, node); + }); + this.set('noop', function(node) { + return this.emit(node.val, node); + }); + this.set('bos', function(node) { + return this.emit(node.val, node); + }); + use(this); +} + +/** + * Prototype methods + */ + +Compiler.prototype = { + + /** + * Throw an error message with details including the cursor position. + * @param {String} `msg` Message to use in the Error. + */ + + error: function(msg, node) { + var pos = node.position || {start: {column: 0}}; + var message = this.options.source + ' column:' + pos.start.column + ': ' + msg; + + var err = new Error(message); + err.reason = msg; + err.column = pos.start.column; + err.source = this.pattern; + + if (this.options.silent) { + this.errors.push(err); + } else { + throw err; + } + }, + + /** + * Define a non-enumberable property on the `Compiler` instance. + * + * ```js + * compiler.define('foo', 'bar'); + * ``` + * @name .define + * @param {String} `key` propery name + * @param {any} `val` property value + * @return {Object} Returns the Compiler instance for chaining. + * @api public + */ + + define: function(key, val) { + define(this, key, val); + return this; + }, + + /** + * Emit `node.val` + */ + + emit: function(str, node) { + this.output += str; + return str; + }, + + /** + * Add a compiler `fn` with the given `name` + */ + + set: function(name, fn) { + this.compilers[name] = fn; + return this; + }, + + /** + * Get compiler `name`. + */ + + get: function(name) { + return this.compilers[name]; + }, + + /** + * Get the previous AST node. + */ + + prev: function(n) { + return this.ast.nodes[this.idx - (n || 1)] || { type: 'bos', val: '' }; + }, + + /** + * Get the next AST node. + */ + + next: function(n) { + return this.ast.nodes[this.idx + (n || 1)] || { type: 'eos', val: '' }; + }, + + /** + * Visit `node`. + */ + + visit: function(node, nodes, i) { + var fn = this.compilers[node.type]; + this.idx = i; + + if (typeof fn !== 'function') { + throw this.error('compiler "' + node.type + '" is not registered', node); + } + return fn.call(this, node, nodes, i); + }, + + /** + * Map visit over array of `nodes`. + */ + + mapVisit: function(nodes) { + if (!Array.isArray(nodes)) { + throw new TypeError('expected an array'); + } + var len = nodes.length; + var idx = -1; + while (++idx < len) { + this.visit(nodes[idx], nodes, idx); + } + return this; + }, + + /** + * Compile `ast`. + */ + + compile: function(ast, options) { + var opts = utils.extend({}, this.options, options); + this.ast = ast; + this.parsingErrors = this.ast.errors; + this.output = ''; + + // source map support + if (opts.sourcemap) { + var sourcemaps = __webpack_require__(59657); + sourcemaps(this); + this.mapVisit(this.ast.nodes); + this.applySourceMaps(); + this.map = opts.sourcemap === 'generator' ? this.map : this.map.toJSON(); + return this; + } + + this.mapVisit(this.ast.nodes); + return this; + } +}; + +/** + * Expose `Compiler` + */ + +module.exports = Compiler; + + +/***/ }), + +/***/ 35573: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var use = __webpack_require__(77709); +var util = __webpack_require__(31669); +var Cache = __webpack_require__(4337); +var define = __webpack_require__(5477); +var debug = __webpack_require__(31185)('snapdragon:parser'); +var Position = __webpack_require__(7974); +var utils = __webpack_require__(622); + +/** + * Create a new `Parser` with the given `input` and `options`. + * @param {String} `input` + * @param {Object} `options` + * @api public + */ + +function Parser(options) { + debug('initializing', __filename); + this.options = utils.extend({source: 'string'}, options); + this.init(this.options); + use(this); +} + +/** + * Prototype methods + */ + +Parser.prototype = { + constructor: Parser, + + init: function(options) { + this.orig = ''; + this.input = ''; + this.parsed = ''; + + this.column = 1; + this.line = 1; + + this.regex = new Cache(); + this.errors = this.errors || []; + this.parsers = this.parsers || {}; + this.types = this.types || []; + this.sets = this.sets || {}; + this.fns = this.fns || []; + this.currentType = 'root'; + + var pos = this.position(); + this.bos = pos({type: 'bos', val: ''}); + + this.ast = { + type: 'root', + errors: this.errors, + nodes: [this.bos] + }; + + define(this.bos, 'parent', this.ast); + this.nodes = [this.ast]; + + this.count = 0; + this.setCount = 0; + this.stack = []; + }, + + /** + * Throw a formatted error with the cursor column and `msg`. + * @param {String} `msg` Message to use in the Error. + */ + + error: function(msg, node) { + var pos = node.position || {start: {column: 0, line: 0}}; + var line = pos.start.line; + var column = pos.start.column; + var source = this.options.source; + + var message = source + ' : ' + msg; + var err = new Error(message); + err.source = source; + err.reason = msg; + err.pos = pos; + + if (this.options.silent) { + this.errors.push(err); + } else { + throw err; + } + }, + + /** + * Define a non-enumberable property on the `Parser` instance. + * + * ```js + * parser.define('foo', 'bar'); + * ``` + * @name .define + * @param {String} `key` propery name + * @param {any} `val` property value + * @return {Object} Returns the Parser instance for chaining. + * @api public + */ + + define: function(key, val) { + define(this, key, val); + return this; + }, + + /** + * Mark position and patch `node.position`. + */ + + position: function() { + var start = { line: this.line, column: this.column }; + var self = this; + + return function(node) { + define(node, 'position', new Position(start, self)); + return node; + }; + }, + + /** + * Set parser `name` with the given `fn` + * @param {String} `name` + * @param {Function} `fn` + * @api public + */ + + set: function(type, fn) { + if (this.types.indexOf(type) === -1) { + this.types.push(type); + } + this.parsers[type] = fn.bind(this); + return this; + }, + + /** + * Get parser `name` + * @param {String} `name` + * @api public + */ + + get: function(name) { + return this.parsers[name]; + }, + + /** + * Push a `token` onto the `type` stack. + * + * @param {String} `type` + * @return {Object} `token` + * @api public + */ + + push: function(type, token) { + this.sets[type] = this.sets[type] || []; + this.count++; + this.stack.push(token); + return this.sets[type].push(token); + }, + + /** + * Pop a token off of the `type` stack + * @param {String} `type` + * @returns {Object} Returns a token + * @api public + */ + + pop: function(type) { + this.sets[type] = this.sets[type] || []; + this.count--; + this.stack.pop(); + return this.sets[type].pop(); + }, + + /** + * Return true if inside a `stack` node. Types are `braces`, `parens` or `brackets`. + * + * @param {String} `type` + * @return {Boolean} + * @api public + */ + + isInside: function(type) { + this.sets[type] = this.sets[type] || []; + return this.sets[type].length > 0; + }, + + /** + * Return true if `node` is the given `type`. + * + * ```js + * parser.isType(node, 'brace'); + * ``` + * @param {Object} `node` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + + isType: function(node, type) { + return node && node.type === type; + }, + + /** + * Get the previous AST node + * @return {Object} + */ + + prev: function(n) { + return this.stack.length > 0 + ? utils.last(this.stack, n) + : utils.last(this.nodes, n); + }, + + /** + * Update line and column based on `str`. + */ + + consume: function(len) { + this.input = this.input.substr(len); + }, + + /** + * Update column based on `str`. + */ + + updatePosition: function(str, len) { + var lines = str.match(/\n/g); + if (lines) this.line += lines.length; + var i = str.lastIndexOf('\n'); + this.column = ~i ? len - i : this.column + len; + this.parsed += str; + this.consume(len); + }, + + /** + * Match `regex`, return captures, and update the cursor position by `match[0]` length. + * @param {RegExp} `regex` + * @return {Object} + */ + + match: function(regex) { + var m = regex.exec(this.input); + if (m) { + this.updatePosition(m[0], m[0].length); + return m; + } + }, + + /** + * Capture `type` with the given regex. + * @param {String} `type` + * @param {RegExp} `regex` + * @return {Function} + */ + + capture: function(type, regex) { + if (typeof regex === 'function') { + return this.set.apply(this, arguments); + } + + this.regex.set(type, regex); + this.set(type, function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(regex); + if (!m || !m[0]) return; + + var prev = this.prev(); + var node = pos({ + type: type, + val: m[0], + parsed: parsed, + rest: this.input + }); + + if (m[1]) { + node.inner = m[1]; + } + + define(node, 'inside', this.stack.length > 0); + define(node, 'parent', prev); + prev.nodes.push(node); + }.bind(this)); + return this; + }, + + /** + * Create a parser with open and close for parens, + * brackets or braces + */ + + capturePair: function(type, openRegex, closeRegex, fn) { + this.sets[type] = this.sets[type] || []; + + /** + * Open + */ + + this.set(type + '.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(openRegex); + if (!m || !m[0]) return; + + var val = m[0]; + this.setCount++; + this.specialChars = true; + var open = pos({ + type: type + '.open', + val: val, + rest: this.input + }); + + if (typeof m[1] !== 'undefined') { + open.inner = m[1]; + } + + var prev = this.prev(); + var node = pos({ + type: type, + nodes: [open] + }); + + define(node, 'rest', this.input); + define(node, 'parsed', parsed); + define(node, 'prefix', m[1]); + define(node, 'parent', prev); + define(open, 'parent', node); + + if (typeof fn === 'function') { + fn.call(this, open, node); + } + + this.push(type, node); + prev.nodes.push(node); + }); + + /** + * Close + */ + + this.set(type + '.close', function() { + var pos = this.position(); + var m = this.match(closeRegex); + if (!m || !m[0]) return; + + var parent = this.pop(type); + var node = pos({ + type: type + '.close', + rest: this.input, + suffix: m[1], + val: m[0] + }); + + if (!this.isType(parent, type)) { + if (this.options.strict) { + throw new Error('missing opening "' + type + '"'); + } + + this.setCount--; + node.escaped = true; + return node; + } + + if (node.suffix === '\\') { + parent.escaped = true; + node.escaped = true; + } + + parent.nodes.push(node); + define(node, 'parent', parent); + }); + + return this; + }, + + /** + * Capture end-of-string + */ + + eos: function() { + var pos = this.position(); + if (this.input) return; + var prev = this.prev(); + + while (prev.type !== 'root' && !prev.visited) { + if (this.options.strict === true) { + throw new SyntaxError('invalid syntax:' + util.inspect(prev, null, 2)); + } + + if (!hasDelims(prev)) { + prev.parent.escaped = true; + prev.escaped = true; + } + + visit(prev, function(node) { + if (!hasDelims(node.parent)) { + node.parent.escaped = true; + node.escaped = true; + } + }); + + prev = prev.parent; + } + + var tok = pos({ + type: 'eos', + val: this.append || '' + }); + + define(tok, 'parent', this.ast); + return tok; + }, + + /** + * Run parsers to advance the cursor position + */ + + next: function() { + var parsed = this.parsed; + var len = this.types.length; + var idx = -1; + var tok; + + while (++idx < len) { + if ((tok = this.parsers[this.types[idx]].call(this))) { + define(tok, 'rest', this.input); + define(tok, 'parsed', parsed); + this.last = tok; + return tok; + } + } + }, + + /** + * Parse the given string. + * @return {Array} + */ + + parse: function(input) { + if (typeof input !== 'string') { + throw new TypeError('expected a string'); + } + + this.init(this.options); + this.orig = input; + this.input = input; + var self = this; + + function parse() { + // check input before calling `.next()` + input = self.input; + + // get the next AST ndoe + var node = self.next(); + if (node) { + var prev = self.prev(); + if (prev) { + define(node, 'parent', prev); + if (prev.nodes) { + prev.nodes.push(node); + } + } + + if (self.sets.hasOwnProperty(prev.type)) { + self.currentType = prev.type; + } + } + + // if we got here but input is not changed, throw an error + if (self.input && input === self.input) { + throw new Error('no parsers registered for: "' + self.input.slice(0, 5) + '"'); + } + } + + while (this.input) parse(); + if (this.stack.length && this.options.strict) { + var node = this.stack.pop(); + throw this.error('missing opening ' + node.type + ': "' + this.orig + '"'); + } + + var eos = this.eos(); + var tok = this.prev(); + if (tok.type !== 'eos') { + this.ast.nodes.push(eos); + } + + return this.ast; + } +}; + +/** + * Visit `node` with the given `fn` + */ + +function visit(node, fn) { + if (!node.visited) { + define(node, 'visited', true); + return node.nodes ? mapVisit(node.nodes, fn) : fn(node); + } + return node; +} + +/** + * Map visit over array of `nodes`. + */ + +function mapVisit(nodes, fn) { + var len = nodes.length; + var idx = -1; + while (++idx < len) { + visit(nodes[idx], fn); + } +} + +function hasOpen(node) { + return node.nodes && node.nodes[0].type === (node.type + '.open'); +} + +function hasClose(node) { + return node.nodes && utils.last(node.nodes).type === (node.type + '.close'); +} + +function hasDelims(node) { + return hasOpen(node) && hasClose(node); +} + +/** + * Expose `Parser` + */ + +module.exports = Parser; + + +/***/ }), + +/***/ 7974: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(5477); + +/** + * Store position for a node + */ + +module.exports = function Position(start, parser) { + this.start = start; + this.end = { line: parser.line, column: parser.column }; + define(this, 'content', parser.orig); + define(this, 'source', parser.options.source); +}; + + +/***/ }), + +/***/ 59657: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var fs = __webpack_require__(35747); +var path = __webpack_require__(85622); +var define = __webpack_require__(5477); +var utils = __webpack_require__(622); + +/** + * Expose `mixin()`. + * This code is based on `source-maps-support.js` in reworkcss/css + * https://github.com/reworkcss/css/blob/master/lib/stringify/source-map-support.js + * Copyright (c) 2012 TJ Holowaychuk + */ + +module.exports = mixin; + +/** + * Mixin source map support into `compiler`. + * + * @param {Object} `compiler` + * @api public + */ + +function mixin(compiler) { + define(compiler, '_comment', compiler.comment); + compiler.map = new utils.SourceMap.SourceMapGenerator(); + compiler.position = { line: 1, column: 1 }; + compiler.content = {}; + compiler.files = {}; + + for (var key in exports) { + define(compiler, key, exports[key]); + } +} + +/** + * Update position. + * + * @param {String} str + */ + +exports.updatePosition = function(str) { + var lines = str.match(/\n/g); + if (lines) this.position.line += lines.length; + var i = str.lastIndexOf('\n'); + this.position.column = ~i ? str.length - i : this.position.column + str.length; +}; + +/** + * Emit `str` with `position`. + * + * @param {String} str + * @param {Object} [pos] + * @return {String} + */ + +exports.emit = function(str, node) { + var position = node.position || {}; + var source = position.source; + if (source) { + if (position.filepath) { + source = utils.unixify(position.filepath); + } + + this.map.addMapping({ + source: source, + generated: { + line: this.position.line, + column: Math.max(this.position.column - 1, 0) + }, + original: { + line: position.start.line, + column: position.start.column - 1 + } + }); + + if (position.content) { + this.addContent(source, position); + } + if (position.filepath) { + this.addFile(source, position); + } + + this.updatePosition(str); + this.output += str; + } + return str; +}; + +/** + * Adds a file to the source map output if it has not already been added + * @param {String} `file` + * @param {Object} `pos` + */ + +exports.addFile = function(file, position) { + if (typeof position.content !== 'string') return; + if (Object.prototype.hasOwnProperty.call(this.files, file)) return; + this.files[file] = position.content; +}; + +/** + * Adds a content source to the source map output if it has not already been added + * @param {String} `source` + * @param {Object} `position` + */ + +exports.addContent = function(source, position) { + if (typeof position.content !== 'string') return; + if (Object.prototype.hasOwnProperty.call(this.content, source)) return; + this.map.setSourceContent(source, position.content); +}; + +/** + * Applies any original source maps to the output and embeds the source file + * contents in the source map. + */ + +exports.applySourceMaps = function() { + Object.keys(this.files).forEach(function(file) { + var content = this.files[file]; + this.map.setSourceContent(file, content); + + if (this.options.inputSourcemaps === true) { + var originalMap = utils.sourceMapResolve.resolveSync(content, file, fs.readFileSync); + if (originalMap) { + var map = new utils.SourceMap.SourceMapConsumer(originalMap.map); + var relativeTo = originalMap.sourcesRelativeTo; + this.map.applySourceMap(map, file, utils.unixify(path.dirname(relativeTo))); + } + } + }, this); +}; + +/** + * Process comments, drops sourceMap comments. + * @param {Object} node + */ + +exports.comment = function(node) { + if (/^# sourceMappingURL=/.test(node.comment)) { + return this.emit('', node.position); + } + return this._comment(node); +}; + + +/***/ }), + +/***/ 622: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Module dependencies + */ + +exports.extend = __webpack_require__(28727); +exports.SourceMap = __webpack_require__(96241); +exports.sourceMapResolve = __webpack_require__(10227); + +/** + * Convert backslash in the given string to forward slashes + */ + +exports.unixify = function(fp) { + return fp.split(/\\+/).join('/'); +}; + +/** + * Return true if `val` is a non-empty string + * + * @param {String} `str` + * @return {Boolean} + */ + +exports.isString = function(str) { + return str && typeof str === 'string'; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +exports.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Get the last `n` element from the given `array` + * @param {Array} `array` + * @return {*} + */ + +exports.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + + +/***/ }), + +/***/ 56609: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var decodeUriComponent = __webpack_require__(95748) + +function customDecodeUriComponent(string) { + // `decodeUriComponent` turns `+` into ` `, but that's not wanted. + return decodeUriComponent(string.replace(/\+/g, "%2B")) +} + +module.exports = customDecodeUriComponent + + +/***/ }), + +/***/ 89825: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var url = __webpack_require__(78835) + +function resolveUrl(/* ...urls */) { + return Array.prototype.reduce.call(arguments, function(resolved, nextUrl) { + return url.resolve(resolved, nextUrl) + }) +} + +module.exports = resolveUrl + + +/***/ }), + +/***/ 10227: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var sourceMappingURL = __webpack_require__(21707) + +var resolveUrl = __webpack_require__(89825) +var decodeUriComponent = __webpack_require__(56609) +var urix = __webpack_require__(67806) +var atob = __webpack_require__(83327) + + + +function callbackAsync(callback, error, result) { + setImmediate(function() { callback(error, result) }) +} + +function parseMapToJSON(string, data) { + try { + return JSON.parse(string.replace(/^\)\]\}'/, "")) + } catch (error) { + error.sourceMapData = data + throw error + } +} + +function readSync(read, url, data) { + var readUrl = decodeUriComponent(url) + try { + return String(read(readUrl)) + } catch (error) { + error.sourceMapData = data + throw error + } +} + + + +function resolveSourceMap(code, codeUrl, read, callback) { + var mapData + try { + mapData = resolveSourceMapHelper(code, codeUrl) + } catch (error) { + return callbackAsync(callback, error) + } + if (!mapData || mapData.map) { + return callbackAsync(callback, null, mapData) + } + var readUrl = decodeUriComponent(mapData.url) + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = mapData + return callback(error) + } + mapData.map = String(result) + try { + mapData.map = parseMapToJSON(mapData.map, mapData) + } catch (error) { + return callback(error) + } + callback(null, mapData) + }) +} + +function resolveSourceMapSync(code, codeUrl, read) { + var mapData = resolveSourceMapHelper(code, codeUrl) + if (!mapData || mapData.map) { + return mapData + } + mapData.map = readSync(read, mapData.url, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + return mapData +} + +var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/ + +/** + * The media type for JSON text is application/json. + * + * {@link https://tools.ietf.org/html/rfc8259#section-11 | IANA Considerations } + * + * `text/json` is non-standard media type + */ +var jsonMimeTypeRegex = /^(?:application|text)\/json$/ + +/** + * JSON text exchanged between systems that are not part of a closed ecosystem + * MUST be encoded using UTF-8. + * + * {@link https://tools.ietf.org/html/rfc8259#section-8.1 | Character Encoding} + */ +var jsonCharacterEncoding = "utf-8" + +function base64ToBuf(b64) { + var binStr = atob(b64) + var len = binStr.length + var arr = new Uint8Array(len) + for (var i = 0; i < len; i++) { + arr[i] = binStr.charCodeAt(i) + } + return arr +} + +function decodeBase64String(b64) { + if (typeof TextDecoder === "undefined" || typeof Uint8Array === "undefined") { + return atob(b64) + } + var buf = base64ToBuf(b64); + // Note: `decoder.decode` method will throw a `DOMException` with the + // `"EncodingError"` value when an coding error is found. + var decoder = new TextDecoder(jsonCharacterEncoding, {fatal: true}) + return decoder.decode(buf); +} + +function resolveSourceMapHelper(code, codeUrl) { + codeUrl = urix(codeUrl) + + var url = sourceMappingURL.getFrom(code) + if (!url) { + return null + } + + var dataUri = url.match(dataUriRegex) + if (dataUri) { + var mimeType = dataUri[1] || "text/plain" + var lastParameter = dataUri[2] || "" + var encoded = dataUri[3] || "" + var data = { + sourceMappingURL: url, + url: null, + sourcesRelativeTo: codeUrl, + map: encoded + } + if (!jsonMimeTypeRegex.test(mimeType)) { + var error = new Error("Unuseful data uri mime type: " + mimeType) + error.sourceMapData = data + throw error + } + try { + data.map = parseMapToJSON( + lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded), + data + ) + } catch (error) { + error.sourceMapData = data + throw error + } + return data + } + + var mapUrl = resolveUrl(codeUrl, url) + return { + sourceMappingURL: url, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } +} + + + +function resolveSources(map, mapUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + var pending = map.sources ? map.sources.length : 0 + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (pending === 0) { + callbackAsync(callback, null, result) + return + } + + var done = function() { + pending-- + if (pending === 0) { + callback(null, result) + } + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + callbackAsync(done, null) + } else { + var readUrl = decodeUriComponent(fullUrl) + read(readUrl, function(error, source) { + result.sourcesContent[index] = error ? error : String(source) + done() + }) + } + }) +} + +function resolveSourcesSync(map, mapUrl, read, options) { + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (!map.sources || map.sources.length === 0) { + return result + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (read !== null) { + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + } else { + var readUrl = decodeUriComponent(fullUrl) + try { + result.sourcesContent[index] = String(read(readUrl)) + } catch (error) { + result.sourcesContent[index] = error + } + } + } + }) + + return result +} + +var endingSlash = /\/?$/ + +function resolveSourcesHelper(map, mapUrl, options, fn) { + options = options || {} + mapUrl = urix(mapUrl) + var fullUrl + var sourceContent + var sourceRoot + for (var index = 0, len = map.sources.length; index < len; index++) { + sourceRoot = null + if (typeof options.sourceRoot === "string") { + sourceRoot = options.sourceRoot + } else if (typeof map.sourceRoot === "string" && options.sourceRoot !== false) { + sourceRoot = map.sourceRoot + } + // If the sourceRoot is the empty string, it is equivalent to not setting + // the property at all. + if (sourceRoot === null || sourceRoot === '') { + fullUrl = resolveUrl(mapUrl, map.sources[index]) + } else { + // Make sure that the sourceRoot ends with a slash, so that `/scripts/subdir` becomes + // `/scripts/subdir/`, not `/scripts/`. Pointing to a file as source root + // does not make sense. + fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map.sources[index]) + } + sourceContent = (map.sourcesContent || [])[index] + fn(fullUrl, sourceContent, index) + } +} + + + +function resolve(code, codeUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + if (code === null) { + var mapUrl = codeUrl + var data = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + var readUrl = decodeUriComponent(mapUrl) + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = data + return callback(error) + } + data.map = String(result) + try { + data.map = parseMapToJSON(data.map, data) + } catch (error) { + return callback(error) + } + _resolveSources(data) + }) + } else { + resolveSourceMap(code, codeUrl, read, function(error, mapData) { + if (error) { + return callback(error) + } + if (!mapData) { + return callback(null, null) + } + _resolveSources(mapData) + }) + } + + function _resolveSources(mapData) { + resolveSources(mapData.map, mapData.sourcesRelativeTo, read, options, function(error, result) { + if (error) { + return callback(error) + } + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + callback(null, mapData) + }) + } +} + +function resolveSync(code, codeUrl, read, options) { + var mapData + if (code === null) { + var mapUrl = codeUrl + mapData = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + mapData.map = readSync(read, mapUrl, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + } else { + mapData = resolveSourceMapSync(code, codeUrl, read) + if (!mapData) { + return null + } + } + var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read, options) + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + return mapData +} + + + +module.exports = { + resolveSourceMap: resolveSourceMap, + resolveSourceMapSync: resolveSourceMapSync, + resolveSources: resolveSources, + resolveSourcesSync: resolveSourcesSync, + resolve: resolve, + resolveSync: resolveSync, + parseMapToJSON: parseMapToJSON +} + + +/***/ }), + +/***/ 21707: +/***/ (function(module) { + +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(factory) + } else if (true) { + module.exports = factory() + } else {} +}(this, function() { + + var innerRegex = /[#@] sourceMappingURL=([^\s'"]*)/ + + var regex = RegExp( + "(?:" + + "/\\*" + + "(?:\\s*\r?\n(?://)?)?" + + "(?:" + innerRegex.source + ")" + + "\\s*" + + "\\*/" + + "|" + + "//(?:" + innerRegex.source + ")" + + ")" + + "\\s*" + ) + + return { + + regex: regex, + _innerRegex: innerRegex, + + getFrom: function(code) { + var match = code.match(regex) + return (match ? match[1] || match[2] || "" : null) + }, + + existsIn: function(code) { + return regex.test(code) + }, + + removeFrom: function(code) { + return code.replace(regex, "") + }, + + insertBefore: function(code, string) { + var match = code.match(regex) + if (match) { + return code.slice(0, match.index) + string + code.slice(match.index) + } else { + return code + string + } + } + } + +})); + + +/***/ }), + +/***/ 33218: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * split-string + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var extend = __webpack_require__(66889); + +module.exports = function(str, options, fn) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + if (typeof options === 'function') { + fn = options; + options = null; + } + + // allow separator to be defined as a string + if (typeof options === 'string') { + options = { sep: options }; + } + + var opts = extend({sep: '.'}, options); + var quotes = opts.quotes || ['"', "'", '`']; + var brackets; + + if (opts.brackets === true) { + brackets = { + '<': '>', + '(': ')', + '[': ']', + '{': '}' + }; + } else if (opts.brackets) { + brackets = opts.brackets; + } + + var tokens = []; + var stack = []; + var arr = ['']; + var sep = opts.sep; + var len = str.length; + var idx = -1; + var closeIdx; + + function expected() { + if (brackets && stack.length) { + return brackets[stack[stack.length - 1]]; + } + } + + while (++idx < len) { + var ch = str[idx]; + var next = str[idx + 1]; + var tok = { val: ch, idx: idx, arr: arr, str: str }; + tokens.push(tok); + + if (ch === '\\') { + tok.val = keepEscaping(opts, str, idx) === true ? (ch + next) : next; + tok.escaped = true; + if (typeof fn === 'function') { + fn(tok); + } + arr[arr.length - 1] += tok.val; + idx++; + continue; + } + + if (brackets && brackets[ch]) { + stack.push(ch); + var e = expected(); + var i = idx + 1; + + if (str.indexOf(e, i + 1) !== -1) { + while (stack.length && i < len) { + var s = str[++i]; + if (s === '\\') { + s++; + continue; + } + + if (quotes.indexOf(s) !== -1) { + i = getClosingQuote(str, s, i + 1); + continue; + } + + e = expected(); + if (stack.length && str.indexOf(e, i + 1) === -1) { + break; + } + + if (brackets[s]) { + stack.push(s); + continue; + } + + if (e === s) { + stack.pop(); + } + } + } + + closeIdx = i; + if (closeIdx === -1) { + arr[arr.length - 1] += ch; + continue; + } + + ch = str.slice(idx, closeIdx + 1); + tok.val = ch; + tok.idx = idx = closeIdx; + } + + if (quotes.indexOf(ch) !== -1) { + closeIdx = getClosingQuote(str, ch, idx + 1); + if (closeIdx === -1) { + arr[arr.length - 1] += ch; + continue; + } + + if (keepQuotes(ch, opts) === true) { + ch = str.slice(idx, closeIdx + 1); + } else { + ch = str.slice(idx + 1, closeIdx); + } + + tok.val = ch; + tok.idx = idx = closeIdx; + } + + if (typeof fn === 'function') { + fn(tok, tokens); + ch = tok.val; + idx = tok.idx; + } + + if (tok.val === sep && tok.split !== false) { + arr.push(''); + continue; + } + + arr[arr.length - 1] += tok.val; + } + + return arr; +}; + +function getClosingQuote(str, ch, i, brackets) { + var idx = str.indexOf(ch, i); + if (str.charAt(idx - 1) === '\\') { + return getClosingQuote(str, ch, idx + 1); + } + return idx; +} + +function keepQuotes(ch, opts) { + if (opts.keepDoubleQuotes === true && ch === '"') return true; + if (opts.keepSingleQuotes === true && ch === "'") return true; + return opts.keepQuotes; +} + +function keepEscaping(opts, str, idx) { + if (typeof opts.keepEscaping === 'function') { + return opts.keepEscaping(str, idx); + } + return opts.keepEscaping === true || str[idx + 1] === '\\'; +} + + +/***/ }), + +/***/ 66889: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isExtendable = __webpack_require__(28730); +var assignSymbols = __webpack_require__(64353); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} + + +/***/ }), + +/***/ 28730: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isPlainObject = __webpack_require__(81064); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; + + +/***/ }), + +/***/ 69457: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * static-extend + * + * Copyright (c) 2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var copy = __webpack_require__(31368); +var define = __webpack_require__(5477); +var util = __webpack_require__(31669); + +/** + * Returns a function for extending the static properties, + * prototype properties, and descriptors from the `Parent` + * constructor onto `Child` constructors. + * + * ```js + * var extend = require('static-extend'); + * Parent.extend = extend(Parent); + * + * // optionally pass a custom merge function as the second arg + * Parent.extend = extend(Parent, function(Child) { + * Child.prototype.mixin = function(key, val) { + * Child.prototype[key] = val; + * }; + * }); + * + * // extend "child" constructors + * Parent.extend(Child); + * + * // optionally define prototype methods as the second arg + * Parent.extend(Child, { + * foo: function() {}, + * bar: function() {} + * }); + * ``` + * @param {Function} `Parent` Parent ctor + * @param {Function} `extendFn` Optional extend function for handling any necessary custom merging. Useful when updating methods that require a specific prototype. + * @param {Function} `Child` Child ctor + * @param {Object} `proto` Optionally pass additional prototype properties to inherit. + * @return {Object} + * @api public + */ + +function extend(Parent, extendFn) { + if (typeof Parent !== 'function') { + throw new TypeError('expected Parent to be a function.'); + } + + return function(Ctor, proto) { + if (typeof Ctor !== 'function') { + throw new TypeError('expected Ctor to be a function.'); + } + + util.inherits(Ctor, Parent); + copy(Ctor, Parent); + + // proto can be null or a plain object + if (typeof proto === 'object') { + var obj = Object.create(proto); + + for (var k in obj) { + Ctor.prototype[k] = obj[k]; + } + } + + // keep a reference to the parent prototype + define(Ctor.prototype, '_parent_', { + configurable: true, + set: function() {}, + get: function() { + return Parent.prototype; + } + }); + + if (typeof extendFn === 'function') { + extendFn(Ctor, Parent); + } + + Ctor.extend = extend(Ctor, extendFn); + }; +}; + +/** + * Expose `extend` + */ + +module.exports = extend; + + +/***/ }), + +/***/ 27836: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(12233); +const HookCodeFactory = __webpack_require__(64288); + +class AsyncParallelBailHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, onDone }) { + let code = ""; + code += `var _results = new Array(${this.options.taps.length});\n`; + code += "var _checkDone = () => {\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(); + +class AsyncParallelBailHook extends Hook { + compile(options) { + factory.setup(this, options); + return factory.create(options); + } +} + +Object.defineProperties(AsyncParallelBailHook.prototype, { + _call: { value: undefined, configurable: true, writable: true } +}); + +module.exports = AsyncParallelBailHook; + + +/***/ }), + +/***/ 14616: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(12233); +const HookCodeFactory = __webpack_require__(64288); + +class AsyncParallelHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { + return this.callTapsParallel({ + onError: (i, err, done, doneBreak) => onError(err) + doneBreak(true), + onDone + }); + } +} + +const factory = new AsyncParallelHookCodeFactory(); + +class AsyncParallelHook extends Hook { + compile(options) { + factory.setup(this, options); + return factory.create(options); + } +} + +Object.defineProperties(AsyncParallelHook.prototype, { + _call: { value: undefined, configurable: true, writable: true } +}); + +module.exports = AsyncParallelHook; + + +/***/ }), + +/***/ 89674: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(12233); +const HookCodeFactory = __webpack_require__(64288); + +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(); + +class AsyncSeriesBailHook extends Hook { + compile(options) { + factory.setup(this, options); + return factory.create(options); + } +} + +Object.defineProperties(AsyncSeriesBailHook.prototype, { + _call: { value: undefined, configurable: true, writable: true } +}); + +module.exports = AsyncSeriesBailHook; + + +/***/ }), + +/***/ 55328: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(12233); +const HookCodeFactory = __webpack_require__(64288); + +class AsyncSeriesHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { + return this.callTapsSeries({ + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onDone + }); + } +} + +const factory = new AsyncSeriesHookCodeFactory(); + +class AsyncSeriesHook extends Hook { + compile(options) { + factory.setup(this, options); + return factory.create(options); + } +} + +Object.defineProperties(AsyncSeriesHook.prototype, { + _call: { value: undefined, configurable: true, writable: true } +}); + +module.exports = AsyncSeriesHook; + + +/***/ }), + +/***/ 14568: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(12233); +const HookCodeFactory = __webpack_require__(64288); + +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(); + +class AsyncSeriesWaterfallHook extends Hook { + constructor(args) { + super(args); + if (args.length < 1) + throw new Error("Waterfall hooks must have at least one argument"); + } + + compile(options) { + factory.setup(this, options); + return factory.create(options); + } +} + +Object.defineProperties(AsyncSeriesWaterfallHook.prototype, { + _call: { value: undefined, configurable: true, writable: true } +}); + +module.exports = AsyncSeriesWaterfallHook; + + +/***/ }), + +/***/ 12233: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class Hook { + constructor(args) { + if (!Array.isArray(args)) args = []; + this._args = args; + this.taps = []; + this.interceptors = []; + this.call = this._call; + this.promise = this._promise; + this.callAsync = this._callAsync; + this._x = undefined; + } + + compile(options) { + throw new Error("Abstract: should be overriden"); + } + + _createCall(type) { + return this.compile({ + taps: this.taps, + interceptors: this.interceptors, + args: this._args, + type: type + }); + } + + tap(options, fn) { + if (typeof options === "string") options = { name: options }; + if (typeof options !== "object" || options === null) + throw new Error( + "Invalid arguments to tap(options: Object, fn: function)" + ); + options = Object.assign({ type: "sync", fn: fn }, options); + if (typeof options.name !== "string" || options.name === "") + throw new Error("Missing name for tap"); + options = this._runRegisterInterceptors(options); + this._insert(options); + } + + tapAsync(options, fn) { + if (typeof options === "string") options = { name: options }; + if (typeof options !== "object" || options === null) + throw new Error( + "Invalid arguments to tapAsync(options: Object, fn: function)" + ); + options = Object.assign({ type: "async", fn: fn }, options); + if (typeof options.name !== "string" || options.name === "") + throw new Error("Missing name for tapAsync"); + options = this._runRegisterInterceptors(options); + this._insert(options); + } + + tapPromise(options, fn) { + if (typeof options === "string") options = { name: options }; + if (typeof options !== "object" || options === null) + throw new Error( + "Invalid arguments to tapPromise(options: Object, fn: function)" + ); + options = Object.assign({ type: "promise", fn: fn }, options); + if (typeof options.name !== "string" || options.name === "") + throw new Error("Missing name for tapPromise"); + options = this._runRegisterInterceptors(options); + this._insert(options); + } + + _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); + + // Prevent creating endless prototype chains + options = Object.assign({}, options, this._withOptions); + const base = this._withOptionsBase || this; + const newHook = Object.create(base); + + (newHook.tapAsync = (opt, fn) => base.tapAsync(mergeOptions(opt), fn)), + (newHook.tap = (opt, fn) => base.tap(mergeOptions(opt), fn)); + newHook.tapPromise = (opt, fn) => base.tapPromise(mergeOptions(opt), fn); + newHook._withOptions = options; + newHook._withOptionsBase = base; + return newHook; + } + + 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; + } +} + +function createCompileDelegate(name, type) { + return function lazyCompileHook(...args) { + this[name] = this._createCall(type); + return this[name](...args); + }; +} + +Object.defineProperties(Hook.prototype, { + _call: { + value: createCompileDelegate("call", "sync"), + configurable: true, + writable: true + }, + _promise: { + value: createCompileDelegate("promise", "promise"), + configurable: true, + writable: true + }, + _callAsync: { + value: createCompileDelegate("callAsync", "async"), + configurable: true, + writable: true + } +}); + +module.exports = Hook; + + +/***/ }), + +/***/ 64288: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +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.content({ + 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.content({ + onError: err => `_callback(${err});\n`, + onResult: result => `_callback(null, ${result});\n`, + onDone: () => "_callback();\n" + }) + ); + break; + case "promise": + let errorHelperUsed = false; + const content = this.content({ + onError: err => { + errorHelperUsed = true; + return `_error(${err});\n`; + }, + onResult: result => `_resolve(${result});\n`, + onDone: () => "_resolve();\n" + }); + let code = ""; + code += '"use strict";\n'; + code += "return new Promise((_resolve, _reject) => {\n"; + if (errorHelperUsed) { + code += "var _sync = true;\n"; + code += "function _error(_err) {\n"; + code += "if(_sync)\n"; + code += "_resolve(Promise.resolve().then(() => { throw _err; }));\n"; + code += "else\n"; + code += "_reject(_err);\n"; + code += "};\n"; + } + code += this.header(); + 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; + } + + 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"; + } + 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`; + } + } + 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 += `(_err${tapIndex}, _result${tapIndex}) => {\n`; + else cbCode += `_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(_result${tapIndex} => {\n`; + code += `_hasResult${tapIndex} = true;\n`; + if (onResult) { + code += onResult(`_result${tapIndex}`); + } + if (onDone) { + code += onDone(); + } + code += `}, _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 || false; + let code = ""; + let current = onDone; + for (let j = this.options.taps.length - 1; j >= 0; j--) { + const i = j; + const unroll = current !== onDone && this.options.taps[i].type !== "sync"; + if (unroll) { + 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 = () => {\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 = () => {\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; + + +/***/ }), + +/***/ 35233: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class HookMap { + constructor(factory) { + this._map = new Map(); + 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: (key, hook) => hook + }, + interceptor + ) + ); + } + + tap(key, options, fn) { + return this.for(key).tap(options, fn); + } + + tapAsync(key, options, fn) { + return this.for(key).tapAsync(options, fn); + } + + tapPromise(key, options, fn) { + return this.for(key).tapPromise(options, fn); + } +} + +module.exports = HookMap; + + +/***/ }), + +/***/ 93607: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(12233); + +class MultiHook { + constructor(hooks) { + this.hooks = hooks; + } + + 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))); + } +} + +module.exports = MultiHook; + + +/***/ }), + +/***/ 16477: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(12233); +const HookCodeFactory = __webpack_require__(64288); + +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(); + +class SyncBailHook extends Hook { + tapAsync() { + throw new Error("tapAsync is not supported on a SyncBailHook"); + } + + tapPromise() { + throw new Error("tapPromise is not supported on a SyncBailHook"); + } + + compile(options) { + factory.setup(this, options); + return factory.create(options); + } +} + +module.exports = SyncBailHook; + + +/***/ }), + +/***/ 77633: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(12233); +const HookCodeFactory = __webpack_require__(64288); + +class SyncHookCodeFactory extends HookCodeFactory { + content({ onError, onDone, rethrowIfPossible }) { + return this.callTapsSeries({ + onError: (i, err) => onError(err), + onDone, + rethrowIfPossible + }); + } +} + +const factory = new SyncHookCodeFactory(); + +class SyncHook extends Hook { + tapAsync() { + throw new Error("tapAsync is not supported on a SyncHook"); + } + + tapPromise() { + throw new Error("tapPromise is not supported on a SyncHook"); + } + + compile(options) { + factory.setup(this, options); + return factory.create(options); + } +} + +module.exports = SyncHook; + + +/***/ }), + +/***/ 13608: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(12233); +const HookCodeFactory = __webpack_require__(64288); + +class SyncLoopHookCodeFactory extends HookCodeFactory { + content({ onError, onDone, rethrowIfPossible }) { + return this.callTapsLooping({ + onError: (i, err) => onError(err), + onDone, + rethrowIfPossible + }); + } +} + +const factory = new SyncLoopHookCodeFactory(); + +class SyncLoopHook extends Hook { + tapAsync() { + throw new Error("tapAsync is not supported on a SyncLoopHook"); + } + + tapPromise() { + throw new Error("tapPromise is not supported on a SyncLoopHook"); + } + + compile(options) { + factory.setup(this, options); + return factory.create(options); + } +} + +module.exports = SyncLoopHook; + + +/***/ }), + +/***/ 6548: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(12233); +const HookCodeFactory = __webpack_require__(64288); + +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(); + +class SyncWaterfallHook extends Hook { + constructor(args) { + super(args); + if (args.length < 1) + throw new Error("Waterfall hooks must have at least one argument"); + } + + tapAsync() { + throw new Error("tapAsync is not supported on a SyncWaterfallHook"); + } + + tapPromise() { + throw new Error("tapPromise is not supported on a SyncWaterfallHook"); + } + + compile(options) { + factory.setup(this, options); + return factory.create(options); + } +} + +module.exports = SyncWaterfallHook; + + +/***/ }), + +/***/ 72693: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const util = __webpack_require__(31669); +const SyncBailHook = __webpack_require__(16477); + +function Tapable() { + this._pluginCompat = new SyncBailHook(["options"]); + this._pluginCompat.tap( + { + name: "Tapable camelCase", + stage: 100 + }, + options => { + options.names.add( + options.name.replace(/[- ]([a-z])/g, (str, ch) => ch.toUpperCase()) + ); + } + ); + this._pluginCompat.tap( + { + name: "Tapable this.hooks", + stage: 200 + }, + options => { + let hook; + for (const name of options.names) { + hook = this.hooks[name]; + if (hook !== undefined) { + break; + } + } + if (hook !== undefined) { + const tapOpt = { + name: options.fn.name || "unnamed compat plugin", + stage: options.stage || 0 + }; + if (options.async) hook.tapAsync(tapOpt, options.fn); + else hook.tap(tapOpt, options.fn); + return true; + } + } + ); +} +module.exports = Tapable; + +Tapable.addCompatLayer = function addCompatLayer(instance) { + Tapable.call(instance); + instance.plugin = Tapable.prototype.plugin; + instance.apply = Tapable.prototype.apply; +}; + +Tapable.prototype.plugin = util.deprecate(function plugin(name, fn) { + if (Array.isArray(name)) { + name.forEach(function(name) { + this.plugin(name, fn); + }, this); + return; + } + const result = this._pluginCompat.call({ + name: name, + fn: fn, + names: new Set([name]) + }); + if (!result) { + throw new Error( + `Plugin could not be registered at '${name}'. Hook was not found.\n` + + "BREAKING CHANGE: There need to exist a hook at 'this.hooks'. " + + "To create a compatibility layer for this hook, hook into 'this._pluginCompat'." + ); + } +}, "Tapable.plugin is deprecated. Use new API on `.hooks` instead"); + +Tapable.prototype.apply = util.deprecate(function apply() { + for (var i = 0; i < arguments.length; i++) { + arguments[i].apply(this); + } +}, "Tapable.apply is deprecated. Call apply on the plugin directly instead"); + + +/***/ }), + +/***/ 92402: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +exports.__esModule = true; +exports.Tapable = __webpack_require__(72693); +exports.SyncHook = __webpack_require__(77633); +exports.SyncBailHook = __webpack_require__(16477); +exports.SyncWaterfallHook = __webpack_require__(6548); +exports.SyncLoopHook = __webpack_require__(13608); +exports.AsyncParallelHook = __webpack_require__(14616); +exports.AsyncParallelBailHook = __webpack_require__(27836); +exports.AsyncSeriesHook = __webpack_require__(55328); +exports.AsyncSeriesBailHook = __webpack_require__(89674); +exports.AsyncSeriesWaterfallHook = __webpack_require__(14568); +exports.HookMap = __webpack_require__(35233); +exports.MultiHook = __webpack_require__(93607); + + +/***/ }), + +/***/ 16326: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _os = _interopRequireDefault(__webpack_require__(12087)); + +var _cacache = _interopRequireDefault(__webpack_require__(36801)); + +var _findCacheDir = _interopRequireDefault(__webpack_require__(61844)); + +var _workerFarm = _interopRequireDefault(__webpack_require__(18921)); + +var _serializeJavascript = _interopRequireDefault(__webpack_require__(85841)); + +var _isWsl = _interopRequireDefault(__webpack_require__(47543)); + +var _minify = _interopRequireDefault(__webpack_require__(30787)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const worker = __webpack_require__.ab + "worker.js"; + +class TaskRunner { + constructor(options = {}) { + const { + cache, + parallel + } = options; + this.cacheDir = cache === true ? (0, _findCacheDir.default)({ + name: 'terser-webpack-plugin' + }) || _os.default.tmpdir() : cache; // In some cases cpus() returns undefined + // https://github.com/nodejs/node/issues/19022 + + const cpus = _os.default.cpus() || { + length: 1 + }; // WSL sometimes freezes, error seems to be on the WSL side + // https://github.com/webpack-contrib/terser-webpack-plugin/issues/21 + + this.maxConcurrentWorkers = _isWsl.default ? 1 : parallel === true ? cpus.length - 1 : Math.min(Number(parallel) || 0, cpus.length - 1); + } + + run(tasks, callback) { + /* istanbul ignore if */ + if (!tasks.length) { + callback(null, []); + return; + } + + if (this.maxConcurrentWorkers > 1) { + const workerOptions = process.platform === 'win32' ? { + maxConcurrentWorkers: this.maxConcurrentWorkers, + maxConcurrentCallsPerWorker: 1 + } : { + maxConcurrentWorkers: this.maxConcurrentWorkers + }; + this.workers = (0, _workerFarm.default)(workerOptions, __webpack_require__.ab + "worker.js"); + + this.boundWorkers = (options, cb) => { + try { + this.workers((0, _serializeJavascript.default)(options), cb); + } catch (error) { + // worker-farm can fail with ENOMEM or something else + cb(error); + } + }; + } else { + this.boundWorkers = (options, cb) => { + try { + cb(null, (0, _minify.default)(options)); + } catch (error) { + cb(error); + } + }; + } + + let toRun = tasks.length; + const results = []; + + const step = (index, data) => { + toRun -= 1; + results[index] = data; + + if (!toRun) { + callback(null, results); + } + }; + + tasks.forEach((task, index) => { + const enqueue = () => { + this.boundWorkers(task, (error, data) => { + const result = error ? { + error + } : data; + + const done = () => step(index, result); + + if (this.cacheDir && !result.error) { + _cacache.default.put(this.cacheDir, (0, _serializeJavascript.default)(task.cacheKeys), JSON.stringify(data)).then(done, done); + } else { + done(); + } + }); + }; + + if (this.cacheDir) { + _cacache.default.get(this.cacheDir, (0, _serializeJavascript.default)(task.cacheKeys)).then(({ + data + }) => step(index, JSON.parse(data)), enqueue); + } else { + enqueue(); + } + }); + } + + exit() { + if (this.workers) { + _workerFarm.default.end(this.workers); + } + } + +} + +exports.default = TaskRunner; + +/***/ }), + +/***/ 89301: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +const plugin = __webpack_require__(43884); + +module.exports = plugin.default; + +/***/ }), + +/***/ 43884: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _crypto = _interopRequireDefault(__webpack_require__(76417)); + +var _path = _interopRequireDefault(__webpack_require__(85622)); + +var _sourceMap = __webpack_require__(96241); + +var _webpackSources = __webpack_require__(53665); + +var _RequestShortener = _interopRequireDefault(__webpack_require__(54254)); + +var _ModuleFilenameHelpers = _interopRequireDefault(__webpack_require__(71474)); + +var _schemaUtils = _interopRequireDefault(__webpack_require__(33225)); + +var _serializeJavascript = _interopRequireDefault(__webpack_require__(85841)); + +var _package = _interopRequireDefault(__webpack_require__(92203)); + +var _options = _interopRequireDefault(__webpack_require__(11840)); + +var _TaskRunner = _interopRequireDefault(__webpack_require__(16326)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +const warningRegex = /\[.+:([0-9]+),([0-9]+)\]/; + +class TerserPlugin { + constructor(options = {}) { + (0, _schemaUtils.default)(_options.default, options, 'Terser Plugin'); + const { + minify, + terserOptions = {}, + test = /\.m?js(\?.*)?$/i, + chunkFilter = () => true, + warningsFilter = () => true, + extractComments = false, + sourceMap = false, + cache = false, + cacheKeys = defaultCacheKeys => defaultCacheKeys, + parallel = false, + include, + exclude + } = options; + this.options = { + test, + chunkFilter, + warningsFilter, + extractComments, + sourceMap, + cache, + cacheKeys, + parallel, + include, + exclude, + minify, + terserOptions: _objectSpread({ + output: { + comments: extractComments ? false : /^\**!|@preserve|@license|@cc_on/i + } + }, terserOptions) + }; + } + + static isSourceMap(input) { + // All required options for `new SourceMapConsumer(...options)` + // https://github.com/mozilla/source-map#new-sourcemapconsumerrawsourcemap + return Boolean(input && input.version && input.sources && Array.isArray(input.sources) && typeof input.mappings === 'string'); + } + + static buildSourceMap(inputSourceMap) { + if (!inputSourceMap || !TerserPlugin.isSourceMap(inputSourceMap)) { + return null; + } + + return new _sourceMap.SourceMapConsumer(inputSourceMap); + } + + static buildError(err, file, sourceMap, requestShortener) { + // Handling error which should have line, col, filename and message + if (err.line) { + const original = sourceMap && sourceMap.originalPositionFor({ + line: err.line, + column: err.col + }); + + if (original && original.source && requestShortener) { + return new Error(`${file} from Terser\n${err.message} [${requestShortener.shorten(original.source)}:${original.line},${original.column}][${file}:${err.line},${err.col}]`); + } + + return new Error(`${file} from Terser\n${err.message} [${file}:${err.line},${err.col}]`); + } else if (err.stack) { + return new Error(`${file} from Terser\n${err.stack}`); + } + + return new Error(`${file} from Terser\n${err.message}`); + } + + static buildWarning(warning, file, sourceMap, requestShortener, warningsFilter) { + let warningMessage = warning; + let locationMessage = ''; + let source = null; + + if (sourceMap) { + const match = warningRegex.exec(warning); + + if (match) { + const line = +match[1]; + const column = +match[2]; + const original = sourceMap.originalPositionFor({ + line, + column + }); + + if (original && original.source && original.source !== file && requestShortener) { + ({ + source + } = original); + warningMessage = `${warningMessage.replace(warningRegex, '')}`; + locationMessage = `[${requestShortener.shorten(original.source)}:${original.line},${original.column}]`; + } + } + } + + if (warningsFilter && !warningsFilter(warning, source)) { + return null; + } + + return `Terser Plugin: ${warningMessage}${locationMessage}`; + } + + apply(compiler) { + const buildModuleFn = moduleArg => { + // to get detailed location info about errors + moduleArg.useSourceMap = true; + }; + + const optimizeFn = (compilation, chunks, callback) => { + const taskRunner = new _TaskRunner.default({ + cache: this.options.cache, + parallel: this.options.parallel + }); + const processedAssets = new WeakSet(); + const tasks = []; + const { + chunkFilter + } = this.options; + Array.from(chunks).filter(chunk => chunkFilter && chunkFilter(chunk)).reduce((acc, chunk) => acc.concat(chunk.files || []), []).concat(compilation.additionalChunkAssets || []).filter(_ModuleFilenameHelpers.default.matchObject.bind(null, this.options)).forEach(file => { + let inputSourceMap; + const asset = compilation.assets[file]; + + if (processedAssets.has(asset)) { + return; + } + + try { + let input; + + if (this.options.sourceMap && asset.sourceAndMap) { + const { + source, + map + } = asset.sourceAndMap(); + input = source; + + if (TerserPlugin.isSourceMap(map)) { + inputSourceMap = map; + } else { + inputSourceMap = map; + compilation.warnings.push(new Error(`${file} contains invalid source map`)); + } + } else { + input = asset.source(); + inputSourceMap = null; + } // Handling comment extraction + + + let commentsFile = false; + + if (this.options.extractComments) { + commentsFile = this.options.extractComments.filename || `${file}.LICENSE`; + + if (typeof commentsFile === 'function') { + commentsFile = commentsFile(file); + } + } + + const task = { + file, + input, + inputSourceMap, + commentsFile, + extractComments: this.options.extractComments, + terserOptions: this.options.terserOptions, + minify: this.options.minify + }; + + if (this.options.cache) { + const defaultCacheKeys = { + terser: _package.default.version, + node_version: process.version, + // eslint-disable-next-line global-require + 'terser-webpack-plugin': __webpack_require__(9122)/* .version */ .i8, + 'terser-webpack-plugin-options': this.options, + hash: _crypto.default.createHash('md4').update(input).digest('hex') + }; + task.cacheKeys = this.options.cacheKeys(defaultCacheKeys, file); + } + + tasks.push(task); + } catch (error) { + compilation.errors.push(TerserPlugin.buildError(error, file, TerserPlugin.buildSourceMap(inputSourceMap), new _RequestShortener.default(compiler.context))); + } + }); + taskRunner.run(tasks, (tasksError, results) => { + if (tasksError) { + compilation.errors.push(tasksError); + return; + } + + results.forEach((data, index) => { + const { + file, + input, + inputSourceMap, + commentsFile + } = tasks[index]; + const { + error, + map, + code, + warnings + } = data; + let { + extractedComments + } = data; + let sourceMap = null; + + if (error || warnings && warnings.length > 0) { + sourceMap = TerserPlugin.buildSourceMap(inputSourceMap); + } // Handling results + // Error case: add errors, and go to next file + + + if (error) { + compilation.errors.push(TerserPlugin.buildError(error, file, sourceMap, new _RequestShortener.default(compiler.context))); + return; + } + + let outputSource; + + if (map) { + outputSource = new _webpackSources.SourceMapSource(code, file, JSON.parse(map), input, inputSourceMap, true); + } else { + outputSource = new _webpackSources.RawSource(code); + } // Write extracted comments to commentsFile + + + if (commentsFile && extractedComments && extractedComments.length > 0) { + if (commentsFile in compilation.assets) { + const commentsFileSource = compilation.assets[commentsFile].source(); + extractedComments = extractedComments.filter(comment => !commentsFileSource.includes(comment)); + } + + if (extractedComments.length > 0) { + // Add a banner to the original file + if (this.options.extractComments.banner !== false) { + let banner = this.options.extractComments.banner || `For license information please see ${_path.default.posix.basename(commentsFile)}`; + + if (typeof banner === 'function') { + banner = banner(commentsFile); + } + + if (banner) { + outputSource = new _webpackSources.ConcatSource(`/*! ${banner} */\n`, outputSource); + } + } + + const commentsSource = new _webpackSources.RawSource(`${extractedComments.join('\n\n')}\n`); + + if (commentsFile in compilation.assets) { + // commentsFile already exists, append new comments... + if (compilation.assets[commentsFile] instanceof _webpackSources.ConcatSource) { + compilation.assets[commentsFile].add('\n'); + compilation.assets[commentsFile].add(commentsSource); + } else { + compilation.assets[commentsFile] = new _webpackSources.ConcatSource(compilation.assets[commentsFile], '\n', commentsSource); + } + } else { + compilation.assets[commentsFile] = commentsSource; + } + } + } // Updating assets + + + processedAssets.add(compilation.assets[file] = outputSource); // Handling warnings + + if (warnings && warnings.length > 0) { + warnings.forEach(warning => { + const builtWarning = TerserPlugin.buildWarning(warning, file, sourceMap, new _RequestShortener.default(compiler.context), this.options.warningsFilter); + + if (builtWarning) { + compilation.warnings.push(builtWarning); + } + }); + } + }); + taskRunner.exit(); + callback(); + }); + }; + + const plugin = { + name: this.constructor.name + }; + compiler.hooks.compilation.tap(plugin, compilation => { + if (this.options.sourceMap) { + compilation.hooks.buildModule.tap(plugin, buildModuleFn); + } + + const { + mainTemplate, + chunkTemplate + } = compilation; // Regenerate `contenthash` for minified assets + + for (const template of [mainTemplate, chunkTemplate]) { + template.hooks.hashForChunk.tap(plugin, hash => { + const data = (0, _serializeJavascript.default)({ + terser: _package.default.version, + terserOptions: this.options.terserOptions + }); + hash.update('TerserPlugin'); + hash.update(data); + }); + } + + compilation.hooks.optimizeChunkAssets.tapAsync(plugin, optimizeFn.bind(this, compilation)); + }); + } + +} + +var _default = TerserPlugin; +exports.default = _default; + +/***/ }), + +/***/ 30787: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _terser = __webpack_require__(54775); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +const buildTerserOptions = ({ + ecma, + warnings, + parse = {}, + compress = {}, + mangle, + module, + output, + toplevel, + nameCache, + ie8, + + /* eslint-disable camelcase */ + keep_classnames, + keep_fnames, + + /* eslint-enable camelcase */ + safari10 +} = {}) => ({ + ecma, + warnings, + parse: _objectSpread({}, parse), + compress: typeof compress === 'boolean' ? compress : _objectSpread({}, compress), + // eslint-disable-next-line no-nested-ternary + mangle: mangle == null ? true : typeof mangle === 'boolean' ? mangle : _objectSpread({}, mangle), + output: _objectSpread({ + shebang: true, + comments: false, + beautify: false, + semicolons: true + }, output), + module, + // Ignoring sourceMap from options + sourceMap: null, + toplevel, + nameCache, + ie8, + keep_classnames, + keep_fnames, + safari10 +}); + +const buildComments = (options, terserOptions, extractedComments) => { + const condition = {}; + const commentsOpts = terserOptions.output.comments; // Use /^\**!|@preserve|@license|@cc_on/i RegExp + + if (typeof options.extractComments === 'boolean') { + condition.preserve = commentsOpts; + condition.extract = /^\**!|@preserve|@license|@cc_on/i; + } else if (typeof options.extractComments === 'string' || options.extractComments instanceof RegExp) { + // extractComments specifies the extract condition and commentsOpts specifies the preserve condition + condition.preserve = commentsOpts; + condition.extract = options.extractComments; + } else if (typeof options.extractComments === 'function') { + condition.preserve = commentsOpts; + condition.extract = options.extractComments; + } else if (Object.prototype.hasOwnProperty.call(options.extractComments, 'condition')) { + // Extract condition is given in extractComments.condition + condition.preserve = commentsOpts; + condition.extract = options.extractComments.condition; + } else { + // No extract condition is given. Extract comments that match commentsOpts instead of preserving them + condition.preserve = false; + condition.extract = commentsOpts; + } // Ensure that both conditions are functions + + + ['preserve', 'extract'].forEach(key => { + let regexStr; + let regex; + + switch (typeof condition[key]) { + case 'boolean': + condition[key] = condition[key] ? () => true : () => false; + break; + + case 'function': + break; + + case 'string': + if (condition[key] === 'all') { + condition[key] = () => true; + + break; + } + + if (condition[key] === 'some') { + condition[key] = (astNode, comment) => { + return comment.type === 'comment2' && /^\**!|@preserve|@license|@cc_on/i.test(comment.value); + }; + + break; + } + + regexStr = condition[key]; + + condition[key] = (astNode, comment) => { + return new RegExp(regexStr).test(comment.value); + }; + + break; + + default: + regex = condition[key]; + + condition[key] = (astNode, comment) => regex.test(comment.value); + + } + }); // Redefine the comments function to extract and preserve + // comments according to the two conditions + + return (astNode, comment) => { + if (condition.extract(astNode, comment)) { + const commentText = comment.type === 'comment2' ? `/*${comment.value}*/` : `//${comment.value}`; // Don't include duplicate comments + + if (!extractedComments.includes(commentText)) { + extractedComments.push(commentText); + } + } + + return condition.preserve(astNode, comment); + }; +}; + +const minify = options => { + const { + file, + input, + inputSourceMap, + extractComments, + minify: minifyFn + } = options; + + if (minifyFn) { + return minifyFn({ + [file]: input + }, inputSourceMap); + } // Copy terser options + + + const terserOptions = buildTerserOptions(options.terserOptions); // Let terser generate a SourceMap + + if (inputSourceMap) { + terserOptions.sourceMap = true; + } + + const extractedComments = []; + + if (extractComments) { + terserOptions.output.comments = buildComments(options, terserOptions, extractedComments); + } + + const { + error, + map, + code, + warnings + } = (0, _terser.minify)({ + [file]: input + }, terserOptions); + return { + error, + map, + code, + warnings, + extractedComments + }; +}; + +var _default = minify; +exports.default = _default; + +/***/ }), + +/***/ 71708: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * to-object-path + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var typeOf = __webpack_require__(48865); + +module.exports = function toPath(args) { + if (typeOf(args) !== 'arguments') { + args = arguments; + } + return filter(args).join('.'); +}; + +function filter(arr) { + var len = arr.length; + var idx = -1; + var res = []; + + while (++idx < len) { + var ele = arr[idx]; + if (typeOf(ele) === 'arguments' || Array.isArray(ele)) { + res.push.apply(res, filter(ele)); + } else if (typeof ele === 'string') { + res.push(ele); + } + } + return res; +} + + +/***/ }), + +/***/ 1353: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * to-regex-range + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var repeat = __webpack_require__(6332); +var isNumber = __webpack_require__(87218); +var cache = {}; + +function toRegexRange(min, max, options) { + if (isNumber(min) === false) { + throw new RangeError('toRegexRange: first argument is invalid.'); + } + + if (typeof max === 'undefined' || min === max) { + return String(min); + } + + if (isNumber(max) === false) { + throw new RangeError('toRegexRange: second argument is invalid.'); + } + + options = options || {}; + var relax = String(options.relaxZeros); + var shorthand = String(options.shorthand); + var capture = String(options.capture); + var key = min + ':' + max + '=' + relax + shorthand + capture; + if (cache.hasOwnProperty(key)) { + return cache[key].result; + } + + var a = Math.min(min, max); + var b = Math.max(min, max); + + if (Math.abs(a - b) === 1) { + var result = min + '|' + max; + if (options.capture) { + return '(' + result + ')'; + } + return result; + } + + var isPadded = padding(min) || padding(max); + var positives = []; + var negatives = []; + + var tok = {min: min, max: max, a: a, b: b}; + if (isPadded) { + tok.isPadded = isPadded; + tok.maxLen = String(tok.max).length; + } + + if (a < 0) { + var newMin = b < 0 ? Math.abs(b) : 1; + var newMax = Math.abs(a); + negatives = splitToPatterns(newMin, newMax, tok, options); + a = tok.a = 0; + } + + if (b >= 0) { + positives = splitToPatterns(a, b, tok, options); + } + + tok.negatives = negatives; + tok.positives = positives; + tok.result = siftPatterns(negatives, positives, options); + + if (options.capture && (positives.length + negatives.length) > 1) { + tok.result = '(' + tok.result + ')'; + } + + cache[key] = tok; + return tok.result; +} + +function siftPatterns(neg, pos, options) { + var onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; + var onlyPositive = filterPatterns(pos, neg, '', false, options) || []; + var intersected = filterPatterns(neg, pos, '-?', true, options) || []; + var subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); + return subpatterns.join('|'); +} + +function splitToRanges(min, max) { + min = Number(min); + max = Number(max); + + var nines = 1; + var stops = [max]; + var stop = +countNines(min, nines); + + while (min <= stop && stop <= max) { + stops = push(stops, stop); + nines += 1; + stop = +countNines(min, nines); + } + + var zeros = 1; + stop = countZeros(max + 1, zeros) - 1; + + while (min < stop && stop <= max) { + stops = push(stops, stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + + stops.sort(compare); + return stops; +} + +/** + * Convert a range to a regex pattern + * @param {Number} `start` + * @param {Number} `stop` + * @return {String} + */ + +function rangeToPattern(start, stop, options) { + if (start === stop) { + return {pattern: String(start), digits: []}; + } + + var zipped = zip(String(start), String(stop)); + var len = zipped.length, i = -1; + + var pattern = ''; + var digits = 0; + + while (++i < len) { + var numbers = zipped[i]; + var startDigit = numbers[0]; + var stopDigit = numbers[1]; + + if (startDigit === stopDigit) { + pattern += startDigit; + + } else if (startDigit !== '0' || stopDigit !== '9') { + pattern += toCharacterClass(startDigit, stopDigit); + + } else { + digits += 1; + } + } + + if (digits) { + pattern += options.shorthand ? '\\d' : '[0-9]'; + } + + return { pattern: pattern, digits: [digits] }; +} + +function splitToPatterns(min, max, tok, options) { + var ranges = splitToRanges(min, max); + var len = ranges.length; + var idx = -1; + + var tokens = []; + var start = min; + var prev; + + while (++idx < len) { + var range = ranges[idx]; + var obj = rangeToPattern(start, range, options); + var zeros = ''; + + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.digits.length > 1) { + prev.digits.pop(); + } + prev.digits.push(obj.digits[0]); + prev.string = prev.pattern + toQuantifier(prev.digits); + start = range + 1; + continue; + } + + if (tok.isPadded) { + zeros = padZeros(range, tok); + } + + obj.string = zeros + obj.pattern + toQuantifier(obj.digits); + tokens.push(obj); + start = range + 1; + prev = obj; + } + + return tokens; +} + +function filterPatterns(arr, comparison, prefix, intersection, options) { + var res = []; + + for (var i = 0; i < arr.length; i++) { + var tok = arr[i]; + var ele = tok.string; + + if (options.relaxZeros !== false) { + if (prefix === '-' && ele.charAt(0) === '0') { + if (ele.charAt(1) === '{') { + ele = '0*' + ele.replace(/^0\{\d+\}/, ''); + } else { + ele = '0*' + ele.slice(1); + } + } + } + + if (!intersection && !contains(comparison, 'string', ele)) { + res.push(prefix + ele); + } + + if (intersection && contains(comparison, 'string', ele)) { + res.push(prefix + ele); + } + } + return res; +} + +/** + * Zip strings (`for in` can be used on string characters) + */ + +function zip(a, b) { + var arr = []; + for (var ch in a) arr.push([a[ch], b[ch]]); + return arr; +} + +function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; +} + +function push(arr, ele) { + if (arr.indexOf(ele) === -1) arr.push(ele); + return arr; +} + +function contains(arr, key, val) { + for (var i = 0; i < arr.length; i++) { + if (arr[i][key] === val) { + return true; + } + } + return false; +} + +function countNines(min, len) { + return String(min).slice(0, -len) + repeat('9', len); +} + +function countZeros(integer, zeros) { + return integer - (integer % Math.pow(10, zeros)); +} + +function toQuantifier(digits) { + var start = digits[0]; + var stop = digits[1] ? (',' + digits[1]) : ''; + if (!stop && (!start || start === 1)) { + return ''; + } + return '{' + start + stop + '}'; +} + +function toCharacterClass(a, b) { + return '[' + a + ((b - a === 1) ? '' : '-') + b + ']'; +} + +function padding(str) { + return /^-?(0+)\d/.exec(str); +} + +function padZeros(val, tok) { + if (tok.isPadded) { + var diff = Math.abs(tok.maxLen - String(val).length); + switch (diff) { + case 0: + return ''; + case 1: + return '0'; + default: { + return '0{' + diff + '}'; + } + } + } + return val; +} + +/** + * Expose `toRegexRange` + */ + +module.exports = toRegexRange; + + +/***/ }), + +/***/ 51279: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var safe = __webpack_require__(71217); +var define = __webpack_require__(74998); +var extend = __webpack_require__(99793); +var not = __webpack_require__(30931); +var MAX_LENGTH = 1024 * 64; + +/** + * Session cache + */ + +var cache = {}; + +/** + * Create a regular expression from the given `pattern` string. + * + * @param {String|RegExp} `pattern` Pattern can be a string or regular expression. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +module.exports = function(patterns, options) { + if (!Array.isArray(patterns)) { + return makeRe(patterns, options); + } + return makeRe(patterns.join('|'), options); +}; + +/** + * Create a regular expression from the given `pattern` string. + * + * @param {String|RegExp} `pattern` Pattern can be a string or regular expression. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +function makeRe(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + var key = pattern; + // do this before shallow cloning options, it's a lot faster + if (!options || (options && options.cache !== false)) { + key = createKey(pattern, options); + + if (cache.hasOwnProperty(key)) { + return cache[key]; + } + } + + var opts = extend({}, options); + if (opts.contains === true) { + if (opts.negate === true) { + opts.strictNegate = false; + } else { + opts.strict = false; + } + } + + if (opts.strict === false) { + opts.strictOpen = false; + opts.strictClose = false; + } + + var open = opts.strictOpen !== false ? '^' : ''; + var close = opts.strictClose !== false ? '$' : ''; + var flags = opts.flags || ''; + var regex; + + if (opts.nocase === true && !/i/.test(flags)) { + flags += 'i'; + } + + try { + if (opts.negate || typeof opts.strictNegate === 'boolean') { + pattern = not.create(pattern, opts); + } + + var str = open + '(?:' + pattern + ')' + close; + regex = new RegExp(str, flags); + + if (opts.safe === true && safe(regex) === false) { + throw new Error('potentially unsafe regular expression: ' + regex.source); + } + + } catch (err) { + if (opts.strictErrors === true || opts.safe === true) { + err.key = key; + err.pattern = pattern; + err.originalOptions = options; + err.createdOptions = opts; + throw err; + } + + try { + regex = new RegExp('^' + pattern.replace(/(\W)/g, '\\$1') + '$'); + } catch (err) { + regex = /.^/; //<= match nothing + } + } + + if (opts.cache !== false) { + memoize(regex, key, pattern, opts); + } + return regex; +} + +/** + * Memoize generated regex. This can result in dramatic speed improvements + * and simplify debugging by adding options and pattern to the regex. It can be + * disabled by passing setting `options.cache` to false. + */ + +function memoize(regex, key, pattern, options) { + define(regex, 'cached', true); + define(regex, 'pattern', pattern); + define(regex, 'options', options); + define(regex, 'key', key); + cache[key] = regex; +} + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +function createKey(pattern, options) { + if (!options) return pattern; + var key = pattern; + for (var prop in options) { + if (options.hasOwnProperty(prop)) { + key += ';' + prop + '=' + String(options[prop]); + } + } + return key; +} + +/** + * Expose `makeRe` + */ + +module.exports.makeRe = makeRe; + + +/***/ }), + +/***/ 74998: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * define-property + * + * Copyright (c) 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isobject = __webpack_require__(96667); +var isDescriptor = __webpack_require__(44133); +var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) + ? Reflect.defineProperty + : Object.defineProperty; + +module.exports = function defineProperty(obj, key, val) { + if (!isobject(obj) && typeof obj !== 'function' && !Array.isArray(obj)) { + throw new TypeError('expected an object, function, or array'); + } + + if (typeof key !== 'string') { + throw new TypeError('expected "key" to be a string'); + } + + if (isDescriptor(val)) { + define(obj, key, val); + return obj; + } + + define(obj, key, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); + + return obj; +}; + + +/***/ }), + +/***/ 99793: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isExtendable = __webpack_require__(78947); +var assignSymbols = __webpack_require__(64353); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} + + +/***/ }), + +/***/ 78947: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isPlainObject = __webpack_require__(81064); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; + + +/***/ }), + +/***/ 29859: +/***/ (function(module) { + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +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 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function (m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + } + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); + + +/***/ }), + +/***/ 7716: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isObject = __webpack_require__(18493); +var union = __webpack_require__(69123); +var get = __webpack_require__(89304); +var set = __webpack_require__(34857); + +module.exports = function unionValue(obj, prop, value) { + if (!isObject(obj)) { + throw new TypeError('union-value expects the first argument to be an object.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('union-value expects `prop` to be a string.'); + } + + var arr = arrayify(get(obj, prop)); + set(obj, prop, union(arr, arrayify(value))); + return obj; +}; + +function arrayify(val) { + if (val === null || typeof val === 'undefined') { + return []; + } + if (Array.isArray(val)) { + return val; + } + return [val]; +} + + +/***/ }), + +/***/ 5834: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * unset-value + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isObject = __webpack_require__(96667); +var has = __webpack_require__(77735); + +module.exports = function unset(obj, prop) { + if (!isObject(obj)) { + throw new TypeError('expected an object.'); + } + if (obj.hasOwnProperty(prop)) { + delete obj[prop]; + return true; + } + + if (has(obj, prop)) { + var segs = prop.split('.'); + var last = segs.pop(); + while (segs.length && segs[segs.length - 1].slice(-1) === '\\') { + last = segs.pop().slice(0, -1) + '.' + last; + } + while (segs.length) obj = obj[prop = segs.shift()]; + return (delete obj[last]); + } + return true; +}; + + +/***/ }), + +/***/ 77735: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * has-value + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var isObject = __webpack_require__(78037); +var hasValues = __webpack_require__(38719); +var get = __webpack_require__(89304); + +module.exports = function(obj, prop, noZero) { + if (isObject(obj)) { + return hasValues(get(obj, prop), noZero); + } + return hasValues(obj, prop); +}; + + +/***/ }), + +/***/ 78037: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * isobject + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var isArray = __webpack_require__(21352); + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && isArray(val) === false; +}; + + +/***/ }), + +/***/ 38719: +/***/ (function(module) { + +"use strict"; +/*! + * has-values + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +module.exports = function hasValue(o, noZero) { + if (o === null || o === undefined) { + return false; + } + + if (typeof o === 'boolean') { + return true; + } + + if (typeof o === 'number') { + if (o === 0 && noZero === true) { + return false; + } + return true; + } + + if (o.length !== undefined) { + return o.length !== 0; + } + + for (var key in o) { + if (o.hasOwnProperty(key)) { + return true; + } + } + return false; +}; + + +/***/ }), + +/***/ 94007: +/***/ (function(__unused_webpack_module, exports) { + +/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ +(function (global, factory) { + true ? factory(exports) : + 0; +}(this, (function (exports) { 'use strict'; + +function merge() { + for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { + sets[_key] = arguments[_key]; + } + + if (sets.length > 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); + } else { + return sets[0]; + } +} +function subexp(str) { + return "(?:" + str + ")"; +} +function typeOf(o) { + return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); +} +function toUpperCase(str) { + return str.toUpperCase(); +} +function toArray(obj) { + return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; +} +function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; +} + +function buildExps(isIRI) { + var ALPHA$$ = "[A-Za-z]", + CR$ = "[\\x0D]", + DIGIT$$ = "[0-9]", + DQUOTE$$ = "[\\x22]", + HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), + //case-insensitive + LF$$ = "[\\x0A]", + SP$$ = "[\\x20]", + PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), + //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", + SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", + RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), + UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", + //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", + //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), + SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), + USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), + DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), + DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), + //relaxed parsing rules + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), + H16$ = subexp(HEXDIG$$ + "{1,4}"), + LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), + IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), + // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), + // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), + //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), + //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), + //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), + //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), + //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), + //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), + //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), + ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), + //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), + //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), + //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), + IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), + //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), + HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), + PORT$ = subexp(DIGIT$$ + "*"), + AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), + PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), + SEGMENT$ = subexp(PCHAR$ + "*"), + SEGMENT_NZ$ = subexp(PCHAR$ + "+"), + SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), + PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), + PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), + //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), + //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), + //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", + PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), + FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), + HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), + RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), + ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), + GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", + SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} +var URI_PROTOCOL = buildExps(false); + +var IRI_PROTOCOL = buildExps(true); + +var slicedToArray = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + + + + + + + + + + + + + +var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } +}; + +/** Highest positive signed 32-bit float value */ + +var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +var base = 36; +var tMin = 1; +var tMax = 26; +var skew = 38; +var damp = 700; +var initialBias = 72; +var initialN = 128; // 0x80 +var delimiter = '-'; // '\x2D' + +/** Regular expressions */ +var regexPunycode = /^xn--/; +var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars +var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +var errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +var baseMinusTMin = base - tMin; +var floor = Math.floor; +var stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error$1(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +var ucs2encode = function ucs2encode(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); +}; + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +var basicToDigit = function basicToDigit(codePoint) { + if (codePoint - 0x30 < 0x0A) { + return codePoint - 0x16; + } + if (codePoint - 0x41 < 0x1A) { + return codePoint - 0x41; + } + if (codePoint - 0x61 < 0x1A) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +var digitToBasic = function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +var adapt = function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +var decode = function decode(input) { + // Don't use UCS-2. + var output = []; + var inputLength = input.length; + var i = 0; + var n = initialN; + var bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (var j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error$1('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + var oldi = i; + for (var w = 1, k = base;; /* no condition */k += base) { + + if (index >= inputLength) { + error$1('invalid-input'); + } + + var digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error$1('overflow'); + } + + i += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + + if (digit < t) { + break; + } + + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1('overflow'); + } + + w *= baseMinusT; + } + + var out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error$1('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + } + + return String.fromCodePoint.apply(String, output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +var encode = function encode(input) { + var output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + var inputLength = input.length; + + // Initialize the state. + var n = initialN; + var delta = 0; + var bias = initialBias; + + // Handle the basic code points. + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; + + if (_currentValue2 < 0x80) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var basicLength = output.length; + var handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; + + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + + if (_currentValue < n && ++delta > maxInt) { + error$1('overflow'); + } + if (_currentValue == n) { + // Represent delta as a generalized variable-length integer. + var q = delta; + for (var k = base;; /* no condition */k += base) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + var qMinusT = q - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + ++delta; + ++n; + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +var toUnicode = function toUnicode(input) { + return mapDomain(input, function (string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +var toASCII = function toASCII(input) { + return mapDomain(input, function (string) { + return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.1.0', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +/** + * URI.js + * + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js + */ +/** + * Copyright 2011 Gary Court. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. 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 GARY COURT ``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 GARY COURT 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. + */ +var SCHEMES = {}; +function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; +} +function pctDecChars(str) { + var newStr = ""; + var i = 0; + var il = str.length; + while (i < il) { + var c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } else if (c >= 194 && c < 224) { + if (il - i >= 6) { + var c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } else if (c >= 224) { + if (il - i >= 9) { + var _c = parseInt(str.substr(i + 4, 2), 16); + var c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; +} +function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; +} + +function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; +} +function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; + + var _matches = slicedToArray(matches, 2), + address = _matches[1]; + + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } +} +function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; + + var _matches2 = slicedToArray(matches, 3), + address = _matches2[1], + zone = _matches2[2]; + + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), + _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), + last = _address$toLowerCase$2[0], + first = _address$toLowerCase$2[1]; + + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function (acc, field, index) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index: index, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function (a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } +} +var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; +function parse(uriString) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; + //fix port number + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; + } + } + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } else if (components.scheme === undefined) { + components.reference = "relative"; + } else if (components.fragment === undefined) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; +} + +function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number") { + uriTokens.push(":"); + uriTokens.push(components.port.toString(10)); + } + return uriTokens.length ? uriTokens.join("") : undefined; +} + +var RDS1 = /^\.\.?\//; +var RDS2 = /^\/\.(\/|$)/; +var RDS3 = /^\/\.\.(\/|$)/; +var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; +function removeDotSegments(input) { + var output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); +} + +function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) {} + //TODO: normalize IPv6 address as per RFC 5952 + + //if host component is a domain name + else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + //convert IDN via punycode + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + //normalize encoding + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== undefined) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + uriTokens.push(s); + } + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); //merge tokens into a string +} + +function resolveComponents(base, relative) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var skipNormalization = arguments[3]; + + var target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; +} + +function resolve(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); +} + +function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; +} + +function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; +} + +function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); +} + +function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); +} + +var handler = { + scheme: "http", + domainHost: true, + parse: function parse(components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize(components, options) { + //normalize the default port + if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; + } +}; + +var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize +}; + +var O = {}; +var isIRI = true; +//RFC 3986 +var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +var UNRESERVED = new RegExp(UNRESERVED$$, "g"); +var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +var NOT_HFVALUE = NOT_HFNAME; +function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; +} +var handler$2 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = undefined; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = undefined; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + //convert IDN via punycode + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } +}; + +var URN_PARSE = /^([^\:]+)\:(.*)/; +//RFC 2141 +var handler$3 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } +}; + +var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +//RFC 4122 +var handler$4 = { + scheme: "urn:uuid", + parse: function parse(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize(uuidComponents, options) { + var urnComponents = uuidComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } +}; + +SCHEMES[handler.scheme] = handler; +SCHEMES[handler$1.scheme] = handler$1; +SCHEMES[handler$2.scheme] = handler$2; +SCHEMES[handler$3.scheme] = handler$3; +SCHEMES[handler$4.scheme] = handler$4; + +exports.SCHEMES = SCHEMES; +exports.pctEncChar = pctEncChar; +exports.pctDecChars = pctDecChars; +exports.parse = parse; +exports.removeDotSegments = removeDotSegments; +exports.serialize = serialize; +exports.resolveComponents = resolveComponents; +exports.resolve = resolve; +exports.normalize = normalize; +exports.equal = equal; +exports.escapeComponent = escapeComponent; +exports.unescapeComponent = unescapeComponent; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=uri.all.js.map + + +/***/ }), + +/***/ 67806: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var path = __webpack_require__(85622) + +"use strict" + +function urix(aPath) { + if (path.sep === "\\") { + return aPath + .replace(/\\/g, "/") + .replace(/^[a-z]:\/?/i, "/") + } + return aPath +} + +module.exports = urix + + +/***/ }), + +/***/ 77709: +/***/ (function(module) { + +"use strict"; +/*! + * use + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +module.exports = function base(app, options) { + if (!isObject(app) && typeof app !== 'function') { + throw new TypeError('expected an object or function'); + } + + var opts = isObject(options) ? options : {}; + var prop = typeof opts.prop === 'string' ? opts.prop : 'fns'; + if (!Array.isArray(app[prop])) { + define(app, prop, []); + } + + /** + * Define a plugin function to be passed to use. The only + * parameter exposed to the plugin is `app`, the object or function. + * passed to `use(app)`. `app` is also exposed as `this` in plugins. + * + * Additionally, **if a plugin returns a function, the function will + * be pushed onto the `fns` array**, allowing the plugin to be + * called at a later point by the `run` method. + * + * ```js + * var use = require('use'); + * + * // define a plugin + * function foo(app) { + * // do stuff + * } + * + * var app = function(){}; + * use(app); + * + * // register plugins + * app.use(foo); + * app.use(bar); + * app.use(baz); + * ``` + * @name .use + * @param {Function} `fn` plugin function to call + * @api public + */ + + define(app, 'use', use); + + /** + * Run all plugins on `fns`. Any plugin that returns a function + * when called by `use` is pushed onto the `fns` array. + * + * ```js + * var config = {}; + * app.run(config); + * ``` + * @name .run + * @param {Object} `value` Object to be modified by plugins. + * @return {Object} Returns the object passed to `run` + * @api public + */ + + define(app, 'run', function(val) { + if (!isObject(val)) return; + + if (!val.use || !val.run) { + define(val, prop, val[prop] || []); + define(val, 'use', use); + } + + if (!val[prop] || val[prop].indexOf(base) === -1) { + val.use(base); + } + + var self = this || app; + var fns = self[prop]; + var len = fns.length; + var idx = -1; + + while (++idx < len) { + val.use(fns[idx]); + } + return val; + }); + + /** + * Call plugin `fn`. If a function is returned push it into the + * `fns` array to be called by the `run` method. + */ + + function use(type, fn, options) { + var offset = 1; + + if (typeof type === 'string' || Array.isArray(type)) { + fn = wrap(type, fn); + offset++; + } else { + options = fn; + fn = type; + } + + if (typeof fn !== 'function') { + throw new TypeError('expected a function'); + } + + var self = this || app; + var fns = self[prop]; + + var args = [].slice.call(arguments, offset); + args.unshift(self); + + if (typeof opts.hook === 'function') { + opts.hook.apply(self, args); + } + + var val = fn.apply(self, args); + if (typeof val === 'function' && fns.indexOf(val) === -1) { + fns.push(val); + } + return self; + } + + /** + * Wrap a named plugin function so that it's only called on objects of the + * given `type` + * + * @param {String} `type` + * @param {Function} `fn` Plugin function + * @return {Function} + */ + + function wrap(type, fn) { + return function plugin() { + return this.type === type ? fn.apply(this, arguments) : plugin; + }; + } + + return app; +}; + +function isObject(val) { + return val && typeof val === 'object' && !Array.isArray(val); +} + +function define(obj, key, val) { + Object.defineProperty(obj, key, { + configurable: true, + writable: true, + value: val + }); +} + + +/***/ }), + +/***/ 92262: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = __webpack_require__(31669).deprecate; + + +/***/ }), + +/***/ 24059: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +module.exports = __webpack_require__(47257); + + +/***/ }), + +/***/ 71118: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ConstDependency = __webpack_require__(71101); +const ParserHelpers = __webpack_require__(23999); + +const NullFactory = __webpack_require__(40438); + +/* eslint-disable camelcase */ +const REPLACEMENTS = { + __webpack_require__: "__webpack_require__", + __webpack_public_path__: "__webpack_require__.p", + __webpack_modules__: "__webpack_require__.m", + __webpack_chunk_load__: "__webpack_require__.e", + __non_webpack_require__: "require", + __webpack_nonce__: "__webpack_require__.nc", + "require.onError": "__webpack_require__.oe" +}; +const NO_WEBPACK_REQUIRE = { + __non_webpack_require__: true +}; +const REPLACEMENT_TYPES = { + __webpack_public_path__: "string", + __webpack_require__: "function", + __webpack_modules__: "object", + __webpack_chunk_load__: "function", + __webpack_nonce__: "string" +}; +/* eslint-enable camelcase */ + +class APIPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "APIPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set(ConstDependency, new NullFactory()); + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + const handler = parser => { + Object.keys(REPLACEMENTS).forEach(key => { + parser.hooks.expression + .for(key) + .tap( + "APIPlugin", + NO_WEBPACK_REQUIRE[key] + ? ParserHelpers.toConstantDependency( + parser, + REPLACEMENTS[key] + ) + : ParserHelpers.toConstantDependencyWithWebpackRequire( + parser, + REPLACEMENTS[key] + ) + ); + const type = REPLACEMENT_TYPES[key]; + if (type) { + parser.hooks.evaluateTypeof + .for(key) + .tap("APIPlugin", ParserHelpers.evaluateToString(type)); + } + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("APIPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("APIPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("APIPlugin", handler); + } + ); + } +} + +module.exports = APIPlugin; + + +/***/ }), + +/***/ 36104: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +const WebpackError = __webpack_require__(97391); +const CURRENT_METHOD_REGEXP = /at ([a-zA-Z0-9_.]*)/; + +/** + * @param {string=} method method name + * @returns {string} message + */ +function createMessage(method) { + return `Abstract method${method ? " " + method : ""}. Must be overridden.`; +} + +/** + * @constructor + */ +function Message() { + this.stack = undefined; + Error.captureStackTrace(this); + /** @type {RegExpMatchArray} */ + const match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP); + + this.message = match && match[1] ? createMessage(match[1]) : createMessage(); +} + +/** + * Error for abstract method + * @example + * class FooClass { + * abstractMethod() { + * throw new AbstractMethodError(); // error message: Abstract method FooClass.abstractMethod. Must be overriden. + * } + * } + * + */ +class AbstractMethodError extends WebpackError { + constructor() { + super(new Message().message); + this.name = "AbstractMethodError"; + } +} + +module.exports = AbstractMethodError; + + +/***/ }), + +/***/ 9701: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + + +const { ConcatSource } = __webpack_require__(53665); +const Template = __webpack_require__(96066); + +/** @typedef {import("./Compilation")} Compilation */ + +/** + * @typedef {Object} AmdMainTemplatePluginOptions + * @param {string=} name the library name + * @property {boolean=} requireAsWrapper + */ + +class AmdMainTemplatePlugin { + /** + * @param {AmdMainTemplatePluginOptions} options the plugin options + */ + constructor(options) { + if (!options || typeof options === "string") { + this.name = options; + this.requireAsWrapper = false; + } else { + this.name = options.name; + this.requireAsWrapper = options.requireAsWrapper; + } + } + + /** + * @param {Compilation} compilation the compilation instance + * @returns {void} + */ + apply(compilation) { + const { mainTemplate, chunkTemplate } = compilation; + + const onRenderWithEntry = (source, chunk, hash) => { + const externals = chunk.getModules().filter(m => m.external); + const externalsDepsArray = JSON.stringify( + externals.map(m => + typeof m.request === "object" ? m.request.amd : m.request + ) + ); + const externalsArguments = externals + .map( + m => `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier(`${m.id}`)}__` + ) + .join(", "); + + if (this.requireAsWrapper) { + return new ConcatSource( + `require(${externalsDepsArray}, function(${externalsArguments}) { return `, + source, + "});" + ); + } else if (this.name) { + const name = mainTemplate.getAssetPath(this.name, { + hash, + chunk + }); + + return new ConcatSource( + `define(${JSON.stringify( + name + )}, ${externalsDepsArray}, function(${externalsArguments}) { return `, + source, + "});" + ); + } else if (externalsArguments) { + return new ConcatSource( + `define(${externalsDepsArray}, function(${externalsArguments}) { return `, + source, + "});" + ); + } else { + return new ConcatSource("define(function() { return ", source, "});"); + } + }; + + for (const template of [mainTemplate, chunkTemplate]) { + template.hooks.renderWithEntry.tap( + "AmdMainTemplatePlugin", + onRenderWithEntry + ); + } + + mainTemplate.hooks.globalHashPaths.tap("AmdMainTemplatePlugin", paths => { + if (this.name) { + paths.push(this.name); + } + return paths; + }); + + mainTemplate.hooks.hash.tap("AmdMainTemplatePlugin", hash => { + hash.update("exports amd"); + if (this.name) { + hash.update(this.name); + } + }); + } +} + +module.exports = AmdMainTemplatePlugin; + + +/***/ }), + +/***/ 22814: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DependenciesBlock = __webpack_require__(16071); + +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./util/createHash").Hash} Hash */ +/** @typedef {TODO} GroupOptions */ + +module.exports = class AsyncDependenciesBlock extends DependenciesBlock { + /** + * @param {GroupOptions} groupOptions options for the group + * @param {Module} module the Module object + * @param {DependencyLocation=} loc the line of code + * @param {TODO=} request the request + */ + constructor(groupOptions, module, loc, request) { + super(); + if (typeof groupOptions === "string") { + groupOptions = { name: groupOptions }; + } else if (!groupOptions) { + groupOptions = { name: undefined }; + } + this.groupOptions = groupOptions; + /** @type {ChunkGroup=} */ + this.chunkGroup = undefined; + this.module = module; + this.loc = loc; + this.request = request; + /** @type {DependenciesBlock} */ + this.parent = undefined; + } + + /** + * @returns {string} The name of the chunk + */ + get chunkName() { + return this.groupOptions.name; + } + + /** + * @param {string} value The new chunk name + * @returns {void} + */ + set chunkName(value) { + this.groupOptions.name = value; + } + + /** + * @returns {never} this throws and should never be called + */ + get chunks() { + throw new Error("Moved to AsyncDependenciesBlock.chunkGroup"); + } + + /** + * @param {never} value setter value + * @returns {never} this is going to throw therefore we should throw type + * assertions by returning never + */ + set chunks(value) { + throw new Error("Moved to AsyncDependenciesBlock.chunkGroup"); + } + + /** + * @param {Hash} hash the hash used to track block changes, from "crypto" module + * @returns {void} + */ + updateHash(hash) { + hash.update(JSON.stringify(this.groupOptions)); + hash.update( + (this.chunkGroup && + this.chunkGroup.chunks + .map(chunk => { + return chunk.id !== null ? chunk.id : ""; + }) + .join(",")) || + "" + ); + super.updateHash(hash); + } + + /** + * @returns {void} + */ + disconnect() { + this.chunkGroup = undefined; + super.disconnect(); + } + + /** + * @returns {void} + */ + unseal() { + this.chunkGroup = undefined; + super.unseal(); + } + + /** + * @returns {void} + */ + sortItems() { + super.sortItems(); + } +}; + + +/***/ }), + +/***/ 67089: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + +const WebpackError = __webpack_require__(97391); + +/** @typedef {import("./Module")} Module */ + +class AsyncDependencyToInitialChunkError extends WebpackError { + /** + * Creates an instance of AsyncDependencyToInitialChunkError. + * @param {string} chunkName Name of Chunk + * @param {Module} module module tied to dependency + * @param {TODO} loc location of dependency + */ + constructor(chunkName, module, loc) { + super( + `It's not allowed to load an initial chunk on demand. The chunk name "${chunkName}" is already used by an entrypoint.` + ); + + this.name = "AsyncDependencyToInitialChunkError"; + this.module = module; + this.loc = loc; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = AsyncDependencyToInitialChunkError; + + +/***/ }), + +/***/ 51596: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const asyncLib = __webpack_require__(36386); +const PrefetchDependency = __webpack_require__(14237); +const NormalModule = __webpack_require__(25963); + +/** @typedef {import("./Compiler")} Compiler */ + +class AutomaticPrefetchPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler Webpack Compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "AutomaticPrefetchPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + PrefetchDependency, + normalModuleFactory + ); + } + ); + let lastModules = null; + compiler.hooks.afterCompile.tap("AutomaticPrefetchPlugin", compilation => { + lastModules = compilation.modules + .filter(m => m instanceof NormalModule) + .map((/** @type {NormalModule} */ m) => ({ + context: m.context, + request: m.request + })); + }); + compiler.hooks.make.tapAsync( + "AutomaticPrefetchPlugin", + (compilation, callback) => { + if (!lastModules) return callback(); + asyncLib.forEach( + lastModules, + (m, callback) => { + compilation.prefetch( + m.context || compiler.context, + new PrefetchDependency(m.request), + callback + ); + }, + callback + ); + } + ); + } +} +module.exports = AutomaticPrefetchPlugin; + + +/***/ }), + +/***/ 4009: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + + +const { ConcatSource } = __webpack_require__(53665); +const ModuleFilenameHelpers = __webpack_require__(71474); +const Template = __webpack_require__(96066); + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(10171); + +/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginArgument} BannerPluginArgument */ +/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginOptions} BannerPluginOptions */ + +const wrapComment = str => { + if (!str.includes("\n")) { + return Template.toComment(str); + } + return `/*!\n * ${str + .replace(/\*\//g, "* /") + .split("\n") + .join("\n * ")}\n */`; +}; + +class BannerPlugin { + /** + * @param {BannerPluginArgument} options options object + */ + constructor(options) { + if (arguments.length > 1) { + throw new Error( + "BannerPlugin only takes one argument (pass an options object)" + ); + } + + validateOptions(schema, options, "Banner Plugin"); + + if (typeof options === "string" || typeof options === "function") { + options = { + banner: options + }; + } + + /** @type {BannerPluginOptions} */ + this.options = options; + + const bannerOption = options.banner; + if (typeof bannerOption === "function") { + const getBanner = bannerOption; + this.banner = this.options.raw + ? getBanner + : data => wrapComment(getBanner(data)); + } else { + const banner = this.options.raw + ? bannerOption + : wrapComment(bannerOption); + this.banner = () => banner; + } + } + + apply(compiler) { + const options = this.options; + const banner = this.banner; + const matchObject = ModuleFilenameHelpers.matchObject.bind( + undefined, + options + ); + + compiler.hooks.compilation.tap("BannerPlugin", compilation => { + compilation.hooks.optimizeChunkAssets.tap("BannerPlugin", chunks => { + for (const chunk of chunks) { + if (options.entryOnly && !chunk.canBeInitial()) { + continue; + } + + for (const file of chunk.files) { + if (!matchObject(file)) { + continue; + } + + let query = ""; + let filename = file; + const hash = compilation.hash; + const querySplit = filename.indexOf("?"); + + if (querySplit >= 0) { + query = filename.substr(querySplit); + filename = filename.substr(0, querySplit); + } + + const lastSlashIndex = filename.lastIndexOf("/"); + + const basename = + lastSlashIndex === -1 + ? filename + : filename.substr(lastSlashIndex + 1); + + const data = { + hash, + chunk, + filename, + basename, + query + }; + + const comment = compilation.getPath(banner(data), data); + + compilation.updateAsset( + file, + old => new ConcatSource(comment, "\n", old) + ); + } + } + }); + }); + } +} + +module.exports = BannerPlugin; + + +/***/ }), + +/***/ 96770: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const TypeUnknown = 0; +const TypeNull = 1; +const TypeString = 2; +const TypeNumber = 3; +const TypeBoolean = 4; +const TypeRegExp = 5; +const TypeConditional = 6; +const TypeArray = 7; +const TypeConstArray = 8; +const TypeIdentifier = 9; +const TypeWrapped = 10; +const TypeTemplateString = 11; + +class BasicEvaluatedExpression { + constructor() { + this.type = TypeUnknown; + this.range = null; + this.falsy = false; + this.truthy = false; + this.bool = null; + this.number = null; + this.regExp = null; + this.string = null; + this.quasis = null; + this.parts = null; + this.array = null; + this.items = null; + this.options = null; + this.prefix = null; + this.postfix = null; + this.wrappedInnerExpressions = null; + this.expression = null; + } + + isNull() { + return this.type === TypeNull; + } + + isString() { + return this.type === TypeString; + } + + isNumber() { + return this.type === TypeNumber; + } + + isBoolean() { + return this.type === TypeBoolean; + } + + isRegExp() { + return this.type === TypeRegExp; + } + + isConditional() { + return this.type === TypeConditional; + } + + isArray() { + return this.type === TypeArray; + } + + isConstArray() { + return this.type === TypeConstArray; + } + + isIdentifier() { + return this.type === TypeIdentifier; + } + + isWrapped() { + return this.type === TypeWrapped; + } + + isTemplateString() { + return this.type === TypeTemplateString; + } + + isTruthy() { + return this.truthy; + } + + isFalsy() { + return this.falsy; + } + + asBool() { + if (this.truthy) return true; + if (this.falsy) return false; + if (this.isBoolean()) return this.bool; + if (this.isNull()) return false; + if (this.isString()) return this.string !== ""; + if (this.isNumber()) return this.number !== 0; + if (this.isRegExp()) return true; + if (this.isArray()) return true; + if (this.isConstArray()) return true; + if (this.isWrapped()) { + return (this.prefix && this.prefix.asBool()) || + (this.postfix && this.postfix.asBool()) + ? true + : undefined; + } + if (this.isTemplateString()) { + const str = this.asString(); + if (typeof str === "string") return str !== ""; + } + return undefined; + } + + asString() { + if (this.isBoolean()) return `${this.bool}`; + if (this.isNull()) return "null"; + if (this.isString()) return this.string; + if (this.isNumber()) return `${this.number}`; + if (this.isRegExp()) return `${this.regExp}`; + if (this.isArray()) { + let array = []; + for (const item of this.items) { + const itemStr = item.asString(); + if (itemStr === undefined) return undefined; + array.push(itemStr); + } + return `${array}`; + } + if (this.isConstArray()) return `${this.array}`; + if (this.isTemplateString()) { + let str = ""; + for (const part of this.parts) { + const partStr = part.asString(); + if (partStr === undefined) return undefined; + str += partStr; + } + return str; + } + return undefined; + } + + setString(string) { + this.type = TypeString; + this.string = string; + return this; + } + + setNull() { + this.type = TypeNull; + return this; + } + + setNumber(number) { + this.type = TypeNumber; + this.number = number; + return this; + } + + setBoolean(bool) { + this.type = TypeBoolean; + this.bool = bool; + return this; + } + + setRegExp(regExp) { + this.type = TypeRegExp; + this.regExp = regExp; + return this; + } + + setIdentifier(identifier) { + this.type = TypeIdentifier; + this.identifier = identifier; + return this; + } + + setWrapped(prefix, postfix, innerExpressions) { + this.type = TypeWrapped; + this.prefix = prefix; + this.postfix = postfix; + this.wrappedInnerExpressions = innerExpressions; + return this; + } + + setOptions(options) { + this.type = TypeConditional; + this.options = options; + return this; + } + + addOptions(options) { + if (!this.options) { + this.type = TypeConditional; + this.options = []; + } + for (const item of options) { + this.options.push(item); + } + return this; + } + + setItems(items) { + this.type = TypeArray; + this.items = items; + return this; + } + + setArray(array) { + this.type = TypeConstArray; + this.array = array; + return this; + } + + setTemplateString(quasis, parts, kind) { + this.type = TypeTemplateString; + this.quasis = quasis; + this.parts = parts; + this.templateStringKind = kind; + return this; + } + + setTruthy() { + this.falsy = false; + this.truthy = true; + return this; + } + + setFalsy() { + this.falsy = true; + this.truthy = false; + return this; + } + + setRange(range) { + this.range = range; + return this; + } + + setExpression(expression) { + this.expression = expression; + return this; + } +} + +module.exports = BasicEvaluatedExpression; + + +/***/ }), + +/***/ 6465: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const asyncLib = __webpack_require__(36386); + +class CachePlugin { + constructor(cache) { + this.cache = cache || {}; + this.FS_ACCURACY = 2000; + } + + apply(compiler) { + if (Array.isArray(compiler.compilers)) { + compiler.compilers.forEach((c, idx) => { + new CachePlugin((this.cache[idx] = this.cache[idx] || {})).apply(c); + }); + } else { + const registerCacheToCompiler = (compiler, cache) => { + compiler.hooks.thisCompilation.tap("CachePlugin", compilation => { + compilation.cache = cache; + compilation.hooks.childCompiler.tap( + "CachePlugin", + (childCompiler, compilerName, compilerIndex) => { + let childCache; + if (!cache.children) { + cache.children = {}; + } + if (!cache.children[compilerName]) { + cache.children[compilerName] = []; + } + if (cache.children[compilerName][compilerIndex]) { + childCache = cache.children[compilerName][compilerIndex]; + } else { + cache.children[compilerName].push((childCache = {})); + } + registerCacheToCompiler(childCompiler, childCache); + } + ); + }); + }; + registerCacheToCompiler(compiler, this.cache); + compiler.hooks.watchRun.tap("CachePlugin", () => { + this.watching = true; + }); + compiler.hooks.run.tapAsync("CachePlugin", (compiler, callback) => { + if (!compiler._lastCompilationFileDependencies) { + return callback(); + } + const fs = compiler.inputFileSystem; + const fileTs = (compiler.fileTimestamps = new Map()); + asyncLib.forEach( + compiler._lastCompilationFileDependencies, + (file, callback) => { + fs.stat(file, (err, stat) => { + if (err) { + if (err.code === "ENOENT") return callback(); + return callback(err); + } + + if (stat.mtime) this.applyMtime(+stat.mtime); + + fileTs.set(file, +stat.mtime || Infinity); + + callback(); + }); + }, + err => { + if (err) return callback(err); + + for (const [file, ts] of fileTs) { + fileTs.set(file, ts + this.FS_ACCURACY); + } + + callback(); + } + ); + }); + compiler.hooks.afterCompile.tap("CachePlugin", compilation => { + compilation.compiler._lastCompilationFileDependencies = + compilation.fileDependencies; + compilation.compiler._lastCompilationContextDependencies = + compilation.contextDependencies; + }); + } + } + + /* istanbul ignore next */ + applyMtime(mtime) { + if (this.FS_ACCURACY > 1 && mtime % 2 !== 0) this.FS_ACCURACY = 1; + else if (this.FS_ACCURACY > 10 && mtime % 20 !== 0) this.FS_ACCURACY = 10; + else if (this.FS_ACCURACY > 100 && mtime % 200 !== 0) + this.FS_ACCURACY = 100; + else if (this.FS_ACCURACY > 1000 && mtime % 2000 !== 0) + this.FS_ACCURACY = 1000; + } +} +module.exports = CachePlugin; + + +/***/ }), + +/***/ 8335: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +/** @typedef {import("./Module")} Module */ + +/** + * @param {Module[]} modules the modules to be sorted + * @returns {Module[]} sorted version of original modules + */ +const sortModules = modules => { + return modules.slice().sort((a, b) => { + const aIdent = a.identifier(); + const bIdent = b.identifier(); + /* istanbul ignore next */ + if (aIdent < bIdent) return -1; + /* istanbul ignore next */ + if (aIdent > bIdent) return 1; + /* istanbul ignore next */ + return 0; + }); +}; + +/** + * @param {Module[]} modules each module from throw + * @returns {string} each message from provided moduels + */ +const createModulesListMessage = modules => { + return modules + .map(m => { + let message = `* ${m.identifier()}`; + const validReasons = m.reasons.filter(reason => reason.module); + + if (validReasons.length > 0) { + message += `\n Used by ${validReasons.length} module(s), i. e.`; + message += `\n ${validReasons[0].module.identifier()}`; + } + return message; + }) + .join("\n"); +}; + +class CaseSensitiveModulesWarning extends WebpackError { + /** + * Creates an instance of CaseSensitiveModulesWarning. + * @param {Module[]} modules modules that were detected + */ + constructor(modules) { + const sortedModules = sortModules(modules); + const modulesList = createModulesListMessage(sortedModules); + super(`There are multiple modules with names that only differ in casing. +This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. +Use equal casing. Compare these module identifiers: +${modulesList}`); + + this.name = "CaseSensitiveModulesWarning"; + this.origin = this.module = sortedModules[0]; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = CaseSensitiveModulesWarning; + + +/***/ }), + +/***/ 2919: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* +MIT License http://www.opensource.org/licenses/mit-license.php +Author Tobias Koppers @sokra +*/ + + +const util = __webpack_require__(31669); +const SortableSet = __webpack_require__(50071); +const intersect = __webpack_require__(54262).intersect; +const GraphHelpers = __webpack_require__(32973); +const Entrypoint = __webpack_require__(71931); +let debugId = 1000; +const ERR_CHUNK_ENTRY = "Chunk.entry was removed. Use hasRuntime()"; +const ERR_CHUNK_INITIAL = + "Chunk.initial was removed. Use canBeInitial/isOnlyInitial()"; + +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./ModuleReason")} ModuleReason */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./util/createHash").Hash} Hash */ + +/** + * @typedef {Object} WithId an object who has an id property * + * @property {string | number} id the id of the object + */ + +/** + * Compare two Modules based on their ids for sorting + * @param {Module} a module + * @param {Module} b module + * @returns {-1|0|1} sort value + */ + +// TODO use @callback +/** @typedef {(a: Module, b: Module) => -1|0|1} ModuleSortPredicate */ +/** @typedef {(m: Module) => boolean} ModuleFilterPredicate */ +/** @typedef {(c: Chunk) => boolean} ChunkFilterPredicate */ + +const sortModuleById = (a, b) => { + if (a.id < b.id) return -1; + if (b.id < a.id) return 1; + return 0; +}; + +/** + * Compare two ChunkGroups based on their ids for sorting + * @param {ChunkGroup} a chunk group + * @param {ChunkGroup} b chunk group + * @returns {-1|0|1} sort value + */ +const sortChunkGroupById = (a, b) => { + if (a.id < b.id) return -1; + if (b.id < a.id) return 1; + return 0; +}; + +/** + * Compare two Identifiables , based on their ids for sorting + * @param {Module} a first object with ident fn + * @param {Module} b second object with ident fn + * @returns {-1|0|1} The order number of the sort + */ +const sortByIdentifier = (a, b) => { + if (a.identifier() > b.identifier()) return 1; + if (a.identifier() < b.identifier()) return -1; + return 0; +}; + +/** + * @returns {string} a concatenation of module identifiers sorted + * @param {SortableSet} set to pull module identifiers from + */ +const getModulesIdent = set => { + set.sort(); + let str = ""; + for (const m of set) { + str += m.identifier() + "#"; + } + return str; +}; + +/** + * @template T + * @param {SortableSet} set the sortable set to convert to array + * @returns {Array} the array returned from Array.from(set) + */ +const getArray = set => Array.from(set); + +/** + * @param {SortableSet} set the sortable Set to get the count/size of + * @returns {number} the size of the modules + */ +const getModulesSize = set => { + let size = 0; + for (const module of set) { + size += module.size(); + } + return size; +}; + +/** + * A Chunk is a unit of encapsulation for Modules. + * Chunks are "rendered" into bundles that get emitted when the build completes. + */ +class Chunk { + /** + * @param {string=} name of chunk being created, is optional (for subclasses) + */ + constructor(name) { + /** @type {number | null} */ + this.id = null; + /** @type {number[] | null} */ + this.ids = null; + /** @type {number} */ + this.debugId = debugId++; + /** @type {string} */ + this.name = name; + /** @type {boolean} */ + this.preventIntegration = false; + /** @type {Module=} */ + this.entryModule = undefined; + /** @private @type {SortableSet} */ + this._modules = new SortableSet(undefined, sortByIdentifier); + /** @type {string?} */ + this.filenameTemplate = undefined; + /** @private @type {SortableSet} */ + this._groups = new SortableSet(undefined, sortChunkGroupById); + /** @type {string[]} */ + this.files = []; + /** @type {boolean} */ + this.rendered = false; + /** @type {string=} */ + this.hash = undefined; + /** @type {Object} */ + this.contentHash = Object.create(null); + /** @type {string=} */ + this.renderedHash = undefined; + /** @type {string=} */ + this.chunkReason = undefined; + /** @type {boolean} */ + this.extraAsync = false; + this.removedModules = undefined; + } + + /** + * @deprecated Chunk.entry has been deprecated. Please use .hasRuntime() instead + * @returns {never} Throws an error trying to access this property + */ + get entry() { + throw new Error(ERR_CHUNK_ENTRY); + } + + /** + * @deprecated .entry has been deprecated. Please use .hasRuntime() instead + * @param {never} data The data that was attempting to be set + * @returns {never} Throws an error trying to access this property + */ + set entry(data) { + throw new Error(ERR_CHUNK_ENTRY); + } + + /** + * @deprecated Chunk.initial was removed. Use canBeInitial/isOnlyInitial() + * @returns {never} Throws an error trying to access this property + */ + get initial() { + throw new Error(ERR_CHUNK_INITIAL); + } + + /** + * @deprecated Chunk.initial was removed. Use canBeInitial/isOnlyInitial() + * @param {never} data The data attempting to be set + * @returns {never} Throws an error trying to access this property + */ + set initial(data) { + throw new Error(ERR_CHUNK_INITIAL); + } + + /** + * @returns {boolean} whether or not the Chunk will have a runtime + */ + hasRuntime() { + for (const chunkGroup of this._groups) { + if ( + chunkGroup.isInitial() && + chunkGroup instanceof Entrypoint && + chunkGroup.getRuntimeChunk() === this + ) { + return true; + } + } + return false; + } + + /** + * @returns {boolean} whether or not this chunk can be an initial chunk + */ + canBeInitial() { + for (const chunkGroup of this._groups) { + if (chunkGroup.isInitial()) return true; + } + return false; + } + + /** + * @returns {boolean} whether this chunk can only be an initial chunk + */ + isOnlyInitial() { + if (this._groups.size <= 0) return false; + for (const chunkGroup of this._groups) { + if (!chunkGroup.isInitial()) return false; + } + return true; + } + + /** + * @returns {boolean} if this chunk contains the entry module + */ + hasEntryModule() { + return !!this.entryModule; + } + + /** + * @param {Module} module the module that will be added to this chunk. + * @returns {boolean} returns true if the chunk doesn't have the module and it was added + */ + addModule(module) { + if (!this._modules.has(module)) { + this._modules.add(module); + return true; + } + return false; + } + + /** + * @param {Module} module the module that will be removed from this chunk + * @returns {boolean} returns true if chunk exists and is successfully deleted + */ + removeModule(module) { + if (this._modules.delete(module)) { + module.removeChunk(this); + return true; + } + return false; + } + + /** + * @param {Module[]} modules the new modules to be set + * @returns {void} set new modules to this chunk and return nothing + */ + setModules(modules) { + this._modules = new SortableSet(modules, sortByIdentifier); + } + + /** + * @returns {number} the amount of modules in chunk + */ + getNumberOfModules() { + return this._modules.size; + } + + /** + * @returns {SortableSet} return the modules SortableSet for this chunk + */ + get modulesIterable() { + return this._modules; + } + + /** + * @param {ChunkGroup} chunkGroup the chunkGroup the chunk is being added + * @returns {boolean} returns true if chunk is not apart of chunkGroup and is added successfully + */ + addGroup(chunkGroup) { + if (this._groups.has(chunkGroup)) return false; + this._groups.add(chunkGroup); + return true; + } + + /** + * @param {ChunkGroup} chunkGroup the chunkGroup the chunk is being removed from + * @returns {boolean} returns true if chunk does exist in chunkGroup and is removed + */ + removeGroup(chunkGroup) { + if (!this._groups.has(chunkGroup)) return false; + this._groups.delete(chunkGroup); + return true; + } + + /** + * @param {ChunkGroup} chunkGroup the chunkGroup to check + * @returns {boolean} returns true if chunk has chunkGroup reference and exists in chunkGroup + */ + isInGroup(chunkGroup) { + return this._groups.has(chunkGroup); + } + + /** + * @returns {number} the amount of groups said chunk is in + */ + getNumberOfGroups() { + return this._groups.size; + } + + /** + * @returns {SortableSet} the chunkGroups that said chunk is referenced in + */ + get groupsIterable() { + return this._groups; + } + + /** + * @param {Chunk} otherChunk the chunk to compare itself with + * @returns {-1|0|1} this is a comparitor function like sort and returns -1, 0, or 1 based on sort order + */ + compareTo(otherChunk) { + if (this.name && !otherChunk.name) return -1; + if (!this.name && otherChunk.name) return 1; + if (this.name < otherChunk.name) return -1; + if (this.name > otherChunk.name) return 1; + if (this._modules.size > otherChunk._modules.size) return -1; + if (this._modules.size < otherChunk._modules.size) return 1; + this._modules.sort(); + otherChunk._modules.sort(); + const a = this._modules[Symbol.iterator](); + const b = otherChunk._modules[Symbol.iterator](); + // eslint-disable-next-line no-constant-condition + while (true) { + const aItem = a.next(); + if (aItem.done) return 0; + const bItem = b.next(); + const aModuleIdentifier = aItem.value.identifier(); + const bModuleIdentifier = bItem.value.identifier(); + if (aModuleIdentifier < bModuleIdentifier) return -1; + if (aModuleIdentifier > bModuleIdentifier) return 1; + } + } + + /** + * @param {Module} module Module to check + * @returns {boolean} returns true if module does exist in this chunk + */ + containsModule(module) { + return this._modules.has(module); + } + + /** + * @returns {Module[]} an array of modules (do not modify) + */ + getModules() { + return this._modules.getFromCache(getArray); + } + + getModulesIdent() { + return this._modules.getFromUnorderedCache(getModulesIdent); + } + + /** + * @param {string=} reason reason why chunk is removed + * @returns {void} + */ + remove(reason) { + // cleanup modules + // Array.from is used here to create a clone, because removeChunk modifies this._modules + for (const module of Array.from(this._modules)) { + module.removeChunk(this); + } + for (const chunkGroup of this._groups) { + chunkGroup.removeChunk(this); + } + } + + /** + * + * @param {Module} module module to move + * @param {Chunk} otherChunk other chunk to move it to + * @returns {void} + */ + moveModule(module, otherChunk) { + GraphHelpers.disconnectChunkAndModule(this, module); + GraphHelpers.connectChunkAndModule(otherChunk, module); + module.rewriteChunkInReasons(this, [otherChunk]); + } + + /** + * + * @param {Chunk} otherChunk the chunk to integrate with + * @param {string} reason reason why the module is being integrated + * @returns {boolean} returns true or false if integration succeeds or fails + */ + integrate(otherChunk, reason) { + if (!this.canBeIntegrated(otherChunk)) { + return false; + } + + // Pick a new name for the integrated chunk + if (this.name && otherChunk.name) { + if (this.hasEntryModule() === otherChunk.hasEntryModule()) { + // When both chunks have entry modules or none have one, use + // shortest name + if (this.name.length !== otherChunk.name.length) { + this.name = + this.name.length < otherChunk.name.length + ? this.name + : otherChunk.name; + } else { + this.name = this.name < otherChunk.name ? this.name : otherChunk.name; + } + } else if (otherChunk.hasEntryModule()) { + // Pick the name of the chunk with the entry module + this.name = otherChunk.name; + } + } else if (otherChunk.name) { + this.name = otherChunk.name; + } + + // Array.from is used here to create a clone, because moveModule modifies otherChunk._modules + for (const module of Array.from(otherChunk._modules)) { + otherChunk.moveModule(module, this); + } + otherChunk._modules.clear(); + + if (otherChunk.entryModule) { + this.entryModule = otherChunk.entryModule; + } + + for (const chunkGroup of otherChunk._groups) { + chunkGroup.replaceChunk(otherChunk, this); + this.addGroup(chunkGroup); + } + otherChunk._groups.clear(); + + return true; + } + + /** + * @param {Chunk} newChunk the new chunk that will be split out of the current chunk + * @returns {void} + */ + split(newChunk) { + for (const chunkGroup of this._groups) { + chunkGroup.insertChunk(newChunk, this); + newChunk.addGroup(chunkGroup); + } + } + + isEmpty() { + return this._modules.size === 0; + } + + updateHash(hash) { + hash.update(`${this.id} `); + hash.update(this.ids ? this.ids.join(",") : ""); + hash.update(`${this.name || ""} `); + for (const m of this._modules) { + hash.update(m.hash); + } + } + + canBeIntegrated(otherChunk) { + if (this.preventIntegration || otherChunk.preventIntegration) { + return false; + } + + /** + * @param {Chunk} a chunk + * @param {Chunk} b chunk + * @returns {boolean} true, if a is always available when b is reached + */ + const isAvailable = (a, b) => { + const queue = new Set(b.groupsIterable); + for (const chunkGroup of queue) { + if (a.isInGroup(chunkGroup)) continue; + if (chunkGroup.isInitial()) return false; + for (const parent of chunkGroup.parentsIterable) { + queue.add(parent); + } + } + return true; + }; + + const selfHasRuntime = this.hasRuntime(); + const otherChunkHasRuntime = otherChunk.hasRuntime(); + + if (selfHasRuntime !== otherChunkHasRuntime) { + if (selfHasRuntime) { + return isAvailable(this, otherChunk); + } else if (otherChunkHasRuntime) { + return isAvailable(otherChunk, this); + } else { + return false; + } + } + + if (this.hasEntryModule() || otherChunk.hasEntryModule()) { + return false; + } + + return true; + } + + /** + * + * @param {number} size the size + * @param {Object} options the options passed in + * @returns {number} the multiplier returned + */ + addMultiplierAndOverhead(size, options) { + const overhead = + typeof options.chunkOverhead === "number" ? options.chunkOverhead : 10000; + const multiplicator = this.canBeInitial() + ? options.entryChunkMultiplicator || 10 + : 1; + + return size * multiplicator + overhead; + } + + /** + * @returns {number} the size of all modules + */ + modulesSize() { + return this._modules.getFromUnorderedCache(getModulesSize); + } + + /** + * @param {Object} options the size display options + * @returns {number} the chunk size + */ + size(options = {}) { + return this.addMultiplierAndOverhead(this.modulesSize(), options); + } + + /** + * @param {Chunk} otherChunk the other chunk + * @param {TODO} options the options for this function + * @returns {number | false} the size, or false if it can't be integrated + */ + integratedSize(otherChunk, options) { + // Chunk if it's possible to integrate this chunk + if (!this.canBeIntegrated(otherChunk)) { + return false; + } + + let integratedModulesSize = this.modulesSize(); + // only count modules that do not exist in this chunk! + for (const otherModule of otherChunk._modules) { + if (!this._modules.has(otherModule)) { + integratedModulesSize += otherModule.size(); + } + } + + return this.addMultiplierAndOverhead(integratedModulesSize, options); + } + + /** + * @param {function(Module, Module): -1|0|1=} sortByFn a predicate function used to sort modules + * @returns {void} + */ + sortModules(sortByFn) { + this._modules.sortWith(sortByFn || sortModuleById); + } + + sortItems() { + this.sortModules(); + } + + /** + * @returns {Set} a set of all the async chunks + */ + getAllAsyncChunks() { + const queue = new Set(); + const chunks = new Set(); + + const initialChunks = intersect( + Array.from(this.groupsIterable, g => new Set(g.chunks)) + ); + + for (const chunkGroup of this.groupsIterable) { + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } + } + + for (const chunkGroup of queue) { + for (const chunk of chunkGroup.chunks) { + if (!initialChunks.has(chunk)) { + chunks.add(chunk); + } + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } + } + + return chunks; + } + + /** + * @typedef {Object} ChunkMaps + * @property {Record} hash + * @property {Record>} contentHash + * @property {Record} name + */ + + /** + * @param {boolean} realHash should the full hash or the rendered hash be used + * @returns {ChunkMaps} the chunk map information + */ + getChunkMaps(realHash) { + /** @type {Record} */ + const chunkHashMap = Object.create(null); + /** @type {Record>} */ + const chunkContentHashMap = Object.create(null); + /** @type {Record} */ + const chunkNameMap = Object.create(null); + + for (const chunk of this.getAllAsyncChunks()) { + chunkHashMap[chunk.id] = realHash ? chunk.hash : chunk.renderedHash; + for (const key of Object.keys(chunk.contentHash)) { + if (!chunkContentHashMap[key]) { + chunkContentHashMap[key] = Object.create(null); + } + chunkContentHashMap[key][chunk.id] = chunk.contentHash[key]; + } + if (chunk.name) { + chunkNameMap[chunk.id] = chunk.name; + } + } + + return { + hash: chunkHashMap, + contentHash: chunkContentHashMap, + name: chunkNameMap + }; + } + + /** + * @returns {Record[]>} a record object of names to lists of child ids(?) + */ + getChildIdsByOrders() { + const lists = new Map(); + for (const group of this.groupsIterable) { + if (group.chunks[group.chunks.length - 1] === this) { + for (const childGroup of group.childrenIterable) { + // TODO webpack 5 remove this check for options + if (typeof childGroup.options === "object") { + for (const key of Object.keys(childGroup.options)) { + if (key.endsWith("Order")) { + const name = key.substr(0, key.length - "Order".length); + let list = lists.get(name); + if (list === undefined) lists.set(name, (list = [])); + list.push({ + order: childGroup.options[key], + group: childGroup + }); + } + } + } + } + } + } + const result = Object.create(null); + for (const [name, list] of lists) { + list.sort((a, b) => { + const cmp = b.order - a.order; + if (cmp !== 0) return cmp; + // TODO webpack 5 remove this check of compareTo + if (a.group.compareTo) { + return a.group.compareTo(b.group); + } + return 0; + }); + result[name] = Array.from( + list.reduce((set, item) => { + for (const chunk of item.group.chunks) { + set.add(chunk.id); + } + return set; + }, new Set()) + ); + } + return result; + } + + getChildIdsByOrdersMap(includeDirectChildren) { + const chunkMaps = Object.create(null); + + const addChildIdsByOrdersToMap = chunk => { + const data = chunk.getChildIdsByOrders(); + for (const key of Object.keys(data)) { + let chunkMap = chunkMaps[key]; + if (chunkMap === undefined) { + chunkMaps[key] = chunkMap = Object.create(null); + } + chunkMap[chunk.id] = data[key]; + } + }; + + if (includeDirectChildren) { + const chunks = new Set(); + for (const chunkGroup of this.groupsIterable) { + for (const chunk of chunkGroup.chunks) { + chunks.add(chunk); + } + } + for (const chunk of chunks) { + addChildIdsByOrdersToMap(chunk); + } + } + + for (const chunk of this.getAllAsyncChunks()) { + addChildIdsByOrdersToMap(chunk); + } + + return chunkMaps; + } + + /** + * @typedef {Object} ChunkModuleMaps + * @property {Record} id + * @property {Record} hash + */ + + /** + * @param {ModuleFilterPredicate} filterFn function used to filter modules + * @returns {ChunkModuleMaps} module map information + */ + getChunkModuleMaps(filterFn) { + /** @type {Record} */ + const chunkModuleIdMap = Object.create(null); + /** @type {Record} */ + const chunkModuleHashMap = Object.create(null); + + for (const chunk of this.getAllAsyncChunks()) { + /** @type {(string|number)[]} */ + let array; + for (const module of chunk.modulesIterable) { + if (filterFn(module)) { + if (array === undefined) { + array = []; + chunkModuleIdMap[chunk.id] = array; + } + array.push(module.id); + chunkModuleHashMap[module.id] = module.renderedHash; + } + } + if (array !== undefined) { + array.sort(); + } + } + + return { + id: chunkModuleIdMap, + hash: chunkModuleHashMap + }; + } + + /** + * + * @param {function(Module): boolean} filterFn predicate function used to filter modules + * @param {function(Chunk): boolean} filterChunkFn predicate function used to filter chunks + * @returns {boolean} return true if module exists in graph + */ + hasModuleInGraph(filterFn, filterChunkFn) { + const queue = new Set(this.groupsIterable); + const chunksProcessed = new Set(); + + for (const chunkGroup of queue) { + for (const chunk of chunkGroup.chunks) { + if (!chunksProcessed.has(chunk)) { + chunksProcessed.add(chunk); + if (!filterChunkFn || filterChunkFn(chunk)) { + for (const module of chunk.modulesIterable) { + if (filterFn(module)) { + return true; + } + } + } + } + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } + } + return false; + } + + toString() { + return `Chunk[${Array.from(this._modules).join()}]`; + } +} + +// TODO remove in webpack 5 +Object.defineProperty(Chunk.prototype, "forEachModule", { + configurable: false, + value: util.deprecate( + /** + * @deprecated + * @this {Chunk} + * @typedef {function(any, any, Set): void} ForEachModuleCallback + * @param {ForEachModuleCallback} fn Callback function + * @returns {void} + */ + function(fn) { + this._modules.forEach(fn); + }, + "Chunk.forEachModule: Use for(const module of chunk.modulesIterable) instead" + ) +}); + +// TODO remove in webpack 5 +Object.defineProperty(Chunk.prototype, "mapModules", { + configurable: false, + value: util.deprecate( + /** + * @deprecated + * @this {Chunk} + * @typedef {function(any, number): any} MapModulesCallback + * @param {MapModulesCallback} fn Callback function + * @returns {TODO[]} result of mapped modules + */ + function(fn) { + return Array.from(this._modules, fn); + }, + "Chunk.mapModules: Use Array.from(chunk.modulesIterable, fn) instead" + ) +}); + +// TODO remove in webpack 5 +Object.defineProperty(Chunk.prototype, "chunks", { + configurable: false, + get() { + throw new Error("Chunk.chunks: Use ChunkGroup.getChildren() instead"); + }, + set() { + throw new Error("Chunk.chunks: Use ChunkGroup.add/removeChild() instead"); + } +}); + +// TODO remove in webpack 5 +Object.defineProperty(Chunk.prototype, "parents", { + configurable: false, + get() { + throw new Error("Chunk.parents: Use ChunkGroup.getParents() instead"); + }, + set() { + throw new Error("Chunk.parents: Use ChunkGroup.add/removeParent() instead"); + } +}); + +// TODO remove in webpack 5 +Object.defineProperty(Chunk.prototype, "blocks", { + configurable: false, + get() { + throw new Error("Chunk.blocks: Use ChunkGroup.getBlocks() instead"); + }, + set() { + throw new Error("Chunk.blocks: Use ChunkGroup.add/removeBlock() instead"); + } +}); + +// TODO remove in webpack 5 +Object.defineProperty(Chunk.prototype, "entrypoints", { + configurable: false, + get() { + throw new Error( + "Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead" + ); + }, + set() { + throw new Error("Chunk.entrypoints: Use Chunks.addGroup instead"); + } +}); + +module.exports = Chunk; + + +/***/ }), + +/***/ 52911: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const SortableSet = __webpack_require__(50071); +const compareLocations = __webpack_require__(22562); + +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleReason")} ModuleReason */ + +/** @typedef {{module: Module, loc: TODO, request: string}} OriginRecord */ +/** @typedef {string|{name: string}} ChunkGroupOptions */ + +let debugId = 5000; + +/** + * @template T + * @param {SortableSet} set set to convert to array. + * @returns {T[]} the array format of existing set + */ +const getArray = set => Array.from(set); + +/** + * A convenience method used to sort chunks based on their id's + * @param {ChunkGroup} a first sorting comparator + * @param {ChunkGroup} b second sorting comparator + * @returns {1|0|-1} a sorting index to determine order + */ +const sortById = (a, b) => { + if (a.id < b.id) return -1; + if (b.id < a.id) return 1; + return 0; +}; + +/** + * @param {OriginRecord} a the first comparator in sort + * @param {OriginRecord} b the second comparator in sort + * @returns {1|-1|0} returns sorting order as index + */ +const sortOrigin = (a, b) => { + const aIdent = a.module ? a.module.identifier() : ""; + const bIdent = b.module ? b.module.identifier() : ""; + if (aIdent < bIdent) return -1; + if (aIdent > bIdent) return 1; + return compareLocations(a.loc, b.loc); +}; + +class ChunkGroup { + /** + * Creates an instance of ChunkGroup. + * @param {ChunkGroupOptions=} options chunk group options passed to chunkGroup + */ + constructor(options) { + if (typeof options === "string") { + options = { name: options }; + } else if (!options) { + options = { name: undefined }; + } + /** @type {number} */ + this.groupDebugId = debugId++; + this.options = options; + /** @type {SortableSet} */ + this._children = new SortableSet(undefined, sortById); + this._parents = new SortableSet(undefined, sortById); + this._blocks = new SortableSet(); + /** @type {Chunk[]} */ + this.chunks = []; + /** @type {OriginRecord[]} */ + this.origins = []; + /** Indices in top-down order */ + /** @private @type {Map} */ + this._moduleIndices = new Map(); + /** Indices in bottom-up order */ + /** @private @type {Map} */ + this._moduleIndices2 = new Map(); + } + + /** + * when a new chunk is added to a chunkGroup, addingOptions will occur. + * @param {ChunkGroupOptions} options the chunkGroup options passed to addOptions + * @returns {void} + */ + addOptions(options) { + for (const key of Object.keys(options)) { + if (this.options[key] === undefined) { + this.options[key] = options[key]; + } else if (this.options[key] !== options[key]) { + if (key.endsWith("Order")) { + this.options[key] = Math.max(this.options[key], options[key]); + } else { + throw new Error( + `ChunkGroup.addOptions: No option merge strategy for ${key}` + ); + } + } + } + } + + /** + * returns the name of current ChunkGroup + * @returns {string|undefined} returns the ChunkGroup name + */ + get name() { + return this.options.name; + } + + /** + * sets a new name for current ChunkGroup + * @param {string} value the new name for ChunkGroup + * @returns {void} + */ + set name(value) { + this.options.name = value; + } + + /** + * get a uniqueId for ChunkGroup, made up of its member Chunk debugId's + * @returns {string} a unique concatenation of chunk debugId's + */ + get debugId() { + return Array.from(this.chunks, x => x.debugId).join("+"); + } + + /** + * get a unique id for ChunkGroup, made up of its member Chunk id's + * @returns {string} a unique concatenation of chunk ids + */ + get id() { + return Array.from(this.chunks, x => x.id).join("+"); + } + + /** + * Performs an unshift of a specific chunk + * @param {Chunk} chunk chunk being unshifted + * @returns {boolean} returns true if attempted chunk shift is accepted + */ + unshiftChunk(chunk) { + const oldIdx = this.chunks.indexOf(chunk); + if (oldIdx > 0) { + this.chunks.splice(oldIdx, 1); + this.chunks.unshift(chunk); + } else if (oldIdx < 0) { + this.chunks.unshift(chunk); + return true; + } + return false; + } + + /** + * inserts a chunk before another existing chunk in group + * @param {Chunk} chunk Chunk being inserted + * @param {Chunk} before Placeholder/target chunk marking new chunk insertion point + * @returns {boolean} return true if insertion was successful + */ + insertChunk(chunk, before) { + const oldIdx = this.chunks.indexOf(chunk); + const idx = this.chunks.indexOf(before); + if (idx < 0) { + throw new Error("before chunk not found"); + } + if (oldIdx >= 0 && oldIdx > idx) { + this.chunks.splice(oldIdx, 1); + this.chunks.splice(idx, 0, chunk); + } else if (oldIdx < 0) { + this.chunks.splice(idx, 0, chunk); + return true; + } + return false; + } + + /** + * add a chunk into ChunkGroup. Is pushed on or prepended + * @param {Chunk} chunk chunk being pushed into ChunkGroupS + * @returns {boolean} returns true if chunk addition was successful. + */ + pushChunk(chunk) { + const oldIdx = this.chunks.indexOf(chunk); + if (oldIdx >= 0) { + return false; + } + this.chunks.push(chunk); + return true; + } + + /** + * @param {Chunk} oldChunk chunk to be replaced + * @param {Chunk} newChunk New chunk that will be replaced with + * @returns {boolean} returns true if the replacement was successful + */ + replaceChunk(oldChunk, newChunk) { + const oldIdx = this.chunks.indexOf(oldChunk); + if (oldIdx < 0) return false; + const newIdx = this.chunks.indexOf(newChunk); + if (newIdx < 0) { + this.chunks[oldIdx] = newChunk; + return true; + } + if (newIdx < oldIdx) { + this.chunks.splice(oldIdx, 1); + return true; + } else if (newIdx !== oldIdx) { + this.chunks[oldIdx] = newChunk; + this.chunks.splice(newIdx, 1); + return true; + } + } + + removeChunk(chunk) { + const idx = this.chunks.indexOf(chunk); + if (idx >= 0) { + this.chunks.splice(idx, 1); + return true; + } + return false; + } + + isInitial() { + return false; + } + + addChild(chunk) { + if (this._children.has(chunk)) { + return false; + } + this._children.add(chunk); + return true; + } + + getChildren() { + return this._children.getFromCache(getArray); + } + + getNumberOfChildren() { + return this._children.size; + } + + get childrenIterable() { + return this._children; + } + + removeChild(chunk) { + if (!this._children.has(chunk)) { + return false; + } + + this._children.delete(chunk); + chunk.removeParent(this); + return true; + } + + addParent(parentChunk) { + if (!this._parents.has(parentChunk)) { + this._parents.add(parentChunk); + return true; + } + return false; + } + + getParents() { + return this._parents.getFromCache(getArray); + } + + setParents(newParents) { + this._parents.clear(); + for (const p of newParents) { + this._parents.add(p); + } + } + + getNumberOfParents() { + return this._parents.size; + } + + hasParent(parent) { + return this._parents.has(parent); + } + + get parentsIterable() { + return this._parents; + } + + removeParent(chunk) { + if (this._parents.delete(chunk)) { + chunk.removeChunk(this); + return true; + } + return false; + } + + /** + * @returns {Array} - an array containing the blocks + */ + getBlocks() { + return this._blocks.getFromCache(getArray); + } + + getNumberOfBlocks() { + return this._blocks.size; + } + + hasBlock(block) { + return this._blocks.has(block); + } + + get blocksIterable() { + return this._blocks; + } + + addBlock(block) { + if (!this._blocks.has(block)) { + this._blocks.add(block); + return true; + } + return false; + } + + addOrigin(module, loc, request) { + this.origins.push({ + module, + loc, + request + }); + } + + containsModule(module) { + for (const chunk of this.chunks) { + if (chunk.containsModule(module)) return true; + } + return false; + } + + getFiles() { + const files = new Set(); + + for (const chunk of this.chunks) { + for (const file of chunk.files) { + files.add(file); + } + } + + return Array.from(files); + } + + /** + * @param {string=} reason reason for removing ChunkGroup + * @returns {void} + */ + remove(reason) { + // cleanup parents + for (const parentChunkGroup of this._parents) { + // remove this chunk from its parents + parentChunkGroup._children.delete(this); + + // cleanup "sub chunks" + for (const chunkGroup of this._children) { + /** + * remove this chunk as "intermediary" and connect + * it "sub chunks" and parents directly + */ + // add parent to each "sub chunk" + chunkGroup.addParent(parentChunkGroup); + // add "sub chunk" to parent + parentChunkGroup.addChild(chunkGroup); + } + } + + /** + * we need to iterate again over the children + * to remove this from the child's parents. + * This can not be done in the above loop + * as it is not guaranteed that `this._parents` contains anything. + */ + for (const chunkGroup of this._children) { + // remove this as parent of every "sub chunk" + chunkGroup._parents.delete(this); + } + + // cleanup blocks + for (const block of this._blocks) { + block.chunkGroup = null; + } + + // remove chunks + for (const chunk of this.chunks) { + chunk.removeGroup(this); + } + } + + sortItems() { + this.origins.sort(sortOrigin); + this._parents.sort(); + this._children.sort(); + } + + /** + * Sorting predicate which allows current ChunkGroup to be compared against another. + * Sorting values are based off of number of chunks in ChunkGroup. + * + * @param {ChunkGroup} otherGroup the chunkGroup to compare this against + * @returns {-1|0|1} sort position for comparison + */ + compareTo(otherGroup) { + if (this.chunks.length > otherGroup.chunks.length) return -1; + if (this.chunks.length < otherGroup.chunks.length) return 1; + const a = this.chunks[Symbol.iterator](); + const b = otherGroup.chunks[Symbol.iterator](); + // eslint-disable-next-line no-constant-condition + while (true) { + const aItem = a.next(); + const bItem = b.next(); + if (aItem.done) return 0; + const cmp = aItem.value.compareTo(bItem.value); + if (cmp !== 0) return cmp; + } + } + + getChildrenByOrders() { + const lists = new Map(); + for (const childGroup of this._children) { + // TODO webpack 5 remove this check for options + if (typeof childGroup.options === "object") { + for (const key of Object.keys(childGroup.options)) { + if (key.endsWith("Order")) { + const name = key.substr(0, key.length - "Order".length); + let list = lists.get(name); + if (list === undefined) { + lists.set(name, (list = [])); + } + list.push({ + order: childGroup.options[key], + group: childGroup + }); + } + } + } + } + const result = Object.create(null); + for (const [name, list] of lists) { + list.sort((a, b) => { + const cmp = b.order - a.order; + if (cmp !== 0) return cmp; + // TODO webpack 5 remove this check of compareTo + if (a.group.compareTo) { + return a.group.compareTo(b.group); + } + return 0; + }); + result[name] = list.map(i => i.group); + } + return result; + } + + /** + * Sets the top-down index of a module in this ChunkGroup + * @param {Module} module module for which the index should be set + * @param {number} index the index of the module + * @returns {void} + */ + setModuleIndex(module, index) { + this._moduleIndices.set(module, index); + } + + /** + * Gets the top-down index of a module in this ChunkGroup + * @param {Module} module the module + * @returns {number} index + */ + getModuleIndex(module) { + return this._moduleIndices.get(module); + } + + /** + * Sets the bottom-up index of a module in this ChunkGroup + * @param {Module} module module for which the index should be set + * @param {number} index the index of the module + * @returns {void} + */ + setModuleIndex2(module, index) { + this._moduleIndices2.set(module, index); + } + + /** + * Gets the bottom-up index of a module in this ChunkGroup + * @param {Module} module the module + * @returns {number} index + */ + getModuleIndex2(module) { + return this._moduleIndices2.get(module); + } + + checkConstraints() { + const chunk = this; + for (const child of chunk._children) { + if (!child._parents.has(chunk)) { + throw new Error( + `checkConstraints: child missing parent ${chunk.debugId} -> ${child.debugId}` + ); + } + } + for (const parentChunk of chunk._parents) { + if (!parentChunk._children.has(chunk)) { + throw new Error( + `checkConstraints: parent missing child ${parentChunk.debugId} <- ${chunk.debugId}` + ); + } + } + } +} + +module.exports = ChunkGroup; + + +/***/ }), + +/***/ 69865: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +/** @typedef {import("./Chunk")} Chunk */ + +class ChunkRenderError extends WebpackError { + /** + * Create a new ChunkRenderError + * @param {Chunk} chunk A chunk + * @param {string} file Related file + * @param {Error} error Original error + */ + constructor(chunk, file, error) { + super(); + + this.name = "ChunkRenderError"; + this.error = error; + this.message = error.message; + this.details = error.stack; + this.file = file; + this.chunk = chunk; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ChunkRenderError; + + +/***/ }), + +/***/ 6170: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { Tapable, SyncWaterfallHook, SyncHook } = __webpack_require__(92402); + +/** @typedef {import("./ModuleTemplate")} ModuleTemplate */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./Module")} Module} */ +/** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate} */ +/** @typedef {import("./util/createHash").Hash} Hash} */ + +/** + * @typedef {Object} RenderManifestOptions + * @property {Chunk} chunk the chunk used to render + * @property {string} hash + * @property {string} fullHash + * @property {TODO} outputOptions + * @property {{javascript: ModuleTemplate, webassembly: ModuleTemplate}} moduleTemplates + * @property {Map} dependencyTemplates + */ + +module.exports = class ChunkTemplate extends Tapable { + constructor(outputOptions) { + super(); + this.outputOptions = outputOptions || {}; + this.hooks = { + /** @type {SyncWaterfallHook} */ + renderManifest: new SyncWaterfallHook(["result", "options"]), + modules: new SyncWaterfallHook([ + "source", + "chunk", + "moduleTemplate", + "dependencyTemplates" + ]), + render: new SyncWaterfallHook([ + "source", + "chunk", + "moduleTemplate", + "dependencyTemplates" + ]), + renderWithEntry: new SyncWaterfallHook(["source", "chunk"]), + hash: new SyncHook(["hash"]), + hashForChunk: new SyncHook(["hash", "chunk"]) + }; + } + + /** + * + * @param {RenderManifestOptions} options render manifest options + * @returns {TODO[]} returns render manifest + */ + getRenderManifest(options) { + const result = []; + + this.hooks.renderManifest.call(result, options); + + return result; + } + + /** + * Updates hash with information from this template + * @param {Hash} hash the hash to update + * @returns {void} + */ + updateHash(hash) { + hash.update("ChunkTemplate"); + hash.update("2"); + this.hooks.hash.call(hash); + } + + /** + * TODO webpack 5: remove moduleTemplate and dependencyTemplates + * Updates hash with chunk-specific information from this template + * @param {Hash} hash the hash to update + * @param {Chunk} chunk the chunk + * @param {ModuleTemplate} moduleTemplate ModuleTemplate instance for render + * @param {Map} dependencyTemplates dependency templates + * @returns {void} + */ + updateHashForChunk(hash, chunk, moduleTemplate, dependencyTemplates) { + this.updateHash(hash); + this.hooks.hashForChunk.call(hash, chunk); + } +}; + + +/***/ }), + +/***/ 51760: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +/** @typedef {import("./Module")} Module */ + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ + +class CommentCompilationWarning extends WebpackError { + /** + * + * @param {string} message warning message + * @param {Module} module affected module + * @param {DependencyLocation} loc affected lines of code + */ + constructor(message, module, loc) { + super(message); + + this.name = "CommentCompilationWarning"; + + this.module = module; + this.loc = loc; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = CommentCompilationWarning; + + +/***/ }), + +/***/ 85736: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); +const ParserHelpers = __webpack_require__(23999); + +class CommonJsStuffPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "CommonJsStuffPlugin", + (compilation, { normalModuleFactory }) => { + const handler = (parser, parserOptions) => { + parser.hooks.expression + .for("require.main.require") + .tap( + "CommonJsStuffPlugin", + ParserHelpers.expressionIsUnsupported( + parser, + "require.main.require is not supported by webpack." + ) + ); + parser.hooks.expression + .for("module.parent.require") + .tap( + "CommonJsStuffPlugin", + ParserHelpers.expressionIsUnsupported( + parser, + "module.parent.require is not supported by webpack." + ) + ); + parser.hooks.expression + .for("require.main") + .tap( + "CommonJsStuffPlugin", + ParserHelpers.toConstantDependencyWithWebpackRequire( + parser, + "__webpack_require__.c[__webpack_require__.s]" + ) + ); + parser.hooks.expression + .for("module.loaded") + .tap("CommonJsStuffPlugin", expr => { + parser.state.module.buildMeta.moduleConcatenationBailout = + "module.loaded"; + return ParserHelpers.toConstantDependency( + parser, + "module.l" + )(expr); + }); + parser.hooks.expression + .for("module.id") + .tap("CommonJsStuffPlugin", expr => { + parser.state.module.buildMeta.moduleConcatenationBailout = + "module.id"; + return ParserHelpers.toConstantDependency( + parser, + "module.i" + )(expr); + }); + parser.hooks.expression + .for("module.exports") + .tap("CommonJsStuffPlugin", () => { + const module = parser.state.module; + const isHarmony = + module.buildMeta && module.buildMeta.exportsType; + if (!isHarmony) return true; + }); + parser.hooks.evaluateIdentifier + .for("module.hot") + .tap( + "CommonJsStuffPlugin", + ParserHelpers.evaluateToIdentifier("module.hot", false) + ); + parser.hooks.expression + .for("module") + .tap("CommonJsStuffPlugin", () => { + const module = parser.state.module; + const isHarmony = + module.buildMeta && module.buildMeta.exportsType; + let moduleJsPath = isHarmony ? __webpack_require__.ab + "harmony-module.js" : __webpack_require__.ab + "module.js"; + if (module.context) { + moduleJsPath = path.relative( + parser.state.module.context, + moduleJsPath + ); + if (!/^[A-Z]:/i.test(moduleJsPath)) { + moduleJsPath = `./${moduleJsPath.replace(/\\/g, "/")}`; + } + } + return ParserHelpers.addParsedVariableToModule( + parser, + "module", + `require(${JSON.stringify(moduleJsPath)})(module)` + ); + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("CommonJsStuffPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("CommonJsStuffPlugin", handler); + } + ); + } +} +module.exports = CommonJsStuffPlugin; + + +/***/ }), + +/***/ 85918: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ConstDependency = __webpack_require__(71101); + +const NullFactory = __webpack_require__(40438); + +/** @typedef {import("./Compiler")} Compiler */ + +class CompatibilityPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler Webpack Compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "CompatibilityPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set(ConstDependency, new NullFactory()); + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("CompatibilityPlugin", (parser, parserOptions) => { + if ( + parserOptions.browserify !== undefined && + !parserOptions.browserify + ) + return; + + parser.hooks.call + .for("require") + .tap("CompatibilityPlugin", expr => { + // support for browserify style require delegator: "require(o, !0)" + if (expr.arguments.length !== 2) return; + const second = parser.evaluateExpression(expr.arguments[1]); + if (!second.isBoolean()) return; + if (second.asBool() !== true) return; + const dep = new ConstDependency("require", expr.callee.range); + dep.loc = expr.loc; + if (parser.state.current.dependencies.length > 1) { + const last = + parser.state.current.dependencies[ + parser.state.current.dependencies.length - 1 + ]; + if ( + last.critical && + last.options && + last.options.request === "." && + last.userRequest === "." && + last.options.recursive + ) + parser.state.current.dependencies.pop(); + } + parser.state.current.addDependency(dep); + return true; + }); + }); + } + ); + } +} +module.exports = CompatibilityPlugin; + + +/***/ }), + +/***/ 34968: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + +const asyncLib = __webpack_require__(36386); +const util = __webpack_require__(31669); +const { CachedSource } = __webpack_require__(53665); +const { + Tapable, + SyncHook, + SyncBailHook, + SyncWaterfallHook, + AsyncSeriesHook +} = __webpack_require__(92402); +const EntryModuleNotFoundError = __webpack_require__(99531); +const ModuleNotFoundError = __webpack_require__(71638); +const ModuleDependencyWarning = __webpack_require__(59136); +const ModuleDependencyError = __webpack_require__(14953); +const ChunkGroup = __webpack_require__(52911); +const Chunk = __webpack_require__(2919); +const Entrypoint = __webpack_require__(71931); +const MainTemplate = __webpack_require__(43626); +const ChunkTemplate = __webpack_require__(6170); +const HotUpdateChunkTemplate = __webpack_require__(66062); +const ModuleTemplate = __webpack_require__(75100); +const RuntimeTemplate = __webpack_require__(44006); +const ChunkRenderError = __webpack_require__(69865); +const Stats = __webpack_require__(99977); +const Semaphore = __webpack_require__(33349); +const createHash = __webpack_require__(15660); +const SortableSet = __webpack_require__(50071); +const GraphHelpers = __webpack_require__(32973); +const ModuleDependency = __webpack_require__(90865); +const compareLocations = __webpack_require__(22562); +const { Logger, LogType } = __webpack_require__(47194); +const ErrorHelpers = __webpack_require__(80140); +const buildChunkGraph = __webpack_require__(52337); +const WebpackError = __webpack_require__(97391); + +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable */ +/** @typedef {import("./dependencies/SingleEntryDependency")} SingleEntryDependency */ +/** @typedef {import("./dependencies/MultiEntryDependency")} MultiEntryDependency */ +/** @typedef {import("./dependencies/DllEntryDependency")} DllEntryDependency */ +/** @typedef {import("./dependencies/DependencyReference")} DependencyReference */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate */ +/** @typedef {import("./util/createHash").Hash} Hash */ + +// TODO use @callback +/** @typedef {{[assetName: string]: Source}} CompilationAssets */ +/** @typedef {(err: Error|null, result?: Module) => void } ModuleCallback */ +/** @typedef {(err?: Error|null, result?: Module) => void } ModuleChainCallback */ +/** @typedef {(module: Module) => void} OnModuleCallback */ +/** @typedef {(err?: Error|null) => void} Callback */ +/** @typedef {(d: Dependency) => any} DepBlockVarDependenciesCallback */ +/** @typedef {new (...args: any[]) => Dependency} DepConstructor */ +/** @typedef {{apply: () => void}} Plugin */ + +/** + * @typedef {Object} ModuleFactoryCreateDataContextInfo + * @property {string} issuer + * @property {string} compiler + */ + +/** + * @typedef {Object} ModuleFactoryCreateData + * @property {ModuleFactoryCreateDataContextInfo} contextInfo + * @property {any=} resolveOptions + * @property {string} context + * @property {Dependency[]} dependencies + */ + +/** + * @typedef {Object} ModuleFactory + * @property {(data: ModuleFactoryCreateData, callback: ModuleCallback) => any} create + */ + +/** + * @typedef {Object} SortedDependency + * @property {ModuleFactory} factory + * @property {Dependency[]} dependencies + */ + +/** + * @typedef {Object} DependenciesBlockLike + * @property {Dependency[]} dependencies + * @property {AsyncDependenciesBlock[]} blocks + * @property {DependenciesBlockVariable[]} variables + */ + +/** + * @typedef {Object} LogEntry + * @property {string} type + * @property {any[]} args + * @property {number} time + * @property {string[]=} trace + */ + +/** + * @typedef {Object} AssetInfo + * @property {boolean=} immutable true, if the asset can be long term cached forever (contains a hash) + * @property {number=} size size in bytes, only set after asset has been emitted + * @property {boolean=} development true, when asset is only used for development and doesn't count towards user-facing assets + * @property {boolean=} hotModuleReplacement true, when asset ships data for updating an existing application (HMR) + */ + +/** + * @typedef {Object} Asset + * @property {string} name the filename of the asset + * @property {Source} source source of the asset + * @property {AssetInfo} info info about the asset + */ + +/** + * @param {Chunk} a first chunk to sort by id + * @param {Chunk} b second chunk to sort by id + * @returns {-1|0|1} sort value + */ +const byId = (a, b) => { + if (typeof a.id !== typeof b.id) { + return typeof a.id < typeof b.id ? -1 : 1; + } + if (a.id < b.id) return -1; + if (a.id > b.id) return 1; + return 0; +}; + +/** + * @param {Module} a first module to sort by + * @param {Module} b second module to sort by + * @returns {-1|0|1} sort value + */ +const byIdOrIdentifier = (a, b) => { + if (typeof a.id !== typeof b.id) { + return typeof a.id < typeof b.id ? -1 : 1; + } + if (a.id < b.id) return -1; + if (a.id > b.id) return 1; + const identA = a.identifier(); + const identB = b.identifier(); + if (identA < identB) return -1; + if (identA > identB) return 1; + return 0; +}; + +/** + * @param {Module} a first module to sort by + * @param {Module} b second module to sort by + * @returns {-1|0|1} sort value + */ +const byIndexOrIdentifier = (a, b) => { + if (a.index < b.index) return -1; + if (a.index > b.index) return 1; + const identA = a.identifier(); + const identB = b.identifier(); + if (identA < identB) return -1; + if (identA > identB) return 1; + return 0; +}; + +/** + * @param {Compilation} a first compilation to sort by + * @param {Compilation} b second compilation to sort by + * @returns {-1|0|1} sort value + */ +const byNameOrHash = (a, b) => { + if (a.name < b.name) return -1; + if (a.name > b.name) return 1; + if (a.fullHash < b.fullHash) return -1; + if (a.fullHash > b.fullHash) return 1; + return 0; +}; + +/** + * @param {DependenciesBlockVariable[]} variables DepBlock Variables to iterate over + * @param {DepBlockVarDependenciesCallback} fn callback to apply on iterated elements + * @returns {void} + */ +const iterationBlockVariable = (variables, fn) => { + for ( + let indexVariable = 0; + indexVariable < variables.length; + indexVariable++ + ) { + const varDep = variables[indexVariable].dependencies; + for (let indexVDep = 0; indexVDep < varDep.length; indexVDep++) { + fn(varDep[indexVDep]); + } + } +}; + +/** + * @template T + * @param {T[]} arr array of elements to iterate over + * @param {function(T): void} fn callback applied to each element + * @returns {void} + */ +const iterationOfArrayCallback = (arr, fn) => { + for (let index = 0; index < arr.length; index++) { + fn(arr[index]); + } +}; + +/** + * @template T + * @param {Set} set set to add items to + * @param {Set} otherSet set to add items from + * @returns {void} + */ +const addAllToSet = (set, otherSet) => { + for (const item of otherSet) { + set.add(item); + } +}; + +/** + * @param {Source} a a source + * @param {Source} b another source + * @returns {boolean} true, when both sources are equal + */ +const isSourceEqual = (a, b) => { + if (a === b) return true; + // TODO webpack 5: check .buffer() instead, it's called anyway during emit + /** @type {Buffer|string} */ + let aSource = a.source(); + /** @type {Buffer|string} */ + let bSource = b.source(); + if (aSource === bSource) return true; + if (typeof aSource === "string" && typeof bSource === "string") return false; + if (!Buffer.isBuffer(aSource)) aSource = Buffer.from(aSource, "utf-8"); + if (!Buffer.isBuffer(bSource)) bSource = Buffer.from(bSource, "utf-8"); + return aSource.equals(bSource); +}; + +class Compilation extends Tapable { + /** + * Creates an instance of Compilation. + * @param {Compiler} compiler the compiler which created the compilation + */ + constructor(compiler) { + super(); + this.hooks = { + /** @type {SyncHook} */ + buildModule: new SyncHook(["module"]), + /** @type {SyncHook} */ + rebuildModule: new SyncHook(["module"]), + /** @type {SyncHook} */ + failedModule: new SyncHook(["module", "error"]), + /** @type {SyncHook} */ + succeedModule: new SyncHook(["module"]), + + /** @type {SyncHook} */ + addEntry: new SyncHook(["entry", "name"]), + /** @type {SyncHook} */ + failedEntry: new SyncHook(["entry", "name", "error"]), + /** @type {SyncHook} */ + succeedEntry: new SyncHook(["entry", "name", "module"]), + + /** @type {SyncWaterfallHook} */ + dependencyReference: new SyncWaterfallHook([ + "dependencyReference", + "dependency", + "module" + ]), + + /** @type {AsyncSeriesHook} */ + finishModules: new AsyncSeriesHook(["modules"]), + /** @type {SyncHook} */ + finishRebuildingModule: new SyncHook(["module"]), + /** @type {SyncHook} */ + unseal: new SyncHook([]), + /** @type {SyncHook} */ + seal: new SyncHook([]), + + /** @type {SyncHook} */ + beforeChunks: new SyncHook([]), + /** @type {SyncHook} */ + afterChunks: new SyncHook(["chunks"]), + + /** @type {SyncBailHook} */ + optimizeDependenciesBasic: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ + optimizeDependencies: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ + optimizeDependenciesAdvanced: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ + afterOptimizeDependencies: new SyncHook(["modules"]), + + /** @type {SyncHook} */ + optimize: new SyncHook([]), + /** @type {SyncBailHook} */ + optimizeModulesBasic: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ + optimizeModules: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ + optimizeModulesAdvanced: new SyncBailHook(["modules"]), + /** @type {SyncHook} */ + afterOptimizeModules: new SyncHook(["modules"]), + + /** @type {SyncBailHook} */ + optimizeChunksBasic: new SyncBailHook(["chunks", "chunkGroups"]), + /** @type {SyncBailHook} */ + optimizeChunks: new SyncBailHook(["chunks", "chunkGroups"]), + /** @type {SyncBailHook} */ + optimizeChunksAdvanced: new SyncBailHook(["chunks", "chunkGroups"]), + /** @type {SyncHook} */ + afterOptimizeChunks: new SyncHook(["chunks", "chunkGroups"]), + + /** @type {AsyncSeriesHook} */ + optimizeTree: new AsyncSeriesHook(["chunks", "modules"]), + /** @type {SyncHook} */ + afterOptimizeTree: new SyncHook(["chunks", "modules"]), + + /** @type {SyncBailHook} */ + optimizeChunkModulesBasic: new SyncBailHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ + optimizeChunkModules: new SyncBailHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ + optimizeChunkModulesAdvanced: new SyncBailHook(["chunks", "modules"]), + /** @type {SyncHook} */ + afterOptimizeChunkModules: new SyncHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ + shouldRecord: new SyncBailHook([]), + + /** @type {SyncHook} */ + reviveModules: new SyncHook(["modules", "records"]), + /** @type {SyncHook} */ + optimizeModuleOrder: new SyncHook(["modules"]), + /** @type {SyncHook} */ + advancedOptimizeModuleOrder: new SyncHook(["modules"]), + /** @type {SyncHook} */ + beforeModuleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ + moduleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ + optimizeModuleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ + afterOptimizeModuleIds: new SyncHook(["modules"]), + + /** @type {SyncHook} */ + reviveChunks: new SyncHook(["chunks", "records"]), + /** @type {SyncHook} */ + optimizeChunkOrder: new SyncHook(["chunks"]), + /** @type {SyncHook} */ + beforeChunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook} */ + optimizeChunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook} */ + afterOptimizeChunkIds: new SyncHook(["chunks"]), + + /** @type {SyncHook} */ + recordModules: new SyncHook(["modules", "records"]), + /** @type {SyncHook} */ + recordChunks: new SyncHook(["chunks", "records"]), + + /** @type {SyncHook} */ + beforeHash: new SyncHook([]), + /** @type {SyncHook} */ + contentHash: new SyncHook(["chunk"]), + /** @type {SyncHook} */ + afterHash: new SyncHook([]), + /** @type {SyncHook} */ + recordHash: new SyncHook(["records"]), + /** @type {SyncHook} */ + record: new SyncHook(["compilation", "records"]), + + /** @type {SyncHook} */ + beforeModuleAssets: new SyncHook([]), + /** @type {SyncBailHook} */ + shouldGenerateChunkAssets: new SyncBailHook([]), + /** @type {SyncHook} */ + beforeChunkAssets: new SyncHook([]), + /** @type {SyncHook} */ + additionalChunkAssets: new SyncHook(["chunks"]), + + /** @type {AsyncSeriesHook} */ + additionalAssets: new AsyncSeriesHook([]), + /** @type {AsyncSeriesHook} */ + optimizeChunkAssets: new AsyncSeriesHook(["chunks"]), + /** @type {SyncHook} */ + afterOptimizeChunkAssets: new SyncHook(["chunks"]), + /** @type {AsyncSeriesHook} */ + optimizeAssets: new AsyncSeriesHook(["assets"]), + /** @type {SyncHook} */ + afterOptimizeAssets: new SyncHook(["assets"]), + + /** @type {SyncBailHook} */ + needAdditionalSeal: new SyncBailHook([]), + /** @type {AsyncSeriesHook} */ + afterSeal: new AsyncSeriesHook([]), + + /** @type {SyncHook} */ + chunkHash: new SyncHook(["chunk", "chunkHash"]), + /** @type {SyncHook} */ + moduleAsset: new SyncHook(["module", "filename"]), + /** @type {SyncHook} */ + chunkAsset: new SyncHook(["chunk", "filename"]), + + /** @type {SyncWaterfallHook} */ + assetPath: new SyncWaterfallHook(["filename", "data"]), // TODO MainTemplate + + /** @type {SyncBailHook} */ + needAdditionalPass: new SyncBailHook([]), + + /** @type {SyncHook} */ + childCompiler: new SyncHook([ + "childCompiler", + "compilerName", + "compilerIndex" + ]), + + /** @type {SyncBailHook} */ + log: new SyncBailHook(["origin", "logEntry"]), + + // TODO the following hooks are weirdly located here + // TODO move them for webpack 5 + /** @type {SyncHook} */ + normalModuleLoader: new SyncHook(["loaderContext", "module"]), + + /** @type {SyncBailHook} */ + optimizeExtractedChunksBasic: new SyncBailHook(["chunks"]), + /** @type {SyncBailHook} */ + optimizeExtractedChunks: new SyncBailHook(["chunks"]), + /** @type {SyncBailHook} */ + optimizeExtractedChunksAdvanced: new SyncBailHook(["chunks"]), + /** @type {SyncHook} */ + afterOptimizeExtractedChunks: new SyncHook(["chunks"]) + }; + this._pluginCompat.tap("Compilation", options => { + switch (options.name) { + case "optimize-tree": + case "additional-assets": + case "optimize-chunk-assets": + case "optimize-assets": + case "after-seal": + options.async = true; + break; + } + }); + /** @type {string=} */ + this.name = undefined; + /** @type {Compiler} */ + this.compiler = compiler; + this.resolverFactory = compiler.resolverFactory; + this.inputFileSystem = compiler.inputFileSystem; + this.requestShortener = compiler.requestShortener; + + const options = compiler.options; + this.options = options; + this.outputOptions = options && options.output; + /** @type {boolean=} */ + this.bail = options && options.bail; + this.profile = options && options.profile; + this.performance = options && options.performance; + + this.mainTemplate = new MainTemplate(this.outputOptions); + this.chunkTemplate = new ChunkTemplate(this.outputOptions); + this.hotUpdateChunkTemplate = new HotUpdateChunkTemplate( + this.outputOptions + ); + this.runtimeTemplate = new RuntimeTemplate( + this.outputOptions, + this.requestShortener + ); + this.moduleTemplates = { + javascript: new ModuleTemplate(this.runtimeTemplate, "javascript"), + webassembly: new ModuleTemplate(this.runtimeTemplate, "webassembly") + }; + + this.semaphore = new Semaphore(options.parallelism || 100); + + this.entries = []; + /** @private @type {{name: string, request: string, module: Module}[]} */ + this._preparedEntrypoints = []; + /** @type {Map} */ + this.entrypoints = new Map(); + /** @type {Chunk[]} */ + this.chunks = []; + /** @type {ChunkGroup[]} */ + this.chunkGroups = []; + /** @type {Map} */ + this.namedChunkGroups = new Map(); + /** @type {Map} */ + this.namedChunks = new Map(); + /** @type {Module[]} */ + this.modules = []; + /** @private @type {Map} */ + this._modules = new Map(); + this.cache = null; + this.records = null; + /** @type {string[]} */ + this.additionalChunkAssets = []; + /** @type {CompilationAssets} */ + this.assets = {}; + /** @type {Map} */ + this.assetsInfo = new Map(); + /** @type {WebpackError[]} */ + this.errors = []; + /** @type {WebpackError[]} */ + this.warnings = []; + /** @type {Compilation[]} */ + this.children = []; + /** @type {Map} */ + this.logging = new Map(); + /** @type {Map} */ + this.dependencyFactories = new Map(); + /** @type {Map} */ + this.dependencyTemplates = new Map(); + // TODO refactor this in webpack 5 to a custom DependencyTemplates class with a hash property + // @ts-ignore + this.dependencyTemplates.set("hash", ""); + this.childrenCounters = {}; + /** @type {Set} */ + this.usedChunkIds = null; + /** @type {Set} */ + this.usedModuleIds = null; + /** @type {Map=} */ + this.fileTimestamps = undefined; + /** @type {Map=} */ + this.contextTimestamps = undefined; + /** @type {Set=} */ + this.compilationDependencies = undefined; + /** @private @type {Map} */ + this._buildingModules = new Map(); + /** @private @type {Map} */ + this._rebuildingModules = new Map(); + /** @type {Set} */ + this.emittedAssets = new Set(); + } + + getStats() { + return new Stats(this); + } + + /** + * @param {string | (function(): string)} name name of the logger, or function called once to get the logger name + * @returns {Logger} a logger with that name + */ + getLogger(name) { + if (!name) { + throw new TypeError("Compilation.getLogger(name) called without a name"); + } + /** @type {LogEntry[] | undefined} */ + let logEntries; + return new Logger((type, args) => { + if (typeof name === "function") { + name = name(); + if (!name) { + throw new TypeError( + "Compilation.getLogger(name) called with a function not returning a name" + ); + } + } + let trace; + switch (type) { + case LogType.warn: + case LogType.error: + case LogType.trace: + trace = ErrorHelpers.cutOffLoaderExecution(new Error("Trace").stack) + .split("\n") + .slice(3); + break; + } + /** @type {LogEntry} */ + const logEntry = { + time: Date.now(), + type, + args, + trace + }; + if (this.hooks.log.call(name, logEntry) === undefined) { + if (logEntry.type === LogType.profileEnd) { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.profileEnd === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.profileEnd(`[${name}] ${logEntry.args[0]}`); + } + } + if (logEntries === undefined) { + logEntries = this.logging.get(name); + if (logEntries === undefined) { + logEntries = []; + this.logging.set(name, logEntries); + } + } + logEntries.push(logEntry); + if (logEntry.type === LogType.profile) { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.profile === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.profile(`[${name}] ${logEntry.args[0]}`); + } + } + } + }); + } + + /** + * @typedef {Object} AddModuleResult + * @property {Module} module the added or existing module + * @property {boolean} issuer was this the first request for this module + * @property {boolean} build should the module be build + * @property {boolean} dependencies should dependencies be walked + */ + + /** + * @param {Module} module module to be added that was created + * @param {any=} cacheGroup cacheGroup it is apart of + * @returns {AddModuleResult} returns meta about whether or not the module had built + * had an issuer, or any dependnecies + */ + addModule(module, cacheGroup) { + const identifier = module.identifier(); + const alreadyAddedModule = this._modules.get(identifier); + if (alreadyAddedModule) { + return { + module: alreadyAddedModule, + issuer: false, + build: false, + dependencies: false + }; + } + const cacheName = (cacheGroup || "m") + identifier; + if (this.cache && this.cache[cacheName]) { + const cacheModule = this.cache[cacheName]; + + if (typeof cacheModule.updateCacheModule === "function") { + cacheModule.updateCacheModule(module); + } + + let rebuild = true; + if (this.fileTimestamps && this.contextTimestamps) { + rebuild = cacheModule.needRebuild( + this.fileTimestamps, + this.contextTimestamps + ); + } + + if (!rebuild) { + cacheModule.disconnect(); + this._modules.set(identifier, cacheModule); + this.modules.push(cacheModule); + for (const err of cacheModule.errors) { + this.errors.push(err); + } + for (const err of cacheModule.warnings) { + this.warnings.push(err); + } + return { + module: cacheModule, + issuer: true, + build: false, + dependencies: true + }; + } + cacheModule.unbuild(); + module = cacheModule; + } + this._modules.set(identifier, module); + if (this.cache) { + this.cache[cacheName] = module; + } + this.modules.push(module); + return { + module: module, + issuer: true, + build: true, + dependencies: true + }; + } + + /** + * Fetches a module from a compilation by its identifier + * @param {Module} module the module provided + * @returns {Module} the module requested + */ + getModule(module) { + const identifier = module.identifier(); + return this._modules.get(identifier); + } + + /** + * Attempts to search for a module by its identifier + * @param {string} identifier identifier (usually path) for module + * @returns {Module|undefined} attempt to search for module and return it, else undefined + */ + findModule(identifier) { + return this._modules.get(identifier); + } + + /** + * @param {Module} module module with its callback list + * @param {Callback} callback the callback function + * @returns {void} + */ + waitForBuildingFinished(module, callback) { + let callbackList = this._buildingModules.get(module); + if (callbackList) { + callbackList.push(() => callback()); + } else { + process.nextTick(callback); + } + } + + /** + * Builds the module object + * + * @param {Module} module module to be built + * @param {boolean} optional optional flag + * @param {Module=} origin origin module this module build was requested from + * @param {Dependency[]=} dependencies optional dependencies from the module to be built + * @param {TODO} thisCallback the callback + * @returns {TODO} returns the callback function with results + */ + buildModule(module, optional, origin, dependencies, thisCallback) { + let callbackList = this._buildingModules.get(module); + if (callbackList) { + callbackList.push(thisCallback); + return; + } + this._buildingModules.set(module, (callbackList = [thisCallback])); + + const callback = err => { + this._buildingModules.delete(module); + for (const cb of callbackList) { + cb(err); + } + }; + + this.hooks.buildModule.call(module); + module.build( + this.options, + this, + this.resolverFactory.get("normal", module.resolveOptions), + this.inputFileSystem, + error => { + const errors = module.errors; + for (let indexError = 0; indexError < errors.length; indexError++) { + const err = errors[indexError]; + err.origin = origin; + err.dependencies = dependencies; + if (optional) { + this.warnings.push(err); + } else { + this.errors.push(err); + } + } + + const warnings = module.warnings; + for ( + let indexWarning = 0; + indexWarning < warnings.length; + indexWarning++ + ) { + const war = warnings[indexWarning]; + war.origin = origin; + war.dependencies = dependencies; + this.warnings.push(war); + } + const originalMap = module.dependencies.reduce((map, v, i) => { + map.set(v, i); + return map; + }, new Map()); + module.dependencies.sort((a, b) => { + const cmp = compareLocations(a.loc, b.loc); + if (cmp) return cmp; + return originalMap.get(a) - originalMap.get(b); + }); + if (error) { + this.hooks.failedModule.call(module, error); + return callback(error); + } + this.hooks.succeedModule.call(module); + return callback(); + } + ); + } + + /** + * @param {Module} module to be processed for deps + * @param {ModuleCallback} callback callback to be triggered + * @returns {void} + */ + processModuleDependencies(module, callback) { + const dependencies = new Map(); + + const addDependency = dep => { + const resourceIdent = dep.getResourceIdentifier(); + if (resourceIdent) { + const factory = this.dependencyFactories.get(dep.constructor); + if (factory === undefined) { + throw new Error( + `No module factory available for dependency type: ${dep.constructor.name}` + ); + } + let innerMap = dependencies.get(factory); + if (innerMap === undefined) { + dependencies.set(factory, (innerMap = new Map())); + } + let list = innerMap.get(resourceIdent); + if (list === undefined) innerMap.set(resourceIdent, (list = [])); + list.push(dep); + } + }; + + const addDependenciesBlock = block => { + if (block.dependencies) { + iterationOfArrayCallback(block.dependencies, addDependency); + } + if (block.blocks) { + iterationOfArrayCallback(block.blocks, addDependenciesBlock); + } + if (block.variables) { + iterationBlockVariable(block.variables, addDependency); + } + }; + + try { + addDependenciesBlock(module); + } catch (e) { + callback(e); + } + + const sortedDependencies = []; + + for (const pair1 of dependencies) { + for (const pair2 of pair1[1]) { + sortedDependencies.push({ + factory: pair1[0], + dependencies: pair2[1] + }); + } + } + + this.addModuleDependencies( + module, + sortedDependencies, + this.bail, + null, + true, + callback + ); + } + + /** + * @param {Module} module module to add deps to + * @param {SortedDependency[]} dependencies set of sorted dependencies to iterate through + * @param {(boolean|null)=} bail whether to bail or not + * @param {TODO} cacheGroup optional cacheGroup + * @param {boolean} recursive whether it is recursive traversal + * @param {function} callback callback for when dependencies are finished being added + * @returns {void} + */ + addModuleDependencies( + module, + dependencies, + bail, + cacheGroup, + recursive, + callback + ) { + const start = this.profile && Date.now(); + const currentProfile = this.profile && {}; + + asyncLib.forEach( + dependencies, + (item, callback) => { + const dependencies = item.dependencies; + + const errorAndCallback = err => { + err.origin = module; + err.dependencies = dependencies; + this.errors.push(err); + if (bail) { + callback(err); + } else { + callback(); + } + }; + const warningAndCallback = err => { + err.origin = module; + this.warnings.push(err); + callback(); + }; + + const semaphore = this.semaphore; + semaphore.acquire(() => { + const factory = item.factory; + factory.create( + { + contextInfo: { + issuer: module.nameForCondition && module.nameForCondition(), + compiler: this.compiler.name + }, + resolveOptions: module.resolveOptions, + context: module.context, + dependencies: dependencies + }, + (err, dependentModule) => { + let afterFactory; + + const isOptional = () => { + return dependencies.every(d => d.optional); + }; + + const errorOrWarningAndCallback = err => { + if (isOptional()) { + return warningAndCallback(err); + } else { + return errorAndCallback(err); + } + }; + + if (err) { + semaphore.release(); + return errorOrWarningAndCallback( + new ModuleNotFoundError(module, err) + ); + } + if (!dependentModule) { + semaphore.release(); + return process.nextTick(callback); + } + if (currentProfile) { + afterFactory = Date.now(); + currentProfile.factory = afterFactory - start; + } + + const iterationDependencies = depend => { + for (let index = 0; index < depend.length; index++) { + const dep = depend[index]; + dep.module = dependentModule; + dependentModule.addReason(module, dep); + } + }; + + const addModuleResult = this.addModule( + dependentModule, + cacheGroup + ); + dependentModule = addModuleResult.module; + iterationDependencies(dependencies); + + const afterBuild = () => { + if (recursive && addModuleResult.dependencies) { + this.processModuleDependencies(dependentModule, callback); + } else { + return callback(); + } + }; + + if (addModuleResult.issuer) { + if (currentProfile) { + dependentModule.profile = currentProfile; + } + + dependentModule.issuer = module; + } else { + if (this.profile) { + if (module.profile) { + const time = Date.now() - start; + if ( + !module.profile.dependencies || + time > module.profile.dependencies + ) { + module.profile.dependencies = time; + } + } + } + } + + if (addModuleResult.build) { + this.buildModule( + dependentModule, + isOptional(), + module, + dependencies, + err => { + if (err) { + semaphore.release(); + return errorOrWarningAndCallback(err); + } + + if (currentProfile) { + const afterBuilding = Date.now(); + currentProfile.building = afterBuilding - afterFactory; + } + + semaphore.release(); + afterBuild(); + } + ); + } else { + semaphore.release(); + this.waitForBuildingFinished(dependentModule, afterBuild); + } + } + ); + }); + }, + err => { + // In V8, the Error objects keep a reference to the functions on the stack. These warnings & + // errors are created inside closures that keep a reference to the Compilation, so errors are + // leaking the Compilation object. + + if (err) { + // eslint-disable-next-line no-self-assign + err.stack = err.stack; + return callback(err); + } + + return process.nextTick(callback); + } + ); + } + + /** + * + * @param {string} context context string path + * @param {Dependency} dependency dependency used to create Module chain + * @param {OnModuleCallback} onModule function invoked on modules creation + * @param {ModuleChainCallback} callback callback for when module chain is complete + * @returns {void} will throw if dependency instance is not a valid Dependency + */ + _addModuleChain(context, dependency, onModule, callback) { + const start = this.profile && Date.now(); + const currentProfile = this.profile && {}; + + const errorAndCallback = this.bail + ? err => { + callback(err); + } + : err => { + err.dependencies = [dependency]; + this.errors.push(err); + callback(); + }; + + if ( + typeof dependency !== "object" || + dependency === null || + !dependency.constructor + ) { + throw new Error("Parameter 'dependency' must be a Dependency"); + } + const Dep = /** @type {DepConstructor} */ (dependency.constructor); + const moduleFactory = this.dependencyFactories.get(Dep); + if (!moduleFactory) { + throw new Error( + `No dependency factory available for this dependency type: ${dependency.constructor.name}` + ); + } + + this.semaphore.acquire(() => { + moduleFactory.create( + { + contextInfo: { + issuer: "", + compiler: this.compiler.name + }, + context: context, + dependencies: [dependency] + }, + (err, module) => { + if (err) { + this.semaphore.release(); + return errorAndCallback(new EntryModuleNotFoundError(err)); + } + + let afterFactory; + + if (currentProfile) { + afterFactory = Date.now(); + currentProfile.factory = afterFactory - start; + } + + const addModuleResult = this.addModule(module); + module = addModuleResult.module; + + onModule(module); + + dependency.module = module; + module.addReason(null, dependency); + + const afterBuild = () => { + if (addModuleResult.dependencies) { + this.processModuleDependencies(module, err => { + if (err) return callback(err); + callback(null, module); + }); + } else { + return callback(null, module); + } + }; + + if (addModuleResult.issuer) { + if (currentProfile) { + module.profile = currentProfile; + } + } + + if (addModuleResult.build) { + this.buildModule(module, false, null, null, err => { + if (err) { + this.semaphore.release(); + return errorAndCallback(err); + } + + if (currentProfile) { + const afterBuilding = Date.now(); + currentProfile.building = afterBuilding - afterFactory; + } + + this.semaphore.release(); + afterBuild(); + }); + } else { + this.semaphore.release(); + this.waitForBuildingFinished(module, afterBuild); + } + } + ); + }); + } + + /** + * + * @param {string} context context path for entry + * @param {Dependency} entry entry dependency being created + * @param {string} name name of entry + * @param {ModuleCallback} callback callback function + * @returns {void} returns + */ + addEntry(context, entry, name, callback) { + this.hooks.addEntry.call(entry, name); + + const slot = { + name: name, + // TODO webpack 5 remove `request` + request: null, + module: null + }; + + if (entry instanceof ModuleDependency) { + slot.request = entry.request; + } + + // TODO webpack 5: merge modules instead when multiple entry modules are supported + const idx = this._preparedEntrypoints.findIndex(slot => slot.name === name); + if (idx >= 0) { + // Overwrite existing entrypoint + this._preparedEntrypoints[idx] = slot; + } else { + this._preparedEntrypoints.push(slot); + } + this._addModuleChain( + context, + entry, + module => { + this.entries.push(module); + }, + (err, module) => { + if (err) { + this.hooks.failedEntry.call(entry, name, err); + return callback(err); + } + + if (module) { + slot.module = module; + } else { + const idx = this._preparedEntrypoints.indexOf(slot); + if (idx >= 0) { + this._preparedEntrypoints.splice(idx, 1); + } + } + this.hooks.succeedEntry.call(entry, name, module); + return callback(null, module); + } + ); + } + + /** + * @param {string} context context path string + * @param {Dependency} dependency dep used to create module + * @param {ModuleCallback} callback module callback sending module up a level + * @returns {void} + */ + prefetch(context, dependency, callback) { + this._addModuleChain( + context, + dependency, + module => { + module.prefetched = true; + }, + callback + ); + } + + /** + * @param {Module} module module to be rebuilt + * @param {Callback} thisCallback callback when module finishes rebuilding + * @returns {void} + */ + rebuildModule(module, thisCallback) { + let callbackList = this._rebuildingModules.get(module); + if (callbackList) { + callbackList.push(thisCallback); + return; + } + this._rebuildingModules.set(module, (callbackList = [thisCallback])); + + const callback = err => { + this._rebuildingModules.delete(module); + for (const cb of callbackList) { + cb(err); + } + }; + + this.hooks.rebuildModule.call(module); + const oldDependencies = module.dependencies.slice(); + const oldVariables = module.variables.slice(); + const oldBlocks = module.blocks.slice(); + module.unbuild(); + this.buildModule(module, false, module, null, err => { + if (err) { + this.hooks.finishRebuildingModule.call(module); + return callback(err); + } + + this.processModuleDependencies(module, err => { + if (err) return callback(err); + this.removeReasonsOfDependencyBlock(module, { + dependencies: oldDependencies, + variables: oldVariables, + blocks: oldBlocks + }); + this.hooks.finishRebuildingModule.call(module); + callback(); + }); + }); + } + + finish(callback) { + const modules = this.modules; + this.hooks.finishModules.callAsync(modules, err => { + if (err) return callback(err); + + for (let index = 0; index < modules.length; index++) { + const module = modules[index]; + this.reportDependencyErrorsAndWarnings(module, [module]); + } + + callback(); + }); + } + + unseal() { + this.hooks.unseal.call(); + this.chunks.length = 0; + this.chunkGroups.length = 0; + this.namedChunks.clear(); + this.namedChunkGroups.clear(); + this.additionalChunkAssets.length = 0; + this.assets = {}; + this.assetsInfo.clear(); + for (const module of this.modules) { + module.unseal(); + } + } + + /** + * @param {Callback} callback signals when the seal method is finishes + * @returns {void} + */ + seal(callback) { + this.hooks.seal.call(); + + while ( + this.hooks.optimizeDependenciesBasic.call(this.modules) || + this.hooks.optimizeDependencies.call(this.modules) || + this.hooks.optimizeDependenciesAdvanced.call(this.modules) + ) { + /* empty */ + } + this.hooks.afterOptimizeDependencies.call(this.modules); + + this.hooks.beforeChunks.call(); + for (const preparedEntrypoint of this._preparedEntrypoints) { + const module = preparedEntrypoint.module; + const name = preparedEntrypoint.name; + const chunk = this.addChunk(name); + const entrypoint = new Entrypoint(name); + entrypoint.setRuntimeChunk(chunk); + entrypoint.addOrigin(null, name, preparedEntrypoint.request); + this.namedChunkGroups.set(name, entrypoint); + this.entrypoints.set(name, entrypoint); + this.chunkGroups.push(entrypoint); + + GraphHelpers.connectChunkGroupAndChunk(entrypoint, chunk); + GraphHelpers.connectChunkAndModule(chunk, module); + + chunk.entryModule = module; + chunk.name = name; + + this.assignDepth(module); + } + buildChunkGraph( + this, + /** @type {Entrypoint[]} */ (this.chunkGroups.slice()) + ); + this.sortModules(this.modules); + this.hooks.afterChunks.call(this.chunks); + + this.hooks.optimize.call(); + + while ( + this.hooks.optimizeModulesBasic.call(this.modules) || + this.hooks.optimizeModules.call(this.modules) || + this.hooks.optimizeModulesAdvanced.call(this.modules) + ) { + /* empty */ + } + this.hooks.afterOptimizeModules.call(this.modules); + + while ( + this.hooks.optimizeChunksBasic.call(this.chunks, this.chunkGroups) || + this.hooks.optimizeChunks.call(this.chunks, this.chunkGroups) || + this.hooks.optimizeChunksAdvanced.call(this.chunks, this.chunkGroups) + ) { + /* empty */ + } + this.hooks.afterOptimizeChunks.call(this.chunks, this.chunkGroups); + + this.hooks.optimizeTree.callAsync(this.chunks, this.modules, err => { + if (err) { + return callback(err); + } + + this.hooks.afterOptimizeTree.call(this.chunks, this.modules); + + while ( + this.hooks.optimizeChunkModulesBasic.call(this.chunks, this.modules) || + this.hooks.optimizeChunkModules.call(this.chunks, this.modules) || + this.hooks.optimizeChunkModulesAdvanced.call(this.chunks, this.modules) + ) { + /* empty */ + } + this.hooks.afterOptimizeChunkModules.call(this.chunks, this.modules); + + const shouldRecord = this.hooks.shouldRecord.call() !== false; + + this.hooks.reviveModules.call(this.modules, this.records); + this.hooks.optimizeModuleOrder.call(this.modules); + this.hooks.advancedOptimizeModuleOrder.call(this.modules); + this.hooks.beforeModuleIds.call(this.modules); + this.hooks.moduleIds.call(this.modules); + this.applyModuleIds(); + this.hooks.optimizeModuleIds.call(this.modules); + this.hooks.afterOptimizeModuleIds.call(this.modules); + + this.sortItemsWithModuleIds(); + + this.hooks.reviveChunks.call(this.chunks, this.records); + this.hooks.optimizeChunkOrder.call(this.chunks); + this.hooks.beforeChunkIds.call(this.chunks); + this.applyChunkIds(); + this.hooks.optimizeChunkIds.call(this.chunks); + this.hooks.afterOptimizeChunkIds.call(this.chunks); + + this.sortItemsWithChunkIds(); + + if (shouldRecord) { + this.hooks.recordModules.call(this.modules, this.records); + this.hooks.recordChunks.call(this.chunks, this.records); + } + + this.hooks.beforeHash.call(); + this.createHash(); + this.hooks.afterHash.call(); + + if (shouldRecord) { + this.hooks.recordHash.call(this.records); + } + + this.hooks.beforeModuleAssets.call(); + this.createModuleAssets(); + if (this.hooks.shouldGenerateChunkAssets.call() !== false) { + this.hooks.beforeChunkAssets.call(); + this.createChunkAssets(); + } + this.hooks.additionalChunkAssets.call(this.chunks); + this.summarizeDependencies(); + if (shouldRecord) { + this.hooks.record.call(this, this.records); + } + + this.hooks.additionalAssets.callAsync(err => { + if (err) { + return callback(err); + } + this.hooks.optimizeChunkAssets.callAsync(this.chunks, err => { + if (err) { + return callback(err); + } + this.hooks.afterOptimizeChunkAssets.call(this.chunks); + this.hooks.optimizeAssets.callAsync(this.assets, err => { + if (err) { + return callback(err); + } + this.hooks.afterOptimizeAssets.call(this.assets); + if (this.hooks.needAdditionalSeal.call()) { + this.unseal(); + return this.seal(callback); + } + return this.hooks.afterSeal.callAsync(callback); + }); + }); + }); + }); + } + + /** + * @param {Module[]} modules the modules array on compilation to perform the sort for + * @returns {void} + */ + sortModules(modules) { + // TODO webpack 5: this should only be enabled when `moduleIds: "natural"` + // TODO move it into a plugin (NaturalModuleIdsPlugin) and use this in WebpackOptionsApply + // TODO remove this method + modules.sort(byIndexOrIdentifier); + } + + /** + * @param {Module} module moulde to report from + * @param {DependenciesBlock[]} blocks blocks to report from + * @returns {void} + */ + reportDependencyErrorsAndWarnings(module, blocks) { + for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { + const block = blocks[indexBlock]; + const dependencies = block.dependencies; + + for (let indexDep = 0; indexDep < dependencies.length; indexDep++) { + const d = dependencies[indexDep]; + + const warnings = d.getWarnings(); + if (warnings) { + for (let indexWar = 0; indexWar < warnings.length; indexWar++) { + const w = warnings[indexWar]; + + const warning = new ModuleDependencyWarning(module, w, d.loc); + this.warnings.push(warning); + } + } + const errors = d.getErrors(); + if (errors) { + for (let indexErr = 0; indexErr < errors.length; indexErr++) { + const e = errors[indexErr]; + + const error = new ModuleDependencyError(module, e, d.loc); + this.errors.push(error); + } + } + } + + this.reportDependencyErrorsAndWarnings(module, block.blocks); + } + } + + /** + * @param {TODO} groupOptions options for the chunk group + * @param {Module} module the module the references the chunk group + * @param {DependencyLocation} loc the location from with the chunk group is referenced (inside of module) + * @param {string} request the request from which the the chunk group is referenced + * @returns {ChunkGroup} the new or existing chunk group + */ + addChunkInGroup(groupOptions, module, loc, request) { + if (typeof groupOptions === "string") { + groupOptions = { name: groupOptions }; + } + const name = groupOptions.name; + if (name) { + const chunkGroup = this.namedChunkGroups.get(name); + if (chunkGroup !== undefined) { + chunkGroup.addOptions(groupOptions); + if (module) { + chunkGroup.addOrigin(module, loc, request); + } + return chunkGroup; + } + } + const chunkGroup = new ChunkGroup(groupOptions); + if (module) chunkGroup.addOrigin(module, loc, request); + const chunk = this.addChunk(name); + + GraphHelpers.connectChunkGroupAndChunk(chunkGroup, chunk); + + this.chunkGroups.push(chunkGroup); + if (name) { + this.namedChunkGroups.set(name, chunkGroup); + } + return chunkGroup; + } + + /** + * This method first looks to see if a name is provided for a new chunk, + * and first looks to see if any named chunks already exist and reuse that chunk instead. + * + * @param {string=} name optional chunk name to be provided + * @returns {Chunk} create a chunk (invoked during seal event) + */ + addChunk(name) { + if (name) { + const chunk = this.namedChunks.get(name); + if (chunk !== undefined) { + return chunk; + } + } + const chunk = new Chunk(name); + this.chunks.push(chunk); + if (name) { + this.namedChunks.set(name, chunk); + } + return chunk; + } + + /** + * @param {Module} module module to assign depth + * @returns {void} + */ + assignDepth(module) { + const queue = new Set([module]); + let depth; + + module.depth = 0; + + /** + * @param {Module} module module for processeing + * @returns {void} + */ + const enqueueJob = module => { + const d = module.depth; + if (typeof d === "number" && d <= depth) return; + queue.add(module); + module.depth = depth; + }; + + /** + * @param {Dependency} dependency dependency to assign depth to + * @returns {void} + */ + const assignDepthToDependency = dependency => { + if (dependency.module) { + enqueueJob(dependency.module); + } + }; + + /** + * @param {DependenciesBlock} block block to assign depth to + * @returns {void} + */ + const assignDepthToDependencyBlock = block => { + if (block.variables) { + iterationBlockVariable(block.variables, assignDepthToDependency); + } + + if (block.dependencies) { + iterationOfArrayCallback(block.dependencies, assignDepthToDependency); + } + + if (block.blocks) { + iterationOfArrayCallback(block.blocks, assignDepthToDependencyBlock); + } + }; + + for (module of queue) { + queue.delete(module); + depth = module.depth; + + depth++; + assignDepthToDependencyBlock(module); + } + } + + /** + * @param {Module} module the module containing the dependency + * @param {Dependency} dependency the dependency + * @returns {DependencyReference} a reference for the dependency + */ + getDependencyReference(module, dependency) { + // TODO remove dep.getReference existence check in webpack 5 + if (typeof dependency.getReference !== "function") return null; + const ref = dependency.getReference(); + if (!ref) return null; + return this.hooks.dependencyReference.call(ref, dependency, module); + } + + /** + * + * @param {Module} module module relationship for removal + * @param {DependenciesBlockLike} block //TODO: good description + * @returns {void} + */ + removeReasonsOfDependencyBlock(module, block) { + const iteratorDependency = d => { + if (!d.module) { + return; + } + if (d.module.removeReason(module, d)) { + for (const chunk of d.module.chunksIterable) { + this.patchChunksAfterReasonRemoval(d.module, chunk); + } + } + }; + + if (block.blocks) { + iterationOfArrayCallback(block.blocks, block => + this.removeReasonsOfDependencyBlock(module, block) + ); + } + + if (block.dependencies) { + iterationOfArrayCallback(block.dependencies, iteratorDependency); + } + + if (block.variables) { + iterationBlockVariable(block.variables, iteratorDependency); + } + } + + /** + * @param {Module} module module to patch tie + * @param {Chunk} chunk chunk to patch tie + * @returns {void} + */ + patchChunksAfterReasonRemoval(module, chunk) { + if (!module.hasReasons()) { + this.removeReasonsOfDependencyBlock(module, module); + } + if (!module.hasReasonForChunk(chunk)) { + if (module.removeChunk(chunk)) { + this.removeChunkFromDependencies(module, chunk); + } + } + } + + /** + * + * @param {DependenciesBlock} block block tie for Chunk + * @param {Chunk} chunk chunk to remove from dep + * @returns {void} + */ + removeChunkFromDependencies(block, chunk) { + const iteratorDependency = d => { + if (!d.module) { + return; + } + this.patchChunksAfterReasonRemoval(d.module, chunk); + }; + + const blocks = block.blocks; + for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { + const asyncBlock = blocks[indexBlock]; + // Grab all chunks from the first Block's AsyncDepBlock + const chunks = asyncBlock.chunkGroup.chunks; + // For each chunk in chunkGroup + for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { + const iteratedChunk = chunks[indexChunk]; + asyncBlock.chunkGroup.removeChunk(iteratedChunk); + asyncBlock.chunkGroup.removeParent(iteratedChunk); + // Recurse + this.removeChunkFromDependencies(block, iteratedChunk); + } + } + + if (block.dependencies) { + iterationOfArrayCallback(block.dependencies, iteratorDependency); + } + + if (block.variables) { + iterationBlockVariable(block.variables, iteratorDependency); + } + } + + applyModuleIds() { + const unusedIds = []; + let nextFreeModuleId = 0; + const usedIds = new Set(); + if (this.usedModuleIds) { + for (const id of this.usedModuleIds) { + usedIds.add(id); + } + } + + const modules1 = this.modules; + for (let indexModule1 = 0; indexModule1 < modules1.length; indexModule1++) { + const module1 = modules1[indexModule1]; + if (module1.id !== null) { + usedIds.add(module1.id); + } + } + + if (usedIds.size > 0) { + let usedIdMax = -1; + for (const usedIdKey of usedIds) { + if (typeof usedIdKey !== "number") { + continue; + } + + usedIdMax = Math.max(usedIdMax, usedIdKey); + } + + let lengthFreeModules = (nextFreeModuleId = usedIdMax + 1); + + while (lengthFreeModules--) { + if (!usedIds.has(lengthFreeModules)) { + unusedIds.push(lengthFreeModules); + } + } + } + + const modules2 = this.modules; + for (let indexModule2 = 0; indexModule2 < modules2.length; indexModule2++) { + const module2 = modules2[indexModule2]; + if (module2.id === null) { + if (unusedIds.length > 0) { + module2.id = unusedIds.pop(); + } else { + module2.id = nextFreeModuleId++; + } + } + } + } + + applyChunkIds() { + /** @type {Set} */ + const usedIds = new Set(); + + // Get used ids from usedChunkIds property (i. e. from records) + if (this.usedChunkIds) { + for (const id of this.usedChunkIds) { + if (typeof id !== "number") { + continue; + } + + usedIds.add(id); + } + } + + // Get used ids from existing chunks + const chunks = this.chunks; + for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { + const chunk = chunks[indexChunk]; + const usedIdValue = chunk.id; + + if (typeof usedIdValue !== "number") { + continue; + } + + usedIds.add(usedIdValue); + } + + // Calculate maximum assigned chunk id + let nextFreeChunkId = -1; + for (const id of usedIds) { + nextFreeChunkId = Math.max(nextFreeChunkId, id); + } + nextFreeChunkId++; + + // Determine free chunk ids from 0 to maximum + /** @type {number[]} */ + const unusedIds = []; + if (nextFreeChunkId > 0) { + let index = nextFreeChunkId; + while (index--) { + if (!usedIds.has(index)) { + unusedIds.push(index); + } + } + } + + // Assign ids to chunk which has no id + for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { + const chunk = chunks[indexChunk]; + if (chunk.id === null) { + if (unusedIds.length > 0) { + chunk.id = unusedIds.pop(); + } else { + chunk.id = nextFreeChunkId++; + } + } + if (!chunk.ids) { + chunk.ids = [chunk.id]; + } + } + } + + sortItemsWithModuleIds() { + this.modules.sort(byIdOrIdentifier); + + const modules = this.modules; + for (let indexModule = 0; indexModule < modules.length; indexModule++) { + modules[indexModule].sortItems(false); + } + + const chunks = this.chunks; + for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { + chunks[indexChunk].sortItems(); + } + + chunks.sort((a, b) => a.compareTo(b)); + } + + sortItemsWithChunkIds() { + for (const chunkGroup of this.chunkGroups) { + chunkGroup.sortItems(); + } + + this.chunks.sort(byId); + + for ( + let indexModule = 0; + indexModule < this.modules.length; + indexModule++ + ) { + this.modules[indexModule].sortItems(true); + } + + const chunks = this.chunks; + for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { + chunks[indexChunk].sortItems(); + } + + /** + * Used to sort errors and warnings in compilation. this.warnings, and + * this.errors contribute to the compilation hash and therefore should be + * updated whenever other references (having a chunk id) are sorted. This preserves the hash + * integrity + * + * @param {WebpackError} a first WebpackError instance (including subclasses) + * @param {WebpackError} b second WebpackError instance (including subclasses) + * @returns {-1|0|1} sort order index + */ + const byMessage = (a, b) => { + const ma = `${a.message}`; + const mb = `${b.message}`; + if (ma < mb) return -1; + if (mb < ma) return 1; + return 0; + }; + + this.errors.sort(byMessage); + this.warnings.sort(byMessage); + this.children.sort(byNameOrHash); + } + + summarizeDependencies() { + this.fileDependencies = new SortableSet(this.compilationDependencies); + this.contextDependencies = new SortableSet(); + this.missingDependencies = new SortableSet(); + + for ( + let indexChildren = 0; + indexChildren < this.children.length; + indexChildren++ + ) { + const child = this.children[indexChildren]; + + addAllToSet(this.fileDependencies, child.fileDependencies); + addAllToSet(this.contextDependencies, child.contextDependencies); + addAllToSet(this.missingDependencies, child.missingDependencies); + } + + for ( + let indexModule = 0; + indexModule < this.modules.length; + indexModule++ + ) { + const module = this.modules[indexModule]; + + if (module.buildInfo.fileDependencies) { + addAllToSet(this.fileDependencies, module.buildInfo.fileDependencies); + } + if (module.buildInfo.contextDependencies) { + addAllToSet( + this.contextDependencies, + module.buildInfo.contextDependencies + ); + } + } + for (const error of this.errors) { + if ( + typeof error.missing === "object" && + error.missing && + error.missing[Symbol.iterator] + ) { + addAllToSet(this.missingDependencies, error.missing); + } + } + this.fileDependencies.sort(); + this.contextDependencies.sort(); + this.missingDependencies.sort(); + } + + createHash() { + const outputOptions = this.outputOptions; + const hashFunction = outputOptions.hashFunction; + const hashDigest = outputOptions.hashDigest; + const hashDigestLength = outputOptions.hashDigestLength; + const hash = createHash(hashFunction); + if (outputOptions.hashSalt) { + hash.update(outputOptions.hashSalt); + } + this.mainTemplate.updateHash(hash); + this.chunkTemplate.updateHash(hash); + for (const key of Object.keys(this.moduleTemplates).sort()) { + this.moduleTemplates[key].updateHash(hash); + } + for (const child of this.children) { + hash.update(child.hash); + } + for (const warning of this.warnings) { + hash.update(`${warning.message}`); + } + for (const error of this.errors) { + hash.update(`${error.message}`); + } + const modules = this.modules; + for (let i = 0; i < modules.length; i++) { + const module = modules[i]; + const moduleHash = createHash(hashFunction); + module.updateHash(moduleHash); + module.hash = /** @type {string} */ (moduleHash.digest(hashDigest)); + module.renderedHash = module.hash.substr(0, hashDigestLength); + } + // clone needed as sort below is inplace mutation + const chunks = this.chunks.slice(); + /** + * sort here will bring all "falsy" values to the beginning + * this is needed as the "hasRuntime()" chunks are dependent on the + * hashes of the non-runtime chunks. + */ + chunks.sort((a, b) => { + const aEntry = a.hasRuntime(); + const bEntry = b.hasRuntime(); + if (aEntry && !bEntry) return 1; + if (!aEntry && bEntry) return -1; + return byId(a, b); + }); + for (let i = 0; i < chunks.length; i++) { + const chunk = chunks[i]; + const chunkHash = createHash(hashFunction); + try { + if (outputOptions.hashSalt) { + chunkHash.update(outputOptions.hashSalt); + } + chunk.updateHash(chunkHash); + const template = chunk.hasRuntime() + ? this.mainTemplate + : this.chunkTemplate; + template.updateHashForChunk( + chunkHash, + chunk, + this.moduleTemplates.javascript, + this.dependencyTemplates + ); + this.hooks.chunkHash.call(chunk, chunkHash); + chunk.hash = /** @type {string} */ (chunkHash.digest(hashDigest)); + hash.update(chunk.hash); + chunk.renderedHash = chunk.hash.substr(0, hashDigestLength); + this.hooks.contentHash.call(chunk); + } catch (err) { + this.errors.push(new ChunkRenderError(chunk, "", err)); + } + } + this.fullHash = /** @type {string} */ (hash.digest(hashDigest)); + this.hash = this.fullHash.substr(0, hashDigestLength); + } + + /** + * @param {string} update extra information + * @returns {void} + */ + modifyHash(update) { + const outputOptions = this.outputOptions; + const hashFunction = outputOptions.hashFunction; + const hashDigest = outputOptions.hashDigest; + const hashDigestLength = outputOptions.hashDigestLength; + const hash = createHash(hashFunction); + hash.update(this.fullHash); + hash.update(update); + this.fullHash = /** @type {string} */ (hash.digest(hashDigest)); + this.hash = this.fullHash.substr(0, hashDigestLength); + } + + /** + * @param {string} file file name + * @param {Source} source asset source + * @param {AssetInfo} assetInfo extra asset information + * @returns {void} + */ + emitAsset(file, source, assetInfo = {}) { + if (this.assets[file]) { + if (!isSourceEqual(this.assets[file], source)) { + // TODO webpack 5: make this an error instead + this.warnings.push( + new WebpackError( + `Conflict: Multiple assets emit different content to the same filename ${file}` + ) + ); + this.assets[file] = source; + this.assetsInfo.set(file, assetInfo); + return; + } + const oldInfo = this.assetsInfo.get(file); + this.assetsInfo.set(file, Object.assign({}, oldInfo, assetInfo)); + return; + } + this.assets[file] = source; + this.assetsInfo.set(file, assetInfo); + } + + /** + * @param {string} file file name + * @param {Source | function(Source): Source} newSourceOrFunction new asset source or function converting old to new + * @param {AssetInfo | function(AssetInfo | undefined): AssetInfo} assetInfoUpdateOrFunction new asset info or function converting old to new + */ + updateAsset( + file, + newSourceOrFunction, + assetInfoUpdateOrFunction = undefined + ) { + if (!this.assets[file]) { + throw new Error( + `Called Compilation.updateAsset for not existing filename ${file}` + ); + } + if (typeof newSourceOrFunction === "function") { + this.assets[file] = newSourceOrFunction(this.assets[file]); + } else { + this.assets[file] = newSourceOrFunction; + } + if (assetInfoUpdateOrFunction !== undefined) { + const oldInfo = this.assetsInfo.get(file); + if (typeof assetInfoUpdateOrFunction === "function") { + this.assetsInfo.set(file, assetInfoUpdateOrFunction(oldInfo || {})); + } else { + this.assetsInfo.set( + file, + Object.assign({}, oldInfo, assetInfoUpdateOrFunction) + ); + } + } + } + + getAssets() { + /** @type {Asset[]} */ + const array = []; + for (const assetName of Object.keys(this.assets)) { + if (Object.prototype.hasOwnProperty.call(this.assets, assetName)) { + array.push({ + name: assetName, + source: this.assets[assetName], + info: this.assetsInfo.get(assetName) || {} + }); + } + } + return array; + } + + /** + * @param {string} name the name of the asset + * @returns {Asset | undefined} the asset or undefined when not found + */ + getAsset(name) { + if (!Object.prototype.hasOwnProperty.call(this.assets, name)) + return undefined; + return { + name, + source: this.assets[name], + info: this.assetsInfo.get(name) || {} + }; + } + + createModuleAssets() { + for (let i = 0; i < this.modules.length; i++) { + const module = this.modules[i]; + if (module.buildInfo.assets) { + const assetsInfo = module.buildInfo.assetsInfo; + for (const assetName of Object.keys(module.buildInfo.assets)) { + const fileName = this.getPath(assetName); + this.emitAsset( + fileName, + module.buildInfo.assets[assetName], + assetsInfo ? assetsInfo.get(assetName) : undefined + ); + this.hooks.moduleAsset.call(module, fileName); + } + } + } + } + + createChunkAssets() { + const outputOptions = this.outputOptions; + const cachedSourceMap = new Map(); + /** @type {Map} */ + const alreadyWrittenFiles = new Map(); + for (let i = 0; i < this.chunks.length; i++) { + const chunk = this.chunks[i]; + chunk.files = []; + let source; + let file; + let filenameTemplate; + try { + const template = chunk.hasRuntime() + ? this.mainTemplate + : this.chunkTemplate; + const manifest = template.getRenderManifest({ + chunk, + hash: this.hash, + fullHash: this.fullHash, + outputOptions, + moduleTemplates: this.moduleTemplates, + dependencyTemplates: this.dependencyTemplates + }); // [{ render(), filenameTemplate, pathOptions, identifier, hash }] + for (const fileManifest of manifest) { + const cacheName = fileManifest.identifier; + const usedHash = fileManifest.hash; + filenameTemplate = fileManifest.filenameTemplate; + const pathAndInfo = this.getPathWithInfo( + filenameTemplate, + fileManifest.pathOptions + ); + file = pathAndInfo.path; + const assetInfo = pathAndInfo.info; + + // check if the same filename was already written by another chunk + const alreadyWritten = alreadyWrittenFiles.get(file); + if (alreadyWritten !== undefined) { + if (alreadyWritten.hash === usedHash) { + if (this.cache) { + this.cache[cacheName] = { + hash: usedHash, + source: alreadyWritten.source + }; + } + chunk.files.push(file); + this.hooks.chunkAsset.call(chunk, file); + continue; + } else { + throw new Error( + `Conflict: Multiple chunks emit assets to the same filename ${file}` + + ` (chunks ${alreadyWritten.chunk.id} and ${chunk.id})` + ); + } + } + if ( + this.cache && + this.cache[cacheName] && + this.cache[cacheName].hash === usedHash + ) { + source = this.cache[cacheName].source; + } else { + source = fileManifest.render(); + // Ensure that source is a cached source to avoid additional cost because of repeated access + if (!(source instanceof CachedSource)) { + const cacheEntry = cachedSourceMap.get(source); + if (cacheEntry) { + source = cacheEntry; + } else { + const cachedSource = new CachedSource(source); + cachedSourceMap.set(source, cachedSource); + source = cachedSource; + } + } + if (this.cache) { + this.cache[cacheName] = { + hash: usedHash, + source + }; + } + } + this.emitAsset(file, source, assetInfo); + chunk.files.push(file); + this.hooks.chunkAsset.call(chunk, file); + alreadyWrittenFiles.set(file, { + hash: usedHash, + source, + chunk + }); + } + } catch (err) { + this.errors.push( + new ChunkRenderError(chunk, file || filenameTemplate, err) + ); + } + } + } + + /** + * @param {string} filename used to get asset path with hash + * @param {TODO=} data // TODO: figure out this param type + * @returns {string} interpolated path + */ + getPath(filename, data) { + data = data || {}; + data.hash = data.hash || this.hash; + return this.mainTemplate.getAssetPath(filename, data); + } + + /** + * @param {string} filename used to get asset path with hash + * @param {TODO=} data // TODO: figure out this param type + * @returns {{ path: string, info: AssetInfo }} interpolated path and asset info + */ + getPathWithInfo(filename, data) { + data = data || {}; + data.hash = data.hash || this.hash; + return this.mainTemplate.getAssetPathWithInfo(filename, data); + } + + /** + * This function allows you to run another instance of webpack inside of webpack however as + * a child with different settings and configurations (if desired) applied. It copies all hooks, plugins + * from parent (or top level compiler) and creates a child Compilation + * + * @param {string} name name of the child compiler + * @param {TODO} outputOptions // Need to convert config schema to types for this + * @param {Plugin[]} plugins webpack plugins that will be applied + * @returns {Compiler} creates a child Compiler instance + */ + createChildCompiler(name, outputOptions, plugins) { + const idx = this.childrenCounters[name] || 0; + this.childrenCounters[name] = idx + 1; + return this.compiler.createChildCompiler( + this, + name, + idx, + outputOptions, + plugins + ); + } + + checkConstraints() { + /** @type {Set} */ + const usedIds = new Set(); + + const modules = this.modules; + for (let indexModule = 0; indexModule < modules.length; indexModule++) { + const moduleId = modules[indexModule].id; + if (moduleId === null) continue; + if (usedIds.has(moduleId)) { + throw new Error(`checkConstraints: duplicate module id ${moduleId}`); + } + usedIds.add(moduleId); + } + + const chunks = this.chunks; + for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { + const chunk = chunks[indexChunk]; + if (chunks.indexOf(chunk) !== indexChunk) { + throw new Error( + `checkConstraints: duplicate chunk in compilation ${chunk.debugId}` + ); + } + } + + for (const chunkGroup of this.chunkGroups) { + chunkGroup.checkConstraints(); + } + } +} + +// TODO remove in webpack 5 +Compilation.prototype.applyPlugins = util.deprecate( + /** + * @deprecated + * @param {string} name Name + * @param {any[]} args Other arguments + * @returns {void} + * @this {Compilation} + */ + function(name, ...args) { + this.hooks[ + name.replace(/[- ]([a-z])/g, match => match[1].toUpperCase()) + ].call(...args); + }, + "Compilation.applyPlugins is deprecated. Use new API on `.hooks` instead" +); + +// TODO remove in webpack 5 +Object.defineProperty(Compilation.prototype, "moduleTemplate", { + configurable: false, + get: util.deprecate( + /** + * @deprecated + * @this {Compilation} + * @returns {TODO} module template + */ + function() { + return this.moduleTemplates.javascript; + }, + "Compilation.moduleTemplate: Use Compilation.moduleTemplates.javascript instead" + ), + set: util.deprecate( + /** + * @deprecated + * @param {ModuleTemplate} value Template value + * @this {Compilation} + * @returns {void} + */ + function(value) { + this.moduleTemplates.javascript = value; + }, + "Compilation.moduleTemplate: Use Compilation.moduleTemplates.javascript instead." + ) +}); + +module.exports = Compilation; + + +/***/ }), + +/***/ 58705: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const parseJson = __webpack_require__(48335); +const asyncLib = __webpack_require__(36386); +const path = __webpack_require__(85622); +const { Source } = __webpack_require__(53665); +const util = __webpack_require__(31669); +const { + Tapable, + SyncHook, + SyncBailHook, + AsyncParallelHook, + AsyncSeriesHook +} = __webpack_require__(92402); + +const Compilation = __webpack_require__(34968); +const Stats = __webpack_require__(99977); +const Watching = __webpack_require__(29580); +const NormalModuleFactory = __webpack_require__(22298); +const ContextModuleFactory = __webpack_require__(88239); +const ResolverFactory = __webpack_require__(50588); + +const RequestShortener = __webpack_require__(54254); +const { makePathsRelative } = __webpack_require__(94658); +const ConcurrentCompilationError = __webpack_require__(18933); +const { Logger } = __webpack_require__(47194); + +/** @typedef {import("../declarations/WebpackOptions").Entry} Entry */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} WebpackOptions */ + +/** + * @typedef {Object} CompilationParams + * @property {NormalModuleFactory} normalModuleFactory + * @property {ContextModuleFactory} contextModuleFactory + * @property {Set} compilationDependencies + */ + +class Compiler extends Tapable { + constructor(context) { + super(); + this.hooks = { + /** @type {SyncBailHook} */ + shouldEmit: new SyncBailHook(["compilation"]), + /** @type {AsyncSeriesHook} */ + done: new AsyncSeriesHook(["stats"]), + /** @type {AsyncSeriesHook<>} */ + additionalPass: new AsyncSeriesHook([]), + /** @type {AsyncSeriesHook} */ + beforeRun: new AsyncSeriesHook(["compiler"]), + /** @type {AsyncSeriesHook} */ + run: new AsyncSeriesHook(["compiler"]), + /** @type {AsyncSeriesHook} */ + emit: new AsyncSeriesHook(["compilation"]), + /** @type {AsyncSeriesHook} */ + assetEmitted: new AsyncSeriesHook(["file", "content"]), + /** @type {AsyncSeriesHook} */ + afterEmit: new AsyncSeriesHook(["compilation"]), + + /** @type {SyncHook} */ + thisCompilation: new SyncHook(["compilation", "params"]), + /** @type {SyncHook} */ + compilation: new SyncHook(["compilation", "params"]), + /** @type {SyncHook} */ + normalModuleFactory: new SyncHook(["normalModuleFactory"]), + /** @type {SyncHook} */ + contextModuleFactory: new SyncHook(["contextModulefactory"]), + + /** @type {AsyncSeriesHook} */ + beforeCompile: new AsyncSeriesHook(["params"]), + /** @type {SyncHook} */ + compile: new SyncHook(["params"]), + /** @type {AsyncParallelHook} */ + make: new AsyncParallelHook(["compilation"]), + /** @type {AsyncSeriesHook} */ + afterCompile: new AsyncSeriesHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ + watchRun: new AsyncSeriesHook(["compiler"]), + /** @type {SyncHook} */ + failed: new SyncHook(["error"]), + /** @type {SyncHook} */ + invalid: new SyncHook(["filename", "changeTime"]), + /** @type {SyncHook} */ + watchClose: new SyncHook([]), + + /** @type {SyncBailHook} */ + infrastructureLog: new SyncBailHook(["origin", "type", "args"]), + + // TODO the following hooks are weirdly located here + // TODO move them for webpack 5 + /** @type {SyncHook} */ + environment: new SyncHook([]), + /** @type {SyncHook} */ + afterEnvironment: new SyncHook([]), + /** @type {SyncHook} */ + afterPlugins: new SyncHook(["compiler"]), + /** @type {SyncHook} */ + afterResolvers: new SyncHook(["compiler"]), + /** @type {SyncBailHook} */ + entryOption: new SyncBailHook(["context", "entry"]) + }; + // TODO webpack 5 remove this + this.hooks.infrastructurelog = this.hooks.infrastructureLog; + + this._pluginCompat.tap("Compiler", options => { + switch (options.name) { + case "additional-pass": + case "before-run": + case "run": + case "emit": + case "after-emit": + case "before-compile": + case "make": + case "after-compile": + case "watch-run": + options.async = true; + break; + } + }); + + /** @type {string=} */ + this.name = undefined; + /** @type {Compilation=} */ + this.parentCompilation = undefined; + /** @type {string} */ + this.outputPath = ""; + + this.outputFileSystem = null; + this.inputFileSystem = null; + + /** @type {string|null} */ + this.recordsInputPath = null; + /** @type {string|null} */ + this.recordsOutputPath = null; + this.records = {}; + this.removedFiles = new Set(); + /** @type {Map} */ + this.fileTimestamps = new Map(); + /** @type {Map} */ + this.contextTimestamps = new Map(); + /** @type {ResolverFactory} */ + this.resolverFactory = new ResolverFactory(); + + this.infrastructureLogger = undefined; + + // TODO remove in webpack 5 + this.resolvers = { + normal: { + plugins: util.deprecate((hook, fn) => { + this.resolverFactory.plugin("resolver normal", resolver => { + resolver.plugin(hook, fn); + }); + }, "webpack: Using compiler.resolvers.normal is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver normal", resolver => {\n resolver.plugin(/* … */);\n}); instead.'), + apply: util.deprecate((...args) => { + this.resolverFactory.plugin("resolver normal", resolver => { + resolver.apply(...args); + }); + }, "webpack: Using compiler.resolvers.normal is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver normal", resolver => {\n resolver.apply(/* … */);\n}); instead.') + }, + loader: { + plugins: util.deprecate((hook, fn) => { + this.resolverFactory.plugin("resolver loader", resolver => { + resolver.plugin(hook, fn); + }); + }, "webpack: Using compiler.resolvers.loader is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver loader", resolver => {\n resolver.plugin(/* … */);\n}); instead.'), + apply: util.deprecate((...args) => { + this.resolverFactory.plugin("resolver loader", resolver => { + resolver.apply(...args); + }); + }, "webpack: Using compiler.resolvers.loader is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver loader", resolver => {\n resolver.apply(/* … */);\n}); instead.') + }, + context: { + plugins: util.deprecate((hook, fn) => { + this.resolverFactory.plugin("resolver context", resolver => { + resolver.plugin(hook, fn); + }); + }, "webpack: Using compiler.resolvers.context is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver context", resolver => {\n resolver.plugin(/* … */);\n}); instead.'), + apply: util.deprecate((...args) => { + this.resolverFactory.plugin("resolver context", resolver => { + resolver.apply(...args); + }); + }, "webpack: Using compiler.resolvers.context is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver context", resolver => {\n resolver.apply(/* … */);\n}); instead.') + } + }; + + /** @type {WebpackOptions} */ + this.options = /** @type {WebpackOptions} */ ({}); + + this.context = context; + + this.requestShortener = new RequestShortener(context); + + /** @type {boolean} */ + this.running = false; + + /** @type {boolean} */ + this.watchMode = false; + + /** @private @type {WeakMap }>} */ + this._assetEmittingSourceCache = new WeakMap(); + /** @private @type {Map} */ + this._assetEmittingWrittenFiles = new Map(); + } + + /** + * @param {string | (function(): string)} name name of the logger, or function called once to get the logger name + * @returns {Logger} a logger with that name + */ + getInfrastructureLogger(name) { + if (!name) { + throw new TypeError( + "Compiler.getInfrastructureLogger(name) called without a name" + ); + } + return new Logger((type, args) => { + if (typeof name === "function") { + name = name(); + if (!name) { + throw new TypeError( + "Compiler.getInfrastructureLogger(name) called with a function not returning a name" + ); + } + } + if (this.hooks.infrastructureLog.call(name, type, args) === undefined) { + if (this.infrastructureLogger !== undefined) { + this.infrastructureLogger(name, type, args); + } + } + }); + } + + watch(watchOptions, handler) { + if (this.running) return handler(new ConcurrentCompilationError()); + + this.running = true; + this.watchMode = true; + this.fileTimestamps = new Map(); + this.contextTimestamps = new Map(); + this.removedFiles = new Set(); + return new Watching(this, watchOptions, handler); + } + + run(callback) { + if (this.running) return callback(new ConcurrentCompilationError()); + + const finalCallback = (err, stats) => { + this.running = false; + + if (err) { + this.hooks.failed.call(err); + } + + if (callback !== undefined) return callback(err, stats); + }; + + const startTime = Date.now(); + + this.running = true; + + const onCompiled = (err, compilation) => { + if (err) return finalCallback(err); + + if (this.hooks.shouldEmit.call(compilation) === false) { + const stats = new Stats(compilation); + stats.startTime = startTime; + stats.endTime = Date.now(); + this.hooks.done.callAsync(stats, err => { + if (err) return finalCallback(err); + return finalCallback(null, stats); + }); + return; + } + + this.emitAssets(compilation, err => { + if (err) return finalCallback(err); + + if (compilation.hooks.needAdditionalPass.call()) { + compilation.needAdditionalPass = true; + + const stats = new Stats(compilation); + stats.startTime = startTime; + stats.endTime = Date.now(); + this.hooks.done.callAsync(stats, err => { + if (err) return finalCallback(err); + + this.hooks.additionalPass.callAsync(err => { + if (err) return finalCallback(err); + this.compile(onCompiled); + }); + }); + return; + } + + this.emitRecords(err => { + if (err) return finalCallback(err); + + const stats = new Stats(compilation); + stats.startTime = startTime; + stats.endTime = Date.now(); + this.hooks.done.callAsync(stats, err => { + if (err) return finalCallback(err); + return finalCallback(null, stats); + }); + }); + }); + }; + + this.hooks.beforeRun.callAsync(this, err => { + if (err) return finalCallback(err); + + this.hooks.run.callAsync(this, err => { + if (err) return finalCallback(err); + + this.readRecords(err => { + if (err) return finalCallback(err); + + this.compile(onCompiled); + }); + }); + }); + } + + runAsChild(callback) { + this.compile((err, compilation) => { + if (err) return callback(err); + + this.parentCompilation.children.push(compilation); + for (const { name, source, info } of compilation.getAssets()) { + this.parentCompilation.emitAsset(name, source, info); + } + + const entries = Array.from( + compilation.entrypoints.values(), + ep => ep.chunks + ).reduce((array, chunks) => { + return array.concat(chunks); + }, []); + + return callback(null, entries, compilation); + }); + } + + purgeInputFileSystem() { + if (this.inputFileSystem && this.inputFileSystem.purge) { + this.inputFileSystem.purge(); + } + } + + emitAssets(compilation, callback) { + let outputPath; + const emitFiles = err => { + if (err) return callback(err); + + asyncLib.forEachLimit( + compilation.getAssets(), + 15, + ({ name: file, source }, callback) => { + let targetFile = file; + const queryStringIdx = targetFile.indexOf("?"); + if (queryStringIdx >= 0) { + targetFile = targetFile.substr(0, queryStringIdx); + } + + const writeOut = err => { + if (err) return callback(err); + const targetPath = this.outputFileSystem.join( + outputPath, + targetFile + ); + // TODO webpack 5 remove futureEmitAssets option and make it on by default + if (this.options.output.futureEmitAssets) { + // check if the target file has already been written by this Compiler + const targetFileGeneration = this._assetEmittingWrittenFiles.get( + targetPath + ); + + // create an cache entry for this Source if not already existing + let cacheEntry = this._assetEmittingSourceCache.get(source); + if (cacheEntry === undefined) { + cacheEntry = { + sizeOnlySource: undefined, + writtenTo: new Map() + }; + this._assetEmittingSourceCache.set(source, cacheEntry); + } + + // if the target file has already been written + if (targetFileGeneration !== undefined) { + // check if the Source has been written to this target file + const writtenGeneration = cacheEntry.writtenTo.get(targetPath); + if (writtenGeneration === targetFileGeneration) { + // if yes, we skip writing the file + // as it's already there + // (we assume one doesn't remove files while the Compiler is running) + + compilation.updateAsset(file, cacheEntry.sizeOnlySource, { + size: cacheEntry.sizeOnlySource.size() + }); + + return callback(); + } + } + + // TODO webpack 5: if info.immutable check if file already exists in output + // skip emitting if it's already there + + // get the binary (Buffer) content from the Source + /** @type {Buffer} */ + let content; + if (typeof source.buffer === "function") { + content = source.buffer(); + } else { + const bufferOrString = source.source(); + if (Buffer.isBuffer(bufferOrString)) { + content = bufferOrString; + } else { + content = Buffer.from(bufferOrString, "utf8"); + } + } + + // Create a replacement resource which only allows to ask for size + // This allows to GC all memory allocated by the Source + // (expect when the Source is stored in any other cache) + cacheEntry.sizeOnlySource = new SizeOnlySource(content.length); + compilation.updateAsset(file, cacheEntry.sizeOnlySource, { + size: content.length + }); + + // Write the file to output file system + this.outputFileSystem.writeFile(targetPath, content, err => { + if (err) return callback(err); + + // information marker that the asset has been emitted + compilation.emittedAssets.add(file); + + // cache the information that the Source has been written to that location + const newGeneration = + targetFileGeneration === undefined + ? 1 + : targetFileGeneration + 1; + cacheEntry.writtenTo.set(targetPath, newGeneration); + this._assetEmittingWrittenFiles.set(targetPath, newGeneration); + this.hooks.assetEmitted.callAsync(file, content, callback); + }); + } else { + if (source.existsAt === targetPath) { + source.emitted = false; + return callback(); + } + let content = source.source(); + + if (!Buffer.isBuffer(content)) { + content = Buffer.from(content, "utf8"); + } + + source.existsAt = targetPath; + source.emitted = true; + this.outputFileSystem.writeFile(targetPath, content, err => { + if (err) return callback(err); + this.hooks.assetEmitted.callAsync(file, content, callback); + }); + } + }; + + if (targetFile.match(/\/|\\/)) { + const dir = path.dirname(targetFile); + this.outputFileSystem.mkdirp( + this.outputFileSystem.join(outputPath, dir), + writeOut + ); + } else { + writeOut(); + } + }, + err => { + if (err) return callback(err); + + this.hooks.afterEmit.callAsync(compilation, err => { + if (err) return callback(err); + + return callback(); + }); + } + ); + }; + + this.hooks.emit.callAsync(compilation, err => { + if (err) return callback(err); + outputPath = compilation.getPath(this.outputPath); + this.outputFileSystem.mkdirp(outputPath, emitFiles); + }); + } + + emitRecords(callback) { + if (!this.recordsOutputPath) return callback(); + const idx1 = this.recordsOutputPath.lastIndexOf("/"); + const idx2 = this.recordsOutputPath.lastIndexOf("\\"); + let recordsOutputPathDirectory = null; + if (idx1 > idx2) { + recordsOutputPathDirectory = this.recordsOutputPath.substr(0, idx1); + } else if (idx1 < idx2) { + recordsOutputPathDirectory = this.recordsOutputPath.substr(0, idx2); + } + + const writeFile = () => { + this.outputFileSystem.writeFile( + this.recordsOutputPath, + JSON.stringify(this.records, undefined, 2), + callback + ); + }; + + if (!recordsOutputPathDirectory) { + return writeFile(); + } + this.outputFileSystem.mkdirp(recordsOutputPathDirectory, err => { + if (err) return callback(err); + writeFile(); + }); + } + + readRecords(callback) { + if (!this.recordsInputPath) { + this.records = {}; + return callback(); + } + this.inputFileSystem.stat(this.recordsInputPath, err => { + // It doesn't exist + // We can ignore this. + if (err) return callback(); + + this.inputFileSystem.readFile(this.recordsInputPath, (err, content) => { + if (err) return callback(err); + + try { + this.records = parseJson(content.toString("utf-8")); + } catch (e) { + e.message = "Cannot parse records: " + e.message; + return callback(e); + } + + return callback(); + }); + }); + } + + createChildCompiler( + compilation, + compilerName, + compilerIndex, + outputOptions, + plugins + ) { + const childCompiler = new Compiler(this.context); + if (Array.isArray(plugins)) { + for (const plugin of plugins) { + plugin.apply(childCompiler); + } + } + for (const name in this.hooks) { + if ( + ![ + "make", + "compile", + "emit", + "afterEmit", + "invalid", + "done", + "thisCompilation" + ].includes(name) + ) { + if (childCompiler.hooks[name]) { + childCompiler.hooks[name].taps = this.hooks[name].taps.slice(); + } + } + } + childCompiler.name = compilerName; + childCompiler.outputPath = this.outputPath; + childCompiler.inputFileSystem = this.inputFileSystem; + childCompiler.outputFileSystem = null; + childCompiler.resolverFactory = this.resolverFactory; + childCompiler.fileTimestamps = this.fileTimestamps; + childCompiler.contextTimestamps = this.contextTimestamps; + + const relativeCompilerName = makePathsRelative(this.context, compilerName); + if (!this.records[relativeCompilerName]) { + this.records[relativeCompilerName] = []; + } + if (this.records[relativeCompilerName][compilerIndex]) { + childCompiler.records = this.records[relativeCompilerName][compilerIndex]; + } else { + this.records[relativeCompilerName].push((childCompiler.records = {})); + } + + childCompiler.options = Object.create(this.options); + childCompiler.options.output = Object.create(childCompiler.options.output); + for (const name in outputOptions) { + childCompiler.options.output[name] = outputOptions[name]; + } + childCompiler.parentCompilation = compilation; + + compilation.hooks.childCompiler.call( + childCompiler, + compilerName, + compilerIndex + ); + + return childCompiler; + } + + isChild() { + return !!this.parentCompilation; + } + + createCompilation() { + return new Compilation(this); + } + + newCompilation(params) { + const compilation = this.createCompilation(); + compilation.fileTimestamps = this.fileTimestamps; + compilation.contextTimestamps = this.contextTimestamps; + compilation.name = this.name; + compilation.records = this.records; + compilation.compilationDependencies = params.compilationDependencies; + this.hooks.thisCompilation.call(compilation, params); + this.hooks.compilation.call(compilation, params); + return compilation; + } + + createNormalModuleFactory() { + const normalModuleFactory = new NormalModuleFactory( + this.options.context, + this.resolverFactory, + this.options.module || {} + ); + this.hooks.normalModuleFactory.call(normalModuleFactory); + return normalModuleFactory; + } + + createContextModuleFactory() { + const contextModuleFactory = new ContextModuleFactory(this.resolverFactory); + this.hooks.contextModuleFactory.call(contextModuleFactory); + return contextModuleFactory; + } + + newCompilationParams() { + const params = { + normalModuleFactory: this.createNormalModuleFactory(), + contextModuleFactory: this.createContextModuleFactory(), + compilationDependencies: new Set() + }; + return params; + } + + compile(callback) { + const params = this.newCompilationParams(); + this.hooks.beforeCompile.callAsync(params, err => { + if (err) return callback(err); + + this.hooks.compile.call(params); + + const compilation = this.newCompilation(params); + + this.hooks.make.callAsync(compilation, err => { + if (err) return callback(err); + + compilation.finish(err => { + if (err) return callback(err); + + compilation.seal(err => { + if (err) return callback(err); + + this.hooks.afterCompile.callAsync(compilation, err => { + if (err) return callback(err); + + return callback(null, compilation); + }); + }); + }); + }); + }); + } +} + +module.exports = Compiler; + +class SizeOnlySource extends Source { + constructor(size) { + super(); + this._size = size; + } + + _error() { + return new Error( + "Content and Map of this Source is no longer available (only size() is supported)" + ); + } + + size() { + return this._size; + } + + /** + * @param {any} options options + * @returns {string} the source + */ + source(options) { + throw this._error(); + } + + node() { + throw this._error(); + } + + listMap() { + throw this._error(); + } + + map() { + throw this._error(); + } + + listNode() { + throw this._error(); + } + + updateHash() { + throw this._error(); + } +} + + +/***/ }), + +/***/ 18933: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Maksim Nazarjev @acupofspirt +*/ + + +const WebpackError = __webpack_require__(97391); + +module.exports = class ConcurrentCompilationError extends WebpackError { + constructor() { + super(); + + this.name = "ConcurrentCompilationError"; + this.message = + "You ran Webpack twice. Each instance only supports a single concurrent compilation at a time."; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 84072: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ConstDependency = __webpack_require__(71101); +const NullFactory = __webpack_require__(40438); +const ParserHelpers = __webpack_require__(23999); + +const getQuery = request => { + const i = request.indexOf("?"); + return i !== -1 ? request.substr(i) : ""; +}; + +const collectDeclaration = (declarations, pattern) => { + const stack = [pattern]; + while (stack.length > 0) { + const node = stack.pop(); + switch (node.type) { + case "Identifier": + declarations.add(node.name); + break; + case "ArrayPattern": + for (const element of node.elements) { + if (element) { + stack.push(element); + } + } + break; + case "AssignmentPattern": + stack.push(node.left); + break; + case "ObjectPattern": + for (const property of node.properties) { + stack.push(property.value); + } + break; + case "RestElement": + stack.push(node.argument); + break; + } + } +}; + +const getHoistedDeclarations = (branch, includeFunctionDeclarations) => { + const declarations = new Set(); + const stack = [branch]; + while (stack.length > 0) { + const node = stack.pop(); + // Some node could be `null` or `undefined`. + if (!node) continue; + switch (node.type) { + // Walk through control statements to look for hoisted declarations. + // Some branches are skipped since they do not allow declarations. + case "BlockStatement": + for (const stmt of node.body) { + stack.push(stmt); + } + break; + case "IfStatement": + stack.push(node.consequent); + stack.push(node.alternate); + break; + case "ForStatement": + stack.push(node.init); + stack.push(node.body); + break; + case "ForInStatement": + case "ForOfStatement": + stack.push(node.left); + stack.push(node.body); + break; + case "DoWhileStatement": + case "WhileStatement": + case "LabeledStatement": + stack.push(node.body); + break; + case "SwitchStatement": + for (const cs of node.cases) { + for (const consequent of cs.consequent) { + stack.push(consequent); + } + } + break; + case "TryStatement": + stack.push(node.block); + if (node.handler) { + stack.push(node.handler.body); + } + stack.push(node.finalizer); + break; + case "FunctionDeclaration": + if (includeFunctionDeclarations) { + collectDeclaration(declarations, node.id); + } + break; + case "VariableDeclaration": + if (node.kind === "var") { + for (const decl of node.declarations) { + collectDeclaration(declarations, decl.id); + } + } + break; + } + } + return Array.from(declarations); +}; + +class ConstPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "ConstPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set(ConstDependency, new NullFactory()); + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + const handler = parser => { + parser.hooks.statementIf.tap("ConstPlugin", statement => { + if (parser.scope.isAsmJs) return; + const param = parser.evaluateExpression(statement.test); + const bool = param.asBool(); + if (typeof bool === "boolean") { + if (statement.test.type !== "Literal") { + const dep = new ConstDependency(`${bool}`, param.range); + dep.loc = statement.loc; + parser.state.current.addDependency(dep); + } + const branchToRemove = bool + ? statement.alternate + : statement.consequent; + if (branchToRemove) { + // Before removing the dead branch, the hoisted declarations + // must be collected. + // + // Given the following code: + // + // if (true) f() else g() + // if (false) { + // function f() {} + // const g = function g() {} + // if (someTest) { + // let a = 1 + // var x, {y, z} = obj + // } + // } else { + // … + // } + // + // the generated code is: + // + // if (true) f() else {} + // if (false) { + // var f, x, y, z; (in loose mode) + // var x, y, z; (in strict mode) + // } else { + // … + // } + // + // NOTE: When code runs in strict mode, `var` declarations + // are hoisted but `function` declarations don't. + // + let declarations; + if (parser.scope.isStrict) { + // If the code runs in strict mode, variable declarations + // using `var` must be hoisted. + declarations = getHoistedDeclarations(branchToRemove, false); + } else { + // Otherwise, collect all hoisted declaration. + declarations = getHoistedDeclarations(branchToRemove, true); + } + let replacement; + if (declarations.length > 0) { + replacement = `{ var ${declarations.join(", ")}; }`; + } else { + replacement = "{}"; + } + const dep = new ConstDependency( + replacement, + branchToRemove.range + ); + dep.loc = branchToRemove.loc; + parser.state.current.addDependency(dep); + } + return bool; + } + }); + parser.hooks.expressionConditionalOperator.tap( + "ConstPlugin", + expression => { + if (parser.scope.isAsmJs) return; + const param = parser.evaluateExpression(expression.test); + const bool = param.asBool(); + if (typeof bool === "boolean") { + if (expression.test.type !== "Literal") { + const dep = new ConstDependency(` ${bool}`, param.range); + dep.loc = expression.loc; + parser.state.current.addDependency(dep); + } + // Expressions do not hoist. + // It is safe to remove the dead branch. + // + // Given the following code: + // + // false ? someExpression() : otherExpression(); + // + // the generated code is: + // + // false ? undefined : otherExpression(); + // + const branchToRemove = bool + ? expression.alternate + : expression.consequent; + const dep = new ConstDependency( + "undefined", + branchToRemove.range + ); + dep.loc = branchToRemove.loc; + parser.state.current.addDependency(dep); + return bool; + } + } + ); + parser.hooks.expressionLogicalOperator.tap( + "ConstPlugin", + expression => { + if (parser.scope.isAsmJs) return; + if ( + expression.operator === "&&" || + expression.operator === "||" + ) { + const param = parser.evaluateExpression(expression.left); + const bool = param.asBool(); + if (typeof bool === "boolean") { + // Expressions do not hoist. + // It is safe to remove the dead branch. + // + // ------------------------------------------ + // + // Given the following code: + // + // falsyExpression() && someExpression(); + // + // the generated code is: + // + // falsyExpression() && false; + // + // ------------------------------------------ + // + // Given the following code: + // + // truthyExpression() && someExpression(); + // + // the generated code is: + // + // true && someExpression(); + // + // ------------------------------------------ + // + // Given the following code: + // + // truthyExpression() || someExpression(); + // + // the generated code is: + // + // truthyExpression() || false; + // + // ------------------------------------------ + // + // Given the following code: + // + // falsyExpression() || someExpression(); + // + // the generated code is: + // + // false && someExpression(); + // + const keepRight = + (expression.operator === "&&" && bool) || + (expression.operator === "||" && !bool); + + if (param.isBoolean() || keepRight) { + // for case like + // + // return'development'===process.env.NODE_ENV&&'foo' + // + // we need a space before the bool to prevent result like + // + // returnfalse&&'foo' + // + const dep = new ConstDependency(` ${bool}`, param.range); + dep.loc = expression.loc; + parser.state.current.addDependency(dep); + } else { + parser.walkExpression(expression.left); + } + if (!keepRight) { + const dep = new ConstDependency( + "false", + expression.right.range + ); + dep.loc = expression.loc; + parser.state.current.addDependency(dep); + } + return keepRight; + } + } + } + ); + parser.hooks.evaluateIdentifier + .for("__resourceQuery") + .tap("ConstPlugin", expr => { + if (parser.scope.isAsmJs) return; + if (!parser.state.module) return; + return ParserHelpers.evaluateToString( + getQuery(parser.state.module.resource) + )(expr); + }); + parser.hooks.expression + .for("__resourceQuery") + .tap("ConstPlugin", () => { + if (parser.scope.isAsmJs) return; + if (!parser.state.module) return; + parser.state.current.addVariable( + "__resourceQuery", + JSON.stringify(getQuery(parser.state.module.resource)) + ); + return true; + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("ConstPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("ConstPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("ConstPlugin", handler); + } + ); + } +} + +module.exports = ConstPlugin; + + +/***/ }), + +/***/ 10706: +/***/ (function(module) { + +"use strict"; + + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./ContextModuleFactory")} ContextModuleFactory */ + +class ContextExclusionPlugin { + /** + * @param {RegExp} negativeMatcher Matcher regular expression + */ + constructor(negativeMatcher) { + this.negativeMatcher = negativeMatcher; + } + + /** + * Apply the plugin + * @param {Compiler} compiler Webpack Compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.contextModuleFactory.tap("ContextExclusionPlugin", cmf => { + cmf.hooks.contextModuleFiles.tap("ContextExclusionPlugin", files => { + return files.filter(filePath => !this.negativeMatcher.test(filePath)); + }); + }); + } +} + +module.exports = ContextExclusionPlugin; + + +/***/ }), + +/***/ 20090: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const util = __webpack_require__(31669); +const { OriginalSource, RawSource } = __webpack_require__(53665); +const Module = __webpack_require__(75993); +const AsyncDependenciesBlock = __webpack_require__(22814); +const Template = __webpack_require__(96066); +const contextify = __webpack_require__(94658).contextify; + +/** @typedef {"sync" | "eager" | "weak" | "async-weak" | "lazy" | "lazy-once"} ContextMode Context mode */ +/** @typedef {import("./dependencies/ContextElementDependency")} ContextElementDependency */ + +/** + * @callback ResolveDependenciesCallback + * @param {Error=} err + * @param {ContextElementDependency[]} dependencies + */ + +/** + * @callback ResolveDependencies + * @param {TODO} fs + * @param {TODO} options + * @param {ResolveDependenciesCallback} callback + */ + +class ContextModule extends Module { + // type ContextMode = "sync" | "eager" | "weak" | "async-weak" | "lazy" | "lazy-once" + // type ContextOptions = { resource: string, recursive: boolean, regExp: RegExp, addon?: string, mode?: ContextMode, chunkName?: string, include?: RegExp, exclude?: RegExp, groupOptions?: Object } + // resolveDependencies: (fs: FS, options: ContextOptions, (err: Error?, dependencies: Dependency[]) => void) => void + // options: ContextOptions + /** + * @param {ResolveDependencies} resolveDependencies function to get dependencies in this context + * @param {TODO} options options object + */ + constructor(resolveDependencies, options) { + let resource; + let resourceQuery; + const queryIdx = options.resource.indexOf("?"); + if (queryIdx >= 0) { + resource = options.resource.substr(0, queryIdx); + resourceQuery = options.resource.substr(queryIdx); + } else { + resource = options.resource; + resourceQuery = ""; + } + + super("javascript/dynamic", resource); + + // Info from Factory + this.resolveDependencies = resolveDependencies; + this.options = Object.assign({}, options, { + resource: resource, + resourceQuery: resourceQuery + }); + if (options.resolveOptions !== undefined) { + this.resolveOptions = options.resolveOptions; + } + + // Info from Build + this._contextDependencies = new Set([this.context]); + + if (typeof options.mode !== "string") { + throw new Error("options.mode is a required option"); + } + + this._identifier = this._createIdentifier(); + } + + updateCacheModule(module) { + this.resolveDependencies = module.resolveDependencies; + this.options = module.options; + this.resolveOptions = module.resolveOptions; + } + + prettyRegExp(regexString) { + // remove the "/" at the front and the beginning + // "/foo/" -> "foo" + return regexString.substring(1, regexString.length - 1); + } + + _createIdentifier() { + let identifier = this.context; + if (this.options.resourceQuery) { + identifier += ` ${this.options.resourceQuery}`; + } + if (this.options.mode) { + identifier += ` ${this.options.mode}`; + } + if (!this.options.recursive) { + identifier += " nonrecursive"; + } + if (this.options.addon) { + identifier += ` ${this.options.addon}`; + } + if (this.options.regExp) { + identifier += ` ${this.options.regExp}`; + } + if (this.options.include) { + identifier += ` include: ${this.options.include}`; + } + if (this.options.exclude) { + identifier += ` exclude: ${this.options.exclude}`; + } + if (this.options.groupOptions) { + identifier += ` groupOptions: ${JSON.stringify( + this.options.groupOptions + )}`; + } + if (this.options.namespaceObject === "strict") { + identifier += " strict namespace object"; + } else if (this.options.namespaceObject) { + identifier += " namespace object"; + } + + return identifier; + } + + identifier() { + return this._identifier; + } + + readableIdentifier(requestShortener) { + let identifier = requestShortener.shorten(this.context); + if (this.options.resourceQuery) { + identifier += ` ${this.options.resourceQuery}`; + } + if (this.options.mode) { + identifier += ` ${this.options.mode}`; + } + if (!this.options.recursive) { + identifier += " nonrecursive"; + } + if (this.options.addon) { + identifier += ` ${requestShortener.shorten(this.options.addon)}`; + } + if (this.options.regExp) { + identifier += ` ${this.prettyRegExp(this.options.regExp + "")}`; + } + if (this.options.include) { + identifier += ` include: ${this.prettyRegExp(this.options.include + "")}`; + } + if (this.options.exclude) { + identifier += ` exclude: ${this.prettyRegExp(this.options.exclude + "")}`; + } + if (this.options.groupOptions) { + const groupOptions = this.options.groupOptions; + for (const key of Object.keys(groupOptions)) { + identifier += ` ${key}: ${groupOptions[key]}`; + } + } + if (this.options.namespaceObject === "strict") { + identifier += " strict namespace object"; + } else if (this.options.namespaceObject) { + identifier += " namespace object"; + } + + return identifier; + } + + libIdent(options) { + let identifier = contextify(options.context, this.context); + if (this.options.mode) { + identifier += ` ${this.options.mode}`; + } + if (this.options.recursive) { + identifier += " recursive"; + } + if (this.options.addon) { + identifier += ` ${contextify(options.context, this.options.addon)}`; + } + if (this.options.regExp) { + identifier += ` ${this.prettyRegExp(this.options.regExp + "")}`; + } + if (this.options.include) { + identifier += ` include: ${this.prettyRegExp(this.options.include + "")}`; + } + if (this.options.exclude) { + identifier += ` exclude: ${this.prettyRegExp(this.options.exclude + "")}`; + } + + return identifier; + } + + needRebuild(fileTimestamps, contextTimestamps) { + const ts = contextTimestamps.get(this.context); + if (!ts) { + return true; + } + + return ts >= this.buildInfo.builtTime; + } + + build(options, compilation, resolver, fs, callback) { + this.built = true; + this.buildMeta = {}; + this.buildInfo = { + builtTime: Date.now(), + contextDependencies: this._contextDependencies + }; + this.resolveDependencies(fs, this.options, (err, dependencies) => { + if (err) return callback(err); + + // abort if something failed + // this will create an empty context + if (!dependencies) { + callback(); + return; + } + + // enhance dependencies with meta info + for (const dep of dependencies) { + dep.loc = { + name: dep.userRequest + }; + dep.request = this.options.addon + dep.request; + } + + if (this.options.mode === "sync" || this.options.mode === "eager") { + // if we have an sync or eager context + // just add all dependencies and continue + this.dependencies = dependencies; + } else if (this.options.mode === "lazy-once") { + // for the lazy-once mode create a new async dependency block + // and add that block to this context + if (dependencies.length > 0) { + const block = new AsyncDependenciesBlock( + Object.assign({}, this.options.groupOptions, { + name: this.options.chunkName + }), + this + ); + for (const dep of dependencies) { + block.addDependency(dep); + } + this.addBlock(block); + } + } else if ( + this.options.mode === "weak" || + this.options.mode === "async-weak" + ) { + // we mark all dependencies as weak + for (const dep of dependencies) { + dep.weak = true; + } + this.dependencies = dependencies; + } else if (this.options.mode === "lazy") { + // if we are lazy create a new async dependency block per dependency + // and add all blocks to this context + let index = 0; + for (const dep of dependencies) { + let chunkName = this.options.chunkName; + if (chunkName) { + if (!/\[(index|request)\]/.test(chunkName)) { + chunkName += "[index]"; + } + chunkName = chunkName.replace(/\[index\]/g, index++); + chunkName = chunkName.replace( + /\[request\]/g, + Template.toPath(dep.userRequest) + ); + } + const block = new AsyncDependenciesBlock( + Object.assign({}, this.options.groupOptions, { + name: chunkName + }), + dep.module, + dep.loc, + dep.userRequest + ); + block.addDependency(dep); + this.addBlock(block); + } + } else { + callback( + new Error(`Unsupported mode "${this.options.mode}" in context`) + ); + return; + } + callback(); + }); + } + + getUserRequestMap(dependencies) { + // if we filter first we get a new array + // therefor we dont need to create a clone of dependencies explicitly + // therefore the order of this is !important! + return dependencies + .filter(dependency => dependency.module) + .sort((a, b) => { + if (a.userRequest === b.userRequest) { + return 0; + } + return a.userRequest < b.userRequest ? -1 : 1; + }) + .reduce((map, dep) => { + map[dep.userRequest] = dep.module.id; + return map; + }, Object.create(null)); + } + + getFakeMap(dependencies) { + if (!this.options.namespaceObject) { + return 9; + } + // if we filter first we get a new array + // therefor we dont need to create a clone of dependencies explicitly + // therefore the order of this is !important! + let hasNonHarmony = false; + let hasNamespace = false; + let hasNamed = false; + const fakeMap = dependencies + .filter(dependency => dependency.module) + .sort((a, b) => { + return b.module.id - a.module.id; + }) + .reduce((map, dep) => { + const exportsType = + dep.module.buildMeta && dep.module.buildMeta.exportsType; + const id = dep.module.id; + if (!exportsType) { + map[id] = this.options.namespaceObject === "strict" ? 1 : 7; + hasNonHarmony = true; + } else if (exportsType === "namespace") { + map[id] = 9; + hasNamespace = true; + } else if (exportsType === "named") { + map[id] = 3; + hasNamed = true; + } + return map; + }, Object.create(null)); + if (!hasNamespace && hasNonHarmony && !hasNamed) { + return this.options.namespaceObject === "strict" ? 1 : 7; + } + if (hasNamespace && !hasNonHarmony && !hasNamed) { + return 9; + } + if (!hasNamespace && !hasNonHarmony && hasNamed) { + return 3; + } + if (!hasNamespace && !hasNonHarmony && !hasNamed) { + return 9; + } + return fakeMap; + } + + getFakeMapInitStatement(fakeMap) { + return typeof fakeMap === "object" + ? `var fakeMap = ${JSON.stringify(fakeMap, null, "\t")};` + : ""; + } + + getReturn(type) { + if (type === 9) { + return "__webpack_require__(id)"; + } + return `__webpack_require__.t(id, ${type})`; + } + + getReturnModuleObjectSource(fakeMap, fakeMapDataExpression = "fakeMap[id]") { + if (typeof fakeMap === "number") { + return `return ${this.getReturn(fakeMap)};`; + } + return `return __webpack_require__.t(id, ${fakeMapDataExpression})`; + } + + getSyncSource(dependencies, id) { + const map = this.getUserRequestMap(dependencies); + const fakeMap = this.getFakeMap(dependencies); + const returnModuleObject = this.getReturnModuleObjectSource(fakeMap); + + return `var map = ${JSON.stringify(map, null, "\t")}; +${this.getFakeMapInitStatement(fakeMap)} + +function webpackContext(req) { + var id = webpackContextResolve(req); + ${returnModuleObject} +} +function webpackContextResolve(req) { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; +} +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +module.exports = webpackContext; +webpackContext.id = ${JSON.stringify(id)};`; + } + + getWeakSyncSource(dependencies, id) { + const map = this.getUserRequestMap(dependencies); + const fakeMap = this.getFakeMap(dependencies); + const returnModuleObject = this.getReturnModuleObjectSource(fakeMap); + + return `var map = ${JSON.stringify(map, null, "\t")}; +${this.getFakeMapInitStatement(fakeMap)} + +function webpackContext(req) { + var id = webpackContextResolve(req); + if(!__webpack_require__.m[id]) { + var e = new Error("Module '" + req + "' ('" + id + "') is not available (weak dependency)"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + ${returnModuleObject} +} +function webpackContextResolve(req) { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; +} +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +webpackContext.id = ${JSON.stringify(id)}; +module.exports = webpackContext;`; + } + + getAsyncWeakSource(dependencies, id) { + const map = this.getUserRequestMap(dependencies); + const fakeMap = this.getFakeMap(dependencies); + const returnModuleObject = this.getReturnModuleObjectSource(fakeMap); + + return `var map = ${JSON.stringify(map, null, "\t")}; +${this.getFakeMapInitStatement(fakeMap)} + +function webpackAsyncContext(req) { + return webpackAsyncContextResolve(req).then(function(id) { + if(!__webpack_require__.m[id]) { + var e = new Error("Module '" + req + "' ('" + id + "') is not available (weak dependency)"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + ${returnModuleObject} + }); +} +function webpackAsyncContextResolve(req) { + // Here Promise.resolve().then() is used instead of new Promise() to prevent + // uncaught exception popping up in devtools + return Promise.resolve().then(function() { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; + }); +} +webpackAsyncContext.keys = function webpackAsyncContextKeys() { + return Object.keys(map); +}; +webpackAsyncContext.resolve = webpackAsyncContextResolve; +webpackAsyncContext.id = ${JSON.stringify(id)}; +module.exports = webpackAsyncContext;`; + } + + getEagerSource(dependencies, id) { + const map = this.getUserRequestMap(dependencies); + const fakeMap = this.getFakeMap(dependencies); + const thenFunction = + fakeMap !== 9 + ? `function(id) { + ${this.getReturnModuleObjectSource(fakeMap)} + }` + : "__webpack_require__"; + return `var map = ${JSON.stringify(map, null, "\t")}; +${this.getFakeMapInitStatement(fakeMap)} + +function webpackAsyncContext(req) { + return webpackAsyncContextResolve(req).then(${thenFunction}); +} +function webpackAsyncContextResolve(req) { + // Here Promise.resolve().then() is used instead of new Promise() to prevent + // uncaught exception popping up in devtools + return Promise.resolve().then(function() { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; + }); +} +webpackAsyncContext.keys = function webpackAsyncContextKeys() { + return Object.keys(map); +}; +webpackAsyncContext.resolve = webpackAsyncContextResolve; +webpackAsyncContext.id = ${JSON.stringify(id)}; +module.exports = webpackAsyncContext;`; + } + + getLazyOnceSource(block, dependencies, id, runtimeTemplate) { + const promise = runtimeTemplate.blockPromise({ + block, + message: "lazy-once context" + }); + const map = this.getUserRequestMap(dependencies); + const fakeMap = this.getFakeMap(dependencies); + const thenFunction = + fakeMap !== 9 + ? `function(id) { + ${this.getReturnModuleObjectSource(fakeMap)}; + }` + : "__webpack_require__"; + + return `var map = ${JSON.stringify(map, null, "\t")}; +${this.getFakeMapInitStatement(fakeMap)} + +function webpackAsyncContext(req) { + return webpackAsyncContextResolve(req).then(${thenFunction}); +} +function webpackAsyncContextResolve(req) { + return ${promise}.then(function() { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; + }); +} +webpackAsyncContext.keys = function webpackAsyncContextKeys() { + return Object.keys(map); +}; +webpackAsyncContext.resolve = webpackAsyncContextResolve; +webpackAsyncContext.id = ${JSON.stringify(id)}; +module.exports = webpackAsyncContext;`; + } + + getLazySource(blocks, id) { + let hasMultipleOrNoChunks = false; + let hasNoChunk = true; + const fakeMap = this.getFakeMap(blocks.map(b => b.dependencies[0])); + const hasFakeMap = typeof fakeMap === "object"; + const map = blocks + .filter(block => block.dependencies[0].module) + .map(block => { + const chunks = block.chunkGroup ? block.chunkGroup.chunks : []; + if (chunks.length > 0) { + hasNoChunk = false; + } + if (chunks.length !== 1) { + hasMultipleOrNoChunks = true; + } + return { + dependency: block.dependencies[0], + block: block, + userRequest: block.dependencies[0].userRequest, + chunks + }; + }) + .sort((a, b) => { + if (a.userRequest === b.userRequest) return 0; + return a.userRequest < b.userRequest ? -1 : 1; + }) + .reduce((map, item) => { + const chunks = item.chunks; + + if (hasNoChunk && !hasFakeMap) { + map[item.userRequest] = item.dependency.module.id; + } else { + const arrayStart = [item.dependency.module.id]; + if (typeof fakeMap === "object") { + arrayStart.push(fakeMap[item.dependency.module.id]); + } + map[item.userRequest] = arrayStart.concat( + chunks.map(chunk => chunk.id) + ); + } + + return map; + }, Object.create(null)); + + const shortMode = hasNoChunk && !hasFakeMap; + const chunksStartPosition = hasFakeMap ? 2 : 1; + const requestPrefix = hasNoChunk + ? "Promise.resolve()" + : hasMultipleOrNoChunks + ? `Promise.all(ids.slice(${chunksStartPosition}).map(__webpack_require__.e))` + : `__webpack_require__.e(ids[${chunksStartPosition}])`; + const returnModuleObject = this.getReturnModuleObjectSource( + fakeMap, + shortMode ? "invalid" : "ids[1]" + ); + + const webpackAsyncContext = + requestPrefix === "Promise.resolve()" + ? `${shortMode ? "" : ""} +function webpackAsyncContext(req) { + return Promise.resolve().then(function() { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + + ${shortMode ? "var id = map[req];" : "var ids = map[req], id = ids[0];"} + ${returnModuleObject} + }); +}` + : `function webpackAsyncContext(req) { + if(!__webpack_require__.o(map, req)) { + return Promise.resolve().then(function() { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + }); + } + + var ids = map[req], id = ids[0]; + return ${requestPrefix}.then(function() { + ${returnModuleObject} + }); +}`; + + return `var map = ${JSON.stringify(map, null, "\t")}; +${webpackAsyncContext} +webpackAsyncContext.keys = function webpackAsyncContextKeys() { + return Object.keys(map); +}; +webpackAsyncContext.id = ${JSON.stringify(id)}; +module.exports = webpackAsyncContext;`; + } + + getSourceForEmptyContext(id) { + return `function webpackEmptyContext(req) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; +} +webpackEmptyContext.keys = function() { return []; }; +webpackEmptyContext.resolve = webpackEmptyContext; +module.exports = webpackEmptyContext; +webpackEmptyContext.id = ${JSON.stringify(id)};`; + } + + getSourceForEmptyAsyncContext(id) { + return `function webpackEmptyAsyncContext(req) { + // Here Promise.resolve().then() is used instead of new Promise() to prevent + // uncaught exception popping up in devtools + return Promise.resolve().then(function() { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + }); +} +webpackEmptyAsyncContext.keys = function() { return []; }; +webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; +module.exports = webpackEmptyAsyncContext; +webpackEmptyAsyncContext.id = ${JSON.stringify(id)};`; + } + + getSourceString(asyncMode, runtimeTemplate) { + if (asyncMode === "lazy") { + if (this.blocks && this.blocks.length > 0) { + return this.getLazySource(this.blocks, this.id); + } + return this.getSourceForEmptyAsyncContext(this.id); + } + if (asyncMode === "eager") { + if (this.dependencies && this.dependencies.length > 0) { + return this.getEagerSource(this.dependencies, this.id); + } + return this.getSourceForEmptyAsyncContext(this.id); + } + if (asyncMode === "lazy-once") { + const block = this.blocks[0]; + if (block) { + return this.getLazyOnceSource( + block, + block.dependencies, + this.id, + runtimeTemplate + ); + } + return this.getSourceForEmptyAsyncContext(this.id); + } + if (asyncMode === "async-weak") { + if (this.dependencies && this.dependencies.length > 0) { + return this.getAsyncWeakSource(this.dependencies, this.id); + } + return this.getSourceForEmptyAsyncContext(this.id); + } + if (asyncMode === "weak") { + if (this.dependencies && this.dependencies.length > 0) { + return this.getWeakSyncSource(this.dependencies, this.id); + } + } + if (this.dependencies && this.dependencies.length > 0) { + return this.getSyncSource(this.dependencies, this.id); + } + return this.getSourceForEmptyContext(this.id); + } + + getSource(sourceString) { + if (this.useSourceMap) { + return new OriginalSource(sourceString, this.identifier()); + } + return new RawSource(sourceString); + } + + source(dependencyTemplates, runtimeTemplate) { + return this.getSource( + this.getSourceString(this.options.mode, runtimeTemplate) + ); + } + + size() { + // base penalty + const initialSize = 160; + + // if we dont have dependencies we stop here. + return this.dependencies.reduce((size, dependency) => { + const element = /** @type {ContextElementDependency} */ (dependency); + return size + 5 + element.userRequest.length; + }, initialSize); + } +} + +// TODO remove in webpack 5 +Object.defineProperty(ContextModule.prototype, "recursive", { + configurable: false, + get: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @returns {boolean} is recursive + */ + function() { + return this.options.recursive; + }, + "ContextModule.recursive has been moved to ContextModule.options.recursive" + ), + set: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @param {boolean} value is recursive + * @returns {void} + */ + function(value) { + this.options.recursive = value; + }, + "ContextModule.recursive has been moved to ContextModule.options.recursive" + ) +}); + +// TODO remove in webpack 5 +Object.defineProperty(ContextModule.prototype, "regExp", { + configurable: false, + get: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @returns {RegExp} regular expression + */ + function() { + return this.options.regExp; + }, + "ContextModule.regExp has been moved to ContextModule.options.regExp" + ), + set: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @param {RegExp} value Regular expression + * @returns {void} + */ + function(value) { + this.options.regExp = value; + }, + "ContextModule.regExp has been moved to ContextModule.options.regExp" + ) +}); + +// TODO remove in webpack 5 +Object.defineProperty(ContextModule.prototype, "addon", { + configurable: false, + get: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @returns {string} addon + */ + function() { + return this.options.addon; + }, + "ContextModule.addon has been moved to ContextModule.options.addon" + ), + set: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @param {string} value addon + * @returns {void} + */ + function(value) { + this.options.addon = value; + }, + "ContextModule.addon has been moved to ContextModule.options.addon" + ) +}); + +// TODO remove in webpack 5 +Object.defineProperty(ContextModule.prototype, "async", { + configurable: false, + get: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @returns {boolean} is async + */ + function() { + return this.options.mode; + }, + "ContextModule.async has been moved to ContextModule.options.mode" + ), + set: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @param {ContextMode} value Context mode + * @returns {void} + */ + function(value) { + this.options.mode = value; + }, + "ContextModule.async has been moved to ContextModule.options.mode" + ) +}); + +// TODO remove in webpack 5 +Object.defineProperty(ContextModule.prototype, "chunkName", { + configurable: false, + get: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @returns {string} chunk name + */ + function() { + return this.options.chunkName; + }, + "ContextModule.chunkName has been moved to ContextModule.options.chunkName" + ), + set: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @param {string} value chunk name + * @returns {void} + */ + function(value) { + this.options.chunkName = value; + }, + "ContextModule.chunkName has been moved to ContextModule.options.chunkName" + ) +}); + +module.exports = ContextModule; + + +/***/ }), + +/***/ 88239: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const asyncLib = __webpack_require__(36386); +const path = __webpack_require__(85622); + +const { + Tapable, + AsyncSeriesWaterfallHook, + SyncWaterfallHook +} = __webpack_require__(92402); +const ContextModule = __webpack_require__(20090); +const ContextElementDependency = __webpack_require__(89079); + +/** @typedef {import("./Module")} Module */ + +const EMPTY_RESOLVE_OPTIONS = {}; + +module.exports = class ContextModuleFactory extends Tapable { + constructor(resolverFactory) { + super(); + this.hooks = { + /** @type {AsyncSeriesWaterfallHook} */ + beforeResolve: new AsyncSeriesWaterfallHook(["data"]), + /** @type {AsyncSeriesWaterfallHook} */ + afterResolve: new AsyncSeriesWaterfallHook(["data"]), + /** @type {SyncWaterfallHook} */ + contextModuleFiles: new SyncWaterfallHook(["files"]), + /** @type {SyncWaterfallHook} */ + alternatives: new AsyncSeriesWaterfallHook(["modules"]) + }; + this._pluginCompat.tap("ContextModuleFactory", options => { + switch (options.name) { + case "before-resolve": + case "after-resolve": + case "alternatives": + options.async = true; + break; + } + }); + this.resolverFactory = resolverFactory; + } + + create(data, callback) { + const context = data.context; + const dependencies = data.dependencies; + const resolveOptions = data.resolveOptions; + const dependency = dependencies[0]; + this.hooks.beforeResolve.callAsync( + Object.assign( + { + context: context, + dependencies: dependencies, + resolveOptions + }, + dependency.options + ), + (err, beforeResolveResult) => { + if (err) return callback(err); + + // Ignored + if (!beforeResolveResult) return callback(); + + const context = beforeResolveResult.context; + const request = beforeResolveResult.request; + const resolveOptions = beforeResolveResult.resolveOptions; + + let loaders, + resource, + loadersPrefix = ""; + const idx = request.lastIndexOf("!"); + if (idx >= 0) { + let loadersRequest = request.substr(0, idx + 1); + let i; + for ( + i = 0; + i < loadersRequest.length && loadersRequest[i] === "!"; + i++ + ) { + loadersPrefix += "!"; + } + loadersRequest = loadersRequest + .substr(i) + .replace(/!+$/, "") + .replace(/!!+/g, "!"); + if (loadersRequest === "") { + loaders = []; + } else { + loaders = loadersRequest.split("!"); + } + resource = request.substr(idx + 1); + } else { + loaders = []; + resource = request; + } + + const contextResolver = this.resolverFactory.get( + "context", + resolveOptions || EMPTY_RESOLVE_OPTIONS + ); + const loaderResolver = this.resolverFactory.get( + "loader", + EMPTY_RESOLVE_OPTIONS + ); + + asyncLib.parallel( + [ + callback => { + contextResolver.resolve( + {}, + context, + resource, + {}, + (err, result) => { + if (err) return callback(err); + callback(null, result); + } + ); + }, + callback => { + asyncLib.map( + loaders, + (loader, callback) => { + loaderResolver.resolve( + {}, + context, + loader, + {}, + (err, result) => { + if (err) return callback(err); + callback(null, result); + } + ); + }, + callback + ); + } + ], + (err, result) => { + if (err) return callback(err); + + this.hooks.afterResolve.callAsync( + Object.assign( + { + addon: + loadersPrefix + + result[1].join("!") + + (result[1].length > 0 ? "!" : ""), + resource: result[0], + resolveDependencies: this.resolveDependencies.bind(this) + }, + beforeResolveResult + ), + (err, result) => { + if (err) return callback(err); + + // Ignored + if (!result) return callback(); + + return callback( + null, + new ContextModule(result.resolveDependencies, result) + ); + } + ); + } + ); + } + ); + } + + resolveDependencies(fs, options, callback) { + const cmf = this; + let resource = options.resource; + let resourceQuery = options.resourceQuery; + let recursive = options.recursive; + let regExp = options.regExp; + let include = options.include; + let exclude = options.exclude; + if (!regExp || !resource) return callback(null, []); + + const addDirectory = (directory, callback) => { + fs.readdir(directory, (err, files) => { + if (err) return callback(err); + files = cmf.hooks.contextModuleFiles.call(files); + if (!files || files.length === 0) return callback(null, []); + asyncLib.map( + files.filter(p => p.indexOf(".") !== 0), + (segment, callback) => { + const subResource = path.join(directory, segment); + + if (!exclude || !subResource.match(exclude)) { + fs.stat(subResource, (err, stat) => { + if (err) { + if (err.code === "ENOENT") { + // ENOENT is ok here because the file may have been deleted between + // the readdir and stat calls. + return callback(); + } else { + return callback(err); + } + } + + if (stat.isDirectory()) { + if (!recursive) return callback(); + addDirectory.call(this, subResource, callback); + } else if ( + stat.isFile() && + (!include || subResource.match(include)) + ) { + const obj = { + context: resource, + request: + "." + + subResource.substr(resource.length).replace(/\\/g, "/") + }; + + this.hooks.alternatives.callAsync( + [obj], + (err, alternatives) => { + if (err) return callback(err); + alternatives = alternatives + .filter(obj => regExp.test(obj.request)) + .map(obj => { + const dep = new ContextElementDependency( + obj.request + resourceQuery, + obj.request + ); + dep.optional = true; + return dep; + }); + callback(null, alternatives); + } + ); + } else { + callback(); + } + }); + } else { + callback(); + } + }, + (err, result) => { + if (err) return callback(err); + + if (!result) return callback(null, []); + + callback( + null, + result.filter(Boolean).reduce((a, i) => a.concat(i), []) + ); + } + ); + }); + }; + + addDirectory(resource, callback); + } +}; + + +/***/ }), + +/***/ 27295: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); +const ContextElementDependency = __webpack_require__(89079); + +class ContextReplacementPlugin { + constructor( + resourceRegExp, + newContentResource, + newContentRecursive, + newContentRegExp + ) { + this.resourceRegExp = resourceRegExp; + + if (typeof newContentResource === "function") { + this.newContentCallback = newContentResource; + } else if ( + typeof newContentResource === "string" && + typeof newContentRecursive === "object" + ) { + this.newContentResource = newContentResource; + this.newContentCreateContextMap = (fs, callback) => { + callback(null, newContentRecursive); + }; + } else if ( + typeof newContentResource === "string" && + typeof newContentRecursive === "function" + ) { + this.newContentResource = newContentResource; + this.newContentCreateContextMap = newContentRecursive; + } else { + if (typeof newContentResource !== "string") { + newContentRegExp = newContentRecursive; + newContentRecursive = newContentResource; + newContentResource = undefined; + } + if (typeof newContentRecursive !== "boolean") { + newContentRegExp = newContentRecursive; + newContentRecursive = undefined; + } + this.newContentResource = newContentResource; + this.newContentRecursive = newContentRecursive; + this.newContentRegExp = newContentRegExp; + } + } + + apply(compiler) { + const resourceRegExp = this.resourceRegExp; + const newContentCallback = this.newContentCallback; + const newContentResource = this.newContentResource; + const newContentRecursive = this.newContentRecursive; + const newContentRegExp = this.newContentRegExp; + const newContentCreateContextMap = this.newContentCreateContextMap; + + compiler.hooks.contextModuleFactory.tap("ContextReplacementPlugin", cmf => { + cmf.hooks.beforeResolve.tap("ContextReplacementPlugin", result => { + if (!result) return; + if (resourceRegExp.test(result.request)) { + if (newContentResource !== undefined) { + result.request = newContentResource; + } + if (newContentRecursive !== undefined) { + result.recursive = newContentRecursive; + } + if (newContentRegExp !== undefined) { + result.regExp = newContentRegExp; + } + if (typeof newContentCallback === "function") { + newContentCallback(result); + } else { + for (const d of result.dependencies) { + if (d.critical) d.critical = false; + } + } + } + return result; + }); + cmf.hooks.afterResolve.tap("ContextReplacementPlugin", result => { + if (!result) return; + if (resourceRegExp.test(result.resource)) { + if (newContentResource !== undefined) { + result.resource = path.resolve(result.resource, newContentResource); + } + if (newContentRecursive !== undefined) { + result.recursive = newContentRecursive; + } + if (newContentRegExp !== undefined) { + result.regExp = newContentRegExp; + } + if (typeof newContentCreateContextMap === "function") { + result.resolveDependencies = createResolveDependenciesFromContextMap( + newContentCreateContextMap + ); + } + if (typeof newContentCallback === "function") { + const origResource = result.resource; + newContentCallback(result); + if (result.resource !== origResource) { + result.resource = path.resolve(origResource, result.resource); + } + } else { + for (const d of result.dependencies) { + if (d.critical) d.critical = false; + } + } + } + return result; + }); + }); + } +} + +const createResolveDependenciesFromContextMap = createContextMap => { + const resolveDependenciesFromContextMap = (fs, options, callback) => { + createContextMap(fs, (err, map) => { + if (err) return callback(err); + const dependencies = Object.keys(map).map(key => { + return new ContextElementDependency( + map[key] + options.resourceQuery, + key + ); + }); + callback(null, dependencies); + }); + }; + return resolveDependenciesFromContextMap; +}; + +module.exports = ContextReplacementPlugin; + + +/***/ }), + +/***/ 97374: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ConstDependency = __webpack_require__(71101); +const BasicEvaluatedExpression = __webpack_require__(96770); +const ParserHelpers = __webpack_require__(23999); +const NullFactory = __webpack_require__(40438); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Parser")} Parser */ +/** @typedef {null|undefined|RegExp|Function|string|number} CodeValuePrimitive */ +/** @typedef {CodeValuePrimitive|Record|RuntimeValue} CodeValue */ + +class RuntimeValue { + constructor(fn, fileDependencies) { + this.fn = fn; + this.fileDependencies = fileDependencies || []; + } + + exec(parser) { + if (this.fileDependencies === true) { + parser.state.module.buildInfo.cacheable = false; + } else { + for (const fileDependency of this.fileDependencies) { + parser.state.module.buildInfo.fileDependencies.add(fileDependency); + } + } + + return this.fn({ module: parser.state.module }); + } +} + +const stringifyObj = (obj, parser) => { + return ( + "Object({" + + Object.keys(obj) + .map(key => { + const code = obj[key]; + return JSON.stringify(key) + ":" + toCode(code, parser); + }) + .join(",") + + "})" + ); +}; + +/** + * Convert code to a string that evaluates + * @param {CodeValue} code Code to evaluate + * @param {Parser} parser Parser + * @returns {string} code converted to string that evaluates + */ +const toCode = (code, parser) => { + if (code === null) { + return "null"; + } + if (code === undefined) { + return "undefined"; + } + if (code instanceof RuntimeValue) { + return toCode(code.exec(parser), parser); + } + if (code instanceof RegExp && code.toString) { + return code.toString(); + } + if (typeof code === "function" && code.toString) { + return "(" + code.toString() + ")"; + } + if (typeof code === "object") { + return stringifyObj(code, parser); + } + return code + ""; +}; + +class DefinePlugin { + /** + * Create a new define plugin + * @param {Record} definitions A map of global object definitions + */ + constructor(definitions) { + this.definitions = definitions; + } + + static runtimeValue(fn, fileDependencies) { + return new RuntimeValue(fn, fileDependencies); + } + + /** + * Apply the plugin + * @param {Compiler} compiler Webpack compiler + * @returns {void} + */ + apply(compiler) { + const definitions = this.definitions; + compiler.hooks.compilation.tap( + "DefinePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set(ConstDependency, new NullFactory()); + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + /** + * Handler + * @param {Parser} parser Parser + * @returns {void} + */ + const handler = parser => { + /** + * Walk definitions + * @param {Object} definitions Definitions map + * @param {string} prefix Prefix string + * @returns {void} + */ + const walkDefinitions = (definitions, prefix) => { + Object.keys(definitions).forEach(key => { + const code = definitions[key]; + if ( + code && + typeof code === "object" && + !(code instanceof RuntimeValue) && + !(code instanceof RegExp) + ) { + walkDefinitions(code, prefix + key + "."); + applyObjectDefine(prefix + key, code); + return; + } + applyDefineKey(prefix, key); + applyDefine(prefix + key, code); + }); + }; + + /** + * Apply define key + * @param {string} prefix Prefix + * @param {string} key Key + * @returns {void} + */ + const applyDefineKey = (prefix, key) => { + const splittedKey = key.split("."); + splittedKey.slice(1).forEach((_, i) => { + const fullKey = prefix + splittedKey.slice(0, i + 1).join("."); + parser.hooks.canRename + .for(fullKey) + .tap("DefinePlugin", ParserHelpers.approve); + }); + }; + + /** + * Apply Code + * @param {string} key Key + * @param {CodeValue} code Code + * @returns {void} + */ + const applyDefine = (key, code) => { + const isTypeof = /^typeof\s+/.test(key); + if (isTypeof) key = key.replace(/^typeof\s+/, ""); + let recurse = false; + let recurseTypeof = false; + if (!isTypeof) { + parser.hooks.canRename + .for(key) + .tap("DefinePlugin", ParserHelpers.approve); + parser.hooks.evaluateIdentifier + .for(key) + .tap("DefinePlugin", expr => { + /** + * this is needed in case there is a recursion in the DefinePlugin + * to prevent an endless recursion + * e.g.: new DefinePlugin({ + * "a": "b", + * "b": "a" + * }); + */ + if (recurse) return; + recurse = true; + const res = parser.evaluate(toCode(code, parser)); + recurse = false; + res.setRange(expr.range); + return res; + }); + parser.hooks.expression.for(key).tap("DefinePlugin", expr => { + const strCode = toCode(code, parser); + if (/__webpack_require__/.test(strCode)) { + return ParserHelpers.toConstantDependencyWithWebpackRequire( + parser, + strCode + )(expr); + } else { + return ParserHelpers.toConstantDependency( + parser, + strCode + )(expr); + } + }); + } + parser.hooks.evaluateTypeof.for(key).tap("DefinePlugin", expr => { + /** + * this is needed in case there is a recursion in the DefinePlugin + * to prevent an endless recursion + * e.g.: new DefinePlugin({ + * "typeof a": "typeof b", + * "typeof b": "typeof a" + * }); + */ + if (recurseTypeof) return; + recurseTypeof = true; + const typeofCode = isTypeof + ? toCode(code, parser) + : "typeof (" + toCode(code, parser) + ")"; + const res = parser.evaluate(typeofCode); + recurseTypeof = false; + res.setRange(expr.range); + return res; + }); + parser.hooks.typeof.for(key).tap("DefinePlugin", expr => { + const typeofCode = isTypeof + ? toCode(code, parser) + : "typeof (" + toCode(code, parser) + ")"; + const res = parser.evaluate(typeofCode); + if (!res.isString()) return; + return ParserHelpers.toConstantDependency( + parser, + JSON.stringify(res.string) + ).bind(parser)(expr); + }); + }; + + /** + * Apply Object + * @param {string} key Key + * @param {Object} obj Object + * @returns {void} + */ + const applyObjectDefine = (key, obj) => { + parser.hooks.canRename + .for(key) + .tap("DefinePlugin", ParserHelpers.approve); + parser.hooks.evaluateIdentifier + .for(key) + .tap("DefinePlugin", expr => + new BasicEvaluatedExpression().setTruthy().setRange(expr.range) + ); + parser.hooks.evaluateTypeof.for(key).tap("DefinePlugin", expr => { + return ParserHelpers.evaluateToString("object")(expr); + }); + parser.hooks.expression.for(key).tap("DefinePlugin", expr => { + const strCode = stringifyObj(obj, parser); + + if (/__webpack_require__/.test(strCode)) { + return ParserHelpers.toConstantDependencyWithWebpackRequire( + parser, + strCode + )(expr); + } else { + return ParserHelpers.toConstantDependency( + parser, + strCode + )(expr); + } + }); + parser.hooks.typeof.for(key).tap("DefinePlugin", expr => { + return ParserHelpers.toConstantDependency( + parser, + JSON.stringify("object") + )(expr); + }); + }; + + walkDefinitions(definitions, ""); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("DefinePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("DefinePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("DefinePlugin", handler); + } + ); + } +} +module.exports = DefinePlugin; + + +/***/ }), + +/***/ 42173: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { OriginalSource, RawSource } = __webpack_require__(53665); + +const Module = __webpack_require__(75993); +const WebpackMissingModule = __webpack_require__(75386); +const DelegatedSourceDependency = __webpack_require__(25930); +const DelegatedExportsDependency = __webpack_require__(53104); + +/** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */ +/** @typedef {import("./util/createHash").Hash} Hash */ + +class DelegatedModule extends Module { + constructor(sourceRequest, data, type, userRequest, originalRequest) { + super("javascript/dynamic", null); + + // Info from Factory + this.sourceRequest = sourceRequest; + this.request = data.id; + this.type = type; + this.userRequest = userRequest; + this.originalRequest = originalRequest; + this.delegateData = data; + + // Build info + this.delegatedSourceDependency = undefined; + } + + libIdent(options) { + return typeof this.originalRequest === "string" + ? this.originalRequest + : this.originalRequest.libIdent(options); + } + + identifier() { + return `delegated ${JSON.stringify(this.request)} from ${ + this.sourceRequest + }`; + } + + readableIdentifier() { + return `delegated ${this.userRequest} from ${this.sourceRequest}`; + } + + needRebuild() { + return false; + } + + build(options, compilation, resolver, fs, callback) { + this.built = true; + this.buildMeta = Object.assign({}, this.delegateData.buildMeta); + this.buildInfo = {}; + this.delegatedSourceDependency = new DelegatedSourceDependency( + this.sourceRequest + ); + this.addDependency(this.delegatedSourceDependency); + this.addDependency( + new DelegatedExportsDependency(this, this.delegateData.exports || true) + ); + callback(); + } + + source(depTemplates, runtime) { + const dep = /** @type {DelegatedSourceDependency} */ (this.dependencies[0]); + const sourceModule = dep.module; + let str; + + if (!sourceModule) { + str = WebpackMissingModule.moduleCode(this.sourceRequest); + } else { + str = `module.exports = (${runtime.moduleExports({ + module: sourceModule, + request: dep.request + })})`; + + switch (this.type) { + case "require": + str += `(${JSON.stringify(this.request)})`; + break; + case "object": + str += `[${JSON.stringify(this.request)}]`; + break; + } + + str += ";"; + } + + if (this.useSourceMap) { + return new OriginalSource(str, this.identifier()); + } else { + return new RawSource(str); + } + } + + size() { + return 42; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ + updateHash(hash) { + hash.update(this.type); + hash.update(JSON.stringify(this.request)); + super.updateHash(hash); + } +} + +module.exports = DelegatedModule; + + +/***/ }), + +/***/ 81002: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DelegatedModule = __webpack_require__(42173); + +// options.source +// options.type +// options.context +// options.scope +// options.content +class DelegatedModuleFactoryPlugin { + constructor(options) { + this.options = options; + options.type = options.type || "require"; + options.extensions = options.extensions || [ + "", + ".wasm", + ".mjs", + ".js", + ".json" + ]; + } + + apply(normalModuleFactory) { + const scope = this.options.scope; + if (scope) { + normalModuleFactory.hooks.factory.tap( + "DelegatedModuleFactoryPlugin", + factory => (data, callback) => { + const dependency = data.dependencies[0]; + const request = dependency.request; + if (request && request.indexOf(scope + "/") === 0) { + const innerRequest = "." + request.substr(scope.length); + let resolved; + if (innerRequest in this.options.content) { + resolved = this.options.content[innerRequest]; + return callback( + null, + new DelegatedModule( + this.options.source, + resolved, + this.options.type, + innerRequest, + request + ) + ); + } + for (let i = 0; i < this.options.extensions.length; i++) { + const extension = this.options.extensions[i]; + const requestPlusExt = innerRequest + extension; + if (requestPlusExt in this.options.content) { + resolved = this.options.content[requestPlusExt]; + return callback( + null, + new DelegatedModule( + this.options.source, + resolved, + this.options.type, + requestPlusExt, + request + extension + ) + ); + } + } + } + return factory(data, callback); + } + ); + } else { + normalModuleFactory.hooks.module.tap( + "DelegatedModuleFactoryPlugin", + module => { + if (module.libIdent) { + const request = module.libIdent(this.options); + if (request && request in this.options.content) { + const resolved = this.options.content[request]; + return new DelegatedModule( + this.options.source, + resolved, + this.options.type, + request, + module + ); + } + } + return module; + } + ); + } + } +} +module.exports = DelegatedModuleFactoryPlugin; + + +/***/ }), + +/***/ 16071: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + +const DependenciesBlockVariable = __webpack_require__(82904); + +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable */ +/** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ +/** @typedef {import("./util/createHash").Hash} Hash */ + +class DependenciesBlock { + constructor() { + /** @type {Dependency[]} */ + this.dependencies = []; + /** @type {AsyncDependenciesBlock[]} */ + this.blocks = []; + /** @type {DependenciesBlockVariable[]} */ + this.variables = []; + } + + /** + * Adds a DependencyBlock to DependencyBlock relationship. + * This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting) + * + * @param {AsyncDependenciesBlock} block block being added + * @returns {void} + */ + addBlock(block) { + this.blocks.push(block); + block.parent = this; + } + + /** + * @param {string} name name of dependency + * @param {string} expression expression string for variable + * @param {Dependency[]} dependencies dependency instances tied to variable + * @returns {void} + */ + addVariable(name, expression, dependencies) { + for (let v of this.variables) { + if (v.name === name && v.expression === expression) { + return; + } + } + this.variables.push( + new DependenciesBlockVariable(name, expression, dependencies) + ); + } + + /** + * @param {Dependency} dependency dependency being tied to block. + * This is an "edge" pointing to another "node" on module graph. + * @returns {void} + */ + addDependency(dependency) { + this.dependencies.push(dependency); + } + + /** + * @param {Dependency} dependency dependency being removed + * @returns {void} + */ + removeDependency(dependency) { + const idx = this.dependencies.indexOf(dependency); + if (idx >= 0) { + this.dependencies.splice(idx, 1); + } + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ + updateHash(hash) { + for (const dep of this.dependencies) dep.updateHash(hash); + for (const block of this.blocks) block.updateHash(hash); + for (const variable of this.variables) variable.updateHash(hash); + } + + disconnect() { + for (const dep of this.dependencies) dep.disconnect(); + for (const block of this.blocks) block.disconnect(); + for (const variable of this.variables) variable.disconnect(); + } + + unseal() { + for (const block of this.blocks) block.unseal(); + } + + /** + * @param {DependencyFilterFunction} filter filter function for dependencies, gets passed all dependency ties from current instance + * @returns {boolean} returns boolean for filter + */ + hasDependencies(filter) { + if (filter) { + for (const dep of this.dependencies) { + if (filter(dep)) return true; + } + } else { + if (this.dependencies.length > 0) { + return true; + } + } + + for (const block of this.blocks) { + if (block.hasDependencies(filter)) return true; + } + for (const variable of this.variables) { + if (variable.hasDependencies(filter)) return true; + } + return false; + } + + sortItems() { + for (const block of this.blocks) block.sortItems(); + } +} + +module.exports = DependenciesBlock; + + +/***/ }), + +/***/ 82904: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { RawSource, ReplaceSource } = __webpack_require__(53665); + +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./util/createHash").Hash} Hash */ +/** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ +/** @typedef {Map} DependencyTemplates */ + +class DependenciesBlockVariable { + /** + * Creates an instance of DependenciesBlockVariable. + * @param {string} name name of DependenciesBlockVariable + * @param {string} expression expression string + * @param {Dependency[]=} dependencies dependencies tied to this varaiable + */ + constructor(name, expression, dependencies) { + this.name = name; + this.expression = expression; + this.dependencies = dependencies || []; + } + + /** + * @param {Hash} hash hash for instance to update + * @returns {void} + */ + updateHash(hash) { + hash.update(this.name); + hash.update(this.expression); + for (const d of this.dependencies) { + d.updateHash(hash); + } + } + + /** + * @param {DependencyTemplates} dependencyTemplates Dependency constructors and templates Map. + * @param {RuntimeTemplate} runtimeTemplate runtimeTemplate to generate expression souce + * @returns {ReplaceSource} returns constructed source for expression via templates + */ + expressionSource(dependencyTemplates, runtimeTemplate) { + const source = new ReplaceSource(new RawSource(this.expression)); + for (const dep of this.dependencies) { + const template = dependencyTemplates.get(dep.constructor); + if (!template) { + throw new Error(`No template for dependency: ${dep.constructor.name}`); + } + template.apply(dep, source, runtimeTemplate, dependencyTemplates); + } + return source; + } + + disconnect() { + for (const d of this.dependencies) { + d.disconnect(); + } + } + + hasDependencies(filter) { + if (filter) { + return this.dependencies.some(filter); + } + return this.dependencies.length > 0; + } +} + +module.exports = DependenciesBlockVariable; + + +/***/ }), + +/***/ 57282: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const util = __webpack_require__(31669); +const compareLocations = __webpack_require__(22562); +const DependencyReference = __webpack_require__(71722); + +/** @typedef {import("./Module")} Module */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ + +/** + * @typedef {Object} DependencyTemplate + * @property {function(Dependency, Source, RuntimeTemplate, Map): void} apply + */ + +/** @typedef {Object} SourcePosition + * @property {number} line + * @property {number=} column + */ + +/** @typedef {Object} RealDependencyLocation + * @property {SourcePosition} start + * @property {SourcePosition=} end + * @property {number=} index + */ + +/** @typedef {Object} SynteticDependencyLocation + * @property {string} name + * @property {number=} index + */ + +/** @typedef {SynteticDependencyLocation|RealDependencyLocation} DependencyLocation */ + +class Dependency { + constructor() { + /** @type {Module|null} */ + this.module = null; + // TODO remove in webpack 5 + /** @type {boolean} */ + this.weak = false; + /** @type {boolean} */ + this.optional = false; + /** @type {DependencyLocation} */ + this.loc = undefined; + } + + getResourceIdentifier() { + return null; + } + + // Returns the referenced module and export + getReference() { + if (!this.module) return null; + return new DependencyReference(this.module, true, this.weak); + } + + // Returns the exported names + getExports() { + return null; + } + + getWarnings() { + return null; + } + + getErrors() { + return null; + } + + updateHash(hash) { + hash.update((this.module && this.module.id) + ""); + } + + disconnect() { + this.module = null; + } +} + +// TODO remove in webpack 5 +Dependency.compare = util.deprecate( + (a, b) => compareLocations(a.loc, b.loc), + "Dependency.compare is deprecated and will be removed in the next major version" +); + +module.exports = Dependency; + + +/***/ }), + +/***/ 6659: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DllEntryDependency = __webpack_require__(66279); +const SingleEntryDependency = __webpack_require__(84828); +const DllModuleFactory = __webpack_require__(62468); + +class DllEntryPlugin { + constructor(context, entries, name) { + this.context = context; + this.entries = entries; + this.name = name; + } + + apply(compiler) { + compiler.hooks.compilation.tap( + "DllEntryPlugin", + (compilation, { normalModuleFactory }) => { + const dllModuleFactory = new DllModuleFactory(); + compilation.dependencyFactories.set( + DllEntryDependency, + dllModuleFactory + ); + compilation.dependencyFactories.set( + SingleEntryDependency, + normalModuleFactory + ); + } + ); + compiler.hooks.make.tapAsync("DllEntryPlugin", (compilation, callback) => { + compilation.addEntry( + this.context, + new DllEntryDependency( + this.entries.map((e, idx) => { + const dep = new SingleEntryDependency(e); + dep.loc = { + name: this.name, + index: idx + }; + return dep; + }), + this.name + ), + this.name, + callback + ); + }); + } +} + +module.exports = DllEntryPlugin; + + +/***/ }), + +/***/ 24803: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + +const { RawSource } = __webpack_require__(53665); +const Module = __webpack_require__(75993); + +/** @typedef {import("./util/createHash").Hash} Hash */ + +class DllModule extends Module { + constructor(context, dependencies, name, type) { + super("javascript/dynamic", context); + + // Info from Factory + this.dependencies = dependencies; + this.name = name; + this.type = type; + } + + identifier() { + return `dll ${this.name}`; + } + + readableIdentifier() { + return `dll ${this.name}`; + } + + build(options, compilation, resolver, fs, callback) { + this.built = true; + this.buildMeta = {}; + this.buildInfo = {}; + return callback(); + } + + source() { + return new RawSource("module.exports = __webpack_require__;"); + } + + needRebuild() { + return false; + } + + size() { + return 12; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ + updateHash(hash) { + hash.update("dll module"); + hash.update(this.name || ""); + super.updateHash(hash); + } +} + +module.exports = DllModule; + + +/***/ }), + +/***/ 62468: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { Tapable } = __webpack_require__(92402); +const DllModule = __webpack_require__(24803); + +class DllModuleFactory extends Tapable { + constructor() { + super(); + this.hooks = {}; + } + create(data, callback) { + const dependency = data.dependencies[0]; + callback( + null, + new DllModule( + data.context, + dependency.dependencies, + dependency.name, + dependency.type + ) + ); + } +} + +module.exports = DllModuleFactory; + + +/***/ }), + +/***/ 45255: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + +const DllEntryPlugin = __webpack_require__(6659); +const FlagAllModulesAsUsedPlugin = __webpack_require__(47163); +const LibManifestPlugin = __webpack_require__(30735); + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(7303); + +/** @typedef {import("../declarations/plugins/DllPlugin").DllPluginOptions} DllPluginOptions */ + +class DllPlugin { + /** + * @param {DllPluginOptions} options options object + */ + constructor(options) { + validateOptions(schema, options, "Dll Plugin"); + this.options = options; + } + + apply(compiler) { + compiler.hooks.entryOption.tap("DllPlugin", (context, entry) => { + const itemToPlugin = (item, name) => { + if (Array.isArray(item)) { + return new DllEntryPlugin(context, item, name); + } + throw new Error("DllPlugin: supply an Array as entry"); + }; + if (typeof entry === "object" && !Array.isArray(entry)) { + Object.keys(entry).forEach(name => { + itemToPlugin(entry[name], name).apply(compiler); + }); + } else { + itemToPlugin(entry, "main").apply(compiler); + } + return true; + }); + new LibManifestPlugin(this.options).apply(compiler); + if (!this.options.entryOnly) { + new FlagAllModulesAsUsedPlugin("DllPlugin").apply(compiler); + } + } +} + +module.exports = DllPlugin; + + +/***/ }), + +/***/ 86231: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const parseJson = __webpack_require__(48335); +const DelegatedSourceDependency = __webpack_require__(25930); +const DelegatedModuleFactoryPlugin = __webpack_require__(81002); +const ExternalModuleFactoryPlugin = __webpack_require__(67876); +const DelegatedExportsDependency = __webpack_require__(53104); +const NullFactory = __webpack_require__(40438); +const makePathsRelative = __webpack_require__(94658).makePathsRelative; +const WebpackError = __webpack_require__(97391); + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(61112); + +/** @typedef {import("../declarations/plugins/DllReferencePlugin").DllReferencePluginOptions} DllReferencePluginOptions */ +/** @typedef {import("../declarations/plugins/DllReferencePlugin").DllReferencePluginOptionsManifest} DllReferencePluginOptionsManifest */ + +class DllReferencePlugin { + /** + * @param {DllReferencePluginOptions} options options object + */ + constructor(options) { + validateOptions(schema, options, "Dll Reference Plugin"); + this.options = options; + } + + apply(compiler) { + compiler.hooks.compilation.tap( + "DllReferencePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + DelegatedSourceDependency, + normalModuleFactory + ); + compilation.dependencyFactories.set( + DelegatedExportsDependency, + new NullFactory() + ); + } + ); + + compiler.hooks.beforeCompile.tapAsync( + "DllReferencePlugin", + (params, callback) => { + if ("manifest" in this.options) { + const manifest = this.options.manifest; + if (typeof manifest === "string") { + params.compilationDependencies.add(manifest); + compiler.inputFileSystem.readFile(manifest, (err, result) => { + if (err) return callback(err); + // Catch errors parsing the manifest so that blank + // or malformed manifest files don't kill the process. + try { + params["dll reference " + manifest] = parseJson( + result.toString("utf-8") + ); + } catch (e) { + // Store the error in the params so that it can + // be added as a compilation error later on. + const manifestPath = makePathsRelative( + compiler.options.context, + manifest + ); + params[ + "dll reference parse error " + manifest + ] = new DllManifestError(manifestPath, e.message); + } + return callback(); + }); + return; + } + } + return callback(); + } + ); + + compiler.hooks.compile.tap("DllReferencePlugin", params => { + let name = this.options.name; + let sourceType = this.options.sourceType; + let content = + "content" in this.options ? this.options.content : undefined; + if ("manifest" in this.options) { + let manifestParameter = this.options.manifest; + let manifest; + if (typeof manifestParameter === "string") { + // If there was an error parsing the manifest + // file, exit now because the error will be added + // as a compilation error in the "compilation" hook. + if (params["dll reference parse error " + manifestParameter]) { + return; + } + manifest = + /** @type {DllReferencePluginOptionsManifest} */ (params[ + "dll reference " + manifestParameter + ]); + } else { + manifest = manifestParameter; + } + if (manifest) { + if (!name) name = manifest.name; + if (!sourceType) sourceType = manifest.type; + if (!content) content = manifest.content; + } + } + const externals = {}; + const source = "dll-reference " + name; + externals[source] = name; + const normalModuleFactory = params.normalModuleFactory; + new ExternalModuleFactoryPlugin(sourceType || "var", externals).apply( + normalModuleFactory + ); + new DelegatedModuleFactoryPlugin({ + source: source, + type: this.options.type, + scope: this.options.scope, + context: this.options.context || compiler.options.context, + content, + extensions: this.options.extensions + }).apply(normalModuleFactory); + }); + + compiler.hooks.compilation.tap( + "DllReferencePlugin", + (compilation, params) => { + if ("manifest" in this.options) { + let manifest = this.options.manifest; + if (typeof manifest === "string") { + // If there was an error parsing the manifest file, add the + // error as a compilation error to make the compilation fail. + let e = params["dll reference parse error " + manifest]; + if (e) { + compilation.errors.push(e); + } + } + } + } + ); + } +} + +class DllManifestError extends WebpackError { + constructor(filename, message) { + super(); + + this.name = "DllManifestError"; + this.message = `Dll manifest ${filename}\n${message}`; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = DllReferencePlugin; + + +/***/ }), + +/***/ 49784: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Naoyuki Kanezawa @nkzawa +*/ + + +const MultiEntryDependency = __webpack_require__(7791); +const SingleEntryDependency = __webpack_require__(84828); +const MultiModuleFactory = __webpack_require__(24005); +const MultiEntryPlugin = __webpack_require__(98046); +const SingleEntryPlugin = __webpack_require__(19070); + +/** @typedef {import("../declarations/WebpackOptions").EntryDynamic} EntryDynamic */ +/** @typedef {import("../declarations/WebpackOptions").EntryStatic} EntryStatic */ +/** @typedef {import("./Compiler")} Compiler */ + +class DynamicEntryPlugin { + /** + * @param {string} context the context path + * @param {EntryDynamic} entry the entry value + */ + constructor(context, entry) { + this.context = context; + this.entry = entry; + } + + /** + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "DynamicEntryPlugin", + (compilation, { normalModuleFactory }) => { + const multiModuleFactory = new MultiModuleFactory(); + + compilation.dependencyFactories.set( + MultiEntryDependency, + multiModuleFactory + ); + compilation.dependencyFactories.set( + SingleEntryDependency, + normalModuleFactory + ); + } + ); + + compiler.hooks.make.tapAsync( + "DynamicEntryPlugin", + (compilation, callback) => { + /** + * @param {string|string[]} entry entry value or array of entry values + * @param {string} name name of entry + * @returns {Promise} returns the promise resolving the Compilation#addEntry function + */ + const addEntry = (entry, name) => { + const dep = DynamicEntryPlugin.createDependency(entry, name); + return new Promise((resolve, reject) => { + compilation.addEntry(this.context, dep, name, err => { + if (err) return reject(err); + resolve(); + }); + }); + }; + + Promise.resolve(this.entry()).then(entry => { + if (typeof entry === "string" || Array.isArray(entry)) { + addEntry(entry, "main").then(() => callback(), callback); + } else if (typeof entry === "object") { + Promise.all( + Object.keys(entry).map(name => { + return addEntry(entry[name], name); + }) + ).then(() => callback(), callback); + } + }); + } + ); + } +} + +module.exports = DynamicEntryPlugin; +/** + * @param {string|string[]} entry entry value or array of entry paths + * @param {string} name name of entry + * @returns {SingleEntryDependency|MultiEntryDependency} returns dep + */ +DynamicEntryPlugin.createDependency = (entry, name) => { + if (Array.isArray(entry)) { + return MultiEntryPlugin.createDependency(entry, name); + } else { + return SingleEntryPlugin.createDependency(entry, name); + } +}; + + +/***/ }), + +/***/ 99531: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +class EntryModuleNotFoundError extends WebpackError { + constructor(err) { + super("Entry module not found: " + err); + + this.name = "EntryModuleNotFoundError"; + this.details = err.details; + this.error = err; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = EntryModuleNotFoundError; + + +/***/ }), + +/***/ 14604: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const SingleEntryPlugin = __webpack_require__(19070); +const MultiEntryPlugin = __webpack_require__(98046); +const DynamicEntryPlugin = __webpack_require__(49784); + +/** @typedef {import("../declarations/WebpackOptions").EntryItem} EntryItem */ +/** @typedef {import("./Compiler")} Compiler */ + +/** + * @param {string} context context path + * @param {EntryItem} item entry array or single path + * @param {string} name entry key name + * @returns {SingleEntryPlugin | MultiEntryPlugin} returns either a single or multi entry plugin + */ +const itemToPlugin = (context, item, name) => { + if (Array.isArray(item)) { + return new MultiEntryPlugin(context, item, name); + } + return new SingleEntryPlugin(context, item, name); +}; + +module.exports = class EntryOptionPlugin { + /** + * @param {Compiler} compiler the compiler instance one is tapping into + * @returns {void} + */ + apply(compiler) { + compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry) => { + if (typeof entry === "string" || Array.isArray(entry)) { + itemToPlugin(context, entry, "main").apply(compiler); + } else if (typeof entry === "object") { + for (const name of Object.keys(entry)) { + itemToPlugin(context, entry[name], name).apply(compiler); + } + } else if (typeof entry === "function") { + new DynamicEntryPlugin(context, entry).apply(compiler); + } + return true; + }); + } +}; + + +/***/ }), + +/***/ 71931: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ChunkGroup = __webpack_require__(52911); + +/** @typedef {import("./Chunk")} Chunk */ + +/** + * Entrypoint serves as an encapsulation primitive for chunks that are + * a part of a single ChunkGroup. They represent all bundles that need to be loaded for a + * single instance of a page. Multi-page application architectures will typically yield multiple Entrypoint objects + * inside of the compilation, whereas a Single Page App may only contain one with many lazy-loaded chunks. + */ +class Entrypoint extends ChunkGroup { + /** + * Creates an instance of Entrypoint. + * @param {string} name the name of the entrypoint + */ + constructor(name) { + super(name); + /** @type {Chunk=} */ + this.runtimeChunk = undefined; + } + + /** + * isInitial will always return true for Entrypoint ChunkGroup. + * @returns {true} returns true as all entrypoints are initial ChunkGroups + */ + isInitial() { + return true; + } + + /** + * Sets the runtimeChunk for an entrypoint. + * @param {Chunk} chunk the chunk being set as the runtime chunk. + * @returns {void} + */ + setRuntimeChunk(chunk) { + this.runtimeChunk = chunk; + } + + /** + * Fetches the chunk reference containing the webpack bootstrap code + * @returns {Chunk} returns the runtime chunk or first chunk in `this.chunks` + */ + getRuntimeChunk() { + return this.runtimeChunk || this.chunks[0]; + } + + /** + * @param {Chunk} oldChunk chunk to be replaced + * @param {Chunk} newChunk New chunk that will be replaced with + * @returns {boolean} returns true if the replacement was successful + */ + replaceChunk(oldChunk, newChunk) { + if (this.runtimeChunk === oldChunk) this.runtimeChunk = newChunk; + return super.replaceChunk(oldChunk, newChunk); + } +} + +module.exports = Entrypoint; + + +/***/ }), + +/***/ 6098: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Authors Simen Brekken @simenbrekken, Einar Löve @einarlove +*/ + + + +/** @typedef {import("./Compiler")} Compiler */ + +const WebpackError = __webpack_require__(97391); +const DefinePlugin = __webpack_require__(97374); + +const needsEnvVarFix = + ["8", "9"].indexOf(process.versions.node.split(".")[0]) >= 0 && + process.platform === "win32"; + +class EnvironmentPlugin { + constructor(...keys) { + if (keys.length === 1 && Array.isArray(keys[0])) { + this.keys = keys[0]; + this.defaultValues = {}; + } else if (keys.length === 1 && keys[0] && typeof keys[0] === "object") { + this.keys = Object.keys(keys[0]); + this.defaultValues = keys[0]; + } else { + this.keys = keys; + this.defaultValues = {}; + } + } + + /** + * @param {Compiler} compiler webpack compiler instance + * @returns {void} + */ + apply(compiler) { + const definitions = this.keys.reduce((defs, key) => { + // TODO remove once the fix has made its way into Node 8. + // Work around https://github.com/nodejs/node/pull/18463, + // affecting Node 8 & 9 by performing an OS-level + // operation that always succeeds before reading + // environment variables: + if (needsEnvVarFix) __webpack_require__(12087).cpus(); + + const value = + process.env[key] !== undefined + ? process.env[key] + : this.defaultValues[key]; + + if (value === undefined) { + compiler.hooks.thisCompilation.tap("EnvironmentPlugin", compilation => { + const error = new WebpackError( + `EnvironmentPlugin - ${key} environment variable is undefined.\n\n` + + "You can pass an object with default values to suppress this warning.\n" + + "See https://webpack.js.org/plugins/environment-plugin for example." + ); + + error.name = "EnvVariableNotDefinedError"; + compilation.warnings.push(error); + }); + } + + defs[`process.env.${key}`] = + value === undefined ? "undefined" : JSON.stringify(value); + + return defs; + }, {}); + + new DefinePlugin(definitions).apply(compiler); + } +} + +module.exports = EnvironmentPlugin; + + +/***/ }), + +/***/ 80140: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const loaderFlag = "LOADER_EXECUTION"; + +const webpackOptionsFlag = "WEBPACK_OPTIONS"; + +exports.cutOffByFlag = (stack, flag) => { + stack = stack.split("\n"); + for (let i = 0; i < stack.length; i++) { + if (stack[i].includes(flag)) { + stack.length = i; + } + } + return stack.join("\n"); +}; + +exports.cutOffLoaderExecution = stack => + exports.cutOffByFlag(stack, loaderFlag); + +exports.cutOffWebpackOptions = stack => + exports.cutOffByFlag(stack, webpackOptionsFlag); + +exports.cutOffMultilineMessage = (stack, message) => { + stack = stack.split("\n"); + message = message.split("\n"); + + return stack + .reduce( + (acc, line, idx) => + line.includes(message[idx]) ? acc : acc.concat(line), + [] + ) + .join("\n"); +}; + +exports.cutOffMessage = (stack, message) => { + const nextLine = stack.indexOf("\n"); + if (nextLine === -1) { + return stack === message ? "" : stack; + } else { + const firstLine = stack.substr(0, nextLine); + return firstLine === message ? stack.substr(nextLine + 1) : stack; + } +}; + +exports.cleanUp = (stack, message) => { + stack = exports.cutOffLoaderExecution(stack); + stack = exports.cutOffMessage(stack, message); + return stack; +}; + +exports.cleanUpWebpackOptions = (stack, message) => { + stack = exports.cutOffWebpackOptions(stack); + stack = exports.cutOffMultilineMessage(stack, message); + return stack; +}; + + +/***/ }), + +/***/ 65200: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const EvalDevToolModuleTemplatePlugin = __webpack_require__(24157); + +class EvalDevToolModulePlugin { + constructor(options) { + this.sourceUrlComment = options.sourceUrlComment; + this.moduleFilenameTemplate = options.moduleFilenameTemplate; + this.namespace = options.namespace; + } + + apply(compiler) { + compiler.hooks.compilation.tap("EvalDevToolModulePlugin", compilation => { + new EvalDevToolModuleTemplatePlugin({ + sourceUrlComment: this.sourceUrlComment, + moduleFilenameTemplate: this.moduleFilenameTemplate, + namespace: this.namespace + }).apply(compilation.moduleTemplates.javascript); + }); + } +} + +module.exports = EvalDevToolModulePlugin; + + +/***/ }), + +/***/ 24157: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { RawSource } = __webpack_require__(53665); +const ModuleFilenameHelpers = __webpack_require__(71474); + +const cache = new WeakMap(); + +class EvalDevToolModuleTemplatePlugin { + constructor(options) { + this.sourceUrlComment = options.sourceUrlComment || "\n//# sourceURL=[url]"; + this.moduleFilenameTemplate = + options.moduleFilenameTemplate || + "webpack://[namespace]/[resourcePath]?[loaders]"; + this.namespace = options.namespace || ""; + } + + apply(moduleTemplate) { + moduleTemplate.hooks.module.tap( + "EvalDevToolModuleTemplatePlugin", + (source, module) => { + const cacheEntry = cache.get(source); + if (cacheEntry !== undefined) return cacheEntry; + const content = source.source(); + const str = ModuleFilenameHelpers.createFilename( + module, + { + moduleFilenameTemplate: this.moduleFilenameTemplate, + namespace: this.namespace + }, + moduleTemplate.runtimeTemplate.requestShortener + ); + const footer = + "\n" + + this.sourceUrlComment.replace( + /\[url\]/g, + encodeURI(str) + .replace(/%2F/g, "/") + .replace(/%20/g, "_") + .replace(/%5E/g, "^") + .replace(/%5C/g, "\\") + .replace(/^\//, "") + ); + const result = new RawSource( + `eval(${JSON.stringify(content + footer)});` + ); + cache.set(source, result); + return result; + } + ); + moduleTemplate.hooks.hash.tap("EvalDevToolModuleTemplatePlugin", hash => { + hash.update("EvalDevToolModuleTemplatePlugin"); + hash.update("2"); + }); + } +} + +module.exports = EvalDevToolModuleTemplatePlugin; + + +/***/ }), + +/***/ 51352: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { RawSource } = __webpack_require__(53665); +const ModuleFilenameHelpers = __webpack_require__(71474); +const { absolutify } = __webpack_require__(94658); + +const cache = new WeakMap(); + +class EvalSourceMapDevToolModuleTemplatePlugin { + constructor(compilation, options) { + this.compilation = compilation; + this.sourceMapComment = + options.append || "//# sourceURL=[module]\n//# sourceMappingURL=[url]"; + this.moduleFilenameTemplate = + options.moduleFilenameTemplate || + "webpack://[namespace]/[resource-path]?[hash]"; + this.namespace = options.namespace || ""; + this.options = options; + } + + apply(moduleTemplate) { + const self = this; + const options = this.options; + const matchModule = ModuleFilenameHelpers.matchObject.bind( + ModuleFilenameHelpers, + options + ); + moduleTemplate.hooks.module.tap( + "EvalSourceMapDevToolModuleTemplatePlugin", + (source, module) => { + const cachedSource = cache.get(source); + if (cachedSource !== undefined) { + return cachedSource; + } + + if (!matchModule(module.resource)) { + return source; + } + + /** @type {{ [key: string]: TODO; }} */ + let sourceMap; + let content; + if (source.sourceAndMap) { + const sourceAndMap = source.sourceAndMap(options); + sourceMap = sourceAndMap.map; + content = sourceAndMap.source; + } else { + sourceMap = source.map(options); + content = source.source(); + } + if (!sourceMap) { + return source; + } + + // Clone (flat) the sourcemap to ensure that the mutations below do not persist. + sourceMap = Object.keys(sourceMap).reduce((obj, key) => { + obj[key] = sourceMap[key]; + return obj; + }, {}); + const context = this.compilation.compiler.options.context; + const modules = sourceMap.sources.map(source => { + if (source.startsWith("webpack://")) { + source = absolutify(context, source.slice(10)); + } + const module = self.compilation.findModule(source); + return module || source; + }); + let moduleFilenames = modules.map(module => { + return ModuleFilenameHelpers.createFilename( + module, + { + moduleFilenameTemplate: self.moduleFilenameTemplate, + namespace: self.namespace + }, + moduleTemplate.runtimeTemplate.requestShortener + ); + }); + moduleFilenames = ModuleFilenameHelpers.replaceDuplicates( + moduleFilenames, + (filename, i, n) => { + for (let j = 0; j < n; j++) filename += "*"; + return filename; + } + ); + sourceMap.sources = moduleFilenames; + sourceMap.sourceRoot = options.sourceRoot || ""; + sourceMap.file = `${module.id}.js`; + + const footer = + self.sourceMapComment.replace( + /\[url\]/g, + `data:application/json;charset=utf-8;base64,${Buffer.from( + JSON.stringify(sourceMap), + "utf8" + ).toString("base64")}` + ) + `\n//# sourceURL=webpack-internal:///${module.id}\n`; // workaround for chrome bug + + const evalSource = new RawSource( + `eval(${JSON.stringify(content + footer)});` + ); + + cache.set(source, evalSource); + + return evalSource; + } + ); + moduleTemplate.hooks.hash.tap( + "EvalSourceMapDevToolModuleTemplatePlugin", + hash => { + hash.update("eval-source-map"); + hash.update("2"); + } + ); + } +} +module.exports = EvalSourceMapDevToolModuleTemplatePlugin; + + +/***/ }), + +/***/ 99994: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const EvalSourceMapDevToolModuleTemplatePlugin = __webpack_require__(51352); +const SourceMapDevToolModuleOptionsPlugin = __webpack_require__(24113); + +class EvalSourceMapDevToolPlugin { + constructor(options) { + if (arguments.length > 1) { + throw new Error( + "EvalSourceMapDevToolPlugin only takes one argument (pass an options object)" + ); + } + if (typeof options === "string") { + options = { + append: options + }; + } + if (!options) options = {}; + this.options = options; + } + + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap( + "EvalSourceMapDevToolPlugin", + compilation => { + new SourceMapDevToolModuleOptionsPlugin(options).apply(compilation); + new EvalSourceMapDevToolModuleTemplatePlugin( + compilation, + options + ).apply(compilation.moduleTemplates.javascript); + } + ); + } +} + +module.exports = EvalSourceMapDevToolPlugin; + + +/***/ }), + +/***/ 50471: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { ConcatSource } = __webpack_require__(53665); + +/** @typedef {import("./Compilation")} Compilation */ + +/** + * @param {string[]} accessor the accessor to convert to path + * @returns {string} the path + */ +const accessorToObjectAccess = accessor => { + return accessor.map(a => `[${JSON.stringify(a)}]`).join(""); +}; + +class ExportPropertyMainTemplatePlugin { + /** + * @param {string|string[]} property the name of the property to export + */ + constructor(property) { + this.property = property; + } + + /** + * @param {Compilation} compilation the compilation instance + * @returns {void} + */ + apply(compilation) { + const { mainTemplate, chunkTemplate } = compilation; + + const onRenderWithEntry = (source, chunk, hash) => { + const postfix = `${accessorToObjectAccess([].concat(this.property))}`; + return new ConcatSource(source, postfix); + }; + + for (const template of [mainTemplate, chunkTemplate]) { + template.hooks.renderWithEntry.tap( + "ExportPropertyMainTemplatePlugin", + onRenderWithEntry + ); + } + + mainTemplate.hooks.hash.tap("ExportPropertyMainTemplatePlugin", hash => { + hash.update("export property"); + hash.update(`${this.property}`); + }); + } +} + +module.exports = ExportPropertyMainTemplatePlugin; + + +/***/ }), + +/***/ 17270: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Template = __webpack_require__(96066); +const ConstDependency = __webpack_require__(71101); +const ParserHelpers = __webpack_require__(23999); +const NullFactory = __webpack_require__(40438); + +const REPLACEMENTS = { + // eslint-disable-next-line camelcase + __webpack_hash__: "__webpack_require__.h", + // eslint-disable-next-line camelcase + __webpack_chunkname__: "__webpack_require__.cn" +}; +const REPLACEMENT_TYPES = { + // eslint-disable-next-line camelcase + __webpack_hash__: "string", + // eslint-disable-next-line camelcase + __webpack_chunkname__: "string" +}; + +class ExtendedAPIPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "ExtendedAPIPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set(ConstDependency, new NullFactory()); + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + const mainTemplate = compilation.mainTemplate; + mainTemplate.hooks.requireExtensions.tap( + "ExtendedAPIPlugin", + (source, chunk, hash) => { + const buf = [source]; + buf.push(""); + buf.push("// __webpack_hash__"); + buf.push(`${mainTemplate.requireFn}.h = ${JSON.stringify(hash)};`); + buf.push(""); + buf.push("// __webpack_chunkname__"); + buf.push( + `${mainTemplate.requireFn}.cn = ${JSON.stringify(chunk.name)};` + ); + return Template.asString(buf); + } + ); + mainTemplate.hooks.globalHash.tap("ExtendedAPIPlugin", () => true); + + const handler = (parser, parserOptions) => { + Object.keys(REPLACEMENTS).forEach(key => { + parser.hooks.expression + .for(key) + .tap( + "ExtendedAPIPlugin", + ParserHelpers.toConstantDependencyWithWebpackRequire( + parser, + REPLACEMENTS[key] + ) + ); + parser.hooks.evaluateTypeof + .for(key) + .tap( + "ExtendedAPIPlugin", + ParserHelpers.evaluateToString(REPLACEMENT_TYPES[key]) + ); + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("ExtendedAPIPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("ExtendedAPIPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("ExtendedAPIPlugin", handler); + } + ); + } +} + +module.exports = ExtendedAPIPlugin; + + +/***/ }), + +/***/ 17204: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { OriginalSource, RawSource } = __webpack_require__(53665); +const Module = __webpack_require__(75993); +const WebpackMissingModule = __webpack_require__(75386); +const Template = __webpack_require__(96066); + +/** @typedef {import("./util/createHash").Hash} Hash */ + +class ExternalModule extends Module { + constructor(request, type, userRequest) { + super("javascript/dynamic", null); + + // Info from Factory + this.request = request; + this.externalType = type; + this.userRequest = userRequest; + this.external = true; + } + + libIdent() { + return this.userRequest; + } + + chunkCondition(chunk) { + return chunk.hasEntryModule(); + } + + identifier() { + return "external " + JSON.stringify(this.request); + } + + readableIdentifier() { + return "external " + JSON.stringify(this.request); + } + + needRebuild() { + return false; + } + + build(options, compilation, resolver, fs, callback) { + this.built = true; + this.buildMeta = {}; + this.buildInfo = {}; + callback(); + } + + getSourceForGlobalVariableExternal(variableName, type) { + if (!Array.isArray(variableName)) { + // make it an array as the look up works the same basically + variableName = [variableName]; + } + + // needed for e.g. window["some"]["thing"] + const objectLookup = variableName + .map(r => `[${JSON.stringify(r)}]`) + .join(""); + return `(function() { module.exports = ${type}${objectLookup}; }());`; + } + + getSourceForCommonJsExternal(moduleAndSpecifiers) { + if (!Array.isArray(moduleAndSpecifiers)) { + return `module.exports = require(${JSON.stringify( + moduleAndSpecifiers + )});`; + } + + const moduleName = moduleAndSpecifiers[0]; + const objectLookup = moduleAndSpecifiers + .slice(1) + .map(r => `[${JSON.stringify(r)}]`) + .join(""); + return `module.exports = require(${JSON.stringify( + moduleName + )})${objectLookup};`; + } + + checkExternalVariable(variableToCheck, request) { + return `if(typeof ${variableToCheck} === 'undefined') {${WebpackMissingModule.moduleCode( + request + )}}\n`; + } + + getSourceForAmdOrUmdExternal(id, optional, request) { + const externalVariable = `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier( + `${id}` + )}__`; + const missingModuleError = optional + ? this.checkExternalVariable(externalVariable, request) + : ""; + return `${missingModuleError}module.exports = ${externalVariable};`; + } + + getSourceForDefaultCase(optional, request) { + if (!Array.isArray(request)) { + // make it an array as the look up works the same basically + request = [request]; + } + + const variableName = request[0]; + const missingModuleError = optional + ? this.checkExternalVariable(variableName, request.join(".")) + : ""; + const objectLookup = request + .slice(1) + .map(r => `[${JSON.stringify(r)}]`) + .join(""); + return `${missingModuleError}module.exports = ${variableName}${objectLookup};`; + } + + getSourceString(runtime) { + const request = + typeof this.request === "object" && !Array.isArray(this.request) + ? this.request[this.externalType] + : this.request; + switch (this.externalType) { + case "this": + case "window": + case "self": + return this.getSourceForGlobalVariableExternal( + request, + this.externalType + ); + case "global": + return this.getSourceForGlobalVariableExternal( + request, + runtime.outputOptions.globalObject + ); + case "commonjs": + case "commonjs2": + return this.getSourceForCommonJsExternal(request); + case "amd": + case "amd-require": + case "umd": + case "umd2": + case "system": + return this.getSourceForAmdOrUmdExternal( + this.id, + this.optional, + request + ); + default: + return this.getSourceForDefaultCase(this.optional, request); + } + } + + getSource(sourceString) { + if (this.useSourceMap) { + return new OriginalSource(sourceString, this.identifier()); + } + + return new RawSource(sourceString); + } + + source(dependencyTemplates, runtime) { + return this.getSource(this.getSourceString(runtime)); + } + + size() { + return 42; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ + updateHash(hash) { + hash.update(this.externalType); + hash.update(JSON.stringify(this.request)); + hash.update(JSON.stringify(Boolean(this.optional))); + super.updateHash(hash); + } +} + +module.exports = ExternalModule; + + +/***/ }), + +/***/ 67876: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ExternalModule = __webpack_require__(17204); + +class ExternalModuleFactoryPlugin { + constructor(type, externals) { + this.type = type; + this.externals = externals; + } + + apply(normalModuleFactory) { + const globalType = this.type; + normalModuleFactory.hooks.factory.tap( + "ExternalModuleFactoryPlugin", + factory => (data, callback) => { + const context = data.context; + const dependency = data.dependencies[0]; + + const handleExternal = (value, type, callback) => { + if (typeof type === "function") { + callback = type; + type = undefined; + } + if (value === false) return factory(data, callback); + if (value === true) value = dependency.request; + if (type === undefined && /^[a-z0-9]+ /.test(value)) { + const idx = value.indexOf(" "); + type = value.substr(0, idx); + value = value.substr(idx + 1); + } + callback( + null, + new ExternalModule(value, type || globalType, dependency.request) + ); + return true; + }; + + const handleExternals = (externals, callback) => { + if (typeof externals === "string") { + if (externals === dependency.request) { + return handleExternal(dependency.request, callback); + } + } else if (Array.isArray(externals)) { + let i = 0; + const next = () => { + let asyncFlag; + const handleExternalsAndCallback = (err, module) => { + if (err) return callback(err); + if (!module) { + if (asyncFlag) { + asyncFlag = false; + return; + } + return next(); + } + callback(null, module); + }; + + do { + asyncFlag = true; + if (i >= externals.length) return callback(); + handleExternals(externals[i++], handleExternalsAndCallback); + } while (!asyncFlag); + asyncFlag = false; + }; + + next(); + return; + } else if (externals instanceof RegExp) { + if (externals.test(dependency.request)) { + return handleExternal(dependency.request, callback); + } + } else if (typeof externals === "function") { + externals.call( + null, + context, + dependency.request, + (err, value, type) => { + if (err) return callback(err); + if (value !== undefined) { + handleExternal(value, type, callback); + } else { + callback(); + } + } + ); + return; + } else if ( + typeof externals === "object" && + Object.prototype.hasOwnProperty.call(externals, dependency.request) + ) { + return handleExternal(externals[dependency.request], callback); + } + callback(); + }; + + handleExternals(this.externals, (err, module) => { + if (err) return callback(err); + if (!module) return handleExternal(false, callback); + return callback(null, module); + }); + } + ); + } +} +module.exports = ExternalModuleFactoryPlugin; + + +/***/ }), + +/***/ 75705: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ExternalModuleFactoryPlugin = __webpack_require__(67876); + +class ExternalsPlugin { + constructor(type, externals) { + this.type = type; + this.externals = externals; + } + apply(compiler) { + compiler.hooks.compile.tap("ExternalsPlugin", ({ normalModuleFactory }) => { + new ExternalModuleFactoryPlugin(this.type, this.externals).apply( + normalModuleFactory + ); + }); + } +} + +module.exports = ExternalsPlugin; + + +/***/ }), + +/***/ 47163: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Compiler")} Compiler */ + +class FlagAllModulesAsUsedPlugin { + constructor(explanation) { + this.explanation = explanation; + } + + /** + * @param {Compiler} compiler webpack compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "FlagAllModulesAsUsedPlugin", + compilation => { + compilation.hooks.optimizeDependencies.tap( + "FlagAllModulesAsUsedPlugin", + modules => { + for (const module of modules) { + module.used = true; + module.usedExports = true; + module.addReason(null, null, this.explanation); + } + } + ); + } + ); + } +} + +module.exports = FlagAllModulesAsUsedPlugin; + + +/***/ }), + +/***/ 73599: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Queue = __webpack_require__(38637); + +const addToSet = (a, b) => { + for (const item of b) { + a.add(item); + } +}; + +class FlagDependencyExportsPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "FlagDependencyExportsPlugin", + compilation => { + compilation.hooks.finishModules.tap( + "FlagDependencyExportsPlugin", + modules => { + const dependencies = new Map(); + + const queue = new Queue(); + + let module; + let moduleWithExports; + let moduleProvidedExports; + let providedExportsAreTemporary; + + const processDependenciesBlock = depBlock => { + for (const dep of depBlock.dependencies) { + if (processDependency(dep)) return true; + } + for (const variable of depBlock.variables) { + for (const dep of variable.dependencies) { + if (processDependency(dep)) return true; + } + } + for (const block of depBlock.blocks) { + if (processDependenciesBlock(block)) return true; + } + return false; + }; + + const processDependency = dep => { + const exportDesc = dep.getExports && dep.getExports(); + if (!exportDesc) return; + moduleWithExports = true; + const exports = exportDesc.exports; + // break early if it's only in the worst state + if (module.buildMeta.providedExports === true) { + return true; + } + // break if it should move to the worst state + if (exports === true) { + module.buildMeta.providedExports = true; + return true; + } + // merge in new exports + if (Array.isArray(exports)) { + addToSet(moduleProvidedExports, exports); + } + // store dependencies + const exportDeps = exportDesc.dependencies; + if (exportDeps) { + providedExportsAreTemporary = true; + for (const exportDependency of exportDeps) { + // add dependency for this module + const set = dependencies.get(exportDependency); + if (set === undefined) { + dependencies.set(exportDependency, new Set([module])); + } else { + set.add(module); + } + } + } + return false; + }; + + const notifyDependencies = () => { + const deps = dependencies.get(module); + if (deps !== undefined) { + for (const dep of deps) { + queue.enqueue(dep); + } + } + }; + + const notifyDependenciesIfDifferent = (set, array) => { + const deps = dependencies.get(module); + if (deps !== undefined) { + if (set.size === array.length) { + let i = 0; + let different = false; + for (const item of set) { + if (item !== array[i++]) { + different = true; + break; + } + } + if (!different) return; + } + for (const dep of deps) { + queue.enqueue(dep); + } + } + }; + + // Start with all modules without provided exports + for (const module of modules) { + if (module.buildInfo.temporaryProvidedExports) { + // Clear exports when they are temporary + // and recreate them + module.buildMeta.providedExports = null; + queue.enqueue(module); + } else if (!module.buildMeta.providedExports) { + queue.enqueue(module); + } + } + + while (queue.length > 0) { + module = queue.dequeue(); + + if (module.buildMeta.providedExports !== true) { + moduleWithExports = + module.buildMeta && module.buildMeta.exportsType; + moduleProvidedExports = new Set(); + providedExportsAreTemporary = false; + processDependenciesBlock(module); + module.buildInfo.temporaryProvidedExports = providedExportsAreTemporary; + if (!moduleWithExports) { + notifyDependencies(); + module.buildMeta.providedExports = true; + } else if (module.buildMeta.providedExports === true) { + notifyDependencies(); + } else if (!module.buildMeta.providedExports) { + notifyDependencies(); + module.buildMeta.providedExports = Array.from( + moduleProvidedExports + ); + } else { + notifyDependenciesIfDifferent( + moduleProvidedExports, + module.buildMeta.providedExports + ); + module.buildMeta.providedExports = Array.from( + moduleProvidedExports + ); + } + } + } + } + ); + const providedExportsCache = new WeakMap(); + compilation.hooks.rebuildModule.tap( + "FlagDependencyExportsPlugin", + module => { + providedExportsCache.set(module, module.buildMeta.providedExports); + } + ); + compilation.hooks.finishRebuildingModule.tap( + "FlagDependencyExportsPlugin", + module => { + module.buildMeta.providedExports = providedExportsCache.get(module); + } + ); + } + ); + } +} + +module.exports = FlagDependencyExportsPlugin; + + +/***/ }), + +/***/ 33632: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ + +/** @typedef {false | true | string[]} UsedExports */ + +const addToSet = (a, b) => { + for (const item of b) { + if (!a.includes(item)) a.push(item); + } + return a; +}; + +const isSubset = (biggerSet, subset) => { + if (biggerSet === true) return true; + if (subset === true) return false; + return subset.every(item => biggerSet.indexOf(item) >= 0); +}; + +class FlagDependencyUsagePlugin { + apply(compiler) { + compiler.hooks.compilation.tap("FlagDependencyUsagePlugin", compilation => { + compilation.hooks.optimizeDependencies.tap( + "FlagDependencyUsagePlugin", + modules => { + const processModule = (module, usedExports) => { + module.used = true; + if (module.usedExports === true) return; + if (usedExports === true) { + module.usedExports = true; + } else if (Array.isArray(usedExports)) { + const old = module.usedExports ? module.usedExports.length : -1; + module.usedExports = addToSet( + module.usedExports || [], + usedExports + ); + if (module.usedExports.length === old) { + return; + } + } else if (Array.isArray(module.usedExports)) { + return; + } else { + module.usedExports = false; + } + + // for a module without side effects we stop tracking usage here when no export is used + // This module won't be evaluated in this case + if (module.factoryMeta.sideEffectFree) { + if (module.usedExports === false) return; + if ( + Array.isArray(module.usedExports) && + module.usedExports.length === 0 + ) + return; + } + + queue.push([module, module, module.usedExports]); + }; + + const processDependenciesBlock = (module, depBlock, usedExports) => { + for (const dep of depBlock.dependencies) { + processDependency(module, dep); + } + for (const variable of depBlock.variables) { + for (const dep of variable.dependencies) { + processDependency(module, dep); + } + } + for (const block of depBlock.blocks) { + queue.push([module, block, usedExports]); + } + }; + + const processDependency = (module, dep) => { + const reference = compilation.getDependencyReference(module, dep); + if (!reference) return; + const referenceModule = reference.module; + const importedNames = reference.importedNames; + const oldUsed = referenceModule.used; + const oldUsedExports = referenceModule.usedExports; + if ( + !oldUsed || + (importedNames && + (!oldUsedExports || !isSubset(oldUsedExports, importedNames))) + ) { + processModule(referenceModule, importedNames); + } + }; + + for (const module of modules) { + if (!module.used) module.used = false; + } + + /** @type {[Module, DependenciesBlock, UsedExports][]} */ + const queue = []; + for (const preparedEntrypoint of compilation._preparedEntrypoints) { + if (preparedEntrypoint.module) { + processModule(preparedEntrypoint.module, true); + } + } + + while (queue.length) { + const queueItem = queue.pop(); + processDependenciesBlock(queueItem[0], queueItem[1], queueItem[2]); + } + } + ); + }); + } +} +module.exports = FlagDependencyUsagePlugin; + + +/***/ }), + +/***/ 31221: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const FunctionModuleTemplatePlugin = __webpack_require__(18864); + +class FunctionModulePlugin { + apply(compiler) { + compiler.hooks.compilation.tap("FunctionModulePlugin", compilation => { + new FunctionModuleTemplatePlugin().apply( + compilation.moduleTemplates.javascript + ); + }); + } +} + +module.exports = FunctionModulePlugin; + + +/***/ }), + +/***/ 18864: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { ConcatSource } = __webpack_require__(53665); +const Template = __webpack_require__(96066); + +class FunctionModuleTemplatePlugin { + apply(moduleTemplate) { + moduleTemplate.hooks.render.tap( + "FunctionModuleTemplatePlugin", + (moduleSource, module) => { + const source = new ConcatSource(); + const args = [module.moduleArgument]; + // TODO remove HACK checking type for javascript + if (module.type && module.type.startsWith("javascript")) { + args.push(module.exportsArgument); + if (module.hasDependencies(d => d.requireWebpackRequire !== false)) { + args.push("__webpack_require__"); + } + } else if (module.type && module.type.startsWith("json")) { + // no additional arguments needed + } else { + args.push(module.exportsArgument, "__webpack_require__"); + } + source.add("/***/ (function(" + args.join(", ") + ") {\n\n"); + if (module.buildInfo.strict) source.add('"use strict";\n'); + source.add(moduleSource); + source.add("\n\n/***/ })"); + return source; + } + ); + + moduleTemplate.hooks.package.tap( + "FunctionModuleTemplatePlugin", + (moduleSource, module) => { + if (moduleTemplate.runtimeTemplate.outputOptions.pathinfo) { + const source = new ConcatSource(); + const req = module.readableIdentifier( + moduleTemplate.runtimeTemplate.requestShortener + ); + const reqStr = req.replace(/\*\//g, "*_/"); + const reqStrStar = "*".repeat(reqStr.length); + source.add("/*!****" + reqStrStar + "****!*\\\n"); + source.add(" !*** " + reqStr + " ***!\n"); + source.add(" \\****" + reqStrStar + "****/\n"); + if ( + Array.isArray(module.buildMeta.providedExports) && + module.buildMeta.providedExports.length === 0 + ) { + source.add(Template.toComment("no exports provided") + "\n"); + } else if (Array.isArray(module.buildMeta.providedExports)) { + source.add( + Template.toComment( + "exports provided: " + + module.buildMeta.providedExports.join(", ") + ) + "\n" + ); + } else if (module.buildMeta.providedExports) { + source.add(Template.toComment("no static exports found") + "\n"); + } + if ( + Array.isArray(module.usedExports) && + module.usedExports.length === 0 + ) { + source.add(Template.toComment("no exports used") + "\n"); + } else if (Array.isArray(module.usedExports)) { + source.add( + Template.toComment( + "exports used: " + module.usedExports.join(", ") + ) + "\n" + ); + } else if (module.usedExports) { + source.add(Template.toComment("all exports used") + "\n"); + } + if (module.optimizationBailout) { + for (const text of module.optimizationBailout) { + let code; + if (typeof text === "function") { + code = text(moduleTemplate.runtimeTemplate.requestShortener); + } else { + code = text; + } + source.add(Template.toComment(`${code}`) + "\n"); + } + } + source.add(moduleSource); + return source; + } + return moduleSource; + } + ); + + moduleTemplate.hooks.hash.tap("FunctionModuleTemplatePlugin", hash => { + hash.update("FunctionModuleTemplatePlugin"); + hash.update("2"); + }); + } +} +module.exports = FunctionModuleTemplatePlugin; + + +/***/ }), + +/***/ 39172: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +/** @typedef {import("./NormalModule")} NormalModule */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate */ + +/** + * + */ +class Generator { + static byType(map) { + return new ByTypeGenerator(map); + } + + /** + * @abstract + * @param {NormalModule} module module for which the code should be generated + * @param {Map} dependencyTemplates mapping from dependencies to templates + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {string} type which kind of code should be generated + * @returns {Source} generated code + */ + generate(module, dependencyTemplates, runtimeTemplate, type) { + throw new Error("Generator.generate: must be overridden"); + } +} + +class ByTypeGenerator extends Generator { + constructor(map) { + super(); + this.map = map; + } + + /** + * @param {NormalModule} module module for which the code should be generated + * @param {Map} dependencyTemplates mapping from dependencies to templates + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {string} type which kind of code should be generated + * @returns {Source} generated code + */ + generate(module, dependencyTemplates, runtimeTemplate, type) { + const generator = this.map[type]; + if (!generator) { + throw new Error(`Generator.byType: no generator specified for ${type}`); + } + return generator.generate( + module, + dependencyTemplates, + runtimeTemplate, + type + ); + } +} + +module.exports = Generator; + + +/***/ }), + +/***/ 32973: +/***/ (function(__unused_webpack_module, exports) { + +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ + +/** + * @param {ChunkGroup} chunkGroup the ChunkGroup to connect + * @param {Chunk} chunk chunk to tie to ChunkGroup + * @returns {void} + */ +const connectChunkGroupAndChunk = (chunkGroup, chunk) => { + if (chunkGroup.pushChunk(chunk)) { + chunk.addGroup(chunkGroup); + } +}; + +/** + * @param {ChunkGroup} parent parent ChunkGroup to connect + * @param {ChunkGroup} child child ChunkGroup to connect + * @returns {void} + */ +const connectChunkGroupParentAndChild = (parent, child) => { + if (parent.addChild(child)) { + child.addParent(parent); + } +}; + +/** + * @param {Chunk} chunk Chunk to connect to Module + * @param {Module} module Module to connect to Chunk + * @returns {void} + */ +const connectChunkAndModule = (chunk, module) => { + if (module.addChunk(chunk)) { + chunk.addModule(module); + } +}; + +/** + * @param {Chunk} chunk Chunk being disconnected + * @param {Module} module Module being disconnected + * @returns {void} + */ +const disconnectChunkAndModule = (chunk, module) => { + chunk.removeModule(module); + module.removeChunk(chunk); +}; + +/** + * @param {AsyncDependenciesBlock} depBlock DepBlock being tied to ChunkGroup + * @param {ChunkGroup} chunkGroup ChunkGroup being tied to DepBlock + * @returns {void} + */ +const connectDependenciesBlockAndChunkGroup = (depBlock, chunkGroup) => { + if (chunkGroup.addBlock(depBlock)) { + depBlock.chunkGroup = chunkGroup; + } +}; + +exports.connectChunkGroupAndChunk = connectChunkGroupAndChunk; +exports.connectChunkGroupParentAndChild = connectChunkGroupParentAndChild; +exports.connectChunkAndModule = connectChunkAndModule; +exports.disconnectChunkAndModule = disconnectChunkAndModule; +exports.connectDependenciesBlockAndChunkGroup = connectDependenciesBlockAndChunkGroup; + + +/***/ }), + +/***/ 30327: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + +const WebpackError = __webpack_require__(97391); + +module.exports = class HarmonyLinkingError extends WebpackError { + /** @param {string} message Error message */ + constructor(message) { + super(message); + this.name = "HarmonyLinkingError"; + this.hideStack = true; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 50268: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const createHash = __webpack_require__(15660); + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(45843); + +/** @typedef {import("../declarations/plugins/HashedModuleIdsPlugin").HashedModuleIdsPluginOptions} HashedModuleIdsPluginOptions */ + +class HashedModuleIdsPlugin { + /** + * @param {HashedModuleIdsPluginOptions=} options options object + */ + constructor(options) { + if (!options) options = {}; + + validateOptions(schema, options, "Hashed Module Ids Plugin"); + + /** @type {HashedModuleIdsPluginOptions} */ + this.options = Object.assign( + { + context: null, + hashFunction: "md4", + hashDigest: "base64", + hashDigestLength: 4 + }, + options + ); + } + + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap("HashedModuleIdsPlugin", compilation => { + const usedIds = new Set(); + compilation.hooks.beforeModuleIds.tap( + "HashedModuleIdsPlugin", + modules => { + for (const module of modules) { + if (module.id === null && module.libIdent) { + const id = module.libIdent({ + context: this.options.context || compiler.options.context + }); + const hash = createHash(options.hashFunction); + hash.update(id); + const hashId = /** @type {string} */ (hash.digest( + options.hashDigest + )); + let len = options.hashDigestLength; + while (usedIds.has(hashId.substr(0, len))) len++; + module.id = hashId.substr(0, len); + usedIds.add(module.id); + } + } + } + ); + }); + } +} + +module.exports = HashedModuleIdsPlugin; + + +/***/ }), + +/***/ 65217: +/***/ (function(module) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// eslint-disable no-unused-vars +var $hash$ = undefined; +var $requestTimeout$ = undefined; +var installedModules = undefined; +var $require$ = undefined; +var hotDownloadManifest = undefined; +var hotDownloadUpdateChunk = undefined; +var hotDisposeChunk = undefined; +var modules = undefined; +var chunkId = undefined; + +module.exports = function() { + var hotApplyOnUpdate = true; + // eslint-disable-next-line no-unused-vars + var hotCurrentHash = $hash$; + var hotRequestTimeout = $requestTimeout$; + var hotCurrentModuleData = {}; + var hotCurrentChildModule; + // eslint-disable-next-line no-unused-vars + var hotCurrentParents = []; + // eslint-disable-next-line no-unused-vars + var hotCurrentParentsTemp = []; + + // eslint-disable-next-line no-unused-vars + function hotCreateRequire(moduleId) { + var me = installedModules[moduleId]; + if (!me) return $require$; + var fn = function(request) { + if (me.hot.active) { + if (installedModules[request]) { + if (installedModules[request].parents.indexOf(moduleId) === -1) { + installedModules[request].parents.push(moduleId); + } + } else { + hotCurrentParents = [moduleId]; + hotCurrentChildModule = request; + } + if (me.children.indexOf(request) === -1) { + me.children.push(request); + } + } else { + console.warn( + "[HMR] unexpected require(" + + request + + ") from disposed module " + + moduleId + ); + hotCurrentParents = []; + } + return $require$(request); + }; + var ObjectFactory = function ObjectFactory(name) { + return { + configurable: true, + enumerable: true, + get: function() { + return $require$[name]; + }, + set: function(value) { + $require$[name] = value; + } + }; + }; + for (var name in $require$) { + if ( + Object.prototype.hasOwnProperty.call($require$, name) && + name !== "e" && + name !== "t" + ) { + Object.defineProperty(fn, name, ObjectFactory(name)); + } + } + fn.e = function(chunkId) { + if (hotStatus === "ready") hotSetStatus("prepare"); + hotChunksLoading++; + return $require$.e(chunkId).then(finishChunkLoading, function(err) { + finishChunkLoading(); + throw err; + }); + + function finishChunkLoading() { + hotChunksLoading--; + if (hotStatus === "prepare") { + if (!hotWaitingFilesMap[chunkId]) { + hotEnsureUpdateChunk(chunkId); + } + if (hotChunksLoading === 0 && hotWaitingFiles === 0) { + hotUpdateDownloaded(); + } + } + } + }; + fn.t = function(value, mode) { + if (mode & 1) value = fn(value); + return $require$.t(value, mode & ~1); + }; + return fn; + } + + // eslint-disable-next-line no-unused-vars + function hotCreateModule(moduleId) { + var hot = { + // private stuff + _acceptedDependencies: {}, + _declinedDependencies: {}, + _selfAccepted: false, + _selfDeclined: false, + _selfInvalidated: false, + _disposeHandlers: [], + _main: hotCurrentChildModule !== moduleId, + + // Module API + active: true, + accept: function(dep, callback) { + if (dep === undefined) hot._selfAccepted = true; + else if (typeof dep === "function") hot._selfAccepted = dep; + else if (typeof dep === "object") + for (var i = 0; i < dep.length; i++) + hot._acceptedDependencies[dep[i]] = callback || function() {}; + else hot._acceptedDependencies[dep] = callback || function() {}; + }, + decline: function(dep) { + if (dep === undefined) hot._selfDeclined = true; + else if (typeof dep === "object") + for (var i = 0; i < dep.length; i++) + hot._declinedDependencies[dep[i]] = true; + else hot._declinedDependencies[dep] = true; + }, + dispose: function(callback) { + hot._disposeHandlers.push(callback); + }, + addDisposeHandler: function(callback) { + hot._disposeHandlers.push(callback); + }, + removeDisposeHandler: function(callback) { + var idx = hot._disposeHandlers.indexOf(callback); + if (idx >= 0) hot._disposeHandlers.splice(idx, 1); + }, + invalidate: function() { + this._selfInvalidated = true; + switch (hotStatus) { + case "idle": + hotUpdate = {}; + hotUpdate[moduleId] = modules[moduleId]; + hotSetStatus("ready"); + break; + case "ready": + hotApplyInvalidatedModule(moduleId); + break; + case "prepare": + case "check": + case "dispose": + case "apply": + (hotQueuedInvalidatedModules = + hotQueuedInvalidatedModules || []).push(moduleId); + break; + default: + // ignore requests in error states + break; + } + }, + + // Management API + check: hotCheck, + apply: hotApply, + status: function(l) { + if (!l) return hotStatus; + hotStatusHandlers.push(l); + }, + addStatusHandler: function(l) { + hotStatusHandlers.push(l); + }, + removeStatusHandler: function(l) { + var idx = hotStatusHandlers.indexOf(l); + if (idx >= 0) hotStatusHandlers.splice(idx, 1); + }, + + //inherit from previous dispose call + data: hotCurrentModuleData[moduleId] + }; + hotCurrentChildModule = undefined; + return hot; + } + + var hotStatusHandlers = []; + var hotStatus = "idle"; + + function hotSetStatus(newStatus) { + hotStatus = newStatus; + for (var i = 0; i < hotStatusHandlers.length; i++) + hotStatusHandlers[i].call(null, newStatus); + } + + // while downloading + var hotWaitingFiles = 0; + var hotChunksLoading = 0; + var hotWaitingFilesMap = {}; + var hotRequestedFilesMap = {}; + var hotAvailableFilesMap = {}; + var hotDeferred; + + // The update info + var hotUpdate, hotUpdateNewHash, hotQueuedInvalidatedModules; + + function toModuleId(id) { + var isNumber = +id + "" === id; + return isNumber ? +id : id; + } + + function hotCheck(apply) { + if (hotStatus !== "idle") { + throw new Error("check() is only allowed in idle status"); + } + hotApplyOnUpdate = apply; + hotSetStatus("check"); + return hotDownloadManifest(hotRequestTimeout).then(function(update) { + if (!update) { + hotSetStatus(hotApplyInvalidatedModules() ? "ready" : "idle"); + return null; + } + hotRequestedFilesMap = {}; + hotWaitingFilesMap = {}; + hotAvailableFilesMap = update.c; + hotUpdateNewHash = update.h; + + hotSetStatus("prepare"); + var promise = new Promise(function(resolve, reject) { + hotDeferred = { + resolve: resolve, + reject: reject + }; + }); + hotUpdate = {}; + /*foreachInstalledChunks*/ + // eslint-disable-next-line no-lone-blocks + { + hotEnsureUpdateChunk(chunkId); + } + if ( + hotStatus === "prepare" && + hotChunksLoading === 0 && + hotWaitingFiles === 0 + ) { + hotUpdateDownloaded(); + } + return promise; + }); + } + + // eslint-disable-next-line no-unused-vars + function hotAddUpdateChunk(chunkId, moreModules) { + if (!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId]) + return; + hotRequestedFilesMap[chunkId] = false; + for (var moduleId in moreModules) { + if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { + hotUpdate[moduleId] = moreModules[moduleId]; + } + } + if (--hotWaitingFiles === 0 && hotChunksLoading === 0) { + hotUpdateDownloaded(); + } + } + + function hotEnsureUpdateChunk(chunkId) { + if (!hotAvailableFilesMap[chunkId]) { + hotWaitingFilesMap[chunkId] = true; + } else { + hotRequestedFilesMap[chunkId] = true; + hotWaitingFiles++; + hotDownloadUpdateChunk(chunkId); + } + } + + function hotUpdateDownloaded() { + hotSetStatus("ready"); + var deferred = hotDeferred; + hotDeferred = null; + if (!deferred) return; + if (hotApplyOnUpdate) { + // Wrap deferred object in Promise to mark it as a well-handled Promise to + // avoid triggering uncaught exception warning in Chrome. + // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666 + Promise.resolve() + .then(function() { + return hotApply(hotApplyOnUpdate); + }) + .then( + function(result) { + deferred.resolve(result); + }, + function(err) { + deferred.reject(err); + } + ); + } else { + var outdatedModules = []; + for (var id in hotUpdate) { + if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) { + outdatedModules.push(toModuleId(id)); + } + } + deferred.resolve(outdatedModules); + } + } + + function hotApply(options) { + if (hotStatus !== "ready") + throw new Error("apply() is only allowed in ready status"); + options = options || {}; + return hotApplyInternal(options); + } + + function hotApplyInternal(options) { + hotApplyInvalidatedModules(); + + var cb; + var i; + var j; + var module; + var moduleId; + + function getAffectedStuff(updateModuleId) { + var outdatedModules = [updateModuleId]; + var outdatedDependencies = {}; + + var queue = outdatedModules.map(function(id) { + return { + chain: [id], + id: id + }; + }); + while (queue.length > 0) { + var queueItem = queue.pop(); + var moduleId = queueItem.id; + var chain = queueItem.chain; + module = installedModules[moduleId]; + if ( + !module || + (module.hot._selfAccepted && !module.hot._selfInvalidated) + ) + continue; + if (module.hot._selfDeclined) { + return { + type: "self-declined", + chain: chain, + moduleId: moduleId + }; + } + if (module.hot._main) { + return { + type: "unaccepted", + chain: chain, + moduleId: moduleId + }; + } + for (var i = 0; i < module.parents.length; i++) { + var parentId = module.parents[i]; + var parent = installedModules[parentId]; + if (!parent) continue; + if (parent.hot._declinedDependencies[moduleId]) { + return { + type: "declined", + chain: chain.concat([parentId]), + moduleId: moduleId, + parentId: parentId + }; + } + if (outdatedModules.indexOf(parentId) !== -1) continue; + if (parent.hot._acceptedDependencies[moduleId]) { + if (!outdatedDependencies[parentId]) + outdatedDependencies[parentId] = []; + addAllToSet(outdatedDependencies[parentId], [moduleId]); + continue; + } + delete outdatedDependencies[parentId]; + outdatedModules.push(parentId); + queue.push({ + chain: chain.concat([parentId]), + id: parentId + }); + } + } + + return { + type: "accepted", + moduleId: updateModuleId, + outdatedModules: outdatedModules, + outdatedDependencies: outdatedDependencies + }; + } + + function addAllToSet(a, b) { + for (var i = 0; i < b.length; i++) { + var item = b[i]; + if (a.indexOf(item) === -1) a.push(item); + } + } + + // at begin all updates modules are outdated + // the "outdated" status can propagate to parents if they don't accept the children + var outdatedDependencies = {}; + var outdatedModules = []; + var appliedUpdate = {}; + + var warnUnexpectedRequire = function warnUnexpectedRequire() { + console.warn( + "[HMR] unexpected require(" + result.moduleId + ") to disposed module" + ); + }; + + for (var id in hotUpdate) { + if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) { + moduleId = toModuleId(id); + /** @type {TODO} */ + var result; + if (hotUpdate[id]) { + result = getAffectedStuff(moduleId); + } else { + result = { + type: "disposed", + moduleId: id + }; + } + /** @type {Error|false} */ + var abortError = false; + var doApply = false; + var doDispose = false; + var chainInfo = ""; + if (result.chain) { + chainInfo = "\nUpdate propagation: " + result.chain.join(" -> "); + } + switch (result.type) { + case "self-declined": + if (options.onDeclined) options.onDeclined(result); + if (!options.ignoreDeclined) + abortError = new Error( + "Aborted because of self decline: " + + result.moduleId + + chainInfo + ); + break; + case "declined": + if (options.onDeclined) options.onDeclined(result); + if (!options.ignoreDeclined) + abortError = new Error( + "Aborted because of declined dependency: " + + result.moduleId + + " in " + + result.parentId + + chainInfo + ); + break; + case "unaccepted": + if (options.onUnaccepted) options.onUnaccepted(result); + if (!options.ignoreUnaccepted) + abortError = new Error( + "Aborted because " + moduleId + " is not accepted" + chainInfo + ); + break; + case "accepted": + if (options.onAccepted) options.onAccepted(result); + doApply = true; + break; + case "disposed": + if (options.onDisposed) options.onDisposed(result); + doDispose = true; + break; + default: + throw new Error("Unexception type " + result.type); + } + if (abortError) { + hotSetStatus("abort"); + return Promise.reject(abortError); + } + if (doApply) { + appliedUpdate[moduleId] = hotUpdate[moduleId]; + addAllToSet(outdatedModules, result.outdatedModules); + for (moduleId in result.outdatedDependencies) { + if ( + Object.prototype.hasOwnProperty.call( + result.outdatedDependencies, + moduleId + ) + ) { + if (!outdatedDependencies[moduleId]) + outdatedDependencies[moduleId] = []; + addAllToSet( + outdatedDependencies[moduleId], + result.outdatedDependencies[moduleId] + ); + } + } + } + if (doDispose) { + addAllToSet(outdatedModules, [result.moduleId]); + appliedUpdate[moduleId] = warnUnexpectedRequire; + } + } + } + + // Store self accepted outdated modules to require them later by the module system + var outdatedSelfAcceptedModules = []; + for (i = 0; i < outdatedModules.length; i++) { + moduleId = outdatedModules[i]; + if ( + installedModules[moduleId] && + installedModules[moduleId].hot._selfAccepted && + // removed self-accepted modules should not be required + appliedUpdate[moduleId] !== warnUnexpectedRequire && + // when called invalidate self-accepting is not possible + !installedModules[moduleId].hot._selfInvalidated + ) { + outdatedSelfAcceptedModules.push({ + module: moduleId, + parents: installedModules[moduleId].parents.slice(), + errorHandler: installedModules[moduleId].hot._selfAccepted + }); + } + } + + // Now in "dispose" phase + hotSetStatus("dispose"); + Object.keys(hotAvailableFilesMap).forEach(function(chunkId) { + if (hotAvailableFilesMap[chunkId] === false) { + hotDisposeChunk(chunkId); + } + }); + + var idx; + var queue = outdatedModules.slice(); + while (queue.length > 0) { + moduleId = queue.pop(); + module = installedModules[moduleId]; + if (!module) continue; + + var data = {}; + + // Call dispose handlers + var disposeHandlers = module.hot._disposeHandlers; + for (j = 0; j < disposeHandlers.length; j++) { + cb = disposeHandlers[j]; + cb(data); + } + hotCurrentModuleData[moduleId] = data; + + // disable module (this disables requires from this module) + module.hot.active = false; + + // remove module from cache + delete installedModules[moduleId]; + + // when disposing there is no need to call dispose handler + delete outdatedDependencies[moduleId]; + + // remove "parents" references from all children + for (j = 0; j < module.children.length; j++) { + var child = installedModules[module.children[j]]; + if (!child) continue; + idx = child.parents.indexOf(moduleId); + if (idx >= 0) { + child.parents.splice(idx, 1); + } + } + } + + // remove outdated dependency from module children + var dependency; + var moduleOutdatedDependencies; + for (moduleId in outdatedDependencies) { + if ( + Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId) + ) { + module = installedModules[moduleId]; + if (module) { + moduleOutdatedDependencies = outdatedDependencies[moduleId]; + for (j = 0; j < moduleOutdatedDependencies.length; j++) { + dependency = moduleOutdatedDependencies[j]; + idx = module.children.indexOf(dependency); + if (idx >= 0) module.children.splice(idx, 1); + } + } + } + } + + // Now in "apply" phase + hotSetStatus("apply"); + + if (hotUpdateNewHash !== undefined) { + hotCurrentHash = hotUpdateNewHash; + hotUpdateNewHash = undefined; + } + hotUpdate = undefined; + + // insert new code + for (moduleId in appliedUpdate) { + if (Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) { + modules[moduleId] = appliedUpdate[moduleId]; + } + } + + // call accept handlers + var error = null; + for (moduleId in outdatedDependencies) { + if ( + Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId) + ) { + module = installedModules[moduleId]; + if (module) { + moduleOutdatedDependencies = outdatedDependencies[moduleId]; + var callbacks = []; + for (i = 0; i < moduleOutdatedDependencies.length; i++) { + dependency = moduleOutdatedDependencies[i]; + cb = module.hot._acceptedDependencies[dependency]; + if (cb) { + if (callbacks.indexOf(cb) !== -1) continue; + callbacks.push(cb); + } + } + for (i = 0; i < callbacks.length; i++) { + cb = callbacks[i]; + try { + cb(moduleOutdatedDependencies); + } catch (err) { + if (options.onErrored) { + options.onErrored({ + type: "accept-errored", + moduleId: moduleId, + dependencyId: moduleOutdatedDependencies[i], + error: err + }); + } + if (!options.ignoreErrored) { + if (!error) error = err; + } + } + } + } + } + } + + // Load self accepted modules + for (i = 0; i < outdatedSelfAcceptedModules.length; i++) { + var item = outdatedSelfAcceptedModules[i]; + moduleId = item.module; + hotCurrentParents = item.parents; + hotCurrentChildModule = moduleId; + try { + $require$(moduleId); + } catch (err) { + if (typeof item.errorHandler === "function") { + try { + item.errorHandler(err); + } catch (err2) { + if (options.onErrored) { + options.onErrored({ + type: "self-accept-error-handler-errored", + moduleId: moduleId, + error: err2, + originalError: err + }); + } + if (!options.ignoreErrored) { + if (!error) error = err2; + } + if (!error) error = err; + } + } else { + if (options.onErrored) { + options.onErrored({ + type: "self-accept-errored", + moduleId: moduleId, + error: err + }); + } + if (!options.ignoreErrored) { + if (!error) error = err; + } + } + } + } + + // handle errors in accept handlers and self accepted module load + if (error) { + hotSetStatus("fail"); + return Promise.reject(error); + } + + if (hotQueuedInvalidatedModules) { + return hotApplyInternal(options).then(function(list) { + outdatedModules.forEach(function(moduleId) { + if (list.indexOf(moduleId) < 0) list.push(moduleId); + }); + return list; + }); + } + + hotSetStatus("idle"); + return new Promise(function(resolve) { + resolve(outdatedModules); + }); + } + + function hotApplyInvalidatedModules() { + if (hotQueuedInvalidatedModules) { + if (!hotUpdate) hotUpdate = {}; + hotQueuedInvalidatedModules.forEach(hotApplyInvalidatedModule); + hotQueuedInvalidatedModules = undefined; + return true; + } + } + + function hotApplyInvalidatedModule(moduleId) { + if (!Object.prototype.hasOwnProperty.call(hotUpdate, moduleId)) + hotUpdate[moduleId] = modules[moduleId]; + } +}; + + +/***/ }), + +/***/ 69575: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { SyncBailHook } = __webpack_require__(92402); +const { RawSource } = __webpack_require__(53665); +const Template = __webpack_require__(96066); +const ModuleHotAcceptDependency = __webpack_require__(29018); +const ModuleHotDeclineDependency = __webpack_require__(60482); +const ConstDependency = __webpack_require__(71101); +const NullFactory = __webpack_require__(40438); +const ParserHelpers = __webpack_require__(23999); + +module.exports = class HotModuleReplacementPlugin { + constructor(options) { + this.options = options || {}; + this.multiStep = this.options.multiStep; + this.fullBuildTimeout = this.options.fullBuildTimeout || 200; + this.requestTimeout = this.options.requestTimeout || 10000; + } + + apply(compiler) { + const multiStep = this.multiStep; + const fullBuildTimeout = this.fullBuildTimeout; + const requestTimeout = this.requestTimeout; + const hotUpdateChunkFilename = + compiler.options.output.hotUpdateChunkFilename; + const hotUpdateMainFilename = compiler.options.output.hotUpdateMainFilename; + compiler.hooks.additionalPass.tapAsync( + "HotModuleReplacementPlugin", + callback => { + if (multiStep) return setTimeout(callback, fullBuildTimeout); + return callback(); + } + ); + + const addParserPlugins = (parser, parserOptions) => { + parser.hooks.expression + .for("__webpack_hash__") + .tap( + "HotModuleReplacementPlugin", + ParserHelpers.toConstantDependencyWithWebpackRequire( + parser, + "__webpack_require__.h()" + ) + ); + parser.hooks.evaluateTypeof + .for("__webpack_hash__") + .tap( + "HotModuleReplacementPlugin", + ParserHelpers.evaluateToString("string") + ); + parser.hooks.evaluateIdentifier.for("module.hot").tap( + { + name: "HotModuleReplacementPlugin", + before: "NodeStuffPlugin" + }, + expr => { + return ParserHelpers.evaluateToIdentifier( + "module.hot", + !!parser.state.compilation.hotUpdateChunkTemplate + )(expr); + } + ); + // TODO webpack 5: refactor this, no custom hooks + if (!parser.hooks.hotAcceptCallback) { + parser.hooks.hotAcceptCallback = new SyncBailHook([ + "expression", + "requests" + ]); + } + if (!parser.hooks.hotAcceptWithoutCallback) { + parser.hooks.hotAcceptWithoutCallback = new SyncBailHook([ + "expression", + "requests" + ]); + } + parser.hooks.call + .for("module.hot.accept") + .tap("HotModuleReplacementPlugin", expr => { + if (!parser.state.compilation.hotUpdateChunkTemplate) { + return false; + } + if (expr.arguments.length >= 1) { + const arg = parser.evaluateExpression(expr.arguments[0]); + let params = []; + let requests = []; + if (arg.isString()) { + params = [arg]; + } else if (arg.isArray()) { + params = arg.items.filter(param => param.isString()); + } + if (params.length > 0) { + params.forEach((param, idx) => { + const request = param.string; + const dep = new ModuleHotAcceptDependency(request, param.range); + dep.optional = true; + dep.loc = Object.create(expr.loc); + dep.loc.index = idx; + parser.state.module.addDependency(dep); + requests.push(request); + }); + if (expr.arguments.length > 1) { + parser.hooks.hotAcceptCallback.call( + expr.arguments[1], + requests + ); + parser.walkExpression(expr.arguments[1]); // other args are ignored + return true; + } else { + parser.hooks.hotAcceptWithoutCallback.call(expr, requests); + return true; + } + } + } + }); + parser.hooks.call + .for("module.hot.decline") + .tap("HotModuleReplacementPlugin", expr => { + if (!parser.state.compilation.hotUpdateChunkTemplate) { + return false; + } + if (expr.arguments.length === 1) { + const arg = parser.evaluateExpression(expr.arguments[0]); + let params = []; + if (arg.isString()) { + params = [arg]; + } else if (arg.isArray()) { + params = arg.items.filter(param => param.isString()); + } + params.forEach((param, idx) => { + const dep = new ModuleHotDeclineDependency( + param.string, + param.range + ); + dep.optional = true; + dep.loc = Object.create(expr.loc); + dep.loc.index = idx; + parser.state.module.addDependency(dep); + }); + } + }); + parser.hooks.expression + .for("module.hot") + .tap("HotModuleReplacementPlugin", ParserHelpers.skipTraversal); + }; + + compiler.hooks.compilation.tap( + "HotModuleReplacementPlugin", + (compilation, { normalModuleFactory }) => { + // This applies the HMR plugin only to the targeted compiler + // It should not affect child compilations + if (compilation.compiler !== compiler) return; + + const hotUpdateChunkTemplate = compilation.hotUpdateChunkTemplate; + if (!hotUpdateChunkTemplate) return; + + compilation.dependencyFactories.set(ConstDependency, new NullFactory()); + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + compilation.dependencyFactories.set( + ModuleHotAcceptDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ModuleHotAcceptDependency, + new ModuleHotAcceptDependency.Template() + ); + + compilation.dependencyFactories.set( + ModuleHotDeclineDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ModuleHotDeclineDependency, + new ModuleHotDeclineDependency.Template() + ); + + compilation.hooks.record.tap( + "HotModuleReplacementPlugin", + (compilation, records) => { + if (records.hash === compilation.hash) return; + records.hash = compilation.hash; + records.moduleHashs = {}; + for (const module of compilation.modules) { + const identifier = module.identifier(); + records.moduleHashs[identifier] = module.hash; + } + records.chunkHashs = {}; + for (const chunk of compilation.chunks) { + records.chunkHashs[chunk.id] = chunk.hash; + } + records.chunkModuleIds = {}; + for (const chunk of compilation.chunks) { + records.chunkModuleIds[chunk.id] = Array.from( + chunk.modulesIterable, + m => m.id + ); + } + } + ); + let initialPass = false; + let recompilation = false; + compilation.hooks.afterHash.tap("HotModuleReplacementPlugin", () => { + let records = compilation.records; + if (!records) { + initialPass = true; + return; + } + if (!records.hash) initialPass = true; + const preHash = records.preHash || "x"; + const prepreHash = records.prepreHash || "x"; + if (preHash === compilation.hash) { + recompilation = true; + compilation.modifyHash(prepreHash); + return; + } + records.prepreHash = records.hash || "x"; + records.preHash = compilation.hash; + compilation.modifyHash(records.prepreHash); + }); + compilation.hooks.shouldGenerateChunkAssets.tap( + "HotModuleReplacementPlugin", + () => { + if (multiStep && !recompilation && !initialPass) return false; + } + ); + compilation.hooks.needAdditionalPass.tap( + "HotModuleReplacementPlugin", + () => { + if (multiStep && !recompilation && !initialPass) return true; + } + ); + compilation.hooks.additionalChunkAssets.tap( + "HotModuleReplacementPlugin", + () => { + const records = compilation.records; + if (records.hash === compilation.hash) return; + if ( + !records.moduleHashs || + !records.chunkHashs || + !records.chunkModuleIds + ) + return; + for (const module of compilation.modules) { + const identifier = module.identifier(); + let hash = module.hash; + module.hotUpdate = records.moduleHashs[identifier] !== hash; + } + const hotUpdateMainContent = { + h: compilation.hash, + c: {} + }; + for (const key of Object.keys(records.chunkHashs)) { + const chunkId = isNaN(+key) ? key : +key; + const currentChunk = compilation.chunks.find( + chunk => `${chunk.id}` === key + ); + if (currentChunk) { + const newModules = currentChunk + .getModules() + .filter(module => module.hotUpdate); + const allModules = new Set(); + for (const module of currentChunk.modulesIterable) { + allModules.add(module.id); + } + const removedModules = records.chunkModuleIds[chunkId].filter( + id => !allModules.has(id) + ); + if (newModules.length > 0 || removedModules.length > 0) { + const source = hotUpdateChunkTemplate.render( + chunkId, + newModules, + removedModules, + compilation.hash, + compilation.moduleTemplates.javascript, + compilation.dependencyTemplates + ); + const { + path: filename, + info: assetInfo + } = compilation.getPathWithInfo(hotUpdateChunkFilename, { + hash: records.hash, + chunk: currentChunk + }); + compilation.additionalChunkAssets.push(filename); + compilation.emitAsset( + filename, + source, + Object.assign({ hotModuleReplacement: true }, assetInfo) + ); + hotUpdateMainContent.c[chunkId] = true; + currentChunk.files.push(filename); + compilation.hooks.chunkAsset.call(currentChunk, filename); + } + } else { + hotUpdateMainContent.c[chunkId] = false; + } + } + const source = new RawSource(JSON.stringify(hotUpdateMainContent)); + const { + path: filename, + info: assetInfo + } = compilation.getPathWithInfo(hotUpdateMainFilename, { + hash: records.hash + }); + compilation.emitAsset( + filename, + source, + Object.assign({ hotModuleReplacement: true }, assetInfo) + ); + } + ); + + const mainTemplate = compilation.mainTemplate; + + mainTemplate.hooks.hash.tap("HotModuleReplacementPlugin", hash => { + hash.update("HotMainTemplateDecorator"); + }); + + mainTemplate.hooks.moduleRequire.tap( + "HotModuleReplacementPlugin", + (_, chunk, hash, varModuleId) => { + return `hotCreateRequire(${varModuleId})`; + } + ); + + mainTemplate.hooks.requireExtensions.tap( + "HotModuleReplacementPlugin", + source => { + const buf = [source]; + buf.push(""); + buf.push("// __webpack_hash__"); + buf.push( + mainTemplate.requireFn + + ".h = function() { return hotCurrentHash; };" + ); + return Template.asString(buf); + } + ); + + const needChunkLoadingCode = chunk => { + for (const chunkGroup of chunk.groupsIterable) { + if (chunkGroup.chunks.length > 1) return true; + if (chunkGroup.getNumberOfChildren() > 0) return true; + } + return false; + }; + + mainTemplate.hooks.bootstrap.tap( + "HotModuleReplacementPlugin", + (source, chunk, hash) => { + source = mainTemplate.hooks.hotBootstrap.call(source, chunk, hash); + return Template.asString([ + source, + "", + hotInitCode + .replace(/\$require\$/g, mainTemplate.requireFn) + .replace(/\$hash\$/g, JSON.stringify(hash)) + .replace(/\$requestTimeout\$/g, requestTimeout) + .replace( + /\/\*foreachInstalledChunks\*\//g, + needChunkLoadingCode(chunk) + ? "for(var chunkId in installedChunks)" + : `var chunkId = ${JSON.stringify(chunk.id)};` + ) + ]); + } + ); + + mainTemplate.hooks.globalHash.tap( + "HotModuleReplacementPlugin", + () => true + ); + + mainTemplate.hooks.currentHash.tap( + "HotModuleReplacementPlugin", + (_, length) => { + if (isFinite(length)) { + return `hotCurrentHash.substr(0, ${length})`; + } else { + return "hotCurrentHash"; + } + } + ); + + mainTemplate.hooks.moduleObj.tap( + "HotModuleReplacementPlugin", + (source, chunk, hash, varModuleId) => { + return Template.asString([ + `${source},`, + `hot: hotCreateModule(${varModuleId}),`, + "parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),", + "children: []" + ]); + } + ); + + // TODO add HMR support for javascript/esm + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("HotModuleReplacementPlugin", addParserPlugins); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("HotModuleReplacementPlugin", addParserPlugins); + + compilation.hooks.normalModuleLoader.tap( + "HotModuleReplacementPlugin", + context => { + context.hot = true; + } + ); + } + ); + } +}; + +const hotInitCode = Template.getFunctionContent( + __webpack_require__(65217) +); + + +/***/ }), + +/***/ 26782: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Chunk = __webpack_require__(2919); + +class HotUpdateChunk extends Chunk { + constructor() { + super(); + /** @type {(string|number)[]} */ + this.removedModules = undefined; + } +} + +module.exports = HotUpdateChunk; + + +/***/ }), + +/***/ 66062: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Template = __webpack_require__(96066); +const HotUpdateChunk = __webpack_require__(26782); +const { Tapable, SyncWaterfallHook, SyncHook } = __webpack_require__(92402); + +module.exports = class HotUpdateChunkTemplate extends Tapable { + constructor(outputOptions) { + super(); + this.outputOptions = outputOptions || {}; + this.hooks = { + modules: new SyncWaterfallHook([ + "source", + "modules", + "removedModules", + "moduleTemplate", + "dependencyTemplates" + ]), + render: new SyncWaterfallHook([ + "source", + "modules", + "removedModules", + "hash", + "id", + "moduleTemplate", + "dependencyTemplates" + ]), + hash: new SyncHook(["hash"]) + }; + } + + render( + id, + modules, + removedModules, + hash, + moduleTemplate, + dependencyTemplates + ) { + const hotUpdateChunk = new HotUpdateChunk(); + hotUpdateChunk.id = id; + hotUpdateChunk.setModules(modules); + hotUpdateChunk.removedModules = removedModules; + const modulesSource = Template.renderChunkModules( + hotUpdateChunk, + m => typeof m.source === "function", + moduleTemplate, + dependencyTemplates + ); + const core = this.hooks.modules.call( + modulesSource, + modules, + removedModules, + moduleTemplate, + dependencyTemplates + ); + const source = this.hooks.render.call( + core, + modules, + removedModules, + hash, + id, + moduleTemplate, + dependencyTemplates + ); + return source; + } + + updateHash(hash) { + hash.update("HotUpdateChunkTemplate"); + hash.update("1"); + this.hooks.hash.call(hash); + } +}; + + +/***/ }), + +/***/ 41364: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(69667); + +/** @typedef {import("../declarations/plugins/IgnorePlugin").IgnorePluginOptions} IgnorePluginOptions */ +/** @typedef {import("./Compiler")} Compiler */ + +class IgnorePlugin { + /** + * @param {IgnorePluginOptions} options IgnorePlugin options + */ + constructor(options) { + // TODO webpack 5 remove this compat-layer + if (arguments.length > 1 || options instanceof RegExp) { + options = { + resourceRegExp: arguments[0], + contextRegExp: arguments[1] + }; + } + + validateOptions(schema, options, "IgnorePlugin"); + this.options = options; + + /** @private @type {Function} */ + this.checkIgnore = this.checkIgnore.bind(this); + } + + /** + * Note that if "contextRegExp" is given, both the "resourceRegExp" + * and "contextRegExp" have to match. + * + * @param {TODO} result result + * @returns {TODO|null} returns result or null if result should be ignored + */ + checkIgnore(result) { + if (!result) return result; + + if ( + "checkResource" in this.options && + this.options.checkResource && + this.options.checkResource(result.request, result.context) + ) { + // TODO webpack 5 remove checkContext, as checkResource already gets context + if ("checkContext" in this.options && this.options.checkContext) { + if (this.options.checkContext(result.context)) { + return null; + } + } else { + return null; + } + } + + if ( + "resourceRegExp" in this.options && + this.options.resourceRegExp && + this.options.resourceRegExp.test(result.request) + ) { + if ("contextRegExp" in this.options && this.options.contextRegExp) { + // if "contextRegExp" is given, + // both the "resourceRegExp" and "contextRegExp" have to match. + if (this.options.contextRegExp.test(result.context)) { + return null; + } + } else { + return null; + } + } + + return result; + } + + /** + * @param {Compiler} compiler Webpack Compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.normalModuleFactory.tap("IgnorePlugin", nmf => { + nmf.hooks.beforeResolve.tap("IgnorePlugin", this.checkIgnore); + }); + compiler.hooks.contextModuleFactory.tap("IgnorePlugin", cmf => { + cmf.hooks.beforeResolve.tap("IgnorePlugin", this.checkIgnore); + }); + } +} + +module.exports = IgnorePlugin; + + +/***/ }), + +/***/ 98509: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { RawSource, ReplaceSource } = __webpack_require__(53665); + +// TODO: clean up this file +// replace with newer constructs + +// TODO: remove DependencyVariables and replace them with something better + +class JavascriptGenerator { + generate(module, dependencyTemplates, runtimeTemplate) { + const originalSource = module.originalSource(); + if (!originalSource) { + return new RawSource("throw new Error('No source available');"); + } + + const source = new ReplaceSource(originalSource); + + this.sourceBlock( + module, + module, + [], + dependencyTemplates, + source, + runtimeTemplate + ); + + return source; + } + + sourceBlock( + module, + block, + availableVars, + dependencyTemplates, + source, + runtimeTemplate + ) { + for (const dependency of block.dependencies) { + this.sourceDependency( + dependency, + dependencyTemplates, + source, + runtimeTemplate + ); + } + + /** + * Get the variables of all blocks that we need to inject. + * These will contain the variable name and its expression. + * The name will be added as a parameter in a IIFE the expression as its value. + */ + const vars = block.variables.reduce((result, value) => { + const variable = this.sourceVariables( + value, + availableVars, + dependencyTemplates, + runtimeTemplate + ); + + if (variable) { + result.push(variable); + } + + return result; + }, []); + + /** + * if we actually have variables + * this is important as how #splitVariablesInUniqueNamedChunks works + * it will always return an array in an array which would lead to a IIFE wrapper around + * a module if we do this with an empty vars array. + */ + if (vars.length > 0) { + /** + * Split all variables up into chunks of unique names. + * e.g. imagine you have the following variable names that need to be injected: + * [foo, bar, baz, foo, some, more] + * we can not inject "foo" twice, therefore we just make two IIFEs like so: + * (function(foo, bar, baz){ + * (function(foo, some, more){ + * … + * }(…)); + * }(…)); + * + * "splitVariablesInUniqueNamedChunks" splits the variables shown above up to this: + * [[foo, bar, baz], [foo, some, more]] + */ + const injectionVariableChunks = this.splitVariablesInUniqueNamedChunks( + vars + ); + + // create all the beginnings of IIFEs + const functionWrapperStarts = injectionVariableChunks.map( + variableChunk => { + return this.variableInjectionFunctionWrapperStartCode( + variableChunk.map(variable => variable.name) + ); + } + ); + + // and all the ends + const functionWrapperEnds = injectionVariableChunks.map(variableChunk => { + return this.variableInjectionFunctionWrapperEndCode( + module, + variableChunk.map(variable => variable.expression), + block + ); + }); + + // join them to one big string + const varStartCode = functionWrapperStarts.join(""); + + // reverse the ends first before joining them, as the last added must be the inner most + const varEndCode = functionWrapperEnds.reverse().join(""); + + // if we have anything, add it to the source + if (varStartCode && varEndCode) { + const start = block.range ? block.range[0] : -10; + const end = block.range + ? block.range[1] + : module.originalSource().size() + 1; + source.insert(start + 0.5, varStartCode); + source.insert(end + 0.5, "\n/* WEBPACK VAR INJECTION */" + varEndCode); + } + } + + for (const childBlock of block.blocks) { + this.sourceBlock( + module, + childBlock, + availableVars.concat(vars), + dependencyTemplates, + source, + runtimeTemplate + ); + } + } + + sourceDependency(dependency, dependencyTemplates, source, runtimeTemplate) { + const template = dependencyTemplates.get(dependency.constructor); + if (!template) { + throw new Error( + "No template for dependency: " + dependency.constructor.name + ); + } + template.apply(dependency, source, runtimeTemplate, dependencyTemplates); + } + + sourceVariables( + variable, + availableVars, + dependencyTemplates, + runtimeTemplate + ) { + const name = variable.name; + const expr = variable.expressionSource( + dependencyTemplates, + runtimeTemplate + ); + + if ( + availableVars.some( + v => v.name === name && v.expression.source() === expr.source() + ) + ) { + return; + } + return { + name: name, + expression: expr + }; + } + + /* + * creates the start part of a IIFE around the module to inject a variable name + * (function(…){ <- this part + * }.call(…)) + */ + variableInjectionFunctionWrapperStartCode(varNames) { + const args = varNames.join(", "); + return `/* WEBPACK VAR INJECTION */(function(${args}) {`; + } + + contextArgument(module, block) { + if (this === block) { + return module.exportsArgument; + } + return "this"; + } + + /* + * creates the end part of a IIFE around the module to inject a variable name + * (function(…){ + * }.call(…)) <- this part + */ + variableInjectionFunctionWrapperEndCode(module, varExpressions, block) { + const firstParam = this.contextArgument(module, block); + const furtherParams = varExpressions.map(e => e.source()).join(", "); + return `}.call(${firstParam}, ${furtherParams}))`; + } + + splitVariablesInUniqueNamedChunks(vars) { + const startState = [[]]; + return vars.reduce((chunks, variable) => { + const current = chunks[chunks.length - 1]; + // check if variable with same name exists already + // if so create a new chunk of variables. + const variableNameAlreadyExists = current.some( + v => v.name === variable.name + ); + + if (variableNameAlreadyExists) { + // start new chunk with current variable + chunks.push([variable]); + } else { + // else add it to current chunk + current.push(variable); + } + return chunks; + }, startState); + } +} + +module.exports = JavascriptGenerator; + + +/***/ }), + +/***/ 10339: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Parser = __webpack_require__(70558); +const Template = __webpack_require__(96066); +const { ConcatSource } = __webpack_require__(53665); +const JavascriptGenerator = __webpack_require__(98509); +const createHash = __webpack_require__(15660); + +class JavascriptModulesPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "JavascriptModulesPlugin", + (compilation, { normalModuleFactory }) => { + normalModuleFactory.hooks.createParser + .for("javascript/auto") + .tap("JavascriptModulesPlugin", options => { + return new Parser(options, "auto"); + }); + normalModuleFactory.hooks.createParser + .for("javascript/dynamic") + .tap("JavascriptModulesPlugin", options => { + return new Parser(options, "script"); + }); + normalModuleFactory.hooks.createParser + .for("javascript/esm") + .tap("JavascriptModulesPlugin", options => { + return new Parser(options, "module"); + }); + normalModuleFactory.hooks.createGenerator + .for("javascript/auto") + .tap("JavascriptModulesPlugin", () => { + return new JavascriptGenerator(); + }); + normalModuleFactory.hooks.createGenerator + .for("javascript/dynamic") + .tap("JavascriptModulesPlugin", () => { + return new JavascriptGenerator(); + }); + normalModuleFactory.hooks.createGenerator + .for("javascript/esm") + .tap("JavascriptModulesPlugin", () => { + return new JavascriptGenerator(); + }); + compilation.mainTemplate.hooks.renderManifest.tap( + "JavascriptModulesPlugin", + (result, options) => { + const chunk = options.chunk; + const hash = options.hash; + const fullHash = options.fullHash; + const outputOptions = options.outputOptions; + const moduleTemplates = options.moduleTemplates; + const dependencyTemplates = options.dependencyTemplates; + + const filenameTemplate = + chunk.filenameTemplate || outputOptions.filename; + + const useChunkHash = compilation.mainTemplate.useChunkHash(chunk); + + result.push({ + render: () => + compilation.mainTemplate.render( + hash, + chunk, + moduleTemplates.javascript, + dependencyTemplates + ), + filenameTemplate, + pathOptions: { + noChunkHash: !useChunkHash, + contentHashType: "javascript", + chunk + }, + identifier: `chunk${chunk.id}`, + hash: useChunkHash ? chunk.hash : fullHash + }); + return result; + } + ); + compilation.mainTemplate.hooks.modules.tap( + "JavascriptModulesPlugin", + (source, chunk, hash, moduleTemplate, dependencyTemplates) => { + return Template.renderChunkModules( + chunk, + m => typeof m.source === "function", + moduleTemplate, + dependencyTemplates, + "/******/ " + ); + } + ); + compilation.chunkTemplate.hooks.renderManifest.tap( + "JavascriptModulesPlugin", + (result, options) => { + const chunk = options.chunk; + const outputOptions = options.outputOptions; + const moduleTemplates = options.moduleTemplates; + const dependencyTemplates = options.dependencyTemplates; + const filenameTemplate = + chunk.filenameTemplate || outputOptions.chunkFilename; + + result.push({ + render: () => + this.renderJavascript( + compilation.chunkTemplate, + chunk, + moduleTemplates.javascript, + dependencyTemplates + ), + filenameTemplate, + pathOptions: { + chunk, + contentHashType: "javascript" + }, + identifier: `chunk${chunk.id}`, + hash: chunk.hash + }); + + return result; + } + ); + compilation.hooks.contentHash.tap("JavascriptModulesPlugin", chunk => { + const outputOptions = compilation.outputOptions; + const { + hashSalt, + hashDigest, + hashDigestLength, + hashFunction + } = outputOptions; + const hash = createHash(hashFunction); + if (hashSalt) hash.update(hashSalt); + const template = chunk.hasRuntime() + ? compilation.mainTemplate + : compilation.chunkTemplate; + hash.update(`${chunk.id} `); + hash.update(chunk.ids ? chunk.ids.join(",") : ""); + template.updateHashForChunk( + hash, + chunk, + compilation.moduleTemplates.javascript, + compilation.dependencyTemplates + ); + for (const m of chunk.modulesIterable) { + if (typeof m.source === "function") { + hash.update(m.hash); + } + } + const digest = /** @type {string} */ (hash.digest(hashDigest)); + chunk.contentHash.javascript = digest.substr(0, hashDigestLength); + }); + } + ); + } + + renderJavascript(chunkTemplate, chunk, moduleTemplate, dependencyTemplates) { + const moduleSources = Template.renderChunkModules( + chunk, + m => typeof m.source === "function", + moduleTemplate, + dependencyTemplates + ); + const core = chunkTemplate.hooks.modules.call( + moduleSources, + chunk, + moduleTemplate, + dependencyTemplates + ); + let source = chunkTemplate.hooks.render.call( + core, + chunk, + moduleTemplate, + dependencyTemplates + ); + if (chunk.hasEntryModule()) { + source = chunkTemplate.hooks.renderWithEntry.call(source, chunk); + } + chunk.rendered = true; + return new ConcatSource(source, ";"); + } +} + +module.exports = JavascriptModulesPlugin; + + +/***/ }), + +/***/ 72806: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { ConcatSource, RawSource } = __webpack_require__(53665); + +const stringifySafe = data => { + const stringified = JSON.stringify(data); + if (!stringified) { + return undefined; // Invalid JSON + } + + return stringified.replace(/\u2028|\u2029/g, str => + str === "\u2029" ? "\\u2029" : "\\u2028" + ); // invalid in JavaScript but valid JSON +}; + +class JsonGenerator { + generate(module, dependencyTemplates, runtimeTemplate) { + const source = new ConcatSource(); + const data = module.buildInfo.jsonData; + if (data === undefined) { + return new RawSource( + runtimeTemplate.missingModuleStatement({ + request: module.rawRequest + }) + ); + } + let finalJson; + if ( + Array.isArray(module.buildMeta.providedExports) && + !module.isUsed("default") + ) { + // Only some exports are used: We can optimize here, by only generating a part of the JSON + const reducedJson = {}; + for (const exportName of module.buildMeta.providedExports) { + if (exportName === "default") continue; + const used = module.isUsed(exportName); + if (used) { + reducedJson[used] = data[exportName]; + } + } + finalJson = reducedJson; + } else { + finalJson = data; + } + // Use JSON because JSON.parse() is much faster than JavaScript evaluation + const jsonSource = JSON.stringify(stringifySafe(finalJson)); + const jsonExpr = `JSON.parse(${jsonSource})`; + source.add(`${module.moduleArgument}.exports = ${jsonExpr};`); + return source; + } +} + +module.exports = JsonGenerator; + + +/***/ }), + +/***/ 2859: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const JsonParser = __webpack_require__(5807); +const JsonGenerator = __webpack_require__(72806); + +class JsonModulesPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "JsonModulesPlugin", + (compilation, { normalModuleFactory }) => { + normalModuleFactory.hooks.createParser + .for("json") + .tap("JsonModulesPlugin", () => { + return new JsonParser(); + }); + normalModuleFactory.hooks.createGenerator + .for("json") + .tap("JsonModulesPlugin", () => { + return new JsonGenerator(); + }); + } + ); + } +} + +module.exports = JsonModulesPlugin; + + +/***/ }), + +/***/ 5807: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const parseJson = __webpack_require__(48335); +const JsonExportsDependency = __webpack_require__(54396); + +class JsonParser { + constructor(options) { + this.options = options; + } + + parse(source, state) { + const data = parseJson(source[0] === "\ufeff" ? source.slice(1) : source); + state.module.buildInfo.jsonData = data; + state.module.buildMeta.exportsType = "named"; + if (typeof data === "object" && data) { + state.module.addDependency(new JsonExportsDependency(Object.keys(data))); + } + state.module.addDependency(new JsonExportsDependency(["default"])); + return state; + } +} + +module.exports = JsonParser; + + +/***/ }), + +/***/ 30735: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); +const asyncLib = __webpack_require__(36386); +const SingleEntryDependency = __webpack_require__(84828); + +class LibManifestPlugin { + constructor(options) { + this.options = options; + } + + apply(compiler) { + compiler.hooks.emit.tapAsync( + "LibManifestPlugin", + (compilation, callback) => { + asyncLib.forEach( + compilation.chunks, + (chunk, callback) => { + if (!chunk.isOnlyInitial()) { + callback(); + return; + } + const targetPath = compilation.getPath(this.options.path, { + hash: compilation.hash, + chunk + }); + const name = + this.options.name && + compilation.getPath(this.options.name, { + hash: compilation.hash, + chunk + }); + const manifest = { + name, + type: this.options.type, + content: Array.from(chunk.modulesIterable, module => { + if ( + this.options.entryOnly && + !module.reasons.some( + r => r.dependency instanceof SingleEntryDependency + ) + ) { + return; + } + if (module.libIdent) { + const ident = module.libIdent({ + context: this.options.context || compiler.options.context + }); + if (ident) { + return { + ident, + data: { + id: module.id, + buildMeta: module.buildMeta + } + }; + } + } + }) + .filter(Boolean) + .reduce((obj, item) => { + obj[item.ident] = item.data; + return obj; + }, Object.create(null)) + }; + // Apply formatting to content if format flag is true; + const manifestContent = this.options.format + ? JSON.stringify(manifest, null, 2) + : JSON.stringify(manifest); + const content = Buffer.from(manifestContent, "utf8"); + compiler.outputFileSystem.mkdirp(path.dirname(targetPath), err => { + if (err) return callback(err); + compiler.outputFileSystem.writeFile( + targetPath, + content, + callback + ); + }); + }, + callback + ); + } + ); + } +} +module.exports = LibManifestPlugin; + + +/***/ }), + +/***/ 65237: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const SetVarMainTemplatePlugin = __webpack_require__(37098); + +/** @typedef {import("../declarations/WebpackOptions").LibraryCustomUmdObject} LibraryCustomUmdObject */ +/** @typedef {import("./Compiler")} Compiler */ + +/** + * @param {string[]} accessor the accessor to convert to path + * @returns {string} the path + */ +const accessorToObjectAccess = accessor => { + return accessor.map(a => `[${JSON.stringify(a)}]`).join(""); +}; + +/** + * @param {string=} base the path prefix + * @param {string|string[]|LibraryCustomUmdObject} accessor the accessor + * @param {"amd" | "commonjs" | "root"} umdProperty property used when a custom umd object is provided + * @param {string=} joinWith the element separator + * @returns {string} the path + */ +const accessorAccess = (base, accessor, umdProperty, joinWith = "; ") => { + const normalizedAccessor = + typeof accessor === "object" && !Array.isArray(accessor) + ? accessor[umdProperty] + : accessor; + const accessors = Array.isArray(normalizedAccessor) + ? normalizedAccessor + : [normalizedAccessor]; + return accessors + .map((_, idx) => { + const a = base + ? base + accessorToObjectAccess(accessors.slice(0, idx + 1)) + : accessors[0] + accessorToObjectAccess(accessors.slice(1, idx + 1)); + if (idx === accessors.length - 1) return a; + if (idx === 0 && base === undefined) { + return `${a} = typeof ${a} === "object" ? ${a} : {}`; + } + return `${a} = ${a} || {}`; + }) + .join(joinWith); +}; + +class LibraryTemplatePlugin { + /** + * @param {string|string[]|LibraryCustomUmdObject} name name of library + * @param {string} target type of library + * @param {boolean} umdNamedDefine setting this to true will name the UMD module + * @param {string|TODO} auxiliaryComment comment in the UMD wrapper + * @param {string|string[]} exportProperty which export should be exposed as library + */ + constructor(name, target, umdNamedDefine, auxiliaryComment, exportProperty) { + this.name = name; + this.target = target; + this.umdNamedDefine = umdNamedDefine; + this.auxiliaryComment = auxiliaryComment; + this.exportProperty = exportProperty; + } + + /** + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap("LibraryTemplatePlugin", compilation => { + if (this.exportProperty) { + const ExportPropertyMainTemplatePlugin = __webpack_require__(50471); + new ExportPropertyMainTemplatePlugin(this.exportProperty).apply( + compilation + ); + } + switch (this.target) { + case "var": + if ( + !this.name || + (typeof this.name === "object" && !Array.isArray(this.name)) + ) { + throw new Error( + "library name must be set and not an UMD custom object for non-UMD target" + ); + } + new SetVarMainTemplatePlugin( + `var ${accessorAccess(undefined, this.name, "root")}`, + false + ).apply(compilation); + break; + case "assign": + new SetVarMainTemplatePlugin( + accessorAccess(undefined, this.name, "root"), + false + ).apply(compilation); + break; + case "this": + case "self": + case "window": + if (this.name) { + new SetVarMainTemplatePlugin( + accessorAccess(this.target, this.name, "root"), + false + ).apply(compilation); + } else { + new SetVarMainTemplatePlugin(this.target, true).apply(compilation); + } + break; + case "global": + if (this.name) { + new SetVarMainTemplatePlugin( + accessorAccess( + compilation.runtimeTemplate.outputOptions.globalObject, + this.name, + "root" + ), + false + ).apply(compilation); + } else { + new SetVarMainTemplatePlugin( + compilation.runtimeTemplate.outputOptions.globalObject, + true + ).apply(compilation); + } + break; + case "commonjs": + if (this.name) { + new SetVarMainTemplatePlugin( + accessorAccess("exports", this.name, "commonjs"), + false + ).apply(compilation); + } else { + new SetVarMainTemplatePlugin("exports", true).apply(compilation); + } + break; + case "commonjs2": + case "commonjs-module": + new SetVarMainTemplatePlugin("module.exports", false).apply( + compilation + ); + break; + case "amd": + case "amd-require": { + const AmdMainTemplatePlugin = __webpack_require__(9701); + if (this.name && typeof this.name !== "string") { + throw new Error("library name must be a string for amd target"); + } + new AmdMainTemplatePlugin({ + name: this.name, + requireAsWrapper: this.target === "amd-require" + }).apply(compilation); + break; + } + case "umd": + case "umd2": { + const UmdMainTemplatePlugin = __webpack_require__(75374); + new UmdMainTemplatePlugin(this.name, { + optionalAmdExternalAsGlobal: this.target === "umd2", + namedDefine: this.umdNamedDefine, + auxiliaryComment: this.auxiliaryComment + }).apply(compilation); + break; + } + case "jsonp": { + const JsonpExportMainTemplatePlugin = __webpack_require__(13732); + if (typeof this.name !== "string") + throw new Error("library name must be a string for jsonp target"); + new JsonpExportMainTemplatePlugin(this.name).apply(compilation); + break; + } + case "system": { + const SystemMainTemplatePlugin = __webpack_require__(97365); + new SystemMainTemplatePlugin({ + name: this.name + }).apply(compilation); + break; + } + default: + throw new Error(`${this.target} is not a valid Library target`); + } + }); + } +} + +module.exports = LibraryTemplatePlugin; + + +/***/ }), + +/***/ 48775: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ModuleFilenameHelpers = __webpack_require__(71474); + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(4994); + +/** @typedef {import("../declarations/plugins/LoaderOptionsPlugin").LoaderOptionsPluginOptions} LoaderOptionsPluginOptions */ + +class LoaderOptionsPlugin { + /** + * @param {LoaderOptionsPluginOptions} options options object + */ + constructor(options) { + validateOptions(schema, options || {}, "Loader Options Plugin"); + + if (typeof options !== "object") options = {}; + if (!options.test) { + options.test = { + test: () => true + }; + } + this.options = options; + } + + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap("LoaderOptionsPlugin", compilation => { + compilation.hooks.normalModuleLoader.tap( + "LoaderOptionsPlugin", + (context, module) => { + const resource = module.resource; + if (!resource) return; + const i = resource.indexOf("?"); + if ( + ModuleFilenameHelpers.matchObject( + options, + i < 0 ? resource : resource.substr(0, i) + ) + ) { + for (const key of Object.keys(options)) { + if (key === "include" || key === "exclude" || key === "test") { + continue; + } + context[key] = options[key]; + } + } + } + ); + }); + } +} + +module.exports = LoaderOptionsPlugin; + + +/***/ }), + +/***/ 95154: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class LoaderTargetPlugin { + constructor(target) { + this.target = target; + } + + apply(compiler) { + compiler.hooks.compilation.tap("LoaderTargetPlugin", compilation => { + compilation.hooks.normalModuleLoader.tap( + "LoaderTargetPlugin", + loaderContext => { + loaderContext.target = this.target; + } + ); + }); + } +} + +module.exports = LoaderTargetPlugin; + + +/***/ }), + +/***/ 43626: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { + ConcatSource, + OriginalSource, + PrefixSource, + RawSource +} = __webpack_require__(53665); +const { + Tapable, + SyncWaterfallHook, + SyncHook, + SyncBailHook +} = __webpack_require__(92402); +const Template = __webpack_require__(96066); + +/** @typedef {import("webpack-sources").ConcatSource} ConcatSource */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./ModuleTemplate")} ModuleTemplate */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./Module")} Module} */ +/** @typedef {import("./util/createHash").Hash} Hash} */ +/** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate} */ + +/** + * @typedef {Object} RenderManifestOptions + * @property {Chunk} chunk the chunk used to render + * @property {string} hash + * @property {string} fullHash + * @property {TODO} outputOptions + * @property {{javascript: ModuleTemplate, webassembly: ModuleTemplate}} moduleTemplates + * @property {Map} dependencyTemplates + */ + +// require function shortcuts: +// __webpack_require__.s = the module id of the entry point +// __webpack_require__.c = the module cache +// __webpack_require__.m = the module functions +// __webpack_require__.p = the bundle public path +// __webpack_require__.i = the identity function used for harmony imports +// __webpack_require__.e = the chunk ensure function +// __webpack_require__.d = the exported property define getter function +// __webpack_require__.o = Object.prototype.hasOwnProperty.call +// __webpack_require__.r = define compatibility on export +// __webpack_require__.t = create a fake namespace object +// __webpack_require__.n = compatibility get default export +// __webpack_require__.h = the webpack hash +// __webpack_require__.w = an object containing all installed WebAssembly.Instance export objects keyed by module id +// __webpack_require__.oe = the uncaught error handler for the webpack runtime +// __webpack_require__.nc = the script nonce + +module.exports = class MainTemplate extends Tapable { + /** + * + * @param {TODO=} outputOptions output options for the MainTemplate + */ + constructor(outputOptions) { + super(); + /** @type {TODO?} */ + this.outputOptions = outputOptions || {}; + this.hooks = { + /** @type {SyncWaterfallHook} */ + renderManifest: new SyncWaterfallHook(["result", "options"]), + modules: new SyncWaterfallHook([ + "modules", + "chunk", + "hash", + "moduleTemplate", + "dependencyTemplates" + ]), + moduleObj: new SyncWaterfallHook([ + "source", + "chunk", + "hash", + "moduleIdExpression" + ]), + requireEnsure: new SyncWaterfallHook([ + "source", + "chunk", + "hash", + "chunkIdExpression" + ]), + bootstrap: new SyncWaterfallHook([ + "source", + "chunk", + "hash", + "moduleTemplate", + "dependencyTemplates" + ]), + localVars: new SyncWaterfallHook(["source", "chunk", "hash"]), + require: new SyncWaterfallHook(["source", "chunk", "hash"]), + requireExtensions: new SyncWaterfallHook(["source", "chunk", "hash"]), + /** @type {SyncWaterfallHook} */ + beforeStartup: new SyncWaterfallHook(["source", "chunk", "hash"]), + /** @type {SyncWaterfallHook} */ + startup: new SyncWaterfallHook(["source", "chunk", "hash"]), + /** @type {SyncWaterfallHook} */ + afterStartup: new SyncWaterfallHook(["source", "chunk", "hash"]), + render: new SyncWaterfallHook([ + "source", + "chunk", + "hash", + "moduleTemplate", + "dependencyTemplates" + ]), + renderWithEntry: new SyncWaterfallHook(["source", "chunk", "hash"]), + moduleRequire: new SyncWaterfallHook([ + "source", + "chunk", + "hash", + "moduleIdExpression" + ]), + addModule: new SyncWaterfallHook([ + "source", + "chunk", + "hash", + "moduleIdExpression", + "moduleExpression" + ]), + currentHash: new SyncWaterfallHook(["source", "requestedLength"]), + assetPath: new SyncWaterfallHook(["path", "options", "assetInfo"]), + hash: new SyncHook(["hash"]), + hashForChunk: new SyncHook(["hash", "chunk"]), + globalHashPaths: new SyncWaterfallHook(["paths"]), + globalHash: new SyncBailHook(["chunk", "paths"]), + + // TODO this should be moved somewhere else + // It's weird here + hotBootstrap: new SyncWaterfallHook(["source", "chunk", "hash"]) + }; + this.hooks.startup.tap("MainTemplate", (source, chunk, hash) => { + /** @type {string[]} */ + const buf = []; + if (chunk.entryModule) { + buf.push("// Load entry module and return exports"); + buf.push( + `return ${this.renderRequireFunctionForModule( + hash, + chunk, + JSON.stringify(chunk.entryModule.id) + )}(${this.requireFn}.s = ${JSON.stringify(chunk.entryModule.id)});` + ); + } + return Template.asString(buf); + }); + this.hooks.render.tap( + "MainTemplate", + (bootstrapSource, chunk, hash, moduleTemplate, dependencyTemplates) => { + const source = new ConcatSource(); + source.add("/******/ (function(modules) { // webpackBootstrap\n"); + source.add(new PrefixSource("/******/", bootstrapSource)); + source.add("/******/ })\n"); + source.add( + "/************************************************************************/\n" + ); + source.add("/******/ ("); + source.add( + this.hooks.modules.call( + new RawSource(""), + chunk, + hash, + moduleTemplate, + dependencyTemplates + ) + ); + source.add(")"); + return source; + } + ); + this.hooks.localVars.tap("MainTemplate", (source, chunk, hash) => { + return Template.asString([ + source, + "// The module cache", + "var installedModules = {};" + ]); + }); + this.hooks.require.tap("MainTemplate", (source, chunk, hash) => { + return Template.asString([ + source, + "// Check if module is in cache", + "if(installedModules[moduleId]) {", + Template.indent("return installedModules[moduleId].exports;"), + "}", + "// Create a new module (and put it into the cache)", + "var module = installedModules[moduleId] = {", + Template.indent(this.hooks.moduleObj.call("", chunk, hash, "moduleId")), + "};", + "", + Template.asString( + outputOptions.strictModuleExceptionHandling + ? [ + "// Execute the module function", + "var threw = true;", + "try {", + Template.indent([ + `modules[moduleId].call(module.exports, module, module.exports, ${this.renderRequireFunctionForModule( + hash, + chunk, + "moduleId" + )});`, + "threw = false;" + ]), + "} finally {", + Template.indent([ + "if(threw) delete installedModules[moduleId];" + ]), + "}" + ] + : [ + "// Execute the module function", + `modules[moduleId].call(module.exports, module, module.exports, ${this.renderRequireFunctionForModule( + hash, + chunk, + "moduleId" + )});` + ] + ), + "", + "// Flag the module as loaded", + "module.l = true;", + "", + "// Return the exports of the module", + "return module.exports;" + ]); + }); + this.hooks.moduleObj.tap( + "MainTemplate", + (source, chunk, hash, varModuleId) => { + return Template.asString(["i: moduleId,", "l: false,", "exports: {}"]); + } + ); + this.hooks.requireExtensions.tap("MainTemplate", (source, chunk, hash) => { + const buf = []; + const chunkMaps = chunk.getChunkMaps(); + // Check if there are non initial chunks which need to be imported using require-ensure + if (Object.keys(chunkMaps.hash).length) { + buf.push("// This file contains only the entry chunk."); + buf.push("// The chunk loading function for additional chunks"); + buf.push(`${this.requireFn}.e = function requireEnsure(chunkId) {`); + buf.push(Template.indent("var promises = [];")); + buf.push( + Template.indent( + this.hooks.requireEnsure.call("", chunk, hash, "chunkId") + ) + ); + buf.push(Template.indent("return Promise.all(promises);")); + buf.push("};"); + } else if ( + chunk.hasModuleInGraph(m => + m.blocks.some(b => b.chunkGroup && b.chunkGroup.chunks.length > 0) + ) + ) { + // There async blocks in the graph, so we need to add an empty requireEnsure + // function anyway. This can happen with multiple entrypoints. + buf.push("// The chunk loading function for additional chunks"); + buf.push("// Since all referenced chunks are already included"); + buf.push("// in this file, this function is empty here."); + buf.push(`${this.requireFn}.e = function requireEnsure() {`); + buf.push(Template.indent("return Promise.resolve();")); + buf.push("};"); + } + buf.push(""); + buf.push("// expose the modules object (__webpack_modules__)"); + buf.push(`${this.requireFn}.m = modules;`); + + buf.push(""); + buf.push("// expose the module cache"); + buf.push(`${this.requireFn}.c = installedModules;`); + + buf.push(""); + buf.push("// define getter function for harmony exports"); + buf.push(`${this.requireFn}.d = function(exports, name, getter) {`); + buf.push( + Template.indent([ + `if(!${this.requireFn}.o(exports, name)) {`, + Template.indent([ + "Object.defineProperty(exports, name, { enumerable: true, get: getter });" + ]), + "}" + ]) + ); + buf.push("};"); + + buf.push(""); + buf.push("// define __esModule on exports"); + buf.push(`${this.requireFn}.r = function(exports) {`); + buf.push( + Template.indent([ + "if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {", + Template.indent([ + "Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });" + ]), + "}", + "Object.defineProperty(exports, '__esModule', { value: true });" + ]) + ); + buf.push("};"); + + buf.push(""); + buf.push("// create a fake namespace object"); + buf.push("// mode & 1: value is a module id, require it"); + buf.push("// mode & 2: merge all properties of value into the ns"); + buf.push("// mode & 4: return value when already ns object"); + buf.push("// mode & 8|1: behave like require"); + buf.push(`${this.requireFn}.t = function(value, mode) {`); + buf.push( + Template.indent([ + `if(mode & 1) value = ${this.requireFn}(value);`, + `if(mode & 8) return value;`, + "if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;", + "var ns = Object.create(null);", + `${this.requireFn}.r(ns);`, + "Object.defineProperty(ns, 'default', { enumerable: true, value: value });", + "if(mode & 2 && typeof value != 'string') for(var key in value) " + + `${this.requireFn}.d(ns, key, function(key) { ` + + "return value[key]; " + + "}.bind(null, key));", + "return ns;" + ]) + ); + buf.push("};"); + + buf.push(""); + buf.push( + "// getDefaultExport function for compatibility with non-harmony modules" + ); + buf.push(this.requireFn + ".n = function(module) {"); + buf.push( + Template.indent([ + "var getter = module && module.__esModule ?", + Template.indent([ + "function getDefault() { return module['default']; } :", + "function getModuleExports() { return module; };" + ]), + `${this.requireFn}.d(getter, 'a', getter);`, + "return getter;" + ]) + ); + buf.push("};"); + + buf.push(""); + buf.push("// Object.prototype.hasOwnProperty.call"); + buf.push( + `${this.requireFn}.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };` + ); + + const publicPath = this.getPublicPath({ + hash: hash + }); + buf.push(""); + buf.push("// __webpack_public_path__"); + buf.push(`${this.requireFn}.p = ${JSON.stringify(publicPath)};`); + return Template.asString(buf); + }); + + this.requireFn = "__webpack_require__"; + } + + /** + * + * @param {RenderManifestOptions} options render manifest options + * @returns {TODO[]} returns render manifest + */ + getRenderManifest(options) { + const result = []; + + this.hooks.renderManifest.call(result, options); + + return result; + } + + /** + * TODO webpack 5: remove moduleTemplate and dependencyTemplates + * @param {string} hash hash to be used for render call + * @param {Chunk} chunk Chunk instance + * @param {ModuleTemplate} moduleTemplate ModuleTemplate instance for render + * @param {Map} dependencyTemplates dependency templates + * @returns {string[]} the generated source of the bootstrap code + */ + renderBootstrap(hash, chunk, moduleTemplate, dependencyTemplates) { + const buf = []; + buf.push( + this.hooks.bootstrap.call( + "", + chunk, + hash, + moduleTemplate, + dependencyTemplates + ) + ); + buf.push(this.hooks.localVars.call("", chunk, hash)); + buf.push(""); + buf.push("// The require function"); + buf.push(`function ${this.requireFn}(moduleId) {`); + buf.push(Template.indent(this.hooks.require.call("", chunk, hash))); + buf.push("}"); + buf.push(""); + buf.push( + Template.asString(this.hooks.requireExtensions.call("", chunk, hash)) + ); + buf.push(""); + buf.push(Template.asString(this.hooks.beforeStartup.call("", chunk, hash))); + const afterStartupCode = Template.asString( + this.hooks.afterStartup.call("", chunk, hash) + ); + if (afterStartupCode) { + // TODO webpack 5: this is a bit hacky to avoid a breaking change + // change it to a better way + buf.push("var startupResult = (function() {"); + } + buf.push(Template.asString(this.hooks.startup.call("", chunk, hash))); + if (afterStartupCode) { + buf.push("})();"); + buf.push(afterStartupCode); + buf.push("return startupResult;"); + } + return buf; + } + + /** + * @param {string} hash hash to be used for render call + * @param {Chunk} chunk Chunk instance + * @param {ModuleTemplate} moduleTemplate ModuleTemplate instance for render + * @param {Map} dependencyTemplates dependency templates + * @returns {ConcatSource} the newly generated source from rendering + */ + render(hash, chunk, moduleTemplate, dependencyTemplates) { + const buf = this.renderBootstrap( + hash, + chunk, + moduleTemplate, + dependencyTemplates + ); + let source = this.hooks.render.call( + new OriginalSource( + Template.prefix(buf, " \t") + "\n", + "webpack/bootstrap" + ), + chunk, + hash, + moduleTemplate, + dependencyTemplates + ); + if (chunk.hasEntryModule()) { + source = this.hooks.renderWithEntry.call(source, chunk, hash); + } + if (!source) { + throw new Error( + "Compiler error: MainTemplate plugin 'render' should return something" + ); + } + chunk.rendered = true; + return new ConcatSource(source, ";"); + } + + /** + * + * @param {string} hash hash for render fn + * @param {Chunk} chunk Chunk instance for require + * @param {(number|string)=} varModuleId module id + * @returns {TODO} the moduleRequire hook call return signature + */ + renderRequireFunctionForModule(hash, chunk, varModuleId) { + return this.hooks.moduleRequire.call( + this.requireFn, + chunk, + hash, + varModuleId + ); + } + + /** + * + * @param {string} hash hash for render add fn + * @param {Chunk} chunk Chunk instance for require add fn + * @param {(string|number)=} varModuleId module id + * @param {Module} varModule Module instance + * @returns {TODO} renderAddModule call + */ + renderAddModule(hash, chunk, varModuleId, varModule) { + return this.hooks.addModule.call( + `modules[${varModuleId}] = ${varModule};`, + chunk, + hash, + varModuleId, + varModule + ); + } + + /** + * + * @param {string} hash string hash + * @param {number=} length length + * @returns {string} call hook return + */ + renderCurrentHashCode(hash, length) { + length = length || Infinity; + return this.hooks.currentHash.call( + JSON.stringify(hash.substr(0, length)), + length + ); + } + + /** + * + * @param {object} options get public path options + * @returns {string} hook call + */ + getPublicPath(options) { + return this.hooks.assetPath.call( + this.outputOptions.publicPath || "", + options + ); + } + + getAssetPath(path, options) { + return this.hooks.assetPath.call(path, options); + } + + getAssetPathWithInfo(path, options) { + const assetInfo = {}; + // TODO webpack 5: refactor assetPath hook to receive { path, info } object + const newPath = this.hooks.assetPath.call(path, options, assetInfo); + return { path: newPath, info: assetInfo }; + } + + /** + * Updates hash with information from this template + * @param {Hash} hash the hash to update + * @returns {void} + */ + updateHash(hash) { + hash.update("maintemplate"); + hash.update("3"); + this.hooks.hash.call(hash); + } + + /** + * TODO webpack 5: remove moduleTemplate and dependencyTemplates + * Updates hash with chunk-specific information from this template + * @param {Hash} hash the hash to update + * @param {Chunk} chunk the chunk + * @param {ModuleTemplate} moduleTemplate ModuleTemplate instance for render + * @param {Map} dependencyTemplates dependency templates + * @returns {void} + */ + updateHashForChunk(hash, chunk, moduleTemplate, dependencyTemplates) { + this.updateHash(hash); + this.hooks.hashForChunk.call(hash, chunk); + for (const line of this.renderBootstrap( + "0000", + chunk, + moduleTemplate, + dependencyTemplates + )) { + hash.update(line); + } + } + + useChunkHash(chunk) { + const paths = this.hooks.globalHashPaths.call([]); + return !this.hooks.globalHash.call(chunk, paths); + } +}; + + +/***/ }), + +/***/ 50332: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +module.exports = __webpack_require__(32327); + + +/***/ }), + +/***/ 75993: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const util = __webpack_require__(31669); + +const DependenciesBlock = __webpack_require__(16071); +const ModuleReason = __webpack_require__(44576); +const SortableSet = __webpack_require__(50071); +const Template = __webpack_require__(96066); + +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./util/createHash").Hash} Hash */ + +const EMPTY_RESOLVE_OPTIONS = {}; + +let debugId = 1000; + +const sortById = (a, b) => { + return a.id - b.id; +}; + +const sortByDebugId = (a, b) => { + return a.debugId - b.debugId; +}; + +/** @typedef {(requestShortener: RequestShortener) => string} OptimizationBailoutFunction */ + +class Module extends DependenciesBlock { + constructor(type, context = null) { + super(); + /** @type {string} */ + this.type = type; + /** @type {string} */ + this.context = context; + + // Unique Id + /** @type {number} */ + this.debugId = debugId++; + + // Hash + /** @type {string} */ + this.hash = undefined; + /** @type {string} */ + this.renderedHash = undefined; + + // Info from Factory + /** @type {TODO} */ + this.resolveOptions = EMPTY_RESOLVE_OPTIONS; + /** @type {object} */ + this.factoryMeta = {}; + + // Info from Build + /** @type {WebpackError[]} */ + this.warnings = []; + /** @type {WebpackError[]} */ + this.errors = []; + /** @type {object} */ + this.buildMeta = undefined; + /** @type {object} */ + this.buildInfo = undefined; + + // Graph (per Compilation) + /** @type {ModuleReason[]} */ + this.reasons = []; + /** @type {SortableSet} */ + this._chunks = new SortableSet(undefined, sortById); + + // Info from Compilation (per Compilation) + /** @type {number|string} */ + this.id = null; + /** @type {number} */ + this.index = null; + /** @type {number} */ + this.index2 = null; + /** @type {number} */ + this.depth = null; + /** @type {Module} */ + this.issuer = null; + /** @type {undefined | object} */ + this.profile = undefined; + /** @type {boolean} */ + this.prefetched = false; + /** @type {boolean} */ + this.built = false; + + // Info from Optimization (per Compilation) + /** @type {null | boolean} */ + this.used = null; + /** @type {false | true | string[]} */ + this.usedExports = null; + /** @type {(string | OptimizationBailoutFunction)[]} */ + this.optimizationBailout = []; + + // delayed operations + /** @type {undefined | {oldChunk: Chunk, newChunks: Chunk[]}[] } */ + this._rewriteChunkInReasons = undefined; + + /** @type {boolean} */ + this.useSourceMap = false; + + // info from build + this._source = null; + } + + get exportsArgument() { + return (this.buildInfo && this.buildInfo.exportsArgument) || "exports"; + } + + get moduleArgument() { + return (this.buildInfo && this.buildInfo.moduleArgument) || "module"; + } + + disconnect() { + this.hash = undefined; + this.renderedHash = undefined; + + this.reasons.length = 0; + this._rewriteChunkInReasons = undefined; + this._chunks.clear(); + + this.id = null; + this.index = null; + this.index2 = null; + this.depth = null; + this.issuer = null; + this.profile = undefined; + this.prefetched = false; + this.built = false; + + this.used = null; + this.usedExports = null; + this.optimizationBailout.length = 0; + super.disconnect(); + } + + unseal() { + this.id = null; + this.index = null; + this.index2 = null; + this.depth = null; + this._chunks.clear(); + super.unseal(); + } + + setChunks(chunks) { + this._chunks = new SortableSet(chunks, sortById); + } + + addChunk(chunk) { + if (this._chunks.has(chunk)) return false; + this._chunks.add(chunk); + return true; + } + + removeChunk(chunk) { + if (this._chunks.delete(chunk)) { + chunk.removeModule(this); + return true; + } + return false; + } + + isInChunk(chunk) { + return this._chunks.has(chunk); + } + + isEntryModule() { + for (const chunk of this._chunks) { + if (chunk.entryModule === this) return true; + } + return false; + } + + get optional() { + return ( + this.reasons.length > 0 && + this.reasons.every(r => r.dependency && r.dependency.optional) + ); + } + + /** + * @returns {Chunk[]} all chunks which contain the module + */ + getChunks() { + return Array.from(this._chunks); + } + + getNumberOfChunks() { + return this._chunks.size; + } + + get chunksIterable() { + return this._chunks; + } + + hasEqualsChunks(otherModule) { + if (this._chunks.size !== otherModule._chunks.size) return false; + this._chunks.sortWith(sortByDebugId); + otherModule._chunks.sortWith(sortByDebugId); + const a = this._chunks[Symbol.iterator](); + const b = otherModule._chunks[Symbol.iterator](); + // eslint-disable-next-line no-constant-condition + while (true) { + const aItem = a.next(); + const bItem = b.next(); + if (aItem.done) return true; + if (aItem.value !== bItem.value) return false; + } + } + + addReason(module, dependency, explanation) { + this.reasons.push(new ModuleReason(module, dependency, explanation)); + } + + removeReason(module, dependency) { + for (let i = 0; i < this.reasons.length; i++) { + let r = this.reasons[i]; + if (r.module === module && r.dependency === dependency) { + this.reasons.splice(i, 1); + return true; + } + } + return false; + } + + hasReasonForChunk(chunk) { + if (this._rewriteChunkInReasons) { + for (const operation of this._rewriteChunkInReasons) { + this._doRewriteChunkInReasons(operation.oldChunk, operation.newChunks); + } + this._rewriteChunkInReasons = undefined; + } + for (let i = 0; i < this.reasons.length; i++) { + if (this.reasons[i].hasChunk(chunk)) return true; + } + return false; + } + + hasReasons() { + return this.reasons.length > 0; + } + + rewriteChunkInReasons(oldChunk, newChunks) { + // This is expensive. Delay operation until we really need the data + if (this._rewriteChunkInReasons === undefined) { + this._rewriteChunkInReasons = []; + } + this._rewriteChunkInReasons.push({ + oldChunk, + newChunks + }); + } + + _doRewriteChunkInReasons(oldChunk, newChunks) { + for (let i = 0; i < this.reasons.length; i++) { + this.reasons[i].rewriteChunks(oldChunk, newChunks); + } + } + + /** + * @param {string=} exportName the name of the export + * @returns {boolean|string} false if the export isn't used, true if no exportName is provided and the module is used, or the name to access it if the export is used + */ + isUsed(exportName) { + if (!exportName) return this.used !== false; + if (this.used === null || this.usedExports === null) return exportName; + if (!this.used) return false; + if (!this.usedExports) return false; + if (this.usedExports === true) return exportName; + let idx = this.usedExports.indexOf(exportName); + if (idx < 0) return false; + + // Mangle export name if possible + if (this.isProvided(exportName)) { + if (this.buildMeta.exportsType === "namespace") { + return Template.numberToIdentifer(idx); + } + if ( + this.buildMeta.exportsType === "named" && + !this.usedExports.includes("default") + ) { + return Template.numberToIdentifer(idx); + } + } + return exportName; + } + + isProvided(exportName) { + if (!Array.isArray(this.buildMeta.providedExports)) return null; + return this.buildMeta.providedExports.includes(exportName); + } + + toString() { + return `Module[${this.id || this.debugId}]`; + } + + needRebuild(fileTimestamps, contextTimestamps) { + return true; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ + updateHash(hash) { + hash.update(`${this.id}`); + hash.update(JSON.stringify(this.usedExports)); + super.updateHash(hash); + } + + sortItems(sortChunks) { + super.sortItems(); + if (sortChunks) this._chunks.sort(); + this.reasons.sort((a, b) => { + if (a.module === b.module) return 0; + if (!a.module) return -1; + if (!b.module) return 1; + return sortById(a.module, b.module); + }); + if (Array.isArray(this.usedExports)) { + this.usedExports.sort(); + } + } + + unbuild() { + this.dependencies.length = 0; + this.blocks.length = 0; + this.variables.length = 0; + this.buildMeta = undefined; + this.buildInfo = undefined; + this.disconnect(); + } + + get arguments() { + throw new Error("Module.arguments was removed, there is no replacement."); + } + + set arguments(value) { + throw new Error("Module.arguments was removed, there is no replacement."); + } +} + +// TODO remove in webpack 5 +Object.defineProperty(Module.prototype, "forEachChunk", { + configurable: false, + value: util.deprecate( + /** + * @deprecated + * @param {function(any, any, Set): void} fn callback function + * @returns {void} + * @this {Module} + */ + function(fn) { + this._chunks.forEach(fn); + }, + "Module.forEachChunk: Use for(const chunk of module.chunksIterable) instead" + ) +}); + +// TODO remove in webpack 5 +Object.defineProperty(Module.prototype, "mapChunks", { + configurable: false, + value: util.deprecate( + /** + * @deprecated + * @param {function(any, any): void} fn Mapper function + * @returns {Array} Array of chunks mapped + * @this {Module} + */ + function(fn) { + return Array.from(this._chunks, fn); + }, + "Module.mapChunks: Use Array.from(module.chunksIterable, fn) instead" + ) +}); + +// TODO remove in webpack 5 +Object.defineProperty(Module.prototype, "entry", { + configurable: false, + get() { + throw new Error("Module.entry was removed. Use Chunk.entryModule"); + }, + set() { + throw new Error("Module.entry was removed. Use Chunk.entryModule"); + } +}); + +// TODO remove in webpack 5 +Object.defineProperty(Module.prototype, "meta", { + configurable: false, + get: util.deprecate( + /** + * @deprecated + * @returns {void} + * @this {Module} + */ + function() { + return this.buildMeta; + }, + "Module.meta was renamed to Module.buildMeta" + ), + set: util.deprecate( + /** + * @deprecated + * @param {TODO} value Value + * @returns {void} + * @this {Module} + */ + function(value) { + this.buildMeta = value; + }, + "Module.meta was renamed to Module.buildMeta" + ) +}); + +/** @type {function(): string} */ +Module.prototype.identifier = null; + +/** @type {function(RequestShortener): string} */ +Module.prototype.readableIdentifier = null; + +Module.prototype.build = null; +Module.prototype.source = null; +Module.prototype.size = null; +Module.prototype.nameForCondition = null; +/** @type {null | function(Chunk): boolean} */ +Module.prototype.chunkCondition = null; +Module.prototype.updateCacheModule = null; + +module.exports = Module; + + +/***/ }), + +/***/ 12072: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); +const { cutOffLoaderExecution } = __webpack_require__(80140); + +class ModuleBuildError extends WebpackError { + constructor(module, err, { from = null } = {}) { + let message = "Module build failed"; + let details = undefined; + if (from) { + message += ` (from ${from}):\n`; + } else { + message += ": "; + } + if (err !== null && typeof err === "object") { + if (typeof err.stack === "string" && err.stack) { + const stack = cutOffLoaderExecution(err.stack); + if (!err.hideStack) { + message += stack; + } else { + details = stack; + if (typeof err.message === "string" && err.message) { + message += err.message; + } else { + message += err; + } + } + } else if (typeof err.message === "string" && err.message) { + message += err.message; + } else { + message += err; + } + } else { + message = err; + } + + super(message); + + this.name = "ModuleBuildError"; + this.details = details; + this.module = module; + this.error = err; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ModuleBuildError; + + +/***/ }), + +/***/ 14953: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +/** @typedef {import("./Module")} Module */ + +class ModuleDependencyError extends WebpackError { + /** + * Creates an instance of ModuleDependencyError. + * @param {Module} module module tied to dependency + * @param {Error} err error thrown + * @param {TODO} loc location of dependency + */ + constructor(module, err, loc) { + super(err.message); + + this.name = "ModuleDependencyError"; + this.details = err.stack + .split("\n") + .slice(1) + .join("\n"); + this.module = module; + this.loc = loc; + this.error = err; + this.origin = module.issuer; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ModuleDependencyError; + + +/***/ }), + +/***/ 59136: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +module.exports = class ModuleDependencyWarning extends WebpackError { + constructor(module, err, loc) { + super(err.message); + + this.name = "ModuleDependencyWarning"; + this.details = err.stack + .split("\n") + .slice(1) + .join("\n"); + this.module = module; + this.loc = loc; + this.error = err; + this.origin = module.issuer; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 82528: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); +const { cleanUp } = __webpack_require__(80140); + +class ModuleError extends WebpackError { + constructor(module, err, { from = null } = {}) { + let message = "Module Error"; + if (from) { + message += ` (from ${from}):\n`; + } else { + message += ": "; + } + if (err && typeof err === "object" && err.message) { + message += err.message; + } else if (err) { + message += err; + } + super(message); + this.name = "ModuleError"; + this.module = module; + this.error = err; + this.details = + err && typeof err === "object" && err.stack + ? cleanUp(err.stack, this.message) + : undefined; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ModuleError; + + +/***/ }), + +/***/ 71474: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const createHash = __webpack_require__(15660); + +const ModuleFilenameHelpers = exports; + +ModuleFilenameHelpers.ALL_LOADERS_RESOURCE = "[all-loaders][resource]"; +ModuleFilenameHelpers.REGEXP_ALL_LOADERS_RESOURCE = /\[all-?loaders\]\[resource\]/gi; +ModuleFilenameHelpers.LOADERS_RESOURCE = "[loaders][resource]"; +ModuleFilenameHelpers.REGEXP_LOADERS_RESOURCE = /\[loaders\]\[resource\]/gi; +ModuleFilenameHelpers.RESOURCE = "[resource]"; +ModuleFilenameHelpers.REGEXP_RESOURCE = /\[resource\]/gi; +ModuleFilenameHelpers.ABSOLUTE_RESOURCE_PATH = "[absolute-resource-path]"; +ModuleFilenameHelpers.REGEXP_ABSOLUTE_RESOURCE_PATH = /\[abs(olute)?-?resource-?path\]/gi; +ModuleFilenameHelpers.RESOURCE_PATH = "[resource-path]"; +ModuleFilenameHelpers.REGEXP_RESOURCE_PATH = /\[resource-?path\]/gi; +ModuleFilenameHelpers.ALL_LOADERS = "[all-loaders]"; +ModuleFilenameHelpers.REGEXP_ALL_LOADERS = /\[all-?loaders\]/gi; +ModuleFilenameHelpers.LOADERS = "[loaders]"; +ModuleFilenameHelpers.REGEXP_LOADERS = /\[loaders\]/gi; +ModuleFilenameHelpers.QUERY = "[query]"; +ModuleFilenameHelpers.REGEXP_QUERY = /\[query\]/gi; +ModuleFilenameHelpers.ID = "[id]"; +ModuleFilenameHelpers.REGEXP_ID = /\[id\]/gi; +ModuleFilenameHelpers.HASH = "[hash]"; +ModuleFilenameHelpers.REGEXP_HASH = /\[hash\]/gi; +ModuleFilenameHelpers.NAMESPACE = "[namespace]"; +ModuleFilenameHelpers.REGEXP_NAMESPACE = /\[namespace\]/gi; + +const getAfter = (str, token) => { + const idx = str.indexOf(token); + return idx < 0 ? "" : str.substr(idx); +}; + +const getBefore = (str, token) => { + const idx = str.lastIndexOf(token); + return idx < 0 ? "" : str.substr(0, idx); +}; + +const getHash = str => { + const hash = createHash("md4"); + hash.update(str); + const digest = /** @type {string} */ (hash.digest("hex")); + return digest.substr(0, 4); +}; + +const asRegExp = test => { + if (typeof test === "string") { + test = new RegExp("^" + test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")); + } + return test; +}; + +ModuleFilenameHelpers.createFilename = (module, options, requestShortener) => { + const opts = Object.assign( + { + namespace: "", + moduleFilenameTemplate: "" + }, + typeof options === "object" + ? options + : { + moduleFilenameTemplate: options + } + ); + + let absoluteResourcePath; + let hash; + let identifier; + let moduleId; + let shortIdentifier; + if (module === undefined) module = ""; + if (typeof module === "string") { + shortIdentifier = requestShortener.shorten(module); + identifier = shortIdentifier; + moduleId = ""; + absoluteResourcePath = module.split("!").pop(); + hash = getHash(identifier); + } else { + shortIdentifier = module.readableIdentifier(requestShortener); + identifier = requestShortener.shorten(module.identifier()); + moduleId = module.id; + absoluteResourcePath = module + .identifier() + .split("!") + .pop(); + hash = getHash(identifier); + } + const resource = shortIdentifier.split("!").pop(); + const loaders = getBefore(shortIdentifier, "!"); + const allLoaders = getBefore(identifier, "!"); + const query = getAfter(resource, "?"); + const resourcePath = resource.substr(0, resource.length - query.length); + if (typeof opts.moduleFilenameTemplate === "function") { + return opts.moduleFilenameTemplate({ + identifier: identifier, + shortIdentifier: shortIdentifier, + resource: resource, + resourcePath: resourcePath, + absoluteResourcePath: absoluteResourcePath, + allLoaders: allLoaders, + query: query, + moduleId: moduleId, + hash: hash, + namespace: opts.namespace + }); + } + return opts.moduleFilenameTemplate + .replace(ModuleFilenameHelpers.REGEXP_ALL_LOADERS_RESOURCE, identifier) + .replace(ModuleFilenameHelpers.REGEXP_LOADERS_RESOURCE, shortIdentifier) + .replace(ModuleFilenameHelpers.REGEXP_RESOURCE, resource) + .replace(ModuleFilenameHelpers.REGEXP_RESOURCE_PATH, resourcePath) + .replace( + ModuleFilenameHelpers.REGEXP_ABSOLUTE_RESOURCE_PATH, + absoluteResourcePath + ) + .replace(ModuleFilenameHelpers.REGEXP_ALL_LOADERS, allLoaders) + .replace(ModuleFilenameHelpers.REGEXP_LOADERS, loaders) + .replace(ModuleFilenameHelpers.REGEXP_QUERY, query) + .replace(ModuleFilenameHelpers.REGEXP_ID, moduleId) + .replace(ModuleFilenameHelpers.REGEXP_HASH, hash) + .replace(ModuleFilenameHelpers.REGEXP_NAMESPACE, opts.namespace); +}; + +ModuleFilenameHelpers.replaceDuplicates = (array, fn, comparator) => { + const countMap = Object.create(null); + const posMap = Object.create(null); + array.forEach((item, idx) => { + countMap[item] = countMap[item] || []; + countMap[item].push(idx); + posMap[item] = 0; + }); + if (comparator) { + Object.keys(countMap).forEach(item => { + countMap[item].sort(comparator); + }); + } + return array.map((item, i) => { + if (countMap[item].length > 1) { + if (comparator && countMap[item][0] === i) return item; + return fn(item, i, posMap[item]++); + } else { + return item; + } + }); +}; + +ModuleFilenameHelpers.matchPart = (str, test) => { + if (!test) return true; + test = asRegExp(test); + if (Array.isArray(test)) { + return test.map(asRegExp).some(regExp => regExp.test(str)); + } else { + return test.test(str); + } +}; + +ModuleFilenameHelpers.matchObject = (obj, str) => { + if (obj.test) { + if (!ModuleFilenameHelpers.matchPart(str, obj.test)) { + return false; + } + } + if (obj.include) { + if (!ModuleFilenameHelpers.matchPart(str, obj.include)) { + return false; + } + } + if (obj.exclude) { + if (ModuleFilenameHelpers.matchPart(str, obj.exclude)) { + return false; + } + } + return true; +}; + + +/***/ }), + +/***/ 71638: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +class ModuleNotFoundError extends WebpackError { + constructor(module, err) { + super("Module not found: " + err); + + this.name = "ModuleNotFoundError"; + this.details = err.details; + this.missing = err.missing; + this.module = module; + this.error = err; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ModuleNotFoundError; + + +/***/ }), + +/***/ 62500: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +/** @typedef {import("./Module")} Module */ + +class ModuleParseError extends WebpackError { + /** + * @param {Module} module the errored module + * @param {string} source source code + * @param {Error&any} err the parse error + * @param {string[]} loaders the loaders used + */ + constructor(module, source, err, loaders) { + let message = "Module parse failed: " + err.message; + let loc = undefined; + if (loaders.length >= 1) { + message += `\nFile was processed with these loaders:${loaders + .map(loader => `\n * ${loader}`) + .join("")}`; + message += + "\nYou may need an additional loader to handle the result of these loaders."; + } else { + message += + "\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders"; + } + if ( + err.loc && + typeof err.loc === "object" && + typeof err.loc.line === "number" + ) { + var lineNumber = err.loc.line; + if (/[\0\u0001\u0002\u0003\u0004\u0005\u0006\u0007]/.test(source)) { + // binary file + message += "\n(Source code omitted for this binary file)"; + } else { + const sourceLines = source.split(/\r?\n/); + const start = Math.max(0, lineNumber - 3); + const linesBefore = sourceLines.slice(start, lineNumber - 1); + const theLine = sourceLines[lineNumber - 1]; + const linesAfter = sourceLines.slice(lineNumber, lineNumber + 2); + message += + linesBefore.map(l => `\n| ${l}`).join("") + + `\n> ${theLine}` + + linesAfter.map(l => `\n| ${l}`).join(""); + } + loc = err.loc; + } else { + message += "\n" + err.stack; + } + + super(message); + + this.name = "ModuleParseError"; + this.module = module; + this.loc = loc; + this.error = err; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ModuleParseError; + + +/***/ }), + +/***/ 44576: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Dependency")} Dependency */ + +class ModuleReason { + /** + * @param {Module} module the referencing module + * @param {Dependency} dependency the referencing dependency + * @param {string=} explanation some extra detail + */ + constructor(module, dependency, explanation) { + this.module = module; + this.dependency = dependency; + this.explanation = explanation; + this._chunks = null; + } + + hasChunk(chunk) { + if (this._chunks) { + if (this._chunks.has(chunk)) return true; + } else if (this.module && this.module._chunks.has(chunk)) return true; + return false; + } + + rewriteChunks(oldChunk, newChunks) { + if (!this._chunks) { + if (this.module) { + if (!this.module._chunks.has(oldChunk)) return; + this._chunks = new Set(this.module._chunks); + } else { + this._chunks = new Set(); + } + } + if (this._chunks.has(oldChunk)) { + this._chunks.delete(oldChunk); + for (let i = 0; i < newChunks.length; i++) { + this._chunks.add(newChunks[i]); + } + } + } +} + +module.exports = ModuleReason; + + +/***/ }), + +/***/ 75100: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { Tapable, SyncWaterfallHook, SyncHook } = __webpack_require__(92402); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Module")} Module */ + +module.exports = class ModuleTemplate extends Tapable { + constructor(runtimeTemplate, type) { + super(); + this.runtimeTemplate = runtimeTemplate; + this.type = type; + this.hooks = { + content: new SyncWaterfallHook([ + "source", + "module", + "options", + "dependencyTemplates" + ]), + module: new SyncWaterfallHook([ + "source", + "module", + "options", + "dependencyTemplates" + ]), + render: new SyncWaterfallHook([ + "source", + "module", + "options", + "dependencyTemplates" + ]), + package: new SyncWaterfallHook([ + "source", + "module", + "options", + "dependencyTemplates" + ]), + hash: new SyncHook(["hash"]) + }; + } + + /** + * @param {Module} module the module + * @param {TODO} dependencyTemplates templates for dependencies + * @param {TODO} options render options + * @returns {Source} the source + */ + render(module, dependencyTemplates, options) { + try { + const moduleSource = module.source( + dependencyTemplates, + this.runtimeTemplate, + this.type + ); + const moduleSourcePostContent = this.hooks.content.call( + moduleSource, + module, + options, + dependencyTemplates + ); + const moduleSourcePostModule = this.hooks.module.call( + moduleSourcePostContent, + module, + options, + dependencyTemplates + ); + const moduleSourcePostRender = this.hooks.render.call( + moduleSourcePostModule, + module, + options, + dependencyTemplates + ); + return this.hooks.package.call( + moduleSourcePostRender, + module, + options, + dependencyTemplates + ); + } catch (e) { + e.message = `${module.identifier()}\n${e.message}`; + throw e; + } + } + + updateHash(hash) { + hash.update("1"); + this.hooks.hash.call(hash); + } +}; + + +/***/ }), + +/***/ 6372: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); +const { cleanUp } = __webpack_require__(80140); + +class ModuleWarning extends WebpackError { + constructor(module, warning, { from = null } = {}) { + let message = "Module Warning"; + if (from) { + message += ` (from ${from}):\n`; + } else { + message += ": "; + } + if (warning && typeof warning === "object" && warning.message) { + message += warning.message; + } else if (warning) { + message += warning; + } + super(message); + this.name = "ModuleWarning"; + this.module = module; + this.warning = warning; + this.details = + warning && typeof warning === "object" && warning.stack + ? cleanUp(warning.stack, this.message) + : undefined; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ModuleWarning; + + +/***/ }), + +/***/ 10238: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { Tapable, SyncHook, MultiHook } = __webpack_require__(92402); +const asyncLib = __webpack_require__(36386); +const MultiWatching = __webpack_require__(66624); +const MultiStats = __webpack_require__(55144); +const ConcurrentCompilationError = __webpack_require__(18933); + +module.exports = class MultiCompiler extends Tapable { + constructor(compilers) { + super(); + this.hooks = { + done: new SyncHook(["stats"]), + invalid: new MultiHook(compilers.map(c => c.hooks.invalid)), + run: new MultiHook(compilers.map(c => c.hooks.run)), + watchClose: new SyncHook([]), + watchRun: new MultiHook(compilers.map(c => c.hooks.watchRun)), + infrastructureLog: new MultiHook( + compilers.map(c => c.hooks.infrastructureLog) + ) + }; + if (!Array.isArray(compilers)) { + compilers = Object.keys(compilers).map(name => { + compilers[name].name = name; + return compilers[name]; + }); + } + this.compilers = compilers; + let doneCompilers = 0; + let compilerStats = []; + let index = 0; + for (const compiler of this.compilers) { + let compilerDone = false; + const compilerIndex = index++; + // eslint-disable-next-line no-loop-func + compiler.hooks.done.tap("MultiCompiler", stats => { + if (!compilerDone) { + compilerDone = true; + doneCompilers++; + } + compilerStats[compilerIndex] = stats; + if (doneCompilers === this.compilers.length) { + this.hooks.done.call(new MultiStats(compilerStats)); + } + }); + // eslint-disable-next-line no-loop-func + compiler.hooks.invalid.tap("MultiCompiler", () => { + if (compilerDone) { + compilerDone = false; + doneCompilers--; + } + }); + } + this.running = false; + } + + get outputPath() { + let commonPath = this.compilers[0].outputPath; + for (const compiler of this.compilers) { + while ( + compiler.outputPath.indexOf(commonPath) !== 0 && + /[/\\]/.test(commonPath) + ) { + commonPath = commonPath.replace(/[/\\][^/\\]*$/, ""); + } + } + + if (!commonPath && this.compilers[0].outputPath[0] === "/") return "/"; + return commonPath; + } + + get inputFileSystem() { + throw new Error("Cannot read inputFileSystem of a MultiCompiler"); + } + + get outputFileSystem() { + throw new Error("Cannot read outputFileSystem of a MultiCompiler"); + } + + set inputFileSystem(value) { + for (const compiler of this.compilers) { + compiler.inputFileSystem = value; + } + } + + set outputFileSystem(value) { + for (const compiler of this.compilers) { + compiler.outputFileSystem = value; + } + } + + getInfrastructureLogger(name) { + return this.compilers[0].getInfrastructureLogger(name); + } + + validateDependencies(callback) { + const edges = new Set(); + const missing = []; + const targetFound = compiler => { + for (const edge of edges) { + if (edge.target === compiler) { + return true; + } + } + return false; + }; + const sortEdges = (e1, e2) => { + return ( + e1.source.name.localeCompare(e2.source.name) || + e1.target.name.localeCompare(e2.target.name) + ); + }; + for (const source of this.compilers) { + if (source.dependencies) { + for (const dep of source.dependencies) { + const target = this.compilers.find(c => c.name === dep); + if (!target) { + missing.push(dep); + } else { + edges.add({ + source, + target + }); + } + } + } + } + const errors = missing.map(m => `Compiler dependency \`${m}\` not found.`); + const stack = this.compilers.filter(c => !targetFound(c)); + while (stack.length > 0) { + const current = stack.pop(); + for (const edge of edges) { + if (edge.source === current) { + edges.delete(edge); + const target = edge.target; + if (!targetFound(target)) { + stack.push(target); + } + } + } + } + if (edges.size > 0) { + const lines = Array.from(edges) + .sort(sortEdges) + .map(edge => `${edge.source.name} -> ${edge.target.name}`); + lines.unshift("Circular dependency found in compiler dependencies."); + errors.unshift(lines.join("\n")); + } + if (errors.length > 0) { + const message = errors.join("\n"); + callback(new Error(message)); + return false; + } + return true; + } + + runWithDependencies(compilers, fn, callback) { + const fulfilledNames = new Set(); + let remainingCompilers = compilers; + const isDependencyFulfilled = d => fulfilledNames.has(d); + const getReadyCompilers = () => { + let readyCompilers = []; + let list = remainingCompilers; + remainingCompilers = []; + for (const c of list) { + const ready = + !c.dependencies || c.dependencies.every(isDependencyFulfilled); + if (ready) { + readyCompilers.push(c); + } else { + remainingCompilers.push(c); + } + } + return readyCompilers; + }; + const runCompilers = callback => { + if (remainingCompilers.length === 0) return callback(); + asyncLib.map( + getReadyCompilers(), + (compiler, callback) => { + fn(compiler, err => { + if (err) return callback(err); + fulfilledNames.add(compiler.name); + runCompilers(callback); + }); + }, + callback + ); + }; + runCompilers(callback); + } + + watch(watchOptions, handler) { + if (this.running) return handler(new ConcurrentCompilationError()); + + let watchings = []; + let allStats = this.compilers.map(() => null); + let compilerStatus = this.compilers.map(() => false); + if (this.validateDependencies(handler)) { + this.running = true; + this.runWithDependencies( + this.compilers, + (compiler, callback) => { + const compilerIdx = this.compilers.indexOf(compiler); + let firstRun = true; + let watching = compiler.watch( + Array.isArray(watchOptions) + ? watchOptions[compilerIdx] + : watchOptions, + (err, stats) => { + if (err) handler(err); + if (stats) { + allStats[compilerIdx] = stats; + compilerStatus[compilerIdx] = "new"; + if (compilerStatus.every(Boolean)) { + const freshStats = allStats.filter((s, idx) => { + return compilerStatus[idx] === "new"; + }); + compilerStatus.fill(true); + const multiStats = new MultiStats(freshStats); + handler(null, multiStats); + } + } + if (firstRun && !err) { + firstRun = false; + callback(); + } + } + ); + watchings.push(watching); + }, + () => { + // ignore + } + ); + } + + return new MultiWatching(watchings, this); + } + + run(callback) { + if (this.running) { + return callback(new ConcurrentCompilationError()); + } + + const finalCallback = (err, stats) => { + this.running = false; + + if (callback !== undefined) { + return callback(err, stats); + } + }; + + const allStats = this.compilers.map(() => null); + if (this.validateDependencies(callback)) { + this.running = true; + this.runWithDependencies( + this.compilers, + (compiler, callback) => { + const compilerIdx = this.compilers.indexOf(compiler); + compiler.run((err, stats) => { + if (err) { + return callback(err); + } + allStats[compilerIdx] = stats; + callback(); + }); + }, + err => { + if (err) { + return finalCallback(err); + } + finalCallback(null, new MultiStats(allStats)); + } + ); + } + } + + purgeInputFileSystem() { + for (const compiler of this.compilers) { + if (compiler.inputFileSystem && compiler.inputFileSystem.purge) { + compiler.inputFileSystem.purge(); + } + } + } +}; + + +/***/ }), + +/***/ 98046: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const MultiEntryDependency = __webpack_require__(7791); +const SingleEntryDependency = __webpack_require__(84828); +const MultiModuleFactory = __webpack_require__(24005); + +/** @typedef {import("./Compiler")} Compiler */ + +class MultiEntryPlugin { + /** + * The MultiEntryPlugin is invoked whenever this.options.entry value is an array of paths + * @param {string} context context path + * @param {string[]} entries array of entry paths + * @param {string} name entry key name + */ + constructor(context, entries, name) { + this.context = context; + this.entries = entries; + this.name = name; + } + + /** + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "MultiEntryPlugin", + (compilation, { normalModuleFactory }) => { + const multiModuleFactory = new MultiModuleFactory(); + + compilation.dependencyFactories.set( + MultiEntryDependency, + multiModuleFactory + ); + compilation.dependencyFactories.set( + SingleEntryDependency, + normalModuleFactory + ); + } + ); + + compiler.hooks.make.tapAsync( + "MultiEntryPlugin", + (compilation, callback) => { + const { context, entries, name } = this; + + const dep = MultiEntryPlugin.createDependency(entries, name); + compilation.addEntry(context, dep, name, callback); + } + ); + } + + /** + * @param {string[]} entries each entry path string + * @param {string} name name of the entry + * @returns {MultiEntryDependency} returns a constructed Dependency + */ + static createDependency(entries, name) { + return new MultiEntryDependency( + entries.map((e, idx) => { + const dep = new SingleEntryDependency(e); + // Because entrypoints are not dependencies found in an + // existing module, we give it a synthetic id + dep.loc = { + name, + index: idx + }; + return dep; + }), + name + ); + } +} + +module.exports = MultiEntryPlugin; + + +/***/ }), + +/***/ 4198: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Module = __webpack_require__(75993); +const Template = __webpack_require__(96066); +const { RawSource } = __webpack_require__(53665); + +/** @typedef {import("./util/createHash").Hash} Hash */ + +class MultiModule extends Module { + constructor(context, dependencies, name) { + super("javascript/dynamic", context); + + // Info from Factory + this.dependencies = dependencies; + this.name = name; + this._identifier = `multi ${this.dependencies + .map(d => d.request) + .join(" ")}`; + } + + identifier() { + return this._identifier; + } + + readableIdentifier(requestShortener) { + return `multi ${this.dependencies + .map(d => requestShortener.shorten(d.request)) + .join(" ")}`; + } + + build(options, compilation, resolver, fs, callback) { + this.built = true; + this.buildMeta = {}; + this.buildInfo = {}; + return callback(); + } + + needRebuild() { + return false; + } + + size() { + return 16 + this.dependencies.length * 12; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ + updateHash(hash) { + hash.update("multi module"); + hash.update(this.name || ""); + super.updateHash(hash); + } + + source(dependencyTemplates, runtimeTemplate) { + const str = []; + let idx = 0; + for (const dep of this.dependencies) { + if (dep.module) { + if (idx === this.dependencies.length - 1) { + str.push("module.exports = "); + } + str.push("__webpack_require__("); + if (runtimeTemplate.outputOptions.pathinfo) { + str.push(Template.toComment(dep.request)); + } + str.push(`${JSON.stringify(dep.module.id)}`); + str.push(")"); + } else { + const content = __webpack_require__(75386).module( + dep.request + ); + str.push(content); + } + str.push(";\n"); + idx++; + } + return new RawSource(str.join("")); + } +} + +module.exports = MultiModule; + + +/***/ }), + +/***/ 24005: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { Tapable } = __webpack_require__(92402); +const MultiModule = __webpack_require__(4198); + +module.exports = class MultiModuleFactory extends Tapable { + constructor() { + super(); + this.hooks = {}; + } + + create(data, callback) { + const dependency = data.dependencies[0]; + callback( + null, + new MultiModule(data.context, dependency.dependencies, dependency.name) + ); + } +}; + + +/***/ }), + +/***/ 55144: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Stats = __webpack_require__(99977); + +const optionOrFallback = (optionValue, fallbackValue) => + optionValue !== undefined ? optionValue : fallbackValue; + +class MultiStats { + constructor(stats) { + this.stats = stats; + this.hash = stats.map(stat => stat.hash).join(""); + } + + hasErrors() { + return this.stats + .map(stat => stat.hasErrors()) + .reduce((a, b) => a || b, false); + } + + hasWarnings() { + return this.stats + .map(stat => stat.hasWarnings()) + .reduce((a, b) => a || b, false); + } + + toJson(options, forToString) { + if (typeof options === "boolean" || typeof options === "string") { + options = Stats.presetToOptions(options); + } else if (!options) { + options = {}; + } + const jsons = this.stats.map((stat, idx) => { + const childOptions = Stats.getChildOptions(options, idx); + const obj = stat.toJson(childOptions, forToString); + obj.name = stat.compilation && stat.compilation.name; + return obj; + }); + const showVersion = + options.version === undefined + ? jsons.every(j => j.version) + : options.version !== false; + const showHash = + options.hash === undefined + ? jsons.every(j => j.hash) + : options.hash !== false; + if (showVersion) { + for (const j of jsons) { + delete j.version; + } + } + const obj = { + errors: jsons.reduce((arr, j) => { + return arr.concat( + j.errors.map(msg => { + return `(${j.name}) ${msg}`; + }) + ); + }, []), + warnings: jsons.reduce((arr, j) => { + return arr.concat( + j.warnings.map(msg => { + return `(${j.name}) ${msg}`; + }) + ); + }, []) + }; + if (showVersion) obj.version = __webpack_require__(71618)/* .version */ .i8; + if (showHash) obj.hash = this.hash; + if (options.children !== false) obj.children = jsons; + return obj; + } + + toString(options) { + if (typeof options === "boolean" || typeof options === "string") { + options = Stats.presetToOptions(options); + } else if (!options) { + options = {}; + } + + const useColors = optionOrFallback(options.colors, false); + + const obj = this.toJson(options, true); + + return Stats.jsonToString(obj, useColors); + } +} + +module.exports = MultiStats; + + +/***/ }), + +/***/ 66624: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const asyncLib = __webpack_require__(36386); + +class MultiWatching { + constructor(watchings, compiler) { + this.watchings = watchings; + this.compiler = compiler; + } + + invalidate() { + for (const watching of this.watchings) { + watching.invalidate(); + } + } + + suspend() { + for (const watching of this.watchings) { + watching.suspend(); + } + } + + resume() { + for (const watching of this.watchings) { + watching.resume(); + } + } + + close(callback) { + asyncLib.forEach( + this.watchings, + (watching, finishedCallback) => { + watching.close(finishedCallback); + }, + err => { + this.compiler.hooks.watchClose.call(); + if (typeof callback === "function") { + this.compiler.running = false; + callback(err); + } + } + ); + } +} + +module.exports = MultiWatching; + + +/***/ }), + +/***/ 70419: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class NamedChunksPlugin { + static defaultNameResolver(chunk) { + return chunk.name || null; + } + + constructor(nameResolver) { + this.nameResolver = nameResolver || NamedChunksPlugin.defaultNameResolver; + } + + apply(compiler) { + compiler.hooks.compilation.tap("NamedChunksPlugin", compilation => { + compilation.hooks.beforeChunkIds.tap("NamedChunksPlugin", chunks => { + for (const chunk of chunks) { + if (chunk.id === null) { + chunk.id = this.nameResolver(chunk); + } + } + }); + }); + } +} + +module.exports = NamedChunksPlugin; + + +/***/ }), + +/***/ 86707: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const createHash = __webpack_require__(15660); +const RequestShortener = __webpack_require__(54254); + +const getHash = str => { + const hash = createHash("md4"); + hash.update(str); + const digest = /** @type {string} */ (hash.digest("hex")); + return digest.substr(0, 4); +}; + +class NamedModulesPlugin { + constructor(options) { + this.options = options || {}; + } + + apply(compiler) { + compiler.hooks.compilation.tap("NamedModulesPlugin", compilation => { + compilation.hooks.beforeModuleIds.tap("NamedModulesPlugin", modules => { + const namedModules = new Map(); + const context = this.options.context || compiler.options.context; + + for (const module of modules) { + if (module.id === null && module.libIdent) { + module.id = module.libIdent({ context }); + } + + if (module.id !== null) { + const namedModule = namedModules.get(module.id); + if (namedModule !== undefined) { + namedModule.push(module); + } else { + namedModules.set(module.id, [module]); + } + } + } + + for (const namedModule of namedModules.values()) { + if (namedModule.length > 1) { + for (const module of namedModule) { + const requestShortener = new RequestShortener(context); + module.id = `${module.id}?${getHash( + requestShortener.shorten(module.identifier()) + )}`; + } + } + } + }); + }); + } +} + +module.exports = NamedModulesPlugin; + + +/***/ }), + +/***/ 22615: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class NoEmitOnErrorsPlugin { + apply(compiler) { + compiler.hooks.shouldEmit.tap("NoEmitOnErrorsPlugin", compilation => { + if (compilation.getStats().hasErrors()) return false; + }); + compiler.hooks.compilation.tap("NoEmitOnErrorsPlugin", compilation => { + compilation.hooks.shouldRecord.tap("NoEmitOnErrorsPlugin", () => { + if (compilation.getStats().hasErrors()) return false; + }); + }); + } +} + +module.exports = NoEmitOnErrorsPlugin; + + +/***/ }), + +/***/ 45759: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +module.exports = class NoModeWarning extends WebpackError { + constructor(modules) { + super(); + + this.name = "NoModeWarning"; + this.message = + "configuration\n" + + "The 'mode' option has not been set, webpack will fallback to 'production' for this value. " + + "Set 'mode' option to 'development' or 'production' to enable defaults for each environment.\n" + + "You can also set it to 'none' to disable any default behavior. " + + "Learn more: https://webpack.js.org/configuration/mode/"; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 28386: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); +const ParserHelpers = __webpack_require__(23999); +const ConstDependency = __webpack_require__(71101); + +const NullFactory = __webpack_require__(40438); + +class NodeStuffPlugin { + constructor(options) { + this.options = options; + } + + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap( + "NodeStuffPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set(ConstDependency, new NullFactory()); + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + const handler = (parser, parserOptions) => { + if (parserOptions.node === false) return; + + let localOptions = options; + if (parserOptions.node) { + localOptions = Object.assign({}, localOptions, parserOptions.node); + } + + const setConstant = (expressionName, value) => { + parser.hooks.expression + .for(expressionName) + .tap("NodeStuffPlugin", () => { + parser.state.current.addVariable( + expressionName, + JSON.stringify(value) + ); + return true; + }); + }; + + const setModuleConstant = (expressionName, fn) => { + parser.hooks.expression + .for(expressionName) + .tap("NodeStuffPlugin", () => { + parser.state.current.addVariable( + expressionName, + JSON.stringify(fn(parser.state.module)) + ); + return true; + }); + }; + const context = compiler.context; + if (localOptions.__filename) { + if (localOptions.__filename === "mock") { + setConstant("__filename", "/index.js"); + } else { + setModuleConstant("__filename", module => + path.relative(context, module.resource) + ); + } + parser.hooks.evaluateIdentifier + .for("__filename") + .tap("NodeStuffPlugin", expr => { + if (!parser.state.module) return; + const resource = parser.state.module.resource; + const i = resource.indexOf("?"); + return ParserHelpers.evaluateToString( + i < 0 ? resource : resource.substr(0, i) + )(expr); + }); + } + if (localOptions.__dirname) { + if (localOptions.__dirname === "mock") { + setConstant("__dirname", "/"); + } else { + setModuleConstant("__dirname", module => + path.relative(context, module.context) + ); + } + parser.hooks.evaluateIdentifier + .for("__dirname") + .tap("NodeStuffPlugin", expr => { + if (!parser.state.module) return; + return ParserHelpers.evaluateToString( + parser.state.module.context + )(expr); + }); + } + parser.hooks.expression + .for("require.extensions") + .tap( + "NodeStuffPlugin", + ParserHelpers.expressionIsUnsupported( + parser, + "require.extensions is not supported by webpack. Use a loader instead." + ) + ); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("NodeStuffPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("NodeStuffPlugin", handler); + } + ); + } +} +module.exports = NodeStuffPlugin; + + +/***/ }), + +/***/ 25963: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const NativeModule = __webpack_require__(32282); + +const { + CachedSource, + LineToLineMappedSource, + OriginalSource, + RawSource, + SourceMapSource +} = __webpack_require__(53665); +const { getContext, runLoaders } = __webpack_require__(73278); + +const WebpackError = __webpack_require__(97391); +const Module = __webpack_require__(75993); +const ModuleParseError = __webpack_require__(62500); +const ModuleBuildError = __webpack_require__(12072); +const ModuleError = __webpack_require__(82528); +const ModuleWarning = __webpack_require__(6372); +const createHash = __webpack_require__(15660); +const contextify = __webpack_require__(94658).contextify; + +/** @typedef {import("./util/createHash").Hash} Hash */ + +const asString = buf => { + if (Buffer.isBuffer(buf)) { + return buf.toString("utf-8"); + } + return buf; +}; + +const asBuffer = str => { + if (!Buffer.isBuffer(str)) { + return Buffer.from(str, "utf-8"); + } + return str; +}; + +class NonErrorEmittedError extends WebpackError { + constructor(error) { + super(); + + this.name = "NonErrorEmittedError"; + this.message = "(Emitted value instead of an instance of Error) " + error; + + Error.captureStackTrace(this, this.constructor); + } +} + +/** + * @typedef {Object} CachedSourceEntry + * @property {TODO} source the generated source + * @property {string} hash the hash value + */ + +class NormalModule extends Module { + constructor({ + type, + request, + userRequest, + rawRequest, + loaders, + resource, + matchResource, + parser, + generator, + resolveOptions + }) { + super(type, getContext(resource)); + + // Info from Factory + this.request = request; + this.userRequest = userRequest; + this.rawRequest = rawRequest; + this.binary = type.startsWith("webassembly"); + this.parser = parser; + this.generator = generator; + this.resource = resource; + this.matchResource = matchResource; + this.loaders = loaders; + if (resolveOptions !== undefined) this.resolveOptions = resolveOptions; + + // Info from Build + this.error = null; + this._source = null; + this._sourceSize = null; + this._buildHash = ""; + this.buildTimestamp = undefined; + /** @private @type {Map} */ + this._cachedSources = new Map(); + + // Options for the NormalModule set by plugins + // TODO refactor this -> options object filled from Factory + this.useSourceMap = false; + this.lineToLine = false; + + // Cache + this._lastSuccessfulBuildMeta = {}; + } + + identifier() { + return this.request; + } + + readableIdentifier(requestShortener) { + return requestShortener.shorten(this.userRequest); + } + + libIdent(options) { + return contextify(options.context, this.userRequest); + } + + nameForCondition() { + const resource = this.matchResource || this.resource; + const idx = resource.indexOf("?"); + if (idx >= 0) return resource.substr(0, idx); + return resource; + } + + updateCacheModule(module) { + this.type = module.type; + this.request = module.request; + this.userRequest = module.userRequest; + this.rawRequest = module.rawRequest; + this.parser = module.parser; + this.generator = module.generator; + this.resource = module.resource; + this.matchResource = module.matchResource; + this.loaders = module.loaders; + this.resolveOptions = module.resolveOptions; + } + + createSourceForAsset(name, content, sourceMap) { + if (!sourceMap) { + return new RawSource(content); + } + + if (typeof sourceMap === "string") { + return new OriginalSource(content, sourceMap); + } + + return new SourceMapSource(content, name, sourceMap); + } + + createLoaderContext(resolver, options, compilation, fs) { + const requestShortener = compilation.runtimeTemplate.requestShortener; + const getCurrentLoaderName = () => { + const currentLoader = this.getCurrentLoader(loaderContext); + if (!currentLoader) return "(not in loader scope)"; + return requestShortener.shorten(currentLoader.loader); + }; + const loaderContext = { + version: 2, + emitWarning: warning => { + if (!(warning instanceof Error)) { + warning = new NonErrorEmittedError(warning); + } + this.warnings.push( + new ModuleWarning(this, warning, { + from: getCurrentLoaderName() + }) + ); + }, + emitError: error => { + if (!(error instanceof Error)) { + error = new NonErrorEmittedError(error); + } + this.errors.push( + new ModuleError(this, error, { + from: getCurrentLoaderName() + }) + ); + }, + getLogger: name => { + const currentLoader = this.getCurrentLoader(loaderContext); + return compilation.getLogger(() => + [currentLoader && currentLoader.loader, name, this.identifier()] + .filter(Boolean) + .join("|") + ); + }, + // TODO remove in webpack 5 + exec: (code, filename) => { + // @ts-ignore Argument of type 'this' is not assignable to parameter of type 'Module'. + const module = new NativeModule(filename, this); + // @ts-ignore _nodeModulePaths is deprecated and undocumented Node.js API + module.paths = NativeModule._nodeModulePaths(this.context); + module.filename = filename; + module._compile(code, filename); + return module.exports; + }, + resolve(context, request, callback) { + resolver.resolve({}, context, request, {}, callback); + }, + getResolve(options) { + const child = options ? resolver.withOptions(options) : resolver; + return (context, request, callback) => { + if (callback) { + child.resolve({}, context, request, {}, callback); + } else { + return new Promise((resolve, reject) => { + child.resolve({}, context, request, {}, (err, result) => { + if (err) reject(err); + else resolve(result); + }); + }); + } + }; + }, + emitFile: (name, content, sourceMap, assetInfo) => { + if (!this.buildInfo.assets) { + this.buildInfo.assets = Object.create(null); + this.buildInfo.assetsInfo = new Map(); + } + this.buildInfo.assets[name] = this.createSourceForAsset( + name, + content, + sourceMap + ); + this.buildInfo.assetsInfo.set(name, assetInfo); + }, + rootContext: options.context, + webpack: true, + sourceMap: !!this.useSourceMap, + mode: options.mode || "production", + _module: this, + _compilation: compilation, + _compiler: compilation.compiler, + fs: fs + }; + + compilation.hooks.normalModuleLoader.call(loaderContext, this); + if (options.loader) { + Object.assign(loaderContext, options.loader); + } + + return loaderContext; + } + + getCurrentLoader(loaderContext, index = loaderContext.loaderIndex) { + if ( + this.loaders && + this.loaders.length && + index < this.loaders.length && + index >= 0 && + this.loaders[index] + ) { + return this.loaders[index]; + } + return null; + } + + createSource(source, resourceBuffer, sourceMap) { + // if there is no identifier return raw source + if (!this.identifier) { + return new RawSource(source); + } + + // from here on we assume we have an identifier + const identifier = this.identifier(); + + if (this.lineToLine && resourceBuffer) { + return new LineToLineMappedSource( + source, + identifier, + asString(resourceBuffer) + ); + } + + if (this.useSourceMap && sourceMap) { + return new SourceMapSource(source, identifier, sourceMap); + } + + if (Buffer.isBuffer(source)) { + // @ts-ignore + // TODO We need to fix @types/webpack-sources to allow RawSource to take a Buffer | string + return new RawSource(source); + } + + return new OriginalSource(source, identifier); + } + + doBuild(options, compilation, resolver, fs, callback) { + const loaderContext = this.createLoaderContext( + resolver, + options, + compilation, + fs + ); + + runLoaders( + { + resource: this.resource, + loaders: this.loaders, + context: loaderContext, + readResource: fs.readFile.bind(fs) + }, + (err, result) => { + if (result) { + this.buildInfo.cacheable = result.cacheable; + this.buildInfo.fileDependencies = new Set(result.fileDependencies); + this.buildInfo.contextDependencies = new Set( + result.contextDependencies + ); + } + + if (err) { + if (!(err instanceof Error)) { + err = new NonErrorEmittedError(err); + } + const currentLoader = this.getCurrentLoader(loaderContext); + const error = new ModuleBuildError(this, err, { + from: + currentLoader && + compilation.runtimeTemplate.requestShortener.shorten( + currentLoader.loader + ) + }); + return callback(error); + } + + const resourceBuffer = result.resourceBuffer; + const source = result.result[0]; + const sourceMap = result.result.length >= 1 ? result.result[1] : null; + const extraInfo = result.result.length >= 2 ? result.result[2] : null; + + if (!Buffer.isBuffer(source) && typeof source !== "string") { + const currentLoader = this.getCurrentLoader(loaderContext, 0); + const err = new Error( + `Final loader (${ + currentLoader + ? compilation.runtimeTemplate.requestShortener.shorten( + currentLoader.loader + ) + : "unknown" + }) didn't return a Buffer or String` + ); + const error = new ModuleBuildError(this, err); + return callback(error); + } + + this._source = this.createSource( + this.binary ? asBuffer(source) : asString(source), + resourceBuffer, + sourceMap + ); + this._sourceSize = null; + this._ast = + typeof extraInfo === "object" && + extraInfo !== null && + extraInfo.webpackAST !== undefined + ? extraInfo.webpackAST + : null; + return callback(); + } + ); + } + + markModuleAsErrored(error) { + // Restore build meta from successful build to keep importing state + this.buildMeta = Object.assign({}, this._lastSuccessfulBuildMeta); + this.error = error; + this.errors.push(this.error); + this._source = new RawSource( + "throw new Error(" + JSON.stringify(this.error.message) + ");" + ); + this._sourceSize = null; + this._ast = null; + } + + applyNoParseRule(rule, content) { + // must start with "rule" if rule is a string + if (typeof rule === "string") { + return content.indexOf(rule) === 0; + } + + if (typeof rule === "function") { + return rule(content); + } + // we assume rule is a regexp + return rule.test(content); + } + + // check if module should not be parsed + // returns "true" if the module should !not! be parsed + // returns "false" if the module !must! be parsed + shouldPreventParsing(noParseRule, request) { + // if no noParseRule exists, return false + // the module !must! be parsed. + if (!noParseRule) { + return false; + } + + // we only have one rule to check + if (!Array.isArray(noParseRule)) { + // returns "true" if the module is !not! to be parsed + return this.applyNoParseRule(noParseRule, request); + } + + for (let i = 0; i < noParseRule.length; i++) { + const rule = noParseRule[i]; + // early exit on first truthy match + // this module is !not! to be parsed + if (this.applyNoParseRule(rule, request)) { + return true; + } + } + // no match found, so this module !should! be parsed + return false; + } + + _initBuildHash(compilation) { + const hash = createHash(compilation.outputOptions.hashFunction); + if (this._source) { + hash.update("source"); + this._source.updateHash(hash); + } + hash.update("meta"); + hash.update(JSON.stringify(this.buildMeta)); + this._buildHash = /** @type {string} */ (hash.digest("hex")); + } + + build(options, compilation, resolver, fs, callback) { + this.buildTimestamp = Date.now(); + this.built = true; + this._source = null; + this._sourceSize = null; + this._ast = null; + this._buildHash = ""; + this.error = null; + this.errors.length = 0; + this.warnings.length = 0; + this.buildMeta = {}; + this.buildInfo = { + cacheable: false, + fileDependencies: new Set(), + contextDependencies: new Set(), + assets: undefined, + assetsInfo: undefined + }; + + return this.doBuild(options, compilation, resolver, fs, err => { + this._cachedSources.clear(); + + // if we have an error mark module as failed and exit + if (err) { + this.markModuleAsErrored(err); + this._initBuildHash(compilation); + return callback(); + } + + // check if this module should !not! be parsed. + // if so, exit here; + const noParseRule = options.module && options.module.noParse; + if (this.shouldPreventParsing(noParseRule, this.request)) { + this._initBuildHash(compilation); + return callback(); + } + + const handleParseError = e => { + const source = this._source.source(); + const loaders = this.loaders.map(item => + contextify(options.context, item.loader) + ); + const error = new ModuleParseError(this, source, e, loaders); + this.markModuleAsErrored(error); + this._initBuildHash(compilation); + return callback(); + }; + + const handleParseResult = result => { + this._lastSuccessfulBuildMeta = this.buildMeta; + this._initBuildHash(compilation); + return callback(); + }; + + try { + const result = this.parser.parse( + this._ast || this._source.source(), + { + current: this, + module: this, + compilation: compilation, + options: options + }, + (err, result) => { + if (err) { + handleParseError(err); + } else { + handleParseResult(result); + } + } + ); + if (result !== undefined) { + // parse is sync + handleParseResult(result); + } + } catch (e) { + handleParseError(e); + } + }); + } + + getHashDigest(dependencyTemplates) { + // TODO webpack 5 refactor + let dtHash = dependencyTemplates.get("hash"); + return `${this.hash}-${dtHash}`; + } + + source(dependencyTemplates, runtimeTemplate, type = "javascript") { + const hashDigest = this.getHashDigest(dependencyTemplates); + const cacheEntry = this._cachedSources.get(type); + if (cacheEntry !== undefined && cacheEntry.hash === hashDigest) { + // We can reuse the cached source + return cacheEntry.source; + } + + const source = this.generator.generate( + this, + dependencyTemplates, + runtimeTemplate, + type + ); + + const cachedSource = new CachedSource(source); + this._cachedSources.set(type, { + source: cachedSource, + hash: hashDigest + }); + return cachedSource; + } + + originalSource() { + return this._source; + } + + needRebuild(fileTimestamps, contextTimestamps) { + // always try to rebuild in case of an error + if (this.error) return true; + + // always rebuild when module is not cacheable + if (!this.buildInfo.cacheable) return true; + + // Check timestamps of all dependencies + // Missing timestamp -> need rebuild + // Timestamp bigger than buildTimestamp -> need rebuild + for (const file of this.buildInfo.fileDependencies) { + const timestamp = fileTimestamps.get(file); + if (!timestamp) return true; + if (timestamp >= this.buildTimestamp) return true; + } + for (const file of this.buildInfo.contextDependencies) { + const timestamp = contextTimestamps.get(file); + if (!timestamp) return true; + if (timestamp >= this.buildTimestamp) return true; + } + // elsewise -> no rebuild needed + return false; + } + + size() { + if (this._sourceSize === null) { + this._sourceSize = this._source ? this._source.size() : -1; + } + return this._sourceSize; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ + updateHash(hash) { + hash.update(this._buildHash); + super.updateHash(hash); + } +} + +module.exports = NormalModule; + + +/***/ }), + +/***/ 22298: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + +const path = __webpack_require__(85622); +const asyncLib = __webpack_require__(36386); +const { + Tapable, + AsyncSeriesWaterfallHook, + SyncWaterfallHook, + SyncBailHook, + SyncHook, + HookMap +} = __webpack_require__(92402); +const NormalModule = __webpack_require__(25963); +const RawModule = __webpack_require__(82353); +const RuleSet = __webpack_require__(84247); +const { cachedCleverMerge } = __webpack_require__(67916); + +const EMPTY_RESOLVE_OPTIONS = {}; + +const MATCH_RESOURCE_REGEX = /^([^!]+)!=!/; + +const loaderToIdent = data => { + if (!data.options) { + return data.loader; + } + if (typeof data.options === "string") { + return data.loader + "?" + data.options; + } + if (typeof data.options !== "object") { + throw new Error("loader options must be string or object"); + } + if (data.ident) { + return data.loader + "??" + data.ident; + } + return data.loader + "?" + JSON.stringify(data.options); +}; + +const identToLoaderRequest = resultString => { + const idx = resultString.indexOf("?"); + if (idx >= 0) { + const loader = resultString.substr(0, idx); + const options = resultString.substr(idx + 1); + return { + loader, + options + }; + } else { + return { + loader: resultString, + options: undefined + }; + } +}; + +const dependencyCache = new WeakMap(); + +class NormalModuleFactory extends Tapable { + constructor(context, resolverFactory, options) { + super(); + this.hooks = { + resolver: new SyncWaterfallHook(["resolver"]), + factory: new SyncWaterfallHook(["factory"]), + beforeResolve: new AsyncSeriesWaterfallHook(["data"]), + afterResolve: new AsyncSeriesWaterfallHook(["data"]), + createModule: new SyncBailHook(["data"]), + module: new SyncWaterfallHook(["module", "data"]), + createParser: new HookMap(() => new SyncBailHook(["parserOptions"])), + parser: new HookMap(() => new SyncHook(["parser", "parserOptions"])), + createGenerator: new HookMap( + () => new SyncBailHook(["generatorOptions"]) + ), + generator: new HookMap( + () => new SyncHook(["generator", "generatorOptions"]) + ) + }; + this._pluginCompat.tap("NormalModuleFactory", options => { + switch (options.name) { + case "before-resolve": + case "after-resolve": + options.async = true; + break; + case "parser": + this.hooks.parser + .for("javascript/auto") + .tap(options.fn.name || "unnamed compat plugin", options.fn); + return true; + } + let match; + match = /^parser (.+)$/.exec(options.name); + if (match) { + this.hooks.parser + .for(match[1]) + .tap( + options.fn.name || "unnamed compat plugin", + options.fn.bind(this) + ); + return true; + } + match = /^create-parser (.+)$/.exec(options.name); + if (match) { + this.hooks.createParser + .for(match[1]) + .tap( + options.fn.name || "unnamed compat plugin", + options.fn.bind(this) + ); + return true; + } + }); + this.resolverFactory = resolverFactory; + this.ruleSet = new RuleSet(options.defaultRules.concat(options.rules)); + this.cachePredicate = + typeof options.unsafeCache === "function" + ? options.unsafeCache + : Boolean.bind(null, options.unsafeCache); + this.context = context || ""; + this.parserCache = Object.create(null); + this.generatorCache = Object.create(null); + this.hooks.factory.tap("NormalModuleFactory", () => (result, callback) => { + let resolver = this.hooks.resolver.call(null); + + // Ignored + if (!resolver) return callback(); + + resolver(result, (err, data) => { + if (err) return callback(err); + + // Ignored + if (!data) return callback(); + + // direct module + if (typeof data.source === "function") return callback(null, data); + + this.hooks.afterResolve.callAsync(data, (err, result) => { + if (err) return callback(err); + + // Ignored + if (!result) return callback(); + + let createdModule = this.hooks.createModule.call(result); + if (!createdModule) { + if (!result.request) { + return callback(new Error("Empty dependency (no request)")); + } + + createdModule = new NormalModule(result); + } + + createdModule = this.hooks.module.call(createdModule, result); + + return callback(null, createdModule); + }); + }); + }); + this.hooks.resolver.tap("NormalModuleFactory", () => (data, callback) => { + const contextInfo = data.contextInfo; + const context = data.context; + const request = data.request; + + const loaderResolver = this.getResolver("loader"); + const normalResolver = this.getResolver("normal", data.resolveOptions); + + let matchResource = undefined; + let requestWithoutMatchResource = request; + const matchResourceMatch = MATCH_RESOURCE_REGEX.exec(request); + if (matchResourceMatch) { + matchResource = matchResourceMatch[1]; + if (/^\.\.?\//.test(matchResource)) { + matchResource = path.join(context, matchResource); + } + requestWithoutMatchResource = request.substr( + matchResourceMatch[0].length + ); + } + + const noPreAutoLoaders = requestWithoutMatchResource.startsWith("-!"); + const noAutoLoaders = + noPreAutoLoaders || requestWithoutMatchResource.startsWith("!"); + const noPrePostAutoLoaders = requestWithoutMatchResource.startsWith("!!"); + let elements = requestWithoutMatchResource + .replace(/^-?!+/, "") + .replace(/!!+/g, "!") + .split("!"); + let resource = elements.pop(); + elements = elements.map(identToLoaderRequest); + + asyncLib.parallel( + [ + callback => + this.resolveRequestArray( + contextInfo, + context, + elements, + loaderResolver, + callback + ), + callback => { + if (resource === "" || resource[0] === "?") { + return callback(null, { + resource + }); + } + + normalResolver.resolve( + contextInfo, + context, + resource, + {}, + (err, resource, resourceResolveData) => { + if (err) return callback(err); + callback(null, { + resourceResolveData, + resource + }); + } + ); + } + ], + (err, results) => { + if (err) return callback(err); + let loaders = results[0]; + const resourceResolveData = results[1].resourceResolveData; + resource = results[1].resource; + + // translate option idents + try { + for (const item of loaders) { + if (typeof item.options === "string" && item.options[0] === "?") { + const ident = item.options.substr(1); + item.options = this.ruleSet.findOptionsByIdent(ident); + item.ident = ident; + } + } + } catch (e) { + return callback(e); + } + + if (resource === false) { + // ignored + return callback( + null, + new RawModule( + "/* (ignored) */", + `ignored ${context} ${request}`, + `${request} (ignored)` + ) + ); + } + + const userRequest = + (matchResource !== undefined ? `${matchResource}!=!` : "") + + loaders + .map(loaderToIdent) + .concat([resource]) + .join("!"); + + let resourcePath = + matchResource !== undefined ? matchResource : resource; + let resourceQuery = ""; + const queryIndex = resourcePath.indexOf("?"); + if (queryIndex >= 0) { + resourceQuery = resourcePath.substr(queryIndex); + resourcePath = resourcePath.substr(0, queryIndex); + } + + const result = this.ruleSet.exec({ + resource: resourcePath, + realResource: + matchResource !== undefined + ? resource.replace(/\?.*/, "") + : resourcePath, + resourceQuery, + issuer: contextInfo.issuer, + compiler: contextInfo.compiler + }); + const settings = {}; + const useLoadersPost = []; + const useLoaders = []; + const useLoadersPre = []; + for (const r of result) { + if (r.type === "use") { + if (r.enforce === "post" && !noPrePostAutoLoaders) { + useLoadersPost.push(r.value); + } else if ( + r.enforce === "pre" && + !noPreAutoLoaders && + !noPrePostAutoLoaders + ) { + useLoadersPre.push(r.value); + } else if ( + !r.enforce && + !noAutoLoaders && + !noPrePostAutoLoaders + ) { + useLoaders.push(r.value); + } + } else if ( + typeof r.value === "object" && + r.value !== null && + typeof settings[r.type] === "object" && + settings[r.type] !== null + ) { + settings[r.type] = cachedCleverMerge(settings[r.type], r.value); + } else { + settings[r.type] = r.value; + } + } + asyncLib.parallel( + [ + this.resolveRequestArray.bind( + this, + contextInfo, + this.context, + useLoadersPost, + loaderResolver + ), + this.resolveRequestArray.bind( + this, + contextInfo, + this.context, + useLoaders, + loaderResolver + ), + this.resolveRequestArray.bind( + this, + contextInfo, + this.context, + useLoadersPre, + loaderResolver + ) + ], + (err, results) => { + if (err) return callback(err); + if (matchResource === undefined) { + loaders = results[0].concat(loaders, results[1], results[2]); + } else { + loaders = results[0].concat(results[1], loaders, results[2]); + } + process.nextTick(() => { + const type = settings.type; + const resolveOptions = settings.resolve; + callback(null, { + context: context, + request: loaders + .map(loaderToIdent) + .concat([resource]) + .join("!"), + dependencies: data.dependencies, + userRequest, + rawRequest: request, + loaders, + resource, + matchResource, + resourceResolveData, + settings, + type, + parser: this.getParser(type, settings.parser), + generator: this.getGenerator(type, settings.generator), + resolveOptions + }); + }); + } + ); + } + ); + }); + } + + create(data, callback) { + const dependencies = data.dependencies; + const cacheEntry = dependencyCache.get(dependencies[0]); + if (cacheEntry) return callback(null, cacheEntry); + const context = data.context || this.context; + const resolveOptions = data.resolveOptions || EMPTY_RESOLVE_OPTIONS; + const request = dependencies[0].request; + const contextInfo = data.contextInfo || {}; + this.hooks.beforeResolve.callAsync( + { + contextInfo, + resolveOptions, + context, + request, + dependencies + }, + (err, result) => { + if (err) return callback(err); + + // Ignored + if (!result) return callback(); + + const factory = this.hooks.factory.call(null); + + // Ignored + if (!factory) return callback(); + + factory(result, (err, module) => { + if (err) return callback(err); + + if (module && this.cachePredicate(module)) { + for (const d of dependencies) { + dependencyCache.set(d, module); + } + } + + callback(null, module); + }); + } + ); + } + + resolveRequestArray(contextInfo, context, array, resolver, callback) { + if (array.length === 0) return callback(null, []); + asyncLib.map( + array, + (item, callback) => { + resolver.resolve( + contextInfo, + context, + item.loader, + {}, + (err, result) => { + if ( + err && + /^[^/]*$/.test(item.loader) && + !/-loader$/.test(item.loader) + ) { + return resolver.resolve( + contextInfo, + context, + item.loader + "-loader", + {}, + err2 => { + if (!err2) { + err.message = + err.message + + "\n" + + "BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.\n" + + ` You need to specify '${item.loader}-loader' instead of '${item.loader}',\n` + + " see https://webpack.js.org/migrate/3/#automatic-loader-module-name-extension-removed"; + } + callback(err); + } + ); + } + if (err) return callback(err); + + const optionsOnly = item.options + ? { + options: item.options + } + : undefined; + return callback( + null, + Object.assign({}, item, identToLoaderRequest(result), optionsOnly) + ); + } + ); + }, + callback + ); + } + + getParser(type, parserOptions) { + let ident = type; + if (parserOptions) { + if (parserOptions.ident) { + ident = `${type}|${parserOptions.ident}`; + } else { + ident = JSON.stringify([type, parserOptions]); + } + } + if (ident in this.parserCache) { + return this.parserCache[ident]; + } + return (this.parserCache[ident] = this.createParser(type, parserOptions)); + } + + createParser(type, parserOptions = {}) { + const parser = this.hooks.createParser.for(type).call(parserOptions); + if (!parser) { + throw new Error(`No parser registered for ${type}`); + } + this.hooks.parser.for(type).call(parser, parserOptions); + return parser; + } + + getGenerator(type, generatorOptions) { + let ident = type; + if (generatorOptions) { + if (generatorOptions.ident) { + ident = `${type}|${generatorOptions.ident}`; + } else { + ident = JSON.stringify([type, generatorOptions]); + } + } + if (ident in this.generatorCache) { + return this.generatorCache[ident]; + } + return (this.generatorCache[ident] = this.createGenerator( + type, + generatorOptions + )); + } + + createGenerator(type, generatorOptions = {}) { + const generator = this.hooks.createGenerator + .for(type) + .call(generatorOptions); + if (!generator) { + throw new Error(`No generator registered for ${type}`); + } + this.hooks.generator.for(type).call(generator, generatorOptions); + return generator; + } + + getResolver(type, resolveOptions) { + return this.resolverFactory.get( + type, + resolveOptions || EMPTY_RESOLVE_OPTIONS + ); + } +} + +module.exports = NormalModuleFactory; + + +/***/ }), + +/***/ 73253: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); + +class NormalModuleReplacementPlugin { + constructor(resourceRegExp, newResource) { + this.resourceRegExp = resourceRegExp; + this.newResource = newResource; + } + + apply(compiler) { + const resourceRegExp = this.resourceRegExp; + const newResource = this.newResource; + compiler.hooks.normalModuleFactory.tap( + "NormalModuleReplacementPlugin", + nmf => { + nmf.hooks.beforeResolve.tap("NormalModuleReplacementPlugin", result => { + if (!result) return; + if (resourceRegExp.test(result.request)) { + if (typeof newResource === "function") { + newResource(result); + } else { + result.request = newResource; + } + } + return result; + }); + nmf.hooks.afterResolve.tap("NormalModuleReplacementPlugin", result => { + if (!result) return; + if (resourceRegExp.test(result.resource)) { + if (typeof newResource === "function") { + newResource(result); + } else { + result.resource = path.resolve( + path.dirname(result.resource), + newResource + ); + } + } + return result; + }); + } + ); + } +} + +module.exports = NormalModuleReplacementPlugin; + + +/***/ }), + +/***/ 40438: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class NullFactory { + create(data, callback) { + return callback(); + } +} +module.exports = NullFactory; + + +/***/ }), + +/***/ 4428: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class OptionsApply { + process(options, compiler) {} +} +module.exports = OptionsApply; + + +/***/ }), + +/***/ 3414: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +/** + * Gets the value at path of object + * @param {object} obj object to query + * @param {string} path query path + * @returns {any} - if {@param path} requests element from array, then `undefined` will be returned + */ +const getProperty = (obj, path) => { + let name = path.split("."); + for (let i = 0; i < name.length - 1; i++) { + obj = obj[name[i]]; + if (typeof obj !== "object" || !obj || Array.isArray(obj)) return; + } + return obj[name.pop()]; +}; + +/** + * Sets the value at path of object. Stops execution, if {@param path} requests element from array to be set + * @param {object} obj object to query + * @param {string} path query path + * @param {any} value value to be set + * @returns {void} + */ +const setProperty = (obj, path, value) => { + let name = path.split("."); + for (let i = 0; i < name.length - 1; i++) { + if (typeof obj[name[i]] !== "object" && obj[name[i]] !== undefined) return; + if (Array.isArray(obj[name[i]])) return; + if (!obj[name[i]]) obj[name[i]] = {}; + obj = obj[name[i]]; + } + obj[name.pop()] = value; +}; + +/** + * @typedef {'call' | 'make' | 'append'} ConfigType + */ +/** + * @typedef {(options: object) => any} MakeConfigHandler + */ +/** + * @typedef {(value: any, options: object) => any} CallConfigHandler + */ +/** + * @typedef {any[]} AppendConfigValues + */ + +class OptionsDefaulter { + constructor() { + /** + * Stores default options settings or functions for computing them + */ + this.defaults = {}; + /** + * Stores configuration for options + * @type {{[key: string]: ConfigType}} + */ + this.config = {}; + } + + /** + * Enhancing {@param options} with default values + * @param {object} options provided options + * @returns {object} - enhanced options + * @throws {Error} - will throw error, if configuration value is other then `undefined` or {@link ConfigType} + */ + process(options) { + options = Object.assign({}, options); + for (let name in this.defaults) { + switch (this.config[name]) { + /** + * If {@link ConfigType} doesn't specified and current value is `undefined`, then default value will be assigned + */ + case undefined: + if (getProperty(options, name) === undefined) { + setProperty(options, name, this.defaults[name]); + } + break; + /** + * Assign result of {@link CallConfigHandler} + */ + case "call": + setProperty( + options, + name, + this.defaults[name].call(this, getProperty(options, name), options) + ); + break; + /** + * Assign result of {@link MakeConfigHandler}, if current value is `undefined` + */ + case "make": + if (getProperty(options, name) === undefined) { + setProperty(options, name, this.defaults[name].call(this, options)); + } + break; + /** + * Adding {@link AppendConfigValues} at the end of the current array + */ + case "append": { + let oldValue = getProperty(options, name); + if (!Array.isArray(oldValue)) { + oldValue = []; + } + oldValue.push(...this.defaults[name]); + setProperty(options, name, oldValue); + break; + } + default: + throw new Error( + "OptionsDefaulter cannot process " + this.config[name] + ); + } + } + return options; + } + + /** + * Builds up default values + * @param {string} name option path + * @param {ConfigType | any} config if {@param def} is provided, then only {@link ConfigType} is allowed + * @param {MakeConfigHandler | CallConfigHandler | AppendConfigValues} [def] defaults + * @returns {void} + */ + set(name, config, def) { + if (def !== undefined) { + this.defaults[name] = def; + this.config[name] = config; + } else { + this.defaults[name] = config; + delete this.config[name]; + } + } +} + +module.exports = OptionsDefaulter; + + +/***/ }), + +/***/ 70558: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +// Syntax: https://developer.mozilla.org/en/SpiderMonkey/Parser_API + +const acorn = __webpack_require__(77087); +const { Tapable, SyncBailHook, HookMap } = __webpack_require__(92402); +const util = __webpack_require__(31669); +const vm = __webpack_require__(92184); +const BasicEvaluatedExpression = __webpack_require__(96770); +const StackedSetMap = __webpack_require__(92251); + +const acornParser = acorn.Parser; + +const joinRanges = (startRange, endRange) => { + if (!endRange) return startRange; + if (!startRange) return endRange; + return [startRange[0], endRange[1]]; +}; + +const defaultParserOptions = { + ranges: true, + locations: true, + ecmaVersion: 11, + sourceType: "module", + onComment: null +}; + +// regexp to match at least one "magic comment" +const webpackCommentRegExp = new RegExp(/(^|\W)webpack[A-Z]{1,}[A-Za-z]{1,}:/); + +const EMPTY_COMMENT_OPTIONS = { + options: null, + errors: null +}; + +class Parser extends Tapable { + constructor(options, sourceType = "auto") { + super(); + this.hooks = { + evaluateTypeof: new HookMap(() => new SyncBailHook(["expression"])), + evaluate: new HookMap(() => new SyncBailHook(["expression"])), + evaluateIdentifier: new HookMap(() => new SyncBailHook(["expression"])), + evaluateDefinedIdentifier: new HookMap( + () => new SyncBailHook(["expression"]) + ), + evaluateCallExpressionMember: new HookMap( + () => new SyncBailHook(["expression", "param"]) + ), + statement: new SyncBailHook(["statement"]), + statementIf: new SyncBailHook(["statement"]), + label: new HookMap(() => new SyncBailHook(["statement"])), + import: new SyncBailHook(["statement", "source"]), + importSpecifier: new SyncBailHook([ + "statement", + "source", + "exportName", + "identifierName" + ]), + export: new SyncBailHook(["statement"]), + exportImport: new SyncBailHook(["statement", "source"]), + exportDeclaration: new SyncBailHook(["statement", "declaration"]), + exportExpression: new SyncBailHook(["statement", "declaration"]), + exportSpecifier: new SyncBailHook([ + "statement", + "identifierName", + "exportName", + "index" + ]), + exportImportSpecifier: new SyncBailHook([ + "statement", + "source", + "identifierName", + "exportName", + "index" + ]), + varDeclaration: new HookMap(() => new SyncBailHook(["declaration"])), + varDeclarationLet: new HookMap(() => new SyncBailHook(["declaration"])), + varDeclarationConst: new HookMap(() => new SyncBailHook(["declaration"])), + varDeclarationVar: new HookMap(() => new SyncBailHook(["declaration"])), + canRename: new HookMap(() => new SyncBailHook(["initExpression"])), + rename: new HookMap(() => new SyncBailHook(["initExpression"])), + assigned: new HookMap(() => new SyncBailHook(["expression"])), + assign: new HookMap(() => new SyncBailHook(["expression"])), + typeof: new HookMap(() => new SyncBailHook(["expression"])), + importCall: new SyncBailHook(["expression"]), + call: new HookMap(() => new SyncBailHook(["expression"])), + callAnyMember: new HookMap(() => new SyncBailHook(["expression"])), + new: new HookMap(() => new SyncBailHook(["expression"])), + expression: new HookMap(() => new SyncBailHook(["expression"])), + expressionAnyMember: new HookMap(() => new SyncBailHook(["expression"])), + expressionConditionalOperator: new SyncBailHook(["expression"]), + expressionLogicalOperator: new SyncBailHook(["expression"]), + program: new SyncBailHook(["ast", "comments"]) + }; + const HOOK_MAP_COMPAT_CONFIG = { + evaluateTypeof: /^evaluate typeof (.+)$/, + evaluateIdentifier: /^evaluate Identifier (.+)$/, + evaluateDefinedIdentifier: /^evaluate defined Identifier (.+)$/, + evaluateCallExpressionMember: /^evaluate CallExpression .(.+)$/, + evaluate: /^evaluate (.+)$/, + label: /^label (.+)$/, + varDeclarationLet: /^var-let (.+)$/, + varDeclarationConst: /^var-const (.+)$/, + varDeclarationVar: /^var-var (.+)$/, + varDeclaration: /^var (.+)$/, + canRename: /^can-rename (.+)$/, + rename: /^rename (.+)$/, + typeof: /^typeof (.+)$/, + assigned: /^assigned (.+)$/, + assign: /^assign (.+)$/, + callAnyMember: /^call (.+)\.\*$/, + call: /^call (.+)$/, + new: /^new (.+)$/, + expressionConditionalOperator: /^expression \?:$/, + expressionAnyMember: /^expression (.+)\.\*$/, + expression: /^expression (.+)$/ + }; + this._pluginCompat.tap("Parser", options => { + for (const name of Object.keys(HOOK_MAP_COMPAT_CONFIG)) { + const regexp = HOOK_MAP_COMPAT_CONFIG[name]; + const match = regexp.exec(options.name); + if (match) { + if (match[1]) { + this.hooks[name].tap( + match[1], + options.fn.name || "unnamed compat plugin", + options.fn.bind(this) + ); + } else { + this.hooks[name].tap( + options.fn.name || "unnamed compat plugin", + options.fn.bind(this) + ); + } + return true; + } + } + }); + this.options = options; + this.sourceType = sourceType; + this.scope = undefined; + this.state = undefined; + this.comments = undefined; + this.initializeEvaluating(); + } + + initializeEvaluating() { + this.hooks.evaluate.for("Literal").tap("Parser", expr => { + switch (typeof expr.value) { + case "number": + return new BasicEvaluatedExpression() + .setNumber(expr.value) + .setRange(expr.range); + case "string": + return new BasicEvaluatedExpression() + .setString(expr.value) + .setRange(expr.range); + case "boolean": + return new BasicEvaluatedExpression() + .setBoolean(expr.value) + .setRange(expr.range); + } + if (expr.value === null) { + return new BasicEvaluatedExpression().setNull().setRange(expr.range); + } + if (expr.value instanceof RegExp) { + return new BasicEvaluatedExpression() + .setRegExp(expr.value) + .setRange(expr.range); + } + }); + this.hooks.evaluate.for("LogicalExpression").tap("Parser", expr => { + let left; + let leftAsBool; + let right; + if (expr.operator === "&&") { + left = this.evaluateExpression(expr.left); + leftAsBool = left && left.asBool(); + if (leftAsBool === false) return left.setRange(expr.range); + if (leftAsBool !== true) return; + right = this.evaluateExpression(expr.right); + return right.setRange(expr.range); + } else if (expr.operator === "||") { + left = this.evaluateExpression(expr.left); + leftAsBool = left && left.asBool(); + if (leftAsBool === true) return left.setRange(expr.range); + if (leftAsBool !== false) return; + right = this.evaluateExpression(expr.right); + return right.setRange(expr.range); + } + }); + this.hooks.evaluate.for("BinaryExpression").tap("Parser", expr => { + let left; + let right; + let res; + if (expr.operator === "+") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + res = new BasicEvaluatedExpression(); + if (left.isString()) { + if (right.isString()) { + res.setString(left.string + right.string); + } else if (right.isNumber()) { + res.setString(left.string + right.number); + } else if ( + right.isWrapped() && + right.prefix && + right.prefix.isString() + ) { + // "left" + ("prefix" + inner + "postfix") + // => ("leftprefix" + inner + "postfix") + res.setWrapped( + new BasicEvaluatedExpression() + .setString(left.string + right.prefix.string) + .setRange(joinRanges(left.range, right.prefix.range)), + right.postfix, + right.wrappedInnerExpressions + ); + } else if (right.isWrapped()) { + // "left" + ([null] + inner + "postfix") + // => ("left" + inner + "postfix") + res.setWrapped(left, right.postfix, right.wrappedInnerExpressions); + } else { + // "left" + expr + // => ("left" + expr + "") + res.setWrapped(left, null, [right]); + } + } else if (left.isNumber()) { + if (right.isString()) { + res.setString(left.number + right.string); + } else if (right.isNumber()) { + res.setNumber(left.number + right.number); + } else { + return; + } + } else if (left.isWrapped()) { + if (left.postfix && left.postfix.isString() && right.isString()) { + // ("prefix" + inner + "postfix") + "right" + // => ("prefix" + inner + "postfixright") + res.setWrapped( + left.prefix, + new BasicEvaluatedExpression() + .setString(left.postfix.string + right.string) + .setRange(joinRanges(left.postfix.range, right.range)), + left.wrappedInnerExpressions + ); + } else if ( + left.postfix && + left.postfix.isString() && + right.isNumber() + ) { + // ("prefix" + inner + "postfix") + 123 + // => ("prefix" + inner + "postfix123") + res.setWrapped( + left.prefix, + new BasicEvaluatedExpression() + .setString(left.postfix.string + right.number) + .setRange(joinRanges(left.postfix.range, right.range)), + left.wrappedInnerExpressions + ); + } else if (right.isString()) { + // ("prefix" + inner + [null]) + "right" + // => ("prefix" + inner + "right") + res.setWrapped(left.prefix, right, left.wrappedInnerExpressions); + } else if (right.isNumber()) { + // ("prefix" + inner + [null]) + 123 + // => ("prefix" + inner + "123") + res.setWrapped( + left.prefix, + new BasicEvaluatedExpression() + .setString(right.number + "") + .setRange(right.range), + left.wrappedInnerExpressions + ); + } else if (right.isWrapped()) { + // ("prefix1" + inner1 + "postfix1") + ("prefix2" + inner2 + "postfix2") + // ("prefix1" + inner1 + "postfix1" + "prefix2" + inner2 + "postfix2") + res.setWrapped( + left.prefix, + right.postfix, + left.wrappedInnerExpressions && + right.wrappedInnerExpressions && + left.wrappedInnerExpressions + .concat(left.postfix ? [left.postfix] : []) + .concat(right.prefix ? [right.prefix] : []) + .concat(right.wrappedInnerExpressions) + ); + } else { + // ("prefix" + inner + postfix) + expr + // => ("prefix" + inner + postfix + expr + [null]) + res.setWrapped( + left.prefix, + null, + left.wrappedInnerExpressions && + left.wrappedInnerExpressions.concat( + left.postfix ? [left.postfix, right] : [right] + ) + ); + } + } else { + if (right.isString()) { + // left + "right" + // => ([null] + left + "right") + res.setWrapped(null, right, [left]); + } else if (right.isWrapped()) { + // left + (prefix + inner + "postfix") + // => ([null] + left + prefix + inner + "postfix") + res.setWrapped( + null, + right.postfix, + right.wrappedInnerExpressions && + (right.prefix ? [left, right.prefix] : [left]).concat( + right.wrappedInnerExpressions + ) + ); + } else { + return; + } + } + res.setRange(expr.range); + return res; + } else if (expr.operator === "-") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + if (!left.isNumber() || !right.isNumber()) return; + res = new BasicEvaluatedExpression(); + res.setNumber(left.number - right.number); + res.setRange(expr.range); + return res; + } else if (expr.operator === "*") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + if (!left.isNumber() || !right.isNumber()) return; + res = new BasicEvaluatedExpression(); + res.setNumber(left.number * right.number); + res.setRange(expr.range); + return res; + } else if (expr.operator === "/") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + if (!left.isNumber() || !right.isNumber()) return; + res = new BasicEvaluatedExpression(); + res.setNumber(left.number / right.number); + res.setRange(expr.range); + return res; + } else if (expr.operator === "**") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + if (!left.isNumber() || !right.isNumber()) return; + res = new BasicEvaluatedExpression(); + res.setNumber(Math.pow(left.number, right.number)); + res.setRange(expr.range); + return res; + } else if (expr.operator === "==" || expr.operator === "===") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + res = new BasicEvaluatedExpression(); + res.setRange(expr.range); + if (left.isString() && right.isString()) { + return res.setBoolean(left.string === right.string); + } else if (left.isNumber() && right.isNumber()) { + return res.setBoolean(left.number === right.number); + } else if (left.isBoolean() && right.isBoolean()) { + return res.setBoolean(left.bool === right.bool); + } + } else if (expr.operator === "!=" || expr.operator === "!==") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + res = new BasicEvaluatedExpression(); + res.setRange(expr.range); + if (left.isString() && right.isString()) { + return res.setBoolean(left.string !== right.string); + } else if (left.isNumber() && right.isNumber()) { + return res.setBoolean(left.number !== right.number); + } else if (left.isBoolean() && right.isBoolean()) { + return res.setBoolean(left.bool !== right.bool); + } + } else if (expr.operator === "&") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + if (!left.isNumber() || !right.isNumber()) return; + res = new BasicEvaluatedExpression(); + res.setNumber(left.number & right.number); + res.setRange(expr.range); + return res; + } else if (expr.operator === "|") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + if (!left.isNumber() || !right.isNumber()) return; + res = new BasicEvaluatedExpression(); + res.setNumber(left.number | right.number); + res.setRange(expr.range); + return res; + } else if (expr.operator === "^") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + if (!left.isNumber() || !right.isNumber()) return; + res = new BasicEvaluatedExpression(); + res.setNumber(left.number ^ right.number); + res.setRange(expr.range); + return res; + } else if (expr.operator === ">>>") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + if (!left.isNumber() || !right.isNumber()) return; + res = new BasicEvaluatedExpression(); + res.setNumber(left.number >>> right.number); + res.setRange(expr.range); + return res; + } else if (expr.operator === ">>") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + if (!left.isNumber() || !right.isNumber()) return; + res = new BasicEvaluatedExpression(); + res.setNumber(left.number >> right.number); + res.setRange(expr.range); + return res; + } else if (expr.operator === "<<") { + left = this.evaluateExpression(expr.left); + right = this.evaluateExpression(expr.right); + if (!left || !right) return; + if (!left.isNumber() || !right.isNumber()) return; + res = new BasicEvaluatedExpression(); + res.setNumber(left.number << right.number); + res.setRange(expr.range); + return res; + } + }); + this.hooks.evaluate.for("UnaryExpression").tap("Parser", expr => { + if (expr.operator === "typeof") { + let res; + let name; + if (expr.argument.type === "Identifier") { + name = + this.scope.renames.get(expr.argument.name) || expr.argument.name; + if (!this.scope.definitions.has(name)) { + const hook = this.hooks.evaluateTypeof.get(name); + if (hook !== undefined) { + res = hook.call(expr); + if (res !== undefined) return res; + } + } + } + if (expr.argument.type === "MemberExpression") { + const exprName = this.getNameForExpression(expr.argument); + if (exprName && exprName.free) { + const hook = this.hooks.evaluateTypeof.get(exprName.name); + if (hook !== undefined) { + res = hook.call(expr); + if (res !== undefined) return res; + } + } + } + if (expr.argument.type === "FunctionExpression") { + return new BasicEvaluatedExpression() + .setString("function") + .setRange(expr.range); + } + const arg = this.evaluateExpression(expr.argument); + if (arg.isString() || arg.isWrapped()) { + return new BasicEvaluatedExpression() + .setString("string") + .setRange(expr.range); + } + if (arg.isNumber()) { + return new BasicEvaluatedExpression() + .setString("number") + .setRange(expr.range); + } + if (arg.isBoolean()) { + return new BasicEvaluatedExpression() + .setString("boolean") + .setRange(expr.range); + } + if (arg.isArray() || arg.isConstArray() || arg.isRegExp()) { + return new BasicEvaluatedExpression() + .setString("object") + .setRange(expr.range); + } + } else if (expr.operator === "!") { + const argument = this.evaluateExpression(expr.argument); + if (!argument) return; + if (argument.isBoolean()) { + return new BasicEvaluatedExpression() + .setBoolean(!argument.bool) + .setRange(expr.range); + } + if (argument.isTruthy()) { + return new BasicEvaluatedExpression() + .setBoolean(false) + .setRange(expr.range); + } + if (argument.isFalsy()) { + return new BasicEvaluatedExpression() + .setBoolean(true) + .setRange(expr.range); + } + if (argument.isString()) { + return new BasicEvaluatedExpression() + .setBoolean(!argument.string) + .setRange(expr.range); + } + if (argument.isNumber()) { + return new BasicEvaluatedExpression() + .setBoolean(!argument.number) + .setRange(expr.range); + } + } else if (expr.operator === "~") { + const argument = this.evaluateExpression(expr.argument); + if (!argument) return; + if (!argument.isNumber()) return; + const res = new BasicEvaluatedExpression(); + res.setNumber(~argument.number); + res.setRange(expr.range); + return res; + } + }); + this.hooks.evaluateTypeof.for("undefined").tap("Parser", expr => { + return new BasicEvaluatedExpression() + .setString("undefined") + .setRange(expr.range); + }); + this.hooks.evaluate.for("Identifier").tap("Parser", expr => { + const name = this.scope.renames.get(expr.name) || expr.name; + if (!this.scope.definitions.has(expr.name)) { + const hook = this.hooks.evaluateIdentifier.get(name); + if (hook !== undefined) { + const result = hook.call(expr); + if (result) return result; + } + return new BasicEvaluatedExpression() + .setIdentifier(name) + .setRange(expr.range); + } else { + const hook = this.hooks.evaluateDefinedIdentifier.get(name); + if (hook !== undefined) { + return hook.call(expr); + } + } + }); + this.hooks.evaluate.for("ThisExpression").tap("Parser", expr => { + const name = this.scope.renames.get("this"); + if (name) { + const hook = this.hooks.evaluateIdentifier.get(name); + if (hook !== undefined) { + const result = hook.call(expr); + if (result) return result; + } + return new BasicEvaluatedExpression() + .setIdentifier(name) + .setRange(expr.range); + } + }); + this.hooks.evaluate.for("MemberExpression").tap("Parser", expression => { + let exprName = this.getNameForExpression(expression); + if (exprName) { + if (exprName.free) { + const hook = this.hooks.evaluateIdentifier.get(exprName.name); + if (hook !== undefined) { + const result = hook.call(expression); + if (result) return result; + } + return new BasicEvaluatedExpression() + .setIdentifier(exprName.name) + .setRange(expression.range); + } else { + const hook = this.hooks.evaluateDefinedIdentifier.get(exprName.name); + if (hook !== undefined) { + return hook.call(expression); + } + } + } + }); + this.hooks.evaluate.for("CallExpression").tap("Parser", expr => { + if (expr.callee.type !== "MemberExpression") return; + if ( + expr.callee.property.type !== + (expr.callee.computed ? "Literal" : "Identifier") + ) + return; + const param = this.evaluateExpression(expr.callee.object); + if (!param) return; + const property = expr.callee.property.name || expr.callee.property.value; + const hook = this.hooks.evaluateCallExpressionMember.get(property); + if (hook !== undefined) { + return hook.call(expr, param); + } + }); + this.hooks.evaluateCallExpressionMember + .for("replace") + .tap("Parser", (expr, param) => { + if (!param.isString()) return; + if (expr.arguments.length !== 2) return; + let arg1 = this.evaluateExpression(expr.arguments[0]); + let arg2 = this.evaluateExpression(expr.arguments[1]); + if (!arg1.isString() && !arg1.isRegExp()) return; + arg1 = arg1.regExp || arg1.string; + if (!arg2.isString()) return; + arg2 = arg2.string; + return new BasicEvaluatedExpression() + .setString(param.string.replace(arg1, arg2)) + .setRange(expr.range); + }); + ["substr", "substring"].forEach(fn => { + this.hooks.evaluateCallExpressionMember + .for(fn) + .tap("Parser", (expr, param) => { + if (!param.isString()) return; + let arg1; + let result, + str = param.string; + switch (expr.arguments.length) { + case 1: + arg1 = this.evaluateExpression(expr.arguments[0]); + if (!arg1.isNumber()) return; + result = str[fn](arg1.number); + break; + case 2: { + arg1 = this.evaluateExpression(expr.arguments[0]); + const arg2 = this.evaluateExpression(expr.arguments[1]); + if (!arg1.isNumber()) return; + if (!arg2.isNumber()) return; + result = str[fn](arg1.number, arg2.number); + break; + } + default: + return; + } + return new BasicEvaluatedExpression() + .setString(result) + .setRange(expr.range); + }); + }); + + /** + * @param {string} kind "cooked" | "raw" + * @param {TODO} templateLiteralExpr TemplateLiteral expr + * @returns {{quasis: BasicEvaluatedExpression[], parts: BasicEvaluatedExpression[]}} Simplified template + */ + const getSimplifiedTemplateResult = (kind, templateLiteralExpr) => { + const quasis = []; + const parts = []; + + for (let i = 0; i < templateLiteralExpr.quasis.length; i++) { + const quasiExpr = templateLiteralExpr.quasis[i]; + const quasi = quasiExpr.value[kind]; + + if (i > 0) { + const prevExpr = parts[parts.length - 1]; + const expr = this.evaluateExpression( + templateLiteralExpr.expressions[i - 1] + ); + const exprAsString = expr.asString(); + if (typeof exprAsString === "string") { + // We can merge quasi + expr + quasi when expr + // is a const string + + prevExpr.setString(prevExpr.string + exprAsString + quasi); + prevExpr.setRange([prevExpr.range[0], quasiExpr.range[1]]); + // We unset the expression as it doesn't match to a single expression + prevExpr.setExpression(undefined); + continue; + } + parts.push(expr); + } + + const part = new BasicEvaluatedExpression() + .setString(quasi) + .setRange(quasiExpr.range) + .setExpression(quasiExpr); + quasis.push(part); + parts.push(part); + } + return { + quasis, + parts + }; + }; + + this.hooks.evaluate.for("TemplateLiteral").tap("Parser", node => { + const { quasis, parts } = getSimplifiedTemplateResult("cooked", node); + if (parts.length === 1) { + return parts[0].setRange(node.range); + } + return new BasicEvaluatedExpression() + .setTemplateString(quasis, parts, "cooked") + .setRange(node.range); + }); + this.hooks.evaluate.for("TaggedTemplateExpression").tap("Parser", node => { + if (this.evaluateExpression(node.tag).identifier !== "String.raw") return; + const { quasis, parts } = getSimplifiedTemplateResult("raw", node.quasi); + if (parts.length === 1) { + return parts[0].setRange(node.range); + } + return new BasicEvaluatedExpression() + .setTemplateString(quasis, parts, "raw") + .setRange(node.range); + }); + + this.hooks.evaluateCallExpressionMember + .for("concat") + .tap("Parser", (expr, param) => { + if (!param.isString() && !param.isWrapped()) return; + + let stringSuffix = null; + let hasUnknownParams = false; + for (let i = expr.arguments.length - 1; i >= 0; i--) { + const argExpr = this.evaluateExpression(expr.arguments[i]); + if (!argExpr.isString() && !argExpr.isNumber()) { + hasUnknownParams = true; + break; + } + + const value = argExpr.isString() + ? argExpr.string + : "" + argExpr.number; + + const newString = value + (stringSuffix ? stringSuffix.string : ""); + const newRange = [ + argExpr.range[0], + (stringSuffix || argExpr).range[1] + ]; + stringSuffix = new BasicEvaluatedExpression() + .setString(newString) + .setRange(newRange); + } + + if (hasUnknownParams) { + const prefix = param.isString() ? param : param.prefix; + return new BasicEvaluatedExpression() + .setWrapped(prefix, stringSuffix) + .setRange(expr.range); + } else if (param.isWrapped()) { + const postfix = stringSuffix || param.postfix; + return new BasicEvaluatedExpression() + .setWrapped(param.prefix, postfix) + .setRange(expr.range); + } else { + const newString = + param.string + (stringSuffix ? stringSuffix.string : ""); + return new BasicEvaluatedExpression() + .setString(newString) + .setRange(expr.range); + } + }); + this.hooks.evaluateCallExpressionMember + .for("split") + .tap("Parser", (expr, param) => { + if (!param.isString()) return; + if (expr.arguments.length !== 1) return; + let result; + const arg = this.evaluateExpression(expr.arguments[0]); + if (arg.isString()) { + result = param.string.split(arg.string); + } else if (arg.isRegExp()) { + result = param.string.split(arg.regExp); + } else { + return; + } + return new BasicEvaluatedExpression() + .setArray(result) + .setRange(expr.range); + }); + this.hooks.evaluate.for("ConditionalExpression").tap("Parser", expr => { + const condition = this.evaluateExpression(expr.test); + const conditionValue = condition.asBool(); + let res; + if (conditionValue === undefined) { + const consequent = this.evaluateExpression(expr.consequent); + const alternate = this.evaluateExpression(expr.alternate); + if (!consequent || !alternate) return; + res = new BasicEvaluatedExpression(); + if (consequent.isConditional()) { + res.setOptions(consequent.options); + } else { + res.setOptions([consequent]); + } + if (alternate.isConditional()) { + res.addOptions(alternate.options); + } else { + res.addOptions([alternate]); + } + } else { + res = this.evaluateExpression( + conditionValue ? expr.consequent : expr.alternate + ); + } + res.setRange(expr.range); + return res; + }); + this.hooks.evaluate.for("ArrayExpression").tap("Parser", expr => { + const items = expr.elements.map(element => { + return element !== null && this.evaluateExpression(element); + }); + if (!items.every(Boolean)) return; + return new BasicEvaluatedExpression() + .setItems(items) + .setRange(expr.range); + }); + } + + getRenameIdentifier(expr) { + const result = this.evaluateExpression(expr); + if (result && result.isIdentifier()) { + return result.identifier; + } + } + + walkClass(classy) { + if (classy.superClass) this.walkExpression(classy.superClass); + if (classy.body && classy.body.type === "ClassBody") { + const wasTopLevel = this.scope.topLevelScope; + this.scope.topLevelScope = false; + for (const methodDefinition of classy.body.body) { + if (methodDefinition.type === "MethodDefinition") { + this.walkMethodDefinition(methodDefinition); + } + } + this.scope.topLevelScope = wasTopLevel; + } + } + + walkMethodDefinition(methodDefinition) { + if (methodDefinition.computed && methodDefinition.key) { + this.walkExpression(methodDefinition.key); + } + if (methodDefinition.value) { + this.walkExpression(methodDefinition.value); + } + } + + // Prewalking iterates the scope for variable declarations + prewalkStatements(statements) { + for (let index = 0, len = statements.length; index < len; index++) { + const statement = statements[index]; + this.prewalkStatement(statement); + } + } + + // Block-Prewalking iterates the scope for block variable declarations + blockPrewalkStatements(statements) { + for (let index = 0, len = statements.length; index < len; index++) { + const statement = statements[index]; + this.blockPrewalkStatement(statement); + } + } + + // Walking iterates the statements and expressions and processes them + walkStatements(statements) { + for (let index = 0, len = statements.length; index < len; index++) { + const statement = statements[index]; + this.walkStatement(statement); + } + } + + prewalkStatement(statement) { + switch (statement.type) { + case "BlockStatement": + this.prewalkBlockStatement(statement); + break; + case "DoWhileStatement": + this.prewalkDoWhileStatement(statement); + break; + case "ExportAllDeclaration": + this.prewalkExportAllDeclaration(statement); + break; + case "ExportDefaultDeclaration": + this.prewalkExportDefaultDeclaration(statement); + break; + case "ExportNamedDeclaration": + this.prewalkExportNamedDeclaration(statement); + break; + case "ForInStatement": + this.prewalkForInStatement(statement); + break; + case "ForOfStatement": + this.prewalkForOfStatement(statement); + break; + case "ForStatement": + this.prewalkForStatement(statement); + break; + case "FunctionDeclaration": + this.prewalkFunctionDeclaration(statement); + break; + case "IfStatement": + this.prewalkIfStatement(statement); + break; + case "ImportDeclaration": + this.prewalkImportDeclaration(statement); + break; + case "LabeledStatement": + this.prewalkLabeledStatement(statement); + break; + case "SwitchStatement": + this.prewalkSwitchStatement(statement); + break; + case "TryStatement": + this.prewalkTryStatement(statement); + break; + case "VariableDeclaration": + this.prewalkVariableDeclaration(statement); + break; + case "WhileStatement": + this.prewalkWhileStatement(statement); + break; + case "WithStatement": + this.prewalkWithStatement(statement); + break; + } + } + + blockPrewalkStatement(statement) { + switch (statement.type) { + case "VariableDeclaration": + this.blockPrewalkVariableDeclaration(statement); + break; + case "ExportDefaultDeclaration": + this.blockPrewalkExportDefaultDeclaration(statement); + break; + case "ExportNamedDeclaration": + this.blockPrewalkExportNamedDeclaration(statement); + break; + case "ClassDeclaration": + this.blockPrewalkClassDeclaration(statement); + break; + } + } + + walkStatement(statement) { + if (this.hooks.statement.call(statement) !== undefined) return; + switch (statement.type) { + case "BlockStatement": + this.walkBlockStatement(statement); + break; + case "ClassDeclaration": + this.walkClassDeclaration(statement); + break; + case "DoWhileStatement": + this.walkDoWhileStatement(statement); + break; + case "ExportDefaultDeclaration": + this.walkExportDefaultDeclaration(statement); + break; + case "ExportNamedDeclaration": + this.walkExportNamedDeclaration(statement); + break; + case "ExpressionStatement": + this.walkExpressionStatement(statement); + break; + case "ForInStatement": + this.walkForInStatement(statement); + break; + case "ForOfStatement": + this.walkForOfStatement(statement); + break; + case "ForStatement": + this.walkForStatement(statement); + break; + case "FunctionDeclaration": + this.walkFunctionDeclaration(statement); + break; + case "IfStatement": + this.walkIfStatement(statement); + break; + case "LabeledStatement": + this.walkLabeledStatement(statement); + break; + case "ReturnStatement": + this.walkReturnStatement(statement); + break; + case "SwitchStatement": + this.walkSwitchStatement(statement); + break; + case "ThrowStatement": + this.walkThrowStatement(statement); + break; + case "TryStatement": + this.walkTryStatement(statement); + break; + case "VariableDeclaration": + this.walkVariableDeclaration(statement); + break; + case "WhileStatement": + this.walkWhileStatement(statement); + break; + case "WithStatement": + this.walkWithStatement(statement); + break; + } + } + + // Real Statements + prewalkBlockStatement(statement) { + this.prewalkStatements(statement.body); + } + + walkBlockStatement(statement) { + this.inBlockScope(() => { + const body = statement.body; + this.blockPrewalkStatements(body); + this.walkStatements(body); + }); + } + + walkExpressionStatement(statement) { + this.walkExpression(statement.expression); + } + + prewalkIfStatement(statement) { + this.prewalkStatement(statement.consequent); + if (statement.alternate) { + this.prewalkStatement(statement.alternate); + } + } + + walkIfStatement(statement) { + const result = this.hooks.statementIf.call(statement); + if (result === undefined) { + this.walkExpression(statement.test); + this.walkStatement(statement.consequent); + if (statement.alternate) { + this.walkStatement(statement.alternate); + } + } else { + if (result) { + this.walkStatement(statement.consequent); + } else if (statement.alternate) { + this.walkStatement(statement.alternate); + } + } + } + + prewalkLabeledStatement(statement) { + this.prewalkStatement(statement.body); + } + + walkLabeledStatement(statement) { + const hook = this.hooks.label.get(statement.label.name); + if (hook !== undefined) { + const result = hook.call(statement); + if (result === true) return; + } + this.walkStatement(statement.body); + } + + prewalkWithStatement(statement) { + this.prewalkStatement(statement.body); + } + + walkWithStatement(statement) { + this.walkExpression(statement.object); + this.walkStatement(statement.body); + } + + prewalkSwitchStatement(statement) { + this.prewalkSwitchCases(statement.cases); + } + + walkSwitchStatement(statement) { + this.walkExpression(statement.discriminant); + this.walkSwitchCases(statement.cases); + } + + walkTerminatingStatement(statement) { + if (statement.argument) this.walkExpression(statement.argument); + } + + walkReturnStatement(statement) { + this.walkTerminatingStatement(statement); + } + + walkThrowStatement(statement) { + this.walkTerminatingStatement(statement); + } + + prewalkTryStatement(statement) { + this.prewalkStatement(statement.block); + } + + walkTryStatement(statement) { + if (this.scope.inTry) { + this.walkStatement(statement.block); + } else { + this.scope.inTry = true; + this.walkStatement(statement.block); + this.scope.inTry = false; + } + if (statement.handler) this.walkCatchClause(statement.handler); + if (statement.finalizer) this.walkStatement(statement.finalizer); + } + + prewalkWhileStatement(statement) { + this.prewalkStatement(statement.body); + } + + walkWhileStatement(statement) { + this.walkExpression(statement.test); + this.walkStatement(statement.body); + } + + prewalkDoWhileStatement(statement) { + this.prewalkStatement(statement.body); + } + + walkDoWhileStatement(statement) { + this.walkStatement(statement.body); + this.walkExpression(statement.test); + } + + prewalkForStatement(statement) { + if (statement.init) { + if (statement.init.type === "VariableDeclaration") { + this.prewalkStatement(statement.init); + } + } + this.prewalkStatement(statement.body); + } + + walkForStatement(statement) { + this.inBlockScope(() => { + if (statement.init) { + if (statement.init.type === "VariableDeclaration") { + this.blockPrewalkVariableDeclaration(statement.init); + this.walkStatement(statement.init); + } else { + this.walkExpression(statement.init); + } + } + if (statement.test) { + this.walkExpression(statement.test); + } + if (statement.update) { + this.walkExpression(statement.update); + } + const body = statement.body; + if (body.type === "BlockStatement") { + // no need to add additional scope + this.blockPrewalkStatements(body.body); + this.walkStatements(body.body); + } else { + this.walkStatement(body); + } + }); + } + + prewalkForInStatement(statement) { + if (statement.left.type === "VariableDeclaration") { + this.prewalkVariableDeclaration(statement.left); + } + this.prewalkStatement(statement.body); + } + + walkForInStatement(statement) { + this.inBlockScope(() => { + if (statement.left.type === "VariableDeclaration") { + this.blockPrewalkVariableDeclaration(statement.left); + this.walkVariableDeclaration(statement.left); + } else { + this.walkPattern(statement.left); + } + this.walkExpression(statement.right); + const body = statement.body; + if (body.type === "BlockStatement") { + // no need to add additional scope + this.blockPrewalkStatements(body.body); + this.walkStatements(body.body); + } else { + this.walkStatement(body); + } + }); + } + + prewalkForOfStatement(statement) { + if (statement.left.type === "VariableDeclaration") { + this.prewalkVariableDeclaration(statement.left); + } + this.prewalkStatement(statement.body); + } + + walkForOfStatement(statement) { + this.inBlockScope(() => { + if (statement.left.type === "VariableDeclaration") { + this.blockPrewalkVariableDeclaration(statement.left); + this.walkVariableDeclaration(statement.left); + } else { + this.walkPattern(statement.left); + } + this.walkExpression(statement.right); + const body = statement.body; + if (body.type === "BlockStatement") { + // no need to add additional scope + this.blockPrewalkStatements(body.body); + this.walkStatements(body.body); + } else { + this.walkStatement(body); + } + }); + } + + // Declarations + prewalkFunctionDeclaration(statement) { + if (statement.id) { + this.scope.renames.set(statement.id.name, null); + this.scope.definitions.add(statement.id.name); + } + } + + walkFunctionDeclaration(statement) { + const wasTopLevel = this.scope.topLevelScope; + this.scope.topLevelScope = false; + this.inFunctionScope(true, statement.params, () => { + for (const param of statement.params) { + this.walkPattern(param); + } + if (statement.body.type === "BlockStatement") { + this.detectMode(statement.body.body); + this.prewalkStatement(statement.body); + this.walkStatement(statement.body); + } else { + this.walkExpression(statement.body); + } + }); + this.scope.topLevelScope = wasTopLevel; + } + + prewalkImportDeclaration(statement) { + const source = statement.source.value; + this.hooks.import.call(statement, source); + for (const specifier of statement.specifiers) { + const name = specifier.local.name; + this.scope.renames.set(name, null); + this.scope.definitions.add(name); + switch (specifier.type) { + case "ImportDefaultSpecifier": + this.hooks.importSpecifier.call(statement, source, "default", name); + break; + case "ImportSpecifier": + this.hooks.importSpecifier.call( + statement, + source, + specifier.imported.name, + name + ); + break; + case "ImportNamespaceSpecifier": + this.hooks.importSpecifier.call(statement, source, null, name); + break; + } + } + } + + enterDeclaration(declaration, onIdent) { + switch (declaration.type) { + case "VariableDeclaration": + for (const declarator of declaration.declarations) { + switch (declarator.type) { + case "VariableDeclarator": { + this.enterPattern(declarator.id, onIdent); + break; + } + } + } + break; + case "FunctionDeclaration": + this.enterPattern(declaration.id, onIdent); + break; + case "ClassDeclaration": + this.enterPattern(declaration.id, onIdent); + break; + } + } + + blockPrewalkExportNamedDeclaration(statement) { + if (statement.declaration) { + this.blockPrewalkStatement(statement.declaration); + } + } + + prewalkExportNamedDeclaration(statement) { + let source; + if (statement.source) { + source = statement.source.value; + this.hooks.exportImport.call(statement, source); + } else { + this.hooks.export.call(statement); + } + if (statement.declaration) { + if ( + !this.hooks.exportDeclaration.call(statement, statement.declaration) + ) { + this.prewalkStatement(statement.declaration); + let index = 0; + this.enterDeclaration(statement.declaration, def => { + this.hooks.exportSpecifier.call(statement, def, def, index++); + }); + } + } + if (statement.specifiers) { + for ( + let specifierIndex = 0; + specifierIndex < statement.specifiers.length; + specifierIndex++ + ) { + const specifier = statement.specifiers[specifierIndex]; + switch (specifier.type) { + case "ExportSpecifier": { + const name = specifier.exported.name; + if (source) { + this.hooks.exportImportSpecifier.call( + statement, + source, + specifier.local.name, + name, + specifierIndex + ); + } else { + this.hooks.exportSpecifier.call( + statement, + specifier.local.name, + name, + specifierIndex + ); + } + break; + } + } + } + } + } + + walkExportNamedDeclaration(statement) { + if (statement.declaration) { + this.walkStatement(statement.declaration); + } + } + + blockPrewalkExportDefaultDeclaration(statement) { + if (statement.declaration.type === "ClassDeclaration") { + this.blockPrewalkClassDeclaration(statement.declaration); + } + } + + prewalkExportDefaultDeclaration(statement) { + this.prewalkStatement(statement.declaration); + if ( + statement.declaration.id && + statement.declaration.type !== "FunctionExpression" && + statement.declaration.type !== "ClassExpression" + ) { + this.hooks.exportSpecifier.call( + statement, + statement.declaration.id.name, + "default" + ); + } + } + + walkExportDefaultDeclaration(statement) { + this.hooks.export.call(statement); + if ( + statement.declaration.id && + statement.declaration.type !== "FunctionExpression" && + statement.declaration.type !== "ClassExpression" + ) { + if ( + !this.hooks.exportDeclaration.call(statement, statement.declaration) + ) { + this.walkStatement(statement.declaration); + } + } else { + // Acorn parses `export default function() {}` as `FunctionDeclaration` and + // `export default class {}` as `ClassDeclaration`, both with `id = null`. + // These nodes must be treated as expressions. + if (statement.declaration.type === "FunctionDeclaration") { + this.walkFunctionDeclaration(statement.declaration); + } else if (statement.declaration.type === "ClassDeclaration") { + this.walkClassDeclaration(statement.declaration); + } else { + this.walkExpression(statement.declaration); + } + if (!this.hooks.exportExpression.call(statement, statement.declaration)) { + this.hooks.exportSpecifier.call( + statement, + statement.declaration, + "default" + ); + } + } + } + + prewalkExportAllDeclaration(statement) { + const source = statement.source.value; + this.hooks.exportImport.call(statement, source); + this.hooks.exportImportSpecifier.call(statement, source, null, null, 0); + } + + prewalkVariableDeclaration(statement) { + if (statement.kind !== "var") return; + this._prewalkVariableDeclaration(statement, this.hooks.varDeclarationVar); + } + + blockPrewalkVariableDeclaration(statement) { + if (statement.kind === "var") return; + const hookMap = + statement.kind === "const" + ? this.hooks.varDeclarationConst + : this.hooks.varDeclarationLet; + this._prewalkVariableDeclaration(statement, hookMap); + } + + _prewalkVariableDeclaration(statement, hookMap) { + for (const declarator of statement.declarations) { + switch (declarator.type) { + case "VariableDeclarator": { + this.enterPattern(declarator.id, (name, decl) => { + let hook = hookMap.get(name); + if (hook === undefined || !hook.call(decl)) { + hook = this.hooks.varDeclaration.get(name); + if (hook === undefined || !hook.call(decl)) { + this.scope.renames.set(name, null); + this.scope.definitions.add(name); + } + } + }); + break; + } + } + } + } + + walkVariableDeclaration(statement) { + for (const declarator of statement.declarations) { + switch (declarator.type) { + case "VariableDeclarator": { + const renameIdentifier = + declarator.init && this.getRenameIdentifier(declarator.init); + if (renameIdentifier && declarator.id.type === "Identifier") { + const hook = this.hooks.canRename.get(renameIdentifier); + if (hook !== undefined && hook.call(declarator.init)) { + // renaming with "var a = b;" + const hook = this.hooks.rename.get(renameIdentifier); + if (hook === undefined || !hook.call(declarator.init)) { + this.scope.renames.set( + declarator.id.name, + this.scope.renames.get(renameIdentifier) || renameIdentifier + ); + this.scope.definitions.delete(declarator.id.name); + } + break; + } + } + this.walkPattern(declarator.id); + if (declarator.init) this.walkExpression(declarator.init); + break; + } + } + } + } + + blockPrewalkClassDeclaration(statement) { + if (statement.id) { + this.scope.renames.set(statement.id.name, null); + this.scope.definitions.add(statement.id.name); + } + } + + walkClassDeclaration(statement) { + this.walkClass(statement); + } + + prewalkSwitchCases(switchCases) { + for (let index = 0, len = switchCases.length; index < len; index++) { + const switchCase = switchCases[index]; + this.prewalkStatements(switchCase.consequent); + } + } + + walkSwitchCases(switchCases) { + for (let index = 0, len = switchCases.length; index < len; index++) { + const switchCase = switchCases[index]; + + if (switchCase.test) { + this.walkExpression(switchCase.test); + } + this.walkStatements(switchCase.consequent); + } + } + + walkCatchClause(catchClause) { + this.inBlockScope(() => { + // Error binding is optional in catch clause since ECMAScript 2019 + if (catchClause.param !== null) { + this.enterPattern(catchClause.param, ident => { + this.scope.renames.set(ident, null); + this.scope.definitions.add(ident); + }); + this.walkPattern(catchClause.param); + } + this.prewalkStatement(catchClause.body); + this.walkStatement(catchClause.body); + }); + } + + walkPattern(pattern) { + switch (pattern.type) { + case "ArrayPattern": + this.walkArrayPattern(pattern); + break; + case "AssignmentPattern": + this.walkAssignmentPattern(pattern); + break; + case "MemberExpression": + this.walkMemberExpression(pattern); + break; + case "ObjectPattern": + this.walkObjectPattern(pattern); + break; + case "RestElement": + this.walkRestElement(pattern); + break; + } + } + + walkAssignmentPattern(pattern) { + this.walkExpression(pattern.right); + this.walkPattern(pattern.left); + } + + walkObjectPattern(pattern) { + for (let i = 0, len = pattern.properties.length; i < len; i++) { + const prop = pattern.properties[i]; + if (prop) { + if (prop.computed) this.walkExpression(prop.key); + if (prop.value) this.walkPattern(prop.value); + } + } + } + + walkArrayPattern(pattern) { + for (let i = 0, len = pattern.elements.length; i < len; i++) { + const element = pattern.elements[i]; + if (element) this.walkPattern(element); + } + } + + walkRestElement(pattern) { + this.walkPattern(pattern.argument); + } + + walkExpressions(expressions) { + for (const expression of expressions) { + if (expression) { + this.walkExpression(expression); + } + } + } + + walkExpression(expression) { + switch (expression.type) { + case "ArrayExpression": + this.walkArrayExpression(expression); + break; + case "ArrowFunctionExpression": + this.walkArrowFunctionExpression(expression); + break; + case "AssignmentExpression": + this.walkAssignmentExpression(expression); + break; + case "AwaitExpression": + this.walkAwaitExpression(expression); + break; + case "BinaryExpression": + this.walkBinaryExpression(expression); + break; + case "CallExpression": + this.walkCallExpression(expression); + break; + case "ClassExpression": + this.walkClassExpression(expression); + break; + case "ConditionalExpression": + this.walkConditionalExpression(expression); + break; + case "FunctionExpression": + this.walkFunctionExpression(expression); + break; + case "Identifier": + this.walkIdentifier(expression); + break; + case "LogicalExpression": + this.walkLogicalExpression(expression); + break; + case "MemberExpression": + this.walkMemberExpression(expression); + break; + case "NewExpression": + this.walkNewExpression(expression); + break; + case "ObjectExpression": + this.walkObjectExpression(expression); + break; + case "SequenceExpression": + this.walkSequenceExpression(expression); + break; + case "SpreadElement": + this.walkSpreadElement(expression); + break; + case "TaggedTemplateExpression": + this.walkTaggedTemplateExpression(expression); + break; + case "TemplateLiteral": + this.walkTemplateLiteral(expression); + break; + case "ThisExpression": + this.walkThisExpression(expression); + break; + case "UnaryExpression": + this.walkUnaryExpression(expression); + break; + case "UpdateExpression": + this.walkUpdateExpression(expression); + break; + case "YieldExpression": + this.walkYieldExpression(expression); + break; + } + } + + walkAwaitExpression(expression) { + this.walkExpression(expression.argument); + } + + walkArrayExpression(expression) { + if (expression.elements) { + this.walkExpressions(expression.elements); + } + } + + walkSpreadElement(expression) { + if (expression.argument) { + this.walkExpression(expression.argument); + } + } + + walkObjectExpression(expression) { + for ( + let propIndex = 0, len = expression.properties.length; + propIndex < len; + propIndex++ + ) { + const prop = expression.properties[propIndex]; + if (prop.type === "SpreadElement") { + this.walkExpression(prop.argument); + continue; + } + if (prop.computed) { + this.walkExpression(prop.key); + } + if (prop.shorthand) { + this.scope.inShorthand = true; + } + this.walkExpression(prop.value); + if (prop.shorthand) { + this.scope.inShorthand = false; + } + } + } + + walkFunctionExpression(expression) { + const wasTopLevel = this.scope.topLevelScope; + this.scope.topLevelScope = false; + const scopeParams = expression.params; + + // Add function name in scope for recursive calls + if (expression.id) { + scopeParams.push(expression.id.name); + } + + this.inFunctionScope(true, scopeParams, () => { + for (const param of expression.params) { + this.walkPattern(param); + } + if (expression.body.type === "BlockStatement") { + this.detectMode(expression.body.body); + this.prewalkStatement(expression.body); + this.walkStatement(expression.body); + } else { + this.walkExpression(expression.body); + } + }); + this.scope.topLevelScope = wasTopLevel; + } + + walkArrowFunctionExpression(expression) { + this.inFunctionScope(false, expression.params, () => { + for (const param of expression.params) { + this.walkPattern(param); + } + if (expression.body.type === "BlockStatement") { + this.detectMode(expression.body.body); + this.prewalkStatement(expression.body); + this.walkStatement(expression.body); + } else { + this.walkExpression(expression.body); + } + }); + } + + walkSequenceExpression(expression) { + if (expression.expressions) this.walkExpressions(expression.expressions); + } + + walkUpdateExpression(expression) { + this.walkExpression(expression.argument); + } + + walkUnaryExpression(expression) { + if (expression.operator === "typeof") { + const exprName = this.getNameForExpression(expression.argument); + if (exprName && exprName.free) { + const hook = this.hooks.typeof.get(exprName.name); + if (hook !== undefined) { + const result = hook.call(expression); + if (result === true) return; + } + } + } + this.walkExpression(expression.argument); + } + + walkLeftRightExpression(expression) { + this.walkExpression(expression.left); + this.walkExpression(expression.right); + } + + walkBinaryExpression(expression) { + this.walkLeftRightExpression(expression); + } + + walkLogicalExpression(expression) { + const result = this.hooks.expressionLogicalOperator.call(expression); + if (result === undefined) { + this.walkLeftRightExpression(expression); + } else { + if (result) { + this.walkExpression(expression.right); + } + } + } + + walkAssignmentExpression(expression) { + const renameIdentifier = this.getRenameIdentifier(expression.right); + if (expression.left.type === "Identifier" && renameIdentifier) { + const hook = this.hooks.canRename.get(renameIdentifier); + if (hook !== undefined && hook.call(expression.right)) { + // renaming "a = b;" + const hook = this.hooks.rename.get(renameIdentifier); + if (hook === undefined || !hook.call(expression.right)) { + this.scope.renames.set(expression.left.name, renameIdentifier); + this.scope.definitions.delete(expression.left.name); + } + return; + } + } + if (expression.left.type === "Identifier") { + const assignedHook = this.hooks.assigned.get(expression.left.name); + if (assignedHook === undefined || !assignedHook.call(expression)) { + this.walkExpression(expression.right); + } + this.scope.renames.set(expression.left.name, null); + const assignHook = this.hooks.assign.get(expression.left.name); + if (assignHook === undefined || !assignHook.call(expression)) { + this.walkExpression(expression.left); + } + return; + } + this.walkExpression(expression.right); + this.walkPattern(expression.left); + this.enterPattern(expression.left, (name, decl) => { + this.scope.renames.set(name, null); + }); + } + + walkConditionalExpression(expression) { + const result = this.hooks.expressionConditionalOperator.call(expression); + if (result === undefined) { + this.walkExpression(expression.test); + this.walkExpression(expression.consequent); + if (expression.alternate) { + this.walkExpression(expression.alternate); + } + } else { + if (result) { + this.walkExpression(expression.consequent); + } else if (expression.alternate) { + this.walkExpression(expression.alternate); + } + } + } + + walkNewExpression(expression) { + const callee = this.evaluateExpression(expression.callee); + if (callee.isIdentifier()) { + const hook = this.hooks.new.get(callee.identifier); + if (hook !== undefined) { + const result = hook.call(expression); + if (result === true) { + return; + } + } + } + + this.walkExpression(expression.callee); + if (expression.arguments) { + this.walkExpressions(expression.arguments); + } + } + + walkYieldExpression(expression) { + if (expression.argument) { + this.walkExpression(expression.argument); + } + } + + walkTemplateLiteral(expression) { + if (expression.expressions) { + this.walkExpressions(expression.expressions); + } + } + + walkTaggedTemplateExpression(expression) { + if (expression.tag) { + this.walkExpression(expression.tag); + } + if (expression.quasi && expression.quasi.expressions) { + this.walkExpressions(expression.quasi.expressions); + } + } + + walkClassExpression(expression) { + this.walkClass(expression); + } + + _walkIIFE(functionExpression, options, currentThis) { + const renameArgOrThis = argOrThis => { + const renameIdentifier = this.getRenameIdentifier(argOrThis); + if (renameIdentifier) { + const hook = this.hooks.canRename.get(renameIdentifier); + if (hook !== undefined && hook.call(argOrThis)) { + const hook = this.hooks.rename.get(renameIdentifier); + if (hook === undefined || !hook.call(argOrThis)) { + return renameIdentifier; + } + } + } + this.walkExpression(argOrThis); + }; + const params = functionExpression.params; + const renameThis = currentThis ? renameArgOrThis(currentThis) : null; + const args = options.map(renameArgOrThis); + const wasTopLevel = this.scope.topLevelScope; + this.scope.topLevelScope = false; + const scopeParams = params.filter((identifier, idx) => !args[idx]); + + // Add function name in scope for recursive calls + if (functionExpression.id) { + scopeParams.push(functionExpression.id.name); + } + + this.inFunctionScope(true, scopeParams, () => { + if (renameThis) { + this.scope.renames.set("this", renameThis); + } + for (let i = 0; i < args.length; i++) { + const param = args[i]; + if (!param) continue; + if (!params[i] || params[i].type !== "Identifier") continue; + this.scope.renames.set(params[i].name, param); + } + if (functionExpression.body.type === "BlockStatement") { + this.detectMode(functionExpression.body.body); + this.prewalkStatement(functionExpression.body); + this.walkStatement(functionExpression.body); + } else { + this.walkExpression(functionExpression.body); + } + }); + this.scope.topLevelScope = wasTopLevel; + } + + walkCallExpression(expression) { + if ( + expression.callee.type === "MemberExpression" && + expression.callee.object.type === "FunctionExpression" && + !expression.callee.computed && + (expression.callee.property.name === "call" || + expression.callee.property.name === "bind") && + expression.arguments.length > 0 + ) { + // (function(…) { }.call/bind(?, …)) + this._walkIIFE( + expression.callee.object, + expression.arguments.slice(1), + expression.arguments[0] + ); + } else if (expression.callee.type === "FunctionExpression") { + // (function(…) { }(…)) + this._walkIIFE(expression.callee, expression.arguments, null); + } else if (expression.callee.type === "Import") { + let result = this.hooks.importCall.call(expression); + if (result === true) return; + + if (expression.arguments) this.walkExpressions(expression.arguments); + } else { + const callee = this.evaluateExpression(expression.callee); + if (callee.isIdentifier()) { + const callHook = this.hooks.call.get(callee.identifier); + if (callHook !== undefined) { + let result = callHook.call(expression); + if (result === true) return; + } + let identifier = callee.identifier.replace(/\.[^.]+$/, ""); + if (identifier !== callee.identifier) { + const callAnyHook = this.hooks.callAnyMember.get(identifier); + if (callAnyHook !== undefined) { + let result = callAnyHook.call(expression); + if (result === true) return; + } + } + } + + if (expression.callee) this.walkExpression(expression.callee); + if (expression.arguments) this.walkExpressions(expression.arguments); + } + } + + walkMemberExpression(expression) { + const exprName = this.getNameForExpression(expression); + if (exprName && exprName.free) { + const expressionHook = this.hooks.expression.get(exprName.name); + if (expressionHook !== undefined) { + const result = expressionHook.call(expression); + if (result === true) return; + } + const expressionAnyMemberHook = this.hooks.expressionAnyMember.get( + exprName.nameGeneral + ); + if (expressionAnyMemberHook !== undefined) { + const result = expressionAnyMemberHook.call(expression); + if (result === true) return; + } + } + this.walkExpression(expression.object); + if (expression.computed === true) this.walkExpression(expression.property); + } + + walkThisExpression(expression) { + const expressionHook = this.hooks.expression.get("this"); + if (expressionHook !== undefined) { + expressionHook.call(expression); + } + } + + walkIdentifier(expression) { + if (!this.scope.definitions.has(expression.name)) { + const hook = this.hooks.expression.get( + this.scope.renames.get(expression.name) || expression.name + ); + if (hook !== undefined) { + const result = hook.call(expression); + if (result === true) return; + } + } + } + + /** + * @deprecated + * @param {any} params scope params + * @param {function(): void} fn inner function + * @returns {void} + */ + inScope(params, fn) { + const oldScope = this.scope; + this.scope = { + topLevelScope: oldScope.topLevelScope, + inTry: false, + inShorthand: false, + isStrict: oldScope.isStrict, + isAsmJs: oldScope.isAsmJs, + definitions: oldScope.definitions.createChild(), + renames: oldScope.renames.createChild() + }; + + this.scope.renames.set("this", null); + + this.enterPatterns(params, ident => { + this.scope.renames.set(ident, null); + this.scope.definitions.add(ident); + }); + + fn(); + + this.scope = oldScope; + } + + inFunctionScope(hasThis, params, fn) { + const oldScope = this.scope; + this.scope = { + topLevelScope: oldScope.topLevelScope, + inTry: false, + inShorthand: false, + isStrict: oldScope.isStrict, + isAsmJs: oldScope.isAsmJs, + definitions: oldScope.definitions.createChild(), + renames: oldScope.renames.createChild() + }; + + if (hasThis) { + this.scope.renames.set("this", null); + } + + this.enterPatterns(params, ident => { + this.scope.renames.set(ident, null); + this.scope.definitions.add(ident); + }); + + fn(); + + this.scope = oldScope; + } + + inBlockScope(fn) { + const oldScope = this.scope; + this.scope = { + topLevelScope: oldScope.topLevelScope, + inTry: oldScope.inTry, + inShorthand: false, + isStrict: oldScope.isStrict, + isAsmJs: oldScope.isAsmJs, + definitions: oldScope.definitions.createChild(), + renames: oldScope.renames.createChild() + }; + + fn(); + + this.scope = oldScope; + } + + // TODO webpack 5: remove this methods + // only for backward-compat + detectStrictMode(statements) { + this.detectMode(statements); + } + + detectMode(statements) { + const isLiteral = + statements.length >= 1 && + statements[0].type === "ExpressionStatement" && + statements[0].expression.type === "Literal"; + if (isLiteral && statements[0].expression.value === "use strict") { + this.scope.isStrict = true; + } + if (isLiteral && statements[0].expression.value === "use asm") { + this.scope.isAsmJs = true; + } + } + + enterPatterns(patterns, onIdent) { + for (const pattern of patterns) { + if (typeof pattern !== "string") { + this.enterPattern(pattern, onIdent); + } else if (pattern) { + onIdent(pattern); + } + } + } + + enterPattern(pattern, onIdent) { + if (!pattern) return; + switch (pattern.type) { + case "ArrayPattern": + this.enterArrayPattern(pattern, onIdent); + break; + case "AssignmentPattern": + this.enterAssignmentPattern(pattern, onIdent); + break; + case "Identifier": + this.enterIdentifier(pattern, onIdent); + break; + case "ObjectPattern": + this.enterObjectPattern(pattern, onIdent); + break; + case "RestElement": + this.enterRestElement(pattern, onIdent); + break; + case "Property": + this.enterPattern(pattern.value, onIdent); + break; + } + } + + enterIdentifier(pattern, onIdent) { + onIdent(pattern.name, pattern); + } + + enterObjectPattern(pattern, onIdent) { + for ( + let propIndex = 0, len = pattern.properties.length; + propIndex < len; + propIndex++ + ) { + const prop = pattern.properties[propIndex]; + this.enterPattern(prop, onIdent); + } + } + + enterArrayPattern(pattern, onIdent) { + for ( + let elementIndex = 0, len = pattern.elements.length; + elementIndex < len; + elementIndex++ + ) { + const element = pattern.elements[elementIndex]; + this.enterPattern(element, onIdent); + } + } + + enterRestElement(pattern, onIdent) { + this.enterPattern(pattern.argument, onIdent); + } + + enterAssignmentPattern(pattern, onIdent) { + this.enterPattern(pattern.left, onIdent); + } + + evaluateExpression(expression) { + try { + const hook = this.hooks.evaluate.get(expression.type); + if (hook !== undefined) { + const result = hook.call(expression); + if (result !== undefined) { + if (result) { + result.setExpression(expression); + } + return result; + } + } + } catch (e) { + console.warn(e); + // ignore error + } + return new BasicEvaluatedExpression() + .setRange(expression.range) + .setExpression(expression); + } + + parseString(expression) { + switch (expression.type) { + case "BinaryExpression": + if (expression.operator === "+") { + return ( + this.parseString(expression.left) + + this.parseString(expression.right) + ); + } + break; + case "Literal": + return expression.value + ""; + } + throw new Error( + expression.type + " is not supported as parameter for require" + ); + } + + parseCalculatedString(expression) { + switch (expression.type) { + case "BinaryExpression": + if (expression.operator === "+") { + const left = this.parseCalculatedString(expression.left); + const right = this.parseCalculatedString(expression.right); + if (left.code) { + return { + range: left.range, + value: left.value, + code: true, + conditional: false + }; + } else if (right.code) { + return { + range: [ + left.range[0], + right.range ? right.range[1] : left.range[1] + ], + value: left.value + right.value, + code: true, + conditional: false + }; + } else { + return { + range: [left.range[0], right.range[1]], + value: left.value + right.value, + code: false, + conditional: false + }; + } + } + break; + case "ConditionalExpression": { + const consequent = this.parseCalculatedString(expression.consequent); + const alternate = this.parseCalculatedString(expression.alternate); + const items = []; + if (consequent.conditional) { + items.push(...consequent.conditional); + } else if (!consequent.code) { + items.push(consequent); + } else { + break; + } + if (alternate.conditional) { + items.push(...alternate.conditional); + } else if (!alternate.code) { + items.push(alternate); + } else { + break; + } + return { + range: undefined, + value: "", + code: true, + conditional: items + }; + } + case "Literal": + return { + range: expression.range, + value: expression.value + "", + code: false, + conditional: false + }; + } + return { + range: undefined, + value: "", + code: true, + conditional: false + }; + } + + parse(source, initialState) { + let ast; + let comments; + if (typeof source === "object" && source !== null) { + ast = source; + comments = source.comments; + } else { + comments = []; + ast = Parser.parse(source, { + sourceType: this.sourceType, + onComment: comments + }); + } + + const oldScope = this.scope; + const oldState = this.state; + const oldComments = this.comments; + this.scope = { + topLevelScope: true, + inTry: false, + inShorthand: false, + isStrict: false, + isAsmJs: false, + definitions: new StackedSetMap(), + renames: new StackedSetMap() + }; + const state = (this.state = initialState || {}); + this.comments = comments; + if (this.hooks.program.call(ast, comments) === undefined) { + this.detectMode(ast.body); + this.prewalkStatements(ast.body); + this.blockPrewalkStatements(ast.body); + this.walkStatements(ast.body); + } + this.scope = oldScope; + this.state = oldState; + this.comments = oldComments; + return state; + } + + evaluate(source) { + const ast = Parser.parse("(" + source + ")", { + sourceType: this.sourceType, + locations: false + }); + // TODO(https://github.com/acornjs/acorn/issues/741) + // @ts-ignore + if (ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement") { + throw new Error("evaluate: Source is not a expression"); + } + // TODO(https://github.com/acornjs/acorn/issues/741) + // @ts-ignore + return this.evaluateExpression(ast.body[0].expression); + } + + getComments(range) { + return this.comments.filter( + comment => comment.range[0] >= range[0] && comment.range[1] <= range[1] + ); + } + + parseCommentOptions(range) { + const comments = this.getComments(range); + if (comments.length === 0) { + return EMPTY_COMMENT_OPTIONS; + } + let options = {}; + let errors = []; + for (const comment of comments) { + const { value } = comment; + if (value && webpackCommentRegExp.test(value)) { + // try compile only if webpack options comment is present + try { + const val = vm.runInNewContext(`(function(){return {${value}};})()`); + Object.assign(options, val); + } catch (e) { + e.comment = comment; + errors.push(e); + } + } + } + return { options, errors }; + } + + getNameForExpression(expression) { + let expr = expression; + const exprName = []; + while ( + expr.type === "MemberExpression" && + expr.property.type === (expr.computed ? "Literal" : "Identifier") + ) { + exprName.push(expr.computed ? expr.property.value : expr.property.name); + expr = expr.object; + } + let free; + if (expr.type === "Identifier") { + free = !this.scope.definitions.has(expr.name); + exprName.push(this.scope.renames.get(expr.name) || expr.name); + } else if ( + expr.type === "ThisExpression" && + this.scope.renames.get("this") + ) { + free = true; + exprName.push(this.scope.renames.get("this")); + } else if (expr.type === "ThisExpression") { + free = this.scope.topLevelScope; + exprName.push("this"); + } else { + return null; + } + let prefix = ""; + for (let i = exprName.length - 1; i >= 2; i--) { + prefix += exprName[i] + "."; + } + if (exprName.length > 1) { + prefix += exprName[1]; + } + const name = prefix ? prefix + "." + exprName[0] : exprName[0]; + const nameGeneral = prefix; + return { + name, + nameGeneral, + free + }; + } + + static parse(code, options) { + const type = options ? options.sourceType : "module"; + const parserOptions = Object.assign( + Object.create(null), + defaultParserOptions, + options + ); + + if (type === "auto") { + parserOptions.sourceType = "module"; + } else if (parserOptions.sourceType === "script") { + parserOptions.allowReturnOutsideFunction = true; + } + + let ast; + let error; + let threw = false; + try { + ast = acornParser.parse(code, parserOptions); + } catch (e) { + error = e; + threw = true; + } + + if (threw && type === "auto") { + parserOptions.sourceType = "script"; + parserOptions.allowReturnOutsideFunction = true; + if (Array.isArray(parserOptions.onComment)) { + parserOptions.onComment.length = 0; + } + try { + ast = acornParser.parse(code, parserOptions); + threw = false; + } catch (e) { + threw = true; + } + } + + if (threw) { + throw error; + } + + return ast; + } +} + +// TODO remove in webpack 5 +Object.defineProperty(Parser.prototype, "getCommentOptions", { + configurable: false, + value: util.deprecate( + /** + * @deprecated + * @param {TODO} range Range + * @returns {void} + * @this {Parser} + */ + function(range) { + return this.parseCommentOptions(range).options; + }, + "Parser.getCommentOptions: Use Parser.parseCommentOptions(range) instead" + ) +}); + +module.exports = Parser; + + +/***/ }), + +/***/ 23999: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const path = __webpack_require__(85622); + +const BasicEvaluatedExpression = __webpack_require__(96770); +const ConstDependency = __webpack_require__(71101); +const UnsupportedFeatureWarning = __webpack_require__(99953); + +const ParserHelpers = exports; + +ParserHelpers.addParsedVariableToModule = (parser, name, expression) => { + if (!parser.state.current.addVariable) return false; + var deps = []; + parser.parse(expression, { + current: { + addDependency: dep => { + dep.userRequest = name; + deps.push(dep); + } + }, + module: parser.state.module + }); + parser.state.current.addVariable(name, expression, deps); + return true; +}; + +ParserHelpers.requireFileAsExpression = (context, pathToModule) => { + var moduleJsPath = path.relative(context, pathToModule); + if (!/^[A-Z]:/i.test(moduleJsPath)) { + moduleJsPath = "./" + moduleJsPath.replace(/\\/g, "/"); + } + return "require(" + JSON.stringify(moduleJsPath) + ")"; +}; + +ParserHelpers.toConstantDependency = (parser, value) => { + return function constDependency(expr) { + var dep = new ConstDependency(value, expr.range, false); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + return true; + }; +}; + +ParserHelpers.toConstantDependencyWithWebpackRequire = (parser, value) => { + return function constDependencyWithWebpackRequire(expr) { + var dep = new ConstDependency(value, expr.range, true); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + return true; + }; +}; + +ParserHelpers.evaluateToString = value => { + return function stringExpression(expr) { + return new BasicEvaluatedExpression().setString(value).setRange(expr.range); + }; +}; + +ParserHelpers.evaluateToBoolean = value => { + return function booleanExpression(expr) { + return new BasicEvaluatedExpression() + .setBoolean(value) + .setRange(expr.range); + }; +}; + +ParserHelpers.evaluateToIdentifier = (identifier, truthy) => { + return function identifierExpression(expr) { + let evex = new BasicEvaluatedExpression() + .setIdentifier(identifier) + .setRange(expr.range); + if (truthy === true) { + evex = evex.setTruthy(); + } else if (truthy === false) { + evex = evex.setFalsy(); + } + return evex; + }; +}; + +ParserHelpers.expressionIsUnsupported = (parser, message) => { + return function unsupportedExpression(expr) { + var dep = new ConstDependency("(void 0)", expr.range, false); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + if (!parser.state.module) return; + parser.state.module.warnings.push( + new UnsupportedFeatureWarning(parser.state.module, message, expr.loc) + ); + return true; + }; +}; + +ParserHelpers.skipTraversal = function skipTraversal() { + return true; +}; + +ParserHelpers.approve = function approve() { + return true; +}; + + +/***/ }), + +/***/ 27850: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const PrefetchDependency = __webpack_require__(14237); + +class PrefetchPlugin { + constructor(context, request) { + if (!request) { + this.request = context; + } else { + this.context = context; + this.request = request; + } + } + + apply(compiler) { + compiler.hooks.compilation.tap( + "PrefetchPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + PrefetchDependency, + normalModuleFactory + ); + } + ); + compiler.hooks.make.tapAsync("PrefetchPlugin", (compilation, callback) => { + compilation.prefetch( + this.context || compiler.context, + new PrefetchDependency(this.request), + callback + ); + }); + } +} +module.exports = PrefetchPlugin; + + +/***/ }), + +/***/ 63123: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(26336); + +/** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginArgument} ProgressPluginArgument */ +/** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginOptions} ProgressPluginOptions */ + +const createDefaultHandler = (profile, logger) => { + let lastState; + let lastStateTime; + + const defaultHandler = (percentage, msg, ...args) => { + logger.status(`${Math.floor(percentage * 100)}%`, msg, ...args); + if (profile) { + let state = msg; + state = state.replace(/^\d+\/\d+\s+/, ""); + if (percentage === 0) { + lastState = null; + lastStateTime = Date.now(); + } else if (state !== lastState || percentage === 1) { + const now = Date.now(); + if (lastState) { + const diff = now - lastStateTime; + const stateMsg = `${diff}ms ${lastState}`; + if (diff > 1000) { + logger.warn(stateMsg); + } else if (diff > 10) { + logger.info(stateMsg); + } else if (diff > 0) { + logger.log(stateMsg); + } else { + logger.debug(stateMsg); + } + } + lastState = state; + lastStateTime = now; + } + } + if (percentage === 1) logger.status(); + }; + + return defaultHandler; +}; + +class ProgressPlugin { + /** + * @param {ProgressPluginArgument} options options + */ + constructor(options) { + if (typeof options === "function") { + options = { + handler: options + }; + } + + options = options || {}; + validateOptions(schema, options, "Progress Plugin"); + options = Object.assign({}, ProgressPlugin.defaultOptions, options); + + this.profile = options.profile; + this.handler = options.handler; + this.modulesCount = options.modulesCount; + this.showEntries = options.entries; + this.showModules = options.modules; + this.showActiveModules = options.activeModules; + } + + apply(compiler) { + const { modulesCount } = this; + const handler = + this.handler || + createDefaultHandler( + this.profile, + compiler.getInfrastructureLogger("webpack.Progress") + ); + const showEntries = this.showEntries; + const showModules = this.showModules; + const showActiveModules = this.showActiveModules; + if (compiler.compilers) { + const states = new Array(compiler.compilers.length); + compiler.compilers.forEach((compiler, idx) => { + new ProgressPlugin((p, msg, ...args) => { + states[idx] = [p, msg, ...args]; + handler( + states + .map(state => (state && state[0]) || 0) + .reduce((a, b) => a + b) / states.length, + `[${idx}] ${msg}`, + ...args + ); + }).apply(compiler); + }); + } else { + let lastModulesCount = 0; + let lastEntriesCount = 0; + let moduleCount = modulesCount; + let entriesCount = 1; + let doneModules = 0; + let doneEntries = 0; + const activeModules = new Set(); + let lastActiveModule = ""; + + const update = () => { + const percentByModules = + doneModules / Math.max(lastModulesCount, moduleCount); + const percentByEntries = + doneEntries / Math.max(lastEntriesCount, entriesCount); + + const items = [ + 0.1 + Math.max(percentByModules, percentByEntries) * 0.6, + "building" + ]; + if (showEntries) { + items.push(`${doneEntries}/${entriesCount} entries`); + } + if (showModules) { + items.push(`${doneModules}/${moduleCount} modules`); + } + if (showActiveModules) { + items.push(`${activeModules.size} active`); + items.push(lastActiveModule); + } + handler(...items); + }; + + const moduleAdd = module => { + moduleCount++; + if (showActiveModules) { + const ident = module.identifier(); + if (ident) { + activeModules.add(ident); + lastActiveModule = ident; + } + } + update(); + }; + + const entryAdd = (entry, name) => { + entriesCount++; + update(); + }; + + const moduleDone = module => { + doneModules++; + if (showActiveModules) { + const ident = module.identifier(); + if (ident) { + activeModules.delete(ident); + if (lastActiveModule === ident) { + lastActiveModule = ""; + for (const m of activeModules) { + lastActiveModule = m; + } + } + } + } + update(); + }; + + const entryDone = (entry, name) => { + doneEntries++; + update(); + }; + + compiler.hooks.compilation.tap("ProgressPlugin", compilation => { + if (compilation.compiler.isChild()) return; + lastModulesCount = moduleCount; + lastEntriesCount = entriesCount; + moduleCount = entriesCount = 0; + doneModules = doneEntries = 0; + handler(0, "compiling"); + + compilation.hooks.buildModule.tap("ProgressPlugin", moduleAdd); + compilation.hooks.failedModule.tap("ProgressPlugin", moduleDone); + compilation.hooks.succeedModule.tap("ProgressPlugin", moduleDone); + + compilation.hooks.addEntry.tap("ProgressPlugin", entryAdd); + compilation.hooks.failedEntry.tap("ProgressPlugin", entryDone); + compilation.hooks.succeedEntry.tap("ProgressPlugin", entryDone); + + const hooks = { + finishModules: "finish module graph", + seal: "sealing", + beforeChunks: "chunk graph", + afterChunks: "after chunk graph", + optimizeDependenciesBasic: "basic dependencies optimization", + optimizeDependencies: "dependencies optimization", + optimizeDependenciesAdvanced: "advanced dependencies optimization", + afterOptimizeDependencies: "after dependencies optimization", + optimize: "optimizing", + optimizeModulesBasic: "basic module optimization", + optimizeModules: "module optimization", + optimizeModulesAdvanced: "advanced module optimization", + afterOptimizeModules: "after module optimization", + optimizeChunksBasic: "basic chunk optimization", + optimizeChunks: "chunk optimization", + optimizeChunksAdvanced: "advanced chunk optimization", + afterOptimizeChunks: "after chunk optimization", + optimizeTree: "module and chunk tree optimization", + afterOptimizeTree: "after module and chunk tree optimization", + optimizeChunkModulesBasic: "basic chunk modules optimization", + optimizeChunkModules: "chunk modules optimization", + optimizeChunkModulesAdvanced: "advanced chunk modules optimization", + afterOptimizeChunkModules: "after chunk modules optimization", + reviveModules: "module reviving", + optimizeModuleOrder: "module order optimization", + advancedOptimizeModuleOrder: "advanced module order optimization", + beforeModuleIds: "before module ids", + moduleIds: "module ids", + optimizeModuleIds: "module id optimization", + afterOptimizeModuleIds: "module id optimization", + reviveChunks: "chunk reviving", + optimizeChunkOrder: "chunk order optimization", + beforeChunkIds: "before chunk ids", + optimizeChunkIds: "chunk id optimization", + afterOptimizeChunkIds: "after chunk id optimization", + recordModules: "record modules", + recordChunks: "record chunks", + beforeHash: "hashing", + afterHash: "after hashing", + recordHash: "record hash", + beforeModuleAssets: "module assets processing", + beforeChunkAssets: "chunk assets processing", + additionalChunkAssets: "additional chunk assets processing", + record: "recording", + additionalAssets: "additional asset processing", + optimizeChunkAssets: "chunk asset optimization", + afterOptimizeChunkAssets: "after chunk asset optimization", + optimizeAssets: "asset optimization", + afterOptimizeAssets: "after asset optimization", + afterSeal: "after seal" + }; + const numberOfHooks = Object.keys(hooks).length; + Object.keys(hooks).forEach((name, idx) => { + const title = hooks[name]; + const percentage = (idx / numberOfHooks) * 0.25 + 0.7; + compilation.hooks[name].intercept({ + name: "ProgressPlugin", + context: true, + call: () => { + handler(percentage, title); + }, + tap: (context, tap) => { + if (context) { + // p is percentage from 0 to 1 + // args is any number of messages in a hierarchical matter + context.reportProgress = (p, ...args) => { + handler(percentage, title, tap.name, ...args); + }; + } + handler(percentage, title, tap.name); + } + }); + }); + }); + compiler.hooks.emit.intercept({ + name: "ProgressPlugin", + context: true, + call: () => { + handler(0.95, "emitting"); + }, + tap: (context, tap) => { + if (context) { + context.reportProgress = (p, ...args) => { + handler(0.95, "emitting", tap.name, ...args); + }; + } + handler(0.95, "emitting", tap.name); + } + }); + compiler.hooks.afterEmit.intercept({ + name: "ProgressPlugin", + context: true, + call: () => { + handler(0.98, "after emitting"); + }, + tap: (context, tap) => { + if (context) { + context.reportProgress = (p, ...args) => { + handler(0.98, "after emitting", tap.name, ...args); + }; + } + handler(0.98, "after emitting", tap.name); + } + }); + compiler.hooks.done.tap("ProgressPlugin", () => { + handler(1, ""); + }); + } + } +} + +ProgressPlugin.defaultOptions = { + profile: false, + modulesCount: 500, + modules: true, + activeModules: true, + // TODO webpack 5 default this to true + entries: false +}; + +module.exports = ProgressPlugin; + + +/***/ }), + +/***/ 72861: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ParserHelpers = __webpack_require__(23999); +const ConstDependency = __webpack_require__(71101); + +const NullFactory = __webpack_require__(40438); + +class ProvidePlugin { + constructor(definitions) { + this.definitions = definitions; + } + + apply(compiler) { + const definitions = this.definitions; + compiler.hooks.compilation.tap( + "ProvidePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set(ConstDependency, new NullFactory()); + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + const handler = (parser, parserOptions) => { + Object.keys(definitions).forEach(name => { + var request = [].concat(definitions[name]); + var splittedName = name.split("."); + if (splittedName.length > 0) { + splittedName.slice(1).forEach((_, i) => { + const name = splittedName.slice(0, i + 1).join("."); + parser.hooks.canRename + .for(name) + .tap("ProvidePlugin", ParserHelpers.approve); + }); + } + parser.hooks.expression.for(name).tap("ProvidePlugin", expr => { + let nameIdentifier = name; + const scopedName = name.includes("."); + let expression = `require(${JSON.stringify(request[0])})`; + if (scopedName) { + nameIdentifier = `__webpack_provided_${name.replace( + /\./g, + "_dot_" + )}`; + } + if (request.length > 1) { + expression += request + .slice(1) + .map(r => `[${JSON.stringify(r)}]`) + .join(""); + } + if ( + !ParserHelpers.addParsedVariableToModule( + parser, + nameIdentifier, + expression + ) + ) { + return false; + } + if (scopedName) { + ParserHelpers.toConstantDependency( + parser, + nameIdentifier + )(expr); + } + return true; + }); + }); + }; + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("ProvidePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("ProvidePlugin", handler); + + // Disable ProvidePlugin for javascript/esm, see https://github.com/webpack/webpack/issues/7032 + } + ); + } +} +module.exports = ProvidePlugin; + + +/***/ }), + +/***/ 82353: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Module = __webpack_require__(75993); +const { OriginalSource, RawSource } = __webpack_require__(53665); + +module.exports = class RawModule extends Module { + constructor(source, identifier, readableIdentifier) { + super("javascript/dynamic", null); + this.sourceStr = source; + this.identifierStr = identifier || this.sourceStr; + this.readableIdentifierStr = readableIdentifier || this.identifierStr; + this.built = false; + } + + identifier() { + return this.identifierStr; + } + + size() { + return this.sourceStr.length; + } + + readableIdentifier(requestShortener) { + return requestShortener.shorten(this.readableIdentifierStr); + } + + needRebuild() { + return false; + } + + build(options, compilations, resolver, fs, callback) { + this.built = true; + this.buildMeta = {}; + this.buildInfo = { + cacheable: true + }; + callback(); + } + + source() { + if (this.useSourceMap) { + return new OriginalSource(this.sourceStr, this.identifier()); + } else { + return new RawSource(this.sourceStr); + } + } + + updateHash(hash) { + hash.update(this.sourceStr); + super.updateHash(hash); + } +}; + + +/***/ }), + +/***/ 40355: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const identifierUtils = __webpack_require__(94658); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./Module")} Module */ + +/** + * @typedef {Object} RecordsChunks + * @property {Record=} byName + * @property {Record=} bySource + * @property {number[]=} usedIds + */ + +/** + * @typedef {Object} RecordsModules + * @property {Record=} byIdentifier + * @property {Record=} bySource + * @property {Record=} usedIds + */ + +/** + * @typedef {Object} Records + * @property {RecordsChunks=} chunks + * @property {RecordsModules=} modules + */ + +class RecordIdsPlugin { + /** + * @param {Object} options Options object + * @param {boolean=} options.portableIds true, when ids need to be portable + */ + constructor(options) { + this.options = options || {}; + } + + /** + * @param {Compiler} compiler the Compiler + * @returns {void} + */ + apply(compiler) { + const portableIds = this.options.portableIds; + compiler.hooks.compilation.tap("RecordIdsPlugin", compilation => { + compilation.hooks.recordModules.tap( + "RecordIdsPlugin", + /** + * @param {Module[]} modules the modules array + * @param {Records} records the records object + * @returns {void} + */ + (modules, records) => { + if (!records.modules) records.modules = {}; + if (!records.modules.byIdentifier) records.modules.byIdentifier = {}; + if (!records.modules.usedIds) records.modules.usedIds = {}; + for (const module of modules) { + if (typeof module.id !== "number") continue; + const identifier = portableIds + ? identifierUtils.makePathsRelative( + compiler.context, + module.identifier(), + compilation.cache + ) + : module.identifier(); + records.modules.byIdentifier[identifier] = module.id; + records.modules.usedIds[module.id] = module.id; + } + } + ); + compilation.hooks.reviveModules.tap( + "RecordIdsPlugin", + /** + * @param {Module[]} modules the modules array + * @param {Records} records the records object + * @returns {void} + */ + (modules, records) => { + if (!records.modules) return; + if (records.modules.byIdentifier) { + /** @type {Set} */ + const usedIds = new Set(); + for (const module of modules) { + if (module.id !== null) continue; + const identifier = portableIds + ? identifierUtils.makePathsRelative( + compiler.context, + module.identifier(), + compilation.cache + ) + : module.identifier(); + const id = records.modules.byIdentifier[identifier]; + if (id === undefined) continue; + if (usedIds.has(id)) continue; + usedIds.add(id); + module.id = id; + } + } + if (Array.isArray(records.modules.usedIds)) { + compilation.usedModuleIds = new Set(records.modules.usedIds); + } + } + ); + + /** + * @param {Module} module the module + * @returns {string} the (portable) identifier + */ + const getModuleIdentifier = module => { + if (portableIds) { + return identifierUtils.makePathsRelative( + compiler.context, + module.identifier(), + compilation.cache + ); + } + return module.identifier(); + }; + + /** + * @param {Chunk} chunk the chunk + * @returns {string[]} sources of the chunk + */ + const getChunkSources = chunk => { + /** @type {string[]} */ + const sources = []; + for (const chunkGroup of chunk.groupsIterable) { + const index = chunkGroup.chunks.indexOf(chunk); + if (chunkGroup.name) { + sources.push(`${index} ${chunkGroup.name}`); + } else { + for (const origin of chunkGroup.origins) { + if (origin.module) { + if (origin.request) { + sources.push( + `${index} ${getModuleIdentifier(origin.module)} ${ + origin.request + }` + ); + } else if (typeof origin.loc === "string") { + sources.push( + `${index} ${getModuleIdentifier(origin.module)} ${ + origin.loc + }` + ); + } else if ( + origin.loc && + typeof origin.loc === "object" && + origin.loc.start + ) { + sources.push( + `${index} ${getModuleIdentifier( + origin.module + )} ${JSON.stringify(origin.loc.start)}` + ); + } + } + } + } + } + return sources; + }; + + compilation.hooks.recordChunks.tap( + "RecordIdsPlugin", + /** + * @param {Chunk[]} chunks the chunks array + * @param {Records} records the records object + * @returns {void} + */ + (chunks, records) => { + if (!records.chunks) records.chunks = {}; + if (!records.chunks.byName) records.chunks.byName = {}; + if (!records.chunks.bySource) records.chunks.bySource = {}; + /** @type {Set} */ + const usedIds = new Set(); + for (const chunk of chunks) { + if (typeof chunk.id !== "number") continue; + const name = chunk.name; + if (name) records.chunks.byName[name] = chunk.id; + const sources = getChunkSources(chunk); + for (const source of sources) { + records.chunks.bySource[source] = chunk.id; + } + usedIds.add(chunk.id); + } + records.chunks.usedIds = Array.from(usedIds).sort(); + } + ); + compilation.hooks.reviveChunks.tap( + "RecordIdsPlugin", + /** + * @param {Chunk[]} chunks the chunks array + * @param {Records} records the records object + * @returns {void} + */ + (chunks, records) => { + if (!records.chunks) return; + /** @type {Set} */ + const usedIds = new Set(); + if (records.chunks.byName) { + for (const chunk of chunks) { + if (chunk.id !== null) continue; + if (!chunk.name) continue; + const id = records.chunks.byName[chunk.name]; + if (id === undefined) continue; + if (usedIds.has(id)) continue; + usedIds.add(id); + chunk.id = id; + } + } + if (records.chunks.bySource) { + for (const chunk of chunks) { + const sources = getChunkSources(chunk); + for (const source of sources) { + const id = records.chunks.bySource[source]; + if (id === undefined) continue; + if (usedIds.has(id)) continue; + usedIds.add(id); + chunk.id = id; + break; + } + } + } + if (Array.isArray(records.chunks.usedIds)) { + compilation.usedChunkIds = new Set(records.chunks.usedIds); + } + } + ); + }); + } +} +module.exports = RecordIdsPlugin; + + +/***/ }), + +/***/ 15377: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +const WebpackError = __webpack_require__(97391); + +module.exports = class RemovedPluginError extends WebpackError { + constructor(message) { + super(message); + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 54254: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); +const NORMALIZE_SLASH_DIRECTION_REGEXP = /\\/g; +const PATH_CHARS_REGEXP = /[-[\]{}()*+?.,\\^$|#\s]/g; +const SEPARATOR_REGEXP = /[/\\]$/; +const FRONT_OR_BACK_BANG_REGEXP = /^!|!$/g; +const INDEX_JS_REGEXP = /\/index.js(!|\?|\(query\))/g; +const MATCH_RESOURCE_REGEXP = /!=!/; + +const normalizeBackSlashDirection = request => { + return request.replace(NORMALIZE_SLASH_DIRECTION_REGEXP, "/"); +}; + +const createRegExpForPath = path => { + const regexpTypePartial = path.replace(PATH_CHARS_REGEXP, "\\$&"); + return new RegExp(`(^|!)${regexpTypePartial}`, "g"); +}; + +class RequestShortener { + constructor(directory) { + directory = normalizeBackSlashDirection(directory); + if (SEPARATOR_REGEXP.test(directory)) { + directory = directory.substr(0, directory.length - 1); + } + + if (directory) { + this.currentDirectoryRegExp = createRegExpForPath(directory); + } + + const dirname = path.dirname(directory); + const endsWithSeparator = SEPARATOR_REGEXP.test(dirname); + const parentDirectory = endsWithSeparator + ? dirname.substr(0, dirname.length - 1) + : dirname; + if (parentDirectory && parentDirectory !== directory) { + this.parentDirectoryRegExp = createRegExpForPath(`${parentDirectory}/`); + } + + if (__dirname.length >= 2) { + const buildins = normalizeBackSlashDirection(path.join(__dirname, "..")); + const buildinsAsModule = + this.currentDirectoryRegExp && + this.currentDirectoryRegExp.test(buildins); + this.buildinsAsModule = buildinsAsModule; + this.buildinsRegExp = createRegExpForPath(buildins); + } + + this.cache = new Map(); + } + + shorten(request) { + if (!request) return request; + const cacheEntry = this.cache.get(request); + if (cacheEntry !== undefined) { + return cacheEntry; + } + let result = normalizeBackSlashDirection(request); + if (this.buildinsAsModule && this.buildinsRegExp) { + result = result.replace(this.buildinsRegExp, "!(webpack)"); + } + if (this.currentDirectoryRegExp) { + result = result.replace(this.currentDirectoryRegExp, "!."); + } + if (this.parentDirectoryRegExp) { + result = result.replace(this.parentDirectoryRegExp, "!../"); + } + if (!this.buildinsAsModule && this.buildinsRegExp) { + result = result.replace(this.buildinsRegExp, "!(webpack)"); + } + result = result.replace(INDEX_JS_REGEXP, "$1"); + result = result.replace(FRONT_OR_BACK_BANG_REGEXP, ""); + result = result.replace(MATCH_RESOURCE_REGEXP, " = "); + this.cache.set(request, result); + return result; + } +} + +module.exports = RequestShortener; + + +/***/ }), + +/***/ 88226: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ParserHelpers = __webpack_require__(23999); +const ConstDependency = __webpack_require__(71101); +const NullFactory = __webpack_require__(40438); + +module.exports = class RequireJsStuffPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "RequireJsStuffPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set(ConstDependency, new NullFactory()); + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + const handler = (parser, parserOptions) => { + if (parserOptions.requireJs !== undefined && !parserOptions.requireJs) + return; + + parser.hooks.call + .for("require.config") + .tap( + "RequireJsStuffPlugin", + ParserHelpers.toConstantDependency(parser, "undefined") + ); + parser.hooks.call + .for("requirejs.config") + .tap( + "RequireJsStuffPlugin", + ParserHelpers.toConstantDependency(parser, "undefined") + ); + + parser.hooks.expression + .for("require.version") + .tap( + "RequireJsStuffPlugin", + ParserHelpers.toConstantDependency( + parser, + JSON.stringify("0.0.0") + ) + ); + parser.hooks.expression + .for("requirejs.onError") + .tap( + "RequireJsStuffPlugin", + ParserHelpers.toConstantDependencyWithWebpackRequire( + parser, + "__webpack_require__.oe" + ) + ); + }; + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("RequireJsStuffPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("RequireJsStuffPlugin", handler); + } + ); + } +}; + + +/***/ }), + +/***/ 50588: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + +const { Tapable, HookMap, SyncHook, SyncWaterfallHook } = __webpack_require__(92402); +const Factory = __webpack_require__(87450).ResolverFactory; +const { cachedCleverMerge } = __webpack_require__(67916); + +/** @typedef {import("enhanced-resolve").Resolver} Resolver */ + +const EMTPY_RESOLVE_OPTIONS = {}; + +module.exports = class ResolverFactory extends Tapable { + constructor() { + super(); + this.hooks = { + resolveOptions: new HookMap( + () => new SyncWaterfallHook(["resolveOptions"]) + ), + resolver: new HookMap(() => new SyncHook(["resolver", "resolveOptions"])) + }; + this._pluginCompat.tap("ResolverFactory", options => { + let match; + match = /^resolve-options (.+)$/.exec(options.name); + if (match) { + this.hooks.resolveOptions + .for(match[1]) + .tap(options.fn.name || "unnamed compat plugin", options.fn); + return true; + } + match = /^resolver (.+)$/.exec(options.name); + if (match) { + this.hooks.resolver + .for(match[1]) + .tap(options.fn.name || "unnamed compat plugin", options.fn); + return true; + } + }); + this.cache2 = new Map(); + } + + get(type, resolveOptions) { + resolveOptions = resolveOptions || EMTPY_RESOLVE_OPTIONS; + const ident = `${type}|${JSON.stringify(resolveOptions)}`; + const resolver = this.cache2.get(ident); + if (resolver) return resolver; + const newResolver = this._create(type, resolveOptions); + this.cache2.set(ident, newResolver); + return newResolver; + } + + _create(type, resolveOptions) { + const originalResolveOptions = Object.assign({}, resolveOptions); + resolveOptions = this.hooks.resolveOptions.for(type).call(resolveOptions); + const resolver = Factory.createResolver(resolveOptions); + if (!resolver) { + throw new Error("No resolver created"); + } + /** @type {Map} */ + const childCache = new Map(); + resolver.withOptions = options => { + const cacheEntry = childCache.get(options); + if (cacheEntry !== undefined) return cacheEntry; + const mergedOptions = cachedCleverMerge(originalResolveOptions, options); + const resolver = this.get(type, mergedOptions); + childCache.set(options, resolver); + return resolver; + }; + this.hooks.resolver.for(type).call(resolver, resolveOptions); + return resolver; + } +}; + + +/***/ }), + +/***/ 84247: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +/* +: +: [] +: { + resource: { + test: , + include: , + exclude: , + }, + resource: , -> resource.test + test: , -> resource.test + include: , -> resource.include + exclude: , -> resource.exclude + resourceQuery: , + compiler: , + issuer: , + use: "loader", -> use[0].loader + loader: <>, -> use[0].loader + loaders: <>, -> use + options: {}, -> use[0].options, + query: {}, -> options + parser: {}, + use: [ + "loader" -> use[x].loader + ], + use: [ + { + loader: "loader", + options: {} + } + ], + rules: [ + + ], + oneOf: [ + + ] +} + +: /regExp/ +: function(arg) {} +: "starting" +: [] // or +: { and: [] } +: { or: [] } +: { not: [] } +: { test: , include: , exclude: } + + +normalized: + +{ + resource: function(), + resourceQuery: function(), + compiler: function(), + issuer: function(), + use: [ + { + loader: string, + options: string, + : + } + ], + rules: [], + oneOf: [], + : , +} + +*/ + + + +const notMatcher = matcher => { + return str => { + return !matcher(str); + }; +}; + +const orMatcher = items => { + return str => { + for (let i = 0; i < items.length; i++) { + if (items[i](str)) return true; + } + return false; + }; +}; + +const andMatcher = items => { + return str => { + for (let i = 0; i < items.length; i++) { + if (!items[i](str)) return false; + } + return true; + }; +}; + +module.exports = class RuleSet { + constructor(rules) { + this.references = Object.create(null); + this.rules = RuleSet.normalizeRules(rules, this.references, "ref-"); + } + + static normalizeRules(rules, refs, ident) { + if (Array.isArray(rules)) { + return rules.map((rule, idx) => { + return RuleSet.normalizeRule(rule, refs, `${ident}-${idx}`); + }); + } else if (rules) { + return [RuleSet.normalizeRule(rules, refs, ident)]; + } else { + return []; + } + } + + static normalizeRule(rule, refs, ident) { + if (typeof rule === "string") { + return { + use: [ + { + loader: rule + } + ] + }; + } + if (!rule) { + throw new Error("Unexcepted null when object was expected as rule"); + } + if (typeof rule !== "object") { + throw new Error( + "Unexcepted " + + typeof rule + + " when object was expected as rule (" + + rule + + ")" + ); + } + + const newRule = {}; + let useSource; + let resourceSource; + let condition; + + const checkUseSource = newSource => { + if (useSource && useSource !== newSource) { + throw new Error( + RuleSet.buildErrorMessage( + rule, + new Error( + "Rule can only have one result source (provided " + + newSource + + " and " + + useSource + + ")" + ) + ) + ); + } + useSource = newSource; + }; + + const checkResourceSource = newSource => { + if (resourceSource && resourceSource !== newSource) { + throw new Error( + RuleSet.buildErrorMessage( + rule, + new Error( + "Rule can only have one resource source (provided " + + newSource + + " and " + + resourceSource + + ")" + ) + ) + ); + } + resourceSource = newSource; + }; + + if (rule.test || rule.include || rule.exclude) { + checkResourceSource("test + include + exclude"); + condition = { + test: rule.test, + include: rule.include, + exclude: rule.exclude + }; + try { + newRule.resource = RuleSet.normalizeCondition(condition); + } catch (error) { + throw new Error(RuleSet.buildErrorMessage(condition, error)); + } + } + + if (rule.resource) { + checkResourceSource("resource"); + try { + newRule.resource = RuleSet.normalizeCondition(rule.resource); + } catch (error) { + throw new Error(RuleSet.buildErrorMessage(rule.resource, error)); + } + } + + if (rule.realResource) { + try { + newRule.realResource = RuleSet.normalizeCondition(rule.realResource); + } catch (error) { + throw new Error(RuleSet.buildErrorMessage(rule.realResource, error)); + } + } + + if (rule.resourceQuery) { + try { + newRule.resourceQuery = RuleSet.normalizeCondition(rule.resourceQuery); + } catch (error) { + throw new Error(RuleSet.buildErrorMessage(rule.resourceQuery, error)); + } + } + + if (rule.compiler) { + try { + newRule.compiler = RuleSet.normalizeCondition(rule.compiler); + } catch (error) { + throw new Error(RuleSet.buildErrorMessage(rule.compiler, error)); + } + } + + if (rule.issuer) { + try { + newRule.issuer = RuleSet.normalizeCondition(rule.issuer); + } catch (error) { + throw new Error(RuleSet.buildErrorMessage(rule.issuer, error)); + } + } + + if (rule.loader && rule.loaders) { + throw new Error( + RuleSet.buildErrorMessage( + rule, + new Error( + "Provided loader and loaders for rule (use only one of them)" + ) + ) + ); + } + + const loader = rule.loaders || rule.loader; + if (typeof loader === "string" && !rule.options && !rule.query) { + checkUseSource("loader"); + newRule.use = RuleSet.normalizeUse(loader.split("!"), ident); + } else if (typeof loader === "string" && (rule.options || rule.query)) { + checkUseSource("loader + options/query"); + newRule.use = RuleSet.normalizeUse( + { + loader: loader, + options: rule.options, + query: rule.query + }, + ident + ); + } else if (loader && (rule.options || rule.query)) { + throw new Error( + RuleSet.buildErrorMessage( + rule, + new Error( + "options/query cannot be used with loaders (use options for each array item)" + ) + ) + ); + } else if (loader) { + checkUseSource("loaders"); + newRule.use = RuleSet.normalizeUse(loader, ident); + } else if (rule.options || rule.query) { + throw new Error( + RuleSet.buildErrorMessage( + rule, + new Error( + "options/query provided without loader (use loader + options)" + ) + ) + ); + } + + if (rule.use) { + checkUseSource("use"); + newRule.use = RuleSet.normalizeUse(rule.use, ident); + } + + if (rule.rules) { + newRule.rules = RuleSet.normalizeRules( + rule.rules, + refs, + `${ident}-rules` + ); + } + + if (rule.oneOf) { + newRule.oneOf = RuleSet.normalizeRules( + rule.oneOf, + refs, + `${ident}-oneOf` + ); + } + + const keys = Object.keys(rule).filter(key => { + return ![ + "resource", + "resourceQuery", + "compiler", + "test", + "include", + "exclude", + "issuer", + "loader", + "options", + "query", + "loaders", + "use", + "rules", + "oneOf" + ].includes(key); + }); + for (const key of keys) { + newRule[key] = rule[key]; + } + + if (Array.isArray(newRule.use)) { + for (const item of newRule.use) { + if (item.ident) { + refs[item.ident] = item.options; + } + } + } + + return newRule; + } + + static buildErrorMessage(condition, error) { + const conditionAsText = JSON.stringify( + condition, + (key, value) => { + return value === undefined ? "undefined" : value; + }, + 2 + ); + return error.message + " in " + conditionAsText; + } + + static normalizeUse(use, ident) { + if (typeof use === "function") { + return data => RuleSet.normalizeUse(use(data), ident); + } + if (Array.isArray(use)) { + return use + .map((item, idx) => RuleSet.normalizeUse(item, `${ident}-${idx}`)) + .reduce((arr, items) => arr.concat(items), []); + } + return [RuleSet.normalizeUseItem(use, ident)]; + } + + static normalizeUseItemString(useItemString) { + const idx = useItemString.indexOf("?"); + if (idx >= 0) { + return { + loader: useItemString.substr(0, idx), + options: useItemString.substr(idx + 1) + }; + } + return { + loader: useItemString, + options: undefined + }; + } + + static normalizeUseItem(item, ident) { + if (typeof item === "string") { + return RuleSet.normalizeUseItemString(item); + } + + const newItem = {}; + + if (item.options && item.query) { + throw new Error("Provided options and query in use"); + } + + if (!item.loader) { + throw new Error("No loader specified"); + } + + newItem.options = item.options || item.query; + + if (typeof newItem.options === "object" && newItem.options) { + if (newItem.options.ident) { + newItem.ident = newItem.options.ident; + } else { + newItem.ident = ident; + } + } + + const keys = Object.keys(item).filter(function(key) { + return !["options", "query"].includes(key); + }); + + for (const key of keys) { + newItem[key] = item[key]; + } + + return newItem; + } + + static normalizeCondition(condition) { + if (!condition) throw new Error("Expected condition but got falsy value"); + if (typeof condition === "string") { + return str => str.indexOf(condition) === 0; + } + if (typeof condition === "function") { + return condition; + } + if (condition instanceof RegExp) { + return condition.test.bind(condition); + } + if (Array.isArray(condition)) { + const items = condition.map(c => RuleSet.normalizeCondition(c)); + return orMatcher(items); + } + if (typeof condition !== "object") { + throw Error( + "Unexcepted " + + typeof condition + + " when condition was expected (" + + condition + + ")" + ); + } + + const matchers = []; + Object.keys(condition).forEach(key => { + const value = condition[key]; + switch (key) { + case "or": + case "include": + case "test": + if (value) matchers.push(RuleSet.normalizeCondition(value)); + break; + case "and": + if (value) { + const items = value.map(c => RuleSet.normalizeCondition(c)); + matchers.push(andMatcher(items)); + } + break; + case "not": + case "exclude": + if (value) { + const matcher = RuleSet.normalizeCondition(value); + matchers.push(notMatcher(matcher)); + } + break; + default: + throw new Error("Unexcepted property " + key + " in condition"); + } + }); + if (matchers.length === 0) { + throw new Error("Excepted condition but got " + condition); + } + if (matchers.length === 1) { + return matchers[0]; + } + return andMatcher(matchers); + } + + exec(data) { + const result = []; + this._run( + data, + { + rules: this.rules + }, + result + ); + return result; + } + + _run(data, rule, result) { + // test conditions + if (rule.resource && !data.resource) return false; + if (rule.realResource && !data.realResource) return false; + if (rule.resourceQuery && !data.resourceQuery) return false; + if (rule.compiler && !data.compiler) return false; + if (rule.issuer && !data.issuer) return false; + if (rule.resource && !rule.resource(data.resource)) return false; + if (rule.realResource && !rule.realResource(data.realResource)) + return false; + if (data.issuer && rule.issuer && !rule.issuer(data.issuer)) return false; + if ( + data.resourceQuery && + rule.resourceQuery && + !rule.resourceQuery(data.resourceQuery) + ) { + return false; + } + if (data.compiler && rule.compiler && !rule.compiler(data.compiler)) { + return false; + } + + // apply + const keys = Object.keys(rule).filter(key => { + return ![ + "resource", + "realResource", + "resourceQuery", + "compiler", + "issuer", + "rules", + "oneOf", + "use", + "enforce" + ].includes(key); + }); + for (const key of keys) { + result.push({ + type: key, + value: rule[key] + }); + } + + if (rule.use) { + const process = use => { + if (typeof use === "function") { + process(use(data)); + } else if (Array.isArray(use)) { + use.forEach(process); + } else { + result.push({ + type: "use", + value: use, + enforce: rule.enforce + }); + } + }; + process(rule.use); + } + + if (rule.rules) { + for (let i = 0; i < rule.rules.length; i++) { + this._run(data, rule.rules[i], result); + } + } + + if (rule.oneOf) { + for (let i = 0; i < rule.oneOf.length; i++) { + if (this._run(data, rule.oneOf[i], result)) break; + } + } + + return true; + } + + findOptionsByIdent(ident) { + const options = this.references[ident]; + if (!options) { + throw new Error("Can't find options with ident '" + ident + "'"); + } + return options; + } +}; + + +/***/ }), + +/***/ 44006: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Template = __webpack_require__(96066); + +/** @typedef {import("./Module")} Module */ + +module.exports = class RuntimeTemplate { + constructor(outputOptions, requestShortener) { + this.outputOptions = outputOptions || {}; + this.requestShortener = requestShortener; + } + + /** + * Add a comment + * @param {object} options Information content of the comment + * @param {string=} options.request request string used originally + * @param {string=} options.chunkName name of the chunk referenced + * @param {string=} options.chunkReason reason information of the chunk + * @param {string=} options.message additional message + * @param {string=} options.exportName name of the export + * @returns {string} comment + */ + comment({ request, chunkName, chunkReason, message, exportName }) { + let content; + if (this.outputOptions.pathinfo) { + content = [message, request, chunkName, chunkReason] + .filter(Boolean) + .map(item => this.requestShortener.shorten(item)) + .join(" | "); + } else { + content = [message, chunkName, chunkReason] + .filter(Boolean) + .map(item => this.requestShortener.shorten(item)) + .join(" | "); + } + if (!content) return ""; + if (this.outputOptions.pathinfo) { + return Template.toComment(content) + " "; + } else { + return Template.toNormalComment(content) + " "; + } + } + + throwMissingModuleErrorFunction({ request }) { + const err = `Cannot find module '${request}'`; + return `function webpackMissingModule() { var e = new Error(${JSON.stringify( + err + )}); e.code = 'MODULE_NOT_FOUND'; throw e; }`; + } + + missingModule({ request }) { + return `!(${this.throwMissingModuleErrorFunction({ request })}())`; + } + + missingModuleStatement({ request }) { + return `${this.missingModule({ request })};\n`; + } + + missingModulePromise({ request }) { + return `Promise.resolve().then(${this.throwMissingModuleErrorFunction({ + request + })})`; + } + + moduleId({ module, request }) { + if (!module) { + return this.missingModule({ + request + }); + } + if (module.id === null) { + throw new Error( + `RuntimeTemplate.moduleId(): Module ${module.identifier()} has no id. This should not happen.` + ); + } + return `${this.comment({ request })}${JSON.stringify(module.id)}`; + } + + moduleRaw({ module, request }) { + if (!module) { + return this.missingModule({ + request + }); + } + return `__webpack_require__(${this.moduleId({ module, request })})`; + } + + moduleExports({ module, request }) { + return this.moduleRaw({ + module, + request + }); + } + + moduleNamespace({ module, request, strict }) { + if (!module) { + return this.missingModule({ + request + }); + } + const moduleId = this.moduleId({ + module, + request + }); + const exportsType = module.buildMeta && module.buildMeta.exportsType; + if (exportsType === "namespace") { + const rawModule = this.moduleRaw({ + module, + request + }); + return rawModule; + } else if (exportsType === "named") { + return `__webpack_require__.t(${moduleId}, 3)`; + } else if (strict) { + return `__webpack_require__.t(${moduleId}, 1)`; + } else { + return `__webpack_require__.t(${moduleId}, 7)`; + } + } + + moduleNamespacePromise({ block, module, request, message, strict, weak }) { + if (!module) { + return this.missingModulePromise({ + request + }); + } + if (module.id === null) { + throw new Error( + `RuntimeTemplate.moduleNamespacePromise(): Module ${module.identifier()} has no id. This should not happen.` + ); + } + const promise = this.blockPromise({ + block, + message + }); + + let getModuleFunction; + let idExpr = JSON.stringify(module.id); + const comment = this.comment({ + request + }); + let header = ""; + if (weak) { + if (idExpr.length > 8) { + // 'var x="nnnnnn";x,"+x+",x' vs '"nnnnnn",nnnnnn,"nnnnnn"' + header += `var id = ${idExpr}; `; + idExpr = "id"; + } + header += `if(!__webpack_require__.m[${idExpr}]) { var e = new Error("Module '" + ${idExpr} + "' is not available (weak dependency)"); e.code = 'MODULE_NOT_FOUND'; throw e; } `; + } + const moduleId = this.moduleId({ + module, + request + }); + const exportsType = module.buildMeta && module.buildMeta.exportsType; + if (exportsType === "namespace") { + if (header) { + const rawModule = this.moduleRaw({ + module, + request + }); + getModuleFunction = `function() { ${header}return ${rawModule}; }`; + } else { + getModuleFunction = `__webpack_require__.bind(null, ${comment}${idExpr})`; + } + } else if (exportsType === "named") { + if (header) { + getModuleFunction = `function() { ${header}return __webpack_require__.t(${moduleId}, 3); }`; + } else { + getModuleFunction = `__webpack_require__.t.bind(null, ${comment}${idExpr}, 3)`; + } + } else if (strict) { + if (header) { + getModuleFunction = `function() { ${header}return __webpack_require__.t(${moduleId}, 1); }`; + } else { + getModuleFunction = `__webpack_require__.t.bind(null, ${comment}${idExpr}, 1)`; + } + } else { + if (header) { + getModuleFunction = `function() { ${header}return __webpack_require__.t(${moduleId}, 7); }`; + } else { + getModuleFunction = `__webpack_require__.t.bind(null, ${comment}${idExpr}, 7)`; + } + } + + return `${promise || "Promise.resolve()"}.then(${getModuleFunction})`; + } + + /** + * + * @param {Object} options options object + * @param {boolean=} options.update whether a new variable should be created or the existing one updated + * @param {Module} options.module the module + * @param {string} options.request the request that should be printed as comment + * @param {string} options.importVar name of the import variable + * @param {Module} options.originModule module in which the statement is emitted + * @returns {string} the import statement + */ + importStatement({ update, module, request, importVar, originModule }) { + if (!module) { + return this.missingModuleStatement({ + request + }); + } + const moduleId = this.moduleId({ + module, + request + }); + const optDeclaration = update ? "" : "var "; + + const exportsType = module.buildMeta && module.buildMeta.exportsType; + let content = `/* harmony import */ ${optDeclaration}${importVar} = __webpack_require__(${moduleId});\n`; + + if (!exportsType && !originModule.buildMeta.strictHarmonyModule) { + content += `/* harmony import */ ${optDeclaration}${importVar}_default = /*#__PURE__*/__webpack_require__.n(${importVar});\n`; + } + if (exportsType === "named") { + if (Array.isArray(module.buildMeta.providedExports)) { + content += `${optDeclaration}${importVar}_namespace = /*#__PURE__*/__webpack_require__.t(${moduleId}, 1);\n`; + } else { + content += `${optDeclaration}${importVar}_namespace = /*#__PURE__*/__webpack_require__.t(${moduleId});\n`; + } + } + return content; + } + + exportFromImport({ + module, + request, + exportName, + originModule, + asiSafe, + isCall, + callContext, + importVar + }) { + if (!module) { + return this.missingModule({ + request + }); + } + const exportsType = module.buildMeta && module.buildMeta.exportsType; + + if (!exportsType) { + if (exportName === "default") { + if (!originModule.buildMeta.strictHarmonyModule) { + if (isCall) { + return `${importVar}_default()`; + } else if (asiSafe) { + return `(${importVar}_default())`; + } else { + return `${importVar}_default.a`; + } + } else { + return importVar; + } + } else if (originModule.buildMeta.strictHarmonyModule) { + if (exportName) { + return "/* non-default import from non-esm module */undefined"; + } else { + return `/*#__PURE__*/__webpack_require__.t(${importVar})`; + } + } + } + + if (exportsType === "named") { + if (exportName === "default") { + return importVar; + } else if (!exportName) { + return `${importVar}_namespace`; + } + } + + if (exportName) { + const used = module.isUsed(exportName); + if (!used) { + const comment = Template.toNormalComment(`unused export ${exportName}`); + return `${comment} undefined`; + } + const comment = + used !== exportName ? Template.toNormalComment(exportName) + " " : ""; + const access = `${importVar}[${comment}${JSON.stringify(used)}]`; + if (isCall) { + if (callContext === false && asiSafe) { + return `(0,${access})`; + } else if (callContext === false) { + return `Object(${access})`; + } + } + return access; + } else { + return importVar; + } + } + + blockPromise({ block, message }) { + if (!block || !block.chunkGroup || block.chunkGroup.chunks.length === 0) { + const comment = this.comment({ + message + }); + return `Promise.resolve(${comment.trim()})`; + } + const chunks = block.chunkGroup.chunks.filter( + chunk => !chunk.hasRuntime() && chunk.id !== null + ); + const comment = this.comment({ + message, + chunkName: block.chunkName, + chunkReason: block.chunkReason + }); + if (chunks.length === 1) { + const chunkId = JSON.stringify(chunks[0].id); + return `__webpack_require__.e(${comment}${chunkId})`; + } else if (chunks.length > 0) { + const requireChunkId = chunk => + `__webpack_require__.e(${JSON.stringify(chunk.id)})`; + return `Promise.all(${comment.trim()}[${chunks + .map(requireChunkId) + .join(", ")}])`; + } else { + return `Promise.resolve(${comment.trim()})`; + } + } + + onError() { + return "__webpack_require__.oe"; + } + + defineEsModuleFlagStatement({ exportsArgument }) { + return `__webpack_require__.r(${exportsArgument});\n`; + } +}; + + +/***/ }), + +/***/ 37098: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { ConcatSource } = __webpack_require__(53665); + +/** @typedef {import("./Compilation")} Compilation */ + +class SetVarMainTemplatePlugin { + /** + * @param {string} varExpression the accessor where the library is exported + * @param {boolean} copyObject specify copying the exports + */ + constructor(varExpression, copyObject) { + /** @type {string} */ + this.varExpression = varExpression; + /** @type {boolean} */ + this.copyObject = copyObject; + } + + /** + * @param {Compilation} compilation the compilation instance + * @returns {void} + */ + apply(compilation) { + const { mainTemplate, chunkTemplate } = compilation; + + const onRenderWithEntry = (source, chunk, hash) => { + const varExpression = mainTemplate.getAssetPath(this.varExpression, { + hash, + chunk + }); + if (this.copyObject) { + return new ConcatSource( + `(function(e, a) { for(var i in a) e[i] = a[i]; }(${varExpression}, `, + source, + "))" + ); + } else { + const prefix = `${varExpression} =\n`; + return new ConcatSource(prefix, source); + } + }; + + for (const template of [mainTemplate, chunkTemplate]) { + template.hooks.renderWithEntry.tap( + "SetVarMainTemplatePlugin", + onRenderWithEntry + ); + } + + mainTemplate.hooks.globalHashPaths.tap( + "SetVarMainTemplatePlugin", + paths => { + if (this.varExpression) paths.push(this.varExpression); + return paths; + } + ); + mainTemplate.hooks.hash.tap("SetVarMainTemplatePlugin", hash => { + hash.update("set var"); + hash.update(`${this.varExpression}`); + hash.update(`${this.copyObject}`); + }); + } +} + +module.exports = SetVarMainTemplatePlugin; + + +/***/ }), + +/***/ 19070: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const SingleEntryDependency = __webpack_require__(84828); + +/** @typedef {import("./Compiler")} Compiler */ + +class SingleEntryPlugin { + /** + * An entry plugin which will handle + * creation of the SingleEntryDependency + * + * @param {string} context context path + * @param {string} entry entry path + * @param {string} name entry key name + */ + constructor(context, entry, name) { + this.context = context; + this.entry = entry; + this.name = name; + } + + /** + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "SingleEntryPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + SingleEntryDependency, + normalModuleFactory + ); + } + ); + + compiler.hooks.make.tapAsync( + "SingleEntryPlugin", + (compilation, callback) => { + const { entry, name, context } = this; + + const dep = SingleEntryPlugin.createDependency(entry, name); + compilation.addEntry(context, dep, name, callback); + } + ); + } + + /** + * @param {string} entry entry request + * @param {string} name entry name + * @returns {SingleEntryDependency} the dependency + */ + static createDependency(entry, name) { + const dep = new SingleEntryDependency(entry); + dep.loc = { name }; + return dep; + } +} + +module.exports = SingleEntryPlugin; + + +/***/ }), + +/***/ 12496: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + +const SizeFormatHelpers = exports; + +SizeFormatHelpers.formatSize = size => { + if (typeof size !== "number" || Number.isNaN(size) === true) { + return "unknown size"; + } + + if (size <= 0) { + return "0 bytes"; + } + + const abbreviations = ["bytes", "KiB", "MiB", "GiB"]; + const index = Math.floor(Math.log(size) / Math.log(1024)); + + return `${+(size / Math.pow(1024, index)).toPrecision(3)} ${ + abbreviations[index] + }`; +}; + + +/***/ }), + +/***/ 24113: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ModuleFilenameHelpers = __webpack_require__(71474); + +class SourceMapDevToolModuleOptionsPlugin { + constructor(options) { + this.options = options; + } + + apply(compilation) { + const options = this.options; + if (options.module !== false) { + compilation.hooks.buildModule.tap( + "SourceMapDevToolModuleOptionsPlugin", + module => { + module.useSourceMap = true; + } + ); + } + if (options.lineToLine === true) { + compilation.hooks.buildModule.tap( + "SourceMapDevToolModuleOptionsPlugin", + module => { + module.lineToLine = true; + } + ); + } else if (options.lineToLine) { + compilation.hooks.buildModule.tap( + "SourceMapDevToolModuleOptionsPlugin", + module => { + if (!module.resource) return; + let resourcePath = module.resource; + const idx = resourcePath.indexOf("?"); + if (idx >= 0) resourcePath = resourcePath.substr(0, idx); + module.lineToLine = ModuleFilenameHelpers.matchObject( + options.lineToLine, + resourcePath + ); + } + ); + } + } +} + +module.exports = SourceMapDevToolModuleOptionsPlugin; + + +/***/ }), + +/***/ 11851: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); +const { ConcatSource, RawSource } = __webpack_require__(53665); +const ModuleFilenameHelpers = __webpack_require__(71474); +const SourceMapDevToolModuleOptionsPlugin = __webpack_require__(24113); +const createHash = __webpack_require__(15660); +const { absolutify } = __webpack_require__(94658); + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(7368); + +/** @typedef {import("../declarations/plugins/SourceMapDevToolPlugin").SourceMapDevToolPluginOptions} SourceMapDevToolPluginOptions */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("source-map").RawSourceMap} SourceMap */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Compilation")} SourceMapDefinition */ + +/** + * @typedef {object} SourceMapTask + * @property {Source} asset + * @property {Array} [modules] + * @property {string} source + * @property {string} file + * @property {SourceMap} sourceMap + * @property {Chunk} chunk + */ + +/** + * @param {string} name file path + * @returns {string} file name + */ +const basename = name => { + if (!name.includes("/")) return name; + return name.substr(name.lastIndexOf("/") + 1); +}; + +/** + * @type {WeakMap} + */ +const assetsCache = new WeakMap(); + +/** + * Creating {@link SourceMapTask} for given file + * @param {string} file current compiled file + * @param {Source} asset the asset + * @param {Chunk} chunk related chunk + * @param {SourceMapDevToolPluginOptions} options source map options + * @param {Compilation} compilation compilation instance + * @returns {SourceMapTask | undefined} created task instance or `undefined` + */ +const getTaskForFile = (file, asset, chunk, options, compilation) => { + let source, sourceMap; + /** + * Check if asset can build source map + */ + if (asset.sourceAndMap) { + const sourceAndMap = asset.sourceAndMap(options); + sourceMap = sourceAndMap.map; + source = sourceAndMap.source; + } else { + sourceMap = asset.map(options); + source = asset.source(); + } + if (!sourceMap || typeof source !== "string") return; + const context = compilation.options.context; + const modules = sourceMap.sources.map(source => { + if (source.startsWith("webpack://")) { + source = absolutify(context, source.slice(10)); + } + const module = compilation.findModule(source); + return module || source; + }); + + return { + chunk, + file, + asset, + source, + sourceMap, + modules + }; +}; + +class SourceMapDevToolPlugin { + /** + * @param {SourceMapDevToolPluginOptions} [options] options object + * @throws {Error} throws error, if got more than 1 arguments + */ + constructor(options) { + if (arguments.length > 1) { + throw new Error( + "SourceMapDevToolPlugin only takes one argument (pass an options object)" + ); + } + + if (!options) options = {}; + + validateOptions(schema, options, "SourceMap DevTool Plugin"); + + /** @type {string | false} */ + this.sourceMapFilename = options.filename; + /** @type {string | false} */ + this.sourceMappingURLComment = + options.append === false + ? false + : options.append || "\n//# sourceMappingURL=[url]"; + /** @type {string | Function} */ + this.moduleFilenameTemplate = + options.moduleFilenameTemplate || "webpack://[namespace]/[resourcePath]"; + /** @type {string | Function} */ + this.fallbackModuleFilenameTemplate = + options.fallbackModuleFilenameTemplate || + "webpack://[namespace]/[resourcePath]?[hash]"; + /** @type {string} */ + this.namespace = options.namespace || ""; + /** @type {SourceMapDevToolPluginOptions} */ + this.options = options; + } + + /** + * Apply compiler + * @param {Compiler} compiler compiler instance + * @returns {void} + */ + apply(compiler) { + const sourceMapFilename = this.sourceMapFilename; + const sourceMappingURLComment = this.sourceMappingURLComment; + const moduleFilenameTemplate = this.moduleFilenameTemplate; + const namespace = this.namespace; + const fallbackModuleFilenameTemplate = this.fallbackModuleFilenameTemplate; + const requestShortener = compiler.requestShortener; + const options = this.options; + options.test = options.test || /\.(m?js|css)($|\?)/i; + + const matchObject = ModuleFilenameHelpers.matchObject.bind( + undefined, + options + ); + + compiler.hooks.compilation.tap("SourceMapDevToolPlugin", compilation => { + new SourceMapDevToolModuleOptionsPlugin(options).apply(compilation); + + compilation.hooks.afterOptimizeChunkAssets.tap( + /** @type {TODO} */ + ({ name: "SourceMapDevToolPlugin", context: true }), + /** + * @param {object} context hook context + * @param {Array} chunks resulted chunks + * @throws {Error} throws error, if `sourceMapFilename === false && sourceMappingURLComment === false` + * @returns {void} + */ + (context, chunks) => { + /** @type {Map} */ + const moduleToSourceNameMapping = new Map(); + /** + * @type {Function} + * @returns {void} + */ + const reportProgress = + context && context.reportProgress + ? context.reportProgress + : () => {}; + + const files = []; + for (const chunk of chunks) { + for (const file of chunk.files) { + if (matchObject(file)) { + files.push({ + file, + chunk + }); + } + } + } + + reportProgress(0.0); + const tasks = []; + files.forEach(({ file, chunk }, idx) => { + const asset = compilation.getAsset(file).source; + const cache = assetsCache.get(asset); + /** + * If presented in cache, reassigns assets. Cache assets already have source maps. + */ + if (cache && cache.file === file) { + for (const cachedFile in cache.assets) { + if (cachedFile === file) { + compilation.updateAsset(cachedFile, cache.assets[cachedFile]); + } else { + compilation.emitAsset(cachedFile, cache.assets[cachedFile], { + development: true + }); + } + /** + * Add file to chunk, if not presented there + */ + if (cachedFile !== file) chunk.files.push(cachedFile); + } + return; + } + + reportProgress( + (0.5 * idx) / files.length, + file, + "generate SourceMap" + ); + /** @type {SourceMapTask | undefined} */ + const task = getTaskForFile( + file, + asset, + chunk, + options, + compilation + ); + + if (task) { + const modules = task.modules; + + for (let idx = 0; idx < modules.length; idx++) { + const module = modules[idx]; + if (!moduleToSourceNameMapping.get(module)) { + moduleToSourceNameMapping.set( + module, + ModuleFilenameHelpers.createFilename( + module, + { + moduleFilenameTemplate: moduleFilenameTemplate, + namespace: namespace + }, + requestShortener + ) + ); + } + } + + tasks.push(task); + } + }); + + reportProgress(0.5, "resolve sources"); + /** @type {Set} */ + const usedNamesSet = new Set(moduleToSourceNameMapping.values()); + /** @type {Set} */ + const conflictDetectionSet = new Set(); + + /** + * all modules in defined order (longest identifier first) + * @type {Array} + */ + const allModules = Array.from(moduleToSourceNameMapping.keys()).sort( + (a, b) => { + const ai = typeof a === "string" ? a : a.identifier(); + const bi = typeof b === "string" ? b : b.identifier(); + return ai.length - bi.length; + } + ); + + // find modules with conflicting source names + for (let idx = 0; idx < allModules.length; idx++) { + const module = allModules[idx]; + let sourceName = moduleToSourceNameMapping.get(module); + let hasName = conflictDetectionSet.has(sourceName); + if (!hasName) { + conflictDetectionSet.add(sourceName); + continue; + } + + // try the fallback name first + sourceName = ModuleFilenameHelpers.createFilename( + module, + { + moduleFilenameTemplate: fallbackModuleFilenameTemplate, + namespace: namespace + }, + requestShortener + ); + hasName = usedNamesSet.has(sourceName); + if (!hasName) { + moduleToSourceNameMapping.set(module, sourceName); + usedNamesSet.add(sourceName); + continue; + } + + // elsewise just append stars until we have a valid name + while (hasName) { + sourceName += "*"; + hasName = usedNamesSet.has(sourceName); + } + moduleToSourceNameMapping.set(module, sourceName); + usedNamesSet.add(sourceName); + } + tasks.forEach((task, index) => { + reportProgress( + 0.5 + (0.5 * index) / tasks.length, + task.file, + "attach SourceMap" + ); + const assets = Object.create(null); + const chunk = task.chunk; + const file = task.file; + const asset = task.asset; + const sourceMap = task.sourceMap; + const source = task.source; + const modules = task.modules; + const moduleFilenames = modules.map(m => + moduleToSourceNameMapping.get(m) + ); + sourceMap.sources = moduleFilenames; + if (options.noSources) { + sourceMap.sourcesContent = undefined; + } + sourceMap.sourceRoot = options.sourceRoot || ""; + sourceMap.file = file; + assetsCache.set(asset, { file, assets }); + /** @type {string | false} */ + let currentSourceMappingURLComment = sourceMappingURLComment; + if ( + currentSourceMappingURLComment !== false && + /\.css($|\?)/i.test(file) + ) { + currentSourceMappingURLComment = currentSourceMappingURLComment.replace( + /^\n\/\/(.*)$/, + "\n/*$1*/" + ); + } + const sourceMapString = JSON.stringify(sourceMap); + if (sourceMapFilename) { + let filename = file; + let query = ""; + const idx = filename.indexOf("?"); + if (idx >= 0) { + query = filename.substr(idx); + filename = filename.substr(0, idx); + } + const pathParams = { + chunk, + filename: options.fileContext + ? path.relative(options.fileContext, filename) + : filename, + query, + basename: basename(filename), + contentHash: createHash("md4") + .update(sourceMapString) + .digest("hex") + }; + let sourceMapFile = compilation.getPath( + sourceMapFilename, + pathParams + ); + const sourceMapUrl = options.publicPath + ? options.publicPath + sourceMapFile.replace(/\\/g, "/") + : path + .relative(path.dirname(file), sourceMapFile) + .replace(/\\/g, "/"); + /** + * Add source map url to compilation asset, if {@link currentSourceMappingURLComment} presented + */ + if (currentSourceMappingURLComment !== false) { + const asset = new ConcatSource( + new RawSource(source), + compilation.getPath( + currentSourceMappingURLComment, + Object.assign({ url: sourceMapUrl }, pathParams) + ) + ); + assets[file] = asset; + compilation.updateAsset(file, asset); + } + /** + * Add source map file to compilation assets and chunk files + */ + const asset = new RawSource(sourceMapString); + assets[sourceMapFile] = asset; + compilation.emitAsset(sourceMapFile, asset, { + development: true + }); + chunk.files.push(sourceMapFile); + } else { + if (currentSourceMappingURLComment === false) { + throw new Error( + "SourceMapDevToolPlugin: append can't be false when no filename is provided" + ); + } + /** + * Add source map as data url to asset + */ + const asset = new ConcatSource( + new RawSource(source), + currentSourceMappingURLComment + .replace(/\[map\]/g, () => sourceMapString) + .replace( + /\[url\]/g, + () => + `data:application/json;charset=utf-8;base64,${Buffer.from( + sourceMapString, + "utf-8" + ).toString("base64")}` + ) + ); + assets[file] = asset; + compilation.updateAsset(file, asset); + } + }); + reportProgress(1.0); + } + ); + }); + } +} + +module.exports = SourceMapDevToolPlugin; + + +/***/ }), + +/***/ 99977: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const RequestShortener = __webpack_require__(54254); +const SizeFormatHelpers = __webpack_require__(12496); +const formatLocation = __webpack_require__(49); +const identifierUtils = __webpack_require__(94658); +const compareLocations = __webpack_require__(22562); +const { LogType } = __webpack_require__(47194); + +const optionsOrFallback = (...args) => { + let optionValues = []; + optionValues.push(...args); + return optionValues.find(optionValue => optionValue !== undefined); +}; + +const compareId = (a, b) => { + if (typeof a !== typeof b) { + return typeof a < typeof b ? -1 : 1; + } + if (a < b) return -1; + if (a > b) return 1; + return 0; +}; + +class Stats { + constructor(compilation) { + this.compilation = compilation; + this.hash = compilation.hash; + this.startTime = undefined; + this.endTime = undefined; + } + + static filterWarnings(warnings, warningsFilter) { + // we dont have anything to filter so all warnings can be shown + if (!warningsFilter) { + return warnings; + } + + // create a chain of filters + // if they return "true" a warning should be suppressed + const normalizedWarningsFilters = [].concat(warningsFilter).map(filter => { + if (typeof filter === "string") { + return warning => warning.includes(filter); + } + + if (filter instanceof RegExp) { + return warning => filter.test(warning); + } + + if (typeof filter === "function") { + return filter; + } + + throw new Error( + `Can only filter warnings with Strings or RegExps. (Given: ${filter})` + ); + }); + return warnings.filter(warning => { + return !normalizedWarningsFilters.some(check => check(warning)); + }); + } + + formatFilePath(filePath) { + const OPTIONS_REGEXP = /^(\s|\S)*!/; + return filePath.includes("!") + ? `${filePath.replace(OPTIONS_REGEXP, "")} (${filePath})` + : `${filePath}`; + } + + hasWarnings() { + return ( + this.compilation.warnings.length > 0 || + this.compilation.children.some(child => child.getStats().hasWarnings()) + ); + } + + hasErrors() { + return ( + this.compilation.errors.length > 0 || + this.compilation.children.some(child => child.getStats().hasErrors()) + ); + } + + // remove a prefixed "!" that can be specified to reverse sort order + normalizeFieldKey(field) { + if (field[0] === "!") { + return field.substr(1); + } + return field; + } + + // if a field is prefixed by a "!" reverse sort order + sortOrderRegular(field) { + if (field[0] === "!") { + return false; + } + return true; + } + + toJson(options, forToString) { + if (typeof options === "boolean" || typeof options === "string") { + options = Stats.presetToOptions(options); + } else if (!options) { + options = {}; + } + + const optionOrLocalFallback = (v, def) => + v !== undefined ? v : options.all !== undefined ? options.all : def; + + const testAgainstGivenOption = item => { + if (typeof item === "string") { + const regExp = new RegExp( + `[\\\\/]${item.replace( + // eslint-disable-next-line no-useless-escape + /[-[\]{}()*+?.\\^$|]/g, + "\\$&" + )}([\\\\/]|$|!|\\?)` + ); + return ident => regExp.test(ident); + } + if (item && typeof item === "object" && typeof item.test === "function") { + return ident => item.test(ident); + } + if (typeof item === "function") { + return item; + } + if (typeof item === "boolean") { + return () => item; + } + }; + + const compilation = this.compilation; + const context = optionsOrFallback( + options.context, + compilation.compiler.context + ); + const requestShortener = + compilation.compiler.context === context + ? compilation.requestShortener + : new RequestShortener(context); + const showPerformance = optionOrLocalFallback(options.performance, true); + const showHash = optionOrLocalFallback(options.hash, true); + const showEnv = optionOrLocalFallback(options.env, false); + const showVersion = optionOrLocalFallback(options.version, true); + const showTimings = optionOrLocalFallback(options.timings, true); + const showBuiltAt = optionOrLocalFallback(options.builtAt, true); + const showAssets = optionOrLocalFallback(options.assets, true); + const showEntrypoints = optionOrLocalFallback(options.entrypoints, true); + const showChunkGroups = optionOrLocalFallback( + options.chunkGroups, + !forToString + ); + const showChunks = optionOrLocalFallback(options.chunks, !forToString); + const showChunkModules = optionOrLocalFallback(options.chunkModules, true); + const showChunkOrigins = optionOrLocalFallback( + options.chunkOrigins, + !forToString + ); + const showModules = optionOrLocalFallback(options.modules, true); + const showNestedModules = optionOrLocalFallback( + options.nestedModules, + true + ); + const showModuleAssets = optionOrLocalFallback( + options.moduleAssets, + !forToString + ); + const showDepth = optionOrLocalFallback(options.depth, !forToString); + const showCachedModules = optionOrLocalFallback(options.cached, true); + const showCachedAssets = optionOrLocalFallback(options.cachedAssets, true); + const showReasons = optionOrLocalFallback(options.reasons, !forToString); + const showUsedExports = optionOrLocalFallback( + options.usedExports, + !forToString + ); + const showProvidedExports = optionOrLocalFallback( + options.providedExports, + !forToString + ); + const showOptimizationBailout = optionOrLocalFallback( + options.optimizationBailout, + !forToString + ); + const showChildren = optionOrLocalFallback(options.children, true); + const showSource = optionOrLocalFallback(options.source, !forToString); + const showModuleTrace = optionOrLocalFallback(options.moduleTrace, true); + const showErrors = optionOrLocalFallback(options.errors, true); + const showErrorDetails = optionOrLocalFallback( + options.errorDetails, + !forToString + ); + const showWarnings = optionOrLocalFallback(options.warnings, true); + const warningsFilter = optionsOrFallback(options.warningsFilter, null); + const showPublicPath = optionOrLocalFallback( + options.publicPath, + !forToString + ); + const showLogging = optionOrLocalFallback( + options.logging, + forToString ? "info" : true + ); + const showLoggingTrace = optionOrLocalFallback( + options.loggingTrace, + !forToString + ); + const loggingDebug = [] + .concat(optionsOrFallback(options.loggingDebug, [])) + .map(testAgainstGivenOption); + + const excludeModules = [] + .concat(optionsOrFallback(options.excludeModules, options.exclude, [])) + .map(testAgainstGivenOption); + const excludeAssets = [] + .concat(optionsOrFallback(options.excludeAssets, [])) + .map(testAgainstGivenOption); + const maxModules = optionsOrFallback( + options.maxModules, + forToString ? 15 : Infinity + ); + const sortModules = optionsOrFallback(options.modulesSort, "id"); + const sortChunks = optionsOrFallback(options.chunksSort, "id"); + const sortAssets = optionsOrFallback(options.assetsSort, ""); + const showOutputPath = optionOrLocalFallback( + options.outputPath, + !forToString + ); + + if (!showCachedModules) { + excludeModules.push((ident, module) => !module.built); + } + + const createModuleFilter = () => { + let i = 0; + return module => { + if (excludeModules.length > 0) { + const ident = requestShortener.shorten(module.resource); + const excluded = excludeModules.some(fn => fn(ident, module)); + if (excluded) return false; + } + const result = i < maxModules; + i++; + return result; + }; + }; + + const createAssetFilter = () => { + return asset => { + if (excludeAssets.length > 0) { + const ident = asset.name; + const excluded = excludeAssets.some(fn => fn(ident, asset)); + if (excluded) return false; + } + return showCachedAssets || asset.emitted; + }; + }; + + const sortByFieldAndOrder = (fieldKey, a, b) => { + if (a[fieldKey] === null && b[fieldKey] === null) return 0; + if (a[fieldKey] === null) return 1; + if (b[fieldKey] === null) return -1; + if (a[fieldKey] === b[fieldKey]) return 0; + if (typeof a[fieldKey] !== typeof b[fieldKey]) + return typeof a[fieldKey] < typeof b[fieldKey] ? -1 : 1; + return a[fieldKey] < b[fieldKey] ? -1 : 1; + }; + + const sortByField = (field, originalArray) => { + const originalMap = originalArray.reduce((map, v, i) => { + map.set(v, i); + return map; + }, new Map()); + return (a, b) => { + if (field) { + const fieldKey = this.normalizeFieldKey(field); + + // if a field is prefixed with a "!" the sort is reversed! + const sortIsRegular = this.sortOrderRegular(field); + + const cmp = sortByFieldAndOrder( + fieldKey, + sortIsRegular ? a : b, + sortIsRegular ? b : a + ); + if (cmp) return cmp; + } + return originalMap.get(a) - originalMap.get(b); + }; + }; + + const formatError = e => { + let text = ""; + if (typeof e === "string") { + e = { message: e }; + } + if (e.chunk) { + text += `chunk ${e.chunk.name || e.chunk.id}${ + e.chunk.hasRuntime() + ? " [entry]" + : e.chunk.canBeInitial() + ? " [initial]" + : "" + }\n`; + } + if (e.file) { + text += `${e.file}\n`; + } + if ( + e.module && + e.module.readableIdentifier && + typeof e.module.readableIdentifier === "function" + ) { + text += this.formatFilePath( + e.module.readableIdentifier(requestShortener) + ); + if (typeof e.loc === "object") { + const locInfo = formatLocation(e.loc); + if (locInfo) text += ` ${locInfo}`; + } + text += "\n"; + } + text += e.message; + if (showErrorDetails && e.details) { + text += `\n${e.details}`; + } + if (showErrorDetails && e.missing) { + text += e.missing.map(item => `\n[${item}]`).join(""); + } + if (showModuleTrace && e.origin) { + text += `\n @ ${this.formatFilePath( + e.origin.readableIdentifier(requestShortener) + )}`; + if (typeof e.originLoc === "object") { + const locInfo = formatLocation(e.originLoc); + if (locInfo) text += ` ${locInfo}`; + } + if (e.dependencies) { + for (const dep of e.dependencies) { + if (!dep.loc) continue; + if (typeof dep.loc === "string") continue; + const locInfo = formatLocation(dep.loc); + if (!locInfo) continue; + text += ` ${locInfo}`; + } + } + let current = e.origin; + while (current.issuer) { + current = current.issuer; + text += `\n @ ${current.readableIdentifier(requestShortener)}`; + } + } + return text; + }; + + const obj = { + errors: compilation.errors.map(formatError), + warnings: Stats.filterWarnings( + compilation.warnings.map(formatError), + warningsFilter + ) + }; + + //We just hint other renderers since actually omitting + //errors/warnings from the JSON would be kind of weird. + Object.defineProperty(obj, "_showWarnings", { + value: showWarnings, + enumerable: false + }); + Object.defineProperty(obj, "_showErrors", { + value: showErrors, + enumerable: false + }); + + if (showVersion) { + obj.version = __webpack_require__(71618)/* .version */ .i8; + } + + if (showHash) obj.hash = this.hash; + if (showTimings && this.startTime && this.endTime) { + obj.time = this.endTime - this.startTime; + } + + if (showBuiltAt && this.endTime) { + obj.builtAt = this.endTime; + } + + if (showEnv && options._env) { + obj.env = options._env; + } + + if (compilation.needAdditionalPass) { + obj.needAdditionalPass = true; + } + if (showPublicPath) { + obj.publicPath = this.compilation.mainTemplate.getPublicPath({ + hash: this.compilation.hash + }); + } + if (showOutputPath) { + obj.outputPath = this.compilation.mainTemplate.outputOptions.path; + } + if (showAssets) { + const assetsByFile = {}; + const compilationAssets = compilation + .getAssets() + .sort((a, b) => (a.name < b.name ? -1 : 1)); + obj.assetsByChunkName = {}; + obj.assets = compilationAssets + .map(({ name, source, info }) => { + const obj = { + name, + size: source.size(), + chunks: [], + chunkNames: [], + info, + // TODO webpack 5: remove .emitted + emitted: source.emitted || compilation.emittedAssets.has(name) + }; + + if (showPerformance) { + obj.isOverSizeLimit = source.isOverSizeLimit; + } + + assetsByFile[name] = obj; + return obj; + }) + .filter(createAssetFilter()); + obj.filteredAssets = compilationAssets.length - obj.assets.length; + + for (const chunk of compilation.chunks) { + for (const asset of chunk.files) { + if (assetsByFile[asset]) { + for (const id of chunk.ids) { + assetsByFile[asset].chunks.push(id); + } + if (chunk.name) { + assetsByFile[asset].chunkNames.push(chunk.name); + if (obj.assetsByChunkName[chunk.name]) { + obj.assetsByChunkName[chunk.name] = [] + .concat(obj.assetsByChunkName[chunk.name]) + .concat([asset]); + } else { + obj.assetsByChunkName[chunk.name] = asset; + } + } + } + } + } + obj.assets.sort(sortByField(sortAssets, obj.assets)); + } + + const fnChunkGroup = groupMap => { + const obj = {}; + for (const keyValuePair of groupMap) { + const name = keyValuePair[0]; + const cg = keyValuePair[1]; + const children = cg.getChildrenByOrders(); + obj[name] = { + chunks: cg.chunks.map(c => c.id), + assets: cg.chunks.reduce( + (array, c) => array.concat(c.files || []), + [] + ), + children: Object.keys(children).reduce((obj, key) => { + const groups = children[key]; + obj[key] = groups.map(group => ({ + name: group.name, + chunks: group.chunks.map(c => c.id), + assets: group.chunks.reduce( + (array, c) => array.concat(c.files || []), + [] + ) + })); + return obj; + }, Object.create(null)), + childAssets: Object.keys(children).reduce((obj, key) => { + const groups = children[key]; + obj[key] = Array.from( + groups.reduce((set, group) => { + for (const chunk of group.chunks) { + for (const asset of chunk.files) { + set.add(asset); + } + } + return set; + }, new Set()) + ); + return obj; + }, Object.create(null)) + }; + if (showPerformance) { + obj[name].isOverSizeLimit = cg.isOverSizeLimit; + } + } + + return obj; + }; + + if (showEntrypoints) { + obj.entrypoints = fnChunkGroup(compilation.entrypoints); + } + + if (showChunkGroups) { + obj.namedChunkGroups = fnChunkGroup(compilation.namedChunkGroups); + } + + const fnModule = module => { + const path = []; + let current = module; + while (current.issuer) { + path.push((current = current.issuer)); + } + path.reverse(); + const obj = { + id: module.id, + identifier: module.identifier(), + name: module.readableIdentifier(requestShortener), + index: module.index, + index2: module.index2, + size: module.size(), + cacheable: module.buildInfo.cacheable, + built: !!module.built, + optional: module.optional, + prefetched: module.prefetched, + chunks: Array.from(module.chunksIterable, chunk => chunk.id), + issuer: module.issuer && module.issuer.identifier(), + issuerId: module.issuer && module.issuer.id, + issuerName: + module.issuer && module.issuer.readableIdentifier(requestShortener), + issuerPath: + module.issuer && + path.map(module => ({ + id: module.id, + identifier: module.identifier(), + name: module.readableIdentifier(requestShortener), + profile: module.profile + })), + profile: module.profile, + failed: !!module.error, + errors: module.errors ? module.errors.length : 0, + warnings: module.warnings ? module.warnings.length : 0 + }; + if (showModuleAssets) { + obj.assets = Object.keys(module.buildInfo.assets || {}); + } + if (showReasons) { + obj.reasons = module.reasons + .sort((a, b) => { + if (a.module && !b.module) return -1; + if (!a.module && b.module) return 1; + if (a.module && b.module) { + const cmp = compareId(a.module.id, b.module.id); + if (cmp) return cmp; + } + if (a.dependency && !b.dependency) return -1; + if (!a.dependency && b.dependency) return 1; + if (a.dependency && b.dependency) { + const cmp = compareLocations(a.dependency.loc, b.dependency.loc); + if (cmp) return cmp; + if (a.dependency.type < b.dependency.type) return -1; + if (a.dependency.type > b.dependency.type) return 1; + } + return 0; + }) + .map(reason => { + const obj = { + moduleId: reason.module ? reason.module.id : null, + moduleIdentifier: reason.module + ? reason.module.identifier() + : null, + module: reason.module + ? reason.module.readableIdentifier(requestShortener) + : null, + moduleName: reason.module + ? reason.module.readableIdentifier(requestShortener) + : null, + type: reason.dependency ? reason.dependency.type : null, + explanation: reason.explanation, + userRequest: reason.dependency + ? reason.dependency.userRequest + : null + }; + if (reason.dependency) { + const locInfo = formatLocation(reason.dependency.loc); + if (locInfo) { + obj.loc = locInfo; + } + } + return obj; + }); + } + if (showUsedExports) { + if (module.used === true) { + obj.usedExports = module.usedExports; + } else if (module.used === false) { + obj.usedExports = false; + } + } + if (showProvidedExports) { + obj.providedExports = Array.isArray(module.buildMeta.providedExports) + ? module.buildMeta.providedExports + : null; + } + if (showOptimizationBailout) { + obj.optimizationBailout = module.optimizationBailout.map(item => { + if (typeof item === "function") return item(requestShortener); + return item; + }); + } + if (showDepth) { + obj.depth = module.depth; + } + if (showNestedModules) { + if (module.modules) { + const modules = module.modules; + obj.modules = modules + .sort(sortByField("depth", modules)) + .filter(createModuleFilter()) + .map(fnModule); + obj.filteredModules = modules.length - obj.modules.length; + obj.modules.sort(sortByField(sortModules, obj.modules)); + } + } + if (showSource && module._source) { + obj.source = module._source.source(); + } + return obj; + }; + if (showChunks) { + obj.chunks = compilation.chunks.map(chunk => { + const parents = new Set(); + const children = new Set(); + const siblings = new Set(); + const childIdByOrder = chunk.getChildIdsByOrders(); + for (const chunkGroup of chunk.groupsIterable) { + for (const parentGroup of chunkGroup.parentsIterable) { + for (const chunk of parentGroup.chunks) { + parents.add(chunk.id); + } + } + for (const childGroup of chunkGroup.childrenIterable) { + for (const chunk of childGroup.chunks) { + children.add(chunk.id); + } + } + for (const sibling of chunkGroup.chunks) { + if (sibling !== chunk) siblings.add(sibling.id); + } + } + const obj = { + id: chunk.id, + rendered: chunk.rendered, + initial: chunk.canBeInitial(), + entry: chunk.hasRuntime(), + recorded: chunk.recorded, + reason: chunk.chunkReason, + size: chunk.modulesSize(), + names: chunk.name ? [chunk.name] : [], + files: chunk.files.slice(), + hash: chunk.renderedHash, + siblings: Array.from(siblings).sort(compareId), + parents: Array.from(parents).sort(compareId), + children: Array.from(children).sort(compareId), + childrenByOrder: childIdByOrder + }; + if (showChunkModules) { + const modules = chunk.getModules(); + obj.modules = modules + .slice() + .sort(sortByField("depth", modules)) + .filter(createModuleFilter()) + .map(fnModule); + obj.filteredModules = chunk.getNumberOfModules() - obj.modules.length; + obj.modules.sort(sortByField(sortModules, obj.modules)); + } + if (showChunkOrigins) { + obj.origins = Array.from(chunk.groupsIterable, g => g.origins) + .reduce((a, b) => a.concat(b), []) + .map(origin => ({ + moduleId: origin.module ? origin.module.id : undefined, + module: origin.module ? origin.module.identifier() : "", + moduleIdentifier: origin.module ? origin.module.identifier() : "", + moduleName: origin.module + ? origin.module.readableIdentifier(requestShortener) + : "", + loc: formatLocation(origin.loc), + request: origin.request, + reasons: origin.reasons || [] + })) + .sort((a, b) => { + const cmp1 = compareId(a.moduleId, b.moduleId); + if (cmp1) return cmp1; + const cmp2 = compareId(a.loc, b.loc); + if (cmp2) return cmp2; + const cmp3 = compareId(a.request, b.request); + if (cmp3) return cmp3; + return 0; + }); + } + return obj; + }); + obj.chunks.sort(sortByField(sortChunks, obj.chunks)); + } + if (showModules) { + obj.modules = compilation.modules + .slice() + .sort(sortByField("depth", compilation.modules)) + .filter(createModuleFilter()) + .map(fnModule); + obj.filteredModules = compilation.modules.length - obj.modules.length; + obj.modules.sort(sortByField(sortModules, obj.modules)); + } + if (showLogging) { + const util = __webpack_require__(31669); + obj.logging = {}; + let acceptedTypes; + let collapsedGroups = false; + switch (showLogging) { + case "none": + acceptedTypes = new Set([]); + break; + case "error": + acceptedTypes = new Set([LogType.error]); + break; + case "warn": + acceptedTypes = new Set([LogType.error, LogType.warn]); + break; + case "info": + acceptedTypes = new Set([LogType.error, LogType.warn, LogType.info]); + break; + case true: + case "log": + acceptedTypes = new Set([ + LogType.error, + LogType.warn, + LogType.info, + LogType.log, + LogType.group, + LogType.groupEnd, + LogType.groupCollapsed, + LogType.clear + ]); + break; + case "verbose": + acceptedTypes = new Set([ + LogType.error, + LogType.warn, + LogType.info, + LogType.log, + LogType.group, + LogType.groupEnd, + LogType.groupCollapsed, + LogType.profile, + LogType.profileEnd, + LogType.time, + LogType.status, + LogType.clear + ]); + collapsedGroups = true; + break; + } + for (const [origin, logEntries] of compilation.logging) { + const debugMode = loggingDebug.some(fn => fn(origin)); + let collapseCounter = 0; + let processedLogEntries = logEntries; + if (!debugMode) { + processedLogEntries = processedLogEntries.filter(entry => { + if (!acceptedTypes.has(entry.type)) return false; + if (!collapsedGroups) { + switch (entry.type) { + case LogType.groupCollapsed: + collapseCounter++; + return collapseCounter === 1; + case LogType.group: + if (collapseCounter > 0) collapseCounter++; + return collapseCounter === 0; + case LogType.groupEnd: + if (collapseCounter > 0) { + collapseCounter--; + return false; + } + return true; + default: + return collapseCounter === 0; + } + } + return true; + }); + } + processedLogEntries = processedLogEntries.map(entry => { + let message = undefined; + if (entry.type === LogType.time) { + message = `${entry.args[0]}: ${entry.args[1] * 1000 + + entry.args[2] / 1000000}ms`; + } else if (entry.args && entry.args.length > 0) { + message = util.format(entry.args[0], ...entry.args.slice(1)); + } + return { + type: + (debugMode || collapsedGroups) && + entry.type === LogType.groupCollapsed + ? LogType.group + : entry.type, + message, + trace: showLoggingTrace && entry.trace ? entry.trace : undefined + }; + }); + let name = identifierUtils + .makePathsRelative(context, origin, compilation.cache) + .replace(/\|/g, " "); + if (name in obj.logging) { + let i = 1; + while (`${name}#${i}` in obj.logging) { + i++; + } + name = `${name}#${i}`; + } + obj.logging[name] = { + entries: processedLogEntries, + filteredEntries: logEntries.length - processedLogEntries.length, + debug: debugMode + }; + } + } + if (showChildren) { + obj.children = compilation.children.map((child, idx) => { + const childOptions = Stats.getChildOptions(options, idx); + const obj = new Stats(child).toJson(childOptions, forToString); + delete obj.hash; + delete obj.version; + if (child.name) { + obj.name = identifierUtils.makePathsRelative( + context, + child.name, + compilation.cache + ); + } + return obj; + }); + } + + return obj; + } + + toString(options) { + if (typeof options === "boolean" || typeof options === "string") { + options = Stats.presetToOptions(options); + } else if (!options) { + options = {}; + } + + const useColors = optionsOrFallback(options.colors, false); + + const obj = this.toJson(options, true); + + return Stats.jsonToString(obj, useColors); + } + + static jsonToString(obj, useColors) { + const buf = []; + + const defaultColors = { + bold: "\u001b[1m", + yellow: "\u001b[1m\u001b[33m", + red: "\u001b[1m\u001b[31m", + green: "\u001b[1m\u001b[32m", + cyan: "\u001b[1m\u001b[36m", + magenta: "\u001b[1m\u001b[35m" + }; + + const colors = Object.keys(defaultColors).reduce( + (obj, color) => { + obj[color] = str => { + if (useColors) { + buf.push( + useColors === true || useColors[color] === undefined + ? defaultColors[color] + : useColors[color] + ); + } + buf.push(str); + if (useColors) { + buf.push("\u001b[39m\u001b[22m"); + } + }; + return obj; + }, + { + normal: str => buf.push(str) + } + ); + + const coloredTime = time => { + let times = [800, 400, 200, 100]; + if (obj.time) { + times = [obj.time / 2, obj.time / 4, obj.time / 8, obj.time / 16]; + } + if (time < times[3]) colors.normal(`${time}ms`); + else if (time < times[2]) colors.bold(`${time}ms`); + else if (time < times[1]) colors.green(`${time}ms`); + else if (time < times[0]) colors.yellow(`${time}ms`); + else colors.red(`${time}ms`); + }; + + const newline = () => buf.push("\n"); + + const getText = (arr, row, col) => { + return arr[row][col].value; + }; + + const table = (array, align, splitter) => { + const rows = array.length; + const cols = array[0].length; + const colSizes = new Array(cols); + for (let col = 0; col < cols; col++) { + colSizes[col] = 0; + } + for (let row = 0; row < rows; row++) { + for (let col = 0; col < cols; col++) { + const value = `${getText(array, row, col)}`; + if (value.length > colSizes[col]) { + colSizes[col] = value.length; + } + } + } + for (let row = 0; row < rows; row++) { + for (let col = 0; col < cols; col++) { + const format = array[row][col].color; + const value = `${getText(array, row, col)}`; + let l = value.length; + if (align[col] === "l") { + format(value); + } + for (; l < colSizes[col] && col !== cols - 1; l++) { + colors.normal(" "); + } + if (align[col] === "r") { + format(value); + } + if (col + 1 < cols && colSizes[col] !== 0) { + colors.normal(splitter || " "); + } + } + newline(); + } + }; + + const getAssetColor = (asset, defaultColor) => { + if (asset.isOverSizeLimit) { + return colors.yellow; + } + + return defaultColor; + }; + + if (obj.hash) { + colors.normal("Hash: "); + colors.bold(obj.hash); + newline(); + } + if (obj.version) { + colors.normal("Version: webpack "); + colors.bold(obj.version); + newline(); + } + if (typeof obj.time === "number") { + colors.normal("Time: "); + colors.bold(obj.time); + colors.normal("ms"); + newline(); + } + if (typeof obj.builtAt === "number") { + const builtAtDate = new Date(obj.builtAt); + let timeZone = undefined; + + try { + builtAtDate.toLocaleTimeString(); + } catch (err) { + // Force UTC if runtime timezone is unsupported + timeZone = "UTC"; + } + + colors.normal("Built at: "); + colors.normal( + builtAtDate.toLocaleDateString(undefined, { + day: "2-digit", + month: "2-digit", + year: "numeric", + timeZone + }) + ); + colors.normal(" "); + colors.bold(builtAtDate.toLocaleTimeString(undefined, { timeZone })); + newline(); + } + if (obj.env) { + colors.normal("Environment (--env): "); + colors.bold(JSON.stringify(obj.env, null, 2)); + newline(); + } + if (obj.publicPath) { + colors.normal("PublicPath: "); + colors.bold(obj.publicPath); + newline(); + } + + if (obj.assets && obj.assets.length > 0) { + const t = [ + [ + { + value: "Asset", + color: colors.bold + }, + { + value: "Size", + color: colors.bold + }, + { + value: "Chunks", + color: colors.bold + }, + { + value: "", + color: colors.bold + }, + { + value: "", + color: colors.bold + }, + { + value: "Chunk Names", + color: colors.bold + } + ] + ]; + for (const asset of obj.assets) { + t.push([ + { + value: asset.name, + color: getAssetColor(asset, colors.green) + }, + { + value: SizeFormatHelpers.formatSize(asset.size), + color: getAssetColor(asset, colors.normal) + }, + { + value: asset.chunks.join(", "), + color: colors.bold + }, + { + value: [ + asset.emitted && "[emitted]", + asset.info.immutable && "[immutable]", + asset.info.development && "[dev]", + asset.info.hotModuleReplacement && "[hmr]" + ] + .filter(Boolean) + .join(" "), + color: colors.green + }, + { + value: asset.isOverSizeLimit ? "[big]" : "", + color: getAssetColor(asset, colors.normal) + }, + { + value: asset.chunkNames.join(", "), + color: colors.normal + } + ]); + } + table(t, "rrrlll"); + } + if (obj.filteredAssets > 0) { + colors.normal(" "); + if (obj.assets.length > 0) colors.normal("+ "); + colors.normal(obj.filteredAssets); + if (obj.assets.length > 0) colors.normal(" hidden"); + colors.normal(obj.filteredAssets !== 1 ? " assets" : " asset"); + newline(); + } + + const processChunkGroups = (namedGroups, prefix) => { + for (const name of Object.keys(namedGroups)) { + const cg = namedGroups[name]; + colors.normal(`${prefix} `); + colors.bold(name); + if (cg.isOverSizeLimit) { + colors.normal(" "); + colors.yellow("[big]"); + } + colors.normal(" ="); + for (const asset of cg.assets) { + colors.normal(" "); + colors.green(asset); + } + for (const name of Object.keys(cg.childAssets)) { + const assets = cg.childAssets[name]; + if (assets && assets.length > 0) { + colors.normal(" "); + colors.magenta(`(${name}:`); + for (const asset of assets) { + colors.normal(" "); + colors.green(asset); + } + colors.magenta(")"); + } + } + newline(); + } + }; + + if (obj.entrypoints) { + processChunkGroups(obj.entrypoints, "Entrypoint"); + } + + if (obj.namedChunkGroups) { + let outputChunkGroups = obj.namedChunkGroups; + if (obj.entrypoints) { + outputChunkGroups = Object.keys(outputChunkGroups) + .filter(name => !obj.entrypoints[name]) + .reduce((result, name) => { + result[name] = obj.namedChunkGroups[name]; + return result; + }, {}); + } + processChunkGroups(outputChunkGroups, "Chunk Group"); + } + + const modulesByIdentifier = {}; + if (obj.modules) { + for (const module of obj.modules) { + modulesByIdentifier[`$${module.identifier}`] = module; + } + } else if (obj.chunks) { + for (const chunk of obj.chunks) { + if (chunk.modules) { + for (const module of chunk.modules) { + modulesByIdentifier[`$${module.identifier}`] = module; + } + } + } + } + + const processModuleAttributes = module => { + colors.normal(" "); + colors.normal(SizeFormatHelpers.formatSize(module.size)); + if (module.chunks) { + for (const chunk of module.chunks) { + colors.normal(" {"); + colors.yellow(chunk); + colors.normal("}"); + } + } + if (typeof module.depth === "number") { + colors.normal(` [depth ${module.depth}]`); + } + if (module.cacheable === false) { + colors.red(" [not cacheable]"); + } + if (module.optional) { + colors.yellow(" [optional]"); + } + if (module.built) { + colors.green(" [built]"); + } + if (module.assets && module.assets.length) { + colors.magenta( + ` [${module.assets.length} asset${ + module.assets.length === 1 ? "" : "s" + }]` + ); + } + if (module.prefetched) { + colors.magenta(" [prefetched]"); + } + if (module.failed) colors.red(" [failed]"); + if (module.warnings) { + colors.yellow( + ` [${module.warnings} warning${module.warnings === 1 ? "" : "s"}]` + ); + } + if (module.errors) { + colors.red( + ` [${module.errors} error${module.errors === 1 ? "" : "s"}]` + ); + } + }; + + const processModuleContent = (module, prefix) => { + if (Array.isArray(module.providedExports)) { + colors.normal(prefix); + if (module.providedExports.length === 0) { + colors.cyan("[no exports]"); + } else { + colors.cyan(`[exports: ${module.providedExports.join(", ")}]`); + } + newline(); + } + if (module.usedExports !== undefined) { + if (module.usedExports !== true) { + colors.normal(prefix); + if (module.usedExports === null) { + colors.cyan("[used exports unknown]"); + } else if (module.usedExports === false) { + colors.cyan("[no exports used]"); + } else if ( + Array.isArray(module.usedExports) && + module.usedExports.length === 0 + ) { + colors.cyan("[no exports used]"); + } else if (Array.isArray(module.usedExports)) { + const providedExportsCount = Array.isArray(module.providedExports) + ? module.providedExports.length + : null; + if ( + providedExportsCount !== null && + providedExportsCount === module.usedExports.length + ) { + colors.cyan("[all exports used]"); + } else { + colors.cyan( + `[only some exports used: ${module.usedExports.join(", ")}]` + ); + } + } + newline(); + } + } + if (Array.isArray(module.optimizationBailout)) { + for (const item of module.optimizationBailout) { + colors.normal(prefix); + colors.yellow(item); + newline(); + } + } + if (module.reasons) { + for (const reason of module.reasons) { + colors.normal(prefix); + if (reason.type) { + colors.normal(reason.type); + colors.normal(" "); + } + if (reason.userRequest) { + colors.cyan(reason.userRequest); + colors.normal(" "); + } + if (reason.moduleId !== null) { + colors.normal("["); + colors.normal(reason.moduleId); + colors.normal("]"); + } + if (reason.module && reason.module !== reason.moduleId) { + colors.normal(" "); + colors.magenta(reason.module); + } + if (reason.loc) { + colors.normal(" "); + colors.normal(reason.loc); + } + if (reason.explanation) { + colors.normal(" "); + colors.cyan(reason.explanation); + } + newline(); + } + } + if (module.profile) { + colors.normal(prefix); + let sum = 0; + if (module.issuerPath) { + for (const m of module.issuerPath) { + colors.normal("["); + colors.normal(m.id); + colors.normal("] "); + if (m.profile) { + const time = (m.profile.factory || 0) + (m.profile.building || 0); + coloredTime(time); + sum += time; + colors.normal(" "); + } + colors.normal("-> "); + } + } + for (const key of Object.keys(module.profile)) { + colors.normal(`${key}:`); + const time = module.profile[key]; + coloredTime(time); + colors.normal(" "); + sum += time; + } + colors.normal("= "); + coloredTime(sum); + newline(); + } + if (module.modules) { + processModulesList(module, prefix + "| "); + } + }; + + const processModulesList = (obj, prefix) => { + if (obj.modules) { + let maxModuleId = 0; + for (const module of obj.modules) { + if (typeof module.id === "number") { + if (maxModuleId < module.id) maxModuleId = module.id; + } + } + let contentPrefix = prefix + " "; + if (maxModuleId >= 10) contentPrefix += " "; + if (maxModuleId >= 100) contentPrefix += " "; + if (maxModuleId >= 1000) contentPrefix += " "; + for (const module of obj.modules) { + colors.normal(prefix); + const name = module.name || module.identifier; + if (typeof module.id === "string" || typeof module.id === "number") { + if (typeof module.id === "number") { + if (module.id < 1000 && maxModuleId >= 1000) colors.normal(" "); + if (module.id < 100 && maxModuleId >= 100) colors.normal(" "); + if (module.id < 10 && maxModuleId >= 10) colors.normal(" "); + } else { + if (maxModuleId >= 1000) colors.normal(" "); + if (maxModuleId >= 100) colors.normal(" "); + if (maxModuleId >= 10) colors.normal(" "); + } + if (name !== module.id) { + colors.normal("["); + colors.normal(module.id); + colors.normal("]"); + colors.normal(" "); + } else { + colors.normal("["); + colors.bold(module.id); + colors.normal("]"); + } + } + if (name !== module.id) { + colors.bold(name); + } + processModuleAttributes(module); + newline(); + processModuleContent(module, contentPrefix); + } + if (obj.filteredModules > 0) { + colors.normal(prefix); + colors.normal(" "); + if (obj.modules.length > 0) colors.normal(" + "); + colors.normal(obj.filteredModules); + if (obj.modules.length > 0) colors.normal(" hidden"); + colors.normal(obj.filteredModules !== 1 ? " modules" : " module"); + newline(); + } + } + }; + + if (obj.chunks) { + for (const chunk of obj.chunks) { + colors.normal("chunk "); + if (chunk.id < 1000) colors.normal(" "); + if (chunk.id < 100) colors.normal(" "); + if (chunk.id < 10) colors.normal(" "); + colors.normal("{"); + colors.yellow(chunk.id); + colors.normal("} "); + colors.green(chunk.files.join(", ")); + if (chunk.names && chunk.names.length > 0) { + colors.normal(" ("); + colors.normal(chunk.names.join(", ")); + colors.normal(")"); + } + colors.normal(" "); + colors.normal(SizeFormatHelpers.formatSize(chunk.size)); + for (const id of chunk.parents) { + colors.normal(" <{"); + colors.yellow(id); + colors.normal("}>"); + } + for (const id of chunk.siblings) { + colors.normal(" ={"); + colors.yellow(id); + colors.normal("}="); + } + for (const id of chunk.children) { + colors.normal(" >{"); + colors.yellow(id); + colors.normal("}<"); + } + if (chunk.childrenByOrder) { + for (const name of Object.keys(chunk.childrenByOrder)) { + const children = chunk.childrenByOrder[name]; + colors.normal(" "); + colors.magenta(`(${name}:`); + for (const id of children) { + colors.normal(" {"); + colors.yellow(id); + colors.normal("}"); + } + colors.magenta(")"); + } + } + if (chunk.entry) { + colors.yellow(" [entry]"); + } else if (chunk.initial) { + colors.yellow(" [initial]"); + } + if (chunk.rendered) { + colors.green(" [rendered]"); + } + if (chunk.recorded) { + colors.green(" [recorded]"); + } + if (chunk.reason) { + colors.yellow(` ${chunk.reason}`); + } + newline(); + if (chunk.origins) { + for (const origin of chunk.origins) { + colors.normal(" > "); + if (origin.reasons && origin.reasons.length) { + colors.yellow(origin.reasons.join(" ")); + colors.normal(" "); + } + if (origin.request) { + colors.normal(origin.request); + colors.normal(" "); + } + if (origin.module) { + colors.normal("["); + colors.normal(origin.moduleId); + colors.normal("] "); + const module = modulesByIdentifier[`$${origin.module}`]; + if (module) { + colors.bold(module.name); + colors.normal(" "); + } + } + if (origin.loc) { + colors.normal(origin.loc); + } + newline(); + } + } + processModulesList(chunk, " "); + } + } + + processModulesList(obj, ""); + + if (obj.logging) { + for (const origin of Object.keys(obj.logging)) { + const logData = obj.logging[origin]; + if (logData.entries.length > 0) { + newline(); + if (logData.debug) { + colors.red("DEBUG "); + } + colors.bold("LOG from " + origin); + newline(); + let indent = ""; + for (const entry of logData.entries) { + let color = colors.normal; + let prefix = " "; + switch (entry.type) { + case LogType.clear: + colors.normal(`${indent}-------`); + newline(); + continue; + case LogType.error: + color = colors.red; + prefix = " "; + break; + case LogType.warn: + color = colors.yellow; + prefix = " "; + break; + case LogType.info: + color = colors.green; + prefix = " "; + break; + case LogType.log: + color = colors.bold; + break; + case LogType.trace: + case LogType.debug: + color = colors.normal; + break; + case LogType.status: + color = colors.magenta; + prefix = " "; + break; + case LogType.profile: + color = colors.magenta; + prefix = "

"; + break; + case LogType.profileEnd: + color = colors.magenta; + prefix = "

"; + break; + case LogType.time: + color = colors.magenta; + prefix = " "; + break; + case LogType.group: + color = colors.cyan; + prefix = "<-> "; + break; + case LogType.groupCollapsed: + color = colors.cyan; + prefix = "<+> "; + break; + case LogType.groupEnd: + if (indent.length >= 2) + indent = indent.slice(0, indent.length - 2); + continue; + } + if (entry.message) { + for (const line of entry.message.split("\n")) { + colors.normal(`${indent}${prefix}`); + color(line); + newline(); + } + } + if (entry.trace) { + for (const line of entry.trace) { + colors.normal(`${indent}| ${line}`); + newline(); + } + } + switch (entry.type) { + case LogType.group: + indent += " "; + break; + } + } + if (logData.filteredEntries) { + colors.normal(`+ ${logData.filteredEntries} hidden lines`); + newline(); + } + } + } + } + + if (obj._showWarnings && obj.warnings) { + for (const warning of obj.warnings) { + newline(); + colors.yellow(`WARNING in ${warning}`); + newline(); + } + } + if (obj._showErrors && obj.errors) { + for (const error of obj.errors) { + newline(); + colors.red(`ERROR in ${error}`); + newline(); + } + } + if (obj.children) { + for (const child of obj.children) { + const childString = Stats.jsonToString(child, useColors); + if (childString) { + if (child.name) { + colors.normal("Child "); + colors.bold(child.name); + colors.normal(":"); + } else { + colors.normal("Child"); + } + newline(); + buf.push(" "); + buf.push(childString.replace(/\n/g, "\n ")); + newline(); + } + } + } + if (obj.needAdditionalPass) { + colors.yellow( + "Compilation needs an additional pass and will compile again." + ); + } + + while (buf[buf.length - 1] === "\n") { + buf.pop(); + } + return buf.join(""); + } + + static presetToOptions(name) { + // Accepted values: none, errors-only, minimal, normal, detailed, verbose + // Any other falsy value will behave as 'none', truthy values as 'normal' + const pn = + (typeof name === "string" && name.toLowerCase()) || name || "none"; + switch (pn) { + case "none": + return { + all: false + }; + case "verbose": + return { + entrypoints: true, + chunkGroups: true, + modules: false, + chunks: true, + chunkModules: true, + chunkOrigins: true, + depth: true, + env: true, + reasons: true, + usedExports: true, + providedExports: true, + optimizationBailout: true, + errorDetails: true, + publicPath: true, + logging: "verbose", + exclude: false, + maxModules: Infinity + }; + case "detailed": + return { + entrypoints: true, + chunkGroups: true, + chunks: true, + chunkModules: false, + chunkOrigins: true, + depth: true, + usedExports: true, + providedExports: true, + optimizationBailout: true, + errorDetails: true, + publicPath: true, + logging: true, + exclude: false, + maxModules: Infinity + }; + case "minimal": + return { + all: false, + modules: true, + maxModules: 0, + errors: true, + warnings: true, + logging: "warn" + }; + case "errors-only": + return { + all: false, + errors: true, + moduleTrace: true, + logging: "error" + }; + case "errors-warnings": + return { + all: false, + errors: true, + warnings: true, + logging: "warn" + }; + default: + return {}; + } + } + + static getChildOptions(options, idx) { + let innerOptions; + if (Array.isArray(options.children)) { + if (idx < options.children.length) { + innerOptions = options.children[idx]; + } + } else if (typeof options.children === "object" && options.children) { + innerOptions = options.children; + } + if (typeof innerOptions === "boolean" || typeof innerOptions === "string") { + innerOptions = Stats.presetToOptions(innerOptions); + } + if (!innerOptions) { + return options; + } + const childOptions = Object.assign({}, options); + delete childOptions.children; // do not inherit children + return Object.assign(childOptions, innerOptions); + } +} + +module.exports = Stats; + + +/***/ }), + +/***/ 97365: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Joel Denning @joeldenning + */ + + + +const { ConcatSource } = __webpack_require__(53665); +const Template = __webpack_require__(96066); + +/** @typedef {import("./Compilation")} Compilation */ + +/** + * @typedef {Object} SystemMainTemplatePluginOptions + * @param {string=} name the library name + */ + +class SystemMainTemplatePlugin { + /** + * @param {SystemMainTemplatePluginOptions} options the plugin options + */ + constructor(options) { + this.name = options.name; + } + + /** + * @param {Compilation} compilation the compilation instance + * @returns {void} + */ + apply(compilation) { + const { mainTemplate, chunkTemplate } = compilation; + + const onRenderWithEntry = (source, chunk, hash) => { + const externals = chunk.getModules().filter(m => m.external); + + // The name this bundle should be registered as with System + const name = this.name + ? `${JSON.stringify( + mainTemplate.getAssetPath(this.name, { hash, chunk }) + )}, ` + : ""; + + // The array of dependencies that are external to webpack and will be provided by System + const systemDependencies = JSON.stringify( + externals.map(m => + typeof m.request === "object" ? m.request.amd : m.request + ) + ); + + // The name of the variable provided by System for exporting + const dynamicExport = "__WEBPACK_DYNAMIC_EXPORT__"; + + // An array of the internal variable names for the webpack externals + const externalWebpackNames = externals.map( + m => `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier(`${m.id}`)}__` + ); + + // Declaring variables for the internal variable names for the webpack externals + const externalVarDeclarations = + externalWebpackNames.length > 0 + ? `var ${externalWebpackNames.join(", ")};` + : ""; + + // The system.register format requires an array of setter functions for externals. + const setters = + externalWebpackNames.length === 0 + ? "" + : Template.asString([ + "setters: [", + Template.indent( + externalWebpackNames + .map(external => + Template.asString([ + "function(module) {", + Template.indent(`${external} = module;`), + "}" + ]) + ) + .join(",\n") + ), + "]," + ]); + + return new ConcatSource( + Template.asString([ + `System.register(${name}${systemDependencies}, function(${dynamicExport}) {`, + Template.indent([ + externalVarDeclarations, + "return {", + Template.indent([ + setters, + "execute: function() {", + Template.indent(`${dynamicExport}(`) + ]) + ]) + ]) + "\n", + source, + "\n" + + Template.asString([ + Template.indent([ + Template.indent([Template.indent([");"]), "}"]), + "};" + ]), + "})" + ]) + ); + }; + + for (const template of [mainTemplate, chunkTemplate]) { + template.hooks.renderWithEntry.tap( + "SystemMainTemplatePlugin", + onRenderWithEntry + ); + } + + mainTemplate.hooks.globalHashPaths.tap( + "SystemMainTemplatePlugin", + paths => { + if (this.name) { + paths.push(this.name); + } + return paths; + } + ); + + mainTemplate.hooks.hash.tap("SystemMainTemplatePlugin", hash => { + hash.update("exports system"); + if (this.name) { + hash.update(this.name); + } + }); + } +} + +module.exports = SystemMainTemplatePlugin; + + +/***/ }), + +/***/ 96066: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ModuleTemplate")} ModuleTemplate */ +/** @typedef {import("webpack-sources").ConcatSource} ConcatSource */ + +const { ConcatSource } = __webpack_require__(53665); +const HotUpdateChunk = __webpack_require__(26782); + +const START_LOWERCASE_ALPHABET_CODE = "a".charCodeAt(0); +const START_UPPERCASE_ALPHABET_CODE = "A".charCodeAt(0); +const DELTA_A_TO_Z = "z".charCodeAt(0) - START_LOWERCASE_ALPHABET_CODE + 1; +const FUNCTION_CONTENT_REGEX = /^function\s?\(\)\s?\{\r?\n?|\r?\n?\}$/g; +const INDENT_MULTILINE_REGEX = /^\t/gm; +const LINE_SEPARATOR_REGEX = /\r?\n/g; +const IDENTIFIER_NAME_REPLACE_REGEX = /^([^a-zA-Z$_])/; +const IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX = /[^a-zA-Z0-9$]+/g; +const COMMENT_END_REGEX = /\*\//g; +const PATH_NAME_NORMALIZE_REPLACE_REGEX = /[^a-zA-Z0-9_!§$()=\-^°]+/g; +const MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g; + +/** @typedef {import("webpack-sources").Source} Source */ + +/** + * @typedef {Object} HasId + * @property {number | string} id + */ + +/** + * @typedef {function(Module, number): boolean} ModuleFilterPredicate + */ + +/** + * @param {HasId} a first id object to be sorted + * @param {HasId} b second id object to be sorted against + * @returns {-1|0|1} the sort value + */ +const stringifyIdSortPredicate = (a, b) => { + const aId = a.id + ""; + const bId = b.id + ""; + if (aId < bId) return -1; + if (aId > bId) return 1; + return 0; +}; + +class Template { + /** + * + * @param {Function} fn a runtime function (.runtime.js) "template" + * @returns {string} the updated and normalized function string + */ + static getFunctionContent(fn) { + return fn + .toString() + .replace(FUNCTION_CONTENT_REGEX, "") + .replace(INDENT_MULTILINE_REGEX, "") + .replace(LINE_SEPARATOR_REGEX, "\n"); + } + + /** + * @param {string} str the string converted to identifier + * @returns {string} created identifier + */ + static toIdentifier(str) { + if (typeof str !== "string") return ""; + return str + .replace(IDENTIFIER_NAME_REPLACE_REGEX, "_$1") + .replace(IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX, "_"); + } + /** + * + * @param {string} str string to be converted to commented in bundle code + * @returns {string} returns a commented version of string + */ + static toComment(str) { + if (!str) return ""; + return `/*! ${str.replace(COMMENT_END_REGEX, "* /")} */`; + } + + /** + * + * @param {string} str string to be converted to "normal comment" + * @returns {string} returns a commented version of string + */ + static toNormalComment(str) { + if (!str) return ""; + return `/* ${str.replace(COMMENT_END_REGEX, "* /")} */`; + } + + /** + * @param {string} str string path to be normalized + * @returns {string} normalized bundle-safe path + */ + static toPath(str) { + if (typeof str !== "string") return ""; + return str + .replace(PATH_NAME_NORMALIZE_REPLACE_REGEX, "-") + .replace(MATCH_PADDED_HYPHENS_REPLACE_REGEX, ""); + } + + // map number to a single character a-z, A-Z or <_ + number> if number is too big + /** + * + * @param {number} n number to convert to ident + * @returns {string} returns single character ident + */ + static numberToIdentifer(n) { + // lower case + if (n < DELTA_A_TO_Z) { + return String.fromCharCode(START_LOWERCASE_ALPHABET_CODE + n); + } + + // upper case + if (n < DELTA_A_TO_Z * 2) { + return String.fromCharCode( + START_UPPERCASE_ALPHABET_CODE + n - DELTA_A_TO_Z + ); + } + + // use multiple letters + return ( + Template.numberToIdentifer(n % (2 * DELTA_A_TO_Z)) + + Template.numberToIdentifer(Math.floor(n / (2 * DELTA_A_TO_Z))) + ); + } + + /** + * + * @param {string | string[]} s string to convert to identity + * @returns {string} converted identity + */ + static indent(s) { + if (Array.isArray(s)) { + return s.map(Template.indent).join("\n"); + } else { + const str = s.trimRight(); + if (!str) return ""; + const ind = str[0] === "\n" ? "" : "\t"; + return ind + str.replace(/\n([^\n])/g, "\n\t$1"); + } + } + + /** + * + * @param {string|string[]} s string to create prefix for + * @param {string} prefix prefix to compose + * @returns {string} returns new prefix string + */ + static prefix(s, prefix) { + const str = Template.asString(s).trim(); + if (!str) return ""; + const ind = str[0] === "\n" ? "" : prefix; + return ind + str.replace(/\n([^\n])/g, "\n" + prefix + "$1"); + } + + /** + * + * @param {string|string[]} str string or string collection + * @returns {string} returns a single string from array + */ + static asString(str) { + if (Array.isArray(str)) { + return str.join("\n"); + } + return str; + } + + /** + * @typedef {Object} WithId + * @property {string|number} id + */ + + /** + * @param {WithId[]} modules a collection of modules to get array bounds for + * @returns {[number, number] | false} returns the upper and lower array bounds + * or false if not every module has a number based id + */ + static getModulesArrayBounds(modules) { + let maxId = -Infinity; + let minId = Infinity; + for (const module of modules) { + if (typeof module.id !== "number") return false; + if (maxId < module.id) maxId = /** @type {number} */ (module.id); + if (minId > module.id) minId = /** @type {number} */ (module.id); + } + if (minId < 16 + ("" + minId).length) { + // add minId x ',' instead of 'Array(minId).concat(…)' + minId = 0; + } + const objectOverhead = modules + .map(module => (module.id + "").length + 2) + .reduce((a, b) => a + b, -1); + const arrayOverhead = + minId === 0 ? maxId : 16 + ("" + minId).length + maxId; + return arrayOverhead < objectOverhead ? [minId, maxId] : false; + } + + /** + * @param {Chunk} chunk chunk whose modules will be rendered + * @param {ModuleFilterPredicate} filterFn function used to filter modules from chunk to render + * @param {ModuleTemplate} moduleTemplate ModuleTemplate instance used to render modules + * @param {TODO | TODO[]} dependencyTemplates templates needed for each module to render dependencies + * @param {string=} prefix applying prefix strings + * @returns {ConcatSource} rendered chunk modules in a Source object + */ + static renderChunkModules( + chunk, + filterFn, + moduleTemplate, + dependencyTemplates, + prefix = "" + ) { + const source = new ConcatSource(); + const modules = chunk.getModules().filter(filterFn); + let removedModules; + if (chunk instanceof HotUpdateChunk) { + removedModules = chunk.removedModules; + } + if ( + modules.length === 0 && + (!removedModules || removedModules.length === 0) + ) { + source.add("[]"); + return source; + } + /** @type {{id: string|number, source: Source|string}[]} */ + const allModules = modules.map(module => { + return { + id: module.id, + source: moduleTemplate.render(module, dependencyTemplates, { + chunk + }) + }; + }); + if (removedModules && removedModules.length > 0) { + for (const id of removedModules) { + allModules.push({ + id, + source: "false" + }); + } + } + const bounds = Template.getModulesArrayBounds(allModules); + if (bounds) { + // Render a spare array + const minId = bounds[0]; + const maxId = bounds[1]; + if (minId !== 0) { + source.add(`Array(${minId}).concat(`); + } + source.add("[\n"); + /** @type {Map} */ + const modules = new Map(); + for (const module of allModules) { + modules.set(module.id, module); + } + for (let idx = minId; idx <= maxId; idx++) { + const module = modules.get(idx); + if (idx !== minId) { + source.add(",\n"); + } + source.add(`/* ${idx} */`); + if (module) { + source.add("\n"); + source.add(module.source); + } + } + source.add("\n" + prefix + "]"); + if (minId !== 0) { + source.add(")"); + } + } else { + // Render an object + source.add("{\n"); + allModules.sort(stringifyIdSortPredicate).forEach((module, idx) => { + if (idx !== 0) { + source.add(",\n"); + } + source.add(`\n/***/ ${JSON.stringify(module.id)}:\n`); + source.add(module.source); + }); + source.add(`\n\n${prefix}}`); + } + return source; + } +} + +module.exports = Template; + + +/***/ }), + +/***/ 76032: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Jason Anderson @diurnalist +*/ + + +const REGEXP_HASH = /\[hash(?::(\d+))?\]/gi, + REGEXP_CHUNKHASH = /\[chunkhash(?::(\d+))?\]/gi, + REGEXP_MODULEHASH = /\[modulehash(?::(\d+))?\]/gi, + REGEXP_CONTENTHASH = /\[contenthash(?::(\d+))?\]/gi, + REGEXP_NAME = /\[name\]/gi, + REGEXP_ID = /\[id\]/gi, + REGEXP_MODULEID = /\[moduleid\]/gi, + REGEXP_FILE = /\[file\]/gi, + REGEXP_QUERY = /\[query\]/gi, + REGEXP_FILEBASE = /\[filebase\]/gi, + REGEXP_URL = /\[url\]/gi; + +// Using global RegExp for .test is dangerous +// We use a normal RegExp instead of .test +const REGEXP_HASH_FOR_TEST = new RegExp(REGEXP_HASH.source, "i"), + REGEXP_CHUNKHASH_FOR_TEST = new RegExp(REGEXP_CHUNKHASH.source, "i"), + REGEXP_CONTENTHASH_FOR_TEST = new RegExp(REGEXP_CONTENTHASH.source, "i"), + REGEXP_NAME_FOR_TEST = new RegExp(REGEXP_NAME.source, "i"); + +const withHashLength = (replacer, handlerFn, assetInfo) => { + const fn = (match, hashLength, ...args) => { + if (assetInfo) assetInfo.immutable = true; + const length = hashLength && parseInt(hashLength, 10); + if (length && handlerFn) { + return handlerFn(length); + } + const hash = replacer(match, hashLength, ...args); + return length ? hash.slice(0, length) : hash; + }; + return fn; +}; + +const getReplacer = (value, allowEmpty) => { + const fn = (match, ...args) => { + // last argument in replacer is the entire input string + const input = args[args.length - 1]; + if (value === null || value === undefined) { + if (!allowEmpty) { + throw new Error( + `Path variable ${match} not implemented in this context: ${input}` + ); + } + return ""; + } else { + return `${escapePathVariables(value)}`; + } + }; + return fn; +}; + +const escapePathVariables = value => { + return typeof value === "string" + ? value.replace(/\[(\\*[\w:]+\\*)\]/gi, "[\\$1\\]") + : value; +}; + +const replacePathVariables = (path, data, assetInfo) => { + const chunk = data.chunk; + const chunkId = chunk && chunk.id; + const chunkName = chunk && (chunk.name || chunk.id); + const chunkHash = chunk && (chunk.renderedHash || chunk.hash); + const chunkHashWithLength = chunk && chunk.hashWithLength; + const contentHashType = data.contentHashType; + const contentHash = + (chunk && chunk.contentHash && chunk.contentHash[contentHashType]) || + data.contentHash; + const contentHashWithLength = + (chunk && + chunk.contentHashWithLength && + chunk.contentHashWithLength[contentHashType]) || + data.contentHashWithLength; + const module = data.module; + const moduleId = module && module.id; + const moduleHash = module && (module.renderedHash || module.hash); + const moduleHashWithLength = module && module.hashWithLength; + + if (typeof path === "function") { + path = path(data); + } + + if ( + data.noChunkHash && + (REGEXP_CHUNKHASH_FOR_TEST.test(path) || + REGEXP_CONTENTHASH_FOR_TEST.test(path)) + ) { + throw new Error( + `Cannot use [chunkhash] or [contenthash] for chunk in '${path}' (use [hash] instead)` + ); + } + + return ( + path + .replace( + REGEXP_HASH, + withHashLength(getReplacer(data.hash), data.hashWithLength, assetInfo) + ) + .replace( + REGEXP_CHUNKHASH, + withHashLength(getReplacer(chunkHash), chunkHashWithLength, assetInfo) + ) + .replace( + REGEXP_CONTENTHASH, + withHashLength( + getReplacer(contentHash), + contentHashWithLength, + assetInfo + ) + ) + .replace( + REGEXP_MODULEHASH, + withHashLength(getReplacer(moduleHash), moduleHashWithLength, assetInfo) + ) + .replace(REGEXP_ID, getReplacer(chunkId)) + .replace(REGEXP_MODULEID, getReplacer(moduleId)) + .replace(REGEXP_NAME, getReplacer(chunkName)) + .replace(REGEXP_FILE, getReplacer(data.filename)) + .replace(REGEXP_FILEBASE, getReplacer(data.basename)) + // query is optional, it's OK if it's in a path but there's nothing to replace it with + .replace(REGEXP_QUERY, getReplacer(data.query, true)) + // only available in sourceMappingURLComment + .replace(REGEXP_URL, getReplacer(data.url)) + .replace(/\[\\(\\*[\w:]+\\*)\\\]/gi, "[$1]") + ); +}; + +class TemplatedPathPlugin { + apply(compiler) { + compiler.hooks.compilation.tap("TemplatedPathPlugin", compilation => { + const mainTemplate = compilation.mainTemplate; + + mainTemplate.hooks.assetPath.tap( + "TemplatedPathPlugin", + replacePathVariables + ); + + mainTemplate.hooks.globalHash.tap( + "TemplatedPathPlugin", + (chunk, paths) => { + const outputOptions = mainTemplate.outputOptions; + const publicPath = outputOptions.publicPath || ""; + const filename = outputOptions.filename || ""; + const chunkFilename = + outputOptions.chunkFilename || outputOptions.filename; + if ( + REGEXP_HASH_FOR_TEST.test(publicPath) || + REGEXP_CHUNKHASH_FOR_TEST.test(publicPath) || + REGEXP_CONTENTHASH_FOR_TEST.test(publicPath) || + REGEXP_NAME_FOR_TEST.test(publicPath) + ) + return true; + if (REGEXP_HASH_FOR_TEST.test(filename)) return true; + if (REGEXP_HASH_FOR_TEST.test(chunkFilename)) return true; + if (REGEXP_HASH_FOR_TEST.test(paths.join("|"))) return true; + } + ); + + mainTemplate.hooks.hashForChunk.tap( + "TemplatedPathPlugin", + (hash, chunk) => { + const outputOptions = mainTemplate.outputOptions; + const chunkFilename = + outputOptions.chunkFilename || outputOptions.filename; + if (REGEXP_CHUNKHASH_FOR_TEST.test(chunkFilename)) { + hash.update(JSON.stringify(chunk.getChunkMaps(true).hash)); + } + if (REGEXP_CONTENTHASH_FOR_TEST.test(chunkFilename)) { + hash.update( + JSON.stringify( + chunk.getChunkMaps(true).contentHash.javascript || {} + ) + ); + } + if (REGEXP_NAME_FOR_TEST.test(chunkFilename)) { + hash.update(JSON.stringify(chunk.getChunkMaps(true).name)); + } + } + ); + }); + } +} + +module.exports = TemplatedPathPlugin; + + +/***/ }), + +/***/ 75374: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { ConcatSource, OriginalSource } = __webpack_require__(53665); +const Template = __webpack_require__(96066); + +/** @typedef {import("../declarations/WebpackOptions").LibraryCustomUmdObject} LibraryCustomUmdObject */ +/** @typedef {import("./Compilation")} Compilation */ + +/** + * @param {string[]} accessor the accessor to convert to path + * @returns {string} the path + */ +const accessorToObjectAccess = accessor => { + return accessor.map(a => `[${JSON.stringify(a)}]`).join(""); +}; + +/** + * @param {string=} base the path prefix + * @param {string|string[]} accessor the accessor + * @param {string=} joinWith the element separator + * @returns {string} the path + */ +const accessorAccess = (base, accessor, joinWith = ", ") => { + const accessors = Array.isArray(accessor) ? accessor : [accessor]; + return accessors + .map((_, idx) => { + const a = base + ? base + accessorToObjectAccess(accessors.slice(0, idx + 1)) + : accessors[0] + accessorToObjectAccess(accessors.slice(1, idx + 1)); + if (idx === accessors.length - 1) return a; + if (idx === 0 && base === undefined) + return `${a} = typeof ${a} === "object" ? ${a} : {}`; + return `${a} = ${a} || {}`; + }) + .join(joinWith); +}; + +/** @typedef {string | string[] | LibraryCustomUmdObject} UmdMainTemplatePluginName */ + +/** + * @typedef {Object} AuxiliaryCommentObject + * @property {string} root + * @property {string} commonjs + * @property {string} commonjs2 + * @property {string} amd + */ + +/** + * @typedef {Object} UmdMainTemplatePluginOption + * @property {boolean=} optionalAmdExternalAsGlobal + * @property {boolean} namedDefine + * @property {string | AuxiliaryCommentObject} auxiliaryComment + */ + +class UmdMainTemplatePlugin { + /** + * @param {UmdMainTemplatePluginName} name the name of the UMD library + * @param {UmdMainTemplatePluginOption} options the plugin option + */ + constructor(name, options) { + if (typeof name === "object" && !Array.isArray(name)) { + this.name = name.root || name.amd || name.commonjs; + this.names = name; + } else { + this.name = name; + this.names = { + commonjs: name, + root: name, + amd: name + }; + } + this.optionalAmdExternalAsGlobal = options.optionalAmdExternalAsGlobal; + this.namedDefine = options.namedDefine; + this.auxiliaryComment = options.auxiliaryComment; + } + + /** + * @param {Compilation} compilation the compilation instance + * @returns {void} + */ + apply(compilation) { + const { mainTemplate, chunkTemplate, runtimeTemplate } = compilation; + + const onRenderWithEntry = (source, chunk, hash) => { + let externals = chunk + .getModules() + .filter( + m => + m.external && + (m.externalType === "umd" || m.externalType === "umd2") + ); + const optionalExternals = []; + let requiredExternals = []; + if (this.optionalAmdExternalAsGlobal) { + for (const m of externals) { + if (m.optional) { + optionalExternals.push(m); + } else { + requiredExternals.push(m); + } + } + externals = requiredExternals.concat(optionalExternals); + } else { + requiredExternals = externals; + } + + const replaceKeys = str => { + return mainTemplate.getAssetPath(str, { + hash, + chunk + }); + }; + + const externalsDepsArray = modules => { + return `[${replaceKeys( + modules + .map(m => + JSON.stringify( + typeof m.request === "object" ? m.request.amd : m.request + ) + ) + .join(", ") + )}]`; + }; + + const externalsRootArray = modules => { + return replaceKeys( + modules + .map(m => { + let request = m.request; + if (typeof request === "object") request = request.root; + return `root${accessorToObjectAccess([].concat(request))}`; + }) + .join(", ") + ); + }; + + const externalsRequireArray = type => { + return replaceKeys( + externals + .map(m => { + let expr; + let request = m.request; + if (typeof request === "object") { + request = request[type]; + } + if (request === undefined) { + throw new Error( + "Missing external configuration for type:" + type + ); + } + if (Array.isArray(request)) { + expr = `require(${JSON.stringify( + request[0] + )})${accessorToObjectAccess(request.slice(1))}`; + } else { + expr = `require(${JSON.stringify(request)})`; + } + if (m.optional) { + expr = `(function webpackLoadOptionalExternalModule() { try { return ${expr}; } catch(e) {} }())`; + } + return expr; + }) + .join(", ") + ); + }; + + const externalsArguments = modules => { + return modules + .map( + m => + `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier(`${m.id}`)}__` + ) + .join(", "); + }; + + const libraryName = library => { + return JSON.stringify(replaceKeys([].concat(library).pop())); + }; + + let amdFactory; + if (optionalExternals.length > 0) { + const wrapperArguments = externalsArguments(requiredExternals); + const factoryArguments = + requiredExternals.length > 0 + ? externalsArguments(requiredExternals) + + ", " + + externalsRootArray(optionalExternals) + : externalsRootArray(optionalExternals); + amdFactory = + `function webpackLoadOptionalExternalModuleAmd(${wrapperArguments}) {\n` + + ` return factory(${factoryArguments});\n` + + " }"; + } else { + amdFactory = "factory"; + } + + const auxiliaryComment = this.auxiliaryComment; + + const getAuxilaryComment = type => { + if (auxiliaryComment) { + if (typeof auxiliaryComment === "string") + return "\t//" + auxiliaryComment + "\n"; + if (auxiliaryComment[type]) + return "\t//" + auxiliaryComment[type] + "\n"; + } + return ""; + }; + + return new ConcatSource( + new OriginalSource( + "(function webpackUniversalModuleDefinition(root, factory) {\n" + + getAuxilaryComment("commonjs2") + + " if(typeof exports === 'object' && typeof module === 'object')\n" + + " module.exports = factory(" + + externalsRequireArray("commonjs2") + + ");\n" + + getAuxilaryComment("amd") + + " else if(typeof define === 'function' && define.amd)\n" + + (requiredExternals.length > 0 + ? this.names.amd && this.namedDefine === true + ? " define(" + + libraryName(this.names.amd) + + ", " + + externalsDepsArray(requiredExternals) + + ", " + + amdFactory + + ");\n" + : " define(" + + externalsDepsArray(requiredExternals) + + ", " + + amdFactory + + ");\n" + : this.names.amd && this.namedDefine === true + ? " define(" + + libraryName(this.names.amd) + + ", [], " + + amdFactory + + ");\n" + : " define([], " + amdFactory + ");\n") + + (this.names.root || this.names.commonjs + ? getAuxilaryComment("commonjs") + + " else if(typeof exports === 'object')\n" + + " exports[" + + libraryName(this.names.commonjs || this.names.root) + + "] = factory(" + + externalsRequireArray("commonjs") + + ");\n" + + getAuxilaryComment("root") + + " else\n" + + " " + + replaceKeys( + accessorAccess("root", this.names.root || this.names.commonjs) + ) + + " = factory(" + + externalsRootArray(externals) + + ");\n" + : " else {\n" + + (externals.length > 0 + ? " var a = typeof exports === 'object' ? factory(" + + externalsRequireArray("commonjs") + + ") : factory(" + + externalsRootArray(externals) + + ");\n" + : " var a = factory();\n") + + " for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n" + + " }\n") + + `})(${ + runtimeTemplate.outputOptions.globalObject + }, function(${externalsArguments(externals)}) {\nreturn `, + "webpack/universalModuleDefinition" + ), + source, + ";\n})" + ); + }; + + for (const template of [mainTemplate, chunkTemplate]) { + template.hooks.renderWithEntry.tap( + "UmdMainTemplatePlugin", + onRenderWithEntry + ); + } + + mainTemplate.hooks.globalHashPaths.tap("UmdMainTemplatePlugin", paths => { + if (this.names.root) paths = paths.concat(this.names.root); + if (this.names.amd) paths = paths.concat(this.names.amd); + if (this.names.commonjs) paths = paths.concat(this.names.commonjs); + return paths; + }); + + mainTemplate.hooks.hash.tap("UmdMainTemplatePlugin", hash => { + hash.update("umd"); + hash.update(`${this.names.root}`); + hash.update(`${this.names.amd}`); + hash.update(`${this.names.commonjs}`); + }); + } +} + +module.exports = UmdMainTemplatePlugin; + + +/***/ }), + +/***/ 99953: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ + +class UnsupportedFeatureWarning extends WebpackError { + /** + * @param {Module} module module relevant to warning + * @param {string} message description of warning + * @param {DependencyLocation} loc location start and end positions of the module + */ + constructor(module, message, loc) { + super(message); + + this.name = "UnsupportedFeatureWarning"; + this.module = module; + this.loc = loc; + this.hideStack = true; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = UnsupportedFeatureWarning; + + +/***/ }), + +/***/ 73554: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ConstDependency = __webpack_require__(71101); + +/** @typedef {import("./Compiler")} Compiler */ + +class UseStrictPlugin { + /** + * @param {Compiler} compiler Webpack Compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "UseStrictPlugin", + (compilation, { normalModuleFactory }) => { + const handler = parser => { + parser.hooks.program.tap("UseStrictPlugin", ast => { + const firstNode = ast.body[0]; + if ( + firstNode && + firstNode.type === "ExpressionStatement" && + firstNode.expression.type === "Literal" && + firstNode.expression.value === "use strict" + ) { + // Remove "use strict" expression. It will be added later by the renderer again. + // This is necessary in order to not break the strict mode when webpack prepends code. + // @see https://github.com/webpack/webpack/issues/1970 + const dep = new ConstDependency("", firstNode.range); + dep.loc = firstNode.loc; + parser.state.current.addDependency(dep); + parser.state.module.buildInfo.strict = true; + } + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("UseStrictPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("UseStrictPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("UseStrictPlugin", handler); + } + ); + } +} + +module.exports = UseStrictPlugin; + + +/***/ }), + +/***/ 40269: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const CaseSensitiveModulesWarning = __webpack_require__(8335); + +class WarnCaseSensitiveModulesPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "WarnCaseSensitiveModulesPlugin", + compilation => { + compilation.hooks.seal.tap("WarnCaseSensitiveModulesPlugin", () => { + const moduleWithoutCase = new Map(); + for (const module of compilation.modules) { + const identifier = module.identifier().toLowerCase(); + const array = moduleWithoutCase.get(identifier); + if (array) { + array.push(module); + } else { + moduleWithoutCase.set(identifier, [module]); + } + } + for (const pair of moduleWithoutCase) { + const array = pair[1]; + if (array.length > 1) { + compilation.warnings.push(new CaseSensitiveModulesWarning(array)); + } + } + }); + } + ); + } +} + +module.exports = WarnCaseSensitiveModulesPlugin; + + +/***/ }), + +/***/ 71245: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const NoModeWarning = __webpack_require__(45759); + +class WarnNoModeSetPlugin { + apply(compiler) { + compiler.hooks.thisCompilation.tap("WarnNoModeSetPlugin", compilation => { + compilation.warnings.push(new NoModeWarning()); + }); + } +} + +module.exports = WarnNoModeSetPlugin; + + +/***/ }), + +/***/ 88015: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(97009); + +/** @typedef {import("../declarations/plugins/WatchIgnorePlugin").WatchIgnorePluginOptions} WatchIgnorePluginOptions */ + +class IgnoringWatchFileSystem { + constructor(wfs, paths) { + this.wfs = wfs; + this.paths = paths; + } + + watch(files, dirs, missing, startTime, options, callback, callbackUndelayed) { + const ignored = path => + this.paths.some(p => + p instanceof RegExp ? p.test(path) : path.indexOf(p) === 0 + ); + + const notIgnored = path => !ignored(path); + + const ignoredFiles = files.filter(ignored); + const ignoredDirs = dirs.filter(ignored); + + const watcher = this.wfs.watch( + files.filter(notIgnored), + dirs.filter(notIgnored), + missing, + startTime, + options, + ( + err, + filesModified, + dirsModified, + missingModified, + fileTimestamps, + dirTimestamps, + removedFiles + ) => { + if (err) return callback(err); + for (const path of ignoredFiles) { + fileTimestamps.set(path, 1); + } + + for (const path of ignoredDirs) { + dirTimestamps.set(path, 1); + } + + callback( + err, + filesModified, + dirsModified, + missingModified, + fileTimestamps, + dirTimestamps, + removedFiles + ); + }, + callbackUndelayed + ); + + return { + close: () => watcher.close(), + pause: () => watcher.pause(), + getContextTimestamps: () => { + const dirTimestamps = watcher.getContextTimestamps(); + for (const path of ignoredDirs) { + dirTimestamps.set(path, 1); + } + return dirTimestamps; + }, + getFileTimestamps: () => { + const fileTimestamps = watcher.getFileTimestamps(); + for (const path of ignoredFiles) { + fileTimestamps.set(path, 1); + } + return fileTimestamps; + } + }; + } +} + +class WatchIgnorePlugin { + /** + * @param {WatchIgnorePluginOptions} paths list of paths + */ + constructor(paths) { + validateOptions(schema, paths, "Watch Ignore Plugin"); + this.paths = paths; + } + + apply(compiler) { + compiler.hooks.afterEnvironment.tap("WatchIgnorePlugin", () => { + compiler.watchFileSystem = new IgnoringWatchFileSystem( + compiler.watchFileSystem, + this.paths + ); + }); + } +} + +module.exports = WatchIgnorePlugin; + + +/***/ }), + +/***/ 29580: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Stats = __webpack_require__(99977); + +class Watching { + constructor(compiler, watchOptions, handler) { + this.startTime = null; + this.invalid = false; + this.handler = handler; + this.callbacks = []; + this.closed = false; + this.suspended = false; + if (typeof watchOptions === "number") { + this.watchOptions = { + aggregateTimeout: watchOptions + }; + } else if (watchOptions && typeof watchOptions === "object") { + this.watchOptions = Object.assign({}, watchOptions); + } else { + this.watchOptions = {}; + } + this.watchOptions.aggregateTimeout = + this.watchOptions.aggregateTimeout || 200; + this.compiler = compiler; + this.running = true; + this.compiler.readRecords(err => { + if (err) return this._done(err); + + this._go(); + }); + } + + _go() { + this.startTime = Date.now(); + this.running = true; + this.invalid = false; + this.compiler.hooks.watchRun.callAsync(this.compiler, err => { + if (err) return this._done(err); + const onCompiled = (err, compilation) => { + if (err) return this._done(err); + if (this.invalid) return this._done(); + + if (this.compiler.hooks.shouldEmit.call(compilation) === false) { + return this._done(null, compilation); + } + + this.compiler.emitAssets(compilation, err => { + if (err) return this._done(err); + if (this.invalid) return this._done(); + this.compiler.emitRecords(err => { + if (err) return this._done(err); + + if (compilation.hooks.needAdditionalPass.call()) { + compilation.needAdditionalPass = true; + + const stats = new Stats(compilation); + stats.startTime = this.startTime; + stats.endTime = Date.now(); + this.compiler.hooks.done.callAsync(stats, err => { + if (err) return this._done(err); + + this.compiler.hooks.additionalPass.callAsync(err => { + if (err) return this._done(err); + this.compiler.compile(onCompiled); + }); + }); + return; + } + return this._done(null, compilation); + }); + }); + }; + this.compiler.compile(onCompiled); + }); + } + + _getStats(compilation) { + const stats = new Stats(compilation); + stats.startTime = this.startTime; + stats.endTime = Date.now(); + return stats; + } + + _done(err, compilation) { + this.running = false; + if (this.invalid) return this._go(); + + const stats = compilation ? this._getStats(compilation) : null; + if (err) { + this.compiler.hooks.failed.call(err); + this.handler(err, stats); + return; + } + this.compiler.hooks.done.callAsync(stats, () => { + this.handler(null, stats); + if (!this.closed) { + this.watch( + Array.from(compilation.fileDependencies), + Array.from(compilation.contextDependencies), + Array.from(compilation.missingDependencies) + ); + } + for (const cb of this.callbacks) cb(); + this.callbacks.length = 0; + }); + } + + watch(files, dirs, missing) { + this.pausedWatcher = null; + this.watcher = this.compiler.watchFileSystem.watch( + files, + dirs, + missing, + this.startTime, + this.watchOptions, + ( + err, + filesModified, + contextModified, + missingModified, + fileTimestamps, + contextTimestamps, + removedFiles + ) => { + this.pausedWatcher = this.watcher; + this.watcher = null; + if (err) { + return this.handler(err); + } + this.compiler.fileTimestamps = fileTimestamps; + this.compiler.contextTimestamps = contextTimestamps; + this.compiler.removedFiles = removedFiles; + if (!this.suspended) { + this._invalidate(); + } + }, + (fileName, changeTime) => { + this.compiler.hooks.invalid.call(fileName, changeTime); + } + ); + } + + invalidate(callback) { + if (callback) { + this.callbacks.push(callback); + } + if (this.watcher) { + this.compiler.fileTimestamps = this.watcher.getFileTimestamps(); + this.compiler.contextTimestamps = this.watcher.getContextTimestamps(); + } + return this._invalidate(); + } + + _invalidate() { + if (this.watcher) { + this.pausedWatcher = this.watcher; + this.watcher.pause(); + this.watcher = null; + } + + if (this.running) { + this.invalid = true; + return false; + } else { + this._go(); + } + } + + suspend() { + this.suspended = true; + this.invalid = false; + } + + resume() { + if (this.suspended) { + this.suspended = false; + this._invalidate(); + } + } + + close(callback) { + const finalCallback = () => { + this.compiler.hooks.watchClose.call(); + this.compiler.running = false; + this.compiler.watchMode = false; + if (callback !== undefined) callback(); + }; + + this.closed = true; + if (this.watcher) { + this.watcher.close(); + this.watcher = null; + } + if (this.pausedWatcher) { + this.pausedWatcher.close(); + this.pausedWatcher = null; + } + if (this.running) { + this.invalid = true; + this._done = finalCallback; + } else { + finalCallback(); + } + } +} + +module.exports = Watching; + + +/***/ }), + +/***/ 97391: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Jarid Margolin @jaridmargolin +*/ + + +const inspect = __webpack_require__(31669).inspect.custom; + +class WebpackError extends Error { + /** + * Creates an instance of WebpackError. + * @param {string=} message error message + */ + constructor(message) { + super(message); + + this.details = undefined; + this.missing = undefined; + this.origin = undefined; + this.dependencies = undefined; + this.module = undefined; + + Error.captureStackTrace(this, this.constructor); + } + + [inspect]() { + return this.stack + (this.details ? `\n${this.details}` : ""); + } +} + +module.exports = WebpackError; + + +/***/ }), + +/***/ 2779: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const OptionsApply = __webpack_require__(4428); + +const JavascriptModulesPlugin = __webpack_require__(10339); +const JsonModulesPlugin = __webpack_require__(2859); +const WebAssemblyModulesPlugin = __webpack_require__(99510); + +const LoaderTargetPlugin = __webpack_require__(95154); +const FunctionModulePlugin = __webpack_require__(31221); +const EvalDevToolModulePlugin = __webpack_require__(65200); +const SourceMapDevToolPlugin = __webpack_require__(11851); +const EvalSourceMapDevToolPlugin = __webpack_require__(99994); + +const EntryOptionPlugin = __webpack_require__(14604); +const RecordIdsPlugin = __webpack_require__(40355); + +const APIPlugin = __webpack_require__(71118); +const ConstPlugin = __webpack_require__(84072); +const CommonJsStuffPlugin = __webpack_require__(85736); +const CompatibilityPlugin = __webpack_require__(85918); + +const TemplatedPathPlugin = __webpack_require__(76032); +const WarnCaseSensitiveModulesPlugin = __webpack_require__(40269); +const UseStrictPlugin = __webpack_require__(73554); + +const LoaderPlugin = __webpack_require__(31559); +const CommonJsPlugin = __webpack_require__(85358); +const HarmonyModulesPlugin = __webpack_require__(66792); +const SystemPlugin = __webpack_require__(68166); +const ImportPlugin = __webpack_require__(58839); +const RequireContextPlugin = __webpack_require__(89042); +const RequireEnsurePlugin = __webpack_require__(98655); +const RequireIncludePlugin = __webpack_require__(16522); + +const { cachedCleverMerge } = __webpack_require__(67916); + +/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} WebpackOptions */ +/** @typedef {import("./Compiler")} Compiler */ + +class WebpackOptionsApply extends OptionsApply { + constructor() { + super(); + } + + /** + * @param {WebpackOptions} options options object + * @param {Compiler} compiler compiler object + * @returns {WebpackOptions} options object + */ + process(options, compiler) { + let ExternalsPlugin; + compiler.outputPath = options.output.path; + compiler.recordsInputPath = options.recordsInputPath || options.recordsPath; + compiler.recordsOutputPath = + options.recordsOutputPath || options.recordsPath; + compiler.name = options.name; + // TODO webpack 5 refactor this to MultiCompiler.setDependencies() with a WeakMap + // @ts-ignore TODO + compiler.dependencies = options.dependencies; + if (typeof options.target === "string") { + let JsonpTemplatePlugin; + let FetchCompileWasmTemplatePlugin; + let ReadFileCompileWasmTemplatePlugin; + let NodeSourcePlugin; + let NodeTargetPlugin; + let NodeTemplatePlugin; + + switch (options.target) { + case "web": + JsonpTemplatePlugin = __webpack_require__(92764); + FetchCompileWasmTemplatePlugin = __webpack_require__(52669); + NodeSourcePlugin = __webpack_require__(9128); + new JsonpTemplatePlugin().apply(compiler); + new FetchCompileWasmTemplatePlugin({ + mangleImports: options.optimization.mangleWasmImports + }).apply(compiler); + new FunctionModulePlugin().apply(compiler); + new NodeSourcePlugin(options.node).apply(compiler); + new LoaderTargetPlugin(options.target).apply(compiler); + break; + case "webworker": { + let WebWorkerTemplatePlugin = __webpack_require__(21328); + FetchCompileWasmTemplatePlugin = __webpack_require__(52669); + NodeSourcePlugin = __webpack_require__(9128); + new WebWorkerTemplatePlugin().apply(compiler); + new FetchCompileWasmTemplatePlugin({ + mangleImports: options.optimization.mangleWasmImports + }).apply(compiler); + new FunctionModulePlugin().apply(compiler); + new NodeSourcePlugin(options.node).apply(compiler); + new LoaderTargetPlugin(options.target).apply(compiler); + break; + } + case "node": + case "async-node": + NodeTemplatePlugin = __webpack_require__(90010); + ReadFileCompileWasmTemplatePlugin = __webpack_require__(73839); + NodeTargetPlugin = __webpack_require__(59743); + new NodeTemplatePlugin({ + asyncChunkLoading: options.target === "async-node" + }).apply(compiler); + new ReadFileCompileWasmTemplatePlugin({ + mangleImports: options.optimization.mangleWasmImports + }).apply(compiler); + new FunctionModulePlugin().apply(compiler); + new NodeTargetPlugin().apply(compiler); + new LoaderTargetPlugin("node").apply(compiler); + break; + case "node-webkit": + JsonpTemplatePlugin = __webpack_require__(92764); + NodeTargetPlugin = __webpack_require__(59743); + ExternalsPlugin = __webpack_require__(75705); + new JsonpTemplatePlugin().apply(compiler); + new FunctionModulePlugin().apply(compiler); + new NodeTargetPlugin().apply(compiler); + new ExternalsPlugin("commonjs", "nw.gui").apply(compiler); + new LoaderTargetPlugin(options.target).apply(compiler); + break; + case "electron-main": + NodeTemplatePlugin = __webpack_require__(90010); + NodeTargetPlugin = __webpack_require__(59743); + ExternalsPlugin = __webpack_require__(75705); + new NodeTemplatePlugin({ + asyncChunkLoading: true + }).apply(compiler); + new FunctionModulePlugin().apply(compiler); + new NodeTargetPlugin().apply(compiler); + new ExternalsPlugin("commonjs", [ + "app", + "auto-updater", + "browser-window", + "clipboard", + "content-tracing", + "crash-reporter", + "dialog", + "electron", + "global-shortcut", + "ipc", + "ipc-main", + "menu", + "menu-item", + "native-image", + "original-fs", + "power-monitor", + "power-save-blocker", + "protocol", + "screen", + "session", + "shell", + "tray", + "web-contents" + ]).apply(compiler); + new LoaderTargetPlugin(options.target).apply(compiler); + break; + case "electron-renderer": + case "electron-preload": + FetchCompileWasmTemplatePlugin = __webpack_require__(52669); + NodeTargetPlugin = __webpack_require__(59743); + ExternalsPlugin = __webpack_require__(75705); + if (options.target === "electron-renderer") { + JsonpTemplatePlugin = __webpack_require__(92764); + new JsonpTemplatePlugin().apply(compiler); + } else if (options.target === "electron-preload") { + NodeTemplatePlugin = __webpack_require__(90010); + new NodeTemplatePlugin({ + asyncChunkLoading: true + }).apply(compiler); + } + new FetchCompileWasmTemplatePlugin({ + mangleImports: options.optimization.mangleWasmImports + }).apply(compiler); + new FunctionModulePlugin().apply(compiler); + new NodeTargetPlugin().apply(compiler); + new ExternalsPlugin("commonjs", [ + "clipboard", + "crash-reporter", + "desktop-capturer", + "electron", + "ipc", + "ipc-renderer", + "native-image", + "original-fs", + "remote", + "screen", + "shell", + "web-frame" + ]).apply(compiler); + new LoaderTargetPlugin(options.target).apply(compiler); + break; + default: + throw new Error("Unsupported target '" + options.target + "'."); + } + } + // @ts-ignore This is always true, which is good this way + else if (options.target !== false) { + options.target(compiler); + } else { + throw new Error("Unsupported target '" + options.target + "'."); + } + + if (options.output.library || options.output.libraryTarget !== "var") { + const LibraryTemplatePlugin = __webpack_require__(65237); + new LibraryTemplatePlugin( + options.output.library, + options.output.libraryTarget, + options.output.umdNamedDefine, + options.output.auxiliaryComment || "", + options.output.libraryExport + ).apply(compiler); + } + if (options.externals) { + ExternalsPlugin = __webpack_require__(75705); + new ExternalsPlugin( + options.output.libraryTarget, + options.externals + ).apply(compiler); + } + + let noSources; + let legacy; + let modern; + let comment; + if ( + options.devtool && + (options.devtool.includes("sourcemap") || + options.devtool.includes("source-map")) + ) { + const hidden = options.devtool.includes("hidden"); + const inline = options.devtool.includes("inline"); + const evalWrapped = options.devtool.includes("eval"); + const cheap = options.devtool.includes("cheap"); + const moduleMaps = options.devtool.includes("module"); + noSources = options.devtool.includes("nosources"); + legacy = options.devtool.includes("@"); + modern = options.devtool.includes("#"); + comment = + legacy && modern + ? "\n/*\n//@ source" + + "MappingURL=[url]\n//# source" + + "MappingURL=[url]\n*/" + : legacy + ? "\n/*\n//@ source" + "MappingURL=[url]\n*/" + : modern + ? "\n//# source" + "MappingURL=[url]" + : null; + const Plugin = evalWrapped + ? EvalSourceMapDevToolPlugin + : SourceMapDevToolPlugin; + new Plugin({ + filename: inline ? null : options.output.sourceMapFilename, + moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate, + fallbackModuleFilenameTemplate: + options.output.devtoolFallbackModuleFilenameTemplate, + append: hidden ? false : comment, + module: moduleMaps ? true : cheap ? false : true, + columns: cheap ? false : true, + lineToLine: options.output.devtoolLineToLine, + noSources: noSources, + namespace: options.output.devtoolNamespace + }).apply(compiler); + } else if (options.devtool && options.devtool.includes("eval")) { + legacy = options.devtool.includes("@"); + modern = options.devtool.includes("#"); + comment = + legacy && modern + ? "\n//@ sourceURL=[url]\n//# sourceURL=[url]" + : legacy + ? "\n//@ sourceURL=[url]" + : modern + ? "\n//# sourceURL=[url]" + : null; + new EvalDevToolModulePlugin({ + sourceUrlComment: comment, + moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate, + namespace: options.output.devtoolNamespace + }).apply(compiler); + } + + new JavascriptModulesPlugin().apply(compiler); + new JsonModulesPlugin().apply(compiler); + new WebAssemblyModulesPlugin({ + mangleImports: options.optimization.mangleWasmImports + }).apply(compiler); + + new EntryOptionPlugin().apply(compiler); + compiler.hooks.entryOption.call(options.context, options.entry); + + new CompatibilityPlugin().apply(compiler); + new HarmonyModulesPlugin(options.module).apply(compiler); + if (options.amd !== false) { + const AMDPlugin = __webpack_require__(85812); + const RequireJsStuffPlugin = __webpack_require__(88226); + new AMDPlugin(options.module, options.amd || {}).apply(compiler); + new RequireJsStuffPlugin().apply(compiler); + } + new CommonJsPlugin(options.module).apply(compiler); + new LoaderPlugin().apply(compiler); + if (options.node !== false) { + const NodeStuffPlugin = __webpack_require__(28386); + new NodeStuffPlugin(options.node).apply(compiler); + } + new CommonJsStuffPlugin().apply(compiler); + new APIPlugin().apply(compiler); + new ConstPlugin().apply(compiler); + new UseStrictPlugin().apply(compiler); + new RequireIncludePlugin().apply(compiler); + new RequireEnsurePlugin().apply(compiler); + new RequireContextPlugin( + options.resolve.modules, + options.resolve.extensions, + options.resolve.mainFiles + ).apply(compiler); + new ImportPlugin(options.module).apply(compiler); + new SystemPlugin(options.module).apply(compiler); + + if (typeof options.mode !== "string") { + const WarnNoModeSetPlugin = __webpack_require__(71245); + new WarnNoModeSetPlugin().apply(compiler); + } + + const EnsureChunkConditionsPlugin = __webpack_require__(29720); + new EnsureChunkConditionsPlugin().apply(compiler); + if (options.optimization.removeAvailableModules) { + const RemoveParentModulesPlugin = __webpack_require__(58142); + new RemoveParentModulesPlugin().apply(compiler); + } + if (options.optimization.removeEmptyChunks) { + const RemoveEmptyChunksPlugin = __webpack_require__(78085); + new RemoveEmptyChunksPlugin().apply(compiler); + } + if (options.optimization.mergeDuplicateChunks) { + const MergeDuplicateChunksPlugin = __webpack_require__(46214); + new MergeDuplicateChunksPlugin().apply(compiler); + } + if (options.optimization.flagIncludedChunks) { + const FlagIncludedChunksPlugin = __webpack_require__(25850); + new FlagIncludedChunksPlugin().apply(compiler); + } + if (options.optimization.sideEffects) { + const SideEffectsFlagPlugin = __webpack_require__(83654); + new SideEffectsFlagPlugin().apply(compiler); + } + if (options.optimization.providedExports) { + const FlagDependencyExportsPlugin = __webpack_require__(73599); + new FlagDependencyExportsPlugin().apply(compiler); + } + if (options.optimization.usedExports) { + const FlagDependencyUsagePlugin = __webpack_require__(33632); + new FlagDependencyUsagePlugin().apply(compiler); + } + if (options.optimization.concatenateModules) { + const ModuleConcatenationPlugin = __webpack_require__(45184); + new ModuleConcatenationPlugin().apply(compiler); + } + if (options.optimization.splitChunks) { + const SplitChunksPlugin = __webpack_require__(60474); + new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler); + } + if (options.optimization.runtimeChunk) { + const RuntimeChunkPlugin = __webpack_require__(76894); + new RuntimeChunkPlugin(options.optimization.runtimeChunk).apply(compiler); + } + if (options.optimization.noEmitOnErrors) { + const NoEmitOnErrorsPlugin = __webpack_require__(22615); + new NoEmitOnErrorsPlugin().apply(compiler); + } + if (options.optimization.checkWasmTypes) { + const WasmFinalizeExportsPlugin = __webpack_require__(10557); + new WasmFinalizeExportsPlugin().apply(compiler); + } + let moduleIds = options.optimization.moduleIds; + if (moduleIds === undefined) { + // TODO webpack 5 remove all these options + if (options.optimization.occurrenceOrder) { + moduleIds = "size"; + } + if (options.optimization.namedModules) { + moduleIds = "named"; + } + if (options.optimization.hashedModuleIds) { + moduleIds = "hashed"; + } + if (moduleIds === undefined) { + moduleIds = "natural"; + } + } + if (moduleIds) { + const NamedModulesPlugin = __webpack_require__(86707); + const HashedModuleIdsPlugin = __webpack_require__(50268); + const OccurrenceModuleOrderPlugin = __webpack_require__(62000); + switch (moduleIds) { + case "natural": + // TODO webpack 5: see hint in Compilation.sortModules + break; + case "named": + new NamedModulesPlugin().apply(compiler); + break; + case "hashed": + new HashedModuleIdsPlugin().apply(compiler); + break; + case "size": + new OccurrenceModuleOrderPlugin({ + prioritiseInitial: true + }).apply(compiler); + break; + case "total-size": + new OccurrenceModuleOrderPlugin({ + prioritiseInitial: false + }).apply(compiler); + break; + default: + throw new Error( + `webpack bug: moduleIds: ${moduleIds} is not implemented` + ); + } + } + let chunkIds = options.optimization.chunkIds; + if (chunkIds === undefined) { + // TODO webpack 5 remove all these options + if (options.optimization.occurrenceOrder) { + // This looks weird but it's for backward-compat + // This bug already existed before adding this feature + chunkIds = "total-size"; + } + if (options.optimization.namedChunks) { + chunkIds = "named"; + } + if (chunkIds === undefined) { + chunkIds = "natural"; + } + } + if (chunkIds) { + const NaturalChunkOrderPlugin = __webpack_require__(68053); + const NamedChunksPlugin = __webpack_require__(70419); + const OccurrenceChunkOrderPlugin = __webpack_require__(83741); + switch (chunkIds) { + case "natural": + new NaturalChunkOrderPlugin().apply(compiler); + break; + case "named": + // TODO webapck 5: for backward-compat this need to have OccurrenceChunkOrderPlugin too + // The NamedChunksPlugin doesn't give every chunk a name + // This should be fixed, and the OccurrenceChunkOrderPlugin should be removed here. + new OccurrenceChunkOrderPlugin({ + prioritiseInitial: false + }).apply(compiler); + new NamedChunksPlugin().apply(compiler); + break; + case "size": + new OccurrenceChunkOrderPlugin({ + prioritiseInitial: true + }).apply(compiler); + break; + case "total-size": + new OccurrenceChunkOrderPlugin({ + prioritiseInitial: false + }).apply(compiler); + break; + default: + throw new Error( + `webpack bug: chunkIds: ${chunkIds} is not implemented` + ); + } + } + if (options.optimization.nodeEnv) { + const DefinePlugin = __webpack_require__(97374); + new DefinePlugin({ + "process.env.NODE_ENV": JSON.stringify(options.optimization.nodeEnv) + }).apply(compiler); + } + if (options.optimization.minimize) { + for (const minimizer of options.optimization.minimizer) { + if (typeof minimizer === "function") { + minimizer.call(compiler, compiler); + } else { + minimizer.apply(compiler); + } + } + } + + if (options.performance) { + const SizeLimitsPlugin = __webpack_require__(68310); + new SizeLimitsPlugin(options.performance).apply(compiler); + } + + new TemplatedPathPlugin().apply(compiler); + + new RecordIdsPlugin({ + portableIds: options.optimization.portableRecords + }).apply(compiler); + + new WarnCaseSensitiveModulesPlugin().apply(compiler); + + if (options.cache) { + const CachePlugin = __webpack_require__(6465); + new CachePlugin( + typeof options.cache === "object" ? options.cache : null + ).apply(compiler); + } + + compiler.hooks.afterPlugins.call(compiler); + if (!compiler.inputFileSystem) { + throw new Error("No input filesystem provided"); + } + compiler.resolverFactory.hooks.resolveOptions + .for("normal") + .tap("WebpackOptionsApply", resolveOptions => { + return Object.assign( + { + fileSystem: compiler.inputFileSystem + }, + cachedCleverMerge(options.resolve, resolveOptions) + ); + }); + compiler.resolverFactory.hooks.resolveOptions + .for("context") + .tap("WebpackOptionsApply", resolveOptions => { + return Object.assign( + { + fileSystem: compiler.inputFileSystem, + resolveToContext: true + }, + cachedCleverMerge(options.resolve, resolveOptions) + ); + }); + compiler.resolverFactory.hooks.resolveOptions + .for("loader") + .tap("WebpackOptionsApply", resolveOptions => { + return Object.assign( + { + fileSystem: compiler.inputFileSystem + }, + cachedCleverMerge(options.resolveLoader, resolveOptions) + ); + }); + compiler.hooks.afterResolvers.call(compiler); + return options; + } +} + +module.exports = WebpackOptionsApply; + + +/***/ }), + +/***/ 60016: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); + +const OptionsDefaulter = __webpack_require__(3414); +const Template = __webpack_require__(96066); + +const isProductionLikeMode = options => { + return options.mode === "production" || !options.mode; +}; + +const isWebLikeTarget = options => { + return options.target === "web" || options.target === "webworker"; +}; + +const getDevtoolNamespace = library => { + // if options.output.library is a string + if (Array.isArray(library)) { + return library.join("."); + } else if (typeof library === "object") { + return getDevtoolNamespace(library.root); + } + return library || ""; +}; + +class WebpackOptionsDefaulter extends OptionsDefaulter { + constructor() { + super(); + + this.set("entry", "./src"); + + this.set("devtool", "make", options => + options.mode === "development" ? "eval" : false + ); + this.set("cache", "make", options => options.mode === "development"); + + this.set("context", process.cwd()); + this.set("target", "web"); + + this.set("module", "call", value => Object.assign({}, value)); + this.set("module.unknownContextRequest", "."); + this.set("module.unknownContextRegExp", false); + this.set("module.unknownContextRecursive", true); + this.set("module.unknownContextCritical", true); + this.set("module.exprContextRequest", "."); + this.set("module.exprContextRegExp", false); + this.set("module.exprContextRecursive", true); + this.set("module.exprContextCritical", true); + this.set("module.wrappedContextRegExp", /.*/); + this.set("module.wrappedContextRecursive", true); + this.set("module.wrappedContextCritical", false); + this.set("module.strictExportPresence", false); + this.set("module.strictThisContextOnImports", false); + this.set("module.unsafeCache", "make", options => !!options.cache); + this.set("module.rules", []); + this.set("module.defaultRules", "make", options => [ + { + type: "javascript/auto", + resolve: {} + }, + { + test: /\.mjs$/i, + type: "javascript/esm", + resolve: { + mainFields: + options.target === "web" || + options.target === "webworker" || + options.target === "electron-renderer" + ? ["browser", "main"] + : ["main"] + } + }, + { + test: /\.json$/i, + type: "json" + }, + { + test: /\.wasm$/i, + type: "webassembly/experimental" + } + ]); + + this.set("output", "call", (value, options) => { + if (typeof value === "string") { + return { + filename: value + }; + } else if (typeof value !== "object") { + return {}; + } else { + return Object.assign({}, value); + } + }); + + this.set("output.filename", "[name].js"); + this.set("output.chunkFilename", "make", options => { + const filename = options.output.filename; + if (typeof filename !== "function") { + const hasName = filename.includes("[name]"); + const hasId = filename.includes("[id]"); + const hasChunkHash = filename.includes("[chunkhash]"); + // Anything changing depending on chunk is fine + if (hasChunkHash || hasName || hasId) return filename; + // Elsewise prefix "[id]." in front of the basename to make it changing + return filename.replace(/(^|\/)([^/]*(?:\?|$))/, "$1[id].$2"); + } + return "[id].js"; + }); + this.set("output.webassemblyModuleFilename", "[modulehash].module.wasm"); + this.set("output.library", ""); + this.set("output.hotUpdateFunction", "make", options => { + return Template.toIdentifier( + "webpackHotUpdate" + Template.toIdentifier(options.output.library) + ); + }); + this.set("output.jsonpFunction", "make", options => { + return Template.toIdentifier( + "webpackJsonp" + Template.toIdentifier(options.output.library) + ); + }); + this.set("output.chunkCallbackName", "make", options => { + return Template.toIdentifier( + "webpackChunk" + Template.toIdentifier(options.output.library) + ); + }); + this.set("output.globalObject", "make", options => { + switch (options.target) { + case "web": + case "electron-renderer": + case "node-webkit": + return "window"; + case "webworker": + return "self"; + case "node": + case "async-node": + case "electron-main": + return "global"; + default: + return "self"; + } + }); + this.set("output.devtoolNamespace", "make", options => { + return getDevtoolNamespace(options.output.library); + }); + this.set("output.libraryTarget", "var"); + this.set("output.path", path.join(process.cwd(), "dist")); + this.set( + "output.pathinfo", + "make", + options => options.mode === "development" + ); + this.set("output.sourceMapFilename", "[file].map[query]"); + this.set("output.hotUpdateChunkFilename", "[id].[hash].hot-update.js"); + this.set("output.hotUpdateMainFilename", "[hash].hot-update.json"); + this.set("output.crossOriginLoading", false); + this.set("output.jsonpScriptType", false); + this.set("output.chunkLoadTimeout", 120000); + this.set("output.hashFunction", "md4"); + this.set("output.hashDigest", "hex"); + this.set("output.hashDigestLength", 20); + this.set("output.devtoolLineToLine", false); + this.set("output.strictModuleExceptionHandling", false); + + this.set("node", "call", value => { + if (typeof value === "boolean") { + return value; + } else { + return Object.assign({}, value); + } + }); + this.set("node.console", false); + this.set("node.process", true); + this.set("node.global", true); + this.set("node.Buffer", true); + this.set("node.setImmediate", true); + this.set("node.__filename", "mock"); + this.set("node.__dirname", "mock"); + + this.set("performance", "call", (value, options) => { + if (value === false) return false; + if ( + value === undefined && + (!isProductionLikeMode(options) || !isWebLikeTarget(options)) + ) + return false; + return Object.assign({}, value); + }); + this.set("performance.maxAssetSize", 250000); + this.set("performance.maxEntrypointSize", 250000); + this.set("performance.hints", "make", options => + isProductionLikeMode(options) ? "warning" : false + ); + + this.set("optimization", "call", value => Object.assign({}, value)); + // TODO webpack 5: Disable by default in a modes + this.set( + "optimization.removeAvailableModules", + "make", + options => options.mode !== "development" + ); + this.set("optimization.removeEmptyChunks", true); + this.set("optimization.mergeDuplicateChunks", true); + this.set("optimization.flagIncludedChunks", "make", options => + isProductionLikeMode(options) + ); + // TODO webpack 5 add `moduleIds: "named"` default for development + // TODO webpack 5 add `moduleIds: "size"` default for production + // TODO webpack 5 remove optimization.occurrenceOrder + this.set("optimization.occurrenceOrder", "make", options => + isProductionLikeMode(options) + ); + this.set("optimization.sideEffects", "make", options => + isProductionLikeMode(options) + ); + this.set("optimization.providedExports", true); + this.set("optimization.usedExports", "make", options => + isProductionLikeMode(options) + ); + this.set("optimization.concatenateModules", "make", options => + isProductionLikeMode(options) + ); + this.set("optimization.splitChunks", {}); + this.set("optimization.splitChunks.hidePathInfo", "make", options => { + return isProductionLikeMode(options); + }); + this.set("optimization.splitChunks.chunks", "async"); + this.set("optimization.splitChunks.minSize", "make", options => { + return isProductionLikeMode(options) ? 30000 : 10000; + }); + this.set("optimization.splitChunks.minChunks", 1); + this.set("optimization.splitChunks.maxAsyncRequests", "make", options => { + return isProductionLikeMode(options) ? 5 : Infinity; + }); + this.set("optimization.splitChunks.automaticNameDelimiter", "~"); + this.set("optimization.splitChunks.automaticNameMaxLength", 109); + this.set("optimization.splitChunks.maxInitialRequests", "make", options => { + return isProductionLikeMode(options) ? 3 : Infinity; + }); + this.set("optimization.splitChunks.name", true); + this.set("optimization.splitChunks.cacheGroups", {}); + this.set("optimization.splitChunks.cacheGroups.default", { + automaticNamePrefix: "", + reuseExistingChunk: true, + minChunks: 2, + priority: -20 + }); + this.set("optimization.splitChunks.cacheGroups.vendors", { + automaticNamePrefix: "vendors", + test: /[\\/]node_modules[\\/]/, + priority: -10 + }); + this.set("optimization.runtimeChunk", "call", value => { + if (value === "single") { + return { + name: "runtime" + }; + } + if (value === true || value === "multiple") { + return { + name: entrypoint => `runtime~${entrypoint.name}` + }; + } + return value; + }); + this.set("optimization.noEmitOnErrors", "make", options => + isProductionLikeMode(options) + ); + this.set("optimization.checkWasmTypes", "make", options => + isProductionLikeMode(options) + ); + this.set("optimization.mangleWasmImports", false); + // TODO webpack 5 remove optimization.namedModules + this.set( + "optimization.namedModules", + "make", + options => options.mode === "development" + ); + this.set("optimization.hashedModuleIds", false); + // TODO webpack 5 add `chunkIds: "named"` default for development + // TODO webpack 5 add `chunkIds: "size"` default for production + // TODO webpack 5 remove optimization.namedChunks + this.set( + "optimization.namedChunks", + "make", + options => options.mode === "development" + ); + this.set( + "optimization.portableRecords", + "make", + options => + !!( + options.recordsInputPath || + options.recordsOutputPath || + options.recordsPath + ) + ); + this.set("optimization.minimize", "make", options => + isProductionLikeMode(options) + ); + this.set("optimization.minimizer", "make", options => [ + { + apply: compiler => { + // Lazy load the Terser plugin + const TerserPlugin = __webpack_require__(89301); + const SourceMapDevToolPlugin = __webpack_require__(11851); + new TerserPlugin({ + cache: true, + parallel: true, + sourceMap: + (options.devtool && /source-?map/.test(options.devtool)) || + (options.plugins && + options.plugins.some(p => p instanceof SourceMapDevToolPlugin)) + }).apply(compiler); + } + } + ]); + this.set("optimization.nodeEnv", "make", options => { + // TODO: In webpack 5, it should return `false` when mode is `none` + return options.mode || "production"; + }); + + this.set("resolve", "call", value => Object.assign({}, value)); + this.set("resolve.unsafeCache", true); + this.set("resolve.modules", ["node_modules"]); + this.set("resolve.extensions", [".wasm", ".mjs", ".js", ".json"]); + this.set("resolve.mainFiles", ["index"]); + this.set("resolve.aliasFields", "make", options => { + if ( + options.target === "web" || + options.target === "webworker" || + options.target === "electron-renderer" + ) { + return ["browser"]; + } else { + return []; + } + }); + this.set("resolve.mainFields", "make", options => { + if ( + options.target === "web" || + options.target === "webworker" || + options.target === "electron-renderer" + ) { + return ["browser", "module", "main"]; + } else { + return ["module", "main"]; + } + }); + this.set("resolve.cacheWithContext", "make", options => { + return ( + Array.isArray(options.resolve.plugins) && + options.resolve.plugins.length > 0 + ); + }); + + this.set("resolveLoader", "call", value => Object.assign({}, value)); + this.set("resolveLoader.unsafeCache", true); + this.set("resolveLoader.mainFields", ["loader", "main"]); + this.set("resolveLoader.extensions", [".js", ".json"]); + this.set("resolveLoader.mainFiles", ["index"]); + this.set("resolveLoader.roots", "make", options => [options.context]); + this.set("resolveLoader.cacheWithContext", "make", options => { + return ( + Array.isArray(options.resolveLoader.plugins) && + options.resolveLoader.plugins.length > 0 + ); + }); + + this.set("infrastructureLogging", "call", value => + Object.assign({}, value) + ); + this.set("infrastructureLogging.level", "info"); + this.set("infrastructureLogging.debug", false); + } +} + +module.exports = WebpackOptionsDefaulter; + + +/***/ }), + +/***/ 285: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Gajus Kuizinas @gajus +*/ + + +const WebpackError = __webpack_require__(97391); +const webpackOptionsSchema = __webpack_require__(37863); + +const getSchemaPart = (path, parents, additionalPath) => { + parents = parents || 0; + path = path.split("/"); + path = path.slice(0, path.length - parents); + if (additionalPath) { + additionalPath = additionalPath.split("/"); + path = path.concat(additionalPath); + } + let schemaPart = webpackOptionsSchema; + for (let i = 1; i < path.length; i++) { + const inner = schemaPart[path[i]]; + if (inner) schemaPart = inner; + } + return schemaPart; +}; + +const getSchemaPartText = (schemaPart, additionalPath) => { + if (additionalPath) { + for (let i = 0; i < additionalPath.length; i++) { + const inner = schemaPart[additionalPath[i]]; + if (inner) schemaPart = inner; + } + } + while (schemaPart.$ref) { + schemaPart = getSchemaPart(schemaPart.$ref); + } + let schemaText = WebpackOptionsValidationError.formatSchema(schemaPart); + if (schemaPart.description) { + schemaText += `\n-> ${schemaPart.description}`; + } + return schemaText; +}; + +const getSchemaPartDescription = schemaPart => { + while (schemaPart.$ref) { + schemaPart = getSchemaPart(schemaPart.$ref); + } + if (schemaPart.description) { + return `\n-> ${schemaPart.description}`; + } + return ""; +}; + +const SPECIFICITY = { + type: 1, + oneOf: 1, + anyOf: 1, + allOf: 1, + additionalProperties: 2, + enum: 1, + instanceof: 1, + required: 2, + minimum: 2, + uniqueItems: 2, + minLength: 2, + minItems: 2, + minProperties: 2, + absolutePath: 2 +}; + +const filterMax = (array, fn) => { + const max = array.reduce((max, item) => Math.max(max, fn(item)), 0); + return array.filter(item => fn(item) === max); +}; + +const filterChildren = children => { + children = filterMax(children, err => + err.dataPath ? err.dataPath.length : 0 + ); + children = filterMax(children, err => SPECIFICITY[err.keyword] || 2); + return children; +}; + +const indent = (str, prefix, firstLine) => { + if (firstLine) { + return prefix + str.replace(/\n(?!$)/g, "\n" + prefix); + } else { + return str.replace(/\n(?!$)/g, `\n${prefix}`); + } +}; + +class WebpackOptionsValidationError extends WebpackError { + constructor(validationErrors) { + super( + "Invalid configuration object. " + + "Webpack has been initialised using a configuration object that does not match the API schema.\n" + + validationErrors + .map( + err => + " - " + + indent( + WebpackOptionsValidationError.formatValidationError(err), + " ", + false + ) + ) + .join("\n") + ); + + this.name = "WebpackOptionsValidationError"; + this.validationErrors = validationErrors; + + Error.captureStackTrace(this, this.constructor); + } + + static formatSchema(schema, prevSchemas) { + prevSchemas = prevSchemas || []; + + const formatInnerSchema = (innerSchema, addSelf) => { + if (!addSelf) { + return WebpackOptionsValidationError.formatSchema( + innerSchema, + prevSchemas + ); + } + if (prevSchemas.includes(innerSchema)) { + return "(recursive)"; + } + return WebpackOptionsValidationError.formatSchema( + innerSchema, + prevSchemas.concat(schema) + ); + }; + + if (schema.type === "string") { + if (schema.minLength === 1) { + return "non-empty string"; + } + if (schema.minLength > 1) { + return `string (min length ${schema.minLength})`; + } + return "string"; + } + if (schema.type === "boolean") { + return "boolean"; + } + if (schema.type === "number") { + return "number"; + } + if (schema.type === "object") { + if (schema.properties) { + const required = schema.required || []; + return `object { ${Object.keys(schema.properties) + .map(property => { + if (!required.includes(property)) return property + "?"; + return property; + }) + .concat(schema.additionalProperties ? ["…"] : []) + .join(", ")} }`; + } + if (schema.additionalProperties) { + return `object { : ${formatInnerSchema( + schema.additionalProperties + )} }`; + } + return "object"; + } + if (schema.type === "array") { + return `[${formatInnerSchema(schema.items)}]`; + } + + switch (schema.instanceof) { + case "Function": + return "function"; + case "RegExp": + return "RegExp"; + } + + if (schema.enum) { + return schema.enum.map(item => JSON.stringify(item)).join(" | "); + } + + if (schema.$ref) { + return formatInnerSchema(getSchemaPart(schema.$ref), true); + } + if (schema.allOf) { + return schema.allOf.map(formatInnerSchema).join(" & "); + } + if (schema.oneOf) { + return schema.oneOf.map(formatInnerSchema).join(" | "); + } + if (schema.anyOf) { + return schema.anyOf.map(formatInnerSchema).join(" | "); + } + return JSON.stringify(schema, null, 2); + } + + static formatValidationError(err) { + const dataPath = `configuration${err.dataPath}`; + if (err.keyword === "additionalProperties") { + const baseMessage = `${dataPath} has an unknown property '${ + err.params.additionalProperty + }'. These properties are valid:\n${getSchemaPartText(err.parentSchema)}`; + if (!err.dataPath) { + switch (err.params.additionalProperty) { + case "debug": + return ( + `${baseMessage}\n` + + "The 'debug' property was removed in webpack 2.0.0.\n" + + "Loaders should be updated to allow passing this option via loader options in module.rules.\n" + + "Until loaders are updated one can use the LoaderOptionsPlugin to switch loaders into debug mode:\n" + + "plugins: [\n" + + " new webpack.LoaderOptionsPlugin({\n" + + " debug: true\n" + + " })\n" + + "]" + ); + } + return ( + `${baseMessage}\n` + + "For typos: please correct them.\n" + + "For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.\n" + + " Loaders should be updated to allow passing options via loader options in module.rules.\n" + + " Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:\n" + + " plugins: [\n" + + " new webpack.LoaderOptionsPlugin({\n" + + " // test: /\\.xxx$/, // may apply this only for some modules\n" + + " options: {\n" + + ` ${err.params.additionalProperty}: …\n` + + " }\n" + + " })\n" + + " ]" + ); + } + return baseMessage; + } else if (err.keyword === "oneOf" || err.keyword === "anyOf") { + if (err.children && err.children.length > 0) { + if (err.schema.length === 1) { + const lastChild = err.children[err.children.length - 1]; + const remainingChildren = err.children.slice( + 0, + err.children.length - 1 + ); + return WebpackOptionsValidationError.formatValidationError( + Object.assign({}, lastChild, { + children: remainingChildren, + parentSchema: Object.assign( + {}, + err.parentSchema, + lastChild.parentSchema + ) + }) + ); + } + const children = filterChildren(err.children); + if (children.length === 1) { + return WebpackOptionsValidationError.formatValidationError( + children[0] + ); + } + return ( + `${dataPath} should be one of these:\n${getSchemaPartText( + err.parentSchema + )}\n` + + `Details:\n${children + .map( + err => + " * " + + indent( + WebpackOptionsValidationError.formatValidationError(err), + " ", + false + ) + ) + .join("\n")}` + ); + } + return `${dataPath} should be one of these:\n${getSchemaPartText( + err.parentSchema + )}`; + } else if (err.keyword === "enum") { + if ( + err.parentSchema && + err.parentSchema.enum && + err.parentSchema.enum.length === 1 + ) { + return `${dataPath} should be ${getSchemaPartText(err.parentSchema)}`; + } + return `${dataPath} should be one of these:\n${getSchemaPartText( + err.parentSchema + )}`; + } else if (err.keyword === "allOf") { + return `${dataPath} should be:\n${getSchemaPartText(err.parentSchema)}`; + } else if (err.keyword === "type") { + switch (err.params.type) { + case "object": + return `${dataPath} should be an object.${getSchemaPartDescription( + err.parentSchema + )}`; + case "string": + return `${dataPath} should be a string.${getSchemaPartDescription( + err.parentSchema + )}`; + case "boolean": + return `${dataPath} should be a boolean.${getSchemaPartDescription( + err.parentSchema + )}`; + case "number": + return `${dataPath} should be a number.${getSchemaPartDescription( + err.parentSchema + )}`; + case "array": + return `${dataPath} should be an array:\n${getSchemaPartText( + err.parentSchema + )}`; + } + return `${dataPath} should be ${err.params.type}:\n${getSchemaPartText( + err.parentSchema + )}`; + } else if (err.keyword === "instanceof") { + return `${dataPath} should be an instance of ${getSchemaPartText( + err.parentSchema + )}`; + } else if (err.keyword === "required") { + const missingProperty = err.params.missingProperty.replace(/^\./, ""); + return `${dataPath} misses the property '${missingProperty}'.\n${getSchemaPartText( + err.parentSchema, + ["properties", missingProperty] + )}`; + } else if (err.keyword === "minimum") { + return `${dataPath} ${err.message}.${getSchemaPartDescription( + err.parentSchema + )}`; + } else if (err.keyword === "uniqueItems") { + return `${dataPath} should not contain the item '${ + err.data[err.params.i] + }' twice.${getSchemaPartDescription(err.parentSchema)}`; + } else if ( + err.keyword === "minLength" || + err.keyword === "minItems" || + err.keyword === "minProperties" + ) { + if (err.params.limit === 1) { + switch (err.keyword) { + case "minLength": + return `${dataPath} should be an non-empty string.${getSchemaPartDescription( + err.parentSchema + )}`; + case "minItems": + return `${dataPath} should be an non-empty array.${getSchemaPartDescription( + err.parentSchema + )}`; + case "minProperties": + return `${dataPath} should be an non-empty object.${getSchemaPartDescription( + err.parentSchema + )}`; + } + return `${dataPath} should be not empty.${getSchemaPartDescription( + err.parentSchema + )}`; + } else { + return `${dataPath} ${err.message}${getSchemaPartDescription( + err.parentSchema + )}`; + } + } else if (err.keyword === "not") { + return `${dataPath} should not be ${getSchemaPartText( + err.schema + )}\n${getSchemaPartText(err.parentSchema)}`; + } else if (err.keyword === "absolutePath") { + const baseMessage = `${dataPath}: ${ + err.message + }${getSchemaPartDescription(err.parentSchema)}`; + if (dataPath === "configuration.output.filename") { + return ( + `${baseMessage}\n` + + "Please use output.path to specify absolute path and output.filename for the file name." + ); + } + return baseMessage; + } else { + return `${dataPath} ${err.message} (${JSON.stringify( + err, + null, + 2 + )}).\n${getSchemaPartText(err.parentSchema)}`; + } + } +} + +module.exports = WebpackOptionsValidationError; + + +/***/ }), + +/***/ 52337: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const AsyncDependencyToInitialChunkError = __webpack_require__(67089); +const GraphHelpers = __webpack_require__(32973); + +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Entrypoint")} Entrypoint */ +/** @typedef {import("./Module")} Module */ + +/** + * @typedef {Object} QueueItem + * @property {number} action + * @property {DependenciesBlock} block + * @property {Module} module + * @property {Chunk} chunk + * @property {ChunkGroup} chunkGroup + */ + +/** + * @typedef {Object} ChunkGroupInfo + * @property {ChunkGroup} chunkGroup the chunk group + * @property {Set} minAvailableModules current minimal set of modules available at this point + * @property {boolean} minAvailableModulesOwned true, if minAvailableModules is owned and can be modified + * @property {Set[]} availableModulesToBeMerged enqueued updates to the minimal set of available modules + * @property {QueueItem[]} skippedItems queue items that were skipped because module is already available in parent chunks (need to reconsider when minAvailableModules is shrinking) + * @property {Set} resultingAvailableModules set of modules available including modules from this chunk group + * @property {Set} children set of children chunk groups, that will be revisited when availableModules shrink + */ + +/** + * @typedef {Object} ChunkGroupDep + * @property {AsyncDependenciesBlock} block referencing block + * @property {ChunkGroup} chunkGroup referenced chunk group + */ + +/** + * @template T + * @param {Set} a first set + * @param {Set} b second set + * @returns {number} cmp + */ +const bySetSize = (a, b) => { + return b.size - a.size; +}; + +/** + * Extracts simplified info from the modules and their dependencies + * @param {Compilation} compilation the compilation + * @returns {Map, blocks: AsyncDependenciesBlock[]}>} the mapping block to modules and inner blocks + */ +const extraceBlockInfoMap = compilation => { + /** @type {Map, blocks: AsyncDependenciesBlock[]}>} */ + const blockInfoMap = new Map(); + + /** + * @param {Dependency} d dependency to iterate over + * @returns {void} + */ + const iteratorDependency = d => { + // We skip Dependencies without Reference + const ref = compilation.getDependencyReference(currentModule, d); + if (!ref) { + return; + } + // We skip Dependencies without Module pointer + const refModule = ref.module; + if (!refModule) { + return; + } + // We skip weak Dependencies + if (ref.weak) { + return; + } + + blockInfoModules.add(refModule); + }; + + /** + * @param {AsyncDependenciesBlock} b blocks to prepare + * @returns {void} + */ + const iteratorBlockPrepare = b => { + blockInfoBlocks.push(b); + blockQueue.push(b); + }; + + /** @type {Module} */ + let currentModule; + /** @type {DependenciesBlock} */ + let block; + /** @type {DependenciesBlock[]} */ + let blockQueue; + /** @type {Set} */ + let blockInfoModules; + /** @type {AsyncDependenciesBlock[]} */ + let blockInfoBlocks; + + for (const module of compilation.modules) { + blockQueue = [module]; + currentModule = module; + while (blockQueue.length > 0) { + block = blockQueue.pop(); + blockInfoModules = new Set(); + blockInfoBlocks = []; + + if (block.variables) { + for (const variable of block.variables) { + for (const dep of variable.dependencies) iteratorDependency(dep); + } + } + + if (block.dependencies) { + for (const dep of block.dependencies) iteratorDependency(dep); + } + + if (block.blocks) { + for (const b of block.blocks) iteratorBlockPrepare(b); + } + + const blockInfo = { + modules: blockInfoModules, + blocks: blockInfoBlocks + }; + blockInfoMap.set(block, blockInfo); + } + } + + return blockInfoMap; +}; + +/** + * + * @param {Compilation} compilation the compilation + * @param {Entrypoint[]} inputChunkGroups input groups + * @param {Map} chunkGroupInfoMap mapping from chunk group to available modules + * @param {Map} chunkDependencies dependencies for chunk groups + * @param {Set} blocksWithNestedBlocks flag for blocks that have nested blocks + * @param {Set} allCreatedChunkGroups filled with all chunk groups that are created here + */ +const visitModules = ( + compilation, + inputChunkGroups, + chunkGroupInfoMap, + chunkDependencies, + blocksWithNestedBlocks, + allCreatedChunkGroups +) => { + const logger = compilation.getLogger("webpack.buildChunkGraph.visitModules"); + const { namedChunkGroups } = compilation; + + logger.time("prepare"); + const blockInfoMap = extraceBlockInfoMap(compilation); + + /** @type {Map} */ + const chunkGroupCounters = new Map(); + for (const chunkGroup of inputChunkGroups) { + chunkGroupCounters.set(chunkGroup, { + index: 0, + index2: 0 + }); + } + + let nextFreeModuleIndex = 0; + let nextFreeModuleIndex2 = 0; + + /** @type {Map} */ + const blockChunkGroups = new Map(); + + const ADD_AND_ENTER_MODULE = 0; + const ENTER_MODULE = 1; + const PROCESS_BLOCK = 2; + const LEAVE_MODULE = 3; + + /** + * @param {QueueItem[]} queue the queue array (will be mutated) + * @param {ChunkGroup} chunkGroup chunk group + * @returns {QueueItem[]} the queue array again + */ + const reduceChunkGroupToQueueItem = (queue, chunkGroup) => { + for (const chunk of chunkGroup.chunks) { + const module = chunk.entryModule; + queue.push({ + action: ENTER_MODULE, + block: module, + module, + chunk, + chunkGroup + }); + } + chunkGroupInfoMap.set(chunkGroup, { + chunkGroup, + minAvailableModules: new Set(), + minAvailableModulesOwned: true, + availableModulesToBeMerged: [], + skippedItems: [], + resultingAvailableModules: undefined, + children: undefined + }); + return queue; + }; + + // Start with the provided modules/chunks + /** @type {QueueItem[]} */ + let queue = inputChunkGroups + .reduce(reduceChunkGroupToQueueItem, []) + .reverse(); + /** @type {Map>} */ + const queueConnect = new Map(); + /** @type {Set} */ + const outdatedChunkGroupInfo = new Set(); + /** @type {QueueItem[]} */ + let queueDelayed = []; + + logger.timeEnd("prepare"); + + /** @type {Module} */ + let module; + /** @type {Chunk} */ + let chunk; + /** @type {ChunkGroup} */ + let chunkGroup; + /** @type {DependenciesBlock} */ + let block; + /** @type {Set} */ + let minAvailableModules; + /** @type {QueueItem[]} */ + let skippedItems; + + // For each async Block in graph + /** + * @param {AsyncDependenciesBlock} b iterating over each Async DepBlock + * @returns {void} + */ + const iteratorBlock = b => { + // 1. We create a chunk for this Block + // but only once (blockChunkGroups map) + let c = blockChunkGroups.get(b); + if (c === undefined) { + c = namedChunkGroups.get(b.chunkName); + if (c && c.isInitial()) { + compilation.errors.push( + new AsyncDependencyToInitialChunkError(b.chunkName, module, b.loc) + ); + c = chunkGroup; + } else { + c = compilation.addChunkInGroup( + b.groupOptions || b.chunkName, + module, + b.loc, + b.request + ); + chunkGroupCounters.set(c, { index: 0, index2: 0 }); + blockChunkGroups.set(b, c); + allCreatedChunkGroups.add(c); + } + } else { + // TODO webpack 5 remove addOptions check + if (c.addOptions) c.addOptions(b.groupOptions); + c.addOrigin(module, b.loc, b.request); + } + + // 2. We store the Block+Chunk mapping as dependency for the chunk + let deps = chunkDependencies.get(chunkGroup); + if (!deps) chunkDependencies.set(chunkGroup, (deps = [])); + deps.push({ + block: b, + chunkGroup: c + }); + + // 3. We create/update the chunk group info + let connectList = queueConnect.get(chunkGroup); + if (connectList === undefined) { + connectList = new Set(); + queueConnect.set(chunkGroup, connectList); + } + connectList.add(c); + + // 4. We enqueue the DependenciesBlock for traversal + queueDelayed.push({ + action: PROCESS_BLOCK, + block: b, + module: module, + chunk: c.chunks[0], + chunkGroup: c + }); + }; + + // Iterative traversal of the Module graph + // Recursive would be simpler to write but could result in Stack Overflows + while (queue.length) { + logger.time("visiting"); + while (queue.length) { + const queueItem = queue.pop(); + module = queueItem.module; + block = queueItem.block; + chunk = queueItem.chunk; + if (chunkGroup !== queueItem.chunkGroup) { + chunkGroup = queueItem.chunkGroup; + const chunkGroupInfo = chunkGroupInfoMap.get(chunkGroup); + minAvailableModules = chunkGroupInfo.minAvailableModules; + skippedItems = chunkGroupInfo.skippedItems; + } + + switch (queueItem.action) { + case ADD_AND_ENTER_MODULE: { + if (minAvailableModules.has(module)) { + // already in parent chunks + // skip it for now, but enqueue for rechecking when minAvailableModules shrinks + skippedItems.push(queueItem); + break; + } + // We connect Module and Chunk when not already done + if (chunk.addModule(module)) { + module.addChunk(chunk); + } else { + // already connected, skip it + break; + } + } + // fallthrough + case ENTER_MODULE: { + if (chunkGroup !== undefined) { + const index = chunkGroup.getModuleIndex(module); + if (index === undefined) { + chunkGroup.setModuleIndex( + module, + chunkGroupCounters.get(chunkGroup).index++ + ); + } + } + + if (module.index === null) { + module.index = nextFreeModuleIndex++; + } + + queue.push({ + action: LEAVE_MODULE, + block, + module, + chunk, + chunkGroup + }); + } + // fallthrough + case PROCESS_BLOCK: { + // get prepared block info + const blockInfo = blockInfoMap.get(block); + + // Buffer items because order need to be reverse to get indicies correct + const skipBuffer = []; + const queueBuffer = []; + // Traverse all referenced modules + for (const refModule of blockInfo.modules) { + if (chunk.containsModule(refModule)) { + // skip early if already connected + continue; + } + if (minAvailableModules.has(refModule)) { + // already in parent chunks, skip it for now + skipBuffer.push({ + action: ADD_AND_ENTER_MODULE, + block: refModule, + module: refModule, + chunk, + chunkGroup + }); + continue; + } + // enqueue the add and enter to enter in the correct order + // this is relevant with circular dependencies + queueBuffer.push({ + action: ADD_AND_ENTER_MODULE, + block: refModule, + module: refModule, + chunk, + chunkGroup + }); + } + // Add buffered items in reversed order + for (let i = skipBuffer.length - 1; i >= 0; i--) { + skippedItems.push(skipBuffer[i]); + } + for (let i = queueBuffer.length - 1; i >= 0; i--) { + queue.push(queueBuffer[i]); + } + + // Traverse all Blocks + for (const block of blockInfo.blocks) iteratorBlock(block); + + if (blockInfo.blocks.length > 0 && module !== block) { + blocksWithNestedBlocks.add(block); + } + break; + } + case LEAVE_MODULE: { + if (chunkGroup !== undefined) { + const index = chunkGroup.getModuleIndex2(module); + if (index === undefined) { + chunkGroup.setModuleIndex2( + module, + chunkGroupCounters.get(chunkGroup).index2++ + ); + } + } + + if (module.index2 === null) { + module.index2 = nextFreeModuleIndex2++; + } + break; + } + } + } + logger.timeEnd("visiting"); + + while (queueConnect.size > 0) { + logger.time("calculating available modules"); + + // Figure out new parents for chunk groups + // to get new available modules for these children + for (const [chunkGroup, targets] of queueConnect) { + const info = chunkGroupInfoMap.get(chunkGroup); + let minAvailableModules = info.minAvailableModules; + + // 1. Create a new Set of available modules at this points + const resultingAvailableModules = new Set(minAvailableModules); + for (const chunk of chunkGroup.chunks) { + for (const m of chunk.modulesIterable) { + resultingAvailableModules.add(m); + } + } + info.resultingAvailableModules = resultingAvailableModules; + if (info.children === undefined) { + info.children = targets; + } else { + for (const target of targets) { + info.children.add(target); + } + } + + // 2. Update chunk group info + for (const target of targets) { + let chunkGroupInfo = chunkGroupInfoMap.get(target); + if (chunkGroupInfo === undefined) { + chunkGroupInfo = { + chunkGroup: target, + minAvailableModules: undefined, + minAvailableModulesOwned: undefined, + availableModulesToBeMerged: [], + skippedItems: [], + resultingAvailableModules: undefined, + children: undefined + }; + chunkGroupInfoMap.set(target, chunkGroupInfo); + } + chunkGroupInfo.availableModulesToBeMerged.push( + resultingAvailableModules + ); + outdatedChunkGroupInfo.add(chunkGroupInfo); + } + } + queueConnect.clear(); + logger.timeEnd("calculating available modules"); + + if (outdatedChunkGroupInfo.size > 0) { + logger.time("merging available modules"); + // Execute the merge + for (const info of outdatedChunkGroupInfo) { + const availableModulesToBeMerged = info.availableModulesToBeMerged; + let cachedMinAvailableModules = info.minAvailableModules; + + // 1. Get minimal available modules + // It doesn't make sense to traverse a chunk again with more available modules. + // This step calculates the minimal available modules and skips traversal when + // the list didn't shrink. + if (availableModulesToBeMerged.length > 1) { + availableModulesToBeMerged.sort(bySetSize); + } + let changed = false; + for (const availableModules of availableModulesToBeMerged) { + if (cachedMinAvailableModules === undefined) { + cachedMinAvailableModules = availableModules; + info.minAvailableModules = cachedMinAvailableModules; + info.minAvailableModulesOwned = false; + changed = true; + } else { + if (info.minAvailableModulesOwned) { + // We own it and can modify it + for (const m of cachedMinAvailableModules) { + if (!availableModules.has(m)) { + cachedMinAvailableModules.delete(m); + changed = true; + } + } + } else { + for (const m of cachedMinAvailableModules) { + if (!availableModules.has(m)) { + // cachedMinAvailableModules need to be modified + // but we don't own it + // construct a new Set as intersection of cachedMinAvailableModules and availableModules + /** @type {Set} */ + const newSet = new Set(); + const iterator = cachedMinAvailableModules[ + Symbol.iterator + ](); + /** @type {IteratorResult} */ + let it; + while (!(it = iterator.next()).done) { + const module = it.value; + if (module === m) break; + newSet.add(module); + } + while (!(it = iterator.next()).done) { + const module = it.value; + if (availableModules.has(module)) { + newSet.add(module); + } + } + cachedMinAvailableModules = newSet; + info.minAvailableModulesOwned = true; + info.minAvailableModules = newSet; + + // Update the cache from the first queue + // if the chunkGroup is currently cached + if (chunkGroup === info.chunkGroup) { + minAvailableModules = cachedMinAvailableModules; + } + + changed = true; + break; + } + } + } + } + } + availableModulesToBeMerged.length = 0; + if (!changed) continue; + + // 2. Reconsider skipped items + for (const queueItem of info.skippedItems) { + queue.push(queueItem); + } + info.skippedItems.length = 0; + + // 3. Reconsider children chunk groups + if (info.children !== undefined) { + const chunkGroup = info.chunkGroup; + for (const c of info.children) { + let connectList = queueConnect.get(chunkGroup); + if (connectList === undefined) { + connectList = new Set(); + queueConnect.set(chunkGroup, connectList); + } + connectList.add(c); + } + } + } + outdatedChunkGroupInfo.clear(); + logger.timeEnd("merging available modules"); + } + } + + // Run queueDelayed when all items of the queue are processed + // This is important to get the global indicing correct + // Async blocks should be processed after all sync blocks are processed + if (queue.length === 0) { + const tempQueue = queue; + queue = queueDelayed.reverse(); + queueDelayed = tempQueue; + } + } +}; + +/** + * + * @param {Set} blocksWithNestedBlocks flag for blocks that have nested blocks + * @param {Map} chunkDependencies dependencies for chunk groups + * @param {Map} chunkGroupInfoMap mapping from chunk group to available modules + */ +const connectChunkGroups = ( + blocksWithNestedBlocks, + chunkDependencies, + chunkGroupInfoMap +) => { + /** @type {Set} */ + let resultingAvailableModules; + + /** + * Helper function to check if all modules of a chunk are available + * + * @param {ChunkGroup} chunkGroup the chunkGroup to scan + * @param {Set} availableModules the comparitor set + * @returns {boolean} return true if all modules of a chunk are available + */ + const areModulesAvailable = (chunkGroup, availableModules) => { + for (const chunk of chunkGroup.chunks) { + for (const module of chunk.modulesIterable) { + if (!availableModules.has(module)) return false; + } + } + return true; + }; + + // For each edge in the basic chunk graph + /** + * @param {ChunkGroupDep} dep the dependency used for filtering + * @returns {boolean} used to filter "edges" (aka Dependencies) that were pointing + * to modules that are already available. Also filters circular dependencies in the chunks graph + */ + const filterFn = dep => { + const depChunkGroup = dep.chunkGroup; + // TODO is this needed? + if (blocksWithNestedBlocks.has(dep.block)) return true; + if (areModulesAvailable(depChunkGroup, resultingAvailableModules)) { + return false; // break all modules are already available + } + return true; + }; + + // For all deps, check if chunk groups need to be connected + for (const [chunkGroup, deps] of chunkDependencies) { + if (deps.length === 0) continue; + + // 1. Get info from chunk group info map + const info = chunkGroupInfoMap.get(chunkGroup); + resultingAvailableModules = info.resultingAvailableModules; + + // 2. Foreach edge + for (let i = 0; i < deps.length; i++) { + const dep = deps[i]; + + // Filter inline, rather than creating a new array from `.filter()` + // TODO check if inlining filterFn makes sense here + if (!filterFn(dep)) { + continue; + } + const depChunkGroup = dep.chunkGroup; + const depBlock = dep.block; + + // 5. Connect block with chunk + GraphHelpers.connectDependenciesBlockAndChunkGroup( + depBlock, + depChunkGroup + ); + + // 6. Connect chunk with parent + GraphHelpers.connectChunkGroupParentAndChild(chunkGroup, depChunkGroup); + } + } +}; + +/** + * Remove all unconnected chunk groups + * @param {Compilation} compilation the compilation + * @param {Iterable} allCreatedChunkGroups all chunk groups that where created before + */ +const cleanupUnconnectedGroups = (compilation, allCreatedChunkGroups) => { + for (const chunkGroup of allCreatedChunkGroups) { + if (chunkGroup.getNumberOfParents() === 0) { + for (const chunk of chunkGroup.chunks) { + const idx = compilation.chunks.indexOf(chunk); + if (idx >= 0) compilation.chunks.splice(idx, 1); + chunk.remove("unconnected"); + } + chunkGroup.remove("unconnected"); + } + } +}; + +/** + * This method creates the Chunk graph from the Module graph + * @param {Compilation} compilation the compilation + * @param {Entrypoint[]} inputChunkGroups chunk groups which are processed + * @returns {void} + */ +const buildChunkGraph = (compilation, inputChunkGroups) => { + // SHARED STATE + + /** @type {Map} */ + const chunkDependencies = new Map(); + + /** @type {Set} */ + const allCreatedChunkGroups = new Set(); + + /** @type {Map} */ + const chunkGroupInfoMap = new Map(); + + /** @type {Set} */ + const blocksWithNestedBlocks = new Set(); + + // PART ONE + + visitModules( + compilation, + inputChunkGroups, + chunkGroupInfoMap, + chunkDependencies, + blocksWithNestedBlocks, + allCreatedChunkGroups + ); + + // PART TWO + + connectChunkGroups( + blocksWithNestedBlocks, + chunkDependencies, + chunkGroupInfoMap + ); + + // Cleaup work + + cleanupUnconnectedGroups(compilation, allCreatedChunkGroups); +}; + +module.exports = buildChunkGraph; + + +/***/ }), + +/***/ 22562: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ + +// TODO webpack 5 remove string type from a and b +/** + * Compare two locations + * @param {string|DependencyLocation} a A location node + * @param {string|DependencyLocation} b A location node + * @returns {-1|0|1} sorting comparator value + */ +module.exports = (a, b) => { + if (typeof a === "string") { + if (typeof b === "string") { + if (a < b) return -1; + if (a > b) return 1; + return 0; + } else if (typeof b === "object") { + return 1; + } else { + return 0; + } + } else if (typeof a === "object") { + if (typeof b === "string") { + return -1; + } else if (typeof b === "object") { + if ("start" in a && "start" in b) { + const ap = a.start; + const bp = b.start; + if (ap.line < bp.line) return -1; + if (ap.line > bp.line) return 1; + if (ap.column < bp.column) return -1; + if (ap.column > bp.column) return 1; + } + if ("name" in a && "name" in b) { + if (a.name < b.name) return -1; + if (a.name > b.name) return 1; + } + if ("index" in a && "index" in b) { + if (a.index < b.index) return -1; + if (a.index > b.index) return 1; + } + return 0; + } else { + return 0; + } + } +}; + + +/***/ }), + +/***/ 72890: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +const fs = __webpack_require__(35747); +const path = __webpack_require__(85622); +const mkdirp = __webpack_require__(94327); +const { Tracer } = __webpack_require__(92430); +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(49049); + +/** @typedef {import("../../declarations/plugins/debug/ProfilingPlugin").ProfilingPluginOptions} ProfilingPluginOptions */ + +let inspector = undefined; + +try { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + inspector = __webpack_require__(57012); +} catch (e) { + console.log("Unable to CPU profile in < node 8.0"); +} + +class Profiler { + constructor(inspector) { + this.session = undefined; + this.inspector = inspector; + } + + hasSession() { + return this.session !== undefined; + } + + startProfiling() { + if (this.inspector === undefined) { + return Promise.resolve(); + } + + try { + this.session = new inspector.Session(); + this.session.connect(); + } catch (_) { + this.session = undefined; + return Promise.resolve(); + } + + return Promise.all([ + this.sendCommand("Profiler.setSamplingInterval", { + interval: 100 + }), + this.sendCommand("Profiler.enable"), + this.sendCommand("Profiler.start") + ]); + } + + sendCommand(method, params) { + if (this.hasSession()) { + return new Promise((res, rej) => { + return this.session.post(method, params, (err, params) => { + if (err !== null) { + rej(err); + } else { + res(params); + } + }); + }); + } else { + return Promise.resolve(); + } + } + + destroy() { + if (this.hasSession()) { + this.session.disconnect(); + } + + return Promise.resolve(); + } + + stopProfiling() { + return this.sendCommand("Profiler.stop"); + } +} + +/** + * an object that wraps Tracer and Profiler with a counter + * @typedef {Object} Trace + * @property {Tracer} trace instance of Tracer + * @property {number} counter Counter + * @property {Profiler} profiler instance of Profiler + * @property {Function} end the end function + */ + +/** + * @param {string} outputPath The location where to write the log. + * @returns {Trace} The trace object + */ +const createTrace = outputPath => { + const trace = new Tracer({ + noStream: true + }); + const profiler = new Profiler(inspector); + if (/\/|\\/.test(outputPath)) { + const dirPath = path.dirname(outputPath); + mkdirp.sync(dirPath); + } + const fsStream = fs.createWriteStream(outputPath); + + let counter = 0; + + trace.pipe(fsStream); + // These are critical events that need to be inserted so that tools like + // chrome dev tools can load the profile. + trace.instantEvent({ + name: "TracingStartedInPage", + id: ++counter, + cat: ["disabled-by-default-devtools.timeline"], + args: { + data: { + sessionId: "-1", + page: "0xfff", + frames: [ + { + frame: "0xfff", + url: "webpack", + name: "" + } + ] + } + } + }); + + trace.instantEvent({ + name: "TracingStartedInBrowser", + id: ++counter, + cat: ["disabled-by-default-devtools.timeline"], + args: { + data: { + sessionId: "-1" + } + } + }); + + return { + trace, + counter, + profiler, + end: callback => { + // Wait until the write stream finishes. + fsStream.on("finish", () => { + callback(); + }); + // Tear down the readable trace stream. + trace.push(null); + } + }; +}; + +const pluginName = "ProfilingPlugin"; + +class ProfilingPlugin { + /** + * @param {ProfilingPluginOptions=} opts options object + */ + constructor(opts) { + validateOptions(schema, opts || {}, "Profiling plugin"); + opts = opts || {}; + this.outputPath = opts.outputPath || "events.json"; + } + + apply(compiler) { + const tracer = createTrace(this.outputPath); + tracer.profiler.startProfiling(); + + // Compiler Hooks + Object.keys(compiler.hooks).forEach(hookName => { + compiler.hooks[hookName].intercept( + makeInterceptorFor("Compiler", tracer)(hookName) + ); + }); + + Object.keys(compiler.resolverFactory.hooks).forEach(hookName => { + compiler.resolverFactory.hooks[hookName].intercept( + makeInterceptorFor("Resolver", tracer)(hookName) + ); + }); + + compiler.hooks.compilation.tap( + pluginName, + (compilation, { normalModuleFactory, contextModuleFactory }) => { + interceptAllHooksFor(compilation, tracer, "Compilation"); + interceptAllHooksFor( + normalModuleFactory, + tracer, + "Normal Module Factory" + ); + interceptAllHooksFor( + contextModuleFactory, + tracer, + "Context Module Factory" + ); + interceptAllParserHooks(normalModuleFactory, tracer); + interceptTemplateInstancesFrom(compilation, tracer); + } + ); + + // We need to write out the CPU profile when we are all done. + compiler.hooks.done.tapAsync( + { + name: pluginName, + stage: Infinity + }, + (stats, callback) => { + tracer.profiler.stopProfiling().then(parsedResults => { + if (parsedResults === undefined) { + tracer.profiler.destroy(); + tracer.trace.flush(); + tracer.end(callback); + return; + } + + const cpuStartTime = parsedResults.profile.startTime; + const cpuEndTime = parsedResults.profile.endTime; + + tracer.trace.completeEvent({ + name: "TaskQueueManager::ProcessTaskFromWorkQueue", + id: ++tracer.counter, + cat: ["toplevel"], + ts: cpuStartTime, + args: { + src_file: "../../ipc/ipc_moji_bootstrap.cc", + src_func: "Accept" + } + }); + + tracer.trace.completeEvent({ + name: "EvaluateScript", + id: ++tracer.counter, + cat: ["devtools.timeline"], + ts: cpuStartTime, + dur: cpuEndTime - cpuStartTime, + args: { + data: { + url: "webpack", + lineNumber: 1, + columnNumber: 1, + frame: "0xFFF" + } + } + }); + + tracer.trace.instantEvent({ + name: "CpuProfile", + id: ++tracer.counter, + cat: ["disabled-by-default-devtools.timeline"], + ts: cpuEndTime, + args: { + data: { + cpuProfile: parsedResults.profile + } + } + }); + + tracer.profiler.destroy(); + tracer.trace.flush(); + tracer.end(callback); + }); + } + ); + } +} + +const interceptTemplateInstancesFrom = (compilation, tracer) => { + const { + mainTemplate, + chunkTemplate, + hotUpdateChunkTemplate, + moduleTemplates + } = compilation; + + const { javascript, webassembly } = moduleTemplates; + + [ + { + instance: mainTemplate, + name: "MainTemplate" + }, + { + instance: chunkTemplate, + name: "ChunkTemplate" + }, + { + instance: hotUpdateChunkTemplate, + name: "HotUpdateChunkTemplate" + }, + { + instance: javascript, + name: "JavaScriptModuleTemplate" + }, + { + instance: webassembly, + name: "WebAssemblyModuleTemplate" + } + ].forEach(templateObject => { + Object.keys(templateObject.instance.hooks).forEach(hookName => { + templateObject.instance.hooks[hookName].intercept( + makeInterceptorFor(templateObject.name, tracer)(hookName) + ); + }); + }); +}; + +const interceptAllHooksFor = (instance, tracer, logLabel) => { + if (Reflect.has(instance, "hooks")) { + Object.keys(instance.hooks).forEach(hookName => { + instance.hooks[hookName].intercept( + makeInterceptorFor(logLabel, tracer)(hookName) + ); + }); + } +}; + +const interceptAllParserHooks = (moduleFactory, tracer) => { + const moduleTypes = [ + "javascript/auto", + "javascript/dynamic", + "javascript/esm", + "json", + "webassembly/experimental" + ]; + + moduleTypes.forEach(moduleType => { + moduleFactory.hooks.parser + .for(moduleType) + .tap("ProfilingPlugin", (parser, parserOpts) => { + interceptAllHooksFor(parser, tracer, "Parser"); + }); + }); +}; + +const makeInterceptorFor = (instance, tracer) => hookName => ({ + register: ({ name, type, context, fn }) => { + const newFn = makeNewProfiledTapFn(hookName, tracer, { + name, + type, + fn + }); + return { + name, + type, + context, + fn: newFn + }; + } +}); + +// TODO improve typing +/** @typedef {(...args: TODO[]) => void | Promise} PluginFunction */ + +/** + * @param {string} hookName Name of the hook to profile. + * @param {Trace} tracer The trace object. + * @param {object} options Options for the profiled fn. + * @param {string} options.name Plugin name + * @param {string} options.type Plugin type (sync | async | promise) + * @param {PluginFunction} options.fn Plugin function + * @returns {PluginFunction} Chainable hooked function. + */ +const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => { + const defaultCategory = ["blink.user_timing"]; + + switch (type) { + case "promise": + return (...args) => { + const id = ++tracer.counter; + tracer.trace.begin({ + name, + id, + cat: defaultCategory + }); + const promise = /** @type {Promise<*>} */ (fn(...args)); + return promise.then(r => { + tracer.trace.end({ + name, + id, + cat: defaultCategory + }); + return r; + }); + }; + case "async": + return (...args) => { + const id = ++tracer.counter; + tracer.trace.begin({ + name, + id, + cat: defaultCategory + }); + const callback = args.pop(); + fn(...args, (...r) => { + tracer.trace.end({ + name, + id, + cat: defaultCategory + }); + callback(...r); + }); + }; + case "sync": + return (...args) => { + const id = ++tracer.counter; + // Do not instrument ourself due to the CPU + // profile needing to be the last event in the trace. + if (name === pluginName) { + return fn(...args); + } + + tracer.trace.begin({ + name, + id, + cat: defaultCategory + }); + let r; + try { + r = fn(...args); + } catch (error) { + tracer.trace.end({ + name, + id, + cat: defaultCategory + }); + throw error; + } + tracer.trace.end({ + name, + id, + cat: defaultCategory + }); + return r; + }; + default: + break; + } +}; + +module.exports = ProfilingPlugin; +module.exports.Profiler = Profiler; + + +/***/ }), + +/***/ 67045: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class AMDDefineDependency extends NullDependency { + constructor(range, arrayRange, functionRange, objectRange, namedModule) { + super(); + this.range = range; + this.arrayRange = arrayRange; + this.functionRange = functionRange; + this.objectRange = objectRange; + this.namedModule = namedModule; + this.localModule = null; + } + + get type() { + return "amd define"; + } +} + +AMDDefineDependency.Template = class AMDDefineDependencyTemplate { + get definitions() { + return { + f: [ + "var __WEBPACK_AMD_DEFINE_RESULT__;", + `!(__WEBPACK_AMD_DEFINE_RESULT__ = (#).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))` + ], + o: ["", "!(module.exports = #)"], + of: [ + "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;", + `!(__WEBPACK_AMD_DEFINE_FACTORY__ = (#), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))` + ], + af: [ + "var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;", + `!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, __WEBPACK_AMD_DEFINE_RESULT__ = (#).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))` + ], + ao: ["", "!(#, module.exports = #)"], + aof: [ + "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;", + `!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, __WEBPACK_AMD_DEFINE_FACTORY__ = (#), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))` + ], + lf: [ + "var XXX, XXXmodule;", + "!(XXXmodule = { id: YYY, exports: {}, loaded: false }, XXX = #.call(XXXmodule.exports, __webpack_require__, XXXmodule.exports, XXXmodule), XXXmodule.loaded = true, XXX === undefined && (XXX = XXXmodule.exports))" + ], + lo: ["var XXX;", "!(XXX = #)"], + lof: [ + "var XXX, XXXfactory, XXXmodule;", + "!(XXXfactory = (#), (XXXmodule = { id: YYY, exports: {}, loaded: false }), XXX = (typeof XXXfactory === 'function' ? (XXXfactory.call(XXXmodule.exports, __webpack_require__, XXXmodule.exports, XXXmodule)) : XXXfactory), (XXXmodule.loaded = true), XXX === undefined && (XXX = XXXmodule.exports))" + ], + laf: [ + "var __WEBPACK_AMD_DEFINE_ARRAY__, XXX;", + "!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, XXX = ((#).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)))" + ], + lao: ["var XXX;", "!(#, XXX = #)"], + laof: [ + "var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_FACTORY__, XXX;", + `!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, __WEBPACK_AMD_DEFINE_FACTORY__ = (#), + XXX = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__))` + ] + }; + } + + apply(dependency, source) { + const branch = this.branch(dependency); + const defAndText = this.definitions[branch]; + const definitions = defAndText[0]; + const text = defAndText[1]; + this.replace(dependency, source, definitions, text); + } + + localModuleVar(dependency) { + return ( + dependency.localModule && + dependency.localModule.used && + dependency.localModule.variableName() + ); + } + + branch(dependency) { + const localModuleVar = this.localModuleVar(dependency) ? "l" : ""; + const arrayRange = dependency.arrayRange ? "a" : ""; + const objectRange = dependency.objectRange ? "o" : ""; + const functionRange = dependency.functionRange ? "f" : ""; + return localModuleVar + arrayRange + objectRange + functionRange; + } + + replace(dependency, source, definition, text) { + const localModuleVar = this.localModuleVar(dependency); + if (localModuleVar) { + text = text.replace(/XXX/g, localModuleVar.replace(/\$/g, "$$$$")); + definition = definition.replace( + /XXX/g, + localModuleVar.replace(/\$/g, "$$$$") + ); + } + + if (dependency.namedModule) { + text = text.replace(/YYY/g, JSON.stringify(dependency.namedModule)); + } + + const texts = text.split("#"); + + if (definition) source.insert(0, definition); + + let current = dependency.range[0]; + if (dependency.arrayRange) { + source.replace(current, dependency.arrayRange[0] - 1, texts.shift()); + current = dependency.arrayRange[1]; + } + + if (dependency.objectRange) { + source.replace(current, dependency.objectRange[0] - 1, texts.shift()); + current = dependency.objectRange[1]; + } else if (dependency.functionRange) { + source.replace(current, dependency.functionRange[0] - 1, texts.shift()); + current = dependency.functionRange[1]; + } + source.replace(current, dependency.range[1] - 1, texts.shift()); + if (texts.length > 0) throw new Error("Implementation error"); + } +}; + +module.exports = AMDDefineDependency; + + +/***/ }), + +/***/ 27057: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const AMDRequireItemDependency = __webpack_require__(34345); +const AMDRequireContextDependency = __webpack_require__(99890); +const ConstDependency = __webpack_require__(71101); +const AMDDefineDependency = __webpack_require__(67045); +const AMDRequireArrayDependency = __webpack_require__(63960); +const LocalModuleDependency = __webpack_require__(56570); +const ContextDependencyHelpers = __webpack_require__(5594); +const LocalModulesHelpers = __webpack_require__(39658); + +const isBoundFunctionExpression = expr => { + if (expr.type !== "CallExpression") return false; + if (expr.callee.type !== "MemberExpression") return false; + if (expr.callee.computed) return false; + if (expr.callee.object.type !== "FunctionExpression") return false; + if (expr.callee.property.type !== "Identifier") return false; + if (expr.callee.property.name !== "bind") return false; + return true; +}; + +const isUnboundFunctionExpression = expr => { + if (expr.type === "FunctionExpression") return true; + if (expr.type === "ArrowFunctionExpression") return true; + return false; +}; + +const isCallable = expr => { + if (isUnboundFunctionExpression(expr)) return true; + if (isBoundFunctionExpression(expr)) return true; + return false; +}; + +class AMDDefineDependencyParserPlugin { + constructor(options) { + this.options = options; + } + + apply(parser) { + parser.hooks.call + .for("define") + .tap( + "AMDDefineDependencyParserPlugin", + this.processCallDefine.bind(this, parser) + ); + } + + processArray(parser, expr, param, identifiers, namedModule) { + if (param.isArray()) { + param.items.forEach((param, idx) => { + if ( + param.isString() && + ["require", "module", "exports"].includes(param.string) + ) + identifiers[idx] = param.string; + const result = this.processItem(parser, expr, param, namedModule); + if (result === undefined) { + this.processContext(parser, expr, param); + } + }); + return true; + } else if (param.isConstArray()) { + const deps = []; + param.array.forEach((request, idx) => { + let dep; + let localModule; + if (request === "require") { + identifiers[idx] = request; + dep = "__webpack_require__"; + } else if (["exports", "module"].includes(request)) { + identifiers[idx] = request; + dep = request; + } else if ( + (localModule = LocalModulesHelpers.getLocalModule( + parser.state, + request + )) + ) { + dep = new LocalModuleDependency(localModule, undefined, false); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + } else { + dep = this.newRequireItemDependency(request); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + } + deps.push(dep); + }); + const dep = this.newRequireArrayDependency(deps, param.range); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + } + processItem(parser, expr, param, namedModule) { + if (param.isConditional()) { + param.options.forEach(param => { + const result = this.processItem(parser, expr, param); + if (result === undefined) { + this.processContext(parser, expr, param); + } + }); + return true; + } else if (param.isString()) { + let dep, localModule; + if (param.string === "require") { + dep = new ConstDependency("__webpack_require__", param.range); + } else if (["require", "exports", "module"].includes(param.string)) { + dep = new ConstDependency(param.string, param.range); + } else if ( + (localModule = LocalModulesHelpers.getLocalModule( + parser.state, + param.string, + namedModule + )) + ) { + dep = new LocalModuleDependency(localModule, param.range, false); + } else { + dep = this.newRequireItemDependency(param.string, param.range); + } + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + } + processContext(parser, expr, param) { + const dep = ContextDependencyHelpers.create( + AMDRequireContextDependency, + param.range, + param, + expr, + this.options, + {}, + parser + ); + if (!dep) return; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + + processCallDefine(parser, expr) { + let array, fn, obj, namedModule; + switch (expr.arguments.length) { + case 1: + if (isCallable(expr.arguments[0])) { + // define(f() {…}) + fn = expr.arguments[0]; + } else if (expr.arguments[0].type === "ObjectExpression") { + // define({…}) + obj = expr.arguments[0]; + } else { + // define(expr) + // unclear if function or object + obj = fn = expr.arguments[0]; + } + break; + case 2: + if (expr.arguments[0].type === "Literal") { + namedModule = expr.arguments[0].value; + // define("…", …) + if (isCallable(expr.arguments[1])) { + // define("…", f() {…}) + fn = expr.arguments[1]; + } else if (expr.arguments[1].type === "ObjectExpression") { + // define("…", {…}) + obj = expr.arguments[1]; + } else { + // define("…", expr) + // unclear if function or object + obj = fn = expr.arguments[1]; + } + } else { + array = expr.arguments[0]; + if (isCallable(expr.arguments[1])) { + // define([…], f() {}) + fn = expr.arguments[1]; + } else if (expr.arguments[1].type === "ObjectExpression") { + // define([…], {…}) + obj = expr.arguments[1]; + } else { + // define([…], expr) + // unclear if function or object + obj = fn = expr.arguments[1]; + } + } + break; + case 3: + // define("…", […], f() {…}) + namedModule = expr.arguments[0].value; + array = expr.arguments[1]; + if (isCallable(expr.arguments[2])) { + // define("…", […], f() {}) + fn = expr.arguments[2]; + } else if (expr.arguments[2].type === "ObjectExpression") { + // define("…", […], {…}) + obj = expr.arguments[2]; + } else { + // define("…", […], expr) + // unclear if function or object + obj = fn = expr.arguments[2]; + } + break; + default: + return; + } + let fnParams = null; + let fnParamsOffset = 0; + if (fn) { + if (isUnboundFunctionExpression(fn)) { + fnParams = fn.params; + } else if (isBoundFunctionExpression(fn)) { + fnParams = fn.callee.object.params; + fnParamsOffset = fn.arguments.length - 1; + if (fnParamsOffset < 0) { + fnParamsOffset = 0; + } + } + } + let fnRenames = parser.scope.renames.createChild(); + if (array) { + const identifiers = {}; + const param = parser.evaluateExpression(array); + const result = this.processArray( + parser, + expr, + param, + identifiers, + namedModule + ); + if (!result) return; + if (fnParams) { + fnParams = fnParams.slice(fnParamsOffset).filter((param, idx) => { + if (identifiers[idx]) { + fnRenames.set(param.name, identifiers[idx]); + return false; + } + return true; + }); + } + } else { + const identifiers = ["require", "exports", "module"]; + if (fnParams) { + fnParams = fnParams.slice(fnParamsOffset).filter((param, idx) => { + if (identifiers[idx]) { + fnRenames.set(param.name, identifiers[idx]); + return false; + } + return true; + }); + } + } + let inTry; + if (fn && isUnboundFunctionExpression(fn)) { + inTry = parser.scope.inTry; + parser.inScope(fnParams, () => { + parser.scope.renames = fnRenames; + parser.scope.inTry = inTry; + if (fn.body.type === "BlockStatement") { + parser.walkStatement(fn.body); + } else { + parser.walkExpression(fn.body); + } + }); + } else if (fn && isBoundFunctionExpression(fn)) { + inTry = parser.scope.inTry; + parser.inScope( + fn.callee.object.params.filter( + i => !["require", "module", "exports"].includes(i.name) + ), + () => { + parser.scope.renames = fnRenames; + parser.scope.inTry = inTry; + if (fn.callee.object.body.type === "BlockStatement") { + parser.walkStatement(fn.callee.object.body); + } else { + parser.walkExpression(fn.callee.object.body); + } + } + ); + if (fn.arguments) { + parser.walkExpressions(fn.arguments); + } + } else if (fn || obj) { + parser.walkExpression(fn || obj); + } + + const dep = this.newDefineDependency( + expr.range, + array ? array.range : null, + fn ? fn.range : null, + obj ? obj.range : null, + namedModule ? namedModule : null + ); + dep.loc = expr.loc; + if (namedModule) { + dep.localModule = LocalModulesHelpers.addLocalModule( + parser.state, + namedModule + ); + } + parser.state.current.addDependency(dep); + return true; + } + + newDefineDependency( + range, + arrayRange, + functionRange, + objectRange, + namedModule + ) { + return new AMDDefineDependency( + range, + arrayRange, + functionRange, + objectRange, + namedModule + ); + } + newRequireArrayDependency(depsArray, range) { + return new AMDRequireArrayDependency(depsArray, range); + } + newRequireItemDependency(request, range) { + return new AMDRequireItemDependency(request, range); + } +} +module.exports = AMDDefineDependencyParserPlugin; + + +/***/ }), + +/***/ 85812: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); +const AMDRequireDependency = __webpack_require__(73985); +const AMDRequireItemDependency = __webpack_require__(34345); +const AMDRequireArrayDependency = __webpack_require__(63960); +const AMDRequireContextDependency = __webpack_require__(99890); +const AMDDefineDependency = __webpack_require__(67045); +const UnsupportedDependency = __webpack_require__(15826); +const LocalModuleDependency = __webpack_require__(56570); + +const NullFactory = __webpack_require__(40438); + +const AMDRequireDependenciesBlockParserPlugin = __webpack_require__(9994); +const AMDDefineDependencyParserPlugin = __webpack_require__(27057); + +const AliasPlugin = __webpack_require__(15005); + +const ParserHelpers = __webpack_require__(23999); + +class AMDPlugin { + constructor(options, amdOptions) { + this.amdOptions = amdOptions; + this.options = options; + } + + apply(compiler) { + const options = this.options; + const amdOptions = this.amdOptions; + compiler.hooks.compilation.tap( + "AMDPlugin", + (compilation, { contextModuleFactory, normalModuleFactory }) => { + compilation.dependencyFactories.set( + AMDRequireDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + AMDRequireDependency, + new AMDRequireDependency.Template() + ); + + compilation.dependencyFactories.set( + AMDRequireItemDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + AMDRequireItemDependency, + new AMDRequireItemDependency.Template() + ); + + compilation.dependencyFactories.set( + AMDRequireArrayDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + AMDRequireArrayDependency, + new AMDRequireArrayDependency.Template() + ); + + compilation.dependencyFactories.set( + AMDRequireContextDependency, + contextModuleFactory + ); + compilation.dependencyTemplates.set( + AMDRequireContextDependency, + new AMDRequireContextDependency.Template() + ); + + compilation.dependencyFactories.set( + AMDDefineDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + AMDDefineDependency, + new AMDDefineDependency.Template() + ); + + compilation.dependencyFactories.set( + UnsupportedDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + UnsupportedDependency, + new UnsupportedDependency.Template() + ); + + compilation.dependencyFactories.set( + LocalModuleDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + LocalModuleDependency, + new LocalModuleDependency.Template() + ); + + const handler = (parser, parserOptions) => { + if (parserOptions.amd !== undefined && !parserOptions.amd) return; + + const setExpressionToModule = (outerExpr, module) => { + parser.hooks.expression.for(outerExpr).tap("AMDPlugin", expr => { + const dep = new AMDRequireItemDependency(module, expr.range); + dep.userRequest = outerExpr; + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + return true; + }); + }; + + new AMDRequireDependenciesBlockParserPlugin(options).apply(parser); + new AMDDefineDependencyParserPlugin(options).apply(parser); + + setExpressionToModule("require.amd", "!!webpack amd options"); + setExpressionToModule("define.amd", "!!webpack amd options"); + setExpressionToModule("define", "!!webpack amd define"); + + parser.hooks.expression + .for("__webpack_amd_options__") + .tap("AMDPlugin", () => + parser.state.current.addVariable( + "__webpack_amd_options__", + JSON.stringify(amdOptions) + ) + ); + parser.hooks.evaluateTypeof + .for("define.amd") + .tap( + "AMDPlugin", + ParserHelpers.evaluateToString(typeof amdOptions) + ); + parser.hooks.evaluateTypeof + .for("require.amd") + .tap( + "AMDPlugin", + ParserHelpers.evaluateToString(typeof amdOptions) + ); + parser.hooks.evaluateIdentifier + .for("define.amd") + .tap( + "AMDPlugin", + ParserHelpers.evaluateToIdentifier("define.amd", true) + ); + parser.hooks.evaluateIdentifier + .for("require.amd") + .tap( + "AMDPlugin", + ParserHelpers.evaluateToIdentifier("require.amd", true) + ); + parser.hooks.typeof + .for("define") + .tap( + "AMDPlugin", + ParserHelpers.toConstantDependency( + parser, + JSON.stringify("function") + ) + ); + parser.hooks.evaluateTypeof + .for("define") + .tap("AMDPlugin", ParserHelpers.evaluateToString("function")); + parser.hooks.canRename + .for("define") + .tap("AMDPlugin", ParserHelpers.approve); + parser.hooks.rename.for("define").tap("AMDPlugin", expr => { + const dep = new AMDRequireItemDependency( + "!!webpack amd define", + expr.range + ); + dep.userRequest = "define"; + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + return false; + }); + parser.hooks.typeof + .for("require") + .tap( + "AMDPlugin", + ParserHelpers.toConstantDependency( + parser, + JSON.stringify("function") + ) + ); + parser.hooks.evaluateTypeof + .for("require") + .tap("AMDPlugin", ParserHelpers.evaluateToString("function")); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("AMDPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("AMDPlugin", handler); + } + ); + compiler.hooks.afterResolvers.tap("AMDPlugin", () => { + compiler.resolverFactory.hooks.resolver + .for("normal") + .tap("AMDPlugin", resolver => { + new AliasPlugin( + "described-resolve", + { + name: "amdefine", + alias: __webpack_require__.ab + "amd-define.js" + }, + "resolve" + ).apply(resolver); + new AliasPlugin( + "described-resolve", + { + name: "webpack amd options", + alias: __webpack_require__.ab + "amd-options.js" + }, + "resolve" + ).apply(resolver); + new AliasPlugin( + "described-resolve", + { + name: "webpack amd define", + alias: __webpack_require__.ab + "amd-define.js" + }, + "resolve" + ).apply(resolver); + }); + }); + } +} +module.exports = AMDPlugin; + + +/***/ }), + +/***/ 63960: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const Dependency = __webpack_require__(57282); + +class AMDRequireArrayDependency extends Dependency { + constructor(depsArray, range) { + super(); + this.depsArray = depsArray; + this.range = range; + } + + get type() { + return "amd require array"; + } +} + +AMDRequireArrayDependency.Template = class AMDRequireArrayDependencyTemplate { + apply(dep, source, runtime) { + const content = this.getContent(dep, runtime); + source.replace(dep.range[0], dep.range[1] - 1, content); + } + + getContent(dep, runtime) { + const requires = dep.depsArray.map(dependency => { + return this.contentForDependency(dependency, runtime); + }); + return `[${requires.join(", ")}]`; + } + + contentForDependency(dep, runtime) { + if (typeof dep === "string") { + return dep; + } + + if (dep.localModule) { + return dep.localModule.variableName(); + } else { + return runtime.moduleExports({ + module: dep.module, + request: dep.request + }); + } + } +}; + +module.exports = AMDRequireArrayDependency; + + +/***/ }), + +/***/ 99890: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ContextDependency = __webpack_require__(11583); +class AMDRequireContextDependency extends ContextDependency { + constructor(options, range, valueRange) { + super(options); + this.range = range; + this.valueRange = valueRange; + } + + get type() { + return "amd require context"; + } +} +AMDRequireContextDependency.Template = __webpack_require__(54380); +module.exports = AMDRequireContextDependency; + + +/***/ }), + +/***/ 32894: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const AsyncDependenciesBlock = __webpack_require__(22814); +const AMDRequireDependency = __webpack_require__(73985); + +module.exports = class AMDRequireDependenciesBlock extends AsyncDependenciesBlock { + constructor( + expr, + arrayRange, + functionRange, + errorCallbackRange, + module, + loc, + request + ) { + super(null, module, loc, request); + this.expr = expr; + this.outerRange = expr.range; + this.arrayRange = arrayRange; + this.functionBindThis = false; + this.functionRange = functionRange; + this.errorCallbackBindThis = false; + this.errorCallbackRange = errorCallbackRange; + this.bindThis = true; + if (arrayRange && functionRange && errorCallbackRange) { + this.range = [arrayRange[0], errorCallbackRange[1]]; + } else if (arrayRange && functionRange) { + this.range = [arrayRange[0], functionRange[1]]; + } else if (arrayRange) { + this.range = arrayRange; + } else if (functionRange) { + this.range = functionRange; + } else { + this.range = expr.range; + } + const dep = this.newRequireDependency(); + dep.loc = loc; + this.addDependency(dep); + } + + newRequireDependency() { + return new AMDRequireDependency(this); + } +}; + + +/***/ }), + +/***/ 9994: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const AMDRequireItemDependency = __webpack_require__(34345); +const AMDRequireArrayDependency = __webpack_require__(63960); +const AMDRequireContextDependency = __webpack_require__(99890); +const AMDRequireDependenciesBlock = __webpack_require__(32894); +const UnsupportedDependency = __webpack_require__(15826); +const LocalModuleDependency = __webpack_require__(56570); +const ContextDependencyHelpers = __webpack_require__(5594); +const LocalModulesHelpers = __webpack_require__(39658); +const ConstDependency = __webpack_require__(71101); +const getFunctionExpression = __webpack_require__(64197); +const UnsupportedFeatureWarning = __webpack_require__(99953); + +class AMDRequireDependenciesBlockParserPlugin { + constructor(options) { + this.options = options; + } + + processFunctionArgument(parser, expression) { + let bindThis = true; + const fnData = getFunctionExpression(expression); + if (fnData) { + parser.inScope( + fnData.fn.params.filter(i => { + return !["require", "module", "exports"].includes(i.name); + }), + () => { + if (fnData.fn.body.type === "BlockStatement") { + parser.walkStatement(fnData.fn.body); + } else { + parser.walkExpression(fnData.fn.body); + } + } + ); + parser.walkExpressions(fnData.expressions); + if (fnData.needThis === false) { + bindThis = false; + } + } else { + parser.walkExpression(expression); + } + return bindThis; + } + + apply(parser) { + parser.hooks.call + .for("require") + .tap( + "AMDRequireDependenciesBlockParserPlugin", + this.processCallRequire.bind(this, parser) + ); + } + + processArray(parser, expr, param) { + if (param.isArray()) { + for (const p of param.items) { + const result = this.processItem(parser, expr, p); + if (result === undefined) { + this.processContext(parser, expr, p); + } + } + return true; + } else if (param.isConstArray()) { + const deps = []; + for (const request of param.array) { + let dep, localModule; + if (request === "require") { + dep = "__webpack_require__"; + } else if (["exports", "module"].includes(request)) { + dep = request; + } else if ( + (localModule = LocalModulesHelpers.getLocalModule( + parser.state, + request + )) + ) { + dep = new LocalModuleDependency(localModule, undefined, false); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + } else { + dep = this.newRequireItemDependency(request); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + } + deps.push(dep); + } + const dep = this.newRequireArrayDependency(deps, param.range); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + } + processItem(parser, expr, param) { + if (param.isConditional()) { + for (const p of param.options) { + const result = this.processItem(parser, expr, p); + if (result === undefined) { + this.processContext(parser, expr, p); + } + } + return true; + } else if (param.isString()) { + let dep, localModule; + if (param.string === "require") { + dep = new ConstDependency("__webpack_require__", param.string); + } else if (param.string === "module") { + dep = new ConstDependency( + parser.state.module.buildInfo.moduleArgument, + param.range + ); + } else if (param.string === "exports") { + dep = new ConstDependency( + parser.state.module.buildInfo.exportsArgument, + param.range + ); + } else if ( + (localModule = LocalModulesHelpers.getLocalModule( + parser.state, + param.string + )) + ) { + dep = new LocalModuleDependency(localModule, param.range, false); + } else { + dep = this.newRequireItemDependency(param.string, param.range); + } + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + } + processContext(parser, expr, param) { + const dep = ContextDependencyHelpers.create( + AMDRequireContextDependency, + param.range, + param, + expr, + this.options, + {}, + parser + ); + if (!dep) return; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + + processArrayForRequestString(param) { + if (param.isArray()) { + const result = param.items.map(item => + this.processItemForRequestString(item) + ); + if (result.every(Boolean)) return result.join(" "); + } else if (param.isConstArray()) { + return param.array.join(" "); + } + } + + processItemForRequestString(param) { + if (param.isConditional()) { + const result = param.options.map(item => + this.processItemForRequestString(item) + ); + if (result.every(Boolean)) return result.join("|"); + } else if (param.isString()) { + return param.string; + } + } + + processCallRequire(parser, expr) { + let param; + let dep; + let result; + + const old = parser.state.current; + + if (expr.arguments.length >= 1) { + param = parser.evaluateExpression(expr.arguments[0]); + dep = this.newRequireDependenciesBlock( + expr, + param.range, + expr.arguments.length > 1 ? expr.arguments[1].range : null, + expr.arguments.length > 2 ? expr.arguments[2].range : null, + parser.state.module, + expr.loc, + this.processArrayForRequestString(param) + ); + parser.state.current = dep; + } + + if (expr.arguments.length === 1) { + parser.inScope([], () => { + result = this.processArray(parser, expr, param); + }); + parser.state.current = old; + if (!result) return; + parser.state.current.addBlock(dep); + return true; + } + + if (expr.arguments.length === 2 || expr.arguments.length === 3) { + try { + parser.inScope([], () => { + result = this.processArray(parser, expr, param); + }); + if (!result) { + dep = new UnsupportedDependency("unsupported", expr.range); + old.addDependency(dep); + if (parser.state.module) { + parser.state.module.errors.push( + new UnsupportedFeatureWarning( + parser.state.module, + "Cannot statically analyse 'require(…, …)' in line " + + expr.loc.start.line, + expr.loc + ) + ); + } + dep = null; + return true; + } + dep.functionBindThis = this.processFunctionArgument( + parser, + expr.arguments[1] + ); + if (expr.arguments.length === 3) { + dep.errorCallbackBindThis = this.processFunctionArgument( + parser, + expr.arguments[2] + ); + } + } finally { + parser.state.current = old; + if (dep) parser.state.current.addBlock(dep); + } + return true; + } + } + + newRequireDependenciesBlock( + expr, + arrayRange, + functionRange, + errorCallbackRange, + module, + loc, + request + ) { + return new AMDRequireDependenciesBlock( + expr, + arrayRange, + functionRange, + errorCallbackRange, + module, + loc, + request + ); + } + newRequireItemDependency(request, range) { + return new AMDRequireItemDependency(request, range); + } + newRequireArrayDependency(depsArray, range) { + return new AMDRequireArrayDependency(depsArray, range); + } +} +module.exports = AMDRequireDependenciesBlockParserPlugin; + + +/***/ }), + +/***/ 73985: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class AMDRequireDependency extends NullDependency { + constructor(block) { + super(); + this.block = block; + } +} + +AMDRequireDependency.Template = class AMDRequireDependencyTemplate { + apply(dep, source, runtime) { + const depBlock = dep.block; + const promise = runtime.blockPromise({ + block: depBlock, + message: "AMD require" + }); + + // has array range but no function range + if (depBlock.arrayRange && !depBlock.functionRange) { + const startBlock = `${promise}.then(function() {`; + const endBlock = `;}).catch(${runtime.onError()})`; + source.replace( + depBlock.outerRange[0], + depBlock.arrayRange[0] - 1, + startBlock + ); + source.replace( + depBlock.arrayRange[1], + depBlock.outerRange[1] - 1, + endBlock + ); + return; + } + + // has function range but no array range + if (depBlock.functionRange && !depBlock.arrayRange) { + const startBlock = `${promise}.then((`; + const endBlock = `).bind(exports, __webpack_require__, exports, module)).catch(${runtime.onError()})`; + source.replace( + depBlock.outerRange[0], + depBlock.functionRange[0] - 1, + startBlock + ); + source.replace( + depBlock.functionRange[1], + depBlock.outerRange[1] - 1, + endBlock + ); + return; + } + + // has array range, function range, and errorCallbackRange + if ( + depBlock.arrayRange && + depBlock.functionRange && + depBlock.errorCallbackRange + ) { + const startBlock = `${promise}.then(function() { `; + const errorRangeBlock = `}${ + depBlock.functionBindThis ? ".bind(this)" : "" + }).catch(`; + const endBlock = `${ + depBlock.errorCallbackBindThis ? ".bind(this)" : "" + })`; + + source.replace( + depBlock.outerRange[0], + depBlock.arrayRange[0] - 1, + startBlock + ); + source.insert( + depBlock.arrayRange[0] + 0.9, + "var __WEBPACK_AMD_REQUIRE_ARRAY__ = " + ); + source.replace( + depBlock.arrayRange[1], + depBlock.functionRange[0] - 1, + "; (" + ); + source.insert( + depBlock.functionRange[1], + ").apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);" + ); + source.replace( + depBlock.functionRange[1], + depBlock.errorCallbackRange[0] - 1, + errorRangeBlock + ); + source.replace( + depBlock.errorCallbackRange[1], + depBlock.outerRange[1] - 1, + endBlock + ); + return; + } + + // has array range, function range, but no errorCallbackRange + if (depBlock.arrayRange && depBlock.functionRange) { + const startBlock = `${promise}.then(function() { `; + const endBlock = `}${ + depBlock.functionBindThis ? ".bind(this)" : "" + }).catch(${runtime.onError()})`; + source.replace( + depBlock.outerRange[0], + depBlock.arrayRange[0] - 1, + startBlock + ); + source.insert( + depBlock.arrayRange[0] + 0.9, + "var __WEBPACK_AMD_REQUIRE_ARRAY__ = " + ); + source.replace( + depBlock.arrayRange[1], + depBlock.functionRange[0] - 1, + "; (" + ); + source.insert( + depBlock.functionRange[1], + ").apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);" + ); + source.replace( + depBlock.functionRange[1], + depBlock.outerRange[1] - 1, + endBlock + ); + } + } +}; + +module.exports = AMDRequireDependency; + + +/***/ }), + +/***/ 34345: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); +const ModuleDependencyTemplateAsRequireId = __webpack_require__(60441); + +class AMDRequireItemDependency extends ModuleDependency { + constructor(request, range) { + super(request); + this.range = range; + } + + get type() { + return "amd require"; + } +} + +AMDRequireItemDependency.Template = ModuleDependencyTemplateAsRequireId; + +module.exports = AMDRequireItemDependency; + + +/***/ }), + +/***/ 85358: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ConstDependency = __webpack_require__(71101); +const CommonJsRequireDependency = __webpack_require__(37504); +const CommonJsRequireContextDependency = __webpack_require__(26791); +const RequireResolveDependency = __webpack_require__(43519); +const RequireResolveContextDependency = __webpack_require__(83309); +const RequireResolveHeaderDependency = __webpack_require__(69647); +const RequireHeaderDependency = __webpack_require__(22928); + +const NullFactory = __webpack_require__(40438); + +const RequireResolveDependencyParserPlugin = __webpack_require__(68349); +const CommonJsRequireDependencyParserPlugin = __webpack_require__(37278); + +const ParserHelpers = __webpack_require__(23999); + +class CommonJsPlugin { + constructor(options) { + this.options = options; + } + + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap( + "CommonJsPlugin", + (compilation, { contextModuleFactory, normalModuleFactory }) => { + compilation.dependencyFactories.set( + CommonJsRequireDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + CommonJsRequireDependency, + new CommonJsRequireDependency.Template() + ); + + compilation.dependencyFactories.set( + CommonJsRequireContextDependency, + contextModuleFactory + ); + compilation.dependencyTemplates.set( + CommonJsRequireContextDependency, + new CommonJsRequireContextDependency.Template() + ); + + compilation.dependencyFactories.set( + RequireResolveDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + RequireResolveDependency, + new RequireResolveDependency.Template() + ); + + compilation.dependencyFactories.set( + RequireResolveContextDependency, + contextModuleFactory + ); + compilation.dependencyTemplates.set( + RequireResolveContextDependency, + new RequireResolveContextDependency.Template() + ); + + compilation.dependencyFactories.set( + RequireResolveHeaderDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + RequireResolveHeaderDependency, + new RequireResolveHeaderDependency.Template() + ); + + compilation.dependencyFactories.set( + RequireHeaderDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + RequireHeaderDependency, + new RequireHeaderDependency.Template() + ); + + const handler = (parser, parserOptions) => { + if (parserOptions.commonjs !== undefined && !parserOptions.commonjs) + return; + + const requireExpressions = [ + "require", + "require.resolve", + "require.resolveWeak" + ]; + for (let expression of requireExpressions) { + parser.hooks.typeof + .for(expression) + .tap( + "CommonJsPlugin", + ParserHelpers.toConstantDependency( + parser, + JSON.stringify("function") + ) + ); + parser.hooks.evaluateTypeof + .for(expression) + .tap( + "CommonJsPlugin", + ParserHelpers.evaluateToString("function") + ); + parser.hooks.evaluateIdentifier + .for(expression) + .tap( + "CommonJsPlugin", + ParserHelpers.evaluateToIdentifier(expression, true) + ); + } + + parser.hooks.evaluateTypeof + .for("module") + .tap("CommonJsPlugin", ParserHelpers.evaluateToString("object")); + parser.hooks.assign.for("require").tap("CommonJsPlugin", expr => { + // to not leak to global "require", we need to define a local require here. + const dep = new ConstDependency("var require;", 0); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + parser.scope.definitions.add("require"); + return true; + }); + parser.hooks.canRename + .for("require") + .tap("CommonJsPlugin", () => true); + parser.hooks.rename.for("require").tap("CommonJsPlugin", expr => { + // define the require variable. It's still undefined, but not "not defined". + const dep = new ConstDependency("var require;", 0); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + return false; + }); + parser.hooks.typeof.for("module").tap("CommonJsPlugin", () => true); + parser.hooks.evaluateTypeof + .for("exports") + .tap("CommonJsPlugin", ParserHelpers.evaluateToString("object")); + + new CommonJsRequireDependencyParserPlugin(options).apply(parser); + new RequireResolveDependencyParserPlugin(options).apply(parser); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("CommonJsPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("CommonJsPlugin", handler); + } + ); + } +} +module.exports = CommonJsPlugin; + + +/***/ }), + +/***/ 26791: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ContextDependency = __webpack_require__(11583); +const ContextDependencyTemplateAsRequireCall = __webpack_require__(54380); + +class CommonJsRequireContextDependency extends ContextDependency { + constructor(options, range, valueRange) { + super(options); + this.range = range; + this.valueRange = valueRange; + } + + get type() { + return "cjs require context"; + } +} + +CommonJsRequireContextDependency.Template = ContextDependencyTemplateAsRequireCall; + +module.exports = CommonJsRequireContextDependency; + + +/***/ }), + +/***/ 37504: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); +const ModuleDependencyTemplateAsId = __webpack_require__(63708); + +class CommonJsRequireDependency extends ModuleDependency { + constructor(request, range) { + super(request); + this.range = range; + } + + get type() { + return "cjs require"; + } +} + +CommonJsRequireDependency.Template = ModuleDependencyTemplateAsId; + +module.exports = CommonJsRequireDependency; + + +/***/ }), + +/***/ 37278: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const CommonJsRequireDependency = __webpack_require__(37504); +const CommonJsRequireContextDependency = __webpack_require__(26791); +const RequireHeaderDependency = __webpack_require__(22928); +const LocalModuleDependency = __webpack_require__(56570); +const ContextDependencyHelpers = __webpack_require__(5594); +const LocalModulesHelpers = __webpack_require__(39658); +const ParserHelpers = __webpack_require__(23999); + +class CommonJsRequireDependencyParserPlugin { + constructor(options) { + this.options = options; + } + + apply(parser) { + const options = this.options; + + const processItem = (expr, param) => { + if (param.isString()) { + const dep = new CommonJsRequireDependency(param.string, param.range); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + }; + const processContext = (expr, param) => { + const dep = ContextDependencyHelpers.create( + CommonJsRequireContextDependency, + expr.range, + param, + expr, + options, + {}, + parser + ); + if (!dep) return; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + }; + + parser.hooks.expression + .for("require.cache") + .tap( + "CommonJsRequireDependencyParserPlugin", + ParserHelpers.toConstantDependencyWithWebpackRequire( + parser, + "__webpack_require__.c" + ) + ); + parser.hooks.expression + .for("require") + .tap("CommonJsRequireDependencyParserPlugin", expr => { + const dep = new CommonJsRequireContextDependency( + { + request: options.unknownContextRequest, + recursive: options.unknownContextRecursive, + regExp: options.unknownContextRegExp, + mode: "sync" + }, + expr.range + ); + dep.critical = + options.unknownContextCritical && + "require function is used in a way in which dependencies cannot be statically extracted"; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + }); + + const createHandler = callNew => expr => { + if (expr.arguments.length !== 1) return; + let localModule; + const param = parser.evaluateExpression(expr.arguments[0]); + if (param.isConditional()) { + let isExpression = false; + const prevLength = parser.state.current.dependencies.length; + const dep = new RequireHeaderDependency(expr.callee.range); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + for (const p of param.options) { + const result = processItem(expr, p); + if (result === undefined) { + isExpression = true; + } + } + if (isExpression) { + parser.state.current.dependencies.length = prevLength; + } else { + return true; + } + } + if ( + param.isString() && + (localModule = LocalModulesHelpers.getLocalModule( + parser.state, + param.string + )) + ) { + const dep = new LocalModuleDependency(localModule, expr.range, callNew); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + return true; + } else { + const result = processItem(expr, param); + if (result === undefined) { + processContext(expr, param); + } else { + const dep = new RequireHeaderDependency(expr.callee.range); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + } + return true; + } + }; + parser.hooks.call + .for("require") + .tap("CommonJsRequireDependencyParserPlugin", createHandler(false)); + parser.hooks.new + .for("require") + .tap("CommonJsRequireDependencyParserPlugin", createHandler(true)); + parser.hooks.call + .for("module.require") + .tap("CommonJsRequireDependencyParserPlugin", createHandler(false)); + parser.hooks.new + .for("module.require") + .tap("CommonJsRequireDependencyParserPlugin", createHandler(true)); + } +} +module.exports = CommonJsRequireDependencyParserPlugin; + + +/***/ }), + +/***/ 71101: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class ConstDependency extends NullDependency { + constructor(expression, range, requireWebpackRequire) { + super(); + this.expression = expression; + this.range = range; + this.requireWebpackRequire = requireWebpackRequire; + } + + updateHash(hash) { + hash.update(this.range + ""); + hash.update(this.expression + ""); + } +} + +ConstDependency.Template = class ConstDependencyTemplate { + apply(dep, source) { + if (typeof dep.range === "number") { + source.insert(dep.range, dep.expression); + return; + } + + source.replace(dep.range[0], dep.range[1] - 1, dep.expression); + } +}; + +module.exports = ConstDependency; + + +/***/ }), + +/***/ 11583: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const Dependency = __webpack_require__(57282); +const CriticalDependencyWarning = __webpack_require__(54983); + +const regExpToString = r => (r ? r + "" : ""); + +class ContextDependency extends Dependency { + // options: { request, recursive, regExp, include, exclude, mode, chunkName, groupOptions } + constructor(options) { + super(); + this.options = options; + this.userRequest = this.options.request; + /** @type {false | string} */ + this.critical = false; + this.hadGlobalOrStickyRegExp = false; + if (this.options.regExp.global || this.options.regExp.sticky) { + this.options.regExp = null; + this.hadGlobalOrStickyRegExp = true; + } + } + + getResourceIdentifier() { + return ( + `context${this.options.request} ${this.options.recursive} ` + + `${regExpToString(this.options.regExp)} ${regExpToString( + this.options.include + )} ${regExpToString(this.options.exclude)} ` + + `${this.options.mode} ${this.options.chunkName} ` + + `${JSON.stringify(this.options.groupOptions)}` + ); + } + + getWarnings() { + let warnings = super.getWarnings() || []; + if (this.critical) { + warnings.push(new CriticalDependencyWarning(this.critical)); + } + if (this.hadGlobalOrStickyRegExp) { + warnings.push( + new CriticalDependencyWarning( + "Contexts can't use RegExps with the 'g' or 'y' flags." + ) + ); + } + return warnings; + } +} + +// TODO remove in webpack 5 +Object.defineProperty(ContextDependency.prototype, "async", { + configurable: false, + get() { + throw new Error( + "ContextDependency.async was removed. Use ContextDependency.options.mode instead." + ); + }, + set() { + throw new Error( + "ContextDependency.async was removed. Pass options.mode to constructor instead" + ); + } +}); + +module.exports = ContextDependency; + + +/***/ }), + +/***/ 5594: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ContextDependencyHelpers = exports; + +/** + * Escapes regular expression metacharacters + * @param {string} str String to quote + * @returns {string} Escaped string + */ +const quotemeta = str => { + return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&"); +}; + +const splitContextFromPrefix = prefix => { + const idx = prefix.lastIndexOf("/"); + let context = "."; + if (idx >= 0) { + context = prefix.substr(0, idx); + prefix = `.${prefix.substr(idx)}`; + } + return { + context, + prefix + }; +}; + +const splitQueryFromPostfix = postfix => { + const idx = postfix.indexOf("?"); + let query = ""; + if (idx >= 0) { + query = postfix.substr(idx); + postfix = postfix.substr(0, idx); + } + return { + postfix, + query + }; +}; + +ContextDependencyHelpers.create = ( + Dep, + range, + param, + expr, + options, + contextOptions, + // when parser is not passed in, expressions won't be walked + parser = null +) => { + if (param.isTemplateString()) { + let prefixRaw = param.quasis[0].string; + let postfixRaw = + param.quasis.length > 1 + ? param.quasis[param.quasis.length - 1].string + : ""; + + const valueRange = param.range; + const { context, prefix } = splitContextFromPrefix(prefixRaw); + const { postfix, query } = splitQueryFromPostfix(postfixRaw); + + // When there are more than two quasis, the generated RegExp can be more precise + // We join the quasis with the expression regexp + const innerQuasis = param.quasis.slice(1, param.quasis.length - 1); + const innerRegExp = + options.wrappedContextRegExp.source + + innerQuasis + .map(q => quotemeta(q.string) + options.wrappedContextRegExp.source) + .join(""); + + // Example: `./context/pre${e}inner${e}inner2${e}post?query` + // context: "./context" + // prefix: "./pre" + // innerQuasis: [BEE("inner"), BEE("inner2")] + // (BEE = BasicEvaluatedExpression) + // postfix: "post" + // query: "?query" + // regExp: /^\.\/pre.*inner.*inner2.*post$/ + const regExp = new RegExp( + `^${quotemeta(prefix)}${innerRegExp}${quotemeta(postfix)}$` + ); + const dep = new Dep( + Object.assign( + { + request: context + query, + recursive: options.wrappedContextRecursive, + regExp, + mode: "sync" + }, + contextOptions + ), + range, + valueRange + ); + dep.loc = expr.loc; + const replaces = []; + + param.parts.forEach((part, i) => { + if (i % 2 === 0) { + // Quasis or merged quasi + let range = part.range; + let value = part.string; + if (param.templateStringKind === "cooked") { + value = JSON.stringify(value); + value = value.slice(1, value.length - 1); + } + if (i === 0) { + // prefix + value = prefix; + range = [param.range[0], part.range[1]]; + value = + (param.templateStringKind === "cooked" ? "`" : "String.raw`") + + value; + } else if (i === param.parts.length - 1) { + // postfix + value = postfix; + range = [part.range[0], param.range[1]]; + value = value + "`"; + } else if ( + part.expression && + part.expression.type === "TemplateElement" && + part.expression.value.raw === value + ) { + // Shortcut when it's a single quasi and doesn't need to be replaced + return; + } + replaces.push({ + range, + value + }); + } else { + // Expression + if (parser) { + parser.walkExpression(part.expression); + } + } + }); + + dep.replaces = replaces; + dep.critical = + options.wrappedContextCritical && + "a part of the request of a dependency is an expression"; + return dep; + } else if ( + param.isWrapped() && + ((param.prefix && param.prefix.isString()) || + (param.postfix && param.postfix.isString())) + ) { + let prefixRaw = + param.prefix && param.prefix.isString() ? param.prefix.string : ""; + let postfixRaw = + param.postfix && param.postfix.isString() ? param.postfix.string : ""; + const prefixRange = + param.prefix && param.prefix.isString() ? param.prefix.range : null; + const postfixRange = + param.postfix && param.postfix.isString() ? param.postfix.range : null; + const valueRange = param.range; + const { context, prefix } = splitContextFromPrefix(prefixRaw); + const { postfix, query } = splitQueryFromPostfix(postfixRaw); + const regExp = new RegExp( + `^${quotemeta(prefix)}${options.wrappedContextRegExp.source}${quotemeta( + postfix + )}$` + ); + const dep = new Dep( + Object.assign( + { + request: context + query, + recursive: options.wrappedContextRecursive, + regExp, + mode: "sync" + }, + contextOptions + ), + range, + valueRange + ); + dep.loc = expr.loc; + const replaces = []; + if (prefixRange) { + replaces.push({ + range: prefixRange, + value: JSON.stringify(prefix) + }); + } + if (postfixRange) { + replaces.push({ + range: postfixRange, + value: JSON.stringify(postfix) + }); + } + dep.replaces = replaces; + dep.critical = + options.wrappedContextCritical && + "a part of the request of a dependency is an expression"; + + if (parser && param.wrappedInnerExpressions) { + for (const part of param.wrappedInnerExpressions) { + if (part.expression) parser.walkExpression(part.expression); + } + } + + return dep; + } else { + const dep = new Dep( + Object.assign( + { + request: options.exprContextRequest, + recursive: options.exprContextRecursive, + regExp: options.exprContextRegExp, + mode: "sync" + }, + contextOptions + ), + range, + param.range + ); + dep.loc = expr.loc; + dep.critical = + options.exprContextCritical && + "the request of a dependency is an expression"; + + if (parser) { + parser.walkExpression(param.expression); + } + + return dep; + } +}; + + +/***/ }), + +/***/ 6174: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class ContextDependencyTemplateAsId { + apply(dep, source, runtime) { + const moduleExports = runtime.moduleExports({ + module: dep.module, + request: dep.request + }); + + if (dep.module) { + if (dep.valueRange) { + if (Array.isArray(dep.replaces)) { + for (let i = 0; i < dep.replaces.length; i++) { + const rep = dep.replaces[i]; + source.replace(rep.range[0], rep.range[1] - 1, rep.value); + } + } + source.replace(dep.valueRange[1], dep.range[1] - 1, ")"); + // TODO webpack 5 remove `prepend` it's no longer used + source.replace( + dep.range[0], + dep.valueRange[0] - 1, + `${moduleExports}.resolve(${ + typeof dep.prepend === "string" ? JSON.stringify(dep.prepend) : "" + }` + ); + } else { + source.replace( + dep.range[0], + dep.range[1] - 1, + `${moduleExports}.resolve` + ); + } + } else { + source.replace(dep.range[0], dep.range[1] - 1, moduleExports); + } + } +} +module.exports = ContextDependencyTemplateAsId; + + +/***/ }), + +/***/ 54380: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class ContextDependencyTemplateAsRequireCall { + apply(dep, source, runtime) { + const moduleExports = runtime.moduleExports({ + module: dep.module, + request: dep.request + }); + + if (dep.module) { + if (dep.valueRange) { + if (Array.isArray(dep.replaces)) { + for (let i = 0; i < dep.replaces.length; i++) { + const rep = dep.replaces[i]; + source.replace(rep.range[0], rep.range[1] - 1, rep.value); + } + } + source.replace(dep.valueRange[1], dep.range[1] - 1, ")"); + // TODO webpack 5 remove `prepend` it's no longer used + source.replace( + dep.range[0], + dep.valueRange[0] - 1, + `${moduleExports}(${ + typeof dep.prepend === "string" ? JSON.stringify(dep.prepend) : "" + }` + ); + } else { + source.replace(dep.range[0], dep.range[1] - 1, moduleExports); + } + } else { + source.replace(dep.range[0], dep.range[1] - 1, moduleExports); + } + } +} +module.exports = ContextDependencyTemplateAsRequireCall; + + +/***/ }), + +/***/ 89079: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); + +class ContextElementDependency extends ModuleDependency { + constructor(request, userRequest) { + super(request); + if (userRequest) { + this.userRequest = userRequest; + } + } + + get type() { + return "context element"; + } +} + +module.exports = ContextElementDependency; + + +/***/ }), + +/***/ 54983: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); + +class CriticalDependencyWarning extends WebpackError { + constructor(message) { + super(); + + this.name = "CriticalDependencyWarning"; + this.message = "Critical dependency: " + message; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = CriticalDependencyWarning; + + +/***/ }), + +/***/ 53104: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DependencyReference = __webpack_require__(71722); +const NullDependency = __webpack_require__(5088); + +class DelegatedExportsDependency extends NullDependency { + constructor(originModule, exports) { + super(); + this.originModule = originModule; + this.exports = exports; + } + + get type() { + return "delegated exports"; + } + + getReference() { + return new DependencyReference(this.originModule, true, false); + } + + getExports() { + return { + exports: this.exports, + dependencies: undefined + }; + } +} + +module.exports = DelegatedExportsDependency; + + +/***/ }), + +/***/ 25930: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); + +class DelegatedSourceDependency extends ModuleDependency { + constructor(request) { + super(request); + } + + get type() { + return "delegated source"; + } +} + +module.exports = DelegatedSourceDependency; + + +/***/ }), + +/***/ 71722: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + +/** @typedef {import("../Module")} Module */ + +class DependencyReference { + // TODO webpack 5: module must be dynamic, you must pass a function returning a module + // This is needed to remove the hack in ConcatenatedModule + // The problem is that the `module` in Dependency could be replaced i. e. because of Scope Hoisting + /** + * + * @param {Module} module the referenced module + * @param {string[] | boolean} importedNames imported named from the module + * @param {boolean=} weak if this is a weak reference + * @param {number} order the order information or NaN if don't care + */ + constructor(module, importedNames, weak = false, order = NaN) { + // TODO webpack 5: make it a getter + this.module = module; + // true: full object + // false: only sideeffects/no export + // array of strings: the exports with this names + this.importedNames = importedNames; + this.weak = !!weak; + this.order = order; + } + + /** + * @param {DependencyReference[]} array an array (will be modified) + * @returns {DependencyReference[]} the array again + */ + static sort(array) { + /** @type {WeakMap} */ + const originalOrder = new WeakMap(); + let i = 0; + for (const ref of array) { + originalOrder.set(ref, i++); + } + return array.sort((a, b) => { + const aOrder = a.order; + const bOrder = b.order; + if (isNaN(aOrder)) { + if (!isNaN(bOrder)) { + return 1; + } + } else { + if (isNaN(bOrder)) { + return -1; + } + if (aOrder !== bOrder) { + return aOrder - bOrder; + } + } + const aOrg = originalOrder.get(a); + const bOrg = originalOrder.get(b); + return aOrg - bOrg; + }); + } +} + +module.exports = DependencyReference; + + +/***/ }), + +/***/ 66279: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const Dependency = __webpack_require__(57282); + +class DllEntryDependency extends Dependency { + constructor(dependencies, name) { + super(); + this.dependencies = dependencies; + this.name = name; + } + + get type() { + return "dll entry"; + } +} + +module.exports = DllEntryDependency; + + +/***/ }), + +/***/ 75159: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const NullDependency = __webpack_require__(5088); +const HarmonyImportDependency = __webpack_require__(81599); + +class HarmonyAcceptDependency extends NullDependency { + constructor(range, dependencies, hasCallback) { + super(); + this.range = range; + this.dependencies = dependencies; + this.hasCallback = hasCallback; + } + + get type() { + return "accepted harmony modules"; + } +} + +HarmonyAcceptDependency.Template = class HarmonyAcceptDependencyTemplate { + apply(dep, source, runtime) { + const content = dep.dependencies + .filter(dependency => + HarmonyImportDependency.Template.isImportEmitted(dependency, source) + ) + .map(dependency => dependency.getImportStatement(true, runtime)) + .join(""); + + if (dep.hasCallback) { + source.insert( + dep.range[0], + `function(__WEBPACK_OUTDATED_DEPENDENCIES__) { ${content}(` + ); + source.insert( + dep.range[1], + ")(__WEBPACK_OUTDATED_DEPENDENCIES__); }.bind(this)" + ); + return; + } + + source.insert(dep.range[1] - 0.5, `, function() { ${content} }`); + } +}; + +module.exports = HarmonyAcceptDependency; + + +/***/ }), + +/***/ 66136: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const HarmonyImportDependency = __webpack_require__(81599); + +class HarmonyAcceptImportDependency extends HarmonyImportDependency { + constructor(request, originModule, parserScope) { + super(request, originModule, NaN, parserScope); + this.weak = true; + } + + get type() { + return "harmony accept"; + } +} + +HarmonyAcceptImportDependency.Template = class HarmonyAcceptImportDependencyTemplate extends HarmonyImportDependency.Template { + apply(dep, source, runtime) {} +}; + +module.exports = HarmonyAcceptImportDependency; + + +/***/ }), + +/***/ 1533: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class HarmonyCompatibilityDependency extends NullDependency { + constructor(originModule) { + super(); + this.originModule = originModule; + } + + get type() { + return "harmony export header"; + } +} + +HarmonyCompatibilityDependency.Template = class HarmonyExportDependencyTemplate { + apply(dep, source, runtime) { + const usedExports = dep.originModule.usedExports; + if (usedExports !== false && !Array.isArray(usedExports)) { + const content = runtime.defineEsModuleFlagStatement({ + exportsArgument: dep.originModule.exportsArgument + }); + source.insert(-10, content); + } + } +}; + +module.exports = HarmonyCompatibilityDependency; + + +/***/ }), + +/***/ 59310: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const HarmonyCompatibilityDependency = __webpack_require__(1533); +const HarmonyInitDependency = __webpack_require__(27204); + +module.exports = class HarmonyDetectionParserPlugin { + apply(parser) { + parser.hooks.program.tap("HarmonyDetectionParserPlugin", ast => { + const isStrictHarmony = parser.state.module.type === "javascript/esm"; + const isHarmony = + isStrictHarmony || + ast.body.some( + statement => + statement.type === "ImportDeclaration" || + statement.type === "ExportDefaultDeclaration" || + statement.type === "ExportNamedDeclaration" || + statement.type === "ExportAllDeclaration" + ); + if (isHarmony) { + const module = parser.state.module; + const compatDep = new HarmonyCompatibilityDependency(module); + compatDep.loc = { + start: { + line: -1, + column: 0 + }, + end: { + line: -1, + column: 0 + }, + index: -3 + }; + module.addDependency(compatDep); + const initDep = new HarmonyInitDependency(module); + initDep.loc = { + start: { + line: -1, + column: 0 + }, + end: { + line: -1, + column: 0 + }, + index: -2 + }; + module.addDependency(initDep); + parser.state.harmonyParserScope = parser.state.harmonyParserScope || {}; + parser.scope.isStrict = true; + module.buildMeta.exportsType = "namespace"; + module.buildInfo.strict = true; + module.buildInfo.exportsArgument = "__webpack_exports__"; + if (isStrictHarmony) { + module.buildMeta.strictHarmonyModule = true; + module.buildInfo.moduleArgument = "__webpack_module__"; + } + } + }); + + const skipInHarmony = () => { + const module = parser.state.module; + if (module && module.buildMeta && module.buildMeta.exportsType) { + return true; + } + }; + + const nullInHarmony = () => { + const module = parser.state.module; + if (module && module.buildMeta && module.buildMeta.exportsType) { + return null; + } + }; + + const nonHarmonyIdentifiers = ["define", "exports"]; + for (const identifer of nonHarmonyIdentifiers) { + parser.hooks.evaluateTypeof + .for(identifer) + .tap("HarmonyDetectionParserPlugin", nullInHarmony); + parser.hooks.typeof + .for(identifer) + .tap("HarmonyDetectionParserPlugin", skipInHarmony); + parser.hooks.evaluate + .for(identifer) + .tap("HarmonyDetectionParserPlugin", nullInHarmony); + parser.hooks.expression + .for(identifer) + .tap("HarmonyDetectionParserPlugin", skipInHarmony); + parser.hooks.call + .for(identifer) + .tap("HarmonyDetectionParserPlugin", skipInHarmony); + } + } +}; + + +/***/ }), + +/***/ 49180: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const HarmonyExportExpressionDependency = __webpack_require__(84245); +const HarmonyImportSideEffectDependency = __webpack_require__(79171); +const HarmonyExportHeaderDependency = __webpack_require__(21320); +const HarmonyExportSpecifierDependency = __webpack_require__(34834); +const HarmonyExportImportedSpecifierDependency = __webpack_require__(22864); +const ConstDependency = __webpack_require__(71101); + +module.exports = class HarmonyExportDependencyParserPlugin { + constructor(moduleOptions) { + this.strictExportPresence = moduleOptions.strictExportPresence; + } + + apply(parser) { + parser.hooks.export.tap( + "HarmonyExportDependencyParserPlugin", + statement => { + const dep = new HarmonyExportHeaderDependency( + statement.declaration && statement.declaration.range, + statement.range + ); + dep.loc = Object.create(statement.loc); + dep.loc.index = -1; + parser.state.current.addDependency(dep); + return true; + } + ); + parser.hooks.exportImport.tap( + "HarmonyExportDependencyParserPlugin", + (statement, source) => { + parser.state.lastHarmonyImportOrder = + (parser.state.lastHarmonyImportOrder || 0) + 1; + const clearDep = new ConstDependency("", statement.range); + clearDep.loc = Object.create(statement.loc); + clearDep.loc.index = -1; + parser.state.current.addDependency(clearDep); + const sideEffectDep = new HarmonyImportSideEffectDependency( + source, + parser.state.module, + parser.state.lastHarmonyImportOrder, + parser.state.harmonyParserScope + ); + sideEffectDep.loc = Object.create(statement.loc); + sideEffectDep.loc.index = -1; + parser.state.current.addDependency(sideEffectDep); + return true; + } + ); + parser.hooks.exportExpression.tap( + "HarmonyExportDependencyParserPlugin", + (statement, expr) => { + const comments = parser.getComments([ + statement.range[0], + expr.range[0] + ]); + const dep = new HarmonyExportExpressionDependency( + parser.state.module, + expr.range, + statement.range, + comments + .map(c => { + switch (c.type) { + case "Block": + return `/*${c.value}*/`; + case "Line": + return `//${c.value}\n`; + } + return ""; + }) + .join("") + ); + dep.loc = Object.create(statement.loc); + dep.loc.index = -1; + parser.state.current.addDependency(dep); + return true; + } + ); + parser.hooks.exportDeclaration.tap( + "HarmonyExportDependencyParserPlugin", + statement => {} + ); + parser.hooks.exportSpecifier.tap( + "HarmonyExportDependencyParserPlugin", + (statement, id, name, idx) => { + const rename = parser.scope.renames.get(id); + let dep; + const harmonyNamedExports = (parser.state.harmonyNamedExports = + parser.state.harmonyNamedExports || new Set()); + harmonyNamedExports.add(name); + if (rename === "imported var") { + const settings = parser.state.harmonySpecifier.get(id); + dep = new HarmonyExportImportedSpecifierDependency( + settings.source, + parser.state.module, + settings.sourceOrder, + parser.state.harmonyParserScope, + settings.id, + name, + harmonyNamedExports, + null, + this.strictExportPresence + ); + } else { + dep = new HarmonyExportSpecifierDependency( + parser.state.module, + id, + name + ); + } + dep.loc = Object.create(statement.loc); + dep.loc.index = idx; + parser.state.current.addDependency(dep); + return true; + } + ); + parser.hooks.exportImportSpecifier.tap( + "HarmonyExportDependencyParserPlugin", + (statement, source, id, name, idx) => { + const harmonyNamedExports = (parser.state.harmonyNamedExports = + parser.state.harmonyNamedExports || new Set()); + let harmonyStarExports = null; + if (name) { + harmonyNamedExports.add(name); + } else { + harmonyStarExports = parser.state.harmonyStarExports = + parser.state.harmonyStarExports || []; + } + const dep = new HarmonyExportImportedSpecifierDependency( + source, + parser.state.module, + parser.state.lastHarmonyImportOrder, + parser.state.harmonyParserScope, + id, + name, + harmonyNamedExports, + harmonyStarExports && harmonyStarExports.slice(), + this.strictExportPresence + ); + if (harmonyStarExports) { + harmonyStarExports.push(dep); + } + dep.loc = Object.create(statement.loc); + dep.loc.index = idx; + parser.state.current.addDependency(dep); + return true; + } + ); + } +}; + + +/***/ }), + +/***/ 84245: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class HarmonyExportExpressionDependency extends NullDependency { + constructor(originModule, range, rangeStatement, prefix) { + super(); + this.originModule = originModule; + this.range = range; + this.rangeStatement = rangeStatement; + this.prefix = prefix; + } + + get type() { + return "harmony export expression"; + } + + getExports() { + return { + exports: ["default"], + dependencies: undefined + }; + } +} + +HarmonyExportExpressionDependency.Template = class HarmonyExportDependencyTemplate { + apply(dep, source) { + const used = dep.originModule.isUsed("default"); + const content = this.getContent(dep.originModule, used); + + if (dep.range) { + source.replace( + dep.rangeStatement[0], + dep.range[0] - 1, + content + "(" + dep.prefix + ); + source.replace(dep.range[1], dep.rangeStatement[1] - 1, ");"); + return; + } + + source.replace(dep.rangeStatement[0], dep.rangeStatement[1] - 1, content); + } + + getContent(module, used) { + const exportsName = module.exportsArgument; + if (used) { + return `/* harmony default export */ ${exportsName}[${JSON.stringify( + used + )}] = `; + } + return "/* unused harmony default export */ var _unused_webpack_default_export = "; + } +}; + +module.exports = HarmonyExportExpressionDependency; + + +/***/ }), + +/***/ 21320: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class HarmonyExportHeaderDependency extends NullDependency { + constructor(range, rangeStatement) { + super(); + this.range = range; + this.rangeStatement = rangeStatement; + } + + get type() { + return "harmony export header"; + } +} + +HarmonyExportHeaderDependency.Template = class HarmonyExportDependencyTemplate { + apply(dep, source) { + const content = ""; + const replaceUntil = dep.range + ? dep.range[0] - 1 + : dep.rangeStatement[1] - 1; + source.replace(dep.rangeStatement[0], replaceUntil, content); + } +}; + +module.exports = HarmonyExportHeaderDependency; + + +/***/ }), + +/***/ 22864: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DependencyReference = __webpack_require__(71722); +const HarmonyImportDependency = __webpack_require__(81599); +const Template = __webpack_require__(96066); +const HarmonyLinkingError = __webpack_require__(30327); + +/** @typedef {import("../Module")} Module */ + +/** @typedef {"missing"|"unused"|"empty-star"|"reexport-non-harmony-default"|"reexport-named-default"|"reexport-namespace-object"|"reexport-non-harmony-default-strict"|"reexport-fake-namespace-object"|"rexport-non-harmony-undefined"|"safe-reexport"|"checked-reexport"|"dynamic-reexport"} ExportModeType */ + +/** @type {Map} */ +const EMPTY_MAP = new Map(); + +class ExportMode { + /** + * @param {ExportModeType} type type of the mode + */ + constructor(type) { + /** @type {ExportModeType} */ + this.type = type; + /** @type {string|null} */ + this.name = null; + /** @type {Map} */ + this.map = EMPTY_MAP; + /** @type {Set|null} */ + this.ignored = null; + /** @type {Module|null} */ + this.module = null; + /** @type {string|null} */ + this.userRequest = null; + } +} + +const EMPTY_STAR_MODE = new ExportMode("empty-star"); + +class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency { + constructor( + request, + originModule, + sourceOrder, + parserScope, + id, + name, + activeExports, + otherStarExports, + strictExportPresence + ) { + super(request, originModule, sourceOrder, parserScope); + this.id = id; + this.redirectedId = undefined; + this.name = name; + this.activeExports = activeExports; + this.otherStarExports = otherStarExports; + this.strictExportPresence = strictExportPresence; + } + + get type() { + return "harmony export imported specifier"; + } + + get _id() { + return this.redirectedId || this.id; + } + + getMode(ignoreUnused) { + const name = this.name; + const id = this._id; + const used = this.originModule.isUsed(name); + const importedModule = this._module; + + if (!importedModule) { + const mode = new ExportMode("missing"); + mode.userRequest = this.userRequest; + return mode; + } + + if ( + !ignoreUnused && + (name ? !used : this.originModule.usedExports === false) + ) { + const mode = new ExportMode("unused"); + mode.name = name || "*"; + return mode; + } + + const strictHarmonyModule = this.originModule.buildMeta.strictHarmonyModule; + if (name && id === "default" && importedModule.buildMeta) { + if (!importedModule.buildMeta.exportsType) { + const mode = new ExportMode( + strictHarmonyModule + ? "reexport-non-harmony-default-strict" + : "reexport-non-harmony-default" + ); + mode.name = name; + mode.module = importedModule; + return mode; + } else if (importedModule.buildMeta.exportsType === "named") { + const mode = new ExportMode("reexport-named-default"); + mode.name = name; + mode.module = importedModule; + return mode; + } + } + + const isNotAHarmonyModule = + importedModule.buildMeta && !importedModule.buildMeta.exportsType; + if (name) { + let mode; + if (id) { + // export { name as name } + if (isNotAHarmonyModule && strictHarmonyModule) { + mode = new ExportMode("rexport-non-harmony-undefined"); + mode.name = name; + } else { + mode = new ExportMode("safe-reexport"); + mode.map = new Map([[name, id]]); + } + } else { + // export { * as name } + if (isNotAHarmonyModule && strictHarmonyModule) { + mode = new ExportMode("reexport-fake-namespace-object"); + mode.name = name; + } else { + mode = new ExportMode("reexport-namespace-object"); + mode.name = name; + } + } + mode.module = importedModule; + return mode; + } + + const hasUsedExports = Array.isArray(this.originModule.usedExports); + const hasProvidedExports = Array.isArray( + importedModule.buildMeta.providedExports + ); + const activeFromOtherStarExports = this._discoverActiveExportsFromOtherStartExports(); + + // export * + if (hasUsedExports) { + // reexport * with known used exports + if (hasProvidedExports) { + const map = new Map( + this.originModule.usedExports + .filter(id => { + if (id === "default") return false; + if (this.activeExports.has(id)) return false; + if (activeFromOtherStarExports.has(id)) return false; + if (!importedModule.buildMeta.providedExports.includes(id)) + return false; + return true; + }) + .map(item => [item, item]) + ); + + if (map.size === 0) { + return EMPTY_STAR_MODE; + } + + const mode = new ExportMode("safe-reexport"); + mode.module = importedModule; + mode.map = map; + return mode; + } + + const map = new Map( + this.originModule.usedExports + .filter(id => { + if (id === "default") return false; + if (this.activeExports.has(id)) return false; + if (activeFromOtherStarExports.has(id)) return false; + + return true; + }) + .map(item => [item, item]) + ); + + if (map.size === 0) { + return EMPTY_STAR_MODE; + } + + const mode = new ExportMode("checked-reexport"); + mode.module = importedModule; + mode.map = map; + return mode; + } + + if (hasProvidedExports) { + const map = new Map( + importedModule.buildMeta.providedExports + .filter(id => { + if (id === "default") return false; + if (this.activeExports.has(id)) return false; + if (activeFromOtherStarExports.has(id)) return false; + + return true; + }) + .map(item => [item, item]) + ); + + if (map.size === 0) { + return EMPTY_STAR_MODE; + } + + const mode = new ExportMode("safe-reexport"); + mode.module = importedModule; + mode.map = map; + return mode; + } + + const mode = new ExportMode("dynamic-reexport"); + mode.module = importedModule; + mode.ignored = new Set([ + "default", + ...this.activeExports, + ...activeFromOtherStarExports + ]); + return mode; + } + + getReference() { + const mode = this.getMode(false); + + switch (mode.type) { + case "missing": + case "unused": + case "empty-star": + return null; + + case "reexport-non-harmony-default": + case "reexport-named-default": + return new DependencyReference( + mode.module, + ["default"], + false, + this.sourceOrder + ); + + case "reexport-namespace-object": + case "reexport-non-harmony-default-strict": + case "reexport-fake-namespace-object": + case "rexport-non-harmony-undefined": + return new DependencyReference( + mode.module, + true, + false, + this.sourceOrder + ); + + case "safe-reexport": + case "checked-reexport": + return new DependencyReference( + mode.module, + Array.from(mode.map.values()), + false, + this.sourceOrder + ); + + case "dynamic-reexport": + return new DependencyReference( + mode.module, + true, + false, + this.sourceOrder + ); + + default: + throw new Error(`Unknown mode ${mode.type}`); + } + } + + _discoverActiveExportsFromOtherStartExports() { + if (!this.otherStarExports) return new Set(); + const result = new Set(); + // try to learn impossible exports from other star exports with provided exports + for (const otherStarExport of this.otherStarExports) { + const otherImportedModule = otherStarExport._module; + if ( + otherImportedModule && + Array.isArray(otherImportedModule.buildMeta.providedExports) + ) { + for (const exportName of otherImportedModule.buildMeta + .providedExports) { + result.add(exportName); + } + } + } + return result; + } + + getExports() { + if (this.name) { + return { + exports: [this.name], + dependencies: undefined + }; + } + + const importedModule = this._module; + + if (!importedModule) { + // no imported module available + return { + exports: null, + dependencies: undefined + }; + } + + if (Array.isArray(importedModule.buildMeta.providedExports)) { + const activeFromOtherStarExports = this._discoverActiveExportsFromOtherStartExports(); + return { + exports: importedModule.buildMeta.providedExports.filter( + id => + id !== "default" && + !activeFromOtherStarExports.has(id) && + !this.activeExports.has(id) + ), + dependencies: [importedModule] + }; + } + + if (importedModule.buildMeta.providedExports) { + return { + exports: true, + dependencies: undefined + }; + } + + return { + exports: null, + dependencies: [importedModule] + }; + } + + getWarnings() { + if ( + this.strictExportPresence || + this.originModule.buildMeta.strictHarmonyModule + ) { + return []; + } + return this._getErrors(); + } + + getErrors() { + if ( + this.strictExportPresence || + this.originModule.buildMeta.strictHarmonyModule + ) { + return this._getErrors(); + } + return []; + } + + _getErrors() { + const importedModule = this._module; + if (!importedModule) { + return; + } + + if (!importedModule.buildMeta || !importedModule.buildMeta.exportsType) { + // It's not an harmony module + if ( + this.originModule.buildMeta.strictHarmonyModule && + this._id && + this._id !== "default" + ) { + // In strict harmony modules we only support the default export + return [ + new HarmonyLinkingError( + `Can't reexport the named export '${this._id}' from non EcmaScript module (only default export is available)` + ) + ]; + } + return; + } + + if (!this._id) { + return; + } + + if (importedModule.isProvided(this._id) !== false) { + // It's provided or we are not sure + return; + } + + // We are sure that it's not provided + const idIsNotNameMessage = + this._id !== this.name ? ` (reexported as '${this.name}')` : ""; + const errorMessage = `"export '${this._id}'${idIsNotNameMessage} was not found in '${this.userRequest}'`; + return [new HarmonyLinkingError(errorMessage)]; + } + + updateHash(hash) { + super.updateHash(hash); + const hashValue = this.getHashValue(this._module); + hash.update(hashValue); + } + + getHashValue(importedModule) { + if (!importedModule) { + return ""; + } + + const stringifiedUsedExport = JSON.stringify(importedModule.usedExports); + const stringifiedProvidedExport = JSON.stringify( + importedModule.buildMeta.providedExports + ); + return ( + importedModule.used + stringifiedUsedExport + stringifiedProvidedExport + ); + } + + disconnect() { + super.disconnect(); + this.redirectedId = undefined; + } +} + +module.exports = HarmonyExportImportedSpecifierDependency; + +HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedSpecifierDependencyTemplate extends HarmonyImportDependency.Template { + harmonyInit(dep, source, runtime, dependencyTemplates) { + super.harmonyInit(dep, source, runtime, dependencyTemplates); + const content = this.getContent(dep); + source.insert(-1, content); + } + + getHarmonyInitOrder(dep) { + if (dep.name) { + const used = dep.originModule.isUsed(dep.name); + if (!used) return NaN; + } else { + const importedModule = dep._module; + + const activeFromOtherStarExports = dep._discoverActiveExportsFromOtherStartExports(); + + if (Array.isArray(dep.originModule.usedExports)) { + // we know which exports are used + + const unused = dep.originModule.usedExports.every(id => { + if (id === "default") return true; + if (dep.activeExports.has(id)) return true; + if (importedModule.isProvided(id) === false) return true; + if (activeFromOtherStarExports.has(id)) return true; + return false; + }); + if (unused) return NaN; + } else if ( + dep.originModule.usedExports && + importedModule && + Array.isArray(importedModule.buildMeta.providedExports) + ) { + // not sure which exports are used, but we know which are provided + + const unused = importedModule.buildMeta.providedExports.every(id => { + if (id === "default") return true; + if (dep.activeExports.has(id)) return true; + if (activeFromOtherStarExports.has(id)) return true; + return false; + }); + if (unused) return NaN; + } + } + return super.getHarmonyInitOrder(dep); + } + + getContent(dep) { + const mode = dep.getMode(false); + const module = dep.originModule; + const importedModule = dep._module; + const importVar = dep.getImportVar(); + + switch (mode.type) { + case "missing": + return `throw new Error(${JSON.stringify( + `Cannot find module '${mode.userRequest}'` + )});\n`; + + case "unused": + return `${Template.toNormalComment( + `unused harmony reexport ${mode.name}` + )}\n`; + + case "reexport-non-harmony-default": + return ( + "/* harmony reexport (default from non-harmony) */ " + + this.getReexportStatement( + module, + module.isUsed(mode.name), + importVar, + null + ) + ); + + case "reexport-named-default": + return ( + "/* harmony reexport (default from named exports) */ " + + this.getReexportStatement( + module, + module.isUsed(mode.name), + importVar, + "" + ) + ); + + case "reexport-fake-namespace-object": + return ( + "/* harmony reexport (fake namespace object from non-harmony) */ " + + this.getReexportFakeNamespaceObjectStatement( + module, + module.isUsed(mode.name), + importVar + ) + ); + + case "rexport-non-harmony-undefined": + return ( + "/* harmony reexport (non default export from non-harmony) */ " + + this.getReexportStatement( + module, + module.isUsed(mode.name), + "undefined", + "" + ) + ); + + case "reexport-non-harmony-default-strict": + return ( + "/* harmony reexport (default from non-harmony) */ " + + this.getReexportStatement( + module, + module.isUsed(mode.name), + importVar, + "" + ) + ); + + case "reexport-namespace-object": + return ( + "/* harmony reexport (module object) */ " + + this.getReexportStatement( + module, + module.isUsed(mode.name), + importVar, + "" + ) + ); + + case "empty-star": + return "/* empty/unused harmony star reexport */"; + + case "safe-reexport": + return Array.from(mode.map.entries()) + .map(item => { + return ( + "/* harmony reexport (safe) */ " + + this.getReexportStatement( + module, + module.isUsed(item[0]), + importVar, + importedModule.isUsed(item[1]) + ) + + "\n" + ); + }) + .join(""); + + case "checked-reexport": + return Array.from(mode.map.entries()) + .map(item => { + return ( + "/* harmony reexport (checked) */ " + + this.getConditionalReexportStatement( + module, + item[0], + importVar, + item[1] + ) + + "\n" + ); + }) + .join(""); + + case "dynamic-reexport": { + const ignoredExports = mode.ignored; + let content = + "/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in " + + importVar + + ") "; + + // Filter out exports which are defined by other exports + // and filter out default export because it cannot be reexported with * + if (ignoredExports.size > 0) { + content += + "if(" + + JSON.stringify(Array.from(ignoredExports)) + + ".indexOf(__WEBPACK_IMPORT_KEY__) < 0) "; + } else { + content += "if(__WEBPACK_IMPORT_KEY__ !== 'default') "; + } + const exportsName = dep.originModule.exportsArgument; + return ( + content + + `(function(key) { __webpack_require__.d(${exportsName}, key, function() { return ${importVar}[key]; }) }(__WEBPACK_IMPORT_KEY__));\n` + ); + } + + default: + throw new Error(`Unknown mode ${mode.type}`); + } + } + + getReexportStatement(module, key, name, valueKey) { + const exportsName = module.exportsArgument; + const returnValue = this.getReturnValue(name, valueKey); + return `__webpack_require__.d(${exportsName}, ${JSON.stringify( + key + )}, function() { return ${returnValue}; });\n`; + } + + getReexportFakeNamespaceObjectStatement(module, key, name) { + const exportsName = module.exportsArgument; + return `__webpack_require__.d(${exportsName}, ${JSON.stringify( + key + )}, function() { return __webpack_require__.t(${name}); });\n`; + } + + getConditionalReexportStatement(module, key, name, valueKey) { + if (valueKey === false) { + return "/* unused export */\n"; + } + const exportsName = module.exportsArgument; + const returnValue = this.getReturnValue(name, valueKey); + return `if(__webpack_require__.o(${name}, ${JSON.stringify( + valueKey + )})) __webpack_require__.d(${exportsName}, ${JSON.stringify( + key + )}, function() { return ${returnValue}; });\n`; + } + + getReturnValue(name, valueKey) { + if (valueKey === null) { + return `${name}_default.a`; + } + if (valueKey === "") { + return name; + } + if (valueKey === false) { + return "/* unused export */ undefined"; + } + + return `${name}[${JSON.stringify(valueKey)}]`; + } +}; + + +/***/ }), + +/***/ 34834: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class HarmonyExportSpecifierDependency extends NullDependency { + constructor(originModule, id, name) { + super(); + this.originModule = originModule; + this.id = id; + this.name = name; + } + + get type() { + return "harmony export specifier"; + } + + getExports() { + return { + exports: [this.name], + dependencies: undefined + }; + } +} + +HarmonyExportSpecifierDependency.Template = class HarmonyExportSpecifierDependencyTemplate { + apply(dep, source) {} + + getHarmonyInitOrder(dep) { + return 0; + } + + harmonyInit(dep, source, runtime) { + const content = this.getContent(dep); + source.insert(-1, content); + } + + getContent(dep) { + const used = dep.originModule.isUsed(dep.name); + if (!used) { + return `/* unused harmony export ${dep.name || "namespace"} */\n`; + } + + const exportsName = dep.originModule.exportsArgument; + + return `/* harmony export (binding) */ __webpack_require__.d(${exportsName}, ${JSON.stringify( + used + )}, function() { return ${dep.id}; });\n`; + } +}; + +module.exports = HarmonyExportSpecifierDependency; + + +/***/ }), + +/***/ 81599: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DependencyReference = __webpack_require__(71722); +const ModuleDependency = __webpack_require__(90865); +const Template = __webpack_require__(96066); + +class HarmonyImportDependency extends ModuleDependency { + constructor(request, originModule, sourceOrder, parserScope) { + super(request); + this.redirectedModule = undefined; + this.originModule = originModule; + this.sourceOrder = sourceOrder; + this.parserScope = parserScope; + } + + get _module() { + return this.redirectedModule || this.module; + } + + getReference() { + if (!this._module) return null; + return new DependencyReference( + this._module, + false, + this.weak, + this.sourceOrder + ); + } + + getImportVar() { + let importVarMap = this.parserScope.importVarMap; + if (!importVarMap) this.parserScope.importVarMap = importVarMap = new Map(); + let importVar = importVarMap.get(this._module); + if (importVar) return importVar; + importVar = `${Template.toIdentifier( + `${this.userRequest}` + )}__WEBPACK_IMPORTED_MODULE_${importVarMap.size}__`; + importVarMap.set(this._module, importVar); + return importVar; + } + + getImportStatement(update, runtime) { + return runtime.importStatement({ + update, + module: this._module, + importVar: this.getImportVar(), + request: this.request, + originModule: this.originModule + }); + } + + updateHash(hash) { + super.updateHash(hash); + const importedModule = this._module; + hash.update( + (importedModule && + (!importedModule.buildMeta || importedModule.buildMeta.exportsType)) + + "" + ); + hash.update((importedModule && importedModule.id) + ""); + } + + disconnect() { + super.disconnect(); + this.redirectedModule = undefined; + } +} + +module.exports = HarmonyImportDependency; + +const importEmittedMap = new WeakMap(); + +HarmonyImportDependency.Template = class HarmonyImportDependencyTemplate { + apply(dep, source, runtime) { + // no-op + } + + getHarmonyInitOrder(dep) { + return dep.sourceOrder; + } + + static isImportEmitted(dep, source) { + let sourceInfo = importEmittedMap.get(source); + if (!sourceInfo) return false; + const key = dep._module || dep.request; + return key && sourceInfo.emittedImports.get(key); + } + + harmonyInit(dep, source, runtime, dependencyTemplates) { + let sourceInfo = importEmittedMap.get(source); + if (!sourceInfo) { + importEmittedMap.set( + source, + (sourceInfo = { + emittedImports: new Map() + }) + ); + } + const key = dep._module || dep.request; + if (key && sourceInfo.emittedImports.get(key)) return; + sourceInfo.emittedImports.set(key, true); + const content = dep.getImportStatement(false, runtime); + source.insert(-1, content); + } +}; + + +/***/ }), + +/***/ 99433: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { SyncBailHook } = __webpack_require__(92402); +const HarmonyImportSideEffectDependency = __webpack_require__(79171); +const HarmonyImportSpecifierDependency = __webpack_require__(95966); +const HarmonyAcceptImportDependency = __webpack_require__(66136); +const HarmonyAcceptDependency = __webpack_require__(75159); +const ConstDependency = __webpack_require__(71101); + +module.exports = class HarmonyImportDependencyParserPlugin { + constructor(moduleOptions) { + this.strictExportPresence = moduleOptions.strictExportPresence; + this.strictThisContextOnImports = moduleOptions.strictThisContextOnImports; + } + + apply(parser) { + parser.hooks.import.tap( + "HarmonyImportDependencyParserPlugin", + (statement, source) => { + parser.state.lastHarmonyImportOrder = + (parser.state.lastHarmonyImportOrder || 0) + 1; + const clearDep = new ConstDependency("", statement.range); + clearDep.loc = statement.loc; + parser.state.module.addDependency(clearDep); + const sideEffectDep = new HarmonyImportSideEffectDependency( + source, + parser.state.module, + parser.state.lastHarmonyImportOrder, + parser.state.harmonyParserScope + ); + sideEffectDep.loc = statement.loc; + parser.state.module.addDependency(sideEffectDep); + return true; + } + ); + parser.hooks.importSpecifier.tap( + "HarmonyImportDependencyParserPlugin", + (statement, source, id, name) => { + parser.scope.definitions.delete(name); + parser.scope.renames.set(name, "imported var"); + if (!parser.state.harmonySpecifier) { + parser.state.harmonySpecifier = new Map(); + } + parser.state.harmonySpecifier.set(name, { + source, + id, + sourceOrder: parser.state.lastHarmonyImportOrder + }); + return true; + } + ); + parser.hooks.expression + .for("imported var") + .tap("HarmonyImportDependencyParserPlugin", expr => { + const name = expr.name; + const settings = parser.state.harmonySpecifier.get(name); + const dep = new HarmonyImportSpecifierDependency( + settings.source, + parser.state.module, + settings.sourceOrder, + parser.state.harmonyParserScope, + settings.id, + name, + expr.range, + this.strictExportPresence + ); + dep.shorthand = parser.scope.inShorthand; + dep.directImport = true; + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return true; + }); + parser.hooks.expressionAnyMember + .for("imported var") + .tap("HarmonyImportDependencyParserPlugin", expr => { + const name = expr.object.name; + const settings = parser.state.harmonySpecifier.get(name); + if (settings.id !== null) return false; + const dep = new HarmonyImportSpecifierDependency( + settings.source, + parser.state.module, + settings.sourceOrder, + parser.state.harmonyParserScope, + expr.property.name || expr.property.value, + name, + expr.range, + this.strictExportPresence + ); + dep.shorthand = parser.scope.inShorthand; + dep.directImport = false; + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return true; + }); + if (this.strictThisContextOnImports) { + // only in case when we strictly follow the spec we need a special case here + parser.hooks.callAnyMember + .for("imported var") + .tap("HarmonyImportDependencyParserPlugin", expr => { + if (expr.callee.type !== "MemberExpression") return; + if (expr.callee.object.type !== "Identifier") return; + const name = expr.callee.object.name; + const settings = parser.state.harmonySpecifier.get(name); + if (settings.id !== null) return false; + const dep = new HarmonyImportSpecifierDependency( + settings.source, + parser.state.module, + settings.sourceOrder, + parser.state.harmonyParserScope, + expr.callee.property.name || expr.callee.property.value, + name, + expr.callee.range, + this.strictExportPresence + ); + dep.shorthand = parser.scope.inShorthand; + dep.directImport = false; + dep.namespaceObjectAsContext = true; + dep.loc = expr.callee.loc; + parser.state.module.addDependency(dep); + if (expr.arguments) parser.walkExpressions(expr.arguments); + return true; + }); + } + parser.hooks.call + .for("imported var") + .tap("HarmonyImportDependencyParserPlugin", expr => { + const args = expr.arguments; + const fullExpr = expr; + expr = expr.callee; + if (expr.type !== "Identifier") return; + const name = expr.name; + const settings = parser.state.harmonySpecifier.get(name); + const dep = new HarmonyImportSpecifierDependency( + settings.source, + parser.state.module, + settings.sourceOrder, + parser.state.harmonyParserScope, + settings.id, + name, + expr.range, + this.strictExportPresence + ); + dep.directImport = true; + dep.callArgs = args; + dep.call = fullExpr; + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + if (args) parser.walkExpressions(args); + return true; + }); + // TODO webpack 5: refactor this, no custom hooks + if (!parser.hooks.hotAcceptCallback) { + parser.hooks.hotAcceptCallback = new SyncBailHook([ + "expression", + "requests" + ]); + } + if (!parser.hooks.hotAcceptWithoutCallback) { + parser.hooks.hotAcceptWithoutCallback = new SyncBailHook([ + "expression", + "requests" + ]); + } + parser.hooks.hotAcceptCallback.tap( + "HarmonyImportDependencyParserPlugin", + (expr, requests) => { + const harmonyParserScope = parser.state.harmonyParserScope; + if (!harmonyParserScope) { + // This is not a harmony module, skip it + return; + } + const dependencies = requests.map(request => { + const dep = new HarmonyAcceptImportDependency( + request, + parser.state.module, + harmonyParserScope + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return dep; + }); + if (dependencies.length > 0) { + const dep = new HarmonyAcceptDependency( + expr.range, + dependencies, + true + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + } + } + ); + parser.hooks.hotAcceptWithoutCallback.tap( + "HarmonyImportDependencyParserPlugin", + (expr, requests) => { + const dependencies = requests.map(request => { + const dep = new HarmonyAcceptImportDependency( + request, + parser.state.module, + parser.state.harmonyParserScope + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return dep; + }); + if (dependencies.length > 0) { + const dep = new HarmonyAcceptDependency( + expr.range, + dependencies, + false + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + } + } + ); + } +}; + + +/***/ }), + +/***/ 79171: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const HarmonyImportDependency = __webpack_require__(81599); + +class HarmonyImportSideEffectDependency extends HarmonyImportDependency { + constructor(request, originModule, sourceOrder, parserScope) { + super(request, originModule, sourceOrder, parserScope); + } + + getReference() { + if (this._module && this._module.factoryMeta.sideEffectFree) return null; + + return super.getReference(); + } + + get type() { + return "harmony side effect evaluation"; + } +} + +HarmonyImportSideEffectDependency.Template = class HarmonyImportSideEffectDependencyTemplate extends HarmonyImportDependency.Template { + getHarmonyInitOrder(dep) { + if (dep._module && dep._module.factoryMeta.sideEffectFree) return NaN; + return super.getHarmonyInitOrder(dep); + } +}; + +module.exports = HarmonyImportSideEffectDependency; + + +/***/ }), + +/***/ 95966: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DependencyReference = __webpack_require__(71722); +const HarmonyImportDependency = __webpack_require__(81599); +const HarmonyLinkingError = __webpack_require__(30327); + +class HarmonyImportSpecifierDependency extends HarmonyImportDependency { + constructor( + request, + originModule, + sourceOrder, + parserScope, + id, + name, + range, + strictExportPresence + ) { + super(request, originModule, sourceOrder, parserScope); + this.id = id === null ? null : `${id}`; + this.redirectedId = undefined; + this.name = name; + this.range = range; + this.strictExportPresence = strictExportPresence; + this.namespaceObjectAsContext = false; + this.callArgs = undefined; + this.call = undefined; + this.directImport = undefined; + this.shorthand = undefined; + } + + get type() { + return "harmony import specifier"; + } + + get _id() { + return this.redirectedId || this.id; + } + + getReference() { + if (!this._module) return null; + return new DependencyReference( + this._module, + this._id && !this.namespaceObjectAsContext ? [this._id] : true, + false, + this.sourceOrder + ); + } + + getWarnings() { + if ( + this.strictExportPresence || + this.originModule.buildMeta.strictHarmonyModule + ) { + return []; + } + return this._getErrors(); + } + + getErrors() { + if ( + this.strictExportPresence || + this.originModule.buildMeta.strictHarmonyModule + ) { + return this._getErrors(); + } + return []; + } + + _getErrors() { + const importedModule = this._module; + if (!importedModule) { + return; + } + + if (!importedModule.buildMeta || !importedModule.buildMeta.exportsType) { + // It's not an harmony module + if ( + this.originModule.buildMeta.strictHarmonyModule && + this._id && + this._id !== "default" + ) { + // In strict harmony modules we only support the default export + return [ + new HarmonyLinkingError( + `Can't import the named export '${this._id}' from non EcmaScript module (only default export is available)` + ) + ]; + } + return; + } + + if (!this._id) { + return; + } + + if (importedModule.isProvided(this._id) !== false) { + // It's provided or we are not sure + return; + } + + // We are sure that it's not provided + const idIsNotNameMessage = + this._id !== this.name ? ` (imported as '${this.name}')` : ""; + const errorMessage = `"export '${this._id}'${idIsNotNameMessage} was not found in '${this.userRequest}'`; + return [new HarmonyLinkingError(errorMessage)]; + } + + // implement this method to allow the occurrence order plugin to count correctly + getNumberOfIdOccurrences() { + return 0; + } + + updateHash(hash) { + super.updateHash(hash); + const importedModule = this._module; + hash.update((importedModule && this._id) + ""); + hash.update( + (importedModule && this._id && importedModule.isUsed(this._id)) + "" + ); + hash.update( + (importedModule && + (!importedModule.buildMeta || importedModule.buildMeta.exportsType)) + + "" + ); + hash.update( + (importedModule && + importedModule.used + JSON.stringify(importedModule.usedExports)) + "" + ); + } + + disconnect() { + super.disconnect(); + this.redirectedId = undefined; + } +} + +HarmonyImportSpecifierDependency.Template = class HarmonyImportSpecifierDependencyTemplate extends HarmonyImportDependency.Template { + apply(dep, source, runtime) { + super.apply(dep, source, runtime); + const content = this.getContent(dep, runtime); + source.replace(dep.range[0], dep.range[1] - 1, content); + } + + getContent(dep, runtime) { + const exportExpr = runtime.exportFromImport({ + module: dep._module, + request: dep.request, + exportName: dep._id, + originModule: dep.originModule, + asiSafe: dep.shorthand, + isCall: dep.call, + callContext: !dep.directImport, + importVar: dep.getImportVar() + }); + return dep.shorthand ? `${dep.name}: ${exportExpr}` : exportExpr; + } +}; + +module.exports = HarmonyImportSpecifierDependency; + + +/***/ }), + +/***/ 27204: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const NullDependency = __webpack_require__(5088); + +class HarmonyInitDependency extends NullDependency { + constructor(originModule) { + super(); + this.originModule = originModule; + } + + get type() { + return "harmony init"; + } +} + +module.exports = HarmonyInitDependency; + +HarmonyInitDependency.Template = class HarmonyInitDependencyTemplate { + apply(dep, source, runtime, dependencyTemplates) { + const module = dep.originModule; + const list = []; + for (const dependency of module.dependencies) { + const template = dependencyTemplates.get(dependency.constructor); + if ( + template && + typeof template.harmonyInit === "function" && + typeof template.getHarmonyInitOrder === "function" + ) { + const order = template.getHarmonyInitOrder(dependency); + if (!isNaN(order)) { + list.push({ + order, + listOrder: list.length, + dependency, + template + }); + } + } + } + + list.sort((a, b) => { + const x = a.order - b.order; + if (x) return x; + return a.listOrder - b.listOrder; + }); + + for (const item of list) { + item.template.harmonyInit( + item.dependency, + source, + runtime, + dependencyTemplates + ); + } + } +}; + + +/***/ }), + +/***/ 66792: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const HarmonyCompatibilityDependency = __webpack_require__(1533); +const HarmonyInitDependency = __webpack_require__(27204); +const HarmonyImportSpecifierDependency = __webpack_require__(95966); +const HarmonyImportSideEffectDependency = __webpack_require__(79171); +const HarmonyExportHeaderDependency = __webpack_require__(21320); +const HarmonyExportExpressionDependency = __webpack_require__(84245); +const HarmonyExportSpecifierDependency = __webpack_require__(34834); +const HarmonyExportImportedSpecifierDependency = __webpack_require__(22864); +const HarmonyAcceptDependency = __webpack_require__(75159); +const HarmonyAcceptImportDependency = __webpack_require__(66136); + +const NullFactory = __webpack_require__(40438); + +const HarmonyDetectionParserPlugin = __webpack_require__(59310); +const HarmonyImportDependencyParserPlugin = __webpack_require__(99433); +const HarmonyExportDependencyParserPlugin = __webpack_require__(49180); +const HarmonyTopLevelThisParserPlugin = __webpack_require__(58215); + +class HarmonyModulesPlugin { + constructor(options) { + this.options = options; + } + + apply(compiler) { + compiler.hooks.compilation.tap( + "HarmonyModulesPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + HarmonyCompatibilityDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + HarmonyCompatibilityDependency, + new HarmonyCompatibilityDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyInitDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + HarmonyInitDependency, + new HarmonyInitDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyImportSideEffectDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + HarmonyImportSideEffectDependency, + new HarmonyImportSideEffectDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyImportSpecifierDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + HarmonyImportSpecifierDependency, + new HarmonyImportSpecifierDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyExportHeaderDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + HarmonyExportHeaderDependency, + new HarmonyExportHeaderDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyExportExpressionDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + HarmonyExportExpressionDependency, + new HarmonyExportExpressionDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyExportSpecifierDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + HarmonyExportSpecifierDependency, + new HarmonyExportSpecifierDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyExportImportedSpecifierDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + HarmonyExportImportedSpecifierDependency, + new HarmonyExportImportedSpecifierDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyAcceptDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + HarmonyAcceptDependency, + new HarmonyAcceptDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyAcceptImportDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + HarmonyAcceptImportDependency, + new HarmonyAcceptImportDependency.Template() + ); + + const handler = (parser, parserOptions) => { + if (parserOptions.harmony !== undefined && !parserOptions.harmony) + return; + + new HarmonyDetectionParserPlugin().apply(parser); + new HarmonyImportDependencyParserPlugin(this.options).apply(parser); + new HarmonyExportDependencyParserPlugin(this.options).apply(parser); + new HarmonyTopLevelThisParserPlugin().apply(parser); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("HarmonyModulesPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("HarmonyModulesPlugin", handler); + } + ); + } +} +module.exports = HarmonyModulesPlugin; + + +/***/ }), + +/***/ 58215: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + +const ConstDependency = __webpack_require__(71101); + +class HarmonyTopLevelThisParserPlugin { + apply(parser) { + parser.hooks.expression + .for("this") + .tap("HarmonyTopLevelThisParserPlugin", node => { + if (!parser.scope.topLevelScope) return; + const module = parser.state.module; + const isHarmony = !!(module.buildMeta && module.buildMeta.exportsType); + if (isHarmony) { + const dep = new ConstDependency("undefined", node.range, false); + dep.loc = node.loc; + parser.state.current.addDependency(dep); + } + }); + } +} + +module.exports = HarmonyTopLevelThisParserPlugin; + + +/***/ }), + +/***/ 20417: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ContextDependency = __webpack_require__(11583); +const ContextDependencyTemplateAsRequireCall = __webpack_require__(54380); + +class ImportContextDependency extends ContextDependency { + constructor(options, range, valueRange) { + super(options); + this.range = range; + this.valueRange = valueRange; + } + + get type() { + return `import() context ${this.options.mode}`; + } +} + +ImportContextDependency.Template = ContextDependencyTemplateAsRequireCall; + +module.exports = ImportContextDependency; + + +/***/ }), + +/***/ 38875: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const AsyncDependenciesBlock = __webpack_require__(22814); +const ImportDependency = __webpack_require__(50883); + +module.exports = class ImportDependenciesBlock extends AsyncDependenciesBlock { + // TODO webpack 5 reorganize arguments + constructor(request, range, groupOptions, module, loc, originModule) { + super(groupOptions, module, loc, request); + this.range = range; + const dep = new ImportDependency(request, originModule, this); + dep.loc = loc; + this.addDependency(dep); + } +}; + + +/***/ }), + +/***/ 50883: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); + +class ImportDependency extends ModuleDependency { + constructor(request, originModule, block) { + super(request); + this.originModule = originModule; + this.block = block; + } + + get type() { + return "import()"; + } +} + +ImportDependency.Template = class ImportDependencyTemplate { + apply(dep, source, runtime) { + const content = runtime.moduleNamespacePromise({ + block: dep.block, + module: dep.module, + request: dep.request, + strict: dep.originModule.buildMeta.strictHarmonyModule, + message: "import()" + }); + + source.replace(dep.block.range[0], dep.block.range[1] - 1, content); + } +}; + +module.exports = ImportDependency; + + +/***/ }), + +/***/ 25552: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); + +class ImportEagerDependency extends ModuleDependency { + constructor(request, originModule, range) { + super(request); + this.originModule = originModule; + this.range = range; + } + + get type() { + return "import() eager"; + } +} + +ImportEagerDependency.Template = class ImportEagerDependencyTemplate { + apply(dep, source, runtime) { + const content = runtime.moduleNamespacePromise({ + module: dep.module, + request: dep.request, + strict: dep.originModule.buildMeta.strictHarmonyModule, + message: "import() eager" + }); + source.replace(dep.range[0], dep.range[1] - 1, content); + } +}; + +module.exports = ImportEagerDependency; + + +/***/ }), + +/***/ 93382: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ImportContextDependency = __webpack_require__(20417); +const ImportWeakDependency = __webpack_require__(86817); +const ImportDependenciesBlock = __webpack_require__(38875); +const ImportEagerDependency = __webpack_require__(25552); +const ContextDependencyHelpers = __webpack_require__(5594); +const UnsupportedFeatureWarning = __webpack_require__(99953); +const CommentCompilationWarning = __webpack_require__(51760); + +class ImportParserPlugin { + constructor(options) { + this.options = options; + } + + apply(parser) { + parser.hooks.importCall.tap("ImportParserPlugin", expr => { + if (expr.arguments.length !== 1) { + throw new Error( + "Incorrect number of arguments provided to 'import(module: string) -> Promise'." + ); + } + + const param = parser.evaluateExpression(expr.arguments[0]); + + let chunkName = null; + let mode = "lazy"; + let include = null; + let exclude = null; + const groupOptions = {}; + + const { + options: importOptions, + errors: commentErrors + } = parser.parseCommentOptions(expr.range); + + if (commentErrors) { + for (const e of commentErrors) { + const { comment } = e; + parser.state.module.warnings.push( + new CommentCompilationWarning( + `Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`, + parser.state.module, + comment.loc + ) + ); + } + } + + if (importOptions) { + if (importOptions.webpackIgnore !== undefined) { + if (typeof importOptions.webpackIgnore !== "boolean") { + parser.state.module.warnings.push( + new UnsupportedFeatureWarning( + parser.state.module, + `\`webpackIgnore\` expected a boolean, but received: ${importOptions.webpackIgnore}.`, + expr.loc + ) + ); + } else { + // Do not instrument `import()` if `webpackIgnore` is `true` + if (importOptions.webpackIgnore) { + return false; + } + } + } + if (importOptions.webpackChunkName !== undefined) { + if (typeof importOptions.webpackChunkName !== "string") { + parser.state.module.warnings.push( + new UnsupportedFeatureWarning( + parser.state.module, + `\`webpackChunkName\` expected a string, but received: ${importOptions.webpackChunkName}.`, + expr.loc + ) + ); + } else { + chunkName = importOptions.webpackChunkName; + } + } + if (importOptions.webpackMode !== undefined) { + if (typeof importOptions.webpackMode !== "string") { + parser.state.module.warnings.push( + new UnsupportedFeatureWarning( + parser.state.module, + `\`webpackMode\` expected a string, but received: ${importOptions.webpackMode}.`, + expr.loc + ) + ); + } else { + mode = importOptions.webpackMode; + } + } + if (importOptions.webpackPrefetch !== undefined) { + if (importOptions.webpackPrefetch === true) { + groupOptions.prefetchOrder = 0; + } else if (typeof importOptions.webpackPrefetch === "number") { + groupOptions.prefetchOrder = importOptions.webpackPrefetch; + } else { + parser.state.module.warnings.push( + new UnsupportedFeatureWarning( + parser.state.module, + `\`webpackPrefetch\` expected true or a number, but received: ${importOptions.webpackPrefetch}.`, + expr.loc + ) + ); + } + } + if (importOptions.webpackPreload !== undefined) { + if (importOptions.webpackPreload === true) { + groupOptions.preloadOrder = 0; + } else if (typeof importOptions.webpackPreload === "number") { + groupOptions.preloadOrder = importOptions.webpackPreload; + } else { + parser.state.module.warnings.push( + new UnsupportedFeatureWarning( + parser.state.module, + `\`webpackPreload\` expected true or a number, but received: ${importOptions.webpackPreload}.`, + expr.loc + ) + ); + } + } + if (importOptions.webpackInclude !== undefined) { + if ( + !importOptions.webpackInclude || + importOptions.webpackInclude.constructor.name !== "RegExp" + ) { + parser.state.module.warnings.push( + new UnsupportedFeatureWarning( + parser.state.module, + `\`webpackInclude\` expected a regular expression, but received: ${importOptions.webpackInclude}.`, + expr.loc + ) + ); + } else { + include = new RegExp(importOptions.webpackInclude); + } + } + if (importOptions.webpackExclude !== undefined) { + if ( + !importOptions.webpackExclude || + importOptions.webpackExclude.constructor.name !== "RegExp" + ) { + parser.state.module.warnings.push( + new UnsupportedFeatureWarning( + parser.state.module, + `\`webpackExclude\` expected a regular expression, but received: ${importOptions.webpackExclude}.`, + expr.loc + ) + ); + } else { + exclude = new RegExp(importOptions.webpackExclude); + } + } + } + + if (param.isString()) { + if (mode !== "lazy" && mode !== "eager" && mode !== "weak") { + parser.state.module.warnings.push( + new UnsupportedFeatureWarning( + parser.state.module, + `\`webpackMode\` expected 'lazy', 'eager' or 'weak', but received: ${mode}.`, + expr.loc + ) + ); + } + + if (mode === "eager") { + const dep = new ImportEagerDependency( + param.string, + parser.state.module, + expr.range + ); + parser.state.current.addDependency(dep); + } else if (mode === "weak") { + const dep = new ImportWeakDependency( + param.string, + parser.state.module, + expr.range + ); + parser.state.current.addDependency(dep); + } else { + const depBlock = new ImportDependenciesBlock( + param.string, + expr.range, + Object.assign(groupOptions, { + name: chunkName + }), + parser.state.module, + expr.loc, + parser.state.module + ); + parser.state.current.addBlock(depBlock); + } + return true; + } else { + if ( + mode !== "lazy" && + mode !== "lazy-once" && + mode !== "eager" && + mode !== "weak" + ) { + parser.state.module.warnings.push( + new UnsupportedFeatureWarning( + parser.state.module, + `\`webpackMode\` expected 'lazy', 'lazy-once', 'eager' or 'weak', but received: ${mode}.`, + expr.loc + ) + ); + mode = "lazy"; + } + + if (mode === "weak") { + mode = "async-weak"; + } + const dep = ContextDependencyHelpers.create( + ImportContextDependency, + expr.range, + param, + expr, + this.options, + { + chunkName, + groupOptions, + include, + exclude, + mode, + namespaceObject: parser.state.module.buildMeta.strictHarmonyModule + ? "strict" + : true + }, + parser + ); + if (!dep) return; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + }); + } +} + +module.exports = ImportParserPlugin; + + +/***/ }), + +/***/ 58839: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ImportDependency = __webpack_require__(50883); +const ImportEagerDependency = __webpack_require__(25552); +const ImportWeakDependency = __webpack_require__(86817); +const ImportContextDependency = __webpack_require__(20417); +const ImportParserPlugin = __webpack_require__(93382); + +class ImportPlugin { + constructor(options) { + this.options = options; + } + + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap( + "ImportPlugin", + (compilation, { contextModuleFactory, normalModuleFactory }) => { + compilation.dependencyFactories.set( + ImportDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ImportDependency, + new ImportDependency.Template() + ); + + compilation.dependencyFactories.set( + ImportEagerDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ImportEagerDependency, + new ImportEagerDependency.Template() + ); + + compilation.dependencyFactories.set( + ImportWeakDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ImportWeakDependency, + new ImportWeakDependency.Template() + ); + + compilation.dependencyFactories.set( + ImportContextDependency, + contextModuleFactory + ); + compilation.dependencyTemplates.set( + ImportContextDependency, + new ImportContextDependency.Template() + ); + + const handler = (parser, parserOptions) => { + if (parserOptions.import !== undefined && !parserOptions.import) + return; + + new ImportParserPlugin(options).apply(parser); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("ImportPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("ImportPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("ImportPlugin", handler); + } + ); + } +} +module.exports = ImportPlugin; + + +/***/ }), + +/***/ 86817: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); + +class ImportWeakDependency extends ModuleDependency { + constructor(request, originModule, range) { + super(request); + this.originModule = originModule; + this.range = range; + this.weak = true; + } + + get type() { + return "import() weak"; + } +} + +ImportWeakDependency.Template = class ImportDependencyTemplate { + apply(dep, source, runtime) { + const content = runtime.moduleNamespacePromise({ + module: dep.module, + request: dep.request, + strict: dep.originModule.buildMeta.strictHarmonyModule, + message: "import() weak", + weak: true + }); + source.replace(dep.range[0], dep.range[1] - 1, content); + } +}; + +module.exports = ImportWeakDependency; + + +/***/ }), + +/***/ 54396: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class JsonExportsDependency extends NullDependency { + constructor(exports) { + super(); + this.exports = exports; + } + + get type() { + return "json exports"; + } + + getExports() { + return { + exports: this.exports, + dependencies: undefined + }; + } +} + +module.exports = JsonExportsDependency; + + +/***/ }), + +/***/ 1129: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); + +class LoaderDependency extends ModuleDependency { + /** + * @param {string} request request string + */ + constructor(request) { + super(request); + } + + get type() { + return "loader"; + } +} + +module.exports = LoaderDependency; + + +/***/ }), + +/***/ 31559: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const LoaderDependency = __webpack_require__(1129); +const NormalModule = __webpack_require__(25963); + +/** @typedef {import("../Module")} Module */ + +/** + * @callback LoadModuleCallback + * @param {Error=} err error object + * @param {string=} source source code + * @param {object=} map source map + * @param {Module=} module loaded module if successful + */ + +class LoaderPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "LoaderPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + LoaderDependency, + normalModuleFactory + ); + } + ); + + compiler.hooks.compilation.tap("LoaderPlugin", compilation => { + compilation.hooks.normalModuleLoader.tap( + "LoaderPlugin", + (loaderContext, module) => { + /** + * @param {string} request the request string to load the module from + * @param {LoadModuleCallback} callback callback returning the loaded module or error + * @returns {void} + */ + loaderContext.loadModule = (request, callback) => { + const dep = new LoaderDependency(request); + dep.loc = { + name: request + }; + const factory = compilation.dependencyFactories.get( + dep.constructor + ); + if (factory === undefined) { + return callback( + new Error( + `No module factory available for dependency type: ${dep.constructor.name}` + ) + ); + } + compilation.semaphore.release(); + compilation.addModuleDependencies( + module, + [ + { + factory, + dependencies: [dep] + } + ], + true, + "lm", + true, + err => { + compilation.semaphore.acquire(() => { + if (err) { + return callback(err); + } + if (!dep.module) { + return callback(new Error("Cannot load the module")); + } + // TODO consider removing this in webpack 5 + if (dep.module instanceof NormalModule && dep.module.error) { + return callback(dep.module.error); + } + if (!dep.module._source) { + throw new Error( + "The module created for a LoaderDependency must have a property _source" + ); + } + let source, map; + const moduleSource = dep.module._source; + if (moduleSource.sourceAndMap) { + const sourceAndMap = moduleSource.sourceAndMap(); + map = sourceAndMap.map; + source = sourceAndMap.source; + } else { + map = moduleSource.map(); + source = moduleSource.source(); + } + if (dep.module.buildInfo.fileDependencies) { + for (const d of dep.module.buildInfo.fileDependencies) { + loaderContext.addDependency(d); + } + } + if (dep.module.buildInfo.contextDependencies) { + for (const d of dep.module.buildInfo.contextDependencies) { + loaderContext.addContextDependency(d); + } + } + return callback(null, source, map, dep.module); + }); + } + ); + }; + } + ); + }); + } +} +module.exports = LoaderPlugin; + + +/***/ }), + +/***/ 17356: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class LocalModule { + constructor(module, name, idx) { + this.module = module; + this.name = name; + this.idx = idx; + this.used = false; + } + + flagUsed() { + this.used = true; + } + + variableName() { + return "__WEBPACK_LOCAL_MODULE_" + this.idx + "__"; + } +} +module.exports = LocalModule; + + +/***/ }), + +/***/ 56570: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class LocalModuleDependency extends NullDependency { + constructor(localModule, range, callNew) { + super(); + localModule.flagUsed(); + this.localModule = localModule; + this.range = range; + this.callNew = callNew; + } +} + +LocalModuleDependency.Template = class LocalModuleDependencyTemplate { + apply(dep, source) { + if (!dep.range) return; + const moduleInstance = dep.callNew + ? `new (function () { return ${dep.localModule.variableName()}; })()` + : dep.localModule.variableName(); + source.replace(dep.range[0], dep.range[1] - 1, moduleInstance); + } +}; + +module.exports = LocalModuleDependency; + + +/***/ }), + +/***/ 39658: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const LocalModule = __webpack_require__(17356); +const LocalModulesHelpers = exports; + +const lookup = (parent, mod) => { + if (mod.charAt(0) !== ".") return mod; + + var path = parent.split("/"); + var segs = mod.split("/"); + path.pop(); + + for (let i = 0; i < segs.length; i++) { + const seg = segs[i]; + if (seg === "..") { + path.pop(); + } else if (seg !== ".") { + path.push(seg); + } + } + + return path.join("/"); +}; + +LocalModulesHelpers.addLocalModule = (state, name) => { + if (!state.localModules) { + state.localModules = []; + } + const m = new LocalModule(state.module, name, state.localModules.length); + state.localModules.push(m); + return m; +}; + +LocalModulesHelpers.getLocalModule = (state, name, namedModule) => { + if (!state.localModules) return null; + if (namedModule) { + // resolve dependency name relative to the defining named module + name = lookup(namedModule, name); + } + for (let i = 0; i < state.localModules.length; i++) { + if (state.localModules[i].name === name) { + return state.localModules[i]; + } + } + return null; +}; + +module.exports = LocalModulesHelpers; + + +/***/ }), + +/***/ 90865: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const Dependency = __webpack_require__(57282); + +class ModuleDependency extends Dependency { + /** + * @param {string} request request path which needs resolving + */ + constructor(request) { + super(); + this.request = request; + this.userRequest = request; + } + + getResourceIdentifier() { + return `module${this.request}`; + } +} + +module.exports = ModuleDependency; + + +/***/ }), + +/***/ 63708: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class ModuleDependencyTemplateAsId { + apply(dep, source, runtime) { + if (!dep.range) return; + const content = runtime.moduleId({ + module: dep.module, + request: dep.request + }); + source.replace(dep.range[0], dep.range[1] - 1, content); + } +} +module.exports = ModuleDependencyTemplateAsId; + + +/***/ }), + +/***/ 60441: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class ModuleDependencyTemplateAsRequireId { + apply(dep, source, runtime) { + if (!dep.range) return; + const content = runtime.moduleExports({ + module: dep.module, + request: dep.request + }); + source.replace(dep.range[0], dep.range[1] - 1, content); + } +} +module.exports = ModuleDependencyTemplateAsRequireId; + + +/***/ }), + +/***/ 29018: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); +const ModuleDependencyTemplateAsId = __webpack_require__(63708); + +class ModuleHotAcceptDependency extends ModuleDependency { + constructor(request, range) { + super(request); + this.range = range; + this.weak = true; + } + + get type() { + return "module.hot.accept"; + } +} + +ModuleHotAcceptDependency.Template = ModuleDependencyTemplateAsId; + +module.exports = ModuleHotAcceptDependency; + + +/***/ }), + +/***/ 60482: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); +const ModuleDependencyTemplateAsId = __webpack_require__(63708); + +class ModuleHotDeclineDependency extends ModuleDependency { + constructor(request, range) { + super(request); + this.range = range; + this.weak = true; + } + + get type() { + return "module.hot.decline"; + } +} + +ModuleHotDeclineDependency.Template = ModuleDependencyTemplateAsId; + +module.exports = ModuleHotDeclineDependency; + + +/***/ }), + +/***/ 7791: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +/** @typedef {import("./SingleEntryDependency")} SingleEntryDependency */ +const Dependency = __webpack_require__(57282); + +class MultiEntryDependency extends Dependency { + /** + * @param {SingleEntryDependency[]} dependencies an array of SingleEntryDependencies + * @param {string} name entry name + */ + constructor(dependencies, name) { + super(); + this.dependencies = dependencies; + this.name = name; + } + + get type() { + return "multi entry"; + } +} + +module.exports = MultiEntryDependency; + + +/***/ }), + +/***/ 5088: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const Dependency = __webpack_require__(57282); + +class NullDependency extends Dependency { + get type() { + return "null"; + } + + updateHash() {} +} + +NullDependency.Template = class NullDependencyTemplate { + apply() {} +}; + +module.exports = NullDependency; + + +/***/ }), + +/***/ 14237: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); + +class PrefetchDependency extends ModuleDependency { + constructor(request) { + super(request); + } + + get type() { + return "prefetch"; + } +} + +module.exports = PrefetchDependency; + + +/***/ }), + +/***/ 79142: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ContextDependency = __webpack_require__(11583); +const ModuleDependencyTemplateAsRequireId = __webpack_require__(60441); + +class RequireContextDependency extends ContextDependency { + constructor(options, range) { + super(options); + this.range = range; + } + + get type() { + return "require.context"; + } +} + +RequireContextDependency.Template = ModuleDependencyTemplateAsRequireId; + +module.exports = RequireContextDependency; + + +/***/ }), + +/***/ 10566: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const RequireContextDependency = __webpack_require__(79142); + +module.exports = class RequireContextDependencyParserPlugin { + apply(parser) { + parser.hooks.call + .for("require.context") + .tap("RequireContextDependencyParserPlugin", expr => { + let regExp = /^\.\/.*$/; + let recursive = true; + let mode = "sync"; + switch (expr.arguments.length) { + case 4: { + const modeExpr = parser.evaluateExpression(expr.arguments[3]); + if (!modeExpr.isString()) return; + mode = modeExpr.string; + } + // falls through + case 3: { + const regExpExpr = parser.evaluateExpression(expr.arguments[2]); + if (!regExpExpr.isRegExp()) return; + regExp = regExpExpr.regExp; + } + // falls through + case 2: { + const recursiveExpr = parser.evaluateExpression(expr.arguments[1]); + if (!recursiveExpr.isBoolean()) return; + recursive = recursiveExpr.bool; + } + // falls through + case 1: { + const requestExpr = parser.evaluateExpression(expr.arguments[0]); + if (!requestExpr.isString()) return; + const dep = new RequireContextDependency( + { + request: requestExpr.string, + recursive, + regExp, + mode + }, + expr.range + ); + dep.loc = expr.loc; + dep.optional = parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + } + }); + } +}; + + +/***/ }), + +/***/ 89042: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const RequireContextDependency = __webpack_require__(79142); +const ContextElementDependency = __webpack_require__(89079); + +const RequireContextDependencyParserPlugin = __webpack_require__(10566); + +class RequireContextPlugin { + constructor(modulesDirectories, extensions, mainFiles) { + if (!Array.isArray(modulesDirectories)) { + throw new Error("modulesDirectories must be an array"); + } + if (!Array.isArray(extensions)) { + throw new Error("extensions must be an array"); + } + this.modulesDirectories = modulesDirectories; + this.extensions = extensions; + this.mainFiles = mainFiles; + } + + apply(compiler) { + compiler.hooks.compilation.tap( + "RequireContextPlugin", + (compilation, { contextModuleFactory, normalModuleFactory }) => { + compilation.dependencyFactories.set( + RequireContextDependency, + contextModuleFactory + ); + compilation.dependencyTemplates.set( + RequireContextDependency, + new RequireContextDependency.Template() + ); + + compilation.dependencyFactories.set( + ContextElementDependency, + normalModuleFactory + ); + + const handler = (parser, parserOptions) => { + if ( + parserOptions.requireContext !== undefined && + !parserOptions.requireContext + ) + return; + + new RequireContextDependencyParserPlugin().apply(parser); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("RequireContextPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("RequireContextPlugin", handler); + + contextModuleFactory.hooks.alternatives.tap( + "RequireContextPlugin", + items => { + if (items.length === 0) return items; + return items + .map(obj => { + return this.extensions + .filter(ext => { + const l = obj.request.length; + return ( + l > ext.length && + obj.request.substr(l - ext.length, l) === ext + ); + }) + .map(ext => { + const l = obj.request.length; + return { + context: obj.context, + request: obj.request.substr(0, l - ext.length) + }; + }) + .concat(obj); + }) + .reduce((a, b) => a.concat(b), []); + } + ); + + contextModuleFactory.hooks.alternatives.tap( + "RequireContextPlugin", + items => { + if (items.length === 0) return items; + return items + .map(obj => { + return this.mainFiles + .filter(mainFile => { + const l = obj.request.length; + return ( + l > mainFile.length + 1 && + obj.request.substr(l - mainFile.length - 1, l) === + "/" + mainFile + ); + }) + .map(mainFile => { + const l = obj.request.length; + return [ + { + context: obj.context, + request: obj.request.substr(0, l - mainFile.length) + }, + { + context: obj.context, + request: obj.request.substr(0, l - mainFile.length - 1) + } + ]; + }) + .reduce((a, b) => a.concat(b), []) + .concat(obj); + }) + .reduce((a, b) => a.concat(b), []); + } + ); + + contextModuleFactory.hooks.alternatives.tap( + "RequireContextPlugin", + items => { + if (items.length === 0) return items; + return items.map(obj => { + for (let i = 0; i < this.modulesDirectories.length; i++) { + const dir = this.modulesDirectories[i]; + const idx = obj.request.indexOf("./" + dir + "/"); + if (idx === 0) { + obj.request = obj.request.slice(dir.length + 3); + break; + } + } + return obj; + }); + } + ); + } + ); + } +} +module.exports = RequireContextPlugin; + + +/***/ }), + +/***/ 49105: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const AsyncDependenciesBlock = __webpack_require__(22814); +const RequireEnsureDependency = __webpack_require__(75830); + +module.exports = class RequireEnsureDependenciesBlock extends AsyncDependenciesBlock { + constructor( + expr, + successExpression, + errorExpression, + chunkName, + chunkNameRange, + module, + loc + ) { + super(chunkName, module, loc, null); + this.expr = expr; + const successBodyRange = + successExpression && + successExpression.body && + successExpression.body.range; + if (successBodyRange) { + this.range = [successBodyRange[0] + 1, successBodyRange[1] - 1]; + } + this.chunkNameRange = chunkNameRange; + const dep = new RequireEnsureDependency(this); + dep.loc = loc; + this.addDependency(dep); + } +}; + + +/***/ }), + +/***/ 24620: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const RequireEnsureDependenciesBlock = __webpack_require__(49105); +const RequireEnsureItemDependency = __webpack_require__(5511); +const getFunctionExpression = __webpack_require__(64197); + +module.exports = class RequireEnsureDependenciesBlockParserPlugin { + apply(parser) { + parser.hooks.call + .for("require.ensure") + .tap("RequireEnsureDependenciesBlockParserPlugin", expr => { + let chunkName = null; + let chunkNameRange = null; + let errorExpressionArg = null; + let errorExpression = null; + switch (expr.arguments.length) { + case 4: { + const chunkNameExpr = parser.evaluateExpression(expr.arguments[3]); + if (!chunkNameExpr.isString()) return; + chunkNameRange = chunkNameExpr.range; + chunkName = chunkNameExpr.string; + } + // falls through + case 3: { + errorExpressionArg = expr.arguments[2]; + errorExpression = getFunctionExpression(errorExpressionArg); + + if (!errorExpression && !chunkName) { + const chunkNameExpr = parser.evaluateExpression( + expr.arguments[2] + ); + if (!chunkNameExpr.isString()) return; + chunkNameRange = chunkNameExpr.range; + chunkName = chunkNameExpr.string; + } + } + // falls through + case 2: { + const dependenciesExpr = parser.evaluateExpression( + expr.arguments[0] + ); + const dependenciesItems = dependenciesExpr.isArray() + ? dependenciesExpr.items + : [dependenciesExpr]; + const successExpressionArg = expr.arguments[1]; + const successExpression = getFunctionExpression( + successExpressionArg + ); + + if (successExpression) { + parser.walkExpressions(successExpression.expressions); + } + if (errorExpression) { + parser.walkExpressions(errorExpression.expressions); + } + + const dep = new RequireEnsureDependenciesBlock( + expr, + successExpression ? successExpression.fn : successExpressionArg, + errorExpression ? errorExpression.fn : errorExpressionArg, + chunkName, + chunkNameRange, + parser.state.module, + expr.loc + ); + const old = parser.state.current; + parser.state.current = dep; + try { + let failed = false; + parser.inScope([], () => { + for (const ee of dependenciesItems) { + if (ee.isString()) { + const edep = new RequireEnsureItemDependency(ee.string); + edep.loc = dep.loc; + dep.addDependency(edep); + } else { + failed = true; + } + } + }); + if (failed) { + return; + } + if (successExpression) { + if (successExpression.fn.body.type === "BlockStatement") { + parser.walkStatement(successExpression.fn.body); + } else { + parser.walkExpression(successExpression.fn.body); + } + } + old.addBlock(dep); + } finally { + parser.state.current = old; + } + if (!successExpression) { + parser.walkExpression(successExpressionArg); + } + if (errorExpression) { + if (errorExpression.fn.body.type === "BlockStatement") { + parser.walkStatement(errorExpression.fn.body); + } else { + parser.walkExpression(errorExpression.fn.body); + } + } else if (errorExpressionArg) { + parser.walkExpression(errorExpressionArg); + } + return true; + } + } + }); + } +}; + + +/***/ }), + +/***/ 75830: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class RequireEnsureDependency extends NullDependency { + constructor(block) { + super(); + this.block = block; + } + + get type() { + return "require.ensure"; + } +} + +RequireEnsureDependency.Template = class RequireEnsureDependencyTemplate { + apply(dep, source, runtime) { + const depBlock = dep.block; + const promise = runtime.blockPromise({ + block: depBlock, + message: "require.ensure" + }); + const errorCallbackExists = + depBlock.expr.arguments.length === 4 || + (!depBlock.chunkName && depBlock.expr.arguments.length === 3); + const startBlock = `${promise}.then((`; + const middleBlock = ").bind(null, __webpack_require__)).catch("; + const endBlock = `).bind(null, __webpack_require__)).catch(${runtime.onError()})`; + source.replace( + depBlock.expr.range[0], + depBlock.expr.arguments[1].range[0] - 1, + startBlock + ); + if (errorCallbackExists) { + source.replace( + depBlock.expr.arguments[1].range[1], + depBlock.expr.arguments[2].range[0] - 1, + middleBlock + ); + source.replace( + depBlock.expr.arguments[2].range[1], + depBlock.expr.range[1] - 1, + ")" + ); + } else { + source.replace( + depBlock.expr.arguments[1].range[1], + depBlock.expr.range[1] - 1, + endBlock + ); + } + } +}; + +module.exports = RequireEnsureDependency; + + +/***/ }), + +/***/ 5511: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); +const NullDependency = __webpack_require__(5088); + +class RequireEnsureItemDependency extends ModuleDependency { + constructor(request) { + super(request); + } + + get type() { + return "require.ensure item"; + } +} + +RequireEnsureItemDependency.Template = NullDependency.Template; + +module.exports = RequireEnsureItemDependency; + + +/***/ }), + +/***/ 98655: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const RequireEnsureItemDependency = __webpack_require__(5511); +const RequireEnsureDependency = __webpack_require__(75830); + +const NullFactory = __webpack_require__(40438); + +const RequireEnsureDependenciesBlockParserPlugin = __webpack_require__(24620); + +const ParserHelpers = __webpack_require__(23999); + +class RequireEnsurePlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "RequireEnsurePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + RequireEnsureItemDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + RequireEnsureItemDependency, + new RequireEnsureItemDependency.Template() + ); + + compilation.dependencyFactories.set( + RequireEnsureDependency, + new NullFactory() + ); + compilation.dependencyTemplates.set( + RequireEnsureDependency, + new RequireEnsureDependency.Template() + ); + + const handler = (parser, parserOptions) => { + if ( + parserOptions.requireEnsure !== undefined && + !parserOptions.requireEnsure + ) + return; + + new RequireEnsureDependenciesBlockParserPlugin().apply(parser); + parser.hooks.evaluateTypeof + .for("require.ensure") + .tap( + "RequireEnsurePlugin", + ParserHelpers.evaluateToString("function") + ); + parser.hooks.typeof + .for("require.ensure") + .tap( + "RequireEnsurePlugin", + ParserHelpers.toConstantDependency( + parser, + JSON.stringify("function") + ) + ); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("RequireEnsurePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("RequireEnsurePlugin", handler); + } + ); + } +} +module.exports = RequireEnsurePlugin; + + +/***/ }), + +/***/ 22928: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class RequireHeaderDependency extends NullDependency { + constructor(range) { + super(); + if (!Array.isArray(range)) throw new Error("range must be valid"); + this.range = range; + } +} + +RequireHeaderDependency.Template = class RequireHeaderDependencyTemplate { + apply(dep, source) { + source.replace(dep.range[0], dep.range[1] - 1, "__webpack_require__"); + } + + applyAsTemplateArgument(name, dep, source) { + source.replace(dep.range[0], dep.range[1] - 1, "require"); + } +}; + +module.exports = RequireHeaderDependency; + + +/***/ }), + +/***/ 58045: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DependencyReference = __webpack_require__(71722); +const ModuleDependency = __webpack_require__(90865); +const Template = __webpack_require__(96066); + +class RequireIncludeDependency extends ModuleDependency { + constructor(request, range) { + super(request); + this.range = range; + } + + getReference() { + if (!this.module) return null; + // This doesn't use any export + return new DependencyReference(this.module, [], false); + } + + get type() { + return "require.include"; + } +} + +RequireIncludeDependency.Template = class RequireIncludeDependencyTemplate { + apply(dep, source, runtime) { + const comment = runtime.outputOptions.pathinfo + ? Template.toComment( + `require.include ${runtime.requestShortener.shorten(dep.request)}` + ) + : ""; + source.replace(dep.range[0], dep.range[1] - 1, `undefined${comment}`); + } +}; + +module.exports = RequireIncludeDependency; + + +/***/ }), + +/***/ 36330: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const RequireIncludeDependency = __webpack_require__(58045); + +module.exports = class RequireIncludeDependencyParserPlugin { + apply(parser) { + parser.hooks.call + .for("require.include") + .tap("RequireIncludeDependencyParserPlugin", expr => { + if (expr.arguments.length !== 1) return; + const param = parser.evaluateExpression(expr.arguments[0]); + if (!param.isString()) return; + const dep = new RequireIncludeDependency(param.string, expr.range); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + return true; + }); + } +}; + + +/***/ }), + +/***/ 16522: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const RequireIncludeDependency = __webpack_require__(58045); +const RequireIncludeDependencyParserPlugin = __webpack_require__(36330); + +const ParserHelpers = __webpack_require__(23999); + +class RequireIncludePlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "RequireIncludePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + RequireIncludeDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + RequireIncludeDependency, + new RequireIncludeDependency.Template() + ); + + const handler = (parser, parserOptions) => { + if ( + parserOptions.requireInclude !== undefined && + !parserOptions.requireInclude + ) + return; + + new RequireIncludeDependencyParserPlugin().apply(parser); + parser.hooks.evaluateTypeof + .for("require.include") + .tap( + "RequireIncludePlugin", + ParserHelpers.evaluateToString("function") + ); + parser.hooks.typeof + .for("require.include") + .tap( + "RequireIncludePlugin", + ParserHelpers.toConstantDependency( + parser, + JSON.stringify("function") + ) + ); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("RequireIncludePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("RequireIncludePlugin", handler); + } + ); + } +} +module.exports = RequireIncludePlugin; + + +/***/ }), + +/***/ 83309: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ContextDependency = __webpack_require__(11583); +const ContextDependencyTemplateAsId = __webpack_require__(6174); + +class RequireResolveContextDependency extends ContextDependency { + constructor(options, range, valueRange) { + super(options); + this.range = range; + this.valueRange = valueRange; + } + + get type() { + return "amd require context"; + } +} + +RequireResolveContextDependency.Template = ContextDependencyTemplateAsId; + +module.exports = RequireResolveContextDependency; + + +/***/ }), + +/***/ 43519: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); +const ModuleDependencyAsId = __webpack_require__(63708); + +class RequireResolveDependency extends ModuleDependency { + constructor(request, range) { + super(request); + this.range = range; + } + + get type() { + return "require.resolve"; + } +} + +RequireResolveDependency.Template = ModuleDependencyAsId; + +module.exports = RequireResolveDependency; + + +/***/ }), + +/***/ 68349: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const RequireResolveDependency = __webpack_require__(43519); +const RequireResolveContextDependency = __webpack_require__(83309); +const RequireResolveHeaderDependency = __webpack_require__(69647); +const ContextDependencyHelpers = __webpack_require__(5594); + +class RequireResolveDependencyParserPlugin { + constructor(options) { + this.options = options; + } + + apply(parser) { + const options = this.options; + + const process = (expr, weak) => { + if (expr.arguments.length !== 1) return; + const param = parser.evaluateExpression(expr.arguments[0]); + if (param.isConditional()) { + for (const option of param.options) { + const result = processItem(expr, option, weak); + if (result === undefined) { + processContext(expr, option, weak); + } + } + const dep = new RequireResolveHeaderDependency(expr.callee.range); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + return true; + } else { + const result = processItem(expr, param, weak); + if (result === undefined) { + processContext(expr, param, weak); + } + const dep = new RequireResolveHeaderDependency(expr.callee.range); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + return true; + } + }; + const processItem = (expr, param, weak) => { + if (param.isString()) { + const dep = new RequireResolveDependency(param.string, param.range); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + dep.weak = weak; + parser.state.current.addDependency(dep); + return true; + } + }; + const processContext = (expr, param, weak) => { + const dep = ContextDependencyHelpers.create( + RequireResolveContextDependency, + param.range, + param, + expr, + options, + { + mode: weak ? "weak" : "sync" + }, + parser + ); + if (!dep) return; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + }; + + parser.hooks.call + .for("require.resolve") + .tap("RequireResolveDependencyParserPlugin", expr => { + return process(expr, false); + }); + parser.hooks.call + .for("require.resolveWeak") + .tap("RequireResolveDependencyParserPlugin", expr => { + return process(expr, true); + }); + } +} +module.exports = RequireResolveDependencyParserPlugin; + + +/***/ }), + +/***/ 69647: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); + +class RequireResolveHeaderDependency extends NullDependency { + constructor(range) { + super(); + if (!Array.isArray(range)) throw new Error("range must be valid"); + this.range = range; + } +} + +RequireResolveHeaderDependency.Template = class RequireResolveHeaderDependencyTemplate { + apply(dep, source) { + source.replace(dep.range[0], dep.range[1] - 1, "/*require.resolve*/"); + } + + applyAsTemplateArgument(name, dep, source) { + source.replace(dep.range[0], dep.range[1] - 1, "/*require.resolve*/"); + } +}; + +module.exports = RequireResolveHeaderDependency; + + +/***/ }), + +/***/ 84828: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const ModuleDependency = __webpack_require__(90865); + +class SingleEntryDependency extends ModuleDependency { + /** + * @param {string} request request path for entry + */ + constructor(request) { + super(request); + } + + get type() { + return "single entry"; + } +} + +module.exports = SingleEntryDependency; + + +/***/ }), + +/***/ 68166: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ParserHelpers = __webpack_require__(23999); +const WebpackError = __webpack_require__(97391); + +class SystemPlugin { + constructor(options) { + this.options = options; + } + + apply(compiler) { + compiler.hooks.compilation.tap( + "SystemPlugin", + (compilation, { normalModuleFactory }) => { + const handler = (parser, parserOptions) => { + if (parserOptions.system !== undefined && !parserOptions.system) + return; + + const shouldWarn = parserOptions.system === undefined; + + const setNotSupported = name => { + parser.hooks.evaluateTypeof + .for(name) + .tap("SystemPlugin", ParserHelpers.evaluateToString("undefined")); + parser.hooks.expression + .for(name) + .tap( + "SystemPlugin", + ParserHelpers.expressionIsUnsupported( + parser, + name + " is not supported by webpack." + ) + ); + }; + + parser.hooks.typeof + .for("System.import") + .tap( + "SystemPlugin", + ParserHelpers.toConstantDependency( + parser, + JSON.stringify("function") + ) + ); + parser.hooks.evaluateTypeof + .for("System.import") + .tap("SystemPlugin", ParserHelpers.evaluateToString("function")); + parser.hooks.typeof + .for("System") + .tap( + "SystemPlugin", + ParserHelpers.toConstantDependency( + parser, + JSON.stringify("object") + ) + ); + parser.hooks.evaluateTypeof + .for("System") + .tap("SystemPlugin", ParserHelpers.evaluateToString("object")); + + setNotSupported("System.set"); + setNotSupported("System.get"); + setNotSupported("System.register"); + + parser.hooks.expression.for("System").tap("SystemPlugin", () => { + const systemPolyfillRequire = ParserHelpers.requireFileAsExpression( + parser.state.module.context, + __webpack_require__.ab + "system.js" + ); + return ParserHelpers.addParsedVariableToModule( + parser, + "System", + systemPolyfillRequire + ); + }); + + parser.hooks.call.for("System.import").tap("SystemPlugin", expr => { + if (shouldWarn) { + parser.state.module.warnings.push( + new SystemImportDeprecationWarning( + parser.state.module, + expr.loc + ) + ); + } + + return parser.hooks.importCall.call(expr); + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("SystemPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("SystemPlugin", handler); + } + ); + } +} + +class SystemImportDeprecationWarning extends WebpackError { + constructor(module, loc) { + super( + "System.import() is deprecated and will be removed soon. Use import() instead.\n" + + "For more info visit https://webpack.js.org/guides/code-splitting/" + ); + + this.name = "SystemImportDeprecationWarning"; + + this.module = module; + this.loc = loc; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = SystemPlugin; + + +/***/ }), + +/***/ 15826: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const NullDependency = __webpack_require__(5088); +const webpackMissingModule = __webpack_require__(75386).module; + +class UnsupportedDependency extends NullDependency { + constructor(request, range) { + super(); + this.request = request; + this.range = range; + } +} + +UnsupportedDependency.Template = class UnsupportedDependencyTemplate { + apply(dep, source, runtime) { + source.replace( + dep.range[0], + dep.range[1], + webpackMissingModule(dep.request) + ); + } +}; + +module.exports = UnsupportedDependency; + + +/***/ }), + +/***/ 18925: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DependencyReference = __webpack_require__(71722); +const ModuleDependency = __webpack_require__(90865); + +class WebAssemblyExportImportedDependency extends ModuleDependency { + constructor(exportName, request, name, valueType) { + super(request); + /** @type {string} */ + this.exportName = exportName; + /** @type {string} */ + this.name = name; + /** @type {string} */ + this.valueType = valueType; + } + + getReference() { + if (!this.module) return null; + return new DependencyReference(this.module, [this.name], false); + } + + get type() { + return "wasm export import"; + } +} + +module.exports = WebAssemblyExportImportedDependency; + + +/***/ }), + +/***/ 52959: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const DependencyReference = __webpack_require__(71722); +const ModuleDependency = __webpack_require__(90865); +const UnsupportedWebAssemblyFeatureError = __webpack_require__(43101); + +/** @typedef {import("@webassemblyjs/ast").ModuleImportDescription} ModuleImportDescription */ + +class WebAssemblyImportDependency extends ModuleDependency { + /** + * @param {string} request the request + * @param {string} name the imported name + * @param {ModuleImportDescription} description the WASM ast node + * @param {false | string} onlyDirectImport if only direct imports are allowed + */ + constructor(request, name, description, onlyDirectImport) { + super(request); + /** @type {string} */ + this.name = name; + /** @type {ModuleImportDescription} */ + this.description = description; + /** @type {false | string} */ + this.onlyDirectImport = onlyDirectImport; + } + + getReference() { + if (!this.module) return null; + return new DependencyReference(this.module, [this.name], false); + } + + getErrors() { + if ( + this.onlyDirectImport && + this.module && + !this.module.type.startsWith("webassembly") + ) { + return [ + new UnsupportedWebAssemblyFeatureError( + `Import "${this.name}" from "${this.request}" with ${this.onlyDirectImport} can only be used for direct wasm to wasm dependencies` + ) + ]; + } + } + + get type() { + return "wasm import"; + } +} + +module.exports = WebAssemblyImportDependency; + + +/***/ }), + +/***/ 75386: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const toErrorCode = err => + `var e = new Error(${JSON.stringify(err)}); e.code = 'MODULE_NOT_FOUND';`; + +exports.module = request => + `!(function webpackMissingModule() { ${exports.moduleCode(request)} }())`; + +exports.promise = request => { + const errorCode = toErrorCode(`Cannot find module '${request}'`); + return `Promise.reject(function webpackMissingModule() { ${errorCode} return e; }())`; +}; + +exports.moduleCode = request => { + const errorCode = toErrorCode(`Cannot find module '${request}'`); + return `${errorCode} throw e;`; +}; + + +/***/ }), + +/***/ 64197: +/***/ (function(module) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +module.exports = expr => { + // + if ( + expr.type === "FunctionExpression" || + expr.type === "ArrowFunctionExpression" + ) { + return { + fn: expr, + expressions: [], + needThis: false + }; + } + + // .bind() + if ( + expr.type === "CallExpression" && + expr.callee.type === "MemberExpression" && + expr.callee.object.type === "FunctionExpression" && + expr.callee.property.type === "Identifier" && + expr.callee.property.name === "bind" && + expr.arguments.length === 1 + ) { + return { + fn: expr.callee.object, + expressions: [expr.arguments[0]], + needThis: undefined + }; + } + // (function(_this) {return })(this) (Coffeescript) + if ( + expr.type === "CallExpression" && + expr.callee.type === "FunctionExpression" && + expr.callee.body.type === "BlockStatement" && + expr.arguments.length === 1 && + expr.arguments[0].type === "ThisExpression" && + expr.callee.body.body && + expr.callee.body.body.length === 1 && + expr.callee.body.body[0].type === "ReturnStatement" && + expr.callee.body.body[0].argument && + expr.callee.body.body[0].argument.type === "FunctionExpression" + ) { + return { + fn: expr.callee.body.body[0].argument, + expressions: [], + needThis: true + }; + } +}; + + +/***/ }), + +/***/ 49: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Dependency").SourcePosition} SourcePosition */ + +// TODO webpack 5: pos must be SourcePosition +/** + * @param {SourcePosition|DependencyLocation|string} pos position + * @returns {string} formatted position + */ +const formatPosition = pos => { + if (pos === null) return ""; + // TODO webpack 5: Simplify this + if (typeof pos === "string") return pos; + if (typeof pos === "number") return `${pos}`; + if (typeof pos === "object") { + if ("line" in pos && "column" in pos) { + return `${pos.line}:${pos.column}`; + } else if ("line" in pos) { + return `${pos.line}:?`; + } else if ("index" in pos) { + // TODO webpack 5 remove this case + return `+${pos.index}`; + } else { + return ""; + } + } + return ""; +}; + +// TODO webpack 5: loc must be DependencyLocation +/** + * @param {DependencyLocation|SourcePosition|string} loc location + * @returns {string} formatted location + */ +const formatLocation = loc => { + if (loc === null) return ""; + // TODO webpack 5: Simplify this + if (typeof loc === "string") return loc; + if (typeof loc === "number") return `${loc}`; + if (typeof loc === "object") { + if ("start" in loc && loc.start && "end" in loc && loc.end) { + if ( + typeof loc.start === "object" && + typeof loc.start.line === "number" && + typeof loc.end === "object" && + typeof loc.end.line === "number" && + typeof loc.end.column === "number" && + loc.start.line === loc.end.line + ) { + return `${formatPosition(loc.start)}-${loc.end.column}`; + } else { + return `${formatPosition(loc.start)}-${formatPosition(loc.end)}`; + } + } + if ("start" in loc && loc.start) { + return formatPosition(loc.start); + } + if ("name" in loc && "index" in loc) { + return `${loc.name}[${loc.index}]`; + } + if ("name" in loc) { + return loc.name; + } + return formatPosition(loc); + } + return ""; +}; + +module.exports = formatLocation; + + +/***/ }), + +/***/ 47194: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + + +const LogType = Object.freeze({ + error: /** @type {"error"} */ ("error"), // message, c style arguments + warn: /** @type {"warn"} */ ("warn"), // message, c style arguments + info: /** @type {"info"} */ ("info"), // message, c style arguments + log: /** @type {"log"} */ ("log"), // message, c style arguments + debug: /** @type {"debug"} */ ("debug"), // message, c style arguments + + trace: /** @type {"trace"} */ ("trace"), // no arguments + + group: /** @type {"group"} */ ("group"), // [label] + groupCollapsed: /** @type {"groupCollapsed"} */ ("groupCollapsed"), // [label] + groupEnd: /** @type {"groupEnd"} */ ("groupEnd"), // [label] + + profile: /** @type {"profile"} */ ("profile"), // [profileName] + profileEnd: /** @type {"profileEnd"} */ ("profileEnd"), // [profileName] + + time: /** @type {"time"} */ ("time"), // name, time as [seconds, nanoseconds] + + clear: /** @type {"clear"} */ ("clear"), // no arguments + status: /** @type {"status"} */ ("status") // message, arguments +}); + +exports.LogType = LogType; + +/** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */ + +const LOG_SYMBOL = Symbol("webpack logger raw log method"); +const TIMERS_SYMBOL = Symbol("webpack logger times"); + +class WebpackLogger { + /** + * @param {function(LogTypeEnum, any[]=): void} log log function + */ + constructor(log) { + this[LOG_SYMBOL] = log; + } + + error(...args) { + this[LOG_SYMBOL](LogType.error, args); + } + + warn(...args) { + this[LOG_SYMBOL](LogType.warn, args); + } + + info(...args) { + this[LOG_SYMBOL](LogType.info, args); + } + + log(...args) { + this[LOG_SYMBOL](LogType.log, args); + } + + debug(...args) { + this[LOG_SYMBOL](LogType.debug, args); + } + + assert(assertion, ...args) { + if (!assertion) { + this[LOG_SYMBOL](LogType.error, args); + } + } + + trace() { + this[LOG_SYMBOL](LogType.trace, ["Trace"]); + } + + clear() { + this[LOG_SYMBOL](LogType.clear); + } + + status(...args) { + this[LOG_SYMBOL](LogType.status, args); + } + + group(...args) { + this[LOG_SYMBOL](LogType.group, args); + } + + groupCollapsed(...args) { + this[LOG_SYMBOL](LogType.groupCollapsed, args); + } + + groupEnd(...args) { + this[LOG_SYMBOL](LogType.groupEnd, args); + } + + profile(label) { + this[LOG_SYMBOL](LogType.profile, [label]); + } + + profileEnd(label) { + this[LOG_SYMBOL](LogType.profileEnd, [label]); + } + + time(label) { + this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map(); + this[TIMERS_SYMBOL].set(label, process.hrtime()); + } + + timeLog(label) { + const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); + if (!prev) { + throw new Error(`No such label '${label}' for WebpackLogger.timeLog()`); + } + const time = process.hrtime(prev); + this[LOG_SYMBOL](LogType.time, [label, ...time]); + } + + timeEnd(label) { + const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); + if (!prev) { + throw new Error(`No such label '${label}' for WebpackLogger.timeEnd()`); + } + const time = process.hrtime(prev); + this[TIMERS_SYMBOL].delete(label); + this[LOG_SYMBOL](LogType.time, [label, ...time]); + } +} + +exports.Logger = WebpackLogger; + + +/***/ }), + +/***/ 88838: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { LogType } = __webpack_require__(47194); + +/** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */ +/** @typedef {import("../../declarations/WebpackOptions").FilterTypes} FilterTypes */ +/** @typedef {import("../../declarations/WebpackOptions").FilterItemTypes} FilterItemTypes */ + +/** @typedef {function(string): boolean} FilterFunction */ + +/** + * @typedef {Object} LoggerOptions + * @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel + * @property {FilterTypes|boolean} debug filter for debug logging + * @property {Console & { status?: Function, logTime?: Function }} console the console to log to + */ + +/** + * @param {FilterItemTypes} item an input item + * @returns {FilterFunction} filter funtion + */ +const filterToFunction = item => { + if (typeof item === "string") { + const regExp = new RegExp( + `[\\\\/]${item.replace( + // eslint-disable-next-line no-useless-escape + /[-[\]{}()*+?.\\^$|]/g, + "\\$&" + )}([\\\\/]|$|!|\\?)` + ); + return ident => regExp.test(ident); + } + if (item && typeof item === "object" && typeof item.test === "function") { + return ident => item.test(ident); + } + if (typeof item === "function") { + return item; + } + if (typeof item === "boolean") { + return () => item; + } +}; + +/** + * @enum {number} + */ +const LogLevel = { + none: 6, + false: 6, + error: 5, + warn: 4, + info: 3, + log: 2, + true: 2, + verbose: 1 +}; + +/** + * @param {LoggerOptions} options options object + * @returns {function(string, LogTypeEnum, any[]): void} logging function + */ +module.exports = ({ level = "info", debug = false, console }) => { + const debugFilters = + typeof debug === "boolean" + ? [() => debug] + : /** @type {FilterItemTypes[]} */ ([]) + .concat(debug) + .map(filterToFunction); + /** @type {number} */ + const loglevel = LogLevel[`${level}`] || 0; + + /** + * @param {string} name name of the logger + * @param {LogTypeEnum} type type of the log entry + * @param {any[]} args arguments of the log entry + * @returns {void} + */ + const logger = (name, type, args) => { + const labeledArgs = () => { + if (Array.isArray(args)) { + if (args.length > 0 && typeof args[0] === "string") { + return [`[${name}] ${args[0]}`, ...args.slice(1)]; + } else { + return [`[${name}]`, ...args]; + } + } else { + return []; + } + }; + const debug = debugFilters.some(f => f(name)); + switch (type) { + case LogType.debug: + if (!debug) return; + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.debug === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.debug(...labeledArgs()); + } else { + console.log(...labeledArgs()); + } + break; + case LogType.log: + if (!debug && loglevel > LogLevel.log) return; + console.log(...labeledArgs()); + break; + case LogType.info: + if (!debug && loglevel > LogLevel.info) return; + console.info(...labeledArgs()); + break; + case LogType.warn: + if (!debug && loglevel > LogLevel.warn) return; + console.warn(...labeledArgs()); + break; + case LogType.error: + if (!debug && loglevel > LogLevel.error) return; + console.error(...labeledArgs()); + break; + case LogType.trace: + if (!debug) return; + console.trace(); + break; + case LogType.groupCollapsed: + if (!debug && loglevel > LogLevel.log) return; + if (!debug && loglevel > LogLevel.verbose) { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.groupCollapsed === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.groupCollapsed(...labeledArgs()); + } else { + console.log(...labeledArgs()); + } + break; + } + // falls through + case LogType.group: + if (!debug && loglevel > LogLevel.log) return; + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.group === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.group(...labeledArgs()); + } else { + console.log(...labeledArgs()); + } + break; + case LogType.groupEnd: + if (!debug && loglevel > LogLevel.log) return; + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.groupEnd === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.groupEnd(); + } + break; + case LogType.time: { + if (!debug && loglevel > LogLevel.log) return; + const ms = args[1] * 1000 + args[2] / 1000000; + const msg = `[${name}] ${args[0]}: ${ms}ms`; + if (typeof console.logTime === "function") { + console.logTime(msg); + } else { + console.log(msg); + } + break; + } + case LogType.profile: + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.profile === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.profile(...labeledArgs()); + } + break; + case LogType.profileEnd: + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.profileEnd === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.profileEnd(...labeledArgs()); + } + break; + case LogType.clear: + if (!debug && loglevel > LogLevel.log) return; + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.clear === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.clear(); + } + break; + case LogType.status: + if (!debug && loglevel > LogLevel.info) return; + if (typeof console.status === "function") { + if (args.length === 0) { + console.status(); + } else { + console.status(...labeledArgs()); + } + } else { + if (args.length !== 0) { + console.info(...labeledArgs()); + } + } + break; + default: + throw new Error(`Unexpected LogType ${type}`); + } + }; + return logger; +}; + + +/***/ }), + +/***/ 62299: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + + +/** + * @param {any[]} args items to be truncated + * @param {number} maxLength maximum length of args including spaces between + * @returns {string[]} truncated args + */ +const truncateArgs = (args, maxLength) => { + const lengths = args.map(a => `${a}`.length); + const availableLength = maxLength - lengths.length + 1; + + if (availableLength > 0 && args.length === 1) { + if (availableLength >= args[0].length) { + return args; + } else if (availableLength > 3) { + return ["..." + args[0].slice(-availableLength + 3)]; + } else { + return [args[0].slice(-availableLength)]; + } + } + + // Check if there is space for at least 4 chars per arg + if (availableLength < lengths.reduce((s, i) => s + Math.min(i, 6), 0)) { + // remove args + if (args.length > 1) + return truncateArgs(args.slice(0, args.length - 1), maxLength); + return []; + } + + let currentLength = lengths.reduce((a, b) => a + b, 0); + + // Check if all fits into maxLength + if (currentLength <= availableLength) return args; + + // Try to remove chars from the longest items until it fits + while (currentLength > availableLength) { + const maxLength = Math.max(...lengths); + const shorterItems = lengths.filter(l => l !== maxLength); + const nextToMaxLength = + shorterItems.length > 0 ? Math.max(...shorterItems) : 0; + const maxReduce = maxLength - nextToMaxLength; + let maxItems = lengths.length - shorterItems.length; + let overrun = currentLength - availableLength; + for (let i = 0; i < lengths.length; i++) { + if (lengths[i] === maxLength) { + const reduce = Math.min(Math.floor(overrun / maxItems), maxReduce); + lengths[i] -= reduce; + currentLength -= reduce; + overrun -= reduce; + maxItems--; + } + } + } + + // Return args reduced to length in lengths + return args.map((a, i) => { + const str = `${a}`; + const length = lengths[i]; + if (str.length === length) { + return str; + } else if (length > 5) { + return "..." + str.slice(-length + 3); + } else if (length > 0) { + return str.slice(-length); + } else { + return ""; + } + }); +}; + +module.exports = truncateArgs; + + +/***/ }), + +/***/ 45249: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource } = __webpack_require__(53665); + +class NodeChunkTemplatePlugin { + apply(chunkTemplate) { + chunkTemplate.hooks.render.tap( + "NodeChunkTemplatePlugin", + (modules, chunk) => { + const source = new ConcatSource(); + source.add( + `exports.ids = ${JSON.stringify(chunk.ids)};\nexports.modules = ` + ); + source.add(modules); + source.add(";"); + return source; + } + ); + chunkTemplate.hooks.hash.tap("NodeChunkTemplatePlugin", hash => { + hash.update("node"); + hash.update("3"); + }); + } +} + +module.exports = NodeChunkTemplatePlugin; + + +/***/ }), + +/***/ 52520: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const NodeWatchFileSystem = __webpack_require__(71610); +const NodeOutputFileSystem = __webpack_require__(31836); +const NodeJsInputFileSystem = __webpack_require__(13445); +const CachedInputFileSystem = __webpack_require__(75544); +const createConsoleLogger = __webpack_require__(88838); +const nodeConsole = __webpack_require__(7886); + +class NodeEnvironmentPlugin { + constructor(options) { + this.options = options || {}; + } + + apply(compiler) { + compiler.infrastructureLogger = createConsoleLogger( + Object.assign( + { + level: "info", + debug: false, + console: nodeConsole + }, + this.options.infrastructureLogging + ) + ); + compiler.inputFileSystem = new CachedInputFileSystem( + new NodeJsInputFileSystem(), + 60000 + ); + const inputFileSystem = compiler.inputFileSystem; + compiler.outputFileSystem = new NodeOutputFileSystem(); + compiler.watchFileSystem = new NodeWatchFileSystem( + compiler.inputFileSystem + ); + compiler.hooks.beforeRun.tap("NodeEnvironmentPlugin", compiler => { + if (compiler.inputFileSystem === inputFileSystem) inputFileSystem.purge(); + }); + } +} +module.exports = NodeEnvironmentPlugin; + + +/***/ }), + +/***/ 95909: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { ConcatSource } = __webpack_require__(53665); + +class NodeHotUpdateChunkTemplatePlugin { + apply(hotUpdateChunkTemplate) { + hotUpdateChunkTemplate.hooks.render.tap( + "NodeHotUpdateChunkTemplatePlugin", + (modulesSource, modules, removedModules, hash, id) => { + const source = new ConcatSource(); + source.add( + "exports.id = " + JSON.stringify(id) + ";\nexports.modules = " + ); + source.add(modulesSource); + source.add(";"); + return source; + } + ); + hotUpdateChunkTemplate.hooks.hash.tap( + "NodeHotUpdateChunkTemplatePlugin", + hash => { + hash.update("NodeHotUpdateChunkTemplatePlugin"); + hash.update("3"); + hash.update( + hotUpdateChunkTemplate.outputOptions.hotUpdateFunction + "" + ); + hash.update(hotUpdateChunkTemplate.outputOptions.library + ""); + } + ); + } +} +module.exports = NodeHotUpdateChunkTemplatePlugin; + + +/***/ }), + +/***/ 33514: +/***/ (function(module) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// eslint-disable-next-line no-unused-vars +var $hotChunkFilename$ = undefined; +var hotAddUpdateChunk = undefined; +var installedChunks = undefined; +var $hotMainFilename$ = undefined; + +module.exports = function() { + // eslint-disable-next-line no-unused-vars + function hotDownloadUpdateChunk(chunkId) { + var chunk = require("./" + $hotChunkFilename$); + hotAddUpdateChunk(chunk.id, chunk.modules); + } + + // eslint-disable-next-line no-unused-vars + function hotDownloadManifest() { + try { + var update = require("./" + $hotMainFilename$); + } catch (e) { + return Promise.resolve(); + } + return Promise.resolve(update); + } + + //eslint-disable-next-line no-unused-vars + function hotDisposeChunk(chunkId) { + delete installedChunks[chunkId]; + } +}; + + +/***/ }), + +/***/ 51433: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// eslint-disable-next-line no-unused-vars +var $hotChunkFilename$ = undefined; +var $require$ = undefined; +var hotAddUpdateChunk = undefined; +var $hotMainFilename$ = undefined; +var installedChunks = undefined; + +module.exports = function() { + // eslint-disable-next-line no-unused-vars + function hotDownloadUpdateChunk(chunkId) { + var filename = __webpack_require__(85622).join(__dirname, $hotChunkFilename$); + __webpack_require__(35747).readFile(filename, "utf-8", function(err, content) { + if (err) { + if ($require$.onError) return $require$.oe(err); + throw err; + } + var chunk = {}; + __webpack_require__(92184).runInThisContext( + "(function(exports) {" + content + "\n})", + { filename: filename } + )(chunk); + hotAddUpdateChunk(chunk.id, chunk.modules); + }); + } + + // eslint-disable-next-line no-unused-vars + function hotDownloadManifest() { + var filename = __webpack_require__(85622).join(__dirname, $hotMainFilename$); + return new Promise(function(resolve, reject) { + __webpack_require__(35747).readFile(filename, "utf-8", function(err, content) { + if (err) return resolve(); + try { + var update = JSON.parse(content); + } catch (e) { + return reject(e); + } + resolve(update); + }); + }); + } + + // eslint-disable-next-line no-unused-vars + function hotDisposeChunk(chunkId) { + delete installedChunks[chunkId]; + } +}; + + +/***/ }), + +/***/ 78597: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Template = __webpack_require__(96066); + +module.exports = class NodeMainTemplatePlugin { + constructor(asyncChunkLoading) { + this.asyncChunkLoading = asyncChunkLoading; + } + + apply(mainTemplate) { + const needChunkOnDemandLoadingCode = chunk => { + for (const chunkGroup of chunk.groupsIterable) { + if (chunkGroup.getNumberOfChildren() > 0) return true; + } + return false; + }; + const asyncChunkLoading = this.asyncChunkLoading; + mainTemplate.hooks.localVars.tap( + "NodeMainTemplatePlugin", + (source, chunk) => { + if (needChunkOnDemandLoadingCode(chunk)) { + return Template.asString([ + source, + "", + "// object to store loaded chunks", + '// "0" means "already loaded"', + "var installedChunks = {", + Template.indent( + chunk.ids.map(id => `${JSON.stringify(id)}: 0`).join(",\n") + ), + "};" + ]); + } + return source; + } + ); + mainTemplate.hooks.requireExtensions.tap( + "NodeMainTemplatePlugin", + (source, chunk) => { + if (needChunkOnDemandLoadingCode(chunk)) { + return Template.asString([ + source, + "", + "// uncaught error handler for webpack runtime", + `${mainTemplate.requireFn}.oe = function(err) {`, + Template.indent([ + "process.nextTick(function() {", + Template.indent( + "throw err; // catch this error by using import().catch()" + ), + "});" + ]), + "};" + ]); + } + return source; + } + ); + mainTemplate.hooks.requireEnsure.tap( + "NodeMainTemplatePlugin", + (source, chunk, hash) => { + const chunkFilename = mainTemplate.outputOptions.chunkFilename; + const chunkMaps = chunk.getChunkMaps(); + const insertMoreModules = [ + "var moreModules = chunk.modules, chunkIds = chunk.ids;", + "for(var moduleId in moreModules) {", + Template.indent( + mainTemplate.renderAddModule( + hash, + chunk, + "moduleId", + "moreModules[moduleId]" + ) + ), + "}" + ]; + if (asyncChunkLoading) { + return Template.asString([ + source, + "", + "// ReadFile + VM.run chunk loading for javascript", + "", + "var installedChunkData = installedChunks[chunkId];", + 'if(installedChunkData !== 0) { // 0 means "already installed".', + Template.indent([ + '// array of [resolve, reject, promise] means "currently loading"', + "if(installedChunkData) {", + Template.indent(["promises.push(installedChunkData[2]);"]), + "} else {", + Template.indent([ + "// load the chunk and return promise to it", + "var promise = new Promise(function(resolve, reject) {", + Template.indent([ + "installedChunkData = installedChunks[chunkId] = [resolve, reject];", + "var filename = require('path').join(__dirname, " + + mainTemplate.getAssetPath( + JSON.stringify(`/${chunkFilename}`), + { + hash: `" + ${mainTemplate.renderCurrentHashCode( + hash + )} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode( + hash, + length + )} + "`, + chunk: { + id: '" + chunkId + "', + hash: `" + ${JSON.stringify( + chunkMaps.hash + )}[chunkId] + "`, + hashWithLength: length => { + const shortChunkHashMap = {}; + for (const chunkId of Object.keys(chunkMaps.hash)) { + if (typeof chunkMaps.hash[chunkId] === "string") { + shortChunkHashMap[chunkId] = chunkMaps.hash[ + chunkId + ].substr(0, length); + } + } + return `" + ${JSON.stringify( + shortChunkHashMap + )}[chunkId] + "`; + }, + contentHash: { + javascript: `" + ${JSON.stringify( + chunkMaps.contentHash.javascript + )}[chunkId] + "` + }, + contentHashWithLength: { + javascript: length => { + const shortContentHashMap = {}; + const contentHash = + chunkMaps.contentHash.javascript; + for (const chunkId of Object.keys(contentHash)) { + if (typeof contentHash[chunkId] === "string") { + shortContentHashMap[chunkId] = contentHash[ + chunkId + ].substr(0, length); + } + } + return `" + ${JSON.stringify( + shortContentHashMap + )}[chunkId] + "`; + } + }, + name: `" + (${JSON.stringify( + chunkMaps.name + )}[chunkId]||chunkId) + "` + }, + contentHashType: "javascript" + } + ) + + ");", + "require('fs').readFile(filename, 'utf-8', function(err, content) {", + Template.indent( + [ + "if(err) return reject(err);", + "var chunk = {};", + "require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\\n})', filename)" + + "(chunk, require, require('path').dirname(filename), filename);" + ] + .concat(insertMoreModules) + .concat([ + "var callbacks = [];", + "for(var i = 0; i < chunkIds.length; i++) {", + Template.indent([ + "if(installedChunks[chunkIds[i]])", + Template.indent([ + "callbacks = callbacks.concat(installedChunks[chunkIds[i]][0]);" + ]), + "installedChunks[chunkIds[i]] = 0;" + ]), + "}", + "for(i = 0; i < callbacks.length; i++)", + Template.indent("callbacks[i]();") + ]) + ), + "});" + ]), + "});", + "promises.push(installedChunkData[2] = promise);" + ]), + "}" + ]), + "}" + ]); + } else { + const request = mainTemplate.getAssetPath( + JSON.stringify(`./${chunkFilename}`), + { + hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode(hash, length)} + "`, + chunk: { + id: '" + chunkId + "', + hash: `" + ${JSON.stringify(chunkMaps.hash)}[chunkId] + "`, + hashWithLength: length => { + const shortChunkHashMap = {}; + for (const chunkId of Object.keys(chunkMaps.hash)) { + if (typeof chunkMaps.hash[chunkId] === "string") { + shortChunkHashMap[chunkId] = chunkMaps.hash[ + chunkId + ].substr(0, length); + } + } + return `" + ${JSON.stringify( + shortChunkHashMap + )}[chunkId] + "`; + }, + contentHash: { + javascript: `" + ${JSON.stringify( + chunkMaps.contentHash.javascript + )}[chunkId] + "` + }, + contentHashWithLength: { + javascript: length => { + const shortContentHashMap = {}; + const contentHash = chunkMaps.contentHash.javascript; + for (const chunkId of Object.keys(contentHash)) { + if (typeof contentHash[chunkId] === "string") { + shortContentHashMap[chunkId] = contentHash[ + chunkId + ].substr(0, length); + } + } + return `" + ${JSON.stringify( + shortContentHashMap + )}[chunkId] + "`; + } + }, + name: `" + (${JSON.stringify( + chunkMaps.name + )}[chunkId]||chunkId) + "` + }, + contentHashType: "javascript" + } + ); + return Template.asString([ + source, + "", + "// require() chunk loading for javascript", + "", + '// "0" is the signal for "already loaded"', + "if(installedChunks[chunkId] !== 0) {", + Template.indent( + [`var chunk = require(${request});`] + .concat(insertMoreModules) + .concat([ + "for(var i = 0; i < chunkIds.length; i++)", + Template.indent("installedChunks[chunkIds[i]] = 0;") + ]) + ), + "}" + ]); + } + } + ); + mainTemplate.hooks.hotBootstrap.tap( + "NodeMainTemplatePlugin", + (source, chunk, hash) => { + const hotUpdateChunkFilename = + mainTemplate.outputOptions.hotUpdateChunkFilename; + const hotUpdateMainFilename = + mainTemplate.outputOptions.hotUpdateMainFilename; + const chunkMaps = chunk.getChunkMaps(); + const currentHotUpdateChunkFilename = mainTemplate.getAssetPath( + JSON.stringify(hotUpdateChunkFilename), + { + hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode(hash, length)} + "`, + chunk: { + id: '" + chunkId + "', + hash: `" + ${JSON.stringify(chunkMaps.hash)}[chunkId] + "`, + hashWithLength: length => { + const shortChunkHashMap = {}; + for (const chunkId of Object.keys(chunkMaps.hash)) { + if (typeof chunkMaps.hash[chunkId] === "string") { + shortChunkHashMap[chunkId] = chunkMaps.hash[chunkId].substr( + 0, + length + ); + } + } + return `" + ${JSON.stringify(shortChunkHashMap)}[chunkId] + "`; + }, + name: `" + (${JSON.stringify( + chunkMaps.name + )}[chunkId]||chunkId) + "` + } + } + ); + const currentHotUpdateMainFilename = mainTemplate.getAssetPath( + JSON.stringify(hotUpdateMainFilename), + { + hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode(hash, length)} + "` + } + ); + return Template.getFunctionContent( + asyncChunkLoading + ? __webpack_require__(51433) + : __webpack_require__(33514) + ) + .replace(/\$require\$/g, mainTemplate.requireFn) + .replace(/\$hotMainFilename\$/g, currentHotUpdateMainFilename) + .replace(/\$hotChunkFilename\$/g, currentHotUpdateChunkFilename); + } + ); + mainTemplate.hooks.hash.tap("NodeMainTemplatePlugin", hash => { + hash.update("node"); + hash.update("4"); + }); + } +}; + + +/***/ }), + +/***/ 31836: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const fs = __webpack_require__(35747); +const path = __webpack_require__(85622); +const mkdirp = __webpack_require__(94327); + +class NodeOutputFileSystem { + constructor() { + this.mkdirp = mkdirp; + this.mkdir = fs.mkdir.bind(fs); + this.rmdir = fs.rmdir.bind(fs); + this.unlink = fs.unlink.bind(fs); + this.writeFile = fs.writeFile.bind(fs); + this.join = path.join.bind(path); + } +} + +module.exports = NodeOutputFileSystem; + + +/***/ }), + +/***/ 9128: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const AliasPlugin = __webpack_require__(15005); +const ParserHelpers = __webpack_require__(23999); +const nodeLibsBrowser = __webpack_require__(27852); + +module.exports = class NodeSourcePlugin { + constructor(options) { + this.options = options; + } + apply(compiler) { + const options = this.options; + if (options === false) { + // allow single kill switch to turn off this plugin + return; + } + + const getPathToModule = (module, type) => { + if (type === true || (type === undefined && nodeLibsBrowser[module])) { + if (!nodeLibsBrowser[module]) { + throw new Error( + `No browser version for node.js core module ${module} available` + ); + } + return nodeLibsBrowser[module]; + } else if (type === "mock") { + return require.resolve(`node-libs-browser/mock/${module}`); + } else if (type === "empty") { + return __webpack_require__.ab + "empty.js"; + } else { + return module; + } + }; + + const addExpression = (parser, name, module, type, suffix) => { + suffix = suffix || ""; + parser.hooks.expression.for(name).tap("NodeSourcePlugin", () => { + if ( + parser.state.module && + parser.state.module.resource === getPathToModule(module, type) + ) + return; + const mockModule = ParserHelpers.requireFileAsExpression( + parser.state.module.context, + getPathToModule(module, type) + ); + return ParserHelpers.addParsedVariableToModule( + parser, + name, + mockModule + suffix + ); + }); + }; + + compiler.hooks.compilation.tap( + "NodeSourcePlugin", + (compilation, { normalModuleFactory }) => { + const handler = (parser, parserOptions) => { + if (parserOptions.node === false) return; + + let localOptions = options; + if (parserOptions.node) { + localOptions = Object.assign({}, localOptions, parserOptions.node); + } + if (localOptions.global) { + parser.hooks.expression + .for("global") + .tap("NodeSourcePlugin", () => { + const retrieveGlobalModule = ParserHelpers.requireFileAsExpression( + parser.state.module.context, + __webpack_require__.ab + "global.js" + ); + return ParserHelpers.addParsedVariableToModule( + parser, + "global", + retrieveGlobalModule + ); + }); + } + if (localOptions.process) { + const processType = localOptions.process; + addExpression(parser, "process", "process", processType); + } + if (localOptions.console) { + const consoleType = localOptions.console; + addExpression(parser, "console", "console", consoleType); + } + const bufferType = localOptions.Buffer; + if (bufferType) { + addExpression(parser, "Buffer", "buffer", bufferType, ".Buffer"); + } + if (localOptions.setImmediate) { + const setImmediateType = localOptions.setImmediate; + addExpression( + parser, + "setImmediate", + "timers", + setImmediateType, + ".setImmediate" + ); + addExpression( + parser, + "clearImmediate", + "timers", + setImmediateType, + ".clearImmediate" + ); + } + }; + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("NodeSourcePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("NodeSourcePlugin", handler); + } + ); + compiler.hooks.afterResolvers.tap("NodeSourcePlugin", compiler => { + for (const lib of Object.keys(nodeLibsBrowser)) { + if (options[lib] !== false) { + compiler.resolverFactory.hooks.resolver + .for("normal") + .tap("NodeSourcePlugin", resolver => { + new AliasPlugin( + "described-resolve", + { + name: lib, + onlyModule: true, + alias: getPathToModule(lib, options[lib]) + }, + "resolve" + ).apply(resolver); + }); + } + } + }); + } +}; + + +/***/ }), + +/***/ 59743: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const ExternalsPlugin = __webpack_require__(75705); + +const builtins = + // eslint-disable-next-line node/no-unsupported-features/node-builtins,node/no-deprecated-api + __webpack_require__(32282).builtinModules || Object.keys(process.binding("natives")); + +class NodeTargetPlugin { + apply(compiler) { + new ExternalsPlugin("commonjs", builtins).apply(compiler); + } +} + +module.exports = NodeTargetPlugin; + + +/***/ }), + +/***/ 90010: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const NodeMainTemplatePlugin = __webpack_require__(78597); +const NodeChunkTemplatePlugin = __webpack_require__(45249); +const NodeHotUpdateChunkTemplatePlugin = __webpack_require__(95909); + +class NodeTemplatePlugin { + constructor(options) { + options = options || {}; + this.asyncChunkLoading = options.asyncChunkLoading; + } + + apply(compiler) { + compiler.hooks.thisCompilation.tap("NodeTemplatePlugin", compilation => { + new NodeMainTemplatePlugin(this.asyncChunkLoading).apply( + compilation.mainTemplate + ); + new NodeChunkTemplatePlugin().apply(compilation.chunkTemplate); + new NodeHotUpdateChunkTemplatePlugin().apply( + compilation.hotUpdateChunkTemplate + ); + }); + } +} + +module.exports = NodeTemplatePlugin; + + +/***/ }), + +/***/ 71610: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Watchpack = __webpack_require__(77056); +const objectToMap = __webpack_require__(1111); + +class NodeWatchFileSystem { + constructor(inputFileSystem) { + this.inputFileSystem = inputFileSystem; + this.watcherOptions = { + aggregateTimeout: 0 + }; + this.watcher = new Watchpack(this.watcherOptions); + } + + watch(files, dirs, missing, startTime, options, callback, callbackUndelayed) { + if (!Array.isArray(files)) { + throw new Error("Invalid arguments: 'files'"); + } + if (!Array.isArray(dirs)) { + throw new Error("Invalid arguments: 'dirs'"); + } + if (!Array.isArray(missing)) { + throw new Error("Invalid arguments: 'missing'"); + } + if (typeof callback !== "function") { + throw new Error("Invalid arguments: 'callback'"); + } + if (typeof startTime !== "number" && startTime) { + throw new Error("Invalid arguments: 'startTime'"); + } + if (typeof options !== "object") { + throw new Error("Invalid arguments: 'options'"); + } + if (typeof callbackUndelayed !== "function" && callbackUndelayed) { + throw new Error("Invalid arguments: 'callbackUndelayed'"); + } + const oldWatcher = this.watcher; + this.watcher = new Watchpack(options); + + if (callbackUndelayed) { + this.watcher.once("change", callbackUndelayed); + } + const cachedFiles = files; + const cachedDirs = dirs; + this.watcher.once("aggregated", (changes, removals) => { + changes = changes.concat(removals); + if (this.inputFileSystem && this.inputFileSystem.purge) { + this.inputFileSystem.purge(changes); + } + const times = objectToMap(this.watcher.getTimes()); + files = new Set(files); + dirs = new Set(dirs); + missing = new Set(missing); + removals = new Set(removals.filter(file => files.has(file))); + callback( + null, + changes.filter(file => files.has(file)).sort(), + changes.filter(file => dirs.has(file)).sort(), + changes.filter(file => missing.has(file)).sort(), + times, + times, + removals + ); + }); + + this.watcher.watch( + cachedFiles.concat(missing), + cachedDirs.concat(missing), + startTime + ); + + if (oldWatcher) { + oldWatcher.close(); + } + return { + close: () => { + if (this.watcher) { + this.watcher.close(); + this.watcher = null; + } + }, + pause: () => { + if (this.watcher) { + this.watcher.pause(); + } + }, + getFileTimestamps: () => { + if (this.watcher) { + return objectToMap(this.watcher.getTimes()); + } else { + return new Map(); + } + }, + getContextTimestamps: () => { + if (this.watcher) { + return objectToMap(this.watcher.getTimes()); + } else { + return new Map(); + } + } + }; + } +} + +module.exports = NodeWatchFileSystem; + + +/***/ }), + +/***/ 73839: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Template = __webpack_require__(96066); +const WasmMainTemplatePlugin = __webpack_require__(65331); + +class ReadFileCompileWasmTemplatePlugin { + constructor(options) { + this.options = options || {}; + } + + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "ReadFileCompileWasmTemplatePlugin", + compilation => { + const generateLoadBinaryCode = path => + Template.asString([ + "new Promise(function (resolve, reject) {", + Template.indent([ + "var { readFile } = require('fs');", + "var { join } = require('path');", + "", + "try {", + Template.indent([ + `readFile(join(__dirname, ${path}), function(err, buffer){`, + Template.indent([ + "if (err) return reject(err);", + "", + "// Fake fetch response", + "resolve({", + Template.indent([ + "arrayBuffer() { return Promise.resolve(buffer); }" + ]), + "});" + ]), + "});" + ]), + "} catch (err) { reject(err); }" + ]), + "})" + ]); + + const plugin = new WasmMainTemplatePlugin( + Object.assign( + { + generateLoadBinaryCode, + supportsStreaming: false + }, + this.options + ) + ); + plugin.apply(compilation.mainTemplate); + } + ); + } +} + +module.exports = ReadFileCompileWasmTemplatePlugin; + + +/***/ }), + +/***/ 7886: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const truncateArgs = __webpack_require__(62299); +const util = __webpack_require__(31669); + +const tty = process.stderr.isTTY && process.env.TERM !== "dumb"; + +let currentStatusMessage = undefined; +let hasStatusMessage = false; +let currentIndent = ""; +let currentCollapsed = 0; + +const indent = (str, prefix, colorPrefix, colorSuffix) => { + if (str === "") return str; + prefix = currentIndent + prefix; + if (tty) { + return ( + prefix + + colorPrefix + + str.replace(/\n/g, colorSuffix + "\n" + prefix + colorPrefix) + + colorSuffix + ); + } else { + return prefix + str.replace(/\n/g, "\n" + prefix); + } +}; + +const clearStatusMessage = () => { + if (hasStatusMessage) { + process.stderr.write("\x1b[2K\r"); + hasStatusMessage = false; + } +}; + +const writeStatusMessage = () => { + if (!currentStatusMessage) return; + const l = process.stderr.columns; + const args = l + ? truncateArgs(currentStatusMessage, l - 1) + : currentStatusMessage; + const str = args.join(" "); + const coloredStr = `\u001b[1m${str}\u001b[39m\u001b[22m`; + process.stderr.write(`\x1b[2K\r${coloredStr}`); + hasStatusMessage = true; +}; + +const writeColored = (prefix, colorPrefix, colorSuffix) => { + return (...args) => { + if (currentCollapsed > 0) return; + clearStatusMessage(); + // @ts-ignore + const str = indent(util.format(...args), prefix, colorPrefix, colorSuffix); + process.stderr.write(str + "\n"); + writeStatusMessage(); + }; +}; + +const writeGroupMessage = writeColored( + "<-> ", + "\u001b[1m\u001b[36m", + "\u001b[39m\u001b[22m" +); + +const writeGroupCollapsedMessage = writeColored( + "<+> ", + "\u001b[1m\u001b[36m", + "\u001b[39m\u001b[22m" +); + +module.exports = { + log: writeColored(" ", "\u001b[1m", "\u001b[22m"), + debug: writeColored(" ", "", ""), + trace: writeColored(" ", "", ""), + info: writeColored(" ", "\u001b[1m\u001b[32m", "\u001b[39m\u001b[22m"), + warn: writeColored(" ", "\u001b[1m\u001b[33m", "\u001b[39m\u001b[22m"), + error: writeColored(" ", "\u001b[1m\u001b[31m", "\u001b[39m\u001b[22m"), + logTime: writeColored(" ", "\u001b[1m\u001b[35m", "\u001b[39m\u001b[22m"), + group: (...args) => { + writeGroupMessage(...args); + if (currentCollapsed > 0) { + currentCollapsed++; + } else { + currentIndent += " "; + } + }, + groupCollapsed: (...args) => { + writeGroupCollapsedMessage(...args); + currentCollapsed++; + }, + groupEnd: () => { + if (currentCollapsed > 0) currentCollapsed--; + else if (currentIndent.length >= 2) + currentIndent = currentIndent.slice(0, currentIndent.length - 2); + }, + // eslint-disable-next-line node/no-unsupported-features/node-builtins + profile: console.profile && (name => console.profile(name)), + // eslint-disable-next-line node/no-unsupported-features/node-builtins + profileEnd: console.profileEnd && (name => console.profileEnd(name)), + clear: + tty && + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.clear && + (() => { + clearStatusMessage(); + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.clear(); + writeStatusMessage(); + }), + status: tty + ? (name, ...args) => { + args = args.filter(Boolean); + if (name === undefined && args.length === 0) { + clearStatusMessage(); + currentStatusMessage = undefined; + } else if ( + typeof name === "string" && + name.startsWith("[webpack.Progress] ") + ) { + currentStatusMessage = [name.slice(19), ...args]; + writeStatusMessage(); + } else if (name === "[webpack.Progress]") { + currentStatusMessage = [...args]; + writeStatusMessage(); + } else { + currentStatusMessage = [name, ...args]; + writeStatusMessage(); + } + } + : writeColored(" ", "", "") +}; + + +/***/ }), + +/***/ 88197: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class AggressiveMergingPlugin { + constructor(options) { + if ( + (options !== undefined && typeof options !== "object") || + Array.isArray(options) + ) { + throw new Error( + "Argument should be an options object. To use defaults, pass in nothing.\nFor more info on options, see https://webpack.js.org/plugins/" + ); + } + this.options = options || {}; + } + + apply(compiler) { + const options = this.options; + const minSizeReduce = options.minSizeReduce || 1.5; + + compiler.hooks.thisCompilation.tap( + "AggressiveMergingPlugin", + compilation => { + compilation.hooks.optimizeChunksAdvanced.tap( + "AggressiveMergingPlugin", + chunks => { + let combinations = []; + chunks.forEach((a, idx) => { + if (a.canBeInitial()) return; + for (let i = 0; i < idx; i++) { + const b = chunks[i]; + if (b.canBeInitial()) continue; + combinations.push({ + a, + b, + improvement: undefined + }); + } + }); + + for (const pair of combinations) { + const a = pair.b.size({ + chunkOverhead: 0 + }); + const b = pair.a.size({ + chunkOverhead: 0 + }); + const ab = pair.b.integratedSize(pair.a, { + chunkOverhead: 0 + }); + let newSize; + if (ab === false) { + pair.improvement = false; + return; + } else { + newSize = ab; + } + + pair.improvement = (a + b) / newSize; + } + combinations = combinations.filter(pair => { + return pair.improvement !== false; + }); + combinations.sort((a, b) => { + return b.improvement - a.improvement; + }); + + const pair = combinations[0]; + + if (!pair) return; + if (pair.improvement < minSizeReduce) return; + + if (pair.b.integrate(pair.a, "aggressive-merge")) { + chunks.splice(chunks.indexOf(pair.a), 1); + return true; + } + } + ); + } + ); + } +} + +module.exports = AggressiveMergingPlugin; + + +/***/ }), + +/***/ 26688: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const identifierUtils = __webpack_require__(94658); +const { intersect } = __webpack_require__(54262); +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(71884); + +/** @typedef {import("../../declarations/plugins/optimize/AggressiveSplittingPlugin").AggressiveSplittingPluginOptions} AggressiveSplittingPluginOptions */ + +const moveModuleBetween = (oldChunk, newChunk) => { + return module => { + oldChunk.moveModule(module, newChunk); + }; +}; + +const isNotAEntryModule = entryModule => { + return module => { + return entryModule !== module; + }; +}; + +class AggressiveSplittingPlugin { + /** + * @param {AggressiveSplittingPluginOptions=} options options object + */ + constructor(options) { + if (!options) options = {}; + + validateOptions(schema, options, "Aggressive Splitting Plugin"); + + this.options = options; + if (typeof this.options.minSize !== "number") { + this.options.minSize = 30 * 1024; + } + if (typeof this.options.maxSize !== "number") { + this.options.maxSize = 50 * 1024; + } + if (typeof this.options.chunkOverhead !== "number") { + this.options.chunkOverhead = 0; + } + if (typeof this.options.entryChunkMultiplicator !== "number") { + this.options.entryChunkMultiplicator = 1; + } + } + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "AggressiveSplittingPlugin", + compilation => { + let needAdditionalSeal = false; + let newSplits; + let fromAggressiveSplittingSet; + let chunkSplitDataMap; + compilation.hooks.optimize.tap("AggressiveSplittingPlugin", () => { + newSplits = []; + fromAggressiveSplittingSet = new Set(); + chunkSplitDataMap = new Map(); + }); + compilation.hooks.optimizeChunksAdvanced.tap( + "AggressiveSplittingPlugin", + chunks => { + // Precompute stuff + const nameToModuleMap = new Map(); + const moduleToNameMap = new Map(); + for (const m of compilation.modules) { + const name = identifierUtils.makePathsRelative( + compiler.context, + m.identifier(), + compilation.cache + ); + nameToModuleMap.set(name, m); + moduleToNameMap.set(m, name); + } + + // Check used chunk ids + const usedIds = new Set(); + for (const chunk of chunks) { + usedIds.add(chunk.id); + } + + const recordedSplits = + (compilation.records && compilation.records.aggressiveSplits) || + []; + const usedSplits = newSplits + ? recordedSplits.concat(newSplits) + : recordedSplits; + + const minSize = this.options.minSize; + const maxSize = this.options.maxSize; + + const applySplit = splitData => { + // Cannot split if id is already taken + if (splitData.id !== undefined && usedIds.has(splitData.id)) { + return false; + } + + // Get module objects from names + const selectedModules = splitData.modules.map(name => + nameToModuleMap.get(name) + ); + + // Does the modules exist at all? + if (!selectedModules.every(Boolean)) return false; + + // Check if size matches (faster than waiting for hash) + const size = selectedModules.reduce( + (sum, m) => sum + m.size(), + 0 + ); + if (size !== splitData.size) return false; + + // get chunks with all modules + const selectedChunks = intersect( + selectedModules.map(m => new Set(m.chunksIterable)) + ); + + // No relevant chunks found + if (selectedChunks.size === 0) return false; + + // The found chunk is already the split or similar + if ( + selectedChunks.size === 1 && + Array.from(selectedChunks)[0].getNumberOfModules() === + selectedModules.length + ) { + const chunk = Array.from(selectedChunks)[0]; + if (fromAggressiveSplittingSet.has(chunk)) return false; + fromAggressiveSplittingSet.add(chunk); + chunkSplitDataMap.set(chunk, splitData); + return true; + } + + // split the chunk into two parts + const newChunk = compilation.addChunk(); + newChunk.chunkReason = "aggressive splitted"; + for (const chunk of selectedChunks) { + selectedModules.forEach(moveModuleBetween(chunk, newChunk)); + chunk.split(newChunk); + chunk.name = null; + } + fromAggressiveSplittingSet.add(newChunk); + chunkSplitDataMap.set(newChunk, splitData); + + if (splitData.id !== null && splitData.id !== undefined) { + newChunk.id = splitData.id; + } + return true; + }; + + // try to restore to recorded splitting + let changed = false; + for (let j = 0; j < usedSplits.length; j++) { + const splitData = usedSplits[j]; + if (applySplit(splitData)) changed = true; + } + + // for any chunk which isn't splitted yet, split it and create a new entry + // start with the biggest chunk + const sortedChunks = chunks.slice().sort((a, b) => { + const diff1 = b.modulesSize() - a.modulesSize(); + if (diff1) return diff1; + const diff2 = a.getNumberOfModules() - b.getNumberOfModules(); + if (diff2) return diff2; + const modulesA = Array.from(a.modulesIterable); + const modulesB = Array.from(b.modulesIterable); + modulesA.sort(); + modulesB.sort(); + const aI = modulesA[Symbol.iterator](); + const bI = modulesB[Symbol.iterator](); + // eslint-disable-next-line no-constant-condition + while (true) { + const aItem = aI.next(); + const bItem = bI.next(); + if (aItem.done) return 0; + const aModuleIdentifier = aItem.value.identifier(); + const bModuleIdentifier = bItem.value.identifier(); + if (aModuleIdentifier > bModuleIdentifier) return -1; + if (aModuleIdentifier < bModuleIdentifier) return 1; + } + }); + for (const chunk of sortedChunks) { + if (fromAggressiveSplittingSet.has(chunk)) continue; + const size = chunk.modulesSize(); + if (size > maxSize && chunk.getNumberOfModules() > 1) { + const modules = chunk + .getModules() + .filter(isNotAEntryModule(chunk.entryModule)) + .sort((a, b) => { + a = a.identifier(); + b = b.identifier(); + if (a > b) return 1; + if (a < b) return -1; + return 0; + }); + const selectedModules = []; + let selectedModulesSize = 0; + for (let k = 0; k < modules.length; k++) { + const module = modules[k]; + const newSize = selectedModulesSize + module.size(); + if (newSize > maxSize && selectedModulesSize >= minSize) { + break; + } + selectedModulesSize = newSize; + selectedModules.push(module); + } + if (selectedModules.length === 0) continue; + const splitData = { + modules: selectedModules + .map(m => moduleToNameMap.get(m)) + .sort(), + size: selectedModulesSize + }; + + if (applySplit(splitData)) { + newSplits = (newSplits || []).concat(splitData); + changed = true; + } + } + } + if (changed) return true; + } + ); + compilation.hooks.recordHash.tap( + "AggressiveSplittingPlugin", + records => { + // 4. save made splittings to records + const allSplits = new Set(); + const invalidSplits = new Set(); + + // Check if some splittings are invalid + // We remove invalid splittings and try again + for (const chunk of compilation.chunks) { + const splitData = chunkSplitDataMap.get(chunk); + if (splitData !== undefined) { + if (splitData.hash && chunk.hash !== splitData.hash) { + // Split was successful, but hash doesn't equal + // We can throw away the split since it's useless now + invalidSplits.add(splitData); + } + } + } + + if (invalidSplits.size > 0) { + records.aggressiveSplits = records.aggressiveSplits.filter( + splitData => !invalidSplits.has(splitData) + ); + needAdditionalSeal = true; + } else { + // set hash and id values on all (new) splittings + for (const chunk of compilation.chunks) { + const splitData = chunkSplitDataMap.get(chunk); + if (splitData !== undefined) { + splitData.hash = chunk.hash; + splitData.id = chunk.id; + allSplits.add(splitData); + // set flag for stats + chunk.recorded = true; + } + } + + // Also add all unused historial splits (after the used ones) + // They can still be used in some future compilation + const recordedSplits = + compilation.records && compilation.records.aggressiveSplits; + if (recordedSplits) { + for (const splitData of recordedSplits) { + if (!invalidSplits.has(splitData)) allSplits.add(splitData); + } + } + + // record all splits + records.aggressiveSplits = Array.from(allSplits); + + needAdditionalSeal = false; + } + } + ); + compilation.hooks.needAdditionalSeal.tap( + "AggressiveSplittingPlugin", + () => { + if (needAdditionalSeal) { + needAdditionalSeal = false; + return true; + } + } + ); + } + ); + } +} +module.exports = AggressiveSplittingPlugin; + + +/***/ }), + +/***/ 30346: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const sortByIndex = (a, b) => { + return a.index - b.index; +}; + +const sortByIndex2 = (a, b) => { + return a.index2 - b.index2; +}; + +class ChunkModuleIdRangePlugin { + constructor(options) { + this.options = options; + } + + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap("ChunkModuleIdRangePlugin", compilation => { + compilation.hooks.moduleIds.tap("ChunkModuleIdRangePlugin", modules => { + const chunk = compilation.chunks.find( + chunk => chunk.name === options.name + ); + if (!chunk) { + throw new Error( + `ChunkModuleIdRangePlugin: Chunk with name '${options.name}"' was not found` + ); + } + + let chunkModules; + if (options.order) { + chunkModules = Array.from(chunk.modulesIterable); + switch (options.order) { + case "index": + chunkModules.sort(sortByIndex); + break; + case "index2": + chunkModules.sort(sortByIndex2); + break; + default: + throw new Error( + "ChunkModuleIdRangePlugin: unexpected value of order" + ); + } + } else { + chunkModules = modules.filter(m => { + return m.chunksIterable.has(chunk); + }); + } + + let currentId = options.start || 0; + for (let i = 0; i < chunkModules.length; i++) { + const m = chunkModules[i]; + if (m.id === null) { + m.id = currentId++; + } + if (options.end && currentId > options.end) break; + } + }); + }); + } +} +module.exports = ChunkModuleIdRangePlugin; + + +/***/ }), + +/***/ 16953: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Module = __webpack_require__(75993); +const Template = __webpack_require__(96066); +const Parser = __webpack_require__(70558); +const eslintScope = __webpack_require__(41632); +const { ConcatSource, ReplaceSource } = __webpack_require__(53665); +const DependencyReference = __webpack_require__(71722); +const HarmonyImportDependency = __webpack_require__(81599); +const HarmonyImportSideEffectDependency = __webpack_require__(79171); +const HarmonyImportSpecifierDependency = __webpack_require__(95966); +const HarmonyExportSpecifierDependency = __webpack_require__(34834); +const HarmonyExportExpressionDependency = __webpack_require__(84245); +const HarmonyExportImportedSpecifierDependency = __webpack_require__(22864); +const HarmonyCompatibilityDependency = __webpack_require__(1533); +const createHash = __webpack_require__(15660); + +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../util/createHash").Hash} Hash */ +/** @typedef {import("../RequestShortener")} RequestShortener */ + +const joinIterableWithComma = iterable => { + // This is more performant than Array.from().join(", ") + // as it doesn't create an array + let str = ""; + let first = true; + for (const item of iterable) { + if (first) { + first = false; + } else { + str += ", "; + } + str += item; + } + return str; +}; + +/** + * @typedef {Object} ConcatenationEntry + * @property {"concatenated" | "external"} type + * @property {Module} module + */ + +const ensureNsObjSource = ( + info, + moduleToInfoMap, + requestShortener, + strictHarmonyModule +) => { + if (!info.hasNamespaceObject) { + info.hasNamespaceObject = true; + const name = info.exportMap.get(true); + const nsObj = [`var ${name} = {};`, `__webpack_require__.r(${name});`]; + for (const exportName of info.module.buildMeta.providedExports) { + const finalName = getFinalName( + info, + exportName, + moduleToInfoMap, + requestShortener, + false, + strictHarmonyModule + ); + nsObj.push( + `__webpack_require__.d(${name}, ${JSON.stringify( + exportName + )}, function() { return ${finalName}; });` + ); + } + info.namespaceObjectSource = nsObj.join("\n") + "\n"; + } +}; + +const getExternalImport = ( + importedModule, + info, + exportName, + asCall, + strictHarmonyModule +) => { + const used = importedModule.isUsed(exportName); + if (!used) return "/* unused reexport */undefined"; + const comment = + used !== exportName ? ` ${Template.toNormalComment(exportName)}` : ""; + switch (importedModule.buildMeta.exportsType) { + case "named": + if (exportName === "default") { + return info.name; + } else if (exportName === true) { + info.interopNamespaceObjectUsed = true; + return info.interopNamespaceObjectName; + } else { + break; + } + case "namespace": + if (exportName === true) { + return info.name; + } else { + break; + } + default: + if (strictHarmonyModule) { + if (exportName === "default") { + return info.name; + } else if (exportName === true) { + info.interopNamespaceObjectUsed = true; + return info.interopNamespaceObjectName; + } else { + return "/* non-default import from non-esm module */undefined"; + } + } else { + if (exportName === "default") { + info.interopDefaultAccessUsed = true; + return asCall + ? `${info.interopDefaultAccessName}()` + : `${info.interopDefaultAccessName}.a`; + } else if (exportName === true) { + return info.name; + } else { + break; + } + } + } + const reference = `${info.name}[${JSON.stringify(used)}${comment}]`; + if (asCall) return `Object(${reference})`; + return reference; +}; + +const getFinalName = ( + info, + exportName, + moduleToInfoMap, + requestShortener, + asCall, + strictHarmonyModule, + alreadyVisited = new Set() +) => { + switch (info.type) { + case "concatenated": { + const directExport = info.exportMap.get(exportName); + if (directExport) { + if (exportName === true) { + ensureNsObjSource( + info, + moduleToInfoMap, + requestShortener, + strictHarmonyModule + ); + } else if (!info.module.isUsed(exportName)) { + return "/* unused export */ undefined"; + } + if (info.globalExports.has(directExport)) { + return directExport; + } + const name = info.internalNames.get(directExport); + if (!name) { + throw new Error( + `The export "${directExport}" in "${info.module.readableIdentifier( + requestShortener + )}" has no internal name` + ); + } + return name; + } + const reexport = info.reexportMap.get(exportName); + if (reexport) { + if (alreadyVisited.has(reexport)) { + throw new Error( + `Circular reexports ${Array.from( + alreadyVisited, + e => + `"${e.module.readableIdentifier(requestShortener)}".${ + e.exportName + }` + ).join( + " --> " + )} -(circular)-> "${reexport.module.readableIdentifier( + requestShortener + )}".${reexport.exportName}` + ); + } + alreadyVisited.add(reexport); + const refInfo = moduleToInfoMap.get(reexport.module); + if (refInfo) { + // module is in the concatenation + return getFinalName( + refInfo, + reexport.exportName, + moduleToInfoMap, + requestShortener, + asCall, + strictHarmonyModule, + alreadyVisited + ); + } + } + const problem = + `Cannot get final name for export "${exportName}" in "${info.module.readableIdentifier( + requestShortener + )}"` + + ` (known exports: ${Array.from(info.exportMap.keys()) + .filter(name => name !== true) + .join(" ")}, ` + + `known reexports: ${Array.from(info.reexportMap.keys()).join(" ")})`; + return `${Template.toNormalComment(problem)} undefined`; + } + case "external": { + const importedModule = info.module; + return getExternalImport( + importedModule, + info, + exportName, + asCall, + strictHarmonyModule + ); + } + } +}; + +const addScopeSymbols1 = (s, nameSet, scopeSet) => { + let scope = s; + while (scope) { + if (scopeSet.has(scope)) break; + scopeSet.add(scope); + for (const variable of scope.variables) { + nameSet.add(variable.name); + } + scope = scope.upper; + } +}; + +const addScopeSymbols2 = (s, nameSet, scopeSet1, scopeSet2) => { + let scope = s; + while (scope) { + if (scopeSet1.has(scope)) break; + if (scopeSet2.has(scope)) break; + scopeSet1.add(scope); + for (const variable of scope.variables) { + nameSet.add(variable.name); + } + scope = scope.upper; + } +}; + +const getAllReferences = variable => { + let set = variable.references; + // Look for inner scope variables too (like in class Foo { t() { Foo } }) + const identifiers = new Set(variable.identifiers); + for (const scope of variable.scope.childScopes) { + for (const innerVar of scope.variables) { + if (innerVar.identifiers.some(id => identifiers.has(id))) { + set = set.concat(innerVar.references); + break; + } + } + } + return set; +}; + +const getPathInAst = (ast, node) => { + if (ast === node) { + return []; + } + + const nr = node.range; + + const enterNode = n => { + if (!n) return undefined; + const r = n.range; + if (r) { + if (r[0] <= nr[0] && r[1] >= nr[1]) { + const path = getPathInAst(n, node); + if (path) { + path.push(n); + return path; + } + } + } + return undefined; + }; + + var i; + if (Array.isArray(ast)) { + for (i = 0; i < ast.length; i++) { + const enterResult = enterNode(ast[i]); + if (enterResult !== undefined) return enterResult; + } + } else if (ast && typeof ast === "object") { + const keys = Object.keys(ast); + for (i = 0; i < keys.length; i++) { + const value = ast[keys[i]]; + if (Array.isArray(value)) { + const pathResult = getPathInAst(value, node); + if (pathResult !== undefined) return pathResult; + } else if (value && typeof value === "object") { + const enterResult = enterNode(value); + if (enterResult !== undefined) return enterResult; + } + } + } +}; + +const getHarmonyExportImportedSpecifierDependencyExports = dep => { + const importModule = dep._module; + if (!importModule) return []; + if (dep._id) { + // export { named } from "module" + return [ + { + name: dep.name, + id: dep._id, + module: importModule + } + ]; + } + if (dep.name) { + // export * as abc from "module" + return [ + { + name: dep.name, + id: true, + module: importModule + } + ]; + } + // export * from "module" + return importModule.buildMeta.providedExports + .filter(exp => exp !== "default" && !dep.activeExports.has(exp)) + .map(exp => { + return { + name: exp, + id: exp, + module: importModule + }; + }); +}; + +class ConcatenatedModule extends Module { + constructor(rootModule, modules, concatenationList) { + super("javascript/esm", null); + super.setChunks(rootModule._chunks); + + // Info from Factory + this.rootModule = rootModule; + this.factoryMeta = rootModule.factoryMeta; + + // Info from Compilation + this.index = rootModule.index; + this.index2 = rootModule.index2; + this.depth = rootModule.depth; + + // Info from Optimization + this.used = rootModule.used; + this.usedExports = rootModule.usedExports; + + // Info from Build + this.buildInfo = { + strict: true, + cacheable: modules.every(m => m.buildInfo.cacheable), + moduleArgument: rootModule.buildInfo.moduleArgument, + exportsArgument: rootModule.buildInfo.exportsArgument, + fileDependencies: new Set(), + contextDependencies: new Set(), + assets: undefined + }; + this.built = modules.some(m => m.built); + this.buildMeta = rootModule.buildMeta; + + // Caching + this._numberOfConcatenatedModules = modules.length; + + // Graph + const modulesSet = new Set(modules); + this.reasons = rootModule.reasons.filter( + reason => + !(reason.dependency instanceof HarmonyImportDependency) || + !modulesSet.has(reason.module) + ); + + this.dependencies = []; + this.blocks = []; + + this.warnings = []; + this.errors = []; + this._orderedConcatenationList = + concatenationList || + ConcatenatedModule.createConcatenationList(rootModule, modulesSet, null); + for (const info of this._orderedConcatenationList) { + if (info.type === "concatenated") { + const m = info.module; + + // populate dependencies + for (const d of m.dependencies.filter( + dep => + !(dep instanceof HarmonyImportDependency) || + !modulesSet.has(dep._module) + )) { + this.dependencies.push(d); + } + // populate blocks + for (const d of m.blocks) { + this.blocks.push(d); + } + // populate file dependencies + if (m.buildInfo.fileDependencies) { + for (const file of m.buildInfo.fileDependencies) { + this.buildInfo.fileDependencies.add(file); + } + } + // populate context dependencies + if (m.buildInfo.contextDependencies) { + for (const context of m.buildInfo.contextDependencies) { + this.buildInfo.contextDependencies.add(context); + } + } + // populate warnings + for (const warning of m.warnings) { + this.warnings.push(warning); + } + // populate errors + for (const error of m.errors) { + this.errors.push(error); + } + + if (m.buildInfo.assets) { + if (this.buildInfo.assets === undefined) { + this.buildInfo.assets = Object.create(null); + } + Object.assign(this.buildInfo.assets, m.buildInfo.assets); + } + if (m.buildInfo.assetsInfo) { + if (this.buildInfo.assetsInfo === undefined) { + this.buildInfo.assetsInfo = new Map(); + } + for (const [key, value] of m.buildInfo.assetsInfo) { + this.buildInfo.assetsInfo.set(key, value); + } + } + } + } + this._identifier = this._createIdentifier(); + } + + get modules() { + return this._orderedConcatenationList + .filter(info => info.type === "concatenated") + .map(info => info.module); + } + + identifier() { + return this._identifier; + } + + readableIdentifier(requestShortener) { + return ( + this.rootModule.readableIdentifier(requestShortener) + + ` + ${this._numberOfConcatenatedModules - 1} modules` + ); + } + + libIdent(options) { + return this.rootModule.libIdent(options); + } + + nameForCondition() { + return this.rootModule.nameForCondition(); + } + + build(options, compilation, resolver, fs, callback) { + throw new Error("Cannot build this module. It should be already built."); + } + + size() { + // Guess size from embedded modules + return this._orderedConcatenationList.reduce((sum, info) => { + switch (info.type) { + case "concatenated": + return sum + info.module.size(); + case "external": + return sum + 5; + } + return sum; + }, 0); + } + + /** + * @param {Module} rootModule the root of the concatenation + * @param {Set} modulesSet a set of modules which should be concatenated + * @param {Compilation} compilation the compilation context + * @returns {ConcatenationEntry[]} concatenation list + */ + static createConcatenationList(rootModule, modulesSet, compilation) { + const list = []; + const set = new Set(); + + /** + * @param {Module} module a module + * @returns {(function(): Module)[]} imported modules in order + */ + const getConcatenatedImports = module => { + /** @type {WeakMap} */ + const map = new WeakMap(); + const references = module.dependencies + .filter(dep => dep instanceof HarmonyImportDependency) + .map(dep => { + const ref = compilation.getDependencyReference(module, dep); + if (ref) map.set(ref, dep); + return ref; + }) + .filter(ref => ref); + DependencyReference.sort(references); + // TODO webpack 5: remove this hack, see also DependencyReference + return references.map(ref => { + const dep = map.get(ref); + return () => compilation.getDependencyReference(module, dep).module; + }); + }; + + const enterModule = getModule => { + const module = getModule(); + if (!module) return; + if (set.has(module)) return; + set.add(module); + if (modulesSet.has(module)) { + const imports = getConcatenatedImports(module); + imports.forEach(enterModule); + list.push({ + type: "concatenated", + module + }); + } else { + list.push({ + type: "external", + get module() { + // We need to use a getter here, because the module in the dependency + // could be replaced by some other process (i. e. also replaced with a + // concatenated module) + return getModule(); + } + }); + } + }; + + enterModule(() => rootModule); + + return list; + } + + _createIdentifier() { + let orderedConcatenationListIdentifiers = ""; + for (let i = 0; i < this._orderedConcatenationList.length; i++) { + if (this._orderedConcatenationList[i].type === "concatenated") { + orderedConcatenationListIdentifiers += this._orderedConcatenationList[ + i + ].module.identifier(); + orderedConcatenationListIdentifiers += " "; + } + } + const hash = createHash("md4"); + hash.update(orderedConcatenationListIdentifiers); + return this.rootModule.identifier() + " " + hash.digest("hex"); + } + + source(dependencyTemplates, runtimeTemplate) { + const requestShortener = runtimeTemplate.requestShortener; + // Metainfo for each module + const modulesWithInfo = this._orderedConcatenationList.map((info, idx) => { + switch (info.type) { + case "concatenated": { + const exportMap = new Map(); + const reexportMap = new Map(); + for (const dep of info.module.dependencies) { + if (dep instanceof HarmonyExportSpecifierDependency) { + if (!exportMap.has(dep.name)) { + exportMap.set(dep.name, dep.id); + } + } else if (dep instanceof HarmonyExportExpressionDependency) { + if (!exportMap.has("default")) { + exportMap.set("default", "__WEBPACK_MODULE_DEFAULT_EXPORT__"); + } + } else if ( + dep instanceof HarmonyExportImportedSpecifierDependency + ) { + const exportName = dep.name; + const importName = dep._id; + const importedModule = dep._module; + if (exportName && importName) { + if (!reexportMap.has(exportName)) { + reexportMap.set(exportName, { + module: importedModule, + exportName: importName, + dependency: dep + }); + } + } else if (exportName) { + if (!reexportMap.has(exportName)) { + reexportMap.set(exportName, { + module: importedModule, + exportName: true, + dependency: dep + }); + } + } else if (importedModule) { + for (const name of importedModule.buildMeta.providedExports) { + if (dep.activeExports.has(name) || name === "default") { + continue; + } + if (!reexportMap.has(name)) { + reexportMap.set(name, { + module: importedModule, + exportName: name, + dependency: dep + }); + } + } + } + } + } + return { + type: "concatenated", + module: info.module, + index: idx, + ast: undefined, + internalSource: undefined, + source: undefined, + globalScope: undefined, + moduleScope: undefined, + internalNames: new Map(), + globalExports: new Set(), + exportMap: exportMap, + reexportMap: reexportMap, + hasNamespaceObject: false, + namespaceObjectSource: null + }; + } + case "external": + return { + type: "external", + module: info.module, + index: idx, + name: undefined, + interopNamespaceObjectUsed: false, + interopNamespaceObjectName: undefined, + interopDefaultAccessUsed: false, + interopDefaultAccessName: undefined + }; + default: + throw new Error(`Unsupported concatenation entry type ${info.type}`); + } + }); + + // Create mapping from module to info + const moduleToInfoMap = new Map(); + for (const m of modulesWithInfo) { + moduleToInfoMap.set(m.module, m); + } + + // Configure template decorators for dependencies + const innerDependencyTemplates = new Map(dependencyTemplates); + + innerDependencyTemplates.set( + HarmonyImportSpecifierDependency, + new HarmonyImportSpecifierDependencyConcatenatedTemplate( + dependencyTemplates.get(HarmonyImportSpecifierDependency), + moduleToInfoMap + ) + ); + innerDependencyTemplates.set( + HarmonyImportSideEffectDependency, + new HarmonyImportSideEffectDependencyConcatenatedTemplate( + dependencyTemplates.get(HarmonyImportSideEffectDependency), + moduleToInfoMap + ) + ); + innerDependencyTemplates.set( + HarmonyExportSpecifierDependency, + new NullTemplate() + ); + innerDependencyTemplates.set( + HarmonyExportExpressionDependency, + new HarmonyExportExpressionDependencyConcatenatedTemplate( + dependencyTemplates.get(HarmonyExportExpressionDependency), + this.rootModule + ) + ); + innerDependencyTemplates.set( + HarmonyExportImportedSpecifierDependency, + new NullTemplate() + ); + innerDependencyTemplates.set( + HarmonyCompatibilityDependency, + new NullTemplate() + ); + + // Must use full identifier in our cache here to ensure that the source + // is updated should our dependencies list change. + // TODO webpack 5 refactor + innerDependencyTemplates.set( + "hash", + innerDependencyTemplates.get("hash") + this.identifier() + ); + + // Generate source code and analyse scopes + // Prepare a ReplaceSource for the final source + for (const info of modulesWithInfo) { + if (info.type === "concatenated") { + const m = info.module; + const source = m.source(innerDependencyTemplates, runtimeTemplate); + const code = source.source(); + let ast; + try { + ast = Parser.parse(code, { + sourceType: "module" + }); + } catch (err) { + if ( + err.loc && + typeof err.loc === "object" && + typeof err.loc.line === "number" + ) { + const lineNumber = err.loc.line; + const lines = code.split("\n"); + err.message += + "\n| " + + lines + .slice(Math.max(0, lineNumber - 3), lineNumber + 2) + .join("\n| "); + } + throw err; + } + const scopeManager = eslintScope.analyze(ast, { + ecmaVersion: 6, + sourceType: "module", + optimistic: true, + ignoreEval: true, + impliedStrict: true + }); + const globalScope = scopeManager.acquire(ast); + const moduleScope = globalScope.childScopes[0]; + const resultSource = new ReplaceSource(source); + info.ast = ast; + info.internalSource = source; + info.source = resultSource; + info.globalScope = globalScope; + info.moduleScope = moduleScope; + } + } + + // List of all used names to avoid conflicts + const allUsedNames = new Set([ + "__WEBPACK_MODULE_DEFAULT_EXPORT__", // avoid using this internal name + + "abstract", + "arguments", + "async", + "await", + "boolean", + "break", + "byte", + "case", + "catch", + "char", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "double", + "else", + "enum", + "eval", + "export", + "extends", + "false", + "final", + "finally", + "float", + "for", + "function", + "goto", + "if", + "implements", + "import", + "in", + "instanceof", + "int", + "interface", + "let", + "long", + "native", + "new", + "null", + "package", + "private", + "protected", + "public", + "return", + "short", + "static", + "super", + "switch", + "synchronized", + "this", + "throw", + "throws", + "transient", + "true", + "try", + "typeof", + "var", + "void", + "volatile", + "while", + "with", + "yield", + + "module", + "__dirname", + "__filename", + "exports", + + "Array", + "Date", + "eval", + "function", + "hasOwnProperty", + "Infinity", + "isFinite", + "isNaN", + "isPrototypeOf", + "length", + "Math", + "NaN", + "name", + "Number", + "Object", + "prototype", + "String", + "toString", + "undefined", + "valueOf", + + "alert", + "all", + "anchor", + "anchors", + "area", + "assign", + "blur", + "button", + "checkbox", + "clearInterval", + "clearTimeout", + "clientInformation", + "close", + "closed", + "confirm", + "constructor", + "crypto", + "decodeURI", + "decodeURIComponent", + "defaultStatus", + "document", + "element", + "elements", + "embed", + "embeds", + "encodeURI", + "encodeURIComponent", + "escape", + "event", + "fileUpload", + "focus", + "form", + "forms", + "frame", + "innerHeight", + "innerWidth", + "layer", + "layers", + "link", + "location", + "mimeTypes", + "navigate", + "navigator", + "frames", + "frameRate", + "hidden", + "history", + "image", + "images", + "offscreenBuffering", + "open", + "opener", + "option", + "outerHeight", + "outerWidth", + "packages", + "pageXOffset", + "pageYOffset", + "parent", + "parseFloat", + "parseInt", + "password", + "pkcs11", + "plugin", + "prompt", + "propertyIsEnum", + "radio", + "reset", + "screenX", + "screenY", + "scroll", + "secure", + "select", + "self", + "setInterval", + "setTimeout", + "status", + "submit", + "taint", + "text", + "textarea", + "top", + "unescape", + "untaint", + "window", + + "onblur", + "onclick", + "onerror", + "onfocus", + "onkeydown", + "onkeypress", + "onkeyup", + "onmouseover", + "onload", + "onmouseup", + "onmousedown", + "onsubmit" + ]); + + // Set of already checked scopes + const alreadyCheckedScopes = new Set(); + + // get all global names + for (const info of modulesWithInfo) { + const superClassExpressions = []; + + // ignore symbols from moduleScope + if (info.moduleScope) { + alreadyCheckedScopes.add(info.moduleScope); + + // The super class expression in class scopes behaves weird + // We store ranges of all super class expressions to make + // renaming to work correctly + for (const childScope of info.moduleScope.childScopes) { + if (childScope.type !== "class") continue; + if (!childScope.block.superClass) continue; + superClassExpressions.push({ + range: childScope.block.superClass.range, + variables: childScope.variables + }); + } + } + + // add global symbols + if (info.globalScope) { + for (const reference of info.globalScope.through) { + const name = reference.identifier.name; + if ( + /^__WEBPACK_MODULE_REFERENCE__\d+_([\da-f]+|ns)(_call)?(_strict)?__$/.test( + name + ) + ) { + for (const expr of superClassExpressions) { + if ( + expr.range[0] <= reference.identifier.range[0] && + expr.range[1] >= reference.identifier.range[1] + ) { + for (const variable of expr.variables) { + allUsedNames.add(variable.name); + } + } + } + addScopeSymbols1( + reference.from, + allUsedNames, + alreadyCheckedScopes + ); + } else { + allUsedNames.add(name); + } + } + } + + // add exported globals + if (info.type === "concatenated") { + const variables = new Set(); + for (const variable of info.moduleScope.variables) { + variables.add(variable.name); + } + for (const [, variable] of info.exportMap) { + if (!variables.has(variable)) { + info.globalExports.add(variable); + } + } + } + } + + // generate names for symbols + for (const info of modulesWithInfo) { + switch (info.type) { + case "concatenated": { + const namespaceObjectName = this.findNewName( + "namespaceObject", + allUsedNames, + null, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(namespaceObjectName); + info.internalNames.set(namespaceObjectName, namespaceObjectName); + info.exportMap.set(true, namespaceObjectName); + for (const variable of info.moduleScope.variables) { + const name = variable.name; + if (allUsedNames.has(name)) { + const references = getAllReferences(variable); + const symbolsInReferences = new Set(); + const alreadyCheckedInnerScopes = new Set(); + for (const ref of references) { + addScopeSymbols2( + ref.from, + symbolsInReferences, + alreadyCheckedInnerScopes, + alreadyCheckedScopes + ); + } + const newName = this.findNewName( + name, + allUsedNames, + symbolsInReferences, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(newName); + info.internalNames.set(name, newName); + const source = info.source; + const allIdentifiers = new Set( + references.map(r => r.identifier).concat(variable.identifiers) + ); + for (const identifier of allIdentifiers) { + const r = identifier.range; + const path = getPathInAst(info.ast, identifier); + if ( + path && + path.length > 1 && + path[1].type === "Property" && + path[1].shorthand + ) { + source.insert(r[1], `: ${newName}`); + } else { + source.replace(r[0], r[1] - 1, newName); + } + } + } else { + allUsedNames.add(name); + info.internalNames.set(name, name); + } + } + break; + } + case "external": { + const externalName = this.findNewName( + "", + allUsedNames, + null, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(externalName); + info.name = externalName; + if ( + info.module.buildMeta.exportsType === "named" || + !info.module.buildMeta.exportsType + ) { + const externalNameInterop = this.findNewName( + "namespaceObject", + allUsedNames, + null, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(externalNameInterop); + info.interopNamespaceObjectName = externalNameInterop; + } + if (!info.module.buildMeta.exportsType) { + const externalNameInterop = this.findNewName( + "default", + allUsedNames, + null, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(externalNameInterop); + info.interopDefaultAccessName = externalNameInterop; + } + break; + } + } + } + + // Find and replace referenced to modules + for (const info of modulesWithInfo) { + if (info.type === "concatenated") { + for (const reference of info.globalScope.through) { + const name = reference.identifier.name; + const match = /^__WEBPACK_MODULE_REFERENCE__(\d+)_([\da-f]+|ns)(_call)?(_strict)?__$/.exec( + name + ); + if (match) { + const referencedModule = modulesWithInfo[+match[1]]; + let exportName; + if (match[2] === "ns") { + exportName = true; + } else { + const exportData = match[2]; + exportName = Buffer.from(exportData, "hex").toString("utf-8"); + } + const asCall = !!match[3]; + const strictHarmonyModule = !!match[4]; + const finalName = getFinalName( + referencedModule, + exportName, + moduleToInfoMap, + requestShortener, + asCall, + strictHarmonyModule + ); + const r = reference.identifier.range; + const source = info.source; + source.replace(r[0], r[1] - 1, finalName); + } + } + } + } + + // Map with all root exposed used exports + /** @type {Map} */ + const exportsMap = new Map(); + + // Set with all root exposed unused exports + /** @type {Set} */ + const unusedExports = new Set(); + + for (const dep of this.rootModule.dependencies) { + if (dep instanceof HarmonyExportSpecifierDependency) { + const used = this.rootModule.isUsed(dep.name); + if (used) { + const info = moduleToInfoMap.get(this.rootModule); + if (!exportsMap.has(used)) { + exportsMap.set( + used, + () => `/* binding */ ${info.internalNames.get(dep.id)}` + ); + } + } else { + unusedExports.add(dep.name || "namespace"); + } + } else if (dep instanceof HarmonyExportImportedSpecifierDependency) { + const exportDefs = getHarmonyExportImportedSpecifierDependencyExports( + dep + ); + for (const def of exportDefs) { + const info = moduleToInfoMap.get(def.module); + const used = dep.originModule.isUsed(def.name); + if (used) { + if (!exportsMap.has(used)) { + exportsMap.set(used, requestShortener => { + const finalName = getFinalName( + info, + def.id, + moduleToInfoMap, + requestShortener, + false, + this.rootModule.buildMeta.strictHarmonyModule + ); + return `/* reexport */ ${finalName}`; + }); + } + } else { + unusedExports.add(def.name); + } + } + } + } + + const result = new ConcatSource(); + + // add harmony compatibility flag (must be first because of possible circular dependencies) + const usedExports = this.rootModule.usedExports; + if (usedExports === true || usedExports === null) { + result.add(`// ESM COMPAT FLAG\n`); + result.add( + runtimeTemplate.defineEsModuleFlagStatement({ + exportsArgument: this.exportsArgument + }) + ); + } + + // define exports + if (exportsMap.size > 0) { + result.add(`\n// EXPORTS\n`); + for (const [key, value] of exportsMap) { + result.add( + `__webpack_require__.d(${this.exportsArgument}, ${JSON.stringify( + key + )}, function() { return ${value(requestShortener)}; });\n` + ); + } + } + + // list unused exports + if (unusedExports.size > 0) { + result.add( + `\n// UNUSED EXPORTS: ${joinIterableWithComma(unusedExports)}\n` + ); + } + + // define required namespace objects (must be before evaluation modules) + for (const info of modulesWithInfo) { + if (info.namespaceObjectSource) { + result.add( + `\n// NAMESPACE OBJECT: ${info.module.readableIdentifier( + requestShortener + )}\n` + ); + result.add(info.namespaceObjectSource); + } + } + + // evaluate modules in order + for (const info of modulesWithInfo) { + switch (info.type) { + case "concatenated": + result.add( + `\n// CONCATENATED MODULE: ${info.module.readableIdentifier( + requestShortener + )}\n` + ); + result.add(info.source); + break; + case "external": + result.add( + `\n// EXTERNAL MODULE: ${info.module.readableIdentifier( + requestShortener + )}\n` + ); + result.add( + `var ${info.name} = __webpack_require__(${JSON.stringify( + info.module.id + )});\n` + ); + if (info.interopNamespaceObjectUsed) { + if (info.module.buildMeta.exportsType === "named") { + result.add( + `var ${info.interopNamespaceObjectName} = /*#__PURE__*/__webpack_require__.t(${info.name}, 2);\n` + ); + } else if (!info.module.buildMeta.exportsType) { + result.add( + `var ${info.interopNamespaceObjectName} = /*#__PURE__*/__webpack_require__.t(${info.name});\n` + ); + } + } + if (info.interopDefaultAccessUsed) { + result.add( + `var ${info.interopDefaultAccessName} = /*#__PURE__*/__webpack_require__.n(${info.name});\n` + ); + } + break; + default: + throw new Error(`Unsupported concatenation entry type ${info.type}`); + } + } + + return result; + } + + findNewName(oldName, usedNamed1, usedNamed2, extraInfo) { + let name = oldName; + + if (name === "__WEBPACK_MODULE_DEFAULT_EXPORT__") name = ""; + + // Remove uncool stuff + extraInfo = extraInfo.replace( + /\.+\/|(\/index)?\.([a-zA-Z0-9]{1,4})($|\s|\?)|\s*\+\s*\d+\s*modules/g, + "" + ); + + const splittedInfo = extraInfo.split("/"); + while (splittedInfo.length) { + name = splittedInfo.pop() + (name ? "_" + name : ""); + const nameIdent = Template.toIdentifier(name); + if ( + !usedNamed1.has(nameIdent) && + (!usedNamed2 || !usedNamed2.has(nameIdent)) + ) + return nameIdent; + } + + let i = 0; + let nameWithNumber = Template.toIdentifier(`${name}_${i}`); + while ( + usedNamed1.has(nameWithNumber) || + (usedNamed2 && usedNamed2.has(nameWithNumber)) + ) { + i++; + nameWithNumber = Template.toIdentifier(`${name}_${i}`); + } + return nameWithNumber; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ + updateHash(hash) { + for (const info of this._orderedConcatenationList) { + switch (info.type) { + case "concatenated": + info.module.updateHash(hash); + break; + case "external": + hash.update(`${info.module.id}`); + break; + } + } + super.updateHash(hash); + } +} + +class HarmonyImportSpecifierDependencyConcatenatedTemplate { + constructor(originalTemplate, modulesMap) { + this.originalTemplate = originalTemplate; + this.modulesMap = modulesMap; + } + + getHarmonyInitOrder(dep) { + const module = dep._module; + const info = this.modulesMap.get(module); + if (!info) { + return this.originalTemplate.getHarmonyInitOrder(dep); + } + return NaN; + } + + harmonyInit(dep, source, runtimeTemplate, dependencyTemplates) { + const module = dep._module; + const info = this.modulesMap.get(module); + if (!info) { + this.originalTemplate.harmonyInit( + dep, + source, + runtimeTemplate, + dependencyTemplates + ); + return; + } + } + + apply(dep, source, runtime, dependencyTemplates) { + const module = dep._module; + const info = this.modulesMap.get(module); + if (!info) { + this.originalTemplate.apply(dep, source, runtime, dependencyTemplates); + return; + } + let content; + const callFlag = dep.call ? "_call" : ""; + const strictFlag = dep.originModule.buildMeta.strictHarmonyModule + ? "_strict" + : ""; + if (dep._id === null) { + content = `__WEBPACK_MODULE_REFERENCE__${info.index}_ns${strictFlag}__`; + } else if (dep.namespaceObjectAsContext) { + content = `__WEBPACK_MODULE_REFERENCE__${ + info.index + }_ns${strictFlag}__[${JSON.stringify(dep._id)}]`; + } else { + const exportData = Buffer.from(dep._id, "utf-8").toString("hex"); + content = `__WEBPACK_MODULE_REFERENCE__${info.index}_${exportData}${callFlag}${strictFlag}__`; + } + if (dep.shorthand) { + content = dep.name + ": " + content; + } + source.replace(dep.range[0], dep.range[1] - 1, content); + } +} + +class HarmonyImportSideEffectDependencyConcatenatedTemplate { + constructor(originalTemplate, modulesMap) { + this.originalTemplate = originalTemplate; + this.modulesMap = modulesMap; + } + + getHarmonyInitOrder(dep) { + const module = dep._module; + const info = this.modulesMap.get(module); + if (!info) { + return this.originalTemplate.getHarmonyInitOrder(dep); + } + return NaN; + } + + harmonyInit(dep, source, runtime, dependencyTemplates) { + const module = dep._module; + const info = this.modulesMap.get(module); + if (!info) { + this.originalTemplate.harmonyInit( + dep, + source, + runtime, + dependencyTemplates + ); + return; + } + } + + apply(dep, source, runtime, dependencyTemplates) { + const module = dep._module; + const info = this.modulesMap.get(module); + if (!info) { + this.originalTemplate.apply(dep, source, runtime, dependencyTemplates); + return; + } + } +} + +class HarmonyExportExpressionDependencyConcatenatedTemplate { + constructor(originalTemplate, rootModule) { + this.originalTemplate = originalTemplate; + this.rootModule = rootModule; + } + + apply(dep, source, runtime, dependencyTemplates) { + let content = + "/* harmony default export */ var __WEBPACK_MODULE_DEFAULT_EXPORT__ = "; + if (dep.originModule === this.rootModule) { + const used = dep.originModule.isUsed("default"); + const exportsName = dep.originModule.exportsArgument; + if (used) content += `${exportsName}[${JSON.stringify(used)}] = `; + } + + if (dep.range) { + source.replace( + dep.rangeStatement[0], + dep.range[0] - 1, + content + "(" + dep.prefix + ); + source.replace(dep.range[1], dep.rangeStatement[1] - 1, ");"); + return; + } + + source.replace( + dep.rangeStatement[0], + dep.rangeStatement[1] - 1, + content + dep.prefix + ); + } +} + +class NullTemplate { + apply() {} +} + +module.exports = ConcatenatedModule; + + +/***/ }), + +/***/ 29720: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const GraphHelpers = __webpack_require__(32973); + +class EnsureChunkConditionsPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "EnsureChunkConditionsPlugin", + compilation => { + const handler = chunks => { + let changed = false; + for (const module of compilation.modules) { + if (!module.chunkCondition) continue; + const sourceChunks = new Set(); + const chunkGroups = new Set(); + for (const chunk of module.chunksIterable) { + if (!module.chunkCondition(chunk)) { + sourceChunks.add(chunk); + for (const group of chunk.groupsIterable) { + chunkGroups.add(group); + } + } + } + if (sourceChunks.size === 0) continue; + const targetChunks = new Set(); + chunkGroupLoop: for (const chunkGroup of chunkGroups) { + // Can module be placed in a chunk of this group? + for (const chunk of chunkGroup.chunks) { + if (module.chunkCondition(chunk)) { + targetChunks.add(chunk); + continue chunkGroupLoop; + } + } + // We reached the entrypoint: fail + if (chunkGroup.isInitial()) { + throw new Error( + "Cannot fullfil chunk condition of " + module.identifier() + ); + } + // Try placing in all parents + for (const group of chunkGroup.parentsIterable) { + chunkGroups.add(group); + } + } + for (const sourceChunk of sourceChunks) { + GraphHelpers.disconnectChunkAndModule(sourceChunk, module); + } + for (const targetChunk of targetChunks) { + GraphHelpers.connectChunkAndModule(targetChunk, module); + } + } + if (changed) return true; + }; + compilation.hooks.optimizeChunksBasic.tap( + "EnsureChunkConditionsPlugin", + handler + ); + compilation.hooks.optimizeExtractedChunksBasic.tap( + "EnsureChunkConditionsPlugin", + handler + ); + } + ); + } +} +module.exports = EnsureChunkConditionsPlugin; + + +/***/ }), + +/***/ 25850: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class FlagIncludedChunksPlugin { + apply(compiler) { + compiler.hooks.compilation.tap("FlagIncludedChunksPlugin", compilation => { + compilation.hooks.optimizeChunkIds.tap( + "FlagIncludedChunksPlugin", + chunks => { + // prepare two bit integers for each module + // 2^31 is the max number represented as SMI in v8 + // we want the bits distributed this way: + // the bit 2^31 is pretty rar and only one module should get it + // so it has a probability of 1 / modulesCount + // the first bit (2^0) is the easiest and every module could get it + // if it doesn't get a better bit + // from bit 2^n to 2^(n+1) there is a probability of p + // so 1 / modulesCount == p^31 + // <=> p = sqrt31(1 / modulesCount) + // so we use a modulo of 1 / sqrt31(1 / modulesCount) + const moduleBits = new WeakMap(); + const modulesCount = compilation.modules.length; + + // precalculate the modulo values for each bit + const modulo = 1 / Math.pow(1 / modulesCount, 1 / 31); + const modulos = Array.from( + { length: 31 }, + (x, i) => Math.pow(modulo, i) | 0 + ); + + // iterate all modules to generate bit values + let i = 0; + for (const module of compilation.modules) { + let bit = 30; + while (i % modulos[bit] !== 0) { + bit--; + } + moduleBits.set(module, 1 << bit); + i++; + } + + // interate all chunks to generate bitmaps + const chunkModulesHash = new WeakMap(); + for (const chunk of chunks) { + let hash = 0; + for (const module of chunk.modulesIterable) { + hash |= moduleBits.get(module); + } + chunkModulesHash.set(chunk, hash); + } + + for (const chunkA of chunks) { + const chunkAHash = chunkModulesHash.get(chunkA); + const chunkAModulesCount = chunkA.getNumberOfModules(); + if (chunkAModulesCount === 0) continue; + let bestModule = undefined; + for (const module of chunkA.modulesIterable) { + if ( + bestModule === undefined || + bestModule.getNumberOfChunks() > module.getNumberOfChunks() + ) + bestModule = module; + } + loopB: for (const chunkB of bestModule.chunksIterable) { + // as we iterate the same iterables twice + // skip if we find ourselves + if (chunkA === chunkB) continue; + + const chunkBModulesCount = chunkB.getNumberOfModules(); + + // ids for empty chunks are not included + if (chunkBModulesCount === 0) continue; + + // instead of swapping A and B just bail + // as we loop twice the current A will be B and B then A + if (chunkAModulesCount > chunkBModulesCount) continue; + + // is chunkA in chunkB? + + // we do a cheap check for the hash value + const chunkBHash = chunkModulesHash.get(chunkB); + if ((chunkBHash & chunkAHash) !== chunkAHash) continue; + + // compare all modules + for (const m of chunkA.modulesIterable) { + if (!chunkB.containsModule(m)) continue loopB; + } + chunkB.ids.push(chunkA.id); + } + } + } + ); + }); + } +} +module.exports = FlagIncludedChunksPlugin; + + +/***/ }), + +/***/ 3846: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(27993); +const LazyBucketSortedSet = __webpack_require__(52315); + +/** @typedef {import("../../declarations/plugins/optimize/LimitChunkCountPlugin").LimitChunkCountPluginOptions} LimitChunkCountPluginOptions */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ + +/** + * @typedef {Object} ChunkCombination + * @property {boolean} deleted this is set to true when combination was removed + * @property {number} sizeDiff + * @property {number} integratedSize + * @property {Chunk} a + * @property {Chunk} b + * @property {number} aIdx + * @property {number} bIdx + * @property {number} aSize + * @property {number} bSize + */ + +const addToSetMap = (map, key, value) => { + const set = map.get(key); + if (set === undefined) { + map.set(key, new Set([value])); + } else { + set.add(value); + } +}; + +class LimitChunkCountPlugin { + /** + * @param {LimitChunkCountPluginOptions=} options options object + */ + constructor(options) { + if (!options) options = {}; + + validateOptions(schema, options, "Limit Chunk Count Plugin"); + this.options = options; + } + + /** + * @param {Compiler} compiler the webpack compiler + * @returns {void} + */ + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap("LimitChunkCountPlugin", compilation => { + compilation.hooks.optimizeChunksAdvanced.tap( + "LimitChunkCountPlugin", + chunks => { + const maxChunks = options.maxChunks; + if (!maxChunks) return; + if (maxChunks < 1) return; + if (chunks.length <= maxChunks) return; + + let remainingChunksToMerge = chunks.length - maxChunks; + + // order chunks in a deterministic way + const orderedChunks = chunks.slice().sort((a, b) => a.compareTo(b)); + + // create a lazy sorted data structure to keep all combinations + // this is large. Size = chunks * (chunks - 1) / 2 + // It uses a multi layer bucket sort plus normal sort in the last layer + // It's also lazy so only accessed buckets are sorted + const combinations = new LazyBucketSortedSet( + // Layer 1: ordered by largest size benefit + c => c.sizeDiff, + (a, b) => b - a, + // Layer 2: ordered by smallest combined size + c => c.integratedSize, + (a, b) => a - b, + // Layer 3: ordered by position difference in orderedChunk (-> to be deterministic) + c => c.bIdx - c.aIdx, + (a, b) => a - b, + // Layer 4: ordered by position in orderedChunk (-> to be deterministic) + (a, b) => a.bIdx - b.bIdx + ); + + // we keep a mappng from chunk to all combinations + // but this mapping is not kept up-to-date with deletions + // so `deleted` flag need to be considered when iterating this + /** @type {Map>} */ + const combinationsByChunk = new Map(); + + orderedChunks.forEach((b, bIdx) => { + // create combination pairs with size and integrated size + for (let aIdx = 0; aIdx < bIdx; aIdx++) { + const a = orderedChunks[aIdx]; + const integratedSize = a.integratedSize(b, options); + + // filter pairs that do not have an integratedSize + // meaning they can NOT be integrated! + if (integratedSize === false) continue; + + const aSize = a.size(options); + const bSize = b.size(options); + const c = { + deleted: false, + sizeDiff: aSize + bSize - integratedSize, + integratedSize, + a, + b, + aIdx, + bIdx, + aSize, + bSize + }; + combinations.add(c); + addToSetMap(combinationsByChunk, a, c); + addToSetMap(combinationsByChunk, b, c); + } + return combinations; + }); + + // list of modified chunks during this run + // combinations affected by this change are skipped to allow + // futher optimizations + /** @type {Set} */ + const modifiedChunks = new Set(); + + let changed = false; + // eslint-disable-next-line no-constant-condition + loop: while (true) { + const combination = combinations.popFirst(); + if (combination === undefined) break; + + combination.deleted = true; + const { a, b, integratedSize } = combination; + + // skip over pair when + // one of the already merged chunks is a parent of one of the chunks + if (modifiedChunks.size > 0) { + const queue = new Set(a.groupsIterable); + for (const group of b.groupsIterable) { + queue.add(group); + } + for (const group of queue) { + for (const mChunk of modifiedChunks) { + if (mChunk !== a && mChunk !== b && mChunk.isInGroup(group)) { + // This is a potential pair which needs recalculation + // We can't do that now, but it merge before following pairs + // so we leave space for it, and consider chunks as modified + // just for the worse case + remainingChunksToMerge--; + if (remainingChunksToMerge <= 0) break loop; + modifiedChunks.add(a); + modifiedChunks.add(b); + continue loop; + } + } + for (const parent of group.parentsIterable) { + queue.add(parent); + } + } + } + + // merge the chunks + if (a.integrate(b, "limit")) { + chunks.splice(chunks.indexOf(b), 1); + + // flag chunk a as modified as further optimization are possible for all children here + modifiedChunks.add(a); + + changed = true; + remainingChunksToMerge--; + if (remainingChunksToMerge <= 0) break; + + // Update all affected combinations + // delete all combination with the removed chunk + // we will use combinations with the kept chunk instead + for (const combination of combinationsByChunk.get(b)) { + if (combination.deleted) continue; + combination.deleted = true; + combinations.delete(combination); + } + + // Update combinations with the kept chunk with new sizes + for (const combination of combinationsByChunk.get(a)) { + if (combination.deleted) continue; + if (combination.a === a) { + // Update size + const newIntegratedSize = a.integratedSize( + combination.b, + options + ); + if (newIntegratedSize === false) { + combination.deleted = true; + combinations.delete(combination); + continue; + } + const finishUpdate = combinations.startUpdate(combination); + combination.integratedSize = newIntegratedSize; + combination.aSize = integratedSize; + combination.sizeDiff = + combination.bSize + integratedSize - newIntegratedSize; + finishUpdate(); + } else if (combination.b === a) { + // Update size + const newIntegratedSize = combination.a.integratedSize( + a, + options + ); + if (newIntegratedSize === false) { + combination.deleted = true; + combinations.delete(combination); + continue; + } + const finishUpdate = combinations.startUpdate(combination); + combination.integratedSize = newIntegratedSize; + combination.bSize = integratedSize; + combination.sizeDiff = + integratedSize + combination.aSize - newIntegratedSize; + finishUpdate(); + } + } + } + } + if (changed) return true; + } + ); + }); + } +} +module.exports = LimitChunkCountPlugin; + + +/***/ }), + +/***/ 46214: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class MergeDuplicateChunksPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "MergeDuplicateChunksPlugin", + compilation => { + compilation.hooks.optimizeChunksBasic.tap( + "MergeDuplicateChunksPlugin", + chunks => { + // remember already tested chunks for performance + const notDuplicates = new Set(); + + // for each chunk + for (const chunk of chunks) { + // track a Set of all chunk that could be duplicates + let possibleDuplicates; + for (const module of chunk.modulesIterable) { + if (possibleDuplicates === undefined) { + // when possibleDuplicates is not yet set, + // create a new Set from chunks of the current module + // including only chunks with the same number of modules + for (const dup of module.chunksIterable) { + if ( + dup !== chunk && + chunk.getNumberOfModules() === dup.getNumberOfModules() && + !notDuplicates.has(dup) + ) { + // delay allocating the new Set until here, reduce memory pressure + if (possibleDuplicates === undefined) { + possibleDuplicates = new Set(); + } + possibleDuplicates.add(dup); + } + } + // when no chunk is possible we can break here + if (possibleDuplicates === undefined) break; + } else { + // validate existing possible duplicates + for (const dup of possibleDuplicates) { + // remove possible duplicate when module is not contained + if (!dup.containsModule(module)) { + possibleDuplicates.delete(dup); + } + } + // when all chunks has been removed we can break here + if (possibleDuplicates.size === 0) break; + } + } + + // when we found duplicates + if ( + possibleDuplicates !== undefined && + possibleDuplicates.size > 0 + ) { + for (const otherChunk of possibleDuplicates) { + if (otherChunk.hasRuntime() !== chunk.hasRuntime()) continue; + // merge them + if (chunk.integrate(otherChunk, "duplicate")) { + chunks.splice(chunks.indexOf(otherChunk), 1); + } + } + } + + // don't check already processed chunks twice + notDuplicates.add(chunk); + } + } + ); + } + ); + } +} +module.exports = MergeDuplicateChunksPlugin; + + +/***/ }), + +/***/ 55607: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(8670); + +/** @typedef {import("../../declarations/plugins/optimize/MinChunkSizePlugin").MinChunkSizePluginOptions} MinChunkSizePluginOptions */ + +class MinChunkSizePlugin { + /** + * @param {MinChunkSizePluginOptions} options options object + */ + constructor(options) { + validateOptions(schema, options, "Min Chunk Size Plugin"); + this.options = options; + } + + apply(compiler) { + const options = this.options; + const minChunkSize = options.minChunkSize; + compiler.hooks.compilation.tap("MinChunkSizePlugin", compilation => { + compilation.hooks.optimizeChunksAdvanced.tap( + "MinChunkSizePlugin", + chunks => { + const equalOptions = { + chunkOverhead: 1, + entryChunkMultiplicator: 1 + }; + + const sortedSizeFilteredExtendedPairCombinations = chunks + .reduce((combinations, a, idx) => { + // create combination pairs + for (let i = 0; i < idx; i++) { + const b = chunks[i]; + combinations.push([b, a]); + } + return combinations; + }, []) + .filter(pair => { + // check if one of the chunks sizes is smaller than the minChunkSize + const p0SmallerThanMinChunkSize = + pair[0].size(equalOptions) < minChunkSize; + const p1SmallerThanMinChunkSize = + pair[1].size(equalOptions) < minChunkSize; + return p0SmallerThanMinChunkSize || p1SmallerThanMinChunkSize; + }) + .map(pair => { + // extend combination pairs with size and integrated size + const a = pair[0].size(options); + const b = pair[1].size(options); + const ab = pair[0].integratedSize(pair[1], options); + return [a + b - ab, ab, pair[0], pair[1]]; + }) + .filter(pair => { + // filter pairs that do not have an integratedSize + // meaning they can NOT be integrated! + return pair[1] !== false; + }) + .sort((a, b) => { + // sadly javascript does an inplace sort here + // sort by size + const diff = b[0] - a[0]; + if (diff !== 0) return diff; + return a[1] - b[1]; + }); + + if (sortedSizeFilteredExtendedPairCombinations.length === 0) return; + + const pair = sortedSizeFilteredExtendedPairCombinations[0]; + + pair[2].integrate(pair[3], "min-size"); + chunks.splice(chunks.indexOf(pair[3]), 1); + return true; + } + ); + }); + } +} +module.exports = MinChunkSizePlugin; + + +/***/ }), + +/***/ 25472: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebpackError = __webpack_require__(97391); +const SizeFormatHelpers = __webpack_require__(12496); + +class MinMaxSizeWarning extends WebpackError { + constructor(keys, minSize, maxSize) { + let keysMessage = "Fallback cache group"; + if (keys) { + keysMessage = + keys.length > 1 + ? `Cache groups ${keys.sort().join(", ")}` + : `Cache group ${keys[0]}`; + } + super( + `SplitChunksPlugin\n` + + `${keysMessage}\n` + + `Configured minSize (${SizeFormatHelpers.formatSize(minSize)}) is ` + + `bigger than maxSize (${SizeFormatHelpers.formatSize(maxSize)}).\n` + + "This seem to be a invalid optimiziation.splitChunks configuration." + ); + } +} + +module.exports = MinMaxSizeWarning; + + +/***/ }), + +/***/ 45184: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const HarmonyImportDependency = __webpack_require__(81599); +const ModuleHotAcceptDependency = __webpack_require__(29018); +const ModuleHotDeclineDependency = __webpack_require__(60482); +const ConcatenatedModule = __webpack_require__(16953); +const HarmonyCompatibilityDependency = __webpack_require__(1533); +const StackedSetMap = __webpack_require__(92251); + +const formatBailoutReason = msg => { + return "ModuleConcatenation bailout: " + msg; +}; + +class ModuleConcatenationPlugin { + constructor(options) { + if (typeof options !== "object") options = {}; + this.options = options; + } + + apply(compiler) { + compiler.hooks.compilation.tap( + "ModuleConcatenationPlugin", + (compilation, { normalModuleFactory }) => { + const handler = (parser, parserOptions) => { + parser.hooks.call.for("eval").tap("ModuleConcatenationPlugin", () => { + // Because of variable renaming we can't use modules with eval. + parser.state.module.buildMeta.moduleConcatenationBailout = "eval()"; + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("ModuleConcatenationPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("ModuleConcatenationPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("ModuleConcatenationPlugin", handler); + + const bailoutReasonMap = new Map(); + + const setBailoutReason = (module, reason) => { + bailoutReasonMap.set(module, reason); + module.optimizationBailout.push( + typeof reason === "function" + ? rs => formatBailoutReason(reason(rs)) + : formatBailoutReason(reason) + ); + }; + + const getBailoutReason = (module, requestShortener) => { + const reason = bailoutReasonMap.get(module); + if (typeof reason === "function") return reason(requestShortener); + return reason; + }; + + compilation.hooks.optimizeChunkModules.tap( + "ModuleConcatenationPlugin", + (allChunks, modules) => { + const relevantModules = []; + const possibleInners = new Set(); + for (const module of modules) { + // Only harmony modules are valid for optimization + if ( + !module.buildMeta || + module.buildMeta.exportsType !== "namespace" || + !module.dependencies.some( + d => d instanceof HarmonyCompatibilityDependency + ) + ) { + setBailoutReason(module, "Module is not an ECMAScript module"); + continue; + } + + // Some expressions are not compatible with module concatenation + // because they may produce unexpected results. The plugin bails out + // if some were detected upfront. + if ( + module.buildMeta && + module.buildMeta.moduleConcatenationBailout + ) { + setBailoutReason( + module, + `Module uses ${module.buildMeta.moduleConcatenationBailout}` + ); + continue; + } + + // Exports must be known (and not dynamic) + if (!Array.isArray(module.buildMeta.providedExports)) { + setBailoutReason(module, "Module exports are unknown"); + continue; + } + + // Using dependency variables is not possible as this wraps the code in a function + if (module.variables.length > 0) { + setBailoutReason( + module, + `Module uses injected variables (${module.variables + .map(v => v.name) + .join(", ")})` + ); + continue; + } + + // Hot Module Replacement need it's own module to work correctly + if ( + module.dependencies.some( + dep => + dep instanceof ModuleHotAcceptDependency || + dep instanceof ModuleHotDeclineDependency + ) + ) { + setBailoutReason(module, "Module uses Hot Module Replacement"); + continue; + } + + relevantModules.push(module); + + // Module must not be the entry points + if (module.isEntryModule()) { + setBailoutReason(module, "Module is an entry point"); + continue; + } + + // Module must be in any chunk (we don't want to do useless work) + if (module.getNumberOfChunks() === 0) { + setBailoutReason(module, "Module is not in any chunk"); + continue; + } + + // Module must only be used by Harmony Imports + const nonHarmonyReasons = module.reasons.filter( + reason => + !reason.dependency || + !(reason.dependency instanceof HarmonyImportDependency) + ); + if (nonHarmonyReasons.length > 0) { + const importingModules = new Set( + nonHarmonyReasons.map(r => r.module).filter(Boolean) + ); + const importingExplanations = new Set( + nonHarmonyReasons.map(r => r.explanation).filter(Boolean) + ); + const importingModuleTypes = new Map( + Array.from(importingModules).map( + m => /** @type {[string, Set]} */ ([ + m, + new Set( + nonHarmonyReasons + .filter(r => r.module === m) + .map(r => r.dependency.type) + .sort() + ) + ]) + ) + ); + setBailoutReason(module, requestShortener => { + const names = Array.from(importingModules) + .map( + m => + `${m.readableIdentifier( + requestShortener + )} (referenced with ${Array.from( + importingModuleTypes.get(m) + ).join(", ")})` + ) + .sort(); + const explanations = Array.from(importingExplanations).sort(); + if (names.length > 0 && explanations.length === 0) { + return `Module is referenced from these modules with unsupported syntax: ${names.join( + ", " + )}`; + } else if (names.length === 0 && explanations.length > 0) { + return `Module is referenced by: ${explanations.join( + ", " + )}`; + } else if (names.length > 0 && explanations.length > 0) { + return `Module is referenced from these modules with unsupported syntax: ${names.join( + ", " + )} and by: ${explanations.join(", ")}`; + } else { + return "Module is referenced in a unsupported way"; + } + }); + continue; + } + + possibleInners.add(module); + } + // sort by depth + // modules with lower depth are more likely suited as roots + // this improves performance, because modules already selected as inner are skipped + relevantModules.sort((a, b) => { + return a.depth - b.depth; + }); + const concatConfigurations = []; + const usedAsInner = new Set(); + for (const currentRoot of relevantModules) { + // when used by another configuration as inner: + // the other configuration is better and we can skip this one + if (usedAsInner.has(currentRoot)) continue; + + // create a configuration with the root + const currentConfiguration = new ConcatConfiguration(currentRoot); + + // cache failures to add modules + const failureCache = new Map(); + + // try to add all imports + for (const imp of this._getImports(compilation, currentRoot)) { + const problem = this._tryToAdd( + compilation, + currentConfiguration, + imp, + possibleInners, + failureCache + ); + if (problem) { + failureCache.set(imp, problem); + currentConfiguration.addWarning(imp, problem); + } + } + if (!currentConfiguration.isEmpty()) { + concatConfigurations.push(currentConfiguration); + for (const module of currentConfiguration.getModules()) { + if (module !== currentConfiguration.rootModule) { + usedAsInner.add(module); + } + } + } + } + // HACK: Sort configurations by length and start with the longest one + // to get the biggers groups possible. Used modules are marked with usedModules + // TODO: Allow to reuse existing configuration while trying to add dependencies. + // This would improve performance. O(n^2) -> O(n) + concatConfigurations.sort((a, b) => { + return b.modules.size - a.modules.size; + }); + const usedModules = new Set(); + for (const concatConfiguration of concatConfigurations) { + if (usedModules.has(concatConfiguration.rootModule)) continue; + const modules = concatConfiguration.getModules(); + const rootModule = concatConfiguration.rootModule; + const newModule = new ConcatenatedModule( + rootModule, + Array.from(modules), + ConcatenatedModule.createConcatenationList( + rootModule, + modules, + compilation + ) + ); + for (const warning of concatConfiguration.getWarningsSorted()) { + newModule.optimizationBailout.push(requestShortener => { + const reason = getBailoutReason(warning[0], requestShortener); + const reasonWithPrefix = reason ? ` (<- ${reason})` : ""; + if (warning[0] === warning[1]) { + return formatBailoutReason( + `Cannot concat with ${warning[0].readableIdentifier( + requestShortener + )}${reasonWithPrefix}` + ); + } else { + return formatBailoutReason( + `Cannot concat with ${warning[0].readableIdentifier( + requestShortener + )} because of ${warning[1].readableIdentifier( + requestShortener + )}${reasonWithPrefix}` + ); + } + }); + } + const chunks = concatConfiguration.rootModule.getChunks(); + for (const m of modules) { + usedModules.add(m); + for (const chunk of chunks) { + chunk.removeModule(m); + } + } + for (const chunk of chunks) { + chunk.addModule(newModule); + newModule.addChunk(chunk); + } + for (const chunk of allChunks) { + if (chunk.entryModule === concatConfiguration.rootModule) { + chunk.entryModule = newModule; + } + } + compilation.modules.push(newModule); + for (const reason of newModule.reasons) { + if (reason.dependency.module === concatConfiguration.rootModule) + reason.dependency.module = newModule; + if ( + reason.dependency.redirectedModule === + concatConfiguration.rootModule + ) + reason.dependency.redirectedModule = newModule; + } + // TODO: remove when LTS node version contains fixed v8 version + // @see https://github.com/webpack/webpack/pull/6613 + // Turbofan does not correctly inline for-of loops with polymorphic input arrays. + // Work around issue by using a standard for loop and assigning dep.module.reasons + for (let i = 0; i < newModule.dependencies.length; i++) { + let dep = newModule.dependencies[i]; + if (dep.module) { + let reasons = dep.module.reasons; + for (let j = 0; j < reasons.length; j++) { + let reason = reasons[j]; + if (reason.dependency === dep) { + reason.module = newModule; + } + } + } + } + } + compilation.modules = compilation.modules.filter( + m => !usedModules.has(m) + ); + } + ); + } + ); + } + + _getImports(compilation, module) { + return new Set( + module.dependencies + + // Get reference info only for harmony Dependencies + .map(dep => { + if (!(dep instanceof HarmonyImportDependency)) return null; + if (!compilation) return dep.getReference(); + return compilation.getDependencyReference(module, dep); + }) + + // Reference is valid and has a module + // Dependencies are simple enough to concat them + .filter( + ref => + ref && + ref.module && + (Array.isArray(ref.importedNames) || + Array.isArray(ref.module.buildMeta.providedExports)) + ) + + // Take the imported module + .map(ref => ref.module) + ); + } + + _tryToAdd(compilation, config, module, possibleModules, failureCache) { + const cacheEntry = failureCache.get(module); + if (cacheEntry) { + return cacheEntry; + } + + // Already added? + if (config.has(module)) { + return null; + } + + // Not possible to add? + if (!possibleModules.has(module)) { + failureCache.set(module, module); // cache failures for performance + return module; + } + + // module must be in the same chunks + if (!config.rootModule.hasEqualsChunks(module)) { + failureCache.set(module, module); // cache failures for performance + return module; + } + + // Clone config to make experimental changes + const testConfig = config.clone(); + + // Add the module + testConfig.add(module); + + // Every module which depends on the added module must be in the configuration too. + for (const reason of module.reasons) { + // Modules that are not used can be ignored + if ( + reason.module.factoryMeta.sideEffectFree && + reason.module.used === false + ) + continue; + + const problem = this._tryToAdd( + compilation, + testConfig, + reason.module, + possibleModules, + failureCache + ); + if (problem) { + failureCache.set(module, problem); // cache failures for performance + return problem; + } + } + + // Commit experimental changes + config.set(testConfig); + + // Eagerly try to add imports too if possible + for (const imp of this._getImports(compilation, module)) { + const problem = this._tryToAdd( + compilation, + config, + imp, + possibleModules, + failureCache + ); + if (problem) { + config.addWarning(imp, problem); + } + } + return null; + } +} + +class ConcatConfiguration { + constructor(rootModule, cloneFrom) { + this.rootModule = rootModule; + if (cloneFrom) { + this.modules = cloneFrom.modules.createChild(5); + this.warnings = cloneFrom.warnings.createChild(5); + } else { + this.modules = new StackedSetMap(); + this.modules.add(rootModule); + this.warnings = new StackedSetMap(); + } + } + + add(module) { + this.modules.add(module); + } + + has(module) { + return this.modules.has(module); + } + + isEmpty() { + return this.modules.size === 1; + } + + addWarning(module, problem) { + this.warnings.set(module, problem); + } + + getWarningsSorted() { + return new Map( + this.warnings.asPairArray().sort((a, b) => { + const ai = a[0].identifier(); + const bi = b[0].identifier(); + if (ai < bi) return -1; + if (ai > bi) return 1; + return 0; + }) + ); + } + + getModules() { + return this.modules.asSet(); + } + + clone() { + return new ConcatConfiguration(this.rootModule, this); + } + + set(config) { + this.rootModule = config.rootModule; + this.modules = config.modules; + this.warnings = config.warnings; + } +} + +module.exports = ModuleConcatenationPlugin; + + +/***/ }), + +/***/ 68053: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +/** @typedef {import("../Compiler")} Compiler */ + +class NaturalChunkOrderPlugin { + /** + * @param {Compiler} compiler webpack compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("NaturalChunkOrderPlugin", compilation => { + compilation.hooks.optimizeChunkOrder.tap( + "NaturalChunkOrderPlugin", + chunks => { + chunks.sort((chunkA, chunkB) => { + const a = chunkA.modulesIterable[Symbol.iterator](); + const b = chunkB.modulesIterable[Symbol.iterator](); + // eslint-disable-next-line no-constant-condition + while (true) { + const aItem = a.next(); + const bItem = b.next(); + if (aItem.done && bItem.done) return 0; + if (aItem.done) return -1; + if (bItem.done) return 1; + const aModuleId = aItem.value.id; + const bModuleId = bItem.value.id; + if (aModuleId < bModuleId) return -1; + if (aModuleId > bModuleId) return 1; + } + }); + } + ); + }); + } +} + +module.exports = NaturalChunkOrderPlugin; + + +/***/ }), + +/***/ 83741: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(88771); + +/** @typedef {import("../../declarations/plugins/optimize/OccurrenceOrderChunkIdsPlugin").OccurrenceOrderChunkIdsPluginOptions} OccurrenceOrderChunkIdsPluginOptions */ + +class OccurrenceOrderChunkIdsPlugin { + /** + * @param {OccurrenceOrderChunkIdsPluginOptions=} options options object + */ + constructor(options = {}) { + validateOptions(schema, options, "Occurrence Order Chunk Ids Plugin"); + this.options = options; + } + + apply(compiler) { + const prioritiseInitial = this.options.prioritiseInitial; + compiler.hooks.compilation.tap( + "OccurrenceOrderChunkIdsPlugin", + compilation => { + compilation.hooks.optimizeChunkOrder.tap( + "OccurrenceOrderChunkIdsPlugin", + chunks => { + const occursInInitialChunksMap = new Map(); + const originalOrder = new Map(); + + let i = 0; + for (const c of chunks) { + let occurs = 0; + for (const chunkGroup of c.groupsIterable) { + for (const parent of chunkGroup.parentsIterable) { + if (parent.isInitial()) occurs++; + } + } + occursInInitialChunksMap.set(c, occurs); + originalOrder.set(c, i++); + } + + chunks.sort((a, b) => { + if (prioritiseInitial) { + const aEntryOccurs = occursInInitialChunksMap.get(a); + const bEntryOccurs = occursInInitialChunksMap.get(b); + if (aEntryOccurs > bEntryOccurs) return -1; + if (aEntryOccurs < bEntryOccurs) return 1; + } + const aOccurs = a.getNumberOfGroups(); + const bOccurs = b.getNumberOfGroups(); + if (aOccurs > bOccurs) return -1; + if (aOccurs < bOccurs) return 1; + const orgA = originalOrder.get(a); + const orgB = originalOrder.get(b); + return orgA - orgB; + }); + } + ); + } + ); + } +} + +module.exports = OccurrenceOrderChunkIdsPlugin; + + +/***/ }), + +/***/ 62000: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const validateOptions = __webpack_require__(33225); +const schema = __webpack_require__(81430); + +/** @typedef {import("../../declarations/plugins/optimize/OccurrenceOrderModuleIdsPlugin").OccurrenceOrderModuleIdsPluginOptions} OccurrenceOrderModuleIdsPluginOptions */ + +class OccurrenceOrderModuleIdsPlugin { + /** + * @param {OccurrenceOrderModuleIdsPluginOptions=} options options object + */ + constructor(options = {}) { + validateOptions(schema, options, "Occurrence Order Module Ids Plugin"); + this.options = options; + } + + apply(compiler) { + const prioritiseInitial = this.options.prioritiseInitial; + compiler.hooks.compilation.tap( + "OccurrenceOrderModuleIdsPlugin", + compilation => { + compilation.hooks.optimizeModuleOrder.tap( + "OccurrenceOrderModuleIdsPlugin", + modules => { + const occursInInitialChunksMap = new Map(); + const occursInAllChunksMap = new Map(); + + const initialChunkChunkMap = new Map(); + const entryCountMap = new Map(); + for (const m of modules) { + let initial = 0; + let entry = 0; + for (const c of m.chunksIterable) { + if (c.canBeInitial()) initial++; + if (c.entryModule === m) entry++; + } + initialChunkChunkMap.set(m, initial); + entryCountMap.set(m, entry); + } + + const countOccursInEntry = (sum, r) => { + if (!r.module) { + return sum; + } + const count = initialChunkChunkMap.get(r.module); + if (!count) { + return sum; + } + return sum + count; + }; + const countOccurs = (sum, r) => { + if (!r.module) { + return sum; + } + let factor = 1; + if (typeof r.dependency.getNumberOfIdOccurrences === "function") { + factor = r.dependency.getNumberOfIdOccurrences(); + } + if (factor === 0) { + return sum; + } + return sum + factor * r.module.getNumberOfChunks(); + }; + + if (prioritiseInitial) { + for (const m of modules) { + const result = + m.reasons.reduce(countOccursInEntry, 0) + + initialChunkChunkMap.get(m) + + entryCountMap.get(m); + occursInInitialChunksMap.set(m, result); + } + } + + const originalOrder = new Map(); + let i = 0; + for (const m of modules) { + const result = + m.reasons.reduce(countOccurs, 0) + + m.getNumberOfChunks() + + entryCountMap.get(m); + occursInAllChunksMap.set(m, result); + originalOrder.set(m, i++); + } + + modules.sort((a, b) => { + if (prioritiseInitial) { + const aEntryOccurs = occursInInitialChunksMap.get(a); + const bEntryOccurs = occursInInitialChunksMap.get(b); + if (aEntryOccurs > bEntryOccurs) return -1; + if (aEntryOccurs < bEntryOccurs) return 1; + } + const aOccurs = occursInAllChunksMap.get(a); + const bOccurs = occursInAllChunksMap.get(b); + if (aOccurs > bOccurs) return -1; + if (aOccurs < bOccurs) return 1; + const orgA = originalOrder.get(a); + const orgB = originalOrder.get(b); + return orgA - orgB; + }); + } + ); + } + ); + } +} + +module.exports = OccurrenceOrderModuleIdsPlugin; + + +/***/ }), + +/***/ 67340: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +// TODO webpack 5 remove this plugin +// It has been splitted into separate plugins for modules and chunks +class OccurrenceOrderPlugin { + constructor(preferEntry) { + if (preferEntry !== undefined && typeof preferEntry !== "boolean") { + throw new Error( + "Argument should be a boolean.\nFor more info on this plugin, see https://webpack.js.org/plugins/" + ); + } + this.preferEntry = preferEntry; + } + apply(compiler) { + const preferEntry = this.preferEntry; + compiler.hooks.compilation.tap("OccurrenceOrderPlugin", compilation => { + compilation.hooks.optimizeModuleOrder.tap( + "OccurrenceOrderPlugin", + modules => { + const occursInInitialChunksMap = new Map(); + const occursInAllChunksMap = new Map(); + + const initialChunkChunkMap = new Map(); + const entryCountMap = new Map(); + for (const m of modules) { + let initial = 0; + let entry = 0; + for (const c of m.chunksIterable) { + if (c.canBeInitial()) initial++; + if (c.entryModule === m) entry++; + } + initialChunkChunkMap.set(m, initial); + entryCountMap.set(m, entry); + } + + const countOccursInEntry = (sum, r) => { + if (!r.module) { + return sum; + } + return sum + initialChunkChunkMap.get(r.module); + }; + const countOccurs = (sum, r) => { + if (!r.module) { + return sum; + } + let factor = 1; + if (typeof r.dependency.getNumberOfIdOccurrences === "function") { + factor = r.dependency.getNumberOfIdOccurrences(); + } + if (factor === 0) { + return sum; + } + return sum + factor * r.module.getNumberOfChunks(); + }; + + if (preferEntry) { + for (const m of modules) { + const result = + m.reasons.reduce(countOccursInEntry, 0) + + initialChunkChunkMap.get(m) + + entryCountMap.get(m); + occursInInitialChunksMap.set(m, result); + } + } + + const originalOrder = new Map(); + let i = 0; + for (const m of modules) { + const result = + m.reasons.reduce(countOccurs, 0) + + m.getNumberOfChunks() + + entryCountMap.get(m); + occursInAllChunksMap.set(m, result); + originalOrder.set(m, i++); + } + + modules.sort((a, b) => { + if (preferEntry) { + const aEntryOccurs = occursInInitialChunksMap.get(a); + const bEntryOccurs = occursInInitialChunksMap.get(b); + if (aEntryOccurs > bEntryOccurs) return -1; + if (aEntryOccurs < bEntryOccurs) return 1; + } + const aOccurs = occursInAllChunksMap.get(a); + const bOccurs = occursInAllChunksMap.get(b); + if (aOccurs > bOccurs) return -1; + if (aOccurs < bOccurs) return 1; + const orgA = originalOrder.get(a); + const orgB = originalOrder.get(b); + return orgA - orgB; + }); + } + ); + compilation.hooks.optimizeChunkOrder.tap( + "OccurrenceOrderPlugin", + chunks => { + const occursInInitialChunksMap = new Map(); + const originalOrder = new Map(); + + let i = 0; + for (const c of chunks) { + let occurs = 0; + for (const chunkGroup of c.groupsIterable) { + for (const parent of chunkGroup.parentsIterable) { + if (parent.isInitial()) occurs++; + } + } + occursInInitialChunksMap.set(c, occurs); + originalOrder.set(c, i++); + } + + chunks.sort((a, b) => { + const aEntryOccurs = occursInInitialChunksMap.get(a); + const bEntryOccurs = occursInInitialChunksMap.get(b); + if (aEntryOccurs > bEntryOccurs) return -1; + if (aEntryOccurs < bEntryOccurs) return 1; + const aOccurs = a.getNumberOfGroups(); + const bOccurs = b.getNumberOfGroups(); + if (aOccurs > bOccurs) return -1; + if (aOccurs < bOccurs) return 1; + const orgA = originalOrder.get(a); + const orgB = originalOrder.get(b); + return orgA - orgB; + }); + } + ); + }); + } +} + +module.exports = OccurrenceOrderPlugin; + + +/***/ }), + +/***/ 78085: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class RemoveEmptyChunksPlugin { + apply(compiler) { + compiler.hooks.compilation.tap("RemoveEmptyChunksPlugin", compilation => { + const handler = chunks => { + for (let i = chunks.length - 1; i >= 0; i--) { + const chunk = chunks[i]; + if ( + chunk.isEmpty() && + !chunk.hasRuntime() && + !chunk.hasEntryModule() + ) { + chunk.remove("empty"); + chunks.splice(i, 1); + } + } + }; + compilation.hooks.optimizeChunksBasic.tap( + "RemoveEmptyChunksPlugin", + handler + ); + compilation.hooks.optimizeChunksAdvanced.tap( + "RemoveEmptyChunksPlugin", + handler + ); + compilation.hooks.optimizeExtractedChunksBasic.tap( + "RemoveEmptyChunksPlugin", + handler + ); + compilation.hooks.optimizeExtractedChunksAdvanced.tap( + "RemoveEmptyChunksPlugin", + handler + ); + }); + } +} +module.exports = RemoveEmptyChunksPlugin; + + +/***/ }), + +/***/ 58142: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Queue = __webpack_require__(38637); +const { intersect } = __webpack_require__(54262); + +const getParentChunksWithModule = (currentChunk, module) => { + const chunks = []; + const stack = new Set(currentChunk.parentsIterable); + + for (const chunk of stack) { + if (chunk.containsModule(module)) { + chunks.push(chunk); + } else { + for (const parent of chunk.parentsIterable) { + stack.add(parent); + } + } + } + + return chunks; +}; + +class RemoveParentModulesPlugin { + apply(compiler) { + compiler.hooks.compilation.tap("RemoveParentModulesPlugin", compilation => { + const handler = (chunks, chunkGroups) => { + const queue = new Queue(); + const availableModulesMap = new WeakMap(); + + for (const chunkGroup of compilation.entrypoints.values()) { + // initialize available modules for chunks without parents + availableModulesMap.set(chunkGroup, new Set()); + for (const child of chunkGroup.childrenIterable) { + queue.enqueue(child); + } + } + + while (queue.length > 0) { + const chunkGroup = queue.dequeue(); + let availableModules = availableModulesMap.get(chunkGroup); + let changed = false; + for (const parent of chunkGroup.parentsIterable) { + const availableModulesInParent = availableModulesMap.get(parent); + if (availableModulesInParent !== undefined) { + // If we know the available modules in parent: process these + if (availableModules === undefined) { + // if we have not own info yet: create new entry + availableModules = new Set(availableModulesInParent); + for (const chunk of parent.chunks) { + for (const m of chunk.modulesIterable) { + availableModules.add(m); + } + } + availableModulesMap.set(chunkGroup, availableModules); + changed = true; + } else { + for (const m of availableModules) { + if ( + !parent.containsModule(m) && + !availableModulesInParent.has(m) + ) { + availableModules.delete(m); + changed = true; + } + } + } + } + } + if (changed) { + // if something changed: enqueue our children + for (const child of chunkGroup.childrenIterable) { + queue.enqueue(child); + } + } + } + + // now we have available modules for every chunk + for (const chunk of chunks) { + const availableModulesSets = Array.from( + chunk.groupsIterable, + chunkGroup => availableModulesMap.get(chunkGroup) + ); + if (availableModulesSets.some(s => s === undefined)) continue; // No info about this chunk group + const availableModules = + availableModulesSets.length === 1 + ? availableModulesSets[0] + : intersect(availableModulesSets); + const numberOfModules = chunk.getNumberOfModules(); + const toRemove = new Set(); + if (numberOfModules < availableModules.size) { + for (const m of chunk.modulesIterable) { + if (availableModules.has(m)) { + toRemove.add(m); + } + } + } else { + for (const m of availableModules) { + if (chunk.containsModule(m)) { + toRemove.add(m); + } + } + } + for (const module of toRemove) { + module.rewriteChunkInReasons( + chunk, + getParentChunksWithModule(chunk, module) + ); + chunk.removeModule(module); + } + } + }; + compilation.hooks.optimizeChunksBasic.tap( + "RemoveParentModulesPlugin", + handler + ); + compilation.hooks.optimizeExtractedChunksBasic.tap( + "RemoveParentModulesPlugin", + handler + ); + }); + } +} +module.exports = RemoveParentModulesPlugin; + + +/***/ }), + +/***/ 76894: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +module.exports = class RuntimeChunkPlugin { + constructor(options) { + this.options = Object.assign( + { + name: entrypoint => `runtime~${entrypoint.name}` + }, + options + ); + } + + apply(compiler) { + compiler.hooks.thisCompilation.tap("RuntimeChunkPlugin", compilation => { + compilation.hooks.optimizeChunksAdvanced.tap("RuntimeChunkPlugin", () => { + for (const entrypoint of compilation.entrypoints.values()) { + const chunk = entrypoint.getRuntimeChunk(); + let name = this.options.name; + if (typeof name === "function") { + name = name(entrypoint); + } + if ( + chunk.getNumberOfModules() > 0 || + !chunk.preventIntegration || + chunk.name !== name + ) { + const newChunk = compilation.addChunk(name); + newChunk.preventIntegration = true; + entrypoint.unshiftChunk(newChunk); + newChunk.addGroup(entrypoint); + entrypoint.setRuntimeChunk(newChunk); + } + } + }); + }); + } +}; + + +/***/ }), + +/***/ 83654: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const mm = __webpack_require__(53024); +const HarmonyExportImportedSpecifierDependency = __webpack_require__(22864); +const HarmonyImportSideEffectDependency = __webpack_require__(79171); +const HarmonyImportSpecifierDependency = __webpack_require__(95966); + +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../Dependency")} Dependency */ + +/** + * @typedef {Object} ExportInModule + * @property {Module} module the module + * @property {string} exportName the name of the export + * @property {boolean} checked if the export is conditional + */ + +/** + * @typedef {Object} ReexportInfo + * @property {Map} static + * @property {Map>} dynamic + */ + +/** + * @param {ReexportInfo} info info object + * @param {string} exportName name of export + * @returns {ExportInModule | undefined} static export + */ +const getMappingFromInfo = (info, exportName) => { + const staticMappings = info.static.get(exportName); + if (staticMappings !== undefined) { + if (staticMappings.length === 1) return staticMappings[0]; + return undefined; + } + const dynamicMappings = Array.from(info.dynamic).filter( + ([_, ignored]) => !ignored.has(exportName) + ); + if (dynamicMappings.length === 1) { + return { + module: dynamicMappings[0][0], + exportName, + checked: true + }; + } + return undefined; +}; + +/** + * @param {ReexportInfo} info info object + * @param {string} exportName name of export of source module + * @param {Module} module the target module + * @param {string} innerExportName name of export of target module + * @param {boolean} checked true, if existence of target module is checked + */ +const addStaticReexport = ( + info, + exportName, + module, + innerExportName, + checked +) => { + let mappings = info.static.get(exportName); + if (mappings !== undefined) { + for (const mapping of mappings) { + if (mapping.module === module && mapping.exportName === innerExportName) { + mapping.checked = mapping.checked && checked; + return; + } + } + } else { + mappings = []; + info.static.set(exportName, mappings); + } + mappings.push({ + module, + exportName: innerExportName, + checked + }); +}; + +/** + * @param {ReexportInfo} info info object + * @param {Module} module the reexport module + * @param {Set} ignored ignore list + * @returns {void} + */ +const addDynamicReexport = (info, module, ignored) => { + const existingList = info.dynamic.get(module); + if (existingList !== undefined) { + for (const key of existingList) { + if (!ignored.has(key)) existingList.delete(key); + } + } else { + info.dynamic.set(module, new Set(ignored)); + } +}; + +class SideEffectsFlagPlugin { + apply(compiler) { + compiler.hooks.normalModuleFactory.tap("SideEffectsFlagPlugin", nmf => { + nmf.hooks.module.tap("SideEffectsFlagPlugin", (module, data) => { + const resolveData = data.resourceResolveData; + if ( + resolveData && + resolveData.descriptionFileData && + resolveData.relativePath + ) { + const sideEffects = resolveData.descriptionFileData.sideEffects; + const hasSideEffects = SideEffectsFlagPlugin.moduleHasSideEffects( + resolveData.relativePath, + sideEffects + ); + if (!hasSideEffects) { + module.factoryMeta.sideEffectFree = true; + } + } + + return module; + }); + nmf.hooks.module.tap("SideEffectsFlagPlugin", (module, data) => { + if (data.settings.sideEffects === false) { + module.factoryMeta.sideEffectFree = true; + } else if (data.settings.sideEffects === true) { + module.factoryMeta.sideEffectFree = false; + } + }); + }); + compiler.hooks.compilation.tap("SideEffectsFlagPlugin", compilation => { + compilation.hooks.optimizeDependencies.tap( + "SideEffectsFlagPlugin", + modules => { + /** @type {Map} */ + const reexportMaps = new Map(); + + // Capture reexports of sideEffectFree modules + for (const module of modules) { + /** @type {Dependency[]} */ + const removeDependencies = []; + for (const dep of module.dependencies) { + if (dep instanceof HarmonyImportSideEffectDependency) { + if (dep.module && dep.module.factoryMeta.sideEffectFree) { + removeDependencies.push(dep); + } + } else if ( + dep instanceof HarmonyExportImportedSpecifierDependency + ) { + if (module.factoryMeta.sideEffectFree) { + const mode = dep.getMode(true); + if ( + mode.type === "safe-reexport" || + mode.type === "checked-reexport" || + mode.type === "dynamic-reexport" || + mode.type === "reexport-non-harmony-default" || + mode.type === "reexport-non-harmony-default-strict" || + mode.type === "reexport-named-default" + ) { + let info = reexportMaps.get(module); + if (!info) { + reexportMaps.set( + module, + (info = { + static: new Map(), + dynamic: new Map() + }) + ); + } + const targetModule = dep._module; + switch (mode.type) { + case "safe-reexport": + for (const [key, id] of mode.map) { + if (id) { + addStaticReexport( + info, + key, + targetModule, + id, + false + ); + } + } + break; + case "checked-reexport": + for (const [key, id] of mode.map) { + if (id) { + addStaticReexport( + info, + key, + targetModule, + id, + true + ); + } + } + break; + case "dynamic-reexport": + addDynamicReexport(info, targetModule, mode.ignored); + break; + case "reexport-non-harmony-default": + case "reexport-non-harmony-default-strict": + case "reexport-named-default": + addStaticReexport( + info, + mode.name, + targetModule, + "default", + false + ); + break; + } + } + } + } + } + } + + // Flatten reexports + for (const info of reexportMaps.values()) { + const dynamicReexports = info.dynamic; + info.dynamic = new Map(); + for (const reexport of dynamicReexports) { + let [targetModule, ignored] = reexport; + for (;;) { + const innerInfo = reexportMaps.get(targetModule); + if (!innerInfo) break; + + for (const [key, reexports] of innerInfo.static) { + if (ignored.has(key)) continue; + for (const { module, exportName, checked } of reexports) { + addStaticReexport(info, key, module, exportName, checked); + } + } + + // Follow dynamic reexport if there is only one + if (innerInfo.dynamic.size !== 1) { + // When there are more then one, we don't know which one + break; + } + + ignored = new Set(ignored); + for (const [innerModule, innerIgnored] of innerInfo.dynamic) { + for (const key of innerIgnored) { + if (ignored.has(key)) continue; + // This reexports ends here + addStaticReexport(info, key, targetModule, key, true); + ignored.add(key); + } + targetModule = innerModule; + } + } + + // Update reexport as all other cases has been handled + addDynamicReexport(info, targetModule, ignored); + } + } + + for (const info of reexportMaps.values()) { + const staticReexports = info.static; + info.static = new Map(); + for (const [key, reexports] of staticReexports) { + for (let mapping of reexports) { + for (;;) { + const innerInfo = reexportMaps.get(mapping.module); + if (!innerInfo) break; + + const newMapping = getMappingFromInfo( + innerInfo, + mapping.exportName + ); + if (!newMapping) break; + mapping = newMapping; + } + addStaticReexport( + info, + key, + mapping.module, + mapping.exportName, + mapping.checked + ); + } + } + } + + // Update imports along the reexports from sideEffectFree modules + for (const pair of reexportMaps) { + const module = pair[0]; + const info = pair[1]; + let newReasons = undefined; + for (let i = 0; i < module.reasons.length; i++) { + const reason = module.reasons[i]; + const dep = reason.dependency; + if ( + (dep instanceof HarmonyExportImportedSpecifierDependency || + (dep instanceof HarmonyImportSpecifierDependency && + !dep.namespaceObjectAsContext)) && + dep._id + ) { + const mapping = getMappingFromInfo(info, dep._id); + if (mapping) { + dep.redirectedModule = mapping.module; + dep.redirectedId = mapping.exportName; + mapping.module.addReason( + reason.module, + dep, + reason.explanation + ? reason.explanation + + " (skipped side-effect-free modules)" + : "(skipped side-effect-free modules)" + ); + // removing the currect reason, by not adding it to the newReasons array + // lazily create the newReasons array + if (newReasons === undefined) { + newReasons = i === 0 ? [] : module.reasons.slice(0, i); + } + continue; + } + } + if (newReasons !== undefined) newReasons.push(reason); + } + if (newReasons !== undefined) { + module.reasons = newReasons; + } + } + } + ); + }); + } + + static moduleHasSideEffects(moduleName, flagValue) { + switch (typeof flagValue) { + case "undefined": + return true; + case "boolean": + return flagValue; + case "string": + if (process.platform === "win32") { + flagValue = flagValue.replace(/\\/g, "/"); + } + return mm.isMatch(moduleName, flagValue, { + matchBase: true + }); + case "object": + return flagValue.some(glob => + SideEffectsFlagPlugin.moduleHasSideEffects(moduleName, glob) + ); + } + } +} +module.exports = SideEffectsFlagPlugin; + + +/***/ }), + +/***/ 60474: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const crypto = __webpack_require__(76417); +const SortableSet = __webpack_require__(50071); +const GraphHelpers = __webpack_require__(32973); +const { isSubset } = __webpack_require__(54262); +const deterministicGrouping = __webpack_require__(30815); +const MinMaxSizeWarning = __webpack_require__(25472); +const contextify = __webpack_require__(94658).contextify; + +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../util/deterministicGrouping").Options} DeterministicGroupingOptionsForModule */ +/** @typedef {import("../util/deterministicGrouping").GroupedItems} DeterministicGroupingGroupedItemsForModule */ + +const deterministicGroupingForModules = /** @type {function(DeterministicGroupingOptionsForModule): DeterministicGroupingGroupedItemsForModule[]} */ (deterministicGrouping); + +const hashFilename = name => { + return crypto + .createHash("md4") + .update(name) + .digest("hex") + .slice(0, 8); +}; + +const sortByIdentifier = (a, b) => { + if (a.identifier() > b.identifier()) return 1; + if (a.identifier() < b.identifier()) return -1; + return 0; +}; + +const getRequests = chunk => { + let requests = 0; + for (const chunkGroup of chunk.groupsIterable) { + requests = Math.max(requests, chunkGroup.chunks.length); + } + return requests; +}; + +const getModulesSize = modules => { + let sum = 0; + for (const m of modules) { + sum += m.size(); + } + return sum; +}; + +/** + * @template T + * @param {Set} a set + * @param {Set} b other set + * @returns {boolean} true if at least one item of a is in b + */ +const isOverlap = (a, b) => { + for (const item of a) { + if (b.has(item)) return true; + } + return false; +}; + +const compareEntries = (a, b) => { + // 1. by priority + const diffPriority = a.cacheGroup.priority - b.cacheGroup.priority; + if (diffPriority) return diffPriority; + // 2. by number of chunks + const diffCount = a.chunks.size - b.chunks.size; + if (diffCount) return diffCount; + // 3. by size reduction + const aSizeReduce = a.size * (a.chunks.size - 1); + const bSizeReduce = b.size * (b.chunks.size - 1); + const diffSizeReduce = aSizeReduce - bSizeReduce; + if (diffSizeReduce) return diffSizeReduce; + // 4. by cache group index + const indexDiff = a.cacheGroupIndex - b.cacheGroupIndex; + if (indexDiff) return indexDiff; + // 5. by number of modules (to be able to compare by identifier) + const modulesA = a.modules; + const modulesB = b.modules; + const diff = modulesA.size - modulesB.size; + if (diff) return diff; + // 6. by module identifiers + modulesA.sort(); + modulesB.sort(); + const aI = modulesA[Symbol.iterator](); + const bI = modulesB[Symbol.iterator](); + // eslint-disable-next-line no-constant-condition + while (true) { + const aItem = aI.next(); + const bItem = bI.next(); + if (aItem.done) return 0; + const aModuleIdentifier = aItem.value.identifier(); + const bModuleIdentifier = bItem.value.identifier(); + if (aModuleIdentifier > bModuleIdentifier) return -1; + if (aModuleIdentifier < bModuleIdentifier) return 1; + } +}; + +const compareNumbers = (a, b) => a - b; + +const INITIAL_CHUNK_FILTER = chunk => chunk.canBeInitial(); +const ASYNC_CHUNK_FILTER = chunk => !chunk.canBeInitial(); +const ALL_CHUNK_FILTER = chunk => true; + +module.exports = class SplitChunksPlugin { + constructor(options) { + this.options = SplitChunksPlugin.normalizeOptions(options); + } + + static normalizeOptions(options = {}) { + return { + chunksFilter: SplitChunksPlugin.normalizeChunksFilter( + options.chunks || "all" + ), + minSize: options.minSize || 0, + enforceSizeThreshold: options.enforceSizeThreshold || 0, + maxSize: options.maxSize || 0, + minChunks: options.minChunks || 1, + maxAsyncRequests: options.maxAsyncRequests || 1, + maxInitialRequests: options.maxInitialRequests || 1, + hidePathInfo: options.hidePathInfo || false, + filename: options.filename || undefined, + getCacheGroups: SplitChunksPlugin.normalizeCacheGroups({ + cacheGroups: options.cacheGroups, + name: options.name, + automaticNameDelimiter: options.automaticNameDelimiter, + automaticNameMaxLength: options.automaticNameMaxLength + }), + automaticNameDelimiter: options.automaticNameDelimiter, + automaticNameMaxLength: options.automaticNameMaxLength || 109, + fallbackCacheGroup: SplitChunksPlugin.normalizeFallbackCacheGroup( + options.fallbackCacheGroup || {}, + options + ) + }; + } + + static normalizeName({ + name, + automaticNameDelimiter, + automaticNamePrefix, + automaticNameMaxLength + }) { + if (name === true) { + /** @type {WeakMap>} */ + const cache = new WeakMap(); + const fn = (module, chunks, cacheGroup) => { + let cacheEntry = cache.get(chunks); + if (cacheEntry === undefined) { + cacheEntry = {}; + cache.set(chunks, cacheEntry); + } else if (cacheGroup in cacheEntry) { + return cacheEntry[cacheGroup]; + } + const names = chunks.map(c => c.name); + if (!names.every(Boolean)) { + cacheEntry[cacheGroup] = undefined; + return; + } + names.sort(); + const prefix = + typeof automaticNamePrefix === "string" + ? automaticNamePrefix + : cacheGroup; + const namePrefix = prefix ? prefix + automaticNameDelimiter : ""; + let name = namePrefix + names.join(automaticNameDelimiter); + // Filenames and paths can't be too long otherwise an + // ENAMETOOLONG error is raised. If the generated name if too + // long, it is truncated and a hash is appended. The limit has + // been set to 109 to prevent `[name].[chunkhash].[ext]` from + // generating a 256+ character string. + if (name.length > automaticNameMaxLength) { + const hashedFilename = hashFilename(name); + const sliceLength = + automaticNameMaxLength - + (automaticNameDelimiter.length + hashedFilename.length); + name = + name.slice(0, sliceLength) + + automaticNameDelimiter + + hashedFilename; + } + cacheEntry[cacheGroup] = name; + return name; + }; + return fn; + } + if (typeof name === "string") { + const fn = () => { + return name; + }; + return fn; + } + if (typeof name === "function") return name; + } + + static normalizeChunksFilter(chunks) { + if (chunks === "initial") { + return INITIAL_CHUNK_FILTER; + } + if (chunks === "async") { + return ASYNC_CHUNK_FILTER; + } + if (chunks === "all") { + return ALL_CHUNK_FILTER; + } + if (typeof chunks === "function") return chunks; + } + + static normalizeFallbackCacheGroup( + { + minSize = undefined, + maxSize = undefined, + automaticNameDelimiter = undefined + }, + { + minSize: defaultMinSize = undefined, + maxSize: defaultMaxSize = undefined, + automaticNameDelimiter: defaultAutomaticNameDelimiter = undefined + } + ) { + return { + minSize: typeof minSize === "number" ? minSize : defaultMinSize || 0, + maxSize: typeof maxSize === "number" ? maxSize : defaultMaxSize || 0, + automaticNameDelimiter: + automaticNameDelimiter || defaultAutomaticNameDelimiter || "~" + }; + } + + static normalizeCacheGroups({ + cacheGroups, + name, + automaticNameDelimiter, + automaticNameMaxLength + }) { + if (typeof cacheGroups === "function") { + // TODO webpack 5 remove this + if (cacheGroups.length !== 1) { + return module => cacheGroups(module, module.getChunks()); + } + return cacheGroups; + } + if (cacheGroups && typeof cacheGroups === "object") { + const fn = module => { + let results; + for (const key of Object.keys(cacheGroups)) { + let option = cacheGroups[key]; + if (option === false) continue; + if (option instanceof RegExp || typeof option === "string") { + option = { + test: option + }; + } + if (typeof option === "function") { + let result = option(module); + if (result) { + if (results === undefined) results = []; + for (const r of Array.isArray(result) ? result : [result]) { + const result = Object.assign({ key }, r); + if (result.name) result.getName = () => result.name; + if (result.chunks) { + result.chunksFilter = SplitChunksPlugin.normalizeChunksFilter( + result.chunks + ); + } + results.push(result); + } + } + } else if (SplitChunksPlugin.checkTest(option.test, module)) { + if (results === undefined) results = []; + results.push({ + key: key, + priority: option.priority, + getName: + SplitChunksPlugin.normalizeName({ + name: option.name || name, + automaticNameDelimiter: + typeof option.automaticNameDelimiter === "string" + ? option.automaticNameDelimiter + : automaticNameDelimiter, + automaticNamePrefix: option.automaticNamePrefix, + automaticNameMaxLength: + option.automaticNameMaxLength || automaticNameMaxLength + }) || (() => {}), + chunksFilter: SplitChunksPlugin.normalizeChunksFilter( + option.chunks + ), + enforce: option.enforce, + minSize: option.minSize, + enforceSizeThreshold: option.enforceSizeThreshold, + maxSize: option.maxSize, + minChunks: option.minChunks, + maxAsyncRequests: option.maxAsyncRequests, + maxInitialRequests: option.maxInitialRequests, + filename: option.filename, + reuseExistingChunk: option.reuseExistingChunk + }); + } + } + return results; + }; + return fn; + } + const fn = () => {}; + return fn; + } + + static checkTest(test, module) { + if (test === undefined) return true; + if (typeof test === "function") { + if (test.length !== 1) { + return test(module, module.getChunks()); + } + return test(module); + } + if (typeof test === "boolean") return test; + if (typeof test === "string") { + if ( + module.nameForCondition && + module.nameForCondition().startsWith(test) + ) { + return true; + } + for (const chunk of module.chunksIterable) { + if (chunk.name && chunk.name.startsWith(test)) { + return true; + } + } + return false; + } + if (test instanceof RegExp) { + if (module.nameForCondition && test.test(module.nameForCondition())) { + return true; + } + for (const chunk of module.chunksIterable) { + if (chunk.name && test.test(chunk.name)) { + return true; + } + } + return false; + } + return false; + } + + /** + * @param {Compiler} compiler webpack compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap("SplitChunksPlugin", compilation => { + let alreadyOptimized = false; + compilation.hooks.unseal.tap("SplitChunksPlugin", () => { + alreadyOptimized = false; + }); + compilation.hooks.optimizeChunksAdvanced.tap( + "SplitChunksPlugin", + chunks => { + if (alreadyOptimized) return; + alreadyOptimized = true; + // Give each selected chunk an index (to create strings from chunks) + const indexMap = new Map(); + let index = 1; + for (const chunk of chunks) { + indexMap.set(chunk, index++); + } + const getKey = chunks => { + return Array.from(chunks, c => indexMap.get(c)) + .sort(compareNumbers) + .join(); + }; + /** @type {Map>} */ + const chunkSetsInGraph = new Map(); + for (const module of compilation.modules) { + const chunksKey = getKey(module.chunksIterable); + if (!chunkSetsInGraph.has(chunksKey)) { + chunkSetsInGraph.set(chunksKey, new Set(module.chunksIterable)); + } + } + + // group these set of chunks by count + // to allow to check less sets via isSubset + // (only smaller sets can be subset) + /** @type {Map>>} */ + const chunkSetsByCount = new Map(); + for (const chunksSet of chunkSetsInGraph.values()) { + const count = chunksSet.size; + let array = chunkSetsByCount.get(count); + if (array === undefined) { + array = []; + chunkSetsByCount.set(count, array); + } + array.push(chunksSet); + } + + // Create a list of possible combinations + const combinationsCache = new Map(); // Map[]> + + const getCombinations = key => { + const chunksSet = chunkSetsInGraph.get(key); + var array = [chunksSet]; + if (chunksSet.size > 1) { + for (const [count, setArray] of chunkSetsByCount) { + // "equal" is not needed because they would have been merge in the first step + if (count < chunksSet.size) { + for (const set of setArray) { + if (isSubset(chunksSet, set)) { + array.push(set); + } + } + } + } + } + return array; + }; + + /** + * @typedef {Object} SelectedChunksResult + * @property {Chunk[]} chunks the list of chunks + * @property {string} key a key of the list + */ + + /** + * @typedef {function(Chunk): boolean} ChunkFilterFunction + */ + + /** @type {WeakMap, WeakMap>} */ + const selectedChunksCacheByChunksSet = new WeakMap(); + + /** + * get list and key by applying the filter function to the list + * It is cached for performance reasons + * @param {Set} chunks list of chunks + * @param {ChunkFilterFunction} chunkFilter filter function for chunks + * @returns {SelectedChunksResult} list and key + */ + const getSelectedChunks = (chunks, chunkFilter) => { + let entry = selectedChunksCacheByChunksSet.get(chunks); + if (entry === undefined) { + entry = new WeakMap(); + selectedChunksCacheByChunksSet.set(chunks, entry); + } + /** @type {SelectedChunksResult} */ + let entry2 = entry.get(chunkFilter); + if (entry2 === undefined) { + /** @type {Chunk[]} */ + const selectedChunks = []; + for (const chunk of chunks) { + if (chunkFilter(chunk)) selectedChunks.push(chunk); + } + entry2 = { + chunks: selectedChunks, + key: getKey(selectedChunks) + }; + entry.set(chunkFilter, entry2); + } + return entry2; + }; + + /** + * @typedef {Object} ChunksInfoItem + * @property {SortableSet} modules + * @property {TODO} cacheGroup + * @property {number} cacheGroupIndex + * @property {string} name + * @property {number} size + * @property {Set} chunks + * @property {Set} reuseableChunks + * @property {Set} chunksKeys + */ + + // Map a list of chunks to a list of modules + // For the key the chunk "index" is used, the value is a SortableSet of modules + /** @type {Map} */ + const chunksInfoMap = new Map(); + + /** + * @param {TODO} cacheGroup the current cache group + * @param {number} cacheGroupIndex the index of the cache group of ordering + * @param {Chunk[]} selectedChunks chunks selected for this module + * @param {string} selectedChunksKey a key of selectedChunks + * @param {Module} module the current module + * @returns {void} + */ + const addModuleToChunksInfoMap = ( + cacheGroup, + cacheGroupIndex, + selectedChunks, + selectedChunksKey, + module + ) => { + // Break if minimum number of chunks is not reached + if (selectedChunks.length < cacheGroup.minChunks) return; + // Determine name for split chunk + const name = cacheGroup.getName( + module, + selectedChunks, + cacheGroup.key + ); + // Create key for maps + // When it has a name we use the name as key + // Elsewise we create the key from chunks and cache group key + // This automatically merges equal names + const key = + cacheGroup.key + + (name ? ` name:${name}` : ` chunks:${selectedChunksKey}`); + // Add module to maps + let info = chunksInfoMap.get(key); + if (info === undefined) { + chunksInfoMap.set( + key, + (info = { + modules: new SortableSet(undefined, sortByIdentifier), + cacheGroup, + cacheGroupIndex, + name, + size: 0, + chunks: new Set(), + reuseableChunks: new Set(), + chunksKeys: new Set() + }) + ); + } + info.modules.add(module); + info.size += module.size(); + if (!info.chunksKeys.has(selectedChunksKey)) { + info.chunksKeys.add(selectedChunksKey); + for (const chunk of selectedChunks) { + info.chunks.add(chunk); + } + } + }; + + // Walk through all modules + for (const module of compilation.modules) { + // Get cache group + let cacheGroups = this.options.getCacheGroups(module); + if (!Array.isArray(cacheGroups) || cacheGroups.length === 0) { + continue; + } + + // Prepare some values + const chunksKey = getKey(module.chunksIterable); + let combs = combinationsCache.get(chunksKey); + if (combs === undefined) { + combs = getCombinations(chunksKey); + combinationsCache.set(chunksKey, combs); + } + + let cacheGroupIndex = 0; + for (const cacheGroupSource of cacheGroups) { + const minSize = + cacheGroupSource.minSize !== undefined + ? cacheGroupSource.minSize + : cacheGroupSource.enforce + ? 0 + : this.options.minSize; + const enforceSizeThreshold = + cacheGroupSource.enforceSizeThreshold !== undefined + ? cacheGroupSource.enforceSizeThreshold + : cacheGroupSource.enforce + ? 0 + : this.options.enforceSizeThreshold; + const cacheGroup = { + key: cacheGroupSource.key, + priority: cacheGroupSource.priority || 0, + chunksFilter: + cacheGroupSource.chunksFilter || this.options.chunksFilter, + minSize, + minSizeForMaxSize: + cacheGroupSource.minSize !== undefined + ? cacheGroupSource.minSize + : this.options.minSize, + enforceSizeThreshold, + maxSize: + cacheGroupSource.maxSize !== undefined + ? cacheGroupSource.maxSize + : cacheGroupSource.enforce + ? 0 + : this.options.maxSize, + minChunks: + cacheGroupSource.minChunks !== undefined + ? cacheGroupSource.minChunks + : cacheGroupSource.enforce + ? 1 + : this.options.minChunks, + maxAsyncRequests: + cacheGroupSource.maxAsyncRequests !== undefined + ? cacheGroupSource.maxAsyncRequests + : cacheGroupSource.enforce + ? Infinity + : this.options.maxAsyncRequests, + maxInitialRequests: + cacheGroupSource.maxInitialRequests !== undefined + ? cacheGroupSource.maxInitialRequests + : cacheGroupSource.enforce + ? Infinity + : this.options.maxInitialRequests, + getName: + cacheGroupSource.getName !== undefined + ? cacheGroupSource.getName + : this.options.getName, + filename: + cacheGroupSource.filename !== undefined + ? cacheGroupSource.filename + : this.options.filename, + automaticNameDelimiter: + cacheGroupSource.automaticNameDelimiter !== undefined + ? cacheGroupSource.automaticNameDelimiter + : this.options.automaticNameDelimiter, + reuseExistingChunk: cacheGroupSource.reuseExistingChunk, + _validateSize: minSize > 0, + _conditionalEnforce: enforceSizeThreshold > 0 + }; + // For all combination of chunk selection + for (const chunkCombination of combs) { + // Break if minimum number of chunks is not reached + if (chunkCombination.size < cacheGroup.minChunks) continue; + // Select chunks by configuration + const { + chunks: selectedChunks, + key: selectedChunksKey + } = getSelectedChunks( + chunkCombination, + cacheGroup.chunksFilter + ); + + addModuleToChunksInfoMap( + cacheGroup, + cacheGroupIndex, + selectedChunks, + selectedChunksKey, + module + ); + } + cacheGroupIndex++; + } + } + + // Filter items were size < minSize + for (const pair of chunksInfoMap) { + const info = pair[1]; + if ( + info.cacheGroup._validateSize && + info.size < info.cacheGroup.minSize + ) { + chunksInfoMap.delete(pair[0]); + } + } + + /** @type {Map} */ + const maxSizeQueueMap = new Map(); + + while (chunksInfoMap.size > 0) { + // Find best matching entry + let bestEntryKey; + let bestEntry; + for (const pair of chunksInfoMap) { + const key = pair[0]; + const info = pair[1]; + if (bestEntry === undefined) { + bestEntry = info; + bestEntryKey = key; + } else if (compareEntries(bestEntry, info) < 0) { + bestEntry = info; + bestEntryKey = key; + } + } + + const item = bestEntry; + chunksInfoMap.delete(bestEntryKey); + + let chunkName = item.name; + // Variable for the new chunk (lazy created) + /** @type {Chunk} */ + let newChunk; + // When no chunk name, check if we can reuse a chunk instead of creating a new one + let isReused = false; + if (item.cacheGroup.reuseExistingChunk) { + outer: for (const chunk of item.chunks) { + if (chunk.getNumberOfModules() !== item.modules.size) continue; + if (chunk.hasEntryModule()) continue; + for (const module of item.modules) { + if (!chunk.containsModule(module)) continue outer; + } + if (!newChunk || !newChunk.name) { + newChunk = chunk; + } else if ( + chunk.name && + chunk.name.length < newChunk.name.length + ) { + newChunk = chunk; + } else if ( + chunk.name && + chunk.name.length === newChunk.name.length && + chunk.name < newChunk.name + ) { + newChunk = chunk; + } + chunkName = undefined; + isReused = true; + } + } + // Check if maxRequests condition can be fulfilled + + const selectedChunks = Array.from(item.chunks).filter(chunk => { + // skip if we address ourself + return ( + (!chunkName || chunk.name !== chunkName) && chunk !== newChunk + ); + }); + + const enforced = + item.cacheGroup._conditionalEnforce && + item.size >= item.cacheGroup.enforceSizeThreshold; + + // Skip when no chunk selected + if (selectedChunks.length === 0) continue; + + const usedChunks = new Set(selectedChunks); + + // Check if maxRequests condition can be fulfilled + if ( + !enforced && + (Number.isFinite(item.cacheGroup.maxInitialRequests) || + Number.isFinite(item.cacheGroup.maxAsyncRequests)) + ) { + for (const chunk of usedChunks) { + // respect max requests + const maxRequests = chunk.isOnlyInitial() + ? item.cacheGroup.maxInitialRequests + : chunk.canBeInitial() + ? Math.min( + item.cacheGroup.maxInitialRequests, + item.cacheGroup.maxAsyncRequests + ) + : item.cacheGroup.maxAsyncRequests; + if ( + isFinite(maxRequests) && + getRequests(chunk) >= maxRequests + ) { + usedChunks.delete(chunk); + } + } + } + + outer: for (const chunk of usedChunks) { + for (const module of item.modules) { + if (chunk.containsModule(module)) continue outer; + } + usedChunks.delete(chunk); + } + + // Were some (invalid) chunks removed from usedChunks? + // => readd all modules to the queue, as things could have been changed + if (usedChunks.size < selectedChunks.length) { + if (usedChunks.size >= item.cacheGroup.minChunks) { + const chunksArr = Array.from(usedChunks); + for (const module of item.modules) { + addModuleToChunksInfoMap( + item.cacheGroup, + item.cacheGroupIndex, + chunksArr, + getKey(usedChunks), + module + ); + } + } + continue; + } + + // Create the new chunk if not reusing one + if (!isReused) { + newChunk = compilation.addChunk(chunkName); + } + // Walk through all chunks + for (const chunk of usedChunks) { + // Add graph connections for splitted chunk + chunk.split(newChunk); + } + + // Add a note to the chunk + newChunk.chunkReason = isReused + ? "reused as split chunk" + : "split chunk"; + if (item.cacheGroup.key) { + newChunk.chunkReason += ` (cache group: ${item.cacheGroup.key})`; + } + if (chunkName) { + newChunk.chunkReason += ` (name: ${chunkName})`; + // If the chosen name is already an entry point we remove the entry point + const entrypoint = compilation.entrypoints.get(chunkName); + if (entrypoint) { + compilation.entrypoints.delete(chunkName); + entrypoint.remove(); + newChunk.entryModule = undefined; + } + } + if (item.cacheGroup.filename) { + if (!newChunk.isOnlyInitial()) { + throw new Error( + "SplitChunksPlugin: You are trying to set a filename for a chunk which is (also) loaded on demand. " + + "The runtime can only handle loading of chunks which match the chunkFilename schema. " + + "Using a custom filename would fail at runtime. " + + `(cache group: ${item.cacheGroup.key})` + ); + } + newChunk.filenameTemplate = item.cacheGroup.filename; + } + if (!isReused) { + // Add all modules to the new chunk + for (const module of item.modules) { + if (typeof module.chunkCondition === "function") { + if (!module.chunkCondition(newChunk)) continue; + } + // Add module to new chunk + GraphHelpers.connectChunkAndModule(newChunk, module); + // Remove module from used chunks + for (const chunk of usedChunks) { + chunk.removeModule(module); + module.rewriteChunkInReasons(chunk, [newChunk]); + } + } + } else { + // Remove all modules from used chunks + for (const module of item.modules) { + for (const chunk of usedChunks) { + chunk.removeModule(module); + module.rewriteChunkInReasons(chunk, [newChunk]); + } + } + } + + if (item.cacheGroup.maxSize > 0) { + const oldMaxSizeSettings = maxSizeQueueMap.get(newChunk); + maxSizeQueueMap.set(newChunk, { + minSize: Math.max( + oldMaxSizeSettings ? oldMaxSizeSettings.minSize : 0, + item.cacheGroup.minSizeForMaxSize + ), + maxSize: Math.min( + oldMaxSizeSettings ? oldMaxSizeSettings.maxSize : Infinity, + item.cacheGroup.maxSize + ), + automaticNameDelimiter: item.cacheGroup.automaticNameDelimiter, + keys: oldMaxSizeSettings + ? oldMaxSizeSettings.keys.concat(item.cacheGroup.key) + : [item.cacheGroup.key] + }); + } + + // remove all modules from other entries and update size + for (const [key, info] of chunksInfoMap) { + if (isOverlap(info.chunks, usedChunks)) { + // update modules and total size + // may remove it from the map when < minSize + const oldSize = info.modules.size; + for (const module of item.modules) { + info.modules.delete(module); + } + if (info.modules.size !== oldSize) { + if (info.modules.size === 0) { + chunksInfoMap.delete(key); + continue; + } + info.size = getModulesSize(info.modules); + if ( + info.cacheGroup._validateSize && + info.size < info.cacheGroup.minSize + ) { + chunksInfoMap.delete(key); + } + if (info.modules.size === 0) { + chunksInfoMap.delete(key); + } + } + } + } + } + + const incorrectMinMaxSizeSet = new Set(); + + // Make sure that maxSize is fulfilled + for (const chunk of compilation.chunks.slice()) { + const { minSize, maxSize, automaticNameDelimiter, keys } = + maxSizeQueueMap.get(chunk) || this.options.fallbackCacheGroup; + if (!maxSize) continue; + if (minSize > maxSize) { + const warningKey = `${keys && keys.join()} ${minSize} ${maxSize}`; + if (!incorrectMinMaxSizeSet.has(warningKey)) { + incorrectMinMaxSizeSet.add(warningKey); + compilation.warnings.push( + new MinMaxSizeWarning(keys, minSize, maxSize) + ); + } + } + const results = deterministicGroupingForModules({ + maxSize: Math.max(minSize, maxSize), + minSize, + items: chunk.modulesIterable, + getKey(module) { + const ident = contextify( + compilation.options.context, + module.identifier() + ); + const name = module.nameForCondition + ? contextify( + compilation.options.context, + module.nameForCondition() + ) + : ident.replace(/^.*!|\?[^?!]*$/g, ""); + const fullKey = + name + automaticNameDelimiter + hashFilename(ident); + return fullKey.replace(/[\\/?]/g, "_"); + }, + getSize(module) { + return module.size(); + } + }); + results.sort((a, b) => { + if (a.key < b.key) return -1; + if (a.key > b.key) return 1; + return 0; + }); + for (let i = 0; i < results.length; i++) { + const group = results[i]; + const key = this.options.hidePathInfo + ? hashFilename(group.key) + : group.key; + let name = chunk.name + ? chunk.name + automaticNameDelimiter + key + : null; + if (name && name.length > 100) { + name = + name.slice(0, 100) + + automaticNameDelimiter + + hashFilename(name); + } + let newPart; + if (i !== results.length - 1) { + newPart = compilation.addChunk(name); + chunk.split(newPart); + newPart.chunkReason = chunk.chunkReason; + // Add all modules to the new chunk + for (const module of group.items) { + if (typeof module.chunkCondition === "function") { + if (!module.chunkCondition(newPart)) continue; + } + // Add module to new chunk + GraphHelpers.connectChunkAndModule(newPart, module); + // Remove module from used chunks + chunk.removeModule(module); + module.rewriteChunkInReasons(chunk, [newPart]); + } + } else { + // change the chunk to be a part + newPart = chunk; + chunk.name = name; + } + } + } + } + ); + }); + } +}; + + +/***/ }), + +/***/ 89339: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + +const WebpackError = __webpack_require__(97391); +const SizeFormatHelpers = __webpack_require__(12496); + +module.exports = class AssetsOverSizeLimitWarning extends WebpackError { + constructor(assetsOverSizeLimit, assetLimit) { + const assetLists = assetsOverSizeLimit + .map( + asset => + `\n ${asset.name} (${SizeFormatHelpers.formatSize(asset.size)})` + ) + .join(""); + + super(`asset size limit: The following asset(s) exceed the recommended size limit (${SizeFormatHelpers.formatSize( + assetLimit + )}). +This can impact web performance. +Assets: ${assetLists}`); + + this.name = "AssetsOverSizeLimitWarning"; + this.assets = assetsOverSizeLimit; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 41336: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + +const WebpackError = __webpack_require__(97391); +const SizeFormatHelpers = __webpack_require__(12496); + +module.exports = class EntrypointsOverSizeLimitWarning extends WebpackError { + constructor(entrypoints, entrypointLimit) { + const entrypointList = entrypoints + .map( + entrypoint => + `\n ${entrypoint.name} (${SizeFormatHelpers.formatSize( + entrypoint.size + )})\n${entrypoint.files.map(asset => ` ${asset}`).join("\n")}` + ) + .join(""); + super(`entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (${SizeFormatHelpers.formatSize( + entrypointLimit + )}). This can impact web performance. +Entrypoints:${entrypointList}\n`); + + this.name = "EntrypointsOverSizeLimitWarning"; + this.entrypoints = entrypoints; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 53006: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + +const WebpackError = __webpack_require__(97391); + +module.exports = class NoAsyncChunksWarning extends WebpackError { + constructor() { + super( + "webpack performance recommendations: \n" + + "You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.\n" + + "For more info visit https://webpack.js.org/guides/code-splitting/" + ); + + this.name = "NoAsyncChunksWarning"; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 68310: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + +const EntrypointsOverSizeLimitWarning = __webpack_require__(41336); +const AssetsOverSizeLimitWarning = __webpack_require__(89339); +const NoAsyncChunksWarning = __webpack_require__(53006); + +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Entrypoint")} Entrypoint */ + +module.exports = class SizeLimitsPlugin { + constructor(options) { + this.hints = options.hints; + this.maxAssetSize = options.maxAssetSize; + this.maxEntrypointSize = options.maxEntrypointSize; + this.assetFilter = options.assetFilter; + } + + /** + * @param {Compiler} compiler webpack compiler + * @returns {void} + */ + apply(compiler) { + const entrypointSizeLimit = this.maxEntrypointSize; + const assetSizeLimit = this.maxAssetSize; + const hints = this.hints; + const assetFilter = + this.assetFilter || ((name, source, info) => !info.development); + + compiler.hooks.afterEmit.tap("SizeLimitsPlugin", compilation => { + const warnings = []; + + /** + * @param {Entrypoint} entrypoint an entrypoint + * @returns {number} the size of the entrypoint + */ + const getEntrypointSize = entrypoint => + entrypoint.getFiles().reduce((currentSize, file) => { + const asset = compilation.getAsset(file); + if ( + asset && + assetFilter(asset.name, asset.source, asset.info) && + asset.source + ) { + return currentSize + (asset.info.size || asset.source.size()); + } + + return currentSize; + }, 0); + + const assetsOverSizeLimit = []; + for (const { name, source, info } of compilation.getAssets()) { + if (!assetFilter(name, source, info) || !source) { + continue; + } + + const size = info.size || source.size(); + if (size > assetSizeLimit) { + assetsOverSizeLimit.push({ + name, + size + }); + /** @type {any} */ (source).isOverSizeLimit = true; + } + } + + const fileFilter = name => { + const asset = compilation.getAsset(name); + return asset && assetFilter(asset.name, asset.source, asset.info); + }; + + const entrypointsOverLimit = []; + for (const [name, entry] of compilation.entrypoints) { + const size = getEntrypointSize(entry); + + if (size > entrypointSizeLimit) { + entrypointsOverLimit.push({ + name: name, + size: size, + files: entry.getFiles().filter(fileFilter) + }); + /** @type {any} */ (entry).isOverSizeLimit = true; + } + } + + if (hints) { + // 1. Individual Chunk: Size < 250kb + // 2. Collective Initial Chunks [entrypoint] (Each Set?): Size < 250kb + // 3. No Async Chunks + // if !1, then 2, if !2 return + if (assetsOverSizeLimit.length > 0) { + warnings.push( + new AssetsOverSizeLimitWarning(assetsOverSizeLimit, assetSizeLimit) + ); + } + if (entrypointsOverLimit.length > 0) { + warnings.push( + new EntrypointsOverSizeLimitWarning( + entrypointsOverLimit, + entrypointSizeLimit + ) + ); + } + + if (warnings.length > 0) { + const hasAsyncChunks = + compilation.chunks.filter(chunk => !chunk.canBeInitial()).length > + 0; + + if (!hasAsyncChunks) { + warnings.push(new NoAsyncChunksWarning()); + } + + if (hints === "error") { + compilation.errors.push(...warnings); + } else { + compilation.warnings.push(...warnings); + } + } + } + }); + } +}; + + +/***/ }), + +/***/ 52315: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const SortableSet = __webpack_require__(50071); + +/** + * @template T + * @template K + * Multi layer bucket sorted set + * Supports adding non-existing items (DO NOT ADD ITEM TWICE) + * Supports removing exiting items (DO NOT REMOVE ITEM NOT IN SET) + * Supports popping the first items according to defined order + * Supports iterating all items without order + * Supports updating an item in an efficient way + * Supports size property, which is the number of items + * Items are lazy partially sorted when needed + */ +class LazyBucketSortedSet { + /** + * @param {function(T): K} getKey function to get key from item + * @param {function(K, K): number} comparator comparator to sort keys + * @param {...((function(T): any) | (function(any, any): number))} args more pairs of getKey and comparator plus optional final comparator for the last layer + */ + constructor(getKey, comparator, ...args) { + this._getKey = getKey; + this._innerArgs = args; + this._leaf = args.length <= 1; + this._keys = new SortableSet(undefined, comparator); + /** @type {Map | SortableSet>} */ + this._map = new Map(); + this._unsortedItems = new Set(); + this.size = 0; + } + + /** + * @param {T} item an item + * @returns {void} + */ + add(item) { + this.size++; + this._unsortedItems.add(item); + } + + /** + * @param {K} key key of item + * @param {T} item the item + * @returns {void} + */ + _addInternal(key, item) { + let entry = this._map.get(key); + if (entry === undefined) { + entry = this._leaf + ? new SortableSet(undefined, this._innerArgs[0]) + : new /** @type {any} */ (LazyBucketSortedSet)(...this._innerArgs); + this._keys.add(key); + this._map.set(key, entry); + } + entry.add(item); + } + + /** + * @param {T} item an item + * @returns {void} + */ + delete(item) { + this.size--; + if (this._unsortedItems.has(item)) { + this._unsortedItems.delete(item); + return; + } + const key = this._getKey(item); + const entry = this._map.get(key); + entry.delete(item); + if (entry.size === 0) { + this._deleteKey(key); + } + } + + /** + * @param {K} key key to be removed + * @returns {void} + */ + _deleteKey(key) { + this._keys.delete(key); + this._map.delete(key); + } + + /** + * @returns {T | undefined} an item + */ + popFirst() { + if (this.size === 0) return undefined; + this.size--; + if (this._unsortedItems.size > 0) { + for (const item of this._unsortedItems) { + const key = this._getKey(item); + this._addInternal(key, item); + } + this._unsortedItems.clear(); + } + this._keys.sort(); + const key = this._keys.values().next().value; + const entry = this._map.get(key); + if (this._leaf) { + const leafEntry = /** @type {SortableSet} */ (entry); + leafEntry.sort(); + const item = leafEntry.values().next().value; + leafEntry.delete(item); + if (leafEntry.size === 0) { + this._deleteKey(key); + } + return item; + } else { + const nodeEntry = /** @type {LazyBucketSortedSet} */ (entry); + const item = nodeEntry.popFirst(); + if (nodeEntry.size === 0) { + this._deleteKey(key); + } + return item; + } + } + + /** + * @param {T} item to be updated item + * @returns {function(true=): void} finish update + */ + startUpdate(item) { + if (this._unsortedItems.has(item)) { + return remove => { + if (remove) { + this._unsortedItems.delete(item); + this.size--; + return; + } + }; + } + const key = this._getKey(item); + if (this._leaf) { + const oldEntry = /** @type {SortableSet} */ (this._map.get(key)); + return remove => { + if (remove) { + this.size--; + oldEntry.delete(item); + if (oldEntry.size === 0) { + this._deleteKey(key); + } + return; + } + const newKey = this._getKey(item); + if (key === newKey) { + // This flags the sortable set as unordered + oldEntry.add(item); + } else { + oldEntry.delete(item); + if (oldEntry.size === 0) { + this._deleteKey(key); + } + this._addInternal(newKey, item); + } + }; + } else { + const oldEntry = /** @type {LazyBucketSortedSet} */ (this._map.get( + key + )); + const finishUpdate = oldEntry.startUpdate(item); + return remove => { + if (remove) { + this.size--; + finishUpdate(true); + if (oldEntry.size === 0) { + this._deleteKey(key); + } + return; + } + const newKey = this._getKey(item); + if (key === newKey) { + finishUpdate(); + } else { + finishUpdate(true); + if (oldEntry.size === 0) { + this._deleteKey(key); + } + this._addInternal(newKey, item); + } + }; + } + } + + /** + * @param {Iterator[]} iterators list of iterators to append to + * @returns {void} + */ + _appendIterators(iterators) { + if (this._unsortedItems.size > 0) + iterators.push(this._unsortedItems[Symbol.iterator]()); + for (const key of this._keys) { + const entry = this._map.get(key); + if (this._leaf) { + const leafEntry = /** @type {SortableSet} */ (entry); + const iterator = leafEntry[Symbol.iterator](); + iterators.push(iterator); + } else { + const nodeEntry = /** @type {LazyBucketSortedSet} */ (entry); + nodeEntry._appendIterators(iterators); + } + } + } + + /** + * @returns {Iterator} the iterator + */ + [Symbol.iterator]() { + const iterators = []; + this._appendIterators(iterators); + iterators.reverse(); + let currentIterator = iterators.pop(); + return { + next: () => { + const res = currentIterator.next(); + if (res.done) { + if (iterators.length === 0) return res; + currentIterator = iterators.pop(); + return currentIterator.next(); + } + return res; + } + }; + } +} + +module.exports = LazyBucketSortedSet; + + +/***/ }), + +/***/ 38637: +/***/ (function(module) { + +"use strict"; + + +/** + * @template T + */ +class Queue { + /** + * @param {Iterable=} items The initial elements. + */ + constructor(items) { + /** @private @type {Set} */ + this.set = new Set(items); + /** @private @type {Iterator} */ + this.iterator = this.set[Symbol.iterator](); + } + + /** + * Returns the number of elements in this queue. + * @returns {number} The number of elements in this queue. + */ + get length() { + return this.set.size; + } + + /** + * Appends the specified element to this queue. + * @param {T} item The element to add. + * @returns {void} + */ + enqueue(item) { + this.set.add(item); + } + + /** + * Retrieves and removes the head of this queue. + * @returns {T | undefined} The head of the queue of `undefined` if this queue is empty. + */ + dequeue() { + const result = this.iterator.next(); + if (result.done) return undefined; + this.set.delete(result.value); + return result.value; + } +} + +module.exports = Queue; + + +/***/ }), + +/***/ 33349: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +class Semaphore { + /** + * Creates an instance of Semaphore. + * + * @param {number} available the amount available number of "tasks" + * in the Semaphore + */ + constructor(available) { + this.available = available; + /** @type {(function(): void)[]} */ + this.waiters = []; + /** @private */ + this._continue = this._continue.bind(this); + } + + /** + * @param {function(): void} callback function block to capture and run + * @returns {void} + */ + acquire(callback) { + if (this.available > 0) { + this.available--; + callback(); + } else { + this.waiters.push(callback); + } + } + + release() { + this.available++; + if (this.waiters.length > 0) { + process.nextTick(this._continue); + } + } + + _continue() { + if (this.available > 0) { + if (this.waiters.length > 0) { + this.available--; + const callback = this.waiters.pop(); + callback(); + } + } + } +} + +module.exports = Semaphore; + + +/***/ }), + +/***/ 54262: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +/** + * intersect creates Set containing the intersection of elements between all sets + * @param {Set[]} sets an array of sets being checked for shared elements + * @returns {Set} returns a new Set containing the intersecting items + */ +const intersect = sets => { + if (sets.length === 0) return new Set(); + if (sets.length === 1) return new Set(sets[0]); + let minSize = Infinity; + let minIndex = -1; + for (let i = 0; i < sets.length; i++) { + const size = sets[i].size; + if (size < minSize) { + minIndex = i; + minSize = size; + } + } + const current = new Set(sets[minIndex]); + for (let i = 0; i < sets.length; i++) { + if (i === minIndex) continue; + const set = sets[i]; + for (const item of current) { + if (!set.has(item)) { + current.delete(item); + } + } + } + return current; +}; + +/** + * Checks if a set is the subset of another set + * @param {Set} bigSet a Set which contains the original elements to compare against + * @param {Set} smallSet the set whos elements might be contained inside of bigSet + * @returns {boolean} returns true if smallSet contains all elements inside of the bigSet + */ +const isSubset = (bigSet, smallSet) => { + if (bigSet.size < smallSet.size) return false; + for (const item of smallSet) { + if (!bigSet.has(item)) return false; + } + return true; +}; + +exports.intersect = intersect; +exports.isSubset = isSubset; + + +/***/ }), + +/***/ 50071: +/***/ (function(module) { + +"use strict"; + + +/** + * A subset of Set that offers sorting functionality + * @template T item type in set + * @extends {Set} + */ +class SortableSet extends Set { + /** + * Create a new sortable set + * @param {Iterable=} initialIterable The initial iterable value + * @typedef {function(T, T): number} SortFunction + * @param {SortFunction=} defaultSort Default sorting function + */ + constructor(initialIterable, defaultSort) { + super(initialIterable); + /** @private @type {function(T, T): number}} */ + this._sortFn = defaultSort; + /** @private @type {function(T, T): number} | null} */ + this._lastActiveSortFn = null; + /** @private @type {Map | undefined} */ + this._cache = undefined; + /** @private @type {Map | undefined} */ + this._cacheOrderIndependent = undefined; + } + + /** + * @param {T} value value to add to set + * @returns {this} returns itself + */ + add(value) { + this._lastActiveSortFn = null; + this._invalidateCache(); + this._invalidateOrderedCache(); + super.add(value); + return this; + } + + /** + * @param {T} value value to delete + * @returns {boolean} true if value existed in set, false otherwise + */ + delete(value) { + this._invalidateCache(); + this._invalidateOrderedCache(); + return super.delete(value); + } + + /** + * @returns {void} + */ + clear() { + this._invalidateCache(); + this._invalidateOrderedCache(); + return super.clear(); + } + + /** + * Sort with a comparer function + * @param {SortFunction} sortFn Sorting comparer function + * @returns {void} + */ + sortWith(sortFn) { + if (this.size <= 1 || sortFn === this._lastActiveSortFn) { + // already sorted - nothing to do + return; + } + + const sortedArray = Array.from(this).sort(sortFn); + super.clear(); + for (let i = 0; i < sortedArray.length; i += 1) { + super.add(sortedArray[i]); + } + this._lastActiveSortFn = sortFn; + this._invalidateCache(); + } + + sort() { + this.sortWith(this._sortFn); + } + + /** + * Get data from cache + * @param {function(SortableSet): T[]} fn function to calculate value + * @returns {T[]} returns result of fn(this), cached until set changes + */ + getFromCache(fn) { + if (this._cache === undefined) { + this._cache = new Map(); + } else { + const data = this._cache.get(fn); + if (data !== undefined) { + return data; + } + } + const newData = fn(this); + this._cache.set(fn, newData); + return newData; + } + + /** + * @param {function(SortableSet): string|number|T[]} fn function to calculate value + * @returns {any} returns result of fn(this), cached until set changes + */ + getFromUnorderedCache(fn) { + if (this._cacheOrderIndependent === undefined) { + this._cacheOrderIndependent = new Map(); + } else { + const data = this._cacheOrderIndependent.get(fn); + if (data !== undefined) { + return data; + } + } + const newData = fn(this); + this._cacheOrderIndependent.set(fn, newData); + return newData; + } + + /** + * @private + * @returns {void} + */ + _invalidateCache() { + if (this._cache !== undefined) { + this._cache.clear(); + } + } + + /** + * @private + * @returns {void} + */ + _invalidateOrderedCache() { + if (this._cacheOrderIndependent !== undefined) { + this._cacheOrderIndependent.clear(); + } + } +} + +module.exports = SortableSet; + + +/***/ }), + +/***/ 92251: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const util = __webpack_require__(31669); + +const TOMBSTONE = {}; +const UNDEFINED_MARKER = {}; + +class StackedSetMap { + constructor(parentStack) { + this.stack = parentStack === undefined ? [] : parentStack.slice(); + this.map = new Map(); + this.stack.push(this.map); + } + + add(item) { + this.map.set(item, true); + } + + set(item, value) { + this.map.set(item, value === undefined ? UNDEFINED_MARKER : value); + } + + delete(item) { + if (this.stack.length > 1) { + this.map.set(item, TOMBSTONE); + } else { + this.map.delete(item); + } + } + + has(item) { + const topValue = this.map.get(item); + if (topValue !== undefined) return topValue !== TOMBSTONE; + if (this.stack.length > 1) { + for (var i = this.stack.length - 2; i >= 0; i--) { + const value = this.stack[i].get(item); + if (value !== undefined) { + this.map.set(item, value); + return value !== TOMBSTONE; + } + } + this.map.set(item, TOMBSTONE); + } + return false; + } + + get(item) { + const topValue = this.map.get(item); + if (topValue !== undefined) { + return topValue === TOMBSTONE || topValue === UNDEFINED_MARKER + ? undefined + : topValue; + } + if (this.stack.length > 1) { + for (var i = this.stack.length - 2; i >= 0; i--) { + const value = this.stack[i].get(item); + if (value !== undefined) { + this.map.set(item, value); + return value === TOMBSTONE || value === UNDEFINED_MARKER + ? undefined + : value; + } + } + this.map.set(item, TOMBSTONE); + } + return undefined; + } + + _compress() { + if (this.stack.length === 1) return; + this.map = new Map(); + for (const data of this.stack) { + for (const pair of data) { + if (pair[1] === TOMBSTONE) { + this.map.delete(pair[0]); + } else { + this.map.set(pair[0], pair[1]); + } + } + } + this.stack = [this.map]; + } + + asArray() { + this._compress(); + return Array.from(this.map.entries(), pair => pair[0]); + } + + asSet() { + return new Set(this.asArray()); + } + + asPairArray() { + this._compress(); + return Array.from(this.map.entries(), pair => + /** @type {[TODO, TODO]} */ (pair[1] === UNDEFINED_MARKER + ? [pair[0], undefined] + : pair) + ); + } + + asMap() { + return new Map(this.asPairArray()); + } + + get size() { + this._compress(); + return this.map.size; + } + + createChild() { + return new StackedSetMap(this.stack); + } + + get length() { + throw new Error("This is no longer an Array"); + } + + set length(value) { + throw new Error("This is no longer an Array"); + } +} + +// TODO remove in webpack 5 +StackedSetMap.prototype.push = util.deprecate( + /** + * @deprecated + * @this {StackedSetMap} + * @param {any} item Item to add + * @returns {void} + */ + function(item) { + this.add(item); + }, + "This is no longer an Array: Use add instead." +); + +module.exports = StackedSetMap; + + +/***/ }), + +/***/ 67916: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const mergeCache = new WeakMap(); + +/** + * Merges two given objects and caches the result to avoid computation if same objects passed as arguments again. + * @example + * // performs cleverMerge(first, second), stores the result in WeakMap and returns result + * cachedCleverMerge({a: 1}, {a: 2}) + * {a: 2} + * // when same arguments passed, gets the result from WeakMap and returns it. + * cachedCleverMerge({a: 1}, {a: 2}) + * {a: 2} + * @param {object} first first object + * @param {object} second second object + * @returns {object} merged object of first and second object + */ +const cachedCleverMerge = (first, second) => { + let innerCache = mergeCache.get(first); + if (innerCache === undefined) { + innerCache = new WeakMap(); + mergeCache.set(first, innerCache); + } + const prevMerge = innerCache.get(second); + if (prevMerge !== undefined) return prevMerge; + const newMerge = cleverMerge(first, second); + innerCache.set(second, newMerge); + return newMerge; +}; + +/** + * Merges two objects. Objects are not deeply merged. + * TODO webpack 5: merge objects deeply clever. + * Arrays might reference the old value with "..." + * @param {object} first first object + * @param {object} second second object + * @returns {object} merged object of first and second object + */ +const cleverMerge = (first, second) => { + const newObject = Object.assign({}, first); + for (const key of Object.keys(second)) { + if (!(key in newObject)) { + newObject[key] = second[key]; + continue; + } + const secondValue = second[key]; + if (!Array.isArray(secondValue)) { + newObject[key] = secondValue; + continue; + } + const firstValue = newObject[key]; + if (Array.isArray(firstValue)) { + const newArray = []; + for (const item of secondValue) { + if (item === "...") { + for (const item of firstValue) { + newArray.push(item); + } + } else { + newArray.push(item); + } + } + newObject[key] = newArray; + } else { + newObject[key] = secondValue; + } + } + return newObject; +}; + +exports.cachedCleverMerge = cachedCleverMerge; +exports.cleverMerge = cleverMerge; + + +/***/ }), + +/***/ 15660: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const AbstractMethodError = __webpack_require__(36104); + +const BULK_SIZE = 1000; + +class Hash { + /** + * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} + * @param {string|Buffer} data data + * @param {string=} inputEncoding data encoding + * @returns {this} updated hash + */ + update(data, inputEncoding) { + throw new AbstractMethodError(); + } + + /** + * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} + * @param {string=} encoding encoding of the return value + * @returns {string|Buffer} digest + */ + digest(encoding) { + throw new AbstractMethodError(); + } +} + +exports.Hash = Hash; +/** @typedef {typeof Hash} HashConstructor */ + +class BulkUpdateDecorator extends Hash { + /** + * @param {Hash} hash hash + */ + constructor(hash) { + super(); + this.hash = hash; + this.buffer = ""; + } + + /** + * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} + * @param {string|Buffer} data data + * @param {string=} inputEncoding data encoding + * @returns {this} updated hash + */ + update(data, inputEncoding) { + if ( + inputEncoding !== undefined || + typeof data !== "string" || + data.length > BULK_SIZE + ) { + if (this.buffer.length > 0) { + this.hash.update(this.buffer); + this.buffer = ""; + } + this.hash.update(data, inputEncoding); + } else { + this.buffer += data; + if (this.buffer.length > BULK_SIZE) { + this.hash.update(this.buffer); + this.buffer = ""; + } + } + return this; + } + + /** + * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} + * @param {string=} encoding encoding of the return value + * @returns {string|Buffer} digest + */ + digest(encoding) { + if (this.buffer.length > 0) { + this.hash.update(this.buffer); + } + var digestResult = this.hash.digest(encoding); + return typeof digestResult === "string" + ? digestResult + : digestResult.toString(); + } +} + +/** + * istanbul ignore next + */ +class DebugHash extends Hash { + constructor() { + super(); + this.string = ""; + } + + /** + * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} + * @param {string|Buffer} data data + * @param {string=} inputEncoding data encoding + * @returns {this} updated hash + */ + update(data, inputEncoding) { + if (typeof data !== "string") data = data.toString("utf-8"); + this.string += data; + return this; + } + + /** + * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} + * @param {string=} encoding encoding of the return value + * @returns {string|Buffer} digest + */ + digest(encoding) { + return this.string.replace(/[^a-z0-9]+/gi, m => + Buffer.from(m).toString("hex") + ); + } +} + +/** + * Creates a hash by name or function + * @param {string | HashConstructor} algorithm the algorithm name or a constructor creating a hash + * @returns {Hash} the hash + */ +module.exports = algorithm => { + if (typeof algorithm === "function") { + return new BulkUpdateDecorator(new algorithm()); + } + switch (algorithm) { + // TODO add non-cryptographic algorithm here + case "debug": + return new DebugHash(); + default: + return new BulkUpdateDecorator(__webpack_require__(76417).createHash(algorithm)); + } +}; + + +/***/ }), + +/***/ 30815: +/***/ (function(module) { + +"use strict"; + + +// Simulations show these probabilities for a single change +// 93.1% that one group is invalidated +// 4.8% that two groups are invalidated +// 1.1% that 3 groups are invalidated +// 0.1% that 4 or more groups are invalidated +// +// And these for removing/adding 10 lexically adjacent files +// 64.5% that one group is invalidated +// 24.8% that two groups are invalidated +// 7.8% that 3 groups are invalidated +// 2.7% that 4 or more groups are invalidated +// +// And these for removing/adding 3 random files +// 0% that one group is invalidated +// 3.7% that two groups are invalidated +// 80.8% that 3 groups are invalidated +// 12.3% that 4 groups are invalidated +// 3.2% that 5 or more groups are invalidated + +/** + * + * @param {string} a key + * @param {string} b key + * @returns {number} the similarity as number + */ +const similarity = (a, b) => { + const l = Math.min(a.length, b.length); + let dist = 0; + for (let i = 0; i < l; i++) { + const ca = a.charCodeAt(i); + const cb = b.charCodeAt(i); + dist += Math.max(0, 10 - Math.abs(ca - cb)); + } + return dist; +}; + +/** + * @param {string} a key + * @param {string} b key + * @returns {string} the common part and a single char for the difference + */ +const getName = (a, b) => { + const l = Math.min(a.length, b.length); + let r = ""; + for (let i = 0; i < l; i++) { + const ca = a.charAt(i); + const cb = b.charAt(i); + r += ca; + if (ca === cb) { + continue; + } + return r; + } + return a; +}; + +/** + * @template T + */ +class Node { + /** + * @param {T} item item + * @param {string} key key + * @param {number} size size + */ + constructor(item, key, size) { + this.item = item; + this.key = key; + this.size = size; + } +} + +/** + * @template T + */ +class Group { + /** + * @param {Node[]} nodes nodes + * @param {number[]} similarities similarities between the nodes (length = nodes.length - 1) + */ + constructor(nodes, similarities) { + this.nodes = nodes; + this.similarities = similarities; + this.size = nodes.reduce((size, node) => size + node.size, 0); + /** @type {string} */ + this.key = undefined; + } +} + +/** + * @template T + * @typedef {Object} GroupedItems + * @property {string} key + * @property {T[]} items + * @property {number} size + */ + +/** + * @template T + * @typedef {Object} Options + * @property {number} maxSize maximum size of a group + * @property {number} minSize minimum size of a group (preferred over maximum size) + * @property {Iterable} items a list of items + * @property {function(T): number} getSize function to get size of an item + * @property {function(T): string} getKey function to get the key of an item + */ + +/** + * @template T + * @param {Options} options options object + * @returns {GroupedItems[]} grouped items + */ +module.exports = ({ maxSize, minSize, items, getSize, getKey }) => { + /** @type {Group[]} */ + const result = []; + + const nodes = Array.from( + items, + item => new Node(item, getKey(item), getSize(item)) + ); + + /** @type {Node[]} */ + const initialNodes = []; + + // lexically ordering of keys + nodes.sort((a, b) => { + if (a.key < b.key) return -1; + if (a.key > b.key) return 1; + return 0; + }); + + // return nodes bigger than maxSize directly as group + for (const node of nodes) { + if (node.size >= maxSize) { + result.push(new Group([node], [])); + } else { + initialNodes.push(node); + } + } + + if (initialNodes.length > 0) { + // calculate similarities between lexically adjacent nodes + /** @type {number[]} */ + const similarities = []; + for (let i = 1; i < initialNodes.length; i++) { + const a = initialNodes[i - 1]; + const b = initialNodes[i]; + similarities.push(similarity(a.key, b.key)); + } + + const initialGroup = new Group(initialNodes, similarities); + + if (initialGroup.size < minSize) { + // We hit an edgecase where the working set is already smaller than minSize + // We merge it with the smallest result node to keep minSize intact + if (result.length > 0) { + const smallestGroup = result.reduce((min, group) => + min.size > group.size ? group : min + ); + for (const node of initialGroup.nodes) smallestGroup.nodes.push(node); + smallestGroup.nodes.sort((a, b) => { + if (a.key < b.key) return -1; + if (a.key > b.key) return 1; + return 0; + }); + } else { + // There are no other nodes + // We use all nodes and have to accept that it's smaller than minSize + result.push(initialGroup); + } + } else { + const queue = [initialGroup]; + + while (queue.length) { + const group = queue.pop(); + // only groups bigger than maxSize need to be splitted + if (group.size < maxSize) { + result.push(group); + continue; + } + + // find unsplittable area from left and right + // going minSize from left and right + // at least one node need to be included otherwise we get stuck + let left = 0; + let leftSize = 0; + while (leftSize <= minSize) { + leftSize += group.nodes[left].size; + left++; + } + let right = group.nodes.length - 1; + let rightSize = 0; + while (rightSize <= minSize) { + rightSize += group.nodes[right].size; + right--; + } + + if (left - 1 > right) { + // can't split group while holding minSize + // because minSize is preferred of maxSize we return + // the group here even while it's too big + // To avoid this make sure maxSize > minSize * 3 + result.push(group); + continue; + } + if (left <= right) { + // when there is a area between left and right + // we look for best split point + // we split at the minimum similarity + // here key space is separated the most + let best = left - 1; + let bestSimilarity = group.similarities[best]; + for (let i = left; i <= right; i++) { + const similarity = group.similarities[i]; + if (similarity < bestSimilarity) { + best = i; + bestSimilarity = similarity; + } + } + left = best + 1; + right = best; + } + + // create two new groups for left and right area + // and queue them up + const rightNodes = [group.nodes[right + 1]]; + /** @type {number[]} */ + const rightSimilaries = []; + for (let i = right + 2; i < group.nodes.length; i++) { + rightSimilaries.push(group.similarities[i - 1]); + rightNodes.push(group.nodes[i]); + } + queue.push(new Group(rightNodes, rightSimilaries)); + + const leftNodes = [group.nodes[0]]; + /** @type {number[]} */ + const leftSimilaries = []; + for (let i = 1; i < left; i++) { + leftSimilaries.push(group.similarities[i - 1]); + leftNodes.push(group.nodes[i]); + } + queue.push(new Group(leftNodes, leftSimilaries)); + } + } + } + + // lexically ordering + result.sort((a, b) => { + if (a.nodes[0].key < b.nodes[0].key) return -1; + if (a.nodes[0].key > b.nodes[0].key) return 1; + return 0; + }); + + // give every group a name + for (let i = 0; i < result.length; i++) { + const group = result[i]; + const first = group.nodes[0]; + const last = group.nodes[group.nodes.length - 1]; + let name = getName(first.key, last.key); + group.key = name; + } + + // return the results + return result.map(group => { + /** @type {GroupedItems} */ + return { + key: group.key, + items: group.nodes.map(node => node.item), + size: group.size + }; + }); +}; + + +/***/ }), + +/***/ 94658: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(85622); + +/** + * @param {string} context context for relative path + * @param {string} relativePath path + * @returns {string} absolute path + */ +const requestToAbsolute = (context, relativePath) => { + if (relativePath.startsWith("./") || relativePath.startsWith("../")) + return path.join(context, relativePath); + return relativePath; +}; + +/** + * @typedef {Object} MakeRelativePathsCache + * @property {Map>=} relativePaths + */ + +/** + * + * @param {string} maybeAbsolutePath path to check + * @returns {boolean} returns true if path is "Absolute Path"-like + */ +const looksLikeAbsolutePath = maybeAbsolutePath => { + if (/^\/.*\/$/.test(maybeAbsolutePath)) { + // this 'path' is actually a regexp generated by dynamic requires. + // Don't treat it as an absolute path. + return false; + } + return /^(?:[a-z]:\\|\/)/i.test(maybeAbsolutePath); +}; + +/** + * + * @param {string} p path to normalize + * @returns {string} normalized version of path + */ +const normalizePathSeparator = p => p.replace(/\\/g, "/"); + +/** + * + * @param {string} context context for relative path + * @param {string} identifier identifier for path + * @returns {string} a converted relative path + */ +const _makePathsRelative = (context, identifier) => { + return identifier + .split(/([|! ])/) + .map(str => + looksLikeAbsolutePath(str) + ? normalizePathSeparator(path.relative(context, str)) + : str + ) + .join(""); +}; + +/** + * + * @param {string} context context used to create relative path + * @param {string} identifier identifier used to create relative path + * @param {MakeRelativePathsCache=} cache the cache object being set + * @returns {string} the returned relative path + */ +exports.makePathsRelative = (context, identifier, cache) => { + if (!cache) return _makePathsRelative(context, identifier); + + const relativePaths = + cache.relativePaths || (cache.relativePaths = new Map()); + + let cachedResult; + let contextCache = relativePaths.get(context); + if (contextCache === undefined) { + relativePaths.set(context, (contextCache = new Map())); + } else { + cachedResult = contextCache.get(identifier); + } + + if (cachedResult !== undefined) { + return cachedResult; + } else { + const relativePath = _makePathsRelative(context, identifier); + contextCache.set(identifier, relativePath); + return relativePath; + } +}; + +/** + * @param {string} context absolute context path + * @param {string} request any request string may containing absolute paths, query string, etc. + * @returns {string} a new request string avoiding absolute paths when possible + */ +exports.contextify = (context, request) => { + return request + .split("!") + .map(r => { + const splitPath = r.split("?", 2); + if (/^[a-zA-Z]:\\/.test(splitPath[0])) { + splitPath[0] = path.win32.relative(context, splitPath[0]); + if (!/^[a-zA-Z]:\\/.test(splitPath[0])) { + splitPath[0] = splitPath[0].replace(/\\/g, "/"); + } + } + if (/^\//.test(splitPath[0])) { + splitPath[0] = path.posix.relative(context, splitPath[0]); + } + if (!/^(\.\.\/|\/|[a-zA-Z]:\\)/.test(splitPath[0])) { + splitPath[0] = "./" + splitPath[0]; + } + return splitPath.join("?"); + }) + .join("!"); +}; + +/** + * @param {string} context absolute context path + * @param {string} request any request string + * @returns {string} a new request string using absolute paths when possible + */ +const _absolutify = (context, request) => { + return request + .split("!") + .map(r => requestToAbsolute(context, r)) + .join("!"); +}; + +exports.absolutify = _absolutify; + + +/***/ }), + +/***/ 1111: +/***/ (function(module) { + +/** + * convert an object into its 2D array equivalent to be turned + * into an ES6 map + * + * @param {object} obj any object type that works with Object.keys() + * @returns {Map} an ES6 Map of KV pairs + */ +module.exports = function objectToMap(obj) { + return new Map( + Object.keys(obj).map(key => { + /** @type {[string, string]} */ + const pair = [key, obj[key]]; + return pair; + }) + ); +}; + + +/***/ }), + +/***/ 68935: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Gajus Kuizinas @gajus +*/ + + +const Ajv = __webpack_require__(21414); +const ajv = new Ajv({ + errorDataPath: "configuration", + allErrors: true, + verbose: true +}); +__webpack_require__(82133)(ajv, ["instanceof"]); +__webpack_require__(51613)(ajv); + +const validateSchema = (schema, options) => { + if (Array.isArray(options)) { + const errors = options.map(options => validateObject(schema, options)); + errors.forEach((list, idx) => { + const applyPrefix = err => { + err.dataPath = `[${idx}]${err.dataPath}`; + if (err.children) { + err.children.forEach(applyPrefix); + } + }; + list.forEach(applyPrefix); + }); + return errors.reduce((arr, items) => { + return arr.concat(items); + }, []); + } else { + return validateObject(schema, options); + } +}; + +const validateObject = (schema, options) => { + const validate = ajv.compile(schema); + const valid = validate(options); + return valid ? [] : filterErrors(validate.errors); +}; + +const filterErrors = errors => { + let newErrors = []; + for (const err of errors) { + const dataPath = err.dataPath; + let children = []; + newErrors = newErrors.filter(oldError => { + if (oldError.dataPath.includes(dataPath)) { + if (oldError.children) { + children = children.concat(oldError.children.slice(0)); + } + oldError.children = undefined; + children.push(oldError); + return false; + } + return true; + }); + if (children.length) { + err.children = children; + } + newErrors.push(err); + } + + return newErrors; +}; + +module.exports = validateSchema; + + +/***/ }), + +/***/ 43101: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + +const WebpackError = __webpack_require__(97391); + +module.exports = class UnsupportedWebAssemblyFeatureError extends WebpackError { + /** @param {string} message Error message */ + constructor(message) { + super(message); + this.name = "UnsupportedWebAssemblyFeatureError"; + this.hideStack = true; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 10557: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + */ + + +const UnsupportedWebAssemblyFeatureError = __webpack_require__(43101); + +class WasmFinalizeExportsPlugin { + apply(compiler) { + compiler.hooks.compilation.tap("WasmFinalizeExportsPlugin", compilation => { + compilation.hooks.finishModules.tap( + "WasmFinalizeExportsPlugin", + modules => { + for (const module of modules) { + // 1. if a WebAssembly module + if (module.type.startsWith("webassembly") === true) { + const jsIncompatibleExports = + module.buildMeta.jsIncompatibleExports; + + if (jsIncompatibleExports === undefined) { + continue; + } + + for (const reason of module.reasons) { + // 2. is referenced by a non-WebAssembly module + if (reason.module.type.startsWith("webassembly") === false) { + const ref = compilation.getDependencyReference( + reason.module, + reason.dependency + ); + + if (!ref) continue; + + const importedNames = ref.importedNames; + + if (Array.isArray(importedNames)) { + importedNames.forEach(name => { + // 3. and uses a func with an incompatible JS signature + if ( + Object.prototype.hasOwnProperty.call( + jsIncompatibleExports, + name + ) + ) { + // 4. error + /** @type {any} */ + const error = new UnsupportedWebAssemblyFeatureError( + `Export "${name}" with ${jsIncompatibleExports[name]} can only be used for direct wasm to wasm dependencies` + ); + error.module = module; + error.origin = reason.module; + error.originLoc = reason.dependency.loc; + error.dependencies = [reason.dependency]; + compilation.errors.push(error); + } + }); + } + } + } + } + } + } + ); + }); + } +} + +module.exports = WasmFinalizeExportsPlugin; + + +/***/ }), + +/***/ 65331: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Template = __webpack_require__(96066); +const WebAssemblyUtils = __webpack_require__(52136); + +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../MainTemplate")} MainTemplate */ + +// Get all wasm modules +const getAllWasmModules = chunk => { + const wasmModules = chunk.getAllAsyncChunks(); + const array = []; + for (const chunk of wasmModules) { + for (const m of chunk.modulesIterable) { + if (m.type.startsWith("webassembly")) { + array.push(m); + } + } + } + + return array; +}; + +/** + * generates the import object function for a module + * @param {Module} module the module + * @param {boolean} mangle mangle imports + * @returns {string} source code + */ +const generateImportObject = (module, mangle) => { + const waitForInstances = new Map(); + const properties = []; + const usedWasmDependencies = WebAssemblyUtils.getUsedDependencies( + module, + mangle + ); + for (const usedDep of usedWasmDependencies) { + const dep = usedDep.dependency; + const importedModule = dep.module; + const exportName = dep.name; + const usedName = importedModule && importedModule.isUsed(exportName); + const description = dep.description; + const direct = dep.onlyDirectImport; + + const module = usedDep.module; + const name = usedDep.name; + + if (direct) { + const instanceVar = `m${waitForInstances.size}`; + waitForInstances.set(instanceVar, importedModule.id); + properties.push({ + module, + name, + value: `${instanceVar}[${JSON.stringify(usedName)}]` + }); + } else { + const params = description.signature.params.map( + (param, k) => "p" + k + param.valtype + ); + + const mod = `installedModules[${JSON.stringify(importedModule.id)}]`; + const func = `${mod}.exports[${JSON.stringify(usedName)}]`; + + properties.push({ + module, + name, + value: Template.asString([ + (importedModule.type.startsWith("webassembly") + ? `${mod} ? ${func} : ` + : "") + `function(${params}) {`, + Template.indent([`return ${func}(${params});`]), + "}" + ]) + }); + } + } + + let importObject; + if (mangle) { + importObject = [ + "return {", + Template.indent([ + properties.map(p => `${JSON.stringify(p.name)}: ${p.value}`).join(",\n") + ]), + "};" + ]; + } else { + const propertiesByModule = new Map(); + for (const p of properties) { + let list = propertiesByModule.get(p.module); + if (list === undefined) { + propertiesByModule.set(p.module, (list = [])); + } + list.push(p); + } + importObject = [ + "return {", + Template.indent([ + Array.from(propertiesByModule, ([module, list]) => { + return Template.asString([ + `${JSON.stringify(module)}: {`, + Template.indent([ + list.map(p => `${JSON.stringify(p.name)}: ${p.value}`).join(",\n") + ]), + "}" + ]); + }).join(",\n") + ]), + "};" + ]; + } + + if (waitForInstances.size === 1) { + const moduleId = Array.from(waitForInstances.values())[0]; + const promise = `installedWasmModules[${JSON.stringify(moduleId)}]`; + const variable = Array.from(waitForInstances.keys())[0]; + return Template.asString([ + `${JSON.stringify(module.id)}: function() {`, + Template.indent([ + `return promiseResolve().then(function() { return ${promise}; }).then(function(${variable}) {`, + Template.indent(importObject), + "});" + ]), + "}," + ]); + } else if (waitForInstances.size > 0) { + const promises = Array.from( + waitForInstances.values(), + id => `installedWasmModules[${JSON.stringify(id)}]` + ).join(", "); + const variables = Array.from( + waitForInstances.keys(), + (name, i) => `${name} = array[${i}]` + ).join(", "); + return Template.asString([ + `${JSON.stringify(module.id)}: function() {`, + Template.indent([ + `return promiseResolve().then(function() { return Promise.all([${promises}]); }).then(function(array) {`, + Template.indent([`var ${variables};`, ...importObject]), + "});" + ]), + "}," + ]); + } else { + return Template.asString([ + `${JSON.stringify(module.id)}: function() {`, + Template.indent(importObject), + "}," + ]); + } +}; + +class WasmMainTemplatePlugin { + constructor({ generateLoadBinaryCode, supportsStreaming, mangleImports }) { + this.generateLoadBinaryCode = generateLoadBinaryCode; + this.supportsStreaming = supportsStreaming; + this.mangleImports = mangleImports; + } + + /** + * @param {MainTemplate} mainTemplate main template + * @returns {void} + */ + apply(mainTemplate) { + mainTemplate.hooks.localVars.tap( + "WasmMainTemplatePlugin", + (source, chunk) => { + const wasmModules = getAllWasmModules(chunk); + if (wasmModules.length === 0) return source; + const importObjects = wasmModules.map(module => { + return generateImportObject(module, this.mangleImports); + }); + return Template.asString([ + source, + "", + "// object to store loaded and loading wasm modules", + "var installedWasmModules = {};", + "", + // This function is used to delay reading the installed wasm module promises + // by a microtask. Sorting them doesn't help because there are egdecases where + // sorting is not possible (modules splitted into different chunks). + // So we not even trying and solve this by a microtask delay. + "function promiseResolve() { return Promise.resolve(); }", + "", + "var wasmImportObjects = {", + Template.indent(importObjects), + "};" + ]); + } + ); + mainTemplate.hooks.requireEnsure.tap( + "WasmMainTemplatePlugin", + (source, chunk, hash) => { + const webassemblyModuleFilename = + mainTemplate.outputOptions.webassemblyModuleFilename; + + const chunkModuleMaps = chunk.getChunkModuleMaps(m => + m.type.startsWith("webassembly") + ); + if (Object.keys(chunkModuleMaps.id).length === 0) return source; + const wasmModuleSrcPath = mainTemplate.getAssetPath( + JSON.stringify(webassemblyModuleFilename), + { + hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode(hash, length)} + "`, + module: { + id: '" + wasmModuleId + "', + hash: `" + ${JSON.stringify( + chunkModuleMaps.hash + )}[wasmModuleId] + "`, + hashWithLength(length) { + const shortChunkHashMap = Object.create(null); + for (const wasmModuleId of Object.keys(chunkModuleMaps.hash)) { + if (typeof chunkModuleMaps.hash[wasmModuleId] === "string") { + shortChunkHashMap[wasmModuleId] = chunkModuleMaps.hash[ + wasmModuleId + ].substr(0, length); + } + } + return `" + ${JSON.stringify( + shortChunkHashMap + )}[wasmModuleId] + "`; + } + } + } + ); + const createImportObject = content => + this.mangleImports + ? `{ ${JSON.stringify( + WebAssemblyUtils.MANGLED_MODULE + )}: ${content} }` + : content; + return Template.asString([ + source, + "", + "// Fetch + compile chunk loading for webassembly", + "", + `var wasmModules = ${JSON.stringify( + chunkModuleMaps.id + )}[chunkId] || [];`, + "", + "wasmModules.forEach(function(wasmModuleId) {", + Template.indent([ + "var installedWasmModuleData = installedWasmModules[wasmModuleId];", + "", + '// a Promise means "currently loading" or "already loaded".', + "if(installedWasmModuleData)", + Template.indent(["promises.push(installedWasmModuleData);"]), + "else {", + Template.indent([ + `var importObject = wasmImportObjects[wasmModuleId]();`, + `var req = ${this.generateLoadBinaryCode(wasmModuleSrcPath)};`, + "var promise;", + this.supportsStreaming + ? Template.asString([ + "if(importObject instanceof Promise && typeof WebAssembly.compileStreaming === 'function') {", + Template.indent([ + "promise = Promise.all([WebAssembly.compileStreaming(req), importObject]).then(function(items) {", + Template.indent([ + `return WebAssembly.instantiate(items[0], ${createImportObject( + "items[1]" + )});` + ]), + "});" + ]), + "} else if(typeof WebAssembly.instantiateStreaming === 'function') {", + Template.indent([ + `promise = WebAssembly.instantiateStreaming(req, ${createImportObject( + "importObject" + )});` + ]) + ]) + : Template.asString([ + "if(importObject instanceof Promise) {", + Template.indent([ + "var bytesPromise = req.then(function(x) { return x.arrayBuffer(); });", + "promise = Promise.all([", + Template.indent([ + "bytesPromise.then(function(bytes) { return WebAssembly.compile(bytes); }),", + "importObject" + ]), + "]).then(function(items) {", + Template.indent([ + `return WebAssembly.instantiate(items[0], ${createImportObject( + "items[1]" + )});` + ]), + "});" + ]) + ]), + "} else {", + Template.indent([ + "var bytesPromise = req.then(function(x) { return x.arrayBuffer(); });", + "promise = bytesPromise.then(function(bytes) {", + Template.indent([ + `return WebAssembly.instantiate(bytes, ${createImportObject( + "importObject" + )});` + ]), + "});" + ]), + "}", + "promises.push(installedWasmModules[wasmModuleId] = promise.then(function(res) {", + Template.indent([ + `return ${mainTemplate.requireFn}.w[wasmModuleId] = (res.instance || res).exports;` + ]), + "}));" + ]), + "}" + ]), + "});" + ]); + } + ); + mainTemplate.hooks.requireExtensions.tap( + "WasmMainTemplatePlugin", + (source, chunk) => { + if (!chunk.hasModuleInGraph(m => m.type.startsWith("webassembly"))) { + return source; + } + return Template.asString([ + source, + "", + "// object with all WebAssembly.instance exports", + `${mainTemplate.requireFn}.w = {};` + ]); + } + ); + mainTemplate.hooks.hash.tap("WasmMainTemplatePlugin", hash => { + hash.update("WasmMainTemplatePlugin"); + hash.update("2"); + }); + } +} + +module.exports = WasmMainTemplatePlugin; + + +/***/ }), + +/***/ 13099: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Generator = __webpack_require__(39172); +const Template = __webpack_require__(96066); +const WebAssemblyUtils = __webpack_require__(52136); +const { RawSource } = __webpack_require__(53665); + +const { editWithAST, addWithAST } = __webpack_require__(65584); +const { decode } = __webpack_require__(8062); +const t = __webpack_require__(98688); +const { + moduleContextFromModuleAST +} = __webpack_require__(71234); + +const WebAssemblyExportImportedDependency = __webpack_require__(18925); + +/** @typedef {import("../Module")} Module */ +/** @typedef {import("./WebAssemblyUtils").UsedWasmDependency} UsedWasmDependency */ +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Dependency").DependencyTemplate} DependencyTemplate */ + +/** + * @typedef {(ArrayBuffer) => ArrayBuffer} ArrayBufferTransform + */ + +/** + * @template T + * @param {Function[]} fns transforms + * @returns {Function} composed transform + */ +const compose = (...fns) => { + return fns.reduce( + (prevFn, nextFn) => { + return value => nextFn(prevFn(value)); + }, + value => value + ); +}; + +// TODO replace with @callback + +/** + * Removes the start instruction + * + * @param {Object} state unused state + * @returns {ArrayBufferTransform} transform + */ +const removeStartFunc = state => bin => { + return editWithAST(state.ast, bin, { + Start(path) { + path.remove(); + } + }); +}; + +/** + * Get imported globals + * + * @param {Object} ast Module's AST + * @returns {Array} - nodes + */ +const getImportedGlobals = ast => { + const importedGlobals = []; + + t.traverse(ast, { + ModuleImport({ node }) { + if (t.isGlobalType(node.descr)) { + importedGlobals.push(node); + } + } + }); + + return importedGlobals; +}; + +/** + * Get the count for imported func + * + * @param {Object} ast Module's AST + * @returns {Number} - count + */ +const getCountImportedFunc = ast => { + let count = 0; + + t.traverse(ast, { + ModuleImport({ node }) { + if (t.isFuncImportDescr(node.descr)) { + count++; + } + } + }); + + return count; +}; + +/** + * Get next type index + * + * @param {Object} ast Module's AST + * @returns {t.Index} - index + */ +const getNextTypeIndex = ast => { + const typeSectionMetadata = t.getSectionMetadata(ast, "type"); + + if (typeSectionMetadata === undefined) { + return t.indexLiteral(0); + } + + return t.indexLiteral(typeSectionMetadata.vectorOfSize.value); +}; + +/** + * Get next func index + * + * The Func section metadata provide informations for implemented funcs + * in order to have the correct index we shift the index by number of external + * functions. + * + * @param {Object} ast Module's AST + * @param {Number} countImportedFunc number of imported funcs + * @returns {t.Index} - index + */ +const getNextFuncIndex = (ast, countImportedFunc) => { + const funcSectionMetadata = t.getSectionMetadata(ast, "func"); + + if (funcSectionMetadata === undefined) { + return t.indexLiteral(0 + countImportedFunc); + } + + const vectorOfSize = funcSectionMetadata.vectorOfSize.value; + + return t.indexLiteral(vectorOfSize + countImportedFunc); +}; + +/** + * Creates an init instruction for a global type + * @param {t.GlobalType} globalType the global type + * @returns {t.Instruction} init expression + */ +const createDefaultInitForGlobal = globalType => { + if (globalType.valtype[0] === "i") { + // create NumberLiteral global initializer + return t.objectInstruction("const", globalType.valtype, [ + t.numberLiteralFromRaw(66) + ]); + } else if (globalType.valtype[0] === "f") { + // create FloatLiteral global initializer + return t.objectInstruction("const", globalType.valtype, [ + t.floatLiteral(66, false, false, "66") + ]); + } else { + throw new Error("unknown type: " + globalType.valtype); + } +}; + +/** + * Rewrite the import globals: + * - removes the ModuleImport instruction + * - injects at the same offset a mutable global of the same type + * + * Since the imported globals are before the other global declarations, our + * indices will be preserved. + * + * Note that globals will become mutable. + * + * @param {Object} state unused state + * @returns {ArrayBufferTransform} transform + */ +const rewriteImportedGlobals = state => bin => { + const additionalInitCode = state.additionalInitCode; + const newGlobals = []; + + bin = editWithAST(state.ast, bin, { + ModuleImport(path) { + if (t.isGlobalType(path.node.descr)) { + const globalType = path.node.descr; + + globalType.mutability = "var"; + + const init = [ + createDefaultInitForGlobal(globalType), + t.instruction("end") + ]; + + newGlobals.push(t.global(globalType, init)); + + path.remove(); + } + }, + + // in order to preserve non-imported global's order we need to re-inject + // those as well + Global(path) { + const { node } = path; + const [init] = node.init; + + if (init.id === "get_global") { + node.globalType.mutability = "var"; + + const initialGlobalidx = init.args[0]; + + node.init = [ + createDefaultInitForGlobal(node.globalType), + t.instruction("end") + ]; + + additionalInitCode.push( + /** + * get_global in global initializer only works for imported globals. + * They have the same indices as the init params, so use the + * same index. + */ + t.instruction("get_local", [initialGlobalidx]), + t.instruction("set_global", [t.indexLiteral(newGlobals.length)]) + ); + } + + newGlobals.push(node); + + path.remove(); + } + }); + + // Add global declaration instructions + return addWithAST(state.ast, bin, newGlobals); +}; + +/** + * Rewrite the export names + * @param {Object} state state + * @param {Object} state.ast Module's ast + * @param {Module} state.module Module + * @param {Set} state.externalExports Module + * @returns {ArrayBufferTransform} transform + */ +const rewriteExportNames = ({ ast, module, externalExports }) => bin => { + return editWithAST(ast, bin, { + ModuleExport(path) { + const isExternal = externalExports.has(path.node.name); + if (isExternal) { + path.remove(); + return; + } + const usedName = module.isUsed(path.node.name); + if (!usedName) { + path.remove(); + return; + } + path.node.name = usedName; + } + }); +}; + +/** + * Mangle import names and modules + * @param {Object} state state + * @param {Object} state.ast Module's ast + * @param {Map} state.usedDependencyMap mappings to mangle names + * @returns {ArrayBufferTransform} transform + */ +const rewriteImports = ({ ast, usedDependencyMap }) => bin => { + return editWithAST(ast, bin, { + ModuleImport(path) { + const result = usedDependencyMap.get( + path.node.module + ":" + path.node.name + ); + + if (result !== undefined) { + path.node.module = result.module; + path.node.name = result.name; + } + } + }); +}; + +/** + * Add an init function. + * + * The init function fills the globals given input arguments. + * + * @param {Object} state transformation state + * @param {Object} state.ast Module's ast + * @param {t.Identifier} state.initFuncId identifier of the init function + * @param {t.Index} state.startAtFuncOffset index of the start function + * @param {t.ModuleImport[]} state.importedGlobals list of imported globals + * @param {t.Instruction[]} state.additionalInitCode list of addition instructions for the init function + * @param {t.Index} state.nextFuncIndex index of the next function + * @param {t.Index} state.nextTypeIndex index of the next type + * @returns {ArrayBufferTransform} transform + */ +const addInitFunction = ({ + ast, + initFuncId, + startAtFuncOffset, + importedGlobals, + additionalInitCode, + nextFuncIndex, + nextTypeIndex +}) => bin => { + const funcParams = importedGlobals.map(importedGlobal => { + // used for debugging + const id = t.identifier(`${importedGlobal.module}.${importedGlobal.name}`); + + return t.funcParam(importedGlobal.descr.valtype, id); + }); + + const funcBody = importedGlobals.reduce((acc, importedGlobal, index) => { + const args = [t.indexLiteral(index)]; + const body = [ + t.instruction("get_local", args), + t.instruction("set_global", args) + ]; + + return [...acc, ...body]; + }, []); + + if (typeof startAtFuncOffset === "number") { + funcBody.push(t.callInstruction(t.numberLiteralFromRaw(startAtFuncOffset))); + } + + for (const instr of additionalInitCode) { + funcBody.push(instr); + } + + funcBody.push(t.instruction("end")); + + const funcResults = []; + + // Code section + const funcSignature = t.signature(funcParams, funcResults); + const func = t.func(initFuncId, funcSignature, funcBody); + + // Type section + const functype = t.typeInstruction(undefined, funcSignature); + + // Func section + const funcindex = t.indexInFuncSection(nextTypeIndex); + + // Export section + const moduleExport = t.moduleExport( + initFuncId.value, + t.moduleExportDescr("Func", nextFuncIndex) + ); + + return addWithAST(ast, bin, [func, moduleExport, funcindex, functype]); +}; + +/** + * Extract mangle mappings from module + * @param {Module} module current module + * @param {boolean} mangle mangle imports + * @returns {Map} mappings to mangled names + */ +const getUsedDependencyMap = (module, mangle) => { + /** @type {Map} */ + const map = new Map(); + for (const usedDep of WebAssemblyUtils.getUsedDependencies(module, mangle)) { + const dep = usedDep.dependency; + const request = dep.request; + const exportName = dep.name; + map.set(request + ":" + exportName, usedDep); + } + return map; +}; + +class WebAssemblyGenerator extends Generator { + constructor(options) { + super(); + this.options = options; + } + + /** + * @param {NormalModule} module module for which the code should be generated + * @param {Map} dependencyTemplates mapping from dependencies to templates + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {string} type which kind of code should be generated + * @returns {Source} generated code + */ + generate(module, dependencyTemplates, runtimeTemplate, type) { + let bin = module.originalSource().source(); + + const initFuncId = t.identifier( + Array.isArray(module.usedExports) + ? Template.numberToIdentifer(module.usedExports.length) + : "__webpack_init__" + ); + + // parse it + const ast = decode(bin, { + ignoreDataSection: true, + ignoreCodeSection: true, + ignoreCustomNameSection: true + }); + + const moduleContext = moduleContextFromModuleAST(ast.body[0]); + + const importedGlobals = getImportedGlobals(ast); + const countImportedFunc = getCountImportedFunc(ast); + const startAtFuncOffset = moduleContext.getStart(); + const nextFuncIndex = getNextFuncIndex(ast, countImportedFunc); + const nextTypeIndex = getNextTypeIndex(ast); + + const usedDependencyMap = getUsedDependencyMap( + module, + this.options.mangleImports + ); + const externalExports = new Set( + module.dependencies + .filter(d => d instanceof WebAssemblyExportImportedDependency) + .map(d => { + const wasmDep = /** @type {WebAssemblyExportImportedDependency} */ (d); + return wasmDep.exportName; + }) + ); + + /** @type {t.Instruction[]} */ + const additionalInitCode = []; + + const transform = compose( + rewriteExportNames({ + ast, + module, + externalExports + }), + + removeStartFunc({ ast }), + + rewriteImportedGlobals({ ast, additionalInitCode }), + + rewriteImports({ + ast, + usedDependencyMap + }), + + addInitFunction({ + ast, + initFuncId, + importedGlobals, + additionalInitCode, + startAtFuncOffset, + nextFuncIndex, + nextTypeIndex + }) + ); + + const newBin = transform(bin); + + return new RawSource(newBin); + } +} + +module.exports = WebAssemblyGenerator; + + +/***/ }), + +/***/ 45283: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + +const WebpackError = __webpack_require__(97391); + +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../RequestShortener")} RequestShortener */ + +/** + * @param {Module} module module to get chains from + * @param {RequestShortener} requestShortener to make readable identifiers + * @returns {string[]} all chains to the module + */ +const getInitialModuleChains = (module, requestShortener) => { + const queue = [ + { head: module, message: module.readableIdentifier(requestShortener) } + ]; + /** @type {Set} */ + const results = new Set(); + /** @type {Set} */ + const incompleteResults = new Set(); + /** @type {Set} */ + const visitedModules = new Set(); + + for (const chain of queue) { + const { head, message } = chain; + let final = true; + /** @type {Set} */ + const alreadyReferencedModules = new Set(); + for (const reason of head.reasons) { + const newHead = reason.module; + if (newHead) { + if (!newHead.getChunks().some(c => c.canBeInitial())) continue; + final = false; + if (alreadyReferencedModules.has(newHead)) continue; + alreadyReferencedModules.add(newHead); + const moduleName = newHead.readableIdentifier(requestShortener); + const detail = reason.explanation ? ` (${reason.explanation})` : ""; + const newMessage = `${moduleName}${detail} --> ${message}`; + if (visitedModules.has(newHead)) { + incompleteResults.add(`... --> ${newMessage}`); + continue; + } + visitedModules.add(newHead); + queue.push({ + head: newHead, + message: newMessage + }); + } else { + final = false; + const newMessage = reason.explanation + ? `(${reason.explanation}) --> ${message}` + : message; + results.add(newMessage); + } + } + if (final) { + results.add(message); + } + } + for (const result of incompleteResults) { + results.add(result); + } + return Array.from(results); +}; + +module.exports = class WebAssemblyInInitialChunkError extends WebpackError { + /** + * @param {Module} module WASM module + * @param {RequestShortener} requestShortener request shortener + */ + constructor(module, requestShortener) { + const moduleChains = getInitialModuleChains(module, requestShortener); + const message = `WebAssembly module is included in initial chunk. +This is not allowed, because WebAssembly download and compilation must happen asynchronous. +Add an async splitpoint (i. e. import()) somewhere between your entrypoint and the WebAssembly module: +${moduleChains.map(s => `* ${s}`).join("\n")}`; + + super(message); + this.name = "WebAssemblyInInitialChunkError"; + this.hideStack = true; + this.module = module; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 13411: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Generator = __webpack_require__(39172); +const Template = __webpack_require__(96066); +const { RawSource } = __webpack_require__(53665); +const WebAssemblyImportDependency = __webpack_require__(52959); +const WebAssemblyExportImportedDependency = __webpack_require__(18925); + +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Dependency").DependencyTemplate} DependencyTemplate */ + +class WebAssemblyJavascriptGenerator extends Generator { + /** + * @param {NormalModule} module module for which the code should be generated + * @param {Map} dependencyTemplates mapping from dependencies to templates + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {string} type which kind of code should be generated + * @returns {Source} generated code + */ + generate(module, dependencyTemplates, runtimeTemplate, type) { + const initIdentifer = Array.isArray(module.usedExports) + ? Template.numberToIdentifer(module.usedExports.length) + : "__webpack_init__"; + + let needExportsCopy = false; + const importedModules = new Map(); + const initParams = []; + let index = 0; + for (const dep of module.dependencies) { + const depAsAny = /** @type {any} */ (dep); + if (dep.module) { + let importData = importedModules.get(dep.module); + if (importData === undefined) { + importedModules.set( + dep.module, + (importData = { + importVar: `m${index}`, + index, + request: + "userRequest" in depAsAny ? depAsAny.userRequest : undefined, + names: new Set(), + reexports: [] + }) + ); + index++; + } + if (dep instanceof WebAssemblyImportDependency) { + importData.names.add(dep.name); + if (dep.description.type === "GlobalType") { + const exportName = dep.name; + const usedName = dep.module && dep.module.isUsed(exportName); + + if (dep.module) { + if (usedName) { + initParams.push( + runtimeTemplate.exportFromImport({ + module: dep.module, + request: dep.request, + importVar: importData.importVar, + originModule: module, + exportName: dep.name, + asiSafe: true, + isCall: false, + callContext: null + }) + ); + } + } + } + } + if (dep instanceof WebAssemblyExportImportedDependency) { + importData.names.add(dep.name); + const usedName = module.isUsed(dep.exportName); + if (usedName) { + const exportProp = `${module.exportsArgument}[${JSON.stringify( + usedName + )}]`; + const defineStatement = Template.asString([ + `${exportProp} = ${runtimeTemplate.exportFromImport({ + module: dep.module, + request: dep.request, + importVar: importData.importVar, + originModule: module, + exportName: dep.name, + asiSafe: true, + isCall: false, + callContext: null + })};`, + `if(WebAssembly.Global) ${exportProp} = ` + + `new WebAssembly.Global({ value: ${JSON.stringify( + dep.valueType + )} }, ${exportProp});` + ]); + importData.reexports.push(defineStatement); + needExportsCopy = true; + } + } + } + } + const importsCode = Template.asString( + Array.from( + importedModules, + ([module, { importVar, request, reexports }]) => { + const importStatement = runtimeTemplate.importStatement({ + module, + request, + importVar, + originModule: module + }); + return importStatement + reexports.join("\n"); + } + ) + ); + + // create source + const source = new RawSource( + [ + '"use strict";', + "// Instantiate WebAssembly module", + "var wasmExports = __webpack_require__.w[module.i];", + + !Array.isArray(module.usedExports) + ? `__webpack_require__.r(${module.exportsArgument});` + : "", + + // this must be before import for circular dependencies + "// export exports from WebAssembly module", + Array.isArray(module.usedExports) && !needExportsCopy + ? `${module.moduleArgument}.exports = wasmExports;` + : "for(var name in wasmExports) " + + `if(name != ${JSON.stringify(initIdentifer)}) ` + + `${module.exportsArgument}[name] = wasmExports[name];`, + "// exec imports from WebAssembly module (for esm order)", + importsCode, + "", + "// exec wasm module", + `wasmExports[${JSON.stringify(initIdentifer)}](${initParams.join( + ", " + )})` + ].join("\n") + ); + return source; + } +} + +module.exports = WebAssemblyJavascriptGenerator; + + +/***/ }), + +/***/ 99510: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Generator = __webpack_require__(39172); +const WebAssemblyExportImportedDependency = __webpack_require__(18925); +const WebAssemblyImportDependency = __webpack_require__(52959); +const WebAssemblyInInitialChunkError = __webpack_require__(45283); + +/** @typedef {import("../Compiler")} Compiler */ + +let WebAssemblyGenerator; +let WebAssemblyJavascriptGenerator; +let WebAssemblyParser; + +class WebAssemblyModulesPlugin { + constructor(options) { + this.options = options; + } + + /** + * @param {Compiler} compiler compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "WebAssemblyModulesPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + WebAssemblyImportDependency, + normalModuleFactory + ); + + compilation.dependencyFactories.set( + WebAssemblyExportImportedDependency, + normalModuleFactory + ); + + normalModuleFactory.hooks.createParser + .for("webassembly/experimental") + .tap("WebAssemblyModulesPlugin", () => { + if (WebAssemblyParser === undefined) { + WebAssemblyParser = __webpack_require__(77703); + } + return new WebAssemblyParser(); + }); + + normalModuleFactory.hooks.createGenerator + .for("webassembly/experimental") + .tap("WebAssemblyModulesPlugin", () => { + if (WebAssemblyGenerator === undefined) { + WebAssemblyGenerator = __webpack_require__(13099); + } + if (WebAssemblyJavascriptGenerator === undefined) { + WebAssemblyJavascriptGenerator = __webpack_require__(13411); + } + return Generator.byType({ + javascript: new WebAssemblyJavascriptGenerator(), + webassembly: new WebAssemblyGenerator(this.options) + }); + }); + + compilation.chunkTemplate.hooks.renderManifest.tap( + "WebAssemblyModulesPlugin", + (result, options) => { + const chunk = options.chunk; + const outputOptions = options.outputOptions; + const moduleTemplates = options.moduleTemplates; + const dependencyTemplates = options.dependencyTemplates; + + for (const module of chunk.modulesIterable) { + if (module.type && module.type.startsWith("webassembly")) { + const filenameTemplate = + outputOptions.webassemblyModuleFilename; + + result.push({ + render: () => + this.renderWebAssembly( + module, + moduleTemplates.webassembly, + dependencyTemplates + ), + filenameTemplate, + pathOptions: { + module + }, + identifier: `webassemblyModule${module.id}`, + hash: module.hash + }); + } + } + + return result; + } + ); + + compilation.hooks.afterChunks.tap("WebAssemblyModulesPlugin", () => { + const initialWasmModules = new Set(); + for (const chunk of compilation.chunks) { + if (chunk.canBeInitial()) { + for (const module of chunk.modulesIterable) { + if (module.type.startsWith("webassembly")) { + initialWasmModules.add(module); + } + } + } + } + for (const module of initialWasmModules) { + compilation.errors.push( + new WebAssemblyInInitialChunkError( + module, + compilation.requestShortener + ) + ); + } + }); + } + ); + } + + renderWebAssembly(module, moduleTemplate, dependencyTemplates) { + return moduleTemplate.render(module, dependencyTemplates, {}); + } +} + +module.exports = WebAssemblyModulesPlugin; + + +/***/ }), + +/***/ 77703: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const t = __webpack_require__(98688); +const { decode } = __webpack_require__(8062); +const { + moduleContextFromModuleAST +} = __webpack_require__(71234); + +const { Tapable } = __webpack_require__(92402); +const WebAssemblyImportDependency = __webpack_require__(52959); +const WebAssemblyExportImportedDependency = __webpack_require__(18925); + +/** @typedef {import("../Module")} Module */ + +const JS_COMPAT_TYPES = new Set(["i32", "f32", "f64"]); + +/** + * @param {t.Signature} signature the func signature + * @returns {null | string} the type incompatible with js types + */ +const getJsIncompatibleType = signature => { + for (const param of signature.params) { + if (!JS_COMPAT_TYPES.has(param.valtype)) { + return `${param.valtype} as parameter`; + } + } + for (const type of signature.results) { + if (!JS_COMPAT_TYPES.has(type)) return `${type} as result`; + } + return null; +}; + +/** + * TODO why are there two different Signature types? + * @param {t.FuncSignature} signature the func signature + * @returns {null | string} the type incompatible with js types + */ +const getJsIncompatibleTypeOfFuncSignature = signature => { + for (const param of signature.args) { + if (!JS_COMPAT_TYPES.has(param)) { + return `${param} as parameter`; + } + } + for (const type of signature.result) { + if (!JS_COMPAT_TYPES.has(type)) return `${type} as result`; + } + return null; +}; + +const decoderOpts = { + ignoreCodeSection: true, + ignoreDataSection: true, + + // this will avoid having to lookup with identifiers in the ModuleContext + ignoreCustomNameSection: true +}; + +class WebAssemblyParser extends Tapable { + constructor(options) { + super(); + this.hooks = {}; + this.options = options; + } + + parse(binary, state) { + // flag it as ESM + state.module.buildMeta.exportsType = "namespace"; + + // parse it + const program = decode(binary, decoderOpts); + const module = program.body[0]; + + const moduleContext = moduleContextFromModuleAST(module); + + // extract imports and exports + const exports = (state.module.buildMeta.providedExports = []); + const jsIncompatibleExports = (state.module.buildMeta.jsIncompatibleExports = []); + + const importedGlobals = []; + t.traverse(module, { + ModuleExport({ node }) { + const descriptor = node.descr; + + if (descriptor.exportType === "Func") { + const funcidx = descriptor.id.value; + + /** @type {t.FuncSignature} */ + const funcSignature = moduleContext.getFunction(funcidx); + + const incompatibleType = getJsIncompatibleTypeOfFuncSignature( + funcSignature + ); + + if (incompatibleType) { + jsIncompatibleExports[node.name] = incompatibleType; + } + } + + exports.push(node.name); + + if (node.descr && node.descr.exportType === "Global") { + const refNode = importedGlobals[node.descr.id.value]; + if (refNode) { + const dep = new WebAssemblyExportImportedDependency( + node.name, + refNode.module, + refNode.name, + refNode.descr.valtype + ); + + state.module.addDependency(dep); + } + } + }, + + Global({ node }) { + const init = node.init[0]; + + let importNode = null; + + if (init.id === "get_global") { + const globalIdx = init.args[0].value; + + if (globalIdx < importedGlobals.length) { + importNode = importedGlobals[globalIdx]; + } + } + + importedGlobals.push(importNode); + }, + + ModuleImport({ node }) { + /** @type {false | string} */ + let onlyDirectImport = false; + + if (t.isMemory(node.descr) === true) { + onlyDirectImport = "Memory"; + } else if (t.isTable(node.descr) === true) { + onlyDirectImport = "Table"; + } else if (t.isFuncImportDescr(node.descr) === true) { + const incompatibleType = getJsIncompatibleType(node.descr.signature); + if (incompatibleType) { + onlyDirectImport = `Non-JS-compatible Func Sigurature (${incompatibleType})`; + } + } else if (t.isGlobalType(node.descr) === true) { + const type = node.descr.valtype; + if (!JS_COMPAT_TYPES.has(type)) { + onlyDirectImport = `Non-JS-compatible Global Type (${type})`; + } + } + + const dep = new WebAssemblyImportDependency( + node.module, + node.name, + node.descr, + onlyDirectImport + ); + + state.module.addDependency(dep); + + if (t.isGlobalType(node.descr)) { + importedGlobals.push(node); + } + } + }); + + return state; + } +} + +module.exports = WebAssemblyParser; + + +/***/ }), + +/***/ 52136: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Template = __webpack_require__(96066); +const WebAssemblyImportDependency = __webpack_require__(52959); + +/** @typedef {import("../Module")} Module */ + +/** @typedef {Object} UsedWasmDependency + * @property {WebAssemblyImportDependency} dependency the dependency + * @property {string} name the export name + * @property {string} module the module name + */ + +const MANGLED_MODULE = "a"; + +/** + * @param {Module} module the module + * @param {boolean} mangle mangle module and export names + * @returns {UsedWasmDependency[]} used dependencies and (mangled) name + */ +const getUsedDependencies = (module, mangle) => { + /** @type {UsedWasmDependency[]} */ + const array = []; + let importIndex = 0; + for (const dep of module.dependencies) { + if (dep instanceof WebAssemblyImportDependency) { + if (dep.description.type === "GlobalType" || dep.module === null) { + continue; + } + + const exportName = dep.name; + // TODO add the following 3 lines when removing of ModuleExport is possible + // const importedModule = dep.module; + // const usedName = importedModule && importedModule.isUsed(exportName); + // if (usedName !== false) { + if (mangle) { + array.push({ + dependency: dep, + name: Template.numberToIdentifer(importIndex++), + module: MANGLED_MODULE + }); + } else { + array.push({ + dependency: dep, + name: exportName, + module: dep.request + }); + } + } + } + return array; +}; + +exports.getUsedDependencies = getUsedDependencies; +exports.MANGLED_MODULE = MANGLED_MODULE; + + +/***/ }), + +/***/ 52669: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WasmMainTemplatePlugin = __webpack_require__(65331); + +class FetchCompileWasmTemplatePlugin { + constructor(options) { + this.options = options || {}; + } + + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "FetchCompileWasmTemplatePlugin", + compilation => { + const mainTemplate = compilation.mainTemplate; + const generateLoadBinaryCode = path => + `fetch(${mainTemplate.requireFn}.p + ${path})`; + + const plugin = new WasmMainTemplatePlugin( + Object.assign( + { + generateLoadBinaryCode, + supportsStreaming: true + }, + this.options + ) + ); + plugin.apply(mainTemplate); + } + ); + } +} + +module.exports = FetchCompileWasmTemplatePlugin; + + +/***/ }), + +/***/ 31898: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { ConcatSource } = __webpack_require__(53665); + +/** @typedef {import("../ChunkTemplate")} ChunkTemplate */ + +const getEntryInfo = chunk => { + return [chunk.entryModule].filter(Boolean).map(m => + [m.id].concat( + Array.from(chunk.groupsIterable)[0] + .chunks.filter(c => c !== chunk) + .map(c => c.id) + ) + ); +}; + +class JsonpChunkTemplatePlugin { + /** + * @param {ChunkTemplate} chunkTemplate the chunk template + * @returns {void} + */ + apply(chunkTemplate) { + chunkTemplate.hooks.render.tap( + "JsonpChunkTemplatePlugin", + (modules, chunk) => { + const jsonpFunction = chunkTemplate.outputOptions.jsonpFunction; + const globalObject = chunkTemplate.outputOptions.globalObject; + const source = new ConcatSource(); + const prefetchChunks = chunk.getChildIdsByOrders().prefetch; + source.add( + `(${globalObject}[${JSON.stringify( + jsonpFunction + )}] = ${globalObject}[${JSON.stringify( + jsonpFunction + )}] || []).push([${JSON.stringify(chunk.ids)},` + ); + source.add(modules); + const entries = getEntryInfo(chunk); + if (entries.length > 0) { + source.add(`,${JSON.stringify(entries)}`); + } else if (prefetchChunks && prefetchChunks.length) { + source.add(`,0`); + } + + if (prefetchChunks && prefetchChunks.length) { + source.add(`,${JSON.stringify(prefetchChunks)}`); + } + source.add("])"); + return source; + } + ); + chunkTemplate.hooks.hash.tap("JsonpChunkTemplatePlugin", hash => { + hash.update("JsonpChunkTemplatePlugin"); + hash.update("4"); + hash.update(`${chunkTemplate.outputOptions.jsonpFunction}`); + hash.update(`${chunkTemplate.outputOptions.globalObject}`); + }); + chunkTemplate.hooks.hashForChunk.tap( + "JsonpChunkTemplatePlugin", + (hash, chunk) => { + hash.update(JSON.stringify(getEntryInfo(chunk))); + hash.update(JSON.stringify(chunk.getChildIdsByOrders().prefetch) || ""); + } + ); + } +} +module.exports = JsonpChunkTemplatePlugin; + + +/***/ }), + +/***/ 13732: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { ConcatSource } = __webpack_require__(53665); + +class JsonpExportMainTemplatePlugin { + /** + * @param {string} name jsonp function name + */ + constructor(name) { + this.name = name; + } + + apply(compilation) { + const { mainTemplate, chunkTemplate } = compilation; + + const onRenderWithEntry = (source, chunk, hash) => { + const name = mainTemplate.getAssetPath(this.name || "", { + hash, + chunk + }); + return new ConcatSource(`${name}(`, source, ");"); + }; + + for (const template of [mainTemplate, chunkTemplate]) { + template.hooks.renderWithEntry.tap( + "JsonpExportMainTemplatePlugin", + onRenderWithEntry + ); + } + + mainTemplate.hooks.globalHashPaths.tap( + "JsonpExportMainTemplatePlugin", + paths => { + if (this.name) paths.push(this.name); + return paths; + } + ); + + mainTemplate.hooks.hash.tap("JsonpExportMainTemplatePlugin", hash => { + hash.update("jsonp export"); + hash.update(`${this.name}`); + }); + } +} + +module.exports = JsonpExportMainTemplatePlugin; + + +/***/ }), + +/***/ 44458: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { ConcatSource } = __webpack_require__(53665); + +class JsonpHotUpdateChunkTemplatePlugin { + apply(hotUpdateChunkTemplate) { + hotUpdateChunkTemplate.hooks.render.tap( + "JsonpHotUpdateChunkTemplatePlugin", + (modulesSource, modules, removedModules, hash, id) => { + const source = new ConcatSource(); + source.add( + `${ + hotUpdateChunkTemplate.outputOptions.hotUpdateFunction + }(${JSON.stringify(id)},` + ); + source.add(modulesSource); + source.add(")"); + return source; + } + ); + hotUpdateChunkTemplate.hooks.hash.tap( + "JsonpHotUpdateChunkTemplatePlugin", + hash => { + hash.update("JsonpHotUpdateChunkTemplatePlugin"); + hash.update("3"); + hash.update( + `${hotUpdateChunkTemplate.outputOptions.hotUpdateFunction}` + ); + hash.update(`${hotUpdateChunkTemplate.outputOptions.library}`); + } + ); + } +} + +module.exports = JsonpHotUpdateChunkTemplatePlugin; + + +/***/ }), + +/***/ 24916: +/***/ (function(module) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// eslint-disable-next-line no-unused-vars +var hotAddUpdateChunk = undefined; +var parentHotUpdateCallback = undefined; +var $require$ = undefined; +var $hotMainFilename$ = undefined; +var $hotChunkFilename$ = undefined; +var $crossOriginLoading$ = undefined; + +module.exports = function() { + // eslint-disable-next-line no-unused-vars + function webpackHotUpdateCallback(chunkId, moreModules) { + hotAddUpdateChunk(chunkId, moreModules); + if (parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules); + } //$semicolon + + // eslint-disable-next-line no-unused-vars + function hotDownloadUpdateChunk(chunkId) { + var script = document.createElement("script"); + script.charset = "utf-8"; + script.src = $require$.p + $hotChunkFilename$; + if ($crossOriginLoading$) script.crossOrigin = $crossOriginLoading$; + document.head.appendChild(script); + } + + // eslint-disable-next-line no-unused-vars + function hotDownloadManifest(requestTimeout) { + requestTimeout = requestTimeout || 10000; + return new Promise(function(resolve, reject) { + if (typeof XMLHttpRequest === "undefined") { + return reject(new Error("No browser support")); + } + try { + var request = new XMLHttpRequest(); + var requestPath = $require$.p + $hotMainFilename$; + request.open("GET", requestPath, true); + request.timeout = requestTimeout; + request.send(null); + } catch (err) { + return reject(err); + } + request.onreadystatechange = function() { + if (request.readyState !== 4) return; + if (request.status === 0) { + // timeout + reject( + new Error("Manifest request to " + requestPath + " timed out.") + ); + } else if (request.status === 404) { + // no update available + resolve(); + } else if (request.status !== 200 && request.status !== 304) { + // other failure + reject(new Error("Manifest request to " + requestPath + " failed.")); + } else { + // success + try { + var update = JSON.parse(request.responseText); + } catch (e) { + reject(e); + return; + } + resolve(update); + } + }; + }); + } +}; + + +/***/ }), + +/***/ 38017: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { SyncWaterfallHook } = __webpack_require__(92402); +const Template = __webpack_require__(96066); + +class JsonpMainTemplatePlugin { + apply(mainTemplate) { + const needChunkOnDemandLoadingCode = chunk => { + for (const chunkGroup of chunk.groupsIterable) { + if (chunkGroup.getNumberOfChildren() > 0) return true; + } + return false; + }; + const needChunkLoadingCode = chunk => { + for (const chunkGroup of chunk.groupsIterable) { + if (chunkGroup.chunks.length > 1) return true; + if (chunkGroup.getNumberOfChildren() > 0) return true; + } + return false; + }; + const needEntryDeferringCode = chunk => { + for (const chunkGroup of chunk.groupsIterable) { + if (chunkGroup.chunks.length > 1) return true; + } + return false; + }; + const needPrefetchingCode = chunk => { + const allPrefetchChunks = chunk.getChildIdsByOrdersMap(true).prefetch; + return allPrefetchChunks && Object.keys(allPrefetchChunks).length; + }; + + // TODO webpack 5, no adding to .hooks, use WeakMap and static methods + ["jsonpScript", "linkPreload", "linkPrefetch"].forEach(hook => { + if (!mainTemplate.hooks[hook]) { + mainTemplate.hooks[hook] = new SyncWaterfallHook([ + "source", + "chunk", + "hash" + ]); + } + }); + + const getScriptSrcPath = (hash, chunk, chunkIdExpression) => { + const chunkFilename = mainTemplate.outputOptions.chunkFilename; + const chunkMaps = chunk.getChunkMaps(); + return mainTemplate.getAssetPath(JSON.stringify(chunkFilename), { + hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode(hash, length)} + "`, + chunk: { + id: `" + ${chunkIdExpression} + "`, + hash: `" + ${JSON.stringify( + chunkMaps.hash + )}[${chunkIdExpression}] + "`, + hashWithLength(length) { + const shortChunkHashMap = Object.create(null); + for (const chunkId of Object.keys(chunkMaps.hash)) { + if (typeof chunkMaps.hash[chunkId] === "string") { + shortChunkHashMap[chunkId] = chunkMaps.hash[chunkId].substr( + 0, + length + ); + } + } + return `" + ${JSON.stringify( + shortChunkHashMap + )}[${chunkIdExpression}] + "`; + }, + name: `" + (${JSON.stringify( + chunkMaps.name + )}[${chunkIdExpression}]||${chunkIdExpression}) + "`, + contentHash: { + javascript: `" + ${JSON.stringify( + chunkMaps.contentHash.javascript + )}[${chunkIdExpression}] + "` + }, + contentHashWithLength: { + javascript: length => { + const shortContentHashMap = {}; + const contentHash = chunkMaps.contentHash.javascript; + for (const chunkId of Object.keys(contentHash)) { + if (typeof contentHash[chunkId] === "string") { + shortContentHashMap[chunkId] = contentHash[chunkId].substr( + 0, + length + ); + } + } + return `" + ${JSON.stringify( + shortContentHashMap + )}[${chunkIdExpression}] + "`; + } + } + }, + contentHashType: "javascript" + }); + }; + mainTemplate.hooks.localVars.tap( + "JsonpMainTemplatePlugin", + (source, chunk, hash) => { + const extraCode = []; + if (needChunkLoadingCode(chunk)) { + extraCode.push( + "", + "// object to store loaded and loading chunks", + "// undefined = chunk not loaded, null = chunk preloaded/prefetched", + "// Promise = chunk loading, 0 = chunk loaded", + "var installedChunks = {", + Template.indent( + chunk.ids.map(id => `${JSON.stringify(id)}: 0`).join(",\n") + ), + "};", + "", + needEntryDeferringCode(chunk) + ? needPrefetchingCode(chunk) + ? "var deferredModules = [], deferredPrefetch = [];" + : "var deferredModules = [];" + : "" + ); + } + if (needChunkOnDemandLoadingCode(chunk)) { + extraCode.push( + "", + "// script path function", + "function jsonpScriptSrc(chunkId) {", + Template.indent([ + `return ${mainTemplate.requireFn}.p + ${getScriptSrcPath( + hash, + chunk, + "chunkId" + )}` + ]), + "}" + ); + } + if (extraCode.length === 0) return source; + return Template.asString([source, ...extraCode]); + } + ); + + mainTemplate.hooks.jsonpScript.tap( + "JsonpMainTemplatePlugin", + (_, chunk, hash) => { + const crossOriginLoading = + mainTemplate.outputOptions.crossOriginLoading; + const chunkLoadTimeout = mainTemplate.outputOptions.chunkLoadTimeout; + const jsonpScriptType = mainTemplate.outputOptions.jsonpScriptType; + + return Template.asString([ + "var script = document.createElement('script');", + "var onScriptComplete;", + jsonpScriptType + ? `script.type = ${JSON.stringify(jsonpScriptType)};` + : "", + "script.charset = 'utf-8';", + `script.timeout = ${chunkLoadTimeout / 1000};`, + `if (${mainTemplate.requireFn}.nc) {`, + Template.indent( + `script.setAttribute("nonce", ${mainTemplate.requireFn}.nc);` + ), + "}", + "script.src = jsonpScriptSrc(chunkId);", + crossOriginLoading + ? Template.asString([ + "if (script.src.indexOf(window.location.origin + '/') !== 0) {", + Template.indent( + `script.crossOrigin = ${JSON.stringify(crossOriginLoading)};` + ), + "}" + ]) + : "", + "// create error before stack unwound to get useful stacktrace later", + "var error = new Error();", + "onScriptComplete = function (event) {", + Template.indent([ + "// avoid mem leaks in IE.", + "script.onerror = script.onload = null;", + "clearTimeout(timeout);", + "var chunk = installedChunks[chunkId];", + "if(chunk !== 0) {", + Template.indent([ + "if(chunk) {", + Template.indent([ + "var errorType = event && (event.type === 'load' ? 'missing' : event.type);", + "var realSrc = event && event.target && event.target.src;", + "error.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';", + "error.name = 'ChunkLoadError';", + "error.type = errorType;", + "error.request = realSrc;", + "chunk[1](error);" + ]), + "}", + "installedChunks[chunkId] = undefined;" + ]), + "}" + ]), + "};", + "var timeout = setTimeout(function(){", + Template.indent([ + "onScriptComplete({ type: 'timeout', target: script });" + ]), + `}, ${chunkLoadTimeout});`, + "script.onerror = script.onload = onScriptComplete;" + ]); + } + ); + mainTemplate.hooks.linkPreload.tap( + "JsonpMainTemplatePlugin", + (_, chunk, hash) => { + const crossOriginLoading = + mainTemplate.outputOptions.crossOriginLoading; + const jsonpScriptType = mainTemplate.outputOptions.jsonpScriptType; + + return Template.asString([ + "var link = document.createElement('link');", + jsonpScriptType + ? `link.type = ${JSON.stringify(jsonpScriptType)};` + : "", + "link.charset = 'utf-8';", + `if (${mainTemplate.requireFn}.nc) {`, + Template.indent( + `link.setAttribute("nonce", ${mainTemplate.requireFn}.nc);` + ), + "}", + 'link.rel = "preload";', + 'link.as = "script";', + "link.href = jsonpScriptSrc(chunkId);", + crossOriginLoading + ? Template.asString([ + "if (link.href.indexOf(window.location.origin + '/') !== 0) {", + Template.indent( + `link.crossOrigin = ${JSON.stringify(crossOriginLoading)};` + ), + "}" + ]) + : "" + ]); + } + ); + mainTemplate.hooks.linkPrefetch.tap( + "JsonpMainTemplatePlugin", + (_, chunk, hash) => { + const crossOriginLoading = + mainTemplate.outputOptions.crossOriginLoading; + + return Template.asString([ + "var link = document.createElement('link');", + crossOriginLoading + ? `link.crossOrigin = ${JSON.stringify(crossOriginLoading)};` + : "", + `if (${mainTemplate.requireFn}.nc) {`, + Template.indent( + `link.setAttribute("nonce", ${mainTemplate.requireFn}.nc);` + ), + "}", + 'link.rel = "prefetch";', + 'link.as = "script";', + "link.href = jsonpScriptSrc(chunkId);" + ]); + } + ); + mainTemplate.hooks.requireEnsure.tap( + "JsonpMainTemplatePlugin load", + (source, chunk, hash) => { + return Template.asString([ + source, + "", + "// JSONP chunk loading for javascript", + "", + "var installedChunkData = installedChunks[chunkId];", + 'if(installedChunkData !== 0) { // 0 means "already installed".', + Template.indent([ + "", + '// a Promise means "currently loading".', + "if(installedChunkData) {", + Template.indent(["promises.push(installedChunkData[2]);"]), + "} else {", + Template.indent([ + "// setup Promise in chunk cache", + "var promise = new Promise(function(resolve, reject) {", + Template.indent([ + "installedChunkData = installedChunks[chunkId] = [resolve, reject];" + ]), + "});", + "promises.push(installedChunkData[2] = promise);", + "", + "// start chunk loading", + mainTemplate.hooks.jsonpScript.call("", chunk, hash), + "document.head.appendChild(script);" + ]), + "}" + ]), + "}" + ]); + } + ); + mainTemplate.hooks.requireEnsure.tap( + { + name: "JsonpMainTemplatePlugin preload", + stage: 10 + }, + (source, chunk, hash) => { + const chunkMap = chunk.getChildIdsByOrdersMap().preload; + if (!chunkMap || Object.keys(chunkMap).length === 0) return source; + return Template.asString([ + source, + "", + "// chunk preloadng for javascript", + "", + `var chunkPreloadMap = ${JSON.stringify(chunkMap, null, "\t")};`, + "", + "var chunkPreloadData = chunkPreloadMap[chunkId];", + "if(chunkPreloadData) {", + Template.indent([ + "chunkPreloadData.forEach(function(chunkId) {", + Template.indent([ + "if(installedChunks[chunkId] === undefined) {", + Template.indent([ + "installedChunks[chunkId] = null;", + mainTemplate.hooks.linkPreload.call("", chunk, hash), + "document.head.appendChild(link);" + ]), + "}" + ]), + "});" + ]), + "}" + ]); + } + ); + mainTemplate.hooks.requireExtensions.tap( + "JsonpMainTemplatePlugin", + (source, chunk) => { + if (!needChunkOnDemandLoadingCode(chunk)) return source; + + return Template.asString([ + source, + "", + "// on error function for async loading", + `${mainTemplate.requireFn}.oe = function(err) { console.error(err); throw err; };` + ]); + } + ); + mainTemplate.hooks.bootstrap.tap( + "JsonpMainTemplatePlugin", + (source, chunk, hash) => { + if (needChunkLoadingCode(chunk)) { + const withDefer = needEntryDeferringCode(chunk); + const withPrefetch = needPrefetchingCode(chunk); + return Template.asString([ + source, + "", + "// install a JSONP callback for chunk loading", + "function webpackJsonpCallback(data) {", + Template.indent([ + "var chunkIds = data[0];", + "var moreModules = data[1];", + withDefer ? "var executeModules = data[2];" : "", + withPrefetch ? "var prefetchChunks = data[3] || [];" : "", + '// add "moreModules" to the modules object,', + '// then flag all "chunkIds" as loaded and fire callback', + "var moduleId, chunkId, i = 0, resolves = [];", + "for(;i < chunkIds.length; i++) {", + Template.indent([ + "chunkId = chunkIds[i];", + "if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {", + Template.indent("resolves.push(installedChunks[chunkId][0]);"), + "}", + "installedChunks[chunkId] = 0;" + ]), + "}", + "for(moduleId in moreModules) {", + Template.indent([ + "if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {", + Template.indent( + mainTemplate.renderAddModule( + hash, + chunk, + "moduleId", + "moreModules[moduleId]" + ) + ), + "}" + ]), + "}", + "if(parentJsonpFunction) parentJsonpFunction(data);", + withPrefetch + ? withDefer + ? "deferredPrefetch.push.apply(deferredPrefetch, prefetchChunks);" + : Template.asString([ + "// chunk prefetching for javascript", + "prefetchChunks.forEach(function(chunkId) {", + Template.indent([ + "if(installedChunks[chunkId] === undefined) {", + Template.indent([ + "installedChunks[chunkId] = null;", + mainTemplate.hooks.linkPrefetch.call("", chunk, hash), + "document.head.appendChild(link);" + ]), + "}" + ]), + "});" + ]) + : "", + "while(resolves.length) {", + Template.indent("resolves.shift()();"), + "}", + withDefer + ? Template.asString([ + "", + "// add entry modules from loaded chunk to deferred list", + "deferredModules.push.apply(deferredModules, executeModules || []);", + "", + "// run deferred modules when all chunks ready", + "return checkDeferredModules();" + ]) + : "" + ]), + "};", + withDefer + ? Template.asString([ + "function checkDeferredModules() {", + Template.indent([ + "var result;", + "for(var i = 0; i < deferredModules.length; i++) {", + Template.indent([ + "var deferredModule = deferredModules[i];", + "var fulfilled = true;", + "for(var j = 1; j < deferredModule.length; j++) {", + Template.indent([ + "var depId = deferredModule[j];", + "if(installedChunks[depId] !== 0) fulfilled = false;" + ]), + "}", + "if(fulfilled) {", + Template.indent([ + "deferredModules.splice(i--, 1);", + "result = " + + mainTemplate.requireFn + + "(" + + mainTemplate.requireFn + + ".s = deferredModule[0]);" + ]), + "}" + ]), + "}", + withPrefetch + ? Template.asString([ + "if(deferredModules.length === 0) {", + Template.indent([ + "// chunk prefetching for javascript", + "deferredPrefetch.forEach(function(chunkId) {", + Template.indent([ + "if(installedChunks[chunkId] === undefined) {", + Template.indent([ + "installedChunks[chunkId] = null;", + mainTemplate.hooks.linkPrefetch.call( + "", + chunk, + hash + ), + "document.head.appendChild(link);" + ]), + "}" + ]), + "});", + "deferredPrefetch.length = 0;" + ]), + "}" + ]) + : "", + "return result;" + ]), + "}" + ]) + : "" + ]); + } + return source; + } + ); + mainTemplate.hooks.beforeStartup.tap( + "JsonpMainTemplatePlugin", + (source, chunk, hash) => { + if (needChunkLoadingCode(chunk)) { + var jsonpFunction = mainTemplate.outputOptions.jsonpFunction; + var globalObject = mainTemplate.outputOptions.globalObject; + return Template.asString([ + `var jsonpArray = ${globalObject}[${JSON.stringify( + jsonpFunction + )}] = ${globalObject}[${JSON.stringify(jsonpFunction)}] || [];`, + "var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);", + "jsonpArray.push = webpackJsonpCallback;", + "jsonpArray = jsonpArray.slice();", + "for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);", + "var parentJsonpFunction = oldJsonpFunction;", + "", + source + ]); + } + return source; + } + ); + mainTemplate.hooks.afterStartup.tap( + "JsonpMainTemplatePlugin", + (source, chunk, hash) => { + const prefetchChunks = chunk.getChildIdsByOrders().prefetch; + if ( + needChunkLoadingCode(chunk) && + prefetchChunks && + prefetchChunks.length + ) { + return Template.asString([ + source, + `webpackJsonpCallback([[], {}, 0, ${JSON.stringify( + prefetchChunks + )}]);` + ]); + } + return source; + } + ); + mainTemplate.hooks.startup.tap( + "JsonpMainTemplatePlugin", + (source, chunk, hash) => { + if (needEntryDeferringCode(chunk)) { + if (chunk.hasEntryModule()) { + const entries = [chunk.entryModule].filter(Boolean).map(m => + [m.id].concat( + Array.from(chunk.groupsIterable)[0] + .chunks.filter(c => c !== chunk) + .map(c => c.id) + ) + ); + return Template.asString([ + "// add entry module to deferred list", + `deferredModules.push(${entries + .map(e => JSON.stringify(e)) + .join(", ")});`, + "// run deferred modules when ready", + "return checkDeferredModules();" + ]); + } else { + return Template.asString([ + "// run deferred modules from other chunks", + "checkDeferredModules();" + ]); + } + } + return source; + } + ); + mainTemplate.hooks.hotBootstrap.tap( + "JsonpMainTemplatePlugin", + (source, chunk, hash) => { + const globalObject = mainTemplate.outputOptions.globalObject; + const hotUpdateChunkFilename = + mainTemplate.outputOptions.hotUpdateChunkFilename; + const hotUpdateMainFilename = + mainTemplate.outputOptions.hotUpdateMainFilename; + const crossOriginLoading = + mainTemplate.outputOptions.crossOriginLoading; + const hotUpdateFunction = mainTemplate.outputOptions.hotUpdateFunction; + const currentHotUpdateChunkFilename = mainTemplate.getAssetPath( + JSON.stringify(hotUpdateChunkFilename), + { + hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode(hash, length)} + "`, + chunk: { + id: '" + chunkId + "' + } + } + ); + const currentHotUpdateMainFilename = mainTemplate.getAssetPath( + JSON.stringify(hotUpdateMainFilename), + { + hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode(hash, length)} + "` + } + ); + const runtimeSource = Template.getFunctionContent( + __webpack_require__(24916) + ) + .replace(/\/\/\$semicolon/g, ";") + .replace(/\$require\$/g, mainTemplate.requireFn) + .replace( + /\$crossOriginLoading\$/g, + crossOriginLoading ? JSON.stringify(crossOriginLoading) : "null" + ) + .replace(/\$hotMainFilename\$/g, currentHotUpdateMainFilename) + .replace(/\$hotChunkFilename\$/g, currentHotUpdateChunkFilename) + .replace(/\$hash\$/g, JSON.stringify(hash)); + return `${source} +function hotDisposeChunk(chunkId) { + delete installedChunks[chunkId]; +} +var parentHotUpdateCallback = ${globalObject}[${JSON.stringify( + hotUpdateFunction + )}]; +${globalObject}[${JSON.stringify(hotUpdateFunction)}] = ${runtimeSource}`; + } + ); + mainTemplate.hooks.hash.tap("JsonpMainTemplatePlugin", hash => { + hash.update("jsonp"); + hash.update("6"); + }); + } +} +module.exports = JsonpMainTemplatePlugin; + + +/***/ }), + +/***/ 92764: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const JsonpMainTemplatePlugin = __webpack_require__(38017); +const JsonpChunkTemplatePlugin = __webpack_require__(31898); +const JsonpHotUpdateChunkTemplatePlugin = __webpack_require__(44458); + +class JsonpTemplatePlugin { + apply(compiler) { + compiler.hooks.thisCompilation.tap("JsonpTemplatePlugin", compilation => { + new JsonpMainTemplatePlugin().apply(compilation.mainTemplate); + new JsonpChunkTemplatePlugin().apply(compilation.chunkTemplate); + new JsonpHotUpdateChunkTemplatePlugin().apply( + compilation.hotUpdateChunkTemplate + ); + }); + } +} + +module.exports = JsonpTemplatePlugin; + + +/***/ }), + +/***/ 92929: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Compiler = __webpack_require__(58705); +const MultiCompiler = __webpack_require__(10238); +const NodeEnvironmentPlugin = __webpack_require__(52520); +const WebpackOptionsApply = __webpack_require__(2779); +const WebpackOptionsDefaulter = __webpack_require__(60016); +const validateSchema = __webpack_require__(68935); +const WebpackOptionsValidationError = __webpack_require__(285); +const webpackOptionsSchema = __webpack_require__(37863); +const RemovedPluginError = __webpack_require__(15377); +const version = __webpack_require__(71618)/* .version */ .i8; + +/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} WebpackOptions */ + +/** + * @param {WebpackOptions} options options object + * @param {function(Error=, Stats=): void=} callback callback + * @returns {Compiler | MultiCompiler} the compiler object + */ +const webpack = (options, callback) => { + const webpackOptionsValidationErrors = validateSchema( + webpackOptionsSchema, + options + ); + if (webpackOptionsValidationErrors.length) { + throw new WebpackOptionsValidationError(webpackOptionsValidationErrors); + } + let compiler; + if (Array.isArray(options)) { + compiler = new MultiCompiler( + Array.from(options).map(options => webpack(options)) + ); + } else if (typeof options === "object") { + options = new WebpackOptionsDefaulter().process(options); + + compiler = new Compiler(options.context); + compiler.options = options; + new NodeEnvironmentPlugin({ + infrastructureLogging: options.infrastructureLogging + }).apply(compiler); + if (options.plugins && Array.isArray(options.plugins)) { + for (const plugin of options.plugins) { + if (typeof plugin === "function") { + plugin.call(compiler, compiler); + } else { + plugin.apply(compiler); + } + } + } + compiler.hooks.environment.call(); + compiler.hooks.afterEnvironment.call(); + compiler.options = new WebpackOptionsApply().process(options, compiler); + } else { + throw new Error("Invalid argument: options"); + } + if (callback) { + if (typeof callback !== "function") { + throw new Error("Invalid argument: callback"); + } + if ( + options.watch === true || + (Array.isArray(options) && options.some(o => o.watch)) + ) { + const watchOptions = Array.isArray(options) + ? options.map(o => o.watchOptions || {}) + : options.watchOptions || {}; + return compiler.watch(watchOptions, callback); + } + compiler.run(callback); + } + return compiler; +}; + +exports = module.exports = webpack; +exports.version = version; + +webpack.WebpackOptionsDefaulter = WebpackOptionsDefaulter; +webpack.WebpackOptionsApply = WebpackOptionsApply; +webpack.Compiler = Compiler; +webpack.MultiCompiler = MultiCompiler; +webpack.NodeEnvironmentPlugin = NodeEnvironmentPlugin; +// @ts-ignore Global @this directive is not supported +webpack.validate = validateSchema.bind(this, webpackOptionsSchema); +webpack.validateSchema = validateSchema; +webpack.WebpackOptionsValidationError = WebpackOptionsValidationError; + +const exportPlugins = (obj, mappings) => { + for (const name of Object.keys(mappings)) { + Object.defineProperty(obj, name, { + configurable: false, + enumerable: true, + get: mappings[name] + }); + } +}; + +exportPlugins(exports, { + AutomaticPrefetchPlugin: () => __webpack_require__(51596), + BannerPlugin: () => __webpack_require__(4009), + CachePlugin: () => __webpack_require__(6465), + ContextExclusionPlugin: () => __webpack_require__(10706), + ContextReplacementPlugin: () => __webpack_require__(27295), + DefinePlugin: () => __webpack_require__(97374), + Dependency: () => __webpack_require__(57282), + DllPlugin: () => __webpack_require__(45255), + DllReferencePlugin: () => __webpack_require__(86231), + EnvironmentPlugin: () => __webpack_require__(6098), + EvalDevToolModulePlugin: () => __webpack_require__(65200), + EvalSourceMapDevToolPlugin: () => __webpack_require__(99994), + ExtendedAPIPlugin: () => __webpack_require__(17270), + ExternalsPlugin: () => __webpack_require__(75705), + HashedModuleIdsPlugin: () => __webpack_require__(50268), + HotModuleReplacementPlugin: () => __webpack_require__(69575), + IgnorePlugin: () => __webpack_require__(41364), + LibraryTemplatePlugin: () => __webpack_require__(65237), + LoaderOptionsPlugin: () => __webpack_require__(48775), + LoaderTargetPlugin: () => __webpack_require__(95154), + MemoryOutputFileSystem: () => __webpack_require__(50332), + Module: () => __webpack_require__(75993), + ModuleFilenameHelpers: () => __webpack_require__(71474), + NamedChunksPlugin: () => __webpack_require__(70419), + NamedModulesPlugin: () => __webpack_require__(86707), + NoEmitOnErrorsPlugin: () => __webpack_require__(22615), + NormalModuleReplacementPlugin: () => + __webpack_require__(73253), + PrefetchPlugin: () => __webpack_require__(27850), + ProgressPlugin: () => __webpack_require__(63123), + ProvidePlugin: () => __webpack_require__(72861), + SetVarMainTemplatePlugin: () => __webpack_require__(37098), + SingleEntryPlugin: () => __webpack_require__(19070), + SourceMapDevToolPlugin: () => __webpack_require__(11851), + Stats: () => __webpack_require__(99977), + Template: () => __webpack_require__(96066), + UmdMainTemplatePlugin: () => __webpack_require__(75374), + WatchIgnorePlugin: () => __webpack_require__(88015) +}); +exportPlugins((exports.dependencies = {}), { + DependencyReference: () => __webpack_require__(71722) +}); +exportPlugins((exports.optimize = {}), { + AggressiveMergingPlugin: () => __webpack_require__(88197), + AggressiveSplittingPlugin: () => + __webpack_require__(26688), + ChunkModuleIdRangePlugin: () => + __webpack_require__(30346), + LimitChunkCountPlugin: () => __webpack_require__(3846), + MinChunkSizePlugin: () => __webpack_require__(55607), + ModuleConcatenationPlugin: () => + __webpack_require__(45184), + OccurrenceOrderPlugin: () => __webpack_require__(67340), + OccurrenceModuleOrderPlugin: () => + __webpack_require__(62000), + OccurrenceChunkOrderPlugin: () => + __webpack_require__(83741), + RuntimeChunkPlugin: () => __webpack_require__(76894), + SideEffectsFlagPlugin: () => __webpack_require__(83654), + SplitChunksPlugin: () => __webpack_require__(60474) +}); +exportPlugins((exports.web = {}), { + FetchCompileWasmTemplatePlugin: () => + __webpack_require__(52669), + JsonpTemplatePlugin: () => __webpack_require__(92764) +}); +exportPlugins((exports.webworker = {}), { + WebWorkerTemplatePlugin: () => __webpack_require__(21328) +}); +exportPlugins((exports.node = {}), { + NodeTemplatePlugin: () => __webpack_require__(90010), + ReadFileCompileWasmTemplatePlugin: () => + __webpack_require__(73839) +}); +exportPlugins((exports.debug = {}), { + ProfilingPlugin: () => __webpack_require__(72890) +}); +exportPlugins((exports.util = {}), { + createHash: () => __webpack_require__(15660) +}); + +const defineMissingPluginError = (namespace, pluginName, errorMessage) => { + Object.defineProperty(namespace, pluginName, { + configurable: false, + enumerable: true, + get() { + throw new RemovedPluginError(errorMessage); + } + }); +}; + +// TODO remove in webpack 5 +defineMissingPluginError( + exports.optimize, + "UglifyJsPlugin", + "webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead." +); + +// TODO remove in webpack 5 +defineMissingPluginError( + exports.optimize, + "CommonsChunkPlugin", + "webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead." +); + + +/***/ }), + +/***/ 37919: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const { ConcatSource } = __webpack_require__(53665); + +class WebWorkerChunkTemplatePlugin { + apply(chunkTemplate) { + chunkTemplate.hooks.render.tap( + "WebWorkerChunkTemplatePlugin", + (modules, chunk) => { + const chunkCallbackName = chunkTemplate.outputOptions.chunkCallbackName; + const globalObject = chunkTemplate.outputOptions.globalObject; + const source = new ConcatSource(); + source.add( + `${globalObject}[${JSON.stringify( + chunkCallbackName + )}](${JSON.stringify(chunk.ids)},` + ); + source.add(modules); + source.add(")"); + return source; + } + ); + chunkTemplate.hooks.hash.tap("WebWorkerChunkTemplatePlugin", hash => { + hash.update("webworker"); + hash.update("3"); + hash.update(`${chunkTemplate.outputOptions.chunkCallbackName}`); + hash.update(`${chunkTemplate.outputOptions.globalObject}`); + }); + } +} +module.exports = WebWorkerChunkTemplatePlugin; + + +/***/ }), + +/***/ 45493: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +const { ConcatSource } = __webpack_require__(53665); + +class WebWorkerHotUpdateChunkTemplatePlugin { + apply(hotUpdateChunkTemplate) { + hotUpdateChunkTemplate.hooks.render.tap( + "WebWorkerHotUpdateChunkTemplatePlugin", + (modulesSource, modules, removedModules, hash, id) => { + const hotUpdateFunction = + hotUpdateChunkTemplate.outputOptions.hotUpdateFunction; + const globalObject = hotUpdateChunkTemplate.outputOptions.globalObject; + const source = new ConcatSource(); + source.add( + `${globalObject}[${JSON.stringify( + hotUpdateFunction + )}](${JSON.stringify(id)},` + ); + source.add(modulesSource); + source.add(")"); + return source; + } + ); + hotUpdateChunkTemplate.hooks.hash.tap( + "WebWorkerHotUpdateChunkTemplatePlugin", + hash => { + hash.update("WebWorkerHotUpdateChunkTemplatePlugin"); + hash.update("3"); + hash.update( + hotUpdateChunkTemplate.outputOptions.hotUpdateFunction + "" + ); + hash.update(hotUpdateChunkTemplate.outputOptions.globalObject + ""); + } + ); + } +} +module.exports = WebWorkerHotUpdateChunkTemplatePlugin; + + +/***/ }), + +/***/ 72337: +/***/ (function(module) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// eslint-disable-next-line no-unused-vars +var hotAddUpdateChunk = undefined; +var parentHotUpdateCallback = undefined; +var $require$ = undefined; +var $hotChunkFilename$ = undefined; +var $hotMainFilename$ = undefined; +var installedChunks = undefined; +var importScripts = undefined; + +module.exports = function() { + // eslint-disable-next-line no-unused-vars + function webpackHotUpdateCallback(chunkId, moreModules) { + hotAddUpdateChunk(chunkId, moreModules); + if (parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules); + } //$semicolon + + // eslint-disable-next-line no-unused-vars + function hotDownloadUpdateChunk(chunkId) { + importScripts($require$.p + $hotChunkFilename$); + } + + // eslint-disable-next-line no-unused-vars + function hotDownloadManifest(requestTimeout) { + requestTimeout = requestTimeout || 10000; + return new Promise(function(resolve, reject) { + if (typeof XMLHttpRequest === "undefined") { + return reject(new Error("No browser support")); + } + try { + var request = new XMLHttpRequest(); + var requestPath = $require$.p + $hotMainFilename$; + request.open("GET", requestPath, true); + request.timeout = requestTimeout; + request.send(null); + } catch (err) { + return reject(err); + } + request.onreadystatechange = function() { + if (request.readyState !== 4) return; + if (request.status === 0) { + // timeout + reject( + new Error("Manifest request to " + requestPath + " timed out.") + ); + } else if (request.status === 404) { + // no update available + resolve(); + } else if (request.status !== 200 && request.status !== 304) { + // other failure + reject(new Error("Manifest request to " + requestPath + " failed.")); + } else { + // success + try { + var update = JSON.parse(request.responseText); + } catch (e) { + reject(e); + return; + } + resolve(update); + } + }; + }); + } + + //eslint-disable-next-line no-unused-vars + function hotDisposeChunk(chunkId) { + delete installedChunks[chunkId]; + } +}; + + +/***/ }), + +/***/ 20482: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Template = __webpack_require__(96066); + +class WebWorkerMainTemplatePlugin { + apply(mainTemplate) { + const needChunkOnDemandLoadingCode = chunk => { + for (const chunkGroup of chunk.groupsIterable) { + if (chunkGroup.getNumberOfChildren() > 0) return true; + } + return false; + }; + mainTemplate.hooks.localVars.tap( + "WebWorkerMainTemplatePlugin", + (source, chunk) => { + if (needChunkOnDemandLoadingCode(chunk)) { + return Template.asString([ + source, + "", + "// object to store loaded chunks", + '// "1" means "already loaded"', + "var installedChunks = {", + Template.indent( + chunk.ids.map(id => `${JSON.stringify(id)}: 1`).join(",\n") + ), + "};" + ]); + } + return source; + } + ); + mainTemplate.hooks.requireEnsure.tap( + "WebWorkerMainTemplatePlugin", + (_, chunk, hash) => { + const chunkFilename = mainTemplate.outputOptions.chunkFilename; + const chunkMaps = chunk.getChunkMaps(); + return Template.asString([ + "promises.push(Promise.resolve().then(function() {", + Template.indent([ + '// "1" is the signal for "already loaded"', + "if(!installedChunks[chunkId]) {", + Template.indent([ + "importScripts(" + + "__webpack_require__.p + " + + mainTemplate.getAssetPath(JSON.stringify(chunkFilename), { + hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode( + hash, + length + )} + "`, + chunk: { + id: '" + chunkId + "', + hash: `" + ${JSON.stringify(chunkMaps.hash)}[chunkId] + "`, + hashWithLength(length) { + const shortChunkHashMap = Object.create(null); + for (const chunkId of Object.keys(chunkMaps.hash)) { + if (typeof chunkMaps.hash[chunkId] === "string") { + shortChunkHashMap[chunkId] = chunkMaps.hash[ + chunkId + ].substr(0, length); + } + } + return `" + ${JSON.stringify( + shortChunkHashMap + )}[chunkId] + "`; + }, + contentHash: { + javascript: `" + ${JSON.stringify( + chunkMaps.contentHash.javascript + )}[chunkId] + "` + }, + contentHashWithLength: { + javascript: length => { + const shortContentHashMap = {}; + const contentHash = chunkMaps.contentHash.javascript; + for (const chunkId of Object.keys(contentHash)) { + if (typeof contentHash[chunkId] === "string") { + shortContentHashMap[chunkId] = contentHash[ + chunkId + ].substr(0, length); + } + } + return `" + ${JSON.stringify( + shortContentHashMap + )}[chunkId] + "`; + } + }, + name: `" + (${JSON.stringify( + chunkMaps.name + )}[chunkId]||chunkId) + "` + }, + contentHashType: "javascript" + }) + + ");" + ]), + "}" + ]), + "}));" + ]); + } + ); + mainTemplate.hooks.bootstrap.tap( + "WebWorkerMainTemplatePlugin", + (source, chunk, hash) => { + if (needChunkOnDemandLoadingCode(chunk)) { + const chunkCallbackName = + mainTemplate.outputOptions.chunkCallbackName; + const globalObject = mainTemplate.outputOptions.globalObject; + return Template.asString([ + source, + `${globalObject}[${JSON.stringify( + chunkCallbackName + )}] = function webpackChunkCallback(chunkIds, moreModules) {`, + Template.indent([ + "for(var moduleId in moreModules) {", + Template.indent( + mainTemplate.renderAddModule( + hash, + chunk, + "moduleId", + "moreModules[moduleId]" + ) + ), + "}", + "while(chunkIds.length)", + Template.indent("installedChunks[chunkIds.pop()] = 1;") + ]), + "};" + ]); + } + return source; + } + ); + mainTemplate.hooks.hotBootstrap.tap( + "WebWorkerMainTemplatePlugin", + (source, chunk, hash) => { + const hotUpdateChunkFilename = + mainTemplate.outputOptions.hotUpdateChunkFilename; + const hotUpdateMainFilename = + mainTemplate.outputOptions.hotUpdateMainFilename; + const hotUpdateFunction = mainTemplate.outputOptions.hotUpdateFunction; + const globalObject = mainTemplate.outputOptions.globalObject; + const currentHotUpdateChunkFilename = mainTemplate.getAssetPath( + JSON.stringify(hotUpdateChunkFilename), + { + hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode(hash, length)} + "`, + chunk: { + id: '" + chunkId + "' + } + } + ); + const currentHotUpdateMainFilename = mainTemplate.getAssetPath( + JSON.stringify(hotUpdateMainFilename), + { + hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`, + hashWithLength: length => + `" + ${mainTemplate.renderCurrentHashCode(hash, length)} + "` + } + ); + + return ( + source + + "\n" + + `var parentHotUpdateCallback = ${globalObject}[${JSON.stringify( + hotUpdateFunction + )}];\n` + + `${globalObject}[${JSON.stringify(hotUpdateFunction)}] = ` + + Template.getFunctionContent( + __webpack_require__(72337) + ) + .replace(/\/\/\$semicolon/g, ";") + .replace(/\$require\$/g, mainTemplate.requireFn) + .replace(/\$hotMainFilename\$/g, currentHotUpdateMainFilename) + .replace(/\$hotChunkFilename\$/g, currentHotUpdateChunkFilename) + .replace(/\$hash\$/g, JSON.stringify(hash)) + ); + } + ); + mainTemplate.hooks.hash.tap("WebWorkerMainTemplatePlugin", hash => { + hash.update("webworker"); + hash.update("4"); + }); + } +} +module.exports = WebWorkerMainTemplatePlugin; + + +/***/ }), + +/***/ 21328: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const WebWorkerMainTemplatePlugin = __webpack_require__(20482); +const WebWorkerChunkTemplatePlugin = __webpack_require__(37919); +const WebWorkerHotUpdateChunkTemplatePlugin = __webpack_require__(45493); + +class WebWorkerTemplatePlugin { + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "WebWorkerTemplatePlugin", + compilation => { + new WebWorkerMainTemplatePlugin().apply(compilation.mainTemplate); + new WebWorkerChunkTemplatePlugin().apply(compilation.chunkTemplate); + new WebWorkerHotUpdateChunkTemplatePlugin().apply( + compilation.hotUpdateChunkTemplate + ); + } + ); + } +} +module.exports = WebWorkerTemplatePlugin; + + +/***/ }), + +/***/ 77087: +/***/ (function(__unused_webpack_module, exports) { + +(function (global, factory) { + true ? factory(exports) : + 0; +}(this, function (exports) { 'use strict'; + + // Reserved word lists for various dialects of the language + + var reservedWords = { + 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" + }; + + // And the keywords + + var ecma5AndLessKeywords = "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"; + + var keywords = { + 5: ecma5AndLessKeywords, + "5module": ecma5AndLessKeywords + " export import", + 6: ecma5AndLessKeywords + " const class extends export import super" + }; + + var keywordRelationalOperator = /^in(stanceof)?$/; + + // ## Character categories + + // Big ugly regular expressions that match characters in the + // whitespace, identifier, and identifier-start categories. These + // are only applied when a character is found to actually have a + // code point above 128. + // Generated by `bin/generate-identifier-regex.js`. + var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; + + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + + // These are a run-length and offset encoded representation of the + // >0xffff code points that are a valid part of identifiers. The + // offset starts at 0x10000, and each pair of numbers represents an + // offset to the next range, and then a size of the range. They were + // generated by bin/generate-identifier-regex.js + + // eslint-disable-next-line comma-spacing + var astralIdentifierStartCodes = [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,157,310,10,21,11,7,153,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,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,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,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,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,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,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,2357,44,11,6,17,0,370,43,1301,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,42710,42,4148,12,221,3,5761,15,7472,3104,541]; + + // eslint-disable-next-line comma-spacing + var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,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,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,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,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239]; + + // This has a complexity linear to the value of the code. The + // assumption is that looking up astral identifier characters is + // rare. + function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) { return false } + pos += set[i + 1]; + if (pos >= code) { return true } + } + } + + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code, astral) { + if (code < 65) { return code === 36 } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) + } + + // Test whether a given character is part of an identifier. + + function isIdentifierChar(code, astral) { + if (code < 48) { return code === 36 } + if (code < 58) { return true } + if (code < 65) { return false } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) + } + + // ## Token types + + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. + + // All token type variables start with an underscore, to make them + // easy to recognize. + + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // The `startsExpr` property is used to check if the token ends a + // `yield` expression. It is set on all token types that either can + // directly start an expression (like a quotation mark) or can + // continue an expression (like the body of a string). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; + + function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) + } + var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; + + // Map keyword names to token types. + + var keywords$1 = {}; + + // Succinct definitions of keyword token types + function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name; + return keywords$1[name] = new TokenType(name, options) + } + + var types = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + invalidTemplate: new TokenType("invalidTemplate"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=/===/!==", 6), + relational: binop("/<=/>=", 7), + bitShift: binop("<>/>>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class", startsExpr), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import", startsExpr), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) + }; + + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. + + var lineBreak = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG = new RegExp(lineBreak.source, "g"); + + function isNewLine(code, ecma2019String) { + return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) + } + + var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; + + var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; + + var ref = Object.prototype; + var hasOwnProperty = ref.hasOwnProperty; + var toString = ref.toString; + + // Checks if an object has a property. + + function has(obj, propName) { + return hasOwnProperty.call(obj, propName) + } + + var isArray = Array.isArray || (function (obj) { return ( + toString.call(obj) === "[object Array]" + ); }); + + function wordsRegexp(words) { + return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") + } + + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. + + var Position = function Position(line, col) { + this.line = line; + this.column = col; + }; + + Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) + }; + + var SourceLocation = function SourceLocation(p, start, end) { + this.start = start; + this.end = end; + if (p.sourceFile !== null) { this.source = p.sourceFile; } + }; + + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur; + var match = lineBreakG.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else { + return new Position(line, offset - cur) + } + } + } + + // A second optional argument can be given to further configure + // the parser process. These options are recognized: + + var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must be + // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 + // (2019). This influences support for strict mode, the set of + // reserved words, and support for new syntax features. The default + // is 9. + ecmaVersion: 9, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"` or `"module"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // the position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, await identifiers are allowed to appear at the top-level scope, + // but they are still not allowed in non-async functions. + allowAwaitOutsideFunction: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false + }; + + // Interpret and default an options object + + function getOptions(opts) { + var options = {}; + + for (var opt in defaultOptions) + { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } + + if (options.ecmaVersion >= 2015) + { options.ecmaVersion -= 2009; } + + if (options.allowReserved == null) + { options.allowReserved = options.ecmaVersion < 5; } + + if (isArray(options.onToken)) { + var tokens = options.onToken; + options.onToken = function (token) { return tokens.push(token); }; + } + if (isArray(options.onComment)) + { options.onComment = pushComment(options, options.onComment); } + + return options + } + + function pushComment(options, array) { + return function(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "Block" : "Line", + value: text, + start: start, + end: end + }; + if (options.locations) + { comment.loc = new SourceLocation(this, startLoc, endLoc); } + if (options.ranges) + { comment.range = [start, end]; } + array.push(comment); + } + } + + // Each scope gets a bitset that may contain these flags + var + SCOPE_TOP = 1, + SCOPE_FUNCTION = 2, + SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION, + SCOPE_ASYNC = 4, + SCOPE_GENERATOR = 8, + SCOPE_ARROW = 16, + SCOPE_SIMPLE_CATCH = 32, + SCOPE_SUPER = 64, + SCOPE_DIRECT_SUPER = 128; + + function functionFlags(async, generator) { + return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) + } + + // Used in checkLVal and declareName to determine the type of a binding + var + 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 function + + var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); + var reserved = ""; + if (options.allowReserved !== true) { + for (var v = options.ecmaVersion;; v--) + { if (reserved = reservedWords[v]) { break } } + if (options.sourceType === "module") { reserved += " await"; } + } + this.reservedWords = wordsRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; + this.reservedWordsStrict = wordsRegexp(reservedStrict); + this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); + this.input = String(input); + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false; + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; + } + + // Properties of the current token: + // Its type + this.type = types.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition(); + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; + + // Figure out if it's a module code. + this.inModule = options.sourceType === "module"; + this.strict = this.inModule || this.strictDirective(this.pos); + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; + + // Positions to delayed-check that yield/await does not exist in default parameters. + this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; + // Labels in scope. + this.labels = []; + // Thus-far undefined exports. + this.undefinedExports = {}; + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") + { this.skipLineComment(2); } + + // Scope tracking for duplicate variable names (see scope.js) + this.scopeStack = []; + this.enterScope(SCOPE_TOP); + + // For RegExp validation + this.regexpState = null; + }; + + var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; + + Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode(); + this.nextToken(); + return this.parseTopLevel(node) + }; + + prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; + prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; + prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; + prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; + prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; + prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; + + // Switch to a getter for 7.0.0. + Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; + + Parser.extend = function extend () { + var plugins = [], len = arguments.length; + while ( len-- ) plugins[ len ] = arguments[ len ]; + + var cls = this; + for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } + return cls + }; + + Parser.parse = function parse (input, options) { + return new this(options, input).parse() + }; + + Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { + var parser = new this(options, input, pos); + parser.nextToken(); + return parser.parseExpression() + }; + + Parser.tokenizer = function tokenizer (input, options) { + return new this(options, input) + }; + + Object.defineProperties( Parser.prototype, prototypeAccessors ); + + var pp = Parser.prototype; + + // ## Parser utilities + + var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; + pp.strictDirective = function(start) { + for (;;) { + // Try to find string literal. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + var match = literal.exec(this.input.slice(start)); + if (!match) { return false } + if ((match[1] || match[2]) === "use strict") { return true } + start += match[0].length; + + // Skip semicolon, if any. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + if (this.input[start] === ";") + { start++; } + } + }; + + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. + + pp.eat = function(type) { + if (this.type === type) { + this.next(); + return true + } else { + return false + } + }; + + // Tests whether parsed token is a contextual keyword. + + pp.isContextual = function(name) { + return this.type === types.name && this.value === name && !this.containsEsc + }; + + // Consumes contextual keyword if possible. + + pp.eatContextual = function(name) { + if (!this.isContextual(name)) { return false } + this.next(); + return true + }; + + // Asserts that following token is given contextual keyword. + + pp.expectContextual = function(name) { + if (!this.eatContextual(name)) { this.unexpected(); } + }; + + // Test whether a semicolon can be inserted at the current position. + + pp.canInsertSemicolon = function() { + return this.type === types.eof || + this.type === types.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } + return true + } + }; + + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. + + pp.semicolon = function() { + if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } + }; + + pp.afterTrailingComma = function(tokType, notNext) { + if (this.type === tokType) { + if (this.options.onTrailingComma) + { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } + if (!notNext) + { this.next(); } + return true + } + }; + + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. + + pp.expect = function(type) { + this.eat(type) || this.unexpected(); + }; + + // Raise an unexpected token error. + + pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; + + function DestructuringErrors() { + this.shorthandAssign = + this.trailingComma = + this.parenthesizedAssign = + this.parenthesizedBind = + this.doubleProto = + -1; + } + + pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) { return } + if (refDestructuringErrors.trailingComma > -1) + { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; + if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } + }; + + pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + if (!refDestructuringErrors) { return false } + var shorthandAssign = refDestructuringErrors.shorthandAssign; + var doubleProto = refDestructuringErrors.doubleProto; + if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } + if (shorthandAssign >= 0) + { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } + if (doubleProto >= 0) + { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } + }; + + pp.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) + { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } + if (this.awaitPos) + { this.raise(this.awaitPos, "Await expression cannot be a default value"); } + }; + + pp.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") + { return this.isSimpleAssignTarget(expr.expression) } + return expr.type === "Identifier" || expr.type === "MemberExpression" + }; + + var pp$1 = Parser.prototype; + + // ### Statement parsing + + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. + + pp$1.parseTopLevel = function(node) { + var exports = {}; + if (!node.body) { node.body = []; } + while (this.type !== types.eof) { + var stmt = this.parseStatement(null, true, exports); + node.body.push(stmt); + } + if (this.inModule) + { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) + { + var name = list[i]; + + this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); + } } + this.adaptDirectivePrologue(node.body); + this.next(); + node.sourceType = this.options.sourceType; + return this.finishNode(node, "Program") + }; + + var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; + + pp$1.isLet = function(context) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + // For ambiguous cases, determine if a LexicalDeclaration (or only a + // Statement) is allowed here. If context is not empty then only a Statement + // is allowed. However, `let [` is an explicit negative lookahead for + // ExpressionStatement, so special-case it first. + if (nextCh === 91) { return true } // '[' + if (context) { return false } + + if (nextCh === 123) { return true } // '{' + if (isIdentifierStart(nextCh, true)) { + var pos = next + 1; + while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } + var ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) { return true } + } + return false + }; + + // check 'async [no LineTerminator here] function' + // - 'async /*foo*/ function' is OK. + // - 'async /*\n*/ function' is invalid. + pp$1.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) + { return false } + + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length; + return !lineBreak.test(this.input.slice(this.pos, next)) && + this.input.slice(next, next + 8) === "function" && + (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) + }; + + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo)`, where looking at the previous token + // does not help. + + pp$1.parseStatement = function(context, topLevel, exports) { + var starttype = this.type, node = this.startNode(), kind; + + if (this.isLet(context)) { + starttype = types._var; + kind = "let"; + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case types._debugger: return this.parseDebuggerStatement(node) + case types._do: return this.parseDoStatement(node) + case types._for: return this.parseForStatement(node) + case types._function: + // Function as sole body of either an if statement or a labeled statement + // works, but not when it is part of a labeled statement that is the sole + // body of an if statement. + if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } + return this.parseFunctionStatement(node, false, !context) + case types._class: + if (context) { this.unexpected(); } + return this.parseClass(node, true) + case types._if: return this.parseIfStatement(node) + case types._return: return this.parseReturnStatement(node) + case types._switch: return this.parseSwitchStatement(node) + case types._throw: return this.parseThrowStatement(node) + case types._try: return this.parseTryStatement(node) + case types._const: case types._var: + kind = kind || this.value; + if (context && kind !== "var") { this.unexpected(); } + return this.parseVarStatement(node, kind) + case types._while: return this.parseWhileStatement(node) + case types._with: return this.parseWithStatement(node) + case types.braceL: return this.parseBlock(true, node) + case types.semi: return this.parseEmptyStatement(node) + case types._export: + case types._import: + if (this.options.ecmaVersion > 10 && starttype === types._import) { + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + if (nextCh === 40) // '(' + { return this.parseExpressionStatement(node, this.parseExpression()) } + } + + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } + if (!this.inModule) + { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } + } + return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction()) { + if (context) { this.unexpected(); } + this.next(); + return this.parseFunctionStatement(node, true, !context) + } + + var maybeName = this.value, expr = this.parseExpression(); + if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) + { return this.parseLabeledStatement(node, maybeName, expr, context) } + else { return this.parseExpressionStatement(node, expr) } + } + }; + + pp$1.parseBreakContinueStatement = function(node, keyword) { + var isBreak = keyword === "break"; + this.next(); + if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } + else if (this.type !== types.name) { this.unexpected(); } + else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + var i = 0; + for (; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } + if (node.label && isBreak) { break } + } + } + if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + }; + + pp$1.parseDebuggerStatement = function(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement") + }; + + pp$1.parseDoStatement = function(node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement("do"); + this.labels.pop(); + this.expect(types._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) + { this.eat(types.semi); } + else + { this.semicolon(); } + return this.finishNode(node, "DoWhileStatement") + }; + + // Disambiguating between a `for` and a `for`/`in` or `for`/`of` + // loop is non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in` or `of`. When there is no init + // part (semicolon immediately after the opening parenthesis), it + // is a regular `for` loop. + + pp$1.parseForStatement = function(node) { + this.next(); + var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; + this.labels.push(loopLabel); + this.enterScope(0); + this.expect(types.parenL); + if (this.type === types.semi) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, null) + } + var isLet = this.isLet(); + if (this.type === types._var || this.type === types._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value; + this.next(); + this.parseVar(init$1, true, kind); + this.finishNode(init$1, "VariableDeclaration"); + if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + return this.parseForIn(node, init$1) + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors; + var init = this.parseExpression(true, refDestructuringErrors); + if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + this.toAssignable(init, false, refDestructuringErrors); + this.checkLVal(init); + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init) + }; + + pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) + }; + + pp$1.parseIfStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + // allow function declarations in branches, but only in non-strict mode + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement") + }; + + pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + { this.raise(this.start, "'return' outside of function"); } + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } + else { node.argument = this.parseExpression(); this.semicolon(); } + return this.finishNode(node, "ReturnStatement") + }; + + pp$1.parseSwitchStatement = function(node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(types.braceL); + this.labels.push(switchLabel); + this.enterScope(0); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + var cur; + for (var sawDefault = false; this.type !== types.braceR;) { + if (this.type === types._case || this.type === types._default) { + var isCase = this.type === types._case; + if (cur) { this.finishNode(cur, "SwitchCase"); } + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } + sawDefault = true; + cur.test = null; + } + this.expect(types.colon); + } else { + if (!cur) { this.unexpected(); } + cur.consequent.push(this.parseStatement(null)); + } + } + this.exitScope(); + if (cur) { this.finishNode(cur, "SwitchCase"); } + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement") + }; + + pp$1.parseThrowStatement = function(node) { + this.next(); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + { this.raise(this.lastTokEnd, "Illegal newline after throw"); } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement") + }; + + // Reused empty array added for node fields that are always empty. + + var empty = []; + + pp$1.parseTryStatement = function(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === types._catch) { + var clause = this.startNode(); + this.next(); + if (this.eat(types.parenL)) { + clause.param = this.parseBindingAtom(); + var simple = clause.param.type === "Identifier"; + this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); + this.expect(types.parenR); + } else { + if (this.options.ecmaVersion < 10) { this.unexpected(); } + clause.param = null; + this.enterScope(0); + } + clause.body = this.parseBlock(false); + this.exitScope(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) + { this.raise(node.start, "Missing catch or finally clause"); } + return this.finishNode(node, "TryStatement") + }; + + pp$1.parseVarStatement = function(node, kind) { + this.next(); + this.parseVar(node, false, kind); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration") + }; + + pp$1.parseWhileStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement("while"); + this.labels.pop(); + return this.finishNode(node, "WhileStatement") + }; + + pp$1.parseWithStatement = function(node) { + if (this.strict) { this.raise(this.start, "'with' in strict mode"); } + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement("with"); + return this.finishNode(node, "WithStatement") + }; + + pp$1.parseEmptyStatement = function(node) { + this.next(); + return this.finishNode(node, "EmptyStatement") + }; + + pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { + for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) + { + var label = list[i$1]; + + if (label.name === maybeName) + { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } } + var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; + for (var i = this.labels.length - 1; i >= 0; i--) { + var label$1 = this.labels[i]; + if (label$1.statementStart === node.start) { + // Update information about previous labels on this node + label$1.statementStart = this.start; + label$1.kind = kind; + } else { break } + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement") + }; + + pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement") + }; + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + pp$1.parseBlock = function(createNewLexicalScope, node) { + if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; + if ( node === void 0 ) node = this.startNode(); + + node.body = []; + this.expect(types.braceL); + if (createNewLexicalScope) { this.enterScope(0); } + while (!this.eat(types.braceR)) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + if (createNewLexicalScope) { this.exitScope(); } + return this.finishNode(node, "BlockStatement") + }; + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + pp$1.parseFor = function(node, init) { + node.init = init; + this.expect(types.semi); + node.test = this.type === types.semi ? null : this.parseExpression(); + this.expect(types.semi); + node.update = this.type === types.parenR ? null : this.parseExpression(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, "ForStatement") + }; + + // Parse a `for`/`in` and `for`/`of` loop, which are almost + // same from parser's perspective. + + pp$1.parseForIn = function(node, init) { + var isForIn = this.type === types._in; + this.next(); + + if ( + init.type === "VariableDeclaration" && + init.declarations[0].init != null && + ( + !isForIn || + this.options.ecmaVersion < 8 || + this.strict || + init.kind !== "var" || + init.declarations[0].id.type !== "Identifier" + ) + ) { + this.raise( + init.start, + ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") + ); + } else if (init.type === "AssignmentPattern") { + this.raise(init.start, "Invalid left-hand side in for-loop"); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") + }; + + // Parse a list of variable declarations. + + pp$1.parseVar = function(node, isFor, kind) { + node.declarations = []; + node.kind = kind; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl, kind); + if (this.eat(types.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === "const" && !(this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { + this.unexpected(); + } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types.comma)) { break } + } + return node + }; + + pp$1.parseVarId = function(decl, kind) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); + }; + + var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; + + // Parse a function declaration or literal (depending on the + // `statement & FUNC_STATEMENT`). + + // Remove `allowExpressionBody` for 7.0.0, as it is only called with false + pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { + this.initFunction(node); + if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { + if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) + { this.unexpected(); } + node.generator = this.eat(types.star); + } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + if (statement & FUNC_STATEMENT) { + node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); + if (node.id && !(statement & FUNC_HANGING_STATEMENT)) + // If it is a regular function declaration in sloppy mode, then it is + // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding + // mode depends on properties of the current scope (see + // treatFunctionsAsVar). + { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } + } + + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + + if (!(statement & FUNC_STATEMENT)) + { node.id = this.type === types.name ? this.parseIdent() : null; } + + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") + }; + + pp$1.parseFunctionParams = function(node) { + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + }; + + // Parse a class declaration or literal (depending on the + // `isStatement` parameter). + + pp$1.parseClass = function(node, isStatement) { + this.next(); + + // ecma-262 14.6 Class Definitions + // A class definition is always strict mode code. + var oldStrict = this.strict; + this.strict = true; + + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + var element = this.parseClassElement(node.superClass !== null); + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor") { + if (hadConstructor) { this.raise(element.start, "Duplicate constructor in the same class"); } + hadConstructor = true; + } + } + } + node.body = this.finishNode(classBody, "ClassBody"); + this.strict = oldStrict; + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + }; + + pp$1.parseClassElement = function(constructorAllowsSuper) { + var this$1 = this; + + if (this.eat(types.semi)) { return null } + + var method = this.startNode(); + var tryContextual = function (k, noLineBreak) { + if ( noLineBreak === void 0 ) noLineBreak = false; + + var start = this$1.start, startLoc = this$1.startLoc; + if (!this$1.eatContextual(k)) { return false } + if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } + if (method.key) { this$1.unexpected(); } + method.computed = false; + method.key = this$1.startNodeAt(start, startLoc); + method.key.name = k; + this$1.finishNode(method.key, "Identifier"); + return false + }; + + method.kind = "method"; + method.static = tryContextual("static"); + var isGenerator = this.eat(types.star); + var isAsync = false; + if (!isGenerator) { + if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + } else if (tryContextual("get")) { + method.kind = "get"; + } else if (tryContextual("set")) { + method.kind = "set"; + } + } + if (!method.key) { this.parsePropertyName(method); } + var key = method.key; + var allowsDirectSuper = false; + if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } + 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"); } + method.kind = "constructor"; + allowsDirectSuper = constructorAllowsSuper; + } else if (method.static && key.type === "Identifier" && key.name === "prototype") { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); + if (method.kind === "get" && method.value.params.length !== 0) + { this.raiseRecoverable(method.value.start, "getter should have no params"); } + if (method.kind === "set" && method.value.params.length !== 1) + { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } + if (method.kind === "set" && method.value.params[0].type === "RestElement") + { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } + return method + }; + + pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { + method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); + return this.finishNode(method, "MethodDefinition") + }; + + pp$1.parseClassId = function(node, isStatement) { + if (this.type === types.name) { + node.id = this.parseIdent(); + if (isStatement) + { this.checkLVal(node.id, BIND_LEXICAL, false); } + } else { + if (isStatement === true) + { this.unexpected(); } + node.id = null; + } + }; + + pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; + }; + + // Parses module export declaration. + + pp$1.parseExport = function(node, exports) { + this.next(); + // export * from '...' + if (this.eat(types.star)) { + this.expectContextual("from"); + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(types._default)) { // export default ... + this.checkExport(exports, "default", this.lastTokStart); + var isAsync; + if (this.type === types._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode(); + this.next(); + if (isAsync) { this.next(); } + node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); + } else if (this.type === types._class) { + var cNode = this.startNode(); + node.declaration = this.parseClass(cNode, "nullableID"); + } else { + node.declaration = this.parseMaybeAssign(); + this.semicolon(); + } + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(null); + if (node.declaration.type === "VariableDeclaration") + { this.checkVariableExport(exports, node.declaration.declarations); } + else + { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } + node.specifiers = []; + node.source = null; + } else { // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + } else { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) { + // check for keywords used as local names + var spec = list[i]; + + this.checkUnreserved(spec.local); + // check if export is defined + this.checkLocalExport(spec.local); + } + + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration") + }; + + pp$1.checkExport = function(exports, name, pos) { + if (!exports) { return } + if (has(exports, name)) + { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } + exports[name] = true; + }; + + pp$1.checkPatternExport = function(exports, pat) { + var type = pat.type; + if (type === "Identifier") + { this.checkExport(exports, pat.name, pat.start); } + else if (type === "ObjectPattern") + { for (var i = 0, list = pat.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkPatternExport(exports, prop); + } } + else if (type === "ArrayPattern") + { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { + var elt = list$1[i$1]; + + if (elt) { this.checkPatternExport(exports, elt); } + } } + else if (type === "Property") + { this.checkPatternExport(exports, pat.value); } + else if (type === "AssignmentPattern") + { this.checkPatternExport(exports, pat.left); } + else if (type === "RestElement") + { this.checkPatternExport(exports, pat.argument); } + else if (type === "ParenthesizedExpression") + { this.checkPatternExport(exports, pat.expression); } + }; + + pp$1.checkVariableExport = function(exports, decls) { + if (!exports) { return } + for (var i = 0, list = decls; i < list.length; i += 1) + { + var decl = list[i]; + + this.checkPatternExport(exports, decl.id); + } + }; + + pp$1.shouldParseExportStatement = function() { + return this.type.keyword === "var" || + this.type.keyword === "const" || + this.type.keyword === "class" || + this.type.keyword === "function" || + this.isLet() || + this.isAsyncFunction() + }; + + // Parses a comma-separated list of module exports. + + pp$1.parseExportSpecifiers = function(exports) { + var nodes = [], first = true; + // export { x, y as z } [from '...'] + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node = this.startNode(); + node.local = this.parseIdent(true); + node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; + this.checkExport(exports, node.exported.name, node.exported.start); + nodes.push(this.finishNode(node, "ExportSpecifier")); + } + return nodes + }; + + // Parses import declaration. + + pp$1.parseImport = function(node) { + this.next(); + // import '...' + if (this.type === types.string) { + node.specifiers = empty; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); + } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration") + }; + + // Parses a comma-separated list of module imports. + + pp$1.parseImportSpecifiers = function() { + var nodes = [], first = true; + if (this.type === types.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLVal(node.local, BIND_LEXICAL); + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); + if (!this.eat(types.comma)) { return nodes } + } + if (this.type === types.star) { + var node$1 = this.startNode(); + this.next(); + this.expectContextual("as"); + node$1.local = this.parseIdent(); + this.checkLVal(node$1.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); + return nodes + } + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node$2 = this.startNode(); + node$2.imported = this.parseIdent(true); + if (this.eatContextual("as")) { + node$2.local = this.parseIdent(); + } else { + this.checkUnreserved(node$2.imported); + node$2.local = node$2.imported; + } + this.checkLVal(node$2.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$2, "ImportSpecifier")); + } + return nodes + }; + + // Set `ExpressionStatement#directive` property for directive prologues. + pp$1.adaptDirectivePrologue = function(statements) { + for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { + statements[i].directive = statements[i].expression.raw.slice(1, -1); + } + }; + pp$1.isDirectiveCandidate = function(statement) { + return ( + statement.type === "ExpressionStatement" && + statement.expression.type === "Literal" && + typeof statement.expression.value === "string" && + // Reject parenthesized strings. + (this.input[statement.start] === "\"" || this.input[statement.start] === "'") + ) + }; + + var pp$2 = Parser.prototype; + + // Convert existing expression atom to assignable pattern + // if possible. + + pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + if (this.inAsync && node.name === "await") + { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } + break + + case "ObjectPattern": + case "ArrayPattern": + case "RestElement": + break + + case "ObjectExpression": + node.type = "ObjectPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.toAssignable(prop, isBinding); + // Early error: + // AssignmentRestProperty[Yield, Await] : + // `...` DestructuringAssignmentTarget[Yield, Await] + // + // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. + if ( + prop.type === "RestElement" && + (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") + ) { + this.raise(prop.argument.start, "Unexpected token"); + } + } + break + + case "Property": + // AssignmentProperty has type === "Property" + if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } + this.toAssignable(node.value, isBinding); + break + + case "ArrayExpression": + node.type = "ArrayPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + this.toAssignableList(node.elements, isBinding); + break + + case "SpreadElement": + node.type = "RestElement"; + this.toAssignable(node.argument, isBinding); + if (node.argument.type === "AssignmentPattern") + { this.raise(node.argument.start, "Rest elements cannot have a default value"); } + break + + case "AssignmentExpression": + if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isBinding); + // falls through to AssignmentPattern + + case "AssignmentPattern": + break + + case "ParenthesizedExpression": + this.toAssignable(node.expression, isBinding, refDestructuringErrors); + break + + case "MemberExpression": + if (!isBinding) { break } + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + return node + }; + + // Convert list of expression atoms to binding list. + + pp$2.toAssignableList = function(exprList, isBinding) { + var end = exprList.length; + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) { this.toAssignable(elt, isBinding); } + } + if (end) { + var last = exprList[end - 1]; + if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + { this.unexpected(last.argument.start); } + } + return exprList + }; + + // Parses spread element. + + pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refDestructuringErrors); + return this.finishNode(node, "SpreadElement") + }; + + pp$2.parseRestBinding = function() { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (this.options.ecmaVersion === 6 && this.type !== types.name) + { this.unexpected(); } + + node.argument = this.parseBindingAtom(); + + return this.finishNode(node, "RestElement") + }; + + // Parses lvalue (assignable) atom. + + pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) { + switch (this.type) { + case types.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types.bracketR, true, true); + return this.finishNode(node, "ArrayPattern") + + case types.braceL: + return this.parseObj(true) + } + } + return this.parseIdent() + }; + + pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { + var elts = [], first = true; + while (!this.eat(close)) { + if (first) { first = false; } + else { this.expect(types.comma); } + if (allowEmpty && this.type === types.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break + } else if (this.type === types.ellipsis) { + var rest = this.parseRestBinding(); + this.parseBindingListItem(rest); + elts.push(rest); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + this.expect(close); + break + } else { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + elts.push(elem); + } + } + return elts + }; + + pp$2.parseBindingListItem = function(param) { + return param + }; + + // Parses assignment pattern around given atom if possible. + + pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern") + }; + + // Verify that a node is an lval — something that can be assigned + // to. + // bindingType can be either: + // 'var' indicating that the lval creates a 'var' binding + // 'let' indicating that the lval creates a lexical ('let' or 'const') binding + // 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references + + pp$2.checkLVal = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "Identifier": + if (bindingType === BIND_LEXICAL && expr.name === "let") + { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } + if (checkClashes) { + if (has(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + break + + case "MemberExpression": + if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } + break + + case "ObjectPattern": + for (var i = 0, list = expr.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkLVal(prop, bindingType, checkClashes); + } + break + + case "Property": + // AssignmentProperty has type === "Property" + this.checkLVal(expr.value, bindingType, checkClashes); + break + + case "ArrayPattern": + for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { + var elem = list$1[i$1]; + + if (elem) { this.checkLVal(elem, bindingType, checkClashes); } + } + break + + case "AssignmentPattern": + this.checkLVal(expr.left, bindingType, checkClashes); + break + + case "RestElement": + this.checkLVal(expr.argument, bindingType, checkClashes); + break + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, bindingType, checkClashes); + break + + default: + this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); + } + }; + + // A recursive descent parser operates by defining functions for all + + var pp$3 = Parser.prototype; + + // Check if property name clashes with already added. + // Object/class getters and setters are not allowed to clash — + // either with each other or with an init property — and in + // strict mode, init properties are also not allowed to be repeated. + + pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { + if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") + { return } + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + { return } + var key = prop.key; + var name; + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) { + if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } + // Backwards-compat kludge. Can be removed in version 6.0 + else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } + } + propHash.proto = true; + } + return + } + name = "$" + name; + var other = propHash[name]; + if (other) { + var redefinition; + if (kind === "init") { + redefinition = this.strict && other.init || other.get || other.set; + } else { + redefinition = other.init || other[kind]; + } + if (redefinition) + { this.raiseRecoverable(key.start, "Redefinition of property"); } + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The optional arguments are used to + // forbid the `in` operator (in for loops initalization expressions) + // and provide reference for storing '=' operator inside shorthand + // property assignment in contexts where both object expression + // and object pattern might appear (so it's possible to raise + // delayed syntax error at correct position). + + pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); + if (this.type === types.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(types.comma)) { node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); } + return this.finishNode(node, "SequenceExpression") + } + return expr + }; + + // Parse an assignment expression. This includes applications of + // operators like `+=`. + + pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) { return this.parseYield(noIn) } + // The tokenizer will assume an expression is allowed after + // `yield`, but this isn't that kind of yield + else { this.exprAllowed = false; } + } + + var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldShorthandAssign = refDestructuringErrors.shorthandAssign; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; + } else { + refDestructuringErrors = new DestructuringErrors; + ownDestructuringErrors = true; + } + + var startPos = this.start, startLoc = this.startLoc; + if (this.type === types.parenL || this.type === types.name) + { this.potentialArrowAt = this.start; } + var left = this.parseMaybeConditional(noIn, refDestructuringErrors); + if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } + if (this.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; + if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } + refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly + this.checkLVal(left); + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } + } + if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } + if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } + if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } + return left + }; + + // Parse a ternary conditional (`?:`) operator. + + pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprOps(noIn, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + if (this.eat(types.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(types.colon); + node.alternate = this.parseMaybeAssign(noIn); + return this.finishNode(node, "ConditionalExpression") + } + return expr + }; + + // Start the precedence parser. + + pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors, false); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) + }; + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop; + if (prec != null && (!noIn || this.type !== types._in)) { + if (prec > minPrec) { + var logical = this.type === types.logicalOR || this.type === types.logicalAND; + var op = this.value; + this.next(); + var startPos = this.start, startLoc = this.startLoc; + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left + }; + + pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.operator = op; + node.right = right; + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") + }; + + // Parse unary operators, both prefix and postfix. + + pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var startPos = this.start, startLoc = this.startLoc, expr; + if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { + expr = this.parseAwait(); + sawUnary = true; + } else if (this.type.prefix) { + var node = this.startNode(), update = this.type === types.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(null, true); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) { this.checkLVal(node.argument); } + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } + else { sawUnary = true; } + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } else { + expr = this.parseExprSubscripts(refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.operator = this.value; + node$1.prefix = false; + node$1.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node$1, "UpdateExpression"); + } + } + + if (!sawUnary && this.eat(types.starstar)) + { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } + else + { return expr } + }; + + // Parse call, dot, and `[]`-subscript expressions. + + pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors); + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } + var result = this.parseSubscripts(expr, startPos, startLoc); + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } + if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } + } + return result + }; + + pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && + this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; + while (true) { + var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); + if (element === base || element.type === "ArrowFunctionExpression") { return element } + base = element; + } + }; + + pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { + var computed = this.eat(types.bracketL); + if (computed || this.eat(types.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = computed ? this.parseExpression() : this.parseIdent(this.options.allowReserved !== "never"); + node.computed = !!computed; + if (computed) { this.expect(types.bracketR); } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(types.parenL)) { + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && base.type !== "Import", false, refDestructuringErrors); + if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + 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; + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.callee = base; + node$1.arguments = exprList; + if (node$1.callee.type === "Import") { + if (node$1.arguments.length !== 1) { + this.raise(node$1.start, "import() requires exactly one argument"); + } + + var importArg = node$1.arguments[0]; + if (importArg && importArg.type === "SpreadElement") { + this.raise(importArg.start, "... is not allowed in import()"); + } + } + base = this.finishNode(node$1, "CallExpression"); + } else if (this.type === types.backQuote) { + var node$2 = this.startNodeAt(startPos, startLoc); + node$2.tag = base; + node$2.quasi = this.parseTemplate({isTagged: true}); + base = this.finishNode(node$2, "TaggedTemplateExpression"); + } + return base + }; + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + pp$3.parseExprAtom = function(refDestructuringErrors) { + // If a division operator appears in an expression position, the + // tokenizer got confused, and we force it to read a regexp instead. + if (this.type === types.slash) { this.readRegexp(); } + + var node, canBeArrow = this.potentialArrowAt === this.start; + switch (this.type) { + case types._super: + if (!this.allowSuper) + { this.raise(this.start, "'super' keyword outside a method"); } + node = this.startNode(); + this.next(); + if (this.type === types.parenL && !this.allowDirectSuper) + { this.raise(node.start, "super() call outside constructor of a subclass"); } + // The `super` keyword can appear at below: + // SuperProperty: + // super [ Expression ] + // super . IdentifierName + // SuperCall: + // super Arguments + if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) + { this.unexpected(); } + return this.finishNode(node, "Super") + + case types._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression") + + case types.name: + var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + var id = this.parseIdent(false); + if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) + { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(types.arrow)) + { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(types.arrow)) + { this.unexpected(); } + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) + } + } + return id + + case types.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = {pattern: value.pattern, flags: value.flags}; + return node + + case types.num: case types.string: + return this.parseLiteral(this.value) + + case types._null: case types._true: case types._false: + node = this.startNode(); + node.value = this.type === types._null ? null : this.type === types._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal") + + case types.parenL: + var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) + { refDestructuringErrors.parenthesizedAssign = start; } + if (refDestructuringErrors.parenthesizedBind < 0) + { refDestructuringErrors.parenthesizedBind = start; } + } + return expr + + case types.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression") + + case types.braceL: + return this.parseObj(false, refDestructuringErrors) + + case types._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, 0) + + case types._class: + return this.parseClass(this.startNode(), false) + + case types._new: + return this.parseNew() + + case types.backQuote: + return this.parseTemplate() + + case types._import: + if (this.options.ecmaVersion > 10) { + return this.parseDynamicImport() + } else { + return this.unexpected() + } + + default: + this.unexpected(); + } + }; + + pp$3.parseDynamicImport = function() { + var node = this.startNode(); + this.next(); + if (this.type !== types.parenL) { + this.unexpected(); + } + return this.finishNode(node, "Import") + }; + + pp$3.parseLiteral = function(value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1); } + this.next(); + return this.finishNode(node, "Literal") + }; + + pp$3.parseParenExpression = function() { + this.expect(types.parenL); + var val = this.parseExpression(); + this.expect(types.parenR); + return val + }; + + pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + + var innerStartPos = this.start, innerStartLoc = this.startLoc; + var exprList = [], first = true, lastIsComma = false; + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + // Do not save awaitIdentPos to allow checking awaits nested in parameters + while (this.type !== types.parenR) { + first ? first = false : this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(types.parenR, true)) { + lastIsComma = true; + break + } else if (this.type === types.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + break + } else { + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc; + this.expect(types.parenR); + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + 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) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } + }; + + pp$3.parseParenItem = function(item) { + return item + }; + + pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) + }; + + // New's precedence is slightly tricky. It must allow its argument to + // be a `[]` or dot subscript expression, but not a call — at least, + // not without wrapping it in parentheses. Thus, it uses the noCalls + // argument to parseSubscripts to prevent it from consuming the + // argument list. + + var empty$1 = []; + + pp$3.parseNew = function() { + var node = this.startNode(); + var meta = this.parseIdent(true); + if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { + node.meta = meta; + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target" || containsEsc) + { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } + if (!this.inNonArrowFunction()) + { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc; + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + if (this.options.ecmaVersion > 10 && node.callee.type === "Import") { + this.raise(node.callee.start, "Cannot use new with import(...)"); + } + if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && node.callee.type !== "Import", false); } + else { node.arguments = empty$1; } + return this.finishNode(node, "NewExpression") + }; + + // Parse template expression. + + pp$3.parseTemplateElement = function(ref) { + var isTagged = ref.isTagged; + + var elem = this.startNode(); + if (this.type === types.invalidTemplate) { + if (!isTagged) { + this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); + } + elem.value = { + raw: this.value, + cooked: null + }; + } else { + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + cooked: this.value + }; + } + this.next(); + elem.tail = this.type === types.backQuote; + return this.finishNode(elem, "TemplateElement") + }; + + pp$3.parseTemplate = function(ref) { + if ( ref === void 0 ) ref = {}; + var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; + + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement({isTagged: isTagged}); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === types.eof) { this.raise(this.pos, "Unterminated template literal"); } + this.expect(types.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types.braceR); + node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); + } + this.next(); + return this.finishNode(node, "TemplateLiteral") + }; + + pp$3.isAsyncProp = function(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && + (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && + !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + // Parse an object literal or binding pattern. + + pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var node = this.startNode(), first = true, propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var prop = this.parseProperty(isPattern, refDestructuringErrors); + if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } + node.properties.push(prop); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") + }; + + pp$3.parseProperty = function(isPattern, refDestructuringErrors) { + var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; + if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { + if (isPattern) { + prop.argument = this.parseIdent(false); + if (this.type === types.comma) { + this.raise(this.start, "Comma is not permitted after the rest element"); + } + return this.finishNode(prop, "RestElement") + } + // To disallow parenthesized identifier via `this.toAssignable()`. + if (this.type === types.parenL && refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0) { + refDestructuringErrors.parenthesizedAssign = this.start; + } + if (refDestructuringErrors.parenthesizedBind < 0) { + refDestructuringErrors.parenthesizedBind = this.start; + } + } + // Parse argument. + prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); + // To disallow trailing comma via `this.toAssignable()`. + if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + // Finish + return this.finishNode(prop, "SpreadElement") + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) + { isGenerator = this.eat(types.star); } + } + var containsEsc = this.containsEsc; + this.parsePropertyName(prop); + if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + this.parsePropertyName(prop, refDestructuringErrors); + } else { + isAsync = false; + } + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); + return this.finishNode(prop, "Property") + }; + + pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if ((isGenerator || isAsync) && this.type === types.colon) + { this.unexpected(); } + + if (this.eat(types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { + if (isPattern) { this.unexpected(); } + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + } else if (!isPattern && !containsEsc && + this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type !== types.comma && this.type !== types.braceR)) { + if (isGenerator || isAsync) { this.unexpected(); } + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var 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"); } + } + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (isGenerator || isAsync) { this.unexpected(); } + this.checkUnreserved(prop.key); + if (prop.key.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = startPos; } + prop.kind = "init"; + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else if (this.type === types.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) + { refDestructuringErrors.shorthandAssign = this.start; } + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else { + prop.value = prop.key; + } + prop.shorthand = true; + } else { this.unexpected(); } + }; + + pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(types.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types.bracketR); + return prop.key + } else { + prop.computed = false; + } + } + return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never") + }; + + // Initialize empty function node. + + pp$3.initFunction = function(node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } + if (this.options.ecmaVersion >= 8) { node.async = false; } + }; + + // Parse object or class method. + + pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { + var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.initFunction(node); + if (this.options.ecmaVersion >= 6) + { node.generator = isGenerator; } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "FunctionExpression") + }; + + // Parse arrow function expression with given parameters. + + pp$3.parseArrowExpression = function(node, params, isAsync) { + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node); + if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "ArrowFunctionExpression") + }; + + // Parse function body and check parameters. + + pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { + var isExpression = isArrowFunction && this.type !== types.braceL; + var oldStrict = this.strict, useStrict = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + this.checkParams(node, false); + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end); + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) + { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } + } + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldLabels = this.labels; + this.labels = []; + if (useStrict) { this.strict = true; } + + // Add the params to varDeclaredNames to ensure that an error is thrown + // if a let/const declaration in the function clashes with one of the params. + this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); + node.body = this.parseBlock(false); + node.expression = false; + this.adaptDirectivePrologue(node.body.body); + this.labels = oldLabels; + } + this.exitScope(); + + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } + this.strict = oldStrict; + }; + + pp$3.isSimpleParamList = function(params) { + for (var i = 0, list = params; i < list.length; i += 1) + { + var param = list[i]; + + if (param.type !== "Identifier") { return false + } } + return true + }; + + // Checks function params for various disallowed patterns such as using "eval" + // or "arguments" and duplicate parameters. + + pp$3.checkParams = function(node, allowDuplicates) { + var nameHash = {}; + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); + } + }; + + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) { break } + } else { first = false; } + + var elt = (void 0); + if (allowEmpty && this.type === types.comma) + { elt = null; } + else if (this.type === types.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (refDestructuringErrors && this.type === types.comma && refDestructuringErrors.trailingComma < 0) + { refDestructuringErrors.trailingComma = this.start; } + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors); + } + elts.push(elt); + } + return elts + }; + + pp$3.checkUnreserved = function(ref) { + var start = ref.start; + var end = ref.end; + var name = ref.name; + + if (this.inGenerator && name === "yield") + { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } + if (this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } + if (this.keywords.test(name)) + { this.raise(start, ("Unexpected keyword '" + name + "'")); } + if (this.options.ecmaVersion < 6 && + this.input.slice(start, end).indexOf("\\") !== -1) { return } + var re = this.strict ? this.reservedWordsStrict : this.reservedWords; + if (re.test(name)) { + if (!this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } + this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); + } + }; + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + pp$3.parseIdent = function(liberal, isBinding) { + var node = this.startNode(); + if (this.type === types.name) { + node.name = this.value; + } else if (this.type.keyword) { + node.name = this.type.keyword; + + // To fix https://github.com/acornjs/acorn/issues/575 + // `class` and `function` keywords push new context into this.context. + // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. + // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword + if ((node.name === "class" || node.name === "function") && + (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { + this.context.pop(); + } + } else { + this.unexpected(); + } + this.next(); + this.finishNode(node, "Identifier"); + if (!liberal) { + this.checkUnreserved(node); + if (node.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = node.start; } + } + return node + }; + + // Parses yield expression inside generator. + + pp$3.parseYield = function(noIn) { + if (!this.yieldPos) { this.yieldPos = this.start; } + + var node = this.startNode(); + this.next(); + if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types.star); + node.argument = this.parseMaybeAssign(noIn); + } + return this.finishNode(node, "YieldExpression") + }; + + pp$3.parseAwait = function() { + if (!this.awaitPos) { this.awaitPos = this.start; } + + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeUnary(null, true); + return this.finishNode(node, "AwaitExpression") + }; + + var pp$4 = Parser.prototype; + + // This function is used to raise exceptions on parse errors. It + // takes an offset integer (into the current `input`) to indicate + // the location of the error, attaches the position to the end + // of the error message, and then raises a `SyntaxError` with that + // message. + + pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos; err.loc = loc; err.raisedAt = this.pos; + throw err + }; + + pp$4.raiseRecoverable = pp$4.raise; + + pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } + }; + + var pp$5 = Parser.prototype; + + var Scope = function Scope(flags) { + this.flags = flags; + // A list of var-declared names in the current lexical scope + this.var = []; + // A list of lexically-declared names in the current lexical scope + this.lexical = []; + // A list of lexically-declared FunctionDeclaration names in the current lexical scope + this.functions = []; + }; + + // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. + + pp$5.enterScope = function(flags) { + this.scopeStack.push(new Scope(flags)); + }; + + pp$5.exitScope = function() { + this.scopeStack.pop(); + }; + + // The spec says: + // > At the top level of a function, or script, function declarations are + // > treated like var declarations rather than like lexical declarations. + pp$5.treatFunctionsAsVarInScope = function(scope) { + return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) + }; + + pp$5.declareName = function(name, bindingType, pos) { + var redeclared = false; + if (bindingType === BIND_LEXICAL) { + var scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + scope.lexical.push(name); + if (this.inModule && (scope.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + } else if (bindingType === BIND_SIMPLE_CATCH) { + var scope$1 = this.currentScope(); + scope$1.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + var scope$2 = this.currentScope(); + if (this.treatFunctionsAsVar) + { redeclared = scope$2.lexical.indexOf(name) > -1; } + else + { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } + scope$2.functions.push(name); + } else { + for (var i = this.scopeStack.length - 1; i >= 0; --i) { + var scope$3 = this.scopeStack[i]; + if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || + !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { + redeclared = true; + break + } + scope$3.var.push(name); + if (this.inModule && (scope$3.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + if (scope$3.flags & SCOPE_VAR) { break } + } + } + if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } + }; + + pp$5.checkLocalExport = function(id) { + // scope.functions must be empty as Module code is always strict. + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && + this.scopeStack[0].var.indexOf(id.name) === -1) { + this.undefinedExports[id.name] = id; + } + }; + + pp$5.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1] + }; + + pp$5.currentVarScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR) { return scope } + } + }; + + // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. + pp$5.currentThisScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } + } + }; + + var Node = function Node(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) + { this.loc = new SourceLocation(parser, loc); } + if (parser.options.directSourceFile) + { this.sourceFile = parser.options.directSourceFile; } + if (parser.options.ranges) + { this.range = [pos, 0]; } + }; + + // Start an AST node, attaching a start offset. + + var pp$6 = Parser.prototype; + + pp$6.startNode = function() { + return new Node(this, this.start, this.startLoc) + }; + + pp$6.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) + }; + + // Finish an AST node, adding `type` and `end` properties. + + function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + if (this.options.locations) + { node.loc.end = loc; } + if (this.options.ranges) + { node.range[1] = pos; } + return node + } + + pp$6.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) + }; + + // Finish node at given position + + pp$6.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) + }; + + // The algorithm used to determine whether a regexp can appear at a + + var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + this.generator = !!generator; + }; + + var types$1 = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", false), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), + f_stat: new TokContext("function", false), + f_expr: new TokContext("function", true), + f_expr_gen: new TokContext("function", true, false, null, true), + f_gen: new TokContext("function", false, false, null, true) + }; + + var pp$7 = Parser.prototype; + + pp$7.initialContext = function() { + return [types$1.b_stat] + }; + + pp$7.braceIsBlock = function(prevType) { + var parent = this.curContext(); + if (parent === types$1.f_expr || parent === types$1.f_stat) + { return true } + if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) + { return !parent.isExpr } + + // The check for `tt.name && exprAllowed` detects whether we are + // after a `yield` or `of` construct. See the `updateContext` for + // `tt.name`. + if (prevType === types._return || prevType === types.name && this.exprAllowed) + { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } + if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) + { return true } + if (prevType === types.braceL) + { return parent === types$1.b_stat } + if (prevType === types._var || prevType === types._const || prevType === types.name) + { return false } + return !this.exprAllowed + }; + + pp$7.inGeneratorContext = function() { + for (var i = this.context.length - 1; i >= 1; i--) { + var context = this.context[i]; + if (context.token === "function") + { return context.generator } + } + return false + }; + + pp$7.updateContext = function(prevType) { + var update, type = this.type; + if (type.keyword && prevType === types.dot) + { this.exprAllowed = false; } + else if (update = type.updateContext) + { update.call(this, prevType); } + else + { this.exprAllowed = type.beforeExpr; } + }; + + // Token-specific context update code + + types.parenR.updateContext = types.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = true; + return + } + var out = this.context.pop(); + if (out === types$1.b_stat && this.curContext().token === "function") { + out = this.context.pop(); + } + this.exprAllowed = !out.isExpr; + }; + + types.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); + this.exprAllowed = true; + }; + + types.dollarBraceL.updateContext = function() { + this.context.push(types$1.b_tmpl); + this.exprAllowed = true; + }; + + types.parenL.updateContext = function(prevType) { + var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; + this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); + this.exprAllowed = true; + }; + + types.incDec.updateContext = function() { + // tokExprAllowed stays unchanged + }; + + types._function.updateContext = types._class.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && + !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && + !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) + { this.context.push(types$1.f_expr); } + else + { this.context.push(types$1.f_stat); } + this.exprAllowed = false; + }; + + types.backQuote.updateContext = function() { + if (this.curContext() === types$1.q_tmpl) + { this.context.pop(); } + else + { this.context.push(types$1.q_tmpl); } + this.exprAllowed = false; + }; + + types.star.updateContext = function(prevType) { + if (prevType === types._function) { + var index = this.context.length - 1; + if (this.context[index] === types$1.f_expr) + { this.context[index] = types$1.f_expr_gen; } + else + { this.context[index] = types$1.f_gen; } + } + this.exprAllowed = true; + }; + + types.name.updateContext = function(prevType) { + var allowed = false; + if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { + if (this.value === "of" && !this.exprAllowed || + this.value === "yield" && this.inGeneratorContext()) + { allowed = true; } + } + this.exprAllowed = allowed; + }; + + // This file contains Unicode properties extracted from the ECMAScript + // specification. The lists are extracted like so: + // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) + + // #table-binary-unicode-properties + var ecma9BinaryProperties = "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"; + var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; + var ecma11BinaryProperties = ecma10BinaryProperties; + var unicodeBinaryProperties = { + 9: ecma9BinaryProperties, + 10: ecma10BinaryProperties, + 11: ecma11BinaryProperties + }; + + // #table-unicode-general-category-values + var unicodeGeneralCategoryValues = "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"; + + // #table-unicode-script-values + var ecma9ScriptValues = "Adlam Adlm Ahom 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 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"; + var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; + var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; + var unicodeScriptValues = { + 9: ecma9ScriptValues, + 10: ecma10ScriptValues, + 11: ecma11ScriptValues + }; + + var data = {}; + function buildUnicodeData(ecmaVersion) { + var d = data[ecmaVersion] = { + binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), + nonBinary: { + General_Category: wordsRegexp(unicodeGeneralCategoryValues), + Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) + } + }; + d.nonBinary.Script_Extensions = d.nonBinary.Script; + + d.nonBinary.gc = d.nonBinary.General_Category; + d.nonBinary.sc = d.nonBinary.Script; + d.nonBinary.scx = d.nonBinary.Script_Extensions; + } + buildUnicodeData(9); + buildUnicodeData(10); + buildUnicodeData(11); + + var pp$8 = Parser.prototype; + + var RegExpValidationState = function RegExpValidationState(parser) { + this.parser = parser; + this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); + this.unicodeProperties = data[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion]; + this.source = ""; + this.flags = ""; + this.start = 0; + this.switchU = false; + this.switchN = false; + this.pos = 0; + this.lastIntValue = 0; + this.lastStringValue = ""; + this.lastAssertionIsQuantifiable = false; + this.numCapturingParens = 0; + this.maxBackReference = 0; + this.groupNames = []; + this.backReferenceNames = []; + }; + + RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { + var unicode = flags.indexOf("u") !== -1; + this.start = start | 0; + this.source = pattern + ""; + this.flags = flags; + this.switchU = unicode && this.parser.options.ecmaVersion >= 6; + this.switchN = unicode && this.parser.options.ecmaVersion >= 9; + }; + + RegExpValidationState.prototype.raise = function raise (message) { + this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); + }; + + // If u flag is given, this returns the code point at the index (it combines a surrogate pair). + // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). + RegExpValidationState.prototype.at = function at (i) { + var s = this.source; + var l = s.length; + if (i >= l) { + return -1 + } + var c = s.charCodeAt(i); + if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return c + } + var next = s.charCodeAt(i + 1); + return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c + }; + + RegExpValidationState.prototype.nextIndex = function nextIndex (i) { + var s = this.source; + var l = s.length; + if (i >= l) { + return l + } + var c = s.charCodeAt(i), next; + if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || + (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) { + return i + 1 + } + return i + 2 + }; + + RegExpValidationState.prototype.current = function current () { + return this.at(this.pos) + }; + + RegExpValidationState.prototype.lookahead = function lookahead () { + return this.at(this.nextIndex(this.pos)) + }; + + RegExpValidationState.prototype.advance = function advance () { + this.pos = this.nextIndex(this.pos); + }; + + RegExpValidationState.prototype.eat = function eat (ch) { + if (this.current() === ch) { + this.advance(); + return true + } + return false + }; + + function codePointToString(ch) { + if (ch <= 0xFFFF) { return String.fromCharCode(ch) } + ch -= 0x10000; + return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) + } + + /** + * Validate the flags part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpFlags = function(state) { + var validFlags = state.validFlags; + var flags = state.flags; + + for (var i = 0; i < flags.length; i++) { + var flag = flags.charAt(i); + if (validFlags.indexOf(flag) === -1) { + this.raise(state.start, "Invalid regular expression flag"); + } + if (flags.indexOf(flag, i + 1) > -1) { + this.raise(state.start, "Duplicate regular expression flag"); + } + } + }; + + /** + * Validate the pattern part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpPattern = function(state) { + this.regexp_pattern(state); + + // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of + // parsing contains a |GroupName|, reparse with the goal symbol + // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* + // exception if _P_ did not conform to the grammar, if any elements of _P_ + // were not matched by the parse, or if any Early Error conditions exist. + if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { + state.switchN = true; + this.regexp_pattern(state); + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern + pp$8.regexp_pattern = function(state) { + state.pos = 0; + state.lastIntValue = 0; + state.lastStringValue = ""; + state.lastAssertionIsQuantifiable = false; + state.numCapturingParens = 0; + state.maxBackReference = 0; + state.groupNames.length = 0; + state.backReferenceNames.length = 0; + + this.regexp_disjunction(state); + + if (state.pos !== state.source.length) { + // Make the same messages as V8. + if (state.eat(0x29 /* ) */)) { + state.raise("Unmatched ')'"); + } + if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { + state.raise("Lone quantifier brackets"); + } + } + if (state.maxBackReference > state.numCapturingParens) { + state.raise("Invalid escape"); + } + for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { + var name = list[i]; + + if (state.groupNames.indexOf(name) === -1) { + state.raise("Invalid named capture referenced"); + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction + pp$8.regexp_disjunction = function(state) { + this.regexp_alternative(state); + while (state.eat(0x7C /* | */)) { + this.regexp_alternative(state); + } + + // Make the same message as V8. + if (this.regexp_eatQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + if (state.eat(0x7B /* { */)) { + state.raise("Lone quantifier brackets"); + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative + pp$8.regexp_alternative = function(state) { + while (state.pos < state.source.length && this.regexp_eatTerm(state)) + { } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term + pp$8.regexp_eatTerm = function(state) { + if (this.regexp_eatAssertion(state)) { + // Handle `QuantifiableAssertion Quantifier` alternative. + // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion + // is a QuantifiableAssertion. + if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { + // Make the same message as V8. + if (state.switchU) { + state.raise("Invalid quantifier"); + } + } + return true + } + + if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { + this.regexp_eatQuantifier(state); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion + pp$8.regexp_eatAssertion = function(state) { + var start = state.pos; + state.lastAssertionIsQuantifiable = false; + + // ^, $ + if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { + return true + } + + // \b \B + if (state.eat(0x5C /* \ */)) { + if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + return true + } + state.pos = start; + } + + // Lookahead / Lookbehind + if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { + var lookbehind = false; + if (this.options.ecmaVersion >= 9) { + lookbehind = state.eat(0x3C /* < */); + } + if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { + this.regexp_disjunction(state); + if (!state.eat(0x29 /* ) */)) { + state.raise("Unterminated group"); + } + state.lastAssertionIsQuantifiable = !lookbehind; + return true + } + } + + state.pos = start; + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier + pp$8.regexp_eatQuantifier = function(state, noError) { + if ( noError === void 0 ) noError = false; + + if (this.regexp_eatQuantifierPrefix(state, noError)) { + state.eat(0x3F /* ? */); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix + pp$8.regexp_eatQuantifierPrefix = function(state, noError) { + return ( + state.eat(0x2A /* * */) || + state.eat(0x2B /* + */) || + state.eat(0x3F /* ? */) || + this.regexp_eatBracedQuantifier(state, noError) + ) + }; + pp$8.regexp_eatBracedQuantifier = function(state, noError) { + var start = state.pos; + if (state.eat(0x7B /* { */)) { + var min = 0, max = -1; + if (this.regexp_eatDecimalDigits(state)) { + min = state.lastIntValue; + if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { + max = state.lastIntValue; + } + if (state.eat(0x7D /* } */)) { + // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term + if (max !== -1 && max < min && !noError) { + state.raise("numbers out of order in {} quantifier"); + } + return true + } + } + if (state.switchU && !noError) { + state.raise("Incomplete quantifier"); + } + state.pos = start; + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom + pp$8.regexp_eatAtom = function(state) { + return ( + this.regexp_eatPatternCharacters(state) || + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) + ) + }; + pp$8.regexp_eatReverseSolidusAtomEscape = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatAtomEscape(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatUncapturingGroup = function(state) { + var start = state.pos; + if (state.eat(0x28 /* ( */)) { + if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + return true + } + state.raise("Unterminated group"); + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatCapturingGroup = function(state) { + if (state.eat(0x28 /* ( */)) { + if (this.options.ecmaVersion >= 9) { + this.regexp_groupSpecifier(state); + } else if (state.current() === 0x3F /* ? */) { + state.raise("Invalid group"); + } + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + state.numCapturingParens += 1; + return true + } + state.raise("Unterminated group"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom + pp$8.regexp_eatExtendedAtom = function(state) { + return ( + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) || + this.regexp_eatInvalidBracedQuantifier(state) || + this.regexp_eatExtendedPatternCharacter(state) + ) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier + pp$8.regexp_eatInvalidBracedQuantifier = function(state) { + if (this.regexp_eatBracedQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter + pp$8.regexp_eatSyntaxCharacter = function(state) { + var ch = state.current(); + if (isSyntaxCharacter(ch)) { + state.lastIntValue = ch; + state.advance(); + return true + } + return false + }; + function isSyntaxCharacter(ch) { + return ( + ch === 0x24 /* $ */ || + ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || + ch === 0x2E /* . */ || + ch === 0x3F /* ? */ || + ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter + // But eat eager. + pp$8.regexp_eatPatternCharacters = function(state) { + var start = state.pos; + var ch = 0; + while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { + state.advance(); + } + return state.pos !== start + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter + pp$8.regexp_eatExtendedPatternCharacter = function(state) { + var ch = state.current(); + if ( + ch !== -1 && + ch !== 0x24 /* $ */ && + !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && + ch !== 0x2E /* . */ && + ch !== 0x3F /* ? */ && + ch !== 0x5B /* [ */ && + ch !== 0x5E /* ^ */ && + ch !== 0x7C /* | */ + ) { + state.advance(); + return true + } + return false + }; + + // GroupSpecifier[U] :: + // [empty] + // `?` GroupName[?U] + pp$8.regexp_groupSpecifier = function(state) { + if (state.eat(0x3F /* ? */)) { + if (this.regexp_eatGroupName(state)) { + if (state.groupNames.indexOf(state.lastStringValue) !== -1) { + state.raise("Duplicate capture group name"); + } + state.groupNames.push(state.lastStringValue); + return + } + state.raise("Invalid group"); + } + }; + + // GroupName[U] :: + // `<` RegExpIdentifierName[?U] `>` + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatGroupName = function(state) { + state.lastStringValue = ""; + if (state.eat(0x3C /* < */)) { + if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return true + } + state.raise("Invalid capture group name"); + } + return false + }; + + // RegExpIdentifierName[U] :: + // RegExpIdentifierStart[?U] + // RegExpIdentifierName[?U] RegExpIdentifierPart[?U] + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatRegExpIdentifierName = function(state) { + state.lastStringValue = ""; + if (this.regexp_eatRegExpIdentifierStart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + while (this.regexp_eatRegExpIdentifierPart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + } + return true + } + return false + }; + + // RegExpIdentifierStart[U] :: + // UnicodeIDStart + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[?U] + pp$8.regexp_eatRegExpIdentifierStart = function(state) { + var start = state.pos; + var ch = state.current(); + state.advance(); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierStart(ch)) { + state.lastIntValue = ch; + return true + } + + state.pos = start; + return false + }; + function isRegExpIdentifierStart(ch) { + return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ + } + + // RegExpIdentifierPart[U] :: + // UnicodeIDContinue + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[?U] + // + // + pp$8.regexp_eatRegExpIdentifierPart = function(state) { + var start = state.pos; + var ch = state.current(); + state.advance(); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierPart(ch)) { + state.lastIntValue = ch; + return true + } + + state.pos = start; + return false + }; + function isRegExpIdentifierPart(ch) { + return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape + pp$8.regexp_eatAtomEscape = function(state) { + if ( + this.regexp_eatBackReference(state) || + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) || + (state.switchN && this.regexp_eatKGroupName(state)) + ) { + return true + } + if (state.switchU) { + // Make the same message as V8. + if (state.current() === 0x63 /* c */) { + state.raise("Invalid unicode escape"); + } + state.raise("Invalid escape"); + } + return false + }; + pp$8.regexp_eatBackReference = function(state) { + var start = state.pos; + if (this.regexp_eatDecimalEscape(state)) { + var n = state.lastIntValue; + if (state.switchU) { + // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape + if (n > state.maxBackReference) { + state.maxBackReference = n; + } + return true + } + if (n <= state.numCapturingParens) { + return true + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatKGroupName = function(state) { + if (state.eat(0x6B /* k */)) { + if (this.regexp_eatGroupName(state)) { + state.backReferenceNames.push(state.lastStringValue); + return true + } + state.raise("Invalid named reference"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape + pp$8.regexp_eatCharacterEscape = function(state) { + return ( + this.regexp_eatControlEscape(state) || + this.regexp_eatCControlLetter(state) || + this.regexp_eatZero(state) || + this.regexp_eatHexEscapeSequence(state) || + this.regexp_eatRegExpUnicodeEscapeSequence(state) || + (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || + this.regexp_eatIdentityEscape(state) + ) + }; + pp$8.regexp_eatCControlLetter = function(state) { + var start = state.pos; + if (state.eat(0x63 /* c */)) { + if (this.regexp_eatControlLetter(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatZero = function(state) { + if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { + state.lastIntValue = 0; + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape + pp$8.regexp_eatControlEscape = function(state) { + var ch = state.current(); + if (ch === 0x74 /* t */) { + state.lastIntValue = 0x09; /* \t */ + state.advance(); + return true + } + if (ch === 0x6E /* n */) { + state.lastIntValue = 0x0A; /* \n */ + state.advance(); + return true + } + if (ch === 0x76 /* v */) { + state.lastIntValue = 0x0B; /* \v */ + state.advance(); + return true + } + if (ch === 0x66 /* f */) { + state.lastIntValue = 0x0C; /* \f */ + state.advance(); + return true + } + if (ch === 0x72 /* r */) { + state.lastIntValue = 0x0D; /* \r */ + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter + pp$8.regexp_eatControlLetter = function(state) { + var ch = state.current(); + if (isControlLetter(ch)) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; + function isControlLetter(ch) { + return ( + (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || + (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence + pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state) { + var start = state.pos; + + if (state.eat(0x75 /* u */)) { + if (this.regexp_eatFixedHexDigits(state, 4)) { + var lead = state.lastIntValue; + if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { + var leadSurrogateEnd = state.pos; + if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { + var trail = state.lastIntValue; + if (trail >= 0xDC00 && trail <= 0xDFFF) { + state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return true + } + } + state.pos = leadSurrogateEnd; + state.lastIntValue = lead; + } + return true + } + if ( + state.switchU && + state.eat(0x7B /* { */) && + this.regexp_eatHexDigits(state) && + state.eat(0x7D /* } */) && + isValidUnicode(state.lastIntValue) + ) { + return true + } + if (state.switchU) { + state.raise("Invalid unicode escape"); + } + state.pos = start; + } + + return false + }; + function isValidUnicode(ch) { + return ch >= 0 && ch <= 0x10FFFF + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape + pp$8.regexp_eatIdentityEscape = function(state) { + if (state.switchU) { + if (this.regexp_eatSyntaxCharacter(state)) { + return true + } + if (state.eat(0x2F /* / */)) { + state.lastIntValue = 0x2F; /* / */ + return true + } + return false + } + + var ch = state.current(); + if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { + state.lastIntValue = ch; + state.advance(); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape + pp$8.regexp_eatDecimalEscape = function(state) { + state.lastIntValue = 0; + var ch = state.current(); + if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { + do { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape + pp$8.regexp_eatCharacterClassEscape = function(state) { + var ch = state.current(); + + if (isCharacterClassEscape(ch)) { + state.lastIntValue = -1; + state.advance(); + return true + } + + if ( + state.switchU && + this.options.ecmaVersion >= 9 && + (ch === 0x50 /* P */ || ch === 0x70 /* p */) + ) { + state.lastIntValue = -1; + state.advance(); + if ( + state.eat(0x7B /* { */) && + this.regexp_eatUnicodePropertyValueExpression(state) && + state.eat(0x7D /* } */) + ) { + return true + } + state.raise("Invalid property name"); + } + + return false + }; + function isCharacterClassEscape(ch) { + return ( + ch === 0x64 /* d */ || + ch === 0x44 /* D */ || + ch === 0x73 /* s */ || + ch === 0x53 /* S */ || + ch === 0x77 /* w */ || + ch === 0x57 /* W */ + ) + } + + // UnicodePropertyValueExpression :: + // UnicodePropertyName `=` UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + pp$8.regexp_eatUnicodePropertyValueExpression = function(state) { + var start = state.pos; + + // UnicodePropertyName `=` UnicodePropertyValue + if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { + var name = state.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(state)) { + var value = state.lastStringValue; + this.regexp_validateUnicodePropertyNameAndValue(state, name, value); + return true + } + } + state.pos = start; + + // LoneUnicodePropertyNameOrValue + if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { + var nameOrValue = state.lastStringValue; + this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); + return true + } + return false + }; + pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { + if (!has(state.unicodeProperties.nonBinary, name)) + { state.raise("Invalid property name"); } + if (!state.unicodeProperties.nonBinary[name].test(value)) + { state.raise("Invalid property value"); } + }; + pp$8.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { + if (!state.unicodeProperties.binary.test(nameOrValue)) + { state.raise("Invalid property name"); } + }; + + // UnicodePropertyName :: + // UnicodePropertyNameCharacters + pp$8.regexp_eatUnicodePropertyName = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyNameCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyNameCharacter(ch) { + return isControlLetter(ch) || ch === 0x5F /* _ */ + } + + // UnicodePropertyValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatUnicodePropertyValue = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyValueCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyValueCharacter(ch) { + return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) + } + + // LoneUnicodePropertyNameOrValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { + return this.regexp_eatUnicodePropertyValue(state) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass + pp$8.regexp_eatCharacterClass = function(state) { + if (state.eat(0x5B /* [ */)) { + state.eat(0x5E /* ^ */); + this.regexp_classRanges(state); + if (state.eat(0x5D /* [ */)) { + return true + } + // Unreachable since it threw "unterminated regular expression" error before. + state.raise("Unterminated character class"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash + pp$8.regexp_classRanges = function(state) { + while (this.regexp_eatClassAtom(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { + var right = state.lastIntValue; + if (state.switchU && (left === -1 || right === -1)) { + state.raise("Invalid character class"); + } + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash + pp$8.regexp_eatClassAtom = function(state) { + var start = state.pos; + + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatClassEscape(state)) { + return true + } + if (state.switchU) { + // Make the same message as V8. + var ch$1 = state.current(); + if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { + state.raise("Invalid class escape"); + } + state.raise("Invalid escape"); + } + state.pos = start; + } + + var ch = state.current(); + if (ch !== 0x5D /* [ */) { + state.lastIntValue = ch; + state.advance(); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape + pp$8.regexp_eatClassEscape = function(state) { + var start = state.pos; + + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true + } + + if (state.switchU && state.eat(0x2D /* - */)) { + state.lastIntValue = 0x2D; /* - */ + return true + } + + if (!state.switchU && state.eat(0x63 /* c */)) { + if (this.regexp_eatClassControlLetter(state)) { + return true + } + state.pos = start; + } + + return ( + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) + ) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter + pp$8.regexp_eatClassControlLetter = function(state) { + var ch = state.current(); + if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatHexEscapeSequence = function(state) { + var start = state.pos; + if (state.eat(0x78 /* x */)) { + if (this.regexp_eatFixedHexDigits(state, 2)) { + return true + } + if (state.switchU) { + state.raise("Invalid escape"); + } + state.pos = start; + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits + pp$8.regexp_eatDecimalDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isDecimalDigit(ch = state.current())) { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } + return state.pos !== start + }; + function isDecimalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits + pp$8.regexp_eatHexDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isHexDigit(ch = state.current())) { + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); + } + return state.pos !== start + }; + function isHexDigit(ch) { + return ( + (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || + (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || + (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) + ) + } + function hexToInt(ch) { + if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { + return 10 + (ch - 0x41 /* A */) + } + if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { + return 10 + (ch - 0x61 /* a */) + } + return ch - 0x30 /* 0 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence + // Allows only 0-377(octal) i.e. 0-255(decimal). + pp$8.regexp_eatLegacyOctalEscapeSequence = function(state) { + if (this.regexp_eatOctalDigit(state)) { + var n1 = state.lastIntValue; + if (this.regexp_eatOctalDigit(state)) { + var n2 = state.lastIntValue; + if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { + state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + } else { + state.lastIntValue = n1 * 8 + n2; + } + } else { + state.lastIntValue = n1; + } + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit + pp$8.regexp_eatOctalDigit = function(state) { + var ch = state.current(); + if (isOctalDigit(ch)) { + state.lastIntValue = ch - 0x30; /* 0 */ + state.advance(); + return true + } + state.lastIntValue = 0; + return false + }; + function isOctalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit + // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatFixedHexDigits = function(state, length) { + var start = state.pos; + state.lastIntValue = 0; + for (var i = 0; i < length; ++i) { + var ch = state.current(); + if (!isHexDigit(ch)) { + state.pos = start; + return false + } + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); + } + return true + }; + + // Object type used to represent tokens. Note that normally, tokens + // simply exist as properties on the parser object. This is only + // used for the onToken callback and the external tokenizer. + + var Token = function Token(p) { + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) + { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } + if (p.options.ranges) + { this.range = [p.start, p.end]; } + }; + + // ## Tokenizer + + var pp$9 = Parser.prototype; + + // Move to the next token + + pp$9.next = function() { + if (this.options.onToken) + { this.options.onToken(new Token(this)); } + + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); + }; + + pp$9.getToken = function() { + this.next(); + return new Token(this) + }; + + // If we're in an ES6 environment, make parsers iterable + if (typeof Symbol !== "undefined") + { pp$9[Symbol.iterator] = function() { + var this$1 = this; + + return { + next: function () { + var token = this$1.getToken(); + return { + done: token.type === types.eof, + value: token + } + } + } + }; } + + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). + + pp$9.curContext = function() { + return this.context[this.context.length - 1] + }; + + // Read a single token, updating the parser object's token-related + // properties. + + pp$9.nextToken = function() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } + + this.start = this.pos; + if (this.options.locations) { this.startLoc = this.curPosition(); } + if (this.pos >= this.input.length) { return this.finishToken(types.eof) } + + if (curContext.override) { return curContext.override(this) } + else { this.readToken(this.fullCharCodeAtPos()); } + }; + + pp$9.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + { return this.readWord() } + + return this.getTokenFromCode(code) + }; + + pp$9.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos); + if (code <= 0xd7ff || code >= 0xe000) { return code } + var next = this.input.charCodeAt(this.pos + 1); + return (code << 10) + next - 0x35fdc00 + }; + + pp$9.skipBlockComment = function() { + var startLoc = this.options.onComment && this.curPosition(); + var 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) { + lineBreakG.lastIndex = start; + var match; + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this.curLine; + this.lineStart = match.index + match[0].length; + } + } + if (this.options.onComment) + { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()); } + }; + + pp$9.skipLineComment = function(startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.options.onComment) + { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()); } + }; + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. + + pp$9.skipSpace = function() { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32: case 160: // ' ' + ++this.pos; + break + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10: case 8232: case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + break + case 47: // '/' + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: // '*' + this.skipBlockComment(); + break + case 47: + this.skipLineComment(2); + break + default: + break loop + } + break + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop + } + } + } + }; + + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. + + pp$9.finishToken = function(type, val) { + this.end = this.pos; + if (this.options.locations) { this.endLoc = this.curPosition(); } + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); + }; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + pp$9.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) { return this.readNumber(true) } + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3; + return this.finishToken(types.ellipsis) + } else { + ++this.pos; + return this.finishToken(types.dot) + } + }; + + pp$9.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { ++this.pos; return this.readRegexp() } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.slash, 1) + }; + + pp$9.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + var tokentype = code === 42 ? types.star : types.modulo; + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { + ++size; + tokentype = types.starstar; + next = this.input.charCodeAt(this.pos + 2); + } + + if (next === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(tokentype, size) + }; + + pp$9.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) + }; + + pp$9.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.bitwiseXOR, 1) + }; + + pp$9.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && + (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types.incDec, 2) + } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) + }; + + pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types.incDec, 2) + } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) + }; + + pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // ` SYNC --[event loop tick]--> ASYNC_ACTIVE --[interval tick]-> ASYNC_PASSIVE + ^ | + +---------[insert data]-------+ +*/ + +const STORAGE_MODE_IDLE = 0; +const STORAGE_MODE_SYNC = 1; +const STORAGE_MODE_ASYNC = 2; + +class CacheBackend { + /** + * @param {number} duration max cache duration of items + * @param {any} provider async method + * @param {any} syncProvider sync method + * @param {any} providerContext call context for the provider methods + */ + constructor(duration, provider, syncProvider, providerContext) { + this._duration = duration; + this._provider = provider; + this._syncProvider = syncProvider; + this._providerContext = providerContext; + /** @type {Map} */ + this._activeAsyncOperations = new Map(); + /** @type {Map }>} */ + this._data = new Map(); + /** @type {Set[]} */ + this._levels = []; + for (let i = 0; i < 10; i++) this._levels.push(new Set()); + for (let i = 5000; i < duration; i += 500) this._levels.push(new Set()); + this._currentLevel = 0; + this._tickInterval = Math.floor(duration / this._levels.length); + /** @type {STORAGE_MODE_IDLE | STORAGE_MODE_SYNC | STORAGE_MODE_ASYNC} */ + this._mode = STORAGE_MODE_IDLE; + + /** @type {NodeJS.Timeout | undefined} */ + this._timeout = undefined; + /** @type {number | undefined} */ + this._nextDecay = undefined; + + this.provide = provider ? this.provide.bind(this) : null; + this.provideSync = syncProvider ? this.provideSync.bind(this) : null; + } + + provide(path, options, callback) { + if (typeof options === "function") { + callback = options; + options = undefined; + } + if (typeof path !== "string") { + callback(new TypeError("path must be a string")); + return; + } + if (options) { + return this._provider.call( + this._providerContext, + path, + options, + callback + ); + } + + // When in sync mode we can move to async mode + if (this._mode === STORAGE_MODE_SYNC) { + this._enterAsyncMode(); + } + + // Check in cache + let cacheEntry = this._data.get(path); + if (cacheEntry !== undefined) { + if (cacheEntry.err) return nextTick(callback, cacheEntry.err); + return nextTick(callback, null, cacheEntry.result); + } + + // Check if there is already the same operation running + let callbacks = this._activeAsyncOperations.get(path); + if (callbacks !== undefined) { + callbacks.push(callback); + return; + } + this._activeAsyncOperations.set(path, (callbacks = [callback])); + + // Run the operation + this._provider.call(this._providerContext, path, (err, result) => { + this._activeAsyncOperations.delete(path); + this._storeResult(path, err, result); + + // Enter async mode if not yet done + this._enterAsyncMode(); + + runCallbacks(callbacks, err, result); + }); + } + + provideSync(path, options) { + if (typeof path !== "string") { + throw new TypeError("path must be a string"); + } + if (options) { + return this._syncProvider.call(this._providerContext, path, options); + } + + // In sync mode we may have to decay some cache items + if (this._mode === STORAGE_MODE_SYNC) { + this._runDecays(); + } + + // Check in cache + let cacheEntry = this._data.get(path); + if (cacheEntry !== undefined) { + if (cacheEntry.err) throw cacheEntry.err; + return cacheEntry.result; + } + + // Get all active async operations + // This sync operation will also complete them + const callbacks = this._activeAsyncOperations.get(path); + this._activeAsyncOperations.delete(path); + + // Run the operation + // When in idle mode, we will enter sync mode + let result; + try { + result = this._syncProvider.call(this._providerContext, path); + } catch (err) { + this._storeResult(path, err, undefined); + this._enterSyncModeWhenIdle(); + if (callbacks) runCallbacks(callbacks, err, undefined); + throw err; + } + this._storeResult(path, undefined, result); + this._enterSyncModeWhenIdle(); + if (callbacks) runCallbacks(callbacks, undefined, result); + return result; + } + + purge(what) { + if (!what) { + if (this._mode !== STORAGE_MODE_IDLE) { + this._data.clear(); + for (const level of this._levels) { + level.clear(); + } + this._enterIdleMode(); + } + } else if (typeof what === "string") { + for (let [key, data] of this._data) { + if (key.startsWith(what)) { + this._data.delete(key); + data.level.delete(key); + } + } + if (this._data.size === 0) { + this._enterIdleMode(); + } + } else { + for (let [key, data] of this._data) { + for (const item of what) { + if (key.startsWith(item)) { + this._data.delete(key); + data.level.delete(key); + break; + } + } + } + if (this._data.size === 0) { + this._enterIdleMode(); + } + } + } + + purgeParent(what) { + if (!what) { + this.purge(); + } else if (typeof what === "string") { + this.purge(dirname(what)); + } else { + const set = new Set(); + for (const item of what) { + set.add(dirname(item)); + } + this.purge(set); + } + } + + _storeResult(path, err, result) { + if (this._data.has(path)) return; + const level = this._levels[this._currentLevel]; + this._data.set(path, { err, result, level }); + level.add(path); + } + + _decayLevel() { + const nextLevel = (this._currentLevel + 1) % this._levels.length; + const decay = this._levels[nextLevel]; + this._currentLevel = nextLevel; + for (let item of decay) { + this._data.delete(item); + } + decay.clear(); + if (this._data.size === 0) { + this._enterIdleMode(); + } else { + // @ts-ignore _nextDecay is always a number in sync mode + this._nextDecay += this._tickInterval; + } + } + + _runDecays() { + while ( + /** @type {number} */ (this._nextDecay) <= Date.now() && + this._mode !== STORAGE_MODE_IDLE + ) { + this._decayLevel(); + } + } + + _enterAsyncMode() { + let timeout = 0; + switch (this._mode) { + case STORAGE_MODE_ASYNC: + return; + case STORAGE_MODE_IDLE: + this._nextDecay = Date.now() + this._tickInterval; + timeout = this._tickInterval; + break; + case STORAGE_MODE_SYNC: + this._runDecays(); + // @ts-ignore _runDecays may change the mode + if (this._mode === STORAGE_MODE_IDLE) return; + timeout = Math.max( + 0, + /** @type {number} */ (this._nextDecay) - Date.now() + ); + break; + } + this._mode = STORAGE_MODE_ASYNC; + const ref = setTimeout(() => { + this._mode = STORAGE_MODE_SYNC; + this._runDecays(); + }, timeout); + if (ref.unref) ref.unref(); + this._timeout = ref; + } + + _enterSyncModeWhenIdle() { + if (this._mode === STORAGE_MODE_IDLE) { + this._mode = STORAGE_MODE_SYNC; + this._nextDecay = Date.now() + this._tickInterval; + } + } + + _enterIdleMode() { + this._mode = STORAGE_MODE_IDLE; + this._nextDecay = undefined; + if (this._timeout) clearTimeout(this._timeout); + } +} + +const createBackend = (duration, provider, syncProvider, providerContext) => { + if (duration > 0) { + return new CacheBackend(duration, provider, syncProvider, providerContext); + } + return new OperationMergerBackend(provider, syncProvider, providerContext); +}; + +module.exports = class CachedInputFileSystem { + constructor(fileSystem, duration) { + this.fileSystem = fileSystem; + + this._lstatBackend = createBackend( + duration, + this.fileSystem.lstat, + this.fileSystem.lstatSync, + this.fileSystem + ); + const lstat = this._lstatBackend.provide; + this.lstat = /** @type {FileSystem["lstat"]} */ (lstat); + const lstatSync = this._lstatBackend.provideSync; + this.lstatSync = /** @type {SyncFileSystem["lstatSync"]} */ (lstatSync); + + this._statBackend = createBackend( + duration, + this.fileSystem.stat, + this.fileSystem.statSync, + this.fileSystem + ); + const stat = this._statBackend.provide; + this.stat = /** @type {FileSystem["stat"]} */ (stat); + const statSync = this._statBackend.provideSync; + this.statSync = /** @type {SyncFileSystem["statSync"]} */ (statSync); + + this._readdirBackend = createBackend( + duration, + this.fileSystem.readdir, + this.fileSystem.readdirSync, + this.fileSystem + ); + const readdir = this._readdirBackend.provide; + this.readdir = /** @type {FileSystem["readdir"]} */ (readdir); + const readdirSync = this._readdirBackend.provideSync; + this.readdirSync = /** @type {SyncFileSystem["readdirSync"]} */ (readdirSync); + + this._readFileBackend = createBackend( + duration, + this.fileSystem.readFile, + this.fileSystem.readFileSync, + this.fileSystem + ); + const readFile = this._readFileBackend.provide; + this.readFile = /** @type {FileSystem["readFile"]} */ (readFile); + const readFileSync = this._readFileBackend.provideSync; + this.readFileSync = /** @type {SyncFileSystem["readFileSync"]} */ (readFileSync); + + this._readJsonBackend = createBackend( + duration, + this.fileSystem.readJson || + (this.readFile && + ((path, callback) => { + // @ts-ignore + this.readFile(path, (err, buffer) => { + if (err) return callback(err); + if (!buffer || buffer.length === 0) + return callback(new Error("No file content")); + let data; + try { + data = JSON.parse(buffer.toString("utf-8")); + } catch (e) { + return callback(e); + } + callback(null, data); + }); + })), + this.fileSystem.readJsonSync || + (this.readFileSync && + (path => { + const buffer = this.readFileSync(path); + const data = JSON.parse(buffer.toString("utf-8")); + return data; + })), + this.fileSystem + ); + const readJson = this._readJsonBackend.provide; + this.readJson = /** @type {FileSystem["readJson"]} */ (readJson); + const readJsonSync = this._readJsonBackend.provideSync; + this.readJsonSync = /** @type {SyncFileSystem["readJsonSync"]} */ (readJsonSync); + + this._readlinkBackend = createBackend( + duration, + this.fileSystem.readlink, + this.fileSystem.readlinkSync, + this.fileSystem + ); + const readlink = this._readlinkBackend.provide; + this.readlink = /** @type {FileSystem["readlink"]} */ (readlink); + const readlinkSync = this._readlinkBackend.provideSync; + this.readlinkSync = /** @type {SyncFileSystem["readlinkSync"]} */ (readlinkSync); + } + + purge(what) { + this._statBackend.purge(what); + this._lstatBackend.purge(what); + this._readdirBackend.purgeParent(what); + this._readFileBackend.purge(what); + this._readlinkBackend.purge(what); + this._readJsonBackend.purge(what); + } +}; + + +/***/ }), + +/***/ 80037: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const basename = __webpack_require__(24639).basename; + +/** @typedef {import("./Resolver")} Resolver */ + +module.exports = class CloneBasenamePlugin { + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("CloneBasenamePlugin", (request, resolveContext, callback) => { + const filename = basename(request.path); + const filePath = resolver.join(request.path, filename); + const obj = { + ...request, + path: filePath, + relativePath: + request.relativePath && + resolver.join(request.relativePath, filename) + }; + resolver.doResolve( + target, + obj, + "using path: " + filePath, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 22641: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class ConditionalPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {Partial} test compare object + * @param {string | null} message log message + * @param {boolean} allowAlternatives when false, do not continue with the current step when "test" matches + * @param {string | ResolveStepHook} target target + */ + constructor(source, test, message, allowAlternatives, target) { + this.source = source; + this.test = test; + this.message = message; + this.allowAlternatives = allowAlternatives; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + const { test, message, allowAlternatives } = this; + const keys = Object.keys(test); + resolver + .getHook(this.source) + .tapAsync("ConditionalPlugin", (request, resolveContext, callback) => { + for (const prop of keys) { + if (request[prop] !== test[prop]) return callback(); + } + resolver.doResolve( + target, + request, + message, + resolveContext, + allowAlternatives + ? callback + : (err, result) => { + if (err) return callback(err); + + // Don't allow other alternatives + if (result === undefined) return callback(null, null); + callback(null, result); + } + ); + }); + } +}; + + +/***/ }), + +/***/ 99951: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const DescriptionFileUtils = __webpack_require__(64674); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class DescriptionFilePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string[]} filenames filenames + * @param {boolean} pathIsFile pathIsFile + * @param {string | ResolveStepHook} target target + */ + constructor(source, filenames, pathIsFile, target) { + this.source = source; + this.filenames = filenames; + this.pathIsFile = pathIsFile; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "DescriptionFilePlugin", + (request, resolveContext, callback) => { + const path = request.path; + if (!path) return callback(); + const directory = this.pathIsFile + ? DescriptionFileUtils.cdUp(path) + : path; + if (!directory) return callback(); + DescriptionFileUtils.loadDescriptionFile( + resolver, + directory, + this.filenames, + request.descriptionFilePath + ? { + path: request.descriptionFilePath, + content: request.descriptionFileData, + directory: /** @type {string} */ (request.descriptionFileRoot) + } + : undefined, + resolveContext, + (err, result) => { + if (err) return callback(err); + if (!result) { + if (resolveContext.log) + resolveContext.log( + `No description file found in ${directory} or above` + ); + return callback(); + } + const relativePath = + "." + path.substr(result.directory.length).replace(/\\/g, "/"); + const obj = { + ...request, + descriptionFilePath: result.path, + descriptionFileData: result.content, + descriptionFileRoot: result.directory, + relativePath: relativePath + }; + resolver.doResolve( + target, + obj, + "using description file: " + + result.path + + " (relative path: " + + relativePath + + ")", + resolveContext, + (err, result) => { + if (err) return callback(err); + + // Don't allow other processing + if (result === undefined) return callback(null, null); + callback(null, result); + } + ); + } + ); + } + ); + } +}; + + +/***/ }), + +/***/ 64674: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const forEachBail = __webpack_require__(8178); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveContext} ResolveContext */ + +/** + * @typedef {Object} DescriptionFileInfo + * @property {any=} content + * @property {string} path + * @property {string} directory + */ + +/** + * @callback ErrorFirstCallback + * @param {Error|null=} error + * @param {DescriptionFileInfo=} result + */ + +/** + * @param {Resolver} resolver resolver + * @param {string} directory directory + * @param {string[]} filenames filenames + * @param {DescriptionFileInfo|undefined} oldInfo oldInfo + * @param {ResolveContext} resolveContext resolveContext + * @param {ErrorFirstCallback} callback callback + */ +function loadDescriptionFile( + resolver, + directory, + filenames, + oldInfo, + resolveContext, + callback +) { + (function findDescriptionFile() { + if (oldInfo && oldInfo.directory === directory) { + // We already have info for this directory and can reuse it + return callback(null, oldInfo); + } + forEachBail( + filenames, + (filename, callback) => { + const descriptionFilePath = resolver.join(directory, filename); + if (resolver.fileSystem.readJson) { + resolver.fileSystem.readJson(descriptionFilePath, (err, content) => { + if (err) { + if (typeof err.code !== "undefined") { + if (resolveContext.missingDependencies) { + resolveContext.missingDependencies.add(descriptionFilePath); + } + return callback(); + } + if (resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(descriptionFilePath); + } + return onJson(err); + } + if (resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(descriptionFilePath); + } + onJson(null, content); + }); + } else { + resolver.fileSystem.readFile(descriptionFilePath, (err, content) => { + if (err) { + if (resolveContext.missingDependencies) { + resolveContext.missingDependencies.add(descriptionFilePath); + } + return callback(); + } + if (resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(descriptionFilePath); + } + let json; + + if (content) { + try { + json = JSON.parse(content.toString()); + } catch (e) { + return onJson(e); + } + } else { + return onJson(new Error("No content in file")); + } + + onJson(null, json); + }); + } + + function onJson(err, content) { + if (err) { + if (resolveContext.log) + resolveContext.log( + descriptionFilePath + " (directory description file): " + err + ); + else + err.message = + descriptionFilePath + " (directory description file): " + err; + return callback(err); + } + callback(null, { + content, + directory, + path: descriptionFilePath + }); + } + }, + (err, result) => { + if (err) return callback(err); + if (result) { + return callback(null, result); + } else { + const dir = cdUp(directory); + if (!dir) { + return callback(); + } else { + directory = dir; + return findDescriptionFile(); + } + } + } + ); + })(); +} + +/** + * @param {any} content content + * @param {string|string[]} field field + * @returns {object|string|number|boolean|undefined} field data + */ +function getField(content, field) { + if (!content) return undefined; + if (Array.isArray(field)) { + let current = content; + for (let j = 0; j < field.length; j++) { + if (current === null || typeof current !== "object") { + current = null; + break; + } + current = current[field[j]]; + } + return current; + } else { + return content[field]; + } +} + +/** + * @param {string} directory directory + * @returns {string|null} parent directory or null + */ +function cdUp(directory) { + if (directory === "/") return null; + const i = directory.lastIndexOf("/"), + j = directory.lastIndexOf("\\"); + const p = i < 0 ? j : j < 0 ? i : i < j ? j : i; + if (p < 0) return null; + return directory.substr(0, p || 1); +} + +exports.loadDescriptionFile = loadDescriptionFile; +exports.getField = getField; +exports.cdUp = cdUp; + + +/***/ }), + +/***/ 46835: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class DirectoryExistsPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "DirectoryExistsPlugin", + (request, resolveContext, callback) => { + const fs = resolver.fileSystem; + const directory = request.path; + if (!directory) return callback(); + fs.stat(directory, (err, stat) => { + if (err || !stat) { + if (resolveContext.missingDependencies) + resolveContext.missingDependencies.add(directory); + if (resolveContext.log) + resolveContext.log(directory + " doesn't exist"); + return callback(); + } + if (!stat.isDirectory()) { + if (resolveContext.missingDependencies) + resolveContext.missingDependencies.add(directory); + if (resolveContext.log) + resolveContext.log(directory + " is not a directory"); + return callback(); + } + if (resolveContext.fileDependencies) + resolveContext.fileDependencies.add(directory); + resolver.doResolve( + target, + request, + `existing directory ${directory}`, + resolveContext, + callback + ); + }); + } + ); + } +}; + + +/***/ }), + +/***/ 88990: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const path = __webpack_require__(85622); +const DescriptionFileUtils = __webpack_require__(64674); +const forEachBail = __webpack_require__(8178); +const { processExportsField } = __webpack_require__(73674); +const { parseIdentifier } = __webpack_require__(53692); +const { checkExportsFieldTarget } = __webpack_require__(83008); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** @typedef {import("./util/entrypoints").ExportsField} ExportsField */ +/** @typedef {import("./util/entrypoints").FieldProcessor} FieldProcessor */ + +module.exports = class ExportsFieldPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {Set} conditionNames condition names + * @param {string | string[]} fieldNamePath name path + * @param {string | ResolveStepHook} target target + */ + constructor(source, conditionNames, fieldNamePath, target) { + this.source = source; + this.target = target; + this.conditionNames = conditionNames; + this.fieldName = fieldNamePath; + /** @type {WeakMap} */ + this.fieldProcessorCache = new WeakMap(); + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ExportsFieldPlugin", (request, resolveContext, callback) => { + // When there is no description file, abort + if (!request.descriptionFilePath) return callback(); + if ( + // When the description file is inherited from parent, abort + // (There is no description file inside of this package) + request.relativePath !== "." || + request.request === undefined + ) + return callback(); + + const remainingRequest = + request.query || request.fragment + ? (request.request === "." ? "./" : request.request) + + request.query + + request.fragment + : request.request; + /** @type {ExportsField|null} */ + const exportsField = DescriptionFileUtils.getField( + request.descriptionFileData, + this.fieldName + ); + if (!exportsField) return callback(); + + if (request.directory) { + return callback( + new Error( + `Resolving to directories is not possible with the exports field (request was ${remainingRequest}/)` + ) + ); + } + + let paths; + + try { + // We attach the cache to the description file instead of the exportsField value + // because we use a WeakMap and the exportsField could be a string too. + // Description file is always an object when exports field can be accessed. + let fieldProcessor = this.fieldProcessorCache.get( + request.descriptionFileData + ); + if (fieldProcessor === undefined) { + fieldProcessor = processExportsField(exportsField); + this.fieldProcessorCache.set( + request.descriptionFileData, + fieldProcessor + ); + } + paths = fieldProcessor(remainingRequest, this.conditionNames); + } catch (err) { + if (resolveContext.log) { + resolveContext.log( + `Exports field in ${request.descriptionFilePath} can't be processed: ${err}` + ); + } + return callback(err); + } + + if (paths.length === 0) { + return callback( + new Error( + `Package path ${remainingRequest} is not exported from package ${request.descriptionFileRoot} (see exports field in ${request.descriptionFilePath})` + ) + ); + } + + forEachBail( + paths, + (p, callback) => { + const parsedIdentifier = parseIdentifier(p); + + if (!parsedIdentifier) return callback(); + + const [relativePath, query, fragment] = parsedIdentifier; + + const error = checkExportsFieldTarget(relativePath); + + if (error) { + return callback(error); + } + + const obj = { + ...request, + request: undefined, + path: path.join( + /** @type {string} */ (request.descriptionFileRoot), + relativePath + ), + relativePath, + query, + fragment + }; + + resolver.doResolve( + target, + obj, + "using exports field: " + p, + resolveContext, + callback + ); + }, + (err, result) => callback(err, result || null) + ); + }); + } +}; + + +/***/ }), + +/***/ 95762: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class FileExistsPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + const fs = resolver.fileSystem; + resolver + .getHook(this.source) + .tapAsync("FileExistsPlugin", (request, resolveContext, callback) => { + const file = request.path; + if (!file) return callback(); + fs.stat(file, (err, stat) => { + if (err || !stat) { + if (resolveContext.missingDependencies) + resolveContext.missingDependencies.add(file); + if (resolveContext.log) resolveContext.log(file + " doesn't exist"); + return callback(); + } + if (!stat.isFile()) { + if (resolveContext.missingDependencies) + resolveContext.missingDependencies.add(file); + if (resolveContext.log) resolveContext.log(file + " is not a file"); + return callback(); + } + if (resolveContext.fileDependencies) + resolveContext.fileDependencies.add(file); + resolver.doResolve( + target, + request, + "existing file: " + file, + resolveContext, + callback + ); + }); + }); + } +}; + + +/***/ }), + +/***/ 65727: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const path = __webpack_require__(85622); +const DescriptionFileUtils = __webpack_require__(64674); +const forEachBail = __webpack_require__(8178); +const { processImportsField } = __webpack_require__(73674); +const { parseIdentifier } = __webpack_require__(53692); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** @typedef {import("./util/entrypoints").FieldProcessor} FieldProcessor */ +/** @typedef {import("./util/entrypoints").ImportsField} ImportsField */ + +const dotCode = ".".charCodeAt(0); + +module.exports = class ImportsFieldPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {Set} conditionNames condition names + * @param {string | string[]} fieldNamePath name path + * @param {string | ResolveStepHook} targetFile target file + * @param {string | ResolveStepHook} targetPackage target package + */ + constructor( + source, + conditionNames, + fieldNamePath, + targetFile, + targetPackage + ) { + this.source = source; + this.targetFile = targetFile; + this.targetPackage = targetPackage; + this.conditionNames = conditionNames; + this.fieldName = fieldNamePath; + /** @type {WeakMap} */ + this.fieldProcessorCache = new WeakMap(); + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const targetFile = resolver.ensureHook(this.targetFile); + const targetPackage = resolver.ensureHook(this.targetPackage); + + resolver + .getHook(this.source) + .tapAsync("ImportsFieldPlugin", (request, resolveContext, callback) => { + // When there is no description file, abort + if (!request.descriptionFilePath) return callback(); + + if ( + // When the description file is inherited from parent, abort + // (There is no description file inside of this package) + request.relativePath !== "." || + request.request === undefined + ) + return callback(); + + const remainingRequest = + request.request + request.query + request.fragment; + /** @type {ImportsField|null} */ + const importsField = DescriptionFileUtils.getField( + request.descriptionFileData, + this.fieldName + ); + if (!importsField) return callback(); + + if (request.directory) { + return callback( + new Error( + `Resolving to directories is not possible with the imports field (request was ${remainingRequest}/)` + ) + ); + } + + let paths; + + try { + // We attach the cache to the description file instead of the importsField value + // because we use a WeakMap and the importsField could be a string too. + // Description file is always an object when exports field can be accessed. + let fieldProcessor = this.fieldProcessorCache.get( + request.descriptionFileData + ); + if (fieldProcessor === undefined) { + fieldProcessor = processImportsField(importsField); + this.fieldProcessorCache.set( + request.descriptionFileData, + fieldProcessor + ); + } + paths = fieldProcessor(remainingRequest, this.conditionNames); + } catch (err) { + if (resolveContext.log) { + resolveContext.log( + `Imports field in ${request.descriptionFilePath} can't be processed: ${err}` + ); + } + return callback(err); + } + + if (paths.length === 0) { + return callback( + new Error( + `Package import ${remainingRequest} is not imported from package ${request.descriptionFileRoot} (see imports field in ${request.descriptionFilePath})` + ) + ); + } + + forEachBail( + paths, + (p, callback) => { + const parsedIdentifier = parseIdentifier(p); + + if (!parsedIdentifier) return callback(); + + const [path_, query, fragment] = parsedIdentifier; + + switch (path_.charCodeAt(0)) { + // should be relative + case dotCode: { + const obj = { + ...request, + request: undefined, + path: path.join( + /** @type {string} */ (request.descriptionFileRoot), + path_ + ), + relativePath: path_, + query, + fragment + }; + + resolver.doResolve( + targetFile, + obj, + "using imports field: " + p, + resolveContext, + callback + ); + break; + } + + // package resolving + default: { + const obj = { + ...request, + request: path_, + relativePath: path_, + fullySpecified: true, + query, + fragment + }; + + resolver.doResolve( + targetPackage, + obj, + "using imports field: " + p, + resolveContext, + callback + ); + } + } + }, + (err, result) => callback(err, result || null) + ); + }); + } +}; + + +/***/ }), + +/***/ 6241: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +const namespaceStartCharCode = "@".charCodeAt(0); + +module.exports = class JoinRequestPartPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "JoinRequestPartPlugin", + (request, resolveContext, callback) => { + const req = request.request || ""; + let i = req.indexOf("/", 3); + + if (i >= 0 && req.charCodeAt(2) === namespaceStartCharCode) { + i = req.indexOf("/", i + 1); + } + + let moduleName, remainingRequest, fullySpecified; + if (i < 0) { + moduleName = req; + remainingRequest = "."; + fullySpecified = false; + } else { + moduleName = req.slice(0, i); + remainingRequest = "." + req.slice(i); + fullySpecified = request.fullySpecified; + } + const obj = { + ...request, + path: resolver.join(request.path, moduleName), + relativePath: + request.relativePath && + resolver.join(request.relativePath, moduleName), + request: remainingRequest, + fullySpecified + }; + resolver.doResolve(target, obj, null, resolveContext, callback); + } + ); + } +}; + + +/***/ }), + +/***/ 97539: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class JoinRequestPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("JoinRequestPlugin", (request, resolveContext, callback) => { + const obj = { + ...request, + path: resolver.join(request.path, request.request), + relativePath: + request.relativePath && + resolver.join(request.relativePath, request.request), + request: undefined + }; + resolver.doResolve(target, obj, null, resolveContext, callback); + }); + } +}; + + +/***/ }), + +/***/ 80309: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ + +module.exports = class LogInfoPlugin { + constructor(source) { + this.source = source; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const source = this.source; + resolver + .getHook(this.source) + .tapAsync("LogInfoPlugin", (request, resolveContext, callback) => { + if (!resolveContext.log) return callback(); + const log = resolveContext.log; + const prefix = "[" + source + "] "; + if (request.path) + log(prefix + "Resolving in directory: " + request.path); + if (request.request) + log(prefix + "Resolving request: " + request.request); + if (request.module) log(prefix + "Request is an module request."); + if (request.directory) log(prefix + "Request is a directory request."); + if (request.query) + log(prefix + "Resolving request query: " + request.query); + if (request.fragment) + log(prefix + "Resolving request fragment: " + request.fragment); + if (request.descriptionFilePath) + log( + prefix + "Has description data from " + request.descriptionFilePath + ); + if (request.relativePath) + log( + prefix + + "Relative path from description file is: " + + request.relativePath + ); + callback(); + }); + } +}; + + +/***/ }), + +/***/ 69263: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const path = __webpack_require__(85622); +const DescriptionFileUtils = __webpack_require__(64674); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** @typedef {{name: string|Array, forceRelative: boolean}} MainFieldOptions */ + +const alreadyTriedMainField = Symbol("alreadyTriedMainField"); + +module.exports = class MainFieldPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {MainFieldOptions} options options + * @param {string | ResolveStepHook} target target + */ + constructor(source, options, target) { + this.source = source; + this.options = options; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("MainFieldPlugin", (request, resolveContext, callback) => { + if ( + request.path !== request.descriptionFileRoot || + request[alreadyTriedMainField] === request.descriptionFilePath || + !request.descriptionFilePath + ) + return callback(); + const filename = path.basename(request.descriptionFilePath); + let mainModule = DescriptionFileUtils.getField( + request.descriptionFileData, + this.options.name + ); + + if ( + !mainModule || + typeof mainModule !== "string" || + mainModule === "." || + mainModule === "./" + ) { + return callback(); + } + if (this.options.forceRelative && !/^\.\.?\//.test(mainModule)) + mainModule = "./" + mainModule; + const obj = { + ...request, + request: mainModule, + module: false, + directory: mainModule.endsWith("/"), + [alreadyTriedMainField]: request.descriptionFilePath + }; + return resolver.doResolve( + target, + obj, + "use " + + mainModule + + " from " + + this.options.name + + " in " + + filename, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 33318: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const forEachBail = __webpack_require__(8178); +const getPaths = __webpack_require__(24639); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class ModulesInHierachicDirectoriesPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | Array} directories directories + * @param {string | ResolveStepHook} target target + */ + constructor(source, directories, target) { + this.source = source; + this.directories = /** @type {Array} */ ([]).concat(directories); + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "ModulesInHierachicDirectoriesPlugin", + (request, resolveContext, callback) => { + const fs = resolver.fileSystem; + const addrs = getPaths(request.path) + .paths.map(p => { + return this.directories.map(d => resolver.join(p, d)); + }) + .reduce((array, p) => { + array.push.apply(array, p); + return array; + }, []); + forEachBail( + addrs, + (addr, callback) => { + fs.stat(addr, (err, stat) => { + if (!err && stat && stat.isDirectory()) { + const obj = { + ...request, + path: addr, + request: "./" + request.request, + module: false + }; + const message = "looking for modules in " + addr; + return resolver.doResolve( + target, + obj, + message, + resolveContext, + callback + ); + } + if (resolveContext.log) + resolveContext.log( + addr + " doesn't exist or is not a directory" + ); + if (resolveContext.missingDependencies) + resolveContext.missingDependencies.add(addr); + return callback(); + }); + }, + callback + ); + } + ); + } +}; + + +/***/ }), + +/***/ 88016: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class ModulesInRootPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string} path path + * @param {string | ResolveStepHook} target target + */ + constructor(source, path, target) { + this.source = source; + this.path = path; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ModulesInRootPlugin", (request, resolveContext, callback) => { + const obj = { + ...request, + path: this.path, + request: "./" + request.request, + module: false + }; + resolver.doResolve( + target, + obj, + "looking for modules in " + this.path, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 22299: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class NextPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("NextPlugin", (request, resolveContext, callback) => { + resolver.doResolve(target, request, null, resolveContext, callback); + }); + } +}; + + +/***/ }), + +/***/ 79264: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class ParsePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {Partial} requestOptions request options + * @param {string | ResolveStepHook} target target + */ + constructor(source, requestOptions, target) { + this.source = source; + this.requestOptions = requestOptions; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ParsePlugin", (request, resolveContext, callback) => { + const parsed = resolver.parse(/** @type {string} */ (request.request)); + const obj = { ...request, ...parsed, ...this.requestOptions }; + if (request.query && !parsed.query) { + obj.query = request.query; + } + if (request.fragment && !parsed.fragment) { + obj.fragment = request.fragment; + } + if (parsed && resolveContext.log) { + if (parsed.module) resolveContext.log("Parsed request is a module"); + if (parsed.directory) + resolveContext.log("Parsed request is a directory"); + } + // There is an edge-case where a request with # can be a path or a fragment -> try both + if (obj.request && !obj.query && obj.fragment) { + const directory = obj.fragment.endsWith("/"); + const alternative = { + ...obj, + directory, + request: + obj.request + + (obj.directory ? "/" : "") + + (directory ? obj.fragment.slice(0, -1) : obj.fragment), + fragment: "" + }; + resolver.doResolve( + target, + alternative, + null, + resolveContext, + (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + resolver.doResolve(target, obj, null, resolveContext, callback); + } + ); + return; + } + resolver.doResolve(target, obj, null, resolveContext, callback); + }); + } +}; + + +/***/ }), + +/***/ 55221: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Maël Nison @arcanis +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** + * @typedef {Object} PnpApiImpl + * @property {function(string, string, Object): string} resolveToUnqualified + */ + +module.exports = class PnpPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {PnpApiImpl} pnpApi pnpApi + * @param {string | ResolveStepHook} target target + */ + constructor(source, pnpApi, target) { + this.source = source; + this.pnpApi = pnpApi; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("PnpPlugin", (request, resolveContext, callback) => { + const req = request.request; + if (!req) return callback(); + + // The trailing slash indicates to PnP that this value is a folder rather than a file + const issuer = `${request.path}/`; + + const packageMatch = /^(@[^/]+\/)?[^/]+/.exec(req); + if (!packageMatch) return callback(); + + const packageName = packageMatch[0]; + const innerRequest = `.${req.slice(packageName.length)}`; + + let resolution; + let apiResolution; + try { + resolution = this.pnpApi.resolveToUnqualified(packageName, issuer, { + considerBuiltins: false + }); + if (resolveContext.fileDependencies) { + apiResolution = this.pnpApi.resolveToUnqualified("pnpapi", issuer, { + considerBuiltins: false + }); + } + } catch (error) { + if ( + error.code === "MODULE_NOT_FOUND" && + error.pnpCode === "UNDECLARED_DEPENDENCY" + ) { + // This is not a PnP managed dependency. + // Try to continue resolving with our alternatives + if (resolveContext.log) { + resolveContext.log(`request is not managed by the pnpapi`); + for (const line of error.message.split("\n").filter(Boolean)) + resolveContext.log(` ${line}`); + } + return callback(); + } + return callback(error); + } + + if (resolution === packageName) return callback(); + + if (apiResolution && resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(apiResolution); + } + + const obj = { + ...request, + path: resolution, + request: innerRequest, + ignoreSymlinks: true, + fullySpecified: request.fullySpecified && innerRequest !== "." + }; + resolver.doResolve( + target, + obj, + `resolved by pnp to ${resolution}`, + resolveContext, + (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + // Skip alternatives + return callback(null, null); + } + ); + }); + } +}; + + +/***/ }), + +/***/ 19635: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { AsyncSeriesBailHook, AsyncSeriesHook, SyncHook } = __webpack_require__(18416); +const createInnerContext = __webpack_require__(75356); +const { parseIdentifier } = __webpack_require__(53692); +const { + normalize, + cachedJoin: join, + getType, + PathType +} = __webpack_require__(83008); + +/** @typedef {import("./ResolverFactory").ResolveOptions} ResolveOptions */ + +/** + * @typedef {Object} FileSystemStats + * @property {function(): boolean} isDirectory + * @property {function(): boolean} isFile + */ + +/** + * @typedef {Object} FileSystemDirent + * @property {Buffer | string} name + * @property {function(): boolean} isDirectory + * @property {function(): boolean} isFile + */ + +/** + * @typedef {Object} PossibleFileSystemError + * @property {string=} code + * @property {number=} errno + * @property {string=} path + * @property {string=} syscall + */ + +/** + * @template T + * @callback FileSystemCallback + * @param {PossibleFileSystemError & Error | null | undefined} err + * @param {T=} result + */ + +/** + * @typedef {Object} FileSystem + * @property {(function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void} readFile + * @property {(function(string, FileSystemCallback<(Buffer | string)[] | FileSystemDirent[]>): void) & function(string, object, FileSystemCallback<(Buffer | string)[] | FileSystemDirent[]>): void} readdir + * @property {((function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void)=} readJson + * @property {(function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void} readlink + * @property {(function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void=} lstat + * @property {(function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void} stat + */ + +/** + * @typedef {Object} SyncFileSystem + * @property {function(string, object=): Buffer | string} readFileSync + * @property {function(string, object=): (Buffer | string)[] | FileSystemDirent[]} readdirSync + * @property {(function(string, object=): object)=} readJsonSync + * @property {function(string, object=): Buffer | string} readlinkSync + * @property {function(string, object=): FileSystemStats=} lstatSync + * @property {function(string, object=): FileSystemStats} statSync + */ + +/** + * @typedef {Object} ParsedIdentifier + * @property {string} request + * @property {string} query + * @property {string} fragment + * @property {boolean} directory + * @property {boolean} module + * @property {boolean} file + * @property {boolean} internal + */ + +/** + * @typedef {Object} BaseResolveRequest + * @property {string | false} path + * @property {string=} descriptionFilePath + * @property {string=} descriptionFileRoot + * @property {object=} descriptionFileData + * @property {string=} relativePath + * @property {boolean=} ignoreSymlinks + * @property {boolean=} fullySpecified + */ + +/** @typedef {BaseResolveRequest & Partial} ResolveRequest */ + +/** + * String with special formatting + * @typedef {string} StackEntry + */ + +/** @template T @typedef {{ add: (T) => void }} WriteOnlySet */ + +/** + * Resolve context + * @typedef {Object} ResolveContext + * @property {WriteOnlySet=} contextDependencies + * @property {WriteOnlySet=} fileDependencies files that was found on file system + * @property {WriteOnlySet=} missingDependencies dependencies that was not found on file system + * @property {Set=} stack set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`, + * @property {(function(string): void)=} log log function + */ + +/** @typedef {AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null>} ResolveStepHook */ + +/** + * @param {string} str input string + * @returns {string} in camel case + */ +function toCamelCase(str) { + return str.replace(/-([a-z])/g, str => str.substr(1).toUpperCase()); +} + +class Resolver { + /** + * @param {ResolveStepHook} hook hook + * @param {ResolveRequest} request request + * @returns {StackEntry} stack entry + */ + static createStackEntry(hook, request) { + return ( + hook.name + + ": (" + + request.path + + ") " + + (request.request || "") + + (request.query || "") + + (request.fragment || "") + + (request.directory ? " directory" : "") + + (request.module ? " module" : "") + ); + } + + /** + * @param {FileSystem} fileSystem a filesystem + * @param {ResolveOptions} options options + */ + constructor(fileSystem, options) { + this.fileSystem = fileSystem; + this.options = options; + this.hooks = { + /** @type {SyncHook<[ResolveStepHook, ResolveRequest], void>} */ + resolveStep: new SyncHook(["hook", "request"], "resolveStep"), + /** @type {SyncHook<[ResolveRequest, Error]>} */ + noResolve: new SyncHook(["request", "error"], "noResolve"), + /** @type {ResolveStepHook} */ + resolve: new AsyncSeriesBailHook( + ["request", "resolveContext"], + "resolve" + ), + /** @type {AsyncSeriesHook<[ResolveRequest, ResolveContext]>} */ + result: new AsyncSeriesHook(["result", "resolveContext"], "result") + }; + } + + /** + * @param {string | ResolveStepHook} name hook name or hook itself + * @returns {ResolveStepHook} the hook + */ + ensureHook(name) { + if (typeof name !== "string") { + return name; + } + name = toCamelCase(name); + if (/^before/.test(name)) { + return /** @type {ResolveStepHook} */ (this.ensureHook( + name[6].toLowerCase() + name.substr(7) + ).withOptions({ + stage: -10 + })); + } + if (/^after/.test(name)) { + return /** @type {ResolveStepHook} */ (this.ensureHook( + name[5].toLowerCase() + name.substr(6) + ).withOptions({ + stage: 10 + })); + } + const hook = this.hooks[name]; + if (!hook) { + return (this.hooks[name] = new AsyncSeriesBailHook( + ["request", "resolveContext"], + name + )); + } + return hook; + } + + /** + * @param {string | ResolveStepHook} name hook name or hook itself + * @returns {ResolveStepHook} the hook + */ + getHook(name) { + if (typeof name !== "string") { + return name; + } + name = toCamelCase(name); + if (/^before/.test(name)) { + return /** @type {ResolveStepHook} */ (this.getHook( + name[6].toLowerCase() + name.substr(7) + ).withOptions({ + stage: -10 + })); + } + if (/^after/.test(name)) { + return /** @type {ResolveStepHook} */ (this.getHook( + name[5].toLowerCase() + name.substr(6) + ).withOptions({ + stage: 10 + })); + } + const hook = this.hooks[name]; + if (!hook) { + throw new Error(`Hook ${name} doesn't exist`); + } + return hook; + } + + /** + * @param {object} context context information object + * @param {string} path context path + * @param {string} request request string + * @returns {string | false} result + */ + resolveSync(context, path, request) { + /** @type {Error | null | undefined} */ + let err = undefined; + /** @type {string | false | undefined} */ + let result = undefined; + let sync = false; + this.resolve(context, path, request, {}, (e, r) => { + err = e; + result = r; + sync = true; + }); + if (!sync) { + throw new Error( + "Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!" + ); + } + if (err) throw err; + if (result === undefined) throw new Error("No result"); + return result; + } + + /** + * @param {object} context context information object + * @param {string} path context path + * @param {string} request request string + * @param {ResolveContext} resolveContext resolve context + * @param {function(Error | null, (string|false)=, ResolveRequest=): void} callback callback function + * @returns {void} + */ + resolve(context, path, request, resolveContext, callback) { + if (!context || typeof context !== "object") + return callback(new Error("context argument is not an object")); + if (typeof path !== "string") + return callback(new Error("path argument is not a string")); + if (typeof request !== "string") + return callback(new Error("path argument is not a string")); + if (!resolveContext) + return callback(new Error("resolveContext argument is not set")); + + const obj = { + context: context, + path: path, + request: request + }; + + const message = `resolve '${request}' in '${path}'`; + + const finishResolved = result => { + return callback( + null, + result.path === false + ? false + : `${result.path.replace(/#/g, "\0#")}${ + result.query ? result.query.replace(/#/g, "\0#") : "" + }${result.fragment || ""}`, + result + ); + }; + + const finishWithoutResolve = log => { + /** + * @type {Error & {details?: string}} + */ + const error = new Error("Can't " + message); + error.details = log.join("\n"); + this.hooks.noResolve.call(obj, error); + return callback(error); + }; + + if (resolveContext.log) { + // We need log anyway to capture it in case of an error + const parentLog = resolveContext.log; + const log = []; + return this.doResolve( + this.hooks.resolve, + obj, + message, + { + log: msg => { + parentLog(msg); + log.push(msg); + }, + fileDependencies: resolveContext.fileDependencies, + contextDependencies: resolveContext.contextDependencies, + missingDependencies: resolveContext.missingDependencies, + stack: resolveContext.stack + }, + (err, result) => { + if (err) return callback(err); + + if (result) return finishResolved(result); + + return finishWithoutResolve(log); + } + ); + } else { + // Try to resolve assuming there is no error + // We don't log stuff in this case + return this.doResolve( + this.hooks.resolve, + obj, + message, + { + log: undefined, + fileDependencies: resolveContext.fileDependencies, + contextDependencies: resolveContext.contextDependencies, + missingDependencies: resolveContext.missingDependencies, + stack: resolveContext.stack + }, + (err, result) => { + if (err) return callback(err); + + if (result) return finishResolved(result); + + // log is missing for the error details + // so we redo the resolving for the log info + // this is more expensive to the success case + // is assumed by default + + const log = []; + + return this.doResolve( + this.hooks.resolve, + obj, + message, + { + log: msg => log.push(msg), + stack: resolveContext.stack + }, + (err, result) => { + if (err) return callback(err); + + return finishWithoutResolve(log); + } + ); + } + ); + } + } + + doResolve(hook, request, message, resolveContext, callback) { + const stackEntry = Resolver.createStackEntry(hook, request); + + let newStack; + if (resolveContext.stack) { + newStack = new Set(resolveContext.stack); + if (resolveContext.stack.has(stackEntry)) { + /** + * Prevent recursion + * @type {Error & {recursion?: boolean}} + */ + const recursionError = new Error( + "Recursion in resolving\nStack:\n " + + Array.from(newStack).join("\n ") + ); + recursionError.recursion = true; + if (resolveContext.log) + resolveContext.log("abort resolving because of recursion"); + return callback(recursionError); + } + newStack.add(stackEntry); + } else { + newStack = new Set([stackEntry]); + } + this.hooks.resolveStep.call(hook, request); + + if (hook.isUsed()) { + const innerContext = createInnerContext( + { + log: resolveContext.log, + fileDependencies: resolveContext.fileDependencies, + contextDependencies: resolveContext.contextDependencies, + missingDependencies: resolveContext.missingDependencies, + stack: newStack + }, + message + ); + return hook.callAsync(request, innerContext, (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + callback(); + }); + } else { + callback(); + } + } + + /** + * @param {string} identifier identifier + * @returns {ParsedIdentifier} parsed identifier + */ + parse(identifier) { + const part = { + request: "", + query: "", + fragment: "", + module: false, + directory: false, + file: false, + internal: false + }; + + const parsedIdentifier = parseIdentifier(identifier); + + if (!parsedIdentifier) return part; + + [part.request, part.query, part.fragment] = parsedIdentifier; + + if (part.request.length > 0) { + part.internal = this.isPrivate(identifier); + part.module = this.isModule(part.request); + part.directory = this.isDirectory(part.request); + if (part.directory) { + part.request = part.request.substr(0, part.request.length - 1); + } + } + + return part; + } + + isModule(path) { + return getType(path) === PathType.Normal; + } + + isPrivate(path) { + return getType(path) === PathType.Internal; + } + + /** + * @param {string} path a path + * @returns {boolean} true, if the path is a directory path + */ + isDirectory(path) { + return path.endsWith("/"); + } + + join(path, request) { + return join(path, request); + } + + normalize(path) { + return normalize(path); + } +} + +module.exports = Resolver; + + +/***/ }), + +/***/ 92808: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const versions = __webpack_require__(61765).versions; +const Resolver = __webpack_require__(19635); +const { getType, PathType } = __webpack_require__(83008); + +const SyncAsyncFileSystemDecorator = __webpack_require__(84433); + +const AliasFieldPlugin = __webpack_require__(67896); +const AliasPlugin = __webpack_require__(35593); +const AppendPlugin = __webpack_require__(25353); +const ConditionalPlugin = __webpack_require__(22641); +const DescriptionFilePlugin = __webpack_require__(99951); +const DirectoryExistsPlugin = __webpack_require__(46835); +const ExportsFieldPlugin = __webpack_require__(88990); +const FileExistsPlugin = __webpack_require__(95762); +const ImportsFieldPlugin = __webpack_require__(65727); +const JoinRequestPartPlugin = __webpack_require__(6241); +const JoinRequestPlugin = __webpack_require__(97539); +const MainFieldPlugin = __webpack_require__(69263); +const ModulesInHierachicDirectoriesPlugin = __webpack_require__(33318); +const ModulesInRootPlugin = __webpack_require__(88016); +const NextPlugin = __webpack_require__(22299); +const ParsePlugin = __webpack_require__(79264); +const PnpPlugin = __webpack_require__(55221); +const RestrictionsPlugin = __webpack_require__(41752); +const ResultPlugin = __webpack_require__(79757); +const RootsPlugin = __webpack_require__(5571); +const SelfReferencePlugin = __webpack_require__(29440); +const SymlinkPlugin = __webpack_require__(98522); +const TryNextPlugin = __webpack_require__(98176); +const UnsafeCachePlugin = __webpack_require__(93610); +const UseFilePlugin = __webpack_require__(9852); + +/** @typedef {import("./AliasPlugin").AliasOption} AliasOptionEntry */ +/** @typedef {import("./PnpPlugin").PnpApiImpl} PnpApi */ +/** @typedef {import("./Resolver").FileSystem} FileSystem */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */ + +/** @typedef {string|string[]|false} AliasOptionNewRequest */ +/** @typedef {{[k: string]: AliasOptionNewRequest}} AliasOptions */ +/** @typedef {{apply: function(Resolver): void} | function(this: Resolver, Resolver): void} Plugin */ + +/** + * @typedef {Object} UserResolveOptions + * @property {(AliasOptions | AliasOptionEntry[])=} alias A list of module alias configurations or an object which maps key to value + * @property {(AliasOptions | AliasOptionEntry[])=} fallback A list of module alias configurations or an object which maps key to value, applied only after modules option + * @property {(string | string[])[]=} aliasFields A list of alias fields in description files + * @property {(function(ResolveRequest): boolean)=} cachePredicate A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties. + * @property {boolean=} cacheWithContext Whether or not the unsafeCache should include request context as part of the cache key. + * @property {string[]=} descriptionFiles A list of description files to read from + * @property {string[]=} conditionNames A list of exports field condition names. + * @property {boolean=} enforceExtension Enforce that a extension from extensions must be used + * @property {(string | string[])[]=} exportsFields A list of exports fields in description files + * @property {(string | string[])[]=} importsFields A list of imports fields in description files + * @property {string[]=} extensions A list of extensions which should be tried for files + * @property {FileSystem} fileSystem The file system which should be used + * @property {(Object | boolean)=} unsafeCache Use this cache object to unsafely cache the successful requests + * @property {boolean=} symlinks Resolve symlinks to their symlinked location + * @property {Resolver=} resolver A prepared Resolver to which the plugins are attached + * @property {string[] | string=} modules A list of directories to resolve modules from, can be absolute path or folder name + * @property {(string | string[] | {name: string | string[], forceRelative: boolean})[]=} mainFields A list of main fields in description files + * @property {string[]=} mainFiles A list of main files in directories + * @property {Plugin[]=} plugins A list of additional resolve plugins which should be applied + * @property {PnpApi | null=} pnpApi A PnP API that should be used - null is "never", undefined is "auto" + * @property {string[]=} roots A list of root paths + * @property {boolean=} fullySpecified The request is already fully specified and no extensions or directories are resolved for it + * @property {boolean=} resolveToContext Resolve to a context instead of a file + * @property {(string|RegExp)[]=} restrictions A list of resolve restrictions + * @property {boolean=} useSyncFileSystemCalls Use only the sync constiants of the file system calls + * @property {boolean=} preferRelative Prefer to resolve module requests as relative requests before falling back to modules + */ + +/** + * @typedef {Object} ResolveOptions + * @property {AliasOptionEntry[]} alias + * @property {AliasOptionEntry[]} fallback + * @property {Set} aliasFields + * @property {(function(ResolveRequest): boolean)} cachePredicate + * @property {boolean} cacheWithContext + * @property {Set} conditionNames A list of exports field condition names. + * @property {string[]} descriptionFiles + * @property {boolean} enforceExtension + * @property {Set} exportsFields + * @property {Set} importsFields + * @property {Set} extensions + * @property {FileSystem} fileSystem + * @property {Object | false} unsafeCache + * @property {boolean} symlinks + * @property {Resolver=} resolver + * @property {Array} modules + * @property {{name: string[], forceRelative: boolean}[]} mainFields + * @property {Set} mainFiles + * @property {Plugin[]} plugins + * @property {PnpApi | null} pnpApi + * @property {Set} roots + * @property {boolean} fullySpecified + * @property {boolean} resolveToContext + * @property {Set} restrictions + * @property {boolean} preferRelative + */ + +/** + * @param {PnpApi | null=} option option + * @returns {PnpApi | null} processed option + */ +function processPnpApiOption(option) { + if ( + option === undefined && + /** @type {NodeJS.ProcessVersions & {pnp: string}} */ (versions).pnp + ) { + // @ts-ignore + return __webpack_require__(97289); // eslint-disable-line node/no-missing-require + } + + return option || null; +} + +/** + * @param {AliasOptions | AliasOptionEntry[] | undefined} alias alias + * @returns {AliasOptionEntry[]} normalized aliases + */ +function normalizeAlias(alias) { + return typeof alias === "object" && !Array.isArray(alias) && alias !== null + ? Object.keys(alias).map(key => { + /** @type {AliasOptionEntry} */ + const obj = { name: key, onlyModule: false, alias: alias[key] }; + + if (/\$$/.test(key)) { + obj.onlyModule = true; + obj.name = key.substr(0, key.length - 1); + } + + return obj; + }) + : /** @type {Array} */ (alias) || []; +} + +/** + * @param {UserResolveOptions} options input options + * @returns {ResolveOptions} output options + */ +function createOptions(options) { + const mainFieldsSet = new Set(options.mainFields || ["main"]); + const mainFields = []; + + for (const item of mainFieldsSet) { + if (typeof item === "string") { + mainFields.push({ + name: [item], + forceRelative: true + }); + } else if (Array.isArray(item)) { + mainFields.push({ + name: item, + forceRelative: true + }); + } else { + mainFields.push({ + name: Array.isArray(item.name) ? item.name : [item.name], + forceRelative: item.forceRelative + }); + } + } + + return { + alias: normalizeAlias(options.alias), + fallback: normalizeAlias(options.fallback), + aliasFields: new Set(options.aliasFields), + cachePredicate: + options.cachePredicate || + function () { + return true; + }, + cacheWithContext: + typeof options.cacheWithContext !== "undefined" + ? options.cacheWithContext + : true, + exportsFields: new Set(options.exportsFields || ["exports"]), + importsFields: new Set(options.importsFields || ["imports"]), + conditionNames: new Set(options.conditionNames), + descriptionFiles: Array.from( + new Set(options.descriptionFiles || ["package.json"]) + ), + enforceExtension: options.enforceExtension || false, + extensions: new Set(options.extensions || [".js", ".json", ".node"]), + fileSystem: options.useSyncFileSystemCalls + ? new SyncAsyncFileSystemDecorator( + /** @type {SyncFileSystem} */ ( + /** @type {unknown} */ (options.fileSystem) + ) + ) + : options.fileSystem, + unsafeCache: + options.unsafeCache && typeof options.unsafeCache !== "object" + ? {} + : options.unsafeCache || false, + symlinks: typeof options.symlinks !== "undefined" ? options.symlinks : true, + resolver: options.resolver, + modules: mergeFilteredToArray( + Array.isArray(options.modules) + ? options.modules + : options.modules + ? [options.modules] + : ["node_modules"], + item => { + const type = getType(item); + return type === PathType.Normal || type === PathType.Relative; + } + ), + mainFields, + mainFiles: new Set(options.mainFiles || ["index"]), + plugins: options.plugins || [], + pnpApi: processPnpApiOption(options.pnpApi), + roots: new Set(options.roots || undefined), + fullySpecified: options.fullySpecified || false, + resolveToContext: options.resolveToContext || false, + preferRelative: options.preferRelative || false, + restrictions: new Set(options.restrictions) + }; +} + +/** + * @param {UserResolveOptions} options resolve options + * @returns {Resolver} created resolver + */ +exports.createResolver = function (options) { + const normalizedOptions = createOptions(options); + + const { + alias, + fallback, + aliasFields, + cachePredicate, + cacheWithContext, + conditionNames, + descriptionFiles, + enforceExtension, + exportsFields, + importsFields, + extensions, + fileSystem, + fullySpecified, + mainFields, + mainFiles, + modules, + plugins: userPlugins, + pnpApi, + resolveToContext, + preferRelative, + symlinks, + unsafeCache, + resolver: customResolver, + restrictions, + roots + } = normalizedOptions; + + const plugins = userPlugins.slice(); + + const resolver = customResolver + ? customResolver + : new Resolver(fileSystem, normalizedOptions); + + //// pipeline //// + + resolver.ensureHook("resolve"); + resolver.ensureHook("internalResolve"); + resolver.ensureHook("newInteralResolve"); + resolver.ensureHook("parsedResolve"); + resolver.ensureHook("describedResolve"); + resolver.ensureHook("internal"); + resolver.ensureHook("rawModule"); + resolver.ensureHook("module"); + resolver.ensureHook("resolveAsModule"); + resolver.ensureHook("undescribedResolveInPackage"); + resolver.ensureHook("resolveInPackage"); + resolver.ensureHook("resolveInExistingDirectory"); + resolver.ensureHook("relative"); + resolver.ensureHook("describedRelative"); + resolver.ensureHook("directory"); + resolver.ensureHook("undescribedExistingDirectory"); + resolver.ensureHook("existingDirectory"); + resolver.ensureHook("undescribedRawFile"); + resolver.ensureHook("rawFile"); + resolver.ensureHook("file"); + resolver.ensureHook("finalFile"); + resolver.ensureHook("existingFile"); + resolver.ensureHook("resolved"); + + // resolve + for (const { source, resolveOptions } of [ + { source: "resolve", resolveOptions: { fullySpecified } }, + { source: "internal-resolve", resolveOptions: { fullySpecified: false } } + ]) { + if (unsafeCache) { + plugins.push( + new UnsafeCachePlugin( + source, + cachePredicate, + unsafeCache, + cacheWithContext, + `new-${source}` + ) + ); + plugins.push( + new ParsePlugin(`new-${source}`, resolveOptions, "parsed-resolve") + ); + } else { + plugins.push(new ParsePlugin(source, resolveOptions, "parsed-resolve")); + } + } + + // parsed-resolve + plugins.push( + new DescriptionFilePlugin( + "parsed-resolve", + descriptionFiles, + false, + "described-resolve" + ) + ); + plugins.push(new NextPlugin("after-parsed-resolve", "described-resolve")); + + // described-resolve + plugins.push(new NextPlugin("described-resolve", "normal-resolve")); + if (fallback.length > 0) { + plugins.push( + new AliasPlugin("described-resolve", fallback, "internal-resolve") + ); + } + + // normal-resolve + if (alias.length > 0) + plugins.push(new AliasPlugin("normal-resolve", alias, "internal-resolve")); + aliasFields.forEach(item => { + plugins.push( + new AliasFieldPlugin("normal-resolve", item, "internal-resolve") + ); + }); + if (preferRelative) { + plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative")); + } + plugins.push( + new ConditionalPlugin( + "after-normal-resolve", + { module: true }, + "resolve as module", + false, + "raw-module" + ) + ); + plugins.push( + new ConditionalPlugin( + "after-normal-resolve", + { internal: true }, + "resolve as internal import", + false, + "internal" + ) + ); + if (roots.size > 0) { + plugins.push(new RootsPlugin("after-normal-resolve", roots, "relative")); + } + if (!preferRelative) { + plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative")); + } + + // internal + importsFields.forEach(importsField => { + plugins.push( + new ImportsFieldPlugin( + "internal", + conditionNames, + importsField, + "relative", + "internal-resolve" + ) + ); + }); + + // raw-module + exportsFields.forEach(exportsField => { + plugins.push( + new SelfReferencePlugin("raw-module", exportsField, "resolve-as-module") + ); + }); + modules.forEach(item => { + if (Array.isArray(item)) { + plugins.push( + new ModulesInHierachicDirectoriesPlugin("raw-module", item, "module") + ); + if (item.includes("node_modules") && pnpApi) { + plugins.push( + new PnpPlugin("raw-module", pnpApi, "undescribed-resolve-in-package") + ); + } + } else { + plugins.push(new ModulesInRootPlugin("raw-module", item, "module")); + } + }); + + // module + plugins.push(new JoinRequestPartPlugin("module", "resolve-as-module")); + + // resolve-as-module + if (!resolveToContext) { + plugins.push( + new ConditionalPlugin( + "resolve-as-module", + { directory: false, request: "." }, + "single file module", + true, + "undescribed-raw-file" + ) + ); + } + plugins.push( + new DirectoryExistsPlugin( + "resolve-as-module", + "undescribed-resolve-in-package" + ) + ); + + // undescribed-resolve-in-package + plugins.push( + new DescriptionFilePlugin( + "undescribed-resolve-in-package", + descriptionFiles, + false, + "resolve-in-package" + ) + ); + plugins.push( + new NextPlugin("after-undescribed-resolve-in-package", "resolve-in-package") + ); + + // resolve-in-package + exportsFields.forEach(exportsField => { + plugins.push( + new ExportsFieldPlugin( + "resolve-in-package", + conditionNames, + exportsField, + "relative" + ) + ); + }); + plugins.push( + new NextPlugin("resolve-in-package", "resolve-in-existing-directory") + ); + + // resolve-in-existing-directory + plugins.push( + new JoinRequestPlugin("resolve-in-existing-directory", "relative") + ); + + // relative + plugins.push( + new DescriptionFilePlugin( + "relative", + descriptionFiles, + true, + "described-relative" + ) + ); + plugins.push(new NextPlugin("after-relative", "described-relative")); + + // described-relative + if (resolveToContext) { + plugins.push(new NextPlugin("described-relative", "directory")); + } else { + plugins.push( + new ConditionalPlugin( + "described-relative", + { directory: false }, + null, + true, + "raw-file" + ) + ); + plugins.push( + new ConditionalPlugin( + "described-relative", + { fullySpecified: false }, + "as directory", + true, + "directory" + ) + ); + } + + // directory + plugins.push( + new DirectoryExistsPlugin("directory", "undescribed-existing-directory") + ); + + if (resolveToContext) { + // undescribed-existing-directory + plugins.push(new NextPlugin("undescribed-existing-directory", "resolved")); + } else { + // undescribed-existing-directory + plugins.push( + new DescriptionFilePlugin( + "undescribed-existing-directory", + descriptionFiles, + false, + "existing-directory" + ) + ); + mainFiles.forEach(item => { + plugins.push( + new UseFilePlugin( + "undescribed-existing-directory", + item, + "undescribed-raw-file" + ) + ); + }); + + // described-existing-directory + mainFields.forEach(item => { + plugins.push( + new MainFieldPlugin( + "existing-directory", + item, + "resolve-in-existing-directory" + ) + ); + }); + mainFiles.forEach(item => { + plugins.push( + new UseFilePlugin("existing-directory", item, "undescribed-raw-file") + ); + }); + + // undescribed-raw-file + plugins.push( + new DescriptionFilePlugin( + "undescribed-raw-file", + descriptionFiles, + true, + "raw-file" + ) + ); + plugins.push(new NextPlugin("after-undescribed-raw-file", "raw-file")); + + // raw-file + plugins.push( + new ConditionalPlugin( + "raw-file", + { fullySpecified: true }, + null, + false, + "file" + ) + ); + if (!enforceExtension) { + plugins.push(new TryNextPlugin("raw-file", "no extension", "file")); + } + extensions.forEach(item => { + plugins.push(new AppendPlugin("raw-file", item, "file")); + }); + + // file + if (alias.length > 0) + plugins.push(new AliasPlugin("file", alias, "internal-resolve")); + aliasFields.forEach(item => { + plugins.push(new AliasFieldPlugin("file", item, "internal-resolve")); + }); + plugins.push(new NextPlugin("file", "final-file")); + + // final-file + plugins.push(new FileExistsPlugin("final-file", "existing-file")); + + // existing-file + if (symlinks) + plugins.push(new SymlinkPlugin("existing-file", "existing-file")); + plugins.push(new NextPlugin("existing-file", "resolved")); + } + + // resolved + if (restrictions.size > 0) { + plugins.push(new RestrictionsPlugin(resolver.hooks.resolved, restrictions)); + } + plugins.push(new ResultPlugin(resolver.hooks.resolved)); + + //// RESOLVER //// + + for (const plugin of plugins) { + if (typeof plugin === "function") { + plugin.call(resolver, resolver); + } else { + plugin.apply(resolver); + } + } + + return resolver; +}; + +/** + * Merging filtered elements + * @param {string[]} array source array + * @param {function(string): boolean} filter predicate + * @returns {Array} merge result + */ +function mergeFilteredToArray(array, filter) { + /** @type {Array} */ + const result = []; + const set = new Set(array); + + for (const item of set) { + if (filter(item)) { + const lastElement = + result.length > 0 ? result[result.length - 1] : undefined; + if (Array.isArray(lastElement)) { + lastElement.push(item); + } else { + result.push([item]); + } + } else { + result.push(item); + } + } + + return result; +} + + +/***/ }), + +/***/ 41752: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +const slashCode = "/".charCodeAt(0); +const backslashCode = "\\".charCodeAt(0); + +const isInside = (path, parent) => { + if (!path.startsWith(parent)) return false; + if (path.length === parent.length) return true; + const charCode = path.charCodeAt(parent.length); + return charCode === slashCode || charCode === backslashCode; +}; + +module.exports = class RestrictionsPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {Set} restrictions restrictions + */ + constructor(source, restrictions) { + this.source = source; + this.restrictions = restrictions; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + resolver + .getHook(this.source) + .tapAsync("RestrictionsPlugin", (request, resolveContext, callback) => { + if (typeof request.path === "string") { + const path = request.path; + for (const rule of this.restrictions) { + if (typeof rule === "string") { + if (!isInside(path, rule)) { + if (resolveContext.log) { + resolveContext.log( + `${path} is not inside of the restriction ${rule}` + ); + } + return callback(null, null); + } + } else if (!rule.test(path)) { + if (resolveContext.log) { + resolveContext.log( + `${path} doesn't match the restriction ${rule}` + ); + } + return callback(null, null); + } + } + } + + callback(); + }); + } +}; + + +/***/ }), + +/***/ 79757: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class ResultPlugin { + /** + * @param {ResolveStepHook} source source + */ + constructor(source) { + this.source = source; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + this.source.tapAsync( + "ResultPlugin", + (request, resolverContext, callback) => { + const obj = { ...request }; + if (resolverContext.log) + resolverContext.log("reporting result " + obj.path); + resolver.hooks.result.callAsync(obj, resolverContext, err => { + if (err) return callback(err); + callback(null, obj); + }); + } + ); + } +}; + + +/***/ }), + +/***/ 5571: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const forEachBail = __webpack_require__(8178); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +class RootsPlugin { + /** + * @param {string | ResolveStepHook} source source hook + * @param {Set} roots roots + * @param {string | ResolveStepHook} target target hook + */ + constructor(source, roots, target) { + this.roots = Array.from(roots); + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + + resolver + .getHook(this.source) + .tapAsync("RootsPlugin", (request, resolveContext, callback) => { + const req = request.request; + if (!req) return callback(); + if (!req.startsWith("/")) return callback(); + + forEachBail( + this.roots, + (root, callback) => { + const path = resolver.join(root, req.slice(1)); + const obj = { + ...request, + path, + relativePath: request.relativePath && path + }; + resolver.doResolve( + target, + obj, + `root path ${root}`, + resolveContext, + callback + ); + }, + callback + ); + }); + } +} + +module.exports = RootsPlugin; + + +/***/ }), + +/***/ 29440: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const DescriptionFileUtils = __webpack_require__(64674); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +const slashCode = "/".charCodeAt(0); + +module.exports = class SelfReferencePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | string[]} fieldNamePath name path + * @param {string | ResolveStepHook} target target + */ + constructor(source, fieldNamePath, target) { + this.source = source; + this.target = target; + this.fieldName = fieldNamePath; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("SelfReferencePlugin", (request, resolveContext, callback) => { + if (!request.descriptionFilePath) return callback(); + + const req = request.request; + if (!req) return callback(); + + // Feature is only enabled when an exports field is present + const exportsField = DescriptionFileUtils.getField( + request.descriptionFileData, + this.fieldName + ); + if (!exportsField) return callback(); + + const name = DescriptionFileUtils.getField( + request.descriptionFileData, + "name" + ); + if (typeof name !== "string") return callback(); + + if ( + req.startsWith(name) && + (req.length === name.length || + req.charCodeAt(name.length) === slashCode) + ) { + const remainingRequest = `.${req.slice(name.length)}`; + + const obj = { + ...request, + request: remainingRequest, + path: /** @type {string} */ (request.descriptionFileRoot), + relativePath: "." + }; + + resolver.doResolve( + target, + obj, + "self reference", + resolveContext, + callback + ); + } else { + return callback(); + } + }); + } +}; + + +/***/ }), + +/***/ 98522: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const forEachBail = __webpack_require__(8178); +const getPaths = __webpack_require__(24639); +const { getType, PathType } = __webpack_require__(83008); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class SymlinkPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + const fs = resolver.fileSystem; + resolver + .getHook(this.source) + .tapAsync("SymlinkPlugin", (request, resolveContext, callback) => { + if (request.ignoreSymlinks) return callback(); + const pathsResult = getPaths(request.path); + const pathSeqments = pathsResult.seqments; + const paths = pathsResult.paths; + + let containsSymlink = false; + let idx = -1; + forEachBail( + paths, + (path, callback) => { + idx++; + if (resolveContext.fileDependencies) + resolveContext.fileDependencies.add(path); + fs.readlink(path, (err, result) => { + if (!err && result) { + pathSeqments[idx] = result; + containsSymlink = true; + // Shortcut when absolute symlink found + const resultType = getType(result.toString()); + if ( + resultType === PathType.AbsoluteWin || + resultType === PathType.AbsolutePosix + ) { + return callback(null, idx); + } + } + callback(); + }); + }, + (err, idx) => { + if (!containsSymlink) return callback(); + const resultSeqments = + typeof idx === "number" + ? pathSeqments.slice(0, idx + 1) + : pathSeqments.slice(); + const result = resultSeqments.reduceRight((a, b) => { + return resolver.join(a, b); + }); + const obj = { + ...request, + path: result + }; + resolver.doResolve( + target, + obj, + "resolved symlink to " + result, + resolveContext, + callback + ); + } + ); + }); + } +}; + + +/***/ }), + +/***/ 84433: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver").FileSystem} FileSystem */ +/** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */ + +/** + * @param {SyncFileSystem} fs file system implementation + * @constructor + */ +function SyncAsyncFileSystemDecorator(fs) { + this.fs = fs; + + this.lstat = undefined; + this.lstatSync = undefined; + const lstatSync = fs.lstatSync; + if (lstatSync) { + this.lstat = (arg, options, callback) => { + let result; + try { + result = lstatSync.call(fs, arg); + } catch (e) { + return (callback || options)(e); + } + (callback || options)(null, result); + }; + this.lstatSync = (arg, options) => lstatSync.call(fs, arg, options); + } + + this.stat = (arg, options, callback) => { + let result; + try { + result = fs.statSync(arg, options); + } catch (e) { + return (callback || options)(e); + } + (callback || options)(null, result); + }; + this.statSync = (arg, options) => fs.statSync(arg, options); + + this.readdir = (arg, options, callback) => { + let result; + try { + result = fs.readdirSync(arg); + } catch (e) { + return (callback || options)(e); + } + (callback || options)(null, result); + }; + this.readdirSync = (arg, options) => fs.readdirSync(arg, options); + + this.readFile = (arg, options, callback) => { + let result; + try { + result = fs.readFileSync(arg); + } catch (e) { + return (callback || options)(e); + } + (callback || options)(null, result); + }; + this.readFileSync = (arg, options) => fs.readFileSync(arg, options); + + this.readlink = (arg, options, callback) => { + let result; + try { + result = fs.readlinkSync(arg); + } catch (e) { + return (callback || options)(e); + } + (callback || options)(null, result); + }; + this.readlinkSync = (arg, options) => fs.readlinkSync(arg, options); + + this.readJson = undefined; + this.readJsonSync = undefined; + const readJsonSync = fs.readJsonSync; + if (readJsonSync) { + this.readJson = (arg, options, callback) => { + let result; + try { + result = readJsonSync.call(fs, arg); + } catch (e) { + return (callback || options)(e); + } + (callback || options)(null, result); + }; + + this.readJsonSync = (arg, options) => readJsonSync.call(fs, arg, options); + } +} +module.exports = SyncAsyncFileSystemDecorator; + + +/***/ }), + +/***/ 98176: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class TryNextPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string} message message + * @param {string | ResolveStepHook} target target + */ + constructor(source, message, target) { + this.source = source; + this.message = message; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("TryNextPlugin", (request, resolveContext, callback) => { + resolver.doResolve( + target, + request, + this.message, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 93610: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** @typedef {{[k: string]: any}} Cache */ + +function getCacheId(request, withContext) { + return JSON.stringify({ + context: withContext ? request.context : "", + path: request.path, + query: request.query, + fragment: request.fragment, + request: request.request + }); +} + +module.exports = class UnsafeCachePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {function(ResolveRequest): boolean} filterPredicate filterPredicate + * @param {Cache} cache cache + * @param {boolean} withContext withContext + * @param {string | ResolveStepHook} target target + */ + constructor(source, filterPredicate, cache, withContext, target) { + this.source = source; + this.filterPredicate = filterPredicate; + this.withContext = withContext; + this.cache = cache; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("UnsafeCachePlugin", (request, resolveContext, callback) => { + if (!this.filterPredicate(request)) return callback(); + const cacheId = getCacheId(request, this.withContext); + const cacheEntry = this.cache[cacheId]; + if (cacheEntry) { + return callback(null, cacheEntry); + } + resolver.doResolve( + target, + request, + null, + resolveContext, + (err, result) => { + if (err) return callback(err); + if (result) return callback(null, (this.cache[cacheId] = result)); + callback(); + } + ); + }); + } +}; + + +/***/ }), + +/***/ 9852: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class UseFilePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string} filename filename + * @param {string | ResolveStepHook} target target + */ + constructor(source, filename, target) { + this.source = source; + this.filename = filename; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("UseFilePlugin", (request, resolveContext, callback) => { + const filePath = resolver.join(request.path, this.filename); + const obj = { + ...request, + path: filePath, + relativePath: + request.relativePath && + resolver.join(request.relativePath, this.filename) + }; + resolver.doResolve( + target, + obj, + "using path: " + filePath, + resolveContext, + callback + ); + }); + } +}; + + +/***/ }), + +/***/ 75356: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +module.exports = function createInnerContext( + options, + message, + messageOptional +) { + let messageReported = false; + let innerLog = undefined; + if (options.log) { + if (message) { + innerLog = msg => { + if (!messageReported) { + options.log(message); + messageReported = true; + } + options.log(" " + msg); + }; + } else { + innerLog = options.log; + } + } + const childContext = { + log: innerLog, + fileDependencies: options.fileDependencies, + contextDependencies: options.contextDependencies, + missingDependencies: options.missingDependencies, + stack: options.stack + }; + return childContext; +}; + + +/***/ }), + +/***/ 8178: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +module.exports = function forEachBail(array, iterator, callback) { + if (array.length === 0) return callback(); + + let i = 0; + const next = () => { + let loop = undefined; + iterator(array[i++], (err, result) => { + if (err || result !== undefined || i >= array.length) { + return callback(err, result); + } + if (loop === false) while (next()); + loop = true; + }); + if (!loop) loop = false; + return loop; + }; + while (next()); +}; + + +/***/ }), + +/***/ 11993: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +module.exports = function getInnerRequest(resolver, request) { + if ( + typeof request.__innerRequest === "string" && + request.__innerRequest_request === request.request && + request.__innerRequest_relativePath === request.relativePath + ) + return request.__innerRequest; + let innerRequest; + if (request.request) { + innerRequest = request.request; + if (/^\.\.?\//.test(innerRequest) && request.relativePath) { + innerRequest = resolver.join(request.relativePath, innerRequest); + } + } else { + innerRequest = request.relativePath; + } + request.__innerRequest_request = request.request; + request.__innerRequest_relativePath = request.relativePath; + return (request.__innerRequest = innerRequest); +}; + + +/***/ }), + +/***/ 24639: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +module.exports = function getPaths(path) { + const parts = path.split(/(.*?[\\/]+)/); + const paths = [path]; + const seqments = [parts[parts.length - 1]]; + let part = parts[parts.length - 1]; + path = path.substr(0, path.length - part.length - 1); + for (let i = parts.length - 2; i > 2; i -= 2) { + paths.push(path); + part = parts[i]; + path = path.substr(0, path.length - part.length) || "/"; + seqments.push(part.substr(0, part.length - 1)); + } + part = parts[1]; + seqments.push(part); + paths.push(part); + return { + paths: paths, + seqments: seqments + }; +}; + +module.exports.basename = function basename(path) { + const i = path.lastIndexOf("/"), + j = path.lastIndexOf("\\"); + const p = i < 0 ? j : j < 0 ? i : i < j ? j : i; + if (p < 0) return null; + const s = path.substr(p + 1); + return s; +}; + + +/***/ }), + +/***/ 75707: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const fs = __webpack_require__(88715); +const CachedInputFileSystem = __webpack_require__(29843); +const ResolverFactory = __webpack_require__(92808); + +/** @typedef {import("./PnpPlugin").PnpApiImpl} PnpApi */ +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").FileSystem} FileSystem */ +/** @typedef {import("./Resolver").ResolveContext} ResolveContext */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./ResolverFactory").Plugin} Plugin */ +/** @typedef {import("./ResolverFactory").UserResolveOptions} ResolveOptions */ + +const nodeFileSystem = new CachedInputFileSystem(fs, 4000); + +const nodeContext = { + environments: ["node+es3+es5+process+native"] +}; + +const asyncResolver = ResolverFactory.createResolver({ + conditionNames: ["node"], + extensions: [".js", ".json", ".node"], + fileSystem: nodeFileSystem +}); +function resolve(context, path, request, resolveContext, callback) { + if (typeof context === "string") { + callback = resolveContext; + resolveContext = request; + request = path; + path = context; + context = nodeContext; + } + if (typeof callback !== "function") { + callback = resolveContext; + } + asyncResolver.resolve(context, path, request, resolveContext, callback); +} + +const syncResolver = ResolverFactory.createResolver({ + conditionNames: ["node"], + extensions: [".js", ".json", ".node"], + useSyncFileSystemCalls: true, + fileSystem: nodeFileSystem +}); +function resolveSync(context, path, request) { + if (typeof context === "string") { + request = path; + path = context; + context = nodeContext; + } + return syncResolver.resolveSync(context, path, request); +} + +function create(options) { + options = { + fileSystem: nodeFileSystem, + ...options + }; + const resolver = ResolverFactory.createResolver(options); + return function (context, path, request, resolveContext, callback) { + if (typeof context === "string") { + callback = resolveContext; + resolveContext = request; + request = path; + path = context; + context = nodeContext; + } + if (typeof callback !== "function") { + callback = resolveContext; + } + resolver.resolve(context, path, request, resolveContext, callback); + }; +} + +function createSync(options) { + options = { + useSyncFileSystemCalls: true, + fileSystem: nodeFileSystem, + ...options + }; + const resolver = ResolverFactory.createResolver(options); + return function (context, path, request) { + if (typeof context === "string") { + request = path; + path = context; + context = nodeContext; + } + return resolver.resolveSync(context, path, request); + }; +} + +/** + * @template A + * @template B + * @param {A} obj input a + * @param {B} exports input b + * @returns {A & B} merged + */ +const mergeExports = (obj, exports) => { + const descriptors = Object.getOwnPropertyDescriptors(exports); + Object.defineProperties(obj, descriptors); + return /** @type {A & B} */ (Object.freeze(obj)); +}; + +module.exports = mergeExports(resolve, { + get sync() { + return resolveSync; + }, + create: mergeExports(create, { + get sync() { + return createSync; + } + }), + ResolverFactory, + CachedInputFileSystem, + get CloneBasenamePlugin() { + return __webpack_require__(80037); + }, + get LogInfoPlugin() { + return __webpack_require__(80309); + }, + get forEachBail() { + return __webpack_require__(8178); + } +}); + + +/***/ }), + +/***/ 73674: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +/** @typedef {string|(string|ConditionalMapping)[]} DirectMapping */ +/** @typedef {{[k: string]: MappingValue}} ConditionalMapping */ +/** @typedef {ConditionalMapping|DirectMapping|null} MappingValue */ +/** @typedef {Record|ConditionalMapping|DirectMapping} ExportsField */ +/** @typedef {Record} ImportsField */ + +/** + * @typedef {Object} PathTreeNode + * @property {Map|null} children + * @property {MappingValue} folder + * @property {Map} files + */ + +/** + * Processing exports/imports field + * @callback FieldProcessor + * @param {string} request request + * @param {Set} conditionNames condition names + * @returns {string[]} resolved paths + */ + +/* +Example exports field: +{ + ".": "./main.js", + "./feature": { + "browser": "./feature-browser.js", + "default": "./feature.js" + } +} +Terminology: + +Enhanced-resolve name keys ("." and "./feature") as exports field keys. + +If value is string or string[], mapping is called as a direct mapping +and value called as a direct export. + +If value is key-value object, mapping is called as a conditional mapping +and value called as a conditional export. + +Key in conditional mapping is called condition name. + +Conditional mapping nested in another conditional mapping is called nested mapping. + +---------- + +Example imports field: +{ + "#a": "./main.js", + "#moment": { + "browser": "./moment/index.js", + "default": "moment" + }, + "#moment/": { + "browser": "./moment/", + "default": "moment/" + } +} +Terminology: + +Enhanced-resolve name keys ("#a" and "#moment/", "#moment") as imports field keys. + +If value is string or string[], mapping is called as a direct mapping +and value called as a direct export. + +If value is key-value object, mapping is called as a conditional mapping +and value called as a conditional export. + +Key in conditional mapping is called condition name. + +Conditional mapping nested in another conditional mapping is called nested mapping. + +*/ + +const slashCode = "/".charCodeAt(0); +const dotCode = ".".charCodeAt(0); +const hashCode = "#".charCodeAt(0); + +/** + * @param {ExportsField} exportsField the exports field + * @returns {FieldProcessor} process callback + */ +module.exports.processExportsField = function processExportsField( + exportsField +) { + return createFieldProcessor( + buildExportsFieldPathTree(exportsField), + assertExportsFieldRequest, + assertExportTarget + ); +}; + +/** + * @param {ImportsField} importsField the exports field + * @returns {FieldProcessor} process callback + */ +module.exports.processImportsField = function processImportsField( + importsField +) { + return createFieldProcessor( + buildImportsFieldPathTree(importsField), + assertImportsFieldRequest, + assertImportTarget + ); +}; + +/** + * @param {PathTreeNode} treeRoot root + * @param {(s: string) => void} assertRequest assertRequest + * @param {(s: string, f: boolean) => void} assertTarget assertTarget + * @returns {FieldProcessor} field processor + */ +function createFieldProcessor(treeRoot, assertRequest, assertTarget) { + return function fieldProcessor(request, conditionNames) { + assertRequest(request); + + const match = findMatch(request, treeRoot); + + if (match === null) return []; + + /** @type {DirectMapping|null} */ + let direct = null; + const [mapping, remainRequestIndex] = match; + + if (isConditionalMapping(mapping)) { + direct = conditionalMapping( + /** @type {ConditionalMapping} */ (mapping), + conditionNames + ); + + // matching not found + if (direct === null) return []; + } else { + direct = /** @type {DirectMapping} */ (mapping); + } + + const remainingRequest = + remainRequestIndex !== request.length + ? request.slice(remainRequestIndex) + : undefined; + + return directMapping( + remainingRequest, + direct, + conditionNames, + assertTarget + ); + }; +} + +/** + * @param {string} request request + */ +function assertExportsFieldRequest(request) { + if (request.charCodeAt(0) !== dotCode) { + throw new Error('Request should be relative path and start with "."'); + } + if (request.length === 1) return; + if (request.charCodeAt(1) !== slashCode) { + throw new Error('Request should be relative path and start with "./"'); + } + if (request.charCodeAt(request.length - 1) === slashCode) { + throw new Error("Only requesting file allowed"); + } +} + +/** + * @param {string} request request + */ +function assertImportsFieldRequest(request) { + if (request.charCodeAt(0) !== hashCode) { + throw new Error('Request should start with "#"'); + } + if (request.length === 1) { + throw new Error("Request should have at least 2 characters"); + } + if (request.charCodeAt(1) === slashCode) { + throw new Error('Request should not start with "#/"'); + } + if (request.charCodeAt(request.length - 1) === slashCode) { + throw new Error("Only requesting file allowed"); + } +} + +/** + * @param {string} exp export target + * @param {boolean} expectFolder is folder expected + */ +function assertExportTarget(exp, expectFolder) { + if ( + exp.charCodeAt(0) === slashCode || + (exp.charCodeAt(0) === dotCode && exp.charCodeAt(1) !== slashCode) + ) { + throw new Error( + `Export should be relative path and start with "./", got ${JSON.stringify( + exp + )}.` + ); + } + + const isFolder = exp.charCodeAt(exp.length - 1) === slashCode; + + if (isFolder !== expectFolder) { + throw new Error( + expectFolder + ? `Expecting folder to folder mapping. ${JSON.stringify( + exp + )} should end with "/"` + : `Expecting file to file mapping. ${JSON.stringify( + exp + )} should not end with "/"` + ); + } +} + +/** + * @param {string} imp import target + * @param {boolean} expectFolder is folder expected + */ +function assertImportTarget(imp, expectFolder) { + const isFolder = imp.charCodeAt(imp.length - 1) === slashCode; + + if (isFolder !== expectFolder) { + throw new Error( + expectFolder + ? `Expecting folder to folder mapping. ${JSON.stringify( + imp + )} should end with "/"` + : `Expecting file to file mapping. ${JSON.stringify( + imp + )} should not end with "/"` + ); + } +} + +/** + * Trying to match request to field + * @param {string} request request + * @param {PathTreeNode} treeRoot path tree root + * @returns {[MappingValue, number]|null} match or null + */ +function findMatch(request, treeRoot) { + if (request.length === 1) { + const value = treeRoot.files.get("*root*"); + + return value ? [value, 1] : null; + } + + if (treeRoot.children === null && treeRoot.folder === null) { + const value = treeRoot.files.get(request); + + return value ? [value, request.length] : null; + } + + let node = treeRoot; + let lastNonSlashIndex = 0; + let slashIndex = request.indexOf("/", 2); + + /** @type {[MappingValue, number]|null} */ + let lastFolderMatch = null; + + while (slashIndex !== -1) { + const folder = request.slice(lastNonSlashIndex, slashIndex); + + const folderMapping = node.folder; + if (folderMapping) { + if (lastFolderMatch) { + lastFolderMatch[0] = folderMapping; + lastFolderMatch[1] = lastNonSlashIndex; + } else { + lastFolderMatch = [folderMapping, lastNonSlashIndex || 2]; + } + } + + if (node.children === null) return lastFolderMatch; + + const newNode = node.children.get(folder); + + if (!newNode) { + const value = node.folder; + + return value ? [value, lastNonSlashIndex] : null; + } + + node = newNode; + lastNonSlashIndex = slashIndex + 1; + slashIndex = request.indexOf("/", lastNonSlashIndex); + } + + const value = node.files.get( + lastNonSlashIndex > 0 ? request.slice(lastNonSlashIndex) : request + ); + + if (value) { + return [value, request.length]; + } + + const folderMapping = node.folder; + if (folderMapping) { + return [folderMapping, lastNonSlashIndex || 2]; + } + + return lastFolderMatch; +} + +/** + * @param {ConditionalMapping|DirectMapping|null} mapping mapping + * @returns {boolean} is conditional mapping + */ +function isConditionalMapping(mapping) { + return ( + mapping !== null && typeof mapping === "object" && !Array.isArray(mapping) + ); +} + +/** + * @param {string|undefined} remainingRequest remaining request when folder mapping, undefined for file mappings + * @param {DirectMapping|null} dirrectMapping_ direct export + * @param {Set} conditionNames condition names + * @param {(d: string, f: boolean) => void} assert asserting direct value + * @returns {string[]} mapping result + */ +function directMapping( + remainingRequest, + dirrectMapping_, + conditionNames, + assert +) { + if (dirrectMapping_ === null) return []; + + const expectFolder = remainingRequest !== undefined; + + if (typeof dirrectMapping_ === "string") { + assert(dirrectMapping_, expectFolder); + + return expectFolder + ? [`${dirrectMapping_}${remainingRequest}`] + : [dirrectMapping_]; + } + + const targets = []; + + for (const exp of dirrectMapping_) { + if (typeof exp === "string") { + assert(exp, expectFolder); + targets.push(expectFolder ? `${exp}${remainingRequest}` : exp); + continue; + } + + const mapping = conditionalMapping(exp, conditionNames); + if (!mapping) continue; + const innerExports = directMapping( + remainingRequest, + mapping, + conditionNames, + assert + ); + for (const innerExport of innerExports) { + targets.push(innerExport); + } + } + + return targets; +} + +/** + * @param {ConditionalMapping} conditionalMapping_ conditional mapping + * @param {Set} conditionNames condition names + * @returns {DirectMapping|null} direct mapping if found + */ +function conditionalMapping(conditionalMapping_, conditionNames) { + /** @type {[ConditionalMapping, string[], number][]} */ + let lookup = [[conditionalMapping_, Object.keys(conditionalMapping_), 0]]; + + loop: while (lookup.length > 0) { + const [mapping, conditions, j] = lookup[lookup.length - 1]; + const last = conditions.length - 1; + + for (let i = j; i < conditions.length; i++) { + const condition = conditions[i]; + + // assert default. Could be last only + if (i !== last) { + if (condition === "default") { + throw new Error("Default condition should be last one"); + } + } else if (condition === "default") { + const innerMapping = mapping[condition]; + // is nested + if (isConditionalMapping(innerMapping)) { + const conditionalMapping = /** @type {ConditionalMapping} */ (innerMapping); + lookup[lookup.length - 1][2] = i + 1; + lookup.push([conditionalMapping, Object.keys(conditionalMapping), 0]); + continue loop; + } + + return /** @type {DirectMapping} */ (innerMapping); + } + + if (conditionNames.has(condition)) { + const innerMapping = mapping[condition]; + // is nested + if (isConditionalMapping(innerMapping)) { + const conditionalMapping = /** @type {ConditionalMapping} */ (innerMapping); + lookup[lookup.length - 1][2] = i + 1; + lookup.push([conditionalMapping, Object.keys(conditionalMapping), 0]); + continue loop; + } + + return /** @type {DirectMapping} */ (innerMapping); + } + } + + lookup.pop(); + } + + return null; +} + +/** + * Internal helper to create path tree node + * to ensure that each node gets the same hidden class + * @returns {PathTreeNode} node + */ +function createNode() { + return { + children: null, + folder: null, + files: new Map() + }; +} + +/** + * Internal helper for building path tree + * @param {PathTreeNode} root root + * @param {string} path path + * @param {MappingValue} target target + */ +function walkPath(root, path, target) { + if (path.length === 2 && path === "./") { + root.folder = target; + return; + } + + let node = root; + // It is safe to store # and ./ as a part of file + // because mapping works like string concatenation + // so typical path tree can looks like + // root + // - files: ["./a.js", "./b.js"] + // - children: + // node1: + // - files: ["a.js", "b.js"] + let lastNonSlashIndex = 0; + // This is safe for "imports" field + // since specifiers "#" and "#/" are disallowed and + // should be asserted before "walking" + let slashIndex = path.indexOf("/", 2); + + while (slashIndex !== -1) { + const folder = path.slice(lastNonSlashIndex, slashIndex); + let newNode; + + if (node.children === null) { + newNode = createNode(); + node.children = new Map(); + node.children.set(folder, newNode); + } else { + newNode = node.children.get(folder); + + if (!newNode) { + newNode = createNode(); + node.children.set(folder, newNode); + } + } + + node = newNode; + lastNonSlashIndex = slashIndex + 1; + slashIndex = path.indexOf("/", lastNonSlashIndex); + } + + if (lastNonSlashIndex < path.length) { + node.files.set( + lastNonSlashIndex > 0 ? path.slice(lastNonSlashIndex) : path, + target + ); + } else { + node.folder = target; + } +} + +/** + * @param {ExportsField} field exports field + * @returns {PathTreeNode} tree root + */ +function buildExportsFieldPathTree(field) { + const root = createNode(); + + // handle syntax sugar, if exports field is direct mapping for "." + if (typeof field === "string") { + root.files.set("*root*", field); + + return root; + } else if (Array.isArray(field)) { + root.files.set("*root*", field.slice()); + + return root; + } + + const keys = Object.keys(field); + + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + + if (key.charCodeAt(0) !== dotCode) { + // handle syntax sugar, if exports field is conditional mapping for "." + if (i === 0) { + while (i < keys.length) { + const charCode = keys[i].charCodeAt(0); + if (charCode === dotCode || charCode === slashCode) { + throw new Error( + `Exports field key should be relative path and start with "." (key: ${JSON.stringify( + key + )})` + ); + } + i++; + } + + root.files.set("*root*", field); + return root; + } + + throw new Error( + `Exports field key should be relative path and start with "." (key: ${JSON.stringify( + key + )})` + ); + } + + if (key.length === 1) { + root.files.set("*root*", field[key]); + continue; + } + + if (key.charCodeAt(1) !== slashCode) { + throw new Error( + `Exports field key should be relative path and start with "./" (key: ${JSON.stringify( + key + )})` + ); + } + + walkPath(root, key, field[key]); + } + + return root; +} + +/** + * @param {ImportsField} field imports field + * @returns {PathTreeNode} root + */ +function buildImportsFieldPathTree(field) { + const root = createNode(); + + const keys = Object.keys(field); + + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + + if (key.charCodeAt(0) !== hashCode) { + throw new Error( + `Imports field key should start with "#" (key: ${JSON.stringify(key)})` + ); + } + + if (key.length === 1) { + throw new Error( + `Imports field key should have at least 2 characters (key: ${JSON.stringify( + key + )})` + ); + } + + if (key.charCodeAt(1) === slashCode) { + throw new Error( + `Imports field key should not start with "#/" (key: ${JSON.stringify( + key + )})` + ); + } + + walkPath(root, key, field[key]); + } + + return root; +} + + +/***/ }), + +/***/ 53692: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const PATH_QUERY_FRAGMENT_REGEXP = /^(#?(?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; + +/** + * @param {string} identifier identifier + * @returns {[string, string, string]|null} parsed identifier + */ +function parseIdentifier(identifier) { + const match = PATH_QUERY_FRAGMENT_REGEXP.exec(identifier); + + if (!match) return null; + + return [ + match[1].replace(/\0(.)/g, "$1"), + match[2] ? match[2].replace(/\0(.)/g, "$1") : "", + match[3] || "" + ]; +} + +module.exports.parseIdentifier = parseIdentifier; + + +/***/ }), + +/***/ 83008: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const path = __webpack_require__(85622); + +const CHAR_HASH = "#".charCodeAt(0); +const CHAR_SLASH = "/".charCodeAt(0); +const CHAR_BACKSLASH = "\\".charCodeAt(0); +const CHAR_A = "A".charCodeAt(0); +const CHAR_Z = "Z".charCodeAt(0); +const CHAR_LOWER_A = "a".charCodeAt(0); +const CHAR_LOWER_Z = "z".charCodeAt(0); +const CHAR_DOT = ".".charCodeAt(0); +const CHAR_COLON = ":".charCodeAt(0); + +const posixNormalize = path.posix.normalize; +const winNormalize = path.win32.normalize; + +/** + * @enum {number} + */ +const PathType = Object.freeze({ + Empty: 0, + Normal: 1, + Relative: 2, + AbsoluteWin: 3, + AbsolutePosix: 4, + Internal: 5 +}); +exports.PathType = PathType; + +/** + * @param {string} p a path + * @returns {PathType} type of path + */ +const getType = p => { + switch (p.length) { + case 0: + return PathType.Empty; + case 1: { + const c0 = p.charCodeAt(0); + switch (c0) { + case CHAR_DOT: + return PathType.Relative; + case CHAR_SLASH: + return PathType.AbsolutePosix; + case CHAR_HASH: + return PathType.Internal; + } + return PathType.Normal; + } + case 2: { + const c0 = p.charCodeAt(0); + switch (c0) { + case CHAR_DOT: { + const c1 = p.charCodeAt(1); + switch (c1) { + case CHAR_DOT: + case CHAR_SLASH: + return PathType.Relative; + } + return PathType.Normal; + } + case CHAR_SLASH: + return PathType.AbsolutePosix; + case CHAR_HASH: + return PathType.Internal; + } + const c1 = p.charCodeAt(1); + if (c1 === CHAR_COLON) { + if ( + (c0 >= CHAR_A && c0 <= CHAR_Z) || + (c0 >= CHAR_LOWER_A && c0 <= CHAR_LOWER_Z) + ) { + return PathType.AbsoluteWin; + } + } + return PathType.Normal; + } + } + const c0 = p.charCodeAt(0); + switch (c0) { + case CHAR_DOT: { + const c1 = p.charCodeAt(1); + switch (c1) { + case CHAR_SLASH: + return PathType.Relative; + case CHAR_DOT: { + const c2 = p.charCodeAt(2); + if (c2 === CHAR_SLASH) return PathType.Relative; + return PathType.Normal; + } + } + return PathType.Normal; + } + case CHAR_SLASH: + return PathType.AbsolutePosix; + case CHAR_HASH: + return PathType.Internal; + } + const c1 = p.charCodeAt(1); + if (c1 === CHAR_COLON) { + const c2 = p.charCodeAt(2); + if ( + (c2 === CHAR_BACKSLASH || c2 === CHAR_SLASH) && + ((c0 >= CHAR_A && c0 <= CHAR_Z) || + (c0 >= CHAR_LOWER_A && c0 <= CHAR_LOWER_Z)) + ) { + return PathType.AbsoluteWin; + } + } + return PathType.Normal; +}; +exports.getType = getType; + +/** + * @param {string} p a path + * @returns {string} the normalized path + */ +const normalize = p => { + switch (getType(p)) { + case PathType.Empty: + return p; + case PathType.AbsoluteWin: + return winNormalize(p); + case PathType.Relative: { + const r = posixNormalize(p); + return getType(r) === PathType.Relative ? r : `./${r}`; + } + } + return posixNormalize(p); +}; +exports.normalize = normalize; + +/** + * @param {string} rootPath the root path + * @param {string | undefined} request the request path + * @returns {string} the joined path + */ +const join = (rootPath, request) => { + if (!request) return normalize(rootPath); + const requestType = getType(request); + switch (requestType) { + case PathType.AbsolutePosix: + return posixNormalize(request); + case PathType.AbsoluteWin: + return winNormalize(request); + } + switch (getType(rootPath)) { + case PathType.Normal: + case PathType.Relative: + case PathType.AbsolutePosix: + return posixNormalize(`${rootPath}/${request}`); + case PathType.AbsoluteWin: + return winNormalize(`${rootPath}\\${request}`); + } + switch (requestType) { + case PathType.Empty: + return rootPath; + case PathType.Relative: { + const r = posixNormalize(rootPath); + return getType(r) === PathType.Relative ? r : `./${r}`; + } + } + return posixNormalize(rootPath); +}; +exports.join = join; + +const joinCache = new Map(); + +/** + * @param {string} rootPath the root path + * @param {string | undefined} request the request path + * @returns {string} the joined path + */ +const cachedJoin = (rootPath, request) => { + let cacheEntry; + let cache = joinCache.get(rootPath); + if (cache === undefined) { + joinCache.set(rootPath, (cache = new Map())); + } else { + cacheEntry = cache.get(request); + if (cacheEntry !== undefined) return cacheEntry; + } + cacheEntry = join(rootPath, request); + cache.set(request, cacheEntry); + return cacheEntry; +}; +exports.cachedJoin = cachedJoin; + +const checkExportsFieldTarget = relativePath => { + let lastNonSlashIndex = 2; + let slashIndex = relativePath.indexOf("/", 2); + let cd = 0; + + while (slashIndex !== -1) { + const folder = relativePath.slice(lastNonSlashIndex, slashIndex); + + switch (folder) { + case "..": { + cd--; + if (cd < 0) + return new Error( + `Trying to access out of package scope. Requesting ${relativePath}` + ); + break; + } + default: + cd++; + break; + } + + lastNonSlashIndex = slashIndex + 1; + slashIndex = relativePath.indexOf("/", lastNonSlashIndex); + } +}; +exports.checkExportsFieldTarget = checkExportsFieldTarget; + + +/***/ }), + +/***/ 41636: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + Copyright (C) 2015 Yusuke Suzuki + + 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 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. +*/ + + +const Variable = __webpack_require__(27646); + +/** + * @class Definition + */ +class Definition { + constructor(type, name, node, parent, index, kind) { + + /** + * @member {String} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...). + */ + this.type = type; + + /** + * @member {espree.Identifier} Definition#name - the identifier AST node of the occurrence. + */ + this.name = name; + + /** + * @member {espree.Node} Definition#node - the enclosing node of the identifier. + */ + this.node = node; + + /** + * @member {espree.Node?} Definition#parent - the enclosing statement node of the identifier. + */ + this.parent = parent; + + /** + * @member {Number?} Definition#index - the index in the declaration statement. + */ + this.index = index; + + /** + * @member {String?} Definition#kind - the kind of the declaration statement. + */ + this.kind = kind; + } +} + +/** + * @class ParameterDefinition + */ +class ParameterDefinition extends Definition { + constructor(name, node, index, rest) { + super(Variable.Parameter, name, node, null, index, null); + + /** + * Whether the parameter definition is a part of a rest parameter. + * @member {boolean} ParameterDefinition#rest + */ + this.rest = rest; + } +} + +module.exports = { + ParameterDefinition, + Definition +}; + +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 86074: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + Copyright (C) 2012-2014 Yusuke Suzuki + Copyright (C) 2013 Alex Seville + Copyright (C) 2014 Thiago de Arruda + + 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 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. +*/ + +/** + * Escope (escope) is an ECMAScript + * scope analyzer extracted from the esmangle project. + *

+ * escope finds lexical scopes in a source program, i.e. areas of that + * program where different occurrences of the same identifier refer to the same + * variable. With each scope the contained variables are collected, and each + * identifier reference in code is linked to its corresponding variable (if + * possible). + *

+ * escope works on a syntax tree of the parsed source code which has + * to adhere to the + * Mozilla Parser API. E.g. espree is a parser + * that produces such syntax trees. + *

+ * The main interface is the {@link analyze} function. + * @module escope + */ + + +/* eslint no-underscore-dangle: ["error", { "allow": ["__currentScope"] }] */ + +const assert = __webpack_require__(42357); + +const ScopeManager = __webpack_require__(16174); +const Referencer = __webpack_require__(14186); +const Reference = __webpack_require__(19451); +const Variable = __webpack_require__(27646); +const Scope = __webpack_require__(84891).Scope; +const version = __webpack_require__(55611)/* .version */ .i8; + +/** + * Set the default options + * @returns {Object} options + */ +function defaultOptions() { + return { + optimistic: false, + directive: false, + nodejsScope: false, + impliedStrict: false, + sourceType: "script", // one of ['script', 'module'] + ecmaVersion: 5, + childVisitorKeys: null, + fallback: "iteration" + }; +} + +/** + * Preform deep update on option object + * @param {Object} target - Options + * @param {Object} override - Updates + * @returns {Object} Updated options + */ +function updateDeeply(target, override) { + + /** + * Is hash object + * @param {Object} value - Test value + * @returns {boolean} Result + */ + function isHashObject(value) { + return typeof value === "object" && value instanceof Object && !(value instanceof Array) && !(value instanceof RegExp); + } + + for (const key in override) { + if (Object.prototype.hasOwnProperty.call(override, key)) { + const val = override[key]; + + if (isHashObject(val)) { + if (isHashObject(target[key])) { + updateDeeply(target[key], val); + } else { + target[key] = updateDeeply({}, val); + } + } else { + target[key] = val; + } + } + } + return target; +} + +/** + * Main interface function. Takes an Espree syntax tree and returns the + * analyzed scopes. + * @function analyze + * @param {espree.Tree} tree - Abstract Syntax Tree + * @param {Object} providedOptions - Options that tailor the scope analysis + * @param {boolean} [providedOptions.optimistic=false] - the optimistic flag + * @param {boolean} [providedOptions.directive=false]- the directive flag + * @param {boolean} [providedOptions.ignoreEval=false]- whether to check 'eval()' calls + * @param {boolean} [providedOptions.nodejsScope=false]- whether the whole + * script is executed under node.js environment. When enabled, escope adds + * a function scope immediately following the global scope. + * @param {boolean} [providedOptions.impliedStrict=false]- implied strict mode + * (if ecmaVersion >= 5). + * @param {string} [providedOptions.sourceType='script']- the source type of the script. one of 'script' and 'module' + * @param {number} [providedOptions.ecmaVersion=5]- which ECMAScript version is considered + * @param {Object} [providedOptions.childVisitorKeys=null] - Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option. + * @param {string} [providedOptions.fallback='iteration'] - A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option. + * @returns {ScopeManager} ScopeManager + */ +function analyze(tree, providedOptions) { + const options = updateDeeply(defaultOptions(), providedOptions); + const scopeManager = new ScopeManager(options); + const referencer = new Referencer(options, scopeManager); + + referencer.visit(tree); + + assert(scopeManager.__currentScope === null, "currentScope should be null."); + + return scopeManager; +} + +module.exports = { + + /** @name module:escope.version */ + version, + + /** @name module:escope.Reference */ + Reference, + + /** @name module:escope.Variable */ + Variable, + + /** @name module:escope.Scope */ + Scope, + + /** @name module:escope.ScopeManager */ + ScopeManager, + analyze +}; + + +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 26844: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + Copyright (C) 2015 Yusuke Suzuki + + 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 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. +*/ + + +/* eslint-disable no-undefined */ + +const Syntax = __webpack_require__(73168).Syntax; +const esrecurse = __webpack_require__(62783); + +/** + * Get last array element + * @param {array} xs - array + * @returns {any} Last elment + */ +function getLast(xs) { + return xs[xs.length - 1] || null; +} + +class PatternVisitor extends esrecurse.Visitor { + static isPattern(node) { + const nodeType = node.type; + + return ( + nodeType === Syntax.Identifier || + nodeType === Syntax.ObjectPattern || + nodeType === Syntax.ArrayPattern || + nodeType === Syntax.SpreadElement || + nodeType === Syntax.RestElement || + nodeType === Syntax.AssignmentPattern + ); + } + + constructor(options, rootPattern, callback) { + super(null, options); + this.rootPattern = rootPattern; + this.callback = callback; + this.assignments = []; + this.rightHandNodes = []; + this.restElements = []; + } + + Identifier(pattern) { + const lastRestElement = getLast(this.restElements); + + this.callback(pattern, { + topLevel: pattern === this.rootPattern, + rest: lastRestElement !== null && lastRestElement !== undefined && lastRestElement.argument === pattern, + assignments: this.assignments + }); + } + + Property(property) { + + // Computed property's key is a right hand node. + if (property.computed) { + this.rightHandNodes.push(property.key); + } + + // If it's shorthand, its key is same as its value. + // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern). + // If it's not shorthand, the name of new variable is its value's. + this.visit(property.value); + } + + ArrayPattern(pattern) { + for (let i = 0, iz = pattern.elements.length; i < iz; ++i) { + const element = pattern.elements[i]; + + this.visit(element); + } + } + + AssignmentPattern(pattern) { + this.assignments.push(pattern); + this.visit(pattern.left); + this.rightHandNodes.push(pattern.right); + this.assignments.pop(); + } + + RestElement(pattern) { + this.restElements.push(pattern); + this.visit(pattern.argument); + this.restElements.pop(); + } + + MemberExpression(node) { + + // Computed property's key is a right hand node. + if (node.computed) { + this.rightHandNodes.push(node.property); + } + + // the object is only read, write to its property. + this.rightHandNodes.push(node.object); + } + + // + // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression. + // By spec, LeftHandSideExpression is Pattern or MemberExpression. + // (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758) + // But espree 2.0 parses to ArrayExpression, ObjectExpression, etc... + // + + SpreadElement(node) { + this.visit(node.argument); + } + + ArrayExpression(node) { + node.elements.forEach(this.visit, this); + } + + AssignmentExpression(node) { + this.assignments.push(node); + this.visit(node.left); + this.rightHandNodes.push(node.right); + this.assignments.pop(); + } + + CallExpression(node) { + + // arguments are right hand nodes. + node.arguments.forEach(a => { + this.rightHandNodes.push(a); + }); + this.visit(node.callee); + } +} + +module.exports = PatternVisitor; + +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 19451: +/***/ (function(module) { + +"use strict"; +/* + Copyright (C) 2015 Yusuke Suzuki + + 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 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. +*/ + + +const READ = 0x1; +const WRITE = 0x2; +const RW = READ | WRITE; + +/** + * A Reference represents a single occurrence of an identifier in code. + * @class Reference + */ +class Reference { + constructor(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) { + + /** + * Identifier syntax node. + * @member {espreeIdentifier} Reference#identifier + */ + this.identifier = ident; + + /** + * Reference to the enclosing Scope. + * @member {Scope} Reference#from + */ + this.from = scope; + + /** + * Whether the reference comes from a dynamic scope (such as 'eval', + * 'with', etc.), and may be trapped by dynamic scopes. + * @member {boolean} Reference#tainted + */ + this.tainted = false; + + /** + * The variable this reference is resolved with. + * @member {Variable} Reference#resolved + */ + this.resolved = null; + + /** + * The read-write mode of the reference. (Value is one of {@link + * Reference.READ}, {@link Reference.RW}, {@link Reference.WRITE}). + * @member {number} Reference#flag + * @private + */ + this.flag = flag; + if (this.isWrite()) { + + /** + * If reference is writeable, this is the tree being written to it. + * @member {espreeNode} Reference#writeExpr + */ + this.writeExpr = writeExpr; + + /** + * Whether the Reference might refer to a partial value of writeExpr. + * @member {boolean} Reference#partial + */ + this.partial = partial; + + /** + * Whether the Reference is to write of initialization. + * @member {boolean} Reference#init + */ + this.init = init; + } + this.__maybeImplicitGlobal = maybeImplicitGlobal; + } + + /** + * Whether the reference is static. + * @method Reference#isStatic + * @returns {boolean} static + */ + isStatic() { + return !this.tainted && this.resolved && this.resolved.scope.isStatic(); + } + + /** + * Whether the reference is writeable. + * @method Reference#isWrite + * @returns {boolean} write + */ + isWrite() { + return !!(this.flag & Reference.WRITE); + } + + /** + * Whether the reference is readable. + * @method Reference#isRead + * @returns {boolean} read + */ + isRead() { + return !!(this.flag & Reference.READ); + } + + /** + * Whether the reference is read-only. + * @method Reference#isReadOnly + * @returns {boolean} read only + */ + isReadOnly() { + return this.flag === Reference.READ; + } + + /** + * Whether the reference is write-only. + * @method Reference#isWriteOnly + * @returns {boolean} write only + */ + isWriteOnly() { + return this.flag === Reference.WRITE; + } + + /** + * Whether the reference is read-write. + * @method Reference#isReadWrite + * @returns {boolean} read write + */ + isReadWrite() { + return this.flag === Reference.RW; + } +} + +/** + * @constant Reference.READ + * @private + */ +Reference.READ = READ; + +/** + * @constant Reference.WRITE + * @private + */ +Reference.WRITE = WRITE; + +/** + * @constant Reference.RW + * @private + */ +Reference.RW = RW; + +module.exports = Reference; + +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 14186: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + Copyright (C) 2015 Yusuke Suzuki + + 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 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. +*/ + + +/* eslint-disable no-underscore-dangle */ +/* eslint-disable no-undefined */ + +const Syntax = __webpack_require__(73168).Syntax; +const esrecurse = __webpack_require__(62783); +const Reference = __webpack_require__(19451); +const Variable = __webpack_require__(27646); +const PatternVisitor = __webpack_require__(26844); +const definition = __webpack_require__(41636); +const assert = __webpack_require__(42357); + +const ParameterDefinition = definition.ParameterDefinition; +const Definition = definition.Definition; + +/** + * Traverse identifier in pattern + * @param {Object} options - options + * @param {pattern} rootPattern - root pattern + * @param {Refencer} referencer - referencer + * @param {callback} callback - callback + * @returns {void} + */ +function traverseIdentifierInPattern(options, rootPattern, referencer, callback) { + + // Call the callback at left hand identifier nodes, and Collect right hand nodes. + const visitor = new PatternVisitor(options, rootPattern, callback); + + visitor.visit(rootPattern); + + // Process the right hand nodes recursively. + if (referencer !== null && referencer !== undefined) { + visitor.rightHandNodes.forEach(referencer.visit, referencer); + } +} + +// Importing ImportDeclaration. +// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation +// https://github.com/estree/estree/blob/master/es6.md#importdeclaration +// FIXME: Now, we don't create module environment, because the context is +// implementation dependent. + +class Importer extends esrecurse.Visitor { + constructor(declaration, referencer) { + super(null, referencer.options); + this.declaration = declaration; + this.referencer = referencer; + } + + visitImport(id, specifier) { + this.referencer.visitPattern(id, pattern => { + this.referencer.currentScope().__define(pattern, + new Definition( + Variable.ImportBinding, + pattern, + specifier, + this.declaration, + null, + null + )); + }); + } + + ImportNamespaceSpecifier(node) { + const local = (node.local || node.id); + + if (local) { + this.visitImport(local, node); + } + } + + ImportDefaultSpecifier(node) { + const local = (node.local || node.id); + + this.visitImport(local, node); + } + + ImportSpecifier(node) { + const local = (node.local || node.id); + + if (node.name) { + this.visitImport(node.name, node); + } else { + this.visitImport(local, node); + } + } +} + +// Referencing variables and creating bindings. +class Referencer extends esrecurse.Visitor { + constructor(options, scopeManager) { + super(null, options); + this.options = options; + this.scopeManager = scopeManager; + this.parent = null; + this.isInnerMethodDefinition = false; + } + + currentScope() { + return this.scopeManager.__currentScope; + } + + close(node) { + while (this.currentScope() && node === this.currentScope().block) { + this.scopeManager.__currentScope = this.currentScope().__close(this.scopeManager); + } + } + + pushInnerMethodDefinition(isInnerMethodDefinition) { + const previous = this.isInnerMethodDefinition; + + this.isInnerMethodDefinition = isInnerMethodDefinition; + return previous; + } + + popInnerMethodDefinition(isInnerMethodDefinition) { + this.isInnerMethodDefinition = isInnerMethodDefinition; + } + + referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) { + const scope = this.currentScope(); + + assignments.forEach(assignment => { + scope.__referencing( + pattern, + Reference.WRITE, + assignment.right, + maybeImplicitGlobal, + pattern !== assignment.left, + init + ); + }); + } + + visitPattern(node, options, callback) { + let visitPatternOptions = options; + let visitPatternCallback = callback; + + if (typeof options === "function") { + visitPatternCallback = options; + visitPatternOptions = { processRightHandNodes: false }; + } + + traverseIdentifierInPattern( + this.options, + node, + visitPatternOptions.processRightHandNodes ? this : null, + visitPatternCallback + ); + } + + visitFunction(node) { + let i, iz; + + // FunctionDeclaration name is defined in upper scope + // NOTE: Not referring variableScope. It is intended. + // Since + // in ES5, FunctionDeclaration should be in FunctionBody. + // in ES6, FunctionDeclaration should be block scoped. + + if (node.type === Syntax.FunctionDeclaration) { + + // id is defined in upper scope + this.currentScope().__define(node.id, + new Definition( + Variable.FunctionName, + node.id, + node, + null, + null, + null + )); + } + + // FunctionExpression with name creates its special scope; + // FunctionExpressionNameScope. + if (node.type === Syntax.FunctionExpression && node.id) { + this.scopeManager.__nestFunctionExpressionNameScope(node); + } + + // Consider this function is in the MethodDefinition. + this.scopeManager.__nestFunctionScope(node, this.isInnerMethodDefinition); + + const that = this; + + /** + * Visit pattern callback + * @param {pattern} pattern - pattern + * @param {Object} info - info + * @returns {void} + */ + function visitPatternCallback(pattern, info) { + that.currentScope().__define(pattern, + new ParameterDefinition( + pattern, + node, + i, + info.rest + )); + + that.referencingDefaultValue(pattern, info.assignments, null, true); + } + + // Process parameter declarations. + for (i = 0, iz = node.params.length; i < iz; ++i) { + this.visitPattern(node.params[i], { processRightHandNodes: true }, visitPatternCallback); + } + + // if there's a rest argument, add that + if (node.rest) { + this.visitPattern({ + type: "RestElement", + argument: node.rest + }, pattern => { + this.currentScope().__define(pattern, + new ParameterDefinition( + pattern, + node, + node.params.length, + true + )); + }); + } + + // In TypeScript there are a number of function-like constructs which have no body, + // so check it exists before traversing + if (node.body) { + + // Skip BlockStatement to prevent creating BlockStatement scope. + if (node.body.type === Syntax.BlockStatement) { + this.visitChildren(node.body); + } else { + this.visit(node.body); + } + } + + this.close(node); + } + + visitClass(node) { + if (node.type === Syntax.ClassDeclaration) { + this.currentScope().__define(node.id, + new Definition( + Variable.ClassName, + node.id, + node, + null, + null, + null + )); + } + + this.visit(node.superClass); + + this.scopeManager.__nestClassScope(node); + + if (node.id) { + this.currentScope().__define(node.id, + new Definition( + Variable.ClassName, + node.id, + node + )); + } + this.visit(node.body); + + this.close(node); + } + + visitProperty(node) { + let previous; + + if (node.computed) { + this.visit(node.key); + } + + const isMethodDefinition = node.type === Syntax.MethodDefinition; + + if (isMethodDefinition) { + previous = this.pushInnerMethodDefinition(true); + } + this.visit(node.value); + if (isMethodDefinition) { + this.popInnerMethodDefinition(previous); + } + } + + visitForIn(node) { + if (node.left.type === Syntax.VariableDeclaration && node.left.kind !== "var") { + this.scopeManager.__nestForScope(node); + } + + if (node.left.type === Syntax.VariableDeclaration) { + this.visit(node.left); + this.visitPattern(node.left.declarations[0].id, pattern => { + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, null, true, true); + }); + } else { + this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => { + let maybeImplicitGlobal = null; + + if (!this.currentScope().isStrict) { + maybeImplicitGlobal = { + pattern, + node + }; + } + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, true, false); + }); + } + this.visit(node.right); + this.visit(node.body); + + this.close(node); + } + + visitVariableDeclaration(variableTargetScope, type, node, index) { + + const decl = node.declarations[index]; + const init = decl.init; + + this.visitPattern(decl.id, { processRightHandNodes: true }, (pattern, info) => { + variableTargetScope.__define( + pattern, + new Definition( + type, + pattern, + decl, + node, + index, + node.kind + ) + ); + + this.referencingDefaultValue(pattern, info.assignments, null, true); + if (init) { + this.currentScope().__referencing(pattern, Reference.WRITE, init, null, !info.topLevel, true); + } + }); + } + + AssignmentExpression(node) { + if (PatternVisitor.isPattern(node.left)) { + if (node.operator === "=") { + this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => { + let maybeImplicitGlobal = null; + + if (!this.currentScope().isStrict) { + maybeImplicitGlobal = { + pattern, + node + }; + } + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, !info.topLevel, false); + }); + } else { + this.currentScope().__referencing(node.left, Reference.RW, node.right); + } + } else { + this.visit(node.left); + } + this.visit(node.right); + } + + CatchClause(node) { + this.scopeManager.__nestCatchScope(node); + + this.visitPattern(node.param, { processRightHandNodes: true }, (pattern, info) => { + this.currentScope().__define(pattern, + new Definition( + Variable.CatchClause, + node.param, + node, + null, + null, + null + )); + this.referencingDefaultValue(pattern, info.assignments, null, true); + }); + this.visit(node.body); + + this.close(node); + } + + Program(node) { + this.scopeManager.__nestGlobalScope(node); + + if (this.scopeManager.__isNodejsScope()) { + + // Force strictness of GlobalScope to false when using node.js scope. + this.currentScope().isStrict = false; + this.scopeManager.__nestFunctionScope(node, false); + } + + if (this.scopeManager.__isES6() && this.scopeManager.isModule()) { + this.scopeManager.__nestModuleScope(node); + } + + if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) { + this.currentScope().isStrict = true; + } + + this.visitChildren(node); + this.close(node); + } + + Identifier(node) { + this.currentScope().__referencing(node); + } + + UpdateExpression(node) { + if (PatternVisitor.isPattern(node.argument)) { + this.currentScope().__referencing(node.argument, Reference.RW, null); + } else { + this.visitChildren(node); + } + } + + MemberExpression(node) { + this.visit(node.object); + if (node.computed) { + this.visit(node.property); + } + } + + Property(node) { + this.visitProperty(node); + } + + MethodDefinition(node) { + this.visitProperty(node); + } + + BreakStatement() {} // eslint-disable-line class-methods-use-this + + ContinueStatement() {} // eslint-disable-line class-methods-use-this + + LabeledStatement(node) { + this.visit(node.body); + } + + ForStatement(node) { + + // Create ForStatement declaration. + // NOTE: In ES6, ForStatement dynamically generates + // per iteration environment. However, escope is + // a static analyzer, we only generate one scope for ForStatement. + if (node.init && node.init.type === Syntax.VariableDeclaration && node.init.kind !== "var") { + this.scopeManager.__nestForScope(node); + } + + this.visitChildren(node); + + this.close(node); + } + + ClassExpression(node) { + this.visitClass(node); + } + + ClassDeclaration(node) { + this.visitClass(node); + } + + CallExpression(node) { + + // Check this is direct call to eval + if (!this.scopeManager.__ignoreEval() && node.callee.type === Syntax.Identifier && node.callee.name === "eval") { + + // NOTE: This should be `variableScope`. Since direct eval call always creates Lexical environment and + // let / const should be enclosed into it. Only VariableDeclaration affects on the caller's environment. + this.currentScope().variableScope.__detectEval(); + } + this.visitChildren(node); + } + + BlockStatement(node) { + if (this.scopeManager.__isES6()) { + this.scopeManager.__nestBlockScope(node); + } + + this.visitChildren(node); + + this.close(node); + } + + ThisExpression() { + this.currentScope().variableScope.__detectThis(); + } + + WithStatement(node) { + this.visit(node.object); + + // Then nest scope for WithStatement. + this.scopeManager.__nestWithScope(node); + + this.visit(node.body); + + this.close(node); + } + + VariableDeclaration(node) { + const variableTargetScope = (node.kind === "var") ? this.currentScope().variableScope : this.currentScope(); + + for (let i = 0, iz = node.declarations.length; i < iz; ++i) { + const decl = node.declarations[i]; + + this.visitVariableDeclaration(variableTargetScope, Variable.Variable, node, i); + if (decl.init) { + this.visit(decl.init); + } + } + } + + // sec 13.11.8 + SwitchStatement(node) { + this.visit(node.discriminant); + + if (this.scopeManager.__isES6()) { + this.scopeManager.__nestSwitchScope(node); + } + + for (let i = 0, iz = node.cases.length; i < iz; ++i) { + this.visit(node.cases[i]); + } + + this.close(node); + } + + FunctionDeclaration(node) { + this.visitFunction(node); + } + + FunctionExpression(node) { + this.visitFunction(node); + } + + ForOfStatement(node) { + this.visitForIn(node); + } + + ForInStatement(node) { + this.visitForIn(node); + } + + ArrowFunctionExpression(node) { + this.visitFunction(node); + } + + ImportDeclaration(node) { + assert(this.scopeManager.__isES6() && this.scopeManager.isModule(), "ImportDeclaration should appear when the mode is ES6 and in the module context."); + + const importer = new Importer(node, this); + + importer.visit(node); + } + + visitExportDeclaration(node) { + if (node.source) { + return; + } + if (node.declaration) { + this.visit(node.declaration); + return; + } + + this.visitChildren(node); + } + + // TODO: ExportDeclaration doesn't exist. for bc? + ExportDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportAllDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportDefaultDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportNamedDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportSpecifier(node) { + + // TODO: `node.id` doesn't exist. for bc? + const local = (node.id || node.local); + + this.visit(local); + } + + MetaProperty() { // eslint-disable-line class-methods-use-this + + // do nothing. + } +} + +module.exports = Referencer; + +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 16174: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + Copyright (C) 2015 Yusuke Suzuki + + 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 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. +*/ + + +/* eslint-disable no-underscore-dangle */ + +const Scope = __webpack_require__(84891); +const assert = __webpack_require__(42357); + +const GlobalScope = Scope.GlobalScope; +const CatchScope = Scope.CatchScope; +const WithScope = Scope.WithScope; +const ModuleScope = Scope.ModuleScope; +const ClassScope = Scope.ClassScope; +const SwitchScope = Scope.SwitchScope; +const FunctionScope = Scope.FunctionScope; +const ForScope = Scope.ForScope; +const FunctionExpressionNameScope = Scope.FunctionExpressionNameScope; +const BlockScope = Scope.BlockScope; + +/** + * @class ScopeManager + */ +class ScopeManager { + constructor(options) { + this.scopes = []; + this.globalScope = null; + this.__nodeToScope = new WeakMap(); + this.__currentScope = null; + this.__options = options; + this.__declaredVariables = new WeakMap(); + } + + __useDirective() { + return this.__options.directive; + } + + __isOptimistic() { + return this.__options.optimistic; + } + + __ignoreEval() { + return this.__options.ignoreEval; + } + + __isNodejsScope() { + return this.__options.nodejsScope; + } + + isModule() { + return this.__options.sourceType === "module"; + } + + isImpliedStrict() { + return this.__options.impliedStrict; + } + + isStrictModeSupported() { + return this.__options.ecmaVersion >= 5; + } + + // Returns appropriate scope for this node. + __get(node) { + return this.__nodeToScope.get(node); + } + + /** + * Get variables that are declared by the node. + * + * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`. + * If the node declares nothing, this method returns an empty array. + * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details. + * + * @param {Espree.Node} node - a node to get. + * @returns {Variable[]} variables that declared by the node. + */ + getDeclaredVariables(node) { + return this.__declaredVariables.get(node) || []; + } + + /** + * acquire scope from node. + * @method ScopeManager#acquire + * @param {Espree.Node} node - node for the acquired scope. + * @param {boolean=} inner - look up the most inner scope, default value is false. + * @returns {Scope?} Scope from node + */ + acquire(node, inner) { + + /** + * predicate + * @param {Scope} testScope - scope to test + * @returns {boolean} predicate + */ + function predicate(testScope) { + if (testScope.type === "function" && testScope.functionExpressionScope) { + return false; + } + return true; + } + + const scopes = this.__get(node); + + if (!scopes || scopes.length === 0) { + return null; + } + + // Heuristic selection from all scopes. + // If you would like to get all scopes, please use ScopeManager#acquireAll. + if (scopes.length === 1) { + return scopes[0]; + } + + if (inner) { + for (let i = scopes.length - 1; i >= 0; --i) { + const scope = scopes[i]; + + if (predicate(scope)) { + return scope; + } + } + } else { + for (let i = 0, iz = scopes.length; i < iz; ++i) { + const scope = scopes[i]; + + if (predicate(scope)) { + return scope; + } + } + } + + return null; + } + + /** + * acquire all scopes from node. + * @method ScopeManager#acquireAll + * @param {Espree.Node} node - node for the acquired scope. + * @returns {Scopes?} Scope array + */ + acquireAll(node) { + return this.__get(node); + } + + /** + * release the node. + * @method ScopeManager#release + * @param {Espree.Node} node - releasing node. + * @param {boolean=} inner - look up the most inner scope, default value is false. + * @returns {Scope?} upper scope for the node. + */ + release(node, inner) { + const scopes = this.__get(node); + + if (scopes && scopes.length) { + const scope = scopes[0].upper; + + if (!scope) { + return null; + } + return this.acquire(scope.block, inner); + } + return null; + } + + attach() { } // eslint-disable-line class-methods-use-this + + detach() { } // eslint-disable-line class-methods-use-this + + __nestScope(scope) { + if (scope instanceof GlobalScope) { + assert(this.__currentScope === null); + this.globalScope = scope; + } + this.__currentScope = scope; + return scope; + } + + __nestGlobalScope(node) { + return this.__nestScope(new GlobalScope(this, node)); + } + + __nestBlockScope(node) { + return this.__nestScope(new BlockScope(this, this.__currentScope, node)); + } + + __nestFunctionScope(node, isMethodDefinition) { + return this.__nestScope(new FunctionScope(this, this.__currentScope, node, isMethodDefinition)); + } + + __nestForScope(node) { + return this.__nestScope(new ForScope(this, this.__currentScope, node)); + } + + __nestCatchScope(node) { + return this.__nestScope(new CatchScope(this, this.__currentScope, node)); + } + + __nestWithScope(node) { + return this.__nestScope(new WithScope(this, this.__currentScope, node)); + } + + __nestClassScope(node) { + return this.__nestScope(new ClassScope(this, this.__currentScope, node)); + } + + __nestSwitchScope(node) { + return this.__nestScope(new SwitchScope(this, this.__currentScope, node)); + } + + __nestModuleScope(node) { + return this.__nestScope(new ModuleScope(this, this.__currentScope, node)); + } + + __nestFunctionExpressionNameScope(node) { + return this.__nestScope(new FunctionExpressionNameScope(this, this.__currentScope, node)); + } + + __isES6() { + return this.__options.ecmaVersion >= 6; + } +} + +module.exports = ScopeManager; + +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 84891: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + Copyright (C) 2015 Yusuke Suzuki + + 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 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. +*/ + + +/* eslint-disable no-underscore-dangle */ +/* eslint-disable no-undefined */ + +const Syntax = __webpack_require__(73168).Syntax; + +const Reference = __webpack_require__(19451); +const Variable = __webpack_require__(27646); +const Definition = __webpack_require__(41636).Definition; +const assert = __webpack_require__(42357); + +/** + * Test if scope is struct + * @param {Scope} scope - scope + * @param {Block} block - block + * @param {boolean} isMethodDefinition - is method definition + * @param {boolean} useDirective - use directive + * @returns {boolean} is strict scope + */ +function isStrictScope(scope, block, isMethodDefinition, useDirective) { + let body; + + // When upper scope is exists and strict, inner scope is also strict. + if (scope.upper && scope.upper.isStrict) { + return true; + } + + if (isMethodDefinition) { + return true; + } + + if (scope.type === "class" || scope.type === "module") { + return true; + } + + if (scope.type === "block" || scope.type === "switch") { + return false; + } + + if (scope.type === "function") { + if (block.type === Syntax.ArrowFunctionExpression && block.body.type !== Syntax.BlockStatement) { + return false; + } + + if (block.type === Syntax.Program) { + body = block; + } else { + body = block.body; + } + + if (!body) { + return false; + } + } else if (scope.type === "global") { + body = block; + } else { + return false; + } + + // Search 'use strict' directive. + if (useDirective) { + for (let i = 0, iz = body.body.length; i < iz; ++i) { + const stmt = body.body[i]; + + if (stmt.type !== Syntax.DirectiveStatement) { + break; + } + if (stmt.raw === "\"use strict\"" || stmt.raw === "'use strict'") { + return true; + } + } + } else { + for (let i = 0, iz = body.body.length; i < iz; ++i) { + const stmt = body.body[i]; + + if (stmt.type !== Syntax.ExpressionStatement) { + break; + } + const expr = stmt.expression; + + if (expr.type !== Syntax.Literal || typeof expr.value !== "string") { + break; + } + if (expr.raw !== null && expr.raw !== undefined) { + if (expr.raw === "\"use strict\"" || expr.raw === "'use strict'") { + return true; + } + } else { + if (expr.value === "use strict") { + return true; + } + } + } + } + return false; +} + +/** + * Register scope + * @param {ScopeManager} scopeManager - scope manager + * @param {Scope} scope - scope + * @returns {void} + */ +function registerScope(scopeManager, scope) { + scopeManager.scopes.push(scope); + + const scopes = scopeManager.__nodeToScope.get(scope.block); + + if (scopes) { + scopes.push(scope); + } else { + scopeManager.__nodeToScope.set(scope.block, [scope]); + } +} + +/** + * Should be statically + * @param {Object} def - def + * @returns {boolean} should be statically + */ +function shouldBeStatically(def) { + return ( + (def.type === Variable.ClassName) || + (def.type === Variable.Variable && def.parent.kind !== "var") + ); +} + +/** + * @class Scope + */ +class Scope { + constructor(scopeManager, type, upperScope, block, isMethodDefinition) { + + /** + * One of 'module', 'block', 'switch', 'function', 'catch', 'with', 'function', 'class', 'global'. + * @member {String} Scope#type + */ + this.type = type; + + /** + * The scoped {@link Variable}s of this scope, as { Variable.name + * : Variable }. + * @member {Map} Scope#set + */ + this.set = new Map(); + + /** + * The tainted variables of this scope, as { Variable.name : + * boolean }. + * @member {Map} Scope#taints */ + this.taints = new Map(); + + /** + * Generally, through the lexical scoping of JS you can always know + * which variable an identifier in the source code refers to. There are + * a few exceptions to this rule. With 'global' and 'with' scopes you + * can only decide at runtime which variable a reference refers to. + * Moreover, if 'eval()' is used in a scope, it might introduce new + * bindings in this or its parent scopes. + * All those scopes are considered 'dynamic'. + * @member {boolean} Scope#dynamic + */ + this.dynamic = this.type === "global" || this.type === "with"; + + /** + * A reference to the scope-defining syntax node. + * @member {espree.Node} Scope#block + */ + this.block = block; + + /** + * The {@link Reference|references} that are not resolved with this scope. + * @member {Reference[]} Scope#through + */ + this.through = []; + + /** + * The scoped {@link Variable}s of this scope. In the case of a + * 'function' scope this includes the automatic argument arguments as + * its first element, as well as all further formal arguments. + * @member {Variable[]} Scope#variables + */ + this.variables = []; + + /** + * Any variable {@link Reference|reference} found in this scope. This + * includes occurrences of local variables as well as variables from + * parent scopes (including the global scope). For local variables + * this also includes defining occurrences (like in a 'var' statement). + * In a 'function' scope this does not include the occurrences of the + * formal parameter in the parameter list. + * @member {Reference[]} Scope#references + */ + this.references = []; + + /** + * For 'global' and 'function' scopes, this is a self-reference. For + * other scope types this is the variableScope value of the + * parent scope. + * @member {Scope} Scope#variableScope + */ + this.variableScope = + (this.type === "global" || this.type === "function" || this.type === "module") ? this : upperScope.variableScope; + + /** + * Whether this scope is created by a FunctionExpression. + * @member {boolean} Scope#functionExpressionScope + */ + this.functionExpressionScope = false; + + /** + * Whether this is a scope that contains an 'eval()' invocation. + * @member {boolean} Scope#directCallToEvalScope + */ + this.directCallToEvalScope = false; + + /** + * @member {boolean} Scope#thisFound + */ + this.thisFound = false; + + this.__left = []; + + /** + * Reference to the parent {@link Scope|scope}. + * @member {Scope} Scope#upper + */ + this.upper = upperScope; + + /** + * Whether 'use strict' is in effect in this scope. + * @member {boolean} Scope#isStrict + */ + this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective()); + + /** + * List of nested {@link Scope}s. + * @member {Scope[]} Scope#childScopes + */ + this.childScopes = []; + if (this.upper) { + this.upper.childScopes.push(this); + } + + this.__declaredVariables = scopeManager.__declaredVariables; + + registerScope(scopeManager, this); + } + + __shouldStaticallyClose(scopeManager) { + return (!this.dynamic || scopeManager.__isOptimistic()); + } + + __shouldStaticallyCloseForGlobal(ref) { + + // On global scope, let/const/class declarations should be resolved statically. + const name = ref.identifier.name; + + if (!this.set.has(name)) { + return false; + } + + const variable = this.set.get(name); + const defs = variable.defs; + + return defs.length > 0 && defs.every(shouldBeStatically); + } + + __staticCloseRef(ref) { + if (!this.__resolve(ref)) { + this.__delegateToUpperScope(ref); + } + } + + __dynamicCloseRef(ref) { + + // notify all names are through to global + let current = this; + + do { + current.through.push(ref); + current = current.upper; + } while (current); + } + + __globalCloseRef(ref) { + + // let/const/class declarations should be resolved statically. + // others should be resolved dynamically. + if (this.__shouldStaticallyCloseForGlobal(ref)) { + this.__staticCloseRef(ref); + } else { + this.__dynamicCloseRef(ref); + } + } + + __close(scopeManager) { + let closeRef; + + if (this.__shouldStaticallyClose(scopeManager)) { + closeRef = this.__staticCloseRef; + } else if (this.type !== "global") { + closeRef = this.__dynamicCloseRef; + } else { + closeRef = this.__globalCloseRef; + } + + // Try Resolving all references in this scope. + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + closeRef.call(this, ref); + } + this.__left = null; + + return this.upper; + } + + // To override by function scopes. + // References in default parameters isn't resolved to variables which are in their function body. + __isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars + return true; + } + + __resolve(ref) { + const name = ref.identifier.name; + + if (!this.set.has(name)) { + return false; + } + const variable = this.set.get(name); + + if (!this.__isValidResolution(ref, variable)) { + return false; + } + variable.references.push(ref); + variable.stack = variable.stack && ref.from.variableScope === this.variableScope; + if (ref.tainted) { + variable.tainted = true; + this.taints.set(variable.name, true); + } + ref.resolved = variable; + + return true; + } + + __delegateToUpperScope(ref) { + if (this.upper) { + this.upper.__left.push(ref); + } + this.through.push(ref); + } + + __addDeclaredVariablesOfNode(variable, node) { + if (node === null || node === undefined) { + return; + } + + let variables = this.__declaredVariables.get(node); + + if (variables === null || variables === undefined) { + variables = []; + this.__declaredVariables.set(node, variables); + } + if (variables.indexOf(variable) === -1) { + variables.push(variable); + } + } + + __defineGeneric(name, set, variables, node, def) { + let variable; + + variable = set.get(name); + if (!variable) { + variable = new Variable(name, this); + set.set(name, variable); + variables.push(variable); + } + + if (def) { + variable.defs.push(def); + this.__addDeclaredVariablesOfNode(variable, def.node); + this.__addDeclaredVariablesOfNode(variable, def.parent); + } + if (node) { + variable.identifiers.push(node); + } + } + + __define(node, def) { + if (node && node.type === Syntax.Identifier) { + this.__defineGeneric( + node.name, + this.set, + this.variables, + node, + def + ); + } + } + + __referencing(node, assign, writeExpr, maybeImplicitGlobal, partial, init) { + + // because Array element may be null + if (!node || node.type !== Syntax.Identifier) { + return; + } + + // Specially handle like `this`. + if (node.name === "super") { + return; + } + + const ref = new Reference(node, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init); + + this.references.push(ref); + this.__left.push(ref); + } + + __detectEval() { + let current = this; + + this.directCallToEvalScope = true; + do { + current.dynamic = true; + current = current.upper; + } while (current); + } + + __detectThis() { + this.thisFound = true; + } + + __isClosed() { + return this.__left === null; + } + + /** + * returns resolved {Reference} + * @method Scope#resolve + * @param {Espree.Identifier} ident - identifier to be resolved. + * @returns {Reference} reference + */ + resolve(ident) { + let ref, i, iz; + + assert(this.__isClosed(), "Scope should be closed."); + assert(ident.type === Syntax.Identifier, "Target should be identifier."); + for (i = 0, iz = this.references.length; i < iz; ++i) { + ref = this.references[i]; + if (ref.identifier === ident) { + return ref; + } + } + return null; + } + + /** + * returns this scope is static + * @method Scope#isStatic + * @returns {boolean} static + */ + isStatic() { + return !this.dynamic; + } + + /** + * returns this scope has materialized arguments + * @method Scope#isArgumentsMaterialized + * @returns {boolean} arguemnts materialized + */ + isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this + return true; + } + + /** + * returns this scope has materialized `this` reference + * @method Scope#isThisMaterialized + * @returns {boolean} this materialized + */ + isThisMaterialized() { // eslint-disable-line class-methods-use-this + return true; + } + + isUsedName(name) { + if (this.set.has(name)) { + return true; + } + for (let i = 0, iz = this.through.length; i < iz; ++i) { + if (this.through[i].identifier.name === name) { + return true; + } + } + return false; + } +} + +class GlobalScope extends Scope { + constructor(scopeManager, block) { + super(scopeManager, "global", null, block, false); + this.implicit = { + set: new Map(), + variables: [], + + /** + * List of {@link Reference}s that are left to be resolved (i.e. which + * need to be linked to the variable they refer to). + * @member {Reference[]} Scope#implicit#left + */ + left: [] + }; + } + + __close(scopeManager) { + const implicit = []; + + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) { + implicit.push(ref.__maybeImplicitGlobal); + } + } + + // create an implicit global variable from assignment expression + for (let i = 0, iz = implicit.length; i < iz; ++i) { + const info = implicit[i]; + + this.__defineImplicit(info.pattern, + new Definition( + Variable.ImplicitGlobalVariable, + info.pattern, + info.node, + null, + null, + null + )); + + } + + this.implicit.left = this.__left; + + return super.__close(scopeManager); + } + + __defineImplicit(node, def) { + if (node && node.type === Syntax.Identifier) { + this.__defineGeneric( + node.name, + this.implicit.set, + this.implicit.variables, + node, + def + ); + } + } +} + +class ModuleScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "module", upperScope, block, false); + } +} + +class FunctionExpressionNameScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "function-expression-name", upperScope, block, false); + this.__define(block.id, + new Definition( + Variable.FunctionName, + block.id, + block, + null, + null, + null + )); + this.functionExpressionScope = true; + } +} + +class CatchScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "catch", upperScope, block, false); + } +} + +class WithScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "with", upperScope, block, false); + } + + __close(scopeManager) { + if (this.__shouldStaticallyClose(scopeManager)) { + return super.__close(scopeManager); + } + + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + ref.tainted = true; + this.__delegateToUpperScope(ref); + } + this.__left = null; + + return this.upper; + } +} + +class BlockScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "block", upperScope, block, false); + } +} + +class SwitchScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "switch", upperScope, block, false); + } +} + +class FunctionScope extends Scope { + constructor(scopeManager, upperScope, block, isMethodDefinition) { + super(scopeManager, "function", upperScope, block, isMethodDefinition); + + // section 9.2.13, FunctionDeclarationInstantiation. + // NOTE Arrow functions never have an arguments objects. + if (this.block.type !== Syntax.ArrowFunctionExpression) { + this.__defineArguments(); + } + } + + isArgumentsMaterialized() { + + // TODO(Constellation) + // We can more aggressive on this condition like this. + // + // function t() { + // // arguments of t is always hidden. + // function arguments() { + // } + // } + if (this.block.type === Syntax.ArrowFunctionExpression) { + return false; + } + + if (!this.isStatic()) { + return true; + } + + const variable = this.set.get("arguments"); + + assert(variable, "Always have arguments variable."); + return variable.tainted || variable.references.length !== 0; + } + + isThisMaterialized() { + if (!this.isStatic()) { + return true; + } + return this.thisFound; + } + + __defineArguments() { + this.__defineGeneric( + "arguments", + this.set, + this.variables, + null, + null + ); + this.taints.set("arguments", true); + } + + // References in default parameters isn't resolved to variables which are in their function body. + // const x = 1 + // function f(a = x) { // This `x` is resolved to the `x` in the outer scope. + // const x = 2 + // console.log(a) + // } + __isValidResolution(ref, variable) { + + // If `options.nodejsScope` is true, `this.block` becomes a Program node. + if (this.block.type === "Program") { + return true; + } + + const bodyStart = this.block.body.range[0]; + + // It's invalid resolution in the following case: + return !( + variable.scope === this && + ref.identifier.range[0] < bodyStart && // the reference is in the parameter part. + variable.defs.every(d => d.name.range[0] >= bodyStart) // the variable is in the body. + ); + } +} + +class ForScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "for", upperScope, block, false); + } +} + +class ClassScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "class", upperScope, block, false); + } +} + +module.exports = { + Scope, + GlobalScope, + ModuleScope, + FunctionExpressionNameScope, + CatchScope, + WithScope, + BlockScope, + SwitchScope, + FunctionScope, + ForScope, + ClassScope +}; + +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 27646: +/***/ (function(module) { + +"use strict"; +/* + Copyright (C) 2015 Yusuke Suzuki + + 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 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. +*/ + + +/** + * A Variable represents a locally scoped identifier. These include arguments to + * functions. + * @class Variable + */ +class Variable { + constructor(name, scope) { + + /** + * The variable name, as given in the source code. + * @member {String} Variable#name + */ + this.name = name; + + /** + * List of defining occurrences of this variable (like in 'var ...' + * statements or as parameter), as AST nodes. + * @member {espree.Identifier[]} Variable#identifiers + */ + this.identifiers = []; + + /** + * List of {@link Reference|references} of this variable (excluding parameter entries) + * in its defining scope and all nested scopes. For defining + * occurrences only see {@link Variable#defs}. + * @member {Reference[]} Variable#references + */ + this.references = []; + + /** + * List of defining occurrences of this variable (like in 'var ...' + * statements or as parameter), as custom objects. + * @member {Definition[]} Variable#defs + */ + this.defs = []; + + this.tainted = false; + + /** + * Whether this is a stack variable. + * @member {boolean} Variable#stack + */ + this.stack = true; + + /** + * Reference to the enclosing Scope. + * @member {Scope} Variable#scope + */ + this.scope = scope; + } +} + +Variable.CatchClause = "CatchClause"; +Variable.Parameter = "Parameter"; +Variable.FunctionName = "FunctionName"; +Variable.ClassName = "ClassName"; +Variable.Variable = "Variable"; +Variable.ImportBinding = "ImportBinding"; +Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable"; + +module.exports = Variable; + +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 62783: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +/* + Copyright (C) 2014 Yusuke Suzuki + + 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 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. +*/ +(function () { + 'use strict'; + + var estraverse = __webpack_require__(12466); + + function isNode(node) { + if (node == null) { + return false; + } + return typeof node === 'object' && typeof node.type === 'string'; + } + + function isProperty(nodeType, key) { + return (nodeType === estraverse.Syntax.ObjectExpression || nodeType === estraverse.Syntax.ObjectPattern) && key === 'properties'; + } + + function Visitor(visitor, options) { + options = options || {}; + + this.__visitor = visitor || this; + this.__childVisitorKeys = options.childVisitorKeys + ? Object.assign({}, estraverse.VisitorKeys, options.childVisitorKeys) + : estraverse.VisitorKeys; + if (options.fallback === 'iteration') { + this.__fallback = Object.keys; + } else if (typeof options.fallback === 'function') { + this.__fallback = options.fallback; + } + } + + /* Default method for visiting children. + * When you need to call default visiting operation inside custom visiting + * operation, you can use it with `this.visitChildren(node)`. + */ + Visitor.prototype.visitChildren = function (node) { + var type, children, i, iz, j, jz, child; + + if (node == null) { + return; + } + + type = node.type || estraverse.Syntax.Property; + + children = this.__childVisitorKeys[type]; + if (!children) { + if (this.__fallback) { + children = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + type + '.'); + } + } + + for (i = 0, iz = children.length; i < iz; ++i) { + child = node[children[i]]; + if (child) { + if (Array.isArray(child)) { + for (j = 0, jz = child.length; j < jz; ++j) { + if (child[j]) { + if (isNode(child[j]) || isProperty(type, children[i])) { + this.visit(child[j]); + } + } + } + } else if (isNode(child)) { + this.visit(child); + } + } + } + }; + + /* Dispatching node. */ + Visitor.prototype.visit = function (node) { + var type; + + if (node == null) { + return; + } + + type = node.type || estraverse.Syntax.Property; + if (this.__visitor[type]) { + this.__visitor[type].call(this, node); + return; + } + this.visitChildren(node); + }; + + exports.version = __webpack_require__(42325).version; + exports.Visitor = Visitor; + exports.visit = function (node, visitor, options) { + var v = new Visitor(visitor, options); + v.visit(node); + }; +}()); +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 12466: +/***/ (function(__unused_webpack_module, exports) { + +/* + Copyright (C) 2012-2013 Yusuke Suzuki + Copyright (C) 2012 Ariya Hidayat + + 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 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. +*/ +/*jslint vars:false, bitwise:true*/ +/*jshint indent:4*/ +/*global exports:true*/ +(function clone(exports) { + 'use strict'; + + var Syntax, + VisitorOption, + VisitorKeys, + BREAK, + SKIP, + REMOVE; + + function deepCopy(obj) { + var ret = {}, key, val; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + val = obj[key]; + if (typeof val === 'object' && val !== null) { + ret[key] = deepCopy(val); + } else { + ret[key] = val; + } + } + } + return ret; + } + + // based on LLVM libc++ upper_bound / lower_bound + // MIT License + + function upperBound(array, func) { + var diff, len, i, current; + + len = array.length; + i = 0; + + while (len) { + diff = len >>> 1; + current = i + diff; + if (func(array[current])) { + len = diff; + } else { + i = current + 1; + len -= diff + 1; + } + } + return i; + } + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + AssignmentPattern: 'AssignmentPattern', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7. + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ChainExpression: 'ChainExpression', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7. + ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7. + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DirectiveStatement: 'DirectiveStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportAllDeclaration: 'ExportAllDeclaration', + ExportDefaultDeclaration: 'ExportDefaultDeclaration', + ExportNamedDeclaration: 'ExportNamedDeclaration', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7. + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportExpression: 'ImportExpression', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MetaProperty: 'MetaProperty', + MethodDefinition: 'MethodDefinition', + ModuleSpecifier: 'ModuleSpecifier', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + RestElement: 'RestElement', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + Super: 'Super', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + }; + + VisitorKeys = { + AssignmentExpression: ['left', 'right'], + AssignmentPattern: ['left', 'right'], + ArrayExpression: ['elements'], + ArrayPattern: ['elements'], + ArrowFunctionExpression: ['params', 'body'], + AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7. + BlockStatement: ['body'], + BinaryExpression: ['left', 'right'], + BreakStatement: ['label'], + CallExpression: ['callee', 'arguments'], + CatchClause: ['param', 'body'], + ChainExpression: ['expression'], + ClassBody: ['body'], + ClassDeclaration: ['id', 'superClass', 'body'], + ClassExpression: ['id', 'superClass', 'body'], + ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7. + ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. + ConditionalExpression: ['test', 'consequent', 'alternate'], + ContinueStatement: ['label'], + DebuggerStatement: [], + DirectiveStatement: [], + DoWhileStatement: ['body', 'test'], + EmptyStatement: [], + ExportAllDeclaration: ['source'], + ExportDefaultDeclaration: ['declaration'], + ExportNamedDeclaration: ['declaration', 'specifiers', 'source'], + ExportSpecifier: ['exported', 'local'], + ExpressionStatement: ['expression'], + ForStatement: ['init', 'test', 'update', 'body'], + ForInStatement: ['left', 'right', 'body'], + ForOfStatement: ['left', 'right', 'body'], + FunctionDeclaration: ['id', 'params', 'body'], + FunctionExpression: ['id', 'params', 'body'], + GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. + Identifier: [], + IfStatement: ['test', 'consequent', 'alternate'], + ImportExpression: ['source'], + ImportDeclaration: ['specifiers', 'source'], + ImportDefaultSpecifier: ['local'], + ImportNamespaceSpecifier: ['local'], + ImportSpecifier: ['imported', 'local'], + Literal: [], + LabeledStatement: ['label', 'body'], + LogicalExpression: ['left', 'right'], + MemberExpression: ['object', 'property'], + MetaProperty: ['meta', 'property'], + MethodDefinition: ['key', 'value'], + ModuleSpecifier: [], + NewExpression: ['callee', 'arguments'], + ObjectExpression: ['properties'], + ObjectPattern: ['properties'], + Program: ['body'], + Property: ['key', 'value'], + RestElement: [ 'argument' ], + ReturnStatement: ['argument'], + SequenceExpression: ['expressions'], + SpreadElement: ['argument'], + Super: [], + SwitchStatement: ['discriminant', 'cases'], + SwitchCase: ['test', 'consequent'], + TaggedTemplateExpression: ['tag', 'quasi'], + TemplateElement: [], + TemplateLiteral: ['quasis', 'expressions'], + ThisExpression: [], + ThrowStatement: ['argument'], + TryStatement: ['block', 'handler', 'finalizer'], + UnaryExpression: ['argument'], + UpdateExpression: ['argument'], + VariableDeclaration: ['declarations'], + VariableDeclarator: ['id', 'init'], + WhileStatement: ['test', 'body'], + WithStatement: ['object', 'body'], + YieldExpression: ['argument'] + }; + + // unique id + BREAK = {}; + SKIP = {}; + REMOVE = {}; + + VisitorOption = { + Break: BREAK, + Skip: SKIP, + Remove: REMOVE + }; + + function Reference(parent, key) { + this.parent = parent; + this.key = key; + } + + Reference.prototype.replace = function replace(node) { + this.parent[this.key] = node; + }; + + Reference.prototype.remove = function remove() { + if (Array.isArray(this.parent)) { + this.parent.splice(this.key, 1); + return true; + } else { + this.replace(null); + return false; + } + }; + + function Element(node, path, wrap, ref) { + this.node = node; + this.path = path; + this.wrap = wrap; + this.ref = ref; + } + + function Controller() { } + + // API: + // return property path array from root to current node + Controller.prototype.path = function path() { + var i, iz, j, jz, result, element; + + function addToPath(result, path) { + if (Array.isArray(path)) { + for (j = 0, jz = path.length; j < jz; ++j) { + result.push(path[j]); + } + } else { + result.push(path); + } + } + + // root node + if (!this.__current.path) { + return null; + } + + // first node is sentinel, second node is root element + result = []; + for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { + element = this.__leavelist[i]; + addToPath(result, element.path); + } + addToPath(result, this.__current.path); + return result; + }; + + // API: + // return type of current node + Controller.prototype.type = function () { + var node = this.current(); + return node.type || this.__current.wrap; + }; + + // API: + // return array of parent elements + Controller.prototype.parents = function parents() { + var i, iz, result; + + // first node is sentinel + result = []; + for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { + result.push(this.__leavelist[i].node); + } + + return result; + }; + + // API: + // return current node + Controller.prototype.current = function current() { + return this.__current.node; + }; + + Controller.prototype.__execute = function __execute(callback, element) { + var previous, result; + + result = undefined; + + previous = this.__current; + this.__current = element; + this.__state = null; + if (callback) { + result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); + } + this.__current = previous; + + return result; + }; + + // API: + // notify control skip / break + Controller.prototype.notify = function notify(flag) { + this.__state = flag; + }; + + // API: + // skip child nodes of current node + Controller.prototype.skip = function () { + this.notify(SKIP); + }; + + // API: + // break traversals + Controller.prototype['break'] = function () { + this.notify(BREAK); + }; + + // API: + // remove node + Controller.prototype.remove = function () { + this.notify(REMOVE); + }; + + Controller.prototype.__initialize = function(root, visitor) { + this.visitor = visitor; + this.root = root; + this.__worklist = []; + this.__leavelist = []; + this.__current = null; + this.__state = null; + this.__fallback = null; + if (visitor.fallback === 'iteration') { + this.__fallback = Object.keys; + } else if (typeof visitor.fallback === 'function') { + this.__fallback = visitor.fallback; + } + + this.__keys = VisitorKeys; + if (visitor.keys) { + this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); + } + }; + + function isNode(node) { + if (node == null) { + return false; + } + return typeof node === 'object' && typeof node.type === 'string'; + } + + function isProperty(nodeType, key) { + return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; + } + + function candidateExistsInLeaveList(leavelist, candidate) { + for (var i = leavelist.length - 1; i >= 0; --i) { + if (leavelist[i].node === candidate) { + return true; + } + } + return false; + } + + Controller.prototype.traverse = function traverse(root, visitor) { + var worklist, + leavelist, + element, + node, + nodeType, + ret, + key, + current, + current2, + candidates, + candidate, + sentinel; + + this.__initialize(root, visitor); + + sentinel = {}; + + // reference + worklist = this.__worklist; + leavelist = this.__leavelist; + + // initialize + worklist.push(new Element(root, null, null, null)); + leavelist.push(new Element(null, null, null, null)); + + while (worklist.length) { + element = worklist.pop(); + + if (element === sentinel) { + element = leavelist.pop(); + + ret = this.__execute(visitor.leave, element); + + if (this.__state === BREAK || ret === BREAK) { + return; + } + continue; + } + + if (element.node) { + + ret = this.__execute(visitor.enter, element); + + if (this.__state === BREAK || ret === BREAK) { + return; + } + + worklist.push(sentinel); + leavelist.push(element); + + if (this.__state === SKIP || ret === SKIP) { + continue; + } + + node = element.node; + nodeType = node.type || element.wrap; + candidates = this.__keys[nodeType]; + if (!candidates) { + if (this.__fallback) { + candidates = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + nodeType + '.'); + } + } + + current = candidates.length; + while ((current -= 1) >= 0) { + key = candidates[current]; + candidate = node[key]; + if (!candidate) { + continue; + } + + if (Array.isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (!candidate[current2]) { + continue; + } + + if (candidateExistsInLeaveList(leavelist, candidate[current2])) { + continue; + } + + if (isProperty(nodeType, candidates[current])) { + element = new Element(candidate[current2], [key, current2], 'Property', null); + } else if (isNode(candidate[current2])) { + element = new Element(candidate[current2], [key, current2], null, null); + } else { + continue; + } + worklist.push(element); + } + } else if (isNode(candidate)) { + if (candidateExistsInLeaveList(leavelist, candidate)) { + continue; + } + + worklist.push(new Element(candidate, key, null, null)); + } + } + } + } + }; + + Controller.prototype.replace = function replace(root, visitor) { + var worklist, + leavelist, + node, + nodeType, + target, + element, + current, + current2, + candidates, + candidate, + sentinel, + outer, + key; + + function removeElem(element) { + var i, + key, + nextElem, + parent; + + if (element.ref.remove()) { + // When the reference is an element of an array. + key = element.ref.key; + parent = element.ref.parent; + + // If removed from array, then decrease following items' keys. + i = worklist.length; + while (i--) { + nextElem = worklist[i]; + if (nextElem.ref && nextElem.ref.parent === parent) { + if (nextElem.ref.key < key) { + break; + } + --nextElem.ref.key; + } + } + } + } + + this.__initialize(root, visitor); + + sentinel = {}; + + // reference + worklist = this.__worklist; + leavelist = this.__leavelist; + + // initialize + outer = { + root: root + }; + element = new Element(root, null, null, new Reference(outer, 'root')); + worklist.push(element); + leavelist.push(element); + + while (worklist.length) { + element = worklist.pop(); + + if (element === sentinel) { + element = leavelist.pop(); + + target = this.__execute(visitor.leave, element); + + // node may be replaced with null, + // so distinguish between undefined and null in this place + if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { + // replace + element.ref.replace(target); + } + + if (this.__state === REMOVE || target === REMOVE) { + removeElem(element); + } + + if (this.__state === BREAK || target === BREAK) { + return outer.root; + } + continue; + } + + target = this.__execute(visitor.enter, element); + + // node may be replaced with null, + // so distinguish between undefined and null in this place + if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { + // replace + element.ref.replace(target); + element.node = target; + } + + if (this.__state === REMOVE || target === REMOVE) { + removeElem(element); + element.node = null; + } + + if (this.__state === BREAK || target === BREAK) { + return outer.root; + } + + // node may be null + node = element.node; + if (!node) { + continue; + } + + worklist.push(sentinel); + leavelist.push(element); + + if (this.__state === SKIP || target === SKIP) { + continue; + } + + nodeType = node.type || element.wrap; + candidates = this.__keys[nodeType]; + if (!candidates) { + if (this.__fallback) { + candidates = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + nodeType + '.'); + } + } + + current = candidates.length; + while ((current -= 1) >= 0) { + key = candidates[current]; + candidate = node[key]; + if (!candidate) { + continue; + } + + if (Array.isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (!candidate[current2]) { + continue; + } + if (isProperty(nodeType, candidates[current])) { + element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); + } else if (isNode(candidate[current2])) { + element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2)); + } else { + continue; + } + worklist.push(element); + } + } else if (isNode(candidate)) { + worklist.push(new Element(candidate, key, null, new Reference(node, key))); + } + } + } + + return outer.root; + }; + + function traverse(root, visitor) { + var controller = new Controller(); + return controller.traverse(root, visitor); + } + + function replace(root, visitor) { + var controller = new Controller(); + return controller.replace(root, visitor); + } + + function extendCommentRange(comment, tokens) { + var target; + + target = upperBound(tokens, function search(token) { + return token.range[0] > comment.range[0]; + }); + + comment.extendedRange = [comment.range[0], comment.range[1]]; + + if (target !== tokens.length) { + comment.extendedRange[1] = tokens[target].range[0]; + } + + target -= 1; + if (target >= 0) { + comment.extendedRange[0] = tokens[target].range[1]; + } + + return comment; + } + + function attachComments(tree, providedComments, tokens) { + // At first, we should calculate extended comment ranges. + var comments = [], comment, len, i, cursor; + + if (!tree.range) { + throw new Error('attachComments needs range information'); + } + + // tokens array is empty, we attach comments to tree as 'leadingComments' + if (!tokens.length) { + if (providedComments.length) { + for (i = 0, len = providedComments.length; i < len; i += 1) { + comment = deepCopy(providedComments[i]); + comment.extendedRange = [0, tree.range[0]]; + comments.push(comment); + } + tree.leadingComments = comments; + } + return tree; + } + + for (i = 0, len = providedComments.length; i < len; i += 1) { + comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); + } + + // This is based on John Freeman's implementation. + cursor = 0; + traverse(tree, { + enter: function (node) { + var comment; + + while (cursor < comments.length) { + comment = comments[cursor]; + if (comment.extendedRange[1] > node.range[0]) { + break; + } + + if (comment.extendedRange[1] === node.range[0]) { + if (!node.leadingComments) { + node.leadingComments = []; + } + node.leadingComments.push(comment); + comments.splice(cursor, 1); + } else { + cursor += 1; + } + } + + // already out of owned node + if (cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + cursor = 0; + traverse(tree, { + leave: function (node) { + var comment; + + while (cursor < comments.length) { + comment = comments[cursor]; + if (node.range[1] < comment.extendedRange[0]) { + break; + } + + if (node.range[1] === comment.extendedRange[0]) { + if (!node.trailingComments) { + node.trailingComments = []; + } + node.trailingComments.push(comment); + comments.splice(cursor, 1); + } else { + cursor += 1; + } + } + + // already out of owned node + if (cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + return tree; + } + + exports.Syntax = Syntax; + exports.traverse = traverse; + exports.replace = replace; + exports.attachComments = attachComments; + exports.VisitorKeys = VisitorKeys; + exports.VisitorOption = VisitorOption; + exports.Controller = Controller; + exports.cloneEnvironment = function () { return clone({}); }; + + return exports; +}(exports)); +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 73168: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +/* + Copyright (C) 2012-2013 Yusuke Suzuki + Copyright (C) 2012 Ariya Hidayat + + 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 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. +*/ +/*jslint vars:false, bitwise:true*/ +/*jshint indent:4*/ +/*global exports:true*/ +(function clone(exports) { + 'use strict'; + + var Syntax, + VisitorOption, + VisitorKeys, + BREAK, + SKIP, + REMOVE; + + function deepCopy(obj) { + var ret = {}, key, val; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + val = obj[key]; + if (typeof val === 'object' && val !== null) { + ret[key] = deepCopy(val); + } else { + ret[key] = val; + } + } + } + return ret; + } + + // based on LLVM libc++ upper_bound / lower_bound + // MIT License + + function upperBound(array, func) { + var diff, len, i, current; + + len = array.length; + i = 0; + + while (len) { + diff = len >>> 1; + current = i + diff; + if (func(array[current])) { + len = diff; + } else { + i = current + 1; + len -= diff + 1; + } + } + return i; + } + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + AssignmentPattern: 'AssignmentPattern', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7. + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7. + ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7. + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DirectiveStatement: 'DirectiveStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportAllDeclaration: 'ExportAllDeclaration', + ExportDefaultDeclaration: 'ExportDefaultDeclaration', + ExportNamedDeclaration: 'ExportNamedDeclaration', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7. + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportExpression: 'ImportExpression', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MetaProperty: 'MetaProperty', + MethodDefinition: 'MethodDefinition', + ModuleSpecifier: 'ModuleSpecifier', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + RestElement: 'RestElement', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + Super: 'Super', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + }; + + VisitorKeys = { + AssignmentExpression: ['left', 'right'], + AssignmentPattern: ['left', 'right'], + ArrayExpression: ['elements'], + ArrayPattern: ['elements'], + ArrowFunctionExpression: ['params', 'body'], + AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7. + BlockStatement: ['body'], + BinaryExpression: ['left', 'right'], + BreakStatement: ['label'], + CallExpression: ['callee', 'arguments'], + CatchClause: ['param', 'body'], + ClassBody: ['body'], + ClassDeclaration: ['id', 'superClass', 'body'], + ClassExpression: ['id', 'superClass', 'body'], + ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7. + ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. + ConditionalExpression: ['test', 'consequent', 'alternate'], + ContinueStatement: ['label'], + DebuggerStatement: [], + DirectiveStatement: [], + DoWhileStatement: ['body', 'test'], + EmptyStatement: [], + ExportAllDeclaration: ['source'], + ExportDefaultDeclaration: ['declaration'], + ExportNamedDeclaration: ['declaration', 'specifiers', 'source'], + ExportSpecifier: ['exported', 'local'], + ExpressionStatement: ['expression'], + ForStatement: ['init', 'test', 'update', 'body'], + ForInStatement: ['left', 'right', 'body'], + ForOfStatement: ['left', 'right', 'body'], + FunctionDeclaration: ['id', 'params', 'body'], + FunctionExpression: ['id', 'params', 'body'], + GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. + Identifier: [], + IfStatement: ['test', 'consequent', 'alternate'], + ImportExpression: ['source'], + ImportDeclaration: ['specifiers', 'source'], + ImportDefaultSpecifier: ['local'], + ImportNamespaceSpecifier: ['local'], + ImportSpecifier: ['imported', 'local'], + Literal: [], + LabeledStatement: ['label', 'body'], + LogicalExpression: ['left', 'right'], + MemberExpression: ['object', 'property'], + MetaProperty: ['meta', 'property'], + MethodDefinition: ['key', 'value'], + ModuleSpecifier: [], + NewExpression: ['callee', 'arguments'], + ObjectExpression: ['properties'], + ObjectPattern: ['properties'], + Program: ['body'], + Property: ['key', 'value'], + RestElement: [ 'argument' ], + ReturnStatement: ['argument'], + SequenceExpression: ['expressions'], + SpreadElement: ['argument'], + Super: [], + SwitchStatement: ['discriminant', 'cases'], + SwitchCase: ['test', 'consequent'], + TaggedTemplateExpression: ['tag', 'quasi'], + TemplateElement: [], + TemplateLiteral: ['quasis', 'expressions'], + ThisExpression: [], + ThrowStatement: ['argument'], + TryStatement: ['block', 'handler', 'finalizer'], + UnaryExpression: ['argument'], + UpdateExpression: ['argument'], + VariableDeclaration: ['declarations'], + VariableDeclarator: ['id', 'init'], + WhileStatement: ['test', 'body'], + WithStatement: ['object', 'body'], + YieldExpression: ['argument'] + }; + + // unique id + BREAK = {}; + SKIP = {}; + REMOVE = {}; + + VisitorOption = { + Break: BREAK, + Skip: SKIP, + Remove: REMOVE + }; + + function Reference(parent, key) { + this.parent = parent; + this.key = key; + } + + Reference.prototype.replace = function replace(node) { + this.parent[this.key] = node; + }; + + Reference.prototype.remove = function remove() { + if (Array.isArray(this.parent)) { + this.parent.splice(this.key, 1); + return true; + } else { + this.replace(null); + return false; + } + }; + + function Element(node, path, wrap, ref) { + this.node = node; + this.path = path; + this.wrap = wrap; + this.ref = ref; + } + + function Controller() { } + + // API: + // return property path array from root to current node + Controller.prototype.path = function path() { + var i, iz, j, jz, result, element; + + function addToPath(result, path) { + if (Array.isArray(path)) { + for (j = 0, jz = path.length; j < jz; ++j) { + result.push(path[j]); + } + } else { + result.push(path); + } + } + + // root node + if (!this.__current.path) { + return null; + } + + // first node is sentinel, second node is root element + result = []; + for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { + element = this.__leavelist[i]; + addToPath(result, element.path); + } + addToPath(result, this.__current.path); + return result; + }; + + // API: + // return type of current node + Controller.prototype.type = function () { + var node = this.current(); + return node.type || this.__current.wrap; + }; + + // API: + // return array of parent elements + Controller.prototype.parents = function parents() { + var i, iz, result; + + // first node is sentinel + result = []; + for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { + result.push(this.__leavelist[i].node); + } + + return result; + }; + + // API: + // return current node + Controller.prototype.current = function current() { + return this.__current.node; + }; + + Controller.prototype.__execute = function __execute(callback, element) { + var previous, result; + + result = undefined; + + previous = this.__current; + this.__current = element; + this.__state = null; + if (callback) { + result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); + } + this.__current = previous; + + return result; + }; + + // API: + // notify control skip / break + Controller.prototype.notify = function notify(flag) { + this.__state = flag; + }; + + // API: + // skip child nodes of current node + Controller.prototype.skip = function () { + this.notify(SKIP); + }; + + // API: + // break traversals + Controller.prototype['break'] = function () { + this.notify(BREAK); + }; + + // API: + // remove node + Controller.prototype.remove = function () { + this.notify(REMOVE); + }; + + Controller.prototype.__initialize = function(root, visitor) { + this.visitor = visitor; + this.root = root; + this.__worklist = []; + this.__leavelist = []; + this.__current = null; + this.__state = null; + this.__fallback = null; + if (visitor.fallback === 'iteration') { + this.__fallback = Object.keys; + } else if (typeof visitor.fallback === 'function') { + this.__fallback = visitor.fallback; + } + + this.__keys = VisitorKeys; + if (visitor.keys) { + this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); + } + }; + + function isNode(node) { + if (node == null) { + return false; + } + return typeof node === 'object' && typeof node.type === 'string'; + } + + function isProperty(nodeType, key) { + return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; + } + + Controller.prototype.traverse = function traverse(root, visitor) { + var worklist, + leavelist, + element, + node, + nodeType, + ret, + key, + current, + current2, + candidates, + candidate, + sentinel; + + this.__initialize(root, visitor); + + sentinel = {}; + + // reference + worklist = this.__worklist; + leavelist = this.__leavelist; + + // initialize + worklist.push(new Element(root, null, null, null)); + leavelist.push(new Element(null, null, null, null)); + + while (worklist.length) { + element = worklist.pop(); + + if (element === sentinel) { + element = leavelist.pop(); + + ret = this.__execute(visitor.leave, element); + + if (this.__state === BREAK || ret === BREAK) { + return; + } + continue; + } + + if (element.node) { + + ret = this.__execute(visitor.enter, element); + + if (this.__state === BREAK || ret === BREAK) { + return; + } + + worklist.push(sentinel); + leavelist.push(element); + + if (this.__state === SKIP || ret === SKIP) { + continue; + } + + node = element.node; + nodeType = node.type || element.wrap; + candidates = this.__keys[nodeType]; + if (!candidates) { + if (this.__fallback) { + candidates = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + nodeType + '.'); + } + } + + current = candidates.length; + while ((current -= 1) >= 0) { + key = candidates[current]; + candidate = node[key]; + if (!candidate) { + continue; + } + + if (Array.isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (!candidate[current2]) { + continue; + } + if (isProperty(nodeType, candidates[current])) { + element = new Element(candidate[current2], [key, current2], 'Property', null); + } else if (isNode(candidate[current2])) { + element = new Element(candidate[current2], [key, current2], null, null); + } else { + continue; + } + worklist.push(element); + } + } else if (isNode(candidate)) { + worklist.push(new Element(candidate, key, null, null)); + } + } + } + } + }; + + Controller.prototype.replace = function replace(root, visitor) { + var worklist, + leavelist, + node, + nodeType, + target, + element, + current, + current2, + candidates, + candidate, + sentinel, + outer, + key; + + function removeElem(element) { + var i, + key, + nextElem, + parent; + + if (element.ref.remove()) { + // When the reference is an element of an array. + key = element.ref.key; + parent = element.ref.parent; + + // If removed from array, then decrease following items' keys. + i = worklist.length; + while (i--) { + nextElem = worklist[i]; + if (nextElem.ref && nextElem.ref.parent === parent) { + if (nextElem.ref.key < key) { + break; + } + --nextElem.ref.key; + } + } + } + } + + this.__initialize(root, visitor); + + sentinel = {}; + + // reference + worklist = this.__worklist; + leavelist = this.__leavelist; + + // initialize + outer = { + root: root + }; + element = new Element(root, null, null, new Reference(outer, 'root')); + worklist.push(element); + leavelist.push(element); + + while (worklist.length) { + element = worklist.pop(); + + if (element === sentinel) { + element = leavelist.pop(); + + target = this.__execute(visitor.leave, element); + + // node may be replaced with null, + // so distinguish between undefined and null in this place + if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { + // replace + element.ref.replace(target); + } + + if (this.__state === REMOVE || target === REMOVE) { + removeElem(element); + } + + if (this.__state === BREAK || target === BREAK) { + return outer.root; + } + continue; + } + + target = this.__execute(visitor.enter, element); + + // node may be replaced with null, + // so distinguish between undefined and null in this place + if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { + // replace + element.ref.replace(target); + element.node = target; + } + + if (this.__state === REMOVE || target === REMOVE) { + removeElem(element); + element.node = null; + } + + if (this.__state === BREAK || target === BREAK) { + return outer.root; + } + + // node may be null + node = element.node; + if (!node) { + continue; + } + + worklist.push(sentinel); + leavelist.push(element); + + if (this.__state === SKIP || target === SKIP) { + continue; + } + + nodeType = node.type || element.wrap; + candidates = this.__keys[nodeType]; + if (!candidates) { + if (this.__fallback) { + candidates = this.__fallback(node); + } else { + throw new Error('Unknown node type ' + nodeType + '.'); + } + } + + current = candidates.length; + while ((current -= 1) >= 0) { + key = candidates[current]; + candidate = node[key]; + if (!candidate) { + continue; + } + + if (Array.isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (!candidate[current2]) { + continue; + } + if (isProperty(nodeType, candidates[current])) { + element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); + } else if (isNode(candidate[current2])) { + element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2)); + } else { + continue; + } + worklist.push(element); + } + } else if (isNode(candidate)) { + worklist.push(new Element(candidate, key, null, new Reference(node, key))); + } + } + } + + return outer.root; + }; + + function traverse(root, visitor) { + var controller = new Controller(); + return controller.traverse(root, visitor); + } + + function replace(root, visitor) { + var controller = new Controller(); + return controller.replace(root, visitor); + } + + function extendCommentRange(comment, tokens) { + var target; + + target = upperBound(tokens, function search(token) { + return token.range[0] > comment.range[0]; + }); + + comment.extendedRange = [comment.range[0], comment.range[1]]; + + if (target !== tokens.length) { + comment.extendedRange[1] = tokens[target].range[0]; + } + + target -= 1; + if (target >= 0) { + comment.extendedRange[0] = tokens[target].range[1]; + } + + return comment; + } + + function attachComments(tree, providedComments, tokens) { + // At first, we should calculate extended comment ranges. + var comments = [], comment, len, i, cursor; + + if (!tree.range) { + throw new Error('attachComments needs range information'); + } + + // tokens array is empty, we attach comments to tree as 'leadingComments' + if (!tokens.length) { + if (providedComments.length) { + for (i = 0, len = providedComments.length; i < len; i += 1) { + comment = deepCopy(providedComments[i]); + comment.extendedRange = [0, tree.range[0]]; + comments.push(comment); + } + tree.leadingComments = comments; + } + return tree; + } + + for (i = 0, len = providedComments.length; i < len; i += 1) { + comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); + } + + // This is based on John Freeman's implementation. + cursor = 0; + traverse(tree, { + enter: function (node) { + var comment; + + while (cursor < comments.length) { + comment = comments[cursor]; + if (comment.extendedRange[1] > node.range[0]) { + break; + } + + if (comment.extendedRange[1] === node.range[0]) { + if (!node.leadingComments) { + node.leadingComments = []; + } + node.leadingComments.push(comment); + comments.splice(cursor, 1); + } else { + cursor += 1; + } + } + + // already out of owned node + if (cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + cursor = 0; + traverse(tree, { + leave: function (node) { + var comment; + + while (cursor < comments.length) { + comment = comments[cursor]; + if (node.range[1] < comment.extendedRange[0]) { + break; + } + + if (node.range[1] === comment.extendedRange[0]) { + if (!node.trailingComments) { + node.trailingComments = []; + } + node.trailingComments.push(comment); + comments.splice(cursor, 1); + } else { + cursor += 1; + } + } + + // already out of owned node + if (cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + return tree; + } + + exports.version = __webpack_require__(85110)/* .version */ .i8; + exports.Syntax = Syntax; + exports.traverse = traverse; + exports.replace = replace; + exports.attachComments = attachComments; + exports.VisitorKeys = VisitorKeys; + exports.VisitorOption = VisitorOption; + exports.Controller = Controller; + exports.cloneEnvironment = function () { return clone({}); }; + + return exports; +}(exports)); +/* vim: set sw=4 ts=4 et tw=80 : */ + + +/***/ }), + +/***/ 25877: +/***/ (function(module) { + +module.exports = function (glob, opts) { + if (typeof glob !== 'string') { + throw new TypeError('Expected a string'); + } + + var str = String(glob); + + // The regexp we are building, as a string. + var reStr = ""; + + // Whether we are matching so called "extended" globs (like bash) and should + // support single character matching, matching ranges of characters, group + // matching, etc. + var extended = opts ? !!opts.extended : false; + + // When globstar is _false_ (default), '/foo/*' is translated a regexp like + // '^\/foo\/.*$' which will match any string beginning with '/foo/' + // When globstar is _true_, '/foo/*' is translated to regexp like + // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT + // which does not have a '/' to the right of it. + // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but + // these will not '/foo/bar/baz', '/foo/bar/baz.txt' + // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when + // globstar is _false_ + var globstar = opts ? !!opts.globstar : false; + + // If we are doing extended matching, this boolean is true when we are inside + // a group (eg {*.html,*.js}), and false otherwise. + var inGroup = false; + + // RegExp flags (eg "i" ) to pass in to RegExp constructor. + var flags = opts && typeof( opts.flags ) === "string" ? opts.flags : ""; + + var c; + for (var i = 0, len = str.length; i < len; i++) { + c = str[i]; + + switch (c) { + case "/": + case "$": + case "^": + case "+": + case ".": + case "(": + case ")": + case "=": + case "!": + case "|": + reStr += "\\" + c; + break; + + case "?": + if (extended) { + reStr += "."; + break; + } + + case "[": + case "]": + if (extended) { + reStr += c; + break; + } + + case "{": + if (extended) { + inGroup = true; + reStr += "("; + break; + } + + case "}": + if (extended) { + inGroup = false; + reStr += ")"; + break; + } + + case ",": + if (inGroup) { + reStr += "|"; + break; + } + reStr += "\\" + c; + break; + + case "*": + // Move over all consecutive "*"'s. + // Also store the previous and next characters + var prevChar = str[i - 1]; + var starCount = 1; + while(str[i + 1] === "*") { + starCount++; + i++; + } + var nextChar = str[i + 1]; + + if (!globstar) { + // globstar is disabled, so treat any number of "*" as one + reStr += ".*"; + } else { + // globstar is enabled, so determine if this is a globstar segment + var isGlobstar = starCount > 1 // multiple "*"'s + && (prevChar === "/" || prevChar === undefined) // from the start of the segment + && (nextChar === "/" || nextChar === undefined) // to the end of the segment + + if (isGlobstar) { + // it's a globstar, so match zero or more path segments + reStr += "((?:[^/]*(?:\/|$))*)"; + i++; // move over the "/" + } else { + // it's not a globstar, so only match one path segment + reStr += "([^/]*)"; + } + } + break; + + default: + reStr += c; + } + } + + // When regexp 'g' flag is specified don't + // constrain the regular expression with ^ & $ + if (!flags || !~flags.indexOf('g')) { + reStr = "^" + reStr + "$"; + } + + return new RegExp(reStr, flags); +}; + + +/***/ }), + +/***/ 40251: +/***/ (function(module) { + +"use strict"; + + +module.exports = clone + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: obj.__proto__ } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} + + +/***/ }), + +/***/ 88715: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fs = __webpack_require__(35747) +var polyfills = __webpack_require__(35363) +var legacy = __webpack_require__(35672) +var clone = __webpack_require__(40251) + +var util = __webpack_require__(31669) + +/* istanbul ignore next - node 0.x polyfill */ +var gracefulQueue +var previousSymbol + +/* istanbul ignore else - node 0.x polyfill */ +if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { + gracefulQueue = Symbol.for('graceful-fs.queue') + // This is used in testing by future versions + previousSymbol = Symbol.for('graceful-fs.previous') +} else { + gracefulQueue = '___graceful-fs.queue' + previousSymbol = '___graceful-fs.previous' +} + +function noop () {} + +function publishQueue(context, queue) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue + } + }) +} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +// Once time initialization +if (!fs[gracefulQueue]) { + // This queue can be shared by multiple loaded instances + var queue = global[gracefulQueue] || [] + publishQueue(fs, queue) + + // Patch fs.close/closeSync to shared queue version, because we need + // to retry() whenever a close happens *anywhere* in the program. + // This is essential when multiple graceful-fs instances are + // in play at the same time. + fs.close = (function (fs$close) { + function close (fd, cb) { + return fs$close.call(fs, fd, function (err) { + // This function uses the graceful-fs shared queue + if (!err) { + retry() + } + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) + } + + Object.defineProperty(close, previousSymbol, { + value: fs$close + }) + return close + })(fs.close) + + fs.closeSync = (function (fs$closeSync) { + function closeSync (fd) { + // This function uses the graceful-fs shared queue + fs$closeSync.apply(fs, arguments) + retry() + } + + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }) + return closeSync + })(fs.closeSync) + + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(fs[gracefulQueue]) + __webpack_require__(42357).equal(fs[gracefulQueue].length, 0) + }) + } +} + +if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); +} + +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; +} + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, options, cb) { + var args = [path] + if (typeof options !== 'function') { + args.push(options) + } else { + cb = options + } + args.push(go$readdir$cb) + + return go$readdir(args) + + function go$readdir$cb (err, files) { + if (files && files.sort) + files.sort() + + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [args]]) + + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + } + } + + function go$readdir (args) { + return fs$readdir.apply(fs, args) + } + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } + + var fs$WriteStream = fs.WriteStream + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } + + Object.defineProperty(fs, 'ReadStream', { + get: function () { + return ReadStream + }, + set: function (val) { + ReadStream = val + }, + enumerable: true, + configurable: true + }) + Object.defineProperty(fs, 'WriteStream', { + get: function () { + return WriteStream + }, + set: function (val) { + WriteStream = val + }, + enumerable: true, + configurable: true + }) + + // legacy names + var FileReadStream = ReadStream + Object.defineProperty(fs, 'FileReadStream', { + get: function () { + return FileReadStream + }, + set: function (val) { + FileReadStream = val + }, + enumerable: true, + configurable: true + }) + var FileWriteStream = WriteStream + Object.defineProperty(fs, 'FileWriteStream', { + get: function () { + return FileWriteStream + }, + set: function (val) { + FileWriteStream = val + }, + enumerable: true, + configurable: true + }) + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new fs.ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new fs.WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + fs[gracefulQueue].push(elem) +} + +function retry () { + var elem = fs[gracefulQueue].shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} + + +/***/ }), + +/***/ 35672: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var Stream = __webpack_require__(92413).Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} + + +/***/ }), + +/***/ 35363: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var constants = __webpack_require__(27619) + +var origCwd = process.cwd +var cwd = null + +var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform + +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +var chdir = process.chdir +process.chdir = function(d) { + cwd = null + chdir.call(process, d) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) + + fs.stat = statFix(fs.stat) + fs.fstat = statFix(fs.fstat) + fs.lstat = statFix(fs.lstat) + + fs.statSync = statFixSync(fs.statSync) + fs.fstatSync = statFixSync(fs.fstatSync) + fs.lstatSync = statFixSync(fs.lstatSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + if (cb) process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 60 seconds. + + // Set the timeout this long because some Windows Anti-Virus, such as Parity + // bit9, may lock files for up to a minute, causing npm package install + // failures. Also, take care to yield the scheduler. Windows scheduling gives + // CPU to a busy looping process, which can cause the program causing the lock + // contention to be starved of CPU by node, so the contention doesn't resolve. + if (platform === "win32") { + fs.rename = (function (fs$rename) { return function (from, to, cb) { + var start = Date.now() + var backoff = 0; + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 60000) { + setTimeout(function() { + fs.stat(to, function (stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er) + }) + }, backoff) + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er) + }) + }})(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = (function (fs$read) { + function read (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + + // This ensures `util.promisify` works as it does for native `fs.read`. + read.__proto__ = fs$read + return read + })(fs.read) + + fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) + + function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + } + + function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } + } + + function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + + function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + if (cb) cb.apply(this, arguments) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) + } + } + + function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + return stats; + } + } + + // ENOSYS means that the fs doesn't support the op. Just ignore + // that, because it doesn't matter. + // + // if there's no getuid, or if getuid() is something other + // than 0, and the error is EINVAL or EPERM, then just ignore + // it. + // + // This specific case is a silent failure in cp, install, tar, + // and most other unix tools that manage permissions. + // + // When running as root, or if other types of errors are + // encountered, then it's strict. + function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false + } +} + + +/***/ }), + +/***/ 34270: +/***/ (function(module) { + +"use strict"; + + +module.exports = parseJson +function parseJson (txt, reviver, context) { + context = context || 20 + try { + return JSON.parse(txt, reviver) + } catch (e) { + if (typeof txt !== 'string') { + const isEmptyArray = Array.isArray(txt) && txt.length === 0 + const errorMessage = 'Cannot parse ' + + (isEmptyArray ? 'an empty array' : String(txt)) + throw new TypeError(errorMessage) + } + const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i) + const errIdx = syntaxErr + ? +syntaxErr[1] + : e.message.match(/^Unexpected end of JSON.*/i) + ? txt.length - 1 + : null + if (errIdx != null) { + const start = errIdx <= context + ? 0 + : errIdx - context + const end = errIdx + context >= txt.length + ? txt.length + : errIdx + context + e.message += ` while parsing near '${ + start === 0 ? '' : '...' + }${txt.slice(start, end)}${ + end === txt.length ? '' : '...' + }'` + } else { + e.message += ` while parsing '${txt.slice(0, context * 2)}'` + } + throw e + } +} + + +/***/ }), + +/***/ 33712: +/***/ (function(module) { + +"use strict"; + + +class LoadingLoaderError extends Error { + constructor(message) { + super(message); + this.name = "LoaderRunnerError"; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = LoadingLoaderError; + + +/***/ }), + +/***/ 77346: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +var fs = __webpack_require__(35747); +var readFile = fs.readFile.bind(fs); +var loadLoader = __webpack_require__(30422); + +function utf8BufferToString(buf) { + var str = buf.toString("utf-8"); + if(str.charCodeAt(0) === 0xFEFF) { + return str.substr(1); + } else { + return str; + } +} + +const PATH_QUERY_FRAGMENT_REGEXP = /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; + +/** + * @param {string} str the path with query and fragment + * @returns {{ path: string, query: string, fragment: string }} parsed parts + */ +function parsePathQueryFragment(str) { + var match = PATH_QUERY_FRAGMENT_REGEXP.exec(str); + return { + path: match[1].replace(/\0(.)/g, "$1"), + query: match[2] ? match[2].replace(/\0(.)/g, "$1") : "", + fragment: match[3] || "" + }; +} + +function dirname(path) { + if(path === "/") return "/"; + var i = path.lastIndexOf("/"); + var j = path.lastIndexOf("\\"); + var i2 = path.indexOf("/"); + var j2 = path.indexOf("\\"); + var idx = i > j ? i : j; + var idx2 = i > j ? i2 : j2; + if(idx < 0) return path; + if(idx === idx2) return path.substr(0, idx + 1); + return path.substr(0, idx); +} + +function createLoaderObject(loader) { + var obj = { + path: null, + query: null, + fragment: null, + options: null, + ident: null, + normal: null, + pitch: null, + raw: null, + data: null, + pitchExecuted: false, + normalExecuted: false + }; + Object.defineProperty(obj, "request", { + enumerable: true, + get: function() { + return obj.path.replace(/#/g, "\0#") + obj.query.replace(/#/g, "\0#") + obj.fragment; + }, + set: function(value) { + if(typeof value === "string") { + var splittedRequest = parsePathQueryFragment(value); + obj.path = splittedRequest.path; + obj.query = splittedRequest.query; + obj.fragment = splittedRequest.fragment; + obj.options = undefined; + obj.ident = undefined; + } else { + if(!value.loader) + throw new Error("request should be a string or object with loader and options (" + JSON.stringify(value) + ")"); + obj.path = value.loader; + obj.fragment = value.fragment || ""; + obj.type = value.type; + obj.options = value.options; + obj.ident = value.ident; + if(obj.options === null) + obj.query = ""; + else if(obj.options === undefined) + obj.query = ""; + else if(typeof obj.options === "string") + obj.query = "?" + obj.options; + else if(obj.ident) + obj.query = "??" + obj.ident; + else if(typeof obj.options === "object" && obj.options.ident) + obj.query = "??" + obj.options.ident; + else + obj.query = "?" + JSON.stringify(obj.options); + } + } + }); + obj.request = loader; + if(Object.preventExtensions) { + Object.preventExtensions(obj); + } + return obj; +} + +function runSyncOrAsync(fn, context, args, callback) { + var isSync = true; + var isDone = false; + var isError = false; // internal error + var reportedError = false; + context.async = function async() { + if(isDone) { + if(reportedError) return; // ignore + throw new Error("async(): The callback was already called."); + } + isSync = false; + return innerCallback; + }; + var innerCallback = context.callback = function() { + if(isDone) { + if(reportedError) return; // ignore + throw new Error("callback(): The callback was already called."); + } + isDone = true; + isSync = false; + try { + callback.apply(null, arguments); + } catch(e) { + isError = true; + throw e; + } + }; + try { + var result = (function LOADER_EXECUTION() { + return fn.apply(context, args); + }()); + if(isSync) { + isDone = true; + if(result === undefined) + return callback(); + if(result && typeof result === "object" && typeof result.then === "function") { + return result.then(function(r) { + callback(null, r); + }, callback); + } + return callback(null, result); + } + } catch(e) { + if(isError) throw e; + if(isDone) { + // loader is already "done", so we cannot use the callback function + // for better debugging we print the error on the console + if(typeof e === "object" && e.stack) console.error(e.stack); + else console.error(e); + return; + } + isDone = true; + reportedError = true; + callback(e); + } + +} + +function convertArgs(args, raw) { + if(!raw && Buffer.isBuffer(args[0])) + args[0] = utf8BufferToString(args[0]); + else if(raw && typeof args[0] === "string") + args[0] = Buffer.from(args[0], "utf-8"); +} + +function iteratePitchingLoaders(options, loaderContext, callback) { + // abort after last loader + if(loaderContext.loaderIndex >= loaderContext.loaders.length) + return processResource(options, loaderContext, callback); + + var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; + + // iterate + if(currentLoaderObject.pitchExecuted) { + loaderContext.loaderIndex++; + return iteratePitchingLoaders(options, loaderContext, callback); + } + + // load loader module + loadLoader(currentLoaderObject, function(err) { + if(err) { + loaderContext.cacheable(false); + return callback(err); + } + var fn = currentLoaderObject.pitch; + currentLoaderObject.pitchExecuted = true; + if(!fn) return iteratePitchingLoaders(options, loaderContext, callback); + + runSyncOrAsync( + fn, + loaderContext, [loaderContext.remainingRequest, loaderContext.previousRequest, currentLoaderObject.data = {}], + function(err) { + if(err) return callback(err); + var args = Array.prototype.slice.call(arguments, 1); + // Determine whether to continue the pitching process based on + // argument values (as opposed to argument presence) in order + // to support synchronous and asynchronous usages. + var hasArg = args.some(function(value) { + return value !== undefined; + }); + if(hasArg) { + loaderContext.loaderIndex--; + iterateNormalLoaders(options, loaderContext, args, callback); + } else { + iteratePitchingLoaders(options, loaderContext, callback); + } + } + ); + }); +} + +function processResource(options, loaderContext, callback) { + // set loader index to last loader + loaderContext.loaderIndex = loaderContext.loaders.length - 1; + + var resourcePath = loaderContext.resourcePath; + if(resourcePath) { + options.processResource(loaderContext, resourcePath, function(err, buffer) { + if(err) return callback(err); + options.resourceBuffer = buffer; + iterateNormalLoaders(options, loaderContext, [buffer], callback); + }); + } else { + iterateNormalLoaders(options, loaderContext, [null], callback); + } +} + +function iterateNormalLoaders(options, loaderContext, args, callback) { + if(loaderContext.loaderIndex < 0) + return callback(null, args); + + var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; + + // iterate + if(currentLoaderObject.normalExecuted) { + loaderContext.loaderIndex--; + return iterateNormalLoaders(options, loaderContext, args, callback); + } + + var fn = currentLoaderObject.normal; + currentLoaderObject.normalExecuted = true; + if(!fn) { + return iterateNormalLoaders(options, loaderContext, args, callback); + } + + convertArgs(args, currentLoaderObject.raw); + + runSyncOrAsync(fn, loaderContext, args, function(err) { + if(err) return callback(err); + + var args = Array.prototype.slice.call(arguments, 1); + iterateNormalLoaders(options, loaderContext, args, callback); + }); +} + +exports.getContext = function getContext(resource) { + var path = parsePathQueryFragment(resource).path; + return dirname(path); +}; + +exports.runLoaders = function runLoaders(options, callback) { + // read options + var resource = options.resource || ""; + var loaders = options.loaders || []; + var loaderContext = options.context || {}; + var processResource = options.processResource || ((readResource, context, resource, callback) => { + context.addDependency(resource); + readResource(resource, callback); + }).bind(null, options.readResource || readFile); + + // + var splittedResource = resource && parsePathQueryFragment(resource); + var resourcePath = splittedResource ? splittedResource.path : undefined; + var resourceQuery = splittedResource ? splittedResource.query : undefined; + var resourceFragment = splittedResource ? splittedResource.fragment : undefined; + var contextDirectory = resourcePath ? dirname(resourcePath) : null; + + // execution state + var requestCacheable = true; + var fileDependencies = []; + var contextDependencies = []; + var missingDependencies = []; + + // prepare loader objects + loaders = loaders.map(createLoaderObject); + + loaderContext.context = contextDirectory; + loaderContext.loaderIndex = 0; + loaderContext.loaders = loaders; + loaderContext.resourcePath = resourcePath; + loaderContext.resourceQuery = resourceQuery; + loaderContext.resourceFragment = resourceFragment; + loaderContext.async = null; + loaderContext.callback = null; + loaderContext.cacheable = function cacheable(flag) { + if(flag === false) { + requestCacheable = false; + } + }; + loaderContext.dependency = loaderContext.addDependency = function addDependency(file) { + fileDependencies.push(file); + }; + loaderContext.addContextDependency = function addContextDependency(context) { + contextDependencies.push(context); + }; + loaderContext.addMissingDependency = function addMissingDependency(context) { + missingDependencies.push(context); + }; + loaderContext.getDependencies = function getDependencies() { + return fileDependencies.slice(); + }; + loaderContext.getContextDependencies = function getContextDependencies() { + return contextDependencies.slice(); + }; + loaderContext.getMissingDependencies = function getMissingDependencies() { + return missingDependencies.slice(); + }; + loaderContext.clearDependencies = function clearDependencies() { + fileDependencies.length = 0; + contextDependencies.length = 0; + missingDependencies.length = 0; + requestCacheable = true; + }; + Object.defineProperty(loaderContext, "resource", { + enumerable: true, + get: function() { + if(loaderContext.resourcePath === undefined) + return undefined; + return loaderContext.resourcePath.replace(/#/g, "\0#") + loaderContext.resourceQuery.replace(/#/g, "\0#") + loaderContext.resourceFragment; + }, + set: function(value) { + var splittedResource = value && parsePathQueryFragment(value); + loaderContext.resourcePath = splittedResource ? splittedResource.path : undefined; + loaderContext.resourceQuery = splittedResource ? splittedResource.query : undefined; + loaderContext.resourceFragment = splittedResource ? splittedResource.fragment : undefined; + } + }); + Object.defineProperty(loaderContext, "request", { + enumerable: true, + get: function() { + return loaderContext.loaders.map(function(o) { + return o.request; + }).concat(loaderContext.resource || "").join("!"); + } + }); + Object.defineProperty(loaderContext, "remainingRequest", { + enumerable: true, + get: function() { + if(loaderContext.loaderIndex >= loaderContext.loaders.length - 1 && !loaderContext.resource) + return ""; + return loaderContext.loaders.slice(loaderContext.loaderIndex + 1).map(function(o) { + return o.request; + }).concat(loaderContext.resource || "").join("!"); + } + }); + Object.defineProperty(loaderContext, "currentRequest", { + enumerable: true, + get: function() { + return loaderContext.loaders.slice(loaderContext.loaderIndex).map(function(o) { + return o.request; + }).concat(loaderContext.resource || "").join("!"); + } + }); + Object.defineProperty(loaderContext, "previousRequest", { + enumerable: true, + get: function() { + return loaderContext.loaders.slice(0, loaderContext.loaderIndex).map(function(o) { + return o.request; + }).join("!"); + } + }); + Object.defineProperty(loaderContext, "query", { + enumerable: true, + get: function() { + var entry = loaderContext.loaders[loaderContext.loaderIndex]; + return entry.options && typeof entry.options === "object" ? entry.options : entry.query; + } + }); + Object.defineProperty(loaderContext, "data", { + enumerable: true, + get: function() { + return loaderContext.loaders[loaderContext.loaderIndex].data; + } + }); + + // finish loader context + if(Object.preventExtensions) { + Object.preventExtensions(loaderContext); + } + + var processOptions = { + resourceBuffer: null, + processResource: processResource + }; + iteratePitchingLoaders(processOptions, loaderContext, function(err, result) { + if(err) { + return callback(err, { + cacheable: requestCacheable, + fileDependencies: fileDependencies, + contextDependencies: contextDependencies, + missingDependencies: missingDependencies + }); + } + callback(null, { + result: result, + resourceBuffer: processOptions.resourceBuffer, + cacheable: requestCacheable, + fileDependencies: fileDependencies, + contextDependencies: contextDependencies, + missingDependencies: missingDependencies + }); + }); +}; + + +/***/ }), + +/***/ 30422: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var LoaderLoadingError = __webpack_require__(33712); +var url; + +module.exports = function loadLoader(loader, callback) { + if(loader.type === "module") { + try { + if(url === undefined) url = __webpack_require__(78835); + var loaderUrl = url.pathToFileURL(loader.path); + var modulePromise = eval("import(" + JSON.stringify(loaderUrl.toString()) + ")"); + modulePromise.then(function(module) { + handleResult(loader, module, callback); + }, callback); + return; + } catch(e) { + callback(e); + } + } else { + try { + var module = require(loader.path); + } catch(e) { + // it is possible for node to choke on a require if the FD descriptor + // limit has been reached. give it a chance to recover. + if(e instanceof Error && e.code === "EMFILE") { + var retry = loadLoader.bind(null, loader, callback); + if(typeof setImmediate === "function") { + // node >= 0.9.0 + return setImmediate(retry); + } else { + // node < 0.9.0 + return process.nextTick(retry); + } + } + return callback(e); + } + return handleResult(loader, module, callback); + } +}; + +function handleResult(loader, module, callback) { + if(typeof module !== "function" && typeof module !== "object") { + return callback(new LoaderLoadingError( + "Module '" + loader.path + "' is not a loader (export function or es6 module)" + )); + } + loader.normal = typeof module === "function" ? module : module.default; + loader.pitch = module.pitch; + loader.raw = module.raw; + if(typeof loader.normal !== "function" && typeof loader.pitch !== "function") { + return callback(new LoaderLoadingError( + "Module '" + loader.path + "' is not a loader (must have normal or pitch function)" + )); + } + callback(); +} + + +/***/ }), + +/***/ 26887: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = __webpack_require__(60756) + + +/***/ }), + +/***/ 63835: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + + + +/** + * Module dependencies. + * @private + */ + +var db = __webpack_require__(26887) +var extname = __webpack_require__(85622).extname + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} + + +/***/ }), + +/***/ 78193: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +const Queue = __webpack_require__(57260); + +const pLimit = concurrency => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + throw new TypeError('Expected `concurrency` to be a number from 1 and up'); + } + + const queue = new Queue(); + let activeCount = 0; + + const next = () => { + activeCount--; + + if (queue.size > 0) { + queue.dequeue()(); + } + }; + + const run = async (fn, resolve, ...args) => { + activeCount++; + + const result = (async () => fn(...args))(); + + resolve(result); + + try { + await result; + } catch {} + + next(); + }; + + const enqueue = (fn, resolve, ...args) => { + queue.enqueue(run.bind(null, fn, resolve, ...args)); + + (async () => { + // This function needs to wait until the next microtask before comparing + // `activeCount` to `concurrency`, because `activeCount` is updated asynchronously + // when the run function is dequeued and called. The comparison in the if-statement + // needs to happen asynchronously as well to get an up-to-date value for `activeCount`. + await Promise.resolve(); + + if (activeCount < concurrency && queue.size > 0) { + queue.dequeue()(); + } + })(); + }; + + const generator = (fn, ...args) => new Promise(resolve => { + enqueue(fn, resolve, ...args); + }); + + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.size + }, + clearQueue: { + value: () => { + queue.clear(); + } + } + }); + + return generator; +}; + +module.exports = pLimit; + + +/***/ }), + +/***/ 89411: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(85622); +const findUp = __webpack_require__(14442); + +const pkgDir = async cwd => { + const filePath = await findUp('package.json', {cwd}); + return filePath && path.dirname(filePath); +}; + +module.exports = pkgDir; + +module.exports.sync = cwd => { + const filePath = findUp.sync('package.json', {cwd}); + return filePath && path.dirname(filePath); +}; + + +/***/ }), + +/***/ 32279: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +module.exports = __webpack_require__(76417).randomBytes + + +/***/ }), + +/***/ 20200: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + + +var randomBytes = __webpack_require__(32279); + +// Generate an internal UID to make the regexp pattern harder to guess. +var UID_LENGTH = 16; +var UID = generateUID(); +var PLACE_HOLDER_REGEXP = new RegExp('(\\\\)?"@__(F|R|D|M|S|A|U|I|B)-' + UID + '-(\\d+)__@"', 'g'); + +var IS_NATIVE_CODE_REGEXP = /\{\s*\[native code\]\s*\}/g; +var IS_PURE_FUNCTION = /function.*?\(/; +var IS_ARROW_FUNCTION = /.*?=>.*?/; +var UNSAFE_CHARS_REGEXP = /[<>\/\u2028\u2029]/g; + +var RESERVED_SYMBOLS = ['*', 'async']; + +// Mapping of unsafe HTML and invalid JavaScript line terminator chars to their +// Unicode char counterparts which are safe to use in JavaScript strings. +var ESCAPED_CHARS = { + '<' : '\\u003C', + '>' : '\\u003E', + '/' : '\\u002F', + '\u2028': '\\u2028', + '\u2029': '\\u2029' +}; + +function escapeUnsafeChars(unsafeChar) { + return ESCAPED_CHARS[unsafeChar]; +} + +function generateUID() { + var bytes = randomBytes(UID_LENGTH); + var result = ''; + for(var i=0; i arg1+5 + if(IS_ARROW_FUNCTION.test(serializedFn)) { + return serializedFn; + } + + var argsStartsAt = serializedFn.indexOf('('); + var def = serializedFn.substr(0, argsStartsAt) + .trim() + .split(' ') + .filter(function(val) { return val.length > 0 }); + + var nonReservedSymbols = def.filter(function(val) { + return RESERVED_SYMBOLS.indexOf(val) === -1 + }); + + // enhanced literal objects, example: {key() {}} + if(nonReservedSymbols.length > 0) { + return (def.indexOf('async') > -1 ? 'async ' : '') + 'function' + + (def.join('').indexOf('*') > -1 ? '*' : '') + + serializedFn.substr(argsStartsAt); + } + + // arrow functions + return serializedFn; + } + + // Check if the parameter is function + if (options.ignoreFunction && typeof obj === "function") { + obj = undefined; + } + // Protects against `JSON.stringify()` returning `undefined`, by serializing + // to the literal string: "undefined". + if (obj === undefined) { + return String(obj); + } + + var str; + + // Creates a JSON string representation of the value. + // NOTE: Node 0.12 goes into slow mode with extra JSON.stringify() args. + if (options.isJSON && !options.space) { + str = JSON.stringify(obj); + } else { + str = JSON.stringify(obj, options.isJSON ? null : replacer, options.space); + } + + // Protects against `JSON.stringify()` returning `undefined`, by serializing + // to the literal string: "undefined". + if (typeof str !== 'string') { + return String(str); + } + + // Replace unsafe HTML and invalid JavaScript line terminator chars with + // their safe Unicode char counterpart. This _must_ happen before the + // regexps and functions are serialized and added back to the string. + if (options.unsafe !== true) { + str = str.replace(UNSAFE_CHARS_REGEXP, escapeUnsafeChars); + } + + if (functions.length === 0 && regexps.length === 0 && dates.length === 0 && maps.length === 0 && sets.length === 0 && arrays.length === 0 && undefs.length === 0 && infinities.length === 0 && bigInts.length === 0) { + return str; + } + + // Replaces all occurrences of function, regexp, date, map and set placeholders in the + // JSON string with their string representations. If the original value can + // not be found, then `undefined` is used. + return str.replace(PLACE_HOLDER_REGEXP, function (match, backSlash, type, valueIndex) { + // The placeholder may not be preceded by a backslash. This is to prevent + // replacing things like `"a\"@__R--0__@"` and thus outputting + // invalid JS. + if (backSlash) { + return match; + } + + if (type === 'D') { + return "new Date(\"" + dates[valueIndex].toISOString() + "\")"; + } + + if (type === 'R') { + return "new RegExp(" + serialize(regexps[valueIndex].source) + ", \"" + regexps[valueIndex].flags + "\")"; + } + + if (type === 'M') { + return "new Map(" + serialize(Array.from(maps[valueIndex].entries()), options) + ")"; + } + + if (type === 'S') { + return "new Set(" + serialize(Array.from(sets[valueIndex].values()), options) + ")"; + } + + if (type === 'A') { + return "Array.prototype.slice.call(" + serialize(Object.assign({ length: arrays[valueIndex].length }, arrays[valueIndex]), options) + ")"; + } + + if (type === 'U') { + return 'undefined' + } + + if (type === 'I') { + return infinities[valueIndex]; + } + + if (type === 'B') { + return "BigInt(\"" + bigInts[valueIndex] + "\")"; + } + + var fn = functions[valueIndex]; + + return serializeFunc(fn); + }); +} + + +/***/ }), + +/***/ 83410: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); +const HookCodeFactory = __webpack_require__(9496); + +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; + + +/***/ }), + +/***/ 39948: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); +const HookCodeFactory = __webpack_require__(9496); + +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; + + +/***/ }), + +/***/ 21531: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); +const HookCodeFactory = __webpack_require__(9496); + +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; + + +/***/ }), + +/***/ 22365: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); +const HookCodeFactory = __webpack_require__(9496); + +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; + + +/***/ }), + +/***/ 62677: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); +const HookCodeFactory = __webpack_require__(9496); + +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; + + +/***/ }), + +/***/ 94897: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); +const HookCodeFactory = __webpack_require__(9496); + +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; + + +/***/ }), + +/***/ 47743: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const util = __webpack_require__(31669); + +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; + + +/***/ }), + +/***/ 9496: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +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; + + +/***/ }), + +/***/ 72689: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const util = __webpack_require__(31669); + +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; + + +/***/ }), + +/***/ 25175: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); + +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; + + +/***/ }), + +/***/ 3508: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); +const HookCodeFactory = __webpack_require__(9496); + +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; + + +/***/ }), + +/***/ 71488: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); +const HookCodeFactory = __webpack_require__(9496); + +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; + + +/***/ }), + +/***/ 25882: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); +const HookCodeFactory = __webpack_require__(9496); + +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; + + +/***/ }), + +/***/ 19027: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const Hook = __webpack_require__(47743); +const HookCodeFactory = __webpack_require__(9496); + +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; + + +/***/ }), + +/***/ 18416: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +exports.__esModule = true; +exports.SyncHook = __webpack_require__(71488); +exports.SyncBailHook = __webpack_require__(3508); +exports.SyncWaterfallHook = __webpack_require__(19027); +exports.SyncLoopHook = __webpack_require__(25882); +exports.AsyncParallelHook = __webpack_require__(39948); +exports.AsyncParallelBailHook = __webpack_require__(83410); +exports.AsyncSeriesHook = __webpack_require__(22365); +exports.AsyncSeriesBailHook = __webpack_require__(21531); +exports.AsyncSeriesLoopHook = __webpack_require__(62677); +exports.AsyncSeriesWaterfallHook = __webpack_require__(94897); +exports.HookMap = __webpack_require__(72689); +exports.MultiHook = __webpack_require__(25175); + + +/***/ }), + +/***/ 16093: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +const plugin = __webpack_require__(71127); + +module.exports = plugin.default; + +/***/ }), + +/***/ 71127: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var path = _interopRequireWildcard(__webpack_require__(85622)); + +var os = _interopRequireWildcard(__webpack_require__(12087)); + +var _sourceMap = __webpack_require__(96241); + +var _schemaUtils = __webpack_require__(79286); + +var _serializeJavascript = _interopRequireDefault(__webpack_require__(20200)); + +var terserPackageJson = _interopRequireWildcard(__webpack_require__(80268)); + +var _pLimit = _interopRequireDefault(__webpack_require__(78193)); + +var _jestWorker = _interopRequireDefault(__webpack_require__(59733)); + +var schema = _interopRequireWildcard(__webpack_require__(88098)); + +var _minify = __webpack_require__(45149); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +/** @typedef {import("schema-utils/declarations/validate").Schema} Schema */ + +/** @typedef {import("webpack").Compiler} Compiler */ + +/** @typedef {import("webpack").Compilation} Compilation */ + +/** @typedef {import("webpack").Rules} Rules */ + +/** @typedef {import("webpack").WebpackError} WebpackError */ + +/** @typedef {import("webpack").Asset} Asset */ + +/** @typedef {import("webpack").AssetInfo} AssetInfo */ + +/** @typedef {import("terser").ECMA} TerserECMA */ + +/** @typedef {import("terser").MinifyOptions} TerserMinifyOptions */ + +/** @typedef {import("jest-worker").default} JestWorker */ + +/** @typedef {import("source-map").RawSourceMap} RawSourceMap */ + +/** @typedef {import("./minify.js").InternalMinifyOptions} InternalMinifyOptions */ + +/** @typedef {import("./minify.js").InternalMinifyResult} InternalMinifyResult */ + +/** @typedef {JestWorker & { transform: (options: string) => InternalMinifyResult, minify: (options: InternalMinifyOptions) => InternalMinifyResult }} MinifyWorker */ + +/** @typedef {Object. | TerserMinifyOptions} MinifyOptions */ + +/** + * @callback ExtractCommentsFunction + * @param {any} astNode + * @param {{ value: string, type: 'comment1' | 'comment2' | 'comment3' | 'comment4', pos: number, line: number, col: number }} comment + * @returns {boolean} + */ + +/** + * @typedef {boolean | string | RegExp | ExtractCommentsFunction} ExtractCommentsCondition + */ + +/** + * @typedef {string | ((fileData: any) => string)} ExtractCommentsFilename + */ + +/** + * @typedef {boolean | string | ((commentsFile: string) => string)} ExtractCommentsBanner + */ + +/** + * @typedef {Object} ExtractCommentsObject + * @property {ExtractCommentsCondition} condition + * @property {ExtractCommentsFilename} filename + * @property {ExtractCommentsBanner} banner + */ + +/** + * @callback CustomMinifyFunction + * @param {Object.} file + * @param {RawSourceMap | undefined} sourceMap + * @param {MinifyOptions} minifyOptions + */ + +/** + * @typedef {ExtractCommentsCondition | ExtractCommentsObject} ExtractCommentsOptions + */ + +/** + * @typedef {Object} TerserPluginOptions + * @property {Rules} [test] + * @property {Rules} [include] + * @property {Rules} [exclude] + * @property {MinifyOptions} [terserOptions] + * @property {ExtractCommentsOptions} [extractComments] + * @property {boolean} [parallel] + * @property {CustomMinifyFunction} [minify] + */ +class TerserPlugin { + /** + * @param {TerserPluginOptions} options + */ + constructor(options = {}) { + (0, _schemaUtils.validate)( + /** @type {Schema} */ + schema, options, { + name: "Terser Plugin", + baseDataPath: "options" + }); + const { + minify, + terserOptions = {}, + test = /\.[cm]?js(\?.*)?$/i, + extractComments = true, + parallel = true, + include, + exclude + } = options; + this.options = { + test, + extractComments, + parallel, + include, + exclude, + minify, + terserOptions + }; + } + /** + * @private + * @param {any} input + * @returns {boolean} + */ + + + static isSourceMap(input) { + // All required options for `new SourceMapConsumer(...options)` + // https://github.com/mozilla/source-map#new-sourcemapconsumerrawsourcemap + return Boolean(input && input.version && input.sources && Array.isArray(input.sources) && typeof input.mappings === "string"); + } + /** + * @private + * @param {Error & { line: number, col: number}} error + * @param {string} file + * @param {Compilation["requestShortener"]} [requestShortener] + * @param {SourceMapConsumer} [sourceMap] + * @returns {WebpackError} + */ + + + static buildError(error, file, requestShortener, sourceMap) { + if (error.line) { + const original = sourceMap && sourceMap.originalPositionFor({ + line: error.line, + column: error.col + }); + + if (original && original.source && requestShortener) { + return new Error(`${file} from Terser\n${error.message} [${requestShortener.shorten(original.source)}:${original.line},${original.column}][${file}:${error.line},${error.col}]${error.stack ? `\n${error.stack.split("\n").slice(1).join("\n")}` : ""}`); + } + + return new Error(`${file} from Terser\n${error.message} [${file}:${error.line},${error.col}]${error.stack ? `\n${error.stack.split("\n").slice(1).join("\n")}` : ""}`); + } + + if (error.stack) { + return new Error(`${file} from Terser\n${error.stack}`); + } + + return new Error(`${file} from Terser\n${error.message}`); + } + /** + * @private + * @param {boolean} parallel + * @returns {number} + */ + + + static getAvailableNumberOfCores(parallel) { + // In some cases cpus() returns undefined + // https://github.com/nodejs/node/issues/19022 + const cpus = os.cpus() || { + length: 1 + }; + return parallel === true ? cpus.length - 1 : Math.min(Number(parallel) || 0, cpus.length - 1); + } + /** + * @param {Compiler} compiler + * @param {Compilation} compilation + * @param {Record} assets + * @param {{availableNumberOfCores: number}} optimizeOptions + * @returns {Promise} + */ + + + async optimize(compiler, compilation, assets, optimizeOptions) { + const cache = compilation.getCache("TerserWebpackPlugin"); + let numberOfAssetsForMinify = 0; + const assetsForMinify = await Promise.all(Object.keys(assets).filter(name => { + const { + info + } = compilation.getAsset(name); + + if ( // Skip double minimize assets from child compilation + info.minimized || // Skip minimizing for extracted comments assets + info.extractedComments) { + return false; + } + + if (!compiler.webpack.ModuleFilenameHelpers.matchObject.bind( // eslint-disable-next-line no-undefined + undefined, this.options)(name)) { + return false; + } + + return true; + }).map(async name => { + const { + info, + source + } = compilation.getAsset(name); + const eTag = cache.getLazyHashedEtag(source); + const cacheItem = cache.getItemCache(name, eTag); + const output = await cacheItem.getPromise(); + + if (!output) { + numberOfAssetsForMinify += 1; + } + + return { + name, + info, + inputSource: source, + output, + cacheItem + }; + })); + /** @type {undefined | (() => MinifyWorker)} */ + + let getWorker; + /** @type {undefined | MinifyWorker} */ + + let initializedWorker; + /** @type {undefined | number} */ + + let numberOfWorkers; + + if (optimizeOptions.availableNumberOfCores > 0) { + // Do not create unnecessary workers when the number of files is less than the available cores, it saves memory + numberOfWorkers = Math.min(numberOfAssetsForMinify, optimizeOptions.availableNumberOfCores); // eslint-disable-next-line consistent-return + + getWorker = () => { + if (initializedWorker) { + return initializedWorker; + } + + initializedWorker = + /** @type {MinifyWorker} */ + new _jestWorker.default(__webpack_require__.ab + "minify.js", { + numWorkers: numberOfWorkers, + enableWorkerThreads: true + }); // https://github.com/facebook/jest/issues/8872#issuecomment-524822081 + + const workerStdout = initializedWorker.getStdout(); + + if (workerStdout) { + workerStdout.on("data", chunk => process.stdout.write(chunk)); + } + + const workerStderr = initializedWorker.getStderr(); + + if (workerStderr) { + workerStderr.on("data", chunk => process.stderr.write(chunk)); + } + + return initializedWorker; + }; + } + + const limit = (0, _pLimit.default)(getWorker && numberOfAssetsForMinify > 0 ? + /** @type {number} */ + numberOfWorkers : Infinity); + const { + SourceMapSource, + ConcatSource, + RawSource + } = compiler.webpack.sources; + const allExtractedComments = new Map(); + const scheduledTasks = []; + + for (const asset of assetsForMinify) { + scheduledTasks.push(limit(async () => { + const { + name, + inputSource, + info, + cacheItem + } = asset; + let { + output + } = asset; + + if (!output) { + let input; + /** @type {RawSourceMap | undefined} */ + + let inputSourceMap; + const { + source: sourceFromInputSource, + map + } = inputSource.sourceAndMap(); + input = sourceFromInputSource; + + if (map) { + if (TerserPlugin.isSourceMap(map)) { + inputSourceMap = + /** @type {RawSourceMap} */ + map; + } else { + inputSourceMap = + /** @type {RawSourceMap} */ + map; + compilation.warnings.push( + /** @type {WebpackError} */ + new Error(`${name} contains invalid source map`)); + } + } + + if (Buffer.isBuffer(input)) { + input = input.toString(); + } + /** @type {InternalMinifyOptions} */ + + + const options = { + name, + input, + inputSourceMap, + minify: this.options.minify, + minifyOptions: { ...this.options.terserOptions + }, + extractComments: this.options.extractComments + }; + + if (typeof options.minifyOptions.module === "undefined") { + if (typeof info.javascriptModule !== "undefined") { + options.minifyOptions.module = info.javascriptModule; + } else if (/\.mjs(\?.*)?$/i.test(name)) { + options.minifyOptions.module = true; + } else if (/\.cjs(\?.*)?$/i.test(name)) { + options.minifyOptions.module = false; + } + } + + try { + output = await (getWorker ? getWorker().transform((0, _serializeJavascript.default)(options)) : (0, _minify.minify)(options)); + } catch (error) { + const hasSourceMap = inputSourceMap && TerserPlugin.isSourceMap(inputSourceMap); + compilation.errors.push(TerserPlugin.buildError(error, name, // eslint-disable-next-line no-undefined + hasSourceMap ? compilation.requestShortener : undefined, hasSourceMap ? new _sourceMap.SourceMapConsumer( + /** @type {RawSourceMap} */ + inputSourceMap) : // eslint-disable-next-line no-undefined + undefined)); + return; + } + + let shebang; + + if ( + /** @type {ExtractCommentsObject} */ + this.options.extractComments.banner !== false && output.extractedComments && output.extractedComments.length > 0 && output.code.startsWith("#!")) { + const firstNewlinePosition = output.code.indexOf("\n"); + shebang = output.code.substring(0, firstNewlinePosition); + output.code = output.code.substring(firstNewlinePosition + 1); + } + + if (output.map) { + output.source = new SourceMapSource(output.code, name, output.map, input, + /** @type {RawSourceMap} */ + inputSourceMap, true); + } else { + output.source = new RawSource(output.code); + } + + if (output.extractedComments && output.extractedComments.length > 0) { + const commentsFilename = + /** @type {ExtractCommentsObject} */ + this.options.extractComments.filename || "[file].LICENSE.txt[query]"; + let query = ""; + let filename = name; + const querySplit = filename.indexOf("?"); + + if (querySplit >= 0) { + query = filename.substr(querySplit); + filename = filename.substr(0, querySplit); + } + + const lastSlashIndex = filename.lastIndexOf("/"); + const basename = lastSlashIndex === -1 ? filename : filename.substr(lastSlashIndex + 1); + const data = { + filename, + basename, + query + }; + output.commentsFilename = compilation.getPath(commentsFilename, data); + let banner; // Add a banner to the original file + + if ( + /** @type {ExtractCommentsObject} */ + this.options.extractComments.banner !== false) { + banner = + /** @type {ExtractCommentsObject} */ + this.options.extractComments.banner || `For license information please see ${path.relative(path.dirname(name), output.commentsFilename).replace(/\\/g, "/")}`; + + if (typeof banner === "function") { + banner = banner(output.commentsFilename); + } + + if (banner) { + output.source = new ConcatSource(shebang ? `${shebang}\n` : "", `/*! ${banner} */\n`, output.source); + } + } + + const extractedCommentsString = output.extractedComments.sort().join("\n\n"); + output.extractedCommentsSource = new RawSource(`${extractedCommentsString}\n`); + } + + await cacheItem.storePromise({ + source: output.source, + commentsFilename: output.commentsFilename, + extractedCommentsSource: output.extractedCommentsSource + }); + } + /** @type {AssetInfo} */ + + + const newInfo = { + minimized: true + }; + const { + source, + extractedCommentsSource + } = output; // Write extracted comments to commentsFilename + + if (extractedCommentsSource) { + const { + commentsFilename + } = output; + newInfo.related = { + license: commentsFilename + }; + allExtractedComments.set(name, { + extractedCommentsSource, + commentsFilename + }); + } + + compilation.updateAsset(name, source, newInfo); + })); + } + + await Promise.all(scheduledTasks); + + if (initializedWorker) { + await initializedWorker.end(); + } + + await Array.from(allExtractedComments).sort().reduce( + /** + * @param {Promise} previousPromise + * @param {any} extractedComments + * @returns {Promise} + */ + async (previousPromise, [from, value]) => { + const previous = await previousPromise; + const { + commentsFilename, + extractedCommentsSource + } = value; + + if (previous && previous.commentsFilename === commentsFilename) { + const { + from: previousFrom, + source: prevSource + } = previous; + const mergedName = `${previousFrom}|${from}`; + const name = `${commentsFilename}|${mergedName}`; + const eTag = [prevSource, extractedCommentsSource].map(item => cache.getLazyHashedEtag(item)).reduce((previousValue, currentValue) => cache.mergeEtags(previousValue, currentValue)); + let source = await cache.getPromise(name, eTag); + + if (!source) { + source = new ConcatSource(Array.from(new Set([...prevSource.source().split("\n\n"), ...extractedCommentsSource.source().split("\n\n")])).join("\n\n")); + await cache.storePromise(name, eTag, source); + } + + compilation.updateAsset(commentsFilename, source); + return { + commentsFilename, + from: mergedName, + source + }; + } + + const existingAsset = compilation.getAsset(commentsFilename); + + if (existingAsset) { + return { + commentsFilename, + from: commentsFilename, + source: existingAsset.source + }; + } + + compilation.emitAsset(commentsFilename, extractedCommentsSource, { + extractedComments: true + }); + return { + commentsFilename, + from, + source: extractedCommentsSource + }; + }, Promise.resolve()); + } + /** + * @private + * @param {any} environment + * @returns {TerserECMA} + */ + + + static getEcmaVersion(environment) { + // ES 6th + if (environment.arrowFunction || environment.const || environment.destructuring || environment.forOf || environment.module) { + return 2015; + } // ES 11th + + + if (environment.bigIntLiteral || environment.dynamicImport) { + return 2020; + } + + return 5; + } + /** + * @param {Compiler} compiler + * @returns {void} + */ + + + apply(compiler) { + const { + output + } = compiler.options; + + if (typeof this.options.terserOptions.ecma === "undefined") { + this.options.terserOptions.ecma = TerserPlugin.getEcmaVersion(output.environment || {}); + } + + const pluginName = this.constructor.name; + const availableNumberOfCores = TerserPlugin.getAvailableNumberOfCores(this.options.parallel); + compiler.hooks.compilation.tap(pluginName, compilation => { + const hooks = compiler.webpack.javascript.JavascriptModulesPlugin.getCompilationHooks(compilation); + const data = (0, _serializeJavascript.default)({ + terser: terserPackageJson.version, + terserOptions: this.options.terserOptions + }); + hooks.chunkHash.tap(pluginName, (chunk, hash) => { + hash.update("TerserPlugin"); + hash.update(data); + }); + compilation.hooks.processAssets.tapPromise({ + name: pluginName, + stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE, + additionalAssets: true + }, assets => this.optimize(compiler, compilation, assets, { + availableNumberOfCores + })); + compilation.hooks.statsPrinter.tap(pluginName, stats => { + stats.hooks.print.for("asset.info.minimized").tap("terser-webpack-plugin", (minimized, { + green, + formatFlag + }) => // eslint-disable-next-line no-undefined + minimized ? green(formatFlag("minimized")) : undefined); + }); + }); + } + +} + +var _default = TerserPlugin; +exports.default = _default; + +/***/ }), + +/***/ 45149: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* module decorator */ module = __webpack_require__.nmd(module); + + +const { + minify: terserMinify +} = __webpack_require__(54775); +/** @typedef {import("source-map").RawSourceMap} RawSourceMap */ + +/** @typedef {import("./index.js").ExtractCommentsOptions} ExtractCommentsOptions */ + +/** @typedef {import("./index.js").CustomMinifyFunction} CustomMinifyFunction */ + +/** @typedef {import("./index.js").MinifyOptions} MinifyOptions */ + +/** @typedef {import("terser").MinifyOptions} TerserMinifyOptions */ + +/** @typedef {import("terser").MinifyOutput} MinifyOutput */ + +/** @typedef {import("terser").FormatOptions} FormatOptions */ + +/** @typedef {import("terser").MangleOptions} MangleOptions */ + +/** @typedef {import("./index.js").ExtractCommentsFunction} ExtractCommentsFunction */ + +/** @typedef {import("./index.js").ExtractCommentsCondition} ExtractCommentsCondition */ + +/** + * @typedef {Object} InternalMinifyOptions + * @property {string} name + * @property {string} input + * @property {RawSourceMap | undefined} inputSourceMap + * @property {ExtractCommentsOptions} extractComments + * @property {CustomMinifyFunction | undefined} minify + * @property {MinifyOptions} minifyOptions + */ + +/** + * @typedef {Array} ExtractedComments + */ + +/** + * @typedef {Promise} InternalMinifyResult + */ + +/** + * @typedef {TerserMinifyOptions & { sourceMap: undefined } & ({ output: FormatOptions & { beautify: boolean } } | { format: FormatOptions & { beautify: boolean } })} NormalizedTerserMinifyOptions + */ + +/** + * @param {TerserMinifyOptions} [terserOptions={}] + * @returns {NormalizedTerserMinifyOptions} + */ + + +function buildTerserOptions(terserOptions = {}) { + return { ...terserOptions, + mangle: terserOptions.mangle == null ? true : typeof terserOptions.mangle === "boolean" ? terserOptions.mangle : { ...terserOptions.mangle + }, + // Ignoring sourceMap from options + // eslint-disable-next-line no-undefined + sourceMap: undefined, + // the `output` option is deprecated + ...(terserOptions.format ? { + format: { + beautify: false, + ...terserOptions.format + } + } : { + output: { + beautify: false, + ...terserOptions.output + } + }) + }; +} +/** + * @param {any} value + * @returns {boolean} + */ + + +function isObject(value) { + const type = typeof value; + return value != null && (type === "object" || type === "function"); +} +/** + * @param {ExtractCommentsOptions} extractComments + * @param {NormalizedTerserMinifyOptions} terserOptions + * @param {ExtractedComments} extractedComments + * @returns {ExtractCommentsFunction} + */ + + +function buildComments(extractComments, terserOptions, extractedComments) { + /** @type {{ [index: string]: ExtractCommentsCondition }} */ + const condition = {}; + let comments; + + if (terserOptions.format) { + ({ + comments + } = terserOptions.format); + } else if (terserOptions.output) { + ({ + comments + } = terserOptions.output); + } + + condition.preserve = typeof comments !== "undefined" ? comments : false; + + if (typeof extractComments === "boolean" && extractComments) { + condition.extract = "some"; + } else if (typeof extractComments === "string" || extractComments instanceof RegExp) { + condition.extract = extractComments; + } else if (typeof extractComments === "function") { + condition.extract = extractComments; + } else if (extractComments && isObject(extractComments)) { + condition.extract = typeof extractComments.condition === "boolean" && extractComments.condition ? "some" : typeof extractComments.condition !== "undefined" ? extractComments.condition : "some"; + } else { + // No extract + // Preserve using "commentsOpts" or "some" + condition.preserve = typeof comments !== "undefined" ? comments : "some"; + condition.extract = false; + } // Ensure that both conditions are functions + + + ["preserve", "extract"].forEach(key => { + /** @type {undefined | string} */ + let regexStr; + /** @type {undefined | RegExp} */ + + let regex; + + switch (typeof condition[key]) { + case "boolean": + condition[key] = condition[key] ? () => true : () => false; + break; + + case "function": + break; + + case "string": + if (condition[key] === "all") { + condition[key] = () => true; + + break; + } + + if (condition[key] === "some") { + condition[key] = + /** @type {ExtractCommentsFunction} */ + (astNode, comment) => (comment.type === "comment2" || comment.type === "comment1") && /@preserve|@lic|@cc_on|^\**!/i.test(comment.value); + + break; + } + + regexStr = + /** @type {string} */ + condition[key]; + + condition[key] = + /** @type {ExtractCommentsFunction} */ + (astNode, comment) => new RegExp( + /** @type {string} */ + regexStr).test(comment.value); + + break; + + default: + regex = + /** @type {RegExp} */ + condition[key]; + + condition[key] = + /** @type {ExtractCommentsFunction} */ + (astNode, comment) => + /** @type {RegExp} */ + regex.test(comment.value); + + } + }); // Redefine the comments function to extract and preserve + // comments according to the two conditions + + return (astNode, comment) => { + if ( + /** @type {{ extract: ExtractCommentsFunction }} */ + condition.extract(astNode, comment)) { + const commentText = comment.type === "comment2" ? `/*${comment.value}*/` : `//${comment.value}`; // Don't include duplicate comments + + if (!extractedComments.includes(commentText)) { + extractedComments.push(commentText); + } + } + + return ( + /** @type {{ preserve: ExtractCommentsFunction }} */ + condition.preserve(astNode, comment) + ); + }; +} +/** + * @param {InternalMinifyOptions} options + * @returns {InternalMinifyResult} + */ + + +async function minify(options) { + const { + name, + input, + inputSourceMap, + minify: minifyFn, + minifyOptions + } = options; + + if (minifyFn) { + return minifyFn({ + [name]: input + }, inputSourceMap, minifyOptions); + } // Copy terser options + + + const terserOptions = buildTerserOptions(minifyOptions); // Let terser generate a SourceMap + + if (inputSourceMap) { + // @ts-ignore + terserOptions.sourceMap = { + asObject: true + }; + } + /** @type {ExtractedComments} */ + + + const extractedComments = []; + const { + extractComments + } = options; + + if (terserOptions.output) { + terserOptions.output.comments = buildComments(extractComments, terserOptions, extractedComments); + } else if (terserOptions.format) { + terserOptions.format.comments = buildComments(extractComments, terserOptions, extractedComments); + } + + const result = await terserMinify({ + [name]: input + }, terserOptions); + return { ...result, + extractedComments + }; +} +/** + * @param {string} options + * @returns {InternalMinifyResult} + */ + + +function transform(options) { + // 'use strict' => this === undefined (Clean Scope) + // Safer for possible security issues, albeit not critical at all here + // eslint-disable-next-line no-param-reassign + const evaluatedOptions = + /** @type {InternalMinifyOptions} */ + // eslint-disable-next-line no-new-func + new Function("exports", "require", "module", "__filename", "__dirname", `'use strict'\nreturn ${options}`)(exports, require, module, __filename, __dirname); + return minify(evaluatedOptions); +} + +module.exports.minify = minify; +module.exports.transform = transform; + +/***/ }), + +/***/ 7960: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "__extends": function() { return /* binding */ __extends; }, +/* harmony export */ "__assign": function() { return /* binding */ __assign; }, +/* harmony export */ "__rest": function() { return /* binding */ __rest; }, +/* harmony export */ "__decorate": function() { return /* binding */ __decorate; }, +/* harmony export */ "__param": function() { return /* binding */ __param; }, +/* harmony export */ "__metadata": function() { return /* binding */ __metadata; }, +/* harmony export */ "__awaiter": function() { return /* binding */ __awaiter; }, +/* harmony export */ "__generator": function() { return /* binding */ __generator; }, +/* harmony export */ "__createBinding": function() { return /* binding */ __createBinding; }, +/* harmony export */ "__exportStar": function() { return /* binding */ __exportStar; }, +/* harmony export */ "__values": function() { return /* binding */ __values; }, +/* harmony export */ "__read": function() { return /* binding */ __read; }, +/* harmony export */ "__spread": function() { return /* binding */ __spread; }, +/* harmony export */ "__spreadArrays": function() { return /* binding */ __spreadArrays; }, +/* harmony export */ "__await": function() { return /* binding */ __await; }, +/* harmony export */ "__asyncGenerator": function() { return /* binding */ __asyncGenerator; }, +/* harmony export */ "__asyncDelegator": function() { return /* binding */ __asyncDelegator; }, +/* harmony export */ "__asyncValues": function() { return /* binding */ __asyncValues; }, +/* harmony export */ "__makeTemplateObject": function() { return /* binding */ __makeTemplateObject; }, +/* harmony export */ "__importStar": function() { return /* binding */ __importStar; }, +/* harmony export */ "__importDefault": function() { return /* binding */ __importDefault; }, +/* harmony export */ "__classPrivateFieldGet": function() { return /* binding */ __classPrivateFieldGet; }, +/* harmony export */ "__classPrivateFieldSet": function() { return /* binding */ __classPrivateFieldSet; } +/* harmony export */ }); +/*! ***************************************************************************** +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. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +function __createBinding(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +} + +function __exportStar(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} + + +/***/ }), + +/***/ 87865: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const EventEmitter = __webpack_require__(28614).EventEmitter; +const fs = __webpack_require__(88715); +const path = __webpack_require__(85622); + +const watchEventSource = __webpack_require__(28452); + +const EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({}); + +let FS_ACCURACY = 1000; + +const IS_OSX = __webpack_require__(12087).platform() === "darwin"; +const WATCHPACK_POLLING = process.env.WATCHPACK_POLLING; +const FORCE_POLLING = + `${+WATCHPACK_POLLING}` === WATCHPACK_POLLING + ? +WATCHPACK_POLLING + : !!WATCHPACK_POLLING && WATCHPACK_POLLING !== "false"; + +function withoutCase(str) { + return str.toLowerCase(); +} + +function needCalls(times, callback) { + return function() { + if (--times === 0) { + return callback(); + } + }; +} + +class Watcher extends EventEmitter { + constructor(directoryWatcher, filePath, startTime) { + super(); + this.directoryWatcher = directoryWatcher; + this.path = filePath; + this.startTime = startTime && +startTime; + this._cachedTimeInfoEntries = undefined; + } + + checkStartTime(mtime, initial) { + const startTime = this.startTime; + if (typeof startTime !== "number") return !initial; + return startTime <= mtime; + } + + close() { + this.emit("closed"); + } +} + +class DirectoryWatcher extends EventEmitter { + constructor(watcherManager, directoryPath, options) { + super(); + if (FORCE_POLLING) { + options.poll = FORCE_POLLING; + } + this.watcherManager = watcherManager; + this.options = options; + this.path = directoryPath; + // safeTime is the point in time after which reading is safe to be unchanged + // timestamp is a value that should be compared with another timestamp (mtime) + /** @type {Map} */ + this.filesWithoutCase = new Map(); + this.directories = new Map(); + this.lastWatchEvent = 0; + this.initialScan = true; + this.ignored = options.ignored; + this.nestedWatching = false; + this.polledWatching = + typeof options.poll === "number" + ? options.poll + : options.poll + ? 5007 + : false; + this.timeout = undefined; + this.initialScanRemoved = new Set(); + this.initialScanFinished = undefined; + /** @type {Map>} */ + this.watchers = new Map(); + this.parentWatcher = null; + this.refs = 0; + this._activeEvents = new Map(); + this.closed = false; + this.scanning = false; + this.scanAgain = false; + this.scanAgainInitial = false; + + this.createWatcher(); + this.doScan(true); + } + + checkIgnore(path) { + if (!this.ignored) return false; + path = path.replace(/\\/g, "/"); + return this.ignored.test(path); + } + + createWatcher() { + try { + if (this.polledWatching) { + this.watcher = { + close: () => { + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = undefined; + } + } + }; + } else { + if (IS_OSX) { + this.watchInParentDirectory(); + } + this.watcher = watchEventSource.watch(this.path); + this.watcher.on("change", this.onWatchEvent.bind(this)); + this.watcher.on("error", this.onWatcherError.bind(this)); + } + } catch (err) { + this.onWatcherError(err); + } + } + + forEachWatcher(path, fn) { + const watchers = this.watchers.get(withoutCase(path)); + if (watchers !== undefined) { + for (const w of watchers) { + fn(w); + } + } + } + + setMissing(itemPath, initial, type) { + this._cachedTimeInfoEntries = undefined; + + if (this.initialScan) { + this.initialScanRemoved.add(itemPath); + } + + const oldDirectory = this.directories.get(itemPath); + if (oldDirectory) { + if (this.nestedWatching) oldDirectory.close(); + this.directories.delete(itemPath); + + this.forEachWatcher(itemPath, w => w.emit("remove", type)); + if (!initial) { + this.forEachWatcher(this.path, w => + w.emit("change", itemPath, null, type, initial) + ); + } + } + + const oldFile = this.files.get(itemPath); + if (oldFile) { + this.files.delete(itemPath); + const key = withoutCase(itemPath); + const count = this.filesWithoutCase.get(key) - 1; + if (count <= 0) { + this.filesWithoutCase.delete(key); + this.forEachWatcher(itemPath, w => w.emit("remove", type)); + } else { + this.filesWithoutCase.set(key, count); + } + + if (!initial) { + this.forEachWatcher(this.path, w => + w.emit("change", itemPath, null, type, initial) + ); + } + } + } + + setFileTime(filePath, mtime, initial, ignoreWhenEqual, type) { + const now = Date.now(); + + if (this.checkIgnore(filePath)) return; + + const old = this.files.get(filePath); + + let safeTime, accuracy; + if (initial) { + safeTime = Math.min(now, mtime) + FS_ACCURACY; + accuracy = FS_ACCURACY; + } else { + safeTime = now; + accuracy = 0; + + if (old && old.timestamp === mtime && mtime + FS_ACCURACY < now - 1000) { + // We are sure that mtime is untouched + // This can be caused by some file attribute change + // e. g. when access time has been changed + // but the file content is untouched + return; + } + } + + if (ignoreWhenEqual && old && old.timestamp === mtime) return; + + this.files.set(filePath, { + safeTime, + accuracy, + timestamp: mtime + }); + this._cachedTimeInfoEntries = undefined; + + if (!old) { + const key = withoutCase(filePath); + const count = this.filesWithoutCase.get(key); + this.filesWithoutCase.set(key, (count || 0) + 1); + if (count !== undefined) { + // There is already a file with case-insensitive-equal name + // On a case-insensitive filesystem we may miss the renaming + // when only casing is changed. + // To be sure that our information is correct + // we trigger a rescan here + this.doScan(false); + } + + this.forEachWatcher(filePath, w => { + if (!initial || w.checkStartTime(safeTime, initial)) { + w.emit("change", mtime, type); + } + }); + } else if (!initial) { + this.forEachWatcher(filePath, w => w.emit("change", mtime, type)); + } + this.forEachWatcher(this.path, w => { + if (!initial || w.checkStartTime(safeTime, initial)) { + w.emit("change", filePath, safeTime, type, initial); + } + }); + } + + setDirectory(directoryPath, birthtime, initial, type) { + if (this.checkIgnore(directoryPath)) return; + if (directoryPath === this.path) { + if (!initial) { + this.forEachWatcher(this.path, w => + w.emit("change", directoryPath, birthtime, type, initial) + ); + } + } else { + const old = this.directories.get(directoryPath); + if (!old) { + const now = Date.now(); + + this._cachedTimeInfoEntries = undefined; + if (this.nestedWatching) { + this.createNestedWatcher(directoryPath); + } else { + this.directories.set(directoryPath, true); + } + + let safeTime; + if (initial) { + safeTime = Math.min(now, birthtime) + FS_ACCURACY; + } else { + safeTime = now; + } + + this.forEachWatcher(directoryPath, w => { + if (!initial || w.checkStartTime(safeTime, false)) { + w.emit("change", birthtime, type); + } + }); + this.forEachWatcher(this.path, w => { + if (!initial || w.checkStartTime(safeTime, initial)) { + w.emit("change", directoryPath, safeTime, type, initial); + } + }); + } + } + } + + createNestedWatcher(directoryPath) { + const watcher = this.watcherManager.watchDirectory(directoryPath, 1); + watcher.on("change", (filePath, mtime, type, initial) => { + this._cachedTimeInfoEntries = undefined; + this.forEachWatcher(this.path, w => { + if (!initial || w.checkStartTime(mtime, initial)) { + w.emit("change", filePath, mtime, type, initial); + } + }); + }); + this.directories.set(directoryPath, watcher); + } + + setNestedWatching(flag) { + if (this.nestedWatching !== !!flag) { + this.nestedWatching = !!flag; + this._cachedTimeInfoEntries = undefined; + if (this.nestedWatching) { + for (const directory of this.directories.keys()) { + this.createNestedWatcher(directory); + } + } else { + for (const [directory, watcher] of this.directories) { + watcher.close(); + this.directories.set(directory, true); + } + } + } + } + + watch(filePath, startTime) { + const key = withoutCase(filePath); + let watchers = this.watchers.get(key); + if (watchers === undefined) { + watchers = new Set(); + this.watchers.set(key, watchers); + } + this.refs++; + const watcher = new Watcher(this, filePath, startTime); + watcher.on("closed", () => { + if (--this.refs <= 0) { + this.close(); + return; + } + watchers.delete(watcher); + if (watchers.size === 0) { + this.watchers.delete(key); + if (this.path === filePath) this.setNestedWatching(false); + } + }); + watchers.add(watcher); + let safeTime; + if (filePath === this.path) { + this.setNestedWatching(true); + safeTime = this.lastWatchEvent; + for (const entry of this.files.values()) { + fixupEntryAccuracy(entry); + safeTime = Math.max(safeTime, entry.safeTime); + } + } else { + const entry = this.files.get(filePath); + if (entry) { + fixupEntryAccuracy(entry); + safeTime = entry.safeTime; + } else { + safeTime = 0; + } + } + if (safeTime) { + if (safeTime >= startTime) { + process.nextTick(() => { + if (this.closed) return; + if (filePath === this.path) { + watcher.emit( + "change", + filePath, + safeTime, + "watch (outdated on attach)", + true + ); + } else { + watcher.emit( + "change", + safeTime, + "watch (outdated on attach)", + true + ); + } + }); + } + } else if (this.initialScan) { + if (this.initialScanRemoved.has(filePath)) { + process.nextTick(() => { + if (this.closed) return; + watcher.emit("remove"); + }); + } + } else if ( + !this.directories.has(filePath) && + watcher.checkStartTime(this.initialScanFinished, false) + ) { + process.nextTick(() => { + if (this.closed) return; + watcher.emit("initial-missing", "watch (missing on attach)"); + }); + } + return watcher; + } + + onWatchEvent(eventType, filename) { + if (this.closed) return; + if (!filename) { + // In some cases no filename is provided + // This seem to happen on windows + // So some event happened but we don't know which file is affected + // We have to do a full scan of the directory + this.doScan(false); + return; + } + + const filePath = path.join(this.path, filename); + if (this.checkIgnore(filePath)) return; + + if (this._activeEvents.get(filename) === undefined) { + this._activeEvents.set(filename, false); + const checkStats = () => { + if (this.closed) return; + this._activeEvents.set(filename, false); + fs.lstat(filePath, (err, stats) => { + if (this.closed) return; + if (this._activeEvents.get(filename) === true) { + process.nextTick(checkStats); + return; + } + this._activeEvents.delete(filename); + // ENOENT happens when the file/directory doesn't exist + // EPERM happens when the containing directory doesn't exist + if (err) { + if ( + err.code !== "ENOENT" && + err.code !== "EPERM" && + err.code !== "EBUSY" + ) { + this.onStatsError(err); + } else { + if (filename === path.basename(this.path)) { + // This may indicate that the directory itself was removed + if (!fs.existsSync(this.path)) { + this.onDirectoryRemoved("stat failed"); + } + } + } + } + this.lastWatchEvent = Date.now(); + this._cachedTimeInfoEntries = undefined; + if (!stats) { + this.setMissing(filePath, false, eventType); + } else if (stats.isDirectory()) { + this.setDirectory( + filePath, + +stats.birthtime || 1, + false, + eventType + ); + } else if (stats.isFile() || stats.isSymbolicLink()) { + if (stats.mtime) { + ensureFsAccuracy(stats.mtime); + } + this.setFileTime( + filePath, + +stats.mtime || +stats.ctime || 1, + false, + false, + eventType + ); + } + }); + }; + process.nextTick(checkStats); + } else { + this._activeEvents.set(filename, true); + } + } + + onWatcherError(err) { + if (this.closed) return; + if (err) { + if (err.code !== "EPERM" && err.code !== "ENOENT") { + console.error("Watchpack Error (watcher): " + err); + } + this.onDirectoryRemoved("watch error"); + } + } + + onStatsError(err) { + if (err) { + console.error("Watchpack Error (stats): " + err); + } + } + + onScanError(err) { + if (err) { + console.error("Watchpack Error (initial scan): " + err); + } + this.onScanFinished(); + } + + onScanFinished() { + if (this.polledWatching) { + this.timeout = setTimeout(() => { + if (this.closed) return; + this.doScan(false); + }, this.polledWatching); + } + } + + onDirectoryRemoved(reason) { + if (this.watcher) { + this.watcher.close(); + this.watcher = null; + } + this.watchInParentDirectory(); + const type = `directory-removed (${reason})`; + for (const directory of this.directories.keys()) { + this.setMissing(directory, null, type); + } + for (const file of this.files.keys()) { + this.setMissing(file, null, type); + } + } + + watchInParentDirectory() { + if (!this.parentWatcher) { + const parentDir = path.dirname(this.path); + // avoid watching in the root directory + // removing directories in the root directory is not supported + if (path.dirname(parentDir) === parentDir) return; + + this.parentWatcher = this.watcherManager.watchFile(this.path, 1); + this.parentWatcher.on("change", (mtime, type) => { + if (this.closed) return; + + // On non-osx platforms we don't need this watcher to detect + // directory removal, as an EPERM error indicates that + if ((!IS_OSX || this.polledWatching) && this.parentWatcher) { + this.parentWatcher.close(); + this.parentWatcher = null; + } + // Try to create the watcher when parent directory is found + if (!this.watcher) { + this.createWatcher(); + this.doScan(false); + + // directory was created so we emit an event + this.forEachWatcher(this.path, w => + w.emit("change", this.path, mtime, type, false) + ); + } + }); + this.parentWatcher.on("remove", () => { + this.onDirectoryRemoved("parent directory removed"); + }); + } + } + + doScan(initial) { + if (this.scanning) { + if (this.scanAgain) { + if (!initial) this.scanAgainInitial = false; + } else { + this.scanAgain = true; + this.scanAgainInitial = initial; + } + return; + } + this.scanning = true; + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = undefined; + } + process.nextTick(() => { + if (this.closed) return; + fs.readdir(this.path, (err, items) => { + if (this.closed) return; + if (err) { + if (err.code === "ENOENT" || err.code === "EPERM") { + this.onDirectoryRemoved("scan readdir failed"); + } else { + this.onScanError(err); + } + this.initialScan = false; + this.initialScanFinished = Date.now(); + if (initial) { + for (const watchers of this.watchers.values()) { + for (const watcher of watchers) { + if (watcher.checkStartTime(this.initialScanFinished, false)) { + watcher.emit( + "initial-missing", + "scan (parent directory missing in initial scan)" + ); + } + } + } + } + if (this.scanAgain) { + this.scanAgain = false; + this.doScan(this.scanAgainInitial); + } else { + this.scanning = false; + } + return; + } + const itemPaths = new Set( + items.map(item => path.join(this.path, item.normalize("NFC"))) + ); + for (const file of this.files.keys()) { + if (!itemPaths.has(file)) { + this.setMissing(file, initial, "scan (missing)"); + } + } + for (const directory of this.directories.keys()) { + if (!itemPaths.has(directory)) { + this.setMissing(directory, initial, "scan (missing)"); + } + } + if (this.scanAgain) { + // Early repeat of scan + this.scanAgain = false; + this.doScan(initial); + return; + } + const itemFinished = needCalls(itemPaths.size + 1, () => { + if (this.closed) return; + this.initialScan = false; + this.initialScanRemoved = null; + this.initialScanFinished = Date.now(); + if (initial) { + const missingWatchers = new Map(this.watchers); + missingWatchers.delete(withoutCase(this.path)); + for (const item of itemPaths) { + missingWatchers.delete(withoutCase(item)); + } + for (const watchers of missingWatchers.values()) { + for (const watcher of watchers) { + if (watcher.checkStartTime(this.initialScanFinished, false)) { + watcher.emit( + "initial-missing", + "scan (missing in initial scan)" + ); + } + } + } + } + if (this.scanAgain) { + this.scanAgain = false; + this.doScan(this.scanAgainInitial); + } else { + this.scanning = false; + this.onScanFinished(); + } + }); + for (const itemPath of itemPaths) { + fs.lstat(itemPath, (err2, stats) => { + if (this.closed) return; + if (err2) { + if ( + err2.code === "ENOENT" || + err2.code === "EPERM" || + err2.code === "EBUSY" + ) { + this.setMissing(itemPath, initial, "scan (" + err2.code + ")"); + } else { + this.onScanError(err2); + } + itemFinished(); + return; + } + if (stats.isFile() || stats.isSymbolicLink()) { + if (stats.mtime) { + ensureFsAccuracy(stats.mtime); + } + this.setFileTime( + itemPath, + +stats.mtime || +stats.ctime || 1, + initial, + true, + "scan (file)" + ); + } else if (stats.isDirectory()) { + if (!initial || !this.directories.has(itemPath)) + this.setDirectory( + itemPath, + +stats.birthtime || 1, + initial, + "scan (dir)" + ); + } + itemFinished(); + }); + } + itemFinished(); + }); + }); + } + + getTimes() { + const obj = Object.create(null); + let safeTime = this.lastWatchEvent; + for (const [file, entry] of this.files) { + fixupEntryAccuracy(entry); + safeTime = Math.max(safeTime, entry.safeTime); + obj[file] = Math.max(entry.safeTime, entry.timestamp); + } + if (this.nestedWatching) { + for (const w of this.directories.values()) { + const times = w.directoryWatcher.getTimes(); + for (const file of Object.keys(times)) { + const time = times[file]; + safeTime = Math.max(safeTime, time); + obj[file] = time; + } + } + obj[this.path] = safeTime; + } + if (!this.initialScan) { + for (const watchers of this.watchers.values()) { + for (const watcher of watchers) { + const path = watcher.path; + if (!Object.prototype.hasOwnProperty.call(obj, path)) { + obj[path] = null; + } + } + } + } + return obj; + } + + getTimeInfoEntries() { + if (this._cachedTimeInfoEntries !== undefined) + return this._cachedTimeInfoEntries; + const map = new Map(); + let safeTime = this.lastWatchEvent; + for (const [file, entry] of this.files) { + fixupEntryAccuracy(entry); + safeTime = Math.max(safeTime, entry.safeTime); + map.set(file, entry); + } + if (this.nestedWatching) { + for (const w of this.directories.values()) { + const timeInfoEntries = w.directoryWatcher.getTimeInfoEntries(); + for (const [file, entry] of timeInfoEntries) { + if (entry) { + safeTime = Math.max(safeTime, entry.safeTime); + } + map.set(file, entry); + } + } + map.set(this.path, { + safeTime + }); + } else { + for (const dir of this.directories.keys()) { + // No additional info about this directory + map.set(dir, EXISTANCE_ONLY_TIME_ENTRY); + } + map.set(this.path, EXISTANCE_ONLY_TIME_ENTRY); + } + if (!this.initialScan) { + for (const watchers of this.watchers.values()) { + for (const watcher of watchers) { + const path = watcher.path; + if (!map.has(path)) { + map.set(path, null); + } + } + } + this._cachedTimeInfoEntries = map; + } + return map; + } + + close() { + this.closed = true; + this.initialScan = false; + if (this.watcher) { + this.watcher.close(); + this.watcher = null; + } + if (this.nestedWatching) { + for (const w of this.directories.values()) { + w.close(); + } + this.directories.clear(); + } + if (this.parentWatcher) { + this.parentWatcher.close(); + this.parentWatcher = null; + } + this.emit("closed"); + } +} + +module.exports = DirectoryWatcher; +module.exports.EXISTANCE_ONLY_TIME_ENTRY = EXISTANCE_ONLY_TIME_ENTRY; + +function fixupEntryAccuracy(entry) { + if (entry.accuracy > FS_ACCURACY) { + entry.safeTime = entry.safeTime - entry.accuracy + FS_ACCURACY; + entry.accuracy = FS_ACCURACY; + } +} + +function ensureFsAccuracy(mtime) { + if (!mtime) return; + if (FS_ACCURACY > 1 && mtime % 1 !== 0) FS_ACCURACY = 1; + else if (FS_ACCURACY > 10 && mtime % 10 !== 0) FS_ACCURACY = 10; + else if (FS_ACCURACY > 100 && mtime % 100 !== 0) FS_ACCURACY = 100; +} + + +/***/ }), + +/***/ 63766: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const fs = __webpack_require__(35747); +const path = __webpack_require__(85622); + +const EXPECTED_ERRORS = new Set( + process.platform === "win32" ? ["EINVAL", "ENOENT", "UNKNOWN"] : ["EINVAL"] +); + +class LinkResolver { + constructor() { + this.cache = new Map(); + } + + /** + * @param {string} file path to file or directory + * @returns {string[]} array of file and all symlinks contributed in the resolving process (first item is the resolved file) + */ + resolve(file) { + const cacheEntry = this.cache.get(file); + if (cacheEntry !== undefined) { + return cacheEntry; + } + const parent = path.dirname(file); + if (parent === file) { + // At root of filesystem there can't be a link + const result = Object.freeze([file]); + this.cache.set(file, result); + return result; + } + // resolve the parent directory to find links there and get the real path + const parentResolved = this.resolve(parent); + let realFile = file; + + // is the parent directory really somewhere else? + if (parentResolved[0] !== parent) { + // get the real location of file + const basename = path.basename(file); + realFile = path.resolve(parentResolved[0], basename); + } + // try to read the link content + try { + const linkContent = fs.readlinkSync(realFile); + + // resolve the link content relative to the parent directory + const resolvedLink = path.resolve(parentResolved[0], linkContent); + + // recursive resolve the link content for more links in the structure + const linkResolved = this.resolve(resolvedLink); + + // merge parent and link resolve results + let result; + if (linkResolved.length > 1 && parentResolved.length > 1) { + // when both contain links we need to duplicate them with a Set + const resultSet = new Set(linkResolved); + // add the link + resultSet.add(realFile); + // add all symlinks of the parent + for (let i = 1; i < parentResolved.length; i++) { + resultSet.add(parentResolved[i]); + } + result = Object.freeze(Array.from(resultSet)); + } else if (parentResolved.length > 1) { + // we have links in the parent but not for the link content location + result = parentResolved.slice(); + result[0] = linkResolved[0]; + // add the link + result.push(realFile); + Object.freeze(result); + } else if (linkResolved.length > 1) { + // we can return the link content location result + result = linkResolved.slice(); + // add the link + result.push(realFile); + Object.freeze(result); + } else { + // neither link content location nor parent have links + // this link is the only link here + result = Object.freeze([ + // the resolve real location + linkResolved[0], + // add the link + realFile + ]); + } + this.cache.set(file, result); + return result; + } catch (e) { + if (!EXPECTED_ERRORS.has(e.code)) { + throw e; + } + // no link + const result = parentResolved.slice(); + result[0] = realFile; + Object.freeze(result); + this.cache.set(file, result); + return result; + } + } +} +module.exports = LinkResolver; + + +/***/ }), + +/***/ 78243: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); +const DirectoryWatcher = __webpack_require__(87865); + +class WatcherManager { + constructor(options) { + this.options = options; + this.directoryWatchers = new Map(); + } + + getDirectoryWatcher(directory) { + const watcher = this.directoryWatchers.get(directory); + if (watcher === undefined) { + const newWatcher = new DirectoryWatcher(this, directory, this.options); + this.directoryWatchers.set(directory, newWatcher); + newWatcher.on("closed", () => { + this.directoryWatchers.delete(directory); + }); + return newWatcher; + } + return watcher; + } + + watchFile(p, startTime) { + const directory = path.dirname(p); + if (directory === p) return null; + return this.getDirectoryWatcher(directory).watch(p, startTime); + } + + watchDirectory(directory, startTime) { + return this.getDirectoryWatcher(directory).watch(directory, startTime); + } +} + +const watcherManagers = new WeakMap(); +/** + * @param {object} options options + * @returns {WatcherManager} the watcher manager + */ +module.exports = options => { + const watcherManager = watcherManagers.get(options); + if (watcherManager !== undefined) return watcherManager; + const newWatcherManager = new WatcherManager(options); + watcherManagers.set(options, newWatcherManager); + return newWatcherManager; +}; +module.exports.WatcherManager = WatcherManager; + + +/***/ }), + +/***/ 14434: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const path = __webpack_require__(85622); + +/** + * @template T + * @typedef {Object} TreeNode + * @property {string} filePath + * @property {TreeNode} parent + * @property {TreeNode[]} children + * @property {number} entries + * @property {boolean} active + * @property {T[] | T | undefined} value + */ + +/** + * @template T + * @param {Map>} the new plan + */ +module.exports = (plan, limit) => { + const treeMap = new Map(); + // Convert to tree + for (const [filePath, value] of plan) { + treeMap.set(filePath, { + filePath, + parent: undefined, + children: undefined, + entries: 1, + active: true, + value + }); + } + let currentCount = treeMap.size; + // Create parents and calculate sum of entries + for (const node of treeMap.values()) { + const parentPath = path.dirname(node.filePath); + if (parentPath !== node.filePath) { + let parent = treeMap.get(parentPath); + if (parent === undefined) { + parent = { + filePath: parentPath, + parent: undefined, + children: [node], + entries: node.entries, + active: false, + value: undefined + }; + treeMap.set(parentPath, parent); + node.parent = parent; + } else { + node.parent = parent; + if (parent.children === undefined) { + parent.children = [node]; + } else { + parent.children.push(node); + } + do { + parent.entries += node.entries; + parent = parent.parent; + } while (parent); + } + } + } + // Reduce until limit reached + while (currentCount > limit) { + // Select node that helps reaching the limit most effectively without overmerging + const overLimit = currentCount - limit; + let bestNode = undefined; + let bestCost = Infinity; + for (const node of treeMap.values()) { + if (node.entries <= 1 || !node.children || !node.parent) continue; + if (node.children.length === 0) continue; + if (node.children.length === 1 && !node.value) continue; + // Try to select the node with has just a bit more entries than we need to reduce + // When just a bit more is over 30% over the limit, + // also consider just a bit less entries then we need to reduce + const cost = + node.entries - 1 >= overLimit + ? node.entries - 1 - overLimit + : overLimit - node.entries + 1 + limit * 0.3; + if (cost < bestCost) { + bestNode = node; + bestCost = cost; + } + } + if (!bestNode) break; + // Merge all children + const reduction = bestNode.entries - 1; + bestNode.active = true; + bestNode.entries = 1; + currentCount -= reduction; + let parent = bestNode.parent; + while (parent) { + parent.entries -= reduction; + parent = parent.parent; + } + const queue = new Set(bestNode.children); + for (const node of queue) { + node.active = false; + node.entries = 0; + if (node.children) { + for (const child of node.children) queue.add(child); + } + } + } + // Write down new plan + const newPlan = new Map(); + for (const rootNode of treeMap.values()) { + if (!rootNode.active) continue; + const map = new Map(); + const queue = new Set([rootNode]); + for (const node of queue) { + if (node.active && node !== rootNode) continue; + if (node.value) { + if (Array.isArray(node.value)) { + for (const item of node.value) { + map.set(item, node.filePath); + } + } else { + map.set(node.value, node.filePath); + } + } + if (node.children) { + for (const child of node.children) { + queue.add(child); + } + } + } + newPlan.set(rootNode.filePath, map); + } + return newPlan; +}; + + +/***/ }), + +/***/ 28452: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const fs = __webpack_require__(35747); +const path = __webpack_require__(85622); +const { EventEmitter } = __webpack_require__(28614); +const reducePlan = __webpack_require__(14434); + +const IS_OSX = __webpack_require__(12087).platform() === "darwin"; +const IS_WIN = __webpack_require__(12087).platform() === "win32"; +const SUPPORTS_RECURSIVE_WATCHING = IS_OSX || IS_WIN; + +const watcherLimit = + +process.env.WATCHPACK_WATCHER_LIMIT || (IS_OSX ? 2000 : 10000); + +const recursiveWatcherLogging = !!process.env + .WATCHPACK_RECURSIVE_WATCHER_LOGGING; + +let isBatch = false; +let watcherCount = 0; + +/** @type {Map} */ +const pendingWatchers = new Map(); + +/** @type {Map} */ +const recursiveWatchers = new Map(); + +/** @type {Map} */ +const directWatchers = new Map(); + +/** @type {Map} */ +const underlyingWatcher = new Map(); + +class DirectWatcher { + constructor(filePath) { + this.filePath = filePath; + this.watchers = new Set(); + this.watcher = undefined; + try { + const watcher = fs.watch(filePath); + this.watcher = watcher; + watcher.on("change", (type, filename) => { + for (const w of this.watchers) { + w.emit("change", type, filename); + } + }); + watcher.on("error", error => { + for (const w of this.watchers) { + w.emit("error", error); + } + }); + } catch (err) { + process.nextTick(() => { + for (const w of this.watchers) { + w.emit("error", err); + } + }); + } + watcherCount++; + } + + add(watcher) { + underlyingWatcher.set(watcher, this); + this.watchers.add(watcher); + } + + remove(watcher) { + this.watchers.delete(watcher); + if (this.watchers.size === 0) { + directWatchers.delete(this.filePath); + watcherCount--; + if (this.watcher) this.watcher.close(); + } + } + + getWatchers() { + return this.watchers; + } +} + +class RecursiveWatcher { + constructor(rootPath) { + this.rootPath = rootPath; + /** @type {Map} */ + this.mapWatcherToPath = new Map(); + /** @type {Map>} */ + this.mapPathToWatchers = new Map(); + this.watcher = undefined; + try { + const watcher = fs.watch(rootPath, { + recursive: true + }); + this.watcher = watcher; + watcher.on("change", (type, filename) => { + if (!filename) { + if (recursiveWatcherLogging) { + process.stderr.write( + `[watchpack] dispatch ${type} event in recursive watcher (${ + this.rootPath + }) to all watchers\n` + ); + } + for (const w of this.mapWatcherToPath.keys()) { + w.emit("change", type); + } + } else { + const dir = path.dirname(filename); + const watchers = this.mapPathToWatchers.get(dir); + if (recursiveWatcherLogging) { + process.stderr.write( + `[watchpack] dispatch ${type} event in recursive watcher (${ + this.rootPath + }) for '${filename}' to ${ + watchers ? watchers.size : 0 + } watchers\n` + ); + } + if (watchers === undefined) return; + for (const w of watchers) { + w.emit("change", type, path.basename(filename)); + } + } + }); + watcher.on("error", error => { + for (const w of this.mapWatcherToPath.keys()) { + w.emit("error", error); + } + }); + } catch (err) { + process.nextTick(() => { + for (const w of this.mapWatcherToPath.keys()) { + w.emit("error", err); + } + }); + } + watcherCount++; + if (recursiveWatcherLogging) { + process.stderr.write( + `[watchpack] created recursive watcher at ${rootPath}\n` + ); + } + } + + add(filePath, watcher) { + underlyingWatcher.set(watcher, this); + const subpath = filePath.slice(this.rootPath.length + 1) || "."; + this.mapWatcherToPath.set(watcher, subpath); + const set = this.mapPathToWatchers.get(subpath); + if (set === undefined) { + const newSet = new Set(); + newSet.add(watcher); + this.mapPathToWatchers.set(subpath, newSet); + } else { + set.add(watcher); + } + } + + remove(watcher) { + const subpath = this.mapWatcherToPath.get(watcher); + if (!subpath) return; + this.mapWatcherToPath.delete(watcher); + const set = this.mapPathToWatchers.get(subpath); + set.delete(watcher); + if (set.size === 0) { + this.mapPathToWatchers.delete(subpath); + } + if (this.mapWatcherToPath.size === 0) { + recursiveWatchers.delete(this.rootPath); + watcherCount--; + if (this.watcher) this.watcher.close(); + if (recursiveWatcherLogging) { + process.stderr.write( + `[watchpack] closed recursive watcher at ${this.rootPath}\n` + ); + } + } + } + + getWatchers() { + return this.mapWatcherToPath; + } +} + +class Watcher extends EventEmitter { + close() { + if (pendingWatchers.has(this)) { + pendingWatchers.delete(this); + return; + } + const watcher = underlyingWatcher.get(this); + watcher.remove(this); + underlyingWatcher.delete(this); + } +} + +const createDirectWatcher = filePath => { + const existing = directWatchers.get(filePath); + if (existing !== undefined) return existing; + const w = new DirectWatcher(filePath); + directWatchers.set(filePath, w); + return w; +}; + +const createRecursiveWatcher = rootPath => { + const existing = recursiveWatchers.get(rootPath); + if (existing !== undefined) return existing; + const w = new RecursiveWatcher(rootPath); + recursiveWatchers.set(rootPath, w); + return w; +}; + +const execute = () => { + /** @type {Map} */ + const map = new Map(); + const addWatcher = (watcher, filePath) => { + const entry = map.get(filePath); + if (entry === undefined) { + map.set(filePath, watcher); + } else if (Array.isArray(entry)) { + entry.push(watcher); + } else { + map.set(filePath, [entry, watcher]); + } + }; + for (const [watcher, filePath] of pendingWatchers) { + addWatcher(watcher, filePath); + } + pendingWatchers.clear(); + + // Fast case when we are not reaching the limit + if (!SUPPORTS_RECURSIVE_WATCHING || watcherLimit - watcherCount >= map.size) { + // Create watchers for all entries in the map + for (const [filePath, entry] of map) { + const w = createDirectWatcher(filePath); + if (Array.isArray(entry)) { + for (const item of entry) w.add(item); + } else { + w.add(entry); + } + } + return; + } + + // Reconsider existing watchers to improving watch plan + for (const watcher of recursiveWatchers.values()) { + for (const [w, subpath] of watcher.getWatchers()) { + addWatcher(w, path.join(watcher.rootPath, subpath)); + } + } + for (const watcher of directWatchers.values()) { + for (const w of watcher.getWatchers()) { + addWatcher(w, watcher.filePath); + } + } + + // Merge map entries to keep watcher limit + // Create a 10% buffer to be able to enter fast case more often + const plan = reducePlan(map, watcherLimit * 0.9); + + // Update watchers for all entries in the map + for (const [filePath, entry] of plan) { + if (entry.size === 1) { + for (const [watcher, filePath] of entry) { + const w = createDirectWatcher(filePath); + const old = underlyingWatcher.get(watcher); + if (old === w) continue; + w.add(watcher); + if (old !== undefined) old.remove(watcher); + } + } else { + const filePaths = new Set(entry.values()); + if (filePaths.size > 1) { + const w = createRecursiveWatcher(filePath); + for (const [watcher, watcherPath] of entry) { + const old = underlyingWatcher.get(watcher); + if (old === w) continue; + w.add(watcherPath, watcher); + if (old !== undefined) old.remove(watcher); + } + } else { + for (const filePath of filePaths) { + const w = createDirectWatcher(filePath); + for (const watcher of entry.keys()) { + const old = underlyingWatcher.get(watcher); + if (old === w) continue; + w.add(watcher); + if (old !== undefined) old.remove(watcher); + } + } + } + } + } +}; + +exports.watch = filePath => { + const watcher = new Watcher(); + // Find an existing watcher + const directWatcher = directWatchers.get(filePath); + if (directWatcher !== undefined) { + directWatcher.add(watcher); + return watcher; + } + let current = filePath; + for (;;) { + const recursiveWatcher = recursiveWatchers.get(current); + if (recursiveWatcher !== undefined) { + recursiveWatcher.add(filePath, watcher); + return watcher; + } + const parent = path.dirname(current); + if (parent === current) break; + current = parent; + } + // Queue up watcher for creation + pendingWatchers.set(watcher, filePath); + if (!isBatch) execute(); + return watcher; +}; + +exports.batch = fn => { + isBatch = true; + try { + fn(); + } finally { + isBatch = false; + execute(); + } +}; + +exports.getNumberOfWatchers = () => { + return watcherCount; +}; + + +/***/ }), + +/***/ 36242: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + +const getWatcherManager = __webpack_require__(78243); +const LinkResolver = __webpack_require__(63766); +const EventEmitter = __webpack_require__(28614).EventEmitter; +const globToRegExp = __webpack_require__(25877); +const watchEventSource = __webpack_require__(28452); + +let EXISTANCE_ONLY_TIME_ENTRY; // lazy required + +const EMPTY_ARRAY = []; +const EMPTY_OPTIONS = {}; + +function addWatchersToSet(watchers, set) { + for (const w of watchers) { + if (w !== true && !set.has(w.directoryWatcher)) { + set.add(w.directoryWatcher); + addWatchersToSet(w.directoryWatcher.directories.values(), set); + } + } +} + +const stringToRegexp = ignored => { + const source = globToRegExp(ignored, { globstar: true, extended: true }) + .source; + const matchingStart = source.slice(0, source.length - 1) + "(?:$|\\/)"; + return matchingStart; +}; + +const ignoredToRegexp = ignored => { + if (Array.isArray(ignored)) { + return new RegExp(ignored.map(i => stringToRegexp(i)).join("|")); + } else if (typeof ignored === "string") { + return new RegExp(stringToRegexp(ignored)); + } else if (ignored instanceof RegExp) { + return ignored; + } else if (ignored) { + throw new Error(`Invalid option for 'ignored': ${ignored}`); + } else { + return undefined; + } +}; + +const normalizeOptions = options => { + return { + followSymlinks: !!options.followSymlinks, + ignored: ignoredToRegexp(options.ignored), + poll: options.poll + }; +}; + +const normalizeCache = new WeakMap(); +const cachedNormalizeOptions = options => { + const cacheEntry = normalizeCache.get(options); + if (cacheEntry !== undefined) return cacheEntry; + const normalized = normalizeOptions(options); + normalizeCache.set(options, normalized); + return normalized; +}; + +class Watchpack extends EventEmitter { + constructor(options) { + super(); + if (!options) options = EMPTY_OPTIONS; + this.options = options; + this.aggregateTimeout = + typeof options.aggregateTimeout === "number" + ? options.aggregateTimeout + : 200; + this.watcherOptions = cachedNormalizeOptions(options); + this.watcherManager = getWatcherManager(this.watcherOptions); + this.fileWatchers = new Map(); + this.directoryWatchers = new Map(); + this.startTime = undefined; + this.paused = false; + this.aggregatedChanges = new Set(); + this.aggregatedRemovals = new Set(); + this.aggregateTimer = undefined; + this._onTimeout = this._onTimeout.bind(this); + } + + watch(arg1, arg2, arg3) { + let files, directories, missing, startTime; + if (!arg2) { + ({ + files = EMPTY_ARRAY, + directories = EMPTY_ARRAY, + missing = EMPTY_ARRAY, + startTime + } = arg1); + } else { + files = arg1; + directories = arg2; + missing = EMPTY_ARRAY; + startTime = arg3; + } + this.paused = false; + const oldFileWatchers = this.fileWatchers; + const oldDirectoryWatchers = this.directoryWatchers; + const ignored = this.watcherOptions.ignored; + const filter = ignored + ? path => !ignored.test(path.replace(/\\/g, "/")) + : () => true; + const addToMap = (map, key, item) => { + const list = map.get(key); + if (list === undefined) { + map.set(key, [item]); + } else { + list.push(item); + } + }; + const fileWatchersNeeded = new Map(); + const directoryWatchersNeeded = new Map(); + const missingFiles = new Set(); + if (this.watcherOptions.followSymlinks) { + const resolver = new LinkResolver(); + for (const file of files) { + if (filter(file)) { + for (const innerFile of resolver.resolve(file)) { + if (file === innerFile || filter(innerFile)) { + addToMap(fileWatchersNeeded, innerFile, file); + } + } + } + } + for (const file of missing) { + if (filter(file)) { + for (const innerFile of resolver.resolve(file)) { + if (file === innerFile || filter(innerFile)) { + missingFiles.add(file); + addToMap(fileWatchersNeeded, innerFile, file); + } + } + } + } + for (const dir of directories) { + if (filter(dir)) { + let first = true; + for (const innerItem of resolver.resolve(dir)) { + if (filter(innerItem)) { + addToMap( + first ? directoryWatchersNeeded : fileWatchersNeeded, + innerItem, + dir + ); + } + first = false; + } + } + } + } else { + for (const file of files) { + if (filter(file)) { + addToMap(fileWatchersNeeded, file, file); + } + } + for (const file of missing) { + if (filter(file)) { + missingFiles.add(file); + addToMap(fileWatchersNeeded, file, file); + } + } + for (const dir of directories) { + if (filter(dir)) { + addToMap(directoryWatchersNeeded, dir, dir); + } + } + } + const newFileWatchers = new Map(); + const newDirectoryWatchers = new Map(); + const setupFileWatcher = (watcher, key, files) => { + watcher.on("initial-missing", type => { + for (const file of files) { + if (!missingFiles.has(file)) this._onRemove(file, file, type); + } + }); + watcher.on("change", (mtime, type) => { + for (const file of files) { + this._onChange(file, mtime, file, type); + } + }); + watcher.on("remove", type => { + for (const file of files) { + this._onRemove(file, file, type); + } + }); + newFileWatchers.set(key, watcher); + }; + const setupDirectoryWatcher = (watcher, key, directories) => { + watcher.on("initial-missing", type => { + for (const item of directories) { + this._onRemove(item, item, type); + } + }); + watcher.on("change", (file, mtime, type) => { + for (const item of directories) { + this._onChange(item, mtime, file, type); + } + }); + watcher.on("remove", type => { + for (const item of directories) { + this._onRemove(item, item, type); + } + }); + newDirectoryWatchers.set(key, watcher); + }; + // Close unneeded old watchers + const fileWatchersToClose = []; + const directoryWatchersToClose = []; + for (const [key, w] of oldFileWatchers) { + if (!fileWatchersNeeded.has(key)) { + w.close(); + } else { + fileWatchersToClose.push(w); + } + } + for (const [key, w] of oldDirectoryWatchers) { + if (!directoryWatchersNeeded.has(key)) { + w.close(); + } else { + directoryWatchersToClose.push(w); + } + } + // Create new watchers and install handlers on these watchers + watchEventSource.batch(() => { + for (const [key, files] of fileWatchersNeeded) { + const watcher = this.watcherManager.watchFile(key, startTime); + if (watcher) { + setupFileWatcher(watcher, key, files); + } + } + for (const [key, directories] of directoryWatchersNeeded) { + const watcher = this.watcherManager.watchDirectory(key, startTime); + if (watcher) { + setupDirectoryWatcher(watcher, key, directories); + } + } + }); + // Close old watchers + for (const w of fileWatchersToClose) w.close(); + for (const w of directoryWatchersToClose) w.close(); + // Store watchers + this.fileWatchers = newFileWatchers; + this.directoryWatchers = newDirectoryWatchers; + this.startTime = startTime; + } + + close() { + this.paused = true; + if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + for (const w of this.fileWatchers.values()) w.close(); + for (const w of this.directoryWatchers.values()) w.close(); + this.fileWatchers.clear(); + this.directoryWatchers.clear(); + } + + pause() { + this.paused = true; + if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + } + + getTimes() { + const directoryWatchers = new Set(); + addWatchersToSet(this.fileWatchers.values(), directoryWatchers); + addWatchersToSet(this.directoryWatchers.values(), directoryWatchers); + const obj = Object.create(null); + for (const w of directoryWatchers) { + const times = w.getTimes(); + for (const file of Object.keys(times)) obj[file] = times[file]; + } + return obj; + } + + getTimeInfoEntries() { + if (EXISTANCE_ONLY_TIME_ENTRY === undefined) { + EXISTANCE_ONLY_TIME_ENTRY = __webpack_require__(87865).EXISTANCE_ONLY_TIME_ENTRY; + } + const directoryWatchers = new Set(); + addWatchersToSet(this.fileWatchers.values(), directoryWatchers); + addWatchersToSet(this.directoryWatchers.values(), directoryWatchers); + const map = new Map(); + for (const w of directoryWatchers) { + const times = w.getTimeInfoEntries(); + for (const [path, entry] of times) { + if (map.has(path)) { + if (entry === EXISTANCE_ONLY_TIME_ENTRY) continue; + const value = map.get(path); + if (value === entry) continue; + if (value !== EXISTANCE_ONLY_TIME_ENTRY) { + map.set(path, Object.assign({}, value, entry)); + continue; + } + } + map.set(path, entry); + } + } + return map; + } + + _onChange(item, mtime, file, type) { + file = file || item; + if (this.paused) return; + this.emit("change", file, mtime, type); + if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + this.aggregatedRemovals.delete(item); + this.aggregatedChanges.add(item); + this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout); + } + + _onRemove(item, file, type) { + file = file || item; + if (this.paused) return; + this.emit("remove", file, type); + if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + this.aggregatedChanges.delete(item); + this.aggregatedRemovals.add(item); + this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout); + } + + _onTimeout() { + this.aggregateTimer = undefined; + const changes = this.aggregatedChanges; + const removals = this.aggregatedRemovals; + this.aggregatedChanges = new Set(); + this.aggregatedRemovals = new Set(); + this.emit("aggregated", changes, removals); + } +} + +module.exports = Watchpack; + + +/***/ }), + +/***/ 30823: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const WebpackError = __webpack_require__(24274); +const ConstDependency = __webpack_require__(9364); +const BasicEvaluatedExpression = __webpack_require__(98288); +const { + toConstantDependency, + evaluateToString +} = __webpack_require__(98550); +const ChunkNameRuntimeModule = __webpack_require__(89477); +const GetFullHashRuntimeModule = __webpack_require__(28365); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ + +/* eslint-disable camelcase */ +const REPLACEMENTS = { + __webpack_require__: { + expr: RuntimeGlobals.require, + req: [RuntimeGlobals.require], + type: "function", + assign: false + }, + __webpack_public_path__: { + expr: RuntimeGlobals.publicPath, + req: [RuntimeGlobals.publicPath], + type: "string", + assign: true + }, + __webpack_modules__: { + expr: RuntimeGlobals.moduleFactories, + req: [RuntimeGlobals.moduleFactories], + type: "object", + assign: false + }, + __webpack_chunk_load__: { + expr: RuntimeGlobals.ensureChunk, + req: [RuntimeGlobals.ensureChunk], + type: "function", + assign: true + }, + __non_webpack_require__: { + expr: "require", + req: null, + type: undefined, // type is not known, depends on environment + assign: true + }, + __webpack_nonce__: { + expr: RuntimeGlobals.scriptNonce, + req: [RuntimeGlobals.scriptNonce], + type: "string", + assign: true + }, + __webpack_hash__: { + expr: `${RuntimeGlobals.getFullHash}()`, + req: [RuntimeGlobals.getFullHash], + type: "string", + assign: false + }, + __webpack_chunkname__: { + expr: RuntimeGlobals.chunkName, + req: [RuntimeGlobals.chunkName], + type: "string", + assign: false + }, + __webpack_get_script_filename__: { + expr: RuntimeGlobals.getChunkScriptFilename, + req: [RuntimeGlobals.getChunkScriptFilename], + type: "function", + assign: true + }, + "require.onError": { + expr: RuntimeGlobals.uncaughtErrorHandler, + req: [RuntimeGlobals.uncaughtErrorHandler], + type: undefined, // type is not known, could be function or undefined + assign: true // is never a pattern + }, + __system_context__: { + expr: RuntimeGlobals.systemContext, + req: [RuntimeGlobals.systemContext], + type: "object", + assign: false + }, + __webpack_share_scopes__: { + expr: RuntimeGlobals.shareScopeMap, + req: [RuntimeGlobals.shareScopeMap], + type: "object", + assign: false + }, + __webpack_init_sharing__: { + expr: RuntimeGlobals.initializeSharing, + req: [RuntimeGlobals.initializeSharing], + type: "function", + assign: true + } +}; +/* eslint-enable camelcase */ + +class APIPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "APIPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.chunkName) + .tap("APIPlugin", chunk => { + compilation.addRuntimeModule( + chunk, + new ChunkNameRuntimeModule(chunk.name) + ); + return true; + }); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.getFullHash) + .tap("APIPlugin", (chunk, set) => { + compilation.addRuntimeModule(chunk, new GetFullHashRuntimeModule()); + return true; + }); + + /** + * @param {JavascriptParser} parser the parser + */ + const handler = parser => { + Object.keys(REPLACEMENTS).forEach(key => { + const info = REPLACEMENTS[key]; + parser.hooks.expression + .for(key) + .tap( + "APIPlugin", + toConstantDependency(parser, info.expr, info.req) + ); + if (info.assign === false) { + parser.hooks.assign.for(key).tap("APIPlugin", expr => { + const err = new WebpackError(`${key} must not be assigned`); + err.loc = expr.loc; + throw err; + }); + } + if (info.type) { + parser.hooks.evaluateTypeof + .for(key) + .tap("APIPlugin", evaluateToString(info.type)); + } + }); + + parser.hooks.expression + .for("__webpack_layer__") + .tap("APIPlugin", expr => { + const dep = new ConstDependency( + JSON.stringify(parser.state.module.layer), + expr.range + ); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + parser.hooks.evaluateIdentifier + .for("__webpack_layer__") + .tap("APIPlugin", expr => + (parser.state.module.layer === null + ? new BasicEvaluatedExpression().setNull() + : new BasicEvaluatedExpression().setString( + parser.state.module.layer + ) + ).setRange(expr.range) + ); + parser.hooks.evaluateTypeof + .for("__webpack_layer__") + .tap("APIPlugin", expr => + new BasicEvaluatedExpression() + .setString( + parser.state.module.layer === null ? "object" : "string" + ) + .setRange(expr.range) + ); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("APIPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("APIPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("APIPlugin", handler); + } + ); + } +} + +module.exports = APIPlugin; + + +/***/ }), + +/***/ 67113: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const WebpackError = __webpack_require__(24274); +const CURRENT_METHOD_REGEXP = /at ([a-zA-Z0-9_.]*)/; + +/** + * @param {string=} method method name + * @returns {string} message + */ +function createMessage(method) { + return `Abstract method${method ? " " + method : ""}. Must be overridden.`; +} + +/** + * @constructor + */ +function Message() { + /** @type {string} */ + this.stack = undefined; + Error.captureStackTrace(this); + /** @type {RegExpMatchArray} */ + const match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP); + + this.message = match && match[1] ? createMessage(match[1]) : createMessage(); +} + +/** + * Error for abstract method + * @example + * class FooClass { + * abstractMethod() { + * throw new AbstractMethodError(); // error message: Abstract method FooClass.abstractMethod. Must be overridden. + * } + * } + * + */ +class AbstractMethodError extends WebpackError { + constructor() { + super(new Message().message); + this.name = "AbstractMethodError"; + } +} + +module.exports = AbstractMethodError; + + +/***/ }), + +/***/ 72624: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const DependenciesBlock = __webpack_require__(15267); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./ChunkGroup").ChunkGroupOptions} ChunkGroupOptions */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./util/Hash")} Hash */ + +class AsyncDependenciesBlock extends DependenciesBlock { + /** + * @param {ChunkGroupOptions & { entryOptions?: EntryOptions }} groupOptions options for the group + * @param {DependencyLocation=} loc the line of code + * @param {string=} request the request + */ + constructor(groupOptions, loc, request) { + super(); + if (typeof groupOptions === "string") { + groupOptions = { name: groupOptions }; + } else if (!groupOptions) { + groupOptions = { name: undefined }; + } + this.groupOptions = groupOptions; + this.loc = loc; + this.request = request; + /** @type {DependenciesBlock} */ + this.parent = undefined; + } + + /** + * @returns {string} The name of the chunk + */ + get chunkName() { + return this.groupOptions.name; + } + + /** + * @param {string} value The new chunk name + * @returns {void} + */ + set chunkName(value) { + this.groupOptions.name = value; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + const { chunkGraph } = context; + hash.update(JSON.stringify(this.groupOptions)); + const chunkGroup = chunkGraph.getBlockChunkGroup(this); + hash.update(chunkGroup ? chunkGroup.id : ""); + super.updateHash(hash, context); + } + + serialize(context) { + const { write } = context; + write(this.groupOptions); + write(this.loc); + write(this.request); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.groupOptions = read(); + this.loc = read(); + this.request = read(); + super.deserialize(context); + } +} + +makeSerializable(AsyncDependenciesBlock, "webpack/lib/AsyncDependenciesBlock"); + +Object.defineProperty(AsyncDependenciesBlock.prototype, "module", { + get() { + throw new Error( + "module property was removed from AsyncDependenciesBlock (it's not needed)" + ); + }, + set() { + throw new Error( + "module property was removed from AsyncDependenciesBlock (it's not needed)" + ); + } +}); + +module.exports = AsyncDependenciesBlock; + + +/***/ }), + +/***/ 88144: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Module")} Module */ + +class AsyncDependencyToInitialChunkError extends WebpackError { + /** + * Creates an instance of AsyncDependencyToInitialChunkError. + * @param {string} chunkName Name of Chunk + * @param {Module} module module tied to dependency + * @param {DependencyLocation} loc location of dependency + */ + constructor(chunkName, module, loc) { + super( + `It's not allowed to load an initial chunk on demand. The chunk name "${chunkName}" is already used by an entrypoint.` + ); + + this.name = "AsyncDependencyToInitialChunkError"; + this.module = module; + this.loc = loc; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = AsyncDependencyToInitialChunkError; + + +/***/ }), + +/***/ 42257: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const NormalModule = __webpack_require__(88376); +const PrefetchDependency = __webpack_require__(33785); + +/** @typedef {import("./Compiler")} Compiler */ + +class AutomaticPrefetchPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "AutomaticPrefetchPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + PrefetchDependency, + normalModuleFactory + ); + } + ); + let lastModules = null; + compiler.hooks.afterCompile.tap("AutomaticPrefetchPlugin", compilation => { + lastModules = Array.from(compilation.modules) + .filter(m => m instanceof NormalModule) + .map((/** @type {NormalModule} */ m) => ({ + context: m.context, + request: m.request + })); + }); + compiler.hooks.make.tapAsync( + "AutomaticPrefetchPlugin", + (compilation, callback) => { + if (!lastModules) return callback(); + asyncLib.forEach( + lastModules, + (m, callback) => { + compilation.addModuleChain( + m.context || compiler.context, + new PrefetchDependency(m.request), + callback + ); + }, + callback + ); + } + ); + } +} +module.exports = AutomaticPrefetchPlugin; + + +/***/ }), + +/***/ 44732: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const { ConcatSource } = __webpack_require__(55600); +const Compilation = __webpack_require__(75388); +const ModuleFilenameHelpers = __webpack_require__(79843); +const Template = __webpack_require__(90751); + +const schema = __webpack_require__(45674); + +/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginArgument} BannerPluginArgument */ +/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginOptions} BannerPluginOptions */ +/** @typedef {import("./Compiler")} Compiler */ + +const wrapComment = str => { + if (!str.includes("\n")) { + return Template.toComment(str); + } + return `/*!\n * ${str + .replace(/\*\//g, "* /") + .split("\n") + .join("\n * ") + .replace(/\s+\n/g, "\n") + .trimRight()}\n */`; +}; + +class BannerPlugin { + /** + * @param {BannerPluginArgument} options options object + */ + constructor(options) { + if (typeof options === "string" || typeof options === "function") { + options = { + banner: options + }; + } + + validate(schema, options, { + name: "Banner Plugin", + baseDataPath: "options" + }); + + this.options = options; + + const bannerOption = options.banner; + if (typeof bannerOption === "function") { + const getBanner = bannerOption; + this.banner = this.options.raw + ? getBanner + : data => wrapComment(getBanner(data)); + } else { + const banner = this.options.raw + ? bannerOption + : wrapComment(bannerOption); + this.banner = () => banner; + } + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const options = this.options; + const banner = this.banner; + const matchObject = ModuleFilenameHelpers.matchObject.bind( + undefined, + options + ); + + compiler.hooks.compilation.tap("BannerPlugin", compilation => { + compilation.hooks.processAssets.tap( + { + name: "BannerPlugin", + stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS + }, + () => { + for (const chunk of compilation.chunks) { + if (options.entryOnly && !chunk.canBeInitial()) { + continue; + } + + for (const file of chunk.files) { + if (!matchObject(file)) { + continue; + } + + const data = { + chunk, + filename: file + }; + + const comment = compilation.getPath(banner, data); + + compilation.updateAsset( + file, + old => new ConcatSource(comment, "\n", old) + ); + } + } + } + ); + }); + } +} + +module.exports = BannerPlugin; + + +/***/ }), + +/***/ 18338: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { AsyncParallelHook, AsyncSeriesBailHook, SyncHook } = __webpack_require__(18416); +const { + makeWebpackError, + makeWebpackErrorCallback +} = __webpack_require__(14953); + +/** @typedef {import("./WebpackError")} WebpackError */ + +/** + * @typedef {Object} Etag + * @property {function(): string} toString + */ + +/** + * @template T + * @callback CallbackCache + * @param {WebpackError=} err + * @param {T=} result + * @returns {void} + */ + +/** + * @callback GotHandler + * @param {any} result + * @param {function(Error=): void} callback + * @returns {void} + */ + +const needCalls = (times, callback) => { + return err => { + if (--times === 0) { + return callback(err); + } + if (err && times > 0) { + times = 0; + return callback(err); + } + }; +}; + +class Cache { + constructor() { + this.hooks = { + /** @type {AsyncSeriesBailHook<[string, Etag | null, GotHandler[]], any>} */ + get: new AsyncSeriesBailHook(["identifier", "etag", "gotHandlers"]), + /** @type {AsyncParallelHook<[string, Etag | null, any]>} */ + store: new AsyncParallelHook(["identifier", "etag", "data"]), + /** @type {AsyncParallelHook<[Iterable]>} */ + storeBuildDependencies: new AsyncParallelHook(["dependencies"]), + /** @type {SyncHook<[]>} */ + beginIdle: new SyncHook([]), + /** @type {AsyncParallelHook<[]>} */ + endIdle: new AsyncParallelHook([]), + /** @type {AsyncParallelHook<[]>} */ + shutdown: new AsyncParallelHook([]) + }; + } + + /** + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {CallbackCache} callback signals when the value is retrieved + * @returns {void} + */ + get(identifier, etag, callback) { + const gotHandlers = []; + this.hooks.get.callAsync(identifier, etag, gotHandlers, (err, result) => { + if (err) { + callback(makeWebpackError(err, "Cache.hooks.get")); + return; + } + if (result === null) { + result = undefined; + } + if (gotHandlers.length > 1) { + const innerCallback = needCalls(gotHandlers.length, () => + callback(null, result) + ); + for (const gotHandler of gotHandlers) { + gotHandler(result, innerCallback); + } + } else if (gotHandlers.length === 1) { + gotHandlers[0](result, () => callback(null, result)); + } else { + callback(null, result); + } + }); + } + + /** + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {T} data the value to store + * @param {CallbackCache} callback signals when the value is stored + * @returns {void} + */ + store(identifier, etag, data, callback) { + this.hooks.store.callAsync( + identifier, + etag, + data, + makeWebpackErrorCallback(callback, "Cache.hooks.store") + ); + } + + /** + * After this method has succeeded the cache can only be restored when build dependencies are + * @param {Iterable} dependencies list of all build dependencies + * @param {CallbackCache} callback signals when the dependencies are stored + * @returns {void} + */ + storeBuildDependencies(dependencies, callback) { + this.hooks.storeBuildDependencies.callAsync( + dependencies, + makeWebpackErrorCallback(callback, "Cache.hooks.storeBuildDependencies") + ); + } + + /** + * @returns {void} + */ + beginIdle() { + this.hooks.beginIdle.call(); + } + + /** + * @param {CallbackCache} callback signals when the call finishes + * @returns {void} + */ + endIdle(callback) { + this.hooks.endIdle.callAsync( + makeWebpackErrorCallback(callback, "Cache.hooks.endIdle") + ); + } + + /** + * @param {CallbackCache} callback signals when the call finishes + * @returns {void} + */ + shutdown(callback) { + this.hooks.shutdown.callAsync( + makeWebpackErrorCallback(callback, "Cache.hooks.shutdown") + ); + } +} + +Cache.STAGE_MEMORY = -10; +Cache.STAGE_DEFAULT = 0; +Cache.STAGE_DISK = 10; +Cache.STAGE_NETWORK = 20; + +module.exports = Cache; + + +/***/ }), + +/***/ 12628: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const getLazyHashedEtag = __webpack_require__(79610); +const mergeEtags = __webpack_require__(35414); + +/** @typedef {import("./Cache")} Cache */ +/** @typedef {import("./Cache").Etag} Etag */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./cache/getLazyHashedEtag").HashableObject} HashableObject */ + +/** + * @template T + * @callback CallbackCache + * @param {WebpackError=} err + * @param {T=} result + * @returns {void} + */ + +/** + * @template T + * @callback CallbackNormalErrorCache + * @param {Error=} err + * @param {T=} result + * @returns {void} + */ + +class MultiItemCache { + /** + * @param {ItemCacheFacade[]} items item caches + */ + constructor(items) { + this._items = items; + } + + /** + * @template T + * @param {CallbackCache} callback signals when the value is retrieved + * @returns {void} + */ + get(callback) { + const next = i => { + this._items[i].get((err, result) => { + if (err) return callback(err); + if (result !== undefined) return callback(null, result); + if (++i >= this._items.length) return callback(); + next(i); + }); + }; + next(0); + } + + /** + * @template T + * @returns {Promise} promise with the data + */ + getPromise() { + const next = i => { + return this._items[i].getPromise().then(result => { + if (result !== undefined) return result; + if (++i < this._items.length) return next(i); + }); + }; + return next(0); + } + + /** + * @template T + * @param {T} data the value to store + * @param {CallbackCache} callback signals when the value is stored + * @returns {void} + */ + store(data, callback) { + asyncLib.each( + this._items, + (item, callback) => item.store(data, callback), + callback + ); + } + + /** + * @template T + * @param {T} data the value to store + * @returns {Promise} promise signals when the value is stored + */ + storePromise(data) { + return Promise.all( + this._items.map(item => item.storePromise(data)) + ).then(() => {}); + } +} + +class ItemCacheFacade { + /** + * @param {Cache} cache the root cache + * @param {string} name the child cache item name + * @param {Etag | null} etag the etag + */ + constructor(cache, name, etag) { + this._cache = cache; + this._name = name; + this._etag = etag; + } + + /** + * @template T + * @param {CallbackCache} callback signals when the value is retrieved + * @returns {void} + */ + get(callback) { + this._cache.get(this._name, this._etag, callback); + } + + /** + * @template T + * @returns {Promise} promise with the data + */ + getPromise() { + return new Promise((resolve, reject) => { + this._cache.get(this._name, this._etag, (err, data) => { + if (err) { + reject(err); + } else { + resolve(data); + } + }); + }); + } + + /** + * @template T + * @param {T} data the value to store + * @param {CallbackCache} callback signals when the value is stored + * @returns {void} + */ + store(data, callback) { + this._cache.store(this._name, this._etag, data, callback); + } + + /** + * @template T + * @param {T} data the value to store + * @returns {Promise} promise signals when the value is stored + */ + storePromise(data) { + return new Promise((resolve, reject) => { + this._cache.store(this._name, this._etag, data, err => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); + } + + /** + * @template T + * @param {function(CallbackNormalErrorCache): void} computer function to compute the value if not cached + * @param {CallbackNormalErrorCache} callback signals when the value is retrieved + * @returns {void} + */ + provide(computer, callback) { + this.get((err, cacheEntry) => { + if (err) return callback(err); + if (cacheEntry !== undefined) return cacheEntry; + computer((err, result) => { + if (err) return callback(err); + this.store(result, err => { + if (err) return callback(err); + callback(null, result); + }); + }); + }); + } + + /** + * @template T + * @param {function(): Promise | T} computer function to compute the value if not cached + * @returns {Promise} promise with the data + */ + async providePromise(computer) { + const cacheEntry = await this.getPromise(); + if (cacheEntry !== undefined) return cacheEntry; + const result = await computer(); + await this.storePromise(result); + return result; + } +} + +class CacheFacade { + /** + * @param {Cache} cache the root cache + * @param {string} name the child cache name + */ + constructor(cache, name) { + this._cache = cache; + this._name = name; + } + + /** + * @param {string} name the child cache name# + * @returns {CacheFacade} child cache + */ + getChildCache(name) { + return new CacheFacade(this._cache, `${this._name}|${name}`); + } + + /** + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @returns {ItemCacheFacade} item cache + */ + getItemCache(identifier, etag) { + return new ItemCacheFacade( + this._cache, + `${this._name}|${identifier}`, + etag + ); + } + + /** + * @param {HashableObject} obj an hashable object + * @returns {Etag} an etag that is lazy hashed + */ + getLazyHashedEtag(obj) { + return getLazyHashedEtag(obj); + } + + /** + * @param {Etag} a an etag + * @param {Etag} b another etag + * @returns {Etag} an etag that represents both + */ + mergeEtags(a, b) { + return mergeEtags(a, b); + } + + /** + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {CallbackCache} callback signals when the value is retrieved + * @returns {void} + */ + get(identifier, etag, callback) { + this._cache.get(`${this._name}|${identifier}`, etag, callback); + } + + /** + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @returns {Promise} promise with the data + */ + getPromise(identifier, etag) { + return new Promise((resolve, reject) => { + this._cache.get(`${this._name}|${identifier}`, etag, (err, data) => { + if (err) { + reject(err); + } else { + resolve(data); + } + }); + }); + } + + /** + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {T} data the value to store + * @param {CallbackCache} callback signals when the value is stored + * @returns {void} + */ + store(identifier, etag, data, callback) { + this._cache.store(`${this._name}|${identifier}`, etag, data, callback); + } + + /** + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {T} data the value to store + * @returns {Promise} promise signals when the value is stored + */ + storePromise(identifier, etag, data) { + return new Promise((resolve, reject) => { + this._cache.store(`${this._name}|${identifier}`, etag, data, err => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); + } + + /** + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {function(CallbackNormalErrorCache): void} computer function to compute the value if not cached + * @param {CallbackNormalErrorCache} callback signals when the value is retrieved + * @returns {void} + */ + provide(identifier, etag, computer, callback) { + this.get(identifier, etag, (err, cacheEntry) => { + if (err) return callback(err); + if (cacheEntry !== undefined) return cacheEntry; + computer((err, result) => { + if (err) return callback(err); + this.store(identifier, etag, result, err => { + if (err) return callback(err); + callback(null, result); + }); + }); + }); + } + + /** + * @template T + * @param {string} identifier the cache identifier + * @param {Etag | null} etag the etag + * @param {function(): Promise | T} computer function to compute the value if not cached + * @returns {Promise} promise with the data + */ + async providePromise(identifier, etag, computer) { + const cacheEntry = await this.getPromise(identifier, etag); + if (cacheEntry !== undefined) return cacheEntry; + const result = await computer(); + await this.storePromise(identifier, etag, result); + return result; + } +} + +module.exports = CacheFacade; +module.exports.ItemCacheFacade = ItemCacheFacade; +module.exports.MultiItemCache = MultiItemCache; + + +/***/ }), + +/***/ 60595: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ + +/** + * @param {Module[]} modules the modules to be sorted + * @returns {Module[]} sorted version of original modules + */ +const sortModules = modules => { + return modules.slice().sort((a, b) => { + const aIdent = a.identifier(); + const bIdent = b.identifier(); + /* istanbul ignore next */ + if (aIdent < bIdent) return -1; + /* istanbul ignore next */ + if (aIdent > bIdent) return 1; + /* istanbul ignore next */ + return 0; + }); +}; + +/** + * @param {Module[]} modules each module from throw + * @param {ModuleGraph} moduleGraph the module graph + * @returns {string} each message from provided modules + */ +const createModulesListMessage = (modules, moduleGraph) => { + return modules + .map(m => { + let message = `* ${m.identifier()}`; + const validReasons = Array.from( + moduleGraph.getIncomingConnections(m) + ).filter(reason => reason.originModule); + + if (validReasons.length > 0) { + message += `\n Used by ${validReasons.length} module(s), i. e.`; + message += `\n ${validReasons[0].originModule.identifier()}`; + } + return message; + }) + .join("\n"); +}; + +class CaseSensitiveModulesWarning extends WebpackError { + /** + * Creates an instance of CaseSensitiveModulesWarning. + * @param {Module[]} modules modules that were detected + * @param {ModuleGraph} moduleGraph the module graph + */ + constructor(modules, moduleGraph) { + const sortedModules = sortModules(modules); + const modulesList = createModulesListMessage(sortedModules, moduleGraph); + super(`There are multiple modules with names that only differ in casing. +This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. +Use equal casing. Compare these module identifiers: +${modulesList}`); + + this.name = "CaseSensitiveModulesWarning"; + this.module = sortedModules[0]; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = CaseSensitiveModulesWarning; + + +/***/ }), + +/***/ 92787: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ChunkGraph = __webpack_require__(67518); +const Entrypoint = __webpack_require__(33660); +const { intersect } = __webpack_require__(86088); +const SortableSet = __webpack_require__(51326); +const StringXor = __webpack_require__(74395); +const { + compareModulesByIdentifier, + compareChunkGroupsByIndex, + compareModulesById +} = __webpack_require__(21699); +const { createArrayToSetDeprecationSet } = __webpack_require__(57651); +const { mergeRuntime } = __webpack_require__(43478); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./ChunkGraph").ChunkFilterPredicate} ChunkFilterPredicate */ +/** @typedef {import("./ChunkGraph").ChunkSizeOptions} ChunkSizeOptions */ +/** @typedef {import("./ChunkGraph").ModuleFilterPredicate} ModuleFilterPredicate */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("./Compilation").PathData} PathData */ +/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./util/Hash")} Hash */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +const ChunkFilesSet = createArrayToSetDeprecationSet("chunk.files"); + +/** + * @typedef {Object} WithId an object who has an id property * + * @property {string | number} id the id of the object + */ + +/** + * @deprecated + * @typedef {Object} ChunkMaps + * @property {Record} hash + * @property {Record>} contentHash + * @property {Record} name + */ + +/** + * @deprecated + * @typedef {Object} ChunkModuleMaps + * @property {Record} id + * @property {Record} hash + */ + +let debugId = 1000; + +/** + * A Chunk is a unit of encapsulation for Modules. + * Chunks are "rendered" into bundles that get emitted when the build completes. + */ +class Chunk { + /** + * @param {string=} name of chunk being created, is optional (for subclasses) + */ + constructor(name) { + /** @type {number | string | null} */ + this.id = null; + /** @type {(number|string)[] | null} */ + this.ids = null; + /** @type {number} */ + this.debugId = debugId++; + /** @type {string} */ + this.name = name; + /** @type {SortableSet} */ + this.idNameHints = new SortableSet(); + /** @type {boolean} */ + this.preventIntegration = false; + /** @type {(string | function(PathData, AssetInfo=): string)?} */ + this.filenameTemplate = undefined; + /** @private @type {SortableSet} */ + this._groups = new SortableSet(undefined, compareChunkGroupsByIndex); + /** @type {RuntimeSpec} */ + this.runtime = undefined; + /** @type {Set} */ + this.files = new ChunkFilesSet(); + /** @type {Set} */ + this.auxiliaryFiles = new Set(); + /** @type {boolean} */ + this.rendered = false; + /** @type {string=} */ + this.hash = undefined; + /** @type {Record} */ + this.contentHash = Object.create(null); + /** @type {string=} */ + this.renderedHash = undefined; + /** @type {string=} */ + this.chunkReason = undefined; + /** @type {boolean} */ + this.extraAsync = false; + } + + // TODO remove in webpack 6 + // BACKWARD-COMPAT START + get entryModule() { + const entryModules = Array.from( + ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.entryModule", + "DEP_WEBPACK_CHUNK_ENTRY_MODULE" + ).getChunkEntryModulesIterable(this) + ); + if (entryModules.length === 0) { + return undefined; + } else if (entryModules.length === 1) { + return entryModules[0]; + } else { + throw new Error( + "Module.entryModule: Multiple entry modules are not supported by the deprecated API (Use the new ChunkGroup API)" + ); + } + } + + /** + * @returns {boolean} true, if the chunk contains an entry module + */ + hasEntryModule() { + return ( + ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.hasEntryModule", + "DEP_WEBPACK_CHUNK_HAS_ENTRY_MODULE" + ).getNumberOfEntryModules(this) > 0 + ); + } + + /** + * @param {Module} module the module + * @returns {boolean} true, if the chunk could be added + */ + addModule(module) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.addModule", + "DEP_WEBPACK_CHUNK_ADD_MODULE" + ); + if (chunkGraph.isModuleInChunk(module, this)) return false; + chunkGraph.connectChunkAndModule(this, module); + return true; + } + + /** + * @param {Module} module the module + * @returns {void} + */ + removeModule(module) { + ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.removeModule", + "DEP_WEBPACK_CHUNK_REMOVE_MODULE" + ).disconnectChunkAndModule(this, module); + } + + /** + * @returns {number} the number of module which are contained in this chunk + */ + getNumberOfModules() { + return ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.getNumberOfModules", + "DEP_WEBPACK_CHUNK_GET_NUMBER_OF_MODULES" + ).getNumberOfChunkModules(this); + } + + get modulesIterable() { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.modulesIterable", + "DEP_WEBPACK_CHUNK_MODULES_ITERABLE" + ); + return chunkGraph.getOrderedChunkModulesIterable( + this, + compareModulesByIdentifier + ); + } + + /** + * @param {Chunk} otherChunk the chunk to compare with + * @returns {-1|0|1} the comparison result + */ + compareTo(otherChunk) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.compareTo", + "DEP_WEBPACK_CHUNK_COMPARE_TO" + ); + return chunkGraph.compareChunks(this, otherChunk); + } + + /** + * @param {Module} module the module + * @returns {boolean} true, if the chunk contains the module + */ + containsModule(module) { + return ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.containsModule", + "DEP_WEBPACK_CHUNK_CONTAINS_MODULE" + ).isModuleInChunk(module, this); + } + + /** + * @returns {Module[]} the modules for this chunk + */ + getModules() { + return ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.getModules", + "DEP_WEBPACK_CHUNK_GET_MODULES" + ).getChunkModules(this); + } + + /** + * @returns {void} + */ + remove() { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.remove", + "DEP_WEBPACK_CHUNK_REMOVE" + ); + chunkGraph.disconnectChunk(this); + this.disconnectFromGroups(); + } + + /** + * @param {Module} module the module + * @param {Chunk} otherChunk the target chunk + * @returns {void} + */ + moveModule(module, otherChunk) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.moveModule", + "DEP_WEBPACK_CHUNK_MOVE_MODULE" + ); + chunkGraph.disconnectChunkAndModule(this, module); + chunkGraph.connectChunkAndModule(otherChunk, module); + } + + /** + * @param {Chunk} otherChunk the other chunk + * @returns {boolean} true, if the specified chunk has been integrated + */ + integrate(otherChunk) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.integrate", + "DEP_WEBPACK_CHUNK_INTEGRATE" + ); + if (chunkGraph.canChunksBeIntegrated(this, otherChunk)) { + chunkGraph.integrateChunks(this, otherChunk); + return true; + } else { + return false; + } + } + + /** + * @param {Chunk} otherChunk the other chunk + * @returns {boolean} true, if chunks could be integrated + */ + canBeIntegrated(otherChunk) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.canBeIntegrated", + "DEP_WEBPACK_CHUNK_CAN_BE_INTEGRATED" + ); + return chunkGraph.canChunksBeIntegrated(this, otherChunk); + } + + /** + * @returns {boolean} true, if this chunk contains no module + */ + isEmpty() { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.isEmpty", + "DEP_WEBPACK_CHUNK_IS_EMPTY" + ); + return chunkGraph.getNumberOfChunkModules(this) === 0; + } + + /** + * @returns {number} total size of all modules in this chunk + */ + modulesSize() { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.modulesSize", + "DEP_WEBPACK_CHUNK_MODULES_SIZE" + ); + return chunkGraph.getChunkModulesSize(this); + } + + /** + * @param {ChunkSizeOptions} options options object + * @returns {number} total size of this chunk + */ + size(options = {}) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.size", + "DEP_WEBPACK_CHUNK_SIZE" + ); + return chunkGraph.getChunkSize(this, options); + } + + /** + * @param {Chunk} otherChunk the other chunk + * @param {ChunkSizeOptions} options options object + * @returns {number} total size of the chunk or false if the chunk can't be integrated + */ + integratedSize(otherChunk, options) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.integratedSize", + "DEP_WEBPACK_CHUNK_INTEGRATED_SIZE" + ); + return chunkGraph.getIntegratedChunksSize(this, otherChunk, options); + } + + /** + * @param {ModuleFilterPredicate} filterFn function used to filter modules + * @returns {ChunkModuleMaps} module map information + */ + getChunkModuleMaps(filterFn) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.getChunkModuleMaps", + "DEP_WEBPACK_CHUNK_GET_CHUNK_MODULE_MAPS" + ); + /** @type {Record} */ + const chunkModuleIdMap = Object.create(null); + /** @type {Record} */ + const chunkModuleHashMap = Object.create(null); + + for (const asyncChunk of this.getAllAsyncChunks()) { + /** @type {(string|number)[]} */ + let array; + for (const module of chunkGraph.getOrderedChunkModulesIterable( + asyncChunk, + compareModulesById(chunkGraph) + )) { + if (filterFn(module)) { + if (array === undefined) { + array = []; + chunkModuleIdMap[asyncChunk.id] = array; + } + const moduleId = chunkGraph.getModuleId(module); + array.push(moduleId); + chunkModuleHashMap[moduleId] = chunkGraph.getRenderedModuleHash( + module, + undefined + ); + } + } + } + + return { + id: chunkModuleIdMap, + hash: chunkModuleHashMap + }; + } + + /** + * @param {ModuleFilterPredicate} filterFn predicate function used to filter modules + * @param {ChunkFilterPredicate=} filterChunkFn predicate function used to filter chunks + * @returns {boolean} return true if module exists in graph + */ + hasModuleInGraph(filterFn, filterChunkFn) { + const chunkGraph = ChunkGraph.getChunkGraphForChunk( + this, + "Chunk.hasModuleInGraph", + "DEP_WEBPACK_CHUNK_HAS_MODULE_IN_GRAPH" + ); + return chunkGraph.hasModuleInGraph(this, filterFn, filterChunkFn); + } + + /** + * @deprecated + * @param {boolean} realHash whether the full hash or the rendered hash is to be used + * @returns {ChunkMaps} the chunk map information + */ + getChunkMaps(realHash) { + /** @type {Record} */ + const chunkHashMap = Object.create(null); + /** @type {Record>} */ + const chunkContentHashMap = Object.create(null); + /** @type {Record} */ + const chunkNameMap = Object.create(null); + + for (const chunk of this.getAllAsyncChunks()) { + chunkHashMap[chunk.id] = realHash ? chunk.hash : chunk.renderedHash; + for (const key of Object.keys(chunk.contentHash)) { + if (!chunkContentHashMap[key]) { + chunkContentHashMap[key] = Object.create(null); + } + chunkContentHashMap[key][chunk.id] = chunk.contentHash[key]; + } + if (chunk.name) { + chunkNameMap[chunk.id] = chunk.name; + } + } + + return { + hash: chunkHashMap, + contentHash: chunkContentHashMap, + name: chunkNameMap + }; + } + // BACKWARD-COMPAT END + + /** + * @returns {boolean} whether or not the Chunk will have a runtime + */ + hasRuntime() { + for (const chunkGroup of this._groups) { + if ( + chunkGroup instanceof Entrypoint && + chunkGroup.getRuntimeChunk() === this + ) { + return true; + } + } + return false; + } + + /** + * @returns {boolean} whether or not this chunk can be an initial chunk + */ + canBeInitial() { + for (const chunkGroup of this._groups) { + if (chunkGroup.isInitial()) return true; + } + return false; + } + + /** + * @returns {boolean} whether this chunk can only be an initial chunk + */ + isOnlyInitial() { + if (this._groups.size <= 0) return false; + for (const chunkGroup of this._groups) { + if (!chunkGroup.isInitial()) return false; + } + return true; + } + + /** + * @returns {EntryOptions | undefined} the entry options for this chunk + */ + getEntryOptions() { + for (const chunkGroup of this._groups) { + if (chunkGroup instanceof Entrypoint) { + return chunkGroup.options; + } + } + return undefined; + } + + /** + * @param {ChunkGroup} chunkGroup the chunkGroup the chunk is being added + * @returns {void} + */ + addGroup(chunkGroup) { + this._groups.add(chunkGroup); + } + + /** + * @param {ChunkGroup} chunkGroup the chunkGroup the chunk is being removed from + * @returns {void} + */ + removeGroup(chunkGroup) { + this._groups.delete(chunkGroup); + } + + /** + * @param {ChunkGroup} chunkGroup the chunkGroup to check + * @returns {boolean} returns true if chunk has chunkGroup reference and exists in chunkGroup + */ + isInGroup(chunkGroup) { + return this._groups.has(chunkGroup); + } + + /** + * @returns {number} the amount of groups that the said chunk is in + */ + getNumberOfGroups() { + return this._groups.size; + } + + /** + * @returns {Iterable} the chunkGroups that the said chunk is referenced in + */ + get groupsIterable() { + this._groups.sort(); + return this._groups; + } + + /** + * @returns {void} + */ + disconnectFromGroups() { + for (const chunkGroup of this._groups) { + chunkGroup.removeChunk(this); + } + } + + /** + * @param {Chunk} newChunk the new chunk that will be split out of + * @returns {void} + */ + split(newChunk) { + for (const chunkGroup of this._groups) { + chunkGroup.insertChunk(newChunk, this); + newChunk.addGroup(chunkGroup); + } + for (const idHint of this.idNameHints) { + newChunk.idNameHints.add(idHint); + } + newChunk.runtime = mergeRuntime(newChunk.runtime, this.runtime); + } + + /** + * @param {Hash} hash hash (will be modified) + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {void} + */ + updateHash(hash, chunkGraph) { + hash.update(`${this.id} `); + hash.update(this.ids ? this.ids.join(",") : ""); + hash.update(`${this.name || ""} `); + const xor = new StringXor(); + for (const m of chunkGraph.getChunkModulesIterable(this)) { + xor.add(chunkGraph.getModuleHash(m, this.runtime)); + } + xor.updateHash(hash); + const entryModules = chunkGraph.getChunkEntryModulesWithChunkGroupIterable( + this + ); + for (const [m, chunkGroup] of entryModules) { + hash.update("entry"); + hash.update(`${chunkGraph.getModuleId(m)}`); + hash.update(chunkGroup.id); + } + } + + /** + * @returns {Set} a set of all the async chunks + */ + getAllAsyncChunks() { + const queue = new Set(); + const chunks = new Set(); + + const initialChunks = intersect( + Array.from(this.groupsIterable, g => new Set(g.chunks)) + ); + + for (const chunkGroup of this.groupsIterable) { + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } + } + + for (const chunkGroup of queue) { + for (const chunk of chunkGroup.chunks) { + if (!initialChunks.has(chunk)) { + chunks.add(chunk); + } + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } + } + + return chunks; + } + + /** + * @returns {Set} a set of all the initial chunks (including itself) + */ + getAllInitialChunks() { + return intersect(Array.from(this.groupsIterable, g => new Set(g.chunks))); + } + + /** + * @returns {Set} a set of all the referenced chunks (including itself) + */ + getAllReferencedChunks() { + const queue = new Set(this.groupsIterable); + const chunks = new Set(); + + for (const chunkGroup of queue) { + for (const chunk of chunkGroup.chunks) { + chunks.add(chunk); + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } + } + + return chunks; + } + + /** + * @returns {Set} a set of all the referenced entrypoints + */ + getAllReferencedAsyncEntrypoints() { + const queue = new Set(this.groupsIterable); + const entrypoints = new Set(); + + for (const chunkGroup of queue) { + for (const entrypoint of chunkGroup.asyncEntrypointsIterable) { + entrypoints.add(entrypoint); + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } + } + + return entrypoints; + } + + /** + * @returns {boolean} true, if the chunk references async chunks + */ + hasAsyncChunks() { + const queue = new Set(); + + const initialChunks = intersect( + Array.from(this.groupsIterable, g => new Set(g.chunks)) + ); + + for (const chunkGroup of this.groupsIterable) { + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } + } + + for (const chunkGroup of queue) { + for (const chunk of chunkGroup.chunks) { + if (!initialChunks.has(chunk)) { + return true; + } + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } + } + + return false; + } + + /** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {ChunkFilterPredicate=} filterFn function used to filter chunks + * @returns {Record} a record object of names to lists of child ids(?) + */ + getChildIdsByOrders(chunkGraph, filterFn) { + /** @type {Map} */ + const lists = new Map(); + for (const group of this.groupsIterable) { + if (group.chunks[group.chunks.length - 1] === this) { + for (const childGroup of group.childrenIterable) { + for (const key of Object.keys(childGroup.options)) { + if (key.endsWith("Order")) { + const name = key.substr(0, key.length - "Order".length); + let list = lists.get(name); + if (list === undefined) { + list = []; + lists.set(name, list); + } + list.push({ + order: childGroup.options[key], + group: childGroup + }); + } + } + } + } + } + /** @type {Record} */ + const result = Object.create(null); + for (const [name, list] of lists) { + list.sort((a, b) => { + const cmp = b.order - a.order; + if (cmp !== 0) return cmp; + return a.group.compareTo(chunkGraph, b.group); + }); + /** @type {Set} */ + const chunkIdSet = new Set(); + for (const item of list) { + for (const chunk of item.group.chunks) { + if (filterFn && !filterFn(chunk, chunkGraph)) continue; + chunkIdSet.add(chunk.id); + } + } + if (chunkIdSet.size > 0) { + result[name] = Array.from(chunkIdSet); + } + } + return result; + } + + /** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {boolean=} includeDirectChildren include direct children (by default only children of async children are included) + * @param {ChunkFilterPredicate=} filterFn function used to filter chunks + * @returns {Record>} a record object of names to lists of child ids(?) by chunk id + */ + getChildIdsByOrdersMap(chunkGraph, includeDirectChildren, filterFn) { + /** @type {Record>} */ + const chunkMaps = Object.create(null); + + /** + * @param {Chunk} chunk a chunk + * @returns {void} + */ + const addChildIdsByOrdersToMap = chunk => { + const data = chunk.getChildIdsByOrders(chunkGraph, filterFn); + for (const key of Object.keys(data)) { + let chunkMap = chunkMaps[key]; + if (chunkMap === undefined) { + chunkMaps[key] = chunkMap = Object.create(null); + } + chunkMap[chunk.id] = data[key]; + } + }; + + if (includeDirectChildren) { + /** @type {Set} */ + const chunks = new Set(); + for (const chunkGroup of this.groupsIterable) { + for (const chunk of chunkGroup.chunks) { + chunks.add(chunk); + } + } + for (const chunk of chunks) { + addChildIdsByOrdersToMap(chunk); + } + } + + for (const chunk of this.getAllAsyncChunks()) { + addChildIdsByOrdersToMap(chunk); + } + + return chunkMaps; + } +} + +module.exports = Chunk; + + +/***/ }), + +/***/ 67518: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const SortableSet = __webpack_require__(51326); +const { + compareModulesById, + compareIterables, + compareModulesByIdentifier, + concatComparators, + compareSelect, + compareIds +} = __webpack_require__(21699); +const findGraphRoots = __webpack_require__(76019); +const { + RuntimeSpecMap, + RuntimeSpecSet, + runtimeToString, + mergeRuntime +} = __webpack_require__(43478); + +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Entrypoint")} Entrypoint */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./RuntimeModule")} RuntimeModule */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +/** @type {ReadonlySet} */ +const EMPTY_SET = new Set(); + +const compareModuleIterables = compareIterables(compareModulesByIdentifier); + +/** @typedef {(c: Chunk, chunkGraph: ChunkGraph) => boolean} ChunkFilterPredicate */ +/** @typedef {(m: Module) => boolean} ModuleFilterPredicate */ + +/** + * @typedef {Object} ChunkSizeOptions + * @property {number=} chunkOverhead constant overhead for a chunk + * @property {number=} entryChunkMultiplicator multiplicator for initial chunks + */ + +/** + * @typedef {Object} ModuleHashInfo + * @property {string} hash + * @property {string} renderedHash + */ + +/** @template T @typedef {(set: SortableSet) => T[]} SetToArrayFunction */ + +/** + * @template T + * @param {SortableSet} set the set + * @returns {T[]} set as array + */ +const getArray = set => { + return Array.from(set); +}; + +/** + * @param {SortableSet} set the set + * @returns {Map>} modules by source type + */ +const modulesBySourceType = set => { + /** @type {Map>} */ + const map = new Map(); + for (const module of set) { + for (const sourceType of module.getSourceTypes()) { + let innerSet = map.get(sourceType); + if (innerSet === undefined) { + innerSet = new SortableSet(); + map.set(sourceType, innerSet); + } + innerSet.add(module); + } + } + for (const [key, innerSet] of map) { + // When all modules have the source type, we reuse the original SortableSet + // to benefit from the shared cache (especially for sorting) + if (innerSet.size === set.size) { + map.set(key, set); + } + } + return map; +}; + +/** @type {WeakMap} */ +const createOrderedArrayFunctionMap = new WeakMap(); + +/** + * @template T + * @param {function(T, T): -1|0|1} comparator comparator function + * @returns {SetToArrayFunction} set as ordered array + */ +const createOrderedArrayFunction = comparator => { + /** @type {SetToArrayFunction} */ + let fn = createOrderedArrayFunctionMap.get(comparator); + if (fn !== undefined) return fn; + fn = set => { + set.sortWith(comparator); + return Array.from(set); + }; + createOrderedArrayFunctionMap.set(comparator, fn); + return fn; +}; + +/** + * @param {Iterable} modules the modules to get the count/size of + * @returns {number} the size of the modules + */ +const getModulesSize = modules => { + let size = 0; + for (const module of modules) { + for (const type of module.getSourceTypes()) { + size += module.size(type); + } + } + return size; +}; + +/** + * @param {Iterable} modules the sortable Set to get the size of + * @returns {Record} the sizes of the modules + */ +const getModulesSizes = modules => { + let sizes = Object.create(null); + for (const module of modules) { + for (const type of module.getSourceTypes()) { + sizes[type] = (sizes[type] || 0) + module.size(type); + } + } + return sizes; +}; + +/** + * @param {Chunk} a chunk + * @param {Chunk} b chunk + * @returns {boolean} true, if a is always a parent of b + */ +const isAvailableChunk = (a, b) => { + const queue = new Set(b.groupsIterable); + for (const chunkGroup of queue) { + if (a.isInGroup(chunkGroup)) continue; + if (chunkGroup.isInitial()) return false; + for (const parent of chunkGroup.parentsIterable) { + queue.add(parent); + } + } + return true; +}; + +class ChunkGraphModule { + constructor() { + /** @type {SortableSet} */ + this.chunks = new SortableSet(); + /** @type {Set | undefined} */ + this.entryInChunks = undefined; + /** @type {Set | undefined} */ + this.runtimeInChunks = undefined; + /** @type {RuntimeSpecMap} */ + this.hashes = undefined; + /** @type {string | number} */ + this.id = null; + /** @type {RuntimeSpecMap> | undefined} */ + this.runtimeRequirements = undefined; + } +} + +class ChunkGraphChunk { + constructor() { + /** @type {SortableSet} */ + this.modules = new SortableSet(); + /** @type {Map} */ + this.entryModules = new Map(); + /** @type {SortableSet} */ + this.runtimeModules = new SortableSet(); + /** @type {Set | undefined} */ + this.fullHashModules = undefined; + /** @type {Set | undefined} */ + this.runtimeRequirements = undefined; + /** @type {Set} */ + this.runtimeRequirementsInTree = new Set(); + } +} + +class ChunkGraph { + /** + * @param {ModuleGraph} moduleGraph the module graph + */ + constructor(moduleGraph) { + /** @private @type {WeakMap} */ + this._modules = new WeakMap(); + /** @private @type {WeakMap} */ + this._chunks = new WeakMap(); + /** @private @type {WeakMap} */ + this._blockChunkGroups = new WeakMap(); + /** @private @type {Map} */ + this._runtimeIds = new Map(); + /** @type {ModuleGraph} */ + this.moduleGraph = moduleGraph; + + this._getGraphRoots = this._getGraphRoots.bind(this); + + // Caching + this._cacheChunkGraphModuleKey1 = undefined; + this._cacheChunkGraphModuleValue1 = undefined; + this._cacheChunkGraphModuleKey2 = undefined; + this._cacheChunkGraphModuleValue2 = undefined; + this._cacheChunkGraphChunkKey1 = undefined; + this._cacheChunkGraphChunkValue1 = undefined; + this._cacheChunkGraphChunkKey2 = undefined; + this._cacheChunkGraphChunkValue2 = undefined; + } + + /** + * @private + * @param {Module} module the module + * @returns {ChunkGraphModule} internal module + */ + _getChunkGraphModule(module) { + if (this._cacheChunkGraphModuleKey1 === module) + return this._cacheChunkGraphModuleValue1; + if (this._cacheChunkGraphModuleKey2 === module) + return this._cacheChunkGraphModuleValue2; + let cgm = this._modules.get(module); + if (cgm === undefined) { + cgm = new ChunkGraphModule(); + this._modules.set(module, cgm); + } + this._cacheChunkGraphModuleKey2 = this._cacheChunkGraphModuleKey1; + this._cacheChunkGraphModuleValue2 = this._cacheChunkGraphModuleValue1; + this._cacheChunkGraphModuleKey1 = module; + this._cacheChunkGraphModuleValue1 = cgm; + return cgm; + } + + /** + * @private + * @param {Chunk} chunk the chunk + * @returns {ChunkGraphChunk} internal chunk + */ + _getChunkGraphChunk(chunk) { + if (this._cacheChunkGraphChunkKey1 === chunk) + return this._cacheChunkGraphChunkValue1; + if (this._cacheChunkGraphChunkKey2 === chunk) + return this._cacheChunkGraphChunkValue2; + let cgc = this._chunks.get(chunk); + if (cgc === undefined) { + cgc = new ChunkGraphChunk(); + this._chunks.set(chunk, cgc); + } + this._cacheChunkGraphChunkKey2 = this._cacheChunkGraphChunkKey1; + this._cacheChunkGraphChunkValue2 = this._cacheChunkGraphChunkValue1; + this._cacheChunkGraphChunkKey1 = chunk; + this._cacheChunkGraphChunkValue1 = cgc; + return cgc; + } + + /** + * @param {SortableSet} set the sortable Set to get the roots of + * @returns {Module[]} the graph roots + */ + _getGraphRoots(set) { + const { moduleGraph } = this; + return Array.from( + findGraphRoots(set, module => { + /** @type {Set} */ + const set = new Set(); + for (const connection of moduleGraph.getOutgoingConnections(module)) { + if (!connection.module) continue; + set.add(connection.module); + } + return set; + }) + ).sort(compareModulesByIdentifier); + } + + /** + * @param {Chunk} chunk the new chunk + * @param {Module} module the module + * @returns {void} + */ + connectChunkAndModule(chunk, module) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + cgm.chunks.add(chunk); + cgc.modules.add(module); + } + + /** + * @param {Chunk} chunk the chunk + * @param {Module} module the module + * @returns {void} + */ + disconnectChunkAndModule(chunk, module) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + cgc.modules.delete(module); + cgm.chunks.delete(chunk); + } + + /** + * @param {Chunk} chunk the chunk which will be disconnected + * @returns {void} + */ + disconnectChunk(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + for (const module of cgc.modules) { + const cgm = this._getChunkGraphModule(module); + cgm.chunks.delete(chunk); + } + cgc.modules.clear(); + chunk.disconnectFromGroups(); + } + + /** + * @param {Chunk} chunk the chunk + * @param {Iterable} modules the modules + * @returns {void} + */ + attachModules(chunk, modules) { + const cgc = this._getChunkGraphChunk(chunk); + for (const module of modules) { + cgc.modules.add(module); + } + } + + /** + * @param {Chunk} chunk the chunk + * @param {Iterable} modules the runtime modules + * @returns {void} + */ + attachRuntimeModules(chunk, modules) { + const cgc = this._getChunkGraphChunk(chunk); + for (const module of modules) { + cgc.runtimeModules.add(module); + } + } + + /** + * @param {Chunk} chunk the chunk + * @param {Iterable} modules the modules that require a full hash + * @returns {void} + */ + attachFullHashModules(chunk, modules) { + const cgc = this._getChunkGraphChunk(chunk); + if (cgc.fullHashModules === undefined) cgc.fullHashModules = new Set(); + for (const module of modules) { + cgc.fullHashModules.add(module); + } + } + + /** + * @param {Module} oldModule the replaced module + * @param {Module} newModule the replacing module + * @returns {void} + */ + replaceModule(oldModule, newModule) { + const oldCgm = this._getChunkGraphModule(oldModule); + const newCgm = this._getChunkGraphModule(newModule); + + for (const chunk of oldCgm.chunks) { + const cgc = this._getChunkGraphChunk(chunk); + cgc.modules.delete(oldModule); + cgc.modules.add(newModule); + newCgm.chunks.add(chunk); + } + oldCgm.chunks.clear(); + + if (oldCgm.entryInChunks !== undefined) { + if (newCgm.entryInChunks === undefined) { + newCgm.entryInChunks = new Set(); + } + for (const chunk of oldCgm.entryInChunks) { + const cgc = this._getChunkGraphChunk(chunk); + const old = cgc.entryModules.get(oldModule); + /** @type {Map} */ + const newEntryModules = new Map(); + for (const [m, cg] of cgc.entryModules) { + if (m === oldModule) { + newEntryModules.set(newModule, old); + } else { + newEntryModules.set(m, cg); + } + } + cgc.entryModules = newEntryModules; + newCgm.entryInChunks.add(chunk); + } + oldCgm.entryInChunks = undefined; + } + + if (oldCgm.runtimeInChunks !== undefined) { + if (newCgm.runtimeInChunks === undefined) { + newCgm.runtimeInChunks = new Set(); + } + for (const chunk of oldCgm.runtimeInChunks) { + const cgc = this._getChunkGraphChunk(chunk); + cgc.runtimeModules.delete(/** @type {RuntimeModule} */ (oldModule)); + cgc.runtimeModules.add(/** @type {RuntimeModule} */ (newModule)); + newCgm.runtimeInChunks.add(chunk); + if ( + cgc.fullHashModules !== undefined && + cgc.fullHashModules.has(/** @type {RuntimeModule} */ (oldModule)) + ) { + cgc.fullHashModules.delete(/** @type {RuntimeModule} */ (oldModule)); + cgc.fullHashModules.add(/** @type {RuntimeModule} */ (newModule)); + } + } + oldCgm.runtimeInChunks = undefined; + } + } + + /** + * @param {Module} module the checked module + * @param {Chunk} chunk the checked chunk + * @returns {boolean} true, if the chunk contains the module + */ + isModuleInChunk(module, chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.has(module); + } + + /** + * @param {Module} module the checked module + * @param {ChunkGroup} chunkGroup the checked chunk group + * @returns {boolean} true, if the chunk contains the module + */ + isModuleInChunkGroup(module, chunkGroup) { + for (const chunk of chunkGroup.chunks) { + if (this.isModuleInChunk(module, chunk)) return true; + } + return false; + } + + /** + * @param {Module} module the checked module + * @returns {boolean} true, if the module is entry of any chunk + */ + isEntryModule(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.entryInChunks !== undefined; + } + + /** + * @param {Module} module the module + * @returns {Iterable} iterable of chunks (do not modify) + */ + getModuleChunksIterable(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.chunks; + } + + /** + * @param {Module} module the module + * @param {function(Chunk, Chunk): -1|0|1} sortFn sort function + * @returns {Iterable} iterable of chunks (do not modify) + */ + getOrderedModuleChunksIterable(module, sortFn) { + const cgm = this._getChunkGraphModule(module); + cgm.chunks.sortWith(sortFn); + return cgm.chunks; + } + + /** + * @param {Module} module the module + * @returns {Chunk[]} array of chunks (cached, do not modify) + */ + getModuleChunks(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.chunks.getFromCache(getArray); + } + + /** + * @param {Module} module the module + * @returns {number} the number of chunk which contain the module + */ + getNumberOfModuleChunks(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.chunks.size; + } + + /** + * @param {Module} module the module + * @returns {RuntimeSpecSet} runtimes + */ + getModuleRuntimes(module) { + const cgm = this._getChunkGraphModule(module); + const runtimes = new RuntimeSpecSet(); + for (const chunk of cgm.chunks) { + runtimes.add(chunk.runtime); + } + return runtimes; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {number} the number of module which are contained in this chunk + */ + getNumberOfChunkModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.size; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable} return the modules for this chunk + */ + getChunkModulesIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules; + } + + /** + * @param {Chunk} chunk the chunk + * @param {string} sourceType source type + * @returns {Iterable | undefined} return the modules for this chunk + */ + getChunkModulesIterableBySourceType(chunk, sourceType) { + const cgc = this._getChunkGraphChunk(chunk); + const modulesWithSourceType = cgc.modules + .getFromUnorderedCache(modulesBySourceType) + .get(sourceType); + return modulesWithSourceType; + } + + /** + * @param {Chunk} chunk the chunk + * @param {function(Module, Module): -1|0|1} comparator comparator function + * @returns {Iterable} return the modules for this chunk + */ + getOrderedChunkModulesIterable(chunk, comparator) { + const cgc = this._getChunkGraphChunk(chunk); + cgc.modules.sortWith(comparator); + return cgc.modules; + } + + /** + * @param {Chunk} chunk the chunk + * @param {string} sourceType source type + * @param {function(Module, Module): -1|0|1} comparator comparator function + * @returns {Iterable | undefined} return the modules for this chunk + */ + getOrderedChunkModulesIterableBySourceType(chunk, sourceType, comparator) { + const cgc = this._getChunkGraphChunk(chunk); + const modulesWithSourceType = cgc.modules + .getFromUnorderedCache(modulesBySourceType) + .get(sourceType); + if (modulesWithSourceType === undefined) return undefined; + modulesWithSourceType.sortWith(comparator); + return modulesWithSourceType; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Module[]} return the modules for this chunk (cached, do not modify) + */ + getChunkModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.getFromUnorderedCache(getArray); + } + + /** + * @param {Chunk} chunk the chunk + * @param {function(Module, Module): -1|0|1} comparator comparator function + * @returns {Module[]} return the modules for this chunk (cached, do not modify) + */ + getOrderedChunkModules(chunk, comparator) { + const cgc = this._getChunkGraphChunk(chunk); + const arrayFunction = createOrderedArrayFunction(comparator); + return cgc.modules.getFromUnorderedCache(arrayFunction); + } + + /** + * @param {Chunk} chunk the chunk + * @param {ModuleFilterPredicate} filterFn function used to filter modules + * @param {boolean} includeAllChunks all chunks or only async chunks + * @returns {Record} chunk to module ids object + */ + getChunkModuleIdMap(chunk, filterFn, includeAllChunks = false) { + /** @type {Record} */ + const chunkModuleIdMap = Object.create(null); + + for (const asyncChunk of includeAllChunks + ? chunk.getAllReferencedChunks() + : chunk.getAllAsyncChunks()) { + /** @type {(string|number)[]} */ + let array; + for (const module of this.getOrderedChunkModulesIterable( + asyncChunk, + compareModulesById(this) + )) { + if (filterFn(module)) { + if (array === undefined) { + array = []; + chunkModuleIdMap[asyncChunk.id] = array; + } + const moduleId = this.getModuleId(module); + array.push(moduleId); + } + } + } + + return chunkModuleIdMap; + } + + /** + * @param {Chunk} chunk the chunk + * @param {ModuleFilterPredicate} filterFn function used to filter modules + * @param {number} hashLength length of the hash + * @param {boolean} includeAllChunks all chunks or only async chunks + * @returns {Record>} chunk to module id to module hash object + */ + getChunkModuleRenderedHashMap( + chunk, + filterFn, + hashLength = 0, + includeAllChunks = false + ) { + /** @type {Record>} */ + const chunkModuleHashMap = Object.create(null); + + for (const asyncChunk of includeAllChunks + ? chunk.getAllReferencedChunks() + : chunk.getAllAsyncChunks()) { + /** @type {Record} */ + let idToHashMap; + for (const module of this.getOrderedChunkModulesIterable( + asyncChunk, + compareModulesById(this) + )) { + if (filterFn(module)) { + if (idToHashMap === undefined) { + idToHashMap = Object.create(null); + chunkModuleHashMap[asyncChunk.id] = idToHashMap; + } + const moduleId = this.getModuleId(module); + const hash = this.getRenderedModuleHash(module, asyncChunk.runtime); + idToHashMap[moduleId] = hashLength ? hash.slice(0, hashLength) : hash; + } + } + } + + return chunkModuleHashMap; + } + + /** + * @param {Chunk} chunk the chunk + * @param {ChunkFilterPredicate} filterFn function used to filter chunks + * @returns {Record} chunk map + */ + getChunkConditionMap(chunk, filterFn) { + const map = Object.create(null); + for (const asyncChunk of chunk.getAllAsyncChunks()) { + map[asyncChunk.id] = filterFn(asyncChunk, this); + } + for (const depChunk of this.getChunkEntryDependentChunksIterable(chunk)) { + map[depChunk.id] = filterFn(depChunk, this); + } + return map; + } + + /** + * @param {Chunk} chunk the chunk + * @param {ModuleFilterPredicate} filterFn predicate function used to filter modules + * @param {ChunkFilterPredicate=} filterChunkFn predicate function used to filter chunks + * @returns {boolean} return true if module exists in graph + */ + hasModuleInGraph(chunk, filterFn, filterChunkFn) { + const queue = new Set(chunk.groupsIterable); + const chunksProcessed = new Set(); + + for (const chunkGroup of queue) { + for (const innerChunk of chunkGroup.chunks) { + if (!chunksProcessed.has(innerChunk)) { + chunksProcessed.add(innerChunk); + if (!filterChunkFn || filterChunkFn(innerChunk, this)) { + for (const module of this.getChunkModulesIterable(innerChunk)) { + if (filterFn(module)) { + return true; + } + } + } + } + } + for (const child of chunkGroup.childrenIterable) { + queue.add(child); + } + } + return false; + } + + /** + * @param {Chunk} chunkA first chunk + * @param {Chunk} chunkB second chunk + * @returns {-1|0|1} this is a comparator function like sort and returns -1, 0, or 1 based on sort order + */ + compareChunks(chunkA, chunkB) { + const cgcA = this._getChunkGraphChunk(chunkA); + const cgcB = this._getChunkGraphChunk(chunkB); + if (cgcA.modules.size > cgcB.modules.size) return -1; + if (cgcA.modules.size < cgcB.modules.size) return 1; + cgcA.modules.sortWith(compareModulesByIdentifier); + cgcB.modules.sortWith(compareModulesByIdentifier); + return compareModuleIterables(cgcA.modules, cgcB.modules); + } + + /** + * @param {Chunk} chunk the chunk + * @returns {number} total size of all modules in the chunk + */ + getChunkModulesSize(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.getFromUnorderedCache(getModulesSize); + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Record} total sizes of all modules in the chunk by source type + */ + getChunkModulesSizes(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.getFromUnorderedCache(getModulesSizes); + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Module[]} root modules of the chunks (ordered by identifier) + */ + getChunkRootModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.modules.getFromUnorderedCache(this._getGraphRoots); + } + + /** + * @param {Chunk} chunk the chunk + * @param {ChunkSizeOptions} options options object + * @returns {number} total size of the chunk + */ + getChunkSize(chunk, options = {}) { + const cgc = this._getChunkGraphChunk(chunk); + const modulesSize = cgc.modules.getFromUnorderedCache(getModulesSize); + const chunkOverhead = + typeof options.chunkOverhead === "number" ? options.chunkOverhead : 10000; + const entryChunkMultiplicator = + typeof options.entryChunkMultiplicator === "number" + ? options.entryChunkMultiplicator + : 10; + return ( + chunkOverhead + + modulesSize * (chunk.canBeInitial() ? entryChunkMultiplicator : 1) + ); + } + + /** + * @param {Chunk} chunkA chunk + * @param {Chunk} chunkB chunk + * @param {ChunkSizeOptions} options options object + * @returns {number} total size of the chunk or false if chunks can't be integrated + */ + getIntegratedChunksSize(chunkA, chunkB, options = {}) { + const cgcA = this._getChunkGraphChunk(chunkA); + const cgcB = this._getChunkGraphChunk(chunkB); + const allModules = new Set(cgcA.modules); + for (const m of cgcB.modules) allModules.add(m); + let modulesSize = getModulesSize(allModules); + const chunkOverhead = + typeof options.chunkOverhead === "number" ? options.chunkOverhead : 10000; + const entryChunkMultiplicator = + typeof options.entryChunkMultiplicator === "number" + ? options.entryChunkMultiplicator + : 10; + return ( + chunkOverhead + + modulesSize * + (chunkA.canBeInitial() || chunkB.canBeInitial() + ? entryChunkMultiplicator + : 1) + ); + } + + /** + * @param {Chunk} chunkA chunk + * @param {Chunk} chunkB chunk + * @returns {boolean} true, if chunks could be integrated + */ + canChunksBeIntegrated(chunkA, chunkB) { + if (chunkA.preventIntegration || chunkB.preventIntegration) { + return false; + } + + const hasRuntimeA = chunkA.hasRuntime(); + const hasRuntimeB = chunkB.hasRuntime(); + + if (hasRuntimeA !== hasRuntimeB) { + if (hasRuntimeA) { + return isAvailableChunk(chunkA, chunkB); + } else if (hasRuntimeB) { + return isAvailableChunk(chunkB, chunkA); + } else { + return false; + } + } + + if ( + this.getNumberOfEntryModules(chunkA) > 0 || + this.getNumberOfEntryModules(chunkB) > 0 + ) { + return false; + } + + return true; + } + + /** + * @param {Chunk} chunkA the target chunk + * @param {Chunk} chunkB the chunk to integrate + * @returns {void} + */ + integrateChunks(chunkA, chunkB) { + // Decide for one name (deterministic) + if (chunkA.name && chunkB.name) { + if ( + this.getNumberOfEntryModules(chunkA) > 0 === + this.getNumberOfEntryModules(chunkB) > 0 + ) { + // When both chunks have entry modules or none have one, use + // shortest name + if (chunkA.name.length !== chunkB.name.length) { + chunkA.name = + chunkA.name.length < chunkB.name.length ? chunkA.name : chunkB.name; + } else { + chunkA.name = chunkA.name < chunkB.name ? chunkA.name : chunkB.name; + } + } else if (this.getNumberOfEntryModules(chunkB) > 0) { + // Pick the name of the chunk with the entry module + chunkA.name = chunkB.name; + } + } else if (chunkB.name) { + chunkA.name = chunkB.name; + } + + // Merge id name hints + for (const hint of chunkB.idNameHints) { + chunkA.idNameHints.add(hint); + } + + // Merge runtime + chunkA.runtime = mergeRuntime(chunkA.runtime, chunkB.runtime); + + // getChunkModules is used here to create a clone, because disconnectChunkAndModule modifies + for (const module of this.getChunkModules(chunkB)) { + this.disconnectChunkAndModule(chunkB, module); + this.connectChunkAndModule(chunkA, module); + } + + for (const [module, chunkGroup] of Array.from( + this.getChunkEntryModulesWithChunkGroupIterable(chunkB) + )) { + this.disconnectChunkAndEntryModule(chunkB, module); + this.connectChunkAndEntryModule(chunkA, module, chunkGroup); + } + + for (const chunkGroup of chunkB.groupsIterable) { + chunkGroup.replaceChunk(chunkB, chunkA); + chunkA.addGroup(chunkGroup); + chunkB.removeGroup(chunkGroup); + } + } + + /** + * @param {Module} module the checked module + * @param {Chunk} chunk the checked chunk + * @returns {boolean} true, if the chunk contains the module as entry + */ + isEntryModuleInChunk(module, chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.entryModules.has(module); + } + + /** + * @param {Chunk} chunk the new chunk + * @param {Module} module the entry module + * @param {Entrypoint=} entrypoint the chunk group which must be loaded before the module is executed + * @returns {void} + */ + connectChunkAndEntryModule(chunk, module, entrypoint) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + if (cgm.entryInChunks === undefined) { + cgm.entryInChunks = new Set(); + } + cgm.entryInChunks.add(chunk); + cgc.entryModules.set(module, entrypoint); + } + + /** + * @param {Chunk} chunk the new chunk + * @param {RuntimeModule} module the runtime module + * @returns {void} + */ + connectChunkAndRuntimeModule(chunk, module) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + if (cgm.runtimeInChunks === undefined) { + cgm.runtimeInChunks = new Set(); + } + cgm.runtimeInChunks.add(chunk); + cgc.runtimeModules.add(module); + } + + /** + * @param {Chunk} chunk the new chunk + * @param {RuntimeModule} module the module that require a full hash + * @returns {void} + */ + addFullHashModuleToChunk(chunk, module) { + const cgc = this._getChunkGraphChunk(chunk); + if (cgc.fullHashModules === undefined) cgc.fullHashModules = new Set(); + cgc.fullHashModules.add(module); + } + + /** + * @param {Chunk} chunk the new chunk + * @param {Module} module the entry module + * @returns {void} + */ + disconnectChunkAndEntryModule(chunk, module) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + cgm.entryInChunks.delete(chunk); + if (cgm.entryInChunks.size === 0) { + cgm.entryInChunks = undefined; + } + cgc.entryModules.delete(module); + } + + /** + * @param {Chunk} chunk the new chunk + * @param {RuntimeModule} module the runtime module + * @returns {void} + */ + disconnectChunkAndRuntimeModule(chunk, module) { + const cgm = this._getChunkGraphModule(module); + const cgc = this._getChunkGraphChunk(chunk); + cgm.runtimeInChunks.delete(chunk); + if (cgm.runtimeInChunks.size === 0) { + cgm.runtimeInChunks = undefined; + } + cgc.runtimeModules.delete(module); + } + + /** + * @param {Module} module the entry module, it will no longer be entry + * @returns {void} + */ + disconnectEntryModule(module) { + const cgm = this._getChunkGraphModule(module); + for (const chunk of cgm.entryInChunks) { + const cgc = this._getChunkGraphChunk(chunk); + cgc.entryModules.delete(module); + } + cgm.entryInChunks = undefined; + } + + /** + * @param {Chunk} chunk the chunk, for which all entries will be removed + * @returns {void} + */ + disconnectEntries(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + for (const module of cgc.entryModules.keys()) { + const cgm = this._getChunkGraphModule(module); + cgm.entryInChunks.delete(chunk); + if (cgm.entryInChunks.size === 0) { + cgm.entryInChunks = undefined; + } + } + cgc.entryModules.clear(); + } + + /** + * @param {Chunk} chunk the chunk + * @returns {number} the amount of entry modules in chunk + */ + getNumberOfEntryModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.entryModules.size; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {number} the amount of entry modules in chunk + */ + getNumberOfRuntimeModules(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.runtimeModules.size; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable} iterable of modules (do not modify) + */ + getChunkEntryModulesIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.entryModules.keys(); + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable} iterable of chunks + */ + getChunkEntryDependentChunksIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + /** @type {Set} */ + const set = new Set(); + for (const chunkGroup of cgc.entryModules.values()) { + for (const c of chunkGroup.chunks) { + if (c !== chunk) { + set.add(c); + } + } + } + return set; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {boolean} true, when it has dependent chunks + */ + hasChunkEntryDependentChunks(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + for (const chunkGroup of cgc.entryModules.values()) { + for (const c of chunkGroup.chunks) { + if (c !== chunk) { + return true; + } + } + } + return false; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable} iterable of modules (do not modify) + */ + getChunkRuntimeModulesIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.runtimeModules; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {RuntimeModule[]} array of modules in order of execution + */ + getChunkRuntimeModulesInOrder(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + const array = Array.from(cgc.runtimeModules); + array.sort( + concatComparators( + compareSelect( + /** + * @param {RuntimeModule} r runtime module + * @returns {number=} stage + */ + r => r.stage, + compareIds + ), + compareModulesByIdentifier + ) + ); + return array; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable | undefined} iterable of modules (do not modify) + */ + getChunkFullHashModulesIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.fullHashModules; + } + + /** @typedef {[Module, Entrypoint | undefined]} EntryModuleWithChunkGroup */ + + /** + * @param {Chunk} chunk the chunk + * @returns {Iterable} iterable of modules (do not modify) + */ + getChunkEntryModulesWithChunkGroupIterable(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.entryModules; + } + + /** + * @param {AsyncDependenciesBlock} depBlock the async block + * @returns {ChunkGroup} the chunk group + */ + getBlockChunkGroup(depBlock) { + return this._blockChunkGroups.get(depBlock); + } + + /** + * @param {AsyncDependenciesBlock} depBlock the async block + * @param {ChunkGroup} chunkGroup the chunk group + * @returns {void} + */ + connectBlockAndChunkGroup(depBlock, chunkGroup) { + this._blockChunkGroups.set(depBlock, chunkGroup); + chunkGroup.addBlock(depBlock); + } + + /** + * @param {ChunkGroup} chunkGroup the chunk group + * @returns {void} + */ + disconnectChunkGroup(chunkGroup) { + for (const block of chunkGroup.blocksIterable) { + this._blockChunkGroups.delete(block); + } + // TODO refactor by moving blocks list into ChunkGraph + chunkGroup._blocks.clear(); + } + + /** + * @param {Module} module the module + * @returns {string | number} the id of the module + */ + getModuleId(module) { + const cgm = this._getChunkGraphModule(module); + return cgm.id; + } + + /** + * @param {Module} module the module + * @param {string | number} id the id of the module + * @returns {void} + */ + setModuleId(module, id) { + const cgm = this._getChunkGraphModule(module); + cgm.id = id; + } + + /** + * @param {string} runtime runtime + * @returns {string | number} the id of the runtime + */ + getRuntimeId(runtime) { + return this._runtimeIds.get(runtime); + } + + /** + * @param {string} runtime runtime + * @param {string | number} id the id of the runtime + * @returns {void} + */ + setRuntimeId(runtime, id) { + this._runtimeIds.set(runtime, id); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {ModuleHashInfo} hash + */ + _getModuleHashInfo(module, runtime) { + const cgm = this._getChunkGraphModule(module); + const hashes = cgm.hashes; + if (hashes && runtime === undefined) { + const hashInfoItems = new Set(hashes.values()); + if (hashInfoItems.size !== 1) { + throw new Error( + `No unique hash info entry for unspecified runtime for ${module.identifier()} (existing runtimes: ${Array.from( + hashes.keys(), + r => runtimeToString(r) + ).join(", ")}). +Caller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").` + ); + } + return hashInfoItems.values().next().value; + } else { + const hashInfo = hashes && hashes.get(runtime); + if (!hashInfo) { + throw new Error( + `Module ${module.identifier()} has no hash info for runtime ${runtimeToString( + runtime + )} (available runtimes ${ + hashes && Array.from(hashes.keys(), runtimeToString).join(", ") + })` + ); + } + return hashInfo; + } + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true, if the module has hashes for this runtime + */ + hasModuleHashes(module, runtime) { + const cgm = this._getChunkGraphModule(module); + const hashes = cgm.hashes; + return hashes && hashes.has(runtime); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {string} hash + */ + getModuleHash(module, runtime) { + return this._getModuleHashInfo(module, runtime).hash; + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {string} hash + */ + getRenderedModuleHash(module, runtime) { + return this._getModuleHashInfo(module, runtime).renderedHash; + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @param {string} hash the full hash + * @param {string} renderedHash the shortened hash for rendering + * @returns {void} + */ + setModuleHashes(module, runtime, hash, renderedHash) { + const cgm = this._getChunkGraphModule(module); + if (cgm.hashes === undefined) { + cgm.hashes = new RuntimeSpecMap(); + } + cgm.hashes.set(runtime, { hash, renderedHash }); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @param {Set} items runtime requirements to be added (ownership of this Set is given to ChunkGraph) + * @returns {void} + */ + addModuleRuntimeRequirements(module, runtime, items) { + const cgm = this._getChunkGraphModule(module); + const runtimeRequirementsMap = cgm.runtimeRequirements; + if (runtimeRequirementsMap === undefined) { + const map = new RuntimeSpecMap(); + map.set(runtime, items); + cgm.runtimeRequirements = map; + return; + } + runtimeRequirementsMap.update(runtime, runtimeRequirements => { + if (runtimeRequirements === undefined) { + return items; + } else if (runtimeRequirements.size >= items.size) { + for (const item of items) runtimeRequirements.add(item); + return runtimeRequirements; + } else { + for (const item of runtimeRequirements) items.add(item); + return items; + } + }); + } + + /** + * @param {Chunk} chunk the chunk + * @param {Set} items runtime requirements to be added (ownership of this Set is given to ChunkGraph) + * @returns {void} + */ + addChunkRuntimeRequirements(chunk, items) { + const cgc = this._getChunkGraphChunk(chunk); + const runtimeRequirements = cgc.runtimeRequirements; + if (runtimeRequirements === undefined) { + cgc.runtimeRequirements = items; + } else if (runtimeRequirements.size >= items.size) { + for (const item of items) runtimeRequirements.add(item); + } else { + for (const item of runtimeRequirements) items.add(item); + cgc.runtimeRequirements = items; + } + } + + /** + * @param {Chunk} chunk the chunk + * @param {Iterable} items runtime requirements to be added + * @returns {void} + */ + addTreeRuntimeRequirements(chunk, items) { + const cgc = this._getChunkGraphChunk(chunk); + const runtimeRequirements = cgc.runtimeRequirementsInTree; + for (const item of items) runtimeRequirements.add(item); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {ReadonlySet} runtime requirements + */ + getModuleRuntimeRequirements(module, runtime) { + const cgm = this._getChunkGraphModule(module); + const runtimeRequirements = + cgm.runtimeRequirements && cgm.runtimeRequirements.get(runtime); + return runtimeRequirements === undefined ? EMPTY_SET : runtimeRequirements; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {ReadonlySet} runtime requirements + */ + getChunkRuntimeRequirements(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + const runtimeRequirements = cgc.runtimeRequirements; + return runtimeRequirements === undefined ? EMPTY_SET : runtimeRequirements; + } + + /** + * @param {Chunk} chunk the chunk + * @returns {ReadonlySet} runtime requirements + */ + getTreeRuntimeRequirements(chunk) { + const cgc = this._getChunkGraphChunk(chunk); + return cgc.runtimeRequirementsInTree; + } + + // TODO remove in webpack 6 + /** + * @param {Module} module the module + * @param {string} deprecateMessage message for the deprecation message + * @param {string} deprecationCode code for the deprecation + * @returns {ChunkGraph} the chunk graph + */ + static getChunkGraphForModule(module, deprecateMessage, deprecationCode) { + const fn = deprecateGetChunkGraphForModuleMap.get(deprecateMessage); + if (fn) return fn(module); + const newFn = util.deprecate( + /** + * @param {Module} module the module + * @returns {ChunkGraph} the chunk graph + */ + module => { + const chunkGraph = chunkGraphForModuleMap.get(module); + if (!chunkGraph) + throw new Error( + deprecateMessage + + ": There was no ChunkGraph assigned to the Module for backward-compat (Use the new API)" + ); + return chunkGraph; + }, + deprecateMessage + ": Use new ChunkGraph API", + deprecationCode + ); + deprecateGetChunkGraphForModuleMap.set(deprecateMessage, newFn); + return newFn(module); + } + + // TODO remove in webpack 6 + /** + * @param {Module} module the module + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {void} + */ + static setChunkGraphForModule(module, chunkGraph) { + chunkGraphForModuleMap.set(module, chunkGraph); + } + + // TODO remove in webpack 6 + /** + * @param {Chunk} chunk the chunk + * @param {string} deprecateMessage message for the deprecation message + * @param {string} deprecationCode code for the deprecation + * @returns {ChunkGraph} the chunk graph + */ + static getChunkGraphForChunk(chunk, deprecateMessage, deprecationCode) { + const fn = deprecateGetChunkGraphForChunkMap.get(deprecateMessage); + if (fn) return fn(chunk); + const newFn = util.deprecate( + /** + * @param {Chunk} chunk the chunk + * @returns {ChunkGraph} the chunk graph + */ + chunk => { + const chunkGraph = chunkGraphForChunkMap.get(chunk); + if (!chunkGraph) + throw new Error( + deprecateMessage + + "There was no ChunkGraph assigned to the Chunk for backward-compat (Use the new API)" + ); + return chunkGraph; + }, + deprecateMessage + ": Use new ChunkGraph API", + deprecationCode + ); + deprecateGetChunkGraphForChunkMap.set(deprecateMessage, newFn); + return newFn(chunk); + } + + // TODO remove in webpack 6 + /** + * @param {Chunk} chunk the chunk + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {void} + */ + static setChunkGraphForChunk(chunk, chunkGraph) { + chunkGraphForChunkMap.set(chunk, chunkGraph); + } +} + +// TODO remove in webpack 6 +/** @type {WeakMap} */ +const chunkGraphForModuleMap = new WeakMap(); + +// TODO remove in webpack 6 +/** @type {WeakMap} */ +const chunkGraphForChunkMap = new WeakMap(); + +// TODO remove in webpack 6 +/** @type {Map ChunkGraph>} */ +const deprecateGetChunkGraphForModuleMap = new Map(); + +// TODO remove in webpack 6 +/** @type {Map ChunkGraph>} */ +const deprecateGetChunkGraphForChunkMap = new Map(); + +module.exports = ChunkGraph; + + +/***/ }), + +/***/ 57630: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const SortableSet = __webpack_require__(51326); +const { + compareLocations, + compareChunks, + compareIterables +} = __webpack_require__(21699); + +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Entrypoint")} Entrypoint */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ + +/** @typedef {{id: number}} HasId */ +/** @typedef {{module: Module, loc: DependencyLocation, request: string}} OriginRecord */ + +/** + * @typedef {Object} RawChunkGroupOptions + * @property {number=} preloadOrder + * @property {number=} prefetchOrder + */ + +/** @typedef {RawChunkGroupOptions & { name?: string }} ChunkGroupOptions */ + +let debugId = 5000; + +/** + * @template T + * @param {SortableSet} set set to convert to array. + * @returns {T[]} the array format of existing set + */ +const getArray = set => Array.from(set); + +/** + * A convenience method used to sort chunks based on their id's + * @param {ChunkGroup} a first sorting comparator + * @param {ChunkGroup} b second sorting comparator + * @returns {1|0|-1} a sorting index to determine order + */ +const sortById = (a, b) => { + if (a.id < b.id) return -1; + if (b.id < a.id) return 1; + return 0; +}; + +/** + * @param {OriginRecord} a the first comparator in sort + * @param {OriginRecord} b the second comparator in sort + * @returns {1|-1|0} returns sorting order as index + */ +const sortOrigin = (a, b) => { + const aIdent = a.module ? a.module.identifier() : ""; + const bIdent = b.module ? b.module.identifier() : ""; + if (aIdent < bIdent) return -1; + if (aIdent > bIdent) return 1; + return compareLocations(a.loc, b.loc); +}; + +class ChunkGroup { + /** + * Creates an instance of ChunkGroup. + * @param {string|ChunkGroupOptions=} options chunk group options passed to chunkGroup + */ + constructor(options) { + if (typeof options === "string") { + options = { name: options }; + } else if (!options) { + options = { name: undefined }; + } + /** @type {number} */ + this.groupDebugId = debugId++; + this.options = options; + /** @type {SortableSet} */ + this._children = new SortableSet(undefined, sortById); + /** @type {SortableSet} */ + this._parents = new SortableSet(undefined, sortById); + /** @type {SortableSet} */ + this._asyncEntrypoints = new SortableSet(undefined, sortById); + this._blocks = new SortableSet(); + /** @type {Chunk[]} */ + this.chunks = []; + /** @type {OriginRecord[]} */ + this.origins = []; + /** Indices in top-down order */ + /** @private @type {Map} */ + this._modulePreOrderIndices = new Map(); + /** Indices in bottom-up order */ + /** @private @type {Map} */ + this._modulePostOrderIndices = new Map(); + /** @type {number} */ + this.index = undefined; + } + + /** + * when a new chunk is added to a chunkGroup, addingOptions will occur. + * @param {ChunkGroupOptions} options the chunkGroup options passed to addOptions + * @returns {void} + */ + addOptions(options) { + for (const key of Object.keys(options)) { + if (this.options[key] === undefined) { + this.options[key] = options[key]; + } else if (this.options[key] !== options[key]) { + if (key.endsWith("Order")) { + this.options[key] = Math.max(this.options[key], options[key]); + } else { + throw new Error( + `ChunkGroup.addOptions: No option merge strategy for ${key}` + ); + } + } + } + } + + /** + * returns the name of current ChunkGroup + * @returns {string|undefined} returns the ChunkGroup name + */ + get name() { + return this.options.name; + } + + /** + * sets a new name for current ChunkGroup + * @param {string} value the new name for ChunkGroup + * @returns {void} + */ + set name(value) { + this.options.name = value; + } + + /* istanbul ignore next */ + /** + * get a uniqueId for ChunkGroup, made up of its member Chunk debugId's + * @returns {string} a unique concatenation of chunk debugId's + */ + get debugId() { + return Array.from(this.chunks, x => x.debugId).join("+"); + } + + /** + * get a unique id for ChunkGroup, made up of its member Chunk id's + * @returns {string} a unique concatenation of chunk ids + */ + get id() { + return Array.from(this.chunks, x => x.id).join("+"); + } + + /** + * Performs an unshift of a specific chunk + * @param {Chunk} chunk chunk being unshifted + * @returns {boolean} returns true if attempted chunk shift is accepted + */ + unshiftChunk(chunk) { + const oldIdx = this.chunks.indexOf(chunk); + if (oldIdx > 0) { + this.chunks.splice(oldIdx, 1); + this.chunks.unshift(chunk); + } else if (oldIdx < 0) { + this.chunks.unshift(chunk); + return true; + } + return false; + } + + /** + * inserts a chunk before another existing chunk in group + * @param {Chunk} chunk Chunk being inserted + * @param {Chunk} before Placeholder/target chunk marking new chunk insertion point + * @returns {boolean} return true if insertion was successful + */ + insertChunk(chunk, before) { + const oldIdx = this.chunks.indexOf(chunk); + const idx = this.chunks.indexOf(before); + if (idx < 0) { + throw new Error("before chunk not found"); + } + if (oldIdx >= 0 && oldIdx > idx) { + this.chunks.splice(oldIdx, 1); + this.chunks.splice(idx, 0, chunk); + } else if (oldIdx < 0) { + this.chunks.splice(idx, 0, chunk); + return true; + } + return false; + } + + /** + * add a chunk into ChunkGroup. Is pushed on or prepended + * @param {Chunk} chunk chunk being pushed into ChunkGroupS + * @returns {boolean} returns true if chunk addition was successful. + */ + pushChunk(chunk) { + const oldIdx = this.chunks.indexOf(chunk); + if (oldIdx >= 0) { + return false; + } + this.chunks.push(chunk); + return true; + } + + /** + * @param {Chunk} oldChunk chunk to be replaced + * @param {Chunk} newChunk New chunk that will be replaced with + * @returns {boolean} returns true if the replacement was successful + */ + replaceChunk(oldChunk, newChunk) { + const oldIdx = this.chunks.indexOf(oldChunk); + if (oldIdx < 0) return false; + const newIdx = this.chunks.indexOf(newChunk); + if (newIdx < 0) { + this.chunks[oldIdx] = newChunk; + return true; + } + if (newIdx < oldIdx) { + this.chunks.splice(oldIdx, 1); + return true; + } else if (newIdx !== oldIdx) { + this.chunks[oldIdx] = newChunk; + this.chunks.splice(newIdx, 1); + return true; + } + } + + /** + * @param {Chunk} chunk chunk to remove + * @returns {boolean} returns true if chunk was removed + */ + removeChunk(chunk) { + const idx = this.chunks.indexOf(chunk); + if (idx >= 0) { + this.chunks.splice(idx, 1); + return true; + } + return false; + } + + /** + * @returns {boolean} true, when this chunk group will be loaded on initial page load + */ + isInitial() { + return false; + } + + /** + * @param {ChunkGroup} group chunk group to add + * @returns {boolean} returns true if chunk group was added + */ + addChild(group) { + const size = this._children.size; + this._children.add(group); + return size !== this._children.size; + } + + /** + * @returns {ChunkGroup[]} returns the children of this group + */ + getChildren() { + return this._children.getFromCache(getArray); + } + + getNumberOfChildren() { + return this._children.size; + } + + get childrenIterable() { + return this._children; + } + + /** + * @param {ChunkGroup} group the chunk group to remove + * @returns {boolean} returns true if the chunk group was removed + */ + removeChild(group) { + if (!this._children.has(group)) { + return false; + } + + this._children.delete(group); + group.removeParent(this); + return true; + } + + /** + * @param {ChunkGroup} parentChunk the parent group to be added into + * @returns {boolean} returns true if this chunk group was added to the parent group + */ + addParent(parentChunk) { + if (!this._parents.has(parentChunk)) { + this._parents.add(parentChunk); + return true; + } + return false; + } + + /** + * @returns {ChunkGroup[]} returns the parents of this group + */ + getParents() { + return this._parents.getFromCache(getArray); + } + + getNumberOfParents() { + return this._parents.size; + } + + /** + * @param {ChunkGroup} parent the parent group + * @returns {boolean} returns true if the parent group contains this group + */ + hasParent(parent) { + return this._parents.has(parent); + } + + get parentsIterable() { + return this._parents; + } + + /** + * @param {ChunkGroup} chunkGroup the parent group + * @returns {boolean} returns true if this group has been removed from the parent + */ + removeParent(chunkGroup) { + if (this._parents.delete(chunkGroup)) { + chunkGroup.removeChild(this); + return true; + } + return false; + } + + /** + * @param {Entrypoint} entrypoint entrypoint to add + * @returns {boolean} returns true if entrypoint was added + */ + addAsyncEntrypoint(entrypoint) { + const size = this._asyncEntrypoints.size; + this._asyncEntrypoints.add(entrypoint); + return size !== this._asyncEntrypoints.size; + } + + get asyncEntrypointsIterable() { + return this._asyncEntrypoints; + } + + /** + * @returns {Array} an array containing the blocks + */ + getBlocks() { + return this._blocks.getFromCache(getArray); + } + + getNumberOfBlocks() { + return this._blocks.size; + } + + hasBlock(block) { + return this._blocks.has(block); + } + + /** + * @returns {Iterable} blocks + */ + get blocksIterable() { + return this._blocks; + } + + /** + * @param {AsyncDependenciesBlock} block a block + * @returns {boolean} false, if block was already added + */ + addBlock(block) { + if (!this._blocks.has(block)) { + this._blocks.add(block); + return true; + } + return false; + } + + /** + * @param {Module} module origin module + * @param {DependencyLocation} loc location of the reference in the origin module + * @param {string} request request name of the reference + * @returns {void} + */ + addOrigin(module, loc, request) { + this.origins.push({ + module, + loc, + request + }); + } + + /** + * @returns {string[]} the files contained this chunk group + */ + getFiles() { + const files = new Set(); + + for (const chunk of this.chunks) { + for (const file of chunk.files) { + files.add(file); + } + } + + return Array.from(files); + } + + /** + * @returns {void} + */ + remove() { + // cleanup parents + for (const parentChunkGroup of this._parents) { + // remove this chunk from its parents + parentChunkGroup._children.delete(this); + + // cleanup "sub chunks" + for (const chunkGroup of this._children) { + /** + * remove this chunk as "intermediary" and connect + * it "sub chunks" and parents directly + */ + // add parent to each "sub chunk" + chunkGroup.addParent(parentChunkGroup); + // add "sub chunk" to parent + parentChunkGroup.addChild(chunkGroup); + } + } + + /** + * we need to iterate again over the children + * to remove this from the child's parents. + * This can not be done in the above loop + * as it is not guaranteed that `this._parents` contains anything. + */ + for (const chunkGroup of this._children) { + // remove this as parent of every "sub chunk" + chunkGroup._parents.delete(this); + } + + // remove chunks + for (const chunk of this.chunks) { + chunk.removeGroup(this); + } + } + + sortItems() { + this.origins.sort(sortOrigin); + } + + /** + * Sorting predicate which allows current ChunkGroup to be compared against another. + * Sorting values are based off of number of chunks in ChunkGroup. + * + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {ChunkGroup} otherGroup the chunkGroup to compare this against + * @returns {-1|0|1} sort position for comparison + */ + compareTo(chunkGraph, otherGroup) { + if (this.chunks.length > otherGroup.chunks.length) return -1; + if (this.chunks.length < otherGroup.chunks.length) return 1; + return compareIterables(compareChunks(chunkGraph))( + this.chunks, + otherGroup.chunks + ); + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {Record} mapping from children type to ordered list of ChunkGroups + */ + getChildrenByOrders(moduleGraph, chunkGraph) { + /** @type {Map} */ + const lists = new Map(); + for (const childGroup of this._children) { + for (const key of Object.keys(childGroup.options)) { + if (key.endsWith("Order")) { + const name = key.substr(0, key.length - "Order".length); + let list = lists.get(name); + if (list === undefined) { + lists.set(name, (list = [])); + } + list.push({ + order: childGroup.options[key], + group: childGroup + }); + } + } + } + /** @type {Record} */ + const result = Object.create(null); + for (const [name, list] of lists) { + list.sort((a, b) => { + const cmp = b.order - a.order; + if (cmp !== 0) return cmp; + return a.group.compareTo(chunkGraph, b.group); + }); + result[name] = list.map(i => i.group); + } + return result; + } + + /** + * Sets the top-down index of a module in this ChunkGroup + * @param {Module} module module for which the index should be set + * @param {number} index the index of the module + * @returns {void} + */ + setModulePreOrderIndex(module, index) { + this._modulePreOrderIndices.set(module, index); + } + + /** + * Gets the top-down index of a module in this ChunkGroup + * @param {Module} module the module + * @returns {number} index + */ + getModulePreOrderIndex(module) { + return this._modulePreOrderIndices.get(module); + } + + /** + * Sets the bottom-up index of a module in this ChunkGroup + * @param {Module} module module for which the index should be set + * @param {number} index the index of the module + * @returns {void} + */ + setModulePostOrderIndex(module, index) { + this._modulePostOrderIndices.set(module, index); + } + + /** + * Gets the bottom-up index of a module in this ChunkGroup + * @param {Module} module the module + * @returns {number} index + */ + getModulePostOrderIndex(module) { + return this._modulePostOrderIndices.get(module); + } + + /* istanbul ignore next */ + checkConstraints() { + const chunk = this; + for (const child of chunk._children) { + if (!child._parents.has(chunk)) { + throw new Error( + `checkConstraints: child missing parent ${chunk.debugId} -> ${child.debugId}` + ); + } + } + for (const parentChunk of chunk._parents) { + if (!parentChunk._children.has(chunk)) { + throw new Error( + `checkConstraints: parent missing child ${parentChunk.debugId} <- ${chunk.debugId}` + ); + } + } + } +} + +ChunkGroup.prototype.getModuleIndex = util.deprecate( + ChunkGroup.prototype.getModulePreOrderIndex, + "ChunkGroup.getModuleIndex was renamed to getModulePreOrderIndex", + "DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX" +); + +ChunkGroup.prototype.getModuleIndex2 = util.deprecate( + ChunkGroup.prototype.getModulePostOrderIndex, + "ChunkGroup.getModuleIndex2 was renamed to getModulePostOrderIndex", + "DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX_2" +); + +module.exports = ChunkGroup; + + +/***/ }), + +/***/ 4438: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Chunk")} Chunk */ + +class ChunkRenderError extends WebpackError { + /** + * Create a new ChunkRenderError + * @param {Chunk} chunk A chunk + * @param {string} file Related file + * @param {Error} error Original error + */ + constructor(chunk, file, error) { + super(); + + this.name = "ChunkRenderError"; + this.error = error; + this.message = error.message; + this.details = error.stack; + this.file = file; + this.chunk = chunk; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ChunkRenderError; + + +/***/ }), + +/***/ 84454: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const memoize = __webpack_require__(18003); + +/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */ +/** @typedef {import("./Compilation")} Compilation */ + +const getJavascriptModulesPlugin = memoize(() => + __webpack_require__(80867) +); + +// TODO webpack 6 remove this class +class ChunkTemplate { + /** + * @param {OutputOptions} outputOptions output options + * @param {Compilation} compilation the compilation + */ + constructor(outputOptions, compilation) { + this._outputOptions = outputOptions || {}; + this.hooks = Object.freeze({ + renderManifest: { + tap: util.deprecate( + (options, fn) => { + compilation.hooks.renderManifest.tap( + options, + (entries, options) => { + if (options.chunk.hasRuntime()) return entries; + return fn(entries, options); + } + ); + }, + "ChunkTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_MANIFEST" + ) + }, + modules: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .renderChunk.tap(options, (source, renderContext) => + fn( + source, + compilation.moduleTemplates.javascript, + renderContext + ) + ); + }, + "ChunkTemplate.hooks.modules is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderChunk instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_MODULES" + ) + }, + render: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .renderChunk.tap(options, (source, renderContext) => + fn( + source, + compilation.moduleTemplates.javascript, + renderContext + ) + ); + }, + "ChunkTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderChunk instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER" + ) + }, + renderWithEntry: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .render.tap(options, (source, renderContext) => { + if ( + renderContext.chunkGraph.getNumberOfEntryModules( + renderContext.chunk + ) === 0 || + renderContext.chunk.hasRuntime() + ) { + return source; + } + return fn(source, renderContext.chunk); + }); + }, + "ChunkTemplate.hooks.renderWithEntry is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_WITH_ENTRY" + ) + }, + hash: { + tap: util.deprecate( + (options, fn) => { + compilation.hooks.fullHash.tap(options, fn); + }, + "ChunkTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_HASH" + ) + }, + hashForChunk: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .chunkHash.tap(options, (chunk, hash, context) => { + if (chunk.hasRuntime()) return; + fn(hash, chunk, context); + }); + }, + "ChunkTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_HASH_FOR_CHUNK" + ) + } + }); + } +} + +Object.defineProperty(ChunkTemplate.prototype, "outputOptions", { + get: util.deprecate( + /** + * @this {ChunkTemplate} + * @returns {OutputOptions} output options + */ + function () { + return this._outputOptions; + }, + "ChunkTemplate.outputOptions is deprecated (use Compilation.outputOptions instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_OUTPUT_OPTIONS" + ) +}); + +module.exports = ChunkTemplate; + + +/***/ }), + +/***/ 7702: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Module")} Module */ + +class CodeGenerationError extends WebpackError { + /** + * Create a new CodeGenerationError + * @param {Module} module related module + * @param {Error} error Original error + */ + constructor(module, error) { + super(); + + this.name = "CodeGenerationError"; + this.error = error; + this.message = error.message; + this.details = error.stack; + this.module = module; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = CodeGenerationError; + + +/***/ }), + +/***/ 71051: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { runtimeToString, RuntimeSpecMap } = __webpack_require__(43478); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +class CodeGenerationResults { + constructor() { + /** @type {Map>} */ + this.map = new Map(); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @returns {CodeGenerationResult} the CodeGenerationResult + */ + get(module, runtime) { + const entry = this.map.get(module); + if (entry === undefined) { + throw new Error( + `No code generation entry for ${module.identifier()} (existing entries: ${Array.from( + this.map.keys(), + m => m.identifier() + ).join(", ")})` + ); + } + if (runtime === undefined) { + const results = new Set(entry.values()); + if (results.size !== 1) { + throw new Error( + `No unique code generation entry for unspecified runtime for ${module.identifier()} (existing runtimes: ${Array.from( + entry.keys(), + r => runtimeToString(r) + ).join(", ")}). +Caller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").` + ); + } + return results.values().next().value; + } else { + const result = entry.get(runtime); + if (result === undefined) { + throw new Error( + `No code generation entry for runtime ${runtimeToString( + runtime + )} for ${module.identifier()} (existing runtimes: ${Array.from( + entry.keys(), + r => runtimeToString(r) + ).join(", ")})` + ); + } + return result; + } + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @param {string} sourceType the source type + * @returns {Source} a source + */ + getSource(module, runtime, sourceType) { + return this.get(module, runtime).sources.get(sourceType); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @returns {ReadonlySet} runtime requirements + */ + getRuntimeRequirements(module, runtime) { + return this.get(module, runtime).runtimeRequirements; + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @param {string} key data key + * @returns {any} data generated by code generation + */ + getData(module, runtime, key) { + const data = this.get(module, runtime).data; + return data === undefined ? undefined : data.get(key); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime runtime(s) + * @param {CodeGenerationResult} result result from module + * @returns {void} + */ + add(module, runtime, result) { + const map = this.map.get(module); + if (map !== undefined) { + map.set(runtime, result); + } else { + const newMap = new RuntimeSpecMap(); + newMap.set(runtime, result); + this.map.set(module, newMap); + } + } +} + +module.exports = CodeGenerationResults; + + +/***/ }), + +/***/ 41985: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ + +class CommentCompilationWarning extends WebpackError { + /** + * + * @param {string} message warning message + * @param {DependencyLocation} loc affected lines of code + */ + constructor(message, loc) { + super(message); + + this.name = "CommentCompilationWarning"; + + this.loc = loc; + + Error.captureStackTrace(this, this.constructor); + } +} + +makeSerializable( + CommentCompilationWarning, + "webpack/lib/CommentCompilationWarning" +); + +module.exports = CommentCompilationWarning; + + +/***/ }), + +/***/ 94701: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ConstDependency = __webpack_require__(9364); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ + +const nestedWebpackRequireTag = Symbol("nested __webpack_require__"); + +class CompatibilityPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "CompatibilityPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("CompatibilityPlugin", (parser, parserOptions) => { + if ( + parserOptions.browserify !== undefined && + !parserOptions.browserify + ) + return; + + parser.hooks.call + .for("require") + .tap("CompatibilityPlugin", expr => { + // support for browserify style require delegator: "require(o, !0)" + if (expr.arguments.length !== 2) return; + const second = parser.evaluateExpression(expr.arguments[1]); + if (!second.isBoolean()) return; + if (second.asBool() !== true) return; + const dep = new ConstDependency("require", expr.callee.range); + dep.loc = expr.loc; + if (parser.state.current.dependencies.length > 0) { + const last = + parser.state.current.dependencies[ + parser.state.current.dependencies.length - 1 + ]; + if ( + last.critical && + last.options && + last.options.request === "." && + last.userRequest === "." && + last.options.recursive + ) + parser.state.current.dependencies.pop(); + } + parser.state.module.addPresentationalDependency(dep); + return true; + }); + }); + + /** + * @param {JavascriptParser} parser the parser + * @returns {void} + */ + const nestedWebpackRequireHandler = parser => { + parser.hooks.preStatement.tap("CompatibilityPlugin", statement => { + if ( + statement.type === "FunctionDeclaration" && + statement.id && + statement.id.name === "__webpack_require__" + ) { + const newName = `__nested_webpack_require_${statement.range[0]}__`; + parser.tagVariable(statement.id.name, nestedWebpackRequireTag, { + name: newName, + declaration: { + updated: false, + loc: statement.id.loc, + range: statement.id.range + } + }); + return true; + } + }); + parser.hooks.pattern + .for("__webpack_require__") + .tap("CompatibilityPlugin", pattern => { + const newName = `__nested_webpack_require_${pattern.range[0]}__`; + parser.tagVariable(pattern.name, nestedWebpackRequireTag, { + name: newName, + declaration: { + updated: false, + loc: pattern.loc, + range: pattern.range + } + }); + return true; + }); + parser.hooks.expression + .for(nestedWebpackRequireTag) + .tap("CompatibilityPlugin", expr => { + const { name, declaration } = parser.currentTagData; + if (!declaration.updated) { + const dep = new ConstDependency(name, declaration.range); + dep.loc = declaration.loc; + parser.state.module.addPresentationalDependency(dep); + declaration.updated = true; + } + const dep = new ConstDependency(name, expr.range); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("CompatibilityPlugin", nestedWebpackRequireHandler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("CompatibilityPlugin", nestedWebpackRequireHandler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("CompatibilityPlugin", nestedWebpackRequireHandler); + } + ); + } +} +module.exports = CompatibilityPlugin; + + +/***/ }), + +/***/ 75388: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const { + HookMap, + SyncHook, + SyncBailHook, + SyncWaterfallHook, + AsyncSeriesHook, + AsyncSeriesBailHook +} = __webpack_require__(18416); +const util = __webpack_require__(31669); +const { CachedSource } = __webpack_require__(55600); +const { MultiItemCache } = __webpack_require__(12628); +const Chunk = __webpack_require__(92787); +const ChunkGraph = __webpack_require__(67518); +const ChunkGroup = __webpack_require__(57630); +const ChunkRenderError = __webpack_require__(4438); +const ChunkTemplate = __webpack_require__(84454); +const CodeGenerationError = __webpack_require__(7702); +const CodeGenerationResults = __webpack_require__(71051); +const DependencyTemplates = __webpack_require__(13563); +const Entrypoint = __webpack_require__(33660); +const ErrorHelpers = __webpack_require__(31183); +const FileSystemInfo = __webpack_require__(50177); +const { + connectChunkGroupAndChunk, + connectChunkGroupParentAndChild +} = __webpack_require__(92065); +const { makeWebpackError } = __webpack_require__(14953); +const MainTemplate = __webpack_require__(17836); +const Module = __webpack_require__(54031); +const ModuleDependencyError = __webpack_require__(1939); +const ModuleDependencyWarning = __webpack_require__(57570); +const ModuleGraph = __webpack_require__(73444); +const ModuleNotFoundError = __webpack_require__(71318); +const ModuleProfile = __webpack_require__(89399); +const ModuleRestoreError = __webpack_require__(61938); +const ModuleStoreError = __webpack_require__(20027); +const ModuleTemplate = __webpack_require__(67127); +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeTemplate = __webpack_require__(2493); +const Stats = __webpack_require__(49487); +const WebpackError = __webpack_require__(24274); +const buildChunkGraph = __webpack_require__(25413); +const BuildCycleError = __webpack_require__(12339); +const { Logger, LogType } = __webpack_require__(26655); +const StatsFactory = __webpack_require__(18027); +const StatsPrinter = __webpack_require__(28931); +const { equals: arrayEquals } = __webpack_require__(92459); +const AsyncQueue = __webpack_require__(51921); +const LazySet = __webpack_require__(60248); +const { cachedCleverMerge } = __webpack_require__(92700); +const { + compareLocations, + concatComparators, + compareSelect, + compareIds, + compareStringsNumeric, + compareModulesByIdentifier +} = __webpack_require__(21699); +const createHash = __webpack_require__(34627); +const { + arrayToSetDeprecation, + soonFrozenObjectDeprecation, + createFakeHook +} = __webpack_require__(57651); +const { getRuntimeKey } = __webpack_require__(43478); +const { isSourceEqual } = __webpack_require__(73212); + +/** @template T @typedef {import("tapable").AsArray} AsArray */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").EntryDescriptionNormalized} EntryDescription */ +/** @typedef {import("../declarations/WebpackOptions").OutputNormalized} OutputOptions */ +/** @typedef {import("../declarations/WebpackOptions").StatsOptions} StatsOptions */ +/** @typedef {import("../declarations/WebpackOptions").WebpackPluginFunction} WebpackPluginFunction */ +/** @typedef {import("../declarations/WebpackOptions").WebpackPluginInstance} WebpackPluginInstance */ +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./Cache")} Cache */ +/** @typedef {import("./CacheFacade")} CacheFacade */ +/** @typedef {import("./ChunkGroup").ChunkGroupOptions} ChunkGroupOptions */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("./DependencyTemplate")} DependencyTemplate */ +/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ +/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("./ModuleFactory")} ModuleFactory */ +/** @typedef {import("./ModuleFactory").ModuleFactoryCreateDataContextInfo} ModuleFactoryCreateDataContextInfo */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./RuntimeModule")} RuntimeModule */ +/** @typedef {import("./Template").RenderManifestEntry} RenderManifestEntry */ +/** @typedef {import("./Template").RenderManifestOptions} RenderManifestOptions */ +/** @typedef {import("./util/Hash")} Hash */ +/** @template T @typedef {import("./util/deprecation").FakeHook} FakeHook */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * @callback Callback + * @param {WebpackError=} err + * @returns {void} + */ + +/** + * @callback ModuleCallback + * @param {WebpackError=} err + * @param {Module=} result + * @returns {void} + */ + +/** + * @callback DepBlockVarDependenciesCallback + * @param {Dependency} dependency + * @returns {any} + */ + +/** @typedef {new (...args: any[]) => Dependency} DepConstructor */ +/** @typedef {Record} CompilationAssets */ + +/** + * @typedef {Object} AvailableModulesChunkGroupMapping + * @property {ChunkGroup} chunkGroup + * @property {Set} availableModules + * @property {boolean} needCopy + */ + +/** + * @typedef {Object} DependenciesBlockLike + * @property {Dependency[]} dependencies + * @property {AsyncDependenciesBlock[]} blocks + */ + +/** + * @typedef {Object} ChunkPathData + * @property {string|number} id + * @property {string=} name + * @property {string} hash + * @property {function(number): string=} hashWithLength + * @property {(Record)=} contentHash + * @property {(Record string>)=} contentHashWithLength + */ + +/** + * @typedef {Object} ChunkHashContext + * @property {RuntimeTemplate} runtimeTemplate the runtime template + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + */ + +/** + * @typedef {Object} EntryData + * @property {Dependency[]} dependencies dependencies of the entrypoint that should be evaluated at startup + * @property {Dependency[]} includeDependencies dependencies of the entrypoint that should be included but not evaluated + * @property {EntryOptions} options options of the entrypoint + */ + +/** + * @typedef {Object} LogEntry + * @property {string} type + * @property {any[]} args + * @property {number} time + * @property {string[]=} trace + */ + +/** + * @typedef {Object} KnownAssetInfo + * @property {boolean=} immutable true, if the asset can be long term cached forever (contains a hash) + * @property {boolean=} minimized whether the asset is minimized + * @property {string | string[]=} fullhash the value(s) of the full hash used for this asset + * @property {string | string[]=} chunkhash the value(s) of the chunk hash used for this asset + * @property {string | string[]=} modulehash the value(s) of the module hash used for this asset + * @property {string | string[]=} contenthash the value(s) of the content hash used for this asset + * @property {string=} sourceFilename when asset was created from a source file (potentially transformed), the original filename relative to compilation context + * @property {number=} size size in bytes, only set after asset has been emitted + * @property {boolean=} development true, when asset is only used for development and doesn't count towards user-facing assets + * @property {boolean=} hotModuleReplacement true, when asset ships data for updating an existing application (HMR) + * @property {boolean=} javascriptModule true, when asset is javascript and an ESM + * @property {Record=} related object of pointers to other assets, keyed by type of relation (only points from parent to child) + */ + +/** @typedef {KnownAssetInfo & Record} AssetInfo */ + +/** + * @typedef {Object} Asset + * @property {string} name the filename of the asset + * @property {Source} source source of the asset + * @property {AssetInfo} info info about the asset + */ + +/** + * @typedef {Object} ModulePathData + * @property {string|number} id + * @property {string} hash + * @property {function(number): string=} hashWithLength + */ + +/** + * @typedef {Object} PathData + * @property {ChunkGraph=} chunkGraph + * @property {string=} hash + * @property {function(number): string=} hashWithLength + * @property {(Chunk|ChunkPathData)=} chunk + * @property {(Module|ModulePathData)=} module + * @property {RuntimeSpec=} runtime + * @property {string=} filename + * @property {string=} basename + * @property {string=} query + * @property {string=} contentHashType + * @property {string=} contentHash + * @property {function(number): string=} contentHashWithLength + * @property {boolean=} noChunkHash + * @property {string=} url + */ + +/** + * @typedef {Object} KnownNormalizedStatsOptions + * @property {string} context + * @property {RequestShortener} requestShortener + * @property {string} chunksSort + * @property {string} modulesSort + * @property {string} chunkModulesSort + * @property {string} nestedModulesSort + * @property {string} assetsSort + * @property {boolean} ids + * @property {boolean} cachedAssets + * @property {boolean} groupAssetsByEmitStatus + * @property {boolean} groupAssetsByPath + * @property {boolean} groupAssetsByExtension + * @property {number} assetsSpace + * @property {Function[]} excludeAssets + * @property {Function[]} excludeModules + * @property {Function[]} warningsFilter + * @property {boolean} cachedModules + * @property {boolean} orphanModules + * @property {boolean} dependentModules + * @property {boolean} runtimeModules + * @property {boolean} groupModulesByCacheStatus + * @property {boolean} groupModulesByLayer + * @property {boolean} groupModulesByAttributes + * @property {boolean} groupModulesByPath + * @property {boolean} groupModulesByExtension + * @property {boolean} groupModulesByType + * @property {boolean | "auto"} entrypoints + * @property {boolean} chunkGroups + * @property {boolean} chunkGroupAuxiliary + * @property {boolean} chunkGroupChildren + * @property {number} chunkGroupMaxAssets + * @property {number} modulesSpace + * @property {number} chunkModulesSpace + * @property {number} nestedModulesSpace + * @property {false|"none"|"error"|"warn"|"info"|"log"|"verbose"} logging + * @property {Function[]} loggingDebug + * @property {boolean} loggingTrace + * @property {any} _env + */ + +/** @typedef {KnownNormalizedStatsOptions & StatsOptions & Record} NormalizedStatsOptions */ + +/** + * @typedef {Object} KnownCreateStatsOptionsContext + * @property {boolean=} forToString + */ + +/** @typedef {KnownCreateStatsOptionsContext & Record} CreateStatsOptionsContext */ + +/** @type {AssetInfo} */ +const EMPTY_ASSET_INFO = Object.freeze({}); + +const esmDependencyCategory = "esm"; +// TODO webpack 6: remove +const deprecatedNormalModuleLoaderHook = util.deprecate( + compilation => { + return __webpack_require__(88376).getCompilationHooks(compilation).loader; + }, + "Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader", + "DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK" +); + +const byId = compareSelect( + /** + * @param {Chunk} c chunk + * @returns {number | string} id + */ c => c.id, + compareIds +); + +const byNameOrHash = concatComparators( + compareSelect( + /** + * @param {Compilation} c compilation + * @returns {string} name + */ + c => c.name, + compareIds + ), + compareSelect( + /** + * @param {Compilation} c compilation + * @returns {string} hash + */ c => c.fullHash, + compareIds + ) +); + +const byMessage = compareSelect(err => `${err.message}`, compareStringsNumeric); + +const byModule = compareSelect( + err => (err.module && err.module.identifier()) || "", + compareStringsNumeric +); + +const byLocation = compareSelect(err => err.loc, compareLocations); + +const compareErrors = concatComparators(byModule, byLocation, byMessage); + +class Compilation { + /** + * Creates an instance of Compilation. + * @param {Compiler} compiler the compiler which created the compilation + */ + constructor(compiler) { + const getNormalModuleLoader = () => deprecatedNormalModuleLoaderHook(this); + /** @typedef {{ additionalAssets?: true | Function }} ProcessAssetsAdditionalOptions */ + /** @type {AsyncSeriesHook<[CompilationAssets], ProcessAssetsAdditionalOptions>} */ + const processAssetsHook = new AsyncSeriesHook(["assets"]); + + let savedAssets = new Set(); + const popNewAssets = assets => { + let newAssets = undefined; + for (const file of Object.keys(assets)) { + if (savedAssets.has(file)) continue; + if (newAssets === undefined) { + newAssets = Object.create(null); + } + newAssets[file] = assets[file]; + savedAssets.add(file); + } + return newAssets; + }; + processAssetsHook.intercept({ + name: "Compilation", + call: () => { + savedAssets = new Set(Object.keys(this.assets)); + }, + register: tap => { + const { type, name } = tap; + const { fn, additionalAssets, ...remainingTap } = tap; + const additionalAssetsFn = + additionalAssets === true ? fn : additionalAssets; + let processedAssets = undefined; + switch (type) { + case "sync": + if (additionalAssetsFn) { + this.hooks.processAdditionalAssets.tap(name, assets => { + if (processedAssets === this.assets) additionalAssetsFn(assets); + }); + } + return { + ...remainingTap, + type: "async", + fn: (assets, callback) => { + try { + fn(assets); + } catch (e) { + return callback(e); + } + processedAssets = this.assets; + const newAssets = popNewAssets(assets); + if (newAssets !== undefined) { + this.hooks.processAdditionalAssets.callAsync( + newAssets, + callback + ); + return; + } + callback(); + } + }; + case "async": + if (additionalAssetsFn) { + this.hooks.processAdditionalAssets.tapAsync( + name, + (assets, callback) => { + if (processedAssets === this.assets) + return additionalAssetsFn(assets, callback); + callback(); + } + ); + } + return { + ...remainingTap, + fn: (assets, callback) => { + fn(assets, err => { + if (err) return callback(err); + processedAssets = this.assets; + const newAssets = popNewAssets(assets); + if (newAssets !== undefined) { + this.hooks.processAdditionalAssets.callAsync( + newAssets, + callback + ); + return; + } + callback(); + }); + } + }; + case "promise": + if (additionalAssetsFn) { + this.hooks.processAdditionalAssets.tapPromise(name, assets => { + if (processedAssets === this.assets) + return additionalAssetsFn(assets); + return Promise.resolve(); + }); + } + return { + ...remainingTap, + fn: assets => { + const p = fn(assets); + if (!p || !p.then) return p; + return p.then(() => { + processedAssets = this.assets; + const newAssets = popNewAssets(assets); + if (newAssets !== undefined) { + return this.hooks.processAdditionalAssets.promise( + newAssets + ); + } + }); + } + }; + } + } + }); + + /** @type {SyncHook<[CompilationAssets]>} */ + const afterProcessAssetsHook = new SyncHook(["assets"]); + + /** + * @template T + * @param {string} name name of the hook + * @param {number} stage new stage + * @param {function(): AsArray} getArgs get old hook function args + * @param {string=} code deprecation code (not deprecated when unset) + * @returns {FakeHook, "tap" | "tapAsync" | "tapPromise" | "name">>} fake hook which redirects + */ + const createProcessAssetsHook = (name, stage, getArgs, code) => { + const errorMessage = reason => `Can't automatically convert plugin using Compilation.hooks.${name} to Compilation.hooks.processAssets because ${reason}. +BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a single Compilation.hooks.processAssets hook.`; + const getOptions = options => { + if (typeof options === "string") options = { name: options }; + if (options.stage) { + throw new Error(errorMessage("it's using the 'stage' option")); + } + return { ...options, stage: stage }; + }; + return createFakeHook( + { + name, + /** @type {AsyncSeriesHook["intercept"]} */ + intercept(interceptor) { + throw new Error(errorMessage("it's using 'intercept'")); + }, + /** @type {AsyncSeriesHook["tap"]} */ + tap: (options, fn) => { + processAssetsHook.tap(getOptions(options), () => fn(...getArgs())); + }, + /** @type {AsyncSeriesHook["tapAsync"]} */ + tapAsync: (options, fn) => { + processAssetsHook.tapAsync( + getOptions(options), + (assets, callback) => + /** @type {any} */ (fn)(...getArgs(), callback) + ); + }, + /** @type {AsyncSeriesHook["tapPromise"]} */ + tapPromise: (options, fn) => { + processAssetsHook.tapPromise(getOptions(options), () => + fn(...getArgs()) + ); + } + }, + `${name} is deprecated (use Compilation.hook.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option)`, + code + ); + }; + this.hooks = Object.freeze({ + /** @type {SyncHook<[Module]>} */ + buildModule: new SyncHook(["module"]), + /** @type {SyncHook<[Module]>} */ + rebuildModule: new SyncHook(["module"]), + /** @type {SyncHook<[Module, WebpackError]>} */ + failedModule: new SyncHook(["module", "error"]), + /** @type {SyncHook<[Module]>} */ + succeedModule: new SyncHook(["module"]), + /** @type {SyncHook<[Module]>} */ + stillValidModule: new SyncHook(["module"]), + + /** @type {SyncHook<[Dependency, EntryOptions]>} */ + addEntry: new SyncHook(["entry", "options"]), + /** @type {SyncHook<[Dependency, EntryOptions, Error]>} */ + failedEntry: new SyncHook(["entry", "options", "error"]), + /** @type {SyncHook<[Dependency, EntryOptions, Module]>} */ + succeedEntry: new SyncHook(["entry", "options", "module"]), + + /** @type {SyncWaterfallHook<[(string[] | ReferencedExport)[], Dependency, RuntimeSpec]>} */ + dependencyReferencedExports: new SyncWaterfallHook([ + "referencedExports", + "dependency", + "runtime" + ]), + + /** @type {AsyncSeriesHook<[Iterable]>} */ + finishModules: new AsyncSeriesHook(["modules"]), + /** @type {AsyncSeriesHook<[Module]>} */ + finishRebuildingModule: new AsyncSeriesHook(["module"]), + /** @type {SyncHook<[]>} */ + unseal: new SyncHook([]), + /** @type {SyncHook<[]>} */ + seal: new SyncHook([]), + + /** @type {SyncHook<[]>} */ + beforeChunks: new SyncHook([]), + /** @type {SyncHook<[Iterable]>} */ + afterChunks: new SyncHook(["chunks"]), + + /** @type {SyncBailHook<[Iterable]>} */ + optimizeDependencies: new SyncBailHook(["modules"]), + /** @type {SyncHook<[Iterable]>} */ + afterOptimizeDependencies: new SyncHook(["modules"]), + + /** @type {SyncHook<[]>} */ + optimize: new SyncHook([]), + /** @type {SyncBailHook<[Iterable]>} */ + optimizeModules: new SyncBailHook(["modules"]), + /** @type {SyncHook<[Iterable]>} */ + afterOptimizeModules: new SyncHook(["modules"]), + + /** @type {SyncBailHook<[Iterable, ChunkGroup[]]>} */ + optimizeChunks: new SyncBailHook(["chunks", "chunkGroups"]), + /** @type {SyncHook<[Iterable, ChunkGroup[]]>} */ + afterOptimizeChunks: new SyncHook(["chunks", "chunkGroups"]), + + /** @type {AsyncSeriesHook<[Iterable, Iterable]>} */ + optimizeTree: new AsyncSeriesHook(["chunks", "modules"]), + /** @type {SyncHook<[Iterable, Iterable]>} */ + afterOptimizeTree: new SyncHook(["chunks", "modules"]), + + /** @type {AsyncSeriesBailHook<[Iterable, Iterable]>} */ + optimizeChunkModules: new AsyncSeriesBailHook(["chunks", "modules"]), + /** @type {SyncHook<[Iterable, Iterable]>} */ + afterOptimizeChunkModules: new SyncHook(["chunks", "modules"]), + /** @type {SyncBailHook<[], boolean>} */ + shouldRecord: new SyncBailHook([]), + + /** @type {SyncHook<[Chunk, Set]>} */ + additionalChunkRuntimeRequirements: new SyncHook([ + "chunk", + "runtimeRequirements" + ]), + /** @type {HookMap]>>} */ + runtimeRequirementInChunk: new HookMap( + () => new SyncBailHook(["chunk", "runtimeRequirements"]) + ), + /** @type {SyncHook<[Module, Set]>} */ + additionalModuleRuntimeRequirements: new SyncHook([ + "module", + "runtimeRequirements" + ]), + /** @type {HookMap]>>} */ + runtimeRequirementInModule: new HookMap( + () => new SyncBailHook(["module", "runtimeRequirements"]) + ), + /** @type {SyncHook<[Chunk, Set]>} */ + additionalTreeRuntimeRequirements: new SyncHook([ + "chunk", + "runtimeRequirements" + ]), + /** @type {HookMap]>>} */ + runtimeRequirementInTree: new HookMap( + () => new SyncBailHook(["chunk", "runtimeRequirements"]) + ), + + /** @type {SyncHook<[RuntimeModule, Chunk]>} */ + runtimeModule: new SyncHook(["module", "chunk"]), + + /** @type {SyncHook<[Iterable, any]>} */ + reviveModules: new SyncHook(["modules", "records"]), + /** @type {SyncHook<[Iterable]>} */ + beforeModuleIds: new SyncHook(["modules"]), + /** @type {SyncHook<[Iterable]>} */ + moduleIds: new SyncHook(["modules"]), + /** @type {SyncHook<[Iterable]>} */ + optimizeModuleIds: new SyncHook(["modules"]), + /** @type {SyncHook<[Iterable]>} */ + afterOptimizeModuleIds: new SyncHook(["modules"]), + + /** @type {SyncHook<[Iterable, any]>} */ + reviveChunks: new SyncHook(["chunks", "records"]), + /** @type {SyncHook<[Iterable]>} */ + beforeChunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook<[Iterable]>} */ + chunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook<[Iterable]>} */ + optimizeChunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook<[Iterable]>} */ + afterOptimizeChunkIds: new SyncHook(["chunks"]), + + /** @type {SyncHook<[Iterable, any]>} */ + recordModules: new SyncHook(["modules", "records"]), + /** @type {SyncHook<[Iterable, any]>} */ + recordChunks: new SyncHook(["chunks", "records"]), + + /** @type {SyncHook<[Iterable]>} */ + optimizeCodeGeneration: new SyncHook(["modules"]), + + /** @type {SyncHook<[]>} */ + beforeModuleHash: new SyncHook([]), + /** @type {SyncHook<[]>} */ + afterModuleHash: new SyncHook([]), + + /** @type {SyncHook<[]>} */ + beforeCodeGeneration: new SyncHook([]), + /** @type {SyncHook<[]>} */ + afterCodeGeneration: new SyncHook([]), + + /** @type {SyncHook<[]>} */ + beforeRuntimeRequirements: new SyncHook([]), + /** @type {SyncHook<[]>} */ + afterRuntimeRequirements: new SyncHook([]), + + /** @type {SyncHook<[]>} */ + beforeHash: new SyncHook([]), + /** @type {SyncHook<[Chunk]>} */ + contentHash: new SyncHook(["chunk"]), + /** @type {SyncHook<[]>} */ + afterHash: new SyncHook([]), + /** @type {SyncHook<[any]>} */ + recordHash: new SyncHook(["records"]), + /** @type {SyncHook<[Compilation, any]>} */ + record: new SyncHook(["compilation", "records"]), + + /** @type {SyncHook<[]>} */ + beforeModuleAssets: new SyncHook([]), + /** @type {SyncBailHook<[], boolean>} */ + shouldGenerateChunkAssets: new SyncBailHook([]), + /** @type {SyncHook<[]>} */ + beforeChunkAssets: new SyncHook([]), + // TODO webpack 6 remove + /** @deprecated */ + additionalChunkAssets: createProcessAssetsHook( + "additionalChunkAssets", + Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL, + () => [this.chunks], + "DEP_WEBPACK_COMPILATION_ADDITIONAL_CHUNK_ASSETS" + ), + + // TODO webpack 6 deprecate + /** @deprecated */ + additionalAssets: createProcessAssetsHook( + "additionalAssets", + Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL, + () => [] + ), + // TODO webpack 6 remove + /** @deprecated */ + optimizeChunkAssets: createProcessAssetsHook( + "optimizeChunkAssets", + Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE, + () => [this.chunks], + "DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS" + ), + // TODO webpack 6 remove + /** @deprecated */ + afterOptimizeChunkAssets: createProcessAssetsHook( + "afterOptimizeChunkAssets", + Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE + 1, + () => [this.chunks], + "DEP_WEBPACK_COMPILATION_AFTER_OPTIMIZE_CHUNK_ASSETS" + ), + // TODO webpack 6 deprecate + /** @deprecated */ + optimizeAssets: processAssetsHook, + // TODO webpack 6 deprecate + /** @deprecated */ + afterOptimizeAssets: afterProcessAssetsHook, + + processAssets: processAssetsHook, + afterProcessAssets: afterProcessAssetsHook, + /** @type {AsyncSeriesHook<[CompilationAssets]>} */ + processAdditionalAssets: new AsyncSeriesHook(["assets"]), + + /** @type {SyncBailHook<[], boolean>} */ + needAdditionalSeal: new SyncBailHook([]), + /** @type {AsyncSeriesHook<[]>} */ + afterSeal: new AsyncSeriesHook([]), + + /** @type {SyncWaterfallHook<[RenderManifestEntry[], RenderManifestOptions]>} */ + renderManifest: new SyncWaterfallHook(["result", "options"]), + + /** @type {SyncHook<[Hash]>} */ + fullHash: new SyncHook(["hash"]), + /** @type {SyncHook<[Chunk, Hash, ChunkHashContext]>} */ + chunkHash: new SyncHook(["chunk", "chunkHash", "ChunkHashContext"]), + + /** @type {SyncHook<[Module, string]>} */ + moduleAsset: new SyncHook(["module", "filename"]), + /** @type {SyncHook<[Chunk, string]>} */ + chunkAsset: new SyncHook(["chunk", "filename"]), + + /** @type {SyncWaterfallHook<[string, object, AssetInfo]>} */ + assetPath: new SyncWaterfallHook(["path", "options", "assetInfo"]), + + /** @type {SyncBailHook<[], boolean>} */ + needAdditionalPass: new SyncBailHook([]), + + /** @type {SyncHook<[Compiler, string, number]>} */ + childCompiler: new SyncHook([ + "childCompiler", + "compilerName", + "compilerIndex" + ]), + + /** @type {SyncBailHook<[string, LogEntry], true>} */ + log: new SyncBailHook(["origin", "logEntry"]), + + /** @type {SyncWaterfallHook<[WebpackError[]]>} */ + processWarnings: new SyncWaterfallHook(["warnings"]), + /** @type {SyncWaterfallHook<[WebpackError[]]>} */ + processErrors: new SyncWaterfallHook(["errors"]), + + /** @type {HookMap, CreateStatsOptionsContext]>>} */ + statsPreset: new HookMap(() => new SyncHook(["options", "context"])), + /** @type {SyncHook<[Partial, CreateStatsOptionsContext]>} */ + statsNormalize: new SyncHook(["options", "context"]), + /** @type {SyncHook<[StatsFactory, NormalizedStatsOptions]>} */ + statsFactory: new SyncHook(["statsFactory", "options"]), + /** @type {SyncHook<[StatsPrinter, NormalizedStatsOptions]>} */ + statsPrinter: new SyncHook(["statsPrinter", "options"]), + + get normalModuleLoader() { + return getNormalModuleLoader(); + } + }); + /** @type {string=} */ + this.name = undefined; + this.startTime = undefined; + this.endTime = undefined; + /** @type {Compiler} */ + this.compiler = compiler; + this.resolverFactory = compiler.resolverFactory; + this.inputFileSystem = compiler.inputFileSystem; + this.fileSystemInfo = new FileSystemInfo(this.inputFileSystem, { + managedPaths: compiler.managedPaths, + immutablePaths: compiler.immutablePaths, + logger: this.getLogger("webpack.FileSystemInfo") + }); + if (compiler.fileTimestamps) { + this.fileSystemInfo.addFileTimestamps(compiler.fileTimestamps); + } + if (compiler.contextTimestamps) { + this.fileSystemInfo.addContextTimestamps(compiler.contextTimestamps); + } + this.requestShortener = compiler.requestShortener; + this.compilerPath = compiler.compilerPath; + + this.logger = this.getLogger("webpack.Compilation"); + + const options = compiler.options; + this.options = options; + this.outputOptions = options && options.output; + /** @type {boolean} */ + this.bail = (options && options.bail) || false; + /** @type {boolean} */ + this.profile = (options && options.profile) || false; + + this.mainTemplate = new MainTemplate(this.outputOptions, this); + this.chunkTemplate = new ChunkTemplate(this.outputOptions, this); + this.runtimeTemplate = new RuntimeTemplate( + this.outputOptions, + this.requestShortener + ); + /** @type {{javascript: ModuleTemplate}} */ + this.moduleTemplates = { + javascript: new ModuleTemplate(this.runtimeTemplate, this) + }; + Object.defineProperties(this.moduleTemplates, { + asset: { + enumerable: false, + configurable: false, + get() { + throw new WebpackError( + "Compilation.moduleTemplates.asset has been removed" + ); + } + }, + webassembly: { + enumerable: false, + configurable: false, + get() { + throw new WebpackError( + "Compilation.moduleTemplates.webassembly has been removed" + ); + } + } + }); + + this.moduleGraph = new ModuleGraph(); + this.chunkGraph = undefined; + /** @type {CodeGenerationResults} */ + this.codeGenerationResults = undefined; + + /** @type {AsyncQueue} */ + this.factorizeQueue = new AsyncQueue({ + name: "factorize", + parallelism: options.parallelism || 100, + processor: this._factorizeModule.bind(this) + }); + /** @type {AsyncQueue} */ + this.addModuleQueue = new AsyncQueue({ + name: "addModule", + parallelism: options.parallelism || 100, + getKey: module => module.identifier(), + processor: this._addModule.bind(this) + }); + /** @type {AsyncQueue} */ + this.buildQueue = new AsyncQueue({ + name: "build", + parallelism: options.parallelism || 100, + processor: this._buildModule.bind(this) + }); + /** @type {AsyncQueue} */ + this.rebuildQueue = new AsyncQueue({ + name: "rebuild", + parallelism: options.parallelism || 100, + processor: this._rebuildModule.bind(this) + }); + /** @type {AsyncQueue} */ + this.processDependenciesQueue = new AsyncQueue({ + name: "processDependencies", + parallelism: options.parallelism || 100, + processor: this._processModuleDependencies.bind(this) + }); + + /** + * Modules in value are building during the build of Module in key. + * Means value blocking key from finishing. + * Needed to detect build cycles. + * @type {WeakMap>} + */ + this.creatingModuleDuringBuild = new WeakMap(); + + /** @type {Map} */ + this.entries = new Map(); + /** @type {EntryData} */ + this.globalEntry = { + dependencies: [], + includeDependencies: [], + options: { + name: undefined + } + }; + /** @type {Map} */ + this.entrypoints = new Map(); + /** @type {Entrypoint[]} */ + this.asyncEntrypoints = []; + /** @type {Set} */ + this.chunks = new Set(); + arrayToSetDeprecation(this.chunks, "Compilation.chunks"); + /** @type {ChunkGroup[]} */ + this.chunkGroups = []; + /** @type {Map} */ + this.namedChunkGroups = new Map(); + /** @type {Map} */ + this.namedChunks = new Map(); + /** @type {Set} */ + this.modules = new Set(); + arrayToSetDeprecation(this.modules, "Compilation.modules"); + /** @private @type {Map} */ + this._modules = new Map(); + this.records = null; + /** @type {string[]} */ + this.additionalChunkAssets = []; + /** @type {CompilationAssets} */ + this.assets = {}; + /** @type {Map} */ + this.assetsInfo = new Map(); + /** @type {Map>>} */ + this._assetsRelatedIn = new Map(); + /** @type {WebpackError[]} */ + this.errors = []; + /** @type {WebpackError[]} */ + this.warnings = []; + /** @type {Compilation[]} */ + this.children = []; + /** @type {Map} */ + this.logging = new Map(); + /** @type {Map} */ + this.dependencyFactories = new Map(); + /** @type {DependencyTemplates} */ + this.dependencyTemplates = new DependencyTemplates(); + this.childrenCounters = {}; + /** @type {Set} */ + this.usedChunkIds = null; + /** @type {Set} */ + this.usedModuleIds = null; + /** @type {boolean} */ + this.needAdditionalPass = false; + /** @type {WeakSet} */ + this.builtModules = new WeakSet(); + /** @type {WeakSet} */ + this.codeGeneratedModules = new WeakSet(); + /** @private @type {Map} */ + this._rebuildingModules = new Map(); + /** @type {Set} */ + this.emittedAssets = new Set(); + /** @type {Set} */ + this.comparedForEmitAssets = new Set(); + /** @type {LazySet} */ + this.fileDependencies = new LazySet(); + /** @type {LazySet} */ + this.contextDependencies = new LazySet(); + /** @type {LazySet} */ + this.missingDependencies = new LazySet(); + /** @type {LazySet} */ + this.buildDependencies = new LazySet(); + // TODO webpack 6 remove + this.compilationDependencies = { + add: util.deprecate( + item => this.fileDependencies.add(item), + "Compilation.compilationDependencies is deprecated (used Compilation.fileDependencies instead)", + "DEP_WEBPACK_COMPILATION_COMPILATION_DEPENDENCIES" + ) + }; + + this._modulesCache = this.getCache("Compilation/modules"); + this._assetsCache = this.getCache("Compilation/assets"); + this._codeGenerationCache = this.getCache("Compilation/codeGeneration"); + } + + getStats() { + return new Stats(this); + } + + /** + * @param {StatsOptions | string} optionsOrPreset stats option value + * @param {CreateStatsOptionsContext} context context + * @returns {NormalizedStatsOptions} normalized options + */ + createStatsOptions(optionsOrPreset, context = {}) { + if ( + typeof optionsOrPreset === "boolean" || + typeof optionsOrPreset === "string" + ) { + optionsOrPreset = { preset: optionsOrPreset }; + } + if (typeof optionsOrPreset === "object" && optionsOrPreset !== null) { + // We use this method of shallow cloning this object to include + // properties in the prototype chain + /** @type {Partial} */ + const options = {}; + for (const key in optionsOrPreset) { + options[key] = optionsOrPreset[key]; + } + if (options.preset !== undefined) { + this.hooks.statsPreset.for(options.preset).call(options, context); + } + this.hooks.statsNormalize.call(options, context); + return /** @type {NormalizedStatsOptions} */ (options); + } else { + /** @type {Partial} */ + const options = {}; + this.hooks.statsNormalize.call(options, context); + return /** @type {NormalizedStatsOptions} */ (options); + } + } + + createStatsFactory(options) { + const statsFactory = new StatsFactory(); + this.hooks.statsFactory.call(statsFactory, options); + return statsFactory; + } + + createStatsPrinter(options) { + const statsPrinter = new StatsPrinter(); + this.hooks.statsPrinter.call(statsPrinter, options); + return statsPrinter; + } + + /** + * @param {string} name cache name + * @returns {CacheFacade} the cache facade instance + */ + getCache(name) { + return this.compiler.getCache(name); + } + + /** + * @param {string | (function(): string)} name name of the logger, or function called once to get the logger name + * @returns {Logger} a logger with that name + */ + getLogger(name) { + if (!name) { + throw new TypeError("Compilation.getLogger(name) called without a name"); + } + /** @type {LogEntry[] | undefined} */ + let logEntries; + return new Logger( + (type, args) => { + if (typeof name === "function") { + name = name(); + if (!name) { + throw new TypeError( + "Compilation.getLogger(name) called with a function not returning a name" + ); + } + } + let trace; + switch (type) { + case LogType.warn: + case LogType.error: + case LogType.trace: + trace = ErrorHelpers.cutOffLoaderExecution(new Error("Trace").stack) + .split("\n") + .slice(3); + break; + } + /** @type {LogEntry} */ + const logEntry = { + time: Date.now(), + type, + args, + trace + }; + if (this.hooks.log.call(name, logEntry) === undefined) { + if (logEntry.type === LogType.profileEnd) { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.profileEnd === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.profileEnd(`[${name}] ${logEntry.args[0]}`); + } + } + if (logEntries === undefined) { + logEntries = this.logging.get(name); + if (logEntries === undefined) { + logEntries = []; + this.logging.set(name, logEntries); + } + } + logEntries.push(logEntry); + if (logEntry.type === LogType.profile) { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.profile === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.profile(`[${name}] ${logEntry.args[0]}`); + } + } + } + }, + childName => { + if (typeof name === "function") { + if (typeof childName === "function") { + return this.getLogger(() => { + if (typeof name === "function") { + name = name(); + if (!name) { + throw new TypeError( + "Compilation.getLogger(name) called with a function not returning a name" + ); + } + } + if (typeof childName === "function") { + childName = childName(); + if (!childName) { + throw new TypeError( + "Logger.getChildLogger(name) called with a function not returning a name" + ); + } + } + return `${name}/${childName}`; + }); + } else { + return this.getLogger(() => { + if (typeof name === "function") { + name = name(); + if (!name) { + throw new TypeError( + "Compilation.getLogger(name) called with a function not returning a name" + ); + } + } + return `${name}/${childName}`; + }); + } + } else { + if (typeof childName === "function") { + return this.getLogger(() => { + if (typeof childName === "function") { + childName = childName(); + if (!childName) { + throw new TypeError( + "Logger.getChildLogger(name) called with a function not returning a name" + ); + } + } + return `${name}/${childName}`; + }); + } else { + return this.getLogger(`${name}/${childName}`); + } + } + } + ); + } + + /** + * @param {Module} module module to be added that was created + * @param {ModuleCallback} callback returns the module in the compilation, + * it could be the passed one (if new), or an already existing in the compilation + * @returns {void} + */ + addModule(module, callback) { + this.addModuleQueue.add(module, callback); + } + + /** + * @param {Module} module module to be added that was created + * @param {ModuleCallback} callback returns the module in the compilation, + * it could be the passed one (if new), or an already existing in the compilation + * @returns {void} + */ + _addModule(module, callback) { + const identifier = module.identifier(); + const alreadyAddedModule = this._modules.get(identifier); + if (alreadyAddedModule) { + return callback(null, alreadyAddedModule); + } + + const currentProfile = this.profile + ? this.moduleGraph.getProfile(module) + : undefined; + if (currentProfile !== undefined) { + currentProfile.markRestoringStart(); + } + + this._modulesCache.get(identifier, null, (err, cacheModule) => { + if (err) return callback(new ModuleRestoreError(module, err)); + + if (currentProfile !== undefined) { + currentProfile.markRestoringEnd(); + currentProfile.markIntegrationStart(); + } + + if (cacheModule) { + cacheModule.updateCacheModule(module); + + module = cacheModule; + } + this._modules.set(identifier, module); + this.modules.add(module); + ModuleGraph.setModuleGraphForModule(module, this.moduleGraph); + if (currentProfile !== undefined) { + currentProfile.markIntegrationEnd(); + } + callback(null, module); + }); + } + + /** + * Fetches a module from a compilation by its identifier + * @param {Module} module the module provided + * @returns {Module} the module requested + */ + getModule(module) { + const identifier = module.identifier(); + return this._modules.get(identifier); + } + + /** + * Attempts to search for a module by its identifier + * @param {string} identifier identifier (usually path) for module + * @returns {Module|undefined} attempt to search for module and return it, else undefined + */ + findModule(identifier) { + return this._modules.get(identifier); + } + + /** + * Schedules a build of the module object + * + * @param {Module} module module to be built + * @param {ModuleCallback} callback the callback + * @returns {void} + */ + buildModule(module, callback) { + this.buildQueue.add(module, callback); + } + + /** + * Builds the module object + * + * @param {Module} module module to be built + * @param {ModuleCallback} callback the callback + * @returns {void} + */ + _buildModule(module, callback) { + const currentProfile = this.profile + ? this.moduleGraph.getProfile(module) + : undefined; + if (currentProfile !== undefined) { + currentProfile.markBuildingStart(); + } + + module.needBuild( + { + fileSystemInfo: this.fileSystemInfo + }, + (err, needBuild) => { + if (err) return callback(err); + + if (!needBuild) { + if (currentProfile !== undefined) { + currentProfile.markBuildingEnd(); + } + this.hooks.stillValidModule.call(module); + return callback(); + } + + this.hooks.buildModule.call(module); + this.builtModules.add(module); + module.build( + this.options, + this, + this.resolverFactory.get("normal", module.resolveOptions), + this.inputFileSystem, + err => { + if (currentProfile !== undefined) { + currentProfile.markBuildingEnd(); + } + if (err) { + this.hooks.failedModule.call(module, err); + return callback(err); + } + if (currentProfile !== undefined) { + currentProfile.markStoringStart(); + } + this._modulesCache.store(module.identifier(), null, module, err => { + if (currentProfile !== undefined) { + currentProfile.markStoringEnd(); + } + if (err) { + this.hooks.failedModule.call(module, err); + return callback(new ModuleStoreError(module, err)); + } + this.hooks.succeedModule.call(module); + return callback(); + }); + } + ); + } + ); + } + + /** + * @param {Module} module to be processed for deps + * @param {ModuleCallback} callback callback to be triggered + * @returns {void} + */ + processModuleDependencies(module, callback) { + this.processDependenciesQueue.add(module, callback); + } + + /** + * @param {Module} module to be processed for deps + * @returns {void} + */ + processModuleDependenciesNonRecursive(module) { + const processDependenciesBlock = block => { + if (block.dependencies) { + for (const dep of block.dependencies) { + this.moduleGraph.setParents(dep, block, module); + } + } + if (block.blocks) { + for (const b of block.blocks) processDependenciesBlock(b); + } + }; + + processDependenciesBlock(module); + } + + /** + * @param {Module} module to be processed for deps + * @param {ModuleCallback} callback callback to be triggered + * @returns {void} + */ + _processModuleDependencies(module, callback) { + const dependencies = new Map(); + + /** + * @type {Array<{factory: ModuleFactory, dependencies: Dependency[], originModule: Module|null}>} + */ + const sortedDependencies = []; + + let currentBlock = module; + + let factoryCacheKey; + let factoryCacheValue; + let factoryCacheValue2; + let listCacheKey; + let listCacheValue; + + const processDependency = dep => { + this.moduleGraph.setParents(dep, currentBlock, module); + const resourceIdent = dep.getResourceIdentifier(); + if (resourceIdent) { + // Here webpack is using heuristic that assumes + // mostly esm dependencies would be used + // so we don't allocate extra string for them + const category = dep.category; + const cacheKey = + category === esmDependencyCategory + ? resourceIdent + : `${category}${resourceIdent}`; + const constructor = dep.constructor; + let innerMap; + let factory; + if (factoryCacheKey === constructor) { + innerMap = factoryCacheValue; + if (listCacheKey === cacheKey) { + listCacheValue.push(dep); + return; + } + } else { + factory = this.dependencyFactories.get(dep.constructor); + if (factory === undefined) { + throw new Error( + `No module factory available for dependency type: ${dep.constructor.name}` + ); + } + innerMap = dependencies.get(factory); + if (innerMap === undefined) { + dependencies.set(factory, (innerMap = new Map())); + } + factoryCacheKey = constructor; + factoryCacheValue = innerMap; + factoryCacheValue2 = factory; + } + let list = innerMap.get(cacheKey); + if (list === undefined) { + innerMap.set(cacheKey, (list = [])); + sortedDependencies.push({ + factory: factoryCacheValue2, + dependencies: list, + originModule: module + }); + } + list.push(dep); + listCacheKey = cacheKey; + listCacheValue = list; + } + }; + + const processDependenciesBlock = block => { + if (block.dependencies) { + currentBlock = block; + for (const dep of block.dependencies) processDependency(dep); + } + if (block.blocks) { + for (const b of block.blocks) processDependenciesBlock(b); + } + }; + + try { + processDependenciesBlock(module); + } catch (e) { + return callback(e); + } + + if (sortedDependencies.length === 0) { + callback(); + return; + } + + // This is nested so we need to allow one additional task + this.processDependenciesQueue.increaseParallelism(); + + asyncLib.forEach( + sortedDependencies, + (item, callback) => { + this.handleModuleCreation(item, err => { + // In V8, the Error objects keep a reference to the functions on the stack. These warnings & + // errors are created inside closures that keep a reference to the Compilation, so errors are + // leaking the Compilation object. + if (err && this.bail) { + // eslint-disable-next-line no-self-assign + err.stack = err.stack; + return callback(err); + } + callback(); + }); + }, + err => { + this.processDependenciesQueue.decreaseParallelism(); + + return callback(err); + } + ); + } + + /** + * @typedef {Object} HandleModuleCreationOptions + * @property {ModuleFactory} factory + * @property {Dependency[]} dependencies + * @property {Module | null} originModule + * @property {Partial=} contextInfo + * @property {string=} context + * @property {boolean=} recursive recurse into dependencies of the created module + */ + + /** + * @param {HandleModuleCreationOptions} options options object + * @param {ModuleCallback} callback callback + * @returns {void} + */ + handleModuleCreation( + { + factory, + dependencies, + originModule, + contextInfo, + context, + recursive = true + }, + callback + ) { + const moduleGraph = this.moduleGraph; + + const currentProfile = this.profile ? new ModuleProfile() : undefined; + + this.factorizeModule( + { + currentProfile, + factory, + dependencies, + originModule, + contextInfo, + context + }, + (err, newModule) => { + if (err) { + if (dependencies.every(d => d.optional)) { + this.warnings.push(err); + } else { + this.errors.push(err); + } + return callback(err); + } + + if (!newModule) { + return callback(); + } + + if (currentProfile !== undefined) { + moduleGraph.setProfile(newModule, currentProfile); + } + + this.addModule(newModule, (err, module) => { + if (err) { + if (!err.module) { + err.module = module; + } + this.errors.push(err); + + return callback(err); + } + + for (let i = 0; i < dependencies.length; i++) { + const dependency = dependencies[i]; + moduleGraph.setResolvedModule(originModule, dependency, module); + } + + moduleGraph.setIssuerIfUnset( + module, + originModule !== undefined ? originModule : null + ); + if (module !== newModule) { + if (currentProfile !== undefined) { + const otherProfile = moduleGraph.getProfile(module); + if (otherProfile !== undefined) { + currentProfile.mergeInto(otherProfile); + } else { + moduleGraph.setProfile(module, currentProfile); + } + } + } + + // Check for cycles when build is trigger inside another build + let creatingModuleDuringBuildSet = undefined; + if (!recursive && this.buildQueue.isProcessing(originModule)) { + // Track build dependency + creatingModuleDuringBuildSet = this.creatingModuleDuringBuild.get( + originModule + ); + if (creatingModuleDuringBuildSet === undefined) { + creatingModuleDuringBuildSet = new Set(); + this.creatingModuleDuringBuild.set( + originModule, + creatingModuleDuringBuildSet + ); + } + creatingModuleDuringBuildSet.add(originModule); + + // When building is blocked by another module + // search for a cycle, cancel the cycle by throwing + // an error (otherwise this would deadlock) + const blockReasons = this.creatingModuleDuringBuild.get(module); + if (blockReasons !== undefined) { + const set = new Set(blockReasons); + for (const item of set) { + const blockReasons = this.creatingModuleDuringBuild.get(item); + if (blockReasons !== undefined) { + for (const m of blockReasons) { + if (m === module) { + return callback(new BuildCycleError(module)); + } + set.add(m); + } + } + } + } + } + + this.buildModule(module, err => { + if (creatingModuleDuringBuildSet !== undefined) { + creatingModuleDuringBuildSet.delete(module); + } + if (err) { + if (!err.module) { + err.module = module; + } + this.errors.push(err); + + return callback(err); + } + + if (!recursive) { + this.processModuleDependenciesNonRecursive(module); + callback(null, module); + return; + } + + // This avoids deadlocks for circular dependencies + if (this.processDependenciesQueue.isProcessing(module)) { + return callback(); + } + + this.processModuleDependencies(module, err => { + if (err) { + return callback(err); + } + callback(null, module); + }); + }); + }); + } + ); + } + + /** + * @typedef {Object} FactorizeModuleOptions + * @property {ModuleProfile} currentProfile + * @property {ModuleFactory} factory + * @property {Dependency[]} dependencies + * @property {Module | null} originModule + * @property {Partial=} contextInfo + * @property {string=} context + */ + + /** + * @param {FactorizeModuleOptions} options options object + * @param {ModuleCallback} callback callback + * @returns {void} + */ + factorizeModule(options, callback) { + this.factorizeQueue.add(options, callback); + } + + /** + * @param {FactorizeModuleOptions} options options object + * @param {ModuleCallback} callback callback + * @returns {void} + */ + _factorizeModule( + { + currentProfile, + factory, + dependencies, + originModule, + contextInfo, + context + }, + callback + ) { + if (currentProfile !== undefined) { + currentProfile.markFactoryStart(); + } + factory.create( + { + contextInfo: { + issuer: originModule ? originModule.nameForCondition() : "", + issuerLayer: originModule ? originModule.layer : null, + compiler: this.compiler.name, + ...contextInfo + }, + resolveOptions: originModule ? originModule.resolveOptions : undefined, + context: context + ? context + : originModule + ? originModule.context + : this.compiler.context, + dependencies: dependencies + }, + (err, result) => { + if (result) { + // TODO webpack 6: remove + // For backward-compat + if (result.module === undefined && result instanceof Module) { + result = { + module: result + }; + } + const { + fileDependencies, + contextDependencies, + missingDependencies + } = result; + if (fileDependencies) { + this.fileDependencies.addAll(fileDependencies); + } + if (contextDependencies) { + this.contextDependencies.addAll(contextDependencies); + } + if (missingDependencies) { + this.missingDependencies.addAll(missingDependencies); + } + } + if (err) { + const notFoundError = new ModuleNotFoundError( + originModule, + err, + dependencies.map(d => d.loc).filter(Boolean)[0] + ); + return callback(notFoundError); + } + if (!result) { + return callback(); + } + const newModule = result.module; + if (!newModule) { + return callback(); + } + if (currentProfile !== undefined) { + currentProfile.markFactoryEnd(); + } + + callback(null, newModule); + } + ); + } + + /** + * @param {string} context context string path + * @param {Dependency} dependency dependency used to create Module chain + * @param {ModuleCallback} callback callback for when module chain is complete + * @returns {void} will throw if dependency instance is not a valid Dependency + */ + addModuleChain(context, dependency, callback) { + return this.addModuleTree({ context, dependency }, callback); + } + + /** + * @param {Object} options options + * @param {string} options.context context string path + * @param {Dependency} options.dependency dependency used to create Module chain + * @param {Partial=} options.contextInfo additional context info for the root module + * @param {ModuleCallback} callback callback for when module chain is complete + * @returns {void} will throw if dependency instance is not a valid Dependency + */ + addModuleTree({ context, dependency, contextInfo }, callback) { + if ( + typeof dependency !== "object" || + dependency === null || + !dependency.constructor + ) { + return callback( + new WebpackError("Parameter 'dependency' must be a Dependency") + ); + } + const Dep = /** @type {DepConstructor} */ (dependency.constructor); + const moduleFactory = this.dependencyFactories.get(Dep); + if (!moduleFactory) { + return callback( + new WebpackError( + `No dependency factory available for this dependency type: ${dependency.constructor.name}` + ) + ); + } + + this.handleModuleCreation( + { + factory: moduleFactory, + dependencies: [dependency], + originModule: null, + contextInfo, + context + }, + err => { + if (err && this.bail) { + callback(err); + this.buildQueue.stop(); + this.rebuildQueue.stop(); + this.processDependenciesQueue.stop(); + this.factorizeQueue.stop(); + } else { + callback(); + } + } + ); + } + + /** + * @param {string} context context path for entry + * @param {Dependency} entry entry dependency that should be followed + * @param {string | EntryOptions} optionsOrName options or deprecated name of entry + * @param {ModuleCallback} callback callback function + * @returns {void} returns + */ + addEntry(context, entry, optionsOrName, callback) { + // TODO webpack 6 remove + const options = + typeof optionsOrName === "object" + ? optionsOrName + : { name: optionsOrName }; + + this._addEntryItem(context, entry, "dependencies", options, callback); + } + + /** + * @param {string} context context path for entry + * @param {Dependency} dependency dependency that should be followed + * @param {EntryOptions} options options + * @param {ModuleCallback} callback callback function + * @returns {void} returns + */ + addInclude(context, dependency, options, callback) { + this._addEntryItem( + context, + dependency, + "includeDependencies", + options, + callback + ); + } + + /** + * @param {string} context context path for entry + * @param {Dependency} entry entry dependency that should be followed + * @param {"dependencies" | "includeDependencies"} target type of entry + * @param {EntryOptions} options options + * @param {ModuleCallback} callback callback function + * @returns {void} returns + */ + _addEntryItem(context, entry, target, options, callback) { + const { name } = options; + let entryData = + name !== undefined ? this.entries.get(name) : this.globalEntry; + if (entryData === undefined) { + entryData = { + dependencies: [], + includeDependencies: [], + options: { + name: undefined, + ...options + } + }; + entryData[target].push(entry); + this.entries.set(name, entryData); + } else { + entryData[target].push(entry); + for (const key of Object.keys(options)) { + if (options[key] === undefined) continue; + if (entryData.options[key] === options[key]) continue; + if ( + Array.isArray(entryData.options[key]) && + Array.isArray(options[key]) && + arrayEquals(entryData.options[key], options[key]) + ) { + continue; + } + if (entryData.options[key] === undefined) { + entryData.options[key] = options[key]; + } else { + return callback( + new WebpackError( + `Conflicting entry option ${key} = ${entryData.options[key]} vs ${options[key]}` + ) + ); + } + } + } + + this.hooks.addEntry.call(entry, options); + + this.addModuleTree( + { + context, + dependency: entry, + contextInfo: entryData.options.layer + ? { issuerLayer: entryData.options.layer } + : undefined + }, + (err, module) => { + if (err) { + this.hooks.failedEntry.call(entry, options, err); + return callback(err); + } + this.hooks.succeedEntry.call(entry, options, module); + return callback(null, module); + } + ); + } + + /** + * @param {Module} module module to be rebuilt + * @param {ModuleCallback} callback callback when module finishes rebuilding + * @returns {void} + */ + rebuildModule(module, callback) { + this.rebuildQueue.add(module, callback); + } + + /** + * @param {Module} module module to be rebuilt + * @param {ModuleCallback} callback callback when module finishes rebuilding + * @returns {void} + */ + _rebuildModule(module, callback) { + this.hooks.rebuildModule.call(module); + const oldDependencies = module.dependencies.slice(); + const oldBlocks = module.blocks.slice(); + module.invalidateBuild(); + this.buildQueue.invalidate(module); + this.buildModule(module, err => { + if (err) { + return this.hooks.finishRebuildingModule.callAsync(module, err2 => { + if (err2) { + callback( + makeWebpackError(err2, "Compilation.hooks.finishRebuildingModule") + ); + return; + } + callback(err); + }); + } + + this.processModuleDependencies(module, err => { + if (err) return callback(err); + this.removeReasonsOfDependencyBlock(module, { + dependencies: oldDependencies, + blocks: oldBlocks + }); + this.hooks.finishRebuildingModule.callAsync(module, err2 => { + if (err2) { + callback( + makeWebpackError(err2, "Compilation.hooks.finishRebuildingModule") + ); + return; + } + callback(null, module); + }); + }); + }); + } + + finish(callback) { + this.logger.time("finish modules"); + const { modules } = this; + this.hooks.finishModules.callAsync(modules, err => { + this.logger.timeEnd("finish modules"); + if (err) return callback(err); + + // extract warnings and errors from modules + this.logger.time("report dependency errors and warnings"); + for (const module of modules) { + this.reportDependencyErrorsAndWarnings(module, [module]); + const errors = module.getErrors(); + if (errors !== undefined) { + for (const error of errors) { + if (!error.module) { + error.module = module; + } + this.errors.push(error); + } + } + const warnings = module.getWarnings(); + if (warnings !== undefined) { + for (const warning of warnings) { + if (!warning.module) { + warning.module = module; + } + this.warnings.push(warning); + } + } + } + this.logger.timeEnd("report dependency errors and warnings"); + + callback(); + }); + } + + unseal() { + this.hooks.unseal.call(); + this.chunks.clear(); + this.chunkGroups.length = 0; + this.namedChunks.clear(); + this.namedChunkGroups.clear(); + this.entrypoints.clear(); + this.additionalChunkAssets.length = 0; + this.assets = {}; + this.assetsInfo.clear(); + this.moduleGraph.removeAllModuleAttributes(); + } + + /** + * @param {Callback} callback signals when the call finishes + * @returns {void} + */ + seal(callback) { + const chunkGraph = new ChunkGraph(this.moduleGraph); + this.chunkGraph = chunkGraph; + + for (const module of this.modules) { + ChunkGraph.setChunkGraphForModule(module, chunkGraph); + } + + this.hooks.seal.call(); + + this.logger.time("optimize dependencies"); + while (this.hooks.optimizeDependencies.call(this.modules)) { + /* empty */ + } + this.hooks.afterOptimizeDependencies.call(this.modules); + this.logger.timeEnd("optimize dependencies"); + + this.logger.time("create chunks"); + this.hooks.beforeChunks.call(); + const chunkGraphInit = new Map(); + for (const [name, { dependencies, includeDependencies, options }] of this + .entries) { + const chunk = this.addChunk(name); + if (options.filename) { + chunk.filenameTemplate = options.filename; + } + const entrypoint = new Entrypoint(options); + if (!options.dependOn && !options.runtime) { + entrypoint.setRuntimeChunk(chunk); + } + entrypoint.setEntrypointChunk(chunk); + this.namedChunkGroups.set(name, entrypoint); + this.entrypoints.set(name, entrypoint); + this.chunkGroups.push(entrypoint); + connectChunkGroupAndChunk(entrypoint, chunk); + + for (const dep of [...this.globalEntry.dependencies, ...dependencies]) { + entrypoint.addOrigin(null, { name }, /** @type {any} */ (dep).request); + + const module = this.moduleGraph.getModule(dep); + if (module) { + chunkGraph.connectChunkAndEntryModule(chunk, module, entrypoint); + this.assignDepth(module); + const modulesList = chunkGraphInit.get(entrypoint); + if (modulesList === undefined) { + chunkGraphInit.set(entrypoint, [module]); + } else { + modulesList.push(module); + } + } + } + + const mapAndSort = deps => + deps + .map(dep => this.moduleGraph.getModule(dep)) + .filter(Boolean) + .sort(compareModulesByIdentifier); + const includedModules = [ + ...mapAndSort(this.globalEntry.includeDependencies), + ...mapAndSort(includeDependencies) + ]; + + for (const module of includedModules) { + this.assignDepth(module); + const modulesList = chunkGraphInit.get(entrypoint); + if (modulesList === undefined) { + chunkGraphInit.set(entrypoint, [module]); + } else { + modulesList.push(module); + } + } + } + const runtimeChunks = new Set(); + outer: for (const [ + name, + { + options: { dependOn, runtime } + } + ] of this.entries) { + if (dependOn && runtime) { + const err = new WebpackError(`Entrypoint '${name}' has 'dependOn' and 'runtime' specified. This is not valid. +Entrypoints that depend on other entrypoints do not have their own runtime. +They will use the runtime(s) from referenced entrypoints instead. +Remove the 'runtime' option from the entrypoint.`); + const entry = this.entrypoints.get(name); + err.chunk = entry.getEntrypointChunk(); + this.errors.push(err); + } + if (dependOn) { + const entry = this.entrypoints.get(name); + const referencedChunks = entry + .getEntrypointChunk() + .getAllReferencedChunks(); + const dependOnEntries = []; + for (const dep of dependOn) { + const dependency = this.entrypoints.get(dep); + if (!dependency) { + throw new Error( + `Entry ${name} depends on ${dep}, but this entry was not found` + ); + } + if (referencedChunks.has(dependency.getEntrypointChunk())) { + const err = new WebpackError( + `Entrypoints '${name}' and '${dep}' use 'dependOn' to depend on each other in a circular way.` + ); + const entryChunk = entry.getEntrypointChunk(); + err.chunk = entryChunk; + this.errors.push(err); + entry.setRuntimeChunk(entryChunk); + continue outer; + } + dependOnEntries.push(dependency); + } + for (const dependency of dependOnEntries) { + connectChunkGroupParentAndChild(dependency, entry); + } + } else if (runtime) { + const entry = this.entrypoints.get(name); + let chunk = this.namedChunks.get(runtime); + if (chunk) { + if (!runtimeChunks.has(chunk)) { + const err = new WebpackError(`Entrypoint '${name}' has a 'runtime' option which points to another entrypoint named '${runtime}'. +It's not valid to use other entrypoints as runtime chunk. +Did you mean to use 'dependOn: ${JSON.stringify( + runtime + )}' instead to allow using entrypoint '${name}' within the runtime of entrypoint '${runtime}'? For this '${runtime}' must always be loaded when '${name}' is used. +Or do you want to use the entrypoints '${name}' and '${runtime}' independently on the same page with a shared runtime? In this case give them both the same value for the 'runtime' option. It must be a name not already used by an entrypoint.`); + const entryChunk = entry.getEntrypointChunk(); + err.chunk = entryChunk; + this.errors.push(err); + entry.setRuntimeChunk(entryChunk); + continue; + } + } else { + chunk = this.addChunk(runtime); + chunk.preventIntegration = true; + runtimeChunks.add(chunk); + } + entry.unshiftChunk(chunk); + chunk.addGroup(entry); + entry.setRuntimeChunk(chunk); + } + } + buildChunkGraph(this, chunkGraphInit); + this.hooks.afterChunks.call(this.chunks); + this.logger.timeEnd("create chunks"); + + this.logger.time("optimize"); + this.hooks.optimize.call(); + + while (this.hooks.optimizeModules.call(this.modules)) { + /* empty */ + } + this.hooks.afterOptimizeModules.call(this.modules); + + while (this.hooks.optimizeChunks.call(this.chunks, this.chunkGroups)) { + /* empty */ + } + this.hooks.afterOptimizeChunks.call(this.chunks, this.chunkGroups); + + this.hooks.optimizeTree.callAsync(this.chunks, this.modules, err => { + if (err) { + return callback( + makeWebpackError(err, "Compilation.hooks.optimizeTree") + ); + } + + this.hooks.afterOptimizeTree.call(this.chunks, this.modules); + + this.hooks.optimizeChunkModules.callAsync( + this.chunks, + this.modules, + err => { + if (err) { + return callback( + makeWebpackError(err, "Compilation.hooks.optimizeChunkModules") + ); + } + + this.hooks.afterOptimizeChunkModules.call(this.chunks, this.modules); + + const shouldRecord = this.hooks.shouldRecord.call() !== false; + + this.hooks.reviveModules.call(this.modules, this.records); + this.hooks.beforeModuleIds.call(this.modules); + this.hooks.moduleIds.call(this.modules); + this.hooks.optimizeModuleIds.call(this.modules); + this.hooks.afterOptimizeModuleIds.call(this.modules); + + this.hooks.reviveChunks.call(this.chunks, this.records); + this.hooks.beforeChunkIds.call(this.chunks); + this.hooks.chunkIds.call(this.chunks); + this.hooks.optimizeChunkIds.call(this.chunks); + this.hooks.afterOptimizeChunkIds.call(this.chunks); + + this.assignRuntimeIds(); + + this.sortItemsWithChunkIds(); + + if (shouldRecord) { + this.hooks.recordModules.call(this.modules, this.records); + this.hooks.recordChunks.call(this.chunks, this.records); + } + + this.hooks.optimizeCodeGeneration.call(this.modules); + this.logger.timeEnd("optimize"); + + this.logger.time("module hashing"); + this.hooks.beforeModuleHash.call(); + this.createModuleHashes(); + this.hooks.afterModuleHash.call(); + this.logger.timeEnd("module hashing"); + + this.logger.time("code generation"); + this.hooks.beforeCodeGeneration.call(); + this.codeGeneration(err => { + if (err) { + return callback(err); + } + this.hooks.afterCodeGeneration.call(); + this.logger.timeEnd("code generation"); + + this.logger.time("runtime requirements"); + this.hooks.beforeRuntimeRequirements.call(); + this.processRuntimeRequirements(); + this.hooks.afterRuntimeRequirements.call(); + this.logger.timeEnd("runtime requirements"); + + this.logger.time("hashing"); + this.hooks.beforeHash.call(); + this.createHash(); + this.hooks.afterHash.call(); + this.logger.timeEnd("hashing"); + + if (shouldRecord) { + this.logger.time("record hash"); + this.hooks.recordHash.call(this.records); + this.logger.timeEnd("record hash"); + } + + this.logger.time("module assets"); + this.clearAssets(); + + this.hooks.beforeModuleAssets.call(); + this.createModuleAssets(); + this.logger.timeEnd("module assets"); + + const cont = () => { + this.logger.time("process assets"); + this.hooks.processAssets.callAsync(this.assets, err => { + if (err) { + return callback( + makeWebpackError(err, "Compilation.hooks.processAssets") + ); + } + this.hooks.afterProcessAssets.call(this.assets); + this.logger.timeEnd("process assets"); + this.assets = soonFrozenObjectDeprecation( + this.assets, + "Compilation.assets", + "DEP_WEBPACK_COMPILATION_ASSETS", + `BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation. + Do changes to assets earlier, e. g. in Compilation.hooks.processAssets. + Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.` + ); + + this.summarizeDependencies(); + if (shouldRecord) { + this.hooks.record.call(this, this.records); + } + + if (this.hooks.needAdditionalSeal.call()) { + this.unseal(); + return this.seal(callback); + } + return this.hooks.afterSeal.callAsync(err => { + if (err) { + return callback( + makeWebpackError(err, "Compilation.hooks.afterSeal") + ); + } + this.fileSystemInfo.logStatistics(); + callback(); + }); + }); + }; + + this.logger.time("create chunk assets"); + if (this.hooks.shouldGenerateChunkAssets.call() !== false) { + this.hooks.beforeChunkAssets.call(); + this.createChunkAssets(err => { + this.logger.timeEnd("create chunk assets"); + if (err) { + return callback(err); + } + cont(); + }); + } else { + this.logger.timeEnd("create chunk assets"); + cont(); + } + }); + } + ); + }); + } + + /** + * @param {Module} module module to report from + * @param {DependenciesBlock[]} blocks blocks to report from + * @returns {void} + */ + reportDependencyErrorsAndWarnings(module, blocks) { + for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { + const block = blocks[indexBlock]; + const dependencies = block.dependencies; + + for (let indexDep = 0; indexDep < dependencies.length; indexDep++) { + const d = dependencies[indexDep]; + + const warnings = d.getWarnings(this.moduleGraph); + if (warnings) { + for (let indexWar = 0; indexWar < warnings.length; indexWar++) { + const w = warnings[indexWar]; + + const warning = new ModuleDependencyWarning(module, w, d.loc); + this.warnings.push(warning); + } + } + const errors = d.getErrors(this.moduleGraph); + if (errors) { + for (let indexErr = 0; indexErr < errors.length; indexErr++) { + const e = errors[indexErr]; + + const error = new ModuleDependencyError(module, e, d.loc); + this.errors.push(error); + } + } + } + + this.reportDependencyErrorsAndWarnings(module, block.blocks); + } + } + + codeGeneration(callback) { + let statModulesFromCache = 0; + let statModulesGenerated = 0; + const { + chunkGraph, + moduleGraph, + dependencyTemplates, + runtimeTemplate + } = this; + const results = (this.codeGenerationResults = new CodeGenerationResults()); + const errors = []; + /** @type {{module: Module, hash: string, runtime: RuntimeSpec, runtimes: RuntimeSpec[]}[]} */ + const jobs = []; + for (const module of this.modules) { + const runtimes = chunkGraph.getModuleRuntimes(module); + if (runtimes.size === 1) { + for (const runtime of runtimes) { + const hash = chunkGraph.getModuleHash(module, runtime); + jobs.push({ module, hash, runtime, runtimes: [runtime] }); + } + } else if (runtimes.size > 1) { + /** @type {Map} */ + const map = new Map(); + for (const runtime of runtimes) { + const hash = chunkGraph.getModuleHash(module, runtime); + const job = map.get(hash); + if (job === undefined) { + const newJob = { module, hash, runtime, runtimes: [runtime] }; + jobs.push(newJob); + map.set(hash, newJob); + } else { + job.runtimes.push(runtime); + } + } + } + } + + asyncLib.eachLimit( + jobs, + this.options.parallelism, + ({ module, hash, runtime, runtimes }, callback) => { + const cache = new MultiItemCache( + runtimes.map(runtime => + this._codeGenerationCache.getItemCache( + `${module.identifier()}|${getRuntimeKey(runtime)}`, + `${hash}|${dependencyTemplates.getHash()}` + ) + ) + ); + cache.get((err, cachedResult) => { + if (err) return callback(err); + let result; + if (!cachedResult) { + statModulesGenerated++; + try { + this.codeGeneratedModules.add(module); + result = module.codeGeneration({ + chunkGraph, + moduleGraph, + dependencyTemplates, + runtimeTemplate, + runtime + }); + } catch (err) { + errors.push(new CodeGenerationError(module, err)); + result = cachedResult = { + sources: new Map(), + runtimeRequirements: null + }; + } + } else { + statModulesFromCache++; + result = cachedResult; + } + for (const runtime of runtimes) { + results.add(module, runtime, result); + } + if (!cachedResult) { + cache.store(result, callback); + } else { + callback(); + } + }); + }, + err => { + if (err) return callback(err); + if (errors.length > 0) { + errors.sort( + compareSelect(err => err.module, compareModulesByIdentifier) + ); + for (const error of errors) { + this.errors.push(error); + } + } + this.logger.log( + `${Math.round( + (100 * statModulesGenerated) / + (statModulesGenerated + statModulesFromCache) + )}% code generated (${statModulesGenerated} generated, ${statModulesFromCache} from cache)` + ); + callback(); + } + ); + } + + /** + * @returns {void} + */ + processRuntimeRequirements() { + const { chunkGraph } = this; + + const additionalModuleRuntimeRequirements = this.hooks + .additionalModuleRuntimeRequirements; + const runtimeRequirementInModule = this.hooks.runtimeRequirementInModule; + for (const module of this.modules) { + if (chunkGraph.getNumberOfModuleChunks(module) > 0) { + for (const runtime of chunkGraph.getModuleRuntimes(module)) { + let set; + const runtimeRequirements = this.codeGenerationResults.getRuntimeRequirements( + module, + runtime + ); + if (runtimeRequirements && runtimeRequirements.size > 0) { + set = new Set(runtimeRequirements); + } else if (additionalModuleRuntimeRequirements.isUsed()) { + set = new Set(); + } else { + continue; + } + additionalModuleRuntimeRequirements.call(module, set); + + for (const r of set) { + const hook = runtimeRequirementInModule.get(r); + if (hook !== undefined) hook.call(module, set); + } + chunkGraph.addModuleRuntimeRequirements(module, runtime, set); + } + } + } + + for (const chunk of this.chunks) { + const set = new Set(); + for (const module of chunkGraph.getChunkModulesIterable(chunk)) { + const runtimeRequirements = chunkGraph.getModuleRuntimeRequirements( + module, + chunk.runtime + ); + for (const r of runtimeRequirements) set.add(r); + } + this.hooks.additionalChunkRuntimeRequirements.call(chunk, set); + + for (const r of set) { + this.hooks.runtimeRequirementInChunk.for(r).call(chunk, set); + } + + chunkGraph.addChunkRuntimeRequirements(chunk, set); + } + + /** @type {Set} */ + const treeEntries = new Set(); + for (const ep of this.entrypoints.values()) { + const chunk = ep.getRuntimeChunk(); + if (chunk) treeEntries.add(chunk); + } + for (const ep of this.asyncEntrypoints) { + const chunk = ep.getRuntimeChunk(); + if (chunk) treeEntries.add(chunk); + } + + for (const treeEntry of treeEntries) { + const set = new Set(); + for (const chunk of treeEntry.getAllReferencedChunks()) { + const runtimeRequirements = chunkGraph.getChunkRuntimeRequirements( + chunk + ); + for (const r of runtimeRequirements) set.add(r); + } + + this.hooks.additionalTreeRuntimeRequirements.call(treeEntry, set); + + for (const r of set) { + this.hooks.runtimeRequirementInTree.for(r).call(treeEntry, set); + } + + chunkGraph.addTreeRuntimeRequirements(treeEntry, set); + } + } + + /** + * @param {Chunk} chunk target chunk + * @param {RuntimeModule} module runtime module + * @returns {void} + */ + addRuntimeModule(chunk, module) { + // Deprecated ModuleGraph association + ModuleGraph.setModuleGraphForModule(module, this.moduleGraph); + + // add it to the list + this.modules.add(module); + this._modules.set(module.identifier(), module); + + // connect to the chunk graph + this.chunkGraph.connectChunkAndModule(chunk, module); + this.chunkGraph.connectChunkAndRuntimeModule(chunk, module); + if (module.fullHash) { + this.chunkGraph.addFullHashModuleToChunk(chunk, module); + } + + // attach runtime module + module.attach(this, chunk); + + // Setup internals + const exportsInfo = this.moduleGraph.getExportsInfo(module); + exportsInfo.setHasProvideInfo(); + if (typeof chunk.runtime === "string") { + exportsInfo.setUsedForSideEffectsOnly(chunk.runtime); + } else if (chunk.runtime === undefined) { + exportsInfo.setUsedForSideEffectsOnly(undefined); + } else { + for (const runtime of chunk.runtime) { + exportsInfo.setUsedForSideEffectsOnly(runtime); + } + } + this.chunkGraph.addModuleRuntimeRequirements( + module, + chunk.runtime, + new Set([RuntimeGlobals.requireScope]) + ); + + // runtime modules don't need ids + this.chunkGraph.setModuleId(module, ""); + + // Call hook + this.hooks.runtimeModule.call(module, chunk); + } + + /** + * @param {string | ChunkGroupOptions} groupOptions options for the chunk group + * @param {Module} module the module the references the chunk group + * @param {DependencyLocation} loc the location from with the chunk group is referenced (inside of module) + * @param {string} request the request from which the the chunk group is referenced + * @returns {ChunkGroup} the new or existing chunk group + */ + addChunkInGroup(groupOptions, module, loc, request) { + if (typeof groupOptions === "string") { + groupOptions = { name: groupOptions }; + } + const name = groupOptions.name; + + if (name) { + const chunkGroup = this.namedChunkGroups.get(name); + if (chunkGroup !== undefined) { + chunkGroup.addOptions(groupOptions); + if (module) { + chunkGroup.addOrigin(module, loc, request); + } + return chunkGroup; + } + } + const chunkGroup = new ChunkGroup(groupOptions); + if (module) chunkGroup.addOrigin(module, loc, request); + const chunk = this.addChunk(name); + + connectChunkGroupAndChunk(chunkGroup, chunk); + + this.chunkGroups.push(chunkGroup); + if (name) { + this.namedChunkGroups.set(name, chunkGroup); + } + return chunkGroup; + } + + /** + * @param {EntryOptions} options options for the entrypoint + * @param {Module} module the module the references the chunk group + * @param {DependencyLocation} loc the location from with the chunk group is referenced (inside of module) + * @param {string} request the request from which the the chunk group is referenced + * @returns {Entrypoint} the new or existing entrypoint + */ + addAsyncEntrypoint(options, module, loc, request) { + const name = options.name; + if (name) { + const entrypoint = this.namedChunkGroups.get(name); + if (entrypoint instanceof Entrypoint) { + if (entrypoint !== undefined) { + if (module) { + entrypoint.addOrigin(module, loc, request); + } + return entrypoint; + } + } else if (entrypoint) { + throw new Error( + `Cannot add an async entrypoint with the name '${name}', because there is already an chunk group with this name` + ); + } + } + const chunk = this.addChunk(name); + if (options.filename) { + chunk.filenameTemplate = options.filename; + } + const entrypoint = new Entrypoint(options, false); + entrypoint.setRuntimeChunk(chunk); + entrypoint.setEntrypointChunk(chunk); + if (name) { + this.namedChunkGroups.set(name, entrypoint); + } + this.chunkGroups.push(entrypoint); + this.asyncEntrypoints.push(entrypoint); + connectChunkGroupAndChunk(entrypoint, chunk); + if (module) { + entrypoint.addOrigin(module, loc, request); + } + return entrypoint; + } + + /** + * This method first looks to see if a name is provided for a new chunk, + * and first looks to see if any named chunks already exist and reuse that chunk instead. + * + * @param {string=} name optional chunk name to be provided + * @returns {Chunk} create a chunk (invoked during seal event) + */ + addChunk(name) { + if (name) { + const chunk = this.namedChunks.get(name); + if (chunk !== undefined) { + return chunk; + } + } + const chunk = new Chunk(name); + this.chunks.add(chunk); + ChunkGraph.setChunkGraphForChunk(chunk, this.chunkGraph); + if (name) { + this.namedChunks.set(name, chunk); + } + return chunk; + } + + /** + * @param {Module} module module to assign depth + * @returns {void} + */ + assignDepth(module) { + const moduleGraph = this.moduleGraph; + + const queue = new Set([module]); + let depth; + + moduleGraph.setDepth(module, 0); + + /** + * @param {Module} module module for processing + * @returns {void} + */ + const processModule = module => { + if (!moduleGraph.setDepthIfLower(module, depth)) return; + queue.add(module); + }; + + for (module of queue) { + queue.delete(module); + depth = moduleGraph.getDepth(module) + 1; + + for (const connection of moduleGraph.getOutgoingConnections(module)) { + const refModule = connection.module; + if (refModule) { + processModule(refModule); + } + } + } + } + + /** + * @param {Dependency} dependency the dependency + * @param {RuntimeSpec} runtime the runtime + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getDependencyReferencedExports(dependency, runtime) { + const referencedExports = dependency.getReferencedExports( + this.moduleGraph, + runtime + ); + return this.hooks.dependencyReferencedExports.call( + referencedExports, + dependency, + runtime + ); + } + + /** + * + * @param {Module} module module relationship for removal + * @param {DependenciesBlockLike} block //TODO: good description + * @returns {void} + */ + removeReasonsOfDependencyBlock(module, block) { + const chunkGraph = this.chunkGraph; + const iteratorDependency = d => { + if (!d.module) { + return; + } + if (d.module.removeReason(module, d)) { + for (const chunk of chunkGraph.getModuleChunksIterable(d.module)) { + this.patchChunksAfterReasonRemoval(d.module, chunk); + } + } + }; + + if (block.blocks) { + for (const b of block.blocks) { + this.removeReasonsOfDependencyBlock(module, b); + } + } + + if (block.dependencies) { + for (const dep of block.dependencies) iteratorDependency(dep); + } + } + + /** + * @param {Module} module module to patch tie + * @param {Chunk} chunk chunk to patch tie + * @returns {void} + */ + patchChunksAfterReasonRemoval(module, chunk) { + if (!module.hasReasons(this.moduleGraph, chunk.runtime)) { + this.removeReasonsOfDependencyBlock(module, module); + } + if (!module.hasReasonForChunk(chunk, this.moduleGraph, this.chunkGraph)) { + if (this.chunkGraph.isModuleInChunk(module, chunk)) { + this.chunkGraph.disconnectChunkAndModule(chunk, module); + this.removeChunkFromDependencies(module, chunk); + } + } + } + + /** + * + * @param {DependenciesBlock} block block tie for Chunk + * @param {Chunk} chunk chunk to remove from dep + * @returns {void} + */ + removeChunkFromDependencies(block, chunk) { + const iteratorDependency = d => { + if (!d.module) { + return; + } + this.patchChunksAfterReasonRemoval(d.module, chunk); + }; + + const blocks = block.blocks; + for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { + const asyncBlock = blocks[indexBlock]; + const chunkGroup = this.chunkGraph.getBlockChunkGroup(asyncBlock); + // Grab all chunks from the first Block's AsyncDepBlock + const chunks = chunkGroup.chunks; + // For each chunk in chunkGroup + for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { + const iteratedChunk = chunks[indexChunk]; + chunkGroup.removeChunk(iteratedChunk); + // Recurse + this.removeChunkFromDependencies(block, iteratedChunk); + } + } + + if (block.dependencies) { + for (const dep of block.dependencies) iteratorDependency(dep); + } + } + + assignRuntimeIds() { + const { chunkGraph } = this; + const processEntrypoint = ep => { + const runtime = ep.options.runtime || ep.name; + const chunk = ep.getRuntimeChunk(); + chunkGraph.setRuntimeId(runtime, chunk.id); + }; + for (const ep of this.entrypoints.values()) { + processEntrypoint(ep); + } + for (const ep of this.asyncEntrypoints) { + processEntrypoint(ep); + } + } + + sortItemsWithChunkIds() { + for (const chunkGroup of this.chunkGroups) { + chunkGroup.sortItems(); + } + + this.errors.sort(compareErrors); + this.warnings.sort(compareErrors); + this.children.sort(byNameOrHash); + } + + summarizeDependencies() { + for ( + let indexChildren = 0; + indexChildren < this.children.length; + indexChildren++ + ) { + const child = this.children[indexChildren]; + + this.fileDependencies.addAll(child.fileDependencies); + this.contextDependencies.addAll(child.contextDependencies); + this.missingDependencies.addAll(child.missingDependencies); + this.buildDependencies.addAll(child.buildDependencies); + } + + for (const module of this.modules) { + module.addCacheDependencies( + this.fileDependencies, + this.contextDependencies, + this.missingDependencies, + this.buildDependencies + ); + } + } + + createModuleHashes() { + let statModulesHashed = 0; + const { chunkGraph, runtimeTemplate } = this; + const { hashFunction, hashDigest, hashDigestLength } = this.outputOptions; + for (const module of this.modules) { + for (const runtime of chunkGraph.getModuleRuntimes(module)) { + statModulesHashed++; + const moduleHash = createHash(hashFunction); + module.updateHash(moduleHash, { + chunkGraph, + runtime, + runtimeTemplate + }); + const moduleHashDigest = /** @type {string} */ (moduleHash.digest( + hashDigest + )); + chunkGraph.setModuleHashes( + module, + runtime, + moduleHashDigest, + moduleHashDigest.substr(0, hashDigestLength) + ); + } + } + this.logger.log( + `${statModulesHashed} modules hashed (${ + Math.round((100 * statModulesHashed) / this.modules.size) / 100 + } variants per module in average)` + ); + } + + createHash() { + this.logger.time("hashing: initialize hash"); + const chunkGraph = this.chunkGraph; + const runtimeTemplate = this.runtimeTemplate; + const outputOptions = this.outputOptions; + const hashFunction = outputOptions.hashFunction; + const hashDigest = outputOptions.hashDigest; + const hashDigestLength = outputOptions.hashDigestLength; + const hash = createHash(hashFunction); + if (outputOptions.hashSalt) { + hash.update(outputOptions.hashSalt); + } + this.logger.timeEnd("hashing: initialize hash"); + if (this.children.length > 0) { + this.logger.time("hashing: hash child compilations"); + for (const child of this.children) { + hash.update(child.hash); + } + this.logger.timeEnd("hashing: hash child compilations"); + } + if (this.warnings.length > 0) { + this.logger.time("hashing: hash warnings"); + for (const warning of this.warnings) { + hash.update(`${warning.message}`); + } + this.logger.timeEnd("hashing: hash warnings"); + } + if (this.errors.length > 0) { + this.logger.time("hashing: hash errors"); + for (const error of this.errors) { + hash.update(`${error.message}`); + } + this.logger.timeEnd("hashing: hash errors"); + } + + this.logger.time("hashing: sort chunks"); + // clone needed as sort below is in place mutation + const chunks = Array.from(this.chunks); + /** + * sort here will bring all "falsy" values to the beginning + * this is needed as the "hasRuntime()" chunks are dependent on the + * hashes of the non-runtime chunks. + */ + const runtimeChunks = []; + const otherChunks = []; + for (const c of chunks) { + if (c.hasRuntime()) { + runtimeChunks.push({ + chunk: c, + referencedChunks: new Set( + Array.from(c.getAllReferencedAsyncEntrypoints()).map( + e => e.chunks[e.chunks.length - 1] + ) + ) + }); + } else { + otherChunks.push(c); + } + } + otherChunks.sort(byId); + runtimeChunks.sort((a, b) => { + const aDependOnB = a.referencedChunks.has(b.chunk); + const bDependOnA = b.referencedChunks.has(a.chunk); + if (aDependOnB && bDependOnA) { + const err = new WebpackError( + `Circular dependency between chunks with runtime (${ + a.chunk.name || a.chunk.id + } and ${b.chunk.name || b.chunk.id}). +This prevents using hashes of each other and should be avoided.` + ); + err.chunk = a.chunk; + this.warnings.push(err); + return byId(a.chunk, b.chunk); + } + if (aDependOnB) return 1; + if (bDependOnA) return -1; + return byId(a.chunk, b.chunk); + }); + this.logger.timeEnd("hashing: sort chunks"); + const fullHashChunks = new Set(); + const processChunk = chunk => { + // Last minute module hash generation for modules that depend on chunk hashes + this.logger.time("hashing: hash runtime modules"); + for (const module of chunkGraph.getChunkModulesIterable(chunk)) { + if (!chunkGraph.hasModuleHashes(module, chunk.runtime)) { + const moduleHash = createHash(hashFunction); + module.updateHash(moduleHash, { + chunkGraph, + runtime: chunk.runtime, + runtimeTemplate + }); + const moduleHashDigest = /** @type {string} */ (moduleHash.digest( + hashDigest + )); + chunkGraph.setModuleHashes( + module, + chunk.runtime, + moduleHashDigest, + moduleHashDigest.substr(0, hashDigestLength) + ); + } + } + this.logger.timeAggregate("hashing: hash runtime modules"); + const chunkHash = createHash(hashFunction); + this.logger.time("hashing: hash chunks"); + try { + if (outputOptions.hashSalt) { + chunkHash.update(outputOptions.hashSalt); + } + chunk.updateHash(chunkHash, chunkGraph); + this.hooks.chunkHash.call(chunk, chunkHash, { + chunkGraph, + moduleGraph: this.moduleGraph, + runtimeTemplate: this.runtimeTemplate + }); + const chunkHashDigest = /** @type {string} */ (chunkHash.digest( + hashDigest + )); + hash.update(chunkHashDigest); + chunk.hash = chunkHashDigest; + chunk.renderedHash = chunk.hash.substr(0, hashDigestLength); + const fullHashModules = chunkGraph.getChunkFullHashModulesIterable( + chunk + ); + if (fullHashModules) { + fullHashChunks.add(chunk); + } else { + this.hooks.contentHash.call(chunk); + } + } catch (err) { + this.errors.push(new ChunkRenderError(chunk, "", err)); + } + this.logger.timeAggregate("hashing: hash chunks"); + }; + otherChunks.forEach(processChunk); + for (const { chunk } of runtimeChunks) processChunk(chunk); + + this.logger.timeAggregateEnd("hashing: hash runtime modules"); + this.logger.timeAggregateEnd("hashing: hash chunks"); + this.logger.time("hashing: hash digest"); + this.hooks.fullHash.call(hash); + this.fullHash = /** @type {string} */ (hash.digest(hashDigest)); + this.hash = this.fullHash.substr(0, hashDigestLength); + this.logger.timeEnd("hashing: hash digest"); + + this.logger.time("hashing: process full hash modules"); + for (const chunk of fullHashChunks) { + for (const module of chunkGraph.getChunkFullHashModulesIterable(chunk)) { + const moduleHash = createHash(hashFunction); + module.updateHash(moduleHash, { + chunkGraph, + runtime: chunk.runtime, + runtimeTemplate + }); + const moduleHashDigest = /** @type {string} */ (moduleHash.digest( + hashDigest + )); + chunkGraph.setModuleHashes( + module, + chunk.runtime, + moduleHashDigest, + moduleHashDigest.substr(0, hashDigestLength) + ); + } + const chunkHash = createHash(hashFunction); + chunkHash.update(chunk.hash); + chunkHash.update(this.hash); + const chunkHashDigest = /** @type {string} */ (chunkHash.digest( + hashDigest + )); + chunk.hash = chunkHashDigest; + chunk.renderedHash = chunk.hash.substr(0, hashDigestLength); + this.hooks.contentHash.call(chunk); + } + this.logger.timeEnd("hashing: process full hash modules"); + } + + /** + * @param {string} file file name + * @param {Source} source asset source + * @param {AssetInfo} assetInfo extra asset information + * @returns {void} + */ + emitAsset(file, source, assetInfo = {}) { + if (this.assets[file]) { + if (!isSourceEqual(this.assets[file], source)) { + this.errors.push( + new WebpackError( + `Conflict: Multiple assets emit different content to the same filename ${file}` + ) + ); + this.assets[file] = source; + this._setAssetInfo(file, assetInfo); + return; + } + const oldInfo = this.assetsInfo.get(file); + const newInfo = Object.assign({}, oldInfo, assetInfo); + this._setAssetInfo(file, newInfo, oldInfo); + return; + } + this.assets[file] = source; + this._setAssetInfo(file, assetInfo, undefined); + } + + _setAssetInfo(file, newInfo, oldInfo = this.assetsInfo.get(file)) { + if (newInfo === undefined) { + this.assetsInfo.delete(file); + } else { + this.assetsInfo.set(file, newInfo); + } + const oldRelated = oldInfo && oldInfo.related; + const newRelated = newInfo && newInfo.related; + if (oldRelated) { + for (const key of Object.keys(oldRelated)) { + const remove = name => { + const relatedIn = this._assetsRelatedIn.get(name); + if (relatedIn === undefined) return; + const entry = relatedIn.get(key); + if (entry === undefined) return; + entry.delete(file); + if (entry.size !== 0) return; + relatedIn.delete(key); + if (relatedIn.size === 0) this._assetsRelatedIn.delete(name); + }; + const entry = oldRelated[key]; + if (Array.isArray(entry)) { + entry.forEach(remove); + } else if (entry) { + remove(entry); + } + } + } + if (newRelated) { + for (const key of Object.keys(newRelated)) { + const add = name => { + let relatedIn = this._assetsRelatedIn.get(name); + if (relatedIn === undefined) { + this._assetsRelatedIn.set(name, (relatedIn = new Map())); + } + let entry = relatedIn.get(key); + if (entry === undefined) { + relatedIn.set(key, (entry = new Set())); + } + entry.add(file); + }; + const entry = newRelated[key]; + if (Array.isArray(entry)) { + entry.forEach(add); + } else if (entry) { + add(entry); + } + } + } + } + + /** + * @param {string} file file name + * @param {Source | function(Source): Source} newSourceOrFunction new asset source or function converting old to new + * @param {AssetInfo | function(AssetInfo | undefined): AssetInfo} assetInfoUpdateOrFunction new asset info or function converting old to new + */ + updateAsset( + file, + newSourceOrFunction, + assetInfoUpdateOrFunction = undefined + ) { + if (!this.assets[file]) { + throw new Error( + `Called Compilation.updateAsset for not existing filename ${file}` + ); + } + if (typeof newSourceOrFunction === "function") { + this.assets[file] = newSourceOrFunction(this.assets[file]); + } else { + this.assets[file] = newSourceOrFunction; + } + if (assetInfoUpdateOrFunction !== undefined) { + const oldInfo = this.assetsInfo.get(file) || EMPTY_ASSET_INFO; + if (typeof assetInfoUpdateOrFunction === "function") { + this._setAssetInfo(file, assetInfoUpdateOrFunction(oldInfo), oldInfo); + } else { + this._setAssetInfo( + file, + cachedCleverMerge(oldInfo, assetInfoUpdateOrFunction), + oldInfo + ); + } + } + } + + renameAsset(file, newFile) { + const source = this.assets[file]; + if (!source) { + throw new Error( + `Called Compilation.renameAsset for not existing filename ${file}` + ); + } + if (this.assets[newFile]) { + if (!isSourceEqual(this.assets[file], source)) { + this.errors.push( + new WebpackError( + `Conflict: Called Compilation.renameAsset for already existing filename ${newFile} with different content` + ) + ); + } + } + const assetInfo = this.assetsInfo.get(file); + // Update related in all other assets + const relatedInInfo = this._assetsRelatedIn.get(file); + if (relatedInInfo) { + for (const [key, assets] of relatedInInfo) { + for (const name of assets) { + const info = this.assetsInfo.get(name); + if (!info) continue; + const related = info.related; + if (!related) continue; + const entry = related[key]; + let newEntry; + if (Array.isArray(entry)) { + newEntry = entry.map(x => (x === file ? newFile : x)); + } else if (entry === file) { + newEntry = newFile; + } else continue; + this.assetsInfo.set(name, { + ...info, + related: { + ...related, + [key]: newEntry + } + }); + } + } + } + this._setAssetInfo(file, undefined, assetInfo); + this._setAssetInfo(newFile, assetInfo); + delete this.assets[file]; + this.assets[newFile] = source; + for (const chunk of this.chunks) { + { + const size = chunk.files.size; + chunk.files.delete(file); + if (size !== chunk.files.size) { + chunk.files.add(newFile); + } + } + { + const size = chunk.auxiliaryFiles.size; + chunk.auxiliaryFiles.delete(file); + if (size !== chunk.auxiliaryFiles.size) { + chunk.auxiliaryFiles.add(newFile); + } + } + } + } + + /** + * @param {string} file file name + */ + deleteAsset(file) { + if (!this.assets[file]) { + return; + } + delete this.assets[file]; + const assetInfo = this.assetsInfo.get(file); + this._setAssetInfo(file, undefined, assetInfo); + const related = assetInfo && assetInfo.related; + if (related) { + for (const key of Object.keys(related)) { + const checkUsedAndDelete = file => { + if (!this._assetsRelatedIn.has(file)) { + this.deleteAsset(file); + } + }; + const items = related[key]; + if (Array.isArray(items)) { + items.forEach(checkUsedAndDelete); + } else if (items) { + checkUsedAndDelete(items); + } + } + } + // TODO If this becomes a performance problem + // store a reverse mapping from asset to chunk + for (const chunk of this.chunks) { + chunk.files.delete(file); + chunk.auxiliaryFiles.delete(file); + } + } + + getAssets() { + /** @type {Readonly[]} */ + const array = []; + for (const assetName of Object.keys(this.assets)) { + if (Object.prototype.hasOwnProperty.call(this.assets, assetName)) { + array.push({ + name: assetName, + source: this.assets[assetName], + info: this.assetsInfo.get(assetName) || EMPTY_ASSET_INFO + }); + } + } + return array; + } + + /** + * @param {string} name the name of the asset + * @returns {Readonly | undefined} the asset or undefined when not found + */ + getAsset(name) { + if (!Object.prototype.hasOwnProperty.call(this.assets, name)) + return undefined; + return { + name, + source: this.assets[name], + info: this.assetsInfo.get(name) || EMPTY_ASSET_INFO + }; + } + + clearAssets() { + for (const chunk of this.chunks) { + chunk.files.clear(); + chunk.auxiliaryFiles.clear(); + } + } + + createModuleAssets() { + const { chunkGraph } = this; + for (const module of this.modules) { + if (module.buildInfo.assets) { + const assetsInfo = module.buildInfo.assetsInfo; + for (const assetName of Object.keys(module.buildInfo.assets)) { + const fileName = this.getPath(assetName, { + chunkGraph: this.chunkGraph, + module + }); + for (const chunk of chunkGraph.getModuleChunksIterable(module)) { + chunk.auxiliaryFiles.add(fileName); + } + this.emitAsset( + fileName, + module.buildInfo.assets[assetName], + assetsInfo ? assetsInfo.get(assetName) : undefined + ); + this.hooks.moduleAsset.call(module, fileName); + } + } + } + } + + /** + * @param {RenderManifestOptions} options options object + * @returns {RenderManifestEntry[]} manifest entries + */ + getRenderManifest(options) { + return this.hooks.renderManifest.call([], options); + } + + /** + * @param {Callback} callback signals when the call finishes + * @returns {void} + */ + createChunkAssets(callback) { + const outputOptions = this.outputOptions; + const cachedSourceMap = new WeakMap(); + /** @type {Map} */ + const alreadyWrittenFiles = new Map(); + + asyncLib.forEach( + this.chunks, + (chunk, callback) => { + /** @type {RenderManifestEntry[]} */ + let manifest; + try { + manifest = this.getRenderManifest({ + chunk, + hash: this.hash, + fullHash: this.fullHash, + outputOptions, + codeGenerationResults: this.codeGenerationResults, + moduleTemplates: this.moduleTemplates, + dependencyTemplates: this.dependencyTemplates, + chunkGraph: this.chunkGraph, + moduleGraph: this.moduleGraph, + runtimeTemplate: this.runtimeTemplate + }); + } catch (err) { + this.errors.push(new ChunkRenderError(chunk, "", err)); + return callback(); + } + asyncLib.forEach( + manifest, + (fileManifest, callback) => { + const ident = fileManifest.identifier; + const usedHash = fileManifest.hash; + + const assetCacheItem = this._assetsCache.getItemCache( + ident, + usedHash + ); + + assetCacheItem.get((err, sourceFromCache) => { + /** @type {string | function(PathData, AssetInfo=): string} */ + let filenameTemplate; + /** @type {string} */ + let file; + /** @type {AssetInfo} */ + let assetInfo; + + let inTry = true; + const errorAndCallback = err => { + const filename = + file || + (typeof file === "string" + ? file + : typeof filenameTemplate === "string" + ? filenameTemplate + : ""); + + this.errors.push(new ChunkRenderError(chunk, filename, err)); + inTry = false; + return callback(); + }; + + try { + if ("filename" in fileManifest) { + file = fileManifest.filename; + assetInfo = fileManifest.info; + } else { + filenameTemplate = fileManifest.filenameTemplate; + const pathAndInfo = this.getPathWithInfo( + filenameTemplate, + fileManifest.pathOptions + ); + file = pathAndInfo.path; + assetInfo = fileManifest.info + ? { + ...pathAndInfo.info, + ...fileManifest.info + } + : pathAndInfo.info; + } + + if (err) { + return errorAndCallback(err); + } + + let source = sourceFromCache; + + // check if the same filename was already written by another chunk + const alreadyWritten = alreadyWrittenFiles.get(file); + if (alreadyWritten !== undefined) { + if (alreadyWritten.hash !== usedHash) { + inTry = false; + return callback( + new WebpackError( + `Conflict: Multiple chunks emit assets to the same filename ${file}` + + ` (chunks ${alreadyWritten.chunk.id} and ${chunk.id})` + ) + ); + } else { + source = alreadyWritten.source; + } + } else if (!source) { + // render the asset + source = fileManifest.render(); + + // Ensure that source is a cached source to avoid additional cost because of repeated access + if (!(source instanceof CachedSource)) { + const cacheEntry = cachedSourceMap.get(source); + if (cacheEntry) { + source = cacheEntry; + } else { + const cachedSource = new CachedSource(source); + cachedSourceMap.set(source, cachedSource); + source = cachedSource; + } + } + } + this.emitAsset(file, source, assetInfo); + if (fileManifest.auxiliary) { + chunk.auxiliaryFiles.add(file); + } else { + chunk.files.add(file); + } + this.hooks.chunkAsset.call(chunk, file); + alreadyWrittenFiles.set(file, { + hash: usedHash, + source, + chunk + }); + if (source !== sourceFromCache) { + assetCacheItem.store(source, err => { + if (err) return errorAndCallback(err); + inTry = false; + return callback(); + }); + } else { + inTry = false; + callback(); + } + } catch (err) { + if (!inTry) throw err; + errorAndCallback(err); + } + }); + }, + callback + ); + }, + callback + ); + } + + /** + * @param {string | function(PathData, AssetInfo=): string} filename used to get asset path with hash + * @param {PathData} data context data + * @returns {string} interpolated path + */ + getPath(filename, data = {}) { + if (!data.hash) { + data = { + hash: this.hash, + ...data + }; + } + return this.getAssetPath(filename, data); + } + + /** + * @param {string | function(PathData, AssetInfo=): string} filename used to get asset path with hash + * @param {PathData} data context data + * @returns {{ path: string, info: AssetInfo }} interpolated path and asset info + */ + getPathWithInfo(filename, data = {}) { + if (!data.hash) { + data = { + hash: this.hash, + ...data + }; + } + return this.getAssetPathWithInfo(filename, data); + } + + /** + * @param {string | function(PathData, AssetInfo=): string} filename used to get asset path with hash + * @param {PathData} data context data + * @returns {string} interpolated path + */ + getAssetPath(filename, data) { + return this.hooks.assetPath.call( + typeof filename === "function" ? filename(data) : filename, + data, + undefined + ); + } + + /** + * @param {string | function(PathData, AssetInfo=): string} filename used to get asset path with hash + * @param {PathData} data context data + * @returns {{ path: string, info: AssetInfo }} interpolated path and asset info + */ + getAssetPathWithInfo(filename, data) { + const assetInfo = {}; + // TODO webpack 5: refactor assetPath hook to receive { path, info } object + const newPath = this.hooks.assetPath.call( + typeof filename === "function" ? filename(data, assetInfo) : filename, + data, + assetInfo + ); + return { path: newPath, info: assetInfo }; + } + + getWarnings() { + return this.hooks.processWarnings.call(this.warnings); + } + + getErrors() { + return this.hooks.processErrors.call(this.errors); + } + + /** + * This function allows you to run another instance of webpack inside of webpack however as + * a child with different settings and configurations (if desired) applied. It copies all hooks, plugins + * from parent (or top level compiler) and creates a child Compilation + * + * @param {string} name name of the child compiler + * @param {OutputOptions} outputOptions // Need to convert config schema to types for this + * @param {Array} plugins webpack plugins that will be applied + * @returns {Compiler} creates a child Compiler instance + */ + createChildCompiler(name, outputOptions, plugins) { + const idx = this.childrenCounters[name] || 0; + this.childrenCounters[name] = idx + 1; + return this.compiler.createChildCompiler( + this, + name, + idx, + outputOptions, + plugins + ); + } + + checkConstraints() { + const chunkGraph = this.chunkGraph; + + /** @type {Set} */ + const usedIds = new Set(); + + for (const module of this.modules) { + if (module.type === "runtime") continue; + const moduleId = chunkGraph.getModuleId(module); + if (moduleId === null) continue; + if (usedIds.has(moduleId)) { + throw new Error(`checkConstraints: duplicate module id ${moduleId}`); + } + usedIds.add(moduleId); + } + + for (const chunk of this.chunks) { + for (const module of chunkGraph.getChunkModulesIterable(chunk)) { + if (!this.modules.has(module)) { + throw new Error( + "checkConstraints: module in chunk but not in compilation " + + ` ${chunk.debugId} ${module.debugId}` + ); + } + } + for (const module of chunkGraph.getChunkEntryModulesIterable(chunk)) { + if (!this.modules.has(module)) { + throw new Error( + "checkConstraints: entry module in chunk but not in compilation " + + ` ${chunk.debugId} ${module.debugId}` + ); + } + } + } + + for (const chunkGroup of this.chunkGroups) { + chunkGroup.checkConstraints(); + } + } +} + +// Hide from typescript +const compilationPrototype = Compilation.prototype; + +// TODO webpack 6 remove +Object.defineProperty(compilationPrototype, "modifyHash", { + writable: false, + enumerable: false, + configurable: false, + value: () => { + throw new Error( + "Compilation.modifyHash was removed in favor of Compilation.hooks.fullHash" + ); + } +}); + +// TODO webpack 6 remove +Object.defineProperty(compilationPrototype, "cache", { + enumerable: false, + configurable: false, + get: util.deprecate( + /** + * @this {Compilation} the compilation + * @returns {Cache} the cache + */ + function () { + return this.compiler.cache; + }, + "Compilation.cache was removed in favor of Compilation.getCache()", + "DEP_WEBPACK_COMPILATION_CACHE" + ), + set: util.deprecate( + v => {}, + "Compilation.cache was removed in favor of Compilation.getCache()", + "DEP_WEBPACK_COMPILATION_CACHE" + ) +}); + +/** + * Add additional assets to the compilation. + */ +Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL = -2000; + +/** + * Basic preprocessing of assets. + */ +Compilation.PROCESS_ASSETS_STAGE_PRE_PROCESS = -1000; + +/** + * Derive new assets from existing assets. + * Existing assets should not be treated as complete. + */ +Compilation.PROCESS_ASSETS_STAGE_DERIVED = -200; + +/** + * Add additional sections to existing assets, like a banner or initialization code. + */ +Compilation.PROCESS_ASSETS_STAGE_ADDITIONS = -100; + +/** + * Optimize existing assets in a general way. + */ +Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE = 100; + +/** + * Optimize the count of existing assets, e. g. by merging them. + * Only assets of the same type should be merged. + * For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE. + */ +Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT = 200; + +/** + * Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes. + */ +Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY = 300; + +/** + * Optimize the size of existing assets, e. g. by minimizing or omitting whitespace. + */ +Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE = 400; + +/** + * Add development tooling to assets, e. g. by extracting a SourceMap. + */ +Compilation.PROCESS_ASSETS_STAGE_DEV_TOOLING = 500; + +/** + * Optimize the count of existing assets, e. g. by inlining assets of into other assets. + * Only assets of different types should be inlined. + * For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT. + */ +Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE = 700; + +/** + * Summarize the list of existing assets + * e. g. creating an assets manifest of Service Workers. + */ +Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE = 1000; + +/** + * Optimize the hashes of the assets, e. g. by generating real hashes of the asset content. + */ +Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_HASH = 2500; + +/** + * Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset. + */ +Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER = 3000; + +/** + * Analyse existing assets. + */ +Compilation.PROCESS_ASSETS_STAGE_ANALYSE = 4000; + +/** + * Creating assets for reporting purposes. + */ +Compilation.PROCESS_ASSETS_STAGE_REPORT = 5000; + +module.exports = Compilation; + + +/***/ }), + +/***/ 51455: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const parseJson = __webpack_require__(34270); +const asyncLib = __webpack_require__(36386); +const { + SyncHook, + SyncBailHook, + AsyncParallelHook, + AsyncSeriesHook +} = __webpack_require__(18416); +const { SizeOnlySource } = __webpack_require__(55600); +const webpack = __webpack_require__(16520); +const Cache = __webpack_require__(18338); +const CacheFacade = __webpack_require__(12628); +const Compilation = __webpack_require__(75388); +const ConcurrentCompilationError = __webpack_require__(93393); +const ContextModuleFactory = __webpack_require__(33497); +const NormalModuleFactory = __webpack_require__(95702); +const RequestShortener = __webpack_require__(81460); +const ResolverFactory = __webpack_require__(27022); +const Stats = __webpack_require__(49487); +const Watching = __webpack_require__(52807); +const WebpackError = __webpack_require__(24274); +const { Logger } = __webpack_require__(26655); +const { join, dirname, mkdirp } = __webpack_require__(71593); +const { makePathsRelative } = __webpack_require__(47779); +const { isSourceEqual } = __webpack_require__(73212); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").EntryNormalized} Entry */ +/** @typedef {import("../declarations/WebpackOptions").OutputNormalized} OutputOptions */ +/** @typedef {import("../declarations/WebpackOptions").WatchOptions} WatchOptions */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("../declarations/WebpackOptions").WebpackPluginInstance} WebpackPluginInstance */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./FileSystemInfo").FileSystemInfoEntry} FileSystemInfoEntry */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ +/** @typedef {import("./util/fs").IntermediateFileSystem} IntermediateFileSystem */ +/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */ +/** @typedef {import("./util/fs").WatchFileSystem} WatchFileSystem */ + +/** + * @typedef {Object} CompilationParams + * @property {NormalModuleFactory} normalModuleFactory + * @property {ContextModuleFactory} contextModuleFactory + */ + +/** + * @template T + * @callback Callback + * @param {Error=} err + * @param {T=} result + */ + +/** + * @callback RunAsChildCallback + * @param {Error=} err + * @param {Chunk[]=} entries + * @param {Compilation=} compilation + */ + +/** + * @typedef {Object} AssetEmittedInfo + * @property {Buffer} content + * @property {Source} source + * @property {Compilation} compilation + * @property {string} outputPath + * @property {string} targetPath + */ + +/** + * @param {string[]} array an array + * @returns {boolean} true, if the array is sorted + */ +const isSorted = array => { + for (let i = 1; i < array.length; i++) { + if (array[i - 1] > array[i]) return false; + } + return true; +}; + +/** + * @param {Object} obj an object + * @param {string[]} keys the keys of the object + * @returns {Object} the object with properties sorted by property name + */ +const sortObject = (obj, keys) => { + const o = {}; + for (const k of keys.sort()) { + o[k] = obj[k]; + } + return o; +}; + +/** + * @param {string} filename filename + * @param {string | string[] | undefined} hashes list of hashes + * @returns {boolean} true, if the filename contains any hash + */ +const includesHash = (filename, hashes) => { + if (!hashes) return false; + if (Array.isArray(hashes)) { + return hashes.some(hash => filename.includes(hash)); + } else { + return filename.includes(hashes); + } +}; + +class Compiler { + /** + * @param {string} context the compilation path + */ + constructor(context) { + this.hooks = Object.freeze({ + /** @type {SyncHook<[]>} */ + initialize: new SyncHook([]), + + /** @type {SyncBailHook<[Compilation], boolean>} */ + shouldEmit: new SyncBailHook(["compilation"]), + /** @type {AsyncSeriesHook<[Stats]>} */ + done: new AsyncSeriesHook(["stats"]), + /** @type {SyncHook<[Stats]>} */ + afterDone: new SyncHook(["stats"]), + /** @type {AsyncSeriesHook<[]>} */ + additionalPass: new AsyncSeriesHook([]), + /** @type {AsyncSeriesHook<[Compiler]>} */ + beforeRun: new AsyncSeriesHook(["compiler"]), + /** @type {AsyncSeriesHook<[Compiler]>} */ + run: new AsyncSeriesHook(["compiler"]), + /** @type {AsyncSeriesHook<[Compilation]>} */ + emit: new AsyncSeriesHook(["compilation"]), + /** @type {AsyncSeriesHook<[string, AssetEmittedInfo]>} */ + assetEmitted: new AsyncSeriesHook(["file", "info"]), + /** @type {AsyncSeriesHook<[Compilation]>} */ + afterEmit: new AsyncSeriesHook(["compilation"]), + + /** @type {SyncHook<[Compilation, CompilationParams]>} */ + thisCompilation: new SyncHook(["compilation", "params"]), + /** @type {SyncHook<[Compilation, CompilationParams]>} */ + compilation: new SyncHook(["compilation", "params"]), + /** @type {SyncHook<[NormalModuleFactory]>} */ + normalModuleFactory: new SyncHook(["normalModuleFactory"]), + /** @type {SyncHook<[ContextModuleFactory]>} */ + contextModuleFactory: new SyncHook(["contextModuleFactory"]), + + /** @type {AsyncSeriesHook<[CompilationParams]>} */ + beforeCompile: new AsyncSeriesHook(["params"]), + /** @type {SyncHook<[CompilationParams]>} */ + compile: new SyncHook(["params"]), + /** @type {AsyncParallelHook<[Compilation]>} */ + make: new AsyncParallelHook(["compilation"]), + /** @type {AsyncParallelHook<[Compilation]>} */ + finishMake: new AsyncSeriesHook(["compilation"]), + /** @type {AsyncSeriesHook<[Compilation]>} */ + afterCompile: new AsyncSeriesHook(["compilation"]), + + /** @type {AsyncSeriesHook<[Compiler]>} */ + watchRun: new AsyncSeriesHook(["compiler"]), + /** @type {SyncHook<[Error]>} */ + failed: new SyncHook(["error"]), + /** @type {SyncHook<[string | null, number]>} */ + invalid: new SyncHook(["filename", "changeTime"]), + /** @type {SyncHook<[]>} */ + watchClose: new SyncHook([]), + + /** @type {SyncBailHook<[string, string, any[]], true>} */ + infrastructureLog: new SyncBailHook(["origin", "type", "args"]), + + // TODO the following hooks are weirdly located here + // TODO move them for webpack 5 + /** @type {SyncHook<[]>} */ + environment: new SyncHook([]), + /** @type {SyncHook<[]>} */ + afterEnvironment: new SyncHook([]), + /** @type {SyncHook<[Compiler]>} */ + afterPlugins: new SyncHook(["compiler"]), + /** @type {SyncHook<[Compiler]>} */ + afterResolvers: new SyncHook(["compiler"]), + /** @type {SyncBailHook<[string, Entry], boolean>} */ + entryOption: new SyncBailHook(["context", "entry"]) + }); + + this.webpack = webpack; + + /** @type {string=} */ + this.name = undefined; + /** @type {Compilation=} */ + this.parentCompilation = undefined; + /** @type {Compiler} */ + this.root = this; + /** @type {string} */ + this.outputPath = ""; + /** @type {Watching} */ + this.watching = undefined; + + /** @type {OutputFileSystem} */ + this.outputFileSystem = null; + /** @type {IntermediateFileSystem} */ + this.intermediateFileSystem = null; + /** @type {InputFileSystem} */ + this.inputFileSystem = null; + /** @type {WatchFileSystem} */ + this.watchFileSystem = null; + + /** @type {string|null} */ + this.recordsInputPath = null; + /** @type {string|null} */ + this.recordsOutputPath = null; + this.records = {}; + /** @type {Set} */ + this.managedPaths = new Set(); + /** @type {Set} */ + this.immutablePaths = new Set(); + + /** @type {Set} */ + this.modifiedFiles = undefined; + /** @type {Set} */ + this.removedFiles = undefined; + /** @type {Map} */ + this.fileTimestamps = undefined; + /** @type {Map} */ + this.contextTimestamps = undefined; + + /** @type {ResolverFactory} */ + this.resolverFactory = new ResolverFactory(); + + this.infrastructureLogger = undefined; + + /** @type {WebpackOptions} */ + this.options = /** @type {WebpackOptions} */ ({}); + + this.context = context; + + this.requestShortener = new RequestShortener(context, this.root); + + this.cache = new Cache(); + + this.compilerPath = ""; + + /** @type {boolean} */ + this.running = false; + + /** @type {boolean} */ + this.idle = false; + + /** @type {boolean} */ + this.watchMode = false; + + /** @private @type {WeakMap }>} */ + this._assetEmittingSourceCache = new WeakMap(); + /** @private @type {Map} */ + this._assetEmittingWrittenFiles = new Map(); + } + + /** + * @param {string} name cache name + * @returns {CacheFacade} the cache facade instance + */ + getCache(name) { + return new CacheFacade(this.cache, `${this.compilerPath}${name}`); + } + + /** + * @param {string | (function(): string)} name name of the logger, or function called once to get the logger name + * @returns {Logger} a logger with that name + */ + getInfrastructureLogger(name) { + if (!name) { + throw new TypeError( + "Compiler.getInfrastructureLogger(name) called without a name" + ); + } + return new Logger( + (type, args) => { + if (typeof name === "function") { + name = name(); + if (!name) { + throw new TypeError( + "Compiler.getInfrastructureLogger(name) called with a function not returning a name" + ); + } + } + if (this.hooks.infrastructureLog.call(name, type, args) === undefined) { + if (this.infrastructureLogger !== undefined) { + this.infrastructureLogger(name, type, args); + } + } + }, + childName => { + if (typeof name === "function") { + if (typeof childName === "function") { + return this.getInfrastructureLogger(() => { + if (typeof name === "function") { + name = name(); + if (!name) { + throw new TypeError( + "Compiler.getInfrastructureLogger(name) called with a function not returning a name" + ); + } + } + if (typeof childName === "function") { + childName = childName(); + if (!childName) { + throw new TypeError( + "Logger.getChildLogger(name) called with a function not returning a name" + ); + } + } + return `${name}/${childName}`; + }); + } else { + return this.getInfrastructureLogger(() => { + if (typeof name === "function") { + name = name(); + if (!name) { + throw new TypeError( + "Compiler.getInfrastructureLogger(name) called with a function not returning a name" + ); + } + } + return `${name}/${childName}`; + }); + } + } else { + if (typeof childName === "function") { + return this.getInfrastructureLogger(() => { + if (typeof childName === "function") { + childName = childName(); + if (!childName) { + throw new TypeError( + "Logger.getChildLogger(name) called with a function not returning a name" + ); + } + } + return `${name}/${childName}`; + }); + } else { + return this.getInfrastructureLogger(`${name}/${childName}`); + } + } + } + ); + } + + /** + * @param {WatchOptions} watchOptions the watcher's options + * @param {Callback} handler signals when the call finishes + * @returns {Watching} a compiler watcher + */ + watch(watchOptions, handler) { + if (this.running) { + return handler(new ConcurrentCompilationError()); + } + + this.running = true; + this.watchMode = true; + this.watching = new Watching(this, watchOptions, handler); + return this.watching; + } + + /** + * @param {Callback} callback signals when the call finishes + * @returns {void} + */ + run(callback) { + if (this.running) { + return callback(new ConcurrentCompilationError()); + } + + let logger; + + const finalCallback = (err, stats) => { + if (logger) logger.time("beginIdle"); + this.idle = true; + this.cache.beginIdle(); + this.idle = true; + if (logger) logger.timeEnd("beginIdle"); + this.running = false; + if (err) { + this.hooks.failed.call(err); + } + if (callback !== undefined) callback(err, stats); + this.hooks.afterDone.call(stats); + }; + + const startTime = Date.now(); + + this.running = true; + + const onCompiled = (err, compilation) => { + if (err) return finalCallback(err); + + if (this.hooks.shouldEmit.call(compilation) === false) { + compilation.startTime = startTime; + compilation.endTime = Date.now(); + const stats = new Stats(compilation); + this.hooks.done.callAsync(stats, err => { + if (err) return finalCallback(err); + return finalCallback(null, stats); + }); + return; + } + + process.nextTick(() => { + logger = compilation.getLogger("webpack.Compiler"); + logger.time("emitAssets"); + this.emitAssets(compilation, err => { + logger.timeEnd("emitAssets"); + if (err) return finalCallback(err); + + if (compilation.hooks.needAdditionalPass.call()) { + compilation.needAdditionalPass = true; + + compilation.startTime = startTime; + compilation.endTime = Date.now(); + logger.time("done hook"); + const stats = new Stats(compilation); + this.hooks.done.callAsync(stats, err => { + logger.timeEnd("done hook"); + if (err) return finalCallback(err); + + this.hooks.additionalPass.callAsync(err => { + if (err) return finalCallback(err); + this.compile(onCompiled); + }); + }); + return; + } + + logger.time("emitRecords"); + this.emitRecords(err => { + logger.timeEnd("emitRecords"); + if (err) return finalCallback(err); + + compilation.startTime = startTime; + compilation.endTime = Date.now(); + logger.time("done hook"); + const stats = new Stats(compilation); + this.hooks.done.callAsync(stats, err => { + logger.timeEnd("done hook"); + if (err) return finalCallback(err); + this.cache.storeBuildDependencies( + compilation.buildDependencies, + err => { + if (err) return finalCallback(err); + return finalCallback(null, stats); + } + ); + }); + }); + }); + }); + }; + + const run = () => { + this.hooks.beforeRun.callAsync(this, err => { + if (err) return finalCallback(err); + + this.hooks.run.callAsync(this, err => { + if (err) return finalCallback(err); + + this.readRecords(err => { + if (err) return finalCallback(err); + + this.compile(onCompiled); + }); + }); + }); + }; + + if (this.idle) { + this.cache.endIdle(err => { + if (err) return finalCallback(err); + + this.idle = false; + run(); + }); + } else { + run(); + } + } + + /** + * @param {RunAsChildCallback} callback signals when the call finishes + * @returns {void} + */ + runAsChild(callback) { + const startTime = Date.now(); + this.compile((err, compilation) => { + if (err) return callback(err); + + this.parentCompilation.children.push(compilation); + for (const { name, source, info } of compilation.getAssets()) { + this.parentCompilation.emitAsset(name, source, info); + } + + const entries = []; + for (const ep of compilation.entrypoints.values()) { + entries.push(...ep.chunks); + } + + compilation.startTime = startTime; + compilation.endTime = Date.now(); + + return callback(null, entries, compilation); + }); + } + + purgeInputFileSystem() { + if (this.inputFileSystem && this.inputFileSystem.purge) { + this.inputFileSystem.purge(); + } + } + + /** + * @param {Compilation} compilation the compilation + * @param {Callback} callback signals when the assets are emitted + * @returns {void} + */ + emitAssets(compilation, callback) { + let outputPath; + + const emitFiles = err => { + if (err) return callback(err); + + const assets = compilation.getAssets(); + compilation.assets = { ...compilation.assets }; + /** @type {Map} */ + const caseInsensitiveMap = new Map(); + asyncLib.forEachLimit( + assets, + 15, + ({ name: file, source, info }, callback) => { + let targetFile = file; + let immutable = info.immutable; + const queryStringIdx = targetFile.indexOf("?"); + if (queryStringIdx >= 0) { + targetFile = targetFile.substr(0, queryStringIdx); + // We may remove the hash, which is in the query string + // So we recheck if the file is immutable + // This doesn't cover all cases, but immutable is only a performance optimization anyway + immutable = + immutable && + (includesHash(targetFile, info.contenthash) || + includesHash(targetFile, info.chunkhash) || + includesHash(targetFile, info.modulehash) || + includesHash(targetFile, info.fullhash)); + } + + const writeOut = err => { + if (err) return callback(err); + const targetPath = join( + this.outputFileSystem, + outputPath, + targetFile + ); + + // check if the target file has already been written by this Compiler + const targetFileGeneration = this._assetEmittingWrittenFiles.get( + targetPath + ); + + // create an cache entry for this Source if not already existing + let cacheEntry = this._assetEmittingSourceCache.get(source); + if (cacheEntry === undefined) { + cacheEntry = { + sizeOnlySource: undefined, + writtenTo: new Map() + }; + this._assetEmittingSourceCache.set(source, cacheEntry); + } + + let similarEntry; + + const checkSimilarFile = () => { + const caseInsensitiveTargetPath = targetPath.toLowerCase(); + similarEntry = caseInsensitiveMap.get(caseInsensitiveTargetPath); + if (similarEntry !== undefined) { + const { path: other, source: otherSource } = similarEntry; + if (isSourceEqual(otherSource, source)) { + // Size may or may not be available at this point. + // If it's not available add to "waiting" list and it will be updated once available + if (similarEntry.size !== undefined) { + updateWithReplacementSource(similarEntry.size); + } else { + if (!similarEntry.waiting) similarEntry.waiting = []; + similarEntry.waiting.push({ file, cacheEntry }); + } + alreadyWritten(); + } else { + const err = new WebpackError(`Prevent writing to file that only differs in casing or query string from already written file. +This will lead to a race-condition and corrupted files on case-insensitive file systems. +${targetPath} +${other}`); + err.file = file; + callback(err); + } + return true; + } else { + caseInsensitiveMap.set( + caseInsensitiveTargetPath, + (similarEntry = { + path: targetPath, + source, + size: undefined, + waiting: undefined + }) + ); + return false; + } + }; + + /** + * get the binary (Buffer) content from the Source + * @returns {Buffer} content for the source + */ + const getContent = () => { + if (typeof source.buffer === "function") { + return source.buffer(); + } else { + const bufferOrString = source.source(); + if (Buffer.isBuffer(bufferOrString)) { + return bufferOrString; + } else { + return Buffer.from(bufferOrString, "utf8"); + } + } + }; + + const alreadyWritten = () => { + // cache the information that the Source has been already been written to that location + if (targetFileGeneration === undefined) { + const newGeneration = 1; + this._assetEmittingWrittenFiles.set(targetPath, newGeneration); + cacheEntry.writtenTo.set(targetPath, newGeneration); + } else { + cacheEntry.writtenTo.set(targetPath, targetFileGeneration); + } + callback(); + }; + + /** + * Write the file to output file system + * @param {Buffer} content content to be written + * @returns {void} + */ + const doWrite = content => { + this.outputFileSystem.writeFile(targetPath, content, err => { + if (err) return callback(err); + + // information marker that the asset has been emitted + compilation.emittedAssets.add(file); + + // cache the information that the Source has been written to that location + const newGeneration = + targetFileGeneration === undefined + ? 1 + : targetFileGeneration + 1; + cacheEntry.writtenTo.set(targetPath, newGeneration); + this._assetEmittingWrittenFiles.set(targetPath, newGeneration); + this.hooks.assetEmitted.callAsync( + file, + { + content, + source, + outputPath, + compilation, + targetPath + }, + callback + ); + }); + }; + + const updateWithReplacementSource = size => { + updateFileWithReplacementSource(file, cacheEntry, size); + similarEntry.size = size; + if (similarEntry.waiting !== undefined) { + for (const { file, cacheEntry } of similarEntry.waiting) { + updateFileWithReplacementSource(file, cacheEntry, size); + } + } + }; + + const updateFileWithReplacementSource = ( + file, + cacheEntry, + size + ) => { + // Create a replacement resource which only allows to ask for size + // This allows to GC all memory allocated by the Source + // (expect when the Source is stored in any other cache) + if (!cacheEntry.sizeOnlySource) { + cacheEntry.sizeOnlySource = new SizeOnlySource(size); + } + compilation.updateAsset(file, cacheEntry.sizeOnlySource, { + size + }); + }; + + const processExistingFile = stats => { + // skip emitting if it's already there and an immutable file + if (immutable) { + updateWithReplacementSource(stats.size); + return alreadyWritten(); + } + + const content = getContent(); + + updateWithReplacementSource(content.length); + + // if it exists and content on disk matches content + // skip writing the same content again + // (to keep mtime and don't trigger watchers) + // for a fast negative match file size is compared first + if (content.length === stats.size) { + compilation.comparedForEmitAssets.add(file); + return this.outputFileSystem.readFile( + targetPath, + (err, existingContent) => { + if (err || !content.equals(existingContent)) { + return doWrite(content); + } else { + return alreadyWritten(); + } + } + ); + } + + return doWrite(content); + }; + + const processMissingFile = () => { + const content = getContent(); + + updateWithReplacementSource(content.length); + + return doWrite(content); + }; + + // if the target file has already been written + if (targetFileGeneration !== undefined) { + // check if the Source has been written to this target file + const writtenGeneration = cacheEntry.writtenTo.get(targetPath); + if (writtenGeneration === targetFileGeneration) { + // if yes, we skip writing the file + // as it's already there + // (we assume one doesn't remove files while the Compiler is running) + + compilation.updateAsset(file, cacheEntry.sizeOnlySource, { + size: cacheEntry.sizeOnlySource.size() + }); + + return callback(); + } + + if (!immutable) { + if (checkSimilarFile()) return; + // We wrote to this file before which has very likely a different content + // skip comparing and assume content is different for performance + // This case happens often during watch mode. + return processMissingFile(); + } + } + + if (checkSimilarFile()) return; + if (this.options.output.compareBeforeEmit) { + this.outputFileSystem.stat(targetPath, (err, stats) => { + const exists = !err && stats.isFile(); + + if (exists) { + processExistingFile(stats); + } else { + processMissingFile(); + } + }); + } else { + processMissingFile(); + } + }; + + if (targetFile.match(/\/|\\/)) { + const fs = this.outputFileSystem; + const dir = dirname(fs, join(fs, outputPath, targetFile)); + mkdirp(fs, dir, writeOut); + } else { + writeOut(); + } + }, + err => { + if (err) return callback(err); + + this.hooks.afterEmit.callAsync(compilation, err => { + if (err) return callback(err); + + return callback(); + }); + } + ); + }; + + this.hooks.emit.callAsync(compilation, err => { + if (err) return callback(err); + outputPath = compilation.getPath(this.outputPath, {}); + mkdirp(this.outputFileSystem, outputPath, emitFiles); + }); + } + + /** + * @param {Callback} callback signals when the call finishes + * @returns {void} + */ + emitRecords(callback) { + if (!this.recordsOutputPath) return callback(); + + const writeFile = () => { + this.outputFileSystem.writeFile( + this.recordsOutputPath, + JSON.stringify( + this.records, + (n, value) => { + if ( + typeof value === "object" && + value !== null && + !Array.isArray(value) + ) { + const keys = Object.keys(value); + if (!isSorted(keys)) { + return sortObject(value, keys); + } + } + return value; + }, + 2 + ), + callback + ); + }; + + const recordsOutputPathDirectory = dirname( + this.outputFileSystem, + this.recordsOutputPath + ); + if (!recordsOutputPathDirectory) { + return writeFile(); + } + mkdirp(this.outputFileSystem, recordsOutputPathDirectory, err => { + if (err) return callback(err); + writeFile(); + }); + } + + /** + * @param {Callback} callback signals when the call finishes + * @returns {void} + */ + readRecords(callback) { + if (!this.recordsInputPath) { + this.records = {}; + return callback(); + } + this.inputFileSystem.stat(this.recordsInputPath, err => { + // It doesn't exist + // We can ignore this. + if (err) return callback(); + + this.inputFileSystem.readFile(this.recordsInputPath, (err, content) => { + if (err) return callback(err); + + try { + this.records = parseJson(content.toString("utf-8")); + } catch (e) { + e.message = "Cannot parse records: " + e.message; + return callback(e); + } + + return callback(); + }); + }); + } + + /** + * @param {Compilation} compilation the compilation + * @param {string} compilerName the compiler's name + * @param {number} compilerIndex the compiler's index + * @param {OutputOptions} outputOptions the output options + * @param {WebpackPluginInstance[]} plugins the plugins to apply + * @returns {Compiler} a child compiler + */ + createChildCompiler( + compilation, + compilerName, + compilerIndex, + outputOptions, + plugins + ) { + const childCompiler = new Compiler(this.context); + childCompiler.name = compilerName; + childCompiler.outputPath = this.outputPath; + childCompiler.inputFileSystem = this.inputFileSystem; + childCompiler.outputFileSystem = null; + childCompiler.resolverFactory = this.resolverFactory; + childCompiler.modifiedFiles = this.modifiedFiles; + childCompiler.removedFiles = this.removedFiles; + childCompiler.fileTimestamps = this.fileTimestamps; + childCompiler.contextTimestamps = this.contextTimestamps; + childCompiler.cache = this.cache; + childCompiler.compilerPath = `${this.compilerPath}${compilerName}|${compilerIndex}|`; + + const relativeCompilerName = makePathsRelative( + this.context, + compilerName, + this.root + ); + if (!this.records[relativeCompilerName]) { + this.records[relativeCompilerName] = []; + } + if (this.records[relativeCompilerName][compilerIndex]) { + childCompiler.records = this.records[relativeCompilerName][compilerIndex]; + } else { + this.records[relativeCompilerName].push((childCompiler.records = {})); + } + + childCompiler.options = { + ...this.options, + output: { + ...this.options.output, + ...outputOptions + } + }; + childCompiler.parentCompilation = compilation; + childCompiler.root = this.root; + if (Array.isArray(plugins)) { + for (const plugin of plugins) { + plugin.apply(childCompiler); + } + } + for (const name in this.hooks) { + if ( + ![ + "make", + "compile", + "emit", + "afterEmit", + "invalid", + "done", + "thisCompilation" + ].includes(name) + ) { + if (childCompiler.hooks[name]) { + childCompiler.hooks[name].taps = this.hooks[name].taps.slice(); + } + } + } + + compilation.hooks.childCompiler.call( + childCompiler, + compilerName, + compilerIndex + ); + + return childCompiler; + } + + isChild() { + return !!this.parentCompilation; + } + + createCompilation() { + return new Compilation(this); + } + + /** + * @param {CompilationParams} params the compilation parameters + * @returns {Compilation} the created compilation + */ + newCompilation(params) { + const compilation = this.createCompilation(); + compilation.name = this.name; + compilation.records = this.records; + this.hooks.thisCompilation.call(compilation, params); + this.hooks.compilation.call(compilation, params); + return compilation; + } + + createNormalModuleFactory() { + const normalModuleFactory = new NormalModuleFactory({ + context: this.options.context, + fs: this.inputFileSystem, + resolverFactory: this.resolverFactory, + options: this.options.module || {}, + associatedObjectForCache: this.root, + layers: this.options.experiments.layers + }); + this.hooks.normalModuleFactory.call(normalModuleFactory); + return normalModuleFactory; + } + + createContextModuleFactory() { + const contextModuleFactory = new ContextModuleFactory(this.resolverFactory); + this.hooks.contextModuleFactory.call(contextModuleFactory); + return contextModuleFactory; + } + + newCompilationParams() { + const params = { + normalModuleFactory: this.createNormalModuleFactory(), + contextModuleFactory: this.createContextModuleFactory() + }; + return params; + } + + /** + * @param {Callback} callback signals when the compilation finishes + * @returns {void} + */ + compile(callback) { + const params = this.newCompilationParams(); + this.hooks.beforeCompile.callAsync(params, err => { + if (err) return callback(err); + + this.hooks.compile.call(params); + + const compilation = this.newCompilation(params); + + const logger = compilation.getLogger("webpack.Compiler"); + + logger.time("make hook"); + this.hooks.make.callAsync(compilation, err => { + logger.timeEnd("make hook"); + if (err) return callback(err); + + logger.time("finish make hook"); + this.hooks.finishMake.callAsync(compilation, err => { + logger.timeEnd("finish make hook"); + if (err) return callback(err); + + process.nextTick(() => { + logger.time("finish compilation"); + compilation.finish(err => { + logger.timeEnd("finish compilation"); + if (err) return callback(err); + + logger.time("seal compilation"); + compilation.seal(err => { + logger.timeEnd("seal compilation"); + if (err) return callback(err); + + logger.time("afterCompile hook"); + this.hooks.afterCompile.callAsync(compilation, err => { + logger.timeEnd("afterCompile hook"); + if (err) return callback(err); + + return callback(null, compilation); + }); + }); + }); + }); + }); + }); + }); + } + + /** + * @param {Callback} callback signals when the compiler closes + * @returns {void} + */ + close(callback) { + this.cache.shutdown(callback); + } +} + +module.exports = Compiler; + + +/***/ }), + +/***/ 21926: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Module")} Module */ + +const MODULE_REFERENCE_REGEXP = /^__WEBPACK_MODULE_REFERENCE__(\d+)_([\da-f]+|ns)(_call)?(_directImport)?(?:_asiSafe(\d))?__$/; + +const DEFAULT_EXPORT = "__WEBPACK_DEFAULT_EXPORT__"; +const NAMESPACE_OBJECT_EXPORT = "__WEBPACK_NAMESPACE_OBJECT__"; + +/** + * @typedef {Object} ExternalModuleInfo + * @property {number} index + * @property {Module} module + */ + +/** + * @typedef {Object} ConcatenatedModuleInfo + * @property {number} index + * @property {Module} module + * @property {Map} exportMap mapping from export name to symbol + * @property {Map} rawExportMap mapping from export name to symbol + * @property {string=} namespaceExportSymbol + */ + +/** @typedef {ConcatenatedModuleInfo | ExternalModuleInfo} ModuleInfo */ + +/** + * @typedef {Object} ModuleReferenceOptions + * @property {string[]} ids the properties/exports of the module + * @property {boolean} call true, when this referenced export is called + * @property {boolean} directImport true, when this referenced export is directly imported (not via property access) + * @property {boolean | undefined} asiSafe if the position is ASI safe or unknown + */ + +class ConcatenationScope { + /** + * @param {ModuleInfo[] | Map} modulesMap all module info by module + * @param {ConcatenatedModuleInfo} currentModule the current module info + */ + constructor(modulesMap, currentModule) { + this._currentModule = currentModule; + if (Array.isArray(modulesMap)) { + const map = new Map(); + for (const info of modulesMap) { + map.set(info.module, info); + } + modulesMap = map; + } + this._modulesMap = modulesMap; + } + + /** + * @param {Module} module the referenced module + * @returns {boolean} true, when it's in the scope + */ + isModuleInScope(module) { + return this._modulesMap.has(module); + } + + /** + * + * @param {string} exportName name of the export + * @param {string} symbol identifier of the export in source code + */ + registerExport(exportName, symbol) { + if (!this._currentModule.exportMap) { + this._currentModule.exportMap = new Map(); + } + if (!this._currentModule.exportMap.has(exportName)) { + this._currentModule.exportMap.set(exportName, symbol); + } + } + + /** + * + * @param {string} exportName name of the export + * @param {string} expression expression to be used + */ + registerRawExport(exportName, expression) { + if (!this._currentModule.rawExportMap) { + this._currentModule.rawExportMap = new Map(); + } + if (!this._currentModule.rawExportMap.has(exportName)) { + this._currentModule.rawExportMap.set(exportName, expression); + } + } + + /** + * @param {string} symbol identifier of the export in source code + */ + registerNamespaceExport(symbol) { + this._currentModule.namespaceExportSymbol = symbol; + } + + /** + * + * @param {Module} module the referenced module + * @param {Partial} options options + * @returns {string} the reference as identifier + */ + createModuleReference( + module, + { ids = undefined, call = false, directImport = false, asiSafe = false } + ) { + const info = this._modulesMap.get(module); + const callFlag = call ? "_call" : ""; + const directImportFlag = directImport ? "_directImport" : ""; + const asiSafeFlag = asiSafe + ? "_asiSafe1" + : asiSafe === false + ? "_asiSafe0" + : ""; + const exportData = ids + ? Buffer.from(JSON.stringify(ids), "utf-8").toString("hex") + : "ns"; + // a "._" is appended to allow "delete ...", which would cause a SyntaxError in strict mode + return `__WEBPACK_MODULE_REFERENCE__${info.index}_${exportData}${callFlag}${directImportFlag}${asiSafeFlag}__._`; + } + + /** + * @param {string} name the identifier + * @returns {boolean} true, when it's an module reference + */ + static isModuleReference(name) { + return MODULE_REFERENCE_REGEXP.test(name); + } + + /** + * @param {string} name the identifier + * @returns {ModuleReferenceOptions & { index: number }} parsed options and index + */ + static matchModuleReference(name) { + const match = MODULE_REFERENCE_REGEXP.exec(name); + if (!match) return null; + const index = +match[1]; + const asiSafe = match[5]; + return { + index, + ids: + match[2] === "ns" + ? [] + : JSON.parse(Buffer.from(match[2], "hex").toString("utf-8")), + call: !!match[3], + directImport: !!match[4], + asiSafe: asiSafe ? asiSafe === "1" : undefined + }; + } +} + +ConcatenationScope.DEFAULT_EXPORT = DEFAULT_EXPORT; +ConcatenationScope.NAMESPACE_OBJECT_EXPORT = NAMESPACE_OBJECT_EXPORT; + +module.exports = ConcatenationScope; + + +/***/ }), + +/***/ 93393: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Maksim Nazarjev @acupofspirt +*/ + + + +const WebpackError = __webpack_require__(24274); + +module.exports = class ConcurrentCompilationError extends WebpackError { + constructor() { + super(); + + this.name = "ConcurrentCompilationError"; + this.message = + "You ran Webpack twice. Each instance only supports a single concurrent compilation at a time."; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 19089: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource, PrefixSource } = __webpack_require__(55600); +const InitFragment = __webpack_require__(63382); +const Template = __webpack_require__(90751); +const { mergeRuntime } = __webpack_require__(43478); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Generator").GenerateContext} GenerateContext */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +const wrapInCondition = (condition, source) => { + if (typeof source === "string") { + return Template.asString([ + `if (${condition}) {`, + Template.indent(source), + "}", + "" + ]); + } else { + return new ConcatSource( + `if (${condition}) {\n`, + new PrefixSource("\t", source), + "}\n" + ); + } +}; + +class ConditionalInitFragment extends InitFragment { + /** + * @param {string|Source} content the source code that will be included as initialization code + * @param {number} stage category of initialization code (contribute to order) + * @param {number} position position in the category (contribute to order) + * @param {string} key unique key to avoid emitting the same initialization code twice + * @param {RuntimeSpec | boolean} runtimeCondition in which runtime this fragment should be executed + * @param {string|Source=} endContent the source code that will be included at the end of the module + */ + constructor( + content, + stage, + position, + key, + runtimeCondition = true, + endContent + ) { + super(content, stage, position, key, endContent); + this.runtimeCondition = runtimeCondition; + } + + /** + * @param {GenerateContext} generateContext context for generate + * @returns {string|Source} the source code that will be included as initialization code + */ + getContent(generateContext) { + if (this.runtimeCondition === false || !this.content) return ""; + if (this.runtimeCondition === true) return this.content; + const expr = generateContext.runtimeTemplate.runtimeConditionExpression({ + chunkGraph: generateContext.chunkGraph, + runtimeRequirements: generateContext.runtimeRequirements, + runtime: generateContext.runtime, + runtimeCondition: this.runtimeCondition + }); + if (expr === "true") return this.content; + return wrapInCondition(expr, this.content); + } + + /** + * @param {GenerateContext} generateContext context for generate + * @returns {string|Source=} the source code that will be included at the end of the module + */ + getEndContent(generateContext) { + if (this.runtimeCondition === false || !this.endContent) return ""; + if (this.runtimeCondition === true) return this.endContent; + const expr = generateContext.runtimeTemplate.runtimeConditionExpression({ + chunkGraph: generateContext.chunkGraph, + runtimeRequirements: generateContext.runtimeRequirements, + runtime: generateContext.runtime, + runtimeCondition: this.runtimeCondition + }); + if (expr === "true") return this.endContent; + return wrapInCondition(expr, this.endContent); + } + + merge(other) { + if (this.runtimeCondition === true) return this; + if (other.runtimeCondition === true) return other; + if (this.runtimeCondition === false) return other; + if (other.runtimeCondition === false) return this; + const runtimeCondition = mergeRuntime( + this.runtimeCondition, + other.runtimeCondition + ); + return new ConditionalInitFragment( + this.content, + this.stage, + this.position, + this.key, + runtimeCondition, + this.endContent + ); + } +} + +module.exports = ConditionalInitFragment; + + +/***/ }), + +/***/ 26899: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const CachedConstDependency = __webpack_require__(14268); +const ConstDependency = __webpack_require__(9364); +const { evaluateToString } = __webpack_require__(98550); +const { parseResource } = __webpack_require__(47779); + +/** @typedef {import("estree").Expression} ExpressionNode */ +/** @typedef {import("estree").Super} SuperNode */ +/** @typedef {import("./Compiler")} Compiler */ + +const collectDeclaration = (declarations, pattern) => { + const stack = [pattern]; + while (stack.length > 0) { + const node = stack.pop(); + switch (node.type) { + case "Identifier": + declarations.add(node.name); + break; + case "ArrayPattern": + for (const element of node.elements) { + if (element) { + stack.push(element); + } + } + break; + case "AssignmentPattern": + stack.push(node.left); + break; + case "ObjectPattern": + for (const property of node.properties) { + stack.push(property.value); + } + break; + case "RestElement": + stack.push(node.argument); + break; + } + } +}; + +const getHoistedDeclarations = (branch, includeFunctionDeclarations) => { + const declarations = new Set(); + const stack = [branch]; + while (stack.length > 0) { + const node = stack.pop(); + // Some node could be `null` or `undefined`. + if (!node) continue; + switch (node.type) { + // Walk through control statements to look for hoisted declarations. + // Some branches are skipped since they do not allow declarations. + case "BlockStatement": + for (const stmt of node.body) { + stack.push(stmt); + } + break; + case "IfStatement": + stack.push(node.consequent); + stack.push(node.alternate); + break; + case "ForStatement": + stack.push(node.init); + stack.push(node.body); + break; + case "ForInStatement": + case "ForOfStatement": + stack.push(node.left); + stack.push(node.body); + break; + case "DoWhileStatement": + case "WhileStatement": + case "LabeledStatement": + stack.push(node.body); + break; + case "SwitchStatement": + for (const cs of node.cases) { + for (const consequent of cs.consequent) { + stack.push(consequent); + } + } + break; + case "TryStatement": + stack.push(node.block); + if (node.handler) { + stack.push(node.handler.body); + } + stack.push(node.finalizer); + break; + case "FunctionDeclaration": + if (includeFunctionDeclarations) { + collectDeclaration(declarations, node.id); + } + break; + case "VariableDeclaration": + if (node.kind === "var") { + for (const decl of node.declarations) { + collectDeclaration(declarations, decl.id); + } + } + break; + } + } + return Array.from(declarations); +}; + +class ConstPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const cachedParseResource = parseResource.bindCache(compiler.root); + compiler.hooks.compilation.tap( + "ConstPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + + compilation.dependencyTemplates.set( + CachedConstDependency, + new CachedConstDependency.Template() + ); + + const handler = parser => { + parser.hooks.statementIf.tap("ConstPlugin", statement => { + if (parser.scope.isAsmJs) return; + const param = parser.evaluateExpression(statement.test); + const bool = param.asBool(); + if (typeof bool === "boolean") { + if (!param.couldHaveSideEffects()) { + const dep = new ConstDependency(`${bool}`, param.range); + dep.loc = statement.loc; + parser.state.module.addPresentationalDependency(dep); + } else { + parser.walkExpression(statement.test); + } + const branchToRemove = bool + ? statement.alternate + : statement.consequent; + if (branchToRemove) { + // Before removing the dead branch, the hoisted declarations + // must be collected. + // + // Given the following code: + // + // if (true) f() else g() + // if (false) { + // function f() {} + // const g = function g() {} + // if (someTest) { + // let a = 1 + // var x, {y, z} = obj + // } + // } else { + // … + // } + // + // the generated code is: + // + // if (true) f() else {} + // if (false) { + // var f, x, y, z; (in loose mode) + // var x, y, z; (in strict mode) + // } else { + // … + // } + // + // NOTE: When code runs in strict mode, `var` declarations + // are hoisted but `function` declarations don't. + // + let declarations; + if (parser.scope.isStrict) { + // If the code runs in strict mode, variable declarations + // using `var` must be hoisted. + declarations = getHoistedDeclarations(branchToRemove, false); + } else { + // Otherwise, collect all hoisted declaration. + declarations = getHoistedDeclarations(branchToRemove, true); + } + let replacement; + if (declarations.length > 0) { + replacement = `{ var ${declarations.join(", ")}; }`; + } else { + replacement = "{}"; + } + const dep = new ConstDependency( + replacement, + branchToRemove.range + ); + dep.loc = branchToRemove.loc; + parser.state.module.addPresentationalDependency(dep); + } + return bool; + } + }); + parser.hooks.expressionConditionalOperator.tap( + "ConstPlugin", + expression => { + if (parser.scope.isAsmJs) return; + const param = parser.evaluateExpression(expression.test); + const bool = param.asBool(); + if (typeof bool === "boolean") { + if (!param.couldHaveSideEffects()) { + const dep = new ConstDependency(` ${bool}`, param.range); + dep.loc = expression.loc; + parser.state.module.addPresentationalDependency(dep); + } else { + parser.walkExpression(expression.test); + } + // Expressions do not hoist. + // It is safe to remove the dead branch. + // + // Given the following code: + // + // false ? someExpression() : otherExpression(); + // + // the generated code is: + // + // false ? 0 : otherExpression(); + // + const branchToRemove = bool + ? expression.alternate + : expression.consequent; + const dep = new ConstDependency("0", branchToRemove.range); + dep.loc = branchToRemove.loc; + parser.state.module.addPresentationalDependency(dep); + return bool; + } + } + ); + parser.hooks.expressionLogicalOperator.tap( + "ConstPlugin", + expression => { + if (parser.scope.isAsmJs) return; + if ( + expression.operator === "&&" || + expression.operator === "||" + ) { + const param = parser.evaluateExpression(expression.left); + const bool = param.asBool(); + if (typeof bool === "boolean") { + // Expressions do not hoist. + // It is safe to remove the dead branch. + // + // ------------------------------------------ + // + // Given the following code: + // + // falsyExpression() && someExpression(); + // + // the generated code is: + // + // falsyExpression() && false; + // + // ------------------------------------------ + // + // Given the following code: + // + // truthyExpression() && someExpression(); + // + // the generated code is: + // + // true && someExpression(); + // + // ------------------------------------------ + // + // Given the following code: + // + // truthyExpression() || someExpression(); + // + // the generated code is: + // + // truthyExpression() || false; + // + // ------------------------------------------ + // + // Given the following code: + // + // falsyExpression() || someExpression(); + // + // the generated code is: + // + // false && someExpression(); + // + const keepRight = + (expression.operator === "&&" && bool) || + (expression.operator === "||" && !bool); + + if ( + !param.couldHaveSideEffects() && + (param.isBoolean() || keepRight) + ) { + // for case like + // + // return'development'===process.env.NODE_ENV&&'foo' + // + // we need a space before the bool to prevent result like + // + // returnfalse&&'foo' + // + const dep = new ConstDependency(` ${bool}`, param.range); + dep.loc = expression.loc; + parser.state.module.addPresentationalDependency(dep); + } else { + parser.walkExpression(expression.left); + } + if (!keepRight) { + const dep = new ConstDependency( + "0", + expression.right.range + ); + dep.loc = expression.loc; + parser.state.module.addPresentationalDependency(dep); + } + return keepRight; + } + } else if (expression.operator === "??") { + const param = parser.evaluateExpression(expression.left); + const keepRight = param && param.asNullish(); + if (typeof keepRight === "boolean") { + // ------------------------------------------ + // + // Given the following code: + // + // nonNullish ?? someExpression(); + // + // the generated code is: + // + // nonNullish ?? 0; + // + // ------------------------------------------ + // + // Given the following code: + // + // nullish ?? someExpression(); + // + // the generated code is: + // + // null ?? someExpression(); + // + if (!param.couldHaveSideEffects() && keepRight) { + // cspell:word returnnull + // for case like + // + // return('development'===process.env.NODE_ENV&&null)??'foo' + // + // we need a space before the bool to prevent result like + // + // returnnull??'foo' + // + const dep = new ConstDependency(" null", param.range); + dep.loc = expression.loc; + parser.state.module.addPresentationalDependency(dep); + } else { + const dep = new ConstDependency( + "0", + expression.right.range + ); + dep.loc = expression.loc; + parser.state.module.addPresentationalDependency(dep); + parser.walkExpression(expression.left); + } + + return keepRight; + } + } + } + ); + parser.hooks.optionalChaining.tap("ConstPlugin", expr => { + /** @type {ExpressionNode[]} */ + const optionalExpressionsStack = []; + /** @type {ExpressionNode|SuperNode} */ + let next = expr.expression; + + while ( + next.type === "MemberExpression" || + next.type === "CallExpression" + ) { + if (next.type === "MemberExpression") { + if (next.optional) { + // SuperNode can not be optional + optionalExpressionsStack.push( + /** @type {ExpressionNode} */ (next.object) + ); + } + next = next.object; + } else { + if (next.optional) { + // SuperNode can not be optional + optionalExpressionsStack.push( + /** @type {ExpressionNode} */ (next.callee) + ); + } + next = next.callee; + } + } + + while (optionalExpressionsStack.length) { + const expression = optionalExpressionsStack.pop(); + const evaluated = parser.evaluateExpression(expression); + + if (evaluated && evaluated.asNullish()) { + // ------------------------------------------ + // + // Given the following code: + // + // nullishMemberChain?.a.b(); + // + // the generated code is: + // + // undefined; + // + // ------------------------------------------ + // + const dep = new ConstDependency(" undefined", expr.range); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + } + } + }); + parser.hooks.evaluateIdentifier + .for("__resourceQuery") + .tap("ConstPlugin", expr => { + if (parser.scope.isAsmJs) return; + if (!parser.state.module) return; + return evaluateToString( + cachedParseResource(parser.state.module.resource).query + )(expr); + }); + parser.hooks.expression + .for("__resourceQuery") + .tap("ConstPlugin", expr => { + if (parser.scope.isAsmJs) return; + if (!parser.state.module) return; + const dep = new CachedConstDependency( + JSON.stringify( + cachedParseResource(parser.state.module.resource).query + ), + expr.range, + "__resourceQuery" + ); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + + parser.hooks.evaluateIdentifier + .for("__resourceFragment") + .tap("ConstPlugin", expr => { + if (parser.scope.isAsmJs) return; + if (!parser.state.module) return; + return evaluateToString( + cachedParseResource(parser.state.module.resource).fragment + )(expr); + }); + parser.hooks.expression + .for("__resourceFragment") + .tap("ConstPlugin", expr => { + if (parser.scope.isAsmJs) return; + if (!parser.state.module) return; + const dep = new CachedConstDependency( + JSON.stringify( + cachedParseResource(parser.state.module.resource).fragment + ), + expr.range, + "__resourceFragment" + ); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("ConstPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("ConstPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("ConstPlugin", handler); + } + ); + } +} + +module.exports = ConstPlugin; + + +/***/ }), + +/***/ 92306: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./ContextModuleFactory")} ContextModuleFactory */ + +class ContextExclusionPlugin { + /** + * @param {RegExp} negativeMatcher Matcher regular expression + */ + constructor(negativeMatcher) { + this.negativeMatcher = negativeMatcher; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.contextModuleFactory.tap("ContextExclusionPlugin", cmf => { + cmf.hooks.contextModuleFiles.tap("ContextExclusionPlugin", files => { + return files.filter(filePath => !this.negativeMatcher.test(filePath)); + }); + }); + } +} + +module.exports = ContextExclusionPlugin; + + +/***/ }), + +/***/ 32834: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { OriginalSource, RawSource } = __webpack_require__(55600); +const AsyncDependenciesBlock = __webpack_require__(72624); +const { makeWebpackError } = __webpack_require__(14953); +const Module = __webpack_require__(54031); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const WebpackError = __webpack_require__(24274); +const { + compareLocations, + concatComparators, + compareSelect, + keepOriginalOrder +} = __webpack_require__(21699); +const { compareModulesById } = __webpack_require__(21699); +const { contextify, parseResource } = __webpack_require__(47779); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./ChunkGroup").RawChunkGroupOptions} RawChunkGroupOptions */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./Module").BuildMeta} BuildMeta */ +/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("./Module").LibIdentOptions} LibIdentOptions */ +/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./dependencies/ContextElementDependency")} ContextElementDependency */ +/** @template T @typedef {import("./util/LazySet")} LazySet */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ + +/** @typedef {"sync" | "eager" | "weak" | "async-weak" | "lazy" | "lazy-once"} ContextMode Context mode */ + +/** + * @typedef {Object} ContextOptions + * @property {ContextMode} mode + * @property {boolean} recursive + * @property {RegExp} regExp + * @property {"strict"|boolean=} namespaceObject + * @property {string=} addon + * @property {string=} chunkName + * @property {RegExp=} include + * @property {RegExp=} exclude + * @property {RawChunkGroupOptions=} groupOptions + * @property {string=} category + * @property {string[][]=} referencedExports exports referenced from modules (won't be mangled) + */ + +/** + * @typedef {Object} ContextModuleOptionsExtras + * @property {string} resource + * @property {string=} resourceQuery + * @property {string=} resourceFragment + * @property {TODO} resolveOptions + */ + +/** @typedef {ContextOptions & ContextModuleOptionsExtras} ContextModuleOptions */ + +/** + * @callback ResolveDependenciesCallback + * @param {Error=} err + * @param {ContextElementDependency[]=} dependencies + */ + +/** + * @callback ResolveDependencies + * @param {InputFileSystem} fs + * @param {ContextModuleOptions} options + * @param {ResolveDependenciesCallback} callback + */ + +const SNAPSHOT_OPTIONS = { timestamp: true }; + +const TYPES = new Set(["javascript"]); + +class ContextModule extends Module { + /** + * @param {ResolveDependencies} resolveDependencies function to get dependencies in this context + * @param {ContextModuleOptions} options options object + */ + constructor(resolveDependencies, options) { + const parsed = parseResource(options ? options.resource : ""); + const resource = parsed.path; + const resourceQuery = (options && options.resourceQuery) || parsed.query; + const resourceFragment = + (options && options.resourceFragment) || parsed.fragment; + + super("javascript/dynamic", resource); + + // Info from Factory + this.resolveDependencies = resolveDependencies; + /** @type {ContextModuleOptions} */ + this.options = { + ...options, + resource, + resourceQuery, + resourceFragment + }; + if (options && options.resolveOptions !== undefined) { + this.resolveOptions = options.resolveOptions; + } + + if (options && typeof options.mode !== "string") { + throw new Error("options.mode is a required option"); + } + + this._identifier = this._createIdentifier(); + this._forceBuild = true; + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + /** + * Assuming this module is in the cache. Update the (cached) module with + * the fresh module from the factory. Usually updates internal references + * and properties. + * @param {Module} module fresh module + * @returns {void} + */ + updateCacheModule(module) { + const m = /** @type {ContextModule} */ (module); + this.resolveDependencies = m.resolveDependencies; + this.options = m.options; + this.resolveOptions = m.resolveOptions; + } + + prettyRegExp(regexString) { + // remove the "/" at the front and the beginning + // "/foo/" -> "foo" + return regexString + .substring(1, regexString.length - 1) + .replace(/!/g, "%21"); + } + + _createIdentifier() { + let identifier = this.context; + if (this.options.resourceQuery) { + identifier += `|${this.options.resourceQuery}`; + } + if (this.options.resourceFragment) { + identifier += `|${this.options.resourceFragment}`; + } + if (this.options.mode) { + identifier += `|${this.options.mode}`; + } + if (!this.options.recursive) { + identifier += "|nonrecursive"; + } + if (this.options.addon) { + identifier += `|${this.options.addon}`; + } + if (this.options.regExp) { + identifier += `|${this.options.regExp}`; + } + if (this.options.include) { + identifier += `|include: ${this.options.include}`; + } + if (this.options.exclude) { + identifier += `|exclude: ${this.options.exclude}`; + } + if (this.options.referencedExports) { + identifier += `|referencedExports: ${JSON.stringify( + this.options.referencedExports + )}`; + } + if (this.options.chunkName) { + identifier += `|chunkName: ${this.options.chunkName}`; + } + if (this.options.groupOptions) { + identifier += `|groupOptions: ${JSON.stringify( + this.options.groupOptions + )}`; + } + if (this.options.namespaceObject === "strict") { + identifier += "|strict namespace object"; + } else if (this.options.namespaceObject) { + identifier += "|namespace object"; + } + + return identifier; + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return this._identifier; + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + let identifier = requestShortener.shorten(this.context) + "/"; + if (this.options.resourceQuery) { + identifier += ` ${this.options.resourceQuery}`; + } + if (this.options.mode) { + identifier += ` ${this.options.mode}`; + } + if (!this.options.recursive) { + identifier += " nonrecursive"; + } + if (this.options.addon) { + identifier += ` ${requestShortener.shorten(this.options.addon)}`; + } + if (this.options.regExp) { + identifier += ` ${this.prettyRegExp(this.options.regExp + "")}`; + } + if (this.options.include) { + identifier += ` include: ${this.prettyRegExp(this.options.include + "")}`; + } + if (this.options.exclude) { + identifier += ` exclude: ${this.prettyRegExp(this.options.exclude + "")}`; + } + if (this.options.referencedExports) { + identifier += ` referencedExports: ${this.options.referencedExports + .map(e => e.join(".")) + .join(", ")}`; + } + if (this.options.chunkName) { + identifier += ` chunkName: ${this.options.chunkName}`; + } + if (this.options.groupOptions) { + const groupOptions = this.options.groupOptions; + for (const key of Object.keys(groupOptions)) { + identifier += ` ${key}: ${groupOptions[key]}`; + } + } + if (this.options.namespaceObject === "strict") { + identifier += " strict namespace object"; + } else if (this.options.namespaceObject) { + identifier += " namespace object"; + } + + return identifier; + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + let identifier = contextify( + options.context, + this.context, + options.associatedObjectForCache + ); + if (this.options.mode) { + identifier += ` ${this.options.mode}`; + } + if (this.options.recursive) { + identifier += " recursive"; + } + if (this.options.addon) { + identifier += ` ${contextify( + options.context, + this.options.addon, + options.associatedObjectForCache + )}`; + } + if (this.options.regExp) { + identifier += ` ${this.prettyRegExp(this.options.regExp + "")}`; + } + if (this.options.include) { + identifier += ` include: ${this.prettyRegExp(this.options.include + "")}`; + } + if (this.options.exclude) { + identifier += ` exclude: ${this.prettyRegExp(this.options.exclude + "")}`; + } + if (this.options.referencedExports) { + identifier += ` referencedExports: ${this.options.referencedExports + .map(e => e.join(".")) + .join(", ")}`; + } + + return identifier; + } + + /** + * @returns {void} + */ + invalidateBuild() { + this._forceBuild = true; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild({ fileSystemInfo }, callback) { + // build if enforced + if (this._forceBuild) return callback(null, true); + + // always build when we have no snapshot + if (!this.buildInfo.snapshot) return callback(null, true); + + fileSystemInfo.checkSnapshotValid(this.buildInfo.snapshot, (err, valid) => { + callback(err, !valid); + }); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this._forceBuild = false; + /** @type {BuildMeta} */ + this.buildMeta = { + exportsType: "default", + defaultObject: "redirect-warn" + }; + this.buildInfo = { + snapshot: undefined + }; + this.dependencies.length = 0; + this.blocks.length = 0; + const startTime = Date.now(); + this.resolveDependencies(fs, this.options, (err, dependencies) => { + if (err) { + return callback( + makeWebpackError(err, "ContextModule.resolveDependencies") + ); + } + + // abort if something failed + // this will create an empty context + if (!dependencies) { + callback(); + return; + } + + // enhance dependencies with meta info + for (const dep of dependencies) { + dep.loc = { + name: dep.userRequest + }; + dep.request = this.options.addon + dep.request; + } + dependencies.sort( + concatComparators( + compareSelect(a => a.loc, compareLocations), + keepOriginalOrder(this.dependencies) + ) + ); + + if (this.options.mode === "sync" || this.options.mode === "eager") { + // if we have an sync or eager context + // just add all dependencies and continue + this.dependencies = dependencies; + } else if (this.options.mode === "lazy-once") { + // for the lazy-once mode create a new async dependency block + // and add that block to this context + if (dependencies.length > 0) { + const block = new AsyncDependenciesBlock({ + ...this.options.groupOptions, + name: this.options.chunkName + }); + for (const dep of dependencies) { + block.addDependency(dep); + } + this.addBlock(block); + } + } else if ( + this.options.mode === "weak" || + this.options.mode === "async-weak" + ) { + // we mark all dependencies as weak + for (const dep of dependencies) { + dep.weak = true; + } + this.dependencies = dependencies; + } else if (this.options.mode === "lazy") { + // if we are lazy create a new async dependency block per dependency + // and add all blocks to this context + let index = 0; + for (const dep of dependencies) { + let chunkName = this.options.chunkName; + if (chunkName) { + if (!/\[(index|request)\]/.test(chunkName)) { + chunkName += "[index]"; + } + chunkName = chunkName.replace(/\[index\]/g, `${index++}`); + chunkName = chunkName.replace( + /\[request\]/g, + Template.toPath(dep.userRequest) + ); + } + const block = new AsyncDependenciesBlock( + { + ...this.options.groupOptions, + name: chunkName + }, + dep.loc, + dep.userRequest + ); + block.addDependency(dep); + this.addBlock(block); + } + } else { + callback( + new WebpackError(`Unsupported mode "${this.options.mode}" in context`) + ); + return; + } + compilation.fileSystemInfo.createSnapshot( + startTime, + null, + [this.context], + null, + SNAPSHOT_OPTIONS, + (err, snapshot) => { + if (err) return callback(err); + this.buildInfo.snapshot = snapshot; + callback(); + } + ); + }); + } + + /** + * @param {LazySet} fileDependencies set where file dependencies are added to + * @param {LazySet} contextDependencies set where context dependencies are added to + * @param {LazySet} missingDependencies set where missing dependencies are added to + * @param {LazySet} buildDependencies set where build dependencies are added to + */ + addCacheDependencies( + fileDependencies, + contextDependencies, + missingDependencies, + buildDependencies + ) { + contextDependencies.add(this.context); + } + + /** + * @param {ContextElementDependency[]} dependencies all dependencies + * @param {ChunkGraph} chunkGraph chunk graph + * @returns {TODO} TODO + */ + getUserRequestMap(dependencies, chunkGraph) { + const moduleGraph = chunkGraph.moduleGraph; + // if we filter first we get a new array + // therefore we don't need to create a clone of dependencies explicitly + // therefore the order of this is !important! + const sortedDependencies = dependencies + .filter(dependency => moduleGraph.getModule(dependency)) + .sort((a, b) => { + if (a.userRequest === b.userRequest) { + return 0; + } + return a.userRequest < b.userRequest ? -1 : 1; + }); + const map = Object.create(null); + for (const dep of sortedDependencies) { + const module = moduleGraph.getModule(dep); + map[dep.userRequest] = chunkGraph.getModuleId(module); + } + return map; + } + + /** + * @param {ContextElementDependency[]} dependencies all dependencies + * @param {ChunkGraph} chunkGraph chunk graph + * @returns {TODO} TODO + */ + getFakeMap(dependencies, chunkGraph) { + if (!this.options.namespaceObject) { + return 9; + } + const moduleGraph = chunkGraph.moduleGraph; + // bitfield + let hasType = 0; + const comparator = compareModulesById(chunkGraph); + // if we filter first we get a new array + // therefore we don't need to create a clone of dependencies explicitly + // therefore the order of this is !important! + const sortedModules = dependencies + .map(dependency => moduleGraph.getModule(dependency)) + .filter(Boolean) + .sort(comparator); + const fakeMap = Object.create(null); + for (const module of sortedModules) { + const exportsType = module.getExportsType( + moduleGraph, + this.options.namespaceObject === "strict" + ); + const id = chunkGraph.getModuleId(module); + switch (exportsType) { + case "namespace": + fakeMap[id] = 9; + hasType |= 1; + break; + case "dynamic": + fakeMap[id] = 7; + hasType |= 2; + break; + case "default-only": + fakeMap[id] = 1; + hasType |= 4; + break; + case "default-with-named": + fakeMap[id] = 3; + hasType |= 8; + break; + default: + throw new Error(`Unexpected exports type ${exportsType}`); + } + } + if (hasType === 1) { + return 9; + } + if (hasType === 2) { + return 7; + } + if (hasType === 4) { + return 1; + } + if (hasType === 8) { + return 3; + } + if (hasType === 0) { + return 9; + } + return fakeMap; + } + + getFakeMapInitStatement(fakeMap) { + return typeof fakeMap === "object" + ? `var fakeMap = ${JSON.stringify(fakeMap, null, "\t")};` + : ""; + } + + getReturn(type, asyncModule) { + if (type === 9) { + return "__webpack_require__(id)"; + } + return `${RuntimeGlobals.createFakeNamespaceObject}(id, ${type}${ + asyncModule ? " | 16" : "" + })`; + } + + getReturnModuleObjectSource( + fakeMap, + asyncModule, + fakeMapDataExpression = "fakeMap[id]" + ) { + if (typeof fakeMap === "number") { + return `return ${this.getReturn(fakeMap)};`; + } + return `return ${ + RuntimeGlobals.createFakeNamespaceObject + }(id, ${fakeMapDataExpression}${asyncModule ? " | 16" : ""})`; + } + + /** + * @param {TODO} dependencies TODO + * @param {TODO} id TODO + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {string} source code + */ + getSyncSource(dependencies, id, chunkGraph) { + const map = this.getUserRequestMap(dependencies, chunkGraph); + const fakeMap = this.getFakeMap(dependencies, chunkGraph); + const returnModuleObject = this.getReturnModuleObjectSource(fakeMap); + + return `var map = ${JSON.stringify(map, null, "\t")}; +${this.getFakeMapInitStatement(fakeMap)} + +function webpackContext(req) { + var id = webpackContextResolve(req); + ${returnModuleObject} +} +function webpackContextResolve(req) { + if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; +} +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +module.exports = webpackContext; +webpackContext.id = ${JSON.stringify(id)};`; + } + + /** + * @param {TODO} dependencies TODO + * @param {TODO} id TODO + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {string} source code + */ + getWeakSyncSource(dependencies, id, chunkGraph) { + const map = this.getUserRequestMap(dependencies, chunkGraph); + const fakeMap = this.getFakeMap(dependencies, chunkGraph); + const returnModuleObject = this.getReturnModuleObjectSource(fakeMap); + + return `var map = ${JSON.stringify(map, null, "\t")}; +${this.getFakeMapInitStatement(fakeMap)} + +function webpackContext(req) { + var id = webpackContextResolve(req); + if(!${RuntimeGlobals.moduleFactories}[id]) { + var e = new Error("Module '" + req + "' ('" + id + "') is not available (weak dependency)"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + ${returnModuleObject} +} +function webpackContextResolve(req) { + if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; +} +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +webpackContext.id = ${JSON.stringify(id)}; +module.exports = webpackContext;`; + } + + /** + * @param {TODO} dependencies TODO + * @param {TODO} id TODO + * @param {Object} context context + * @param {ChunkGraph} context.chunkGraph the chunk graph + * @param {RuntimeTemplate} context.runtimeTemplate the chunk graph + * @returns {string} source code + */ + getAsyncWeakSource(dependencies, id, { chunkGraph, runtimeTemplate }) { + const arrow = runtimeTemplate.supportsArrowFunction(); + const map = this.getUserRequestMap(dependencies, chunkGraph); + const fakeMap = this.getFakeMap(dependencies, chunkGraph); + const returnModuleObject = this.getReturnModuleObjectSource(fakeMap, true); + + return `var map = ${JSON.stringify(map, null, "\t")}; +${this.getFakeMapInitStatement(fakeMap)} + +function webpackAsyncContext(req) { + return webpackAsyncContextResolve(req).then(${ + arrow ? "id =>" : "function(id)" + } { + if(!${RuntimeGlobals.moduleFactories}[id]) { + var e = new Error("Module '" + req + "' ('" + id + "') is not available (weak dependency)"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + ${returnModuleObject} + }); +} +function webpackAsyncContextResolve(req) { + // Here Promise.resolve().then() is used instead of new Promise() to prevent + // uncaught exception popping up in devtools + return Promise.resolve().then(${arrow ? "() =>" : "function()"} { + if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; + }); +} +webpackAsyncContext.keys = ${runtimeTemplate.returningFunction( + "Object.keys(map)" + )}; +webpackAsyncContext.resolve = webpackAsyncContextResolve; +webpackAsyncContext.id = ${JSON.stringify(id)}; +module.exports = webpackAsyncContext;`; + } + + /** + * @param {TODO} dependencies TODO + * @param {TODO} id TODO + * @param {Object} context context + * @param {ChunkGraph} context.chunkGraph the chunk graph + * @param {RuntimeTemplate} context.runtimeTemplate the chunk graph + * @returns {string} source code + */ + getEagerSource(dependencies, id, { chunkGraph, runtimeTemplate }) { + const arrow = runtimeTemplate.supportsArrowFunction(); + const map = this.getUserRequestMap(dependencies, chunkGraph); + const fakeMap = this.getFakeMap(dependencies, chunkGraph); + const thenFunction = + fakeMap !== 9 + ? `${arrow ? "id =>" : "function(id)"} { + ${this.getReturnModuleObjectSource(fakeMap)} + }` + : "__webpack_require__"; + return `var map = ${JSON.stringify(map, null, "\t")}; +${this.getFakeMapInitStatement(fakeMap)} + +function webpackAsyncContext(req) { + return webpackAsyncContextResolve(req).then(${thenFunction}); +} +function webpackAsyncContextResolve(req) { + // Here Promise.resolve().then() is used instead of new Promise() to prevent + // uncaught exception popping up in devtools + return Promise.resolve().then(${arrow ? "() =>" : "function()"} { + if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; + }); +} +webpackAsyncContext.keys = ${runtimeTemplate.returningFunction( + "Object.keys(map)" + )}; +webpackAsyncContext.resolve = webpackAsyncContextResolve; +webpackAsyncContext.id = ${JSON.stringify(id)}; +module.exports = webpackAsyncContext;`; + } + + /** + * @param {TODO} block TODO + * @param {TODO} dependencies TODO + * @param {TODO} id TODO + * @param {Object} options options object + * @param {RuntimeTemplate} options.runtimeTemplate the runtime template + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @returns {string} source code + */ + getLazyOnceSource(block, dependencies, id, { runtimeTemplate, chunkGraph }) { + const promise = runtimeTemplate.blockPromise({ + chunkGraph, + block, + message: "lazy-once context", + runtimeRequirements: new Set() + }); + const arrow = runtimeTemplate.supportsArrowFunction(); + const map = this.getUserRequestMap(dependencies, chunkGraph); + const fakeMap = this.getFakeMap(dependencies, chunkGraph); + const thenFunction = + fakeMap !== 9 + ? `${arrow ? "id =>" : "function(id)"} { + ${this.getReturnModuleObjectSource(fakeMap, true)}; + }` + : "__webpack_require__"; + + return `var map = ${JSON.stringify(map, null, "\t")}; +${this.getFakeMapInitStatement(fakeMap)} + +function webpackAsyncContext(req) { + return webpackAsyncContextResolve(req).then(${thenFunction}); +} +function webpackAsyncContextResolve(req) { + return ${promise}.then(${arrow ? "() =>" : "function()"} { + if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; + }); +} +webpackAsyncContext.keys = ${runtimeTemplate.returningFunction( + "Object.keys(map)" + )}; +webpackAsyncContext.resolve = webpackAsyncContextResolve; +webpackAsyncContext.id = ${JSON.stringify(id)}; +module.exports = webpackAsyncContext;`; + } + + /** + * @param {TODO} blocks TODO + * @param {TODO} id TODO + * @param {Object} context context + * @param {ChunkGraph} context.chunkGraph the chunk graph + * @param {RuntimeTemplate} context.runtimeTemplate the chunk graph + * @returns {string} source code + */ + getLazySource(blocks, id, { chunkGraph, runtimeTemplate }) { + const moduleGraph = chunkGraph.moduleGraph; + const arrow = runtimeTemplate.supportsArrowFunction(); + let hasMultipleOrNoChunks = false; + let hasNoChunk = true; + const fakeMap = this.getFakeMap( + blocks.map(b => b.dependencies[0]), + chunkGraph + ); + const hasFakeMap = typeof fakeMap === "object"; + const items = blocks + .map(block => { + const dependency = block.dependencies[0]; + return { + dependency: dependency, + module: moduleGraph.getModule(dependency), + block: block, + userRequest: dependency.userRequest, + chunks: undefined + }; + }) + .filter(item => item.module); + for (const item of items) { + const chunkGroup = chunkGraph.getBlockChunkGroup(item.block); + const chunks = (chunkGroup && chunkGroup.chunks) || []; + item.chunks = chunks; + if (chunks.length > 0) { + hasNoChunk = false; + } + if (chunks.length !== 1) { + hasMultipleOrNoChunks = true; + } + } + const shortMode = hasNoChunk && !hasFakeMap; + const sortedItems = items.sort((a, b) => { + if (a.userRequest === b.userRequest) return 0; + return a.userRequest < b.userRequest ? -1 : 1; + }); + const map = Object.create(null); + for (const item of sortedItems) { + const moduleId = chunkGraph.getModuleId(item.module); + if (shortMode) { + map[item.userRequest] = moduleId; + } else { + const arrayStart = [moduleId]; + if (hasFakeMap) { + arrayStart.push(fakeMap[moduleId]); + } + map[item.userRequest] = arrayStart.concat( + item.chunks.map(chunk => chunk.id) + ); + } + } + + const chunksStartPosition = hasFakeMap ? 2 : 1; + const requestPrefix = hasNoChunk + ? "Promise.resolve()" + : hasMultipleOrNoChunks + ? `Promise.all(ids.slice(${chunksStartPosition}).map(${RuntimeGlobals.ensureChunk}))` + : `${RuntimeGlobals.ensureChunk}(ids[${chunksStartPosition}])`; + const returnModuleObject = this.getReturnModuleObjectSource( + fakeMap, + true, + shortMode ? "invalid" : "ids[1]" + ); + + const webpackAsyncContext = + requestPrefix === "Promise.resolve()" + ? ` +function webpackAsyncContext(req) { + return Promise.resolve().then(${arrow ? "() =>" : "function()"} { + if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + + ${shortMode ? "var id = map[req];" : "var ids = map[req], id = ids[0];"} + ${returnModuleObject} + }); +}` + : `function webpackAsyncContext(req) { + if(!${RuntimeGlobals.hasOwnProperty}(map, req)) { + return Promise.resolve().then(${arrow ? "() =>" : "function()"} { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + }); + } + + var ids = map[req], id = ids[0]; + return ${requestPrefix}.then(${arrow ? "() =>" : "function()"} { + ${returnModuleObject} + }); +}`; + + return `var map = ${JSON.stringify(map, null, "\t")}; +${webpackAsyncContext} +webpackAsyncContext.keys = ${runtimeTemplate.returningFunction( + "Object.keys(map)" + )}; +webpackAsyncContext.id = ${JSON.stringify(id)}; +module.exports = webpackAsyncContext;`; + } + + getSourceForEmptyContext(id, runtimeTemplate) { + return `function webpackEmptyContext(req) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; +} +webpackEmptyContext.keys = ${runtimeTemplate.returningFunction("[]")}; +webpackEmptyContext.resolve = webpackEmptyContext; +webpackEmptyContext.id = ${JSON.stringify(id)}; +module.exports = webpackEmptyContext;`; + } + + getSourceForEmptyAsyncContext(id, runtimeTemplate) { + const arrow = runtimeTemplate.supportsArrowFunction(); + return `function webpackEmptyAsyncContext(req) { + // Here Promise.resolve().then() is used instead of new Promise() to prevent + // uncaught exception popping up in devtools + return Promise.resolve().then(${arrow ? "() =>" : "function()"} { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + }); +} +webpackEmptyAsyncContext.keys = ${runtimeTemplate.returningFunction("[]")}; +webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; +webpackEmptyAsyncContext.id = ${JSON.stringify(id)}; +module.exports = webpackEmptyAsyncContext;`; + } + + /** + * @param {string} asyncMode module mode + * @param {CodeGenerationContext} context context info + * @returns {string} the source code + */ + getSourceString(asyncMode, { runtimeTemplate, chunkGraph }) { + const id = chunkGraph.getModuleId(this); + if (asyncMode === "lazy") { + if (this.blocks && this.blocks.length > 0) { + return this.getLazySource(this.blocks, id, { + runtimeTemplate, + chunkGraph + }); + } + return this.getSourceForEmptyAsyncContext(id, runtimeTemplate); + } + if (asyncMode === "eager") { + if (this.dependencies && this.dependencies.length > 0) { + return this.getEagerSource(this.dependencies, id, { + chunkGraph, + runtimeTemplate + }); + } + return this.getSourceForEmptyAsyncContext(id, runtimeTemplate); + } + if (asyncMode === "lazy-once") { + const block = this.blocks[0]; + if (block) { + return this.getLazyOnceSource(block, block.dependencies, id, { + runtimeTemplate, + chunkGraph + }); + } + return this.getSourceForEmptyAsyncContext(id, runtimeTemplate); + } + if (asyncMode === "async-weak") { + if (this.dependencies && this.dependencies.length > 0) { + return this.getAsyncWeakSource(this.dependencies, id, { + chunkGraph, + runtimeTemplate + }); + } + return this.getSourceForEmptyAsyncContext(id, runtimeTemplate); + } + if (asyncMode === "weak") { + if (this.dependencies && this.dependencies.length > 0) { + return this.getWeakSyncSource(this.dependencies, id, chunkGraph); + } + } + if (this.dependencies && this.dependencies.length > 0) { + return this.getSyncSource(this.dependencies, id, chunkGraph); + } + return this.getSourceForEmptyContext(id, runtimeTemplate); + } + + getSource(sourceString) { + if (this.useSourceMap || this.useSimpleSourceMap) { + return new OriginalSource(sourceString, this.identifier()); + } + return new RawSource(sourceString); + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration(context) { + const { chunkGraph } = context; + const sources = new Map(); + sources.set( + "javascript", + this.getSource(this.getSourceString(this.options.mode, context)) + ); + const set = new Set(); + const allDeps = /** @type {ContextElementDependency[]} */ (this.dependencies.concat( + this.blocks.map(b => b.dependencies[0]) + )); + set.add(RuntimeGlobals.module); + set.add(RuntimeGlobals.hasOwnProperty); + if (allDeps.length > 0) { + const asyncMode = this.options.mode; + set.add(RuntimeGlobals.require); + if (asyncMode === "weak") { + set.add(RuntimeGlobals.moduleFactories); + } else if (asyncMode === "async-weak") { + set.add(RuntimeGlobals.moduleFactories); + set.add(RuntimeGlobals.ensureChunk); + } else if (asyncMode === "lazy" || asyncMode === "lazy-once") { + set.add(RuntimeGlobals.ensureChunk); + } + if (this.getFakeMap(allDeps, chunkGraph) !== 9) { + set.add(RuntimeGlobals.createFakeNamespaceObject); + } + } + return { + sources, + runtimeRequirements: set + }; + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + // base penalty + let size = 160; + + // if we don't have dependencies we stop here. + for (const dependency of this.dependencies) { + const element = /** @type {ContextElementDependency} */ (dependency); + size += 5 + element.userRequest.length; + } + return size; + } + + serialize(context) { + const { write } = context; + write(this._identifier); + write(this._forceBuild); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this._identifier = read(); + this._forceBuild = read(); + super.deserialize(context); + } +} + +makeSerializable(ContextModule, "webpack/lib/ContextModule"); + +module.exports = ContextModule; + + +/***/ }), + +/***/ 33497: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const { AsyncSeriesWaterfallHook, SyncWaterfallHook } = __webpack_require__(18416); +const ContextModule = __webpack_require__(32834); +const ModuleFactory = __webpack_require__(6259); +const ContextElementDependency = __webpack_require__(32592); +const { cachedSetProperty } = __webpack_require__(92700); +const { createFakeHook } = __webpack_require__(57651); +const { join } = __webpack_require__(71593); + +/** @typedef {import("./ContextModule").ContextModuleOptions} ContextModuleOptions */ +/** @typedef {import("./ContextModule").ResolveDependenciesCallback} ResolveDependenciesCallback */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ +/** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ +/** @typedef {import("./ResolverFactory")} ResolverFactory */ +/** @typedef {import("./dependencies/ContextDependency")} ContextDependency */ +/** @template T @typedef {import("./util/deprecation").FakeHook} FakeHook */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ + +const EMPTY_RESOLVE_OPTIONS = {}; + +module.exports = class ContextModuleFactory extends ModuleFactory { + /** + * @param {ResolverFactory} resolverFactory resolverFactory + */ + constructor(resolverFactory) { + super(); + /** @type {AsyncSeriesWaterfallHook<[TODO[], ContextModuleOptions]>} */ + const alternativeRequests = new AsyncSeriesWaterfallHook([ + "modules", + "options" + ]); + this.hooks = Object.freeze({ + /** @type {AsyncSeriesWaterfallHook<[TODO]>} */ + beforeResolve: new AsyncSeriesWaterfallHook(["data"]), + /** @type {AsyncSeriesWaterfallHook<[TODO]>} */ + afterResolve: new AsyncSeriesWaterfallHook(["data"]), + /** @type {SyncWaterfallHook<[string[]]>} */ + contextModuleFiles: new SyncWaterfallHook(["files"]), + /** @type {FakeHook, "tap" | "tapAsync" | "tapPromise" | "name">>} */ + alternatives: createFakeHook( + { + name: "alternatives", + /** @type {AsyncSeriesWaterfallHook<[TODO[]]>["intercept"]} */ + intercept: interceptor => { + throw new Error( + "Intercepting fake hook ContextModuleFactory.hooks.alternatives is not possible, use ContextModuleFactory.hooks.alternativeRequests instead" + ); + }, + /** @type {AsyncSeriesWaterfallHook<[TODO[]]>["tap"]} */ + tap: (options, fn) => { + alternativeRequests.tap(options, fn); + }, + /** @type {AsyncSeriesWaterfallHook<[TODO[]]>["tapAsync"]} */ + tapAsync: (options, fn) => { + alternativeRequests.tapAsync(options, (items, _options, callback) => + fn(items, callback) + ); + }, + /** @type {AsyncSeriesWaterfallHook<[TODO[]]>["tapPromise"]} */ + tapPromise: (options, fn) => { + alternativeRequests.tapPromise(options, fn); + } + }, + "ContextModuleFactory.hooks.alternatives has deprecated in favor of ContextModuleFactory.hooks.alternativeRequests with an additional options argument.", + "DEP_WEBPACK_CONTEXT_MODULE_FACTORY_ALTERNATIVES" + ), + alternativeRequests + }); + this.resolverFactory = resolverFactory; + } + + /** + * @param {ModuleFactoryCreateData} data data object + * @param {function(Error=, ModuleFactoryResult=): void} callback callback + * @returns {void} + */ + create(data, callback) { + const context = data.context; + const dependencies = data.dependencies; + const resolveOptions = data.resolveOptions; + const dependency = /** @type {ContextDependency} */ (dependencies[0]); + const fileDependencies = new Set(); + const missingDependencies = new Set(); + const contextDependencies = new Set(); + this.hooks.beforeResolve.callAsync( + { + context: context, + dependencies: dependencies, + resolveOptions, + fileDependencies, + missingDependencies, + contextDependencies, + ...dependency.options + }, + (err, beforeResolveResult) => { + if (err) { + return callback(err, { + fileDependencies, + missingDependencies, + contextDependencies + }); + } + + // Ignored + if (!beforeResolveResult) { + return callback(null, { + fileDependencies, + missingDependencies, + contextDependencies + }); + } + + const context = beforeResolveResult.context; + const request = beforeResolveResult.request; + const resolveOptions = beforeResolveResult.resolveOptions; + + let loaders, + resource, + loadersPrefix = ""; + const idx = request.lastIndexOf("!"); + if (idx >= 0) { + let loadersRequest = request.substr(0, idx + 1); + let i; + for ( + i = 0; + i < loadersRequest.length && loadersRequest[i] === "!"; + i++ + ) { + loadersPrefix += "!"; + } + loadersRequest = loadersRequest + .substr(i) + .replace(/!+$/, "") + .replace(/!!+/g, "!"); + if (loadersRequest === "") { + loaders = []; + } else { + loaders = loadersRequest.split("!"); + } + resource = request.substr(idx + 1); + } else { + loaders = []; + resource = request; + } + + const contextResolver = this.resolverFactory.get( + "context", + dependencies.length > 0 + ? cachedSetProperty( + resolveOptions || EMPTY_RESOLVE_OPTIONS, + "dependencyType", + dependencies[0].category + ) + : resolveOptions + ); + const loaderResolver = this.resolverFactory.get("loader"); + + asyncLib.parallel( + [ + callback => { + contextResolver.resolve( + {}, + context, + resource, + { + fileDependencies, + missingDependencies, + contextDependencies + }, + (err, result) => { + if (err) return callback(err); + callback(null, result); + } + ); + }, + callback => { + asyncLib.map( + loaders, + (loader, callback) => { + loaderResolver.resolve( + {}, + context, + loader, + { + fileDependencies, + missingDependencies, + contextDependencies + }, + (err, result) => { + if (err) return callback(err); + callback(null, result); + } + ); + }, + callback + ); + } + ], + (err, result) => { + if (err) { + return callback(err, { + fileDependencies, + missingDependencies, + contextDependencies + }); + } + + this.hooks.afterResolve.callAsync( + { + addon: + loadersPrefix + + result[1].join("!") + + (result[1].length > 0 ? "!" : ""), + resource: result[0], + resolveDependencies: this.resolveDependencies.bind(this), + ...beforeResolveResult + }, + (err, result) => { + if (err) { + return callback(err, { + fileDependencies, + missingDependencies, + contextDependencies + }); + } + + // Ignored + if (!result) { + return callback(null, { + fileDependencies, + missingDependencies, + contextDependencies + }); + } + + return callback(null, { + module: new ContextModule(result.resolveDependencies, result), + fileDependencies, + missingDependencies, + contextDependencies + }); + } + ); + } + ); + } + ); + } + + /** + * @param {InputFileSystem} fs file system + * @param {ContextModuleOptions} options options + * @param {ResolveDependenciesCallback} callback callback function + * @returns {void} + */ + resolveDependencies(fs, options, callback) { + const cmf = this; + const { + resource, + resourceQuery, + resourceFragment, + recursive, + regExp, + include, + exclude, + referencedExports, + category + } = options; + if (!regExp || !resource) return callback(null, []); + + const addDirectoryChecked = (directory, visited, callback) => { + fs.realpath(directory, (err, realPath) => { + if (err) return callback(err); + if (visited.has(realPath)) return callback(null, []); + let recursionStack; + addDirectory( + directory, + (dir, callback) => { + if (recursionStack === undefined) { + recursionStack = new Set(visited); + recursionStack.add(realPath); + } + addDirectoryChecked(dir, recursionStack, callback); + }, + callback + ); + }); + }; + + const addDirectory = (directory, addSubDirectory, callback) => { + fs.readdir(directory, (err, files) => { + if (err) return callback(err); + files = files.map(file => file.normalize("NFC")); + files = cmf.hooks.contextModuleFiles.call(files); + if (!files || files.length === 0) return callback(null, []); + asyncLib.map( + files.filter(p => p.indexOf(".") !== 0), + (segment, callback) => { + const subResource = join(fs, directory, segment); + + if (!exclude || !subResource.match(exclude)) { + fs.stat(subResource, (err, stat) => { + if (err) { + if (err.code === "ENOENT") { + // ENOENT is ok here because the file may have been deleted between + // the readdir and stat calls. + return callback(); + } else { + return callback(err); + } + } + + if (stat.isDirectory()) { + if (!recursive) return callback(); + addSubDirectory(subResource, callback); + } else if ( + stat.isFile() && + (!include || subResource.match(include)) + ) { + const obj = { + context: resource, + request: + "." + + subResource.substr(resource.length).replace(/\\/g, "/") + }; + + this.hooks.alternativeRequests.callAsync( + [obj], + options, + (err, alternatives) => { + if (err) return callback(err); + alternatives = alternatives + .filter(obj => regExp.test(obj.request)) + .map(obj => { + const dep = new ContextElementDependency( + obj.request + resourceQuery + resourceFragment, + obj.request, + category, + referencedExports + ); + dep.optional = true; + return dep; + }); + callback(null, alternatives); + } + ); + } else { + callback(); + } + }); + } else { + callback(); + } + }, + (err, result) => { + if (err) return callback(err); + + if (!result) return callback(null, []); + + const flattenedResult = []; + + for (const item of result) { + if (item) flattenedResult.push(...item); + } + + callback(null, flattenedResult); + } + ); + }); + }; + + if (typeof fs.realpath === "function") { + addDirectoryChecked(resource, new Set(), callback); + } else { + const addSubDirectory = (dir, callback) => + addDirectory(dir, addSubDirectory, callback); + addDirectory(resource, addSubDirectory, callback); + } + } +}; + + +/***/ }), + +/***/ 39498: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ContextElementDependency = __webpack_require__(32592); +const { join } = __webpack_require__(71593); + +class ContextReplacementPlugin { + constructor( + resourceRegExp, + newContentResource, + newContentRecursive, + newContentRegExp + ) { + this.resourceRegExp = resourceRegExp; + + if (typeof newContentResource === "function") { + this.newContentCallback = newContentResource; + } else if ( + typeof newContentResource === "string" && + typeof newContentRecursive === "object" + ) { + this.newContentResource = newContentResource; + this.newContentCreateContextMap = (fs, callback) => { + callback(null, newContentRecursive); + }; + } else if ( + typeof newContentResource === "string" && + typeof newContentRecursive === "function" + ) { + this.newContentResource = newContentResource; + this.newContentCreateContextMap = newContentRecursive; + } else { + if (typeof newContentResource !== "string") { + newContentRegExp = newContentRecursive; + newContentRecursive = newContentResource; + newContentResource = undefined; + } + if (typeof newContentRecursive !== "boolean") { + newContentRegExp = newContentRecursive; + newContentRecursive = undefined; + } + this.newContentResource = newContentResource; + this.newContentRecursive = newContentRecursive; + this.newContentRegExp = newContentRegExp; + } + } + + apply(compiler) { + const resourceRegExp = this.resourceRegExp; + const newContentCallback = this.newContentCallback; + const newContentResource = this.newContentResource; + const newContentRecursive = this.newContentRecursive; + const newContentRegExp = this.newContentRegExp; + const newContentCreateContextMap = this.newContentCreateContextMap; + + compiler.hooks.contextModuleFactory.tap("ContextReplacementPlugin", cmf => { + cmf.hooks.beforeResolve.tap("ContextReplacementPlugin", result => { + if (!result) return; + if (resourceRegExp.test(result.request)) { + if (newContentResource !== undefined) { + result.request = newContentResource; + } + if (newContentRecursive !== undefined) { + result.recursive = newContentRecursive; + } + if (newContentRegExp !== undefined) { + result.regExp = newContentRegExp; + } + if (typeof newContentCallback === "function") { + newContentCallback(result); + } else { + for (const d of result.dependencies) { + if (d.critical) d.critical = false; + } + } + } + return result; + }); + cmf.hooks.afterResolve.tap("ContextReplacementPlugin", result => { + if (!result) return; + if (resourceRegExp.test(result.resource)) { + if (newContentResource !== undefined) { + if ( + newContentResource.startsWith("/") || + (newContentResource.length > 1 && newContentResource[1] === ":") + ) { + result.resource = newContentResource; + } else { + result.resource = join( + compiler.inputFileSystem, + result.resource, + newContentResource + ); + } + } + if (newContentRecursive !== undefined) { + result.recursive = newContentRecursive; + } + if (newContentRegExp !== undefined) { + result.regExp = newContentRegExp; + } + if (typeof newContentCreateContextMap === "function") { + result.resolveDependencies = createResolveDependenciesFromContextMap( + newContentCreateContextMap + ); + } + if (typeof newContentCallback === "function") { + const origResource = result.resource; + newContentCallback(result); + if ( + result.resource !== origResource && + !result.resource.startsWith("/") && + (result.resource.length <= 1 || result.resource[1] !== ":") + ) { + // When the function changed it to an relative path + result.resource = join( + compiler.inputFileSystem, + origResource, + result.resource + ); + } + } else { + for (const d of result.dependencies) { + if (d.critical) d.critical = false; + } + } + } + return result; + }); + }); + } +} + +const createResolveDependenciesFromContextMap = createContextMap => { + const resolveDependenciesFromContextMap = (fs, options, callback) => { + createContextMap(fs, (err, map) => { + if (err) return callback(err); + const dependencies = Object.keys(map).map(key => { + return new ContextElementDependency( + map[key] + options.resourceQuery + options.resourceFragment, + key, + options.category, + options.referencedExports + ); + }); + callback(null, dependencies); + }); + }; + return resolveDependenciesFromContextMap; +}; + +module.exports = ContextReplacementPlugin; + + +/***/ }), + +/***/ 76936: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const ConstDependency = __webpack_require__(9364); +const BasicEvaluatedExpression = __webpack_require__(98288); +const { + approve, + evaluateToString, + toConstantDependency +} = __webpack_require__(98550); + +/** @typedef {import("estree").Expression} Expression */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ + +/** @typedef {null|undefined|RegExp|Function|string|number|boolean|bigint|undefined} CodeValuePrimitive */ +/** @typedef {RecursiveArrayOrRecord} CodeValue */ + +class RuntimeValue { + constructor(fn, fileDependencies) { + this.fn = fn; + this.fileDependencies = fileDependencies || []; + } + + exec(parser) { + const buildInfo = parser.state.module.buildInfo; + if (this.fileDependencies === true) { + buildInfo.cacheable = false; + } else { + for (const fileDependency of this.fileDependencies) { + buildInfo.fileDependencies.add(fileDependency); + } + } + + return this.fn({ module: parser.state.module }); + } +} + +/** + * @param {any[]|{[k: string]: any}} obj obj + * @param {JavascriptParser} parser Parser + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {boolean|undefined|null=} asiSafe asi safe (undefined: unknown, null: unneeded) + * @returns {string} code converted to string that evaluates + */ +const stringifyObj = (obj, parser, runtimeTemplate, asiSafe) => { + let code; + let arr = Array.isArray(obj); + if (arr) { + code = `[${obj + .map(code => toCode(code, parser, runtimeTemplate, null)) + .join(",")}]`; + } else { + code = `{${Object.keys(obj) + .map(key => { + const code = obj[key]; + return ( + JSON.stringify(key) + + ":" + + toCode(code, parser, runtimeTemplate, null) + ); + }) + .join(",")}}`; + } + + switch (asiSafe) { + case null: + return code; + case true: + return arr ? code : `(${code})`; + case false: + return arr ? `;${code}` : `;(${code})`; + default: + return `Object(${code})`; + } +}; + +/** + * Convert code to a string that evaluates + * @param {CodeValue} code Code to evaluate + * @param {JavascriptParser} parser Parser + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {boolean|undefined|null=} asiSafe asi safe (undefined: unknown, null: unneeded) + * @returns {string} code converted to string that evaluates + */ +const toCode = (code, parser, runtimeTemplate, asiSafe) => { + if (code === null) { + return "null"; + } + if (code === undefined) { + return "undefined"; + } + if (Object.is(code, -0)) { + return "-0"; + } + if (code instanceof RuntimeValue) { + return toCode(code.exec(parser), parser, runtimeTemplate, asiSafe); + } + if (code instanceof RegExp && code.toString) { + return code.toString(); + } + if (typeof code === "function" && code.toString) { + return "(" + code.toString() + ")"; + } + if (typeof code === "object") { + return stringifyObj(code, parser, runtimeTemplate, asiSafe); + } + if (typeof code === "bigint") { + return runtimeTemplate.supportsBigIntLiteral() + ? `${code}n` + : `BigInt("${code}")`; + } + return code + ""; +}; + +class DefinePlugin { + /** + * Create a new define plugin + * @param {Record} definitions A map of global object definitions + */ + constructor(definitions) { + this.definitions = definitions; + } + + static runtimeValue(fn, fileDependencies) { + return new RuntimeValue(fn, fileDependencies); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const definitions = this.definitions; + compiler.hooks.compilation.tap( + "DefinePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + const { runtimeTemplate } = compilation; + + /** + * Handler + * @param {JavascriptParser} parser Parser + * @returns {void} + */ + const handler = parser => { + /** + * Walk definitions + * @param {Object} definitions Definitions map + * @param {string} prefix Prefix string + * @returns {void} + */ + const walkDefinitions = (definitions, prefix) => { + Object.keys(definitions).forEach(key => { + const code = definitions[key]; + if ( + code && + typeof code === "object" && + !(code instanceof RuntimeValue) && + !(code instanceof RegExp) + ) { + walkDefinitions(code, prefix + key + "."); + applyObjectDefine(prefix + key, code); + return; + } + applyDefineKey(prefix, key); + applyDefine(prefix + key, code); + }); + }; + + /** + * Apply define key + * @param {string} prefix Prefix + * @param {string} key Key + * @returns {void} + */ + const applyDefineKey = (prefix, key) => { + const splittedKey = key.split("."); + splittedKey.slice(1).forEach((_, i) => { + const fullKey = prefix + splittedKey.slice(0, i + 1).join("."); + parser.hooks.canRename.for(fullKey).tap("DefinePlugin", approve); + }); + }; + + /** + * Apply Code + * @param {string} key Key + * @param {CodeValue} code Code + * @returns {void} + */ + const applyDefine = (key, code) => { + const isTypeof = /^typeof\s+/.test(key); + if (isTypeof) key = key.replace(/^typeof\s+/, ""); + let recurse = false; + let recurseTypeof = false; + if (!isTypeof) { + parser.hooks.canRename.for(key).tap("DefinePlugin", approve); + parser.hooks.evaluateIdentifier + .for(key) + .tap("DefinePlugin", expr => { + /** + * this is needed in case there is a recursion in the DefinePlugin + * to prevent an endless recursion + * e.g.: new DefinePlugin({ + * "a": "b", + * "b": "a" + * }); + */ + if (recurse) return; + recurse = true; + const res = parser.evaluate( + toCode(code, parser, runtimeTemplate, null) + ); + recurse = false; + res.setRange(expr.range); + return res; + }); + parser.hooks.expression.for(key).tap("DefinePlugin", expr => { + const strCode = toCode( + code, + parser, + runtimeTemplate, + !parser.isAsiPosition(expr.range[0]) + ); + if (/__webpack_require__\s*(!?\.)/.test(strCode)) { + return toConstantDependency(parser, strCode, [ + RuntimeGlobals.require + ])(expr); + } else if (/__webpack_require__/.test(strCode)) { + return toConstantDependency(parser, strCode, [ + RuntimeGlobals.requireScope + ])(expr); + } else { + return toConstantDependency(parser, strCode)(expr); + } + }); + } + parser.hooks.evaluateTypeof.for(key).tap("DefinePlugin", expr => { + /** + * this is needed in case there is a recursion in the DefinePlugin + * to prevent an endless recursion + * e.g.: new DefinePlugin({ + * "typeof a": "typeof b", + * "typeof b": "typeof a" + * }); + */ + if (recurseTypeof) return; + recurseTypeof = true; + const typeofCode = isTypeof + ? toCode(code, parser, runtimeTemplate, null) + : "typeof (" + + toCode(code, parser, runtimeTemplate, null) + + ")"; + const res = parser.evaluate(typeofCode); + recurseTypeof = false; + res.setRange(expr.range); + return res; + }); + parser.hooks.typeof.for(key).tap("DefinePlugin", expr => { + const typeofCode = isTypeof + ? toCode(code, parser, runtimeTemplate, null) + : "typeof (" + + toCode(code, parser, runtimeTemplate, null) + + ")"; + const res = parser.evaluate(typeofCode); + if (!res.isString()) return; + return toConstantDependency( + parser, + JSON.stringify(res.string) + ).bind(parser)(expr); + }); + }; + + /** + * Apply Object + * @param {string} key Key + * @param {Object} obj Object + * @returns {void} + */ + const applyObjectDefine = (key, obj) => { + parser.hooks.canRename.for(key).tap("DefinePlugin", approve); + parser.hooks.evaluateIdentifier + .for(key) + .tap("DefinePlugin", expr => + new BasicEvaluatedExpression() + .setTruthy() + .setSideEffects(false) + .setRange(expr.range) + ); + parser.hooks.evaluateTypeof + .for(key) + .tap("DefinePlugin", evaluateToString("object")); + parser.hooks.expression.for(key).tap("DefinePlugin", expr => { + const strCode = stringifyObj( + obj, + parser, + runtimeTemplate, + !parser.isAsiPosition(expr.range[0]) + ); + + if (/__webpack_require__\s*(!?\.)/.test(strCode)) { + return toConstantDependency(parser, strCode, [ + RuntimeGlobals.require + ])(expr); + } else if (/__webpack_require__/.test(strCode)) { + return toConstantDependency(parser, strCode, [ + RuntimeGlobals.requireScope + ])(expr); + } else { + return toConstantDependency(parser, strCode)(expr); + } + }); + parser.hooks.typeof + .for(key) + .tap( + "DefinePlugin", + toConstantDependency(parser, JSON.stringify("object")) + ); + }; + + walkDefinitions(definitions, ""); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("DefinePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("DefinePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("DefinePlugin", handler); + } + ); + } +} +module.exports = DefinePlugin; + + +/***/ }), + +/***/ 12106: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { OriginalSource, RawSource } = __webpack_require__(55600); +const Module = __webpack_require__(54031); +const RuntimeGlobals = __webpack_require__(48801); +const DelegatedSourceDependency = __webpack_require__(73725); +const StaticExportsDependency = __webpack_require__(68372); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./LibManifestPlugin").ManifestModuleData} ManifestModuleData */ +/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("./Module").LibIdentOptions} LibIdentOptions */ +/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("./Module").SourceContext} SourceContext */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */ +/** @typedef {import("./util/Hash")} Hash */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ + +const TYPES = new Set(["javascript"]); +const RUNTIME_REQUIREMENTS = new Set([ + RuntimeGlobals.module, + RuntimeGlobals.require +]); + +class DelegatedModule extends Module { + constructor(sourceRequest, data, type, userRequest, originalRequest) { + super("javascript/dynamic", null); + + // Info from Factory + this.sourceRequest = sourceRequest; + this.request = data.id; + this.delegationType = type; + this.userRequest = userRequest; + this.originalRequest = originalRequest; + /** @type {ManifestModuleData} */ + this.delegateData = data; + + // Build info + this.delegatedSourceDependency = undefined; + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + return typeof this.originalRequest === "string" + ? this.originalRequest + : this.originalRequest.libIdent(options); + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return `delegated ${JSON.stringify(this.request)} from ${ + this.sourceRequest + }`; + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return `delegated ${this.userRequest} from ${this.sourceRequest}`; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + return callback(null, !this.buildMeta); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this.buildMeta = { ...this.delegateData.buildMeta }; + this.buildInfo = {}; + this.dependencies.length = 0; + this.delegatedSourceDependency = new DelegatedSourceDependency( + this.sourceRequest + ); + this.addDependency(this.delegatedSourceDependency); + this.addDependency( + new StaticExportsDependency(this.delegateData.exports || true, false) + ); + callback(); + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) { + const dep = /** @type {DelegatedSourceDependency} */ (this.dependencies[0]); + const sourceModule = moduleGraph.getModule(dep); + let str; + + if (!sourceModule) { + str = runtimeTemplate.throwMissingModuleErrorBlock({ + request: this.sourceRequest + }); + } else { + str = `module.exports = (${runtimeTemplate.moduleExports({ + module: sourceModule, + chunkGraph, + request: dep.request, + runtimeRequirements: new Set() + })})`; + + switch (this.delegationType) { + case "require": + str += `(${JSON.stringify(this.request)})`; + break; + case "object": + str += `[${JSON.stringify(this.request)}]`; + break; + } + + str += ";"; + } + + const sources = new Map(); + if (this.useSourceMap || this.useSimpleSourceMap) { + sources.set("javascript", new OriginalSource(str, this.identifier())); + } else { + sources.set("javascript", new RawSource(str)); + } + + return { + sources, + runtimeRequirements: RUNTIME_REQUIREMENTS + }; + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + return 42; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(this.delegationType); + hash.update(JSON.stringify(this.request)); + super.updateHash(hash, context); + } + + serialize(context) { + const { write } = context; + // constructor + write(this.sourceRequest); + write(this.delegateData); + write(this.delegationType); + write(this.userRequest); + write(this.originalRequest); + super.serialize(context); + } + + static deserialize(context) { + const { read } = context; + const obj = new DelegatedModule( + read(), // sourceRequest + read(), // delegateData + read(), // delegationType + read(), // userRequest + read() // originalRequest + ); + obj.deserialize(context); + return obj; + } + + /** + * Assuming this module is in the cache. Update the (cached) module with + * the fresh module from the factory. Usually updates internal references + * and properties. + * @param {Module} module fresh module + * @returns {void} + */ + updateCacheModule(module) { + super.updateCacheModule(module); + const m = /** @type {DelegatedModule} */ (module); + this.delegationType = m.delegationType; + this.userRequest = m.userRequest; + this.originalRequest = m.originalRequest; + this.delegateData = m.delegateData; + } +} + +makeSerializable(DelegatedModule, "webpack/lib/DelegatedModule"); + +module.exports = DelegatedModule; + + +/***/ }), + +/***/ 62112: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const DelegatedModule = __webpack_require__(12106); + +// options.source +// options.type +// options.context +// options.scope +// options.content +// options.associatedObjectForCache +class DelegatedModuleFactoryPlugin { + constructor(options) { + this.options = options; + options.type = options.type || "require"; + options.extensions = options.extensions || ["", ".js", ".json", ".wasm"]; + } + + apply(normalModuleFactory) { + const scope = this.options.scope; + if (scope) { + normalModuleFactory.hooks.factorize.tapAsync( + "DelegatedModuleFactoryPlugin", + (data, callback) => { + const [dependency] = data.dependencies; + const { request } = dependency; + if (request && request.startsWith(`${scope}/`)) { + const innerRequest = "." + request.substr(scope.length); + let resolved; + if (innerRequest in this.options.content) { + resolved = this.options.content[innerRequest]; + return callback( + null, + new DelegatedModule( + this.options.source, + resolved, + this.options.type, + innerRequest, + request + ) + ); + } + for (let i = 0; i < this.options.extensions.length; i++) { + const extension = this.options.extensions[i]; + const requestPlusExt = innerRequest + extension; + if (requestPlusExt in this.options.content) { + resolved = this.options.content[requestPlusExt]; + return callback( + null, + new DelegatedModule( + this.options.source, + resolved, + this.options.type, + requestPlusExt, + request + extension + ) + ); + } + } + } + return callback(); + } + ); + } else { + normalModuleFactory.hooks.module.tap( + "DelegatedModuleFactoryPlugin", + module => { + const request = module.libIdent(this.options); + if (request) { + if (request in this.options.content) { + const resolved = this.options.content[request]; + return new DelegatedModule( + this.options.source, + resolved, + this.options.type, + request, + module + ); + } + } + return module; + } + ); + } + } +} +module.exports = DelegatedModuleFactoryPlugin; + + +/***/ }), + +/***/ 91472: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const DelegatedModuleFactoryPlugin = __webpack_require__(62112); +const DelegatedSourceDependency = __webpack_require__(73725); + +/** @typedef {import("./Compiler")} Compiler */ + +class DelegatedPlugin { + constructor(options) { + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "DelegatedPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + DelegatedSourceDependency, + normalModuleFactory + ); + } + ); + + compiler.hooks.compile.tap("DelegatedPlugin", ({ normalModuleFactory }) => { + new DelegatedModuleFactoryPlugin({ + associatedObjectForCache: compiler.root, + ...this.options + }).apply(normalModuleFactory); + }); + } +} + +module.exports = DelegatedPlugin; + + +/***/ }), + +/***/ 15267: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("./util/Hash")} Hash */ + +/** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ + +class DependenciesBlock { + constructor() { + /** @type {Dependency[]} */ + this.dependencies = []; + /** @type {AsyncDependenciesBlock[]} */ + this.blocks = []; + } + + /** + * Adds a DependencyBlock to DependencyBlock relationship. + * This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting) + * + * @param {AsyncDependenciesBlock} block block being added + * @returns {void} + */ + addBlock(block) { + this.blocks.push(block); + block.parent = this; + } + + /** + * @param {Dependency} dependency dependency being tied to block. + * This is an "edge" pointing to another "node" on module graph. + * @returns {void} + */ + addDependency(dependency) { + this.dependencies.push(dependency); + } + + /** + * @param {Dependency} dependency dependency being removed + * @returns {void} + */ + removeDependency(dependency) { + const idx = this.dependencies.indexOf(dependency); + if (idx >= 0) { + this.dependencies.splice(idx, 1); + } + } + + /** + * Removes all dependencies and blocks + * @returns {void} + */ + clearDependenciesAndBlocks() { + this.dependencies.length = 0; + this.blocks.length = 0; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + for (const dep of this.dependencies) { + dep.updateHash(hash, context); + } + for (const block of this.blocks) { + block.updateHash(hash, context); + } + } + + serialize({ write }) { + write(this.dependencies); + write(this.blocks); + } + + deserialize({ read }) { + this.dependencies = read(); + this.blocks = read(); + for (const block of this.blocks) { + block.parent = this; + } + } +} + +makeSerializable(DependenciesBlock, "webpack/lib/DependenciesBlock"); + +module.exports = DependenciesBlock; + + +/***/ }), + +/***/ 27563: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./ModuleGraphConnection")} ModuleGraphConnection */ +/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./util/Hash")} Hash */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * @typedef {Object} UpdateHashContext + * @property {ChunkGraph} chunkGraph + * @property {RuntimeSpec} runtime + * @property {RuntimeTemplate=} runtimeTemplate + */ + +/** + * @typedef {Object} SourcePosition + * @property {number} line + * @property {number=} column + */ + +/** + * @typedef {Object} RealDependencyLocation + * @property {SourcePosition} start + * @property {SourcePosition=} end + * @property {number=} index + */ + +/** + * @typedef {Object} SyntheticDependencyLocation + * @property {string} name + * @property {number=} index + */ + +/** @typedef {SyntheticDependencyLocation|RealDependencyLocation} DependencyLocation */ + +/** + * @typedef {Object} ExportSpec + * @property {string} name the name of the export + * @property {boolean=} canMangle can the export be renamed (defaults to true) + * @property {boolean=} terminalBinding is the export a terminal binding that should be checked for export star conflicts + * @property {(string | ExportSpec)[]=} exports nested exports + * @property {ModuleGraphConnection=} from when reexported: from which module + * @property {string[] | null=} export when reexported: from which export + */ + +/** + * @typedef {Object} ExportsSpec + * @property {(string | ExportSpec)[] | true | null} exports exported names, true for unknown exports or null for no exports + * @property {Set=} excludeExports when exports = true, list of unaffected exports + * @property {ModuleGraphConnection=} from when reexported: from which module + * @property {boolean=} canMangle can the export be renamed (defaults to true) + * @property {boolean=} terminalBinding are the exports terminal bindings that should be checked for export star conflicts + * @property {Module[]=} dependencies module on which the result depends on + */ + +/** + * @typedef {Object} ReferencedExport + * @property {string[]} name name of the referenced export + * @property {boolean=} canMangle when false, referenced export can not be mangled, defaults to true + */ + +class Dependency { + constructor() { + // TODO check if this can be moved into ModuleDependency + /** @type {boolean} */ + this.weak = false; + // TODO check if this can be moved into ModuleDependency + /** @type {boolean} */ + this.optional = false; + /** @type {DependencyLocation} */ + this.loc = undefined; + } + + /** + * @returns {string} a display name for the type of dependency + */ + get type() { + return "unknown"; + } + + /** + * @returns {string} a dependency category, typical categories are "commonjs", "amd", "esm" + */ + get category() { + return "unknown"; + } + + /** + * @returns {string | null} an identifier to merge equal requests + */ + getResourceIdentifier() { + return null; + } + + /** + * Returns the referenced module and export + * @deprecated + * @param {ModuleGraph} moduleGraph module graph + * @returns {never} throws error + */ + getReference(moduleGraph) { + throw new Error( + "Dependency.getReference was removed in favor of Dependency.getReferencedExports, ModuleGraph.getModule and ModuleGraph.getConnection().active" + ); + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + return Dependency.EXPORTS_OBJECT_REFERENCED; + } + + /** + * @param {ModuleGraph} moduleGraph module graph + * @returns {function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active + */ + getCondition(moduleGraph) { + return null; + } + + /** + * Returns the exported names + * @param {ModuleGraph} moduleGraph module graph + * @returns {ExportsSpec | undefined} export names + */ + getExports(moduleGraph) { + return undefined; + } + + /** + * Returns warnings + * @param {ModuleGraph} moduleGraph module graph + * @returns {WebpackError[]} warnings + */ + getWarnings(moduleGraph) { + return null; + } + + /** + * Returns errors + * @param {ModuleGraph} moduleGraph module graph + * @returns {WebpackError[]} errors + */ + getErrors(moduleGraph) { + return null; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + const { chunkGraph } = context; + const module = chunkGraph.moduleGraph.getModule(this); + if (module) { + hash.update(chunkGraph.getModuleId(module) + ""); + } + } + + /** + * implement this method to allow the occurrence order plugin to count correctly + * @returns {number} count how often the id is used in this dependency + */ + getNumberOfIdOccurrences() { + return 1; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this dependency connects the module to referencing modules + */ + getModuleEvaluationSideEffectsState(moduleGraph) { + return true; + } + + serialize({ write }) { + write(this.weak); + write(this.optional); + write(this.loc); + } + + deserialize({ read }) { + this.weak = read(); + this.optional = read(); + this.loc = read(); + } +} + +Dependency.NO_EXPORTS_REFERENCED = []; +Dependency.EXPORTS_OBJECT_REFERENCED = [[]]; + +Object.defineProperty(Dependency.prototype, "module", { + /** + * @deprecated + * @returns {never} throws + */ + get() { + throw new Error( + "module property was removed from Dependency (use compilation.moduleGraph.getModule(dependency) instead)" + ); + }, + + /** + * @deprecated + * @returns {never} throws + */ + set() { + throw new Error( + "module property was removed from Dependency (use compilation.moduleGraph.updateModule(dependency, module) instead)" + ); + } +}); + +Object.defineProperty(Dependency.prototype, "disconnect", { + get() { + throw new Error( + "disconnect was removed from Dependency (Dependency no longer carries graph specific information)" + ); + } +}); + +module.exports = Dependency; + + +/***/ }), + +/***/ 90909: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./ConcatenationScope")} ConcatenationScope */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Dependency").RuntimeSpec} RuntimeSpec */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./InitFragment")} InitFragment */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ + +/** + * @typedef {Object} DependencyTemplateContext + * @property {RuntimeTemplate} runtimeTemplate the runtime template + * @property {DependencyTemplates} dependencyTemplates the dependency templates + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + * @property {Set} runtimeRequirements the requirements for runtime + * @property {Module} module current module + * @property {RuntimeSpec} runtime current runtimes, for which code is generated + * @property {InitFragment[]} initFragments mutable array of init fragments for the current module + * @property {ConcatenationScope=} concatenationScope when in a concatenated module, information about other concatenated modules + */ + +class DependencyTemplate { + /* istanbul ignore next */ + /** + * @abstract + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } +} + +module.exports = DependencyTemplate; + + +/***/ }), + +/***/ 13563: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const createHash = __webpack_require__(34627); + +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./DependencyTemplate")} DependencyTemplate */ +/** @typedef {new (...args: any[]) => Dependency} DependencyConstructor */ + +class DependencyTemplates { + constructor() { + /** @type {Map} */ + this._map = new Map(); + /** @type {string} */ + this._hash = "31d6cfe0d16ae931b73c59d7e0c089c0"; + } + + /** + * @param {DependencyConstructor} dependency Constructor of Dependency + * @returns {DependencyTemplate} template for this dependency + */ + get(dependency) { + return this._map.get(dependency); + } + + /** + * @param {DependencyConstructor} dependency Constructor of Dependency + * @param {DependencyTemplate} dependencyTemplate template for this dependency + * @returns {void} + */ + set(dependency, dependencyTemplate) { + this._map.set(dependency, dependencyTemplate); + } + + /** + * @param {string} part additional hash contributor + * @returns {void} + */ + updateHash(part) { + const hash = createHash("md4"); + hash.update(this._hash); + hash.update(part); + this._hash = /** @type {string} */ (hash.digest("hex")); + } + + getHash() { + return this._hash; + } + + clone() { + const newInstance = new DependencyTemplates(); + newInstance._map = new Map(this._map); + newInstance._hash = this._hash; + return newInstance; + } +} + +module.exports = DependencyTemplates; + + +/***/ }), + +/***/ 96830: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const DllModuleFactory = __webpack_require__(47737); +const DllEntryDependency = __webpack_require__(63938); +const EntryDependency = __webpack_require__(69325); + +class DllEntryPlugin { + constructor(context, entries, options) { + this.context = context; + this.entries = entries; + this.options = options; + } + + apply(compiler) { + compiler.hooks.compilation.tap( + "DllEntryPlugin", + (compilation, { normalModuleFactory }) => { + const dllModuleFactory = new DllModuleFactory(); + compilation.dependencyFactories.set( + DllEntryDependency, + dllModuleFactory + ); + compilation.dependencyFactories.set( + EntryDependency, + normalModuleFactory + ); + } + ); + compiler.hooks.make.tapAsync("DllEntryPlugin", (compilation, callback) => { + compilation.addEntry( + this.context, + new DllEntryDependency( + this.entries.map((e, idx) => { + const dep = new EntryDependency(e); + dep.loc = { + name: this.options.name, + index: idx + }; + return dep; + }), + this.options.name + ), + this.options, + callback + ); + }); + } +} + +module.exports = DllEntryPlugin; + + +/***/ }), + +/***/ 75374: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { RawSource } = __webpack_require__(55600); +const Module = __webpack_require__(54031); +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("./Module").SourceContext} SourceContext */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./util/Hash")} Hash */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ + +const TYPES = new Set(["javascript"]); +const RUNTIME_REQUIREMENTS = new Set([ + RuntimeGlobals.require, + RuntimeGlobals.module +]); + +class DllModule extends Module { + constructor(context, dependencies, name) { + super("javascript/dynamic", context); + + // Info from Factory + this.dependencies = dependencies; + this.name = name; + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return `dll ${this.name}`; + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return `dll ${this.name}`; + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this.buildMeta = {}; + this.buildInfo = {}; + return callback(); + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration(context) { + const sources = new Map(); + sources.set( + "javascript", + new RawSource("module.exports = __webpack_require__;") + ); + return { + sources, + runtimeRequirements: RUNTIME_REQUIREMENTS + }; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + return callback(null, !this.buildMeta); + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + return 12; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update("dll module"); + hash.update(this.name || ""); + super.updateHash(hash, context); + } + + serialize(context) { + context.write(this.name); + super.serialize(context); + } + + deserialize(context) { + this.name = context.read(); + super.deserialize(context); + } + + /** + * Assuming this module is in the cache. Update the (cached) module with + * the fresh module from the factory. Usually updates internal references + * and properties. + * @param {Module} module fresh module + * @returns {void} + */ + updateCacheModule(module) { + super.updateCacheModule(module); + this.dependencies = module.dependencies; + } +} + +makeSerializable(DllModule, "webpack/lib/DllModule"); + +module.exports = DllModule; + + +/***/ }), + +/***/ 47737: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const DllModule = __webpack_require__(75374); +const ModuleFactory = __webpack_require__(6259); + +/** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ +/** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ +/** @typedef {import("./dependencies/DllEntryDependency")} DllEntryDependency */ + +class DllModuleFactory extends ModuleFactory { + constructor() { + super(); + this.hooks = Object.freeze({}); + } + /** + * @param {ModuleFactoryCreateData} data data object + * @param {function(Error=, ModuleFactoryResult=): void} callback callback + * @returns {void} + */ + create(data, callback) { + const dependency = /** @type {DllEntryDependency} */ (data.dependencies[0]); + callback(null, { + module: new DllModule( + data.context, + dependency.dependencies, + dependency.name + ) + }); + } +} + +module.exports = DllModuleFactory; + + +/***/ }), + +/***/ 91635: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const DllEntryPlugin = __webpack_require__(96830); +const FlagAllModulesAsUsedPlugin = __webpack_require__(32061); +const LibManifestPlugin = __webpack_require__(14533); + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(67983); + +/** @typedef {import("../declarations/plugins/DllPlugin").DllPluginOptions} DllPluginOptions */ +/** @typedef {import("./Compiler")} Compiler */ + +class DllPlugin { + /** + * @param {DllPluginOptions} options options object + */ + constructor(options) { + validate(schema, options, { + name: "Dll Plugin", + baseDataPath: "options" + }); + this.options = { + ...options, + entryOnly: options.entryOnly !== false + }; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.entryOption.tap("DllPlugin", (context, entry) => { + if (typeof entry !== "function") { + for (const name of Object.keys(entry)) { + const options = { + name, + filename: entry.filename + }; + new DllEntryPlugin(context, entry[name].import, options).apply( + compiler + ); + } + } else { + throw new Error( + "DllPlugin doesn't support dynamic entry (function) yet" + ); + } + return true; + }); + new LibManifestPlugin(this.options).apply(compiler); + if (!this.options.entryOnly) { + new FlagAllModulesAsUsedPlugin("DllPlugin").apply(compiler); + } + } +} + +module.exports = DllPlugin; + + +/***/ }), + +/***/ 49473: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const parseJson = __webpack_require__(34270); +const DelegatedModuleFactoryPlugin = __webpack_require__(62112); +const ExternalModuleFactoryPlugin = __webpack_require__(7832); +const WebpackError = __webpack_require__(24274); +const DelegatedSourceDependency = __webpack_require__(73725); +const makePathsRelative = __webpack_require__(47779).makePathsRelative; + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(71364); + +/** @typedef {import("../declarations/WebpackOptions").Externals} Externals */ +/** @typedef {import("../declarations/plugins/DllReferencePlugin").DllReferencePluginOptions} DllReferencePluginOptions */ +/** @typedef {import("../declarations/plugins/DllReferencePlugin").DllReferencePluginOptionsManifest} DllReferencePluginOptionsManifest */ + +class DllReferencePlugin { + /** + * @param {DllReferencePluginOptions} options options object + */ + constructor(options) { + validate(schema, options, { + name: "Dll Reference Plugin", + baseDataPath: "options" + }); + this.options = options; + /** @type {WeakMap} */ + this._compilationData = new WeakMap(); + } + + apply(compiler) { + compiler.hooks.compilation.tap( + "DllReferencePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + DelegatedSourceDependency, + normalModuleFactory + ); + } + ); + + compiler.hooks.beforeCompile.tapAsync( + "DllReferencePlugin", + (params, callback) => { + if ("manifest" in this.options) { + const manifest = this.options.manifest; + if (typeof manifest === "string") { + compiler.inputFileSystem.readFile(manifest, (err, result) => { + if (err) return callback(err); + const data = { + path: manifest, + data: undefined, + error: undefined + }; + // Catch errors parsing the manifest so that blank + // or malformed manifest files don't kill the process. + try { + data.data = parseJson(result.toString("utf-8")); + } catch (e) { + // Store the error in the params so that it can + // be added as a compilation error later on. + const manifestPath = makePathsRelative( + compiler.options.context, + manifest, + compiler.root + ); + data.error = new DllManifestError(manifestPath, e.message); + } + this._compilationData.set(params, data); + return callback(); + }); + return; + } + } + return callback(); + } + ); + + compiler.hooks.compile.tap("DllReferencePlugin", params => { + let name = this.options.name; + let sourceType = this.options.sourceType; + let content = + "content" in this.options ? this.options.content : undefined; + if ("manifest" in this.options) { + let manifestParameter = this.options.manifest; + let manifest; + if (typeof manifestParameter === "string") { + const data = this._compilationData.get(params); + // If there was an error parsing the manifest + // file, exit now because the error will be added + // as a compilation error in the "compilation" hook. + if (data.error) { + return; + } + manifest = data.data; + } else { + manifest = manifestParameter; + } + if (manifest) { + if (!name) name = manifest.name; + if (!sourceType) sourceType = manifest.type; + if (!content) content = manifest.content; + } + } + /** @type {Externals} */ + const externals = {}; + const source = "dll-reference " + name; + externals[source] = name; + const normalModuleFactory = params.normalModuleFactory; + new ExternalModuleFactoryPlugin(sourceType || "var", externals).apply( + normalModuleFactory + ); + new DelegatedModuleFactoryPlugin({ + source: source, + type: this.options.type, + scope: this.options.scope, + context: this.options.context || compiler.options.context, + content, + extensions: this.options.extensions, + associatedObjectForCache: compiler.root + }).apply(normalModuleFactory); + }); + + compiler.hooks.compilation.tap( + "DllReferencePlugin", + (compilation, params) => { + if ("manifest" in this.options) { + let manifest = this.options.manifest; + if (typeof manifest === "string") { + const data = this._compilationData.get(params); + // If there was an error parsing the manifest file, add the + // error as a compilation error to make the compilation fail. + if (data.error) { + compilation.errors.push(data.error); + } + compilation.fileDependencies.add(manifest); + } + } + } + ); + } +} + +class DllManifestError extends WebpackError { + constructor(filename, message) { + super(); + + this.name = "DllManifestError"; + this.message = `Dll manifest ${filename}\n${message}`; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = DllReferencePlugin; + + +/***/ }), + +/***/ 8245: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Naoyuki Kanezawa @nkzawa +*/ + + + +const EntryOptionPlugin = __webpack_require__(97235); +const EntryPlugin = __webpack_require__(78029); +const EntryDependency = __webpack_require__(69325); + +/** @typedef {import("../declarations/WebpackOptions").EntryDynamicNormalized} EntryDynamic */ +/** @typedef {import("../declarations/WebpackOptions").EntryItem} EntryItem */ +/** @typedef {import("../declarations/WebpackOptions").EntryStaticNormalized} EntryStatic */ +/** @typedef {import("./Compiler")} Compiler */ + +class DynamicEntryPlugin { + /** + * @param {string} context the context path + * @param {EntryDynamic} entry the entry value + */ + constructor(context, entry) { + this.context = context; + this.entry = entry; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "DynamicEntryPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + EntryDependency, + normalModuleFactory + ); + } + ); + + compiler.hooks.make.tapPromise( + "DynamicEntryPlugin", + (compilation, callback) => + Promise.resolve(this.entry()) + .then(entry => { + const promises = []; + for (const name of Object.keys(entry)) { + const desc = entry[name]; + const options = EntryOptionPlugin.entryDescriptionToOptions( + compiler, + name, + desc + ); + for (const entry of desc.import) { + promises.push( + new Promise((resolve, reject) => { + compilation.addEntry( + this.context, + EntryPlugin.createDependency(entry, options), + options, + err => { + if (err) return reject(err); + resolve(); + } + ); + }) + ); + } + } + return Promise.all(promises); + }) + .then(x => {}) + ); + } +} + +module.exports = DynamicEntryPlugin; + + +/***/ }), + +/***/ 97235: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../declarations/WebpackOptions").EntryDescriptionNormalized} EntryDescription */ +/** @typedef {import("../declarations/WebpackOptions").EntryNormalized} Entry */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ + +class EntryOptionPlugin { + /** + * @param {Compiler} compiler the compiler instance one is tapping into + * @returns {void} + */ + apply(compiler) { + compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry) => { + EntryOptionPlugin.applyEntryOption(compiler, context, entry); + return true; + }); + } + + /** + * @param {Compiler} compiler the compiler + * @param {string} context context directory + * @param {Entry} entry request + * @returns {void} + */ + static applyEntryOption(compiler, context, entry) { + if (typeof entry === "function") { + const DynamicEntryPlugin = __webpack_require__(8245); + new DynamicEntryPlugin(context, entry).apply(compiler); + } else { + const EntryPlugin = __webpack_require__(78029); + for (const name of Object.keys(entry)) { + const desc = entry[name]; + const options = EntryOptionPlugin.entryDescriptionToOptions( + compiler, + name, + desc + ); + for (const entry of desc.import) { + new EntryPlugin(context, entry, options).apply(compiler); + } + } + } + } + + /** + * @param {Compiler} compiler the compiler + * @param {string} name entry name + * @param {EntryDescription} desc entry description + * @returns {EntryOptions} options for the entry + */ + static entryDescriptionToOptions(compiler, name, desc) { + /** @type {EntryOptions} */ + const options = { + name, + filename: desc.filename, + runtime: desc.runtime, + layer: desc.layer, + dependOn: desc.dependOn, + chunkLoading: desc.chunkLoading, + wasmLoading: desc.wasmLoading, + library: desc.library + }; + if (desc.layer !== undefined && !compiler.options.experiments.layers) { + throw new Error( + "'entryOptions.layer' is only allowed when 'experiments.layers' is enabled" + ); + } + if (desc.chunkLoading) { + const EnableChunkLoadingPlugin = __webpack_require__(41952); + EnableChunkLoadingPlugin.checkEnabled(compiler, desc.chunkLoading); + } + if (desc.wasmLoading) { + const EnableWasmLoadingPlugin = __webpack_require__(19599); + EnableWasmLoadingPlugin.checkEnabled(compiler, desc.wasmLoading); + } + if (desc.library) { + const EnableLibraryPlugin = __webpack_require__(60405); + EnableLibraryPlugin.checkEnabled(compiler, desc.library.type); + } + return options; + } +} + +module.exports = EntryOptionPlugin; + + +/***/ }), + +/***/ 78029: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const EntryDependency = __webpack_require__(69325); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */ + +class EntryPlugin { + /** + * An entry plugin which will handle + * creation of the EntryDependency + * + * @param {string} context context path + * @param {string} entry entry path + * @param {EntryOptions | string} options entry options (passing a string is deprecated) + */ + constructor(context, entry, options) { + this.context = context; + this.entry = entry; + this.options = options || ""; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "EntryPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + EntryDependency, + normalModuleFactory + ); + } + ); + + compiler.hooks.make.tapAsync("EntryPlugin", (compilation, callback) => { + const { entry, options, context } = this; + + const dep = EntryPlugin.createDependency(entry, options); + compilation.addEntry(context, dep, options, err => { + callback(err); + }); + }); + } + + /** + * @param {string} entry entry request + * @param {EntryOptions | string} options entry options (passing string is deprecated) + * @returns {EntryDependency} the dependency + */ + static createDependency(entry, options) { + const dep = new EntryDependency(entry); + // TODO webpack 6 remove string option + dep.loc = { name: typeof options === "object" ? options.name : options }; + return dep; + } +} + +module.exports = EntryPlugin; + + +/***/ }), + +/***/ 33660: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ChunkGroup = __webpack_require__(57630); + +/** @typedef {import("../declarations/WebpackOptions").EntryDescriptionNormalized} EntryDescription */ +/** @typedef {import("./Chunk")} Chunk */ + +/** @typedef {{ name?: string } & Omit} EntryOptions */ + +/** + * Entrypoint serves as an encapsulation primitive for chunks that are + * a part of a single ChunkGroup. They represent all bundles that need to be loaded for a + * single instance of a page. Multi-page application architectures will typically yield multiple Entrypoint objects + * inside of the compilation, whereas a Single Page App may only contain one with many lazy-loaded chunks. + */ +class Entrypoint extends ChunkGroup { + /** + * Creates an instance of Entrypoint. + * @param {EntryOptions | string} entryOptions the options for the entrypoint (or name) + * @param {boolean=} initial false, when the entrypoint is not initial loaded + */ + constructor(entryOptions, initial = true) { + if (typeof entryOptions === "string") { + entryOptions = { name: entryOptions }; + } + super({ + name: entryOptions.name + }); + this.options = entryOptions; + /** @type {Chunk=} */ + this._runtimeChunk = undefined; + /** @type {Chunk=} */ + this._entrypointChunk = undefined; + /** @type {boolean} */ + this._initial = initial; + } + + /** + * @returns {boolean} true, when this chunk group will be loaded on initial page load + */ + isInitial() { + return this._initial; + } + + /** + * Sets the runtimeChunk for an entrypoint. + * @param {Chunk} chunk the chunk being set as the runtime chunk. + * @returns {void} + */ + setRuntimeChunk(chunk) { + this._runtimeChunk = chunk; + } + + /** + * Fetches the chunk reference containing the webpack bootstrap code + * @returns {Chunk | null} returns the runtime chunk or null if there is none + */ + getRuntimeChunk() { + if (this._runtimeChunk) return this._runtimeChunk; + for (const parent of this.parentsIterable) { + if (parent instanceof Entrypoint) return parent.getRuntimeChunk(); + } + return null; + } + + /** + * Sets the chunk with the entrypoint modules for an entrypoint. + * @param {Chunk} chunk the chunk being set as the entrypoint chunk. + * @returns {void} + */ + setEntrypointChunk(chunk) { + this._entrypointChunk = chunk; + } + + /** + * Returns the chunk which contains the entrypoint modules + * (or at least the execution of them) + * @returns {Chunk} chunk + */ + getEntrypointChunk() { + return this._entrypointChunk; + } + + /** + * @param {Chunk} oldChunk chunk to be replaced + * @param {Chunk} newChunk New chunk that will be replaced with + * @returns {boolean} returns true if the replacement was successful + */ + replaceChunk(oldChunk, newChunk) { + if (this._runtimeChunk === oldChunk) this._runtimeChunk = newChunk; + if (this._entrypointChunk === oldChunk) this._entrypointChunk = newChunk; + return super.replaceChunk(oldChunk, newChunk); + } +} + +module.exports = Entrypoint; + + +/***/ }), + +/***/ 35887: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Authors Simen Brekken @simenbrekken, Einar Löve @einarlove +*/ + + + +const DefinePlugin = __webpack_require__(76936); +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./DefinePlugin").CodeValue} CodeValue */ + +class EnvironmentPlugin { + constructor(...keys) { + if (keys.length === 1 && Array.isArray(keys[0])) { + this.keys = keys[0]; + this.defaultValues = {}; + } else if (keys.length === 1 && keys[0] && typeof keys[0] === "object") { + this.keys = Object.keys(keys[0]); + this.defaultValues = keys[0]; + } else { + this.keys = keys; + this.defaultValues = {}; + } + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + /** @type {Record} */ + const definitions = {}; + for (const key of this.keys) { + const value = + process.env[key] !== undefined + ? process.env[key] + : this.defaultValues[key]; + + if (value === undefined) { + compiler.hooks.thisCompilation.tap("EnvironmentPlugin", compilation => { + const error = new WebpackError( + `EnvironmentPlugin - ${key} environment variable is undefined.\n\n` + + "You can pass an object with default values to suppress this warning.\n" + + "See https://webpack.js.org/plugins/environment-plugin for example." + ); + + error.name = "EnvVariableNotDefinedError"; + compilation.errors.push(error); + }); + } + + definitions[`process.env.${key}`] = + value === undefined ? "undefined" : JSON.stringify(value); + } + + new DefinePlugin(definitions).apply(compiler); + } +} + +module.exports = EnvironmentPlugin; + + +/***/ }), + +/***/ 31183: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const loaderFlag = "LOADER_EXECUTION"; + +const webpackOptionsFlag = "WEBPACK_OPTIONS"; + +exports.cutOffByFlag = (stack, flag) => { + stack = stack.split("\n"); + for (let i = 0; i < stack.length; i++) { + if (stack[i].includes(flag)) { + stack.length = i; + } + } + return stack.join("\n"); +}; + +exports.cutOffLoaderExecution = stack => + exports.cutOffByFlag(stack, loaderFlag); + +exports.cutOffWebpackOptions = stack => + exports.cutOffByFlag(stack, webpackOptionsFlag); + +exports.cutOffMultilineMessage = (stack, message) => { + stack = stack.split("\n"); + message = message.split("\n"); + + const result = []; + + stack.forEach((line, idx) => { + if (!line.includes(message[idx])) result.push(line); + }); + + return result.join("\n"); +}; + +exports.cutOffMessage = (stack, message) => { + const nextLine = stack.indexOf("\n"); + if (nextLine === -1) { + return stack === message ? "" : stack; + } else { + const firstLine = stack.substr(0, nextLine); + return firstLine === message ? stack.substr(nextLine + 1) : stack; + } +}; + +exports.cleanUp = (stack, message) => { + stack = exports.cutOffLoaderExecution(stack); + stack = exports.cutOffMessage(stack, message); + return stack; +}; + +exports.cleanUpWebpackOptions = (stack, message) => { + stack = exports.cutOffWebpackOptions(stack); + stack = exports.cutOffMultilineMessage(stack, message); + return stack; +}; + + +/***/ }), + +/***/ 96655: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource, RawSource } = __webpack_require__(55600); +const ExternalModule = __webpack_require__(24334); +const ModuleFilenameHelpers = __webpack_require__(79843); +const JavascriptModulesPlugin = __webpack_require__(80867); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Compiler")} Compiler */ + +/** @type {WeakMap} */ +const cache = new WeakMap(); + +const devtoolWarning = new RawSource(`/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +`); + +class EvalDevToolModulePlugin { + constructor(options) { + this.namespace = options.namespace || ""; + this.sourceUrlComment = options.sourceUrlComment || "\n//# sourceURL=[url]"; + this.moduleFilenameTemplate = + options.moduleFilenameTemplate || + "webpack://[namespace]/[resourcePath]?[loaders]"; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("EvalDevToolModulePlugin", compilation => { + const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation); + hooks.renderModuleContent.tap( + "EvalDevToolModulePlugin", + (source, module, { runtimeTemplate, chunkGraph }) => { + const cacheEntry = cache.get(source); + if (cacheEntry !== undefined) return cacheEntry; + if (module instanceof ExternalModule) { + cache.set(source, source); + return source; + } + const content = source.source(); + const str = ModuleFilenameHelpers.createFilename( + module, + { + moduleFilenameTemplate: this.moduleFilenameTemplate, + namespace: this.namespace + }, + { + requestShortener: runtimeTemplate.requestShortener, + chunkGraph + } + ); + const footer = + "\n" + + this.sourceUrlComment.replace( + /\[url\]/g, + encodeURI(str) + .replace(/%2F/g, "/") + .replace(/%20/g, "_") + .replace(/%5E/g, "^") + .replace(/%5C/g, "\\") + .replace(/^\//, "") + ); + const result = new RawSource( + `eval(${JSON.stringify(content + footer)});` + ); + cache.set(source, result); + return result; + } + ); + hooks.render.tap( + "EvalDevToolModulePlugin", + source => new ConcatSource(devtoolWarning, source) + ); + hooks.chunkHash.tap("EvalDevToolModulePlugin", (chunk, hash) => { + hash.update("EvalDevToolModulePlugin"); + hash.update("2"); + }); + }); + } +} + +module.exports = EvalDevToolModulePlugin; + + +/***/ }), + +/***/ 13902: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource, RawSource } = __webpack_require__(55600); +const ModuleFilenameHelpers = __webpack_require__(79843); +const NormalModule = __webpack_require__(88376); +const SourceMapDevToolModuleOptionsPlugin = __webpack_require__(5426); +const JavascriptModulesPlugin = __webpack_require__(80867); +const ConcatenatedModule = __webpack_require__(74233); +const { absolutify } = __webpack_require__(47779); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").DevTool} DevToolOptions */ +/** @typedef {import("../declarations/plugins/SourceMapDevToolPlugin").SourceMapDevToolPluginOptions} SourceMapDevToolPluginOptions */ +/** @typedef {import("./Compiler")} Compiler */ + +/** @type {WeakMap} */ +const cache = new WeakMap(); + +const devtoolWarning = new RawSource(`/* + * ATTENTION: An "eval-source-map" devtool has been used. + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +`); + +class EvalSourceMapDevToolPlugin { + /** + * @param {SourceMapDevToolPluginOptions|string} inputOptions Options object + */ + constructor(inputOptions) { + /** @type {SourceMapDevToolPluginOptions} */ + let options; + if (typeof inputOptions === "string") { + options = { + append: inputOptions + }; + } else { + options = inputOptions; + } + this.sourceMapComment = + options.append || "//# sourceURL=[module]\n//# sourceMappingURL=[url]"; + this.moduleFilenameTemplate = + options.moduleFilenameTemplate || + "webpack://[namespace]/[resource-path]?[hash]"; + this.namespace = options.namespace || ""; + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap( + "EvalSourceMapDevToolPlugin", + compilation => { + const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation); + new SourceMapDevToolModuleOptionsPlugin(options).apply(compilation); + const matchModule = ModuleFilenameHelpers.matchObject.bind( + ModuleFilenameHelpers, + options + ); + hooks.renderModuleContent.tap( + "EvalSourceMapDevToolPlugin", + (source, m, { runtimeTemplate, chunkGraph }) => { + const cachedSource = cache.get(source); + if (cachedSource !== undefined) { + return cachedSource; + } + + const result = r => { + cache.set(source, r); + return r; + }; + + if (m instanceof NormalModule) { + const module = /** @type {NormalModule} */ (m); + if (!matchModule(module.resource)) { + return result(source); + } + } else if (m instanceof ConcatenatedModule) { + const concatModule = /** @type {ConcatenatedModule} */ (m); + if (concatModule.rootModule instanceof NormalModule) { + const module = /** @type {NormalModule} */ (concatModule.rootModule); + if (!matchModule(module.resource)) { + return result(source); + } + } else { + return result(source); + } + } else { + return result(source); + } + + /** @type {{ [key: string]: TODO; }} */ + let sourceMap; + let content; + if (source.sourceAndMap) { + const sourceAndMap = source.sourceAndMap(options); + sourceMap = sourceAndMap.map; + content = sourceAndMap.source; + } else { + sourceMap = source.map(options); + content = source.source(); + } + if (!sourceMap) { + return result(source); + } + + // Clone (flat) the sourcemap to ensure that the mutations below do not persist. + sourceMap = { ...sourceMap }; + const context = compiler.options.context; + const root = compiler.root; + const modules = sourceMap.sources.map(source => { + if (!source.startsWith("webpack://")) return source; + source = absolutify(context, source.slice(10), root); + const module = compilation.findModule(source); + return module || source; + }); + let moduleFilenames = modules.map(module => { + return ModuleFilenameHelpers.createFilename( + module, + { + moduleFilenameTemplate: this.moduleFilenameTemplate, + namespace: this.namespace + }, + { + requestShortener: runtimeTemplate.requestShortener, + chunkGraph + } + ); + }); + moduleFilenames = ModuleFilenameHelpers.replaceDuplicates( + moduleFilenames, + (filename, i, n) => { + for (let j = 0; j < n; j++) filename += "*"; + return filename; + } + ); + sourceMap.sources = moduleFilenames; + sourceMap.sourceRoot = options.sourceRoot || ""; + const moduleId = chunkGraph.getModuleId(m); + sourceMap.file = `${moduleId}.js`; + + const footer = + this.sourceMapComment.replace( + /\[url\]/g, + `data:application/json;charset=utf-8;base64,${Buffer.from( + JSON.stringify(sourceMap), + "utf8" + ).toString("base64")}` + ) + `\n//# sourceURL=webpack-internal:///${moduleId}\n`; // workaround for chrome bug + + return result( + new RawSource(`eval(${JSON.stringify(content + footer)});`) + ); + } + ); + hooks.render.tap( + "EvalSourceMapDevToolPlugin", + source => new ConcatSource(devtoolWarning, source) + ); + hooks.chunkHash.tap("EvalSourceMapDevToolPlugin", (chunk, hash) => { + hash.update("EvalSourceMapDevToolPlugin"); + hash.update("2"); + }); + } + ); + } +} + +module.exports = EvalSourceMapDevToolPlugin; + + +/***/ }), + +/***/ 54227: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { equals } = __webpack_require__(92459); +const SortableSet = __webpack_require__(51326); +const makeSerializable = __webpack_require__(55575); +const { forEachRuntime } = __webpack_require__(43478); + +/** @typedef {import("./Dependency").RuntimeSpec} RuntimeSpec */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./ModuleGraphConnection")} ModuleGraphConnection */ +/** @typedef {import("./util/Hash")} Hash */ + +/** @typedef {typeof UsageState.OnlyPropertiesUsed | typeof UsageState.NoInfo | typeof UsageState.Unknown | typeof UsageState.Used} RuntimeUsageStateType */ +/** @typedef {typeof UsageState.Unused | RuntimeUsageStateType} UsageStateType */ + +const UsageState = Object.freeze({ + Unused: /** @type {0} */ (0), + OnlyPropertiesUsed: /** @type {1} */ (1), + NoInfo: /** @type {2} */ (2), + Unknown: /** @type {3} */ (3), + Used: /** @type {4} */ (4) +}); + +const RETURNS_TRUE = () => true; + +const CIRCULAR = Symbol("circular target"); + +class RestoreProvidedData { + constructor( + exports, + otherProvided, + otherCanMangleProvide, + otherTerminalBinding + ) { + this.exports = exports; + this.otherProvided = otherProvided; + this.otherCanMangleProvide = otherCanMangleProvide; + this.otherTerminalBinding = otherTerminalBinding; + } + + serialize({ write }) { + write(this.exports); + write(this.otherProvided); + write(this.otherCanMangleProvide); + write(this.otherTerminalBinding); + } + + static deserialize({ read }) { + return new RestoreProvidedData(read(), read(), read(), read()); + } +} + +makeSerializable( + RestoreProvidedData, + "webpack/lib/ModuleGraph", + "RestoreProvidedData" +); + +class ExportsInfo { + constructor() { + /** @type {Map} */ + this._exports = new Map(); + this._otherExportsInfo = new ExportInfo(null); + this._sideEffectsOnlyInfo = new ExportInfo("*side effects only*"); + this._exportsAreOrdered = false; + /** @type {ExportsInfo=} */ + this._redirectTo = undefined; + } + + /** + * @returns {Iterable} all owned exports in any order + */ + get ownedExports() { + return this._exports.values(); + } + + /** + * @returns {Iterable} all owned exports in order + */ + get orderedOwnedExports() { + if (!this._exportsAreOrdered) { + this._sortExports(); + } + return this._exports.values(); + } + + /** + * @returns {Iterable} all exports in any order + */ + get exports() { + if (this._redirectTo !== undefined) { + const map = new Map(this._redirectTo._exports); + for (const [key, value] of this._exports) { + map.set(key, value); + } + return map.values(); + } + return this._exports.values(); + } + + /** + * @returns {Iterable} all exports in order + */ + get orderedExports() { + if (!this._exportsAreOrdered) { + this._sortExports(); + } + if (this._redirectTo !== undefined) { + const map = new Map( + Array.from(this._redirectTo.orderedExports, item => [item.name, item]) + ); + for (const [key, value] of this._exports) { + map.set(key, value); + } + // sorting should be pretty fast as map contains + // a lot of presorted items + this._sortExportsMap(map); + return map.values(); + } + return this._exports.values(); + } + + /** + * @returns {ExportInfo} the export info of unlisted exports + */ + get otherExportsInfo() { + if (this._redirectTo !== undefined) + return this._redirectTo.otherExportsInfo; + return this._otherExportsInfo; + } + + _sortExportsMap(exports) { + if (exports.size > 1) { + const entriesInOrder = Array.from(exports.values()); + if ( + entriesInOrder.length !== 2 || + entriesInOrder[0].name > entriesInOrder[1].name + ) { + entriesInOrder.sort((a, b) => { + return a.name < b.name ? -1 : 1; + }); + exports.clear(); + for (const entry of entriesInOrder) { + exports.set(entry.name, entry); + } + } + } + } + + _sortExports() { + this._sortExportsMap(this._exports); + this._exportsAreOrdered = true; + } + + setRedirectNamedTo(exportsInfo) { + if (this._redirectTo === exportsInfo) return false; + this._redirectTo = exportsInfo; + return true; + } + + setHasProvideInfo() { + for (const exportInfo of this._exports.values()) { + if (exportInfo.provided === undefined) { + exportInfo.provided = false; + } + if (exportInfo.canMangleProvide === undefined) { + exportInfo.canMangleProvide = true; + } + } + if (this._redirectTo !== undefined) { + this._redirectTo.setHasProvideInfo(); + } else { + if (this._otherExportsInfo.provided === undefined) { + this._otherExportsInfo.provided = false; + } + if (this._otherExportsInfo.canMangleProvide === undefined) { + this._otherExportsInfo.canMangleProvide = true; + } + } + } + + setHasUseInfo() { + for (const exportInfo of this._exports.values()) { + exportInfo.setHasUseInfo(); + } + this._sideEffectsOnlyInfo.setHasUseInfo(); + if (this._redirectTo !== undefined) { + this._redirectTo.setHasUseInfo(); + } else { + this._otherExportsInfo.setHasUseInfo(); + if (this._otherExportsInfo.canMangleUse === undefined) { + this._otherExportsInfo.canMangleUse = true; + } + } + } + + /** + * @param {string} name export name + * @returns {ExportInfo} export info for this name + */ + getOwnExportInfo(name) { + const info = this._exports.get(name); + if (info !== undefined) return info; + const newInfo = new ExportInfo(name, this._otherExportsInfo); + this._exports.set(name, newInfo); + this._exportsAreOrdered = false; + return newInfo; + } + + /** + * @param {string} name export name + * @returns {ExportInfo} export info for this name + */ + getExportInfo(name) { + const info = this._exports.get(name); + if (info !== undefined) return info; + if (this._redirectTo !== undefined) + return this._redirectTo.getExportInfo(name); + const newInfo = new ExportInfo(name, this._otherExportsInfo); + this._exports.set(name, newInfo); + this._exportsAreOrdered = false; + return newInfo; + } + + /** + * @param {string} name export name + * @returns {ExportInfo} export info for this name + */ + getReadOnlyExportInfo(name) { + const info = this._exports.get(name); + if (info !== undefined) return info; + if (this._redirectTo !== undefined) + return this._redirectTo.getReadOnlyExportInfo(name); + return this._otherExportsInfo; + } + + /** + * @param {string[]} name export name + * @returns {ExportInfo | undefined} export info for this name + */ + getReadOnlyExportInfoRecursive(name) { + const exportInfo = this.getReadOnlyExportInfo(name[0]); + if (name.length === 1) return exportInfo; + if (!exportInfo.exportsInfo) return undefined; + return exportInfo.exportsInfo.getReadOnlyExportInfoRecursive(name.slice(1)); + } + + /** + * @param {string[]=} name the export name + * @returns {ExportsInfo | undefined} the nested exports info + */ + getNestedExportsInfo(name) { + if (Array.isArray(name) && name.length > 0) { + const info = this.getReadOnlyExportInfo(name[0]); + if (!info.exportsInfo) return undefined; + return info.exportsInfo.getNestedExportsInfo(name.slice(1)); + } + return this; + } + + /** + * @param {boolean=} canMangle true, if exports can still be mangled (defaults to false) + * @param {Set=} excludeExports list of unaffected exports + * @param {any=} targetKey use this as key for the target + * @param {ModuleGraphConnection=} targetModule set this module as target + * @returns {boolean} true, if this call changed something + */ + setUnknownExportsProvided( + canMangle, + excludeExports, + targetKey, + targetModule + ) { + let changed = false; + if (excludeExports) { + for (const name of excludeExports) { + // Make sure these entries exist, so they can get different info + this.getExportInfo(name); + } + } + for (const exportInfo of this._exports.values()) { + if (excludeExports && excludeExports.has(exportInfo.name)) continue; + if (exportInfo.provided !== true && exportInfo.provided !== null) { + exportInfo.provided = null; + changed = true; + } + if (!canMangle && exportInfo.canMangleProvide !== false) { + exportInfo.canMangleProvide = false; + changed = true; + } + if (targetKey) { + exportInfo.setTarget(targetKey, targetModule, [exportInfo.name]); + } + } + if (this._redirectTo !== undefined) { + if ( + this._redirectTo.setUnknownExportsProvided( + canMangle, + excludeExports, + targetKey, + targetModule + ) + ) { + changed = true; + } + } else { + if ( + this._otherExportsInfo.provided !== true && + this._otherExportsInfo.provided !== null + ) { + this._otherExportsInfo.provided = null; + changed = true; + } + if (!canMangle && this._otherExportsInfo.canMangleProvide !== false) { + this._otherExportsInfo.canMangleProvide = false; + changed = true; + } + if (targetKey) { + this._otherExportsInfo.setTarget(targetKey, targetModule, undefined); + } + } + return changed; + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true, when something changed + */ + setUsedInUnknownWay(runtime) { + let changed = false; + for (const exportInfo of this._exports.values()) { + if (exportInfo.setUsedInUnknownWay(runtime)) { + changed = true; + } + } + if (this._redirectTo !== undefined) { + if (this._redirectTo.setUsedInUnknownWay(runtime)) { + changed = true; + } + } else { + if ( + this._otherExportsInfo.setUsedConditionally( + used => used < UsageState.Unknown, + UsageState.Unknown, + runtime + ) + ) { + changed = true; + } + if (this._otherExportsInfo.canMangleUse !== false) { + this._otherExportsInfo.canMangleUse = false; + changed = true; + } + } + return changed; + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true, when something changed + */ + setUsedWithoutInfo(runtime) { + let changed = false; + for (const exportInfo of this._exports.values()) { + if (exportInfo.setUsedWithoutInfo(runtime)) { + changed = true; + } + } + if (this._redirectTo !== undefined) { + if (this._redirectTo.setUsedWithoutInfo(runtime)) { + changed = true; + } + } else { + if (this._otherExportsInfo.setUsed(UsageState.NoInfo, runtime)) { + changed = true; + } + if (this._otherExportsInfo.canMangleUse !== false) { + this._otherExportsInfo.canMangleUse = false; + changed = true; + } + } + return changed; + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true, when something changed + */ + setAllKnownExportsUsed(runtime) { + let changed = false; + for (const exportInfo of this._exports.values()) { + if (exportInfo.setUsed(UsageState.Used, runtime)) { + changed = true; + } + } + return changed; + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true, when something changed + */ + setUsedForSideEffectsOnly(runtime) { + return this._sideEffectsOnlyInfo.setUsedConditionally( + used => used === UsageState.Unused, + UsageState.Used, + runtime + ); + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true, when the module exports are used in any way + */ + isUsed(runtime) { + if (this._redirectTo !== undefined) { + if (this._redirectTo.isUsed(runtime)) { + return true; + } + } else { + if (this._otherExportsInfo.getUsed(runtime) !== UsageState.Unused) { + return true; + } + } + for (const exportInfo of this._exports.values()) { + if (exportInfo.getUsed(runtime) !== UsageState.Unused) { + return true; + } + } + return false; + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true, when the module is used in any way + */ + isModuleUsed(runtime) { + if (this.isUsed(runtime)) return true; + if (this._sideEffectsOnlyInfo.getUsed(runtime) !== UsageState.Unused) + return true; + return false; + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {SortableSet | boolean | null} set of used exports, or true (when namespace object is used), or false (when unused), or null (when unknown) + */ + getUsedExports(runtime) { + if (!this._redirectTo !== undefined) { + switch (this._otherExportsInfo.getUsed(runtime)) { + case UsageState.NoInfo: + return null; + case UsageState.Unknown: + return true; + case UsageState.OnlyPropertiesUsed: + case UsageState.Used: + return true; + } + } + const array = []; + if (!this._exportsAreOrdered) this._sortExports(); + for (const exportInfo of this._exports.values()) { + switch (exportInfo.getUsed(runtime)) { + case UsageState.NoInfo: + return null; + case UsageState.Unknown: + return true; + case UsageState.OnlyPropertiesUsed: + case UsageState.Used: + array.push(exportInfo.name); + } + } + if (this._redirectTo !== undefined) { + const inner = this._redirectTo.getUsedExports(runtime); + if (inner === null) return null; + if (inner === true) return true; + if (inner !== false) { + for (const item of inner) { + array.push(item); + } + } + } + if (array.length === 0) { + switch (this._sideEffectsOnlyInfo.getUsed(runtime)) { + case UsageState.NoInfo: + return null; + case UsageState.Unused: + return false; + } + } + return new SortableSet(array); + } + + /** + * @returns {null | true | string[]} list of exports when known + */ + getProvidedExports() { + if (!this._redirectTo !== undefined) { + switch (this._otherExportsInfo.provided) { + case undefined: + return null; + case null: + return true; + case true: + return true; + } + } + const array = []; + if (!this._exportsAreOrdered) this._sortExports(); + for (const exportInfo of this._exports.values()) { + switch (exportInfo.provided) { + case undefined: + return null; + case null: + return true; + case true: + array.push(exportInfo.name); + } + } + if (this._redirectTo !== undefined) { + const inner = this._redirectTo.getProvidedExports(); + if (inner === null) return null; + if (inner === true) return true; + for (const item of inner) { + if (!array.includes(item)) { + array.push(item); + } + } + } + return array; + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {ExportInfo[]} exports that are relevant (not unused and potential provided) + */ + getRelevantExports(runtime) { + const list = []; + for (const exportInfo of this._exports.values()) { + const used = exportInfo.getUsed(runtime); + if (used === UsageState.Unused) continue; + if (exportInfo.provided === false) continue; + list.push(exportInfo); + } + if (this._redirectTo !== undefined) { + for (const exportInfo of this._redirectTo.getRelevantExports(runtime)) { + if (!this._exports.has(exportInfo.name)) list.push(exportInfo); + } + } + if ( + this._otherExportsInfo.provided !== false && + this._otherExportsInfo.getUsed(runtime) !== UsageState.Unused + ) { + list.push(this._otherExportsInfo); + } + return list; + } + + /** + * @param {string | string[]} name the name of the export + * @returns {boolean | undefined | null} if the export is provided + */ + isExportProvided(name) { + if (Array.isArray(name)) { + const info = this.getReadOnlyExportInfo(name[0]); + if (info.exportsInfo && name.length > 1) { + return info.exportsInfo.isExportProvided(name.slice(1)); + } + return info.provided; + } + const info = this.getReadOnlyExportInfo(name); + return info.provided; + } + + /** + * @param {RuntimeSpec} runtime runtime + * @returns {string} key representing the usage + */ + getUsageKey(runtime) { + const key = []; + if (this._redirectTo !== undefined) { + key.push(this._redirectTo.getUsageKey(runtime)); + } else { + key.push(this._otherExportsInfo.getUsed(runtime)); + } + key.push(this._sideEffectsOnlyInfo.getUsed(runtime)); + for (const exportInfo of this.orderedOwnedExports) { + key.push(exportInfo.getUsed(runtime)); + } + return key.join("|"); + } + + /** + * @param {RuntimeSpec} runtimeA first runtime + * @param {RuntimeSpec} runtimeB second runtime + * @returns {boolean} true, when equally used + */ + isEquallyUsed(runtimeA, runtimeB) { + if (this._redirectTo !== undefined) { + if (!this._redirectTo.isEquallyUsed(runtimeA, runtimeB)) return false; + } else { + if ( + this._otherExportsInfo.getUsed(runtimeA) !== + this._otherExportsInfo.getUsed(runtimeB) + ) { + return false; + } + } + if ( + this._sideEffectsOnlyInfo.getUsed(runtimeA) !== + this._sideEffectsOnlyInfo.getUsed(runtimeB) + ) { + return false; + } + for (const exportInfo of this.ownedExports) { + if (exportInfo.getUsed(runtimeA) !== exportInfo.getUsed(runtimeB)) + return false; + } + return true; + } + + /** + * @param {string | string[]} name export name + * @param {RuntimeSpec} runtime check usage for this runtime only + * @returns {UsageStateType} usage status + */ + getUsed(name, runtime) { + if (Array.isArray(name)) { + if (name.length === 0) return this.otherExportsInfo.getUsed(runtime); + let info = this.getReadOnlyExportInfo(name[0]); + if (info.exportsInfo && name.length > 1) { + return info.exportsInfo.getUsed(name.slice(1), runtime); + } + return info.getUsed(runtime); + } + let info = this.getReadOnlyExportInfo(name); + return info.getUsed(runtime); + } + + /** + * @param {string | string[]} name the export name + * @param {RuntimeSpec} runtime check usage for this runtime only + * @returns {string | string[] | false} the used name + */ + getUsedName(name, runtime) { + if (Array.isArray(name)) { + // TODO improve this + if (name.length === 0) { + if (!this.isUsed(runtime)) return false; + return name; + } + let info = this.getReadOnlyExportInfo(name[0]); + const x = info.getUsedName(name[0], runtime); + if (x === false) return false; + const arr = x === name[0] && name.length === 1 ? name : [x]; + if (name.length === 1) { + return arr; + } + if ( + info.exportsInfo && + info.getUsed(runtime) === UsageState.OnlyPropertiesUsed + ) { + const nested = info.exportsInfo.getUsedName(name.slice(1), runtime); + if (!nested) return false; + return arr.concat(nested); + } else { + return arr.concat(name.slice(1)); + } + } else { + let info = this.getReadOnlyExportInfo(name); + const usedName = info.getUsedName(name, runtime); + return usedName; + } + } + + /** + * @param {Hash} hash the hash + * @param {RuntimeSpec} runtime the runtime + * @returns {void} + */ + updateHash(hash, runtime) { + for (const exportInfo of this.orderedExports) { + if (exportInfo.hasInfo(this._otherExportsInfo, runtime)) { + exportInfo.updateHash(hash, runtime); + } + } + this._sideEffectsOnlyInfo.updateHash(hash, runtime); + this._otherExportsInfo.updateHash(hash, runtime); + if (this._redirectTo !== undefined) { + this._redirectTo.updateHash(hash, runtime); + } + } + + getRestoreProvidedData() { + const otherProvided = this._otherExportsInfo.provided; + const otherCanMangleProvide = this._otherExportsInfo.canMangleProvide; + const otherTerminalBinding = this._otherExportsInfo.terminalBinding; + const exports = []; + for (const exportInfo of this._exports.values()) { + if ( + exportInfo.provided !== otherProvided || + exportInfo.canMangleProvide !== otherCanMangleProvide || + exportInfo.terminalBinding !== otherTerminalBinding || + exportInfo.exportsInfoOwned + ) { + exports.push({ + name: exportInfo.name, + provided: exportInfo.provided, + canMangleProvide: exportInfo.canMangleProvide, + terminalBinding: exportInfo.terminalBinding, + exportsInfo: exportInfo.exportsInfoOwned + ? exportInfo.exportsInfo.getRestoreProvidedData() + : undefined + }); + } + } + return new RestoreProvidedData( + exports, + otherProvided, + otherCanMangleProvide, + otherTerminalBinding + ); + } + + restoreProvided({ + otherProvided, + otherCanMangleProvide, + otherTerminalBinding, + exports + }) { + for (const exportInfo of this._exports.values()) { + exportInfo.provided = otherProvided; + exportInfo.canMangleProvide = otherCanMangleProvide; + exportInfo.terminalBinding = otherTerminalBinding; + } + this._otherExportsInfo.provided = otherProvided; + this._otherExportsInfo.canMangleProvide = otherCanMangleProvide; + this._otherExportsInfo.terminalBinding = otherTerminalBinding; + for (const exp of exports) { + const exportInfo = this.getExportInfo(exp.name); + exportInfo.provided = exp.provided; + exportInfo.canMangleProvide = exp.canMangleProvide; + exportInfo.terminalBinding = exp.terminalBinding; + if (exp.exportsInfo) { + const exportsInfo = exportInfo.createNestedExportsInfo(); + exportsInfo.restoreProvided(exp.exportsInfo); + } + } + } +} + +class ExportInfo { + /** + * @param {string} name the original name of the export + * @param {ExportInfo=} initFrom init values from this ExportInfo + */ + constructor(name, initFrom) { + /** @type {string} */ + this.name = name; + /** @private @type {string | null} */ + this._usedName = initFrom ? initFrom._usedName : null; + /** @private @type {UsageStateType} */ + this._globalUsed = initFrom ? initFrom._globalUsed : undefined; + /** @private @type {Map} */ + this._usedInRuntime = + initFrom && initFrom._usedInRuntime + ? new Map(initFrom._usedInRuntime) + : undefined; + /** @private @type {boolean} */ + this._hasUseInRuntimeInfo = initFrom + ? initFrom._hasUseInRuntimeInfo + : false; + /** + * true: it is provided + * false: it is not provided + * null: only the runtime knows if it is provided + * undefined: it was not determined if it is provided + * @type {boolean | null | undefined} + */ + this.provided = initFrom ? initFrom.provided : undefined; + /** + * is the export a terminal binding that should be checked for export star conflicts + * @type {boolean} + */ + this.terminalBinding = initFrom ? initFrom.terminalBinding : false; + /** + * true: it can be mangled + * false: is can not be mangled + * undefined: it was not determined if it can be mangled + * @type {boolean | undefined} + */ + this.canMangleProvide = initFrom ? initFrom.canMangleProvide : undefined; + /** + * true: it can be mangled + * false: is can not be mangled + * undefined: it was not determined if it can be mangled + * @type {boolean | undefined} + */ + this.canMangleUse = initFrom ? initFrom.canMangleUse : undefined; + /** @type {boolean} */ + this.exportsInfoOwned = false; + /** @type {ExportsInfo=} */ + this.exportsInfo = undefined; + /** @type {Map=} */ + this._target = undefined; + if (initFrom && initFrom._target) { + this._target = new Map(); + for (const [key, value] of initFrom._target) { + this._target.set( + key, + value ? { connection: value.connection, export: [name] } : null + ); + } + } + } + + // TODO webpack 5 remove + /** @private */ + get used() { + throw new Error("REMOVED"); + } + /** @private */ + get usedName() { + throw new Error("REMOVED"); + } + /** + * @private + * @param {*} v v + */ + set used(v) { + throw new Error("REMOVED"); + } + /** + * @private + * @param {*} v v + */ + set usedName(v) { + throw new Error("REMOVED"); + } + + get canMangle() { + switch (this.canMangleProvide) { + case undefined: + return this.canMangleUse === false ? false : undefined; + case false: + return false; + case true: + switch (this.canMangleUse) { + case undefined: + return undefined; + case false: + return false; + case true: + return true; + } + } + throw new Error( + `Unexpected flags for canMangle ${this.canMangleProvide} ${this.canMangleUse}` + ); + } + + /** + * @param {RuntimeSpec} runtime only apply to this runtime + * @returns {boolean} true, when something changed + */ + setUsedInUnknownWay(runtime) { + let changed = false; + if ( + this.setUsedConditionally( + used => used < UsageState.Unknown, + UsageState.Unknown, + runtime + ) + ) { + changed = true; + } + if (this.canMangleUse !== false) { + this.canMangleUse = false; + changed = true; + } + return changed; + } + + /** + * @param {RuntimeSpec} runtime only apply to this runtime + * @returns {boolean} true, when something changed + */ + setUsedWithoutInfo(runtime) { + let changed = false; + if (this.setUsed(UsageState.NoInfo, runtime)) { + changed = true; + } + if (this.canMangleUse !== false) { + this.canMangleUse = false; + changed = true; + } + return changed; + } + + setHasUseInfo() { + if (!this._hasUseInRuntimeInfo) { + this._hasUseInRuntimeInfo = true; + } + if (this.canMangleUse === undefined) { + this.canMangleUse = true; + } + if (this.exportsInfoOwned) { + this.exportsInfo.setHasUseInfo(); + } + } + + /** + * @param {function(UsageStateType): boolean} condition compare with old value + * @param {UsageStateType} newValue set when condition is true + * @param {RuntimeSpec} runtime only apply to this runtime + * @returns {boolean} true when something has changed + */ + setUsedConditionally(condition, newValue, runtime) { + if (runtime === undefined) { + if (this._globalUsed === undefined) { + this._globalUsed = newValue; + return true; + } else { + if (this._globalUsed !== newValue && condition(this._globalUsed)) { + this._globalUsed = newValue; + return true; + } + } + } else if (this._usedInRuntime === undefined) { + if (newValue !== UsageState.Unused && condition(UsageState.Unused)) { + this._usedInRuntime = new Map(); + forEachRuntime(runtime, runtime => + this._usedInRuntime.set(runtime, newValue) + ); + return true; + } + } else { + let changed = false; + forEachRuntime(runtime, runtime => { + /** @type {UsageStateType} */ + let oldValue = this._usedInRuntime.get(runtime); + if (oldValue === undefined) oldValue = UsageState.Unused; + if (newValue !== oldValue && condition(oldValue)) { + if (newValue === UsageState.Unused) { + this._usedInRuntime.delete(runtime); + } else { + this._usedInRuntime.set(runtime, newValue); + } + changed = true; + } + }); + if (changed) { + if (this._usedInRuntime.size === 0) this._usedInRuntime = undefined; + return true; + } + } + return false; + } + + /** + * @param {UsageStateType} newValue new value of the used state + * @param {RuntimeSpec} runtime only apply to this runtime + * @returns {boolean} true when something has changed + */ + setUsed(newValue, runtime) { + if (runtime === undefined) { + if (this._globalUsed !== newValue) { + this._globalUsed = newValue; + return true; + } + } else if (this._usedInRuntime === undefined) { + if (newValue !== UsageState.Unused) { + this._usedInRuntime = new Map(); + forEachRuntime(runtime, runtime => + this._usedInRuntime.set(runtime, newValue) + ); + return true; + } + } else { + let changed = false; + forEachRuntime(runtime, runtime => { + /** @type {UsageStateType} */ + let oldValue = this._usedInRuntime.get(runtime); + if (oldValue === undefined) oldValue = UsageState.Unused; + if (newValue !== oldValue) { + if (newValue === UsageState.Unused) { + this._usedInRuntime.delete(runtime); + } else { + this._usedInRuntime.set(runtime, newValue); + } + changed = true; + } + }); + if (changed) { + if (this._usedInRuntime.size === 0) this._usedInRuntime = undefined; + return true; + } + } + return false; + } + + /** + * @param {any} key the key + * @param {ModuleGraphConnection=} connection the target module if a single one + * @param {string[]=} exportName the exported name + * @returns {boolean} true, if something has changed + */ + setTarget(key, connection, exportName) { + if (exportName) exportName = [...exportName]; + if (!this._target) { + this._target = new Map(); + this._target.set( + key, + connection ? { connection, export: exportName } : null + ); + return true; + } + const oldTarget = this._target.get(key); + if (!oldTarget) { + if (oldTarget === null && !connection) return false; + this._target.set( + key, + connection ? { connection, export: exportName } : null + ); + return true; + } + if (!connection) { + this._target.set(key, null); + return true; + } + if ( + oldTarget.connection !== connection || + (exportName + ? !oldTarget.export || !equals(oldTarget.export, exportName) + : oldTarget.export) + ) { + oldTarget.connection = connection; + oldTarget.export = exportName; + return true; + } + return false; + } + + /** + * @param {RuntimeSpec} runtime for this runtime + * @returns {UsageStateType} usage state + */ + getUsed(runtime) { + if (!this._hasUseInRuntimeInfo) return UsageState.NoInfo; + if (this._globalUsed !== undefined) return this._globalUsed; + if (this._usedInRuntime === undefined) { + return UsageState.Unused; + } else if (typeof runtime === "string") { + const value = this._usedInRuntime.get(runtime); + return value === undefined ? UsageState.Unused : value; + } else if (runtime === undefined) { + /** @type {UsageStateType} */ + let max = UsageState.Unused; + for (const value of this._usedInRuntime.values()) { + if (value === UsageState.Used) { + return UsageState.Used; + } + if (max < value) max = value; + } + return max; + } else { + /** @type {UsageStateType} */ + let max = UsageState.Unused; + for (const item of runtime) { + const value = this._usedInRuntime.get(item); + if (value !== undefined) { + if (value === UsageState.Used) { + return UsageState.Used; + } + if (max < value) max = value; + } + } + return max; + } + } + + /** + * get used name + * @param {string | undefined} fallbackName fallback name for used exports with no name + * @param {RuntimeSpec} runtime check usage for this runtime only + * @returns {string | false} used name + */ + getUsedName(fallbackName, runtime) { + if (this._hasUseInRuntimeInfo) { + if (this._globalUsed !== undefined) { + if (this._globalUsed === UsageState.Unused) return false; + } else { + if (this._usedInRuntime === undefined) return false; + if (typeof runtime === "string") { + if (!this._usedInRuntime.has(runtime)) { + return false; + } + } else if (runtime !== undefined) { + if ( + Array.from(runtime).every( + runtime => !this._usedInRuntime.has(runtime) + ) + ) { + return false; + } + } + } + } + if (this._usedName !== null) return this._usedName; + return this.name || fallbackName; + } + + /** + * @returns {boolean} true, when a mangled name of this export is set + */ + hasUsedName() { + return this._usedName !== null; + } + + /** + * Sets the mangled name of this export + * @param {string} name the new name + * @returns {void} + */ + setUsedName(name) { + this._usedName = name; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {function({ module: Module, export: string[] | undefined }): boolean} resolveTargetFilter filter function to further resolve target + * @returns {ExportInfo | ExportsInfo | undefined} the terminal binding export(s) info if known + */ + getTerminalBinding(moduleGraph, resolveTargetFilter = RETURNS_TRUE) { + if (this.terminalBinding) return this; + const target = this.getTarget(moduleGraph, resolveTargetFilter); + if (!target) return undefined; + const exportsInfo = moduleGraph.getExportsInfo(target.module); + if (!target.export) return exportsInfo; + return exportsInfo.getReadOnlyExportInfoRecursive(target.export); + } + + isReexport() { + return !this.terminalBinding && this._target && this._target.size > 0; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {function(Module): boolean} validTargetModuleFilter a valid target module + * @returns {{ module: Module, export: string[] | undefined } | undefined | false} the target, undefined when there is no target, false when no target is valid + */ + findTarget(moduleGraph, validTargetModuleFilter) { + return this._findTarget(moduleGraph, validTargetModuleFilter, new Set()); + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {function(Module): boolean} validTargetModuleFilter a valid target module + * @param {Set | undefined} alreadyVisited set of already visited export info to avoid circular references + * @returns {{ module: Module, export: string[] | undefined } | undefined | false} the target, undefined when there is no target, false when no target is valid + */ + _findTarget(moduleGraph, validTargetModuleFilter, alreadyVisited) { + if (!this._target || this._target.size === 0) return undefined; + let rawTarget = this._target.values().next().value; + if (!rawTarget) return undefined; + /** @type {{ module: Module, export: string[] | undefined }} */ + let target = { + module: rawTarget.connection.module, + export: rawTarget.export + }; + for (;;) { + if (validTargetModuleFilter(target.module)) return target; + const exportsInfo = moduleGraph.getExportsInfo(target.module); + const exportInfo = exportsInfo.getExportInfo(target.export[0]); + if (alreadyVisited.has(exportInfo)) return null; + const newTarget = exportInfo._findTarget( + moduleGraph, + validTargetModuleFilter, + alreadyVisited + ); + if (!newTarget) return false; + if (target.export.length === 1) { + target = newTarget; + } else { + target = { + module: newTarget.module, + export: newTarget.export + ? newTarget.export.concat(target.export.slice(1)) + : target.export.slice(1) + }; + } + } + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {function({ module: Module, export: string[] | undefined }): boolean} resolveTargetFilter filter function to further resolve target + * @returns {{ module: Module, export: string[] | undefined } | undefined} the target + */ + getTarget(moduleGraph, resolveTargetFilter = RETURNS_TRUE) { + const result = this._getTarget(moduleGraph, resolveTargetFilter, undefined); + if (result === CIRCULAR) return undefined; + return result; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {function({ module: Module, export: string[] | undefined }): boolean} resolveTargetFilter filter function to further resolve target + * @param {Set | undefined} alreadyVisited set of already visited export info to avoid circular references + * @returns {{ module: Module, connection: ModuleGraphConnection, export: string[] | undefined } | CIRCULAR | undefined} the target + */ + _getTarget(moduleGraph, resolveTargetFilter, alreadyVisited) { + /** + * @param {{ connection: ModuleGraphConnection, export: string[] | undefined } | null} inputTarget unresolved target + * @param {Set} alreadyVisited set of already visited export info to avoid circular references + * @returns {{ module: Module, connection: ModuleGraphConnection, export: string[] | undefined } | CIRCULAR | null} resolved target + */ + const resolveTarget = (inputTarget, alreadyVisited) => { + if (!inputTarget) return null; + if (!inputTarget.export) { + return { + module: inputTarget.connection.module, + connection: inputTarget.connection, + export: undefined + }; + } + /** @type {{ module: Module, connection: ModuleGraphConnection, export: string[] | undefined }} */ + let target = { + module: inputTarget.connection.module, + connection: inputTarget.connection, + export: inputTarget.export + }; + if (!resolveTargetFilter(target)) return target; + let alreadyVisitedOwned = false; + for (;;) { + const exportsInfo = moduleGraph.getExportsInfo(target.module); + const exportInfo = exportsInfo.getExportInfo(target.export[0]); + if (!exportInfo) return target; + if (alreadyVisited.has(exportInfo)) return CIRCULAR; + const newTarget = exportInfo._getTarget( + moduleGraph, + resolveTargetFilter, + alreadyVisited + ); + if (newTarget === CIRCULAR) return CIRCULAR; + if (!newTarget) return target; + if (target.export.length === 1) { + target = newTarget; + if (!target.export) return target; + } else { + target = { + module: newTarget.module, + connection: newTarget.connection, + export: newTarget.export + ? newTarget.export.concat(target.export.slice(1)) + : target.export.slice(1) + }; + } + if (!resolveTargetFilter(target)) return target; + if (!alreadyVisitedOwned) { + alreadyVisited = new Set(alreadyVisited); + alreadyVisitedOwned = true; + } + alreadyVisited.add(exportInfo); + } + }; + + if (!this._target || this._target.size === 0) return undefined; + if (alreadyVisited && alreadyVisited.has(this)) return CIRCULAR; + const newAlreadyVisited = new Set(alreadyVisited); + newAlreadyVisited.add(this); + const values = this._target.values(); + const target = resolveTarget(values.next().value, newAlreadyVisited); + if (target === CIRCULAR) return CIRCULAR; + if (target === null) return undefined; + if (this._target.size === 1) { + return target; + } + let result = values.next(); + while (!result.done) { + const t = resolveTarget(result.value, newAlreadyVisited); + if (t === CIRCULAR) return CIRCULAR; + if (t === null) return undefined; + if (t.module !== target.module) return undefined; + if (!t.export !== !target.export) return undefined; + if (target.export && !equals(t.export, target.export)) return undefined; + result = values.next(); + } + return target; + } + + /** + * Move the target forward as long resolveTargetFilter is fulfilled + * @param {ModuleGraph} moduleGraph the module graph + * @param {function({ module: Module, export: string[] | undefined }): boolean} resolveTargetFilter filter function to further resolve target + * @returns {{ module: Module, export: string[] | undefined } | undefined} the target + */ + moveTarget(moduleGraph, resolveTargetFilter) { + const target = this._getTarget(moduleGraph, resolveTargetFilter, undefined); + if (target === CIRCULAR) return undefined; + if (!target) return undefined; + this._target.clear(); + this._target.set(undefined, { + connection: target.connection, + export: target.export + }); + return target; + } + + createNestedExportsInfo() { + if (this.exportsInfoOwned) return this.exportsInfo; + this.exportsInfoOwned = true; + const oldExportsInfo = this.exportsInfo; + this.exportsInfo = new ExportsInfo(); + this.exportsInfo.setHasProvideInfo(); + if (oldExportsInfo) { + this.exportsInfo.setRedirectNamedTo(oldExportsInfo); + } + return this.exportsInfo; + } + + getNestedExportsInfo() { + return this.exportsInfo; + } + + hasInfo(baseInfo, runtime) { + return ( + (this._usedName && this._usedName !== this.name) || + this.provided || + this.terminalBinding || + this.getUsed(runtime) !== baseInfo.getUsed(runtime) + ); + } + + updateHash(hash, runtime) { + hash.update(`${this._usedName || this.name}`); + hash.update(`${this.getUsed(runtime)}`); + hash.update(`${this.provided}`); + hash.update(`${this.terminalBinding}`); + } + + getUsedInfo() { + if (this._globalUsed !== undefined) { + switch (this._globalUsed) { + case UsageState.Unused: + return "unused"; + case UsageState.NoInfo: + return "no usage info"; + case UsageState.Unknown: + return "maybe used (runtime-defined)"; + case UsageState.Used: + return "used"; + case UsageState.OnlyPropertiesUsed: + return "only properties used"; + } + } else if (this._usedInRuntime !== undefined) { + /** @type {Map} */ + const map = new Map(); + for (const [runtime, used] of this._usedInRuntime) { + const list = map.get(used); + if (list !== undefined) list.push(runtime); + else map.set(used, [runtime]); + } + const specificInfo = Array.from(map, ([used, runtimes]) => { + switch (used) { + case UsageState.NoInfo: + return `no usage info in ${runtimes.join(", ")}`; + case UsageState.Unknown: + return `maybe used in ${runtimes.join(", ")} (runtime-defined)`; + case UsageState.Used: + return `used in ${runtimes.join(", ")}`; + case UsageState.OnlyPropertiesUsed: + return `only properties used in ${runtimes.join(", ")}`; + } + }); + if (specificInfo.length > 0) { + return specificInfo.join("; "); + } + } + return this._hasUseInRuntimeInfo ? "unused" : "no usage info"; + } + + getProvidedInfo() { + switch (this.provided) { + case undefined: + return "no provided info"; + case null: + return "maybe provided (runtime-defined)"; + case true: + return "provided"; + case false: + return "not provided"; + } + } + + getRenameInfo() { + if (this._usedName !== null && this._usedName !== this.name) { + return `renamed to ${JSON.stringify(this._usedName).slice(1, -1)}`; + } + switch (this.canMangleProvide) { + case undefined: + switch (this.canMangleUse) { + case undefined: + return "missing provision and use info prevents renaming"; + case false: + return "usage prevents renaming (no provision info)"; + case true: + return "missing provision info prevents renaming"; + } + break; + case true: + switch (this.canMangleUse) { + case undefined: + return "missing usage info prevents renaming"; + case false: + return "usage prevents renaming"; + case true: + return "could be renamed"; + } + break; + case false: + switch (this.canMangleUse) { + case undefined: + return "provision prevents renaming (no use info)"; + case false: + return "usage and provision prevents renaming"; + case true: + return "provision prevents renaming"; + } + break; + } + throw new Error( + `Unexpected flags for getRenameInfo ${this.canMangleProvide} ${this.canMangleUse}` + ); + } +} + +module.exports = ExportsInfo; +module.exports.ExportInfo = ExportInfo; +module.exports.UsageState = UsageState; + + +/***/ }), + +/***/ 71406: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ConstDependency = __webpack_require__(9364); +const ExportsInfoDependency = __webpack_require__(37826); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */ + +class ExportsInfoApiPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "ExportsInfoApiPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyTemplates.set( + ExportsInfoDependency, + new ExportsInfoDependency.Template() + ); + /** + * @param {JavascriptParser} parser the parser + * @returns {void} + */ + const handler = parser => { + parser.hooks.expressionMemberChain + .for("__webpack_exports_info__") + .tap("ExportsInfoApiPlugin", (expr, members) => { + const dep = + members.length >= 2 + ? new ExportsInfoDependency( + expr.range, + members.slice(0, -1), + members[members.length - 1] + ) + : new ExportsInfoDependency(expr.range, null, members[0]); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return true; + }); + parser.hooks.expression + .for("__webpack_exports_info__") + .tap("ExportsInfoApiPlugin", expr => { + const dep = new ConstDependency("true", expr.range); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + }; + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("ExportsInfoApiPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("ExportsInfoApiPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("ExportsInfoApiPlugin", handler); + } + ); + } +} + +module.exports = ExportsInfoApiPlugin; + + +/***/ }), + +/***/ 24334: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { OriginalSource, RawSource } = __webpack_require__(55600); +const ConcatenationScope = __webpack_require__(21926); +const Module = __webpack_require__(54031); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const StaticExportsDependency = __webpack_require__(68372); +const extractUrlAndGlobal = __webpack_require__(33339); +const makeSerializable = __webpack_require__(55575); +const propertyAccess = __webpack_require__(44682); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("./Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ +/** @typedef {import("./Module").LibIdentOptions} LibIdentOptions */ +/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./util/Hash")} Hash */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ + +/** + * @typedef {Object} SourceData + * @property {boolean=} iife + * @property {string=} init + * @property {string} expression + */ + +/** + * @param {string|string[]} variableName the variable name or path + * @param {string} type the module system + * @returns {SourceData} the generated source + */ +const getSourceForGlobalVariableExternal = (variableName, type) => { + if (!Array.isArray(variableName)) { + // make it an array as the look up works the same basically + variableName = [variableName]; + } + + // needed for e.g. window["some"]["thing"] + const objectLookup = variableName.map(r => `[${JSON.stringify(r)}]`).join(""); + return { + iife: type === "this", + expression: `${type}${objectLookup}` + }; +}; + +/** + * @param {string|string[]} moduleAndSpecifiers the module request + * @returns {SourceData} the generated source + */ +const getSourceForCommonJsExternal = moduleAndSpecifiers => { + if (!Array.isArray(moduleAndSpecifiers)) { + return { + expression: `require(${JSON.stringify(moduleAndSpecifiers)});` + }; + } + const moduleName = moduleAndSpecifiers[0]; + return { + expression: `require(${JSON.stringify(moduleName)})${propertyAccess( + moduleAndSpecifiers, + 1 + )};` + }; +}; + +/** + * @param {string|string[]} moduleAndSpecifiers the module request + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @returns {SourceData} the generated source + */ +const getSourceForImportExternal = (moduleAndSpecifiers, runtimeTemplate) => { + const importName = runtimeTemplate.outputOptions.importFunctionName; + if (!runtimeTemplate.supportsDynamicImport() && importName === "import") { + throw new Error( + "The target environment doesn't support 'import()' so it's not possible to use external type 'import'" + ); + } + if (!Array.isArray(moduleAndSpecifiers)) { + return { + expression: `${importName}(${JSON.stringify(moduleAndSpecifiers)});` + }; + } + if (moduleAndSpecifiers.length === 1) { + return { + expression: `${importName}(${JSON.stringify(moduleAndSpecifiers[0])});` + }; + } + const moduleName = moduleAndSpecifiers[0]; + return { + expression: `${importName}(${JSON.stringify( + moduleName + )}).then(${runtimeTemplate.returningFunction( + `module${propertyAccess(moduleAndSpecifiers, 1)}`, + "module" + )});` + }; +}; + +/** + * @param {string|string[]} urlAndGlobal the script request + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @returns {SourceData} the generated source + */ +const getSourceForScriptExternal = (urlAndGlobal, runtimeTemplate) => { + if (typeof urlAndGlobal === "string") { + urlAndGlobal = extractUrlAndGlobal(urlAndGlobal); + } + const url = urlAndGlobal[0]; + const globalName = urlAndGlobal[1]; + return { + init: "var error = new Error();", + expression: `new Promise(${runtimeTemplate.basicFunction( + "resolve, reject", + [ + `if(typeof ${globalName} !== "undefined") return resolve();`, + `${RuntimeGlobals.loadScript}(${JSON.stringify( + url + )}, ${runtimeTemplate.basicFunction("event", [ + `if(typeof ${globalName} !== "undefined") return resolve();`, + "var errorType = event && (event.type === 'load' ? 'missing' : event.type);", + "var realSrc = event && event.target && event.target.src;", + "error.message = 'Loading script failed.\\n(' + errorType + ': ' + realSrc + ')';", + "error.name = 'ScriptExternalLoadError';", + "error.type = errorType;", + "error.request = realSrc;", + "reject(error);" + ])}, ${JSON.stringify(globalName)});` + ] + )}).then(${runtimeTemplate.returningFunction( + `${globalName}${propertyAccess(urlAndGlobal, 2)}` + )})` + }; +}; + +/** + * @param {string} variableName the variable name to check + * @param {string} request the request path + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @returns {string} the generated source + */ +const checkExternalVariable = (variableName, request, runtimeTemplate) => { + return `if(typeof ${variableName} === 'undefined') { ${runtimeTemplate.throwMissingModuleErrorBlock( + { request } + )} }\n`; +}; + +/** + * @param {string|number} id the module id + * @param {boolean} optional true, if the module is optional + * @param {string|string[]} request the request path + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @returns {SourceData} the generated source + */ +const getSourceForAmdOrUmdExternal = ( + id, + optional, + request, + runtimeTemplate +) => { + const externalVariable = `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier( + `${id}` + )}__`; + return { + init: optional + ? checkExternalVariable( + externalVariable, + Array.isArray(request) ? request.join(".") : request, + runtimeTemplate + ) + : undefined, + expression: externalVariable + }; +}; + +/** + * @param {boolean} optional true, if the module is optional + * @param {string|string[]} request the request path + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @returns {SourceData} the generated source + */ +const getSourceForDefaultCase = (optional, request, runtimeTemplate) => { + if (!Array.isArray(request)) { + // make it an array as the look up works the same basically + request = [request]; + } + + const variableName = request[0]; + const objectLookup = propertyAccess(request, 1); + return { + init: optional + ? checkExternalVariable(variableName, request.join("."), runtimeTemplate) + : undefined, + expression: `${variableName}${objectLookup}` + }; +}; + +const TYPES = new Set(["javascript"]); +const RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]); +const RUNTIME_REQUIREMENTS_FOR_SCRIPT = new Set([ + RuntimeGlobals.module, + RuntimeGlobals.loadScript +]); +const RUNTIME_REQUIREMENTS_CONCATENATED = new Set([]); + +class ExternalModule extends Module { + constructor(request, type, userRequest) { + super("javascript/dynamic", null); + + // Info from Factory + /** @type {string | string[] | Record} */ + this.request = request; + /** @type {string} */ + this.externalType = type; + /** @type {string} */ + this.userRequest = userRequest; + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + return this.userRequest; + } + + /** + * @param {Chunk} chunk the chunk which condition should be checked + * @param {Compilation} compilation the compilation + * @returns {boolean} true, if the chunk is ok for the module + */ + chunkCondition(chunk, { chunkGraph }) { + return chunkGraph.getNumberOfEntryModules(chunk) > 0; + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return "external " + JSON.stringify(this.request); + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return "external " + JSON.stringify(this.request); + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + return callback(null, !this.buildMeta); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this.buildMeta = { + async: false, + exportsType: undefined + }; + this.buildInfo = { + strict: this.externalType !== "this" + }; + this.buildMeta.exportsType = "dynamic"; + let canMangle = false; + this.clearDependenciesAndBlocks(); + switch (this.externalType) { + case "system": + if (!Array.isArray(this.request) || this.request.length === 1) { + this.buildMeta.exportsType = "namespace"; + canMangle = true; + } + break; + case "promise": + this.buildMeta.async = true; + break; + case "import": + this.buildMeta.async = true; + if (!Array.isArray(this.request) || this.request.length === 1) { + this.buildMeta.exportsType = "namespace"; + canMangle = false; + } + break; + case "script": + this.buildMeta.async = true; + break; + } + this.addDependency(new StaticExportsDependency(true, canMangle)); + callback(); + } + + /** + * @param {ConcatenationBailoutReasonContext} context context + * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated + */ + getConcatenationBailoutReason({ moduleGraph }) { + switch (this.externalType) { + case "amd": + case "amd-require": + case "umd": + case "umd2": + case "system": + case "jsonp": + return `${this.externalType} externals can't be concatenated`; + } + return undefined; + } + + getSourceData(runtimeTemplate, moduleGraph, chunkGraph) { + const request = + typeof this.request === "object" && !Array.isArray(this.request) + ? this.request[this.externalType] + : this.request; + switch (this.externalType) { + case "this": + case "window": + case "self": + return getSourceForGlobalVariableExternal(request, this.externalType); + case "global": + return getSourceForGlobalVariableExternal( + request, + runtimeTemplate.outputOptions.globalObject + ); + case "commonjs": + case "commonjs2": + case "commonjs-module": + return getSourceForCommonJsExternal(request); + case "amd": + case "amd-require": + case "umd": + case "umd2": + case "system": + case "jsonp": + return getSourceForAmdOrUmdExternal( + chunkGraph.getModuleId(this), + this.isOptional(moduleGraph), + request, + runtimeTemplate + ); + case "import": + return getSourceForImportExternal(request, runtimeTemplate); + case "script": + return getSourceForScriptExternal(request, runtimeTemplate); + case "module": + if (!runtimeTemplate.supportsEcmaScriptModuleSyntax()) { + throw new Error( + "The target environment doesn't support EcmaScriptModule syntax so it's not possible to use external type 'module'" + ); + } + throw new Error("Module external type is not implemented yet"); + case "var": + case "promise": + case "const": + case "let": + case "assign": + default: + return getSourceForDefaultCase( + this.isOptional(moduleGraph), + request, + runtimeTemplate + ); + } + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration({ + runtimeTemplate, + moduleGraph, + chunkGraph, + concatenationScope + }) { + const sourceData = this.getSourceData( + runtimeTemplate, + moduleGraph, + chunkGraph + ); + + let sourceString = sourceData.expression; + if (sourceData.iife) + sourceString = `(function() { return ${sourceString}; }())`; + if (concatenationScope) { + sourceString = `${runtimeTemplate.supportsConst() ? "const" : "var"} ${ + ConcatenationScope.NAMESPACE_OBJECT_EXPORT + } = ${sourceString};`; + concatenationScope.registerNamespaceExport( + ConcatenationScope.NAMESPACE_OBJECT_EXPORT + ); + } else { + sourceString = `module.exports = ${sourceString};`; + } + if (sourceData.init) sourceString = `${sourceData.init}\n${sourceString}`; + + const sources = new Map(); + if (this.useSourceMap || this.useSimpleSourceMap) { + sources.set( + "javascript", + new OriginalSource(sourceString, this.identifier()) + ); + } else { + sources.set("javascript", new RawSource(sourceString)); + } + + return { + sources, + runtimeRequirements: concatenationScope + ? RUNTIME_REQUIREMENTS_CONCATENATED + : this.externalType === "script" + ? RUNTIME_REQUIREMENTS_FOR_SCRIPT + : RUNTIME_REQUIREMENTS + }; + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + return 42; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + const { chunkGraph } = context; + hash.update(this.externalType); + hash.update(JSON.stringify(this.request)); + hash.update( + JSON.stringify(Boolean(this.isOptional(chunkGraph.moduleGraph))) + ); + super.updateHash(hash, context); + } + + serialize(context) { + const { write } = context; + + write(this.request); + write(this.externalType); + write(this.userRequest); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.request = read(); + this.externalType = read(); + this.userRequest = read(); + + super.deserialize(context); + } +} + +makeSerializable(ExternalModule, "webpack/lib/ExternalModule"); + +module.exports = ExternalModule; + + +/***/ }), + +/***/ 7832: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const ExternalModule = __webpack_require__(24334); +const { resolveByProperty } = __webpack_require__(92700); + +/** @typedef {import("../declarations/WebpackOptions").Externals} Externals */ +/** @typedef {import("./NormalModuleFactory")} NormalModuleFactory */ + +const UNSPECIFIED_EXTERNAL_TYPE_REGEXP = /^[a-z0-9]+ /; + +// TODO webpack 6 remove this +const callDeprecatedExternals = util.deprecate( + (externalsFunction, context, request, cb) => { + externalsFunction.call(null, context, request, cb); + }, + "The externals-function should be defined like ({context, request}, cb) => { ... }", + "DEP_WEBPACK_EXTERNALS_FUNCTION_PARAMETERS" +); + +const cache = new WeakMap(); + +const resolveLayer = (obj, layer) => { + let map = cache.get(obj); + if (map === undefined) { + map = new Map(); + cache.set(obj, map); + } else { + const cacheEntry = map.get(layer); + if (cacheEntry !== undefined) return cacheEntry; + } + const result = resolveByProperty(obj, "byLayer", layer); + map.set(layer, result); + return result; +}; + +class ExternalModuleFactoryPlugin { + /** + * @param {string | undefined} type default external type + * @param {Externals} externals externals config + */ + constructor(type, externals) { + this.type = type; + this.externals = externals; + } + + /** + * @param {NormalModuleFactory} normalModuleFactory the normal module factory + * @returns {void} + */ + apply(normalModuleFactory) { + const globalType = this.type; + normalModuleFactory.hooks.factorize.tapAsync( + "ExternalModuleFactoryPlugin", + (data, callback) => { + const context = data.context; + const contextInfo = data.contextInfo; + const dependency = data.dependencies[0]; + + /** + * @param {string|string[]|boolean|Record} value the external config + * @param {string|undefined} type type of external + * @param {function(Error=, ExternalModule=): void} callback callback + * @returns {void} + */ + const handleExternal = (value, type, callback) => { + if (value === false) { + // Not externals, fallback to original factory + return callback(); + } + /** @type {string | string[] | Record} */ + let externalConfig; + if (value === true) { + externalConfig = dependency.request; + } else { + externalConfig = value; + } + // When no explicit type is specified, extract it from the externalConfig + if (type === undefined) { + if ( + typeof externalConfig === "string" && + UNSPECIFIED_EXTERNAL_TYPE_REGEXP.test(externalConfig) + ) { + const idx = externalConfig.indexOf(" "); + type = externalConfig.substr(0, idx); + externalConfig = externalConfig.substr(idx + 1); + } else if ( + Array.isArray(externalConfig) && + externalConfig.length > 0 && + UNSPECIFIED_EXTERNAL_TYPE_REGEXP.test(externalConfig[0]) + ) { + const firstItem = externalConfig[0]; + const idx = firstItem.indexOf(" "); + type = firstItem.substr(0, idx); + externalConfig = [ + firstItem.substr(idx + 1), + ...externalConfig.slice(1) + ]; + } + } + callback( + null, + new ExternalModule( + externalConfig, + type || globalType, + dependency.request + ) + ); + }; + + /** + * @param {Externals} externals externals config + * @param {function(Error=, ExternalModule=): void} callback callback + * @returns {void} + */ + const handleExternals = (externals, callback) => { + if (typeof externals === "string") { + if (externals === dependency.request) { + return handleExternal(dependency.request, undefined, callback); + } + } else if (Array.isArray(externals)) { + let i = 0; + const next = () => { + let asyncFlag; + const handleExternalsAndCallback = (err, module) => { + if (err) return callback(err); + if (!module) { + if (asyncFlag) { + asyncFlag = false; + return; + } + return next(); + } + callback(null, module); + }; + + do { + asyncFlag = true; + if (i >= externals.length) return callback(); + handleExternals(externals[i++], handleExternalsAndCallback); + } while (!asyncFlag); + asyncFlag = false; + }; + + next(); + return; + } else if (externals instanceof RegExp) { + if (externals.test(dependency.request)) { + return handleExternal(dependency.request, undefined, callback); + } + } else if (typeof externals === "function") { + const cb = (err, value, type) => { + if (err) return callback(err); + if (value !== undefined) { + handleExternal(value, type, callback); + } else { + callback(); + } + }; + if (externals.length === 3) { + // TODO webpack 6 remove this + callDeprecatedExternals( + externals, + context, + dependency.request, + cb + ); + } else { + externals( + { + context, + request: dependency.request, + contextInfo + }, + cb + ); + } + return; + } else if (typeof externals === "object") { + const resolvedExternals = resolveLayer( + externals, + contextInfo.issuerLayer + ); + if ( + Object.prototype.hasOwnProperty.call( + resolvedExternals, + dependency.request + ) + ) { + return handleExternal( + resolvedExternals[dependency.request], + undefined, + callback + ); + } + } + callback(); + }; + + handleExternals(this.externals, callback); + } + ); + } +} +module.exports = ExternalModuleFactoryPlugin; + + +/***/ }), + +/***/ 19056: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ExternalModuleFactoryPlugin = __webpack_require__(7832); + +/** @typedef {import("../declarations/WebpackOptions").Externals} Externals */ +/** @typedef {import("./Compiler")} Compiler */ + +class ExternalsPlugin { + /** + * @param {string | undefined} type default external type + * @param {Externals} externals externals config + */ + constructor(type, externals) { + this.type = type; + this.externals = externals; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compile.tap("ExternalsPlugin", ({ normalModuleFactory }) => { + new ExternalModuleFactoryPlugin(this.type, this.externals).apply( + normalModuleFactory + ); + }); + } +} + +module.exports = ExternalsPlugin; + + +/***/ }), + +/***/ 50177: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { create: createResolver } = __webpack_require__(75707); +const asyncLib = __webpack_require__(36386); +const AsyncQueue = __webpack_require__(51921); +const createHash = __webpack_require__(34627); +const { join, dirname, relative } = __webpack_require__(71593); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./logging/Logger").Logger} Logger */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ + +const resolveContext = createResolver({ + resolveToContext: true, + exportsFields: [] +}); +const resolve = createResolver({ + extensions: [".js", ".json", ".node"], + conditionNames: ["require"] +}); + +let FS_ACCURACY = 2000; + +const EMPTY_SET = new Set(); + +const RBDT_RESOLVE = 0; +const RBDT_RESOLVE_DIRECTORY = 1; +const RBDT_RESOLVE_FILE = 2; +const RBDT_DIRECTORY = 3; +const RBDT_FILE = 4; +const RBDT_DIRECTORY_DEPENDENCIES = 5; +const RBDT_FILE_DEPENDENCIES = 6; + +const INVALID = Symbol("invalid"); + +/** + * @typedef {Object} FileSystemInfoEntry + * @property {number} safeTime + * @property {number=} timestamp + * @property {string=} timestampHash + */ + +/** + * @typedef {Object} TimestampAndHash + * @property {number} safeTime + * @property {number=} timestamp + * @property {string=} timestampHash + * @property {string} hash + */ + +/** + * @typedef {Object} SnapshotOptimizationEntry + * @property {Snapshot} snapshot + * @property {number} shared + * @property {Set} snapshotContent + * @property {Set} children + */ + +/** + * @typedef {Object} ResolveBuildDependenciesResult + * @property {Set} files list of files + * @property {Set} directories list of directories + * @property {Set} missing list of missing entries + * @property {Map} resolveResults stored resolve results + * @property {Object} resolveDependencies dependencies of the resolving + * @property {Set} resolveDependencies.files list of files + * @property {Set} resolveDependencies.directories list of directories + * @property {Set} resolveDependencies.missing list of missing entries + */ + +const DONE_ITERATOR_RESULT = new Set().keys().next(); + +// cspell:word tshs +// Tsh = Timestamp + Hash +// Tshs = Timestamp + Hash combinations + +class Snapshot { + constructor() { + this._flags = 0; + /** @type {number | undefined} */ + this.startTime = undefined; + /** @type {Map | undefined} */ + this.fileTimestamps = undefined; + /** @type {Map | undefined} */ + this.fileHashes = undefined; + /** @type {Map | undefined} */ + this.fileTshs = undefined; + /** @type {Map | undefined} */ + this.contextTimestamps = undefined; + /** @type {Map | undefined} */ + this.contextHashes = undefined; + /** @type {Map | undefined} */ + this.contextTshs = undefined; + /** @type {Map | undefined} */ + this.missingExistence = undefined; + /** @type {Map | undefined} */ + this.managedItemInfo = undefined; + /** @type {Set | undefined} */ + this.managedFiles = undefined; + /** @type {Set | undefined} */ + this.managedContexts = undefined; + /** @type {Set | undefined} */ + this.managedMissing = undefined; + /** @type {Set | undefined} */ + this.children = undefined; + } + + hasStartTime() { + return (this._flags & 1) !== 0; + } + + setStartTime(value) { + this._flags = this._flags | 1; + this.startTime = value; + } + + setMergedStartTime(value, snapshot) { + if (value) { + if (snapshot.hasStartTime()) { + this.setStartTime(Math.min(value, snapshot.startTime)); + } else { + this.setStartTime(value); + } + } else { + if (snapshot.hasStartTime()) this.setStartTime(snapshot.startTime); + } + } + + hasFileTimestamps() { + return (this._flags & 2) !== 0; + } + + setFileTimestamps(value) { + this._flags = this._flags | 2; + this.fileTimestamps = value; + } + + hasFileHashes() { + return (this._flags & 4) !== 0; + } + + setFileHashes(value) { + this._flags = this._flags | 4; + this.fileHashes = value; + } + + hasFileTshs() { + return (this._flags & 8) !== 0; + } + + setFileTshs(value) { + this._flags = this._flags | 8; + this.fileTshs = value; + } + + hasContextTimestamps() { + return (this._flags & 0x10) !== 0; + } + + setContextTimestamps(value) { + this._flags = this._flags | 0x10; + this.contextTimestamps = value; + } + + hasContextHashes() { + return (this._flags & 0x20) !== 0; + } + + setContextHashes(value) { + this._flags = this._flags | 0x20; + this.contextHashes = value; + } + + hasContextTshs() { + return (this._flags & 0x40) !== 0; + } + + setContextTshs(value) { + this._flags = this._flags | 0x40; + this.contextTshs = value; + } + + hasMissingExistence() { + return (this._flags & 0x80) !== 0; + } + + setMissingExistence(value) { + this._flags = this._flags | 0x80; + this.missingExistence = value; + } + + hasManagedItemInfo() { + return (this._flags & 0x100) !== 0; + } + + setManagedItemInfo(value) { + this._flags = this._flags | 0x100; + this.managedItemInfo = value; + } + + hasManagedFiles() { + return (this._flags & 0x200) !== 0; + } + + setManagedFiles(value) { + this._flags = this._flags | 0x200; + this.managedFiles = value; + } + + hasManagedContexts() { + return (this._flags & 0x400) !== 0; + } + + setManagedContexts(value) { + this._flags = this._flags | 0x400; + this.managedContexts = value; + } + + hasManagedMissing() { + return (this._flags & 0x800) !== 0; + } + + setManagedMissing(value) { + this._flags = this._flags | 0x800; + this.managedMissing = value; + } + + hasChildren() { + return (this._flags & 0x1000) !== 0; + } + + setChildren(value) { + this._flags = this._flags | 0x1000; + this.children = value; + } + + addChild(child) { + if (!this.hasChildren()) { + this.setChildren(new Set()); + } + this.children.add(child); + } + + serialize({ write }) { + write(this._flags); + if (this.hasStartTime()) write(this.startTime); + if (this.hasFileTimestamps()) write(this.fileTimestamps); + if (this.hasFileHashes()) write(this.fileHashes); + if (this.hasFileTshs()) write(this.fileTshs); + if (this.hasContextTimestamps()) write(this.contextTimestamps); + if (this.hasContextHashes()) write(this.contextHashes); + if (this.hasContextTshs()) write(this.contextTshs); + if (this.hasMissingExistence()) write(this.missingExistence); + if (this.hasManagedItemInfo()) write(this.managedItemInfo); + if (this.hasManagedFiles()) write(this.managedFiles); + if (this.hasManagedContexts()) write(this.managedContexts); + if (this.hasManagedMissing()) write(this.managedMissing); + if (this.hasChildren()) write(this.children); + } + + deserialize({ read }) { + this._flags = read(); + if (this.hasStartTime()) this.startTime = read(); + if (this.hasFileTimestamps()) this.fileTimestamps = read(); + if (this.hasFileHashes()) this.fileHashes = read(); + if (this.hasFileTshs()) this.fileTshs = read(); + if (this.hasContextTimestamps()) this.contextTimestamps = read(); + if (this.hasContextHashes()) this.contextHashes = read(); + if (this.hasContextTshs()) this.contextTshs = read(); + if (this.hasMissingExistence()) this.missingExistence = read(); + if (this.hasManagedItemInfo()) this.managedItemInfo = read(); + if (this.hasManagedFiles()) this.managedFiles = read(); + if (this.hasManagedContexts()) this.managedContexts = read(); + if (this.hasManagedMissing()) this.managedMissing = read(); + if (this.hasChildren()) this.children = read(); + } + + /** + * @param {function(Snapshot): (Map | Set)[]} getMaps first + * @returns {Iterable} iterable + */ + _createIterable(getMaps) { + let snapshot = this; + return { + [Symbol.iterator]() { + let state = 0; + /** @type {IterableIterator} */ + let it; + let maps = getMaps(snapshot); + const queue = []; + return { + next() { + for (;;) { + switch (state) { + case 0: + if (maps.length > 0) { + const map = maps.pop(); + if (map !== undefined) { + it = map.keys(); + state = 1; + } else { + break; + } + } else { + state = 2; + break; + } + /* falls through */ + case 1: { + const result = it.next(); + if (!result.done) return result; + state = 0; + break; + } + case 2: { + const children = snapshot.children; + if (children !== undefined) { + for (const child of children) { + queue.push(child); + } + } + if (queue.length > 0) { + snapshot = queue.pop(); + maps = getMaps(snapshot); + state = 0; + break; + } else { + state = 3; + } + } + /* falls through */ + case 3: + return DONE_ITERATOR_RESULT; + } + } + } + }; + } + }; + } + + /** + * @returns {Iterable} iterable + */ + getFileIterable() { + return this._createIterable(s => [ + s.fileTimestamps, + s.fileHashes, + s.fileTshs, + s.managedFiles + ]); + } + + /** + * @returns {Iterable} iterable + */ + getContextIterable() { + return this._createIterable(s => [ + s.contextTimestamps, + s.contextHashes, + s.contextTshs, + s.managedContexts + ]); + } + + /** + * @returns {Iterable} iterable + */ + getMissingIterable() { + return this._createIterable(s => [s.missingExistence, s.managedMissing]); + } +} + +makeSerializable(Snapshot, "webpack/lib/FileSystemInfo", "Snapshot"); + +const MIN_COMMON_SNAPSHOT_SIZE = 3; + +/** + * @template T + */ +class SnapshotOptimization { + /** + * @param {function(Snapshot): boolean} has has value + * @param {function(Snapshot): Map | Set} get get value + * @param {function(Snapshot, Map | Set): void} set set value + * @param {boolean=} isSet value is an Set instead of a Map + */ + constructor(has, get, set, isSet = false) { + this._has = has; + this._get = get; + this._set = set; + this._isSet = isSet; + /** @type {Map} */ + this._map = new Map(); + this._statItemsShared = 0; + this._statItemsUnshared = 0; + this._statSharedSnapshots = 0; + this._statReusedSharedSnapshots = 0; + } + + getStatisticMessage() { + const total = this._statItemsShared + this._statItemsUnshared; + if (total === 0) return undefined; + return `${ + this._statItemsShared && Math.round((this._statItemsShared * 100) / total) + }% (${this._statItemsShared}/${total}) entries shared via ${ + this._statSharedSnapshots + } shared snapshots (${ + this._statReusedSharedSnapshots + this._statSharedSnapshots + } times referenced)`; + } + + storeUnsharedSnapshot(snapshot, locations) { + if (locations === undefined) return; + const optimizationEntry = { + snapshot, + shared: 0, + snapshotContent: undefined, + children: undefined + }; + for (const path of locations) { + this._map.set(path, optimizationEntry); + } + } + + optimize(capturedFiles, startTime, children) { + /** @type {Set} */ + const unsetOptimizationEntries = new Set(); + /** @type {Set} */ + const checkedOptimizationEntries = new Set(); + /** + * @param {SnapshotOptimizationEntry} entry optimization entry + * @returns {void} + */ + const increaseSharedAndStoreOptimizationEntry = entry => { + if (entry.children !== undefined) { + entry.children.forEach(increaseSharedAndStoreOptimizationEntry); + } + entry.shared++; + storeOptimizationEntry(entry); + }; + /** + * @param {SnapshotOptimizationEntry} entry optimization entry + * @returns {void} + */ + const storeOptimizationEntry = entry => { + for (const path of entry.snapshotContent) { + const old = this._map.get(path); + if (old.shared < entry.shared) { + this._map.set(path, entry); + } + capturedFiles.delete(path); + } + }; + const capturedFilesSize = capturedFiles.size; + capturedFiles: for (const path of capturedFiles) { + const optimizationEntry = this._map.get(path); + if (optimizationEntry === undefined) { + unsetOptimizationEntries.add(path); + continue; + } + if (checkedOptimizationEntries.has(optimizationEntry)) continue; + const snapshot = optimizationEntry.snapshot; + if (optimizationEntry.shared > 0) { + // It's a shared snapshot + // We can't change it, so we can only use it when all files match + // and startTime is compatible + if ( + startTime && + (!snapshot.startTime || snapshot.startTime > startTime) + ) { + continue; + } + const nonSharedFiles = new Set(); + const snapshotContent = optimizationEntry.snapshotContent; + const snapshotEntries = this._get(snapshot); + for (const path of snapshotContent) { + if (!capturedFiles.has(path)) { + if (!snapshotEntries.has(path)) { + // File is not shared and can't be removed from the snapshot + // because it's in a child of the snapshot + checkedOptimizationEntries.add(optimizationEntry); + continue capturedFiles; + } + nonSharedFiles.add(path); + continue; + } + } + if (nonSharedFiles.size === 0) { + // The complete snapshot is shared + // add it as child + children.add(snapshot); + increaseSharedAndStoreOptimizationEntry(optimizationEntry); + this._statReusedSharedSnapshots++; + } else { + // Only a part of the snapshot is shared + const sharedCount = snapshotContent.size - nonSharedFiles.size; + if (sharedCount < MIN_COMMON_SNAPSHOT_SIZE) { + // Common part it too small + checkedOptimizationEntries.add(optimizationEntry); + continue capturedFiles; + } + // Extract common timestamps from both snapshots + let commonMap; + if (this._isSet) { + commonMap = new Set(); + for (const path of /** @type {Set} */ (snapshotEntries)) { + if (nonSharedFiles.has(path)) continue; + commonMap.add(path); + snapshotEntries.delete(path); + } + } else { + commonMap = new Map(); + const map = /** @type {Map} */ (snapshotEntries); + for (const [path, value] of map) { + if (nonSharedFiles.has(path)) continue; + commonMap.set(path, value); + snapshotEntries.delete(path); + } + } + // Create and attach snapshot + const commonSnapshot = new Snapshot(); + commonSnapshot.setMergedStartTime(startTime, snapshot); + this._set(commonSnapshot, commonMap); + children.add(commonSnapshot); + snapshot.addChild(commonSnapshot); + // Create optimization entry + const newEntry = { + snapshot: commonSnapshot, + shared: optimizationEntry.shared + 1, + snapshotContent: new Set(commonMap.keys()), + children: undefined + }; + if (optimizationEntry.children === undefined) + optimizationEntry.children = new Set(); + optimizationEntry.children.add(newEntry); + storeOptimizationEntry(newEntry); + this._statSharedSnapshots++; + } + } else { + // It's a unshared snapshot + // We can extract a common shared snapshot + // with all common files + const snapshotEntries = this._get(snapshot); + let commonMap; + if (this._isSet) { + commonMap = new Set(); + const set = /** @type {Set} */ (snapshotEntries); + if (capturedFiles.size < set.size) { + for (const path of capturedFiles) { + if (set.has(path)) commonMap.add(path); + } + } else { + for (const path of set) { + if (capturedFiles.has(path)) commonMap.add(path); + } + } + } else { + commonMap = new Map(); + const map = /** @type {Map} */ (snapshotEntries); + for (const path of capturedFiles) { + const ts = map.get(path); + if (ts === undefined) continue; + commonMap.set(path, ts); + } + } + + if (commonMap.size < MIN_COMMON_SNAPSHOT_SIZE) { + // Common part it too small + checkedOptimizationEntries.add(optimizationEntry); + continue capturedFiles; + } + // Create and attach snapshot + const commonSnapshot = new Snapshot(); + commonSnapshot.setMergedStartTime(startTime, snapshot); + this._set(commonSnapshot, commonMap); + children.add(commonSnapshot); + snapshot.addChild(commonSnapshot); + // Remove files from snapshot + for (const path of commonMap.keys()) snapshotEntries.delete(path); + const sharedCount = commonMap.size; + this._statItemsUnshared -= sharedCount; + this._statItemsShared += sharedCount; + // Create optimization entry + storeOptimizationEntry({ + snapshot: commonSnapshot, + shared: 2, + snapshotContent: new Set(commonMap.keys()), + children: undefined + }); + this._statSharedSnapshots++; + } + checkedOptimizationEntries.add(optimizationEntry); + } + const unshared = capturedFiles.size; + this._statItemsUnshared += unshared; + this._statItemsShared += capturedFilesSize - unshared; + return unsetOptimizationEntries; + } +} + +/* istanbul ignore next */ +/** + * @param {number} mtime mtime + */ +const applyMtime = mtime => { + if (FS_ACCURACY > 1 && mtime % 2 !== 0) FS_ACCURACY = 1; + else if (FS_ACCURACY > 10 && mtime % 20 !== 0) FS_ACCURACY = 10; + else if (FS_ACCURACY > 100 && mtime % 200 !== 0) FS_ACCURACY = 100; + else if (FS_ACCURACY > 1000 && mtime % 2000 !== 0) FS_ACCURACY = 1000; +}; + +/** + * @template T + * @template K + * @param {Map} a source map + * @param {Map} b joining map + * @returns {Map} joined map + */ +const mergeMaps = (a, b) => { + if (!b || b.size === 0) return a; + if (!a || a.size === 0) return b; + const map = new Map(a); + for (const [key, value] of b) { + map.set(key, value); + } + return map; +}; + +/** + * @template T + * @template K + * @param {Set} a source map + * @param {Set} b joining map + * @returns {Set} joined map + */ +const mergeSets = (a, b) => { + if (!b || b.size === 0) return a; + if (!a || a.size === 0) return b; + const map = new Set(a); + for (const item of b) { + map.add(item); + } + return map; +}; + +/** + * Finding file or directory to manage + * @param {string} managedPath path that is managing by {@link FileSystemInfo} + * @param {string} path path to file or directory + * @returns {string|null} managed item + * @example + * getManagedItem( + * '/Users/user/my-project/node_modules/', + * '/Users/user/my-project/node_modules/package/index.js' + * ) === '/Users/user/my-project/node_modules/package' + * getManagedItem( + * '/Users/user/my-project/node_modules/', + * '/Users/user/my-project/node_modules/package1/node_modules/package2' + * ) === '/Users/user/my-project/node_modules/package1/node_modules/package2' + * getManagedItem( + * '/Users/user/my-project/node_modules/', + * '/Users/user/my-project/node_modules/.bin/script.js' + * ) === null // hidden files are disallowed as managed items + * getManagedItem( + * '/Users/user/my-project/node_modules/', + * '/Users/user/my-project/node_modules/package' + * ) === '/Users/user/my-project/node_modules/package' + */ +const getManagedItem = (managedPath, path) => { + let i = managedPath.length; + let slashes = 1; + let startingPosition = true; + loop: while (i < path.length) { + switch (path.charCodeAt(i)) { + case 47: // slash + case 92: // backslash + if (--slashes === 0) break loop; + startingPosition = true; + break; + case 46: // . + // hidden files are disallowed as managed items + // it's probably .yarn-integrity or .cache + if (startingPosition) return null; + break; + case 64: // @ + if (!startingPosition) return null; + slashes++; + break; + default: + startingPosition = false; + break; + } + i++; + } + if (i === path.length) slashes--; + // return null when path is incomplete + if (slashes !== 0) return null; + // if (path.slice(i + 1, i + 13) === "node_modules") + if ( + path.length >= i + 13 && + path.charCodeAt(i + 1) === 110 && + path.charCodeAt(i + 2) === 111 && + path.charCodeAt(i + 3) === 100 && + path.charCodeAt(i + 4) === 101 && + path.charCodeAt(i + 5) === 95 && + path.charCodeAt(i + 6) === 109 && + path.charCodeAt(i + 7) === 111 && + path.charCodeAt(i + 8) === 100 && + path.charCodeAt(i + 9) === 117 && + path.charCodeAt(i + 10) === 108 && + path.charCodeAt(i + 11) === 101 && + path.charCodeAt(i + 12) === 115 + ) { + // if this is the end of the path + if (path.length === i + 13) { + // return the node_modules directory + // it's special + return path; + } + const c = path.charCodeAt(i + 13); + // if next symbol is slash or backslash + if (c === 47 || c === 92) { + // Managed subpath + return getManagedItem(path.slice(0, i + 14), path); + } + } + return path.slice(0, i); +}; + +/** + * @param {FileSystemInfoEntry} entry file system info entry + * @returns {boolean} existence flag + */ +const toExistence = entry => { + return Boolean(entry); +}; + +/** + * Used to access information about the filesystem in a cached way + */ +class FileSystemInfo { + /** + * @param {InputFileSystem} fs file system + * @param {Object} options options + * @param {Iterable=} options.managedPaths paths that are only managed by a package manager + * @param {Iterable=} options.immutablePaths paths that are immutable + * @param {Logger=} options.logger logger used to log invalid snapshots + */ + constructor(fs, { managedPaths = [], immutablePaths = [], logger } = {}) { + this.fs = fs; + this.logger = logger; + this._remainingLogs = logger ? 40 : 0; + this._loggedPaths = logger ? new Set() : undefined; + /** @type {WeakMap} */ + this._snapshotCache = new WeakMap(); + this._fileTimestampsOptimization = new SnapshotOptimization( + s => s.hasFileTimestamps(), + s => s.fileTimestamps, + (s, v) => s.setFileTimestamps(v) + ); + this._fileHashesOptimization = new SnapshotOptimization( + s => s.hasFileHashes(), + s => s.fileHashes, + (s, v) => s.setFileHashes(v) + ); + this._fileTshsOptimization = new SnapshotOptimization( + s => s.hasFileTshs(), + s => s.fileTshs, + (s, v) => s.setFileTshs(v) + ); + this._contextTimestampsOptimization = new SnapshotOptimization( + s => s.hasContextTimestamps(), + s => s.contextTimestamps, + (s, v) => s.setContextTimestamps(v) + ); + this._contextHashesOptimization = new SnapshotOptimization( + s => s.hasContextHashes(), + s => s.contextHashes, + (s, v) => s.setContextHashes(v) + ); + this._contextTshsOptimization = new SnapshotOptimization( + s => s.hasContextTshs(), + s => s.contextTshs, + (s, v) => s.setContextTshs(v) + ); + this._missingExistenceOptimization = new SnapshotOptimization( + s => s.hasMissingExistence(), + s => s.missingExistence, + (s, v) => s.setMissingExistence(v) + ); + this._managedItemInfoOptimization = new SnapshotOptimization( + s => s.hasManagedItemInfo(), + s => s.managedItemInfo, + (s, v) => s.setManagedItemInfo(v) + ); + this._managedFilesOptimization = new SnapshotOptimization( + s => s.hasManagedFiles(), + s => s.managedFiles, + (s, v) => s.setManagedFiles(v), + true + ); + this._managedContextsOptimization = new SnapshotOptimization( + s => s.hasManagedContexts(), + s => s.managedContexts, + (s, v) => s.setManagedContexts(v), + true + ); + this._managedMissingOptimization = new SnapshotOptimization( + s => s.hasManagedMissing(), + s => s.managedMissing, + (s, v) => s.setManagedMissing(v), + true + ); + /** @type {Map} */ + this._fileTimestamps = new Map(); + /** @type {Map} */ + this._fileHashes = new Map(); + /** @type {Map} */ + this._fileTshs = new Map(); + /** @type {Map} */ + this._contextTimestamps = new Map(); + /** @type {Map} */ + this._contextHashes = new Map(); + /** @type {Map} */ + this._contextTshs = new Map(); + /** @type {Map} */ + this._managedItems = new Map(); + /** @type {AsyncQueue} */ + this.fileTimestampQueue = new AsyncQueue({ + name: "file timestamp", + parallelism: 30, + processor: this._readFileTimestamp.bind(this) + }); + /** @type {AsyncQueue} */ + this.fileHashQueue = new AsyncQueue({ + name: "file hash", + parallelism: 10, + processor: this._readFileHash.bind(this) + }); + /** @type {AsyncQueue} */ + this.contextTimestampQueue = new AsyncQueue({ + name: "context timestamp", + parallelism: 2, + processor: this._readContextTimestamp.bind(this) + }); + /** @type {AsyncQueue} */ + this.contextHashQueue = new AsyncQueue({ + name: "context hash", + parallelism: 2, + processor: this._readContextHash.bind(this) + }); + /** @type {AsyncQueue} */ + this.managedItemQueue = new AsyncQueue({ + name: "managed item info", + parallelism: 10, + processor: this._getManagedItemInfo.bind(this) + }); + /** @type {AsyncQueue>} */ + this.managedItemDirectoryQueue = new AsyncQueue({ + name: "managed item directory info", + parallelism: 10, + processor: this._getManagedItemDirectoryInfo.bind(this) + }); + this.managedPaths = Array.from(managedPaths); + this.managedPathsWithSlash = this.managedPaths.map(p => + join(fs, p, "_").slice(0, -1) + ); + this.immutablePaths = Array.from(immutablePaths); + this.immutablePathsWithSlash = this.immutablePaths.map(p => + join(fs, p, "_").slice(0, -1) + ); + + this._cachedDeprecatedFileTimestamps = undefined; + this._cachedDeprecatedContextTimestamps = undefined; + + this._statCreatedSnapshots = 0; + this._statTestedSnapshotsCached = 0; + this._statTestedSnapshotsNotCached = 0; + this._statTestedChildrenCached = 0; + this._statTestedChildrenNotCached = 0; + this._statTestedEntries = 0; + } + + logStatistics() { + const logWhenMessage = (header, message) => { + if (message) { + this.logger.log(`${header}: ${message}`); + } + }; + this.logger.log(`${this._statCreatedSnapshots} new snapshots created`); + this.logger.log( + `${ + this._statTestedSnapshotsNotCached && + Math.round( + (this._statTestedSnapshotsNotCached * 100) / + (this._statTestedSnapshotsCached + + this._statTestedSnapshotsNotCached) + ) + }% root snapshot uncached (${this._statTestedSnapshotsNotCached} / ${ + this._statTestedSnapshotsCached + this._statTestedSnapshotsNotCached + })` + ); + this.logger.log( + `${ + this._statTestedChildrenNotCached && + Math.round( + (this._statTestedChildrenNotCached * 100) / + (this._statTestedChildrenCached + this._statTestedChildrenNotCached) + ) + }% children snapshot uncached (${this._statTestedChildrenNotCached} / ${ + this._statTestedChildrenCached + this._statTestedChildrenNotCached + })` + ); + this.logger.log(`${this._statTestedEntries} entries tested`); + this.logger.log( + `File info in cache: ${this._fileTimestamps.size} timestamps ${this._fileHashes.size} hashes ${this._fileTshs.size} timestamp hash combinations` + ); + logWhenMessage( + `File timestamp snapshot optimization`, + this._fileTimestampsOptimization.getStatisticMessage() + ); + logWhenMessage( + `File hash snapshot optimization`, + this._fileHashesOptimization.getStatisticMessage() + ); + logWhenMessage( + `File timestamp hash combination snapshot optimization`, + this._fileTshsOptimization.getStatisticMessage() + ); + this.logger.log( + `Directory info in cache: ${this._contextTimestamps.size} timestamps ${this._contextHashes.size} hashes ${this._contextTshs.size} timestamp hash combinations` + ); + logWhenMessage( + `Directory timestamp snapshot optimization`, + this._contextTimestampsOptimization.getStatisticMessage() + ); + logWhenMessage( + `Directory hash snapshot optimization`, + this._contextHashesOptimization.getStatisticMessage() + ); + logWhenMessage( + `Directory timestamp hash combination snapshot optimization`, + this._contextTshsOptimization.getStatisticMessage() + ); + logWhenMessage( + `Missing items snapshot optimization`, + this._missingExistenceOptimization.getStatisticMessage() + ); + this.logger.log( + `Managed items info in cache: ${this._managedItems.size} items` + ); + logWhenMessage( + `Managed items snapshot optimization`, + this._managedItemInfoOptimization.getStatisticMessage() + ); + logWhenMessage( + `Managed files snapshot optimization`, + this._managedFilesOptimization.getStatisticMessage() + ); + logWhenMessage( + `Managed contexts snapshot optimization`, + this._managedContextsOptimization.getStatisticMessage() + ); + logWhenMessage( + `Managed missing snapshot optimization`, + this._managedMissingOptimization.getStatisticMessage() + ); + } + + _log(path, reason, ...args) { + const key = path + reason; + if (this._loggedPaths.has(key)) return; + this._loggedPaths.add(key); + this.logger.debug(`${path} invalidated because ${reason}`, ...args); + if (--this._remainingLogs === 0) { + this.logger.debug( + "Logging limit has been reached and no further logging will be emitted by FileSystemInfo" + ); + } + } + + /** + * @param {Map} map timestamps + * @returns {void} + */ + addFileTimestamps(map) { + for (const [path, ts] of map) { + this._fileTimestamps.set(path, ts); + } + this._cachedDeprecatedFileTimestamps = undefined; + } + + /** + * @param {Map} map timestamps + * @returns {void} + */ + addContextTimestamps(map) { + for (const [path, ts] of map) { + this._contextTimestamps.set(path, ts); + } + this._cachedDeprecatedContextTimestamps = undefined; + } + + /** + * @param {string} path file path + * @param {function(WebpackError=, (FileSystemInfoEntry | "ignore" | null)=): void} callback callback function + * @returns {void} + */ + getFileTimestamp(path, callback) { + const cache = this._fileTimestamps.get(path); + if (cache !== undefined) return callback(null, cache); + this.fileTimestampQueue.add(path, callback); + } + + /** + * @param {string} path context path + * @param {function(WebpackError=, (FileSystemInfoEntry | "ignore" | null)=): void} callback callback function + * @returns {void} + */ + getContextTimestamp(path, callback) { + const cache = this._contextTimestamps.get(path); + if (cache !== undefined) return callback(null, cache); + this.contextTimestampQueue.add(path, callback); + } + + /** + * @param {string} path file path + * @param {function(WebpackError=, string=): void} callback callback function + * @returns {void} + */ + getFileHash(path, callback) { + const cache = this._fileHashes.get(path); + if (cache !== undefined) return callback(null, cache); + this.fileHashQueue.add(path, callback); + } + + /** + * @param {string} path context path + * @param {function(WebpackError=, string=): void} callback callback function + * @returns {void} + */ + getContextHash(path, callback) { + const cache = this._contextHashes.get(path); + if (cache !== undefined) return callback(null, cache); + this.contextHashQueue.add(path, callback); + } + + /** + * @param {string} context context directory + * @param {Iterable} deps dependencies + * @param {function(Error=, ResolveBuildDependenciesResult=): void} callback callback function + * @returns {void} + */ + resolveBuildDependencies(context, deps, callback) { + /** @type {Set} */ + const files = new Set(); + /** @type {Set} */ + const directories = new Set(); + /** @type {Set} */ + const missing = new Set(); + /** @type {Set} */ + const resolveFiles = new Set(); + /** @type {Set} */ + const resolveDirectories = new Set(); + /** @type {Set} */ + const resolveMissing = new Set(); + /** @type {Map} */ + const resolveResults = new Map(); + /** @type {asyncLib.QueueObject<{type: number, path: string, context?: string, expected?: string }, Error>} */ + const queue = asyncLib.queue( + ({ type, context, path, expected }, callback) => { + const resolveDirectory = path => { + const key = `d\n${context}\n${path}`; + if (resolveResults.has(key)) { + return callback(); + } + resolveContext( + context, + path, + { + fileDependencies: resolveFiles, + contextDependencies: resolveDirectories, + missingDependencies: resolveMissing + }, + (err, result) => { + if (err) { + if ( + err.code === "ENOENT" || + err.code === "UNDECLARED_DEPENDENCY" + ) { + return callback(); + } + err.message += `\nwhile resolving '${path}' in ${context} to a directory`; + return callback(err); + } + resolveResults.set(key, result); + queue.push({ + type: RBDT_DIRECTORY, + path: result + }); + callback(); + } + ); + }; + const resolveFile = path => { + const key = `f\n${context}\n${path}`; + if (resolveResults.has(key)) { + return callback(); + } + resolve( + context, + path, + { + fileDependencies: resolveFiles, + contextDependencies: resolveDirectories, + missingDependencies: resolveMissing + }, + (err, result) => { + if (expected) { + if (result === expected) { + resolveResults.set(key, result); + } + } else { + if (err) { + if ( + err.code === "ENOENT" || + err.code === "UNDECLARED_DEPENDENCY" + ) { + return callback(); + } + err.message += `\nwhile resolving '${path}' in ${context} as file`; + return callback(err); + } + resolveResults.set(key, result); + queue.push({ + type: RBDT_FILE, + path: result + }); + } + callback(); + } + ); + }; + switch (type) { + case RBDT_RESOLVE: { + const isDirectory = /[\\/]$/.test(path); + if (isDirectory) { + resolveDirectory(path.slice(0, path.length - 1)); + } else { + resolveFile(path); + } + break; + } + case RBDT_RESOLVE_DIRECTORY: { + resolveDirectory(path); + break; + } + case RBDT_RESOLVE_FILE: { + resolveFile(path); + break; + } + case RBDT_FILE: { + if (files.has(path)) { + callback(); + break; + } + this.fs.realpath(path, (err, realPath) => { + if (err) return callback(err); + if (realPath !== path) { + resolveFiles.add(path); + } + if (!files.has(realPath)) { + files.add(realPath); + queue.push({ + type: RBDT_FILE_DEPENDENCIES, + path: realPath + }); + } + callback(); + }); + break; + } + case RBDT_DIRECTORY: { + if (directories.has(path)) { + callback(); + break; + } + this.fs.realpath(path, (err, realPath) => { + if (err) return callback(err); + if (realPath !== path) { + resolveFiles.add(path); + } + if (!directories.has(realPath)) { + directories.add(realPath); + queue.push({ + type: RBDT_DIRECTORY_DEPENDENCIES, + path: realPath + }); + } + callback(); + }); + break; + } + case RBDT_FILE_DEPENDENCIES: { + // TODO this probably doesn't work correctly with ESM dependencies + /** @type {NodeModule} */ + const module = require.cache[path]; + if (module && Array.isArray(module.children)) { + children: for (const child of module.children) { + let childPath = child.filename; + if (childPath) { + queue.push({ + type: RBDT_FILE, + path: childPath + }); + if (childPath.endsWith(".js")) + childPath = childPath.slice(0, -3); + const context = dirname(this.fs, path); + for (const modulePath of module.paths) { + if (childPath.startsWith(modulePath)) { + const request = childPath.slice(modulePath.length + 1); + queue.push({ + type: RBDT_RESOLVE_FILE, + context, + path: request, + expected: childPath + }); + continue children; + } + } + let request = relative(this.fs, context, childPath); + request = request.replace(/\\/g, "/"); + if (!request.startsWith("../")) request = `./${request}`; + queue.push({ + type: RBDT_RESOLVE_FILE, + context, + path: request, + expected: child.filename + }); + } + } + } else { + // Unable to get dependencies from module system + // This may be because of an incomplete require.cache implementation like in jest + // Assume requires stay in directory and add the whole directory + const directory = dirname(this.fs, path); + queue.push({ + type: RBDT_DIRECTORY, + path: directory + }); + } + process.nextTick(callback); + break; + } + case RBDT_DIRECTORY_DEPENDENCIES: { + const match = /(^.+[\\/]node_modules[\\/](?:@[^\\/]+[\\/])?[^\\/]+)/.exec( + path + ); + const packagePath = match ? match[1] : path; + const packageJson = join(this.fs, packagePath, "package.json"); + this.fs.readFile(packageJson, (err, content) => { + if (err) { + if (err.code === "ENOENT") { + resolveMissing.add(packageJson); + const parent = dirname(this.fs, packagePath); + if (parent !== packagePath) { + queue.push({ + type: RBDT_DIRECTORY_DEPENDENCIES, + path: parent + }); + } + callback(); + return; + } + return callback(err); + } + resolveFiles.add(packageJson); + let packageData; + try { + packageData = JSON.parse(content.toString("utf-8")); + } catch (e) { + return callback(e); + } + const depsObject = packageData.dependencies; + if (typeof depsObject === "object" && depsObject) { + for (const dep of Object.keys(depsObject)) { + queue.push({ + type: RBDT_RESOLVE_DIRECTORY, + context: packagePath, + path: dep + }); + } + } + callback(); + }); + break; + } + } + }, + 50 + ); + queue.drain = () => { + callback(null, { + files, + directories, + missing, + resolveResults, + resolveDependencies: { + files: resolveFiles, + directories: resolveDirectories, + missing: resolveMissing + } + }); + }; + queue.error = err => { + callback(err); + callback = () => {}; + }; + let jobQueued = false; + for (const dep of deps) { + queue.push({ + type: RBDT_RESOLVE, + context, + path: dep + }); + jobQueued = true; + } + if (!jobQueued) { + // queue won't call drain when no jobs are queue + queue.drain(); + } + } + + /** + * @param {Map} resolveResults results from resolving + * @param {function(Error=, boolean=): void} callback callback with true when resolveResults resolve the same way + * @returns {void} + */ + checkResolveResultsValid(resolveResults, callback) { + asyncLib.eachLimit( + resolveResults, + 20, + ([key, expectedResult], callback) => { + const [type, context, path] = key.split("\n"); + switch (type) { + case "d": + resolveContext(context, path, {}, (err, result) => { + if (err) return callback(err); + if (result !== expectedResult) return callback(INVALID); + callback(); + }); + break; + case "f": + resolve(context, path, {}, (err, result) => { + if (err) return callback(err); + if (result !== expectedResult) return callback(INVALID); + callback(); + }); + break; + default: + callback(new Error("Unexpected type in resolve result key")); + break; + } + }, + /** + * @param {Error | typeof INVALID=} err error or invalid flag + * @returns {void} + */ + err => { + if (err === INVALID) { + return callback(null, false); + } + if (err) { + return callback(err); + } + return callback(null, true); + } + ); + } + + /** + * + * @param {number} startTime when processing the files has started + * @param {Iterable} files all files + * @param {Iterable} directories all directories + * @param {Iterable} missing all missing files or directories + * @param {Object} options options object (for future extensions) + * @param {boolean=} options.hash should use hash to snapshot + * @param {boolean=} options.timestamp should use timestamp to snapshot + * @param {function(WebpackError=, Snapshot=): void} callback callback function + * @returns {void} + */ + createSnapshot(startTime, files, directories, missing, options, callback) { + /** @type {Map} */ + const fileTimestamps = new Map(); + /** @type {Map} */ + const fileHashes = new Map(); + /** @type {Map} */ + const fileTshs = new Map(); + /** @type {Map} */ + const contextTimestamps = new Map(); + /** @type {Map} */ + const contextHashes = new Map(); + /** @type {Map} */ + const contextTshs = new Map(); + /** @type {Map} */ + const missingExistence = new Map(); + /** @type {Map} */ + const managedItemInfo = new Map(); + /** @type {Set} */ + const managedFiles = new Set(); + /** @type {Set} */ + const managedContexts = new Set(); + /** @type {Set} */ + const managedMissing = new Set(); + /** @type {Set} */ + const children = new Set(); + + /** @type {Set} */ + let unsharedFileTimestamps; + /** @type {Set} */ + let unsharedFileHashes; + /** @type {Set} */ + let unsharedFileTshs; + /** @type {Set} */ + let unsharedContextTimestamps; + /** @type {Set} */ + let unsharedContextHashes; + /** @type {Set} */ + let unsharedContextTshs; + /** @type {Set} */ + let unsharedMissingExistence; + /** @type {Set} */ + let unsharedManagedItemInfo; + + /** @type {Set} */ + const managedItems = new Set(); + + /** 1 = timestamp, 2 = hash, 3 = timestamp + hash */ + const mode = options && options.hash ? (options.timestamp ? 3 : 2) : 1; + + let jobs = 1; + const jobDone = () => { + if (--jobs === 0) { + const snapshot = new Snapshot(); + if (startTime) snapshot.setStartTime(startTime); + if (fileTimestamps.size !== 0) { + snapshot.setFileTimestamps(fileTimestamps); + this._fileTimestampsOptimization.storeUnsharedSnapshot( + snapshot, + unsharedFileTimestamps + ); + } + if (fileHashes.size !== 0) { + snapshot.setFileHashes(fileHashes); + this._fileHashesOptimization.storeUnsharedSnapshot( + snapshot, + unsharedFileHashes + ); + } + if (fileTshs.size !== 0) { + snapshot.setFileTshs(fileTshs); + this._fileTshsOptimization.storeUnsharedSnapshot( + snapshot, + unsharedFileTshs + ); + } + if (contextTimestamps.size !== 0) { + snapshot.setContextTimestamps(contextTimestamps); + this._contextTimestampsOptimization.storeUnsharedSnapshot( + snapshot, + unsharedContextTimestamps + ); + } + if (contextHashes.size !== 0) { + snapshot.setContextHashes(contextHashes); + this._contextHashesOptimization.storeUnsharedSnapshot( + snapshot, + unsharedContextHashes + ); + } + if (contextTshs.size !== 0) { + snapshot.setContextTshs(contextTshs); + this._contextTshsOptimization.storeUnsharedSnapshot( + snapshot, + unsharedContextTshs + ); + } + if (missingExistence.size !== 0) { + snapshot.setMissingExistence(missingExistence); + this._missingExistenceOptimization.storeUnsharedSnapshot( + snapshot, + unsharedMissingExistence + ); + } + if (managedItemInfo.size !== 0) { + snapshot.setManagedItemInfo(managedItemInfo); + this._managedItemInfoOptimization.storeUnsharedSnapshot( + snapshot, + unsharedManagedItemInfo + ); + } + const unsharedManagedFiles = this._managedFilesOptimization.optimize( + managedFiles, + undefined, + children + ); + if (managedFiles.size !== 0) { + snapshot.setManagedFiles(managedFiles); + this._managedFilesOptimization.storeUnsharedSnapshot( + snapshot, + unsharedManagedFiles + ); + } + const unsharedManagedContexts = this._managedContextsOptimization.optimize( + managedContexts, + undefined, + children + ); + if (managedContexts.size !== 0) { + snapshot.setManagedContexts(managedContexts); + this._managedContextsOptimization.storeUnsharedSnapshot( + snapshot, + unsharedManagedContexts + ); + } + const unsharedManagedMissing = this._managedMissingOptimization.optimize( + managedMissing, + undefined, + children + ); + if (managedMissing.size !== 0) { + snapshot.setManagedMissing(managedMissing); + this._managedMissingOptimization.storeUnsharedSnapshot( + snapshot, + unsharedManagedMissing + ); + } + if (children.size !== 0) { + snapshot.setChildren(children); + } + this._snapshotCache.set(snapshot, true); + this._statCreatedSnapshots++; + + callback(null, snapshot); + } + }; + const jobError = () => { + if (jobs > 0) { + // large negative number instead of NaN or something else to keep jobs to stay a SMI (v8) + jobs = -100000000; + callback(null, null); + } + }; + const checkManaged = (path, managedSet) => { + for (const immutablePath of this.immutablePathsWithSlash) { + if (path.startsWith(immutablePath)) { + managedSet.add(path); + return true; + } + } + for (const managedPath of this.managedPathsWithSlash) { + if (path.startsWith(managedPath)) { + const managedItem = getManagedItem(managedPath, path); + if (managedItem) { + managedItems.add(managedItem); + managedSet.add(path); + return true; + } + } + } + return false; + }; + const captureNonManaged = (items, managedSet) => { + const capturedItems = new Set(); + for (const path of items) { + if (!checkManaged(path, managedSet)) capturedItems.add(path); + } + return capturedItems; + }; + if (files) { + const capturedFiles = captureNonManaged(files, managedFiles); + switch (mode) { + case 3: + unsharedFileTshs = this._fileTshsOptimization.optimize( + capturedFiles, + undefined, + children + ); + for (const path of capturedFiles) { + const cache = this._fileTshs.get(path); + if (cache !== undefined) { + fileTshs.set(path, cache); + } else { + jobs++; + this._getFileTimestampAndHash(path, (err, entry) => { + if (err) { + if (this.logger) { + this.logger.debug( + `Error snapshotting file timestamp hash combination of ${path}: ${err}` + ); + } + jobError(); + } else { + fileTshs.set(path, entry); + jobDone(); + } + }); + } + } + break; + case 2: + unsharedFileHashes = this._fileHashesOptimization.optimize( + capturedFiles, + undefined, + children + ); + for (const path of capturedFiles) { + const cache = this._fileHashes.get(path); + if (cache !== undefined) { + fileHashes.set(path, cache); + } else { + jobs++; + this.fileHashQueue.add(path, (err, entry) => { + if (err) { + if (this.logger) { + this.logger.debug( + `Error snapshotting file hash of ${path}: ${err}` + ); + } + jobError(); + } else { + fileHashes.set(path, entry); + jobDone(); + } + }); + } + } + break; + case 1: + unsharedFileTimestamps = this._fileTimestampsOptimization.optimize( + capturedFiles, + startTime, + children + ); + for (const path of capturedFiles) { + const cache = this._fileTimestamps.get(path); + if (cache !== undefined) { + if (cache !== "ignore") { + fileTimestamps.set(path, cache); + } + } else { + jobs++; + this.fileTimestampQueue.add(path, (err, entry) => { + if (err) { + if (this.logger) { + this.logger.debug( + `Error snapshotting file timestamp of ${path}: ${err}` + ); + } + jobError(); + } else { + fileTimestamps.set(path, entry); + jobDone(); + } + }); + } + } + break; + } + } + if (directories) { + const capturedDirectories = captureNonManaged( + directories, + managedContexts + ); + switch (mode) { + case 3: + unsharedContextTshs = this._contextTshsOptimization.optimize( + capturedDirectories, + undefined, + children + ); + for (const path of capturedDirectories) { + const cache = this._contextTshs.get(path); + if (cache !== undefined) { + contextTshs.set(path, cache); + } else { + jobs++; + this._getContextTimestampAndHash(path, (err, entry) => { + if (err) { + if (this.logger) { + this.logger.debug( + `Error snapshotting context timestamp hash combination of ${path}: ${err}` + ); + } + jobError(); + } else { + contextTshs.set(path, entry); + jobDone(); + } + }); + } + } + break; + case 2: + unsharedContextHashes = this._contextHashesOptimization.optimize( + capturedDirectories, + undefined, + children + ); + for (const path of capturedDirectories) { + const cache = this._contextHashes.get(path); + if (cache !== undefined) { + contextHashes.set(path, cache); + } else { + jobs++; + this.contextHashQueue.add(path, (err, entry) => { + if (err) { + if (this.logger) { + this.logger.debug( + `Error snapshotting context hash of ${path}: ${err}` + ); + } + jobError(); + } else { + contextHashes.set(path, entry); + jobDone(); + } + }); + } + } + break; + case 1: + unsharedContextTimestamps = this._contextTimestampsOptimization.optimize( + capturedDirectories, + startTime, + children + ); + for (const path of capturedDirectories) { + const cache = this._contextTimestamps.get(path); + if (cache !== undefined) { + if (cache !== "ignore") { + contextTimestamps.set(path, cache); + } + } else { + jobs++; + this.contextTimestampQueue.add(path, (err, entry) => { + if (err) { + if (this.logger) { + this.logger.debug( + `Error snapshotting context timestamp of ${path}: ${err}` + ); + } + jobError(); + } else { + contextTimestamps.set(path, entry); + jobDone(); + } + }); + } + } + break; + } + } + if (missing) { + const capturedMissing = captureNonManaged(missing, managedMissing); + unsharedMissingExistence = this._missingExistenceOptimization.optimize( + capturedMissing, + startTime, + children + ); + for (const path of capturedMissing) { + const cache = this._fileTimestamps.get(path); + if (cache !== undefined) { + if (cache !== "ignore") { + missingExistence.set(path, toExistence(cache)); + } + } else { + jobs++; + this.fileTimestampQueue.add(path, (err, entry) => { + if (err) { + if (this.logger) { + this.logger.debug( + `Error snapshotting missing timestamp of ${path}: ${err}` + ); + } + jobError(); + } else { + missingExistence.set(path, toExistence(entry)); + jobDone(); + } + }); + } + } + } + unsharedManagedItemInfo = this._managedItemInfoOptimization.optimize( + managedItems, + undefined, + children + ); + for (const path of managedItems) { + const cache = this._managedItems.get(path); + if (cache !== undefined) { + managedItemInfo.set(path, cache); + } else { + jobs++; + this.managedItemQueue.add(path, (err, entry) => { + if (err) { + if (this.logger) { + this.logger.debug( + `Error snapshotting managed item ${path}: ${err}` + ); + } + jobError(); + } else { + managedItemInfo.set(path, entry); + jobDone(); + } + }); + } + } + jobDone(); + } + + /** + * @param {Snapshot} snapshot1 a snapshot + * @param {Snapshot} snapshot2 a snapshot + * @returns {Snapshot} merged snapshot + */ + mergeSnapshots(snapshot1, snapshot2) { + const snapshot = new Snapshot(); + if (snapshot1.hasStartTime() && snapshot2.hasStartTime()) + snapshot.setStartTime(Math.min(snapshot1.startTime, snapshot2.startTime)); + else if (snapshot2.hasStartTime()) snapshot.startTime = snapshot2.startTime; + else if (snapshot1.hasStartTime()) snapshot.startTime = snapshot1.startTime; + if (snapshot1.hasFileTimestamps() || snapshot2.hasFileTimestamps()) { + snapshot.setFileTimestamps( + mergeMaps(snapshot1.fileTimestamps, snapshot2.fileTimestamps) + ); + } + if (snapshot1.hasFileHashes() || snapshot2.hasFileHashes()) { + snapshot.setFileHashes( + mergeMaps(snapshot1.fileHashes, snapshot2.fileHashes) + ); + } + if (snapshot1.hasFileTshs() || snapshot2.hasFileTshs()) { + snapshot.setFileTshs(mergeMaps(snapshot1.fileTshs, snapshot2.fileTshs)); + } + if (snapshot1.hasContextTimestamps() || snapshot2.hasContextTimestamps()) { + snapshot.setContextTimestamps( + mergeMaps(snapshot1.contextTimestamps, snapshot2.contextTimestamps) + ); + } + if (snapshot1.hasContextHashes() || snapshot2.hasContextHashes()) { + snapshot.setContextHashes( + mergeMaps(snapshot1.contextHashes, snapshot2.contextHashes) + ); + } + if (snapshot1.hasContextTshs() || snapshot2.hasContextTshs()) { + snapshot.setContextTshs( + mergeMaps(snapshot1.contextTshs, snapshot2.contextTshs) + ); + } + if (snapshot1.hasMissingExistence() || snapshot2.hasMissingExistence()) { + snapshot.setMissingExistence( + mergeMaps(snapshot1.missingExistence, snapshot2.missingExistence) + ); + } + if (snapshot1.hasManagedItemInfo() || snapshot2.hasManagedItemInfo()) { + snapshot.setManagedItemInfo( + mergeMaps(snapshot1.managedItemInfo, snapshot2.managedItemInfo) + ); + } + if (snapshot1.hasManagedFiles() || snapshot2.hasManagedFiles()) { + snapshot.setManagedFiles( + mergeSets(snapshot1.managedFiles, snapshot2.managedFiles) + ); + } + if (snapshot1.hasManagedContexts() || snapshot2.hasManagedContexts()) { + snapshot.setManagedContexts( + mergeSets(snapshot1.managedContexts, snapshot2.managedContexts) + ); + } + if (snapshot1.hasManagedMissing() || snapshot2.hasManagedMissing()) { + snapshot.setManagedMissing( + mergeSets(snapshot1.managedMissing, snapshot2.managedMissing) + ); + } + if (snapshot1.hasChildren() || snapshot2.hasChildren()) { + snapshot.setChildren(mergeSets(snapshot1.children, snapshot2.children)); + } + if ( + this._snapshotCache.get(snapshot1) === true && + this._snapshotCache.get(snapshot2) === true + ) { + this._snapshotCache.set(snapshot, true); + } + return snapshot; + } + + /** + * @param {Snapshot} snapshot the snapshot made + * @param {function(WebpackError=, boolean=): void} callback callback function + * @returns {void} + */ + checkSnapshotValid(snapshot, callback) { + const cachedResult = this._snapshotCache.get(snapshot); + if (cachedResult !== undefined) { + this._statTestedSnapshotsCached++; + if (typeof cachedResult === "boolean") { + callback(null, cachedResult); + } else { + cachedResult.push(callback); + } + return; + } + this._statTestedSnapshotsNotCached++; + this._checkSnapshotValidNoCache(snapshot, callback); + } + + /** + * @param {Snapshot} snapshot the snapshot made + * @param {function(WebpackError=, boolean=): void} callback callback function + * @returns {void} + */ + _checkSnapshotValidNoCache(snapshot, callback) { + /** @type {number | undefined} */ + let startTime = undefined; + if (snapshot.hasStartTime()) { + startTime = snapshot.startTime; + } + let jobs = 1; + const jobDone = () => { + if (--jobs === 0) { + this._snapshotCache.set(snapshot, true); + callback(null, true); + } + }; + const invalid = () => { + if (jobs > 0) { + // large negative number instead of NaN or something else to keep jobs to stay a SMI (v8) + jobs = -100000000; + this._snapshotCache.set(snapshot, false); + callback(null, false); + } + }; + const invalidWithError = (path, err) => { + if (this._remainingLogs > 0) { + this._log(path, `error occurred: %s`, err); + } + invalid(); + }; + /** + * @param {string} path file path + * @param {string} current current hash + * @param {string} snap snapshot hash + * @returns {boolean} true, if ok + */ + const checkHash = (path, current, snap) => { + if (current !== snap) { + // If hash differ it's invalid + if (this._remainingLogs > 0) { + this._log(path, `hashes differ (%s != %s)`, current, snap); + } + return false; + } + return true; + }; + /** + * @param {string} path file path + * @param {boolean} current current entry + * @param {boolean} snap entry from snapshot + * @returns {boolean} true, if ok + */ + const checkExistence = (path, current, snap) => { + if (!current !== !snap) { + // If existence of item differs + // it's invalid + if (this._remainingLogs > 0) { + this._log( + path, + current ? "it didn't exist before" : "it does no longer exist" + ); + } + return false; + } + return true; + }; + /** + * @param {string} path file path + * @param {FileSystemInfoEntry} current current entry + * @param {FileSystemInfoEntry} snap entry from snapshot + * @param {boolean} log log reason + * @returns {boolean} true, if ok + */ + const checkFile = (path, current, snap, log = true) => { + if (current === snap) return true; + if (!current !== !snap) { + // If existence of item differs + // it's invalid + if (log && this._remainingLogs > 0) { + this._log( + path, + current ? "it didn't exist before" : "it does no longer exist" + ); + } + return false; + } + if (current) { + // For existing items only + if (typeof startTime === "number" && current.safeTime > startTime) { + // If a change happened after starting reading the item + // this may no longer be valid + if (log && this._remainingLogs > 0) { + this._log( + path, + `it may have changed (%d) after the start time of the snapshot (%d)`, + current.safeTime, + startTime + ); + } + return false; + } + if ( + snap.timestamp !== undefined && + current.timestamp !== snap.timestamp + ) { + // If we have a timestamp (it was a file or symlink) and it differs from current timestamp + // it's invalid + if (log && this._remainingLogs > 0) { + this._log( + path, + `timestamps differ (%d != %d)`, + current.timestamp, + snap.timestamp + ); + } + return false; + } + if ( + snap.timestampHash !== undefined && + current.timestampHash !== snap.timestampHash + ) { + // If we have a timestampHash (it was a directory) and it differs from current timestampHash + // it's invalid + if (log && this._remainingLogs > 0) { + this._log( + path, + `timestamps hashes differ (%s != %s)`, + current.timestampHash, + snap.timestampHash + ); + } + return false; + } + } + return true; + }; + if (snapshot.hasChildren()) { + const childCallback = (err, result) => { + if (err || !result) return invalid(); + else jobDone(); + }; + for (const child of snapshot.children) { + const cache = this._snapshotCache.get(child); + if (cache !== undefined) { + this._statTestedChildrenCached++; + /* istanbul ignore else */ + if (typeof cache === "boolean") { + if (cache === false) { + invalid(); + return; + } + } else { + jobs++; + cache.push(childCallback); + } + } else { + this._statTestedChildrenNotCached++; + jobs++; + this._checkSnapshotValidNoCache(child, childCallback); + } + } + } + if (snapshot.hasFileTimestamps()) { + const { fileTimestamps } = snapshot; + this._statTestedEntries += fileTimestamps.size; + for (const [path, ts] of fileTimestamps) { + const cache = this._fileTimestamps.get(path); + if (cache !== undefined) { + if (cache !== "ignore" && !checkFile(path, cache, ts)) { + invalid(); + return; + } + } else { + jobs++; + this.fileTimestampQueue.add(path, (err, entry) => { + if (err) return invalidWithError(path, err); + if (!checkFile(path, entry, ts)) { + invalid(); + } else { + jobDone(); + } + }); + } + } + } + const processFileHashSnapshot = (path, hash) => { + const cache = this._fileHashes.get(path); + if (cache !== undefined) { + if (cache !== "ignore" && !checkHash(path, cache, hash)) { + invalid(); + return; + } + } else { + jobs++; + this.fileHashQueue.add(path, (err, entry) => { + if (err) return invalidWithError(path, err); + if (!checkHash(path, entry, hash)) { + invalid(); + } else { + jobDone(); + } + }); + } + }; + if (snapshot.hasFileHashes()) { + const { fileHashes } = snapshot; + this._statTestedEntries += fileHashes.size; + for (const [path, hash] of fileHashes) { + processFileHashSnapshot(path, hash); + } + } + if (snapshot.hasFileTshs()) { + const { fileTshs } = snapshot; + this._statTestedEntries += fileTshs.size; + for (const [path, tsh] of fileTshs) { + if (typeof tsh === "string") { + processFileHashSnapshot(path, tsh); + } else { + const cache = this._fileTimestamps.get(path); + if (cache !== undefined) { + if (cache === "ignore" || !checkFile(path, cache, tsh, false)) { + processFileHashSnapshot(path, tsh.hash); + } + } else { + jobs++; + this.fileTimestampQueue.add(path, (err, entry) => { + if (err) return invalidWithError(path, err); + if (!checkFile(path, entry, tsh, false)) { + processFileHashSnapshot(path, tsh.hash); + } + jobDone(); + }); + } + } + } + } + if (snapshot.hasContextTimestamps()) { + const { contextTimestamps } = snapshot; + this._statTestedEntries += contextTimestamps.size; + for (const [path, ts] of contextTimestamps) { + const cache = this._contextTimestamps.get(path); + if (cache !== undefined) { + if (cache !== "ignore" && !checkFile(path, cache, ts)) { + invalid(); + return; + } + } else { + jobs++; + this.contextTimestampQueue.add(path, (err, entry) => { + if (err) return invalidWithError(path, err); + if (!checkFile(path, entry, ts)) { + invalid(); + } else { + jobDone(); + } + }); + } + } + } + const processContextHashSnapshot = (path, hash) => { + const cache = this._contextHashes.get(path); + if (cache !== undefined) { + if (cache !== "ignore" && !checkHash(path, cache, hash)) { + invalid(); + return; + } + } else { + jobs++; + this.contextHashQueue.add(path, (err, entry) => { + if (err) return invalidWithError(path, err); + if (!checkHash(path, entry, hash)) { + invalid(); + } else { + jobDone(); + } + }); + } + }; + if (snapshot.hasContextHashes()) { + const { contextHashes } = snapshot; + this._statTestedEntries += contextHashes.size; + for (const [path, hash] of contextHashes) { + processContextHashSnapshot(path, hash); + } + } + if (snapshot.hasContextTshs()) { + const { contextTshs } = snapshot; + this._statTestedEntries += contextTshs.size; + for (const [path, tsh] of contextTshs) { + if (typeof tsh === "string") { + processContextHashSnapshot(path, tsh); + } else { + const cache = this._contextTimestamps.get(path); + if (cache !== undefined) { + if (cache === "ignore" || !checkFile(path, cache, tsh, false)) { + processContextHashSnapshot(path, tsh.hash); + } + } else { + jobs++; + this.contextTimestampQueue.add(path, (err, entry) => { + if (err) return invalidWithError(path, err); + if (!checkFile(path, entry, tsh, false)) { + processContextHashSnapshot(path, tsh.hash); + } + jobDone(); + }); + } + } + } + } + if (snapshot.hasMissingExistence()) { + const { missingExistence } = snapshot; + this._statTestedEntries += missingExistence.size; + for (const [path, existence] of missingExistence) { + const cache = this._fileTimestamps.get(path); + if (cache !== undefined) { + if ( + cache !== "ignore" && + !checkExistence(path, toExistence(cache), existence) + ) { + invalid(); + return; + } + } else { + jobs++; + this.fileTimestampQueue.add(path, (err, entry) => { + if (err) return invalidWithError(path, err); + if (!checkExistence(path, toExistence(entry), existence)) { + invalid(); + } else { + jobDone(); + } + }); + } + } + } + if (snapshot.hasManagedItemInfo()) { + const { managedItemInfo } = snapshot; + this._statTestedEntries += managedItemInfo.size; + for (const [path, info] of managedItemInfo) { + const cache = this._managedItems.get(path); + if (cache !== undefined) { + if (!checkHash(path, cache, info)) { + invalid(); + return; + } + } else { + jobs++; + this.managedItemQueue.add(path, (err, entry) => { + if (err) return invalidWithError(path, err); + if (!checkHash(path, entry, info)) { + invalid(); + } else { + jobDone(); + } + }); + } + } + } + jobDone(); + + // if there was an async action + // try to join multiple concurrent request for this snapshot + if (jobs > 0) { + const callbacks = [callback]; + callback = (err, result) => { + for (const callback of callbacks) callback(err, result); + }; + this._snapshotCache.set(snapshot, callbacks); + } + } + + _readFileTimestamp(path, callback) { + this.fs.stat(path, (err, stat) => { + if (err) { + if (err.code === "ENOENT") { + this._fileTimestamps.set(path, null); + this._cachedDeprecatedFileTimestamps = undefined; + return callback(null, null); + } + return callback(err); + } + + let ts; + if (stat.isDirectory()) { + ts = { + safeTime: 0, + timestamp: undefined + }; + } else { + const mtime = +stat.mtime; + + if (mtime) applyMtime(mtime); + + ts = { + safeTime: mtime ? mtime + FS_ACCURACY : Infinity, + timestamp: mtime + }; + } + + this._fileTimestamps.set(path, ts); + this._cachedDeprecatedFileTimestamps = undefined; + + callback(null, ts); + }); + } + + _readFileHash(path, callback) { + this.fs.readFile(path, (err, content) => { + if (err) { + if (err.code === "EISDIR") { + this._fileHashes.set(path, "directory"); + return callback(null, "directory"); + } + if (err.code === "ENOENT") { + this._fileHashes.set(path, null); + return callback(null, null); + } + return callback(err); + } + + const hash = createHash("md4"); + + hash.update(content); + + const digest = /** @type {string} */ (hash.digest("hex")); + + this._fileHashes.set(path, digest); + + callback(null, digest); + }); + } + + _getFileTimestampAndHash(path, callback) { + const continueWithHash = hash => { + const cache = this._fileTimestamps.get(path); + if (cache !== undefined) { + if (cache !== "ignore") { + const result = { + ...cache, + hash + }; + this._fileTshs.set(path, result); + return callback(null, result); + } else { + this._fileTshs.set(path, hash); + return callback(null, hash); + } + } else { + this.fileTimestampQueue.add(path, (err, entry) => { + if (err) { + return callback(err); + } + const result = { + ...entry, + hash + }; + this._fileTshs.set(path, result); + return callback(null, result); + }); + } + }; + + const cache = this._fileHashes.get(path); + if (cache !== undefined) { + continueWithHash(cache); + } else { + this.fileHashQueue.add(path, (err, entry) => { + if (err) { + return callback(err); + } + continueWithHash(entry); + }); + } + } + + _readContextTimestamp(path, callback) { + this.fs.readdir(path, (err, files) => { + if (err) { + if (err.code === "ENOENT") { + this._contextTimestamps.set(path, null); + this._cachedDeprecatedContextTimestamps = undefined; + return callback(null, null); + } + return callback(err); + } + files = files + .map(file => file.normalize("NFC")) + .filter(file => !/^\./.test(file)) + .sort(); + asyncLib.map( + files, + (file, callback) => { + const child = join(this.fs, path, file); + this.fs.stat(child, (err, stat) => { + if (err) return callback(err); + + for (const immutablePath of this.immutablePathsWithSlash) { + if (path.startsWith(immutablePath)) { + // ignore any immutable path for timestamping + return callback(null, null); + } + } + for (const managedPath of this.managedPathsWithSlash) { + if (path.startsWith(managedPath)) { + const managedItem = getManagedItem(managedPath, child); + if (managedItem) { + // construct timestampHash from managed info + return this.managedItemQueue.add(managedItem, (err, info) => { + if (err) return callback(err); + return callback(null, { + safeTime: 0, + timestampHash: info + }); + }); + } + } + } + + if (stat.isFile()) { + return this.getFileTimestamp(child, callback); + } + if (stat.isDirectory()) { + this.contextTimestampQueue.increaseParallelism(); + this.getContextTimestamp(child, (err, tsEntry) => { + this.contextTimestampQueue.decreaseParallelism(); + callback(err, tsEntry); + }); + return; + } + callback(null, null); + }); + }, + (err, tsEntries) => { + if (err) return callback(err); + const hash = createHash("md4"); + + for (const file of files) hash.update(file); + let safeTime = 0; + for (const entry of tsEntries) { + if (!entry) { + hash.update("n"); + continue; + } + if (entry.timestamp) { + hash.update("f"); + hash.update(`${entry.timestamp}`); + } else if (entry.timestampHash) { + hash.update("d"); + hash.update(`${entry.timestampHash}`); + } + if (entry.safeTime) { + safeTime = Math.max(safeTime, entry.safeTime); + } + } + + const digest = /** @type {string} */ (hash.digest("hex")); + + const result = { + safeTime, + timestampHash: digest + }; + + this._contextTimestamps.set(path, result); + this._cachedDeprecatedContextTimestamps = undefined; + + callback(null, result); + } + ); + }); + } + + _readContextHash(path, callback) { + this.fs.readdir(path, (err, files) => { + if (err) { + if (err.code === "ENOENT") { + this._contextHashes.set(path, null); + return callback(null, null); + } + return callback(err); + } + files = files + .map(file => file.normalize("NFC")) + .filter(file => !/^\./.test(file)) + .sort(); + asyncLib.map( + files, + (file, callback) => { + const child = join(this.fs, path, file); + this.fs.stat(child, (err, stat) => { + if (err) return callback(err); + + for (const immutablePath of this.immutablePathsWithSlash) { + if (path.startsWith(immutablePath)) { + // ignore any immutable path for hashing + return callback(null, ""); + } + } + for (const managedPath of this.managedPathsWithSlash) { + if (path.startsWith(managedPath)) { + const managedItem = getManagedItem(managedPath, child); + if (managedItem) { + // construct hash from managed info + return this.managedItemQueue.add(managedItem, (err, info) => { + if (err) return callback(err); + callback(null, info || ""); + }); + } + } + } + + if (stat.isFile()) { + return this.getFileHash(child, (err, hash) => { + callback(err, hash || ""); + }); + } + if (stat.isDirectory()) { + this.contextHashQueue.increaseParallelism(); + this.getContextHash(child, (err, hash) => { + this.contextHashQueue.decreaseParallelism(); + callback(err, hash || ""); + }); + return; + } + callback(null, ""); + }); + }, + (err, fileHashes) => { + if (err) return callback(err); + const hash = createHash("md4"); + + for (const file of files) hash.update(file); + for (const h of fileHashes) hash.update(h); + + const digest = /** @type {string} */ (hash.digest("hex")); + + this._contextHashes.set(path, digest); + + callback(null, digest); + } + ); + }); + } + + _getContextTimestampAndHash(path, callback) { + const continueWithHash = hash => { + const cache = this._contextTimestamps.get(path); + if (cache !== undefined) { + if (cache !== "ignore") { + const result = { + ...cache, + hash + }; + this._contextTshs.set(path, result); + return callback(null, result); + } else { + this._contextTshs.set(path, hash); + return callback(null, hash); + } + } else { + this.contextTimestampQueue.add(path, (err, entry) => { + if (err) { + return callback(err); + } + const result = { + ...entry, + hash + }; + this._contextTshs.set(path, result); + return callback(null, result); + }); + } + }; + + const cache = this._contextHashes.get(path); + if (cache !== undefined) { + continueWithHash(cache); + } else { + this.contextHashQueue.add(path, (err, entry) => { + if (err) { + return callback(err); + } + continueWithHash(entry); + }); + } + } + + _getManagedItemDirectoryInfo(path, callback) { + this.fs.readdir(path, (err, elements) => { + if (err) { + if (err.code === "ENOENT" || err.code === "ENOTDIR") { + return callback(null, EMPTY_SET); + } + return callback(err); + } + const set = new Set( + elements.map(element => join(this.fs, path, element)) + ); + callback(null, set); + }); + } + + _getManagedItemInfo(path, callback) { + const dir = dirname(this.fs, path); + this.managedItemDirectoryQueue.add(dir, (err, elements) => { + if (err) { + return callback(err); + } + if (!elements.has(path)) { + // file or directory doesn't exist + this._managedItems.set(path, "missing"); + return callback(null, "missing"); + } + // something exists + // it may be a file or directory + if ( + path.endsWith("node_modules") && + (path.endsWith("/node_modules") || path.endsWith("\\node_modules")) + ) { + // we are only interested in existence of this special directory + this._managedItems.set(path, "exists"); + return callback(null, "exists"); + } + + // we assume it's a directory, as files shouldn't occur in managed paths + const packageJsonPath = join(this.fs, path, "package.json"); + this.fs.readFile(packageJsonPath, (err, content) => { + if (err) { + if (err.code === "ENOENT" || err.code === "ENOTDIR") { + // no package.json or path is not a directory + this.fs.readdir(path, (err, elements) => { + if ( + !err && + elements.length === 1 && + elements[0] === "node_modules" + ) { + // This is only a grouping folder e. g. used by yarn + // we are only interested in existence of this special directory + this._managedItems.set(path, "nested"); + return callback(null, "nested"); + } + const problem = `Managed item ${path} isn't a directory or doesn't contain a package.json`; + this.logger.warn(problem); + return callback(new Error(problem)); + }); + return; + } + return callback(err); + } + let data; + try { + data = JSON.parse(content.toString("utf-8")); + } catch (e) { + return callback(e); + } + const info = `${data.name || ""}@${data.version || ""}`; + this._managedItems.set(path, info); + callback(null, info); + }); + }); + } + + getDeprecatedFileTimestamps() { + if (this._cachedDeprecatedFileTimestamps !== undefined) + return this._cachedDeprecatedFileTimestamps; + const map = new Map(); + for (const [path, info] of this._fileTimestamps) { + if (info) map.set(path, typeof info === "object" ? info.safeTime : null); + } + return (this._cachedDeprecatedFileTimestamps = map); + } + + getDeprecatedContextTimestamps() { + if (this._cachedDeprecatedContextTimestamps !== undefined) + return this._cachedDeprecatedContextTimestamps; + const map = new Map(); + for (const [path, info] of this._contextTimestamps) { + if (info) map.set(path, typeof info === "object" ? info.safeTime : null); + } + return (this._cachedDeprecatedContextTimestamps = map); + } +} + +module.exports = FileSystemInfo; +module.exports.Snapshot = Snapshot; + + +/***/ }), + +/***/ 32061: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { getEntryRuntime, mergeRuntimeOwned } = __webpack_require__(43478); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +class FlagAllModulesAsUsedPlugin { + constructor(explanation) { + this.explanation = explanation; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "FlagAllModulesAsUsedPlugin", + compilation => { + const moduleGraph = compilation.moduleGraph; + compilation.hooks.optimizeDependencies.tap( + "FlagAllModulesAsUsedPlugin", + modules => { + /** @type {RuntimeSpec} */ + let runtime = undefined; + for (const [name, { options }] of compilation.entries) { + runtime = mergeRuntimeOwned( + runtime, + getEntryRuntime(compilation, name, options) + ); + } + for (const module of modules) { + const exportsInfo = moduleGraph.getExportsInfo(module); + exportsInfo.setUsedInUnknownWay(runtime); + moduleGraph.addExtraReason(module, this.explanation); + if (module.factoryMeta === undefined) { + module.factoryMeta = {}; + } + module.factoryMeta.sideEffectFree = false; + } + } + ); + } + ); + } +} + +module.exports = FlagAllModulesAsUsedPlugin; + + +/***/ }), + +/***/ 79073: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const Queue = __webpack_require__(85987); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Dependency").ExportSpec} ExportSpec */ +/** @typedef {import("./ExportsInfo")} ExportsInfo */ +/** @typedef {import("./Module")} Module */ + +class FlagDependencyExportsPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "FlagDependencyExportsPlugin", + compilation => { + const moduleGraph = compilation.moduleGraph; + const cache = compilation.getCache("FlagDependencyExportsPlugin"); + compilation.hooks.finishModules.tapAsync( + "FlagDependencyExportsPlugin", + (modules, callback) => { + const logger = compilation.getLogger( + "webpack.FlagDependencyExportsPlugin" + ); + let statRestoredFromCache = 0; + let statFlaggedUncached = 0; + let statNotCached = 0; + let statQueueItemsProcessed = 0; + + /** @type {Queue} */ + const queue = new Queue(); + + // Step 1: Try to restore cached provided export info from cache + logger.time("restore cached provided exports"); + asyncLib.each( + modules, + (module, callback) => { + if ( + module.buildInfo.cacheable !== true || + typeof module.buildInfo.hash !== "string" + ) { + statFlaggedUncached++; + // Enqueue uncacheable module for determining the exports + queue.enqueue(module); + moduleGraph.getExportsInfo(module).setHasProvideInfo(); + return callback(); + } + cache.get( + module.identifier(), + module.buildInfo.hash, + (err, result) => { + if (err) return callback(err); + + if (result !== undefined) { + statRestoredFromCache++; + moduleGraph + .getExportsInfo(module) + .restoreProvided(result); + } else { + statNotCached++; + // Without cached info enqueue module for determining the exports + queue.enqueue(module); + moduleGraph.getExportsInfo(module).setHasProvideInfo(); + } + callback(); + } + ); + }, + err => { + logger.timeEnd("restore cached provided exports"); + if (err) return callback(err); + + /** @type {Set} */ + const modulesToStore = new Set(); + + /** @type {Map>} */ + const dependencies = new Map(); + + /** @type {Module} */ + let module; + + /** @type {ExportsInfo} */ + let exportsInfo; + + let cacheable = true; + let changed = false; + + /** + * @param {DependenciesBlock} depBlock the dependencies block + * @returns {void} + */ + const processDependenciesBlock = depBlock => { + for (const dep of depBlock.dependencies) { + processDependency(dep); + } + for (const block of depBlock.blocks) { + processDependenciesBlock(block); + } + }; + + /** + * @param {Dependency} dep the dependency + * @returns {void} + */ + const processDependency = dep => { + const exportDesc = dep.getExports(moduleGraph); + if (!exportDesc) return; + const exports = exportDesc.exports; + const globalCanMangle = exportDesc.canMangle; + const globalFrom = exportDesc.from; + const globalTerminalBinding = + exportDesc.terminalBinding || false; + const exportDeps = exportDesc.dependencies; + if (exports === true) { + // unknown exports + if ( + exportsInfo.setUnknownExportsProvided( + globalCanMangle, + exportDesc.excludeExports, + globalFrom && dep, + globalFrom + ) + ) { + changed = true; + } + } else if (Array.isArray(exports)) { + /** + * merge in new exports + * @param {ExportsInfo} exportsInfo own exports info + * @param {(ExportSpec | string)[]} exports list of exports + */ + const mergeExports = (exportsInfo, exports) => { + for (const exportNameOrSpec of exports) { + let name; + let canMangle = globalCanMangle; + let terminalBinding = globalTerminalBinding; + let exports = undefined; + let from = globalFrom; + let fromExport = undefined; + if (typeof exportNameOrSpec === "string") { + name = exportNameOrSpec; + } else { + name = exportNameOrSpec.name; + if (exportNameOrSpec.canMangle !== undefined) + canMangle = exportNameOrSpec.canMangle; + if (exportNameOrSpec.export !== undefined) + fromExport = exportNameOrSpec.export; + if (exportNameOrSpec.exports !== undefined) + exports = exportNameOrSpec.exports; + if (exportNameOrSpec.from !== undefined) + from = exportNameOrSpec.from; + if (exportNameOrSpec.terminalBinding !== undefined) + terminalBinding = exportNameOrSpec.terminalBinding; + } + const exportInfo = exportsInfo.getExportInfo(name); + + if (exportInfo.provided === false) { + exportInfo.provided = true; + changed = true; + } + + if ( + exportInfo.canMangleProvide !== false && + canMangle === false + ) { + exportInfo.canMangleProvide = false; + changed = true; + } + + if (terminalBinding && !exportInfo.terminalBinding) { + exportInfo.terminalBinding = true; + changed = true; + } + + if (exports) { + const nestedExportsInfo = exportInfo.createNestedExportsInfo(); + mergeExports(nestedExportsInfo, exports); + } + + if ( + from && + exportInfo.setTarget( + dep, + from, + fromExport === undefined ? [name] : fromExport + ) + ) { + changed = true; + } + + // Recalculate target exportsInfo + const target = exportInfo.getTarget(moduleGraph); + let targetExportsInfo = undefined; + if (target) { + const targetModuleExportsInfo = moduleGraph.getExportsInfo( + target.module + ); + targetExportsInfo = targetModuleExportsInfo.getNestedExportsInfo( + target.export + ); + // add dependency for this module + const set = dependencies.get(target.module); + if (set === undefined) { + dependencies.set(target.module, new Set([module])); + } else { + set.add(module); + } + } + + if (exportInfo.exportsInfoOwned) { + if ( + exportInfo.exportsInfo.setRedirectNamedTo( + targetExportsInfo + ) + ) { + changed = true; + } + } else if ( + exportInfo.exportsInfo !== targetExportsInfo + ) { + exportInfo.exportsInfo = targetExportsInfo; + changed = true; + } + } + }; + mergeExports(exportsInfo, exports); + } + // store dependencies + if (exportDeps) { + cacheable = false; + for (const exportDependency of exportDeps) { + // add dependency for this module + const set = dependencies.get(exportDependency); + if (set === undefined) { + dependencies.set(exportDependency, new Set([module])); + } else { + set.add(module); + } + } + } + }; + + const notifyDependencies = () => { + const deps = dependencies.get(module); + if (deps !== undefined) { + for (const dep of deps) { + queue.enqueue(dep); + } + } + }; + + logger.time("figure out provided exports"); + while (queue.length > 0) { + module = queue.dequeue(); + + statQueueItemsProcessed++; + + exportsInfo = moduleGraph.getExportsInfo(module); + if (!module.buildMeta || !module.buildMeta.exportsType) { + if (exportsInfo.otherExportsInfo.provided !== null) { + // It's a module without declared exports + exportsInfo.setUnknownExportsProvided(); + modulesToStore.add(module); + notifyDependencies(); + } + } else { + // It's a module with declared exports + + cacheable = true; + changed = false; + + processDependenciesBlock(module); + + if (cacheable) { + modulesToStore.add(module); + } + + if (changed) { + notifyDependencies(); + } + } + } + logger.timeEnd("figure out provided exports"); + + logger.log( + `${Math.round( + 100 - + (100 * statRestoredFromCache) / + (statRestoredFromCache + + statNotCached + + statFlaggedUncached) + )}% of exports of modules have been determined (${statNotCached} not cached, ${statFlaggedUncached} flagged uncacheable, ${statRestoredFromCache} from cache, ${ + statQueueItemsProcessed - + statNotCached - + statFlaggedUncached + } additional calculations due to dependencies)` + ); + + logger.time("store provided exports into cache"); + asyncLib.each( + modulesToStore, + (module, callback) => { + if ( + module.buildInfo.cacheable !== true || + typeof module.buildInfo.hash !== "string" + ) { + // not cacheable + return callback(); + } + cache.store( + module.identifier(), + module.buildInfo.hash, + moduleGraph + .getExportsInfo(module) + .getRestoreProvidedData(), + callback + ); + }, + err => { + logger.timeEnd("store provided exports into cache"); + callback(err); + } + ); + } + ); + } + ); + + /** @type {WeakMap} */ + const providedExportsCache = new WeakMap(); + compilation.hooks.rebuildModule.tap( + "FlagDependencyExportsPlugin", + module => { + providedExportsCache.set( + module, + moduleGraph.getExportsInfo(module).getRestoreProvidedData() + ); + } + ); + compilation.hooks.finishRebuildingModule.tap( + "FlagDependencyExportsPlugin", + module => { + moduleGraph + .getExportsInfo(module) + .restoreProvided(providedExportsCache.get(module)); + } + ); + } + ); + } +} + +module.exports = FlagDependencyExportsPlugin; + + +/***/ }), + +/***/ 13598: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const { UsageState } = __webpack_require__(54227); +const ModuleGraphConnection = __webpack_require__(39519); +const { STAGE_DEFAULT } = __webpack_require__(90412); +const TupleQueue = __webpack_require__(13590); +const { getEntryRuntime, mergeRuntimeOwned } = __webpack_require__(43478); + +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("./ExportsInfo")} ExportsInfo */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +const { NO_EXPORTS_REFERENCED, EXPORTS_OBJECT_REFERENCED } = Dependency; + +class FlagDependencyUsagePlugin { + /** + * @param {boolean} global do a global analysis instead of per runtime + */ + constructor(global) { + this.global = global; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("FlagDependencyUsagePlugin", compilation => { + const moduleGraph = compilation.moduleGraph; + compilation.hooks.optimizeDependencies.tap( + { + name: "FlagDependencyUsagePlugin", + stage: STAGE_DEFAULT + }, + modules => { + const logger = compilation.getLogger( + "webpack.FlagDependencyUsagePlugin" + ); + + /** @type {Map} */ + const exportInfoToModuleMap = new Map(); + + /** @type {TupleQueue<[Module, RuntimeSpec]>} */ + const queue = new TupleQueue(); + + /** + * @param {Module} module module to process + * @param {(string[] | ReferencedExport)[]} usedExports list of used exports + * @param {RuntimeSpec} runtime part of which runtime + * @param {boolean} forceSideEffects always apply side effects + * @returns {void} + */ + const processReferencedModule = ( + module, + usedExports, + runtime, + forceSideEffects + ) => { + const exportsInfo = moduleGraph.getExportsInfo(module); + if (usedExports.length > 0) { + if (!module.buildMeta || !module.buildMeta.exportsType) { + if (exportsInfo.setUsedWithoutInfo(runtime)) { + queue.enqueue(module, runtime); + } + return; + } + for (const usedExportInfo of usedExports) { + let usedExport; + let canMangle = true; + if (Array.isArray(usedExportInfo)) { + usedExport = usedExportInfo; + } else { + usedExport = usedExportInfo.name; + canMangle = usedExportInfo.canMangle !== false; + } + if (usedExport.length === 0) { + if (exportsInfo.setUsedInUnknownWay(runtime)) { + queue.enqueue(module, runtime); + } + } else { + let currentExportsInfo = exportsInfo; + for (let i = 0; i < usedExport.length; i++) { + const exportInfo = currentExportsInfo.getExportInfo( + usedExport[i] + ); + if (canMangle === false) { + exportInfo.canMangleUse = false; + } + const lastOne = i === usedExport.length - 1; + if (!lastOne) { + const nestedInfo = exportInfo.getNestedExportsInfo(); + if (nestedInfo) { + if ( + exportInfo.setUsedConditionally( + used => used === UsageState.Unused, + UsageState.OnlyPropertiesUsed, + runtime + ) + ) { + const currentModule = + currentExportsInfo === exportsInfo + ? module + : exportInfoToModuleMap.get(currentExportsInfo); + if (currentModule) { + queue.enqueue(currentModule, runtime); + } + } + currentExportsInfo = nestedInfo; + continue; + } + } + if ( + exportInfo.setUsedConditionally( + v => v !== UsageState.Used, + UsageState.Used, + runtime + ) + ) { + const currentModule = + currentExportsInfo === exportsInfo + ? module + : exportInfoToModuleMap.get(currentExportsInfo); + if (currentModule) { + queue.enqueue(currentModule, runtime); + } + } + break; + } + } + } + } else { + // for a module without side effects we stop tracking usage here when no export is used + // This module won't be evaluated in this case + // TODO webpack 6 remove this check + if ( + !forceSideEffects && + module.factoryMeta !== undefined && + module.factoryMeta.sideEffectFree + ) { + return; + } + if (exportsInfo.setUsedForSideEffectsOnly(runtime)) { + queue.enqueue(module, runtime); + } + } + }; + + /** + * @param {DependenciesBlock} module the module + * @param {RuntimeSpec} runtime part of which runtime + * @returns {void} + */ + const processModule = (module, runtime) => { + /** @type {Map>} */ + const map = new Map(); + + /** @type {DependenciesBlock[]} */ + const queue = [module]; + for (const block of queue) { + for (const b of block.blocks) { + if ( + !this.global && + b.groupOptions && + b.groupOptions.entryOptions + ) { + processModule(b, b.groupOptions.entryOptions.runtime); + } else { + queue.push(b); + } + } + for (const dep of block.dependencies) { + const connection = moduleGraph.getConnection(dep); + if (!connection || !connection.module) { + continue; + } + const activeState = connection.getActiveState(runtime); + if (activeState === false) continue; + const { module } = connection; + if (activeState === ModuleGraphConnection.TRANSITIVE_ONLY) { + processModule(module, runtime); + continue; + } + const oldReferencedExports = map.get(module); + if (oldReferencedExports === EXPORTS_OBJECT_REFERENCED) { + continue; + } + const referencedExports = compilation.getDependencyReferencedExports( + dep, + runtime + ); + if ( + oldReferencedExports === undefined || + oldReferencedExports === NO_EXPORTS_REFERENCED || + referencedExports === EXPORTS_OBJECT_REFERENCED + ) { + map.set(module, referencedExports); + } else if ( + oldReferencedExports !== undefined && + referencedExports === NO_EXPORTS_REFERENCED + ) { + continue; + } else { + let exportsMap; + if (Array.isArray(oldReferencedExports)) { + exportsMap = new Map(); + for (const item of oldReferencedExports) { + if (Array.isArray(item)) { + exportsMap.set(item.join("\n"), item); + } else { + exportsMap.set(item.name.join("\n"), item); + } + } + map.set(module, exportsMap); + } else { + exportsMap = oldReferencedExports; + } + for (const item of referencedExports) { + if (Array.isArray(item)) { + const key = item.join("\n"); + const oldItem = exportsMap.get(key); + if (oldItem === undefined) { + exportsMap.set(key, item); + } + // if oldItem is already an array we have to do nothing + // if oldItem is an ReferencedExport object, we don't have to do anything + // as canMangle defaults to true for arrays + } else { + const key = item.name.join("\n"); + const oldItem = exportsMap.get(key); + if (oldItem === undefined || Array.isArray(oldItem)) { + exportsMap.set(key, item); + } else { + exportsMap.set(key, { + name: item.name, + canMangle: item.canMangle && oldItem.canMangle + }); + } + } + } + } + } + } + + for (const [module, referencedExports] of map) { + if (Array.isArray(referencedExports)) { + processReferencedModule( + module, + referencedExports, + runtime, + false + ); + } else { + processReferencedModule( + module, + Array.from(referencedExports.values()), + runtime, + false + ); + } + } + }; + + logger.time("initialize exports usage"); + for (const module of modules) { + const exportsInfo = moduleGraph.getExportsInfo(module); + exportInfoToModuleMap.set(exportsInfo, module); + exportsInfo.setHasUseInfo(); + } + logger.timeEnd("initialize exports usage"); + + logger.time("trace exports usage in graph"); + + /** + * @param {Dependency} dep dependency + * @param {RuntimeSpec} runtime runtime + */ + const processEntryDependency = (dep, runtime) => { + const module = moduleGraph.getModule(dep); + if (module) { + processReferencedModule( + module, + NO_EXPORTS_REFERENCED, + runtime, + true + ); + } + }; + /** @type {RuntimeSpec} */ + let globalRuntime = undefined; + for (const [ + entryName, + { dependencies: deps, includeDependencies: includeDeps, options } + ] of compilation.entries) { + const runtime = this.global + ? undefined + : getEntryRuntime(compilation, entryName, options); + for (const dep of deps) { + processEntryDependency(dep, runtime); + } + for (const dep of includeDeps) { + processEntryDependency(dep, runtime); + } + globalRuntime = mergeRuntimeOwned(globalRuntime, runtime); + } + for (const dep of compilation.globalEntry.dependencies) { + processEntryDependency(dep, globalRuntime); + } + for (const dep of compilation.globalEntry.includeDependencies) { + processEntryDependency(dep, globalRuntime); + } + + while (queue.length) { + const [module, runtime] = queue.dequeue(); + processModule(module, runtime); + } + logger.timeEnd("trace exports usage in graph"); + } + ); + }); + } +} + +module.exports = FlagDependencyUsagePlugin; + + +/***/ }), + +/***/ 18755: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sergey Melyukov @smelukov +*/ + + + +const InnerGraph = __webpack_require__(76094); + +/** @typedef {import("./Compiler")} Compiler */ + +class FlagUsingEvalPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "FlagUsingEvalPlugin", + (compilation, { normalModuleFactory }) => { + const handler = parser => { + parser.hooks.call.for("eval").tap("FlagUsingEvalPlugin", () => { + parser.state.module.buildInfo.moduleConcatenationBailout = "eval()"; + parser.state.module.buildInfo.usingEval = true; + InnerGraph.bailout(parser.state); + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("FlagUsingEvalPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("FlagUsingEvalPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("FlagUsingEvalPlugin", handler); + } + ); + } +} + +module.exports = FlagUsingEvalPlugin; + + +/***/ }), + +/***/ 14052: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./ConcatenationScope")} ConcatenationScope */ +/** @typedef {import("./DependencyTemplate")} DependencyTemplate */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./NormalModule")} NormalModule */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./util/Hash")} Hash */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * @typedef {Object} GenerateContext + * @property {DependencyTemplates} dependencyTemplates mapping from dependencies to templates + * @property {RuntimeTemplate} runtimeTemplate the runtime template + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + * @property {Set} runtimeRequirements the requirements for runtime + * @property {RuntimeSpec} runtime the runtime + * @property {ConcatenationScope=} concatenationScope when in concatenated module, information about other concatenated modules + * @property {string} type which kind of code should be generated + */ + +/** + * @typedef {Object} UpdateHashContext + * @property {NormalModule} module the module + * @property {ChunkGraph} chunkGraph + * @property {RuntimeSpec} runtime + */ + +/** + * + */ +class Generator { + static byType(map) { + return new ByTypeGenerator(map); + } + + /* istanbul ignore next */ + /** + * @abstract + * @param {NormalModule} module fresh module + * @returns {Set} available types (do not mutate) + */ + getTypes(module) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /* istanbul ignore next */ + /** + * @abstract + * @param {NormalModule} module the module + * @param {string=} type source type + * @returns {number} estimate size of the module + */ + getSize(module, type) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /* istanbul ignore next */ + /** + * @abstract + * @param {NormalModule} module module for which the code should be generated + * @param {GenerateContext} generateContext context for generate + * @returns {Source} generated code + */ + generate( + module, + { dependencyTemplates, runtimeTemplate, moduleGraph, type } + ) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /** + * @param {NormalModule} module module for which the bailout reason should be determined + * @param {ConcatenationBailoutReasonContext} context context + * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated + */ + getConcatenationBailoutReason(module, context) { + return `Module Concatenation is not implemented for ${this.constructor.name}`; + } + + /** + * @param {Hash} hash hash that will be modified + * @param {UpdateHashContext} updateHashContext context for updating hash + */ + updateHash(hash, { module, runtime }) { + // no nothing + } +} + +class ByTypeGenerator extends Generator { + constructor(map) { + super(); + this.map = map; + this._types = new Set(Object.keys(map)); + } + + /** + * @param {NormalModule} module fresh module + * @returns {Set} available types (do not mutate) + */ + getTypes(module) { + return this._types; + } + + /** + * @param {NormalModule} module the module + * @param {string=} type source type + * @returns {number} estimate size of the module + */ + getSize(module, type) { + const t = type || "javascript"; + const generator = this.map[t]; + return generator ? generator.getSize(module, t) : 0; + } + + /** + * @param {NormalModule} module module for which the code should be generated + * @param {GenerateContext} generateContext context for generate + * @returns {Source} generated code + */ + generate(module, generateContext) { + const type = generateContext.type; + const generator = this.map[type]; + if (!generator) { + throw new Error(`Generator.byType: no generator specified for ${type}`); + } + return generator.generate(module, generateContext); + } +} + +module.exports = Generator; + + +/***/ }), + +/***/ 92065: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./Module")} Module */ + +/** + * @param {ChunkGroup} chunkGroup the ChunkGroup to connect + * @param {Chunk} chunk chunk to tie to ChunkGroup + * @returns {void} + */ +const connectChunkGroupAndChunk = (chunkGroup, chunk) => { + if (chunkGroup.pushChunk(chunk)) { + chunk.addGroup(chunkGroup); + } +}; + +/** + * @param {ChunkGroup} parent parent ChunkGroup to connect + * @param {ChunkGroup} child child ChunkGroup to connect + * @returns {void} + */ +const connectChunkGroupParentAndChild = (parent, child) => { + if (parent.addChild(child)) { + child.addParent(parent); + } +}; + +exports.connectChunkGroupAndChunk = connectChunkGroupAndChunk; +exports.connectChunkGroupParentAndChild = connectChunkGroupParentAndChild; + + +/***/ }), + +/***/ 73474: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const WebpackError = __webpack_require__(24274); + +module.exports = class HarmonyLinkingError extends WebpackError { + /** @param {string} message Error message */ + constructor(message) { + super(message); + this.name = "HarmonyLinkingError"; + this.hideStack = true; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 14953: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Module")} Module */ + +/** + * @template T + * @callback Callback + * @param {Error=} err + * @param {T=} stats + * @returns {void} + */ + +class HookWebpackError extends WebpackError { + /** + * Creates an instance of HookWebpackError. + * @param {Error} error inner error + * @param {string} hook name of hook + */ + constructor(error, hook) { + super(error.message); + + this.name = "HookWebpackError"; + this.hook = hook; + this.error = error; + this.hideStack = true; + this.details = `caused by plugins in ${hook}\n${error.stack}`; + + Error.captureStackTrace(this, this.constructor); + this.stack += `\n-- inner error --\n${error.stack}`; + } +} + +module.exports = HookWebpackError; + +/** + * @param {Error} error an error + * @param {string} hook name of the hook + * @returns {WebpackError} a webpack error + */ +const makeWebpackError = (error, hook) => { + if (error instanceof WebpackError) return error; + return new HookWebpackError(error, hook); +}; +module.exports.makeWebpackError = makeWebpackError; + +/** + * @template T + * @param {function(WebpackError=, T=): void} callback webpack error callback + * @param {string} hook name of hook + * @returns {Callback} generic callback + */ +const makeWebpackErrorCallback = (callback, hook) => { + return (err, result) => { + if (err) { + if (err instanceof WebpackError) { + callback(err); + return; + } + callback(new HookWebpackError(err, hook)); + return; + } + callback(null, result); + }; +}; + +module.exports.makeWebpackErrorCallback = makeWebpackErrorCallback; + +/** + * @template T + * @param {function(): T} fn function which will be wrapping in try catch + * @param {string} hook name of hook + * @returns {T} the result + */ +const tryRunOrWebpackError = (fn, hook) => { + let r; + try { + r = fn(); + } catch (err) { + if (err instanceof WebpackError) { + throw err; + } + throw new HookWebpackError(err, hook); + } + return r; +}; + +module.exports.tryRunOrWebpackError = tryRunOrWebpackError; + + +/***/ }), + +/***/ 26475: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { SyncBailHook } = __webpack_require__(18416); +const { RawSource } = __webpack_require__(55600); +const ChunkGraph = __webpack_require__(67518); +const Compilation = __webpack_require__(75388); +const HotUpdateChunk = __webpack_require__(90972); +const NormalModule = __webpack_require__(88376); +const RuntimeGlobals = __webpack_require__(48801); +const WebpackError = __webpack_require__(24274); +const ConstDependency = __webpack_require__(9364); +const ImportMetaHotAcceptDependency = __webpack_require__(41559); +const ImportMetaHotDeclineDependency = __webpack_require__(33924); +const ModuleHotAcceptDependency = __webpack_require__(72529); +const ModuleHotDeclineDependency = __webpack_require__(53025); +const HotModuleReplacementRuntimeModule = __webpack_require__(3588); +const JavascriptParser = __webpack_require__(87507); +const { + evaluateToIdentifier +} = __webpack_require__(98550); +const { find, isSubset } = __webpack_require__(86088); +const TupleSet = __webpack_require__(86465); +const { compareModulesById } = __webpack_require__(21699); +const { + getRuntimeKey, + keyToRuntime, + forEachRuntime, + mergeRuntimeOwned, + subtractRuntime +} = __webpack_require__(43478); + +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./RuntimeModule")} RuntimeModule */ + +/** + * @typedef {Object} HMRJavascriptParserHooks + * @property {SyncBailHook<[TODO, string[]], void>} hotAcceptCallback + * @property {SyncBailHook<[TODO, string[]], void>} hotAcceptWithoutCallback + */ + +/** @type {WeakMap} */ +const parserHooksMap = new WeakMap(); + +class HotModuleReplacementPlugin { + /** + * @param {JavascriptParser} parser the parser + * @returns {HMRJavascriptParserHooks} the attached hooks + */ + static getParserHooks(parser) { + if (!(parser instanceof JavascriptParser)) { + throw new TypeError( + "The 'parser' argument must be an instance of JavascriptParser" + ); + } + let hooks = parserHooksMap.get(parser); + if (hooks === undefined) { + hooks = { + hotAcceptCallback: new SyncBailHook(["expression", "requests"]), + hotAcceptWithoutCallback: new SyncBailHook(["expression", "requests"]) + }; + parserHooksMap.set(parser, hooks); + } + return hooks; + } + + constructor(options) { + this.options = options || {}; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const runtimeRequirements = [RuntimeGlobals.module]; + + const createAcceptHandler = (parser, ParamDependency) => { + const { + hotAcceptCallback, + hotAcceptWithoutCallback + } = HotModuleReplacementPlugin.getParserHooks(parser); + + return expr => { + const module = parser.state.module; + const dep = new ConstDependency( + `${module.moduleArgument}.hot.accept`, + expr.callee.range, + runtimeRequirements + ); + dep.loc = expr.loc; + module.addPresentationalDependency(dep); + module.buildInfo.moduleConcatenationBailout = "Hot Module Replacement"; + if (expr.arguments.length >= 1) { + const arg = parser.evaluateExpression(expr.arguments[0]); + let params = []; + let requests = []; + if (arg.isString()) { + params = [arg]; + } else if (arg.isArray()) { + params = arg.items.filter(param => param.isString()); + } + if (params.length > 0) { + params.forEach((param, idx) => { + const request = param.string; + const dep = new ParamDependency(request, param.range); + dep.optional = true; + dep.loc = Object.create(expr.loc); + dep.loc.index = idx; + module.addDependency(dep); + requests.push(request); + }); + if (expr.arguments.length > 1) { + hotAcceptCallback.call(expr.arguments[1], requests); + parser.walkExpression(expr.arguments[1]); // other args are ignored + return true; + } else { + hotAcceptWithoutCallback.call(expr, requests); + return true; + } + } + } + parser.walkExpressions(expr.arguments); + return true; + }; + }; + + const createDeclineHandler = (parser, ParamDependency) => expr => { + const module = parser.state.module; + const dep = new ConstDependency( + `${module.moduleArgument}.hot.decline`, + expr.callee.range, + runtimeRequirements + ); + dep.loc = expr.loc; + module.addPresentationalDependency(dep); + module.buildInfo.moduleConcatenationBailout = "Hot Module Replacement"; + if (expr.arguments.length === 1) { + const arg = parser.evaluateExpression(expr.arguments[0]); + let params = []; + if (arg.isString()) { + params = [arg]; + } else if (arg.isArray()) { + params = arg.items.filter(param => param.isString()); + } + params.forEach((param, idx) => { + const dep = new ParamDependency(param.string, param.range); + dep.optional = true; + dep.loc = Object.create(expr.loc); + dep.loc.index = idx; + module.addDependency(dep); + }); + } + return true; + }; + + const createHMRExpressionHandler = parser => expr => { + const module = parser.state.module; + const dep = new ConstDependency( + `${module.moduleArgument}.hot`, + expr.range, + runtimeRequirements + ); + dep.loc = expr.loc; + module.addPresentationalDependency(dep); + module.buildInfo.moduleConcatenationBailout = "Hot Module Replacement"; + return true; + }; + + const applyModuleHot = parser => { + parser.hooks.evaluateIdentifier.for("module.hot").tap( + { + name: "HotModuleReplacementPlugin", + before: "NodeStuffPlugin" + }, + expr => { + return evaluateToIdentifier( + "module.hot", + "module", + () => ["hot"], + true + )(expr); + } + ); + parser.hooks.call + .for("module.hot.accept") + .tap( + "HotModuleReplacementPlugin", + createAcceptHandler(parser, ModuleHotAcceptDependency) + ); + parser.hooks.call + .for("module.hot.decline") + .tap( + "HotModuleReplacementPlugin", + createDeclineHandler(parser, ModuleHotDeclineDependency) + ); + parser.hooks.expression + .for("module.hot") + .tap("HotModuleReplacementPlugin", createHMRExpressionHandler(parser)); + }; + + const applyImportMetaHot = parser => { + parser.hooks.evaluateIdentifier + .for("import.meta.webpackHot") + .tap("HotModuleReplacementPlugin", expr => { + return evaluateToIdentifier( + "import.meta.webpackHot", + "import.meta", + () => ["webpackHot"], + true + )(expr); + }); + parser.hooks.call + .for("import.meta.webpackHot.accept") + .tap( + "HotModuleReplacementPlugin", + createAcceptHandler(parser, ImportMetaHotAcceptDependency) + ); + parser.hooks.call + .for("import.meta.webpackHot.decline") + .tap( + "HotModuleReplacementPlugin", + createDeclineHandler(parser, ImportMetaHotDeclineDependency) + ); + parser.hooks.expression + .for("import.meta.webpackHot") + .tap("HotModuleReplacementPlugin", createHMRExpressionHandler(parser)); + }; + + compiler.hooks.compilation.tap( + "HotModuleReplacementPlugin", + (compilation, { normalModuleFactory }) => { + // This applies the HMR plugin only to the targeted compiler + // It should not affect child compilations + if (compilation.compiler !== compiler) return; + + //#region module.hot.* API + compilation.dependencyFactories.set( + ModuleHotAcceptDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ModuleHotAcceptDependency, + new ModuleHotAcceptDependency.Template() + ); + compilation.dependencyFactories.set( + ModuleHotDeclineDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ModuleHotDeclineDependency, + new ModuleHotDeclineDependency.Template() + ); + //#endregion + + //#region import.meta.webpackHot.* API + compilation.dependencyFactories.set( + ImportMetaHotAcceptDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ImportMetaHotAcceptDependency, + new ImportMetaHotAcceptDependency.Template() + ); + compilation.dependencyFactories.set( + ImportMetaHotDeclineDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ImportMetaHotDeclineDependency, + new ImportMetaHotDeclineDependency.Template() + ); + //#endregion + + let hotIndex = 0; + const fullHashChunkModuleHashes = {}; + const chunkModuleHashes = {}; + + compilation.hooks.record.tap( + "HotModuleReplacementPlugin", + (compilation, records) => { + if (records.hash === compilation.hash) return; + const chunkGraph = compilation.chunkGraph; + records.hash = compilation.hash; + records.hotIndex = hotIndex; + records.fullHashChunkModuleHashes = fullHashChunkModuleHashes; + records.chunkModuleHashes = chunkModuleHashes; + records.chunkHashs = {}; + records.chunkRuntime = {}; + for (const chunk of compilation.chunks) { + records.chunkHashs[chunk.id] = chunk.hash; + records.chunkRuntime[chunk.id] = getRuntimeKey(chunk.runtime); + } + records.chunkModuleIds = {}; + for (const chunk of compilation.chunks) { + records.chunkModuleIds[ + chunk.id + ] = Array.from( + chunkGraph.getOrderedChunkModulesIterable( + chunk, + compareModulesById(chunkGraph) + ), + m => chunkGraph.getModuleId(m) + ); + } + } + ); + /** @type {TupleSet<[Module, Chunk]>} */ + const updatedModules = new TupleSet(); + /** @type {TupleSet<[Module, Chunk]>} */ + const lazyHashedModules = new TupleSet(); + compilation.hooks.fullHash.tap("HotModuleReplacementPlugin", hash => { + const chunkGraph = compilation.chunkGraph; + const records = compilation.records; + for (const chunk of compilation.chunks) { + /** @type {Set} */ + const lazyHashedModulesInThisChunk = new Set(); + const fullHashModules = chunkGraph.getChunkFullHashModulesIterable( + chunk + ); + if (fullHashModules !== undefined) { + for (const module of fullHashModules) { + lazyHashedModules.add(module, chunk); + lazyHashedModulesInThisChunk.add(module); + } + } + const modules = chunkGraph.getChunkModulesIterable(chunk); + if (modules !== undefined) { + if ( + records.chunkModuleHashes && + records.fullHashChunkModuleHashes + ) { + for (const module of modules) { + const key = `${chunk.id}|${module.identifier()}`; + const hash = chunkGraph.getModuleHash(module, chunk.runtime); + if (lazyHashedModulesInThisChunk.has(module)) { + if (records.fullHashChunkModuleHashes[key] !== hash) { + updatedModules.add(module, chunk); + } + fullHashChunkModuleHashes[key] = hash; + } else { + if (records.chunkModuleHashes[key] !== hash) { + updatedModules.add(module, chunk); + } + chunkModuleHashes[key] = hash; + } + } + } else { + for (const module of modules) { + const key = `${chunk.id}|${module.identifier()}`; + const hash = chunkGraph.getModuleHash(module, chunk.runtime); + if (lazyHashedModulesInThisChunk.has(module)) { + fullHashChunkModuleHashes[key] = hash; + } else { + chunkModuleHashes[key] = hash; + } + } + } + } + } + + hotIndex = records.hotIndex || 0; + if (updatedModules.size > 0) hotIndex++; + + hash.update(`${hotIndex}`); + }); + compilation.hooks.processAssets.tap( + { + name: "HotModuleReplacementPlugin", + stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL + }, + () => { + const chunkGraph = compilation.chunkGraph; + const records = compilation.records; + if (records.hash === compilation.hash) return; + if ( + !records.chunkModuleHashes || + !records.chunkHashs || + !records.chunkModuleIds + ) { + return; + } + for (const [module, chunk] of lazyHashedModules) { + const key = `${chunk.id}|${module.identifier()}`; + const hash = chunkGraph.getModuleHash(module, chunk.runtime); + if (records.chunkModuleHashes[key] !== hash) { + updatedModules.add(module, chunk); + } + chunkModuleHashes[key] = hash; + } + + /** @type {Map, removedChunkIds: Set, removedModules: Set, filename: string, assetInfo: AssetInfo }>} */ + const hotUpdateMainContentByRuntime = new Map(); + let allOldRuntime; + for (const key of Object.keys(records.chunkRuntime)) { + const runtime = keyToRuntime(records.chunkRuntime[key]); + allOldRuntime = mergeRuntimeOwned(allOldRuntime, runtime); + } + forEachRuntime(allOldRuntime, runtime => { + const { + path: filename, + info: assetInfo + } = compilation.getPathWithInfo( + compilation.outputOptions.hotUpdateMainFilename, + { + hash: records.hash, + runtime + } + ); + hotUpdateMainContentByRuntime.set(runtime, { + updatedChunkIds: new Set(), + removedChunkIds: new Set(), + removedModules: new Set(), + filename, + assetInfo + }); + }); + if (hotUpdateMainContentByRuntime.size === 0) return; + + // Create a list of all active modules to verify which modules are removed completely + /** @type {Map} */ + const allModules = new Map(); + for (const module of compilation.modules) { + const id = chunkGraph.getModuleId(module); + allModules.set(id, module); + } + + // List of completely removed modules + /** @type {Set} */ + const completelyRemovedModules = new Set(); + + for (const key of Object.keys(records.chunkHashs)) { + const oldRuntime = keyToRuntime(records.chunkRuntime[key]); + /** @type {Module[]} */ + const remainingModules = []; + // Check which modules are removed + for (const id of records.chunkModuleIds[key]) { + const module = allModules.get(id); + if (module === undefined) { + completelyRemovedModules.add(id); + } else { + remainingModules.push(module); + } + } + + let chunkId; + let newModules; + let newRuntimeModules; + let newFullHashModules; + let newRuntime; + let removedFromRuntime; + const currentChunk = find( + compilation.chunks, + chunk => `${chunk.id}` === key + ); + if (currentChunk) { + chunkId = currentChunk.id; + newRuntime = currentChunk.runtime; + newModules = chunkGraph + .getChunkModules(currentChunk) + .filter(module => updatedModules.has(module, currentChunk)); + newRuntimeModules = Array.from( + chunkGraph.getChunkRuntimeModulesIterable(currentChunk) + ).filter(module => updatedModules.has(module, currentChunk)); + const fullHashModules = chunkGraph.getChunkFullHashModulesIterable( + currentChunk + ); + newFullHashModules = + fullHashModules && + Array.from(fullHashModules).filter(module => + updatedModules.has(module, currentChunk) + ); + removedFromRuntime = subtractRuntime(oldRuntime, newRuntime); + } else { + // chunk has completely removed + chunkId = `${+key}` === key ? +key : key; + removedFromRuntime = oldRuntime; + newRuntime = oldRuntime; + } + if (removedFromRuntime) { + // chunk was removed from some runtimes + forEachRuntime(removedFromRuntime, runtime => { + hotUpdateMainContentByRuntime + .get(runtime) + .removedChunkIds.add(chunkId); + }); + // dispose modules from the chunk in these runtimes + // where they are no longer in this runtime + for (const module of remainingModules) { + const moduleKey = `${key}|${module.identifier()}`; + const oldHash = records.chunkModuleHashes[moduleKey]; + const runtimes = chunkGraph.getModuleRuntimes(module); + if (oldRuntime === newRuntime && runtimes.has(newRuntime)) { + // Module is still in the same runtime combination + const hash = chunkGraph.getModuleHash(module, newRuntime); + if (hash !== oldHash) { + if (module.type === "runtime") { + newRuntimeModules = newRuntimeModules || []; + newRuntimeModules.push( + /** @type {RuntimeModule} */ (module) + ); + } else { + newModules = newModules || []; + newModules.push(module); + } + } + } else { + // module is no longer in this runtime combination + // We (incorrectly) assume that it's not in an overlapping runtime combination + // and dispose it from the main runtimes the chunk was removed from + forEachRuntime(removedFromRuntime, runtime => { + // If the module is still used in this runtime, do not dispose it + // This could create a bad runtime state where the module is still loaded, + // but no chunk which contains it. This means we don't receive further HMR updates + // to this module and that's bad. + // TODO force load one of the chunks which contains the module + for (const moduleRuntime of runtimes) { + if (typeof moduleRuntime === "string") { + if (moduleRuntime === runtime) return; + } else if (moduleRuntime !== undefined) { + if (moduleRuntime.has(runtime)) return; + } + } + hotUpdateMainContentByRuntime + .get(runtime) + .removedModules.add(module); + }); + } + } + } + if ( + (newModules && newModules.length > 0) || + (newRuntimeModules && newRuntimeModules.length > 0) + ) { + const hotUpdateChunk = new HotUpdateChunk(); + ChunkGraph.setChunkGraphForChunk(hotUpdateChunk, chunkGraph); + hotUpdateChunk.id = chunkId; + hotUpdateChunk.runtime = newRuntime; + if (currentChunk) { + for (const group of currentChunk.groupsIterable) + hotUpdateChunk.addGroup(group); + } + chunkGraph.attachModules(hotUpdateChunk, newModules || []); + chunkGraph.attachRuntimeModules( + hotUpdateChunk, + newRuntimeModules || [] + ); + if (newFullHashModules) { + chunkGraph.attachFullHashModules( + hotUpdateChunk, + newFullHashModules + ); + } + const renderManifest = compilation.getRenderManifest({ + chunk: hotUpdateChunk, + hash: records.hash, + fullHash: records.hash, + outputOptions: compilation.outputOptions, + moduleTemplates: compilation.moduleTemplates, + dependencyTemplates: compilation.dependencyTemplates, + codeGenerationResults: compilation.codeGenerationResults, + runtimeTemplate: compilation.runtimeTemplate, + moduleGraph: compilation.moduleGraph, + chunkGraph + }); + for (const entry of renderManifest) { + /** @type {string} */ + let filename; + /** @type {AssetInfo} */ + let assetInfo; + if ("filename" in entry) { + filename = entry.filename; + assetInfo = entry.info; + } else { + ({ + path: filename, + info: assetInfo + } = compilation.getPathWithInfo( + entry.filenameTemplate, + entry.pathOptions + )); + } + const source = entry.render(); + compilation.additionalChunkAssets.push(filename); + compilation.emitAsset(filename, source, { + hotModuleReplacement: true, + ...assetInfo + }); + if (currentChunk) { + currentChunk.files.add(filename); + compilation.hooks.chunkAsset.call(currentChunk, filename); + } + } + forEachRuntime(newRuntime, runtime => { + hotUpdateMainContentByRuntime + .get(runtime) + .updatedChunkIds.add(chunkId); + }); + } + } + const completelyRemovedModulesArray = Array.from( + completelyRemovedModules + ); + const hotUpdateMainContentByFilename = new Map(); + for (const { + removedChunkIds, + removedModules, + updatedChunkIds, + filename, + assetInfo + } of hotUpdateMainContentByRuntime.values()) { + const old = hotUpdateMainContentByFilename.get(filename); + if ( + old && + (!isSubset(old.removedChunkIds, removedChunkIds) || + !isSubset(old.removedModules, removedModules) || + !isSubset(old.updatedChunkIds, updatedChunkIds)) + ) { + compilation.warnings.push( + new WebpackError(`HotModuleReplacementPlugin +The configured output.hotUpdateMainFilename doesn't lead to unique filenames per runtime and HMR update differs between runtimes. +This might lead to incorrect runtime behavior of the applied update. +To fix this, make sure to include [runtime] in the output.hotUpdateMainFilename option, or use the default config.`) + ); + for (const chunkId of removedChunkIds) + old.removedChunkIds.add(chunkId); + for (const chunkId of removedModules) + old.removedModules.add(chunkId); + for (const chunkId of updatedChunkIds) + old.updatedChunkIds.add(chunkId); + continue; + } + hotUpdateMainContentByFilename.set(filename, { + removedChunkIds, + removedModules, + updatedChunkIds, + assetInfo + }); + } + for (const [ + filename, + { removedChunkIds, removedModules, updatedChunkIds, assetInfo } + ] of hotUpdateMainContentByFilename) { + const hotUpdateMainJson = { + c: Array.from(updatedChunkIds), + r: Array.from(removedChunkIds), + m: + removedModules.size === 0 + ? completelyRemovedModulesArray + : completelyRemovedModulesArray.concat( + Array.from(removedModules, m => + chunkGraph.getModuleId(m) + ) + ) + }; + + const source = new RawSource(JSON.stringify(hotUpdateMainJson)); + compilation.emitAsset(filename, source, { + hotModuleReplacement: true, + ...assetInfo + }); + } + } + ); + + compilation.hooks.additionalTreeRuntimeRequirements.tap( + "HotModuleReplacementPlugin", + (chunk, runtimeRequirements) => { + runtimeRequirements.add(RuntimeGlobals.hmrDownloadManifest); + runtimeRequirements.add(RuntimeGlobals.hmrDownloadUpdateHandlers); + runtimeRequirements.add(RuntimeGlobals.interceptModuleExecution); + runtimeRequirements.add(RuntimeGlobals.moduleCache); + compilation.addRuntimeModule( + chunk, + new HotModuleReplacementRuntimeModule() + ); + } + ); + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("HotModuleReplacementPlugin", parser => { + applyModuleHot(parser); + applyImportMetaHot(parser); + }); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("HotModuleReplacementPlugin", parser => { + applyModuleHot(parser); + }); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("HotModuleReplacementPlugin", parser => { + applyImportMetaHot(parser); + }); + + NormalModule.getCompilationHooks(compilation).loader.tap( + "HotModuleReplacementPlugin", + context => { + context.hot = true; + } + ); + } + ); + } +} + +module.exports = HotModuleReplacementPlugin; + + +/***/ }), + +/***/ 90972: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Chunk = __webpack_require__(92787); + +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./util/Hash")} Hash */ + +class HotUpdateChunk extends Chunk { + constructor() { + super(); + } +} + +module.exports = HotUpdateChunk; + + +/***/ }), + +/***/ 83134: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(10337); + +/** @typedef {import("../declarations/plugins/IgnorePlugin").IgnorePluginOptions} IgnorePluginOptions */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./NormalModuleFactory").ResolveData} ResolveData */ + +class IgnorePlugin { + /** + * @param {IgnorePluginOptions} options IgnorePlugin options + */ + constructor(options) { + validate(schema, options, { + name: "Ignore Plugin", + baseDataPath: "options" + }); + this.options = options; + + /** @private @type {Function} */ + this.checkIgnore = this.checkIgnore.bind(this); + } + + /** + * Note that if "contextRegExp" is given, both the "resourceRegExp" + * and "contextRegExp" have to match. + * + * @param {ResolveData} resolveData resolve data + * @returns {false|undefined} returns false when the request should be ignored, otherwise undefined + */ + checkIgnore(resolveData) { + if ( + "checkResource" in this.options && + this.options.checkResource && + this.options.checkResource(resolveData.request, resolveData.context) + ) { + return false; + } + + if ( + "resourceRegExp" in this.options && + this.options.resourceRegExp && + this.options.resourceRegExp.test(resolveData.request) + ) { + if ("contextRegExp" in this.options && this.options.contextRegExp) { + // if "contextRegExp" is given, + // both the "resourceRegExp" and "contextRegExp" have to match. + if (this.options.contextRegExp.test(resolveData.context)) { + return false; + } + } else { + return false; + } + } + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.normalModuleFactory.tap("IgnorePlugin", nmf => { + nmf.hooks.beforeResolve.tap("IgnorePlugin", this.checkIgnore); + }); + compiler.hooks.contextModuleFactory.tap("IgnorePlugin", cmf => { + cmf.hooks.beforeResolve.tap("IgnorePlugin", this.checkIgnore); + }); + } +} + +module.exports = IgnorePlugin; + + +/***/ }), + +/***/ 53857: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../declarations/WebpackOptions").IgnoreWarningsNormalized} IgnoreWarningsNormalized */ +/** @typedef {import("./Compiler")} Compiler */ + +class IgnoreWarningsPlugin { + /** + * @param {IgnoreWarningsNormalized} ignoreWarnings conditions to ignore warnings + */ + constructor(ignoreWarnings) { + this._ignoreWarnings = ignoreWarnings; + } + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("IgnoreWarningsPlugin", compilation => { + compilation.hooks.processWarnings.tap( + "IgnoreWarningsPlugin", + warnings => { + return warnings.filter(warning => { + return !this._ignoreWarnings.some(ignore => + ignore(warning, compilation) + ); + }); + } + ); + }); + } +} + +module.exports = IgnoreWarningsPlugin; + + +/***/ }), + +/***/ 63382: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + + +const { ConcatSource } = __webpack_require__(55600); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Generator").GenerateContext} GenerateContext */ + +/** + * @param {InitFragment} fragment the init fragment + * @param {number} index index + * @returns {[InitFragment, number]} tuple with both + */ +const extractFragmentIndex = (fragment, index) => [fragment, index]; + +/** + * @param {[InitFragment, number]} a first pair + * @param {[InitFragment, number]} b second pair + * @returns {number} sort value + */ +const sortFragmentWithIndex = ([a, i], [b, j]) => { + const stageCmp = a.stage - b.stage; + if (stageCmp !== 0) return stageCmp; + const positionCmp = a.position - b.position; + if (positionCmp !== 0) return positionCmp; + return i - j; +}; + +class InitFragment { + /** + * @param {string|Source} content the source code that will be included as initialization code + * @param {number} stage category of initialization code (contribute to order) + * @param {number} position position in the category (contribute to order) + * @param {string=} key unique key to avoid emitting the same initialization code twice + * @param {string|Source=} endContent the source code that will be included at the end of the module + */ + constructor(content, stage, position, key, endContent) { + this.content = content; + this.stage = stage; + this.position = position; + this.key = key; + this.endContent = endContent; + } + + /** + * @param {GenerateContext} generateContext context for generate + * @returns {string|Source} the source code that will be included as initialization code + */ + getContent(generateContext) { + return this.content; + } + + /** + * @param {GenerateContext} generateContext context for generate + * @returns {string|Source=} the source code that will be included at the end of the module + */ + getEndContent(generateContext) { + return this.endContent; + } + + static addToSource(source, initFragments, generateContext) { + if (initFragments.length > 0) { + // Sort fragments by position. If 2 fragments have the same position, + // use their index. + const sortedFragments = initFragments + .map(extractFragmentIndex) + .sort(sortFragmentWithIndex); + + // Deduplicate fragments. If a fragment has no key, it is always included. + const keyedFragments = new Map(); + for (const [fragment] of sortedFragments) { + if (typeof fragment.merge === "function") { + const oldValue = keyedFragments.get(fragment.key); + if (oldValue !== undefined) { + keyedFragments.set( + fragment.key || Symbol(), + fragment.merge(oldValue) + ); + continue; + } + } + keyedFragments.set(fragment.key || Symbol(), fragment); + } + + const concatSource = new ConcatSource(); + const endContents = []; + for (const fragment of keyedFragments.values()) { + concatSource.add(fragment.getContent(generateContext)); + const endContent = fragment.getEndContent(generateContext); + if (endContent) { + endContents.push(endContent); + } + } + + concatSource.add(source); + for (const content of endContents.reverse()) { + concatSource.add(content); + } + return concatSource; + } else { + return source; + } + } +} + +InitFragment.prototype.merge = undefined; + +InitFragment.STAGE_CONSTANTS = 10; +InitFragment.STAGE_ASYNC_BOUNDARY = 20; +InitFragment.STAGE_HARMONY_EXPORTS = 30; +InitFragment.STAGE_HARMONY_IMPORTS = 40; +InitFragment.STAGE_PROVIDES = 50; +InitFragment.STAGE_ASYNC_DEPENDENCIES = 60; +InitFragment.STAGE_ASYNC_HARMONY_IMPORTS = 70; + +module.exports = InitFragment; + + +/***/ }), + +/***/ 27185: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Module")} Module */ + +class InvalidDependenciesModuleWarning extends WebpackError { + /** + * @param {Module} module module tied to dependency + * @param {Iterable} deps invalid dependencies + */ + constructor(module, deps) { + const orderedDeps = deps ? Array.from(deps).sort() : []; + const depsList = orderedDeps.map(dep => ` * ${JSON.stringify(dep)}`); + super(`Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths. +Invalid dependencies may lead to broken watching and caching. +As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior. +Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories). +Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories). +Globs: They are not supported. Pass absolute path to the directory as context dependencies. +The following invalid values have been reported: +${depsList.slice(0, 3).join("\n")}${ + depsList.length > 3 ? "\n * and more ..." : "" + }`); + + this.name = "InvalidDependenciesModuleWarning"; + this.details = depsList.slice(3).join("\n"); + this.module = module; + + Error.captureStackTrace(this, this.constructor); + } +} + +makeSerializable( + InvalidDependenciesModuleWarning, + "webpack/lib/InvalidDependenciesModuleWarning" +); + +module.exports = InvalidDependenciesModuleWarning; + + +/***/ }), + +/***/ 14533: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const EntryDependency = __webpack_require__(69325); +const { compareModulesById } = __webpack_require__(21699); +const { dirname, mkdirp } = __webpack_require__(71593); + +/** @typedef {import("./Compiler")} Compiler */ + +/** + * @typedef {Object} ManifestModuleData + * @property {string | number} id + * @property {Object} buildMeta + * @property {boolean | string[]} exports + */ + +/** + * @template T + * @param {Iterable} iterable iterable + * @param {function(T): boolean} filter predicate + * @returns {boolean} true, if some items match the filter predicate + */ +const someInIterable = (iterable, filter) => { + for (const item of iterable) { + if (filter(item)) return true; + } + return false; +}; + +class LibManifestPlugin { + constructor(options) { + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.emit.tapAsync( + "LibManifestPlugin", + (compilation, callback) => { + const moduleGraph = compilation.moduleGraph; + asyncLib.forEach( + Array.from(compilation.chunks), + (chunk, callback) => { + if (!chunk.canBeInitial()) { + callback(); + return; + } + const chunkGraph = compilation.chunkGraph; + const targetPath = compilation.getPath(this.options.path, { + chunk + }); + const name = + this.options.name && + compilation.getPath(this.options.name, { + chunk + }); + const content = Object.create(null); + for (const module of chunkGraph.getOrderedChunkModulesIterable( + chunk, + compareModulesById(chunkGraph) + )) { + if ( + this.options.entryOnly && + !someInIterable( + moduleGraph.getIncomingConnections(module), + c => c.dependency instanceof EntryDependency + ) + ) { + continue; + } + const ident = module.libIdent({ + context: this.options.context || compiler.options.context, + associatedObjectForCache: compiler.root + }); + if (ident) { + const exportsInfo = moduleGraph.getExportsInfo(module); + const providedExports = exportsInfo.getProvidedExports(); + /** @type {ManifestModuleData} */ + const data = { + id: chunkGraph.getModuleId(module), + buildMeta: module.buildMeta, + exports: Array.isArray(providedExports) + ? providedExports + : undefined + }; + content[ident] = data; + } + } + const manifest = { + name, + type: this.options.type, + content + }; + // Apply formatting to content if format flag is true; + const manifestContent = this.options.format + ? JSON.stringify(manifest, null, 2) + : JSON.stringify(manifest); + const buffer = Buffer.from(manifestContent, "utf8"); + mkdirp( + compiler.intermediateFileSystem, + dirname(compiler.intermediateFileSystem, targetPath), + err => { + if (err) return callback(err); + compiler.intermediateFileSystem.writeFile( + targetPath, + buffer, + callback + ); + } + ); + }, + callback + ); + } + ); + } +} +module.exports = LibManifestPlugin; + + +/***/ }), + +/***/ 82758: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const EnableLibraryPlugin = __webpack_require__(60405); + +/** @typedef {import("../declarations/WebpackOptions").AuxiliaryComment} AuxiliaryComment */ +/** @typedef {import("../declarations/WebpackOptions").LibraryExport} LibraryExport */ +/** @typedef {import("../declarations/WebpackOptions").LibraryName} LibraryName */ +/** @typedef {import("../declarations/WebpackOptions").LibraryType} LibraryType */ +/** @typedef {import("../declarations/WebpackOptions").UmdNamedDefine} UmdNamedDefine */ +/** @typedef {import("./Compiler")} Compiler */ + +// TODO webpack 6 remove +class LibraryTemplatePlugin { + /** + * @param {LibraryName} name name of library + * @param {LibraryType} target type of library + * @param {UmdNamedDefine} umdNamedDefine setting this to true will name the UMD module + * @param {AuxiliaryComment} auxiliaryComment comment in the UMD wrapper + * @param {LibraryExport} exportProperty which export should be exposed as library + */ + constructor(name, target, umdNamedDefine, auxiliaryComment, exportProperty) { + this.library = { + type: target || "var", + name, + umdNamedDefine, + auxiliaryComment, + export: exportProperty + }; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { output } = compiler.options; + output.library = this.library; + new EnableLibraryPlugin(this.library.type).apply(compiler); + } +} + +module.exports = LibraryTemplatePlugin; + + +/***/ }), + +/***/ 53036: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ModuleFilenameHelpers = __webpack_require__(79843); +const NormalModule = __webpack_require__(88376); + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(74098); + +/** @typedef {import("../declarations/plugins/LoaderOptionsPlugin").LoaderOptionsPluginOptions} LoaderOptionsPluginOptions */ +/** @typedef {import("./Compiler")} Compiler */ + +class LoaderOptionsPlugin { + /** + * @param {LoaderOptionsPluginOptions} options options object + */ + constructor(options = {}) { + validate(schema, options, { + name: "Loader Options Plugin", + baseDataPath: "options" + }); + if (typeof options !== "object") options = {}; + if (!options.test) { + options.test = { + test: () => true + }; + } + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap("LoaderOptionsPlugin", compilation => { + NormalModule.getCompilationHooks(compilation).loader.tap( + "LoaderOptionsPlugin", + (context, module) => { + const resource = module.resource; + if (!resource) return; + const i = resource.indexOf("?"); + if ( + ModuleFilenameHelpers.matchObject( + options, + i < 0 ? resource : resource.substr(0, i) + ) + ) { + for (const key of Object.keys(options)) { + if (key === "include" || key === "exclude" || key === "test") { + continue; + } + context[key] = options[key]; + } + } + } + ); + }); + } +} + +module.exports = LoaderOptionsPlugin; + + +/***/ }), + +/***/ 54108: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const NormalModule = __webpack_require__(88376); + +/** @typedef {import("./Compiler")} Compiler */ + +class LoaderTargetPlugin { + /** + * @param {string} target the target + */ + constructor(target) { + this.target = target; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("LoaderTargetPlugin", compilation => { + NormalModule.getCompilationHooks(compilation).loader.tap( + "LoaderTargetPlugin", + loaderContext => { + loaderContext.target = this.target; + } + ); + }); + } +} + +module.exports = LoaderTargetPlugin; + + +/***/ }), + +/***/ 17836: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { SyncWaterfallHook } = __webpack_require__(18416); +const util = __webpack_require__(31669); +const RuntimeGlobals = __webpack_require__(48801); +const memoize = __webpack_require__(18003); + +/** @typedef {import("webpack-sources").ConcatSource} ConcatSource */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */ +/** @typedef {import("./ModuleTemplate")} ModuleTemplate */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("./Module")} Module} */ +/** @typedef {import("./util/Hash")} Hash} */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates} */ +/** @typedef {import("./ModuleTemplate").RenderContext} RenderContext} */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate} */ +/** @typedef {import("./ModuleGraph")} ModuleGraph} */ +/** @typedef {import("./ChunkGraph")} ChunkGraph} */ +/** @typedef {import("./Template").RenderManifestOptions} RenderManifestOptions} */ +/** @typedef {import("./Template").RenderManifestEntry} RenderManifestEntry} */ + +const getJavascriptModulesPlugin = memoize(() => + __webpack_require__(80867) +); +const getJsonpTemplatePlugin = memoize(() => + __webpack_require__(57279) +); +const getLoadScriptRuntimeModule = memoize(() => + __webpack_require__(23033) +); + +// TODO webpack 6 remove this class +class MainTemplate { + /** + * + * @param {OutputOptions} outputOptions output options for the MainTemplate + * @param {Compilation} compilation the compilation + */ + constructor(outputOptions, compilation) { + /** @type {OutputOptions} */ + this._outputOptions = outputOptions || {}; + this.hooks = Object.freeze({ + renderManifest: { + tap: util.deprecate( + (options, fn) => { + compilation.hooks.renderManifest.tap( + options, + (entries, options) => { + if (!options.chunk.hasRuntime()) return entries; + return fn(entries, options); + } + ); + }, + "MainTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_RENDER_MANIFEST" + ) + }, + modules: { + tap: () => { + throw new Error( + "MainTemplate.hooks.modules has been removed (there is no replacement, please create an issue to request that)" + ); + } + }, + moduleObj: { + tap: () => { + throw new Error( + "MainTemplate.hooks.moduleObj has been removed (there is no replacement, please create an issue to request that)" + ); + } + }, + require: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .renderRequire.tap(options, fn); + }, + "MainTemplate.hooks.require is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderRequire instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_REQUIRE" + ) + }, + beforeStartup: { + tap: () => { + throw new Error( + "MainTemplate.hooks.beforeStartup has been removed (use RuntimeGlobals.startupOnlyBefore instead)" + ); + } + }, + startup: { + tap: () => { + throw new Error( + "MainTemplate.hooks.startup has been removed (use RuntimeGlobals.startup instead)" + ); + } + }, + afterStartup: { + tap: () => { + throw new Error( + "MainTemplate.hooks.afterStartup has been removed (use RuntimeGlobals.startupOnlyAfter instead)" + ); + } + }, + render: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .render.tap(options, (source, renderContext) => { + if ( + renderContext.chunkGraph.getNumberOfEntryModules( + renderContext.chunk + ) === 0 || + !renderContext.chunk.hasRuntime() + ) { + return source; + } + return fn( + source, + renderContext.chunk, + compilation.hash, + compilation.moduleTemplates.javascript, + compilation.dependencyTemplates + ); + }); + }, + "MainTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_RENDER" + ) + }, + renderWithEntry: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .render.tap(options, (source, renderContext) => { + if ( + renderContext.chunkGraph.getNumberOfEntryModules( + renderContext.chunk + ) === 0 || + !renderContext.chunk.hasRuntime() + ) { + return source; + } + return fn(source, renderContext.chunk, compilation.hash); + }); + }, + "MainTemplate.hooks.renderWithEntry is deprecated (use JavascriptModulesPlugin.getCompilationHooks().render instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_RENDER_WITH_ENTRY" + ) + }, + assetPath: { + tap: util.deprecate( + (options, fn) => { + compilation.hooks.assetPath.tap(options, fn); + }, + "MainTemplate.hooks.assetPath is deprecated (use Compilation.hooks.assetPath instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_ASSET_PATH" + ), + call: util.deprecate( + (filename, options) => { + return compilation.getAssetPath(filename, options); + }, + "MainTemplate.hooks.assetPath is deprecated (use Compilation.hooks.assetPath instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_ASSET_PATH" + ) + }, + hash: { + tap: util.deprecate( + (options, fn) => { + compilation.hooks.fullHash.tap(options, fn); + }, + "MainTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_HASH" + ) + }, + hashForChunk: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .chunkHash.tap(options, (chunk, hash) => { + if (!chunk.hasRuntime()) return; + return fn(hash, chunk); + }); + }, + "MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK" + ) + }, + globalHashPaths: { + tap: util.deprecate( + () => {}, + "MainTemplate.hooks.globalHashPaths has been removed (it's no longer needed)", + "DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK" + ) + }, + globalHash: { + tap: util.deprecate( + () => {}, + "MainTemplate.hooks.globalHash has been removed (it's no longer needed)", + "DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK" + ) + }, + hotBootstrap: { + tap: () => { + throw new Error( + "MainTemplate.hooks.hotBootstrap has been removed (use your own RuntimeModule instead)" + ); + } + }, + + // for compatibility: + /** @type {SyncWaterfallHook<[string, Chunk, string, ModuleTemplate, DependencyTemplates]>} */ + bootstrap: new SyncWaterfallHook([ + "source", + "chunk", + "hash", + "moduleTemplate", + "dependencyTemplates" + ]), + /** @type {SyncWaterfallHook<[string, Chunk, string]>} */ + localVars: new SyncWaterfallHook(["source", "chunk", "hash"]), + /** @type {SyncWaterfallHook<[string, Chunk, string]>} */ + requireExtensions: new SyncWaterfallHook(["source", "chunk", "hash"]), + /** @type {SyncWaterfallHook<[string, Chunk, string, string]>} */ + requireEnsure: new SyncWaterfallHook([ + "source", + "chunk", + "hash", + "chunkIdExpression" + ]), + get jsonpScript() { + const hooks = getLoadScriptRuntimeModule().getCompilationHooks( + compilation + ); + return hooks.createScript; + }, + get linkPrefetch() { + const hooks = getJsonpTemplatePlugin().getCompilationHooks(compilation); + return hooks.linkPrefetch; + }, + get linkPreload() { + const hooks = getJsonpTemplatePlugin().getCompilationHooks(compilation); + return hooks.linkPreload; + } + }); + + this.renderCurrentHashCode = util.deprecate( + /** + * @deprecated + * @param {string} hash the hash + * @param {number=} length length of the hash + * @returns {string} generated code + */ (hash, length) => { + if (length) { + return `${RuntimeGlobals.getFullHash} ? ${ + RuntimeGlobals.getFullHash + }().slice(0, ${length}) : ${hash.slice(0, length)}`; + } + return `${RuntimeGlobals.getFullHash} ? ${RuntimeGlobals.getFullHash}() : ${hash}`; + }, + "MainTemplate.renderCurrentHashCode is deprecated (use RuntimeGlobals.getFullHash runtime function instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_RENDER_CURRENT_HASH_CODE" + ); + + this.getPublicPath = util.deprecate( + /** + * + * @param {object} options get public path options + * @returns {string} hook call + */ options => { + return compilation.getAssetPath( + compilation.outputOptions.publicPath, + options + ); + }, + "MainTemplate.getPublicPath is deprecated (use Compilation.getAssetPath(compilation.outputOptions.publicPath, options) instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_GET_PUBLIC_PATH" + ); + + this.getAssetPath = util.deprecate( + (path, options) => { + return compilation.getAssetPath(path, options); + }, + "MainTemplate.getAssetPath is deprecated (use Compilation.getAssetPath instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_GET_ASSET_PATH" + ); + + this.getAssetPathWithInfo = util.deprecate( + (path, options) => { + return compilation.getAssetPathWithInfo(path, options); + }, + "MainTemplate.getAssetPathWithInfo is deprecated (use Compilation.getAssetPath instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_GET_ASSET_PATH_WITH_INFO" + ); + } +} + +Object.defineProperty(MainTemplate.prototype, "requireFn", { + get: util.deprecate( + () => "__webpack_require__", + 'MainTemplate.requireFn is deprecated (use "__webpack_require__")', + "DEP_WEBPACK_MAIN_TEMPLATE_REQUIRE_FN" + ) +}); + +Object.defineProperty(MainTemplate.prototype, "outputOptions", { + get: util.deprecate( + /** + * @this {MainTemplate} + * @returns {OutputOptions} output options + */ + function () { + return this._outputOptions; + }, + "MainTemplate.outputOptions is deprecated (use Compilation.outputOptions instead)", + "DEP_WEBPACK_MAIN_TEMPLATE_OUTPUT_OPTIONS" + ) +}); + +module.exports = MainTemplate; + + +/***/ }), + +/***/ 54031: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const ChunkGraph = __webpack_require__(67518); +const DependenciesBlock = __webpack_require__(15267); +const ModuleGraph = __webpack_require__(73444); +const RuntimeGlobals = __webpack_require__(48801); +const { compareChunksById } = __webpack_require__(21699); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./ConcatenationScope")} ConcatenationScope */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./ExportsInfo").UsageStateType} UsageStateType */ +/** @typedef {import("./FileSystemInfo")} FileSystemInfo */ +/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./util/Hash")} Hash */ +/** @template T @typedef {import("./util/LazySet")} LazySet */ +/** @template T @typedef {import("./util/SortableSet")} SortableSet */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * @typedef {Object} SourceContext + * @property {DependencyTemplates} dependencyTemplates the dependency templates + * @property {RuntimeTemplate} runtimeTemplate the runtime template + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + * @property {RuntimeSpec} runtime the runtimes code should be generated for + * @property {string=} type the type of source that should be generated + */ + +/** + * @typedef {Object} CodeGenerationContext + * @property {DependencyTemplates} dependencyTemplates the dependency templates + * @property {RuntimeTemplate} runtimeTemplate the runtime template + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + * @property {RuntimeSpec} runtime the runtimes code should be generated for + * @property {ConcatenationScope=} concatenationScope when in concatenated module, information about other concatenated modules + */ + +/** + * @typedef {Object} ConcatenationBailoutReasonContext + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + */ + +/** + * @typedef {Object} CodeGenerationResult + * @property {Map} sources the resulting sources for all source types + * @property {Map=} data the resulting data for all source types + * @property {ReadonlySet} runtimeRequirements the runtime requirements + */ + +/** + * @typedef {Object} LibIdentOptions + * @property {string} context absolute context path to which lib ident is relative to + * @property {Object=} associatedObjectForCache object for caching + */ + +/** + * @typedef {Object} KnownBuildMeta + * @property {string=} moduleArgument + * @property {string=} exportsArgument + * @property {boolean=} strict + * @property {string=} moduleConcatenationBailout + * @property {("default" | "namespace" | "flagged" | "dynamic")=} exportsType + * @property {(false | "redirect" | "redirect-warn")=} defaultObject + * @property {boolean=} strictHarmonyModule + * @property {boolean=} async + * @property {boolean=} sideEffectFree + */ + +/** + * @typedef {Object} NeedBuildContext + * @property {FileSystemInfo} fileSystemInfo + */ + +/** @typedef {KnownBuildMeta & Record} BuildMeta */ + +const EMPTY_RESOLVE_OPTIONS = {}; + +let debugId = 1000; + +const DEFAULT_TYPES_UNKNOWN = new Set(["unknown"]); +const DEFAULT_TYPES_JS = new Set(["javascript"]); + +const deprecatedNeedRebuild = util.deprecate( + (module, context) => { + return module.needRebuild( + context.fileSystemInfo.getDeprecatedFileTimestamps(), + context.fileSystemInfo.getDeprecatedContextTimestamps() + ); + }, + "Module.needRebuild is deprecated in favor of Module.needBuild", + "DEP_WEBPACK_MODULE_NEED_REBUILD" +); + +/** @typedef {(requestShortener: RequestShortener) => string} OptimizationBailoutFunction */ + +class Module extends DependenciesBlock { + /** + * @param {string} type the module type + * @param {string=} context an optional context + * @param {string=} layer an optional layer in which the module is + */ + constructor(type, context = null, layer = null) { + super(); + + /** @type {string} */ + this.type = type; + /** @type {string | null} */ + this.context = context; + /** @type {string | null} */ + this.layer = layer; + /** @type {boolean} */ + this.needId = true; + + // Unique Id + /** @type {number} */ + this.debugId = debugId++; + + // Info from Factory + /** @type {ResolveOptions} */ + this.resolveOptions = EMPTY_RESOLVE_OPTIONS; + /** @type {object | undefined} */ + this.factoryMeta = undefined; + // TODO refactor this -> options object filled from Factory + // TODO webpack 6: use an enum + /** @type {boolean} */ + this.useSourceMap = false; + /** @type {boolean} */ + this.useSimpleSourceMap = false; + + // Info from Build + /** @type {WebpackError[] | undefined} */ + this._warnings = undefined; + /** @type {WebpackError[] | undefined} */ + this._errors = undefined; + /** @type {BuildMeta} */ + this.buildMeta = undefined; + /** @type {Record} */ + this.buildInfo = undefined; + /** @type {Dependency[] | undefined} */ + this.presentationalDependencies = undefined; + } + + // TODO remove in webpack 6 + // BACKWARD-COMPAT START + get id() { + return ChunkGraph.getChunkGraphForModule( + this, + "Module.id", + "DEP_WEBPACK_MODULE_ID" + ).getModuleId(this); + } + + set id(value) { + if (value === "") { + this.needId = false; + return; + } + ChunkGraph.getChunkGraphForModule( + this, + "Module.id", + "DEP_WEBPACK_MODULE_ID" + ).setModuleId(this, value); + } + + /** + * @returns {string} the hash of the module + */ + get hash() { + return ChunkGraph.getChunkGraphForModule( + this, + "Module.hash", + "DEP_WEBPACK_MODULE_HASH" + ).getModuleHash(this, undefined); + } + + /** + * @returns {string} the shortened hash of the module + */ + get renderedHash() { + return ChunkGraph.getChunkGraphForModule( + this, + "Module.renderedHash", + "DEP_WEBPACK_MODULE_RENDERED_HASH" + ).getRenderedModuleHash(this, undefined); + } + + get profile() { + return ModuleGraph.getModuleGraphForModule( + this, + "Module.profile", + "DEP_WEBPACK_MODULE_PROFILE" + ).getProfile(this); + } + + set profile(value) { + ModuleGraph.getModuleGraphForModule( + this, + "Module.profile", + "DEP_WEBPACK_MODULE_PROFILE" + ).setProfile(this, value); + } + + get index() { + return ModuleGraph.getModuleGraphForModule( + this, + "Module.index", + "DEP_WEBPACK_MODULE_INDEX" + ).getPreOrderIndex(this); + } + + set index(value) { + ModuleGraph.getModuleGraphForModule( + this, + "Module.index", + "DEP_WEBPACK_MODULE_INDEX" + ).setPreOrderIndex(this, value); + } + + get index2() { + return ModuleGraph.getModuleGraphForModule( + this, + "Module.index2", + "DEP_WEBPACK_MODULE_INDEX2" + ).getPostOrderIndex(this); + } + + set index2(value) { + ModuleGraph.getModuleGraphForModule( + this, + "Module.index2", + "DEP_WEBPACK_MODULE_INDEX2" + ).setPostOrderIndex(this, value); + } + + get depth() { + return ModuleGraph.getModuleGraphForModule( + this, + "Module.depth", + "DEP_WEBPACK_MODULE_DEPTH" + ).getDepth(this); + } + + set depth(value) { + ModuleGraph.getModuleGraphForModule( + this, + "Module.depth", + "DEP_WEBPACK_MODULE_DEPTH" + ).setDepth(this, value); + } + + get issuer() { + return ModuleGraph.getModuleGraphForModule( + this, + "Module.issuer", + "DEP_WEBPACK_MODULE_ISSUER" + ).getIssuer(this); + } + + set issuer(value) { + ModuleGraph.getModuleGraphForModule( + this, + "Module.issuer", + "DEP_WEBPACK_MODULE_ISSUER" + ).setIssuer(this, value); + } + + get usedExports() { + return ModuleGraph.getModuleGraphForModule( + this, + "Module.usedExports", + "DEP_WEBPACK_MODULE_USED_EXPORTS" + ).getUsedExports(this, undefined); + } + + /** + * @deprecated + * @returns {(string | OptimizationBailoutFunction)[]} list + */ + get optimizationBailout() { + return ModuleGraph.getModuleGraphForModule( + this, + "Module.optimizationBailout", + "DEP_WEBPACK_MODULE_OPTIMIZATION_BAILOUT" + ).getOptimizationBailout(this); + } + + get optional() { + return this.isOptional( + ModuleGraph.getModuleGraphForModule( + this, + "Module.optional", + "DEP_WEBPACK_MODULE_OPTIONAL" + ) + ); + } + + addChunk(chunk) { + const chunkGraph = ChunkGraph.getChunkGraphForModule( + this, + "Module.addChunk", + "DEP_WEBPACK_MODULE_ADD_CHUNK" + ); + if (chunkGraph.isModuleInChunk(this, chunk)) return false; + chunkGraph.connectChunkAndModule(chunk, this); + return true; + } + + removeChunk(chunk) { + return ChunkGraph.getChunkGraphForModule( + this, + "Module.removeChunk", + "DEP_WEBPACK_MODULE_REMOVE_CHUNK" + ).disconnectChunkAndModule(chunk, this); + } + + isInChunk(chunk) { + return ChunkGraph.getChunkGraphForModule( + this, + "Module.isInChunk", + "DEP_WEBPACK_MODULE_IS_IN_CHUNK" + ).isModuleInChunk(this, chunk); + } + + isEntryModule() { + return ChunkGraph.getChunkGraphForModule( + this, + "Module.isEntryModule", + "DEP_WEBPACK_MODULE_IS_ENTRY_MODULE" + ).isEntryModule(this); + } + + getChunks() { + return ChunkGraph.getChunkGraphForModule( + this, + "Module.getChunks", + "DEP_WEBPACK_MODULE_GET_CHUNKS" + ).getModuleChunks(this); + } + + getNumberOfChunks() { + return ChunkGraph.getChunkGraphForModule( + this, + "Module.getNumberOfChunks", + "DEP_WEBPACK_MODULE_GET_NUMBER_OF_CHUNKS" + ).getNumberOfModuleChunks(this); + } + + get chunksIterable() { + return ChunkGraph.getChunkGraphForModule( + this, + "Module.chunksIterable", + "DEP_WEBPACK_MODULE_CHUNKS_ITERABLE" + ).getOrderedModuleChunksIterable(this, compareChunksById); + } + + /** + * @param {string} exportName a name of an export + * @returns {boolean | null} true, if the export is provided why the module. + * null, if it's unknown. + * false, if it's not provided. + */ + isProvided(exportName) { + return ModuleGraph.getModuleGraphForModule( + this, + "Module.usedExports", + "DEP_WEBPACK_MODULE_USED_EXPORTS" + ).isExportProvided(this, exportName); + } + // BACKWARD-COMPAT END + + /** + * @deprecated moved to .buildInfo.exportsArgument + * @returns {string} name of the exports argument + */ + get exportsArgument() { + return (this.buildInfo && this.buildInfo.exportsArgument) || "exports"; + } + + /** + * @deprecated moved to .buildInfo.moduleArgument + * @returns {string} name of the module argument + */ + get moduleArgument() { + return (this.buildInfo && this.buildInfo.moduleArgument) || "module"; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {boolean} strict the importing module is strict + * @returns {"namespace" | "default-only" | "default-with-named" | "dynamic"} export type + * "namespace": Exports is already a namespace object. namespace = exports. + * "dynamic": Check at runtime if __esModule is set. When set: namespace = { ...exports, default: exports }. When not set: namespace = { default: exports }. + * "default-only": Provide a namespace object with only default export. namespace = { default: exports } + * "default-with-named": Provide a namespace object with named and default export. namespace = { ...exports, default: exports } + */ + getExportsType(moduleGraph, strict) { + switch (this.buildMeta && this.buildMeta.exportsType) { + case "flagged": + return strict ? "default-with-named" : "namespace"; + case "namespace": + return "namespace"; + case "default": + switch (this.buildMeta.defaultObject) { + case "redirect": + return "default-with-named"; + case "redirect-warn": + return strict ? "default-only" : "default-with-named"; + default: + return "default-only"; + } + case "dynamic": { + if (strict) return "default-with-named"; + // Try to figure out value of __esModule by following reexports + const handleDefault = () => { + switch (this.buildMeta.defaultObject) { + case "redirect": + case "redirect-warn": + return "default-with-named"; + default: + return "default-only"; + } + }; + const exportInfo = moduleGraph.getReadOnlyExportInfo( + this, + "__esModule" + ); + if (exportInfo.provided === false) { + return handleDefault(); + } + const target = exportInfo.getTarget(moduleGraph); + if ( + !target || + !target.export || + target.export.length !== 1 || + target.export[0] !== "__esModule" + ) { + return "dynamic"; + } + switch ( + target.module.buildMeta && + target.module.buildMeta.exportsType + ) { + case "flagged": + case "namespace": + return "namespace"; + case "default": + return handleDefault(); + default: + return "dynamic"; + } + } + default: + return strict ? "default-with-named" : "dynamic"; + } + } + + /** + * @param {Dependency} presentationalDependency dependency being tied to module. + * This is a Dependency without edge in the module graph. It's only for presentation. + * @returns {void} + */ + addPresentationalDependency(presentationalDependency) { + if (this.presentationalDependencies === undefined) { + this.presentationalDependencies = []; + } + this.presentationalDependencies.push(presentationalDependency); + } + + /** + * Removes all dependencies and blocks + * @returns {void} + */ + clearDependenciesAndBlocks() { + if (this.presentationalDependencies !== undefined) { + this.presentationalDependencies.length = 0; + } + super.clearDependenciesAndBlocks(); + } + + /** + * @param {WebpackError} warning the warning + * @returns {void} + */ + addWarning(warning) { + if (this._warnings === undefined) { + this._warnings = []; + } + this._warnings.push(warning); + } + + /** + * @returns {Iterable | undefined} list of warnings if any + */ + getWarnings() { + return this._warnings; + } + + /** + * @returns {number} number of warnings + */ + getNumberOfWarnings() { + return this._warnings !== undefined ? this._warnings.length : 0; + } + + /** + * @param {WebpackError} error the error + * @returns {void} + */ + addError(error) { + if (this._errors === undefined) { + this._errors = []; + } + this._errors.push(error); + } + + /** + * @returns {Iterable | undefined} list of errors if any + */ + getErrors() { + return this._errors; + } + + /** + * @returns {number} number of errors + */ + getNumberOfErrors() { + return this._errors !== undefined ? this._errors.length : 0; + } + + /** + * removes all warnings and errors + * @returns {void} + */ + clearWarningsAndErrors() { + if (this._warnings !== undefined) { + this._warnings.length = 0; + } + if (this._errors !== undefined) { + this._errors.length = 0; + } + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {boolean} true, if the module is optional + */ + isOptional(moduleGraph) { + let hasConnections = false; + for (const r of moduleGraph.getIncomingConnections(this)) { + if ( + !r.dependency || + !r.dependency.optional || + !r.isTargetActive(undefined) + ) { + return false; + } + hasConnections = true; + } + return hasConnections; + } + + /** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {Chunk} chunk a chunk + * @param {Chunk=} ignoreChunk chunk to be ignored + * @returns {boolean} true, if the module is accessible from "chunk" when ignoring "ignoreChunk" + */ + isAccessibleInChunk(chunkGraph, chunk, ignoreChunk) { + // Check if module is accessible in ALL chunk groups + for (const chunkGroup of chunk.groupsIterable) { + if (!this.isAccessibleInChunkGroup(chunkGraph, chunkGroup)) return false; + } + return true; + } + + /** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {ChunkGroup} chunkGroup a chunk group + * @param {Chunk=} ignoreChunk chunk to be ignored + * @returns {boolean} true, if the module is accessible from "chunkGroup" when ignoring "ignoreChunk" + */ + isAccessibleInChunkGroup(chunkGraph, chunkGroup, ignoreChunk) { + const queue = new Set([chunkGroup]); + + // Check if module is accessible from all items of the queue + queueFor: for (const cg of queue) { + // 1. If module is in one of the chunks of the group we can continue checking the next items + // because it's accessible. + for (const chunk of cg.chunks) { + if (chunk !== ignoreChunk && chunkGraph.isModuleInChunk(this, chunk)) + continue queueFor; + } + // 2. If the chunk group is initial, we can break here because it's not accessible. + if (chunkGroup.isInitial()) return false; + // 3. Enqueue all parents because it must be accessible from ALL parents + for (const parent of chunkGroup.parentsIterable) queue.add(parent); + } + // When we processed through the whole list and we didn't bailout, the module is accessible + return true; + } + + /** + * @param {Chunk} chunk a chunk + * @param {ModuleGraph} moduleGraph the module graph + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {boolean} true, if the module has any reason why "chunk" should be included + */ + hasReasonForChunk(chunk, moduleGraph, chunkGraph) { + // check for each reason if we need the chunk + for (const connection of moduleGraph.getIncomingConnections(this)) { + if (!connection.isTargetActive(chunk.runtime)) continue; + const fromModule = connection.originModule; + for (const originChunk of chunkGraph.getModuleChunksIterable( + fromModule + )) { + // return true if module this is not reachable from originChunk when ignoring chunk + if (!this.isAccessibleInChunk(chunkGraph, originChunk, chunk)) + return true; + } + } + return false; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true if at least one other module depends on this module + */ + hasReasons(moduleGraph, runtime) { + for (const c of moduleGraph.getIncomingConnections(this)) { + if (c.isTargetActive(runtime)) return true; + } + return false; + } + + /** + * @returns {string} for debugging + */ + toString() { + return `Module[${this.debugId}: ${this.identifier()}]`; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + callback( + null, + !this.buildMeta || + this.needRebuild === Module.prototype.needRebuild || + deprecatedNeedRebuild(this, context) + ); + } + + /** + * @deprecated Use needBuild instead + * @param {Map} fileTimestamps timestamps of files + * @param {Map} contextTimestamps timestamps of directories + * @returns {boolean} true, if the module needs a rebuild + */ + needRebuild(fileTimestamps, contextTimestamps) { + return true; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash( + hash, + context = { + chunkGraph: ChunkGraph.getChunkGraphForModule( + this, + "Module.updateHash", + "DEP_WEBPACK_MODULE_UPDATE_HASH" + ), + runtime: undefined + } + ) { + const { chunkGraph, runtime } = context; + hash.update(`${chunkGraph.getModuleId(this)}`); + const exportsInfo = chunkGraph.moduleGraph.getExportsInfo(this); + exportsInfo.updateHash(hash, runtime); + if (this.presentationalDependencies !== undefined) { + for (const dep of this.presentationalDependencies) { + dep.updateHash(hash, context); + } + } + super.updateHash(hash, context); + } + + /** + * @returns {void} + */ + invalidateBuild() { + // should be overridden to support this feature + } + + /* istanbul ignore next */ + /** + * @abstract + * @returns {string} a unique identifier of the module + */ + identifier() { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /* istanbul ignore next */ + /** + * @abstract + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /* istanbul ignore next */ + /** + * @abstract + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /** + * @abstract + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + // Better override this method to return the correct types + if (this.source === Module.prototype.source) { + return DEFAULT_TYPES_UNKNOWN; + } else { + return DEFAULT_TYPES_JS; + } + } + + /** + * @abstract + * @deprecated Use codeGeneration() instead + * @param {DependencyTemplates} dependencyTemplates the dependency templates + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {string=} type the type of source that should be generated + * @returns {Source} generated source + */ + source(dependencyTemplates, runtimeTemplate, type = "javascript") { + if (this.codeGeneration === Module.prototype.codeGeneration) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + const chunkGraph = ChunkGraph.getChunkGraphForModule( + this, + "Module.source() is deprecated. Use Compilation.codeGenerationResults.getSource(module, runtime, type) instead", + "DEP_WEBPACK_MODULE_SOURCE" + ); + /** @type {CodeGenerationContext} */ + const codeGenContext = { + dependencyTemplates, + runtimeTemplate, + moduleGraph: chunkGraph.moduleGraph, + chunkGraph, + runtime: undefined + }; + const sources = this.codeGeneration(codeGenContext).sources; + return type + ? sources.get(type) + : sources.get(this.getSourceTypes().values().next().value); + } + + /* istanbul ignore next */ + /** + * @abstract + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + return null; + } + + /** + * @returns {string | null} absolute path which should be used for condition matching (usually the resource path) + */ + nameForCondition() { + return null; + } + + /** + * @param {ConcatenationBailoutReasonContext} context context + * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated + */ + getConcatenationBailoutReason(context) { + return `Module Concatenation is not implemented for ${this.constructor.name}`; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this module should be connected to referencing modules when consumed for side-effects only + */ + getSideEffectsConnectionState(moduleGraph) { + return true; + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration(context) { + // Best override this method + const sources = new Map(); + for (const type of this.getSourceTypes()) { + if (type !== "unknown") { + sources.set( + type, + this.source( + context.dependencyTemplates, + context.runtimeTemplate, + type + ) + ); + } + } + return { + sources, + runtimeRequirements: new Set([ + RuntimeGlobals.module, + RuntimeGlobals.exports, + RuntimeGlobals.require + ]) + }; + } + + /** + * @param {Chunk} chunk the chunk which condition should be checked + * @param {Compilation} compilation the compilation + * @returns {boolean} true, if the chunk is ok for the module + */ + chunkCondition(chunk, compilation) { + return true; + } + + /** + * Assuming this module is in the cache. Update the (cached) module with + * the fresh module from the factory. Usually updates internal references + * and properties. + * @param {Module} module fresh module + * @returns {void} + */ + updateCacheModule(module) { + this.type = module.type; + this.layer = module.layer; + this.context = module.context; + this.factoryMeta = module.factoryMeta; + this.resolveOptions = module.resolveOptions; + } + + /** + * @returns {Source | null} the original source for the module before webpack transformation + */ + originalSource() { + return null; + } + + /** + * @param {LazySet} fileDependencies set where file dependencies are added to + * @param {LazySet} contextDependencies set where context dependencies are added to + * @param {LazySet} missingDependencies set where missing dependencies are added to + * @param {LazySet} buildDependencies set where build dependencies are added to + */ + addCacheDependencies( + fileDependencies, + contextDependencies, + missingDependencies, + buildDependencies + ) {} + + serialize(context) { + const { write } = context; + write(this.type); + write(this.layer); + write(this.context); + write(this.resolveOptions); + write(this.factoryMeta); + write(this.useSourceMap); + write(this.useSimpleSourceMap); + write( + this._warnings !== undefined && this._warnings.length === 0 + ? undefined + : this._warnings + ); + write( + this._errors !== undefined && this._errors.length === 0 + ? undefined + : this._errors + ); + write(this.buildMeta); + write(this.buildInfo); + write(this.presentationalDependencies); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.type = read(); + this.layer = read(); + this.context = read(); + this.resolveOptions = read(); + this.factoryMeta = read(); + this.useSourceMap = read(); + this.useSimpleSourceMap = read(); + this._warnings = read(); + this._errors = read(); + this.buildMeta = read(); + this.buildInfo = read(); + this.presentationalDependencies = read(); + super.deserialize(context); + } +} + +makeSerializable(Module, "webpack/lib/Module"); + +// TODO remove in webpack 6 +Object.defineProperty(Module.prototype, "hasEqualsChunks", { + get() { + throw new Error( + "Module.hasEqualsChunks was renamed (use hasEqualChunks instead)" + ); + } +}); + +// TODO remove in webpack 6 +Object.defineProperty(Module.prototype, "isUsed", { + get() { + throw new Error( + "Module.isUsed was renamed (use getUsedName, isExportUsed or isModuleUsed instead)" + ); + } +}); + +// TODO remove in webpack 6 +Object.defineProperty(Module.prototype, "errors", { + get: util.deprecate( + /** + * @this {Module} + * @returns {WebpackError[]} array + */ + function () { + if (this._errors === undefined) { + this._errors = []; + } + return this._errors; + }, + "Module.errors was removed (use getErrors instead)", + "DEP_WEBPACK_MODULE_ERRORS" + ) +}); + +// TODO remove in webpack 6 +Object.defineProperty(Module.prototype, "warnings", { + get: util.deprecate( + /** + * @this {Module} + * @returns {WebpackError[]} array + */ + function () { + if (this._warnings === undefined) { + this._warnings = []; + } + return this._warnings; + }, + "Module.warnings was removed (use getWarnings instead)", + "DEP_WEBPACK_MODULE_WARNINGS" + ) +}); + +// TODO remove in webpack 6 +Object.defineProperty(Module.prototype, "used", { + get() { + throw new Error( + "Module.used was refactored (use ModuleGraph.getUsedExports instead)" + ); + }, + set(value) { + throw new Error( + "Module.used was refactored (use ModuleGraph.setUsedExports instead)" + ); + } +}); + +module.exports = Module; + + +/***/ }), + +/***/ 3289: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { cutOffLoaderExecution } = __webpack_require__(31183); +const WebpackError = __webpack_require__(24274); +const makeSerializable = __webpack_require__(55575); + +class ModuleBuildError extends WebpackError { + /** + * @param {string | Error&any} err error thrown + * @param {{from?: string|null}} info additional info + */ + constructor(err, { from = null } = {}) { + let message = "Module build failed"; + let details = undefined; + + if (from) { + message += ` (from ${from}):\n`; + } else { + message += ": "; + } + + if (err !== null && typeof err === "object") { + if (typeof err.stack === "string" && err.stack) { + const stack = cutOffLoaderExecution(err.stack); + + if (!err.hideStack) { + message += stack; + } else { + details = stack; + + if (typeof err.message === "string" && err.message) { + message += err.message; + } else { + message += err; + } + } + } else if (typeof err.message === "string" && err.message) { + message += err.message; + } else { + message += String(err); + } + } else { + message += String(err); + } + + super(message); + + this.name = "ModuleBuildError"; + this.details = details; + this.error = err; + + Error.captureStackTrace(this, this.constructor); + } + + serialize(context) { + const { write } = context; + + write(this.error); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.error = read(); + + super.deserialize(context); + } +} + +makeSerializable(ModuleBuildError, "webpack/lib/ModuleBuildError"); + +module.exports = ModuleBuildError; + + +/***/ }), + +/***/ 1939: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Module")} Module */ + +class ModuleDependencyError extends WebpackError { + /** + * Creates an instance of ModuleDependencyError. + * @param {Module} module module tied to dependency + * @param {Error} err error thrown + * @param {DependencyLocation} loc location of dependency + */ + constructor(module, err, loc) { + super(err.message); + + this.name = "ModuleDependencyError"; + this.details = err.stack.split("\n").slice(1).join("\n"); + this.module = module; + this.loc = loc; + this.error = err; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ModuleDependencyError; + + +/***/ }), + +/***/ 57570: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Module")} Module */ + +class ModuleDependencyWarning extends WebpackError { + /** + * @param {Module} module module tied to dependency + * @param {Error} err error thrown + * @param {DependencyLocation} loc location of dependency + */ + constructor(module, err, loc) { + super(err ? err.message : ""); + + this.name = "ModuleDependencyWarning"; + this.details = err && err.stack.split("\n").slice(1).join("\n"); + this.module = module; + this.loc = loc; + /** error is not (de)serialized, so it might be undefined after deserialization */ + this.error = err; + + Error.captureStackTrace(this, this.constructor); + } +} + +makeSerializable( + ModuleDependencyWarning, + "webpack/lib/ModuleDependencyWarning" +); + +module.exports = ModuleDependencyWarning; + + +/***/ }), + +/***/ 76422: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { cleanUp } = __webpack_require__(31183); +const WebpackError = __webpack_require__(24274); +const makeSerializable = __webpack_require__(55575); + +class ModuleError extends WebpackError { + /** + * @param {Error} err error thrown + * @param {{from?: string|null}} info additional info + */ + constructor(err, { from = null } = {}) { + let message = "Module Error"; + + if (from) { + message += ` (from ${from}):\n`; + } else { + message += ": "; + } + + if (err && typeof err === "object" && err.message) { + message += err.message; + } else if (err) { + message += err; + } + + super(message); + + this.name = "ModuleError"; + this.error = err; + this.details = + err && typeof err === "object" && err.stack + ? cleanUp(err.stack, this.message) + : undefined; + + Error.captureStackTrace(this, this.constructor); + } + + serialize(context) { + const { write } = context; + + write(this.error); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.error = read(); + + super.deserialize(context); + } +} + +makeSerializable(ModuleError, "webpack/lib/ModuleError"); + +module.exports = ModuleError; + + +/***/ }), + +/***/ 6259: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Module")} Module */ + +/** + * @typedef {Object} ModuleFactoryResult + * @property {Module=} module the created module or unset if no module was created + * @property {Set=} fileDependencies + * @property {Set=} contextDependencies + * @property {Set=} missingDependencies + */ + +/** + * @typedef {Object} ModuleFactoryCreateDataContextInfo + * @property {string} issuer + * @property {string | null=} issuerLayer + * @property {string} compiler + */ + +/** + * @typedef {Object} ModuleFactoryCreateData + * @property {ModuleFactoryCreateDataContextInfo} contextInfo + * @property {ResolveOptions=} resolveOptions + * @property {string} context + * @property {Dependency[]} dependencies + */ + +class ModuleFactory { + /* istanbul ignore next */ + /** + * @abstract + * @param {ModuleFactoryCreateData} data data object + * @param {function(Error=, ModuleFactoryResult=): void} callback callback + * @returns {void} + */ + create(data, callback) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } +} + +module.exports = ModuleFactory; + + +/***/ }), + +/***/ 79843: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const createHash = __webpack_require__(34627); +const memoize = __webpack_require__(18003); + +const ModuleFilenameHelpers = exports; + +// TODO webpack 6: consider removing these +ModuleFilenameHelpers.ALL_LOADERS_RESOURCE = "[all-loaders][resource]"; +ModuleFilenameHelpers.REGEXP_ALL_LOADERS_RESOURCE = /\[all-?loaders\]\[resource\]/gi; +ModuleFilenameHelpers.LOADERS_RESOURCE = "[loaders][resource]"; +ModuleFilenameHelpers.REGEXP_LOADERS_RESOURCE = /\[loaders\]\[resource\]/gi; +ModuleFilenameHelpers.RESOURCE = "[resource]"; +ModuleFilenameHelpers.REGEXP_RESOURCE = /\[resource\]/gi; +ModuleFilenameHelpers.ABSOLUTE_RESOURCE_PATH = "[absolute-resource-path]"; +// cSpell:words olute +ModuleFilenameHelpers.REGEXP_ABSOLUTE_RESOURCE_PATH = /\[abs(olute)?-?resource-?path\]/gi; +ModuleFilenameHelpers.RESOURCE_PATH = "[resource-path]"; +ModuleFilenameHelpers.REGEXP_RESOURCE_PATH = /\[resource-?path\]/gi; +ModuleFilenameHelpers.ALL_LOADERS = "[all-loaders]"; +ModuleFilenameHelpers.REGEXP_ALL_LOADERS = /\[all-?loaders\]/gi; +ModuleFilenameHelpers.LOADERS = "[loaders]"; +ModuleFilenameHelpers.REGEXP_LOADERS = /\[loaders\]/gi; +ModuleFilenameHelpers.QUERY = "[query]"; +ModuleFilenameHelpers.REGEXP_QUERY = /\[query\]/gi; +ModuleFilenameHelpers.ID = "[id]"; +ModuleFilenameHelpers.REGEXP_ID = /\[id\]/gi; +ModuleFilenameHelpers.HASH = "[hash]"; +ModuleFilenameHelpers.REGEXP_HASH = /\[hash\]/gi; +ModuleFilenameHelpers.NAMESPACE = "[namespace]"; +ModuleFilenameHelpers.REGEXP_NAMESPACE = /\[namespace\]/gi; + +const getAfter = (strFn, token) => { + return () => { + const str = strFn(); + const idx = str.indexOf(token); + return idx < 0 ? "" : str.substr(idx); + }; +}; + +const getBefore = (strFn, token) => { + return () => { + const str = strFn(); + const idx = str.lastIndexOf(token); + return idx < 0 ? "" : str.substr(0, idx); + }; +}; + +const getHash = strFn => { + return () => { + const hash = createHash("md4"); + hash.update(strFn()); + const digest = /** @type {string} */ (hash.digest("hex")); + return digest.substr(0, 4); + }; +}; + +const asRegExp = test => { + if (typeof test === "string") { + test = new RegExp("^" + test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")); + } + return test; +}; + +const lazyObject = obj => { + const newObj = {}; + for (const key of Object.keys(obj)) { + const fn = obj[key]; + Object.defineProperty(newObj, key, { + get: () => fn(), + set: v => { + Object.defineProperty(newObj, key, { + value: v, + enumerable: true, + writable: true + }); + }, + enumerable: true, + configurable: true + }); + } + return newObj; +}; + +const REGEXP = /\[\\*([\w-]+)\\*\]/gi; + +ModuleFilenameHelpers.createFilename = ( + module, + options, + { requestShortener, chunkGraph } +) => { + const opts = { + namespace: "", + moduleFilenameTemplate: "", + ...(typeof options === "object" + ? options + : { + moduleFilenameTemplate: options + }) + }; + + let absoluteResourcePath; + let hash; + let identifier; + let moduleId; + let shortIdentifier; + if (module === undefined) module = ""; + if (typeof module === "string") { + shortIdentifier = memoize(() => requestShortener.shorten(module)); + identifier = shortIdentifier; + moduleId = () => ""; + absoluteResourcePath = () => module.split("!").pop(); + hash = getHash(identifier); + } else { + shortIdentifier = memoize(() => + module.readableIdentifier(requestShortener) + ); + identifier = memoize(() => requestShortener.shorten(module.identifier())); + moduleId = () => chunkGraph.getModuleId(module); + absoluteResourcePath = () => module.identifier().split("!").pop(); + hash = getHash(identifier); + } + const resource = memoize(() => shortIdentifier().split("!").pop()); + + const loaders = getBefore(shortIdentifier, "!"); + const allLoaders = getBefore(identifier, "!"); + const query = getAfter(resource, "?"); + const resourcePath = () => { + const q = query().length; + return q === 0 ? resource() : resource().slice(0, -q); + }; + if (typeof opts.moduleFilenameTemplate === "function") { + return opts.moduleFilenameTemplate( + lazyObject({ + identifier: identifier, + shortIdentifier: shortIdentifier, + resource: resource, + resourcePath: memoize(resourcePath), + absoluteResourcePath: memoize(absoluteResourcePath), + allLoaders: memoize(allLoaders), + query: memoize(query), + moduleId: memoize(moduleId), + hash: memoize(hash), + namespace: () => opts.namespace + }) + ); + } + + // TODO webpack 6: consider removing alternatives without dashes + /** @type {Map} */ + const replacements = new Map([ + ["identifier", identifier], + ["short-identifier", shortIdentifier], + ["resource", resource], + ["resource-path", resourcePath], + // cSpell:words resourcepath + ["resourcepath", resourcePath], + ["absolute-resource-path", absoluteResourcePath], + ["abs-resource-path", absoluteResourcePath], + // cSpell:words absoluteresource + ["absoluteresource-path", absoluteResourcePath], + // cSpell:words absresource + ["absresource-path", absoluteResourcePath], + // cSpell:words resourcepath + ["absolute-resourcepath", absoluteResourcePath], + // cSpell:words resourcepath + ["abs-resourcepath", absoluteResourcePath], + // cSpell:words absoluteresourcepath + ["absoluteresourcepath", absoluteResourcePath], + // cSpell:words absresourcepath + ["absresourcepath", absoluteResourcePath], + ["all-loaders", allLoaders], + // cSpell:words allloaders + ["allloaders", allLoaders], + ["loaders", loaders], + ["query", query], + ["id", moduleId], + ["hash", hash], + ["namespace", () => opts.namespace] + ]); + + // TODO webpack 6: consider removing weird double placeholders + return opts.moduleFilenameTemplate + .replace(ModuleFilenameHelpers.REGEXP_ALL_LOADERS_RESOURCE, "[identifier]") + .replace( + ModuleFilenameHelpers.REGEXP_LOADERS_RESOURCE, + "[short-identifier]" + ) + .replace(REGEXP, (match, content) => { + if (content.length + 2 === match.length) { + const replacement = replacements.get(content.toLowerCase()); + if (replacement !== undefined) { + return replacement(); + } + } else if (match.startsWith("[\\") && match.endsWith("\\]")) { + return `[${match.slice(2, -2)}]`; + } + return match; + }); +}; + +ModuleFilenameHelpers.replaceDuplicates = (array, fn, comparator) => { + const countMap = Object.create(null); + const posMap = Object.create(null); + array.forEach((item, idx) => { + countMap[item] = countMap[item] || []; + countMap[item].push(idx); + posMap[item] = 0; + }); + if (comparator) { + Object.keys(countMap).forEach(item => { + countMap[item].sort(comparator); + }); + } + return array.map((item, i) => { + if (countMap[item].length > 1) { + if (comparator && countMap[item][0] === i) return item; + return fn(item, i, posMap[item]++); + } else { + return item; + } + }); +}; + +ModuleFilenameHelpers.matchPart = (str, test) => { + if (!test) return true; + test = asRegExp(test); + if (Array.isArray(test)) { + return test.map(asRegExp).some(regExp => regExp.test(str)); + } else { + return test.test(str); + } +}; + +ModuleFilenameHelpers.matchObject = (obj, str) => { + if (obj.test) { + if (!ModuleFilenameHelpers.matchPart(str, obj.test)) { + return false; + } + } + if (obj.include) { + if (!ModuleFilenameHelpers.matchPart(str, obj.include)) { + return false; + } + } + if (obj.exclude) { + if (ModuleFilenameHelpers.matchPart(str, obj.exclude)) { + return false; + } + } + return true; +}; + + +/***/ }), + +/***/ 73444: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const ExportsInfo = __webpack_require__(54227); +const ModuleGraphConnection = __webpack_require__(39519); + +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./ExportsInfo").ExportInfo} ExportInfo */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleProfile")} ModuleProfile */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @template T @typedef {import("./util/SortableSet")} SortableSet */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * @callback OptimizationBailoutFunction + * @param {RequestShortener} requestShortener + * @returns {string} + */ + +const EMPTY_ARRAY = []; + +class ModuleGraphModule { + constructor() { + /** @type {Set} */ + this.incomingConnections = new Set(); + /** @type {Set | undefined} */ + this.outgoingConnections = undefined; + /** @type {Module | null} */ + this.issuer = undefined; + /** @type {(string | OptimizationBailoutFunction)[]} */ + this.optimizationBailout = []; + /** @type {ExportsInfo} */ + this.exports = new ExportsInfo(); + /** @type {number} */ + this.preOrderIndex = null; + /** @type {number} */ + this.postOrderIndex = null; + /** @type {number} */ + this.depth = null; + /** @type {ModuleProfile} */ + this.profile = undefined; + /** @type {boolean} */ + this.async = false; + } +} + +class ModuleGraphDependency { + constructor() { + /** @type {ModuleGraphConnection} */ + this.connection = undefined; + /** @type {Module} */ + this.parentModule = undefined; + /** @type {DependenciesBlock} */ + this.parentBlock = undefined; + } +} + +class ModuleGraph { + constructor() { + /** @type {Map} */ + this._dependencyMap = new Map(); + /** @type {Map} */ + this._moduleMap = new Map(); + /** @type {Map>} */ + this._originMap = new Map(); + /** @type {Map} */ + this._metaMap = new Map(); + + // Caching + this._cacheModuleGraphModuleKey1 = undefined; + this._cacheModuleGraphModuleValue1 = undefined; + this._cacheModuleGraphModuleKey2 = undefined; + this._cacheModuleGraphModuleValue2 = undefined; + this._cacheModuleGraphDependencyKey = undefined; + this._cacheModuleGraphDependencyValue = undefined; + } + + /** + * @param {Module} module the module + * @returns {ModuleGraphModule} the internal module + */ + _getModuleGraphModule(module) { + if (this._cacheModuleGraphModuleKey1 === module) + return this._cacheModuleGraphModuleValue1; + if (this._cacheModuleGraphModuleKey2 === module) + return this._cacheModuleGraphModuleValue2; + let mgm = this._moduleMap.get(module); + if (mgm === undefined) { + mgm = new ModuleGraphModule(); + this._moduleMap.set(module, mgm); + } + this._cacheModuleGraphModuleKey2 = this._cacheModuleGraphModuleKey1; + this._cacheModuleGraphModuleValue2 = this._cacheModuleGraphModuleValue1; + this._cacheModuleGraphModuleKey1 = module; + this._cacheModuleGraphModuleValue1 = mgm; + return mgm; + } + + /** + * @param {Dependency} dependency the dependency + * @returns {ModuleGraphDependency} the internal dependency + */ + _getModuleGraphDependency(dependency) { + if (this._cacheModuleGraphDependencyKey === dependency) + return this._cacheModuleGraphDependencyValue; + let mgd = this._dependencyMap.get(dependency); + if (mgd === undefined) { + mgd = new ModuleGraphDependency(); + this._dependencyMap.set(dependency, mgd); + } + this._cacheModuleGraphDependencyKey = dependency; + this._cacheModuleGraphDependencyValue = mgd; + return mgd; + } + + /** + * @param {Dependency} dependency the dependency + * @param {DependenciesBlock} block parent block + * @param {Module} module parent module + * @returns {void} + */ + setParents(dependency, block, module) { + const mgd = this._getModuleGraphDependency(dependency); + mgd.parentBlock = block; + mgd.parentModule = module; + } + + /** + * @param {Dependency} dependency the dependency + * @returns {Module} parent module + */ + getParentModule(dependency) { + const mgd = this._getModuleGraphDependency(dependency); + return mgd.parentModule; + } + + /** + * @param {Dependency} dependency the dependency + * @returns {DependenciesBlock} parent block + */ + getParentBlock(dependency) { + const mgd = this._getModuleGraphDependency(dependency); + return mgd.parentBlock; + } + + /** + * @param {Module} originModule the referencing module + * @param {Dependency} dependency the referencing dependency + * @param {Module} module the referenced module + * @returns {void} + */ + setResolvedModule(originModule, dependency, module) { + const connection = new ModuleGraphConnection( + originModule, + dependency, + module, + undefined, + dependency.weak, + dependency.getCondition(this) + ); + const mgd = this._getModuleGraphDependency(dependency); + mgd.connection = connection; + const connections = this._getModuleGraphModule(module).incomingConnections; + connections.add(connection); + const mgm = this._getModuleGraphModule(originModule); + if (mgm.outgoingConnections === undefined) { + mgm.outgoingConnections = new Set(); + } + mgm.outgoingConnections.add(connection); + } + + /** + * @param {Dependency} dependency the referencing dependency + * @param {Module} module the referenced module + * @returns {void} + */ + updateModule(dependency, module) { + const mgd = this._getModuleGraphDependency(dependency); + if (mgd.connection.module === module) return; + const { connection } = mgd; + const newConnection = connection.clone(); + newConnection.module = module; + mgd.connection = newConnection; + connection.setActive(false); + const originMgm = this._getModuleGraphModule(connection.originModule); + originMgm.outgoingConnections.add(newConnection); + const targetMgm = this._getModuleGraphModule(module); + targetMgm.incomingConnections.add(newConnection); + } + + /** + * @param {Dependency} dependency the referencing dependency + * @returns {void} + */ + removeConnection(dependency) { + const mgd = this._getModuleGraphDependency(dependency); + const { connection } = mgd; + const targetMgm = this._getModuleGraphModule(connection.module); + targetMgm.incomingConnections.delete(connection); + const originMgm = this._getModuleGraphModule(connection.originModule); + originMgm.outgoingConnections.delete(connection); + mgd.connection = undefined; + } + + /** + * @param {Dependency} dependency the referencing dependency + * @param {string} explanation an explanation + * @returns {void} + */ + addExplanation(dependency, explanation) { + const { connection } = this._getModuleGraphDependency(dependency); + connection.addExplanation(explanation); + } + + /** + * @param {Module} sourceModule the source module + * @param {Module} targetModule the target module + * @returns {void} + */ + cloneModuleAttributes(sourceModule, targetModule) { + const oldMgm = this._getModuleGraphModule(sourceModule); + const newMgm = this._getModuleGraphModule(targetModule); + newMgm.postOrderIndex = oldMgm.postOrderIndex; + newMgm.preOrderIndex = oldMgm.preOrderIndex; + newMgm.depth = oldMgm.depth; + newMgm.exports = oldMgm.exports; + newMgm.async = oldMgm.async; + } + + /** + * @param {Module} module the module + * @returns {void} + */ + removeModuleAttributes(module) { + const mgm = this._getModuleGraphModule(module); + mgm.postOrderIndex = null; + mgm.preOrderIndex = null; + mgm.depth = null; + mgm.async = false; + } + + /** + * @returns {void} + */ + removeAllModuleAttributes() { + for (const mgm of this._moduleMap.values()) { + mgm.postOrderIndex = null; + mgm.preOrderIndex = null; + mgm.depth = null; + mgm.async = false; + } + } + + /** + * @param {Module} oldModule the old referencing module + * @param {Module} newModule the new referencing module + * @param {function(ModuleGraphConnection): boolean} filterConnection filter predicate for replacement + * @returns {void} + */ + moveModuleConnections(oldModule, newModule, filterConnection) { + if (oldModule === newModule) return; + const oldMgm = this._getModuleGraphModule(oldModule); + const newMgm = this._getModuleGraphModule(newModule); + // Outgoing connections + const oldConnections = oldMgm.outgoingConnections; + if (oldConnections !== undefined) { + if (newMgm.outgoingConnections === undefined) { + newMgm.outgoingConnections = new Set(); + } + const newConnections = newMgm.outgoingConnections; + for (const connection of oldConnections) { + if (filterConnection(connection)) { + connection.originModule = newModule; + newConnections.add(connection); + oldConnections.delete(connection); + } + } + } + // Incoming connections + const oldConnections2 = oldMgm.incomingConnections; + const newConnections2 = newMgm.incomingConnections; + for (const connection of oldConnections2) { + if (filterConnection(connection)) { + connection.module = newModule; + newConnections2.add(connection); + oldConnections2.delete(connection); + } + } + } + + /** + * @param {Module} oldModule the old referencing module + * @param {Module} newModule the new referencing module + * @param {function(ModuleGraphConnection): boolean} filterConnection filter predicate for replacement + * @returns {void} + */ + copyOutgoingModuleConnections(oldModule, newModule, filterConnection) { + if (oldModule === newModule) return; + const oldMgm = this._getModuleGraphModule(oldModule); + const newMgm = this._getModuleGraphModule(newModule); + // Outgoing connections + const oldConnections = oldMgm.outgoingConnections; + if (oldConnections !== undefined) { + if (newMgm.outgoingConnections === undefined) { + newMgm.outgoingConnections = new Set(); + } + const newConnections = newMgm.outgoingConnections; + for (const connection of oldConnections) { + if (filterConnection(connection)) { + const newConnection = connection.clone(); + newConnection.originModule = newModule; + newConnections.add(newConnection); + if (newConnection.module !== undefined) { + const otherMgm = this._getModuleGraphModule(newConnection.module); + if (otherMgm.incomingConnections === undefined) { + otherMgm.incomingConnections = new Set(); + } + otherMgm.incomingConnections.add(newConnection); + } + } + } + } + } + + /** + * @param {Module} module the referenced module + * @param {string} explanation an explanation why it's referenced + * @returns {void} + */ + addExtraReason(module, explanation) { + const connections = this._getModuleGraphModule(module).incomingConnections; + connections.add(new ModuleGraphConnection(null, null, module, explanation)); + } + + /** + * @param {Dependency} dependency the dependency to look for a referenced module + * @returns {Module} the referenced module + */ + getResolvedModule(dependency) { + const { connection } = this._getModuleGraphDependency(dependency); + return connection !== undefined ? connection.resolvedModule : null; + } + + /** + * @param {Dependency} dependency the dependency to look for a referenced module + * @returns {ModuleGraphConnection | undefined} the connection + */ + getConnection(dependency) { + const { connection } = this._getModuleGraphDependency(dependency); + return connection; + } + + /** + * @param {Dependency} dependency the dependency to look for a referenced module + * @returns {Module} the referenced module + */ + getModule(dependency) { + const { connection } = this._getModuleGraphDependency(dependency); + return connection !== undefined ? connection.module : null; + } + + /** + * @param {Dependency} dependency the dependency to look for a referencing module + * @returns {Module} the referencing module + */ + getOrigin(dependency) { + const { connection } = this._getModuleGraphDependency(dependency); + return connection !== undefined ? connection.originModule : null; + } + + /** + * @param {Dependency} dependency the dependency to look for a referencing module + * @returns {Module} the original referencing module + */ + getResolvedOrigin(dependency) { + const { connection } = this._getModuleGraphDependency(dependency); + return connection !== undefined ? connection.resolvedOriginModule : null; + } + + /** + * @param {Module} module the module + * @returns {Iterable} reasons why a module is included + */ + getIncomingConnections(module) { + const connections = this._getModuleGraphModule(module).incomingConnections; + return connections; + } + + /** + * @param {Module} module the module + * @returns {Iterable} list of outgoing connections + */ + getOutgoingConnections(module) { + const connections = this._getModuleGraphModule(module).outgoingConnections; + return connections === undefined ? EMPTY_ARRAY : connections; + } + + /** + * @param {Module} module the module + * @returns {ModuleProfile | null} the module profile + */ + getProfile(module) { + const mgm = this._getModuleGraphModule(module); + return mgm.profile; + } + + /** + * @param {Module} module the module + * @param {ModuleProfile | null} profile the module profile + * @returns {void} + */ + setProfile(module, profile) { + const mgm = this._getModuleGraphModule(module); + mgm.profile = profile; + } + + /** + * @param {Module} module the module + * @returns {Module | null} the issuer module + */ + getIssuer(module) { + const mgm = this._getModuleGraphModule(module); + return mgm.issuer; + } + + /** + * @param {Module} module the module + * @param {Module | null} issuer the issuer module + * @returns {void} + */ + setIssuer(module, issuer) { + const mgm = this._getModuleGraphModule(module); + mgm.issuer = issuer; + } + + /** + * @param {Module} module the module + * @param {Module | null} issuer the issuer module + * @returns {void} + */ + setIssuerIfUnset(module, issuer) { + const mgm = this._getModuleGraphModule(module); + if (mgm.issuer === undefined) mgm.issuer = issuer; + } + + /** + * @param {Module} module the module + * @returns {(string | OptimizationBailoutFunction)[]} optimization bailouts + */ + getOptimizationBailout(module) { + const mgm = this._getModuleGraphModule(module); + return mgm.optimizationBailout; + } + + /** + * @param {Module} module the module + * @returns {true | string[] | null} the provided exports + */ + getProvidedExports(module) { + const mgm = this._getModuleGraphModule(module); + return mgm.exports.getProvidedExports(); + } + + /** + * @param {Module} module the module + * @param {string | string[]} exportName a name of an export + * @returns {boolean | null} true, if the export is provided by the module. + * null, if it's unknown. + * false, if it's not provided. + */ + isExportProvided(module, exportName) { + const mgm = this._getModuleGraphModule(module); + const result = mgm.exports.isExportProvided(exportName); + return result === undefined ? null : result; + } + + /** + * @param {Module} module the module + * @returns {ExportsInfo} info about the exports + */ + getExportsInfo(module) { + const mgm = this._getModuleGraphModule(module); + return mgm.exports; + } + + /** + * @param {Module} module the module + * @param {string} exportName the export + * @returns {ExportInfo} info about the export + */ + getExportInfo(module, exportName) { + const mgm = this._getModuleGraphModule(module); + return mgm.exports.getExportInfo(exportName); + } + + /** + * @param {Module} module the module + * @param {string} exportName the export + * @returns {ExportInfo} info about the export (do not modify) + */ + getReadOnlyExportInfo(module, exportName) { + const mgm = this._getModuleGraphModule(module); + return mgm.exports.getReadOnlyExportInfo(exportName); + } + + /** + * @param {Module} module the module + * @param {RuntimeSpec} runtime the runtime + * @returns {false | true | SortableSet | null} the used exports + * false: module is not used at all. + * true: the module namespace/object export is used. + * SortableSet: these export names are used. + * empty SortableSet: module is used but no export. + * null: unknown, worst case should be assumed. + */ + getUsedExports(module, runtime) { + const mgm = this._getModuleGraphModule(module); + return mgm.exports.getUsedExports(runtime); + } + + /** + * @param {Module} module the module + * @returns {number} the index of the module + */ + getPreOrderIndex(module) { + const mgm = this._getModuleGraphModule(module); + return mgm.preOrderIndex; + } + + /** + * @param {Module} module the module + * @returns {number} the index of the module + */ + getPostOrderIndex(module) { + const mgm = this._getModuleGraphModule(module); + return mgm.postOrderIndex; + } + + /** + * @param {Module} module the module + * @param {number} index the index of the module + * @returns {void} + */ + setPreOrderIndex(module, index) { + const mgm = this._getModuleGraphModule(module); + mgm.preOrderIndex = index; + } + + /** + * @param {Module} module the module + * @param {number} index the index of the module + * @returns {boolean} true, if the index was set + */ + setPreOrderIndexIfUnset(module, index) { + const mgm = this._getModuleGraphModule(module); + if (mgm.preOrderIndex === null) { + mgm.preOrderIndex = index; + return true; + } + return false; + } + + /** + * @param {Module} module the module + * @param {number} index the index of the module + * @returns {void} + */ + setPostOrderIndex(module, index) { + const mgm = this._getModuleGraphModule(module); + mgm.postOrderIndex = index; + } + + /** + * @param {Module} module the module + * @param {number} index the index of the module + * @returns {boolean} true, if the index was set + */ + setPostOrderIndexIfUnset(module, index) { + const mgm = this._getModuleGraphModule(module); + if (mgm.postOrderIndex === null) { + mgm.postOrderIndex = index; + return true; + } + return false; + } + + /** + * @param {Module} module the module + * @returns {number} the depth of the module + */ + getDepth(module) { + const mgm = this._getModuleGraphModule(module); + return mgm.depth; + } + + /** + * @param {Module} module the module + * @param {number} depth the depth of the module + * @returns {void} + */ + setDepth(module, depth) { + const mgm = this._getModuleGraphModule(module); + mgm.depth = depth; + } + + /** + * @param {Module} module the module + * @param {number} depth the depth of the module + * @returns {boolean} true, if the depth was set + */ + setDepthIfLower(module, depth) { + const mgm = this._getModuleGraphModule(module); + if (mgm.depth === null || mgm.depth > depth) { + mgm.depth = depth; + return true; + } + return false; + } + + /** + * @param {Module} module the module + * @returns {boolean} true, if the module is async + */ + isAsync(module) { + const mgm = this._getModuleGraphModule(module); + return mgm.async; + } + + /** + * @param {Module} module the module + * @returns {void} + */ + setAsync(module) { + const mgm = this._getModuleGraphModule(module); + mgm.async = true; + } + + /** + * @param {any} thing any thing + * @returns {Object} metadata + */ + getMeta(thing) { + let meta = this._metaMap.get(thing); + if (meta === undefined) { + meta = Object.create(null); + this._metaMap.set(thing, meta); + } + return meta; + } + + // TODO remove in webpack 6 + /** + * @param {Module} module the module + * @param {string} deprecateMessage message for the deprecation message + * @param {string} deprecationCode code for the deprecation + * @returns {ModuleGraph} the module graph + */ + static getModuleGraphForModule(module, deprecateMessage, deprecationCode) { + const fn = deprecateMap.get(deprecateMessage); + if (fn) return fn(module); + const newFn = util.deprecate( + /** + * @param {Module} module the module + * @returns {ModuleGraph} the module graph + */ + module => { + const moduleGraph = moduleGraphForModuleMap.get(module); + if (!moduleGraph) + throw new Error( + deprecateMessage + + "There was no ModuleGraph assigned to the Module for backward-compat (Use the new API)" + ); + return moduleGraph; + }, + deprecateMessage + ": Use new ModuleGraph API", + deprecationCode + ); + deprecateMap.set(deprecateMessage, newFn); + return newFn(module); + } + + // TODO remove in webpack 6 + /** + * @param {Module} module the module + * @param {ModuleGraph} moduleGraph the module graph + * @returns {void} + */ + static setModuleGraphForModule(module, moduleGraph) { + moduleGraphForModuleMap.set(module, moduleGraph); + } +} + +// TODO remove in webpack 6 +/** @type {WeakMap} */ +const moduleGraphForModuleMap = new WeakMap(); + +// TODO remove in webpack 6 +/** @type {Map ModuleGraph>} */ +const deprecateMap = new Map(); + +module.exports = ModuleGraph; +module.exports.ModuleGraphConnection = ModuleGraphConnection; + + +/***/ }), + +/***/ 39519: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * Module itself is not connected, but transitive modules are connected transitively. + */ +const TRANSITIVE_ONLY = Symbol("transitive only"); + +/** + * While determining the active state, this flag is used to signal a circular connection. + */ +const CIRCULAR_CONNECTION = Symbol("circular connection"); + +/** @typedef {boolean | typeof TRANSITIVE_ONLY | typeof CIRCULAR_CONNECTION} ConnectionState */ + +/** + * @param {ConnectionState} a first + * @param {ConnectionState} b second + * @returns {ConnectionState} merged + */ +const addConnectionStates = (a, b) => { + if (a === true || b === true) return true; + if (a === false) return b; + if (b === false) return a; + if (a === TRANSITIVE_ONLY) return b; + if (b === TRANSITIVE_ONLY) return a; + return a; +}; + +/** + * @param {ConnectionState} a first + * @param {ConnectionState} b second + * @returns {ConnectionState} intersected + */ +const intersectConnectionStates = (a, b) => { + if (a === false || b === false) return false; + if (a === true) return b; + if (b === true) return a; + if (a === CIRCULAR_CONNECTION) return b; + if (b === CIRCULAR_CONNECTION) return a; + return a; +}; + +class ModuleGraphConnection { + /** + * @param {Module|undefined} originModule the referencing module + * @param {Dependency|undefined} dependency the referencing dependency + * @param {Module} module the referenced module + * @param {string=} explanation some extra detail + * @param {boolean=} weak the reference is weak + * @param {function(ModuleGraphConnection, RuntimeSpec): ConnectionState=} condition condition for the connection + */ + constructor( + originModule, + dependency, + module, + explanation, + weak = false, + condition = undefined + ) { + this.originModule = originModule; + this.resolvedOriginModule = originModule; + this.dependency = dependency; + this.resolvedModule = module; + this.module = module; + this.weak = weak; + this.conditional = !!condition; + this._active = true; + /** @type {function(ModuleGraphConnection, RuntimeSpec): ConnectionState} */ + this.condition = condition; + /** @type {Set} */ + this.explanations = undefined; + if (explanation) { + this.explanations = new Set(); + this.explanations.add(explanation); + } + } + + clone() { + const clone = new ModuleGraphConnection( + this.resolvedOriginModule, + this.dependency, + this.resolvedModule, + undefined, + this.weak, + this.condition + ); + clone.originModule = this.originModule; + clone.module = this.module; + clone.conditional = this.conditional; + clone._active = this._active; + if (this.explanations) clone.explanations = new Set(this.explanations); + return clone; + } + + /** + * @param {function(ModuleGraphConnection, RuntimeSpec): ConnectionState} condition condition for the connection + * @returns {void} + */ + addCondition(condition) { + if (this.conditional) { + const old = this.condition; + this.condition = (c, r) => + intersectConnectionStates(old(c, r), condition(c, r)); + } else if (this._active) { + this.conditional = true; + this.condition = condition; + } + } + + /** + * @param {string} explanation the explanation to add + * @returns {void} + */ + addExplanation(explanation) { + if (this.explanations === undefined) { + this.explanations = new Set(); + } + this.explanations.add(explanation); + } + + get explanation() { + if (this.explanations === undefined) return ""; + return Array.from(this.explanations).join(" "); + } + + // TODO webpack 5 remove + get active() { + throw new Error("Use getActiveState instead"); + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true, if the connection is active + */ + isActive(runtime) { + if (!this.conditional) return this._active; + return this.condition(this, runtime) !== false; + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {boolean} true, if the connection is active + */ + isTargetActive(runtime) { + if (!this.conditional) return this._active; + return this.condition(this, runtime) === true; + } + + /** + * @param {RuntimeSpec} runtime the runtime + * @returns {ConnectionState} true: fully active, false: inactive, TRANSITIVE: direct module inactive, but transitive connection maybe active + */ + getActiveState(runtime) { + if (!this.conditional) return this._active; + return this.condition(this, runtime); + } + + /** + * @param {boolean} value active or not + * @returns {void} + */ + setActive(value) { + this.conditional = false; + this._active = value; + } + + set active(value) { + throw new Error("Use setActive instead"); + } +} + +/** @typedef {typeof TRANSITIVE_ONLY} TRANSITIVE_ONLY */ +/** @typedef {typeof CIRCULAR_CONNECTION} CIRCULAR_CONNECTION */ + +module.exports = ModuleGraphConnection; +module.exports.addConnectionStates = addConnectionStates; +module.exports.TRANSITIVE_ONLY = /** @type {typeof TRANSITIVE_ONLY} */ (TRANSITIVE_ONLY); +module.exports.CIRCULAR_CONNECTION = /** @type {typeof CIRCULAR_CONNECTION} */ (CIRCULAR_CONNECTION); + + +/***/ }), + +/***/ 89376: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource, RawSource, CachedSource } = __webpack_require__(55600); +const { UsageState } = __webpack_require__(54227); +const Template = __webpack_require__(90751); +const JavascriptModulesPlugin = __webpack_require__(80867); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./ExportsInfo")} ExportsInfo */ +/** @typedef {import("./ExportsInfo").ExportInfo} ExportInfo */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./ModuleTemplate")} ModuleTemplate */ +/** @typedef {import("./RequestShortener")} RequestShortener */ + +const joinIterableWithComma = iterable => { + // This is more performant than Array.from().join(", ") + // as it doesn't create an array + let str = ""; + let first = true; + for (const item of iterable) { + if (first) { + first = false; + } else { + str += ", "; + } + str += item; + } + return str; +}; + +/** + * @param {ConcatSource} source output + * @param {string} indent spacing + * @param {ExportsInfo} exportsInfo data + * @param {ModuleGraph} moduleGraph moduleGraph + * @param {RequestShortener} requestShortener requestShortener + * @param {Set} alreadyPrinted deduplication set + * @returns {void} + */ +const printExportsInfoToSource = ( + source, + indent, + exportsInfo, + moduleGraph, + requestShortener, + alreadyPrinted = new Set() +) => { + const otherExportsInfo = exportsInfo.otherExportsInfo; + + let alreadyPrintedExports = 0; + + // determine exports to print + const printedExports = []; + for (const exportInfo of exportsInfo.orderedExports) { + if (!alreadyPrinted.has(exportInfo)) { + alreadyPrinted.add(exportInfo); + printedExports.push(exportInfo); + } else { + alreadyPrintedExports++; + } + } + let showOtherExports = false; + if (!alreadyPrinted.has(otherExportsInfo)) { + alreadyPrinted.add(otherExportsInfo); + showOtherExports = true; + } else { + alreadyPrintedExports++; + } + + // print the exports + for (const exportInfo of printedExports) { + const target = exportInfo.getTarget(moduleGraph); + source.add( + Template.toComment( + `${indent}export ${JSON.stringify(exportInfo.name).slice( + 1, + -1 + )} [${exportInfo.getProvidedInfo()}] [${exportInfo.getUsedInfo()}] [${exportInfo.getRenameInfo()}]${ + target + ? ` -> ${target.module.readableIdentifier(requestShortener)}${ + target.export + ? ` .${target.export + .map(e => JSON.stringify(e).slice(1, -1)) + .join(".")}` + : "" + }` + : "" + }` + ) + "\n" + ); + if (exportInfo.exportsInfo) { + printExportsInfoToSource( + source, + indent + " ", + exportInfo.exportsInfo, + moduleGraph, + requestShortener, + alreadyPrinted + ); + } + } + + if (alreadyPrintedExports) { + source.add( + Template.toComment( + `${indent}... (${alreadyPrintedExports} already listed exports)` + ) + "\n" + ); + } + + if (showOtherExports) { + const target = otherExportsInfo.getTarget(moduleGraph); + if ( + target || + otherExportsInfo.provided !== false || + otherExportsInfo.getUsed(undefined) !== UsageState.Unused + ) { + const title = + printedExports.length > 0 || alreadyPrintedExports > 0 + ? "other exports" + : "exports"; + source.add( + Template.toComment( + `${indent}${title} [${otherExportsInfo.getProvidedInfo()}] [${otherExportsInfo.getUsedInfo()}]${ + target + ? ` -> ${target.module.readableIdentifier(requestShortener)}` + : "" + }` + ) + "\n" + ); + } + } +}; + +/** @type {WeakMap }>>} */ +const caches = new WeakMap(); + +class ModuleInfoHeaderPlugin { + /** + * @param {boolean=} verbose add more information like exports, runtime requirements and bailouts + */ + constructor(verbose = true) { + this._verbose = verbose; + } + /** + * @param {Compiler} compiler the compiler + * @returns {void} + */ + apply(compiler) { + const { _verbose: verbose } = this; + compiler.hooks.compilation.tap("ModuleInfoHeaderPlugin", compilation => { + const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation); + hooks.renderModulePackage.tap( + "ModuleInfoHeaderPlugin", + ( + moduleSource, + module, + { chunk, chunkGraph, moduleGraph, runtimeTemplate } + ) => { + const { requestShortener } = runtimeTemplate; + let cacheEntry; + let cache = caches.get(requestShortener); + if (cache === undefined) { + caches.set(requestShortener, (cache = new WeakMap())); + cache.set( + module, + (cacheEntry = { header: undefined, full: new WeakMap() }) + ); + } else { + cacheEntry = cache.get(module); + if (cacheEntry === undefined) { + cache.set( + module, + (cacheEntry = { header: undefined, full: new WeakMap() }) + ); + } else if (!verbose) { + const cachedSource = cacheEntry.full.get(moduleSource); + if (cachedSource !== undefined) return cachedSource; + } + } + const source = new ConcatSource(); + let header = cacheEntry.header; + if (header === undefined) { + const req = module.readableIdentifier(requestShortener); + const reqStr = req.replace(/\*\//g, "*_/"); + const reqStrStar = "*".repeat(reqStr.length); + const headerStr = `/*!****${reqStrStar}****!*\\\n !*** ${reqStr} ***!\n \\****${reqStrStar}****/\n`; + header = new RawSource(headerStr); + cacheEntry.header = header; + } + source.add(header); + if (verbose) { + const exportsType = module.buildMeta.exportsType; + source.add( + Template.toComment( + exportsType + ? `${exportsType} exports` + : "unknown exports (runtime-defined)" + ) + "\n" + ); + if (exportsType) { + const exportsInfo = moduleGraph.getExportsInfo(module); + printExportsInfoToSource( + source, + "", + exportsInfo, + moduleGraph, + requestShortener + ); + } + source.add( + Template.toComment( + `runtime requirements: ${joinIterableWithComma( + chunkGraph.getModuleRuntimeRequirements(module, chunk.runtime) + )}` + ) + "\n" + ); + const optimizationBailout = moduleGraph.getOptimizationBailout( + module + ); + if (optimizationBailout) { + for (const text of optimizationBailout) { + let code; + if (typeof text === "function") { + code = text(requestShortener); + } else { + code = text; + } + source.add(Template.toComment(`${code}`) + "\n"); + } + } + source.add(moduleSource); + return source; + } else { + source.add(moduleSource); + const cachedSource = new CachedSource(source); + cacheEntry.full.set(moduleSource, cachedSource); + return cachedSource; + } + } + ); + hooks.chunkHash.tap("ModuleInfoHeaderPlugin", (chunk, hash) => { + hash.update("ModuleInfoHeaderPlugin"); + hash.update("1"); + }); + }); + } +} +module.exports = ModuleInfoHeaderPlugin; + + +/***/ }), + +/***/ 71318: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Module")} Module */ + +const previouslyPolyfilledBuiltinModules = { + assert: "assert/", + buffer: "buffer/", + console: "console-browserify", + constants: "constants-browserify", + crypto: "crypto-browserify", + domain: "domain-browser", + events: "events/", + http: "stream-http", + https: "https-browserify", + os: "os-browserify/browser", + path: "path-browserify", + punycode: "punycode/", + process: "process/browser", + querystring: "querystring-es3", + stream: "stream-browserify", + _stream_duplex: "readable-stream/duplex", + _stream_passthrough: "readable-stream/passthrough", + _stream_readable: "readable-stream/readable", + _stream_transform: "readable-stream/transform", + _stream_writable: "readable-stream/writable", + string_decoder: "string_decoder/", + sys: "util/", + timers: "timers-browserify", + tty: "tty-browserify", + url: "url/", + util: "util/", + vm: "vm-browserify", + zlib: "browserify-zlib" +}; + +class ModuleNotFoundError extends WebpackError { + /** + * @param {Module} module module tied to dependency + * @param {Error&any} err error thrown + * @param {DependencyLocation} loc location of dependency + */ + constructor(module, err, loc) { + let message = `Module not found: ${err.toString()}`; + + // TODO remove in webpack 6 + const match = err.message.match(/Can't resolve '([^']+)'/); + if (match) { + const request = match[1]; + const alias = previouslyPolyfilledBuiltinModules[request]; + if (alias) { + const pathIndex = alias.indexOf("/"); + const dependency = pathIndex > 0 ? alias.slice(0, pathIndex) : alias; + message += + "\n\n" + + "BREAKING CHANGE: " + + "webpack < 5 used to include polyfills for node.js core modules by default.\n" + + "This is no longer the case. Verify if you need this module and configure a polyfill for it.\n\n"; + message += + "If you want to include a polyfill, you need to:\n" + + `\t- add a fallback 'resolve.fallback: { "${request}": require.resolve("${alias}") }'\n` + + `\t- install '${dependency}'\n`; + message += + "If you don't want to include a polyfill, you can use an empty module like this:\n" + + `\tresolve.fallback: { "${request}": false }`; + } + } + + super(message); + + this.name = "ModuleNotFoundError"; + this.details = err.details; + this.module = module; + this.error = err; + this.loc = loc; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ModuleNotFoundError; + + +/***/ }), + +/***/ 37734: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); +const makeSerializable = __webpack_require__(55575); + +const WASM_HEADER = Buffer.from([0x00, 0x61, 0x73, 0x6d]); + +class ModuleParseError extends WebpackError { + /** + * @param {string | Buffer} source source code + * @param {Error&any} err the parse error + * @param {string[]} loaders the loaders used + * @param {string} type module type + */ + constructor(source, err, loaders, type) { + let message = "Module parse failed: " + (err && err.message); + let loc = undefined; + + if ( + ((Buffer.isBuffer(source) && source.slice(0, 4).equals(WASM_HEADER)) || + (typeof source === "string" && /^\0asm/.test(source))) && + !type.startsWith("webassembly") + ) { + message += + "\nThe module seem to be a WebAssembly module, but module is not flagged as WebAssembly module for webpack."; + message += + "\nBREAKING CHANGE: Since webpack 5 WebAssembly is not enabled by default and flagged as experimental feature."; + message += + "\nYou need to enable one of the WebAssembly experiments via 'experiments.asyncWebAssembly: true' (based on async modules) or 'experiments.syncWebAssembly: true' (like webpack 4, deprecated)."; + message += + "\nFor files that transpile to WebAssembly, make sure to set the module type in the 'module.rules' section of the config (e. g. 'type: \"webassembly/async\"')."; + } else if (!loaders) { + message += + "\nYou may need an appropriate loader to handle this file type."; + } else if (loaders.length >= 1) { + message += `\nFile was processed with these loaders:${loaders + .map(loader => `\n * ${loader}`) + .join("")}`; + message += + "\nYou may need an additional loader to handle the result of these loaders."; + } else { + message += + "\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders"; + } + + if ( + err && + err.loc && + typeof err.loc === "object" && + typeof err.loc.line === "number" + ) { + var lineNumber = err.loc.line; + + if ( + Buffer.isBuffer(source) || + /[\0\u0001\u0002\u0003\u0004\u0005\u0006\u0007]/.test(source) + ) { + // binary file + message += "\n(Source code omitted for this binary file)"; + } else { + const sourceLines = source.split(/\r?\n/); + const start = Math.max(0, lineNumber - 3); + const linesBefore = sourceLines.slice(start, lineNumber - 1); + const theLine = sourceLines[lineNumber - 1]; + const linesAfter = sourceLines.slice(lineNumber, lineNumber + 2); + + message += + linesBefore.map(l => `\n| ${l}`).join("") + + `\n> ${theLine}` + + linesAfter.map(l => `\n| ${l}`).join(""); + } + + loc = { start: err.loc }; + } else if (err && err.stack) { + message += "\n" + err.stack; + } + + super(message); + + this.name = "ModuleParseError"; + this.loc = loc; + this.error = err; + + Error.captureStackTrace(this, this.constructor); + } + + serialize(context) { + const { write } = context; + + write(this.error); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.error = read(); + + super.deserialize(context); + } +} + +makeSerializable(ModuleParseError, "webpack/lib/ModuleParseError"); + +module.exports = ModuleParseError; + + +/***/ }), + +/***/ 89399: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +class ModuleProfile { + constructor() { + this.startTime = Date.now(); + this.factory = 0; + this.restoring = 0; + this.integration = 0; + this.building = 0; + this.storing = 0; + this.additionalFactories = 0; + this.additionalIntegration = 0; + } + + markFactoryStart() { + this.factoryStartTime = Date.now(); + } + + markFactoryEnd() { + this.factoryEndTime = Date.now(); + this.factory = this.factoryEndTime - this.factoryStartTime; + } + + markRestoringStart() { + this.restoringStartTime = Date.now(); + } + + markRestoringEnd() { + this.restoringEndTime = Date.now(); + this.restoring = this.restoringEndTime - this.restoringStartTime; + } + + markIntegrationStart() { + this.integrationStartTime = Date.now(); + } + + markIntegrationEnd() { + this.integrationEndTime = Date.now(); + this.integration = this.integrationEndTime - this.integrationStartTime; + } + + markBuildingStart() { + this.buildingStartTime = Date.now(); + } + + markBuildingEnd() { + this.buildingEndTime = Date.now(); + this.building = this.buildingEndTime - this.buildingStartTime; + } + + markStoringStart() { + this.storingStartTime = Date.now(); + } + + markStoringEnd() { + this.storingEndTime = Date.now(); + this.storing = this.storingEndTime - this.storingStartTime; + } + + // This depends on timing so we ignore it for coverage + /* istanbul ignore next */ + /** + * Merge this profile into another one + * @param {ModuleProfile} realProfile the profile to merge into + * @returns {void} + */ + mergeInto(realProfile) { + if (this.factory > realProfile.additionalFactories) + realProfile.additionalFactories = this.factory; + if (this.integration > realProfile.additionalIntegration) + realProfile.additionalIntegration = this.integration; + } +} + +module.exports = ModuleProfile; + + +/***/ }), + +/***/ 61938: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Module")} Module */ + +class ModuleRestoreError extends WebpackError { + /** + * @param {Module} module module tied to dependency + * @param {string | Error} err error thrown + */ + constructor(module, err) { + let message = "Module restore failed: "; + let details = undefined; + if (err !== null && typeof err === "object") { + if (typeof err.stack === "string" && err.stack) { + const stack = err.stack; + message += stack; + } else if (typeof err.message === "string" && err.message) { + message += err.message; + } else { + message += err; + } + } else { + message += String(err); + } + + super(message); + + this.name = "ModuleRestoreError"; + this.details = details; + this.module = module; + this.error = err; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ModuleRestoreError; + + +/***/ }), + +/***/ 20027: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Module")} Module */ + +class ModuleStoreError extends WebpackError { + /** + * @param {Module} module module tied to dependency + * @param {string | Error} err error thrown + */ + constructor(module, err) { + let message = "Module storing failed: "; + let details = undefined; + if (err !== null && typeof err === "object") { + if (typeof err.stack === "string" && err.stack) { + const stack = err.stack; + message += stack; + } else if (typeof err.message === "string" && err.message) { + message += err.message; + } else { + message += err; + } + } else { + message += String(err); + } + + super(message); + + this.name = "ModuleStoreError"; + this.details = details; + this.module = module; + this.error = err; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ModuleStoreError; + + +/***/ }), + +/***/ 67127: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const memoize = __webpack_require__(18003); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./util/Hash")} Hash */ + +const getJavascriptModulesPlugin = memoize(() => + __webpack_require__(80867) +); + +/** + * @typedef {Object} RenderContext + * @property {Chunk} chunk the chunk + * @property {DependencyTemplates} dependencyTemplates the dependency templates + * @property {RuntimeTemplate} runtimeTemplate the runtime template + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + */ + +// TODO webpack 6: remove this class +class ModuleTemplate { + /** + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {Compilation} compilation the compilation + */ + constructor(runtimeTemplate, compilation) { + this._runtimeTemplate = runtimeTemplate; + this.type = "javascript"; + this.hooks = Object.freeze({ + content: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .renderModuleContent.tap( + options, + (source, module, renderContext) => + fn( + source, + module, + renderContext, + renderContext.dependencyTemplates + ) + ); + }, + "ModuleTemplate.hooks.content is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContent instead)", + "DEP_MODULE_TEMPLATE_CONTENT" + ) + }, + module: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .renderModuleContent.tap( + options, + (source, module, renderContext) => + fn( + source, + module, + renderContext, + renderContext.dependencyTemplates + ) + ); + }, + "ModuleTemplate.hooks.module is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContent instead)", + "DEP_MODULE_TEMPLATE_MODULE" + ) + }, + render: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .renderModuleContainer.tap( + options, + (source, module, renderContext) => + fn( + source, + module, + renderContext, + renderContext.dependencyTemplates + ) + ); + }, + "ModuleTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContainer instead)", + "DEP_MODULE_TEMPLATE_RENDER" + ) + }, + package: { + tap: util.deprecate( + (options, fn) => { + getJavascriptModulesPlugin() + .getCompilationHooks(compilation) + .renderModulePackage.tap( + options, + (source, module, renderContext) => + fn( + source, + module, + renderContext, + renderContext.dependencyTemplates + ) + ); + }, + "ModuleTemplate.hooks.package is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModulePackage instead)", + "DEP_MODULE_TEMPLATE_PACKAGE" + ) + }, + hash: { + tap: util.deprecate( + (options, fn) => { + compilation.hooks.fullHash.tap(options, fn); + }, + "ModuleTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)", + "DEP_MODULE_TEMPLATE_HASH" + ) + } + }); + } +} + +Object.defineProperty(ModuleTemplate.prototype, "runtimeTemplate", { + get: util.deprecate( + /** + * @this {ModuleTemplate} + * @returns {TODO} output options + */ + function () { + return this._runtimeTemplate; + }, + "ModuleTemplate.runtimeTemplate is deprecated (use Compilation.runtimeTemplate instead)", + "DEP_WEBPACK_CHUNK_TEMPLATE_OUTPUT_OPTIONS" + ) +}); + +module.exports = ModuleTemplate; + + +/***/ }), + +/***/ 10717: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { cleanUp } = __webpack_require__(31183); +const WebpackError = __webpack_require__(24274); +const makeSerializable = __webpack_require__(55575); + +class ModuleWarning extends WebpackError { + /** + * @param {Error} warning error thrown + * @param {{from?: string|null}} info additional info + */ + constructor(warning, { from = null } = {}) { + let message = "Module Warning"; + + if (from) { + message += ` (from ${from}):\n`; + } else { + message += ": "; + } + + if (warning && typeof warning === "object" && warning.message) { + message += warning.message; + } else if (warning) { + message += String(warning); + } + + super(message); + + this.name = "ModuleWarning"; + this.warning = warning; + this.details = + warning && typeof warning === "object" && warning.stack + ? cleanUp(warning.stack, this.message) + : undefined; + + Error.captureStackTrace(this, this.constructor); + } + + serialize(context) { + const { write } = context; + + write(this.warning); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.warning = read(); + + super.deserialize(context); + } +} + +makeSerializable(ModuleWarning, "webpack/lib/ModuleWarning"); + +module.exports = ModuleWarning; + + +/***/ }), + +/***/ 87225: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const { SyncHook, MultiHook } = __webpack_require__(18416); + +const ConcurrentCompilationError = __webpack_require__(93393); +const MultiStats = __webpack_require__(71012); +const MultiWatching = __webpack_require__(8175); + +/** @template T @typedef {import("tapable").AsyncSeriesHook} AsyncSeriesHook */ +/** @template T @template R @typedef {import("tapable").SyncBailHook} SyncBailHook */ +/** @typedef {import("../declarations/WebpackOptions").WatchOptions} WatchOptions */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Stats")} Stats */ +/** @typedef {import("./Watching")} Watching */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ +/** @typedef {import("./util/fs").IntermediateFileSystem} IntermediateFileSystem */ +/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */ +/** @typedef {import("./util/fs").WatchFileSystem} WatchFileSystem */ + +/** @typedef {number} CompilerStatus */ + +const STATUS_PENDING = 0; +const STATUS_DONE = 1; +const STATUS_NEW = 2; + +/** + * @template T + * @callback Callback + * @param {Error=} err + * @param {T=} result + */ + +/** + * @callback RunWithDependenciesHandler + * @param {Compiler} compiler + * @param {Callback} callback + */ + +module.exports = class MultiCompiler { + /** + * @param {Compiler[] | Record} compilers child compilers + */ + constructor(compilers) { + if (!Array.isArray(compilers)) { + compilers = Object.keys(compilers).map(name => { + compilers[name].name = name; + return compilers[name]; + }); + } + + this.hooks = Object.freeze({ + /** @type {SyncHook<[MultiStats]>} */ + done: new SyncHook(["stats"]), + /** @type {MultiHook>} */ + invalid: new MultiHook(compilers.map(c => c.hooks.invalid)), + /** @type {MultiHook>} */ + run: new MultiHook(compilers.map(c => c.hooks.run)), + /** @type {SyncHook<[]>} */ + watchClose: new SyncHook([]), + /** @type {MultiHook>} */ + watchRun: new MultiHook(compilers.map(c => c.hooks.watchRun)), + /** @type {MultiHook>} */ + infrastructureLog: new MultiHook( + compilers.map(c => c.hooks.infrastructureLog) + ) + }); + this.compilers = compilers; + /** @type {WeakMap} */ + this.dependencies = new WeakMap(); + this.running = false; + + /** @type {Stats[]} */ + const compilerStats = this.compilers.map(() => null); + let doneCompilers = 0; + for (let index = 0; index < this.compilers.length; index++) { + const compiler = this.compilers[index]; + const compilerIndex = index; + let compilerDone = false; + // eslint-disable-next-line no-loop-func + compiler.hooks.done.tap("MultiCompiler", stats => { + if (!compilerDone) { + compilerDone = true; + doneCompilers++; + } + compilerStats[compilerIndex] = stats; + if (doneCompilers === this.compilers.length) { + this.hooks.done.call(new MultiStats(compilerStats)); + } + }); + // eslint-disable-next-line no-loop-func + compiler.hooks.invalid.tap("MultiCompiler", () => { + if (compilerDone) { + compilerDone = false; + doneCompilers--; + } + }); + } + } + + get options() { + return this.compilers.map(c => c.options); + } + + get outputPath() { + let commonPath = this.compilers[0].outputPath; + for (const compiler of this.compilers) { + while ( + compiler.outputPath.indexOf(commonPath) !== 0 && + /[/\\]/.test(commonPath) + ) { + commonPath = commonPath.replace(/[/\\][^/\\]*$/, ""); + } + } + + if (!commonPath && this.compilers[0].outputPath[0] === "/") return "/"; + return commonPath; + } + + get inputFileSystem() { + throw new Error("Cannot read inputFileSystem of a MultiCompiler"); + } + + get outputFileSystem() { + throw new Error("Cannot read outputFileSystem of a MultiCompiler"); + } + + get watchFileSystem() { + throw new Error("Cannot read watchFileSystem of a MultiCompiler"); + } + + get intermediateFileSystem() { + throw new Error("Cannot read outputFileSystem of a MultiCompiler"); + } + + /** + * @param {InputFileSystem} value the new input file system + */ + set inputFileSystem(value) { + for (const compiler of this.compilers) { + compiler.inputFileSystem = value; + } + } + + /** + * @param {OutputFileSystem} value the new output file system + */ + set outputFileSystem(value) { + for (const compiler of this.compilers) { + compiler.outputFileSystem = value; + } + } + + /** + * @param {WatchFileSystem} value the new watch file system + */ + set watchFileSystem(value) { + for (const compiler of this.compilers) { + compiler.watchFileSystem = value; + } + } + + /** + * @param {IntermediateFileSystem} value the new intermediate file system + */ + set intermediateFileSystem(value) { + for (const compiler of this.compilers) { + compiler.intermediateFileSystem = value; + } + } + + getInfrastructureLogger(name) { + return this.compilers[0].getInfrastructureLogger(name); + } + + /** + * @param {Compiler} compiler the child compiler + * @param {string[]} dependencies its dependencies + * @returns {void} + */ + setDependencies(compiler, dependencies) { + this.dependencies.set(compiler, dependencies); + } + + /** + * @param {Callback} callback signals when the validation is complete + * @returns {boolean} true if the dependencies are valid + */ + validateDependencies(callback) { + /** @type {Set<{source: Compiler, target: Compiler}>} */ + const edges = new Set(); + /** @type {string[]} */ + const missing = []; + const targetFound = compiler => { + for (const edge of edges) { + if (edge.target === compiler) { + return true; + } + } + return false; + }; + const sortEdges = (e1, e2) => { + return ( + e1.source.name.localeCompare(e2.source.name) || + e1.target.name.localeCompare(e2.target.name) + ); + }; + for (const source of this.compilers) { + const dependencies = this.dependencies.get(source); + if (dependencies) { + for (const dep of dependencies) { + const target = this.compilers.find(c => c.name === dep); + if (!target) { + missing.push(dep); + } else { + edges.add({ + source, + target + }); + } + } + } + } + const errors = missing.map(m => `Compiler dependency \`${m}\` not found.`); + const stack = this.compilers.filter(c => !targetFound(c)); + while (stack.length > 0) { + const current = stack.pop(); + for (const edge of edges) { + if (edge.source === current) { + edges.delete(edge); + const target = edge.target; + if (!targetFound(target)) { + stack.push(target); + } + } + } + } + if (edges.size > 0) { + const lines = Array.from(edges) + .sort(sortEdges) + .map(edge => `${edge.source.name} -> ${edge.target.name}`); + lines.unshift("Circular dependency found in compiler dependencies."); + errors.unshift(lines.join("\n")); + } + if (errors.length > 0) { + const message = errors.join("\n"); + callback(new Error(message)); + return false; + } + return true; + } + + /** + * @param {Compiler[]} compilers the child compilers + * @param {RunWithDependenciesHandler} fn a handler to run for each compiler + * @param {Callback} callback the compiler's handler + * @returns {void} + */ + runWithDependencies(compilers, fn, callback) { + const fulfilledNames = new Set(); + let remainingCompilers = compilers; + const isDependencyFulfilled = d => fulfilledNames.has(d); + const getReadyCompilers = () => { + let readyCompilers = []; + let list = remainingCompilers; + remainingCompilers = []; + for (const c of list) { + const dependencies = this.dependencies.get(c); + const ready = + !dependencies || dependencies.every(isDependencyFulfilled); + if (ready) { + readyCompilers.push(c); + } else { + remainingCompilers.push(c); + } + } + return readyCompilers; + }; + const runCompilers = callback => { + if (remainingCompilers.length === 0) return callback(); + asyncLib.map( + getReadyCompilers(), + (compiler, callback) => { + fn(compiler, err => { + if (err) return callback(err); + fulfilledNames.add(compiler.name); + runCompilers(callback); + }); + }, + callback + ); + }; + runCompilers(callback); + } + + /** + * @param {WatchOptions|WatchOptions[]} watchOptions the watcher's options + * @param {Callback} handler signals when the call finishes + * @returns {MultiWatching} a compiler watcher + */ + watch(watchOptions, handler) { + if (this.running) { + return handler(new ConcurrentCompilationError()); + } + + /** @type {Watching[]} */ + const watchings = []; + + /** @type {Stats[]} */ + const allStats = this.compilers.map(() => null); + + /** @type {CompilerStatus[]} */ + const compilerStatus = this.compilers.map(() => STATUS_PENDING); + + if (this.validateDependencies(handler)) { + this.running = true; + this.runWithDependencies( + this.compilers, + (compiler, callback) => { + const compilerIdx = this.compilers.indexOf(compiler); + let firstRun = true; + let watching = compiler.watch( + Array.isArray(watchOptions) + ? watchOptions[compilerIdx] + : watchOptions, + (err, stats) => { + if (err) handler(err); + if (stats) { + allStats[compilerIdx] = stats; + compilerStatus[compilerIdx] = STATUS_NEW; + if (compilerStatus.every(status => status !== STATUS_PENDING)) { + const freshStats = allStats.filter((s, idx) => { + return compilerStatus[idx] === STATUS_NEW; + }); + compilerStatus.fill(STATUS_DONE); + const multiStats = new MultiStats(freshStats); + handler(null, multiStats); + } + } + if (firstRun && !err) { + firstRun = false; + callback(); + } + } + ); + watchings.push(watching); + }, + () => { + // ignore + } + ); + } + + return new MultiWatching(watchings, this); + } + + /** + * @param {Callback} callback signals when the call finishes + * @returns {void} + */ + run(callback) { + if (this.running) { + return callback(new ConcurrentCompilationError()); + } + + const finalCallback = (err, stats) => { + this.running = false; + + if (callback !== undefined) { + return callback(err, stats); + } + }; + + const allStats = this.compilers.map(() => null); + if (this.validateDependencies(callback)) { + this.running = true; + this.runWithDependencies( + this.compilers, + (compiler, callback) => { + const compilerIdx = this.compilers.indexOf(compiler); + compiler.run((err, stats) => { + if (err) { + return callback(err); + } + allStats[compilerIdx] = stats; + callback(); + }); + }, + err => { + if (err) { + return finalCallback(err); + } + finalCallback(null, new MultiStats(allStats)); + } + ); + } + } + + purgeInputFileSystem() { + for (const compiler of this.compilers) { + if (compiler.inputFileSystem && compiler.inputFileSystem.purge) { + compiler.inputFileSystem.purge(); + } + } + } + + /** + * @param {Callback} callback signals when the compiler closes + * @returns {void} + */ + close(callback) { + asyncLib.each( + this.compilers, + (compiler, callback) => { + compiler.close(callback); + }, + callback + ); + } +}; + + +/***/ }), + +/***/ 71012: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const identifierUtils = __webpack_require__(47779); + +/** @typedef {import("./Stats")} Stats */ + +const indent = (str, prefix) => { + const rem = str.replace(/\n([^\n])/g, "\n" + prefix + "$1"); + return prefix + rem; +}; + +class MultiStats { + /** + * @param {Stats[]} stats the child stats + */ + constructor(stats) { + this.stats = stats; + } + + get hash() { + return this.stats.map(stat => stat.hash).join(""); + } + + /** + * @returns {boolean} true if a child compilation encountered an error + */ + hasErrors() { + return this.stats.some(stat => stat.hasErrors()); + } + + /** + * @returns {boolean} true if a child compilation had a warning + */ + hasWarnings() { + return this.stats.some(stat => stat.hasWarnings()); + } + + _createChildOptions(options, context) { + if (!options) { + options = {}; + } + const { children: _, ...baseOptions } = options; + const children = this.stats.map((stat, idx) => { + const childOptions = Array.isArray(options.children) + ? options.children[idx] + : options.children; + return stat.compilation.createStatsOptions( + { + ...baseOptions, + ...(childOptions && typeof childOptions === "object" + ? childOptions + : { preset: childOptions }) + }, + context + ); + }); + return { + version: children.every(o => o.version), + hash: children.every(o => o.hash), + errorsCount: children.every(o => o.errorsCount), + warningsCount: children.every(o => o.warningsCount), + errors: children.every(o => o.errors), + warnings: children.every(o => o.warnings), + children + }; + } + + toJson(options) { + options = this._createChildOptions(options, { forToString: false }); + const obj = {}; + obj.children = this.stats.map((stat, idx) => { + const obj = stat.toJson(options.children[idx]); + const compilationName = stat.compilation.name; + const name = + compilationName && + identifierUtils.makePathsRelative( + options.context, + compilationName, + stat.compilation.compiler.root + ); + obj.name = name; + return obj; + }); + if (options.version) { + obj.version = obj.children[0].version; + } + if (options.hash) { + obj.hash = obj.children.map(j => j.hash).join(""); + } + const mapError = (j, obj) => { + return { + ...obj, + compilerPath: obj.compilerPath + ? `${j.name}.${obj.compilerPath}` + : j.name + }; + }; + if (options.errors) { + obj.errors = []; + for (const j of obj.children) { + for (const i of j.errors) { + obj.errors.push(mapError(j, i)); + } + } + } + if (options.warnings) { + obj.warnings = []; + for (const j of obj.children) { + for (const i of j.warnings) { + obj.warnings.push(mapError(j, i)); + } + } + } + if (options.errorsCount) { + obj.errorsCount = 0; + for (const j of obj.children) { + obj.errorsCount += j.errorsCount; + } + } + if (options.warningsCount) { + obj.warningsCount = 0; + for (const j of obj.children) { + obj.warningsCount += j.warningsCount; + } + } + return obj; + } + + toString(options) { + options = this._createChildOptions(options, { forToString: true }); + const results = this.stats.map((stat, idx) => { + const str = stat.toString(options.children[idx]); + const compilationName = stat.compilation.name; + const name = + compilationName && + identifierUtils + .makePathsRelative( + options.context, + compilationName, + stat.compilation.compiler.root + ) + .replace(/\|/g, " "); + if (!str) return str; + return name ? `${name}:\n${indent(str, " ")}` : str; + }); + return results.filter(Boolean).join("\n\n"); + } +} + +module.exports = MultiStats; + + +/***/ }), + +/***/ 8175: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); + +/** @typedef {import("./MultiCompiler")} MultiCompiler */ +/** @typedef {import("./Watching")} Watching */ + +/** + * @template T + * @callback Callback + * @param {Error=} err + * @param {T=} result + */ + +class MultiWatching { + /** + * @param {Watching[]} watchings child compilers' watchers + * @param {MultiCompiler} compiler the compiler + */ + constructor(watchings, compiler) { + this.watchings = watchings; + this.compiler = compiler; + } + + invalidate(callback) { + if (callback) { + asyncLib.each( + this.watchings, + (watching, callback) => watching.invalidate(callback), + callback + ); + } else { + for (const watching of this.watchings) { + watching.invalidate(); + } + } + } + + suspend() { + for (const watching of this.watchings) { + watching.suspend(); + } + } + + resume() { + for (const watching of this.watchings) { + watching.resume(); + } + } + + /** + * @param {Callback} callback signals when the watcher is closed + * @returns {void} + */ + close(callback) { + asyncLib.forEach( + this.watchings, + (watching, finishedCallback) => { + watching.close(finishedCallback); + }, + err => { + this.compiler.hooks.watchClose.call(); + if (typeof callback === "function") { + this.compiler.running = false; + callback(err); + } + } + ); + } +} + +module.exports = MultiWatching; + + +/***/ }), + +/***/ 49363: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Compiler")} Compiler */ + +class NoEmitOnErrorsPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.shouldEmit.tap("NoEmitOnErrorsPlugin", compilation => { + if (compilation.getStats().hasErrors()) return false; + }); + compiler.hooks.compilation.tap("NoEmitOnErrorsPlugin", compilation => { + compilation.hooks.shouldRecord.tap("NoEmitOnErrorsPlugin", () => { + if (compilation.getStats().hasErrors()) return false; + }); + }); + } +} + +module.exports = NoEmitOnErrorsPlugin; + + +/***/ }), + +/***/ 35722: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); + +module.exports = class NoModeWarning extends WebpackError { + constructor(modules) { + super(); + + this.name = "NoModeWarning"; + this.message = + "configuration\n" + + "The 'mode' option has not been set, webpack will fallback to 'production' for this value. " + + "Set 'mode' option to 'development' or 'production' to enable defaults for each environment.\n" + + "You can also set it to 'none' to disable any default behavior. " + + "Learn more: https://webpack.js.org/configuration/mode/"; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 591: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const CachedConstDependency = __webpack_require__(14268); +const ConstDependency = __webpack_require__(9364); +const { + evaluateToString, + expressionIsUnsupported +} = __webpack_require__(98550); +const { relative } = __webpack_require__(71593); +const { parseResource } = __webpack_require__(47779); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ + +class NodeStuffPlugin { + constructor(options) { + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap( + "NodeStuffPlugin", + (compilation, { normalModuleFactory }) => { + const handler = (parser, parserOptions) => { + if (parserOptions.node === false) return; + + let localOptions = options; + if (parserOptions.node) { + localOptions = { ...localOptions, ...parserOptions.node }; + } + + if (localOptions.global) { + parser.hooks.expression + .for("global") + .tap("NodeStuffPlugin", expr => { + const dep = new ConstDependency( + RuntimeGlobals.global, + expr.range, + [RuntimeGlobals.global] + ); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + }); + } + + const setModuleConstant = (expressionName, fn) => { + parser.hooks.expression + .for(expressionName) + .tap("NodeStuffPlugin", expr => { + const dep = new CachedConstDependency( + JSON.stringify(fn(parser.state.module)), + expr.range, + expressionName + ); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + }; + + const setConstant = (expressionName, value) => + setModuleConstant(expressionName, () => value); + + const context = compiler.context; + if (localOptions.__filename) { + if (localOptions.__filename === "mock") { + setConstant("__filename", "/index.js"); + } else if (localOptions.__filename === true) { + setModuleConstant("__filename", module => + relative(compiler.inputFileSystem, context, module.resource) + ); + } + parser.hooks.evaluateIdentifier + .for("__filename") + .tap("NodeStuffPlugin", expr => { + if (!parser.state.module) return; + const resource = parseResource(parser.state.module.resource); + return evaluateToString(resource.path)(expr); + }); + } + if (localOptions.__dirname) { + if (localOptions.__dirname === "mock") { + setConstant("__dirname", "/"); + } else if (localOptions.__dirname === true) { + setModuleConstant("__dirname", module => + relative(compiler.inputFileSystem, context, module.context) + ); + } + parser.hooks.evaluateIdentifier + .for("__dirname") + .tap("NodeStuffPlugin", expr => { + if (!parser.state.module) return; + return evaluateToString(parser.state.module.context)(expr); + }); + } + parser.hooks.expression + .for("require.extensions") + .tap( + "NodeStuffPlugin", + expressionIsUnsupported( + parser, + "require.extensions is not supported by webpack. Use a loader instead." + ) + ); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("NodeStuffPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("NodeStuffPlugin", handler); + } + ); + } +} + +module.exports = NodeStuffPlugin; + + +/***/ }), + +/***/ 88376: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const parseJson = __webpack_require__(34270); +const { getContext, runLoaders } = __webpack_require__(77346); +const querystring = __webpack_require__(71191); +const { validate } = __webpack_require__(79286); +const { HookMap, SyncHook, AsyncSeriesBailHook } = __webpack_require__(18416); +const { + CachedSource, + OriginalSource, + RawSource, + SourceMapSource +} = __webpack_require__(55600); +const Compilation = __webpack_require__(75388); +const Module = __webpack_require__(54031); +const ModuleBuildError = __webpack_require__(3289); +const ModuleError = __webpack_require__(76422); +const ModuleGraphConnection = __webpack_require__(39519); +const ModuleParseError = __webpack_require__(37734); +const ModuleWarning = __webpack_require__(10717); +const RuntimeGlobals = __webpack_require__(48801); +const UnhandledSchemeError = __webpack_require__(55467); +const WebpackError = __webpack_require__(24274); +const formatLocation = __webpack_require__(82476); +const LazySet = __webpack_require__(60248); +const { getScheme } = __webpack_require__(47176); +const { + compareLocations, + concatComparators, + compareSelect, + keepOriginalOrder +} = __webpack_require__(21699); +const createHash = __webpack_require__(34627); +const { join } = __webpack_require__(71593); +const { contextify } = __webpack_require__(47779); +const makeSerializable = __webpack_require__(55575); +const memoize = __webpack_require__(18003); + +/** @typedef {import("source-map").RawSourceMap} SourceMap */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./Generator")} Generator */ +/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("./Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ +/** @typedef {import("./Module").LibIdentOptions} LibIdentOptions */ +/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */ +/** @typedef {import("./Parser")} Parser */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./util/Hash")} Hash */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +const getInvalidDependenciesModuleWarning = memoize(() => + __webpack_require__(27185) +); + +const ABSOLUTE_PATH_REGEX = /^([a-zA-Z]:\\|\\\\|\/)/; + +/** + * @typedef {Object} LoaderItem + * @property {string} loader + * @property {any} options + * @property {string?} ident + * @property {string?} type + */ + +/** + * @param {string} context absolute context path + * @param {string} source a source path + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {string} new source path + */ +const contextifySourceUrl = (context, source, associatedObjectForCache) => { + if (source.startsWith("webpack://")) return source; + return `webpack://${contextify(context, source, associatedObjectForCache)}`; +}; + +/** + * @param {string} context absolute context path + * @param {SourceMap} sourceMap a source map + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {SourceMap} new source map + */ +const contextifySourceMap = (context, sourceMap, associatedObjectForCache) => { + if (!Array.isArray(sourceMap.sources)) return sourceMap; + const { sourceRoot } = sourceMap; + /** @type {function(string): string} */ + const mapper = !sourceRoot + ? source => source + : sourceRoot.endsWith("/") + ? source => + source.startsWith("/") + ? `${sourceRoot.slice(0, -1)}${source}` + : `${sourceRoot}${source}` + : source => + source.startsWith("/") + ? `${sourceRoot}${source}` + : `${sourceRoot}/${source}`; + const newSources = sourceMap.sources.map(source => + contextifySourceUrl(context, mapper(source), associatedObjectForCache) + ); + return { + ...sourceMap, + file: "x", + sourceRoot: undefined, + sources: newSources + }; +}; + +/** + * @param {string | Buffer} input the input + * @returns {string} the converted string + */ +const asString = input => { + if (Buffer.isBuffer(input)) { + return input.toString("utf-8"); + } + return input; +}; + +/** + * @param {string | Buffer} input the input + * @returns {Buffer} the converted buffer + */ +const asBuffer = input => { + if (!Buffer.isBuffer(input)) { + return Buffer.from(input, "utf-8"); + } + return input; +}; + +class NonErrorEmittedError extends WebpackError { + constructor(error) { + super(); + + this.name = "NonErrorEmittedError"; + this.message = "(Emitted value instead of an instance of Error) " + error; + + Error.captureStackTrace(this, this.constructor); + } +} + +makeSerializable( + NonErrorEmittedError, + "webpack/lib/NormalModule", + "NonErrorEmittedError" +); + +/** + * @typedef {Object} NormalModuleCompilationHooks + * @property {SyncHook<[object, NormalModule]>} loader + * @property {SyncHook<[LoaderItem[], NormalModule, object]>} beforeLoaders + * @property {HookMap>} readResourceForScheme + */ + +/** @type {WeakMap} */ +const compilationHooksMap = new WeakMap(); + +class NormalModule extends Module { + /** + * @param {Compilation} compilation the compilation + * @returns {NormalModuleCompilationHooks} the attached hooks + */ + static getCompilationHooks(compilation) { + if (!(compilation instanceof Compilation)) { + throw new TypeError( + "The 'compilation' argument must be an instance of Compilation" + ); + } + let hooks = compilationHooksMap.get(compilation); + if (hooks === undefined) { + hooks = { + loader: new SyncHook(["loaderContext", "module"]), + beforeLoaders: new SyncHook(["loaders", "module", "loaderContext"]), + readResourceForScheme: new HookMap( + () => new AsyncSeriesBailHook(["resource", "module"]) + ) + }; + compilationHooksMap.set(compilation, hooks); + } + return hooks; + } + + /** + * @param {Object} options options object + * @param {string=} options.layer an optional layer in which the module is + * @param {string} options.type module type + * @param {string} options.request request string + * @param {string} options.userRequest request intended by user (without loaders from config) + * @param {string} options.rawRequest request without resolving + * @param {LoaderItem[]} options.loaders list of loaders + * @param {string} options.resource path + query of the real resource + * @param {string | undefined} options.matchResource path + query of the matched resource (virtual) + * @param {Parser} options.parser the parser used + * @param {Generator} options.generator the generator used + * @param {Object} options.resolveOptions options used for resolving requests from this module + */ + constructor({ + layer, + type, + request, + userRequest, + rawRequest, + loaders, + resource, + matchResource, + parser, + generator, + resolveOptions + }) { + super(type, getContext(resource), layer); + + // Info from Factory + /** @type {string} */ + this.request = request; + /** @type {string} */ + this.userRequest = userRequest; + /** @type {string} */ + this.rawRequest = rawRequest; + /** @type {boolean} */ + this.binary = /^(asset|webassembly)\b/.test(type); + /** @type {Parser} */ + this.parser = parser; + /** @type {Generator} */ + this.generator = generator; + /** @type {string} */ + this.resource = resource; + /** @type {string | undefined} */ + this.matchResource = matchResource; + /** @type {LoaderItem[]} */ + this.loaders = loaders; + if (resolveOptions !== undefined) { + // already declared in super class + this.resolveOptions = resolveOptions; + } + + // Info from Build + /** @type {WebpackError=} */ + this.error = null; + /** @private @type {Source=} */ + this._source = null; + /** @private @type {Map | undefined} **/ + this._sourceSizes = undefined; + + // Cache + this._lastSuccessfulBuildMeta = {}; + this._forceBuild = true; + this._isEvaluatingSideEffects = false; + this._addedSideEffectsBailout = new WeakSet(); + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + if (this.layer === null) { + return this.request; + } else { + return `${this.request}|${this.layer}`; + } + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return requestShortener.shorten(this.userRequest); + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + return contextify( + options.context, + this.userRequest, + options.associatedObjectForCache + ); + } + + /** + * @returns {string | null} absolute path which should be used for condition matching (usually the resource path) + */ + nameForCondition() { + const resource = this.matchResource || this.resource; + const idx = resource.indexOf("?"); + if (idx >= 0) return resource.substr(0, idx); + return resource; + } + + /** + * Assuming this module is in the cache. Update the (cached) module with + * the fresh module from the factory. Usually updates internal references + * and properties. + * @param {Module} module fresh module + * @returns {void} + */ + updateCacheModule(module) { + super.updateCacheModule(module); + const m = /** @type {NormalModule} */ (module); + this.binary = m.binary; + this.request = m.request; + this.userRequest = m.userRequest; + this.rawRequest = m.rawRequest; + this.parser = m.parser; + this.generator = m.generator; + this.resource = m.resource; + this.matchResource = m.matchResource; + this.loaders = m.loaders; + } + + /** + * @param {string} context the compilation context + * @param {string} name the asset name + * @param {string} content the content + * @param {string | TODO} sourceMap an optional source map + * @param {Object=} associatedObjectForCache object for caching + * @returns {Source} the created source + */ + createSourceForAsset( + context, + name, + content, + sourceMap, + associatedObjectForCache + ) { + if (sourceMap) { + if ( + typeof sourceMap === "string" && + (this.useSourceMap || this.useSimpleSourceMap) + ) { + return new OriginalSource( + content, + contextifySourceUrl(context, sourceMap, associatedObjectForCache) + ); + } + + if (this.useSourceMap) { + return new SourceMapSource( + content, + name, + contextifySourceMap(context, sourceMap, associatedObjectForCache) + ); + } + } + + return new RawSource(content); + } + + /** + * @param {ResolverWithOptions} resolver a resolver + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {InputFileSystem} fs file system from reading + * @returns {any} loader context + */ + createLoaderContext(resolver, options, compilation, fs) { + const { requestShortener } = compilation.runtimeTemplate; + const getCurrentLoaderName = () => { + const currentLoader = this.getCurrentLoader(loaderContext); + if (!currentLoader) return "(not in loader scope)"; + return requestShortener.shorten(currentLoader.loader); + }; + const getResolveContext = () => { + return { + fileDependencies: { + add: d => loaderContext.addDependency(d) + }, + contextDependencies: { + add: d => loaderContext.addContextDependency(d) + }, + missingDependencies: { + add: d => loaderContext.addMissingDependency(d) + } + }; + }; + const loaderContext = { + version: 2, + getOptions: schema => { + const loader = this.getCurrentLoader(loaderContext); + + let { options } = loader; + + if (typeof options === "string") { + if (options.substr(0, 1) === "{" && options.substr(-1) === "}") { + try { + options = parseJson(options); + } catch (e) { + throw new Error(`Cannot parse string options: ${e.message}`); + } + } else { + options = querystring.parse(options, "&", "=", { + maxKeys: 0 + }); + } + } + + if (options === null || options === undefined) { + options = {}; + } + + if (schema) { + let name = "Loader"; + let baseDataPath = "options"; + let match; + if (schema.title && (match = /^(.+) (.+)$/.exec(schema.title))) { + [, name, baseDataPath] = match; + } + validate(schema, options, { + name, + baseDataPath + }); + } + + return options; + }, + emitWarning: warning => { + if (!(warning instanceof Error)) { + warning = new NonErrorEmittedError(warning); + } + this.addWarning( + new ModuleWarning(warning, { + from: getCurrentLoaderName() + }) + ); + }, + emitError: error => { + if (!(error instanceof Error)) { + error = new NonErrorEmittedError(error); + } + this.addError( + new ModuleError(error, { + from: getCurrentLoaderName() + }) + ); + }, + getLogger: name => { + const currentLoader = this.getCurrentLoader(loaderContext); + return compilation.getLogger(() => + [currentLoader && currentLoader.loader, name, this.identifier()] + .filter(Boolean) + .join("|") + ); + }, + resolve(context, request, callback) { + resolver.resolve({}, context, request, getResolveContext(), callback); + }, + getResolve(options) { + const child = options ? resolver.withOptions(options) : resolver; + return (context, request, callback) => { + if (callback) { + child.resolve({}, context, request, getResolveContext(), callback); + } else { + return new Promise((resolve, reject) => { + child.resolve( + {}, + context, + request, + getResolveContext(), + (err, result) => { + if (err) reject(err); + else resolve(result); + } + ); + }); + } + }; + }, + emitFile: (name, content, sourceMap, assetInfo) => { + if (!this.buildInfo.assets) { + this.buildInfo.assets = Object.create(null); + this.buildInfo.assetsInfo = new Map(); + } + this.buildInfo.assets[name] = this.createSourceForAsset( + options.context, + name, + content, + sourceMap, + compilation.compiler.root + ); + this.buildInfo.assetsInfo.set(name, assetInfo); + }, + addBuildDependency: dep => { + if (this.buildInfo.buildDependencies === undefined) { + this.buildInfo.buildDependencies = new LazySet(); + } + this.buildInfo.buildDependencies.add(dep); + }, + rootContext: options.context, + webpack: true, + sourceMap: !!this.useSourceMap, + mode: options.mode || "production", + _module: this, + _compilation: compilation, + _compiler: compilation.compiler, + fs: fs + }; + + Object.assign(loaderContext, options.loader); + + NormalModule.getCompilationHooks(compilation).loader.call( + loaderContext, + this + ); + + return loaderContext; + } + + getCurrentLoader(loaderContext, index = loaderContext.loaderIndex) { + if ( + this.loaders && + this.loaders.length && + index < this.loaders.length && + index >= 0 && + this.loaders[index] + ) { + return this.loaders[index]; + } + return null; + } + + /** + * @param {string} context the compilation context + * @param {string | Buffer} content the content + * @param {string | TODO} sourceMap an optional source map + * @param {Object=} associatedObjectForCache object for caching + * @returns {Source} the created source + */ + createSource(context, content, sourceMap, associatedObjectForCache) { + if (Buffer.isBuffer(content)) { + return new RawSource(content); + } + + // if there is no identifier return raw source + if (!this.identifier) { + return new RawSource(content); + } + + // from here on we assume we have an identifier + const identifier = this.identifier(); + + if (this.useSourceMap && sourceMap) { + return new SourceMapSource( + content, + contextifySourceUrl(context, identifier, associatedObjectForCache), + contextifySourceMap(context, sourceMap, associatedObjectForCache) + ); + } + + if (this.useSourceMap || this.useSimpleSourceMap) { + return new OriginalSource( + content, + contextifySourceUrl(context, identifier, associatedObjectForCache) + ); + } + + return new RawSource(content); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + doBuild(options, compilation, resolver, fs, callback) { + const loaderContext = this.createLoaderContext( + resolver, + options, + compilation, + fs + ); + + const processResult = (err, result) => { + if (err) { + if (!(err instanceof Error)) { + err = new NonErrorEmittedError(err); + } + const currentLoader = this.getCurrentLoader(loaderContext); + const error = new ModuleBuildError(err, { + from: + currentLoader && + compilation.runtimeTemplate.requestShortener.shorten( + currentLoader.loader + ) + }); + return callback(error); + } + + const source = result[0]; + const sourceMap = result.length >= 1 ? result[1] : null; + const extraInfo = result.length >= 2 ? result[2] : null; + + if (!Buffer.isBuffer(source) && typeof source !== "string") { + const currentLoader = this.getCurrentLoader(loaderContext, 0); + const err = new Error( + `Final loader (${ + currentLoader + ? compilation.runtimeTemplate.requestShortener.shorten( + currentLoader.loader + ) + : "unknown" + }) didn't return a Buffer or String` + ); + const error = new ModuleBuildError(err); + return callback(error); + } + + this._source = this.createSource( + options.context, + this.binary ? asBuffer(source) : asString(source), + sourceMap, + compilation.compiler.root + ); + if (this._sourceSizes !== undefined) this._sourceSizes.clear(); + this._ast = + typeof extraInfo === "object" && + extraInfo !== null && + extraInfo.webpackAST !== undefined + ? extraInfo.webpackAST + : null; + return callback(); + }; + + const hooks = NormalModule.getCompilationHooks(compilation); + + hooks.beforeLoaders.call(this.loaders, this, loaderContext); + runLoaders( + { + resource: this.resource, + loaders: this.loaders, + context: loaderContext, + processResource: (loaderContext, resource, callback) => { + const scheme = getScheme(resource); + if (scheme) { + hooks.readResourceForScheme + .for(scheme) + .callAsync(resource, this, (err, result) => { + if (err) return callback(err); + if (typeof result !== "string" && !result) { + return callback(new UnhandledSchemeError(scheme, resource)); + } + return callback(null, result); + }); + } else { + loaderContext.addDependency(resource); + fs.readFile(resource, callback); + } + } + }, + (err, result) => { + if (!result) { + processResult( + err || new Error("No result from loader-runner processing"), + null + ); + } + this.buildInfo.fileDependencies = new LazySet(); + this.buildInfo.fileDependencies.addAll(result.fileDependencies); + this.buildInfo.contextDependencies = new LazySet(); + this.buildInfo.contextDependencies.addAll(result.contextDependencies); + this.buildInfo.missingDependencies = new LazySet(); + this.buildInfo.missingDependencies.addAll(result.missingDependencies); + if ( + this.loaders.length > 0 && + this.buildInfo.buildDependencies === undefined + ) { + this.buildInfo.buildDependencies = new LazySet(); + } + for (const loader of this.loaders) { + this.buildInfo.buildDependencies.add(loader.loader); + } + this.buildInfo.cacheable = result.cacheable; + processResult(err, result.result); + } + ); + } + + /** + * @param {WebpackError} error the error + * @returns {void} + */ + markModuleAsErrored(error) { + // Restore build meta from successful build to keep importing state + this.buildMeta = { ...this._lastSuccessfulBuildMeta }; + this.error = error; + this.addError(error); + } + + applyNoParseRule(rule, content) { + // must start with "rule" if rule is a string + if (typeof rule === "string") { + return content.startsWith(rule); + } + + if (typeof rule === "function") { + return rule(content); + } + // we assume rule is a regexp + return rule.test(content); + } + + // check if module should not be parsed + // returns "true" if the module should !not! be parsed + // returns "false" if the module !must! be parsed + shouldPreventParsing(noParseRule, request) { + // if no noParseRule exists, return false + // the module !must! be parsed. + if (!noParseRule) { + return false; + } + + // we only have one rule to check + if (!Array.isArray(noParseRule)) { + // returns "true" if the module is !not! to be parsed + return this.applyNoParseRule(noParseRule, request); + } + + for (let i = 0; i < noParseRule.length; i++) { + const rule = noParseRule[i]; + // early exit on first truthy match + // this module is !not! to be parsed + if (this.applyNoParseRule(rule, request)) { + return true; + } + } + // no match found, so this module !should! be parsed + return false; + } + + _initBuildHash(compilation) { + const hash = createHash(compilation.outputOptions.hashFunction); + if (this._source) { + hash.update("source"); + this._source.updateHash(hash); + } + hash.update("meta"); + hash.update(JSON.stringify(this.buildMeta)); + this.buildInfo.hash = /** @type {string} */ (hash.digest("hex")); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this._forceBuild = false; + this._source = null; + if (this._sourceSizes !== undefined) this._sourceSizes.clear(); + this._ast = null; + this.error = null; + this.clearWarningsAndErrors(); + this.clearDependenciesAndBlocks(); + this.buildMeta = {}; + this.buildInfo = { + cacheable: false, + parsed: true, + fileDependencies: undefined, + contextDependencies: undefined, + missingDependencies: undefined, + buildDependencies: undefined, + hash: undefined, + assets: undefined, + assetsInfo: undefined + }; + + const startTime = Date.now(); + + return this.doBuild(options, compilation, resolver, fs, err => { + // if we have an error mark module as failed and exit + if (err) { + this.markModuleAsErrored(err); + this._initBuildHash(compilation); + return callback(); + } + + const handleParseError = e => { + const source = this._source.source(); + const loaders = this.loaders.map(item => + contextify(options.context, item.loader, compilation.compiler.root) + ); + const error = new ModuleParseError(source, e, loaders, this.type); + this.markModuleAsErrored(error); + this._initBuildHash(compilation); + return callback(); + }; + + const handleParseResult = result => { + this.dependencies.sort( + concatComparators( + compareSelect(a => a.loc, compareLocations), + keepOriginalOrder(this.dependencies) + ) + ); + this._initBuildHash(compilation); + this._lastSuccessfulBuildMeta = this.buildMeta; + return handleBuildDone(); + }; + + const handleBuildDone = () => { + const snapshotOptions = compilation.options.snapshot.module; + if (!this.buildInfo.cacheable || !snapshotOptions) { + return callback(); + } + // add warning for all non-absolute paths in fileDependencies, etc + // This makes it easier to find problems with watching and/or caching + let nonAbsoluteDependencies = undefined; + const checkDependencies = deps => { + for (const dep of deps) { + if (!ABSOLUTE_PATH_REGEX.test(dep)) { + if (nonAbsoluteDependencies === undefined) + nonAbsoluteDependencies = new Set(); + nonAbsoluteDependencies.add(dep); + deps.delete(dep); + try { + const depWithoutGlob = dep.replace(/[\\/]?\*.*$/, ""); + const absolute = join( + compilation.fileSystemInfo.fs, + this.context, + depWithoutGlob + ); + if (absolute !== dep && ABSOLUTE_PATH_REGEX.test(absolute)) { + (depWithoutGlob !== dep + ? this.buildInfo.contextDependencies + : deps + ).add(absolute); + } + } catch (e) { + // ignore + } + } + } + }; + checkDependencies(this.buildInfo.fileDependencies); + checkDependencies(this.buildInfo.missingDependencies); + checkDependencies(this.buildInfo.contextDependencies); + if (nonAbsoluteDependencies !== undefined) { + const InvalidDependenciesModuleWarning = getInvalidDependenciesModuleWarning(); + this.addWarning( + new InvalidDependenciesModuleWarning(this, nonAbsoluteDependencies) + ); + } + // convert file/context/missingDependencies into filesystem snapshot + compilation.fileSystemInfo.createSnapshot( + startTime, + this.buildInfo.fileDependencies, + this.buildInfo.contextDependencies, + this.buildInfo.missingDependencies, + snapshotOptions, + (err, snapshot) => { + if (err) { + this.markModuleAsErrored(err); + return; + } + this.buildInfo.fileDependencies = undefined; + this.buildInfo.contextDependencies = undefined; + this.buildInfo.missingDependencies = undefined; + this.buildInfo.snapshot = snapshot; + return callback(); + } + ); + }; + + // check if this module should !not! be parsed. + // if so, exit here; + const noParseRule = options.module && options.module.noParse; + if (this.shouldPreventParsing(noParseRule, this.request)) { + // We assume that we need module and exports + this.buildInfo.parsed = false; + this._initBuildHash(compilation); + return handleBuildDone(); + } + + let result; + try { + result = this.parser.parse(this._ast || this._source.source(), { + current: this, + module: this, + compilation: compilation, + options: options + }); + } catch (e) { + handleParseError(e); + return; + } + handleParseResult(result); + }); + } + + /** + * @param {ConcatenationBailoutReasonContext} context context + * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated + */ + getConcatenationBailoutReason(context) { + return this.generator.getConcatenationBailoutReason(this, context); + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this module should be connected to referencing modules when consumed for side-effects only + */ + getSideEffectsConnectionState(moduleGraph) { + if (this.factoryMeta !== undefined) { + if (this.factoryMeta.sideEffectFree) return false; + if (this.factoryMeta.sideEffectFree === false) return true; + } + if (this.buildMeta !== undefined && this.buildMeta.sideEffectFree) { + if (this._isEvaluatingSideEffects) + return ModuleGraphConnection.CIRCULAR_CONNECTION; + this._isEvaluatingSideEffects = true; + /** @type {ConnectionState} */ + let current = false; + for (const dep of this.dependencies) { + const state = dep.getModuleEvaluationSideEffectsState(moduleGraph); + if (state === true) { + if (!this._addedSideEffectsBailout.has(moduleGraph)) { + this._addedSideEffectsBailout.add(moduleGraph); + moduleGraph + .getOptimizationBailout(this) + .push( + () => + `Dependency (${ + dep.type + }) with side effects at ${formatLocation(dep.loc)}` + ); + } + this._isEvaluatingSideEffects = false; + return true; + } else if (state !== ModuleGraphConnection.CIRCULAR_CONNECTION) { + current = ModuleGraphConnection.addConnectionStates(current, state); + } + } + this._isEvaluatingSideEffects = false; + // When caching is implemented here, make sure to not cache when + // at least one circular connection was in the loop above + return current; + } else { + return true; + } + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return this.generator.getTypes(this); + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration({ + dependencyTemplates, + runtimeTemplate, + moduleGraph, + chunkGraph, + runtime, + concatenationScope + }) { + /** @type {Set} */ + const runtimeRequirements = new Set(); + + if (!this.buildInfo.parsed) { + runtimeRequirements.add(RuntimeGlobals.module); + runtimeRequirements.add(RuntimeGlobals.exports); + runtimeRequirements.add(RuntimeGlobals.thisAsExports); + } + + const sources = new Map(); + for (const type of this.generator.getTypes(this)) { + const source = this.error + ? new RawSource( + "throw new Error(" + JSON.stringify(this.error.message) + ");" + ) + : this.generator.generate(this, { + dependencyTemplates, + runtimeTemplate, + moduleGraph, + chunkGraph, + runtimeRequirements, + runtime, + concatenationScope, + type + }); + + if (source) { + sources.set(type, new CachedSource(source)); + } + } + + /** @type {CodeGenerationResult} */ + const resultEntry = { + sources, + runtimeRequirements + }; + return resultEntry; + } + + /** + * @returns {Source | null} the original source for the module before webpack transformation + */ + originalSource() { + return this._source; + } + + /** + * @returns {void} + */ + invalidateBuild() { + this._forceBuild = true; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild({ fileSystemInfo }, callback) { + // build if enforced + if (this._forceBuild) return callback(null, true); + + // always try to build in case of an error + if (this.error) return callback(null, true); + + // always build when module is not cacheable + if (!this.buildInfo.cacheable) return callback(null, true); + + // build when there is no snapshot to check + if (!this.buildInfo.snapshot) return callback(null, true); + + // check snapshot for validity + fileSystemInfo.checkSnapshotValid(this.buildInfo.snapshot, (err, valid) => { + callback(err, !valid); + }); + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + const cachedSize = + this._sourceSizes === undefined ? undefined : this._sourceSizes.get(type); + if (cachedSize !== undefined) { + return cachedSize; + } + const size = Math.max(1, this.generator.getSize(this, type)); + if (this._sourceSizes === undefined) { + this._sourceSizes = new Map(); + } + this._sourceSizes.set(type, size); + return size; + } + + /** + * @param {LazySet} fileDependencies set where file dependencies are added to + * @param {LazySet} contextDependencies set where context dependencies are added to + * @param {LazySet} missingDependencies set where missing dependencies are added to + * @param {LazySet} buildDependencies set where build dependencies are added to + */ + addCacheDependencies( + fileDependencies, + contextDependencies, + missingDependencies, + buildDependencies + ) { + const { snapshot, buildDependencies: buildDeps } = this.buildInfo; + if (snapshot) { + fileDependencies.addAll(snapshot.getFileIterable()); + contextDependencies.addAll(snapshot.getContextIterable()); + missingDependencies.addAll(snapshot.getMissingIterable()); + } else { + const { + fileDependencies: fileDeps, + contextDependencies: contextDeps, + missingDependencies: missingDeps + } = this.buildInfo; + if (fileDeps !== undefined) fileDependencies.addAll(fileDeps); + if (contextDeps !== undefined) contextDependencies.addAll(contextDeps); + if (missingDeps !== undefined) missingDependencies.addAll(missingDeps); + } + if (buildDeps !== undefined) { + buildDependencies.addAll(buildDeps); + } + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(this.buildInfo.hash); + this.generator.updateHash(hash, { + module: this, + ...context + }); + super.updateHash(hash, context); + } + + serialize(context) { + const { write } = context; + // deserialize + write(this._source); + write(this._sourceSizes); + write(this.error); + write(this._lastSuccessfulBuildMeta); + write(this._forceBuild); + super.serialize(context); + } + + static deserialize(context) { + const obj = new NormalModule({ + // will be deserialized by Module + layer: null, + type: "", + // will be filled by updateCacheModule + resource: "", + request: null, + userRequest: null, + rawRequest: null, + loaders: null, + matchResource: null, + parser: null, + generator: null, + resolveOptions: null + }); + obj.deserialize(context); + return obj; + } + + deserialize(context) { + const { read } = context; + this._source = read(); + this._sourceSizes = read(); + this.error = read(); + this._lastSuccessfulBuildMeta = read(); + this._forceBuild = read(); + super.deserialize(context); + } +} + +makeSerializable(NormalModule, "webpack/lib/NormalModule"); + +module.exports = NormalModule; + + +/***/ }), + +/***/ 95702: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const { + AsyncSeriesBailHook, + SyncWaterfallHook, + SyncBailHook, + SyncHook, + HookMap +} = __webpack_require__(18416); +const Module = __webpack_require__(54031); +const ModuleFactory = __webpack_require__(6259); +const NormalModule = __webpack_require__(88376); +const RawModule = __webpack_require__(3754); +const BasicEffectRulePlugin = __webpack_require__(52156); +const BasicMatcherRulePlugin = __webpack_require__(87229); +const DescriptionDataMatcherRulePlugin = __webpack_require__(29883); +const RuleSetCompiler = __webpack_require__(39304); +const UseEffectRulePlugin = __webpack_require__(18554); +const LazySet = __webpack_require__(60248); +const { getScheme } = __webpack_require__(47176); +const { cachedCleverMerge, cachedSetProperty } = __webpack_require__(92700); +const { join } = __webpack_require__(71593); +const { parseResource } = __webpack_require__(47779); + +/** @typedef {import("../declarations/WebpackOptions").ModuleOptions} ModuleOptions */ +/** @typedef {import("./Generator")} Generator */ +/** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ +/** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ +/** @typedef {import("./Parser")} Parser */ +/** @typedef {import("./ResolverFactory")} ResolverFactory */ +/** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ + +/** + * @typedef {Object} ResolveData + * @property {ModuleFactoryCreateData["contextInfo"]} contextInfo + * @property {ModuleFactoryCreateData["resolveOptions"]} resolveOptions + * @property {string} context + * @property {string} request + * @property {ModuleDependency[]} dependencies + * @property {Object} createData + * @property {LazySet} fileDependencies + * @property {LazySet} missingDependencies + * @property {LazySet} contextDependencies + * @property {boolean} cacheable allow to use the unsafe cache + */ + +/** + * @typedef {Object} ResourceData + * @property {string} resource + * @property {string} path + * @property {string} query + * @property {string} fragment + */ + +/** @typedef {ResourceData & { data: Record }} ResourceDataWithData */ + +const EMPTY_RESOLVE_OPTIONS = {}; +const EMPTY_PARSER_OPTIONS = {}; +const EMPTY_GENERATOR_OPTIONS = {}; + +const MATCH_RESOURCE_REGEX = /^([^!]+)!=!/; + +const loaderToIdent = data => { + if (!data.options) { + return data.loader; + } + if (typeof data.options === "string") { + return data.loader + "?" + data.options; + } + if (typeof data.options !== "object") { + throw new Error("loader options must be string or object"); + } + if (data.ident) { + return data.loader + "??" + data.ident; + } + return data.loader + "?" + JSON.stringify(data.options); +}; + +const stringifyLoadersAndResource = (loaders, resource) => { + let str = ""; + for (const loader of loaders) { + str += loaderToIdent(loader) + "!"; + } + return str + resource; +}; + +/** + * @param {string} resultString resultString + * @returns {{loader: string, options: string|undefined}} parsed loader request + */ +const identToLoaderRequest = resultString => { + const idx = resultString.indexOf("?"); + if (idx >= 0) { + const loader = resultString.substr(0, idx); + const options = resultString.substr(idx + 1); + return { + loader, + options + }; + } else { + return { + loader: resultString, + options: undefined + }; + } +}; + +const needCalls = (times, callback) => { + return err => { + if (--times === 0) { + return callback(err); + } + if (err && times > 0) { + times = NaN; + return callback(err); + } + }; +}; + +const mergeGlobalOptions = (globalOptions, type, localOptions) => { + const parts = type.split("/"); + let result; + let current = ""; + for (const part of parts) { + current = current ? `${current}/${part}` : part; + const options = globalOptions[current]; + if (typeof options === "object") { + if (result === undefined) { + result = options; + } else { + result = cachedCleverMerge(result, options); + } + } + } + if (result === undefined) { + return localOptions; + } else { + return cachedCleverMerge(result, localOptions); + } +}; + +// TODO webpack 6 remove +const deprecationChangedHookMessage = name => + `NormalModuleFactory.${name} is no longer a waterfall hook, but a bailing hook instead. ` + + "Do not return the passed object, but modify it instead. " + + "Returning false will ignore the request and results in no module created."; + +const dependencyCache = new WeakMap(); + +const ruleSetCompiler = new RuleSetCompiler([ + new BasicMatcherRulePlugin("test", "resource"), + new BasicMatcherRulePlugin("mimetype"), + new BasicMatcherRulePlugin("dependency"), + new BasicMatcherRulePlugin("include", "resource"), + new BasicMatcherRulePlugin("exclude", "resource", true), + new BasicMatcherRulePlugin("resource"), + new BasicMatcherRulePlugin("resourceQuery"), + new BasicMatcherRulePlugin("resourceFragment"), + new BasicMatcherRulePlugin("realResource"), + new BasicMatcherRulePlugin("issuer"), + new BasicMatcherRulePlugin("compiler"), + new BasicMatcherRulePlugin("issuerLayer"), + new DescriptionDataMatcherRulePlugin(), + new BasicEffectRulePlugin("type"), + new BasicEffectRulePlugin("sideEffects"), + new BasicEffectRulePlugin("parser"), + new BasicEffectRulePlugin("resolve"), + new BasicEffectRulePlugin("generator"), + new BasicEffectRulePlugin("layer"), + new UseEffectRulePlugin() +]); + +class NormalModuleFactory extends ModuleFactory { + /** + * @param {Object} param params + * @param {string=} param.context context + * @param {InputFileSystem} param.fs file system + * @param {ResolverFactory} param.resolverFactory resolverFactory + * @param {ModuleOptions} param.options options + * @param {Object=} param.associatedObjectForCache an object to which the cache will be attached + * @param {boolean=} param.layers enable layers + */ + constructor({ + context, + fs, + resolverFactory, + options, + associatedObjectForCache, + layers = false + }) { + super(); + this.hooks = Object.freeze({ + /** @type {AsyncSeriesBailHook<[ResolveData], TODO>} */ + resolve: new AsyncSeriesBailHook(["resolveData"]), + /** @type {HookMap>} */ + resolveForScheme: new HookMap( + () => new AsyncSeriesBailHook(["resourceData", "resolveData"]) + ), + /** @type {AsyncSeriesBailHook<[ResolveData], TODO>} */ + factorize: new AsyncSeriesBailHook(["resolveData"]), + /** @type {AsyncSeriesBailHook<[ResolveData], TODO>} */ + beforeResolve: new AsyncSeriesBailHook(["resolveData"]), + /** @type {AsyncSeriesBailHook<[ResolveData], TODO>} */ + afterResolve: new AsyncSeriesBailHook(["resolveData"]), + /** @type {AsyncSeriesBailHook<[ResolveData["createData"], ResolveData], TODO>} */ + createModule: new AsyncSeriesBailHook(["createData", "resolveData"]), + /** @type {SyncWaterfallHook<[Module, ResolveData["createData"], ResolveData], TODO>} */ + module: new SyncWaterfallHook(["module", "createData", "resolveData"]), + createParser: new HookMap(() => new SyncBailHook(["parserOptions"])), + parser: new HookMap(() => new SyncHook(["parser", "parserOptions"])), + createGenerator: new HookMap( + () => new SyncBailHook(["generatorOptions"]) + ), + generator: new HookMap( + () => new SyncHook(["generator", "generatorOptions"]) + ) + }); + this.resolverFactory = resolverFactory; + this.ruleSet = ruleSetCompiler.compile([ + { + rules: options.defaultRules + }, + { + rules: options.rules + } + ]); + this.unsafeCache = !!options.unsafeCache; + this.cachePredicate = + typeof options.unsafeCache === "function" + ? options.unsafeCache + : () => true; + this.context = context || ""; + this.fs = fs; + this._globalParserOptions = options.parser; + this._globalGeneratorOptions = options.generator; + /** + * @type {Map>} + */ + this.parserCache = new Map(); + /** + * @type {Map>} + */ + this.generatorCache = new Map(); + + const cacheParseResource = parseResource.bindCache( + associatedObjectForCache + ); + + this.hooks.factorize.tapAsync( + { + name: "NormalModuleFactory", + stage: 100 + }, + (resolveData, callback) => { + this.hooks.resolve.callAsync(resolveData, (err, result) => { + if (err) return callback(err); + + // Ignored + if (result === false) return callback(); + + // direct module + if (result instanceof Module) return callback(null, result); + + if (typeof result === "object") + throw new Error( + deprecationChangedHookMessage("resolve") + + " Returning a Module object will result in this module used as result." + ); + + this.hooks.afterResolve.callAsync(resolveData, (err, result) => { + if (err) return callback(err); + + if (typeof result === "object") + throw new Error(deprecationChangedHookMessage("afterResolve")); + + // Ignored + if (result === false) return callback(); + + const createData = resolveData.createData; + + this.hooks.createModule.callAsync( + createData, + resolveData, + (err, createdModule) => { + if (!createdModule) { + if (!resolveData.request) { + return callback(new Error("Empty dependency (no request)")); + } + + createdModule = new NormalModule(createData); + } + + createdModule = this.hooks.module.call( + createdModule, + createData, + resolveData + ); + + return callback(null, createdModule); + } + ); + }); + }); + } + ); + this.hooks.resolve.tapAsync( + { + name: "NormalModuleFactory", + stage: 100 + }, + (data, callback) => { + const { + contextInfo, + context, + dependencies, + request, + resolveOptions, + fileDependencies, + missingDependencies, + contextDependencies + } = data; + const dependencyType = + (dependencies.length > 0 && dependencies[0].category) || ""; + const loaderResolver = this.getResolver("loader"); + + /** @type {ResourceData | undefined} */ + let matchResourceData = undefined; + /** @type {string} */ + let requestWithoutMatchResource = request; + const matchResourceMatch = MATCH_RESOURCE_REGEX.exec(request); + if (matchResourceMatch) { + let matchResource = matchResourceMatch[1]; + if (matchResource.charCodeAt(0) === 46) { + // 46 === ".", 47 === "/" + const secondChar = matchResource.charCodeAt(1); + if ( + secondChar === 47 || + (secondChar === 46 && matchResource.charCodeAt(2) === 47) + ) { + // if matchResources startsWith ../ or ./ + matchResource = join(this.fs, context, matchResource); + } + } + matchResourceData = { + resource: matchResource, + ...cacheParseResource(matchResource) + }; + requestWithoutMatchResource = request.substr( + matchResourceMatch[0].length + ); + } + + const firstChar = requestWithoutMatchResource.charCodeAt(0); + const secondChar = requestWithoutMatchResource.charCodeAt(1); + const noPreAutoLoaders = firstChar === 45 && secondChar === 33; // startsWith "-!" + const noAutoLoaders = noPreAutoLoaders || firstChar === 33; // startsWith "!" + const noPrePostAutoLoaders = firstChar === 33 && secondChar === 33; // startsWith "!!"; + const rawElements = requestWithoutMatchResource + .slice( + noPreAutoLoaders || noPrePostAutoLoaders ? 2 : noAutoLoaders ? 1 : 0 + ) + .split(/!+/); + const unresolvedResource = rawElements.pop(); + const elements = rawElements.map(identToLoaderRequest); + + const resolveContext = { + fileDependencies, + missingDependencies, + contextDependencies + }; + + /** @type {ResourceDataWithData} */ + let resourceData; + /** @type {string | undefined} */ + const scheme = getScheme(unresolvedResource); + + let loaders; + + const continueCallback = needCalls(2, err => { + if (err) return callback(err); + + // translate option idents + try { + for (const item of loaders) { + if (typeof item.options === "string" && item.options[0] === "?") { + const ident = item.options.substr(1); + if (ident === "[[missing ident]]") { + throw new Error( + "No ident is provided by referenced loader. " + + "When using a function for Rule.use in config you need to " + + "provide an 'ident' property for referenced loader options." + ); + } + item.options = this.ruleSet.references.get(ident); + if (item.options === undefined) { + throw new Error( + "Invalid ident is provided by referenced loader" + ); + } + item.ident = ident; + } + } + } catch (e) { + return callback(e); + } + + if (!resourceData) { + // ignored + return callback( + null, + new RawModule( + "/* (ignored) */", + `ignored|${request}`, + `${request} (ignored)` + ) + ); + } + + const userRequest = + (matchResourceData !== undefined + ? `${matchResourceData.resource}!=!` + : "") + + stringifyLoadersAndResource(loaders, resourceData.resource); + + const resourceDataForRules = matchResourceData || resourceData; + const result = this.ruleSet.exec({ + resource: resourceDataForRules.path, + realResource: resourceData.path, + resourceQuery: resourceDataForRules.query, + resourceFragment: resourceDataForRules.fragment, + mimetype: matchResourceData ? "" : resourceData.data.mimetype || "", + dependency: dependencyType, + descriptionData: matchResourceData + ? undefined + : resourceData.data.descriptionFileData, + issuer: contextInfo.issuer, + compiler: contextInfo.compiler, + issuerLayer: contextInfo.issuerLayer || "" + }); + const settings = {}; + const useLoadersPost = []; + const useLoaders = []; + const useLoadersPre = []; + for (const r of result) { + if (r.type === "use") { + if (!noAutoLoaders && !noPrePostAutoLoaders) { + useLoaders.push(r.value); + } + } else if (r.type === "use-post") { + if (!noPrePostAutoLoaders) { + useLoadersPost.push(r.value); + } + } else if (r.type === "use-pre") { + if (!noPreAutoLoaders && !noPrePostAutoLoaders) { + useLoadersPre.push(r.value); + } + } else if ( + typeof r.value === "object" && + r.value !== null && + typeof settings[r.type] === "object" && + settings[r.type] !== null + ) { + settings[r.type] = cachedCleverMerge(settings[r.type], r.value); + } else { + settings[r.type] = r.value; + } + } + + let postLoaders, normalLoaders, preLoaders; + + const continueCallback = needCalls(3, err => { + if (err) { + return callback(err); + } + const allLoaders = postLoaders; + if (matchResourceData === undefined) { + for (const loader of loaders) allLoaders.push(loader); + for (const loader of normalLoaders) allLoaders.push(loader); + } else { + for (const loader of normalLoaders) allLoaders.push(loader); + for (const loader of loaders) allLoaders.push(loader); + } + for (const loader of preLoaders) allLoaders.push(loader); + const type = settings.type; + const resolveOptions = settings.resolve; + const layer = settings.layer; + if (layer !== undefined && !layers) { + return callback( + new Error( + "'Rule.layer' is only allowed when 'experiments.layers' is enabled" + ) + ); + } + Object.assign(data.createData, { + layer: + layer === undefined ? contextInfo.issuerLayer || null : layer, + request: stringifyLoadersAndResource( + allLoaders, + resourceData.resource + ), + userRequest, + rawRequest: request, + loaders: allLoaders, + resource: resourceData.resource, + matchResource: matchResourceData + ? matchResourceData.resource + : undefined, + resourceResolveData: resourceData.data, + settings, + type, + parser: this.getParser(type, settings.parser), + generator: this.getGenerator(type, settings.generator), + resolveOptions + }); + callback(); + }); + this.resolveRequestArray( + contextInfo, + this.context, + useLoadersPost, + loaderResolver, + resolveContext, + (err, result) => { + postLoaders = result; + continueCallback(err); + } + ); + this.resolveRequestArray( + contextInfo, + this.context, + useLoaders, + loaderResolver, + resolveContext, + (err, result) => { + normalLoaders = result; + continueCallback(err); + } + ); + this.resolveRequestArray( + contextInfo, + this.context, + useLoadersPre, + loaderResolver, + resolveContext, + (err, result) => { + preLoaders = result; + continueCallback(err); + } + ); + }); + + this.resolveRequestArray( + contextInfo, + context, + elements, + loaderResolver, + resolveContext, + (err, result) => { + if (err) return continueCallback(err); + loaders = result; + continueCallback(); + } + ); + + // resource with scheme + if (scheme) { + resourceData = { + resource: unresolvedResource, + data: {}, + path: undefined, + query: undefined, + fragment: undefined + }; + this.hooks.resolveForScheme + .for(scheme) + .callAsync(resourceData, data, err => { + if (err) return continueCallback(err); + continueCallback(); + }); + } + + // resource without scheme and without path + else if (/^($|\?|#)/.test(unresolvedResource)) { + resourceData = { + resource: unresolvedResource, + data: {}, + ...cacheParseResource(unresolvedResource) + }; + continueCallback(); + } + + // resource without scheme and with path + else { + const normalResolver = this.getResolver( + "normal", + dependencyType + ? cachedSetProperty( + resolveOptions || EMPTY_RESOLVE_OPTIONS, + "dependencyType", + dependencyType + ) + : resolveOptions + ); + this.resolveResource( + contextInfo, + context, + unresolvedResource, + normalResolver, + resolveContext, + (err, resolvedResource, resolvedResourceResolveData) => { + if (err) return continueCallback(err); + if (resolvedResource !== false) { + resourceData = { + resource: resolvedResource, + data: resolvedResourceResolveData, + ...cacheParseResource(resolvedResource) + }; + } + continueCallback(); + } + ); + } + } + ); + } + + /** + * @param {ModuleFactoryCreateData} data data object + * @param {function(Error=, ModuleFactoryResult=): void} callback callback + * @returns {void} + */ + create(data, callback) { + const dependencies = /** @type {ModuleDependency[]} */ (data.dependencies); + if (this.unsafeCache) { + const cacheEntry = dependencyCache.get(dependencies[0]); + if (cacheEntry) return callback(null, cacheEntry); + } + const context = data.context || this.context; + const resolveOptions = data.resolveOptions || EMPTY_RESOLVE_OPTIONS; + const dependency = dependencies[0]; + const request = dependency.request; + const contextInfo = data.contextInfo; + const fileDependencies = new LazySet(); + const missingDependencies = new LazySet(); + const contextDependencies = new LazySet(); + /** @type {ResolveData} */ + const resolveData = { + contextInfo, + resolveOptions, + context, + request, + dependencies, + fileDependencies, + missingDependencies, + contextDependencies, + createData: {}, + cacheable: true + }; + this.hooks.beforeResolve.callAsync(resolveData, (err, result) => { + if (err) { + return callback(err, { + fileDependencies, + missingDependencies, + contextDependencies + }); + } + + // Ignored + if (result === false) { + return callback(null, { + fileDependencies, + missingDependencies, + contextDependencies + }); + } + + if (typeof result === "object") + throw new Error(deprecationChangedHookMessage("beforeResolve")); + + this.hooks.factorize.callAsync(resolveData, (err, module) => { + if (err) { + return callback(err, { + fileDependencies, + missingDependencies, + contextDependencies + }); + } + + const factoryResult = { + module, + fileDependencies, + missingDependencies, + contextDependencies + }; + + if ( + this.unsafeCache && + resolveData.cacheable && + module && + this.cachePredicate(module) + ) { + for (const d of dependencies) { + dependencyCache.set(d, factoryResult); + } + } + + callback(null, factoryResult); + }); + }); + } + + resolveResource( + contextInfo, + context, + unresolvedResource, + resolver, + resolveContext, + callback + ) { + resolver.resolve( + contextInfo, + context, + unresolvedResource, + resolveContext, + (err, resolvedResource, resolvedResourceResolveData) => { + if (err) { + if (resolver.options.fullySpecified) { + resolver + .withOptions({ + fullySpecified: false + }) + .resolve( + contextInfo, + context, + unresolvedResource, + resolveContext, + (err2, resolvedResource) => { + if (!err2 && resolvedResource) { + const resource = parseResource( + resolvedResource + ).path.replace(/^.*[\\/]/, ""); + err.message += ` +Did you mean '${resource}'? +BREAKING CHANGE: The request '${unresolvedResource}' failed to resolve only because it was resolved as fully specified +(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"'). +The extension in the request is mandatory for it to be fully specified. +Add the extension to the request.`; + } + callback(err); + } + ); + return; + } + } + callback(err, resolvedResource, resolvedResourceResolveData); + } + ); + } + + resolveRequestArray( + contextInfo, + context, + array, + resolver, + resolveContext, + callback + ) { + if (array.length === 0) return callback(null, array); + asyncLib.map( + array, + (item, callback) => { + resolver.resolve( + contextInfo, + context, + item.loader, + resolveContext, + (err, result) => { + if ( + err && + /^[^/]*$/.test(item.loader) && + !/-loader$/.test(item.loader) + ) { + return resolver.resolve( + contextInfo, + context, + item.loader + "-loader", + resolveContext, + err2 => { + if (!err2) { + err.message = + err.message + + "\n" + + "BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.\n" + + ` You need to specify '${item.loader}-loader' instead of '${item.loader}',\n` + + " see https://webpack.js.org/migrate/3/#automatic-loader-module-name-extension-removed"; + } + callback(err); + } + ); + } + if (err) return callback(err); + + const parsedResult = identToLoaderRequest(result); + const resolved = { + loader: parsedResult.loader, + options: + item.options === undefined + ? parsedResult.options + : item.options, + ident: item.options === undefined ? undefined : item.ident + }; + return callback(null, resolved); + } + ); + }, + callback + ); + } + + getParser(type, parserOptions = EMPTY_PARSER_OPTIONS) { + let cache = this.parserCache.get(type); + + if (cache === undefined) { + cache = new WeakMap(); + this.parserCache.set(type, cache); + } + + let parser = cache.get(parserOptions); + + if (parser === undefined) { + parser = this.createParser(type, parserOptions); + cache.set(parserOptions, parser); + } + + return parser; + } + + /** + * @param {string} type type + * @param {{[k: string]: any}} parserOptions parser options + * @returns {Parser} parser + */ + createParser(type, parserOptions = {}) { + parserOptions = mergeGlobalOptions( + this._globalParserOptions, + type, + parserOptions + ); + const parser = this.hooks.createParser.for(type).call(parserOptions); + if (!parser) { + throw new Error(`No parser registered for ${type}`); + } + this.hooks.parser.for(type).call(parser, parserOptions); + return parser; + } + + getGenerator(type, generatorOptions = EMPTY_GENERATOR_OPTIONS) { + let cache = this.generatorCache.get(type); + + if (cache === undefined) { + cache = new WeakMap(); + this.generatorCache.set(type, cache); + } + + let generator = cache.get(generatorOptions); + + if (generator === undefined) { + generator = this.createGenerator(type, generatorOptions); + cache.set(generatorOptions, generator); + } + + return generator; + } + + createGenerator(type, generatorOptions = {}) { + generatorOptions = mergeGlobalOptions( + this._globalGeneratorOptions, + type, + generatorOptions + ); + const generator = this.hooks.createGenerator + .for(type) + .call(generatorOptions); + if (!generator) { + throw new Error(`No generator registered for ${type}`); + } + this.hooks.generator.for(type).call(generator, generatorOptions); + return generator; + } + + getResolver(type, resolveOptions) { + return this.resolverFactory.get(type, resolveOptions); + } +} + +module.exports = NormalModuleFactory; + + +/***/ }), + +/***/ 729: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { join, dirname } = __webpack_require__(71593); + +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {function(TODO): void} ModuleReplacer */ + +class NormalModuleReplacementPlugin { + /** + * Create an instance of the plugin + * @param {RegExp} resourceRegExp the resource matcher + * @param {string|ModuleReplacer} newResource the resource replacement + */ + constructor(resourceRegExp, newResource) { + this.resourceRegExp = resourceRegExp; + this.newResource = newResource; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const resourceRegExp = this.resourceRegExp; + const newResource = this.newResource; + compiler.hooks.normalModuleFactory.tap( + "NormalModuleReplacementPlugin", + nmf => { + nmf.hooks.beforeResolve.tap("NormalModuleReplacementPlugin", result => { + if (resourceRegExp.test(result.request)) { + if (typeof newResource === "function") { + newResource(result); + } else { + result.request = newResource; + } + } + }); + nmf.hooks.afterResolve.tap("NormalModuleReplacementPlugin", result => { + const createData = result.createData; + if (resourceRegExp.test(createData.resource)) { + if (typeof newResource === "function") { + newResource(result); + } else { + const fs = compiler.inputFileSystem; + if ( + newResource.startsWith("/") || + (newResource.length > 1 && newResource[1] === ":") + ) { + createData.resource = newResource; + } else { + createData.resource = join( + fs, + dirname(fs, createData.resource), + newResource + ); + } + } + } + }); + } + ); + } +} + +module.exports = NormalModuleReplacementPlugin; + + +/***/ }), + +/***/ 90412: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + + +exports.STAGE_BASIC = -10; +exports.STAGE_DEFAULT = 0; +exports.STAGE_ADVANCED = 10; + + +/***/ }), + +/***/ 75936: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +class OptionsApply { + process(options, compiler) {} +} +module.exports = OptionsApply; + + +/***/ }), + +/***/ 85569: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./NormalModule")} NormalModule */ + +/** @typedef {Record} PreparsedAst */ + +/** + * @typedef {Object} ParserStateBase + * @property {NormalModule} current + * @property {NormalModule} module + * @property {Compilation} compilation + * @property {{[k: string]: any}} options + */ + +/** @typedef {Record & ParserStateBase} ParserState */ + +class Parser { + /* istanbul ignore next */ + /** + * @abstract + * @param {string | Buffer | PreparsedAst} source the source to parse + * @param {ParserState} state the parser state + * @returns {ParserState} the parser state + */ + parse(source, state) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } +} + +module.exports = Parser; + + +/***/ }), + +/***/ 69145: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const PrefetchDependency = __webpack_require__(33785); + +/** @typedef {import("./Compiler")} Compiler */ + +class PrefetchPlugin { + constructor(context, request) { + if (request) { + this.context = context; + this.request = request; + } else { + this.context = null; + this.request = context; + } + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "PrefetchPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + PrefetchDependency, + normalModuleFactory + ); + } + ); + compiler.hooks.make.tapAsync("PrefetchPlugin", (compilation, callback) => { + compilation.addModuleChain( + this.context || compiler.context, + new PrefetchDependency(this.request), + err => { + callback(err); + } + ); + }); + } +} + +module.exports = PrefetchPlugin; + + +/***/ }), + +/***/ 19336: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(8121); +const Compiler = __webpack_require__(51455); +const MultiCompiler = __webpack_require__(87225); +const NormalModule = __webpack_require__(88376); +const { contextify } = __webpack_require__(47779); + +/** @typedef {import("../declarations/plugins/ProgressPlugin").HandlerFunction} HandlerFunction */ +/** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginArgument} ProgressPluginArgument */ +/** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginOptions} ProgressPluginOptions */ + +const median3 = (a, b, c) => { + return a + b + c - Math.max(a, b, c) - Math.min(a, b, c); +}; + +const createDefaultHandler = (profile, logger) => { + /** @type {{ value: string, time: number }[]} */ + const lastStateInfo = []; + + const defaultHandler = (percentage, msg, ...args) => { + if (profile) { + if (percentage === 0) { + lastStateInfo.length = 0; + } + const fullState = [msg, ...args]; + const state = fullState.map(s => s.replace(/\d+\/\d+ /g, "")); + const now = Date.now(); + const len = Math.max(state.length, lastStateInfo.length); + for (let i = len; i >= 0; i--) { + const stateItem = i < state.length ? state[i] : undefined; + const lastStateItem = + i < lastStateInfo.length ? lastStateInfo[i] : undefined; + if (lastStateItem) { + if (stateItem !== lastStateItem.value) { + const diff = now - lastStateItem.time; + if (lastStateItem.value) { + let reportState = lastStateItem.value; + if (i > 0) { + reportState = lastStateInfo[i - 1].value + " > " + reportState; + } + const stateMsg = `${" | ".repeat(i)}${diff} ms ${reportState}`; + const d = diff; + // This depends on timing so we ignore it for coverage + /* istanbul ignore next */ + { + if (d > 10000) { + logger.error(stateMsg); + } else if (d > 1000) { + logger.warn(stateMsg); + } else if (d > 10) { + logger.info(stateMsg); + } else if (d > 5) { + logger.log(stateMsg); + } else { + logger.debug(stateMsg); + } + } + } + if (stateItem === undefined) { + lastStateInfo.length = i; + } else { + lastStateItem.value = stateItem; + lastStateItem.time = now; + lastStateInfo.length = i + 1; + } + } + } else { + lastStateInfo[i] = { + value: stateItem, + time: now + }; + } + } + } + logger.status(`${Math.floor(percentage * 100)}%`, msg, ...args); + if (percentage === 1 || (!msg && args.length === 0)) logger.status(); + }; + + return defaultHandler; +}; + +/** + * @callback ReportProgress + * @param {number} p + * @param {...string[]} [args] + * @returns {void} + */ + +/** @type {WeakMap} */ +const progressReporters = new WeakMap(); + +class ProgressPlugin { + /** + * @param {Compiler} compiler the current compiler + * @returns {ReportProgress} a progress reporter, if any + */ + static getReporter(compiler) { + return progressReporters.get(compiler); + } + + /** + * @param {ProgressPluginArgument} options options + */ + constructor(options) { + if (typeof options === "function") { + options = { + handler: options + }; + } + + options = options || {}; + validate(schema, options, { + name: "Progress Plugin", + baseDataPath: "options" + }); + options = { ...ProgressPlugin.defaultOptions, ...options }; + + this.profile = options.profile; + this.handler = options.handler; + this.modulesCount = options.modulesCount; + this.dependenciesCount = options.dependenciesCount; + this.showEntries = options.entries; + this.showModules = options.modules; + this.showDependencies = options.dependencies; + this.showActiveModules = options.activeModules; + this.percentBy = options.percentBy; + } + + /** + * @param {Compiler | MultiCompiler} compiler webpack compiler + * @returns {void} + */ + apply(compiler) { + const handler = + this.handler || + createDefaultHandler( + this.profile, + compiler.getInfrastructureLogger("webpack.Progress") + ); + if (compiler instanceof MultiCompiler) { + this._applyOnMultiCompiler(compiler, handler); + } else if (compiler instanceof Compiler) { + this._applyOnCompiler(compiler, handler); + } + } + + /** + * @param {MultiCompiler} compiler webpack multi-compiler + * @param {HandlerFunction} handler function that executes for every progress step + * @returns {void} + */ + _applyOnMultiCompiler(compiler, handler) { + const states = compiler.compilers.map( + () => /** @type {[number, ...string[]]} */ ([0]) + ); + compiler.compilers.forEach((compiler, idx) => { + new ProgressPlugin((p, msg, ...args) => { + states[idx] = [p, msg, ...args]; + let sum = 0; + for (const [p] of states) sum += p; + handler(sum / states.length, `[${idx}] ${msg}`, ...args); + }).apply(compiler); + }); + } + + /** + * @param {Compiler} compiler webpack compiler + * @param {HandlerFunction} handler function that executes for every progress step + * @returns {void} + */ + _applyOnCompiler(compiler, handler) { + const showEntries = this.showEntries; + const showModules = this.showModules; + const showDependencies = this.showDependencies; + const showActiveModules = this.showActiveModules; + let lastActiveModule = ""; + let currentLoader = ""; + let lastModulesCount = 0; + let lastDependenciesCount = 0; + let lastEntriesCount = 0; + let modulesCount = 0; + let dependenciesCount = 0; + let entriesCount = 1; + let doneModules = 0; + let doneDependencies = 0; + let doneEntries = 0; + const activeModules = new Set(); + let lastUpdate = 0; + + const updateThrottled = () => { + if (lastUpdate + 500 < Date.now()) update(); + }; + + const update = () => { + /** @type {string[]} */ + const items = []; + const percentByModules = + doneModules / + Math.max(lastModulesCount || this.modulesCount, modulesCount); + const percentByEntries = + doneEntries / + Math.max(lastEntriesCount || this.dependenciesCount, entriesCount); + const percentByDependencies = + doneDependencies / Math.max(lastDependenciesCount, dependenciesCount); + let percentageFactor; + + switch (this.percentBy) { + case "entries": + percentageFactor = percentByEntries; + break; + case "dependencies": + percentageFactor = percentByDependencies; + break; + case "modules": + percentageFactor = percentByModules; + break; + default: + percentageFactor = median3( + percentByModules, + percentByEntries, + percentByDependencies + ); + } + + const percentage = 0.1 + percentageFactor * 0.55; + + if (currentLoader) { + items.push( + `import loader ${contextify( + compiler.context, + currentLoader, + compiler.root + )}` + ); + } else { + const statItems = []; + if (showEntries) { + statItems.push(`${doneEntries}/${entriesCount} entries`); + } + if (showDependencies) { + statItems.push( + `${doneDependencies}/${dependenciesCount} dependencies` + ); + } + if (showModules) { + statItems.push(`${doneModules}/${modulesCount} modules`); + } + if (showActiveModules) { + statItems.push(`${activeModules.size} active`); + } + if (statItems.length > 0) { + items.push(statItems.join(" ")); + } + if (showActiveModules) { + items.push(lastActiveModule); + } + } + handler(percentage, "building", ...items); + lastUpdate = Date.now(); + }; + + const factorizeAdd = () => { + dependenciesCount++; + if (dependenciesCount % 100 === 0) updateThrottled(); + }; + + const factorizeDone = () => { + doneDependencies++; + if (doneDependencies % 100 === 0) updateThrottled(); + }; + + const moduleAdd = () => { + modulesCount++; + if (modulesCount % 100 === 0) updateThrottled(); + }; + + // only used when showActiveModules is set + const moduleBuild = module => { + const ident = module.identifier(); + if (ident) { + activeModules.add(ident); + lastActiveModule = ident; + update(); + } + }; + + const entryAdd = (entry, options) => { + entriesCount++; + if (entriesCount % 10 === 0) updateThrottled(); + }; + + const moduleDone = module => { + doneModules++; + if (showActiveModules) { + const ident = module.identifier(); + if (ident) { + activeModules.delete(ident); + if (lastActiveModule === ident) { + lastActiveModule = ""; + for (const m of activeModules) { + lastActiveModule = m; + } + update(); + return; + } + } + } + if (doneModules % 100 === 0) updateThrottled(); + }; + + const entryDone = (entry, options) => { + doneEntries++; + update(); + }; + + const cache = compiler + .getCache("ProgressPlugin") + .getItemCache("counts", null); + + let cacheGetPromise; + + compiler.hooks.beforeCompile.tap("ProgressPlugin", () => { + if (!cacheGetPromise) { + cacheGetPromise = cache.getPromise().then( + data => { + if (data) { + lastModulesCount = lastModulesCount || data.modulesCount; + lastDependenciesCount = + lastDependenciesCount || data.dependenciesCount; + } + return data; + }, + err => { + // Ignore error + } + ); + } + }); + + compiler.hooks.afterCompile.tapPromise("ProgressPlugin", compilation => { + if (compilation.compiler.isChild()) return Promise.resolve(); + return cacheGetPromise.then(async oldData => { + if ( + !oldData || + oldData.modulesCount !== modulesCount || + oldData.dependenciesCount !== dependenciesCount + ) { + await cache.storePromise({ modulesCount, dependenciesCount }); + } + }); + }); + + compiler.hooks.compilation.tap("ProgressPlugin", compilation => { + if (compilation.compiler.isChild()) return; + lastModulesCount = modulesCount; + lastEntriesCount = entriesCount; + lastDependenciesCount = dependenciesCount; + modulesCount = dependenciesCount = entriesCount = 0; + doneModules = doneDependencies = doneEntries = 0; + + compilation.factorizeQueue.hooks.added.tap( + "ProgressPlugin", + factorizeAdd + ); + compilation.factorizeQueue.hooks.result.tap( + "ProgressPlugin", + factorizeDone + ); + + compilation.addModuleQueue.hooks.added.tap("ProgressPlugin", moduleAdd); + compilation.processDependenciesQueue.hooks.result.tap( + "ProgressPlugin", + moduleDone + ); + + if (showActiveModules) { + compilation.hooks.buildModule.tap("ProgressPlugin", moduleBuild); + } + + compilation.hooks.addEntry.tap("ProgressPlugin", entryAdd); + compilation.hooks.failedEntry.tap("ProgressPlugin", entryDone); + compilation.hooks.succeedEntry.tap("ProgressPlugin", entryDone); + + // avoid dynamic require if bundled with webpack + // @ts-expect-error + if (false) {} + + const hooks = { + finishModules: "finish module graph", + seal: "plugins", + optimizeDependencies: "dependencies optimization", + afterOptimizeDependencies: "after dependencies optimization", + beforeChunks: "chunk graph", + afterChunks: "after chunk graph", + optimize: "optimizing", + optimizeModules: "module optimization", + afterOptimizeModules: "after module optimization", + optimizeChunks: "chunk optimization", + afterOptimizeChunks: "after chunk optimization", + optimizeTree: "module and chunk tree optimization", + afterOptimizeTree: "after module and chunk tree optimization", + optimizeChunkModules: "chunk modules optimization", + afterOptimizeChunkModules: "after chunk modules optimization", + reviveModules: "module reviving", + beforeModuleIds: "before module ids", + moduleIds: "module ids", + optimizeModuleIds: "module id optimization", + afterOptimizeModuleIds: "module id optimization", + reviveChunks: "chunk reviving", + beforeChunkIds: "before chunk ids", + chunkIds: "chunk ids", + optimizeChunkIds: "chunk id optimization", + afterOptimizeChunkIds: "after chunk id optimization", + recordModules: "record modules", + recordChunks: "record chunks", + beforeModuleHash: "module hashing", + beforeCodeGeneration: "code generation", + beforeRuntimeRequirements: "runtime requirements", + beforeHash: "hashing", + afterHash: "after hashing", + recordHash: "record hash", + beforeModuleAssets: "module assets processing", + beforeChunkAssets: "chunk assets processing", + processAssets: "asset processing", + afterProcessAssets: "after asset optimization", + record: "recording", + afterSeal: "after seal" + }; + const numberOfHooks = Object.keys(hooks).length; + Object.keys(hooks).forEach((name, idx) => { + const title = hooks[name]; + const percentage = (idx / numberOfHooks) * 0.25 + 0.7; + compilation.hooks[name].intercept({ + name: "ProgressPlugin", + call() { + handler(percentage, "sealing", title); + }, + done() { + progressReporters.set(compiler, undefined); + handler(percentage, "sealing", title); + }, + result() { + handler(percentage, "sealing", title); + }, + error() { + handler(percentage, "sealing", title); + }, + tap(tap) { + // p is percentage from 0 to 1 + // args is any number of messages in a hierarchical matter + progressReporters.set(compilation.compiler, (p, ...args) => { + handler(percentage, "sealing", title, tap.name, ...args); + }); + handler(percentage, "sealing", title, tap.name); + } + }); + }); + }); + compiler.hooks.make.intercept({ + name: "ProgressPlugin", + call() { + handler(0.1, "building"); + }, + done() { + handler(0.65, "building"); + } + }); + const interceptHook = (hook, progress, category, name) => { + hook.intercept({ + name: "ProgressPlugin", + call() { + handler(progress, category, name); + }, + done() { + progressReporters.set(compiler, undefined); + handler(progress, category, name); + }, + result() { + handler(progress, category, name); + }, + error() { + handler(progress, category, name); + }, + tap(tap) { + progressReporters.set(compiler, (p, ...args) => { + handler(progress, category, name, tap.name, ...args); + }); + handler(progress, category, name, tap.name); + } + }); + }; + compiler.cache.hooks.endIdle.intercept({ + name: "ProgressPlugin", + call() { + handler(0, ""); + } + }); + interceptHook(compiler.cache.hooks.endIdle, 0.01, "cache", "end idle"); + compiler.hooks.initialize.intercept({ + name: "ProgressPlugin", + call() { + handler(0, ""); + } + }); + interceptHook(compiler.hooks.initialize, 0.01, "setup", "initialize"); + interceptHook(compiler.hooks.beforeRun, 0.02, "setup", "before run"); + interceptHook(compiler.hooks.run, 0.03, "setup", "run"); + interceptHook(compiler.hooks.watchRun, 0.03, "setup", "watch run"); + interceptHook( + compiler.hooks.normalModuleFactory, + 0.04, + "setup", + "normal module factory" + ); + interceptHook( + compiler.hooks.contextModuleFactory, + 0.05, + "setup", + "context module factory" + ); + interceptHook( + compiler.hooks.beforeCompile, + 0.06, + "setup", + "before compile" + ); + interceptHook(compiler.hooks.compile, 0.07, "setup", "compile"); + interceptHook(compiler.hooks.thisCompilation, 0.08, "setup", "compilation"); + interceptHook(compiler.hooks.compilation, 0.09, "setup", "compilation"); + interceptHook(compiler.hooks.finishMake, 0.69, "building", "finish"); + interceptHook(compiler.hooks.emit, 0.95, "emitting", "emit"); + interceptHook(compiler.hooks.afterEmit, 0.98, "emitting", "after emit"); + interceptHook(compiler.hooks.done, 0.99, "done", "plugins"); + compiler.hooks.done.intercept({ + name: "ProgressPlugin", + done() { + handler(0.99, ""); + } + }); + interceptHook( + compiler.cache.hooks.storeBuildDependencies, + 0.99, + "cache", + "store build dependencies" + ); + interceptHook(compiler.cache.hooks.shutdown, 0.99, "cache", "shutdown"); + interceptHook(compiler.cache.hooks.beginIdle, 0.99, "cache", "begin idle"); + interceptHook( + compiler.hooks.watchClose, + 0.99, + "end", + "closing watch compilation" + ); + compiler.cache.hooks.beginIdle.intercept({ + name: "ProgressPlugin", + done() { + handler(1, ""); + } + }); + compiler.cache.hooks.shutdown.intercept({ + name: "ProgressPlugin", + done() { + handler(1, ""); + } + }); + } +} + +ProgressPlugin.defaultOptions = { + profile: false, + modulesCount: 5000, + dependenciesCount: 10000, + modules: true, + dependencies: true, + activeModules: false, + entries: true +}; + +module.exports = ProgressPlugin; + + +/***/ }), + +/***/ 1204: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ConstDependency = __webpack_require__(9364); +const ProvidedDependency = __webpack_require__(76175); +const { approve } = __webpack_require__(98550); + +/** @typedef {import("./Compiler")} Compiler */ + +class ProvidePlugin { + /** + * @param {Record} definitions the provided identifiers + */ + constructor(definitions) { + this.definitions = definitions; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const definitions = this.definitions; + compiler.hooks.compilation.tap( + "ProvidePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + compilation.dependencyFactories.set( + ProvidedDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ProvidedDependency, + new ProvidedDependency.Template() + ); + const handler = (parser, parserOptions) => { + Object.keys(definitions).forEach(name => { + const request = [].concat(definitions[name]); + const splittedName = name.split("."); + if (splittedName.length > 0) { + splittedName.slice(1).forEach((_, i) => { + const name = splittedName.slice(0, i + 1).join("."); + parser.hooks.canRename.for(name).tap("ProvidePlugin", approve); + }); + } + + parser.hooks.expression.for(name).tap("ProvidePlugin", expr => { + const nameIdentifier = name.includes(".") + ? `__webpack_provided_${name.replace(/\./g, "_dot_")}` + : name; + const dep = new ProvidedDependency( + request[0], + nameIdentifier, + request.slice(1), + expr.range + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return true; + }); + + parser.hooks.call.for(name).tap("ProvidePlugin", expr => { + const nameIdentifier = name.includes(".") + ? `__webpack_provided_${name.replace(/\./g, "_dot_")}` + : name; + const dep = new ProvidedDependency( + request[0], + nameIdentifier, + request.slice(1), + expr.callee.range + ); + dep.loc = expr.callee.loc; + parser.state.module.addDependency(dep); + parser.walkExpressions(expr.arguments); + return true; + }); + }); + }; + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("ProvidePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("ProvidePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("ProvidePlugin", handler); + } + ); + } +} + +module.exports = ProvidePlugin; + + +/***/ }), + +/***/ 3754: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { OriginalSource, RawSource } = __webpack_require__(55600); +const Module = __webpack_require__(54031); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./util/Hash")} Hash */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ + +const TYPES = new Set(["javascript"]); + +class RawModule extends Module { + constructor(source, identifier, readableIdentifier) { + super("javascript/dynamic", null); + /** @type {string} */ + this.sourceStr = source; + /** @type {string} */ + this.identifierStr = identifier || this.sourceStr; + /** @type {string} */ + this.readableIdentifierStr = readableIdentifier || this.identifierStr; + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return this.identifierStr; + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + return Math.max(1, this.sourceStr.length); + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return requestShortener.shorten(this.readableIdentifierStr); + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + return callback(null, !this.buildMeta); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this.buildMeta = {}; + this.buildInfo = { + cacheable: true + }; + callback(); + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration(context) { + const sources = new Map(); + if (this.useSourceMap || this.useSimpleSourceMap) { + sources.set( + "javascript", + new OriginalSource(this.sourceStr, this.identifier()) + ); + } else { + sources.set("javascript", new RawSource(this.sourceStr)); + } + return { sources, runtimeRequirements: null }; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(this.sourceStr); + super.updateHash(hash, context); + } + + serialize(context) { + const { write } = context; + + write(this.sourceStr); + write(this.identifierStr); + write(this.readableIdentifierStr); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.sourceStr = read(); + this.identifierStr = read(); + this.readableIdentifierStr = read(); + + super.deserialize(context); + } +} + +makeSerializable(RawModule, "webpack/lib/RawModule"); + +module.exports = RawModule; + + +/***/ }), + +/***/ 19464: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { compareNumbers } = __webpack_require__(21699); +const identifierUtils = __webpack_require__(47779); + +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Module")} Module */ + +/** + * @typedef {Object} RecordsChunks + * @property {Record=} byName + * @property {Record=} bySource + * @property {number[]=} usedIds + */ + +/** + * @typedef {Object} RecordsModules + * @property {Record=} byIdentifier + * @property {Record=} bySource + * @property {number[]=} usedIds + */ + +/** + * @typedef {Object} Records + * @property {RecordsChunks=} chunks + * @property {RecordsModules=} modules + */ + +class RecordIdsPlugin { + /** + * @param {Object} options Options object + * @param {boolean=} options.portableIds true, when ids need to be portable + */ + constructor(options) { + this.options = options || {}; + } + + /** + * @param {Compiler} compiler the Compiler + * @returns {void} + */ + apply(compiler) { + const portableIds = this.options.portableIds; + + const makePathsRelative = identifierUtils.makePathsRelative.bindContextCache( + compiler.context, + compiler.root + ); + + /** + * @param {Module} module the module + * @returns {string} the (portable) identifier + */ + const getModuleIdentifier = module => { + if (portableIds) { + return makePathsRelative(module.identifier()); + } + return module.identifier(); + }; + + compiler.hooks.compilation.tap("RecordIdsPlugin", compilation => { + compilation.hooks.recordModules.tap( + "RecordIdsPlugin", + /** + * @param {Module[]} modules the modules array + * @param {Records} records the records object + * @returns {void} + */ + (modules, records) => { + const chunkGraph = compilation.chunkGraph; + if (!records.modules) records.modules = {}; + if (!records.modules.byIdentifier) records.modules.byIdentifier = {}; + /** @type {Set} */ + const usedIds = new Set(); + for (const module of modules) { + const moduleId = chunkGraph.getModuleId(module); + if (typeof moduleId !== "number") continue; + const identifier = getModuleIdentifier(module); + records.modules.byIdentifier[identifier] = moduleId; + usedIds.add(moduleId); + } + records.modules.usedIds = Array.from(usedIds).sort(compareNumbers); + } + ); + compilation.hooks.reviveModules.tap( + "RecordIdsPlugin", + /** + * @param {Module[]} modules the modules array + * @param {Records} records the records object + * @returns {void} + */ + (modules, records) => { + if (!records.modules) return; + if (records.modules.byIdentifier) { + const chunkGraph = compilation.chunkGraph; + /** @type {Set} */ + const usedIds = new Set(); + for (const module of modules) { + const moduleId = chunkGraph.getModuleId(module); + if (moduleId !== null) continue; + const identifier = getModuleIdentifier(module); + const id = records.modules.byIdentifier[identifier]; + if (id === undefined) continue; + if (usedIds.has(id)) continue; + usedIds.add(id); + chunkGraph.setModuleId(module, id); + } + } + if (Array.isArray(records.modules.usedIds)) { + compilation.usedModuleIds = new Set(records.modules.usedIds); + } + } + ); + + /** + * @param {Chunk} chunk the chunk + * @returns {string[]} sources of the chunk + */ + const getChunkSources = chunk => { + /** @type {string[]} */ + const sources = []; + for (const chunkGroup of chunk.groupsIterable) { + const index = chunkGroup.chunks.indexOf(chunk); + if (chunkGroup.name) { + sources.push(`${index} ${chunkGroup.name}`); + } else { + for (const origin of chunkGroup.origins) { + if (origin.module) { + if (origin.request) { + sources.push( + `${index} ${getModuleIdentifier(origin.module)} ${ + origin.request + }` + ); + } else if (typeof origin.loc === "string") { + sources.push( + `${index} ${getModuleIdentifier(origin.module)} ${ + origin.loc + }` + ); + } else if ( + origin.loc && + typeof origin.loc === "object" && + "start" in origin.loc + ) { + sources.push( + `${index} ${getModuleIdentifier( + origin.module + )} ${JSON.stringify(origin.loc.start)}` + ); + } + } + } + } + } + return sources; + }; + + compilation.hooks.recordChunks.tap( + "RecordIdsPlugin", + /** + * @param {Chunk[]} chunks the chunks array + * @param {Records} records the records object + * @returns {void} + */ + (chunks, records) => { + if (!records.chunks) records.chunks = {}; + if (!records.chunks.byName) records.chunks.byName = {}; + if (!records.chunks.bySource) records.chunks.bySource = {}; + /** @type {Set} */ + const usedIds = new Set(); + for (const chunk of chunks) { + if (typeof chunk.id !== "number") continue; + const name = chunk.name; + if (name) records.chunks.byName[name] = chunk.id; + const sources = getChunkSources(chunk); + for (const source of sources) { + records.chunks.bySource[source] = chunk.id; + } + usedIds.add(chunk.id); + } + records.chunks.usedIds = Array.from(usedIds).sort(compareNumbers); + } + ); + compilation.hooks.reviveChunks.tap( + "RecordIdsPlugin", + /** + * @param {Chunk[]} chunks the chunks array + * @param {Records} records the records object + * @returns {void} + */ + (chunks, records) => { + if (!records.chunks) return; + /** @type {Set} */ + const usedIds = new Set(); + if (records.chunks.byName) { + for (const chunk of chunks) { + if (chunk.id !== null) continue; + if (!chunk.name) continue; + const id = records.chunks.byName[chunk.name]; + if (id === undefined) continue; + if (usedIds.has(id)) continue; + usedIds.add(id); + chunk.id = id; + chunk.ids = [id]; + } + } + if (records.chunks.bySource) { + for (const chunk of chunks) { + const sources = getChunkSources(chunk); + for (const source of sources) { + const id = records.chunks.bySource[source]; + if (id === undefined) continue; + if (usedIds.has(id)) continue; + usedIds.add(id); + chunk.id = id; + chunk.ids = [id]; + break; + } + } + } + if (Array.isArray(records.chunks.usedIds)) { + compilation.usedChunkIds = new Set(records.chunks.usedIds); + } + } + ); + }); + } +} +module.exports = RecordIdsPlugin; + + +/***/ }), + +/***/ 81460: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { contextify } = __webpack_require__(47779); + +class RequestShortener { + /** + * @param {string} dir the directory + * @param {object=} associatedObjectForCache an object to which the cache will be attached + */ + constructor(dir, associatedObjectForCache) { + this.contextify = contextify.bindContextCache( + dir, + associatedObjectForCache + ); + } + + /** + * @param {string | undefined | null} request the request to shorten + * @returns {string | undefined | null} the shortened request + */ + shorten(request) { + if (!request) { + return request; + } + return this.contextify(request); + } +} + +module.exports = RequestShortener; + + +/***/ }), + +/***/ 71919: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const ConstDependency = __webpack_require__(9364); +const { + toConstantDependency +} = __webpack_require__(98550); + +/** @typedef {import("./Compiler")} Compiler */ + +module.exports = class RequireJsStuffPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "RequireJsStuffPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyTemplates.set( + ConstDependency, + new ConstDependency.Template() + ); + const handler = (parser, parserOptions) => { + if ( + parserOptions.requireJs === undefined || + !parserOptions.requireJs + ) { + return; + } + + parser.hooks.call + .for("require.config") + .tap( + "RequireJsStuffPlugin", + toConstantDependency(parser, "undefined") + ); + parser.hooks.call + .for("requirejs.config") + .tap( + "RequireJsStuffPlugin", + toConstantDependency(parser, "undefined") + ); + + parser.hooks.expression + .for("require.version") + .tap( + "RequireJsStuffPlugin", + toConstantDependency(parser, JSON.stringify("0.0.0")) + ); + parser.hooks.expression + .for("requirejs.onError") + .tap( + "RequireJsStuffPlugin", + toConstantDependency( + parser, + RuntimeGlobals.uncaughtErrorHandler, + [RuntimeGlobals.uncaughtErrorHandler] + ) + ); + }; + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("RequireJsStuffPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("RequireJsStuffPlugin", handler); + } + ); + } +}; + + +/***/ }), + +/***/ 27022: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Factory = __webpack_require__(75707).ResolverFactory; +const { HookMap, SyncHook, SyncWaterfallHook } = __webpack_require__(18416); +const { + cachedCleverMerge, + removeOperations, + resolveByProperty +} = __webpack_require__(92700); + +/** @typedef {import("enhanced-resolve").ResolveOptions} ResolveOptions */ +/** @typedef {import("enhanced-resolve").Resolver} Resolver */ +/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} WebpackResolveOptions */ +/** @typedef {import("../declarations/WebpackOptions").ResolvePluginInstance} ResolvePluginInstance */ + +/** @typedef {WebpackResolveOptions & {dependencyType?: string, resolveToContext?: boolean }} ResolveOptionsWithDependencyType */ +/** + * @typedef {Object} WithOptions + * @property {function(Partial): ResolverWithOptions} withOptions create a resolver with additional/different options + */ + +/** @typedef {Resolver & WithOptions} ResolverWithOptions */ + +// need to be hoisted on module level for caching identity +const EMPTY_RESOLVE_OPTIONS = {}; + +/** + * @param {ResolveOptionsWithDependencyType} resolveOptionsWithDepType enhanced options + * @returns {ResolveOptions} merged options + */ +const convertToResolveOptions = resolveOptionsWithDepType => { + const { dependencyType, plugins, ...remaining } = resolveOptionsWithDepType; + + // check type compat + /** @type {Partial} */ + const partialOptions = { + ...remaining, + plugins: + plugins && + /** @type {ResolvePluginInstance[]} */ (plugins.filter( + item => item !== "..." + )) + }; + + if (!partialOptions.fileSystem) { + throw new Error( + "fileSystem is missing in resolveOptions, but it's required for enhanced-resolve" + ); + } + // These weird types validate that we checked all non-optional properties + const options = /** @type {Partial & Pick} */ (partialOptions); + + return removeOperations( + resolveByProperty(options, "byDependency", dependencyType) + ); +}; + +/** + * @typedef {Object} ResolverCache + * @property {WeakMap} direct + * @property {Map} stringified + */ + +module.exports = class ResolverFactory { + constructor() { + this.hooks = Object.freeze({ + /** @type {HookMap>} */ + resolveOptions: new HookMap( + () => new SyncWaterfallHook(["resolveOptions"]) + ), + /** @type {HookMap>} */ + resolver: new HookMap( + () => new SyncHook(["resolver", "resolveOptions", "userResolveOptions"]) + ) + }); + /** @type {Map} */ + this.cache = new Map(); + } + + /** + * @param {string} type type of resolver + * @param {ResolveOptionsWithDependencyType=} resolveOptions options + * @returns {ResolverWithOptions} the resolver + */ + get(type, resolveOptions = EMPTY_RESOLVE_OPTIONS) { + let typedCaches = this.cache.get(type); + if (!typedCaches) { + typedCaches = { + direct: new WeakMap(), + stringified: new Map() + }; + this.cache.set(type, typedCaches); + } + const cachedResolver = typedCaches.direct.get(resolveOptions); + if (cachedResolver) { + return cachedResolver; + } + const ident = JSON.stringify(resolveOptions); + const resolver = typedCaches.stringified.get(ident); + if (resolver) { + typedCaches.direct.set(resolveOptions, resolver); + return resolver; + } + const newResolver = this._create(type, resolveOptions); + typedCaches.direct.set(resolveOptions, newResolver); + typedCaches.stringified.set(ident, newResolver); + return newResolver; + } + + /** + * @param {string} type type of resolver + * @param {ResolveOptionsWithDependencyType} resolveOptionsWithDepType options + * @returns {ResolverWithOptions} the resolver + */ + _create(type, resolveOptionsWithDepType) { + /** @type {ResolveOptionsWithDependencyType} */ + const originalResolveOptions = { ...resolveOptionsWithDepType }; + + const resolveOptions = convertToResolveOptions( + this.hooks.resolveOptions.for(type).call(resolveOptionsWithDepType) + ); + const resolver = /** @type {ResolverWithOptions} */ (Factory.createResolver( + resolveOptions + )); + if (!resolver) { + throw new Error("No resolver created"); + } + /** @type {WeakMap, ResolverWithOptions>} */ + const childCache = new WeakMap(); + resolver.withOptions = options => { + const cacheEntry = childCache.get(options); + if (cacheEntry !== undefined) return cacheEntry; + const mergedOptions = cachedCleverMerge(originalResolveOptions, options); + const resolver = this.get(type, mergedOptions); + childCache.set(options, resolver); + return resolver; + }; + this.hooks.resolver + .for(type) + .call(resolver, resolveOptions, originalResolveOptions); + return resolver; + } +}; + + +/***/ }), + +/***/ 48801: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** + * the internal require function + */ +exports.require = "__webpack_require__"; + +/** + * access to properties of the internal require function/object + */ +exports.requireScope = "__webpack_require__.*"; + +/** + * the internal exports object + */ +exports.exports = "__webpack_exports__"; + +/** + * top-level this need to be the exports object + */ +exports.thisAsExports = "top-level-this-exports"; + +/** + * runtime need to return the exports of the last entry module + */ +exports.returnExportsFromRuntime = "return-exports-from-runtime"; + +/** + * the internal module object + */ +exports.module = "module"; + +/** + * the internal module object + */ +exports.moduleId = "module.id"; + +/** + * the internal module object + */ +exports.moduleLoaded = "module.loaded"; + +/** + * the bundle public path + */ +exports.publicPath = "__webpack_require__.p"; + +/** + * the module id of the entry point + */ +exports.entryModuleId = "__webpack_require__.s"; + +/** + * the module cache + */ +exports.moduleCache = "__webpack_require__.c"; + +/** + * the module functions + */ +exports.moduleFactories = "__webpack_require__.m"; + +/** + * the module functions, with only write access + */ +exports.moduleFactoriesAddOnly = "__webpack_require__.m (add only)"; + +/** + * the chunk ensure function + */ +exports.ensureChunk = "__webpack_require__.e"; + +/** + * an object with handlers to ensure a chunk + */ +exports.ensureChunkHandlers = "__webpack_require__.f"; + +/** + * a runtime requirement if ensureChunkHandlers should include loading of chunk needed for entries + */ +exports.ensureChunkIncludeEntries = "__webpack_require__.f (include entries)"; + +/** + * the chunk prefetch function + */ +exports.prefetchChunk = "__webpack_require__.E"; + +/** + * an object with handlers to prefetch a chunk + */ +exports.prefetchChunkHandlers = "__webpack_require__.F"; + +/** + * the chunk preload function + */ +exports.preloadChunk = "__webpack_require__.G"; + +/** + * an object with handlers to preload a chunk + */ +exports.preloadChunkHandlers = "__webpack_require__.H"; + +/** + * the exported property define getters function + */ +exports.definePropertyGetters = "__webpack_require__.d"; + +/** + * define compatibility on export + */ +exports.makeNamespaceObject = "__webpack_require__.r"; + +/** + * create a fake namespace object + */ +exports.createFakeNamespaceObject = "__webpack_require__.t"; + +/** + * compatibility get default export + */ +exports.compatGetDefaultExport = "__webpack_require__.n"; + +/** + * harmony module decorator + */ +exports.harmonyModuleDecorator = "__webpack_require__.hmd"; + +/** + * node.js module decorator + */ +exports.nodeModuleDecorator = "__webpack_require__.nmd"; + +/** + * the webpack hash + */ +exports.getFullHash = "__webpack_require__.h"; + +/** + * an object containing all installed WebAssembly.Instance export objects keyed by module id + */ +exports.wasmInstances = "__webpack_require__.w"; + +/** + * instantiate a wasm instance from module exports object, id, hash and importsObject + */ +exports.instantiateWasm = "__webpack_require__.v"; + +/** + * the uncaught error handler for the webpack runtime + */ +exports.uncaughtErrorHandler = "__webpack_require__.oe"; + +/** + * the script nonce + */ +exports.scriptNonce = "__webpack_require__.nc"; + +/** + * function to load a script tag. + * Arguments: (url: string, done: (event) => void), key?: string | number, chunkId?: string | number) => void + * done function is called when loading has finished or timeout occurred. + * It will attach to existing script tags with data-webpack == key or src == url. + */ +exports.loadScript = "__webpack_require__.l"; + +/** + * the chunk name of the chunk with the runtime + */ +exports.chunkName = "__webpack_require__.cn"; + +/** + * the runtime id of the current runtime + */ +exports.runtimeId = "__webpack_require__.j"; + +/** + * the filename of the script part of the chunk + */ +exports.getChunkScriptFilename = "__webpack_require__.u"; + +/** + * the filename of the script part of the hot update chunk + */ +exports.getChunkUpdateScriptFilename = "__webpack_require__.hu"; + +/** + * startup signal from runtime + */ +exports.startup = "__webpack_require__.x"; + +/** + * creating a default startup function with the entry modules + */ +exports.startupNoDefault = "__webpack_require__.x (no default handler)"; + +/** + * startup signal from runtime but only used to add logic after the startup + */ +exports.startupOnlyAfter = "__webpack_require__.x (only after)"; + +/** + * startup signal from runtime but only used to add sync logic before the startup + */ +exports.startupOnlyBefore = "__webpack_require__.x (only before)"; + +/** + * method to startup an entrypoint with needed chunks. + * Signature: (moduleId: Id, chunkIds: Id[]) => any. + * Returns the exports of the module or a Promise + */ +exports.startupEntrypoint = "__webpack_require__.X"; + +/** + * method to install a chunk that was loaded somehow + * Signature depends on the chunk loading method + */ +exports.externalInstallChunk = "__webpack_require__.C"; + +/** + * interceptor for module executions + */ +exports.interceptModuleExecution = "__webpack_require__.i"; + +/** + * the global object + */ +exports.global = "__webpack_require__.g"; + +/** + * an object with all share scopes + */ +exports.shareScopeMap = "__webpack_require__.S"; + +/** + * The sharing init sequence function (only runs once per share scope). + * Has one argument, the name of the share scope. + * Creates a share scope if not existing + */ +exports.initializeSharing = "__webpack_require__.I"; + +/** + * The current scope when getting a module from a remote + */ +exports.currentRemoteGetScope = "__webpack_require__.R"; + +/** + * the filename of the HMR manifest + */ +exports.getUpdateManifestFilename = "__webpack_require__.hmrF"; + +/** + * function downloading the update manifest + */ +exports.hmrDownloadManifest = "__webpack_require__.hmrM"; + +/** + * array with handler functions to download chunk updates + */ +exports.hmrDownloadUpdateHandlers = "__webpack_require__.hmrC"; + +/** + * object with all hmr module data for all modules + */ +exports.hmrModuleData = "__webpack_require__.hmrD"; + +/** + * array with handler functions when a module should be invalidated + */ +exports.hmrInvalidateModuleHandlers = "__webpack_require__.hmrI"; + +/** + * the AMD define function + */ +exports.amdDefine = "__webpack_require__.amdD"; + +/** + * the AMD options + */ +exports.amdOptions = "__webpack_require__.amdO"; + +/** + * the System polyfill object + */ +exports.system = "__webpack_require__.System"; + +/** + * the shorthand for Object.prototype.hasOwnProperty + * using of it decreases the compiled bundle size + */ +exports.hasOwnProperty = "__webpack_require__.o"; + +/** + * the System.register context object + */ +exports.systemContext = "__webpack_require__.y"; + +/** + * the baseURI of current document + */ +exports.baseURI = "__webpack_require__.b"; + + +/***/ }), + +/***/ 54746: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { RawSource } = __webpack_require__(55600); +const OriginalSource = __webpack_require__(55600).OriginalSource; +const Module = __webpack_require__(54031); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./util/Hash")} Hash */ +/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */ + +const TYPES = new Set(["runtime"]); + +class RuntimeModule extends Module { + /** + * @param {string} name a readable name + * @param {number=} stage an optional stage + */ + constructor(name, stage = 0) { + super("runtime"); + this.name = name; + this.stage = stage; + this.buildMeta = {}; + this.buildInfo = {}; + /** @type {Compilation} */ + this.compilation = undefined; + /** @type {Chunk} */ + this.chunk = undefined; + this.fullHash = false; + /** @type {string} */ + this._cachedGeneratedCode = undefined; + } + + /** + * @param {Compilation} compilation the compilation + * @param {Chunk} chunk the chunk + * @returns {void} + */ + attach(compilation, chunk) { + this.compilation = compilation; + this.chunk = chunk; + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return `webpack/runtime/${this.name}`; + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return `webpack/runtime/${this.name}`; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + return callback(null, false); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + // do nothing + // should not be called as runtime modules are added later to the compilation + callback(); + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(this.name); + hash.update(`${this.stage}`); + try { + if (this.fullHash) { + // Do not use getGeneratedCode here, because i. e. compilation hash might be not + // ready at this point. We will cache it later instead. + hash.update(this.generate()); + } else { + hash.update(this.getGeneratedCode()); + } + } catch (err) { + hash.update(err.message); + } + super.updateHash(hash, context); + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration(context) { + const sources = new Map(); + const generatedCode = this.getGeneratedCode(); + if (generatedCode) { + sources.set( + "runtime", + this.useSourceMap || this.useSimpleSourceMap + ? new OriginalSource(generatedCode, this.identifier()) + : new RawSource(generatedCode) + ); + } + return { + sources, + runtimeRequirements: null + }; + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + try { + const source = this.getGeneratedCode(); + return source ? source.length : 0; + } catch (e) { + return 0; + } + } + + /* istanbul ignore next */ + /** + * @abstract + * @returns {string} runtime code + */ + generate() { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /** + * @returns {string} runtime code + */ + getGeneratedCode() { + if (this._cachedGeneratedCode) { + return this._cachedGeneratedCode; + } + return (this._cachedGeneratedCode = this.generate()); + } + + /** + * @returns {boolean} true, if the runtime module should get it's own scope + */ + shouldIsolate() { + return true; + } +} + +/** + * Runtime modules without any dependencies to other runtime modules + */ +RuntimeModule.STAGE_NORMAL = 0; + +/** + * Runtime modules with simple dependencies on other runtime modules + */ +RuntimeModule.STAGE_BASIC = 5; + +/** + * Runtime modules which attach to handlers of other runtime modules + */ +RuntimeModule.STAGE_ATTACH = 10; + +/** + * Runtime modules which trigger actions on bootstrap + */ +RuntimeModule.STAGE_TRIGGER = 20; + +module.exports = RuntimeModule; + + +/***/ }), + +/***/ 22496: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeRequirementsDependency = __webpack_require__(61247); +const JavascriptModulesPlugin = __webpack_require__(80867); +const AutoPublicPathRuntimeModule = __webpack_require__(85827); +const CompatGetDefaultExportRuntimeModule = __webpack_require__(4023); +const CompatRuntimeModule = __webpack_require__(27352); +const CreateFakeNamespaceObjectRuntimeModule = __webpack_require__(70911); +const DefinePropertyGettersRuntimeModule = __webpack_require__(74240); +const EnsureChunkRuntimeModule = __webpack_require__(39026); +const GetChunkFilenameRuntimeModule = __webpack_require__(88253); +const GetMainFilenameRuntimeModule = __webpack_require__(2706); +const GlobalRuntimeModule = __webpack_require__(61710); +const HasOwnPropertyRuntimeModule = __webpack_require__(61725); +const LoadScriptRuntimeModule = __webpack_require__(23033); +const MakeNamespaceObjectRuntimeModule = __webpack_require__(2559); +const PublicPathRuntimeModule = __webpack_require__(25142); +const RuntimeIdRuntimeModule = __webpack_require__(24578); +const SystemContextRuntimeModule = __webpack_require__(77633); +const ShareRuntimeModule = __webpack_require__(17369); +const StringXor = __webpack_require__(74395); + +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Module")} Module */ + +const GLOBALS_ON_REQUIRE = [ + RuntimeGlobals.chunkName, + RuntimeGlobals.runtimeId, + RuntimeGlobals.compatGetDefaultExport, + RuntimeGlobals.createFakeNamespaceObject, + RuntimeGlobals.definePropertyGetters, + RuntimeGlobals.ensureChunk, + RuntimeGlobals.entryModuleId, + RuntimeGlobals.getFullHash, + RuntimeGlobals.global, + RuntimeGlobals.makeNamespaceObject, + RuntimeGlobals.moduleCache, + RuntimeGlobals.moduleFactories, + RuntimeGlobals.moduleFactoriesAddOnly, + RuntimeGlobals.interceptModuleExecution, + RuntimeGlobals.publicPath, + RuntimeGlobals.scriptNonce, + RuntimeGlobals.uncaughtErrorHandler, + RuntimeGlobals.wasmInstances, + RuntimeGlobals.instantiateWasm, + RuntimeGlobals.shareScopeMap, + RuntimeGlobals.initializeSharing, + RuntimeGlobals.loadScript +]; + +const MODULE_DEPENDENCIES = { + [RuntimeGlobals.moduleLoaded]: [RuntimeGlobals.module], + [RuntimeGlobals.moduleId]: [RuntimeGlobals.module] +}; + +const TREE_DEPENDENCIES = { + [RuntimeGlobals.definePropertyGetters]: [RuntimeGlobals.hasOwnProperty], + [RuntimeGlobals.compatGetDefaultExport]: [ + RuntimeGlobals.definePropertyGetters + ], + [RuntimeGlobals.createFakeNamespaceObject]: [ + RuntimeGlobals.definePropertyGetters, + RuntimeGlobals.makeNamespaceObject, + RuntimeGlobals.require + ], + [RuntimeGlobals.initializeSharing]: [RuntimeGlobals.shareScopeMap], + [RuntimeGlobals.shareScopeMap]: [RuntimeGlobals.hasOwnProperty] +}; + +class RuntimePlugin { + /** + * @param {Compiler} compiler the Compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("RuntimePlugin", compilation => { + compilation.dependencyTemplates.set( + RuntimeRequirementsDependency, + new RuntimeRequirementsDependency.Template() + ); + for (const req of GLOBALS_ON_REQUIRE) { + compilation.hooks.runtimeRequirementInModule + .for(req) + .tap("RuntimePlugin", (module, set) => { + set.add(RuntimeGlobals.requireScope); + }); + compilation.hooks.runtimeRequirementInTree + .for(req) + .tap("RuntimePlugin", (module, set) => { + set.add(RuntimeGlobals.requireScope); + }); + } + for (const req of Object.keys(TREE_DEPENDENCIES)) { + const deps = TREE_DEPENDENCIES[req]; + compilation.hooks.runtimeRequirementInTree + .for(req) + .tap("RuntimePlugin", (chunk, set) => { + for (const dep of deps) set.add(dep); + }); + } + for (const req of Object.keys(MODULE_DEPENDENCIES)) { + const deps = MODULE_DEPENDENCIES[req]; + compilation.hooks.runtimeRequirementInModule + .for(req) + .tap("RuntimePlugin", (chunk, set) => { + for (const dep of deps) set.add(dep); + }); + } + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.definePropertyGetters) + .tap("RuntimePlugin", chunk => { + compilation.addRuntimeModule( + chunk, + new DefinePropertyGettersRuntimeModule() + ); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.makeNamespaceObject) + .tap("RuntimePlugin", chunk => { + compilation.addRuntimeModule( + chunk, + new MakeNamespaceObjectRuntimeModule() + ); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.createFakeNamespaceObject) + .tap("RuntimePlugin", chunk => { + compilation.addRuntimeModule( + chunk, + new CreateFakeNamespaceObjectRuntimeModule() + ); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hasOwnProperty) + .tap("RuntimePlugin", chunk => { + compilation.addRuntimeModule( + chunk, + new HasOwnPropertyRuntimeModule() + ); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.compatGetDefaultExport) + .tap("RuntimePlugin", chunk => { + compilation.addRuntimeModule( + chunk, + new CompatGetDefaultExportRuntimeModule() + ); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.runtimeId) + .tap("RuntimePlugin", chunk => { + compilation.addRuntimeModule(chunk, new RuntimeIdRuntimeModule()); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.publicPath) + .tap("RuntimePlugin", (chunk, set) => { + const { outputOptions } = compilation; + const { publicPath, scriptType } = outputOptions; + + if (publicPath === "auto") { + const module = new AutoPublicPathRuntimeModule(); + if (scriptType !== "module") set.add(RuntimeGlobals.global); + compilation.addRuntimeModule(chunk, module); + } else { + const module = new PublicPathRuntimeModule(); + + if ( + typeof publicPath !== "string" || + /\[(full)?hash\]/.test(publicPath) + ) { + module.fullHash = true; + } + + compilation.addRuntimeModule(chunk, module); + } + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.global) + .tap("RuntimePlugin", chunk => { + compilation.addRuntimeModule(chunk, new GlobalRuntimeModule()); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.systemContext) + .tap("RuntimePlugin", chunk => { + if (compilation.outputOptions.library.type === "system") { + compilation.addRuntimeModule( + chunk, + new SystemContextRuntimeModule() + ); + } + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.getChunkScriptFilename) + .tap("RuntimePlugin", (chunk, set) => { + if ( + typeof compilation.outputOptions.chunkFilename === "string" && + /\[(full)?hash(:\d+)?\]/.test( + compilation.outputOptions.chunkFilename + ) + ) { + set.add(RuntimeGlobals.getFullHash); + } + compilation.addRuntimeModule( + chunk, + new GetChunkFilenameRuntimeModule( + "javascript", + "javascript", + RuntimeGlobals.getChunkScriptFilename, + chunk => + chunk.filenameTemplate || + (chunk.canBeInitial() + ? compilation.outputOptions.filename + : compilation.outputOptions.chunkFilename), + false + ) + ); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.getChunkUpdateScriptFilename) + .tap("RuntimePlugin", (chunk, set) => { + if ( + /\[(full)?hash(:\d+)?\]/.test( + compilation.outputOptions.hotUpdateChunkFilename + ) + ) + set.add(RuntimeGlobals.getFullHash); + compilation.addRuntimeModule( + chunk, + new GetChunkFilenameRuntimeModule( + "javascript", + "javascript update", + RuntimeGlobals.getChunkUpdateScriptFilename, + c => compilation.outputOptions.hotUpdateChunkFilename, + true + ) + ); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.getUpdateManifestFilename) + .tap("RuntimePlugin", (chunk, set) => { + if ( + /\[(full)?hash(:\d+)?\]/.test( + compilation.outputOptions.hotUpdateMainFilename + ) + ) { + set.add(RuntimeGlobals.getFullHash); + } + compilation.addRuntimeModule( + chunk, + new GetMainFilenameRuntimeModule( + "update manifest", + RuntimeGlobals.getUpdateManifestFilename, + compilation.outputOptions.hotUpdateMainFilename + ) + ); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunk) + .tap("RuntimePlugin", (chunk, set) => { + const hasAsyncChunks = chunk.hasAsyncChunks(); + if (hasAsyncChunks) { + set.add(RuntimeGlobals.ensureChunkHandlers); + } + compilation.addRuntimeModule( + chunk, + new EnsureChunkRuntimeModule(set) + ); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunkIncludeEntries) + .tap("RuntimePlugin", (chunk, set) => { + set.add(RuntimeGlobals.ensureChunkHandlers); + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.shareScopeMap) + .tap("RuntimePlugin", (chunk, set) => { + compilation.addRuntimeModule(chunk, new ShareRuntimeModule()); + return true; + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.loadScript) + .tap("RuntimePlugin", (chunk, set) => { + compilation.addRuntimeModule(chunk, new LoadScriptRuntimeModule()); + return true; + }); + // TODO webpack 6: remove CompatRuntimeModule + compilation.hooks.additionalTreeRuntimeRequirements.tap( + "RuntimePlugin", + (chunk, set) => { + const { mainTemplate } = compilation; + if ( + mainTemplate.hooks.bootstrap.isUsed() || + mainTemplate.hooks.localVars.isUsed() || + mainTemplate.hooks.requireEnsure.isUsed() || + mainTemplate.hooks.requireExtensions.isUsed() + ) { + compilation.addRuntimeModule(chunk, new CompatRuntimeModule()); + } + } + ); + JavascriptModulesPlugin.getCompilationHooks(compilation).chunkHash.tap( + "RuntimePlugin", + (chunk, hash, { chunkGraph }) => { + const xor = new StringXor(); + for (const m of chunkGraph.getChunkRuntimeModulesIterable(chunk)) { + xor.add(chunkGraph.getModuleHash(m, chunk.runtime)); + } + xor.updateHash(hash); + } + ); + }); + } +} +module.exports = RuntimePlugin; + + +/***/ }), + +/***/ 2493: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const InitFragment = __webpack_require__(63382); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const { equals } = __webpack_require__(92459); +const compileBooleanMatcher = __webpack_require__(29522); +const propertyAccess = __webpack_require__(44682); +const { forEachRuntime, subtractRuntime } = __webpack_require__(43478); + +/** @typedef {import("../declarations/WebpackOptions").OutputNormalized} OutputOptions */ +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * @param {Module} module the module + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {string} error message + */ +const noModuleIdErrorMessage = (module, chunkGraph) => { + return `Module ${module.identifier()} has no id assigned. +This should not happen. +It's in these chunks: ${ + Array.from( + chunkGraph.getModuleChunksIterable(module), + c => c.name || c.id || c.debugId + ).join(", ") || "none" + } (If module is in no chunk this indicates a bug in some chunk/module optimization logic) +Module has these incoming connections: ${Array.from( + chunkGraph.moduleGraph.getIncomingConnections(module), + connection => + `\n - ${ + connection.originModule && connection.originModule.identifier() + } ${connection.dependency && connection.dependency.type} ${ + (connection.explanations && + Array.from(connection.explanations).join(", ")) || + "" + }` + ).join("")}`; +}; + +class RuntimeTemplate { + /** + * @param {OutputOptions} outputOptions the compilation output options + * @param {RequestShortener} requestShortener the request shortener + */ + constructor(outputOptions, requestShortener) { + this.outputOptions = outputOptions || {}; + /** @type {RequestShortener} */ + this.requestShortener = requestShortener; + } + + isIIFE() { + return this.outputOptions.iife; + } + + isModule() { + return this.outputOptions.module; + } + + supportsConst() { + return this.outputOptions.environment.const; + } + + supportsArrowFunction() { + return this.outputOptions.environment.arrowFunction; + } + + supportsForOf() { + return this.outputOptions.environment.forOf; + } + + supportsDestructuring() { + return this.outputOptions.environment.destructuring; + } + + supportsBigIntLiteral() { + return this.outputOptions.environment.bigIntLiteral; + } + + supportsDynamicImport() { + return this.outputOptions.environment.dynamicImport; + } + + supportsEcmaScriptModuleSyntax() { + return this.outputOptions.environment.module; + } + + supportTemplateLiteral() { + // TODO + return false; + } + + returningFunction(returnValue, args = "") { + return this.supportsArrowFunction() + ? `(${args}) => ${returnValue}` + : `function(${args}) { return ${returnValue}; }`; + } + + basicFunction(args, body) { + return this.supportsArrowFunction() + ? `(${args}) => {\n${Template.indent(body)}\n}` + : `function(${args}) {\n${Template.indent(body)}\n}`; + } + + emptyFunction() { + return this.supportsArrowFunction() ? "x => {}" : "function() {}"; + } + + destructureArray(items, value) { + return this.supportsDestructuring() + ? `var [${items.join(", ")}] = ${value};` + : Template.asString( + items.map((item, i) => `var ${item} = ${value}[${i}];`) + ); + } + + iife(args, body) { + return `(${this.basicFunction(args, body)})()`; + } + + forEach(variable, array, body) { + return this.supportsForOf() + ? `for(const ${variable} of ${array}) {\n${Template.indent(body)}\n}` + : `${array}.forEach(function(${variable}) {\n${Template.indent( + body + )}\n});`; + } + + /** + * Add a comment + * @param {object} options Information content of the comment + * @param {string=} options.request request string used originally + * @param {string=} options.chunkName name of the chunk referenced + * @param {string=} options.chunkReason reason information of the chunk + * @param {string=} options.message additional message + * @param {string=} options.exportName name of the export + * @returns {string} comment + */ + comment({ request, chunkName, chunkReason, message, exportName }) { + let content; + if (this.outputOptions.pathinfo) { + content = [message, request, chunkName, chunkReason] + .filter(Boolean) + .map(item => this.requestShortener.shorten(item)) + .join(" | "); + } else { + content = [message, chunkName, chunkReason] + .filter(Boolean) + .map(item => this.requestShortener.shorten(item)) + .join(" | "); + } + if (!content) return ""; + if (this.outputOptions.pathinfo) { + return Template.toComment(content) + " "; + } else { + return Template.toNormalComment(content) + " "; + } + } + + /** + * @param {object} options generation options + * @param {string=} options.request request string used originally + * @returns {string} generated error block + */ + throwMissingModuleErrorBlock({ request }) { + const err = `Cannot find module '${request}'`; + return `var e = new Error(${JSON.stringify( + err + )}); e.code = 'MODULE_NOT_FOUND'; throw e;`; + } + + /** + * @param {object} options generation options + * @param {string=} options.request request string used originally + * @returns {string} generated error function + */ + throwMissingModuleErrorFunction({ request }) { + return `function webpackMissingModule() { ${this.throwMissingModuleErrorBlock( + { request } + )} }`; + } + + /** + * @param {object} options generation options + * @param {string=} options.request request string used originally + * @returns {string} generated error IIFE + */ + missingModule({ request }) { + return `Object(${this.throwMissingModuleErrorFunction({ request })}())`; + } + + /** + * @param {object} options generation options + * @param {string=} options.request request string used originally + * @returns {string} generated error statement + */ + missingModuleStatement({ request }) { + return `${this.missingModule({ request })};\n`; + } + + /** + * @param {object} options generation options + * @param {string=} options.request request string used originally + * @returns {string} generated error code + */ + missingModulePromise({ request }) { + return `Promise.resolve().then(${this.throwMissingModuleErrorFunction({ + request + })})`; + } + + /** + * @param {Object} options options object + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {Module} options.module the module + * @param {string} options.request the request that should be printed as comment + * @param {string=} options.idExpr expression to use as id expression + * @param {"expression" | "promise" | "statements"} options.type which kind of code should be returned + * @returns {string} the code + */ + weakError({ module, chunkGraph, request, idExpr, type }) { + const moduleId = chunkGraph.getModuleId(module); + const errorMessage = + moduleId === null + ? JSON.stringify("Module is not available (weak dependency)") + : idExpr + ? `"Module '" + ${idExpr} + "' is not available (weak dependency)"` + : JSON.stringify( + `Module '${moduleId}' is not available (weak dependency)` + ); + const comment = request ? Template.toNormalComment(request) + " " : ""; + const errorStatements = + `var e = new Error(${errorMessage}); ` + + comment + + "e.code = 'MODULE_NOT_FOUND'; throw e;"; + switch (type) { + case "statements": + return errorStatements; + case "promise": + return `Promise.resolve().then(${this.basicFunction( + "", + errorStatements + )})`; + case "expression": + return this.iife("", errorStatements); + } + } + + /** + * @param {Object} options options object + * @param {Module} options.module the module + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {string} options.request the request that should be printed as comment + * @param {boolean=} options.weak if the dependency is weak (will create a nice error message) + * @returns {string} the expression + */ + moduleId({ module, chunkGraph, request, weak }) { + if (!module) { + return this.missingModule({ + request + }); + } + const moduleId = chunkGraph.getModuleId(module); + if (moduleId === null) { + if (weak) { + return "null /* weak dependency, without id */"; + } + throw new Error( + `RuntimeTemplate.moduleId(): ${noModuleIdErrorMessage( + module, + chunkGraph + )}` + ); + } + return `${this.comment({ request })}${JSON.stringify(moduleId)}`; + } + + /** + * @param {Object} options options object + * @param {Module} options.module the module + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {string} options.request the request that should be printed as comment + * @param {boolean=} options.weak if the dependency is weak (will create a nice error message) + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @returns {string} the expression + */ + moduleRaw({ module, chunkGraph, request, weak, runtimeRequirements }) { + if (!module) { + return this.missingModule({ + request + }); + } + const moduleId = chunkGraph.getModuleId(module); + if (moduleId === null) { + if (weak) { + // only weak referenced modules don't get an id + // we can always emit an error emitting code here + return this.weakError({ + module, + chunkGraph, + request, + type: "expression" + }); + } + throw new Error( + `RuntimeTemplate.moduleId(): ${noModuleIdErrorMessage( + module, + chunkGraph + )}` + ); + } + runtimeRequirements.add(RuntimeGlobals.require); + return `__webpack_require__(${this.moduleId({ + module, + chunkGraph, + request, + weak + })})`; + } + + /** + * @param {Object} options options object + * @param {Module} options.module the module + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {string} options.request the request that should be printed as comment + * @param {boolean=} options.weak if the dependency is weak (will create a nice error message) + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @returns {string} the expression + */ + moduleExports({ module, chunkGraph, request, weak, runtimeRequirements }) { + return this.moduleRaw({ + module, + chunkGraph, + request, + weak, + runtimeRequirements + }); + } + + /** + * @param {Object} options options object + * @param {Module} options.module the module + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {string} options.request the request that should be printed as comment + * @param {boolean=} options.strict if the current module is in strict esm mode + * @param {boolean=} options.weak if the dependency is weak (will create a nice error message) + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @returns {string} the expression + */ + moduleNamespace({ + module, + chunkGraph, + request, + strict, + weak, + runtimeRequirements + }) { + if (!module) { + return this.missingModule({ + request + }); + } + if (chunkGraph.getModuleId(module) === null) { + if (weak) { + // only weak referenced modules don't get an id + // we can always emit an error emitting code here + return this.weakError({ + module, + chunkGraph, + request, + type: "expression" + }); + } + throw new Error( + `RuntimeTemplate.moduleNamespace(): ${noModuleIdErrorMessage( + module, + chunkGraph + )}` + ); + } + const moduleId = this.moduleId({ + module, + chunkGraph, + request, + weak + }); + const exportsType = module.getExportsType(chunkGraph.moduleGraph, strict); + switch (exportsType) { + case "namespace": + return this.moduleRaw({ + module, + chunkGraph, + request, + weak, + runtimeRequirements + }); + case "default-with-named": + runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); + return `${RuntimeGlobals.createFakeNamespaceObject}(${moduleId}, 3)`; + case "default-only": + runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); + return `${RuntimeGlobals.createFakeNamespaceObject}(${moduleId}, 1)`; + case "dynamic": + runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); + return `${RuntimeGlobals.createFakeNamespaceObject}(${moduleId}, 7)`; + } + } + + /** + * @param {Object} options options object + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {AsyncDependenciesBlock=} options.block the current dependencies block + * @param {Module} options.module the module + * @param {string} options.request the request that should be printed as comment + * @param {string} options.message a message for the comment + * @param {boolean=} options.strict if the current module is in strict esm mode + * @param {boolean=} options.weak if the dependency is weak (will create a nice error message) + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @returns {string} the promise expression + */ + moduleNamespacePromise({ + chunkGraph, + block, + module, + request, + message, + strict, + weak, + runtimeRequirements + }) { + if (!module) { + return this.missingModulePromise({ + request + }); + } + const moduleId = chunkGraph.getModuleId(module); + if (moduleId === null) { + if (weak) { + // only weak referenced modules don't get an id + // we can always emit an error emitting code here + return this.weakError({ + module, + chunkGraph, + request, + type: "promise" + }); + } + throw new Error( + `RuntimeTemplate.moduleNamespacePromise(): ${noModuleIdErrorMessage( + module, + chunkGraph + )}` + ); + } + const promise = this.blockPromise({ + chunkGraph, + block, + message, + runtimeRequirements + }); + + let appending; + let idExpr = JSON.stringify(chunkGraph.getModuleId(module)); + const comment = this.comment({ + request + }); + let header = ""; + if (weak) { + if (idExpr.length > 8) { + // 'var x="nnnnnn";x,"+x+",x' vs '"nnnnnn",nnnnnn,"nnnnnn"' + header += `var id = ${idExpr}; `; + idExpr = "id"; + } + runtimeRequirements.add(RuntimeGlobals.moduleFactories); + header += `if(!${ + RuntimeGlobals.moduleFactories + }[${idExpr}]) { ${this.weakError({ + module, + chunkGraph, + request, + idExpr, + type: "statements" + })} } `; + } + const moduleIdExpr = this.moduleId({ + module, + chunkGraph, + request, + weak + }); + const exportsType = module.getExportsType(chunkGraph.moduleGraph, strict); + let fakeType = 16; + switch (exportsType) { + case "namespace": + if (header) { + const rawModule = this.moduleRaw({ + module, + chunkGraph, + request, + weak, + runtimeRequirements + }); + appending = `.then(${this.basicFunction( + "", + `${header}return ${rawModule};` + )})`; + } else { + runtimeRequirements.add(RuntimeGlobals.require); + appending = `.then(__webpack_require__.bind(__webpack_require__, ${comment}${idExpr}))`; + } + break; + case "dynamic": + fakeType |= 4; + /* fall through */ + case "default-with-named": + fakeType |= 2; + /* fall through */ + case "default-only": + runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); + if (chunkGraph.moduleGraph.isAsync(module)) { + if (header) { + const rawModule = this.moduleRaw({ + module, + chunkGraph, + request, + weak, + runtimeRequirements + }); + appending = `.then(${this.basicFunction( + "", + `${header}return ${rawModule};` + )})`; + } else { + runtimeRequirements.add(RuntimeGlobals.require); + appending = `.then(__webpack_require__.bind(__webpack_require__, ${comment}${idExpr}))`; + } + appending += `.then(${this.returningFunction( + `${RuntimeGlobals.createFakeNamespaceObject}(m, ${fakeType})`, + "m" + )})`; + } else { + fakeType |= 1; + if (header) { + const returnExpression = `${RuntimeGlobals.createFakeNamespaceObject}(${moduleIdExpr}, ${fakeType})`; + appending = `.then(${this.basicFunction( + "", + `${header}return ${returnExpression};` + )})`; + } else { + appending = `.then(${RuntimeGlobals.createFakeNamespaceObject}.bind(__webpack_require__, ${comment}${idExpr}, ${fakeType}))`; + } + } + break; + } + + return `${promise || "Promise.resolve()"}${appending}`; + } + + /** + * @param {Object} options options object + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {RuntimeSpec=} options.runtime runtime for which this code will be generated + * @param {RuntimeSpec | boolean=} options.runtimeCondition only execute the statement in some runtimes + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @returns {string} expression + */ + runtimeConditionExpression({ + chunkGraph, + runtimeCondition, + runtime, + runtimeRequirements + }) { + if (runtimeCondition === undefined) return "true"; + if (typeof runtimeCondition === "boolean") return `${runtimeCondition}`; + /** @type {Set} */ + const positiveRuntimeIds = new Set(); + forEachRuntime(runtimeCondition, runtime => + positiveRuntimeIds.add(`${chunkGraph.getRuntimeId(runtime)}`) + ); + /** @type {Set} */ + const negativeRuntimeIds = new Set(); + forEachRuntime(subtractRuntime(runtime, runtimeCondition), runtime => + negativeRuntimeIds.add(`${chunkGraph.getRuntimeId(runtime)}`) + ); + runtimeRequirements.add(RuntimeGlobals.runtimeId); + return compileBooleanMatcher.fromLists( + Array.from(positiveRuntimeIds), + Array.from(negativeRuntimeIds) + )(RuntimeGlobals.runtimeId); + } + + /** + * + * @param {Object} options options object + * @param {boolean=} options.update whether a new variable should be created or the existing one updated + * @param {Module} options.module the module + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {string} options.request the request that should be printed as comment + * @param {string} options.importVar name of the import variable + * @param {Module} options.originModule module in which the statement is emitted + * @param {boolean=} options.weak true, if this is a weak dependency + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @returns {[string, string]} the import statement and the compat statement + */ + importStatement({ + update, + module, + chunkGraph, + request, + importVar, + originModule, + weak, + runtimeRequirements + }) { + if (!module) { + return [ + this.missingModuleStatement({ + request + }), + "" + ]; + } + if (chunkGraph.getModuleId(module) === null) { + if (weak) { + // only weak referenced modules don't get an id + // we can always emit an error emitting code here + return [ + this.weakError({ + module, + chunkGraph, + request, + type: "statements" + }), + "" + ]; + } + throw new Error( + `RuntimeTemplate.importStatement(): ${noModuleIdErrorMessage( + module, + chunkGraph + )}` + ); + } + const moduleId = this.moduleId({ + module, + chunkGraph, + request, + weak + }); + const optDeclaration = update ? "" : "var "; + + const exportsType = module.getExportsType( + chunkGraph.moduleGraph, + originModule.buildMeta.strictHarmonyModule + ); + runtimeRequirements.add(RuntimeGlobals.require); + const importContent = `/* harmony import */ ${optDeclaration}${importVar} = __webpack_require__(${moduleId});\n`; + + if (exportsType === "dynamic") { + runtimeRequirements.add(RuntimeGlobals.compatGetDefaultExport); + return [ + importContent, + `/* harmony import */ ${optDeclaration}${importVar}_default = /*#__PURE__*/${RuntimeGlobals.compatGetDefaultExport}(${importVar});\n` + ]; + } + return [importContent, ""]; + } + + /** + * @param {Object} options options + * @param {ModuleGraph} options.moduleGraph the module graph + * @param {Module} options.module the module + * @param {string} options.request the request + * @param {string | string[]} options.exportName the export name + * @param {Module} options.originModule the origin module + * @param {boolean|undefined} options.asiSafe true, if location is safe for ASI, a bracket can be emitted + * @param {boolean} options.isCall true, if expression will be called + * @param {boolean} options.callContext when false, call context will not be preserved + * @param {boolean} options.defaultInterop when true and accessing the default exports, interop code will be generated + * @param {string} options.importVar the identifier name of the import variable + * @param {InitFragment[]} options.initFragments init fragments will be added here + * @param {RuntimeSpec} options.runtime runtime for which this code will be generated + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @returns {string} expression + */ + exportFromImport({ + moduleGraph, + module, + request, + exportName, + originModule, + asiSafe, + isCall, + callContext, + defaultInterop, + importVar, + initFragments, + runtime, + runtimeRequirements + }) { + if (!module) { + return this.missingModule({ + request + }); + } + if (!Array.isArray(exportName)) { + exportName = exportName ? [exportName] : []; + } + const exportsType = module.getExportsType( + moduleGraph, + originModule.buildMeta.strictHarmonyModule + ); + + if (defaultInterop) { + if (exportName.length > 0 && exportName[0] === "default") { + switch (exportsType) { + case "dynamic": + if (isCall) { + return `${importVar}_default()${propertyAccess(exportName, 1)}`; + } else { + return asiSafe + ? `(${importVar}_default()${propertyAccess(exportName, 1)})` + : asiSafe === false + ? `;(${importVar}_default()${propertyAccess(exportName, 1)})` + : `${importVar}_default.a${propertyAccess(exportName, 1)}`; + } + case "default-only": + case "default-with-named": + exportName = exportName.slice(1); + break; + } + } else if (exportName.length > 0) { + if (exportsType === "default-only") { + return ( + "/* non-default import from non-esm module */undefined" + + propertyAccess(exportName, 1) + ); + } else if ( + exportsType !== "namespace" && + exportName[0] === "__esModule" + ) { + return "/* __esModule */true"; + } + } else if ( + exportsType === "default-only" || + exportsType === "default-with-named" + ) { + runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); + initFragments.push( + new InitFragment( + `var ${importVar}_namespace_cache;\n`, + InitFragment.STAGE_CONSTANTS, + -1, + `${importVar}_namespace_cache` + ) + ); + return `/*#__PURE__*/ ${ + asiSafe ? "" : asiSafe === false ? ";" : "Object" + }(${importVar}_namespace_cache || (${importVar}_namespace_cache = ${ + RuntimeGlobals.createFakeNamespaceObject + }(${importVar}${exportsType === "default-only" ? "" : ", 2"})))`; + } + } + + if (exportName.length > 0) { + const exportsInfo = moduleGraph.getExportsInfo(module); + const used = exportsInfo.getUsedName(exportName, runtime); + if (!used) { + const comment = Template.toNormalComment( + `unused export ${propertyAccess(exportName)}` + ); + return `${comment} undefined`; + } + const comment = equals(used, exportName) + ? "" + : Template.toNormalComment(propertyAccess(exportName)) + " "; + const access = `${importVar}${comment}${propertyAccess(used)}`; + if (isCall && callContext === false) { + return asiSafe + ? `(0,${access})` + : asiSafe === false + ? `;(0,${access})` + : `Object(${access})`; + } + return access; + } else { + return importVar; + } + } + + /** + * @param {Object} options options + * @param {AsyncDependenciesBlock} options.block the async block + * @param {string} options.message the message + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @returns {string} expression + */ + blockPromise({ block, message, chunkGraph, runtimeRequirements }) { + if (!block) { + const comment = this.comment({ + message + }); + return `Promise.resolve(${comment.trim()})`; + } + const chunkGroup = chunkGraph.getBlockChunkGroup(block); + if (!chunkGroup || chunkGroup.chunks.length === 0) { + const comment = this.comment({ + message + }); + return `Promise.resolve(${comment.trim()})`; + } + const chunks = chunkGroup.chunks.filter( + chunk => !chunk.hasRuntime() && chunk.id !== null + ); + const comment = this.comment({ + message, + chunkName: block.chunkName + }); + if (chunks.length === 1) { + const chunkId = JSON.stringify(chunks[0].id); + runtimeRequirements.add(RuntimeGlobals.ensureChunk); + return `${RuntimeGlobals.ensureChunk}(${comment}${chunkId})`; + } else if (chunks.length > 0) { + runtimeRequirements.add(RuntimeGlobals.ensureChunk); + const requireChunkId = chunk => + `${RuntimeGlobals.ensureChunk}(${JSON.stringify(chunk.id)})`; + return `Promise.all(${comment.trim()}[${chunks + .map(requireChunkId) + .join(", ")}])`; + } else { + return `Promise.resolve(${comment.trim()})`; + } + } + + /** + * @param {Object} options options + * @param {AsyncDependenciesBlock} options.block the async block + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @param {string=} options.request request string used originally + * @returns {string} expression + */ + asyncModuleFactory({ block, chunkGraph, runtimeRequirements, request }) { + const dep = block.dependencies[0]; + const module = chunkGraph.moduleGraph.getModule(dep); + const ensureChunk = this.blockPromise({ + block, + message: "", + chunkGraph, + runtimeRequirements + }); + const factory = this.returningFunction( + this.moduleRaw({ + module, + chunkGraph, + request, + runtimeRequirements + }) + ); + return this.returningFunction( + ensureChunk.startsWith("Promise.resolve(") + ? `${factory}` + : `${ensureChunk}.then(${this.returningFunction(factory)})` + ); + } + + /** + * @param {Object} options options + * @param {Dependency} options.dependency the dependency + * @param {ChunkGraph} options.chunkGraph the chunk graph + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @param {string=} options.request request string used originally + * @returns {string} expression + */ + syncModuleFactory({ dependency, chunkGraph, runtimeRequirements, request }) { + const module = chunkGraph.moduleGraph.getModule(dependency); + const factory = this.returningFunction( + this.moduleRaw({ + module, + chunkGraph, + request, + runtimeRequirements + }) + ); + return this.returningFunction(factory); + } + + /** + * @param {Object} options options + * @param {string} options.exportsArgument the name of the exports object + * @param {Set} options.runtimeRequirements if set, will be filled with runtime requirements + * @returns {string} statement + */ + defineEsModuleFlagStatement({ exportsArgument, runtimeRequirements }) { + runtimeRequirements.add(RuntimeGlobals.makeNamespaceObject); + runtimeRequirements.add(RuntimeGlobals.exports); + return `${RuntimeGlobals.makeNamespaceObject}(${exportsArgument});\n`; + } +} + +module.exports = RuntimeTemplate; + + +/***/ }), + +/***/ 17850: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +class SelfModuleFactory { + constructor(moduleGraph) { + this.moduleGraph = moduleGraph; + } + + create(data, callback) { + const module = this.moduleGraph.getParentModule(data.dependencies[0]); + callback(null, { + module + }); + } +} + +module.exports = SelfModuleFactory; + + +/***/ }), + +/***/ 50787: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + + +/** + * @param {number} size the size in bytes + * @returns {string} the formatted size + */ +exports.formatSize = size => { + if (typeof size !== "number" || Number.isNaN(size) === true) { + return "unknown size"; + } + + if (size <= 0) { + return "0 bytes"; + } + + const abbreviations = ["bytes", "KiB", "MiB", "GiB"]; + const index = Math.floor(Math.log(size) / Math.log(1024)); + + return `${+(size / Math.pow(1024, index)).toPrecision(3)} ${ + abbreviations[index] + }`; +}; + + +/***/ }), + +/***/ 5426: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const JavascriptModulesPlugin = __webpack_require__(80867); + +/** @typedef {import("./Compilation")} Compilation */ + +class SourceMapDevToolModuleOptionsPlugin { + constructor(options) { + this.options = options; + } + + /** + * @param {Compilation} compilation the compiler instance + * @returns {void} + */ + apply(compilation) { + const options = this.options; + if (options.module !== false) { + compilation.hooks.buildModule.tap( + "SourceMapDevToolModuleOptionsPlugin", + module => { + module.useSourceMap = true; + } + ); + compilation.hooks.runtimeModule.tap( + "SourceMapDevToolModuleOptionsPlugin", + module => { + module.useSourceMap = true; + } + ); + } else { + compilation.hooks.buildModule.tap( + "SourceMapDevToolModuleOptionsPlugin", + module => { + module.useSimpleSourceMap = true; + } + ); + compilation.hooks.runtimeModule.tap( + "SourceMapDevToolModuleOptionsPlugin", + module => { + module.useSimpleSourceMap = true; + } + ); + } + JavascriptModulesPlugin.getCompilationHooks(compilation).useSourceMap.tap( + "SourceMapDevToolModuleOptionsPlugin", + () => true + ); + } +} + +module.exports = SourceMapDevToolModuleOptionsPlugin; + + +/***/ }), + +/***/ 6280: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const { validate } = __webpack_require__(79286); +const { ConcatSource, RawSource } = __webpack_require__(55600); +const Compilation = __webpack_require__(75388); +const ModuleFilenameHelpers = __webpack_require__(79843); +const ProgressPlugin = __webpack_require__(19336); +const SourceMapDevToolModuleOptionsPlugin = __webpack_require__(5426); +const createHash = __webpack_require__(34627); +const { relative, dirname } = __webpack_require__(71593); +const { absolutify } = __webpack_require__(47779); + +const schema = __webpack_require__(62918); + +/** @typedef {import("source-map").RawSourceMap} SourceMap */ +/** @typedef {import("webpack-sources").MapOptions} MapOptions */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/plugins/SourceMapDevToolPlugin").SourceMapDevToolPluginOptions} SourceMapDevToolPluginOptions */ +/** @typedef {import("./Cache").Etag} Etag */ +/** @typedef {import("./CacheFacade").ItemCacheFacade} ItemCacheFacade */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./util/Hash")} Hash */ + +/** + * @typedef {object} SourceMapTask + * @property {Source} asset + * @property {AssetInfo} assetInfo + * @property {(string | Module)[]} modules + * @property {string} source + * @property {string} file + * @property {SourceMap} sourceMap + * @property {ItemCacheFacade} cacheItem cache item + */ + +/** + * Escapes regular expression metacharacters + * @param {string} str String to quote + * @returns {string} Escaped string + */ +const quoteMeta = str => { + return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&"); +}; + +/** + * Creating {@link SourceMapTask} for given file + * @param {string} file current compiled file + * @param {Source} asset the asset + * @param {AssetInfo} assetInfo the asset info + * @param {MapOptions} options source map options + * @param {Compilation} compilation compilation instance + * @param {ItemCacheFacade} cacheItem cache item + * @returns {SourceMapTask | undefined} created task instance or `undefined` + */ +const getTaskForFile = ( + file, + asset, + assetInfo, + options, + compilation, + cacheItem +) => { + let source; + /** @type {SourceMap} */ + let sourceMap; + /** + * Check if asset can build source map + */ + if (asset.sourceAndMap) { + const sourceAndMap = asset.sourceAndMap(options); + sourceMap = /** @type {SourceMap} */ (sourceAndMap.map); + source = sourceAndMap.source; + } else { + sourceMap = /** @type {SourceMap} */ (asset.map(options)); + source = asset.source(); + } + if (!sourceMap || typeof source !== "string") return; + const context = compilation.options.context; + const root = compilation.compiler.root; + const cachedAbsolutify = absolutify.bindContextCache(context, root); + const modules = sourceMap.sources.map(source => { + if (!source.startsWith("webpack://")) return source; + source = cachedAbsolutify(source.slice(10)); + const module = compilation.findModule(source); + return module || source; + }); + + return { + file, + asset, + source, + assetInfo, + sourceMap, + modules, + cacheItem + }; +}; + +class SourceMapDevToolPlugin { + /** + * @param {SourceMapDevToolPluginOptions} [options] options object + * @throws {Error} throws error, if got more than 1 arguments + */ + constructor(options = {}) { + validate(schema, options, { + name: "SourceMap DevTool Plugin", + baseDataPath: "options" + }); + + /** @type {string | false} */ + this.sourceMapFilename = options.filename; + /** @type {string | false} */ + this.sourceMappingURLComment = + options.append === false + ? false + : options.append || "\n//# source" + "MappingURL=[url]"; + /** @type {string | Function} */ + this.moduleFilenameTemplate = + options.moduleFilenameTemplate || "webpack://[namespace]/[resourcePath]"; + /** @type {string | Function} */ + this.fallbackModuleFilenameTemplate = + options.fallbackModuleFilenameTemplate || + "webpack://[namespace]/[resourcePath]?[hash]"; + /** @type {string} */ + this.namespace = options.namespace || ""; + /** @type {SourceMapDevToolPluginOptions} */ + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler compiler instance + * @returns {void} + */ + apply(compiler) { + const outputFs = compiler.outputFileSystem; + const sourceMapFilename = this.sourceMapFilename; + const sourceMappingURLComment = this.sourceMappingURLComment; + const moduleFilenameTemplate = this.moduleFilenameTemplate; + const namespace = this.namespace; + const fallbackModuleFilenameTemplate = this.fallbackModuleFilenameTemplate; + const requestShortener = compiler.requestShortener; + const options = this.options; + options.test = options.test || /\.(m?js|css)($|\?)/i; + + const matchObject = ModuleFilenameHelpers.matchObject.bind( + undefined, + options + ); + + compiler.hooks.compilation.tap("SourceMapDevToolPlugin", compilation => { + new SourceMapDevToolModuleOptionsPlugin(options).apply(compilation); + + compilation.hooks.processAssets.tapAsync( + { + name: "SourceMapDevToolPlugin", + stage: Compilation.PROCESS_ASSETS_STAGE_DEV_TOOLING, + additionalAssets: true + }, + (assets, callback) => { + const chunkGraph = compilation.chunkGraph; + const cache = compilation.getCache("SourceMapDevToolPlugin"); + /** @type {Map} */ + const moduleToSourceNameMapping = new Map(); + /** + * @type {Function} + * @returns {void} + */ + const reportProgress = + ProgressPlugin.getReporter(compilation.compiler) || (() => {}); + + /** @type {Map} */ + const fileToChunk = new Map(); + for (const chunk of compilation.chunks) { + for (const file of chunk.files) { + fileToChunk.set(file, chunk); + } + for (const file of chunk.auxiliaryFiles) { + fileToChunk.set(file, chunk); + } + } + + /** @type {string[]} */ + const files = []; + for (const file of Object.keys(assets)) { + if (matchObject(file)) { + files.push(file); + } + } + + reportProgress(0.0); + /** @type {SourceMapTask[]} */ + const tasks = []; + let fileIndex = 0; + + asyncLib.each( + files, + (file, callback) => { + const asset = compilation.getAsset(file); + if (asset.info.related && asset.info.related.sourceMap) { + fileIndex++; + return callback(); + } + const cacheItem = cache.getItemCache( + file, + cache.getLazyHashedEtag(asset.source) + ); + + cacheItem.get((err, cacheEntry) => { + if (err) { + return callback(err); + } + /** + * If presented in cache, reassigns assets. Cache assets already have source maps. + */ + if (cacheEntry) { + const { assets, assetsInfo } = cacheEntry; + for (const cachedFile of Object.keys(assets)) { + if (cachedFile === file) { + compilation.updateAsset( + cachedFile, + assets[cachedFile], + assetsInfo[cachedFile] + ); + } else { + compilation.emitAsset( + cachedFile, + assets[cachedFile], + assetsInfo[cachedFile] + ); + } + /** + * Add file to chunk, if not presented there + */ + if (cachedFile !== file) { + const chunk = fileToChunk.get(file); + if (chunk !== undefined) + chunk.auxiliaryFiles.add(cachedFile); + } + } + + reportProgress( + (0.5 * ++fileIndex) / files.length, + file, + "restored cached SourceMap" + ); + + return callback(); + } + + reportProgress( + (0.5 * fileIndex) / files.length, + file, + "generate SourceMap" + ); + + /** @type {SourceMapTask | undefined} */ + const task = getTaskForFile( + file, + asset.source, + asset.info, + { + module: options.module, + columns: options.columns + }, + compilation, + cacheItem + ); + + if (task) { + const modules = task.modules; + + for (let idx = 0; idx < modules.length; idx++) { + const module = modules[idx]; + if (!moduleToSourceNameMapping.get(module)) { + moduleToSourceNameMapping.set( + module, + ModuleFilenameHelpers.createFilename( + module, + { + moduleFilenameTemplate: moduleFilenameTemplate, + namespace: namespace + }, + { + requestShortener, + chunkGraph + } + ) + ); + } + } + + tasks.push(task); + } + + reportProgress( + (0.5 * ++fileIndex) / files.length, + file, + "generated SourceMap" + ); + + callback(); + }); + }, + err => { + if (err) { + return callback(err); + } + + reportProgress(0.5, "resolve sources"); + /** @type {Set} */ + const usedNamesSet = new Set(moduleToSourceNameMapping.values()); + /** @type {Set} */ + const conflictDetectionSet = new Set(); + + /** + * all modules in defined order (longest identifier first) + * @type {Array} + */ + const allModules = Array.from( + moduleToSourceNameMapping.keys() + ).sort((a, b) => { + const ai = typeof a === "string" ? a : a.identifier(); + const bi = typeof b === "string" ? b : b.identifier(); + return ai.length - bi.length; + }); + + // find modules with conflicting source names + for (let idx = 0; idx < allModules.length; idx++) { + const module = allModules[idx]; + let sourceName = moduleToSourceNameMapping.get(module); + let hasName = conflictDetectionSet.has(sourceName); + if (!hasName) { + conflictDetectionSet.add(sourceName); + continue; + } + + // try the fallback name first + sourceName = ModuleFilenameHelpers.createFilename( + module, + { + moduleFilenameTemplate: fallbackModuleFilenameTemplate, + namespace: namespace + }, + { + requestShortener, + chunkGraph + } + ); + hasName = usedNamesSet.has(sourceName); + if (!hasName) { + moduleToSourceNameMapping.set(module, sourceName); + usedNamesSet.add(sourceName); + continue; + } + + // otherwise just append stars until we have a valid name + while (hasName) { + sourceName += "*"; + hasName = usedNamesSet.has(sourceName); + } + moduleToSourceNameMapping.set(module, sourceName); + usedNamesSet.add(sourceName); + } + + let taskIndex = 0; + + asyncLib.each( + tasks, + (task, callback) => { + const assets = Object.create(null); + const assetsInfo = Object.create(null); + const file = task.file; + const chunk = fileToChunk.get(file); + const sourceMap = task.sourceMap; + const source = task.source; + const modules = task.modules; + + reportProgress( + 0.5 + (0.5 * taskIndex) / tasks.length, + file, + "attach SourceMap" + ); + + const moduleFilenames = modules.map(m => + moduleToSourceNameMapping.get(m) + ); + sourceMap.sources = moduleFilenames; + if (options.noSources) { + sourceMap.sourcesContent = undefined; + } + sourceMap.sourceRoot = options.sourceRoot || ""; + sourceMap.file = file; + const usesContentHash = + sourceMapFilename && + /\[contenthash(:\w+)?\]/.test(sourceMapFilename); + + // If SourceMap and asset uses contenthash, avoid a circular dependency by hiding hash in `file` + if (usesContentHash && task.assetInfo.contenthash) { + const contenthash = task.assetInfo.contenthash; + let pattern; + if (Array.isArray(contenthash)) { + pattern = contenthash.map(quoteMeta).join("|"); + } else { + pattern = quoteMeta(contenthash); + } + sourceMap.file = sourceMap.file.replace( + new RegExp(pattern, "g"), + m => "x".repeat(m.length) + ); + } + + /** @type {string | false} */ + let currentSourceMappingURLComment = sourceMappingURLComment; + if ( + currentSourceMappingURLComment !== false && + /\.css($|\?)/i.test(file) + ) { + currentSourceMappingURLComment = currentSourceMappingURLComment.replace( + /^\n\/\/(.*)$/, + "\n/*$1*/" + ); + } + const sourceMapString = JSON.stringify(sourceMap); + if (sourceMapFilename) { + let filename = file; + const sourceMapContentHash = + usesContentHash && + /** @type {string} */ (createHash("md4") + .update(sourceMapString) + .digest("hex")); + const pathParams = { + chunk, + filename: options.fileContext + ? relative( + outputFs, + `/${options.fileContext}`, + `/${filename}` + ) + : filename, + contentHash: sourceMapContentHash + }; + const { + path: sourceMapFile, + info: sourceMapInfo + } = compilation.getPathWithInfo( + sourceMapFilename, + pathParams + ); + const sourceMapUrl = options.publicPath + ? options.publicPath + sourceMapFile + : relative( + outputFs, + dirname(outputFs, `/${file}`), + `/${sourceMapFile}` + ); + /** @type {Source} */ + let asset = new RawSource(source); + if (currentSourceMappingURLComment !== false) { + // Add source map url to compilation asset, if currentSourceMappingURLComment is set + asset = new ConcatSource( + asset, + compilation.getPath( + currentSourceMappingURLComment, + Object.assign({ url: sourceMapUrl }, pathParams) + ) + ); + } + const assetInfo = { + related: { sourceMap: sourceMapFile } + }; + assets[file] = asset; + assetsInfo[file] = assetInfo; + compilation.updateAsset(file, asset, assetInfo); + // Add source map file to compilation assets and chunk files + const sourceMapAsset = new RawSource(sourceMapString); + const sourceMapAssetInfo = { + ...sourceMapInfo, + development: true + }; + assets[sourceMapFile] = sourceMapAsset; + assetsInfo[sourceMapFile] = sourceMapAssetInfo; + compilation.emitAsset( + sourceMapFile, + sourceMapAsset, + sourceMapAssetInfo + ); + if (chunk !== undefined) + chunk.auxiliaryFiles.add(sourceMapFile); + } else { + if (currentSourceMappingURLComment === false) { + throw new Error( + "SourceMapDevToolPlugin: append can't be false when no filename is provided" + ); + } + /** + * Add source map as data url to asset + */ + const asset = new ConcatSource( + new RawSource(source), + currentSourceMappingURLComment + .replace(/\[map\]/g, () => sourceMapString) + .replace( + /\[url\]/g, + () => + `data:application/json;charset=utf-8;base64,${Buffer.from( + sourceMapString, + "utf-8" + ).toString("base64")}` + ) + ); + assets[file] = asset; + assetsInfo[file] = undefined; + compilation.updateAsset(file, asset); + } + + task.cacheItem.store({ assets, assetsInfo }, err => { + reportProgress( + 0.5 + (0.5 * ++taskIndex) / tasks.length, + task.file, + "attached SourceMap" + ); + + if (err) { + return callback(err); + } + callback(); + }); + }, + err => { + reportProgress(1.0); + callback(err); + } + ); + } + ); + } + ); + }); + } +} + +module.exports = SourceMapDevToolPlugin; + + +/***/ }), + +/***/ 49487: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Compilation")} Compilation */ + +class Stats { + /** + * @param {Compilation} compilation webpack compilation + */ + constructor(compilation) { + this.compilation = compilation; + } + + get hash() { + return this.compilation.hash; + } + + get startTime() { + return this.compilation.startTime; + } + + get endTime() { + return this.compilation.endTime; + } + + /** + * @returns {boolean} true if the compilation had a warning + */ + hasWarnings() { + return ( + this.compilation.warnings.length > 0 || + this.compilation.children.some(child => child.getStats().hasWarnings()) + ); + } + + /** + * @returns {boolean} true if the compilation encountered an error + */ + hasErrors() { + return ( + this.compilation.errors.length > 0 || + this.compilation.children.some(child => child.getStats().hasErrors()) + ); + } + + toJson(options) { + options = this.compilation.createStatsOptions(options, { + forToString: false + }); + + const statsFactory = this.compilation.createStatsFactory(options); + + return statsFactory.create("compilation", this.compilation, { + compilation: this.compilation + }); + } + + toString(options) { + options = this.compilation.createStatsOptions(options, { + forToString: true + }); + + const statsFactory = this.compilation.createStatsFactory(options); + const statsPrinter = this.compilation.createStatsPrinter(options); + + const data = statsFactory.create("compilation", this.compilation, { + compilation: this.compilation + }); + const result = statsPrinter.print("compilation", data); + return result === undefined ? "" : result; + } +} + +module.exports = Stats; + + +/***/ }), + +/***/ 90751: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource, PrefixSource } = __webpack_require__(55600); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGraph")} ChunkGraph */ +/** @typedef {import("./CodeGenerationResults")} CodeGenerationResults */ +/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("./Compilation").PathData} PathData */ +/** @typedef {import("./DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./ModuleTemplate")} ModuleTemplate */ +/** @typedef {import("./ModuleTemplate").RenderContext} RenderContext */ +/** @typedef {import("./RuntimeModule")} RuntimeModule */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ + +const START_LOWERCASE_ALPHABET_CODE = "a".charCodeAt(0); +const START_UPPERCASE_ALPHABET_CODE = "A".charCodeAt(0); +const DELTA_A_TO_Z = "z".charCodeAt(0) - START_LOWERCASE_ALPHABET_CODE + 1; +const NUMBER_OF_IDENTIFIER_START_CHARS = DELTA_A_TO_Z * 2 + 2; // a-z A-Z _ $ +const NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = + NUMBER_OF_IDENTIFIER_START_CHARS + 10; // a-z A-Z _ $ 0-9 +const FUNCTION_CONTENT_REGEX = /^function\s?\(\)\s?\{\r?\n?|\r?\n?\}$/g; +const INDENT_MULTILINE_REGEX = /^\t/gm; +const LINE_SEPARATOR_REGEX = /\r?\n/g; +const IDENTIFIER_NAME_REPLACE_REGEX = /^([^a-zA-Z$_])/; +const IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX = /[^a-zA-Z0-9$]+/g; +const COMMENT_END_REGEX = /\*\//g; +const PATH_NAME_NORMALIZE_REPLACE_REGEX = /[^a-zA-Z0-9_!§$()=\-^°]+/g; +const MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g; + +/** + * @typedef {Object} RenderManifestOptions + * @property {Chunk} chunk the chunk used to render + * @property {string} hash + * @property {string} fullHash + * @property {OutputOptions} outputOptions + * @property {CodeGenerationResults} codeGenerationResults + * @property {{javascript: ModuleTemplate}} moduleTemplates + * @property {DependencyTemplates} dependencyTemplates + * @property {RuntimeTemplate} runtimeTemplate + * @property {ModuleGraph} moduleGraph + * @property {ChunkGraph} chunkGraph + */ + +/** @typedef {RenderManifestEntryTemplated | RenderManifestEntryStatic} RenderManifestEntry */ + +/** + * @typedef {Object} RenderManifestEntryTemplated + * @property {function(): Source} render + * @property {string | function(PathData, AssetInfo=): string} filenameTemplate + * @property {PathData=} pathOptions + * @property {AssetInfo=} info + * @property {string} identifier + * @property {string=} hash + * @property {boolean=} auxiliary + */ + +/** + * @typedef {Object} RenderManifestEntryStatic + * @property {function(): Source} render + * @property {string} filename + * @property {AssetInfo} info + * @property {string} identifier + * @property {string=} hash + * @property {boolean=} auxiliary + */ + +/** + * @typedef {Object} HasId + * @property {number | string} id + */ + +/** + * @typedef {function(Module, number): boolean} ModuleFilterPredicate + */ + +class Template { + /** + * + * @param {Function} fn a runtime function (.runtime.js) "template" + * @returns {string} the updated and normalized function string + */ + static getFunctionContent(fn) { + return fn + .toString() + .replace(FUNCTION_CONTENT_REGEX, "") + .replace(INDENT_MULTILINE_REGEX, "") + .replace(LINE_SEPARATOR_REGEX, "\n"); + } + + /** + * @param {string} str the string converted to identifier + * @returns {string} created identifier + */ + static toIdentifier(str) { + if (typeof str !== "string") return ""; + return str + .replace(IDENTIFIER_NAME_REPLACE_REGEX, "_$1") + .replace(IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX, "_"); + } + /** + * + * @param {string} str string to be converted to commented in bundle code + * @returns {string} returns a commented version of string + */ + static toComment(str) { + if (!str) return ""; + return `/*! ${str.replace(COMMENT_END_REGEX, "* /")} */`; + } + + /** + * + * @param {string} str string to be converted to "normal comment" + * @returns {string} returns a commented version of string + */ + static toNormalComment(str) { + if (!str) return ""; + return `/* ${str.replace(COMMENT_END_REGEX, "* /")} */`; + } + + /** + * @param {string} str string path to be normalized + * @returns {string} normalized bundle-safe path + */ + static toPath(str) { + if (typeof str !== "string") return ""; + return str + .replace(PATH_NAME_NORMALIZE_REPLACE_REGEX, "-") + .replace(MATCH_PADDED_HYPHENS_REPLACE_REGEX, ""); + } + + // map number to a single character a-z, A-Z or multiple characters if number is too big + /** + * @param {number} n number to convert to ident + * @returns {string} returns single character ident + */ + static numberToIdentifier(n) { + if (n >= NUMBER_OF_IDENTIFIER_START_CHARS) { + // use multiple letters + return ( + Template.numberToIdentifier(n % NUMBER_OF_IDENTIFIER_START_CHARS) + + Template.numberToIdentifierContinuation( + Math.floor(n / NUMBER_OF_IDENTIFIER_START_CHARS) + ) + ); + } + + // lower case + if (n < DELTA_A_TO_Z) { + return String.fromCharCode(START_LOWERCASE_ALPHABET_CODE + n); + } + n -= DELTA_A_TO_Z; + + // upper case + if (n < DELTA_A_TO_Z) { + return String.fromCharCode(START_UPPERCASE_ALPHABET_CODE + n); + } + + if (n === DELTA_A_TO_Z) return "_"; + return "$"; + } + + /** + * @param {number} n number to convert to ident + * @returns {string} returns single character ident + */ + static numberToIdentifierContinuation(n) { + if (n >= NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS) { + // use multiple letters + return ( + Template.numberToIdentifierContinuation( + n % NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS + ) + + Template.numberToIdentifierContinuation( + Math.floor(n / NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS) + ) + ); + } + + // lower case + if (n < DELTA_A_TO_Z) { + return String.fromCharCode(START_LOWERCASE_ALPHABET_CODE + n); + } + n -= DELTA_A_TO_Z; + + // upper case + if (n < DELTA_A_TO_Z) { + return String.fromCharCode(START_UPPERCASE_ALPHABET_CODE + n); + } + n -= DELTA_A_TO_Z; + + // numbers + if (n < 10) { + return `${n}`; + } + + if (n === 10) return "_"; + return "$"; + } + + /** + * + * @param {string | string[]} s string to convert to identity + * @returns {string} converted identity + */ + static indent(s) { + if (Array.isArray(s)) { + return s.map(Template.indent).join("\n"); + } else { + const str = s.trimRight(); + if (!str) return ""; + const ind = str[0] === "\n" ? "" : "\t"; + return ind + str.replace(/\n([^\n])/g, "\n\t$1"); + } + } + + /** + * + * @param {string|string[]} s string to create prefix for + * @param {string} prefix prefix to compose + * @returns {string} returns new prefix string + */ + static prefix(s, prefix) { + const str = Template.asString(s).trim(); + if (!str) return ""; + const ind = str[0] === "\n" ? "" : prefix; + return ind + str.replace(/\n([^\n])/g, "\n" + prefix + "$1"); + } + + /** + * + * @param {string|string[]} str string or string collection + * @returns {string} returns a single string from array + */ + static asString(str) { + if (Array.isArray(str)) { + return str.join("\n"); + } + return str; + } + + /** + * @typedef {Object} WithId + * @property {string|number} id + */ + + /** + * @param {WithId[]} modules a collection of modules to get array bounds for + * @returns {[number, number] | false} returns the upper and lower array bounds + * or false if not every module has a number based id + */ + static getModulesArrayBounds(modules) { + let maxId = -Infinity; + let minId = Infinity; + for (const module of modules) { + const moduleId = module.id; + if (typeof moduleId !== "number") return false; + if (maxId < moduleId) maxId = moduleId; + if (minId > moduleId) minId = moduleId; + } + if (minId < 16 + ("" + minId).length) { + // add minId x ',' instead of 'Array(minId).concat(…)' + minId = 0; + } + // start with -1 because the first module needs no comma + let objectOverhead = -1; + for (const module of modules) { + // module id + colon + comma + objectOverhead += `${module.id}`.length + 2; + } + // number of commas, or when starting non-zero the length of Array(minId).concat() + const arrayOverhead = minId === 0 ? maxId : 16 + `${minId}`.length + maxId; + return arrayOverhead < objectOverhead ? [minId, maxId] : false; + } + + /** + * @param {RenderContext} renderContext render context + * @param {Module[]} modules modules to render (should be ordered by identifier) + * @param {function(Module): Source} renderModule function to render a module + * @param {string=} prefix applying prefix strings + * @returns {Source} rendered chunk modules in a Source object + */ + static renderChunkModules(renderContext, modules, renderModule, prefix = "") { + const { chunkGraph } = renderContext; + var source = new ConcatSource(); + if (modules.length === 0) { + return null; + } + /** @type {{id: string|number, source: Source|string}[]} */ + const allModules = modules.map(module => { + return { + id: chunkGraph.getModuleId(module), + source: renderModule(module) || "false" + }; + }); + const bounds = Template.getModulesArrayBounds(allModules); + if (bounds) { + // Render a spare array + const minId = bounds[0]; + const maxId = bounds[1]; + if (minId !== 0) { + source.add(`Array(${minId}).concat(`); + } + source.add("[\n"); + /** @type {Map} */ + const modules = new Map(); + for (const module of allModules) { + modules.set(module.id, module); + } + for (let idx = minId; idx <= maxId; idx++) { + const module = modules.get(idx); + if (idx !== minId) { + source.add(",\n"); + } + source.add(`/* ${idx} */`); + if (module) { + source.add("\n"); + source.add(module.source); + } + } + source.add("\n" + prefix + "]"); + if (minId !== 0) { + source.add(")"); + } + } else { + // Render an object + source.add("{\n"); + for (let i = 0; i < allModules.length; i++) { + const module = allModules[i]; + if (i !== 0) { + source.add(",\n"); + } + source.add(`\n/***/ ${JSON.stringify(module.id)}:\n`); + source.add(module.source); + } + source.add(`\n\n${prefix}}`); + } + return source; + } + + /** + * @param {RuntimeModule[]} runtimeModules array of runtime modules in order + * @param {RenderContext} renderContext render context + * @returns {Source} rendered runtime modules in a Source object + */ + static renderRuntimeModules(runtimeModules, renderContext) { + const source = new ConcatSource(); + for (const module of runtimeModules) { + const codeGenResult = module.codeGeneration({ + chunkGraph: renderContext.chunkGraph, + dependencyTemplates: renderContext.dependencyTemplates, + moduleGraph: renderContext.moduleGraph, + runtimeTemplate: renderContext.runtimeTemplate, + runtime: renderContext.chunk.runtime + }); + if (codeGenResult) { + const moduleSource = codeGenResult.sources.get("runtime"); + if (moduleSource) { + source.add(Template.toNormalComment(module.identifier()) + "\n"); + if (!module.shouldIsolate()) { + source.add(moduleSource); + } else if (renderContext.runtimeTemplate.supportsArrowFunction()) { + source.add("(() => {\n"); + source.add(new PrefixSource("\t", moduleSource)); + source.add("\n})();\n\n"); + } else { + source.add("!function() {\n"); + source.add(new PrefixSource("\t", moduleSource)); + source.add("\n}();\n\n"); + } + } + } + } + return source; + } + + /** + * @param {RuntimeModule[]} runtimeModules array of runtime modules in order + * @param {RenderContext} renderContext render context + * @returns {Source} rendered chunk runtime modules in a Source object + */ + static renderChunkRuntimeModules(runtimeModules, renderContext) { + return new PrefixSource( + "/******/ ", + new ConcatSource( + "function(__webpack_require__) { // webpackRuntimeModules\n", + '\t"use strict";\n\n', + new PrefixSource( + "\t", + this.renderRuntimeModules(runtimeModules, renderContext) + ), + "}\n" + ) + ); + } +} + +module.exports = Template; +module.exports.NUMBER_OF_IDENTIFIER_START_CHARS = NUMBER_OF_IDENTIFIER_START_CHARS; +module.exports.NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS; + + +/***/ }), + +/***/ 64519: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Jason Anderson @diurnalist +*/ + + + +const { basename, extname } = __webpack_require__(85622); +const util = __webpack_require__(31669); +const Chunk = __webpack_require__(92787); +const Module = __webpack_require__(54031); +const { parseResource } = __webpack_require__(47779); + +/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("./Compilation").PathData} PathData */ +/** @typedef {import("./Compiler")} Compiler */ + +const REGEXP = /\[\\*([\w:]+)\\*\]/gi; + +const prepareId = id => { + if (typeof id !== "string") return id; + + if (/^"\s\+*.*\+\s*"$/.test(id)) { + const match = /^"\s\+*\s*(.*)\s*\+\s*"$/.exec(id); + + return `" + (${match[1]} + "").replace(/(^[.-]|[^a-zA-Z0-9_-])+/g, "_") + "`; + } + + return id.replace(/(^[.-]|[^a-zA-Z0-9_-])+/g, "_"); +}; + +const hashLength = (replacer, handler, assetInfo, hashName) => { + const fn = (match, arg, input) => { + let result; + const length = arg && parseInt(arg, 10); + + if (length && handler) { + result = handler(length); + } else { + const hash = replacer(match, arg, input); + + result = length ? hash.slice(0, length) : hash; + } + if (assetInfo) { + assetInfo.immutable = true; + if (Array.isArray(assetInfo[hashName])) { + assetInfo[hashName] = [...assetInfo[hashName], result]; + } else if (assetInfo[hashName]) { + assetInfo[hashName] = [assetInfo[hashName], result]; + } else { + assetInfo[hashName] = result; + } + } + return result; + }; + + return fn; +}; + +const replacer = (value, allowEmpty) => { + const fn = (match, arg, input) => { + if (typeof value === "function") { + value = value(); + } + if (value === null || value === undefined) { + if (!allowEmpty) { + throw new Error( + `Path variable ${match} not implemented in this context: ${input}` + ); + } + + return ""; + } else { + return `${value}`; + } + }; + + return fn; +}; + +const deprecationCache = new Map(); +const deprecatedFunction = (() => () => {})(); +const deprecated = (fn, message, code) => { + let d = deprecationCache.get(message); + if (d === undefined) { + d = util.deprecate(deprecatedFunction, message, code); + deprecationCache.set(message, d); + } + return (...args) => { + d(); + return fn(...args); + }; +}; + +/** + * @param {string | function(PathData, AssetInfo=): string} path the raw path + * @param {PathData} data context data + * @param {AssetInfo} assetInfo extra info about the asset (will be written to) + * @returns {string} the interpolated path + */ +const replacePathVariables = (path, data, assetInfo) => { + const chunkGraph = data.chunkGraph; + + /** @type {Map} */ + const replacements = new Map(); + + // Filename context + // + // Placeholders + // + // for /some/path/file.js?query#fragment: + // [file] - /some/path/file.js + // [query] - ?query + // [fragment] - #fragment + // [base] - file.js + // [path] - /some/path/ + // [name] - file + // [ext] - .js + if (data.filename) { + if (typeof data.filename === "string") { + const { path: file, query, fragment } = parseResource(data.filename); + + const ext = extname(file); + const base = basename(file); + const name = base.slice(0, base.length - ext.length); + const path = file.slice(0, file.length - base.length); + + replacements.set("file", replacer(file)); + replacements.set("query", replacer(query, true)); + replacements.set("fragment", replacer(fragment, true)); + replacements.set("path", replacer(path, true)); + replacements.set("base", replacer(base)); + replacements.set("name", replacer(name)); + replacements.set("ext", replacer(ext, true)); + // Legacy + replacements.set( + "filebase", + deprecated( + replacer(base), + "[filebase] is now [base]", + "DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_FILENAME" + ) + ); + } + } + + // Compilation context + // + // Placeholders + // + // [fullhash] - data.hash (3a4b5c6e7f) + // + // Legacy Placeholders + // + // [hash] - data.hash (3a4b5c6e7f) + if (data.hash) { + const hashReplacer = hashLength( + replacer(data.hash), + data.hashWithLength, + assetInfo, + "fullhash" + ); + + replacements.set("fullhash", hashReplacer); + + // Legacy + replacements.set( + "hash", + deprecated( + hashReplacer, + "[hash] is now [fullhash] (also consider using [chunkhash] or [contenthash], see documentation for details)", + "DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_HASH" + ) + ); + } + + // Chunk Context + // + // Placeholders + // + // [id] - chunk.id (0.js) + // [name] - chunk.name (app.js) + // [chunkhash] - chunk.hash (7823t4t4.js) + // [contenthash] - chunk.contentHash[type] (3256u3zg.js) + if (data.chunk) { + const chunk = data.chunk; + + const contentHashType = data.contentHashType; + + const idReplacer = replacer(chunk.id); + const nameReplacer = replacer(chunk.name || chunk.id); + const chunkhashReplacer = hashLength( + replacer(chunk instanceof Chunk ? chunk.renderedHash : chunk.hash), + "hashWithLength" in chunk ? chunk.hashWithLength : undefined, + assetInfo, + "chunkhash" + ); + const contenthashReplacer = hashLength( + replacer( + data.contentHash || + (contentHashType && + chunk.contentHash && + chunk.contentHash[contentHashType]) + ), + data.contentHashWithLength || + ("contentHashWithLength" in chunk && chunk.contentHashWithLength + ? chunk.contentHashWithLength[contentHashType] + : undefined), + assetInfo, + "contenthash" + ); + + replacements.set("id", idReplacer); + replacements.set("name", nameReplacer); + replacements.set("chunkhash", chunkhashReplacer); + replacements.set("contenthash", contenthashReplacer); + } + + // Module Context + // + // Placeholders + // + // [id] - module.id (2.png) + // [hash] - module.hash (6237543873.png) + // + // Legacy Placeholders + // + // [moduleid] - module.id (2.png) + // [modulehash] - module.hash (6237543873.png) + if (data.module) { + const module = data.module; + + const idReplacer = replacer(() => + prepareId( + module instanceof Module ? chunkGraph.getModuleId(module) : module.id + ) + ); + const moduleHashReplacer = hashLength( + replacer(() => + module instanceof Module + ? chunkGraph.getRenderedModuleHash(module, data.runtime) + : module.hash + ), + "hashWithLength" in module ? module.hashWithLength : undefined, + assetInfo, + "modulehash" + ); + const contentHashReplacer = hashLength( + replacer(data.contentHash), + undefined, + assetInfo, + "contenthash" + ); + + replacements.set("id", idReplacer); + replacements.set("modulehash", moduleHashReplacer); + replacements.set("contenthash", contentHashReplacer); + replacements.set( + "hash", + data.contentHash ? contentHashReplacer : moduleHashReplacer + ); + // Legacy + replacements.set( + "moduleid", + deprecated( + idReplacer, + "[moduleid] is now [id]", + "DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_MODULE_ID" + ) + ); + } + + // Other things + if (data.url) { + replacements.set("url", replacer(data.url)); + } + if (typeof data.runtime === "string") { + replacements.set( + "runtime", + replacer(() => prepareId(data.runtime)) + ); + } else { + replacements.set("runtime", replacer("_")); + } + + if (typeof path === "function") { + path = path(data, assetInfo); + } + + path = path.replace(REGEXP, (match, content) => { + if (content.length + 2 === match.length) { + const contentMatch = /^(\w+)(?::(\w+))?$/.exec(content); + if (!contentMatch) return match; + const [, kind, arg] = contentMatch; + const replacer = replacements.get(kind); + if (replacer !== undefined) { + return replacer(match, arg, path); + } + } else if (match.startsWith("[\\") && match.endsWith("\\]")) { + return `[${match.slice(2, -2)}]`; + } + return match; + }); + + return path; +}; + +const plugin = "TemplatedPathPlugin"; + +class TemplatedPathPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap(plugin, compilation => { + compilation.hooks.assetPath.tap(plugin, replacePathVariables); + }); + } +} + +module.exports = TemplatedPathPlugin; + + +/***/ }), + +/***/ 55467: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const WebpackError = __webpack_require__(24274); +const makeSerializable = __webpack_require__(55575); + +class UnhandledSchemeError extends WebpackError { + /** + * @param {string} scheme scheme + * @param {string} resource resource + */ + constructor(scheme, resource) { + super( + `Reading from "${resource}" is not handled by plugins (Unhandled scheme).` + + '\nWebpack supports "data:" and "file:" URIs by default.' + + `\nYou may need an additional plugin to handle "${scheme}:" URIs.` + ); + this.file = resource; + this.name = "UnhandledSchemeError"; + } +} + +makeSerializable( + UnhandledSchemeError, + "webpack/lib/UnhandledSchemeError", + "UnhandledSchemeError" +); + +module.exports = UnhandledSchemeError; + + +/***/ }), + +/***/ 61809: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ + +class UnsupportedFeatureWarning extends WebpackError { + /** + * @param {string} message description of warning + * @param {DependencyLocation} loc location start and end positions of the module + */ + constructor(message, loc) { + super(message); + + this.name = "UnsupportedFeatureWarning"; + this.loc = loc; + this.hideStack = true; + + Error.captureStackTrace(this, this.constructor); + } +} + +makeSerializable( + UnsupportedFeatureWarning, + "webpack/lib/UnsupportedFeatureWarning" +); + +module.exports = UnsupportedFeatureWarning; + + +/***/ }), + +/***/ 58594: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ConstDependency = __webpack_require__(9364); + +/** @typedef {import("./Compiler")} Compiler */ + +class UseStrictPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "UseStrictPlugin", + (compilation, { normalModuleFactory }) => { + const handler = parser => { + parser.hooks.program.tap("UseStrictPlugin", ast => { + const firstNode = ast.body[0]; + if ( + firstNode && + firstNode.type === "ExpressionStatement" && + firstNode.expression.type === "Literal" && + firstNode.expression.value === "use strict" + ) { + // Remove "use strict" expression. It will be added later by the renderer again. + // This is necessary in order to not break the strict mode when webpack prepends code. + // @see https://github.com/webpack/webpack/issues/1970 + const dep = new ConstDependency("", firstNode.range); + dep.loc = firstNode.loc; + parser.state.module.addPresentationalDependency(dep); + parser.state.module.buildInfo.strict = true; + } + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("UseStrictPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("UseStrictPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("UseStrictPlugin", handler); + } + ); + } +} + +module.exports = UseStrictPlugin; + + +/***/ }), + +/***/ 74996: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const CaseSensitiveModulesWarning = __webpack_require__(60595); + +/** @typedef {import("./Compiler")} Compiler */ + +class WarnCaseSensitiveModulesPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "WarnCaseSensitiveModulesPlugin", + compilation => { + compilation.hooks.seal.tap("WarnCaseSensitiveModulesPlugin", () => { + const moduleWithoutCase = new Map(); + for (const module of compilation.modules) { + const identifier = module.identifier().toLowerCase(); + const array = moduleWithoutCase.get(identifier); + if (array) { + array.push(module); + } else { + moduleWithoutCase.set(identifier, [module]); + } + } + for (const pair of moduleWithoutCase) { + const array = pair[1]; + if (array.length > 1) { + compilation.warnings.push( + new CaseSensitiveModulesWarning(array, compilation.moduleGraph) + ); + } + } + }); + } + ); + } +} + +module.exports = WarnCaseSensitiveModulesPlugin; + + +/***/ }), + +/***/ 16504: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./Compiler")} Compiler */ + +class WarnDeprecatedOptionPlugin { + /** + * Create an instance of the plugin + * @param {string} option the target option + * @param {string | number} value the deprecated option value + * @param {string} suggestion the suggestion replacement + */ + constructor(option, value, suggestion) { + this.option = option; + this.value = value; + this.suggestion = suggestion; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "WarnDeprecatedOptionPlugin", + compilation => { + compilation.warnings.push( + new DeprecatedOptionWarning(this.option, this.value, this.suggestion) + ); + } + ); + } +} + +class DeprecatedOptionWarning extends WebpackError { + constructor(option, value, suggestion) { + super(); + + this.name = "DeprecatedOptionWarning"; + this.message = + "configuration\n" + + `The value '${value}' for option '${option}' is deprecated. ` + + `Use '${suggestion}' instead.`; + + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = WarnDeprecatedOptionPlugin; + + +/***/ }), + +/***/ 25147: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const NoModeWarning = __webpack_require__(35722); + +/** @typedef {import("./Compiler")} Compiler */ + +class WarnNoModeSetPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap("WarnNoModeSetPlugin", compilation => { + compilation.warnings.push(new NoModeWarning()); + }); + } +} + +module.exports = WarnNoModeSetPlugin; + + +/***/ }), + +/***/ 18956: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(83451); + +/** @typedef {import("../declarations/plugins/WatchIgnorePlugin").WatchIgnorePluginOptions} WatchIgnorePluginOptions */ +/** @typedef {import("./Compiler")} Compiler */ + +const IGNORE_TIME_ENTRY = "ignore"; + +class IgnoringWatchFileSystem { + constructor(wfs, paths) { + this.wfs = wfs; + this.paths = paths; + } + + watch(files, dirs, missing, startTime, options, callback, callbackUndelayed) { + files = Array.from(files); + dirs = Array.from(dirs); + const ignored = path => + this.paths.some(p => + p instanceof RegExp ? p.test(path) : path.indexOf(p) === 0 + ); + + const notIgnored = path => !ignored(path); + + const ignoredFiles = files.filter(ignored); + const ignoredDirs = dirs.filter(ignored); + + const watcher = this.wfs.watch( + files.filter(notIgnored), + dirs.filter(notIgnored), + missing, + startTime, + options, + (err, fileTimestamps, dirTimestamps, changedFiles, removedFiles) => { + if (err) return callback(err); + for (const path of ignoredFiles) { + fileTimestamps.set(path, IGNORE_TIME_ENTRY); + } + + for (const path of ignoredDirs) { + dirTimestamps.set(path, IGNORE_TIME_ENTRY); + } + + callback( + err, + fileTimestamps, + dirTimestamps, + changedFiles, + removedFiles + ); + }, + callbackUndelayed + ); + + return { + close: () => watcher.close(), + pause: () => watcher.pause(), + getContextTimeInfoEntries: () => { + const dirTimestamps = watcher.getContextInfoEntries(); + for (const path of ignoredDirs) { + dirTimestamps.set(path, IGNORE_TIME_ENTRY); + } + return dirTimestamps; + }, + getFileTimeInfoEntries: () => { + const fileTimestamps = watcher.getFileTimeInfoEntries(); + for (const path of ignoredFiles) { + fileTimestamps.set(path, IGNORE_TIME_ENTRY); + } + return fileTimestamps; + } + }; + } +} + +class WatchIgnorePlugin { + /** + * @param {WatchIgnorePluginOptions} options options + */ + constructor(options) { + validate(schema, options, { + name: "Watch Ignore Plugin", + baseDataPath: "options" + }); + this.paths = options.paths; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.afterEnvironment.tap("WatchIgnorePlugin", () => { + compiler.watchFileSystem = new IgnoringWatchFileSystem( + compiler.watchFileSystem, + this.paths + ); + }); + } +} + +module.exports = WatchIgnorePlugin; + + +/***/ }), + +/***/ 52807: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Stats = __webpack_require__(49487); + +/** @typedef {import("../declarations/WebpackOptions").WatchOptions} WatchOptions */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./Compiler")} Compiler */ + +/** + * @template T + * @callback Callback + * @param {Error=} err + * @param {T=} result + */ + +class Watching { + /** + * @param {Compiler} compiler the compiler + * @param {WatchOptions} watchOptions options + * @param {Callback} handler completion handler + */ + constructor(compiler, watchOptions, handler) { + this.startTime = null; + this.invalid = false; + this.handler = handler; + /** @type {Callback[]} */ + this.callbacks = []; + /** @type {Callback[] | undefined} */ + this._closeCallbacks = undefined; + this.closed = false; + this.suspended = false; + if (typeof watchOptions === "number") { + this.watchOptions = { + aggregateTimeout: watchOptions + }; + } else if (watchOptions && typeof watchOptions === "object") { + this.watchOptions = { ...watchOptions }; + } else { + this.watchOptions = {}; + } + if (typeof this.watchOptions.aggregateTimeout !== "number") { + this.watchOptions.aggregateTimeout = 200; + } + this.compiler = compiler; + this.running = true; + this.watcher = undefined; + this.pausedWatcher = undefined; + this._done = this._done.bind(this); + this.compiler.readRecords(err => { + if (err) return this._done(err); + + this._go(); + }); + } + + _go() { + this.startTime = Date.now(); + this.running = true; + this.invalid = false; + const run = () => { + this.compiler.hooks.watchRun.callAsync(this.compiler, err => { + if (err) return this._done(err); + const onCompiled = (err, compilation) => { + if (err) return this._done(err, compilation); + if (this.invalid) return this._done(); + + if (this.compiler.hooks.shouldEmit.call(compilation) === false) { + return this._done(null, compilation); + } + + process.nextTick(() => { + const logger = compilation.getLogger("webpack.Compiler"); + logger.time("emitAssets"); + this.compiler.emitAssets(compilation, err => { + logger.timeEnd("emitAssets"); + if (err) return this._done(err, compilation); + if (this.invalid) return this._done(null, compilation); + + logger.time("emitRecords"); + this.compiler.emitRecords(err => { + logger.timeEnd("emitRecords"); + if (err) return this._done(err, compilation); + + if (compilation.hooks.needAdditionalPass.call()) { + compilation.needAdditionalPass = true; + + compilation.startTime = this.startTime; + compilation.endTime = Date.now(); + logger.time("done hook"); + const stats = new Stats(compilation); + this.compiler.hooks.done.callAsync(stats, err => { + logger.timeEnd("done hook"); + if (err) return this._done(err, compilation); + + this.compiler.hooks.additionalPass.callAsync(err => { + if (err) return this._done(err, compilation); + this.compiler.compile(onCompiled); + }); + }); + return; + } + return this._done(null, compilation); + }); + }); + }); + }; + this.compiler.compile(onCompiled); + }); + }; + + if (this.compiler.idle) { + this.compiler.cache.endIdle(err => { + if (err) return this._done(err); + this.compiler.idle = false; + run(); + }); + } else { + run(); + } + } + + /** + * @param {Compilation} compilation the compilation + * @returns {Stats} the compilation stats + */ + _getStats(compilation) { + const stats = new Stats(compilation); + return stats; + } + + /** + * @param {Error=} err an optional error + * @param {Compilation=} compilation the compilation + * @returns {void} + */ + _done(err, compilation) { + this.running = false; + + const logger = compilation && compilation.getLogger("webpack.Watching"); + + let stats = null; + + const handleError = err => { + this.compiler.hooks.failed.call(err); + this.compiler.cache.beginIdle(); + this.compiler.idle = true; + this.handler(err, stats); + for (const cb of this.callbacks) cb(); + this.callbacks.length = 0; + }; + + if (this.invalid) { + if (compilation) { + logger.time("storeBuildDependencies"); + this.compiler.cache.storeBuildDependencies( + compilation.buildDependencies, + err => { + logger.timeEnd("storeBuildDependencies"); + if (err) return handleError(err); + this._go(); + } + ); + } else { + this._go(); + } + return; + } + + if (compilation) { + compilation.startTime = this.startTime; + compilation.endTime = Date.now(); + stats = new Stats(compilation); + } + if (err) return handleError(err); + + logger.time("done hook"); + this.compiler.hooks.done.callAsync(stats, err => { + logger.timeEnd("done hook"); + if (err) return handleError(err); + this.handler(null, stats); + logger.time("storeBuildDependencies"); + this.compiler.cache.storeBuildDependencies( + compilation.buildDependencies, + err => { + logger.timeEnd("storeBuildDependencies"); + if (err) return handleError(err); + logger.time("beginIdle"); + this.compiler.cache.beginIdle(); + this.compiler.idle = true; + logger.timeEnd("beginIdle"); + process.nextTick(() => { + if (!this.closed) { + this.watch( + compilation.fileDependencies, + compilation.contextDependencies, + compilation.missingDependencies + ); + } + }); + for (const cb of this.callbacks) cb(); + this.callbacks.length = 0; + this.compiler.hooks.afterDone.call(stats); + } + ); + }); + } + + /** + * @param {Iterable} files watched files + * @param {Iterable} dirs watched directories + * @param {Iterable} missing watched existence entries + * @returns {void} + */ + watch(files, dirs, missing) { + this.pausedWatcher = null; + this.watcher = this.compiler.watchFileSystem.watch( + files, + dirs, + missing, + this.startTime, + this.watchOptions, + ( + err, + fileTimeInfoEntries, + contextTimeInfoEntries, + changedFiles, + removedFiles + ) => { + this.pausedWatcher = this.watcher; + this.watcher = null; + if (err) { + this.compiler.modifiedFiles = undefined; + this.compiler.removedFiles = undefined; + this.compiler.fileTimestamps = undefined; + this.compiler.contextTimestamps = undefined; + return this.handler(err); + } + this.compiler.fileTimestamps = fileTimeInfoEntries; + this.compiler.contextTimestamps = contextTimeInfoEntries; + this.compiler.removedFiles = removedFiles; + this.compiler.modifiedFiles = changedFiles; + if (!this.suspended) { + this._invalidate(); + } + }, + (fileName, changeTime) => { + this.compiler.hooks.invalid.call(fileName, changeTime); + } + ); + } + + /** + * @param {Callback=} callback signals when the build has completed again + * @returns {void} + */ + invalidate(callback) { + if (callback) { + this.callbacks.push(callback); + } + if (this.watcher) { + this.compiler.modifiedFiles = this.watcher.aggregatedChanges; + this.compiler.removedFiles = this.watcher.aggregatedRemovals; + this.compiler.fileTimestamps = this.watcher.getFileTimeInfoEntries(); + this.compiler.contextTimestamps = this.watcher.getContextTimeInfoEntries(); + } + this.compiler.hooks.invalid.call(null, Date.now()); + this._invalidate(); + } + + _invalidate() { + if (this.watcher) { + this.pausedWatcher = this.watcher; + this.watcher.pause(); + this.watcher = null; + } + + if (this.running) { + this.invalid = true; + } else { + this._go(); + } + } + + suspend() { + this.suspended = true; + this.invalid = false; + } + + resume() { + if (this.suspended) { + this.suspended = false; + this._invalidate(); + } + } + + /** + * @param {Callback} callback signals when the watcher is closed + * @returns {void} + */ + close(callback) { + if (this._closeCallbacks) { + if (callback) { + this._closeCallbacks.push(callback); + } + return; + } + const finalCallback = (err, compilation) => { + this.running = false; + this.compiler.running = false; + this.compiler.watching = undefined; + this.compiler.watchMode = false; + this.compiler.modifiedFiles = undefined; + this.compiler.removedFiles = undefined; + this.compiler.fileTimestamps = undefined; + this.compiler.contextTimestamps = undefined; + const shutdown = () => { + this.compiler.cache.shutdown(err => { + this.compiler.hooks.watchClose.call(); + const closeCallbacks = this._closeCallbacks; + this._closeCallbacks = undefined; + for (const cb of closeCallbacks) cb(err); + }); + }; + if (compilation) { + const logger = compilation.getLogger("webpack.Watching"); + logger.time("storeBuildDependencies"); + this.compiler.cache.storeBuildDependencies( + compilation.buildDependencies, + err => { + logger.timeEnd("storeBuildDependencies"); + shutdown(); + } + ); + } else { + shutdown(); + } + }; + + this.closed = true; + if (this.watcher) { + this.watcher.close(); + this.watcher = null; + } + if (this.pausedWatcher) { + this.pausedWatcher.close(); + this.pausedWatcher = null; + } + this._closeCallbacks = []; + if (callback) { + this._closeCallbacks.push(callback); + } + if (this.running) { + this.invalid = true; + this._done = finalCallback; + } else { + finalCallback(); + } + } +} + +module.exports = Watching; + + +/***/ }), + +/***/ 24274: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Jarid Margolin @jaridmargolin +*/ + + + +const inspect = __webpack_require__(31669).inspect.custom; +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Module")} Module */ + +class WebpackError extends Error { + /** + * Creates an instance of WebpackError. + * @param {string=} message error message + */ + constructor(message) { + super(message); + + this.details = undefined; + /** @type {Module} */ + this.module = undefined; + /** @type {DependencyLocation} */ + this.loc = undefined; + /** @type {boolean} */ + this.hideStack = undefined; + /** @type {Chunk} */ + this.chunk = undefined; + /** @type {string} */ + this.file = undefined; + + Error.captureStackTrace(this, this.constructor); + } + + [inspect]() { + return this.stack + (this.details ? `\n${this.details}` : ""); + } + + serialize({ write }) { + write(this.name); + write(this.message); + write(this.stack); + write(this.details); + write(this.loc); + write(this.hideStack); + } + + deserialize({ read }) { + this.name = read(); + this.message = read(); + this.stack = read(); + this.details = read(); + this.loc = read(); + this.hideStack = read(); + } +} + +makeSerializable(WebpackError, "webpack/lib/WebpackError"); + +module.exports = WebpackError; + + +/***/ }), + +/***/ 8185: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const OptionsApply = __webpack_require__(75936); + +const AssetModulesPlugin = __webpack_require__(22833); +const JavascriptModulesPlugin = __webpack_require__(80867); +const JsonModulesPlugin = __webpack_require__(90578); + +const ChunkPrefetchPreloadPlugin = __webpack_require__(29184); + +const EntryOptionPlugin = __webpack_require__(97235); +const RecordIdsPlugin = __webpack_require__(19464); + +const RuntimePlugin = __webpack_require__(22496); + +const APIPlugin = __webpack_require__(30823); +const CompatibilityPlugin = __webpack_require__(94701); +const ConstPlugin = __webpack_require__(26899); +const ExportsInfoApiPlugin = __webpack_require__(71406); + +const TemplatedPathPlugin = __webpack_require__(64519); +const UseStrictPlugin = __webpack_require__(58594); +const WarnCaseSensitiveModulesPlugin = __webpack_require__(74996); + +const DataUriPlugin = __webpack_require__(95549); +const FileUriPlugin = __webpack_require__(58556); + +const ResolverCachePlugin = __webpack_require__(52607); + +const CommonJsPlugin = __webpack_require__(2900); +const HarmonyModulesPlugin = __webpack_require__(1961); +const ImportMetaPlugin = __webpack_require__(24952); +const ImportPlugin = __webpack_require__(35890); +const LoaderPlugin = __webpack_require__(25844); +const RequireContextPlugin = __webpack_require__(69318); +const RequireEnsurePlugin = __webpack_require__(42749); +const RequireIncludePlugin = __webpack_require__(73924); +const SystemPlugin = __webpack_require__(37200); +const URLPlugin = __webpack_require__(16091); + +const InferAsyncModulesPlugin = __webpack_require__(17301); + +const FlagUsingEvalPlugin = __webpack_require__(18755); +const DefaultStatsFactoryPlugin = __webpack_require__(5798); +const DefaultStatsPresetPlugin = __webpack_require__(64817); +const DefaultStatsPrinterPlugin = __webpack_require__(62261); + +const { cleverMerge } = __webpack_require__(92700); + +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("./Compiler")} Compiler */ + +class WebpackOptionsApply extends OptionsApply { + constructor() { + super(); + } + + /** + * @param {WebpackOptions} options options object + * @param {Compiler} compiler compiler object + * @returns {WebpackOptions} options object + */ + process(options, compiler) { + compiler.outputPath = options.output.path; + compiler.recordsInputPath = options.recordsInputPath || null; + compiler.recordsOutputPath = options.recordsOutputPath || null; + compiler.name = options.name; + + if (options.externalsPresets.node) { + const NodeTargetPlugin = __webpack_require__(62791); + new NodeTargetPlugin().apply(compiler); + } + if (options.externalsPresets.electronMain) { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const ElectronTargetPlugin = __webpack_require__(27583); + new ElectronTargetPlugin("main").apply(compiler); + } + if (options.externalsPresets.electronPreload) { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const ElectronTargetPlugin = __webpack_require__(27583); + new ElectronTargetPlugin("preload").apply(compiler); + } + if (options.externalsPresets.electronRenderer) { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const ElectronTargetPlugin = __webpack_require__(27583); + new ElectronTargetPlugin("renderer").apply(compiler); + } + if ( + options.externalsPresets.electron && + !options.externalsPresets.electronMain && + !options.externalsPresets.electronPreload && + !options.externalsPresets.electronRenderer + ) { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const ElectronTargetPlugin = __webpack_require__(27583); + new ElectronTargetPlugin().apply(compiler); + } + if (options.externalsPresets.nwjs) { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const ExternalsPlugin = __webpack_require__(19056); + new ExternalsPlugin("commonjs", "nw.gui").apply(compiler); + } + if (options.externalsPresets.webAsync) { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const ExternalsPlugin = __webpack_require__(19056); + new ExternalsPlugin("import", /^(https?:\/\/|std:)/).apply(compiler); + } else if (options.externalsPresets.web) { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const ExternalsPlugin = __webpack_require__(19056); + new ExternalsPlugin("module", /^(https?:\/\/|std:)/).apply(compiler); + } + + new ChunkPrefetchPreloadPlugin().apply(compiler); + + if (typeof options.output.chunkFormat === "string") { + switch (options.output.chunkFormat) { + case "array-push": { + const ArrayPushCallbackChunkFormatPlugin = __webpack_require__(97504); + new ArrayPushCallbackChunkFormatPlugin().apply(compiler); + break; + } + case "commonjs": { + const CommonJsChunkFormatPlugin = __webpack_require__(15534); + new CommonJsChunkFormatPlugin().apply(compiler); + break; + } + case "module": + throw new Error( + "EcmaScript Module Chunk Format is not implemented yet" + ); + default: + throw new Error( + "Unsupported chunk format '" + options.output.chunkFormat + "'." + ); + } + } + + if (options.output.enabledChunkLoadingTypes.length > 0) { + for (const type of options.output.enabledChunkLoadingTypes) { + const EnableChunkLoadingPlugin = __webpack_require__(41952); + new EnableChunkLoadingPlugin(type).apply(compiler); + } + } + + if (options.output.enabledWasmLoadingTypes.length > 0) { + for (const type of options.output.enabledWasmLoadingTypes) { + const EnableWasmLoadingPlugin = __webpack_require__(19599); + new EnableWasmLoadingPlugin(type).apply(compiler); + } + } + + if (options.output.enabledLibraryTypes.length > 0) { + for (const type of options.output.enabledLibraryTypes) { + const EnableLibraryPlugin = __webpack_require__(60405); + new EnableLibraryPlugin(type).apply(compiler); + } + } + + if (options.externals) { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const ExternalsPlugin = __webpack_require__(19056); + new ExternalsPlugin(options.externalsType, options.externals).apply( + compiler + ); + } + + if (options.output.pathinfo) { + const ModuleInfoHeaderPlugin = __webpack_require__(89376); + new ModuleInfoHeaderPlugin(options.output.pathinfo !== true).apply( + compiler + ); + } + + if (options.devtool) { + if (options.devtool.includes("source-map")) { + const hidden = options.devtool.includes("hidden"); + const inline = options.devtool.includes("inline"); + const evalWrapped = options.devtool.includes("eval"); + const cheap = options.devtool.includes("cheap"); + const moduleMaps = options.devtool.includes("module"); + const noSources = options.devtool.includes("nosources"); + const Plugin = evalWrapped + ? __webpack_require__(13902) + : __webpack_require__(6280); + new Plugin({ + filename: inline ? null : options.output.sourceMapFilename, + moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate, + fallbackModuleFilenameTemplate: + options.output.devtoolFallbackModuleFilenameTemplate, + append: hidden ? false : undefined, + module: moduleMaps ? true : cheap ? false : true, + columns: cheap ? false : true, + noSources: noSources, + namespace: options.output.devtoolNamespace + }).apply(compiler); + } else if (options.devtool.includes("eval")) { + const EvalDevToolModulePlugin = __webpack_require__(96655); + new EvalDevToolModulePlugin({ + moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate, + namespace: options.output.devtoolNamespace + }).apply(compiler); + } + } + + new JavascriptModulesPlugin().apply(compiler); + new JsonModulesPlugin().apply(compiler); + new AssetModulesPlugin().apply(compiler); + + if (!options.experiments.outputModule) { + if (options.output.module) { + throw new Error( + "'output.module: true' is only allowed when 'experiments.outputModule' is enabled" + ); + } + if (options.output.enabledLibraryTypes.includes("module")) { + throw new Error( + "library type \"module\" is only allowed when 'experiments.outputModule' is enabled" + ); + } + if (options.externalsType === "module") { + throw new Error( + "'externalsType: \"module\"' is only allowed when 'experiments.outputModule' is enabled" + ); + } + } + + if (options.experiments.syncWebAssembly) { + const WebAssemblyModulesPlugin = __webpack_require__(20178); + new WebAssemblyModulesPlugin({ + mangleImports: options.optimization.mangleWasmImports + }).apply(compiler); + } + + if (options.experiments.asyncWebAssembly) { + const AsyncWebAssemblyModulesPlugin = __webpack_require__(78379); + new AsyncWebAssemblyModulesPlugin({ + mangleImports: options.optimization.mangleWasmImports + }).apply(compiler); + } + + new EntryOptionPlugin().apply(compiler); + compiler.hooks.entryOption.call(options.context, options.entry); + + new RuntimePlugin().apply(compiler); + + new InferAsyncModulesPlugin().apply(compiler); + + new DataUriPlugin().apply(compiler); + new FileUriPlugin().apply(compiler); + + new CompatibilityPlugin().apply(compiler); + new HarmonyModulesPlugin({ + module: options.module, + topLevelAwait: options.experiments.topLevelAwait + }).apply(compiler); + if (options.amd !== false) { + const AMDPlugin = __webpack_require__(71381); + const RequireJsStuffPlugin = __webpack_require__(71919); + new AMDPlugin(options.module, options.amd || {}).apply(compiler); + new RequireJsStuffPlugin().apply(compiler); + } + new CommonJsPlugin(options.module).apply(compiler); + new LoaderPlugin().apply(compiler); + if (options.node !== false) { + const NodeStuffPlugin = __webpack_require__(591); + new NodeStuffPlugin(options.node).apply(compiler); + } + new APIPlugin().apply(compiler); + new ExportsInfoApiPlugin().apply(compiler); + new ConstPlugin().apply(compiler); + new UseStrictPlugin().apply(compiler); + new RequireIncludePlugin().apply(compiler); + new RequireEnsurePlugin().apply(compiler); + new RequireContextPlugin().apply(compiler); + new ImportPlugin(options.module).apply(compiler); + new SystemPlugin(options.module).apply(compiler); + new ImportMetaPlugin().apply(compiler); + new URLPlugin().apply(compiler); + + if (options.output.workerChunkLoading) { + const WorkerPlugin = __webpack_require__(41006); + new WorkerPlugin(options.output.workerChunkLoading).apply(compiler); + } + + new DefaultStatsFactoryPlugin().apply(compiler); + new DefaultStatsPresetPlugin().apply(compiler); + new DefaultStatsPrinterPlugin().apply(compiler); + + new FlagUsingEvalPlugin().apply(compiler); + + if (typeof options.mode !== "string") { + const WarnNoModeSetPlugin = __webpack_require__(25147); + new WarnNoModeSetPlugin().apply(compiler); + } + + const EnsureChunkConditionsPlugin = __webpack_require__(38073); + new EnsureChunkConditionsPlugin().apply(compiler); + if (options.optimization.removeAvailableModules) { + const RemoveParentModulesPlugin = __webpack_require__(80699); + new RemoveParentModulesPlugin().apply(compiler); + } + if (options.optimization.removeEmptyChunks) { + const RemoveEmptyChunksPlugin = __webpack_require__(95245); + new RemoveEmptyChunksPlugin().apply(compiler); + } + if (options.optimization.mergeDuplicateChunks) { + const MergeDuplicateChunksPlugin = __webpack_require__(22763); + new MergeDuplicateChunksPlugin().apply(compiler); + } + if (options.optimization.flagIncludedChunks) { + const FlagIncludedChunksPlugin = __webpack_require__(12625); + new FlagIncludedChunksPlugin().apply(compiler); + } + if (options.optimization.sideEffects) { + const SideEffectsFlagPlugin = __webpack_require__(72617); + new SideEffectsFlagPlugin( + options.optimization.sideEffects === true + ).apply(compiler); + } + if (options.optimization.providedExports) { + const FlagDependencyExportsPlugin = __webpack_require__(79073); + new FlagDependencyExportsPlugin().apply(compiler); + } + if (options.optimization.usedExports) { + const FlagDependencyUsagePlugin = __webpack_require__(13598); + new FlagDependencyUsagePlugin( + options.optimization.usedExports === "global" + ).apply(compiler); + } + if (options.optimization.innerGraph) { + const InnerGraphPlugin = __webpack_require__(41791); + new InnerGraphPlugin().apply(compiler); + } + if (options.optimization.mangleExports) { + const MangleExportsPlugin = __webpack_require__(1746); + new MangleExportsPlugin( + options.optimization.mangleExports !== "size" + ).apply(compiler); + } + if (options.optimization.concatenateModules) { + const ModuleConcatenationPlugin = __webpack_require__(72521); + new ModuleConcatenationPlugin().apply(compiler); + } + if (options.optimization.splitChunks) { + const SplitChunksPlugin = __webpack_require__(93384); + new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler); + } + if (options.optimization.runtimeChunk) { + const RuntimeChunkPlugin = __webpack_require__(49151); + new RuntimeChunkPlugin(options.optimization.runtimeChunk).apply(compiler); + } + if (!options.optimization.emitOnErrors) { + const NoEmitOnErrorsPlugin = __webpack_require__(49363); + new NoEmitOnErrorsPlugin().apply(compiler); + } + if (options.optimization.realContentHash) { + const RealContentHashPlugin = __webpack_require__(69236); + new RealContentHashPlugin({ + hashFunction: options.output.hashFunction, + hashDigest: options.output.hashDigest + }).apply(compiler); + } + if (options.optimization.checkWasmTypes) { + const WasmFinalizeExportsPlugin = __webpack_require__(85489); + new WasmFinalizeExportsPlugin().apply(compiler); + } + const moduleIds = options.optimization.moduleIds; + if (moduleIds) { + switch (moduleIds) { + case "natural": { + const NaturalModuleIdsPlugin = __webpack_require__(87194); + new NaturalModuleIdsPlugin().apply(compiler); + break; + } + case "named": { + const NamedModuleIdsPlugin = __webpack_require__(94967); + new NamedModuleIdsPlugin().apply(compiler); + break; + } + case "hashed": { + const WarnDeprecatedOptionPlugin = __webpack_require__(16504); + const HashedModuleIdsPlugin = __webpack_require__(400); + new WarnDeprecatedOptionPlugin( + "optimization.moduleIds", + "hashed", + "deterministic" + ).apply(compiler); + new HashedModuleIdsPlugin().apply(compiler); + break; + } + case "deterministic": { + const DeterministicModuleIdsPlugin = __webpack_require__(66233); + new DeterministicModuleIdsPlugin().apply(compiler); + break; + } + case "size": { + const OccurrenceModuleIdsPlugin = __webpack_require__(47739); + new OccurrenceModuleIdsPlugin({ + prioritiseInitial: true + }).apply(compiler); + break; + } + default: + throw new Error( + `webpack bug: moduleIds: ${moduleIds} is not implemented` + ); + } + } + const chunkIds = options.optimization.chunkIds; + if (chunkIds) { + switch (chunkIds) { + case "natural": { + const NaturalChunkIdsPlugin = __webpack_require__(7069); + new NaturalChunkIdsPlugin().apply(compiler); + break; + } + case "named": { + const NamedChunkIdsPlugin = __webpack_require__(97936); + new NamedChunkIdsPlugin().apply(compiler); + break; + } + case "deterministic": { + const DeterministicChunkIdsPlugin = __webpack_require__(52701); + new DeterministicChunkIdsPlugin().apply(compiler); + break; + } + case "size": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const OccurrenceChunkIdsPlugin = __webpack_require__(46088); + new OccurrenceChunkIdsPlugin({ + prioritiseInitial: true + }).apply(compiler); + break; + } + case "total-size": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const OccurrenceChunkIdsPlugin = __webpack_require__(46088); + new OccurrenceChunkIdsPlugin({ + prioritiseInitial: false + }).apply(compiler); + break; + } + default: + throw new Error( + `webpack bug: chunkIds: ${chunkIds} is not implemented` + ); + } + } + if (options.optimization.nodeEnv) { + const DefinePlugin = __webpack_require__(76936); + new DefinePlugin({ + "process.env.NODE_ENV": JSON.stringify(options.optimization.nodeEnv) + }).apply(compiler); + } + if (options.optimization.minimize) { + for (const minimizer of options.optimization.minimizer) { + if (typeof minimizer === "function") { + minimizer.call(compiler, compiler); + } else if (minimizer !== "...") { + minimizer.apply(compiler); + } + } + } + + if (options.performance) { + const SizeLimitsPlugin = __webpack_require__(84693); + new SizeLimitsPlugin(options.performance).apply(compiler); + } + + new TemplatedPathPlugin().apply(compiler); + + new RecordIdsPlugin({ + portableIds: options.optimization.portableRecords + }).apply(compiler); + + new WarnCaseSensitiveModulesPlugin().apply(compiler); + + const AddManagedPathsPlugin = __webpack_require__(41884); + new AddManagedPathsPlugin( + options.snapshot.managedPaths, + options.snapshot.immutablePaths + ).apply(compiler); + + if (options.cache && typeof options.cache === "object") { + const cacheOptions = options.cache; + switch (cacheOptions.type) { + case "memory": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const MemoryCachePlugin = __webpack_require__(80662); + new MemoryCachePlugin().apply(compiler); + break; + } + case "filesystem": { + const AddBuildDependenciesPlugin = __webpack_require__(68965); + for (const key in cacheOptions.buildDependencies) { + const list = cacheOptions.buildDependencies[key]; + new AddBuildDependenciesPlugin(list).apply(compiler); + } + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const MemoryCachePlugin = __webpack_require__(80662); + new MemoryCachePlugin().apply(compiler); + switch (cacheOptions.store) { + case "pack": { + const IdleFileCachePlugin = __webpack_require__(67462); + const PackFileCacheStrategy = __webpack_require__(19780); + new IdleFileCachePlugin( + new PackFileCacheStrategy({ + compiler, + fs: compiler.intermediateFileSystem, + context: options.context, + cacheLocation: cacheOptions.cacheLocation, + version: cacheOptions.version, + logger: compiler.getInfrastructureLogger( + "webpack.cache.PackFileCacheStrategy" + ), + snapshot: options.snapshot + }), + cacheOptions.idleTimeout, + cacheOptions.idleTimeoutForInitialStore + ).apply(compiler); + break; + } + default: + throw new Error("Unhandled value for cache.store"); + } + break; + } + default: + // @ts-expect-error Property 'type' does not exist on type 'never'. ts(2339) + throw new Error(`Unknown cache type ${cacheOptions.type}`); + } + } + new ResolverCachePlugin().apply(compiler); + + if (options.ignoreWarnings && options.ignoreWarnings.length > 0) { + const IgnoreWarningsPlugin = __webpack_require__(53857); + new IgnoreWarningsPlugin(options.ignoreWarnings).apply(compiler); + } + + compiler.hooks.afterPlugins.call(compiler); + if (!compiler.inputFileSystem) { + throw new Error("No input filesystem provided"); + } + compiler.resolverFactory.hooks.resolveOptions + .for("normal") + .tap("WebpackOptionsApply", resolveOptions => { + resolveOptions = cleverMerge(options.resolve, resolveOptions); + resolveOptions.fileSystem = compiler.inputFileSystem; + return resolveOptions; + }); + compiler.resolverFactory.hooks.resolveOptions + .for("context") + .tap("WebpackOptionsApply", resolveOptions => { + resolveOptions = cleverMerge(options.resolve, resolveOptions); + resolveOptions.fileSystem = compiler.inputFileSystem; + resolveOptions.resolveToContext = true; + return resolveOptions; + }); + compiler.resolverFactory.hooks.resolveOptions + .for("loader") + .tap("WebpackOptionsApply", resolveOptions => { + resolveOptions = cleverMerge(options.resolveLoader, resolveOptions); + resolveOptions.fileSystem = compiler.inputFileSystem; + return resolveOptions; + }); + compiler.hooks.afterResolvers.call(compiler); + return options; + } +} + +module.exports = WebpackOptionsApply; + + +/***/ }), + +/***/ 55525: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { applyWebpackOptionsDefaults } = __webpack_require__(72829); +const { getNormalizedWebpackOptions } = __webpack_require__(92188); + +class WebpackOptionsDefaulter { + process(options) { + options = getNormalizedWebpackOptions(options); + applyWebpackOptionsDefaults(options); + return options; + } +} + +module.exports = WebpackOptionsDefaulter; + + +/***/ }), + +/***/ 97834: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sergey Melyukov @smelukov +*/ + + + +const mimeTypes = __webpack_require__(63835); +const path = __webpack_require__(85622); +const { RawSource } = __webpack_require__(55600); +const Generator = __webpack_require__(14052); +const RuntimeGlobals = __webpack_require__(48801); +const createHash = __webpack_require__(34627); +const { makePathsRelative } = __webpack_require__(47779); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../../declarations/WebpackOptions").AssetGeneratorOptions} AssetGeneratorOptions */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Generator").GenerateContext} GenerateContext */ +/** @typedef {import("../Generator").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("../util/Hash")} Hash */ + +const JS_TYPES = new Set(["javascript"]); +const JS_AND_ASSET_TYPES = new Set(["javascript", "asset"]); + +class AssetGenerator extends Generator { + /** + * @param {Compilation} compilation the compilation + * @param {AssetGeneratorOptions["dataUrl"]=} dataUrlOptions the options for the data url + * @param {string=} filename override for output.assetModuleFilename + */ + constructor(compilation, dataUrlOptions, filename) { + super(); + this.compilation = compilation; + this.dataUrlOptions = dataUrlOptions; + this.filename = filename; + } + + /** + * @param {NormalModule} module module for which the code should be generated + * @param {GenerateContext} generateContext context for generate + * @returns {Source} generated code + */ + generate( + module, + { runtime, chunkGraph, runtimeTemplate, runtimeRequirements, type } + ) { + switch (type) { + case "asset": + return module.originalSource(); + default: { + runtimeRequirements.add(RuntimeGlobals.module); + + const originalSource = module.originalSource(); + if (module.buildInfo.dataUrl) { + let encodedSource; + if (typeof this.dataUrlOptions === "function") { + encodedSource = this.dataUrlOptions.call( + null, + originalSource.source(), + { + filename: module.matchResource || module.resource, + module + } + ); + } else { + const encoding = this.dataUrlOptions.encoding; + const ext = path.extname(module.nameForCondition()); + const mimeType = + this.dataUrlOptions.mimetype || mimeTypes.lookup(ext); + + if (!mimeType) { + throw new Error( + "DataUrl can't be generated automatically, " + + `because there is no mimetype for "${ext}" in mimetype database. ` + + 'Either pass a mimetype via "generator.mimetype" or ' + + 'use type: "asset/resource" to create a resource file instead of a DataUrl' + ); + } + + let encodedContent; + switch (encoding) { + case "base64": { + encodedContent = originalSource.buffer().toString("base64"); + break; + } + case false: { + const content = originalSource.source(); + if (typeof content === "string") { + encodedContent = encodeURI(content); + } else { + encodedContent = encodeURI(content.toString("utf-8")); + } + break; + } + default: + throw new Error(`Unsupported encoding '${encoding}'`); + } + + encodedSource = `data:${mimeType}${ + encoding ? `;${encoding}` : "" + },${encodedContent}`; + } + return new RawSource( + `${RuntimeGlobals.module}.exports = ${JSON.stringify( + encodedSource + )};` + ); + } else { + const assetModuleFilename = + this.filename || runtimeTemplate.outputOptions.assetModuleFilename; + const hash = createHash(runtimeTemplate.outputOptions.hashFunction); + if (runtimeTemplate.outputOptions.hashSalt) { + hash.update(runtimeTemplate.outputOptions.hashSalt); + } + hash.update(originalSource.buffer()); + const fullHash = /** @type {string} */ (hash.digest( + runtimeTemplate.outputOptions.hashDigest + )); + const contentHash = fullHash.slice( + 0, + runtimeTemplate.outputOptions.hashDigestLength + ); + module.buildInfo.fullContentHash = fullHash; + const sourceFilename = makePathsRelative( + this.compilation.compiler.context, + module.matchResource || module.resource, + this.compilation.compiler.root + ).replace(/^\.\//, ""); + const { + path: filename, + info + } = this.compilation.getAssetPathWithInfo(assetModuleFilename, { + module, + runtime, + filename: sourceFilename, + chunkGraph, + contentHash + }); + module.buildInfo.filename = filename; + module.buildInfo.assetInfo = { + sourceFilename, + ...info + }; + + runtimeRequirements.add(RuntimeGlobals.publicPath); // add __webpack_require__.p + + return new RawSource( + `${RuntimeGlobals.module}.exports = ${ + RuntimeGlobals.publicPath + } + ${JSON.stringify(filename)};` + ); + } + } + } + } + + /** + * @param {NormalModule} module fresh module + * @returns {Set} available types (do not mutate) + */ + getTypes(module) { + if (module.buildInfo.dataUrl) { + return JS_TYPES; + } else { + return JS_AND_ASSET_TYPES; + } + } + + /** + * @param {NormalModule} module the module + * @param {string=} type source type + * @returns {number} estimate size of the module + */ + getSize(module, type) { + switch (type) { + case "asset": { + const originalSource = module.originalSource(); + + if (!originalSource) { + return 0; + } + + return originalSource.size(); + } + default: + if (module.buildInfo.dataUrl) { + const originalSource = module.originalSource(); + + if (!originalSource) { + return 0; + } + + // roughly for data url + // Example: m.exports="data:image/png;base64,ag82/f+2==" + // 4/3 = base64 encoding + // 34 = ~ data url header + footer + rounding + return originalSource.size() * 1.34 + 36; + } else { + // it's only estimated so this number is probably fine + // Example: m.exports=r.p+"0123456789012345678901.ext" + return 42; + } + } + } + + /** + * @param {Hash} hash hash that will be modified + * @param {UpdateHashContext} updateHashContext context for updating hash + */ + updateHash(hash, { module }) { + hash.update(module.buildInfo.dataUrl ? "data-url" : "resource"); + } +} + +module.exports = AssetGenerator; + + +/***/ }), + +/***/ 22833: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Yuta Hiroto @hiroppy +*/ + + + +const { validate } = __webpack_require__(79286); +const { cleverMerge } = __webpack_require__(92700); +const { compareModulesByIdentifier } = __webpack_require__(21699); +const memoize = __webpack_require__(18003); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +const getSchema = name => { + const { definitions } = __webpack_require__(15546); + return { + definitions, + oneOf: [{ $ref: `#/definitions/${name}` }] + }; +}; +const getGeneratorSchemaMap = { + asset: memoize(() => getSchema("AssetGeneratorOptions")), + "asset/resource": memoize(() => getSchema("AssetResourceGeneratorOptions")), + "asset/inline": memoize(() => getSchema("AssetInlineGeneratorOptions")) +}; + +const getParserSchema = memoize(() => getSchema("AssetParserOptions")); +const getAssetGenerator = memoize(() => __webpack_require__(97834)); +const getAssetParser = memoize(() => __webpack_require__(9668)); +const getAssetSourceGenerator = memoize(() => + __webpack_require__(3297) +); + +const type = "asset"; +const plugin = "AssetModulesPlugin"; + +class AssetModulesPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + plugin, + (compilation, { normalModuleFactory }) => { + normalModuleFactory.hooks.createParser + .for("asset") + .tap(plugin, parserOptions => { + validate(getParserSchema(), parserOptions, { + name: "Asset Modules Plugin", + baseDataPath: "parser" + }); + parserOptions = cleverMerge( + compiler.options.module.parser.asset, + parserOptions + ); + + let dataUrlCondition = parserOptions.dataUrlCondition; + if (!dataUrlCondition || typeof dataUrlCondition === "object") { + dataUrlCondition = { + maxSize: 8096, + ...dataUrlCondition + }; + } + + const AssetParser = getAssetParser(); + + return new AssetParser(dataUrlCondition); + }); + normalModuleFactory.hooks.createParser + .for("asset/inline") + .tap(plugin, parserOptions => { + const AssetParser = getAssetParser(); + + return new AssetParser(true); + }); + normalModuleFactory.hooks.createParser + .for("asset/resource") + .tap(plugin, parserOptions => { + const AssetParser = getAssetParser(); + + return new AssetParser(false); + }); + normalModuleFactory.hooks.createParser + .for("asset/source") + .tap(plugin, parserOptions => { + const AssetParser = getAssetParser(); + + return new AssetParser(false); + }); + + for (const type of ["asset", "asset/inline", "asset/resource"]) { + normalModuleFactory.hooks.createGenerator + .for(type) + // eslint-disable-next-line no-loop-func + .tap(plugin, generatorOptions => { + validate(getGeneratorSchemaMap[type](), generatorOptions, { + name: "Asset Modules Plugin", + baseDataPath: "generator" + }); + + let dataUrl = undefined; + if (type !== "asset/resource") { + dataUrl = generatorOptions.dataUrl; + if (!dataUrl || typeof dataUrl === "object") { + dataUrl = { + encoding: "base64", + mimetype: undefined, + ...dataUrl + }; + } + } + + let filename = undefined; + if (type !== "asset/inline") { + filename = generatorOptions.filename; + } + + const AssetGenerator = getAssetGenerator(); + + return new AssetGenerator(compilation, dataUrl, filename); + }); + } + normalModuleFactory.hooks.createGenerator + .for("asset/source") + .tap(plugin, () => { + const AssetSourceGenerator = getAssetSourceGenerator(); + + return new AssetSourceGenerator(); + }); + + compilation.hooks.renderManifest.tap(plugin, (result, options) => { + const { chunkGraph } = compilation; + const { chunk, codeGenerationResults } = options; + + const modules = chunkGraph.getOrderedChunkModulesIterableBySourceType( + chunk, + "asset", + compareModulesByIdentifier + ); + if (modules) { + for (const module of modules) { + result.push({ + render: () => + codeGenerationResults.getSource(module, chunk.runtime, type), + filename: module.buildInfo.filename, + info: module.buildInfo.assetInfo, + auxiliary: true, + identifier: `assetModule${chunkGraph.getModuleId(module)}`, + hash: module.buildInfo.fullContentHash + }); + } + } + + return result; + }); + } + ); + } +} + +module.exports = AssetModulesPlugin; + + +/***/ }), + +/***/ 9668: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Yuta Hiroto @hiroppy +*/ + + + +const Parser = __webpack_require__(85569); + +/** @typedef {import("../../declarations/WebpackOptions").AssetParserOptions} AssetParserOptions */ +/** @typedef {import("../Parser").ParserState} ParserState */ +/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ + +class AssetParser extends Parser { + /** + * @param {AssetParserOptions["dataUrlCondition"] | boolean} dataUrlCondition condition for inlining as DataUrl + */ + constructor(dataUrlCondition) { + super(); + this.dataUrlCondition = dataUrlCondition; + } + + /** + * @param {string | Buffer | PreparsedAst} source the source to parse + * @param {ParserState} state the parser state + * @returns {ParserState} the parser state + */ + parse(source, state) { + if (typeof source === "object" && !Buffer.isBuffer(source)) { + throw new Error("AssetParser doesn't accept preparsed AST"); + } + state.module.buildInfo.strict = true; + state.module.buildMeta.exportsType = "default"; + + if (typeof this.dataUrlCondition === "function") { + state.module.buildInfo.dataUrl = this.dataUrlCondition(source, { + filename: state.module.matchResource || state.module.resource, + module: state.module + }); + } else if (typeof this.dataUrlCondition === "boolean") { + state.module.buildInfo.dataUrl = this.dataUrlCondition; + } else if ( + this.dataUrlCondition && + typeof this.dataUrlCondition === "object" + ) { + state.module.buildInfo.dataUrl = + Buffer.byteLength(source) <= this.dataUrlCondition.maxSize; + } else { + throw new Error("Unexpected dataUrlCondition type"); + } + + return state; + } +} + +module.exports = AssetParser; + + +/***/ }), + +/***/ 3297: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sergey Melyukov @smelukov +*/ + + + +const { RawSource } = __webpack_require__(55600); +const Generator = __webpack_require__(14052); +const RuntimeGlobals = __webpack_require__(48801); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Generator").GenerateContext} GenerateContext */ +/** @typedef {import("../NormalModule")} NormalModule */ + +const TYPES = new Set(["javascript"]); + +class AssetSourceGenerator extends Generator { + /** + * @param {NormalModule} module module for which the code should be generated + * @param {GenerateContext} generateContext context for generate + * @returns {Source} generated code + */ + generate(module, { chunkGraph, runtimeTemplate, runtimeRequirements }) { + runtimeRequirements.add(RuntimeGlobals.module); + + const originalSource = module.originalSource(); + + if (!originalSource) { + return new RawSource(""); + } + + const content = originalSource.source(); + + let encodedSource; + if (typeof content === "string") { + encodedSource = content; + } else { + encodedSource = content.toString("utf-8"); + } + return new RawSource( + `${RuntimeGlobals.module}.exports = ${JSON.stringify(encodedSource)};` + ); + } + + /** + * @param {NormalModule} module fresh module + * @returns {Set} available types (do not mutate) + */ + getTypes(module) { + return TYPES; + } + + /** + * @param {NormalModule} module the module + * @param {string=} type source type + * @returns {number} estimate size of the module + */ + getSize(module, type) { + const originalSource = module.originalSource(); + + if (!originalSource) { + return 0; + } + + // Example: m.exports="abcd" + return originalSource.size() + 12; + } +} + +module.exports = AssetSourceGenerator; + + +/***/ }), + +/***/ 9428: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const InitFragment = __webpack_require__(63382); +const RuntimeGlobals = __webpack_require__(48801); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Generator").GenerateContext} GenerateContext */ + +class AwaitDependenciesInitFragment extends InitFragment { + /** + * @param {Set} promises the promises that should be awaited + */ + constructor(promises) { + super( + undefined, + InitFragment.STAGE_ASYNC_DEPENDENCIES, + 0, + "await-dependencies" + ); + this.promises = promises; + } + + merge(other) { + const promises = new Set(this.promises); + for (const p of other.promises) { + promises.add(p); + } + return new AwaitDependenciesInitFragment(promises); + } + + /** + * @param {GenerateContext} generateContext context for generate + * @returns {string|Source} the source code that will be included as initialization code + */ + getContent({ runtimeRequirements }) { + runtimeRequirements.add(RuntimeGlobals.module); + const promises = this.promises; + if (promises.size === 0) { + return ""; + } + if (promises.size === 1) { + for (const p of promises) { + return `${p} = await Promise.resolve(${p});\n`; + } + } + const sepPromises = Array.from(promises).join(", "); + return `([${sepPromises}] = await Promise.all([${sepPromises}]));\n`; + } +} + +module.exports = AwaitDependenciesInitFragment; + + +/***/ }), + +/***/ 17301: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const HarmonyImportDependency = __webpack_require__(289); + +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +class InferAsyncModulesPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("InferAsyncModulesPlugin", compilation => { + const { moduleGraph } = compilation; + compilation.hooks.finishModules.tap( + "InferAsyncModulesPlugin", + modules => { + /** @type {Set} */ + const queue = new Set(); + for (const module of modules) { + if (module.buildMeta && module.buildMeta.async) { + queue.add(module); + } + } + for (const module of queue) { + moduleGraph.setAsync(module); + const connections = moduleGraph.getIncomingConnections(module); + for (const connection of connections) { + const dep = connection.dependency; + if ( + dep instanceof HarmonyImportDependency && + connection.isTargetActive(undefined) + ) { + queue.add(connection.originModule); + } + } + } + } + ); + }); + } +} + +module.exports = InferAsyncModulesPlugin; + + +/***/ }), + +/***/ 25413: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const AsyncDependencyToInitialChunkError = __webpack_require__(88144); +const { connectChunkGroupParentAndChild } = __webpack_require__(92065); +const ModuleGraphConnection = __webpack_require__(39519); +const { getEntryRuntime, mergeRuntime } = __webpack_require__(43478); + +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Compilation")} Compilation */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Entrypoint")} Entrypoint */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./ModuleGraph")} ModuleGraph */ +/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */ +/** @typedef {import("./logging/Logger").Logger} Logger */ +/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * @typedef {Object} QueueItem + * @property {number} action + * @property {DependenciesBlock} block + * @property {Module} module + * @property {Chunk} chunk + * @property {ChunkGroup} chunkGroup + * @property {ChunkGroupInfo} chunkGroupInfo + */ + +/** @typedef {Set & { plus: Set }} ModuleSetPlus */ + +/** + * @typedef {Object} ChunkGroupInfo + * @property {ChunkGroup} chunkGroup the chunk group + * @property {RuntimeSpec} runtime the runtimes + * @property {ModuleSetPlus} minAvailableModules current minimal set of modules available at this point + * @property {boolean} minAvailableModulesOwned true, if minAvailableModules is owned and can be modified + * @property {ModuleSetPlus[]} availableModulesToBeMerged enqueued updates to the minimal set of available modules + * @property {Set=} skippedItems modules that were skipped because module is already available in parent chunks (need to reconsider when minAvailableModules is shrinking) + * @property {Set<[Module, ModuleGraphConnection[]]>=} skippedModuleConnections referenced modules that where skipped because they were not active in this runtime + * @property {ModuleSetPlus} resultingAvailableModules set of modules available including modules from this chunk group + * @property {Set} children set of children chunk groups, that will be revisited when availableModules shrink + * @property {Set} availableSources set of chunk groups that are the source for minAvailableModules + * @property {Set} availableChildren set of chunk groups which depend on the this chunk group as availableSource + * @property {number} preOrderIndex next pre order index + * @property {number} postOrderIndex next post order index + */ + +/** + * @typedef {Object} BlockChunkGroupConnection + * @property {ChunkGroupInfo} originChunkGroupInfo origin chunk group + * @property {ChunkGroup} chunkGroup referenced chunk group + */ + +const EMPTY_SET = /** @type {ModuleSetPlus} */ (new Set()); +EMPTY_SET.plus = EMPTY_SET; + +/** + * @param {ModuleSetPlus} a first set + * @param {ModuleSetPlus} b second set + * @returns {number} cmp + */ +const bySetSize = (a, b) => { + return b.size + b.plus.size - a.size - a.plus.size; +}; + +/** + * + * @param {ModuleGraphConnection[]} connections list of connections + * @param {RuntimeSpec} runtime for which runtime + * @returns {ConnectionState} connection state + */ +const getActiveStateOfConnections = (connections, runtime) => { + let merged = connections[0].getActiveState(runtime); + if (merged === true) return true; + for (let i = 1; i < connections.length; i++) { + const c = connections[i]; + merged = ModuleGraphConnection.addConnectionStates( + merged, + c.getActiveState(runtime) + ); + if (merged === true) return true; + } + return merged; +}; + +/** + * Extracts block to modules mapping from all modules + * @param {Compilation} compilation the compilation + * @returns {Map>} the mapping block to modules + */ +const extractBlockModulesMap = compilation => { + const { moduleGraph } = compilation; + + /** @type {Map>} */ + const blockModulesMap = new Map(); + + const blockQueue = new Set(); + + for (const module of compilation.modules) { + /** @type {WeakMap} */ + let moduleMap; + + for (const connection of moduleGraph.getOutgoingConnections(module)) { + const d = connection.dependency; + // We skip connections without dependency + if (!d) continue; + const m = connection.module; + // We skip connections without Module pointer + if (!m) continue; + // We skip weak connections + if (connection.weak) continue; + const state = connection.getActiveState(undefined); + // We skip inactive connections + if (state === false) continue; + // Store Dependency to Module mapping in local map + // to allow to access it faster compared to + // moduleGraph.getConnection() + if (moduleMap === undefined) { + moduleMap = new WeakMap(); + } + moduleMap.set(connection.dependency, connection); + } + + blockQueue.clear(); + blockQueue.add(module); + for (const block of blockQueue) { + let modules; + + if (moduleMap !== undefined && block.dependencies) { + for (const dep of block.dependencies) { + const connection = moduleMap.get(dep); + if (connection !== undefined) { + const { module } = connection; + if (modules === undefined) { + modules = new Map(); + blockModulesMap.set(block, modules); + } + const old = modules.get(module); + if (old !== undefined) { + old.push(connection); + } else { + modules.set(module, [connection]); + } + } + } + } + + if (block.blocks) { + for (const b of block.blocks) { + blockQueue.add(b); + } + } + } + } + + return blockModulesMap; +}; + +/** + * + * @param {Logger} logger a logger + * @param {Compilation} compilation the compilation + * @param {Map} inputEntrypointsAndModules chunk groups which are processed with the modules + * @param {Map} chunkGroupInfoMap mapping from chunk group to available modules + * @param {Map} blockConnections connection for blocks + * @param {Set} blocksWithNestedBlocks flag for blocks that have nested blocks + * @param {Set} allCreatedChunkGroups filled with all chunk groups that are created here + */ +const visitModules = ( + logger, + compilation, + inputEntrypointsAndModules, + chunkGroupInfoMap, + blockConnections, + blocksWithNestedBlocks, + allCreatedChunkGroups +) => { + const { moduleGraph, chunkGraph } = compilation; + + logger.time("visitModules: prepare"); + const blockModulesMap = extractBlockModulesMap(compilation); + + let statProcessedQueueItems = 0; + let statProcessedBlocks = 0; + let statConnectedChunkGroups = 0; + let statProcessedChunkGroupsForMerging = 0; + let statMergedAvailableModuleSets = 0; + let statForkedAvailableModules = 0; + let statForkedAvailableModulesCount = 0; + let statForkedAvailableModulesCountPlus = 0; + let statForkedMergedModulesCount = 0; + let statForkedMergedModulesCountPlus = 0; + let statForkedResultModulesCount = 0; + let statChunkGroupInfoUpdated = 0; + let statChildChunkGroupsReconnected = 0; + + let nextChunkGroupIndex = 0; + let nextFreeModulePreOrderIndex = 0; + let nextFreeModulePostOrderIndex = 0; + + /** @type {Map} */ + const blockChunkGroups = new Map(); + + /** @type {Map} */ + const namedChunkGroups = new Map(); + + /** @type {Map} */ + const namedAsyncEntrypoints = new Map(); + + const ADD_AND_ENTER_ENTRY_MODULE = 0; + const ADD_AND_ENTER_MODULE = 1; + const ENTER_MODULE = 2; + const PROCESS_BLOCK = 3; + const PROCESS_ENTRY_BLOCK = 4; + const LEAVE_MODULE = 5; + + /** @type {QueueItem[]} */ + let queue = []; + + /** @type {Map>} */ + const queueConnect = new Map(); + /** @type {Set} */ + const chunkGroupsForCombining = new Set(); + + // Fill queue with entrypoint modules + // Create ChunkGroupInfo for entrypoints + for (const [chunkGroup, modules] of inputEntrypointsAndModules) { + const runtime = getEntryRuntime( + compilation, + chunkGroup.name, + chunkGroup.options + ); + /** @type {ChunkGroupInfo} */ + const chunkGroupInfo = { + chunkGroup, + runtime, + minAvailableModules: undefined, + minAvailableModulesOwned: false, + availableModulesToBeMerged: [], + skippedItems: undefined, + resultingAvailableModules: undefined, + children: undefined, + availableSources: undefined, + availableChildren: undefined, + preOrderIndex: 0, + postOrderIndex: 0 + }; + chunkGroup.index = nextChunkGroupIndex++; + if (chunkGroup.getNumberOfParents() > 0) { + // minAvailableModules for child entrypoints are unknown yet, set to undefined. + // This means no module is added until other sets are merged into + // this minAvailableModules (by the parent entrypoints) + const skippedItems = new Set(); + for (const module of modules) { + skippedItems.add(module); + } + chunkGroupInfo.skippedItems = skippedItems; + chunkGroupsForCombining.add(chunkGroupInfo); + } else { + // The application may start here: We start with an empty list of available modules + chunkGroupInfo.minAvailableModules = EMPTY_SET; + const chunk = chunkGroup.getEntrypointChunk(); + for (const module of modules) { + queue.push({ + action: ADD_AND_ENTER_MODULE, + block: module, + module, + chunk, + chunkGroup, + chunkGroupInfo + }); + } + } + chunkGroupInfoMap.set(chunkGroup, chunkGroupInfo); + if (chunkGroup.name) { + namedChunkGroups.set(chunkGroup.name, chunkGroupInfo); + } + } + // Fill availableSources with parent-child dependencies between entrypoints + for (const chunkGroupInfo of chunkGroupsForCombining) { + const { chunkGroup } = chunkGroupInfo; + chunkGroupInfo.availableSources = new Set(); + for (const parent of chunkGroup.parentsIterable) { + const parentChunkGroupInfo = chunkGroupInfoMap.get(parent); + chunkGroupInfo.availableSources.add(parentChunkGroupInfo); + if (parentChunkGroupInfo.availableChildren === undefined) { + parentChunkGroupInfo.availableChildren = new Set(); + } + parentChunkGroupInfo.availableChildren.add(chunkGroupInfo); + } + } + // pop() is used to read from the queue + // so it need to be reversed to be iterated in + // correct order + queue.reverse(); + + /** @type {Set} */ + const outdatedChunkGroupInfo = new Set(); + /** @type {Set} */ + const chunkGroupsForMerging = new Set(); + /** @type {QueueItem[]} */ + let queueDelayed = []; + + logger.timeEnd("visitModules: prepare"); + + /** @type {[Module, ModuleGraphConnection[]][]} */ + const skipConnectionBuffer = []; + /** @type {Module[]} */ + const skipBuffer = []; + /** @type {QueueItem[]} */ + const queueBuffer = []; + + /** @type {Module} */ + let module; + /** @type {Chunk} */ + let chunk; + /** @type {ChunkGroup} */ + let chunkGroup; + /** @type {DependenciesBlock} */ + let block; + /** @type {ChunkGroupInfo} */ + let chunkGroupInfo; + + // For each async Block in graph + /** + * @param {AsyncDependenciesBlock} b iterating over each Async DepBlock + * @returns {void} + */ + const iteratorBlock = b => { + // 1. We create a chunk group with single chunk in it for this Block + // but only once (blockChunkGroups map) + let cgi = blockChunkGroups.get(b); + /** @type {ChunkGroup} */ + let c; + /** @type {Entrypoint} */ + let entrypoint; + const entryOptions = b.groupOptions && b.groupOptions.entryOptions; + if (cgi === undefined) { + const chunkName = (b.groupOptions && b.groupOptions.name) || b.chunkName; + if (entryOptions) { + cgi = namedAsyncEntrypoints.get(chunkName); + if (!cgi) { + entrypoint = compilation.addAsyncEntrypoint( + entryOptions, + module, + b.loc, + b.request + ); + entrypoint.index = nextChunkGroupIndex++; + cgi = { + chunkGroup: entrypoint, + runtime: entrypoint.options.runtime || entrypoint.name, + minAvailableModules: EMPTY_SET, + minAvailableModulesOwned: false, + availableModulesToBeMerged: [], + skippedItems: undefined, + resultingAvailableModules: undefined, + children: undefined, + availableSources: undefined, + availableChildren: undefined, + preOrderIndex: 0, + postOrderIndex: 0 + }; + chunkGroupInfoMap.set(entrypoint, cgi); + + chunkGraph.connectBlockAndChunkGroup(b, entrypoint); + if (chunkName) { + namedAsyncEntrypoints.set(chunkName, cgi); + } + } else { + entrypoint = /** @type {Entrypoint} */ (cgi.chunkGroup); + // TODO merge entryOptions + entrypoint.addOrigin(module, b.loc, b.request); + chunkGraph.connectBlockAndChunkGroup(b, entrypoint); + } + + // 2. We enqueue the DependenciesBlock for traversal + queueDelayed.push({ + action: PROCESS_ENTRY_BLOCK, + block: b, + module: module, + chunk: entrypoint.chunks[0], + chunkGroup: entrypoint, + chunkGroupInfo: cgi + }); + } else { + cgi = namedChunkGroups.get(chunkName); + if (!cgi) { + c = compilation.addChunkInGroup( + b.groupOptions || b.chunkName, + module, + b.loc, + b.request + ); + c.index = nextChunkGroupIndex++; + cgi = { + chunkGroup: c, + runtime: chunkGroupInfo.runtime, + minAvailableModules: undefined, + minAvailableModulesOwned: undefined, + availableModulesToBeMerged: [], + skippedItems: undefined, + resultingAvailableModules: undefined, + children: undefined, + availableSources: undefined, + availableChildren: undefined, + preOrderIndex: 0, + postOrderIndex: 0 + }; + allCreatedChunkGroups.add(c); + chunkGroupInfoMap.set(c, cgi); + if (chunkName) { + namedChunkGroups.set(chunkName, cgi); + } + } else { + c = cgi.chunkGroup; + if (c.isInitial()) { + compilation.errors.push( + new AsyncDependencyToInitialChunkError(chunkName, module, b.loc) + ); + c = chunkGroup; + } + c.addOptions(b.groupOptions); + c.addOrigin(module, b.loc, b.request); + } + blockConnections.set(b, []); + } + blockChunkGroups.set(b, cgi); + } else if (entryOptions) { + entrypoint = /** @type {Entrypoint} */ (cgi.chunkGroup); + } else { + c = cgi.chunkGroup; + } + + if (c !== undefined) { + // 2. We store the connection for the block + // to connect it later if needed + blockConnections.get(b).push({ + originChunkGroupInfo: chunkGroupInfo, + chunkGroup: c + }); + + // 3. We enqueue the chunk group info creation/updating + let connectList = queueConnect.get(chunkGroupInfo); + if (connectList === undefined) { + connectList = new Set(); + queueConnect.set(chunkGroupInfo, connectList); + } + connectList.add(cgi); + + // TODO check if this really need to be done for each traversal + // or if it is enough when it's queued when created + // 4. We enqueue the DependenciesBlock for traversal + queueDelayed.push({ + action: PROCESS_BLOCK, + block: b, + module: module, + chunk: c.chunks[0], + chunkGroup: c, + chunkGroupInfo: cgi + }); + } else { + chunkGroupInfo.chunkGroup.addAsyncEntrypoint(entrypoint); + } + }; + + /** + * @param {DependenciesBlock} block the block + * @returns {void} + */ + const processBlock = block => { + statProcessedBlocks++; + // get prepared block info + const blockModules = blockModulesMap.get(block); + + if (blockModules !== undefined) { + const { minAvailableModules, runtime } = chunkGroupInfo; + // Buffer items because order need to be reversed to get indices correct + // Traverse all referenced modules + for (const entry of blockModules) { + const [refModule, connections] = entry; + if (chunkGraph.isModuleInChunk(refModule, chunk)) { + // skip early if already connected + continue; + } + const activeState = getActiveStateOfConnections(connections, runtime); + if (activeState !== true) { + skipConnectionBuffer.push(entry); + if (activeState === false) continue; + } + if ( + activeState === true && + (minAvailableModules.has(refModule) || + minAvailableModules.plus.has(refModule)) + ) { + // already in parent chunks, skip it for now + skipBuffer.push(refModule); + continue; + } + // enqueue, then add and enter to be in the correct order + // this is relevant with circular dependencies + queueBuffer.push({ + action: activeState === true ? ADD_AND_ENTER_MODULE : PROCESS_BLOCK, + block: refModule, + module: refModule, + chunk, + chunkGroup, + chunkGroupInfo + }); + } + // Add buffered items in reverse order + if (skipConnectionBuffer.length > 0) { + let { skippedModuleConnections } = chunkGroupInfo; + if (skippedModuleConnections === undefined) { + chunkGroupInfo.skippedModuleConnections = skippedModuleConnections = new Set(); + } + for (let i = skipConnectionBuffer.length - 1; i >= 0; i--) { + skippedModuleConnections.add(skipConnectionBuffer[i]); + } + skipConnectionBuffer.length = 0; + } + if (skipBuffer.length > 0) { + let { skippedItems } = chunkGroupInfo; + if (skippedItems === undefined) { + chunkGroupInfo.skippedItems = skippedItems = new Set(); + } + for (let i = skipBuffer.length - 1; i >= 0; i--) { + skippedItems.add(skipBuffer[i]); + } + skipBuffer.length = 0; + } + if (queueBuffer.length > 0) { + for (let i = queueBuffer.length - 1; i >= 0; i--) { + queue.push(queueBuffer[i]); + } + queueBuffer.length = 0; + } + } + + // Traverse all Blocks + for (const b of block.blocks) { + iteratorBlock(b); + } + + if (block.blocks.length > 0 && module !== block) { + blocksWithNestedBlocks.add(block); + } + }; + + /** + * @param {DependenciesBlock} block the block + * @returns {void} + */ + const processEntryBlock = block => { + statProcessedBlocks++; + // get prepared block info + const blockModules = blockModulesMap.get(block); + + if (blockModules !== undefined) { + // Traverse all referenced modules + for (const [refModule, connections] of blockModules) { + const activeState = getActiveStateOfConnections(connections, undefined); + // enqueue, then add and enter to be in the correct order + // this is relevant with circular dependencies + queueBuffer.push({ + action: + activeState === true ? ADD_AND_ENTER_ENTRY_MODULE : PROCESS_BLOCK, + block: refModule, + module: refModule, + chunk, + chunkGroup, + chunkGroupInfo + }); + } + // Add buffered items in reverse order + if (queueBuffer.length > 0) { + for (let i = queueBuffer.length - 1; i >= 0; i--) { + queue.push(queueBuffer[i]); + } + queueBuffer.length = 0; + } + } + + // Traverse all Blocks + for (const b of block.blocks) { + iteratorBlock(b); + } + + if (block.blocks.length > 0 && module !== block) { + blocksWithNestedBlocks.add(block); + } + }; + + const processQueue = () => { + while (queue.length) { + statProcessedQueueItems++; + const queueItem = queue.pop(); + module = queueItem.module; + block = queueItem.block; + chunk = queueItem.chunk; + chunkGroup = queueItem.chunkGroup; + chunkGroupInfo = queueItem.chunkGroupInfo; + + switch (queueItem.action) { + case ADD_AND_ENTER_ENTRY_MODULE: + chunkGraph.connectChunkAndEntryModule( + chunk, + module, + /** @type {Entrypoint} */ (chunkGroup) + ); + // fallthrough + case ADD_AND_ENTER_MODULE: { + if (chunkGraph.isModuleInChunk(module, chunk)) { + // already connected, skip it + break; + } + // We connect Module and Chunk + chunkGraph.connectChunkAndModule(chunk, module); + } + // fallthrough + case ENTER_MODULE: { + const index = chunkGroup.getModulePreOrderIndex(module); + if (index === undefined) { + chunkGroup.setModulePreOrderIndex( + module, + chunkGroupInfo.preOrderIndex++ + ); + } + + if ( + moduleGraph.setPreOrderIndexIfUnset( + module, + nextFreeModulePreOrderIndex + ) + ) { + nextFreeModulePreOrderIndex++; + } + + // reuse queueItem + queueItem.action = LEAVE_MODULE; + queue.push(queueItem); + } + // fallthrough + case PROCESS_BLOCK: { + processBlock(block); + break; + } + case PROCESS_ENTRY_BLOCK: { + processEntryBlock(block); + break; + } + case LEAVE_MODULE: { + const index = chunkGroup.getModulePostOrderIndex(module); + if (index === undefined) { + chunkGroup.setModulePostOrderIndex( + module, + chunkGroupInfo.postOrderIndex++ + ); + } + + if ( + moduleGraph.setPostOrderIndexIfUnset( + module, + nextFreeModulePostOrderIndex + ) + ) { + nextFreeModulePostOrderIndex++; + } + break; + } + } + } + }; + + const calculateResultingAvailableModules = chunkGroupInfo => { + if (chunkGroupInfo.resultingAvailableModules) + return chunkGroupInfo.resultingAvailableModules; + + const minAvailableModules = chunkGroupInfo.minAvailableModules; + + // Create a new Set of available modules at this point + // We want to be as lazy as possible. There are multiple ways doing this: + // Note that resultingAvailableModules is stored as "(a) + (b)" as it's a ModuleSetPlus + // - resultingAvailableModules = (modules of chunk) + (minAvailableModules + minAvailableModules.plus) + // - resultingAvailableModules = (minAvailableModules + modules of chunk) + (minAvailableModules.plus) + // We choose one depending on the size of minAvailableModules vs minAvailableModules.plus + + let resultingAvailableModules; + if (minAvailableModules.size > minAvailableModules.plus.size) { + // resultingAvailableModules = (modules of chunk) + (minAvailableModules + minAvailableModules.plus) + resultingAvailableModules = /** @type {Set & {plus: Set}} */ (new Set()); + for (const module of minAvailableModules.plus) + minAvailableModules.add(module); + minAvailableModules.plus = EMPTY_SET; + resultingAvailableModules.plus = minAvailableModules; + chunkGroupInfo.minAvailableModulesOwned = false; + } else { + // resultingAvailableModules = (minAvailableModules + modules of chunk) + (minAvailableModules.plus) + resultingAvailableModules = /** @type {Set & {plus: Set}} */ (new Set( + minAvailableModules + )); + resultingAvailableModules.plus = minAvailableModules.plus; + } + + // add the modules from the chunk group to the set + for (const chunk of chunkGroupInfo.chunkGroup.chunks) { + for (const m of chunkGraph.getChunkModulesIterable(chunk)) { + resultingAvailableModules.add(m); + } + } + return (chunkGroupInfo.resultingAvailableModules = resultingAvailableModules); + }; + + const processConnectQueue = () => { + // Figure out new parents for chunk groups + // to get new available modules for these children + for (const [chunkGroupInfo, targets] of queueConnect) { + // 1. Add new targets to the list of children + if (chunkGroupInfo.children === undefined) { + chunkGroupInfo.children = targets; + } else { + for (const target of targets) { + chunkGroupInfo.children.add(target); + } + } + + // 2. Calculate resulting available modules + const resultingAvailableModules = calculateResultingAvailableModules( + chunkGroupInfo + ); + + const runtime = chunkGroupInfo.runtime; + + // 3. Update chunk group info + for (const target of targets) { + target.availableModulesToBeMerged.push(resultingAvailableModules); + chunkGroupsForMerging.add(target); + const oldRuntime = target.runtime; + const newRuntime = mergeRuntime(oldRuntime, runtime); + if (oldRuntime !== newRuntime) { + target.runtime = newRuntime; + outdatedChunkGroupInfo.add(target); + } + } + + statConnectedChunkGroups += targets.size; + } + queueConnect.clear(); + }; + + const processChunkGroupsForMerging = () => { + statProcessedChunkGroupsForMerging += chunkGroupsForMerging.size; + + // Execute the merge + for (const info of chunkGroupsForMerging) { + const availableModulesToBeMerged = info.availableModulesToBeMerged; + let cachedMinAvailableModules = info.minAvailableModules; + + statMergedAvailableModuleSets += availableModulesToBeMerged.length; + + // 1. Get minimal available modules + // It doesn't make sense to traverse a chunk again with more available modules. + // This step calculates the minimal available modules and skips traversal when + // the list didn't shrink. + if (availableModulesToBeMerged.length > 1) { + availableModulesToBeMerged.sort(bySetSize); + } + let changed = false; + merge: for (const availableModules of availableModulesToBeMerged) { + if (cachedMinAvailableModules === undefined) { + cachedMinAvailableModules = availableModules; + info.minAvailableModules = cachedMinAvailableModules; + info.minAvailableModulesOwned = false; + changed = true; + } else { + if (info.minAvailableModulesOwned) { + // We own it and can modify it + if (cachedMinAvailableModules.plus === availableModules.plus) { + for (const m of cachedMinAvailableModules) { + if (!availableModules.has(m)) { + cachedMinAvailableModules.delete(m); + changed = true; + } + } + } else { + for (const m of cachedMinAvailableModules) { + if (!availableModules.has(m) && !availableModules.plus.has(m)) { + cachedMinAvailableModules.delete(m); + changed = true; + } + } + for (const m of cachedMinAvailableModules.plus) { + if (!availableModules.has(m) && !availableModules.plus.has(m)) { + // We can't remove modules from the plus part + // so we need to merge plus into the normal part to allow modifying it + const iterator = cachedMinAvailableModules.plus[ + Symbol.iterator + ](); + // fast forward add all modules until m + /** @type {IteratorResult} */ + let it; + while (!(it = iterator.next()).done) { + const module = it.value; + if (module === m) break; + cachedMinAvailableModules.add(module); + } + // check the remaining modules before adding + while (!(it = iterator.next()).done) { + const module = it.value; + if ( + availableModules.has(module) || + availableModules.plus.has(m) + ) { + cachedMinAvailableModules.add(module); + } + } + cachedMinAvailableModules.plus = EMPTY_SET; + changed = true; + continue merge; + } + } + } + } else if (cachedMinAvailableModules.plus === availableModules.plus) { + // Common and fast case when the plus part is shared + // We only need to care about the normal part + if (availableModules.size < cachedMinAvailableModules.size) { + // the new availableModules is smaller so it's faster to + // fork from the new availableModules + statForkedAvailableModules++; + statForkedAvailableModulesCount += availableModules.size; + statForkedMergedModulesCount += cachedMinAvailableModules.size; + // construct a new Set as intersection of cachedMinAvailableModules and availableModules + const newSet = /** @type {ModuleSetPlus} */ (new Set()); + newSet.plus = availableModules.plus; + for (const m of availableModules) { + if (cachedMinAvailableModules.has(m)) { + newSet.add(m); + } + } + statForkedResultModulesCount += newSet.size; + cachedMinAvailableModules = newSet; + info.minAvailableModulesOwned = true; + info.minAvailableModules = newSet; + changed = true; + continue merge; + } + for (const m of cachedMinAvailableModules) { + if (!availableModules.has(m)) { + // cachedMinAvailableModules need to be modified + // but we don't own it + statForkedAvailableModules++; + statForkedAvailableModulesCount += + cachedMinAvailableModules.size; + statForkedMergedModulesCount += availableModules.size; + // construct a new Set as intersection of cachedMinAvailableModules and availableModules + // as the plus part is equal we can just take over this one + const newSet = /** @type {ModuleSetPlus} */ (new Set()); + newSet.plus = availableModules.plus; + const iterator = cachedMinAvailableModules[Symbol.iterator](); + // fast forward add all modules until m + /** @type {IteratorResult} */ + let it; + while (!(it = iterator.next()).done) { + const module = it.value; + if (module === m) break; + newSet.add(module); + } + // check the remaining modules before adding + while (!(it = iterator.next()).done) { + const module = it.value; + if (availableModules.has(module)) { + newSet.add(module); + } + } + statForkedResultModulesCount += newSet.size; + cachedMinAvailableModules = newSet; + info.minAvailableModulesOwned = true; + info.minAvailableModules = newSet; + changed = true; + continue merge; + } + } + } else { + for (const m of cachedMinAvailableModules) { + if (!availableModules.has(m) && !availableModules.plus.has(m)) { + // cachedMinAvailableModules need to be modified + // but we don't own it + statForkedAvailableModules++; + statForkedAvailableModulesCount += + cachedMinAvailableModules.size; + statForkedAvailableModulesCountPlus += + cachedMinAvailableModules.plus.size; + statForkedMergedModulesCount += availableModules.size; + statForkedMergedModulesCountPlus += availableModules.plus.size; + // construct a new Set as intersection of cachedMinAvailableModules and availableModules + const newSet = /** @type {ModuleSetPlus} */ (new Set()); + newSet.plus = EMPTY_SET; + const iterator = cachedMinAvailableModules[Symbol.iterator](); + // fast forward add all modules until m + /** @type {IteratorResult} */ + let it; + while (!(it = iterator.next()).done) { + const module = it.value; + if (module === m) break; + newSet.add(module); + } + // check the remaining modules before adding + while (!(it = iterator.next()).done) { + const module = it.value; + if ( + availableModules.has(module) || + availableModules.plus.has(module) + ) { + newSet.add(module); + } + } + // also check all modules in cachedMinAvailableModules.plus + for (const module of cachedMinAvailableModules.plus) { + if ( + availableModules.has(module) || + availableModules.plus.has(module) + ) { + newSet.add(module); + } + } + statForkedResultModulesCount += newSet.size; + cachedMinAvailableModules = newSet; + info.minAvailableModulesOwned = true; + info.minAvailableModules = newSet; + changed = true; + continue merge; + } + } + for (const m of cachedMinAvailableModules.plus) { + if (!availableModules.has(m) && !availableModules.plus.has(m)) { + // cachedMinAvailableModules need to be modified + // but we don't own it + statForkedAvailableModules++; + statForkedAvailableModulesCount += + cachedMinAvailableModules.size; + statForkedAvailableModulesCountPlus += + cachedMinAvailableModules.plus.size; + statForkedMergedModulesCount += availableModules.size; + statForkedMergedModulesCountPlus += availableModules.plus.size; + // construct a new Set as intersection of cachedMinAvailableModules and availableModules + // we already know that all modules directly from cachedMinAvailableModules are in availableModules too + const newSet = /** @type {ModuleSetPlus} */ (new Set( + cachedMinAvailableModules + )); + newSet.plus = EMPTY_SET; + const iterator = cachedMinAvailableModules.plus[ + Symbol.iterator + ](); + // fast forward add all modules until m + /** @type {IteratorResult} */ + let it; + while (!(it = iterator.next()).done) { + const module = it.value; + if (module === m) break; + newSet.add(module); + } + // check the remaining modules before adding + while (!(it = iterator.next()).done) { + const module = it.value; + if ( + availableModules.has(module) || + availableModules.plus.has(module) + ) { + newSet.add(module); + } + } + statForkedResultModulesCount += newSet.size; + cachedMinAvailableModules = newSet; + info.minAvailableModulesOwned = true; + info.minAvailableModules = newSet; + changed = true; + continue merge; + } + } + } + } + } + availableModulesToBeMerged.length = 0; + if (changed) { + info.resultingAvailableModules = undefined; + outdatedChunkGroupInfo.add(info); + } + } + chunkGroupsForMerging.clear(); + }; + + const processChunkGroupsForCombining = () => { + loop: for (const info of chunkGroupsForCombining) { + for (const source of info.availableSources) { + if (!source.minAvailableModules) continue loop; + } + const availableModules = /** @type {ModuleSetPlus} */ (new Set()); + availableModules.plus = EMPTY_SET; + const mergeSet = set => { + if (set.size > availableModules.plus.size) { + for (const item of availableModules.plus) availableModules.add(item); + availableModules.plus = set; + } else { + for (const item of set) availableModules.add(item); + } + }; + // combine minAvailableModules from all resultingAvailableModules + for (const source of info.availableSources) { + const resultingAvailableModules = calculateResultingAvailableModules( + source + ); + mergeSet(resultingAvailableModules); + mergeSet(resultingAvailableModules.plus); + } + info.minAvailableModules = availableModules; + info.minAvailableModulesOwned = false; + info.resultingAvailableModules = undefined; + outdatedChunkGroupInfo.add(info); + } + chunkGroupsForCombining.clear(); + }; + + const processOutdatedChunkGroupInfo = () => { + statChunkGroupInfoUpdated += outdatedChunkGroupInfo.size; + // Revisit skipped elements + for (const info of outdatedChunkGroupInfo) { + // 1. Reconsider skipped items + if (info.skippedItems !== undefined) { + const { minAvailableModules } = info; + for (const module of info.skippedItems) { + if ( + !minAvailableModules.has(module) && + !minAvailableModules.plus.has(module) + ) { + queue.push({ + action: ADD_AND_ENTER_MODULE, + block: module, + module, + chunk: info.chunkGroup.chunks[0], + chunkGroup: info.chunkGroup, + chunkGroupInfo: info + }); + info.skippedItems.delete(module); + } + } + } + + // 2. Reconsider skipped connections + if (info.skippedModuleConnections !== undefined) { + const { minAvailableModules, runtime } = info; + for (const entry of info.skippedModuleConnections) { + const [module, connections] = entry; + const activeState = getActiveStateOfConnections(connections, runtime); + if (activeState === false) continue; + if (activeState === true) { + info.skippedModuleConnections.delete(entry); + } + if ( + activeState === true && + (minAvailableModules.has(module) || + minAvailableModules.plus.has(module)) + ) { + info.skippedItems.add(module); + continue; + } + queue.push({ + action: activeState === true ? ADD_AND_ENTER_MODULE : PROCESS_BLOCK, + block: module, + module, + chunk: info.chunkGroup.chunks[0], + chunkGroup: info.chunkGroup, + chunkGroupInfo: info + }); + } + } + + // 2. Reconsider children chunk groups + if (info.children !== undefined) { + statChildChunkGroupsReconnected += info.children.size; + for (const cgi of info.children) { + let connectList = queueConnect.get(info); + if (connectList === undefined) { + connectList = new Set(); + queueConnect.set(info, connectList); + } + connectList.add(cgi); + } + } + + // 3. Reconsider chunk groups for combining + if (info.availableChildren !== undefined) { + for (const cgi of info.availableChildren) { + chunkGroupsForCombining.add(cgi); + } + } + } + outdatedChunkGroupInfo.clear(); + }; + + // Iterative traversal of the Module graph + // Recursive would be simpler to write but could result in Stack Overflows + while (queue.length || queueConnect.size) { + logger.time("visitModules: visiting"); + processQueue(); + logger.timeEnd("visitModules: visiting"); + + if (chunkGroupsForCombining.size > 0) { + logger.time("visitModules: combine available modules"); + processChunkGroupsForCombining(); + logger.timeEnd("visitModules: combine available modules"); + } + + if (queueConnect.size > 0) { + logger.time("visitModules: calculating available modules"); + processConnectQueue(); + logger.timeEnd("visitModules: calculating available modules"); + + if (chunkGroupsForMerging.size > 0) { + logger.time("visitModules: merging available modules"); + processChunkGroupsForMerging(); + logger.timeEnd("visitModules: merging available modules"); + } + } + + if (outdatedChunkGroupInfo.size > 0) { + logger.time("visitModules: check modules for revisit"); + processOutdatedChunkGroupInfo(); + logger.timeEnd("visitModules: check modules for revisit"); + } + + // Run queueDelayed when all items of the queue are processed + // This is important to get the global indexing correct + // Async blocks should be processed after all sync blocks are processed + if (queue.length === 0) { + const tempQueue = queue; + queue = queueDelayed.reverse(); + queueDelayed = tempQueue; + } + } + + logger.log( + `${statProcessedQueueItems} queue items processed (${statProcessedBlocks} blocks)` + ); + logger.log(`${statConnectedChunkGroups} chunk groups connected`); + logger.log( + `${statProcessedChunkGroupsForMerging} chunk groups processed for merging (${statMergedAvailableModuleSets} module sets, ${statForkedAvailableModules} forked, ${statForkedAvailableModulesCount} + ${statForkedAvailableModulesCountPlus} modules forked, ${statForkedMergedModulesCount} + ${statForkedMergedModulesCountPlus} modules merged into fork, ${statForkedResultModulesCount} resulting modules)` + ); + logger.log( + `${statChunkGroupInfoUpdated} chunk group info updated (${statChildChunkGroupsReconnected} already connected chunk groups reconnected)` + ); +}; + +/** + * + * @param {Compilation} compilation the compilation + * @param {Set} blocksWithNestedBlocks flag for blocks that have nested blocks + * @param {Map} blockConnections connection for blocks + * @param {Map} chunkGroupInfoMap mapping from chunk group to available modules + */ +const connectChunkGroups = ( + compilation, + blocksWithNestedBlocks, + blockConnections, + chunkGroupInfoMap +) => { + const { chunkGraph } = compilation; + + /** + * Helper function to check if all modules of a chunk are available + * + * @param {ChunkGroup} chunkGroup the chunkGroup to scan + * @param {ModuleSetPlus} availableModules the comparator set + * @returns {boolean} return true if all modules of a chunk are available + */ + const areModulesAvailable = (chunkGroup, availableModules) => { + for (const chunk of chunkGroup.chunks) { + for (const module of chunkGraph.getChunkModulesIterable(chunk)) { + if (!availableModules.has(module) && !availableModules.plus.has(module)) + return false; + } + } + return true; + }; + + // For each edge in the basic chunk graph + for (const [block, connections] of blockConnections) { + // 1. Check if connection is needed + // When none of the dependencies need to be connected + // we can skip all of them + // It's not possible to filter each item so it doesn't create inconsistent + // connections and modules can only create one version + // TODO maybe decide this per runtime + if ( + // TODO is this needed? + !blocksWithNestedBlocks.has(block) && + connections.every(({ chunkGroup, originChunkGroupInfo }) => + areModulesAvailable( + chunkGroup, + originChunkGroupInfo.resultingAvailableModules + ) + ) + ) { + continue; + } + + // 2. Foreach edge + for (let i = 0; i < connections.length; i++) { + const { chunkGroup, originChunkGroupInfo } = connections[i]; + + // 3. Connect block with chunk + chunkGraph.connectBlockAndChunkGroup(block, chunkGroup); + + // 4. Connect chunk with parent + connectChunkGroupParentAndChild( + originChunkGroupInfo.chunkGroup, + chunkGroup + ); + } + } +}; + +/** + * Remove all unconnected chunk groups + * @param {Compilation} compilation the compilation + * @param {Iterable} allCreatedChunkGroups all chunk groups that where created before + */ +const cleanupUnconnectedGroups = (compilation, allCreatedChunkGroups) => { + const { chunkGraph } = compilation; + + for (const chunkGroup of allCreatedChunkGroups) { + if (chunkGroup.getNumberOfParents() === 0) { + for (const chunk of chunkGroup.chunks) { + compilation.chunks.delete(chunk); + chunkGraph.disconnectChunk(chunk); + } + chunkGraph.disconnectChunkGroup(chunkGroup); + chunkGroup.remove(); + } + } +}; + +/** + * This method creates the Chunk graph from the Module graph + * @param {Compilation} compilation the compilation + * @param {Map} inputEntrypointsAndModules chunk groups which are processed with the modules + * @returns {void} + */ +const buildChunkGraph = (compilation, inputEntrypointsAndModules) => { + const logger = compilation.getLogger("webpack.buildChunkGraph"); + + // SHARED STATE + + /** @type {Map} */ + const blockConnections = new Map(); + + /** @type {Set} */ + const allCreatedChunkGroups = new Set(); + + /** @type {Map} */ + const chunkGroupInfoMap = new Map(); + + /** @type {Set} */ + const blocksWithNestedBlocks = new Set(); + + // PART ONE + + logger.time("visitModules"); + visitModules( + logger, + compilation, + inputEntrypointsAndModules, + chunkGroupInfoMap, + blockConnections, + blocksWithNestedBlocks, + allCreatedChunkGroups + ); + logger.timeEnd("visitModules"); + + // PART TWO + + logger.time("connectChunkGroups"); + connectChunkGroups( + compilation, + blocksWithNestedBlocks, + blockConnections, + chunkGroupInfoMap + ); + logger.timeEnd("connectChunkGroups"); + + for (const [chunkGroup, chunkGroupInfo] of chunkGroupInfoMap) { + for (const chunk of chunkGroup.chunks) + chunk.runtime = mergeRuntime(chunk.runtime, chunkGroupInfo.runtime); + } + + // Cleanup work + + logger.time("cleanup"); + cleanupUnconnectedGroups(compilation, allCreatedChunkGroups); + logger.timeEnd("cleanup"); +}; + +module.exports = buildChunkGraph; + + +/***/ }), + +/***/ 68965: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../Compiler")} Compiler */ + +class AddBuildDependenciesPlugin { + /** + * @param {Iterable} buildDependencies list of build dependencies + */ + constructor(buildDependencies) { + this.buildDependencies = new Set(buildDependencies); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "AddBuildDependenciesPlugin", + compilation => { + compilation.buildDependencies.addAll(this.buildDependencies); + } + ); + } +} + +module.exports = AddBuildDependenciesPlugin; + + +/***/ }), + +/***/ 41884: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../Compiler")} Compiler */ + +class AddManagedPathsPlugin { + /** + * @param {Iterable} managedPaths list of managed paths + * @param {Iterable} immutablePaths list of immutable paths + */ + constructor(managedPaths, immutablePaths) { + this.managedPaths = new Set(managedPaths); + this.immutablePaths = new Set(immutablePaths); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + for (const managedPath of this.managedPaths) { + compiler.managedPaths.add(managedPath); + } + for (const immutablePath of this.immutablePaths) { + compiler.immutablePaths.add(immutablePath); + } + } +} + +module.exports = AddManagedPathsPlugin; + + +/***/ }), + +/***/ 67462: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Cache = __webpack_require__(18338); +const ProgressPlugin = __webpack_require__(19336); + +/** @typedef {import("../Compiler")} Compiler */ + +const BUILD_DEPENDENCIES_KEY = Symbol(); + +class IdleFileCachePlugin { + /** + * @param {TODO} strategy cache strategy + * @param {number} idleTimeout timeout + * @param {number} idleTimeoutForInitialStore initial timeout + */ + constructor(strategy, idleTimeout, idleTimeoutForInitialStore) { + this.strategy = strategy; + this.idleTimeout = idleTimeout; + this.idleTimeoutForInitialStore = idleTimeoutForInitialStore; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const strategy = this.strategy; + const idleTimeout = this.idleTimeout; + const idleTimeoutForInitialStore = Math.min( + idleTimeout, + this.idleTimeoutForInitialStore + ); + + const resolvedPromise = Promise.resolve(); + + /** @type {Map Promise>} */ + const pendingIdleTasks = new Map(); + + compiler.cache.hooks.store.tap( + { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, + (identifier, etag, data) => { + pendingIdleTasks.set(identifier, () => + strategy.store(identifier, etag, data) + ); + } + ); + + compiler.cache.hooks.get.tapPromise( + { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, + (identifier, etag, gotHandlers) => { + return strategy.restore(identifier, etag).then(cacheEntry => { + if (cacheEntry === undefined) { + gotHandlers.push((result, callback) => { + if (result !== undefined) { + pendingIdleTasks.set(identifier, () => + strategy.store(identifier, etag, result) + ); + } + callback(); + }); + } else { + return cacheEntry; + } + }); + } + ); + + compiler.cache.hooks.storeBuildDependencies.tap( + { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, + dependencies => { + pendingIdleTasks.set(BUILD_DEPENDENCIES_KEY, () => + strategy.storeBuildDependencies(dependencies) + ); + } + ); + + compiler.cache.hooks.shutdown.tapPromise( + { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, + () => { + if (idleTimer) { + clearTimeout(idleTimer); + idleTimer = undefined; + } + isIdle = false; + const reportProgress = ProgressPlugin.getReporter(compiler); + const jobs = Array.from(pendingIdleTasks.values()); + if (reportProgress) reportProgress(0, "process pending cache items"); + const promises = jobs.map(fn => fn()); + pendingIdleTasks.clear(); + promises.push(currentIdlePromise); + const promise = Promise.all(promises); + currentIdlePromise = promise.then(() => strategy.afterAllStored()); + if (reportProgress) { + currentIdlePromise = currentIdlePromise.then(() => { + reportProgress(1, `stored`); + }); + } + return currentIdlePromise; + } + ); + + /** @type {Promise} */ + let currentIdlePromise = resolvedPromise; + let isIdle = false; + let isInitialStore = true; + const processIdleTasks = () => { + if (isIdle) { + if (pendingIdleTasks.size > 0) { + const promises = [currentIdlePromise]; + const maxTime = Date.now() + 100; + let maxCount = 100; + for (const [filename, factory] of pendingIdleTasks) { + pendingIdleTasks.delete(filename); + promises.push(factory()); + if (maxCount-- <= 0 || Date.now() > maxTime) break; + } + currentIdlePromise = Promise.all(promises); + currentIdlePromise.then(() => { + // Allow to exit the process between + setTimeout(processIdleTasks, 0).unref(); + }); + return; + } + currentIdlePromise = currentIdlePromise.then(() => + strategy.afterAllStored() + ); + isInitialStore = false; + } + }; + let idleTimer = undefined; + compiler.cache.hooks.beginIdle.tap( + { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, + () => { + idleTimer = setTimeout( + () => { + idleTimer = undefined; + isIdle = true; + resolvedPromise.then(processIdleTasks); + }, + isInitialStore ? idleTimeoutForInitialStore : idleTimeout + ); + idleTimer.unref(); + } + ); + compiler.cache.hooks.endIdle.tap( + { name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK }, + () => { + if (idleTimer) { + clearTimeout(idleTimer); + idleTimer = undefined; + } + isIdle = false; + } + ); + } +} + +module.exports = IdleFileCachePlugin; + + +/***/ }), + +/***/ 80662: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Cache = __webpack_require__(18338); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Cache").Etag} Etag */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +class MemoryCachePlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + /** @type {Map} */ + const cache = new Map(); + compiler.cache.hooks.store.tap( + { name: "MemoryCachePlugin", stage: Cache.STAGE_MEMORY }, + (identifier, etag, data) => { + cache.set(identifier, { etag, data }); + } + ); + compiler.cache.hooks.get.tap( + { name: "MemoryCachePlugin", stage: Cache.STAGE_MEMORY }, + (identifier, etag, gotHandlers) => { + const cacheEntry = cache.get(identifier); + if (cacheEntry === null) { + return null; + } else if (cacheEntry !== undefined) { + return cacheEntry.etag === etag ? cacheEntry.data : null; + } + gotHandlers.push((result, callback) => { + if (result === undefined) { + cache.set(identifier, null); + } else { + cache.set(identifier, { etag, data: result }); + } + return callback(); + }); + } + ); + } +} +module.exports = MemoryCachePlugin; + + +/***/ }), + +/***/ 19780: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const FileSystemInfo = __webpack_require__(50177); +const ProgressPlugin = __webpack_require__(19336); +const { formatSize } = __webpack_require__(50787); +const LazySet = __webpack_require__(60248); +const makeSerializable = __webpack_require__(55575); +const memoize = __webpack_require__(18003); +const { createFileSerializer } = __webpack_require__(29158); + +/** @typedef {import("../../declarations/WebpackOptions").SnapshotOptions} SnapshotOptions */ +/** @typedef {import("../Cache").Etag} Etag */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../FileSystemInfo").Snapshot} Snapshot */ +/** @typedef {import("../logging/Logger").Logger} Logger */ +/** @typedef {import("../util/fs").IntermediateFileSystem} IntermediateFileSystem */ + +class PackContainer { + /** + * @param {Object} data stored data + * @param {string} version version identifier + * @param {Snapshot} buildSnapshot snapshot of all build dependencies + * @param {Set} buildDependencies list of all unresolved build dependencies captured + * @param {Map} resolveResults result of the resolved build dependencies + * @param {Snapshot} resolveBuildDependenciesSnapshot snapshot of the dependencies of the build dependencies resolving + */ + constructor( + data, + version, + buildSnapshot, + buildDependencies, + resolveResults, + resolveBuildDependenciesSnapshot + ) { + this.data = data; + this.version = version; + this.buildSnapshot = buildSnapshot; + this.buildDependencies = buildDependencies; + this.resolveResults = resolveResults; + this.resolveBuildDependenciesSnapshot = resolveBuildDependenciesSnapshot; + } + + serialize({ write, writeLazy }) { + write(this.version); + write(this.buildSnapshot); + write(this.buildDependencies); + write(this.resolveResults); + write(this.resolveBuildDependenciesSnapshot); + writeLazy(this.data); + } + + deserialize({ read }) { + this.version = read(); + this.buildSnapshot = read(); + this.buildDependencies = read(); + this.resolveResults = read(); + this.resolveBuildDependenciesSnapshot = read(); + this.data = read(); + } +} + +makeSerializable( + PackContainer, + "webpack/lib/cache/PackFileCacheStrategy", + "PackContainer" +); + +const MIN_CONTENT_SIZE = 1024 * 1024; // 1 MB +const CONTENT_COUNT_TO_MERGE = 10; +const MAX_AGE = 1000 * 60 * 60 * 24 * 60; // 1 month +const MAX_ITEMS_IN_FRESH_PACK = 50000; + +class PackItemInfo { + /** + * @param {string} identifier identifier of item + * @param {string | null} etag etag of item + * @param {any} value fresh value of item + */ + constructor(identifier, etag, value) { + this.identifier = identifier; + this.etag = etag; + this.location = -1; + this.lastAccess = Date.now(); + this.freshValue = value; + } +} + +class Pack { + constructor(logger) { + /** @type {Map} */ + this.itemInfo = new Map(); + /** @type {string[]} */ + this.requests = []; + /** @type {Map} */ + this.freshContent = new Map(); + /** @type {(undefined | PackContent)[]} */ + this.content = []; + this.invalid = false; + this.logger = logger; + } + + /** + * @param {string} identifier unique name for the resource + * @param {string | null} etag etag of the resource + * @returns {any} cached content + */ + get(identifier, etag) { + const info = this.itemInfo.get(identifier); + this.requests.push(identifier); + if (info === undefined) { + return undefined; + } + if (info.etag !== etag) return null; + info.lastAccess = Date.now(); + const loc = info.location; + if (loc === -1) { + return info.freshValue; + } else { + if (!this.content[loc]) { + return undefined; + } + return this.content[loc].get(identifier); + } + } + + /** + * @param {string} identifier unique name for the resource + * @param {string | null} etag etag of the resource + * @param {any} data cached content + * @returns {void} + */ + set(identifier, etag, data) { + if (!this.invalid) { + this.invalid = true; + this.logger.log(`Pack got invalid because of write to: ${identifier}`); + } + const info = this.itemInfo.get(identifier); + if (info === undefined) { + const newInfo = new PackItemInfo(identifier, etag, data); + this.itemInfo.set(identifier, newInfo); + this.requests.push(identifier); + this.freshContent.set(identifier, newInfo); + } else { + const loc = info.location; + if (loc >= 0) { + this.requests.push(identifier); + this.freshContent.set(identifier, info); + const content = this.content[loc]; + content.delete(identifier); + if (content.items.size === 0) { + this.content[loc] = undefined; + this.logger.debug("Pack %d got empty and is removed", loc); + } + } + info.freshValue = data; + info.lastAccess = Date.now(); + info.etag = etag; + info.location = -1; + } + } + + /** + * @returns {number} new location of data entries + */ + _findLocation() { + let i; + for (i = 0; i < this.content.length && this.content[i] !== undefined; i++); + return i; + } + + _gcAndUpdateLocation(items, usedItems, newLoc) { + let count = 0; + let lastGC; + const now = Date.now(); + for (const identifier of items) { + const info = this.itemInfo.get(identifier); + if (now - info.lastAccess > MAX_AGE) { + this.itemInfo.delete(identifier); + items.delete(identifier); + usedItems.delete(identifier); + count++; + lastGC = identifier; + } else { + info.location = newLoc; + } + } + if (count > 0) { + this.logger.log( + "Garbage Collected %d old items at pack %d e. g. %s", + count, + newLoc, + lastGC + ); + } + } + + _persistFreshContent() { + if (this.freshContent.size > 0) { + const packCount = Math.ceil( + this.freshContent.size / MAX_ITEMS_IN_FRESH_PACK + ); + const itemsPerPack = Math.ceil(this.freshContent.size / packCount); + this.logger.log(`${this.freshContent.size} fresh items in cache`); + const packs = Array.from({ length: packCount }, () => { + const loc = this._findLocation(); + this.content[loc] = null; // reserve + return { + /** @type {Set} */ + items: new Set(), + /** @type {Map} */ + map: new Map(), + loc + }; + }); + let i = 0; + let pack = packs[0]; + let packIndex = 0; + for (const identifier of this.requests) { + const info = this.freshContent.get(identifier); + if (info === undefined) continue; + pack.items.add(identifier); + pack.map.set(identifier, info.freshValue); + info.location = pack.loc; + info.freshValue = undefined; + this.freshContent.delete(identifier); + if (++i > itemsPerPack) { + i = 0; + pack = packs[++packIndex]; + } + } + for (const pack of packs) { + this.content[pack.loc] = new PackContent( + pack.items, + new Set(pack.items), + new PackContentItems(pack.map) + ); + } + } + } + + /** + * Merges small content files to a single content file + */ + _optimizeSmallContent() { + // 1. Find all small content files + // Treat unused content files separately to avoid + // a merge-split cycle + /** @type {number[]} */ + const smallUsedContents = []; + /** @type {number} */ + let smallUsedContentSize = 0; + /** @type {number[]} */ + const smallUnusedContents = []; + /** @type {number} */ + let smallUnusedContentSize = 0; + for (let i = 0; i < this.content.length; i++) { + const content = this.content[i]; + if (content === undefined) continue; + if (content.outdated) continue; + const size = content.getSize(); + if (size < 0 || size > MIN_CONTENT_SIZE) continue; + if (content.used.size > 0) { + smallUsedContents.push(i); + smallUsedContentSize += size; + } else { + smallUnusedContents.push(i); + smallUnusedContentSize += size; + } + } + + // 2. Check if minimum number is reached + let mergedIndices; + if ( + smallUsedContents.length >= CONTENT_COUNT_TO_MERGE || + smallUsedContentSize > MIN_CONTENT_SIZE + ) { + mergedIndices = smallUsedContents; + } else if ( + smallUnusedContents.length >= CONTENT_COUNT_TO_MERGE || + smallUnusedContentSize > MIN_CONTENT_SIZE + ) { + mergedIndices = smallUnusedContents; + } else return; + + const mergedContent = []; + + // 3. Remove old content entries + for (const i of mergedIndices) { + mergedContent.push(this.content[i]); + this.content[i] = undefined; + } + + // 4. Determine merged items + /** @type {Set} */ + const mergedItems = new Set(); + /** @type {Set} */ + const mergedUsedItems = new Set(); + /** @type {(function(Map): Promise)[]} */ + const addToMergedMap = []; + for (const content of mergedContent) { + for (const identifier of content.items) { + mergedItems.add(identifier); + } + for (const identifer of content.used) { + mergedUsedItems.add(identifer); + } + addToMergedMap.push(async map => { + // unpack existing content + // after that values are accessible in .content + await content.unpack(); + for (const [identifier, value] of content.content) { + map.set(identifier, value); + } + }); + } + + // 5. GC and update location of merged items + const newLoc = this._findLocation(); + this._gcAndUpdateLocation(mergedItems, mergedUsedItems, newLoc); + + // 6. If not empty, store content somewhere + if (mergedItems.size > 0) { + this.content[newLoc] = new PackContent( + mergedItems, + mergedUsedItems, + memoize(async () => { + /** @type {Map} */ + const map = new Map(); + await Promise.all(addToMergedMap.map(fn => fn(map))); + return new PackContentItems(map); + }) + ); + this.logger.log( + "Merged %d small files with %d cache items into pack %d", + mergedContent.length, + mergedItems.size, + newLoc + ); + } + } + + /** + * Split large content files with used and unused items + * into two parts to separate used from unused items + */ + _optimizeUnusedContent() { + // 1. Find a large content file with used and unused items + for (let i = 0; i < this.content.length; i++) { + const content = this.content[i]; + if (content === undefined) continue; + const size = content.getSize(); + if (size < MIN_CONTENT_SIZE) continue; + const used = content.used.size; + const total = content.items.size; + if (used > 0 && used < total) { + // 2. Remove this content + this.content[i] = undefined; + + // 3. Determine items for the used content file + const usedItems = new Set(content.used); + const newLoc = this._findLocation(); + this._gcAndUpdateLocation(usedItems, usedItems, newLoc); + + // 4. Create content file for used items + if (usedItems.size > 0) { + this.content[newLoc] = new PackContent( + usedItems, + new Set(usedItems), + async () => { + await content.unpack(); + const map = new Map(); + for (const identifier of usedItems) { + map.set(identifier, content.content.get(identifier)); + } + return new PackContentItems(map); + } + ); + } + + // 5. Determine items for the unused content file + const unusedItems = new Set(content.items); + const usedOfUnusedItems = new Set(); + for (const identifier of usedItems) { + unusedItems.delete(identifier); + } + const newUnusedLoc = this._findLocation(); + this._gcAndUpdateLocation(unusedItems, usedOfUnusedItems, newUnusedLoc); + + // 6. Create content file for unused items + if (unusedItems.size > 0) { + this.content[newUnusedLoc] = new PackContent( + unusedItems, + usedOfUnusedItems, + async () => { + await content.unpack(); + const map = new Map(); + for (const identifier of unusedItems) { + map.set(identifier, content.content.get(identifier)); + } + return new PackContentItems(map); + } + ); + } + + this.logger.log( + "Split pack %d into pack %d with %d used items and pack %d with %d unused items", + i, + newLoc, + usedItems.size, + newUnusedLoc, + unusedItems.size + ); + + // optimizing only one of them is good enough and + // reduces the amount of serialization needed + return; + } + } + } + + serialize({ write, writeSeparate }) { + this._persistFreshContent(); + this._optimizeSmallContent(); + this._optimizeUnusedContent(); + for (const identifier of this.itemInfo.keys()) { + write(identifier); + } + write(null); // null as marker of the end of keys + for (const info of this.itemInfo.values()) { + write(info.etag); + } + for (const info of this.itemInfo.values()) { + write(info.lastAccess); + } + for (let i = 0; i < this.content.length; i++) { + const content = this.content[i]; + if (content !== undefined) { + write(content.items); + writeSeparate(content.getLazyContentItems(), { name: `${i}` }); + } else { + write(undefined); // undefined marks an empty content slot + } + } + write(null); // null as marker of the end of items + } + + deserialize({ read, logger }) { + this.logger = logger; + { + const items = []; + let item = read(); + while (item !== null) { + items.push(item); + item = read(); + } + this.itemInfo.clear(); + const infoItems = items.map(identifier => { + const info = new PackItemInfo(identifier, undefined, undefined); + this.itemInfo.set(identifier, info); + return info; + }); + for (const info of infoItems) { + info.etag = read(); + } + for (const info of infoItems) { + info.lastAccess = read(); + } + } + this.content.length = 0; + let items = read(); + while (items !== null) { + if (items === undefined) { + this.content.push(items); + } else { + const idx = this.content.length; + const lazy = read(); + this.content.push( + new PackContent( + items, + new Set(), + lazy, + logger, + `${this.content.length}` + ) + ); + for (const identifier of items) { + this.itemInfo.get(identifier).location = idx; + } + } + items = read(); + } + } +} + +makeSerializable(Pack, "webpack/lib/cache/PackFileCacheStrategy", "Pack"); + +class PackContentItems { + /** + * @param {Map} map items + */ + constructor(map) { + this.map = map; + } + + serialize({ write, snapshot, rollback, logger }) { + // Try to serialize all at once + const s = snapshot(); + try { + write(true); + write(this.map); + } catch (e) { + rollback(s); + + // Try to serialize each item on it's own + write(false); + for (const [key, value] of this.map) { + const s = snapshot(); + try { + write(key); + write(value); + } catch (e) { + rollback(s); + logger.warn( + `Skipped not serializable cache item '${key}': ${e.message}` + ); + logger.debug(e.stack); + } + } + write(null); + } + } + + deserialize({ read }) { + if (read()) { + this.map = read(); + } else { + const map = new Map(); + let key = read(); + while (key !== null) { + map.set(key, read()); + key = read(); + } + this.map = map; + } + } +} + +makeSerializable( + PackContentItems, + "webpack/lib/cache/PackFileCacheStrategy", + "PackContentItems" +); + +class PackContent { + /** + * @param {Set} items keys + * @param {Set} usedItems used keys + * @param {PackContentItems | function(): Promise} dataOrFn sync or async content + * @param {Logger=} logger logger for logging + * @param {string=} lazyName name of dataOrFn for logging + */ + constructor(items, usedItems, dataOrFn, logger, lazyName) { + this.items = items; + /** @type {function(): PackContentItems | Promise} */ + this.lazy = typeof dataOrFn === "function" ? dataOrFn : undefined; + /** @type {Map} */ + this.content = typeof dataOrFn === "function" ? undefined : dataOrFn.map; + this.outdated = false; + this.used = usedItems; + this.logger = logger; + this.lazyName = lazyName; + } + + get(identifier) { + this.used.add(identifier); + if (this.content) { + return this.content.get(identifier); + } + const { lazyName } = this; + let timeMessage; + if (lazyName) { + // only log once + this.lazyName = undefined; + timeMessage = `restore cache content ${lazyName} (${formatSize( + this.getSize() + )})`; + this.logger.log( + `starting to restore cache content ${lazyName} (${formatSize( + this.getSize() + )}) because of request to: ${identifier}` + ); + this.logger.time(timeMessage); + } + const value = this.lazy(); + if (value instanceof Promise) { + return value.then(data => { + const map = data.map; + if (timeMessage) { + this.logger.timeEnd(timeMessage); + } + this.content = map; + return map.get(identifier); + }); + } else { + const map = value.map; + if (timeMessage) { + this.logger.timeEnd(timeMessage); + } + this.content = map; + return map.get(identifier); + } + } + + /** + * @returns {void | Promise} maybe a promise if lazy + */ + unpack() { + if (this.content) return; + if (this.lazy) { + const { lazyName } = this; + let timeMessage; + if (lazyName) { + // only log once + this.lazyName = undefined; + timeMessage = `unpack cache content ${lazyName} (${formatSize( + this.getSize() + )})`; + this.logger.time(timeMessage); + } + const value = this.lazy(); + if (value instanceof Promise) { + return value.then(data => { + if (timeMessage) { + this.logger.timeEnd(timeMessage); + } + this.content = data.map; + }); + } else { + if (timeMessage) { + this.logger.timeEnd(timeMessage); + } + this.content = value.map; + } + } + } + + /** + * @returns {number} size of the content or -1 if not known + */ + getSize() { + if (!this.lazy) return -1; + const options = /** @type {any} */ (this.lazy).options; + if (!options) return -1; + const size = options.size; + if (typeof size !== "number") return -1; + return size; + } + + delete(identifier) { + this.items.delete(identifier); + this.used.delete(identifier); + this.outdated = true; + } + + /** + * @returns {function(): PackContentItems | Promise} lazy content items + */ + getLazyContentItems() { + if (!this.outdated && this.lazy) return this.lazy; + if (!this.outdated && this.content) { + const map = new Map(this.content); + return (this.lazy = memoize(() => new PackContentItems(map))); + } + this.outdated = false; + if (this.content) { + return (this.lazy = memoize(() => { + /** @type {Map} */ + const map = new Map(); + for (const item of this.items) { + map.set(item, this.content.get(item)); + } + return new PackContentItems(map); + })); + } + const lazy = this.lazy; + return (this.lazy = () => { + const value = lazy(); + if (value instanceof Promise) { + return value.then(data => { + const oldMap = data.map; + /** @type {Map} */ + const map = new Map(); + for (const item of this.items) { + map.set(item, oldMap.get(item)); + } + return new PackContentItems(map); + }); + } else { + const oldMap = value.map; + /** @type {Map} */ + const map = new Map(); + for (const item of this.items) { + map.set(item, oldMap.get(item)); + } + return new PackContentItems(map); + } + }); + } +} + +class PackFileCacheStrategy { + /** + * @param {Object} options options + * @param {Compiler} options.compiler the compiler + * @param {IntermediateFileSystem} options.fs the filesystem + * @param {string} options.context the context directory + * @param {string} options.cacheLocation the location of the cache data + * @param {string} options.version version identifier + * @param {Logger} options.logger a logger + * @param {SnapshotOptions} options.snapshot options regarding snapshotting + */ + constructor({ + compiler, + fs, + context, + cacheLocation, + version, + logger, + snapshot + }) { + this.fileSerializer = createFileSerializer(fs); + this.fileSystemInfo = new FileSystemInfo(fs, { + managedPaths: snapshot.managedPaths, + immutablePaths: snapshot.immutablePaths, + logger: logger.getChildLogger("webpack.FileSystemInfo") + }); + this.compiler = compiler; + this.context = context; + this.cacheLocation = cacheLocation; + this.version = version; + this.logger = logger; + this.snapshot = snapshot; + /** @type {Set} */ + this.buildDependencies = new Set(); + /** @type {LazySet} */ + this.newBuildDependencies = new LazySet(); + /** @type {Snapshot} */ + this.resolveBuildDependenciesSnapshot = undefined; + /** @type {Map} */ + this.resolveResults = undefined; + /** @type {Snapshot} */ + this.buildSnapshot = undefined; + /** @type {Promise} */ + this.packPromise = this._openPack(); + } + + /** + * @returns {Promise} the pack + */ + _openPack() { + const { logger, cacheLocation, version } = this; + /** @type {Snapshot} */ + let buildSnapshot; + /** @type {Set} */ + let buildDependencies; + /** @type {Set} */ + let newBuildDependencies; + /** @type {Snapshot} */ + let resolveBuildDependenciesSnapshot; + /** @type {Map} */ + let resolveResults; + logger.time("restore cache container"); + return this.fileSerializer + .deserialize(null, { + filename: `${cacheLocation}/index.pack`, + extension: ".pack", + logger + }) + .catch(err => { + if (err.code !== "ENOENT") { + logger.warn( + `Restoring pack failed from ${cacheLocation}.pack: ${err}` + ); + logger.debug(err.stack); + } else { + logger.debug(`No pack exists at ${cacheLocation}.pack: ${err}`); + } + return undefined; + }) + .then(packContainer => { + logger.timeEnd("restore cache container"); + if (!packContainer) return undefined; + if (!(packContainer instanceof PackContainer)) { + logger.warn( + `Restored pack from ${cacheLocation}.pack, but contained content is unexpected.`, + packContainer + ); + return undefined; + } + if (packContainer.version !== version) { + logger.log( + `Restored pack from ${cacheLocation}.pack, but version doesn't match.` + ); + return undefined; + } + logger.time("check build dependencies"); + return Promise.all([ + new Promise((resolve, reject) => { + this.fileSystemInfo.checkSnapshotValid( + packContainer.buildSnapshot, + (err, valid) => { + if (err) { + logger.log( + `Restored pack from ${cacheLocation}.pack, but checking snapshot of build dependencies errored: ${err}.` + ); + logger.debug(err.stack); + return resolve(false); + } + if (!valid) { + logger.log( + `Restored pack from ${cacheLocation}.pack, but build dependencies have changed.` + ); + return resolve(false); + } + buildSnapshot = packContainer.buildSnapshot; + return resolve(true); + } + ); + }), + new Promise((resolve, reject) => { + this.fileSystemInfo.checkSnapshotValid( + packContainer.resolveBuildDependenciesSnapshot, + (err, valid) => { + if (err) { + logger.log( + `Restored pack from ${cacheLocation}.pack, but checking snapshot of resolving of build dependencies errored: ${err}.` + ); + logger.debug(err.stack); + return resolve(false); + } + if (valid) { + resolveBuildDependenciesSnapshot = + packContainer.resolveBuildDependenciesSnapshot; + buildDependencies = packContainer.buildDependencies; + resolveResults = packContainer.resolveResults; + return resolve(true); + } + logger.log( + "resolving of build dependencies is invalid, will re-resolve build dependencies" + ); + this.fileSystemInfo.checkResolveResultsValid( + packContainer.resolveResults, + (err, valid) => { + if (err) { + logger.log( + `Restored pack from ${cacheLocation}.pack, but resolving of build dependencies errored: ${err}.` + ); + logger.debug(err.stack); + return resolve(false); + } + if (valid) { + newBuildDependencies = packContainer.buildDependencies; + resolveResults = packContainer.resolveResults; + return resolve(true); + } + logger.log( + `Restored pack from ${cacheLocation}.pack, but build dependencies resolve to different locations.` + ); + return resolve(false); + } + ); + } + ); + }) + ]) + .catch(err => { + logger.timeEnd("check build dependencies"); + throw err; + }) + .then(([buildSnapshotValid, resolveValid]) => { + logger.timeEnd("check build dependencies"); + if (buildSnapshotValid && resolveValid) { + logger.time("restore cache content metadata"); + const d = packContainer.data(); + logger.timeEnd("restore cache content metadata"); + return d; + } + return undefined; + }); + }) + .then(pack => { + if (pack) { + this.buildSnapshot = buildSnapshot; + if (buildDependencies) this.buildDependencies = buildDependencies; + if (newBuildDependencies) + this.newBuildDependencies.addAll(newBuildDependencies); + this.resolveResults = resolveResults; + this.resolveBuildDependenciesSnapshot = resolveBuildDependenciesSnapshot; + return pack; + } + return new Pack(logger); + }) + .catch(err => { + this.logger.warn( + `Restoring pack from ${cacheLocation}.pack failed: ${err}` + ); + this.logger.debug(err.stack); + return new Pack(logger); + }); + } + + /** + * @param {string} identifier unique name for the resource + * @param {Etag | null} etag etag of the resource + * @param {any} data cached content + * @returns {Promise} promise + */ + store(identifier, etag, data) { + return this.packPromise.then(pack => { + pack.set(identifier, etag === null ? null : etag.toString(), data); + }); + } + + /** + * @param {string} identifier unique name for the resource + * @param {Etag | null} etag etag of the resource + * @returns {Promise} promise to the cached content + */ + restore(identifier, etag) { + return this.packPromise + .then(pack => + pack.get(identifier, etag === null ? null : etag.toString()) + ) + .catch(err => { + if (err && err.code !== "ENOENT") { + this.logger.warn( + `Restoring failed for ${identifier} from pack: ${err}` + ); + this.logger.debug(err.stack); + } + }); + } + + storeBuildDependencies(dependencies) { + this.newBuildDependencies.addAll(dependencies); + } + + afterAllStored() { + const reportProgress = ProgressPlugin.getReporter(this.compiler); + return this.packPromise + .then(pack => { + if (!pack.invalid) return; + this.logger.log(`Storing pack...`); + let promise; + const newBuildDependencies = new Set(); + for (const dep of this.newBuildDependencies) { + if (!this.buildDependencies.has(dep)) { + newBuildDependencies.add(dep); + } + } + if (newBuildDependencies.size > 0 || !this.buildSnapshot) { + if (reportProgress) reportProgress(0.5, "resolve build dependencies"); + this.logger.debug( + `Capturing build dependencies... (${Array.from( + newBuildDependencies + ).join(", ")})` + ); + promise = new Promise((resolve, reject) => { + this.logger.time("resolve build dependencies"); + this.fileSystemInfo.resolveBuildDependencies( + this.context, + newBuildDependencies, + (err, result) => { + this.logger.timeEnd("resolve build dependencies"); + if (err) return reject(err); + + this.logger.time("snapshot build dependencies"); + const { + files, + directories, + missing, + resolveResults, + resolveDependencies + } = result; + if (this.resolveResults) { + for (const [key, value] of resolveResults) { + this.resolveResults.set(key, value); + } + } else { + this.resolveResults = resolveResults; + } + if (reportProgress) { + reportProgress( + 0.6, + "snapshot build dependencies", + "resolving" + ); + } + this.fileSystemInfo.createSnapshot( + undefined, + resolveDependencies.files, + resolveDependencies.directories, + resolveDependencies.missing, + this.snapshot.resolveBuildDependencies, + (err, snapshot) => { + if (err) { + this.logger.timeEnd("snapshot build dependencies"); + return reject(err); + } + if (!snapshot) { + this.logger.timeEnd("snapshot build dependencies"); + return reject( + new Error("Unable to snapshot resolve dependencies") + ); + } + if (this.resolveBuildDependenciesSnapshot) { + this.resolveBuildDependenciesSnapshot = this.fileSystemInfo.mergeSnapshots( + this.resolveBuildDependenciesSnapshot, + snapshot + ); + } else { + this.resolveBuildDependenciesSnapshot = snapshot; + } + if (reportProgress) { + reportProgress( + 0.7, + "snapshot build dependencies", + "modules" + ); + } + this.fileSystemInfo.createSnapshot( + undefined, + files, + directories, + missing, + this.snapshot.buildDependencies, + (err, snapshot) => { + this.logger.timeEnd("snapshot build dependencies"); + if (err) return reject(err); + if (!snapshot) { + return reject( + new Error("Unable to snapshot build dependencies") + ); + } + this.logger.debug("Captured build dependencies"); + + if (this.buildSnapshot) { + this.buildSnapshot = this.fileSystemInfo.mergeSnapshots( + this.buildSnapshot, + snapshot + ); + } else { + this.buildSnapshot = snapshot; + } + + resolve(); + } + ); + } + ); + } + ); + }); + } else { + promise = Promise.resolve(); + } + return promise.then(() => { + if (reportProgress) reportProgress(0.8, "serialize pack"); + this.logger.time(`store pack`); + const content = new PackContainer( + pack, + this.version, + this.buildSnapshot, + this.buildDependencies, + this.resolveResults, + this.resolveBuildDependenciesSnapshot + ); + // You might think this breaks all access to the existing pack + // which are still referenced, but serializing the pack memorizes + // all data in the pack and makes it no longer need the backing file + // So it's safe to replace the pack file + return this.fileSerializer + .serialize(content, { + filename: `${this.cacheLocation}/index.pack`, + extension: ".pack", + logger: this.logger + }) + .then(() => { + for (const dep of newBuildDependencies) { + this.buildDependencies.add(dep); + } + this.newBuildDependencies.clear(); + this.logger.timeEnd(`store pack`); + this.logger.log(`Stored pack`); + }) + .catch(err => { + this.logger.timeEnd(`store pack`); + this.logger.warn(`Caching failed for pack: ${err}`); + this.logger.debug(err.stack); + }); + }); + }) + .catch(err => { + this.logger.warn(`Caching failed for pack: ${err}`); + this.logger.debug(err.stack); + }); + } +} + +module.exports = PackFileCacheStrategy; + + +/***/ }), + +/***/ 52607: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const LazySet = __webpack_require__(60248); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("enhanced-resolve/lib/Resolver")} Resolver */ +/** @typedef {import("../CacheFacade").ItemCacheFacade} ItemCacheFacade */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../FileSystemInfo")} FileSystemInfo */ +/** @typedef {import("../FileSystemInfo").Snapshot} Snapshot */ + +class CacheEntry { + constructor(result, snapshot) { + this.result = result; + this.snapshot = snapshot; + } + + serialize({ write }) { + write(this.result); + write(this.snapshot); + } + + deserialize({ read }) { + this.result = read(); + this.snapshot = read(); + } +} + +makeSerializable(CacheEntry, "webpack/lib/cache/ResolverCachePlugin"); + +/** + * @template T + * @param {Set | LazySet} set set to add items to + * @param {Set | LazySet} otherSet set to add items from + * @returns {void} + */ +const addAllToSet = (set, otherSet) => { + if ("addAll" in set) { + set.addAll(otherSet); + } else { + for (const item of otherSet) { + set.add(item); + } + } +}; + +/** + * @param {Object} object an object + * @param {boolean} excludeContext if true, context is not included in string + * @returns {string} stringified version + */ +const objectToString = (object, excludeContext) => { + let str = ""; + for (const key in object) { + if (excludeContext && key === "context") continue; + const value = object[key]; + if (typeof value === "object" && value !== null) { + str += `|${key}=[${objectToString(value, false)}|]`; + } else { + str += `|${key}=|${value}`; + } + } + return str; +}; + +class ResolverCachePlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const cache = compiler.getCache("ResolverCachePlugin"); + /** @type {FileSystemInfo} */ + let fileSystemInfo; + let snapshotOptions; + let realResolves = 0; + let cachedResolves = 0; + let cacheInvalidResolves = 0; + let concurrentResolves = 0; + compiler.hooks.thisCompilation.tap("ResolverCachePlugin", compilation => { + snapshotOptions = compilation.options.snapshot.resolve; + fileSystemInfo = compilation.fileSystemInfo; + compilation.hooks.finishModules.tap("ResolverCachePlugin", () => { + if (realResolves + cachedResolves > 0) { + const logger = compilation.getLogger("webpack.ResolverCachePlugin"); + logger.log( + `${Math.round( + (100 * realResolves) / (realResolves + cachedResolves) + )}% really resolved (${realResolves} real resolves with ${cacheInvalidResolves} cached but invalid, ${cachedResolves} cached valid, ${concurrentResolves} concurrent)` + ); + realResolves = 0; + cachedResolves = 0; + cacheInvalidResolves = 0; + concurrentResolves = 0; + } + }); + }); + /** + * @param {ItemCacheFacade} itemCache cache + * @param {Resolver} resolver the resolver + * @param {Object} resolveContext context for resolving meta info + * @param {Object} request the request info object + * @param {function(Error=, Object=): void} callback callback function + * @returns {void} + */ + const doRealResolve = ( + itemCache, + resolver, + resolveContext, + request, + callback + ) => { + realResolves++; + const newRequest = { + _ResolverCachePluginCacheMiss: true, + ...request + }; + const newResolveContext = { + ...resolveContext, + stack: new Set(), + missingDependencies: new LazySet(), + fileDependencies: new LazySet(), + contextDependencies: new LazySet() + }; + const propagate = key => { + if (resolveContext[key]) { + addAllToSet(resolveContext[key], newResolveContext[key]); + } + }; + const resolveTime = Date.now(); + resolver.doResolve( + resolver.hooks.resolve, + newRequest, + "Cache miss", + newResolveContext, + (err, result) => { + propagate("fileDependencies"); + propagate("contextDependencies"); + propagate("missingDependencies"); + if (err) return callback(err); + const fileDependencies = newResolveContext.fileDependencies; + const contextDependencies = newResolveContext.contextDependencies; + const missingDependencies = newResolveContext.missingDependencies; + fileSystemInfo.createSnapshot( + resolveTime, + fileDependencies, + contextDependencies, + missingDependencies, + snapshotOptions, + (err, snapshot) => { + if (err) return callback(err); + if (!snapshot) { + if (result) return callback(null, result); + return callback(); + } + itemCache.store(new CacheEntry(result, snapshot), storeErr => { + if (storeErr) return callback(storeErr); + if (result) return callback(null, result); + callback(); + }); + } + ); + } + ); + }; + compiler.resolverFactory.hooks.resolver.intercept({ + factory(type, hook) { + /** @type {Map} */ + const activeRequests = new Map(); + hook.tap( + "ResolverCachePlugin", + /** + * @param {Resolver} resolver the resolver + * @param {Object} options resolve options + * @param {Object} userOptions resolve options passed by the user + * @returns {void} + */ + (resolver, options, userOptions) => { + if (options.cache !== true) return; + const optionsIdent = objectToString(userOptions, false); + const cacheWithContext = + options.cacheWithContext !== undefined + ? options.cacheWithContext + : false; + resolver.hooks.resolve.tapAsync( + { + name: "ResolverCachePlugin", + stage: -100 + }, + (request, resolveContext, callback) => { + if (request._ResolverCachePluginCacheMiss || !fileSystemInfo) { + return callback(); + } + const identifier = `${type}${optionsIdent}${objectToString( + request, + !cacheWithContext + )}`; + const activeRequest = activeRequests.get(identifier); + if (activeRequest) { + activeRequest.push(callback); + return; + } + const itemCache = cache.getItemCache(identifier, null); + let callbacks; + const done = (err, result) => { + if (callbacks === undefined) { + callback(err, result); + callbacks = false; + } else { + for (const callback of callbacks) { + callback(err, result); + } + activeRequests.delete(identifier); + callbacks = false; + } + }; + /** + * @param {Error=} err error if any + * @param {CacheEntry=} cacheEntry cache entry + * @returns {void} + */ + const processCacheResult = (err, cacheEntry) => { + if (err) return done(err); + + if (cacheEntry) { + const { snapshot, result } = cacheEntry; + fileSystemInfo.checkSnapshotValid( + snapshot, + (err, valid) => { + if (err || !valid) { + cacheInvalidResolves++; + return doRealResolve( + itemCache, + resolver, + resolveContext, + request, + done + ); + } + cachedResolves++; + if (resolveContext.missingDependencies) { + addAllToSet( + resolveContext.missingDependencies, + snapshot.getMissingIterable() + ); + } + if (resolveContext.fileDependencies) { + addAllToSet( + resolveContext.fileDependencies, + snapshot.getFileIterable() + ); + } + if (resolveContext.contextDependencies) { + addAllToSet( + resolveContext.contextDependencies, + snapshot.getContextIterable() + ); + } + done(null, result); + } + ); + } else { + doRealResolve( + itemCache, + resolver, + resolveContext, + request, + done + ); + } + }; + itemCache.get(processCacheResult); + if (callbacks === undefined) { + callbacks = [callback]; + activeRequests.set(identifier, callbacks); + } + } + ); + } + ); + return hook; + } + }); + } +} + +module.exports = ResolverCachePlugin; + + +/***/ }), + +/***/ 79610: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const createHash = __webpack_require__(34627); + +/** @typedef {import("../util/Hash")} Hash */ + +/** + * @typedef {Object} HashableObject + * @property {function(Hash): void} updateHash + */ + +class LazyHashedEtag { + /** + * @param {HashableObject} obj object with updateHash method + */ + constructor(obj) { + this._obj = obj; + this._hash = undefined; + } + + /** + * @returns {string} hash of object + */ + toString() { + if (this._hash === undefined) { + const hash = createHash("md4"); + this._obj.updateHash(hash); + this._hash = /** @type {string} */ (hash.digest("base64")); + } + return this._hash; + } +} + +/** @type {WeakMap} */ +const map = new WeakMap(); + +/** + * @param {HashableObject} obj object with updateHash method + * @returns {LazyHashedEtag} etag + */ +const getter = obj => { + const hash = map.get(obj); + if (hash !== undefined) return hash; + const newHash = new LazyHashedEtag(obj); + map.set(obj, newHash); + return newHash; +}; + +module.exports = getter; + + +/***/ }), + +/***/ 35414: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../Cache").Etag} Etag */ + +class MergedEtag { + /** + * @param {Etag} a first + * @param {Etag} b second + */ + constructor(a, b) { + this.a = a; + this.b = b; + } + + toString() { + return `${this.a.toString()}|${this.b.toString()}`; + } +} + +const dualObjectMap = new WeakMap(); +const objectStringMap = new WeakMap(); + +/** + * @param {Etag} a first + * @param {Etag} b second + * @returns {Etag} result + */ +const mergeEtags = (a, b) => { + if (typeof a === "string") { + if (typeof b === "string") { + return `${a}|${b}`; + } else { + const temp = b; + b = a; + a = temp; + } + } else { + if (typeof b !== "string") { + // both a and b are objects + let map = dualObjectMap.get(a); + if (map === undefined) { + dualObjectMap.set(a, (map = new WeakMap())); + } + const mergedEtag = map.get(b); + if (mergedEtag === undefined) { + const newMergedEtag = new MergedEtag(a, b); + map.set(b, newMergedEtag); + return newMergedEtag; + } else { + return mergedEtag; + } + } + } + // a is object, b is string + let map = objectStringMap.get(a); + if (map === undefined) { + objectStringMap.set(a, (map = new Map())); + } + const mergedEtag = map.get(b); + if (mergedEtag === undefined) { + const newMergedEtag = new MergedEtag(a, b); + map.set(b, newMergedEtag); + return newMergedEtag; + } else { + return mergedEtag; + } +}; + +module.exports = mergeEtags; + + +/***/ }), + +/***/ 84717: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const path = __webpack_require__(85622); +const webpackSchema = __webpack_require__(15546); + +// TODO add originPath to PathItem for better errors +/** + * @typedef {Object} PathItem + * @property {any} schema the part of the schema + * @property {string} path the path in the config + */ + +/** @typedef {"unknown-argument" | "unexpected-non-array-in-path" | "unexpected-non-object-in-path" | "multiple-values-unexpected" | "invalid-value"} ProblemType */ + +/** + * @typedef {Object} Problem + * @property {ProblemType} type + * @property {string} path + * @property {string} argument + * @property {any=} value + * @property {number=} index + * @property {string=} expected + */ + +/** + * @typedef {Object} LocalProblem + * @property {ProblemType} type + * @property {string} path + * @property {string=} expected + */ + +/** + * @typedef {Object} ArgumentConfig + * @property {string} description + * @property {string} path + * @property {boolean} multiple + * @property {"enum"|"string"|"path"|"number"|"boolean"|"RegExp"|"reset"} type + * @property {any[]=} values + */ + +/** + * @typedef {Object} Argument + * @property {string} description + * @property {"string"|"number"|"boolean"} simpleType + * @property {boolean} multiple + * @property {ArgumentConfig[]} configs + */ + +/** + * @param {any=} schema a json schema to create arguments for (by default webpack schema is used) + * @returns {Record} object of arguments + */ +const getArguments = (schema = webpackSchema) => { + /** @type {Record} */ + const flags = {}; + + const pathToArgumentName = input => { + return input + .replace(/\./g, "-") + .replace(/\[\]/g, "") + .replace( + /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/gu, + "$1-$2" + ) + .replace(/-?[^\p{Uppercase_Letter}\p{Lowercase_Letter}\d]+/gu, "-") + .toLowerCase(); + }; + + const getSchemaPart = path => { + const newPath = path.split("/"); + + let schemaPart = schema; + + for (let i = 1; i < newPath.length; i++) { + const inner = schemaPart[newPath[i]]; + + if (!inner) { + break; + } + + schemaPart = inner; + } + + return schemaPart; + }; + + /** + * + * @param {PathItem[]} path path in the schema + * @returns {string | undefined} description + */ + const getDescription = path => { + for (const { schema } of path) { + if (schema.cli && schema.cli.helper) continue; + if (schema.description) return schema.description; + } + }; + + /** + * + * @param {any} schemaPart schema + * @returns {Pick} partial argument config + */ + const schemaToArgumentConfig = schemaPart => { + if (schemaPart.enum) { + return { + type: "enum", + values: schemaPart.enum + }; + } + switch (schemaPart.type) { + case "number": + return { + type: "number" + }; + case "string": + return { + type: schemaPart.absolutePath ? "path" : "string" + }; + case "boolean": + return { + type: "boolean" + }; + } + if (schemaPart.instanceof === "RegExp") { + return { + type: "RegExp" + }; + } + return undefined; + }; + + /** + * @param {PathItem[]} path path in the schema + * @returns {void} + */ + const addResetFlag = path => { + const schemaPath = path[0].path; + const name = pathToArgumentName(`${schemaPath}.reset`); + const description = getDescription(path); + flags[name] = { + configs: [ + { + type: "reset", + multiple: false, + description: `Clear all items provided in configuration. ${description}`, + path: schemaPath + } + ], + description: undefined, + simpleType: undefined, + multiple: undefined + }; + }; + + /** + * @param {PathItem[]} path full path in schema + * @param {boolean} multiple inside of an array + * @returns {number} number of arguments added + */ + const addFlag = (path, multiple) => { + const argConfigBase = schemaToArgumentConfig(path[0].schema); + if (!argConfigBase) return 0; + + const name = pathToArgumentName(path[0].path); + /** @type {ArgumentConfig} */ + const argConfig = { + ...argConfigBase, + multiple, + description: getDescription(path), + path: path[0].path + }; + + if (!flags[name]) { + flags[name] = { + configs: [], + description: undefined, + simpleType: undefined, + multiple: undefined + }; + } + + if ( + flags[name].configs.some( + item => JSON.stringify(item) === JSON.stringify(argConfig) + ) + ) { + return 0; + } + + if ( + flags[name].configs.some( + item => item.type === argConfig.type && item.multiple !== multiple + ) + ) { + if (multiple) { + throw new Error( + `Conflicting schema for ${path[0].path} with ${argConfig.type} type (array type must be before single item type)` + ); + } + return 0; + } + + flags[name].configs.push(argConfig); + + return 1; + }; + + // TODO support `not` and `if/then/else` + // TODO support `const`, but we don't use it on our schema + /** + * + * @param {object} schemaPart the current schema + * @param {string} schemaPath the current path in the schema + * @param {{schema: object, path: string}[]} path all previous visited schemaParts + * @param {string | null} inArray if inside of an array, the path to the array + * @returns {number} added arguments + */ + const traverse = (schemaPart, schemaPath = "", path = [], inArray = null) => { + while (schemaPart.$ref) { + schemaPart = getSchemaPart(schemaPart.$ref); + } + + const repetitions = path.filter(({ schema }) => schema === schemaPart); + if ( + repetitions.length >= 2 || + repetitions.some(({ path }) => path === schemaPath) + ) { + return 0; + } + + if (schemaPart.cli && schemaPart.cli.exclude) return 0; + + const fullPath = [{ schema: schemaPart, path: schemaPath }, ...path]; + + let addedArguments = 0; + + addedArguments += addFlag(fullPath, !!inArray); + + if (schemaPart.type === "object") { + if (schemaPart.properties) { + for (const property of Object.keys(schemaPart.properties)) { + addedArguments += traverse( + schemaPart.properties[property], + schemaPath ? `${schemaPath}.${property}` : property, + fullPath, + inArray + ); + } + } + + return addedArguments; + } + + if (schemaPart.type === "array") { + if (inArray) { + return 0; + } + if (Array.isArray(schemaPart.items)) { + let i = 0; + for (const item of schemaPart.items) { + addedArguments += traverse( + item, + `${schemaPath}.${i}`, + fullPath, + schemaPath + ); + } + + return addedArguments; + } + + addedArguments += traverse( + schemaPart.items, + `${schemaPath}[]`, + fullPath, + schemaPath + ); + + if (addedArguments > 0) { + addResetFlag(fullPath); + addedArguments++; + } + + return addedArguments; + } + + const maybeOf = schemaPart.oneOf || schemaPart.anyOf || schemaPart.allOf; + + if (maybeOf) { + const items = maybeOf; + + for (let i = 0; i < items.length; i++) { + addedArguments += traverse(items[i], schemaPath, fullPath, inArray); + } + + return addedArguments; + } + + return addedArguments; + }; + + traverse(schema); + + // Summarize flags + for (const name of Object.keys(flags)) { + const argument = flags[name]; + argument.description = argument.configs.reduce((desc, { description }) => { + if (!desc) return description; + if (!description) return desc; + if (desc.includes(description)) return desc; + return `${desc} ${description}`; + }, /** @type {string | undefined} */ (undefined)); + argument.simpleType = argument.configs.reduce((t, argConfig) => { + /** @type {"string" | "number" | "boolean"} */ + let type = "string"; + switch (argConfig.type) { + case "number": + type = "number"; + break; + case "reset": + case "boolean": + type = "boolean"; + break; + case "enum": + if (argConfig.values.every(v => typeof v === "boolean")) + type = "boolean"; + if (argConfig.values.every(v => typeof v === "number")) + type = "number"; + break; + } + if (t === undefined) return type; + return t === type ? t : "string"; + }, /** @type {"string" | "number" | "boolean" | undefined} */ (undefined)); + argument.multiple = argument.configs.some(c => c.multiple); + } + + return flags; +}; + +const cliAddedItems = new WeakMap(); + +/** + * @param {any} config configuration + * @param {string} schemaPath path in the config + * @param {number | undefined} index index of value when multiple values are provided, otherwise undefined + * @returns {{ problem?: LocalProblem, object?: any, property?: string | number, value?: any }} problem or object with property and value + */ +const getObjectAndProperty = (config, schemaPath, index = 0) => { + if (!schemaPath) return { value: config }; + const parts = schemaPath.split("."); + let property = parts.pop(); + let current = config; + let i = 0; + for (const part of parts) { + const isArray = part.endsWith("[]"); + const name = isArray ? part.slice(0, -2) : part; + let value = current[name]; + if (isArray) { + if (value === undefined) { + value = {}; + current[name] = [...Array.from({ length: index }), value]; + cliAddedItems.set(current[name], index + 1); + } else if (!Array.isArray(value)) { + return { + problem: { + type: "unexpected-non-array-in-path", + path: parts.slice(0, i).join(".") + } + }; + } else { + let addedItems = cliAddedItems.get(value) || 0; + while (addedItems <= index) { + value.push(undefined); + addedItems++; + } + cliAddedItems.set(value, addedItems); + const x = value.length - addedItems + index; + if (value[x] === undefined) { + value[x] = {}; + } else if (value[x] === null || typeof value[x] !== "object") { + return { + problem: { + type: "unexpected-non-object-in-path", + path: parts.slice(0, i).join(".") + } + }; + } + value = value[x]; + } + } else { + if (value === undefined) { + value = current[name] = {}; + } else if (value === null || typeof value !== "object") { + return { + problem: { + type: "unexpected-non-object-in-path", + path: parts.slice(0, i).join(".") + } + }; + } + } + current = value; + i++; + } + let value = current[property]; + if (property.endsWith("[]")) { + const name = property.slice(0, -2); + const value = current[name]; + if (value === undefined) { + current[name] = [...Array.from({ length: index }), undefined]; + cliAddedItems.set(current[name], index + 1); + return { object: current[name], property: index, value: undefined }; + } else if (!Array.isArray(value)) { + current[name] = [value, ...Array.from({ length: index }), undefined]; + cliAddedItems.set(current[name], index + 1); + return { object: current[name], property: index + 1, value: undefined }; + } else { + let addedItems = cliAddedItems.get(value) || 0; + while (addedItems <= index) { + value.push(undefined); + addedItems++; + } + cliAddedItems.set(value, addedItems); + const x = value.length - addedItems + index; + if (value[x] === undefined) { + value[x] = {}; + } else if (value[x] === null || typeof value[x] !== "object") { + return { + problem: { + type: "unexpected-non-object-in-path", + path: schemaPath + } + }; + } + return { + object: value, + property: x, + value: value[x] + }; + } + } + return { object: current, property, value }; +}; + +/** + * @param {any} config configuration + * @param {string} schemaPath path in the config + * @param {any} value parsed value + * @param {number | undefined} index index of value when multiple values are provided, otherwise undefined + * @returns {LocalProblem | null} problem or null for success + */ +const setValue = (config, schemaPath, value, index) => { + const { problem, object, property } = getObjectAndProperty( + config, + schemaPath, + index + ); + if (problem) return problem; + object[property] = value; + return null; +}; + +/** + * @param {ArgumentConfig} argConfig processing instructions + * @param {any} config configuration + * @param {any} value the value + * @param {number | undefined} index the index if multiple values provided + * @returns {LocalProblem | null} a problem if any + */ +const processArgumentConfig = (argConfig, config, value, index) => { + if (index !== undefined && !argConfig.multiple) { + return { + type: "multiple-values-unexpected", + path: argConfig.path + }; + } + const parsed = parseValueForArgumentConfig(argConfig, value); + if (parsed === undefined) { + return { + type: "invalid-value", + path: argConfig.path, + expected: getExpectedValue(argConfig) + }; + } + const problem = setValue(config, argConfig.path, parsed, index); + if (problem) return problem; + return null; +}; + +/** + * @param {ArgumentConfig} argConfig processing instructions + * @returns {string | undefined} expected message + */ +const getExpectedValue = argConfig => { + switch (argConfig.type) { + default: + return argConfig.type; + case "boolean": + return "true | false"; + case "RegExp": + return "regular expression (example: /ab?c*/)"; + case "enum": + return argConfig.values.map(v => `${v}`).join(" | "); + case "reset": + return "true (will reset the previous value to an empty array)"; + } +}; + +/** + * @param {ArgumentConfig} argConfig processing instructions + * @param {any} value the value + * @returns {any | undefined} parsed value + */ +const parseValueForArgumentConfig = (argConfig, value) => { + switch (argConfig.type) { + case "string": + if (typeof value === "string") { + return value; + } + break; + case "path": + if (typeof value === "string") { + return path.resolve(value); + } + break; + case "number": + if (typeof value === "number") return value; + if (typeof value === "string" && /^[+-]?\d*(\.\d*)[eE]\d+$/) { + const n = +value; + if (!isNaN(n)) return n; + } + break; + case "boolean": + if (typeof value === "boolean") return value; + if (value === "true") return true; + if (value === "false") return false; + break; + case "RegExp": + if (value instanceof RegExp) return value; + if (typeof value === "string") { + // cspell:word yugi + const match = /^\/(.*)\/([yugi]*)$/.exec(value); + if (match && !/[^\\]\//.test(match[1])) + return new RegExp(match[1], match[2]); + } + break; + case "enum": + if (argConfig.values.includes(value)) return value; + for (const item of argConfig.values) { + if (`${item}` === value) return item; + } + break; + case "reset": + if (value === true) return []; + break; + } +}; + +/** + * @param {Record} args object of arguments + * @param {any} config configuration + * @param {Record} values object with values + * @returns {Problem[] | null} problems or null for success + */ +const processArguments = (args, config, values) => { + /** @type {Problem[]} */ + const problems = []; + for (const key of Object.keys(values)) { + const arg = args[key]; + if (!arg) { + problems.push({ + type: "unknown-argument", + path: "", + argument: key + }); + continue; + } + const processValue = (value, i) => { + const currentProblems = []; + for (const argConfig of arg.configs) { + const problem = processArgumentConfig(argConfig, config, value, i); + if (!problem) { + return; + } + currentProblems.push({ + ...problem, + argument: key, + value: value, + index: i + }); + } + problems.push(...currentProblems); + }; + let value = values[key]; + if (Array.isArray(value)) { + for (let i = 0; i < value.length; i++) { + processValue(value[i], i); + } + } else { + processValue(value, undefined); + } + } + if (problems.length === 0) return null; + return problems; +}; + +exports.getArguments = getArguments; +exports.processArguments = processArguments; + + +/***/ }), + +/***/ 63047: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sergey Melyukov @smelukov +*/ + + + +const browserslist = __webpack_require__(3561); +const path = __webpack_require__(85622); + +/** @typedef {import("./target").ApiTargetProperties} ApiTargetProperties */ +/** @typedef {import("./target").EcmaTargetProperties} EcmaTargetProperties */ +/** @typedef {import("./target").PlatformTargetProperties} PlatformTargetProperties */ + +// [[C:]/path/to/config][:env] +const inputRx = /^(?:((?:[A-Z]:)?[/\\].*?))?(?::(.+?))?$/i; + +/** + * @typedef {Object} BrowserslistHandlerConfig + * @property {string=} configPath + * @property {string=} env + * @property {string=} query + */ + +/** + * @param {string} input input string + * @param {string} context the context directory + * @returns {BrowserslistHandlerConfig} config + */ +const parse = (input, context) => { + if (!input) { + return {}; + } + + if (path.isAbsolute(input)) { + const [, configPath, env] = inputRx.exec(input) || []; + return { configPath, env }; + } + + const config = browserslist.findConfig(context); + + if (config && Object.keys(config).includes(input)) { + return { env: input }; + } + + return { query: input }; +}; + +/** + * @param {string} input input string + * @param {string} context the context directory + * @returns {string[] | undefined} selected browsers + */ +const load = (input, context) => { + const { configPath, env, query } = parse(input, context); + + // if a query is specified, then use it, else + // if a path to a config is specified then load it, else + // find a nearest config + const config = query + ? query + : configPath + ? browserslist.loadConfig({ + config: configPath, + env + }) + : browserslist.loadConfig({ path: context, env }); + + if (!config) return null; + return browserslist(config); +}; + +/** + * @param {string[]} browsers supported browsers list + * @returns {EcmaTargetProperties & PlatformTargetProperties & ApiTargetProperties} target properties + */ +const resolve = browsers => { + /** + * Checks all against a version number + * @param {Record} versions first supported version + * @returns {boolean} true if supports + */ + const rawChecker = versions => { + return browsers.every(v => { + const [name, parsedVersion] = v.split(" "); + if (!name) return false; + const requiredVersion = versions[name]; + if (!requiredVersion) return false; + const [parsedMajor, parserMinor] = + // safari TP supports all features for normal safari + parsedVersion === "TP" + ? [Infinity, Infinity] + : parsedVersion.split("."); + if (typeof requiredVersion === "number") { + return +parsedMajor >= requiredVersion; + } + return requiredVersion[0] === +parsedMajor + ? +parserMinor >= requiredVersion[1] + : +parsedMajor > requiredVersion[0]; + }); + }; + const anyNode = browsers.some(b => /^node /.test(b)); + const anyBrowser = browsers.some(b => /^(?!node)/.test(b)); + const browserProperty = !anyBrowser ? false : anyNode ? null : true; + const nodeProperty = !anyNode ? false : anyBrowser ? null : true; + // Internet Explorer Mobile, Blackberry browser and Opera Mini are very old browsers, they do not support new features + const es6DynamicImport = rawChecker({ + chrome: 63, + and_chr: 63, + edge: 79, + firefox: 67, + and_ff: 67, + // ie: Not supported + opera: 50, + op_mob: 46, + safari: [11, 1], + ios_saf: [11, 3], + samsung: [8, 2], + android: 63, + and_qq: [10, 4], + // baidu: Not supported + // and_uc: Not supported + // kaios: Not supported + // Since Node.js 13.14.0 no warning about usage, but it was added 8.5.0 with some limitations and it was improved in 12.0.0 and 13.2.0 + node: [13, 14] + }); + + return { + const: rawChecker({ + chrome: 49, + and_chr: 49, + edge: 12, + // Prior to Firefox 13, const is implemented, but re-assignment is not failing. + // Prior to Firefox 46, a TypeError was thrown on redeclaration instead of a SyntaxError. + firefox: 36, + and_ff: 36, + // Not supported in for-in and for-of loops + // ie: Not supported + opera: 36, + op_mob: 36, + safari: [10, 0], + ios_saf: [10, 0], + // Before 5.0 supported correctly in strict mode, otherwise supported without block scope + samsung: [5, 0], + android: 37, + and_qq: [10, 4], + // Supported correctly in strict mode, otherwise supported without block scope + // baidu: Not supported + and_uc: [12, 12], + kaios: [2, 5], + node: [6, 0] + }), + arrowFunction: rawChecker({ + chrome: 45, + and_chr: 45, + edge: 12, + // The initial implementation of arrow functions in Firefox made them automatically strict. This has been changed as of Firefox 24. The use of 'use strict'; is now required. + // Prior to Firefox 39, a line terminator (\\n) was incorrectly allowed after arrow function arguments. This has been fixed to conform to the ES2015 specification and code like () \\n => {} will now throw a SyntaxError in this and later versions. + firefox: 39, + and_ff: 39, + // ie: Not supported, + opera: 32, + op_mob: 32, + safari: 10, + ios_saf: 10, + samsung: [5, 0], + android: 45, + and_qq: [10, 4], + baidu: [7, 12], + and_uc: [12, 12], + kaios: [2, 5], + node: [6, 0] + }), + forOf: rawChecker({ + chrome: 38, + and_chr: 38, + edge: 12, + // Prior to Firefox 51, using the for...of loop construct with the const keyword threw a SyntaxError ("missing = in const declaration"). + firefox: 51, + and_ff: 51, + // ie: Not supported, + opera: 25, + op_mob: 25, + safari: 7, + ios_saf: 7, + samsung: [3, 0], + android: 38, + // and_qq: Unknown support + // baidu: Unknown support + // and_uc: Unknown support + // kaios: Unknown support + node: [0, 12] + }), + destructuring: rawChecker({ + chrome: 49, + and_chr: 49, + edge: 14, + firefox: 41, + and_ff: 41, + // ie: Not supported, + opera: 36, + op_mob: 36, + safari: 8, + ios_saf: 8, + samsung: [5, 0], + android: 49, + // and_qq: Unknown support + // baidu: Unknown support + // and_uc: Unknown support + // kaios: Unknown support + node: [6, 0] + }), + bigIntLiteral: rawChecker({ + chrome: 67, + and_chr: 67, + edge: 79, + firefox: 68, + and_ff: 68, + // ie: Not supported, + opera: 54, + op_mob: 48, + safari: 14, + ios_saf: 14, + samsung: [9, 2], + android: 67, + // and_qq: Not supported + // baidu: Not supported + // and_uc: Not supported + // kaios: Not supported + node: [10, 4] + }), + // Support syntax `import` and `export` and no limitations and bugs on Node.js + // Not include `export * as namespace` + module: rawChecker({ + chrome: 61, + and_chr: 61, + edge: 16, + firefox: 60, + and_ff: 60, + // ie: Not supported, + opera: 48, + op_mob: 45, + safari: [10, 1], + ios_saf: [10, 3], + samsung: [8, 0], + android: 61, + and_qq: [10, 4], + // baidu: Not supported + // and_uc: Not supported + // kaios: Not supported + // Since Node.js 13.14.0 no warning about usage, but it was added 8.5.0 with some limitations and it was improved in 12.0.0 and 13.2.0 + node: [13, 14] + }), + dynamicImport: es6DynamicImport, + dynamicImportInWorker: es6DynamicImport && !anyNode, + // browserslist does not have info about globalThis + // so this is based on mdn-browser-compat-data + globalThis: rawChecker({ + chrome: 71, + and_chr: 71, + edge: 79, + firefox: 65, + and_ff: 65, + // ie: Not supported, + opera: 58, + op_mob: 50, + safari: [12, 1], + ios_saf: [12, 2], + samsung: [10, 1], + android: 71, + // and_qq: Unknown support + // baidu: Unknown support + // and_uc: Unknown support + // kaios: Unknown support + node: [12, 0] + }), + + browser: browserProperty, + electron: false, + node: nodeProperty, + nwjs: false, + web: browserProperty, + webworker: false, + + document: browserProperty, + fetchWasm: browserProperty, + global: nodeProperty, + importScripts: false, + importScriptsInWorker: true, + nodeBuiltins: nodeProperty, + require: nodeProperty + }; +}; + +module.exports = { + resolve, + load +}; + + +/***/ }), + +/***/ 72829: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const path = __webpack_require__(85622); +const Template = __webpack_require__(90751); +const { cleverMerge } = __webpack_require__(92700); +const { + getTargetsProperties, + getTargetProperties, + getDefaultTarget +} = __webpack_require__(18129); + +/** @typedef {import("../../declarations/WebpackOptions").CacheOptionsNormalized} CacheOptions */ +/** @typedef {import("../../declarations/WebpackOptions").EntryDescription} EntryDescription */ +/** @typedef {import("../../declarations/WebpackOptions").EntryNormalized} Entry */ +/** @typedef {import("../../declarations/WebpackOptions").Experiments} Experiments */ +/** @typedef {import("../../declarations/WebpackOptions").ExternalsPresets} ExternalsPresets */ +/** @typedef {import("../../declarations/WebpackOptions").ExternalsType} ExternalsType */ +/** @typedef {import("../../declarations/WebpackOptions").InfrastructureLogging} InfrastructureLogging */ +/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */ +/** @typedef {import("../../declarations/WebpackOptions").Library} Library */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryName} LibraryName */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").Loader} Loader */ +/** @typedef {import("../../declarations/WebpackOptions").Mode} Mode */ +/** @typedef {import("../../declarations/WebpackOptions").ModuleOptions} ModuleOptions */ +/** @typedef {import("../../declarations/WebpackOptions").Node} WebpackNode */ +/** @typedef {import("../../declarations/WebpackOptions").Optimization} Optimization */ +/** @typedef {import("../../declarations/WebpackOptions").OutputNormalized} Output */ +/** @typedef {import("../../declarations/WebpackOptions").Performance} Performance */ +/** @typedef {import("../../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ +/** @typedef {import("../../declarations/WebpackOptions").RuleSetRules} RuleSetRules */ +/** @typedef {import("../../declarations/WebpackOptions").SnapshotOptions} SnapshotOptions */ +/** @typedef {import("../../declarations/WebpackOptions").Target} Target */ +/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("./target").TargetProperties} TargetProperties */ + +const NODE_MODULES_REGEXP = /[\\/]node_modules[\\/]/i; + +/** + * Sets a constant default value when undefined + * @template T + * @template {keyof T} P + * @param {T} obj an object + * @param {P} prop a property of this object + * @param {T[P]} value a default value of the property + * @returns {void} + */ +const D = (obj, prop, value) => { + if (obj[prop] === undefined) { + obj[prop] = value; + } +}; + +/** + * Sets a dynamic default value when undefined, by calling the factory function + * @template T + * @template {keyof T} P + * @param {T} obj an object + * @param {P} prop a property of this object + * @param {function(): T[P]} factory a default value factory for the property + * @returns {void} + */ +const F = (obj, prop, factory) => { + if (obj[prop] === undefined) { + obj[prop] = factory(); + } +}; + +/** + * Sets a dynamic default value when undefined, by calling the factory function. + * factory must return an array or undefined + * When the current value is already an array an contains "..." it's replaced with + * the result of the factory function + * @template T + * @template {keyof T} P + * @param {T} obj an object + * @param {P} prop a property of this object + * @param {function(): T[P]} factory a default value factory for the property + * @returns {void} + */ +const A = (obj, prop, factory) => { + const value = obj[prop]; + if (value === undefined) { + obj[prop] = factory(); + } else if (Array.isArray(value)) { + /** @type {any[]} */ + let newArray = undefined; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + if (item === "...") { + if (newArray === undefined) { + newArray = i > 0 ? value.slice(0, i - 1) : []; + obj[prop] = /** @type {T[P]} */ (/** @type {unknown} */ (newArray)); + } + const items = /** @type {any[]} */ (/** @type {unknown} */ (factory())); + if (items !== undefined) { + for (const item of items) { + newArray.push(item); + } + } + } else if (newArray !== undefined) { + newArray.push(item); + } + } + } +}; + +/** + * @param {WebpackOptions} options options to be modified + * @returns {void} + */ +const applyWebpackOptionsBaseDefaults = options => { + F(options, "context", () => process.cwd()); +}; + +/** + * @param {WebpackOptions} options options to be modified + * @returns {void} + */ +const applyWebpackOptionsDefaults = options => { + F(options, "context", () => process.cwd()); + F(options, "target", () => { + return getDefaultTarget(options.context); + }); + + const { mode, name, target } = options; + + let targetProperties = + target === false + ? /** @type {false} */ (false) + : typeof target === "string" + ? getTargetProperties(target, options.context) + : getTargetsProperties(target, options.context); + + const development = mode === "development"; + const production = mode === "production" || !mode; + + if (typeof options.entry !== "function") { + for (const key of Object.keys(options.entry)) { + F( + options.entry[key], + "import", + () => /** @type {[string]} */ (["./src"]) + ); + } + } + + F(options, "devtool", () => (development ? "eval" : false)); + D(options, "watch", false); + D(options, "profile", false); + D(options, "parallelism", 100); + D(options, "recordsInputPath", false); + D(options, "recordsOutputPath", false); + + F(options, "cache", () => + development ? { type: /** @type {"memory"} */ ("memory") } : false + ); + applyCacheDefaults(options.cache, { + name: name || "default", + mode: mode || "production" + }); + const cache = !!options.cache; + + applySnapshotDefaults(options.snapshot, { production }); + + applyExperimentsDefaults(options.experiments); + + applyModuleDefaults(options.module, { + cache, + syncWebAssembly: options.experiments.syncWebAssembly, + asyncWebAssembly: options.experiments.asyncWebAssembly + }); + + applyOutputDefaults(options.output, { + context: options.context, + targetProperties, + outputModule: options.experiments.outputModule, + development, + entry: options.entry, + module: options.module + }); + + applyExternalsPresetsDefaults(options.externalsPresets, { targetProperties }); + + applyLoaderDefaults(options.loader, { targetProperties }); + + F(options, "externalsType", () => { + const validExternalTypes = __webpack_require__(15546).definitions.ExternalsType.enum; + return options.output.library && + validExternalTypes.includes(options.output.library.type) + ? /** @type {ExternalsType} */ (options.output.library.type) + : options.output.module + ? "module" + : "var"; + }); + + applyNodeDefaults(options.node, { targetProperties }); + + F(options, "performance", () => + production && + targetProperties && + (targetProperties.browser || targetProperties.browser === null) + ? {} + : false + ); + applyPerformanceDefaults(options.performance, { + production + }); + + applyOptimizationDefaults(options.optimization, { + development, + production, + records: !!(options.recordsInputPath || options.recordsOutputPath) + }); + + options.resolve = cleverMerge( + getResolveDefaults({ + cache, + context: options.context, + targetProperties, + mode: options.mode + }), + options.resolve + ); + + options.resolveLoader = cleverMerge( + getResolveLoaderDefaults({ cache }), + options.resolveLoader + ); + + applyInfrastructureLoggingDefaults(options.infrastructureLogging); +}; + +/** + * @param {Experiments} experiments options + * @returns {void} + */ +const applyExperimentsDefaults = experiments => { + D(experiments, "topLevelAwait", false); + D(experiments, "syncWebAssembly", false); + D(experiments, "asyncWebAssembly", false); + D(experiments, "outputModule", false); +}; + +/** + * @param {CacheOptions} cache options + * @param {Object} options options + * @param {string} options.name name + * @param {string} options.mode mode + * @returns {void} + */ +const applyCacheDefaults = (cache, { name, mode }) => { + if (cache === false) return; + switch (cache.type) { + case "filesystem": + F(cache, "name", () => name + "-" + mode); + D(cache, "version", ""); + F(cache, "cacheDirectory", () => { + const pkgDir = __webpack_require__(89411); + const cwd = process.cwd(); + const dir = pkgDir.sync(cwd); + if (!dir) { + return path.resolve(cwd, ".cache/webpack"); + } else if (process.versions.pnp === "1") { + return path.resolve(dir, ".pnp/.cache/webpack"); + } else if (process.versions.pnp === "3") { + return path.resolve(dir, ".yarn/.cache/webpack"); + } else { + return path.resolve(dir, "node_modules/.cache/webpack"); + } + }); + F(cache, "cacheLocation", () => + path.resolve(cache.cacheDirectory, cache.name) + ); + D(cache, "hashAlgorithm", "md4"); + D(cache, "store", "pack"); + D(cache, "idleTimeout", 60000); + D(cache, "idleTimeoutForInitialStore", 0); + D(cache.buildDependencies, "defaultWebpack", [ + path.resolve(__dirname, "..") + path.sep + ]); + break; + } +}; + +/** + * @param {SnapshotOptions} snapshot options + * @param {Object} options options + * @param {boolean} options.production is production + * @returns {void} + */ +const applySnapshotDefaults = (snapshot, { production }) => { + A(snapshot, "managedPaths", () => { + if (process.versions.pnp === "3") { + const match = /^(.+?)[\\/]cache[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec( + /*require.resolve*/(36242) + ); + if (match) { + return [path.resolve(match[1], "unplugged")]; + } + } else { + const match = /^(.+?[\\/]node_modules)[\\/]/.exec( + // eslint-disable-next-line node/no-extraneous-require + /*require.resolve*/(36242) + ); + if (match) { + return [match[1]]; + } + } + return []; + }); + A(snapshot, "immutablePaths", () => { + if (process.versions.pnp === "1") { + const match = /^(.+?[\\/]v4)[\\/]npm-watchpack-[^\\/]+-[\da-f]{40}[\\/]node_modules[\\/]/.exec( + /*require.resolve*/(36242) + ); + if (match) { + return [match[1]]; + } + } else if (process.versions.pnp === "3") { + const match = /^(.+?)[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec( + /*require.resolve*/(36242) + ); + if (match) { + return [match[1]]; + } + } + return []; + }); + F(snapshot, "resolveBuildDependencies", () => ({ + timestamp: true, + hash: true + })); + F(snapshot, "buildDependencies", () => ({ timestamp: true, hash: true })); + F(snapshot, "module", () => + production ? { timestamp: true, hash: true } : { timestamp: true } + ); + F(snapshot, "resolve", () => + production ? { timestamp: true, hash: true } : { timestamp: true } + ); +}; + +/** + * @param {JavascriptParserOptions} options options + * @returns {void} + */ +const applyJavascriptParserOptionsDefaults = options => {}; + +/** + * @param {ModuleOptions} module options + * @param {Object} options options + * @param {boolean} options.cache is caching enabled + * @param {boolean} options.syncWebAssembly is syncWebAssembly enabled + * @param {boolean} options.asyncWebAssembly is asyncWebAssembly enabled + * @returns {void} + */ +const applyModuleDefaults = ( + module, + { cache, syncWebAssembly, asyncWebAssembly } +) => { + D(module, "unknownContextRequest", "."); + D(module, "unknownContextRegExp", false); + D(module, "unknownContextRecursive", true); + D(module, "unknownContextCritical", true); + D(module, "exprContextRequest", "."); + D(module, "exprContextRegExp", false); + D(module, "exprContextRecursive", true); + D(module, "exprContextCritical", true); + D(module, "wrappedContextRegExp", /.*/); + D(module, "wrappedContextRecursive", true); + D(module, "wrappedContextCritical", false); + + D(module, "strictExportPresence", false); + D(module, "strictThisContextOnImports", false); + + if (cache) { + D(module, "unsafeCache", module => { + const name = module.nameForCondition(); + return name && NODE_MODULES_REGEXP.test(name); + }); + } else { + D(module, "unsafeCache", false); + } + + F(module.parser, "asset", () => ({})); + F(module.parser.asset, "dataUrlCondition", () => ({})); + if (typeof module.parser.asset.dataUrlCondition === "object") { + D(module.parser.asset.dataUrlCondition, "maxSize", 8096); + } + + F(module.parser, "javascript", () => ({})); + applyJavascriptParserOptionsDefaults(module.parser.javascript); + + A(module, "defaultRules", () => { + const esm = { + type: "javascript/esm", + resolve: { + byDependency: { + esm: { + fullySpecified: true + } + } + } + }; + const commonjs = { + type: "javascript/dynamic" + }; + /** @type {RuleSetRules} */ + const rules = [ + { + type: "javascript/auto" + }, + { + mimetype: "application/node", + type: "javascript/auto" + }, + { + test: /\.json$/i, + type: "json" + }, + { + mimetype: "application/json", + type: "json" + }, + { + test: /\.mjs$/i, + ...esm + }, + { + test: /\.js$/i, + descriptionData: { + type: "module" + }, + ...esm + }, + { + test: /\.cjs$/i, + ...commonjs + }, + { + test: /\.js$/i, + descriptionData: { + type: "commonjs" + }, + ...commonjs + }, + { + mimetype: { + or: ["text/javascript", "application/javascript"] + }, + ...esm + }, + { + dependency: "url", + type: "asset/resource" + } + ]; + if (asyncWebAssembly) { + const wasm = { + type: "webassembly/async", + rules: [ + { + descriptionData: { + type: "module" + }, + resolve: { + fullySpecified: true + } + } + ] + }; + rules.push({ + test: /\.wasm$/i, + ...wasm + }); + rules.push({ + mimetype: "application/wasm", + ...wasm + }); + } else if (syncWebAssembly) { + const wasm = { + type: "webassembly/sync", + rules: [ + { + descriptionData: { + type: "module" + }, + resolve: { + fullySpecified: true + } + } + ] + }; + rules.push({ + test: /\.wasm$/i, + ...wasm + }); + rules.push({ + mimetype: "application/wasm", + ...wasm + }); + } + return rules; + }); +}; + +/** + * @param {Output} output options + * @param {Object} options options + * @param {string} options.context context + * @param {TargetProperties | false} options.targetProperties target properties + * @param {boolean} options.outputModule is outputModule experiment enabled + * @param {boolean} options.development is development mode + * @param {Entry} options.entry entry option + * @param {ModuleOptions} options.module module option + * @returns {void} + */ +const applyOutputDefaults = ( + output, + { context, targetProperties: tp, outputModule, development, entry, module } +) => { + /** + * @param {Library=} library the library option + * @returns {string} a readable library name + */ + const getLibraryName = library => { + const libraryName = + typeof library === "object" && + library && + !Array.isArray(library) && + "type" in library + ? library.name + : /** @type {LibraryName=} */ (library); + if (Array.isArray(libraryName)) { + return libraryName.join("."); + } else if (typeof libraryName === "object") { + return getLibraryName(libraryName.root); + } else if (typeof libraryName === "string") { + return libraryName; + } + return ""; + }; + + F(output, "uniqueName", () => { + const libraryName = getLibraryName(output.library); + if (libraryName) return libraryName; + try { + const packageInfo = require(`${context}/package.json`); + return packageInfo.name || ""; + } catch (e) { + return ""; + } + }); + + D(output, "filename", "[name].js"); + F(output, "module", () => !!outputModule); + F(output, "iife", () => !output.module); + D(output, "importFunctionName", "import"); + D(output, "importMetaName", "import.meta"); + F(output, "chunkFilename", () => { + const filename = output.filename; + if (typeof filename !== "function") { + const hasName = filename.includes("[name]"); + const hasId = filename.includes("[id]"); + const hasChunkHash = filename.includes("[chunkhash]"); + const hasContentHash = filename.includes("[contenthash]"); + // Anything changing depending on chunk is fine + if (hasChunkHash || hasContentHash || hasName || hasId) return filename; + // Otherwise prefix "[id]." in front of the basename to make it changing + return filename.replace(/(^|\/)([^/]*(?:\?|$))/, "$1[id].$2"); + } + return "[id].js"; + }); + D(output, "assetModuleFilename", "[hash][ext][query]"); + D(output, "webassemblyModuleFilename", "[hash].module.wasm"); + D(output, "compareBeforeEmit", true); + D(output, "charset", true); + F(output, "hotUpdateGlobal", () => + Template.toIdentifier( + "webpackHotUpdate" + Template.toIdentifier(output.uniqueName) + ) + ); + F(output, "chunkLoadingGlobal", () => + Template.toIdentifier( + "webpackChunk" + Template.toIdentifier(output.uniqueName) + ) + ); + F(output, "globalObject", () => { + if (tp) { + if (tp.global) return "global"; + if (tp.globalThis) return "globalThis"; + } + return "self"; + }); + F(output, "chunkFormat", () => { + if (tp) { + if (tp.document) return "array-push"; + if (tp.require) return "commonjs"; + if (tp.nodeBuiltins) return "commonjs"; + if (tp.importScripts) return "array-push"; + if (tp.dynamicImport && output.module) return "module"; + } + return false; + }); + F(output, "chunkLoading", () => { + if (tp) { + if (tp.document) return "jsonp"; + if (tp.require) return "require"; + if (tp.nodeBuiltins) return "async-node"; + if (tp.importScripts) return "import-scripts"; + if (tp.dynamicImport && output.module) return "import"; + if ( + tp.require === null || + tp.nodeBuiltins === null || + tp.document === null || + tp.importScripts === null + ) { + return "universal"; + } + } + return false; + }); + F(output, "workerChunkLoading", () => { + if (tp) { + if (tp.require) return "require"; + if (tp.nodeBuiltins) return "async-node"; + if (tp.importScriptsInWorker) return "import-scripts"; + if (tp.dynamicImportInWorker && output.module) return "import"; + if ( + tp.require === null || + tp.nodeBuiltins === null || + tp.importScriptsInWorker === null + ) { + return "universal"; + } + } + return false; + }); + F(output, "wasmLoading", () => { + if (tp) { + if (tp.nodeBuiltins) return "async-node"; + if (tp.fetchWasm) return "fetch"; + if (tp.nodeBuiltins === null || tp.fetchWasm === null) { + return "universal"; + } + } + return false; + }); + F(output, "workerWasmLoading", () => output.wasmLoading); + F(output, "devtoolNamespace", () => output.uniqueName); + if (output.library) { + F(output.library, "type", () => (output.module ? "module" : "var")); + } + F(output, "path", () => path.join(process.cwd(), "dist")); + F(output, "pathinfo", () => development); + D(output, "sourceMapFilename", "[file].map[query]"); + D(output, "hotUpdateChunkFilename", "[id].[fullhash].hot-update.js"); + D(output, "hotUpdateMainFilename", "[runtime].[fullhash].hot-update.json"); + D(output, "crossOriginLoading", false); + F(output, "scriptType", () => (output.module ? "module" : false)); + D( + output, + "publicPath", + (tp && (tp.document || tp.importScripts)) || output.scriptType === "module" + ? "auto" + : "" + ); + D(output, "chunkLoadTimeout", 120000); + D(output, "hashFunction", "md4"); + D(output, "hashDigest", "hex"); + D(output, "hashDigestLength", 20); + D(output, "strictModuleExceptionHandling", false); + + const optimistic = v => v || v === undefined; + F( + output.environment, + "arrowFunction", + () => tp && optimistic(tp.arrowFunction) + ); + F(output.environment, "const", () => tp && optimistic(tp.const)); + F( + output.environment, + "destructuring", + () => tp && optimistic(tp.destructuring) + ); + F(output.environment, "forOf", () => tp && optimistic(tp.forOf)); + F(output.environment, "bigIntLiteral", () => tp && tp.bigIntLiteral); + F(output.environment, "dynamicImport", () => tp && tp.dynamicImport); + F(output.environment, "module", () => tp && tp.module); + + /** + * @param {function(EntryDescription): void} fn iterator + * @returns {void} + */ + const forEachEntry = fn => { + for (const name of Object.keys(entry)) { + fn(entry[name]); + } + }; + A(output, "enabledLibraryTypes", () => { + const enabledLibraryTypes = []; + if (output.library) { + enabledLibraryTypes.push(output.library.type); + } + forEachEntry(desc => { + if (desc.library) { + enabledLibraryTypes.push(desc.library.type); + } + }); + return enabledLibraryTypes; + }); + + A(output, "enabledChunkLoadingTypes", () => { + const enabledChunkLoadingTypes = new Set(); + if (output.chunkLoading) { + enabledChunkLoadingTypes.add(output.chunkLoading); + } + if (output.workerChunkLoading) { + enabledChunkLoadingTypes.add(output.workerChunkLoading); + } + forEachEntry(desc => { + if (desc.chunkLoading) { + enabledChunkLoadingTypes.add(desc.chunkLoading); + } + }); + return Array.from(enabledChunkLoadingTypes); + }); + + A(output, "enabledWasmLoadingTypes", () => { + const enabledWasmLoadingTypes = new Set(); + if (output.wasmLoading) { + enabledWasmLoadingTypes.add(output.wasmLoading); + } + if (output.workerWasmLoading) { + enabledWasmLoadingTypes.add(output.workerWasmLoading); + } + forEachEntry(desc => { + if (desc.wasmLoading) { + enabledWasmLoadingTypes.add(desc.wasmLoading); + } + }); + return Array.from(enabledWasmLoadingTypes); + }); +}; + +/** + * @param {ExternalsPresets} externalsPresets options + * @param {Object} options options + * @param {TargetProperties | false} options.targetProperties target properties + * @returns {void} + */ +const applyExternalsPresetsDefaults = ( + externalsPresets, + { targetProperties } +) => { + D(externalsPresets, "web", targetProperties && targetProperties.web); + D(externalsPresets, "node", targetProperties && targetProperties.node); + D(externalsPresets, "nwjs", targetProperties && targetProperties.nwjs); + D( + externalsPresets, + "electron", + targetProperties && targetProperties.electron + ); + D( + externalsPresets, + "electronMain", + targetProperties && + targetProperties.electron && + targetProperties.electronMain + ); + D( + externalsPresets, + "electronPreload", + targetProperties && + targetProperties.electron && + targetProperties.electronPreload + ); + D( + externalsPresets, + "electronRenderer", + targetProperties && + targetProperties.electron && + targetProperties.electronRenderer + ); +}; + +/** + * @param {Loader} loader options + * @param {Object} options options + * @param {TargetProperties | false} options.targetProperties target properties + * @returns {void} + */ +const applyLoaderDefaults = (loader, { targetProperties }) => { + F(loader, "target", () => { + if (targetProperties) { + if (targetProperties.electron) { + if (targetProperties.electronMain) return "electron-main"; + if (targetProperties.electronPreload) return "electron-preload"; + if (targetProperties.electronRenderer) return "electron-renderer"; + return "electron"; + } + if (targetProperties.nwjs) return "nwjs"; + if (targetProperties.node) return "node"; + if (targetProperties.web) return "web"; + } + }); +}; + +/** + * @param {WebpackNode} node options + * @param {Object} options options + * @param {TargetProperties | false} options.targetProperties target properties + * @returns {void} + */ +const applyNodeDefaults = (node, { targetProperties }) => { + if (node === false) return; + F(node, "global", () => { + if (targetProperties && targetProperties.global) return false; + return true; + }); + F(node, "__filename", () => { + if (targetProperties && targetProperties.node) return "eval-only"; + return "mock"; + }); + F(node, "__dirname", () => { + if (targetProperties && targetProperties.node) return "eval-only"; + return "mock"; + }); +}; + +/** + * @param {Performance} performance options + * @param {Object} options options + * @param {boolean} options.production is production + * @returns {void} + */ +const applyPerformanceDefaults = (performance, { production }) => { + if (performance === false) return; + D(performance, "maxAssetSize", 250000); + D(performance, "maxEntrypointSize", 250000); + F(performance, "hints", () => (production ? "warning" : false)); +}; + +/** + * @param {Optimization} optimization options + * @param {Object} options options + * @param {boolean} options.production is production + * @param {boolean} options.development is development + * @param {boolean} options.records using records + * @returns {void} + */ +const applyOptimizationDefaults = ( + optimization, + { production, development, records } +) => { + D(optimization, "removeAvailableModules", false); + D(optimization, "removeEmptyChunks", true); + D(optimization, "mergeDuplicateChunks", true); + D(optimization, "flagIncludedChunks", production); + F(optimization, "moduleIds", () => { + if (production) return "deterministic"; + if (development) return "named"; + return "natural"; + }); + F(optimization, "chunkIds", () => { + if (production) return "deterministic"; + if (development) return "named"; + return "natural"; + }); + F(optimization, "sideEffects", () => (production ? true : "flag")); + D(optimization, "providedExports", true); + D(optimization, "usedExports", production); + D(optimization, "innerGraph", production); + D(optimization, "mangleExports", production); + D(optimization, "concatenateModules", production); + D(optimization, "runtimeChunk", false); + D(optimization, "emitOnErrors", !production); + D(optimization, "checkWasmTypes", production); + D(optimization, "mangleWasmImports", false); + D(optimization, "portableRecords", records); + D(optimization, "realContentHash", production); + D(optimization, "minimize", production); + A(optimization, "minimizer", () => [ + { + apply: compiler => { + // Lazy load the Terser plugin + const TerserPlugin = __webpack_require__(16093); + new TerserPlugin({ + terserOptions: { + compress: { + passes: 2 + } + } + }).apply(compiler); + } + } + ]); + F(optimization, "nodeEnv", () => { + if (production) return "production"; + if (development) return "development"; + return false; + }); + const { splitChunks } = optimization; + if (splitChunks) { + A(splitChunks, "defaultSizeTypes", () => ["javascript", "unknown"]); + D(splitChunks, "hidePathInfo", production); + D(splitChunks, "chunks", "async"); + D(splitChunks, "usedExports", true); + D(splitChunks, "minChunks", 1); + F(splitChunks, "minSize", () => (production ? 20000 : 10000)); + F(splitChunks, "minRemainingSize", () => (development ? 0 : undefined)); + F(splitChunks, "enforceSizeThreshold", () => (production ? 50000 : 30000)); + F(splitChunks, "maxAsyncRequests", () => (production ? 30 : Infinity)); + F(splitChunks, "maxInitialRequests", () => (production ? 30 : Infinity)); + D(splitChunks, "automaticNameDelimiter", "-"); + const { cacheGroups } = splitChunks; + F(cacheGroups, "default", () => ({ + idHint: "", + reuseExistingChunk: true, + minChunks: 2, + priority: -20 + })); + F(cacheGroups, "defaultVendors", () => ({ + idHint: "vendors", + reuseExistingChunk: true, + test: NODE_MODULES_REGEXP, + priority: -10 + })); + } +}; + +/** + * @param {Object} options options + * @param {boolean} options.cache is cache enable + * @param {string} options.context build context + * @param {TargetProperties | false} options.targetProperties target properties + * @param {Mode} options.mode mode + * @returns {ResolveOptions} resolve options + */ +const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { + /** @type {string[]} */ + const conditions = ["webpack"]; + + conditions.push(mode === "development" ? "development" : "production"); + + if (targetProperties) { + if (targetProperties.webworker) conditions.push("worker"); + if (targetProperties.node) conditions.push("node"); + if (targetProperties.web) conditions.push("browser"); + if (targetProperties.electron) conditions.push("electron"); + if (targetProperties.nwjs) conditions.push("nwjs"); + } + + const jsExtensions = [".js", ".json", ".wasm"]; + + const tp = targetProperties; + const browserField = + tp && tp.web && (!tp.node || (tp.electron && tp.electronRenderer)); + + /** @type {function(): ResolveOptions} */ + const cjsDeps = () => ({ + aliasFields: browserField ? ["browser"] : [], + mainFields: browserField ? ["browser", "module", "..."] : ["module", "..."], + conditionNames: ["require", "module", "..."], + extensions: [...jsExtensions] + }); + /** @type {function(): ResolveOptions} */ + const esmDeps = () => ({ + aliasFields: browserField ? ["browser"] : [], + mainFields: browserField ? ["browser", "module", "..."] : ["module", "..."], + conditionNames: ["import", "module", "..."], + extensions: [...jsExtensions] + }); + + /** @type {ResolveOptions} */ + const resolveOptions = { + cache, + modules: ["node_modules"], + conditionNames: conditions, + mainFiles: ["index"], + extensions: [], + aliasFields: [], + exportsFields: ["exports"], + roots: [context], + mainFields: ["main"], + byDependency: { + wasm: esmDeps(), + esm: esmDeps(), + url: { + preferRelative: true + }, + worker: { + ...esmDeps(), + preferRelative: true + }, + commonjs: cjsDeps(), + amd: cjsDeps(), + // for backward-compat: loadModule + loader: cjsDeps(), + // for backward-compat: Custom Dependency + unknown: cjsDeps(), + // for backward-compat: getResolve without dependencyType + undefined: cjsDeps() + } + }; + + return resolveOptions; +}; + +/** + * @param {Object} options options + * @param {boolean} options.cache is cache enable + * @returns {ResolveOptions} resolve options + */ +const getResolveLoaderDefaults = ({ cache }) => { + /** @type {ResolveOptions} */ + const resolveOptions = { + cache, + conditionNames: ["loader", "require", "node"], + exportsFields: ["exports"], + mainFields: ["loader", "main"], + extensions: [".js"], + mainFiles: ["index"] + }; + + return resolveOptions; +}; + +/** + * @param {InfrastructureLogging} infrastructureLogging options + * @returns {void} + */ +const applyInfrastructureLoggingDefaults = infrastructureLogging => { + D(infrastructureLogging, "level", "info"); + D(infrastructureLogging, "debug", false); +}; + +exports.applyWebpackOptionsBaseDefaults = applyWebpackOptionsBaseDefaults; +exports.applyWebpackOptionsDefaults = applyWebpackOptionsDefaults; + + +/***/ }), + +/***/ 92188: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); + +/** @typedef {import("../../declarations/WebpackOptions").EntryStatic} EntryStatic */ +/** @typedef {import("../../declarations/WebpackOptions").EntryStaticNormalized} EntryStaticNormalized */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryName} LibraryName */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").OptimizationRuntimeChunk} OptimizationRuntimeChunk */ +/** @typedef {import("../../declarations/WebpackOptions").OptimizationRuntimeChunkNormalized} OptimizationRuntimeChunkNormalized */ +/** @typedef {import("../../declarations/WebpackOptions").OutputNormalized} OutputNormalized */ +/** @typedef {import("../../declarations/WebpackOptions").WebpackOptions} WebpackOptions */ +/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptionsNormalized */ + +const handledDeprecatedNoEmitOnErrors = util.deprecate( + (noEmitOnErrors, emitOnErrors) => { + if (emitOnErrors !== undefined && !noEmitOnErrors === !emitOnErrors) { + throw new Error( + "Conflicting use of 'optimization.noEmitOnErrors' and 'optimization.emitOnErrors'. Remove deprecated 'optimization.noEmitOnErrors' from config." + ); + } + return !noEmitOnErrors; + }, + "optimization.noEmitOnErrors is deprecated in favor of optimization.emitOnErrors", + "DEP_WEBPACK_CONFIGURATION_OPTIMIZATION_NO_EMIT_ON_ERRORS" +); + +/** + * @template T + * @template R + * @param {T|undefined} value value or not + * @param {function(T): R} fn nested handler + * @returns {R} result value + */ +const nestedConfig = (value, fn) => + value === undefined ? fn(/** @type {T} */ ({})) : fn(value); + +/** + * @template T + * @param {T|undefined} value value or not + * @returns {T} result value + */ +const cloneObject = value => { + return /** @type {T} */ ({ ...value }); +}; + +/** + * @template T + * @template R + * @param {T|undefined} value value or not + * @param {function(T): R} fn nested handler + * @returns {R|undefined} result value + */ +const optionalNestedConfig = (value, fn) => + value === undefined ? undefined : fn(value); + +/** + * @template T + * @template R + * @param {T[]|undefined} value array or not + * @param {function(T[]): R[]} fn nested handler + * @returns {R[]|undefined} cloned value + */ +const nestedArray = (value, fn) => (Array.isArray(value) ? fn(value) : fn([])); + +/** + * @template T + * @template R + * @param {T[]|undefined} value array or not + * @param {function(T[]): R[]} fn nested handler + * @returns {R[]|undefined} cloned value + */ +const optionalNestedArray = (value, fn) => + Array.isArray(value) ? fn(value) : undefined; + +/** + * @template T + * @template R + * @param {Record|undefined} value value or not + * @param {function(T): R} fn nested handler + * @returns {Record} result value + */ +const keyedNestedConfig = (value, fn) => + value === undefined + ? {} + : Object.keys(value).reduce( + (obj, key) => ((obj[key] = fn(value[key])), obj), + /** @type {Record} */ ({}) + ); + +/** + * @param {WebpackOptions} config input config + * @returns {WebpackOptionsNormalized} normalized options + */ +const getNormalizedWebpackOptions = config => { + return { + amd: config.amd, + bail: config.bail, + cache: optionalNestedConfig(config.cache, cache => { + if (cache === false) return false; + if (cache === true) { + return { + type: "memory" + }; + } + switch (cache.type) { + case "filesystem": + return { + type: "filesystem", + buildDependencies: cloneObject(cache.buildDependencies), + cacheDirectory: cache.cacheDirectory, + cacheLocation: cache.cacheLocation, + hashAlgorithm: cache.hashAlgorithm, + idleTimeout: cache.idleTimeout, + idleTimeoutForInitialStore: cache.idleTimeoutForInitialStore, + name: cache.name, + store: cache.store, + version: cache.version + }; + case undefined: + case "memory": + return { + type: "memory" + }; + default: + // @ts-expect-error Property 'type' does not exist on type 'never'. ts(2339) + throw new Error(`Not implemented cache.type ${cache.type}`); + } + }), + context: config.context, + dependencies: config.dependencies, + devServer: optionalNestedConfig(config.devServer, devServer => ({ + ...devServer + })), + devtool: config.devtool, + entry: + config.entry === undefined + ? { main: {} } + : typeof config.entry === "function" + ? (fn => () => + Promise.resolve().then(fn).then(getNormalizedEntryStatic))( + config.entry + ) + : getNormalizedEntryStatic(config.entry), + experiments: cloneObject(config.experiments), + externals: config.externals, + externalsPresets: cloneObject(config.externalsPresets), + externalsType: config.externalsType, + ignoreWarnings: config.ignoreWarnings + ? config.ignoreWarnings.map(ignore => { + if (typeof ignore === "function") return ignore; + const i = ignore instanceof RegExp ? { message: ignore } : ignore; + return (warning, { requestShortener }) => { + if (!i.message && !i.module && !i.file) return false; + if (i.message && !i.message.test(warning.message)) { + return false; + } + if ( + i.module && + (!warning.module || + !i.module.test( + warning.module.readableIdentifier(requestShortener) + )) + ) { + return false; + } + if (i.file && (!warning.file || !i.file.test(warning.file))) { + return false; + } + return true; + }; + }) + : undefined, + infrastructureLogging: cloneObject(config.infrastructureLogging), + loader: cloneObject(config.loader), + mode: config.mode, + module: nestedConfig(config.module, module => ({ + ...module, + parser: cloneObject(module.parser), + generator: cloneObject(module.generator), + rules: nestedArray(module.rules, r => [...r]) + })), + name: config.name, + node: nestedConfig( + config.node, + node => + node && { + ...node + } + ), + optimization: nestedConfig(config.optimization, optimization => { + return { + ...optimization, + runtimeChunk: getNormalizedOptimizationRuntimeChunk( + optimization.runtimeChunk + ), + splitChunks: nestedConfig( + optimization.splitChunks, + splitChunks => + splitChunks && { + ...splitChunks, + defaultSizeTypes: splitChunks.defaultSizeTypes + ? [...splitChunks.defaultSizeTypes] + : ["..."], + cacheGroups: cloneObject(splitChunks.cacheGroups) + } + ), + emitOnErrors: + optimization.noEmitOnErrors !== undefined + ? handledDeprecatedNoEmitOnErrors( + optimization.noEmitOnErrors, + optimization.emitOnErrors + ) + : optimization.emitOnErrors + }; + }), + output: nestedConfig(config.output, output => { + const { library } = output; + const libraryAsName = /** @type {LibraryName} */ (library); + const libraryBase = + typeof library === "object" && + library && + !Array.isArray(library) && + "type" in library + ? library + : libraryAsName || output.libraryTarget + ? /** @type {LibraryOptions} */ ({ + name: libraryAsName + }) + : undefined; + /** @type {OutputNormalized} */ + const result = { + assetModuleFilename: output.assetModuleFilename, + charset: output.charset, + chunkFilename: output.chunkFilename, + chunkFormat: output.chunkFormat, + chunkLoading: output.chunkLoading, + chunkLoadingGlobal: output.chunkLoadingGlobal, + chunkLoadTimeout: output.chunkLoadTimeout, + compareBeforeEmit: output.compareBeforeEmit, + crossOriginLoading: output.crossOriginLoading, + devtoolFallbackModuleFilenameTemplate: + output.devtoolFallbackModuleFilenameTemplate, + devtoolModuleFilenameTemplate: output.devtoolModuleFilenameTemplate, + devtoolNamespace: output.devtoolNamespace, + environment: cloneObject(output.environment), + enabledChunkLoadingTypes: output.enabledChunkLoadingTypes + ? [...output.enabledChunkLoadingTypes] + : ["..."], + enabledLibraryTypes: output.enabledLibraryTypes + ? [...output.enabledLibraryTypes] + : ["..."], + enabledWasmLoadingTypes: output.enabledWasmLoadingTypes + ? [...output.enabledWasmLoadingTypes] + : ["..."], + filename: output.filename, + globalObject: output.globalObject, + hashDigest: output.hashDigest, + hashDigestLength: output.hashDigestLength, + hashFunction: output.hashFunction, + hashSalt: output.hashSalt, + hotUpdateChunkFilename: output.hotUpdateChunkFilename, + hotUpdateGlobal: output.hotUpdateGlobal, + hotUpdateMainFilename: output.hotUpdateMainFilename, + iife: output.iife, + importFunctionName: output.importFunctionName, + importMetaName: output.importMetaName, + scriptType: output.scriptType, + library: libraryBase && { + type: + output.libraryTarget !== undefined + ? output.libraryTarget + : libraryBase.type, + auxiliaryComment: + output.auxiliaryComment !== undefined + ? output.auxiliaryComment + : libraryBase.auxiliaryComment, + export: + output.libraryExport !== undefined + ? output.libraryExport + : libraryBase.export, + name: libraryBase.name, + umdNamedDefine: + output.umdNamedDefine !== undefined + ? output.umdNamedDefine + : libraryBase.umdNamedDefine + }, + module: output.module, + path: output.path, + pathinfo: output.pathinfo, + publicPath: output.publicPath, + sourceMapFilename: output.sourceMapFilename, + sourcePrefix: output.sourcePrefix, + strictModuleExceptionHandling: output.strictModuleExceptionHandling, + uniqueName: output.uniqueName, + wasmLoading: output.wasmLoading, + webassemblyModuleFilename: output.webassemblyModuleFilename, + workerChunkLoading: output.workerChunkLoading, + workerWasmLoading: output.workerWasmLoading + }; + return result; + }), + parallelism: config.parallelism, + performance: optionalNestedConfig(config.performance, performance => { + if (performance === false) return false; + return { + ...performance + }; + }), + plugins: nestedArray(config.plugins, p => [...p]), + profile: config.profile, + recordsInputPath: + config.recordsInputPath !== undefined + ? config.recordsInputPath + : config.recordsPath, + recordsOutputPath: + config.recordsOutputPath !== undefined + ? config.recordsOutputPath + : config.recordsPath, + resolve: nestedConfig(config.resolve, resolve => ({ + ...resolve, + byDependency: keyedNestedConfig(resolve.byDependency, cloneObject) + })), + resolveLoader: cloneObject(config.resolveLoader), + snapshot: nestedConfig(config.snapshot, snapshot => ({ + resolveBuildDependencies: optionalNestedConfig( + snapshot.resolveBuildDependencies, + resolveBuildDependencies => ({ + timestamp: resolveBuildDependencies.timestamp, + hash: resolveBuildDependencies.hash + }) + ), + buildDependencies: optionalNestedConfig( + snapshot.buildDependencies, + buildDependencies => ({ + timestamp: buildDependencies.timestamp, + hash: buildDependencies.hash + }) + ), + resolve: optionalNestedConfig(snapshot.resolve, resolve => ({ + timestamp: resolve.timestamp, + hash: resolve.hash + })), + module: optionalNestedConfig(snapshot.module, module => ({ + timestamp: module.timestamp, + hash: module.hash + })), + immutablePaths: optionalNestedArray(snapshot.immutablePaths, p => [...p]), + managedPaths: optionalNestedArray(snapshot.managedPaths, p => [...p]) + })), + stats: nestedConfig(config.stats, stats => { + if (stats === false) { + return { + preset: "none" + }; + } + if (stats === true) { + return { + preset: "normal" + }; + } + if (typeof stats === "string") { + return { + preset: stats + }; + } + return { + ...stats + }; + }), + target: config.target, + watch: config.watch, + watchOptions: cloneObject(config.watchOptions) + }; +}; + +/** + * @param {EntryStatic} entry static entry options + * @returns {EntryStaticNormalized} normalized static entry options + */ +const getNormalizedEntryStatic = entry => { + if (typeof entry === "string") { + return { + main: { + import: [entry] + } + }; + } + if (Array.isArray(entry)) { + return { + main: { + import: entry + } + }; + } + /** @type {EntryStaticNormalized} */ + const result = {}; + for (const key of Object.keys(entry)) { + const value = entry[key]; + if (typeof value === "string") { + result[key] = { + import: [value] + }; + } else if (Array.isArray(value)) { + result[key] = { + import: value + }; + } else { + result[key] = { + import: + value.import && + (Array.isArray(value.import) ? value.import : [value.import]), + filename: value.filename, + layer: value.layer, + runtime: value.runtime, + chunkLoading: value.chunkLoading, + wasmLoading: value.wasmLoading, + dependOn: + value.dependOn && + (Array.isArray(value.dependOn) ? value.dependOn : [value.dependOn]), + library: value.library + }; + } + } + return result; +}; + +/** + * @param {OptimizationRuntimeChunk=} runtimeChunk runtimeChunk option + * @returns {OptimizationRuntimeChunkNormalized=} normalized runtimeChunk option + */ +const getNormalizedOptimizationRuntimeChunk = runtimeChunk => { + if (runtimeChunk === undefined) return undefined; + if (runtimeChunk === false) return false; + if (runtimeChunk === "single") { + return { + name: () => "runtime" + }; + } + if (runtimeChunk === true || runtimeChunk === "multiple") { + return { + name: entrypoint => `runtime~${entrypoint.name}` + }; + } + const { name } = runtimeChunk; + return { + name: typeof name === "function" ? name : () => name + }; +}; + +exports.getNormalizedWebpackOptions = getNormalizedWebpackOptions; + + +/***/ }), + +/***/ 18129: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const browserslistTargetHandler = __webpack_require__(63047); + +/** + * @param {string} context the context directory + * @returns {string} default target + */ +const getDefaultTarget = context => { + const browsers = browserslistTargetHandler.load(null, context); + return browsers ? "browserslist" : "web"; +}; + +/** + * @typedef {Object} PlatformTargetProperties + * @property {boolean | null} web web platform, importing of http(s) and std: is available + * @property {boolean | null} browser browser platform, running in a normal web browser + * @property {boolean | null} webworker (Web)Worker platform, running in a web/shared/service worker + * @property {boolean | null} node node platform, require of node built-in modules is available + * @property {boolean | null} nwjs nwjs platform, require of legacy nw.gui is available + * @property {boolean | null} electron electron platform, require of some electron built-in modules is available + */ + +/** + * @typedef {Object} ElectronContextTargetProperties + * @property {boolean | null} electronMain in main context + * @property {boolean | null} electronPreload in preload context + * @property {boolean | null} electronRenderer in renderer context with node integration + */ + +/** + * @typedef {Object} ApiTargetProperties + * @property {boolean | null} require has require function available + * @property {boolean | null} nodeBuiltins has node.js built-in modules available + * @property {boolean | null} document has document available (allows script tags) + * @property {boolean | null} importScripts has importScripts available + * @property {boolean | null} importScriptsInWorker has importScripts available when creating a worker + * @property {boolean | null} fetchWasm has fetch function available for WebAssembly + * @property {boolean | null} global has global variable available + */ + +/** + * @typedef {Object} EcmaTargetProperties + * @property {boolean | null} globalThis has globalThis variable available + * @property {boolean | null} bigIntLiteral big int literal syntax is available + * @property {boolean | null} const const and let variable declarations are available + * @property {boolean | null} arrowFunction arrow functions are available + * @property {boolean | null} forOf for of iteration is available + * @property {boolean | null} destructuring destructuring is available + * @property {boolean | null} dynamicImport async import() is available + * @property {boolean | null} dynamicImportInWorker async import() is available when creating a worker + * @property {boolean | null} module ESM syntax is available (when in module) + */ + +///** @typedef {PlatformTargetProperties | ApiTargetProperties | EcmaTargetProperties | PlatformTargetProperties & ApiTargetProperties | PlatformTargetProperties & EcmaTargetProperties | ApiTargetProperties & EcmaTargetProperties} TargetProperties */ +/** @template T @typedef {{ [P in keyof T]?: never }} Never */ +/** @template A @template B @typedef {(A & Never) | (Never & B) | (A & B)} Mix */ +/** @typedef {Mix, Mix>} TargetProperties */ + +const versionDependent = (major, minor) => { + if (!major) return () => /** @type {undefined} */ (undefined); + major = +major; + minor = minor ? +minor : 0; + return (vMajor, vMinor = 0) => { + return major > vMajor || (major === vMajor && minor >= vMinor); + }; +}; + +/** @type {[string, string, RegExp, (...args: string[]) => TargetProperties | false][]} */ +const TARGETS = [ + [ + "browserslist / browserslist:env / browserslist:query / browserslist:path-to-config / browserslist:path-to-config:env", + "Resolve features from browserslist. Will resolve browserslist config automatically. Only browser or node queries are supported (electron is not supported). Examples: 'browserslist:modern' to use 'modern' environment from browserslist config", + /^browserslist(?::(.+))?$/, + (rest, context) => { + const browsers = browserslistTargetHandler.load( + rest ? rest.trim() : null, + context + ); + if (!browsers) { + throw new Error(`No browserslist config found to handle the 'browserslist' target. +See https://github.com/browserslist/browserslist#queries for possible ways to provide a config. +The recommended way is to add a 'browserslist' key to your package.json and list supported browsers (resp. node.js versions). +You can also more options via the 'target' option: 'browserslist' / 'browserslist:env' / 'browserslist:query' / 'browserslist:path-to-config' / 'browserslist:path-to-config:env'`); + } + return browserslistTargetHandler.resolve(browsers); + } + ], + [ + "web", + "Web browser.", + /^web$/, + () => { + return { + web: true, + browser: true, + webworker: null, + node: false, + electron: false, + nwjs: false, + + document: true, + importScriptsInWorker: true, + fetchWasm: true, + nodeBuiltins: false, + importScripts: false, + require: false, + global: false + }; + } + ], + [ + "webworker", + "Web Worker, SharedWorker or Service Worker.", + /^webworker$/, + () => { + return { + web: true, + browser: true, + webworker: true, + node: false, + electron: false, + nwjs: false, + + importScripts: true, + importScriptsInWorker: true, + fetchWasm: true, + nodeBuiltins: false, + require: false, + document: false, + global: false + }; + } + ], + [ + "[async-]node[X[.Y]]", + "Node.js in version X.Y. The 'async-' prefix will load chunks asynchronously via 'fs' and 'vm' instead of 'require()'. Examples: node14.5, async-node10.", + /^(async-)?node(\d+(?:\.(\d+))?)?$/, + (asyncFlag, major, minor) => { + const v = versionDependent(major, minor); + // see https://node.green/ + return { + node: true, + electron: false, + nwjs: false, + web: false, + webworker: false, + browser: false, + + require: !asyncFlag, + nodeBuiltins: true, + global: true, + document: false, + fetchWasm: false, + importScripts: false, + importScriptsInWorker: false, + + globalThis: v(12), + const: v(6), + arrowFunction: v(6), + forOf: v(5), + destructuring: v(6), + bigIntLiteral: v(10, 4), + dynamicImport: v(12, 17), + dynamicImportInWorker: major ? false : undefined, + module: v(12, 17) + }; + } + ], + [ + "electron[X[.Y]]-main/preload/renderer", + "Electron in version X.Y. Script is running in main, preload resp. renderer context.", + /^electron(\d+(?:\.(\d+))?)?-(main|preload|renderer)$/, + (major, minor, context) => { + const v = versionDependent(major, minor); + // see https://node.green/ + https://github.com/electron/releases + return { + node: true, + electron: true, + web: context !== "main", + webworker: false, + browser: false, + nwjs: false, + + electronMain: context === "main", + electronPreload: context === "preload", + electronRenderer: context === "renderer", + + global: true, + nodeBuiltins: true, + require: true, + document: context === "renderer", + fetchWasm: context === "renderer", + importScripts: false, + importScriptsInWorker: false, + + globalThis: v(5), + const: v(1, 1), + arrowFunction: v(1, 1), + forOf: v(0, 36), + destructuring: v(1, 1), + bigIntLiteral: v(4), + dynamicImport: v(11), + dynamicImportInWorker: major ? false : undefined, + module: v(11) + }; + } + ], + [ + "nwjs[X[.Y]] / node-webkit[X[.Y]]", + "NW.js in version X.Y.", + /^(?:nwjs|node-webkit)(\d+(?:\.(\d+))?)?$/, + (major, minor) => { + const v = versionDependent(major, minor); + // see https://node.green/ + https://github.com/nwjs/nw.js/blob/nw48/CHANGELOG.md + return { + node: true, + web: true, + nwjs: true, + webworker: null, + browser: false, + electron: false, + + global: true, + nodeBuiltins: true, + document: false, + importScriptsInWorker: false, + fetchWasm: false, + importScripts: false, + require: false, + + globalThis: v(0, 43), + const: v(0, 15), + arrowFunction: v(0, 15), + forOf: v(0, 13), + destructuring: v(0, 15), + bigIntLiteral: v(0, 32), + dynamicImport: v(0, 43), + dynamicImportInWorker: major ? false : undefined, + module: v(0, 43) + }; + } + ], + [ + "esX", + "EcmaScript in this version. Examples: es2020, es5.", + /^es(\d+)$/, + version => { + let v = +version; + if (v < 1000) v = v + 2009; + return { + const: v >= 2015, + arrowFunction: v >= 2015, + forOf: v >= 2015, + destructuring: v >= 2015, + module: v >= 2015, + globalThis: v >= 2020, + bigIntLiteral: v >= 2020, + dynamicImport: v >= 2020, + dynamicImportInWorker: v >= 2020 + }; + } + ] +]; + +/** + * @param {string} target the target + * @param {string} context the context directory + * @returns {TargetProperties} target properties + */ +const getTargetProperties = (target, context) => { + for (const [, , regExp, handler] of TARGETS) { + const match = regExp.exec(target); + if (match) { + const [, ...args] = match; + const result = handler(...args, context); + if (result) return result; + } + } + throw new Error( + `Unknown target '${target}'. The following targets are supported:\n${TARGETS.map( + ([name, description]) => `* ${name}: ${description}` + ).join("\n")}` + ); +}; + +const mergeTargetProperties = targetProperties => { + const keys = new Set(); + for (const tp of targetProperties) { + for (const key of Object.keys(tp)) { + keys.add(key); + } + } + const result = {}; + for (const key of keys) { + let hasTrue = false; + let hasFalse = false; + for (const tp of targetProperties) { + const value = tp[key]; + switch (value) { + case true: + hasTrue = true; + break; + case false: + hasFalse = true; + break; + } + } + if (hasTrue || hasFalse) + result[key] = hasFalse && hasTrue ? null : hasTrue ? true : false; + } + return /** @type {TargetProperties} */ (result); +}; + +/** + * @param {string[]} targets the targets + * @param {string} context the context directory + * @returns {TargetProperties} target properties + */ +const getTargetsProperties = (targets, context) => { + return mergeTargetProperties( + targets.map(t => getTargetProperties(t, context)) + ); +}; + +exports.getDefaultTarget = getDefaultTarget; +exports.getTargetProperties = getTargetProperties; +exports.getTargetsProperties = getTargetsProperties; + + +/***/ }), + +/***/ 22887: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr +*/ + + + +const Dependency = __webpack_require__(27563); +const makeSerializable = __webpack_require__(55575); + +/** @typedef {import("./ContainerEntryModule").ExposeOptions} ExposeOptions */ + +class ContainerEntryDependency extends Dependency { + /** + * @param {string} name entry name + * @param {[string, ExposeOptions][]} exposes list of exposed modules + * @param {string} shareScope name of the share scope + */ + constructor(name, exposes, shareScope) { + super(); + this.name = name; + this.exposes = exposes; + this.shareScope = shareScope; + } + + /** + * @returns {string | null} an identifier to merge equal requests + */ + getResourceIdentifier() { + return `container-entry-${this.name}`; + } + + get type() { + return "container entry"; + } + + get category() { + return "esm"; + } +} + +makeSerializable( + ContainerEntryDependency, + "webpack/lib/container/ContainerEntryDependency" +); + +module.exports = ContainerEntryDependency; + + +/***/ }), + +/***/ 97927: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr +*/ + + + +const { OriginalSource, RawSource } = __webpack_require__(55600); +const AsyncDependenciesBlock = __webpack_require__(72624); +const Module = __webpack_require__(54031); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const makeSerializable = __webpack_require__(55575); +const ContainerExposedDependency = __webpack_require__(83179); + +/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ +/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("../RequestShortener")} RequestShortener */ +/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ +/** @typedef {import("./ContainerEntryDependency")} ContainerEntryDependency */ + +/** + * @typedef {Object} ExposeOptions + * @property {string[]} import requests to exposed modules (last one is exported) + */ + +const SOURCE_TYPES = new Set(["javascript"]); + +class ContainerEntryModule extends Module { + /** + * @param {string} name container entry name + * @param {[string, ExposeOptions][]} exposes list of exposed modules + * @param {string} shareScope name of the share scope + */ + constructor(name, exposes, shareScope) { + super("javascript/dynamic", null); + this._name = name; + this._exposes = exposes; + this._shareScope = shareScope; + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return SOURCE_TYPES; + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return `container entry (${this._shareScope}) ${JSON.stringify( + this._exposes + )}`; + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return `container entry`; + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + return `webpack/container/entry/${this._name}`; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + return callback(null, !this.buildMeta); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this.buildMeta = {}; + this.buildInfo = { + strict: true + }; + + this.clearDependenciesAndBlocks(); + + for (const [name, options] of this._exposes) { + const block = new AsyncDependenciesBlock( + undefined, + { name }, + options.import[options.import.length - 1] + ); + let idx = 0; + for (const request of options.import) { + const dep = new ContainerExposedDependency(name, request); + dep.loc = { + name, + index: idx++ + }; + + block.addDependency(dep); + } + this.addBlock(block); + } + + callback(); + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration({ moduleGraph, chunkGraph, runtimeTemplate }) { + const sources = new Map(); + const runtimeRequirements = new Set([ + RuntimeGlobals.definePropertyGetters, + RuntimeGlobals.hasOwnProperty, + RuntimeGlobals.exports + ]); + const getters = []; + + for (const block of this.blocks) { + const { dependencies } = block; + + const modules = dependencies.map(dependency => { + const dep = /** @type {ContainerExposedDependency} */ (dependency); + return { + name: dep.exposedName, + module: moduleGraph.getModule(dep), + request: dep.userRequest + }; + }); + + let str; + + if (modules.some(m => !m.module)) { + str = runtimeTemplate.throwMissingModuleErrorBlock({ + request: modules.map(m => m.request).join(", ") + }); + } else { + str = `return ${runtimeTemplate.blockPromise({ + block, + message: "", + chunkGraph, + runtimeRequirements + })}.then(${runtimeTemplate.returningFunction( + runtimeTemplate.returningFunction( + `(${modules + .map(({ module, request }) => + runtimeTemplate.moduleRaw({ + module, + chunkGraph, + request, + weak: false, + runtimeRequirements + }) + ) + .join(", ")})` + ) + )});`; + } + + getters.push( + `${JSON.stringify(modules[0].name)}: ${runtimeTemplate.basicFunction( + "", + str + )}` + ); + } + + const source = Template.asString([ + `var moduleMap = {`, + Template.indent(getters.join(",\n")), + "};", + `var get = ${runtimeTemplate.basicFunction("module, getScope", [ + `${RuntimeGlobals.currentRemoteGetScope} = getScope;`, + // reusing the getScope variable to avoid creating a new var (and module is also used later) + "getScope = (", + Template.indent([ + `${RuntimeGlobals.hasOwnProperty}(moduleMap, module)`, + Template.indent([ + "? moduleMap[module]()", + `: Promise.resolve().then(${runtimeTemplate.basicFunction( + "", + "throw new Error('Module \"' + module + '\" does not exist in container.');" + )})` + ]) + ]), + ");", + `${RuntimeGlobals.currentRemoteGetScope} = undefined;`, + "return getScope;" + ])};`, + `var init = ${runtimeTemplate.basicFunction("shareScope, initScope", [ + `if (!${RuntimeGlobals.shareScopeMap}) return;`, + `var oldScope = ${RuntimeGlobals.shareScopeMap}[${JSON.stringify( + this._shareScope + )}];`, + `var name = ${JSON.stringify(this._shareScope)}`, + `if(oldScope && oldScope !== shareScope) throw new Error("Container initialization failed as it has already been initialized with a different share scope");`, + `${RuntimeGlobals.shareScopeMap}[name] = shareScope;`, + `return ${RuntimeGlobals.initializeSharing}(name, initScope);` + ])};`, + "", + "// This exports getters to disallow modifications", + `${RuntimeGlobals.definePropertyGetters}(exports, {`, + Template.indent([ + `get: ${runtimeTemplate.returningFunction("get")},`, + `init: ${runtimeTemplate.returningFunction("init")}` + ]), + "});" + ]); + + sources.set( + "javascript", + this.useSourceMap || this.useSimpleSourceMap + ? new OriginalSource(source, "webpack/container-entry") + : new RawSource(source) + ); + + return { + sources, + runtimeRequirements + }; + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + return 42; + } + + serialize(context) { + const { write } = context; + write(this._name); + write(this._exposes); + write(this._shareScope); + super.serialize(context); + } + + static deserialize(context) { + const { read } = context; + const obj = new ContainerEntryModule(read(), read(), read()); + obj.deserialize(context); + return obj; + } +} + +makeSerializable( + ContainerEntryModule, + "webpack/lib/container/ContainerEntryModule" +); + +module.exports = ContainerEntryModule; + + +/***/ }), + +/***/ 89490: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr +*/ + + + +const ModuleFactory = __webpack_require__(6259); +const ContainerEntryModule = __webpack_require__(97927); + +/** @typedef {import("../ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ +/** @typedef {import("../ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ +/** @typedef {import("./ContainerEntryDependency")} ContainerEntryDependency */ + +module.exports = class ContainerEntryModuleFactory extends ModuleFactory { + /** + * @param {ModuleFactoryCreateData} data data object + * @param {function(Error=, ModuleFactoryResult=): void} callback callback + * @returns {void} + */ + create({ dependencies: [dependency] }, callback) { + const dep = /** @type {ContainerEntryDependency} */ (dependency); + callback(null, { + module: new ContainerEntryModule(dep.name, dep.exposes, dep.shareScope) + }); + } +}; + + +/***/ }), + +/***/ 83179: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr +*/ + + + +const ModuleDependency = __webpack_require__(5462); +const makeSerializable = __webpack_require__(55575); + +class ContainerExposedDependency extends ModuleDependency { + /** + * @param {string} exposedName public name + * @param {string} request request to module + */ + constructor(exposedName, request) { + super(request); + this.exposedName = exposedName; + } + + get type() { + return "container exposed"; + } + + get category() { + return "esm"; + } + + /** + * @returns {string | null} an identifier to merge equal requests + */ + getResourceIdentifier() { + return `exposed dependency ${this.exposedName}=${this.request}`; + } + + serialize(context) { + context.write(this.exposedName); + super.serialize(context); + } + + deserialize(context) { + this.exposedName = context.read(); + super.deserialize(context); + } +} + +makeSerializable( + ContainerExposedDependency, + "webpack/lib/container/ContainerExposedDependency" +); + +module.exports = ContainerExposedDependency; + + +/***/ }), + +/***/ 93689: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(30300); +const ContainerEntryDependency = __webpack_require__(22887); +const ContainerEntryModuleFactory = __webpack_require__(89490); +const ContainerExposedDependency = __webpack_require__(83179); +const { parseOptions } = __webpack_require__(57844); + +/** @typedef {import("../../declarations/plugins/container/ContainerPlugin").ContainerPluginOptions} ContainerPluginOptions */ +/** @typedef {import("../Compiler")} Compiler */ + +const PLUGIN_NAME = "ContainerPlugin"; + +class ContainerPlugin { + /** + * @param {ContainerPluginOptions} options options + */ + constructor(options) { + validate(schema, options, { name: "Container Plugin" }); + + this._options = { + name: options.name, + shareScope: options.shareScope || "default", + library: options.library || { + type: "var", + name: options.name + }, + filename: options.filename || undefined, + exposes: parseOptions( + options.exposes, + item => ({ + import: Array.isArray(item) ? item : [item] + }), + item => ({ + import: Array.isArray(item.import) ? item.import : [item.import] + }) + ) + }; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { name, exposes, shareScope, filename, library } = this._options; + + compiler.options.output.enabledLibraryTypes.push(library.type); + + compiler.hooks.make.tapAsync(PLUGIN_NAME, (compilation, callback) => { + const dep = new ContainerEntryDependency(name, exposes, shareScope); + dep.loc = { name }; + compilation.addEntry( + compilation.options.context, + dep, + { + name, + filename, + library + }, + error => { + if (error) return callback(error); + callback(); + } + ); + }); + + compiler.hooks.thisCompilation.tap( + PLUGIN_NAME, + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + ContainerEntryDependency, + new ContainerEntryModuleFactory() + ); + + compilation.dependencyFactories.set( + ContainerExposedDependency, + normalModuleFactory + ); + } + ); + } +} + +module.exports = ContainerPlugin; + + +/***/ }), + +/***/ 65276: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(1274); +const ExternalsPlugin = __webpack_require__(19056); +const RuntimeGlobals = __webpack_require__(48801); +const FallbackDependency = __webpack_require__(48901); +const FallbackItemDependency = __webpack_require__(69742); +const FallbackModuleFactory = __webpack_require__(59489); +const RemoteModule = __webpack_require__(5713); +const RemoteRuntimeModule = __webpack_require__(35349); +const RemoteToExternalDependency = __webpack_require__(11194); +const { parseOptions } = __webpack_require__(57844); + +/** @typedef {import("../../declarations/plugins/container/ContainerReferencePlugin").ContainerReferencePluginOptions} ContainerReferencePluginOptions */ +/** @typedef {import("../../declarations/plugins/container/ContainerReferencePlugin").RemotesConfig} RemotesConfig */ +/** @typedef {import("../Compiler")} Compiler */ + +const slashCode = "/".charCodeAt(0); + +class ContainerReferencePlugin { + /** + * @param {ContainerReferencePluginOptions} options options + */ + constructor(options) { + validate(schema, options, { name: "Container Reference Plugin" }); + + this._remoteType = options.remoteType; + this._remotes = parseOptions( + options.remotes, + item => ({ + external: Array.isArray(item) ? item : [item], + shareScope: options.shareScope || "default" + }), + item => ({ + external: Array.isArray(item.external) + ? item.external + : [item.external], + shareScope: item.shareScope || options.shareScope || "default" + }) + ); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { _remotes: remotes, _remoteType: remoteType } = this; + + /** @type {Record} */ + const remoteExternals = {}; + for (const [key, config] of remotes) { + let i = 0; + for (const external of config.external) { + if (external.startsWith("internal ")) continue; + remoteExternals[ + `webpack/container/reference/${key}${i ? `/fallback-${i}` : ""}` + ] = external; + i++; + } + } + + new ExternalsPlugin(remoteType, remoteExternals).apply(compiler); + + compiler.hooks.compilation.tap( + "ContainerReferencePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + RemoteToExternalDependency, + normalModuleFactory + ); + + compilation.dependencyFactories.set( + FallbackItemDependency, + normalModuleFactory + ); + + compilation.dependencyFactories.set( + FallbackDependency, + new FallbackModuleFactory() + ); + + normalModuleFactory.hooks.factorize.tap( + "ContainerReferencePlugin", + data => { + if (!data.request.includes("!")) { + for (const [key, config] of remotes) { + if ( + data.request.startsWith(`${key}`) && + (data.request.length === key.length || + data.request.charCodeAt(key.length) === slashCode) + ) { + return new RemoteModule( + data.request, + config.external.map((external, i) => + external.startsWith("internal ") + ? external.slice(9) + : `webpack/container/reference/${key}${ + i ? `/fallback-${i}` : "" + }` + ), + `.${data.request.slice(key.length)}`, + config.shareScope + ); + } + } + } + } + ); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunkHandlers) + .tap("ContainerReferencePlugin", (chunk, set) => { + set.add(RuntimeGlobals.module); + set.add(RuntimeGlobals.moduleFactoriesAddOnly); + set.add(RuntimeGlobals.hasOwnProperty); + set.add(RuntimeGlobals.initializeSharing); + set.add(RuntimeGlobals.shareScopeMap); + compilation.addRuntimeModule(chunk, new RemoteRuntimeModule()); + }); + } + ); + } +} + +module.exports = ContainerReferencePlugin; + + +/***/ }), + +/***/ 48901: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const makeSerializable = __webpack_require__(55575); + +class FallbackDependency extends Dependency { + constructor(requests) { + super(); + this.requests = requests; + } + + /** + * @returns {string | null} an identifier to merge equal requests + */ + getResourceIdentifier() { + return `fallback ${this.requests.join(" ")}`; + } + + get type() { + return "fallback"; + } + + get category() { + return "esm"; + } + + serialize(context) { + const { write } = context; + write(this.requests); + super.serialize(context); + } + + static deserialize(context) { + const { read } = context; + const obj = new FallbackDependency(read()); + obj.deserialize(context); + return obj; + } +} + +makeSerializable( + FallbackDependency, + "webpack/lib/container/FallbackDependency" +); + +module.exports = FallbackDependency; + + +/***/ }), + +/***/ 69742: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ModuleDependency = __webpack_require__(5462); +const makeSerializable = __webpack_require__(55575); + +class FallbackItemDependency extends ModuleDependency { + constructor(request) { + super(request); + } + + get type() { + return "fallback item"; + } + + get category() { + return "esm"; + } +} + +makeSerializable( + FallbackItemDependency, + "webpack/lib/container/FallbackItemDependency" +); + +module.exports = FallbackItemDependency; + + +/***/ }), + +/***/ 83812: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy +*/ + + + +const { RawSource } = __webpack_require__(55600); +const Module = __webpack_require__(54031); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const makeSerializable = __webpack_require__(55575); +const FallbackItemDependency = __webpack_require__(69742); + +/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ +/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("../RequestShortener")} RequestShortener */ +/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ + +const TYPES = new Set(["javascript"]); +const RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]); + +class FallbackModule extends Module { + /** + * @param {string[]} requests list of requests to choose one + */ + constructor(requests) { + super("fallback-module"); + this.requests = requests; + this._identifier = `fallback ${this.requests.join(" ")}`; + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return this._identifier; + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return this._identifier; + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + return `webpack/container/fallback/${this.requests[0]}/and ${ + this.requests.length - 1 + } more`; + } + + /** + * @param {Chunk} chunk the chunk which condition should be checked + * @param {Compilation} compilation the compilation + * @returns {boolean} true, if the chunk is ok for the module + */ + chunkCondition(chunk, { chunkGraph }) { + return chunkGraph.getNumberOfEntryModules(chunk) > 0; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + callback(null, !this.buildInfo); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this.buildMeta = {}; + this.buildInfo = { + strict: true + }; + + this.clearDependenciesAndBlocks(); + for (const request of this.requests) + this.addDependency(new FallbackItemDependency(request)); + + callback(); + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + return this.requests.length * 5 + 42; + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) { + const ids = this.dependencies.map(dep => + chunkGraph.getModuleId(moduleGraph.getModule(dep)) + ); + const code = Template.asString([ + `var ids = ${JSON.stringify(ids)};`, + "var error, result, i = 0;", + `var loop = ${runtimeTemplate.basicFunction("next", [ + "while(i < ids.length) {", + Template.indent([ + "try { next = __webpack_require__(ids[i++]); } catch(e) { return handleError(e); }", + "if(next) return next.then ? next.then(handleResult, handleError) : handleResult(next);" + ]), + "}", + "if(error) throw error;" + ])}`, + `var handleResult = ${runtimeTemplate.basicFunction("result", [ + "if(result) return result;", + "return loop();" + ])};`, + `var handleError = ${runtimeTemplate.basicFunction("e", [ + "error = e;", + "return loop();" + ])};`, + "module.exports = loop();" + ]); + const sources = new Map(); + sources.set("javascript", new RawSource(code)); + return { sources, runtimeRequirements: RUNTIME_REQUIREMENTS }; + } + + serialize(context) { + const { write } = context; + write(this.requests); + super.serialize(context); + } + + static deserialize(context) { + const { read } = context; + const obj = new FallbackModule(read()); + obj.deserialize(context); + return obj; + } +} + +makeSerializable(FallbackModule, "webpack/lib/container/FallbackModule"); + +module.exports = FallbackModule; + + +/***/ }), + +/***/ 59489: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr +*/ + + + +const ModuleFactory = __webpack_require__(6259); +const FallbackModule = __webpack_require__(83812); + +/** @typedef {import("../ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ +/** @typedef {import("../ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ +/** @typedef {import("./FallbackDependency")} FallbackDependency */ + +module.exports = class FallbackModuleFactory extends ModuleFactory { + /** + * @param {ModuleFactoryCreateData} data data object + * @param {function(Error=, ModuleFactoryResult=): void} callback callback + * @returns {void} + */ + create({ dependencies: [dependency] }, callback) { + const dep = /** @type {FallbackDependency} */ (dependency); + callback(null, { + module: new FallbackModule(dep.requests) + }); + } +}; + + +/***/ }), + +/***/ 27481: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(87760); +const SharePlugin = __webpack_require__(3533); +const ContainerPlugin = __webpack_require__(93689); +const ContainerReferencePlugin = __webpack_require__(65276); + +/** @typedef {import("../../declarations/plugins/container/ModuleFederationPlugin").ExternalsType} ExternalsType */ +/** @typedef {import("../../declarations/plugins/container/ModuleFederationPlugin").ModuleFederationPluginOptions} ModuleFederationPluginOptions */ +/** @typedef {import("../../declarations/plugins/container/ModuleFederationPlugin").Shared} Shared */ +/** @typedef {import("../Compiler")} Compiler */ + +class ModuleFederationPlugin { + /** + * @param {ModuleFederationPluginOptions} options options + */ + constructor(options) { + validate(schema, options, { name: "Module Federation Plugin" }); + + this._options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { _options: options } = this; + const library = options.library || { type: "var", name: options.name }; + const remoteType = + options.remoteType || + (options.library && + schema.definitions.ExternalsType.enum.includes(options.library.type) + ? /** @type {ExternalsType} */ (options.library.type) + : "script"); + if ( + library && + !compiler.options.output.enabledLibraryTypes.includes(library.type) + ) { + compiler.options.output.enabledLibraryTypes.push(library.type); + } + compiler.hooks.afterPlugins.tap("ModuleFederationPlugin", () => { + if ( + options.exposes && + (Array.isArray(options.exposes) + ? options.exposes.length > 0 + : Object.keys(options.exposes).length > 0) + ) { + new ContainerPlugin({ + name: options.name, + library, + filename: options.filename, + exposes: options.exposes + }).apply(compiler); + } + if ( + options.remotes && + (Array.isArray(options.remotes) + ? options.remotes.length > 0 + : Object.keys(options.remotes).length > 0) + ) { + new ContainerReferencePlugin({ + remoteType, + remotes: options.remotes + }).apply(compiler); + } + if (options.shared) { + new SharePlugin({ + shared: options.shared, + shareScope: options.shareScope + }).apply(compiler); + } + }); + } +} + +module.exports = ModuleFederationPlugin; + + +/***/ }), + +/***/ 5713: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy +*/ + + + +const { RawSource } = __webpack_require__(55600); +const Module = __webpack_require__(54031); +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const FallbackDependency = __webpack_require__(48901); +const RemoteToExternalDependency = __webpack_require__(11194); + +/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ +/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("../RequestShortener")} RequestShortener */ +/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ + +const TYPES = new Set(["remote", "share-init"]); +const RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]); + +class RemoteModule extends Module { + /** + * @param {string} request request string + * @param {string[]} externalRequests list of external requests to containers + * @param {string} internalRequest name of exposed module in container + * @param {string} shareScope the used share scope name + */ + constructor(request, externalRequests, internalRequest, shareScope) { + super("remote-module"); + this.request = request; + this.externalRequests = externalRequests; + this.internalRequest = internalRequest; + this.shareScope = shareScope; + this._identifier = `remote (${shareScope}) ${this.externalRequests.join( + " " + )} ${this.internalRequest}`; + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return this._identifier; + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return `remote ${this.request}`; + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + return `webpack/container/remote/${this.request}`; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + callback(null, !this.buildInfo); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this.buildMeta = {}; + this.buildInfo = { + strict: true + }; + + this.clearDependenciesAndBlocks(); + if (this.externalRequests.length === 1) { + this.addDependency( + new RemoteToExternalDependency(this.externalRequests[0]) + ); + } else { + this.addDependency(new FallbackDependency(this.externalRequests)); + } + + callback(); + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + return 6; + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + /** + * @returns {string | null} absolute path which should be used for condition matching (usually the resource path) + */ + nameForCondition() { + return this.request; + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) { + const module = moduleGraph.getModule(this.dependencies[0]); + const id = module && chunkGraph.getModuleId(module); + const sources = new Map(); + sources.set("remote", new RawSource("")); + const data = new Map(); + data.set("share-init", [ + { + shareScope: this.shareScope, + initStage: 20, + init: id === undefined ? "" : `initExternal(${JSON.stringify(id)});` + } + ]); + return { sources, data, runtimeRequirements: RUNTIME_REQUIREMENTS }; + } + + serialize(context) { + const { write } = context; + write(this.request); + write(this.externalRequests); + write(this.internalRequest); + write(this.shareScope); + super.serialize(context); + } + + static deserialize(context) { + const { read } = context; + const obj = new RemoteModule(read(), read(), read(), read()); + obj.deserialize(context); + return obj; + } +} + +makeSerializable(RemoteModule, "webpack/lib/container/RemoteModule"); + +module.exports = RemoteModule; + + +/***/ }), + +/***/ 35349: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +/** @typedef {import("./RemoteModule")} RemoteModule */ + +class RemoteRuntimeModule extends RuntimeModule { + constructor() { + super("remotes loading"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeTemplate, chunkGraph, moduleGraph } = this.compilation; + const chunkToRemotesMapping = {}; + const idToExternalAndNameMapping = {}; + for (const chunk of this.chunk.getAllAsyncChunks()) { + const modules = chunkGraph.getChunkModulesIterableBySourceType( + chunk, + "remote" + ); + if (!modules) continue; + const remotes = (chunkToRemotesMapping[chunk.id] = []); + for (const m of modules) { + const module = /** @type {RemoteModule} */ (m); + const name = module.internalRequest; + const id = chunkGraph.getModuleId(module); + const shareScope = module.shareScope; + const dep = module.dependencies[0]; + const externalModule = moduleGraph.getModule(dep); + const externalModuleId = + externalModule && chunkGraph.getModuleId(externalModule); + remotes.push(id); + idToExternalAndNameMapping[id] = [shareScope, name, externalModuleId]; + } + } + return Template.asString([ + `var chunkMapping = ${JSON.stringify( + chunkToRemotesMapping, + null, + "\t" + )};`, + `var idToExternalAndNameMapping = ${JSON.stringify( + idToExternalAndNameMapping, + null, + "\t" + )};`, + `${ + RuntimeGlobals.ensureChunkHandlers + }.remotes = ${runtimeTemplate.basicFunction("chunkId, promises", [ + `if(${RuntimeGlobals.hasOwnProperty}(chunkMapping, chunkId)) {`, + Template.indent([ + `chunkMapping[chunkId].forEach(${runtimeTemplate.basicFunction("id", [ + `var getScope = ${RuntimeGlobals.currentRemoteGetScope};`, + "if(!getScope) getScope = [];", + "var data = idToExternalAndNameMapping[id];", + "if(getScope.indexOf(data) >= 0) return;", + "getScope.push(data);", + `if(data.p) return promises.push(data.p);`, + `var onError = ${runtimeTemplate.basicFunction("error", [ + 'if(!error) error = new Error("Container missing");', + 'if(typeof error.message === "string")', + Template.indent( + `error.message += '\\nwhile loading "' + data[1] + '" from ' + data[2];` + ), + `__webpack_modules__[id] = ${runtimeTemplate.basicFunction("", [ + "throw error;" + ])}`, + "data.p = 0;" + ])};`, + `var handleFunction = ${runtimeTemplate.basicFunction( + "fn, arg1, arg2, d, next, first", + [ + "try {", + Template.indent([ + "var promise = fn(arg1, arg2);", + "if(promise && promise.then) {", + Template.indent([ + `var p = promise.then(${runtimeTemplate.returningFunction( + "next(result, d)", + "result" + )}, onError);`, + `if(first) promises.push(data.p = p); else return p;` + ]), + "} else {", + Template.indent(["return next(promise, d, first);"]), + "}" + ]), + "} catch(error) {", + Template.indent(["onError(error);"]), + "}" + ] + )}`, + `var onExternal = ${runtimeTemplate.returningFunction( + `external ? handleFunction(${RuntimeGlobals.initializeSharing}, data[0], 0, external, onInitialized, first) : onError()`, + "external, _, first" + )};`, + `var onInitialized = ${runtimeTemplate.returningFunction( + `handleFunction(external.get, data[1], getScope, 0, onFactory, first)`, + "_, external, first" + )};`, + `var onFactory = ${runtimeTemplate.basicFunction("factory", [ + "data.p = 1;", + `__webpack_modules__[id] = ${runtimeTemplate.basicFunction( + "module", + ["module.exports = factory();"] + )}` + ])};`, + "handleFunction(__webpack_require__, data[2], 0, 0, onExternal, 1);" + ])});` + ]), + "}" + ])}` + ]); + } +} + +module.exports = RemoteRuntimeModule; + + +/***/ }), + +/***/ 11194: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ModuleDependency = __webpack_require__(5462); +const makeSerializable = __webpack_require__(55575); + +class RemoteToExternalDependency extends ModuleDependency { + constructor(request) { + super(request); + } + + get type() { + return "remote to external"; + } + + get category() { + return "esm"; + } +} + +makeSerializable( + RemoteToExternalDependency, + "webpack/lib/container/RemoteToExternalDependency" +); + +module.exports = RemoteToExternalDependency; + + +/***/ }), + +/***/ 57844: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @template T @typedef {(string | Record)[] | Record} ContainerOptionsFormat */ + +/** + * @template T + * @template N + * @param {ContainerOptionsFormat} options options passed by the user + * @param {function(string | string[], string) : N} normalizeSimple normalize a simple item + * @param {function(T, string) : N} normalizeOptions normalize a complex item + * @param {function(string, N): void} fn processing function + * @returns {void} + */ +const process = (options, normalizeSimple, normalizeOptions, fn) => { + const array = items => { + for (const item of items) { + if (typeof item === "string") { + fn(item, normalizeSimple(item, item)); + } else if (item && typeof item === "object") { + object(item); + } else { + throw new Error("Unexpected options format"); + } + } + }; + const object = obj => { + for (const [key, value] of Object.entries(obj)) { + if (typeof value === "string" || Array.isArray(value)) { + fn(key, normalizeSimple(value, key)); + } else { + fn(key, normalizeOptions(value, key)); + } + } + }; + if (!options) { + return; + } else if (Array.isArray(options)) { + array(options); + } else if (typeof options === "object") { + object(options); + } else { + throw new Error("Unexpected options format"); + } +}; + +/** + * @template T + * @template R + * @param {ContainerOptionsFormat} options options passed by the user + * @param {function(string | string[], string) : R} normalizeSimple normalize a simple item + * @param {function(T, string) : R} normalizeOptions normalize a complex item + * @returns {[string, R][]} parsed options + */ +const parseOptions = (options, normalizeSimple, normalizeOptions) => { + /** @type {[string, R][]} */ + const items = []; + process(options, normalizeSimple, normalizeOptions, (key, value) => { + items.push([key, value]); + }); + return items; +}; + +/** + * @template T + * @param {string} scope scope name + * @param {ContainerOptionsFormat} options options passed by the user + * @returns {Record} options to spread or pass + */ +const scope = (scope, options) => { + /** @type {Record} */ + const obj = {}; + process( + options, + item => /** @type {string | string[] | T} */ (item), + item => /** @type {string | string[] | T} */ (item), + (key, value) => { + obj[ + key.startsWith("./") ? `${scope}${key.slice(1)}` : `${scope}/${key}` + ] = value; + } + ); + return obj; +}; + +exports.parseOptions = parseOptions; +exports.scope = scope; + + +/***/ }), + +/***/ 17212: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const { Tracer } = __webpack_require__(42758); +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(92564); +const { dirname, mkdirpSync } = __webpack_require__(71593); + +/** @typedef {import("../../declarations/plugins/debug/ProfilingPlugin").ProfilingPluginOptions} ProfilingPluginOptions */ +/** @typedef {import("../util/fs").IntermediateFileSystem} IntermediateFileSystem */ + +let inspector = undefined; + +try { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + inspector = __webpack_require__(57012); +} catch (e) { + console.log("Unable to CPU profile in < node 8.0"); +} + +class Profiler { + constructor(inspector) { + this.session = undefined; + this.inspector = inspector; + } + + hasSession() { + return this.session !== undefined; + } + + startProfiling() { + if (this.inspector === undefined) { + return Promise.resolve(); + } + + try { + this.session = new inspector.Session(); + this.session.connect(); + } catch (_) { + this.session = undefined; + return Promise.resolve(); + } + + return Promise.all([ + this.sendCommand("Profiler.setSamplingInterval", { + interval: 100 + }), + this.sendCommand("Profiler.enable"), + this.sendCommand("Profiler.start") + ]); + } + + sendCommand(method, params) { + if (this.hasSession()) { + return new Promise((res, rej) => { + return this.session.post(method, params, (err, params) => { + if (err !== null) { + rej(err); + } else { + res(params); + } + }); + }); + } else { + return Promise.resolve(); + } + } + + destroy() { + if (this.hasSession()) { + this.session.disconnect(); + } + + return Promise.resolve(); + } + + stopProfiling() { + return this.sendCommand("Profiler.stop"); + } +} + +/** + * an object that wraps Tracer and Profiler with a counter + * @typedef {Object} Trace + * @property {Tracer} trace instance of Tracer + * @property {number} counter Counter + * @property {Profiler} profiler instance of Profiler + * @property {Function} end the end function + */ + +/** + * @param {IntermediateFileSystem} fs filesystem used for output + * @param {string} outputPath The location where to write the log. + * @returns {Trace} The trace object + */ +const createTrace = (fs, outputPath) => { + const trace = new Tracer({ + noStream: true + }); + const profiler = new Profiler(inspector); + if (/\/|\\/.test(outputPath)) { + const dirPath = dirname(fs, outputPath); + mkdirpSync(fs, dirPath); + } + const fsStream = fs.createWriteStream(outputPath); + + let counter = 0; + + trace.pipe(fsStream); + // These are critical events that need to be inserted so that tools like + // chrome dev tools can load the profile. + trace.instantEvent({ + name: "TracingStartedInPage", + id: ++counter, + cat: ["disabled-by-default-devtools.timeline"], + args: { + data: { + sessionId: "-1", + page: "0xfff", + frames: [ + { + frame: "0xfff", + url: "webpack", + name: "" + } + ] + } + } + }); + + trace.instantEvent({ + name: "TracingStartedInBrowser", + id: ++counter, + cat: ["disabled-by-default-devtools.timeline"], + args: { + data: { + sessionId: "-1" + } + } + }); + + return { + trace, + counter, + profiler, + end: callback => { + // Wait until the write stream finishes. + fsStream.on("close", () => { + callback(); + }); + // Tear down the readable trace stream. + trace.push(null); + } + }; +}; + +const pluginName = "ProfilingPlugin"; + +class ProfilingPlugin { + /** + * @param {ProfilingPluginOptions=} options options object + */ + constructor(options = {}) { + validate(schema, options, { + name: "Profiling Plugin", + baseDataPath: "options" + }); + this.outputPath = options.outputPath || "events.json"; + } + + apply(compiler) { + const tracer = createTrace( + compiler.intermediateFileSystem, + this.outputPath + ); + tracer.profiler.startProfiling(); + + // Compiler Hooks + Object.keys(compiler.hooks).forEach(hookName => { + compiler.hooks[hookName].intercept( + makeInterceptorFor("Compiler", tracer)(hookName) + ); + }); + + Object.keys(compiler.resolverFactory.hooks).forEach(hookName => { + compiler.resolverFactory.hooks[hookName].intercept( + makeInterceptorFor("Resolver", tracer)(hookName) + ); + }); + + compiler.hooks.compilation.tap( + pluginName, + (compilation, { normalModuleFactory, contextModuleFactory }) => { + interceptAllHooksFor(compilation, tracer, "Compilation"); + interceptAllHooksFor( + normalModuleFactory, + tracer, + "Normal Module Factory" + ); + interceptAllHooksFor( + contextModuleFactory, + tracer, + "Context Module Factory" + ); + interceptAllParserHooks(normalModuleFactory, tracer); + interceptAllJavascriptModulesPluginHooks(compilation, tracer); + } + ); + + // We need to write out the CPU profile when we are all done. + compiler.hooks.done.tapAsync( + { + name: pluginName, + stage: Infinity + }, + (stats, callback) => { + tracer.profiler.stopProfiling().then(parsedResults => { + if (parsedResults === undefined) { + tracer.profiler.destroy(); + tracer.trace.flush(); + tracer.end(callback); + return; + } + + const cpuStartTime = parsedResults.profile.startTime; + const cpuEndTime = parsedResults.profile.endTime; + + tracer.trace.completeEvent({ + name: "TaskQueueManager::ProcessTaskFromWorkQueue", + id: ++tracer.counter, + cat: ["toplevel"], + ts: cpuStartTime, + args: { + src_file: "../../ipc/ipc_moji_bootstrap.cc", + src_func: "Accept" + } + }); + + tracer.trace.completeEvent({ + name: "EvaluateScript", + id: ++tracer.counter, + cat: ["devtools.timeline"], + ts: cpuStartTime, + dur: cpuEndTime - cpuStartTime, + args: { + data: { + url: "webpack", + lineNumber: 1, + columnNumber: 1, + frame: "0xFFF" + } + } + }); + + tracer.trace.instantEvent({ + name: "CpuProfile", + id: ++tracer.counter, + cat: ["disabled-by-default-devtools.timeline"], + ts: cpuEndTime, + args: { + data: { + cpuProfile: parsedResults.profile + } + } + }); + + tracer.profiler.destroy(); + tracer.trace.flush(); + tracer.end(callback); + }); + } + ); + } +} + +const interceptAllHooksFor = (instance, tracer, logLabel) => { + if (Reflect.has(instance, "hooks")) { + Object.keys(instance.hooks).forEach(hookName => { + const hook = instance.hooks[hookName]; + if (!hook._fakeHook) { + hook.intercept(makeInterceptorFor(logLabel, tracer)(hookName)); + } + }); + } +}; + +const interceptAllParserHooks = (moduleFactory, tracer) => { + const moduleTypes = [ + "javascript/auto", + "javascript/dynamic", + "javascript/esm", + "json", + "webassembly/async", + "webassembly/sync" + ]; + + moduleTypes.forEach(moduleType => { + moduleFactory.hooks.parser + .for(moduleType) + .tap("ProfilingPlugin", (parser, parserOpts) => { + interceptAllHooksFor(parser, tracer, "Parser"); + }); + }); +}; + +const interceptAllJavascriptModulesPluginHooks = (compilation, tracer) => { + interceptAllHooksFor( + { + hooks: __webpack_require__(80867).getCompilationHooks( + compilation + ) + }, + tracer, + "JavascriptModulesPlugin" + ); +}; + +const makeInterceptorFor = (instance, tracer) => hookName => ({ + register: ({ name, type, context, fn }) => { + const newFn = makeNewProfiledTapFn(hookName, tracer, { + name, + type, + fn + }); + return { + name, + type, + context, + fn: newFn + }; + } +}); + +// TODO improve typing +/** @typedef {(...args: TODO[]) => void | Promise} PluginFunction */ + +/** + * @param {string} hookName Name of the hook to profile. + * @param {Trace} tracer The trace object. + * @param {object} options Options for the profiled fn. + * @param {string} options.name Plugin name + * @param {string} options.type Plugin type (sync | async | promise) + * @param {PluginFunction} options.fn Plugin function + * @returns {PluginFunction} Chainable hooked function. + */ +const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => { + const defaultCategory = ["blink.user_timing"]; + + switch (type) { + case "promise": + return (...args) => { + const id = ++tracer.counter; + tracer.trace.begin({ + name, + id, + cat: defaultCategory + }); + const promise = /** @type {Promise<*>} */ (fn(...args)); + return promise.then(r => { + tracer.trace.end({ + name, + id, + cat: defaultCategory + }); + return r; + }); + }; + case "async": + return (...args) => { + const id = ++tracer.counter; + tracer.trace.begin({ + name, + id, + cat: defaultCategory + }); + const callback = args.pop(); + fn(...args, (...r) => { + tracer.trace.end({ + name, + id, + cat: defaultCategory + }); + callback(...r); + }); + }; + case "sync": + return (...args) => { + const id = ++tracer.counter; + // Do not instrument ourself due to the CPU + // profile needing to be the last event in the trace. + if (name === pluginName) { + return fn(...args); + } + + tracer.trace.begin({ + name, + id, + cat: defaultCategory + }); + let r; + try { + r = fn(...args); + } catch (error) { + tracer.trace.end({ + name, + id, + cat: defaultCategory + }); + throw error; + } + tracer.trace.end({ + name, + id, + cat: defaultCategory + }); + return r; + }; + default: + break; + } +}; + +module.exports = ProfilingPlugin; +module.exports.Profiler = Profiler; + + +/***/ }), + +/***/ 50781: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +/** @type {Record} */ +const DEFINITIONS = { + f: { + definition: "var __WEBPACK_AMD_DEFINE_RESULT__;", + content: `!(__WEBPACK_AMD_DEFINE_RESULT__ = (#).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`, + requests: [ + RuntimeGlobals.require, + RuntimeGlobals.exports, + RuntimeGlobals.module + ] + }, + o: { + definition: "", + content: "!(module.exports = #)", + requests: [RuntimeGlobals.module] + }, + of: { + definition: + "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;", + content: `!(__WEBPACK_AMD_DEFINE_FACTORY__ = (#), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`, + requests: [ + RuntimeGlobals.require, + RuntimeGlobals.exports, + RuntimeGlobals.module + ] + }, + af: { + definition: + "var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;", + content: `!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, __WEBPACK_AMD_DEFINE_RESULT__ = (#).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`, + requests: [RuntimeGlobals.exports, RuntimeGlobals.module] + }, + ao: { + definition: "", + content: "!(#, module.exports = #)", + requests: [RuntimeGlobals.module] + }, + aof: { + definition: + "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;", + content: `!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, __WEBPACK_AMD_DEFINE_FACTORY__ = (#), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))`, + requests: [RuntimeGlobals.exports, RuntimeGlobals.module] + }, + lf: { + definition: "var XXX, XXXmodule;", + content: + "!(XXXmodule = { id: YYY, exports: {}, loaded: false }, XXX = #.call(XXXmodule.exports, __webpack_require__, XXXmodule.exports, XXXmodule), XXXmodule.loaded = true, XXX === undefined && (XXX = XXXmodule.exports))", + requests: [RuntimeGlobals.require, RuntimeGlobals.module] + }, + lo: { + definition: "var XXX;", + content: "!(XXX = #)", + requests: [] + }, + lof: { + definition: "var XXX, XXXfactory, XXXmodule;", + content: + "!(XXXfactory = (#), (typeof XXXfactory === 'function' ? (XXXmodule = { id: YYY, exports: {}, loaded: false }), (XXX = XXXfactory.call(XXXmodule.exports, __webpack_require__, XXXmodule.exports, XXXmodule)), (XXXmodule.loaded = true), XXX === undefined && (XXX = XXXmodule.exports) : XXX = XXXfactory))", + requests: [RuntimeGlobals.require, RuntimeGlobals.module] + }, + laf: { + definition: "var __WEBPACK_AMD_DEFINE_ARRAY__, XXX, XXXexports;", + content: + "!(__WEBPACK_AMD_DEFINE_ARRAY__ = #, XXX = (#).apply(XXXexports = {}, __WEBPACK_AMD_DEFINE_ARRAY__), XXX === undefined && (XXX = XXXexports))", + requests: [] + }, + lao: { + definition: "var XXX;", + content: "!(#, XXX = #)", + requests: [] + }, + laof: { + definition: "var XXXarray, XXXfactory, XXXexports, XXX;", + content: `!(XXXarray = #, XXXfactory = (#), + (typeof XXXfactory === 'function' ? + ((XXX = XXXfactory.apply(XXXexports = {}, XXXarray)), XXX === undefined && (XXX = XXXexports)) : + (XXX = XXXfactory) + ))`, + requests: [] + } +}; + +class AMDDefineDependency extends NullDependency { + constructor(range, arrayRange, functionRange, objectRange, namedModule) { + super(); + this.range = range; + this.arrayRange = arrayRange; + this.functionRange = functionRange; + this.objectRange = objectRange; + this.namedModule = namedModule; + this.localModule = null; + } + + get type() { + return "amd define"; + } + + serialize(context) { + const { write } = context; + write(this.range); + write(this.arrayRange); + write(this.functionRange); + write(this.objectRange); + write(this.namedModule); + write(this.localModule); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.range = read(); + this.arrayRange = read(); + this.functionRange = read(); + this.objectRange = read(); + this.namedModule = read(); + this.localModule = read(); + super.deserialize(context); + } +} + +makeSerializable( + AMDDefineDependency, + "webpack/lib/dependencies/AMDDefineDependency" +); + +AMDDefineDependency.Template = class AMDDefineDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, { runtimeRequirements }) { + const dep = /** @type {AMDDefineDependency} */ (dependency); + const branch = this.branch(dep); + const { definition, content, requests } = DEFINITIONS[branch]; + for (const req of requests) { + runtimeRequirements.add(req); + } + this.replace(dep, source, definition, content); + } + + localModuleVar(dependency) { + return ( + dependency.localModule && + dependency.localModule.used && + dependency.localModule.variableName() + ); + } + + branch(dependency) { + const localModuleVar = this.localModuleVar(dependency) ? "l" : ""; + const arrayRange = dependency.arrayRange ? "a" : ""; + const objectRange = dependency.objectRange ? "o" : ""; + const functionRange = dependency.functionRange ? "f" : ""; + return localModuleVar + arrayRange + objectRange + functionRange; + } + + replace(dependency, source, definition, text) { + const localModuleVar = this.localModuleVar(dependency); + if (localModuleVar) { + text = text.replace(/XXX/g, localModuleVar.replace(/\$/g, "$$$$")); + definition = definition.replace( + /XXX/g, + localModuleVar.replace(/\$/g, "$$$$") + ); + } + + if (dependency.namedModule) { + text = text.replace(/YYY/g, JSON.stringify(dependency.namedModule)); + } + + const texts = text.split("#"); + + if (definition) source.insert(0, definition); + + let current = dependency.range[0]; + if (dependency.arrayRange) { + source.replace(current, dependency.arrayRange[0] - 1, texts.shift()); + current = dependency.arrayRange[1]; + } + + if (dependency.objectRange) { + source.replace(current, dependency.objectRange[0] - 1, texts.shift()); + current = dependency.objectRange[1]; + } else if (dependency.functionRange) { + source.replace(current, dependency.functionRange[0] - 1, texts.shift()); + current = dependency.functionRange[1]; + } + source.replace(current, dependency.range[1] - 1, texts.shift()); + if (texts.length > 0) throw new Error("Implementation error"); + } +}; + +module.exports = AMDDefineDependency; + + +/***/ }), + +/***/ 4838: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const AMDDefineDependency = __webpack_require__(50781); +const AMDRequireArrayDependency = __webpack_require__(50286); +const AMDRequireContextDependency = __webpack_require__(74654); +const AMDRequireItemDependency = __webpack_require__(20677); +const ConstDependency = __webpack_require__(9364); +const ContextDependencyHelpers = __webpack_require__(39815); +const DynamicExports = __webpack_require__(97093); +const LocalModuleDependency = __webpack_require__(54524); +const { addLocalModule, getLocalModule } = __webpack_require__(94353); + +const isBoundFunctionExpression = expr => { + if (expr.type !== "CallExpression") return false; + if (expr.callee.type !== "MemberExpression") return false; + if (expr.callee.computed) return false; + if (expr.callee.object.type !== "FunctionExpression") return false; + if (expr.callee.property.type !== "Identifier") return false; + if (expr.callee.property.name !== "bind") return false; + return true; +}; + +const isUnboundFunctionExpression = expr => { + if (expr.type === "FunctionExpression") return true; + if (expr.type === "ArrowFunctionExpression") return true; + return false; +}; + +const isCallable = expr => { + if (isUnboundFunctionExpression(expr)) return true; + if (isBoundFunctionExpression(expr)) return true; + return false; +}; + +class AMDDefineDependencyParserPlugin { + constructor(options) { + this.options = options; + } + + apply(parser) { + parser.hooks.call + .for("define") + .tap( + "AMDDefineDependencyParserPlugin", + this.processCallDefine.bind(this, parser) + ); + } + + processArray(parser, expr, param, identifiers, namedModule) { + if (param.isArray()) { + param.items.forEach((param, idx) => { + if ( + param.isString() && + ["require", "module", "exports"].includes(param.string) + ) + identifiers[idx] = param.string; + const result = this.processItem(parser, expr, param, namedModule); + if (result === undefined) { + this.processContext(parser, expr, param); + } + }); + return true; + } else if (param.isConstArray()) { + const deps = []; + param.array.forEach((request, idx) => { + let dep; + let localModule; + if (request === "require") { + identifiers[idx] = request; + dep = "__webpack_require__"; + } else if (["exports", "module"].includes(request)) { + identifiers[idx] = request; + dep = request; + } else if ((localModule = getLocalModule(parser.state, request))) { + localModule.flagUsed(); + dep = new LocalModuleDependency(localModule, undefined, false); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + } else { + dep = this.newRequireItemDependency(request); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + } + deps.push(dep); + }); + const dep = this.newRequireArrayDependency(deps, param.range); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.module.addPresentationalDependency(dep); + return true; + } + } + processItem(parser, expr, param, namedModule) { + if (param.isConditional()) { + param.options.forEach(param => { + const result = this.processItem(parser, expr, param); + if (result === undefined) { + this.processContext(parser, expr, param); + } + }); + return true; + } else if (param.isString()) { + let dep, localModule; + if (param.string === "require") { + dep = new ConstDependency("__webpack_require__", param.range, [ + RuntimeGlobals.require + ]); + } else if (param.string === "exports") { + dep = new ConstDependency("exports", param.range, [ + RuntimeGlobals.exports + ]); + } else if (param.string === "module") { + dep = new ConstDependency("module", param.range, [ + RuntimeGlobals.module + ]); + } else if ( + (localModule = getLocalModule(parser.state, param.string, namedModule)) + ) { + localModule.flagUsed(); + dep = new LocalModuleDependency(localModule, param.range, false); + } else { + dep = this.newRequireItemDependency(param.string, param.range); + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + } + } + processContext(parser, expr, param) { + const dep = ContextDependencyHelpers.create( + AMDRequireContextDependency, + param.range, + param, + expr, + this.options, + { + category: "amd" + }, + parser + ); + if (!dep) return; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + + processCallDefine(parser, expr) { + let array, fn, obj, namedModule; + switch (expr.arguments.length) { + case 1: + if (isCallable(expr.arguments[0])) { + // define(f() {…}) + fn = expr.arguments[0]; + } else if (expr.arguments[0].type === "ObjectExpression") { + // define({…}) + obj = expr.arguments[0]; + } else { + // define(expr) + // unclear if function or object + obj = fn = expr.arguments[0]; + } + break; + case 2: + if (expr.arguments[0].type === "Literal") { + namedModule = expr.arguments[0].value; + // define("…", …) + if (isCallable(expr.arguments[1])) { + // define("…", f() {…}) + fn = expr.arguments[1]; + } else if (expr.arguments[1].type === "ObjectExpression") { + // define("…", {…}) + obj = expr.arguments[1]; + } else { + // define("…", expr) + // unclear if function or object + obj = fn = expr.arguments[1]; + } + } else { + array = expr.arguments[0]; + if (isCallable(expr.arguments[1])) { + // define([…], f() {}) + fn = expr.arguments[1]; + } else if (expr.arguments[1].type === "ObjectExpression") { + // define([…], {…}) + obj = expr.arguments[1]; + } else { + // define([…], expr) + // unclear if function or object + obj = fn = expr.arguments[1]; + } + } + break; + case 3: + // define("…", […], f() {…}) + namedModule = expr.arguments[0].value; + array = expr.arguments[1]; + if (isCallable(expr.arguments[2])) { + // define("…", […], f() {}) + fn = expr.arguments[2]; + } else if (expr.arguments[2].type === "ObjectExpression") { + // define("…", […], {…}) + obj = expr.arguments[2]; + } else { + // define("…", […], expr) + // unclear if function or object + obj = fn = expr.arguments[2]; + } + break; + default: + return; + } + DynamicExports.bailout(parser.state); + let fnParams = null; + let fnParamsOffset = 0; + if (fn) { + if (isUnboundFunctionExpression(fn)) { + fnParams = fn.params; + } else if (isBoundFunctionExpression(fn)) { + fnParams = fn.callee.object.params; + fnParamsOffset = fn.arguments.length - 1; + if (fnParamsOffset < 0) { + fnParamsOffset = 0; + } + } + } + let fnRenames = new Map(); + if (array) { + const identifiers = {}; + const param = parser.evaluateExpression(array); + const result = this.processArray( + parser, + expr, + param, + identifiers, + namedModule + ); + if (!result) return; + if (fnParams) { + fnParams = fnParams.slice(fnParamsOffset).filter((param, idx) => { + if (identifiers[idx]) { + fnRenames.set(param.name, parser.getVariableInfo(identifiers[idx])); + return false; + } + return true; + }); + } + } else { + const identifiers = ["require", "exports", "module"]; + if (fnParams) { + fnParams = fnParams.slice(fnParamsOffset).filter((param, idx) => { + if (identifiers[idx]) { + fnRenames.set(param.name, parser.getVariableInfo(identifiers[idx])); + return false; + } + return true; + }); + } + } + let inTry; + if (fn && isUnboundFunctionExpression(fn)) { + inTry = parser.scope.inTry; + parser.inScope(fnParams, () => { + for (const [name, varInfo] of fnRenames) { + parser.setVariable(name, varInfo); + } + parser.scope.inTry = inTry; + if (fn.body.type === "BlockStatement") { + parser.walkStatement(fn.body); + } else { + parser.walkExpression(fn.body); + } + }); + } else if (fn && isBoundFunctionExpression(fn)) { + inTry = parser.scope.inTry; + parser.inScope( + fn.callee.object.params.filter( + i => !["require", "module", "exports"].includes(i.name) + ), + () => { + for (const [name, varInfo] of fnRenames) { + parser.setVariable(name, varInfo); + } + parser.scope.inTry = inTry; + if (fn.callee.object.body.type === "BlockStatement") { + parser.walkStatement(fn.callee.object.body); + } else { + parser.walkExpression(fn.callee.object.body); + } + } + ); + if (fn.arguments) { + parser.walkExpressions(fn.arguments); + } + } else if (fn || obj) { + parser.walkExpression(fn || obj); + } + + const dep = this.newDefineDependency( + expr.range, + array ? array.range : null, + fn ? fn.range : null, + obj ? obj.range : null, + namedModule ? namedModule : null + ); + dep.loc = expr.loc; + if (namedModule) { + dep.localModule = addLocalModule(parser.state, namedModule); + } + parser.state.module.addPresentationalDependency(dep); + return true; + } + + newDefineDependency( + range, + arrayRange, + functionRange, + objectRange, + namedModule + ) { + return new AMDDefineDependency( + range, + arrayRange, + functionRange, + objectRange, + namedModule + ); + } + newRequireArrayDependency(depsArray, range) { + return new AMDRequireArrayDependency(depsArray, range); + } + newRequireItemDependency(request, range) { + return new AMDRequireItemDependency(request, range); + } +} +module.exports = AMDDefineDependencyParserPlugin; + + +/***/ }), + +/***/ 71381: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const { + approve, + evaluateToIdentifier, + evaluateToString, + toConstantDependency +} = __webpack_require__(98550); + +const AMDDefineDependency = __webpack_require__(50781); +const AMDDefineDependencyParserPlugin = __webpack_require__(4838); +const AMDRequireArrayDependency = __webpack_require__(50286); +const AMDRequireContextDependency = __webpack_require__(74654); +const AMDRequireDependenciesBlockParserPlugin = __webpack_require__(70044); +const AMDRequireDependency = __webpack_require__(58138); +const AMDRequireItemDependency = __webpack_require__(20677); +const { + AMDDefineRuntimeModule, + AMDOptionsRuntimeModule +} = __webpack_require__(47604); +const ConstDependency = __webpack_require__(9364); +const LocalModuleDependency = __webpack_require__(54524); +const UnsupportedDependency = __webpack_require__(27098); + +/** @typedef {import("../../declarations/WebpackOptions").ModuleOptions} ModuleOptions */ +/** @typedef {import("../Compiler")} Compiler */ + +class AMDPlugin { + /** + * @param {ModuleOptions} options the plugin options + * @param {Record} amdOptions the AMD options + */ + constructor(options, amdOptions) { + this.options = options; + this.amdOptions = amdOptions; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const options = this.options; + const amdOptions = this.amdOptions; + compiler.hooks.compilation.tap( + "AMDPlugin", + (compilation, { contextModuleFactory, normalModuleFactory }) => { + compilation.dependencyTemplates.set( + AMDRequireDependency, + new AMDRequireDependency.Template() + ); + + compilation.dependencyFactories.set( + AMDRequireItemDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + AMDRequireItemDependency, + new AMDRequireItemDependency.Template() + ); + + compilation.dependencyTemplates.set( + AMDRequireArrayDependency, + new AMDRequireArrayDependency.Template() + ); + + compilation.dependencyFactories.set( + AMDRequireContextDependency, + contextModuleFactory + ); + compilation.dependencyTemplates.set( + AMDRequireContextDependency, + new AMDRequireContextDependency.Template() + ); + + compilation.dependencyTemplates.set( + AMDDefineDependency, + new AMDDefineDependency.Template() + ); + + compilation.dependencyTemplates.set( + UnsupportedDependency, + new UnsupportedDependency.Template() + ); + + compilation.dependencyTemplates.set( + LocalModuleDependency, + new LocalModuleDependency.Template() + ); + + compilation.hooks.runtimeRequirementInModule + .for(RuntimeGlobals.amdDefine) + .tap("AMDPlugin", (module, set) => { + set.add(RuntimeGlobals.require); + }); + + compilation.hooks.runtimeRequirementInModule + .for(RuntimeGlobals.amdOptions) + .tap("AMDPlugin", (module, set) => { + set.add(RuntimeGlobals.requireScope); + }); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.amdDefine) + .tap("AMDPlugin", (chunk, set) => { + compilation.addRuntimeModule(chunk, new AMDDefineRuntimeModule()); + }); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.amdOptions) + .tap("AMDPlugin", (chunk, set) => { + compilation.addRuntimeModule( + chunk, + new AMDOptionsRuntimeModule(amdOptions) + ); + }); + + const handler = (parser, parserOptions) => { + if (parserOptions.amd !== undefined && !parserOptions.amd) return; + + const tapOptionsHooks = (optionExpr, rootName, getMembers) => { + parser.hooks.expression + .for(optionExpr) + .tap( + "AMDPlugin", + toConstantDependency(parser, RuntimeGlobals.amdOptions, [ + RuntimeGlobals.amdOptions + ]) + ); + parser.hooks.evaluateIdentifier + .for(optionExpr) + .tap( + "AMDPlugin", + evaluateToIdentifier(optionExpr, rootName, getMembers, true) + ); + parser.hooks.evaluateTypeof + .for(optionExpr) + .tap("AMDPlugin", evaluateToString("object")); + parser.hooks.typeof + .for(optionExpr) + .tap( + "AMDPlugin", + toConstantDependency(parser, JSON.stringify("object")) + ); + }; + + new AMDRequireDependenciesBlockParserPlugin(options).apply(parser); + new AMDDefineDependencyParserPlugin(options).apply(parser); + + tapOptionsHooks("define.amd", "define", () => "amd"); + tapOptionsHooks("require.amd", "require", () => ["amd"]); + tapOptionsHooks( + "__webpack_amd_options__", + "__webpack_amd_options__", + () => [] + ); + + parser.hooks.expression.for("define").tap("AMDPlugin", expr => { + const dep = new ConstDependency( + RuntimeGlobals.amdDefine, + expr.range, + [RuntimeGlobals.amdDefine] + ); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + parser.hooks.typeof + .for("define") + .tap( + "AMDPlugin", + toConstantDependency(parser, JSON.stringify("function")) + ); + parser.hooks.evaluateTypeof + .for("define") + .tap("AMDPlugin", evaluateToString("function")); + parser.hooks.canRename.for("define").tap("AMDPlugin", approve); + parser.hooks.rename.for("define").tap("AMDPlugin", expr => { + const dep = new ConstDependency( + RuntimeGlobals.amdDefine, + expr.range, + [RuntimeGlobals.amdDefine] + ); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return false; + }); + parser.hooks.typeof + .for("require") + .tap( + "AMDPlugin", + toConstantDependency(parser, JSON.stringify("function")) + ); + parser.hooks.evaluateTypeof + .for("require") + .tap("AMDPlugin", evaluateToString("function")); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("AMDPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("AMDPlugin", handler); + } + ); + } +} + +module.exports = AMDPlugin; + + +/***/ }), + +/***/ 50286: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const DependencyTemplate = __webpack_require__(90909); +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class AMDRequireArrayDependency extends NullDependency { + constructor(depsArray, range) { + super(); + + this.depsArray = depsArray; + this.range = range; + } + + get type() { + return "amd require array"; + } + + get category() { + return "amd"; + } + + serialize(context) { + const { write } = context; + + write(this.depsArray); + write(this.range); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.depsArray = read(); + this.range = read(); + + super.deserialize(context); + } +} + +makeSerializable( + AMDRequireArrayDependency, + "webpack/lib/dependencies/AMDRequireArrayDependency" +); + +AMDRequireArrayDependency.Template = class AMDRequireArrayDependencyTemplate extends ( + DependencyTemplate +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const dep = /** @type {AMDRequireArrayDependency} */ (dependency); + const content = this.getContent(dep, templateContext); + source.replace(dep.range[0], dep.range[1] - 1, content); + } + + getContent(dep, templateContext) { + const requires = dep.depsArray.map(dependency => { + return this.contentForDependency(dependency, templateContext); + }); + return `[${requires.join(", ")}]`; + } + + contentForDependency( + dep, + { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } + ) { + if (typeof dep === "string") { + return dep; + } + + if (dep.localModule) { + return dep.localModule.variableName(); + } else { + return runtimeTemplate.moduleExports({ + module: moduleGraph.getModule(dep), + chunkGraph, + request: dep.request, + runtimeRequirements + }); + } + } +}; + +module.exports = AMDRequireArrayDependency; + + +/***/ }), + +/***/ 74654: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ContextDependency = __webpack_require__(21649); + +class AMDRequireContextDependency extends ContextDependency { + constructor(options, range, valueRange) { + super(options); + + this.range = range; + this.valueRange = valueRange; + } + + get type() { + return "amd require context"; + } + + get category() { + return "amd"; + } + + serialize(context) { + const { write } = context; + + write(this.range); + write(this.valueRange); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.range = read(); + this.valueRange = read(); + + super.deserialize(context); + } +} + +makeSerializable( + AMDRequireContextDependency, + "webpack/lib/dependencies/AMDRequireContextDependency" +); + +AMDRequireContextDependency.Template = __webpack_require__(33552); + +module.exports = AMDRequireContextDependency; + + +/***/ }), + +/***/ 82134: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const AsyncDependenciesBlock = __webpack_require__(72624); +const makeSerializable = __webpack_require__(55575); + +class AMDRequireDependenciesBlock extends AsyncDependenciesBlock { + constructor(loc, request) { + super(null, loc, request); + } +} + +makeSerializable( + AMDRequireDependenciesBlock, + "webpack/lib/dependencies/AMDRequireDependenciesBlock" +); + +module.exports = AMDRequireDependenciesBlock; + + +/***/ }), + +/***/ 70044: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const UnsupportedFeatureWarning = __webpack_require__(61809); +const AMDRequireArrayDependency = __webpack_require__(50286); +const AMDRequireContextDependency = __webpack_require__(74654); +const AMDRequireDependenciesBlock = __webpack_require__(82134); +const AMDRequireDependency = __webpack_require__(58138); +const AMDRequireItemDependency = __webpack_require__(20677); +const ConstDependency = __webpack_require__(9364); +const ContextDependencyHelpers = __webpack_require__(39815); +const LocalModuleDependency = __webpack_require__(54524); +const { getLocalModule } = __webpack_require__(94353); +const UnsupportedDependency = __webpack_require__(27098); +const getFunctionExpression = __webpack_require__(22671); + +class AMDRequireDependenciesBlockParserPlugin { + constructor(options) { + this.options = options; + } + + processFunctionArgument(parser, expression) { + let bindThis = true; + const fnData = getFunctionExpression(expression); + if (fnData) { + parser.inScope( + fnData.fn.params.filter(i => { + return !["require", "module", "exports"].includes(i.name); + }), + () => { + if (fnData.fn.body.type === "BlockStatement") { + parser.walkStatement(fnData.fn.body); + } else { + parser.walkExpression(fnData.fn.body); + } + } + ); + parser.walkExpressions(fnData.expressions); + if (fnData.needThis === false) { + bindThis = false; + } + } else { + parser.walkExpression(expression); + } + return bindThis; + } + + apply(parser) { + parser.hooks.call + .for("require") + .tap( + "AMDRequireDependenciesBlockParserPlugin", + this.processCallRequire.bind(this, parser) + ); + } + + processArray(parser, expr, param) { + if (param.isArray()) { + for (const p of param.items) { + const result = this.processItem(parser, expr, p); + if (result === undefined) { + this.processContext(parser, expr, p); + } + } + return true; + } else if (param.isConstArray()) { + const deps = []; + for (const request of param.array) { + let dep, localModule; + if (request === "require") { + dep = "__webpack_require__"; + } else if (["exports", "module"].includes(request)) { + dep = request; + } else if ((localModule = getLocalModule(parser.state, request))) { + localModule.flagUsed(); + dep = new LocalModuleDependency(localModule, undefined, false); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + } else { + dep = this.newRequireItemDependency(request); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + } + deps.push(dep); + } + const dep = this.newRequireArrayDependency(deps, param.range); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.module.addPresentationalDependency(dep); + return true; + } + } + processItem(parser, expr, param) { + if (param.isConditional()) { + for (const p of param.options) { + const result = this.processItem(parser, expr, p); + if (result === undefined) { + this.processContext(parser, expr, p); + } + } + return true; + } else if (param.isString()) { + let dep, localModule; + if (param.string === "require") { + dep = new ConstDependency("__webpack_require__", param.string, [ + RuntimeGlobals.require + ]); + } else if (param.string === "module") { + dep = new ConstDependency( + parser.state.module.buildInfo.moduleArgument, + param.range, + [RuntimeGlobals.module] + ); + } else if (param.string === "exports") { + dep = new ConstDependency( + parser.state.module.buildInfo.exportsArgument, + param.range, + [RuntimeGlobals.exports] + ); + } else if ((localModule = getLocalModule(parser.state, param.string))) { + localModule.flagUsed(); + dep = new LocalModuleDependency(localModule, param.range, false); + } else { + dep = this.newRequireItemDependency(param.string, param.range); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + } + } + processContext(parser, expr, param) { + const dep = ContextDependencyHelpers.create( + AMDRequireContextDependency, + param.range, + param, + expr, + this.options, + { + category: "amd" + }, + parser + ); + if (!dep) return; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + + processArrayForRequestString(param) { + if (param.isArray()) { + const result = param.items.map(item => + this.processItemForRequestString(item) + ); + if (result.every(Boolean)) return result.join(" "); + } else if (param.isConstArray()) { + return param.array.join(" "); + } + } + + processItemForRequestString(param) { + if (param.isConditional()) { + const result = param.options.map(item => + this.processItemForRequestString(item) + ); + if (result.every(Boolean)) return result.join("|"); + } else if (param.isString()) { + return param.string; + } + } + + processCallRequire(parser, expr) { + let param; + let depBlock; + let dep; + let result; + + const old = parser.state.current; + + if (expr.arguments.length >= 1) { + param = parser.evaluateExpression(expr.arguments[0]); + depBlock = this.newRequireDependenciesBlock( + expr.loc, + this.processArrayForRequestString(param) + ); + dep = this.newRequireDependency( + expr.range, + param.range, + expr.arguments.length > 1 ? expr.arguments[1].range : null, + expr.arguments.length > 2 ? expr.arguments[2].range : null + ); + dep.loc = expr.loc; + depBlock.addDependency(dep); + + parser.state.current = depBlock; + } + + if (expr.arguments.length === 1) { + parser.inScope([], () => { + result = this.processArray(parser, expr, param); + }); + parser.state.current = old; + if (!result) return; + parser.state.current.addBlock(depBlock); + return true; + } + + if (expr.arguments.length === 2 || expr.arguments.length === 3) { + try { + parser.inScope([], () => { + result = this.processArray(parser, expr, param); + }); + if (!result) { + const dep = new UnsupportedDependency("unsupported", expr.range); + old.addPresentationalDependency(dep); + if (parser.state.module) { + parser.state.module.addError( + new UnsupportedFeatureWarning( + "Cannot statically analyse 'require(…, …)' in line " + + expr.loc.start.line, + expr.loc + ) + ); + } + depBlock = null; + return true; + } + dep.functionBindThis = this.processFunctionArgument( + parser, + expr.arguments[1] + ); + if (expr.arguments.length === 3) { + dep.errorCallbackBindThis = this.processFunctionArgument( + parser, + expr.arguments[2] + ); + } + } finally { + parser.state.current = old; + if (depBlock) parser.state.current.addBlock(depBlock); + } + return true; + } + } + + newRequireDependenciesBlock(loc, request) { + return new AMDRequireDependenciesBlock(loc, request); + } + newRequireDependency( + outerRange, + arrayRange, + functionRange, + errorCallbackRange + ) { + return new AMDRequireDependency( + outerRange, + arrayRange, + functionRange, + errorCallbackRange + ); + } + newRequireItemDependency(request, range) { + return new AMDRequireItemDependency(request, range); + } + newRequireArrayDependency(depsArray, range) { + return new AMDRequireArrayDependency(depsArray, range); + } +} +module.exports = AMDRequireDependenciesBlockParserPlugin; + + +/***/ }), + +/***/ 58138: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class AMDRequireDependency extends NullDependency { + constructor(outerRange, arrayRange, functionRange, errorCallbackRange) { + super(); + + this.outerRange = outerRange; + this.arrayRange = arrayRange; + this.functionRange = functionRange; + this.errorCallbackRange = errorCallbackRange; + this.functionBindThis = false; + this.errorCallbackBindThis = false; + } + + get category() { + return "amd"; + } + + serialize(context) { + const { write } = context; + + write(this.outerRange); + write(this.arrayRange); + write(this.functionRange); + write(this.errorCallbackRange); + write(this.functionBindThis); + write(this.errorCallbackBindThis); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.outerRange = read(); + this.arrayRange = read(); + this.functionRange = read(); + this.errorCallbackRange = read(); + this.functionBindThis = read(); + this.errorCallbackBindThis = read(); + + super.deserialize(context); + } +} + +makeSerializable( + AMDRequireDependency, + "webpack/lib/dependencies/AMDRequireDependency" +); + +AMDRequireDependency.Template = class AMDRequireDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } + ) { + const dep = /** @type {AMDRequireDependency} */ (dependency); + const depBlock = /** @type {AsyncDependenciesBlock} */ (moduleGraph.getParentBlock( + dep + )); + const promise = runtimeTemplate.blockPromise({ + chunkGraph, + block: depBlock, + message: "AMD require", + runtimeRequirements + }); + + // has array range but no function range + if (dep.arrayRange && !dep.functionRange) { + const startBlock = `${promise}.then(function() {`; + const endBlock = `;}).catch(${RuntimeGlobals.uncaughtErrorHandler})`; + runtimeRequirements.add(RuntimeGlobals.uncaughtErrorHandler); + + source.replace(dep.outerRange[0], dep.arrayRange[0] - 1, startBlock); + + source.replace(dep.arrayRange[1], dep.outerRange[1] - 1, endBlock); + + return; + } + + // has function range but no array range + if (dep.functionRange && !dep.arrayRange) { + const startBlock = `${promise}.then((`; + const endBlock = `).bind(exports, __webpack_require__, exports, module)).catch(${RuntimeGlobals.uncaughtErrorHandler})`; + runtimeRequirements.add(RuntimeGlobals.uncaughtErrorHandler); + + source.replace(dep.outerRange[0], dep.functionRange[0] - 1, startBlock); + + source.replace(dep.functionRange[1], dep.outerRange[1] - 1, endBlock); + + return; + } + + // has array range, function range, and errorCallbackRange + if (dep.arrayRange && dep.functionRange && dep.errorCallbackRange) { + const startBlock = `${promise}.then(function() { `; + const errorRangeBlock = `}${ + dep.functionBindThis ? ".bind(this)" : "" + }).catch(`; + const endBlock = `${dep.errorCallbackBindThis ? ".bind(this)" : ""})`; + + source.replace(dep.outerRange[0], dep.arrayRange[0] - 1, startBlock); + + source.insert( + dep.arrayRange[0] + 0.9, + "var __WEBPACK_AMD_REQUIRE_ARRAY__ = " + ); + + source.replace(dep.arrayRange[1], dep.functionRange[0] - 1, "; ("); + + source.insert( + dep.functionRange[1], + ").apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);" + ); + + source.replace( + dep.functionRange[1], + dep.errorCallbackRange[0] - 1, + errorRangeBlock + ); + + source.replace( + dep.errorCallbackRange[1], + dep.outerRange[1] - 1, + endBlock + ); + + return; + } + + // has array range, function range, but no errorCallbackRange + if (dep.arrayRange && dep.functionRange) { + const startBlock = `${promise}.then(function() { `; + const endBlock = `}${dep.functionBindThis ? ".bind(this)" : ""}).catch(${ + RuntimeGlobals.uncaughtErrorHandler + })`; + runtimeRequirements.add(RuntimeGlobals.uncaughtErrorHandler); + + source.replace(dep.outerRange[0], dep.arrayRange[0] - 1, startBlock); + + source.insert( + dep.arrayRange[0] + 0.9, + "var __WEBPACK_AMD_REQUIRE_ARRAY__ = " + ); + + source.replace(dep.arrayRange[1], dep.functionRange[0] - 1, "; ("); + + source.insert( + dep.functionRange[1], + ").apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);" + ); + + source.replace(dep.functionRange[1], dep.outerRange[1] - 1, endBlock); + } + } +}; + +module.exports = AMDRequireDependency; + + +/***/ }), + +/***/ 20677: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); +const ModuleDependencyTemplateAsRequireId = __webpack_require__(63798); + +class AMDRequireItemDependency extends ModuleDependency { + constructor(request, range) { + super(request); + + this.range = range; + } + + get type() { + return "amd require"; + } + + get category() { + return "amd"; + } +} + +makeSerializable( + AMDRequireItemDependency, + "webpack/lib/dependencies/AMDRequireItemDependency" +); + +AMDRequireItemDependency.Template = ModuleDependencyTemplateAsRequireId; + +module.exports = AMDRequireItemDependency; + + +/***/ }), + +/***/ 47604: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +class AMDDefineRuntimeModule extends RuntimeModule { + constructor() { + super("amd define"); + } + + /** + * @returns {string} runtime code + */ + generate() { + return Template.asString([ + `${RuntimeGlobals.amdDefine} = function () {`, + Template.indent("throw new Error('define cannot be used indirect');"), + "};" + ]); + } +} + +class AMDOptionsRuntimeModule extends RuntimeModule { + /** + * @param {Record} options the AMD options + */ + constructor(options) { + super("amd options"); + this.options = options; + } + + /** + * @returns {string} runtime code + */ + generate() { + return Template.asString([ + `${RuntimeGlobals.amdOptions} = ${JSON.stringify(this.options)};` + ]); + } +} + +exports.AMDDefineRuntimeModule = AMDDefineRuntimeModule; +exports.AMDOptionsRuntimeModule = AMDOptionsRuntimeModule; + + +/***/ }), + +/***/ 14268: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + + +const DependencyTemplate = __webpack_require__(90909); +const InitFragment = __webpack_require__(63382); +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("../util/Hash")} Hash */ + +class CachedConstDependency extends NullDependency { + constructor(expression, range, identifier) { + super(); + + this.expression = expression; + this.range = range; + this.identifier = identifier; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(this.identifier + ""); + hash.update(this.range + ""); + hash.update(this.expression + ""); + } + + serialize(context) { + const { write } = context; + + write(this.expression); + write(this.range); + write(this.identifier); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.expression = read(); + this.range = read(); + this.identifier = read(); + + super.deserialize(context); + } +} + +makeSerializable( + CachedConstDependency, + "webpack/lib/dependencies/CachedConstDependency" +); + +CachedConstDependency.Template = class CachedConstDependencyTemplate extends ( + DependencyTemplate +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { runtimeTemplate, dependencyTemplates, initFragments } + ) { + const dep = /** @type {CachedConstDependency} */ (dependency); + + initFragments.push( + new InitFragment( + `var ${dep.identifier} = ${dep.expression};\n`, + InitFragment.STAGE_CONSTANTS, + 0, + `const ${dep.identifier}` + ) + ); + + if (typeof dep.range === "number") { + source.insert(dep.range, dep.identifier); + + return; + } + + source.replace(dep.range[0], dep.range[1] - 1, dep.identifier); + } +}; + +module.exports = CachedConstDependency; + + +/***/ }), + +/***/ 2813: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); + +exports.handleDependencyBase = (depBase, module, runtimeRequirements) => { + let base = undefined; + let type; + switch (depBase) { + case "exports": + runtimeRequirements.add(RuntimeGlobals.exports); + base = module.exportsArgument; + type = "expression"; + break; + case "module.exports": + runtimeRequirements.add(RuntimeGlobals.module); + base = `${module.moduleArgument}.exports`; + type = "expression"; + break; + case "this": + runtimeRequirements.add(RuntimeGlobals.thisAsExports); + base = "this"; + type = "expression"; + break; + case "Object.defineProperty(exports)": + runtimeRequirements.add(RuntimeGlobals.exports); + base = module.exportsArgument; + type = "Object.defineProperty"; + break; + case "Object.defineProperty(module.exports)": + runtimeRequirements.add(RuntimeGlobals.module); + base = `${module.moduleArgument}.exports`; + type = "Object.defineProperty"; + break; + case "Object.defineProperty(this)": + runtimeRequirements.add(RuntimeGlobals.thisAsExports); + base = "this"; + type = "Object.defineProperty"; + break; + default: + throw new Error(`Unsupported base ${depBase}`); + } + + return [type, base]; +}; + + +/***/ }), + +/***/ 48075: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const { UsageState } = __webpack_require__(54227); +const Template = __webpack_require__(90751); +const { equals } = __webpack_require__(92459); +const makeSerializable = __webpack_require__(55575); +const propertyAccess = __webpack_require__(44682); +const { handleDependencyBase } = __webpack_require__(2813); +const ModuleDependency = __webpack_require__(5462); +const processExportInfo = __webpack_require__(1837); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +const idsSymbol = Symbol("CommonJsExportRequireDependency.ids"); + +const EMPTY_OBJECT = {}; + +class CommonJsExportRequireDependency extends ModuleDependency { + constructor(range, valueRange, base, names, request, ids, resultUsed) { + super(request); + this.range = range; + this.valueRange = valueRange; + this.base = base; + this.names = names; + this.ids = ids; + this.resultUsed = resultUsed; + this.asiSafe = undefined; + } + + get type() { + return "cjs export require"; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {string[]} the imported id + */ + getIds(moduleGraph) { + return moduleGraph.getMeta(this)[idsSymbol] || this.ids; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {string[]} ids the imported ids + * @returns {void} + */ + setIds(moduleGraph, ids) { + moduleGraph.getMeta(this)[idsSymbol] = ids; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + const ids = this.getIds(moduleGraph); + const getFullResult = () => { + if (ids.length === 0) { + return Dependency.EXPORTS_OBJECT_REFERENCED; + } else { + return [ + { + name: ids, + canMangle: false + } + ]; + } + }; + if (this.resultUsed) return getFullResult(); + let exportsInfo = moduleGraph.getExportsInfo( + moduleGraph.getParentModule(this) + ); + for (const name of this.names) { + const exportInfo = exportsInfo.getReadOnlyExportInfo(name); + const used = exportInfo.getUsed(runtime); + if (used === UsageState.Unused) return Dependency.NO_EXPORTS_REFERENCED; + if (used !== UsageState.OnlyPropertiesUsed) return getFullResult(); + exportsInfo = exportInfo.exportsInfo; + if (!exportsInfo) return getFullResult(); + } + if (exportsInfo.otherExportsInfo.getUsed(runtime) !== UsageState.Unused) { + return getFullResult(); + } + /** @type {string[][]} */ + const referencedExports = []; + for (const exportInfo of exportsInfo.orderedExports) { + processExportInfo( + runtime, + referencedExports, + ids.concat(exportInfo.name), + exportInfo, + false + ); + } + return referencedExports.map(name => ({ + name, + canMangle: false + })); + } + + /** + * Returns the exported names + * @param {ModuleGraph} moduleGraph module graph + * @returns {ExportsSpec | undefined} export names + */ + getExports(moduleGraph) { + const ids = this.getIds(moduleGraph); + if (this.names.length === 1) { + const name = this.names[0]; + const from = moduleGraph.getConnection(this); + if (!from) return; + return { + exports: [ + { + name, + from, + export: ids.length === 0 ? null : ids, + // we can't mangle names that are in an empty object + // because one could access the prototype property + // when export isn't set yet + canMangle: !(name in EMPTY_OBJECT) && false + } + ], + dependencies: [from.module] + }; + } else if (this.names.length > 0) { + const name = this.names[0]; + return { + exports: [ + { + name, + // we can't mangle names that are in an empty object + // because one could access the prototype property + // when export isn't set yet + canMangle: !(name in EMPTY_OBJECT) && false + } + ], + dependencies: undefined + }; + } else { + const from = moduleGraph.getConnection(this); + if (!from) return; + const reexportInfo = this.getStarReexports( + moduleGraph, + undefined, + from.module + ); + if (reexportInfo) { + return { + exports: Array.from(reexportInfo.exports, name => { + return { + name, + from, + export: ids.concat(name), + canMangle: !(name in EMPTY_OBJECT) && false + }; + }), + // TODO handle deep reexports + dependencies: [from.module] + }; + } else { + return { + exports: true, + from: ids.length === 0 ? from : undefined, + canMangle: false, + dependencies: [from.module] + }; + } + } + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {RuntimeSpec} runtime the runtime + * @param {Module} importedModule the imported module (optional) + * @returns {{exports?: Set, checked?: Set}} information + */ + getStarReexports( + moduleGraph, + runtime, + importedModule = moduleGraph.getModule(this) + ) { + let importedExportsInfo = moduleGraph.getExportsInfo(importedModule); + const ids = this.getIds(moduleGraph); + if (ids.length > 0) + importedExportsInfo = importedExportsInfo.getNestedExportsInfo(ids); + let exportsInfo = moduleGraph.getExportsInfo( + moduleGraph.getParentModule(this) + ); + if (this.names.length > 0) + exportsInfo = exportsInfo.getNestedExportsInfo(this.names); + + const noExtraExports = + importedExportsInfo && + importedExportsInfo.otherExportsInfo.provided === false; + const noExtraImports = + exportsInfo && + exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused; + + if (!noExtraExports && !noExtraImports) { + return; + } + + const isNamespaceImport = + importedModule.getExportsType(moduleGraph, false) === "namespace"; + + /** @type {Set} */ + const exports = new Set(); + /** @type {Set} */ + const checked = new Set(); + + if (noExtraImports) { + for (const exportInfo of exportsInfo.orderedExports) { + const name = exportInfo.name; + if (exportInfo.getUsed(runtime) === UsageState.Unused) continue; + if (name === "__esModule" && isNamespaceImport) { + exports.add(name); + } else if (importedExportsInfo) { + const importedExportInfo = importedExportsInfo.getReadOnlyExportInfo( + name + ); + if (importedExportInfo.provided === false) continue; + exports.add(name); + if (importedExportInfo.provided === true) continue; + checked.add(name); + } else { + exports.add(name); + checked.add(name); + } + } + } else if (noExtraExports) { + for (const importedExportInfo of importedExportsInfo.orderedExports) { + const name = importedExportInfo.name; + if (importedExportInfo.provided === false) continue; + if (exportsInfo) { + const exportInfo = exportsInfo.getReadOnlyExportInfo(name); + if (exportInfo.getUsed(runtime) === UsageState.Unused) continue; + } + exports.add(name); + if (importedExportInfo.provided === true) continue; + checked.add(name); + } + if (isNamespaceImport) { + exports.add("__esModule"); + checked.delete("__esModule"); + } + } + + return { exports, checked }; + } + + serialize(context) { + const { write } = context; + write(this.asiSafe); + write(this.range); + write(this.valueRange); + write(this.base); + write(this.names); + write(this.ids); + write(this.resultUsed); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.asiSafe = read(); + this.range = read(); + this.valueRange = read(); + this.base = read(); + this.names = read(); + this.ids = read(); + this.resultUsed = read(); + super.deserialize(context); + } +} + +makeSerializable( + CommonJsExportRequireDependency, + "webpack/lib/dependencies/CommonJsExportRequireDependency" +); + +CommonJsExportRequireDependency.Template = class CommonJsExportRequireDependencyTemplate extends ( + ModuleDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { + module, + runtimeTemplate, + chunkGraph, + moduleGraph, + runtimeRequirements, + runtime + } + ) { + const dep = /** @type {CommonJsExportRequireDependency} */ (dependency); + const used = moduleGraph + .getExportsInfo(module) + .getUsedName(dep.names, runtime); + + const [type, base] = handleDependencyBase( + dep.base, + module, + runtimeRequirements + ); + + const importedModule = moduleGraph.getModule(dep); + let requireExpr = runtimeTemplate.moduleExports({ + module: importedModule, + chunkGraph, + request: dep.request, + weak: dep.weak, + runtimeRequirements + }); + const ids = dep.getIds(moduleGraph); + const usedImported = moduleGraph + .getExportsInfo(importedModule) + .getUsedName(ids, runtime); + if (usedImported) { + const comment = equals(usedImported, ids) + ? "" + : Template.toNormalComment(propertyAccess(ids)) + " "; + requireExpr += `${comment}${propertyAccess(usedImported)}`; + } + + switch (type) { + case "expression": + source.replace( + dep.range[0], + dep.range[1] - 1, + used + ? `${base}${propertyAccess(used)} = ${requireExpr}` + : `/* unused reexport */ ${requireExpr}` + ); + return; + case "Object.defineProperty": + throw new Error("TODO"); + default: + throw new Error("Unexpected type"); + } + } +}; + +module.exports = CommonJsExportRequireDependency; + + +/***/ }), + +/***/ 59067: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const InitFragment = __webpack_require__(63382); +const makeSerializable = __webpack_require__(55575); +const propertyAccess = __webpack_require__(44682); +const { handleDependencyBase } = __webpack_require__(2813); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ + +const EMPTY_OBJECT = {}; + +class CommonJsExportsDependency extends NullDependency { + constructor(range, valueRange, base, names) { + super(); + this.range = range; + this.valueRange = valueRange; + this.base = base; + this.names = names; + } + + get type() { + return "cjs exports"; + } + + /** + * Returns the exported names + * @param {ModuleGraph} moduleGraph module graph + * @returns {ExportsSpec | undefined} export names + */ + getExports(moduleGraph) { + const name = this.names[0]; + return { + exports: [ + { + name, + // we can't mangle names that are in an empty object + // because one could access the prototype property + // when export isn't set yet + canMangle: !(name in EMPTY_OBJECT) + } + ], + dependencies: undefined + }; + } + + serialize(context) { + const { write } = context; + write(this.range); + write(this.valueRange); + write(this.base); + write(this.names); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.range = read(); + this.valueRange = read(); + this.base = read(); + this.names = read(); + super.deserialize(context); + } +} + +makeSerializable( + CommonJsExportsDependency, + "webpack/lib/dependencies/CommonJsExportsDependency" +); + +CommonJsExportsDependency.Template = class CommonJsExportsDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { module, moduleGraph, initFragments, runtimeRequirements, runtime } + ) { + const dep = /** @type {CommonJsExportsDependency} */ (dependency); + const used = moduleGraph + .getExportsInfo(module) + .getUsedName(dep.names, runtime); + + const [type, base] = handleDependencyBase( + dep.base, + module, + runtimeRequirements + ); + + switch (type) { + case "expression": + if (!used) { + initFragments.push( + new InitFragment( + "var __webpack_unused_export__;\n", + InitFragment.STAGE_CONSTANTS, + 0, + "__webpack_unused_export__" + ) + ); + source.replace( + dep.range[0], + dep.range[1] - 1, + "__webpack_unused_export__" + ); + return; + } + source.replace( + dep.range[0], + dep.range[1] - 1, + `${base}${propertyAccess(used)}` + ); + return; + case "Object.defineProperty": + if (!used) { + initFragments.push( + new InitFragment( + "var __webpack_unused_export__;\n", + InitFragment.STAGE_CONSTANTS, + 0, + "__webpack_unused_export__" + ) + ); + source.replace( + dep.range[0], + dep.valueRange[0] - 1, + "__webpack_unused_export__ = (" + ); + source.replace(dep.valueRange[1], dep.range[1] - 1, ")"); + return; + } + source.replace( + dep.range[0], + dep.valueRange[0] - 1, + `Object.defineProperty(${base}${propertyAccess( + used.slice(0, -1) + )}, ${JSON.stringify(used[used.length - 1])}, (` + ); + source.replace(dep.valueRange[1], dep.range[1] - 1, "))"); + return; + } + } +}; + +module.exports = CommonJsExportsDependency; + + +/***/ }), + +/***/ 32108: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const formatLocation = __webpack_require__(82476); +const { evaluateToString } = __webpack_require__(98550); +const propertyAccess = __webpack_require__(44682); +const CommonJsExportRequireDependency = __webpack_require__(48075); +const CommonJsExportsDependency = __webpack_require__(59067); +const CommonJsSelfReferenceDependency = __webpack_require__(6386); +const DynamicExports = __webpack_require__(97093); +const HarmonyExports = __webpack_require__(79291); +const ModuleDecoratorDependency = __webpack_require__(79448); + +/** @typedef {import("estree").Expression} ExpressionNode */ +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../javascript/BasicEvaluatedExpression")} BasicEvaluatedExpression */ +/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ + +const getValueOfPropertyDescription = expr => { + if (expr.type !== "ObjectExpression") return; + for (const property of expr.properties) { + if (property.computed) continue; + const key = property.key; + if (key.type !== "Identifier" || key.name !== "value") continue; + return property.value; + } +}; + +const isTruthyLiteral = expr => { + switch (expr.type) { + case "Literal": + return !!expr.value; + case "UnaryExpression": + if (expr.operator === "!") return isFalsyLiteral(expr.argument); + } + return false; +}; + +const isFalsyLiteral = expr => { + switch (expr.type) { + case "Literal": + return !expr.value; + case "UnaryExpression": + if (expr.operator === "!") return isTruthyLiteral(expr.argument); + } + return false; +}; + +/** + * @param {JavascriptParser} parser the parser + * @param {ExpressionNode} expr expression + * @returns {{ argument: BasicEvaluatedExpression, ids: string[] } | undefined} parsed call + */ +const parseRequireCall = (parser, expr) => { + const ids = []; + while (expr.type === "MemberExpression") { + if (expr.object.type === "Super") return; + if (!expr.property) return; + const prop = expr.property; + if (expr.computed) { + if (prop.type !== "Literal") return; + ids.push(`${prop.value}`); + } else { + if (prop.type !== "Identifier") return; + ids.push(prop.name); + } + expr = expr.object; + } + if (expr.type !== "CallExpression" || expr.arguments.length !== 1) return; + const callee = expr.callee; + if ( + callee.type !== "Identifier" || + parser.getVariableInfo(callee.name) !== "require" + ) { + return; + } + const arg = expr.arguments[0]; + if (arg.type === "SpreadElement") return; + const argValue = parser.evaluateExpression(arg); + return { argument: argValue, ids: ids.reverse() }; +}; + +class CommonJsExportsParserPlugin { + constructor(moduleGraph) { + this.moduleGraph = moduleGraph; + } + + /** + * @param {JavascriptParser} parser the parser + */ + apply(parser) { + const enableStructuredExports = () => { + DynamicExports.enable(parser.state); + }; + const checkNamespace = (topLevel, members, valueExpr) => { + if (!DynamicExports.isEnabled(parser.state)) return; + if (members.length > 0 && members[0] === "__esModule") { + if (valueExpr && isTruthyLiteral(valueExpr) && topLevel) { + DynamicExports.setFlagged(parser.state); + } else { + DynamicExports.setDynamic(parser.state); + } + } + }; + const bailout = reason => { + DynamicExports.bailout(parser.state); + if (reason) bailoutHint(reason); + }; + const bailoutHint = reason => { + this.moduleGraph + .getOptimizationBailout(parser.state.module) + .push(`CommonJS bailout: ${reason}`); + }; + + // metadata // + parser.hooks.evaluateTypeof + .for("module") + .tap("CommonJsExportsParserPlugin", evaluateToString("object")); + parser.hooks.evaluateTypeof + .for("exports") + .tap("CommonJsPlugin", evaluateToString("object")); + + // exporting // + const handleAssignExport = (expr, base, members) => { + if (HarmonyExports.isEnabled(parser.state)) return; + // Handle reexporting + const requireCall = parseRequireCall(parser, expr.right); + if ( + requireCall && + requireCall.argument.isString() && + (members.length === 0 || members[0] !== "__esModule") + ) { + enableStructuredExports(); + // It's possible to reexport __esModule, so we must convert to a dynamic module + if (members.length === 0) DynamicExports.setDynamic(parser.state); + const dep = new CommonJsExportRequireDependency( + expr.range, + null, + base, + members, + requireCall.argument.string, + requireCall.ids, + !parser.isStatementLevelExpression(expr) + ); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.module.addDependency(dep); + return true; + } + if (members.length === 0) return; + enableStructuredExports(); + const remainingMembers = members; + checkNamespace( + parser.statementPath.length === 1 && + parser.isStatementLevelExpression(expr), + remainingMembers, + expr.right + ); + const dep = new CommonJsExportsDependency( + expr.left.range, + null, + base, + remainingMembers + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + parser.walkExpression(expr.right); + return true; + }; + parser.hooks.assignMemberChain + .for("exports") + .tap("CommonJsExportsParserPlugin", (expr, members) => { + return handleAssignExport(expr, "exports", members); + }); + parser.hooks.assignMemberChain + .for("this") + .tap("CommonJsExportsParserPlugin", (expr, members) => { + if (!parser.scope.topLevelScope) return; + return handleAssignExport(expr, "this", members); + }); + parser.hooks.assignMemberChain + .for("module") + .tap("CommonJsExportsParserPlugin", (expr, members) => { + if (members[0] !== "exports") return; + return handleAssignExport(expr, "module.exports", members.slice(1)); + }); + parser.hooks.call + .for("Object.defineProperty") + .tap("CommonJsExportsParserPlugin", expression => { + const expr = /** @type {import("estree").CallExpression} */ (expression); + if (!parser.isStatementLevelExpression(expr)) return; + if (expr.arguments.length !== 3) return; + if (expr.arguments[0].type === "SpreadElement") return; + if (expr.arguments[1].type === "SpreadElement") return; + if (expr.arguments[2].type === "SpreadElement") return; + const exportsArg = parser.evaluateExpression(expr.arguments[0]); + if (!exportsArg || !exportsArg.isIdentifier()) return; + if ( + exportsArg.identifier !== "exports" && + exportsArg.identifier !== "module.exports" && + (exportsArg.identifier !== "this" || !parser.scope.topLevelScope) + ) { + return; + } + const propertyArg = parser.evaluateExpression(expr.arguments[1]); + if (!propertyArg) return; + const property = propertyArg.asString(); + if (typeof property !== "string") return; + enableStructuredExports(); + const descArg = expr.arguments[2]; + checkNamespace( + parser.statementPath.length === 1, + [property], + getValueOfPropertyDescription(descArg) + ); + const dep = new CommonJsExportsDependency( + expr.range, + expr.arguments[2].range, + `Object.defineProperty(${exportsArg.identifier})`, + [property] + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + + parser.walkExpression(expr.arguments[2]); + return true; + }); + + // Self reference // + const handleAccessExport = (expr, base, members, call = undefined) => { + if (HarmonyExports.isEnabled(parser.state)) return; + if (members.length === 0) { + bailout(`${base} is used directly at ${formatLocation(expr.loc)}`); + } + if (call && members.length === 1) { + bailoutHint( + `${base}${propertyAccess( + members + )}(...) prevents optimization as ${base} is passed as call context at ${formatLocation( + expr.loc + )}` + ); + } + const dep = new CommonJsSelfReferenceDependency( + expr.range, + base, + members, + !!call + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + if (call) { + parser.walkExpressions(call.arguments); + } + return true; + }; + parser.hooks.callMemberChain + .for("exports") + .tap("CommonJsExportsParserPlugin", (expr, members) => { + return handleAccessExport(expr.callee, "exports", members, expr); + }); + parser.hooks.expressionMemberChain + .for("exports") + .tap("CommonJsExportsParserPlugin", (expr, members) => { + return handleAccessExport(expr, "exports", members); + }); + parser.hooks.expression + .for("exports") + .tap("CommonJsExportsParserPlugin", expr => { + return handleAccessExport(expr, "exports", []); + }); + parser.hooks.callMemberChain + .for("module") + .tap("CommonJsExportsParserPlugin", (expr, members) => { + if (members[0] !== "exports") return; + return handleAccessExport( + expr.callee, + "module.exports", + members.slice(1), + expr + ); + }); + parser.hooks.expressionMemberChain + .for("module") + .tap("CommonJsExportsParserPlugin", (expr, members) => { + if (members[0] !== "exports") return; + return handleAccessExport(expr, "module.exports", members.slice(1)); + }); + parser.hooks.expression + .for("module.exports") + .tap("CommonJsExportsParserPlugin", expr => { + return handleAccessExport(expr, "module.exports", []); + }); + parser.hooks.callMemberChain + .for("this") + .tap("CommonJsExportsParserPlugin", (expr, members) => { + if (!parser.scope.topLevelScope) return; + return handleAccessExport(expr.callee, "this", members, expr); + }); + parser.hooks.expressionMemberChain + .for("this") + .tap("CommonJsExportsParserPlugin", (expr, members) => { + if (!parser.scope.topLevelScope) return; + return handleAccessExport(expr, "this", members); + }); + parser.hooks.expression + .for("this") + .tap("CommonJsExportsParserPlugin", expr => { + if (!parser.scope.topLevelScope) return; + return handleAccessExport(expr, "this", []); + }); + + // Bailouts // + parser.hooks.expression.for("module").tap("CommonJsPlugin", expr => { + bailout(); + const isHarmony = HarmonyExports.isEnabled(parser.state); + const dep = new ModuleDecoratorDependency( + isHarmony + ? RuntimeGlobals.harmonyModuleDecorator + : RuntimeGlobals.nodeModuleDecorator, + !isHarmony + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return true; + }); + } +} +module.exports = CommonJsExportsParserPlugin; + + +/***/ }), + +/***/ 46131: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Template = __webpack_require__(90751); +const { equals } = __webpack_require__(92459); +const makeSerializable = __webpack_require__(55575); +const propertyAccess = __webpack_require__(44682); +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class CommonJsFullRequireDependency extends ModuleDependency { + /** + * @param {string} request the request string + * @param {[number, number]} range location in source code + * @param {string[]} names accessed properties on module + */ + constructor(request, range, names) { + super(request); + this.range = range; + this.names = names; + this.call = false; + this.asiSafe = undefined; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + if (this.call) { + const importedModule = moduleGraph.getModule(this); + if ( + !importedModule || + importedModule.getExportsType(moduleGraph, false) !== "namespace" + ) { + return [this.names.slice(0, -1)]; + } + } + return [this.names]; + } + + serialize(context) { + const { write } = context; + write(this.names); + write(this.call); + write(this.asiSafe); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.names = read(); + this.call = read(); + this.asiSafe = read(); + super.deserialize(context); + } + + get type() { + return "cjs full require"; + } + + get category() { + return "commonjs"; + } +} + +CommonJsFullRequireDependency.Template = class CommonJsFullRequireDependencyTemplate extends ( + ModuleDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { + module, + runtimeTemplate, + moduleGraph, + chunkGraph, + runtimeRequirements, + runtime, + initFragments + } + ) { + const dep = /** @type {CommonJsFullRequireDependency} */ (dependency); + if (!dep.range) return; + const importedModule = moduleGraph.getModule(dep); + let requireExpr = runtimeTemplate.moduleExports({ + module: importedModule, + chunkGraph, + request: dep.request, + weak: dep.weak, + runtimeRequirements + }); + const ids = dep.names; + const usedImported = moduleGraph + .getExportsInfo(importedModule) + .getUsedName(ids, runtime); + if (usedImported) { + const comment = equals(usedImported, ids) + ? "" + : Template.toNormalComment(propertyAccess(ids)) + " "; + requireExpr += `${comment}${propertyAccess(usedImported)}`; + } + source.replace(dep.range[0], dep.range[1] - 1, requireExpr); + } +}; + +makeSerializable( + CommonJsFullRequireDependency, + "webpack/lib/dependencies/CommonJsFullRequireDependency" +); + +module.exports = CommonJsFullRequireDependency; + + +/***/ }), + +/***/ 55275: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const { + evaluateToIdentifier, + evaluateToString, + expressionIsUnsupported, + toConstantDependency +} = __webpack_require__(98550); +const CommonJsFullRequireDependency = __webpack_require__(46131); +const CommonJsRequireContextDependency = __webpack_require__(96323); +const CommonJsRequireDependency = __webpack_require__(81192); +const ConstDependency = __webpack_require__(9364); +const ContextDependencyHelpers = __webpack_require__(39815); +const LocalModuleDependency = __webpack_require__(54524); +const { getLocalModule } = __webpack_require__(94353); +const RequireHeaderDependency = __webpack_require__(15418); +const RequireResolveContextDependency = __webpack_require__(27569); +const RequireResolveDependency = __webpack_require__(24868); +const RequireResolveHeaderDependency = __webpack_require__(1217); + +class CommonJsImportsParserPlugin { + constructor(options) { + this.options = options; + } + + apply(parser) { + const options = this.options; + + // metadata // + const tapRequireExpression = (expression, getMembers) => { + parser.hooks.typeof + .for(expression) + .tap( + "CommonJsPlugin", + toConstantDependency(parser, JSON.stringify("function")) + ); + parser.hooks.evaluateTypeof + .for(expression) + .tap("CommonJsPlugin", evaluateToString("function")); + parser.hooks.evaluateIdentifier + .for(expression) + .tap( + "CommonJsPlugin", + evaluateToIdentifier(expression, "require", getMembers, true) + ); + }; + tapRequireExpression("require", () => []); + tapRequireExpression("require.resolve", () => ["resolve"]); + tapRequireExpression("require.resolveWeak", () => ["resolveWeak"]); + + // Weird stuff // + parser.hooks.assign.for("require").tap("CommonJsPlugin", expr => { + // to not leak to global "require", we need to define a local require here. + const dep = new ConstDependency("var require;", 0); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + + // Unsupported // + parser.hooks.expression + .for("require.main.require") + .tap( + "CommonJsPlugin", + expressionIsUnsupported( + parser, + "require.main.require is not supported by webpack." + ) + ); + parser.hooks.call + .for("require.main.require") + .tap( + "CommonJsPlugin", + expressionIsUnsupported( + parser, + "require.main.require is not supported by webpack." + ) + ); + parser.hooks.expression + .for("module.parent.require") + .tap( + "CommonJsPlugin", + expressionIsUnsupported( + parser, + "module.parent.require is not supported by webpack." + ) + ); + parser.hooks.call + .for("module.parent.require") + .tap( + "CommonJsPlugin", + expressionIsUnsupported( + parser, + "module.parent.require is not supported by webpack." + ) + ); + + // renaming // + parser.hooks.canRename.for("require").tap("CommonJsPlugin", () => true); + parser.hooks.rename.for("require").tap("CommonJsPlugin", expr => { + // To avoid "not defined" error, replace the value with undefined + const dep = new ConstDependency("undefined", expr.range); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return false; + }); + + // inspection // + parser.hooks.expression + .for("require.cache") + .tap( + "CommonJsImportsParserPlugin", + toConstantDependency(parser, RuntimeGlobals.moduleCache, [ + RuntimeGlobals.moduleCache, + RuntimeGlobals.moduleId, + RuntimeGlobals.moduleLoaded + ]) + ); + + // require as expression // + parser.hooks.expression + .for("require") + .tap("CommonJsImportsParserPlugin", expr => { + const dep = new CommonJsRequireContextDependency( + { + request: options.unknownContextRequest, + recursive: options.unknownContextRecursive, + regExp: options.unknownContextRegExp, + mode: "sync" + }, + expr.range + ); + dep.critical = + options.unknownContextCritical && + "require function is used in a way in which dependencies cannot be statically extracted"; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + }); + + // require // + const processRequireItem = (expr, param) => { + if (param.isString()) { + const dep = new CommonJsRequireDependency(param.string, param.range); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + }; + const processRequireContext = (expr, param) => { + const dep = ContextDependencyHelpers.create( + CommonJsRequireContextDependency, + expr.range, + param, + expr, + options, + { + category: "commonjs" + }, + parser + ); + if (!dep) return; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + }; + + const createRequireHandler = callNew => expr => { + if (expr.arguments.length !== 1) return; + let localModule; + const param = parser.evaluateExpression(expr.arguments[0]); + if (param.isConditional()) { + let isExpression = false; + for (const p of param.options) { + const result = processRequireItem(expr, p); + if (result === undefined) { + isExpression = true; + } + } + if (!isExpression) { + const dep = new RequireHeaderDependency(expr.callee.range); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + } + } + if ( + param.isString() && + (localModule = getLocalModule(parser.state, param.string)) + ) { + localModule.flagUsed(); + const dep = new LocalModuleDependency(localModule, expr.range, callNew); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + } else { + const result = processRequireItem(expr, param); + if (result === undefined) { + processRequireContext(expr, param); + } else { + const dep = new RequireHeaderDependency(expr.callee.range); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + } + return true; + } + }; + parser.hooks.call + .for("require") + .tap("CommonJsImportsParserPlugin", createRequireHandler(false)); + parser.hooks.new + .for("require") + .tap("CommonJsImportsParserPlugin", createRequireHandler(true)); + parser.hooks.call + .for("module.require") + .tap("CommonJsImportsParserPlugin", createRequireHandler(false)); + parser.hooks.new + .for("module.require") + .tap("CommonJsImportsParserPlugin", createRequireHandler(true)); + + // require with property access // + const chainHandler = (expr, calleeMembers, callExpr, members) => { + if (callExpr.arguments.length !== 1) return; + const param = parser.evaluateExpression(callExpr.arguments[0]); + if (param.isString() && !getLocalModule(parser.state, param.string)) { + const dep = new CommonJsFullRequireDependency( + param.string, + expr.range, + members + ); + dep.asiSafe = !parser.isAsiPosition(expr.range[0]); + dep.optional = !!parser.scope.inTry; + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return true; + } + }; + const callChainHandler = (expr, calleeMembers, callExpr, members) => { + if (callExpr.arguments.length !== 1) return; + const param = parser.evaluateExpression(callExpr.arguments[0]); + if (param.isString() && !getLocalModule(parser.state, param.string)) { + const dep = new CommonJsFullRequireDependency( + param.string, + expr.callee.range, + members + ); + dep.call = true; + dep.asiSafe = !parser.isAsiPosition(expr.range[0]); + dep.optional = !!parser.scope.inTry; + dep.loc = expr.callee.loc; + parser.state.module.addDependency(dep); + parser.walkExpressions(expr.arguments); + return true; + } + }; + parser.hooks.memberChainOfCallMemberChain + .for("require") + .tap("CommonJsImportsParserPlugin", chainHandler); + parser.hooks.memberChainOfCallMemberChain + .for("module.require") + .tap("CommonJsImportsParserPlugin", chainHandler); + parser.hooks.callMemberChainOfCallMemberChain + .for("require") + .tap("CommonJsImportsParserPlugin", callChainHandler); + parser.hooks.callMemberChainOfCallMemberChain + .for("module.require") + .tap("CommonJsImportsParserPlugin", callChainHandler); + + // require.resolve // + const processResolve = (expr, weak) => { + if (expr.arguments.length !== 1) return; + const param = parser.evaluateExpression(expr.arguments[0]); + if (param.isConditional()) { + for (const option of param.options) { + const result = processResolveItem(expr, option, weak); + if (result === undefined) { + processResolveContext(expr, option, weak); + } + } + const dep = new RequireResolveHeaderDependency(expr.callee.range); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + } else { + const result = processResolveItem(expr, param, weak); + if (result === undefined) { + processResolveContext(expr, param, weak); + } + const dep = new RequireResolveHeaderDependency(expr.callee.range); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + } + }; + const processResolveItem = (expr, param, weak) => { + if (param.isString()) { + const dep = new RequireResolveDependency(param.string, param.range); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + dep.weak = weak; + parser.state.current.addDependency(dep); + return true; + } + }; + const processResolveContext = (expr, param, weak) => { + const dep = ContextDependencyHelpers.create( + RequireResolveContextDependency, + param.range, + param, + expr, + options, + { + category: "commonjs", + mode: weak ? "weak" : "sync" + }, + parser + ); + if (!dep) return; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + }; + + parser.hooks.call + .for("require.resolve") + .tap("RequireResolveDependencyParserPlugin", expr => { + return processResolve(expr, false); + }); + parser.hooks.call + .for("require.resolveWeak") + .tap("RequireResolveDependencyParserPlugin", expr => { + return processResolve(expr, true); + }); + } +} +module.exports = CommonJsImportsParserPlugin; + + +/***/ }), + +/***/ 2900: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const SelfModuleFactory = __webpack_require__(17850); +const Template = __webpack_require__(90751); +const CommonJsExportsDependency = __webpack_require__(59067); +const CommonJsFullRequireDependency = __webpack_require__(46131); +const CommonJsRequireContextDependency = __webpack_require__(96323); +const CommonJsRequireDependency = __webpack_require__(81192); +const CommonJsSelfReferenceDependency = __webpack_require__(6386); +const ModuleDecoratorDependency = __webpack_require__(79448); +const RequireHeaderDependency = __webpack_require__(15418); +const RequireResolveContextDependency = __webpack_require__(27569); +const RequireResolveDependency = __webpack_require__(24868); +const RequireResolveHeaderDependency = __webpack_require__(1217); +const RuntimeRequirementsDependency = __webpack_require__(61247); + +const CommonJsExportsParserPlugin = __webpack_require__(32108); +const CommonJsImportsParserPlugin = __webpack_require__(55275); + +const { + evaluateToIdentifier, + toConstantDependency +} = __webpack_require__(98550); +const CommonJsExportRequireDependency = __webpack_require__(48075); + +class CommonJsPlugin { + constructor(options) { + this.options = options; + } + + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap( + "CommonJsPlugin", + (compilation, { contextModuleFactory, normalModuleFactory }) => { + compilation.dependencyFactories.set( + CommonJsRequireDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + CommonJsRequireDependency, + new CommonJsRequireDependency.Template() + ); + + compilation.dependencyFactories.set( + CommonJsFullRequireDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + CommonJsFullRequireDependency, + new CommonJsFullRequireDependency.Template() + ); + + compilation.dependencyFactories.set( + CommonJsRequireContextDependency, + contextModuleFactory + ); + compilation.dependencyTemplates.set( + CommonJsRequireContextDependency, + new CommonJsRequireContextDependency.Template() + ); + + compilation.dependencyFactories.set( + RequireResolveDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + RequireResolveDependency, + new RequireResolveDependency.Template() + ); + + compilation.dependencyFactories.set( + RequireResolveContextDependency, + contextModuleFactory + ); + compilation.dependencyTemplates.set( + RequireResolveContextDependency, + new RequireResolveContextDependency.Template() + ); + + compilation.dependencyTemplates.set( + RequireResolveHeaderDependency, + new RequireResolveHeaderDependency.Template() + ); + + compilation.dependencyTemplates.set( + RequireHeaderDependency, + new RequireHeaderDependency.Template() + ); + + compilation.dependencyTemplates.set( + CommonJsExportsDependency, + new CommonJsExportsDependency.Template() + ); + + compilation.dependencyFactories.set( + CommonJsExportRequireDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + CommonJsExportRequireDependency, + new CommonJsExportRequireDependency.Template() + ); + + const selfFactory = new SelfModuleFactory(compilation.moduleGraph); + + compilation.dependencyFactories.set( + CommonJsSelfReferenceDependency, + selfFactory + ); + compilation.dependencyTemplates.set( + CommonJsSelfReferenceDependency, + new CommonJsSelfReferenceDependency.Template() + ); + + compilation.dependencyFactories.set( + ModuleDecoratorDependency, + selfFactory + ); + compilation.dependencyTemplates.set( + ModuleDecoratorDependency, + new ModuleDecoratorDependency.Template() + ); + + compilation.hooks.runtimeRequirementInModule + .for(RuntimeGlobals.harmonyModuleDecorator) + .tap("CommonJsPlugin", (module, set) => { + set.add(RuntimeGlobals.module); + set.add(RuntimeGlobals.requireScope); + }); + + compilation.hooks.runtimeRequirementInModule + .for(RuntimeGlobals.nodeModuleDecorator) + .tap("CommonJsPlugin", (module, set) => { + set.add(RuntimeGlobals.module); + set.add(RuntimeGlobals.requireScope); + }); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.harmonyModuleDecorator) + .tap("CommonJsPlugin", (chunk, set) => { + compilation.addRuntimeModule( + chunk, + new HarmonyModuleDecoratorRuntimeModule() + ); + }); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.nodeModuleDecorator) + .tap("CommonJsPlugin", (chunk, set) => { + compilation.addRuntimeModule( + chunk, + new NodeModuleDecoratorRuntimeModule() + ); + }); + + const handler = (parser, parserOptions) => { + if (parserOptions.commonjs !== undefined && !parserOptions.commonjs) + return; + parser.hooks.typeof + .for("module") + .tap( + "CommonJsPlugin", + toConstantDependency(parser, JSON.stringify("object")) + ); + + parser.hooks.expression + .for("require.main") + .tap( + "CommonJsPlugin", + toConstantDependency( + parser, + `${RuntimeGlobals.moduleCache}[${RuntimeGlobals.entryModuleId}]`, + [RuntimeGlobals.moduleCache, RuntimeGlobals.entryModuleId] + ) + ); + parser.hooks.expression + .for("module.loaded") + .tap("CommonJsPlugin", expr => { + parser.state.module.buildInfo.moduleConcatenationBailout = + "module.loaded"; + const dep = new RuntimeRequirementsDependency([ + RuntimeGlobals.moduleLoaded + ]); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + + parser.hooks.expression + .for("module.id") + .tap("CommonJsPlugin", expr => { + parser.state.module.buildInfo.moduleConcatenationBailout = + "module.id"; + const dep = new RuntimeRequirementsDependency([ + RuntimeGlobals.moduleId + ]); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + + parser.hooks.evaluateIdentifier.for("module.hot").tap( + "CommonJsPlugin", + evaluateToIdentifier("module.hot", "module", () => ["hot"], null) + ); + + new CommonJsImportsParserPlugin(options).apply(parser); + new CommonJsExportsParserPlugin(compilation.moduleGraph).apply( + parser + ); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("CommonJsPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("CommonJsPlugin", handler); + } + ); + } +} + +class HarmonyModuleDecoratorRuntimeModule extends RuntimeModule { + constructor() { + super("harmony module decorator"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeTemplate } = this.compilation; + return Template.asString([ + `${ + RuntimeGlobals.harmonyModuleDecorator + } = ${runtimeTemplate.basicFunction("module", [ + "module = Object.create(module);", + "if (!module.children) module.children = [];", + "Object.defineProperty(module, 'exports', {", + Template.indent([ + "enumerable: true,", + `set: ${runtimeTemplate.basicFunction("", [ + "throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);" + ])}` + ]), + "});", + "return module;" + ])};` + ]); + } +} + +class NodeModuleDecoratorRuntimeModule extends RuntimeModule { + constructor() { + super("node module decorator"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeTemplate } = this.compilation; + return Template.asString([ + `${ + RuntimeGlobals.nodeModuleDecorator + } = ${runtimeTemplate.basicFunction("module", [ + "module.paths = [];", + "if (!module.children) module.children = [];", + "return module;" + ])};` + ]); + } +} + +module.exports = CommonJsPlugin; + + +/***/ }), + +/***/ 96323: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ContextDependency = __webpack_require__(21649); +const ContextDependencyTemplateAsRequireCall = __webpack_require__(33552); + +class CommonJsRequireContextDependency extends ContextDependency { + constructor(options, range, valueRange) { + super(options); + + this.range = range; + this.valueRange = valueRange; + } + + get type() { + return "cjs require context"; + } + + serialize(context) { + const { write } = context; + + write(this.range); + write(this.valueRange); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.range = read(); + this.valueRange = read(); + + super.deserialize(context); + } +} + +makeSerializable( + CommonJsRequireContextDependency, + "webpack/lib/dependencies/CommonJsRequireContextDependency" +); + +CommonJsRequireContextDependency.Template = ContextDependencyTemplateAsRequireCall; + +module.exports = CommonJsRequireContextDependency; + + +/***/ }), + +/***/ 81192: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); +const ModuleDependencyTemplateAsId = __webpack_require__(57270); + +class CommonJsRequireDependency extends ModuleDependency { + constructor(request, range) { + super(request); + this.range = range; + } + + get type() { + return "cjs require"; + } + + get category() { + return "commonjs"; + } +} + +CommonJsRequireDependency.Template = ModuleDependencyTemplateAsId; + +makeSerializable( + CommonJsRequireDependency, + "webpack/lib/dependencies/CommonJsRequireDependency" +); + +module.exports = CommonJsRequireDependency; + + +/***/ }), + +/***/ 6386: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const { equals } = __webpack_require__(92459); +const makeSerializable = __webpack_require__(55575); +const propertyAccess = __webpack_require__(44682); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class CommonJsSelfReferenceDependency extends NullDependency { + constructor(range, base, names, call) { + super(); + this.range = range; + this.base = base; + this.names = names; + this.call = call; + } + + get type() { + return "cjs self exports reference"; + } + + get category() { + return "self"; + } + + /** + * @returns {string | null} an identifier to merge equal requests + */ + getResourceIdentifier() { + return `self`; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + return [this.call ? this.names.slice(0, -1) : this.names]; + } + + serialize(context) { + const { write } = context; + write(this.range); + write(this.base); + write(this.names); + write(this.call); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.range = read(); + this.base = read(); + this.names = read(); + this.call = read(); + super.deserialize(context); + } +} + +makeSerializable( + CommonJsSelfReferenceDependency, + "webpack/lib/dependencies/CommonJsSelfReferenceDependency" +); + +CommonJsSelfReferenceDependency.Template = class CommonJsSelfReferenceDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { module, moduleGraph, runtime, runtimeRequirements } + ) { + const dep = /** @type {CommonJsSelfReferenceDependency} */ (dependency); + let used; + if (dep.names.length === 0) { + used = dep.names; + } else { + used = moduleGraph.getExportsInfo(module).getUsedName(dep.names, runtime); + } + if (!used) { + throw new Error( + "Self-reference dependency has unused export name: This should not happen" + ); + } + + let base = undefined; + switch (dep.base) { + case "exports": + runtimeRequirements.add(RuntimeGlobals.exports); + base = module.exportsArgument; + break; + case "module.exports": + runtimeRequirements.add(RuntimeGlobals.module); + base = `${module.moduleArgument}.exports`; + break; + case "this": + runtimeRequirements.add(RuntimeGlobals.thisAsExports); + base = "this"; + break; + default: + throw new Error(`Unsupported base ${dep.base}`); + } + + if (base === dep.base && equals(used, dep.names)) { + // Nothing has to be changed + // We don't use a replacement for compat reasons + // for plugins that update `module._source` which they + // shouldn't do! + return; + } + + source.replace( + dep.range[0], + dep.range[1] - 1, + `${base}${propertyAccess(used)}` + ); + } +}; + +module.exports = CommonJsSelfReferenceDependency; + + +/***/ }), + +/***/ 9364: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ +/** @typedef {import("../util/Hash")} Hash */ + +class ConstDependency extends NullDependency { + /** + * @param {string} expression the expression + * @param {number|[number, number]} range the source range + * @param {string[]=} runtimeRequirements runtime requirements + */ + constructor(expression, range, runtimeRequirements) { + super(); + this.expression = expression; + this.range = range; + this.runtimeRequirements = runtimeRequirements + ? new Set(runtimeRequirements) + : null; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(this.range + ""); + hash.update(this.expression + ""); + if (this.runtimeRequirements) + hash.update(Array.from(this.runtimeRequirements).join() + ""); + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this dependency connects the module to referencing modules + */ + getModuleEvaluationSideEffectsState(moduleGraph) { + return false; + } + + serialize(context) { + const { write } = context; + write(this.expression); + write(this.range); + write(this.runtimeRequirements); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.expression = read(); + this.range = read(); + this.runtimeRequirements = read(); + super.deserialize(context); + } +} + +makeSerializable(ConstDependency, "webpack/lib/dependencies/ConstDependency"); + +ConstDependency.Template = class ConstDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const dep = /** @type {ConstDependency} */ (dependency); + if (dep.runtimeRequirements) { + for (const req of dep.runtimeRequirements) { + templateContext.runtimeRequirements.add(req); + } + } + if (typeof dep.range === "number") { + source.insert(dep.range, dep.expression); + return; + } + + source.replace(dep.range[0], dep.range[1] - 1, dep.expression); + } +}; + +module.exports = ConstDependency; + + +/***/ }), + +/***/ 21649: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const DependencyTemplate = __webpack_require__(90909); +const makeSerializable = __webpack_require__(55575); +const memoize = __webpack_require__(18003); + +/** @typedef {import("../ContextModule").ContextOptions} ContextOptions */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../WebpackError")} WebpackError */ + +const getCriticalDependencyWarning = memoize(() => + __webpack_require__(92322) +); + +/** @typedef {ContextOptions & { request: string }} ContextDependencyOptions */ + +const regExpToString = r => (r ? r + "" : ""); + +class ContextDependency extends Dependency { + /** + * @param {ContextDependencyOptions} options options for the context module + */ + constructor(options) { + super(); + + this.options = options; + this.userRequest = this.options && this.options.request; + /** @type {false | string} */ + this.critical = false; + this.hadGlobalOrStickyRegExp = false; + + if ( + this.options && + (this.options.regExp.global || this.options.regExp.sticky) + ) { + this.options = { ...this.options, regExp: null }; + this.hadGlobalOrStickyRegExp = true; + } + + this.request = undefined; + this.range = undefined; + this.valueRange = undefined; + // TODO refactor this + this.replaces = undefined; + } + + get category() { + return "commonjs"; + } + + /** + * @returns {string | null} an identifier to merge equal requests + */ + getResourceIdentifier() { + return ( + `context${this.options.request} ${this.options.recursive} ` + + `${regExpToString(this.options.regExp)} ${regExpToString( + this.options.include + )} ${regExpToString(this.options.exclude)} ` + + `${this.options.mode} ${this.options.chunkName} ` + + `${JSON.stringify(this.options.groupOptions)}` + ); + } + + /** + * Returns warnings + * @param {ModuleGraph} moduleGraph module graph + * @returns {WebpackError[]} warnings + */ + getWarnings(moduleGraph) { + let warnings = super.getWarnings(moduleGraph); + + if (this.critical) { + if (!warnings) warnings = []; + const CriticalDependencyWarning = getCriticalDependencyWarning(); + warnings.push(new CriticalDependencyWarning(this.critical)); + } + + if (this.hadGlobalOrStickyRegExp) { + if (!warnings) warnings = []; + const CriticalDependencyWarning = getCriticalDependencyWarning(); + warnings.push( + new CriticalDependencyWarning( + "Contexts can't use RegExps with the 'g' or 'y' flags." + ) + ); + } + + return warnings; + } + + serialize(context) { + const { write } = context; + + write(this.options); + write(this.userRequest); + write(this.critical); + write(this.hadGlobalOrStickyRegExp); + write(this.request); + write(this.range); + write(this.valueRange); + write(this.prepend); + write(this.replaces); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.options = read(); + this.userRequest = read(); + this.critical = read(); + this.hadGlobalOrStickyRegExp = read(); + this.request = read(); + this.range = read(); + this.valueRange = read(); + this.prepend = read(); + this.replaces = read(); + + super.deserialize(context); + } +} + +makeSerializable( + ContextDependency, + "webpack/lib/dependencies/ContextDependency" +); + +ContextDependency.Template = DependencyTemplate; + +module.exports = ContextDependency; + + +/***/ }), + +/***/ 39815: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { parseResource } = __webpack_require__(47779); + +/** @typedef {import("estree").Node} EsTreeNode */ +/** @typedef {import("../../declarations/WebpackOptions").ModuleOptions} ModuleOptions */ +/** @typedef {import("../javascript/BasicEvaluatedExpression")} BasicEvaluatedExpression */ +/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ +/** @typedef {import("./ContextDependency")} ContextDependency */ +/** @typedef {import("./ContextDependency").ContextDependencyOptions} ContextDependencyOptions */ + +/** + * Escapes regular expression metacharacters + * @param {string} str String to quote + * @returns {string} Escaped string + */ +const quoteMeta = str => { + return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&"); +}; + +const splitContextFromPrefix = prefix => { + const idx = prefix.lastIndexOf("/"); + let context = "."; + if (idx >= 0) { + context = prefix.substr(0, idx); + prefix = `.${prefix.substr(idx)}`; + } + return { + context, + prefix + }; +}; + +/** @typedef {Partial>} PartialContextDependencyOptions */ + +/** @typedef {{ new(options: ContextDependencyOptions, range: [number, number], valueRange: [number, number]): ContextDependency }} ContextDependencyConstructor */ + +/** + * @param {ContextDependencyConstructor} Dep the Dependency class + * @param {[number, number]} range source range + * @param {BasicEvaluatedExpression} param context param + * @param {EsTreeNode} expr expr + * @param {ModuleOptions} options options for context creation + * @param {PartialContextDependencyOptions} contextOptions options for the ContextModule + * @param {JavascriptParser} parser the parser + * @returns {ContextDependency} the created Dependency + */ +exports.create = (Dep, range, param, expr, options, contextOptions, parser) => { + if (param.isTemplateString()) { + let prefixRaw = param.quasis[0].string; + let postfixRaw = + param.quasis.length > 1 + ? param.quasis[param.quasis.length - 1].string + : ""; + + const valueRange = param.range; + const { context, prefix } = splitContextFromPrefix(prefixRaw); + const { path: postfix, query, fragment } = parseResource( + postfixRaw, + parser + ); + + // When there are more than two quasis, the generated RegExp can be more precise + // We join the quasis with the expression regexp + const innerQuasis = param.quasis.slice(1, param.quasis.length - 1); + const innerRegExp = + options.wrappedContextRegExp.source + + innerQuasis + .map(q => quoteMeta(q.string) + options.wrappedContextRegExp.source) + .join(""); + + // Example: `./context/pre${e}inner${e}inner2${e}post?query#frag` + // context: "./context" + // prefix: "./pre" + // innerQuasis: [BEE("inner"), BEE("inner2")] + // (BEE = BasicEvaluatedExpression) + // postfix: "post" + // query: "?query" + // fragment: "#frag" + // regExp: /^\.\/pre.*inner.*inner2.*post$/ + const regExp = new RegExp( + `^${quoteMeta(prefix)}${innerRegExp}${quoteMeta(postfix)}$` + ); + const dep = new Dep( + { + request: context + query + fragment, + recursive: options.wrappedContextRecursive, + regExp, + mode: "sync", + ...contextOptions + }, + range, + valueRange + ); + dep.loc = expr.loc; + const replaces = []; + + param.parts.forEach((part, i) => { + if (i % 2 === 0) { + // Quasis or merged quasi + let range = part.range; + let value = part.string; + if (param.templateStringKind === "cooked") { + value = JSON.stringify(value); + value = value.slice(1, value.length - 1); + } + if (i === 0) { + // prefix + value = prefix; + range = [param.range[0], part.range[1]]; + value = + (param.templateStringKind === "cooked" ? "`" : "String.raw`") + + value; + } else if (i === param.parts.length - 1) { + // postfix + value = postfix; + range = [part.range[0], param.range[1]]; + value = value + "`"; + } else if ( + part.expression && + part.expression.type === "TemplateElement" && + part.expression.value.raw === value + ) { + // Shortcut when it's a single quasi and doesn't need to be replaced + return; + } + replaces.push({ + range, + value + }); + } else { + // Expression + parser.walkExpression(part.expression); + } + }); + + dep.replaces = replaces; + dep.critical = + options.wrappedContextCritical && + "a part of the request of a dependency is an expression"; + return dep; + } else if ( + param.isWrapped() && + ((param.prefix && param.prefix.isString()) || + (param.postfix && param.postfix.isString())) + ) { + let prefixRaw = + param.prefix && param.prefix.isString() ? param.prefix.string : ""; + let postfixRaw = + param.postfix && param.postfix.isString() ? param.postfix.string : ""; + const prefixRange = + param.prefix && param.prefix.isString() ? param.prefix.range : null; + const postfixRange = + param.postfix && param.postfix.isString() ? param.postfix.range : null; + const valueRange = param.range; + const { context, prefix } = splitContextFromPrefix(prefixRaw); + const { path: postfix, query, fragment } = parseResource( + postfixRaw, + parser + ); + const regExp = new RegExp( + `^${quoteMeta(prefix)}${options.wrappedContextRegExp.source}${quoteMeta( + postfix + )}$` + ); + const dep = new Dep( + { + request: context + query + fragment, + recursive: options.wrappedContextRecursive, + regExp, + mode: "sync", + ...contextOptions + }, + range, + valueRange + ); + dep.loc = expr.loc; + const replaces = []; + if (prefixRange) { + replaces.push({ + range: prefixRange, + value: JSON.stringify(prefix) + }); + } + if (postfixRange) { + replaces.push({ + range: postfixRange, + value: JSON.stringify(postfix) + }); + } + dep.replaces = replaces; + dep.critical = + options.wrappedContextCritical && + "a part of the request of a dependency is an expression"; + + if (parser && param.wrappedInnerExpressions) { + for (const part of param.wrappedInnerExpressions) { + if (part.expression) parser.walkExpression(part.expression); + } + } + + return dep; + } else { + const dep = new Dep( + { + request: options.exprContextRequest, + recursive: options.exprContextRecursive, + regExp: /** @type {RegExp} */ (options.exprContextRegExp), + mode: "sync", + ...contextOptions + }, + range, + param.range + ); + dep.loc = expr.loc; + dep.critical = + options.exprContextCritical && + "the request of a dependency is an expression"; + + parser.walkExpression(param.expression); + + return dep; + } +}; + + +/***/ }), + +/***/ 67551: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ContextDependency = __webpack_require__(21649); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class ContextDependencyTemplateAsId extends ContextDependency.Template { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } + ) { + const dep = /** @type {ContextDependency} */ (dependency); + const moduleExports = runtimeTemplate.moduleExports({ + module: moduleGraph.getModule(dep), + chunkGraph, + request: dep.request, + weak: dep.weak, + runtimeRequirements + }); + + if (moduleGraph.getModule(dep)) { + if (dep.valueRange) { + if (Array.isArray(dep.replaces)) { + for (let i = 0; i < dep.replaces.length; i++) { + const rep = dep.replaces[i]; + source.replace(rep.range[0], rep.range[1] - 1, rep.value); + } + } + source.replace(dep.valueRange[1], dep.range[1] - 1, ")"); + source.replace( + dep.range[0], + dep.valueRange[0] - 1, + `${moduleExports}.resolve(` + ); + } else { + source.replace( + dep.range[0], + dep.range[1] - 1, + `${moduleExports}.resolve` + ); + } + } else { + source.replace(dep.range[0], dep.range[1] - 1, moduleExports); + } + } +} +module.exports = ContextDependencyTemplateAsId; + + +/***/ }), + +/***/ 33552: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ContextDependency = __webpack_require__(21649); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class ContextDependencyTemplateAsRequireCall extends ContextDependency.Template { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } + ) { + const dep = /** @type {ContextDependency} */ (dependency); + const moduleExports = runtimeTemplate.moduleExports({ + module: moduleGraph.getModule(dep), + chunkGraph, + request: dep.request, + runtimeRequirements + }); + + if (moduleGraph.getModule(dep)) { + if (dep.valueRange) { + if (Array.isArray(dep.replaces)) { + for (let i = 0; i < dep.replaces.length; i++) { + const rep = dep.replaces[i]; + source.replace(rep.range[0], rep.range[1] - 1, rep.value); + } + } + source.replace(dep.valueRange[1], dep.range[1] - 1, ")"); + source.replace( + dep.range[0], + dep.valueRange[0] - 1, + `${moduleExports}(` + ); + } else { + source.replace(dep.range[0], dep.range[1] - 1, moduleExports); + } + } else { + source.replace(dep.range[0], dep.range[1] - 1, moduleExports); + } + } +} +module.exports = ContextDependencyTemplateAsRequireCall; + + +/***/ }), + +/***/ 32592: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class ContextElementDependency extends ModuleDependency { + constructor(request, userRequest, category, referencedExports) { + super(request); + this.referencedExports = referencedExports; + this._category = category; + + if (userRequest) { + this.userRequest = userRequest; + } + } + + get type() { + return "context element"; + } + + get category() { + return this._category; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + return this.referencedExports + ? this.referencedExports.map(e => ({ + name: e, + canMangle: false + })) + : Dependency.EXPORTS_OBJECT_REFERENCED; + } + + serialize(context) { + context.write(this.referencedExports); + super.serialize(context); + } + + deserialize(context) { + this.referencedExports = context.read(); + super.deserialize(context); + } +} + +makeSerializable( + ContextElementDependency, + "webpack/lib/dependencies/ContextElementDependency" +); + +module.exports = ContextElementDependency; + + +/***/ }), + +/***/ 92322: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); +const makeSerializable = __webpack_require__(55575); + +class CriticalDependencyWarning extends WebpackError { + constructor(message) { + super(); + + this.name = "CriticalDependencyWarning"; + this.message = "Critical dependency: " + message; + + Error.captureStackTrace(this, this.constructor); + } +} + +makeSerializable( + CriticalDependencyWarning, + "webpack/lib/dependencies/CriticalDependencyWarning" +); + +module.exports = CriticalDependencyWarning; + + +/***/ }), + +/***/ 73725: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); + +class DelegatedSourceDependency extends ModuleDependency { + constructor(request) { + super(request); + } + + get type() { + return "delegated source"; + } + + get category() { + return "esm"; + } +} + +makeSerializable( + DelegatedSourceDependency, + "webpack/lib/dependencies/DelegatedSourceDependency" +); + +module.exports = DelegatedSourceDependency; + + +/***/ }), + +/***/ 63938: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const makeSerializable = __webpack_require__(55575); + +class DllEntryDependency extends Dependency { + constructor(dependencies, name) { + super(); + + this.dependencies = dependencies; + this.name = name; + } + + get type() { + return "dll entry"; + } + + serialize(context) { + const { write } = context; + + write(this.dependencies); + write(this.name); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.dependencies = read(); + this.name = read(); + + super.deserialize(context); + } +} + +makeSerializable( + DllEntryDependency, + "webpack/lib/dependencies/DllEntryDependency" +); + +module.exports = DllEntryDependency; + + +/***/ }), + +/***/ 97093: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../Parser").ParserState} ParserState */ + +/** @type {WeakMap} */ +const parserStateExportsState = new WeakMap(); + +/** + * @param {ParserState} parserState parser state + * @returns {void} + */ +exports.bailout = parserState => { + const value = parserStateExportsState.get(parserState); + parserStateExportsState.set(parserState, false); + if (value === true) { + parserState.module.buildMeta.exportsType = undefined; + parserState.module.buildMeta.defaultObject = false; + } +}; + +/** + * @param {ParserState} parserState parser state + * @returns {void} + */ +exports.enable = parserState => { + const value = parserStateExportsState.get(parserState); + if (value === false) return; + parserStateExportsState.set(parserState, true); + if (value !== true) { + parserState.module.buildMeta.exportsType = "default"; + parserState.module.buildMeta.defaultObject = "redirect"; + } +}; + +/** + * @param {ParserState} parserState parser state + * @returns {void} + */ +exports.setFlagged = parserState => { + const value = parserStateExportsState.get(parserState); + if (value !== true) return; + const buildMeta = parserState.module.buildMeta; + if (buildMeta.exportsType === "dynamic") return; + buildMeta.exportsType = "flagged"; +}; + +/** + * @param {ParserState} parserState parser state + * @returns {void} + */ +exports.setDynamic = parserState => { + const value = parserStateExportsState.get(parserState); + if (value !== true) return; + parserState.module.buildMeta.exportsType = "dynamic"; +}; + +/** + * @param {ParserState} parserState parser state + * @returns {boolean} true, when enabled + */ +exports.isEnabled = parserState => { + const value = parserStateExportsState.get(parserState); + return value === true; +}; + + +/***/ }), + +/***/ 69325: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); + +class EntryDependency extends ModuleDependency { + /** + * @param {string} request request path for entry + */ + constructor(request) { + super(request); + } + + get type() { + return "entry"; + } + + get category() { + return "esm"; + } +} + +makeSerializable(EntryDependency, "webpack/lib/dependencies/EntryDependency"); + +module.exports = EntryDependency; + + +/***/ }), + +/***/ 37826: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { UsageState } = __webpack_require__(54227); +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * @param {ModuleGraph} moduleGraph the module graph + * @param {Module} module the module + * @param {string | null} exportName name of the export if any + * @param {string | null} property name of the requested property + * @param {RuntimeSpec} runtime for which runtime + * @returns {any} value of the property + */ +const getProperty = (moduleGraph, module, exportName, property, runtime) => { + if (!exportName) { + switch (property) { + case "usedExports": { + const usedExports = moduleGraph + .getExportsInfo(module) + .getUsedExports(runtime); + if ( + typeof usedExports === "boolean" || + usedExports === undefined || + usedExports === null + ) { + return usedExports; + } + return Array.from(usedExports).sort(); + } + } + } + switch (property) { + case "used": + return ( + moduleGraph.getExportsInfo(module).getUsed(exportName, runtime) !== + UsageState.Unused + ); + case "useInfo": { + const state = moduleGraph + .getExportsInfo(module) + .getUsed(exportName, runtime); + switch (state) { + case UsageState.Used: + case UsageState.OnlyPropertiesUsed: + return true; + case UsageState.Unused: + return false; + case UsageState.NoInfo: + return undefined; + case UsageState.Unknown: + return null; + default: + throw new Error(`Unexpected UsageState ${state}`); + } + } + case "provideInfo": + return moduleGraph.getExportsInfo(module).isExportProvided(exportName); + } + return undefined; +}; + +class ExportsInfoDependency extends NullDependency { + constructor(range, exportName, property) { + super(); + this.range = range; + this.exportName = exportName; + this.property = property; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + const { chunkGraph, runtime } = context; + const { moduleGraph } = chunkGraph; + const module = moduleGraph.getParentModule(this); + const value = getProperty( + moduleGraph, + module, + this.exportName, + this.property, + runtime + ); + hash.update(value === undefined ? "undefined" : JSON.stringify(value)); + } + + serialize(context) { + const { write } = context; + write(this.range); + write(this.exportName); + write(this.property); + super.serialize(context); + } + + static deserialize(context) { + const obj = new ExportsInfoDependency( + context.read(), + context.read(), + context.read() + ); + obj.deserialize(context); + return obj; + } +} + +makeSerializable( + ExportsInfoDependency, + "webpack/lib/dependencies/ExportsInfoDependency" +); + +ExportsInfoDependency.Template = class ExportsInfoDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, { module, moduleGraph, runtime }) { + const dep = /** @type {ExportsInfoDependency} */ (dependency); + + const value = getProperty( + moduleGraph, + module, + dep.exportName, + dep.property, + runtime + ); + source.replace( + dep.range[0], + dep.range[1] - 1, + value === undefined ? "undefined" : JSON.stringify(value) + ); + } +}; + +module.exports = ExportsInfoDependency; + + +/***/ }), + +/***/ 16546: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Template = __webpack_require__(90751); +const makeSerializable = __webpack_require__(55575); +const HarmonyImportDependency = __webpack_require__(289); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("./HarmonyAcceptImportDependency")} HarmonyAcceptImportDependency */ + +class HarmonyAcceptDependency extends NullDependency { + /** + * @param {[number, number]} range expression range + * @param {HarmonyAcceptImportDependency[]} dependencies import dependencies + * @param {boolean} hasCallback true, if the range wraps an existing callback + */ + constructor(range, dependencies, hasCallback) { + super(); + this.range = range; + this.dependencies = dependencies; + this.hasCallback = hasCallback; + } + + get type() { + return "accepted harmony modules"; + } + + serialize(context) { + const { write } = context; + write(this.range); + write(this.dependencies); + write(this.hasCallback); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.range = read(); + this.dependencies = read(); + this.hasCallback = read(); + super.deserialize(context); + } +} + +makeSerializable( + HarmonyAcceptDependency, + "webpack/lib/dependencies/HarmonyAcceptDependency" +); + +HarmonyAcceptDependency.Template = class HarmonyAcceptDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const dep = /** @type {HarmonyAcceptDependency} */ (dependency); + const { + module, + runtime, + runtimeRequirements, + runtimeTemplate, + moduleGraph, + chunkGraph + } = templateContext; + const content = dep.dependencies + .map(dependency => { + const referencedModule = moduleGraph.getModule(dependency); + return { + dependency, + runtimeCondition: referencedModule + ? HarmonyImportDependency.Template.getImportEmittedRuntime( + module, + referencedModule + ) + : false + }; + }) + .filter(({ runtimeCondition }) => runtimeCondition !== false) + .map(({ dependency, runtimeCondition }) => { + const condition = runtimeTemplate.runtimeConditionExpression({ + chunkGraph, + runtime, + runtimeCondition, + runtimeRequirements + }); + const s = dependency.getImportStatement(true, templateContext); + const code = s[0] + s[1]; + if (condition !== "true") { + return `if (${condition}) {\n${Template.indent(code)}\n}\n`; + } + return code; + }) + .join(""); + + if (dep.hasCallback) { + if (runtimeTemplate.supportsArrowFunction()) { + source.insert( + dep.range[0], + `__WEBPACK_OUTDATED_DEPENDENCIES__ => { ${content}(` + ); + source.insert(dep.range[1], ")(__WEBPACK_OUTDATED_DEPENDENCIES__); }"); + } else { + source.insert( + dep.range[0], + `function(__WEBPACK_OUTDATED_DEPENDENCIES__) { ${content}(` + ); + source.insert( + dep.range[1], + ")(__WEBPACK_OUTDATED_DEPENDENCIES__); }.bind(this)" + ); + } + return; + } + + const arrow = runtimeTemplate.supportsArrowFunction(); + source.insert( + dep.range[1] - 0.5, + `, ${arrow ? "() =>" : "function()"} { ${content} }` + ); + } +}; + +module.exports = HarmonyAcceptDependency; + + +/***/ }), + +/***/ 19966: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const HarmonyImportDependency = __webpack_require__(289); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class HarmonyAcceptImportDependency extends HarmonyImportDependency { + constructor(request) { + super(request, NaN); + this.weak = true; + } + + get type() { + return "harmony accept"; + } +} + +makeSerializable( + HarmonyAcceptImportDependency, + "webpack/lib/dependencies/HarmonyAcceptImportDependency" +); + +HarmonyAcceptImportDependency.Template = class HarmonyAcceptImportDependencyTemplate extends ( + HarmonyImportDependency.Template +) {}; + +module.exports = HarmonyAcceptImportDependency; + + +/***/ }), + +/***/ 52080: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { UsageState } = __webpack_require__(54227); +const InitFragment = __webpack_require__(63382); +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../Module")} Module */ + +class HarmonyCompatibilityDependency extends NullDependency { + get type() { + return "harmony export header"; + } +} + +makeSerializable( + HarmonyCompatibilityDependency, + "webpack/lib/dependencies/HarmonyCompatibilityDependency" +); + +HarmonyCompatibilityDependency.Template = class HarmonyExportDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { + module, + runtimeTemplate, + moduleGraph, + initFragments, + runtimeRequirements, + runtime, + concatenationScope + } + ) { + if (concatenationScope) return; + const exportsInfo = moduleGraph.getExportsInfo(module); + if ( + exportsInfo.getReadOnlyExportInfo("__esModule").getUsed(runtime) !== + UsageState.Unused + ) { + const content = runtimeTemplate.defineEsModuleFlagStatement({ + exportsArgument: module.exportsArgument, + runtimeRequirements + }); + initFragments.push( + new InitFragment( + content, + InitFragment.STAGE_HARMONY_EXPORTS, + 0, + "harmony compatibility" + ) + ); + } + if (moduleGraph.isAsync(module)) { + runtimeRequirements.add(RuntimeGlobals.module); + const used = exportsInfo.isUsed(runtime); + if (used) runtimeRequirements.add(RuntimeGlobals.exports); + initFragments.push( + new InitFragment( + `${module.moduleArgument}.exports = (async () => {\n`, + InitFragment.STAGE_ASYNC_BOUNDARY, + 0, + undefined, + used ? `\nreturn ${module.exportsArgument};\n})();` : "\n})();" + ) + ); + } + } +}; + +module.exports = HarmonyCompatibilityDependency; + + +/***/ }), + +/***/ 11850: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const DynamicExports = __webpack_require__(97093); +const HarmonyCompatibilityDependency = __webpack_require__(52080); +const HarmonyExports = __webpack_require__(79291); + +module.exports = class HarmonyDetectionParserPlugin { + constructor(options) { + const { topLevelAwait = false } = options || {}; + this.topLevelAwait = topLevelAwait; + } + + apply(parser) { + parser.hooks.program.tap("HarmonyDetectionParserPlugin", ast => { + const isStrictHarmony = parser.state.module.type === "javascript/esm"; + const isHarmony = + isStrictHarmony || + ast.body.some( + statement => + statement.type === "ImportDeclaration" || + statement.type === "ExportDefaultDeclaration" || + statement.type === "ExportNamedDeclaration" || + statement.type === "ExportAllDeclaration" + ); + if (isHarmony) { + const module = parser.state.module; + const compatDep = new HarmonyCompatibilityDependency(); + compatDep.loc = { + start: { + line: -1, + column: 0 + }, + end: { + line: -1, + column: 0 + }, + index: -3 + }; + module.addPresentationalDependency(compatDep); + DynamicExports.bailout(parser.state); + HarmonyExports.enable(parser.state, isStrictHarmony); + parser.scope.isStrict = true; + } + }); + + parser.hooks.topLevelAwait.tap("HarmonyDetectionParserPlugin", () => { + const module = parser.state.module; + if (!this.topLevelAwait) { + throw new Error( + "The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)" + ); + } + if (!HarmonyExports.isEnabled(parser.state)) { + throw new Error( + "Top-level-await is only supported in EcmaScript Modules" + ); + } + module.buildMeta.async = true; + }); + + const skipInHarmony = () => { + if (HarmonyExports.isEnabled(parser.state)) { + return true; + } + }; + + const nullInHarmony = () => { + if (HarmonyExports.isEnabled(parser.state)) { + return null; + } + }; + + const nonHarmonyIdentifiers = ["define", "exports"]; + for (const identifier of nonHarmonyIdentifiers) { + parser.hooks.evaluateTypeof + .for(identifier) + .tap("HarmonyDetectionParserPlugin", nullInHarmony); + parser.hooks.typeof + .for(identifier) + .tap("HarmonyDetectionParserPlugin", skipInHarmony); + parser.hooks.evaluate + .for(identifier) + .tap("HarmonyDetectionParserPlugin", nullInHarmony); + parser.hooks.expression + .for(identifier) + .tap("HarmonyDetectionParserPlugin", skipInHarmony); + parser.hooks.call + .for(identifier) + .tap("HarmonyDetectionParserPlugin", skipInHarmony); + } + } +}; + + +/***/ }), + +/***/ 97078: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const InnerGraph = __webpack_require__(76094); +const ConstDependency = __webpack_require__(9364); +const HarmonyExportExpressionDependency = __webpack_require__(47717); +const HarmonyExportHeaderDependency = __webpack_require__(69764); +const HarmonyExportImportedSpecifierDependency = __webpack_require__(61621); +const HarmonyExportSpecifierDependency = __webpack_require__(22867); +const { + harmonySpecifierTag +} = __webpack_require__(76426); +const HarmonyImportSideEffectDependency = __webpack_require__(98335); + +module.exports = class HarmonyExportDependencyParserPlugin { + constructor(options) { + const { module: moduleOptions } = options; + this.strictExportPresence = moduleOptions.strictExportPresence; + } + + apply(parser) { + parser.hooks.export.tap( + "HarmonyExportDependencyParserPlugin", + statement => { + const dep = new HarmonyExportHeaderDependency( + statement.declaration && statement.declaration.range, + statement.range + ); + dep.loc = Object.create(statement.loc); + dep.loc.index = -1; + parser.state.module.addPresentationalDependency(dep); + return true; + } + ); + parser.hooks.exportImport.tap( + "HarmonyExportDependencyParserPlugin", + (statement, source) => { + parser.state.lastHarmonyImportOrder = + (parser.state.lastHarmonyImportOrder || 0) + 1; + const clearDep = new ConstDependency("", statement.range); + clearDep.loc = Object.create(statement.loc); + clearDep.loc.index = -1; + parser.state.module.addPresentationalDependency(clearDep); + const sideEffectDep = new HarmonyImportSideEffectDependency( + source, + parser.state.lastHarmonyImportOrder + ); + sideEffectDep.loc = Object.create(statement.loc); + sideEffectDep.loc.index = -1; + parser.state.current.addDependency(sideEffectDep); + return true; + } + ); + parser.hooks.exportExpression.tap( + "HarmonyExportDependencyParserPlugin", + (statement, expr) => { + const isFunctionDeclaration = expr.type === "FunctionDeclaration"; + const comments = parser.getComments([ + statement.range[0], + expr.range[0] + ]); + const dep = new HarmonyExportExpressionDependency( + expr.range, + statement.range, + comments + .map(c => { + switch (c.type) { + case "Block": + return `/*${c.value}*/`; + case "Line": + return `//${c.value}\n`; + } + return ""; + }) + .join(""), + expr.type.endsWith("Declaration") && expr.id + ? expr.id.name + : isFunctionDeclaration + ? { + id: expr.id ? expr.id.name : undefined, + range: [ + expr.range[0], + expr.params.length > 0 + ? expr.params[0].range[0] + : expr.body.range[0] + ], + prefix: `${expr.async ? "async " : ""}function${ + expr.generator ? "*" : "" + } `, + suffix: `(${expr.params.length > 0 ? "" : ") "}` + } + : undefined + ); + dep.loc = Object.create(statement.loc); + dep.loc.index = -1; + parser.state.current.addDependency(dep); + InnerGraph.addVariableUsage( + parser, + expr.type.endsWith("Declaration") && expr.id + ? expr.id.name + : "*default*", + "default" + ); + return true; + } + ); + parser.hooks.exportSpecifier.tap( + "HarmonyExportDependencyParserPlugin", + (statement, id, name, idx) => { + const settings = parser.getTagData(id, harmonySpecifierTag); + let dep; + const harmonyNamedExports = (parser.state.harmonyNamedExports = + parser.state.harmonyNamedExports || new Set()); + harmonyNamedExports.add(name); + InnerGraph.addVariableUsage(parser, id, name); + if (settings) { + dep = new HarmonyExportImportedSpecifierDependency( + settings.source, + settings.sourceOrder, + settings.ids, + name, + harmonyNamedExports, + null, + this.strictExportPresence + ); + } else { + dep = new HarmonyExportSpecifierDependency(id, name); + } + dep.loc = Object.create(statement.loc); + dep.loc.index = idx; + parser.state.current.addDependency(dep); + return true; + } + ); + parser.hooks.exportImportSpecifier.tap( + "HarmonyExportDependencyParserPlugin", + (statement, source, id, name, idx) => { + const harmonyNamedExports = (parser.state.harmonyNamedExports = + parser.state.harmonyNamedExports || new Set()); + let harmonyStarExports = null; + if (name) { + harmonyNamedExports.add(name); + } else { + harmonyStarExports = parser.state.harmonyStarExports = + parser.state.harmonyStarExports || []; + } + const dep = new HarmonyExportImportedSpecifierDependency( + source, + parser.state.lastHarmonyImportOrder, + id ? [id] : [], + name, + harmonyNamedExports, + harmonyStarExports && harmonyStarExports.slice(), + this.strictExportPresence + ); + if (harmonyStarExports) { + harmonyStarExports.push(dep); + } + dep.loc = Object.create(statement.loc); + dep.loc.index = idx; + parser.state.current.addDependency(dep); + return true; + } + ); + } +}; + + +/***/ }), + +/***/ 47717: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ConcatenationScope = __webpack_require__(21926); +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const HarmonyExportInitFragment = __webpack_require__(77418); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ + +class HarmonyExportExpressionDependency extends NullDependency { + constructor(range, rangeStatement, prefix, declarationId) { + super(); + this.range = range; + this.rangeStatement = rangeStatement; + this.prefix = prefix; + this.declarationId = declarationId; + } + + get type() { + return "harmony export expression"; + } + + /** + * Returns the exported names + * @param {ModuleGraph} moduleGraph module graph + * @returns {ExportsSpec | undefined} export names + */ + getExports(moduleGraph) { + return { + exports: ["default"], + terminalBinding: true, + dependencies: undefined + }; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this dependency connects the module to referencing modules + */ + getModuleEvaluationSideEffectsState(moduleGraph) { + // The expression/declaration is already covered by SideEffectsFlagPlugin + return false; + } + + serialize(context) { + const { write } = context; + write(this.range); + write(this.rangeStatement); + write(this.prefix); + write(this.declarationId); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.range = read(); + this.rangeStatement = read(); + this.prefix = read(); + this.declarationId = read(); + super.deserialize(context); + } +} + +makeSerializable( + HarmonyExportExpressionDependency, + "webpack/lib/dependencies/HarmonyExportExpressionDependency" +); + +HarmonyExportExpressionDependency.Template = class HarmonyExportDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { + module, + moduleGraph, + runtimeTemplate, + runtimeRequirements, + initFragments, + runtime, + concatenationScope + } + ) { + const dep = /** @type {HarmonyExportExpressionDependency} */ (dependency); + const { declarationId } = dep; + const exportsName = module.exportsArgument; + if (declarationId) { + let name; + if (typeof declarationId === "string") { + name = declarationId; + } else { + name = ConcatenationScope.DEFAULT_EXPORT; + source.replace( + declarationId.range[0], + declarationId.range[1] - 1, + `${declarationId.prefix}${name}${declarationId.suffix}` + ); + } + + if (concatenationScope) { + concatenationScope.registerExport("default", name); + } else { + const used = moduleGraph + .getExportsInfo(module) + .getUsedName("default", runtime); + if (used) { + const map = new Map(); + map.set(used, `/* export default binding */ ${name}`); + initFragments.push(new HarmonyExportInitFragment(exportsName, map)); + } + } + + source.replace( + dep.rangeStatement[0], + dep.range[0] - 1, + `/* harmony default export */ ${dep.prefix}` + ); + } else { + let content; + const name = ConcatenationScope.DEFAULT_EXPORT; + if (runtimeTemplate.supportsConst()) { + content = `/* harmony default export */ const ${name} = `; + if (concatenationScope) { + concatenationScope.registerExport("default", name); + } else { + const used = moduleGraph + .getExportsInfo(module) + .getUsedName("default", runtime); + if (used) { + runtimeRequirements.add(RuntimeGlobals.exports); + const map = new Map(); + map.set(used, name); + initFragments.push(new HarmonyExportInitFragment(exportsName, map)); + } else { + content = `/* unused harmony default export */ var ${name} = `; + } + } + } else if (concatenationScope) { + content = `/* harmony default export */ var ${name} = `; + concatenationScope.registerExport("default", name); + } else { + const used = moduleGraph + .getExportsInfo(module) + .getUsedName("default", runtime); + if (used) { + runtimeRequirements.add(RuntimeGlobals.exports); + // This is a little bit incorrect as TDZ is not correct, but we can't use const. + content = `/* harmony default export */ ${exportsName}[${JSON.stringify( + used + )}] = `; + } else { + content = `/* unused harmony default export */ var ${name} = `; + } + } + + if (dep.range) { + source.replace( + dep.rangeStatement[0], + dep.range[0] - 1, + content + "(" + dep.prefix + ); + source.replace(dep.range[1], dep.rangeStatement[1] - 0.5, ");"); + return; + } + + source.replace(dep.rangeStatement[0], dep.rangeStatement[1] - 1, content); + } + } +}; + +module.exports = HarmonyExportExpressionDependency; + + +/***/ }), + +/***/ 69764: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class HarmonyExportHeaderDependency extends NullDependency { + constructor(range, rangeStatement) { + super(); + this.range = range; + this.rangeStatement = rangeStatement; + } + + get type() { + return "harmony export header"; + } + + serialize(context) { + const { write } = context; + write(this.range); + write(this.rangeStatement); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.range = read(); + this.rangeStatement = read(); + super.deserialize(context); + } +} + +makeSerializable( + HarmonyExportHeaderDependency, + "webpack/lib/dependencies/HarmonyExportHeaderDependency" +); + +HarmonyExportHeaderDependency.Template = class HarmonyExportDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const dep = /** @type {HarmonyExportHeaderDependency} */ (dependency); + const content = ""; + const replaceUntil = dep.range + ? dep.range[0] - 1 + : dep.rangeStatement[1] - 1; + source.replace(dep.rangeStatement[0], replaceUntil, content); + } +}; + +module.exports = HarmonyExportHeaderDependency; + + +/***/ }), + +/***/ 61621: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const { UsageState } = __webpack_require__(54227); +const HarmonyLinkingError = __webpack_require__(73474); +const InitFragment = __webpack_require__(63382); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const makeSerializable = __webpack_require__(55575); +const propertyAccess = __webpack_require__(44682); +const HarmonyExportInitFragment = __webpack_require__(77418); +const HarmonyImportDependency = __webpack_require__(289); +const processExportInfo = __webpack_require__(1837); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ExportsInfo")} ExportsInfo */ +/** @typedef {import("../ExportsInfo").ExportInfo} ExportInfo */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ +/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +/** @typedef {"missing"|"unused"|"empty-star"|"reexport-dynamic-default"|"reexport-named-default"|"reexport-namespace-object"|"reexport-fake-namespace-object"|"reexport-undefined"|"normal-reexport"|"dynamic-reexport"} ExportModeType */ + +const idsSymbol = Symbol("HarmonyExportImportedSpecifierDependency.ids"); + +class NormalReexportItem { + /** + * @param {string} name export name + * @param {string[]} ids reexported ids from other module + * @param {ExportInfo=} exportInfo export info from other module + * @param {boolean=} checked true, if it should be checked at runtime if this export exists + */ + constructor(name, ids, exportInfo, checked) { + this.name = name; + this.ids = ids; + this.exportInfo = exportInfo; + this.checked = checked; + } +} + +class ExportMode { + /** + * @param {ExportModeType} type type of the mode + */ + constructor(type) { + /** @type {ExportModeType} */ + this.type = type; + + // for "normal-reexport": + /** @type {NormalReexportItem[] | null} */ + this.items = null; + + // for "reexport-named-default" | "reexport-fake-namespace-object" | "reexport-namespace-object" + /** @type {string|null} */ + this.name = null; + /** @type {ExportInfo | null} */ + this.partialNamespaceExportInfo = null; + + // for "dynamic-reexport": + /** @type {Set | null} */ + this.ignored = null; + + // for "missing": + /** @type {string | null} */ + this.userRequest = null; + + // for "reexport-fake-namespace-object": + /** @type {number} */ + this.fakeType = 0; + } +} + +class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency { + /** + * @param {string} request the request string + * @param {number} sourceOrder the order in the original source file + * @param {string[]} ids the requested export name of the imported module + * @param {string | null} name the export name of for this module + * @param {Set} activeExports other named exports in the module + * @param {Iterable} otherStarExports other star exports in the module + * @param {boolean} strictExportPresence when true, missing exports in the imported module lead to errors instead of warnings + */ + constructor( + request, + sourceOrder, + ids, + name, + activeExports, + otherStarExports, + strictExportPresence + ) { + super(request, sourceOrder); + + this.ids = ids; + this.name = name; + this.activeExports = activeExports; + this.otherStarExports = otherStarExports; + this.strictExportPresence = strictExportPresence; + } + + // TODO webpack 6 remove + get id() { + throw new Error("id was renamed to ids and type changed to string[]"); + } + + // TODO webpack 6 remove + getId() { + throw new Error("id was renamed to ids and type changed to string[]"); + } + + // TODO webpack 6 remove + setId() { + throw new Error("id was renamed to ids and type changed to string[]"); + } + + get type() { + return "harmony export imported specifier"; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {string[]} the imported id + */ + getIds(moduleGraph) { + return moduleGraph.getMeta(this)[idsSymbol] || this.ids; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {string[]} ids the imported ids + * @returns {void} + */ + setIds(moduleGraph, ids) { + moduleGraph.getMeta(this)[idsSymbol] = ids; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {RuntimeSpec} runtime the runtime + * @returns {ExportMode} the export mode + */ + getMode(moduleGraph, runtime) { + const name = this.name; + const ids = this.getIds(moduleGraph); + const parentModule = moduleGraph.getParentModule(this); + const importedModule = moduleGraph.getModule(this); + const exportsInfo = moduleGraph.getExportsInfo(parentModule); + + if (!importedModule) { + const mode = new ExportMode("missing"); + + mode.userRequest = this.userRequest; + + return mode; + } + + if ( + name + ? exportsInfo.getUsed(name, runtime) === UsageState.Unused + : exportsInfo.isUsed(runtime) === false + ) { + const mode = new ExportMode("unused"); + + mode.name = name || "*"; + + return mode; + } + + const importedExportsType = importedModule.getExportsType( + moduleGraph, + parentModule.buildMeta.strictHarmonyModule + ); + + // Special handling for reexporting the default export + // from non-namespace modules + if (name && ids.length > 0 && ids[0] === "default") { + switch (importedExportsType) { + case "dynamic": { + const mode = new ExportMode("reexport-dynamic-default"); + + mode.name = name; + + return mode; + } + case "default-only": + case "default-with-named": { + const exportInfo = exportsInfo.getReadOnlyExportInfo(name); + const mode = new ExportMode("reexport-named-default"); + + mode.name = name; + mode.partialNamespaceExportInfo = exportInfo; + + return mode; + } + } + } + + // reexporting with a fixed name + if (name) { + let mode; + const exportInfo = exportsInfo.getReadOnlyExportInfo(name); + + if (ids.length > 0) { + // export { name as name } + switch (importedExportsType) { + case "default-only": + mode = new ExportMode("reexport-undefined"); + mode.name = name; + break; + default: + mode = new ExportMode("normal-reexport"); + mode.items = [new NormalReexportItem(name, ids, exportInfo, false)]; + break; + } + } else { + // export * as name + switch (importedExportsType) { + case "default-only": + mode = new ExportMode("reexport-fake-namespace-object"); + mode.name = name; + mode.partialNamespaceExportInfo = exportInfo; + mode.fakeType = 0; + break; + case "default-with-named": + mode = new ExportMode("reexport-fake-namespace-object"); + mode.name = name; + mode.partialNamespaceExportInfo = exportInfo; + mode.fakeType = 2; + break; + case "dynamic": + default: + mode = new ExportMode("reexport-namespace-object"); + mode.name = name; + mode.partialNamespaceExportInfo = exportInfo; + } + } + + return mode; + } + + // Star reexporting + + const { ignoredExports, exports, checked } = this.getStarReexports( + moduleGraph, + runtime, + exportsInfo, + importedModule + ); + if (!exports) { + // We have too few info about the modules + // Delegate the logic to the runtime code + + const mode = new ExportMode("dynamic-reexport"); + mode.ignored = ignoredExports; + + return mode; + } + + if (exports.size === 0) { + const mode = new ExportMode("empty-star"); + + return mode; + } + + const mode = new ExportMode("normal-reexport"); + + mode.items = Array.from( + exports, + exportName => + new NormalReexportItem( + exportName, + [exportName], + exportsInfo.getReadOnlyExportInfo(exportName), + checked.has(exportName) + ) + ); + + return mode; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {RuntimeSpec} runtime the runtime + * @param {ExportsInfo} exportsInfo exports info about the current module (optional) + * @param {Module} importedModule the imported module (optional) + * @returns {{exports?: Set, checked?: Set, ignoredExports: Set}} information + */ + getStarReexports( + moduleGraph, + runtime, + exportsInfo = moduleGraph.getExportsInfo(moduleGraph.getParentModule(this)), + importedModule = moduleGraph.getModule(this) + ) { + const importedExportsInfo = moduleGraph.getExportsInfo(importedModule); + + const noExtraExports = + importedExportsInfo.otherExportsInfo.provided === false; + const noExtraImports = + exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused; + + const ignoredExports = new Set([ + "default", + ...this.activeExports, + ...this._discoverActiveExportsFromOtherStarExports(moduleGraph).keys() + ]); + + if (!noExtraExports && !noExtraImports) { + return { + ignoredExports + }; + } + + /** @type {Set} */ + const exports = new Set(); + /** @type {Set} */ + const checked = new Set(); + + if (noExtraImports) { + for (const exportInfo of exportsInfo.orderedExports) { + const name = exportInfo.name; + if (ignoredExports.has(name)) continue; + if (exportInfo.getUsed(runtime) === UsageState.Unused) continue; + const importedExportInfo = importedExportsInfo.getReadOnlyExportInfo( + name + ); + if (importedExportInfo.provided === false) continue; + exports.add(name); + if (importedExportInfo.provided === true) continue; + checked.add(name); + } + } else if (noExtraExports) { + for (const importedExportInfo of importedExportsInfo.orderedExports) { + const name = importedExportInfo.name; + if (ignoredExports.has(name)) continue; + if (importedExportInfo.provided === false) continue; + const exportInfo = exportsInfo.getReadOnlyExportInfo(name); + if (exportInfo.getUsed(runtime) === UsageState.Unused) continue; + exports.add(name); + if (importedExportInfo.provided === true) continue; + checked.add(name); + } + } + + return { ignoredExports, exports, checked }; + } + + /** + * @param {ModuleGraph} moduleGraph module graph + * @returns {function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active + */ + getCondition(moduleGraph) { + return (connection, runtime) => { + const mode = this.getMode(moduleGraph, runtime); + return mode.type !== "unused" && mode.type !== "empty-star"; + }; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this dependency connects the module to referencing modules + */ + getModuleEvaluationSideEffectsState(moduleGraph) { + return false; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + const mode = this.getMode(moduleGraph, runtime); + + switch (mode.type) { + case "missing": + case "unused": + case "empty-star": + case "reexport-undefined": + return Dependency.NO_EXPORTS_REFERENCED; + + case "reexport-dynamic-default": + return Dependency.EXPORTS_OBJECT_REFERENCED; + + case "reexport-named-default": { + if (!mode.partialNamespaceExportInfo) + return Dependency.EXPORTS_OBJECT_REFERENCED; + /** @type {string[][]} */ + const referencedExports = []; + processExportInfo( + runtime, + referencedExports, + [], + /** @type {ExportInfo} */ (mode.partialNamespaceExportInfo) + ); + return referencedExports; + } + + case "reexport-namespace-object": + case "reexport-fake-namespace-object": { + if (!mode.partialNamespaceExportInfo) + return Dependency.EXPORTS_OBJECT_REFERENCED; + /** @type {string[][]} */ + const referencedExports = []; + processExportInfo( + runtime, + referencedExports, + [], + /** @type {ExportInfo} */ (mode.partialNamespaceExportInfo), + mode.type === "reexport-fake-namespace-object" + ); + return referencedExports; + } + + case "dynamic-reexport": + return Dependency.EXPORTS_OBJECT_REFERENCED; + + case "normal-reexport": { + const referencedExports = []; + for (const { ids, exportInfo } of mode.items) { + processExportInfo(runtime, referencedExports, ids, exportInfo, false); + } + return referencedExports; + } + + default: + throw new Error(`Unknown mode ${mode.type}`); + } + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {Map} exported names and their origin dependency + */ + _discoverActiveExportsFromOtherStarExports(moduleGraph) { + if (!this.otherStarExports) { + return new Map(); + } + + const result = new Map(); + // try to learn impossible exports from other star exports with provided exports + for (const otherStarExport of this.otherStarExports) { + const otherImportedModule = moduleGraph.getModule(otherStarExport); + if (otherImportedModule) { + const exportsInfo = moduleGraph.getExportsInfo(otherImportedModule); + for (const exportInfo of exportsInfo.exports) { + if (exportInfo.provided === true && !result.has(exportInfo.name)) { + result.set(exportInfo.name, otherStarExport); + } + } + } + } + + return result; + } + + /** + * Returns the exported names + * @param {ModuleGraph} moduleGraph module graph + * @returns {ExportsSpec | undefined} export names + */ + getExports(moduleGraph) { + const mode = this.getMode(moduleGraph, undefined); + + switch (mode.type) { + case "missing": + return undefined; + case "dynamic-reexport": { + const from = moduleGraph.getConnection(this); + return { + exports: true, + from, + canMangle: false, + excludeExports: mode.ignored, + dependencies: [from.module] + }; + } + case "empty-star": + return { + exports: [], + dependencies: [moduleGraph.getModule(this)] + }; + case "normal-reexport": { + const from = moduleGraph.getConnection(this); + return { + exports: Array.from(mode.items, item => ({ + name: item.name, + from, + export: item.ids + })), + dependencies: [from.module] + }; + } + case "reexport-dynamic-default": { + { + const from = moduleGraph.getConnection(this); + return { + exports: [ + { + name: mode.name, + from, + export: ["default"] + } + ], + dependencies: [from.module] + }; + } + } + case "reexport-undefined": + return { + exports: [mode.name], + dependencies: [moduleGraph.getModule(this)] + }; + case "reexport-fake-namespace-object": { + const from = moduleGraph.getConnection(this); + return { + exports: [ + { + name: mode.name, + from, + export: null, + exports: [ + { + name: "default", + canMangle: false, + from, + export: null + } + ] + } + ], + dependencies: [from.module] + }; + } + case "reexport-namespace-object": { + const from = moduleGraph.getConnection(this); + return { + exports: [ + { + name: mode.name, + from, + export: null + } + ], + dependencies: [from.module] + }; + } + case "reexport-named-default": { + const from = moduleGraph.getConnection(this); + return { + exports: [ + { + name: mode.name, + from, + export: ["default"] + } + ], + dependencies: [from.module] + }; + } + default: + throw new Error(`Unknown mode ${mode.type}`); + } + } + + /** + * Returns warnings + * @param {ModuleGraph} moduleGraph module graph + * @returns {WebpackError[]} warnings + */ + getWarnings(moduleGraph) { + if ( + this.strictExportPresence || + moduleGraph.getParentModule(this).buildMeta.strictHarmonyModule + ) { + return null; + } + + return this._getErrors(moduleGraph); + } + + /** + * Returns errors + * @param {ModuleGraph} moduleGraph module graph + * @returns {WebpackError[]} errors + */ + getErrors(moduleGraph) { + if ( + this.strictExportPresence || + moduleGraph.getParentModule(this).buildMeta.strictHarmonyModule + ) { + return this._getErrors(moduleGraph); + } + + return null; + } + + /** + * @param {ModuleGraph} moduleGraph module graph + * @returns {WebpackError[] | undefined} errors + */ + _getErrors(moduleGraph) { + const ids = this.getIds(moduleGraph); + let errors = this.getLinkingErrors( + moduleGraph, + ids, + `(reexported as '${this.name}')` + ); + if (ids.length === 0 && this.name === null) { + const potentialConflicts = this._discoverActiveExportsFromOtherStarExports( + moduleGraph + ); + if (potentialConflicts.size > 0) { + const importedModule = moduleGraph.getModule(this); + if (importedModule) { + const exportsInfo = moduleGraph.getExportsInfo(importedModule); + const conflicts = new Map(); + for (const exportInfo of exportsInfo.orderedExports) { + if (exportInfo.provided !== true) continue; + if (exportInfo.name === "default") continue; + if (this.activeExports.has(exportInfo.name)) continue; + const conflictingDependency = potentialConflicts.get( + exportInfo.name + ); + if (!conflictingDependency) continue; + const target = exportInfo.getTerminalBinding(moduleGraph); + if (!target) continue; + const conflictingModule = moduleGraph.getModule( + conflictingDependency + ); + if (conflictingModule === importedModule) continue; + const conflictingExportInfo = moduleGraph.getExportInfo( + conflictingModule, + exportInfo.name + ); + const conflictingTarget = conflictingExportInfo.getTerminalBinding( + moduleGraph + ); + if (!conflictingTarget) continue; + if (target === conflictingTarget) continue; + const list = conflicts.get(conflictingDependency.request); + if (list === undefined) { + conflicts.set(conflictingDependency.request, [exportInfo.name]); + } else { + list.push(exportInfo.name); + } + } + for (const [request, exports] of conflicts) { + if (!errors) errors = []; + errors.push( + new HarmonyLinkingError( + `The requested module '${ + this.request + }' contains conflicting star exports for the ${ + exports.length > 1 ? "names" : "name" + } ${exports + .map(e => `'${e}'`) + .join(", ")} with the previous requested module '${request}'` + ) + ); + } + } + } + } + return errors; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + const { chunkGraph, runtime } = context; + super.updateHash(hash, context); + + const mode = this.getMode(chunkGraph.moduleGraph, runtime); + + hash.update(mode.type); + if (mode.items) { + for (const item of mode.items) { + hash.update(item.name); + hash.update(item.ids.join()); + if (item.checked) hash.update("checked"); + } + } + if (mode.ignored) { + hash.update("ignored"); + for (const k of mode.ignored) { + hash.update(k); + } + } + hash.update(mode.name || ""); + } + + serialize(context) { + const { write } = context; + + write(this.ids); + write(this.name); + write(this.activeExports); + write(this.otherStarExports); + write(this.strictExportPresence); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.ids = read(); + this.name = read(); + this.activeExports = read(); + this.otherStarExports = read(); + this.strictExportPresence = read(); + + super.deserialize(context); + } +} + +makeSerializable( + HarmonyExportImportedSpecifierDependency, + "webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency" +); + +module.exports = HarmonyExportImportedSpecifierDependency; + +HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedSpecifierDependencyTemplate extends ( + HarmonyImportDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const { moduleGraph, runtime, concatenationScope } = templateContext; + + const dep = /** @type {HarmonyExportImportedSpecifierDependency} */ (dependency); + + const mode = dep.getMode(moduleGraph, runtime); + + if (concatenationScope) { + switch (mode.type) { + case "reexport-undefined": + concatenationScope.registerRawExport( + mode.name, + "/* reexport non-default export from non-harmony */ undefined" + ); + } + return; + } + + if (mode.type !== "unused" && mode.type !== "empty-star") { + super.apply(dependency, source, templateContext); + + this._addExportFragments( + templateContext.initFragments, + dep, + mode, + templateContext.module, + moduleGraph, + runtime, + templateContext.runtimeTemplate, + templateContext.runtimeRequirements + ); + } + } + + /** + * @param {InitFragment[]} initFragments target array for init fragments + * @param {HarmonyExportImportedSpecifierDependency} dep dependency + * @param {ExportMode} mode the export mode + * @param {Module} module the current module + * @param {ModuleGraph} moduleGraph the module graph + * @param {RuntimeSpec} runtime the runtime + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {Set} runtimeRequirements runtime requirements + * @returns {void} + */ + _addExportFragments( + initFragments, + dep, + mode, + module, + moduleGraph, + runtime, + runtimeTemplate, + runtimeRequirements + ) { + const importedModule = moduleGraph.getModule(dep); + const importVar = dep.getImportVar(moduleGraph); + + switch (mode.type) { + case "missing": + case "empty-star": + initFragments.push( + new InitFragment( + "/* empty/unused harmony star reexport */\n", + InitFragment.STAGE_HARMONY_EXPORTS, + 1 + ) + ); + break; + + case "unused": + initFragments.push( + new InitFragment( + `${Template.toNormalComment( + `unused harmony reexport ${mode.name}` + )}\n`, + InitFragment.STAGE_HARMONY_EXPORTS, + 1 + ) + ); + break; + + case "reexport-dynamic-default": + initFragments.push( + this.getReexportFragment( + module, + "reexport default from dynamic", + moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), + importVar, + null, + runtimeRequirements + ) + ); + break; + + case "reexport-fake-namespace-object": + initFragments.push( + ...this.getReexportFakeNamespaceObjectFragments( + module, + moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), + importVar, + mode.fakeType, + runtimeRequirements + ) + ); + break; + + case "reexport-undefined": + initFragments.push( + this.getReexportFragment( + module, + "reexport non-default export from non-harmony", + moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), + "undefined", + "", + runtimeRequirements + ) + ); + break; + + case "reexport-named-default": + initFragments.push( + this.getReexportFragment( + module, + "reexport default export from named module", + moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), + importVar, + "", + runtimeRequirements + ) + ); + break; + + case "reexport-namespace-object": + initFragments.push( + this.getReexportFragment( + module, + "reexport module object", + moduleGraph.getExportsInfo(module).getUsedName(mode.name, runtime), + importVar, + "", + runtimeRequirements + ) + ); + break; + + case "normal-reexport": + for (const { name, ids, checked } of mode.items) { + if (checked) { + initFragments.push( + new InitFragment( + "/* harmony reexport (checked) */ " + + this.getConditionalReexportStatement( + module, + name, + importVar, + ids, + runtimeRequirements + ), + InitFragment.STAGE_HARMONY_IMPORTS, + dep.sourceOrder + ) + ); + } else { + initFragments.push( + this.getReexportFragment( + module, + "reexport safe", + moduleGraph.getExportsInfo(module).getUsedName(name, runtime), + importVar, + moduleGraph + .getExportsInfo(importedModule) + .getUsedName(ids, runtime), + runtimeRequirements + ) + ); + } + } + break; + + case "dynamic-reexport": { + const ignored = mode.ignored; + const modern = + runtimeTemplate.supportsConst() && + runtimeTemplate.supportsArrowFunction(); + let content = + "/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};\n" + + `/* harmony reexport (unknown) */ for(${ + modern ? "const" : "var" + } __WEBPACK_IMPORT_KEY__ in ${importVar}) `; + + // Filter out exports which are defined by other exports + // and filter out default export because it cannot be reexported with * + if (ignored.size > 1) { + content += + "if(" + + JSON.stringify(Array.from(ignored)) + + ".indexOf(__WEBPACK_IMPORT_KEY__) < 0) "; + } else if (ignored.size === 1) { + content += `if(__WEBPACK_IMPORT_KEY__ !== ${JSON.stringify( + ignored.values().next().value + )}) `; + } + + content += `__WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = `; + if (modern) { + content += `() => ${importVar}[__WEBPACK_IMPORT_KEY__]`; + } else { + content += `function(key) { return ${importVar}[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)`; + } + + runtimeRequirements.add(RuntimeGlobals.exports); + runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); + + const exportsName = module.exportsArgument; + initFragments.push( + new InitFragment( + `${content}\n/* harmony reexport (unknown) */ ${RuntimeGlobals.definePropertyGetters}(${exportsName}, __WEBPACK_REEXPORT_OBJECT__);\n`, + InitFragment.STAGE_HARMONY_IMPORTS, + dep.sourceOrder + ) + ); + break; + } + + default: + throw new Error(`Unknown mode ${mode.type}`); + } + } + + getReexportFragment( + module, + comment, + key, + name, + valueKey, + runtimeRequirements + ) { + const returnValue = this.getReturnValue(name, valueKey); + + runtimeRequirements.add(RuntimeGlobals.exports); + runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); + + const map = new Map(); + map.set(key, `/* ${comment} */ ${returnValue}`); + + return new HarmonyExportInitFragment(module.exportsArgument, map); + } + + getReexportFakeNamespaceObjectFragments( + module, + key, + name, + fakeType, + runtimeRequirements + ) { + runtimeRequirements.add(RuntimeGlobals.exports); + runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); + runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); + + const map = new Map(); + map.set( + key, + `/* reexport fake namespace object from non-harmony */ ${name}_namespace_cache || (${name}_namespace_cache = ${ + RuntimeGlobals.createFakeNamespaceObject + }(${name}${fakeType ? `, ${fakeType}` : ""}))` + ); + + return [ + new InitFragment( + `var ${name}_namespace_cache;\n`, + InitFragment.STAGE_CONSTANTS, + -1, + `${name}_namespace_cache` + ), + new HarmonyExportInitFragment(module.exportsArgument, map) + ]; + } + + getConditionalReexportStatement( + module, + key, + name, + valueKey, + runtimeRequirements + ) { + if (valueKey === false) { + return "/* unused export */\n"; + } + + const exportsName = module.exportsArgument; + const returnValue = this.getReturnValue(name, valueKey); + + runtimeRequirements.add(RuntimeGlobals.exports); + runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); + runtimeRequirements.add(RuntimeGlobals.hasOwnProperty); + + return `if(${RuntimeGlobals.hasOwnProperty}(${name}, ${JSON.stringify( + valueKey[0] + )})) ${ + RuntimeGlobals.definePropertyGetters + }(${exportsName}, { ${JSON.stringify( + key + )}: function() { return ${returnValue}; } });\n`; + } + + getReturnValue(name, valueKey) { + if (valueKey === null) { + return `${name}_default.a`; + } + + if (valueKey === "") { + return name; + } + + if (valueKey === false) { + return "/* unused export */ undefined"; + } + + return `${name}${propertyAccess(valueKey)}`; + } +}; + + +/***/ }), + +/***/ 77418: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const InitFragment = __webpack_require__(63382); +const RuntimeGlobals = __webpack_require__(48801); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Generator").GenerateContext} GenerateContext */ + +const joinIterableWithComma = iterable => { + // This is more performant than Array.from().join(", ") + // as it doesn't create an array + let str = ""; + let first = true; + for (const item of iterable) { + if (first) { + first = false; + } else { + str += ", "; + } + str += item; + } + return str; +}; + +const EMPTY_MAP = new Map(); +const EMPTY_SET = new Set(); + +class HarmonyExportInitFragment extends InitFragment { + /** + * @param {string} exportsArgument the exports identifier + * @param {Map} exportMap mapping from used name to exposed variable name + * @param {Set} unusedExports list of unused export names + */ + constructor( + exportsArgument, + exportMap = EMPTY_MAP, + unusedExports = EMPTY_SET + ) { + super(undefined, InitFragment.STAGE_HARMONY_EXPORTS, 1, "harmony-exports"); + this.exportsArgument = exportsArgument; + this.exportMap = exportMap; + this.unusedExports = unusedExports; + } + + merge(other) { + let exportMap; + if (this.exportMap.size === 0) { + exportMap = other.exportMap; + } else if (other.exportMap.size === 0) { + exportMap = this.exportMap; + } else { + exportMap = new Map(other.exportMap); + for (const [key, value] of this.exportMap) { + if (!exportMap.has(key)) exportMap.set(key, value); + } + } + let unusedExports; + if (this.unusedExports.size === 0) { + unusedExports = other.unusedExports; + } else if (other.unusedExports.size === 0) { + unusedExports = this.unusedExports; + } else { + unusedExports = new Set(other.unusedExports); + for (const value of this.unusedExports) { + unusedExports.add(value); + } + } + return new HarmonyExportInitFragment( + this.exportsArgument, + exportMap, + unusedExports + ); + } + + /** + * @param {GenerateContext} generateContext context for generate + * @returns {string|Source} the source code that will be included as initialization code + */ + getContent({ runtimeTemplate, runtimeRequirements }) { + runtimeRequirements.add(RuntimeGlobals.exports); + runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); + + const unusedPart = + this.unusedExports.size > 1 + ? `/* unused harmony exports ${joinIterableWithComma( + this.unusedExports + )} */\n` + : this.unusedExports.size > 0 + ? `/* unused harmony export ${ + this.unusedExports.values().next().value + } */\n` + : ""; + const definitions = []; + for (const [key, value] of this.exportMap) { + definitions.push( + `\n/* harmony export */ ${JSON.stringify( + key + )}: ${runtimeTemplate.returningFunction(value)}` + ); + } + const definePart = + this.exportMap.size > 0 + ? `/* harmony export */ ${RuntimeGlobals.definePropertyGetters}(${ + this.exportsArgument + }, {${definitions.join(",")}\n/* harmony export */ });\n` + : ""; + return `${definePart}${unusedPart}`; + } +} + +module.exports = HarmonyExportInitFragment; + + +/***/ }), + +/***/ 22867: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const HarmonyExportInitFragment = __webpack_require__(77418); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ + +class HarmonyExportSpecifierDependency extends NullDependency { + constructor(id, name) { + super(); + this.id = id; + this.name = name; + } + + get type() { + return "harmony export specifier"; + } + + /** + * Returns the exported names + * @param {ModuleGraph} moduleGraph module graph + * @returns {ExportsSpec | undefined} export names + */ + getExports(moduleGraph) { + return { + exports: [this.name], + terminalBinding: true, + dependencies: undefined + }; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this dependency connects the module to referencing modules + */ + getModuleEvaluationSideEffectsState(moduleGraph) { + return false; + } + + serialize(context) { + const { write } = context; + write(this.id); + write(this.name); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.id = read(); + this.name = read(); + super.deserialize(context); + } +} + +makeSerializable( + HarmonyExportSpecifierDependency, + "webpack/lib/dependencies/HarmonyExportSpecifierDependency" +); + +HarmonyExportSpecifierDependency.Template = class HarmonyExportSpecifierDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { module, moduleGraph, initFragments, runtime, concatenationScope } + ) { + const dep = /** @type {HarmonyExportSpecifierDependency} */ (dependency); + if (concatenationScope) { + concatenationScope.registerExport(dep.name, dep.id); + return; + } + const used = moduleGraph + .getExportsInfo(module) + .getUsedName(dep.name, runtime); + if (!used) { + const set = new Set(); + set.add(dep.name || "namespace"); + initFragments.push( + new HarmonyExportInitFragment(module.exportsArgument, undefined, set) + ); + return; + } + + const map = new Map(); + map.set(used, `/* binding */ ${dep.id}`); + initFragments.push( + new HarmonyExportInitFragment(module.exportsArgument, map, undefined) + ); + } +}; + +module.exports = HarmonyExportSpecifierDependency; + + +/***/ }), + +/***/ 79291: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../Parser").ParserState} ParserState */ + +/** @type {WeakMap} */ +const parserStateExportsState = new WeakMap(); + +/** + * @param {ParserState} parserState parser state + * @param {boolean} isStrictHarmony strict harmony mode should be enabled + * @returns {void} + */ +exports.enable = (parserState, isStrictHarmony) => { + const value = parserStateExportsState.get(parserState); + if (value === false) return; + parserStateExportsState.set(parserState, true); + if (value !== true) { + parserState.module.buildMeta.exportsType = "namespace"; + parserState.module.buildInfo.strict = true; + parserState.module.buildInfo.exportsArgument = "__webpack_exports__"; + if (isStrictHarmony) { + parserState.module.buildMeta.strictHarmonyModule = true; + parserState.module.buildInfo.moduleArgument = "__webpack_module__"; + } + } +}; + +/** + * @param {ParserState} parserState parser state + * @returns {boolean} true, when enabled + */ +exports.isEnabled = parserState => { + const value = parserStateExportsState.get(parserState); + return value === true; +}; + + +/***/ }), + +/***/ 289: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ConditionalInitFragment = __webpack_require__(19089); +const Dependency = __webpack_require__(27563); +const HarmonyLinkingError = __webpack_require__(73474); +const InitFragment = __webpack_require__(63382); +const Template = __webpack_require__(90751); +const AwaitDependenciesInitFragment = __webpack_require__(9428); +const { filterRuntime, mergeRuntime } = __webpack_require__(43478); +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class HarmonyImportDependency extends ModuleDependency { + /** + * + * @param {string} request request string + * @param {number} sourceOrder source order + */ + constructor(request, sourceOrder) { + super(request); + this.sourceOrder = sourceOrder; + } + + get category() { + return "esm"; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + return Dependency.NO_EXPORTS_REFERENCED; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {string} name of the variable for the import + */ + getImportVar(moduleGraph) { + const module = moduleGraph.getParentModule(this); + const meta = moduleGraph.getMeta(module); + let importVarMap = meta.importVarMap; + if (!importVarMap) meta.importVarMap = importVarMap = new Map(); + let importVar = importVarMap.get(moduleGraph.getModule(this)); + if (importVar) return importVar; + importVar = `${Template.toIdentifier( + `${this.userRequest}` + )}__WEBPACK_IMPORTED_MODULE_${importVarMap.size}__`; + importVarMap.set(moduleGraph.getModule(this), importVar); + return importVar; + } + + /** + * @param {boolean} update create new variables or update existing one + * @param {DependencyTemplateContext} templateContext the template context + * @returns {[string, string]} the import statement and the compat statement + */ + getImportStatement( + update, + { runtimeTemplate, module, moduleGraph, chunkGraph, runtimeRequirements } + ) { + return runtimeTemplate.importStatement({ + update, + module: moduleGraph.getModule(this), + chunkGraph, + importVar: this.getImportVar(moduleGraph), + request: this.request, + originModule: module, + runtimeRequirements + }); + } + + /** + * @param {ModuleGraph} moduleGraph module graph + * @param {string[]} ids imported ids + * @param {string} additionalMessage extra info included in the error message + * @returns {WebpackError[] | undefined} errors + */ + getLinkingErrors(moduleGraph, ids, additionalMessage) { + const importedModule = moduleGraph.getModule(this); + // ignore errors for missing or failed modules + if (!importedModule || importedModule.getNumberOfErrors() > 0) { + return; + } + + const parentModule = moduleGraph.getParentModule(this); + const exportsType = importedModule.getExportsType( + moduleGraph, + parentModule.buildMeta.strictHarmonyModule + ); + if (exportsType === "namespace" || exportsType === "default-with-named") { + if (ids.length === 0) { + return; + } + + if ( + (exportsType !== "default-with-named" || ids[0] !== "default") && + moduleGraph.isExportProvided(importedModule, ids) === false + ) { + // We are sure that it's not provided + + // Try to provide detailed info in the error message + let pos = 0; + let exportsInfo = moduleGraph.getExportsInfo(importedModule); + while (pos < ids.length && exportsInfo) { + const id = ids[pos++]; + const exportInfo = exportsInfo.getReadOnlyExportInfo(id); + if (exportInfo.provided === false) { + // We are sure that it's not provided + const providedExports = exportsInfo.getProvidedExports(); + const moreInfo = Array.isArray(providedExports) + ? ` (possible exports: ${providedExports.join(", ")})` + : " (possible exports unknown)"; + return [ + new HarmonyLinkingError( + `export ${ids + .slice(0, pos) + .map(id => `'${id}'`) + .join(".")} ${additionalMessage} was not found in '${ + this.userRequest + }'${moreInfo}` + ) + ]; + } + exportsInfo = exportInfo.getNestedExportsInfo(); + } + + // General error message + return [ + new HarmonyLinkingError( + `export ${ids + .map(id => `'${id}'`) + .join(".")} ${additionalMessage} was not found in '${ + this.userRequest + }'` + ) + ]; + } + } + switch (exportsType) { + case "default-only": + // It's has only a default export + if (ids.length > 0 && ids[0] !== "default") { + // In strict harmony modules we only support the default export + return [ + new HarmonyLinkingError( + `Can't import the named export ${ids + .map(id => `'${id}'`) + .join( + "." + )} ${additionalMessage} from default-exporting module (only default export is available)` + ) + ]; + } + break; + case "default-with-named": + // It has a default export and named properties redirect + // In some cases we still want to warn here + if ( + ids.length > 0 && + ids[0] !== "default" && + importedModule.buildMeta.defaultObject === "redirect-warn" + ) { + // For these modules only the default export is supported + return [ + new HarmonyLinkingError( + `Should not import the named export ${ids + .map(id => `'${id}'`) + .join( + "." + )} ${additionalMessage} from default-exporting module (only default export is available soon)` + ) + ]; + } + break; + } + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + const { chunkGraph, runtime, runtimeTemplate } = context; + const { moduleGraph } = chunkGraph; + super.updateHash(hash, context); + hash.update(`${this.sourceOrder}`); + const connection = moduleGraph.getConnection(this); + if (connection) { + const importedModule = connection.module; + if (importedModule) { + const parentModule = moduleGraph.getParentModule(this); + hash.update( + importedModule.getExportsType( + moduleGraph, + parentModule.buildMeta && parentModule.buildMeta.strictHarmonyModule + ) + ); + if (moduleGraph.isAsync(importedModule)) hash.update("async"); + } + if (runtimeTemplate) { + const runtimeRequirements = new Set(); + hash.update( + runtimeTemplate.runtimeConditionExpression({ + chunkGraph, + runtimeCondition: filterRuntime(runtime, runtime => { + return connection.isTargetActive(runtime); + }), + runtime, + runtimeRequirements + }) + ); + for (const rr of runtimeRequirements) hash.update(rr); + } + } + } + + serialize(context) { + const { write } = context; + write(this.sourceOrder); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.sourceOrder = read(); + super.deserialize(context); + } +} + +module.exports = HarmonyImportDependency; + +/** @type {WeakMap>} */ +const importEmittedMap = new WeakMap(); + +HarmonyImportDependency.Template = class HarmonyImportDependencyTemplate extends ( + ModuleDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const dep = /** @type {HarmonyImportDependency} */ (dependency); + const { module, chunkGraph, moduleGraph, runtime } = templateContext; + + const connection = moduleGraph.getConnection(dep); + if (connection && !connection.isTargetActive(runtime)) return; + + const referencedModule = connection && connection.module; + + if ( + connection && + connection.weak && + referencedModule && + chunkGraph.getModuleId(referencedModule) === null + ) { + // in weak references, module might not be in any chunk + // but that's ok, we don't need that logic in this case + return; + } + + const moduleKey = referencedModule + ? referencedModule.identifier() + : dep.request; + const key = `harmony import ${moduleKey}`; + + const runtimeCondition = dep.weak + ? false + : connection + ? filterRuntime(runtime, r => connection.isTargetActive(r)) + : true; + + if (module && referencedModule) { + let emittedModules = importEmittedMap.get(module); + if (emittedModules === undefined) { + emittedModules = new WeakMap(); + importEmittedMap.set(module, emittedModules); + } + let mergedRuntimeCondition = runtimeCondition; + const oldRuntimeCondition = emittedModules.get(referencedModule) || false; + if (oldRuntimeCondition !== false && mergedRuntimeCondition !== true) { + if (mergedRuntimeCondition === false || oldRuntimeCondition === true) { + mergedRuntimeCondition = oldRuntimeCondition; + } else { + mergedRuntimeCondition = mergeRuntime( + oldRuntimeCondition, + mergedRuntimeCondition + ); + } + } + emittedModules.set(referencedModule, mergedRuntimeCondition); + } + + const importStatement = dep.getImportStatement(false, templateContext); + if (templateContext.moduleGraph.isAsync(referencedModule)) { + templateContext.initFragments.push( + new ConditionalInitFragment( + importStatement[0], + InitFragment.STAGE_HARMONY_IMPORTS, + dep.sourceOrder, + key, + runtimeCondition + ) + ); + templateContext.initFragments.push( + new AwaitDependenciesInitFragment( + new Set([dep.getImportVar(templateContext.moduleGraph)]) + ) + ); + templateContext.initFragments.push( + new ConditionalInitFragment( + importStatement[1], + InitFragment.STAGE_ASYNC_HARMONY_IMPORTS, + dep.sourceOrder, + key + " compat", + runtimeCondition + ) + ); + } else { + templateContext.initFragments.push( + new ConditionalInitFragment( + importStatement[0] + importStatement[1], + InitFragment.STAGE_HARMONY_IMPORTS, + dep.sourceOrder, + key, + runtimeCondition + ) + ); + } + } + + /** + * + * @param {Module} module the module + * @param {Module} referencedModule the referenced module + * @returns {RuntimeSpec | boolean} runtimeCondition in which this import has been emitted + */ + static getImportEmittedRuntime(module, referencedModule) { + const emittedModules = importEmittedMap.get(module); + if (emittedModules === undefined) return false; + return emittedModules.get(referencedModule) || false; + } +}; + + +/***/ }), + +/***/ 76426: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const HotModuleReplacementPlugin = __webpack_require__(26475); +const InnerGraph = __webpack_require__(76094); +const ConstDependency = __webpack_require__(9364); +const HarmonyAcceptDependency = __webpack_require__(16546); +const HarmonyAcceptImportDependency = __webpack_require__(19966); +const HarmonyExports = __webpack_require__(79291); +const HarmonyImportSideEffectDependency = __webpack_require__(98335); +const HarmonyImportSpecifierDependency = __webpack_require__(71564); + +/** @typedef {import("estree").Identifier} Identifier */ +/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ +/** @typedef {import("../optimize/InnerGraph").InnerGraph} InnerGraph */ +/** @typedef {import("../optimize/InnerGraph").TopLevelSymbol} TopLevelSymbol */ +/** @typedef {import("./HarmonyImportDependency")} HarmonyImportDependency */ + +const harmonySpecifierTag = Symbol("harmony import"); + +/** + * @typedef {Object} HarmonySettings + * @property {string[]} ids + * @property {string} source + * @property {number} sourceOrder + * @property {string} name + * @property {boolean} await + */ + +module.exports = class HarmonyImportDependencyParserPlugin { + constructor(options) { + const { module: moduleOptions } = options; + this.strictExportPresence = moduleOptions.strictExportPresence; + this.strictThisContextOnImports = moduleOptions.strictThisContextOnImports; + } + + /** + * @param {JavascriptParser} parser the parser + * @returns {void} + */ + apply(parser) { + parser.hooks.isPure + .for("Identifier") + .tap("HarmonyImportDependencyParserPlugin", expression => { + const expr = /** @type {Identifier} */ (expression); + if ( + parser.isVariableDefined(expr.name) || + parser.getTagData(expr.name, harmonySpecifierTag) + ) { + return true; + } + }); + parser.hooks.import.tap( + "HarmonyImportDependencyParserPlugin", + (statement, source) => { + parser.state.lastHarmonyImportOrder = + (parser.state.lastHarmonyImportOrder || 0) + 1; + const clearDep = new ConstDependency( + parser.isAsiPosition(statement.range[0]) ? ";" : "", + statement.range + ); + clearDep.loc = statement.loc; + parser.state.module.addPresentationalDependency(clearDep); + parser.unsetAsiPosition(statement.range[1]); + const sideEffectDep = new HarmonyImportSideEffectDependency( + source, + parser.state.lastHarmonyImportOrder + ); + sideEffectDep.loc = statement.loc; + parser.state.module.addDependency(sideEffectDep); + return true; + } + ); + parser.hooks.importSpecifier.tap( + "HarmonyImportDependencyParserPlugin", + (statement, source, id, name) => { + const ids = id === null ? [] : [id]; + parser.tagVariable(name, harmonySpecifierTag, { + name, + source, + ids, + sourceOrder: parser.state.lastHarmonyImportOrder + }); + return true; + } + ); + parser.hooks.expression + .for(harmonySpecifierTag) + .tap("HarmonyImportDependencyParserPlugin", expr => { + const settings = /** @type {HarmonySettings} */ (parser.currentTagData); + const dep = new HarmonyImportSpecifierDependency( + settings.source, + settings.sourceOrder, + settings.ids, + settings.name, + expr.range, + this.strictExportPresence + ); + dep.shorthand = parser.scope.inShorthand; + dep.directImport = true; + dep.asiSafe = !parser.isAsiPosition(expr.range[0]); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + InnerGraph.onUsage(parser.state, e => (dep.usedByExports = e)); + return true; + }); + parser.hooks.expressionMemberChain + .for(harmonySpecifierTag) + .tap("HarmonyImportDependencyParserPlugin", (expr, members) => { + const settings = /** @type {HarmonySettings} */ (parser.currentTagData); + const ids = settings.ids.concat(members); + const dep = new HarmonyImportSpecifierDependency( + settings.source, + settings.sourceOrder, + ids, + settings.name, + expr.range, + this.strictExportPresence + ); + dep.asiSafe = !parser.isAsiPosition(expr.range[0]); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + InnerGraph.onUsage(parser.state, e => (dep.usedByExports = e)); + return true; + }); + parser.hooks.callMemberChain + .for(harmonySpecifierTag) + .tap("HarmonyImportDependencyParserPlugin", (expr, members) => { + const { arguments: args, callee } = expr; + const settings = /** @type {HarmonySettings} */ (parser.currentTagData); + const ids = settings.ids.concat(members); + const dep = new HarmonyImportSpecifierDependency( + settings.source, + settings.sourceOrder, + ids, + settings.name, + callee.range, + this.strictExportPresence + ); + dep.directImport = members.length === 0; + dep.call = true; + dep.asiSafe = !parser.isAsiPosition(callee.range[0]); + // only in case when we strictly follow the spec we need a special case here + dep.namespaceObjectAsContext = + members.length > 0 && this.strictThisContextOnImports; + dep.loc = callee.loc; + parser.state.module.addDependency(dep); + if (args) parser.walkExpressions(args); + InnerGraph.onUsage(parser.state, e => (dep.usedByExports = e)); + return true; + }); + const { + hotAcceptCallback, + hotAcceptWithoutCallback + } = HotModuleReplacementPlugin.getParserHooks(parser); + hotAcceptCallback.tap( + "HarmonyImportDependencyParserPlugin", + (expr, requests) => { + if (!HarmonyExports.isEnabled(parser.state)) { + // This is not a harmony module, skip it + return; + } + const dependencies = requests.map(request => { + const dep = new HarmonyAcceptImportDependency(request); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return dep; + }); + if (dependencies.length > 0) { + const dep = new HarmonyAcceptDependency( + expr.range, + dependencies, + true + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + } + } + ); + hotAcceptWithoutCallback.tap( + "HarmonyImportDependencyParserPlugin", + (expr, requests) => { + if (!HarmonyExports.isEnabled(parser.state)) { + // This is not a harmony module, skip it + return; + } + const dependencies = requests.map(request => { + const dep = new HarmonyAcceptImportDependency(request); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return dep; + }); + if (dependencies.length > 0) { + const dep = new HarmonyAcceptDependency( + expr.range, + dependencies, + false + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + } + } + ); + } +}; + +module.exports.harmonySpecifierTag = harmonySpecifierTag; + + +/***/ }), + +/***/ 98335: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const HarmonyImportDependency = __webpack_require__(289); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../InitFragment")} InitFragment */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ +/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class HarmonyImportSideEffectDependency extends HarmonyImportDependency { + constructor(request, sourceOrder) { + super(request, sourceOrder); + } + + get type() { + return "harmony side effect evaluation"; + } + + /** + * @param {ModuleGraph} moduleGraph module graph + * @returns {function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active + */ + getCondition(moduleGraph) { + return connection => { + const refModule = connection.resolvedModule; + if (!refModule) return true; + return refModule.getSideEffectsConnectionState(moduleGraph); + }; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this dependency connects the module to referencing modules + */ + getModuleEvaluationSideEffectsState(moduleGraph) { + const refModule = moduleGraph.getModule(this); + if (!refModule) return true; + return refModule.getSideEffectsConnectionState(moduleGraph); + } +} + +makeSerializable( + HarmonyImportSideEffectDependency, + "webpack/lib/dependencies/HarmonyImportSideEffectDependency" +); + +HarmonyImportSideEffectDependency.Template = class HarmonyImportSideEffectDependencyTemplate extends ( + HarmonyImportDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const { moduleGraph, concatenationScope } = templateContext; + if (concatenationScope) { + const module = moduleGraph.getModule(dependency); + if (concatenationScope.isModuleInScope(module)) { + return; + } + } + super.apply(dependency, source, templateContext); + } +}; + +module.exports = HarmonyImportSideEffectDependency; + + +/***/ }), + +/***/ 71564: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const { UsageState } = __webpack_require__(54227); +const makeSerializable = __webpack_require__(55575); +const propertyAccess = __webpack_require__(44682); +const HarmonyImportDependency = __webpack_require__(289); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ +/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +const idsSymbol = Symbol("HarmonyImportSpecifierDependency.ids"); + +class HarmonyImportSpecifierDependency extends HarmonyImportDependency { + constructor(request, sourceOrder, ids, name, range, strictExportPresence) { + super(request, sourceOrder); + this.ids = ids; + this.name = name; + this.range = range; + this.strictExportPresence = strictExportPresence; + this.namespaceObjectAsContext = false; + this.call = undefined; + this.directImport = undefined; + this.shorthand = undefined; + this.asiSafe = undefined; + /** @type {Set | boolean} */ + this.usedByExports = undefined; + } + + // TODO webpack 6 remove + get id() { + throw new Error("id was renamed to ids and type changed to string[]"); + } + + // TODO webpack 6 remove + getId() { + throw new Error("id was renamed to ids and type changed to string[]"); + } + + // TODO webpack 6 remove + setId() { + throw new Error("id was renamed to ids and type changed to string[]"); + } + + get type() { + return "harmony import specifier"; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {string[]} the imported ids + */ + getIds(moduleGraph) { + return moduleGraph.getMeta(this)[idsSymbol] || this.ids; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {string[]} ids the imported ids + * @returns {void} + */ + setIds(moduleGraph, ids) { + moduleGraph.getMeta(this)[idsSymbol] = ids; + } + + /** + * @param {ModuleGraph} moduleGraph module graph + * @returns {function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active + */ + getCondition(moduleGraph) { + return (connection, runtime) => + this.checkUsedByExports(moduleGraph, runtime); + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this dependency connects the module to referencing modules + */ + getModuleEvaluationSideEffectsState(moduleGraph) { + return false; + } + + checkUsedByExports(moduleGraph, runtime) { + if (this.usedByExports === false) return false; + if (this.usedByExports !== true && this.usedByExports !== undefined) { + const selfModule = moduleGraph.getParentModule(this); + const exportsInfo = moduleGraph.getExportsInfo(selfModule); + let used = false; + for (const exportName of this.usedByExports) { + if (exportsInfo.getUsed(exportName, runtime) !== UsageState.Unused) + used = true; + } + if (!used) return false; + } + return true; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + let ids = this.getIds(moduleGraph); + if (ids.length > 0 && ids[0] === "default") { + const selfModule = moduleGraph.getParentModule(this); + const importedModule = moduleGraph.getModule(this); + switch ( + importedModule.getExportsType( + moduleGraph, + selfModule.buildMeta.strictHarmonyModule + ) + ) { + case "default-only": + case "default-with-named": + if (ids.length === 1) return Dependency.EXPORTS_OBJECT_REFERENCED; + ids = ids.slice(1); + break; + case "dynamic": + return Dependency.EXPORTS_OBJECT_REFERENCED; + } + } + + if (this.namespaceObjectAsContext) { + if (ids.length === 1) return Dependency.EXPORTS_OBJECT_REFERENCED; + ids = ids.slice(0, -1); + } + + return [ids]; + } + + /** + * Returns warnings + * @param {ModuleGraph} moduleGraph module graph + * @returns {WebpackError[]} warnings + */ + getWarnings(moduleGraph) { + if ( + this.strictExportPresence || + moduleGraph.getParentModule(this).buildMeta.strictHarmonyModule + ) { + return null; + } + return this._getErrors(moduleGraph); + } + + /** + * Returns errors + * @param {ModuleGraph} moduleGraph module graph + * @returns {WebpackError[]} errors + */ + getErrors(moduleGraph) { + if ( + this.strictExportPresence || + moduleGraph.getParentModule(this).buildMeta.strictHarmonyModule + ) { + return this._getErrors(moduleGraph); + } + return null; + } + + /** + * @param {ModuleGraph} moduleGraph module graph + * @returns {WebpackError[] | undefined} errors + */ + _getErrors(moduleGraph) { + const ids = this.getIds(moduleGraph); + return this.getLinkingErrors( + moduleGraph, + ids, + `(imported as '${this.name}')` + ); + } + + /** + * implement this method to allow the occurrence order plugin to count correctly + * @returns {number} count how often the id is used in this dependency + */ + getNumberOfIdOccurrences() { + return 0; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + const { chunkGraph, runtime } = context; + super.updateHash(hash, context); + const moduleGraph = chunkGraph.moduleGraph; + const importedModule = moduleGraph.getModule(this); + const ids = this.getIds(moduleGraph); + hash.update(ids.join()); + if (importedModule) { + const exportsInfo = moduleGraph.getExportsInfo(importedModule); + hash.update(`${exportsInfo.getUsedName(ids, runtime)}`); + } + } + + serialize(context) { + const { write } = context; + write(this.ids); + write(this.name); + write(this.range); + write(this.strictExportPresence); + write(this.namespaceObjectAsContext); + write(this.call); + write(this.directImport); + write(this.shorthand); + write(this.asiSafe); + write(this.usedByExports); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.ids = read(); + this.name = read(); + this.range = read(); + this.strictExportPresence = read(); + this.namespaceObjectAsContext = read(); + this.call = read(); + this.directImport = read(); + this.shorthand = read(); + this.asiSafe = read(); + this.usedByExports = read(); + super.deserialize(context); + } +} + +makeSerializable( + HarmonyImportSpecifierDependency, + "webpack/lib/dependencies/HarmonyImportSpecifierDependency" +); + +HarmonyImportSpecifierDependency.Template = class HarmonyImportSpecifierDependencyTemplate extends ( + HarmonyImportDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const dep = /** @type {HarmonyImportSpecifierDependency} */ (dependency); + const { + moduleGraph, + module, + runtime, + concatenationScope + } = templateContext; + const connection = moduleGraph.getConnection(dep); + // Skip rendering depending when dependency is conditional + if (connection && !connection.isTargetActive(runtime)) return; + + const ids = dep.getIds(moduleGraph); + + let exportExpr; + if ( + connection && + concatenationScope && + concatenationScope.isModuleInScope(connection.module) + ) { + if (ids.length === 0) { + exportExpr = concatenationScope.createModuleReference( + connection.module, + { + asiSafe: dep.asiSafe + } + ); + } else if (dep.namespaceObjectAsContext && ids.length === 1) { + exportExpr = + concatenationScope.createModuleReference(connection.module, { + asiSafe: dep.asiSafe + }) + propertyAccess(ids); + } else { + exportExpr = concatenationScope.createModuleReference( + connection.module, + { + ids, + call: dep.call, + directImport: dep.directImport, + asiSafe: dep.asiSafe + } + ); + } + } else { + super.apply(dependency, source, templateContext); + + const { + runtimeTemplate, + initFragments, + runtimeRequirements + } = templateContext; + + exportExpr = runtimeTemplate.exportFromImport({ + moduleGraph, + module: moduleGraph.getModule(dep), + request: dep.request, + exportName: ids, + originModule: module, + asiSafe: dep.shorthand ? true : dep.asiSafe, + isCall: dep.call, + callContext: !dep.directImport, + defaultInterop: true, + importVar: dep.getImportVar(moduleGraph), + initFragments, + runtime, + runtimeRequirements + }); + } + if (dep.shorthand) { + source.insert(dep.range[1], `: ${exportExpr}`); + } else { + source.replace(dep.range[0], dep.range[1] - 1, exportExpr); + } + } +}; + +module.exports = HarmonyImportSpecifierDependency; + + +/***/ }), + +/***/ 1961: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const HarmonyAcceptDependency = __webpack_require__(16546); +const HarmonyAcceptImportDependency = __webpack_require__(19966); +const HarmonyCompatibilityDependency = __webpack_require__(52080); +const HarmonyExportExpressionDependency = __webpack_require__(47717); +const HarmonyExportHeaderDependency = __webpack_require__(69764); +const HarmonyExportImportedSpecifierDependency = __webpack_require__(61621); +const HarmonyExportSpecifierDependency = __webpack_require__(22867); +const HarmonyImportSideEffectDependency = __webpack_require__(98335); +const HarmonyImportSpecifierDependency = __webpack_require__(71564); + +const HarmonyDetectionParserPlugin = __webpack_require__(11850); +const HarmonyExportDependencyParserPlugin = __webpack_require__(97078); +const HarmonyImportDependencyParserPlugin = __webpack_require__(76426); +const HarmonyTopLevelThisParserPlugin = __webpack_require__(10358); + +/** @typedef {import("../Compiler")} Compiler */ + +class HarmonyModulesPlugin { + constructor(options) { + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "HarmonyModulesPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyTemplates.set( + HarmonyCompatibilityDependency, + new HarmonyCompatibilityDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyImportSideEffectDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + HarmonyImportSideEffectDependency, + new HarmonyImportSideEffectDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyImportSpecifierDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + HarmonyImportSpecifierDependency, + new HarmonyImportSpecifierDependency.Template() + ); + + compilation.dependencyTemplates.set( + HarmonyExportHeaderDependency, + new HarmonyExportHeaderDependency.Template() + ); + + compilation.dependencyTemplates.set( + HarmonyExportExpressionDependency, + new HarmonyExportExpressionDependency.Template() + ); + + compilation.dependencyTemplates.set( + HarmonyExportSpecifierDependency, + new HarmonyExportSpecifierDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyExportImportedSpecifierDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + HarmonyExportImportedSpecifierDependency, + new HarmonyExportImportedSpecifierDependency.Template() + ); + + compilation.dependencyTemplates.set( + HarmonyAcceptDependency, + new HarmonyAcceptDependency.Template() + ); + + compilation.dependencyFactories.set( + HarmonyAcceptImportDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + HarmonyAcceptImportDependency, + new HarmonyAcceptImportDependency.Template() + ); + + const handler = (parser, parserOptions) => { + // TODO webpack 6: rename harmony to esm or module + if (parserOptions.harmony !== undefined && !parserOptions.harmony) + return; + + new HarmonyDetectionParserPlugin(this.options).apply(parser); + new HarmonyImportDependencyParserPlugin(this.options).apply(parser); + new HarmonyExportDependencyParserPlugin(this.options).apply(parser); + new HarmonyTopLevelThisParserPlugin().apply(parser); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("HarmonyModulesPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("HarmonyModulesPlugin", handler); + } + ); + } +} +module.exports = HarmonyModulesPlugin; + + +/***/ }), + +/***/ 10358: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + + +const ConstDependency = __webpack_require__(9364); +const HarmonyExports = __webpack_require__(79291); + +class HarmonyTopLevelThisParserPlugin { + apply(parser) { + parser.hooks.expression + .for("this") + .tap("HarmonyTopLevelThisParserPlugin", node => { + if (!parser.scope.topLevelScope) return; + if (HarmonyExports.isEnabled(parser.state)) { + const dep = new ConstDependency("undefined", node.range, null); + dep.loc = node.loc; + parser.state.module.addPresentationalDependency(dep); + return this; + } + }); + } +} + +module.exports = HarmonyTopLevelThisParserPlugin; + + +/***/ }), + +/***/ 73449: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ContextDependency = __webpack_require__(21649); +const ContextDependencyTemplateAsRequireCall = __webpack_require__(33552); + +class ImportContextDependency extends ContextDependency { + constructor(options, range, valueRange) { + super(options); + + this.range = range; + this.valueRange = valueRange; + } + + get type() { + return `import() context ${this.options.mode}`; + } + + get category() { + return "esm"; + } + + serialize(context) { + const { write } = context; + + write(this.range); + write(this.valueRange); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.range = read(); + this.valueRange = read(); + + super.deserialize(context); + } +} + +makeSerializable( + ImportContextDependency, + "webpack/lib/dependencies/ImportContextDependency" +); + +ImportContextDependency.Template = ContextDependencyTemplateAsRequireCall; + +module.exports = ImportContextDependency; + + +/***/ }), + +/***/ 78377: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class ImportDependency extends ModuleDependency { + /** + * @param {string} request the request + * @param {[number, number]} range expression range + * @param {string[][]=} referencedExports list of referenced exports + */ + constructor(request, range, referencedExports) { + super(request); + this.range = range; + this.referencedExports = referencedExports; + } + + get type() { + return "import()"; + } + + get category() { + return "esm"; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + return this.referencedExports + ? this.referencedExports.map(e => ({ + name: e, + canMangle: false + })) + : Dependency.EXPORTS_OBJECT_REFERENCED; + } + + serialize(context) { + context.write(this.range); + context.write(this.referencedExports); + super.serialize(context); + } + + deserialize(context) { + this.range = context.read(); + this.referencedExports = context.read(); + super.deserialize(context); + } +} + +makeSerializable(ImportDependency, "webpack/lib/dependencies/ImportDependency"); + +ImportDependency.Template = class ImportDependencyTemplate extends ( + ModuleDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { runtimeTemplate, module, moduleGraph, chunkGraph, runtimeRequirements } + ) { + const dep = /** @type {ImportDependency} */ (dependency); + const block = /** @type {AsyncDependenciesBlock} */ (moduleGraph.getParentBlock( + dep + )); + const content = runtimeTemplate.moduleNamespacePromise({ + chunkGraph, + block: block, + module: moduleGraph.getModule(dep), + request: dep.request, + strict: module.buildMeta.strictHarmonyModule, + message: "import()", + runtimeRequirements + }); + + source.replace(dep.range[0], dep.range[1] - 1, content); + } +}; + +module.exports = ImportDependency; + + +/***/ }), + +/***/ 72152: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ImportDependency = __webpack_require__(78377); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ + +class ImportEagerDependency extends ImportDependency { + /** + * @param {string} request the request + * @param {[number, number]} range expression range + * @param {string[][]=} referencedExports list of referenced exports + */ + constructor(request, range, referencedExports) { + super(request, range, referencedExports); + } + + get type() { + return "import() eager"; + } + + get category() { + return "esm"; + } +} + +makeSerializable( + ImportEagerDependency, + "webpack/lib/dependencies/ImportEagerDependency" +); + +ImportEagerDependency.Template = class ImportEagerDependencyTemplate extends ( + ImportDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { runtimeTemplate, module, moduleGraph, chunkGraph, runtimeRequirements } + ) { + const dep = /** @type {ImportEagerDependency} */ (dependency); + const content = runtimeTemplate.moduleNamespacePromise({ + chunkGraph, + module: moduleGraph.getModule(dep), + request: dep.request, + strict: module.buildMeta.strictHarmonyModule, + message: "import() eager", + runtimeRequirements + }); + + source.replace(dep.range[0], dep.range[1] - 1, content); + } +}; + +module.exports = ImportEagerDependency; + + +/***/ }), + +/***/ 41559: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); +const ModuleDependencyTemplateAsId = __webpack_require__(57270); + +class ImportMetaHotAcceptDependency extends ModuleDependency { + constructor(request, range) { + super(request); + this.range = range; + this.weak = true; + } + + get type() { + return "import.meta.webpackHot.accept"; + } + + get category() { + return "esm"; + } +} + +makeSerializable( + ImportMetaHotAcceptDependency, + "webpack/lib/dependencies/ImportMetaHotAcceptDependency" +); + +ImportMetaHotAcceptDependency.Template = ModuleDependencyTemplateAsId; + +module.exports = ImportMetaHotAcceptDependency; + + +/***/ }), + +/***/ 33924: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); +const ModuleDependencyTemplateAsId = __webpack_require__(57270); + +class ImportMetaHotDeclineDependency extends ModuleDependency { + constructor(request, range) { + super(request); + + this.range = range; + this.weak = true; + } + + get type() { + return "import.meta.webpackHot.decline"; + } + + get category() { + return "esm"; + } +} + +makeSerializable( + ImportMetaHotDeclineDependency, + "webpack/lib/dependencies/ImportMetaHotDeclineDependency" +); + +ImportMetaHotDeclineDependency.Template = ModuleDependencyTemplateAsId; + +module.exports = ImportMetaHotDeclineDependency; + + +/***/ }), + +/***/ 24952: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const { pathToFileURL } = __webpack_require__(78835); +const ModuleDependencyWarning = __webpack_require__(57570); +const Template = __webpack_require__(90751); +const BasicEvaluatedExpression = __webpack_require__(98288); +const { + evaluateToIdentifier, + toConstantDependency, + evaluateToString, + evaluateToNumber +} = __webpack_require__(98550); +const memoize = __webpack_require__(18003); +const propertyAccess = __webpack_require__(44682); +const ConstDependency = __webpack_require__(9364); + +/** @typedef {import("estree").MemberExpression} MemberExpression */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../javascript/JavascriptParser")} Parser */ + +const getCriticalDependencyWarning = memoize(() => + __webpack_require__(92322) +); + +class ImportMetaPlugin { + /** + * @param {Compiler} compiler compiler + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "ImportMetaPlugin", + (compilation, { normalModuleFactory }) => { + /** + * @param {NormalModule} module module + * @returns {string} file url + */ + const getUrl = module => { + return pathToFileURL(module.resource).toString(); + }; + /** + * @param {Parser} parser parser + * @param {Object} parserOptions parserOptions + * @returns {void} + */ + const parserHandler = (parser, parserOptions) => { + /// import.meta direct /// + parser.hooks.typeof + .for("import.meta") + .tap( + "ImportMetaPlugin", + toConstantDependency(parser, JSON.stringify("object")) + ); + parser.hooks.expression + .for("import.meta") + .tap("ImportMetaPlugin", metaProperty => { + const CriticalDependencyWarning = getCriticalDependencyWarning(); + parser.state.module.addWarning( + new ModuleDependencyWarning( + parser.state.module, + new CriticalDependencyWarning( + "Accessing import.meta directly is unsupported (only property access is supported)" + ), + metaProperty.loc + ) + ); + const dep = new ConstDependency( + `${parser.isAsiPosition(metaProperty.range[0]) ? ";" : ""}({})`, + metaProperty.range + ); + dep.loc = metaProperty.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + parser.hooks.evaluateTypeof + .for("import.meta") + .tap("ImportMetaPlugin", evaluateToString("object")); + parser.hooks.evaluateIdentifier.for("import.meta").tap( + "ImportMetaPlugin", + evaluateToIdentifier("import.meta", "import.meta", () => [], true) + ); + + /// import.meta.url /// + parser.hooks.typeof + .for("import.meta.url") + .tap( + "ImportMetaPlugin", + toConstantDependency(parser, JSON.stringify("string")) + ); + parser.hooks.expression + .for("import.meta.url") + .tap("ImportMetaPlugin", expr => { + const dep = new ConstDependency( + JSON.stringify(getUrl(parser.state.module)), + expr.range + ); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + parser.hooks.evaluateTypeof + .for("import.meta.url") + .tap("ImportMetaPlugin", evaluateToString("string")); + parser.hooks.evaluateIdentifier + .for("import.meta.url") + .tap("ImportMetaPlugin", expr => { + return new BasicEvaluatedExpression() + .setString(getUrl(parser.state.module)) + .setRange(expr.range); + }); + + /// import.meta.webpack /// + const webpackVersion = parseInt( + __webpack_require__(32607)/* .version */ .i8, + 10 + ); + parser.hooks.typeof + .for("import.meta.webpack") + .tap( + "ImportMetaPlugin", + toConstantDependency(parser, JSON.stringify("number")) + ); + parser.hooks.expression + .for("import.meta.webpack") + .tap( + "ImportMetaPlugin", + toConstantDependency(parser, JSON.stringify(webpackVersion)) + ); + parser.hooks.evaluateTypeof + .for("import.meta.webpack") + .tap("ImportMetaPlugin", evaluateToString("number")); + parser.hooks.evaluateIdentifier + .for("import.meta.webpack") + .tap("ImportMetaPlugin", evaluateToNumber(webpackVersion)); + + /// Unknown properties /// + parser.hooks.unhandledExpressionMemberChain + .for("import.meta") + .tap("ImportMetaPlugin", (expr, members) => { + const dep = new ConstDependency( + `${Template.toNormalComment( + "unsupported import.meta." + members.join(".") + )} undefined${propertyAccess(members, 1)}`, + expr.range + ); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + parser.hooks.evaluate + .for("MemberExpression") + .tap("ImportMetaPlugin", expression => { + const expr = /** @type {MemberExpression} */ (expression); + if ( + expr.object.type === "MetaProperty" && + expr.object.meta.name === "import" && + expr.object.property.name === "meta" && + expr.property.type === + (expr.computed ? "Literal" : "Identifier") + ) { + return new BasicEvaluatedExpression() + .setUndefined() + .setRange(expr.range); + } + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("ImportMetaPlugin", parserHandler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("ImportMetaPlugin", parserHandler); + } + ); + } +} + +module.exports = ImportMetaPlugin; + + +/***/ }), + +/***/ 2120: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const AsyncDependenciesBlock = __webpack_require__(72624); +const CommentCompilationWarning = __webpack_require__(41985); +const UnsupportedFeatureWarning = __webpack_require__(61809); +const ContextDependencyHelpers = __webpack_require__(39815); +const ImportContextDependency = __webpack_require__(73449); +const ImportDependency = __webpack_require__(78377); +const ImportEagerDependency = __webpack_require__(72152); +const ImportWeakDependency = __webpack_require__(62550); + +/** @typedef {import("../ChunkGroup").RawChunkGroupOptions} RawChunkGroupOptions */ +/** @typedef {import("../ContextModule").ContextMode} ContextMode */ + +class ImportParserPlugin { + constructor(options) { + this.options = options; + } + + apply(parser) { + parser.hooks.importCall.tap("ImportParserPlugin", expr => { + const param = parser.evaluateExpression(expr.source); + + let chunkName = null; + /** @type {ContextMode} */ + let mode = "lazy"; + let include = null; + let exclude = null; + /** @type {string[][] | null} */ + let exports = null; + /** @type {RawChunkGroupOptions} */ + const groupOptions = {}; + + const { + options: importOptions, + errors: commentErrors + } = parser.parseCommentOptions(expr.range); + + if (commentErrors) { + for (const e of commentErrors) { + const { comment } = e; + parser.state.module.addWarning( + new CommentCompilationWarning( + `Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`, + comment.loc + ) + ); + } + } + + if (importOptions) { + if (importOptions.webpackIgnore !== undefined) { + if (typeof importOptions.webpackIgnore !== "boolean") { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackIgnore\` expected a boolean, but received: ${importOptions.webpackIgnore}.`, + expr.loc + ) + ); + } else { + // Do not instrument `import()` if `webpackIgnore` is `true` + if (importOptions.webpackIgnore) { + return false; + } + } + } + if (importOptions.webpackChunkName !== undefined) { + if (typeof importOptions.webpackChunkName !== "string") { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackChunkName\` expected a string, but received: ${importOptions.webpackChunkName}.`, + expr.loc + ) + ); + } else { + chunkName = importOptions.webpackChunkName; + } + } + if (importOptions.webpackMode !== undefined) { + if (typeof importOptions.webpackMode !== "string") { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackMode\` expected a string, but received: ${importOptions.webpackMode}.`, + expr.loc + ) + ); + } else { + mode = importOptions.webpackMode; + } + } + if (importOptions.webpackPrefetch !== undefined) { + if (importOptions.webpackPrefetch === true) { + groupOptions.prefetchOrder = 0; + } else if (typeof importOptions.webpackPrefetch === "number") { + groupOptions.prefetchOrder = importOptions.webpackPrefetch; + } else { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackPrefetch\` expected true or a number, but received: ${importOptions.webpackPrefetch}.`, + expr.loc + ) + ); + } + } + if (importOptions.webpackPreload !== undefined) { + if (importOptions.webpackPreload === true) { + groupOptions.preloadOrder = 0; + } else if (typeof importOptions.webpackPreload === "number") { + groupOptions.preloadOrder = importOptions.webpackPreload; + } else { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackPreload\` expected true or a number, but received: ${importOptions.webpackPreload}.`, + expr.loc + ) + ); + } + } + if (importOptions.webpackInclude !== undefined) { + if ( + !importOptions.webpackInclude || + importOptions.webpackInclude.constructor.name !== "RegExp" + ) { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackInclude\` expected a regular expression, but received: ${importOptions.webpackInclude}.`, + expr.loc + ) + ); + } else { + include = new RegExp(importOptions.webpackInclude); + } + } + if (importOptions.webpackExclude !== undefined) { + if ( + !importOptions.webpackExclude || + importOptions.webpackExclude.constructor.name !== "RegExp" + ) { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackExclude\` expected a regular expression, but received: ${importOptions.webpackExclude}.`, + expr.loc + ) + ); + } else { + exclude = new RegExp(importOptions.webpackExclude); + } + } + if (importOptions.webpackExports !== undefined) { + if ( + !( + typeof importOptions.webpackExports === "string" || + (Array.isArray(importOptions.webpackExports) && + importOptions.webpackExports.every( + item => typeof item === "string" + )) + ) + ) { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackExports\` expected a string or an array of strings, but received: ${importOptions.webpackExports}.`, + expr.loc + ) + ); + } else { + if (typeof importOptions.webpackExports === "string") { + exports = [[importOptions.webpackExports]]; + } else { + exports = Array.from(importOptions.webpackExports, e => [e]); + } + } + } + } + + if (param.isString()) { + if (mode !== "lazy" && mode !== "eager" && mode !== "weak") { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackMode\` expected 'lazy', 'eager' or 'weak', but received: ${mode}.`, + expr.loc + ) + ); + } + + if (mode === "eager") { + const dep = new ImportEagerDependency( + param.string, + expr.range, + exports + ); + parser.state.current.addDependency(dep); + } else if (mode === "weak") { + const dep = new ImportWeakDependency( + param.string, + expr.range, + exports + ); + parser.state.current.addDependency(dep); + } else { + const depBlock = new AsyncDependenciesBlock( + { + ...groupOptions, + name: chunkName + }, + expr.loc, + param.string + ); + const dep = new ImportDependency(param.string, expr.range, exports); + dep.loc = expr.loc; + depBlock.addDependency(dep); + parser.state.current.addBlock(depBlock); + } + return true; + } else { + if ( + mode !== "lazy" && + mode !== "lazy-once" && + mode !== "eager" && + mode !== "weak" + ) { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackMode\` expected 'lazy', 'lazy-once', 'eager' or 'weak', but received: ${mode}.`, + expr.loc + ) + ); + mode = "lazy"; + } + + if (mode === "weak") { + mode = "async-weak"; + } + const dep = ContextDependencyHelpers.create( + ImportContextDependency, + expr.range, + param, + expr, + this.options, + { + chunkName, + groupOptions, + include, + exclude, + mode, + namespaceObject: parser.state.module.buildMeta.strictHarmonyModule + ? "strict" + : true, + category: "esm", + referencedExports: exports + }, + parser + ); + if (!dep) return; + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + }); + } +} + +module.exports = ImportParserPlugin; + + +/***/ }), + +/***/ 35890: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ImportContextDependency = __webpack_require__(73449); +const ImportDependency = __webpack_require__(78377); +const ImportEagerDependency = __webpack_require__(72152); +const ImportParserPlugin = __webpack_require__(2120); +const ImportWeakDependency = __webpack_require__(62550); + +/** @typedef {import("../Compiler")} Compiler */ + +class ImportPlugin { + constructor(options) { + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap( + "ImportPlugin", + (compilation, { contextModuleFactory, normalModuleFactory }) => { + compilation.dependencyFactories.set( + ImportDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ImportDependency, + new ImportDependency.Template() + ); + + compilation.dependencyFactories.set( + ImportEagerDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ImportEagerDependency, + new ImportEagerDependency.Template() + ); + + compilation.dependencyFactories.set( + ImportWeakDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + ImportWeakDependency, + new ImportWeakDependency.Template() + ); + + compilation.dependencyFactories.set( + ImportContextDependency, + contextModuleFactory + ); + compilation.dependencyTemplates.set( + ImportContextDependency, + new ImportContextDependency.Template() + ); + + const handler = (parser, parserOptions) => { + if (parserOptions.import !== undefined && !parserOptions.import) + return; + + new ImportParserPlugin(options).apply(parser); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("ImportPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("ImportPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("ImportPlugin", handler); + } + ); + } +} +module.exports = ImportPlugin; + + +/***/ }), + +/***/ 62550: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ImportDependency = __webpack_require__(78377); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ + +class ImportWeakDependency extends ImportDependency { + /** + * @param {string} request the request + * @param {[number, number]} range expression range + * @param {string[][]=} referencedExports list of referenced exports + */ + constructor(request, range, referencedExports) { + super(request, range, referencedExports); + this.weak = true; + } + + get type() { + return "import() weak"; + } +} + +makeSerializable( + ImportWeakDependency, + "webpack/lib/dependencies/ImportWeakDependency" +); + +ImportWeakDependency.Template = class ImportDependencyTemplate extends ( + ImportDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { runtimeTemplate, module, moduleGraph, chunkGraph, runtimeRequirements } + ) { + const dep = /** @type {ImportWeakDependency} */ (dependency); + const content = runtimeTemplate.moduleNamespacePromise({ + chunkGraph, + module: moduleGraph.getModule(dep), + request: dep.request, + strict: module.buildMeta.strictHarmonyModule, + message: "import() weak", + weak: true, + runtimeRequirements + }); + + source.replace(dep.range[0], dep.range[1] - 1, content); + } +}; + +module.exports = ImportWeakDependency; + + +/***/ }), + +/***/ 33151: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency").ExportSpec} ExportSpec */ +/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/Hash")} Hash */ + +const getExportsFromData = data => { + if (data && typeof data === "object") { + if (Array.isArray(data)) { + return data.map((item, idx) => { + return { + name: `${idx}`, + canMangle: true, + exports: getExportsFromData(item) + }; + }); + } else { + const exports = []; + for (const key of Object.keys(data)) { + exports.push({ + name: key, + canMangle: true, + exports: getExportsFromData(data[key]) + }); + } + return exports; + } + } + return undefined; +}; + +class JsonExportsDependency extends NullDependency { + /** + * @param {(string | ExportSpec)[]} exports json exports + */ + constructor(exports) { + super(); + this.exports = exports; + } + + get type() { + return "json exports"; + } + + /** + * Returns the exported names + * @param {ModuleGraph} moduleGraph module graph + * @returns {ExportsSpec | undefined} export names + */ + getExports(moduleGraph) { + return { + exports: this.exports, + dependencies: undefined + }; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(this.exports ? JSON.stringify(this.exports) : "undefined"); + super.updateHash(hash, context); + } + + serialize(context) { + const { write } = context; + write(this.exports); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.exports = read(); + super.deserialize(context); + } +} + +makeSerializable( + JsonExportsDependency, + "webpack/lib/dependencies/JsonExportsDependency" +); + +module.exports = JsonExportsDependency; +module.exports.getExportsFromData = getExportsFromData; + + +/***/ }), + +/***/ 67408: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ModuleDependency = __webpack_require__(5462); + +class LoaderDependency extends ModuleDependency { + /** + * @param {string} request request string + */ + constructor(request) { + super(request); + } + + get type() { + return "loader"; + } + + get category() { + return "loader"; + } +} + +module.exports = LoaderDependency; + + +/***/ }), + +/***/ 25844: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const NormalModule = __webpack_require__(88376); +const LazySet = __webpack_require__(60248); +const LoaderDependency = __webpack_require__(67408); + +/** @typedef {import("../Module")} Module */ + +/** + * @callback LoadModuleCallback + * @param {Error=} err error object + * @param {string=} source source code + * @param {object=} map source map + * @param {Module=} module loaded module if successful + */ + +class LoaderPlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "LoaderPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + LoaderDependency, + normalModuleFactory + ); + } + ); + + compiler.hooks.compilation.tap("LoaderPlugin", compilation => { + const moduleGraph = compilation.moduleGraph; + NormalModule.getCompilationHooks(compilation).loader.tap( + "LoaderPlugin", + loaderContext => { + /** + * @param {string} request the request string to load the module from + * @param {LoadModuleCallback} callback callback returning the loaded module or error + * @returns {void} + */ + loaderContext.loadModule = (request, callback) => { + const dep = new LoaderDependency(request); + dep.loc = { + name: request + }; + const factory = compilation.dependencyFactories.get( + dep.constructor + ); + if (factory === undefined) { + return callback( + new Error( + `No module factory available for dependency type: ${dep.constructor.name}` + ) + ); + } + compilation.buildQueue.increaseParallelism(); + compilation.handleModuleCreation( + { + factory, + dependencies: [dep], + originModule: loaderContext._module, + context: loaderContext.context, + recursive: false + }, + err => { + compilation.buildQueue.decreaseParallelism(); + if (err) { + return callback(err); + } + const referencedModule = moduleGraph.getModule(dep); + if (!referencedModule) { + return callback(new Error("Cannot load the module")); + } + const moduleSource = referencedModule.originalSource(); + if (!moduleSource) { + throw new Error( + "The module created for a LoaderDependency must have an original source" + ); + } + let source, map; + if (moduleSource.sourceAndMap) { + const sourceAndMap = moduleSource.sourceAndMap(); + map = sourceAndMap.map; + source = sourceAndMap.source; + } else { + map = moduleSource.map(); + source = moduleSource.source(); + } + const fileDependencies = new LazySet(); + const contextDependencies = new LazySet(); + const missingDependencies = new LazySet(); + const buildDependencies = new LazySet(); + referencedModule.addCacheDependencies( + fileDependencies, + contextDependencies, + missingDependencies, + buildDependencies + ); + + for (const d of fileDependencies) { + loaderContext.addDependency(d); + } + for (const d of contextDependencies) { + loaderContext.addContextDependency(d); + } + for (const d of missingDependencies) { + loaderContext.addMissingDependency(d); + } + for (const d of buildDependencies) { + loaderContext.addBuildDependency(d); + } + return callback(null, source, map, referencedModule); + } + ); + }; + } + ); + }); + } +} +module.exports = LoaderPlugin; + + +/***/ }), + +/***/ 89087: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); + +class LocalModule { + constructor(name, idx) { + this.name = name; + this.idx = idx; + this.used = false; + } + + flagUsed() { + this.used = true; + } + + variableName() { + return "__WEBPACK_LOCAL_MODULE_" + this.idx + "__"; + } + + serialize(context) { + const { write } = context; + + write(this.name); + write(this.idx); + write(this.used); + } + + deserialize(context) { + const { read } = context; + + this.name = read(); + this.idx = read(); + this.used = read(); + } +} + +makeSerializable(LocalModule, "webpack/lib/dependencies/LocalModule"); + +module.exports = LocalModule; + + +/***/ }), + +/***/ 54524: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class LocalModuleDependency extends NullDependency { + constructor(localModule, range, callNew) { + super(); + + this.localModule = localModule; + this.range = range; + this.callNew = callNew; + } + + serialize(context) { + const { write } = context; + + write(this.localModule); + write(this.range); + write(this.callNew); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.localModule = read(); + this.range = read(); + this.callNew = read(); + + super.deserialize(context); + } +} + +makeSerializable( + LocalModuleDependency, + "webpack/lib/dependencies/LocalModuleDependency" +); + +LocalModuleDependency.Template = class LocalModuleDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const dep = /** @type {LocalModuleDependency} */ (dependency); + if (!dep.range) return; + const moduleInstance = dep.callNew + ? `new (function () { return ${dep.localModule.variableName()}; })()` + : dep.localModule.variableName(); + source.replace(dep.range[0], dep.range[1] - 1, moduleInstance); + } +}; + +module.exports = LocalModuleDependency; + + +/***/ }), + +/***/ 94353: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const LocalModule = __webpack_require__(89087); + +const lookup = (parent, mod) => { + if (mod.charAt(0) !== ".") return mod; + + var path = parent.split("/"); + var segments = mod.split("/"); + path.pop(); + + for (let i = 0; i < segments.length; i++) { + const seg = segments[i]; + if (seg === "..") { + path.pop(); + } else if (seg !== ".") { + path.push(seg); + } + } + + return path.join("/"); +}; + +exports.addLocalModule = (state, name) => { + if (!state.localModules) { + state.localModules = []; + } + const m = new LocalModule(name, state.localModules.length); + state.localModules.push(m); + return m; +}; + +exports.getLocalModule = (state, name, namedModule) => { + if (!state.localModules) return null; + if (namedModule) { + // resolve dependency name relative to the defining named module + name = lookup(namedModule, name); + } + for (let i = 0; i < state.localModules.length; i++) { + if (state.localModules[i].name === name) { + return state.localModules[i]; + } + } + return null; +}; + + +/***/ }), + +/***/ 79448: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const InitFragment = __webpack_require__(63382); +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class ModuleDecoratorDependency extends NullDependency { + /** + * @param {string} decorator the decorator requirement + * @param {boolean} allowExportsAccess allow to access exports from module + */ + constructor(decorator, allowExportsAccess) { + super(); + this.decorator = decorator; + this.allowExportsAccess = allowExportsAccess; + } + + /** + * @returns {string} a display name for the type of dependency + */ + get type() { + return "module decorator"; + } + + get category() { + return "self"; + } + + /** + * @returns {string | null} an identifier to merge equal requests + */ + getResourceIdentifier() { + return `self`; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + return this.allowExportsAccess + ? Dependency.EXPORTS_OBJECT_REFERENCED + : Dependency.NO_EXPORTS_REFERENCED; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + super.updateHash(hash, context); + hash.update(this.decorator); + hash.update(`${this.allowExportsAccess}`); + } + + serialize(context) { + const { write } = context; + write(this.decorator); + write(this.allowExportsAccess); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.decorator = read(); + this.allowExportsAccess = read(); + super.deserialize(context); + } +} + +makeSerializable( + ModuleDecoratorDependency, + "webpack/lib/dependencies/ModuleDecoratorDependency" +); + +ModuleDecoratorDependency.Template = class ModuleDecoratorDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { module, chunkGraph, initFragments, runtimeRequirements } + ) { + const dep = /** @type {ModuleDecoratorDependency} */ (dependency); + runtimeRequirements.add(RuntimeGlobals.moduleLoaded); + runtimeRequirements.add(RuntimeGlobals.moduleId); + runtimeRequirements.add(RuntimeGlobals.module); + runtimeRequirements.add(dep.decorator); + initFragments.push( + new InitFragment( + `/* module decorator */ ${module.moduleArgument} = ${dep.decorator}(${module.moduleArgument});\n`, + InitFragment.STAGE_PROVIDES, + 0, + `module decorator ${chunkGraph.getModuleId(module)}` + ) + ); + } +}; + +module.exports = ModuleDecoratorDependency; + + +/***/ }), + +/***/ 5462: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const DependencyTemplate = __webpack_require__(90909); + +class ModuleDependency extends Dependency { + /** + * @param {string} request request path which needs resolving + */ + constructor(request) { + super(); + this.request = request; + this.userRequest = request; + this.range = undefined; + } + + /** + * @returns {string | null} an identifier to merge equal requests + */ + getResourceIdentifier() { + return `module${this.request}`; + } + + serialize(context) { + const { write } = context; + write(this.request); + write(this.userRequest); + write(this.range); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.request = read(); + this.userRequest = read(); + this.range = read(); + super.deserialize(context); + } +} + +ModuleDependency.Template = DependencyTemplate; + +module.exports = ModuleDependency; + + +/***/ }), + +/***/ 57270: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class ModuleDependencyTemplateAsId extends ModuleDependency.Template { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, { runtimeTemplate, moduleGraph, chunkGraph }) { + const dep = /** @type {ModuleDependency} */ (dependency); + if (!dep.range) return; + const content = runtimeTemplate.moduleId({ + module: moduleGraph.getModule(dep), + chunkGraph, + request: dep.request, + weak: dep.weak + }); + source.replace(dep.range[0], dep.range[1] - 1, content); + } +} + +module.exports = ModuleDependencyTemplateAsId; + + +/***/ }), + +/***/ 63798: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class ModuleDependencyTemplateAsRequireId extends ModuleDependency.Template { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } + ) { + const dep = /** @type {ModuleDependency} */ (dependency); + if (!dep.range) return; + const content = runtimeTemplate.moduleExports({ + module: moduleGraph.getModule(dep), + chunkGraph, + request: dep.request, + weak: dep.weak, + runtimeRequirements + }); + source.replace(dep.range[0], dep.range[1] - 1, content); + } +} +module.exports = ModuleDependencyTemplateAsRequireId; + + +/***/ }), + +/***/ 72529: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); +const ModuleDependencyTemplateAsId = __webpack_require__(57270); + +class ModuleHotAcceptDependency extends ModuleDependency { + constructor(request, range) { + super(request); + this.range = range; + this.weak = true; + } + + get type() { + return "module.hot.accept"; + } + + get category() { + return "commonjs"; + } +} + +makeSerializable( + ModuleHotAcceptDependency, + "webpack/lib/dependencies/ModuleHotAcceptDependency" +); + +ModuleHotAcceptDependency.Template = ModuleDependencyTemplateAsId; + +module.exports = ModuleHotAcceptDependency; + + +/***/ }), + +/***/ 53025: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); +const ModuleDependencyTemplateAsId = __webpack_require__(57270); + +class ModuleHotDeclineDependency extends ModuleDependency { + constructor(request, range) { + super(request); + + this.range = range; + this.weak = true; + } + + get type() { + return "module.hot.decline"; + } + + get category() { + return "commonjs"; + } +} + +makeSerializable( + ModuleHotDeclineDependency, + "webpack/lib/dependencies/ModuleHotDeclineDependency" +); + +ModuleHotDeclineDependency.Template = ModuleDependencyTemplateAsId; + +module.exports = ModuleHotDeclineDependency; + + +/***/ }), + +/***/ 47454: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const DependencyTemplate = __webpack_require__(90909); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/Hash")} Hash */ + +class NullDependency extends Dependency { + get type() { + return "null"; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) {} + + serialize({ write }) { + write(this.loc); + } + + deserialize({ read }) { + this.loc = read(); + } +} + +NullDependency.Template = class NullDependencyTemplate extends ( + DependencyTemplate +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) {} +}; + +module.exports = NullDependency; + + +/***/ }), + +/***/ 33785: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ModuleDependency = __webpack_require__(5462); + +class PrefetchDependency extends ModuleDependency { + constructor(request) { + super(request); + } + + get type() { + return "prefetch"; + } + + get category() { + return "esm"; + } +} + +module.exports = PrefetchDependency; + + +/***/ }), + +/***/ 76175: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + + +const InitFragment = __webpack_require__(63382); +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("../util/Hash")} Hash */ + +/** + * @param {string[]|null} path the property path array + * @returns {string} the converted path + */ +const pathToString = path => + path !== null && path.length > 0 + ? path.map(part => `[${JSON.stringify(part)}]`).join("") + : ""; + +class ProvidedDependency extends ModuleDependency { + constructor(request, identifier, path, range) { + super(request); + this.identifier = identifier; + this.path = path; + this.range = range; + } + + get type() { + return "provided"; + } + + get category() { + return "esm"; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + super.updateHash(hash, context); + hash.update(this.identifier); + hash.update(this.path ? this.path.join(",") : "null"); + } + + serialize(context) { + const { write } = context; + write(this.identifier); + write(this.path); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.identifier = read(); + this.path = read(); + super.deserialize(context); + } +} + +makeSerializable( + ProvidedDependency, + "webpack/lib/dependencies/ProvidedDependency" +); + +class ProvidedDependencyTemplate extends ModuleDependency.Template { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { + runtimeTemplate, + moduleGraph, + chunkGraph, + initFragments, + runtimeRequirements + } + ) { + const dep = /** @type {ProvidedDependency} */ (dependency); + initFragments.push( + new InitFragment( + `/* provided dependency */ var ${ + dep.identifier + } = ${runtimeTemplate.moduleExports({ + module: moduleGraph.getModule(dep), + chunkGraph, + request: dep.request, + runtimeRequirements + })}${pathToString(dep.path)};\n`, + InitFragment.STAGE_PROVIDES, + 1, + `provided ${dep.identifier}` + ) + ); + source.replace(dep.range[0], dep.range[1] - 1, dep.identifier); + } +} + +ProvidedDependency.Template = ProvidedDependencyTemplate; + +module.exports = ProvidedDependency; + + +/***/ }), + +/***/ 13275: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { UsageState } = __webpack_require__(54227); +const makeSerializable = __webpack_require__(55575); +const { filterRuntime } = __webpack_require__(43478); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ +/** @typedef {import("../util/Hash")} Hash */ + +class PureExpressionDependency extends NullDependency { + /** + * @param {[number, number]} range the source range + */ + constructor(range) { + super(); + this.range = range; + /** @type {Set | false} */ + this.usedByExports = false; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(this.range + ""); + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this dependency connects the module to referencing modules + */ + getModuleEvaluationSideEffectsState(moduleGraph) { + return false; + } + + serialize(context) { + const { write } = context; + write(this.range); + write(this.usedByExports); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.range = read(); + this.usedByExports = read(); + super.deserialize(context); + } +} + +makeSerializable( + PureExpressionDependency, + "webpack/lib/dependencies/PureExpressionDependency" +); + +PureExpressionDependency.Template = class PureExpressionDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { chunkGraph, moduleGraph, runtime, runtimeTemplate, runtimeRequirements } + ) { + const dep = /** @type {PureExpressionDependency} */ (dependency); + + const usedByExports = dep.usedByExports; + if (usedByExports !== false) { + const selfModule = moduleGraph.getParentModule(dep); + const exportsInfo = moduleGraph.getExportsInfo(selfModule); + const runtimeCondition = filterRuntime(runtime, runtime => { + for (const exportName of usedByExports) { + if (exportsInfo.getUsed(exportName, runtime) !== UsageState.Unused) { + return true; + } + } + return false; + }); + if (runtimeCondition === true) return; + if (runtimeCondition !== false) { + const condition = runtimeTemplate.runtimeConditionExpression({ + chunkGraph, + runtime, + runtimeCondition, + runtimeRequirements + }); + source.insert( + dep.range[0], + `(/* runtime-dependent pure expression or super */ ${condition} ? (` + ); + source.insert(dep.range[1], ") : null)"); + return; + } + } + + source.insert( + dep.range[0], + `(/* unused pure expression or super */ null && (` + ); + source.insert(dep.range[1], "))"); + } +}; + +module.exports = PureExpressionDependency; + + +/***/ }), + +/***/ 99026: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ContextDependency = __webpack_require__(21649); +const ModuleDependencyTemplateAsRequireId = __webpack_require__(63798); + +class RequireContextDependency extends ContextDependency { + constructor(options, range) { + super(options); + + this.range = range; + } + + get type() { + return "require.context"; + } + + serialize(context) { + const { write } = context; + + write(this.range); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.range = read(); + + super.deserialize(context); + } +} + +makeSerializable( + RequireContextDependency, + "webpack/lib/dependencies/RequireContextDependency" +); + +RequireContextDependency.Template = ModuleDependencyTemplateAsRequireId; + +module.exports = RequireContextDependency; + + +/***/ }), + +/***/ 32113: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RequireContextDependency = __webpack_require__(99026); + +module.exports = class RequireContextDependencyParserPlugin { + apply(parser) { + parser.hooks.call + .for("require.context") + .tap("RequireContextDependencyParserPlugin", expr => { + let regExp = /^\.\/.*$/; + let recursive = true; + let mode = "sync"; + switch (expr.arguments.length) { + case 4: { + const modeExpr = parser.evaluateExpression(expr.arguments[3]); + if (!modeExpr.isString()) return; + mode = modeExpr.string; + } + // falls through + case 3: { + const regExpExpr = parser.evaluateExpression(expr.arguments[2]); + if (!regExpExpr.isRegExp()) return; + regExp = regExpExpr.regExp; + } + // falls through + case 2: { + const recursiveExpr = parser.evaluateExpression(expr.arguments[1]); + if (!recursiveExpr.isBoolean()) return; + recursive = recursiveExpr.bool; + } + // falls through + case 1: { + const requestExpr = parser.evaluateExpression(expr.arguments[0]); + if (!requestExpr.isString()) return; + const dep = new RequireContextDependency( + { + request: requestExpr.string, + recursive, + regExp, + mode, + category: "commonjs" + }, + expr.range + ); + dep.loc = expr.loc; + dep.optional = !!parser.scope.inTry; + parser.state.current.addDependency(dep); + return true; + } + } + }); + } +}; + + +/***/ }), + +/***/ 69318: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { cachedSetProperty } = __webpack_require__(92700); +const ContextElementDependency = __webpack_require__(32592); +const RequireContextDependency = __webpack_require__(99026); +const RequireContextDependencyParserPlugin = __webpack_require__(32113); + +/** @typedef {import("../../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ +/** @typedef {import("../Compiler")} Compiler */ + +/** @type {ResolveOptions} */ +const EMPTY_RESOLVE_OPTIONS = {}; + +class RequireContextPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "RequireContextPlugin", + (compilation, { contextModuleFactory, normalModuleFactory }) => { + compilation.dependencyFactories.set( + RequireContextDependency, + contextModuleFactory + ); + compilation.dependencyTemplates.set( + RequireContextDependency, + new RequireContextDependency.Template() + ); + + compilation.dependencyFactories.set( + ContextElementDependency, + normalModuleFactory + ); + + const handler = (parser, parserOptions) => { + if ( + parserOptions.requireContext !== undefined && + !parserOptions.requireContext + ) + return; + + new RequireContextDependencyParserPlugin().apply(parser); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("RequireContextPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("RequireContextPlugin", handler); + + contextModuleFactory.hooks.alternativeRequests.tap( + "RequireContextPlugin", + (items, options) => { + if (items.length === 0) return items; + + const finalResolveOptions = compiler.resolverFactory.get( + "normal", + cachedSetProperty( + options.resolveOptions || EMPTY_RESOLVE_OPTIONS, + "dependencyType", + options.category + ) + ).options; + + let newItems; + if (!finalResolveOptions.fullySpecified) { + newItems = []; + for (const item of items) { + const { request, context } = item; + for (const ext of finalResolveOptions.extensions) { + if (request.endsWith(ext)) { + newItems.push({ + context, + request: request.slice(0, -ext.length) + }); + } + } + if (!finalResolveOptions.enforceExtension) { + newItems.push(item); + } + } + items = newItems; + + newItems = []; + for (const obj of items) { + const { request, context } = obj; + for (const mainFile of finalResolveOptions.mainFiles) { + if (request.endsWith(`/${mainFile}`)) { + newItems.push({ + context, + request: request.slice(0, -mainFile.length) + }); + newItems.push({ + context, + request: request.slice(0, -mainFile.length - 1) + }); + } + } + newItems.push(obj); + } + items = newItems; + } + + newItems = []; + for (const item of items) { + let hideOriginal = false; + for (const modulesItems of finalResolveOptions.modules) { + if (Array.isArray(modulesItems)) { + for (const dir of modulesItems) { + if (item.request.startsWith(`./${dir}/`)) { + newItems.push({ + context: item.context, + request: item.request.slice(dir.length + 3) + }); + hideOriginal = true; + } + } + } else { + const dir = modulesItems.replace(/\\/g, "/"); + const fullPath = + item.context.replace(/\\/g, "/") + item.request.slice(1); + if (fullPath.startsWith(dir)) { + newItems.push({ + context: item.context, + request: fullPath.slice(dir.length + 1) + }); + } + } + } + if (!hideOriginal) { + newItems.push(item); + } + } + return newItems; + } + ); + } + ); + } +} +module.exports = RequireContextPlugin; + + +/***/ }), + +/***/ 33266: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const AsyncDependenciesBlock = __webpack_require__(72624); +const makeSerializable = __webpack_require__(55575); + +class RequireEnsureDependenciesBlock extends AsyncDependenciesBlock { + constructor(chunkName, loc) { + super(chunkName, loc, null); + } +} + +makeSerializable( + RequireEnsureDependenciesBlock, + "webpack/lib/dependencies/RequireEnsureDependenciesBlock" +); + +module.exports = RequireEnsureDependenciesBlock; + + +/***/ }), + +/***/ 11772: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RequireEnsureDependenciesBlock = __webpack_require__(33266); +const RequireEnsureDependency = __webpack_require__(81390); +const RequireEnsureItemDependency = __webpack_require__(78934); +const getFunctionExpression = __webpack_require__(22671); + +module.exports = class RequireEnsureDependenciesBlockParserPlugin { + apply(parser) { + parser.hooks.call + .for("require.ensure") + .tap("RequireEnsureDependenciesBlockParserPlugin", expr => { + let chunkName = null; + let errorExpressionArg = null; + let errorExpression = null; + switch (expr.arguments.length) { + case 4: { + const chunkNameExpr = parser.evaluateExpression(expr.arguments[3]); + if (!chunkNameExpr.isString()) return; + chunkName = chunkNameExpr.string; + } + // falls through + case 3: { + errorExpressionArg = expr.arguments[2]; + errorExpression = getFunctionExpression(errorExpressionArg); + + if (!errorExpression && !chunkName) { + const chunkNameExpr = parser.evaluateExpression( + expr.arguments[2] + ); + if (!chunkNameExpr.isString()) return; + chunkName = chunkNameExpr.string; + } + } + // falls through + case 2: { + const dependenciesExpr = parser.evaluateExpression( + expr.arguments[0] + ); + const dependenciesItems = dependenciesExpr.isArray() + ? dependenciesExpr.items + : [dependenciesExpr]; + const successExpressionArg = expr.arguments[1]; + const successExpression = getFunctionExpression( + successExpressionArg + ); + + if (successExpression) { + parser.walkExpressions(successExpression.expressions); + } + if (errorExpression) { + parser.walkExpressions(errorExpression.expressions); + } + + const depBlock = new RequireEnsureDependenciesBlock( + chunkName, + expr.loc + ); + const errorCallbackExists = + expr.arguments.length === 4 || + (!chunkName && expr.arguments.length === 3); + const dep = new RequireEnsureDependency( + expr.range, + expr.arguments[1].range, + errorCallbackExists && expr.arguments[2].range + ); + dep.loc = expr.loc; + depBlock.addDependency(dep); + const old = parser.state.current; + parser.state.current = depBlock; + try { + let failed = false; + parser.inScope([], () => { + for (const ee of dependenciesItems) { + if (ee.isString()) { + const ensureDependency = new RequireEnsureItemDependency( + ee.string + ); + ensureDependency.loc = ee.loc || expr.loc; + depBlock.addDependency(ensureDependency); + } else { + failed = true; + } + } + }); + if (failed) { + return; + } + if (successExpression) { + if (successExpression.fn.body.type === "BlockStatement") { + parser.walkStatement(successExpression.fn.body); + } else { + parser.walkExpression(successExpression.fn.body); + } + } + old.addBlock(depBlock); + } finally { + parser.state.current = old; + } + if (!successExpression) { + parser.walkExpression(successExpressionArg); + } + if (errorExpression) { + if (errorExpression.fn.body.type === "BlockStatement") { + parser.walkStatement(errorExpression.fn.body); + } else { + parser.walkExpression(errorExpression.fn.body); + } + } else if (errorExpressionArg) { + parser.walkExpression(errorExpressionArg); + } + return true; + } + } + }); + } +}; + + +/***/ }), + +/***/ 81390: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class RequireEnsureDependency extends NullDependency { + constructor(range, contentRange, errorHandlerRange) { + super(); + + this.range = range; + this.contentRange = contentRange; + this.errorHandlerRange = errorHandlerRange; + } + + get type() { + return "require.ensure"; + } + + serialize(context) { + const { write } = context; + + write(this.range); + write(this.contentRange); + write(this.errorHandlerRange); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.range = read(); + this.contentRange = read(); + this.errorHandlerRange = read(); + + super.deserialize(context); + } +} + +makeSerializable( + RequireEnsureDependency, + "webpack/lib/dependencies/RequireEnsureDependency" +); + +RequireEnsureDependency.Template = class RequireEnsureDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply( + dependency, + source, + { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } + ) { + const dep = /** @type {RequireEnsureDependency} */ (dependency); + const depBlock = /** @type {AsyncDependenciesBlock} */ (moduleGraph.getParentBlock( + dep + )); + const promise = runtimeTemplate.blockPromise({ + chunkGraph, + block: depBlock, + message: "require.ensure", + runtimeRequirements + }); + const range = dep.range; + const contentRange = dep.contentRange; + const errorHandlerRange = dep.errorHandlerRange; + source.replace(range[0], contentRange[0] - 1, `${promise}.then((`); + if (errorHandlerRange) { + source.replace( + contentRange[1], + errorHandlerRange[0] - 1, + ").bind(null, __webpack_require__)).catch(" + ); + source.replace(errorHandlerRange[1], range[1] - 1, ")"); + } else { + source.replace( + contentRange[1], + range[1] - 1, + `).bind(null, __webpack_require__)).catch(${RuntimeGlobals.uncaughtErrorHandler})` + ); + } + } +}; + +module.exports = RequireEnsureDependency; + + +/***/ }), + +/***/ 78934: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); +const NullDependency = __webpack_require__(47454); + +class RequireEnsureItemDependency extends ModuleDependency { + constructor(request) { + super(request); + } + + get type() { + return "require.ensure item"; + } + + get category() { + return "commonjs"; + } +} + +makeSerializable( + RequireEnsureItemDependency, + "webpack/lib/dependencies/RequireEnsureItemDependency" +); + +RequireEnsureItemDependency.Template = NullDependency.Template; + +module.exports = RequireEnsureItemDependency; + + +/***/ }), + +/***/ 42749: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RequireEnsureDependency = __webpack_require__(81390); +const RequireEnsureItemDependency = __webpack_require__(78934); + +const RequireEnsureDependenciesBlockParserPlugin = __webpack_require__(11772); + +const { + evaluateToString, + toConstantDependency +} = __webpack_require__(98550); + +class RequireEnsurePlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "RequireEnsurePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + RequireEnsureItemDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + RequireEnsureItemDependency, + new RequireEnsureItemDependency.Template() + ); + + compilation.dependencyTemplates.set( + RequireEnsureDependency, + new RequireEnsureDependency.Template() + ); + + const handler = (parser, parserOptions) => { + if ( + parserOptions.requireEnsure !== undefined && + !parserOptions.requireEnsure + ) + return; + + new RequireEnsureDependenciesBlockParserPlugin().apply(parser); + parser.hooks.evaluateTypeof + .for("require.ensure") + .tap("RequireEnsurePlugin", evaluateToString("function")); + parser.hooks.typeof + .for("require.ensure") + .tap( + "RequireEnsurePlugin", + toConstantDependency(parser, JSON.stringify("function")) + ); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("RequireEnsurePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("RequireEnsurePlugin", handler); + } + ); + } +} +module.exports = RequireEnsurePlugin; + + +/***/ }), + +/***/ 15418: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class RequireHeaderDependency extends NullDependency { + constructor(range) { + super(); + if (!Array.isArray(range)) throw new Error("range must be valid"); + this.range = range; + } + + serialize(context) { + const { write } = context; + write(this.range); + super.serialize(context); + } + + static deserialize(context) { + const obj = new RequireHeaderDependency(context.read()); + obj.deserialize(context); + return obj; + } +} + +makeSerializable( + RequireHeaderDependency, + "webpack/lib/dependencies/RequireHeaderDependency" +); + +RequireHeaderDependency.Template = class RequireHeaderDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, { runtimeRequirements }) { + const dep = /** @type {RequireHeaderDependency} */ (dependency); + runtimeRequirements.add(RuntimeGlobals.require); + source.replace(dep.range[0], dep.range[1] - 1, "__webpack_require__"); + } +}; + +module.exports = RequireHeaderDependency; + + +/***/ }), + +/***/ 49309: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const Template = __webpack_require__(90751); +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class RequireIncludeDependency extends ModuleDependency { + constructor(request, range) { + super(request); + + this.range = range; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + // This doesn't use any export + return Dependency.NO_EXPORTS_REFERENCED; + } + + get type() { + return "require.include"; + } + + get category() { + return "commonjs"; + } +} + +makeSerializable( + RequireIncludeDependency, + "webpack/lib/dependencies/RequireIncludeDependency" +); + +RequireIncludeDependency.Template = class RequireIncludeDependencyTemplate extends ( + ModuleDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, { runtimeTemplate }) { + const dep = /** @type {RequireIncludeDependency} */ (dependency); + const comment = runtimeTemplate.outputOptions.pathinfo + ? Template.toComment( + `require.include ${runtimeTemplate.requestShortener.shorten( + dep.request + )}` + ) + : ""; + + source.replace(dep.range[0], dep.range[1] - 1, `undefined${comment}`); + } +}; + +module.exports = RequireIncludeDependency; + + +/***/ }), + +/***/ 13811: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); +const { + evaluateToString, + toConstantDependency +} = __webpack_require__(98550); +const makeSerializable = __webpack_require__(55575); +const RequireIncludeDependency = __webpack_require__(49309); + +module.exports = class RequireIncludeDependencyParserPlugin { + constructor(warn) { + this.warn = warn; + } + apply(parser) { + const { warn } = this; + parser.hooks.call + .for("require.include") + .tap("RequireIncludeDependencyParserPlugin", expr => { + if (expr.arguments.length !== 1) return; + const param = parser.evaluateExpression(expr.arguments[0]); + if (!param.isString()) return; + + if (warn) { + parser.state.module.addWarning( + new RequireIncludeDeprecationWarning(expr.loc) + ); + } + + const dep = new RequireIncludeDependency(param.string, expr.range); + dep.loc = expr.loc; + parser.state.current.addDependency(dep); + return true; + }); + parser.hooks.evaluateTypeof + .for("require.include") + .tap("RequireIncludePlugin", expr => { + if (warn) { + parser.state.module.addWarning( + new RequireIncludeDeprecationWarning(expr.loc) + ); + } + return evaluateToString("function")(expr); + }); + parser.hooks.typeof + .for("require.include") + .tap("RequireIncludePlugin", expr => { + if (warn) { + parser.state.module.addWarning( + new RequireIncludeDeprecationWarning(expr.loc) + ); + } + return toConstantDependency(parser, JSON.stringify("function"))(expr); + }); + } +}; + +class RequireIncludeDeprecationWarning extends WebpackError { + constructor(loc) { + super("require.include() is deprecated and will be removed soon."); + + this.name = "RequireIncludeDeprecationWarning"; + + this.loc = loc; + + Error.captureStackTrace(this, this.constructor); + } +} + +makeSerializable( + RequireIncludeDeprecationWarning, + "webpack/lib/dependencies/RequireIncludeDependencyParserPlugin", + "RequireIncludeDeprecationWarning" +); + + +/***/ }), + +/***/ 73924: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RequireIncludeDependency = __webpack_require__(49309); +const RequireIncludeDependencyParserPlugin = __webpack_require__(13811); + +class RequireIncludePlugin { + apply(compiler) { + compiler.hooks.compilation.tap( + "RequireIncludePlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + RequireIncludeDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + RequireIncludeDependency, + new RequireIncludeDependency.Template() + ); + + const handler = (parser, parserOptions) => { + if (parserOptions.requireInclude === false) return; + const warn = parserOptions.requireInclude === undefined; + + new RequireIncludeDependencyParserPlugin(warn).apply(parser); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("RequireIncludePlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("RequireIncludePlugin", handler); + } + ); + } +} +module.exports = RequireIncludePlugin; + + +/***/ }), + +/***/ 27569: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ContextDependency = __webpack_require__(21649); +const ContextDependencyTemplateAsId = __webpack_require__(67551); + +class RequireResolveContextDependency extends ContextDependency { + constructor(options, range, valueRange) { + super(options); + + this.range = range; + this.valueRange = valueRange; + } + + get type() { + return "amd require context"; + } + + serialize(context) { + const { write } = context; + + write(this.range); + write(this.valueRange); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.range = read(); + this.valueRange = read(); + + super.deserialize(context); + } +} + +makeSerializable( + RequireResolveContextDependency, + "webpack/lib/dependencies/RequireResolveContextDependency" +); + +RequireResolveContextDependency.Template = ContextDependencyTemplateAsId; + +module.exports = RequireResolveContextDependency; + + +/***/ }), + +/***/ 24868: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); +const ModuleDependencyAsId = __webpack_require__(57270); + +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class RequireResolveDependency extends ModuleDependency { + constructor(request, range) { + super(request); + + this.range = range; + } + + get type() { + return "require.resolve"; + } + + get category() { + return "commonjs"; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + // This doesn't use any export + return Dependency.NO_EXPORTS_REFERENCED; + } +} + +makeSerializable( + RequireResolveDependency, + "webpack/lib/dependencies/RequireResolveDependency" +); + +RequireResolveDependency.Template = ModuleDependencyAsId; + +module.exports = RequireResolveDependency; + + +/***/ }), + +/***/ 1217: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class RequireResolveHeaderDependency extends NullDependency { + constructor(range) { + super(); + + if (!Array.isArray(range)) throw new Error("range must be valid"); + + this.range = range; + } + + serialize(context) { + const { write } = context; + + write(this.range); + + super.serialize(context); + } + + static deserialize(context) { + const obj = new RequireResolveHeaderDependency(context.read()); + obj.deserialize(context); + return obj; + } +} + +makeSerializable( + RequireResolveHeaderDependency, + "webpack/lib/dependencies/RequireResolveHeaderDependency" +); + +RequireResolveHeaderDependency.Template = class RequireResolveHeaderDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const dep = /** @type {RequireResolveHeaderDependency} */ (dependency); + source.replace(dep.range[0], dep.range[1] - 1, "/*require.resolve*/"); + } + + applyAsTemplateArgument(name, dep, source) { + source.replace(dep.range[0], dep.range[1] - 1, "/*require.resolve*/"); + } +}; + +module.exports = RequireResolveHeaderDependency; + + +/***/ }), + +/***/ 61247: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/Hash")} Hash */ + +class RuntimeRequirementsDependency extends NullDependency { + /** + * @param {string[]} runtimeRequirements runtime requirements + */ + constructor(runtimeRequirements) { + super(); + this.runtimeRequirements = new Set(runtimeRequirements); + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(Array.from(this.runtimeRequirements).join() + ""); + } + + serialize(context) { + const { write } = context; + write(this.runtimeRequirements); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.runtimeRequirements = read(); + super.deserialize(context); + } +} + +makeSerializable( + RuntimeRequirementsDependency, + "webpack/lib/dependencies/RuntimeRequirementsDependency" +); + +RuntimeRequirementsDependency.Template = class RuntimeRequirementsDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, { runtimeRequirements }) { + const dep = /** @type {RuntimeRequirementsDependency} */ (dependency); + for (const req of dep.runtimeRequirements) { + runtimeRequirements.add(req); + } + } +}; + +module.exports = RuntimeRequirementsDependency; + + +/***/ }), + +/***/ 68372: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency").ExportSpec} ExportSpec */ +/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/Hash")} Hash */ + +class StaticExportsDependency extends NullDependency { + /** + * @param {string[] | true} exports export names + * @param {boolean} canMangle true, if mangling exports names is allowed + */ + constructor(exports, canMangle) { + super(); + this.exports = exports; + this.canMangle = canMangle; + } + + get type() { + return "static exports"; + } + + /** + * Returns the exported names + * @param {ModuleGraph} moduleGraph module graph + * @returns {ExportsSpec | undefined} export names + */ + getExports(moduleGraph) { + return { + exports: this.exports, + canMangle: this.canMangle, + dependencies: undefined + }; + } + + /** + * Update the hash + * @param {Hash} hash hash to be updated + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(JSON.stringify(this.exports)); + if (this.canMangle) hash.update("canMangle"); + super.updateHash(hash, context); + } + + serialize(context) { + const { write } = context; + write(this.exports); + write(this.canMangle); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.exports = read(); + this.canMangle = read(); + super.deserialize(context); + } +} + +makeSerializable( + StaticExportsDependency, + "webpack/lib/dependencies/StaticExportsDependency" +); + +module.exports = StaticExportsDependency; + + +/***/ }), + +/***/ 37200: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const WebpackError = __webpack_require__(24274); +const { + evaluateToString, + expressionIsUnsupported, + toConstantDependency +} = __webpack_require__(98550); +const makeSerializable = __webpack_require__(55575); +const ConstDependency = __webpack_require__(9364); +const SystemRuntimeModule = __webpack_require__(25637); + +/** @typedef {import("../Compiler")} Compiler */ + +class SystemPlugin { + constructor(options) { + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "SystemPlugin", + (compilation, { normalModuleFactory }) => { + compilation.hooks.runtimeRequirementInModule + .for(RuntimeGlobals.system) + .tap("SystemPlugin", (module, set) => { + set.add(RuntimeGlobals.requireScope); + }); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.system) + .tap("SystemPlugin", (chunk, set) => { + compilation.addRuntimeModule(chunk, new SystemRuntimeModule()); + }); + + const handler = (parser, parserOptions) => { + if (parserOptions.system === undefined || !parserOptions.system) { + return; + } + + const setNotSupported = name => { + parser.hooks.evaluateTypeof + .for(name) + .tap("SystemPlugin", evaluateToString("undefined")); + parser.hooks.expression + .for(name) + .tap( + "SystemPlugin", + expressionIsUnsupported( + parser, + name + " is not supported by webpack." + ) + ); + }; + + parser.hooks.typeof + .for("System.import") + .tap( + "SystemPlugin", + toConstantDependency(parser, JSON.stringify("function")) + ); + parser.hooks.evaluateTypeof + .for("System.import") + .tap("SystemPlugin", evaluateToString("function")); + parser.hooks.typeof + .for("System") + .tap( + "SystemPlugin", + toConstantDependency(parser, JSON.stringify("object")) + ); + parser.hooks.evaluateTypeof + .for("System") + .tap("SystemPlugin", evaluateToString("object")); + + setNotSupported("System.set"); + setNotSupported("System.get"); + setNotSupported("System.register"); + + parser.hooks.expression.for("System").tap("SystemPlugin", expr => { + const dep = new ConstDependency(RuntimeGlobals.system, expr.range, [ + RuntimeGlobals.system + ]); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }); + + parser.hooks.call.for("System.import").tap("SystemPlugin", expr => { + parser.state.module.addWarning( + new SystemImportDeprecationWarning(expr.loc) + ); + + return parser.hooks.importCall.call({ + type: "ImportExpression", + source: expr.arguments[0], + loc: expr.loc, + range: expr.range + }); + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("SystemPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/dynamic") + .tap("SystemPlugin", handler); + } + ); + } +} + +class SystemImportDeprecationWarning extends WebpackError { + constructor(loc) { + super( + "System.import() is deprecated and will be removed soon. Use import() instead.\n" + + "For more info visit https://webpack.js.org/guides/code-splitting/" + ); + + this.name = "SystemImportDeprecationWarning"; + + this.loc = loc; + + Error.captureStackTrace(this, this.constructor); + } +} + +makeSerializable( + SystemImportDeprecationWarning, + "webpack/lib/dependencies/SystemPlugin", + "SystemImportDeprecationWarning" +); + +module.exports = SystemPlugin; +module.exports.SystemImportDeprecationWarning = SystemImportDeprecationWarning; + + +/***/ }), + +/***/ 25637: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +class SystemRuntimeModule extends RuntimeModule { + constructor() { + super("system"); + } + + /** + * @returns {string} runtime code + */ + generate() { + return Template.asString([ + `${RuntimeGlobals.system} = {`, + Template.indent([ + "import: function () {", + Template.indent( + "throw new Error('System.import cannot be used indirectly');" + ), + "}" + ]), + "};" + ]); + } +} + +module.exports = SystemRuntimeModule; + + +/***/ }), + +/***/ 45148: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/Hash")} Hash */ + +class URLDependency extends ModuleDependency { + /** + * @param {string} request request + * @param {[number, number]} range range + */ + constructor(request, range) { + super(request); + this.range = range; + } + + get type() { + return "new URL()"; + } + + get category() { + return "url"; + } +} + +URLDependency.Template = class URLDependencyTemplate extends ( + ModuleDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const { + chunkGraph, + moduleGraph, + runtimeRequirements, + runtimeTemplate + } = templateContext; + const dep = /** @type {URLDependency} */ (dependency); + + runtimeRequirements.add(RuntimeGlobals.baseURI); + runtimeRequirements.add(RuntimeGlobals.require); + + source.replace( + dep.range[0], + dep.range[1] - 1, + `/* asset import */ ${runtimeTemplate.moduleRaw({ + chunkGraph, + module: moduleGraph.getModule(dep), + request: dep.request, + runtimeRequirements, + weak: false + })}, ${RuntimeGlobals.baseURI}` + ); + } +}; + +makeSerializable(URLDependency, "webpack/lib/dependencies/URLDependency"); + +module.exports = URLDependency; + + +/***/ }), + +/***/ 16091: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const { approve } = __webpack_require__(98550); +const URLDependency = __webpack_require__(45148); + +/** @typedef {import("estree").NewExpression} NewExpressionNode */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ + +class URLPlugin { + /** + * @param {Compiler} compiler compiler + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "URLPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set(URLDependency, normalModuleFactory); + compilation.dependencyTemplates.set( + URLDependency, + new URLDependency.Template() + ); + + /** + * @param {JavascriptParser} parser parser + * @param {object} parserOptions options + */ + const parserCallback = (parser, parserOptions) => { + if (parserOptions.url === false) return; + parser.hooks.canRename.for("URL").tap("URLPlugin", approve); + parser.hooks.new.for("URL").tap("URLPlugin", _expr => { + const expr = /** @type {NewExpressionNode} */ (_expr); + + if (expr.arguments.length !== 2) return; + + const [arg1, arg2] = expr.arguments; + + if ( + arg2.type !== "MemberExpression" || + arg1.type === "SpreadElement" + ) + return; + + const chain = parser.extractMemberExpressionChain(arg2); + + if ( + chain.members.length !== 1 || + chain.object.type !== "MetaProperty" || + chain.object.meta.name !== "import" || + chain.object.property.name !== "meta" || + chain.members[0] !== "url" + ) + return; + + const request = parser.evaluateExpression(arg1).asString(); + + if (!request) return; + + const dep = new URLDependency(request, [ + arg1.range[0], + arg2.range[1] + ]); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + return true; + }); + }; + + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("URLPlugin", parserCallback); + + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("URLPlugin", parserCallback); + } + ); + } +} + +module.exports = URLPlugin; + + +/***/ }), + +/***/ 27098: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const NullDependency = __webpack_require__(47454); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ + +class UnsupportedDependency extends NullDependency { + constructor(request, range) { + super(); + + this.request = request; + this.range = range; + } + + serialize(context) { + const { write } = context; + + write(this.request); + write(this.range); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.request = read(); + this.range = read(); + + super.deserialize(context); + } +} + +makeSerializable( + UnsupportedDependency, + "webpack/lib/dependencies/UnsupportedDependency" +); + +UnsupportedDependency.Template = class UnsupportedDependencyTemplate extends ( + NullDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, { runtimeTemplate }) { + const dep = /** @type {UnsupportedDependency} */ (dependency); + + source.replace( + dep.range[0], + dep.range[1], + runtimeTemplate.missingModule({ + request: dep.request + }) + ); + } +}; + +module.exports = UnsupportedDependency; + + +/***/ }), + +/***/ 16912: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class WebAssemblyExportImportedDependency extends ModuleDependency { + constructor(exportName, request, name, valueType) { + super(request); + /** @type {string} */ + this.exportName = exportName; + /** @type {string} */ + this.name = name; + /** @type {string} */ + this.valueType = valueType; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + return [[this.name]]; + } + + get type() { + return "wasm export import"; + } + + get category() { + return "wasm"; + } + + serialize(context) { + const { write } = context; + + write(this.exportName); + write(this.name); + write(this.valueType); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.exportName = read(); + this.name = read(); + this.valueType = read(); + + super.deserialize(context); + } +} + +makeSerializable( + WebAssemblyExportImportedDependency, + "webpack/lib/dependencies/WebAssemblyExportImportedDependency" +); + +module.exports = WebAssemblyExportImportedDependency; + + +/***/ }), + +/***/ 54629: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); +const UnsupportedWebAssemblyFeatureError = __webpack_require__(34537); +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("@webassemblyjs/ast").ModuleImportDescription} ModuleImportDescription */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class WebAssemblyImportDependency extends ModuleDependency { + /** + * @param {string} request the request + * @param {string} name the imported name + * @param {ModuleImportDescription} description the WASM ast node + * @param {false | string} onlyDirectImport if only direct imports are allowed + */ + constructor(request, name, description, onlyDirectImport) { + super(request); + /** @type {string} */ + this.name = name; + /** @type {ModuleImportDescription} */ + this.description = description; + /** @type {false | string} */ + this.onlyDirectImport = onlyDirectImport; + } + + get type() { + return "wasm import"; + } + + get category() { + return "wasm"; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + return [[this.name]]; + } + + /** + * Returns errors + * @param {ModuleGraph} moduleGraph module graph + * @returns {WebpackError[]} errors + */ + getErrors(moduleGraph) { + const module = moduleGraph.getModule(this); + + if ( + this.onlyDirectImport && + module && + !module.type.startsWith("webassembly") + ) { + return [ + new UnsupportedWebAssemblyFeatureError( + `Import "${this.name}" from "${this.request}" with ${this.onlyDirectImport} can only be used for direct wasm to wasm dependencies` + ) + ]; + } + } + + serialize(context) { + const { write } = context; + + write(this.name); + write(this.description); + write(this.onlyDirectImport); + + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + + this.name = read(); + this.description = read(); + this.onlyDirectImport = read(); + + super.deserialize(context); + } +} + +makeSerializable( + WebAssemblyImportDependency, + "webpack/lib/dependencies/WebAssemblyImportDependency" +); + +module.exports = WebAssemblyImportDependency; + + +/***/ }), + +/***/ 31479: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +const Dependency = __webpack_require__(27563); +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const ModuleDependency = __webpack_require__(5462); + +/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */ +/** @typedef {import("../AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Dependency").ReferencedExport} ReferencedExport */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../Entrypoint")} Entrypoint */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +class WorkerDependency extends ModuleDependency { + /** + * @param {string} request request + * @param {[number, number]} range range + */ + constructor(request, range) { + super(request); + this.range = range; + } + + /** + * Returns list of exports referenced by this dependency + * @param {ModuleGraph} moduleGraph module graph + * @param {RuntimeSpec} runtime the runtime for which the module is analysed + * @returns {(string[] | ReferencedExport)[]} referenced exports + */ + getReferencedExports(moduleGraph, runtime) { + return Dependency.NO_EXPORTS_REFERENCED; + } + + get type() { + return "new Worker()"; + } + + get category() { + return "worker"; + } +} + +WorkerDependency.Template = class WorkerDependencyTemplate extends ( + ModuleDependency.Template +) { + /** + * @param {Dependency} dependency the dependency for which the template should be applied + * @param {ReplaceSource} source the current replace source which can be modified + * @param {DependencyTemplateContext} templateContext the context object + * @returns {void} + */ + apply(dependency, source, templateContext) { + const { chunkGraph, moduleGraph, runtimeRequirements } = templateContext; + const dep = /** @type {WorkerDependency} */ (dependency); + const block = /** @type {AsyncDependenciesBlock} */ (moduleGraph.getParentBlock( + dependency + )); + const entrypoint = /** @type {Entrypoint} */ (chunkGraph.getBlockChunkGroup( + block + )); + const chunk = entrypoint.getEntrypointChunk(); + + runtimeRequirements.add(RuntimeGlobals.publicPath); + runtimeRequirements.add(RuntimeGlobals.baseURI); + runtimeRequirements.add(RuntimeGlobals.getChunkScriptFilename); + + source.replace( + dep.range[0], + dep.range[1] - 1, + `/* worker import */ ${RuntimeGlobals.publicPath} + ${ + RuntimeGlobals.getChunkScriptFilename + }(${JSON.stringify(chunk.id)}), ${RuntimeGlobals.baseURI}` + ); + } +}; + +makeSerializable(WorkerDependency, "webpack/lib/dependencies/WorkerDependency"); + +module.exports = WorkerDependency; + + +/***/ }), + +/***/ 41006: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { pathToFileURL } = __webpack_require__(78835); +const AsyncDependenciesBlock = __webpack_require__(72624); +const CommentCompilationWarning = __webpack_require__(41985); +const UnsupportedFeatureWarning = __webpack_require__(61809); +const formatLocation = __webpack_require__(82476); +const EnableChunkLoadingPlugin = __webpack_require__(41952); +const { equals } = __webpack_require__(92459); +const { contextify } = __webpack_require__(47779); +const { + harmonySpecifierTag +} = __webpack_require__(76426); +const WorkerDependency = __webpack_require__(31479); + +/** @typedef {import("estree").Expression} Expression */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Entrypoint").EntryOptions} EntryOptions */ +/** @typedef {import("../javascript/BasicEvaluatedExpression")} BasicEvaluatedExpression */ +/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ +/** @typedef {import("./HarmonyImportDependencyParserPlugin").HarmonySettings} HarmonySettings */ + +const getUrl = module => { + return pathToFileURL(module.resource).toString(); +}; + +const DEFAULT_SYNTAX = [ + "Worker", + "SharedWorker", + "navigator.serviceWorker.register()", + "Worker from worker_threads" +]; + +class WorkerPlugin { + constructor(chunkLoading) { + this._chunkLoading = chunkLoading; + } + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + if (this._chunkLoading) { + new EnableChunkLoadingPlugin(this._chunkLoading).apply(compiler); + } + const cachedContextify = contextify.bindContextCache( + compiler.context, + compiler.root + ); + compiler.hooks.thisCompilation.tap( + "WorkerPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + WorkerDependency, + normalModuleFactory + ); + compilation.dependencyTemplates.set( + WorkerDependency, + new WorkerDependency.Template() + ); + + /** + * @param {JavascriptParser} parser the parser + * @param {Expression} expr expression + * @returns {[BasicEvaluatedExpression, [number, number]]} parsed + */ + const parseModuleUrl = (parser, expr) => { + if ( + expr.type !== "NewExpression" || + expr.callee.type === "Super" || + expr.arguments.length !== 2 + ) + return; + const [arg1, arg2] = expr.arguments; + if (arg1.type === "SpreadElement") return; + if (arg2.type === "SpreadElement") return; + const callee = parser.evaluateExpression(expr.callee); + if (!callee.isIdentifier() || callee.identifier !== "URL") return; + const arg2Value = parser.evaluateExpression(arg2); + if ( + !arg2Value.isString() || + !arg2Value.string.startsWith("file://") || + arg2Value.string !== getUrl(parser.state.module) + ) { + return; + } + const arg1Value = parser.evaluateExpression(arg1); + return [arg1Value, [arg1.range[0], arg2.range[1]]]; + }; + + /** + * @param {JavascriptParser} parser the parser + * @param {Expression} expr expression + * @returns {object | undefined} parsed object + */ + const parseObjectLiteral = (parser, expr) => { + if (expr.type !== "ObjectExpression") return; + const obj = {}; + for (const prop of expr.properties) { + if (prop.type === "Property") { + if ( + !prop.method && + !prop.computed && + !prop.shorthand && + prop.key.type === "Identifier" && + !prop.value.type.endsWith("Pattern") + ) { + const value = parser.evaluateExpression( + /** @type {Expression} */ (prop.value) + ); + if (value.isCompileTimeValue()) + obj[prop.key.name] = value.asCompileTimeValue(); + } + } + } + return obj; + }; + + /** + * @param {JavascriptParser} parser the parser + * @param {object} parserOptions options + */ + const parserPlugin = (parser, parserOptions) => { + if (parserOptions.worker === false) return; + const options = !Array.isArray(parserOptions.worker) + ? ["..."] + : parserOptions.worker; + const handleNewWorker = expr => { + if (expr.arguments.length === 0 || expr.arguments.length > 2) + return; + const [arg1, arg2] = expr.arguments; + if (arg1.type === "SpreadElement") return; + if (arg2 && arg2.type === "SpreadElement") return; + const parsedUrl = parseModuleUrl(parser, arg1); + if (!parsedUrl) return; + const [url, range] = parsedUrl; + if (url.isString()) { + const options = arg2 && parseObjectLiteral(parser, arg2); + const { + options: importOptions, + errors: commentErrors + } = parser.parseCommentOptions(expr.range); + + if (commentErrors) { + for (const e of commentErrors) { + const { comment } = e; + parser.state.module.addWarning( + new CommentCompilationWarning( + `Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`, + comment.loc + ) + ); + } + } + + /** @type {EntryOptions} */ + let entryOptions = {}; + + if (importOptions) { + if (importOptions.webpackIgnore !== undefined) { + if (typeof importOptions.webpackIgnore !== "boolean") { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackIgnore\` expected a boolean, but received: ${importOptions.webpackIgnore}.`, + expr.loc + ) + ); + } else { + if (importOptions.webpackIgnore) { + return false; + } + } + } + if (importOptions.webpackEntryOptions !== undefined) { + if ( + typeof importOptions.webpackEntryOptions !== "object" || + importOptions.webpackEntryOptions === null + ) { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackEntryOptions\` expected a object, but received: ${importOptions.webpackEntryOptions}.`, + expr.loc + ) + ); + } else { + Object.assign( + entryOptions, + importOptions.webpackEntryOptions + ); + } + } + if (importOptions.webpackChunkName !== undefined) { + if (typeof importOptions.webpackChunkName !== "string") { + parser.state.module.addWarning( + new UnsupportedFeatureWarning( + `\`webpackChunkName\` expected a string, but received: ${importOptions.webpackChunkName}.`, + expr.loc + ) + ); + } else { + entryOptions.name = importOptions.webpackChunkName; + } + } + } + + if ( + !Object.prototype.hasOwnProperty.call(entryOptions, "name") && + options && + options.name + ) { + entryOptions.name = options.name; + } + + if (!entryOptions.runtime) { + entryOptions.runtime = `${cachedContextify( + parser.state.module.identifier() + )}|${formatLocation(expr.loc)}`; + } + + const block = new AsyncDependenciesBlock({ + name: entryOptions.name, + entryOptions: { + chunkLoading: this._chunkLoading, + ...entryOptions + } + }); + block.loc = expr.loc; + const dep = new WorkerDependency(url.string, range); + dep.loc = expr.loc; + block.addDependency(dep); + parser.state.module.addBlock(block); + parser.walkExpression(expr.callee); + if (arg2) parser.walkExpression(arg2); + return true; + } + }; + const processItem = item => { + if (item.endsWith("()")) { + parser.hooks.call + .for(item.slice(0, -2)) + .tap("WorkerPlugin", handleNewWorker); + } else { + const match = /^(.+?)(\(\))?\s+from\s+(.+)$/.exec(item); + if (match) { + const ids = match[1].split("."); + const call = match[2]; + const source = match[3]; + (call ? parser.hooks.call : parser.hooks.new) + .for(harmonySpecifierTag) + .tap("WorkerPlugin", expr => { + const settings = /** @type {HarmonySettings} */ (parser.currentTagData); + if ( + !settings || + settings.source !== source || + !equals(settings.ids, ids) + ) { + return; + } + return handleNewWorker(expr); + }); + } else { + parser.hooks.new.for(item).tap("WorkerPlugin", handleNewWorker); + } + } + }; + for (const item of options) { + if (item === "...") { + DEFAULT_SYNTAX.forEach(processItem); + } else processItem(item); + } + }; + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("WorkerPlugin", parserPlugin); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("WorkerPlugin", parserPlugin); + } + ); + } +} +module.exports = WorkerPlugin; + + +/***/ }), + +/***/ 22671: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +module.exports = expr => { + // + if ( + expr.type === "FunctionExpression" || + expr.type === "ArrowFunctionExpression" + ) { + return { + fn: expr, + expressions: [], + needThis: false + }; + } + + // .bind() + if ( + expr.type === "CallExpression" && + expr.callee.type === "MemberExpression" && + expr.callee.object.type === "FunctionExpression" && + expr.callee.property.type === "Identifier" && + expr.callee.property.name === "bind" && + expr.arguments.length === 1 + ) { + return { + fn: expr.callee.object, + expressions: [expr.arguments[0]], + needThis: undefined + }; + } + // (function(_this) {return })(this) (Coffeescript) + if ( + expr.type === "CallExpression" && + expr.callee.type === "FunctionExpression" && + expr.callee.body.type === "BlockStatement" && + expr.arguments.length === 1 && + expr.arguments[0].type === "ThisExpression" && + expr.callee.body.body && + expr.callee.body.body.length === 1 && + expr.callee.body.body[0].type === "ReturnStatement" && + expr.callee.body.body[0].argument && + expr.callee.body.body[0].argument.type === "FunctionExpression" + ) { + return { + fn: expr.callee.body.body[0].argument, + expressions: [], + needThis: true + }; + } +}; + + +/***/ }), + +/***/ 1837: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { UsageState } = __webpack_require__(54227); + +/** @typedef {import("../ExportsInfo").ExportInfo} ExportInfo */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * @param {RuntimeSpec} runtime the runtime + * @param {string[][]} referencedExports list of referenced exports, will be added to + * @param {string[]} prefix export prefix + * @param {ExportInfo=} exportInfo the export info + * @param {boolean} defaultPointsToSelf when true, using default will reference itself + * @param {Set} alreadyVisited already visited export info (to handle circular reexports) + */ +const processExportInfo = ( + runtime, + referencedExports, + prefix, + exportInfo, + defaultPointsToSelf = false, + alreadyVisited = new Set() +) => { + if (!exportInfo) { + referencedExports.push(prefix); + return; + } + const used = exportInfo.getUsed(runtime); + if (used === UsageState.Unused) return; + if (alreadyVisited.has(exportInfo)) { + referencedExports.push(prefix); + return; + } + alreadyVisited.add(exportInfo); + if ( + used !== UsageState.OnlyPropertiesUsed || + !exportInfo.exportsInfo || + exportInfo.exportsInfo.otherExportsInfo.getUsed(runtime) !== + UsageState.Unused + ) { + alreadyVisited.delete(exportInfo); + referencedExports.push(prefix); + return; + } + const exportsInfo = exportInfo.exportsInfo; + for (const exportInfo of exportsInfo.orderedExports) { + processExportInfo( + runtime, + referencedExports, + defaultPointsToSelf && exportInfo.name === "default" + ? prefix + : prefix.concat(exportInfo.name), + exportInfo, + false, + alreadyVisited + ); + } + alreadyVisited.delete(exportInfo); +}; +module.exports = processExportInfo; + + +/***/ }), + +/***/ 27583: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ExternalsPlugin = __webpack_require__(19056); + +/** @typedef {import("../Compiler")} Compiler */ + +class ElectronTargetPlugin { + /** + * @param {"main" | "preload" | "renderer"=} context in main, preload or renderer context? + */ + constructor(context) { + this._context = context; + } + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + new ExternalsPlugin("commonjs", [ + "clipboard", + "crash-reporter", + "electron", + "ipc", + "native-image", + "original-fs", + "screen", + "shell" + ]).apply(compiler); + switch (this._context) { + case "main": + new ExternalsPlugin("commonjs", [ + "app", + "auto-updater", + "browser-window", + "content-tracing", + "dialog", + "global-shortcut", + "ipc-main", + "menu", + "menu-item", + "power-monitor", + "power-save-blocker", + "protocol", + "session", + "tray", + "web-contents" + ]).apply(compiler); + break; + case "preload": + case "renderer": + new ExternalsPlugin("commonjs", [ + "desktop-capturer", + "ipc-renderer", + "remote", + "web-frame" + ]).apply(compiler); + break; + } + } +} + +module.exports = ElectronTargetPlugin; + + +/***/ }), + +/***/ 12339: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("../Module")} Module */ + +class BuildCycleError extends WebpackError { + /** + * Creates an instance of ModuleDependencyError. + * @param {Module} module the module starting the cycle + */ + constructor(module) { + super( + "There is a circular build dependency, which makes it impossible to create this module" + ); + + this.name = "BuildCycleError"; + this.module = module; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = BuildCycleError; + + +/***/ }), + +/***/ 82476: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Dependency").SourcePosition} SourcePosition */ + +/** + * @param {SourcePosition} pos position + * @returns {string} formatted position + */ +const formatPosition = pos => { + if (pos && typeof pos === "object") { + if ("line" in pos && "column" in pos) { + return `${pos.line}:${pos.column}`; + } else if ("line" in pos) { + return `${pos.line}:?`; + } + } + return ""; +}; + +/** + * @param {DependencyLocation} loc location + * @returns {string} formatted location + */ +const formatLocation = loc => { + if (loc && typeof loc === "object") { + if ("start" in loc && loc.start && "end" in loc && loc.end) { + if ( + typeof loc.start === "object" && + typeof loc.start.line === "number" && + typeof loc.end === "object" && + typeof loc.end.line === "number" && + typeof loc.end.column === "number" && + loc.start.line === loc.end.line + ) { + return `${formatPosition(loc.start)}-${loc.end.column}`; + } else if ( + typeof loc.start === "object" && + typeof loc.start.line === "number" && + typeof loc.start.column !== "number" && + typeof loc.end === "object" && + typeof loc.end.line === "number" && + typeof loc.end.column !== "number" + ) { + return `${loc.start.line}-${loc.end.line}`; + } else { + return `${formatPosition(loc.start)}-${formatPosition(loc.end)}`; + } + } + if ("start" in loc && loc.start) { + return formatPosition(loc.start); + } + if ("name" in loc && "index" in loc) { + return `${loc.name}[${loc.index}]`; + } + if ("name" in loc) { + return loc.name; + } + } + return ""; +}; + +module.exports = formatLocation; + + +/***/ }), + +/***/ 3588: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +class HotModuleReplacementRuntimeModule extends RuntimeModule { + constructor() { + super("hot module replacement", RuntimeModule.STAGE_BASIC); + } + /** + * @returns {string} runtime code + */ + generate() { + return Template.getFunctionContent( + require('./HotModuleReplacement.runtime.js') + ) + .replace(/\$getFullHash\$/g, RuntimeGlobals.getFullHash) + .replace( + /\$interceptModuleExecution\$/g, + RuntimeGlobals.interceptModuleExecution + ) + .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) + .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) + .replace(/\$hmrDownloadManifest\$/g, RuntimeGlobals.hmrDownloadManifest) + .replace( + /\$hmrInvalidateModuleHandlers\$/g, + RuntimeGlobals.hmrInvalidateModuleHandlers + ) + .replace( + /\$hmrDownloadUpdateHandlers\$/g, + RuntimeGlobals.hmrDownloadUpdateHandlers + ); + } +} + +module.exports = HotModuleReplacementRuntimeModule; + + +/***/ }), + +/***/ 82909: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { find } = __webpack_require__(86088); +const { + compareModulesByPreOrderIndexOrIdentifier, + compareModulesByPostOrderIndexOrIdentifier +} = __webpack_require__(21699); + +/** @typedef {import("../Compiler")} Compiler */ + +class ChunkModuleIdRangePlugin { + constructor(options) { + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap("ChunkModuleIdRangePlugin", compilation => { + const moduleGraph = compilation.moduleGraph; + compilation.hooks.moduleIds.tap("ChunkModuleIdRangePlugin", modules => { + const chunkGraph = compilation.chunkGraph; + const chunk = find( + compilation.chunks, + chunk => chunk.name === options.name + ); + if (!chunk) { + throw new Error( + `ChunkModuleIdRangePlugin: Chunk with name '${options.name}"' was not found` + ); + } + + let chunkModules; + if (options.order) { + let cmpFn; + switch (options.order) { + case "index": + case "preOrderIndex": + cmpFn = compareModulesByPreOrderIndexOrIdentifier(moduleGraph); + break; + case "index2": + case "postOrderIndex": + cmpFn = compareModulesByPostOrderIndexOrIdentifier(moduleGraph); + break; + default: + throw new Error( + "ChunkModuleIdRangePlugin: unexpected value of order" + ); + } + chunkModules = chunkGraph.getOrderedChunkModules(chunk, cmpFn); + } else { + chunkModules = Array.from(modules) + .filter(m => { + return chunkGraph.isModuleInChunk(m, chunk); + }) + .sort(compareModulesByPreOrderIndexOrIdentifier(moduleGraph)); + } + + let currentId = options.start || 0; + for (let i = 0; i < chunkModules.length; i++) { + const m = chunkModules[i]; + if (m.needId && chunkGraph.getModuleId(m) === null) { + chunkGraph.setModuleId(m, currentId++); + } + if (options.end && currentId > options.end) break; + } + }); + }); + } +} +module.exports = ChunkModuleIdRangePlugin; + + +/***/ }), + +/***/ 52701: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + + +const { compareChunksNatural } = __webpack_require__(21699); +const { + getFullChunkName, + getUsedChunkIds, + assignDeterministicIds +} = __webpack_require__(65451); + +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +class DeterministicChunkIdsPlugin { + constructor(options) { + this.options = options || {}; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "DeterministicChunkIdsPlugin", + compilation => { + compilation.hooks.chunkIds.tap( + "DeterministicChunkIdsPlugin", + chunks => { + const chunkGraph = compilation.chunkGraph; + const context = this.options.context + ? this.options.context + : compiler.context; + const maxLength = this.options.maxLength || 3; + + const compareNatural = compareChunksNatural(chunkGraph); + + const usedIds = getUsedChunkIds(compilation); + assignDeterministicIds( + Array.from(chunks).filter(chunk => { + return chunk.id === null; + }), + chunk => + getFullChunkName(chunk, chunkGraph, context, compiler.root), + compareNatural, + (chunk, id) => { + const size = usedIds.size; + usedIds.add(`${id}`); + if (size === usedIds.size) return false; + chunk.id = id; + chunk.ids = [id]; + return true; + }, + [Math.pow(10, maxLength)], + 10, + usedIds.size + ); + } + ); + } + ); + } +} + +module.exports = DeterministicChunkIdsPlugin; + + +/***/ }), + +/***/ 66233: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + + +const { + compareModulesByPreOrderIndexOrIdentifier +} = __webpack_require__(21699); +const { + getUsedModuleIds, + getFullModuleName, + assignDeterministicIds +} = __webpack_require__(65451); + +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +class DeterministicModuleIdsPlugin { + constructor(options) { + this.options = options || {}; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "DeterministicModuleIdsPlugin", + compilation => { + compilation.hooks.moduleIds.tap( + "DeterministicModuleIdsPlugin", + modules => { + const chunkGraph = compilation.chunkGraph; + const context = this.options.context + ? this.options.context + : compiler.context; + const maxLength = this.options.maxLength || 3; + + const usedIds = getUsedModuleIds(compilation); + assignDeterministicIds( + Array.from(modules).filter(module => { + if (!module.needId) return false; + if (chunkGraph.getNumberOfModuleChunks(module) === 0) + return false; + return chunkGraph.getModuleId(module) === null; + }), + module => getFullModuleName(module, context, compiler.root), + compareModulesByPreOrderIndexOrIdentifier( + compilation.moduleGraph + ), + (module, id) => { + const size = usedIds.size; + usedIds.add(`${id}`); + if (size === usedIds.size) return false; + chunkGraph.setModuleId(module, id); + return true; + }, + [Math.pow(10, maxLength)], + 10, + usedIds.size + ); + } + ); + } + ); + } +} + +module.exports = DeterministicModuleIdsPlugin; + + +/***/ }), + +/***/ 400: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* module decorator */ module = __webpack_require__.nmd(module); +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(91129); +const { + compareModulesByPreOrderIndexOrIdentifier +} = __webpack_require__(21699); +const createHash = __webpack_require__(34627); +const { getUsedModuleIds, getFullModuleName } = __webpack_require__(65451); + +/** @typedef {import("../../declarations/plugins/HashedModuleIdsPlugin").HashedModuleIdsPluginOptions} HashedModuleIdsPluginOptions */ + +class HashedModuleIdsPlugin { + /** + * @param {HashedModuleIdsPluginOptions=} options options object + */ + constructor(options = {}) { + validate(schema, options, { + name: "Hashed Module Ids Plugin", + baseDataPath: "options" + }); + + /** @type {HashedModuleIdsPluginOptions} */ + this.options = { + context: null, + hashFunction: "md4", + hashDigest: "base64", + hashDigestLength: 4, + ...options + }; + } + + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap("HashedModuleIdsPlugin", compilation => { + compilation.hooks.moduleIds.tap("HashedModuleIdsPlugin", modules => { + const chunkGraph = compilation.chunkGraph; + const context = this.options.context + ? this.options.context + : compiler.context; + + const usedIds = getUsedModuleIds(compilation); + const modulesInNaturalOrder = Array.from(modules) + .filter(m => { + if (!m.needId) return false; + if (chunkGraph.getNumberOfModuleChunks(m) === 0) return false; + return chunkGraph.getModuleId(module) === null; + }) + .sort( + compareModulesByPreOrderIndexOrIdentifier(compilation.moduleGraph) + ); + for (const module of modulesInNaturalOrder) { + const ident = getFullModuleName(module, context, compiler.root); + const hash = createHash(options.hashFunction); + hash.update(ident || ""); + const hashId = /** @type {string} */ (hash.digest( + options.hashDigest + )); + let len = options.hashDigestLength; + while (usedIds.has(hashId.substr(0, len))) len++; + const moduleId = hashId.substr(0, len); + chunkGraph.setModuleId(module, moduleId); + usedIds.add(moduleId); + } + }); + }); + } +} + +module.exports = HashedModuleIdsPlugin; + + +/***/ }), + +/***/ 65451: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const createHash = __webpack_require__(34627); +const { makePathsRelative } = __webpack_require__(47779); +const numberHash = __webpack_require__(45930); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Module")} Module */ + +/** + * @param {string} str string to hash + * @param {number} len max length of the hash + * @returns {string} hash + */ +const getHash = (str, len) => { + const hash = createHash("md4"); + hash.update(str); + const digest = /** @type {string} */ (hash.digest("hex")); + return digest.substr(0, len); +}; + +/** + * @param {string} str the string + * @returns {string} string prefixed by an underscore if it is a number + */ +const avoidNumber = str => { + // max length of a number is 21 chars, bigger numbers a written as "...e+xx" + if (str.length > 21) return str; + const firstChar = str.charCodeAt(0); + // skip everything that doesn't look like a number + // charCodes: "-": 45, "1": 49, "9": 57 + if (firstChar < 49) { + if (firstChar !== 45) return str; + } else if (firstChar > 57) { + return str; + } + if (str === +str + "") { + return `_${str}`; + } + return str; +}; + +/** + * @param {string} request the request + * @returns {string} id representation + */ +const requestToId = request => { + return request + .replace(/^(\.\.?\/)+/, "") + .replace(/(^[.-]|[^a-zA-Z0-9_-])+/g, "_"); +}; +exports.requestToId = requestToId; + +/** + * @param {string} string the string + * @param {string} delimiter separator for string and hash + * @returns {string} string with limited max length to 100 chars + */ +const shortenLongString = (string, delimiter) => { + if (string.length < 100) return string; + return ( + string.slice(0, 100 - 6 - delimiter.length) + delimiter + getHash(string, 6) + ); +}; + +/** + * @param {Module} module the module + * @param {string} context context directory + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {string} short module name + */ +const getShortModuleName = (module, context, associatedObjectForCache) => { + return avoidNumber( + module.libIdent({ context, associatedObjectForCache }) || "" + ); +}; +exports.getShortModuleName = getShortModuleName; + +/** + * @param {string} shortName the short name + * @param {Module} module the module + * @param {string} context context directory + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {string} long module name + */ +const getLongModuleName = ( + shortName, + module, + context, + associatedObjectForCache +) => { + const fullName = getFullModuleName(module, context, associatedObjectForCache); + return `${shortName}?${getHash(fullName, 4)}`; +}; +exports.getLongModuleName = getLongModuleName; + +/** + * @param {Module} module the module + * @param {string} context context directory + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {string} full module name + */ +const getFullModuleName = (module, context, associatedObjectForCache) => { + return makePathsRelative( + context, + module.identifier(), + associatedObjectForCache + ); +}; +exports.getFullModuleName = getFullModuleName; + +/** + * @param {Chunk} chunk the chunk + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {string} context context directory + * @param {string} delimiter delimiter for names + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {string} short chunk name + */ +const getShortChunkName = ( + chunk, + chunkGraph, + context, + delimiter, + associatedObjectForCache +) => { + const modules = chunkGraph.getChunkRootModules(chunk); + const shortModuleNames = modules.map(m => + requestToId(getShortModuleName(m, context, associatedObjectForCache)) + ); + chunk.idNameHints.sort(); + const chunkName = Array.from(chunk.idNameHints) + .concat(shortModuleNames) + .filter(Boolean) + .join(delimiter); + return shortenLongString(chunkName, delimiter); +}; +exports.getShortChunkName = getShortChunkName; + +/** + * @param {Chunk} chunk the chunk + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {string} context context directory + * @param {string} delimiter delimiter for names + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {string} short chunk name + */ +const getLongChunkName = ( + chunk, + chunkGraph, + context, + delimiter, + associatedObjectForCache +) => { + const modules = chunkGraph.getChunkRootModules(chunk); + const shortModuleNames = modules.map(m => + requestToId(getShortModuleName(m, context, associatedObjectForCache)) + ); + const longModuleNames = modules.map(m => + requestToId(getLongModuleName("", m, context, associatedObjectForCache)) + ); + chunk.idNameHints.sort(); + const chunkName = Array.from(chunk.idNameHints) + .concat(shortModuleNames, longModuleNames) + .filter(Boolean) + .join(delimiter); + return shortenLongString(chunkName, delimiter); +}; +exports.getLongChunkName = getLongChunkName; + +/** + * @param {Chunk} chunk the chunk + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {string} context context directory + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {string} full chunk name + */ +const getFullChunkName = ( + chunk, + chunkGraph, + context, + associatedObjectForCache +) => { + if (chunk.name) return chunk.name; + const modules = chunkGraph.getChunkRootModules(chunk); + const fullModuleNames = modules.map(m => + makePathsRelative(context, m.identifier(), associatedObjectForCache) + ); + return fullModuleNames.join(); +}; +exports.getFullChunkName = getFullChunkName; + +/** + * @template K + * @template V + * @param {Map} map a map from key to values + * @param {K} key key + * @param {V} value value + * @returns {void} + */ +const addToMapOfItems = (map, key, value) => { + let array = map.get(key); + if (array === undefined) { + array = []; + map.set(key, array); + } + array.push(value); +}; + +/** + * @param {Compilation} compilation the compilation + * @returns {Set} used module ids as strings + */ +const getUsedModuleIds = compilation => { + const chunkGraph = compilation.chunkGraph; + + /** @type {Set} */ + const usedIds = new Set(); + if (compilation.usedModuleIds) { + for (const id of compilation.usedModuleIds) { + usedIds.add(id + ""); + } + } + + for (const module of compilation.modules) { + const moduleId = chunkGraph.getModuleId(module); + if (moduleId !== null) { + usedIds.add(moduleId + ""); + } + } + + return usedIds; +}; +exports.getUsedModuleIds = getUsedModuleIds; + +/** + * @param {Compilation} compilation the compilation + * @returns {Set} used chunk ids as strings + */ +const getUsedChunkIds = compilation => { + /** @type {Set} */ + const usedIds = new Set(); + if (compilation.usedChunkIds) { + for (const id of compilation.usedChunkIds) { + usedIds.add(id + ""); + } + } + + for (const chunk of compilation.chunks) { + const chunkId = chunk.id; + if (chunkId !== null) { + usedIds.add(chunkId + ""); + } + } + + return usedIds; +}; +exports.getUsedChunkIds = getUsedChunkIds; + +/** + * @template T + * @param {Iterable} items list of items to be named + * @param {function(T): string} getShortName get a short name for an item + * @param {function(T, string): string} getLongName get a long name for an item + * @param {function(T, T): -1|0|1} comparator order of items + * @param {Set} usedIds already used ids, will not be assigned + * @param {function(T, string): void} assignName assign a name to an item + * @returns {T[]} list of items without a name + */ +const assignNames = ( + items, + getShortName, + getLongName, + comparator, + usedIds, + assignName +) => { + /** @type {Map} */ + const nameToItems = new Map(); + + for (const item of items) { + const name = getShortName(item); + addToMapOfItems(nameToItems, name, item); + } + + /** @type {Map} */ + const nameToItems2 = new Map(); + + for (const [name, items] of nameToItems) { + if (items.length > 1 || !name) { + for (const item of items) { + const longName = getLongName(item, name); + addToMapOfItems(nameToItems2, longName, item); + } + } else { + addToMapOfItems(nameToItems2, name, items[0]); + } + } + + /** @type {T[]} */ + const unnamedItems = []; + + for (const [name, items] of nameToItems2) { + if (!name) { + for (const item of items) { + unnamedItems.push(item); + } + } else if (items.length === 1 && !usedIds.has(name)) { + assignName(items[0], name); + usedIds.add(name); + } else { + items.sort(comparator); + let i = 0; + for (const item of items) { + while (nameToItems2.has(name + i) && usedIds.has(name + i)) i++; + assignName(item, name + i); + usedIds.add(name + i); + i++; + } + } + } + + unnamedItems.sort(comparator); + return unnamedItems; +}; +exports.assignNames = assignNames; + +/** + * @template T + * @param {T[]} items list of items to be named + * @param {function(T): string} getName get a name for an item + * @param {function(T, T): -1|0|1} comparator order of items + * @param {function(T, number): boolean} assignId assign an id to an item + * @param {number[]} ranges usable ranges for ids + * @param {number} expandFactor factor to create more ranges + * @param {number} extraSpace extra space to allocate, i. e. when some ids are already used + * @returns {void} + */ +const assignDeterministicIds = ( + items, + getName, + comparator, + assignId, + ranges = [10], + expandFactor = 10, + extraSpace = 0 +) => { + items.sort(comparator); + + // max 5% fill rate + const optimalRange = Math.min( + Math.ceil(items.length * 20) + extraSpace, + Number.MAX_SAFE_INTEGER + ); + + let i = 0; + let range = ranges[i]; + while (range < optimalRange) { + i++; + if (i < ranges.length) { + range = Math.min(ranges[i], Number.MAX_SAFE_INTEGER); + } else { + range = Math.min(range * expandFactor, Number.MAX_SAFE_INTEGER); + } + } + + for (const item of items) { + const ident = getName(item); + let id; + let i = 0; + do { + id = numberHash(ident + i++, range); + } while (!assignId(item, id)); + } +}; +exports.assignDeterministicIds = assignDeterministicIds; + +/** + * @param {Iterable} modules the modules + * @param {Compilation} compilation the compilation + * @returns {void} + */ +const assignAscendingModuleIds = (modules, compilation) => { + const chunkGraph = compilation.chunkGraph; + + const usedIds = getUsedModuleIds(compilation); + + let nextId = 0; + let assignId; + if (usedIds.size > 0) { + assignId = module => { + if (chunkGraph.getModuleId(module) === null) { + while (usedIds.has(nextId + "")) nextId++; + chunkGraph.setModuleId(module, nextId++); + } + }; + } else { + assignId = module => { + if (chunkGraph.getModuleId(module) === null) { + chunkGraph.setModuleId(module, nextId++); + } + }; + } + for (const module of modules) { + assignId(module); + } +}; +exports.assignAscendingModuleIds = assignAscendingModuleIds; + +/** + * @param {Iterable} chunks the chunks + * @param {Compilation} compilation the compilation + * @returns {void} + */ +const assignAscendingChunkIds = (chunks, compilation) => { + const usedIds = getUsedChunkIds(compilation); + + let nextId = 0; + if (usedIds.size > 0) { + for (const chunk of chunks) { + if (chunk.id === null) { + while (usedIds.has(nextId + "")) nextId++; + chunk.id = nextId; + chunk.ids = [nextId]; + nextId++; + } + } + } else { + for (const chunk of chunks) { + if (chunk.id === null) { + chunk.id = nextId; + chunk.ids = [nextId]; + nextId++; + } + } + } +}; +exports.assignAscendingChunkIds = assignAscendingChunkIds; + + +/***/ }), + +/***/ 97936: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { compareChunksNatural } = __webpack_require__(21699); +const { + getShortChunkName, + getLongChunkName, + assignNames, + getUsedChunkIds, + assignAscendingChunkIds +} = __webpack_require__(65451); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +class NamedChunkIdsPlugin { + constructor(options) { + this.delimiter = (options && options.delimiter) || "-"; + this.context = options && options.context; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("NamedChunkIdsPlugin", compilation => { + compilation.hooks.chunkIds.tap("NamedChunkIdsPlugin", chunks => { + const chunkGraph = compilation.chunkGraph; + const context = this.context ? this.context : compiler.context; + const delimiter = this.delimiter; + + const unnamedChunks = assignNames( + Array.from(chunks).filter(chunk => { + if (chunk.name) { + chunk.id = chunk.name; + chunk.ids = [chunk.name]; + } + return chunk.id === null; + }), + chunk => + getShortChunkName( + chunk, + chunkGraph, + context, + delimiter, + compiler.root + ), + chunk => + getLongChunkName( + chunk, + chunkGraph, + context, + delimiter, + compiler.root + ), + compareChunksNatural(chunkGraph), + getUsedChunkIds(compilation), + (chunk, name) => { + chunk.id = name; + chunk.ids = [name]; + } + ); + if (unnamedChunks.length > 0) { + assignAscendingChunkIds(unnamedChunks, compilation); + } + }); + }); + } +} + +module.exports = NamedChunkIdsPlugin; + + +/***/ }), + +/***/ 94967: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { compareModulesByIdentifier } = __webpack_require__(21699); +const { + getShortModuleName, + getLongModuleName, + assignNames, + getUsedModuleIds, + assignAscendingModuleIds +} = __webpack_require__(65451); + +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +class NamedModuleIdsPlugin { + constructor(options) { + this.options = options || {}; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { root } = compiler; + compiler.hooks.compilation.tap("NamedModuleIdsPlugin", compilation => { + compilation.hooks.moduleIds.tap("NamedModuleIdsPlugin", modules => { + const chunkGraph = compilation.chunkGraph; + const context = this.options.context + ? this.options.context + : compiler.context; + + const unnamedModules = assignNames( + Array.from(modules).filter(module => { + if (!module.needId) return false; + if (chunkGraph.getNumberOfModuleChunks(module) === 0) return false; + return chunkGraph.getModuleId(module) === null; + }), + m => getShortModuleName(m, context, root), + (m, shortName) => getLongModuleName(shortName, m, context, root), + compareModulesByIdentifier, + getUsedModuleIds(compilation), + (m, name) => chunkGraph.setModuleId(m, name) + ); + if (unnamedModules.length > 0) { + assignAscendingModuleIds(unnamedModules, compilation); + } + }); + }); + } +} + +module.exports = NamedModuleIdsPlugin; + + +/***/ }), + +/***/ 7069: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { compareChunksNatural } = __webpack_require__(21699); +const { assignAscendingChunkIds } = __webpack_require__(65451); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +class NaturalChunkIdsPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("NaturalChunkIdsPlugin", compilation => { + compilation.hooks.chunkIds.tap("NaturalChunkIdsPlugin", chunks => { + const chunkGraph = compilation.chunkGraph; + const compareNatural = compareChunksNatural(chunkGraph); + const chunksInNaturalOrder = Array.from(chunks).sort(compareNatural); + assignAscendingChunkIds(chunksInNaturalOrder, compilation); + }); + }); + } +} + +module.exports = NaturalChunkIdsPlugin; + + +/***/ }), + +/***/ 87194: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Florent Cailhol @ooflorent +*/ + + + +const { + compareModulesByPreOrderIndexOrIdentifier +} = __webpack_require__(21699); +const { assignAscendingModuleIds } = __webpack_require__(65451); + +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +class NaturalModuleIdsPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("NaturalModuleIdsPlugin", compilation => { + compilation.hooks.moduleIds.tap("NaturalModuleIdsPlugin", modules => { + const chunkGraph = compilation.chunkGraph; + const modulesInNaturalOrder = Array.from(modules) + .filter( + m => + m.needId && + chunkGraph.getNumberOfModuleChunks(m) > 0 && + chunkGraph.getModuleId(m) === null + ) + .sort( + compareModulesByPreOrderIndexOrIdentifier(compilation.moduleGraph) + ); + assignAscendingModuleIds(modulesInNaturalOrder, compilation); + }); + }); + } +} + +module.exports = NaturalModuleIdsPlugin; + + +/***/ }), + +/***/ 46088: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(76282); +const { compareChunksNatural } = __webpack_require__(21699); +const { assignAscendingChunkIds } = __webpack_require__(65451); + +/** @typedef {import("../../declarations/plugins/ids/OccurrenceChunkIdsPlugin").OccurrenceChunkIdsPluginOptions} OccurrenceChunkIdsPluginOptions */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +class OccurrenceChunkIdsPlugin { + /** + * @param {OccurrenceChunkIdsPluginOptions=} options options object + */ + constructor(options = {}) { + validate(schema, options, { + name: "Occurrence Order Chunk Ids Plugin", + baseDataPath: "options" + }); + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const prioritiseInitial = this.options.prioritiseInitial; + compiler.hooks.compilation.tap("OccurrenceChunkIdsPlugin", compilation => { + compilation.hooks.chunkIds.tap("OccurrenceChunkIdsPlugin", chunks => { + const chunkGraph = compilation.chunkGraph; + + /** @type {Map} */ + const occursInInitialChunksMap = new Map(); + + const compareNatural = compareChunksNatural(chunkGraph); + + for (const c of chunks) { + let occurs = 0; + for (const chunkGroup of c.groupsIterable) { + for (const parent of chunkGroup.parentsIterable) { + if (parent.isInitial()) occurs++; + } + } + occursInInitialChunksMap.set(c, occurs); + } + + const chunksInOccurrenceOrder = Array.from(chunks).sort((a, b) => { + if (prioritiseInitial) { + const aEntryOccurs = occursInInitialChunksMap.get(a); + const bEntryOccurs = occursInInitialChunksMap.get(b); + if (aEntryOccurs > bEntryOccurs) return -1; + if (aEntryOccurs < bEntryOccurs) return 1; + } + const aOccurs = a.getNumberOfGroups(); + const bOccurs = b.getNumberOfGroups(); + if (aOccurs > bOccurs) return -1; + if (aOccurs < bOccurs) return 1; + return compareNatural(a, b); + }); + assignAscendingChunkIds(chunksInOccurrenceOrder, compilation); + }); + }); + } +} + +module.exports = OccurrenceChunkIdsPlugin; + + +/***/ }), + +/***/ 47739: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(63765); +const { + compareModulesByPreOrderIndexOrIdentifier +} = __webpack_require__(21699); +const { assignAscendingModuleIds } = __webpack_require__(65451); + +/** @typedef {import("../../declarations/plugins/ids/OccurrenceModuleIdsPlugin").OccurrenceModuleIdsPluginOptions} OccurrenceModuleIdsPluginOptions */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ + +class OccurrenceModuleIdsPlugin { + /** + * @param {OccurrenceModuleIdsPluginOptions=} options options object + */ + constructor(options = {}) { + validate(schema, options, { + name: "Occurrence Order Module Ids Plugin", + baseDataPath: "options" + }); + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const prioritiseInitial = this.options.prioritiseInitial; + compiler.hooks.compilation.tap("OccurrenceModuleIdsPlugin", compilation => { + const moduleGraph = compilation.moduleGraph; + + compilation.hooks.moduleIds.tap("OccurrenceModuleIdsPlugin", modules => { + const chunkGraph = compilation.chunkGraph; + + const modulesInOccurrenceOrder = Array.from(modules).filter( + m => + m.needId && + chunkGraph.getNumberOfModuleChunks(m) > 0 && + chunkGraph.getModuleId(m) === null + ); + + const occursInInitialChunksMap = new Map(); + const occursInAllChunksMap = new Map(); + + const initialChunkChunkMap = new Map(); + const entryCountMap = new Map(); + for (const m of modulesInOccurrenceOrder) { + let initial = 0; + let entry = 0; + for (const c of chunkGraph.getModuleChunksIterable(m)) { + if (c.canBeInitial()) initial++; + if (chunkGraph.isEntryModuleInChunk(m, c)) entry++; + } + initialChunkChunkMap.set(m, initial); + entryCountMap.set(m, entry); + } + + /** + * @param {Iterable} connections connections + * @returns {number} count of occurs + */ + const countOccursInEntry = connections => { + let sum = 0; + for (const c of connections) { + if (!c.isTargetActive(undefined)) continue; + if (!c.originModule) continue; + sum += initialChunkChunkMap.get(c.originModule); + } + return sum; + }; + + /** + * @param {Iterable} connections connections + * @returns {number} count of occurs + */ + const countOccurs = connections => { + let sum = 0; + for (const c of connections) { + if (!c.isTargetActive(undefined)) continue; + if (!c.originModule) continue; + if (!c.dependency) continue; + const factor = c.dependency.getNumberOfIdOccurrences(); + if (factor === 0) continue; + sum += factor * chunkGraph.getNumberOfModuleChunks(c.originModule); + } + return sum; + }; + + if (prioritiseInitial) { + for (const m of modulesInOccurrenceOrder) { + const result = + countOccursInEntry(moduleGraph.getIncomingConnections(m)) + + initialChunkChunkMap.get(m) + + entryCountMap.get(m); + occursInInitialChunksMap.set(m, result); + } + } + + for (const m of modules) { + const result = + countOccurs(moduleGraph.getIncomingConnections(m)) + + chunkGraph.getNumberOfModuleChunks(m) + + entryCountMap.get(m); + occursInAllChunksMap.set(m, result); + } + + const naturalCompare = compareModulesByPreOrderIndexOrIdentifier( + compilation.moduleGraph + ); + + modulesInOccurrenceOrder.sort((a, b) => { + if (prioritiseInitial) { + const aEntryOccurs = occursInInitialChunksMap.get(a); + const bEntryOccurs = occursInInitialChunksMap.get(b); + if (aEntryOccurs > bEntryOccurs) return -1; + if (aEntryOccurs < bEntryOccurs) return 1; + } + const aOccurs = occursInAllChunksMap.get(a); + const bOccurs = occursInAllChunksMap.get(b); + if (aOccurs > bOccurs) return -1; + if (aOccurs < bOccurs) return 1; + return naturalCompare(a, b); + }); + + assignAscendingModuleIds(modulesInOccurrenceOrder, compilation); + }); + }); + } +} + +module.exports = OccurrenceModuleIdsPlugin; + + +/***/ }), + +/***/ 16520: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const memoize = __webpack_require__(18003); + +/** @typedef {import("../declarations/WebpackOptions").Entry} Entry */ +/** @typedef {import("../declarations/WebpackOptions").EntryNormalized} EntryNormalized */ +/** @typedef {import("../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../declarations/WebpackOptions").ModuleOptions} ModuleOptions */ +/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ +/** @typedef {import("../declarations/WebpackOptions").RuleSetCondition} RuleSetCondition */ +/** @typedef {import("../declarations/WebpackOptions").RuleSetConditionAbsolute} RuleSetConditionAbsolute */ +/** @typedef {import("../declarations/WebpackOptions").RuleSetRule} RuleSetRule */ +/** @typedef {import("../declarations/WebpackOptions").RuleSetUse} RuleSetUse */ +/** @typedef {import("../declarations/WebpackOptions").RuleSetUseItem} RuleSetUseItem */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} Configuration */ +/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptionsNormalized */ +/** @typedef {import("../declarations/WebpackOptions").WebpackPluginFunction} WebpackPluginFunction */ +/** @typedef {import("../declarations/WebpackOptions").WebpackPluginInstance} WebpackPluginInstance */ +/** @typedef {import("./Compilation").Asset} Asset */ +/** @typedef {import("./Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("./Parser").ParserState} ParserState */ + +/** + * @template {Function} T + * @param {function(): T} factory factory function + * @returns {T} function + */ +const lazyFunction = factory => { + const fac = memoize(factory); + const f = /** @type {any} */ ((...args) => { + return fac()(...args); + }); + return /** @type {T} */ (f); +}; + +/** + * @template A + * @template B + * @param {A} obj input a + * @param {B} exports input b + * @returns {A & B} merged + */ +const mergeExports = (obj, exports) => { + const descriptors = Object.getOwnPropertyDescriptors(exports); + for (const name of Object.keys(descriptors)) { + const descriptor = descriptors[name]; + if (descriptor.get) { + const fn = descriptor.get; + Object.defineProperty(obj, name, { + configurable: false, + enumerable: true, + get: memoize(fn) + }); + } else if (typeof descriptor.value === "object") { + Object.defineProperty(obj, name, { + configurable: false, + enumerable: true, + writable: false, + value: mergeExports({}, descriptor.value) + }); + } else { + throw new Error( + "Exposed values must be either a getter or an nested object" + ); + } + } + return /** @type {A & B} */ (Object.freeze(obj)); +}; + +const fn = lazyFunction(() => __webpack_require__(82517)); +module.exports = mergeExports(fn, { + get webpack() { + return __webpack_require__(82517); + }, + get validate() { + const validateSchema = __webpack_require__(19651); + const webpackOptionsSchema = __webpack_require__(15546); + return options => validateSchema(webpackOptionsSchema, options); + }, + get validateSchema() { + const validateSchema = __webpack_require__(19651); + return validateSchema; + }, + get version() { + return /** @type {string} */ (__webpack_require__(32607)/* .version */ .i8); + }, + + get cli() { + return __webpack_require__(84717); + }, + get AutomaticPrefetchPlugin() { + return __webpack_require__(42257); + }, + get BannerPlugin() { + return __webpack_require__(44732); + }, + get Cache() { + return __webpack_require__(18338); + }, + get Chunk() { + return __webpack_require__(92787); + }, + get ChunkGraph() { + return __webpack_require__(67518); + }, + get Compilation() { + return __webpack_require__(75388); + }, + get Compiler() { + return __webpack_require__(51455); + }, + get ConcatenationScope() { + return __webpack_require__(21926); + }, + get ContextExclusionPlugin() { + return __webpack_require__(92306); + }, + get ContextReplacementPlugin() { + return __webpack_require__(39498); + }, + get DefinePlugin() { + return __webpack_require__(76936); + }, + get DelegatedPlugin() { + return __webpack_require__(91472); + }, + get Dependency() { + return __webpack_require__(27563); + }, + get DllPlugin() { + return __webpack_require__(91635); + }, + get DllReferencePlugin() { + return __webpack_require__(49473); + }, + get DynamicEntryPlugin() { + return __webpack_require__(8245); + }, + get EntryOptionPlugin() { + return __webpack_require__(97235); + }, + get EntryPlugin() { + return __webpack_require__(78029); + }, + get EnvironmentPlugin() { + return __webpack_require__(35887); + }, + get EvalDevToolModulePlugin() { + return __webpack_require__(96655); + }, + get EvalSourceMapDevToolPlugin() { + return __webpack_require__(13902); + }, + get ExternalModule() { + return __webpack_require__(24334); + }, + get ExternalsPlugin() { + return __webpack_require__(19056); + }, + get Generator() { + return __webpack_require__(14052); + }, + get HotUpdateChunk() { + return __webpack_require__(90972); + }, + get HotModuleReplacementPlugin() { + return __webpack_require__(26475); + }, + get IgnorePlugin() { + return __webpack_require__(83134); + }, + get JavascriptModulesPlugin() { + return util.deprecate( + () => __webpack_require__(80867), + "webpack.JavascriptModulesPlugin has moved to webpack.javascript.JavascriptModulesPlugin", + "DEP_WEBPACK_JAVASCRIPT_MODULES_PLUGIN" + )(); + }, + get LibManifestPlugin() { + return __webpack_require__(14533); + }, + get LibraryTemplatePlugin() { + return util.deprecate( + () => __webpack_require__(82758), + "webpack.LibraryTemplatePlugin is deprecated and has been replaced by compilation.outputOptions.library or compilation.addEntry + passing a library option", + "DEP_WEBPACK_LIBRARY_TEMPLATE_PLUGIN" + )(); + }, + get LoaderOptionsPlugin() { + return __webpack_require__(53036); + }, + get LoaderTargetPlugin() { + return __webpack_require__(54108); + }, + get Module() { + return __webpack_require__(54031); + }, + get ModuleFilenameHelpers() { + return __webpack_require__(79843); + }, + get ModuleGraph() { + return __webpack_require__(73444); + }, + get ModuleGraphConnection() { + return __webpack_require__(39519); + }, + get NoEmitOnErrorsPlugin() { + return __webpack_require__(49363); + }, + get NormalModule() { + return __webpack_require__(88376); + }, + get NormalModuleReplacementPlugin() { + return __webpack_require__(729); + }, + get MultiCompiler() { + return __webpack_require__(87225); + }, + get Parser() { + return __webpack_require__(85569); + }, + get PrefetchPlugin() { + return __webpack_require__(69145); + }, + get ProgressPlugin() { + return __webpack_require__(19336); + }, + get ProvidePlugin() { + return __webpack_require__(1204); + }, + get RuntimeGlobals() { + return __webpack_require__(48801); + }, + get RuntimeModule() { + return __webpack_require__(54746); + }, + get SingleEntryPlugin() { + return util.deprecate( + () => __webpack_require__(78029), + "SingleEntryPlugin was renamed to EntryPlugin", + "DEP_WEBPACK_SINGLE_ENTRY_PLUGIN" + )(); + }, + get SourceMapDevToolPlugin() { + return __webpack_require__(6280); + }, + get Stats() { + return __webpack_require__(49487); + }, + get Template() { + return __webpack_require__(90751); + }, + get UsageState() { + return __webpack_require__(54227).UsageState; + }, + get WatchIgnorePlugin() { + return __webpack_require__(18956); + }, + get WebpackError() { + return __webpack_require__(24274); + }, + get WebpackOptionsApply() { + return __webpack_require__(8185); + }, + get WebpackOptionsDefaulter() { + return util.deprecate( + () => __webpack_require__(55525), + "webpack.WebpackOptionsDefaulter is deprecated and has been replaced by webpack.config.getNormalizedWebpackOptions and webpack.config.applyWebpackOptionsDefaults", + "DEP_WEBPACK_OPTIONS_DEFAULTER" + )(); + }, + // TODO webpack 6 deprecate + get WebpackOptionsValidationError() { + return __webpack_require__(79286).ValidationError; + }, + get ValidationError() { + return __webpack_require__(79286).ValidationError; + }, + + cache: { + get MemoryCachePlugin() { + return __webpack_require__(80662); + } + }, + + config: { + get getNormalizedWebpackOptions() { + return __webpack_require__(92188).getNormalizedWebpackOptions; + }, + get applyWebpackOptionsDefaults() { + return __webpack_require__(72829).applyWebpackOptionsDefaults; + } + }, + + ids: { + get ChunkModuleIdRangePlugin() { + return __webpack_require__(82909); + }, + get NaturalModuleIdsPlugin() { + return __webpack_require__(87194); + }, + get OccurrenceModuleIdsPlugin() { + return __webpack_require__(47739); + }, + get NamedModuleIdsPlugin() { + return __webpack_require__(94967); + }, + get DeterministicChunkIdsPlugin() { + return __webpack_require__(52701); + }, + get DeterministicModuleIdsPlugin() { + return __webpack_require__(66233); + }, + get NamedChunkIdsPlugin() { + return __webpack_require__(97936); + }, + get OccurrenceChunkIdsPlugin() { + return __webpack_require__(46088); + }, + get HashedModuleIdsPlugin() { + return __webpack_require__(400); + } + }, + + javascript: { + get EnableChunkLoadingPlugin() { + return __webpack_require__(41952); + }, + get JavascriptModulesPlugin() { + return __webpack_require__(80867); + }, + get JavascriptParser() { + return __webpack_require__(87507); + } + }, + + optimize: { + get AggressiveMergingPlugin() { + return __webpack_require__(19168); + }, + get AggressiveSplittingPlugin() { + return util.deprecate( + () => __webpack_require__(13461), + "AggressiveSplittingPlugin is deprecated in favor of SplitChunksPlugin", + "DEP_WEBPACK_AGGRESSIVE_SPLITTING_PLUGIN" + )(); + }, + get LimitChunkCountPlugin() { + return __webpack_require__(73953); + }, + get MinChunkSizePlugin() { + return __webpack_require__(13508); + }, + get ModuleConcatenationPlugin() { + return __webpack_require__(72521); + }, + get RealContentHashPlugin() { + return __webpack_require__(69236); + }, + get RuntimeChunkPlugin() { + return __webpack_require__(49151); + }, + get SideEffectsFlagPlugin() { + return __webpack_require__(72617); + }, + get SplitChunksPlugin() { + return __webpack_require__(93384); + } + }, + + runtime: { + get GetChunkFilenameRuntimeModule() { + return __webpack_require__(88253); + }, + get LoadScriptRuntimeModule() { + return __webpack_require__(23033); + } + }, + + prefetch: { + get ChunkPrefetchPreloadPlugin() { + return __webpack_require__(29184); + } + }, + + web: { + get FetchCompileAsyncWasmPlugin() { + return __webpack_require__(57878); + }, + get FetchCompileWasmPlugin() { + return __webpack_require__(45001); + }, + get JsonpChunkLoadingRuntimeModule() { + return __webpack_require__(84539); + }, + get JsonpTemplatePlugin() { + return __webpack_require__(57279); + } + }, + + webworker: { + get WebWorkerTemplatePlugin() { + return __webpack_require__(39959); + } + }, + + node: { + get NodeEnvironmentPlugin() { + return __webpack_require__(46613); + }, + get NodeSourcePlugin() { + return __webpack_require__(66876); + }, + get NodeTargetPlugin() { + return __webpack_require__(62791); + }, + get NodeTemplatePlugin() { + return __webpack_require__(25514); + }, + get ReadFileCompileWasmPlugin() { + return __webpack_require__(13715); + } + }, + + electron: { + get ElectronTargetPlugin() { + return __webpack_require__(27583); + } + }, + + wasm: { + get AsyncWebAssemblyModulesPlugin() { + return __webpack_require__(78379); + } + }, + + library: { + get AbstractLibraryPlugin() { + return __webpack_require__(66269); + }, + get EnableLibraryPlugin() { + return __webpack_require__(60405); + } + }, + + container: { + get ContainerPlugin() { + return __webpack_require__(93689); + }, + get ContainerReferencePlugin() { + return __webpack_require__(65276); + }, + get ModuleFederationPlugin() { + return __webpack_require__(27481); + }, + get scope() { + return __webpack_require__(57844).scope; + } + }, + + sharing: { + get ConsumeSharedPlugin() { + return __webpack_require__(70904); + }, + get ProvideSharedPlugin() { + return __webpack_require__(67184); + }, + get SharePlugin() { + return __webpack_require__(3533); + }, + get scope() { + return __webpack_require__(57844).scope; + } + }, + + debug: { + get ProfilingPlugin() { + return __webpack_require__(17212); + } + }, + + util: { + get createHash() { + return __webpack_require__(34627); + }, + get comparators() { + return __webpack_require__(21699); + }, + get serialization() { + return __webpack_require__(29158); + }, + get cleverMerge() { + return __webpack_require__(92700).cachedCleverMerge; + }, + get LazySet() { + return __webpack_require__(60248); + } + }, + + get sources() { + return __webpack_require__(55600); + }, + + experiments: { + schemes: { + get HttpUriPlugin() { + return __webpack_require__(53417); + }, + get HttpsUriPlugin() { + return __webpack_require__(80730); + } + } + } +}); + + +/***/ }), + +/***/ 97504: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource } = __webpack_require__(55600); +const HotUpdateChunk = __webpack_require__(90972); +const Template = __webpack_require__(90751); +const { getEntryInfo } = __webpack_require__(39546); +const { + chunkHasJs, + getCompilationHooks +} = __webpack_require__(80867); + +/** @typedef {import("../Compiler")} Compiler */ + +class ArrayPushCallbackChunkFormatPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "ArrayPushCallbackChunkFormatPlugin", + compilation => { + const hooks = getCompilationHooks(compilation); + hooks.renderChunk.tap( + "ArrayPushCallbackChunkFormatPlugin", + (modules, renderContext) => { + const { chunk, chunkGraph, runtimeTemplate } = renderContext; + const hotUpdateChunk = + chunk instanceof HotUpdateChunk ? chunk : null; + const globalObject = runtimeTemplate.outputOptions.globalObject; + const source = new ConcatSource(); + const runtimeModules = chunkGraph.getChunkRuntimeModulesInOrder( + chunk + ); + const runtimePart = + runtimeModules.length > 0 && + Template.renderChunkRuntimeModules(runtimeModules, renderContext); + if (hotUpdateChunk) { + const hotUpdateGlobal = + runtimeTemplate.outputOptions.hotUpdateGlobal; + source.add( + `${globalObject}[${JSON.stringify(hotUpdateGlobal)}](` + ); + source.add(`${JSON.stringify(chunk.id)},`); + source.add(modules); + if (runtimePart) { + source.add(",\n"); + source.add(runtimePart); + } + source.add(")"); + } else { + const chunkLoadingGlobal = + runtimeTemplate.outputOptions.chunkLoadingGlobal; + source.add( + `(${globalObject}[${JSON.stringify( + chunkLoadingGlobal + )}] = ${globalObject}[${JSON.stringify( + chunkLoadingGlobal + )}] || []).push([` + ); + source.add(`${JSON.stringify(chunk.ids)},`); + source.add(modules); + const entries = getEntryInfo(chunkGraph, chunk, c => + chunkHasJs(c, chunkGraph) + ); + const entriesPart = + entries.length > 0 && `,${JSON.stringify(entries)}`; + if (runtimePart || entriesPart) { + source.add(",\n"); + source.add(runtimePart || "0"); + } + if (entriesPart) { + source.add(entriesPart); + } + source.add("])"); + } + return source; + } + ); + hooks.chunkHash.tap( + "ArrayPushCallbackChunkFormatPlugin", + (chunk, hash, { chunkGraph, runtimeTemplate }) => { + if (chunk.hasRuntime()) return; + hash.update("ArrayPushCallbackChunkFormatPlugin"); + hash.update("1"); + hash.update( + JSON.stringify( + getEntryInfo(chunkGraph, chunk, c => chunkHasJs(c, chunkGraph)) + ) + ); + hash.update(`${runtimeTemplate.outputOptions.chunkLoadingGlobal}`); + hash.update(`${runtimeTemplate.outputOptions.hotUpdateGlobal}`); + hash.update(`${runtimeTemplate.outputOptions.globalObject}`); + } + ); + } + ); + } +} + +module.exports = ArrayPushCallbackChunkFormatPlugin; + + +/***/ }), + +/***/ 98288: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("estree").Node} EsTreeNode */ +/** @typedef {import("./JavascriptParser").VariableInfoInterface} VariableInfoInterface */ + +const TypeUnknown = 0; +const TypeUndefined = 1; +const TypeNull = 2; +const TypeString = 3; +const TypeNumber = 4; +const TypeBoolean = 5; +const TypeRegExp = 6; +const TypeConditional = 7; +const TypeArray = 8; +const TypeConstArray = 9; +const TypeIdentifier = 10; +const TypeWrapped = 11; +const TypeTemplateString = 12; +const TypeBigInt = 13; + +class BasicEvaluatedExpression { + constructor() { + this.type = TypeUnknown; + /** @type {[number, number]} */ + this.range = undefined; + /** @type {boolean} */ + this.falsy = false; + /** @type {boolean} */ + this.truthy = false; + /** @type {boolean | undefined} */ + this.nullish = undefined; + /** @type {boolean} */ + this.sideEffects = true; + /** @type {boolean | undefined} */ + this.bool = undefined; + /** @type {number | undefined} */ + this.number = undefined; + /** @type {bigint | undefined} */ + this.bigint = undefined; + /** @type {RegExp | undefined} */ + this.regExp = undefined; + /** @type {string | undefined} */ + this.string = undefined; + /** @type {BasicEvaluatedExpression[] | undefined} */ + this.quasis = undefined; + /** @type {BasicEvaluatedExpression[] | undefined} */ + this.parts = undefined; + /** @type {any[] | undefined} */ + this.array = undefined; + /** @type {BasicEvaluatedExpression[] | undefined} */ + this.items = undefined; + /** @type {BasicEvaluatedExpression[] | undefined} */ + this.options = undefined; + /** @type {BasicEvaluatedExpression | undefined} */ + this.prefix = undefined; + /** @type {BasicEvaluatedExpression | undefined} */ + this.postfix = undefined; + this.wrappedInnerExpressions = undefined; + /** @type {string | undefined} */ + this.identifier = undefined; + /** @type {VariableInfoInterface} */ + this.rootInfo = undefined; + /** @type {() => string[]} */ + this.getMembers = undefined; + /** @type {EsTreeNode} */ + this.expression = undefined; + } + + isUnknown() { + return this.type === TypeUnknown; + } + + isNull() { + return this.type === TypeNull; + } + + isUndefined() { + return this.type === TypeUndefined; + } + + isString() { + return this.type === TypeString; + } + + isNumber() { + return this.type === TypeNumber; + } + + isBigInt() { + return this.type === TypeBigInt; + } + + isBoolean() { + return this.type === TypeBoolean; + } + + isRegExp() { + return this.type === TypeRegExp; + } + + isConditional() { + return this.type === TypeConditional; + } + + isArray() { + return this.type === TypeArray; + } + + isConstArray() { + return this.type === TypeConstArray; + } + + isIdentifier() { + return this.type === TypeIdentifier; + } + + isWrapped() { + return this.type === TypeWrapped; + } + + isTemplateString() { + return this.type === TypeTemplateString; + } + + /** + * Is expression a primitive or an object type value? + * @returns {boolean | undefined} true: primitive type, false: object type, undefined: unknown/runtime-defined + */ + isPrimitiveType() { + switch (this.type) { + case TypeUndefined: + case TypeNull: + case TypeString: + case TypeNumber: + case TypeBoolean: + case TypeBigInt: + case TypeWrapped: + case TypeTemplateString: + return true; + case TypeRegExp: + case TypeArray: + case TypeConstArray: + return false; + default: + return undefined; + } + } + + /** + * Is expression a runtime or compile-time value? + * @returns {boolean} true: compile time value, false: runtime value + */ + isCompileTimeValue() { + switch (this.type) { + case TypeUndefined: + case TypeNull: + case TypeString: + case TypeNumber: + case TypeBoolean: + case TypeRegExp: + case TypeConstArray: + case TypeBigInt: + return true; + default: + return false; + } + } + + /** + * Gets the compile-time value of the expression + * @returns {any} the javascript value + */ + asCompileTimeValue() { + switch (this.type) { + case TypeUndefined: + return undefined; + case TypeNull: + return null; + case TypeString: + return this.string; + case TypeNumber: + return this.number; + case TypeBoolean: + return this.bool; + case TypeRegExp: + return this.regExp; + case TypeConstArray: + return this.array; + case TypeBigInt: + return this.bigint; + default: + throw new Error( + "asCompileTimeValue must only be called for compile-time values" + ); + } + } + + isTruthy() { + return this.truthy; + } + + isFalsy() { + return this.falsy; + } + + isNullish() { + return this.nullish; + } + + /** + * Can this expression have side effects? + * @returns {boolean} false: never has side effects + */ + couldHaveSideEffects() { + return this.sideEffects; + } + + asBool() { + if (this.truthy) return true; + if (this.falsy || this.nullish) return false; + if (this.isBoolean()) return this.bool; + if (this.isNull()) return false; + if (this.isUndefined()) return false; + if (this.isString()) return this.string !== ""; + if (this.isNumber()) return this.number !== 0; + if (this.isBigInt()) return this.bigint !== BigInt(0); + if (this.isRegExp()) return true; + if (this.isArray()) return true; + if (this.isConstArray()) return true; + if (this.isWrapped()) { + return (this.prefix && this.prefix.asBool()) || + (this.postfix && this.postfix.asBool()) + ? true + : undefined; + } + if (this.isTemplateString()) { + const str = this.asString(); + if (typeof str === "string") return str !== ""; + } + return undefined; + } + + asNullish() { + const nullish = this.isNullish(); + + if (nullish === true || this.isNull() || this.isUndefined()) return true; + + if (nullish === false) return false; + if (this.isTruthy()) return false; + if (this.isBoolean()) return false; + if (this.isString()) return false; + if (this.isNumber()) return false; + if (this.isBigInt()) return false; + if (this.isRegExp()) return false; + if (this.isArray()) return false; + if (this.isConstArray()) return false; + if (this.isTemplateString()) return false; + if (this.isRegExp()) return false; + + return undefined; + } + + asString() { + if (this.isBoolean()) return `${this.bool}`; + if (this.isNull()) return "null"; + if (this.isUndefined()) return "undefined"; + if (this.isString()) return this.string; + if (this.isNumber()) return `${this.number}`; + if (this.isBigInt()) return `${this.bigint}`; + if (this.isRegExp()) return `${this.regExp}`; + if (this.isArray()) { + let array = []; + for (const item of this.items) { + const itemStr = item.asString(); + if (itemStr === undefined) return undefined; + array.push(itemStr); + } + return `${array}`; + } + if (this.isConstArray()) return `${this.array}`; + if (this.isTemplateString()) { + let str = ""; + for (const part of this.parts) { + const partStr = part.asString(); + if (partStr === undefined) return undefined; + str += partStr; + } + return str; + } + return undefined; + } + + setString(string) { + this.type = TypeString; + this.string = string; + this.sideEffects = false; + return this; + } + + setUndefined() { + this.type = TypeUndefined; + this.sideEffects = false; + return this; + } + + setNull() { + this.type = TypeNull; + this.sideEffects = false; + return this; + } + + setNumber(number) { + this.type = TypeNumber; + this.number = number; + this.sideEffects = false; + return this; + } + + setBigInt(bigint) { + this.type = TypeBigInt; + this.bigint = bigint; + this.sideEffects = false; + return this; + } + + setBoolean(bool) { + this.type = TypeBoolean; + this.bool = bool; + this.sideEffects = false; + return this; + } + + setRegExp(regExp) { + this.type = TypeRegExp; + this.regExp = regExp; + this.sideEffects = false; + return this; + } + + setIdentifier(identifier, rootInfo, getMembers) { + this.type = TypeIdentifier; + this.identifier = identifier; + this.rootInfo = rootInfo; + this.getMembers = getMembers; + this.sideEffects = true; + return this; + } + + setWrapped(prefix, postfix, innerExpressions) { + this.type = TypeWrapped; + this.prefix = prefix; + this.postfix = postfix; + this.wrappedInnerExpressions = innerExpressions; + this.sideEffects = true; + return this; + } + + setOptions(options) { + this.type = TypeConditional; + this.options = options; + this.sideEffects = true; + return this; + } + + addOptions(options) { + if (!this.options) { + this.type = TypeConditional; + this.options = []; + this.sideEffects = true; + } + for (const item of options) { + this.options.push(item); + } + return this; + } + + setItems(items) { + this.type = TypeArray; + this.items = items; + this.sideEffects = items.some(i => i.couldHaveSideEffects()); + return this; + } + + setArray(array) { + this.type = TypeConstArray; + this.array = array; + this.sideEffects = false; + return this; + } + + setTemplateString(quasis, parts, kind) { + this.type = TypeTemplateString; + this.quasis = quasis; + this.parts = parts; + this.templateStringKind = kind; + this.sideEffects = parts.some(p => p.sideEffects); + return this; + } + + setTruthy() { + this.falsy = false; + this.truthy = true; + this.nullish = false; + return this; + } + + setFalsy() { + this.falsy = true; + this.truthy = false; + return this; + } + + setNullish(value) { + this.nullish = value; + return this; + } + + setRange(range) { + this.range = range; + return this; + } + + setSideEffects(sideEffects = true) { + this.sideEffects = sideEffects; + return this; + } + + setExpression(expression) { + this.expression = expression; + return this; + } +} + +/** + * @param {string} flags regexp flags + * @returns {boolean} is valid flags + */ +BasicEvaluatedExpression.isValidRegExpFlags = flags => { + const len = flags.length; + + if (len === 0) return true; + if (len > 4) return false; + + // cspell:word gimy + let remaining = 0b0000; // bit per RegExp flag: gimy + + for (let i = 0; i < len; i++) + switch (flags.charCodeAt(i)) { + case 103 /* g */: + if (remaining & 0b1000) return false; + remaining |= 0b1000; + break; + case 105 /* i */: + if (remaining & 0b0100) return false; + remaining |= 0b0100; + break; + case 109 /* m */: + if (remaining & 0b0010) return false; + remaining |= 0b0010; + break; + case 121 /* y */: + if (remaining & 0b0001) return false; + remaining |= 0b0001; + break; + default: + return false; + } + + return true; +}; + +module.exports = BasicEvaluatedExpression; + + +/***/ }), + +/***/ 15534: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource } = __webpack_require__(55600); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const { getEntryInfo } = __webpack_require__(39546); +const { + getChunkFilenameTemplate, + chunkHasJs, + getCompilationHooks +} = __webpack_require__(80867); + +/** @typedef {import("../Compiler")} Compiler */ + +class CommonJsChunkFormatPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "CommonJsChunkFormatPlugin", + compilation => { + const hooks = getCompilationHooks(compilation); + hooks.renderChunk.tap( + "CommonJsChunkFormatPlugin", + (modules, renderContext) => { + const { chunk, chunkGraph, runtimeTemplate } = renderContext; + const source = new ConcatSource(); + source.add(`exports.id = ${JSON.stringify(chunk.id)};\n`); + source.add(`exports.ids = ${JSON.stringify(chunk.ids)};\n`); + source.add(`exports.modules = `); + source.add(modules); + source.add(";\n"); + const runtimeModules = chunkGraph.getChunkRuntimeModulesInOrder( + chunk + ); + if (runtimeModules.length > 0) { + source.add("exports.runtime =\n"); + source.add( + Template.renderChunkRuntimeModules( + runtimeModules, + renderContext + ) + ); + } + const entries = Array.from( + chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) + ); + if (entries.length > 0) { + const runtimeChunk = entries[0][1].getRuntimeChunk(); + const currentOutputName = compilation + .getPath( + getChunkFilenameTemplate(chunk, compilation.outputOptions), + { + chunk, + contentHashType: "javascript" + } + ) + .split("/"); + const runtimeOutputName = compilation + .getPath( + getChunkFilenameTemplate( + runtimeChunk, + compilation.outputOptions + ), + { + chunk: runtimeChunk, + contentHashType: "javascript" + } + ) + .split("/"); + + // remove filename, we only need the directory + currentOutputName.pop(); + + // remove common parts + while ( + currentOutputName.length > 0 && + runtimeOutputName.length > 0 && + currentOutputName[0] === runtimeOutputName[0] + ) { + currentOutputName.shift(); + runtimeOutputName.shift(); + } + + // create final path + const runtimePath = + (currentOutputName.length > 0 + ? "../".repeat(currentOutputName.length) + : "./") + runtimeOutputName.join("/"); + + const entrySource = new ConcatSource(); + entrySource.add( + `(${ + runtimeTemplate.supportsArrowFunction() + ? "() => " + : "function() " + }{\n` + ); + entrySource.add("var exports = {};\n"); + entrySource.add(source); + entrySource.add(";\n\n// load runtime\n"); + entrySource.add( + `var __webpack_require__ = require(${JSON.stringify( + runtimePath + )});\n` + ); + entrySource.add( + `${RuntimeGlobals.externalInstallChunk}(exports);\n` + ); + for (let i = 0; i < entries.length; i++) { + const [module, entrypoint] = entries[i]; + entrySource.add( + `${i === entries.length - 1 ? "return " : ""}${ + RuntimeGlobals.startupEntrypoint + }(${JSON.stringify( + entrypoint.chunks + .filter(c => c !== chunk && c !== runtimeChunk) + .map(c => c.id) + )}, ${JSON.stringify(chunkGraph.getModuleId(module))});\n` + ); + } + entrySource.add("})()"); + return entrySource; + } + return source; + } + ); + hooks.chunkHash.tap( + "CommonJsChunkFormatPlugin", + (chunk, hash, { chunkGraph }) => { + if (chunk.hasRuntime()) return; + hash.update("CommonJsChunkFormatPlugin"); + hash.update("1"); + hash.update( + JSON.stringify( + getEntryInfo(chunkGraph, chunk, c => chunkHasJs(c, chunkGraph)) + ) + ); + } + ); + } + ); + } +} + +module.exports = CommonJsChunkFormatPlugin; + + +/***/ }), + +/***/ 41952: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../../declarations/WebpackOptions").ChunkLoadingType} ChunkLoadingType */ +/** @typedef {import("../Compiler")} Compiler */ + +/** @type {WeakMap>} */ +const enabledTypes = new WeakMap(); + +const getEnabledTypes = compiler => { + let set = enabledTypes.get(compiler); + if (set === undefined) { + set = new Set(); + enabledTypes.set(compiler, set); + } + return set; +}; + +class EnableChunkLoadingPlugin { + /** + * @param {ChunkLoadingType} type library type that should be available + */ + constructor(type) { + this.type = type; + } + + /** + * @param {Compiler} compiler the compiler instance + * @param {ChunkLoadingType} type type of library + * @returns {void} + */ + static setEnabled(compiler, type) { + getEnabledTypes(compiler).add(type); + } + + /** + * @param {Compiler} compiler the compiler instance + * @param {ChunkLoadingType} type type of library + * @returns {void} + */ + static checkEnabled(compiler, type) { + if (!getEnabledTypes(compiler).has(type)) { + throw new Error( + `Chunk loading type "${type}" is not enabled. ` + + "EnableChunkLoadingPlugin need to be used to enable this type of chunk loading. " + + 'This usually happens through the "output.enabledChunkLoadingTypes" option. ' + + 'If you are using a function as entry which sets "chunkLoading", you need to add all potential chunk loading types to "output.enabledChunkLoadingTypes". ' + + "These types are enabled: " + + Array.from(getEnabledTypes(compiler)).join(", ") + ); + } + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { type } = this; + + // Only enable once + const enabled = getEnabledTypes(compiler); + if (enabled.has(type)) return; + enabled.add(type); + + if (typeof type === "string") { + switch (type) { + case "jsonp": { + const JsonpChunkLoadingPlugin = __webpack_require__(21335); + new JsonpChunkLoadingPlugin().apply(compiler); + break; + } + case "import-scripts": { + const ImportScriptsChunkLoadingPlugin = __webpack_require__(29845); + new ImportScriptsChunkLoadingPlugin().apply(compiler); + break; + } + case "require": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const CommonJsChunkLoadingPlugin = __webpack_require__(44986); + new CommonJsChunkLoadingPlugin({ + asyncChunkLoading: false + }).apply(compiler); + break; + } + case "async-node": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const CommonJsChunkLoadingPlugin = __webpack_require__(44986); + new CommonJsChunkLoadingPlugin({ + asyncChunkLoading: true + }).apply(compiler); + break; + } + case "import": + // TODO implement import chunk loading + throw new Error("Chunk Loading via import() is not implemented yet"); + case "universal": + // TODO implement universal chunk loading + throw new Error("Universal Chunk Loading is not implemented yet"); + default: + throw new Error(`Unsupported chunk loading type ${type}. +Plugins which provide custom chunk loading types must call EnableChunkLoadingPlugin.setEnabled(compiler, type) to disable this error.`); + } + } else { + // TODO support plugin instances here + // apply them to the compiler + } + } +} + +module.exports = EnableChunkLoadingPlugin; + + +/***/ }), + +/***/ 65408: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const { RawSource, ReplaceSource } = __webpack_require__(55600); +const Generator = __webpack_require__(14052); +const InitFragment = __webpack_require__(63382); +const HarmonyCompatibilityDependency = __webpack_require__(52080); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("../Generator").GenerateContext} GenerateContext */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ + +// TODO: clean up this file +// replace with newer constructs + +const deprecatedGetInitFragments = util.deprecate( + (template, dependency, templateContext) => + template.getInitFragments(dependency, templateContext), + "DependencyTemplate.getInitFragment is deprecated (use apply(dep, source, { initFragments }) instead)", + "DEP_WEBPACK_JAVASCRIPT_GENERATOR_GET_INIT_FRAGMENTS" +); + +const TYPES = new Set(["javascript"]); + +class JavascriptGenerator extends Generator { + /** + * @param {NormalModule} module fresh module + * @returns {Set} available types (do not mutate) + */ + getTypes(module) { + return TYPES; + } + + /** + * @param {NormalModule} module the module + * @param {string=} type source type + * @returns {number} estimate size of the module + */ + getSize(module, type) { + const originalSource = module.originalSource(); + if (!originalSource) { + return 39; + } + return originalSource.size(); + } + + /** + * @param {NormalModule} module module for which the bailout reason should be determined + * @param {ConcatenationBailoutReasonContext} context context + * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated + */ + getConcatenationBailoutReason(module, context) { + // Only harmony modules are valid for optimization + if ( + !module.buildMeta || + module.buildMeta.exportsType !== "namespace" || + module.presentationalDependencies === undefined || + !module.presentationalDependencies.some( + d => d instanceof HarmonyCompatibilityDependency + ) + ) { + return "Module is not an ECMAScript module"; + } + + // Some expressions are not compatible with module concatenation + // because they may produce unexpected results. The plugin bails out + // if some were detected upfront. + if (module.buildInfo && module.buildInfo.moduleConcatenationBailout) { + return `Module uses ${module.buildInfo.moduleConcatenationBailout}`; + } + } + + /** + * @param {NormalModule} module module for which the code should be generated + * @param {GenerateContext} generateContext context for generate + * @returns {Source} generated code + */ + generate(module, generateContext) { + const originalSource = module.originalSource(); + if (!originalSource) { + return new RawSource("throw new Error('No source available');"); + } + + const source = new ReplaceSource(originalSource); + const initFragments = []; + + this.sourceModule(module, initFragments, source, generateContext); + + return InitFragment.addToSource(source, initFragments, generateContext); + } + + /** + * @param {Module} module the module to generate + * @param {InitFragment[]} initFragments mutable list of init fragments + * @param {ReplaceSource} source the current replace source which can be modified + * @param {GenerateContext} generateContext the generateContext + * @returns {void} + */ + sourceModule(module, initFragments, source, generateContext) { + for (const dependency of module.dependencies) { + this.sourceDependency( + module, + dependency, + initFragments, + source, + generateContext + ); + } + + if (module.presentationalDependencies !== undefined) { + for (const dependency of module.presentationalDependencies) { + this.sourceDependency( + module, + dependency, + initFragments, + source, + generateContext + ); + } + } + + for (const childBlock of module.blocks) { + this.sourceBlock( + module, + childBlock, + initFragments, + source, + generateContext + ); + } + } + + /** + * @param {Module} module the module to generate + * @param {DependenciesBlock} block the dependencies block which will be processed + * @param {InitFragment[]} initFragments mutable list of init fragments + * @param {ReplaceSource} source the current replace source which can be modified + * @param {GenerateContext} generateContext the generateContext + * @returns {void} + */ + sourceBlock(module, block, initFragments, source, generateContext) { + for (const dependency of block.dependencies) { + this.sourceDependency( + module, + dependency, + initFragments, + source, + generateContext + ); + } + + for (const childBlock of block.blocks) { + this.sourceBlock( + module, + childBlock, + initFragments, + source, + generateContext + ); + } + } + + /** + * @param {Module} module the current module + * @param {Dependency} dependency the dependency to generate + * @param {InitFragment[]} initFragments mutable list of init fragments + * @param {ReplaceSource} source the current replace source which can be modified + * @param {GenerateContext} generateContext the render context + * @returns {void} + */ + sourceDependency(module, dependency, initFragments, source, generateContext) { + const constructor = /** @type {new (...args: any[]) => Dependency} */ (dependency.constructor); + const template = generateContext.dependencyTemplates.get(constructor); + if (!template) { + throw new Error( + "No template for dependency: " + dependency.constructor.name + ); + } + + const templateContext = { + runtimeTemplate: generateContext.runtimeTemplate, + dependencyTemplates: generateContext.dependencyTemplates, + moduleGraph: generateContext.moduleGraph, + chunkGraph: generateContext.chunkGraph, + module, + runtime: generateContext.runtime, + runtimeRequirements: generateContext.runtimeRequirements, + concatenationScope: generateContext.concatenationScope, + initFragments + }; + + template.apply(dependency, source, templateContext); + + // TODO remove in webpack 6 + if ("getInitFragments" in template) { + const fragments = deprecatedGetInitFragments( + template, + dependency, + templateContext + ); + + if (fragments) { + for (const fragment of fragments) { + initFragments.push(fragment); + } + } + } + } +} + +module.exports = JavascriptGenerator; + + +/***/ }), + +/***/ 80867: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { SyncWaterfallHook, SyncHook, SyncBailHook } = __webpack_require__(18416); +const { + ConcatSource, + OriginalSource, + PrefixSource, + RawSource, + CachedSource +} = __webpack_require__(55600); +const Compilation = __webpack_require__(75388); +const { tryRunOrWebpackError } = __webpack_require__(14953); +const HotUpdateChunk = __webpack_require__(90972); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const StringXor = __webpack_require__(74395); +const { compareModulesByIdentifier } = __webpack_require__(21699); +const createHash = __webpack_require__(34627); +const { intersectRuntime } = __webpack_require__(43478); +const JavascriptGenerator = __webpack_require__(65408); +const JavascriptParser = __webpack_require__(87507); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../CodeGenerationResults")} CodeGenerationResults */ +/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("../util/Hash")} Hash */ + +/** + * @template T + * @param {Iterable} iterable iterable + * @param {function(T): boolean} filter predicate + * @returns {boolean} true, if some items match the filter predicate + */ +const someInIterable = (iterable, filter) => { + for (const item of iterable) { + if (filter(item)) return true; + } + return false; +}; + +/** + * @param {Chunk} chunk a chunk + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {boolean} true, when a JS file is needed for this chunk + */ +const chunkHasJs = (chunk, chunkGraph) => { + if (chunkGraph.getNumberOfEntryModules(chunk) > 0) return true; + + return chunkGraph.getChunkModulesIterableBySourceType(chunk, "javascript") + ? true + : false; +}; + +/** + * @typedef {Object} RenderContext + * @property {Chunk} chunk the chunk + * @property {DependencyTemplates} dependencyTemplates the dependency templates + * @property {RuntimeTemplate} runtimeTemplate the runtime template + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + * @property {CodeGenerationResults} codeGenerationResults results of code generation + */ + +/** + * @typedef {Object} MainRenderContext + * @property {Chunk} chunk the chunk + * @property {DependencyTemplates} dependencyTemplates the dependency templates + * @property {RuntimeTemplate} runtimeTemplate the runtime template + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + * @property {CodeGenerationResults} codeGenerationResults results of code generation + * @property {string} hash hash to be used for render call + */ + +/** + * @typedef {Object} RenderBootstrapContext + * @property {Chunk} chunk the chunk + * @property {RuntimeTemplate} runtimeTemplate the runtime template + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + * @property {string} hash hash to be used for render call + */ + +/** + * @typedef {Object} CompilationHooks + * @property {SyncWaterfallHook<[Source, Module, RenderContext]>} renderModuleContent + * @property {SyncWaterfallHook<[Source, Module, RenderContext]>} renderModuleContainer + * @property {SyncWaterfallHook<[Source, Module, RenderContext]>} renderModulePackage + * @property {SyncWaterfallHook<[Source, RenderContext]>} renderChunk + * @property {SyncWaterfallHook<[Source, RenderContext]>} renderMain + * @property {SyncWaterfallHook<[Source, RenderContext]>} render + * @property {SyncWaterfallHook<[string, RenderBootstrapContext]>} renderRequire + * @property {SyncHook<[Chunk, Hash, ChunkHashContext]>} chunkHash + * @property {SyncBailHook<[Chunk, RenderContext], boolean>} useSourceMap + */ + +/** @type {WeakMap} */ +const compilationHooksMap = new WeakMap(); + +class JavascriptModulesPlugin { + /** + * @param {Compilation} compilation the compilation + * @returns {CompilationHooks} the attached hooks + */ + static getCompilationHooks(compilation) { + if (!(compilation instanceof Compilation)) { + throw new TypeError( + "The 'compilation' argument must be an instance of Compilation" + ); + } + let hooks = compilationHooksMap.get(compilation); + if (hooks === undefined) { + hooks = { + renderModuleContent: new SyncWaterfallHook([ + "source", + "module", + "renderContext" + ]), + renderModuleContainer: new SyncWaterfallHook([ + "source", + "module", + "renderContext" + ]), + renderModulePackage: new SyncWaterfallHook([ + "source", + "module", + "renderContext" + ]), + render: new SyncWaterfallHook(["source", "renderContext"]), + renderChunk: new SyncWaterfallHook(["source", "renderContext"]), + renderMain: new SyncWaterfallHook(["source", "renderContext"]), + renderRequire: new SyncWaterfallHook(["code", "renderContext"]), + chunkHash: new SyncHook(["chunk", "hash", "context"]), + useSourceMap: new SyncBailHook(["chunk", "renderContext"]) + }; + compilationHooksMap.set(compilation, hooks); + } + return hooks; + } + + constructor(options = {}) { + this.options = options; + /** @type {WeakMap} */ + this._moduleFactoryCache = new WeakMap(); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "JavascriptModulesPlugin", + (compilation, { normalModuleFactory }) => { + const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation); + normalModuleFactory.hooks.createParser + .for("javascript/auto") + .tap("JavascriptModulesPlugin", options => { + return new JavascriptParser("auto"); + }); + normalModuleFactory.hooks.createParser + .for("javascript/dynamic") + .tap("JavascriptModulesPlugin", options => { + return new JavascriptParser("script"); + }); + normalModuleFactory.hooks.createParser + .for("javascript/esm") + .tap("JavascriptModulesPlugin", options => { + return new JavascriptParser("module"); + }); + normalModuleFactory.hooks.createGenerator + .for("javascript/auto") + .tap("JavascriptModulesPlugin", () => { + return new JavascriptGenerator(); + }); + normalModuleFactory.hooks.createGenerator + .for("javascript/dynamic") + .tap("JavascriptModulesPlugin", () => { + return new JavascriptGenerator(); + }); + normalModuleFactory.hooks.createGenerator + .for("javascript/esm") + .tap("JavascriptModulesPlugin", () => { + return new JavascriptGenerator(); + }); + compilation.hooks.renderManifest.tap( + "JavascriptModulesPlugin", + (result, options) => { + const { + hash, + chunk, + chunkGraph, + moduleGraph, + runtimeTemplate, + dependencyTemplates, + outputOptions, + codeGenerationResults + } = options; + + const hotUpdateChunk = + chunk instanceof HotUpdateChunk ? chunk : null; + + let render; + const filenameTemplate = JavascriptModulesPlugin.getChunkFilenameTemplate( + chunk, + outputOptions + ); + if (hotUpdateChunk) { + render = () => + this.renderChunk( + { + chunk, + dependencyTemplates, + runtimeTemplate, + moduleGraph, + chunkGraph, + codeGenerationResults + }, + hooks + ); + } else if (chunk.hasRuntime()) { + render = () => + this.renderMain( + { + hash, + chunk, + dependencyTemplates, + runtimeTemplate, + moduleGraph, + chunkGraph, + codeGenerationResults + }, + hooks, + compilation + ); + } else { + if (!chunkHasJs(chunk, chunkGraph)) { + return result; + } + + render = () => + this.renderChunk( + { + chunk, + dependencyTemplates, + runtimeTemplate, + moduleGraph, + chunkGraph, + codeGenerationResults + }, + hooks + ); + } + + result.push({ + render, + filenameTemplate, + pathOptions: { + hash, + runtime: chunk.runtime, + chunk, + contentHashType: "javascript" + }, + info: { + javascriptModule: compilation.runtimeTemplate.isModule() + }, + identifier: hotUpdateChunk + ? `hotupdatechunk${chunk.id}` + : `chunk${chunk.id}`, + hash: chunk.contentHash.javascript + }); + + return result; + } + ); + compilation.hooks.chunkHash.tap( + "JavascriptModulesPlugin", + (chunk, hash, context) => { + hooks.chunkHash.call(chunk, hash, context); + if (chunk.hasRuntime()) { + this.updateHashWithBootstrap( + hash, + { + hash: "0000", + chunk, + chunkGraph: context.chunkGraph, + moduleGraph: context.moduleGraph, + runtimeTemplate: context.runtimeTemplate + }, + hooks + ); + } + } + ); + compilation.hooks.contentHash.tap("JavascriptModulesPlugin", chunk => { + const { + chunkGraph, + moduleGraph, + runtimeTemplate, + outputOptions: { + hashSalt, + hashDigest, + hashDigestLength, + hashFunction + } + } = compilation; + const hash = createHash(hashFunction); + if (hashSalt) hash.update(hashSalt); + if (chunk.hasRuntime()) { + this.updateHashWithBootstrap( + hash, + { + hash: "0000", + chunk, + chunkGraph: compilation.chunkGraph, + moduleGraph: compilation.moduleGraph, + runtimeTemplate: compilation.runtimeTemplate + }, + hooks + ); + } else { + hash.update(`${chunk.id} `); + hash.update(chunk.ids ? chunk.ids.join(",") : ""); + } + hooks.chunkHash.call(chunk, hash, { + chunkGraph, + moduleGraph, + runtimeTemplate + }); + const modules = chunkGraph.getChunkModulesIterableBySourceType( + chunk, + "javascript" + ); + if (modules) { + const xor = new StringXor(); + for (const m of modules) { + xor.add(chunkGraph.getModuleHash(m, chunk.runtime)); + } + xor.updateHash(hash); + } + const runtimeModules = chunkGraph.getChunkModulesIterableBySourceType( + chunk, + "runtime" + ); + if (runtimeModules) { + const xor = new StringXor(); + for (const m of runtimeModules) { + xor.add(chunkGraph.getModuleHash(m, chunk.runtime)); + } + xor.updateHash(hash); + } + const digest = /** @type {string} */ (hash.digest(hashDigest)); + chunk.contentHash.javascript = digest.substr(0, hashDigestLength); + }); + } + ); + } + + static getChunkFilenameTemplate(chunk, outputOptions) { + if (chunk.filenameTemplate) { + return chunk.filenameTemplate; + } else if (chunk instanceof HotUpdateChunk) { + return outputOptions.hotUpdateChunkFilename; + } else if (chunk.canBeInitial()) { + return outputOptions.filename; + } else { + return outputOptions.chunkFilename; + } + } + + /** + * @param {Module} module the rendered module + * @param {RenderContext} renderContext options object + * @param {CompilationHooks} hooks hooks + * @param {boolean | "strict"} factory true: renders as factory method, "strict": renders as factory method already in strict scope, false: pure module content + * @returns {Source} the newly generated source from rendering + */ + renderModule(module, renderContext, hooks, factory) { + const { + chunk, + chunkGraph, + runtimeTemplate, + codeGenerationResults + } = renderContext; + try { + const moduleSource = codeGenerationResults.getSource( + module, + chunk.runtime, + "javascript" + ); + if (!moduleSource) return null; + const moduleSourcePostContent = tryRunOrWebpackError( + () => + hooks.renderModuleContent.call(moduleSource, module, renderContext), + "JavascriptModulesPlugin.getCompilationHooks().renderModuleContent" + ); + let moduleSourcePostContainer; + if (factory) { + const runtimeRequirements = chunkGraph.getModuleRuntimeRequirements( + module, + chunk.runtime + ); + const needModule = runtimeRequirements.has(RuntimeGlobals.module); + const needExports = runtimeRequirements.has(RuntimeGlobals.exports); + const needRequire = + runtimeRequirements.has(RuntimeGlobals.require) || + runtimeRequirements.has(RuntimeGlobals.requireScope); + const needThisAsExports = runtimeRequirements.has( + RuntimeGlobals.thisAsExports + ); + const needStrict = module.buildInfo.strict && factory !== "strict"; + const cacheEntry = this._moduleFactoryCache.get( + moduleSourcePostContent + ); + let source; + if ( + cacheEntry && + cacheEntry.needModule === needModule && + cacheEntry.needExports === needExports && + cacheEntry.needRequire === needRequire && + cacheEntry.needThisAsExports === needThisAsExports && + cacheEntry.needStrict === needStrict + ) { + source = cacheEntry.source; + } else { + const factorySource = new ConcatSource(); + const args = []; + if (needExports || needRequire || needModule) + args.push( + needModule + ? module.moduleArgument + : "__unused_webpack_" + module.moduleArgument + ); + if (needExports || needRequire) + args.push( + needExports + ? module.exportsArgument + : "__unused_webpack_" + module.exportsArgument + ); + if (needRequire) args.push("__webpack_require__"); + if (!needThisAsExports && runtimeTemplate.supportsArrowFunction()) { + factorySource.add("/***/ ((" + args.join(", ") + ") => {\n\n"); + } else { + factorySource.add("/***/ (function(" + args.join(", ") + ") {\n\n"); + } + if (needStrict) { + factorySource.add('"use strict";\n'); + } + factorySource.add(moduleSourcePostContent); + factorySource.add("\n\n/***/ })"); + source = new CachedSource(factorySource); + this._moduleFactoryCache.set(moduleSourcePostContent, { + source, + needModule, + needExports, + needRequire, + needThisAsExports, + needStrict + }); + } + moduleSourcePostContainer = tryRunOrWebpackError( + () => hooks.renderModuleContainer.call(source, module, renderContext), + "JavascriptModulesPlugin.getCompilationHooks().renderModuleContainer" + ); + } else { + moduleSourcePostContainer = moduleSourcePostContent; + } + return tryRunOrWebpackError( + () => + hooks.renderModulePackage.call( + moduleSourcePostContainer, + module, + renderContext + ), + "JavascriptModulesPlugin.getCompilationHooks().renderModulePackage" + ); + } catch (e) { + e.module = module; + throw e; + } + } + + /** + * @param {RenderContext} renderContext the render context + * @param {CompilationHooks} hooks hooks + * @returns {Source} the rendered source + */ + renderChunk(renderContext, hooks) { + const { chunk, chunkGraph } = renderContext; + const modules = chunkGraph.getOrderedChunkModulesIterableBySourceType( + chunk, + "javascript", + compareModulesByIdentifier + ); + const moduleSources = + Template.renderChunkModules( + renderContext, + modules ? Array.from(modules) : [], + module => this.renderModule(module, renderContext, hooks, true) + ) || new RawSource("{}"); + let source = tryRunOrWebpackError( + () => hooks.renderChunk.call(moduleSources, renderContext), + "JavascriptModulesPlugin.getCompilationHooks().renderChunk" + ); + source = tryRunOrWebpackError( + () => hooks.render.call(source, renderContext), + "JavascriptModulesPlugin.getCompilationHooks().render" + ); + chunk.rendered = true; + return new ConcatSource(source, ";"); + } + + /** + * @param {MainRenderContext} renderContext options object + * @param {CompilationHooks} hooks hooks + * @param {Compilation} compilation the compilation + * @returns {Source} the newly generated source from rendering + */ + renderMain(renderContext, hooks, compilation) { + const { chunk, chunkGraph, runtimeTemplate } = renderContext; + + const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements(chunk); + const iife = runtimeTemplate.isIIFE(); + + const bootstrap = this.renderBootstrap(renderContext, hooks); + const useSourceMap = hooks.useSourceMap.call(chunk, renderContext); + + const allModules = Array.from( + chunkGraph.getOrderedChunkModulesIterableBySourceType( + chunk, + "javascript", + compareModulesByIdentifier + ) || [] + ); + const allStrict = allModules.every(m => m.buildInfo.strict); + + let inlinedModules; + if (bootstrap.allowInlineStartup) { + inlinedModules = new Set(chunkGraph.getChunkEntryModulesIterable(chunk)); + } + + let source = new ConcatSource(); + let prefix; + if (iife) { + if (runtimeTemplate.supportsArrowFunction()) { + source.add("/******/ (() => { // webpackBootstrap\n"); + } else { + source.add("/******/ (function() { // webpackBootstrap\n"); + } + prefix = "/******/ \t"; + } else { + prefix = "/******/ "; + } + if (allStrict) { + source.add(prefix + '"use strict";\n'); + } + + const chunkModules = Template.renderChunkModules( + renderContext, + inlinedModules + ? allModules.filter(m => !inlinedModules.has(m)) + : allModules, + module => + this.renderModule( + module, + renderContext, + hooks, + allStrict ? "strict" : true + ), + prefix + ); + if ( + chunkModules || + runtimeRequirements.has(RuntimeGlobals.moduleFactories) || + runtimeRequirements.has(RuntimeGlobals.moduleFactoriesAddOnly) + ) { + source.add(prefix + "var __webpack_modules__ = ("); + source.add(chunkModules || "{}"); + source.add(");\n"); + source.add( + "/************************************************************************/\n" + ); + } + + if (bootstrap.header.length > 0) { + const header = Template.asString(bootstrap.header) + "\n"; + source.add( + new PrefixSource( + prefix, + useSourceMap + ? new OriginalSource(header, "webpack/bootstrap") + : new RawSource(header) + ) + ); + source.add( + "/************************************************************************/\n" + ); + } + + const runtimeModules = renderContext.chunkGraph.getChunkRuntimeModulesInOrder( + chunk + ); + + if (runtimeModules.length > 0) { + source.add( + new PrefixSource( + prefix, + Template.renderRuntimeModules(runtimeModules, renderContext) + ) + ); + source.add( + "/************************************************************************/\n" + ); + // runtimeRuntimeModules calls codeGeneration + for (const module of runtimeModules) { + compilation.codeGeneratedModules.add(module); + } + } + if (inlinedModules) { + if (bootstrap.beforeStartup.length > 0) { + const beforeStartup = Template.asString(bootstrap.beforeStartup) + "\n"; + source.add( + new PrefixSource( + prefix, + useSourceMap + ? new OriginalSource(beforeStartup, "webpack/before-startup") + : new RawSource(beforeStartup) + ) + ); + } + for (const m of inlinedModules) { + const renderedModule = this.renderModule( + m, + renderContext, + hooks, + false + ); + if (renderedModule) { + const innerStrict = !allStrict && m.buildInfo.strict; + const iife = innerStrict || inlinedModules.size > 1 || chunkModules; + if (iife) { + if (runtimeTemplate.supportsArrowFunction()) { + source.add("(() => {\n"); + if (innerStrict) source.add('"use strict";\n'); + source.add(renderedModule); + source.add("\n})();\n\n"); + } else { + source.add("!function() {\n"); + if (innerStrict) source.add('"use strict";\n'); + source.add(renderedModule); + source.add("\n}();\n"); + } + } else { + source.add(renderedModule); + source.add("\n"); + } + } + } + if (bootstrap.afterStartup.length > 0) { + const afterStartup = Template.asString(bootstrap.afterStartup) + "\n"; + source.add( + new PrefixSource( + prefix, + useSourceMap + ? new OriginalSource(afterStartup, "webpack/after-startup") + : new RawSource(afterStartup) + ) + ); + } + } else { + const startup = + Template.asString([ + ...bootstrap.beforeStartup, + ...bootstrap.startup, + ...bootstrap.afterStartup + ]) + "\n"; + source.add( + new PrefixSource( + prefix, + useSourceMap + ? new OriginalSource(startup, "webpack/startup") + : new RawSource(startup) + ) + ); + } + if (iife) { + source.add("/******/ })()\n"); + } + + /** @type {Source} */ + let finalSource = tryRunOrWebpackError( + () => hooks.renderMain.call(source, renderContext), + "JavascriptModulesPlugin.getCompilationHooks().renderMain" + ); + if (!finalSource) { + throw new Error( + "JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().renderMain plugins should return something" + ); + } + finalSource = tryRunOrWebpackError( + () => hooks.render.call(finalSource, renderContext), + "JavascriptModulesPlugin.getCompilationHooks().render" + ); + if (!finalSource) { + throw new Error( + "JavascriptModulesPlugin error: JavascriptModulesPlugin.getCompilationHooks().render plugins should return something" + ); + } + chunk.rendered = true; + return iife ? new ConcatSource(finalSource, ";") : finalSource; + } + + /** + * @param {Hash} hash the hash to be updated + * @param {RenderBootstrapContext} renderContext options object + * @param {CompilationHooks} hooks hooks + */ + updateHashWithBootstrap(hash, renderContext, hooks) { + const bootstrap = this.renderBootstrap(renderContext, hooks); + for (const key of Object.keys(bootstrap)) { + hash.update(key); + if (Array.isArray(bootstrap[key])) { + for (const line of bootstrap[key]) { + hash.update(line); + } + } else { + hash.update(JSON.stringify(bootstrap[key])); + } + } + } + + /** + * @param {RenderBootstrapContext} renderContext options object + * @param {CompilationHooks} hooks hooks + * @returns {{ header: string[], beforeStartup: string[], startup: string[], afterStartup: string[], allowInlineStartup: boolean }} the generated source of the bootstrap code + */ + renderBootstrap(renderContext, hooks) { + const { chunkGraph, moduleGraph, chunk, runtimeTemplate } = renderContext; + + const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements(chunk); + + const requireFunction = runtimeRequirements.has(RuntimeGlobals.require); + const moduleCache = runtimeRequirements.has(RuntimeGlobals.moduleCache); + const moduleFactories = runtimeRequirements.has( + RuntimeGlobals.moduleFactories + ); + const moduleUsed = runtimeRequirements.has(RuntimeGlobals.module); + const exportsUsed = runtimeRequirements.has(RuntimeGlobals.exports); + const requireScopeUsed = runtimeRequirements.has( + RuntimeGlobals.requireScope + ); + const interceptModuleExecution = runtimeRequirements.has( + RuntimeGlobals.interceptModuleExecution + ); + const returnExportsFromRuntime = runtimeRequirements.has( + RuntimeGlobals.returnExportsFromRuntime + ); + + const useRequire = + requireFunction || + interceptModuleExecution || + returnExportsFromRuntime || + moduleUsed || + exportsUsed; + + const result = { + header: [], + beforeStartup: [], + startup: [], + afterStartup: [], + allowInlineStartup: true + }; + + let { header: buf, startup, beforeStartup, afterStartup } = result; + + if (result.allowInlineStartup && moduleFactories) { + startup.push( + "// module factories are used so entry inlining is disabled" + ); + result.allowInlineStartup = false; + } + if (result.allowInlineStartup && moduleCache) { + startup.push("// module cache are used so entry inlining is disabled"); + result.allowInlineStartup = false; + } + if (result.allowInlineStartup && interceptModuleExecution) { + startup.push( + "// module execution is intercepted so entry inlining is disabled" + ); + result.allowInlineStartup = false; + } + if (result.allowInlineStartup && returnExportsFromRuntime) { + startup.push( + "// module exports must be returned from runtime so entry inlining is disabled" + ); + result.allowInlineStartup = false; + } + + if (useRequire || moduleCache) { + buf.push("// The module cache"); + buf.push("var __webpack_module_cache__ = {};"); + buf.push(""); + } + + if (useRequire) { + buf.push("// The require function"); + buf.push(`function __webpack_require__(moduleId) {`); + buf.push(Template.indent(this.renderRequire(renderContext, hooks))); + buf.push("}"); + buf.push(""); + } else if (runtimeRequirements.has(RuntimeGlobals.requireScope)) { + buf.push("// The require scope"); + buf.push("var __webpack_require__ = {};"); + buf.push(""); + } + + if ( + moduleFactories || + runtimeRequirements.has(RuntimeGlobals.moduleFactoriesAddOnly) + ) { + buf.push("// expose the modules object (__webpack_modules__)"); + buf.push(`${RuntimeGlobals.moduleFactories} = __webpack_modules__;`); + buf.push(""); + } + + if (moduleCache) { + buf.push("// expose the module cache"); + buf.push(`${RuntimeGlobals.moduleCache} = __webpack_module_cache__;`); + buf.push(""); + } + + if (interceptModuleExecution) { + buf.push("// expose the module execution interceptor"); + buf.push(`${RuntimeGlobals.interceptModuleExecution} = [];`); + buf.push(""); + } + + if (!runtimeRequirements.has(RuntimeGlobals.startupNoDefault)) { + if (chunkGraph.getNumberOfEntryModules(chunk) > 0) { + /** @type {string[]} */ + const buf2 = []; + const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements( + chunk + ); + buf2.push( + returnExportsFromRuntime + ? "// Load entry module and return exports" + : "// Load entry module" + ); + let i = chunkGraph.getNumberOfEntryModules(chunk); + for (const entryModule of chunkGraph.getChunkEntryModulesIterable( + chunk + )) { + if ( + result.allowInlineStartup && + someInIterable( + moduleGraph.getIncomingConnections(entryModule), + c => + c.originModule && + c.isTargetActive(chunk.runtime) && + someInIterable( + chunkGraph.getModuleRuntimes(c.originModule), + runtime => + intersectRuntime(runtime, chunk.runtime) !== undefined + ) + ) + ) { + buf2.push( + "// This entry module is referenced by other modules so it can't be inlined" + ); + result.allowInlineStartup = false; + } + const mayReturn = + --i === 0 && returnExportsFromRuntime ? "return " : ""; + const moduleId = chunkGraph.getModuleId(entryModule); + const entryRuntimeRequirements = chunkGraph.getModuleRuntimeRequirements( + entryModule, + chunk.runtime + ); + let moduleIdExpr = JSON.stringify(moduleId); + if (runtimeRequirements.has(RuntimeGlobals.entryModuleId)) { + moduleIdExpr = `${RuntimeGlobals.entryModuleId} = ${moduleIdExpr}`; + } + if (useRequire) { + buf2.push(`${mayReturn}__webpack_require__(${moduleIdExpr});`); + if (result.allowInlineStartup) { + if (entryRuntimeRequirements.has(RuntimeGlobals.module)) { + result.allowInlineStartup = false; + buf2.push( + "// This entry module used 'module' so it can't be inlined" + ); + } else if (entryRuntimeRequirements.has(RuntimeGlobals.exports)) { + buf2.push( + "// This entry module used 'exports' so it can't be inlined" + ); + result.allowInlineStartup = false; + } + } + } else if (requireScopeUsed) { + buf2.push( + `__webpack_modules__[${moduleIdExpr}](0, 0, __webpack_require__);` + ); + } else { + buf2.push(`__webpack_modules__[${moduleIdExpr}]();`); + } + } + if ( + runtimeRequirements.has(RuntimeGlobals.startup) || + ((returnExportsFromRuntime || + runtimeRequirements.has(RuntimeGlobals.startupOnlyBefore)) && + runtimeRequirements.has(RuntimeGlobals.startupOnlyAfter)) + ) { + result.allowInlineStartup = false; + buf.push("// the startup function"); + buf.push( + `${RuntimeGlobals.startup} = ${runtimeTemplate.basicFunction( + "", + buf2 + )};` + ); + buf.push(""); + startup.push("// run startup"); + startup.push(`return ${RuntimeGlobals.startup}();`); + } else if (runtimeRequirements.has(RuntimeGlobals.startupOnlyBefore)) { + buf.push("// the startup function"); + buf.push( + `${RuntimeGlobals.startup} = ${runtimeTemplate.emptyFunction()};` + ); + beforeStartup.push("// run runtime startup"); + beforeStartup.push(`${RuntimeGlobals.startup}();`); + startup.push("// startup"); + startup.push(Template.asString(buf2)); + } else if (runtimeRequirements.has(RuntimeGlobals.startupOnlyAfter)) { + buf.push("// the startup function"); + buf.push( + `${RuntimeGlobals.startup} = ${runtimeTemplate.emptyFunction()};` + ); + startup.push("// startup"); + startup.push(Template.asString(buf2)); + afterStartup.push("// run runtime startup"); + afterStartup.push(`return ${RuntimeGlobals.startup}();`); + } else { + startup.push("// startup"); + startup.push(Template.asString(buf2)); + } + } else if ( + runtimeRequirements.has(RuntimeGlobals.startup) || + runtimeRequirements.has(RuntimeGlobals.startupOnlyBefore) || + runtimeRequirements.has(RuntimeGlobals.startupOnlyAfter) + ) { + buf.push( + "// the startup function", + "// It's empty as no entry modules are in this chunk", + `${RuntimeGlobals.startup} = ${runtimeTemplate.emptyFunction()}`, + "" + ); + } + } else if ( + runtimeRequirements.has(RuntimeGlobals.startup) || + runtimeRequirements.has(RuntimeGlobals.startupOnlyBefore) || + runtimeRequirements.has(RuntimeGlobals.startupOnlyAfter) + ) { + result.allowInlineStartup = false; + buf.push( + "// the startup function", + "// It's empty as some runtime module handles the default behavior", + `${RuntimeGlobals.startup} = ${runtimeTemplate.emptyFunction()}` + ); + startup.push("// run startup"); + startup.push(`return ${RuntimeGlobals.startup}();`); + } + return result; + } + + /** + * @param {RenderBootstrapContext} renderContext options object + * @param {CompilationHooks} hooks hooks + * @returns {string} the generated source of the require function + */ + renderRequire(renderContext, hooks) { + const { + chunk, + chunkGraph, + runtimeTemplate: { outputOptions } + } = renderContext; + const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements(chunk); + const moduleExecution = runtimeRequirements.has( + RuntimeGlobals.interceptModuleExecution + ) + ? Template.asString([ + "var execOptions = { id: moduleId, module: module, factory: __webpack_modules__[moduleId], require: __webpack_require__ };", + `${RuntimeGlobals.interceptModuleExecution}.forEach(function(handler) { handler(execOptions); });`, + "module = execOptions.module;", + "execOptions.factory.call(module.exports, module, module.exports, execOptions.require);" + ]) + : runtimeRequirements.has(RuntimeGlobals.thisAsExports) + ? Template.asString([ + "__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);" + ]) + : Template.asString([ + "__webpack_modules__[moduleId](module, module.exports, __webpack_require__);" + ]); + const needModuleId = runtimeRequirements.has(RuntimeGlobals.moduleId); + const needModuleLoaded = runtimeRequirements.has( + RuntimeGlobals.moduleLoaded + ); + const content = Template.asString([ + "// Check if module is in cache", + "if(__webpack_module_cache__[moduleId]) {", + Template.indent("return __webpack_module_cache__[moduleId].exports;"), + "}", + "// Create a new module (and put it into the cache)", + "var module = __webpack_module_cache__[moduleId] = {", + Template.indent([ + needModuleId ? "id: moduleId," : "// no module.id needed", + needModuleLoaded ? "loaded: false," : "// no module.loaded needed", + "exports: {}" + ]), + "};", + "", + outputOptions.strictModuleExceptionHandling + ? Template.asString([ + "// Execute the module function", + "var threw = true;", + "try {", + Template.indent([moduleExecution, "threw = false;"]), + "} finally {", + Template.indent([ + "if(threw) delete __webpack_module_cache__[moduleId];" + ]), + "}" + ]) + : Template.asString([ + "// Execute the module function", + moduleExecution + ]), + needModuleLoaded + ? Template.asString([ + "", + "// Flag the module as loaded", + "module.loaded = true;", + "" + ]) + : "", + "// Return the exports of the module", + "return module.exports;" + ]); + return tryRunOrWebpackError( + () => hooks.renderRequire.call(content, renderContext), + "JavascriptModulesPlugin.getCompilationHooks().renderRequire" + ); + } +} + +module.exports = JavascriptModulesPlugin; +module.exports.chunkHasJs = chunkHasJs; + + +/***/ }), + +/***/ 87507: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { Parser: AcornParser } = __webpack_require__(87573); +const { SyncBailHook, HookMap } = __webpack_require__(18416); +const vm = __webpack_require__(92184); +const Parser = __webpack_require__(85569); +const StackedMap = __webpack_require__(64149); +const memoize = __webpack_require__(18003); +const BasicEvaluatedExpression = __webpack_require__(98288); + +/** @typedef {import("acorn").Options} AcornOptions */ +/** @typedef {import("estree").ArrayExpression} ArrayExpressionNode */ +/** @typedef {import("estree").BinaryExpression} BinaryExpressionNode */ +/** @typedef {import("estree").BlockStatement} BlockStatementNode */ +/** @typedef {import("estree").SequenceExpression} SequenceExpressionNode */ +/** @typedef {import("estree").CallExpression} CallExpressionNode */ +/** @typedef {import("estree").ClassDeclaration} ClassDeclarationNode */ +/** @typedef {import("estree").ClassExpression} ClassExpressionNode */ +/** @typedef {import("estree").Comment} CommentNode */ +/** @typedef {import("estree").ConditionalExpression} ConditionalExpressionNode */ +/** @typedef {import("estree").Declaration} DeclarationNode */ +/** @typedef {import("estree").Expression} ExpressionNode */ +/** @typedef {import("estree").Identifier} IdentifierNode */ +/** @typedef {import("estree").IfStatement} IfStatementNode */ +/** @typedef {import("estree").LabeledStatement} LabeledStatementNode */ +/** @typedef {import("estree").Literal} LiteralNode */ +/** @typedef {import("estree").LogicalExpression} LogicalExpressionNode */ +/** @typedef {import("estree").ChainExpression} ChainExpressionNode */ +/** @typedef {import("estree").MemberExpression} MemberExpressionNode */ +/** @typedef {import("estree").MetaProperty} MetaPropertyNode */ +/** @typedef {import("estree").MethodDefinition} MethodDefinitionNode */ +/** @typedef {import("estree").ModuleDeclaration} ModuleDeclarationNode */ +/** @typedef {import("estree").NewExpression} NewExpressionNode */ +/** @typedef {import("estree").Node} AnyNode */ +/** @typedef {import("estree").Program} ProgramNode */ +/** @typedef {import("estree").Statement} StatementNode */ +/** @typedef {import("estree").Super} SuperNode */ +/** @typedef {import("estree").TaggedTemplateExpression} TaggedTemplateExpressionNode */ +/** @typedef {import("estree").TemplateLiteral} TemplateLiteralNode */ +/** @typedef {import("estree").ThisExpression} ThisExpressionNode */ +/** @typedef {import("estree").UnaryExpression} UnaryExpressionNode */ +/** @typedef {import("estree").VariableDeclarator} VariableDeclaratorNode */ +/** @template T @typedef {import("tapable").AsArray} AsArray */ +/** @typedef {import("../Parser").ParserState} ParserState */ +/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ +/** @typedef {{declaredScope: ScopeInfo, freeName: string | true, tagInfo: TagInfo | undefined}} VariableInfoInterface */ +/** @typedef {{ name: string | VariableInfo, rootInfo: string | VariableInfo, getMembers: () => string[] }} GetInfoResult */ + +const EMPTY_ARRAY = []; +const ALLOWED_MEMBER_TYPES_CALL_EXPRESSION = 0b01; +const ALLOWED_MEMBER_TYPES_EXPRESSION = 0b10; +const ALLOWED_MEMBER_TYPES_ALL = 0b11; + +// Syntax: https://developer.mozilla.org/en/SpiderMonkey/Parser_API + +const parser = AcornParser; + +class VariableInfo { + /** + * @param {ScopeInfo} declaredScope scope in which the variable is declared + * @param {string | true} freeName which free name the variable aliases, or true when none + * @param {TagInfo | undefined} tagInfo info about tags + */ + constructor(declaredScope, freeName, tagInfo) { + this.declaredScope = declaredScope; + this.freeName = freeName; + this.tagInfo = tagInfo; + } +} + +/** @typedef {string | ScopeInfo | VariableInfo} ExportedVariableInfo */ +/** @typedef {LiteralNode | string | null | undefined} ImportSource */ +/** @typedef {Omit & { sourceType: "module" | "script" | "auto", ecmaVersion?: AcornOptions["ecmaVersion"] }} ParseOptions */ + +/** + * @typedef {Object} TagInfo + * @property {any} tag + * @property {any} data + * @property {TagInfo | undefined} next + */ + +/** + * @typedef {Object} ScopeInfo + * @property {StackedMap} definitions + * @property {boolean | "arrow"} topLevelScope + * @property {boolean} inShorthand + * @property {boolean} isStrict + * @property {boolean} isAsmJs + * @property {boolean} inTry + */ + +const joinRanges = (startRange, endRange) => { + if (!endRange) return startRange; + if (!startRange) return endRange; + return [startRange[0], endRange[1]]; +}; + +const objectAndMembersToName = (object, membersReversed) => { + let name = object; + for (let i = membersReversed.length - 1; i >= 0; i--) { + name = name + "." + membersReversed[i]; + } + return name; +}; + +const getRootName = expression => { + switch (expression.type) { + case "Identifier": + return expression.name; + case "ThisExpression": + return "this"; + case "MetaProperty": + return `${expression.meta.name}.${expression.property.name}`; + default: + return undefined; + } +}; + +/** @type {AcornOptions} */ +const defaultParserOptions = { + ranges: true, + locations: true, + ecmaVersion: "latest", + sourceType: "module", + allowAwaitOutsideFunction: true, + onComment: null +}; + +// regexp to match at least one "magic comment" +const webpackCommentRegExp = new RegExp(/(^|\W)webpack[A-Z]{1,}[A-Za-z]{1,}:/); + +const EMPTY_COMMENT_OPTIONS = { + options: null, + errors: null +}; + +class JavascriptParser extends Parser { + /** + * @param {"module" | "script" | "auto"} sourceType default source type + */ + constructor(sourceType = "auto") { + super(); + this.hooks = Object.freeze({ + /** @type {HookMap>} */ + evaluateTypeof: new HookMap(() => new SyncBailHook(["expression"])), + /** @type {HookMap>} */ + evaluate: new HookMap(() => new SyncBailHook(["expression"])), + /** @type {HookMap>} */ + evaluateIdentifier: new HookMap(() => new SyncBailHook(["expression"])), + /** @type {HookMap>} */ + evaluateDefinedIdentifier: new HookMap( + () => new SyncBailHook(["expression"]) + ), + /** @type {HookMap>} */ + evaluateCallExpressionMember: new HookMap( + () => new SyncBailHook(["expression", "param"]) + ), + /** @type {HookMap>} */ + isPure: new HookMap( + () => new SyncBailHook(["expression", "commentsStartPosition"]) + ), + /** @type {SyncBailHook<[StatementNode | ModuleDeclarationNode], boolean | void>} */ + preStatement: new SyncBailHook(["statement"]), + + /** @type {SyncBailHook<[StatementNode | ModuleDeclarationNode], boolean | void>} */ + blockPreStatement: new SyncBailHook(["declaration"]), + /** @type {SyncBailHook<[StatementNode | ModuleDeclarationNode], boolean | void>} */ + statement: new SyncBailHook(["statement"]), + /** @type {SyncBailHook<[IfStatementNode], boolean | void>} */ + statementIf: new SyncBailHook(["statement"]), + /** @type {SyncBailHook<[ExpressionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */ + classExtendsExpression: new SyncBailHook(["expression", "statement"]), + /** @type {SyncBailHook<[MethodDefinitionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */ + classBodyElement: new SyncBailHook(["element", "statement"]), + /** @type {HookMap>} */ + label: new HookMap(() => new SyncBailHook(["statement"])), + /** @type {SyncBailHook<[StatementNode, ImportSource], boolean | void>} */ + import: new SyncBailHook(["statement", "source"]), + /** @type {SyncBailHook<[StatementNode, ImportSource, string, string], boolean | void>} */ + importSpecifier: new SyncBailHook([ + "statement", + "source", + "exportName", + "identifierName" + ]), + /** @type {SyncBailHook<[StatementNode], boolean | void>} */ + export: new SyncBailHook(["statement"]), + /** @type {SyncBailHook<[StatementNode, ImportSource], boolean | void>} */ + exportImport: new SyncBailHook(["statement", "source"]), + /** @type {SyncBailHook<[StatementNode, DeclarationNode], boolean | void>} */ + exportDeclaration: new SyncBailHook(["statement", "declaration"]), + /** @type {SyncBailHook<[StatementNode, DeclarationNode], boolean | void>} */ + exportExpression: new SyncBailHook(["statement", "declaration"]), + /** @type {SyncBailHook<[StatementNode, string, string, number | undefined], boolean | void>} */ + exportSpecifier: new SyncBailHook([ + "statement", + "identifierName", + "exportName", + "index" + ]), + /** @type {SyncBailHook<[StatementNode, ImportSource, string, string, number | undefined], boolean | void>} */ + exportImportSpecifier: new SyncBailHook([ + "statement", + "source", + "identifierName", + "exportName", + "index" + ]), + /** @type {SyncBailHook<[VariableDeclaratorNode, StatementNode], boolean | void>} */ + preDeclarator: new SyncBailHook(["declarator", "statement"]), + /** @type {SyncBailHook<[VariableDeclaratorNode, StatementNode], boolean | void>} */ + declarator: new SyncBailHook(["declarator", "statement"]), + /** @type {HookMap>} */ + varDeclaration: new HookMap(() => new SyncBailHook(["declaration"])), + /** @type {HookMap>} */ + varDeclarationLet: new HookMap(() => new SyncBailHook(["declaration"])), + /** @type {HookMap>} */ + varDeclarationConst: new HookMap(() => new SyncBailHook(["declaration"])), + /** @type {HookMap>} */ + varDeclarationVar: new HookMap(() => new SyncBailHook(["declaration"])), + pattern: new HookMap(() => new SyncBailHook(["pattern"])), + /** @type {HookMap>} */ + canRename: new HookMap(() => new SyncBailHook(["initExpression"])), + /** @type {HookMap>} */ + rename: new HookMap(() => new SyncBailHook(["initExpression"])), + /** @type {HookMap>} */ + assign: new HookMap(() => new SyncBailHook(["expression"])), + /** @type {HookMap>} */ + assignMemberChain: new HookMap( + () => new SyncBailHook(["expression", "members"]) + ), + /** @type {HookMap>} */ + typeof: new HookMap(() => new SyncBailHook(["expression"])), + /** @type {SyncBailHook<[ExpressionNode], boolean | void>} */ + importCall: new SyncBailHook(["expression"]), + /** @type {SyncBailHook<[ExpressionNode], boolean | void>} */ + topLevelAwait: new SyncBailHook(["expression"]), + /** @type {HookMap>} */ + call: new HookMap(() => new SyncBailHook(["expression"])), + /** Something like "a.b()" */ + /** @type {HookMap>} */ + callMemberChain: new HookMap( + () => new SyncBailHook(["expression", "members"]) + ), + /** Something like "a.b().c.d" */ + /** @type {HookMap>} */ + memberChainOfCallMemberChain: new HookMap( + () => + new SyncBailHook([ + "expression", + "calleeMembers", + "callExpression", + "members" + ]) + ), + /** Something like "a.b().c.d()"" */ + /** @type {HookMap>} */ + callMemberChainOfCallMemberChain: new HookMap( + () => + new SyncBailHook([ + "expression", + "calleeMembers", + "innerCallExpression", + "members" + ]) + ), + /** @type {SyncBailHook<[ChainExpressionNode], boolean | void>} */ + optionalChaining: new SyncBailHook(["optionalChaining"]), + /** @type {HookMap>} */ + new: new HookMap(() => new SyncBailHook(["expression"])), + /** @type {HookMap>} */ + expression: new HookMap(() => new SyncBailHook(["expression"])), + /** @type {HookMap>} */ + expressionMemberChain: new HookMap( + () => new SyncBailHook(["expression", "members"]) + ), + /** @type {HookMap>} */ + unhandledExpressionMemberChain: new HookMap( + () => new SyncBailHook(["expression", "members"]) + ), + /** @type {SyncBailHook<[ExpressionNode], boolean | void>} */ + expressionConditionalOperator: new SyncBailHook(["expression"]), + /** @type {SyncBailHook<[ExpressionNode], boolean | void>} */ + expressionLogicalOperator: new SyncBailHook(["expression"]), + /** @type {SyncBailHook<[ProgramNode, CommentNode[]], boolean | void>} */ + program: new SyncBailHook(["ast", "comments"]), + /** @type {SyncBailHook<[ProgramNode, CommentNode[]], boolean | void>} */ + finish: new SyncBailHook(["ast", "comments"]) + }); + this.sourceType = sourceType; + /** @type {ScopeInfo} */ + this.scope = undefined; + /** @type {ParserState} */ + this.state = undefined; + this.comments = undefined; + this.semicolons = undefined; + /** @type {(StatementNode|ExpressionNode)[]} */ + this.statementPath = undefined; + this.prevStatement = undefined; + this.currentTagData = undefined; + this._initializeEvaluating(); + } + + _initializeEvaluating() { + this.hooks.evaluate.for("Literal").tap("JavascriptParser", _expr => { + const expr = /** @type {LiteralNode} */ (_expr); + + switch (typeof expr.value) { + case "number": + return new BasicEvaluatedExpression() + .setNumber(expr.value) + .setRange(expr.range); + case "bigint": + return new BasicEvaluatedExpression() + .setBigInt(expr.value) + .setRange(expr.range); + case "string": + return new BasicEvaluatedExpression() + .setString(expr.value) + .setRange(expr.range); + case "boolean": + return new BasicEvaluatedExpression() + .setBoolean(expr.value) + .setRange(expr.range); + } + if (expr.value === null) { + return new BasicEvaluatedExpression().setNull().setRange(expr.range); + } + if (expr.value instanceof RegExp) { + return new BasicEvaluatedExpression() + .setRegExp(expr.value) + .setRange(expr.range); + } + }); + this.hooks.evaluate.for("NewExpression").tap("JavascriptParser", _expr => { + const expr = /** @type {NewExpressionNode} */ (_expr); + const callee = expr.callee; + if ( + callee.type !== "Identifier" || + callee.name !== "RegExp" || + expr.arguments.length > 2 || + this.getVariableInfo("RegExp") !== "RegExp" + ) + return; + + let regExp, flags; + const arg1 = expr.arguments[0]; + + if (arg1) { + if (arg1.type === "SpreadElement") return; + + const evaluatedRegExp = this.evaluateExpression(arg1); + + if (!evaluatedRegExp) return; + + regExp = evaluatedRegExp.asString(); + + if (!regExp) return; + } else { + return new BasicEvaluatedExpression() + .setRegExp(new RegExp("")) + .setRange(expr.range); + } + + const arg2 = expr.arguments[1]; + + if (arg2) { + if (arg2.type === "SpreadElement") return; + + const evaluatedFlags = this.evaluateExpression(arg2); + + if (!evaluatedFlags) return; + + if (!evaluatedFlags.isUndefined()) { + flags = evaluatedFlags.asString(); + + if ( + flags === undefined || + !BasicEvaluatedExpression.isValidRegExpFlags(flags) + ) + return; + } + } + + return new BasicEvaluatedExpression() + .setRegExp(flags ? new RegExp(regExp, flags) : new RegExp(regExp)) + .setRange(expr.range); + }); + this.hooks.evaluate + .for("LogicalExpression") + .tap("JavascriptParser", _expr => { + const expr = /** @type {LogicalExpressionNode} */ (_expr); + + const left = this.evaluateExpression(expr.left); + if (!left) return; + if (expr.operator === "&&") { + const leftAsBool = left.asBool(); + if (leftAsBool === false) return left.setRange(expr.range); + if (leftAsBool !== true) return; + } else if (expr.operator === "||") { + const leftAsBool = left.asBool(); + if (leftAsBool === true) return left.setRange(expr.range); + if (leftAsBool !== false) return; + } else if (expr.operator === "??") { + const leftAsNullish = left.asNullish(); + if (leftAsNullish === false) return left.setRange(expr.range); + if (leftAsNullish !== true) return; + } else return; + const right = this.evaluateExpression(expr.right); + if (!right) return; + if (left.couldHaveSideEffects()) right.setSideEffects(); + return right.setRange(expr.range); + }); + + const valueAsExpression = (value, expr, sideEffects) => { + switch (typeof value) { + case "boolean": + return new BasicEvaluatedExpression() + .setBoolean(value) + .setSideEffects(sideEffects) + .setRange(expr.range); + case "number": + return new BasicEvaluatedExpression() + .setNumber(value) + .setSideEffects(sideEffects) + .setRange(expr.range); + case "bigint": + return new BasicEvaluatedExpression() + .setBigInt(value) + .setSideEffects(sideEffects) + .setRange(expr.range); + case "string": + return new BasicEvaluatedExpression() + .setString(value) + .setSideEffects(sideEffects) + .setRange(expr.range); + } + }; + + this.hooks.evaluate + .for("BinaryExpression") + .tap("JavascriptParser", _expr => { + const expr = /** @type {BinaryExpressionNode} */ (_expr); + + const handleConstOperation = fn => { + const left = this.evaluateExpression(expr.left); + if (!left || !left.isCompileTimeValue()) return; + + const right = this.evaluateExpression(expr.right); + if (!right || !right.isCompileTimeValue()) return; + + const result = fn( + left.asCompileTimeValue(), + right.asCompileTimeValue() + ); + return valueAsExpression( + result, + expr, + left.couldHaveSideEffects() || right.couldHaveSideEffects() + ); + }; + + const isAlwaysDifferent = (a, b) => + (a === true && b === false) || (a === false && b === true); + + const handleTemplateStringCompare = (left, right, res, eql) => { + const getPrefix = parts => { + let value = ""; + for (const p of parts) { + const v = p.asString(); + if (v !== undefined) value += v; + else break; + } + return value; + }; + const getSuffix = parts => { + let value = ""; + for (let i = parts.length - 1; i >= 0; i--) { + const v = parts[i].asString(); + if (v !== undefined) value = v + value; + else break; + } + return value; + }; + const leftPrefix = getPrefix(left.parts); + const rightPrefix = getPrefix(right.parts); + const leftSuffix = getSuffix(left.parts); + const rightSuffix = getSuffix(right.parts); + const lenPrefix = Math.min(leftPrefix.length, rightPrefix.length); + const lenSuffix = Math.min(leftSuffix.length, rightSuffix.length); + if ( + leftPrefix.slice(0, lenPrefix) !== + rightPrefix.slice(0, lenPrefix) || + leftSuffix.slice(-lenSuffix) !== rightSuffix.slice(-lenSuffix) + ) { + return res + .setBoolean(!eql) + .setSideEffects( + left.couldHaveSideEffects() || right.couldHaveSideEffects() + ); + } + }; + + const handleStrictEqualityComparison = eql => { + const left = this.evaluateExpression(expr.left); + if (!left) return; + const right = this.evaluateExpression(expr.right); + if (!right) return; + const res = new BasicEvaluatedExpression(); + res.setRange(expr.range); + + const leftConst = left.isCompileTimeValue(); + const rightConst = right.isCompileTimeValue(); + + if (leftConst && rightConst) { + return res + .setBoolean( + eql === + (left.asCompileTimeValue() === right.asCompileTimeValue()) + ) + .setSideEffects( + left.couldHaveSideEffects() || right.couldHaveSideEffects() + ); + } + + if (left.isArray() && right.isArray()) { + return res + .setBoolean(!eql) + .setSideEffects( + left.couldHaveSideEffects() || right.couldHaveSideEffects() + ); + } + if (left.isTemplateString() && right.isTemplateString()) { + return handleTemplateStringCompare(left, right, res, eql); + } + + const leftPrimitive = left.isPrimitiveType(); + const rightPrimitive = right.isPrimitiveType(); + + if ( + // Primitive !== Object or + // compile-time object types are never equal to something at runtime + (leftPrimitive === false && + (leftConst || rightPrimitive === true)) || + (rightPrimitive === false && + (rightConst || leftPrimitive === true)) || + // Different nullish or boolish status also means not equal + isAlwaysDifferent(left.asBool(), right.asBool()) || + isAlwaysDifferent(left.asNullish(), right.asNullish()) + ) { + return res + .setBoolean(!eql) + .setSideEffects( + left.couldHaveSideEffects() || right.couldHaveSideEffects() + ); + } + }; + + const handleAbstractEqualityComparison = eql => { + const left = this.evaluateExpression(expr.left); + if (!left) return; + const right = this.evaluateExpression(expr.right); + if (!right) return; + const res = new BasicEvaluatedExpression(); + res.setRange(expr.range); + + const leftConst = left.isCompileTimeValue(); + const rightConst = right.isCompileTimeValue(); + + if (leftConst && rightConst) { + return res + .setBoolean( + eql === + // eslint-disable-next-line eqeqeq + (left.asCompileTimeValue() == right.asCompileTimeValue()) + ) + .setSideEffects( + left.couldHaveSideEffects() || right.couldHaveSideEffects() + ); + } + + if (left.isArray() && right.isArray()) { + return res + .setBoolean(!eql) + .setSideEffects( + left.couldHaveSideEffects() || right.couldHaveSideEffects() + ); + } + if (left.isTemplateString() && right.isTemplateString()) { + return handleTemplateStringCompare(left, right, res, eql); + } + }; + + if (expr.operator === "+") { + const left = this.evaluateExpression(expr.left); + if (!left) return; + const right = this.evaluateExpression(expr.right); + if (!right) return; + const res = new BasicEvaluatedExpression(); + if (left.isString()) { + if (right.isString()) { + res.setString(left.string + right.string); + } else if (right.isNumber()) { + res.setString(left.string + right.number); + } else if ( + right.isWrapped() && + right.prefix && + right.prefix.isString() + ) { + // "left" + ("prefix" + inner + "postfix") + // => ("leftPrefix" + inner + "postfix") + res.setWrapped( + new BasicEvaluatedExpression() + .setString(left.string + right.prefix.string) + .setRange(joinRanges(left.range, right.prefix.range)), + right.postfix, + right.wrappedInnerExpressions + ); + } else if (right.isWrapped()) { + // "left" + ([null] + inner + "postfix") + // => ("left" + inner + "postfix") + res.setWrapped( + left, + right.postfix, + right.wrappedInnerExpressions + ); + } else { + // "left" + expr + // => ("left" + expr + "") + res.setWrapped(left, null, [right]); + } + } else if (left.isNumber()) { + if (right.isString()) { + res.setString(left.number + right.string); + } else if (right.isNumber()) { + res.setNumber(left.number + right.number); + } else { + return; + } + } else if (left.isBigInt()) { + if (right.isBigInt()) { + res.setBigInt(left.bigint + right.bigint); + } + } else if (left.isWrapped()) { + if (left.postfix && left.postfix.isString() && right.isString()) { + // ("prefix" + inner + "postfix") + "right" + // => ("prefix" + inner + "postfixRight") + res.setWrapped( + left.prefix, + new BasicEvaluatedExpression() + .setString(left.postfix.string + right.string) + .setRange(joinRanges(left.postfix.range, right.range)), + left.wrappedInnerExpressions + ); + } else if ( + left.postfix && + left.postfix.isString() && + right.isNumber() + ) { + // ("prefix" + inner + "postfix") + 123 + // => ("prefix" + inner + "postfix123") + res.setWrapped( + left.prefix, + new BasicEvaluatedExpression() + .setString(left.postfix.string + right.number) + .setRange(joinRanges(left.postfix.range, right.range)), + left.wrappedInnerExpressions + ); + } else if (right.isString()) { + // ("prefix" + inner + [null]) + "right" + // => ("prefix" + inner + "right") + res.setWrapped(left.prefix, right, left.wrappedInnerExpressions); + } else if (right.isNumber()) { + // ("prefix" + inner + [null]) + 123 + // => ("prefix" + inner + "123") + res.setWrapped( + left.prefix, + new BasicEvaluatedExpression() + .setString(right.number + "") + .setRange(right.range), + left.wrappedInnerExpressions + ); + } else if (right.isWrapped()) { + // ("prefix1" + inner1 + "postfix1") + ("prefix2" + inner2 + "postfix2") + // ("prefix1" + inner1 + "postfix1" + "prefix2" + inner2 + "postfix2") + res.setWrapped( + left.prefix, + right.postfix, + left.wrappedInnerExpressions && + right.wrappedInnerExpressions && + left.wrappedInnerExpressions + .concat(left.postfix ? [left.postfix] : []) + .concat(right.prefix ? [right.prefix] : []) + .concat(right.wrappedInnerExpressions) + ); + } else { + // ("prefix" + inner + postfix) + expr + // => ("prefix" + inner + postfix + expr + [null]) + res.setWrapped( + left.prefix, + null, + left.wrappedInnerExpressions && + left.wrappedInnerExpressions.concat( + left.postfix ? [left.postfix, right] : [right] + ) + ); + } + } else { + if (right.isString()) { + // left + "right" + // => ([null] + left + "right") + res.setWrapped(null, right, [left]); + } else if (right.isWrapped()) { + // left + (prefix + inner + "postfix") + // => ([null] + left + prefix + inner + "postfix") + res.setWrapped( + null, + right.postfix, + right.wrappedInnerExpressions && + (right.prefix ? [left, right.prefix] : [left]).concat( + right.wrappedInnerExpressions + ) + ); + } else { + return; + } + } + if (left.couldHaveSideEffects() || right.couldHaveSideEffects()) + res.setSideEffects(); + res.setRange(expr.range); + return res; + } else if (expr.operator === "-") { + return handleConstOperation((l, r) => l - r); + } else if (expr.operator === "*") { + return handleConstOperation((l, r) => l * r); + } else if (expr.operator === "/") { + return handleConstOperation((l, r) => l / r); + } else if (expr.operator === "**") { + return handleConstOperation((l, r) => l ** r); + } else if (expr.operator === "===") { + return handleStrictEqualityComparison(true); + } else if (expr.operator === "==") { + return handleAbstractEqualityComparison(true); + } else if (expr.operator === "!==") { + return handleStrictEqualityComparison(false); + } else if (expr.operator === "!=") { + return handleAbstractEqualityComparison(false); + } else if (expr.operator === "&") { + return handleConstOperation((l, r) => l & r); + } else if (expr.operator === "|") { + return handleConstOperation((l, r) => l | r); + } else if (expr.operator === "^") { + return handleConstOperation((l, r) => l ^ r); + } else if (expr.operator === ">>>") { + return handleConstOperation((l, r) => l >>> r); + } else if (expr.operator === ">>") { + return handleConstOperation((l, r) => l >> r); + } else if (expr.operator === "<<") { + return handleConstOperation((l, r) => l << r); + } else if (expr.operator === "<") { + return handleConstOperation((l, r) => l < r); + } else if (expr.operator === ">") { + return handleConstOperation((l, r) => l > r); + } else if (expr.operator === "<=") { + return handleConstOperation((l, r) => l <= r); + } else if (expr.operator === ">=") { + return handleConstOperation((l, r) => l >= r); + } + }); + this.hooks.evaluate + .for("UnaryExpression") + .tap("JavascriptParser", _expr => { + const expr = /** @type {UnaryExpressionNode} */ (_expr); + + const handleConstOperation = fn => { + const argument = this.evaluateExpression(expr.argument); + if (!argument || !argument.isCompileTimeValue()) return; + const result = fn(argument.asCompileTimeValue()); + return valueAsExpression( + result, + expr, + argument.couldHaveSideEffects() + ); + }; + + if (expr.operator === "typeof") { + switch (expr.argument.type) { + case "Identifier": { + const res = this.callHooksForName( + this.hooks.evaluateTypeof, + expr.argument.name, + expr + ); + if (res !== undefined) return res; + break; + } + case "MetaProperty": { + const res = this.callHooksForName( + this.hooks.evaluateTypeof, + getRootName(expr.argument), + expr + ); + if (res !== undefined) return res; + break; + } + case "MemberExpression": { + const res = this.callHooksForExpression( + this.hooks.evaluateTypeof, + expr.argument, + expr + ); + if (res !== undefined) return res; + break; + } + case "ChainExpression": { + const res = this.callHooksForExpression( + this.hooks.evaluateTypeof, + expr.argument.expression, + expr + ); + if (res !== undefined) return res; + break; + } + case "FunctionExpression": { + return new BasicEvaluatedExpression() + .setString("function") + .setRange(expr.range); + } + } + const arg = this.evaluateExpression(expr.argument); + if (arg.isUnknown()) return; + if (arg.isString()) { + return new BasicEvaluatedExpression() + .setString("string") + .setRange(expr.range); + } + if (arg.isWrapped()) { + return new BasicEvaluatedExpression() + .setString("string") + .setSideEffects() + .setRange(expr.range); + } + if (arg.isUndefined()) { + return new BasicEvaluatedExpression() + .setString("undefined") + .setRange(expr.range); + } + if (arg.isNumber()) { + return new BasicEvaluatedExpression() + .setString("number") + .setRange(expr.range); + } + if (arg.isBigInt()) { + return new BasicEvaluatedExpression() + .setString("bigint") + .setRange(expr.range); + } + if (arg.isBoolean()) { + return new BasicEvaluatedExpression() + .setString("boolean") + .setRange(expr.range); + } + if (arg.isConstArray() || arg.isRegExp() || arg.isNull()) { + return new BasicEvaluatedExpression() + .setString("object") + .setRange(expr.range); + } + if (arg.isArray()) { + return new BasicEvaluatedExpression() + .setString("object") + .setSideEffects(arg.couldHaveSideEffects()) + .setRange(expr.range); + } + } else if (expr.operator === "!") { + const argument = this.evaluateExpression(expr.argument); + if (!argument) return; + const bool = argument.asBool(); + if (typeof bool !== "boolean") return; + return new BasicEvaluatedExpression() + .setBoolean(!bool) + .setSideEffects(argument.couldHaveSideEffects()) + .setRange(expr.range); + } else if (expr.operator === "~") { + return handleConstOperation(v => ~v); + } else if (expr.operator === "+") { + return handleConstOperation(v => +v); + } else if (expr.operator === "-") { + return handleConstOperation(v => -v); + } + }); + this.hooks.evaluateTypeof.for("undefined").tap("JavascriptParser", expr => { + return new BasicEvaluatedExpression() + .setString("undefined") + .setRange(expr.range); + }); + /** + * @param {string} exprType expression type name + * @param {function(ExpressionNode): GetInfoResult | undefined} getInfo get info + * @returns {void} + */ + const tapEvaluateWithVariableInfo = (exprType, getInfo) => { + /** @type {ExpressionNode | undefined} */ + let cachedExpression = undefined; + /** @type {GetInfoResult | undefined} */ + let cachedInfo = undefined; + this.hooks.evaluate.for(exprType).tap("JavascriptParser", expr => { + const expression = /** @type {MemberExpressionNode} */ (expr); + + const info = getInfo(expr); + if (info !== undefined) { + return this.callHooksForInfoWithFallback( + this.hooks.evaluateIdentifier, + info.name, + name => { + cachedExpression = expression; + cachedInfo = info; + }, + name => { + const hook = this.hooks.evaluateDefinedIdentifier.get(name); + if (hook !== undefined) { + return hook.call(expression); + } + }, + expression + ); + } + }); + this.hooks.evaluate + .for(exprType) + .tap({ name: "JavascriptParser", stage: 100 }, expr => { + const info = cachedExpression === expr ? cachedInfo : getInfo(expr); + if (info !== undefined) { + return new BasicEvaluatedExpression() + .setIdentifier(info.name, info.rootInfo, info.getMembers) + .setRange(expr.range); + } + }); + }; + tapEvaluateWithVariableInfo("Identifier", expr => { + const info = this.getVariableInfo( + /** @type {IdentifierNode} */ (expr).name + ); + if ( + typeof info === "string" || + (info instanceof VariableInfo && typeof info.freeName === "string") + ) { + return { name: info, rootInfo: info, getMembers: () => [] }; + } + }); + tapEvaluateWithVariableInfo("ThisExpression", expr => { + const info = this.getVariableInfo("this"); + if ( + typeof info === "string" || + (info instanceof VariableInfo && typeof info.freeName === "string") + ) { + return { name: info, rootInfo: info, getMembers: () => [] }; + } + }); + this.hooks.evaluate.for("MetaProperty").tap("JavascriptParser", expr => { + const metaProperty = /** @type {MetaPropertyNode} */ (expr); + + return this.callHooksForName( + this.hooks.evaluateIdentifier, + getRootName(expr), + metaProperty + ); + }); + tapEvaluateWithVariableInfo("MemberExpression", expr => + this.getMemberExpressionInfo( + /** @type {MemberExpressionNode} */ (expr), + ALLOWED_MEMBER_TYPES_EXPRESSION + ) + ); + + this.hooks.evaluate.for("CallExpression").tap("JavascriptParser", _expr => { + const expr = /** @type {CallExpressionNode} */ (_expr); + if ( + expr.callee.type !== "MemberExpression" || + expr.callee.property.type !== + (expr.callee.computed ? "Literal" : "Identifier") + ) { + return; + } + + // type Super also possible here + const param = this.evaluateExpression( + /** @type {ExpressionNode} */ (expr.callee.object) + ); + if (!param) return; + const property = + expr.callee.property.type === "Literal" + ? `${expr.callee.property.value}` + : expr.callee.property.name; + const hook = this.hooks.evaluateCallExpressionMember.get(property); + if (hook !== undefined) { + return hook.call(expr, param); + } + }); + this.hooks.evaluateCallExpressionMember + .for("indexOf") + .tap("JavascriptParser", (expr, param) => { + if (!param.isString()) return; + if (expr.arguments.length === 0) return; + const [arg1, arg2] = expr.arguments; + if (arg1.type === "SpreadElement") return; + const arg1Eval = this.evaluateExpression(arg1); + if (!arg1Eval.isString()) return; + const arg1Value = arg1Eval.string; + + let result; + if (arg2) { + if (arg2.type === "SpreadElement") return; + const arg2Eval = this.evaluateExpression(arg2); + if (!arg2Eval.isNumber()) return; + result = param.string.indexOf(arg1Value, arg2Eval.number); + } else { + result = param.string.indexOf(arg1Value); + } + return new BasicEvaluatedExpression() + .setNumber(result) + .setSideEffects(param.couldHaveSideEffects()) + .setRange(expr.range); + }); + this.hooks.evaluateCallExpressionMember + .for("replace") + .tap("JavascriptParser", (expr, param) => { + if (!param.isString()) return; + if (expr.arguments.length !== 2) return; + if (expr.arguments[0].type === "SpreadElement") return; + if (expr.arguments[1].type === "SpreadElement") return; + let arg1 = this.evaluateExpression(expr.arguments[0]); + let arg2 = this.evaluateExpression(expr.arguments[1]); + if (!arg1.isString() && !arg1.isRegExp()) return; + const arg1Value = arg1.regExp || arg1.string; + if (!arg2.isString()) return; + const arg2Value = arg2.string; + return new BasicEvaluatedExpression() + .setString(param.string.replace(arg1Value, arg2Value)) + .setSideEffects(param.couldHaveSideEffects()) + .setRange(expr.range); + }); + ["substr", "substring", "slice"].forEach(fn => { + this.hooks.evaluateCallExpressionMember + .for(fn) + .tap("JavascriptParser", (expr, param) => { + if (!param.isString()) return; + let arg1; + let result, + str = param.string; + switch (expr.arguments.length) { + case 1: + if (expr.arguments[0].type === "SpreadElement") return; + arg1 = this.evaluateExpression(expr.arguments[0]); + if (!arg1.isNumber()) return; + result = str[fn](arg1.number); + break; + case 2: { + if (expr.arguments[0].type === "SpreadElement") return; + if (expr.arguments[1].type === "SpreadElement") return; + arg1 = this.evaluateExpression(expr.arguments[0]); + const arg2 = this.evaluateExpression(expr.arguments[1]); + if (!arg1.isNumber()) return; + if (!arg2.isNumber()) return; + result = str[fn](arg1.number, arg2.number); + break; + } + default: + return; + } + return new BasicEvaluatedExpression() + .setString(result) + .setSideEffects(param.couldHaveSideEffects()) + .setRange(expr.range); + }); + }); + + /** + * @param {"cooked" | "raw"} kind kind of values to get + * @param {TemplateLiteralNode} templateLiteralExpr TemplateLiteral expr + * @returns {{quasis: BasicEvaluatedExpression[], parts: BasicEvaluatedExpression[]}} Simplified template + */ + const getSimplifiedTemplateResult = (kind, templateLiteralExpr) => { + /** @type {BasicEvaluatedExpression[]} */ + const quasis = []; + /** @type {BasicEvaluatedExpression[]} */ + const parts = []; + + for (let i = 0; i < templateLiteralExpr.quasis.length; i++) { + const quasiExpr = templateLiteralExpr.quasis[i]; + const quasi = quasiExpr.value[kind]; + + if (i > 0) { + const prevExpr = parts[parts.length - 1]; + const expr = this.evaluateExpression( + templateLiteralExpr.expressions[i - 1] + ); + const exprAsString = expr.asString(); + if ( + typeof exprAsString === "string" && + !expr.couldHaveSideEffects() + ) { + // We can merge quasi + expr + quasi when expr + // is a const string + + prevExpr.setString(prevExpr.string + exprAsString + quasi); + prevExpr.setRange([prevExpr.range[0], quasiExpr.range[1]]); + // We unset the expression as it doesn't match to a single expression + prevExpr.setExpression(undefined); + continue; + } + parts.push(expr); + } + + const part = new BasicEvaluatedExpression() + .setString(quasi) + .setRange(quasiExpr.range) + .setExpression(quasiExpr); + quasis.push(part); + parts.push(part); + } + return { + quasis, + parts + }; + }; + + this.hooks.evaluate + .for("TemplateLiteral") + .tap("JavascriptParser", _node => { + const node = /** @type {TemplateLiteralNode} */ (_node); + + const { quasis, parts } = getSimplifiedTemplateResult("cooked", node); + if (parts.length === 1) { + return parts[0].setRange(node.range); + } + return new BasicEvaluatedExpression() + .setTemplateString(quasis, parts, "cooked") + .setRange(node.range); + }); + this.hooks.evaluate + .for("TaggedTemplateExpression") + .tap("JavascriptParser", _node => { + const node = /** @type {TaggedTemplateExpressionNode} */ (_node); + const tag = this.evaluateExpression(node.tag); + + if (tag.isIdentifier() && tag.identifier !== "String.raw") return; + const { quasis, parts } = getSimplifiedTemplateResult( + "raw", + node.quasi + ); + return new BasicEvaluatedExpression() + .setTemplateString(quasis, parts, "raw") + .setRange(node.range); + }); + + this.hooks.evaluateCallExpressionMember + .for("concat") + .tap("JavascriptParser", (expr, param) => { + if (!param.isString() && !param.isWrapped()) return; + + let stringSuffix = null; + let hasUnknownParams = false; + const innerExpressions = []; + for (let i = expr.arguments.length - 1; i >= 0; i--) { + const arg = expr.arguments[i]; + if (arg.type === "SpreadElement") return; + const argExpr = this.evaluateExpression(arg); + if ( + hasUnknownParams || + (!argExpr.isString() && !argExpr.isNumber()) + ) { + hasUnknownParams = true; + innerExpressions.push(argExpr); + continue; + } + + const value = argExpr.isString() + ? argExpr.string + : "" + argExpr.number; + + const newString = value + (stringSuffix ? stringSuffix.string : ""); + const newRange = [ + argExpr.range[0], + (stringSuffix || argExpr).range[1] + ]; + stringSuffix = new BasicEvaluatedExpression() + .setString(newString) + .setSideEffects( + (stringSuffix && stringSuffix.couldHaveSideEffects()) || + argExpr.couldHaveSideEffects() + ) + .setRange(newRange); + } + + if (hasUnknownParams) { + const prefix = param.isString() ? param : param.prefix; + const inner = + param.isWrapped() && param.wrappedInnerExpressions + ? param.wrappedInnerExpressions.concat(innerExpressions.reverse()) + : innerExpressions.reverse(); + return new BasicEvaluatedExpression() + .setWrapped(prefix, stringSuffix, inner) + .setRange(expr.range); + } else if (param.isWrapped()) { + const postfix = stringSuffix || param.postfix; + const inner = param.wrappedInnerExpressions + ? param.wrappedInnerExpressions.concat(innerExpressions.reverse()) + : innerExpressions.reverse(); + return new BasicEvaluatedExpression() + .setWrapped(param.prefix, postfix, inner) + .setRange(expr.range); + } else { + const newString = + param.string + (stringSuffix ? stringSuffix.string : ""); + return new BasicEvaluatedExpression() + .setString(newString) + .setSideEffects( + (stringSuffix && stringSuffix.couldHaveSideEffects()) || + param.couldHaveSideEffects() + ) + .setRange(expr.range); + } + }); + this.hooks.evaluateCallExpressionMember + .for("split") + .tap("JavascriptParser", (expr, param) => { + if (!param.isString()) return; + if (expr.arguments.length !== 1) return; + if (expr.arguments[0].type === "SpreadElement") return; + let result; + const arg = this.evaluateExpression(expr.arguments[0]); + if (arg.isString()) { + result = param.string.split(arg.string); + } else if (arg.isRegExp()) { + result = param.string.split(arg.regExp); + } else { + return; + } + return new BasicEvaluatedExpression() + .setArray(result) + .setSideEffects(param.couldHaveSideEffects()) + .setRange(expr.range); + }); + this.hooks.evaluate + .for("ConditionalExpression") + .tap("JavascriptParser", _expr => { + const expr = /** @type {ConditionalExpressionNode} */ (_expr); + + const condition = this.evaluateExpression(expr.test); + const conditionValue = condition.asBool(); + let res; + if (conditionValue === undefined) { + const consequent = this.evaluateExpression(expr.consequent); + const alternate = this.evaluateExpression(expr.alternate); + if (!consequent || !alternate) return; + res = new BasicEvaluatedExpression(); + if (consequent.isConditional()) { + res.setOptions(consequent.options); + } else { + res.setOptions([consequent]); + } + if (alternate.isConditional()) { + res.addOptions(alternate.options); + } else { + res.addOptions([alternate]); + } + } else { + res = this.evaluateExpression( + conditionValue ? expr.consequent : expr.alternate + ); + if (condition.couldHaveSideEffects()) res.setSideEffects(); + } + res.setRange(expr.range); + return res; + }); + this.hooks.evaluate + .for("ArrayExpression") + .tap("JavascriptParser", _expr => { + const expr = /** @type {ArrayExpressionNode} */ (_expr); + + const items = expr.elements.map(element => { + return ( + element !== null && + element.type !== "SpreadElement" && + this.evaluateExpression(element) + ); + }); + if (!items.every(Boolean)) return; + return new BasicEvaluatedExpression() + .setItems(items) + .setRange(expr.range); + }); + this.hooks.evaluate + .for("ChainExpression") + .tap("JavascriptParser", _expr => { + const expr = /** @type {ChainExpressionNode} */ (_expr); + /** @type {ExpressionNode[]} */ + const optionalExpressionsStack = []; + /** @type {ExpressionNode|SuperNode} */ + let next = expr.expression; + + while ( + next.type === "MemberExpression" || + next.type === "CallExpression" + ) { + if (next.type === "MemberExpression") { + if (next.optional) { + // SuperNode can not be optional + optionalExpressionsStack.push( + /** @type {ExpressionNode} */ (next.object) + ); + } + next = next.object; + } else { + if (next.optional) { + // SuperNode can not be optional + optionalExpressionsStack.push( + /** @type {ExpressionNode} */ (next.callee) + ); + } + next = next.callee; + } + } + + while (optionalExpressionsStack.length > 0) { + const expression = optionalExpressionsStack.pop(); + const evaluated = this.evaluateExpression(expression); + + if (evaluated && evaluated.asNullish()) { + return evaluated.setRange(_expr.range); + } + } + return this.evaluateExpression(expr.expression); + }); + } + + getRenameIdentifier(expr) { + const result = this.evaluateExpression(expr); + if (result && result.isIdentifier()) { + return result.identifier; + } + } + + /** + * @param {ClassExpressionNode | ClassDeclarationNode} classy a class node + * @returns {void} + */ + walkClass(classy) { + if (classy.superClass) { + if (!this.hooks.classExtendsExpression.call(classy.superClass, classy)) { + this.walkExpression(classy.superClass); + } + } + if (classy.body && classy.body.type === "ClassBody") { + const wasTopLevel = this.scope.topLevelScope; + for (const classElement of classy.body.body) { + if (!this.hooks.classBodyElement.call(classElement, classy)) { + if (classElement.type === "MethodDefinition") { + this.scope.topLevelScope = false; + this.walkMethodDefinition(classElement); + this.scope.topLevelScope = wasTopLevel; + } + // TODO add support for ClassProperty here once acorn supports it + } + } + } + } + + walkMethodDefinition(methodDefinition) { + if (methodDefinition.computed && methodDefinition.key) { + this.walkExpression(methodDefinition.key); + } + if (methodDefinition.value) { + this.walkExpression(methodDefinition.value); + } + } + + // Pre walking iterates the scope for variable declarations + preWalkStatements(statements) { + for (let index = 0, len = statements.length; index < len; index++) { + const statement = statements[index]; + this.preWalkStatement(statement); + } + } + + // Block pre walking iterates the scope for block variable declarations + blockPreWalkStatements(statements) { + for (let index = 0, len = statements.length; index < len; index++) { + const statement = statements[index]; + this.blockPreWalkStatement(statement); + } + } + + // Walking iterates the statements and expressions and processes them + walkStatements(statements) { + for (let index = 0, len = statements.length; index < len; index++) { + const statement = statements[index]; + this.walkStatement(statement); + } + } + + preWalkStatement(statement) { + this.statementPath.push(statement); + if (this.hooks.preStatement.call(statement)) { + this.prevStatement = this.statementPath.pop(); + return; + } + switch (statement.type) { + case "BlockStatement": + this.preWalkBlockStatement(statement); + break; + case "DoWhileStatement": + this.preWalkDoWhileStatement(statement); + break; + case "ForInStatement": + this.preWalkForInStatement(statement); + break; + case "ForOfStatement": + this.preWalkForOfStatement(statement); + break; + case "ForStatement": + this.preWalkForStatement(statement); + break; + case "FunctionDeclaration": + this.preWalkFunctionDeclaration(statement); + break; + case "IfStatement": + this.preWalkIfStatement(statement); + break; + case "LabeledStatement": + this.preWalkLabeledStatement(statement); + break; + case "SwitchStatement": + this.preWalkSwitchStatement(statement); + break; + case "TryStatement": + this.preWalkTryStatement(statement); + break; + case "VariableDeclaration": + this.preWalkVariableDeclaration(statement); + break; + case "WhileStatement": + this.preWalkWhileStatement(statement); + break; + case "WithStatement": + this.preWalkWithStatement(statement); + break; + } + this.prevStatement = this.statementPath.pop(); + } + + blockPreWalkStatement(statement) { + this.statementPath.push(statement); + if (this.hooks.blockPreStatement.call(statement)) { + this.prevStatement = this.statementPath.pop(); + return; + } + switch (statement.type) { + case "ImportDeclaration": + this.blockPreWalkImportDeclaration(statement); + break; + case "ExportAllDeclaration": + this.blockPreWalkExportAllDeclaration(statement); + break; + case "ExportDefaultDeclaration": + this.blockPreWalkExportDefaultDeclaration(statement); + break; + case "ExportNamedDeclaration": + this.blockPreWalkExportNamedDeclaration(statement); + break; + case "VariableDeclaration": + this.blockPreWalkVariableDeclaration(statement); + break; + case "ClassDeclaration": + this.blockPreWalkClassDeclaration(statement); + break; + } + this.prevStatement = this.statementPath.pop(); + } + + walkStatement(statement) { + this.statementPath.push(statement); + if (this.hooks.statement.call(statement) !== undefined) { + this.prevStatement = this.statementPath.pop(); + return; + } + switch (statement.type) { + case "BlockStatement": + this.walkBlockStatement(statement); + break; + case "ClassDeclaration": + this.walkClassDeclaration(statement); + break; + case "DoWhileStatement": + this.walkDoWhileStatement(statement); + break; + case "ExportDefaultDeclaration": + this.walkExportDefaultDeclaration(statement); + break; + case "ExportNamedDeclaration": + this.walkExportNamedDeclaration(statement); + break; + case "ExpressionStatement": + this.walkExpressionStatement(statement); + break; + case "ForInStatement": + this.walkForInStatement(statement); + break; + case "ForOfStatement": + this.walkForOfStatement(statement); + break; + case "ForStatement": + this.walkForStatement(statement); + break; + case "FunctionDeclaration": + this.walkFunctionDeclaration(statement); + break; + case "IfStatement": + this.walkIfStatement(statement); + break; + case "LabeledStatement": + this.walkLabeledStatement(statement); + break; + case "ReturnStatement": + this.walkReturnStatement(statement); + break; + case "SwitchStatement": + this.walkSwitchStatement(statement); + break; + case "ThrowStatement": + this.walkThrowStatement(statement); + break; + case "TryStatement": + this.walkTryStatement(statement); + break; + case "VariableDeclaration": + this.walkVariableDeclaration(statement); + break; + case "WhileStatement": + this.walkWhileStatement(statement); + break; + case "WithStatement": + this.walkWithStatement(statement); + break; + } + this.prevStatement = this.statementPath.pop(); + } + + /** + * Walks a statements that is nested within a parent statement + * and can potentially be a non-block statement. + * This enforces the nested statement to never be in ASI position. + * @param {StatementNode} statement the nested statement + * @returns {void} + */ + walkNestedStatement(statement) { + this.prevStatement = undefined; + this.walkStatement(statement); + } + + // Real Statements + preWalkBlockStatement(statement) { + this.preWalkStatements(statement.body); + } + + walkBlockStatement(statement) { + this.inBlockScope(() => { + const body = statement.body; + const prev = this.prevStatement; + this.blockPreWalkStatements(body); + this.prevStatement = prev; + this.walkStatements(body); + }); + } + + walkExpressionStatement(statement) { + this.walkExpression(statement.expression); + } + + preWalkIfStatement(statement) { + this.preWalkStatement(statement.consequent); + if (statement.alternate) { + this.preWalkStatement(statement.alternate); + } + } + + walkIfStatement(statement) { + const result = this.hooks.statementIf.call(statement); + if (result === undefined) { + this.walkExpression(statement.test); + this.walkNestedStatement(statement.consequent); + if (statement.alternate) { + this.walkNestedStatement(statement.alternate); + } + } else { + if (result) { + this.walkNestedStatement(statement.consequent); + } else if (statement.alternate) { + this.walkNestedStatement(statement.alternate); + } + } + } + + preWalkLabeledStatement(statement) { + this.preWalkStatement(statement.body); + } + + walkLabeledStatement(statement) { + const hook = this.hooks.label.get(statement.label.name); + if (hook !== undefined) { + const result = hook.call(statement); + if (result === true) return; + } + this.walkNestedStatement(statement.body); + } + + preWalkWithStatement(statement) { + this.preWalkStatement(statement.body); + } + + walkWithStatement(statement) { + this.walkExpression(statement.object); + this.walkNestedStatement(statement.body); + } + + preWalkSwitchStatement(statement) { + this.preWalkSwitchCases(statement.cases); + } + + walkSwitchStatement(statement) { + this.walkExpression(statement.discriminant); + this.walkSwitchCases(statement.cases); + } + + walkTerminatingStatement(statement) { + if (statement.argument) this.walkExpression(statement.argument); + } + + walkReturnStatement(statement) { + this.walkTerminatingStatement(statement); + } + + walkThrowStatement(statement) { + this.walkTerminatingStatement(statement); + } + + preWalkTryStatement(statement) { + this.preWalkStatement(statement.block); + if (statement.handler) this.preWalkCatchClause(statement.handler); + if (statement.finializer) this.preWalkStatement(statement.finializer); + } + + walkTryStatement(statement) { + if (this.scope.inTry) { + this.walkStatement(statement.block); + } else { + this.scope.inTry = true; + this.walkStatement(statement.block); + this.scope.inTry = false; + } + if (statement.handler) this.walkCatchClause(statement.handler); + if (statement.finalizer) this.walkStatement(statement.finalizer); + } + + preWalkWhileStatement(statement) { + this.preWalkStatement(statement.body); + } + + walkWhileStatement(statement) { + this.walkExpression(statement.test); + this.walkNestedStatement(statement.body); + } + + preWalkDoWhileStatement(statement) { + this.preWalkStatement(statement.body); + } + + walkDoWhileStatement(statement) { + this.walkNestedStatement(statement.body); + this.walkExpression(statement.test); + } + + preWalkForStatement(statement) { + if (statement.init) { + if (statement.init.type === "VariableDeclaration") { + this.preWalkStatement(statement.init); + } + } + this.preWalkStatement(statement.body); + } + + walkForStatement(statement) { + this.inBlockScope(() => { + if (statement.init) { + if (statement.init.type === "VariableDeclaration") { + this.blockPreWalkVariableDeclaration(statement.init); + this.prevStatement = undefined; + this.walkStatement(statement.init); + } else { + this.walkExpression(statement.init); + } + } + if (statement.test) { + this.walkExpression(statement.test); + } + if (statement.update) { + this.walkExpression(statement.update); + } + const body = statement.body; + if (body.type === "BlockStatement") { + // no need to add additional scope + const prev = this.prevStatement; + this.blockPreWalkStatements(body.body); + this.prevStatement = prev; + this.walkStatements(body.body); + } else { + this.walkNestedStatement(body); + } + }); + } + + preWalkForInStatement(statement) { + if (statement.left.type === "VariableDeclaration") { + this.preWalkVariableDeclaration(statement.left); + } + this.preWalkStatement(statement.body); + } + + walkForInStatement(statement) { + this.inBlockScope(() => { + if (statement.left.type === "VariableDeclaration") { + this.blockPreWalkVariableDeclaration(statement.left); + this.walkVariableDeclaration(statement.left); + } else { + this.walkPattern(statement.left); + } + this.walkExpression(statement.right); + const body = statement.body; + if (body.type === "BlockStatement") { + // no need to add additional scope + const prev = this.prevStatement; + this.blockPreWalkStatements(body.body); + this.prevStatement = prev; + this.walkStatements(body.body); + } else { + this.walkNestedStatement(body); + } + }); + } + + preWalkForOfStatement(statement) { + if (statement.await && this.scope.topLevelScope === true) { + this.hooks.topLevelAwait.call(statement); + } + if (statement.left.type === "VariableDeclaration") { + this.preWalkVariableDeclaration(statement.left); + } + this.preWalkStatement(statement.body); + } + + walkForOfStatement(statement) { + this.inBlockScope(() => { + if (statement.left.type === "VariableDeclaration") { + this.blockPreWalkVariableDeclaration(statement.left); + this.walkVariableDeclaration(statement.left); + } else { + this.walkPattern(statement.left); + } + this.walkExpression(statement.right); + const body = statement.body; + if (body.type === "BlockStatement") { + // no need to add additional scope + const prev = this.prevStatement; + this.blockPreWalkStatements(body.body); + this.prevStatement = prev; + this.walkStatements(body.body); + } else { + this.walkNestedStatement(body); + } + }); + } + + // Declarations + preWalkFunctionDeclaration(statement) { + if (statement.id) { + this.defineVariable(statement.id.name); + } + } + + walkFunctionDeclaration(statement) { + const wasTopLevel = this.scope.topLevelScope; + this.scope.topLevelScope = false; + this.inFunctionScope(true, statement.params, () => { + for (const param of statement.params) { + this.walkPattern(param); + } + if (statement.body.type === "BlockStatement") { + this.detectMode(statement.body.body); + const prev = this.prevStatement; + this.preWalkStatement(statement.body); + this.prevStatement = prev; + this.walkStatement(statement.body); + } else { + this.walkExpression(statement.body); + } + }); + this.scope.topLevelScope = wasTopLevel; + } + + blockPreWalkImportDeclaration(statement) { + const source = statement.source.value; + this.hooks.import.call(statement, source); + for (const specifier of statement.specifiers) { + const name = specifier.local.name; + switch (specifier.type) { + case "ImportDefaultSpecifier": + if ( + !this.hooks.importSpecifier.call(statement, source, "default", name) + ) { + this.defineVariable(name); + } + break; + case "ImportSpecifier": + if ( + !this.hooks.importSpecifier.call( + statement, + source, + specifier.imported.name, + name + ) + ) { + this.defineVariable(name); + } + break; + case "ImportNamespaceSpecifier": + if (!this.hooks.importSpecifier.call(statement, source, null, name)) { + this.defineVariable(name); + } + break; + default: + this.defineVariable(name); + } + } + } + + enterDeclaration(declaration, onIdent) { + switch (declaration.type) { + case "VariableDeclaration": + for (const declarator of declaration.declarations) { + switch (declarator.type) { + case "VariableDeclarator": { + this.enterPattern(declarator.id, onIdent); + break; + } + } + } + break; + case "FunctionDeclaration": + this.enterPattern(declaration.id, onIdent); + break; + case "ClassDeclaration": + this.enterPattern(declaration.id, onIdent); + break; + } + } + + blockPreWalkExportNamedDeclaration(statement) { + let source; + if (statement.source) { + source = statement.source.value; + this.hooks.exportImport.call(statement, source); + } else { + this.hooks.export.call(statement); + } + if (statement.declaration) { + if ( + !this.hooks.exportDeclaration.call(statement, statement.declaration) + ) { + const prev = this.prevStatement; + this.preWalkStatement(statement.declaration); + this.prevStatement = prev; + this.blockPreWalkStatement(statement.declaration); + let index = 0; + this.enterDeclaration(statement.declaration, def => { + this.hooks.exportSpecifier.call(statement, def, def, index++); + }); + } + } + if (statement.specifiers) { + for ( + let specifierIndex = 0; + specifierIndex < statement.specifiers.length; + specifierIndex++ + ) { + const specifier = statement.specifiers[specifierIndex]; + switch (specifier.type) { + case "ExportSpecifier": { + const name = specifier.exported.name; + if (source) { + this.hooks.exportImportSpecifier.call( + statement, + source, + specifier.local.name, + name, + specifierIndex + ); + } else { + this.hooks.exportSpecifier.call( + statement, + specifier.local.name, + name, + specifierIndex + ); + } + break; + } + } + } + } + } + + walkExportNamedDeclaration(statement) { + if (statement.declaration) { + this.walkStatement(statement.declaration); + } + } + + blockPreWalkExportDefaultDeclaration(statement) { + const prev = this.prevStatement; + this.preWalkStatement(statement.declaration); + this.prevStatement = prev; + this.blockPreWalkStatement(statement.declaration); + if ( + statement.declaration.id && + statement.declaration.type !== "FunctionExpression" && + statement.declaration.type !== "ClassExpression" + ) { + this.hooks.exportSpecifier.call( + statement, + statement.declaration.id.name, + "default", + undefined + ); + } + } + + walkExportDefaultDeclaration(statement) { + this.hooks.export.call(statement); + if ( + statement.declaration.id && + statement.declaration.type !== "FunctionExpression" && + statement.declaration.type !== "ClassExpression" + ) { + if ( + !this.hooks.exportDeclaration.call(statement, statement.declaration) + ) { + this.walkStatement(statement.declaration); + } + } else { + // Acorn parses `export default function() {}` as `FunctionDeclaration` and + // `export default class {}` as `ClassDeclaration`, both with `id = null`. + // These nodes must be treated as expressions. + if ( + statement.declaration.type === "FunctionDeclaration" || + statement.declaration.type === "ClassDeclaration" + ) { + this.walkStatement(statement.declaration); + } else { + this.walkExpression(statement.declaration); + } + if (!this.hooks.exportExpression.call(statement, statement.declaration)) { + this.hooks.exportSpecifier.call( + statement, + statement.declaration, + "default", + undefined + ); + } + } + } + + blockPreWalkExportAllDeclaration(statement) { + const source = statement.source.value; + const name = statement.exported ? statement.exported.name : null; + this.hooks.exportImport.call(statement, source); + this.hooks.exportImportSpecifier.call(statement, source, null, name, 0); + } + + preWalkVariableDeclaration(statement) { + if (statement.kind !== "var") return; + this._preWalkVariableDeclaration(statement, this.hooks.varDeclarationVar); + } + + blockPreWalkVariableDeclaration(statement) { + if (statement.kind === "var") return; + const hookMap = + statement.kind === "const" + ? this.hooks.varDeclarationConst + : this.hooks.varDeclarationLet; + this._preWalkVariableDeclaration(statement, hookMap); + } + + _preWalkVariableDeclaration(statement, hookMap) { + for (const declarator of statement.declarations) { + switch (declarator.type) { + case "VariableDeclarator": { + if (!this.hooks.preDeclarator.call(declarator, statement)) { + this.enterPattern(declarator.id, (name, decl) => { + let hook = hookMap.get(name); + if (hook === undefined || !hook.call(decl)) { + hook = this.hooks.varDeclaration.get(name); + if (hook === undefined || !hook.call(decl)) { + this.defineVariable(name); + } + } + }); + } + break; + } + } + } + } + + walkVariableDeclaration(statement) { + for (const declarator of statement.declarations) { + switch (declarator.type) { + case "VariableDeclarator": { + const renameIdentifier = + declarator.init && this.getRenameIdentifier(declarator.init); + if (renameIdentifier && declarator.id.type === "Identifier") { + const hook = this.hooks.canRename.get(renameIdentifier); + if (hook !== undefined && hook.call(declarator.init)) { + // renaming with "var a = b;" + const hook = this.hooks.rename.get(renameIdentifier); + if (hook === undefined || !hook.call(declarator.init)) { + this.setVariable(declarator.id.name, renameIdentifier); + } + break; + } + } + if (!this.hooks.declarator.call(declarator, statement)) { + this.walkPattern(declarator.id); + if (declarator.init) this.walkExpression(declarator.init); + } + break; + } + } + } + } + + blockPreWalkClassDeclaration(statement) { + if (statement.id) { + this.defineVariable(statement.id.name); + } + } + + walkClassDeclaration(statement) { + this.walkClass(statement); + } + + preWalkSwitchCases(switchCases) { + for (let index = 0, len = switchCases.length; index < len; index++) { + const switchCase = switchCases[index]; + this.preWalkStatements(switchCase.consequent); + } + } + + walkSwitchCases(switchCases) { + this.inBlockScope(() => { + const len = switchCases.length; + + // we need to pre walk all statements first since we can have invalid code + // import A from "module"; + // switch(1) { + // case 1: + // console.log(A); // should fail at runtime + // case 2: + // const A = 1; + // } + for (let index = 0; index < len; index++) { + const switchCase = switchCases[index]; + + if (switchCase.consequent.length > 0) { + const prev = this.prevStatement; + this.blockPreWalkStatements(switchCase.consequent); + this.prevStatement = prev; + } + } + + for (let index = 0; index < len; index++) { + const switchCase = switchCases[index]; + + if (switchCase.test) { + this.walkExpression(switchCase.test); + } + if (switchCase.consequent.length > 0) { + this.walkStatements(switchCase.consequent); + } + } + }); + } + + preWalkCatchClause(catchClause) { + this.preWalkStatement(catchClause.body); + } + + walkCatchClause(catchClause) { + this.inBlockScope(() => { + // Error binding is optional in catch clause since ECMAScript 2019 + if (catchClause.param !== null) { + this.enterPattern(catchClause.param, ident => { + this.defineVariable(ident); + }); + this.walkPattern(catchClause.param); + } + const prev = this.prevStatement; + this.blockPreWalkStatement(catchClause.body); + this.prevStatement = prev; + this.walkStatement(catchClause.body); + }); + } + + walkPattern(pattern) { + switch (pattern.type) { + case "ArrayPattern": + this.walkArrayPattern(pattern); + break; + case "AssignmentPattern": + this.walkAssignmentPattern(pattern); + break; + case "MemberExpression": + this.walkMemberExpression(pattern); + break; + case "ObjectPattern": + this.walkObjectPattern(pattern); + break; + case "RestElement": + this.walkRestElement(pattern); + break; + } + } + + walkAssignmentPattern(pattern) { + this.walkExpression(pattern.right); + this.walkPattern(pattern.left); + } + + walkObjectPattern(pattern) { + for (let i = 0, len = pattern.properties.length; i < len; i++) { + const prop = pattern.properties[i]; + if (prop) { + if (prop.computed) this.walkExpression(prop.key); + if (prop.value) this.walkPattern(prop.value); + } + } + } + + walkArrayPattern(pattern) { + for (let i = 0, len = pattern.elements.length; i < len; i++) { + const element = pattern.elements[i]; + if (element) this.walkPattern(element); + } + } + + walkRestElement(pattern) { + this.walkPattern(pattern.argument); + } + + walkExpressions(expressions) { + for (const expression of expressions) { + if (expression) { + this.walkExpression(expression); + } + } + } + + walkExpression(expression) { + switch (expression.type) { + case "ArrayExpression": + this.walkArrayExpression(expression); + break; + case "ArrowFunctionExpression": + this.walkArrowFunctionExpression(expression); + break; + case "AssignmentExpression": + this.walkAssignmentExpression(expression); + break; + case "AwaitExpression": + this.walkAwaitExpression(expression); + break; + case "BinaryExpression": + this.walkBinaryExpression(expression); + break; + case "CallExpression": + this.walkCallExpression(expression); + break; + case "ChainExpression": + this.walkChainExpression(expression); + break; + case "ClassExpression": + this.walkClassExpression(expression); + break; + case "ConditionalExpression": + this.walkConditionalExpression(expression); + break; + case "FunctionExpression": + this.walkFunctionExpression(expression); + break; + case "Identifier": + this.walkIdentifier(expression); + break; + case "ImportExpression": + this.walkImportExpression(expression); + break; + case "LogicalExpression": + this.walkLogicalExpression(expression); + break; + case "MetaProperty": + this.walkMetaProperty(expression); + break; + case "MemberExpression": + this.walkMemberExpression(expression); + break; + case "NewExpression": + this.walkNewExpression(expression); + break; + case "ObjectExpression": + this.walkObjectExpression(expression); + break; + case "SequenceExpression": + this.walkSequenceExpression(expression); + break; + case "SpreadElement": + this.walkSpreadElement(expression); + break; + case "TaggedTemplateExpression": + this.walkTaggedTemplateExpression(expression); + break; + case "TemplateLiteral": + this.walkTemplateLiteral(expression); + break; + case "ThisExpression": + this.walkThisExpression(expression); + break; + case "UnaryExpression": + this.walkUnaryExpression(expression); + break; + case "UpdateExpression": + this.walkUpdateExpression(expression); + break; + case "YieldExpression": + this.walkYieldExpression(expression); + break; + } + } + + walkAwaitExpression(expression) { + if (this.scope.topLevelScope === true) + this.hooks.topLevelAwait.call(expression); + this.walkExpression(expression.argument); + } + + walkArrayExpression(expression) { + if (expression.elements) { + this.walkExpressions(expression.elements); + } + } + + walkSpreadElement(expression) { + if (expression.argument) { + this.walkExpression(expression.argument); + } + } + + walkObjectExpression(expression) { + for ( + let propIndex = 0, len = expression.properties.length; + propIndex < len; + propIndex++ + ) { + const prop = expression.properties[propIndex]; + if (prop.type === "SpreadElement") { + this.walkExpression(prop.argument); + continue; + } + if (prop.computed) { + this.walkExpression(prop.key); + } + if (prop.shorthand && prop.value && prop.value.type === "Identifier") { + this.scope.inShorthand = prop.value.name; + this.walkIdentifier(prop.value); + this.scope.inShorthand = false; + } else { + this.walkExpression(prop.value); + } + } + } + + walkFunctionExpression(expression) { + const wasTopLevel = this.scope.topLevelScope; + this.scope.topLevelScope = false; + const scopeParams = expression.params; + + // Add function name in scope for recursive calls + if (expression.id) { + scopeParams.push(expression.id.name); + } + + this.inFunctionScope(true, scopeParams, () => { + for (const param of expression.params) { + this.walkPattern(param); + } + if (expression.body.type === "BlockStatement") { + this.detectMode(expression.body.body); + const prev = this.prevStatement; + this.preWalkStatement(expression.body); + this.prevStatement = prev; + this.walkStatement(expression.body); + } else { + this.walkExpression(expression.body); + } + }); + this.scope.topLevelScope = wasTopLevel; + } + + walkArrowFunctionExpression(expression) { + const wasTopLevel = this.scope.topLevelScope; + this.scope.topLevelScope = wasTopLevel ? "arrow" : false; + this.inFunctionScope(false, expression.params, () => { + for (const param of expression.params) { + this.walkPattern(param); + } + if (expression.body.type === "BlockStatement") { + this.detectMode(expression.body.body); + const prev = this.prevStatement; + this.preWalkStatement(expression.body); + this.prevStatement = prev; + this.walkStatement(expression.body); + } else { + this.walkExpression(expression.body); + } + }); + this.scope.topLevelScope = wasTopLevel; + } + + /** + * @param {SequenceExpressionNode} expression the sequence + */ + walkSequenceExpression(expression) { + if (!expression.expressions) return; + // We treat sequence expressions like statements when they are one statement level + // This has some benefits for optimizations that only work on statement level + const currentStatement = this.statementPath[this.statementPath.length - 1]; + if ( + currentStatement === expression || + (currentStatement.type === "ExpressionStatement" && + currentStatement.expression === expression) + ) { + const old = this.statementPath.pop(); + for (const expr of expression.expressions) { + this.statementPath.push(expr); + this.walkExpression(expr); + this.statementPath.pop(); + } + this.statementPath.push(old); + } else { + this.walkExpressions(expression.expressions); + } + } + + walkUpdateExpression(expression) { + this.walkExpression(expression.argument); + } + + walkUnaryExpression(expression) { + if (expression.operator === "typeof") { + const result = this.callHooksForExpression( + this.hooks.typeof, + expression.argument, + expression + ); + if (result === true) return; + if (expression.argument.type === "ChainExpression") { + const result = this.callHooksForExpression( + this.hooks.typeof, + expression.argument.expression, + expression + ); + if (result === true) return; + } + } + this.walkExpression(expression.argument); + } + + walkLeftRightExpression(expression) { + this.walkExpression(expression.left); + this.walkExpression(expression.right); + } + + walkBinaryExpression(expression) { + this.walkLeftRightExpression(expression); + } + + walkLogicalExpression(expression) { + const result = this.hooks.expressionLogicalOperator.call(expression); + if (result === undefined) { + this.walkLeftRightExpression(expression); + } else { + if (result) { + this.walkExpression(expression.right); + } + } + } + + walkAssignmentExpression(expression) { + if (expression.left.type === "Identifier") { + const renameIdentifier = this.getRenameIdentifier(expression.right); + if (renameIdentifier) { + if ( + this.callHooksForInfo( + this.hooks.canRename, + renameIdentifier, + expression.right + ) + ) { + // renaming "a = b;" + if ( + !this.callHooksForInfo( + this.hooks.rename, + renameIdentifier, + expression.right + ) + ) { + this.setVariable( + expression.left.name, + this.getVariableInfo(renameIdentifier) + ); + } + return; + } + } + this.walkExpression(expression.right); + this.enterPattern(expression.left, (name, decl) => { + if (!this.callHooksForName(this.hooks.assign, name, expression)) { + this.walkExpression(expression.left); + } + }); + return; + } + if (expression.left.type.endsWith("Pattern")) { + this.walkExpression(expression.right); + this.enterPattern(expression.left, (name, decl) => { + if (!this.callHooksForName(this.hooks.assign, name, expression)) { + this.defineVariable(name); + } + }); + this.walkPattern(expression.left); + } else if (expression.left.type === "MemberExpression") { + const exprName = this.getMemberExpressionInfo( + expression.left, + ALLOWED_MEMBER_TYPES_EXPRESSION + ); + if (exprName) { + if ( + this.callHooksForInfo( + this.hooks.assignMemberChain, + exprName.rootInfo, + expression, + exprName.getMembers() + ) + ) { + return; + } + } + this.walkExpression(expression.right); + this.walkExpression(expression.left); + } else { + this.walkExpression(expression.right); + this.walkExpression(expression.left); + } + } + + walkConditionalExpression(expression) { + const result = this.hooks.expressionConditionalOperator.call(expression); + if (result === undefined) { + this.walkExpression(expression.test); + this.walkExpression(expression.consequent); + if (expression.alternate) { + this.walkExpression(expression.alternate); + } + } else { + if (result) { + this.walkExpression(expression.consequent); + } else if (expression.alternate) { + this.walkExpression(expression.alternate); + } + } + } + + walkNewExpression(expression) { + const result = this.callHooksForExpression( + this.hooks.new, + expression.callee, + expression + ); + if (result === true) return; + this.walkExpression(expression.callee); + if (expression.arguments) { + this.walkExpressions(expression.arguments); + } + } + + walkYieldExpression(expression) { + if (expression.argument) { + this.walkExpression(expression.argument); + } + } + + walkTemplateLiteral(expression) { + if (expression.expressions) { + this.walkExpressions(expression.expressions); + } + } + + walkTaggedTemplateExpression(expression) { + if (expression.tag) { + this.walkExpression(expression.tag); + } + if (expression.quasi && expression.quasi.expressions) { + this.walkExpressions(expression.quasi.expressions); + } + } + + walkClassExpression(expression) { + this.walkClass(expression); + } + + /** + * @param {ChainExpressionNode} expression expression + */ + walkChainExpression(expression) { + const result = this.hooks.optionalChaining.call(expression); + + if (result === undefined) { + if (expression.expression.type === "CallExpression") { + this.walkCallExpression(expression.expression); + } else { + this.walkMemberExpression(expression.expression); + } + } + } + + _walkIIFE(functionExpression, options, currentThis) { + const getVarInfo = argOrThis => { + const renameIdentifier = this.getRenameIdentifier(argOrThis); + if (renameIdentifier) { + if ( + this.callHooksForInfo( + this.hooks.canRename, + renameIdentifier, + argOrThis + ) + ) { + if ( + !this.callHooksForInfo( + this.hooks.rename, + renameIdentifier, + argOrThis + ) + ) { + return this.getVariableInfo(renameIdentifier); + } + } + } + this.walkExpression(argOrThis); + }; + const { params, type } = functionExpression; + const arrow = type === "ArrowFunctionExpression"; + const renameThis = currentThis ? getVarInfo(currentThis) : null; + const varInfoForArgs = options.map(getVarInfo); + const wasTopLevel = this.scope.topLevelScope; + this.scope.topLevelScope = wasTopLevel && arrow ? "arrow" : false; + const scopeParams = params.filter( + (identifier, idx) => !varInfoForArgs[idx] + ); + + // Add function name in scope for recursive calls + if (functionExpression.id) { + scopeParams.push(functionExpression.id.name); + } + + this.inFunctionScope(true, scopeParams, () => { + if (renameThis && !arrow) { + this.setVariable("this", renameThis); + } + for (let i = 0; i < varInfoForArgs.length; i++) { + const varInfo = varInfoForArgs[i]; + if (!varInfo) continue; + if (!params[i] || params[i].type !== "Identifier") continue; + this.setVariable(params[i].name, varInfo); + } + if (functionExpression.body.type === "BlockStatement") { + this.detectMode(functionExpression.body.body); + const prev = this.prevStatement; + this.preWalkStatement(functionExpression.body); + this.prevStatement = prev; + this.walkStatement(functionExpression.body); + } else { + this.walkExpression(functionExpression.body); + } + }); + this.scope.topLevelScope = wasTopLevel; + } + + walkImportExpression(expression) { + let result = this.hooks.importCall.call(expression); + if (result === true) return; + + this.walkExpression(expression.source); + } + + walkCallExpression(expression) { + if ( + expression.callee.type === "MemberExpression" && + expression.callee.object.type.endsWith("FunctionExpression") && + !expression.callee.computed && + (expression.callee.property.name === "call" || + expression.callee.property.name === "bind") && + expression.arguments.length > 0 + ) { + // (function(…) { }.call/bind(?, …)) + this._walkIIFE( + expression.callee.object, + expression.arguments.slice(1), + expression.arguments[0] + ); + } else if (expression.callee.type.endsWith("FunctionExpression")) { + // (function(…) { }(…)) + this._walkIIFE(expression.callee, expression.arguments, null); + } else { + if (expression.callee.type === "MemberExpression") { + const exprInfo = this.getMemberExpressionInfo( + expression.callee, + ALLOWED_MEMBER_TYPES_CALL_EXPRESSION + ); + if (exprInfo && exprInfo.type === "call") { + const result = this.callHooksForInfo( + this.hooks.callMemberChainOfCallMemberChain, + exprInfo.rootInfo, + expression, + exprInfo.getCalleeMembers(), + exprInfo.call, + exprInfo.getMembers() + ); + if (result === true) return; + } + } + const callee = this.evaluateExpression(expression.callee); + if (callee.isIdentifier()) { + const result1 = this.callHooksForInfo( + this.hooks.callMemberChain, + callee.rootInfo, + expression, + callee.getMembers() + ); + if (result1 === true) return; + const result2 = this.callHooksForInfo( + this.hooks.call, + callee.identifier, + expression + ); + if (result2 === true) return; + } + + if (expression.callee) { + if (expression.callee.type === "MemberExpression") { + // because of call context we need to walk the call context as expression + this.walkExpression(expression.callee.object); + if (expression.callee.computed === true) + this.walkExpression(expression.callee.property); + } else { + this.walkExpression(expression.callee); + } + } + if (expression.arguments) this.walkExpressions(expression.arguments); + } + } + + walkMemberExpression(expression) { + const exprInfo = this.getMemberExpressionInfo( + expression, + ALLOWED_MEMBER_TYPES_ALL + ); + if (exprInfo) { + switch (exprInfo.type) { + case "expression": { + const result1 = this.callHooksForInfo( + this.hooks.expression, + exprInfo.name, + expression + ); + if (result1 === true) return; + const members = exprInfo.getMembers(); + const result2 = this.callHooksForInfo( + this.hooks.expressionMemberChain, + exprInfo.rootInfo, + expression, + members + ); + if (result2 === true) return; + this.walkMemberExpressionWithExpressionName( + expression, + exprInfo.name, + exprInfo.rootInfo, + members.slice(), + () => + this.callHooksForInfo( + this.hooks.unhandledExpressionMemberChain, + exprInfo.rootInfo, + expression, + members + ) + ); + return; + } + case "call": { + const result = this.callHooksForInfo( + this.hooks.memberChainOfCallMemberChain, + exprInfo.rootInfo, + expression, + exprInfo.getCalleeMembers(), + exprInfo.call, + exprInfo.getMembers() + ); + if (result === true) return; + // Fast skip over the member chain as we already called memberChainOfCallMemberChain + // and call computed property are literals anyway + this.walkExpression(exprInfo.call); + return; + } + } + } + this.walkExpression(expression.object); + if (expression.computed === true) this.walkExpression(expression.property); + } + + walkMemberExpressionWithExpressionName( + expression, + name, + rootInfo, + members, + onUnhandled + ) { + if (expression.object.type === "MemberExpression") { + // optimize the case where expression.object is a MemberExpression too. + // we can keep info here when calling walkMemberExpression directly + const property = + expression.property.name || `${expression.property.value}`; + name = name.slice(0, -property.length - 1); + members.pop(); + const result = this.callHooksForInfo( + this.hooks.expression, + name, + expression.object + ); + if (result === true) return; + this.walkMemberExpressionWithExpressionName( + expression.object, + name, + rootInfo, + members, + onUnhandled + ); + } else if (!onUnhandled || !onUnhandled()) { + this.walkExpression(expression.object); + } + if (expression.computed === true) this.walkExpression(expression.property); + } + + walkThisExpression(expression) { + this.callHooksForName(this.hooks.expression, "this", expression); + } + + walkIdentifier(expression) { + this.callHooksForName(this.hooks.expression, expression.name, expression); + } + + /** + * @param {MetaPropertyNode} metaProperty meta property + */ + walkMetaProperty(metaProperty) { + this.hooks.expression.for(getRootName(metaProperty)).call(metaProperty); + } + + callHooksForExpression(hookMap, expr, ...args) { + return this.callHooksForExpressionWithFallback( + hookMap, + expr, + undefined, + undefined, + ...args + ); + } + + /** + * @template T + * @template R + * @param {HookMap>} hookMap hooks the should be called + * @param {MemberExpressionNode} expr expression info + * @param {function(string, string | ScopeInfo | VariableInfo, function(): string[]): any} fallback callback when variable in not handled by hooks + * @param {function(string): any} defined callback when variable is defined + * @param {AsArray} args args for the hook + * @returns {R} result of hook + */ + callHooksForExpressionWithFallback( + hookMap, + expr, + fallback, + defined, + ...args + ) { + const exprName = this.getMemberExpressionInfo( + expr, + ALLOWED_MEMBER_TYPES_EXPRESSION + ); + if (exprName !== undefined) { + const members = exprName.getMembers(); + return this.callHooksForInfoWithFallback( + hookMap, + members.length === 0 ? exprName.rootInfo : exprName.name, + fallback && + (name => fallback(name, exprName.rootInfo, exprName.getMembers)), + defined && (() => defined(exprName.name)), + ...args + ); + } + } + + /** + * @template T + * @template R + * @param {HookMap>} hookMap hooks the should be called + * @param {string} name key in map + * @param {AsArray} args args for the hook + * @returns {R} result of hook + */ + callHooksForName(hookMap, name, ...args) { + return this.callHooksForNameWithFallback( + hookMap, + name, + undefined, + undefined, + ...args + ); + } + + /** + * @template T + * @template R + * @param {HookMap>} hookMap hooks that should be called + * @param {ExportedVariableInfo} info variable info + * @param {AsArray} args args for the hook + * @returns {R} result of hook + */ + callHooksForInfo(hookMap, info, ...args) { + return this.callHooksForInfoWithFallback( + hookMap, + info, + undefined, + undefined, + ...args + ); + } + + /** + * @template T + * @template R + * @param {HookMap>} hookMap hooks the should be called + * @param {ExportedVariableInfo} info variable info + * @param {function(string): any} fallback callback when variable in not handled by hooks + * @param {function(): any} defined callback when variable is defined + * @param {AsArray} args args for the hook + * @returns {R} result of hook + */ + callHooksForInfoWithFallback(hookMap, info, fallback, defined, ...args) { + let name; + if (typeof info === "string") { + name = info; + } else { + if (!(info instanceof VariableInfo)) { + if (defined !== undefined) { + return defined(); + } + return; + } + let tagInfo = info.tagInfo; + while (tagInfo !== undefined) { + const hook = hookMap.get(tagInfo.tag); + if (hook !== undefined) { + this.currentTagData = tagInfo.data; + const result = hook.call(...args); + this.currentTagData = undefined; + if (result !== undefined) return result; + } + tagInfo = tagInfo.next; + } + if (info.freeName === true) { + if (defined !== undefined) { + return defined(); + } + return; + } + name = info.freeName; + } + const hook = hookMap.get(name); + if (hook !== undefined) { + const result = hook.call(...args); + if (result !== undefined) return result; + } + if (fallback !== undefined) { + return fallback(name); + } + } + + /** + * @template T + * @template R + * @param {HookMap>} hookMap hooks the should be called + * @param {string} name key in map + * @param {function(string): any} fallback callback when variable in not handled by hooks + * @param {function(): any} defined callback when variable is defined + * @param {AsArray} args args for the hook + * @returns {R} result of hook + */ + callHooksForNameWithFallback(hookMap, name, fallback, defined, ...args) { + return this.callHooksForInfoWithFallback( + hookMap, + this.getVariableInfo(name), + fallback, + defined, + ...args + ); + } + + /** + * @deprecated + * @param {any} params scope params + * @param {function(): void} fn inner function + * @returns {void} + */ + inScope(params, fn) { + const oldScope = this.scope; + this.scope = { + topLevelScope: oldScope.topLevelScope, + inTry: false, + inShorthand: false, + isStrict: oldScope.isStrict, + isAsmJs: oldScope.isAsmJs, + definitions: oldScope.definitions.createChild() + }; + + this.undefineVariable("this"); + + this.enterPatterns(params, (ident, pattern) => { + this.defineVariable(ident); + }); + + fn(); + + this.scope = oldScope; + } + + inFunctionScope(hasThis, params, fn) { + const oldScope = this.scope; + this.scope = { + topLevelScope: oldScope.topLevelScope, + inTry: false, + inShorthand: false, + isStrict: oldScope.isStrict, + isAsmJs: oldScope.isAsmJs, + definitions: oldScope.definitions.createChild() + }; + + if (hasThis) { + this.undefineVariable("this"); + } + + this.enterPatterns(params, (ident, pattern) => { + this.defineVariable(ident); + }); + + fn(); + + this.scope = oldScope; + } + + inBlockScope(fn) { + const oldScope = this.scope; + this.scope = { + topLevelScope: oldScope.topLevelScope, + inTry: oldScope.inTry, + inShorthand: false, + isStrict: oldScope.isStrict, + isAsmJs: oldScope.isAsmJs, + definitions: oldScope.definitions.createChild() + }; + + fn(); + + this.scope = oldScope; + } + + detectMode(statements) { + const isLiteral = + statements.length >= 1 && + statements[0].type === "ExpressionStatement" && + statements[0].expression.type === "Literal"; + if (isLiteral && statements[0].expression.value === "use strict") { + this.scope.isStrict = true; + } + if (isLiteral && statements[0].expression.value === "use asm") { + this.scope.isAsmJs = true; + } + } + + enterPatterns(patterns, onIdent) { + for (const pattern of patterns) { + if (typeof pattern !== "string") { + this.enterPattern(pattern, onIdent); + } else if (pattern) { + onIdent(pattern); + } + } + } + + enterPattern(pattern, onIdent) { + if (!pattern) return; + switch (pattern.type) { + case "ArrayPattern": + this.enterArrayPattern(pattern, onIdent); + break; + case "AssignmentPattern": + this.enterAssignmentPattern(pattern, onIdent); + break; + case "Identifier": + this.enterIdentifier(pattern, onIdent); + break; + case "ObjectPattern": + this.enterObjectPattern(pattern, onIdent); + break; + case "RestElement": + this.enterRestElement(pattern, onIdent); + break; + case "Property": + if (pattern.shorthand && pattern.value.type === "Identifier") { + this.scope.inShorthand = pattern.value.name; + this.enterIdentifier(pattern.value, onIdent); + this.scope.inShorthand = false; + } else { + this.enterPattern(pattern.value, onIdent); + } + break; + } + } + + enterIdentifier(pattern, onIdent) { + if (!this.callHooksForName(this.hooks.pattern, pattern.name, pattern)) { + onIdent(pattern.name, pattern); + } + } + + enterObjectPattern(pattern, onIdent) { + for ( + let propIndex = 0, len = pattern.properties.length; + propIndex < len; + propIndex++ + ) { + const prop = pattern.properties[propIndex]; + this.enterPattern(prop, onIdent); + } + } + + enterArrayPattern(pattern, onIdent) { + for ( + let elementIndex = 0, len = pattern.elements.length; + elementIndex < len; + elementIndex++ + ) { + const element = pattern.elements[elementIndex]; + this.enterPattern(element, onIdent); + } + } + + enterRestElement(pattern, onIdent) { + this.enterPattern(pattern.argument, onIdent); + } + + enterAssignmentPattern(pattern, onIdent) { + this.enterPattern(pattern.left, onIdent); + } + + /** + * @param {ExpressionNode} expression expression node + * @returns {BasicEvaluatedExpression | undefined} evaluation result + */ + evaluateExpression(expression) { + try { + const hook = this.hooks.evaluate.get(expression.type); + if (hook !== undefined) { + const result = hook.call(expression); + if (result !== undefined) { + if (result) { + result.setExpression(expression); + } + return result; + } + } + } catch (e) { + console.warn(e); + // ignore error + } + return new BasicEvaluatedExpression() + .setRange(expression.range) + .setExpression(expression); + } + + parseString(expression) { + switch (expression.type) { + case "BinaryExpression": + if (expression.operator === "+") { + return ( + this.parseString(expression.left) + + this.parseString(expression.right) + ); + } + break; + case "Literal": + return expression.value + ""; + } + throw new Error( + expression.type + " is not supported as parameter for require" + ); + } + + parseCalculatedString(expression) { + switch (expression.type) { + case "BinaryExpression": + if (expression.operator === "+") { + const left = this.parseCalculatedString(expression.left); + const right = this.parseCalculatedString(expression.right); + if (left.code) { + return { + range: left.range, + value: left.value, + code: true, + conditional: false + }; + } else if (right.code) { + return { + range: [ + left.range[0], + right.range ? right.range[1] : left.range[1] + ], + value: left.value + right.value, + code: true, + conditional: false + }; + } else { + return { + range: [left.range[0], right.range[1]], + value: left.value + right.value, + code: false, + conditional: false + }; + } + } + break; + case "ConditionalExpression": { + const consequent = this.parseCalculatedString(expression.consequent); + const alternate = this.parseCalculatedString(expression.alternate); + const items = []; + if (consequent.conditional) { + items.push(...consequent.conditional); + } else if (!consequent.code) { + items.push(consequent); + } else { + break; + } + if (alternate.conditional) { + items.push(...alternate.conditional); + } else if (!alternate.code) { + items.push(alternate); + } else { + break; + } + return { + range: undefined, + value: "", + code: true, + conditional: items + }; + } + case "Literal": + return { + range: expression.range, + value: expression.value + "", + code: false, + conditional: false + }; + } + return { + range: undefined, + value: "", + code: true, + conditional: false + }; + } + + /** + * @param {string | Buffer | PreparsedAst} source the source to parse + * @param {ParserState} state the parser state + * @returns {ParserState} the parser state + */ + parse(source, state) { + let ast; + let comments; + const semicolons = new Set(); + if (source === null) { + throw new Error("source must not be null"); + } + if (Buffer.isBuffer(source)) { + source = source.toString("utf-8"); + } + if (typeof source === "object") { + ast = /** @type {ProgramNode} */ (source); + comments = source.comments; + } else { + comments = []; + ast = JavascriptParser._parse(source, { + sourceType: this.sourceType, + onComment: comments, + onInsertedSemicolon: pos => semicolons.add(pos) + }); + } + + const oldScope = this.scope; + const oldState = this.state; + const oldComments = this.comments; + const oldSemicolons = this.semicolons; + const oldStatementPath = this.statementPath; + const oldPrevStatement = this.prevStatement; + this.scope = { + topLevelScope: true, + inTry: false, + inShorthand: false, + isStrict: false, + isAsmJs: false, + definitions: new StackedMap() + }; + /** @type {ParserState} */ + this.state = state; + this.comments = comments; + this.semicolons = semicolons; + this.statementPath = []; + this.prevStatement = undefined; + if (this.hooks.program.call(ast, comments) === undefined) { + this.detectMode(ast.body); + this.preWalkStatements(ast.body); + this.prevStatement = undefined; + this.blockPreWalkStatements(ast.body); + this.prevStatement = undefined; + this.walkStatements(ast.body); + } + this.hooks.finish.call(ast, comments); + this.scope = oldScope; + /** @type {ParserState} */ + this.state = oldState; + this.comments = oldComments; + this.semicolons = oldSemicolons; + this.statementPath = oldStatementPath; + this.prevStatement = oldPrevStatement; + return state; + } + + evaluate(source) { + const ast = JavascriptParser._parse("(" + source + ")", { + sourceType: this.sourceType, + locations: false + }); + if (ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement") { + throw new Error("evaluate: Source is not a expression"); + } + return this.evaluateExpression(ast.body[0].expression); + } + + /** + * @param {ExpressionNode | DeclarationNode | null | undefined} expr an expression + * @param {number} commentsStartPos source position from which annotation comments are checked + * @returns {boolean} true, when the expression is pure + */ + isPure(expr, commentsStartPos) { + if (!expr) return true; + const result = this.hooks.isPure + .for(expr.type) + .call(expr, commentsStartPos); + if (typeof result === "boolean") return result; + switch (expr.type) { + case "ClassDeclaration": + case "ClassExpression": + if (expr.body.type !== "ClassBody") return false; + if (expr.superClass && !this.isPure(expr.superClass, expr.range[0])) { + return false; + } + return expr.body.body.every(item => { + switch (item.type) { + // @ts-expect-error not yet supported by acorn + case "ClassProperty": + // TODO add test case once acorn supports it + // Currently this is not parsable + if (item.static) return this.isPure(item.value, item.range[0]); + break; + } + return true; + }); + + case "FunctionDeclaration": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "Literal": + return true; + + case "VariableDeclaration": + return expr.declarations.every(decl => + this.isPure(decl.init, decl.range[0]) + ); + + case "ConditionalExpression": + return ( + this.isPure(expr.test, commentsStartPos) && + this.isPure(expr.consequent, expr.test.range[1]) && + this.isPure(expr.alternate, expr.consequent.range[1]) + ); + + case "SequenceExpression": + return expr.expressions.every(expr => { + const pureFlag = this.isPure(expr, commentsStartPos); + commentsStartPos = expr.range[1]; + return pureFlag; + }); + + case "CallExpression": { + const pureFlag = + expr.range[0] - commentsStartPos > 12 && + this.getComments([commentsStartPos, expr.range[0]]).some( + comment => + comment.type === "Block" && + /^\s*(#|@)__PURE__\s*$/.test(comment.value) + ); + if (!pureFlag) return false; + commentsStartPos = expr.callee.range[1]; + return expr.arguments.every(arg => { + if (arg.type === "SpreadElement") return false; + const pureFlag = this.isPure(arg, commentsStartPos); + commentsStartPos = arg.range[1]; + return pureFlag; + }); + } + } + const evaluated = this.evaluateExpression(expr); + return !evaluated.couldHaveSideEffects(); + } + + getComments(range) { + return this.comments.filter( + comment => comment.range[0] >= range[0] && comment.range[1] <= range[1] + ); + } + + /** + * @param {number} pos source code position + * @returns {boolean} true when a semicolon has been inserted before this position, false if not + */ + isAsiPosition(pos) { + const currentStatement = this.statementPath[this.statementPath.length - 1]; + if (currentStatement === undefined) throw new Error("Not in statement"); + return ( + // Either asking directly for the end position of the current statement + (currentStatement.range[1] === pos && this.semicolons.has(pos)) || + // Or asking for the start position of the current statement, + // here we have to check multiple things + (currentStatement.range[0] === pos && + // is there a previous statement which might be relevant? + this.prevStatement !== undefined && + // is the end position of the previous statement an ASI position? + this.semicolons.has(this.prevStatement.range[1])) + ); + } + + /** + * @param {number} pos source code position + * @returns {void} + */ + unsetAsiPosition(pos) { + this.semicolons.delete(pos); + } + + isStatementLevelExpression(expr) { + const currentStatement = this.statementPath[this.statementPath.length - 1]; + return ( + expr === currentStatement || + (currentStatement.type === "ExpressionStatement" && + currentStatement.expression === expr) + ); + } + + getTagData(name, tag) { + const info = this.scope.definitions.get(name); + if (info instanceof VariableInfo) { + let tagInfo = info.tagInfo; + while (tagInfo !== undefined) { + if (tagInfo.tag === tag) return tagInfo.data; + tagInfo = tagInfo.next; + } + } + } + + tagVariable(name, tag, data) { + const oldInfo = this.scope.definitions.get(name); + /** @type {VariableInfo} */ + let newInfo; + if (oldInfo === undefined) { + newInfo = new VariableInfo(this.scope, name, { + tag, + data, + next: undefined + }); + } else if (oldInfo instanceof VariableInfo) { + newInfo = new VariableInfo(oldInfo.declaredScope, oldInfo.freeName, { + tag, + data, + next: oldInfo.tagInfo + }); + } else { + newInfo = new VariableInfo(oldInfo, true, { + tag, + data, + next: undefined + }); + } + this.scope.definitions.set(name, newInfo); + } + + defineVariable(name) { + const oldInfo = this.scope.definitions.get(name); + // Don't redefine variable in same scope to keep existing tags + if (oldInfo instanceof VariableInfo && oldInfo.declaredScope === this.scope) + return; + this.scope.definitions.set(name, this.scope); + } + + undefineVariable(name) { + this.scope.definitions.delete(name); + } + + isVariableDefined(name) { + const info = this.scope.definitions.get(name); + if (info === undefined) return false; + if (info instanceof VariableInfo) { + return info.freeName === true; + } + return true; + } + + /** + * @param {string} name variable name + * @returns {ExportedVariableInfo} info for this variable + */ + getVariableInfo(name) { + const value = this.scope.definitions.get(name); + if (value === undefined) { + return name; + } else { + return value; + } + } + + /** + * @param {string} name variable name + * @param {ExportedVariableInfo} variableInfo new info for this variable + * @returns {void} + */ + setVariable(name, variableInfo) { + if (typeof variableInfo === "string") { + if (variableInfo === name) { + this.scope.definitions.delete(name); + } else { + this.scope.definitions.set( + name, + new VariableInfo(this.scope, variableInfo, undefined) + ); + } + } else { + this.scope.definitions.set(name, variableInfo); + } + } + + parseCommentOptions(range) { + const comments = this.getComments(range); + if (comments.length === 0) { + return EMPTY_COMMENT_OPTIONS; + } + let options = {}; + let errors = []; + for (const comment of comments) { + const { value } = comment; + if (value && webpackCommentRegExp.test(value)) { + // try compile only if webpack options comment is present + try { + const val = vm.runInNewContext(`(function(){return {${value}};})()`); + Object.assign(options, val); + } catch (e) { + e.comment = comment; + errors.push(e); + } + } + } + return { options, errors }; + } + + /** + * @param {MemberExpressionNode} expression a member expression + * @returns {{ members: string[], object: ExpressionNode | SuperNode }} member names (reverse order) and remaining object + */ + extractMemberExpressionChain(expression) { + /** @type {AnyNode} */ + let expr = expression; + const members = []; + while (expr.type === "MemberExpression") { + if (expr.computed) { + if (expr.property.type !== "Literal") break; + members.push(`${expr.property.value}`); + } else { + if (expr.property.type !== "Identifier") break; + members.push(expr.property.name); + } + expr = expr.object; + } + return { + members, + object: expr + }; + } + + /** + * @param {string} varName variable name + * @returns {{name: string, info: VariableInfo | string}} name of the free variable and variable info for that + */ + getFreeInfoFromVariable(varName) { + const info = this.getVariableInfo(varName); + let name; + if (info instanceof VariableInfo) { + name = info.freeName; + if (typeof name !== "string") return undefined; + } else if (typeof info !== "string") { + return undefined; + } else { + name = info; + } + return { info, name }; + } + + /** @typedef {{ type: "call", call: CallExpressionNode, calleeName: string, rootInfo: string | VariableInfo, getCalleeMembers: () => string[], name: string, getMembers: () => string[]}} CallExpressionInfo */ + /** @typedef {{ type: "expression", rootInfo: string | VariableInfo, name: string, getMembers: () => string[]}} ExpressionExpressionInfo */ + + /** + * @param {MemberExpressionNode} expression a member expression + * @param {number} allowedTypes which types should be returned, presented in bit mask + * @returns {CallExpressionInfo | ExpressionExpressionInfo | undefined} expression info + */ + getMemberExpressionInfo(expression, allowedTypes) { + const { object, members } = this.extractMemberExpressionChain(expression); + switch (object.type) { + case "CallExpression": { + if ((allowedTypes & ALLOWED_MEMBER_TYPES_CALL_EXPRESSION) === 0) + return undefined; + let callee = object.callee; + let rootMembers = EMPTY_ARRAY; + if (callee.type === "MemberExpression") { + ({ + object: callee, + members: rootMembers + } = this.extractMemberExpressionChain(callee)); + } + const rootName = getRootName(callee); + if (!rootName) return undefined; + const result = this.getFreeInfoFromVariable(rootName); + if (!result) return undefined; + const { info: rootInfo, name: resolvedRoot } = result; + const calleeName = objectAndMembersToName(resolvedRoot, rootMembers); + return { + type: "call", + call: object, + calleeName, + rootInfo, + getCalleeMembers: memoize(() => rootMembers.reverse()), + name: objectAndMembersToName(`${calleeName}()`, members), + getMembers: memoize(() => members.reverse()) + }; + } + case "Identifier": + case "MetaProperty": + case "ThisExpression": { + if ((allowedTypes & ALLOWED_MEMBER_TYPES_EXPRESSION) === 0) + return undefined; + const rootName = getRootName(object); + if (!rootName) return undefined; + + const result = this.getFreeInfoFromVariable(rootName); + if (!result) return undefined; + const { info: rootInfo, name: resolvedRoot } = result; + return { + type: "expression", + name: objectAndMembersToName(resolvedRoot, members), + rootInfo, + getMembers: memoize(() => members.reverse()) + }; + } + } + } + + /** + * @param {MemberExpressionNode} expression an expression + * @returns {{ name: string, rootInfo: ExportedVariableInfo, getMembers: () => string[]}} name info + */ + getNameForExpression(expression) { + return this.getMemberExpressionInfo( + expression, + ALLOWED_MEMBER_TYPES_EXPRESSION + ); + } + + /** + * @param {string} code source code + * @param {ParseOptions} options parsing options + * @returns {ProgramNode} parsed ast + */ + static _parse(code, options) { + const type = options ? options.sourceType : "module"; + /** @type {AcornOptions} */ + const parserOptions = { + ...defaultParserOptions, + allowReturnOutsideFunction: type === "script", + ...options, + sourceType: type === "auto" ? "module" : type + }; + + /** @type {AnyNode} */ + let ast; + let error; + let threw = false; + try { + ast = /** @type {AnyNode} */ (parser.parse(code, parserOptions)); + } catch (e) { + error = e; + threw = true; + } + + if (threw && type === "auto") { + parserOptions.sourceType = "script"; + if (!("allowReturnOutsideFunction" in options)) { + parserOptions.allowReturnOutsideFunction = true; + } + if (Array.isArray(parserOptions.onComment)) { + parserOptions.onComment.length = 0; + } + try { + ast = /** @type {AnyNode} */ (parser.parse(code, parserOptions)); + threw = false; + } catch (e) { + // we use the error from first parse try + // so nothing to do here + } + } + + if (threw) { + throw error; + } + + return /** @type {ProgramNode} */ (ast); + } +} + +module.exports = JavascriptParser; +module.exports.ALLOWED_MEMBER_TYPES_ALL = ALLOWED_MEMBER_TYPES_ALL; +module.exports.ALLOWED_MEMBER_TYPES_EXPRESSION = ALLOWED_MEMBER_TYPES_EXPRESSION; +module.exports.ALLOWED_MEMBER_TYPES_CALL_EXPRESSION = ALLOWED_MEMBER_TYPES_CALL_EXPRESSION; + + +/***/ }), + +/***/ 98550: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const UnsupportedFeatureWarning = __webpack_require__(61809); +const ConstDependency = __webpack_require__(9364); +const BasicEvaluatedExpression = __webpack_require__(98288); + +/** @typedef {import("estree").Expression} ExpressionNode */ +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("./JavascriptParser")} JavascriptParser */ + +/** + * @param {JavascriptParser} parser the parser + * @param {string} value the const value + * @param {string[]=} runtimeRequirements runtime requirements + * @returns {function(ExpressionNode): true} plugin function + */ +exports.toConstantDependency = (parser, value, runtimeRequirements) => { + return function constDependency(expr) { + const dep = new ConstDependency(value, expr.range, runtimeRequirements); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + return true; + }; +}; + +/** + * @param {string} value the string value + * @returns {function(ExpressionNode): BasicEvaluatedExpression} plugin function + */ +exports.evaluateToString = value => { + return function stringExpression(expr) { + return new BasicEvaluatedExpression().setString(value).setRange(expr.range); + }; +}; + +/** + * @param {number} value the number value + * @returns {function(ExpressionNode): BasicEvaluatedExpression} plugin function + */ +exports.evaluateToNumber = value => { + return function stringExpression(expr) { + return new BasicEvaluatedExpression().setNumber(value).setRange(expr.range); + }; +}; + +/** + * @param {boolean} value the boolean value + * @returns {function(ExpressionNode): BasicEvaluatedExpression} plugin function + */ +exports.evaluateToBoolean = value => { + return function booleanExpression(expr) { + return new BasicEvaluatedExpression() + .setBoolean(value) + .setRange(expr.range); + }; +}; + +/** + * @param {string} identifier identifier + * @param {string} rootInfo rootInfo + * @param {function(): string[]} getMembers getMembers + * @param {boolean|null=} truthy is truthy, null if nullish + * @returns {function(ExpressionNode): BasicEvaluatedExpression} callback + */ +exports.evaluateToIdentifier = (identifier, rootInfo, getMembers, truthy) => { + return function identifierExpression(expr) { + let evaluatedExpression = new BasicEvaluatedExpression() + .setIdentifier(identifier, rootInfo, getMembers) + .setSideEffects(false) + .setRange(expr.range); + switch (truthy) { + case true: + evaluatedExpression.setTruthy(); + evaluatedExpression.setNullish(false); + break; + case null: + evaluatedExpression.setFalsy(); + evaluatedExpression.setNullish(true); + break; + case false: + evaluatedExpression.setFalsy(); + break; + } + + return evaluatedExpression; + }; +}; + +exports.expressionIsUnsupported = (parser, message) => { + return function unsupportedExpression(expr) { + const dep = new ConstDependency("(void 0)", expr.range, null); + dep.loc = expr.loc; + parser.state.module.addPresentationalDependency(dep); + if (!parser.state.module) return; + parser.state.module.addWarning( + new UnsupportedFeatureWarning(message, expr.loc) + ); + return true; + }; +}; + +exports.skipTraversal = () => true; + +exports.approve = () => true; + + +/***/ }), + +/***/ 70885: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { RawSource } = __webpack_require__(55600); +const ConcatenationScope = __webpack_require__(21926); +const { UsageState } = __webpack_require__(54227); +const Generator = __webpack_require__(14052); +const RuntimeGlobals = __webpack_require__(48801); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../ExportsInfo")} ExportsInfo */ +/** @typedef {import("../Generator").GenerateContext} GenerateContext */ +/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +const stringifySafe = data => { + const stringified = JSON.stringify(data); + if (!stringified) { + return undefined; // Invalid JSON + } + + return stringified.replace(/\u2028|\u2029/g, str => + str === "\u2029" ? "\\u2029" : "\\u2028" + ); // invalid in JavaScript but valid JSON +}; + +/** + * @param {Object} data data (always an object or array) + * @param {ExportsInfo} exportsInfo exports info + * @param {RuntimeSpec} runtime the runtime + * @returns {Object} reduced data + */ +const createObjectForExportsInfo = (data, exportsInfo, runtime) => { + if (exportsInfo.otherExportsInfo.getUsed(runtime) !== UsageState.Unused) + return data; + const reducedData = Array.isArray(data) ? [] : {}; + for (const exportInfo of exportsInfo.exports) { + if (exportInfo.name in reducedData) return data; + } + for (const key of Object.keys(data)) { + const exportInfo = exportsInfo.getReadOnlyExportInfo(key); + const used = exportInfo.getUsed(runtime); + if (used === UsageState.Unused) continue; + let value; + if (used === UsageState.OnlyPropertiesUsed && exportInfo.exportsInfo) { + value = createObjectForExportsInfo( + data[key], + exportInfo.exportsInfo, + runtime + ); + } else { + value = data[key]; + } + const name = exportInfo.getUsedName(key, runtime); + reducedData[name] = value; + } + if (Array.isArray(reducedData)) { + let sizeObjectMinusArray = 0; + for (let i = 0; i < reducedData.length; i++) { + if (reducedData[i] === undefined) { + sizeObjectMinusArray -= 2; + } else { + sizeObjectMinusArray += `${i}`.length + 3; + } + } + if (sizeObjectMinusArray < 0) return Object.assign({}, reducedData); + for (let i = 0; i < reducedData.length; i++) { + if (reducedData[i] === undefined) { + reducedData[i] = 0; + } + } + } + return reducedData; +}; + +const TYPES = new Set(["javascript"]); + +class JsonGenerator extends Generator { + /** + * @param {NormalModule} module fresh module + * @returns {Set} available types (do not mutate) + */ + getTypes(module) { + return TYPES; + } + + /** + * @param {NormalModule} module the module + * @param {string=} type source type + * @returns {number} estimate size of the module + */ + getSize(module, type) { + let data = module.buildInfo.jsonData; + if (!data) return 0; + return stringifySafe(data).length + 10; + } + + /** + * @param {NormalModule} module module for which the bailout reason should be determined + * @param {ConcatenationBailoutReasonContext} context context + * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated + */ + getConcatenationBailoutReason(module, context) { + return undefined; + } + + /** + * @param {NormalModule} module module for which the code should be generated + * @param {GenerateContext} generateContext context for generate + * @returns {Source} generated code + */ + generate( + module, + { + moduleGraph, + runtimeTemplate, + runtimeRequirements, + runtime, + concatenationScope + } + ) { + const data = module.buildInfo.jsonData; + if (data === undefined) { + return new RawSource( + runtimeTemplate.missingModuleStatement({ + request: module.rawRequest + }) + ); + } + const exportsInfo = moduleGraph.getExportsInfo(module); + let finalJson = + typeof data === "object" && + data && + exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused + ? createObjectForExportsInfo(data, exportsInfo, runtime) + : data; + // Use JSON because JSON.parse() is much faster than JavaScript evaluation + const jsonStr = stringifySafe(finalJson); + const jsonExpr = + jsonStr.length > 20 && typeof finalJson === "object" + ? `JSON.parse(${JSON.stringify(jsonStr)})` + : jsonStr; + let content; + if (concatenationScope) { + content = `${runtimeTemplate.supportsConst() ? "const" : "var"} ${ + ConcatenationScope.NAMESPACE_OBJECT_EXPORT + } = ${jsonExpr};`; + concatenationScope.registerNamespaceExport( + ConcatenationScope.NAMESPACE_OBJECT_EXPORT + ); + } else { + runtimeRequirements.add(RuntimeGlobals.module); + content = `${module.moduleArgument}.exports = ${jsonExpr};`; + } + return new RawSource(content); + } +} + +module.exports = JsonGenerator; + + +/***/ }), + +/***/ 90578: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const memoize = __webpack_require__(18003); +const JsonGenerator = __webpack_require__(70885); +const JsonParser = __webpack_require__(62580); + +/** @typedef {import("../Compiler")} Compiler */ + +const getParserSchema = memoize(() => + __webpack_require__(94643) +); + +class JsonModulesPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "JsonModulesPlugin", + (compilation, { normalModuleFactory }) => { + normalModuleFactory.hooks.createParser + .for("json") + .tap("JsonModulesPlugin", parserOptions => { + validate(getParserSchema(), parserOptions, { + name: "Json Modules Plugin", + baseDataPath: "parser" + }); + + return new JsonParser(parserOptions); + }); + normalModuleFactory.hooks.createGenerator + .for("json") + .tap("JsonModulesPlugin", () => { + return new JsonGenerator(); + }); + } + ); + } +} + +module.exports = JsonModulesPlugin; + + +/***/ }), + +/***/ 62580: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const parseJson = __webpack_require__(34270); +const Parser = __webpack_require__(85569); +const JsonExportsDependency = __webpack_require__(33151); + +/** @typedef {import("../../declarations/plugins/JsonModulesPluginParser").JsonModulesPluginParserOptions} JsonModulesPluginParserOptions */ +/** @typedef {import("../Parser").ParserState} ParserState */ +/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ + +class JsonParser extends Parser { + /** + * @param {JsonModulesPluginParserOptions} options parser options + */ + constructor(options) { + super(); + this.options = options || {}; + } + + /** + * @param {string | Buffer | PreparsedAst} source the source to parse + * @param {ParserState} state the parser state + * @returns {ParserState} the parser state + */ + parse(source, state) { + if (Buffer.isBuffer(source)) { + source = source.toString("utf-8"); + } + + /** @type {JsonModulesPluginParserOptions["parse"]} */ + const parseFn = + typeof this.options.parse === "function" ? this.options.parse : parseJson; + + const data = + typeof source === "object" + ? source + : parseFn(source[0] === "\ufeff" ? source.slice(1) : source); + + state.module.buildInfo.jsonData = data; + state.module.buildInfo.strict = true; + state.module.buildMeta.exportsType = "default"; + state.module.buildMeta.defaultObject = + typeof data === "object" ? "redirect-warn" : false; + state.module.addDependency( + new JsonExportsDependency(JsonExportsDependency.getExportsFromData(data)) + ); + return state; + } +} + +module.exports = JsonParser; + + +/***/ }), + +/***/ 66269: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const JavascriptModulesPlugin = __webpack_require__(80867); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ +/** @typedef {import("../util/Hash")} Hash */ + +/** + * @template T + * @typedef {Object} LibraryContext + * @property {Compilation} compilation + * @property {T} options + */ + +/** + * @template T + */ +class AbstractLibraryPlugin { + /** + * @param {Object} options options + * @param {string} options.pluginName name of the plugin + * @param {LibraryType} options.type used library type + */ + constructor({ pluginName, type }) { + this._pluginName = pluginName; + this._type = type; + this._parseCache = new WeakMap(); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { _pluginName } = this; + compiler.hooks.thisCompilation.tap(_pluginName, compilation => { + compilation.hooks.finishModules.tap(_pluginName, () => { + for (const [ + name, + { + dependencies: deps, + options: { library } + } + ] of compilation.entries) { + const options = this._parseOptionsCached( + library !== undefined ? library : compilation.outputOptions.library + ); + if (options !== false) { + const dep = deps[deps.length - 1]; + if (dep) { + const module = compilation.moduleGraph.getModule(dep); + if (module) { + this.finishEntryModule(module, name, { options, compilation }); + } + } + } + } + }); + + const getOptionsForChunk = chunk => { + if (compilation.chunkGraph.getNumberOfEntryModules(chunk) === 0) + return false; + const options = chunk.getEntryOptions(); + const library = options && options.library; + return this._parseOptionsCached( + library !== undefined ? library : compilation.outputOptions.library + ); + }; + + compilation.hooks.additionalChunkRuntimeRequirements.tap( + _pluginName, + (chunk, set) => { + const options = getOptionsForChunk(chunk); + if (options !== false) { + this.runtimeRequirements(chunk, set, { options, compilation }); + } + } + ); + + const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation); + + hooks.render.tap(_pluginName, (source, renderContext) => { + const options = getOptionsForChunk(renderContext.chunk); + if (options === false) return source; + return this.render(source, renderContext, { options, compilation }); + }); + + hooks.chunkHash.tap(_pluginName, (chunk, hash, context) => { + const options = getOptionsForChunk(chunk); + if (options === false) return; + this.chunkHash(chunk, hash, context, { options, compilation }); + }); + }); + } + + /** + * @param {LibraryOptions=} library normalized library option + * @returns {T | false} preprocess as needed by overriding + */ + _parseOptionsCached(library) { + if (!library) return false; + if (library.type !== this._type) return false; + const cacheEntry = this._parseCache.get(library); + if (cacheEntry !== undefined) return cacheEntry; + const result = this.parseOptions(library); + this._parseCache.set(library, result); + return result; + } + + /* istanbul ignore next */ + /** + * @abstract + * @param {LibraryOptions} library normalized library option + * @returns {T | false} preprocess as needed by overriding + */ + parseOptions(library) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /** + * @param {Module} module the exporting entry module + * @param {string} entryName the name of the entrypoint + * @param {LibraryContext} libraryContext context + * @returns {void} + */ + finishEntryModule(module, entryName, libraryContext) {} + + /** + * @param {Chunk} chunk the chunk + * @param {Set} set runtime requirements + * @param {LibraryContext} libraryContext context + * @returns {void} + */ + runtimeRequirements(chunk, set, libraryContext) { + set.add(RuntimeGlobals.returnExportsFromRuntime); + } + + /** + * @param {Source} source source + * @param {RenderContext} renderContext render context + * @param {LibraryContext} libraryContext context + * @returns {Source} source with library export + */ + render(source, renderContext, libraryContext) { + return source; + } + + /** + * @param {Chunk} chunk the chunk + * @param {Hash} hash hash + * @param {ChunkHashContext} chunkHashContext chunk hash context + * @param {LibraryContext} libraryContext context + * @returns {void} + */ + chunkHash(chunk, hash, chunkHashContext, libraryContext) { + const options = this._parseOptionsCached( + libraryContext.compilation.outputOptions.library + ); + hash.update(this._pluginName); + hash.update(JSON.stringify(options)); + } +} + +module.exports = AbstractLibraryPlugin; + + +/***/ }), + +/***/ 92627: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource } = __webpack_require__(55600); +const ExternalModule = __webpack_require__(24334); +const Template = __webpack_require__(90751); +const AbstractLibraryPlugin = __webpack_require__(66269); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ +/** @typedef {import("../util/Hash")} Hash */ +/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ + +/** + * @typedef {Object} AmdLibraryPluginOptions + * @property {LibraryType} type + * @property {boolean=} requireAsWrapper + */ + +/** + * @typedef {Object} AmdLibraryPluginParsed + * @property {string} name + */ + +/** + * @typedef {AmdLibraryPluginParsed} T + * @extends {AbstractLibraryPlugin} + */ +class AmdLibraryPlugin extends AbstractLibraryPlugin { + /** + * @param {AmdLibraryPluginOptions} options the plugin options + */ + constructor(options) { + super({ + pluginName: "AmdLibraryPlugin", + type: options.type + }); + this.requireAsWrapper = options.requireAsWrapper; + } + + /** + * @param {LibraryOptions} library normalized library option + * @returns {T | false} preprocess as needed by overriding + */ + parseOptions(library) { + const { name } = library; + if (this.requireAsWrapper) { + if (name) { + throw new Error("AMD library name must be unset"); + } + } else { + if (name && typeof name !== "string") { + throw new Error("AMD library name must be a simple string or unset"); + } + } + return { + name: /** @type {string=} */ (name) + }; + } + + /** + * @param {Source} source source + * @param {RenderContext} renderContext render context + * @param {LibraryContext} libraryContext context + * @returns {Source} source with library export + */ + render( + source, + { chunkGraph, chunk, runtimeTemplate }, + { options, compilation } + ) { + const modern = runtimeTemplate.supportsArrowFunction(); + const modules = chunkGraph + .getChunkModules(chunk) + .filter(m => m instanceof ExternalModule); + const externals = /** @type {ExternalModule[]} */ (modules); + const externalsDepsArray = JSON.stringify( + externals.map(m => + typeof m.request === "object" && !Array.isArray(m.request) + ? m.request.amd + : m.request + ) + ); + const externalsArguments = externals + .map( + m => + `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier( + `${chunkGraph.getModuleId(m)}` + )}__` + ) + .join(", "); + + const fnStart = modern + ? `(${externalsArguments}) => ` + : `function(${externalsArguments}) { return `; + const fnEnd = modern ? "" : "}"; + + if (this.requireAsWrapper) { + return new ConcatSource( + `require(${externalsDepsArray}, ${fnStart}`, + source, + `${fnEnd});` + ); + } else if (options.name) { + const name = compilation.getPath(options.name, { + chunk + }); + + return new ConcatSource( + `define(${JSON.stringify(name)}, ${externalsDepsArray}, ${fnStart}`, + source, + `${fnEnd});` + ); + } else if (externalsArguments) { + return new ConcatSource( + `define(${externalsDepsArray}, ${fnStart}`, + source, + `${fnEnd});` + ); + } else { + return new ConcatSource(`define(${fnStart}`, source, `${fnEnd});`); + } + } + + /** + * @param {Chunk} chunk the chunk + * @param {Hash} hash hash + * @param {ChunkHashContext} chunkHashContext chunk hash context + * @param {LibraryContext} libraryContext context + * @returns {void} + */ + chunkHash(chunk, hash, chunkHashContext, { options, compilation }) { + hash.update("AmdLibraryPlugin"); + if (this.requireAsWrapper) { + hash.update("requireAsWrapper"); + } else if (options.name) { + hash.update("named"); + const name = compilation.getPath(options.name, { + chunk + }); + hash.update(name); + } + } +} + +module.exports = AmdLibraryPlugin; + + +/***/ }), + +/***/ 99768: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource } = __webpack_require__(55600); +const Template = __webpack_require__(90751); +const propertyAccess = __webpack_require__(44682); +const AbstractLibraryPlugin = __webpack_require__(66269); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ +/** @typedef {import("../util/Hash")} Hash */ +/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ + +const KEYWORD_REGEX = /^(await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|super|switch|static|this|throw|try|true|typeof|var|void|while|with|yield)$/; +const IDENTIFIER_REGEX = /^[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]*$/iu; + +/** + * Validates the library name by checking for keywords and valid characters + * @param {string} name name to be validated + * @returns {boolean} true, when valid + */ +const isNameValid = name => { + return !KEYWORD_REGEX.test(name) && IDENTIFIER_REGEX.test(name); +}; + +/** + * @param {string[]} accessor variable plus properties + * @param {number} existingLength items of accessor that are existing already + * @param {boolean=} initLast if the last property should also be initialized to an object + * @returns {string} code to access the accessor while initializing + */ +const accessWithInit = (accessor, existingLength, initLast = false) => { + // This generates for [a, b, c, d]: + // (((a = typeof a === "undefined" ? {} : a).b = a.b || {}).c = a.b.c || {}).d + const base = accessor[0]; + if (accessor.length === 1 && !initLast) return base; + let current = + existingLength > 0 + ? base + : `(${base} = typeof ${base} === "undefined" ? {} : ${base})`; + + // i is the current position in accessor that has been printed + let i = 1; + + // all properties printed so far (excluding base) + let propsSoFar; + + // if there is existingLength, print all properties until this position as property access + if (existingLength > i) { + propsSoFar = accessor.slice(1, existingLength); + i = existingLength; + current += propertyAccess(propsSoFar); + } else { + propsSoFar = []; + } + + // all remaining properties (except the last one when initLast is not set) + // should be printed as initializer + const initUntil = initLast ? accessor.length : accessor.length - 1; + for (; i < initUntil; i++) { + const prop = accessor[i]; + propsSoFar.push(prop); + current = `(${current}${propertyAccess([prop])} = ${base}${propertyAccess( + propsSoFar + )} || {})`; + } + + // print the last property as property access if not yet printed + if (i < accessor.length) + current = `${current}${propertyAccess([accessor[accessor.length - 1]])}`; + + return current; +}; + +/** + * @typedef {Object} AssignLibraryPluginOptions + * @property {LibraryType} type + * @property {string[] | "global"} prefix name prefix + * @property {string | false} declare declare name as variable + * @property {"error"|"copy"|"assign"} unnamed behavior for unnamed library name + */ + +/** + * @typedef {Object} AssignLibraryPluginParsed + * @property {string | string[]} name + */ + +/** + * @typedef {AssignLibraryPluginParsed} T + * @extends {AbstractLibraryPlugin} + */ +class AssignLibraryPlugin extends AbstractLibraryPlugin { + /** + * @param {AssignLibraryPluginOptions} options the plugin options + */ + constructor(options) { + super({ + pluginName: "AssignLibraryPlugin", + type: options.type + }); + this.prefix = options.prefix; + this.declare = options.declare; + this.unnamed = options.unnamed; + } + + /** + * @param {LibraryOptions} library normalized library option + * @returns {T | false} preprocess as needed by overriding + */ + parseOptions(library) { + const { name } = library; + if (this.unnamed === "error") { + if (typeof name !== "string" && !Array.isArray(name)) { + throw new Error("Library name must be a string or string array"); + } + } else { + if (name && typeof name !== "string" && !Array.isArray(name)) { + throw new Error("Library name must be a string, string array or unset"); + } + } + return { + name: /** @type {string|string[]=} */ (name) + }; + } + + /** + * @param {Source} source source + * @param {RenderContext} renderContext render context + * @param {LibraryContext} libraryContext context + * @returns {Source} source with library export + */ + render(source, { chunkGraph, moduleGraph, chunk }, { options, compilation }) { + const prefix = + this.prefix === "global" + ? [compilation.outputOptions.globalObject] + : this.prefix; + const fullName = options.name ? prefix.concat(options.name) : prefix; + const fullNameResolved = fullName.map(n => + compilation.getPath(n, { + chunk + }) + ); + const result = new ConcatSource(); + if (this.declare) { + const base = fullNameResolved[0]; + if (!isNameValid(base)) { + throw new Error( + `Library name base (${base}) must be a valid identifier when using a var declaring library type. Either use a valid identifier (e. g. ${Template.toIdentifier( + base + )}) or use a different library type (e. g. 'type: "global"', which assign a property on the global scope instead of declaring a variable). Common configuration options that specific library names are 'output.library[.name]', 'entry.xyz.library[.name]', 'ModuleFederationPlugin.name' and 'ModuleFederationPlugin.library[.name]'.` + ); + } + result.add(`${this.declare} ${base};`); + } + if (!options.name && this.unnamed === "copy") { + result.add( + `(function(e, a) { for(var i in a) e[i] = a[i]; if(a.__esModule) Object.defineProperty(e, "__esModule", { value: true }); }(${accessWithInit( + fullNameResolved, + prefix.length, + true + )},\n` + ); + result.add(source); + result.add("\n))"); + } else { + result.add( + `${accessWithInit(fullNameResolved, prefix.length, false)} =\n` + ); + result.add(source); + } + return result; + } + + /** + * @param {Chunk} chunk the chunk + * @param {Hash} hash hash + * @param {ChunkHashContext} chunkHashContext chunk hash context + * @param {LibraryContext} libraryContext context + * @returns {void} + */ + chunkHash(chunk, hash, chunkHashContext, { options, compilation }) { + hash.update("AssignLibraryPlugin"); + const prefix = + this.prefix === "global" + ? [compilation.outputOptions.globalObject] + : this.prefix; + const fullName = options.name ? prefix.concat(options.name) : prefix; + const fullNameResolved = fullName.map(n => + compilation.getPath(n, { + chunk + }) + ); + if (!options.name && this.unnamed === "copy") { + hash.update("copy"); + } + if (this.declare) { + hash.update(this.declare); + } + hash.update(fullNameResolved.join(".")); + } +} + +module.exports = AssignLibraryPlugin; + + +/***/ }), + +/***/ 60405: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ +/** @typedef {import("../Compiler")} Compiler */ + +/** @type {WeakMap>} */ +const enabledTypes = new WeakMap(); + +const getEnabledTypes = compiler => { + let set = enabledTypes.get(compiler); + if (set === undefined) { + set = new Set(); + enabledTypes.set(compiler, set); + } + return set; +}; + +class EnableLibraryPlugin { + /** + * @param {LibraryType} type library type that should be available + */ + constructor(type) { + this.type = type; + } + + /** + * @param {Compiler} compiler the compiler instance + * @param {LibraryType} type type of library + * @returns {void} + */ + static setEnabled(compiler, type) { + getEnabledTypes(compiler).add(type); + } + + /** + * @param {Compiler} compiler the compiler instance + * @param {LibraryType} type type of library + * @returns {void} + */ + static checkEnabled(compiler, type) { + if (!getEnabledTypes(compiler).has(type)) { + throw new Error( + `Library type "${type}" is not enabled. ` + + "EnableLibraryPlugin need to be used to enable this type of library. " + + 'This usually happens through the "output.enabledLibraryTypes" option. ' + + 'If you are using a function as entry which sets "library", you need to add all potential library types to "output.enabledLibraryTypes". ' + + "These types are enabled: " + + Array.from(getEnabledTypes(compiler)).join(", ") + ); + } + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { type } = this; + + // Only enable once + const enabled = getEnabledTypes(compiler); + if (enabled.has(type)) return; + enabled.add(type); + + if (typeof type === "string") { + const ExportPropertyTemplatePlugin = __webpack_require__(33556); + new ExportPropertyTemplatePlugin({ + type, + nsObjectUsed: type !== "module" + }).apply(compiler); + switch (type) { + case "var": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const AssignLibraryPlugin = __webpack_require__(99768); + new AssignLibraryPlugin({ + type, + prefix: [], + declare: "var", + unnamed: "error" + }).apply(compiler); + break; + } + case "assign": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const AssignLibraryPlugin = __webpack_require__(99768); + new AssignLibraryPlugin({ + type, + prefix: [], + declare: false, + unnamed: "error" + }).apply(compiler); + break; + } + case "this": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const AssignLibraryPlugin = __webpack_require__(99768); + new AssignLibraryPlugin({ + type, + prefix: ["this"], + declare: false, + unnamed: "copy" + }).apply(compiler); + break; + } + case "window": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const AssignLibraryPlugin = __webpack_require__(99768); + new AssignLibraryPlugin({ + type, + prefix: ["window"], + declare: false, + unnamed: "copy" + }).apply(compiler); + break; + } + case "self": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const AssignLibraryPlugin = __webpack_require__(99768); + new AssignLibraryPlugin({ + type, + prefix: ["self"], + declare: false, + unnamed: "copy" + }).apply(compiler); + break; + } + case "global": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const AssignLibraryPlugin = __webpack_require__(99768); + new AssignLibraryPlugin({ + type, + prefix: "global", + declare: false, + unnamed: "copy" + }).apply(compiler); + break; + } + case "commonjs": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const AssignLibraryPlugin = __webpack_require__(99768); + new AssignLibraryPlugin({ + type, + prefix: ["exports"], + declare: false, + unnamed: "copy" + }).apply(compiler); + break; + } + case "commonjs2": + case "commonjs-module": { + //@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697 + const AssignLibraryPlugin = __webpack_require__(99768); + new AssignLibraryPlugin({ + type, + prefix: ["module", "exports"], + declare: false, + unnamed: "assign" + }).apply(compiler); + break; + } + case "amd": + case "amd-require": { + const AmdLibraryPlugin = __webpack_require__(92627); + new AmdLibraryPlugin({ + type, + requireAsWrapper: type === "amd-require" + }).apply(compiler); + break; + } + case "umd": + case "umd2": { + const UmdLibraryPlugin = __webpack_require__(60919); + new UmdLibraryPlugin({ + type, + optionalAmdExternalAsGlobal: type === "umd2" + }).apply(compiler); + break; + } + case "system": { + const SystemLibraryPlugin = __webpack_require__(20193); + new SystemLibraryPlugin({ + type + }).apply(compiler); + break; + } + case "jsonp": { + const JsonpLibraryPlugin = __webpack_require__(38706); + new JsonpLibraryPlugin({ + type + }).apply(compiler); + break; + } + case "module": + // TODO implement module library + break; + default: + throw new Error(`Unsupported library type ${type}. +Plugins which provide custom library types must call EnableLibraryPlugin.setEnabled(compiler, type) to disable this error.`); + } + } else { + // TODO support plugin instances here + // apply them to the compiler + } + } +} + +module.exports = EnableLibraryPlugin; + + +/***/ }), + +/***/ 33556: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource } = __webpack_require__(55600); +const { UsageState } = __webpack_require__(54227); +const propertyAccess = __webpack_require__(44682); +const { getEntryRuntime } = __webpack_require__(43478); +const AbstractLibraryPlugin = __webpack_require__(66269); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ +/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ + +/** + * @typedef {Object} ExportPropertyLibraryPluginParsed + * @property {string | string[]} export + */ + +/** + * @typedef {Object} ExportPropertyLibraryPluginOptions + * @property {LibraryType} type + * @property {boolean} nsObjectUsed the namespace object is used + */ +/** + * @typedef {ExportPropertyLibraryPluginParsed} T + * @extends {AbstractLibraryPlugin} + */ +class ExportPropertyLibraryPlugin extends AbstractLibraryPlugin { + /** + * @param {ExportPropertyLibraryPluginOptions} options options + */ + constructor({ type, nsObjectUsed }) { + super({ + pluginName: "ExportPropertyLibraryPlugin", + type + }); + this.nsObjectUsed = nsObjectUsed; + } + + /** + * @param {LibraryOptions} library normalized library option + * @returns {T | false} preprocess as needed by overriding + */ + parseOptions(library) { + return { + export: library.export + }; + } + + /** + * @param {Module} module the exporting entry module + * @param {string} entryName the name of the entrypoint + * @param {LibraryContext} libraryContext context + * @returns {void} + */ + finishEntryModule( + module, + entryName, + { options, compilation, compilation: { moduleGraph } } + ) { + const runtime = getEntryRuntime(compilation, entryName); + if (options.export) { + const exportsInfo = moduleGraph.getExportInfo( + module, + Array.isArray(options.export) ? options.export[0] : options.export + ); + exportsInfo.setUsed(UsageState.Used, runtime); + exportsInfo.canMangleUse = false; + } else { + const exportsInfo = moduleGraph.getExportsInfo(module); + if (this.nsObjectUsed) { + exportsInfo.setUsedInUnknownWay(runtime); + } else { + exportsInfo.setAllKnownExportsUsed(runtime); + } + } + moduleGraph.addExtraReason(module, "used as library export"); + } + /** + * @param {Source} source source + * @param {RenderContext} renderContext render context + * @param {LibraryContext} libraryContext context + * @returns {Source} source with library export + */ + render(source, renderContext, { options }) { + if (!options.export) return source; + const postfix = propertyAccess( + Array.isArray(options.export) ? options.export : [options.export] + ); + return new ConcatSource(source, postfix); + } +} + +module.exports = ExportPropertyLibraryPlugin; + + +/***/ }), + +/***/ 38706: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource } = __webpack_require__(55600); +const AbstractLibraryPlugin = __webpack_require__(66269); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ +/** @typedef {import("../util/Hash")} Hash */ +/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ + +/** + * @typedef {Object} JsonpLibraryPluginOptions + * @property {LibraryType} type + */ + +/** + * @typedef {Object} JsonpLibraryPluginParsed + * @property {string} name + */ + +/** + * @typedef {JsonpLibraryPluginParsed} T + * @extends {AbstractLibraryPlugin} + */ +class JsonpLibraryPlugin extends AbstractLibraryPlugin { + /** + * @param {JsonpLibraryPluginOptions} options the plugin options + */ + constructor(options) { + super({ + pluginName: "JsonpLibraryPlugin", + type: options.type + }); + } + + /** + * @param {LibraryOptions} library normalized library option + * @returns {T | false} preprocess as needed by overriding + */ + parseOptions(library) { + const { name } = library; + if (typeof name !== "string") { + throw new Error("Jsonp library name must be a simple string"); + } + return { + name: /** @type {string} */ (name) + }; + } + + /** + * @param {Source} source source + * @param {RenderContext} renderContext render context + * @param {LibraryContext} libraryContext context + * @returns {Source} source with library export + */ + render(source, { chunk }, { options, compilation }) { + const name = compilation.getPath(options.name, { + chunk + }); + return new ConcatSource(`${name}(`, source, ")"); + } + + /** + * @param {Chunk} chunk the chunk + * @param {Hash} hash hash + * @param {ChunkHashContext} chunkHashContext chunk hash context + * @param {LibraryContext} libraryContext context + * @returns {void} + */ + chunkHash(chunk, hash, chunkHashContext, { options, compilation }) { + hash.update("JsonpLibraryPlugin"); + hash.update(compilation.getPath(options.name, { chunk })); + } +} + +module.exports = JsonpLibraryPlugin; + + +/***/ }), + +/***/ 20193: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Joel Denning @joeldenning +*/ + + + +const { ConcatSource } = __webpack_require__(55600); +const { UsageState } = __webpack_require__(54227); +const ExternalModule = __webpack_require__(24334); +const Template = __webpack_require__(90751); +const propertyAccess = __webpack_require__(44682); +const AbstractLibraryPlugin = __webpack_require__(66269); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compilation").ChunkHashContext} ChunkHashContext */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ +/** @typedef {import("../util/Hash")} Hash */ +/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ + +/** + * @typedef {Object} SystemLibraryPluginOptions + * @property {LibraryType} type + */ + +/** + * @typedef {Object} SystemLibraryPluginParsed + * @property {string} name + */ + +/** + * @typedef {SystemLibraryPluginParsed} T + * @extends {AbstractLibraryPlugin} + */ +class SystemLibraryPlugin extends AbstractLibraryPlugin { + /** + * @param {SystemLibraryPluginOptions} options the plugin options + */ + constructor(options) { + super({ + pluginName: "SystemLibraryPlugin", + type: options.type + }); + } + + /** + * @param {LibraryOptions} library normalized library option + * @returns {T | false} preprocess as needed by overriding + */ + parseOptions(library) { + const { name } = library; + if (name && typeof name !== "string") { + throw new Error( + "System.js library name must be a simple string or unset" + ); + } + return { + name: /** @type {string=} */ (name) + }; + } + + /** + * @param {Source} source source + * @param {RenderContext} renderContext render context + * @param {LibraryContext} libraryContext context + * @returns {Source} source with library export + */ + render(source, { chunkGraph, moduleGraph, chunk }, { options, compilation }) { + const modules = chunkGraph + .getChunkModules(chunk) + .filter(m => m instanceof ExternalModule); + const externals = /** @type {ExternalModule[]} */ (modules); + + // The name this bundle should be registered as with System + const name = options.name + ? `${JSON.stringify(compilation.getPath(options.name, { chunk }))}, ` + : ""; + + // The array of dependencies that are external to webpack and will be provided by System + const systemDependencies = JSON.stringify( + externals.map(m => + typeof m.request === "object" && !Array.isArray(m.request) + ? m.request.amd + : m.request + ) + ); + + // The name of the variable provided by System for exporting + const dynamicExport = "__WEBPACK_DYNAMIC_EXPORT__"; + + // An array of the internal variable names for the webpack externals + const externalWebpackNames = externals.map( + m => + `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier( + `${chunkGraph.getModuleId(m)}` + )}__` + ); + + // Declaring variables for the internal variable names for the webpack externals + const externalVarDeclarations = externalWebpackNames + .map(name => `var ${name} = {};`) + .join("\n"); + + // Define __esModule flag on all internal variables and helpers + const externalVarInitialization = []; + + // The system.register format requires an array of setter functions for externals. + const setters = + externalWebpackNames.length === 0 + ? "" + : Template.asString([ + "setters: [", + Template.indent( + externals + .map((module, i) => { + const external = externalWebpackNames[i]; + const exportsInfo = moduleGraph.getExportsInfo(module); + const otherUnused = + exportsInfo.otherExportsInfo.getUsed(chunk.runtime) === + UsageState.Unused; + const instructions = []; + const handledNames = []; + for (const exportInfo of exportsInfo.orderedExports) { + const used = exportInfo.getUsedName( + undefined, + chunk.runtime + ); + if (used) { + if (otherUnused || used !== exportInfo.name) { + instructions.push( + `${external}${propertyAccess([ + used + ])} = module${propertyAccess([exportInfo.name])};` + ); + handledNames.push(exportInfo.name); + } + } else { + handledNames.push(exportInfo.name); + } + } + if (!otherUnused) { + if ( + !Array.isArray(module.request) || + module.request.length === 1 + ) { + externalVarInitialization.push( + `Object.defineProperty(${external}, "__esModule", { value: true });` + ); + } + if (handledNames.length > 0) { + const name = `${external}handledNames`; + externalVarInitialization.push( + `var ${name} = ${JSON.stringify(handledNames)};` + ); + instructions.push( + Template.asString([ + "Object.keys(module).forEach(function(key) {", + Template.indent([ + `if(${name}.indexOf(key) >= 0)`, + Template.indent(`${external}[key] = module[key];`) + ]), + "});" + ]) + ); + } else { + instructions.push( + Template.asString([ + "Object.keys(module).forEach(function(key) {", + Template.indent([`${external}[key] = module[key];`]), + "});" + ]) + ); + } + } + if (instructions.length === 0) return "function() {}"; + return Template.asString([ + "function(module) {", + Template.indent(instructions), + "}" + ]); + }) + .join(",\n") + ), + "]," + ]); + + return new ConcatSource( + Template.asString([ + `System.register(${name}${systemDependencies}, function(${dynamicExport}, __system_context__) {`, + Template.indent([ + externalVarDeclarations, + Template.asString(externalVarInitialization), + "return {", + Template.indent([ + setters, + "execute: function() {", + Template.indent(`${dynamicExport}(`) + ]) + ]), + "" + ]), + source, + Template.asString([ + "", + Template.indent([ + Template.indent([Template.indent([");"]), "}"]), + "};" + ]), + "})" + ]) + ); + } + + /** + * @param {Chunk} chunk the chunk + * @param {Hash} hash hash + * @param {ChunkHashContext} chunkHashContext chunk hash context + * @param {LibraryContext} libraryContext context + * @returns {void} + */ + chunkHash(chunk, hash, chunkHashContext, { options, compilation }) { + hash.update("SystemLibraryPlugin"); + if (options.name) { + hash.update(compilation.getPath(options.name, { chunk })); + } + } +} + +module.exports = SystemLibraryPlugin; + + +/***/ }), + +/***/ 60919: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { ConcatSource, OriginalSource } = __webpack_require__(55600); +const ExternalModule = __webpack_require__(24334); +const Template = __webpack_require__(90751); +const AbstractLibraryPlugin = __webpack_require__(66269); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryCustomUmdCommentObject} LibraryCustomUmdCommentObject */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryCustomUmdObject} LibraryCustomUmdObject */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryName} LibraryName */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */ +/** @typedef {import("../util/Hash")} Hash */ +/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ + +/** + * @param {string[]} accessor the accessor to convert to path + * @returns {string} the path + */ +const accessorToObjectAccess = accessor => { + return accessor.map(a => `[${JSON.stringify(a)}]`).join(""); +}; + +/** + * @param {string|undefined} base the path prefix + * @param {string|string[]} accessor the accessor + * @param {string=} joinWith the element separator + * @returns {string} the path + */ +const accessorAccess = (base, accessor, joinWith = ", ") => { + const accessors = Array.isArray(accessor) ? accessor : [accessor]; + return accessors + .map((_, idx) => { + const a = base + ? base + accessorToObjectAccess(accessors.slice(0, idx + 1)) + : accessors[0] + accessorToObjectAccess(accessors.slice(1, idx + 1)); + if (idx === accessors.length - 1) return a; + if (idx === 0 && base === undefined) + return `${a} = typeof ${a} === "object" ? ${a} : {}`; + return `${a} = ${a} || {}`; + }) + .join(joinWith); +}; + +/** @typedef {string | string[] | LibraryCustomUmdObject} UmdLibraryPluginName */ + +/** + * @typedef {Object} UmdLibraryPluginOptions + * @property {LibraryType} type + * @property {boolean=} optionalAmdExternalAsGlobal + */ + +/** + * @typedef {Object} UmdLibraryPluginParsed + * @property {string | string[]} name + * @property {LibraryCustomUmdObject} names + * @property {string | LibraryCustomUmdCommentObject} auxiliaryComment + * @property {boolean} namedDefine + */ + +/** + * @typedef {UmdLibraryPluginParsed} T + * @extends {AbstractLibraryPlugin} + */ +class UmdLibraryPlugin extends AbstractLibraryPlugin { + /** + * @param {UmdLibraryPluginOptions} options the plugin option + */ + constructor(options) { + super({ + pluginName: "UmdLibraryPlugin", + type: options.type + }); + + this.optionalAmdExternalAsGlobal = options.optionalAmdExternalAsGlobal; + } + + /** + * @param {LibraryOptions} library normalized library option + * @returns {T | false} preprocess as needed by overriding + */ + parseOptions(library) { + /** @type {LibraryName} */ + let name; + /** @type {LibraryCustomUmdObject} */ + let names; + if (typeof library.name === "object" && !Array.isArray(library.name)) { + name = library.name.root || library.name.amd || library.name.commonjs; + names = library.name; + } else { + name = library.name; + const singleName = Array.isArray(name) ? name[0] : name; + names = { + commonjs: singleName, + root: library.name, + amd: singleName + }; + } + return { + name, + names, + auxiliaryComment: library.auxiliaryComment, + namedDefine: library.umdNamedDefine + }; + } + + /** + * @param {Source} source source + * @param {RenderContext} renderContext render context + * @param {LibraryContext} libraryContext context + * @returns {Source} source with library export + */ + render( + source, + { chunkGraph, runtimeTemplate, chunk, moduleGraph }, + { options, compilation } + ) { + const modules = chunkGraph + .getChunkModules(chunk) + .filter( + m => + m instanceof ExternalModule && + (m.externalType === "umd" || m.externalType === "umd2") + ); + let externals = /** @type {ExternalModule[]} */ (modules); + /** @type {ExternalModule[]} */ + const optionalExternals = []; + /** @type {ExternalModule[]} */ + let requiredExternals = []; + if (this.optionalAmdExternalAsGlobal) { + for (const m of externals) { + if (m.isOptional(moduleGraph)) { + optionalExternals.push(m); + } else { + requiredExternals.push(m); + } + } + externals = requiredExternals.concat(optionalExternals); + } else { + requiredExternals = externals; + } + + const replaceKeys = str => { + return compilation.getPath(str, { + chunk + }); + }; + + const externalsDepsArray = modules => { + return `[${replaceKeys( + modules + .map(m => + JSON.stringify( + typeof m.request === "object" ? m.request.amd : m.request + ) + ) + .join(", ") + )}]`; + }; + + const externalsRootArray = modules => { + return replaceKeys( + modules + .map(m => { + let request = m.request; + if (typeof request === "object") request = request.root; + return `root${accessorToObjectAccess([].concat(request))}`; + }) + .join(", ") + ); + }; + + const externalsRequireArray = type => { + return replaceKeys( + externals + .map(m => { + let expr; + let request = m.request; + if (typeof request === "object") { + request = request[type]; + } + if (request === undefined) { + throw new Error( + "Missing external configuration for type:" + type + ); + } + if (Array.isArray(request)) { + expr = `require(${JSON.stringify( + request[0] + )})${accessorToObjectAccess(request.slice(1))}`; + } else { + expr = `require(${JSON.stringify(request)})`; + } + if (m.isOptional(moduleGraph)) { + expr = `(function webpackLoadOptionalExternalModule() { try { return ${expr}; } catch(e) {} }())`; + } + return expr; + }) + .join(", ") + ); + }; + + const externalsArguments = modules => { + return modules + .map( + m => + `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier( + `${chunkGraph.getModuleId(m)}` + )}__` + ) + .join(", "); + }; + + const libraryName = library => { + return JSON.stringify(replaceKeys([].concat(library).pop())); + }; + + let amdFactory; + if (optionalExternals.length > 0) { + const wrapperArguments = externalsArguments(requiredExternals); + const factoryArguments = + requiredExternals.length > 0 + ? externalsArguments(requiredExternals) + + ", " + + externalsRootArray(optionalExternals) + : externalsRootArray(optionalExternals); + amdFactory = + `function webpackLoadOptionalExternalModuleAmd(${wrapperArguments}) {\n` + + ` return factory(${factoryArguments});\n` + + " }"; + } else { + amdFactory = "factory"; + } + + const { auxiliaryComment, namedDefine, names } = options; + + const getAuxiliaryComment = type => { + if (auxiliaryComment) { + if (typeof auxiliaryComment === "string") + return "\t//" + auxiliaryComment + "\n"; + if (auxiliaryComment[type]) + return "\t//" + auxiliaryComment[type] + "\n"; + } + return ""; + }; + + return new ConcatSource( + new OriginalSource( + "(function webpackUniversalModuleDefinition(root, factory) {\n" + + getAuxiliaryComment("commonjs2") + + " if(typeof exports === 'object' && typeof module === 'object')\n" + + " module.exports = factory(" + + externalsRequireArray("commonjs2") + + ");\n" + + getAuxiliaryComment("amd") + + " else if(typeof define === 'function' && define.amd)\n" + + (requiredExternals.length > 0 + ? names.amd && namedDefine === true + ? " define(" + + libraryName(names.amd) + + ", " + + externalsDepsArray(requiredExternals) + + ", " + + amdFactory + + ");\n" + : " define(" + + externalsDepsArray(requiredExternals) + + ", " + + amdFactory + + ");\n" + : names.amd && namedDefine === true + ? " define(" + + libraryName(names.amd) + + ", [], " + + amdFactory + + ");\n" + : " define([], " + amdFactory + ");\n") + + (names.root || names.commonjs + ? getAuxiliaryComment("commonjs") + + " else if(typeof exports === 'object')\n" + + " exports[" + + libraryName(names.commonjs || names.root) + + "] = factory(" + + externalsRequireArray("commonjs") + + ");\n" + + getAuxiliaryComment("root") + + " else\n" + + " " + + replaceKeys( + accessorAccess("root", names.root || names.commonjs) + ) + + " = factory(" + + externalsRootArray(externals) + + ");\n" + : " else {\n" + + (externals.length > 0 + ? " var a = typeof exports === 'object' ? factory(" + + externalsRequireArray("commonjs") + + ") : factory(" + + externalsRootArray(externals) + + ");\n" + : " var a = factory();\n") + + " for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n" + + " }\n") + + `})(${ + runtimeTemplate.outputOptions.globalObject + }, function(${externalsArguments(externals)}) {\nreturn `, + "webpack/universalModuleDefinition" + ), + source, + ";\n})" + ); + } +} + +module.exports = UmdLibraryPlugin; + + +/***/ }), + +/***/ 26655: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const LogType = Object.freeze({ + error: /** @type {"error"} */ ("error"), // message, c style arguments + warn: /** @type {"warn"} */ ("warn"), // message, c style arguments + info: /** @type {"info"} */ ("info"), // message, c style arguments + log: /** @type {"log"} */ ("log"), // message, c style arguments + debug: /** @type {"debug"} */ ("debug"), // message, c style arguments + + trace: /** @type {"trace"} */ ("trace"), // no arguments + + group: /** @type {"group"} */ ("group"), // [label] + groupCollapsed: /** @type {"groupCollapsed"} */ ("groupCollapsed"), // [label] + groupEnd: /** @type {"groupEnd"} */ ("groupEnd"), // [label] + + profile: /** @type {"profile"} */ ("profile"), // [profileName] + profileEnd: /** @type {"profileEnd"} */ ("profileEnd"), // [profileName] + + time: /** @type {"time"} */ ("time"), // name, time as [seconds, nanoseconds] + + clear: /** @type {"clear"} */ ("clear"), // no arguments + status: /** @type {"status"} */ ("status") // message, arguments +}); + +exports.LogType = LogType; + +/** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */ + +const LOG_SYMBOL = Symbol("webpack logger raw log method"); +const TIMERS_SYMBOL = Symbol("webpack logger times"); +const TIMERS_AGGREGATES_SYMBOL = Symbol("webpack logger aggregated times"); + +class WebpackLogger { + /** + * @param {function(LogTypeEnum, any[]=): void} log log function + * @param {function(string | function(): string): WebpackLogger} getChildLogger function to create child logger + */ + constructor(log, getChildLogger) { + this[LOG_SYMBOL] = log; + this.getChildLogger = getChildLogger; + } + + error(...args) { + this[LOG_SYMBOL](LogType.error, args); + } + + warn(...args) { + this[LOG_SYMBOL](LogType.warn, args); + } + + info(...args) { + this[LOG_SYMBOL](LogType.info, args); + } + + log(...args) { + this[LOG_SYMBOL](LogType.log, args); + } + + debug(...args) { + this[LOG_SYMBOL](LogType.debug, args); + } + + assert(assertion, ...args) { + if (!assertion) { + this[LOG_SYMBOL](LogType.error, args); + } + } + + trace() { + this[LOG_SYMBOL](LogType.trace, ["Trace"]); + } + + clear() { + this[LOG_SYMBOL](LogType.clear); + } + + status(...args) { + this[LOG_SYMBOL](LogType.status, args); + } + + group(...args) { + this[LOG_SYMBOL](LogType.group, args); + } + + groupCollapsed(...args) { + this[LOG_SYMBOL](LogType.groupCollapsed, args); + } + + groupEnd(...args) { + this[LOG_SYMBOL](LogType.groupEnd, args); + } + + profile(label) { + this[LOG_SYMBOL](LogType.profile, [label]); + } + + profileEnd(label) { + this[LOG_SYMBOL](LogType.profileEnd, [label]); + } + + time(label) { + this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map(); + this[TIMERS_SYMBOL].set(label, process.hrtime()); + } + + timeLog(label) { + const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); + if (!prev) { + throw new Error(`No such label '${label}' for WebpackLogger.timeLog()`); + } + const time = process.hrtime(prev); + this[LOG_SYMBOL](LogType.time, [label, ...time]); + } + + timeEnd(label) { + const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); + if (!prev) { + throw new Error(`No such label '${label}' for WebpackLogger.timeEnd()`); + } + const time = process.hrtime(prev); + this[TIMERS_SYMBOL].delete(label); + this[LOG_SYMBOL](LogType.time, [label, ...time]); + } + + timeAggregate(label) { + const prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label); + if (!prev) { + throw new Error( + `No such label '${label}' for WebpackLogger.timeAggregate()` + ); + } + const time = process.hrtime(prev); + this[TIMERS_SYMBOL].delete(label); + this[TIMERS_AGGREGATES_SYMBOL] = + this[TIMERS_AGGREGATES_SYMBOL] || new Map(); + const current = this[TIMERS_AGGREGATES_SYMBOL].get(label); + if (current !== undefined) { + if (time[1] + current[1] > 1e9) { + time[0] += current[0] + 1; + time[1] = time[1] - 1e9 + current[1]; + } else { + time[0] += current[0]; + time[1] += current[1]; + } + } + this[TIMERS_AGGREGATES_SYMBOL].set(label, time); + } + + timeAggregateEnd(label) { + if (this[TIMERS_AGGREGATES_SYMBOL] === undefined) return; + const time = this[TIMERS_AGGREGATES_SYMBOL].get(label); + if (time === undefined) return; + this[LOG_SYMBOL](LogType.time, [label, ...time]); + } +} + +exports.Logger = WebpackLogger; + + +/***/ }), + +/***/ 80340: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { LogType } = __webpack_require__(26655); + +/** @typedef {import("../../declarations/WebpackOptions").FilterItemTypes} FilterItemTypes */ +/** @typedef {import("../../declarations/WebpackOptions").FilterTypes} FilterTypes */ +/** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */ + +/** @typedef {function(string): boolean} FilterFunction */ + +/** + * @typedef {Object} LoggerOptions + * @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel + * @property {FilterTypes|boolean} debug filter for debug logging + * @property {Console & { status?: Function, logTime?: Function }} console the console to log to + */ + +/** + * @param {FilterItemTypes} item an input item + * @returns {FilterFunction} filter function + */ +const filterToFunction = item => { + if (typeof item === "string") { + const regExp = new RegExp( + `[\\\\/]${item.replace( + // eslint-disable-next-line no-useless-escape + /[-[\]{}()*+?.\\^$|]/g, + "\\$&" + )}([\\\\/]|$|!|\\?)` + ); + return ident => regExp.test(ident); + } + if (item && typeof item === "object" && typeof item.test === "function") { + return ident => item.test(ident); + } + if (typeof item === "function") { + return item; + } + if (typeof item === "boolean") { + return () => item; + } +}; + +/** + * @enum {number} + */ +const LogLevel = { + none: 6, + false: 6, + error: 5, + warn: 4, + info: 3, + log: 2, + true: 2, + verbose: 1 +}; + +/** + * @param {LoggerOptions} options options object + * @returns {function(string, LogTypeEnum, any[]): void} logging function + */ +module.exports = ({ level = "info", debug = false, console }) => { + const debugFilters = + typeof debug === "boolean" + ? [() => debug] + : /** @type {FilterItemTypes[]} */ ([]) + .concat(debug) + .map(filterToFunction); + /** @type {number} */ + const loglevel = LogLevel[`${level}`] || 0; + + /** + * @param {string} name name of the logger + * @param {LogTypeEnum} type type of the log entry + * @param {any[]} args arguments of the log entry + * @returns {void} + */ + const logger = (name, type, args) => { + const labeledArgs = () => { + if (Array.isArray(args)) { + if (args.length > 0 && typeof args[0] === "string") { + return [`[${name}] ${args[0]}`, ...args.slice(1)]; + } else { + return [`[${name}]`, ...args]; + } + } else { + return []; + } + }; + const debug = debugFilters.some(f => f(name)); + switch (type) { + case LogType.debug: + if (!debug) return; + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.debug === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.debug(...labeledArgs()); + } else { + console.log(...labeledArgs()); + } + break; + case LogType.log: + if (!debug && loglevel > LogLevel.log) return; + console.log(...labeledArgs()); + break; + case LogType.info: + if (!debug && loglevel > LogLevel.info) return; + console.info(...labeledArgs()); + break; + case LogType.warn: + if (!debug && loglevel > LogLevel.warn) return; + console.warn(...labeledArgs()); + break; + case LogType.error: + if (!debug && loglevel > LogLevel.error) return; + console.error(...labeledArgs()); + break; + case LogType.trace: + if (!debug) return; + console.trace(); + break; + case LogType.groupCollapsed: + if (!debug && loglevel > LogLevel.log) return; + if (!debug && loglevel > LogLevel.verbose) { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.groupCollapsed === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.groupCollapsed(...labeledArgs()); + } else { + console.log(...labeledArgs()); + } + break; + } + // falls through + case LogType.group: + if (!debug && loglevel > LogLevel.log) return; + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.group === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.group(...labeledArgs()); + } else { + console.log(...labeledArgs()); + } + break; + case LogType.groupEnd: + if (!debug && loglevel > LogLevel.log) return; + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.groupEnd === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.groupEnd(); + } + break; + case LogType.time: { + if (!debug && loglevel > LogLevel.log) return; + const ms = args[1] * 1000 + args[2] / 1000000; + const msg = `[${name}] ${args[0]}: ${ms} ms`; + if (typeof console.logTime === "function") { + console.logTime(msg); + } else { + console.log(msg); + } + break; + } + case LogType.profile: + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.profile === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.profile(...labeledArgs()); + } + break; + case LogType.profileEnd: + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.profileEnd === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.profileEnd(...labeledArgs()); + } + break; + case LogType.clear: + if (!debug && loglevel > LogLevel.log) return; + // eslint-disable-next-line node/no-unsupported-features/node-builtins + if (typeof console.clear === "function") { + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.clear(); + } + break; + case LogType.status: + if (!debug && loglevel > LogLevel.info) return; + if (typeof console.status === "function") { + if (args.length === 0) { + console.status(); + } else { + console.status(...labeledArgs()); + } + } else { + if (args.length !== 0) { + console.info(...labeledArgs()); + } + } + break; + default: + throw new Error(`Unexpected LogType ${type}`); + } + }; + return logger; +}; + + +/***/ }), + +/***/ 55197: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const arraySum = array => { + let sum = 0; + for (const item of array) sum += item; + return sum; +}; + +/** + * @param {any[]} args items to be truncated + * @param {number} maxLength maximum length of args including spaces between + * @returns {string[]} truncated args + */ +const truncateArgs = (args, maxLength) => { + const lengths = args.map(a => `${a}`.length); + const availableLength = maxLength - lengths.length + 1; + + if (availableLength > 0 && args.length === 1) { + if (availableLength >= args[0].length) { + return args; + } else if (availableLength > 3) { + return ["..." + args[0].slice(-availableLength + 3)]; + } else { + return [args[0].slice(-availableLength)]; + } + } + + // Check if there is space for at least 4 chars per arg + if (availableLength < arraySum(lengths.map(i => Math.min(i, 6)))) { + // remove args + if (args.length > 1) + return truncateArgs(args.slice(0, args.length - 1), maxLength); + return []; + } + + let currentLength = arraySum(lengths); + + // Check if all fits into maxLength + if (currentLength <= availableLength) return args; + + // Try to remove chars from the longest items until it fits + while (currentLength > availableLength) { + const maxLength = Math.max(...lengths); + const shorterItems = lengths.filter(l => l !== maxLength); + const nextToMaxLength = + shorterItems.length > 0 ? Math.max(...shorterItems) : 0; + const maxReduce = maxLength - nextToMaxLength; + let maxItems = lengths.length - shorterItems.length; + let overrun = currentLength - availableLength; + for (let i = 0; i < lengths.length; i++) { + if (lengths[i] === maxLength) { + const reduce = Math.min(Math.floor(overrun / maxItems), maxReduce); + lengths[i] -= reduce; + currentLength -= reduce; + overrun -= reduce; + maxItems--; + } + } + } + + // Return args reduced to length in lengths + return args.map((a, i) => { + const str = `${a}`; + const length = lengths[i]; + if (str.length === length) { + return str; + } else if (length > 5) { + return "..." + str.slice(-length + 3); + } else if (length > 0) { + return str.slice(-length); + } else { + return ""; + } + }); +}; + +module.exports = truncateArgs; + + +/***/ }), + +/***/ 44986: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const StartupChunkDependenciesPlugin = __webpack_require__(9517); + +/** @typedef {import("../Compiler")} Compiler */ + +class CommonJsChunkLoadingPlugin { + constructor(options) { + options = options || {}; + this._asyncChunkLoading = options.asyncChunkLoading; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const ChunkLoadingRuntimeModule = this._asyncChunkLoading + ? __webpack_require__(55899) + : __webpack_require__(73940); + const chunkLoadingValue = this._asyncChunkLoading + ? "async-node" + : "require"; + new StartupChunkDependenciesPlugin({ + chunkLoading: chunkLoadingValue, + asyncChunkLoading: this._asyncChunkLoading + }).apply(compiler); + compiler.hooks.thisCompilation.tap( + "CommonJsChunkLoadingPlugin", + compilation => { + const globalChunkLoading = compilation.outputOptions.chunkLoading; + const isEnabledForChunk = chunk => { + const options = chunk.getEntryOptions(); + const chunkLoading = + (options && options.chunkLoading) || globalChunkLoading; + return chunkLoading === chunkLoadingValue; + }; + const onceForChunkSet = new WeakSet(); + const handler = (chunk, set) => { + if (onceForChunkSet.has(chunk)) return; + onceForChunkSet.add(chunk); + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.moduleFactoriesAddOnly); + set.add(RuntimeGlobals.hasOwnProperty); + compilation.addRuntimeModule( + chunk, + new ChunkLoadingRuntimeModule(set) + ); + }; + + compilation.hooks.additionalTreeRuntimeRequirements.tap( + "CommonJsChunkLoadingPlugin", + (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + if ( + Array.from(chunk.getAllReferencedChunks()).some( + c => + c !== chunk && + compilation.chunkGraph.getNumberOfEntryModules(c) > 0 + ) + ) { + set.add(RuntimeGlobals.startupEntrypoint); + set.add(RuntimeGlobals.externalInstallChunk); + } + } + ); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunkHandlers) + .tap("CommonJsChunkLoadingPlugin", handler); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadUpdateHandlers) + .tap("CommonJsChunkLoadingPlugin", handler); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadManifest) + .tap("CommonJsChunkLoadingPlugin", handler); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.baseURI) + .tap("CommonJsChunkLoadingPlugin", handler); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunkHandlers) + .tap("CommonJsChunkLoadingPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.getChunkScriptFilename); + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadUpdateHandlers) + .tap("CommonJsChunkLoadingPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.getChunkUpdateScriptFilename); + set.add(RuntimeGlobals.moduleCache); + set.add(RuntimeGlobals.hmrModuleData); + set.add(RuntimeGlobals.moduleFactoriesAddOnly); + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadManifest) + .tap("CommonJsChunkLoadingPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.getUpdateManifestFilename); + }); + } + ); + } +} + +module.exports = CommonJsChunkLoadingPlugin; + + +/***/ }), + +/***/ 46613: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const CachedInputFileSystem = __webpack_require__(29843); +const fs = __webpack_require__(88715); +const createConsoleLogger = __webpack_require__(80340); +const NodeWatchFileSystem = __webpack_require__(73206); +const nodeConsole = __webpack_require__(35788); + +/** @typedef {import("../Compiler")} Compiler */ + +class NodeEnvironmentPlugin { + constructor(options) { + this.options = options || {}; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.infrastructureLogger = createConsoleLogger( + Object.assign( + { + level: "info", + debug: false, + console: nodeConsole + }, + this.options.infrastructureLogging + ) + ); + compiler.inputFileSystem = new CachedInputFileSystem(fs, 60000); + const inputFileSystem = compiler.inputFileSystem; + compiler.outputFileSystem = fs; + compiler.intermediateFileSystem = fs; + compiler.watchFileSystem = new NodeWatchFileSystem( + compiler.inputFileSystem + ); + compiler.hooks.beforeRun.tap("NodeEnvironmentPlugin", compiler => { + if (compiler.inputFileSystem === inputFileSystem) { + inputFileSystem.purge(); + } + }); + } +} + +module.exports = NodeEnvironmentPlugin; + + +/***/ }), + +/***/ 66876: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../Compiler")} Compiler */ + +class NodeSourcePlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) {} +} + +module.exports = NodeSourcePlugin; + + +/***/ }), + +/***/ 62791: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ExternalsPlugin = __webpack_require__(19056); + +/** @typedef {import("../Compiler")} Compiler */ + +const builtins = [ + "assert", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "dns", + "dns/promises", + "domain", + "events", + "fs", + "fs/promises", + "http", + "http2", + "https", + "inspector", + "module", + "net", + "os", + "path", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "stream/promises", + "string_decoder", + "sys", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "v8", + "vm", + "wasi", // cSpell:ignore wasi + "worker_threads", + "zlib" +]; + +class NodeTargetPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + new ExternalsPlugin("commonjs", builtins).apply(compiler); + } +} + +module.exports = NodeTargetPlugin; + + +/***/ }), + +/***/ 25514: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const CommonJsChunkFormatPlugin = __webpack_require__(15534); +const EnableChunkLoadingPlugin = __webpack_require__(41952); + +/** @typedef {import("../Compiler")} Compiler */ + +class NodeTemplatePlugin { + constructor(options) { + this._options = options || {}; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const chunkLoading = this._options.asyncChunkLoading + ? "async-node" + : "require"; + compiler.options.output.chunkLoading = chunkLoading; + new CommonJsChunkFormatPlugin().apply(compiler); + new EnableChunkLoadingPlugin(chunkLoading).apply(compiler); + } +} + +module.exports = NodeTemplatePlugin; + + +/***/ }), + +/***/ 73206: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Watchpack = __webpack_require__(36242); + +/** @typedef {import("../../declarations/WebpackOptions").WatchOptions} WatchOptions */ +/** @typedef {import("../FileSystemInfo").FileSystemInfoEntry} FileSystemInfoEntry */ +/** @typedef {import("../util/fs").WatchFileSystem} WatchFileSystem */ +/** @typedef {import("../util/fs").WatchMethod} WatchMethod */ +/** @typedef {import("../util/fs").Watcher} Watcher */ + +class NodeWatchFileSystem { + constructor(inputFileSystem) { + this.inputFileSystem = inputFileSystem; + this.watcherOptions = { + aggregateTimeout: 0 + }; + this.watcher = new Watchpack(this.watcherOptions); + } + + /** + * @param {Iterable} files watched files + * @param {Iterable} directories watched directories + * @param {Iterable} missing watched exitance entries + * @param {number} startTime timestamp of start time + * @param {WatchOptions} options options object + * @param {function(Error=, Map, Map, Set, Set): void} callback aggregated callback + * @param {function(string, number): void} callbackUndelayed callback when the first change was detected + * @returns {Watcher} a watcher + */ + watch( + files, + directories, + missing, + startTime, + options, + callback, + callbackUndelayed + ) { + if (!files || typeof files[Symbol.iterator] !== "function") { + throw new Error("Invalid arguments: 'files'"); + } + if (!directories || typeof directories[Symbol.iterator] !== "function") { + throw new Error("Invalid arguments: 'directories'"); + } + if (!missing || typeof missing[Symbol.iterator] !== "function") { + throw new Error("Invalid arguments: 'missing'"); + } + if (typeof callback !== "function") { + throw new Error("Invalid arguments: 'callback'"); + } + if (typeof startTime !== "number" && startTime) { + throw new Error("Invalid arguments: 'startTime'"); + } + if (typeof options !== "object") { + throw new Error("Invalid arguments: 'options'"); + } + if (typeof callbackUndelayed !== "function" && callbackUndelayed) { + throw new Error("Invalid arguments: 'callbackUndelayed'"); + } + const oldWatcher = this.watcher; + this.watcher = new Watchpack(options); + + if (callbackUndelayed) { + this.watcher.once("change", callbackUndelayed); + } + this.watcher.once("aggregated", (changes, removals) => { + if (this.inputFileSystem && this.inputFileSystem.purge) { + for (const item of changes) { + this.inputFileSystem.purge(item); + } + for (const item of removals) { + this.inputFileSystem.purge(item); + } + } + const times = this.watcher.getTimeInfoEntries(); + callback(null, times, times, changes, removals); + }); + + this.watcher.watch({ files, directories, missing, startTime }); + + if (oldWatcher) { + oldWatcher.close(); + } + return { + close: () => { + if (this.watcher) { + this.watcher.close(); + this.watcher = null; + } + }, + pause: () => { + if (this.watcher) { + this.watcher.pause(); + } + }, + getFileTimeInfoEntries: () => { + if (this.watcher) { + return this.watcher.getTimeInfoEntries(); + } else { + return new Map(); + } + }, + getContextTimeInfoEntries: () => { + if (this.watcher) { + return this.watcher.getTimeInfoEntries(); + } else { + return new Map(); + } + } + }; + } +} + +module.exports = NodeWatchFileSystem; + + +/***/ }), + +/***/ 55899: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); +const { + chunkHasJs, + getChunkFilenameTemplate +} = __webpack_require__(80867); +const compileBooleanMatcher = __webpack_require__(29522); +const { getUndoPath } = __webpack_require__(47779); + +class ReadFileChunkLoadingRuntimeModule extends RuntimeModule { + constructor(runtimeRequirements) { + super("readFile chunk loading", RuntimeModule.STAGE_ATTACH); + this.runtimeRequirements = runtimeRequirements; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { chunk } = this; + const { chunkGraph, runtimeTemplate } = this.compilation; + const fn = RuntimeGlobals.ensureChunkHandlers; + const withBaseURI = this.runtimeRequirements.has(RuntimeGlobals.baseURI); + const withExternalInstallChunk = this.runtimeRequirements.has( + RuntimeGlobals.externalInstallChunk + ); + const withLoading = this.runtimeRequirements.has( + RuntimeGlobals.ensureChunkHandlers + ); + const withHmr = this.runtimeRequirements.has( + RuntimeGlobals.hmrDownloadUpdateHandlers + ); + const withHmrManifest = this.runtimeRequirements.has( + RuntimeGlobals.hmrDownloadManifest + ); + const hasJsMatcher = compileBooleanMatcher( + chunkGraph.getChunkConditionMap(chunk, chunkHasJs) + ); + + const outputName = this.compilation.getPath( + getChunkFilenameTemplate(chunk, this.compilation.outputOptions), + { + chunk, + contentHashType: "javascript" + } + ); + const rootOutputDir = getUndoPath(outputName, false); + + return Template.asString([ + withBaseURI + ? Template.asString([ + `${RuntimeGlobals.baseURI} = require("url").pathToFileURL(${ + rootOutputDir + ? `__dirname + ${JSON.stringify("/" + rootOutputDir)}` + : "__filename" + });` + ]) + : "// no baseURI", + "", + "// object to store loaded chunks", + '// "0" means "already loaded", Promise means loading', + "var installedChunks = {", + Template.indent( + chunk.ids.map(id => `${JSON.stringify(id)}: 0`).join(",\n") + ), + "};", + "", + withLoading || withExternalInstallChunk + ? `var installChunk = ${runtimeTemplate.basicFunction("chunk", [ + "var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;", + "for(var moduleId in moreModules) {", + Template.indent([ + `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, + Template.indent([ + `${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];` + ]), + "}" + ]), + "}", + `if(runtime) runtime(__webpack_require__);`, + "var callbacks = [];", + "for(var i = 0; i < chunkIds.length; i++) {", + Template.indent([ + "if(installedChunks[chunkIds[i]])", + Template.indent([ + "callbacks = callbacks.concat(installedChunks[chunkIds[i]][0]);" + ]), + "installedChunks[chunkIds[i]] = 0;" + ]), + "}", + "for(i = 0; i < callbacks.length; i++)", + Template.indent("callbacks[i]();") + ])};` + : "// no chunk install function needed", + "", + withLoading + ? Template.asString([ + "// ReadFile + VM.run chunk loading for javascript", + `${fn}.readFileVm = function(chunkId, promises) {`, + hasJsMatcher !== false + ? Template.indent([ + "", + "var installedChunkData = installedChunks[chunkId];", + 'if(installedChunkData !== 0) { // 0 means "already installed".', + Template.indent([ + '// array of [resolve, reject, promise] means "currently loading"', + "if(installedChunkData) {", + Template.indent(["promises.push(installedChunkData[2]);"]), + "} else {", + Template.indent([ + hasJsMatcher === true + ? "if(true) { // all chunks have JS" + : `if(${hasJsMatcher("chunkId")}) {`, + Template.indent([ + "// load the chunk and return promise to it", + "var promise = new Promise(function(resolve, reject) {", + Template.indent([ + "installedChunkData = installedChunks[chunkId] = [resolve, reject];", + `var filename = require('path').join(__dirname, ${JSON.stringify( + rootOutputDir + )} + ${ + RuntimeGlobals.getChunkScriptFilename + }(chunkId));`, + "require('fs').readFile(filename, 'utf-8', function(err, content) {", + Template.indent([ + "if(err) return reject(err);", + "var chunk = {};", + "require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\\n})', filename)" + + "(chunk, require, require('path').dirname(filename), filename);", + "installChunk(chunk);" + ]), + "});" + ]), + "});", + "promises.push(installedChunkData[2] = promise);" + ]), + "} else installedChunks[chunkId] = 0;" + ]), + "}" + ]), + "}" + ]) + : Template.indent(["installedChunks[chunkId] = 0;"]), + "};" + ]) + : "// no chunk loading", + "", + withExternalInstallChunk + ? Template.asString([ + "module.exports = __webpack_require__;", + `${RuntimeGlobals.externalInstallChunk} = installChunk;` + ]) + : "// no external install chunk", + "", + withHmr + ? Template.asString([ + "function loadUpdateChunk(chunkId, updatedModulesList) {", + Template.indent([ + "return new Promise(function(resolve, reject) {", + Template.indent([ + `var filename = require('path').join(__dirname, ${JSON.stringify( + rootOutputDir + )} + ${RuntimeGlobals.getChunkUpdateScriptFilename}(chunkId));`, + "require('fs').readFile(filename, 'utf-8', function(err, content) {", + Template.indent([ + "if(err) return reject(err);", + "var update = {};", + "require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\\n})', filename)" + + "(update, require, require('path').dirname(filename), filename);", + "var updatedModules = update.modules;", + "var runtime = update.runtime;", + "for(var moduleId in updatedModules) {", + Template.indent([ + `if(${RuntimeGlobals.hasOwnProperty}(updatedModules, moduleId)) {`, + Template.indent([ + `currentUpdate[moduleId] = updatedModules[moduleId];`, + "if(updatedModulesList) updatedModulesList.push(moduleId);" + ]), + "}" + ]), + "}", + "if(runtime) currentUpdateRuntime.push(runtime);", + "resolve();" + ]), + "});" + ]), + "});" + ]), + "}", + "", + Template.getFunctionContent( + require('./JavascriptHotModuleReplacement.runtime.js') + ) + .replace(/\$key\$/g, "readFileVm") + .replace(/\$installedChunks\$/g, "installedChunks") + .replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk") + .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) + .replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories) + .replace( + /\$ensureChunkHandlers\$/g, + RuntimeGlobals.ensureChunkHandlers + ) + .replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty) + .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) + .replace( + /\$hmrDownloadUpdateHandlers\$/g, + RuntimeGlobals.hmrDownloadUpdateHandlers + ) + .replace( + /\$hmrInvalidateModuleHandlers\$/g, + RuntimeGlobals.hmrInvalidateModuleHandlers + ) + ]) + : "// no HMR", + "", + withHmrManifest + ? Template.asString([ + `${RuntimeGlobals.hmrDownloadManifest} = function() {`, + Template.indent([ + "return new Promise(function(resolve, reject) {", + Template.indent([ + `var filename = require('path').join(__dirname, ${JSON.stringify( + rootOutputDir + )} + ${RuntimeGlobals.getUpdateManifestFilename}());`, + "require('fs').readFile(filename, 'utf-8', function(err, content) {", + Template.indent([ + "if(err) {", + Template.indent([ + 'if(err.code === "ENOENT") return resolve();', + "return reject(err);" + ]), + "}", + "try { resolve(JSON.parse(content)); }", + "catch(e) { reject(e); }" + ]), + "});" + ]), + "});" + ]), + "}" + ]) + : "// no HMR manifest" + ]); + } +} + +module.exports = ReadFileChunkLoadingRuntimeModule; + + +/***/ }), + +/***/ 54874: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const AsyncWasmChunkLoadingRuntimeModule = __webpack_require__(38733); + +/** @typedef {import("../Compiler")} Compiler */ + +class ReadFileCompileAsyncWasmPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "ReadFileCompileAsyncWasmPlugin", + compilation => { + const globalWasmLoading = compilation.outputOptions.wasmLoading; + const isEnabledForChunk = chunk => { + const options = chunk.getEntryOptions(); + const wasmLoading = + (options && options.wasmLoading) || globalWasmLoading; + return wasmLoading === "async-node"; + }; + const generateLoadBinaryCode = path => + Template.asString([ + "new Promise(function (resolve, reject) {", + Template.indent([ + "var { readFile } = require('fs');", + "var { join } = require('path');", + "", + "try {", + Template.indent([ + `readFile(join(__dirname, ${path}), function(err, buffer){`, + Template.indent([ + "if (err) return reject(err);", + "", + "// Fake fetch response", + "resolve({", + Template.indent(["arrayBuffer() { return buffer; }"]), + "});" + ]), + "});" + ]), + "} catch (err) { reject(err); }" + ]), + "})" + ]); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.instantiateWasm) + .tap("ReadFileCompileAsyncWasmPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + const chunkGraph = compilation.chunkGraph; + if ( + !chunkGraph.hasModuleInGraph( + chunk, + m => m.type === "webassembly/async" + ) + ) { + return; + } + set.add(RuntimeGlobals.publicPath); + compilation.addRuntimeModule( + chunk, + new AsyncWasmChunkLoadingRuntimeModule({ + generateLoadBinaryCode, + supportsStreaming: false + }) + ); + }); + } + ); + } +} + +module.exports = ReadFileCompileAsyncWasmPlugin; + + +/***/ }), + +/***/ 13715: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const WasmChunkLoadingRuntimeModule = __webpack_require__(53590); + +/** @typedef {import("../Compiler")} Compiler */ + +// TODO webpack 6 remove + +class ReadFileCompileWasmPlugin { + constructor(options) { + this.options = options || {}; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "ReadFileCompileWasmPlugin", + compilation => { + const globalWasmLoading = compilation.outputOptions.wasmLoading; + const isEnabledForChunk = chunk => { + const options = chunk.getEntryOptions(); + const wasmLoading = + (options && options.wasmLoading) || globalWasmLoading; + return wasmLoading === "async-node"; + }; + const generateLoadBinaryCode = path => + Template.asString([ + "new Promise(function (resolve, reject) {", + Template.indent([ + "var { readFile } = require('fs');", + "var { join } = require('path');", + "", + "try {", + Template.indent([ + `readFile(join(__dirname, ${path}), function(err, buffer){`, + Template.indent([ + "if (err) return reject(err);", + "", + "// Fake fetch response", + "resolve({", + Template.indent(["arrayBuffer() { return buffer; }"]), + "});" + ]), + "});" + ]), + "} catch (err) { reject(err); }" + ]), + "})" + ]); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunkHandlers) + .tap("ReadFileCompileWasmPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + const chunkGraph = compilation.chunkGraph; + if ( + !chunkGraph.hasModuleInGraph( + chunk, + m => m.type === "webassembly/sync" + ) + ) { + return; + } + set.add(RuntimeGlobals.moduleCache); + compilation.addRuntimeModule( + chunk, + new WasmChunkLoadingRuntimeModule({ + generateLoadBinaryCode, + supportsStreaming: false, + mangleImports: this.options.mangleImports + }) + ); + }); + } + ); + } +} + +module.exports = ReadFileCompileWasmPlugin; + + +/***/ }), + +/***/ 73940: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); +const { + chunkHasJs, + getChunkFilenameTemplate +} = __webpack_require__(80867); +const compileBooleanMatcher = __webpack_require__(29522); +const { getUndoPath } = __webpack_require__(47779); + +class RequireChunkLoadingRuntimeModule extends RuntimeModule { + constructor(runtimeRequirements) { + super("require chunk loading", RuntimeModule.STAGE_ATTACH); + this.runtimeRequirements = runtimeRequirements; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { chunk } = this; + const { chunkGraph, runtimeTemplate } = this.compilation; + const fn = RuntimeGlobals.ensureChunkHandlers; + const withBaseURI = this.runtimeRequirements.has(RuntimeGlobals.baseURI); + const withExternalInstallChunk = this.runtimeRequirements.has( + RuntimeGlobals.externalInstallChunk + ); + const withLoading = this.runtimeRequirements.has( + RuntimeGlobals.ensureChunkHandlers + ); + const withHmr = this.runtimeRequirements.has( + RuntimeGlobals.hmrDownloadUpdateHandlers + ); + const withHmrManifest = this.runtimeRequirements.has( + RuntimeGlobals.hmrDownloadManifest + ); + const hasJsMatcher = compileBooleanMatcher( + chunkGraph.getChunkConditionMap(chunk, chunkHasJs) + ); + + const outputName = this.compilation.getPath( + getChunkFilenameTemplate(chunk, this.compilation.outputOptions), + { + chunk, + contentHashType: "javascript" + } + ); + const rootOutputDir = getUndoPath(outputName, true); + + return Template.asString([ + withBaseURI + ? Template.asString([ + `${RuntimeGlobals.baseURI} = require("url").pathToFileURL(${ + rootOutputDir !== "./" + ? `__dirname + ${JSON.stringify("/" + rootOutputDir)}` + : "__filename" + });` + ]) + : "// no baseURI", + "", + "// object to store loaded chunks", + '// "1" means "loaded", otherwise not loaded yet', + "var installedChunks = {", + Template.indent( + chunk.ids.map(id => `${JSON.stringify(id)}: 1`).join(",\n") + ), + "};", + "", + withLoading || withExternalInstallChunk + ? `var installChunk = ${runtimeTemplate.basicFunction("chunk", [ + "var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;", + "for(var moduleId in moreModules) {", + Template.indent([ + `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, + Template.indent([ + `${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];` + ]), + "}" + ]), + "}", + `if(runtime) runtime(__webpack_require__);`, + "for(var i = 0; i < chunkIds.length; i++)", + Template.indent("installedChunks[chunkIds[i]] = 1;") + ])};` + : "// no chunk install function needed", + "", + withLoading + ? Template.asString([ + "// require() chunk loading for javascript", + `${fn}.require = function(chunkId, promises) {`, + hasJsMatcher !== false + ? Template.indent([ + "", + '// "1" is the signal for "already loaded"', + "if(!installedChunks[chunkId]) {", + Template.indent([ + hasJsMatcher === true + ? "if(true) { // all chunks have JS" + : `if(${hasJsMatcher("chunkId")}) {`, + Template.indent([ + `installChunk(require(${JSON.stringify( + rootOutputDir + )} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId)));` + ]), + "} else installedChunks[chunkId] = 1;", + "" + ]), + "}" + ]) + : "installedChunks[chunkId] = 1;", + "};" + ]) + : "// no chunk loading", + "", + withExternalInstallChunk + ? Template.asString([ + "module.exports = __webpack_require__;", + `${RuntimeGlobals.externalInstallChunk} = installChunk;` + ]) + : "// no external install chunk", + "", + withHmr + ? Template.asString([ + "function loadUpdateChunk(chunkId, updatedModulesList) {", + Template.indent([ + `var update = require(${JSON.stringify(rootOutputDir)} + ${ + RuntimeGlobals.getChunkUpdateScriptFilename + }(chunkId));`, + "var updatedModules = update.modules;", + "var runtime = update.runtime;", + "for(var moduleId in updatedModules) {", + Template.indent([ + `if(${RuntimeGlobals.hasOwnProperty}(updatedModules, moduleId)) {`, + Template.indent([ + `currentUpdate[moduleId] = updatedModules[moduleId];`, + "if(updatedModulesList) updatedModulesList.push(moduleId);" + ]), + "}" + ]), + "}", + "if(runtime) currentUpdateRuntime.push(runtime);" + ]), + "}", + "", + Template.getFunctionContent( + require('./JavascriptHotModuleReplacement.runtime.js') + ) + .replace(/\$key\$/g, "require") + .replace(/\$installedChunks\$/g, "installedChunks") + .replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk") + .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) + .replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories) + .replace( + /\$ensureChunkHandlers\$/g, + RuntimeGlobals.ensureChunkHandlers + ) + .replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty) + .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) + .replace( + /\$hmrDownloadUpdateHandlers\$/g, + RuntimeGlobals.hmrDownloadUpdateHandlers + ) + .replace( + /\$hmrInvalidateModuleHandlers\$/g, + RuntimeGlobals.hmrInvalidateModuleHandlers + ) + ]) + : "// no HMR", + "", + withHmrManifest + ? Template.asString([ + `${RuntimeGlobals.hmrDownloadManifest} = function() {`, + Template.indent([ + "return Promise.resolve().then(function() {", + Template.indent([ + `return require(${JSON.stringify(rootOutputDir)} + ${ + RuntimeGlobals.getUpdateManifestFilename + }());` + ]), + '}).catch(function(err) { if(err.code !== "MODULE_NOT_FOUND") throw err; });' + ]), + "}" + ]) + : "// no HMR manifest" + ]); + } +} + +module.exports = RequireChunkLoadingRuntimeModule; + + +/***/ }), + +/***/ 35788: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const truncateArgs = __webpack_require__(55197); + +const tty = process.stderr.isTTY && process.env.TERM !== "dumb"; + +let currentStatusMessage = undefined; +let hasStatusMessage = false; +let currentIndent = ""; +let currentCollapsed = 0; + +const indent = (str, prefix, colorPrefix, colorSuffix) => { + if (str === "") return str; + prefix = currentIndent + prefix; + if (tty) { + return ( + prefix + + colorPrefix + + str.replace(/\n/g, colorSuffix + "\n" + prefix + colorPrefix) + + colorSuffix + ); + } else { + return prefix + str.replace(/\n/g, "\n" + prefix); + } +}; + +const clearStatusMessage = () => { + if (hasStatusMessage) { + process.stderr.write("\x1b[2K\r"); + hasStatusMessage = false; + } +}; + +const writeStatusMessage = () => { + if (!currentStatusMessage) return; + const l = process.stderr.columns; + const args = l + ? truncateArgs(currentStatusMessage, l - 1) + : currentStatusMessage; + const str = args.join(" "); + const coloredStr = `\u001b[1m${str}\u001b[39m\u001b[22m`; + process.stderr.write(`\x1b[2K\r${coloredStr}`); + hasStatusMessage = true; +}; + +const writeColored = (prefix, colorPrefix, colorSuffix) => { + return (...args) => { + if (currentCollapsed > 0) return; + clearStatusMessage(); + const str = indent(util.format(...args), prefix, colorPrefix, colorSuffix); + process.stderr.write(str + "\n"); + writeStatusMessage(); + }; +}; + +const writeGroupMessage = writeColored( + "<-> ", + "\u001b[1m\u001b[36m", + "\u001b[39m\u001b[22m" +); + +const writeGroupCollapsedMessage = writeColored( + "<+> ", + "\u001b[1m\u001b[36m", + "\u001b[39m\u001b[22m" +); + +module.exports = { + log: writeColored(" ", "\u001b[1m", "\u001b[22m"), + debug: writeColored(" ", "", ""), + trace: writeColored(" ", "", ""), + info: writeColored(" ", "\u001b[1m\u001b[32m", "\u001b[39m\u001b[22m"), + warn: writeColored(" ", "\u001b[1m\u001b[33m", "\u001b[39m\u001b[22m"), + error: writeColored(" ", "\u001b[1m\u001b[31m", "\u001b[39m\u001b[22m"), + logTime: writeColored(" ", "\u001b[1m\u001b[35m", "\u001b[39m\u001b[22m"), + group: (...args) => { + writeGroupMessage(...args); + if (currentCollapsed > 0) { + currentCollapsed++; + } else { + currentIndent += " "; + } + }, + groupCollapsed: (...args) => { + writeGroupCollapsedMessage(...args); + currentCollapsed++; + }, + groupEnd: () => { + if (currentCollapsed > 0) currentCollapsed--; + else if (currentIndent.length >= 2) + currentIndent = currentIndent.slice(0, currentIndent.length - 2); + }, + // eslint-disable-next-line node/no-unsupported-features/node-builtins + profile: console.profile && (name => console.profile(name)), + // eslint-disable-next-line node/no-unsupported-features/node-builtins + profileEnd: console.profileEnd && (name => console.profileEnd(name)), + clear: + tty && + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.clear && + (() => { + clearStatusMessage(); + // eslint-disable-next-line node/no-unsupported-features/node-builtins + console.clear(); + writeStatusMessage(); + }), + status: tty + ? (name, ...args) => { + args = args.filter(Boolean); + if (name === undefined && args.length === 0) { + clearStatusMessage(); + currentStatusMessage = undefined; + } else if ( + typeof name === "string" && + name.startsWith("[webpack.Progress] ") + ) { + currentStatusMessage = [name.slice(19), ...args]; + writeStatusMessage(); + } else if (name === "[webpack.Progress]") { + currentStatusMessage = [...args]; + writeStatusMessage(); + } else { + currentStatusMessage = [name, ...args]; + writeStatusMessage(); + } + } + : writeColored(" ", "", "") +}; + + +/***/ }), + +/***/ 19168: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { STAGE_ADVANCED } = __webpack_require__(90412); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ + +class AggressiveMergingPlugin { + constructor(options) { + if ( + (options !== undefined && typeof options !== "object") || + Array.isArray(options) + ) { + throw new Error( + "Argument should be an options object. To use defaults, pass in nothing.\nFor more info on options, see https://webpack.js.org/plugins/" + ); + } + this.options = options || {}; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const options = this.options; + const minSizeReduce = options.minSizeReduce || 1.5; + + compiler.hooks.thisCompilation.tap( + "AggressiveMergingPlugin", + compilation => { + compilation.hooks.optimizeChunks.tap( + { + name: "AggressiveMergingPlugin", + stage: STAGE_ADVANCED + }, + chunks => { + const chunkGraph = compilation.chunkGraph; + /** @type {{a: Chunk, b: Chunk, improvement: number}[]} */ + let combinations = []; + for (const a of chunks) { + if (a.canBeInitial()) continue; + for (const b of chunks) { + if (b.canBeInitial()) continue; + if (b === a) break; + if (!chunkGraph.canChunksBeIntegrated(a, b)) { + continue; + } + const aSize = chunkGraph.getChunkSize(b, { + chunkOverhead: 0 + }); + const bSize = chunkGraph.getChunkSize(a, { + chunkOverhead: 0 + }); + const abSize = chunkGraph.getIntegratedChunksSize(b, a, { + chunkOverhead: 0 + }); + const improvement = (aSize + bSize) / abSize; + combinations.push({ + a, + b, + improvement + }); + } + } + + combinations.sort((a, b) => { + return b.improvement - a.improvement; + }); + + const pair = combinations[0]; + + if (!pair) return; + if (pair.improvement < minSizeReduce) return; + + chunkGraph.integrateChunks(pair.b, pair.a); + compilation.chunks.delete(pair.a); + return true; + } + ); + } + ); + } +} + +module.exports = AggressiveMergingPlugin; + + +/***/ }), + +/***/ 13461: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(32643); +const { STAGE_ADVANCED } = __webpack_require__(90412); +const { intersect } = __webpack_require__(86088); +const { + compareModulesByIdentifier, + compareChunks +} = __webpack_require__(21699); +const identifierUtils = __webpack_require__(47779); + +/** @typedef {import("../../declarations/plugins/optimize/AggressiveSplittingPlugin").AggressiveSplittingPluginOptions} AggressiveSplittingPluginOptions */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +const moveModuleBetween = (chunkGraph, oldChunk, newChunk) => { + return module => { + chunkGraph.disconnectChunkAndModule(oldChunk, module); + chunkGraph.connectChunkAndModule(newChunk, module); + }; +}; + +/** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {Chunk} chunk the chunk + * @returns {function(Module): boolean} filter for entry module + */ +const isNotAEntryModule = (chunkGraph, chunk) => { + return module => { + return !chunkGraph.isEntryModuleInChunk(module, chunk); + }; +}; + +/** @type {WeakSet} */ +const recordedChunks = new WeakSet(); + +class AggressiveSplittingPlugin { + /** + * @param {AggressiveSplittingPluginOptions=} options options object + */ + constructor(options = {}) { + validate(schema, options, { + name: "Aggressive Splitting Plugin", + baseDataPath: "options" + }); + + this.options = options; + if (typeof this.options.minSize !== "number") { + this.options.minSize = 30 * 1024; + } + if (typeof this.options.maxSize !== "number") { + this.options.maxSize = 50 * 1024; + } + if (typeof this.options.chunkOverhead !== "number") { + this.options.chunkOverhead = 0; + } + if (typeof this.options.entryChunkMultiplicator !== "number") { + this.options.entryChunkMultiplicator = 1; + } + } + + /** + * @param {Chunk} chunk the chunk to test + * @returns {boolean} true if the chunk was recorded + */ + static wasChunkRecorded(chunk) { + return recordedChunks.has(chunk); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "AggressiveSplittingPlugin", + compilation => { + let needAdditionalSeal = false; + let newSplits; + let fromAggressiveSplittingSet; + let chunkSplitDataMap; + compilation.hooks.optimize.tap("AggressiveSplittingPlugin", () => { + newSplits = []; + fromAggressiveSplittingSet = new Set(); + chunkSplitDataMap = new Map(); + }); + compilation.hooks.optimizeChunks.tap( + { + name: "AggressiveSplittingPlugin", + stage: STAGE_ADVANCED + }, + chunks => { + const chunkGraph = compilation.chunkGraph; + // Precompute stuff + const nameToModuleMap = new Map(); + const moduleToNameMap = new Map(); + const makePathsRelative = identifierUtils.makePathsRelative.bindContextCache( + compiler.context, + compiler.root + ); + for (const m of compilation.modules) { + const name = makePathsRelative(m.identifier()); + nameToModuleMap.set(name, m); + moduleToNameMap.set(m, name); + } + + // Check used chunk ids + const usedIds = new Set(); + for (const chunk of chunks) { + usedIds.add(chunk.id); + } + + const recordedSplits = + (compilation.records && compilation.records.aggressiveSplits) || + []; + const usedSplits = newSplits + ? recordedSplits.concat(newSplits) + : recordedSplits; + + const minSize = this.options.minSize; + const maxSize = this.options.maxSize; + + const applySplit = splitData => { + // Cannot split if id is already taken + if (splitData.id !== undefined && usedIds.has(splitData.id)) { + return false; + } + + // Get module objects from names + const selectedModules = splitData.modules.map(name => + nameToModuleMap.get(name) + ); + + // Does the modules exist at all? + if (!selectedModules.every(Boolean)) return false; + + // Check if size matches (faster than waiting for hash) + let size = 0; + for (const m of selectedModules) size += m.size(); + if (size !== splitData.size) return false; + + // get chunks with all modules + const selectedChunks = intersect( + selectedModules.map( + m => new Set(chunkGraph.getModuleChunksIterable(m)) + ) + ); + + // No relevant chunks found + if (selectedChunks.size === 0) return false; + + // The found chunk is already the split or similar + if ( + selectedChunks.size === 1 && + chunkGraph.getNumberOfChunkModules( + Array.from(selectedChunks)[0] + ) === selectedModules.length + ) { + const chunk = Array.from(selectedChunks)[0]; + if (fromAggressiveSplittingSet.has(chunk)) return false; + fromAggressiveSplittingSet.add(chunk); + chunkSplitDataMap.set(chunk, splitData); + return true; + } + + // split the chunk into two parts + const newChunk = compilation.addChunk(); + newChunk.chunkReason = "aggressive splitted"; + for (const chunk of selectedChunks) { + selectedModules.forEach( + moveModuleBetween(chunkGraph, chunk, newChunk) + ); + chunk.split(newChunk); + chunk.name = null; + } + fromAggressiveSplittingSet.add(newChunk); + chunkSplitDataMap.set(newChunk, splitData); + + if (splitData.id !== null && splitData.id !== undefined) { + newChunk.id = splitData.id; + newChunk.ids = [splitData.id]; + } + return true; + }; + + // try to restore to recorded splitting + let changed = false; + for (let j = 0; j < usedSplits.length; j++) { + const splitData = usedSplits[j]; + if (applySplit(splitData)) changed = true; + } + + // for any chunk which isn't splitted yet, split it and create a new entry + // start with the biggest chunk + const cmpFn = compareChunks(chunkGraph); + const sortedChunks = Array.from(chunks).sort((a, b) => { + const diff1 = + chunkGraph.getChunkModulesSize(b) - + chunkGraph.getChunkModulesSize(a); + if (diff1) return diff1; + const diff2 = + chunkGraph.getNumberOfChunkModules(a) - + chunkGraph.getNumberOfChunkModules(b); + if (diff2) return diff2; + return cmpFn(a, b); + }); + for (const chunk of sortedChunks) { + if (fromAggressiveSplittingSet.has(chunk)) continue; + const size = chunkGraph.getChunkModulesSize(chunk); + if ( + size > maxSize && + chunkGraph.getNumberOfChunkModules(chunk) > 1 + ) { + const modules = chunkGraph + .getOrderedChunkModules(chunk, compareModulesByIdentifier) + .filter(isNotAEntryModule(chunkGraph, chunk)); + const selectedModules = []; + let selectedModulesSize = 0; + for (let k = 0; k < modules.length; k++) { + const module = modules[k]; + const newSize = selectedModulesSize + module.size(); + if (newSize > maxSize && selectedModulesSize >= minSize) { + break; + } + selectedModulesSize = newSize; + selectedModules.push(module); + } + if (selectedModules.length === 0) continue; + const splitData = { + modules: selectedModules + .map(m => moduleToNameMap.get(m)) + .sort(), + size: selectedModulesSize + }; + + if (applySplit(splitData)) { + newSplits = (newSplits || []).concat(splitData); + changed = true; + } + } + } + if (changed) return true; + } + ); + compilation.hooks.recordHash.tap( + "AggressiveSplittingPlugin", + records => { + // 4. save made splittings to records + const allSplits = new Set(); + const invalidSplits = new Set(); + + // Check if some splittings are invalid + // We remove invalid splittings and try again + for (const chunk of compilation.chunks) { + const splitData = chunkSplitDataMap.get(chunk); + if (splitData !== undefined) { + if (splitData.hash && chunk.hash !== splitData.hash) { + // Split was successful, but hash doesn't equal + // We can throw away the split since it's useless now + invalidSplits.add(splitData); + } + } + } + + if (invalidSplits.size > 0) { + records.aggressiveSplits = records.aggressiveSplits.filter( + splitData => !invalidSplits.has(splitData) + ); + needAdditionalSeal = true; + } else { + // set hash and id values on all (new) splittings + for (const chunk of compilation.chunks) { + const splitData = chunkSplitDataMap.get(chunk); + if (splitData !== undefined) { + splitData.hash = chunk.hash; + splitData.id = chunk.id; + allSplits.add(splitData); + // set flag for stats + recordedChunks.add(chunk); + } + } + + // Also add all unused historical splits (after the used ones) + // They can still be used in some future compilation + const recordedSplits = + compilation.records && compilation.records.aggressiveSplits; + if (recordedSplits) { + for (const splitData of recordedSplits) { + if (!invalidSplits.has(splitData)) allSplits.add(splitData); + } + } + + // record all splits + records.aggressiveSplits = Array.from(allSplits); + + needAdditionalSeal = false; + } + } + ); + compilation.hooks.needAdditionalSeal.tap( + "AggressiveSplittingPlugin", + () => { + if (needAdditionalSeal) { + needAdditionalSeal = false; + return true; + } + } + ); + } + ); + } +} +module.exports = AggressiveSplittingPlugin; + + +/***/ }), + +/***/ 74233: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const eslintScope = __webpack_require__(86074); +const { + CachedSource, + ConcatSource, + ReplaceSource +} = __webpack_require__(55600); +const ConcatenationScope = __webpack_require__(21926); +const { UsageState } = __webpack_require__(54227); +const Module = __webpack_require__(54031); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const HarmonyImportDependency = __webpack_require__(289); +const JavascriptParser = __webpack_require__(87507); +const { equals } = __webpack_require__(92459); +const LazySet = __webpack_require__(60248); +const { concatComparators, keepOriginalOrder } = __webpack_require__(21699); +const createHash = __webpack_require__(34627); +const contextify = __webpack_require__(47779).contextify; +const makeSerializable = __webpack_require__(55575); +const propertyAccess = __webpack_require__(44682); +const { + filterRuntime, + intersectRuntime, + mergeRuntimeCondition, + mergeRuntimeConditionNonFalse, + runtimeConditionToString, + subtractRuntimeCondition +} = __webpack_require__(43478); + +/** @typedef {import("eslint-scope").Scope} Scope */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */ +/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("../ExportsInfo").ExportInfo} ExportInfo */ +/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ +/** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ +/** @typedef {import("../RequestShortener")} RequestShortener */ +/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +/** + * @typedef {Object} ReexportInfo + * @property {Module} module + * @property {string[]} export + */ + +/** @typedef {RawBinding | SymbolBinding} Binding */ + +/** + * @typedef {Object} RawBinding + * @property {ModuleInfo} info + * @property {string} rawName + * @property {string=} comment + * @property {string[]} ids + * @property {string[]} exportName + */ + +/** + * @typedef {Object} SymbolBinding + * @property {ConcatenatedModuleInfo} info + * @property {string} name + * @property {string=} comment + * @property {string[]} ids + * @property {string[]} exportName + */ + +/** @typedef {ConcatenatedModuleInfo | ExternalModuleInfo } ModuleInfo */ +/** @typedef {ConcatenatedModuleInfo | ExternalModuleInfo | ReferenceToModuleInfo } ModuleInfoOrReference */ + +/** + * @typedef {Object} ConcatenatedModuleInfo + * @property {"concatenated"} type + * @property {Module} module + * @property {number} index + * @property {Object} ast + * @property {Source} internalSource + * @property {ReplaceSource} source + * @property {Iterable} runtimeRequirements + * @property {Scope} globalScope + * @property {Scope} moduleScope + * @property {Map} internalNames + * @property {Map} exportMap + * @property {Map} rawExportMap + * @property {string=} namespaceExportSymbol + * @property {string} namespaceObjectName + * @property {boolean} interopNamespaceObjectUsed + * @property {string} interopNamespaceObjectName + * @property {boolean} interopNamespaceObject2Used + * @property {string} interopNamespaceObject2Name + * @property {boolean} interopDefaultAccessUsed + * @property {string} interopDefaultAccessName + */ + +/** + * @typedef {Object} ExternalModuleInfo + * @property {"external"} type + * @property {Module} module + * @property {RuntimeSpec | boolean} runtimeCondition + * @property {number} index + * @property {string} name + * @property {boolean} interopNamespaceObjectUsed + * @property {string} interopNamespaceObjectName + * @property {boolean} interopNamespaceObject2Used + * @property {string} interopNamespaceObject2Name + * @property {boolean} interopDefaultAccessUsed + * @property {string} interopDefaultAccessName + */ + +/** + * @typedef {Object} ReferenceToModuleInfo + * @property {"reference"} type + * @property {RuntimeSpec | boolean} runtimeCondition + * @property {ConcatenatedModuleInfo | ExternalModuleInfo} target + */ + +const RESERVED_NAMES = [ + // internal names (should always be renamed) + ConcatenationScope.DEFAULT_EXPORT, + ConcatenationScope.NAMESPACE_OBJECT_EXPORT, + + // keywords + "abstract,arguments,async,await,boolean,break,byte,case,catch,char,class,const,continue", + "debugger,default,delete,do,double,else,enum,eval,export,extends,false,final,finally,float", + "for,function,goto,if,implements,import,in,instanceof,int,interface,let,long,native,new,null", + "package,private,protected,public,return,short,static,super,switch,synchronized,this,throw", + "throws,transient,true,try,typeof,var,void,volatile,while,with,yield", + + // commonjs + "module,__dirname,__filename,exports", + + // js globals + "Array,Date,eval,function,hasOwnProperty,Infinity,isFinite,isNaN,isPrototypeOf,length,Math", + "NaN,name,Number,Object,prototype,String,toString,undefined,valueOf", + + // browser globals + "alert,all,anchor,anchors,area,assign,blur,button,checkbox,clearInterval,clearTimeout", + "clientInformation,close,closed,confirm,constructor,crypto,decodeURI,decodeURIComponent", + "defaultStatus,document,element,elements,embed,embeds,encodeURI,encodeURIComponent,escape", + "event,fileUpload,focus,form,forms,frame,innerHeight,innerWidth,layer,layers,link,location", + "mimeTypes,navigate,navigator,frames,frameRate,hidden,history,image,images,offscreenBuffering", + "open,opener,option,outerHeight,outerWidth,packages,pageXOffset,pageYOffset,parent,parseFloat", + "parseInt,password,pkcs11,plugin,prompt,propertyIsEnum,radio,reset,screenX,screenY,scroll", + "secure,select,self,setInterval,setTimeout,status,submit,taint,text,textarea,top,unescape", + "untaint,window", + + // window events + "onblur,onclick,onerror,onfocus,onkeydown,onkeypress,onkeyup,onmouseover,onload,onmouseup,onmousedown,onsubmit" +] + .join(",") + .split(","); + +const bySourceOrder = (a, b) => { + const aOrder = a.sourceOrder; + const bOrder = b.sourceOrder; + if (isNaN(aOrder)) { + if (!isNaN(bOrder)) { + return 1; + } + } else { + if (isNaN(bOrder)) { + return -1; + } + if (aOrder !== bOrder) { + return aOrder < bOrder ? -1 : 1; + } + } + return 0; +}; + +const joinIterableWithComma = iterable => { + // This is more performant than Array.from().join(", ") + // as it doesn't create an array + let str = ""; + let first = true; + for (const item of iterable) { + if (first) { + first = false; + } else { + str += ", "; + } + str += item; + } + return str; +}; + +/** + * @typedef {Object} ConcatenationEntry + * @property {"concatenated" | "external"} type + * @property {Module} module + * @property {RuntimeSpec | boolean} runtimeCondition + */ + +/** + * @param {ModuleGraph} moduleGraph the module graph + * @param {ModuleInfo} info module info + * @param {string[]} exportName exportName + * @param {Map} moduleToInfoMap moduleToInfoMap + * @param {RuntimeSpec} runtime for which runtime + * @param {RequestShortener} requestShortener the request shortener + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {Set} neededNamespaceObjects modules for which a namespace object should be generated + * @param {boolean} asCall asCall + * @param {boolean} strictHarmonyModule strictHarmonyModule + * @param {boolean | undefined} asiSafe asiSafe + * @param {Set} alreadyVisited alreadyVisited + * @returns {Binding} the final variable + */ +const getFinalBinding = ( + moduleGraph, + info, + exportName, + moduleToInfoMap, + runtime, + requestShortener, + runtimeTemplate, + neededNamespaceObjects, + asCall, + strictHarmonyModule, + asiSafe, + alreadyVisited = new Set() +) => { + const exportsType = info.module.getExportsType( + moduleGraph, + strictHarmonyModule + ); + if (exportName.length === 0) { + switch (exportsType) { + case "default-only": + info.interopNamespaceObject2Used = true; + return { + info, + rawName: info.interopNamespaceObject2Name, + ids: exportName, + exportName + }; + case "default-with-named": + info.interopNamespaceObjectUsed = true; + return { + info, + rawName: info.interopNamespaceObjectName, + ids: exportName, + exportName + }; + case "namespace": + case "dynamic": + break; + default: + throw new Error(`Unexpected exportsType ${exportsType}`); + } + } else { + switch (exportsType) { + case "namespace": + break; + case "default-with-named": + switch (exportName[0]) { + case "default": + exportName = exportName.slice(1); + break; + case "__esModule": + return { + info, + rawName: "/* __esModule */true", + ids: exportName.slice(1), + exportName + }; + } + break; + case "default-only": { + const exportId = exportName[0]; + if (exportId === "__esModule") { + return { + info, + rawName: "/* __esModule */true", + ids: exportName.slice(1), + exportName + }; + } + exportName = exportName.slice(1); + if (exportId !== "default") { + return { + info, + rawName: + "/* non-default import from default-exporting module */undefined", + ids: exportName, + exportName + }; + } + break; + } + case "dynamic": + switch (exportName[0]) { + case "default": { + exportName = exportName.slice(1); + info.interopDefaultAccessUsed = true; + const defaultExport = asCall + ? `${info.interopDefaultAccessName}()` + : asiSafe + ? `(${info.interopDefaultAccessName}())` + : asiSafe === false + ? `;(${info.interopDefaultAccessName}())` + : `${info.interopDefaultAccessName}.a`; + return { + info, + rawName: defaultExport, + ids: exportName, + exportName + }; + } + case "__esModule": + return { + info, + rawName: "/* __esModule */true", + ids: exportName.slice(1), + exportName + }; + } + break; + default: + throw new Error(`Unexpected exportsType ${exportsType}`); + } + } + if (exportName.length === 0) { + switch (info.type) { + case "concatenated": + neededNamespaceObjects.add(info); + return { + info, + rawName: info.namespaceObjectName, + ids: exportName, + exportName + }; + case "external": + return { info, rawName: info.name, ids: exportName, exportName }; + } + } + const exportsInfo = moduleGraph.getExportsInfo(info.module); + const exportInfo = exportsInfo.getExportInfo(exportName[0]); + if (alreadyVisited.has(exportInfo)) { + return { + info, + rawName: "/* circular reexport */ Object(function x() { x() }())", + ids: [], + exportName + }; + } + alreadyVisited.add(exportInfo); + switch (info.type) { + case "concatenated": { + const exportId = exportName[0]; + if (exportInfo.provided === false) { + // It's not provided, but it could be on the prototype + neededNamespaceObjects.add(info); + return { + info, + rawName: info.namespaceObjectName, + ids: exportName, + exportName + }; + } + const directExport = info.exportMap && info.exportMap.get(exportId); + if (directExport) { + const usedName = /** @type {string[]} */ (exportsInfo.getUsedName( + exportName, + runtime + )); + if (!usedName) { + return { + info, + rawName: "/* unused export */ undefined", + ids: exportName.slice(1), + exportName + }; + } + return { + info, + name: directExport, + ids: usedName.slice(1), + exportName + }; + } + const rawExport = info.rawExportMap && info.rawExportMap.get(exportId); + if (rawExport) { + return { + info, + rawName: rawExport, + ids: exportName.slice(1), + exportName + }; + } + const reexport = exportInfo.findTarget(moduleGraph, module => + moduleToInfoMap.has(module) + ); + if (reexport === false) { + throw new Error( + `Target module of reexport from '${info.module.readableIdentifier( + requestShortener + )}' is not part of the concatenation (export '${exportId}')\nModules in the concatenation:\n${Array.from( + moduleToInfoMap, + ([m, info]) => + ` * ${info.type} ${m.readableIdentifier(requestShortener)}` + ).join("\n")}` + ); + } + if (reexport) { + const refInfo = moduleToInfoMap.get(reexport.module); + return getFinalBinding( + moduleGraph, + refInfo, + reexport.export + ? [...reexport.export, ...exportName.slice(1)] + : exportName.slice(1), + moduleToInfoMap, + runtime, + requestShortener, + runtimeTemplate, + neededNamespaceObjects, + asCall, + info.module.buildMeta.strictHarmonyModule, + asiSafe, + alreadyVisited + ); + } + if (info.namespaceExportSymbol) { + const usedName = /** @type {string[]} */ (exportsInfo.getUsedName( + exportName, + runtime + )); + return { + info, + rawName: info.namespaceObjectName, + ids: usedName, + exportName + }; + } + throw new Error( + `Cannot get final name for export '${exportName.join( + "." + )}' of ${info.module.readableIdentifier(requestShortener)}` + ); + } + + case "external": { + const used = /** @type {string[]} */ (exportsInfo.getUsedName( + exportName, + runtime + )); + if (!used) { + return { + info, + rawName: "/* unused export */ undefined", + ids: exportName.slice(1), + exportName + }; + } + const comment = equals(used, exportName) + ? "" + : Template.toNormalComment(`${exportName.join(".")}`); + return { info, rawName: info.name + comment, ids: used, exportName }; + } + } +}; + +/** + * @param {ModuleGraph} moduleGraph the module graph + * @param {ModuleInfo} info module info + * @param {string[]} exportName exportName + * @param {Map} moduleToInfoMap moduleToInfoMap + * @param {RuntimeSpec} runtime for which runtime + * @param {RequestShortener} requestShortener the request shortener + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {Set} neededNamespaceObjects modules for which a namespace object should be generated + * @param {boolean} asCall asCall + * @param {boolean} callContext callContext + * @param {boolean} strictHarmonyModule strictHarmonyModule + * @param {boolean | undefined} asiSafe asiSafe + * @returns {string} the final name + */ +const getFinalName = ( + moduleGraph, + info, + exportName, + moduleToInfoMap, + runtime, + requestShortener, + runtimeTemplate, + neededNamespaceObjects, + asCall, + callContext, + strictHarmonyModule, + asiSafe +) => { + const binding = getFinalBinding( + moduleGraph, + info, + exportName, + moduleToInfoMap, + runtime, + requestShortener, + runtimeTemplate, + neededNamespaceObjects, + asCall, + strictHarmonyModule, + asiSafe + ); + { + const { ids, comment } = binding; + let reference; + let isPropertyAccess; + if ("rawName" in binding) { + reference = `${binding.rawName}${comment || ""}${propertyAccess(ids)}`; + isPropertyAccess = ids.length > 0; + } else { + const { info, name: exportId } = binding; + const name = info.internalNames.get(exportId); + if (!name) { + throw new Error( + `The export "${exportId}" in "${info.module.readableIdentifier( + requestShortener + )}" has no internal name (existing names: ${ + Array.from( + info.internalNames, + ([name, symbol]) => `${name}: ${symbol}` + ).join(", ") || "none" + })` + ); + } + reference = `${name}${comment || ""}${propertyAccess(ids)}`; + isPropertyAccess = ids.length > 1; + } + if (isPropertyAccess && asCall && callContext === false) { + return asiSafe + ? `(0,${reference})` + : asiSafe === false + ? `;(0,${reference})` + : `Object(${reference})`; + } + return reference; + } +}; + +const addScopeSymbols = (s, nameSet, scopeSet1, scopeSet2) => { + let scope = s; + while (scope) { + if (scopeSet1.has(scope)) break; + if (scopeSet2.has(scope)) break; + scopeSet1.add(scope); + for (const variable of scope.variables) { + nameSet.add(variable.name); + } + scope = scope.upper; + } +}; + +const getAllReferences = variable => { + let set = variable.references; + // Look for inner scope variables too (like in class Foo { t() { Foo } }) + const identifiers = new Set(variable.identifiers); + for (const scope of variable.scope.childScopes) { + for (const innerVar of scope.variables) { + if (innerVar.identifiers.some(id => identifiers.has(id))) { + set = set.concat(innerVar.references); + break; + } + } + } + return set; +}; + +const getPathInAst = (ast, node) => { + if (ast === node) { + return []; + } + + const nr = node.range; + + const enterNode = n => { + if (!n) return undefined; + const r = n.range; + if (r) { + if (r[0] <= nr[0] && r[1] >= nr[1]) { + const path = getPathInAst(n, node); + if (path) { + path.push(n); + return path; + } + } + } + return undefined; + }; + + if (Array.isArray(ast)) { + for (let i = 0; i < ast.length; i++) { + const enterResult = enterNode(ast[i]); + if (enterResult !== undefined) return enterResult; + } + } else if (ast && typeof ast === "object") { + const keys = Object.keys(ast); + for (let i = 0; i < keys.length; i++) { + const value = ast[keys[i]]; + if (Array.isArray(value)) { + const pathResult = getPathInAst(value, node); + if (pathResult !== undefined) return pathResult; + } else if (value && typeof value === "object") { + const enterResult = enterNode(value); + if (enterResult !== undefined) return enterResult; + } + } + } +}; + +const TYPES = new Set(["javascript"]); + +class ConcatenatedModule extends Module { + /** + * @param {Module} rootModule the root module of the concatenation + * @param {Set} modules all modules in the concatenation (including the root module) + * @param {RuntimeSpec} runtime the runtime + * @param {Object=} associatedObjectForCache object for caching + * @returns {ConcatenatedModule} the module + */ + static create(rootModule, modules, runtime, associatedObjectForCache) { + const identifier = ConcatenatedModule._createIdentifier( + rootModule, + modules, + associatedObjectForCache + ); + return new ConcatenatedModule({ + identifier, + rootModule, + modules, + runtime + }); + } + + /** + * @param {Object} options options + * @param {string} options.identifier the identifier of the module + * @param {Module=} options.rootModule the root module of the concatenation + * @param {RuntimeSpec} options.runtime the selected runtime + * @param {Set=} options.modules all concatenated modules + */ + constructor({ identifier, rootModule, modules, runtime }) { + super("javascript/esm", null, rootModule && rootModule.layer); + + // Info from Factory + /** @type {string} */ + this._identifier = identifier; + /** @type {Module} */ + this.rootModule = rootModule; + /** @type {Set} */ + this._modules = modules; + this._runtime = runtime; + this.factoryMeta = rootModule && rootModule.factoryMeta; + + // Caching + // TODO + } + + /** + * Assuming this module is in the cache. Update the (cached) module with + * the fresh module from the factory. Usually updates internal references + * and properties. + * @param {Module} module fresh module + * @returns {void} + */ + updateCacheModule(module) { + super.updateCacheModule(module); + const m = /** @type {ConcatenatedModule} */ (module); + this._identifier = m._identifier; + this.rootModule = m.rootModule; + this._modules = m._modules; + this._runtime = m._runtime; + } + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + get modules() { + return Array.from(this._modules); + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return this._identifier; + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return ( + this.rootModule.readableIdentifier(requestShortener) + + ` + ${this._modules.size - 1} modules` + ); + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + return this.rootModule.libIdent(options); + } + + /** + * @returns {string | null} absolute path which should be used for condition matching (usually the resource path) + */ + nameForCondition() { + return this.rootModule.nameForCondition(); + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConnectionState} how this module should be connected to referencing modules when consumed for side-effects only + */ + getSideEffectsConnectionState(moduleGraph) { + return this.rootModule.getSideEffectsConnectionState(moduleGraph); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + const { rootModule } = this; + this.buildInfo = { + strict: true, + cacheable: true, + moduleArgument: rootModule.buildInfo.moduleArgument, + exportsArgument: rootModule.buildInfo.exportsArgument, + fileDependencies: new LazySet(), + contextDependencies: new LazySet(), + missingDependencies: new LazySet(), + assets: undefined + }; + this.buildMeta = rootModule.buildMeta; + this.clearDependenciesAndBlocks(); + this.clearWarningsAndErrors(); + + for (const m of this._modules) { + // populate cacheable + if (!m.buildInfo.cacheable) { + this.buildInfo.cacheable = false; + } + + // populate dependencies + for (const d of m.dependencies.filter( + dep => + !(dep instanceof HarmonyImportDependency) || + !this._modules.has(compilation.moduleGraph.getModule(dep)) + )) { + this.dependencies.push(d); + } + // populate blocks + for (const d of m.blocks) { + this.blocks.push(d); + } + + // populate warnings + const warnings = m.getWarnings(); + if (warnings !== undefined) { + for (const warning of warnings) { + this.addWarning(warning); + } + } + + // populate errors + const errors = m.getErrors(); + if (errors !== undefined) { + for (const error of errors) { + this.addError(error); + } + } + + // populate assets + if (m.buildInfo.assets) { + if (this.buildInfo.assets === undefined) { + this.buildInfo.assets = Object.create(null); + } + Object.assign(this.buildInfo.assets, m.buildInfo.assets); + } + if (m.buildInfo.assetsInfo) { + if (this.buildInfo.assetsInfo === undefined) { + this.buildInfo.assetsInfo = new Map(); + } + for (const [key, value] of m.buildInfo.assetsInfo) { + this.buildInfo.assetsInfo.set(key, value); + } + } + } + callback(); + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + // Guess size from embedded modules + let size = 0; + for (const module of this._modules) { + size += module.size(type); + } + return size; + } + + /** + * @private + * @param {Module} rootModule the root of the concatenation + * @param {Set} modulesSet a set of modules which should be concatenated + * @param {RuntimeSpec} runtime for this runtime + * @param {ModuleGraph} moduleGraph the module graph + * @returns {ConcatenationEntry[]} concatenation list + */ + _createConcatenationList(rootModule, modulesSet, runtime, moduleGraph) { + /** @type {ConcatenationEntry[]} */ + const list = []; + /** @type {Map} */ + const existingEntries = new Map(); + + /** + * @param {Module} module a module + * @returns {Iterable<{ connection: ModuleGraphConnection, runtimeCondition: RuntimeSpec | true }>} imported modules in order + */ + const getConcatenatedImports = module => { + let connections = Array.from(moduleGraph.getOutgoingConnections(module)); + if (module === rootModule) { + for (const c of moduleGraph.getOutgoingConnections(this)) + connections.push(c); + } + const references = connections + .filter(connection => { + if (!(connection.dependency instanceof HarmonyImportDependency)) + return false; + return ( + connection && + connection.resolvedOriginModule === module && + connection.module && + connection.isTargetActive(runtime) + ); + }) + .map(connection => ({ + connection, + sourceOrder: /** @type {HarmonyImportDependency} */ (connection.dependency) + .sourceOrder + })); + references.sort( + concatComparators(bySourceOrder, keepOriginalOrder(references)) + ); + /** @type {Map} */ + const referencesMap = new Map(); + for (const { connection } of references) { + const runtimeCondition = filterRuntime(runtime, r => + connection.isTargetActive(r) + ); + if (runtimeCondition === false) continue; + const module = connection.module; + const entry = referencesMap.get(module); + if (entry === undefined) { + referencesMap.set(module, { connection, runtimeCondition }); + continue; + } + entry.runtimeCondition = mergeRuntimeConditionNonFalse( + entry.runtimeCondition, + runtimeCondition, + runtime + ); + } + return referencesMap.values(); + }; + + /** + * @param {ModuleGraphConnection} connection graph connection + * @param {RuntimeSpec | true} runtimeCondition runtime condition + * @returns {void} + */ + const enterModule = (connection, runtimeCondition) => { + const module = connection.module; + if (!module) return; + const existingEntry = existingEntries.get(module); + if (existingEntry === true) { + return; + } + if (modulesSet.has(module)) { + existingEntries.set(module, true); + if (runtimeCondition !== true) { + throw new Error( + `Cannot runtime-conditional concatenate a module (${module.identifier()} in ${this.rootModule.identifier()}, ${runtimeConditionToString( + runtimeCondition + )}). This should not happen.` + ); + } + const imports = getConcatenatedImports(module); + for (const { connection, runtimeCondition } of imports) + enterModule(connection, runtimeCondition); + list.push({ + type: "concatenated", + module: connection.module, + runtimeCondition + }); + } else { + if (existingEntry !== undefined) { + const reducedRuntimeCondition = subtractRuntimeCondition( + runtimeCondition, + existingEntry, + runtime + ); + if (reducedRuntimeCondition === false) return; + runtimeCondition = reducedRuntimeCondition; + existingEntries.set( + connection.module, + mergeRuntimeConditionNonFalse( + existingEntry, + runtimeCondition, + runtime + ) + ); + } else { + existingEntries.set(connection.module, runtimeCondition); + } + if (list.length > 0) { + const lastItem = list[list.length - 1]; + if ( + lastItem.type === "external" && + lastItem.module === connection.module + ) { + lastItem.runtimeCondition = mergeRuntimeCondition( + lastItem.runtimeCondition, + runtimeCondition, + runtime + ); + return; + } + } + list.push({ + type: "external", + get module() { + // We need to use a getter here, because the module in the dependency + // could be replaced by some other process (i. e. also replaced with a + // concatenated module) + return connection.module; + }, + runtimeCondition + }); + } + }; + + existingEntries.set(rootModule, true); + const imports = getConcatenatedImports(rootModule); + for (const { connection, runtimeCondition } of imports) + enterModule(connection, runtimeCondition); + list.push({ + type: "concatenated", + module: rootModule, + runtimeCondition: true + }); + + return list; + } + + static _createIdentifier(rootModule, modules, associatedObjectForCache) { + const cachedContextify = contextify.bindContextCache( + rootModule.context, + associatedObjectForCache + ); + let identifiers = []; + for (const module of modules) { + identifiers.push(cachedContextify(module.identifier())); + } + identifiers.sort(); + const hash = createHash("md4"); + hash.update(identifiers.join(" ")); + return rootModule.identifier() + "|" + hash.digest("hex"); + } + + /** + * @param {LazySet} fileDependencies set where file dependencies are added to + * @param {LazySet} contextDependencies set where context dependencies are added to + * @param {LazySet} missingDependencies set where missing dependencies are added to + * @param {LazySet} buildDependencies set where build dependencies are added to + */ + addCacheDependencies( + fileDependencies, + contextDependencies, + missingDependencies, + buildDependencies + ) { + for (const module of this._modules) { + module.addCacheDependencies( + fileDependencies, + contextDependencies, + missingDependencies, + buildDependencies + ); + } + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration({ + dependencyTemplates, + runtimeTemplate, + moduleGraph, + chunkGraph, + runtime: generationRuntime + }) { + /** @type {Set} */ + const runtimeRequirements = new Set(); + const runtime = intersectRuntime(generationRuntime, this._runtime); + + const requestShortener = runtimeTemplate.requestShortener; + // Meta info for each module + const [modulesWithInfo, moduleToInfoMap] = this._getModulesWithInfo( + moduleGraph, + runtime + ); + + // Set with modules that need a generated namespace object + /** @type {Set} */ + const neededNamespaceObjects = new Set(); + + // Generate source code and analyse scopes + // Prepare a ReplaceSource for the final source + for (const info of moduleToInfoMap.values()) { + this._analyseModule( + moduleToInfoMap, + info, + dependencyTemplates, + runtimeTemplate, + moduleGraph, + chunkGraph, + runtime + ); + } + + // List of all used names to avoid conflicts + const allUsedNames = new Set(RESERVED_NAMES); + + // List of additional names in scope for module references + /** @type {Map, alreadyCheckedScopes: Set }>} */ + const usedNamesInScopeInfo = new Map(); + /** + * @param {string} module module identifier + * @param {string} id export id + * @returns {{ usedNames: Set, alreadyCheckedScopes: Set }} info + */ + const getUsedNamesInScopeInfo = (module, id) => { + const key = `${module}-${id}`; + let info = usedNamesInScopeInfo.get(key); + if (info === undefined) { + info = { + usedNames: new Set(), + alreadyCheckedScopes: new Set() + }; + usedNamesInScopeInfo.set(key, info); + } + return info; + }; + + // Set of already checked scopes + const ignoredScopes = new Set(); + + // get all global names + for (const info of modulesWithInfo) { + if (info.type === "concatenated") { + // ignore symbols from moduleScope + if (info.moduleScope) { + ignoredScopes.add(info.moduleScope); + } + + // The super class expression in class scopes behaves weird + // We get ranges of all super class expressions to make + // renaming to work correctly + const superClassCache = new WeakMap(); + const getSuperClassExpressions = scope => { + const cacheEntry = superClassCache.get(scope); + if (cacheEntry !== undefined) return cacheEntry; + const superClassExpressions = []; + for (const childScope of scope.childScopes) { + if (childScope.type !== "class") continue; + const block = childScope.block; + if ( + (block.type === "ClassDeclaration" || + block.type === "ClassExpression") && + block.superClass + ) { + superClassExpressions.push({ + range: block.superClass.range, + variables: childScope.variables + }); + } + } + superClassCache.set(scope, superClassExpressions); + return superClassExpressions; + }; + + // add global symbols + if (info.globalScope) { + for (const reference of info.globalScope.through) { + const name = reference.identifier.name; + if (ConcatenationScope.isModuleReference(name)) { + const match = ConcatenationScope.matchModuleReference(name); + if (!match) continue; + const referencedInfo = modulesWithInfo[match.index]; + if (referencedInfo.type === "reference") + throw new Error("Module reference can't point to a reference"); + const binding = getFinalBinding( + moduleGraph, + referencedInfo, + match.ids, + moduleToInfoMap, + runtime, + requestShortener, + runtimeTemplate, + neededNamespaceObjects, + false, + info.module.buildMeta.strictHarmonyModule, + true + ); + if (!binding.ids) continue; + const { + usedNames, + alreadyCheckedScopes + } = getUsedNamesInScopeInfo( + binding.info.module.identifier(), + "name" in binding ? binding.name : "" + ); + for (const expr of getSuperClassExpressions(reference.from)) { + if ( + expr.range[0] <= reference.identifier.range[0] && + expr.range[1] >= reference.identifier.range[1] + ) { + for (const variable of expr.variables) { + usedNames.add(variable.name); + } + } + } + addScopeSymbols( + reference.from, + usedNames, + alreadyCheckedScopes, + ignoredScopes + ); + } else { + allUsedNames.add(name); + } + } + } + } + } + + // generate names for symbols + for (const info of moduleToInfoMap.values()) { + const { usedNames: namespaceObjectUsedNames } = getUsedNamesInScopeInfo( + info.module.identifier(), + "" + ); + switch (info.type) { + case "concatenated": { + for (const variable of info.moduleScope.variables) { + const name = variable.name; + const { usedNames, alreadyCheckedScopes } = getUsedNamesInScopeInfo( + info.module.identifier(), + name + ); + if (allUsedNames.has(name) || usedNames.has(name)) { + const references = getAllReferences(variable); + for (const ref of references) { + addScopeSymbols( + ref.from, + usedNames, + alreadyCheckedScopes, + ignoredScopes + ); + } + const newName = this.findNewName( + name, + allUsedNames, + usedNames, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(newName); + info.internalNames.set(name, newName); + const source = info.source; + const allIdentifiers = new Set( + references.map(r => r.identifier).concat(variable.identifiers) + ); + for (const identifier of allIdentifiers) { + const r = identifier.range; + const path = getPathInAst(info.ast, identifier); + if ( + path && + path.length > 1 && + path[1].type === "Property" && + path[1].shorthand + ) { + source.insert(r[1], `: ${newName}`); + } else { + source.replace(r[0], r[1] - 1, newName); + } + } + } else { + allUsedNames.add(name); + info.internalNames.set(name, name); + } + } + let namespaceObjectName; + if (info.namespaceExportSymbol) { + namespaceObjectName = info.internalNames.get( + info.namespaceExportSymbol + ); + } else { + namespaceObjectName = this.findNewName( + "namespaceObject", + allUsedNames, + namespaceObjectUsedNames, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(namespaceObjectName); + } + info.namespaceObjectName = namespaceObjectName; + break; + } + case "external": { + const externalName = this.findNewName( + "", + allUsedNames, + namespaceObjectUsedNames, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(externalName); + info.name = externalName; + break; + } + } + if (info.module.buildMeta.exportsType !== "namespace") { + const externalNameInterop = this.findNewName( + "namespaceObject", + allUsedNames, + namespaceObjectUsedNames, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(externalNameInterop); + info.interopNamespaceObjectName = externalNameInterop; + } + if ( + info.module.buildMeta.exportsType === "default" && + info.module.buildMeta.defaultObject !== "redirect" + ) { + const externalNameInterop = this.findNewName( + "namespaceObject2", + allUsedNames, + namespaceObjectUsedNames, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(externalNameInterop); + info.interopNamespaceObject2Name = externalNameInterop; + } + if ( + info.module.buildMeta.exportsType === "dynamic" || + !info.module.buildMeta.exportsType + ) { + const externalNameInterop = this.findNewName( + "default", + allUsedNames, + namespaceObjectUsedNames, + info.module.readableIdentifier(requestShortener) + ); + allUsedNames.add(externalNameInterop); + info.interopDefaultAccessName = externalNameInterop; + } + } + + // Find and replace references to modules + for (const info of moduleToInfoMap.values()) { + if (info.type === "concatenated") { + for (const reference of info.globalScope.through) { + const name = reference.identifier.name; + const match = ConcatenationScope.matchModuleReference(name); + if (match) { + const referencedInfo = modulesWithInfo[match.index]; + if (referencedInfo.type === "reference") + throw new Error("Module reference can't point to a reference"); + const finalName = getFinalName( + moduleGraph, + referencedInfo, + match.ids, + moduleToInfoMap, + runtime, + requestShortener, + runtimeTemplate, + neededNamespaceObjects, + match.call, + !match.directImport, + info.module.buildMeta.strictHarmonyModule, + match.asiSafe + ); + const r = reference.identifier.range; + const source = info.source; + // range is extended by 2 chars to cover the appended "._" + source.replace(r[0], r[1] + 1, finalName); + } + } + } + } + + // Map with all root exposed used exports + /** @type {Map} */ + const exportsMap = new Map(); + + // Set with all root exposed unused exports + /** @type {Set} */ + const unusedExports = new Set(); + + const rootInfo = /** @type {ConcatenatedModuleInfo} */ (moduleToInfoMap.get( + this.rootModule + )); + const strictHarmonyModule = rootInfo.module.buildMeta.strictHarmonyModule; + const exportsInfo = moduleGraph.getExportsInfo(rootInfo.module); + for (const exportInfo of exportsInfo.orderedExports) { + const name = exportInfo.name; + if (exportInfo.provided === false) continue; + const used = exportInfo.getUsedName(undefined, runtime); + if (!used) { + unusedExports.add(name); + continue; + } + exportsMap.set(used, requestShortener => { + try { + const finalName = getFinalName( + moduleGraph, + rootInfo, + [name], + moduleToInfoMap, + runtime, + requestShortener, + runtimeTemplate, + neededNamespaceObjects, + false, + false, + strictHarmonyModule, + true + ); + return `/* ${ + exportInfo.isReexport() ? "reexport" : "binding" + } */ ${finalName}`; + } catch (e) { + e.message += `\nwhile generating the root export '${name}' (used name: '${used}')`; + throw e; + } + }); + } + + const result = new ConcatSource(); + + // add harmony compatibility flag (must be first because of possible circular dependencies) + if ( + moduleGraph.getExportsInfo(this).otherExportsInfo.getUsed(runtime) !== + UsageState.Unused + ) { + result.add(`// ESM COMPAT FLAG\n`); + result.add( + runtimeTemplate.defineEsModuleFlagStatement({ + exportsArgument: this.exportsArgument, + runtimeRequirements + }) + ); + } + + // define exports + if (exportsMap.size > 0) { + runtimeRequirements.add(RuntimeGlobals.exports); + runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); + const definitions = []; + for (const [key, value] of exportsMap) { + definitions.push( + `\n ${JSON.stringify(key)}: ${runtimeTemplate.returningFunction( + value(requestShortener) + )}` + ); + } + result.add(`\n// EXPORTS\n`); + result.add( + `${RuntimeGlobals.definePropertyGetters}(${ + this.exportsArgument + }, {${definitions.join(",")}\n});\n` + ); + } + + // list unused exports + if (unusedExports.size > 0) { + result.add( + `\n// UNUSED EXPORTS: ${joinIterableWithComma(unusedExports)}\n` + ); + } + + // generate namespace objects + const namespaceObjectSources = new Map(); + for (const info of neededNamespaceObjects) { + if (info.namespaceExportSymbol) continue; + const nsObj = []; + const exportsInfo = moduleGraph.getExportsInfo(info.module); + for (const exportInfo of exportsInfo.orderedExports) { + if (exportInfo.provided === false) continue; + const usedName = exportInfo.getUsedName(undefined, runtime); + if (usedName) { + const finalName = getFinalName( + moduleGraph, + info, + [exportInfo.name], + moduleToInfoMap, + runtime, + requestShortener, + runtimeTemplate, + neededNamespaceObjects, + false, + undefined, + info.module.buildMeta.strictHarmonyModule, + true + ); + nsObj.push( + `\n ${JSON.stringify( + usedName + )}: ${runtimeTemplate.returningFunction(finalName)}` + ); + } + } + const name = info.namespaceObjectName; + const defineGetters = + nsObj.length > 0 + ? `${RuntimeGlobals.definePropertyGetters}(${name}, {${nsObj.join( + "," + )}\n});\n` + : ""; + if (nsObj.length > 0) + runtimeRequirements.add(RuntimeGlobals.definePropertyGetters); + namespaceObjectSources.set( + info, + ` +// NAMESPACE OBJECT: ${info.module.readableIdentifier(requestShortener)} +var ${name} = {}; +${RuntimeGlobals.makeNamespaceObject}(${name}); +${defineGetters}` + ); + runtimeRequirements.add(RuntimeGlobals.makeNamespaceObject); + } + + // define required namespace objects (must be before evaluation modules) + for (const info of modulesWithInfo) { + if (info.type === "concatenated") { + const source = namespaceObjectSources.get(info); + if (!source) continue; + result.add(source); + } + } + + // evaluate modules in order + for (const rawInfo of modulesWithInfo) { + let name; + let isConditional = false; + const info = rawInfo.type === "reference" ? rawInfo.target : rawInfo; + switch (info.type) { + case "concatenated": { + result.add( + `\n;// CONCATENATED MODULE: ${info.module.readableIdentifier( + requestShortener + )}\n` + ); + result.add(info.source); + if (info.runtimeRequirements) { + for (const r of info.runtimeRequirements) { + runtimeRequirements.add(r); + } + } + name = info.namespaceObjectName; + break; + } + case "external": { + result.add( + `\n// EXTERNAL MODULE: ${info.module.readableIdentifier( + requestShortener + )}\n` + ); + runtimeRequirements.add(RuntimeGlobals.require); + const { + runtimeCondition + } = /** @type {ExternalModuleInfo | ReferenceToModuleInfo} */ (rawInfo); + const condition = runtimeTemplate.runtimeConditionExpression({ + chunkGraph, + runtimeCondition, + runtime, + runtimeRequirements + }); + if (condition !== "true") { + isConditional = true; + result.add(`if (${condition}) {\n`); + } + result.add( + `var ${info.name} = __webpack_require__(${JSON.stringify( + chunkGraph.getModuleId(info.module) + )});` + ); + name = info.name; + break; + } + default: + // @ts-expect-error never is expected here + throw new Error(`Unsupported concatenation entry type ${info.type}`); + } + if (info.interopNamespaceObjectUsed) { + runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); + result.add( + `\nvar ${info.interopNamespaceObjectName} = /*#__PURE__*/${RuntimeGlobals.createFakeNamespaceObject}(${name}, 2);` + ); + } + if (info.interopNamespaceObject2Used) { + runtimeRequirements.add(RuntimeGlobals.createFakeNamespaceObject); + result.add( + `\nvar ${info.interopNamespaceObject2Name} = /*#__PURE__*/${RuntimeGlobals.createFakeNamespaceObject}(${name});` + ); + } + if (info.interopDefaultAccessUsed) { + runtimeRequirements.add(RuntimeGlobals.compatGetDefaultExport); + result.add( + `\nvar ${info.interopDefaultAccessName} = /*#__PURE__*/${RuntimeGlobals.compatGetDefaultExport}(${name});` + ); + } + if (isConditional) { + result.add("\n}"); + } + } + + /** @type {CodeGenerationResult} */ + const resultEntry = { + sources: new Map([["javascript", new CachedSource(result)]]), + runtimeRequirements + }; + + return resultEntry; + } + + /** + * @param {Map} modulesMap modulesMap + * @param {ModuleInfo} info info + * @param {DependencyTemplates} dependencyTemplates dependencyTemplates + * @param {RuntimeTemplate} runtimeTemplate runtimeTemplate + * @param {ModuleGraph} moduleGraph moduleGraph + * @param {ChunkGraph} chunkGraph chunkGraph + * @param {RuntimeSpec} runtime runtime + */ + _analyseModule( + modulesMap, + info, + dependencyTemplates, + runtimeTemplate, + moduleGraph, + chunkGraph, + runtime + ) { + if (info.type === "concatenated") { + const m = info.module; + try { + // Create a concatenation scope to track and capture information + const concatenationScope = new ConcatenationScope(modulesMap, info); + + // TODO cache codeGeneration results + const codeGenResult = m.codeGeneration({ + dependencyTemplates, + runtimeTemplate, + moduleGraph, + chunkGraph, + runtime, + concatenationScope + }); + const source = codeGenResult.sources.get("javascript"); + const code = source.source().toString(); + let ast; + try { + ast = JavascriptParser._parse(code, { + sourceType: "module" + }); + } catch (err) { + if ( + err.loc && + typeof err.loc === "object" && + typeof err.loc.line === "number" + ) { + const lineNumber = err.loc.line; + const lines = code.split("\n"); + err.message += + "\n| " + + lines + .slice(Math.max(0, lineNumber - 3), lineNumber + 2) + .join("\n| "); + } + throw err; + } + const scopeManager = eslintScope.analyze(ast, { + ecmaVersion: 6, + sourceType: "module", + optimistic: true, + ignoreEval: true, + impliedStrict: true + }); + const globalScope = scopeManager.acquire(ast); + const moduleScope = globalScope.childScopes[0]; + const resultSource = new ReplaceSource(source); + info.runtimeRequirements = codeGenResult.runtimeRequirements; + info.ast = ast; + info.internalSource = source; + info.source = resultSource; + info.globalScope = globalScope; + info.moduleScope = moduleScope; + } catch (err) { + err.message += `\nwhile analysing module ${m.identifier()} for concatenation`; + throw err; + } + } + } + + /** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {DependencyTemplates} dependencyTemplates dependency templates + * @param {RuntimeSpec} runtime the runtime + * @returns {string} hash + */ + _getHashDigest(chunkGraph, dependencyTemplates, runtime) { + const hash = chunkGraph.getModuleHash(this, runtime); + const dtHash = dependencyTemplates.getHash(); + return `${hash}-${dtHash}`; + } + + /** + * @param {ModuleGraph} moduleGraph the module graph + * @param {RuntimeSpec} runtime the runtime + * @returns {[ModuleInfoOrReference[], Map]} module info items + */ + _getModulesWithInfo(moduleGraph, runtime) { + const orderedConcatenationList = this._createConcatenationList( + this.rootModule, + this._modules, + runtime, + moduleGraph + ); + /** @type {Map} */ + const map = new Map(); + const list = orderedConcatenationList.map((info, index) => { + let item = map.get(info.module); + if (item === undefined) { + switch (info.type) { + case "concatenated": + item = { + type: "concatenated", + module: info.module, + index, + ast: undefined, + internalSource: undefined, + runtimeRequirements: undefined, + source: undefined, + globalScope: undefined, + moduleScope: undefined, + internalNames: new Map(), + exportMap: undefined, + rawExportMap: undefined, + namespaceExportSymbol: undefined, + namespaceObjectName: undefined, + interopNamespaceObjectUsed: false, + interopNamespaceObjectName: undefined, + interopNamespaceObject2Used: false, + interopNamespaceObject2Name: undefined, + interopDefaultAccessUsed: false, + interopDefaultAccessName: undefined + }; + break; + case "external": + item = { + type: "external", + module: info.module, + runtimeCondition: info.runtimeCondition, + index, + name: undefined, + interopNamespaceObjectUsed: false, + interopNamespaceObjectName: undefined, + interopNamespaceObject2Used: false, + interopNamespaceObject2Name: undefined, + interopDefaultAccessUsed: false, + interopDefaultAccessName: undefined + }; + break; + default: + throw new Error( + `Unsupported concatenation entry type ${info.type}` + ); + } + map.set(item.module, item); + return item; + } else { + /** @type {ReferenceToModuleInfo} */ + const ref = { + type: "reference", + runtimeCondition: info.runtimeCondition, + target: item + }; + return ref; + } + }); + return [list, map]; + } + + findNewName(oldName, usedNamed1, usedNamed2, extraInfo) { + let name = oldName; + + if (name === ConcatenationScope.DEFAULT_EXPORT) { + name = ""; + } + if (name === ConcatenationScope.NAMESPACE_OBJECT_EXPORT) { + name = "namespaceObject"; + } + + // Remove uncool stuff + extraInfo = extraInfo.replace( + /\.+\/|(\/index)?\.([a-zA-Z0-9]{1,4})($|\s|\?)|\s*\+\s*\d+\s*modules/g, + "" + ); + + const splittedInfo = extraInfo.split("/"); + while (splittedInfo.length) { + name = splittedInfo.pop() + (name ? "_" + name : ""); + const nameIdent = Template.toIdentifier(name); + if ( + !usedNamed1.has(nameIdent) && + (!usedNamed2 || !usedNamed2.has(nameIdent)) + ) + return nameIdent; + } + + let i = 0; + let nameWithNumber = Template.toIdentifier(`${name}_${i}`); + while ( + usedNamed1.has(nameWithNumber) || + (usedNamed2 && usedNamed2.has(nameWithNumber)) + ) { + i++; + nameWithNumber = Template.toIdentifier(`${name}_${i}`); + } + return nameWithNumber; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + const { chunkGraph, runtime } = context; + for (const info of this._createConcatenationList( + this.rootModule, + this._modules, + intersectRuntime(runtime, this._runtime), + chunkGraph.moduleGraph + )) { + switch (info.type) { + case "concatenated": + info.module.updateHash(hash, context); + break; + case "external": + hash.update(`${chunkGraph.getModuleId(info.module)}`); + // TODO runtimeCondition + break; + } + } + super.updateHash(hash, context); + } + + static deserialize(context) { + const obj = new ConcatenatedModule({ + identifier: undefined, + rootModule: undefined, + modules: undefined, + runtime: undefined + }); + obj.deserialize(context); + return obj; + } +} + +makeSerializable(ConcatenatedModule, "webpack/lib/optimize/ConcatenatedModule"); + +module.exports = ConcatenatedModule; + + +/***/ }), + +/***/ 38073: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { STAGE_BASIC } = __webpack_require__(90412); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {import("../Compiler")} Compiler */ + +class EnsureChunkConditionsPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "EnsureChunkConditionsPlugin", + compilation => { + const handler = chunks => { + const chunkGraph = compilation.chunkGraph; + // These sets are hoisted here to save memory + // They are cleared at the end of every loop + /** @type {Set} */ + const sourceChunks = new Set(); + /** @type {Set} */ + const chunkGroups = new Set(); + for (const module of compilation.modules) { + for (const chunk of chunkGraph.getModuleChunksIterable(module)) { + if (!module.chunkCondition(chunk, compilation)) { + sourceChunks.add(chunk); + for (const group of chunk.groupsIterable) { + chunkGroups.add(group); + } + } + } + if (sourceChunks.size === 0) continue; + /** @type {Set} */ + const targetChunks = new Set(); + chunkGroupLoop: for (const chunkGroup of chunkGroups) { + // Can module be placed in a chunk of this group? + for (const chunk of chunkGroup.chunks) { + if (module.chunkCondition(chunk, compilation)) { + targetChunks.add(chunk); + continue chunkGroupLoop; + } + } + // We reached the entrypoint: fail + if (chunkGroup.isInitial()) { + throw new Error( + "Cannot fullfil chunk condition of " + module.identifier() + ); + } + // Try placing in all parents + for (const group of chunkGroup.parentsIterable) { + chunkGroups.add(group); + } + } + for (const sourceChunk of sourceChunks) { + chunkGraph.disconnectChunkAndModule(sourceChunk, module); + } + for (const targetChunk of targetChunks) { + chunkGraph.connectChunkAndModule(targetChunk, module); + } + sourceChunks.clear(); + chunkGroups.clear(); + } + }; + compilation.hooks.optimizeChunks.tap( + { + name: "EnsureChunkConditionsPlugin", + stage: STAGE_BASIC + }, + handler + ); + } + ); + } +} +module.exports = EnsureChunkConditionsPlugin; + + +/***/ }), + +/***/ 12625: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ + +class FlagIncludedChunksPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("FlagIncludedChunksPlugin", compilation => { + compilation.hooks.optimizeChunkIds.tap( + "FlagIncludedChunksPlugin", + chunks => { + const chunkGraph = compilation.chunkGraph; + + // prepare two bit integers for each module + // 2^31 is the max number represented as SMI in v8 + // we want the bits distributed this way: + // the bit 2^31 is pretty rar and only one module should get it + // so it has a probability of 1 / modulesCount + // the first bit (2^0) is the easiest and every module could get it + // if it doesn't get a better bit + // from bit 2^n to 2^(n+1) there is a probability of p + // so 1 / modulesCount == p^31 + // <=> p = sqrt31(1 / modulesCount) + // so we use a modulo of 1 / sqrt31(1 / modulesCount) + /** @type {WeakMap} */ + const moduleBits = new WeakMap(); + const modulesCount = compilation.modules.size; + + // precalculate the modulo values for each bit + const modulo = 1 / Math.pow(1 / modulesCount, 1 / 31); + const modulos = Array.from( + { length: 31 }, + (x, i) => Math.pow(modulo, i) | 0 + ); + + // iterate all modules to generate bit values + let i = 0; + for (const module of compilation.modules) { + let bit = 30; + while (i % modulos[bit] !== 0) { + bit--; + } + moduleBits.set(module, 1 << bit); + i++; + } + + // iterate all chunks to generate bitmaps + /** @type {WeakMap} */ + const chunkModulesHash = new WeakMap(); + for (const chunk of chunks) { + let hash = 0; + for (const module of chunkGraph.getChunkModulesIterable(chunk)) { + hash |= moduleBits.get(module); + } + chunkModulesHash.set(chunk, hash); + } + + for (const chunkA of chunks) { + const chunkAHash = chunkModulesHash.get(chunkA); + const chunkAModulesCount = chunkGraph.getNumberOfChunkModules( + chunkA + ); + if (chunkAModulesCount === 0) continue; + let bestModule = undefined; + for (const module of chunkGraph.getChunkModulesIterable(chunkA)) { + if ( + bestModule === undefined || + chunkGraph.getNumberOfModuleChunks(bestModule) > + chunkGraph.getNumberOfModuleChunks(module) + ) + bestModule = module; + } + loopB: for (const chunkB of chunkGraph.getModuleChunksIterable( + bestModule + )) { + // as we iterate the same iterables twice + // skip if we find ourselves + if (chunkA === chunkB) continue; + + const chunkBModulesCount = chunkGraph.getNumberOfChunkModules( + chunkB + ); + + // ids for empty chunks are not included + if (chunkBModulesCount === 0) continue; + + // instead of swapping A and B just bail + // as we loop twice the current A will be B and B then A + if (chunkAModulesCount > chunkBModulesCount) continue; + + // is chunkA in chunkB? + + // we do a cheap check for the hash value + const chunkBHash = chunkModulesHash.get(chunkB); + if ((chunkBHash & chunkAHash) !== chunkAHash) continue; + + // compare all modules + for (const m of chunkGraph.getChunkModulesIterable(chunkA)) { + if (!chunkGraph.isModuleInChunk(m, chunkB)) continue loopB; + } + chunkB.ids.push(chunkA.id); + } + } + } + ); + }); + } +} +module.exports = FlagIncludedChunksPlugin; + + +/***/ }), + +/***/ 76094: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sergey Melyukov @smelukov +*/ + + + +/** @typedef {import("estree").Node} AnyNode */ +/** @typedef {import("../Parser").ParserState} ParserState */ +/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ + +/** @typedef {Map | true>} InnerGraph */ +/** @typedef {function(boolean | Set | undefined): void} UsageCallback */ + +/** + * @typedef {Object} StateObject + * @property {InnerGraph} innerGraph + * @property {TopLevelSymbol=} currentTopLevelSymbol + * @property {Map>} usageCallbackMap + */ + +/** @typedef {false|StateObject} State */ + +/** @type {WeakMap} */ +const parserStateMap = new WeakMap(); +const topLevelSymbolTag = Symbol("top level symbol"); + +/** + * @param {ParserState} parserState parser state + * @returns {State} state + */ +function getState(parserState) { + return parserStateMap.get(parserState); +} + +/** + * @param {ParserState} parserState parser state + * @returns {void} + */ +exports.bailout = parserState => { + parserStateMap.set(parserState, false); +}; + +/** + * @param {ParserState} parserState parser state + * @returns {void} + */ +exports.enable = parserState => { + const state = parserStateMap.get(parserState); + if (state === false) { + return; + } + parserStateMap.set(parserState, { + innerGraph: new Map(), + currentTopLevelSymbol: undefined, + usageCallbackMap: new Map() + }); +}; + +/** + * @param {ParserState} parserState parser state + * @returns {boolean} true, when enabled + */ +exports.isEnabled = parserState => { + const state = parserStateMap.get(parserState); + return !!state; +}; + +/** + * @param {ParserState} state parser state + * @param {TopLevelSymbol} symbol the symbol + * @param {string | TopLevelSymbol | true} usage usage data + * @returns {void} + */ +exports.addUsage = (state, symbol, usage) => { + const innerGraphState = getState(state); + + if (innerGraphState) { + const { innerGraph } = innerGraphState; + const info = innerGraph.get(symbol); + if (usage === true) { + innerGraph.set(symbol, true); + } else if (info === undefined) { + innerGraph.set(symbol, new Set([usage])); + } else if (info !== true) { + info.add(usage); + } + } +}; + +/** + * @param {JavascriptParser} parser the parser + * @param {string} name name of variable + * @param {string | TopLevelSymbol | true} usage usage data + * @returns {void} + */ +exports.addVariableUsage = (parser, name, usage) => { + const symbol = /** @type {TopLevelSymbol} */ (parser.getTagData( + name, + topLevelSymbolTag + )); + if (symbol) { + exports.addUsage(parser.state, symbol, usage); + } +}; + +/** + * @param {ParserState} state parser state + * @returns {void} + */ +exports.inferDependencyUsage = state => { + const innerGraphState = getState(state); + + if (!innerGraphState) { + return; + } + + const { innerGraph, usageCallbackMap } = innerGraphState; + const processed = new Map(); + // flatten graph to terminal nodes (string, undefined or true) + const nonTerminal = new Set(innerGraph.keys()); + while (nonTerminal.size > 0) { + for (const key of nonTerminal) { + /** @type {Set | true} */ + let newSet = new Set(); + let isTerminal = true; + const value = innerGraph.get(key); + let alreadyProcessed = processed.get(key); + if (alreadyProcessed === undefined) { + alreadyProcessed = new Set(); + processed.set(key, alreadyProcessed); + } + if (value !== true && value !== undefined) { + for (const item of value) { + alreadyProcessed.add(item); + } + for (const item of value) { + if (typeof item === "string") { + newSet.add(item); + } else { + const itemValue = innerGraph.get(item); + if (itemValue === true) { + newSet = true; + break; + } + if (itemValue !== undefined) { + for (const i of itemValue) { + if (i === key) continue; + if (alreadyProcessed.has(i)) continue; + newSet.add(i); + if (typeof i !== "string") { + isTerminal = false; + } + } + } + } + } + if (newSet === true) { + innerGraph.set(key, true); + } else if (newSet.size === 0) { + innerGraph.set(key, undefined); + } else { + innerGraph.set(key, newSet); + } + } + if (isTerminal) { + nonTerminal.delete(key); + } + } + } + + /** @type {Map>} */ + for (const [symbol, callbacks] of usageCallbackMap) { + const usage = /** @type {true | Set | undefined} */ (innerGraph.get( + symbol + )); + for (const callback of callbacks) { + callback(usage === undefined ? false : usage); + } + } +}; + +/** + * @param {ParserState} state parser state + * @param {UsageCallback} onUsageCallback on usage callback + */ +exports.onUsage = (state, onUsageCallback) => { + const innerGraphState = getState(state); + + if (innerGraphState) { + const { usageCallbackMap, currentTopLevelSymbol } = innerGraphState; + if (currentTopLevelSymbol) { + let callbacks = usageCallbackMap.get(currentTopLevelSymbol); + + if (callbacks === undefined) { + callbacks = new Set(); + usageCallbackMap.set(currentTopLevelSymbol, callbacks); + } + + callbacks.add(onUsageCallback); + } else { + onUsageCallback(true); + } + } else { + onUsageCallback(undefined); + } +}; + +/** + * @param {ParserState} state parser state + * @param {TopLevelSymbol} symbol the symbol + */ +exports.setTopLevelSymbol = (state, symbol) => { + const innerGraphState = getState(state); + + if (innerGraphState) { + innerGraphState.currentTopLevelSymbol = symbol; + } +}; + +/** + * @param {ParserState} state parser state + * @returns {TopLevelSymbol|void} usage data + */ +exports.getTopLevelSymbol = state => { + const innerGraphState = getState(state); + + if (innerGraphState) { + return innerGraphState.currentTopLevelSymbol; + } +}; + +/** + * @param {JavascriptParser} parser parser + * @param {string} name name of variable + * @returns {TopLevelSymbol} symbol + */ +exports.tagTopLevelSymbol = (parser, name) => { + const innerGraphState = getState(parser.state); + if (!innerGraphState) return; + + parser.defineVariable(name); + + const existingTag = /** @type {TopLevelSymbol} */ (parser.getTagData( + name, + topLevelSymbolTag + )); + if (existingTag) { + return existingTag; + } + + const fn = new TopLevelSymbol(name); + parser.tagVariable(name, topLevelSymbolTag, fn); + return fn; +}; + +class TopLevelSymbol { + /** + * @param {string} name name of the variable + */ + constructor(name) { + this.name = name; + } +} + +exports.TopLevelSymbol = TopLevelSymbol; +exports.topLevelSymbolTag = topLevelSymbolTag; + + +/***/ }), + +/***/ 41791: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const PureExpressionDependency = __webpack_require__(13275); +const InnerGraph = __webpack_require__(76094); + +/** @typedef {import("estree").ClassDeclaration} ClassDeclarationNode */ +/** @typedef {import("estree").ClassExpression} ClassExpressionNode */ +/** @typedef {import("estree").Node} Node */ +/** @typedef {import("estree").VariableDeclarator} VariableDeclaratorNode */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../dependencies/HarmonyImportSpecifierDependency")} HarmonyImportSpecifierDependency */ +/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ +/** @typedef {import("./InnerGraph").InnerGraph} InnerGraph */ +/** @typedef {import("./InnerGraph").TopLevelSymbol} TopLevelSymbol */ + +const { topLevelSymbolTag } = InnerGraph; + +class InnerGraphPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "InnerGraphPlugin", + (compilation, { normalModuleFactory }) => { + const logger = compilation.getLogger("webpack.InnerGraphPlugin"); + + compilation.dependencyTemplates.set( + PureExpressionDependency, + new PureExpressionDependency.Template() + ); + + /** + * @param {JavascriptParser} parser the parser + * @param {Object} parserOptions options + * @returns {void} + */ + const handler = (parser, parserOptions) => { + const onUsageSuper = sup => { + InnerGraph.onUsage(parser.state, usedByExports => { + switch (usedByExports) { + case undefined: + case true: + return; + default: { + const dep = new PureExpressionDependency(sup.range); + dep.loc = sup.loc; + dep.usedByExports = usedByExports; + parser.state.module.addDependency(dep); + break; + } + } + }); + }; + + parser.hooks.program.tap("InnerGraphPlugin", () => { + InnerGraph.enable(parser.state); + }); + + parser.hooks.finish.tap("InnerGraphPlugin", () => { + if (!InnerGraph.isEnabled(parser.state)) return; + + logger.time("infer dependency usage"); + InnerGraph.inferDependencyUsage(parser.state); + logger.timeAggregate("infer dependency usage"); + }); + + // During prewalking the following datastructures are filled with + // nodes that have a TopLevelSymbol assigned and + // variables are tagged with the assigned TopLevelSymbol + + // We differ 3 types of nodes: + // 1. full statements (export default, function declaration) + // 2. classes (class declaration, class expression) + // 3. variable declarators (const x = ...) + + /** @type {WeakMap} */ + const statementWithTopLevelSymbol = new WeakMap(); + /** @type {WeakMap} */ + const statementPurePart = new WeakMap(); + + /** @type {WeakMap} */ + const classWithTopLevelSymbol = new WeakMap(); + + /** @type {WeakMap} */ + const declWithTopLevelSymbol = new WeakMap(); + /** @type {WeakSet} */ + const pureDeclarators = new WeakSet(); + + // The following hooks are used during prewalking: + + parser.hooks.preStatement.tap("InnerGraphPlugin", statement => { + if (!InnerGraph.isEnabled(parser.state)) return; + + if (parser.scope.topLevelScope === true) { + if (statement.type === "FunctionDeclaration") { + const name = statement.id ? statement.id.name : "*default*"; + const fn = InnerGraph.tagTopLevelSymbol(parser, name); + statementWithTopLevelSymbol.set(statement, fn); + return true; + } + } + }); + + parser.hooks.blockPreStatement.tap("InnerGraphPlugin", statement => { + if (!InnerGraph.isEnabled(parser.state)) return; + + if (parser.scope.topLevelScope === true) { + if (statement.type === "ClassDeclaration") { + const name = statement.id ? statement.id.name : "*default*"; + const fn = InnerGraph.tagTopLevelSymbol(parser, name); + classWithTopLevelSymbol.set(statement, fn); + return true; + } + if (statement.type === "ExportDefaultDeclaration") { + const name = "*default*"; + const fn = InnerGraph.tagTopLevelSymbol(parser, name); + const decl = statement.declaration; + if ( + decl.type === "ClassExpression" || + decl.type === "ClassDeclaration" + ) { + classWithTopLevelSymbol.set(decl, fn); + } else if (parser.isPure(decl, statement.range[0])) { + statementWithTopLevelSymbol.set(statement, fn); + if ( + !decl.type.endsWith("FunctionExpression") && + !decl.type.endsWith("Declaration") && + decl.type !== "Literal" + ) { + statementPurePart.set(statement, decl); + } + } + } + } + }); + + parser.hooks.preDeclarator.tap( + "InnerGraphPlugin", + (decl, statement) => { + if (!InnerGraph.isEnabled(parser.state)) return; + if ( + parser.scope.topLevelScope === true && + decl.init && + decl.id.type === "Identifier" + ) { + const name = decl.id.name; + if (decl.init.type === "ClassExpression") { + const fn = InnerGraph.tagTopLevelSymbol(parser, name); + classWithTopLevelSymbol.set(decl.init, fn); + } else if (parser.isPure(decl.init, decl.id.range[1])) { + const fn = InnerGraph.tagTopLevelSymbol(parser, name); + declWithTopLevelSymbol.set(decl, fn); + if ( + !decl.init.type.endsWith("FunctionExpression") && + decl.init.type !== "Literal" + ) { + pureDeclarators.add(decl); + } + return true; + } + } + } + ); + + // During real walking we set the TopLevelSymbol state to the assigned + // TopLevelSymbol by using the fill datastructures. + + // In addition to tracking TopLevelSymbols, we sometimes need to + // add a PureExpressionDependency. This is needed to skip execution + // of pure expressions, even when they are not dropped due to + // minimizing. Otherwise symbols used there might not exist anymore + // as they are removed as unused by this optimization + + // When we find a reference to a TopLevelSymbol, we register a + // TopLevelSymbol dependency from TopLevelSymbol in state to the + // referenced TopLevelSymbol. This way we get a graph of all + // TopLevelSymbols. + + // The following hooks are called during walking: + + parser.hooks.statement.tap("InnerGraphPlugin", statement => { + if (!InnerGraph.isEnabled(parser.state)) return; + if (parser.scope.topLevelScope === true) { + InnerGraph.setTopLevelSymbol(parser.state, undefined); + + const fn = statementWithTopLevelSymbol.get(statement); + if (fn) { + InnerGraph.setTopLevelSymbol(parser.state, fn); + const purePart = statementPurePart.get(statement); + if (purePart) { + InnerGraph.onUsage(parser.state, usedByExports => { + switch (usedByExports) { + case undefined: + case true: + return; + default: { + const dep = new PureExpressionDependency( + purePart.range + ); + dep.loc = statement.loc; + dep.usedByExports = usedByExports; + parser.state.module.addDependency(dep); + break; + } + } + }); + } + } + } + }); + + parser.hooks.classExtendsExpression.tap( + "InnerGraphPlugin", + (expr, statement) => { + if (!InnerGraph.isEnabled(parser.state)) return; + if (parser.scope.topLevelScope === true) { + const fn = classWithTopLevelSymbol.get(statement); + if ( + fn && + parser.isPure( + expr, + statement.id ? statement.id.range[1] : statement.range[0] + ) + ) { + InnerGraph.setTopLevelSymbol(parser.state, fn); + onUsageSuper(expr); + } + } + } + ); + + parser.hooks.classBodyElement.tap( + "InnerGraphPlugin", + (element, statement) => { + if (!InnerGraph.isEnabled(parser.state)) return; + if (parser.scope.topLevelScope === true) { + const fn = classWithTopLevelSymbol.get(statement); + if (fn) { + if (element.type === "MethodDefinition") { + InnerGraph.setTopLevelSymbol(parser.state, fn); + } else if ( + element.type === "ClassProperty" && + !element.static + ) { + // TODO add test case once acorn supports it + // Currently this is not parsable + InnerGraph.setTopLevelSymbol(parser.state, fn); + } else { + InnerGraph.setTopLevelSymbol(parser.state, undefined); + } + } + } + } + ); + + parser.hooks.declarator.tap("InnerGraphPlugin", (decl, statement) => { + if (!InnerGraph.isEnabled(parser.state)) return; + const fn = declWithTopLevelSymbol.get(decl); + + if (fn) { + InnerGraph.setTopLevelSymbol(parser.state, fn); + if (pureDeclarators.has(decl)) { + if (decl.init.type === "ClassExpression") { + if (decl.init.superClass) { + onUsageSuper(decl.init.superClass); + } + } else { + InnerGraph.onUsage(parser.state, usedByExports => { + switch (usedByExports) { + case undefined: + case true: + return; + default: { + const dep = new PureExpressionDependency( + decl.init.range + ); + dep.loc = decl.loc; + dep.usedByExports = usedByExports; + parser.state.module.addDependency(dep); + break; + } + } + }); + } + } + parser.walkExpression(decl.init); + InnerGraph.setTopLevelSymbol(parser.state, undefined); + return true; + } + }); + + parser.hooks.expression + .for(topLevelSymbolTag) + .tap("InnerGraphPlugin", () => { + const topLevelSymbol = /** @type {TopLevelSymbol} */ (parser.currentTagData); + const currentTopLevelSymbol = InnerGraph.getTopLevelSymbol( + parser.state + ); + InnerGraph.addUsage( + parser.state, + topLevelSymbol, + currentTopLevelSymbol || true + ); + }); + parser.hooks.assign + .for(topLevelSymbolTag) + .tap("InnerGraphPlugin", expr => { + if (!InnerGraph.isEnabled(parser.state)) return; + if (expr.operator === "=") return true; + }); + }; + normalModuleFactory.hooks.parser + .for("javascript/auto") + .tap("InnerGraphPlugin", handler); + normalModuleFactory.hooks.parser + .for("javascript/esm") + .tap("InnerGraphPlugin", handler); + + compilation.hooks.finishModules.tap("InnerGraphPlugin", () => { + logger.timeAggregateEnd("infer dependency usage"); + }); + } + ); + } +} + +module.exports = InnerGraphPlugin; + + +/***/ }), + +/***/ 73953: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(27774); +const { STAGE_ADVANCED } = __webpack_require__(90412); +const LazyBucketSortedSet = __webpack_require__(18117); +const { compareChunks } = __webpack_require__(21699); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ + +/** @typedef {import("../../declarations/plugins/optimize/LimitChunkCountPlugin").LimitChunkCountPluginOptions} LimitChunkCountPluginOptions */ + +/** + * @typedef {Object} ChunkCombination + * @property {boolean} deleted this is set to true when combination was removed + * @property {number} sizeDiff + * @property {number} integratedSize + * @property {Chunk} a + * @property {Chunk} b + * @property {number} aIdx + * @property {number} bIdx + * @property {number} aSize + * @property {number} bSize + */ + +const addToSetMap = (map, key, value) => { + const set = map.get(key); + if (set === undefined) { + map.set(key, new Set([value])); + } else { + set.add(value); + } +}; + +class LimitChunkCountPlugin { + /** + * @param {LimitChunkCountPluginOptions=} options options object + */ + constructor(options) { + validate(schema, options, { + name: "Limit Chunk Count Plugin", + baseDataPath: "options" + }); + this.options = options; + } + + /** + * @param {Compiler} compiler the webpack compiler + * @returns {void} + */ + apply(compiler) { + const options = this.options; + compiler.hooks.compilation.tap("LimitChunkCountPlugin", compilation => { + compilation.hooks.optimizeChunks.tap( + { + name: "LimitChunkCountPlugin", + stage: STAGE_ADVANCED + }, + chunks => { + const chunkGraph = compilation.chunkGraph; + const maxChunks = options.maxChunks; + if (!maxChunks) return; + if (maxChunks < 1) return; + if (compilation.chunks.size <= maxChunks) return; + + let remainingChunksToMerge = compilation.chunks.size - maxChunks; + + // order chunks in a deterministic way + const compareChunksWithGraph = compareChunks(chunkGraph); + const orderedChunks = Array.from(chunks).sort(compareChunksWithGraph); + + // create a lazy sorted data structure to keep all combinations + // this is large. Size = chunks * (chunks - 1) / 2 + // It uses a multi layer bucket sort plus normal sort in the last layer + // It's also lazy so only accessed buckets are sorted + const combinations = new LazyBucketSortedSet( + // Layer 1: ordered by largest size benefit + c => c.sizeDiff, + (a, b) => b - a, + // Layer 2: ordered by smallest combined size + c => c.integratedSize, + (a, b) => a - b, + // Layer 3: ordered by position difference in orderedChunk (-> to be deterministic) + c => c.bIdx - c.aIdx, + (a, b) => a - b, + // Layer 4: ordered by position in orderedChunk (-> to be deterministic) + (a, b) => a.bIdx - b.bIdx + ); + + // we keep a mapping from chunk to all combinations + // but this mapping is not kept up-to-date with deletions + // so `deleted` flag need to be considered when iterating this + /** @type {Map>} */ + const combinationsByChunk = new Map(); + + orderedChunks.forEach((b, bIdx) => { + // create combination pairs with size and integrated size + for (let aIdx = 0; aIdx < bIdx; aIdx++) { + const a = orderedChunks[aIdx]; + // filter pairs that can not be integrated! + if (!chunkGraph.canChunksBeIntegrated(a, b)) continue; + + const integratedSize = chunkGraph.getIntegratedChunksSize( + a, + b, + options + ); + + const aSize = chunkGraph.getChunkSize(a, options); + const bSize = chunkGraph.getChunkSize(b, options); + const c = { + deleted: false, + sizeDiff: aSize + bSize - integratedSize, + integratedSize, + a, + b, + aIdx, + bIdx, + aSize, + bSize + }; + combinations.add(c); + addToSetMap(combinationsByChunk, a, c); + addToSetMap(combinationsByChunk, b, c); + } + return combinations; + }); + + // list of modified chunks during this run + // combinations affected by this change are skipped to allow + // further optimizations + /** @type {Set} */ + const modifiedChunks = new Set(); + + let changed = false; + // eslint-disable-next-line no-constant-condition + loop: while (true) { + const combination = combinations.popFirst(); + if (combination === undefined) break; + + combination.deleted = true; + const { a, b, integratedSize } = combination; + + // skip over pair when + // one of the already merged chunks is a parent of one of the chunks + if (modifiedChunks.size > 0) { + const queue = new Set(a.groupsIterable); + for (const group of b.groupsIterable) { + queue.add(group); + } + for (const group of queue) { + for (const mChunk of modifiedChunks) { + if (mChunk !== a && mChunk !== b && mChunk.isInGroup(group)) { + // This is a potential pair which needs recalculation + // We can't do that now, but it merge before following pairs + // so we leave space for it, and consider chunks as modified + // just for the worse case + remainingChunksToMerge--; + if (remainingChunksToMerge <= 0) break loop; + modifiedChunks.add(a); + modifiedChunks.add(b); + continue loop; + } + } + for (const parent of group.parentsIterable) { + queue.add(parent); + } + } + } + + // merge the chunks + if (a.integrate(b, "limit")) { + compilation.chunks.delete(b); + + // flag chunk a as modified as further optimization are possible for all children here + modifiedChunks.add(a); + + changed = true; + remainingChunksToMerge--; + if (remainingChunksToMerge <= 0) break; + + // Update all affected combinations + // delete all combination with the removed chunk + // we will use combinations with the kept chunk instead + for (const combination of combinationsByChunk.get(a)) { + if (combination.deleted) continue; + combination.deleted = true; + combinations.delete(combination); + } + + // Update combinations with the kept chunk with new sizes + for (const combination of combinationsByChunk.get(b)) { + if (combination.deleted) continue; + if (combination.a === b) { + if (!chunkGraph.canChunksBeIntegrated(a, combination.b)) { + combination.deleted = true; + combinations.delete(combination); + continue; + } + // Update size + const newIntegratedSize = a.integratedSize( + combination.b, + options + ); + const finishUpdate = combinations.startUpdate(combination); + combination.a = a; + combination.integratedSize = newIntegratedSize; + combination.aSize = integratedSize; + combination.sizeDiff = + combination.bSize + integratedSize - newIntegratedSize; + finishUpdate(); + } else if (combination.b === b) { + if (!chunkGraph.canChunksBeIntegrated(combination.a, a)) { + combination.deleted = true; + combinations.delete(combination); + continue; + } + // Update size + const newIntegratedSize = combination.a.integratedSize( + a, + options + ); + const finishUpdate = combinations.startUpdate(combination); + combination.b = a; + combination.integratedSize = newIntegratedSize; + combination.bSize = integratedSize; + combination.sizeDiff = + integratedSize + combination.aSize - newIntegratedSize; + finishUpdate(); + } + } + combinationsByChunk.set(a, combinationsByChunk.get(b)); + combinationsByChunk.delete(b); + } + } + if (changed) return true; + } + ); + }); + } +} +module.exports = LimitChunkCountPlugin; + + +/***/ }), + +/***/ 1746: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { UsageState } = __webpack_require__(54227); +const { + numberToIdentifier, + NUMBER_OF_IDENTIFIER_START_CHARS, + NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS +} = __webpack_require__(90751); +const { assignDeterministicIds } = __webpack_require__(65451); +const { compareSelect, compareStringsNumeric } = __webpack_require__(21699); + +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../ExportsInfo")} ExportsInfo */ +/** @typedef {import("../ExportsInfo").ExportInfo} ExportInfo */ + +/** + * @param {ExportsInfo} exportsInfo exports info + * @returns {boolean} mangle is possible + */ +const canMangle = exportsInfo => { + if (exportsInfo.otherExportsInfo.getUsed(undefined) !== UsageState.Unused) + return false; + let hasSomethingToMangle = false; + for (const exportInfo of exportsInfo.exports) { + if (exportInfo.canMangle === true) { + hasSomethingToMangle = true; + } + } + return hasSomethingToMangle; +}; + +// Sort by name +const comparator = compareSelect(e => e.name, compareStringsNumeric); +/** + * @param {boolean} deterministic use deterministic names + * @param {ExportsInfo} exportsInfo exports info + * @returns {void} + */ +const mangleExportsInfo = (deterministic, exportsInfo) => { + if (!canMangle(exportsInfo)) return; + const usedNames = new Set(); + /** @type {ExportInfo[]} */ + const mangleableExports = []; + for (const exportInfo of exportsInfo.ownedExports) { + const name = exportInfo.name; + if (!exportInfo.hasUsedName()) { + if ( + // Can the export be mangled? + exportInfo.canMangle !== true || + // Never rename 1 char exports + (name.length === 1 && /^[a-zA-Z0-9_$]/.test(name)) || + // Don't rename 2 char exports in deterministic mode + (deterministic && + name.length === 2 && + /^[a-zA-Z_$][a-zA-Z0-9_$]|^[1-9][0-9]/.test(name)) || + // Don't rename exports that are not provided + exportInfo.provided !== true + ) { + exportInfo.setUsedName(name); + usedNames.add(name); + } else { + mangleableExports.push(exportInfo); + } + } + if (exportInfo.exportsInfoOwned) { + const used = exportInfo.getUsed(undefined); + if ( + used === UsageState.OnlyPropertiesUsed || + used === UsageState.Unused + ) { + mangleExportsInfo(deterministic, exportInfo.exportsInfo); + } + } + } + if (deterministic) { + assignDeterministicIds( + mangleableExports, + e => e.name, + comparator, + (e, id) => { + const name = numberToIdentifier(id); + const size = usedNames.size; + usedNames.add(name); + if (size === usedNames.size) return false; + e.setUsedName(name); + return true; + }, + [ + NUMBER_OF_IDENTIFIER_START_CHARS, + NUMBER_OF_IDENTIFIER_START_CHARS * + NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS + ], + NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS, + usedNames.size + ); + } else { + const usedExports = []; + const unusedExports = []; + for (const exportInfo of mangleableExports) { + if (exportInfo.getUsed(undefined) === UsageState.Unused) { + unusedExports.push(exportInfo); + } else { + usedExports.push(exportInfo); + } + } + usedExports.sort(comparator); + unusedExports.sort(comparator); + let i = 0; + for (const list of [usedExports, unusedExports]) { + for (const exportInfo of list) { + let name; + do { + name = numberToIdentifier(i++); + } while (usedNames.has(name)); + exportInfo.setUsedName(name); + } + } + } +}; + +class MangleExportsPlugin { + /** + * @param {boolean} deterministic use deterministic names + */ + constructor(deterministic) { + this._deterministic = deterministic; + } + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { _deterministic: deterministic } = this; + compiler.hooks.compilation.tap("MangleExportsPlugin", compilation => { + const moduleGraph = compilation.moduleGraph; + compilation.hooks.optimizeCodeGeneration.tap( + "MangleExportsPlugin", + modules => { + for (const module of modules) { + const exportsInfo = moduleGraph.getExportsInfo(module); + mangleExportsInfo(deterministic, exportsInfo); + } + } + ); + }); + } +} + +module.exports = MangleExportsPlugin; + + +/***/ }), + +/***/ 22763: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { STAGE_BASIC } = __webpack_require__(90412); +const { runtimeEqual } = __webpack_require__(43478); + +/** @typedef {import("../Compiler")} Compiler */ + +class MergeDuplicateChunksPlugin { + /** + * @param {Compiler} compiler the compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "MergeDuplicateChunksPlugin", + compilation => { + compilation.hooks.optimizeChunks.tap( + { + name: "MergeDuplicateChunksPlugin", + stage: STAGE_BASIC + }, + chunks => { + const { chunkGraph, moduleGraph } = compilation; + + // remember already tested chunks for performance + const notDuplicates = new Set(); + + // for each chunk + for (const chunk of chunks) { + // track a Set of all chunk that could be duplicates + let possibleDuplicates; + for (const module of chunkGraph.getChunkModulesIterable(chunk)) { + if (possibleDuplicates === undefined) { + // when possibleDuplicates is not yet set, + // create a new Set from chunks of the current module + // including only chunks with the same number of modules + for (const dup of chunkGraph.getModuleChunksIterable( + module + )) { + if ( + dup !== chunk && + chunkGraph.getNumberOfChunkModules(chunk) === + chunkGraph.getNumberOfChunkModules(dup) && + !notDuplicates.has(dup) + ) { + // delay allocating the new Set until here, reduce memory pressure + if (possibleDuplicates === undefined) { + possibleDuplicates = new Set(); + } + possibleDuplicates.add(dup); + } + } + // when no chunk is possible we can break here + if (possibleDuplicates === undefined) break; + } else { + // validate existing possible duplicates + for (const dup of possibleDuplicates) { + // remove possible duplicate when module is not contained + if (!chunkGraph.isModuleInChunk(module, dup)) { + possibleDuplicates.delete(dup); + } + } + // when all chunks has been removed we can break here + if (possibleDuplicates.size === 0) break; + } + } + + // when we found duplicates + if ( + possibleDuplicates !== undefined && + possibleDuplicates.size > 0 + ) { + outer: for (const otherChunk of possibleDuplicates) { + if (otherChunk.hasRuntime() !== chunk.hasRuntime()) continue; + if (chunkGraph.getNumberOfEntryModules(chunk) > 0) continue; + if (chunkGraph.getNumberOfEntryModules(otherChunk) > 0) + continue; + if (!runtimeEqual(chunk.runtime, otherChunk.runtime)) { + for (const module of chunkGraph.getChunkModulesIterable( + chunk + )) { + const exportsInfo = moduleGraph.getExportsInfo(module); + if ( + !exportsInfo.isEquallyUsed( + chunk.runtime, + otherChunk.runtime + ) + ) { + continue outer; + } + } + } + // merge them + if (chunkGraph.canChunksBeIntegrated(chunk, otherChunk)) { + chunkGraph.integrateChunks(chunk, otherChunk); + compilation.chunks.delete(otherChunk); + } + } + } + + // don't check already processed chunks twice + notDuplicates.add(chunk); + } + } + ); + } + ); + } +} +module.exports = MergeDuplicateChunksPlugin; + + +/***/ }), + +/***/ 13508: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(65069); +const { STAGE_ADVANCED } = __webpack_require__(90412); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ + +/** @typedef {import("../../declarations/plugins/optimize/MinChunkSizePlugin").MinChunkSizePluginOptions} MinChunkSizePluginOptions */ + +class MinChunkSizePlugin { + /** + * @param {MinChunkSizePluginOptions} options options object + */ + constructor(options) { + validate(schema, options, { + name: "Min Chunk Size Plugin", + baseDataPath: "options" + }); + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const options = this.options; + const minChunkSize = options.minChunkSize; + compiler.hooks.compilation.tap("MinChunkSizePlugin", compilation => { + compilation.hooks.optimizeChunks.tap( + { + name: "MinChunkSizePlugin", + stage: STAGE_ADVANCED + }, + chunks => { + const chunkGraph = compilation.chunkGraph; + const equalOptions = { + chunkOverhead: 1, + entryChunkMultiplicator: 1 + }; + + const chunkSizesMap = new Map(); + /** @type {[Chunk, Chunk][]} */ + const combinations = []; + /** @type {Chunk[]} */ + const smallChunks = []; + const visitedChunks = []; + for (const a of chunks) { + // check if one of the chunks sizes is smaller than the minChunkSize + // and filter pairs that can NOT be integrated! + if (chunkGraph.getChunkSize(a, equalOptions) < minChunkSize) { + smallChunks.push(a); + for (const b of visitedChunks) { + if (chunkGraph.canChunksBeIntegrated(b, a)) + combinations.push([b, a]); + } + } else { + for (const b of smallChunks) { + if (chunkGraph.canChunksBeIntegrated(b, a)) + combinations.push([b, a]); + } + } + chunkSizesMap.set(a, chunkGraph.getChunkSize(a, options)); + visitedChunks.push(a); + } + + const sortedSizeFilteredExtendedPairCombinations = combinations + .map(pair => { + // extend combination pairs with size and integrated size + const a = chunkSizesMap.get(pair[0]); + const b = chunkSizesMap.get(pair[1]); + const ab = chunkGraph.getIntegratedChunksSize( + pair[0], + pair[1], + options + ); + /** @type {[number, number, Chunk, Chunk]} */ + const extendedPair = [a + b - ab, ab, pair[0], pair[1]]; + return extendedPair; + }) + .sort((a, b) => { + // sadly javascript does an in place sort here + // sort by size + const diff = b[0] - a[0]; + if (diff !== 0) return diff; + return a[1] - b[1]; + }); + + if (sortedSizeFilteredExtendedPairCombinations.length === 0) return; + + const pair = sortedSizeFilteredExtendedPairCombinations[0]; + + chunkGraph.integrateChunks(pair[2], pair[3]); + compilation.chunks.delete(pair[3]); + return true; + } + ); + }); + } +} +module.exports = MinChunkSizePlugin; + + +/***/ }), + +/***/ 77877: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const SizeFormatHelpers = __webpack_require__(50787); +const WebpackError = __webpack_require__(24274); + +class MinMaxSizeWarning extends WebpackError { + constructor(keys, minSize, maxSize) { + let keysMessage = "Fallback cache group"; + if (keys) { + keysMessage = + keys.length > 1 + ? `Cache groups ${keys.sort().join(", ")}` + : `Cache group ${keys[0]}`; + } + super( + `SplitChunksPlugin\n` + + `${keysMessage}\n` + + `Configured minSize (${SizeFormatHelpers.formatSize(minSize)}) is ` + + `bigger than maxSize (${SizeFormatHelpers.formatSize(maxSize)}).\n` + + "This seem to be a invalid optimization.splitChunks configuration." + ); + } +} + +module.exports = MinMaxSizeWarning; + + +/***/ }), + +/***/ 72521: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const asyncLib = __webpack_require__(36386); +const ChunkGraph = __webpack_require__(67518); +const ModuleGraph = __webpack_require__(73444); +const ModuleRestoreError = __webpack_require__(61938); +const ModuleStoreError = __webpack_require__(20027); +const { STAGE_DEFAULT } = __webpack_require__(90412); +const HarmonyImportDependency = __webpack_require__(289); +const StackedMap = __webpack_require__(64149); +const { compareModulesByIdentifier } = __webpack_require__(21699); +const { + intersectRuntime, + mergeRuntimeOwned, + filterRuntime, + runtimeToString, + mergeRuntime +} = __webpack_require__(43478); +const ConcatenatedModule = __webpack_require__(74233); + +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../RequestShortener")} RequestShortener */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +const formatBailoutReason = msg => { + return "ModuleConcatenation bailout: " + msg; +}; + +class ModuleConcatenationPlugin { + constructor(options) { + if (typeof options !== "object") options = {}; + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "ModuleConcatenationPlugin", + (compilation, { normalModuleFactory }) => { + const moduleGraph = compilation.moduleGraph; + const bailoutReasonMap = new Map(); + const cache = compilation.getCache("ModuleConcatenationPlugin"); + + const setBailoutReason = (module, reason) => { + setInnerBailoutReason(module, reason); + moduleGraph + .getOptimizationBailout(module) + .push( + typeof reason === "function" + ? rs => formatBailoutReason(reason(rs)) + : formatBailoutReason(reason) + ); + }; + + const setInnerBailoutReason = (module, reason) => { + bailoutReasonMap.set(module, reason); + }; + + const getInnerBailoutReason = (module, requestShortener) => { + const reason = bailoutReasonMap.get(module); + if (typeof reason === "function") return reason(requestShortener); + return reason; + }; + + const formatBailoutWarning = (module, problem) => requestShortener => { + if (typeof problem === "function") { + return formatBailoutReason( + `Cannot concat with ${module.readableIdentifier( + requestShortener + )}: ${problem(requestShortener)}` + ); + } + const reason = getInnerBailoutReason(module, requestShortener); + const reasonWithPrefix = reason ? `: ${reason}` : ""; + if (module === problem) { + return formatBailoutReason( + `Cannot concat with ${module.readableIdentifier( + requestShortener + )}${reasonWithPrefix}` + ); + } else { + return formatBailoutReason( + `Cannot concat with ${module.readableIdentifier( + requestShortener + )} because of ${problem.readableIdentifier( + requestShortener + )}${reasonWithPrefix}` + ); + } + }; + + compilation.hooks.optimizeChunkModules.tapAsync( + { + name: "ModuleConcatenationPlugin", + stage: STAGE_DEFAULT + }, + (allChunks, modules, callback) => { + const logger = compilation.getLogger("ModuleConcatenationPlugin"); + const { chunkGraph, moduleGraph } = compilation; + const relevantModules = []; + const possibleInners = new Set(); + const context = { + chunkGraph, + moduleGraph + }; + logger.time("select relevant modules"); + for (const module of modules) { + let canBeRoot = true; + let canBeInner = true; + + const bailoutReason = module.getConcatenationBailoutReason( + context + ); + if (bailoutReason) { + setBailoutReason(module, bailoutReason); + continue; + } + + // Must not be an async module + if (moduleGraph.isAsync(module)) { + setBailoutReason(module, `Module is async`); + continue; + } + + // Must be in strict mode + if (!module.buildInfo.strict) { + setBailoutReason(module, `Module is not in strict mode`); + continue; + } + + // Module must be in any chunk (we don't want to do useless work) + if (chunkGraph.getNumberOfModuleChunks(module) === 0) { + setBailoutReason(module, "Module is not in any chunk"); + continue; + } + + // Exports must be known (and not dynamic) + const exportsInfo = moduleGraph.getExportsInfo(module); + const relevantExports = exportsInfo.getRelevantExports(undefined); + const unknownReexports = relevantExports.filter(exportInfo => { + return ( + exportInfo.isReexport() && !exportInfo.getTarget(moduleGraph) + ); + }); + if (unknownReexports.length > 0) { + setBailoutReason( + module, + `Reexports in this module do not have a static target (${Array.from( + unknownReexports, + exportInfo => + `${ + exportInfo.name || "other exports" + }: ${exportInfo.getUsedInfo()}` + ).join(", ")})` + ); + continue; + } + + // Root modules must have a static list of exports + const unknownProvidedExports = relevantExports.filter( + exportInfo => { + return exportInfo.provided !== true; + } + ); + if (unknownProvidedExports.length > 0) { + setBailoutReason( + module, + `List of module exports is dynamic (${Array.from( + unknownProvidedExports, + exportInfo => + `${ + exportInfo.name || "other exports" + }: ${exportInfo.getProvidedInfo()} and ${exportInfo.getUsedInfo()}` + ).join(", ")})` + ); + canBeRoot = false; + } + + // Module must not be an entry point + if (chunkGraph.isEntryModule(module)) { + setInnerBailoutReason(module, "Module is an entry point"); + canBeInner = false; + } + + if (canBeRoot) relevantModules.push(module); + if (canBeInner) possibleInners.add(module); + } + logger.timeEnd("select relevant modules"); + logger.debug( + `${relevantModules.length} potential root modules, ${possibleInners.size} potential inner modules` + ); + // sort by depth + // modules with lower depth are more likely suited as roots + // this improves performance, because modules already selected as inner are skipped + logger.time("sort relevant modules"); + relevantModules.sort((a, b) => { + return moduleGraph.getDepth(a) - moduleGraph.getDepth(b); + }); + logger.timeEnd("sort relevant modules"); + + logger.time("find modules to concatenate"); + const concatConfigurations = []; + const usedAsInner = new Set(); + for (const currentRoot of relevantModules) { + // when used by another configuration as inner: + // the other configuration is better and we can skip this one + if (usedAsInner.has(currentRoot)) continue; + + let chunkRuntime = undefined; + for (const r of chunkGraph.getModuleRuntimes(currentRoot)) { + chunkRuntime = mergeRuntimeOwned(chunkRuntime, r); + } + const exportsInfo = moduleGraph.getExportsInfo(currentRoot); + const filteredRuntime = filterRuntime(chunkRuntime, r => + exportsInfo.isModuleUsed(r) + ); + const activeRuntime = + filteredRuntime === true + ? chunkRuntime + : filteredRuntime === false + ? undefined + : filteredRuntime; + + // create a configuration with the root + const currentConfiguration = new ConcatConfiguration( + currentRoot, + activeRuntime + ); + + // cache failures to add modules + const failureCache = new Map(); + + // potential optional import candidates + /** @type {Set} */ + const candidates = new Set(); + + // try to add all imports + for (const imp of this._getImports( + compilation, + currentRoot, + activeRuntime + )) { + candidates.add(imp); + } + + for (const imp of candidates) { + // _tryToAdd modifies the config even if it fails + // so make sure to only accept changes when it succeed + const backup = currentConfiguration.snapshot(); + const impCandidates = new Set(); + const problem = this._tryToAdd( + compilation, + currentConfiguration, + imp, + chunkRuntime, + activeRuntime, + possibleInners, + impCandidates, + failureCache, + chunkGraph + ); + if (problem) { + failureCache.set(imp, problem); + currentConfiguration.addWarning(imp, problem); + + // roll back + currentConfiguration.rollback(backup); + } else { + for (const c of impCandidates) { + candidates.add(c); + } + } + } + if (!currentConfiguration.isEmpty()) { + concatConfigurations.push(currentConfiguration); + for (const module of currentConfiguration.getModules()) { + if (module !== currentConfiguration.rootModule) { + usedAsInner.add(module); + } + } + } else { + const optimizationBailouts = moduleGraph.getOptimizationBailout( + currentRoot + ); + for (const warning of currentConfiguration.getWarningsSorted()) { + optimizationBailouts.push( + formatBailoutWarning(warning[0], warning[1]) + ); + } + } + } + logger.timeEnd("find modules to concatenate"); + logger.debug( + `${concatConfigurations.length} concat configurations` + ); + // HACK: Sort configurations by length and start with the longest one + // to get the biggest groups possible. Used modules are marked with usedModules + // TODO: Allow to reuse existing configuration while trying to add dependencies. + // This would improve performance. O(n^2) -> O(n) + logger.time(`sort concat configurations`); + concatConfigurations.sort((a, b) => { + return b.modules.size - a.modules.size; + }); + logger.timeEnd(`sort concat configurations`); + const usedModules = new Set(); + + logger.time("create concatenated modules"); + asyncLib.each( + concatConfigurations, + (concatConfiguration, callback) => { + const rootModule = concatConfiguration.rootModule; + + // Avoid overlapping configurations + // TODO: remove this when todo above is fixed + if (usedModules.has(rootModule)) return callback(); + const modules = concatConfiguration.getModules(); + for (const m of modules) { + usedModules.add(m); + } + + // Create a new ConcatenatedModule + let newModule = ConcatenatedModule.create( + rootModule, + modules, + concatConfiguration.runtime, + compiler.root + ); + + const cacheItem = cache.getItemCache( + newModule.identifier(), + null + ); + + const restore = () => { + cacheItem.get((err, cacheModule) => { + if (err) { + return callback(new ModuleRestoreError(newModule, err)); + } + + if (cacheModule) { + cacheModule.updateCacheModule(newModule); + newModule = cacheModule; + } + + build(); + }); + }; + + const build = () => { + newModule.build( + compiler.options, + compilation, + null, + null, + err => { + if (err) { + if (!err.module) { + err.module = newModule; + } + return callback(err); + } + integrateAndStore(); + } + ); + }; + + const integrateAndStore = () => { + ChunkGraph.setChunkGraphForModule(newModule, chunkGraph); + ModuleGraph.setModuleGraphForModule(newModule, moduleGraph); + + for (const warning of concatConfiguration.getWarningsSorted()) { + moduleGraph + .getOptimizationBailout(newModule) + .push(formatBailoutWarning(warning[0], warning[1])); + } + moduleGraph.cloneModuleAttributes(rootModule, newModule); + for (const m of modules) { + // add to builtModules when one of the included modules was built + if (compilation.builtModules.has(m)) { + compilation.builtModules.add(newModule); + } + if (m !== rootModule) { + // attach external references to the concatenated module too + moduleGraph.copyOutgoingModuleConnections( + m, + newModule, + c => { + return ( + c.originModule === m && + !( + c.dependency instanceof HarmonyImportDependency && + modules.has(c.module) + ) + ); + } + ); + // remove module from chunk + for (const chunk of chunkGraph.getModuleChunksIterable( + rootModule + )) { + chunkGraph.disconnectChunkAndModule(chunk, m); + } + } + } + compilation.modules.delete(rootModule); + // remove module from chunk + chunkGraph.replaceModule(rootModule, newModule); + // replace module references with the concatenated module + moduleGraph.moveModuleConnections( + rootModule, + newModule, + c => { + const otherModule = + c.module === rootModule ? c.originModule : c.module; + const innerConnection = + c.dependency instanceof HarmonyImportDependency && + modules.has(otherModule); + return !innerConnection; + } + ); + // add concatenated module to the compilation + compilation.modules.add(newModule); + + // TODO check if module needs build to avoid caching it without change + cacheItem.store(newModule, err => { + if (err) { + return callback(new ModuleStoreError(newModule, err)); + } + + callback(); + }); + }; + + restore(); + }, + err => { + logger.timeEnd("create concatenated modules"); + process.nextTick(() => callback(err)); + } + ); + } + ); + } + ); + } + + /** + * @param {Compilation} compilation the compilation + * @param {Module} module the module to be added + * @param {RuntimeSpec} runtime the runtime scope + * @returns {Set} the imported modules + */ + _getImports(compilation, module, runtime) { + const moduleGraph = compilation.moduleGraph; + const set = new Set(); + for (const dep of module.dependencies) { + // Get reference info only for harmony Dependencies + if (!(dep instanceof HarmonyImportDependency)) continue; + + const connection = moduleGraph.getConnection(dep); + // Reference is valid and has a module + if ( + !connection || + !connection.module || + !connection.isTargetActive(runtime) + ) { + continue; + } + + const importedNames = compilation.getDependencyReferencedExports( + dep, + undefined + ); + + if ( + importedNames.every(i => + Array.isArray(i) ? i.length > 0 : i.name.length > 0 + ) || + Array.isArray(moduleGraph.getProvidedExports(module)) + ) { + set.add(connection.module); + } + } + return set; + } + + /** + * @param {Compilation} compilation webpack compilation + * @param {ConcatConfiguration} config concat configuration (will be modified when added) + * @param {Module} module the module to be added + * @param {RuntimeSpec} runtime the runtime scope of the generated code + * @param {RuntimeSpec} activeRuntime the runtime scope of the root module + * @param {Set} possibleModules modules that are candidates + * @param {Set} candidates list of potential candidates (will be added to) + * @param {Map} failureCache cache for problematic modules to be more performant + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {Module | function(RequestShortener): string} the problematic module + */ + _tryToAdd( + compilation, + config, + module, + runtime, + activeRuntime, + possibleModules, + candidates, + failureCache, + chunkGraph + ) { + const cacheEntry = failureCache.get(module); + if (cacheEntry) { + return cacheEntry; + } + + // Already added? + if (config.has(module)) { + return null; + } + + // Not possible to add? + if (!possibleModules.has(module)) { + failureCache.set(module, module); // cache failures for performance + return module; + } + + // Module must be in the correct chunks + const missingChunks = Array.from( + chunkGraph.getModuleChunksIterable(config.rootModule) + ) + .filter(chunk => !chunkGraph.isModuleInChunk(module, chunk)) + .map(chunk => chunk.name || "unnamed chunk(s)"); + if (missingChunks.length > 0) { + const missingChunksList = Array.from(new Set(missingChunks)).sort(); + const chunks = Array.from( + new Set( + Array.from(chunkGraph.getModuleChunksIterable(module)).map( + chunk => chunk.name || "unnamed chunk(s)" + ) + ) + ).sort(); + const problem = requestShortener => + `Module ${module.readableIdentifier( + requestShortener + )} is not in the same chunk(s) (expected in chunk(s) ${missingChunksList.join( + ", " + )}, module is in chunk(s) ${chunks.join(", ")})`; + failureCache.set(module, problem); // cache failures for performance + return problem; + } + + // Add the module + config.add(module); + + const moduleGraph = compilation.moduleGraph; + + const incomingConnections = Array.from( + moduleGraph.getIncomingConnections(module) + ).filter(connection => { + // We are not interested in inactive connections + if (!connection.isActive(runtime)) return false; + + // Include, but do not analyse further, connections from non-modules + if (!connection.originModule) return true; + + // Ignore connection from orphan modules + if (chunkGraph.getNumberOfModuleChunks(connection.originModule) === 0) + return false; + + // We don't care for connections from other runtimes + let originRuntime = undefined; + for (const r of chunkGraph.getModuleRuntimes(connection.originModule)) { + originRuntime = mergeRuntimeOwned(originRuntime, r); + } + + return intersectRuntime(runtime, originRuntime); + }); + + const nonHarmonyConnections = incomingConnections.filter( + connection => + !connection.originModule || + !connection.dependency || + !(connection.dependency instanceof HarmonyImportDependency) + ); + if (nonHarmonyConnections.length > 0) { + const problem = requestShortener => { + const importingModules = new Set( + nonHarmonyConnections.map(c => c.originModule).filter(Boolean) + ); + const importingExplanations = new Set( + nonHarmonyConnections.map(c => c.explanation).filter(Boolean) + ); + const importingModuleTypes = new Map( + Array.from(importingModules).map( + m => + /** @type {[Module, Set]} */ ([ + m, + new Set( + nonHarmonyConnections + .filter(c => c.originModule === m) + .map(c => c.dependency.type) + .sort() + ) + ]) + ) + ); + const names = Array.from(importingModules) + .map( + m => + `${m.readableIdentifier( + requestShortener + )} (referenced with ${Array.from( + importingModuleTypes.get(m) + ).join(", ")})` + ) + .sort(); + const explanations = Array.from(importingExplanations).sort(); + if (names.length > 0 && explanations.length === 0) { + return `Module ${module.readableIdentifier( + requestShortener + )} is referenced from these modules with unsupported syntax: ${names.join( + ", " + )}`; + } else if (names.length === 0 && explanations.length > 0) { + return `Module ${module.readableIdentifier( + requestShortener + )} is referenced by: ${explanations.join(", ")}`; + } else if (names.length > 0 && explanations.length > 0) { + return `Module ${module.readableIdentifier( + requestShortener + )} is referenced from these modules with unsupported syntax: ${names.join( + ", " + )} and by: ${explanations.join(", ")}`; + } else { + return `Module ${module.readableIdentifier( + requestShortener + )} is referenced in a unsupported way`; + } + }; + failureCache.set(module, problem); // cache failures for performance + return problem; + } + + // Module must be in the same chunks like the referencing module + const otherChunkConnections = incomingConnections.filter(connection => { + for (const chunk of chunkGraph.getModuleChunksIterable( + config.rootModule + )) { + if (!chunkGraph.isModuleInChunk(connection.originModule, chunk)) { + return true; + } + } + return false; + }); + if (otherChunkConnections.length > 0) { + const problem = requestShortener => { + const importingModules = new Set( + otherChunkConnections.map(c => c.originModule) + ); + const names = Array.from(importingModules) + .map(m => m.readableIdentifier(requestShortener)) + .sort(); + return `Module ${module.readableIdentifier( + requestShortener + )} is referenced from different chunks by these modules: ${names.join( + ", " + )}`; + }; + failureCache.set(module, problem); // cache failures for performance + return problem; + } + + if (runtime !== undefined && typeof runtime !== "string") { + // Module must be consistently referenced in the same runtimes + /** @type {Map} */ + const runtimeConditionMap = new Map(); + for (const connection of incomingConnections) { + const runtimeCondition = filterRuntime(runtime, runtime => { + return connection.isTargetActive(runtime); + }); + if (runtimeCondition === false) continue; + const old = runtimeConditionMap.get(connection.originModule) || false; + if (old === true) continue; + if (old !== false && runtimeCondition !== true) { + runtimeConditionMap.set( + connection.originModule, + mergeRuntime(old, runtimeCondition) + ); + } else { + runtimeConditionMap.set(connection.originModule, runtimeCondition); + } + } + const otherRuntimeConnections = Array.from(runtimeConditionMap).filter( + ([, runtimeCondition]) => typeof runtimeCondition !== "boolean" + ); + if (otherRuntimeConnections.length > 0) { + const problem = requestShortener => { + return `Module ${module.readableIdentifier( + requestShortener + )} is runtime-dependent referenced by these modules: ${Array.from( + otherRuntimeConnections, + ([module, runtimeCondition]) => + `${module.readableIdentifier( + requestShortener + )} (expected runtime ${runtimeToString( + runtime + )}, module is only referenced in ${runtimeToString( + /** @type {RuntimeSpec} */ (runtimeCondition) + )})` + ).join(", ")}`; + }; + failureCache.set(module, problem); // cache failures for performance + return problem; + } + } + + const incomingModules = Array.from( + new Set(incomingConnections.map(c => c.originModule)) + ).sort(compareModulesByIdentifier); + + // Every module which depends on the added module must be in the configuration too. + for (const originModule of incomingModules) { + const problem = this._tryToAdd( + compilation, + config, + originModule, + runtime, + activeRuntime, + possibleModules, + candidates, + failureCache, + chunkGraph + ); + if (problem) { + failureCache.set(module, problem); // cache failures for performance + return problem; + } + } + + // Add imports to possible candidates list + for (const imp of this._getImports(compilation, module, runtime)) { + candidates.add(imp); + } + return null; + } +} + +class ConcatConfiguration { + /** + * @param {Module} rootModule the root module + * @param {RuntimeSpec} runtime the runtime + */ + constructor(rootModule, runtime) { + this.rootModule = rootModule; + this.runtime = runtime; + /** @type {StackedMap} */ + this.modules = new StackedMap(); + this.modules.set(rootModule, true); + /** @type {StackedMap} */ + this.warnings = new StackedMap(); + } + + add(module) { + this.modules.set(module, true); + } + + has(module) { + return this.modules.has(module); + } + + isEmpty() { + return this.modules.size === 1; + } + + addWarning(module, problem) { + this.warnings.set(module, problem); + } + + getWarningsSorted() { + return new Map( + this.warnings.asPairArray().sort((a, b) => { + const ai = a[0].identifier(); + const bi = b[0].identifier(); + if (ai < bi) return -1; + if (ai > bi) return 1; + return 0; + }) + ); + } + + /** + * @returns {Set} modules as set + */ + getModules() { + return this.modules.asSet(); + } + + snapshot() { + const base = this.modules; + this.modules = this.modules.createChild(); + return base; + } + + rollback(snapshot) { + this.modules = snapshot; + } +} + +module.exports = ModuleConcatenationPlugin; + + +/***/ }), + +/***/ 69236: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { SyncBailHook } = __webpack_require__(18416); +const { RawSource, CachedSource, CompatSource } = __webpack_require__(55600); +const Compilation = __webpack_require__(75388); +const WebpackError = __webpack_require__(24274); +const { compareSelect, compareStrings } = __webpack_require__(21699); +const createHash = __webpack_require__(34627); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("../Compiler")} Compiler */ + +const EMPTY_SET = new Set(); + +const addToList = (itemOrItems, list) => { + if (Array.isArray(itemOrItems)) { + for (const item of itemOrItems) { + list.add(item); + } + } else if (itemOrItems) { + list.add(itemOrItems); + } +}; + +/** + * Escapes regular expression metacharacters + * @param {string} str String to quote + * @returns {string} Escaped string + */ +const quoteMeta = str => { + return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&"); +}; + +const cachedSourceMap = new WeakMap(); + +const toCachedSource = source => { + if (source instanceof CachedSource) { + return source; + } + const entry = cachedSourceMap.get(source); + if (entry !== undefined) return entry; + const newSource = new CachedSource(CompatSource.from(source)); + cachedSourceMap.set(source, newSource); + return newSource; +}; + +/** + * @typedef {Object} AssetInfoForRealContentHash + * @property {string} name + * @property {AssetInfo} info + * @property {Source} source + * @property {RawSource | undefined} newSource + * @property {RawSource | undefined} newSourceWithoutOwn + * @property {string} content + * @property {Set} ownHashes + * @property {Promise} contentComputePromise + * @property {Promise} contentComputeWithoutOwnPromise + * @property {Set} referencedHashes + * @property {Set} hashes + */ + +/** + * @typedef {Object} CompilationHooks + * @property {SyncBailHook<[Buffer[], string], string>} updateHash + */ + +/** @type {WeakMap} */ +const compilationHooksMap = new WeakMap(); + +class RealContentHashPlugin { + /** + * @param {Compilation} compilation the compilation + * @returns {CompilationHooks} the attached hooks + */ + static getCompilationHooks(compilation) { + if (!(compilation instanceof Compilation)) { + throw new TypeError( + "The 'compilation' argument must be an instance of Compilation" + ); + } + let hooks = compilationHooksMap.get(compilation); + if (hooks === undefined) { + hooks = { + updateHash: new SyncBailHook(["content", "oldHash"]) + }; + compilationHooksMap.set(compilation, hooks); + } + return hooks; + } + + constructor({ hashFunction, hashDigest }) { + this._hashFunction = hashFunction; + this._hashDigest = hashDigest; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("RealContentHashPlugin", compilation => { + const cacheAnalyse = compilation.getCache( + "RealContentHashPlugin|analyse" + ); + const cacheGenerate = compilation.getCache( + "RealContentHashPlugin|generate" + ); + const hooks = RealContentHashPlugin.getCompilationHooks(compilation); + compilation.hooks.processAssets.tapPromise( + { + name: "RealContentHashPlugin", + stage: Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_HASH + }, + async () => { + const assets = compilation.getAssets(); + /** @type {AssetInfoForRealContentHash[]} */ + const assetsWithInfo = []; + const hashToAssets = new Map(); + for (const { source, info, name } of assets) { + const cachedSource = toCachedSource(source); + const content = cachedSource.source(); + /** @type {Set} */ + const hashes = new Set(); + addToList(info.contenthash, hashes); + const data = { + name, + info, + source: cachedSource, + /** @type {RawSource | undefined} */ + newSource: undefined, + /** @type {RawSource | undefined} */ + newSourceWithoutOwn: undefined, + content, + /** @type {Set} */ + ownHashes: undefined, + contentComputePromise: undefined, + contentComputeWithoutOwnPromise: undefined, + /** @type {Set} */ + referencedHashes: undefined, + hashes + }; + assetsWithInfo.push(data); + for (const hash of hashes) { + const list = hashToAssets.get(hash); + if (list === undefined) { + hashToAssets.set(hash, [data]); + } else { + list.push(data); + } + } + } + if (hashToAssets.size === 0) return; + const hashRegExp = new RegExp( + Array.from(hashToAssets.keys(), quoteMeta).join("|"), + "g" + ); + await Promise.all( + assetsWithInfo.map(async asset => { + const { name, source, content, hashes } = asset; + if (Buffer.isBuffer(content)) { + asset.referencedHashes = EMPTY_SET; + asset.ownHashes = EMPTY_SET; + return; + } + const etag = cacheAnalyse.mergeEtags( + cacheAnalyse.getLazyHashedEtag(source), + Array.from(hashes).join("|") + ); + [ + asset.referencedHashes, + asset.ownHashes + ] = await cacheAnalyse.providePromise(name, etag, () => { + const referencedHashes = new Set(); + let ownHashes = new Set(); + const inContent = content.match(hashRegExp); + if (inContent) { + for (const hash of inContent) { + if (hashes.has(hash)) { + ownHashes.add(hash); + continue; + } + referencedHashes.add(hash); + } + } + return [referencedHashes, ownHashes]; + }); + }) + ); + const getDependencies = hash => { + const assets = hashToAssets.get(hash); + if (!assets) { + const referencingAssets = assetsWithInfo.filter(asset => + asset.referencedHashes.has(hash) + ); + const err = new WebpackError(`RealContentHashPlugin +Some kind of unexpected caching problem occurred. +An asset was cached with a reference to another asset (${hash}) that's not in the compilation anymore. +Either the asset was incorrectly cached, or the referenced asset should also be restored from cache. +Referenced by: +${referencingAssets + .map(a => { + const match = new RegExp(`.{0,20}${quoteMeta(hash)}.{0,20}`).exec( + a.content + ); + return ` - ${a.name}: ...${match ? match[0] : "???"}...`; + }) + .join("\n")}`); + compilation.errors.push(err); + return undefined; + } + const hashes = new Set(); + for (const { referencedHashes, ownHashes } of assets) { + if (!ownHashes.has(hash)) { + for (const hash of ownHashes) { + hashes.add(hash); + } + } + for (const hash of referencedHashes) { + hashes.add(hash); + } + } + return hashes; + }; + const hashInfo = hash => { + const assets = hashToAssets.get(hash); + return `${hash} (${Array.from(assets, a => a.name)})`; + }; + const hashesInOrder = new Set(); + for (const hash of hashToAssets.keys()) { + const add = (hash, stack) => { + const deps = getDependencies(hash); + if (!deps) return; + stack.add(hash); + for (const dep of deps) { + if (hashesInOrder.has(dep)) continue; + if (stack.has(dep)) { + throw new Error( + `Circular hash dependency ${Array.from( + stack, + hashInfo + ).join(" -> ")} -> ${hashInfo(dep)}` + ); + } + add(dep, stack); + } + hashesInOrder.add(hash); + stack.delete(hash); + }; + if (hashesInOrder.has(hash)) continue; + add(hash, new Set()); + } + const hashToNewHash = new Map(); + const getEtag = asset => + cacheGenerate.mergeEtags( + cacheGenerate.getLazyHashedEtag(asset.source), + Array.from(asset.referencedHashes, hash => + hashToNewHash.get(hash) + ).join("|") + ); + const computeNewContent = asset => { + if (asset.contentComputePromise) return asset.contentComputePromise; + return (asset.contentComputePromise = (async () => { + if ( + asset.ownHashes.size > 0 || + Array.from(asset.referencedHashes).some( + hash => hashToNewHash.get(hash) !== hash + ) + ) { + const identifier = asset.name; + const etag = getEtag(asset); + asset.newSource = await cacheGenerate.providePromise( + identifier, + etag, + () => { + const newContent = asset.content.replace(hashRegExp, hash => + hashToNewHash.get(hash) + ); + return new RawSource(newContent); + } + ); + } + })()); + }; + const computeNewContentWithoutOwn = asset => { + if (asset.contentComputeWithoutOwnPromise) + return asset.contentComputeWithoutOwnPromise; + return (asset.contentComputeWithoutOwnPromise = (async () => { + if ( + asset.ownHashes.size > 0 || + Array.from(asset.referencedHashes).some( + hash => hashToNewHash.get(hash) !== hash + ) + ) { + const identifier = asset.name + "|without-own"; + const etag = getEtag(asset); + asset.newSourceWithoutOwn = await cacheGenerate.providePromise( + identifier, + etag, + () => { + const newContent = asset.content.replace( + hashRegExp, + hash => { + if (asset.ownHashes.has(hash)) { + return ""; + } + return hashToNewHash.get(hash); + } + ); + return new RawSource(newContent); + } + ); + } + })()); + }; + const comparator = compareSelect(a => a.name, compareStrings); + for (const oldHash of hashesInOrder) { + const assets = hashToAssets.get(oldHash); + assets.sort(comparator); + const hash = createHash(this._hashFunction); + await Promise.all( + assets.map(asset => + asset.ownHashes.has(oldHash) + ? computeNewContentWithoutOwn(asset) + : computeNewContent(asset) + ) + ); + const assetsContent = assets.map(asset => { + if (asset.ownHashes.has(oldHash)) { + return asset.newSourceWithoutOwn + ? asset.newSourceWithoutOwn.buffer() + : asset.source.buffer(); + } else { + return asset.newSource + ? asset.newSource.buffer() + : asset.source.buffer(); + } + }); + let newHash = hooks.updateHash.call(assetsContent, oldHash); + if (!newHash) { + for (const content of assetsContent) { + hash.update(content); + } + const digest = hash.digest(this._hashDigest); + newHash = /** @type {string} */ (digest.slice(0, oldHash.length)); + } + hashToNewHash.set(oldHash, newHash); + } + await Promise.all( + assetsWithInfo.map(async asset => { + await computeNewContent(asset); + const newName = asset.name.replace(hashRegExp, hash => + hashToNewHash.get(hash) + ); + + const infoUpdate = {}; + const hash = asset.info.contenthash; + infoUpdate.contenthash = Array.isArray(hash) + ? hash.map(hash => hashToNewHash.get(hash)) + : hashToNewHash.get(hash); + + if (asset.newSource !== undefined) { + compilation.updateAsset( + asset.name, + asset.newSource, + infoUpdate + ); + } else { + compilation.updateAsset(asset.name, asset.source, infoUpdate); + } + + if (asset.name !== newName) { + compilation.renameAsset(asset.name, newName); + } + }) + ); + } + ); + }); + } +} + +module.exports = RealContentHashPlugin; + + +/***/ }), + +/***/ 95245: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { STAGE_BASIC, STAGE_ADVANCED } = __webpack_require__(90412); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ + +class RemoveEmptyChunksPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("RemoveEmptyChunksPlugin", compilation => { + /** + * @param {Iterable} chunks the chunks array + * @returns {void} + */ + const handler = chunks => { + const chunkGraph = compilation.chunkGraph; + for (const chunk of chunks) { + if ( + chunkGraph.getNumberOfChunkModules(chunk) === 0 && + !chunk.hasRuntime() && + chunkGraph.getNumberOfEntryModules(chunk) === 0 + ) { + compilation.chunkGraph.disconnectChunk(chunk); + compilation.chunks.delete(chunk); + } + } + }; + + // TODO do it once + compilation.hooks.optimizeChunks.tap( + { + name: "RemoveEmptyChunksPlugin", + stage: STAGE_BASIC + }, + handler + ); + compilation.hooks.optimizeChunks.tap( + { + name: "RemoveEmptyChunksPlugin", + stage: STAGE_ADVANCED + }, + handler + ); + }); + } +} +module.exports = RemoveEmptyChunksPlugin; + + +/***/ }), + +/***/ 80699: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { STAGE_BASIC } = __webpack_require__(90412); +const Queue = __webpack_require__(85987); +const { intersect } = __webpack_require__(86088); + +/** @typedef {import("../Compiler")} Compiler */ + +class RemoveParentModulesPlugin { + /** + * @param {Compiler} compiler the compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("RemoveParentModulesPlugin", compilation => { + const handler = (chunks, chunkGroups) => { + const chunkGraph = compilation.chunkGraph; + const queue = new Queue(); + const availableModulesMap = new WeakMap(); + + for (const chunkGroup of compilation.entrypoints.values()) { + // initialize available modules for chunks without parents + availableModulesMap.set(chunkGroup, new Set()); + for (const child of chunkGroup.childrenIterable) { + queue.enqueue(child); + } + } + for (const chunkGroup of compilation.asyncEntrypoints) { + // initialize available modules for chunks without parents + availableModulesMap.set(chunkGroup, new Set()); + for (const child of chunkGroup.childrenIterable) { + queue.enqueue(child); + } + } + + while (queue.length > 0) { + const chunkGroup = queue.dequeue(); + let availableModules = availableModulesMap.get(chunkGroup); + let changed = false; + for (const parent of chunkGroup.parentsIterable) { + const availableModulesInParent = availableModulesMap.get(parent); + if (availableModulesInParent !== undefined) { + // If we know the available modules in parent: process these + if (availableModules === undefined) { + // if we have not own info yet: create new entry + availableModules = new Set(availableModulesInParent); + for (const chunk of parent.chunks) { + for (const m of chunkGraph.getChunkModulesIterable(chunk)) { + availableModules.add(m); + } + } + availableModulesMap.set(chunkGroup, availableModules); + changed = true; + } else { + for (const m of availableModules) { + if ( + !chunkGraph.isModuleInChunkGroup(m, parent) && + !availableModulesInParent.has(m) + ) { + availableModules.delete(m); + changed = true; + } + } + } + } + } + if (changed) { + // if something changed: enqueue our children + for (const child of chunkGroup.childrenIterable) { + queue.enqueue(child); + } + } + } + + // now we have available modules for every chunk + for (const chunk of chunks) { + const availableModulesSets = Array.from( + chunk.groupsIterable, + chunkGroup => availableModulesMap.get(chunkGroup) + ); + if (availableModulesSets.some(s => s === undefined)) continue; // No info about this chunk group + const availableModules = + availableModulesSets.length === 1 + ? availableModulesSets[0] + : intersect(availableModulesSets); + const numberOfModules = chunkGraph.getNumberOfChunkModules(chunk); + const toRemove = new Set(); + if (numberOfModules < availableModules.size) { + for (const m of chunkGraph.getChunkModulesIterable(chunk)) { + if (availableModules.has(m)) { + toRemove.add(m); + } + } + } else { + for (const m of availableModules) { + if (chunkGraph.isModuleInChunk(m, chunk)) { + toRemove.add(m); + } + } + } + for (const module of toRemove) { + chunkGraph.disconnectChunkAndModule(chunk, module); + } + } + }; + compilation.hooks.optimizeChunks.tap( + { + name: "RemoveParentModulesPlugin", + stage: STAGE_BASIC + }, + handler + ); + }); + } +} +module.exports = RemoveParentModulesPlugin; + + +/***/ }), + +/***/ 49151: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../Compiler")} Compiler */ + +class RuntimeChunkPlugin { + constructor(options) { + this.options = { + name: entrypoint => `runtime~${entrypoint.name}`, + ...options + }; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap("RuntimeChunkPlugin", compilation => { + compilation.hooks.addEntry.tap( + "RuntimeChunkPlugin", + (_, { name: entryName }) => { + if (entryName === undefined) return; + const data = compilation.entries.get(entryName); + if (!data.options.runtime && !data.options.dependOn) { + // Determine runtime chunk name + let name = this.options.name; + if (typeof name === "function") { + name = name({ name: entryName }); + } + data.options.runtime = name; + } + } + ); + }); + } +} + +module.exports = RuntimeChunkPlugin; + + +/***/ }), + +/***/ 72617: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const glob2regexp = __webpack_require__(25877); +const { STAGE_DEFAULT } = __webpack_require__(90412); +const HarmonyExportImportedSpecifierDependency = __webpack_require__(61621); +const HarmonyImportSpecifierDependency = __webpack_require__(71564); +const formatLocation = __webpack_require__(82476); + +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */ + +/** + * @typedef {Object} ExportInModule + * @property {Module} module the module + * @property {string} exportName the name of the export + * @property {boolean} checked if the export is conditional + */ + +/** + * @typedef {Object} ReexportInfo + * @property {Map} static + * @property {Map>} dynamic + */ + +/** @type {WeakMap>} */ +const globToRegexpCache = new WeakMap(); + +/** + * @param {string} glob the pattern + * @param {Map} cache the glob to RegExp cache + * @returns {RegExp} a regular expression + */ +const globToRegexp = (glob, cache) => { + const cacheEntry = cache.get(glob); + if (cacheEntry !== undefined) return cacheEntry; + if (!glob.includes("/")) { + glob = `**/${glob}`; + } + const baseRegexp = glob2regexp(glob, { globstar: true, extended: true }); + const regexpSource = baseRegexp.source; + const regexp = new RegExp("^(\\./)?" + regexpSource.slice(1)); + cache.set(glob, regexp); + return regexp; +}; + +class SideEffectsFlagPlugin { + /** + * @param {boolean} analyseSource analyse source code for side effects + */ + constructor(analyseSource = true) { + this._analyseSource = analyseSource; + } + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + let cache = globToRegexpCache.get(compiler.root); + if (cache === undefined) { + cache = new Map(); + globToRegexpCache.set(compiler.root, cache); + } + compiler.hooks.compilation.tap( + "SideEffectsFlagPlugin", + (compilation, { normalModuleFactory }) => { + const moduleGraph = compilation.moduleGraph; + normalModuleFactory.hooks.module.tap( + "SideEffectsFlagPlugin", + (module, data) => { + const resolveData = data.resourceResolveData; + if ( + resolveData && + resolveData.descriptionFileData && + resolveData.relativePath + ) { + const sideEffects = resolveData.descriptionFileData.sideEffects; + if (sideEffects !== undefined) { + if (module.factoryMeta === undefined) { + module.factoryMeta = {}; + } + const hasSideEffects = SideEffectsFlagPlugin.moduleHasSideEffects( + resolveData.relativePath, + sideEffects, + cache + ); + module.factoryMeta.sideEffectFree = !hasSideEffects; + } + } + + return module; + } + ); + normalModuleFactory.hooks.module.tap( + "SideEffectsFlagPlugin", + (module, data) => { + if (typeof data.settings.sideEffects === "boolean") { + if (module.factoryMeta === undefined) { + module.factoryMeta = {}; + } + module.factoryMeta.sideEffectFree = !data.settings.sideEffects; + } + return module; + } + ); + if (this._analyseSource) { + /** + * @param {JavascriptParser} parser the parser + * @returns {void} + */ + const parserHandler = parser => { + let sideEffectsStatement; + parser.hooks.program.tap("SideEffectsFlagPlugin", () => { + sideEffectsStatement = undefined; + }); + parser.hooks.statement.tap( + { name: "SideEffectsFlagPlugin", stage: -100 }, + statement => { + if (sideEffectsStatement) return; + if (parser.scope.topLevelScope !== true) return; + switch (statement.type) { + case "ExpressionStatement": + if ( + !parser.isPure(statement.expression, statement.range[0]) + ) { + sideEffectsStatement = statement; + } + break; + case "IfStatement": + case "WhileStatement": + case "DoWhileStatement": + if (!parser.isPure(statement.test, statement.range[0])) { + sideEffectsStatement = statement; + } + // statement hook will be called for child statements too + break; + case "ForStatement": + if ( + !parser.isPure(statement.init, statement.range[0]) || + !parser.isPure( + statement.test, + statement.init + ? statement.init.range[1] + : statement.range[0] + ) || + !parser.isPure( + statement.update, + statement.test + ? statement.test.range[1] + : statement.init + ? statement.init.range[1] + : statement.range[0] + ) + ) { + sideEffectsStatement = statement; + } + // statement hook will be called for child statements too + break; + case "SwitchStatement": + if ( + !parser.isPure(statement.discriminant, statement.range[0]) + ) { + sideEffectsStatement = statement; + } + // statement hook will be called for child statements too + break; + case "VariableDeclaration": + case "ClassDeclaration": + case "FunctionDeclaration": + if (!parser.isPure(statement, statement.range[0])) { + sideEffectsStatement = statement; + } + break; + case "ExportNamedDeclaration": + case "ExportDefaultDeclaration": + if ( + !parser.isPure(statement.declaration, statement.range[0]) + ) { + sideEffectsStatement = statement; + } + break; + case "LabeledStatement": + case "BlockStatement": + // statement hook will be called for child statements too + break; + case "EmptyStatement": + break; + case "ExportAllDeclaration": + case "ImportDeclaration": + // imports will be handled by the dependencies + break; + default: + sideEffectsStatement = statement; + break; + } + } + ); + parser.hooks.finish.tap("SideEffectsFlagPlugin", () => { + if (sideEffectsStatement === undefined) { + parser.state.module.buildMeta.sideEffectFree = true; + } else { + const { loc, type } = sideEffectsStatement; + moduleGraph + .getOptimizationBailout(parser.state.module) + .push( + () => + `Statement (${type}) with side effects in source code at ${formatLocation( + loc + )}` + ); + } + }); + }; + for (const key of [ + "javascript/auto", + "javascript/esm", + "javascript/dynamic" + ]) { + normalModuleFactory.hooks.parser + .for(key) + .tap("SideEffectsFlagPlugin", parserHandler); + } + } + compilation.hooks.optimizeDependencies.tap( + { + name: "SideEffectsFlagPlugin", + stage: STAGE_DEFAULT + }, + modules => { + const logger = compilation.getLogger( + "webpack.SideEffectsFlagPlugin" + ); + + logger.time("update dependencies"); + for (const module of modules) { + if (module.getSideEffectsConnectionState(moduleGraph) === false) { + const exportsInfo = moduleGraph.getExportsInfo(module); + for (const connection of moduleGraph.getIncomingConnections( + module + )) { + const dep = connection.dependency; + let isReexport; + if ( + (isReexport = + dep instanceof + HarmonyExportImportedSpecifierDependency) || + (dep instanceof HarmonyImportSpecifierDependency && + !dep.namespaceObjectAsContext) + ) { + // TODO improve for export * + if (isReexport && dep.name) { + const exportInfo = moduleGraph.getExportInfo( + connection.originModule, + dep.name + ); + exportInfo.moveTarget( + moduleGraph, + ({ module }) => + module.getSideEffectsConnectionState(moduleGraph) === + false + ); + } + // TODO improve for nested imports + const ids = dep.getIds(moduleGraph); + if (ids.length > 0) { + const exportInfo = exportsInfo.getExportInfo(ids[0]); + const target = exportInfo.getTarget( + moduleGraph, + ({ module }) => + module.getSideEffectsConnectionState(moduleGraph) === + false + ); + if (!target) continue; + + moduleGraph.updateModule(dep, target.module); + moduleGraph.addExplanation( + dep, + "(skipped side-effect-free modules)" + ); + dep.setIds( + moduleGraph, + target.export + ? [...target.export, ...ids.slice(1)] + : ids.slice(1) + ); + } + } + } + } + } + logger.timeEnd("update dependencies"); + } + ); + } + ); + } + + static moduleHasSideEffects(moduleName, flagValue, cache) { + switch (typeof flagValue) { + case "undefined": + return true; + case "boolean": + return flagValue; + case "string": + return globToRegexp(flagValue, cache).test(moduleName); + case "object": + return flagValue.some(glob => + SideEffectsFlagPlugin.moduleHasSideEffects(moduleName, glob, cache) + ); + } + } +} +module.exports = SideEffectsFlagPlugin; + + +/***/ }), + +/***/ 93384: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Chunk = __webpack_require__(92787); +const { STAGE_ADVANCED } = __webpack_require__(90412); +const WebpackError = __webpack_require__(24274); +const { requestToId } = __webpack_require__(65451); +const { isSubset } = __webpack_require__(86088); +const SortableSet = __webpack_require__(51326); +const { + compareModulesByIdentifier, + compareIterables +} = __webpack_require__(21699); +const createHash = __webpack_require__(34627); +const deterministicGrouping = __webpack_require__(88213); +const contextify = __webpack_require__(47779).contextify; +const memoize = __webpack_require__(18003); +const MinMaxSizeWarning = __webpack_require__(77877); + +/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksCacheGroup} OptimizationSplitChunksCacheGroup */ +/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksGetCacheGroups} OptimizationSplitChunksGetCacheGroups */ +/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksOptions} OptimizationSplitChunksOptions */ +/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksSizes} OptimizationSplitChunksSizes */ +/** @typedef {import("../../declarations/WebpackOptions").Output} OutputOptions */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {import("../Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("../Compilation").PathData} PathData */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../util/deterministicGrouping").GroupedItems} DeterministicGroupingGroupedItemsForModule */ +/** @typedef {import("../util/deterministicGrouping").Options} DeterministicGroupingOptionsForModule */ + +/** @typedef {Record} SplitChunksSizes */ + +/** + * @callback ChunkFilterFunction + * @param {Chunk} chunk + * @returns {boolean} + */ + +/** + * @callback CombineSizeFunction + * @param {number} a + * @param {number} b + * @returns {number} + */ + +/** + * @typedef {Object} CacheGroupSource + * @property {string=} key + * @property {number=} priority + * @property {GetName=} getName + * @property {ChunkFilterFunction=} chunksFilter + * @property {boolean=} enforce + * @property {SplitChunksSizes} minSize + * @property {SplitChunksSizes} minRemainingSize + * @property {SplitChunksSizes} enforceSizeThreshold + * @property {SplitChunksSizes} maxAsyncSize + * @property {SplitChunksSizes} maxInitialSize + * @property {number=} minChunks + * @property {number=} maxAsyncRequests + * @property {number=} maxInitialRequests + * @property {(string | function(PathData, AssetInfo=): string)=} filename + * @property {string=} idHint + * @property {string} automaticNameDelimiter + * @property {boolean=} reuseExistingChunk + * @property {boolean=} usedExports + */ + +/** + * @typedef {Object} CacheGroup + * @property {string} key + * @property {number=} priority + * @property {GetName=} getName + * @property {ChunkFilterFunction=} chunksFilter + * @property {SplitChunksSizes} minSize + * @property {SplitChunksSizes} minRemainingSize + * @property {SplitChunksSizes} enforceSizeThreshold + * @property {SplitChunksSizes} maxAsyncSize + * @property {SplitChunksSizes} maxInitialSize + * @property {number=} minChunks + * @property {number=} maxAsyncRequests + * @property {number=} maxInitialRequests + * @property {(string | function(PathData, AssetInfo=): string)=} filename + * @property {string=} idHint + * @property {string} automaticNameDelimiter + * @property {boolean} reuseExistingChunk + * @property {boolean} usedExports + * @property {boolean} _validateSize + * @property {boolean} _validateRemainingSize + * @property {SplitChunksSizes} _minSizeForMaxSize + * @property {boolean} _conditionalEnforce + */ + +/** + * @typedef {Object} FallbackCacheGroup + * @property {SplitChunksSizes} minSize + * @property {SplitChunksSizes} maxAsyncSize + * @property {SplitChunksSizes} maxInitialSize + * @property {string} automaticNameDelimiter + */ + +/** + * @typedef {Object} CacheGroupsContext + * @property {ModuleGraph} moduleGraph + * @property {ChunkGraph} chunkGraph + */ + +/** + * @callback GetCacheGroups + * @param {Module} module + * @param {CacheGroupsContext} context + * @returns {CacheGroupSource[]} + */ + +/** + * @callback GetName + * @param {Module=} module + * @param {Chunk[]=} chunks + * @param {string=} key + * @returns {string=} + */ + +/** + * @typedef {Object} SplitChunksOptions + * @property {ChunkFilterFunction} chunksFilter + * @property {string[]} defaultSizeTypes + * @property {SplitChunksSizes} minSize + * @property {SplitChunksSizes} minRemainingSize + * @property {SplitChunksSizes} enforceSizeThreshold + * @property {SplitChunksSizes} maxInitialSize + * @property {SplitChunksSizes} maxAsyncSize + * @property {number} minChunks + * @property {number} maxAsyncRequests + * @property {number} maxInitialRequests + * @property {boolean} hidePathInfo + * @property {string | function(PathData, AssetInfo=): string} filename + * @property {string} automaticNameDelimiter + * @property {GetCacheGroups} getCacheGroups + * @property {GetName} getName + * @property {boolean} usedExports + * @property {FallbackCacheGroup} fallbackCacheGroup + */ + +/** + * @typedef {Object} ChunksInfoItem + * @property {SortableSet} modules + * @property {CacheGroup} cacheGroup + * @property {number} cacheGroupIndex + * @property {string} name + * @property {Record} sizes + * @property {Set} chunks + * @property {Set} reuseableChunks + * @property {Set} chunksKeys + */ + +const defaultGetName = /** @type {GetName} */ (() => {}); + +const deterministicGroupingForModules = /** @type {function(DeterministicGroupingOptionsForModule): DeterministicGroupingGroupedItemsForModule[]} */ (deterministicGrouping); + +/** @type {WeakMap} */ +const getKeyCache = new WeakMap(); + +/** + * @param {string} name a filename to hash + * @param {OutputOptions} outputOptions hash function used + * @returns {string} hashed filename + */ +const hashFilename = (name, outputOptions) => { + const digest = /** @type {string} */ (createHash(outputOptions.hashFunction) + .update(name) + .digest(outputOptions.hashDigest)); + return digest.slice(0, 8); +}; + +/** + * @param {Chunk} chunk the chunk + * @returns {number} the number of requests + */ +const getRequests = chunk => { + let requests = 0; + for (const chunkGroup of chunk.groupsIterable) { + requests = Math.max(requests, chunkGroup.chunks.length); + } + return requests; +}; + +const mapObject = (obj, fn) => { + const newObj = Object.create(null); + for (const key of Object.keys(obj)) { + newObj[key] = fn(obj[key], key); + } + return newObj; +}; + +/** + * @template T + * @param {Set} a set + * @param {Set} b other set + * @returns {boolean} true if at least one item of a is in b + */ +const isOverlap = (a, b) => { + for (const item of a) { + if (b.has(item)) return true; + } + return false; +}; + +const compareModuleIterables = compareIterables(compareModulesByIdentifier); + +/** + * @param {ChunksInfoItem} a item + * @param {ChunksInfoItem} b item + * @returns {number} compare result + */ +const compareEntries = (a, b) => { + // 1. by priority + const diffPriority = a.cacheGroup.priority - b.cacheGroup.priority; + if (diffPriority) return diffPriority; + // 2. by number of chunks + const diffCount = a.chunks.size - b.chunks.size; + if (diffCount) return diffCount; + // 3. by size reduction + const aSizeReduce = totalSize(a.sizes) * (a.chunks.size - 1); + const bSizeReduce = totalSize(b.sizes) * (b.chunks.size - 1); + const diffSizeReduce = aSizeReduce - bSizeReduce; + if (diffSizeReduce) return diffSizeReduce; + // 4. by cache group index + const indexDiff = b.cacheGroupIndex - a.cacheGroupIndex; + if (indexDiff) return indexDiff; + // 5. by number of modules (to be able to compare by identifier) + const modulesA = a.modules; + const modulesB = b.modules; + const diff = modulesA.size - modulesB.size; + if (diff) return diff; + // 6. by module identifiers + modulesA.sort(); + modulesB.sort(); + return compareModuleIterables(modulesA, modulesB); +}; + +const INITIAL_CHUNK_FILTER = chunk => chunk.canBeInitial(); +const ASYNC_CHUNK_FILTER = chunk => !chunk.canBeInitial(); +const ALL_CHUNK_FILTER = chunk => true; + +/** + * @param {OptimizationSplitChunksSizes} value the sizes + * @param {string[]} defaultSizeTypes the default size types + * @returns {SplitChunksSizes} normalized representation + */ +const normalizeSizes = (value, defaultSizeTypes) => { + if (typeof value === "number") { + /** @type {Record} */ + const o = {}; + for (const sizeType of defaultSizeTypes) o[sizeType] = value; + return o; + } else if (typeof value === "object" && value !== null) { + return { ...value }; + } else { + return {}; + } +}; + +/** + * @param {...SplitChunksSizes} sizes the sizes + * @returns {SplitChunksSizes} the merged sizes + */ +const mergeSizes = (...sizes) => { + /** @type {SplitChunksSizes} */ + let merged = {}; + for (let i = sizes.length - 1; i >= 0; i--) { + merged = Object.assign(merged, sizes[i]); + } + return merged; +}; + +/** + * @param {SplitChunksSizes} sizes the sizes + * @returns {boolean} true, if there are sizes > 0 + */ +const hasNonZeroSizes = sizes => { + for (const key of Object.keys(sizes)) { + if (sizes[key] > 0) return true; + } + return false; +}; + +/** + * @param {SplitChunksSizes} a first sizes + * @param {SplitChunksSizes} b second sizes + * @param {CombineSizeFunction} combine a function to combine sizes + * @returns {SplitChunksSizes} the combine sizes + */ +const combineSizes = (a, b, combine) => { + const aKeys = new Set(Object.keys(a)); + const bKeys = new Set(Object.keys(b)); + /** @type {SplitChunksSizes} */ + const result = {}; + for (const key of aKeys) { + if (bKeys.has(key)) { + result[key] = combine(a[key], b[key]); + } else { + result[key] = a[key]; + } + } + for (const key of bKeys) { + if (!aKeys.has(key)) { + result[key] = b[key]; + } + } + return result; +}; + +/** + * @param {SplitChunksSizes} sizes the sizes + * @param {SplitChunksSizes} minSize the min sizes + * @returns {boolean} true if there are sizes and all existing sizes are at least `minSize` + */ +const checkMinSize = (sizes, minSize) => { + for (const key of Object.keys(minSize)) { + const size = sizes[key]; + if (size === undefined || size === 0) continue; + if (size < minSize[key]) return false; + } + return true; +}; + +/** + * @param {SplitChunksSizes} sizes the sizes + * @param {SplitChunksSizes} minSize the min sizes + * @returns {undefined | string[]} list of size types that are below min size + */ +const getViolatingMinSizes = (sizes, minSize) => { + let list; + for (const key of Object.keys(minSize)) { + const size = sizes[key]; + if (size === undefined || size === 0) continue; + if (size < minSize[key]) { + if (list === undefined) list = [key]; + else list.push(key); + } + } + return list; +}; + +/** + * @param {SplitChunksSizes} sizes the sizes + * @returns {number} the total size + */ +const totalSize = sizes => { + let size = 0; + for (const key of Object.keys(sizes)) { + size += sizes[key]; + } + return size; +}; + +/** + * @param {false|string|Function} name the chunk name + * @returns {GetName} a function to get the name of the chunk + */ +const normalizeName = name => { + if (typeof name === "string") { + return () => name; + } + if (typeof name === "function") { + return /** @type {GetName} */ (name); + } +}; + +/** + * @param {OptimizationSplitChunksCacheGroup["chunks"]} chunks the chunk filter option + * @returns {ChunkFilterFunction} the chunk filter function + */ +const normalizeChunksFilter = chunks => { + if (chunks === "initial") { + return INITIAL_CHUNK_FILTER; + } + if (chunks === "async") { + return ASYNC_CHUNK_FILTER; + } + if (chunks === "all") { + return ALL_CHUNK_FILTER; + } + if (typeof chunks === "function") { + return chunks; + } +}; + +/** + * @param {GetCacheGroups | Record} cacheGroups the cache group options + * @param {string[]} defaultSizeTypes the default size types + * @returns {GetCacheGroups} a function to get the cache groups + */ +const normalizeCacheGroups = (cacheGroups, defaultSizeTypes) => { + if (typeof cacheGroups === "function") { + return cacheGroups; + } + if (typeof cacheGroups === "object" && cacheGroups !== null) { + /** @type {(function(Module, CacheGroupsContext, CacheGroupSource[]): void)[]} */ + const handlers = []; + for (const key of Object.keys(cacheGroups)) { + const option = cacheGroups[key]; + if (option === false) { + continue; + } + if (typeof option === "string" || option instanceof RegExp) { + const source = createCacheGroupSource({}, key, defaultSizeTypes); + handlers.push((module, context, results) => { + if (checkTest(option, module, context)) { + results.push(source); + } + }); + } else if (typeof option === "function") { + const cache = new WeakMap(); + handlers.push((module, context, results) => { + const result = option(module); + if (result) { + const groups = Array.isArray(result) ? result : [result]; + for (const group of groups) { + const cachedSource = cache.get(group); + if (cachedSource !== undefined) { + results.push(cachedSource); + } else { + const source = createCacheGroupSource( + group, + key, + defaultSizeTypes + ); + cache.set(group, source); + results.push(source); + } + } + } + }); + } else { + const source = createCacheGroupSource(option, key, defaultSizeTypes); + handlers.push((module, context, results) => { + if ( + checkTest(option.test, module, context) && + checkModuleType(option.type, module) && + checkModuleLayer(option.layer, module) + ) { + results.push(source); + } + }); + } + } + /** + * @param {Module} module the current module + * @param {CacheGroupsContext} context the current context + * @returns {CacheGroupSource[]} the matching cache groups + */ + const fn = (module, context) => { + /** @type {CacheGroupSource[]} */ + let results = []; + for (const fn of handlers) { + fn(module, context, results); + } + return results; + }; + return fn; + } + return () => null; +}; + +/** + * @param {undefined|boolean|string|RegExp|Function} test test option + * @param {Module} module the module + * @param {CacheGroupsContext} context context object + * @returns {boolean} true, if the module should be selected + */ +const checkTest = (test, module, context) => { + if (test === undefined) return true; + if (typeof test === "function") { + return test(module, context); + } + if (typeof test === "boolean") return test; + if (typeof test === "string") { + const name = module.nameForCondition(); + return name && name.startsWith(test); + } + if (test instanceof RegExp) { + const name = module.nameForCondition(); + return name && test.test(name); + } + return false; +}; + +/** + * @param {undefined|string|RegExp|Function} test type option + * @param {Module} module the module + * @returns {boolean} true, if the module should be selected + */ +const checkModuleType = (test, module) => { + if (test === undefined) return true; + if (typeof test === "function") { + return test(module.type); + } + if (typeof test === "string") { + const type = module.type; + return test === type; + } + if (test instanceof RegExp) { + const type = module.type; + return test.test(type); + } + return false; +}; + +/** + * @param {undefined|string|RegExp|Function} test type option + * @param {Module} module the module + * @returns {boolean} true, if the module should be selected + */ +const checkModuleLayer = (test, module) => { + if (test === undefined) return true; + if (typeof test === "function") { + return test(module.layer); + } + if (typeof test === "string") { + const layer = module.layer; + return test === "" ? !layer : layer && layer.startsWith(test); + } + if (test instanceof RegExp) { + const layer = module.layer; + return test.test(layer); + } + return false; +}; + +/** + * @param {OptimizationSplitChunksCacheGroup} options the group options + * @param {string} key key of cache group + * @param {string[]} defaultSizeTypes the default size types + * @returns {CacheGroupSource} the normalized cached group + */ +const createCacheGroupSource = (options, key, defaultSizeTypes) => { + const minSize = normalizeSizes(options.minSize, defaultSizeTypes); + const maxSize = normalizeSizes(options.maxSize, defaultSizeTypes); + return { + key, + priority: options.priority, + getName: normalizeName(options.name), + chunksFilter: normalizeChunksFilter(options.chunks), + enforce: options.enforce, + minSize, + minRemainingSize: mergeSizes( + normalizeSizes(options.minRemainingSize, defaultSizeTypes), + minSize + ), + enforceSizeThreshold: normalizeSizes( + options.enforceSizeThreshold, + defaultSizeTypes + ), + maxAsyncSize: mergeSizes( + normalizeSizes(options.maxAsyncSize, defaultSizeTypes), + maxSize + ), + maxInitialSize: mergeSizes( + normalizeSizes(options.maxInitialSize, defaultSizeTypes), + maxSize + ), + minChunks: options.minChunks, + maxAsyncRequests: options.maxAsyncRequests, + maxInitialRequests: options.maxInitialRequests, + filename: options.filename, + idHint: options.idHint, + automaticNameDelimiter: options.automaticNameDelimiter, + reuseExistingChunk: options.reuseExistingChunk, + usedExports: options.usedExports + }; +}; + +module.exports = class SplitChunksPlugin { + /** + * @param {OptimizationSplitChunksOptions=} options plugin options + */ + constructor(options = {}) { + const defaultSizeTypes = options.defaultSizeTypes || [ + "javascript", + "unknown" + ]; + const fallbackCacheGroup = options.fallbackCacheGroup || {}; + const minSize = normalizeSizes(options.minSize, defaultSizeTypes); + const maxSize = normalizeSizes(options.maxSize, defaultSizeTypes); + + /** @type {SplitChunksOptions} */ + this.options = { + chunksFilter: normalizeChunksFilter(options.chunks || "all"), + defaultSizeTypes, + minSize, + minRemainingSize: mergeSizes( + normalizeSizes(options.minRemainingSize, defaultSizeTypes), + minSize + ), + enforceSizeThreshold: normalizeSizes( + options.enforceSizeThreshold, + defaultSizeTypes + ), + maxAsyncSize: mergeSizes( + normalizeSizes(options.maxAsyncSize, defaultSizeTypes), + maxSize + ), + maxInitialSize: mergeSizes( + normalizeSizes(options.maxInitialSize, defaultSizeTypes), + maxSize + ), + minChunks: options.minChunks || 1, + maxAsyncRequests: options.maxAsyncRequests || 1, + maxInitialRequests: options.maxInitialRequests || 1, + hidePathInfo: options.hidePathInfo || false, + filename: options.filename || undefined, + getCacheGroups: normalizeCacheGroups( + options.cacheGroups, + defaultSizeTypes + ), + getName: options.name ? normalizeName(options.name) : defaultGetName, + automaticNameDelimiter: options.automaticNameDelimiter, + usedExports: options.usedExports, + fallbackCacheGroup: { + minSize: mergeSizes( + normalizeSizes(fallbackCacheGroup.minSize, defaultSizeTypes), + minSize + ), + maxAsyncSize: mergeSizes( + normalizeSizes(fallbackCacheGroup.maxAsyncSize, defaultSizeTypes), + normalizeSizes(fallbackCacheGroup.maxSize, defaultSizeTypes), + normalizeSizes(options.maxAsyncSize, defaultSizeTypes), + normalizeSizes(options.maxSize, defaultSizeTypes) + ), + maxInitialSize: mergeSizes( + normalizeSizes(fallbackCacheGroup.maxInitialSize, defaultSizeTypes), + normalizeSizes(fallbackCacheGroup.maxSize, defaultSizeTypes), + normalizeSizes(options.maxInitialSize, defaultSizeTypes), + normalizeSizes(options.maxSize, defaultSizeTypes) + ), + automaticNameDelimiter: + fallbackCacheGroup.automaticNameDelimiter || + options.automaticNameDelimiter || + "~" + } + }; + + /** @type {WeakMap} */ + this._cacheGroupCache = new WeakMap(); + } + + /** + * @param {CacheGroupSource} cacheGroupSource source + * @returns {CacheGroup} the cache group (cached) + */ + _getCacheGroup(cacheGroupSource) { + const cacheEntry = this._cacheGroupCache.get(cacheGroupSource); + if (cacheEntry !== undefined) return cacheEntry; + const minSize = mergeSizes( + cacheGroupSource.minSize, + cacheGroupSource.enforce ? undefined : this.options.minSize + ); + const minRemainingSize = mergeSizes( + cacheGroupSource.minRemainingSize, + cacheGroupSource.enforce ? undefined : this.options.minRemainingSize + ); + const enforceSizeThreshold = mergeSizes( + cacheGroupSource.enforceSizeThreshold, + cacheGroupSource.enforce ? undefined : this.options.enforceSizeThreshold + ); + const cacheGroup = { + key: cacheGroupSource.key, + priority: cacheGroupSource.priority || 0, + chunksFilter: cacheGroupSource.chunksFilter || this.options.chunksFilter, + minSize, + minRemainingSize, + enforceSizeThreshold, + maxAsyncSize: mergeSizes( + cacheGroupSource.maxAsyncSize, + cacheGroupSource.enforce ? undefined : this.options.maxAsyncSize + ), + maxInitialSize: mergeSizes( + cacheGroupSource.maxInitialSize, + cacheGroupSource.enforce ? undefined : this.options.maxInitialSize + ), + minChunks: + cacheGroupSource.minChunks !== undefined + ? cacheGroupSource.minChunks + : cacheGroupSource.enforce + ? 1 + : this.options.minChunks, + maxAsyncRequests: + cacheGroupSource.maxAsyncRequests !== undefined + ? cacheGroupSource.maxAsyncRequests + : cacheGroupSource.enforce + ? Infinity + : this.options.maxAsyncRequests, + maxInitialRequests: + cacheGroupSource.maxInitialRequests !== undefined + ? cacheGroupSource.maxInitialRequests + : cacheGroupSource.enforce + ? Infinity + : this.options.maxInitialRequests, + getName: + cacheGroupSource.getName !== undefined + ? cacheGroupSource.getName + : this.options.getName, + usedExports: + cacheGroupSource.usedExports !== undefined + ? cacheGroupSource.usedExports + : this.options.usedExports, + filename: + cacheGroupSource.filename !== undefined + ? cacheGroupSource.filename + : this.options.filename, + automaticNameDelimiter: + cacheGroupSource.automaticNameDelimiter !== undefined + ? cacheGroupSource.automaticNameDelimiter + : this.options.automaticNameDelimiter, + idHint: + cacheGroupSource.idHint !== undefined + ? cacheGroupSource.idHint + : cacheGroupSource.key, + reuseExistingChunk: cacheGroupSource.reuseExistingChunk || false, + _validateSize: hasNonZeroSizes(minSize), + _validateRemainingSize: hasNonZeroSizes(minRemainingSize), + _minSizeForMaxSize: mergeSizes( + cacheGroupSource.minSize, + this.options.minSize + ), + _conditionalEnforce: hasNonZeroSizes(enforceSizeThreshold) + }; + this._cacheGroupCache.set(cacheGroupSource, cacheGroup); + return cacheGroup; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const cachedContextify = contextify.bindContextCache( + compiler.context, + compiler.root + ); + compiler.hooks.thisCompilation.tap("SplitChunksPlugin", compilation => { + const logger = compilation.getLogger("webpack.SplitChunksPlugin"); + let alreadyOptimized = false; + compilation.hooks.unseal.tap("SplitChunksPlugin", () => { + alreadyOptimized = false; + }); + compilation.hooks.optimizeChunks.tap( + { + name: "SplitChunksPlugin", + stage: STAGE_ADVANCED + }, + chunks => { + if (alreadyOptimized) return; + alreadyOptimized = true; + logger.time("prepare"); + const chunkGraph = compilation.chunkGraph; + const moduleGraph = compilation.moduleGraph; + // Give each selected chunk an index (to create strings from chunks) + /** @type {Map} */ + const chunkIndexMap = new Map(); + const ZERO = BigInt("0"); + const ONE = BigInt("1"); + let index = ONE; + for (const chunk of chunks) { + chunkIndexMap.set(chunk, index); + index = index << ONE; + } + /** + * @param {Iterable} chunks list of chunks + * @returns {bigint | Chunk} key of the chunks + */ + const getKey = chunks => { + const iterator = chunks[Symbol.iterator](); + let result = iterator.next(); + if (result.done) return ZERO; + const first = result.value; + result = iterator.next(); + if (result.done) return first; + let key = + chunkIndexMap.get(first) | chunkIndexMap.get(result.value); + while (!(result = iterator.next()).done) { + key = key | chunkIndexMap.get(result.value); + } + return key; + }; + const keyToString = key => { + if (typeof key === "bigint") return key.toString(16); + return chunkIndexMap.get(key).toString(16); + }; + + const getChunkSetsInGraph = memoize(() => { + /** @type {Map>} */ + const chunkSetsInGraph = new Map(); + /** @type {Set} */ + const singleChunkSets = new Set(); + for (const module of compilation.modules) { + const chunks = chunkGraph.getModuleChunksIterable(module); + const chunksKey = getKey(chunks); + if (typeof chunksKey === "bigint") { + if (!chunkSetsInGraph.has(chunksKey)) { + chunkSetsInGraph.set(chunksKey, new Set(chunks)); + } + } else { + singleChunkSets.add(chunksKey); + } + } + return { chunkSetsInGraph, singleChunkSets }; + }); + + /** + * @param {Module} module the module + * @returns {Iterable} groups of chunks with equal exports + */ + const groupChunksByExports = module => { + const exportsInfo = moduleGraph.getExportsInfo(module); + const groupedByUsedExports = new Map(); + for (const chunk of chunkGraph.getModuleChunksIterable(module)) { + const key = exportsInfo.getUsageKey(chunk.runtime); + const list = groupedByUsedExports.get(key); + if (list !== undefined) { + list.push(chunk); + } else { + groupedByUsedExports.set(key, [chunk]); + } + } + return groupedByUsedExports.values(); + }; + + /** @type {Map>} */ + const groupedByExportsMap = new Map(); + + const getExportsChunkSetsInGraph = memoize(() => { + /** @type {Map>} */ + const chunkSetsInGraph = new Map(); + /** @type {Set} */ + const singleChunkSets = new Set(); + for (const module of compilation.modules) { + const groupedChunks = Array.from(groupChunksByExports(module)); + groupedByExportsMap.set(module, groupedChunks); + for (const chunks of groupedChunks) { + if (chunks.length === 1) { + singleChunkSets.add(chunks[0]); + } else { + const chunksKey = /** @type {bigint} */ (getKey(chunks)); + if (!chunkSetsInGraph.has(chunksKey)) { + chunkSetsInGraph.set(chunksKey, new Set(chunks)); + } + } + } + } + return { chunkSetsInGraph, singleChunkSets }; + }); + + // group these set of chunks by count + // to allow to check less sets via isSubset + // (only smaller sets can be subset) + const groupChunkSetsByCount = chunkSets => { + /** @type {Map>>} */ + const chunkSetsByCount = new Map(); + for (const chunksSet of chunkSets) { + const count = chunksSet.size; + let array = chunkSetsByCount.get(count); + if (array === undefined) { + array = []; + chunkSetsByCount.set(count, array); + } + array.push(chunksSet); + } + return chunkSetsByCount; + }; + const getChunkSetsByCount = memoize(() => + groupChunkSetsByCount( + getChunkSetsInGraph().chunkSetsInGraph.values() + ) + ); + const getExportsChunkSetsByCount = memoize(() => + groupChunkSetsByCount( + getExportsChunkSetsInGraph().chunkSetsInGraph.values() + ) + ); + + // Create a list of possible combinations + const createGetCombinations = ( + chunkSets, + singleChunkSets, + chunkSetsByCount + ) => { + /** @type {Map | Chunk)[]>} */ + const combinationsCache = new Map(); + + return key => { + const cacheEntry = combinationsCache.get(key); + if (cacheEntry !== undefined) return cacheEntry; + if (key instanceof Chunk) { + const result = [key]; + combinationsCache.set(key, result); + return result; + } + const chunksSet = chunkSets.get(key); + /** @type {(Set | Chunk)[]} */ + const array = [chunksSet]; + for (const [count, setArray] of chunkSetsByCount) { + // "equal" is not needed because they would have been merge in the first step + if (count < chunksSet.size) { + for (const set of setArray) { + if (isSubset(chunksSet, set)) { + array.push(set); + } + } + } + } + for (const chunk of singleChunkSets) { + if (chunksSet.has(chunk)) { + array.push(chunk); + } + } + combinationsCache.set(key, array); + return array; + }; + }; + + const getCombinationsFactory = memoize(() => { + const { chunkSetsInGraph, singleChunkSets } = getChunkSetsInGraph(); + return createGetCombinations( + chunkSetsInGraph, + singleChunkSets, + getChunkSetsByCount() + ); + }); + const getCombinations = key => getCombinationsFactory()(key); + + const getExportsCombinationsFactory = memoize(() => { + const { + chunkSetsInGraph, + singleChunkSets + } = getExportsChunkSetsInGraph(); + return createGetCombinations( + chunkSetsInGraph, + singleChunkSets, + getExportsChunkSetsByCount() + ); + }); + const getExportsCombinations = key => + getExportsCombinationsFactory()(key); + + /** + * @typedef {Object} SelectedChunksResult + * @property {Chunk[]} chunks the list of chunks + * @property {bigint | Chunk} key a key of the list + */ + + /** @type {WeakMap | Chunk, WeakMap>} */ + const selectedChunksCacheByChunksSet = new WeakMap(); + + /** + * get list and key by applying the filter function to the list + * It is cached for performance reasons + * @param {Set | Chunk} chunks list of chunks + * @param {ChunkFilterFunction} chunkFilter filter function for chunks + * @returns {SelectedChunksResult} list and key + */ + const getSelectedChunks = (chunks, chunkFilter) => { + let entry = selectedChunksCacheByChunksSet.get(chunks); + if (entry === undefined) { + entry = new WeakMap(); + selectedChunksCacheByChunksSet.set(chunks, entry); + } + /** @type {SelectedChunksResult} */ + let entry2 = entry.get(chunkFilter); + if (entry2 === undefined) { + /** @type {Chunk[]} */ + const selectedChunks = []; + if (chunks instanceof Chunk) { + if (chunkFilter(chunks)) selectedChunks.push(chunks); + } else { + for (const chunk of chunks) { + if (chunkFilter(chunk)) selectedChunks.push(chunk); + } + } + entry2 = { + chunks: selectedChunks, + key: getKey(selectedChunks) + }; + entry.set(chunkFilter, entry2); + } + return entry2; + }; + + /** @type {Map} */ + const alreadyValidatedParents = new Map(); + /** @type {Set} */ + const alreadyReportedErrors = new Set(); + + // Map a list of chunks to a list of modules + // For the key the chunk "index" is used, the value is a SortableSet of modules + /** @type {Map} */ + const chunksInfoMap = new Map(); + + /** + * @param {CacheGroup} cacheGroup the current cache group + * @param {number} cacheGroupIndex the index of the cache group of ordering + * @param {Chunk[]} selectedChunks chunks selected for this module + * @param {bigint | Chunk} selectedChunksKey a key of selectedChunks + * @param {Module} module the current module + * @returns {void} + */ + const addModuleToChunksInfoMap = ( + cacheGroup, + cacheGroupIndex, + selectedChunks, + selectedChunksKey, + module + ) => { + // Break if minimum number of chunks is not reached + if (selectedChunks.length < cacheGroup.minChunks) return; + // Determine name for split chunk + const name = cacheGroup.getName( + module, + selectedChunks, + cacheGroup.key + ); + // Check if the name is ok + const existingChunk = compilation.namedChunks.get(name); + if (existingChunk) { + const parentValidationKey = `${name}|${ + typeof selectedChunksKey === "bigint" + ? selectedChunksKey + : selectedChunksKey.debugId + }`; + const valid = alreadyValidatedParents.get(parentValidationKey); + if (valid === false) return; + if (valid === undefined) { + // Module can only be moved into the existing chunk if the existing chunk + // is a parent of all selected chunks + let isInAllParents = true; + /** @type {Set} */ + const queue = new Set(); + for (const chunk of selectedChunks) { + for (const group of chunk.groupsIterable) { + queue.add(group); + } + } + for (const group of queue) { + if (existingChunk.isInGroup(group)) continue; + let hasParent = false; + for (const parent of group.parentsIterable) { + hasParent = true; + queue.add(parent); + } + if (!hasParent) { + isInAllParents = false; + } + } + const valid = isInAllParents; + alreadyValidatedParents.set(parentValidationKey, valid); + if (!valid) { + if (!alreadyReportedErrors.has(name)) { + alreadyReportedErrors.add(name); + compilation.errors.push( + new WebpackError( + "SplitChunksPlugin\n" + + `Cache group "${cacheGroup.key}" conflicts with existing chunk.\n` + + `Both have the same name "${name}" and existing chunk is not a parent of the selected modules.\n` + + "Use a different name for the cache group or make sure that the existing chunk is a parent (e. g. via dependsOn).\n" + + 'HINT: You can omit "name" to automatically create a name.\n' + + "BREAKING CHANGE: webpack < 5 used to allow to use an entrypoint as splitChunk. " + + "This is no longer allowed when the entrypoint is not a parent of the selected modules.\n" + + "Remove this entrypoint and add modules to cache group's 'test' instead. " + + "If you need modules to be evaluated on startup, add them to the existing entrypoints (make them arrays). " + + "See migration guide of more info." + ) + ); + } + return; + } + } + } + // Create key for maps + // When it has a name we use the name as key + // Otherwise we create the key from chunks and cache group key + // This automatically merges equal names + const key = + cacheGroup.key + + (name + ? ` name:${name}` + : ` chunks:${keyToString(selectedChunksKey)}`); + // Add module to maps + let info = chunksInfoMap.get(key); + if (info === undefined) { + chunksInfoMap.set( + key, + (info = { + modules: new SortableSet( + undefined, + compareModulesByIdentifier + ), + cacheGroup, + cacheGroupIndex, + name, + sizes: {}, + chunks: new Set(), + reuseableChunks: new Set(), + chunksKeys: new Set() + }) + ); + } + const oldSize = info.modules.size; + info.modules.add(module); + if (info.modules.size !== oldSize) { + for (const type of module.getSourceTypes()) { + info.sizes[type] = (info.sizes[type] || 0) + module.size(type); + } + } + const oldChunksKeysSize = info.chunksKeys.size; + info.chunksKeys.add(selectedChunksKey); + if (oldChunksKeysSize !== info.chunksKeys.size) { + for (const chunk of selectedChunks) { + info.chunks.add(chunk); + } + } + }; + + const context = { + moduleGraph, + chunkGraph + }; + + logger.timeEnd("prepare"); + + logger.time("modules"); + + // Walk through all modules + for (const module of compilation.modules) { + // Get cache group + let cacheGroups = this.options.getCacheGroups(module, context); + if (!Array.isArray(cacheGroups) || cacheGroups.length === 0) { + continue; + } + + // Prepare some values (usedExports = false) + const getCombs = memoize(() => { + const chunks = chunkGraph.getModuleChunksIterable(module); + const chunksKey = getKey(chunks); + return getCombinations(chunksKey); + }); + + // Prepare some values (usedExports = true) + const getCombsByUsedExports = memoize(() => { + // fill the groupedByExportsMap + getExportsChunkSetsInGraph(); + /** @type {Set | Chunk>} */ + const set = new Set(); + const groupedByUsedExports = groupedByExportsMap.get(module); + for (const chunks of groupedByUsedExports) { + const chunksKey = getKey(chunks); + for (const comb of getExportsCombinations(chunksKey)) + set.add(comb); + } + return set; + }); + + let cacheGroupIndex = 0; + for (const cacheGroupSource of cacheGroups) { + const cacheGroup = this._getCacheGroup(cacheGroupSource); + + const combs = cacheGroup.usedExports + ? getCombsByUsedExports() + : getCombs(); + // For all combination of chunk selection + for (const chunkCombination of combs) { + // Break if minimum number of chunks is not reached + const count = + chunkCombination instanceof Chunk ? 1 : chunkCombination.size; + if (count < cacheGroup.minChunks) continue; + // Select chunks by configuration + const { + chunks: selectedChunks, + key: selectedChunksKey + } = getSelectedChunks( + chunkCombination, + cacheGroup.chunksFilter + ); + + addModuleToChunksInfoMap( + cacheGroup, + cacheGroupIndex, + selectedChunks, + selectedChunksKey, + module + ); + } + cacheGroupIndex++; + } + } + + logger.timeEnd("modules"); + + logger.time("queue"); + + /** + * @param {ChunksInfoItem} info entry + * @param {string[]} sourceTypes source types to be removed + */ + const removeModulesWithSourceType = (info, sourceTypes) => { + for (const module of info.modules) { + const types = module.getSourceTypes(); + if (sourceTypes.some(type => types.has(type))) { + info.modules.delete(module); + for (const type of types) { + info.sizes[type] -= module.size(type); + } + } + } + }; + + /** + * @param {ChunksInfoItem} info entry + * @returns {boolean} true, if entry become empty + */ + const removeMinSizeViolatingModules = info => { + if (!info.cacheGroup._validateSize) return false; + const violatingSizes = getViolatingMinSizes( + info.sizes, + info.cacheGroup.minSize + ); + if (violatingSizes === undefined) return false; + removeModulesWithSourceType(info, violatingSizes); + return info.modules.size === 0; + }; + + // Filter items were size < minSize + for (const [key, info] of chunksInfoMap) { + if (removeMinSizeViolatingModules(info)) { + chunksInfoMap.delete(key); + } + } + + /** + * @typedef {Object} MaxSizeQueueItem + * @property {SplitChunksSizes} minSize + * @property {SplitChunksSizes} maxAsyncSize + * @property {SplitChunksSizes} maxInitialSize + * @property {string} automaticNameDelimiter + * @property {string[]} keys + */ + + /** @type {Map} */ + const maxSizeQueueMap = new Map(); + + while (chunksInfoMap.size > 0) { + // Find best matching entry + let bestEntryKey; + let bestEntry; + for (const pair of chunksInfoMap) { + const key = pair[0]; + const info = pair[1]; + if ( + bestEntry === undefined || + compareEntries(bestEntry, info) < 0 + ) { + bestEntry = info; + bestEntryKey = key; + } + } + + const item = bestEntry; + chunksInfoMap.delete(bestEntryKey); + + let chunkName = item.name; + // Variable for the new chunk (lazy created) + /** @type {Chunk} */ + let newChunk; + // When no chunk name, check if we can reuse a chunk instead of creating a new one + let isExistingChunk = false; + let isReusedWithAllModules = false; + if (chunkName) { + const chunkByName = compilation.namedChunks.get(chunkName); + if (chunkByName !== undefined) { + newChunk = chunkByName; + const oldSize = item.chunks.size; + item.chunks.delete(newChunk); + isExistingChunk = item.chunks.size !== oldSize; + } + } else if (item.cacheGroup.reuseExistingChunk) { + outer: for (const chunk of item.chunks) { + if ( + chunkGraph.getNumberOfChunkModules(chunk) !== + item.modules.size + ) { + continue; + } + if (chunkGraph.getNumberOfEntryModules(chunk) > 0) { + continue; + } + for (const module of item.modules) { + if (!chunkGraph.isModuleInChunk(module, chunk)) { + continue outer; + } + } + if (!newChunk || !newChunk.name) { + newChunk = chunk; + } else if ( + chunk.name && + chunk.name.length < newChunk.name.length + ) { + newChunk = chunk; + } else if ( + chunk.name && + chunk.name.length === newChunk.name.length && + chunk.name < newChunk.name + ) { + newChunk = chunk; + } + } + if (newChunk) { + item.chunks.delete(newChunk); + chunkName = undefined; + isExistingChunk = true; + isReusedWithAllModules = true; + } + } + + const enforced = + item.cacheGroup._conditionalEnforce && + checkMinSize(item.sizes, item.cacheGroup.enforceSizeThreshold); + + const usedChunks = new Set(item.chunks); + + // Check if maxRequests condition can be fulfilled + if ( + !enforced && + (Number.isFinite(item.cacheGroup.maxInitialRequests) || + Number.isFinite(item.cacheGroup.maxAsyncRequests)) + ) { + for (const chunk of usedChunks) { + // respect max requests + const maxRequests = chunk.isOnlyInitial() + ? item.cacheGroup.maxInitialRequests + : chunk.canBeInitial() + ? Math.min( + item.cacheGroup.maxInitialRequests, + item.cacheGroup.maxAsyncRequests + ) + : item.cacheGroup.maxAsyncRequests; + if ( + isFinite(maxRequests) && + getRequests(chunk) >= maxRequests + ) { + usedChunks.delete(chunk); + } + } + } + + outer: for (const chunk of usedChunks) { + for (const module of item.modules) { + if (chunkGraph.isModuleInChunk(module, chunk)) continue outer; + } + usedChunks.delete(chunk); + } + + // Were some (invalid) chunks removed from usedChunks? + // => readd all modules to the queue, as things could have been changed + if (usedChunks.size < item.chunks.size) { + if (isExistingChunk) usedChunks.add(newChunk); + if (usedChunks.size >= item.cacheGroup.minChunks) { + const chunksArr = Array.from(usedChunks); + for (const module of item.modules) { + addModuleToChunksInfoMap( + item.cacheGroup, + item.cacheGroupIndex, + chunksArr, + getKey(usedChunks), + module + ); + } + } + continue; + } + + // Validate minRemainingSize constraint when a single chunk is left over + if ( + !enforced && + item.cacheGroup._validateRemainingSize && + usedChunks.size === 1 + ) { + const [chunk] = usedChunks; + let chunkSizes = Object.create(null); + for (const module of chunkGraph.getChunkModulesIterable(chunk)) { + if (!item.modules.has(module)) { + for (const type of module.getSourceTypes()) { + chunkSizes[type] = + (chunkSizes[type] || 0) + module.size(type); + } + } + } + const violatingSizes = getViolatingMinSizes( + chunkSizes, + item.cacheGroup.minRemainingSize + ); + if (violatingSizes !== undefined) { + const oldModulesSize = item.modules.size; + removeModulesWithSourceType(item, violatingSizes); + if ( + item.modules.size > 0 && + item.modules.size !== oldModulesSize + ) { + // queue this item again to be processed again + // without violating modules + chunksInfoMap.set(bestEntryKey, item); + } + continue; + } + } + + // Create the new chunk if not reusing one + if (newChunk === undefined) { + newChunk = compilation.addChunk(chunkName); + } + // Walk through all chunks + for (const chunk of usedChunks) { + // Add graph connections for splitted chunk + chunk.split(newChunk); + } + + // Add a note to the chunk + newChunk.chunkReason = + (newChunk.chunkReason ? newChunk.chunkReason + ", " : "") + + (isReusedWithAllModules + ? "reused as split chunk" + : "split chunk"); + if (item.cacheGroup.key) { + newChunk.chunkReason += ` (cache group: ${item.cacheGroup.key})`; + } + if (chunkName) { + newChunk.chunkReason += ` (name: ${chunkName})`; + } + if (item.cacheGroup.filename) { + newChunk.filenameTemplate = item.cacheGroup.filename; + } + if (item.cacheGroup.idHint) { + newChunk.idNameHints.add(item.cacheGroup.idHint); + } + if (!isReusedWithAllModules) { + // Add all modules to the new chunk + for (const module of item.modules) { + if (!module.chunkCondition(newChunk, compilation)) continue; + // Add module to new chunk + chunkGraph.connectChunkAndModule(newChunk, module); + // Remove module from used chunks + for (const chunk of usedChunks) { + chunkGraph.disconnectChunkAndModule(chunk, module); + } + } + } else { + // Remove all modules from used chunks + for (const module of item.modules) { + for (const chunk of usedChunks) { + chunkGraph.disconnectChunkAndModule(chunk, module); + } + } + } + + if ( + Object.keys(item.cacheGroup.maxAsyncSize).length > 0 || + Object.keys(item.cacheGroup.maxInitialSize).length > 0 + ) { + const oldMaxSizeSettings = maxSizeQueueMap.get(newChunk); + maxSizeQueueMap.set(newChunk, { + minSize: oldMaxSizeSettings + ? combineSizes( + oldMaxSizeSettings.minSize, + item.cacheGroup._minSizeForMaxSize, + Math.max + ) + : item.cacheGroup.minSize, + maxAsyncSize: oldMaxSizeSettings + ? combineSizes( + oldMaxSizeSettings.maxAsyncSize, + item.cacheGroup.maxAsyncSize, + Math.min + ) + : item.cacheGroup.maxAsyncSize, + maxInitialSize: oldMaxSizeSettings + ? combineSizes( + oldMaxSizeSettings.maxInitialSize, + item.cacheGroup.maxInitialSize, + Math.min + ) + : item.cacheGroup.maxInitialSize, + automaticNameDelimiter: item.cacheGroup.automaticNameDelimiter, + keys: oldMaxSizeSettings + ? oldMaxSizeSettings.keys.concat(item.cacheGroup.key) + : [item.cacheGroup.key] + }); + } + + // remove all modules from other entries and update size + for (const [key, info] of chunksInfoMap) { + if (isOverlap(info.chunks, usedChunks)) { + // update modules and total size + // may remove it from the map when < minSize + let updated = false; + for (const module of item.modules) { + if (info.modules.has(module)) { + // remove module + info.modules.delete(module); + // update size + for (const key of module.getSourceTypes()) { + info.sizes[key] -= module.size(key); + } + updated = true; + } + } + if (updated) { + if (info.modules.size === 0) { + chunksInfoMap.delete(key); + continue; + } + if (removeMinSizeViolatingModules(info)) { + chunksInfoMap.delete(key); + continue; + } + } + } + } + } + + logger.timeEnd("queue"); + + logger.time("maxSize"); + + /** @type {Set} */ + const incorrectMinMaxSizeSet = new Set(); + + const { outputOptions } = compilation; + + // Make sure that maxSize is fulfilled + for (const chunk of Array.from(compilation.chunks)) { + const chunkConfig = maxSizeQueueMap.get(chunk); + const { + minSize, + maxAsyncSize, + maxInitialSize, + automaticNameDelimiter + } = chunkConfig || this.options.fallbackCacheGroup; + /** @type {SplitChunksSizes} */ + let maxSize; + if (chunk.isOnlyInitial()) { + maxSize = maxInitialSize; + } else if (chunk.canBeInitial()) { + maxSize = combineSizes(maxAsyncSize, maxInitialSize, Math.min); + } else { + maxSize = maxAsyncSize; + } + if (Object.keys(maxSize).length === 0) { + continue; + } + for (const key of Object.keys(maxSize)) { + const maxSizeValue = maxSize[key]; + const minSizeValue = minSize[key]; + if ( + typeof minSizeValue === "number" && + minSizeValue > maxSizeValue + ) { + const keys = chunkConfig && chunkConfig.keys; + const warningKey = `${ + keys && keys.join() + } ${minSizeValue} ${maxSizeValue}`; + if (!incorrectMinMaxSizeSet.has(warningKey)) { + incorrectMinMaxSizeSet.add(warningKey); + compilation.warnings.push( + new MinMaxSizeWarning(keys, minSizeValue, maxSizeValue) + ); + } + } + } + const results = deterministicGroupingForModules({ + minSize, + maxSize: mapObject(maxSize, (value, key) => { + const minSizeValue = minSize[key]; + return typeof minSizeValue === "number" + ? Math.max(value, minSizeValue) + : value; + }), + items: chunkGraph.getChunkModulesIterable(chunk), + getKey(module) { + const cache = getKeyCache.get(module); + if (cache !== undefined) return cache; + const ident = cachedContextify(module.identifier()); + const nameForCondition = + module.nameForCondition && module.nameForCondition(); + const name = nameForCondition + ? cachedContextify(nameForCondition) + : ident.replace(/^.*!|\?[^?!]*$/g, ""); + const fullKey = + name + + automaticNameDelimiter + + hashFilename(ident, outputOptions); + const key = requestToId(fullKey); + getKeyCache.set(module, key); + return key; + }, + getSize(module) { + const size = Object.create(null); + for (const key of module.getSourceTypes()) { + size[key] = module.size(key); + } + return size; + } + }); + if (results.length <= 1) { + continue; + } + for (let i = 0; i < results.length; i++) { + const group = results[i]; + const key = this.options.hidePathInfo + ? hashFilename(group.key, outputOptions) + : group.key; + let name = chunk.name + ? chunk.name + automaticNameDelimiter + key + : null; + if (name && name.length > 100) { + name = + name.slice(0, 100) + + automaticNameDelimiter + + hashFilename(name, outputOptions); + } + if (i !== results.length - 1) { + const newPart = compilation.addChunk(name); + chunk.split(newPart); + newPart.chunkReason = chunk.chunkReason; + // Add all modules to the new chunk + for (const module of group.items) { + if (!module.chunkCondition(newPart, compilation)) { + continue; + } + // Add module to new chunk + chunkGraph.connectChunkAndModule(newPart, module); + // Remove module from used chunks + chunkGraph.disconnectChunkAndModule(chunk, module); + } + } else { + // change the chunk to be a part + chunk.name = name; + } + } + } + logger.timeEnd("maxSize"); + } + ); + }); + } +}; + + +/***/ }), + +/***/ 91889: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + + +const { formatSize } = __webpack_require__(50787); +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./SizeLimitsPlugin").AssetDetails} AssetDetails */ + +module.exports = class AssetsOverSizeLimitWarning extends WebpackError { + /** + * @param {AssetDetails[]} assetsOverSizeLimit the assets + * @param {number} assetLimit the size limit + */ + constructor(assetsOverSizeLimit, assetLimit) { + const assetLists = assetsOverSizeLimit + .map(asset => `\n ${asset.name} (${formatSize(asset.size)})`) + .join(""); + + super(`asset size limit: The following asset(s) exceed the recommended size limit (${formatSize( + assetLimit + )}). +This can impact web performance. +Assets: ${assetLists}`); + + this.name = "AssetsOverSizeLimitWarning"; + this.assets = assetsOverSizeLimit; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 20059: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + + +const { formatSize } = __webpack_require__(50787); +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("./SizeLimitsPlugin").EntrypointDetails} EntrypointDetails */ + +module.exports = class EntrypointsOverSizeLimitWarning extends WebpackError { + /** + * @param {EntrypointDetails[]} entrypoints the entrypoints + * @param {number} entrypointLimit the size limit + */ + constructor(entrypoints, entrypointLimit) { + const entrypointList = entrypoints + .map( + entrypoint => + `\n ${entrypoint.name} (${formatSize( + entrypoint.size + )})\n${entrypoint.files.map(asset => ` ${asset}`).join("\n")}` + ) + .join(""); + super(`entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (${formatSize( + entrypointLimit + )}). This can impact web performance. +Entrypoints:${entrypointList}\n`); + + this.name = "EntrypointsOverSizeLimitWarning"; + this.entrypoints = entrypoints; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 67767: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + + +const WebpackError = __webpack_require__(24274); + +module.exports = class NoAsyncChunksWarning extends WebpackError { + constructor() { + super( + "webpack performance recommendations: \n" + + "You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.\n" + + "For more info visit https://webpack.js.org/guides/code-splitting/" + ); + + this.name = "NoAsyncChunksWarning"; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 84693: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sean Larkin @thelarkinn +*/ + + + +const { find } = __webpack_require__(86088); +const AssetsOverSizeLimitWarning = __webpack_require__(91889); +const EntrypointsOverSizeLimitWarning = __webpack_require__(20059); +const NoAsyncChunksWarning = __webpack_require__(67767); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../../declarations/WebpackOptions").PerformanceOptions} PerformanceOptions */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Entrypoint")} Entrypoint */ +/** @typedef {import("../WebpackError")} WebpackError */ + +/** + * @typedef {Object} AssetDetails + * @property {string} name + * @property {number} size + */ + +/** + * @typedef {Object} EntrypointDetails + * @property {string} name + * @property {number} size + * @property {string[]} files + */ + +const isOverSizeLimitSet = new WeakSet(); + +const excludeSourceMap = (name, source, info) => !info.development; + +module.exports = class SizeLimitsPlugin { + /** + * @param {PerformanceOptions} options the plugin options + */ + constructor(options) { + this.hints = options.hints; + this.maxAssetSize = options.maxAssetSize; + this.maxEntrypointSize = options.maxEntrypointSize; + this.assetFilter = options.assetFilter; + } + + /** + * @param {ChunkGroup | Source} thing the resource to test + * @returns {boolean} true if over the limit + */ + static isOverSizeLimit(thing) { + return isOverSizeLimitSet.has(thing); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const entrypointSizeLimit = this.maxEntrypointSize; + const assetSizeLimit = this.maxAssetSize; + const hints = this.hints; + const assetFilter = this.assetFilter || excludeSourceMap; + + compiler.hooks.afterEmit.tap("SizeLimitsPlugin", compilation => { + /** @type {WebpackError[]} */ + const warnings = []; + + /** + * @param {Entrypoint} entrypoint an entrypoint + * @returns {number} the size of the entrypoint + */ + const getEntrypointSize = entrypoint => { + let size = 0; + for (const file of entrypoint.getFiles()) { + const asset = compilation.getAsset(file); + if ( + asset && + assetFilter(asset.name, asset.source, asset.info) && + asset.source + ) { + size += asset.info.size || asset.source.size(); + } + } + return size; + }; + + /** @type {AssetDetails[]} */ + const assetsOverSizeLimit = []; + for (const { name, source, info } of compilation.getAssets()) { + if (!assetFilter(name, source, info) || !source) { + continue; + } + + const size = info.size || source.size(); + if (size > assetSizeLimit) { + assetsOverSizeLimit.push({ + name, + size + }); + isOverSizeLimitSet.add(source); + } + } + + const fileFilter = name => { + const asset = compilation.getAsset(name); + return asset && assetFilter(asset.name, asset.source, asset.info); + }; + + /** @type {EntrypointDetails[]} */ + const entrypointsOverLimit = []; + for (const [name, entry] of compilation.entrypoints) { + const size = getEntrypointSize(entry); + + if (size > entrypointSizeLimit) { + entrypointsOverLimit.push({ + name: name, + size: size, + files: entry.getFiles().filter(fileFilter) + }); + isOverSizeLimitSet.add(entry); + } + } + + if (hints) { + // 1. Individual Chunk: Size < 250kb + // 2. Collective Initial Chunks [entrypoint] (Each Set?): Size < 250kb + // 3. No Async Chunks + // if !1, then 2, if !2 return + if (assetsOverSizeLimit.length > 0) { + warnings.push( + new AssetsOverSizeLimitWarning(assetsOverSizeLimit, assetSizeLimit) + ); + } + if (entrypointsOverLimit.length > 0) { + warnings.push( + new EntrypointsOverSizeLimitWarning( + entrypointsOverLimit, + entrypointSizeLimit + ) + ); + } + + if (warnings.length > 0) { + const someAsyncChunk = find( + compilation.chunks, + chunk => !chunk.canBeInitial() + ); + + if (!someAsyncChunk) { + warnings.push(new NoAsyncChunksWarning()); + } + + if (hints === "error") { + compilation.errors.push(...warnings); + } else { + compilation.warnings.push(...warnings); + } + } + } + }); + } +}; + + +/***/ }), + +/***/ 66981: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ + +class ChunkPrefetchFunctionRuntimeModule extends RuntimeModule { + /** + * @param {string} childType TODO + * @param {string} runtimeFunction TODO + * @param {string} runtimeHandlers TODO + */ + constructor(childType, runtimeFunction, runtimeHandlers) { + super(`chunk ${childType} function`); + this.childType = childType; + this.runtimeFunction = runtimeFunction; + this.runtimeHandlers = runtimeHandlers; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeFunction, runtimeHandlers } = this; + const { runtimeTemplate } = this.compilation; + return Template.asString([ + `${runtimeHandlers} = {};`, + `${runtimeFunction} = ${runtimeTemplate.basicFunction("chunkId", [ + // map is shorter than forEach + `Object.keys(${runtimeHandlers}).map(${runtimeTemplate.basicFunction( + "key", + `${runtimeHandlers}[key](chunkId);` + )});` + ])}` + ]); + } +} + +module.exports = ChunkPrefetchFunctionRuntimeModule; + + +/***/ }), + +/***/ 29184: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const ChunkPrefetchFunctionRuntimeModule = __webpack_require__(66981); +const ChunkPrefetchStartupRuntimeModule = __webpack_require__(61326); +const ChunkPrefetchTriggerRuntimeModule = __webpack_require__(13156); + +/** @typedef {import("../Compiler")} Compiler */ + +class ChunkPrefetchPreloadPlugin { + /** + * @param {Compiler} compiler the compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "ChunkPrefetchPreloadPlugin", + compilation => { + compilation.hooks.additionalChunkRuntimeRequirements.tap( + "ChunkPrefetchPreloadPlugin", + (chunk, set) => { + const { chunkGraph } = compilation; + if (chunkGraph.getNumberOfEntryModules(chunk) === 0) return; + const startupChildChunks = chunk.getChildIdsByOrders(chunkGraph); + if (startupChildChunks.prefetch) { + set.add(RuntimeGlobals.prefetchChunk); + set.add(RuntimeGlobals.startupOnlyAfter); + compilation.addRuntimeModule( + chunk, + new ChunkPrefetchStartupRuntimeModule( + "prefetch", + RuntimeGlobals.prefetchChunk, + startupChildChunks.prefetch + ) + ); + } + } + ); + compilation.hooks.additionalTreeRuntimeRequirements.tap( + "ChunkPrefetchPreloadPlugin", + (chunk, set) => { + const { chunkGraph } = compilation; + const chunkMap = chunk.getChildIdsByOrdersMap(chunkGraph, false); + + if (chunkMap.prefetch) { + set.add(RuntimeGlobals.prefetchChunk); + compilation.addRuntimeModule( + chunk, + new ChunkPrefetchTriggerRuntimeModule( + "prefetch", + RuntimeGlobals.prefetchChunk, + chunkMap.prefetch, + true + ) + ); + } + if (chunkMap.preload) { + set.add(RuntimeGlobals.preloadChunk); + compilation.addRuntimeModule( + chunk, + new ChunkPrefetchTriggerRuntimeModule( + "preload", + RuntimeGlobals.preloadChunk, + chunkMap.preload, + false + ) + ); + } + } + ); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.prefetchChunk) + .tap("ChunkPrefetchPreloadPlugin", (chunk, set) => { + compilation.addRuntimeModule( + chunk, + new ChunkPrefetchFunctionRuntimeModule( + "prefetch", + RuntimeGlobals.prefetchChunk, + RuntimeGlobals.prefetchChunkHandlers + ) + ); + set.add(RuntimeGlobals.prefetchChunkHandlers); + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.preloadChunk) + .tap("ChunkPrefetchPreloadPlugin", (chunk, set) => { + compilation.addRuntimeModule( + chunk, + new ChunkPrefetchFunctionRuntimeModule( + "preload", + RuntimeGlobals.preloadChunk, + RuntimeGlobals.preloadChunkHandlers + ) + ); + set.add(RuntimeGlobals.preloadChunkHandlers); + }); + } + ); + } +} + +module.exports = ChunkPrefetchPreloadPlugin; + + +/***/ }), + +/***/ 61326: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ + +class ChunkPrefetchStartupRuntimeModule extends RuntimeModule { + /** + * @param {string} childType TODO + * @param {string} runtimeFunction TODO + * @param {(string|number)[]} startupChunks chunk ids to trigger after startup + */ + constructor(childType, runtimeFunction, startupChunks) { + super(`startup ${childType}`, RuntimeModule.STAGE_TRIGGER); + this.childType = childType; + this.runtimeFunction = runtimeFunction; + this.startupChunks = startupChunks; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeFunction, startupChunks } = this; + const { runtimeTemplate } = this.compilation; + return Template.asString([ + `var startup = ${RuntimeGlobals.startup};`, + `${RuntimeGlobals.startup} = ${runtimeTemplate.basicFunction("", [ + "var result = startup();", + Template.asString( + startupChunks.length < 3 + ? startupChunks.map( + c => `${runtimeFunction}(${JSON.stringify(c)});` + ) + : `${JSON.stringify(startupChunks)}.map(${runtimeFunction});` + ), + "return result;" + ])};` + ]); + } +} + +module.exports = ChunkPrefetchStartupRuntimeModule; + + +/***/ }), + +/***/ 13156: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ + +class ChunkPrefetchTriggerRuntimeModule extends RuntimeModule { + /** + * @param {string} childType TODO + * @param {string} runtimeFunction TODO + * @param {Object} chunkMap map from chunk to + * @param {boolean} afterChunkLoad true: start after chunk has been loaded, false: start after chunk loading has started + */ + constructor(childType, runtimeFunction, chunkMap, afterChunkLoad) { + super(`chunk ${childType} trigger`, RuntimeModule.STAGE_TRIGGER); + this.childType = childType; + this.runtimeFunction = runtimeFunction; + this.chunkMap = chunkMap; + this.afterChunkLoad = afterChunkLoad; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { childType, runtimeFunction, chunkMap, afterChunkLoad } = this; + const { runtimeTemplate } = this.compilation; + const body = [ + "var chunks = chunkToChildrenMap[chunkId];", + "for (var i = 0; Array.isArray(chunks) && i < chunks.length; i++) {", + Template.indent(`${runtimeFunction}(chunks[i]);`), + "}" + ]; + return Template.asString([ + chunkMap + ? Template.asString([ + `var chunkToChildrenMap = ${JSON.stringify(chunkMap, null, "\t")};`, + `${RuntimeGlobals.ensureChunkHandlers}.${childType} = ${ + afterChunkLoad + ? runtimeTemplate.basicFunction("chunkId, promises", [ + `Promise.all(promises).then(${runtimeTemplate.basicFunction( + "", + body + )});` + ]) + : runtimeTemplate.basicFunction("chunkId", body) + };` + ]) + : `// no chunks to automatically ${childType} specified in graph` + ]); + } +} + +module.exports = ChunkPrefetchTriggerRuntimeModule; + + +/***/ }), + +/***/ 52156: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */ + +class BasicEffectRulePlugin { + constructor(ruleProperty, effectType) { + this.ruleProperty = ruleProperty; + this.effectType = effectType || ruleProperty; + } + + /** + * @param {RuleSetCompiler} ruleSetCompiler the rule set compiler + * @returns {void} + */ + apply(ruleSetCompiler) { + ruleSetCompiler.hooks.rule.tap( + "BasicEffectRulePlugin", + (path, rule, unhandledProperties, result, references) => { + if (unhandledProperties.has(this.ruleProperty)) { + unhandledProperties.delete(this.ruleProperty); + + const value = rule[this.ruleProperty]; + + result.effects.push({ + type: this.effectType, + value + }); + } + } + ); + } +} + +module.exports = BasicEffectRulePlugin; + + +/***/ }), + +/***/ 87229: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */ +/** @typedef {import("./RuleSetCompiler").RuleCondition} RuleCondition */ + +class BasicMatcherRulePlugin { + constructor(ruleProperty, dataProperty, invert) { + this.ruleProperty = ruleProperty; + this.dataProperty = dataProperty || ruleProperty; + this.invert = invert || false; + } + + /** + * @param {RuleSetCompiler} ruleSetCompiler the rule set compiler + * @returns {void} + */ + apply(ruleSetCompiler) { + ruleSetCompiler.hooks.rule.tap( + "BasicMatcherRulePlugin", + (path, rule, unhandledProperties, result) => { + if (unhandledProperties.has(this.ruleProperty)) { + unhandledProperties.delete(this.ruleProperty); + const value = rule[this.ruleProperty]; + const condition = ruleSetCompiler.compileCondition( + `${path}.${this.ruleProperty}`, + value + ); + const fn = condition.fn; + result.conditions.push({ + property: this.dataProperty, + matchWhenEmpty: this.invert + ? !condition.matchWhenEmpty + : condition.matchWhenEmpty, + fn: this.invert ? v => !fn(v) : fn + }); + } + } + ); + } +} + +module.exports = BasicMatcherRulePlugin; + + +/***/ }), + +/***/ 29883: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */ +/** @typedef {import("./RuleSetCompiler").RuleCondition} RuleCondition */ + +const RULE_PROPERTY = "descriptionData"; + +class DescriptionDataMatcherRulePlugin { + /** + * @param {RuleSetCompiler} ruleSetCompiler the rule set compiler + * @returns {void} + */ + apply(ruleSetCompiler) { + ruleSetCompiler.hooks.rule.tap( + "DescriptionDataMatcherRulePlugin", + (path, rule, unhandledProperties, result) => { + if (unhandledProperties.has(RULE_PROPERTY)) { + unhandledProperties.delete(RULE_PROPERTY); + const value = rule[RULE_PROPERTY]; + for (const property of Object.keys(value)) { + const dataProperty = property.split("."); + const condition = ruleSetCompiler.compileCondition( + `${path}.${RULE_PROPERTY}.${property}`, + value[property] + ); + result.conditions.push({ + property: ["descriptionData", ...dataProperty], + matchWhenEmpty: condition.matchWhenEmpty, + fn: condition.fn + }); + } + } + } + ); + } +} + +module.exports = DescriptionDataMatcherRulePlugin; + + +/***/ }), + +/***/ 39304: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { SyncHook } = __webpack_require__(18416); + +/** + * @typedef {Object} RuleCondition + * @property {string | string[]} property + * @property {boolean} matchWhenEmpty + * @property {function(string): boolean} fn + */ + +/** + * @typedef {Object} Condition + * @property {boolean} matchWhenEmpty + * @property {function(string): boolean} fn + */ + +/** + * @typedef {Object} CompiledRule + * @property {RuleCondition[]} conditions + * @property {(Effect|function(object): Effect[])[]} effects + * @property {CompiledRule[]=} rules + * @property {CompiledRule[]=} oneOf + */ + +/** + * @typedef {Object} Effect + * @property {string} type + * @property {any} value + */ + +/** + * @typedef {Object} RuleSet + * @property {Map} references map of references in the rule set (may grow over time) + * @property {function(object): Effect[]} exec execute the rule set + */ + +class RuleSetCompiler { + constructor(plugins) { + this.hooks = Object.freeze({ + /** @type {SyncHook<[string, object, Set, CompiledRule, Map]>} */ + rule: new SyncHook([ + "path", + "rule", + "unhandledProperties", + "compiledRule", + "references" + ]) + }); + if (plugins) { + for (const plugin of plugins) { + plugin.apply(this); + } + } + } + + /** + * @param {object[]} ruleSet raw user provided rules + * @returns {RuleSet} compiled RuleSet + */ + compile(ruleSet) { + const refs = new Map(); + const rules = this.compileRules("ruleSet", ruleSet, refs); + + /** + * @param {object} data data passed in + * @param {CompiledRule} rule the compiled rule + * @param {Effect[]} effects an array where effects are pushed to + * @returns {boolean} true, if the rule has matched + */ + const execRule = (data, rule, effects) => { + for (const condition of rule.conditions) { + const p = condition.property; + if (Array.isArray(p)) { + let current = data; + for (const subProperty of p) { + if ( + current && + typeof current === "object" && + Object.prototype.hasOwnProperty.call(current, subProperty) + ) { + current = current[subProperty]; + } else { + current = undefined; + break; + } + } + if (current !== undefined) { + if (!condition.fn(current)) return false; + continue; + } + } else if (p in data) { + const value = data[p]; + if (value !== undefined) { + if (!condition.fn(value)) return false; + continue; + } + } + if (!condition.matchWhenEmpty) { + return false; + } + } + for (const effect of rule.effects) { + if (typeof effect === "function") { + const returnedEffects = effect(data); + for (const effect of returnedEffects) { + effects.push(effect); + } + } else { + effects.push(effect); + } + } + if (rule.rules) { + for (const childRule of rule.rules) { + execRule(data, childRule, effects); + } + } + if (rule.oneOf) { + for (const childRule of rule.oneOf) { + if (execRule(data, childRule, effects)) { + break; + } + } + } + return true; + }; + + return { + references: refs, + exec: data => { + /** @type {Effect[]} */ + const effects = []; + for (const rule of rules) { + execRule(data, rule, effects); + } + return effects; + } + }; + } + + /** + * @param {string} path current path + * @param {object[]} rules the raw rules provided by user + * @param {Map} refs references + * @returns {CompiledRule[]} rules + */ + compileRules(path, rules, refs) { + return rules.map((rule, i) => + this.compileRule(`${path}[${i}]`, rule, refs) + ); + } + + /** + * @param {string} path current path + * @param {object} rule the raw rule provided by user + * @param {Map} refs references + * @returns {CompiledRule} normalized and compiled rule for processing + */ + compileRule(path, rule, refs) { + const unhandledProperties = new Set( + Object.keys(rule).filter(key => rule[key] !== undefined) + ); + + /** @type {CompiledRule} */ + const compiledRule = { + conditions: [], + effects: [], + rules: undefined, + oneOf: undefined + }; + + this.hooks.rule.call(path, rule, unhandledProperties, compiledRule, refs); + + if (unhandledProperties.has("rules")) { + unhandledProperties.delete("rules"); + const rules = rule.rules; + if (!Array.isArray(rules)) + throw this.error(path, rules, "Rule.rules must be an array of rules"); + compiledRule.rules = this.compileRules(`${path}.rules`, rules, refs); + } + + if (unhandledProperties.has("oneOf")) { + unhandledProperties.delete("oneOf"); + const oneOf = rule.oneOf; + if (!Array.isArray(oneOf)) + throw this.error(path, oneOf, "Rule.oneOf must be an array of rules"); + compiledRule.oneOf = this.compileRules(`${path}.oneOf`, oneOf, refs); + } + + if (unhandledProperties.size > 0) { + throw this.error( + path, + rule, + `Properties ${Array.from(unhandledProperties).join(", ")} are unknown` + ); + } + + return compiledRule; + } + + /** + * @param {string} path current path + * @param {any} condition user provided condition value + * @returns {Condition} compiled condition + */ + compileCondition(path, condition) { + if (condition === "") { + return { + matchWhenEmpty: true, + fn: str => str === "" + }; + } + if (!condition) { + throw this.error( + path, + condition, + "Expected condition but got falsy value" + ); + } + if (typeof condition === "string") { + return { + matchWhenEmpty: condition.length === 0, + fn: str => str.startsWith(condition) + }; + } + if (typeof condition === "function") { + try { + return { + matchWhenEmpty: condition(""), + fn: condition + }; + } catch (err) { + throw this.error( + path, + condition, + "Evaluation of condition function threw error" + ); + } + } + if (condition instanceof RegExp) { + return { + matchWhenEmpty: condition.test(""), + fn: v => condition.test(v) + }; + } + if (Array.isArray(condition)) { + const items = condition.map((c, i) => + this.compileCondition(`${path}[${i}]`, c) + ); + return this.combineConditionsOr(items); + } + + if (typeof condition !== "object") { + throw this.error( + path, + condition, + `Unexpected ${typeof condition} when condition was expected` + ); + } + + const conditions = []; + for (const key of Object.keys(condition)) { + const value = condition[key]; + switch (key) { + case "or": + if (value) { + if (!Array.isArray(value)) { + throw this.error( + `${path}.or`, + condition.and, + "Expected array of conditions" + ); + } + conditions.push(this.compileCondition(`${path}.or`, value)); + } + break; + case "and": + if (value) { + if (!Array.isArray(value)) { + throw this.error( + `${path}.and`, + condition.and, + "Expected array of conditions" + ); + } + let i = 0; + for (const item of value) { + conditions.push(this.compileCondition(`${path}.and[${i}]`, item)); + i++; + } + } + break; + case "not": + if (value) { + const matcher = this.compileCondition(`${path}.not`, value); + const fn = matcher.fn; + conditions.push({ + matchWhenEmpty: !matcher.matchWhenEmpty, + fn: v => !fn(v) + }); + } + break; + default: + throw this.error( + `${path}.${key}`, + condition[key], + `Unexpected property ${key} in condition` + ); + } + } + if (conditions.length === 0) { + throw this.error( + path, + condition, + "Expected condition, but got empty thing" + ); + } + return this.combineConditionsAnd(conditions); + } + + /** + * @param {Condition[]} conditions some conditions + * @returns {Condition} merged condition + */ + combineConditionsOr(conditions) { + if (conditions.length === 0) { + return { + matchWhenEmpty: false, + fn: () => false + }; + } else if (conditions.length === 1) { + return conditions[0]; + } else { + return { + matchWhenEmpty: conditions.some(c => c.matchWhenEmpty), + fn: v => conditions.some(c => c.fn(v)) + }; + } + } + + /** + * @param {Condition[]} conditions some conditions + * @returns {Condition} merged condition + */ + combineConditionsAnd(conditions) { + if (conditions.length === 0) { + return { + matchWhenEmpty: false, + fn: () => false + }; + } else if (conditions.length === 1) { + return conditions[0]; + } else { + return { + matchWhenEmpty: conditions.every(c => c.matchWhenEmpty), + fn: v => conditions.every(c => c.fn(v)) + }; + } + } + + /** + * @param {string} path current path + * @param {any} value value at the error location + * @param {string} message message explaining the problem + * @returns {Error} an error object + */ + error(path, value, message) { + return new Error( + `Compiling RuleSet failed: ${message} (at ${path}: ${value})` + ); + } +} + +module.exports = RuleSetCompiler; + + +/***/ }), + +/***/ 18554: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); + +/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */ +/** @typedef {import("./RuleSetCompiler").Effect} Effect */ + +class UseEffectRulePlugin { + /** + * @param {RuleSetCompiler} ruleSetCompiler the rule set compiler + * @returns {void} + */ + apply(ruleSetCompiler) { + ruleSetCompiler.hooks.rule.tap( + "UseEffectRulePlugin", + (path, rule, unhandledProperties, result, references) => { + const conflictWith = (property, correctProperty) => { + if (unhandledProperties.has(property)) { + throw ruleSetCompiler.error( + `${path}.${property}`, + rule[property], + `A Rule must not have a '${property}' property when it has a '${correctProperty}' property` + ); + } + }; + + if (unhandledProperties.has("use")) { + unhandledProperties.delete("use"); + unhandledProperties.delete("enforce"); + + conflictWith("loader", "use"); + conflictWith("options", "use"); + + const use = rule.use; + const enforce = rule.enforce; + + const type = enforce ? `use-${enforce}` : "use"; + + /** + * + * @param {string} path options path + * @param {string} defaultIdent default ident when none is provided + * @param {object} item user provided use value + * @returns {Effect|function(any): Effect[]} effect + */ + const useToEffect = (path, defaultIdent, item) => { + if (typeof item === "function") { + return data => useToEffectsWithoutIdent(path, item(data)); + } else { + return useToEffectRaw(path, defaultIdent, item); + } + }; + + /** + * + * @param {string} path options path + * @param {string} defaultIdent default ident when none is provided + * @param {object} item user provided use value + * @returns {Effect} effect + */ + const useToEffectRaw = (path, defaultIdent, item) => { + if (typeof item === "string") { + return { + type, + value: { + loader: item, + options: undefined, + ident: undefined + } + }; + } else { + const loader = item.loader; + const options = item.options; + let ident = item.ident; + if (options && typeof options === "object") { + if (!ident) ident = defaultIdent; + references.set(ident, options); + } + if (typeof options === "string") { + util.deprecate( + () => {}, + `Using a string as loader options is deprecated (${path}.options)`, + "DEP_WEBPACK_RULE_LOADER_OPTIONS_STRING" + )(); + } + return { + type: enforce ? `use-${enforce}` : "use", + value: { + loader, + options, + ident + } + }; + } + }; + + /** + * @param {string} path options path + * @param {any} items user provided use value + * @returns {Effect[]} effects + */ + const useToEffectsWithoutIdent = (path, items) => { + if (Array.isArray(items)) { + return items.map((item, idx) => + useToEffectRaw(`${path}[${idx}]`, "[[missing ident]]", item) + ); + } + return [useToEffectRaw(path, "[[missing ident]]", items)]; + }; + + /** + * @param {string} path current path + * @param {any} items user provided use value + * @returns {(Effect|function(any): Effect[])[]} effects + */ + const useToEffects = (path, items) => { + if (Array.isArray(items)) { + return items.map((item, idx) => { + const subPath = `${path}[${idx}]`; + return useToEffect(subPath, subPath, item); + }); + } + return [useToEffect(path, path, items)]; + }; + + if (typeof use === "function") { + result.effects.push(data => + useToEffectsWithoutIdent(`${path}.use`, use(data)) + ); + } else { + for (const effect of useToEffects(`${path}.use`, use)) { + result.effects.push(effect); + } + } + } + + if (unhandledProperties.has("loader")) { + unhandledProperties.delete("loader"); + unhandledProperties.delete("options"); + unhandledProperties.delete("enforce"); + + const loader = rule.loader; + const options = rule.options; + const enforce = rule.enforce; + + if (loader.includes("!")) { + throw ruleSetCompiler.error( + `${path}.loader`, + loader, + "Exclamation mark separated loader lists has been removed in favor of the 'use' property with arrays" + ); + } + + if (loader.includes("?")) { + throw ruleSetCompiler.error( + `${path}.loader`, + loader, + "Query arguments on 'loader' has been removed in favor of the 'options' property" + ); + } + + if (typeof options === "string") { + util.deprecate( + () => {}, + `Using a string as loader options is deprecated (${path}.options)`, + "DEP_WEBPACK_RULE_LOADER_OPTIONS_STRING" + )(); + } + + const ident = + options && typeof options === "object" ? path : undefined; + references.set(ident, options); + result.effects.push({ + type: enforce ? `use-${enforce}` : "use", + value: { + loader, + options, + ident + } + }); + } + } + ); + } + + useItemToEffects(path, item) {} +} + +module.exports = UseEffectRulePlugin; + + +/***/ }), + +/***/ 85827: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); +const JavascriptModulesPlugin = __webpack_require__(80867); +const { getUndoPath } = __webpack_require__(47779); + +class AutoPublicPathRuntimeModule extends RuntimeModule { + constructor() { + super("publicPath", RuntimeModule.STAGE_BASIC); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { compilation } = this; + const { scriptType, importMetaName } = compilation.outputOptions; + const chunkName = compilation.getPath( + JavascriptModulesPlugin.getChunkFilenameTemplate( + this.chunk, + compilation.outputOptions + ), + { + chunk: this.chunk, + contentHashType: "javascript" + } + ); + const undoPath = getUndoPath(chunkName, false); + return Template.asString([ + "var scriptUrl;", + scriptType === "module" + ? `if (typeof ${importMetaName}.url === "string") scriptUrl = ${importMetaName}.url` + : Template.asString([ + `if (${RuntimeGlobals.global}.importScripts) scriptUrl = ${RuntimeGlobals.global}.location + "";`, + `var document = ${RuntimeGlobals.global}.document;`, + "if (!scriptUrl && document) {", + Template.indent([ + `if (document.currentScript)`, + Template.indent(`scriptUrl = document.currentScript.src`), + "if (!scriptUrl) {", + Template.indent([ + 'var scripts = document.getElementsByTagName("script");', + "if(scripts.length) scriptUrl = scripts[scripts.length - 1].src" + ]), + "}" + ]), + "}" + ]), + "// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration", + '// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.', + 'if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");', + 'scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\\?.*$/, "").replace(/\\/[^\\/]+$/, "/");', + !undoPath + ? `${RuntimeGlobals.publicPath} = scriptUrl;` + : `${RuntimeGlobals.publicPath} = scriptUrl + ${JSON.stringify( + undoPath + )};` + ]); + } +} + +module.exports = AutoPublicPathRuntimeModule; + + +/***/ }), + +/***/ 89477: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); + +class ChunkNameRuntimeModule extends RuntimeModule { + /** + * @param {string} chunkName the chunk's name + */ + constructor(chunkName) { + super("chunkName"); + this.chunkName = chunkName; + } + + /** + * @returns {string} runtime code + */ + generate() { + return `${RuntimeGlobals.chunkName} = ${JSON.stringify(this.chunkName)};`; + } +} + +module.exports = ChunkNameRuntimeModule; + + +/***/ }), + +/***/ 4023: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const HelperRuntimeModule = __webpack_require__(37299); + +class CompatGetDefaultExportRuntimeModule extends HelperRuntimeModule { + constructor() { + super("compat get default export"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeTemplate } = this.compilation; + const fn = RuntimeGlobals.compatGetDefaultExport; + return Template.asString([ + "// getDefaultExport function for compatibility with non-harmony modules", + `${fn} = ${runtimeTemplate.basicFunction("module", [ + "var getter = module && module.__esModule ?", + Template.indent([ + `${runtimeTemplate.returningFunction("module['default']")} :`, + `${runtimeTemplate.returningFunction("module")};` + ]), + `${RuntimeGlobals.definePropertyGetters}(getter, { a: getter });`, + "return getter;" + ])};` + ]); + } +} + +module.exports = CompatGetDefaultExportRuntimeModule; + + +/***/ }), + +/***/ 27352: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); + +/** @typedef {import("../MainTemplate")} MainTemplate */ + +class CompatRuntimeModule extends RuntimeModule { + constructor() { + super("compat", RuntimeModule.STAGE_ATTACH); + this.fullHash = true; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { chunk, compilation } = this; + const { + chunkGraph, + runtimeTemplate, + mainTemplate, + moduleTemplates, + dependencyTemplates + } = compilation; + const bootstrap = mainTemplate.hooks.bootstrap.call( + "", + chunk, + compilation.hash || "XXXX", + moduleTemplates.javascript, + dependencyTemplates + ); + const localVars = mainTemplate.hooks.localVars.call( + "", + chunk, + compilation.hash || "XXXX" + ); + const requireExtensions = mainTemplate.hooks.requireExtensions.call( + "", + chunk, + compilation.hash || "XXXX" + ); + const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements(chunk); + let requireEnsure = ""; + if (runtimeRequirements.has(RuntimeGlobals.ensureChunk)) { + const requireEnsureHandler = mainTemplate.hooks.requireEnsure.call( + "", + chunk, + compilation.hash || "XXXX", + "chunkId" + ); + if (requireEnsureHandler) { + requireEnsure = `${ + RuntimeGlobals.ensureChunkHandlers + }.compat = ${runtimeTemplate.basicFunction( + "chunkId, promises", + requireEnsureHandler + )};`; + } + } + return [bootstrap, localVars, requireEnsure, requireExtensions] + .filter(Boolean) + .join("\n"); + } + + /** + * @returns {boolean} true, if the runtime module should get it's own scope + */ + shouldIsolate() { + // We avoid isolating this to have better backward-compat + return false; + } +} + +module.exports = CompatRuntimeModule; + + +/***/ }), + +/***/ 70911: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const HelperRuntimeModule = __webpack_require__(37299); + +class CreateFakeNamespaceObjectRuntimeModule extends HelperRuntimeModule { + constructor() { + super("create fake namespace object"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeTemplate } = this.compilation; + const modern = + runtimeTemplate.supportsArrowFunction() && + runtimeTemplate.supportsConst(); + const fn = RuntimeGlobals.createFakeNamespaceObject; + return Template.asString([ + `var getProto = Object.getPrototypeOf ? ${runtimeTemplate.returningFunction( + "Object.getPrototypeOf(obj)", + "obj" + )} : ${runtimeTemplate.returningFunction("obj.__proto__", "obj")};`, + "var leafPrototypes;", + "// create a fake namespace object", + "// mode & 1: value is a module id, require it", + "// mode & 2: merge all properties of value into the ns", + "// mode & 4: return value when already ns object", + "// mode & 16: return value when it's Promise-like", + "// mode & 8|1: behave like require", + // Note: must be a function (not arrow), because this is used in body! + `${fn} = function(value, mode) {`, + Template.indent([ + `if(mode & 1) value = this(value);`, + `if(mode & 8) return value;`, + "if(typeof value === 'object' && value) {", + Template.indent([ + "if((mode & 4) && value.__esModule) return value;", + "if((mode & 16) && typeof value.then === 'function') return value;" + ]), + "}", + "var ns = Object.create(null);", + `${RuntimeGlobals.makeNamespaceObject}(ns);`, + "var def = {};", + "leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];", + "for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {", + Template.indent([ + modern + ? `Object.getOwnPropertyNames(current).forEach(key => def[key] = () => value[key]);` + : `Object.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });` + ]), + "}", + modern + ? "def['default'] = () => value;" + : "def['default'] = function() { return value; };", + `${RuntimeGlobals.definePropertyGetters}(ns, def);`, + "return ns;" + ]), + "};" + ]); + } +} + +module.exports = CreateFakeNamespaceObjectRuntimeModule; + + +/***/ }), + +/***/ 74240: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const HelperRuntimeModule = __webpack_require__(37299); + +class DefinePropertyGettersRuntimeModule extends HelperRuntimeModule { + constructor() { + super("define property getters"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeTemplate } = this.compilation; + const fn = RuntimeGlobals.definePropertyGetters; + return Template.asString([ + "// define getter functions for harmony exports", + `${fn} = ${runtimeTemplate.basicFunction("exports, definition", [ + `for(var key in definition) {`, + Template.indent([ + `if(${RuntimeGlobals.hasOwnProperty}(definition, key) && !${RuntimeGlobals.hasOwnProperty}(exports, key)) {`, + Template.indent([ + "Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });" + ]), + "}" + ]), + "}" + ])};` + ]); + } +} + +module.exports = DefinePropertyGettersRuntimeModule; + + +/***/ }), + +/***/ 39026: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +class EnsureChunkRuntimeModule extends RuntimeModule { + constructor(runtimeRequirements) { + super("ensure chunk"); + this.runtimeRequirements = runtimeRequirements; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeTemplate } = this.compilation; + // Check if there are non initial chunks which need to be imported using require-ensure + if (this.runtimeRequirements.has(RuntimeGlobals.ensureChunkHandlers)) { + const handlers = RuntimeGlobals.ensureChunkHandlers; + return Template.asString([ + `${handlers} = {};`, + "// This file contains only the entry chunk.", + "// The chunk loading function for additional chunks", + `${ + RuntimeGlobals.ensureChunk + } = ${runtimeTemplate.basicFunction("chunkId", [ + `return Promise.all(Object.keys(${handlers}).reduce(${runtimeTemplate.basicFunction( + "promises, key", + [`${handlers}[key](chunkId, promises);`, "return promises;"] + )}, []));` + ])};` + ]); + } else { + // There ensureChunk is used somewhere in the tree, so we need an empty requireEnsure + // function. This can happen with multiple entrypoints. + return Template.asString([ + "// The chunk loading function for additional chunks", + "// Since all referenced chunks are already included", + "// in this file, this function is empty here.", + `${RuntimeGlobals.ensureChunk} = ${runtimeTemplate.returningFunction( + "Promise.resolve()" + )};` + ]); + } + } +} + +module.exports = EnsureChunkRuntimeModule; + + +/***/ }), + +/***/ 88253: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Compilation").AssetInfo} AssetInfo */ +/** @typedef {import("../Compilation").PathData} PathData */ + +/** @typedef {function(PathData, AssetInfo=): string} FilenameFunction */ + +class GetChunkFilenameRuntimeModule extends RuntimeModule { + /** + * @param {string} contentType the contentType to use the content hash for + * @param {string} name kind of filename + * @param {string} global function name to be assigned + * @param {function(Chunk): string | FilenameFunction} getFilenameForChunk functor to get the filename or function + * @param {boolean} allChunks when false, only async chunks are included + */ + constructor(contentType, name, global, getFilenameForChunk, allChunks) { + super(`get ${name} chunk filename`); + this.contentType = contentType; + this.global = global; + this.getFilenameForChunk = getFilenameForChunk; + this.allChunks = allChunks; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { + global, + chunk, + contentType, + getFilenameForChunk, + allChunks, + compilation + } = this; + const { runtimeTemplate } = compilation; + + /** @type {Map>} */ + const chunkFilenames = new Map(); + let maxChunks = 0; + /** @type {string} */ + let dynamicFilename; + + /** + * @param {Chunk} c the chunk + * @returns {void} + */ + const addChunk = c => { + const chunkFilename = getFilenameForChunk(c); + if (chunkFilename) { + let set = chunkFilenames.get(chunkFilename); + if (set === undefined) { + chunkFilenames.set(chunkFilename, (set = new Set())); + } + set.add(c); + if (typeof chunkFilename === "string") { + if (set.size < maxChunks) return; + if (set.size === maxChunks) { + if (chunkFilename.length < dynamicFilename.length) return; + if (chunkFilename.length === dynamicFilename.length) { + if (chunkFilename < dynamicFilename) return; + } + } + maxChunks = set.size; + dynamicFilename = chunkFilename; + } + } + }; + + /** @type {string[]} */ + const includedChunksMessages = []; + if (allChunks) { + includedChunksMessages.push("all chunks"); + for (const c of chunk.getAllReferencedChunks()) { + addChunk(c); + } + } else { + includedChunksMessages.push("async chunks"); + for (const c of chunk.getAllAsyncChunks()) { + addChunk(c); + } + const includeEntries = compilation.chunkGraph + .getTreeRuntimeRequirements(chunk) + .has(RuntimeGlobals.ensureChunkIncludeEntries); + if (includeEntries) { + includedChunksMessages.push("sibling chunks for the entrypoint"); + for (const c of compilation.chunkGraph.getChunkEntryDependentChunksIterable( + chunk + )) { + addChunk(c); + } + } + } + for (const entrypoint of chunk.getAllReferencedAsyncEntrypoints()) { + addChunk(entrypoint.chunks[entrypoint.chunks.length - 1]); + } + + /** @type {Map>} */ + const staticUrls = new Map(); + /** @type {Set} */ + const dynamicUrlChunks = new Set(); + + /** + * @param {Chunk} c the chunk + * @param {string | FilenameFunction} chunkFilename the filename template for the chunk + * @returns {void} + */ + const addStaticUrl = (c, chunkFilename) => { + /** + * @param {string | number} value a value + * @returns {string} string to put in quotes + */ + const unquotedStringify = value => { + const str = `${value}`; + if (str.length >= 5 && str === `${c.id}`) { + // This is shorter and generates the same result + return '" + chunkId + "'; + } + const s = JSON.stringify(str); + return s.slice(1, s.length - 1); + }; + const unquotedStringifyWithLength = value => length => + unquotedStringify(`${value}`.slice(0, length)); + const chunkFilenameValue = + typeof chunkFilename === "function" + ? JSON.stringify( + chunkFilename({ + chunk: c, + contentHashType: contentType + }) + ) + : JSON.stringify(chunkFilename); + const staticChunkFilename = compilation.getPath(chunkFilenameValue, { + hash: `" + ${RuntimeGlobals.getFullHash}() + "`, + hashWithLength: length => + `" + ${RuntimeGlobals.getFullHash}().slice(0, ${length}) + "`, + chunk: { + id: unquotedStringify(c.id), + hash: unquotedStringify(c.renderedHash), + hashWithLength: unquotedStringifyWithLength(c.renderedHash), + name: unquotedStringify(c.name || c.id), + contentHash: { + [contentType]: unquotedStringify(c.contentHash[contentType]) + }, + contentHashWithLength: { + [contentType]: unquotedStringifyWithLength( + c.contentHash[contentType] + ) + } + }, + contentHashType: contentType + }); + let set = staticUrls.get(staticChunkFilename); + if (set === undefined) { + staticUrls.set(staticChunkFilename, (set = new Set())); + } + set.add(c.id); + }; + + for (const [filename, chunks] of chunkFilenames) { + if (filename !== dynamicFilename) { + for (const c of chunks) addStaticUrl(c, filename); + } else { + for (const c of chunks) dynamicUrlChunks.add(c); + } + } + + /** + * @param {function(Chunk): string | number} fn function from chunk to value + * @returns {string} code with static mapping of results of fn + */ + const createMap = fn => { + const obj = {}; + let useId = false; + let lastKey; + let entries = 0; + for (const c of dynamicUrlChunks) { + const value = fn(c); + if (value === c.id) { + useId = true; + } else { + obj[c.id] = value; + lastKey = c.id; + entries++; + } + } + if (entries === 0) return "chunkId"; + if (entries === 1) { + return useId + ? `(chunkId === ${JSON.stringify(lastKey)} ? ${JSON.stringify( + obj[lastKey] + )} : chunkId)` + : JSON.stringify(obj[lastKey]); + } + return useId + ? `(${JSON.stringify(obj)}[chunkId] || chunkId)` + : `${JSON.stringify(obj)}[chunkId]`; + }; + + /** + * @param {function(Chunk): string | number} fn function from chunk to value + * @returns {string} code with static mapping of results of fn for including in quoted string + */ + const mapExpr = fn => { + return `" + ${createMap(fn)} + "`; + }; + + /** + * @param {function(Chunk): string | number} fn function from chunk to value + * @returns {function(number): string} function which generates code with static mapping of results of fn for including in quoted string for specific length + */ + const mapExprWithLength = fn => length => { + return `" + ${createMap(c => `${fn(c)}`.slice(0, length))} + "`; + }; + + const url = + dynamicFilename && + compilation.getPath(JSON.stringify(dynamicFilename), { + hash: `" + ${RuntimeGlobals.getFullHash}() + "`, + hashWithLength: length => + `" + ${RuntimeGlobals.getFullHash}().slice(0, ${length}) + "`, + chunk: { + id: `" + chunkId + "`, + hash: mapExpr(c => c.renderedHash), + hashWithLength: mapExprWithLength(c => c.renderedHash), + name: mapExpr(c => c.name || c.id), + contentHash: { + [contentType]: mapExpr(c => c.contentHash[contentType]) + }, + contentHashWithLength: { + [contentType]: mapExprWithLength(c => c.contentHash[contentType]) + } + }, + contentHashType: contentType + }); + + return Template.asString([ + `// This function allow to reference ${includedChunksMessages.join( + " and " + )}`, + `${global} = ${runtimeTemplate.basicFunction( + "chunkId", + + staticUrls.size > 0 + ? [ + "// return url for filenames not based on template", + // it minimizes to `x===1?"...":x===2?"...":"..."` + Template.asString( + Array.from(staticUrls, ([url, ids]) => { + const condition = + ids.size === 1 + ? `chunkId === ${JSON.stringify( + ids.values().next().value + )}` + : `{${Array.from( + ids, + id => `${JSON.stringify(id)}:1` + ).join(",")}}[chunkId]`; + return `if (${condition}) return ${url};`; + }) + ), + "// return url for filenames based on template", + `return ${url};` + ] + : ["// return url for filenames based on template", `return ${url};`] + )};` + ]); + } +} + +module.exports = GetChunkFilenameRuntimeModule; + + +/***/ }), + +/***/ 28365: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); + +/** @typedef {import("../Compilation")} Compilation */ + +class GetFullHashRuntimeModule extends RuntimeModule { + constructor() { + super("getFullHash"); + this.fullHash = true; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeTemplate } = this.compilation; + return `${RuntimeGlobals.getFullHash} = ${runtimeTemplate.returningFunction( + JSON.stringify(this.compilation.hash || "XXXX") + )}`; + } +} + +module.exports = GetFullHashRuntimeModule; + + +/***/ }), + +/***/ 2706: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +/** @typedef {import("../Compilation")} Compilation */ + +class GetMainFilenameRuntimeModule extends RuntimeModule { + /** + * @param {string} name readable name + * @param {string} global global object binding + * @param {string} filename main file name + */ + constructor(name, global, filename) { + super(`get ${name} filename`); + this.global = global; + this.filename = filename; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { global, filename, compilation, chunk } = this; + const { runtimeTemplate } = compilation; + const url = compilation.getPath(JSON.stringify(filename), { + hash: `" + ${RuntimeGlobals.getFullHash}() + "`, + hashWithLength: length => + `" + ${RuntimeGlobals.getFullHash}().slice(0, ${length}) + "`, + chunk, + runtime: chunk.runtime + }); + return Template.asString([ + `${global} = ${runtimeTemplate.returningFunction(url)};` + ]); + } +} + +module.exports = GetMainFilenameRuntimeModule; + + +/***/ }), + +/***/ 61710: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +class GlobalRuntimeModule extends RuntimeModule { + constructor() { + super("global"); + } + + /** + * @returns {string} runtime code + */ + generate() { + return Template.asString([ + `${RuntimeGlobals.global} = (function() {`, + Template.indent([ + "if (typeof globalThis === 'object') return globalThis;", + "try {", + Template.indent( + // This works in non-strict mode + // or + // This works if eval is allowed (see CSP) + "return this || new Function('return this')();" + ), + "} catch (e) {", + Template.indent( + // This works if the window reference is available + "if (typeof window === 'object') return window;" + ), + "}" + // It can still be `undefined`, but nothing to do about it... + // We return `undefined`, instead of nothing here, so it's + // easier to handle this case: + // if (!global) { … } + ]), + "})();" + ]); + } +} + +module.exports = GlobalRuntimeModule; + + +/***/ }), + +/***/ 61725: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sergey Melyukov @smelukov +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +class HasOwnPropertyRuntimeModule extends RuntimeModule { + constructor() { + super("hasOwnProperty shorthand"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeTemplate } = this.compilation; + + return Template.asString([ + `${RuntimeGlobals.hasOwnProperty} = ${runtimeTemplate.returningFunction( + "Object.prototype.hasOwnProperty.call(obj, prop)", + "obj, prop" + )}` + ]); + } +} + +module.exports = HasOwnPropertyRuntimeModule; + + +/***/ }), + +/***/ 37299: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeModule = __webpack_require__(54746); + +class HelperRuntimeModule extends RuntimeModule { + /** + * @param {string} name a readable name + */ + constructor(name) { + super(name); + } +} + +module.exports = HelperRuntimeModule; + + +/***/ }), + +/***/ 23033: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const { SyncWaterfallHook } = __webpack_require__(18416); +const Compilation = __webpack_require__(75388); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const HelperRuntimeModule = __webpack_require__(37299); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compiler")} Compiler */ + +/** + * @typedef {Object} LoadScriptCompilationHooks + * @property {SyncWaterfallHook<[string, Chunk]>} createScript + */ + +/** @type {WeakMap} */ +const compilationHooksMap = new WeakMap(); + +class LoadScriptRuntimeModule extends HelperRuntimeModule { + /** + * @param {Compilation} compilation the compilation + * @returns {LoadScriptCompilationHooks} hooks + */ + static getCompilationHooks(compilation) { + if (!(compilation instanceof Compilation)) { + throw new TypeError( + "The 'compilation' argument must be an instance of Compilation" + ); + } + let hooks = compilationHooksMap.get(compilation); + if (hooks === undefined) { + hooks = { + createScript: new SyncWaterfallHook(["source", "chunk"]) + }; + compilationHooksMap.set(compilation, hooks); + } + return hooks; + } + + constructor() { + super("load script"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { compilation } = this; + const { runtimeTemplate, outputOptions } = compilation; + const { + scriptType, + chunkLoadTimeout: loadTimeout, + crossOriginLoading, + uniqueName, + charset + } = outputOptions; + const fn = RuntimeGlobals.loadScript; + + const { createScript } = LoadScriptRuntimeModule.getCompilationHooks( + compilation + ); + + const code = Template.asString([ + "script = document.createElement('script');", + scriptType ? `script.type = ${JSON.stringify(scriptType)};` : "", + charset ? "script.charset = 'utf-8';" : "", + `script.timeout = ${loadTimeout / 1000};`, + `if (${RuntimeGlobals.scriptNonce}) {`, + Template.indent( + `script.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});` + ), + "}", + uniqueName + ? 'script.setAttribute("data-webpack", dataWebpackPrefix + key);' + : "", + `script.src = url;`, + crossOriginLoading + ? Template.asString([ + "if (script.src.indexOf(window.location.origin + '/') !== 0) {", + Template.indent( + `script.crossOrigin = ${JSON.stringify(crossOriginLoading)};` + ), + "}" + ]) + : "" + ]); + + return Template.asString([ + "var inProgress = {};", + uniqueName + ? `var dataWebpackPrefix = ${JSON.stringify(uniqueName + ":")};` + : "// data-webpack is not used as build has no uniqueName", + "// loadScript function to load a script via script tag", + `${fn} = ${runtimeTemplate.basicFunction("url, done, key, chunkId", [ + "if(inProgress[url]) { inProgress[url].push(done); return; }", + "var script, needAttach;", + "if(key !== undefined) {", + Template.indent([ + 'var scripts = document.getElementsByTagName("script");', + "for(var i = 0; i < scripts.length; i++) {", + Template.indent([ + "var s = scripts[i];", + `if(s.getAttribute("src") == url${ + uniqueName + ? ' || s.getAttribute("data-webpack") == dataWebpackPrefix + key' + : "" + }) { script = s; break; }` + ]), + "}" + ]), + "}", + "if(!script) {", + Template.indent([ + "needAttach = true;", + createScript.call(code, this.chunk) + ]), + "}", + "inProgress[url] = [done];", + "var onScriptComplete = " + + runtimeTemplate.basicFunction( + "prev, event", + Template.asString([ + "// avoid mem leaks in IE.", + "script.onerror = script.onload = null;", + "clearTimeout(timeout);", + "var doneFns = inProgress[url];", + "delete inProgress[url];", + "script.parentNode && script.parentNode.removeChild(script);", + `doneFns && doneFns.forEach(${runtimeTemplate.returningFunction( + "fn(event)", + "fn" + )});`, + "if(prev) return prev(event);" + ]) + ), + ";", + `var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), ${loadTimeout});`, + "script.onerror = onScriptComplete.bind(null, script.onerror);", + "script.onload = onScriptComplete.bind(null, script.onload);", + "needAttach && document.head.appendChild(script);" + ])};` + ]); + } +} + +module.exports = LoadScriptRuntimeModule; + + +/***/ }), + +/***/ 2559: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const HelperRuntimeModule = __webpack_require__(37299); + +class MakeNamespaceObjectRuntimeModule extends HelperRuntimeModule { + constructor() { + super("make namespace object"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { runtimeTemplate } = this.compilation; + const fn = RuntimeGlobals.makeNamespaceObject; + return Template.asString([ + "// define __esModule on exports", + `${fn} = ${runtimeTemplate.basicFunction("exports", [ + "if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {", + Template.indent([ + "Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });" + ]), + "}", + "Object.defineProperty(exports, '__esModule', { value: true });" + ])};` + ]); + } +} + +module.exports = MakeNamespaceObjectRuntimeModule; + + +/***/ }), + +/***/ 25142: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); + +class PublicPathRuntimeModule extends RuntimeModule { + constructor() { + super("publicPath", RuntimeModule.STAGE_BASIC); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { compilation } = this; + const { publicPath } = compilation.outputOptions; + + return `${RuntimeGlobals.publicPath} = ${JSON.stringify( + this.compilation.getPath(publicPath || "", { + hash: this.compilation.hash || "XXXX" + }) + )};`; + } +} + +module.exports = PublicPathRuntimeModule; + + +/***/ }), + +/***/ 24578: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); + +class RuntimeIdRuntimeModule extends RuntimeModule { + constructor() { + super("runtimeId"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { chunk, compilation } = this; + const { chunkGraph } = compilation; + const runtime = chunk.runtime; + if (typeof runtime !== "string") + throw new Error("RuntimeIdRuntimeModule must be in a single runtime"); + const id = chunkGraph.getRuntimeId(runtime); + return `${RuntimeGlobals.runtimeId} = ${JSON.stringify(id)};`; + } +} + +module.exports = RuntimeIdRuntimeModule; + + +/***/ }), + +/***/ 9517: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const StartupChunkDependenciesRuntimeModule = __webpack_require__(12153); +const StartupEntrypointRuntimeModule = __webpack_require__(78605); + +/** @typedef {import("../Compiler")} Compiler */ + +class StartupChunkDependenciesPlugin { + constructor(options) { + this.chunkLoading = options.chunkLoading; + this.asyncChunkLoading = + typeof options.asyncChunkLoading === "boolean" + ? options.asyncChunkLoading + : true; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "StartupChunkDependenciesPlugin", + compilation => { + const globalChunkLoading = compilation.outputOptions.chunkLoading; + const isEnabledForChunk = chunk => { + const options = chunk.getEntryOptions(); + const chunkLoading = + (options && options.chunkLoading) || globalChunkLoading; + return chunkLoading === this.chunkLoading; + }; + compilation.hooks.additionalTreeRuntimeRequirements.tap( + "StartupChunkDependenciesPlugin", + (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + if (compilation.chunkGraph.hasChunkEntryDependentChunks(chunk)) { + set.add(RuntimeGlobals.startup); + set.add(RuntimeGlobals.ensureChunk); + set.add(RuntimeGlobals.ensureChunkIncludeEntries); + compilation.addRuntimeModule( + chunk, + new StartupChunkDependenciesRuntimeModule( + this.asyncChunkLoading + ) + ); + } + } + ); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.startupEntrypoint) + .tap("StartupChunkDependenciesPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.ensureChunk); + set.add(RuntimeGlobals.ensureChunkIncludeEntries); + compilation.addRuntimeModule( + chunk, + new StartupEntrypointRuntimeModule(this.asyncChunkLoading) + ); + }); + } + ); + } +} + +module.exports = StartupChunkDependenciesPlugin; + + +/***/ }), + +/***/ 12153: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +class StartupChunkDependenciesRuntimeModule extends RuntimeModule { + constructor(asyncChunkLoading) { + super("startup chunk dependencies"); + this.asyncChunkLoading = asyncChunkLoading; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { chunk, compilation } = this; + const { chunkGraph, runtimeTemplate } = compilation; + const chunkIds = Array.from( + chunkGraph.getChunkEntryDependentChunksIterable(chunk) + ).map(chunk => { + return chunk.id; + }); + return Template.asString([ + `var next = ${RuntimeGlobals.startup};`, + `${RuntimeGlobals.startup} = ${runtimeTemplate.basicFunction( + "", + !this.asyncChunkLoading + ? chunkIds + .map( + id => `${RuntimeGlobals.ensureChunk}(${JSON.stringify(id)});` + ) + .concat("return next();") + : chunkIds.length === 1 + ? `return ${RuntimeGlobals.ensureChunk}(${JSON.stringify( + chunkIds[0] + )}).then(next);` + : chunkIds.length > 2 + ? [ + // using map is shorter for 3 or more chunks + `return Promise.all(${JSON.stringify(chunkIds)}.map(${ + RuntimeGlobals.ensureChunk + }, __webpack_require__)).then(next);` + ] + : [ + // calling ensureChunk directly is shorter for 0 - 2 chunks + "return Promise.all([", + Template.indent( + chunkIds + .map( + id => `${RuntimeGlobals.ensureChunk}(${JSON.stringify(id)})` + ) + .join(",\n") + ), + "]).then(next);" + ] + )};` + ]); + } +} + +module.exports = StartupChunkDependenciesRuntimeModule; + + +/***/ }), + +/***/ 78605: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); + +/** @typedef {import("../MainTemplate")} MainTemplate */ + +class StartupEntrypointRuntimeModule extends RuntimeModule { + constructor(asyncChunkLoading) { + super("startup entrypoint"); + this.asyncChunkLoading = asyncChunkLoading; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { compilation } = this; + const { runtimeTemplate } = compilation; + return `${ + RuntimeGlobals.startupEntrypoint + } = ${runtimeTemplate.basicFunction( + "chunkIds, moduleId", + this.asyncChunkLoading + ? `return Promise.all(chunkIds.map(${ + RuntimeGlobals.ensureChunk + }, __webpack_require__)).then(${runtimeTemplate.returningFunction( + "__webpack_require__(moduleId)" + )})` + : [ + `chunkIds.map(${RuntimeGlobals.ensureChunk}, __webpack_require__)`, + "return __webpack_require__(moduleId)" + ] + )}`; + } +} + +module.exports = StartupEntrypointRuntimeModule; + + +/***/ }), + +/***/ 77633: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); + +/** @typedef {import("../Compilation")} Compilation */ + +class SystemContextRuntimeModule extends RuntimeModule { + constructor() { + super("__system_context__"); + } + + /** + * @returns {string} runtime code + */ + generate() { + return `${RuntimeGlobals.systemContext} = __system_context__;`; + } +} + +module.exports = SystemContextRuntimeModule; + + +/***/ }), + +/***/ 95549: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const NormalModule = __webpack_require__(88376); +const { getMimetype, decodeDataURI } = __webpack_require__(84695); + +/** @typedef {import("../Compiler")} Compiler */ + +class DataUriPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "DataUriPlugin", + (compilation, { normalModuleFactory }) => { + normalModuleFactory.hooks.resolveForScheme + .for("data") + .tap("DataUriPlugin", resourceData => { + resourceData.data.mimetype = getMimetype(resourceData.resource); + }); + NormalModule.getCompilationHooks(compilation) + .readResourceForScheme.for("data") + .tap("DataUriPlugin", resource => decodeDataURI(resource)); + } + ); + } +} + +module.exports = DataUriPlugin; + + +/***/ }), + +/***/ 58556: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { URL, fileURLToPath } = __webpack_require__(78835); + +/** @typedef {import("../Compiler")} Compiler */ + +class FileUriPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "FileUriPlugin", + (compilation, { normalModuleFactory }) => { + normalModuleFactory.hooks.resolveForScheme + .for("file") + .tap("FileUriPlugin", resourceData => { + const url = new URL(resourceData.resource); + const path = fileURLToPath(url); + const query = url.search; + const fragment = url.hash; + resourceData.path = path; + resourceData.query = query; + resourceData.fragment = fragment; + resourceData.resource = path + query + fragment; + return true; + }); + } + ); + } +} + +module.exports = FileUriPlugin; + + +/***/ }), + +/***/ 53417: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { URL } = __webpack_require__(78835); +const NormalModule = __webpack_require__(88376); + +/** @typedef {import("../Compiler")} Compiler */ + +class HttpUriPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "HttpUriPlugin", + (compilation, { normalModuleFactory }) => { + normalModuleFactory.hooks.resolveForScheme + .for("http") + .tap("HttpUriPlugin", resourceData => { + const url = new URL(resourceData.resource); + resourceData.path = url.origin + url.pathname; + resourceData.query = url.search; + resourceData.fragment = url.hash; + return /** @type {true} */ (true); + }); + NormalModule.getCompilationHooks(compilation) + .readResourceForScheme.for("http") + .tapAsync("HttpUriPlugin", (resource, module, callback) => { + return __webpack_require__(98605).get(new URL(resource), res => { + if (res.statusCode !== 200) { + res.destroy(); + return callback( + new Error(`http request status code = ${res.statusCode}`) + ); + } + + const bufferArr = []; + + res.on("data", chunk => { + bufferArr.push(chunk); + }); + + res.on("end", () => { + if (!res.complete) { + return callback(new Error("http request was terminated")); + } + + callback(null, Buffer.concat(bufferArr)); + }); + }); + }); + } + ); + } +} + +module.exports = HttpUriPlugin; + + +/***/ }), + +/***/ 80730: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { URL } = __webpack_require__(78835); +const NormalModule = __webpack_require__(88376); + +/** @typedef {import("../Compiler")} Compiler */ + +class HttpsUriPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "HttpsUriPlugin", + (compilation, { normalModuleFactory }) => { + normalModuleFactory.hooks.resolveForScheme + .for("https") + .tap("HttpsUriPlugin", resourceData => { + const url = new URL(resourceData.resource); + resourceData.path = url.origin + url.pathname; + resourceData.query = url.search; + resourceData.fragment = url.hash; + return /** @type {true} */ (true); + }); + NormalModule.getCompilationHooks(compilation) + .readResourceForScheme.for("https") + .tapAsync("HttpsUriPlugin", (resource, module, callback) => { + return __webpack_require__(57211).get(new URL(resource), res => { + if (res.statusCode !== 200) { + res.destroy(); + return callback( + new Error(`https request status code = ${res.statusCode}`) + ); + } + + const bufferArr = []; + + res.on("data", chunk => { + bufferArr.push(chunk); + }); + + res.on("end", () => { + if (!res.complete) { + return callback(new Error("https request was terminated")); + } + + callback(null, Buffer.concat(bufferArr)); + }); + }); + }); + } + ); + } +} + +module.exports = HttpsUriPlugin; + + +/***/ }), + +/***/ 90714: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +class ArraySerializer { + serialize(array, { write }) { + write(array.length); + for (const item of array) write(item); + } + deserialize({ read }) { + const length = read(); + const array = []; + for (let i = 0; i < length; i++) { + array.push(read()); + } + return array; + } +} + +module.exports = ArraySerializer; + + +/***/ }), + +/***/ 99795: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const memoize = __webpack_require__(18003); +const SerializerMiddleware = __webpack_require__(54384); + +/** @typedef {import("./types").BufferSerializableType} BufferSerializableType */ +/** @typedef {import("./types").PrimitiveSerializableType} PrimitiveSerializableType */ + +/* eslint-disable no-loop-func */ + +/* +Format: + +File -> Section* + +Section -> NullsSection | + BooleansSection | + F64NumbersSection | + I32NumbersSection | + I8NumbersSection | + ShortStringSection | + StringSection | + BufferSection | + NopSection + + + +NullsSection -> + NullHeaderByte | Null2HeaderByte | Null3HeaderByte | + Nulls8HeaderByte 0xnn (n:count - 4) | + Nulls32HeaderByte n:ui32 (n:count - 260) | +BooleansSection -> TrueHeaderByte | FalseHeaderByte | BooleansSectionHeaderByte BooleansCountAndBitsByte +F64NumbersSection -> F64NumbersSectionHeaderByte f64* +I32NumbersSection -> I32NumbersSectionHeaderByte i32* +I8NumbersSection -> I8NumbersSectionHeaderByte i8* +ShortStringSection -> ShortStringSectionHeaderByte ascii-byte* +StringSection -> StringSectionHeaderByte i32:length utf8-byte* +BufferSection -> BufferSectionHeaderByte i32:length byte* +NopSection --> NopSectionHeaderByte + +ShortStringSectionHeaderByte -> 0b1nnn_nnnn (n:length) + +F64NumbersSectionHeaderByte -> 0b001n_nnnn (n:count - 1) +I32NumbersSectionHeaderByte -> 0b010n_nnnn (n:count - 1) +I8NumbersSectionHeaderByte -> 0b011n_nnnn (n:count - 1) + +NullsSectionHeaderByte -> 0b0001_nnnn (n:count - 1) +BooleansCountAndBitsByte -> + 0b0000_1xxx (count = 3) | + 0b0001_xxxx (count = 4) | + 0b001x_xxxx (count = 5) | + 0b01xx_xxxx (count = 6) | + 0b1nnn_nnnn (n:count - 7, 7 <= count <= 133) + 0xff n:ui32 (n:count, 134 <= count < 2^32) + +StringSectionHeaderByte -> 0b0000_1110 +BufferSectionHeaderByte -> 0b0000_1111 +NopSectionHeaderByte -> 0b0000_1011 +FalseHeaderByte -> 0b0000_1100 +TrueHeaderByte -> 0b0000_1101 + +RawNumber -> n (n <= 10) + +*/ + +const LAZY_HEADER = 0x0b; +const TRUE_HEADER = 0x0c; +const FALSE_HEADER = 0x0d; +const BOOLEANS_HEADER = 0x0e; +const NULL_HEADER = 0x10; +const NULL2_HEADER = 0x11; +const NULL3_HEADER = 0x12; +const NULLS8_HEADER = 0x13; +const NULLS32_HEADER = 0x14; +const NULL_AND_I8_HEADER = 0x15; +const NULL_AND_I32_HEADER = 0x16; +const NULL_AND_TRUE_HEADER = 0x17; +const NULL_AND_FALSE_HEADER = 0x18; +const STRING_HEADER = 0x1e; +const BUFFER_HEADER = 0x1f; +const I8_HEADER = 0x60; +const I32_HEADER = 0x40; +const F64_HEADER = 0x20; +const SHORT_STRING_HEADER = 0x80; + +/** Uplift high-order bits */ +const NUMBERS_HEADER_MASK = 0xe0; +const NUMBERS_COUNT_MASK = 0x1f; // 0b0001_1111 +const SHORT_STRING_LENGTH_MASK = 0x7f; // 0b0111_1111 + +const HEADER_SIZE = 1; +const I8_SIZE = 1; +const I32_SIZE = 4; +const F64_SIZE = 8; + +const MEASURE_START_OPERATION = Symbol("MEASURE_START_OPERATION"); +const MEASURE_END_OPERATION = Symbol("MEASURE_END_OPERATION"); + +const identifyNumber = n => { + if (n === (n | 0)) { + if (n <= 127 && n >= -128) return 0; + if (n <= 2147483647 && n >= -2147483648) return 1; + } + return 2; +}; + +/** + * @typedef {PrimitiveSerializableType[]} DeserializedType + * @typedef {BufferSerializableType[]} SerializedType + * @extends {SerializerMiddleware} + */ +class BinaryMiddleware extends SerializerMiddleware { + static optimizeSerializedData(data) { + const result = []; + const temp = []; + const flush = () => { + if (temp.length > 0) { + if (temp.length === 1) { + result.push(temp[0]); + } else { + result.push(Buffer.concat(temp)); + } + temp.length = 0; + } + }; + for (const item of data) { + if (Buffer.isBuffer(item)) { + temp.push(item); + } else { + flush(); + result.push(item); + } + } + flush(); + return result; + } + + /** + * @param {DeserializedType} data data + * @param {Object} context context object + * @returns {SerializedType|Promise} serialized data + */ + serialize(data, context) { + return this._serialize(data, context); + } + + /** + * @param {DeserializedType} data data + * @param {Object} context context object + * @returns {SerializedType} serialized data + */ + _serialize(data, context) { + /** @type {Buffer} */ + let currentBuffer = null; + /** @type {Buffer} */ + let leftOverBuffer = null; + let currentPosition = 0; + /** @type {BufferSerializableType[]} */ + const buffers = []; + let buffersTotalLength = 0; + const allocate = (bytesNeeded, exact = false) => { + if (currentBuffer !== null) { + if (currentBuffer.length - currentPosition >= bytesNeeded) return; + flush(); + } + if (leftOverBuffer && leftOverBuffer.length >= bytesNeeded) { + currentBuffer = leftOverBuffer; + leftOverBuffer = null; + } else { + currentBuffer = Buffer.allocUnsafe( + exact ? bytesNeeded : Math.max(bytesNeeded, buffersTotalLength, 1024) + ); + } + }; + const flush = () => { + if (currentBuffer !== null) { + buffers.push(currentBuffer.slice(0, currentPosition)); + if ( + !leftOverBuffer || + leftOverBuffer.length < currentBuffer.length - currentPosition + ) + leftOverBuffer = currentBuffer.slice(currentPosition); + currentBuffer = null; + buffersTotalLength += currentPosition; + currentPosition = 0; + } + }; + const writeU8 = byte => { + currentBuffer.writeUInt8(byte, currentPosition++); + }; + const writeU32 = ui32 => { + currentBuffer.writeUInt32LE(ui32, currentPosition); + currentPosition += 4; + }; + const measureStack = []; + const measureStart = () => { + measureStack.push(buffers.length, currentPosition); + }; + const measureEnd = () => { + const oldPos = measureStack.pop(); + const buffersIndex = measureStack.pop(); + let size = currentPosition - oldPos; + for (let i = buffersIndex; i < buffers.length; i++) { + size += buffers[i].length; + } + return size; + }; + const serializeData = data => { + for (let i = 0; i < data.length; i++) { + const thing = data[i]; + switch (typeof thing) { + case "function": { + if (!SerializerMiddleware.isLazy(thing)) + throw new Error("Unexpected function " + thing); + /** @type {SerializedType | (() => SerializedType)} */ + let serializedData = SerializerMiddleware.getLazySerializedValue( + thing + ); + if (serializedData === undefined) { + if (SerializerMiddleware.isLazy(thing, this)) { + const data = this._serialize(thing(), context); + SerializerMiddleware.setLazySerializedValue(thing, data); + serializedData = data; + } else { + serializedData = SerializerMiddleware.serializeLazy( + thing, + data => this._serialize(data, context) + ); + } + } + if (typeof serializedData === "function") { + flush(); + buffers.push(serializedData); + } else { + const lengths = []; + for (const item of serializedData) { + let last; + if (typeof item === "function") { + lengths.push(0); + } else if (item.length === 0) { + // ignore + } else if ( + lengths.length > 0 && + (last = lengths[lengths.length - 1]) !== 0 + ) { + const remaining = 0xffffffff - last; + if (remaining >= item.length) { + lengths[lengths.length - 1] += item.length; + } else { + lengths.push(item.length - remaining); + lengths[lengths.length - 2] = 0xffffffff; + } + } else { + lengths.push(item.length); + } + } + allocate(5 + lengths.length * 4); + writeU8(LAZY_HEADER); + writeU32(lengths.length); + for (const l of lengths) { + writeU32(l); + } + for (const item of serializedData) { + flush(); + buffers.push(item); + } + } + break; + } + case "string": { + const len = Buffer.byteLength(thing); + if (len >= 128 || len !== thing.length) { + allocate(len + HEADER_SIZE + I32_SIZE); + writeU8(STRING_HEADER); + writeU32(len); + currentBuffer.write(thing, currentPosition); + } else { + allocate(len + HEADER_SIZE); + writeU8(SHORT_STRING_HEADER | len); + currentBuffer.write(thing, currentPosition, "latin1"); + } + currentPosition += len; + break; + } + case "number": { + const type = identifyNumber(thing); + if (type === 0 && thing >= 0 && thing <= 10) { + // shortcut for very small numbers + allocate(I8_SIZE); + writeU8(thing); + break; + } + /** + * amount of numbers to write + * @type {number} + */ + let n = 1; + for (; n < 32 && i + n < data.length; n++) { + const item = data[i + n]; + if (typeof item !== "number") break; + if (identifyNumber(item) !== type) break; + } + switch (type) { + case 0: + allocate(HEADER_SIZE + I8_SIZE * n); + writeU8(I8_HEADER | (n - 1)); + while (n > 0) { + currentBuffer.writeInt8( + /** @type {number} */ (data[i]), + currentPosition + ); + currentPosition += I8_SIZE; + n--; + i++; + } + break; + case 1: + allocate(HEADER_SIZE + I32_SIZE * n); + writeU8(I32_HEADER | (n - 1)); + while (n > 0) { + currentBuffer.writeInt32LE( + /** @type {number} */ (data[i]), + currentPosition + ); + currentPosition += I32_SIZE; + n--; + i++; + } + break; + case 2: + allocate(HEADER_SIZE + F64_SIZE * n); + writeU8(F64_HEADER | (n - 1)); + while (n > 0) { + currentBuffer.writeDoubleLE( + /** @type {number} */ (data[i]), + currentPosition + ); + currentPosition += F64_SIZE; + n--; + i++; + } + break; + } + + i--; + break; + } + case "boolean": { + let lastByte = thing === true ? 1 : 0; + const bytes = []; + let count = 1; + let n; + for (n = 1; n < 0xffffffff && i + n < data.length; n++) { + const item = data[i + n]; + if (typeof item !== "boolean") break; + const pos = count & 0x7; + if (pos === 0) { + bytes.push(lastByte); + lastByte = item === true ? 1 : 0; + } else if (item === true) { + lastByte |= 1 << pos; + } + count++; + } + i += count - 1; + if (count === 1) { + allocate(HEADER_SIZE); + writeU8(lastByte === 1 ? TRUE_HEADER : FALSE_HEADER); + } else if (count === 2) { + allocate(HEADER_SIZE * 2); + writeU8(lastByte & 1 ? TRUE_HEADER : FALSE_HEADER); + writeU8(lastByte & 2 ? TRUE_HEADER : FALSE_HEADER); + } else if (count <= 6) { + allocate(HEADER_SIZE + I8_SIZE); + writeU8(BOOLEANS_HEADER); + writeU8((1 << count) | lastByte); + } else if (count <= 133) { + allocate(HEADER_SIZE + I8_SIZE * bytes.length + I8_SIZE); + writeU8(BOOLEANS_HEADER); + writeU8(0x80 | (count - 7)); + for (const byte of bytes) writeU8(byte); + writeU8(lastByte); + } else { + allocate(HEADER_SIZE + I8_SIZE * bytes.length + I8_SIZE); + writeU8(BOOLEANS_HEADER); + writeU8(0xff); + writeU32(count); + for (const byte of bytes) writeU8(byte); + writeU8(lastByte); + } + break; + } + case "object": { + if (thing === null) { + let n; + for (n = 1; n < 0x100000104 && i + n < data.length; n++) { + const item = data[i + n]; + if (item !== null) break; + } + i += n - 1; + if (n === 1) { + if (i + 1 < data.length) { + const next = data[i + 1]; + if (next === true) { + allocate(HEADER_SIZE); + writeU8(NULL_AND_TRUE_HEADER); + i++; + } else if (next === false) { + allocate(HEADER_SIZE); + writeU8(NULL_AND_FALSE_HEADER); + i++; + } else if (typeof next === "number") { + const type = identifyNumber(next); + if (type === 0) { + allocate(HEADER_SIZE + I8_SIZE); + writeU8(NULL_AND_I8_HEADER); + currentBuffer.writeInt8(next, currentPosition); + currentPosition += I8_SIZE; + i++; + } else if (type === 1) { + allocate(HEADER_SIZE + I32_SIZE); + writeU8(NULL_AND_I32_HEADER); + currentBuffer.writeInt32LE(next, currentPosition); + currentPosition += I32_SIZE; + i++; + } else { + allocate(HEADER_SIZE); + writeU8(NULL_HEADER); + } + } else { + allocate(HEADER_SIZE); + writeU8(NULL_HEADER); + } + } else { + allocate(HEADER_SIZE); + writeU8(NULL_HEADER); + } + } else if (n === 2) { + allocate(HEADER_SIZE); + writeU8(NULL2_HEADER); + } else if (n === 3) { + allocate(HEADER_SIZE); + writeU8(NULL3_HEADER); + } else if (n < 260) { + allocate(HEADER_SIZE + I8_SIZE); + writeU8(NULLS8_HEADER); + writeU8(n - 4); + } else { + allocate(HEADER_SIZE + I32_SIZE); + writeU8(NULLS32_HEADER); + writeU32(n - 260); + } + } else if (Buffer.isBuffer(thing)) { + allocate(HEADER_SIZE + I32_SIZE, true); + writeU8(BUFFER_HEADER); + writeU32(thing.length); + flush(); + buffers.push(thing); + } + break; + } + case "symbol": { + if (thing === MEASURE_START_OPERATION) { + measureStart(); + } else if (thing === MEASURE_END_OPERATION) { + const size = measureEnd(); + allocate(HEADER_SIZE + I32_SIZE); + writeU8(I32_HEADER); + currentBuffer.writeInt32LE(size, currentPosition); + currentPosition += I32_SIZE; + } + break; + } + } + } + }; + serializeData(data); + flush(); + return buffers; + } + + /** + * @param {SerializedType} data data + * @param {Object} context context object + * @returns {DeserializedType|Promise} deserialized data + */ + deserialize(data, context) { + return this._deserialize(data, context); + } + + /** + * @param {SerializedType} data data + * @param {Object} context context object + * @returns {DeserializedType} deserialized data + */ + _deserialize(data, context) { + let currentDataItem = 0; + let currentBuffer = data[0]; + let currentIsBuffer = Buffer.isBuffer(currentBuffer); + let currentPosition = 0; + + const checkOverflow = () => { + if (currentPosition >= currentBuffer.length) { + currentPosition = 0; + currentDataItem++; + currentBuffer = + currentDataItem < data.length ? data[currentDataItem] : null; + currentIsBuffer = Buffer.isBuffer(currentBuffer); + } + }; + const isInCurrentBuffer = n => { + return currentIsBuffer && n + currentPosition <= currentBuffer.length; + }; + /** + * Reads n bytes + * @param {number} n amount of bytes to read + * @returns {Buffer} buffer with bytes + */ + const read = n => { + if (!currentIsBuffer) { + throw new Error( + currentBuffer === null + ? "Unexpected end of stream" + : "Unexpected lazy element in stream" + ); + } + const rem = currentBuffer.length - currentPosition; + if (rem < n) { + return Buffer.concat([read(rem), read(n - rem)]); + } + const res = /** @type {Buffer} */ (currentBuffer).slice( + currentPosition, + currentPosition + n + ); + currentPosition += n; + checkOverflow(); + return res; + }; + /** + * Reads up to n bytes + * @param {number} n amount of bytes to read + * @returns {Buffer} buffer with bytes + */ + const readUpTo = n => { + if (!currentIsBuffer) { + throw new Error( + currentBuffer === null + ? "Unexpected end of stream" + : "Unexpected lazy element in stream" + ); + } + const rem = currentBuffer.length - currentPosition; + if (rem < n) { + n = rem; + } + const res = /** @type {Buffer} */ (currentBuffer).slice( + currentPosition, + currentPosition + n + ); + currentPosition += n; + checkOverflow(); + return res; + }; + const readU8 = () => { + if (!currentIsBuffer) { + throw new Error( + currentBuffer === null + ? "Unexpected end of stream" + : "Unexpected lazy element in stream" + ); + } + /** + * There is no need to check remaining buffer size here + * since {@link checkOverflow} guarantees at least one byte remaining + */ + const byte = /** @type {Buffer} */ (currentBuffer).readUInt8( + currentPosition + ); + currentPosition += I8_SIZE; + checkOverflow(); + return byte; + }; + const readU32 = () => { + return read(I32_SIZE).readUInt32LE(0); + }; + const readBits = (data, n) => { + let mask = 1; + while (n !== 0) { + result.push((data & mask) !== 0); + mask = mask << 1; + n--; + } + }; + const dispatchTable = Array.from({ length: 256 }).map((_, header) => { + switch (header) { + case LAZY_HEADER: + return () => { + const count = readU32(); + const lengths = Array.from({ length: count }).map(() => readU32()); + const content = []; + for (let l of lengths) { + if (l === 0) { + if (typeof currentBuffer !== "function") { + throw new Error("Unexpected non-lazy element in stream"); + } + content.push(currentBuffer); + currentDataItem++; + currentBuffer = + currentDataItem < data.length ? data[currentDataItem] : null; + currentIsBuffer = Buffer.isBuffer(currentBuffer); + } else { + do { + const buf = readUpTo(l); + l -= buf.length; + content.push(buf); + } while (l > 0); + } + } + result.push( + SerializerMiddleware.createLazy( + memoize(() => this._deserialize(content, context)), + this, + undefined, + content + ) + ); + }; + case BUFFER_HEADER: + return () => { + const len = readU32(); + result.push(read(len)); + }; + case TRUE_HEADER: + return () => result.push(true); + case FALSE_HEADER: + return () => result.push(false); + case NULL3_HEADER: + return () => result.push(null, null, null); + case NULL2_HEADER: + return () => result.push(null, null); + case NULL_HEADER: + return () => result.push(null); + case NULL_AND_TRUE_HEADER: + return () => result.push(null, true); + case NULL_AND_FALSE_HEADER: + return () => result.push(null, false); + case NULL_AND_I8_HEADER: + return () => { + if (currentIsBuffer) { + result.push( + null, + /** @type {Buffer} */ (currentBuffer).readInt8(currentPosition) + ); + currentPosition += I8_SIZE; + checkOverflow(); + } else { + result.push(null, read(I8_SIZE).readInt8(0)); + } + }; + case NULL_AND_I32_HEADER: + return () => { + result.push(null); + if (isInCurrentBuffer(I32_SIZE)) { + result.push( + /** @type {Buffer} */ (currentBuffer).readInt32LE( + currentPosition + ) + ); + currentPosition += I32_SIZE; + checkOverflow(); + } else { + result.push(read(I32_SIZE).readInt32LE(0)); + } + }; + case NULLS8_HEADER: + return () => { + const len = readU8() + 4; + for (let i = 0; i < len; i++) { + result.push(null); + } + }; + case NULLS32_HEADER: + return () => { + const len = readU32() + 260; + for (let i = 0; i < len; i++) { + result.push(null); + } + }; + case BOOLEANS_HEADER: + return () => { + const innerHeader = readU8(); + if ((innerHeader & 0xf0) === 0) { + readBits(innerHeader, 3); + } else if ((innerHeader & 0xe0) === 0) { + readBits(innerHeader, 4); + } else if ((innerHeader & 0xc0) === 0) { + readBits(innerHeader, 5); + } else if ((innerHeader & 0x80) === 0) { + readBits(innerHeader, 6); + } else if (innerHeader !== 0xff) { + let count = (innerHeader & 0x7f) + 7; + while (count > 8) { + readBits(readU8(), 8); + count -= 8; + } + readBits(readU8(), count); + } else { + let count = readU32(); + while (count > 8) { + readBits(readU8(), 8); + count -= 8; + } + readBits(readU8(), count); + } + }; + case STRING_HEADER: + return () => { + const len = readU32(); + if (isInCurrentBuffer(len)) { + result.push( + currentBuffer.toString( + undefined, + currentPosition, + currentPosition + len + ) + ); + currentPosition += len; + checkOverflow(); + } else { + result.push(read(len).toString()); + } + }; + case SHORT_STRING_HEADER: + return () => result.push(""); + case SHORT_STRING_HEADER | 1: + return () => { + if (currentIsBuffer) { + result.push( + currentBuffer.toString( + "latin1", + currentPosition, + currentPosition + 1 + ) + ); + currentPosition++; + checkOverflow(); + } else { + result.push(read(1).toString("latin1")); + } + }; + case I8_HEADER: + return () => { + if (currentIsBuffer) { + result.push( + /** @type {Buffer} */ (currentBuffer).readInt8(currentPosition) + ); + currentPosition++; + checkOverflow(); + } else { + result.push(read(1).readInt8(0)); + } + }; + default: + if (header <= 10) { + return () => result.push(header); + } else if ((header & SHORT_STRING_HEADER) === SHORT_STRING_HEADER) { + const len = header & SHORT_STRING_LENGTH_MASK; + return () => { + if (isInCurrentBuffer(len)) { + result.push( + currentBuffer.toString( + "latin1", + currentPosition, + currentPosition + len + ) + ); + currentPosition += len; + checkOverflow(); + } else { + result.push(read(len).toString("latin1")); + } + }; + } else if ((header & NUMBERS_HEADER_MASK) === F64_HEADER) { + const len = (header & NUMBERS_COUNT_MASK) + 1; + return () => { + const need = F64_SIZE * len; + if (isInCurrentBuffer(need)) { + for (let i = 0; i < len; i++) { + result.push( + /** @type {Buffer} */ (currentBuffer).readDoubleLE( + currentPosition + ) + ); + currentPosition += F64_SIZE; + } + checkOverflow(); + } else { + const buf = read(need); + for (let i = 0; i < len; i++) { + result.push(buf.readDoubleLE(i * F64_SIZE)); + } + } + }; + } else if ((header & NUMBERS_HEADER_MASK) === I32_HEADER) { + const len = (header & NUMBERS_COUNT_MASK) + 1; + return () => { + const need = I32_SIZE * len; + if (isInCurrentBuffer(need)) { + for (let i = 0; i < len; i++) { + result.push( + /** @type {Buffer} */ (currentBuffer).readInt32LE( + currentPosition + ) + ); + currentPosition += I32_SIZE; + } + checkOverflow(); + } else { + const buf = read(need); + for (let i = 0; i < len; i++) { + result.push(buf.readInt32LE(i * I32_SIZE)); + } + } + }; + } else if ((header & NUMBERS_HEADER_MASK) === I8_HEADER) { + const len = (header & NUMBERS_COUNT_MASK) + 1; + return () => { + const need = I8_SIZE * len; + if (isInCurrentBuffer(need)) { + for (let i = 0; i < len; i++) { + result.push( + /** @type {Buffer} */ (currentBuffer).readInt8( + currentPosition + ) + ); + currentPosition += I8_SIZE; + } + checkOverflow(); + } else { + const buf = read(need); + for (let i = 0; i < len; i++) { + result.push(buf.readInt8(i * I8_SIZE)); + } + } + }; + } else { + return () => { + throw new Error( + `Unexpected header byte 0x${header.toString(16)}` + ); + }; + } + } + }); + + /** @type {DeserializedType} */ + const result = []; + while (currentBuffer !== null) { + if (typeof currentBuffer === "function") { + result.push( + SerializerMiddleware.deserializeLazy(currentBuffer, data => + this._deserialize(data, context) + ) + ); + currentDataItem++; + currentBuffer = + currentDataItem < data.length ? data[currentDataItem] : null; + currentIsBuffer = Buffer.isBuffer(currentBuffer); + } else { + const header = readU8(); + dispatchTable[header](); + } + } + return result; + } +} + +module.exports = BinaryMiddleware; + +module.exports.MEASURE_START_OPERATION = MEASURE_START_OPERATION; +module.exports.MEASURE_END_OPERATION = MEASURE_END_OPERATION; + + +/***/ }), + +/***/ 73255: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +class DateObjectSerializer { + serialize(obj, { write }) { + write(obj.getTime()); + } + deserialize({ read }) { + return new Date(read()); + } +} + +module.exports = DateObjectSerializer; + + +/***/ }), + +/***/ 21562: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +class ErrorObjectSerializer { + constructor(Type) { + this.Type = Type; + } + + serialize(obj, { write }) { + write(obj.message); + write(obj.stack); + } + + deserialize({ read }) { + const err = new this.Type(); + + err.message = read(); + err.stack = read(); + + return err; + } +} + +module.exports = ErrorObjectSerializer; + + +/***/ }), + +/***/ 84013: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const { constants } = __webpack_require__(64293); +const createHash = __webpack_require__(34627); +const { dirname, join, mkdirp } = __webpack_require__(71593); +const memoize = __webpack_require__(18003); +const SerializerMiddleware = __webpack_require__(54384); + +/** @typedef {import("../util/fs").IntermediateFileSystem} IntermediateFileSystem */ +/** @typedef {import("./types").BufferSerializableType} BufferSerializableType */ + +/* +Format: + +File -> Header Section* + +Version -> u32 +AmountOfSections -> u32 +SectionSize -> i32 (if less than zero represents lazy value) + +Header -> Version AmountOfSections SectionSize* + +Buffer -> n bytes +Section -> Buffer + +*/ + +// "wpc" + 1 in little-endian +const VERSION = 0x01637077; +const hashForName = buffers => { + const hash = createHash("md4"); + for (const buf of buffers) hash.update(buf); + return /** @type {string} */ (hash.digest("hex")); +}; + +const writeUInt64LE = Buffer.prototype.writeBigUInt64LE + ? (buf, value, offset) => { + buf.writeBigUInt64LE(BigInt(value), offset); + } + : (buf, value, offset) => { + const low = value % 0x100000000; + const high = (value - low) / 0x100000000; + buf.writeUInt32LE(low, offset); + buf.writeUInt32LE(high, offset + 4); + }; + +const readUInt64LE = Buffer.prototype.readBigUInt64LE + ? (buf, offset) => { + return Number(buf.readBigUInt64LE(offset)); + } + : (buf, offset) => { + const low = buf.readUInt32LE(offset); + const high = buf.readUInt32LE(offset + 4); + return high * 0x100000000 + low; + }; + +/** + * @typedef {Object} SerializeResult + * @property {string | false} name + * @property {number} size + * @property {Promise=} backgroundJob + */ + +/** + * @param {FileMiddleware} middleware this + * @param {BufferSerializableType[] | Promise} data data to be serialized + * @param {string | boolean} name file base name + * @param {function(string | false, Buffer[]): Promise} writeFile writes a file + * @returns {Promise} resulting file pointer and promise + */ +const serialize = async (middleware, data, name, writeFile) => { + /** @type {(Buffer[] | Buffer | SerializeResult | Promise)[]} */ + const processedData = []; + /** @type {WeakMap>} */ + const resultToLazy = new WeakMap(); + /** @type {Buffer[]} */ + let lastBuffers = undefined; + for (const item of await data) { + if (typeof item === "function") { + if (!SerializerMiddleware.isLazy(item)) + throw new Error("Unexpected function"); + if (!SerializerMiddleware.isLazy(item, middleware)) { + throw new Error( + "Unexpected lazy value with non-this target (can't pass through lazy values)" + ); + } + lastBuffers = undefined; + const serializedInfo = SerializerMiddleware.getLazySerializedValue(item); + if (serializedInfo) { + if (typeof serializedInfo === "function") { + throw new Error( + "Unexpected lazy value with non-this target (can't pass through lazy values)" + ); + } else { + processedData.push(serializedInfo); + } + } else { + const content = item(); + if (content) { + const options = SerializerMiddleware.getLazyOptions(item); + processedData.push( + serialize( + middleware, + content, + (options && options.name) || true, + writeFile + ).then(result => { + /** @type {any} */ (item).options.size = result.size; + resultToLazy.set(result, item); + return result; + }) + ); + } else { + throw new Error( + "Unexpected falsy value returned by lazy value function" + ); + } + } + } else if (item) { + if (lastBuffers) { + lastBuffers.push(item); + } else { + lastBuffers = [item]; + processedData.push(lastBuffers); + } + } else { + throw new Error("Unexpected falsy value in items array"); + } + } + /** @type {Promise[]} */ + const backgroundJobs = []; + const resolvedData = ( + await Promise.all( + /** @type {Promise[]} */ (processedData) + ) + ).map(item => { + if (Array.isArray(item) || Buffer.isBuffer(item)) return item; + + backgroundJobs.push(item.backgroundJob); + // create pointer buffer from size and name + const name = /** @type {string} */ (item.name); + const nameBuffer = Buffer.from(name); + const buf = Buffer.allocUnsafe(8 + nameBuffer.length); + writeUInt64LE(buf, item.size, 0); + nameBuffer.copy(buf, 8, 0); + const lazy = resultToLazy.get(item); + SerializerMiddleware.setLazySerializedValue(lazy, buf); + return buf; + }); + const lengths = []; + for (const item of resolvedData) { + if (Array.isArray(item)) { + let l = 0; + for (const b of item) l += b.length; + while (l > 0x7fffffff) { + lengths.push(0x7fffffff); + l -= 0x7fffffff; + } + lengths.push(l); + } else if (item) { + lengths.push(-item.length); + } else { + throw new Error("Unexpected falsy value in resolved data " + item); + } + } + const header = Buffer.allocUnsafe(8 + lengths.length * 4); + header.writeUInt32LE(VERSION, 0); + header.writeUInt32LE(lengths.length, 4); + for (let i = 0; i < lengths.length; i++) { + header.writeInt32LE(lengths[i], 8 + i * 4); + } + const buf = [header]; + for (const item of resolvedData) { + if (Array.isArray(item)) { + for (const b of item) buf.push(b); + } else if (item) { + buf.push(item); + } + } + if (name === true) { + name = hashForName(buf); + } + backgroundJobs.push(writeFile(name, buf)); + let size = 0; + for (const b of buf) size += b.length; + return { + size, + name, + backgroundJob: + backgroundJobs.length === 1 + ? backgroundJobs[0] + : Promise.all(backgroundJobs) + }; +}; + +/** + * @param {FileMiddleware} middleware this + * @param {string | false} name filename + * @param {function(string | false): Promise} readFile read content of a file + * @returns {Promise} deserialized data + */ +const deserialize = async (middleware, name, readFile) => { + const contents = await readFile(name); + if (contents.length === 0) throw new Error("Empty file " + name); + let contentsIndex = 0; + let contentItem = contents[0]; + let contentItemLength = contentItem.length; + let contentPosition = 0; + if (contentItemLength === 0) throw new Error("Empty file " + name); + const nextContent = () => { + contentsIndex++; + contentItem = contents[contentsIndex]; + contentItemLength = contentItem.length; + contentPosition = 0; + }; + const ensureData = n => { + if (contentPosition === contentItemLength) { + nextContent(); + } + while (contentItemLength - contentPosition < n) { + const remaining = contentItem.slice(contentPosition); + let lengthFromNext = n - remaining.length; + const buffers = [remaining]; + for (let i = contentsIndex + 1; i < contents.length; i++) { + const l = contents[i].length; + if (l > lengthFromNext) { + buffers.push(contents[i].slice(0, lengthFromNext)); + contents[i] = contents[i].slice(lengthFromNext); + lengthFromNext = 0; + break; + } else { + buffers.push(contents[i]); + contentsIndex = i; + lengthFromNext -= l; + } + } + if (lengthFromNext > 0) throw new Error("Unexpected end of data"); + contentItem = Buffer.concat(buffers, n); + contentItemLength = n; + contentPosition = 0; + } + }; + const readUInt32LE = () => { + ensureData(4); + const value = contentItem.readUInt32LE(contentPosition); + contentPosition += 4; + return value; + }; + const readInt32LE = () => { + ensureData(4); + const value = contentItem.readInt32LE(contentPosition); + contentPosition += 4; + return value; + }; + const readSlice = l => { + ensureData(l); + if (contentPosition === 0 && contentItemLength === l) { + const result = contentItem; + if (contentsIndex + 1 < contents.length) { + nextContent(); + } else { + contentPosition = l; + } + return result; + } + const result = contentItem.slice(contentPosition, contentPosition + l); + contentPosition += l; + // we clone the buffer here to allow the original content to be garbage collected + return l * 2 < contentItem.buffer.byteLength ? Buffer.from(result) : result; + }; + const version = readUInt32LE(); + if (version !== VERSION) { + throw new Error("Invalid file version"); + } + const sectionCount = readUInt32LE(); + const lengths = []; + for (let i = 0; i < sectionCount; i++) { + lengths.push(readInt32LE()); + } + const result = []; + for (let length of lengths) { + if (length < 0) { + const slice = readSlice(-length); + const size = Number(readUInt64LE(slice, 0)); + const nameBuffer = slice.slice(8); + const name = nameBuffer.toString(); + result.push( + SerializerMiddleware.createLazy( + memoize(() => deserialize(middleware, name, readFile)), + middleware, + { + name, + size + }, + slice + ) + ); + } else { + if (contentPosition === contentItemLength) { + nextContent(); + } else if (contentPosition !== 0) { + if (length <= contentItemLength - contentPosition) { + result.push( + contentItem.slice(contentPosition, contentPosition + length) + ); + contentPosition += length; + length = 0; + } else { + result.push(contentItem.slice(contentPosition)); + length -= contentItemLength - contentPosition; + contentPosition = contentItemLength; + } + } else { + if (length >= contentItemLength) { + result.push(contentItem); + length -= contentItemLength; + contentPosition = contentItemLength; + } else { + result.push(contentItem.slice(0, length)); + contentPosition += length; + length = 0; + } + } + while (length > 0) { + nextContent(); + if (length >= contentItemLength) { + result.push(contentItem); + length -= contentItemLength; + contentPosition = contentItemLength; + } else { + result.push(contentItem.slice(0, length)); + contentPosition += length; + length = 0; + } + } + } + } + return result; +}; + +/** + * @typedef {BufferSerializableType[]} DeserializedType + * @typedef {true} SerializedType + * @extends {SerializerMiddleware} + */ +class FileMiddleware extends SerializerMiddleware { + /** + * @param {IntermediateFileSystem} fs filesystem + */ + constructor(fs) { + super(); + this.fs = fs; + } + /** + * @param {DeserializedType} data data + * @param {Object} context context object + * @returns {SerializedType|Promise} serialized data + */ + serialize(data, context) { + const { filename, extension = "" } = context; + return new Promise((resolve, reject) => { + mkdirp(this.fs, dirname(this.fs, filename), err => { + if (err) return reject(err); + + // It's important that we don't touch existing files during serialization + // because serialize may read existing files (when deserializing) + const allWrittenFiles = new Set(); + const writeFile = async (name, content) => { + const file = name + ? join(this.fs, filename, `../${name}${extension}`) + : filename; + await new Promise((resolve, reject) => { + const stream = this.fs.createWriteStream(file + "_"); + for (const b of content) stream.write(b); + stream.end(); + stream.on("error", err => reject(err)); + stream.on("finish", () => resolve()); + }); + if (name) allWrittenFiles.add(file); + }; + + resolve( + serialize(this, data, false, writeFile).then( + async ({ backgroundJob }) => { + await backgroundJob; + + // Rename the index file to disallow access during inconsistent file state + await new Promise(resolve => + this.fs.rename(filename, filename + ".old", err => { + resolve(); + }) + ); + + // update all written files + await Promise.all( + Array.from( + allWrittenFiles, + file => + new Promise((resolve, reject) => { + this.fs.rename(file + "_", file, err => { + if (err) return reject(err); + resolve(); + }); + }) + ) + ); + + // As final step automatically update the index file to have a consistent pack again + await new Promise(resolve => { + this.fs.rename(filename + "_", filename, err => { + if (err) return reject(err); + resolve(); + }); + }); + return /** @type {true} */ (true); + } + ) + ); + }); + }); + } + + /** + * @param {SerializedType} data data + * @param {Object} context context object + * @returns {DeserializedType|Promise} deserialized data + */ + deserialize(data, context) { + const { filename, extension = "" } = context; + const readFile = name => + new Promise((resolve, reject) => { + const file = name + ? join(this.fs, filename, `../${name}${extension}`) + : filename; + this.fs.stat(file, (err, stats) => { + if (err) { + reject(err); + return; + } + let remaining = stats.size; + let currentBuffer; + let currentBufferUsed; + const buf = []; + this.fs.open(file, "r", (err, fd) => { + if (err) { + reject(err); + return; + } + const read = () => { + if (currentBuffer === undefined) { + currentBuffer = Buffer.allocUnsafeSlow( + Math.min(constants.MAX_LENGTH, remaining) + ); + currentBufferUsed = 0; + } + let readBuffer = currentBuffer; + let readOffset = currentBufferUsed; + let readLength = currentBuffer.length - currentBufferUsed; + if (readOffset > 0x7fffffff) { + readBuffer = currentBuffer.slice(readOffset); + readOffset = 0; + } + if (readLength > 0x7fffffff) { + readLength = 0x7fffffff; + } + this.fs.read( + fd, + readBuffer, + readOffset, + readLength, + null, + (err, bytesRead) => { + if (err) { + this.fs.close(fd, () => { + reject(err); + }); + return; + } + currentBufferUsed += bytesRead; + remaining -= bytesRead; + if (currentBufferUsed === currentBuffer.length) { + buf.push(currentBuffer); + currentBuffer = undefined; + if (remaining === 0) { + this.fs.close(fd, err => { + if (err) { + reject(err); + return; + } + resolve(buf); + }); + return; + } + } + read(); + } + ); + }; + read(); + }); + }); + }); + return deserialize(this, false, readFile); + } +} + +module.exports = FileMiddleware; + + +/***/ }), + +/***/ 19476: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +class MapObjectSerializer { + serialize(obj, { write }) { + write(obj.size); + for (const key of obj.keys()) { + write(key); + } + for (const value of obj.values()) { + write(value); + } + } + deserialize({ read }) { + let size = read(); + const map = new Map(); + const keys = []; + for (let i = 0; i < size; i++) { + keys.push(read()); + } + for (let i = 0; i < size; i++) { + map.set(keys[i], read()); + } + return map; + } +} + +module.exports = MapObjectSerializer; + + +/***/ }), + +/***/ 5828: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +class NullPrototypeObjectSerializer { + serialize(obj, { write }) { + const keys = Object.keys(obj); + for (const key of keys) { + write(key); + } + write(null); + for (const key of keys) { + write(obj[key]); + } + } + deserialize({ read }) { + const obj = Object.create(null); + const keys = []; + let key = read(); + while (key !== null) { + keys.push(key); + key = read(); + } + for (const key of keys) { + obj[key] = read(); + } + return obj; + } +} + +module.exports = NullPrototypeObjectSerializer; + + +/***/ }), + +/***/ 9814: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const createHash = __webpack_require__(34627); +const ArraySerializer = __webpack_require__(90714); +const DateObjectSerializer = __webpack_require__(73255); +const ErrorObjectSerializer = __webpack_require__(21562); +const MapObjectSerializer = __webpack_require__(19476); +const NullPrototypeObjectSerializer = __webpack_require__(5828); +const PlainObjectSerializer = __webpack_require__(39162); +const RegExpObjectSerializer = __webpack_require__(50650); +const SerializerMiddleware = __webpack_require__(54384); +const SetObjectSerializer = __webpack_require__(57296); + +/** @typedef {import("./types").ComplexSerializableType} ComplexSerializableType */ +/** @typedef {import("./types").PrimitiveSerializableType} PrimitiveSerializableType */ + +/** @typedef {new (...params: any[]) => any} Constructor */ + +/* + +Format: + +File -> Section* +Section -> ObjectSection | ReferenceSection | EscapeSection | OtherSection + +ObjectSection -> ESCAPE ( + number:relativeOffset (number > 0) | + string:request (string|null):export +) Section:value* ESCAPE ESCAPE_END_OBJECT +ReferenceSection -> ESCAPE number:relativeOffset (number < 0) +EscapeSection -> ESCAPE ESCAPE_ESCAPE_VALUE (escaped value ESCAPE) +EscapeSection -> ESCAPE ESCAPE_UNDEFINED (escaped value ESCAPE) +OtherSection -> any (except ESCAPE) + +Why using null as escape value? +Multiple null values can merged by the BinaryMiddleware, which makes it very efficient +Technically any value can be used. + +*/ + +/** + * @typedef {Object} ObjectSerializerContext + * @property {function(any): void} write + */ + +/** + * @typedef {Object} ObjectDeserializerContext + * @property {function(): any} read + */ + +/** + * @typedef {Object} ObjectSerializer + * @property {function(any, ObjectSerializerContext): void} serialize + * @property {function(ObjectDeserializerContext): any} deserialize + */ + +const setSetSize = (set, size) => { + let i = 0; + for (const item of set) { + if (i++ >= size) { + set.delete(item); + } + } +}; + +const setMapSize = (map, size) => { + let i = 0; + for (const item of map.keys()) { + if (i++ >= size) { + map.delete(item); + } + } +}; + +const toHash = buffer => { + const hash = createHash("md4"); + hash.update(buffer); + return /** @type {string} */ (hash.digest("latin1")); +}; + +const ESCAPE = null; +const ESCAPE_ESCAPE_VALUE = null; +const ESCAPE_END_OBJECT = true; +const ESCAPE_UNDEFINED = false; + +const CURRENT_VERSION = 2; + +const serializers = new Map(); +const serializerInversed = new Map(); + +const loadedRequests = new Set(); + +const NOT_SERIALIZABLE = {}; + +const jsTypes = new Map(); +jsTypes.set(Object, new PlainObjectSerializer()); +jsTypes.set(Array, new ArraySerializer()); +jsTypes.set(null, new NullPrototypeObjectSerializer()); +jsTypes.set(Map, new MapObjectSerializer()); +jsTypes.set(Set, new SetObjectSerializer()); +jsTypes.set(Date, new DateObjectSerializer()); +jsTypes.set(RegExp, new RegExpObjectSerializer()); +jsTypes.set(Error, new ErrorObjectSerializer(Error)); +jsTypes.set(EvalError, new ErrorObjectSerializer(EvalError)); +jsTypes.set(RangeError, new ErrorObjectSerializer(RangeError)); +jsTypes.set(ReferenceError, new ErrorObjectSerializer(ReferenceError)); +jsTypes.set(SyntaxError, new ErrorObjectSerializer(SyntaxError)); +jsTypes.set(TypeError, new ErrorObjectSerializer(TypeError)); + +// If in a sandboxed environment (e. g. jest), this escapes the sandbox and registers +// real Object and Array types to. These types may occur in the wild too, e. g. when +// using Structured Clone in postMessage. +if (exports.constructor !== Object) { + const Obj = /** @type {typeof Object} */ (exports.constructor); + const Fn = /** @type {typeof Function} */ (Obj.constructor); + for (const [type, config] of Array.from(jsTypes)) { + if (type) { + const Type = new Fn(`return ${type.name};`)(); + jsTypes.set(Type, config); + } + } +} + +{ + let i = 1; + for (const [type, serializer] of jsTypes) { + serializers.set(type, { + request: "", + name: i++, + serializer + }); + } +} + +for (const { request, name, serializer } of serializers.values()) { + serializerInversed.set(`${request}/${name}`, serializer); +} + +/** @type {Map boolean>} */ +const loaders = new Map(); + +/** + * @typedef {ComplexSerializableType[]} DeserializedType + * @typedef {PrimitiveSerializableType[]} SerializedType + * @extends {SerializerMiddleware} + */ +class ObjectMiddleware extends SerializerMiddleware { + constructor(extendContext) { + super(); + this.extendContext = extendContext; + } + /** + * @param {RegExp} regExp RegExp for which the request is tested + * @param {function(string): boolean} loader loader to load the request, returns true when successful + * @returns {void} + */ + static registerLoader(regExp, loader) { + loaders.set(regExp, loader); + } + + /** + * @param {Constructor} Constructor the constructor + * @param {string} request the request which will be required when deserializing + * @param {string} name the name to make multiple serializer unique when sharing a request + * @param {ObjectSerializer} serializer the serializer + * @returns {void} + */ + static register(Constructor, request, name, serializer) { + const key = request + "/" + name; + + if (serializers.has(Constructor)) { + throw new Error( + `ObjectMiddleware.register: serializer for ${Constructor.name} is already registered` + ); + } + + if (serializerInversed.has(key)) { + throw new Error( + `ObjectMiddleware.register: serializer for ${key} is already registered` + ); + } + + serializers.set(Constructor, { + request, + name, + serializer + }); + + serializerInversed.set(key, serializer); + } + + /** + * @param {Constructor} Constructor the constructor + * @returns {void} + */ + static registerNotSerializable(Constructor) { + if (serializers.has(Constructor)) { + throw new Error( + `ObjectMiddleware.registerNotSerializable: serializer for ${Constructor.name} is already registered` + ); + } + + serializers.set(Constructor, NOT_SERIALIZABLE); + } + + static getSerializerFor(object) { + let c = object.constructor; + if (!c) { + if (Object.getPrototypeOf(object) === null) { + // Object created with Object.create(null) + c = null; + } else { + throw new Error( + "Serialization of objects with prototype without valid constructor property not possible" + ); + } + } + const config = serializers.get(c); + + if (!config) throw new Error(`No serializer registered for ${c.name}`); + if (config === NOT_SERIALIZABLE) throw NOT_SERIALIZABLE; + + return config; + } + + static getDeserializerFor(request, name) { + const key = request + "/" + name; + const serializer = serializerInversed.get(key); + + if (serializer === undefined) { + throw new Error(`No deserializer registered for ${key}`); + } + + return serializer; + } + + /** + * @param {DeserializedType} data data + * @param {Object} context context object + * @returns {SerializedType|Promise} serialized data + */ + serialize(data, context) { + /** @type {any[]} */ + const result = [CURRENT_VERSION]; + let currentPos = 0; + const referenceable = new Map(); + const addReferenceable = item => { + referenceable.set(item, currentPos++); + }; + const bufferDedupeMap = new Map(); + const dedupeBuffer = buf => { + const len = buf.length; + const entry = bufferDedupeMap.get(len); + if (entry === undefined) { + bufferDedupeMap.set(len, buf); + return buf; + } + if (Buffer.isBuffer(entry)) { + if (len < 32) { + if (buf.equals(entry)) { + return entry; + } + bufferDedupeMap.set(len, [entry, buf]); + return buf; + } else { + const hash = toHash(entry); + const newMap = new Map(); + newMap.set(hash, entry); + bufferDedupeMap.set(len, newMap); + const hashBuf = toHash(buf); + if (hash === hashBuf) { + return entry; + } + return buf; + } + } else if (Array.isArray(entry)) { + if (entry.length < 16) { + for (const item of entry) { + if (buf.equals(item)) { + return item; + } + } + entry.push(buf); + return buf; + } else { + const newMap = new Map(); + const hash = toHash(buf); + let found; + for (const item of entry) { + const itemHash = toHash(item); + newMap.set(itemHash, item); + if (found === undefined && itemHash === hash) found = item; + } + bufferDedupeMap.set(len, newMap); + if (found === undefined) { + newMap.set(hash, buf); + return buf; + } else { + return found; + } + } + } else { + const hash = toHash(buf); + const item = entry.get(hash); + if (item !== undefined) { + return item; + } + entry.set(hash, buf); + return buf; + } + }; + let currentPosTypeLookup = 0; + const objectTypeLookup = new Map(); + const cycleStack = new Set(); + const stackToString = item => { + const arr = Array.from(cycleStack); + arr.push(item); + return arr + .map(item => { + if (typeof item === "string") { + if (item.length > 100) { + return `String ${JSON.stringify(item.slice(0, 100)).slice( + 0, + -1 + )}..."`; + } + return `String ${JSON.stringify(item)}`; + } + try { + const { request, name } = ObjectMiddleware.getSerializerFor(item); + if (request) { + return `${request}${name ? `.${name}` : ""}`; + } + } catch (e) { + // ignore -> fallback + } + if (typeof item === "object" && item !== null) { + if (item.constructor) { + if (item.constructor === Object) + return `Object { ${Object.keys(item).join(", ")} }`; + if (item.constructor === Map) return `Map { ${item.size} items }`; + if (item.constructor === Array) + return `Array { ${item.length} items }`; + if (item.constructor === Set) return `Set { ${item.size} items }`; + if (item.constructor === RegExp) return item.toString(); + return `${item.constructor.name}`; + } + return `Object [null prototype] { ${Object.keys(item).join( + ", " + )} }`; + } + try { + return `${item}`; + } catch (e) { + return `(${e.message})`; + } + }) + .join(" -> "); + }; + let hasDebugInfoAttached; + const ctx = { + write(value, key) { + try { + process(value); + } catch (e) { + if (hasDebugInfoAttached === undefined) + hasDebugInfoAttached = new WeakSet(); + if (!hasDebugInfoAttached.has(e)) { + e.message += `\nwhile serializing ${stackToString(value)}`; + hasDebugInfoAttached.add(e); + } + throw e; + } + }, + snapshot() { + return { + length: result.length, + cycleStackSize: cycleStack.size, + referenceableSize: referenceable.size, + currentPos, + objectTypeLookupSize: objectTypeLookup.size, + currentPosTypeLookup + }; + }, + rollback(snapshot) { + result.length = snapshot.length; + setSetSize(cycleStack, snapshot.cycleStackSize); + setMapSize(referenceable, snapshot.referenceableSize); + currentPos = snapshot.currentPos; + setMapSize(objectTypeLookup, snapshot.objectTypeLookupSize); + currentPosTypeLookup = snapshot.currentPosTypeLookup; + }, + ...context + }; + this.extendContext(ctx); + const process = item => { + // check if we can emit a reference + const ref = referenceable.get(item); + + if (ref !== undefined) { + result.push(ESCAPE, ref - currentPos); + + return; + } + + if (Buffer.isBuffer(item)) { + const alreadyUsedBuffer = dedupeBuffer(item); + if (alreadyUsedBuffer !== item) { + const ref = referenceable.get(alreadyUsedBuffer); + if (ref !== undefined) { + referenceable.set(item, ref); + result.push(ESCAPE, ref - currentPos); + return; + } + item = alreadyUsedBuffer; + } + addReferenceable(item); + + result.push(item); + } else if (typeof item === "object" && item !== null) { + if (cycleStack.has(item)) { + throw new Error(`Circular references can't be serialized`); + } + + const { request, name, serializer } = ObjectMiddleware.getSerializerFor( + item + ); + const key = `${request}/${name}`; + const lastIndex = objectTypeLookup.get(key); + + if (lastIndex === undefined) { + objectTypeLookup.set(key, currentPosTypeLookup++); + + result.push(ESCAPE, request, name); + } else { + result.push(ESCAPE, currentPosTypeLookup - lastIndex); + } + + cycleStack.add(item); + + try { + serializer.serialize(item, ctx); + } finally { + cycleStack.delete(item); + } + + result.push(ESCAPE, ESCAPE_END_OBJECT); + + addReferenceable(item); + } else if (typeof item === "string") { + if (item.length > 1) { + // short strings are shorter when not emitting a reference (this saves 1 byte per empty string) + addReferenceable(item); + } + + if (item.length > 102400 && context.logger) { + context.logger.warn( + `Serializing big strings (${Math.round( + item.length / 1024 + )}kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)` + ); + } + + result.push(item); + } else if (item === ESCAPE) { + result.push(ESCAPE, ESCAPE_ESCAPE_VALUE); + } else if (typeof item === "function") { + if (!SerializerMiddleware.isLazy(item)) + throw new Error("Unexpected function " + item); + /** @type {SerializedType} */ + const serializedData = SerializerMiddleware.getLazySerializedValue( + item + ); + if (serializedData !== undefined) { + if (typeof serializedData === "function") { + result.push(serializedData); + } else { + throw new Error("Not implemented"); + } + } else if (SerializerMiddleware.isLazy(item, this)) { + throw new Error("Not implemented"); + } else { + result.push( + SerializerMiddleware.serializeLazy(item, data => + this.serialize([data], context) + ) + ); + } + } else if (item === undefined) { + result.push(ESCAPE, ESCAPE_UNDEFINED); + } else { + result.push(item); + } + }; + + try { + for (const item of data) { + process(item); + } + } catch (e) { + if (e === NOT_SERIALIZABLE) return null; + + throw e; + } + + return result; + } + + /** + * @param {SerializedType} data data + * @param {Object} context context object + * @returns {DeserializedType|Promise} deserialized data + */ + deserialize(data, context) { + let currentDataPos = 0; + const read = () => { + if (currentDataPos >= data.length) + throw new Error("Unexpected end of stream"); + + return data[currentDataPos++]; + }; + + if (read() !== CURRENT_VERSION) + throw new Error("Version mismatch, serializer changed"); + + let currentPos = 0; + let referenceable = []; + const addReferenceable = item => { + referenceable.push(item); + currentPos++; + }; + let currentPosTypeLookup = 0; + let objectTypeLookup = []; + const result = []; + const ctx = { + read() { + return decodeValue(); + }, + ...context + }; + this.extendContext(ctx); + const decodeValue = () => { + const item = read(); + + if (item === ESCAPE) { + const nextItem = read(); + + if (nextItem === ESCAPE_ESCAPE_VALUE) { + return ESCAPE; + } else if (nextItem === ESCAPE_UNDEFINED) { + return undefined; + } else if (nextItem === ESCAPE_END_OBJECT) { + throw new Error( + `Unexpected end of object at position ${currentDataPos - 1}` + ); + } else if (typeof nextItem === "number" && nextItem < 0) { + // relative reference + return referenceable[currentPos + nextItem]; + } else { + const request = nextItem; + let serializer; + + if (typeof request === "number") { + serializer = objectTypeLookup[currentPosTypeLookup - request]; + } else { + if (typeof request !== "string") { + throw new Error( + `Unexpected type (${typeof request}) of request ` + + `at position ${currentDataPos - 1}` + ); + } + const name = read(); + + if (request && !loadedRequests.has(request)) { + let loaded = false; + for (const [regExp, loader] of loaders) { + if (regExp.test(request)) { + if (loader(request)) { + loaded = true; + break; + } + } + } + if (!loaded) { + require(request); + } + + loadedRequests.add(request); + } + + serializer = ObjectMiddleware.getDeserializerFor(request, name); + + objectTypeLookup.push(serializer); + currentPosTypeLookup++; + } + try { + const item = serializer.deserialize(ctx); + const end1 = read(); + + if (end1 !== ESCAPE) { + throw new Error("Expected end of object"); + } + + const end2 = read(); + + if (end2 !== ESCAPE_END_OBJECT) { + throw new Error("Expected end of object"); + } + + addReferenceable(item); + + return item; + } catch (err) { + // As this is only for error handling, we omit creating a Map for + // faster access to this information, as this would affect performance + // in the good case + let serializerEntry; + for (const entry of serializers) { + if (entry[1].serializer === serializer) { + serializerEntry = entry; + break; + } + } + const name = !serializerEntry + ? "unknown" + : !serializerEntry[1].request + ? serializerEntry[0].name + : serializerEntry[1].name + ? `${serializerEntry[1].request} ${serializerEntry[1].name}` + : serializerEntry[1].request; + err.message += `\n(during deserialization of ${name})`; + throw err; + } + } + } else if (typeof item === "string") { + if (item.length > 1) { + addReferenceable(item); + } + + return item; + } else if (Buffer.isBuffer(item)) { + addReferenceable(item); + + return item; + } else if (typeof item === "function") { + return SerializerMiddleware.deserializeLazy( + item, + data => this.deserialize(data, context)[0] + ); + } else { + return item; + } + }; + + while (currentDataPos < data.length) { + result.push(decodeValue()); + } + + // Help the GC, as functions above might be cached in inline caches + referenceable = undefined; + objectTypeLookup = undefined; + data = undefined; + + return result; + } +} + +module.exports = ObjectMiddleware; +module.exports.NOT_SERIALIZABLE = NOT_SERIALIZABLE; + + +/***/ }), + +/***/ 39162: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const cache = new WeakMap(); + +class ObjectStructure { + constructor(keys) { + this.keys = keys; + this.children = new Map(); + } + + getKeys() { + return this.keys; + } + + key(key) { + const child = this.children.get(key); + if (child !== undefined) return child; + const newChild = new ObjectStructure(this.keys.concat(key)); + this.children.set(key, newChild); + return newChild; + } +} + +const getCachedKeys = (keys, cacheAssoc) => { + let root = cache.get(cacheAssoc); + if (root === undefined) { + root = new ObjectStructure([]); + cache.set(cacheAssoc, root); + } + let current = root; + for (const key of keys) { + current = current.key(key); + } + return current.getKeys(); +}; + +class PlainObjectSerializer { + serialize(obj, { write }) { + const keys = Object.keys(obj); + if (keys.length > 1) { + write(getCachedKeys(keys, write)); + for (const key of keys) { + write(obj[key]); + } + } else if (keys.length === 1) { + const key = keys[0]; + write(key); + write(obj[key]); + } else { + write(null); + } + } + deserialize({ read }) { + const keys = read(); + const obj = {}; + if (Array.isArray(keys)) { + for (const key of keys) { + obj[key] = read(); + } + } else if (keys !== null) { + obj[keys] = read(); + } + return obj; + } +} + +module.exports = PlainObjectSerializer; + + +/***/ }), + +/***/ 50650: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +class RegExpObjectSerializer { + serialize(obj, { write }) { + write(obj.source); + write(obj.flags); + } + deserialize({ read }) { + return new RegExp(read(), read()); + } +} + +module.exports = RegExpObjectSerializer; + + +/***/ }), + +/***/ 60338: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +class Serializer { + constructor(middlewares, context) { + this.serializeMiddlewares = middlewares.slice(); + this.deserializeMiddlewares = middlewares.slice().reverse(); + this.context = context; + } + + serialize(obj, context) { + const ctx = { ...context, ...this.context }; + let current = obj; + for (const middleware of this.serializeMiddlewares) { + if (current instanceof Promise) { + current = current.then( + data => data && middleware.serialize(data, context) + ); + } else if (current) { + try { + current = middleware.serialize(current, ctx); + } catch (err) { + current = Promise.reject(err); + } + } else break; + } + return current; + } + + deserialize(value, context) { + const ctx = { ...context, ...this.context }; + /** @type {any} */ + let current = value; + for (const middleware of this.deserializeMiddlewares) { + if (current instanceof Promise) { + current = current.then(data => middleware.deserialize(data, context)); + } else { + current = middleware.deserialize(current, ctx); + } + } + return current; + } +} + +module.exports = Serializer; + + +/***/ }), + +/***/ 54384: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const memoize = __webpack_require__(18003); + +const LAZY_TARGET = Symbol("lazy serialization target"); +const LAZY_SERIALIZED_VALUE = Symbol("lazy serialization data"); + +/** + * @template DeserializedType + * @template SerializedType + */ +class SerializerMiddleware { + /* istanbul ignore next */ + /** + * @abstract + * @param {DeserializedType} data data + * @param {Object} context context object + * @returns {SerializedType|Promise} serialized data + */ + serialize(data, context) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /* istanbul ignore next */ + /** + * @abstract + * @param {SerializedType} data data + * @param {Object} context context object + * @returns {DeserializedType|Promise} deserialized data + */ + deserialize(data, context) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /** + * @param {any | function(): Promise | any} value contained value or function to value + * @param {SerializerMiddleware} target target middleware + * @param {object=} options lazy options + * @param {any=} serializedValue serialized value + * @returns {function(): Promise | any} lazy function + */ + static createLazy(value, target, options = {}, serializedValue) { + if (SerializerMiddleware.isLazy(value, target)) return value; + const fn = typeof value === "function" ? value : () => value; + fn[LAZY_TARGET] = target; + /** @type {any} */ (fn).options = options; + fn[LAZY_SERIALIZED_VALUE] = serializedValue; + return fn; + } + + /** + * @param {function(): Promise | any} fn lazy function + * @param {SerializerMiddleware=} target target middleware + * @returns {boolean} true, when fn is a lazy function (optionally of that target) + */ + static isLazy(fn, target) { + if (typeof fn !== "function") return false; + const t = fn[LAZY_TARGET]; + return target ? t === target : !!t; + } + + /** + * @param {function(): Promise | any} fn lazy function + * @returns {object} options + */ + static getLazyOptions(fn) { + if (typeof fn !== "function") return undefined; + return /** @type {any} */ (fn).options; + } + + /** + * @param {function(): Promise | any} fn lazy function + * @returns {any} serialized value + */ + static getLazySerializedValue(fn) { + if (typeof fn !== "function") return undefined; + return fn[LAZY_SERIALIZED_VALUE]; + } + + /** + * @param {function(): Promise | any} fn lazy function + * @param {any} value serialized value + * @returns {void} + */ + static setLazySerializedValue(fn, value) { + fn[LAZY_SERIALIZED_VALUE] = value; + } + + /** + * @param {function(): Promise | any} lazy lazy function + * @param {function(any): Promise | any} serialize serialize function + * @returns {function(): Promise | any} new lazy + */ + static serializeLazy(lazy, serialize) { + const fn = memoize(() => { + const r = lazy(); + if (r instanceof Promise) return r.then(data => data && serialize(data)); + if (r) return serialize(r); + return null; + }); + fn[LAZY_TARGET] = lazy[LAZY_TARGET]; + /** @type {any} */ (fn).options = /** @type {any} */ (lazy).options; + lazy[LAZY_SERIALIZED_VALUE] = fn; + return fn; + } + + /** + * @param {function(): Promise | any} lazy lazy function + * @param {function(any): Promise | any} deserialize deserialize function + * @returns {function(): Promise | any} new lazy + */ + static deserializeLazy(lazy, deserialize) { + const fn = memoize(() => { + const r = lazy(); + if (r instanceof Promise) return r.then(data => deserialize(data)); + return deserialize(r); + }); + fn[LAZY_TARGET] = lazy[LAZY_TARGET]; + /** @type {any} */ (fn).options = /** @type {any} */ (lazy).options; + fn[LAZY_SERIALIZED_VALUE] = lazy; + return fn; + } +} + +module.exports = SerializerMiddleware; + + +/***/ }), + +/***/ 57296: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +class SetObjectSerializer { + serialize(obj, { write }) { + write(obj.size); + for (const value of obj) { + write(value); + } + } + deserialize({ read }) { + let size = read(); + const set = new Set(); + for (let i = 0; i < size; i++) { + set.add(read()); + } + return set; + } +} + +module.exports = SetObjectSerializer; + + +/***/ }), + +/***/ 1753: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const SerializerMiddleware = __webpack_require__(54384); + +/** + * @typedef {any} DeserializedType + * @typedef {any[]} SerializedType + * @extends {SerializerMiddleware} + */ +class SingleItemMiddleware extends SerializerMiddleware { + /** + * @param {DeserializedType} data data + * @param {Object} context context object + * @returns {SerializedType|Promise} serialized data + */ + serialize(data, context) { + return [data]; + } + + /** + * @param {SerializedType} data data + * @param {Object} context context object + * @returns {DeserializedType|Promise} deserialized data + */ + deserialize(data, context) { + return data[0]; + } +} + +module.exports = SingleItemMiddleware; + + +/***/ }), + +/***/ 50227: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ModuleDependency = __webpack_require__(5462); +const makeSerializable = __webpack_require__(55575); + +class ConsumeSharedFallbackDependency extends ModuleDependency { + constructor(request) { + super(request); + } + + get type() { + return "consume shared fallback"; + } + + get category() { + return "esm"; + } +} + +makeSerializable( + ConsumeSharedFallbackDependency, + "webpack/lib/sharing/ConsumeSharedFallbackDependency" +); + +module.exports = ConsumeSharedFallbackDependency; + + +/***/ }), + +/***/ 35725: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { RawSource } = __webpack_require__(55600); +const AsyncDependenciesBlock = __webpack_require__(72624); +const Module = __webpack_require__(54031); +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const { rangeToString, stringifyHoley } = __webpack_require__(22500); +const ConsumeSharedFallbackDependency = __webpack_require__(50227); + +/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */ +/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ +/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("../RequestShortener")} RequestShortener */ +/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ +/** @typedef {import("../util/semver").SemVerRange} SemVerRange */ + +/** + * @typedef {Object} ConsumeOptions + * @property {string=} import fallback request + * @property {string=} importResolved resolved fallback request + * @property {string} shareKey global share key + * @property {string} shareScope share scope + * @property {SemVerRange | false | undefined} requiredVersion version requirement + * @property {string} packageName package name to determine required version automatically + * @property {boolean} strictVersion don't use shared version even if version isn't valid + * @property {boolean} singleton use single global version + * @property {boolean} eager include the fallback module in a sync way + */ + +const TYPES = new Set(["consume-shared"]); + +class ConsumeSharedModule extends Module { + /** + * @param {string} context context + * @param {ConsumeOptions} options consume options + */ + constructor(context, options) { + super("consume-shared-module", context); + this.options = options; + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + const { + shareKey, + shareScope, + importResolved, + requiredVersion, + strictVersion, + singleton, + eager + } = this.options; + return `consume-shared-module|${shareScope}|${shareKey}|${ + requiredVersion && rangeToString(requiredVersion) + }|${strictVersion}|${importResolved}|${singleton}|${eager}`; + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + const { + shareKey, + shareScope, + importResolved, + requiredVersion, + strictVersion, + singleton, + eager + } = this.options; + return `consume shared module (${shareScope}) ${shareKey}@${ + requiredVersion ? rangeToString(requiredVersion) : "*" + }${strictVersion ? " (strict)" : ""}${singleton ? " (singleton)" : ""}${ + importResolved + ? ` (fallback: ${requestShortener.shorten(importResolved)})` + : "" + }${eager ? " (eager)" : ""}`; + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + const { shareKey, shareScope, import: request } = this.options; + return `webpack/sharing/consume/${shareScope}/${shareKey}${ + request ? `/${request}` : "" + }`; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + callback(null, !this.buildInfo); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this.buildMeta = {}; + this.buildInfo = {}; + if (this.options.import) { + const dep = new ConsumeSharedFallbackDependency(this.options.import); + if (this.options.eager) { + this.addDependency(dep); + } else { + const block = new AsyncDependenciesBlock({}); + block.addDependency(dep); + this.addBlock(block); + } + } + callback(); + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + return 42; + } + + /** + * @param {Hash} hash the hash used to track dependencies + * @param {UpdateHashContext} context context + * @returns {void} + */ + updateHash(hash, context) { + hash.update(JSON.stringify(this.options)); + super.updateHash(hash, context); + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration({ chunkGraph, moduleGraph, runtimeTemplate }) { + const runtimeRequirements = new Set([RuntimeGlobals.shareScopeMap]); + const { + shareScope, + shareKey, + strictVersion, + requiredVersion, + import: request, + singleton, + eager + } = this.options; + let fallbackCode; + if (request) { + if (eager) { + const dep = this.dependencies[0]; + fallbackCode = runtimeTemplate.syncModuleFactory({ + dependency: dep, + chunkGraph, + runtimeRequirements, + request: this.options.import + }); + } else { + const block = this.blocks[0]; + fallbackCode = runtimeTemplate.asyncModuleFactory({ + block, + chunkGraph, + runtimeRequirements, + request: this.options.import + }); + } + } + let fn = "load"; + const args = [JSON.stringify(shareScope), JSON.stringify(shareKey)]; + if (requiredVersion) { + if (strictVersion) { + fn += "Strict"; + } + if (singleton) { + fn += "Singleton"; + } + args.push(stringifyHoley(requiredVersion)); + fn += "VersionCheck"; + } + if (fallbackCode) { + fn += "Fallback"; + args.push(fallbackCode); + } + const code = runtimeTemplate.returningFunction(`${fn}(${args.join(", ")})`); + const sources = new Map(); + sources.set("consume-shared", new RawSource(code)); + return { + runtimeRequirements, + sources + }; + } + + serialize(context) { + const { write } = context; + write(this.options); + super.serialize(context); + } + + deserialize(context) { + const { read } = context; + this.options = read(); + super.deserialize(context); + } +} + +makeSerializable( + ConsumeSharedModule, + "webpack/lib/sharing/ConsumeSharedModule" +); + +module.exports = ConsumeSharedModule; + + +/***/ }), + +/***/ 70904: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(11919); +const ModuleNotFoundError = __webpack_require__(71318); +const RuntimeGlobals = __webpack_require__(48801); +const WebpackError = __webpack_require__(24274); +const { parseOptions } = __webpack_require__(57844); +const LazySet = __webpack_require__(60248); +const { parseRange } = __webpack_require__(22500); +const ConsumeSharedFallbackDependency = __webpack_require__(50227); +const ConsumeSharedModule = __webpack_require__(35725); +const ConsumeSharedRuntimeModule = __webpack_require__(44921); +const ProvideForSharedDependency = __webpack_require__(50013); +const { resolveMatchedConfigs } = __webpack_require__(5565); +const { + isRequiredVersion, + getDescriptionFile, + getRequiredVersionFromDescriptionFile +} = __webpack_require__(53042); + +/** @typedef {import("../../declarations/plugins/sharing/ConsumeSharedPlugin").ConsumeSharedPluginOptions} ConsumeSharedPluginOptions */ +/** @typedef {import("../../declarations/plugins/sharing/ConsumeSharedPlugin").ConsumesConfig} ConsumesConfig */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../ResolverFactory").ResolveOptionsWithDependencyType} ResolveOptionsWithDependencyType */ +/** @typedef {import("./ConsumeSharedModule").ConsumeOptions} ConsumeOptions */ + +/** @type {ResolveOptionsWithDependencyType} */ +const RESOLVE_OPTIONS = { dependencyType: "esm" }; +const PLUGIN_NAME = "ConsumeSharedPlugin"; + +class ConsumeSharedPlugin { + /** + * @param {ConsumeSharedPluginOptions} options options + */ + constructor(options) { + if (typeof options !== "string") { + validate(schema, options, { name: "Consumes Shared Plugin" }); + } + + /** @type {[string, ConsumeOptions][]} */ + this._consumes = parseOptions( + options.consumes, + (item, key) => { + if (Array.isArray(item)) throw new Error("Unexpected array in options"); + /** @type {ConsumeOptions} */ + let result = + item === key || !isRequiredVersion(item) + ? // item is a request/key + { + import: key, + shareScope: options.shareScope || "default", + shareKey: key, + requiredVersion: undefined, + packageName: undefined, + strictVersion: false, + singleton: false, + eager: false + } + : // key is a request/key + // item is a version + { + import: key, + shareScope: options.shareScope || "default", + shareKey: key, + requiredVersion: parseRange(item), + strictVersion: true, + packageName: undefined, + singleton: false, + eager: false + }; + return result; + }, + (item, key) => ({ + import: item.import === false ? undefined : item.import || key, + shareScope: item.shareScope || options.shareScope || "default", + shareKey: item.shareKey || key, + requiredVersion: + typeof item.requiredVersion === "string" + ? parseRange(item.requiredVersion) + : item.requiredVersion, + strictVersion: + typeof item.strictVersion === "boolean" + ? item.strictVersion + : item.import !== false && !item.singleton, + packageName: item.packageName, + singleton: !!item.singleton, + eager: !!item.eager + }) + ); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + PLUGIN_NAME, + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + ConsumeSharedFallbackDependency, + normalModuleFactory + ); + + let unresolvedConsumes, resolvedConsumes, prefixedConsumes; + const promise = resolveMatchedConfigs(compilation, this._consumes).then( + ({ resolved, unresolved, prefixed }) => { + resolvedConsumes = resolved; + unresolvedConsumes = unresolved; + prefixedConsumes = prefixed; + } + ); + + const resolver = compilation.resolverFactory.get( + "normal", + RESOLVE_OPTIONS + ); + + /** + * @param {string} context issuer directory + * @param {string} request request + * @param {ConsumeOptions} config options + * @returns {Promise} create module + */ + const createConsumeSharedModule = (context, request, config) => { + const requiredVersionWarning = details => { + const error = new WebpackError( + `No required version specified and unable to automatically determine one. ${details}` + ); + error.file = `shared module ${request}`; + compilation.warnings.push(error); + }; + const directFallback = + config.import && + /^(\.\.?(\/|$)|\/|[A-Za-z]:|\\\\)/.test(config.import); + return Promise.all([ + new Promise(resolve => { + if (!config.import) return resolve(); + const resolveContext = { + /** @type {LazySet} */ + fileDependencies: new LazySet(), + /** @type {LazySet} */ + contextDependencies: new LazySet(), + /** @type {LazySet} */ + missingDependencies: new LazySet() + }; + resolver.resolve( + {}, + directFallback ? compiler.context : context, + config.import, + resolveContext, + (err, result) => { + compilation.contextDependencies.addAll( + resolveContext.contextDependencies + ); + compilation.fileDependencies.addAll( + resolveContext.fileDependencies + ); + compilation.missingDependencies.addAll( + resolveContext.missingDependencies + ); + if (err) { + compilation.errors.push( + new ModuleNotFoundError(null, err, { + name: `resolving fallback for shared module ${request}` + }) + ); + return resolve(); + } + resolve(result); + } + ); + }), + new Promise(resolve => { + if (config.requiredVersion !== undefined) + return resolve(config.requiredVersion); + let packageName = config.packageName; + if (packageName === undefined) { + if (/^(\/|[A-Za-z]:|\\\\)/.test(request)) { + // For relative or absolute requests we don't automatically use a packageName. + // If wished one can specify one with the packageName option. + return resolve(); + } + const match = /^((?:@[^\\/]+[\\/])?[^\\/]+)/.exec(request); + if (!match) { + requiredVersionWarning( + "Unable to extract the package name from request." + ); + return resolve(); + } + packageName = match[0]; + } + + getDescriptionFile( + compilation.inputFileSystem, + context, + ["package.json"], + (err, result) => { + if (err) { + requiredVersionWarning( + `Unable to read description file: ${err}` + ); + return resolve(); + } + const { data, path: descriptionPath } = result; + if (!data) { + requiredVersionWarning( + `Unable to find description file in ${context}.` + ); + return resolve(); + } + const requiredVersion = getRequiredVersionFromDescriptionFile( + data, + packageName + ); + if (typeof requiredVersion !== "string") { + requiredVersionWarning( + `Unable to find required version for "${packageName}" in description file (${descriptionPath}). It need to be in dependencies, devDependencies or peerDependencies.` + ); + return resolve(); + } + resolve(parseRange(requiredVersion)); + } + ); + }) + ]).then(([importResolved, requiredVersion]) => { + return new ConsumeSharedModule( + directFallback ? compiler.context : context, + { + ...config, + importResolved, + import: importResolved ? config.import : undefined, + requiredVersion + } + ); + }); + }; + + normalModuleFactory.hooks.factorize.tapPromise( + PLUGIN_NAME, + ({ context, request, dependencies }) => + // wait for resolving to be complete + promise.then(() => { + if ( + dependencies[0] instanceof ConsumeSharedFallbackDependency || + dependencies[0] instanceof ProvideForSharedDependency + ) { + return; + } + const match = unresolvedConsumes.get(request); + if (match !== undefined) { + return createConsumeSharedModule(context, request, match); + } + for (const [prefix, options] of prefixedConsumes) { + if (request.startsWith(prefix)) { + const remainder = request.slice(prefix.length); + return createConsumeSharedModule(context, request, { + ...options, + import: options.import + ? options.import + remainder + : undefined, + shareKey: options.shareKey + remainder + }); + } + } + }) + ); + normalModuleFactory.hooks.createModule.tapPromise( + PLUGIN_NAME, + ({ resource }, { context, dependencies }) => { + if ( + dependencies[0] instanceof ConsumeSharedFallbackDependency || + dependencies[0] instanceof ProvideForSharedDependency + ) { + return Promise.resolve(); + } + const options = resolvedConsumes.get(resource); + if (options !== undefined) { + return createConsumeSharedModule(context, resource, options); + } + return Promise.resolve(); + } + ); + compilation.hooks.additionalTreeRuntimeRequirements.tap( + PLUGIN_NAME, + (chunk, set) => { + set.add(RuntimeGlobals.module); + set.add(RuntimeGlobals.moduleFactoriesAddOnly); + set.add(RuntimeGlobals.shareScopeMap); + set.add(RuntimeGlobals.initializeSharing); + set.add(RuntimeGlobals.hasOwnProperty); + compilation.addRuntimeModule( + chunk, + new ConsumeSharedRuntimeModule(set) + ); + } + ); + } + ); + } +} + +module.exports = ConsumeSharedPlugin; + + +/***/ }), + +/***/ 44921: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); +const { + parseVersionRuntimeCode, + versionLtRuntimeCode, + rangeToStringRuntimeCode, + satisfyRuntimeCode +} = __webpack_require__(22500); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("./ConsumeSharedModule")} ConsumeSharedModule */ + +class ConsumeSharedRuntimeModule extends RuntimeModule { + constructor(runtimeRequirements) { + super("consumes", RuntimeModule.STAGE_ATTACH); + this._runtimeRequirements = runtimeRequirements; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { + runtimeTemplate, + chunkGraph, + codeGenerationResults + } = this.compilation; + const chunkToModuleMapping = {}; + /** @type {Map} */ + const moduleIdToSourceMapping = new Map(); + const initialConsumes = []; + /** + * + * @param {Iterable} modules modules + * @param {Chunk} chunk the chunk + * @param {(string | number)[]} list list of ids + */ + const addModules = (modules, chunk, list) => { + for (const m of modules) { + const module = /** @type {ConsumeSharedModule} */ (m); + const id = chunkGraph.getModuleId(module); + list.push(id); + moduleIdToSourceMapping.set( + id, + codeGenerationResults.getSource( + module, + chunk.runtime, + "consume-shared" + ) + ); + } + }; + for (const chunk of this.chunk.getAllAsyncChunks()) { + const modules = chunkGraph.getChunkModulesIterableBySourceType( + chunk, + "consume-shared" + ); + if (!modules) continue; + addModules(modules, chunk, (chunkToModuleMapping[chunk.id] = [])); + } + for (const chunk of this.chunk.getAllInitialChunks()) { + const modules = chunkGraph.getChunkModulesIterableBySourceType( + chunk, + "consume-shared" + ); + if (!modules) continue; + addModules(modules, chunk, initialConsumes); + } + if (moduleIdToSourceMapping.size === 0) return null; + return Template.asString([ + parseVersionRuntimeCode(runtimeTemplate), + versionLtRuntimeCode(runtimeTemplate), + rangeToStringRuntimeCode(runtimeTemplate), + satisfyRuntimeCode(runtimeTemplate), + `var ensureExistence = ${runtimeTemplate.basicFunction("scopeName, key", [ + `var scope = ${RuntimeGlobals.shareScopeMap}[scopeName];`, + `if(!scope || !${RuntimeGlobals.hasOwnProperty}(scope, key)) throw new Error("Shared module " + key + " doesn't exist in shared scope " + scopeName);`, + "return scope;" + ])};`, + `var findVersion = ${runtimeTemplate.basicFunction("scope, key", [ + "var versions = scope[key];", + `var key = Object.keys(versions).reduce(${runtimeTemplate.basicFunction( + "a, b", + ["return !a || versionLt(a, b) ? b : a;"] + )}, 0);`, + "return key && versions[key]" + ])};`, + `var findSingletonVersionKey = ${runtimeTemplate.basicFunction( + "scope, key", + [ + "var versions = scope[key];", + `return Object.keys(versions).reduce(${runtimeTemplate.basicFunction( + "a, b", + ["return !a || (!versions[a].loaded && versionLt(a, b)) ? b : a;"] + )}, 0);` + ] + )};`, + `var getInvalidSingletonVersionMessage = ${runtimeTemplate.basicFunction( + "key, version, requiredVersion", + [ + `return "Unsatisfied version " + version + " of shared singleton module " + key + " (required " + rangeToString(requiredVersion) + ")"` + ] + )};`, + `var getSingletonVersion = ${runtimeTemplate.basicFunction( + "scope, scopeName, key, requiredVersion", + [ + "var version = findSingletonVersionKey(scope, key);", + "if (!satisfy(requiredVersion, version)) " + + 'typeof console !== "undefined" && console.warn && console.warn(getInvalidSingletonVersionMessage(key, version, requiredVersion));', + "return get(scope[key][version]);" + ] + )};`, + `var getStrictSingletonVersion = ${runtimeTemplate.basicFunction( + "scope, scopeName, key, requiredVersion", + [ + "var version = findSingletonVersionKey(scope, key);", + "if (!satisfy(requiredVersion, version)) " + + "throw new Error(getInvalidSingletonVersionMessage(key, version, requiredVersion));", + "return get(scope[key][version]);" + ] + )};`, + `var findValidVersion = ${runtimeTemplate.basicFunction( + "scope, key, requiredVersion", + [ + "var versions = scope[key];", + `var key = Object.keys(versions).reduce(${runtimeTemplate.basicFunction( + "a, b", + [ + "if (!satisfy(requiredVersion, b)) return a;", + "return !a || versionLt(a, b) ? b : a;" + ] + )}, 0);`, + "return key && versions[key]" + ] + )};`, + `var getInvalidVersionMessage = ${runtimeTemplate.basicFunction( + "scope, scopeName, key, requiredVersion", + [ + "var versions = scope[key];", + 'return "No satisfying version (" + rangeToString(requiredVersion) + ") of shared module " + key + " found in shared scope " + scopeName + ".\\n" +', + `\t"Available versions: " + Object.keys(versions).map(${runtimeTemplate.basicFunction( + "key", + ['return key + " from " + versions[key].from;'] + )}).join(", ");` + ] + )};`, + `var getValidVersion = ${runtimeTemplate.basicFunction( + "scope, scopeName, key, requiredVersion", + [ + "var entry = findValidVersion(scope, key, requiredVersion);", + "if(entry) return get(entry);", + "throw new Error(getInvalidVersionMessage(scope, scopeName, key, requiredVersion));" + ] + )};`, + `var warnInvalidVersion = ${runtimeTemplate.basicFunction( + "scope, scopeName, key, requiredVersion", + [ + 'typeof console !== "undefined" && console.warn && console.warn(getInvalidVersionMessage(scope, scopeName, key, requiredVersion));' + ] + )};`, + `var get = ${runtimeTemplate.basicFunction("entry", [ + "entry.loaded = 1;", + "return entry.get()" + ])};`, + `var init = ${runtimeTemplate.returningFunction( + Template.asString([ + "function(scopeName, a, b, c) {", + Template.indent([ + `var promise = ${RuntimeGlobals.initializeSharing}(scopeName);`, + `if (promise && promise.then) return promise.then(fn.bind(fn, scopeName, ${RuntimeGlobals.shareScopeMap}[scopeName], a, b, c));`, + `return fn(scopeName, ${RuntimeGlobals.shareScopeMap}[scopeName], a, b, c);` + ]), + "}" + ]), + "fn" + )};`, + "", + `var load = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key", + [ + "ensureExistence(scopeName, key);", + "return get(findVersion(scope, key));" + ] + )});`, + `var loadFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key, fallback", + [ + `return scope && ${RuntimeGlobals.hasOwnProperty}(scope, key) ? get(findVersion(scope, key)) : fallback();` + ] + )});`, + `var loadVersionCheck = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key, version", + [ + "ensureExistence(scopeName, key);", + "return get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));" + ] + )});`, + `var loadSingletonVersionCheck = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key, version", + [ + "ensureExistence(scopeName, key);", + "return getSingletonVersion(scope, scopeName, key, version);" + ] + )});`, + `var loadStrictVersionCheck = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key, version", + [ + "ensureExistence(scopeName, key);", + "return getValidVersion(scope, scopeName, key, version);" + ] + )});`, + `var loadStrictSingletonVersionCheck = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key, version", + [ + "ensureExistence(scopeName, key);", + "return getStrictSingletonVersion(scope, scopeName, key, version);" + ] + )});`, + `var loadVersionCheckFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key, version, fallback", + [ + `if(!scope || !${RuntimeGlobals.hasOwnProperty}(scope, key)) return fallback();`, + "return get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));" + ] + )});`, + `var loadSingletonVersionCheckFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key, version, fallback", + [ + `if(!scope || !${RuntimeGlobals.hasOwnProperty}(scope, key)) return fallback();`, + "return getSingletonVersion(scope, scopeName, key, version);" + ] + )});`, + `var loadStrictVersionCheckFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key, version, fallback", + [ + `var entry = scope && ${RuntimeGlobals.hasOwnProperty}(scope, key) && findValidVersion(scope, key, version);`, + `return entry ? get(entry) : fallback();` + ] + )});`, + `var loadStrictSingletonVersionCheckFallback = /*#__PURE__*/ init(${runtimeTemplate.basicFunction( + "scopeName, scope, key, version, fallback", + [ + `if(!scope || !${RuntimeGlobals.hasOwnProperty}(scope, key)) return fallback();`, + "return getStrictSingletonVersion(scope, scopeName, key, version);" + ] + )});`, + "var installedModules = {};", + "var moduleToHandlerMapping = {", + Template.indent( + Array.from( + moduleIdToSourceMapping, + ([key, source]) => `${JSON.stringify(key)}: ${source.source()}` + ).join(",\n") + ), + "};", + + initialConsumes.length > 0 + ? Template.asString([ + `var initialConsumes = ${JSON.stringify(initialConsumes)};`, + `initialConsumes.forEach(${runtimeTemplate.basicFunction("id", [ + `__webpack_modules__[id] = ${runtimeTemplate.basicFunction( + "module", + [ + "// Handle case when module is used sync", + "installedModules[id] = 0;", + "delete __webpack_module_cache__[id];", + "var factory = moduleToHandlerMapping[id]();", + 'if(typeof factory !== "function") throw new Error("Shared module is not available for eager consumption: " + id);', + `module.exports = factory();` + ] + )}` + ])});` + ]) + : "// no consumes in initial chunks", + this._runtimeRequirements.has(RuntimeGlobals.ensureChunkHandlers) + ? Template.asString([ + `var chunkMapping = ${JSON.stringify( + chunkToModuleMapping, + null, + "\t" + )};`, + `${ + RuntimeGlobals.ensureChunkHandlers + }.consumes = ${runtimeTemplate.basicFunction("chunkId, promises", [ + `if(${RuntimeGlobals.hasOwnProperty}(chunkMapping, chunkId)) {`, + Template.indent([ + `chunkMapping[chunkId].forEach(${runtimeTemplate.basicFunction( + "id", + [ + `if(${RuntimeGlobals.hasOwnProperty}(installedModules, id)) return promises.push(installedModules[id]);`, + `var onFactory = ${runtimeTemplate.basicFunction( + "factory", + [ + "installedModules[id] = 0;", + `__webpack_modules__[id] = ${runtimeTemplate.basicFunction( + "module", + [ + "delete __webpack_module_cache__[id];", + "module.exports = factory();" + ] + )}` + ] + )};`, + `var onError = ${runtimeTemplate.basicFunction("error", [ + "delete installedModules[id];", + `__webpack_modules__[id] = ${runtimeTemplate.basicFunction( + "module", + ["delete __webpack_module_cache__[id];", "throw error;"] + )}` + ])};`, + "try {", + Template.indent([ + "var promise = moduleToHandlerMapping[id]();", + "if(promise.then) {", + Template.indent( + `promises.push(installedModules[id] = promise.then(onFactory).catch(onError));` + ), + "} else onFactory(promise);" + ]), + "} catch(e) { onError(e); }" + ] + )});` + ]), + "}" + ])}` + ]) + : "// no chunk loading of consumes" + ]); + } +} + +module.exports = ConsumeSharedRuntimeModule; + + +/***/ }), + +/***/ 50013: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ModuleDependency = __webpack_require__(5462); +const makeSerializable = __webpack_require__(55575); + +class ProvideForSharedDependency extends ModuleDependency { + /** + * + * @param {string} request request string + */ + constructor(request) { + super(request); + } + + get type() { + return "provide module for shared"; + } + + get category() { + return "esm"; + } +} + +makeSerializable( + ProvideForSharedDependency, + "webpack/lib/sharing/ProvideForSharedDependency" +); + +module.exports = ProvideForSharedDependency; + + +/***/ }), + +/***/ 71078: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Dependency = __webpack_require__(27563); +const makeSerializable = __webpack_require__(55575); + +class ProvideSharedDependency extends Dependency { + constructor(shareScope, name, version, request, eager) { + super(); + this.shareScope = shareScope; + this.name = name; + this.version = version; + this.request = request; + this.eager = eager; + } + + get type() { + return "provide shared module"; + } + + /** + * @returns {string | null} an identifier to merge equal requests + */ + getResourceIdentifier() { + return `provide module (${this.shareScope}) ${this.request} as ${ + this.name + } @ ${this.version}${this.eager ? " (eager)" : ""}`; + } + + serialize(context) { + context.write(this.shareScope); + context.write(this.name); + context.write(this.request); + context.write(this.version); + context.write(this.eager); + super.serialize(context); + } + + static deserialize(context) { + const { read } = context; + const obj = new ProvideSharedDependency( + read(), + read(), + read(), + read(), + read() + ); + this.shareScope = context.read(); + obj.deserialize(context); + return obj; + } +} + +makeSerializable( + ProvideSharedDependency, + "webpack/lib/sharing/ProvideSharedDependency" +); + +module.exports = ProvideSharedDependency; + + +/***/ }), + +/***/ 6831: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy +*/ + + + +const AsyncDependenciesBlock = __webpack_require__(72624); +const Module = __webpack_require__(54031); +const RuntimeGlobals = __webpack_require__(48801); +const makeSerializable = __webpack_require__(55575); +const ProvideForSharedDependency = __webpack_require__(50013); + +/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */ +/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */ +/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */ +/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */ +/** @typedef {import("../RequestShortener")} RequestShortener */ +/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/Hash")} Hash */ +/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ + +const TYPES = new Set(["share-init"]); + +class ProvideSharedModule extends Module { + /** + * @param {string} shareScope shared scope name + * @param {string} name shared key + * @param {string | false} version version + * @param {string} request request to the provided module + * @param {boolean} eager include the module in sync way + */ + constructor(shareScope, name, version, request, eager) { + super("provide-module"); + this._shareScope = shareScope; + this._name = name; + this._version = version; + this._request = request; + this._eager = eager; + } + + /** + * @returns {string} a unique identifier of the module + */ + identifier() { + return `provide module (${this._shareScope}) ${this._name}@${this._version} = ${this._request}`; + } + + /** + * @param {RequestShortener} requestShortener the request shortener + * @returns {string} a user readable identifier of the module + */ + readableIdentifier(requestShortener) { + return `provide shared module (${this._shareScope}) ${this._name}@${ + this._version + } = ${requestShortener.shorten(this._request)}`; + } + + /** + * @param {LibIdentOptions} options options + * @returns {string | null} an identifier for library inclusion + */ + libIdent(options) { + return `webpack/sharing/provide/${this._shareScope}/${this._name}`; + } + + /** + * @param {NeedBuildContext} context context info + * @param {function(WebpackError=, boolean=): void} callback callback function, returns true, if the module needs a rebuild + * @returns {void} + */ + needBuild(context, callback) { + callback(null, !this.buildInfo); + } + + /** + * @param {WebpackOptions} options webpack options + * @param {Compilation} compilation the compilation + * @param {ResolverWithOptions} resolver the resolver + * @param {InputFileSystem} fs the file system + * @param {function(WebpackError=): void} callback callback function + * @returns {void} + */ + build(options, compilation, resolver, fs, callback) { + this.buildMeta = {}; + this.buildInfo = { + strict: true + }; + + this.clearDependenciesAndBlocks(); + const dep = new ProvideForSharedDependency(this._request); + if (this._eager) { + this.addDependency(dep); + } else { + const block = new AsyncDependenciesBlock({}); + block.addDependency(dep); + this.addBlock(block); + } + + callback(); + } + + /** + * @param {string=} type the source type for which the size should be estimated + * @returns {number} the estimated size of the module (must be non-zero) + */ + size(type) { + return 42; + } + + /** + * @returns {Set} types available (do not mutate) + */ + getSourceTypes() { + return TYPES; + } + + /** + * @param {CodeGenerationContext} context context for code generation + * @returns {CodeGenerationResult} result + */ + codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) { + const runtimeRequirements = new Set([RuntimeGlobals.initializeSharing]); + const code = `register(${JSON.stringify(this._name)}, ${JSON.stringify( + this._version || "0" + )}, ${ + this._eager + ? runtimeTemplate.syncModuleFactory({ + dependency: this.dependencies[0], + chunkGraph, + request: this._request, + runtimeRequirements + }) + : runtimeTemplate.asyncModuleFactory({ + block: this.blocks[0], + chunkGraph, + request: this._request, + runtimeRequirements + }) + });`; + const sources = new Map(); + const data = new Map(); + data.set("share-init", [ + { + shareScope: this._shareScope, + initStage: 10, + init: code + } + ]); + return { sources, data, runtimeRequirements }; + } + + serialize(context) { + const { write } = context; + write(this._shareScope); + write(this._name); + write(this._version); + write(this._request); + write(this._eager); + super.serialize(context); + } + + static deserialize(context) { + const { read } = context; + const obj = new ProvideSharedModule(read(), read(), read(), read(), read()); + obj.deserialize(context); + return obj; + } +} + +makeSerializable( + ProvideSharedModule, + "webpack/lib/sharing/ProvideSharedModule" +); + +module.exports = ProvideSharedModule; + + +/***/ }), + +/***/ 2946: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy +*/ + + + +const ModuleFactory = __webpack_require__(6259); +const ProvideSharedModule = __webpack_require__(6831); + +/** @typedef {import("../ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */ +/** @typedef {import("../ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */ +/** @typedef {import("./ProvideSharedDependency")} ProvideSharedDependency */ + +class ProvideSharedModuleFactory extends ModuleFactory { + /** + * @param {ModuleFactoryCreateData} data data object + * @param {function(Error=, ModuleFactoryResult=): void} callback callback + * @returns {void} + */ + create(data, callback) { + const dep = /** @type {ProvideSharedDependency} */ (data.dependencies[0]); + callback(null, { + module: new ProvideSharedModule( + dep.shareScope, + dep.name, + dep.version, + dep.request, + dep.eager + ) + }); + } +} + +module.exports = ProvideSharedModuleFactory; + + +/***/ }), + +/***/ 67184: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy +*/ + + + +const { validate } = __webpack_require__(79286); +const schema = __webpack_require__(45057); +const WebpackError = __webpack_require__(24274); +const { parseOptions } = __webpack_require__(57844); +const ProvideForSharedDependency = __webpack_require__(50013); +const ProvideSharedDependency = __webpack_require__(71078); +const ProvideSharedModuleFactory = __webpack_require__(2946); + +/** @typedef {import("../../declarations/plugins/sharing/ProvideSharedPlugin").ProvideSharedPluginOptions} ProvideSharedPluginOptions */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Compiler")} Compiler */ + +/** + * @typedef {Object} ProvideOptions + * @property {string} shareKey + * @property {string} shareScope + * @property {string | undefined | false} version + * @property {boolean} eager + */ + +/** @typedef {Map} ResolvedProvideMap */ + +class ProvideSharedPlugin { + /** + * @param {ProvideSharedPluginOptions} options options + */ + constructor(options) { + validate(schema, options, { name: "Provide Shared Plugin" }); + + /** @type {[string, ProvideOptions][]} */ + this._provides = parseOptions( + options.provides, + item => { + if (Array.isArray(item)) + throw new Error("Unexpected array of provides"); + /** @type {ProvideOptions} */ + const result = { + shareKey: item, + version: undefined, + shareScope: options.shareScope || "default", + eager: false + }; + return result; + }, + item => ({ + shareKey: item.shareKey, + version: item.version, + shareScope: item.shareScope || options.shareScope || "default", + eager: !!item.eager + }) + ); + this._provides.sort(([a], [b]) => { + if (a < b) return -1; + if (b < a) return 1; + return 0; + }); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + /** @type {WeakMap} */ + const compilationData = new WeakMap(); + + compiler.hooks.compilation.tap( + "ProvideSharedPlugin", + (compilation, { normalModuleFactory }) => { + /** @type {ResolvedProvideMap} */ + const resolvedProvideMap = new Map(); + /** @type {Map} */ + const matchProvides = new Map(); + /** @type {Map} */ + const prefixMatchProvides = new Map(); + for (const [request, config] of this._provides) { + if (/^(\/|[A-Za-z]:\\|\\\\|\.\.?(\/|$))/.test(request)) { + // relative request + resolvedProvideMap.set(request, { + config, + version: config.version + }); + } else if (/^(\/|[A-Za-z]:\\|\\\\)/.test(request)) { + // absolute path + resolvedProvideMap.set(request, { + config, + version: config.version + }); + } else if (request.endsWith("/")) { + // module request prefix + prefixMatchProvides.set(request, config); + } else { + // module request + matchProvides.set(request, config); + } + } + compilationData.set(compilation, resolvedProvideMap); + const provideSharedModule = ( + key, + config, + resource, + resourceResolveData + ) => { + let version = config.version; + if (version === undefined) { + let details = ""; + if (!resourceResolveData) { + details = `No resolve data provided from resolver.`; + } else { + const descriptionFileData = + resourceResolveData.descriptionFileData; + if (!descriptionFileData) { + details = + "No description file (usually package.json) found. Add description file with name and version, or manually specify version in shared config."; + } else if (!descriptionFileData.version) { + details = + "No version in description file (usually package.json). Add version to description file, or manually specify version in shared config."; + } else { + version = descriptionFileData.version; + } + } + if (!version) { + const error = new WebpackError( + `No version specified and unable to automatically determine one. ${details}` + ); + error.file = `shared module ${key} -> ${resource}`; + compilation.warnings.push(error); + } + } + resolvedProvideMap.set(resource, { + config, + version + }); + }; + normalModuleFactory.hooks.module.tap( + "ProvideSharedPlugin", + (module, { resource, resourceResolveData }, resolveData) => { + if (resolvedProvideMap.has(resource)) { + return module; + } + const { request } = resolveData; + { + const config = matchProvides.get(request); + if (config !== undefined) { + provideSharedModule( + request, + config, + resource, + resourceResolveData + ); + resolveData.cacheable = false; + } + } + for (const [prefix, config] of prefixMatchProvides) { + if (request.startsWith(prefix)) { + const remainder = request.slice(prefix.length); + provideSharedModule( + resource, + { + ...config, + shareKey: config.shareKey + remainder + }, + resource, + resourceResolveData + ); + resolveData.cacheable = false; + } + } + return module; + } + ); + } + ); + compiler.hooks.finishMake.tapPromise("ProvideSharedPlugin", compilation => { + const resolvedProvideMap = compilationData.get(compilation); + if (!resolvedProvideMap) return Promise.resolve(); + return Promise.all( + Array.from( + resolvedProvideMap, + ([resource, { config, version }]) => + new Promise((resolve, reject) => { + compilation.addInclude( + compiler.context, + new ProvideSharedDependency( + config.shareScope, + config.shareKey, + version || false, + resource, + config.eager + ), + { + name: undefined + }, + err => { + if (err) return reject(err); + resolve(); + } + ); + }) + ) + ).then(() => {}); + }); + + compiler.hooks.compilation.tap( + "ProvideSharedPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + ProvideForSharedDependency, + normalModuleFactory + ); + + compilation.dependencyFactories.set( + ProvideSharedDependency, + new ProvideSharedModuleFactory() + ); + } + ); + } +} + +module.exports = ProvideSharedPlugin; + + +/***/ }), + +/***/ 3533: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy +*/ + + + +const { parseOptions } = __webpack_require__(57844); +const ConsumeSharedPlugin = __webpack_require__(70904); +const ProvideSharedPlugin = __webpack_require__(67184); +const { isRequiredVersion } = __webpack_require__(53042); + +/** @typedef {import("../../declarations/plugins/sharing/ConsumeSharedPlugin").ConsumeSharedPluginOptions} ConsumeSharedPluginOptions */ +/** @typedef {import("../../declarations/plugins/sharing/ConsumeSharedPlugin").ConsumesConfig} ConsumesConfig */ +/** @typedef {import("../../declarations/plugins/sharing/ProvideSharedPlugin").ProvideSharedPluginOptions} ProvideSharedPluginOptions */ +/** @typedef {import("../../declarations/plugins/sharing/ProvideSharedPlugin").ProvidesConfig} ProvidesConfig */ +/** @typedef {import("../../declarations/plugins/sharing/SharePlugin").SharePluginOptions} SharePluginOptions */ +/** @typedef {import("../../declarations/plugins/sharing/SharePlugin").SharedConfig} SharedConfig */ +/** @typedef {import("../Compiler")} Compiler */ + +class SharePlugin { + /** + * @param {SharePluginOptions} options options + */ + constructor(options) { + /** @type {[string, SharedConfig][]} */ + const sharedOptions = parseOptions( + options.shared, + (item, key) => { + if (typeof item !== "string") + throw new Error("Unexpected array in shared"); + /** @type {SharedConfig} */ + const config = + item === key || !isRequiredVersion(item) + ? { + import: item + } + : { + import: key, + requiredVersion: item + }; + return config; + }, + item => item + ); + /** @type {Record[]} */ + const consumes = sharedOptions.map(([key, options]) => ({ + [key]: { + import: options.import, + shareKey: options.shareKey || key, + shareScope: options.shareScope, + requiredVersion: options.requiredVersion, + strictVersion: options.strictVersion, + singleton: options.singleton, + packageName: options.packageName, + eager: options.eager + } + })); + /** @type {Record[]} */ + const provides = sharedOptions + .filter(([, options]) => options.import !== false) + .map(([key, options]) => ({ + [options.import || key]: { + shareKey: options.shareKey || key, + shareScope: options.shareScope, + version: options.version, + eager: options.eager + } + })); + this._shareScope = options.shareScope; + this._consumes = consumes; + this._provides = provides; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + new ConsumeSharedPlugin({ + shareScope: this._shareScope, + consumes: this._consumes + }).apply(compiler); + new ProvideSharedPlugin({ + shareScope: this._shareScope, + provides: this._provides + }).apply(compiler); + } +} + +module.exports = SharePlugin; + + +/***/ }), + +/***/ 17369: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); +const { + compareModulesByIdentifier, + compareStrings +} = __webpack_require__(21699); + +class ShareRuntimeModule extends RuntimeModule { + constructor() { + super("sharing"); + } + + /** + * @returns {string} runtime code + */ + generate() { + const { + runtimeTemplate, + chunkGraph, + codeGenerationResults, + outputOptions: { uniqueName } + } = this.compilation; + /** @type {Map>>} */ + const initCodePerScope = new Map(); + for (const chunk of this.chunk.getAllReferencedChunks()) { + const modules = chunkGraph.getOrderedChunkModulesIterableBySourceType( + chunk, + "share-init", + compareModulesByIdentifier + ); + if (!modules) continue; + for (const m of modules) { + const data = codeGenerationResults.getData( + m, + chunk.runtime, + "share-init" + ); + if (!data) continue; + for (const item of data) { + const { shareScope, initStage, init } = item; + let stages = initCodePerScope.get(shareScope); + if (stages === undefined) { + initCodePerScope.set(shareScope, (stages = new Map())); + } + let list = stages.get(initStage || 0); + if (list === undefined) { + stages.set(initStage || 0, (list = new Set())); + } + list.add(init); + } + } + } + return Template.asString([ + `${RuntimeGlobals.shareScopeMap} = {};`, + "var initPromises = {};", + "var initTokens = {};", + `${RuntimeGlobals.initializeSharing} = ${runtimeTemplate.basicFunction( + "name, initScope", + [ + "if(!initScope) initScope = [];", + "// handling circular init calls", + "var initToken = initTokens[name];", + "if(!initToken) initToken = initTokens[name] = {};", + "if(initScope.indexOf(initToken) >= 0) return;", + "initScope.push(initToken);", + "// only runs once", + "if(initPromises[name]) return initPromises[name];", + "// creates a new share scope if needed", + `if(!${RuntimeGlobals.hasOwnProperty}(${RuntimeGlobals.shareScopeMap}, name)) ${RuntimeGlobals.shareScopeMap}[name] = {};`, + "// runs all init snippets from all modules reachable", + `var scope = ${RuntimeGlobals.shareScopeMap}[name];`, + `var warn = ${runtimeTemplate.returningFunction( + 'typeof console !== "undefined" && console.warn && console.warn(msg);', + "msg" + )};`, + `var uniqueName = ${JSON.stringify(uniqueName || undefined)};`, + `var register = ${runtimeTemplate.basicFunction( + "name, version, factory", + [ + "var versions = scope[name] = scope[name] || {};", + "var activeVersion = versions[version];", + "if(!activeVersion || !activeVersion.loaded && uniqueName > activeVersion.from) versions[version] = { get: factory, from: uniqueName };" + ] + )};`, + `var initExternal = ${runtimeTemplate.basicFunction("id", [ + `var handleError = ${runtimeTemplate.returningFunction( + 'warn("Initialization of sharing external failed: " + err)', + "err" + )};`, + "try {", + Template.indent([ + "var module = __webpack_require__(id);", + "if(!module) return;", + `var initFn = ${runtimeTemplate.returningFunction( + `module && module.init && module.init(${RuntimeGlobals.shareScopeMap}[name], initScope)`, + "module" + )}`, + "if(module.then) return promises.push(module.then(initFn, handleError));", + "var initResult = initFn(module);", + "if(initResult && initResult.then) return promises.push(initResult.catch(handleError));" + ]), + "} catch(err) { handleError(err); }" + ])}`, + "var promises = [];", + "switch(name) {", + ...Array.from(initCodePerScope) + .sort(([a], [b]) => compareStrings(a, b)) + .map(([name, stages]) => + Template.indent([ + `case ${JSON.stringify(name)}: {`, + Template.indent( + Array.from(stages) + .sort(([a], [b]) => a - b) + .map(([, initCode]) => + Template.asString(Array.from(initCode)) + ) + ), + "}", + "break;" + ]) + ), + "}", + "if(!promises.length) return initPromises[name] = 1;", + `return initPromises[name] = Promise.all(promises).then(${runtimeTemplate.returningFunction( + "initPromises[name] = 1" + )});` + ] + )};` + ]); + } +} + +module.exports = ShareRuntimeModule; + + +/***/ }), + +/***/ 5565: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ModuleNotFoundError = __webpack_require__(71318); +const LazySet = __webpack_require__(60248); + +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../ResolverFactory").ResolveOptionsWithDependencyType} ResolveOptionsWithDependencyType */ + +/** + * @template T + * @typedef {Object} MatchedConfigs + * @property {Map} resolved + * @property {Map} unresolved + * @property {Map} prefixed + */ + +/** @type {ResolveOptionsWithDependencyType} */ +const RESOLVE_OPTIONS = { dependencyType: "esm" }; + +/** + * @template T + * @param {Compilation} compilation the compilation + * @param {[string, T][]} configs to be processed configs + * @returns {Promise>} resolved matchers + */ +exports.resolveMatchedConfigs = (compilation, configs) => { + /** @type {Map} */ + const resolved = new Map(); + /** @type {Map} */ + const unresolved = new Map(); + /** @type {Map} */ + const prefixed = new Map(); + const resolveContext = { + /** @type {LazySet} */ + fileDependencies: new LazySet(), + /** @type {LazySet} */ + contextDependencies: new LazySet(), + /** @type {LazySet} */ + missingDependencies: new LazySet() + }; + const resolver = compilation.resolverFactory.get("normal", RESOLVE_OPTIONS); + const context = compilation.compiler.context; + + return Promise.all( + configs.map(([request, config]) => { + if (/^\.\.?(\/|$)/.test(request)) { + // relative request + return new Promise(resolve => { + resolver.resolve( + {}, + context, + request, + resolveContext, + (err, result) => { + if (err || result === false) { + err = err || new Error(`Can't resolve ${request}`); + compilation.errors.push( + new ModuleNotFoundError(null, err, { + name: `shared module ${request}` + }) + ); + return resolve(); + } + resolved.set(result, config); + resolve(); + } + ); + }); + } else if (/^(\/|[A-Za-z]:\\|\\\\)/.test(request)) { + // absolute path + resolved.set(request, config); + } else if (request.endsWith("/")) { + // module request prefix + prefixed.set(request, config); + } else { + // module request + unresolved.set(request, config); + } + }) + ).then(() => { + compilation.contextDependencies.addAll(resolveContext.contextDependencies); + compilation.fileDependencies.addAll(resolveContext.fileDependencies); + compilation.missingDependencies.addAll(resolveContext.missingDependencies); + return { resolved, unresolved, prefixed }; + }); +}; + + +/***/ }), + +/***/ 53042: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { join, dirname, readJson } = __webpack_require__(71593); + +/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ + +/** + * @param {string} str maybe required version + * @returns {boolean} true, if it looks like a version + */ +exports.isRequiredVersion = str => { + return /^([\d^=v<>~]|[*xX]$)/.test(str); +}; + +/** + * + * @param {InputFileSystem} fs file system + * @param {string} directory directory to start looking into + * @param {string[]} descriptionFiles possible description filenames + * @param {function(Error=, {data: object, path: string}=): void} callback callback + */ +const getDescriptionFile = (fs, directory, descriptionFiles, callback) => { + let i = 0; + const tryLoadCurrent = () => { + if (i >= descriptionFiles.length) { + const parentDirectory = dirname(fs, directory); + if (!parentDirectory || parentDirectory === directory) return callback(); + return getDescriptionFile( + fs, + parentDirectory, + descriptionFiles, + callback + ); + } + const filePath = join(fs, directory, descriptionFiles[i]); + readJson(fs, filePath, (err, data) => { + if (err) { + if ("code" in err && err.code === "ENOENT") { + i++; + return tryLoadCurrent(); + } + return callback(err); + } + if (!data || typeof data !== "object" || Array.isArray(data)) { + return callback( + new Error(`Description file ${filePath} is not an object`) + ); + } + callback(null, { data, path: filePath }); + }); + }; + tryLoadCurrent(); +}; +exports.getDescriptionFile = getDescriptionFile; + +exports.getRequiredVersionFromDescriptionFile = (data, packageName) => { + if ( + data.optionalDependencies && + typeof data.optionalDependencies === "object" && + packageName in data.optionalDependencies + ) { + return data.optionalDependencies[packageName]; + } + if ( + data.dependencies && + typeof data.dependencies === "object" && + packageName in data.dependencies + ) { + return data.dependencies[packageName]; + } + if ( + data.peerDependencies && + typeof data.peerDependencies === "object" && + packageName in data.peerDependencies + ) { + return data.peerDependencies[packageName]; + } + if ( + data.devDependencies && + typeof data.devDependencies === "object" && + packageName in data.devDependencies + ) { + return data.devDependencies[packageName]; + } +}; + + +/***/ }), + +/***/ 5798: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const ModuleDependency = __webpack_require__(5462); +const formatLocation = __webpack_require__(82476); +const { LogType } = __webpack_require__(26655); +const AggressiveSplittingPlugin = __webpack_require__(13461); +const ConcatenatedModule = __webpack_require__(74233); +const SizeLimitsPlugin = __webpack_require__(84693); +const { + compareLocations, + compareChunksById, + compareNumbers, + compareIds, + concatComparators, + compareSelect, + compareModulesByIdentifier +} = __webpack_require__(21699); +const { makePathsRelative, parseResource } = __webpack_require__(47779); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {import("../ChunkGroup").OriginRecord} OriginRecord */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Compilation").Asset} Asset */ +/** @typedef {import("../Compilation").NormalizedStatsOptions} NormalizedStatsOptions */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ +/** @typedef {import("../ModuleProfile")} ModuleProfile */ +/** @typedef {import("../RequestShortener")} RequestShortener */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @template T @typedef {import("../util/comparators").Comparator} Comparator */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ +/** @typedef {import("../util/smartGrouping").GroupConfig} GroupConfig */ +/** @typedef {import("./StatsFactory")} StatsFactory */ +/** @typedef {import("./StatsFactory").StatsFactoryContext} StatsFactoryContext */ + +/** @typedef {Asset & { type: string, related: ExtendedAsset[] }} ExtendedAsset */ + +/** @template T @typedef {Record void>} ExtractorsByOption */ + +/** + * @typedef {Object} SimpleExtractors + * @property {ExtractorsByOption} compilation + * @property {ExtractorsByOption} asset + * @property {ExtractorsByOption} asset$visible + * @property {ExtractorsByOption<{ name: string, chunkGroup: ChunkGroup }>} chunkGroup + * @property {ExtractorsByOption} module + * @property {ExtractorsByOption} module$visible + * @property {ExtractorsByOption} moduleIssuer + * @property {ExtractorsByOption} profile + * @property {ExtractorsByOption} moduleReason + * @property {ExtractorsByOption} chunk + * @property {ExtractorsByOption} chunkOrigin + * @property {ExtractorsByOption} error + * @property {ExtractorsByOption} warning + * @property {ExtractorsByOption<{ origin: Module, module: Module }>} moduleTraceItem + * @property {ExtractorsByOption} moduleTraceDependency + */ + +/** + * @template T + * @template I + * @param {Iterable} items items to select from + * @param {function(T): Iterable} selector selector function to select values from item + * @returns {I[]} array of values + */ +const uniqueArray = (items, selector) => { + /** @type {Set} */ + const set = new Set(); + for (const item of items) { + for (const i of selector(item)) { + set.add(i); + } + } + return Array.from(set); +}; + +/** + * @template T + * @template I + * @param {Iterable} items items to select from + * @param {function(T): Iterable} selector selector function to select values from item + * @param {Comparator} comparator comparator function + * @returns {I[]} array of values + */ +const uniqueOrderedArray = (items, selector, comparator) => { + return uniqueArray(items, selector).sort(comparator); +}; + +/** @template T @template R @typedef {{ [P in keyof T]: R }} MappedValues */ + +/** + * @template T + * @template R + * @param {T} obj object to be mapped + * @param {function(T[keyof T], keyof T): R} fn mapping function + * @returns {MappedValues} mapped object + */ +const mapObject = (obj, fn) => { + const newObj = Object.create(null); + for (const key of Object.keys(obj)) { + newObj[key] = fn(obj[key], /** @type {keyof T} */ (key)); + } + return newObj; +}; + +/** + * @template T + * @param {Iterable} iterable an iterable + * @returns {number} count of items + */ +const countIterable = iterable => { + let i = 0; + // eslint-disable-next-line no-unused-vars + for (const _ of iterable) i++; + return i; +}; + +/** + * @param {Compilation} compilation the compilation + * @param {function(Compilation, string): any[]} getItems get items + * @returns {number} total number + */ +const countWithChildren = (compilation, getItems) => { + let count = getItems(compilation, "").length; + for (const child of compilation.children) { + count += countWithChildren(child, (c, type) => + getItems(c, `.children[].compilation${type}`) + ); + } + return count; +}; + +/** @type {ExtractorsByOption} */ +const EXTRACT_ERROR = { + _: (object, error, context, { requestShortener }) => { + // TODO webpack 6 disallow strings in the errors/warnings list + if (typeof error === "string") { + object.message = error; + } else { + if (error.chunk) { + object.chunkName = error.chunk.name; + object.chunkEntry = error.chunk.hasRuntime(); + object.chunkInitial = error.chunk.canBeInitial(); + } + if (error.file) { + object.file = error.file; + } + if (error.module) { + object.moduleIdentifier = error.module.identifier(); + object.moduleName = error.module.readableIdentifier(requestShortener); + } + if (error.loc) { + object.loc = formatLocation(error.loc); + } + object.message = error.message; + } + }, + ids: (object, error, { compilation: { chunkGraph } }) => { + if (typeof error !== "string") { + if (error.chunk) { + object.chunkId = error.chunk.id; + } + if (error.module) { + object.moduleId = chunkGraph.getModuleId(error.module); + } + } + }, + moduleTrace: (object, error, context, options, factory) => { + if (typeof error !== "string" && error.module) { + const { + type, + compilation: { moduleGraph } + } = context; + /** @type {Set} */ + const visitedModules = new Set(); + const moduleTrace = []; + let current = error.module; + while (current) { + if (visitedModules.has(current)) break; // circular (technically impossible, but how knows) + visitedModules.add(current); + const origin = moduleGraph.getIssuer(current); + if (!origin) break; + moduleTrace.push({ origin, module: current }); + current = origin; + } + object.moduleTrace = factory.create( + `${type}.moduleTrace`, + moduleTrace, + context + ); + } + }, + errorDetails: (object, error) => { + if (typeof error !== "string") { + object.details = error.details; + } + }, + errorStack: (object, error) => { + if (typeof error !== "string") { + object.stack = error.stack; + } + } +}; + +/** @type {SimpleExtractors} */ +const SIMPLE_EXTRACTORS = { + compilation: { + _: (object, compilation, context) => { + if (!context.makePathsRelative) { + context.makePathsRelative = makePathsRelative.bindContextCache( + compilation.compiler.context, + compilation.compiler.root + ); + } + if (!context.cachedGetErrors) { + const map = new WeakMap(); + context.cachedGetErrors = compilation => { + return ( + map.get(compilation) || + (errors => (map.set(compilation, errors), errors))( + compilation.getErrors() + ) + ); + }; + } + if (!context.cachedGetWarnings) { + const map = new WeakMap(); + context.cachedGetWarnings = compilation => { + return ( + map.get(compilation) || + (warnings => (map.set(compilation, warnings), warnings))( + compilation.getWarnings() + ) + ); + }; + } + if (compilation.name) { + object.name = compilation.name; + } + if (compilation.needAdditionalPass) { + object.needAdditionalPass = true; + } + }, + hash: (object, compilation) => { + object.hash = compilation.hash; + }, + version: object => { + object.version = __webpack_require__(32607)/* .version */ .i8; + }, + env: (object, compilation, context, { _env }) => { + object.env = _env; + }, + timings: (object, compilation) => { + object.time = compilation.endTime - compilation.startTime; + }, + builtAt: (object, compilation) => { + object.builtAt = compilation.endTime; + }, + publicPath: (object, compilation) => { + object.publicPath = compilation.getPath( + compilation.outputOptions.publicPath + ); + }, + outputPath: (object, compilation) => { + object.outputPath = compilation.outputOptions.path; + }, + assets: (object, compilation, context, options, factory) => { + const { type } = context; + /** @type {Map} */ + const compilationFileToChunks = new Map(); + /** @type {Map} */ + const compilationAuxiliaryFileToChunks = new Map(); + for (const chunk of compilation.chunks) { + for (const file of chunk.files) { + let array = compilationFileToChunks.get(file); + if (array === undefined) { + array = []; + compilationFileToChunks.set(file, array); + } + array.push(chunk); + } + for (const file of chunk.auxiliaryFiles) { + let array = compilationAuxiliaryFileToChunks.get(file); + if (array === undefined) { + array = []; + compilationAuxiliaryFileToChunks.set(file, array); + } + array.push(chunk); + } + } + /** @type {Map} */ + const assetMap = new Map(); + const assets = new Set(); + for (const asset of compilation.getAssets()) { + const item = { + ...asset, + type: "asset", + related: undefined + }; + assets.add(item); + assetMap.set(asset.name, item); + } + for (const item of assetMap.values()) { + const related = item.info.related; + if (!related) continue; + for (const type of Object.keys(related)) { + const relatedEntry = related[type]; + const deps = Array.isArray(relatedEntry) + ? relatedEntry + : [relatedEntry]; + for (const dep of deps) { + const depItem = assetMap.get(dep); + if (!depItem) continue; + assets.delete(depItem); + depItem.type = type; + item.related = item.related || []; + item.related.push(depItem); + } + } + } + + object.assetsByChunkName = {}; + for (const [file, chunks] of compilationFileToChunks) { + for (const chunk of chunks) { + const name = chunk.name; + if (!name) continue; + if ( + !Object.prototype.hasOwnProperty.call( + object.assetsByChunkName, + name + ) + ) { + object.assetsByChunkName[name] = []; + } + object.assetsByChunkName[name].push(file); + } + } + + const groupedAssets = factory.create( + `${type}.assets`, + Array.from(assets), + { + ...context, + compilationFileToChunks, + compilationAuxiliaryFileToChunks + } + ); + const limited = spaceLimited(groupedAssets, options.assetsSpace); + object.assets = limited.children; + object.filteredAssets = limited.filteredChildren; + }, + chunks: (object, compilation, context, options, factory) => { + const { type } = context; + object.chunks = factory.create( + `${type}.chunks`, + Array.from(compilation.chunks), + context + ); + }, + modules: (object, compilation, context, options, factory) => { + const { type } = context; + const array = Array.from(compilation.modules); + const groupedModules = factory.create(`${type}.modules`, array, context); + const limited = spaceLimited(groupedModules, options.modulesSpace); + object.modules = limited.children; + object.filteredModules = limited.filteredChildren; + }, + entrypoints: ( + object, + compilation, + context, + { entrypoints, chunkGroups, chunkGroupAuxiliary, chunkGroupChildren }, + factory + ) => { + const { type } = context; + const array = Array.from(compilation.entrypoints, ([key, value]) => ({ + name: key, + chunkGroup: value + })); + if (entrypoints === "auto" && !chunkGroups) { + if (array.length > 5) return; + if ( + !chunkGroupChildren && + array.every(({ chunkGroup }) => { + if (chunkGroup.chunks.length !== 1) return false; + const chunk = chunkGroup.chunks[0]; + return ( + chunk.files.size === 1 && + (!chunkGroupAuxiliary || chunk.auxiliaryFiles.size === 0) + ); + }) + ) { + return; + } + } + object.entrypoints = factory.create( + `${type}.entrypoints`, + array, + context + ); + }, + chunkGroups: (object, compilation, context, options, factory) => { + const { type } = context; + const array = Array.from( + compilation.namedChunkGroups, + ([key, value]) => ({ + name: key, + chunkGroup: value + }) + ); + object.namedChunkGroups = factory.create( + `${type}.namedChunkGroups`, + array, + context + ); + }, + errors: (object, compilation, context, options, factory) => { + const { type, cachedGetErrors } = context; + object.errors = factory.create( + `${type}.errors`, + cachedGetErrors(compilation), + context + ); + }, + errorsCount: (object, compilation, { cachedGetErrors }) => { + object.errorsCount = countWithChildren(compilation, c => + cachedGetErrors(c) + ); + }, + warnings: (object, compilation, context, options, factory) => { + const { type, cachedGetWarnings } = context; + object.warnings = factory.create( + `${type}.warnings`, + cachedGetWarnings(compilation), + context + ); + }, + warningsCount: ( + object, + compilation, + context, + { warningsFilter }, + factory + ) => { + const { type, cachedGetWarnings } = context; + object.warningsCount = countWithChildren(compilation, (c, childType) => { + if (!warningsFilter && warningsFilter.length === 0) + return cachedGetWarnings(c); + return factory + .create(`${type}${childType}.warnings`, cachedGetWarnings(c), context) + .filter(warning => { + const warningString = Object.keys(warning) + .map(key => `${warning[key]}`) + .join("\n"); + return !warningsFilter.some(filter => + filter(warning, warningString) + ); + }); + }); + }, + logging: (object, compilation, _context, options, factory) => { + const util = __webpack_require__(31669); + const { loggingDebug, loggingTrace, context } = options; + object.logging = {}; + let acceptedTypes; + let collapsedGroups = false; + switch (options.logging) { + case "none": + acceptedTypes = new Set([]); + break; + case "error": + acceptedTypes = new Set([LogType.error]); + break; + case "warn": + acceptedTypes = new Set([LogType.error, LogType.warn]); + break; + case "info": + acceptedTypes = new Set([LogType.error, LogType.warn, LogType.info]); + break; + case "log": + acceptedTypes = new Set([ + LogType.error, + LogType.warn, + LogType.info, + LogType.log, + LogType.group, + LogType.groupEnd, + LogType.groupCollapsed, + LogType.clear + ]); + break; + case "verbose": + acceptedTypes = new Set([ + LogType.error, + LogType.warn, + LogType.info, + LogType.log, + LogType.group, + LogType.groupEnd, + LogType.groupCollapsed, + LogType.profile, + LogType.profileEnd, + LogType.time, + LogType.status, + LogType.clear + ]); + collapsedGroups = true; + break; + } + const cachedMakePathsRelative = makePathsRelative.bindContextCache( + context, + compilation.compiler.root + ); + let depthInCollapsedGroup = 0; + for (const [origin, logEntries] of compilation.logging) { + const debugMode = loggingDebug.some(fn => fn(origin)); + const groupStack = []; + const rootList = []; + let currentList = rootList; + let processedLogEntries = 0; + for (const entry of logEntries) { + let type = entry.type; + if (!debugMode && !acceptedTypes.has(type)) continue; + + // Expand groups in verbose and debug modes + if (type === LogType.groupCollapsed && (debugMode || collapsedGroups)) + type = LogType.group; + + if (depthInCollapsedGroup === 0) { + processedLogEntries++; + } + + if (type === LogType.groupEnd) { + groupStack.pop(); + if (groupStack.length > 0) { + currentList = groupStack[groupStack.length - 1].children; + } else { + currentList = rootList; + } + if (depthInCollapsedGroup > 0) depthInCollapsedGroup--; + continue; + } + let message = undefined; + if (entry.type === LogType.time) { + message = `${entry.args[0]}: ${ + entry.args[1] * 1000 + entry.args[2] / 1000000 + } ms`; + } else if (entry.args && entry.args.length > 0) { + message = util.format(entry.args[0], ...entry.args.slice(1)); + } + const newEntry = { + ...entry, + type, + message, + trace: loggingTrace ? entry.trace : undefined, + children: + type === LogType.group || type === LogType.groupCollapsed + ? [] + : undefined + }; + currentList.push(newEntry); + if (newEntry.children) { + groupStack.push(newEntry); + currentList = newEntry.children; + if (depthInCollapsedGroup > 0) { + depthInCollapsedGroup++; + } else if (type === LogType.groupCollapsed) { + depthInCollapsedGroup = 1; + } + } + } + let name = cachedMakePathsRelative(origin).replace(/\|/g, " "); + if (name in object.logging) { + let i = 1; + while (`${name}#${i}` in object.logging) { + i++; + } + name = `${name}#${i}`; + } + object.logging[name] = { + entries: rootList, + filteredEntries: logEntries.length - processedLogEntries, + debug: debugMode + }; + } + }, + children: (object, compilation, context, options, factory) => { + const { type } = context; + object.children = factory.create( + `${type}.children`, + compilation.children, + context + ); + } + }, + asset: { + _: (object, asset, context, options, factory) => { + const { compilation } = context; + object.type = asset.type; + object.name = asset.name; + object.size = asset.source.size(); + object.emitted = compilation.emittedAssets.has(asset.name); + object.comparedForEmit = compilation.comparedForEmitAssets.has( + asset.name + ); + const cached = !object.emitted && !object.comparedForEmit; + object.cached = cached; + object.info = asset.info; + if (!cached || options.cachedAssets) { + Object.assign( + object, + factory.create(`${context.type}$visible`, asset, context) + ); + } + } + }, + asset$visible: { + _: ( + object, + asset, + { compilation, compilationFileToChunks, compilationAuxiliaryFileToChunks } + ) => { + const chunks = compilationFileToChunks.get(asset.name) || []; + const auxiliaryChunks = + compilationAuxiliaryFileToChunks.get(asset.name) || []; + object.chunkNames = uniqueOrderedArray( + chunks, + c => (c.name ? [c.name] : []), + compareIds + ); + object.chunkIdHints = uniqueOrderedArray( + chunks, + c => Array.from(c.idNameHints), + compareIds + ); + object.auxiliaryChunkNames = uniqueOrderedArray( + auxiliaryChunks, + c => (c.name ? [c.name] : []), + compareIds + ); + object.auxiliaryChunkIdHints = uniqueOrderedArray( + auxiliaryChunks, + c => Array.from(c.idNameHints), + compareIds + ); + object.filteredRelated = asset.related ? asset.related.length : undefined; + }, + relatedAssets: (object, asset, context, options, factory) => { + const { type } = context; + object.related = factory.create( + `${type.slice(0, -8)}.related`, + asset.related, + context + ); + object.filteredRelated = asset.related + ? asset.related.length - object.related.length + : undefined; + }, + ids: ( + object, + asset, + { compilationFileToChunks, compilationAuxiliaryFileToChunks } + ) => { + const chunks = compilationFileToChunks.get(asset.name) || []; + const auxiliaryChunks = + compilationAuxiliaryFileToChunks.get(asset.name) || []; + object.chunks = uniqueOrderedArray(chunks, c => c.ids, compareIds); + object.auxiliaryChunks = uniqueOrderedArray( + auxiliaryChunks, + c => c.ids, + compareIds + ); + }, + performance: (object, asset) => { + object.isOverSizeLimit = SizeLimitsPlugin.isOverSizeLimit(asset.source); + } + }, + chunkGroup: { + _: ( + object, + { name, chunkGroup }, + { compilation, compilation: { moduleGraph, chunkGraph } }, + { ids, chunkGroupAuxiliary, chunkGroupChildren, chunkGroupMaxAssets } + ) => { + const children = + chunkGroupChildren && + chunkGroup.getChildrenByOrders(moduleGraph, chunkGraph); + const toAsset = name => { + const asset = compilation.getAsset(name); + return { + name, + size: asset ? asset.info.size : -1 + }; + }; + const sizeReducer = (total, { size }) => total + size; + const assets = uniqueArray(chunkGroup.chunks, c => c.files).map(toAsset); + const auxiliaryAssets = uniqueOrderedArray( + chunkGroup.chunks, + c => c.auxiliaryFiles, + compareIds + ).map(toAsset); + const assetsSize = assets.reduce(sizeReducer, 0); + const auxiliaryAssetsSize = auxiliaryAssets.reduce(sizeReducer, 0); + Object.assign(object, { + name, + chunks: ids ? chunkGroup.chunks.map(c => c.id) : undefined, + assets: assets.length <= chunkGroupMaxAssets ? assets : undefined, + filteredAssets: + assets.length <= chunkGroupMaxAssets ? 0 : assets.length, + assetsSize, + auxiliaryAssets: + chunkGroupAuxiliary && auxiliaryAssets.length <= chunkGroupMaxAssets + ? auxiliaryAssets + : undefined, + filteredAuxiliaryAssets: + chunkGroupAuxiliary && auxiliaryAssets.length <= chunkGroupMaxAssets + ? 0 + : auxiliaryAssets.length, + auxiliaryAssetsSize, + children: children + ? mapObject(children, groups => + groups.map(group => { + const assets = uniqueArray(group.chunks, c => c.files).map( + toAsset + ); + const auxiliaryAssets = uniqueOrderedArray( + group.chunks, + c => c.auxiliaryFiles, + compareIds + ).map(toAsset); + return { + name: group.name, + chunks: ids ? group.chunks.map(c => c.id) : undefined, + assets: + assets.length <= chunkGroupMaxAssets ? assets : undefined, + filteredAssets: + assets.length <= chunkGroupMaxAssets ? 0 : assets.length, + auxiliaryAssets: + chunkGroupAuxiliary && + auxiliaryAssets.length <= chunkGroupMaxAssets + ? auxiliaryAssets + : undefined, + filteredAuxiliaryAssets: + chunkGroupAuxiliary && + auxiliaryAssets.length <= chunkGroupMaxAssets + ? 0 + : auxiliaryAssets.length + }; + }) + ) + : undefined, + childAssets: children + ? mapObject(children, groups => { + /** @type {Set} */ + const set = new Set(); + for (const group of groups) { + for (const chunk of group.chunks) { + for (const asset of chunk.files) { + set.add(asset); + } + } + } + return Array.from(set); + }) + : undefined + }); + }, + performance: (object, { chunkGroup }) => { + object.isOverSizeLimit = SizeLimitsPlugin.isOverSizeLimit(chunkGroup); + } + }, + module: { + _: (object, module, context, options, factory) => { + const { compilation, type } = context; + const built = compilation.builtModules.has(module); + const codeGenerated = compilation.codeGeneratedModules.has(module); + const sizes = {}; + for (const sourceType of module.getSourceTypes()) { + sizes[sourceType] = module.size(sourceType); + } + Object.assign(object, { + type: "module", + moduleType: module.type, + layer: module.layer, + size: module.size(), + sizes, + built, + codeGenerated, + cached: !built && !codeGenerated + }); + if (built || codeGenerated || options.cachedModules) { + Object.assign( + object, + factory.create(`${type}$visible`, module, context) + ); + } + } + }, + module$visible: { + _: (object, module, context, { requestShortener }, factory) => { + const { compilation, type, rootModules } = context; + const { moduleGraph } = compilation; + /** @type {Module[]} */ + const path = []; + const issuer = moduleGraph.getIssuer(module); + let current = issuer; + while (current) { + path.push(current); + current = moduleGraph.getIssuer(current); + } + path.reverse(); + const profile = moduleGraph.getProfile(module); + const errors = module.getErrors(); + const errorsCount = errors !== undefined ? countIterable(errors) : 0; + const warnings = module.getWarnings(); + const warningsCount = + warnings !== undefined ? countIterable(warnings) : 0; + const sizes = {}; + for (const sourceType of module.getSourceTypes()) { + sizes[sourceType] = module.size(sourceType); + } + Object.assign(object, { + identifier: module.identifier(), + name: module.readableIdentifier(requestShortener), + nameForCondition: module.nameForCondition(), + index: moduleGraph.getPreOrderIndex(module), + preOrderIndex: moduleGraph.getPreOrderIndex(module), + index2: moduleGraph.getPostOrderIndex(module), + postOrderIndex: moduleGraph.getPostOrderIndex(module), + cacheable: module.buildInfo.cacheable, + optional: module.isOptional(moduleGraph), + orphan: + !type.endsWith("module.modules[].module$visible") && + compilation.chunkGraph.getNumberOfModuleChunks(module) === 0, + dependent: rootModules ? !rootModules.has(module) : undefined, + issuer: issuer && issuer.identifier(), + issuerName: issuer && issuer.readableIdentifier(requestShortener), + issuerPath: + issuer && + factory.create(`${type.slice(0, -8)}.issuerPath`, path, context), + failed: errorsCount > 0, + errors: errorsCount, + warnings: warningsCount + }); + if (profile) { + object.profile = factory.create( + `${type.slice(0, -8)}.profile`, + profile, + context + ); + } + }, + ids: (object, module, { compilation: { chunkGraph, moduleGraph } }) => { + object.id = chunkGraph.getModuleId(module); + const issuer = moduleGraph.getIssuer(module); + object.issuerId = issuer && chunkGraph.getModuleId(issuer); + object.chunks = Array.from( + chunkGraph.getOrderedModuleChunksIterable(module, compareChunksById), + chunk => chunk.id + ); + }, + moduleAssets: (object, module) => { + object.assets = module.buildInfo.assets + ? Object.keys(module.buildInfo.assets) + : []; + }, + reasons: (object, module, context, options, factory) => { + const { + type, + compilation: { moduleGraph } + } = context; + object.reasons = factory.create( + `${type.slice(0, -8)}.reasons`, + Array.from(moduleGraph.getIncomingConnections(module)), + context + ); + }, + usedExports: ( + object, + module, + { runtime, compilation: { moduleGraph } } + ) => { + const usedExports = moduleGraph.getUsedExports(module, runtime); + if (usedExports === null) { + object.usedExports = null; + } else if (typeof usedExports === "boolean") { + object.usedExports = usedExports; + } else { + object.usedExports = Array.from(usedExports); + } + }, + providedExports: (object, module, { compilation: { moduleGraph } }) => { + const providedExports = moduleGraph.getProvidedExports(module); + object.providedExports = Array.isArray(providedExports) + ? providedExports + : null; + }, + optimizationBailout: ( + object, + module, + { compilation: { moduleGraph } }, + { requestShortener } + ) => { + object.optimizationBailout = moduleGraph + .getOptimizationBailout(module) + .map(item => { + if (typeof item === "function") return item(requestShortener); + return item; + }); + }, + depth: (object, module, { compilation: { moduleGraph } }) => { + object.depth = moduleGraph.getDepth(module); + }, + nestedModules: (object, module, context, options, factory) => { + const { type } = context; + if (module instanceof ConcatenatedModule) { + const modules = module.modules; + const groupedModules = factory.create( + `${type.slice(0, -8)}.modules`, + modules, + context + ); + const limited = spaceLimited( + groupedModules, + options.nestedModulesSpace + ); + object.modules = limited.children; + object.filteredModules = limited.filteredChildren; + } + }, + source: (object, module) => { + const originalSource = module.originalSource(); + if (originalSource) { + object.source = originalSource.source(); + } + } + }, + profile: { + _: (object, profile) => { + Object.assign(object, { + total: + profile.factory + + profile.restoring + + profile.integration + + profile.building + + profile.storing, + resolving: profile.factory, + restoring: profile.restoring, + building: profile.building, + integration: profile.integration, + storing: profile.storing, + additionalResolving: profile.additionalFactories, + additionalIntegration: profile.additionalIntegration, + // TODO remove this in webpack 6 + factory: profile.factory, + // TODO remove this in webpack 6 + dependencies: profile.additionalFactories + }); + } + }, + moduleIssuer: { + _: (object, module, context, { requestShortener }, factory) => { + const { compilation, type } = context; + const { moduleGraph } = compilation; + const profile = moduleGraph.getProfile(module); + Object.assign(object, { + identifier: module.identifier(), + name: module.readableIdentifier(requestShortener) + }); + if (profile) { + object.profile = factory.create(`${type}.profile`, profile, context); + } + }, + ids: (object, module, { compilation: { chunkGraph } }) => { + object.id = chunkGraph.getModuleId(module); + } + }, + moduleReason: { + _: (object, reason, { runtime }, { requestShortener }) => { + const dep = reason.dependency; + const moduleDep = + dep && dep instanceof ModuleDependency ? dep : undefined; + Object.assign(object, { + moduleIdentifier: reason.originModule + ? reason.originModule.identifier() + : null, + module: reason.originModule + ? reason.originModule.readableIdentifier(requestShortener) + : null, + moduleName: reason.originModule + ? reason.originModule.readableIdentifier(requestShortener) + : null, + resolvedModuleIdentifier: reason.resolvedOriginModule + ? reason.resolvedOriginModule.identifier() + : null, + resolvedModule: reason.resolvedOriginModule + ? reason.resolvedOriginModule.readableIdentifier(requestShortener) + : null, + type: reason.dependency ? reason.dependency.type : null, + active: reason.isActive(runtime), + explanation: reason.explanation, + userRequest: (moduleDep && moduleDep.userRequest) || null + }); + if (reason.dependency) { + const locInfo = formatLocation(reason.dependency.loc); + if (locInfo) { + object.loc = locInfo; + } + } + }, + ids: (object, reason, { compilation: { chunkGraph } }) => { + object.moduleId = reason.originModule + ? chunkGraph.getModuleId(reason.originModule) + : null; + object.resolvedModuleId = reason.resolvedOriginModule + ? chunkGraph.getModuleId(reason.resolvedOriginModule) + : null; + } + }, + chunk: { + _: (object, chunk, { makePathsRelative, compilation: { chunkGraph } }) => { + const childIdByOrder = chunk.getChildIdsByOrders(chunkGraph); + + Object.assign(object, { + rendered: chunk.rendered, + initial: chunk.canBeInitial(), + entry: chunk.hasRuntime(), + recorded: AggressiveSplittingPlugin.wasChunkRecorded(chunk), + reason: chunk.chunkReason, + size: chunkGraph.getChunkModulesSize(chunk), + sizes: chunkGraph.getChunkModulesSizes(chunk), + names: chunk.name ? [chunk.name] : [], + idHints: Array.from(chunk.idNameHints), + runtime: + chunk.runtime === undefined + ? undefined + : typeof chunk.runtime === "string" + ? [makePathsRelative(chunk.runtime)] + : Array.from(chunk.runtime.sort(), makePathsRelative), + files: Array.from(chunk.files), + auxiliaryFiles: Array.from(chunk.auxiliaryFiles).sort(compareIds), + hash: chunk.renderedHash, + childrenByOrder: childIdByOrder + }); + }, + ids: (object, chunk) => { + object.id = chunk.id; + }, + chunkRelations: (object, chunk, { compilation: { chunkGraph } }) => { + /** @type {Set} */ + const parents = new Set(); + /** @type {Set} */ + const children = new Set(); + /** @type {Set} */ + const siblings = new Set(); + + for (const chunkGroup of chunk.groupsIterable) { + for (const parentGroup of chunkGroup.parentsIterable) { + for (const chunk of parentGroup.chunks) { + parents.add(chunk.id); + } + } + for (const childGroup of chunkGroup.childrenIterable) { + for (const chunk of childGroup.chunks) { + children.add(chunk.id); + } + } + for (const sibling of chunkGroup.chunks) { + if (sibling !== chunk) siblings.add(sibling.id); + } + } + object.siblings = Array.from(siblings).sort(compareIds); + object.parents = Array.from(parents).sort(compareIds); + object.children = Array.from(children).sort(compareIds); + }, + chunkModules: (object, chunk, context, options, factory) => { + const { + type, + compilation: { chunkGraph } + } = context; + const array = chunkGraph.getChunkModules(chunk); + const groupedModules = factory.create(`${type}.modules`, array, { + ...context, + runtime: chunk.runtime, + rootModules: new Set(chunkGraph.getChunkRootModules(chunk)) + }); + const limited = spaceLimited(groupedModules, options.chunkModulesSpace); + object.modules = limited.children; + object.filteredModules = limited.filteredChildren; + }, + chunkOrigins: (object, chunk, context, options, factory) => { + const { + type, + compilation: { chunkGraph } + } = context; + /** @type {Set} */ + const originsKeySet = new Set(); + const origins = []; + for (const g of chunk.groupsIterable) { + origins.push(...g.origins); + } + const array = origins.filter(origin => { + const key = [ + origin.module ? chunkGraph.getModuleId(origin.module) : undefined, + formatLocation(origin.loc), + origin.request + ].join(); + if (originsKeySet.has(key)) return false; + originsKeySet.add(key); + return true; + }); + object.origins = factory.create(`${type}.origins`, array, context); + } + }, + chunkOrigin: { + _: (object, origin, context, { requestShortener }) => { + Object.assign(object, { + module: origin.module ? origin.module.identifier() : "", + moduleIdentifier: origin.module ? origin.module.identifier() : "", + moduleName: origin.module + ? origin.module.readableIdentifier(requestShortener) + : "", + loc: formatLocation(origin.loc), + request: origin.request + }); + }, + ids: (object, origin, { compilation: { chunkGraph } }) => { + object.moduleId = origin.module + ? chunkGraph.getModuleId(origin.module) + : undefined; + } + }, + error: EXTRACT_ERROR, + warning: EXTRACT_ERROR, + moduleTraceItem: { + _: (object, { origin, module }, context, { requestShortener }, factory) => { + const { + type, + compilation: { moduleGraph } + } = context; + object.originIdentifier = origin.identifier(); + object.originName = origin.readableIdentifier(requestShortener); + object.moduleIdentifier = module.identifier(); + object.moduleName = module.readableIdentifier(requestShortener); + const dependencies = Array.from( + moduleGraph.getIncomingConnections(module) + ) + .filter(c => c.resolvedOriginModule === origin && c.dependency) + .map(c => c.dependency); + object.dependencies = factory.create( + `${type}.dependencies`, + Array.from(new Set(dependencies)), + context + ); + }, + ids: (object, { origin, module }, { compilation: { chunkGraph } }) => { + object.originId = chunkGraph.getModuleId(origin); + object.moduleId = chunkGraph.getModuleId(module); + } + }, + moduleTraceDependency: { + _: (object, dependency) => { + object.loc = formatLocation(dependency.loc); + } + } +}; + +/** @type {Record boolean | undefined>>} */ +const FILTER = { + "module.reasons": { + "!orphanModules": (reason, { compilation: { chunkGraph } }) => { + if ( + reason.originModule && + chunkGraph.getNumberOfModuleChunks(reason.originModule) === 0 + ) { + return false; + } + } + } +}; + +/** @type {Record boolean | undefined>>} */ +const FILTER_RESULTS = { + "compilation.warnings": { + warningsFilter: util.deprecate( + (warning, context, { warningsFilter }) => { + const warningString = Object.keys(warning) + .map(key => `${warning[key]}`) + .join("\n"); + return !warningsFilter.some(filter => filter(warning, warningString)); + }, + "config.stats.warningsFilter is deprecated in favor of config.ignoreWarnings", + "DEP_WEBPACK_STATS_WARNINGS_FILTER" + ) + } +}; + +/** @type {Record void>} */ +const MODULES_SORTER = { + _: (comparators, { compilation: { moduleGraph } }) => { + comparators.push( + compareSelect( + /** + * @param {Module} m module + * @returns {number} depth + */ + m => moduleGraph.getDepth(m), + compareNumbers + ), + compareSelect( + /** + * @param {Module} m module + * @returns {number} index + */ + m => moduleGraph.getPreOrderIndex(m), + compareNumbers + ), + compareSelect( + /** + * @param {Module} m module + * @returns {string} identifier + */ + m => m.identifier(), + compareIds + ) + ); + } +}; + +/** @type {Record void>>} */ +const SORTERS = { + "compilation.chunks": { + _: comparators => { + comparators.push(compareSelect(c => c.id, compareIds)); + } + }, + "compilation.modules": MODULES_SORTER, + "chunk.rootModules": MODULES_SORTER, + "chunk.modules": MODULES_SORTER, + "module.modules": MODULES_SORTER, + "module.reasons": { + _: (comparators, { compilation: { chunkGraph } }) => { + comparators.push( + compareSelect(x => x.originModule, compareModulesByIdentifier) + ); + comparators.push( + compareSelect(x => x.resolvedOriginModule, compareModulesByIdentifier) + ); + comparators.push( + compareSelect( + x => x.dependency, + concatComparators( + compareSelect( + /** + * @param {Dependency} x dependency + * @returns {DependencyLocation} location + */ + x => x.loc, + compareLocations + ), + compareSelect(x => x.type, compareIds) + ) + ) + ); + } + }, + "chunk.origins": { + _: (comparators, { compilation: { chunkGraph } }) => { + comparators.push( + compareSelect( + origin => + origin.module ? chunkGraph.getModuleId(origin.module) : undefined, + compareIds + ), + compareSelect(origin => formatLocation(origin.loc), compareIds), + compareSelect(origin => origin.request, compareIds) + ); + } + } +}; + +const getItemSize = item => { + // Each item takes 1 line + // + the size of the children + // + 1 extra line when it has children and filteredChildren + return !item.children + ? 1 + : item.filteredChildren + ? 2 + getTotalSize(item.children) + : 1 + getTotalSize(item.children); +}; + +const getTotalSize = children => { + let size = 0; + for (const child of children) { + size += getItemSize(child); + } + return size; +}; + +const getTotalItems = children => { + let count = 0; + for (const child of children) { + if (!child.children && !child.filteredChildren) { + count++; + } else { + if (child.children) count += getTotalItems(child.children); + if (child.filteredChildren) count += child.filteredChildren; + } + } + return count; +}; + +const collapse = children => { + // After collapse each child must take exactly one line + const newChildren = []; + for (const child of children) { + if (child.children) { + let filteredChildren = child.filteredChildren || 0; + filteredChildren += getTotalItems(child.children); + newChildren.push({ + ...child, + children: undefined, + filteredChildren + }); + } else { + newChildren.push(child); + } + } + return newChildren; +}; + +const spaceLimited = (itemsAndGroups, max) => { + /** @type {any[] | undefined} */ + let children = undefined; + /** @type {number | undefined} */ + let filteredChildren = undefined; + // This are the groups, which take 1+ lines each + const groups = itemsAndGroups.filter(c => c.children || c.filteredChildren); + // The sizes of the groups are stored in groupSizes + const groupSizes = groups.map(g => getItemSize(g)); + // This are the items, which take 1 line each + const items = itemsAndGroups.filter(c => !c.children && !c.filteredChildren); + // The total of group sizes + let groupsSize = groupSizes.reduce((a, b) => a + b, 0); + if (groupsSize + items.length <= max) { + // The total size in the current state fits into the max + // keep all + children = groups.concat(items); + } else if ( + groups.length > 0 && + groups.length + Math.min(1, items.length) < max + ) { + // If each group would take 1 line the total would be below the maximum + // collapse some groups, keep items + while (groupsSize + items.length + (filteredChildren ? 1 : 0) > max) { + // calculate how much we are over the size limit + // this allows to approach the limit faster + // it's always > 1 + const oversize = + items.length + groupsSize + (filteredChildren ? 1 : 0) - max; + // Find the maximum group and process only this one + const maxGroupSize = Math.max(...groupSizes); + if (maxGroupSize < items.length) { + filteredChildren = items.length; + items.length = 0; + continue; + } + for (let i = 0; i < groups.length; i++) { + if (groupSizes[i] === maxGroupSize) { + const group = groups[i]; + // run this algorithm recursively and limit the size of the children to + // current size - oversize / number of groups + // So it should always end up being smaller + const headerSize = !group.children + ? 0 + : group.filteredChildren + ? 2 + : 1; + const limited = spaceLimited( + group.children, + groupSizes[i] - headerSize - oversize / groups.length + ); + groups[i] = { + ...group, + children: limited.children, + filteredChildren: + (group.filteredChildren || 0) + limited.filteredChildren + }; + const newSize = getItemSize(groups[i]); + groupsSize -= groupSizes[i] - newSize; + groupSizes[i] = newSize; + break; + } + } + } + children = groups.concat(items); + } else if ( + groups.length > 0 && + groups.length + Math.min(1, items.length) <= max + ) { + // If we have only enough space to show one line per group and one line for the filtered items + // collapse all groups and items + children = groups.length ? collapse(groups) : undefined; + filteredChildren = items.length; + } else { + // If we have no space + // collapse complete group + filteredChildren = getTotalItems(itemsAndGroups); + } + return { + children, + filteredChildren + }; +}; + +const assetGroup = (children, assets) => { + let size = 0; + for (const asset of children) { + size += asset.size; + } + return { + size + }; +}; + +const moduleGroup = (children, modules) => { + let size = 0; + const sizes = {}; + for (const module of children) { + size += module.size; + for (const key of Object.keys(module.sizes)) { + sizes[key] = (sizes[key] || 0) + module.sizes[key]; + } + } + return { + size, + sizes + }; +}; + +/** @type {Record void>} */ +const ASSETS_GROUPERS = { + _: (groupConfigs, context, options) => { + const groupByFlag = (name, exclude) => { + groupConfigs.push({ + getKeys: asset => { + return asset[name] ? ["1"] : undefined; + }, + getOptions: () => { + return { + groupChildren: !exclude, + force: exclude + }; + }, + createGroup: (key, children, assets) => { + return exclude + ? { + type: "assets by status", + [name]: !!key, + filteredChildren: assets.length, + ...assetGroup(children, assets) + } + : { + type: "assets by status", + [name]: !!key, + children, + ...assetGroup(children, assets) + }; + } + }); + }; + const { + groupAssetsByEmitStatus, + groupAssetsByPath, + groupAssetsByExtension + } = options; + if (groupAssetsByEmitStatus) { + groupByFlag("emitted"); + groupByFlag("comparedForEmit"); + groupByFlag("isOverSizeLimit"); + } + if (groupAssetsByEmitStatus || !options.cachedAssets) { + groupByFlag("cached", !options.cachedAssets); + } + if (groupAssetsByPath || groupAssetsByExtension) { + groupConfigs.push({ + getKeys: asset => { + const extensionMatch = + groupAssetsByExtension && /(\.[^.]+)(?:\?.*|$)/.exec(asset.name); + const extension = extensionMatch ? extensionMatch[1] : ""; + const pathMatch = + groupAssetsByPath && /(.+)[/\\][^/\\]+(?:\?.*|$)/.exec(asset.name); + const path = pathMatch ? pathMatch[1].split(/[/\\]/) : []; + const keys = []; + if (groupAssetsByPath) { + keys.push("."); + if (extension) + keys.push( + path.length + ? `${path.join("/")}/*${extension}` + : `*${extension}` + ); + while (path.length > 0) { + keys.push(path.join("/") + "/"); + path.pop(); + } + } else { + if (extension) keys.push(`*${extension}`); + } + return keys; + }, + createGroup: (key, children, assets) => { + return { + type: groupAssetsByPath ? "assets by path" : "assets by extension", + name: key, + children, + ...assetGroup(children, assets) + }; + } + }); + } + }, + groupAssetsByInfo: (groupConfigs, context, options) => { + const groupByAssetInfoFlag = name => { + groupConfigs.push({ + getKeys: asset => { + return asset.info && asset.info[name] ? ["1"] : undefined; + }, + createGroup: (key, children, assets) => { + return { + type: "assets by info", + info: { + [name]: !!key + }, + children, + ...assetGroup(children, assets) + }; + } + }); + }; + groupByAssetInfoFlag("immutable"); + groupByAssetInfoFlag("development"); + groupByAssetInfoFlag("hotModuleReplacement"); + }, + groupAssetsByChunk: (groupConfigs, context, options) => { + const groupByNames = name => { + groupConfigs.push({ + getKeys: asset => { + return asset[name]; + }, + createGroup: (key, children, assets) => { + return { + type: "assets by chunk", + [name]: [key], + children, + ...assetGroup(children, assets) + }; + } + }); + }; + groupByNames("chunkNames"); + groupByNames("auxiliaryChunkNames"); + groupByNames("chunkIdHints"); + groupByNames("auxiliaryChunkIdHints"); + }, + excludeAssets: (groupConfigs, context, { excludeAssets }) => { + groupConfigs.push({ + getKeys: asset => { + const ident = asset.name; + const excluded = excludeAssets.some(fn => fn(ident, asset)); + if (excluded) return ["excluded"]; + }, + getOptions: () => ({ + groupChildren: false, + force: true + }), + createGroup: (key, children, assets) => ({ + type: "hidden assets", + filteredChildren: assets.length, + ...assetGroup(children, assets) + }) + }); + } +}; + +/** @type {function(string): Record void>} */ +const MODULES_GROUPERS = type => ({ + _: (groupConfigs, context, options) => { + const groupByFlag = (name, type, exclude) => { + groupConfigs.push({ + getKeys: module => { + return module[name] ? ["1"] : undefined; + }, + getOptions: () => { + return { + groupChildren: !exclude, + force: exclude + }; + }, + createGroup: (key, children, modules) => { + return { + type, + [name]: !!key, + ...(exclude ? { filteredChildren: modules.length } : { children }), + ...moduleGroup(children, modules) + }; + } + }); + }; + const { + groupModulesByCacheStatus, + groupModulesByLayer, + groupModulesByAttributes, + groupModulesByType, + groupModulesByPath, + groupModulesByExtension + } = options; + if (groupModulesByAttributes) { + groupByFlag("errors", "modules with errors"); + groupByFlag("warnings", "modules with warnings"); + groupByFlag("assets", "modules with assets"); + groupByFlag("optional", "optional modules"); + } + if (groupModulesByCacheStatus) { + groupByFlag("cacheable", "cacheable modules"); + groupByFlag("built", "built modules"); + groupByFlag("codeGenerated", "code generated modules"); + } + if (groupModulesByCacheStatus || !options.cachedModules) { + groupByFlag("cached", "cached modules", !options.cachedModules); + } + if (groupModulesByAttributes || !options.orphanModules) { + groupByFlag("orphan", "orphan modules", !options.orphanModules); + } + if (groupModulesByAttributes || !options.dependentModules) { + groupByFlag("dependent", "dependent modules", !options.dependentModules); + } + if (groupModulesByType || !options.runtimeModules) { + groupConfigs.push({ + getKeys: module => { + if (!module.moduleType) return; + if (groupModulesByType) { + return [module.moduleType.split("/", 1)[0]]; + } else if (module.moduleType === "runtime") { + return ["runtime"]; + } + }, + getOptions: key => { + const exclude = key === "runtime" && !options.runtimeModules; + return { + groupChildren: !exclude, + force: exclude + }; + }, + createGroup: (key, children, modules) => { + const exclude = key === "runtime" && !options.runtimeModules; + return { + type: `${key} modules`, + moduleType: key, + ...(exclude ? { filteredChildren: modules.length } : { children }), + ...moduleGroup(children, modules) + }; + } + }); + } + if (groupModulesByLayer) { + groupConfigs.push({ + getKeys: module => { + return [module.layer]; + }, + createGroup: (key, children, modules) => { + return { + type: "modules by layer", + layer: key, + children, + ...moduleGroup(children, modules) + }; + } + }); + } + if (groupModulesByPath || groupModulesByExtension) { + groupConfigs.push({ + getKeys: module => { + if (!module.name) return; + const resource = parseResource(module.name.split("!").pop()).path; + const extensionMatch = + groupModulesByExtension && /(\.[^.]+)(?:\?.*|$)/.exec(resource); + const extension = extensionMatch ? extensionMatch[1] : ""; + const pathMatch = + groupModulesByPath && /(.+)[/\\][^/\\]+(?:\?.*|$)/.exec(resource); + const path = pathMatch ? pathMatch[1].split(/[/\\]/) : []; + const keys = []; + if (groupModulesByPath) { + if (extension) + keys.push( + path.length + ? `${path.join("/")}/*${extension}` + : `*${extension}` + ); + while (path.length > 0) { + keys.push(path.join("/") + "/"); + path.pop(); + } + } else { + if (extension) keys.push(`*${extension}`); + } + return keys; + }, + createGroup: (key, children, modules) => { + return { + type: groupModulesByPath + ? "modules by path" + : "modules by extension", + name: key, + children, + ...moduleGroup(children, modules) + }; + } + }); + } + }, + excludeModules: (groupConfigs, context, { excludeModules }) => { + groupConfigs.push({ + getKeys: module => { + const name = module.name; + if (name) { + const excluded = excludeModules.some(fn => fn(name, module, type)); + if (excluded) return ["1"]; + } + }, + getOptions: () => ({ + groupChildren: false, + force: true + }), + createGroup: (key, children, modules) => ({ + type: "hidden modules", + filteredChildren: children.length, + ...moduleGroup(children, modules) + }) + }); + } +}); + +/** @type {Record void>>} */ +const RESULT_GROUPERS = { + "compilation.assets": ASSETS_GROUPERS, + "asset.related": ASSETS_GROUPERS, + "compilation.modules": MODULES_GROUPERS("module"), + "chunk.modules": MODULES_GROUPERS("chunk"), + "chunk.rootModules": MODULES_GROUPERS("root-of-chunk"), + "module.modules": MODULES_GROUPERS("nested") +}; + +// remove a prefixed "!" that can be specified to reverse sort order +const normalizeFieldKey = field => { + if (field[0] === "!") { + return field.substr(1); + } + return field; +}; + +// if a field is prefixed by a "!" reverse sort order +const sortOrderRegular = field => { + if (field[0] === "!") { + return false; + } + return true; +}; + +/** + * @param {string} field field name + * @returns {function(Object, Object): number} comparators + */ +const sortByField = field => { + if (!field) { + /** + * @param {any} a first + * @param {any} b second + * @returns {-1|0|1} zero + */ + const noSort = (a, b) => 0; + return noSort; + } + + const fieldKey = normalizeFieldKey(field); + + let sortFn = compareSelect(m => m[fieldKey], compareIds); + + // if a field is prefixed with a "!" the sort is reversed! + const sortIsRegular = sortOrderRegular(field); + + if (!sortIsRegular) { + const oldSortFn = sortFn; + sortFn = (a, b) => oldSortFn(b, a); + } + + return sortFn; +}; + +const ASSET_SORTERS = { + assetsSort: (comparators, context, { assetsSort }) => { + comparators.push(sortByField(assetsSort)); + }, + _: comparators => { + comparators.push(compareSelect(a => a.name, compareIds)); + } +}; + +/** @type {Record void>>} */ +const RESULT_SORTERS = { + "compilation.chunks": { + chunksSort: (comparators, context, { chunksSort }) => { + comparators.push(sortByField(chunksSort)); + } + }, + "compilation.modules": { + modulesSort: (comparators, context, { modulesSort }) => { + comparators.push(sortByField(modulesSort)); + } + }, + "chunk.modules": { + chunkModulesSort: (comparators, context, { chunkModulesSort }) => { + comparators.push(sortByField(chunkModulesSort)); + } + }, + "module.modules": { + nestedModulesSort: (comparators, context, { nestedModulesSort }) => { + comparators.push(sortByField(nestedModulesSort)); + } + }, + "compilation.assets": ASSET_SORTERS, + "asset.related": ASSET_SORTERS +}; + +/** + * @param {Record>} config the config see above + * @param {NormalizedStatsOptions} options stats options + * @param {function(string, Function): void} fn handler function called for every active line in config + * @returns {void} + */ +const iterateConfig = (config, options, fn) => { + for (const hookFor of Object.keys(config)) { + const subConfig = config[hookFor]; + for (const option of Object.keys(subConfig)) { + if (option !== "_") { + if (option.startsWith("!")) { + if (options[option.slice(1)]) continue; + } else { + const value = options[option]; + if ( + value === false || + value === undefined || + (Array.isArray(value) && value.length === 0) + ) + continue; + } + } + fn(hookFor, subConfig[option]); + } + } +}; + +/** @type {Record} */ +const ITEM_NAMES = { + "compilation.children[]": "compilation", + "compilation.modules[]": "module", + "compilation.entrypoints[]": "chunkGroup", + "compilation.namedChunkGroups[]": "chunkGroup", + "compilation.errors[]": "error", + "compilation.warnings[]": "warning", + "chunk.modules[]": "module", + "chunk.rootModules[]": "module", + "chunk.origins[]": "chunkOrigin", + "compilation.chunks[]": "chunk", + "compilation.assets[]": "asset", + "asset.related[]": "asset", + "module.issuerPath[]": "moduleIssuer", + "module.reasons[]": "moduleReason", + "module.modules[]": "module", + "module.children[]": "module", + "moduleTrace[]": "moduleTraceItem", + "moduleTraceItem.dependencies[]": "moduleTraceDependency" +}; + +/** + * @param {Object[]} items items to be merged + * @returns {Object} an object + */ +const mergeToObject = items => { + const obj = Object.create(null); + for (const item of items) { + obj[item.name] = item; + } + return obj; +}; + +/** @type {Record any>} */ +const MERGER = { + "compilation.entrypoints": mergeToObject, + "compilation.namedChunkGroups": mergeToObject +}; + +class DefaultStatsFactoryPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("DefaultStatsFactoryPlugin", compilation => { + compilation.hooks.statsFactory.tap( + "DefaultStatsFactoryPlugin", + (stats, options, context) => { + iterateConfig(SIMPLE_EXTRACTORS, options, (hookFor, fn) => { + stats.hooks.extract + .for(hookFor) + .tap("DefaultStatsFactoryPlugin", (obj, data, ctx) => + fn(obj, data, ctx, options, stats) + ); + }); + iterateConfig(FILTER, options, (hookFor, fn) => { + stats.hooks.filter + .for(hookFor) + .tap("DefaultStatsFactoryPlugin", (item, ctx, idx, i) => + fn(item, ctx, options, idx, i) + ); + }); + iterateConfig(FILTER_RESULTS, options, (hookFor, fn) => { + stats.hooks.filterResults + .for(hookFor) + .tap("DefaultStatsFactoryPlugin", (item, ctx, idx, i) => + fn(item, ctx, options, idx, i) + ); + }); + iterateConfig(SORTERS, options, (hookFor, fn) => { + stats.hooks.sort + .for(hookFor) + .tap("DefaultStatsFactoryPlugin", (comparators, ctx) => + fn(comparators, ctx, options) + ); + }); + iterateConfig(RESULT_SORTERS, options, (hookFor, fn) => { + stats.hooks.sortResults + .for(hookFor) + .tap("DefaultStatsFactoryPlugin", (comparators, ctx) => + fn(comparators, ctx, options) + ); + }); + iterateConfig(RESULT_GROUPERS, options, (hookFor, fn) => { + stats.hooks.groupResults + .for(hookFor) + .tap("DefaultStatsFactoryPlugin", (groupConfigs, ctx) => + fn(groupConfigs, ctx, options) + ); + }); + for (const key of Object.keys(ITEM_NAMES)) { + const itemName = ITEM_NAMES[key]; + stats.hooks.getItemName + .for(key) + .tap("DefaultStatsFactoryPlugin", () => itemName); + } + for (const key of Object.keys(MERGER)) { + const merger = MERGER[key]; + stats.hooks.merge.for(key).tap("DefaultStatsFactoryPlugin", merger); + } + if (options.children) { + if (Array.isArray(options.children)) { + stats.hooks.getItemFactory + .for("compilation.children[].compilation") + .tap("DefaultStatsFactoryPlugin", (comp, { _index: idx }) => { + if (idx < options.children.length) { + return compilation.createStatsFactory( + compilation.createStatsOptions( + options.children[idx], + context + ) + ); + } + }); + } else if (options.children !== true) { + const childFactory = compilation.createStatsFactory( + compilation.createStatsOptions(options.children, context) + ); + stats.hooks.getItemFactory + .for("compilation.children[].compilation") + .tap("DefaultStatsFactoryPlugin", () => { + return childFactory; + }); + } + } + } + ); + }); + } +} +module.exports = DefaultStatsFactoryPlugin; + + +/***/ }), + +/***/ 64817: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RequestShortener = __webpack_require__(81460); + +/** @typedef {import("../../declarations/WebpackOptions").StatsOptions} StatsOptions */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Compilation").CreateStatsOptionsContext} CreateStatsOptionsContext */ +/** @typedef {import("../Compiler")} Compiler */ + +const applyDefaults = (options, defaults) => { + for (const key of Object.keys(defaults)) { + if (typeof options[key] === "undefined") { + options[key] = defaults[key]; + } + } +}; + +const NAMED_PRESETS = { + verbose: { + hash: true, + builtAt: true, + relatedAssets: true, + entrypoints: true, + chunkGroups: true, + ids: true, + modules: false, + chunks: true, + chunkRelations: true, + chunkModules: true, + dependentModules: true, + chunkOrigins: true, + depth: true, + env: true, + reasons: true, + usedExports: true, + providedExports: true, + optimizationBailout: true, + errorDetails: true, + errorStack: true, + publicPath: true, + logging: "verbose", + orphanModules: true, + runtimeModules: true, + exclude: false, + modulesSpace: Infinity, + assetsSpace: Infinity, + children: true + }, + detailed: { + hash: true, + builtAt: true, + relatedAssets: true, + entrypoints: true, + chunkGroups: true, + ids: true, + chunks: true, + chunkRelations: true, + chunkModules: false, + chunkOrigins: true, + depth: true, + usedExports: true, + providedExports: true, + optimizationBailout: true, + errorDetails: true, + publicPath: true, + logging: true, + runtimeModules: true, + exclude: false, + modulesSpace: Infinity, + assetsSpace: Infinity + }, + minimal: { + all: false, + version: true, + timings: true, + modules: true, + modulesSpace: 0, + assets: true, + assetsSpace: 0, + errors: true, + errorsCount: true, + warnings: true, + warningsCount: true, + logging: "warn" + }, + "errors-only": { + all: false, + errors: true, + errorsCount: true, + moduleTrace: true, + logging: "error" + }, + "errors-warnings": { + all: false, + errors: true, + errorsCount: true, + warnings: true, + warningsCount: true, + logging: "warn" + }, + summary: { + all: false, + version: true, + errorsCount: true, + warningsCount: true + }, + none: { + all: false + } +}; + +const NORMAL_ON = ({ all }) => all !== false; +const NORMAL_OFF = ({ all }) => all === true; +const ON_FOR_TO_STRING = ({ all }, { forToString }) => + forToString ? all !== false : all === true; +const OFF_FOR_TO_STRING = ({ all }, { forToString }) => + forToString ? all === true : all !== false; + +/** @type {Record any>} */ +const DEFAULTS = { + context: (options, context, compilation) => compilation.compiler.context, + requestShortener: (options, context, compilation) => + compilation.compiler.context === options.context + ? compilation.requestShortener + : new RequestShortener(options.context, compilation.compiler.root), + performance: NORMAL_ON, + hash: OFF_FOR_TO_STRING, + env: NORMAL_OFF, + version: NORMAL_ON, + timings: NORMAL_ON, + builtAt: OFF_FOR_TO_STRING, + assets: NORMAL_ON, + entrypoints: ({ all }, { forToString }) => { + if (all === false) return false; + if (all === true) return true; + if (forToString) return "auto"; + return true; + }, + chunkGroups: OFF_FOR_TO_STRING, + chunkGroupAuxiliary: OFF_FOR_TO_STRING, + chunkGroupChildren: OFF_FOR_TO_STRING, + chunkGroupMaxAssets: (o, { forToString }) => (forToString ? 5 : Infinity), + chunks: OFF_FOR_TO_STRING, + chunkRelations: OFF_FOR_TO_STRING, + chunkModules: ({ all, modules }) => { + if (all === false) return false; + if (all === true) return true; + if (modules) return false; + return true; + }, + dependentModules: OFF_FOR_TO_STRING, + chunkOrigins: OFF_FOR_TO_STRING, + ids: OFF_FOR_TO_STRING, + modules: ({ all, chunks, chunkModules }, { forToString }) => { + if (all === false) return false; + if (all === true) return true; + if (forToString && chunks && chunkModules) return false; + return true; + }, + nestedModules: OFF_FOR_TO_STRING, + groupModulesByType: ON_FOR_TO_STRING, + groupModulesByCacheStatus: ON_FOR_TO_STRING, + groupModulesByLayer: ON_FOR_TO_STRING, + groupModulesByAttributes: ON_FOR_TO_STRING, + groupModulesByPath: ON_FOR_TO_STRING, + groupModulesByExtension: ON_FOR_TO_STRING, + modulesSpace: (o, { forToString }) => (forToString ? 15 : Infinity), + chunkModulesSpace: (o, { forToString }) => (forToString ? 10 : Infinity), + nestedModulesSpace: (o, { forToString }) => (forToString ? 10 : Infinity), + relatedAssets: OFF_FOR_TO_STRING, + groupAssetsByEmitStatus: ON_FOR_TO_STRING, + groupAssetsByInfo: ON_FOR_TO_STRING, + groupAssetsByPath: ON_FOR_TO_STRING, + groupAssetsByExtension: ON_FOR_TO_STRING, + groupAssetsByChunk: ON_FOR_TO_STRING, + assetsSpace: (o, { forToString }) => (forToString ? 15 : Infinity), + orphanModules: OFF_FOR_TO_STRING, + runtimeModules: ({ all, runtime }, { forToString }) => + runtime !== undefined + ? runtime + : forToString + ? all === true + : all !== false, + cachedModules: ({ all, cached }, { forToString }) => + cached !== undefined ? cached : forToString ? all === true : all !== false, + moduleAssets: OFF_FOR_TO_STRING, + depth: OFF_FOR_TO_STRING, + cachedAssets: OFF_FOR_TO_STRING, + reasons: OFF_FOR_TO_STRING, + usedExports: OFF_FOR_TO_STRING, + providedExports: OFF_FOR_TO_STRING, + optimizationBailout: OFF_FOR_TO_STRING, + children: OFF_FOR_TO_STRING, + source: NORMAL_OFF, + moduleTrace: NORMAL_ON, + errors: NORMAL_ON, + errorsCount: NORMAL_ON, + errorDetails: OFF_FOR_TO_STRING, + errorStack: OFF_FOR_TO_STRING, + warnings: NORMAL_ON, + warningsCount: NORMAL_ON, + publicPath: OFF_FOR_TO_STRING, + logging: ({ all }, { forToString }) => + forToString && all !== false ? "info" : false, + loggingDebug: () => [], + loggingTrace: OFF_FOR_TO_STRING, + excludeModules: () => [], + excludeAssets: () => [], + modulesSort: () => "depth", + chunkModulesSort: () => "name", + nestedModulesSort: () => false, + chunksSort: () => false, + assetsSort: () => "!size", + outputPath: OFF_FOR_TO_STRING, + colors: () => false +}; + +const normalizeFilter = item => { + if (typeof item === "string") { + const regExp = new RegExp( + `[\\\\/]${item.replace( + // eslint-disable-next-line no-useless-escape + /[-[\]{}()*+?.\\^$|]/g, + "\\$&" + )}([\\\\/]|$|!|\\?)` + ); + return ident => regExp.test(ident); + } + if (item && typeof item === "object" && typeof item.test === "function") { + return ident => item.test(ident); + } + if (typeof item === "function") { + return item; + } + if (typeof item === "boolean") { + return () => item; + } +}; + +const NORMALIZER = { + excludeModules: value => { + if (!Array.isArray(value)) { + value = value ? [value] : []; + } + return value.map(normalizeFilter); + }, + excludeAssets: value => { + if (!Array.isArray(value)) { + value = value ? [value] : []; + } + return value.map(normalizeFilter); + }, + warningsFilter: value => { + if (!Array.isArray(value)) { + value = value ? [value] : []; + } + return value.map(filter => { + if (typeof filter === "string") { + return (warning, warningString) => warningString.includes(filter); + } + if (filter instanceof RegExp) { + return (warning, warningString) => filter.test(warningString); + } + if (typeof filter === "function") { + return filter; + } + throw new Error( + `Can only filter warnings with Strings or RegExps. (Given: ${filter})` + ); + }); + }, + logging: value => { + if (value === true) value = "log"; + return value; + }, + loggingDebug: value => { + if (!Array.isArray(value)) { + value = value ? [value] : []; + } + return value.map(normalizeFilter); + } +}; + +class DefaultStatsPresetPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("DefaultStatsPresetPlugin", compilation => { + for (const key of Object.keys(NAMED_PRESETS)) { + const defaults = NAMED_PRESETS[key]; + compilation.hooks.statsPreset + .for(key) + .tap("DefaultStatsPresetPlugin", (options, context) => { + applyDefaults(options, defaults); + }); + } + compilation.hooks.statsNormalize.tap( + "DefaultStatsPresetPlugin", + (options, context) => { + for (const key of Object.keys(DEFAULTS)) { + if (options[key] === undefined) + options[key] = DEFAULTS[key](options, context, compilation); + } + for (const key of Object.keys(NORMALIZER)) { + options[key] = NORMALIZER[key](options[key]); + } + } + ); + }); + } +} +module.exports = DefaultStatsPresetPlugin; + + +/***/ }), + +/***/ 62261: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("./StatsPrinter")} StatsPrinter */ +/** @typedef {import("./StatsPrinter").StatsPrinterContext} StatsPrinterContext */ + +const plural = (n, singular, plural) => (n === 1 ? singular : plural); + +const printSizes = (sizes, { formatSize = n => `${n}` }) => { + const keys = Object.keys(sizes); + if (keys.length > 1) { + return keys.map(key => `${formatSize(sizes[key])} (${key})`).join(" "); + } else if (keys.length === 1) { + return formatSize(sizes[keys[0]]); + } +}; + +const mapLines = (str, fn) => str.split("\n").map(fn).join("\n"); + +/** + * @param {number} n a number + * @returns {string} number as two digit string, leading 0 + */ +const twoDigit = n => (n >= 10 ? `${n}` : `0${n}`); + +const isValidId = id => { + return typeof id === "number" || id; +}; + +/** @type {Record string | void>} */ +const SIMPLE_PRINTERS = { + "compilation.summary!": ( + _, + { + type, + bold, + green, + red, + yellow, + formatDateTime, + formatTime, + compilation: { + name, + hash, + version, + time, + builtAt, + errorsCount, + warningsCount + } + } + ) => { + const root = type === "compilation.summary!"; + const warningsMessage = + warningsCount > 0 + ? yellow( + `${warningsCount} ${plural(warningsCount, "warning", "warnings")}` + ) + : ""; + const errorsMessage = + errorsCount > 0 + ? red(`${errorsCount} ${plural(errorsCount, "error", "errors")}`) + : ""; + const timeMessage = root && time ? ` in ${formatTime(time)}` : ""; + const hashMessage = hash ? ` (${hash})` : ""; + const builtAtMessage = + root && builtAt ? `${formatDateTime(builtAt)}: ` : ""; + const versionMessage = root && version ? `webpack ${version}` : ""; + const nameMessage = + root && name + ? bold(name) + : name + ? `Child ${bold(name)}` + : root + ? "" + : "Child"; + const subjectMessage = + nameMessage && versionMessage + ? `${nameMessage} (${versionMessage})` + : versionMessage || nameMessage || "webpack"; + let statusMessage; + if (errorsMessage && warningsMessage) { + statusMessage = `compiled with ${errorsMessage} and ${warningsMessage}`; + } else if (errorsMessage) { + statusMessage = `compiled with ${errorsMessage}`; + } else if (warningsMessage) { + statusMessage = `compiled with ${warningsMessage}`; + } else if (errorsCount === 0 && warningsCount === 0) { + statusMessage = `compiled ${green("successfully")}`; + } else { + statusMessage = `compiled`; + } + if ( + builtAtMessage || + versionMessage || + errorsMessage || + warningsMessage || + timeMessage || + hashMessage + ) + return `${builtAtMessage}${subjectMessage} ${statusMessage}${timeMessage}${hashMessage}`; + }, + "compilation.env": (env, { bold }) => + env + ? `Environment (--env): ${bold(JSON.stringify(env, null, 2))}` + : undefined, + "compilation.publicPath": (publicPath, { bold }) => + `PublicPath: ${bold(publicPath || "(none)")}`, + "compilation.entrypoints": (entrypoints, context, printer) => + Array.isArray(entrypoints) + ? undefined + : printer.print(context.type, Object.values(entrypoints), { + ...context, + chunkGroupKind: "Entrypoint" + }), + "compilation.namedChunkGroups": (namedChunkGroups, context, printer) => { + if (!Array.isArray(namedChunkGroups)) { + const { + compilation: { entrypoints } + } = context; + let chunkGroups = Object.values(namedChunkGroups); + if (entrypoints) { + chunkGroups = chunkGroups.filter( + group => + !Object.prototype.hasOwnProperty.call(entrypoints, group.name) + ); + } + return printer.print(context.type, chunkGroups, { + ...context, + chunkGroupKind: "Chunk Group" + }); + } + }, + "compilation.assetsByChunkName": () => "", + + "compilation.filteredModules": filteredModules => + filteredModules > 0 + ? `${filteredModules} ${plural(filteredModules, "module", "modules")}` + : undefined, + "compilation.filteredAssets": (filteredAssets, { compilation: { assets } }) => + filteredAssets > 0 + ? `${filteredAssets} ${plural(filteredAssets, "asset", "assets")}` + : undefined, + "compilation.logging": (logging, context, printer) => + Array.isArray(logging) + ? undefined + : printer.print( + context.type, + Object.entries(logging).map(([name, value]) => ({ ...value, name })), + context + ), + "compilation.warningsInChildren!": (_, { yellow, compilation }) => { + if ( + !compilation.children && + compilation.warningsCount > 0 && + compilation.warnings + ) { + const childWarnings = + compilation.warningsCount - compilation.warnings.length; + if (childWarnings > 0) { + return yellow( + `${childWarnings} ${plural( + childWarnings, + "WARNING", + "WARNINGS" + )} in child compilations` + ); + } + } + }, + "compilation.errorsInChildren!": (_, { red, compilation }) => { + if ( + !compilation.children && + compilation.errorsCount > 0 && + compilation.errors + ) { + const childErrors = compilation.errorsCount - compilation.errors.length; + if (childErrors > 0) { + return red( + `${childErrors} ${plural( + childErrors, + "ERROR", + "ERRORS" + )} in child compilations` + ); + } + } + }, + + "asset.type": type => type, + "asset.name": (name, { formatFilename, asset: { isOverSizeLimit } }) => + formatFilename(name, isOverSizeLimit), + "asset.size": ( + size, + { asset: { isOverSizeLimit }, yellow, green, formatSize } + ) => (isOverSizeLimit ? yellow(formatSize(size)) : formatSize(size)), + "asset.emitted": (emitted, { green, formatFlag }) => + emitted ? green(formatFlag("emitted")) : undefined, + "asset.comparedForEmit": (comparedForEmit, { yellow, formatFlag }) => + comparedForEmit ? yellow(formatFlag("compared for emit")) : undefined, + "asset.cached": (cached, { green, formatFlag }) => + cached ? green(formatFlag("cached")) : undefined, + "asset.isOverSizeLimit": (isOverSizeLimit, { yellow, formatFlag }) => + isOverSizeLimit ? yellow(formatFlag("big")) : undefined, + + "asset.info.immutable": (immutable, { green, formatFlag }) => + immutable ? green(formatFlag("immutable")) : undefined, + "asset.info.javascriptModule": (javascriptModule, { formatFlag }) => + javascriptModule ? formatFlag("javascript module") : undefined, + "asset.info.sourceFilename": (sourceFilename, { formatFlag }) => + sourceFilename + ? formatFlag( + sourceFilename === true + ? "from source file" + : `from: ${sourceFilename}` + ) + : undefined, + "asset.info.development": (development, { green, formatFlag }) => + development ? green(formatFlag("dev")) : undefined, + "asset.info.hotModuleReplacement": ( + hotModuleReplacement, + { green, formatFlag } + ) => (hotModuleReplacement ? green(formatFlag("hmr")) : undefined), + "asset.separator!": () => "\n", + "asset.filteredRelated": (filteredRelated, { asset: { related } }) => + filteredRelated > 0 + ? `${filteredRelated} related ${plural( + filteredRelated, + "asset", + "assets" + )}` + : undefined, + "asset.filteredChildren": filteredChildren => + filteredChildren > 0 + ? `${filteredChildren} ${plural(filteredChildren, "asset", "assets")}` + : undefined, + + assetChunk: (id, { formatChunkId }) => formatChunkId(id), + + assetChunkName: name => name, + assetChunkIdHint: name => name, + + "module.type": type => (type !== "module" ? type : undefined), + "module.id": (id, { formatModuleId }) => + isValidId(id) ? formatModuleId(id) : undefined, + "module.name": (name, { bold }) => { + const [, prefix, resource] = /^(.*!)?([^!]*)$/.exec(name); + return (prefix || "") + bold(resource); + }, + "module.identifier": identifier => undefined, + "module.layer": (layer, { formatLayer }) => + layer ? formatLayer(layer) : undefined, + "module.sizes": printSizes, + "module.chunks[]": (id, { formatChunkId }) => formatChunkId(id), + "module.depth": (depth, { formatFlag }) => + depth !== null ? formatFlag(`depth ${depth}`) : undefined, + "module.cacheable": (cacheable, { formatFlag, red }) => + cacheable === false ? red(formatFlag("not cacheable")) : undefined, + "module.orphan": (orphan, { formatFlag, yellow }) => + orphan ? yellow(formatFlag("orphan")) : undefined, + "module.runtime": (runtime, { formatFlag, yellow }) => + runtime ? yellow(formatFlag("runtime")) : undefined, + "module.optional": (optional, { formatFlag, yellow }) => + optional ? yellow(formatFlag("optional")) : undefined, + "module.dependent": (dependent, { formatFlag, cyan }) => + dependent ? cyan(formatFlag("dependent")) : undefined, + "module.built": (built, { formatFlag, yellow }) => + built ? yellow(formatFlag("built")) : undefined, + "module.codeGenerated": (codeGenerated, { formatFlag, yellow }) => + codeGenerated ? yellow(formatFlag("code generated")) : undefined, + "module.cached": (cached, { formatFlag, green }) => + cached ? green(formatFlag("cached")) : undefined, + "module.assets": (assets, { formatFlag, magenta }) => + assets && assets.length + ? magenta( + formatFlag( + `${assets.length} ${plural(assets.length, "asset", "assets")}` + ) + ) + : undefined, + "module.warnings": (warnings, { formatFlag, yellow }) => + warnings === true + ? yellow(formatFlag("warnings")) + : warnings + ? yellow( + formatFlag(`${warnings} ${plural(warnings, "warning", "warnings")}`) + ) + : undefined, + "module.errors": (errors, { formatFlag, red }) => + errors === true + ? red(formatFlag("errors")) + : errors + ? red(formatFlag(`${errors} ${plural(errors, "error", "errors")}`)) + : undefined, + "module.providedExports": (providedExports, { formatFlag, cyan }) => { + if (Array.isArray(providedExports)) { + if (providedExports.length === 0) return cyan(formatFlag("no exports")); + return cyan(formatFlag(`exports: ${providedExports.join(", ")}`)); + } + }, + "module.usedExports": (usedExports, { formatFlag, cyan, module }) => { + if (usedExports !== true) { + if (usedExports === null) return cyan(formatFlag("used exports unknown")); + if (usedExports === false) return cyan(formatFlag("module unused")); + if (Array.isArray(usedExports)) { + if (usedExports.length === 0) + return cyan(formatFlag("no exports used")); + const providedExportsCount = Array.isArray(module.providedExports) + ? module.providedExports.length + : null; + if ( + providedExportsCount !== null && + providedExportsCount === module.usedExports.length + ) { + return cyan(formatFlag("all exports used")); + } else { + return cyan( + formatFlag(`only some exports used: ${usedExports.join(", ")}`) + ); + } + } + } + }, + "module.optimizationBailout[]": (optimizationBailout, { yellow }) => + yellow(optimizationBailout), + "module.issuerPath": (issuerPath, { module }) => + module.profile ? undefined : "", + "module.profile": profile => undefined, + "module.filteredModules": filteredModules => + filteredModules > 0 + ? `${filteredModules} nested ${plural( + filteredModules, + "module", + "modules" + )}` + : undefined, + "module.filteredChildren": filteredChildren => + filteredChildren > 0 + ? `${filteredChildren} ${plural(filteredChildren, "module", "modules")}` + : undefined, + "module.separator!": () => "\n", + + "moduleIssuer.id": (id, { formatModuleId }) => formatModuleId(id), + "moduleIssuer.profile.total": (value, { formatTime }) => formatTime(value), + + "moduleReason.type": type => type, + "moduleReason.userRequest": (userRequest, { cyan }) => cyan(userRequest), + "moduleReason.moduleId": (moduleId, { formatModuleId }) => + isValidId(moduleId) ? formatModuleId(moduleId) : undefined, + "moduleReason.module": (module, { magenta }) => magenta(module), + "moduleReason.loc": loc => loc, + "moduleReason.explanation": (explanation, { cyan }) => cyan(explanation), + "moduleReason.active": (active, { formatFlag }) => + active ? undefined : formatFlag("inactive"), + "moduleReason.resolvedModule": (module, { magenta }) => magenta(module), + + "module.profile.total": (value, { formatTime }) => formatTime(value), + "module.profile.resolving": (value, { formatTime }) => + `resolving: ${formatTime(value)}`, + "module.profile.restoring": (value, { formatTime }) => + `restoring: ${formatTime(value)}`, + "module.profile.integration": (value, { formatTime }) => + `integration: ${formatTime(value)}`, + "module.profile.building": (value, { formatTime }) => + `building: ${formatTime(value)}`, + "module.profile.storing": (value, { formatTime }) => + `storing: ${formatTime(value)}`, + "module.profile.additionalResolving": (value, { formatTime }) => + value ? `additional resolving: ${formatTime(value)}` : undefined, + "module.profile.additionalIntegration": (value, { formatTime }) => + value ? `additional integration: ${formatTime(value)}` : undefined, + + "chunkGroup.kind!": (_, { chunkGroupKind }) => chunkGroupKind, + "chunkGroup.separator!": () => "\n", + "chunkGroup.name": (name, { bold }) => bold(name), + "chunkGroup.isOverSizeLimit": (isOverSizeLimit, { formatFlag, yellow }) => + isOverSizeLimit ? yellow(formatFlag("big")) : undefined, + "chunkGroup.assetsSize": (size, { formatSize }) => + size ? formatSize(size) : undefined, + "chunkGroup.auxiliaryAssetsSize": (size, { formatSize }) => + size ? `(${formatSize(size)})` : undefined, + "chunkGroup.filteredAssets": n => + n > 0 ? `${n} ${plural(n, "asset", "assets")}` : undefined, + "chunkGroup.filteredAuxiliaryAssets": n => + n > 0 ? `${n} auxiliary ${plural(n, "asset", "assets")}` : undefined, + "chunkGroup.is!": () => "=", + "chunkGroupAsset.name": (asset, { green }) => green(asset), + "chunkGroupAsset.size": (size, { formatSize, chunkGroup }) => + chunkGroup.assets.length > 1 || + (chunkGroup.auxiliaryAssets && chunkGroup.auxiliaryAssets.length > 0) + ? formatSize(size) + : undefined, + "chunkGroup.children": (children, context, printer) => + Array.isArray(children) + ? undefined + : printer.print( + context.type, + Object.keys(children).map(key => ({ + type: key, + children: children[key] + })), + context + ), + "chunkGroupChildGroup.type": type => `${type}:`, + "chunkGroupChild.assets[]": (file, { formatFilename }) => + formatFilename(file), + "chunkGroupChild.chunks[]": (id, { formatChunkId }) => formatChunkId(id), + "chunkGroupChild.name": name => (name ? `(name: ${name})` : undefined), + + "chunk.id": (id, { formatChunkId }) => formatChunkId(id), + "chunk.files[]": (file, { formatFilename }) => formatFilename(file), + "chunk.names[]": name => name, + "chunk.idHints[]": name => name, + "chunk.runtime[]": name => name, + "chunk.sizes": (sizes, context) => printSizes(sizes, context), + "chunk.parents[]": (parents, context) => + context.formatChunkId(parents, "parent"), + "chunk.siblings[]": (siblings, context) => + context.formatChunkId(siblings, "sibling"), + "chunk.children[]": (children, context) => + context.formatChunkId(children, "child"), + "chunk.childrenByOrder": (childrenByOrder, context, printer) => + Array.isArray(childrenByOrder) + ? undefined + : printer.print( + context.type, + Object.keys(childrenByOrder).map(key => ({ + type: key, + children: childrenByOrder[key] + })), + context + ), + "chunk.childrenByOrder[].type": type => `${type}:`, + "chunk.childrenByOrder[].children[]": (id, { formatChunkId }) => + isValidId(id) ? formatChunkId(id) : undefined, + "chunk.entry": (entry, { formatFlag, yellow }) => + entry ? yellow(formatFlag("entry")) : undefined, + "chunk.initial": (initial, { formatFlag, yellow }) => + initial ? yellow(formatFlag("initial")) : undefined, + "chunk.rendered": (rendered, { formatFlag, green }) => + rendered ? green(formatFlag("rendered")) : undefined, + "chunk.recorded": (recorded, { formatFlag, green }) => + recorded ? green(formatFlag("recorded")) : undefined, + "chunk.reason": (reason, { yellow }) => (reason ? yellow(reason) : undefined), + "chunk.filteredModules": filteredModules => + filteredModules > 0 + ? `${filteredModules} chunk ${plural( + filteredModules, + "module", + "modules" + )}` + : undefined, + "chunk.separator!": () => "\n", + + "chunkOrigin.request": request => request, + "chunkOrigin.moduleId": (moduleId, { formatModuleId }) => + isValidId(moduleId) ? formatModuleId(moduleId) : undefined, + "chunkOrigin.moduleName": (moduleName, { bold }) => bold(moduleName), + "chunkOrigin.loc": loc => loc, + + "error.compilerPath": (compilerPath, { bold }) => + compilerPath ? bold(`(${compilerPath})`) : undefined, + "error.chunkId": (chunkId, { formatChunkId }) => + isValidId(chunkId) ? formatChunkId(chunkId) : undefined, + "error.chunkEntry": (chunkEntry, { formatFlag }) => + chunkEntry ? formatFlag("entry") : undefined, + "error.chunkInitial": (chunkInitial, { formatFlag }) => + chunkInitial ? formatFlag("initial") : undefined, + "error.file": (file, { bold }) => bold(file), + "error.moduleName": (moduleName, { bold }) => { + return moduleName.includes("!") + ? `${bold(moduleName.replace(/^(\s|\S)*!/, ""))} (${moduleName})` + : `${bold(moduleName)}`; + }, + "error.loc": (loc, { green }) => green(loc), + "error.message": (message, { bold }) => bold(message), + "error.details": details => details, + "error.stack": stack => stack, + "error.moduleTrace": moduleTrace => undefined, + "error.separator!": () => "\n", + + "loggingEntry(error).loggingEntry.message": (message, { red }) => + mapLines(message, x => ` ${red(x)}`), + "loggingEntry(warn).loggingEntry.message": (message, { yellow }) => + mapLines(message, x => ` ${yellow(x)}`), + "loggingEntry(info).loggingEntry.message": (message, { green }) => + mapLines(message, x => ` ${green(x)}`), + "loggingEntry(log).loggingEntry.message": (message, { bold }) => + mapLines(message, x => ` ${bold(x)}`), + "loggingEntry(debug).loggingEntry.message": message => + mapLines(message, x => ` ${x}`), + "loggingEntry(trace).loggingEntry.message": message => + mapLines(message, x => ` ${x}`), + "loggingEntry(status).loggingEntry.message": (message, { magenta }) => + mapLines(message, x => ` ${magenta(x)}`), + "loggingEntry(profile).loggingEntry.message": (message, { magenta }) => + mapLines(message, x => `

${magenta(x)}`), + "loggingEntry(profileEnd).loggingEntry.message": (message, { magenta }) => + mapLines(message, x => `

${magenta(x)}`), + "loggingEntry(time).loggingEntry.message": (message, { magenta }) => + mapLines(message, x => ` ${magenta(x)}`), + "loggingEntry(group).loggingEntry.message": (message, { cyan }) => + mapLines(message, x => `<-> ${cyan(x)}`), + "loggingEntry(groupCollapsed).loggingEntry.message": (message, { cyan }) => + mapLines(message, x => `<+> ${cyan(x)}`), + "loggingEntry(clear).loggingEntry": () => " -------", + "loggingEntry(groupCollapsed).loggingEntry.children": () => "", + "loggingEntry.trace[]": trace => + trace ? mapLines(trace, x => `| ${x}`) : undefined, + + "moduleTraceItem.originName": originName => originName, + + loggingGroup: loggingGroup => + loggingGroup.entries.length === 0 ? "" : undefined, + "loggingGroup.debug": (flag, { red }) => (flag ? red("DEBUG") : undefined), + "loggingGroup.name": (name, { bold }) => bold(`LOG from ${name}`), + "loggingGroup.separator!": () => "\n", + "loggingGroup.filteredEntries": filteredEntries => + filteredEntries > 0 ? `+ ${filteredEntries} hidden lines` : undefined, + + "moduleTraceDependency.loc": loc => loc +}; + +/** @type {Record} */ +const ITEM_NAMES = { + "compilation.assets[]": "asset", + "compilation.modules[]": "module", + "compilation.chunks[]": "chunk", + "compilation.entrypoints[]": "chunkGroup", + "compilation.namedChunkGroups[]": "chunkGroup", + "compilation.errors[]": "error", + "compilation.warnings[]": "error", + "compilation.logging[]": "loggingGroup", + "compilation.children[]": "compilation", + "asset.related[]": "asset", + "asset.children[]": "asset", + "asset.chunks[]": "assetChunk", + "asset.auxiliaryChunks[]": "assetChunk", + "asset.chunkNames[]": "assetChunkName", + "asset.chunkIdHints[]": "assetChunkIdHint", + "asset.auxiliaryChunkNames[]": "assetChunkName", + "asset.auxiliaryChunkIdHints[]": "assetChunkIdHint", + "chunkGroup.assets[]": "chunkGroupAsset", + "chunkGroup.auxiliaryAssets[]": "chunkGroupAsset", + "chunkGroupChild.assets[]": "chunkGroupAsset", + "chunkGroupChild.auxiliaryAssets[]": "chunkGroupAsset", + "chunkGroup.children[]": "chunkGroupChildGroup", + "chunkGroupChildGroup.children[]": "chunkGroupChild", + "module.modules[]": "module", + "module.children[]": "module", + "module.reasons[]": "moduleReason", + "module.issuerPath[]": "moduleIssuer", + "chunk.origins[]": "chunkOrigin", + "chunk.modules[]": "module", + "loggingGroup.entries[]": logEntry => + `loggingEntry(${logEntry.type}).loggingEntry`, + "loggingEntry.children[]": logEntry => + `loggingEntry(${logEntry.type}).loggingEntry`, + "error.moduleTrace[]": "moduleTraceItem", + "moduleTraceItem.dependencies[]": "moduleTraceDependency" +}; + +const ERROR_PREFERRED_ORDER = [ + "compilerPath", + "chunkId", + "chunkEntry", + "chunkInitial", + "file", + "separator!", + "moduleName", + "loc", + "separator!", + "message", + "separator!", + "details", + "separator!", + "stack", + "separator!", + "missing", + "separator!", + "moduleTrace" +]; + +/** @type {Record} */ +const PREFERRED_ORDERS = { + compilation: [ + "name", + "hash", + "version", + "time", + "builtAt", + "env", + "publicPath", + "assets", + "filteredAssets", + "entrypoints", + "namedChunkGroups", + "chunks", + "modules", + "filteredModules", + "children", + "logging", + "warnings", + "warningsInChildren!", + "errors", + "errorsInChildren!", + "summary!", + "needAdditionalPass" + ], + asset: [ + "type", + "name", + "size", + "chunks", + "auxiliaryChunks", + "emitted", + "comparedForEmit", + "cached", + "info", + "isOverSizeLimit", + "chunkNames", + "auxiliaryChunkNames", + "chunkIdHints", + "auxiliaryChunkIdHints", + "related", + "filteredRelated", + "children", + "filteredChildren" + ], + "asset.info": [ + "immutable", + "sourceFilename", + "javascriptModule", + "development", + "hotModuleReplacement" + ], + chunkGroup: [ + "kind!", + "name", + "isOverSizeLimit", + "assetsSize", + "auxiliaryAssetsSize", + "is!", + "assets", + "filteredAssets", + "auxiliaryAssets", + "filteredAuxiliaryAssets", + "separator!", + "children" + ], + chunkGroupAsset: ["name", "size"], + chunkGroupChildGroup: ["type", "children"], + chunkGroupChild: ["assets", "chunks", "name"], + module: [ + "type", + "name", + "identifier", + "id", + "layer", + "sizes", + "chunks", + "depth", + "cacheable", + "orphan", + "runtime", + "optional", + "dependent", + "built", + "codeGenerated", + "cached", + "assets", + "failed", + "warnings", + "errors", + "children", + "filteredChildren", + "providedExports", + "usedExports", + "optimizationBailout", + "reasons", + "issuerPath", + "profile", + "modules", + "filteredModules" + ], + moduleReason: [ + "active", + "type", + "userRequest", + "moduleId", + "module", + "resolvedModule", + "loc", + "explanation" + ], + "module.profile": [ + "total", + "separator!", + "resolving", + "restoring", + "integration", + "building", + "storing", + "additionalResolving", + "additionalIntegration" + ], + chunk: [ + "id", + "runtime", + "files", + "names", + "idHints", + "sizes", + "parents", + "siblings", + "children", + "childrenByOrder", + "entry", + "initial", + "rendered", + "recorded", + "reason", + "separator!", + "origins", + "separator!", + "modules", + "separator!", + "filteredModules" + ], + chunkOrigin: ["request", "moduleId", "moduleName", "loc"], + error: ERROR_PREFERRED_ORDER, + warning: ERROR_PREFERRED_ORDER, + "chunk.childrenByOrder[]": ["type", "children"], + loggingGroup: [ + "debug", + "name", + "separator!", + "entries", + "separator!", + "filteredEntries" + ], + loggingEntry: ["message", "trace", "children"] +}; + +const itemsJoinOneLine = items => items.filter(Boolean).join(" "); +const itemsJoinOneLineBrackets = items => + items.length > 0 ? `(${items.filter(Boolean).join(" ")})` : undefined; +const itemsJoinMoreSpacing = items => items.filter(Boolean).join("\n\n"); +const itemsJoinComma = items => items.filter(Boolean).join(", "); +const itemsJoinCommaBrackets = items => + items.length > 0 ? `(${items.filter(Boolean).join(", ")})` : undefined; +const itemsJoinCommaBracketsWithName = name => items => + items.length > 0 + ? `(${name}: ${items.filter(Boolean).join(", ")})` + : undefined; + +/** @type {Record string>} */ +const SIMPLE_ITEMS_JOINER = { + "chunk.parents": itemsJoinOneLine, + "chunk.siblings": itemsJoinOneLine, + "chunk.children": itemsJoinOneLine, + "chunk.names": itemsJoinCommaBrackets, + "chunk.idHints": itemsJoinCommaBracketsWithName("id hint"), + "chunk.runtime": itemsJoinCommaBracketsWithName("runtime"), + "chunk.files": itemsJoinComma, + "chunk.childrenByOrder": itemsJoinOneLine, + "chunk.childrenByOrder[].children": itemsJoinOneLine, + "chunkGroup.assets": itemsJoinOneLine, + "chunkGroup.auxiliaryAssets": itemsJoinOneLineBrackets, + "chunkGroupChildGroup.children": itemsJoinComma, + "chunkGroupChild.assets": itemsJoinOneLine, + "chunkGroupChild.auxiliaryAssets": itemsJoinOneLineBrackets, + "asset.chunks": itemsJoinComma, + "asset.auxiliaryChunks": itemsJoinCommaBrackets, + "asset.chunkNames": itemsJoinCommaBracketsWithName("name"), + "asset.auxiliaryChunkNames": itemsJoinCommaBracketsWithName("auxiliary name"), + "asset.chunkIdHints": itemsJoinCommaBracketsWithName("id hint"), + "asset.auxiliaryChunkIdHints": itemsJoinCommaBracketsWithName( + "auxiliary id hint" + ), + "module.chunks": itemsJoinOneLine, + "module.issuerPath": items => + items + .filter(Boolean) + .map(item => `${item} ->`) + .join(" "), + "compilation.errors": itemsJoinMoreSpacing, + "compilation.warnings": itemsJoinMoreSpacing, + "compilation.logging": itemsJoinMoreSpacing, + "compilation.children": items => indent(itemsJoinMoreSpacing(items), " "), + "moduleTraceItem.dependencies": itemsJoinOneLine, + "loggingEntry.children": items => + indent(items.filter(Boolean).join("\n"), " ", false) +}; + +const joinOneLine = items => + items + .map(item => item.content) + .filter(Boolean) + .join(" "); + +const joinInBrackets = items => { + const res = []; + let mode = 0; + for (const item of items) { + if (item.element === "separator!") { + switch (mode) { + case 0: + case 1: + mode += 2; + break; + case 4: + res.push(")"); + mode = 3; + break; + } + } + if (!item.content) continue; + switch (mode) { + case 0: + mode = 1; + break; + case 1: + res.push(" "); + break; + case 2: + res.push("("); + mode = 4; + break; + case 3: + res.push(" ("); + mode = 4; + break; + case 4: + res.push(", "); + break; + } + res.push(item.content); + } + if (mode === 4) res.push(")"); + return res.join(""); +}; + +const indent = (str, prefix, noPrefixInFirstLine) => { + const rem = str.replace(/\n([^\n])/g, "\n" + prefix + "$1"); + if (noPrefixInFirstLine) return rem; + const ind = str[0] === "\n" ? "" : prefix; + return ind + rem; +}; + +const joinExplicitNewLine = (items, indenter) => { + let firstInLine = true; + let first = true; + return items + .map(item => { + if (!item || !item.content) return; + let content = indent(item.content, first ? "" : indenter, !firstInLine); + if (firstInLine) { + content = content.replace(/^\n+/, ""); + } + if (!content) return; + first = false; + const noJoiner = firstInLine || content.startsWith("\n"); + firstInLine = content.endsWith("\n"); + return noJoiner ? content : " " + content; + }) + .filter(Boolean) + .join("") + .trim(); +}; + +const joinError = error => (items, { red, yellow }) => + `${error ? red("ERROR") : yellow("WARNING")} in ${joinExplicitNewLine( + items, + "" + )}`; + +/** @type {Record string>} */ +const SIMPLE_ELEMENT_JOINERS = { + compilation: items => { + const result = []; + let lastNeedMore = false; + for (const item of items) { + if (!item.content) continue; + const needMoreSpace = + item.element === "warnings" || + item.element === "errors" || + item.element === "logging"; + if (result.length !== 0) { + result.push(needMoreSpace || lastNeedMore ? "\n\n" : "\n"); + } + result.push(item.content); + lastNeedMore = needMoreSpace; + } + if (lastNeedMore) result.push("\n"); + return result.join(""); + }, + asset: items => + joinExplicitNewLine( + items.map(item => { + if ( + (item.element === "related" || item.element === "children") && + item.content + ) { + return { + ...item, + content: `\n${item.content}\n` + }; + } + return item; + }), + " " + ), + "asset.info": joinOneLine, + module: (items, { module }) => { + let hasName = false; + return joinExplicitNewLine( + items.map(item => { + switch (item.element) { + case "id": + if (module.id === module.name) { + if (hasName) return false; + if (item.content) hasName = true; + } + break; + case "name": + if (hasName) return false; + if (item.content) hasName = true; + break; + case "providedExports": + case "usedExports": + case "optimizationBailout": + case "reasons": + case "issuerPath": + case "profile": + case "children": + case "modules": + if (item.content) { + return { + ...item, + content: `\n${item.content}\n` + }; + } + break; + } + return item; + }), + " " + ); + }, + chunk: items => { + let hasEntry = false; + return ( + "chunk " + + joinExplicitNewLine( + items.filter(item => { + switch (item.element) { + case "entry": + if (item.content) hasEntry = true; + break; + case "initial": + if (hasEntry) return false; + break; + } + return true; + }), + " " + ) + ); + }, + "chunk.childrenByOrder[]": items => `(${joinOneLine(items)})`, + chunkGroup: items => joinExplicitNewLine(items, " "), + chunkGroupAsset: joinOneLine, + chunkGroupChildGroup: joinOneLine, + chunkGroupChild: joinOneLine, + moduleReason: (items, { moduleReason }) => { + let hasName = false; + return joinOneLine( + items.filter(item => { + switch (item.element) { + case "moduleId": + if (moduleReason.moduleId === moduleReason.module && item.content) + hasName = true; + break; + case "module": + if (hasName) return false; + break; + case "resolvedModule": + return ( + moduleReason.module !== moduleReason.resolvedModule && + item.content + ); + } + return true; + }) + ); + }, + "module.profile": joinInBrackets, + moduleIssuer: joinOneLine, + chunkOrigin: items => "> " + joinOneLine(items), + "errors[].error": joinError(true), + "warnings[].error": joinError(false), + loggingGroup: items => joinExplicitNewLine(items, "").trimRight(), + moduleTraceItem: items => " @ " + joinOneLine(items), + moduleTraceDependency: joinOneLine +}; + +const AVAILABLE_COLORS = { + bold: "\u001b[1m", + yellow: "\u001b[1m\u001b[33m", + red: "\u001b[1m\u001b[31m", + green: "\u001b[1m\u001b[32m", + cyan: "\u001b[1m\u001b[36m", + magenta: "\u001b[1m\u001b[35m" +}; + +const AVAILABLE_FORMATS = { + formatChunkId: (id, { yellow }, direction) => { + switch (direction) { + case "parent": + return `<{${yellow(id)}}>`; + case "sibling": + return `={${yellow(id)}}=`; + case "child": + return `>{${yellow(id)}}<`; + default: + return `{${yellow(id)}}`; + } + }, + formatModuleId: id => `[${id}]`, + formatFilename: (filename, { green, yellow }, oversize) => + (oversize ? yellow : green)(filename), + formatFlag: flag => `[${flag}]`, + formatLayer: layer => `(in ${layer})`, + formatSize: __webpack_require__(50787).formatSize, + formatDateTime: (dateTime, { bold }) => { + const d = new Date(dateTime); + const x = twoDigit; + const date = `${d.getFullYear()}-${x(d.getMonth() + 1)}-${x(d.getDate())}`; + const time = `${x(d.getHours())}:${x(d.getMinutes())}:${x(d.getSeconds())}`; + return `${date} ${bold(time)}`; + }, + formatTime: ( + time, + { timeReference, bold, green, yellow, red }, + boldQuantity + ) => { + const unit = " ms"; + if (timeReference && time !== timeReference) { + const times = [ + timeReference / 2, + timeReference / 4, + timeReference / 8, + timeReference / 16 + ]; + if (time < times[3]) return `${time}${unit}`; + else if (time < times[2]) return bold(`${time}${unit}`); + else if (time < times[1]) return green(`${time}${unit}`); + else if (time < times[0]) return yellow(`${time}${unit}`); + else return red(`${time}${unit}`); + } else { + return `${boldQuantity ? bold(time) : time}${unit}`; + } + } +}; + +const RESULT_MODIFIER = { + "module.modules": result => { + return indent(result, "| "); + } +}; + +const createOrder = (array, preferredOrder) => { + const originalArray = array.slice(); + const set = new Set(array); + const usedSet = new Set(); + array.length = 0; + for (const element of preferredOrder) { + if (element.endsWith("!") || set.has(element)) { + array.push(element); + usedSet.add(element); + } + } + for (const element of originalArray) { + if (!usedSet.has(element)) { + array.push(element); + } + } + return array; +}; + +class DefaultStatsPrinterPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("DefaultStatsPrinterPlugin", compilation => { + compilation.hooks.statsPrinter.tap( + "DefaultStatsPrinterPlugin", + (stats, options, context) => { + // Put colors into context + stats.hooks.print + .for("compilation") + .tap("DefaultStatsPrinterPlugin", (compilation, context) => { + for (const color of Object.keys(AVAILABLE_COLORS)) { + let start; + if (options.colors) { + if ( + typeof options.colors === "object" && + typeof options.colors[color] === "string" + ) { + start = options.colors[color]; + } else { + start = AVAILABLE_COLORS[color]; + } + } + if (start) { + context[color] = str => `${start}${str}\u001b[39m\u001b[22m`; + } else { + context[color] = str => str; + } + } + for (const format of Object.keys(AVAILABLE_FORMATS)) { + context[format] = (content, ...args) => + AVAILABLE_FORMATS[format](content, context, ...args); + } + context.timeReference = compilation.time; + }); + + for (const key of Object.keys(SIMPLE_PRINTERS)) { + stats.hooks.print + .for(key) + .tap("DefaultStatsPrinterPlugin", (obj, ctx) => + SIMPLE_PRINTERS[key](obj, ctx, stats) + ); + } + + for (const key of Object.keys(PREFERRED_ORDERS)) { + const preferredOrder = PREFERRED_ORDERS[key]; + stats.hooks.sortElements + .for(key) + .tap("DefaultStatsPrinterPlugin", (elements, context) => { + createOrder(elements, preferredOrder); + }); + } + + for (const key of Object.keys(ITEM_NAMES)) { + const itemName = ITEM_NAMES[key]; + stats.hooks.getItemName + .for(key) + .tap( + "DefaultStatsPrinterPlugin", + typeof itemName === "string" ? () => itemName : itemName + ); + } + + for (const key of Object.keys(SIMPLE_ITEMS_JOINER)) { + const joiner = SIMPLE_ITEMS_JOINER[key]; + stats.hooks.printItems + .for(key) + .tap("DefaultStatsPrinterPlugin", joiner); + } + + for (const key of Object.keys(SIMPLE_ELEMENT_JOINERS)) { + const joiner = SIMPLE_ELEMENT_JOINERS[key]; + stats.hooks.printElements + .for(key) + .tap("DefaultStatsPrinterPlugin", joiner); + } + + for (const key of Object.keys(RESULT_MODIFIER)) { + const modifier = RESULT_MODIFIER[key]; + stats.hooks.result + .for(key) + .tap("DefaultStatsPrinterPlugin", modifier); + } + } + ); + }); + } +} +module.exports = DefaultStatsPrinterPlugin; + + +/***/ }), + +/***/ 18027: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { HookMap, SyncBailHook, SyncWaterfallHook } = __webpack_require__(18416); +const { concatComparators, keepOriginalOrder } = __webpack_require__(21699); +const smartGrouping = __webpack_require__(17824); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../WebpackError")} WebpackError */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +/** @typedef {import("../util/smartGrouping").GroupConfig} GroupConfig */ + +/** + * @typedef {Object} KnownStatsFactoryContext + * @property {string} type + * @property {function(string): string=} makePathsRelative + * @property {Compilation=} compilation + * @property {Set=} rootModules + * @property {Map=} compilationFileToChunks + * @property {Map=} compilationAuxiliaryFileToChunks + * @property {RuntimeSpec=} runtime + * @property {function(Compilation): WebpackError[]=} cachedGetErrors + * @property {function(Compilation): WebpackError[]=} cachedGetWarnings + */ + +/** @typedef {KnownStatsFactoryContext & Record} StatsFactoryContext */ + +class StatsFactory { + constructor() { + this.hooks = Object.freeze({ + /** @type {HookMap>} */ + extract: new HookMap( + () => new SyncBailHook(["object", "data", "context"]) + ), + /** @type {HookMap>} */ + filter: new HookMap( + () => new SyncBailHook(["item", "context", "index", "unfilteredIndex"]) + ), + /** @type {HookMap>} */ + sort: new HookMap(() => new SyncBailHook(["comparators", "context"])), + /** @type {HookMap>} */ + filterSorted: new HookMap( + () => new SyncBailHook(["item", "context", "index", "unfilteredIndex"]) + ), + /** @type {HookMap>} */ + groupResults: new HookMap( + () => new SyncBailHook(["groupConfigs", "context"]) + ), + /** @type {HookMap>} */ + sortResults: new HookMap( + () => new SyncBailHook(["comparators", "context"]) + ), + /** @type {HookMap>} */ + filterResults: new HookMap( + () => new SyncBailHook(["item", "context", "index", "unfilteredIndex"]) + ), + /** @type {HookMap>} */ + merge: new HookMap(() => new SyncBailHook(["items", "context"])), + /** @type {HookMap>} */ + result: new HookMap(() => new SyncWaterfallHook(["result", "context"])), + /** @type {HookMap>} */ + getItemName: new HookMap(() => new SyncBailHook(["item", "context"])), + /** @type {HookMap>} */ + getItemFactory: new HookMap(() => new SyncBailHook(["item", "context"])) + }); + const hooks = this.hooks; + this._caches = /** @type {Record[]>>} */ ({}); + for (const key of Object.keys(hooks)) { + this._caches[key] = new Map(); + } + this._inCreate = false; + } + + _getAllLevelHooks(hookMap, cache, type) { + const cacheEntry = cache.get(type); + if (cacheEntry !== undefined) { + return cacheEntry; + } + const hooks = []; + const typeParts = type.split("."); + for (let i = 0; i < typeParts.length; i++) { + const hook = hookMap.get(typeParts.slice(i).join(".")); + if (hook) { + hooks.push(hook); + } + } + cache.set(type, hooks); + return hooks; + } + + _forEachLevel(hookMap, cache, type, fn) { + for (const hook of this._getAllLevelHooks(hookMap, cache, type)) { + const result = fn(hook); + if (result !== undefined) return result; + } + } + + _forEachLevelWaterfall(hookMap, cache, type, data, fn) { + for (const hook of this._getAllLevelHooks(hookMap, cache, type)) { + data = fn(hook, data); + } + return data; + } + + _forEachLevelFilter(hookMap, cache, type, items, fn, forceClone) { + const hooks = this._getAllLevelHooks(hookMap, cache, type); + if (hooks.length === 0) return forceClone ? items.slice() : items; + let i = 0; + return items.filter((item, idx) => { + for (const hook of hooks) { + const r = fn(hook, item, idx, i); + if (r !== undefined) { + if (r) i++; + return r; + } + } + i++; + return true; + }); + } + + /** + * @param {string} type type + * @param {any} data factory data + * @param {Omit} baseContext context used as base + * @returns {any} created object + */ + create(type, data, baseContext) { + if (this._inCreate) { + return this._create(type, data, baseContext); + } else { + try { + this._inCreate = true; + return this._create(type, data, baseContext); + } finally { + for (const key of Object.keys(this._caches)) this._caches[key].clear(); + this._inCreate = false; + } + } + } + + _create(type, data, baseContext) { + const context = { + ...baseContext, + type, + [type]: data + }; + if (Array.isArray(data)) { + // run filter on unsorted items + const items = this._forEachLevelFilter( + this.hooks.filter, + this._caches.filter, + type, + data, + (h, r, idx, i) => h.call(r, context, idx, i), + true + ); + + // sort items + const comparators = []; + this._forEachLevel(this.hooks.sort, this._caches.sort, type, h => + h.call(comparators, context) + ); + if (comparators.length > 0) { + items.sort( + // @ts-expect-error number of arguments is correct + concatComparators(...comparators, keepOriginalOrder(items)) + ); + } + + // run filter on sorted items + const items2 = this._forEachLevelFilter( + this.hooks.filterSorted, + this._caches.filterSorted, + type, + items, + (h, r, idx, i) => h.call(r, context, idx, i), + false + ); + + // for each item + let resultItems = items2.map((item, i) => { + const itemContext = { + ...context, + _index: i + }; + + // run getItemName + const itemName = this._forEachLevel( + this.hooks.getItemName, + this._caches.getItemName, + `${type}[]`, + h => h.call(item, itemContext) + ); + if (itemName) itemContext[itemName] = item; + const innerType = itemName ? `${type}[].${itemName}` : `${type}[]`; + + // run getItemFactory + const itemFactory = + this._forEachLevel( + this.hooks.getItemFactory, + this._caches.getItemFactory, + innerType, + h => h.call(item, itemContext) + ) || this; + + // run item factory + return itemFactory.create(innerType, item, itemContext); + }); + + // sort result items + const comparators2 = []; + this._forEachLevel( + this.hooks.sortResults, + this._caches.sortResults, + type, + h => h.call(comparators2, context) + ); + if (comparators2.length > 0) { + resultItems.sort( + // @ts-expect-error number of arguments is correct + concatComparators(...comparators2, keepOriginalOrder(resultItems)) + ); + } + + // group result items + const groupConfigs = []; + this._forEachLevel( + this.hooks.groupResults, + this._caches.groupResults, + type, + h => h.call(groupConfigs, context) + ); + if (groupConfigs.length > 0) { + resultItems = smartGrouping(resultItems, groupConfigs); + } + + // run filter on sorted result items + const finalResultItems = this._forEachLevelFilter( + this.hooks.filterResults, + this._caches.filterResults, + type, + resultItems, + (h, r, idx, i) => h.call(r, context, idx, i), + false + ); + + // run merge on mapped items + let result = this._forEachLevel( + this.hooks.merge, + this._caches.merge, + type, + h => h.call(finalResultItems, context) + ); + if (result === undefined) result = finalResultItems; + + // run result on merged items + return this._forEachLevelWaterfall( + this.hooks.result, + this._caches.result, + type, + result, + (h, r) => h.call(r, context) + ); + } else { + const object = {}; + + // run extract on value + this._forEachLevel(this.hooks.extract, this._caches.extract, type, h => + h.call(object, data, context) + ); + + // run result on extracted object + return this._forEachLevelWaterfall( + this.hooks.result, + this._caches.result, + type, + object, + (h, r) => h.call(r, context) + ); + } + } +} +module.exports = StatsFactory; + + +/***/ }), + +/***/ 28931: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { HookMap, SyncWaterfallHook, SyncBailHook } = __webpack_require__(18416); + +/** @template T @typedef {import("tapable").AsArray} AsArray */ +/** @typedef {import("tapable").Hook} Hook */ + +/** + * @typedef {Object} PrintedElement + * @property {string} element + * @property {string} content + */ + +/** + * @typedef {Object} KnownStatsPrinterContext + * @property {string=} type + * @property {Object=} compilation + * @property {Object=} chunkGroup + * @property {Object=} asset + * @property {Object=} module + * @property {Object=} chunk + * @property {Object=} moduleReason + * @property {(str: string) => string=} bold + * @property {(str: string) => string=} yellow + * @property {(str: string) => string=} red + * @property {(str: string) => string=} green + * @property {(str: string) => string=} magenta + * @property {(str: string) => string=} cyan + * @property {(file: string, oversize?: boolean) => string=} formatFilename + * @property {(id: string) => string=} formatModuleId + * @property {(id: string, direction?: "parent"|"child"|"sibling") => string=} formatChunkId + * @property {(size: number) => string=} formatSize + * @property {(dateTime: number) => string=} formatDateTime + * @property {(flag: string) => string=} formatFlag + * @property {(time: number, boldQuantity?: boolean) => string=} formatTime + * @property {string=} chunkGroupKind + */ + +/** @typedef {KnownStatsPrinterContext & Record} StatsPrinterContext */ + +class StatsPrinter { + constructor() { + this.hooks = Object.freeze({ + /** @type {HookMap>} */ + sortElements: new HookMap( + () => new SyncBailHook(["elements", "context"]) + ), + /** @type {HookMap>} */ + printElements: new HookMap( + () => new SyncBailHook(["printedElements", "context"]) + ), + /** @type {HookMap>} */ + sortItems: new HookMap(() => new SyncBailHook(["items", "context"])), + /** @type {HookMap>} */ + getItemName: new HookMap(() => new SyncBailHook(["item", "context"])), + /** @type {HookMap>} */ + printItems: new HookMap( + () => new SyncBailHook(["printedItems", "context"]) + ), + /** @type {HookMap>} */ + print: new HookMap(() => new SyncBailHook(["object", "context"])), + /** @type {HookMap>} */ + result: new HookMap(() => new SyncWaterfallHook(["result", "context"])) + }); + /** @type {Map, Map>} */ + this._levelHookCache = new Map(); + this._inPrint = false; + } + + /** + * get all level hooks + * @private + * @template {Hook} T + * @param {HookMap} hookMap HookMap + * @param {string} type type + * @returns {T[]} hooks + */ + _getAllLevelHooks(hookMap, type) { + let cache = /** @type {Map} */ (this._levelHookCache.get( + hookMap + )); + if (cache === undefined) { + cache = new Map(); + this._levelHookCache.set(hookMap, cache); + } + const cacheEntry = cache.get(type); + if (cacheEntry !== undefined) { + return cacheEntry; + } + /** @type {T[]} */ + const hooks = []; + const typeParts = type.split("."); + for (let i = 0; i < typeParts.length; i++) { + const hook = hookMap.get(typeParts.slice(i).join(".")); + if (hook) { + hooks.push(hook); + } + } + cache.set(type, hooks); + return hooks; + } + + /** + * Run `fn` for each level + * @private + * @template T + * @template R + * @param {HookMap>} hookMap HookMap + * @param {string} type type + * @param {(hook: SyncBailHook) => R} fn function + * @returns {R} result of `fn` + */ + _forEachLevel(hookMap, type, fn) { + for (const hook of this._getAllLevelHooks(hookMap, type)) { + const result = fn(hook); + if (result !== undefined) return result; + } + } + + /** + * Run `fn` for each level + * @private + * @template T + * @param {HookMap>} hookMap HookMap + * @param {string} type type + * @param {AsArray[0]} data data + * @param {(hook: SyncWaterfallHook, data: AsArray[0]) => AsArray[0]} fn function + * @returns {AsArray[0]} result of `fn` + */ + _forEachLevelWaterfall(hookMap, type, data, fn) { + for (const hook of this._getAllLevelHooks(hookMap, type)) { + data = fn(hook, data); + } + return data; + } + + /** + * @param {string} type The type + * @param {Object} object Object to print + * @param {Object=} baseContext The base context + * @returns {string} printed result + */ + print(type, object, baseContext) { + if (this._inPrint) { + return this._print(type, object, baseContext); + } else { + try { + this._inPrint = true; + return this._print(type, object, baseContext); + } finally { + this._levelHookCache.clear(); + this._inPrint = false; + } + } + } + + /** + * @private + * @param {string} type type + * @param {Object} object object + * @param {Object=} baseContext context + * @returns {string} printed result + */ + _print(type, object, baseContext) { + const context = { + ...baseContext, + type, + [type]: object + }; + + let printResult = this._forEachLevel(this.hooks.print, type, hook => + hook.call(object, context) + ); + if (printResult === undefined) { + if (Array.isArray(object)) { + const sortedItems = object.slice(); + this._forEachLevel(this.hooks.sortItems, type, h => + h.call(sortedItems, context) + ); + const printedItems = sortedItems.map((item, i) => { + const itemContext = { + ...context, + _index: i + }; + const itemName = this._forEachLevel( + this.hooks.getItemName, + `${type}[]`, + h => h.call(item, itemContext) + ); + if (itemName) itemContext[itemName] = item; + return this.print( + itemName ? `${type}[].${itemName}` : `${type}[]`, + item, + itemContext + ); + }); + printResult = this._forEachLevel(this.hooks.printItems, type, h => + h.call(printedItems, context) + ); + if (printResult === undefined) { + const result = printedItems.filter(Boolean); + if (result.length > 0) printResult = result.join("\n"); + } + } else if (object !== null && typeof object === "object") { + const elements = Object.keys(object).filter( + key => object[key] !== undefined + ); + this._forEachLevel(this.hooks.sortElements, type, h => + h.call(elements, context) + ); + const printedElements = elements.map(element => { + const content = this.print(`${type}.${element}`, object[element], { + ...context, + _parent: object, + _element: element, + [element]: object[element] + }); + return { element, content }; + }); + printResult = this._forEachLevel(this.hooks.printElements, type, h => + h.call(printedElements, context) + ); + if (printResult === undefined) { + const result = printedElements.map(e => e.content).filter(Boolean); + if (result.length > 0) printResult = result.join("\n"); + } + } + } + + return this._forEachLevelWaterfall( + this.hooks.result, + type, + printResult, + (h, r) => h.call(r, context) + ); + } +} +module.exports = StatsPrinter; + + +/***/ }), + +/***/ 92459: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +exports.equals = (a, b) => { + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + return true; +}; + + +/***/ }), + +/***/ 51921: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { SyncHook, AsyncSeriesHook } = __webpack_require__(18416); + +const QUEUED_STATE = 0; +const PROCESSING_STATE = 1; +const DONE_STATE = 2; + +let inHandleResult = 0; + +/** + * @template T + * @callback Callback + * @param {Error=} err + * @param {T=} result + */ + +/** + * @template T + * @template K + * @template R + */ +class AsyncQueueEntry { + /** + * @param {T} item the item + * @param {Callback} callback the callback + */ + constructor(item, callback) { + this.item = item; + /** @type {typeof QUEUED_STATE | typeof PROCESSING_STATE | typeof DONE_STATE} */ + this.state = QUEUED_STATE; + this.callback = callback; + /** @type {Callback[] | undefined} */ + this.callbacks = undefined; + this.result = undefined; + this.error = undefined; + } +} + +/** + * @template T + * @template K + * @template R + */ +class AsyncQueue { + /** + * @param {Object} options options object + * @param {string=} options.name name of the queue + * @param {number} options.parallelism how many items should be processed at once + * @param {function(T): K=} options.getKey extract key from item + * @param {function(T, Callback): void} options.processor async function to process items + */ + constructor({ name, parallelism, processor, getKey }) { + this._name = name; + this._parallelism = parallelism; + this._processor = processor; + this._getKey = + getKey || /** @type {(T) => K} */ (item => /** @type {any} */ (item)); + /** @type {Map>} */ + this._entries = new Map(); + /** @type {AsyncQueueEntry[]} */ + this._queued = []; + this._activeTasks = 0; + this._willEnsureProcessing = false; + this._stopped = false; + + this.hooks = { + /** @type {AsyncSeriesHook<[T]>} */ + beforeAdd: new AsyncSeriesHook(["item"]), + /** @type {SyncHook<[T]>} */ + added: new SyncHook(["item"]), + /** @type {AsyncSeriesHook<[T]>} */ + beforeStart: new AsyncSeriesHook(["item"]), + /** @type {SyncHook<[T]>} */ + started: new SyncHook(["item"]), + /** @type {SyncHook<[T, Error, R]>} */ + result: new SyncHook(["item", "error", "result"]) + }; + + this._ensureProcessing = this._ensureProcessing.bind(this); + } + + /** + * @param {T} item a item + * @param {Callback} callback callback function + * @returns {void} + */ + add(item, callback) { + if (this._stopped) return callback(new Error("Queue was stopped")); + this.hooks.beforeAdd.callAsync(item, err => { + if (err) { + callback(err); + return; + } + const key = this._getKey(item); + const entry = this._entries.get(key); + if (entry !== undefined) { + if (entry.state === DONE_STATE) { + process.nextTick(() => callback(entry.error, entry.result)); + } else if (entry.callbacks === undefined) { + entry.callbacks = [callback]; + } else { + entry.callbacks.push(callback); + } + return; + } + const newEntry = new AsyncQueueEntry(item, callback); + if (this._stopped) { + this.hooks.added.call(item); + this._activeTasks++; + process.nextTick(() => + this._handleResult(newEntry, new Error("Queue was stopped")) + ); + } else { + this._entries.set(key, newEntry); + this._queued.push(newEntry); + if (this._willEnsureProcessing === false) { + this._willEnsureProcessing = true; + setImmediate(this._ensureProcessing); + } + this.hooks.added.call(item); + } + }); + } + + /** + * @param {T} item a item + * @returns {void} + */ + invalidate(item) { + const key = this._getKey(item); + const entry = this._entries.get(key); + this._entries.delete(key); + if (entry.state === QUEUED_STATE) { + const idx = this._queued.indexOf(entry); + if (idx >= 0) { + this._queued.splice(idx, 1); + } + } + } + + /** + * @returns {void} + */ + stop() { + this._stopped = true; + const queue = this._queued; + this._queued = []; + for (const entry of queue) { + this._entries.delete(this._getKey(entry.item)); + this._activeTasks++; + this._handleResult(entry, new Error("Queue was stopped")); + } + } + + /** + * @returns {void} + */ + increaseParallelism() { + this._parallelism++; + /* istanbul ignore next */ + if (this._willEnsureProcessing === false && this._queued.length > 0) { + this._willEnsureProcessing = true; + setImmediate(this._ensureProcessing); + } + } + + /** + * @returns {void} + */ + decreaseParallelism() { + this._parallelism--; + } + + /** + * @param {T} item an item + * @returns {boolean} true, if the item is currently being processed + */ + isProcessing(item) { + const key = this._getKey(item); + const entry = this._entries.get(key); + return entry !== undefined && entry.state === PROCESSING_STATE; + } + + /** + * @param {T} item an item + * @returns {boolean} true, if the item is currently queued + */ + isQueued(item) { + const key = this._getKey(item); + const entry = this._entries.get(key); + return entry !== undefined && entry.state === QUEUED_STATE; + } + + /** + * @param {T} item an item + * @returns {boolean} true, if the item is currently queued + */ + isDone(item) { + const key = this._getKey(item); + const entry = this._entries.get(key); + return entry !== undefined && entry.state === DONE_STATE; + } + + /** + * @returns {void} + */ + _ensureProcessing() { + while (this._activeTasks < this._parallelism && this._queued.length > 0) { + const entry = this._queued.pop(); + this._activeTasks++; + entry.state = PROCESSING_STATE; + this._startProcessing(entry); + } + this._willEnsureProcessing = false; + } + + /** + * @param {AsyncQueueEntry} entry the entry + * @returns {void} + */ + _startProcessing(entry) { + this.hooks.beforeStart.callAsync(entry.item, err => { + if (err) { + this._handleResult(entry, err); + return; + } + let inCallback = false; + try { + this._processor(entry.item, (e, r) => { + inCallback = true; + this._handleResult(entry, e, r); + }); + } catch (err) { + if (inCallback) throw err; + this._handleResult(entry, err, null); + } + this.hooks.started.call(entry.item); + }); + } + + /** + * @param {AsyncQueueEntry} entry the entry + * @param {Error=} err error, if any + * @param {R=} result result, if any + * @returns {void} + */ + _handleResult(entry, err, result) { + this.hooks.result.callAsync(entry.item, err, result, hookError => { + const error = hookError || err; + + const callback = entry.callback; + const callbacks = entry.callbacks; + entry.state = DONE_STATE; + entry.callback = undefined; + entry.callbacks = undefined; + entry.result = result; + entry.error = error; + this._activeTasks--; + + if (this._willEnsureProcessing === false && this._queued.length > 0) { + this._willEnsureProcessing = true; + setImmediate(this._ensureProcessing); + } + + if (inHandleResult++ > 3) { + process.nextTick(() => { + callback(error, result); + if (callbacks !== undefined) { + for (const callback of callbacks) { + callback(error, result); + } + } + }); + } else { + callback(error, result); + if (callbacks !== undefined) { + for (const callback of callbacks) { + callback(error, result); + } + } + } + inHandleResult--; + }); + } +} + +module.exports = AsyncQueue; + + +/***/ }), + +/***/ 84695: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +// data URL scheme: "data:text/javascript;charset=utf-8;base64,some-string" +// http://www.ietf.org/rfc/rfc2397.txt +const URIRegEx = /^data:([^;,]+)?((?:;(?:[^;,]+))*?)(;base64)?,(.*)$/i; + +const decodeDataURI = uri => { + const match = URIRegEx.exec(uri); + if (!match) return null; + + const isBase64 = match[3]; + const body = match[4]; + return isBase64 + ? Buffer.from(body, "base64") + : Buffer.from(decodeURIComponent(body), "ascii"); +}; + +const getMimetype = uri => { + const match = URIRegEx.exec(uri); + if (!match) return ""; + + return match[1] || "text/plain"; +}; + +module.exports = { + decodeDataURI, + getMimetype +}; + + +/***/ }), + +/***/ 32: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +class Hash { + /* istanbul ignore next */ + /** + * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} + * @abstract + * @param {string|Buffer} data data + * @param {string=} inputEncoding data encoding + * @returns {this} updated hash + */ + update(data, inputEncoding) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } + + /* istanbul ignore next */ + /** + * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} + * @abstract + * @param {string=} encoding encoding of the return value + * @returns {string|Buffer} digest + */ + digest(encoding) { + const AbstractMethodError = __webpack_require__(67113); + throw new AbstractMethodError(); + } +} + +module.exports = Hash; + + +/***/ }), + +/***/ 18117: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const SortableSet = __webpack_require__(51326); + +/** + * Multi layer bucket sorted set: + * Supports adding non-existing items (DO NOT ADD ITEM TWICE), + * Supports removing exiting items (DO NOT REMOVE ITEM NOT IN SET), + * Supports popping the first items according to defined order, + * Supports iterating all items without order, + * Supports updating an item in an efficient way, + * Supports size property, which is the number of items, + * Items are lazy partially sorted when needed + * @template T + * @template K + */ +class LazyBucketSortedSet { + /** + * @param {function(T): K} getKey function to get key from item + * @param {function(K, K): number} comparator comparator to sort keys + * @param {...((function(T): any) | (function(any, any): number))} args more pairs of getKey and comparator plus optional final comparator for the last layer + */ + constructor(getKey, comparator, ...args) { + this._getKey = getKey; + this._innerArgs = args; + this._leaf = args.length <= 1; + this._keys = new SortableSet(undefined, comparator); + /** @type {Map | SortableSet>} */ + this._map = new Map(); + this._unsortedItems = new Set(); + this.size = 0; + } + + /** + * @param {T} item an item + * @returns {void} + */ + add(item) { + this.size++; + this._unsortedItems.add(item); + } + + /** + * @param {K} key key of item + * @param {T} item the item + * @returns {void} + */ + _addInternal(key, item) { + let entry = this._map.get(key); + if (entry === undefined) { + entry = this._leaf + ? new SortableSet(undefined, this._innerArgs[0]) + : new /** @type {any} */ (LazyBucketSortedSet)(...this._innerArgs); + this._keys.add(key); + this._map.set(key, entry); + } + entry.add(item); + } + + /** + * @param {T} item an item + * @returns {void} + */ + delete(item) { + this.size--; + if (this._unsortedItems.has(item)) { + this._unsortedItems.delete(item); + return; + } + const key = this._getKey(item); + const entry = this._map.get(key); + entry.delete(item); + if (entry.size === 0) { + this._deleteKey(key); + } + } + + /** + * @param {K} key key to be removed + * @returns {void} + */ + _deleteKey(key) { + this._keys.delete(key); + this._map.delete(key); + } + + /** + * @returns {T | undefined} an item + */ + popFirst() { + if (this.size === 0) return undefined; + this.size--; + if (this._unsortedItems.size > 0) { + for (const item of this._unsortedItems) { + const key = this._getKey(item); + this._addInternal(key, item); + } + this._unsortedItems.clear(); + } + this._keys.sort(); + const key = this._keys.values().next().value; + const entry = this._map.get(key); + if (this._leaf) { + const leafEntry = /** @type {SortableSet} */ (entry); + leafEntry.sort(); + const item = leafEntry.values().next().value; + leafEntry.delete(item); + if (leafEntry.size === 0) { + this._deleteKey(key); + } + return item; + } else { + const nodeEntry = /** @type {LazyBucketSortedSet} */ (entry); + const item = nodeEntry.popFirst(); + if (nodeEntry.size === 0) { + this._deleteKey(key); + } + return item; + } + } + + /** + * @param {T} item to be updated item + * @returns {function(true=): void} finish update + */ + startUpdate(item) { + if (this._unsortedItems.has(item)) { + return remove => { + if (remove) { + this._unsortedItems.delete(item); + this.size--; + return; + } + }; + } + const key = this._getKey(item); + if (this._leaf) { + const oldEntry = /** @type {SortableSet} */ (this._map.get(key)); + return remove => { + if (remove) { + this.size--; + oldEntry.delete(item); + if (oldEntry.size === 0) { + this._deleteKey(key); + } + return; + } + const newKey = this._getKey(item); + if (key === newKey) { + // This flags the sortable set as unordered + oldEntry.add(item); + } else { + oldEntry.delete(item); + if (oldEntry.size === 0) { + this._deleteKey(key); + } + this._addInternal(newKey, item); + } + }; + } else { + const oldEntry = /** @type {LazyBucketSortedSet} */ (this._map.get( + key + )); + const finishUpdate = oldEntry.startUpdate(item); + return remove => { + if (remove) { + this.size--; + finishUpdate(true); + if (oldEntry.size === 0) { + this._deleteKey(key); + } + return; + } + const newKey = this._getKey(item); + if (key === newKey) { + finishUpdate(); + } else { + finishUpdate(true); + if (oldEntry.size === 0) { + this._deleteKey(key); + } + this._addInternal(newKey, item); + } + }; + } + } + + /** + * @param {Iterator[]} iterators list of iterators to append to + * @returns {void} + */ + _appendIterators(iterators) { + if (this._unsortedItems.size > 0) + iterators.push(this._unsortedItems[Symbol.iterator]()); + for (const key of this._keys) { + const entry = this._map.get(key); + if (this._leaf) { + const leafEntry = /** @type {SortableSet} */ (entry); + const iterator = leafEntry[Symbol.iterator](); + iterators.push(iterator); + } else { + const nodeEntry = /** @type {LazyBucketSortedSet} */ (entry); + nodeEntry._appendIterators(iterators); + } + } + } + + /** + * @returns {Iterator} the iterator + */ + [Symbol.iterator]() { + const iterators = []; + this._appendIterators(iterators); + iterators.reverse(); + let currentIterator = iterators.pop(); + return { + next: () => { + const res = currentIterator.next(); + if (res.done) { + if (iterators.length === 0) return res; + currentIterator = iterators.pop(); + return currentIterator.next(); + } + return res; + } + }; + } +} + +module.exports = LazyBucketSortedSet; + + +/***/ }), + +/***/ 60248: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const makeSerializable = __webpack_require__(55575); + +/** + * @template T + * @param {Set} targetSet set where items should be added + * @param {Set>} toMerge iterables to be merged + * @returns {void} + */ +const merge = (targetSet, toMerge) => { + for (const set of toMerge) { + for (const item of set) { + targetSet.add(item); + } + } +}; + +/** + * @template T + * @param {Set>} targetSet set where iterables should be added + * @param {Array | LazySet>} toDeepMerge iterables or lazy set to be flattened + * @returns {void} + */ +const flatten = (targetSet, toDeepMerge) => { + for (const set of toDeepMerge) { + if (set instanceof LazySet) { + if (set._set.size > 0) targetSet.add(set._set); + if (set._needMerge) { + for (const mergedSet of set._toMerge) { + targetSet.add(mergedSet); + } + flatten(targetSet, set._toDeepMerge); + } + } else { + targetSet.add(set); + } + } +}; + +/** + * Like Set but with an addAll method to eventually add items from another iterable. + * Access methods make sure that all delayed operations are executed. + * Iteration methods deopts to normal Set performance until clear is called again (because of the chance of modifications during iteration). + * @template T + */ +class LazySet { + /** + * @param {Iterable=} iterable init iterable + */ + constructor(iterable) { + /** @type {Set} */ + this._set = new Set(iterable); + /** @type {Set>} */ + this._toMerge = new Set(); + /** @type {Array | LazySet>} */ + this._toDeepMerge = []; + this._needMerge = false; + this._deopt = false; + } + + _flatten() { + flatten(this._toMerge, this._toDeepMerge); + this._toDeepMerge.length = 0; + } + + _merge() { + this._flatten(); + merge(this._set, this._toMerge); + this._toMerge.clear(); + this._needMerge = false; + } + + get size() { + if (this._needMerge) this._merge(); + return this._set.size; + } + + /** + * @param {T} item an item + * @returns {this} itself + */ + add(item) { + this._set.add(item); + return this; + } + + /** + * @param {Iterable | LazySet} iterable a immutable iterable or another immutable LazySet which will eventually be merged into the Set + * @returns {this} itself + */ + addAll(iterable) { + if (this._deopt) { + const _set = this._set; + for (const item of iterable) { + _set.add(item); + } + } else { + this._toDeepMerge.push(iterable); + this._needMerge = true; + // Avoid being too memory hungry + if (this._toDeepMerge.length > 100000) { + this._flatten(); + if (this._toMerge.size > 100000) this._merge(); + } + } + return this; + } + + clear() { + this._set.clear(); + this._toMerge.clear(); + this._toDeepMerge.length = 0; + this._needMerge = false; + this._deopt = false; + } + + /** + * @param {T} value an item + * @returns {boolean} true, if the value was in the Set before + */ + delete(value) { + if (this._needMerge) this._merge(); + return this._set.delete(value); + } + + entries() { + this._deopt = true; + if (this._needMerge) this._merge(); + return this._set.entries(); + } + + /** + * @param {function(T, T, Set): void} callbackFn function called for each entry + * @param {any} thisArg this argument for the callbackFn + * @returns {void} + */ + forEach(callbackFn, thisArg) { + this._deopt = true; + if (this._needMerge) this._merge(); + this._set.forEach(callbackFn, thisArg); + } + + /** + * @param {T} item an item + * @returns {boolean} true, when the item is in the Set + */ + has(item) { + if (this._needMerge) this._merge(); + return this._set.has(item); + } + + keys() { + this._deopt = true; + if (this._needMerge) this._merge(); + return this._set.keys(); + } + + values() { + this._deopt = true; + if (this._needMerge) this._merge(); + return this._set.values(); + } + + [Symbol.iterator]() { + this._deopt = true; + if (this._needMerge) this._merge(); + return this._set[Symbol.iterator](); + } + + /* istanbul ignore next */ + get [Symbol.toStringTag]() { + return "LazySet"; + } + + serialize({ write }) { + if (this._needMerge) this._merge(); + write(this._set.size); + for (const item of this._set) write(item); + } + + static deserialize({ read }) { + const count = read(); + const items = []; + for (let i = 0; i < count; i++) { + items.push(read()); + } + return new LazySet(items); + } +} + +makeSerializable(LazySet, "webpack/lib/util/LazySet"); + +module.exports = LazySet; + + +/***/ }), + +/***/ 85987: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** + * @template T + */ +class Queue { + /** + * @param {Iterable=} items The initial elements. + */ + constructor(items) { + /** @private @type {Set} */ + this._set = new Set(items); + /** @private @type {Iterator} */ + this._iterator = this._set[Symbol.iterator](); + } + + /** + * Returns the number of elements in this queue. + * @returns {number} The number of elements in this queue. + */ + get length() { + return this._set.size; + } + + /** + * Appends the specified element to this queue. + * @param {T} item The element to add. + * @returns {void} + */ + enqueue(item) { + this._set.add(item); + } + + /** + * Retrieves and removes the head of this queue. + * @returns {T | undefined} The head of the queue of `undefined` if this queue is empty. + */ + dequeue() { + const result = this._iterator.next(); + if (result.done) return undefined; + this._set.delete(result.value); + return result.value; + } +} + +module.exports = Queue; + + +/***/ }), + +/***/ 86088: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** + * intersect creates Set containing the intersection of elements between all sets + * @template T + * @param {Set[]} sets an array of sets being checked for shared elements + * @returns {Set} returns a new Set containing the intersecting items + */ +const intersect = sets => { + if (sets.length === 0) return new Set(); + if (sets.length === 1) return new Set(sets[0]); + let minSize = Infinity; + let minIndex = -1; + for (let i = 0; i < sets.length; i++) { + const size = sets[i].size; + if (size < minSize) { + minIndex = i; + minSize = size; + } + } + const current = new Set(sets[minIndex]); + for (let i = 0; i < sets.length; i++) { + if (i === minIndex) continue; + const set = sets[i]; + for (const item of current) { + if (!set.has(item)) { + current.delete(item); + } + } + } + return current; +}; + +/** + * Checks if a set is the subset of another set + * @template T + * @param {Set} bigSet a Set which contains the original elements to compare against + * @param {Set} smallSet the set whose elements might be contained inside of bigSet + * @returns {boolean} returns true if smallSet contains all elements inside of the bigSet + */ +const isSubset = (bigSet, smallSet) => { + if (bigSet.size < smallSet.size) return false; + for (const item of smallSet) { + if (!bigSet.has(item)) return false; + } + return true; +}; + +/** + * @template T + * @param {Set} set a set + * @param {function(T): boolean} fn selector function + * @returns {T | undefined} found item + */ +const find = (set, fn) => { + for (const item of set) { + if (fn(item)) return item; + } +}; + +exports.intersect = intersect; +exports.isSubset = isSubset; +exports.find = find; + + +/***/ }), + +/***/ 51326: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const NONE = Symbol("not sorted"); + +/** + * A subset of Set that offers sorting functionality + * @template T item type in set + * @extends {Set} + */ +class SortableSet extends Set { + /** + * Create a new sortable set + * @param {Iterable=} initialIterable The initial iterable value + * @typedef {function(T, T): number} SortFunction + * @param {SortFunction=} defaultSort Default sorting function + */ + constructor(initialIterable, defaultSort) { + super(initialIterable); + /** @private @type {undefined | function(T, T): number}} */ + this._sortFn = defaultSort; + /** @private @type {typeof NONE | undefined | function(T, T): number}} */ + this._lastActiveSortFn = NONE; + /** @private @type {Map | undefined} */ + this._cache = undefined; + /** @private @type {Map | undefined} */ + this._cacheOrderIndependent = undefined; + } + + /** + * @param {T} value value to add to set + * @returns {this} returns itself + */ + add(value) { + this._lastActiveSortFn = NONE; + this._invalidateCache(); + this._invalidateOrderedCache(); + super.add(value); + return this; + } + + /** + * @param {T} value value to delete + * @returns {boolean} true if value existed in set, false otherwise + */ + delete(value) { + this._invalidateCache(); + this._invalidateOrderedCache(); + return super.delete(value); + } + + /** + * @returns {void} + */ + clear() { + this._invalidateCache(); + this._invalidateOrderedCache(); + return super.clear(); + } + + /** + * Sort with a comparer function + * @param {SortFunction} sortFn Sorting comparer function + * @returns {void} + */ + sortWith(sortFn) { + if (this.size <= 1 || sortFn === this._lastActiveSortFn) { + // already sorted - nothing to do + return; + } + + const sortedArray = Array.from(this).sort(sortFn); + super.clear(); + for (let i = 0; i < sortedArray.length; i += 1) { + super.add(sortedArray[i]); + } + this._lastActiveSortFn = sortFn; + this._invalidateCache(); + } + + sort() { + this.sortWith(this._sortFn); + return this; + } + + /** + * Get data from cache + * @template R + * @param {function(SortableSet): R} fn function to calculate value + * @returns {R} returns result of fn(this), cached until set changes + */ + getFromCache(fn) { + if (this._cache === undefined) { + this._cache = new Map(); + } else { + const result = this._cache.get(fn); + const data = /** @type {R} */ (result); + if (data !== undefined) { + return data; + } + } + const newData = fn(this); + this._cache.set(fn, newData); + return newData; + } + + /** + * Get data from cache (ignoring sorting) + * @template R + * @param {function(SortableSet): R} fn function to calculate value + * @returns {R} returns result of fn(this), cached until set changes + */ + getFromUnorderedCache(fn) { + if (this._cacheOrderIndependent === undefined) { + this._cacheOrderIndependent = new Map(); + } else { + const result = this._cacheOrderIndependent.get(fn); + const data = /** @type {R} */ (result); + if (data !== undefined) { + return data; + } + } + const newData = fn(this); + this._cacheOrderIndependent.set(fn, newData); + return newData; + } + + /** + * @private + * @returns {void} + */ + _invalidateCache() { + if (this._cache !== undefined) { + this._cache.clear(); + } + } + + /** + * @private + * @returns {void} + */ + _invalidateOrderedCache() { + if (this._cacheOrderIndependent !== undefined) { + this._cacheOrderIndependent.clear(); + } + } + + /** + * @returns {T[]} the raw array + */ + toJSON() { + return Array.from(this); + } +} + +module.exports = SortableSet; + + +/***/ }), + +/***/ 64149: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const TOMBSTONE = Symbol("tombstone"); +const UNDEFINED_MARKER = Symbol("undefined"); + +/** + * @template T + * @typedef {T | undefined} Cell + */ + +/** + * @template T + * @typedef {T | typeof TOMBSTONE | typeof UNDEFINED_MARKER} InternalCell + */ + +/** + * @template K + * @template V + * @param {[K, InternalCell]} pair the internal cell + * @returns {[K, Cell]} its “safe” representation + */ +const extractPair = pair => { + const key = pair[0]; + const val = pair[1]; + if (val === UNDEFINED_MARKER || val === TOMBSTONE) { + return [key, undefined]; + } else { + return /** @type {[K, Cell]} */ (pair); + } +}; + +/** + * @template K + * @template V + */ +class StackedMap { + /** + * @param {Map>[]=} parentStack an optional parent + */ + constructor(parentStack) { + /** @type {Map>} */ + this.map = new Map(); + /** @type {Map>[]} */ + this.stack = parentStack === undefined ? [] : parentStack.slice(); + this.stack.push(this.map); + } + + /** + * @param {K} item the key of the element to add + * @param {V} value the value of the element to add + * @returns {void} + */ + set(item, value) { + this.map.set(item, value === undefined ? UNDEFINED_MARKER : value); + } + + /** + * @param {K} item the item to delete + * @returns {void} + */ + delete(item) { + if (this.stack.length > 1) { + this.map.set(item, TOMBSTONE); + } else { + this.map.delete(item); + } + } + + /** + * @param {K} item the item to test + * @returns {boolean} true if the item exists in this set + */ + has(item) { + const topValue = this.map.get(item); + if (topValue !== undefined) { + return topValue !== TOMBSTONE; + } + if (this.stack.length > 1) { + for (let i = this.stack.length - 2; i >= 0; i--) { + const value = this.stack[i].get(item); + if (value !== undefined) { + this.map.set(item, value); + return value !== TOMBSTONE; + } + } + this.map.set(item, TOMBSTONE); + } + return false; + } + + /** + * @param {K} item the key of the element to return + * @returns {Cell} the value of the element + */ + get(item) { + const topValue = this.map.get(item); + if (topValue !== undefined) { + return topValue === TOMBSTONE || topValue === UNDEFINED_MARKER + ? undefined + : topValue; + } + if (this.stack.length > 1) { + for (let i = this.stack.length - 2; i >= 0; i--) { + const value = this.stack[i].get(item); + if (value !== undefined) { + this.map.set(item, value); + return value === TOMBSTONE || value === UNDEFINED_MARKER + ? undefined + : value; + } + } + this.map.set(item, TOMBSTONE); + } + return undefined; + } + + _compress() { + if (this.stack.length === 1) return; + this.map = new Map(); + for (const data of this.stack) { + for (const pair of data) { + if (pair[1] === TOMBSTONE) { + this.map.delete(pair[0]); + } else { + this.map.set(pair[0], pair[1]); + } + } + } + this.stack = [this.map]; + } + + asArray() { + this._compress(); + return Array.from(this.map.keys()); + } + + asSet() { + this._compress(); + return new Set(this.map.keys()); + } + + asPairArray() { + this._compress(); + return Array.from(this.map.entries(), extractPair); + } + + asMap() { + return new Map(this.asPairArray()); + } + + get size() { + this._compress(); + return this.map.size; + } + + createChild() { + return new StackedMap(this.stack); + } +} + +module.exports = StackedMap; + + +/***/ }), + +/***/ 74395: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +class StringXor { + constructor() { + this._value = undefined; + this._buffer = undefined; + } + + add(str) { + let buf = this._buffer; + let value; + if (buf === undefined) { + buf = this._buffer = Buffer.from(str, "latin1"); + this._value = Buffer.from(buf); + return; + } else if (buf.length !== str.length) { + value = this._value; + buf = this._buffer = Buffer.from(str, "latin1"); + if (value.length < buf.length) { + this._value = Buffer.allocUnsafe(buf.length); + value.copy(this._value); + this._value.fill(0, value.length); + value = this._value; + } + } else { + value = this._value; + buf.write(str, "latin1"); + } + const len = buf.length; + for (let i = 0; i < len; i++) { + value[i] = value[i] ^ buf[i]; + } + } + + toString() { + return this._value === undefined ? "" : this._value.toString("latin1"); + } + + updateHash(hash) { + if (this._value !== undefined) hash.update(this._value); + } +} + +module.exports = StringXor; + + +/***/ }), + +/***/ 13590: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const TupleSet = __webpack_require__(86465); + +/** + * @template {any[]} T + */ +class TupleQueue { + /** + * @param {Iterable=} items The initial elements. + */ + constructor(items) { + /** @private @type {TupleSet} */ + this._set = new TupleSet(items); + /** @private @type {Iterator} */ + this._iterator = this._set[Symbol.iterator](); + } + + /** + * Returns the number of elements in this queue. + * @returns {number} The number of elements in this queue. + */ + get length() { + return this._set.size; + } + + /** + * Appends the specified element to this queue. + * @param {T} item The element to add. + * @returns {void} + */ + enqueue(...item) { + this._set.add(...item); + } + + /** + * Retrieves and removes the head of this queue. + * @returns {T | undefined} The head of the queue of `undefined` if this queue is empty. + */ + dequeue() { + const result = this._iterator.next(); + if (result.done) { + if (this._set.size > 0) { + this._iterator = this._set[Symbol.iterator](); + const value = this._iterator.next().value; + this._set.delete(...value); + return value; + } + return undefined; + } + this._set.delete(...result.value); + return result.value; + } +} + +module.exports = TupleQueue; + + +/***/ }), + +/***/ 86465: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** + * @template {any[]} T + */ +class TupleSet { + constructor(init) { + this._map = new Map(); + this.size = 0; + if (init) { + for (const tuple of init) { + this.add(...tuple); + } + } + } + + /** + * @param {T} args tuple + * @returns {void} + */ + add(...args) { + let map = this._map; + for (let i = 0; i < args.length - 2; i++) { + const arg = args[i]; + const innerMap = map.get(arg); + if (innerMap === undefined) { + map.set(arg, (map = new Map())); + } else { + map = innerMap; + } + } + + const beforeLast = args[args.length - 2]; + let set = map.get(beforeLast); + if (set === undefined) { + map.set(beforeLast, (set = new Set())); + } + + const last = args[args.length - 1]; + this.size -= set.size; + set.add(last); + this.size += set.size; + } + + /** + * @param {T} args tuple + * @returns {boolean} true, if the tuple is in the Set + */ + has(...args) { + let map = this._map; + for (let i = 0; i < args.length - 2; i++) { + const arg = args[i]; + map = map.get(arg); + if (map === undefined) { + return false; + } + } + + const beforeLast = args[args.length - 2]; + let set = map.get(beforeLast); + if (set === undefined) { + return false; + } + + const last = args[args.length - 1]; + return set.has(last); + } + + /** + * @param {T} args tuple + * @returns {void} + */ + delete(...args) { + let map = this._map; + for (let i = 0; i < args.length - 2; i++) { + const arg = args[i]; + map = map.get(arg); + if (map === undefined) { + return; + } + } + + const beforeLast = args[args.length - 2]; + let set = map.get(beforeLast); + if (set === undefined) { + return; + } + + const last = args[args.length - 1]; + this.size -= set.size; + set.delete(last); + this.size += set.size; + } + + /** + * @returns {Iterator} iterator + */ + [Symbol.iterator]() { + const iteratorStack = []; + const tuple = []; + let currentSetIterator = undefined; + + const next = it => { + const result = it.next(); + if (result.done) { + if (iteratorStack.length === 0) return false; + tuple.pop(); + return next(iteratorStack.pop()); + } + const [key, value] = result.value; + iteratorStack.push(it); + tuple.push(key); + if (value instanceof Set) { + currentSetIterator = value[Symbol.iterator](); + return true; + } else { + return next(value[Symbol.iterator]()); + } + }; + + next(this._map[Symbol.iterator]()); + + return { + next() { + while (currentSetIterator) { + const result = currentSetIterator.next(); + if (result.done) { + tuple.pop(); + if (!next(iteratorStack.pop())) { + currentSetIterator = undefined; + } + } else { + return { + done: false, + value: /** @type {T} */ (tuple.concat(result.value)) + }; + } + } + return { done: true, value: undefined }; + } + }; + } +} + +module.exports = TupleSet; + + +/***/ }), + +/***/ 47176: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + + + +/** @typedef {import("./fs").InputFileSystem} InputFileSystem */ +/** @typedef {(error: Error|null, result?: Buffer) => void} ErrorFirstCallback */ + +const backSlashCharCode = "\\".charCodeAt(0); +const slashCharCode = "/".charCodeAt(0); +const aLowerCaseCharCode = "a".charCodeAt(0); +const zLowerCaseCharCode = "z".charCodeAt(0); +const aUpperCaseCharCode = "A".charCodeAt(0); +const zUpperCaseCharCode = "Z".charCodeAt(0); +const _0CharCode = "0".charCodeAt(0); +const _9CharCode = "9".charCodeAt(0); +const plusCharCode = "+".charCodeAt(0); +const hyphenCharCode = "-".charCodeAt(0); +const colonCharCode = ":".charCodeAt(0); +const hashCharCode = "#".charCodeAt(0); +const queryCharCode = "?".charCodeAt(0); +/** + * Get scheme if specifier is an absolute URL specifier + * e.g. Absolute specifiers like 'file:///user/webpack/index.js' + * https://tools.ietf.org/html/rfc3986#section-3.1 + * @param {string} specifier specifier + * @returns {string|undefined} scheme if absolute URL specifier provided + */ +function getScheme(specifier) { + const start = specifier.charCodeAt(0); + + // First char maybe only a letter + if ( + (start < aLowerCaseCharCode || start > zLowerCaseCharCode) && + (start < aUpperCaseCharCode || start > zUpperCaseCharCode) + ) { + return undefined; + } + + let i = 1; + let ch = specifier.charCodeAt(i); + + while ( + (ch >= aLowerCaseCharCode && ch <= zLowerCaseCharCode) || + (ch >= aUpperCaseCharCode && ch <= zUpperCaseCharCode) || + (ch >= _0CharCode && ch <= _9CharCode) || + ch === plusCharCode || + ch === hyphenCharCode + ) { + if (++i === specifier.length) return undefined; + ch = specifier.charCodeAt(i); + } + + // Scheme must end with colon + if (ch !== colonCharCode) return undefined; + + // Check for Windows absolute path + // https://url.spec.whatwg.org/#url-miscellaneous + if (i === 1) { + const nextChar = i + 1 < specifier.length ? specifier.charCodeAt(i + 1) : 0; + if ( + nextChar === 0 || + nextChar === backSlashCharCode || + nextChar === slashCharCode || + nextChar === hashCharCode || + nextChar === queryCharCode + ) { + return undefined; + } + } + + return specifier.slice(0, i).toLowerCase(); +} + +/** + * @param {string} specifier specifier + * @returns {string|null} protocol if absolute URL specifier provided + */ +function getProtocol(specifier) { + const scheme = getScheme(specifier); + return scheme === undefined ? undefined : scheme + ":"; +} + +exports.getScheme = getScheme; +exports.getProtocol = getProtocol; + + +/***/ }), + +/***/ 92700: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @type {WeakMap>} */ +const mergeCache = new WeakMap(); +/** @type {WeakMap>>} */ +const setPropertyCache = new WeakMap(); +const DELETE = Symbol("DELETE"); +const DYNAMIC_INFO = Symbol("cleverMerge dynamic info"); + +/** + * Merges two given objects and caches the result to avoid computation if same objects passed as arguments again. + * @template T + * @template O + * @example + * // performs cleverMerge(first, second), stores the result in WeakMap and returns result + * cachedCleverMerge({a: 1}, {a: 2}) + * {a: 2} + * // when same arguments passed, gets the result from WeakMap and returns it. + * cachedCleverMerge({a: 1}, {a: 2}) + * {a: 2} + * @param {T} first first object + * @param {O} second second object + * @returns {T & O | T | O} merged object of first and second object + */ +const cachedCleverMerge = (first, second) => { + if (second === undefined) return first; + if (first === undefined) return second; + if (typeof second !== "object" || second === null) return second; + if (typeof first !== "object" || first === null) return first; + + let innerCache = mergeCache.get(first); + if (innerCache === undefined) { + innerCache = new WeakMap(); + mergeCache.set(first, innerCache); + } + const prevMerge = innerCache.get(second); + if (prevMerge !== undefined) return prevMerge; + const newMerge = _cleverMerge(first, second, true); + innerCache.set(second, newMerge); + return newMerge; +}; + +/** + * @template T + * @param {Partial} obj object + * @param {string} property property + * @param {string|number|boolean} value assignment value + * @returns {T} new object + */ +const cachedSetProperty = (obj, property, value) => { + let mapByProperty = setPropertyCache.get(obj); + + if (mapByProperty === undefined) { + mapByProperty = new Map(); + setPropertyCache.set(obj, mapByProperty); + } + + let mapByValue = mapByProperty.get(property); + + if (mapByValue === undefined) { + mapByValue = new Map(); + mapByProperty.set(property, mapByValue); + } + + let result = mapByValue.get(value); + + if (result) return result; + + result = { + ...obj, + [property]: value + }; + mapByValue.set(value, result); + + return result; +}; + +/** + * @typedef {Object} ObjectParsedPropertyEntry + * @property {any | undefined} base base value + * @property {string | undefined} byProperty the name of the selector property + * @property {Map} byValues value depending on selector property, merged with base + */ + +/** + * @typedef {Object} ParsedObject + * @property {Map} static static properties (key is property name) + * @property {{ byProperty: string, fn: Function } | undefined} dynamic dynamic part + */ + +/** @type {WeakMap} */ +const parseCache = new WeakMap(); + +/** + * @param {object} obj the object + * @returns {ParsedObject} parsed object + */ +const cachedParseObject = obj => { + const entry = parseCache.get(obj); + if (entry !== undefined) return entry; + const result = parseObject(obj); + parseCache.set(obj, result); + return result; +}; + +/** + * @param {object} obj the object + * @returns {ParsedObject} parsed object + */ +const parseObject = obj => { + const info = new Map(); + let dynamicInfo; + const getInfo = p => { + const entry = info.get(p); + if (entry !== undefined) return entry; + const newEntry = { + base: undefined, + byProperty: undefined, + byValues: undefined + }; + info.set(p, newEntry); + return newEntry; + }; + for (const key of Object.keys(obj)) { + if (key.startsWith("by")) { + const byProperty = key; + const byObj = obj[byProperty]; + if (typeof byObj === "object") { + for (const byValue of Object.keys(byObj)) { + const obj = byObj[byValue]; + for (const key of Object.keys(obj)) { + const entry = getInfo(key); + if (entry.byProperty === undefined) { + entry.byProperty = byProperty; + entry.byValues = new Map(); + } else if (entry.byProperty !== byProperty) { + throw new Error( + `${byProperty} and ${entry.byProperty} for a single property is not supported` + ); + } + entry.byValues.set(byValue, obj[key]); + if (byValue === "default") { + for (const otherByValue of Object.keys(byObj)) { + if (!entry.byValues.has(otherByValue)) + entry.byValues.set(otherByValue, undefined); + } + } + } + } + } else if (typeof byObj === "function") { + if (dynamicInfo === undefined) { + dynamicInfo = { + byProperty: key, + fn: byObj + }; + } else { + throw new Error( + `${key} and ${dynamicInfo.byProperty} when both are functions is not supported` + ); + } + } else { + const entry = getInfo(key); + entry.base = obj[key]; + } + } else { + const entry = getInfo(key); + entry.base = obj[key]; + } + } + return { + static: info, + dynamic: dynamicInfo + }; +}; + +/** + * @param {Map} info static properties (key is property name) + * @param {{ byProperty: string, fn: Function } | undefined} dynamicInfo dynamic part + * @returns {object} the object + */ +const serializeObject = (info, dynamicInfo) => { + const obj = {}; + // Setup byProperty structure + for (const entry of info.values()) { + if (entry.byProperty !== undefined) { + const byObj = (obj[entry.byProperty] = obj[entry.byProperty] || {}); + for (const byValue of entry.byValues.keys()) { + byObj[byValue] = byObj[byValue] || {}; + } + } + } + for (const [key, entry] of info) { + if (entry.base !== undefined) { + obj[key] = entry.base; + } + // Fill byProperty structure + if (entry.byProperty !== undefined) { + const byObj = (obj[entry.byProperty] = obj[entry.byProperty] || {}); + for (const byValue of Object.keys(byObj)) { + const value = getFromByValues(entry.byValues, byValue); + if (value !== undefined) byObj[byValue][key] = value; + } + } + } + if (dynamicInfo !== undefined) { + obj[dynamicInfo.byProperty] = dynamicInfo.fn; + } + return obj; +}; + +const VALUE_TYPE_UNDEFINED = 0; +const VALUE_TYPE_ATOM = 1; +const VALUE_TYPE_ARRAY_EXTEND = 2; +const VALUE_TYPE_OBJECT = 3; +const VALUE_TYPE_DELETE = 4; + +/** + * @param {any} value a single value + * @returns {VALUE_TYPE_UNDEFINED | VALUE_TYPE_ATOM | VALUE_TYPE_ARRAY_EXTEND | VALUE_TYPE_OBJECT | VALUE_TYPE_DELETE} value type + */ +const getValueType = value => { + if (value === undefined) { + return VALUE_TYPE_UNDEFINED; + } else if (value === DELETE) { + return VALUE_TYPE_DELETE; + } else if (Array.isArray(value)) { + if (value.lastIndexOf("...") !== -1) return VALUE_TYPE_ARRAY_EXTEND; + return VALUE_TYPE_ATOM; + } else if ( + typeof value === "object" && + value !== null && + (!value.constructor || value.constructor === Object) + ) { + return VALUE_TYPE_OBJECT; + } + return VALUE_TYPE_ATOM; +}; + +/** + * Merges two objects. Objects are deeply clever merged. + * Arrays might reference the old value with "...". + * Non-object values take preference over object values. + * @template T + * @template O + * @param {T} first first object + * @param {O} second second object + * @returns {T & O | T | O} merged object of first and second object + */ +const cleverMerge = (first, second) => { + if (second === undefined) return first; + if (first === undefined) return second; + if (typeof second !== "object" || second === null) return second; + if (typeof first !== "object" || first === null) return first; + + return _cleverMerge(first, second, false); +}; + +/** + * Merges two objects. Objects are deeply clever merged. + * @param {object} first first object + * @param {object} second second object + * @param {boolean} internalCaching should parsing of objects and nested merges be cached + * @returns {object} merged object of first and second object + */ +const _cleverMerge = (first, second, internalCaching = false) => { + const firstObject = internalCaching + ? cachedParseObject(first) + : parseObject(first); + const { static: firstInfo, dynamic: firstDynamicInfo } = firstObject; + + // If the first argument has a dynamic part we modify the dynamic part to merge the second argument + if (firstDynamicInfo !== undefined) { + let { byProperty, fn } = firstDynamicInfo; + const fnInfo = fn[DYNAMIC_INFO]; + if (fnInfo) { + second = internalCaching + ? cachedCleverMerge(fnInfo[1], second) + : cleverMerge(fnInfo[1], second); + fn = fnInfo[0]; + } + const newFn = (...args) => { + const fnResult = fn(...args); + return internalCaching + ? cachedCleverMerge(fnResult, second) + : cleverMerge(fnResult, second); + }; + newFn[DYNAMIC_INFO] = [fn, second]; + return serializeObject(firstObject.static, { byProperty, fn: newFn }); + } + + // If the first part is static only, we merge the static parts and keep the dynamic part of the second argument + const secondObject = internalCaching + ? cachedParseObject(second) + : parseObject(second); + const { static: secondInfo, dynamic: secondDynamicInfo } = secondObject; + /** @type {Map} */ + const resultInfo = new Map(); + for (const [key, firstEntry] of firstInfo) { + const secondEntry = secondInfo.get(key); + const entry = + secondEntry !== undefined + ? mergeEntries(firstEntry, secondEntry, internalCaching) + : firstEntry; + resultInfo.set(key, entry); + } + for (const [key, secondEntry] of secondInfo) { + if (!firstInfo.has(key)) { + resultInfo.set(key, secondEntry); + } + } + return serializeObject(resultInfo, secondDynamicInfo); +}; + +/** + * @param {ObjectParsedPropertyEntry} firstEntry a + * @param {ObjectParsedPropertyEntry} secondEntry b + * @param {boolean} internalCaching should parsing of objects and nested merges be cached + * @returns {ObjectParsedPropertyEntry} new entry + */ +const mergeEntries = (firstEntry, secondEntry, internalCaching) => { + switch (getValueType(secondEntry.base)) { + case VALUE_TYPE_ATOM: + case VALUE_TYPE_DELETE: + // No need to consider firstEntry at all + // second value override everything + // = second.base + second.byProperty + return secondEntry; + case VALUE_TYPE_UNDEFINED: + if (!firstEntry.byProperty) { + // = first.base + second.byProperty + return { + base: firstEntry.base, + byProperty: secondEntry.byProperty, + byValues: secondEntry.byValues + }; + } else if (firstEntry.byProperty !== secondEntry.byProperty) { + throw new Error( + `${firstEntry.byProperty} and ${secondEntry.byProperty} for a single property is not supported` + ); + } else { + // = first.base + (first.byProperty + second.byProperty) + // need to merge first and second byValues + const newByValues = new Map(firstEntry.byValues); + for (const [key, value] of secondEntry.byValues) { + const firstValue = getFromByValues(firstEntry.byValues, key); + newByValues.set( + key, + mergeSingleValue(firstValue, value, internalCaching) + ); + } + return { + base: firstEntry.base, + byProperty: firstEntry.byProperty, + byValues: newByValues + }; + } + default: { + if (!firstEntry.byProperty) { + // The simple case + // = (first.base + second.base) + second.byProperty + return { + base: mergeSingleValue( + firstEntry.base, + secondEntry.base, + internalCaching + ), + byProperty: secondEntry.byProperty, + byValues: secondEntry.byValues + }; + } + let newBase; + const intermediateByValues = new Map(firstEntry.byValues); + for (const [key, value] of intermediateByValues) { + intermediateByValues.set( + key, + mergeSingleValue(value, secondEntry.base, internalCaching) + ); + } + if ( + Array.from(firstEntry.byValues.values()).every(value => { + const type = getValueType(value); + return type === VALUE_TYPE_ATOM || type === VALUE_TYPE_DELETE; + }) + ) { + // = (first.base + second.base) + ((first.byProperty + second.base) + second.byProperty) + newBase = mergeSingleValue( + firstEntry.base, + secondEntry.base, + internalCaching + ); + } else { + // = first.base + ((first.byProperty (+default) + second.base) + second.byProperty) + newBase = firstEntry.base; + if (!intermediateByValues.has("default")) + intermediateByValues.set("default", secondEntry.base); + } + if (!secondEntry.byProperty) { + // = first.base + (first.byProperty + second.base) + return { + base: newBase, + byProperty: firstEntry.byProperty, + byValues: intermediateByValues + }; + } else if (firstEntry.byProperty !== secondEntry.byProperty) { + throw new Error( + `${firstEntry.byProperty} and ${secondEntry.byProperty} for a single property is not supported` + ); + } + const newByValues = new Map(intermediateByValues); + for (const [key, value] of secondEntry.byValues) { + const firstValue = getFromByValues(intermediateByValues, key); + newByValues.set( + key, + mergeSingleValue(firstValue, value, internalCaching) + ); + } + return { + base: newBase, + byProperty: firstEntry.byProperty, + byValues: newByValues + }; + } + } +}; + +/** + * @param {Map} byValues all values + * @param {string} key value of the selector + * @returns {any | undefined} value + */ +const getFromByValues = (byValues, key) => { + if (key !== "default" && byValues.has(key)) { + return byValues.get(key); + } + return byValues.get("default"); +}; + +/** + * @param {any} a value + * @param {any} b value + * @param {boolean} internalCaching should parsing of objects and nested merges be cached + * @returns {any} value + */ +const mergeSingleValue = (a, b, internalCaching) => { + const bType = getValueType(b); + const aType = getValueType(a); + switch (bType) { + case VALUE_TYPE_DELETE: + case VALUE_TYPE_ATOM: + return b; + case VALUE_TYPE_OBJECT: { + return aType !== VALUE_TYPE_OBJECT + ? b + : internalCaching + ? cachedCleverMerge(a, b) + : cleverMerge(a, b); + } + case VALUE_TYPE_UNDEFINED: + return a; + case VALUE_TYPE_ARRAY_EXTEND: + switch ( + aType !== VALUE_TYPE_ATOM + ? aType + : Array.isArray(a) + ? VALUE_TYPE_ARRAY_EXTEND + : VALUE_TYPE_OBJECT + ) { + case VALUE_TYPE_UNDEFINED: + return b; + case VALUE_TYPE_DELETE: + return b.filter(item => item !== "..."); + case VALUE_TYPE_ARRAY_EXTEND: { + const newArray = []; + for (const item of b) { + if (item === "...") { + for (const item of a) { + newArray.push(item); + } + } else { + newArray.push(item); + } + } + return newArray; + } + case VALUE_TYPE_OBJECT: + return b.map(item => (item === "..." ? a : item)); + default: + throw new Error("Not implemented"); + } + default: + throw new Error("Not implemented"); + } +}; + +/** + * @template T + * @param {T} obj the object + * @returns {T} the object without operations like "..." or DELETE + */ +const removeOperations = obj => { + const newObj = /** @type {T} */ ({}); + for (const key of Object.keys(obj)) { + const value = obj[key]; + const type = getValueType(value); + switch (type) { + case VALUE_TYPE_UNDEFINED: + case VALUE_TYPE_DELETE: + break; + case VALUE_TYPE_OBJECT: + newObj[key] = removeOperations(value); + break; + case VALUE_TYPE_ARRAY_EXTEND: + newObj[key] = value.filter(i => i !== "..."); + break; + default: + newObj[key] = value; + break; + } + } + return newObj; +}; + +/** + * @template T + * @template {string} P + * @param {T} obj the object + * @param {P} byProperty the by description + * @param {...any} values values + * @returns {Omit} object with merged byProperty + */ +const resolveByProperty = (obj, byProperty, ...values) => { + if (typeof obj !== "object" || obj === null || !(byProperty in obj)) { + return obj; + } + const { [byProperty]: _byValue, ..._remaining } = /** @type {object} */ (obj); + const remaining = /** @type {T} */ (_remaining); + const byValue = /** @type {Record | function(...any[]): T} */ (_byValue); + if (typeof byValue === "object") { + const key = values[0]; + if (key in byValue) { + return cachedCleverMerge(remaining, byValue[key]); + } else if ("default" in byValue) { + return cachedCleverMerge(remaining, byValue.default); + } else { + return /** @type {T} */ (remaining); + } + } else if (typeof byValue === "function") { + const result = byValue.apply(null, values); + return cachedCleverMerge( + remaining, + resolveByProperty(result, byProperty, ...values) + ); + } +}; + +exports.cachedSetProperty = cachedSetProperty; +exports.cachedCleverMerge = cachedCleverMerge; +exports.cleverMerge = cleverMerge; +exports.resolveByProperty = resolveByProperty; +exports.removeOperations = removeOperations; +exports.DELETE = DELETE; + + +/***/ }), + +/***/ 21699: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { compareRuntime } = __webpack_require__(43478); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ + +/** @template T @typedef {function(T, T): -1|0|1} Comparator */ +/** @template TArg @template T @typedef {function(TArg, T, T): -1|0|1} RawParameterizedComparator */ +/** @template TArg @template T @typedef {function(TArg): Comparator} ParameterizedComparator */ + +/** + * @template T + * @param {RawParameterizedComparator} fn comparator with argument + * @returns {ParameterizedComparator} comparator + */ +const createCachedParameterizedComparator = fn => { + /** @type {WeakMap>} */ + const map = new WeakMap(); + return arg => { + const cachedResult = map.get(arg); + if (cachedResult !== undefined) return cachedResult; + /** + * @param {T} a first item + * @param {T} b second item + * @returns {-1|0|1} compare result + */ + const result = (a, b) => { + return fn(arg, a, b); + }; + map.set(arg, result); + return result; + }; +}; + +/** + * @param {Chunk} a chunk + * @param {Chunk} b chunk + * @returns {-1|0|1} compare result + */ +exports.compareChunksById = (a, b) => { + return compareIds(a.id, b.id); +}; + +/** + * @param {Module} a module + * @param {Module} b module + * @returns {-1|0|1} compare result + */ +exports.compareModulesByIdentifier = (a, b) => { + return compareIds(a.identifier(), b.identifier()); +}; + +/** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {Module} a module + * @param {Module} b module + * @returns {-1|0|1} compare result + */ +const compareModulesById = (chunkGraph, a, b) => { + return compareIds(chunkGraph.getModuleId(a), chunkGraph.getModuleId(b)); +}; +/** @type {ParameterizedComparator} */ +exports.compareModulesById = createCachedParameterizedComparator( + compareModulesById +); + +/** + * @param {number} a number + * @param {number} b number + * @returns {-1|0|1} compare result + */ +const compareNumbers = (a, b) => { + if (typeof a !== typeof b) { + return typeof a < typeof b ? -1 : 1; + } + if (a < b) return -1; + if (a > b) return 1; + return 0; +}; +exports.compareNumbers = compareNumbers; + +/** + * @param {string} a string + * @param {string} b string + * @returns {-1|0|1} compare result + */ +const compareStringsNumeric = (a, b) => { + const partsA = a.split(/(\d+)/); + const partsB = b.split(/(\d+)/); + const len = Math.min(partsA.length, partsB.length); + for (let i = 0; i < len; i++) { + const pA = partsA[i]; + const pB = partsB[i]; + if (i % 2 === 0) { + if (pA.length > pB.length) { + if (pA.slice(0, pB.length) > pB) return 1; + return -1; + } else if (pB.length > pA.length) { + if (pB.slice(0, pA.length) > pA) return -1; + return 1; + } else { + if (pA < pB) return -1; + if (pA > pB) return 1; + } + } else { + const nA = +pA; + const nB = +pB; + if (nA < nB) return -1; + if (nA > nB) return 1; + } + } + if (partsB.length < partsA.length) return 1; + if (partsB.length > partsA.length) return -1; + return 0; +}; +exports.compareStringsNumeric = compareStringsNumeric; + +/** + * @param {ModuleGraph} moduleGraph the module graph + * @param {Module} a module + * @param {Module} b module + * @returns {-1|0|1} compare result + */ +const compareModulesByPostOrderIndexOrIdentifier = (moduleGraph, a, b) => { + const cmp = compareNumbers( + moduleGraph.getPostOrderIndex(a), + moduleGraph.getPostOrderIndex(b) + ); + if (cmp !== 0) return cmp; + return compareIds(a.identifier(), b.identifier()); +}; +/** @type {ParameterizedComparator} */ +exports.compareModulesByPostOrderIndexOrIdentifier = createCachedParameterizedComparator( + compareModulesByPostOrderIndexOrIdentifier +); + +/** + * @param {ModuleGraph} moduleGraph the module graph + * @param {Module} a module + * @param {Module} b module + * @returns {-1|0|1} compare result + */ +const compareModulesByPreOrderIndexOrIdentifier = (moduleGraph, a, b) => { + const cmp = compareNumbers( + moduleGraph.getPreOrderIndex(a), + moduleGraph.getPreOrderIndex(b) + ); + if (cmp !== 0) return cmp; + return compareIds(a.identifier(), b.identifier()); +}; +/** @type {ParameterizedComparator} */ +exports.compareModulesByPreOrderIndexOrIdentifier = createCachedParameterizedComparator( + compareModulesByPreOrderIndexOrIdentifier +); + +/** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {Module} a module + * @param {Module} b module + * @returns {-1|0|1} compare result + */ +const compareModulesByIdOrIdentifier = (chunkGraph, a, b) => { + const cmp = compareIds(chunkGraph.getModuleId(a), chunkGraph.getModuleId(b)); + if (cmp !== 0) return cmp; + return compareIds(a.identifier(), b.identifier()); +}; +/** @type {ParameterizedComparator} */ +exports.compareModulesByIdOrIdentifier = createCachedParameterizedComparator( + compareModulesByIdOrIdentifier +); + +/** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {Chunk} a chunk + * @param {Chunk} b chunk + * @returns {-1|0|1} compare result + */ +const compareChunks = (chunkGraph, a, b) => { + return chunkGraph.compareChunks(a, b); +}; +/** @type {ParameterizedComparator} */ +exports.compareChunks = createCachedParameterizedComparator(compareChunks); + +/** + * @param {string|number} a first id + * @param {string|number} b second id + * @returns {-1|0|1} compare result + */ +const compareIds = (a, b) => { + if (typeof a !== typeof b) { + return typeof a < typeof b ? -1 : 1; + } + if (a < b) return -1; + if (a > b) return 1; + return 0; +}; + +exports.compareIds = compareIds; + +/** + * @param {string} a first string + * @param {string} b second string + * @returns {-1|0|1} compare result + */ +const compareStrings = (a, b) => { + if (a < b) return -1; + if (a > b) return 1; + return 0; +}; + +exports.compareStrings = compareStrings; + +/** + * @param {ChunkGroup} a first chunk group + * @param {ChunkGroup} b second chunk group + * @returns {-1|0|1} compare result + */ +const compareChunkGroupsByIndex = (a, b) => { + return a.index < b.index ? -1 : 1; +}; + +exports.compareChunkGroupsByIndex = compareChunkGroupsByIndex; + +/** + * @template K1 {Object} + * @template K2 + * @template T + */ +class TwoKeyWeakMap { + constructor() { + /** @private @type {WeakMap>} */ + this._map = new WeakMap(); + } + + /** + * @param {K1} key1 first key + * @param {K2} key2 second key + * @returns {T | undefined} value + */ + get(key1, key2) { + const childMap = this._map.get(key1); + if (childMap === undefined) { + return undefined; + } + return childMap.get(key2); + } + + /** + * @param {K1} key1 first key + * @param {K2} key2 second key + * @param {T | undefined} value new value + * @returns {void} + */ + set(key1, key2, value) { + let childMap = this._map.get(key1); + if (childMap === undefined) { + childMap = new WeakMap(); + this._map.set(key1, childMap); + } + childMap.set(key2, value); + } +} + +/** @type {TwoKeyWeakMap, Comparator, Comparator>}} */ +const concatComparatorsCache = new TwoKeyWeakMap(); + +/** + * @template T + * @param {Comparator} c1 comparator + * @param {Comparator} c2 comparator + * @param {Comparator[]} cRest comparators + * @returns {Comparator} comparator + */ +const concatComparators = (c1, c2, ...cRest) => { + if (cRest.length > 0) { + const [c3, ...cRest2] = cRest; + return concatComparators(c1, concatComparators(c2, c3, ...cRest2)); + } + const cacheEntry = /** @type {Comparator} */ (concatComparatorsCache.get( + c1, + c2 + )); + if (cacheEntry !== undefined) return cacheEntry; + /** + * @param {T} a first value + * @param {T} b second value + * @returns {-1|0|1} compare result + */ + const result = (a, b) => { + const res = c1(a, b); + if (res !== 0) return res; + return c2(a, b); + }; + concatComparatorsCache.set(c1, c2, result); + return result; +}; +exports.concatComparators = concatComparators; + +/** @template A, B @typedef {(input: A) => B} Selector */ + +/** @type {TwoKeyWeakMap, Comparator, Comparator>}} */ +const compareSelectCache = new TwoKeyWeakMap(); + +/** + * @template T + * @template R + * @param {Selector} getter getter for value + * @param {Comparator} comparator comparator + * @returns {Comparator} comparator + */ +const compareSelect = (getter, comparator) => { + const cacheEntry = compareSelectCache.get(getter, comparator); + if (cacheEntry !== undefined) return cacheEntry; + /** + * @param {T} a first value + * @param {T} b second value + * @returns {-1|0|1} compare result + */ + const result = (a, b) => { + const aValue = getter(a); + const bValue = getter(b); + if (aValue !== undefined && aValue !== null) { + if (bValue !== undefined && bValue !== null) { + return comparator(aValue, bValue); + } + return -1; + } else { + if (bValue !== undefined && bValue !== null) { + return 1; + } + return 0; + } + }; + compareSelectCache.set(getter, comparator, result); + return result; +}; +exports.compareSelect = compareSelect; + +/** @type {WeakMap, Comparator>>} */ +const compareIteratorsCache = new WeakMap(); + +/** + * @template T + * @param {Comparator} elementComparator comparator for elements + * @returns {Comparator>} comparator for iterables of elements + */ +const compareIterables = elementComparator => { + const cacheEntry = compareIteratorsCache.get(elementComparator); + if (cacheEntry !== undefined) return cacheEntry; + /** + * @param {Iterable} a first value + * @param {Iterable} b second value + * @returns {-1|0|1} compare result + */ + const result = (a, b) => { + const aI = a[Symbol.iterator](); + const bI = b[Symbol.iterator](); + // eslint-disable-next-line no-constant-condition + while (true) { + const aItem = aI.next(); + const bItem = bI.next(); + if (aItem.done) { + return bItem.done ? 0 : -1; + } else if (bItem.done) { + return 1; + } + const res = elementComparator(aItem.value, bItem.value); + if (res !== 0) return res; + } + }; + compareIteratorsCache.set(elementComparator, result); + return result; +}; +exports.compareIterables = compareIterables; + +// TODO this is no longer needed when minimum node.js version is >= 12 +// since these versions ship with a stable sort function +/** + * @template T + * @param {Iterable} iterable original ordered list + * @returns {Comparator} comparator + */ +exports.keepOriginalOrder = iterable => { + /** @type {Map} */ + const map = new Map(); + let i = 0; + for (const item of iterable) { + map.set(item, i++); + } + return (a, b) => compareNumbers(map.get(a), map.get(b)); +}; + +/** + * @param {ChunkGraph} chunkGraph the chunk graph + * @returns {Comparator} comparator + */ +exports.compareChunksNatural = chunkGraph => { + const cmpFn = exports.compareModulesById(chunkGraph); + const cmpIterableFn = compareIterables(cmpFn); + return concatComparators( + compareSelect(chunk => chunk.name, compareIds), + compareSelect(chunk => chunk.runtime, compareRuntime), + compareSelect( + /** + * @param {Chunk} chunk a chunk + * @returns {Iterable} modules + */ + chunk => chunkGraph.getOrderedChunkModulesIterable(chunk, cmpFn), + cmpIterableFn + ) + ); +}; + +/** + * Compare two locations + * @param {DependencyLocation} a A location node + * @param {DependencyLocation} b A location node + * @returns {-1|0|1} sorting comparator value + */ +exports.compareLocations = (a, b) => { + let isObjectA = typeof a === "object" && a !== null; + let isObjectB = typeof b === "object" && b !== null; + if (!isObjectA || !isObjectB) { + if (isObjectA) return 1; + if (isObjectB) return -1; + return 0; + } + if ("start" in a && "start" in b) { + const ap = a.start; + const bp = b.start; + if (ap.line < bp.line) return -1; + if (ap.line > bp.line) return 1; + if (ap.column < bp.column) return -1; + if (ap.column > bp.column) return 1; + } + if ("name" in a && "name" in b) { + if (a.name < b.name) return -1; + if (a.name > b.name) return 1; + } + if ("index" in a && "index" in b) { + if (a.index < b.index) return -1; + if (a.index > b.index) return 1; + } + return 0; +}; + + +/***/ }), + +/***/ 29522: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const quoteMeta = str => { + return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&"); +}; + +const toSimpleString = str => { + if (`${+str}` === str) { + return str; + } + return JSON.stringify(str); +}; + +/** + * @param {Record} map value map + * @returns {true|false|function(string): string} true/false, when unconditionally true/false, or a template function to determine the value at runtime + */ +const compileBooleanMatcher = map => { + const positiveItems = Object.keys(map).filter(i => map[i]); + const negativeItems = Object.keys(map).filter(i => !map[i]); + if (positiveItems.length === 0) return false; + if (negativeItems.length === 0) return true; + return compileBooleanMatcherFromLists(positiveItems, negativeItems); +}; + +/** + * @param {string[]} positiveItems positive items + * @param {string[]} negativeItems negative items + * @returns {function(string): string} a template function to determine the value at runtime + */ +const compileBooleanMatcherFromLists = (positiveItems, negativeItems) => { + if (positiveItems.length === 0) return () => "false"; + if (negativeItems.length === 0) return () => "true"; + if (positiveItems.length === 1) + return value => `${toSimpleString(positiveItems[0])} == ${value}`; + if (negativeItems.length === 1) + return value => `${toSimpleString(negativeItems[0])} != ${value}`; + const positiveRegexp = itemsToRegexp(positiveItems); + const negativeRegexp = itemsToRegexp(negativeItems); + if (positiveRegexp.length <= negativeRegexp.length) { + return value => `/^${positiveRegexp}$/.test(${value})`; + } else { + return value => `!/^${negativeRegexp}$/.test(${value})`; + } +}; + +const popCommonItems = (itemsSet, getKey, condition) => { + const map = new Map(); + for (const item of itemsSet) { + const key = getKey(item); + if (key) { + let list = map.get(key); + if (list === undefined) { + list = []; + map.set(key, list); + } + list.push(item); + } + } + const result = []; + for (const list of map.values()) { + if (condition(list)) { + for (const item of list) { + itemsSet.delete(item); + } + result.push(list); + } + } + return result; +}; + +const getCommonPrefix = items => { + let prefix = items[0]; + for (let i = 1; i < items.length; i++) { + const item = items[i]; + for (let p = 0; p < prefix.length; p++) { + if (item[p] !== prefix[p]) { + prefix = prefix.slice(0, p); + break; + } + } + } + return prefix; +}; + +const getCommonSuffix = items => { + let suffix = items[0]; + for (let i = 1; i < items.length; i++) { + const item = items[i]; + for (let p = item.length - 1, s = suffix.length - 1; s >= 0; p--, s--) { + if (item[p] !== suffix[s]) { + suffix = suffix.slice(s + 1); + break; + } + } + } + return suffix; +}; + +const itemsToRegexp = itemsArr => { + if (itemsArr.length === 1) { + return quoteMeta(itemsArr[0]); + } + const finishedItems = []; + + // merge single char items: (a|b|c|d|ef) => ([abcd]|ef) + let countOfSingleCharItems = 0; + for (const item of itemsArr) { + if (item.length === 1) { + countOfSingleCharItems++; + } + } + // special case for only single char items + if (countOfSingleCharItems === itemsArr.length) { + return `[${quoteMeta(itemsArr.sort().join(""))}]`; + } + const items = new Set(itemsArr.sort()); + if (countOfSingleCharItems > 2) { + let singleCharItems = ""; + for (const item of items) { + if (item.length === 1) { + singleCharItems += item; + items.delete(item); + } + } + finishedItems.push(`[${quoteMeta(singleCharItems)}]`); + } + + // special case for 2 items with common prefix/suffix + if (finishedItems.length === 0 && items.size === 2) { + const prefix = getCommonPrefix(itemsArr); + const suffix = getCommonSuffix( + itemsArr.map(item => item.slice(prefix.length)) + ); + if (prefix.length > 0 || suffix.length > 0) { + return `${quoteMeta(prefix)}${itemsToRegexp( + itemsArr.map(i => i.slice(prefix.length, -suffix.length || undefined)) + )}${quoteMeta(suffix)}`; + } + } + + // special case for 2 items with common suffix + if (finishedItems.length === 0 && items.size === 2) { + const it = items[Symbol.iterator](); + const a = it.next().value; + const b = it.next().value; + if (a.length > 0 && b.length > 0 && a.slice(-1) === b.slice(-1)) { + return `${itemsToRegexp([a.slice(0, -1), b.slice(0, -1)])}${quoteMeta( + a.slice(-1) + )}`; + } + } + + // find common prefix: (a1|a2|a3|a4|b5) => (a(1|2|3|4)|b5) + const prefixed = popCommonItems( + items, + item => (item.length >= 1 ? item[0] : false), + list => { + if (list.length >= 3) return true; + if (list.length <= 1) return false; + return list[0][1] === list[1][1]; + } + ); + for (const prefixedItems of prefixed) { + const prefix = getCommonPrefix(prefixedItems); + finishedItems.push( + `${quoteMeta(prefix)}${itemsToRegexp( + prefixedItems.map(i => i.slice(prefix.length)) + )}` + ); + } + + // find common suffix: (a1|b1|c1|d1|e2) => ((a|b|c|d)1|e2) + const suffixed = popCommonItems( + items, + item => (item.length >= 1 ? item.slice(-1) : false), + list => { + if (list.length >= 3) return true; + if (list.length <= 1) return false; + return list[0].slice(-2) === list[1].slice(-2); + } + ); + for (const suffixedItems of suffixed) { + const suffix = getCommonSuffix(suffixedItems); + finishedItems.push( + `${itemsToRegexp( + suffixedItems.map(i => i.slice(0, -suffix.length)) + )}${quoteMeta(suffix)}` + ); + } + + // TODO further optimize regexp, i. e. + // use ranges: (1|2|3|4|a) => [1-4a] + const conditional = finishedItems.concat(Array.from(items, quoteMeta)); + if (conditional.length === 1) return conditional[0]; + return `(${conditional.join("|")})`; +}; + +compileBooleanMatcher.fromLists = compileBooleanMatcherFromLists; +compileBooleanMatcher.itemsToRegexp = itemsToRegexp; +module.exports = compileBooleanMatcher; + + +/***/ }), + +/***/ 34627: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Hash = __webpack_require__(32); + +const BULK_SIZE = 1000; + +const digestCache = new Map(); + +class BulkUpdateDecorator extends Hash { + /** + * @param {Hash | function(): Hash} hashOrFactory function to create a hash + * @param {string=} hashKey key for caching + */ + constructor(hashOrFactory, hashKey) { + super(); + this.hashKey = hashKey; + if (typeof hashOrFactory === "function") { + this.hashFactory = hashOrFactory; + this.hash = undefined; + } else { + this.hashFactory = undefined; + this.hash = hashOrFactory; + } + this.buffer = ""; + } + + /** + * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} + * @param {string|Buffer} data data + * @param {string=} inputEncoding data encoding + * @returns {this} updated hash + */ + update(data, inputEncoding) { + if ( + inputEncoding !== undefined || + typeof data !== "string" || + data.length > BULK_SIZE + ) { + if (this.hash === undefined) this.hash = this.hashFactory(); + if (this.buffer.length > 0) { + this.hash.update(this.buffer); + this.buffer = ""; + } + this.hash.update(data, inputEncoding); + } else { + this.buffer += data; + if (this.buffer.length > BULK_SIZE) { + if (this.hash === undefined) this.hash = this.hashFactory(); + this.hash.update(this.buffer); + this.buffer = ""; + } + } + return this; + } + + /** + * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} + * @param {string=} encoding encoding of the return value + * @returns {string|Buffer} digest + */ + digest(encoding) { + let cacheKey; + if (this.hash === undefined) { + // short data for hash, we can use caching + cacheKey = `${this.hashKey}-${encoding}-${this.buffer}`; + const cacheEntry = digestCache.get(cacheKey); + if (cacheEntry !== undefined) return cacheEntry; + this.hash = this.hashFactory(); + } + if (this.buffer.length > 0) { + this.hash.update(this.buffer); + } + const digestResult = this.hash.digest(encoding); + const result = + typeof digestResult === "string" ? digestResult : digestResult.toString(); + if (cacheKey !== undefined) { + digestCache.set(cacheKey, result); + } + return result; + } +} + +/* istanbul ignore next */ +class DebugHash extends Hash { + constructor() { + super(); + this.string = ""; + } + + /** + * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} + * @param {string|Buffer} data data + * @param {string=} inputEncoding data encoding + * @returns {this} updated hash + */ + update(data, inputEncoding) { + if (typeof data !== "string") data = data.toString("utf-8"); + if (data.startsWith("debug-digest-")) { + data = Buffer.from(data.slice("debug-digest-".length), "hex").toString(); + } + this.string += `[${data}](${new Error().stack.split("\n", 3)[2]})\n`; + return this; + } + + /** + * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} + * @param {string=} encoding encoding of the return value + * @returns {string|Buffer} digest + */ + digest(encoding) { + return "debug-digest-" + Buffer.from(this.string).toString("hex"); + } +} + +let crypto = undefined; + +/** + * Creates a hash by name or function + * @param {string | typeof Hash} algorithm the algorithm name or a constructor creating a hash + * @returns {Hash} the hash + */ +module.exports = algorithm => { + if (typeof algorithm === "function") { + return new BulkUpdateDecorator(() => new algorithm()); + } + switch (algorithm) { + // TODO add non-cryptographic algorithm here + case "debug": + return new DebugHash(); + default: + if (crypto === undefined) crypto = __webpack_require__(76417); + return new BulkUpdateDecorator( + () => crypto.createHash(algorithm), + algorithm + ); + } +}; + + +/***/ }), + +/***/ 57651: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); + +/** @type {Map} */ +const deprecationCache = new Map(); + +/** + * @typedef {Object} FakeHookMarker + * @property {true} _fakeHook it's a fake hook + */ + +/** @template T @typedef {T & FakeHookMarker} FakeHook */ + +/** + * @param {string} message deprecation message + * @param {string} code deprecation code + * @returns {Function} function to trigger deprecation + */ +const createDeprecation = (message, code) => { + const cached = deprecationCache.get(message); + if (cached !== undefined) return cached; + const fn = util.deprecate( + () => {}, + message, + "DEP_WEBPACK_DEPRECATION_" + code + ); + deprecationCache.set(message, fn); + return fn; +}; + +const COPY_METHODS = [ + "concat", + "entry", + "filter", + "find", + "findIndex", + "includes", + "indexOf", + "join", + "lastIndexOf", + "map", + "reduce", + "reduceRight", + "slice", + "some" +]; + +const DISABLED_METHODS = [ + "copyWithin", + "entries", + "fill", + "keys", + "pop", + "reverse", + "shift", + "splice", + "sort", + "unshift" +]; + +/** + * @param {any} set new set + * @param {string} name property name + * @returns {void} + */ +exports.arrayToSetDeprecation = (set, name) => { + for (const method of COPY_METHODS) { + if (set[method]) continue; + const d = createDeprecation( + `${name} was changed from Array to Set (using Array method '${method}' is deprecated)`, + "ARRAY_TO_SET" + ); + /** + * @deprecated + * @this {Set} + * @returns {number} count + */ + set[method] = function () { + d(); + const array = Array.from(this); + return Array.prototype[method].apply(array, arguments); + }; + } + const dPush = createDeprecation( + `${name} was changed from Array to Set (using Array method 'push' is deprecated)`, + "ARRAY_TO_SET_PUSH" + ); + const dLength = createDeprecation( + `${name} was changed from Array to Set (using Array property 'length' is deprecated)`, + "ARRAY_TO_SET_LENGTH" + ); + const dIndexer = createDeprecation( + `${name} was changed from Array to Set (indexing Array is deprecated)`, + "ARRAY_TO_SET_INDEXER" + ); + /** + * @deprecated + * @this {Set} + * @returns {number} count + */ + set.push = function () { + dPush(); + for (const item of Array.from(arguments)) { + this.add(item); + } + return this.size; + }; + for (const method of DISABLED_METHODS) { + if (set[method]) continue; + set[method] = () => { + throw new Error( + `${name} was changed from Array to Set (using Array method '${method}' is not possible)` + ); + }; + } + const createIndexGetter = index => { + /** + * @this {Set} a Set + * @returns {any} the value at this location + */ + const fn = function () { + dIndexer(); + let i = 0; + for (const item of this) { + if (i++ === index) return item; + } + return undefined; + }; + return fn; + }; + const defineIndexGetter = index => { + Object.defineProperty(set, index, { + get: createIndexGetter(index), + set(value) { + throw new Error( + `${name} was changed from Array to Set (indexing Array with write is not possible)` + ); + } + }); + }; + defineIndexGetter(0); + let indexerDefined = 1; + Object.defineProperty(set, "length", { + get() { + dLength(); + const length = this.size; + for (indexerDefined; indexerDefined < length + 1; indexerDefined++) { + defineIndexGetter(indexerDefined); + } + return length; + }, + set(value) { + throw new Error( + `${name} was changed from Array to Set (writing to Array property 'length' is not possible)` + ); + } + }); + set[Symbol.isConcatSpreadable] = true; +}; + +exports.createArrayToSetDeprecationSet = name => { + class SetDeprecatedArray extends Set {} + exports.arrayToSetDeprecation(SetDeprecatedArray.prototype, name); + return SetDeprecatedArray; +}; + +exports.soonFrozenObjectDeprecation = (obj, name, code, note = "") => { + const message = `${name} will be frozen in future, all modifications are deprecated.${ + note && `\n${note}` + }`; + return new Proxy(obj, { + set: util.deprecate( + (target, property, value, receiver) => + Reflect.set(target, property, value, receiver), + message, + code + ), + defineProperty: util.deprecate( + (target, property, descriptor) => + Reflect.defineProperty(target, property, descriptor), + message, + code + ), + deleteProperty: util.deprecate( + (target, property) => Reflect.deleteProperty(target, property), + message, + code + ), + setPrototypeOf: util.deprecate( + (target, proto) => Reflect.setPrototypeOf(target, proto), + message, + code + ) + }); +}; + +/** + * @template T + * @param {T} obj object + * @param {string} message deprecation message + * @param {string} code deprecation code + * @returns {T} object with property access deprecated + */ +const deprecateAllProperties = (obj, message, code) => { + const newObj = {}; + const descriptors = Object.getOwnPropertyDescriptors(obj); + for (const name of Object.keys(descriptors)) { + const descriptor = descriptors[name]; + if (typeof descriptor.value === "function") { + Object.defineProperty(newObj, name, { + ...descriptor, + value: util.deprecate(descriptor.value, message, code) + }); + } else if (descriptor.get || descriptor.set) { + Object.defineProperty(newObj, name, { + ...descriptor, + get: descriptor.get && util.deprecate(descriptor.get, message, code), + set: descriptor.set && util.deprecate(descriptor.set, message, code) + }); + } else { + let value = descriptor.value; + Object.defineProperty(newObj, name, { + configurable: descriptor.configurable, + enumerable: descriptor.enumerable, + get: util.deprecate(() => value, message, code), + set: descriptor.writable + ? util.deprecate(v => (value = v), message, code) + : undefined + }); + } + } + return /** @type {T} */ (newObj); +}; +exports.deprecateAllProperties = deprecateAllProperties; + +/** + * @template T + * @param {T} fakeHook fake hook implementation + * @param {string=} message deprecation message (not deprecated when unset) + * @param {string=} code deprecation code (not deprecated when unset) + * @returns {FakeHook} fake hook which redirects + */ +exports.createFakeHook = (fakeHook, message, code) => { + if (message && code) { + fakeHook = deprecateAllProperties(fakeHook, message, code); + } + return Object.freeze( + Object.assign(fakeHook, { _fakeHook: /** @type {true} */ (true) }) + ); +}; + + +/***/ }), + +/***/ 88213: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +// Simulations show these probabilities for a single change +// 93.1% that one group is invalidated +// 4.8% that two groups are invalidated +// 1.1% that 3 groups are invalidated +// 0.1% that 4 or more groups are invalidated +// +// And these for removing/adding 10 lexically adjacent files +// 64.5% that one group is invalidated +// 24.8% that two groups are invalidated +// 7.8% that 3 groups are invalidated +// 2.7% that 4 or more groups are invalidated +// +// And these for removing/adding 3 random files +// 0% that one group is invalidated +// 3.7% that two groups are invalidated +// 80.8% that 3 groups are invalidated +// 12.3% that 4 groups are invalidated +// 3.2% that 5 or more groups are invalidated + +/** + * + * @param {string} a key + * @param {string} b key + * @returns {number} the similarity as number + */ +const similarity = (a, b) => { + const l = Math.min(a.length, b.length); + let dist = 0; + for (let i = 0; i < l; i++) { + const ca = a.charCodeAt(i); + const cb = b.charCodeAt(i); + dist += Math.max(0, 10 - Math.abs(ca - cb)); + } + return dist; +}; + +/** + * @param {string} a key + * @param {string} b key + * @param {Set} usedNames set of already used names + * @returns {string} the common part and a single char for the difference + */ +const getName = (a, b, usedNames) => { + const l = Math.min(a.length, b.length); + let i = 0; + while (i < l) { + if (a.charCodeAt(i) !== b.charCodeAt(i)) { + i++; + break; + } + i++; + } + while (i < l) { + const name = a.slice(0, i); + const lowerName = name.toLowerCase(); + if (!usedNames.has(lowerName)) { + usedNames.add(lowerName); + return name; + } + i++; + } + // names always contain a hash, so this is always unique + // we don't need to check usedNames nor add it + return a; +}; + +/** + * @param {Record} total total size + * @param {Record} size single size + * @returns {void} + */ +const addSizeTo = (total, size) => { + for (const key of Object.keys(size)) { + total[key] = (total[key] || 0) + size[key]; + } +}; + +/** + * @param {Iterable} nodes some nodes + * @returns {Record} total size + */ +const sumSize = nodes => { + const sum = Object.create(null); + for (const node of nodes) { + addSizeTo(sum, node.size); + } + return sum; +}; + +const isTooBig = (size, maxSize) => { + for (const key of Object.keys(size)) { + const maxSizeValue = maxSize[key]; + if (typeof maxSizeValue === "number") { + if (size[key] > maxSizeValue) return true; + } + } + return false; +}; + +const isTooSmall = (size, minSize) => { + for (const key of Object.keys(size)) { + const minSizeValue = minSize[key]; + if (typeof minSizeValue === "number") { + if (size[key] < minSizeValue) return true; + } + } + return false; +}; + +const getToSmallTypes = (size, minSize) => { + const types = new Set(); + for (const key of Object.keys(size)) { + const minSizeValue = minSize[key]; + if (typeof minSizeValue === "number") { + if (size[key] < minSizeValue) types.add(key); + } + } + return types; +}; + +const getNumberOfMatchingSizeTypes = (size, types) => { + let i = 0; + for (const key of Object.keys(size)) { + if (types.has(key)) i++; + } + return i; +}; + +const selectiveSizeSum = (size, types) => { + let sum = 0; + for (const key of Object.keys(size)) { + if (types.has(key)) sum += size[key]; + } + return sum; +}; + +/** + * @template T + */ +class Node { + /** + * @param {T} item item + * @param {string} key key + * @param {Record} size size + */ + constructor(item, key, size) { + this.item = item; + this.key = key; + this.size = size; + } +} + +/** + * @template T + */ +class Group { + /** + * @param {Node[]} nodes nodes + * @param {number[]} similarities similarities between the nodes (length = nodes.length - 1) + * @param {Record=} size size of the group + */ + constructor(nodes, similarities, size) { + this.nodes = nodes; + this.similarities = similarities; + this.size = size || sumSize(nodes); + /** @type {string} */ + this.key = undefined; + } + + /** + * @param {function(Node): boolean} filter filter function + * @returns {Node[]} removed nodes + */ + popNodes(filter) { + const newNodes = []; + const newSimilarities = []; + const resultNodes = []; + let lastNode; + for (let i = 0; i < this.nodes.length; i++) { + const node = this.nodes[i]; + if (filter(node)) { + resultNodes.push(node); + } else { + if (newNodes.length > 0) { + newSimilarities.push( + lastNode === this.nodes[i - 1] + ? this.similarities[i - 1] + : similarity(lastNode.key, node.key) + ); + } + newNodes.push(node); + lastNode = node; + } + } + this.nodes = newNodes; + this.similarities = newSimilarities; + this.size = sumSize(newNodes); + return resultNodes; + } +} + +/** + * @param {Iterable} nodes nodes + * @returns {number[]} similarities + */ +const getSimilarities = nodes => { + // calculate similarities between lexically adjacent nodes + /** @type {number[]} */ + const similarities = []; + let last = undefined; + for (const node of nodes) { + if (last !== undefined) { + similarities.push(similarity(last.key, node.key)); + } + last = node; + } + return similarities; +}; + +/** + * @template T + * @typedef {Object} GroupedItems + * @property {string} key + * @property {T[]} items + * @property {Record} size + */ + +/** + * @template T + * @typedef {Object} Options + * @property {Record} maxSize maximum size of a group + * @property {Record} minSize minimum size of a group (preferred over maximum size) + * @property {Iterable} items a list of items + * @property {function(T): Record} getSize function to get size of an item + * @property {function(T): string} getKey function to get the key of an item + */ + +/** + * @template T + * @param {Options} options options object + * @returns {GroupedItems[]} grouped items + */ +module.exports = ({ maxSize, minSize, items, getSize, getKey }) => { + /** @type {Group[]} */ + const result = []; + + const nodes = Array.from( + items, + item => new Node(item, getKey(item), getSize(item)) + ); + + /** @type {Node[]} */ + const initialNodes = []; + + // lexically ordering of keys + nodes.sort((a, b) => { + if (a.key < b.key) return -1; + if (a.key > b.key) return 1; + return 0; + }); + + // return nodes bigger than maxSize directly as group + // But make sure that minSize is not violated + for (const node of nodes) { + if (isTooBig(node.size, maxSize) && !isTooSmall(node.size, minSize)) { + result.push(new Group([node], [])); + } else { + initialNodes.push(node); + } + } + + if (initialNodes.length > 0) { + const initialGroup = new Group(initialNodes, getSimilarities(initialNodes)); + + const problemTypes = getToSmallTypes(initialGroup.size, minSize); + if (problemTypes.size > 0) { + // We hit an edge case where the working set is already smaller than minSize + // We merge problematic nodes with the smallest result node to keep minSize intact + const problemNodes = initialGroup.popNodes( + n => getNumberOfMatchingSizeTypes(n.size, problemTypes) > 0 + ); + // Only merge it with result nodes that have the problematic size type + const possibleResultGroups = result.filter( + n => getNumberOfMatchingSizeTypes(n.size, problemTypes) > 0 + ); + if (possibleResultGroups.length > 0) { + const bestGroup = possibleResultGroups.reduce((min, group) => { + const minMatches = getNumberOfMatchingSizeTypes(min, problemTypes); + const groupMatches = getNumberOfMatchingSizeTypes( + group, + problemTypes + ); + if (minMatches !== groupMatches) + return minMatches < groupMatches ? group : min; + if ( + selectiveSizeSum(min.size, problemTypes) > + selectiveSizeSum(group.size, problemTypes) + ) + return group; + return min; + }); + for (const node of problemNodes) bestGroup.nodes.push(node); + bestGroup.nodes.sort((a, b) => { + if (a.key < b.key) return -1; + if (a.key > b.key) return 1; + return 0; + }); + } else { + // There are no other nodes with the same size types + // We create a new group and have to accept that it's smaller than minSize + result.push(new Group(problemNodes, null)); + } + } + if (initialGroup.nodes.length > 0) { + const queue = [initialGroup]; + + while (queue.length) { + const group = queue.pop(); + // only groups bigger than maxSize need to be splitted + if (!isTooBig(group.size, maxSize)) { + result.push(group); + continue; + } + + // find unsplittable area from left and right + // going minSize from left and right + // at least one node need to be included otherwise we get stuck + let left = 1; + let leftSize = Object.create(null); + addSizeTo(leftSize, group.nodes[0].size); + while (isTooSmall(leftSize, minSize)) { + addSizeTo(leftSize, group.nodes[left].size); + left++; + } + let right = group.nodes.length - 2; + let rightSize = Object.create(null); + addSizeTo(rightSize, group.nodes[group.nodes.length - 1].size); + while (isTooSmall(rightSize, minSize)) { + addSizeTo(rightSize, group.nodes[right].size); + right--; + } + + if (left - 1 > right) { + // can't split group while holding minSize + // because minSize is preferred of maxSize we return + // the problematic nodes as result here even while it's too big + // To avoid this make sure maxSize > minSize * 3 + result.push(group); + continue; + } + if (left <= right) { + // when there is a area between left and right + // we look for best split point + // we split at the minimum similarity + // here key space is separated the most + let best = left - 1; + let bestSimilarity = group.similarities[best]; + for (let i = left; i <= right; i++) { + const similarity = group.similarities[i]; + if (similarity < bestSimilarity) { + best = i; + bestSimilarity = similarity; + } + } + left = best + 1; + right = best; + } + + // create two new groups for left and right area + // and queue them up + const rightNodes = [group.nodes[right + 1]]; + /** @type {number[]} */ + const rightSimilarities = []; + for (let i = right + 2; i < group.nodes.length; i++) { + rightSimilarities.push(group.similarities[i - 1]); + rightNodes.push(group.nodes[i]); + } + queue.push(new Group(rightNodes, rightSimilarities)); + + const leftNodes = [group.nodes[0]]; + /** @type {number[]} */ + const leftSimilarities = []; + for (let i = 1; i < left; i++) { + leftSimilarities.push(group.similarities[i - 1]); + leftNodes.push(group.nodes[i]); + } + queue.push(new Group(leftNodes, leftSimilarities)); + } + } + } + + // lexically ordering + result.sort((a, b) => { + if (a.nodes[0].key < b.nodes[0].key) return -1; + if (a.nodes[0].key > b.nodes[0].key) return 1; + return 0; + }); + + // give every group a name + const usedNames = new Set(); + for (let i = 0; i < result.length; i++) { + const group = result[i]; + if (group.nodes.length === 1) { + group.key = group.nodes[0].key; + } else { + const first = group.nodes[0]; + const last = group.nodes[group.nodes.length - 1]; + const name = getName(first.key, last.key, usedNames); + group.key = name; + } + } + + // return the results + return result.map(group => { + /** @type {GroupedItems} */ + return { + key: group.key, + items: group.nodes.map(node => node.item), + size: group.size + }; + }); +}; + + +/***/ }), + +/***/ 33339: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Sam Chen @chenxsan +*/ + + + +/** + * @param {string} urlAndGlobal the script request + * @returns {string[]} script url and its global variable + */ +module.exports = function extractUrlAndGlobal(urlAndGlobal) { + const index = urlAndGlobal.indexOf("@"); + return [urlAndGlobal.substring(index + 1), urlAndGlobal.substring(0, index)]; +}; + + +/***/ }), + +/***/ 76019: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const NO_MARKER = 0; +const IN_PROGRESS_MARKER = 1; +const DONE_MARKER = 2; +const DONE_MAYBE_ROOT_CYCLE_MARKER = 3; +const DONE_AND_ROOT_MARKER = 4; + +/** + * @template T + */ +class Node { + /** + * @param {T} item the value of the node + */ + constructor(item) { + this.item = item; + /** @type {Set>} */ + this.dependencies = new Set(); + this.marker = NO_MARKER; + /** @type {Cycle | undefined} */ + this.cycle = undefined; + this.incoming = 0; + } +} + +/** + * @template T + */ +class Cycle { + constructor() { + /** @type {Set>} */ + this.nodes = new Set(); + } +} + +/** + * @template T + * @typedef {Object} StackEntry + * @property {Node} node + * @property {Node[]} openEdges + */ + +/** + * @template T + * @param {Iterable} items list of items + * @param {function(T): Iterable} getDependencies function to get dependencies of an item (items that are not in list are ignored) + * @returns {Iterable} graph roots of the items + */ +module.exports = (items, getDependencies) => { + /** @type {Map>} */ + const itemToNode = new Map(); + for (const item of items) { + const node = new Node(item); + itemToNode.set(item, node); + } + + // early exit when there is only a single item + if (itemToNode.size <= 1) return items; + + // grab all the dependencies + for (const node of itemToNode.values()) { + for (const dep of getDependencies(node.item)) { + const depNode = itemToNode.get(dep); + if (depNode !== undefined) { + node.dependencies.add(depNode); + } + } + } + + // Set of current root modules + // items will be removed if a new reference to it has been found + /** @type {Set>} */ + const roots = new Set(); + + // Set of current cycles without references to it + // cycles will be removed if a new reference to it has been found + // that is not part of the cycle + /** @type {Set>} */ + const rootCycles = new Set(); + + // For all non-marked nodes + for (const selectedNode of itemToNode.values()) { + if (selectedNode.marker === NO_MARKER) { + // deep-walk all referenced modules + // in a non-recursive way + + // start by entering the selected node + selectedNode.marker = IN_PROGRESS_MARKER; + + // keep a stack to avoid recursive walk + /** @type {StackEntry[]} */ + const stack = [ + { + node: selectedNode, + openEdges: Array.from(selectedNode.dependencies) + } + ]; + + // process the top item until stack is empty + while (stack.length > 0) { + const topOfStack = stack[stack.length - 1]; + + // Are there still edges unprocessed in the current node? + if (topOfStack.openEdges.length > 0) { + // Process one dependency + const dependency = topOfStack.openEdges.pop(); + switch (dependency.marker) { + case NO_MARKER: + // dependency has not be visited yet + // mark it as in-progress and recurse + stack.push({ + node: dependency, + openEdges: Array.from(dependency.dependencies) + }); + dependency.marker = IN_PROGRESS_MARKER; + break; + case IN_PROGRESS_MARKER: { + // It's a in-progress cycle + let cycle = dependency.cycle; + if (!cycle) { + cycle = new Cycle(); + cycle.nodes.add(dependency); + dependency.cycle = cycle; + } + // set cycle property for each node in the cycle + // if nodes are already part of a cycle + // we merge the cycles to a shared cycle + for ( + let i = stack.length - 1; + stack[i].node !== dependency; + i-- + ) { + const node = stack[i].node; + if (node.cycle) { + if (node.cycle !== cycle) { + // merge cycles + for (const cycleNode of node.cycle.nodes) { + cycleNode.cycle = cycle; + cycle.nodes.add(cycleNode); + } + } + } else { + node.cycle = cycle; + cycle.nodes.add(node); + } + } + // don't recurse into dependencies + // these are already on the stack + break; + } + case DONE_AND_ROOT_MARKER: + // This node has be visited yet and is currently a root node + // But as this is a new reference to the node + // it's not really a root + // so we have to convert it to a normal node + dependency.marker = DONE_MARKER; + roots.delete(dependency); + break; + case DONE_MAYBE_ROOT_CYCLE_MARKER: + // This node has be visited yet and + // is maybe currently part of a completed root cycle + // we found a new reference to the cycle + // so it's not really a root cycle + // remove the cycle from the root cycles + // and convert it to a normal node + rootCycles.delete(dependency.cycle); + dependency.marker = DONE_MARKER; + break; + // DONE_MARKER: nothing to do, don't recurse into dependencies + } + } else { + // All dependencies of the current node has been visited + // we leave the node + stack.pop(); + topOfStack.node.marker = DONE_MARKER; + } + } + const cycle = selectedNode.cycle; + if (cycle) { + for (const node of cycle.nodes) { + node.marker = DONE_MAYBE_ROOT_CYCLE_MARKER; + } + rootCycles.add(cycle); + } else { + selectedNode.marker = DONE_AND_ROOT_MARKER; + roots.add(selectedNode); + } + } + } + + // Extract roots from root cycles + // We take the nodes with most incoming edges + // inside of the cycle + for (const cycle of rootCycles) { + let max = 0; + /** @type {Set>} */ + const cycleRoots = new Set(); + const nodes = cycle.nodes; + for (const node of nodes) { + for (const dep of node.dependencies) { + if (nodes.has(dep)) { + dep.incoming++; + if (dep.incoming < max) continue; + if (dep.incoming > max) { + cycleRoots.clear(); + max = dep.incoming; + } + cycleRoots.add(dep); + } + } + } + for (const cycleRoot of cycleRoots) { + roots.add(cycleRoot); + } + } + + // When roots were found, return them + if (roots.size > 0) { + return Array.from(roots, r => r.item); + } else { + throw new Error("Implementation of findGraphRoots is broken"); + } +}; + + +/***/ }), + +/***/ 71593: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const path = __webpack_require__(85622); + +/** @typedef {import("fs").Stats} NodeFsStats */ +/** @typedef {import("../../declarations/WebpackOptions").WatchOptions} WatchOptions */ +/** @typedef {import("../FileSystemInfo").FileSystemInfoEntry} FileSystemInfoEntry */ + +/** @typedef {function(NodeJS.ErrnoException=): void} Callback */ +/** @typedef {function(NodeJS.ErrnoException=, Buffer=): void} BufferCallback */ +/** @typedef {function(NodeJS.ErrnoException=, Buffer|string=): void} BufferOrStringCallback */ +/** @typedef {function(NodeJS.ErrnoException=, string[]=): void} StringArrayCallback */ +/** @typedef {function(NodeJS.ErrnoException=, string=): void} StringCallback */ +/** @typedef {function(NodeJS.ErrnoException=, number=): void} NumberCallback */ +/** @typedef {function(NodeJS.ErrnoException=, NodeFsStats=): void} StatsCallback */ +/** @typedef {function((NodeJS.ErrnoException | Error)=, any=): void} ReadJsonCallback */ + +/** + * @typedef {Object} Watcher + * @property {function(): void} close closes the watcher and all underlying file watchers + * @property {function(): void} pause closes the watcher, but keeps underlying file watchers alive until the next watch call + * @property {function(): Map} getFileTimeInfoEntries get info about files + * @property {function(): Map} getContextTimeInfoEntries get info about directories + */ + +/** + * @callback WatchMethod + * @param {Iterable} files watched files + * @param {Iterable} directories watched directories + * @param {Iterable} missing watched exitance entries + * @param {number} startTime timestamp of start time + * @param {WatchOptions} options options object + * @param {function(Error=, Map, Map, Set, Set): void} callback aggregated callback + * @param {function(string, number): void} callbackUndelayed callback when the first change was detected + * @returns {Watcher} a watcher + */ + +/** + * @typedef {Object} OutputFileSystem + * @property {function(string, Buffer|string, Callback): void} writeFile + * @property {function(string, Callback): void} mkdir + * @property {function(string, StatsCallback): void} stat + * @property {function(string, BufferCallback): void} readFile + * @property {(function(string, string): string)=} join + * @property {(function(string, string): string)=} relative + * @property {(function(string): string)=} dirname + */ + +/** + * @typedef {Object} InputFileSystem + * @property {function(string, BufferCallback): void} readFile + * @property {(function(string, ReadJsonCallback): void)=} readJson + * @property {function(string, BufferOrStringCallback): void} readlink + * @property {function(string, StringArrayCallback): void} readdir + * @property {function(string, StatsCallback): void} stat + * @property {(function(string, StringCallback): void)=} realpath + * @property {(function(string=): void)=} purge + * @property {(function(string, string): string)=} join + * @property {(function(string, string): string)=} relative + * @property {(function(string): string)=} dirname + */ + +/** + * @typedef {Object} WatchFileSystem + * @property {WatchMethod} watch + */ + +/** + * @typedef {Object} IntermediateFileSystemExtras + * @property {function(string): void} mkdirSync + * @property {function(string): import("fs").WriteStream} createWriteStream + * @property {function(string, string, NumberCallback): void} open + * @property {function(number, Buffer, number, number, number, NumberCallback): void} read + * @property {function(number, Callback): void} close + * @property {function(string, string, Callback): void} rename + */ + +/** @typedef {InputFileSystem & OutputFileSystem & IntermediateFileSystemExtras} IntermediateFileSystem */ + +/** + * + * @param {InputFileSystem|OutputFileSystem|undefined} fs a file system + * @param {string} rootPath the root path + * @param {string} targetPath the target path + * @returns {string} location of targetPath relative to rootPath + */ +const relative = (fs, rootPath, targetPath) => { + if (fs && fs.relative) { + return fs.relative(rootPath, targetPath); + } else if (rootPath.startsWith("/")) { + return path.posix.relative(rootPath, targetPath); + } else if (rootPath.length > 1 && rootPath[1] === ":") { + return path.win32.relative(rootPath, targetPath); + } else { + throw new Error( + `${rootPath} is neither a posix nor a windows path, and there is no 'relative' method defined in the file system` + ); + } +}; +exports.relative = relative; + +/** + * @param {InputFileSystem|OutputFileSystem|undefined} fs a file system + * @param {string} rootPath a path + * @param {string} filename a filename + * @returns {string} the joined path + */ +const join = (fs, rootPath, filename) => { + if (fs && fs.join) { + return fs.join(rootPath, filename); + } else if (rootPath.startsWith("/")) { + return path.posix.join(rootPath, filename); + } else if (rootPath.length > 1 && rootPath[1] === ":") { + return path.win32.join(rootPath, filename); + } else { + throw new Error( + `${rootPath} is neither a posix nor a windows path, and there is no 'join' method defined in the file system` + ); + } +}; +exports.join = join; + +/** + * @param {InputFileSystem|OutputFileSystem|undefined} fs a file system + * @param {string} absPath an absolute path + * @returns {string} the parent directory of the absolute path + */ +const dirname = (fs, absPath) => { + if (fs && fs.dirname) { + return fs.dirname(absPath); + } else if (absPath.startsWith("/")) { + return path.posix.dirname(absPath); + } else if (absPath.length > 1 && absPath[1] === ":") { + return path.win32.dirname(absPath); + } else { + throw new Error( + `${absPath} is neither a posix nor a windows path, and there is no 'dirname' method defined in the file system` + ); + } +}; +exports.dirname = dirname; + +/** + * @param {OutputFileSystem} fs a file system + * @param {string} p an absolute path + * @param {function(Error=): void} callback callback function for the error + * @returns {void} + */ +const mkdirp = (fs, p, callback) => { + fs.mkdir(p, err => { + if (err) { + if (err.code === "ENOENT") { + const dir = dirname(fs, p); + if (dir === p) { + callback(err); + return; + } + mkdirp(fs, dir, err => { + if (err) { + callback(err); + return; + } + fs.mkdir(p, err => { + if (err) { + if (err.code === "EEXIST") { + callback(); + return; + } + callback(err); + return; + } + callback(); + }); + }); + return; + } else if (err.code === "EEXIST") { + callback(); + return; + } + callback(err); + return; + } + callback(); + }); +}; +exports.mkdirp = mkdirp; + +/** + * @param {IntermediateFileSystem} fs a file system + * @param {string} p an absolute path + * @returns {void} + */ +const mkdirpSync = (fs, p) => { + try { + fs.mkdirSync(p); + } catch (err) { + if (err) { + if (err.code === "ENOENT") { + const dir = dirname(fs, p); + if (dir === p) { + throw err; + } + mkdirpSync(fs, dir); + fs.mkdirSync(p); + return; + } else if (err.code === "EEXIST") { + return; + } + throw err; + } + } +}; +exports.mkdirpSync = mkdirpSync; + +/** + * @param {InputFileSystem} fs a file system + * @param {string} p an absolute path + * @param {ReadJsonCallback} callback callback + * @returns {void} + */ +const readJson = (fs, p, callback) => { + if ("readJson" in fs) return fs.readJson(p, callback); + fs.readFile(p, (err, buf) => { + if (err) return callback(err); + let data; + try { + data = JSON.parse(buf.toString("utf-8")); + } catch (e) { + return callback(e); + } + return callback(null, data); + }); +}; +exports.readJson = readJson; + + +/***/ }), + +/***/ 47779: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const path = __webpack_require__(85622); + +const WINDOWS_ABS_PATH_REGEXP = /^[a-zA-Z]:[\\/]/; +const SEGMENTS_SPLIT_REGEXP = /([|!])/; +const WINDOWS_PATH_SEPARATOR_REGEXP = /\\/g; + +/** + * @typedef {Object} MakeRelativePathsCache + * @property {Map>=} relativePaths + */ + +/** + * @param {string} context context for relative path + * @param {string} maybeAbsolutePath path to make relative + * @returns {string} relative path in request style + */ +const absoluteToRequest = (context, maybeAbsolutePath) => { + if (maybeAbsolutePath[0] === "/") { + if ( + maybeAbsolutePath.length > 1 && + maybeAbsolutePath[maybeAbsolutePath.length - 1] === "/" + ) { + // this 'path' is actually a regexp generated by dynamic requires. + // Don't treat it as an absolute path. + return maybeAbsolutePath; + } + + const querySplitPos = maybeAbsolutePath.indexOf("?"); + let resource = + querySplitPos === -1 + ? maybeAbsolutePath + : maybeAbsolutePath.slice(0, querySplitPos); + resource = path.posix.relative(context, resource); + if (!resource.startsWith("../")) { + resource = "./" + resource; + } + return querySplitPos === -1 + ? resource + : resource + maybeAbsolutePath.slice(querySplitPos); + } + + if (WINDOWS_ABS_PATH_REGEXP.test(maybeAbsolutePath)) { + const querySplitPos = maybeAbsolutePath.indexOf("?"); + let resource = + querySplitPos === -1 + ? maybeAbsolutePath + : maybeAbsolutePath.slice(0, querySplitPos); + resource = path.win32.relative(context, resource); + if (!WINDOWS_ABS_PATH_REGEXP.test(resource)) { + resource = resource.replace(WINDOWS_PATH_SEPARATOR_REGEXP, "/"); + if (!resource.startsWith("../")) { + resource = "./" + resource; + } + } + return querySplitPos === -1 + ? resource + : resource + maybeAbsolutePath.slice(querySplitPos); + } + + // not an absolute path + return maybeAbsolutePath; +}; + +/** + * @param {string} context context for relative path + * @param {string} relativePath path + * @returns {string} absolute path + */ +const requestToAbsolute = (context, relativePath) => { + if (relativePath.startsWith("./") || relativePath.startsWith("../")) + return path.join(context, relativePath); + return relativePath; +}; + +const makeCacheable = fn => { + /** @type {WeakMap>>} */ + const cache = new WeakMap(); + + /** + * @param {string} context context used to create relative path + * @param {string} identifier identifier used to create relative path + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {string} the returned relative path + */ + const cachedFn = (context, identifier, associatedObjectForCache) => { + if (!associatedObjectForCache) return fn(context, identifier); + + let innerCache = cache.get(associatedObjectForCache); + if (innerCache === undefined) { + innerCache = new Map(); + cache.set(associatedObjectForCache, innerCache); + } + + let cachedResult; + let innerSubCache = innerCache.get(context); + if (innerSubCache === undefined) { + innerCache.set(context, (innerSubCache = new Map())); + } else { + cachedResult = innerSubCache.get(identifier); + } + + if (cachedResult !== undefined) { + return cachedResult; + } else { + const result = fn(context, identifier); + innerSubCache.set(identifier, result); + return result; + } + }; + + /** + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {function(string, string): string} cached function + */ + cachedFn.bindCache = associatedObjectForCache => { + let innerCache; + if (associatedObjectForCache) { + innerCache = cache.get(associatedObjectForCache); + if (innerCache === undefined) { + innerCache = new Map(); + cache.set(associatedObjectForCache, innerCache); + } + } else { + innerCache = new Map(); + } + + /** + * @param {string} context context used to create relative path + * @param {string} identifier identifier used to create relative path + * @returns {string} the returned relative path + */ + const boundFn = (context, identifier) => { + let cachedResult; + let innerSubCache = innerCache.get(context); + if (innerSubCache === undefined) { + innerCache.set(context, (innerSubCache = new Map())); + } else { + cachedResult = innerSubCache.get(identifier); + } + + if (cachedResult !== undefined) { + return cachedResult; + } else { + const result = fn(context, identifier); + innerSubCache.set(identifier, result); + return result; + } + }; + + return boundFn; + }; + + /** + * @param {string} context context used to create relative path + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {function(string): string} cached function + */ + cachedFn.bindContextCache = (context, associatedObjectForCache) => { + let innerSubCache; + if (associatedObjectForCache) { + let innerCache = cache.get(associatedObjectForCache); + if (innerCache === undefined) { + innerCache = new Map(); + cache.set(associatedObjectForCache, innerCache); + } + + innerSubCache = innerCache.get(context); + if (innerSubCache === undefined) { + innerCache.set(context, (innerSubCache = new Map())); + } + } else { + innerSubCache = new Map(); + } + + /** + * @param {string} identifier identifier used to create relative path + * @returns {string} the returned relative path + */ + const boundFn = identifier => { + const cachedResult = innerSubCache.get(identifier); + if (cachedResult !== undefined) { + return cachedResult; + } else { + const result = fn(context, identifier); + innerSubCache.set(identifier, result); + return result; + } + }; + + return boundFn; + }; + + return cachedFn; +}; + +/** + * + * @param {string} context context for relative path + * @param {string} identifier identifier for path + * @returns {string} a converted relative path + */ +const _makePathsRelative = (context, identifier) => { + return identifier + .split(SEGMENTS_SPLIT_REGEXP) + .map(str => absoluteToRequest(context, str)) + .join(""); +}; + +exports.makePathsRelative = makeCacheable(_makePathsRelative); + +/** + * @param {string} context absolute context path + * @param {string} request any request string may containing absolute paths, query string, etc. + * @returns {string} a new request string avoiding absolute paths when possible + */ +const _contextify = (context, request) => { + return request + .split("!") + .map(r => absoluteToRequest(context, r)) + .join("!"); +}; + +const contextify = makeCacheable(_contextify); +exports.contextify = contextify; + +/** + * @param {string} context absolute context path + * @param {string} request any request string + * @returns {string} a new request string using absolute paths when possible + */ +const _absolutify = (context, request) => { + return request + .split("!") + .map(r => requestToAbsolute(context, r)) + .join("!"); +}; + +const absolutify = makeCacheable(_absolutify); +exports.absolutify = absolutify; + +const PATH_QUERY_FRAGMENT_REGEXP = /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; + +/** @typedef {{ resource: string, path: string, query: string, fragment: string }} ParsedResource */ + +/** + * @param {string} str the path with query and fragment + * @returns {ParsedResource} parsed parts + */ +const _parseResource = str => { + const match = PATH_QUERY_FRAGMENT_REGEXP.exec(str); + return { + resource: str, + path: match[1].replace(/\0(.)/g, "$1"), + query: match[2] ? match[2].replace(/\0(.)/g, "$1") : "", + fragment: match[3] || "" + }; +}; +exports.parseResource = (realFn => { + /** @type {WeakMap>} */ + const cache = new WeakMap(); + + const getCache = associatedObjectForCache => { + const entry = cache.get(associatedObjectForCache); + if (entry !== undefined) return entry; + /** @type {Map} */ + const map = new Map(); + cache.set(associatedObjectForCache, map); + return map; + }; + + /** + * @param {string} str the path with query and fragment + * @param {Object=} associatedObjectForCache an object to which the cache will be attached + * @returns {ParsedResource} parsed parts + */ + const fn = (str, associatedObjectForCache) => { + if (!associatedObjectForCache) return realFn(str); + const cache = getCache(associatedObjectForCache); + const entry = cache.get(str); + if (entry !== undefined) return entry; + const result = realFn(str); + cache.set(str, result); + return result; + }; + + fn.bindCache = associatedObjectForCache => { + const cache = getCache(associatedObjectForCache); + return str => { + const entry = cache.get(str); + if (entry !== undefined) return entry; + const result = realFn(str); + cache.set(str, result); + return result; + }; + }; + + return fn; +})(_parseResource); + +/** + * @param {string} filename the filename which should be undone + * @param {boolean} enforceRelative true returns ./ for empty paths + * @returns {string} repeated ../ to leave the directory of the provided filename to be back on root dir + */ +exports.getUndoPath = (filename, enforceRelative) => { + let depth = -1; + for (const part of filename.split(/[/\\]+/)) { + if (part !== ".") { + depth += part === ".." ? -1 : 1; + } + } + return depth > 0 ? "../".repeat(depth) : enforceRelative ? "./" : ""; +}; + + +/***/ }), + +/***/ 60352: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +// We need to include a list of requires here +// to allow webpack to be bundled with only static requires +// We could use a dynamic require(`../${request}`) but this +// would include too many modules and not every tool is able +// to process this +module.exports = { + AsyncDependenciesBlock: () => __webpack_require__(72624), + CommentCompilationWarning: () => __webpack_require__(41985), + ContextModule: () => __webpack_require__(32834), + "cache/PackFileCacheStrategy": () => + __webpack_require__(19780), + "cache/ResolverCachePlugin": () => __webpack_require__(52607), + "container/ContainerEntryDependency": () => + __webpack_require__(22887), + "container/ContainerEntryModule": () => + __webpack_require__(97927), + "container/ContainerExposedDependency": () => + __webpack_require__(83179), + "container/FallbackDependency": () => + __webpack_require__(48901), + "container/FallbackItemDependency": () => + __webpack_require__(69742), + "container/FallbackModule": () => __webpack_require__(83812), + "container/RemoteModule": () => __webpack_require__(5713), + "container/RemoteToExternalDependency": () => + __webpack_require__(11194), + "dependencies/AMDDefineDependency": () => + __webpack_require__(50781), + "dependencies/AMDRequireArrayDependency": () => + __webpack_require__(50286), + "dependencies/AMDRequireContextDependency": () => + __webpack_require__(74654), + "dependencies/AMDRequireDependenciesBlock": () => + __webpack_require__(82134), + "dependencies/AMDRequireDependency": () => + __webpack_require__(58138), + "dependencies/AMDRequireItemDependency": () => + __webpack_require__(20677), + "dependencies/CachedConstDependency": () => + __webpack_require__(14268), + "dependencies/CommonJsRequireContextDependency": () => + __webpack_require__(96323), + "dependencies/CommonJsExportRequireDependency": () => + __webpack_require__(48075), + "dependencies/CommonJsExportsDependency": () => + __webpack_require__(59067), + "dependencies/CommonJsFullRequireDependency": () => + __webpack_require__(46131), + "dependencies/CommonJsRequireDependency": () => + __webpack_require__(81192), + "dependencies/CommonJsSelfReferenceDependency": () => + __webpack_require__(6386), + "dependencies/ConstDependency": () => + __webpack_require__(9364), + "dependencies/ContextDependency": () => + __webpack_require__(21649), + "dependencies/ContextElementDependency": () => + __webpack_require__(32592), + "dependencies/CriticalDependencyWarning": () => + __webpack_require__(92322), + "dependencies/DelegatedSourceDependency": () => + __webpack_require__(73725), + "dependencies/DllEntryDependency": () => + __webpack_require__(63938), + "dependencies/EntryDependency": () => + __webpack_require__(69325), + "dependencies/ExportsInfoDependency": () => + __webpack_require__(37826), + "dependencies/HarmonyAcceptDependency": () => + __webpack_require__(16546), + "dependencies/HarmonyAcceptImportDependency": () => + __webpack_require__(19966), + "dependencies/HarmonyCompatibilityDependency": () => + __webpack_require__(52080), + "dependencies/HarmonyExportExpressionDependency": () => + __webpack_require__(47717), + "dependencies/HarmonyExportHeaderDependency": () => + __webpack_require__(69764), + "dependencies/HarmonyExportImportedSpecifierDependency": () => + __webpack_require__(61621), + "dependencies/HarmonyExportSpecifierDependency": () => + __webpack_require__(22867), + "dependencies/HarmonyImportSideEffectDependency": () => + __webpack_require__(98335), + "dependencies/HarmonyImportSpecifierDependency": () => + __webpack_require__(71564), + "dependencies/ImportContextDependency": () => + __webpack_require__(73449), + "dependencies/ImportDependency": () => + __webpack_require__(78377), + "dependencies/ImportEagerDependency": () => + __webpack_require__(72152), + "dependencies/ImportWeakDependency": () => + __webpack_require__(62550), + "dependencies/JsonExportsDependency": () => + __webpack_require__(33151), + "dependencies/LocalModule": () => __webpack_require__(89087), + "dependencies/LocalModuleDependency": () => + __webpack_require__(54524), + "dependencies/ModuleDecoratorDependency": () => + __webpack_require__(79448), + "dependencies/ModuleHotAcceptDependency": () => + __webpack_require__(72529), + "dependencies/ModuleHotDeclineDependency": () => + __webpack_require__(53025), + "dependencies/ImportMetaHotAcceptDependency": () => + __webpack_require__(41559), + "dependencies/ImportMetaHotDeclineDependency": () => + __webpack_require__(33924), + "dependencies/ProvidedDependency": () => + __webpack_require__(76175), + "dependencies/PureExpressionDependency": () => + __webpack_require__(13275), + "dependencies/RequireContextDependency": () => + __webpack_require__(99026), + "dependencies/RequireEnsureDependenciesBlock": () => + __webpack_require__(33266), + "dependencies/RequireEnsureDependency": () => + __webpack_require__(81390), + "dependencies/RequireEnsureItemDependency": () => + __webpack_require__(78934), + "dependencies/RequireHeaderDependency": () => + __webpack_require__(15418), + "dependencies/RequireIncludeDependency": () => + __webpack_require__(49309), + "dependencies/RequireIncludeDependencyParserPlugin": () => + __webpack_require__(13811), + "dependencies/RequireResolveContextDependency": () => + __webpack_require__(27569), + "dependencies/RequireResolveDependency": () => + __webpack_require__(24868), + "dependencies/RequireResolveHeaderDependency": () => + __webpack_require__(1217), + "dependencies/RuntimeRequirementsDependency": () => + __webpack_require__(61247), + "dependencies/StaticExportsDependency": () => + __webpack_require__(68372), + "dependencies/SystemPlugin": () => __webpack_require__(37200), + "dependencies/UnsupportedDependency": () => + __webpack_require__(27098), + "dependencies/URLDependency": () => __webpack_require__(45148), + "dependencies/WebAssemblyExportImportedDependency": () => + __webpack_require__(16912), + "dependencies/WebAssemblyImportDependency": () => + __webpack_require__(54629), + "dependencies/WorkerDependency": () => + __webpack_require__(31479), + "optimize/ConcatenatedModule": () => + __webpack_require__(74233), + DelegatedModule: () => __webpack_require__(12106), + DependenciesBlock: () => __webpack_require__(15267), + DllModule: () => __webpack_require__(75374), + ExternalModule: () => __webpack_require__(24334), + FileSystemInfo: () => __webpack_require__(50177), + InvalidDependenciesModuleWarning: () => + __webpack_require__(27185), + Module: () => __webpack_require__(54031), + ModuleBuildError: () => __webpack_require__(3289), + ModuleDependencyWarning: () => __webpack_require__(57570), + ModuleError: () => __webpack_require__(76422), + ModuleGraph: () => __webpack_require__(73444), + ModuleParseError: () => __webpack_require__(37734), + ModuleWarning: () => __webpack_require__(10717), + NormalModule: () => __webpack_require__(88376), + RawModule: () => __webpack_require__(3754), + "sharing/ConsumeSharedModule": () => + __webpack_require__(35725), + "sharing/ConsumeSharedFallbackDependency": () => + __webpack_require__(50227), + "sharing/ProvideSharedModule": () => + __webpack_require__(6831), + "sharing/ProvideSharedDependency": () => + __webpack_require__(71078), + "sharing/ProvideForSharedDependency": () => + __webpack_require__(50013), + UnsupportedFeatureWarning: () => __webpack_require__(61809), + "util/LazySet": () => __webpack_require__(60248), + UnhandledSchemeError: () => __webpack_require__(55467), + WebpackError: () => __webpack_require__(24274), + + "util/registerExternalSerializer": () => { + // already registered + } +}; + + +/***/ }), + +/***/ 55575: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const { register } = __webpack_require__(29158); + +class ClassSerializer { + constructor(Constructor) { + this.Constructor = Constructor; + this.hash = null; + } + + serialize(obj, context) { + obj.serialize(context); + } + + deserialize(context) { + if (typeof this.Constructor.deserialize === "function") { + return this.Constructor.deserialize(context); + } + const obj = new this.Constructor(); + obj.deserialize(context); + return obj; + } +} + +module.exports = (Constructor, request, name = null) => { + register(Constructor, request, name, new ClassSerializer(Constructor)); +}; + + +/***/ }), + +/***/ 18003: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +/** @template T @typedef {function(): T} FunctionReturning */ + +/** + * @template T + * @param {FunctionReturning} fn memorized function + * @returns {FunctionReturning} new function + */ +const memoize = fn => { + let cache = false; + /** @type {T} */ + let result = undefined; + return () => { + if (cache) { + return result; + } else { + result = fn(); + cache = true; + // Allow to clean up memory for fn + // and all dependent resources + fn = undefined; + return result; + } + }; +}; + +module.exports = memoize; + + +/***/ }), + +/***/ 45930: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const SAFE_LIMIT = 0x80000000; +const SAFE_PART = SAFE_LIMIT - 1; +const COUNT = 4; +const arr = [0, 0, 0, 0, 0]; +const primes = [3, 7, 17, 19]; + +module.exports = (str, range) => { + arr.fill(0); + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + for (let j = 0; j < COUNT; j++) { + const p = (j + COUNT - 1) % COUNT; + arr[j] = (arr[j] + c * primes[j] + arr[p]) & SAFE_PART; + } + for (let j = 0; j < COUNT; j++) { + const q = arr[j] % COUNT; + arr[j] = arr[j] ^ (arr[q] >> 1); + } + } + if (range <= SAFE_PART) { + let sum = 0; + for (let j = 0; j < COUNT; j++) { + sum = (sum + arr[j]) % range; + } + return sum; + } else { + let sum1 = 0; + let sum2 = 0; + const rangeExt = Math.floor(range / SAFE_LIMIT); + for (let j = 0; j < COUNT; j += 2) { + sum1 = (sum1 + arr[j]) & SAFE_PART; + } + for (let j = 1; j < COUNT; j += 2) { + sum2 = (sum2 + arr[j]) % rangeExt; + } + return (sum2 * SAFE_LIMIT + sum1) % range; + } +}; + + +/***/ }), + +/***/ 44682: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const SAFE_IDENTIFIER = /^[_a-zA-Z$][_a-zA-Z$0-9]*$/; + +const propertyAccess = (properties, start = 0) => { + let str = ""; + for (let i = start; i < properties.length; i++) { + const p = properties[i]; + if (`${+p}` === p) { + str += `[${p}]`; + } else if (SAFE_IDENTIFIER.test(p)) { + str += `.${p}`; + } else { + str += `[${JSON.stringify(p)}]`; + } + } + return str; +}; + +module.exports = propertyAccess; + + +/***/ }), + +/***/ 26426: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { register } = __webpack_require__(29158); + +const Position = /** @type {TODO} */ __webpack_require__(87573).Position; +const SourceLocation = __webpack_require__(87573).SourceLocation; +const { ValidationError } = __webpack_require__(79286); +const { + CachedSource, + ConcatSource, + OriginalSource, + PrefixSource, + RawSource, + ReplaceSource, + SourceMapSource +} = __webpack_require__(55600); + +/** @typedef {import("acorn").Position} Position */ +/** @typedef {import("../Dependency").RealDependencyLocation} RealDependencyLocation */ +/** @typedef {import("../Dependency").SourcePosition} SourcePosition */ +/** @typedef {import("./serialization").ObjectDeserializerContext} ObjectDeserializerContext */ +/** @typedef {import("./serialization").ObjectSerializerContext} ObjectSerializerContext */ + +/** @typedef {ObjectSerializerContext & { writeLazy?: (any) => void }} WebpackObjectSerializerContext */ + +const CURRENT_MODULE = "webpack/lib/util/registerExternalSerializer"; + +register( + CachedSource, + CURRENT_MODULE, + "webpack-sources/CachedSource", + new (class CachedSourceSerializer { + /** + * @param {CachedSource} source the cached source to be serialized + * @param {WebpackObjectSerializerContext} context context + * @returns {void} + */ + serialize(source, { write, writeLazy }) { + if (writeLazy) { + writeLazy(source.originalLazy()); + } else { + write(source.original()); + } + write(source.getCachedData()); + } + + /** + * @param {ObjectDeserializerContext} context context + * @returns {CachedSource} cached source + */ + deserialize({ read }) { + const source = read(); + const cachedData = read(); + return new CachedSource(source, cachedData); + } + })() +); + +register( + RawSource, + CURRENT_MODULE, + "webpack-sources/RawSource", + new (class RawSourceSerializer { + /** + * @param {RawSource} source the raw source to be serialized + * @param {WebpackObjectSerializerContext} context context + * @returns {void} + */ + serialize(source, { write }) { + write(source.buffer()); + write(!source.isBuffer()); + } + + /** + * @param {ObjectDeserializerContext} context context + * @returns {RawSource} raw source + */ + deserialize({ read }) { + const source = read(); + const convertToString = read(); + return new RawSource(source, convertToString); + } + })() +); + +register( + ConcatSource, + CURRENT_MODULE, + "webpack-sources/ConcatSource", + new (class ConcatSourceSerializer { + /** + * @param {ConcatSource} source the concat source to be serialized + * @param {WebpackObjectSerializerContext} context context + * @returns {void} + */ + serialize(source, { write }) { + write(source.getChildren()); + } + + /** + * @param {ObjectDeserializerContext} context context + * @returns {ConcatSource} concat source + */ + deserialize({ read }) { + const source = new ConcatSource(); + source.addAllSkipOptimizing(read()); + return source; + } + })() +); + +register( + PrefixSource, + CURRENT_MODULE, + "webpack-sources/PrefixSource", + new (class PrefixSourceSerializer { + /** + * @param {PrefixSource} source the prefix source to be serialized + * @param {WebpackObjectSerializerContext} context context + * @returns {void} + */ + serialize(source, { write }) { + write(source.getPrefix()); + write(source.original()); + } + + /** + * @param {ObjectDeserializerContext} context context + * @returns {PrefixSource} prefix source + */ + deserialize({ read }) { + return new PrefixSource(read(), read()); + } + })() +); + +register( + ReplaceSource, + CURRENT_MODULE, + "webpack-sources/ReplaceSource", + new (class ReplaceSourceSerializer { + /** + * @param {ReplaceSource} source the replace source to be serialized + * @param {WebpackObjectSerializerContext} context context + * @returns {void} + */ + serialize(source, { write }) { + write(source.original()); + write(source.getName()); + const replacements = source.getReplacements(); + write(replacements.length); + for (const repl of replacements) { + write(repl.start); + write(repl.end); + } + for (const repl of replacements) { + write(repl.content); + write(repl.name); + } + } + + /** + * @param {ObjectDeserializerContext} context context + * @returns {ReplaceSource} replace source + */ + deserialize({ read }) { + const source = new ReplaceSource(read(), read()); + const len = read(); + const startEndBuffer = []; + for (let i = 0; i < len; i++) { + startEndBuffer.push(read(), read()); + } + let j = 0; + for (let i = 0; i < len; i++) { + source.replace( + startEndBuffer[j++], + startEndBuffer[j++], + read(), + read() + ); + } + return source; + } + })() +); + +register( + OriginalSource, + CURRENT_MODULE, + "webpack-sources/OriginalSource", + new (class OriginalSourceSerializer { + /** + * @param {OriginalSource} source the original source to be serialized + * @param {WebpackObjectSerializerContext} context context + * @returns {void} + */ + serialize(source, { write }) { + write(source.buffer()); + write(source.getName()); + } + + /** + * @param {ObjectDeserializerContext} context context + * @returns {OriginalSource} original source + */ + deserialize({ read }) { + const buffer = read(); + const name = read(); + return new OriginalSource(buffer, name); + } + })() +); + +register( + SourceLocation, + CURRENT_MODULE, + "acorn/SourceLocation", + new (class SourceLocationSerializer { + /** + * @param {SourceLocation} loc the location to be serialized + * @param {WebpackObjectSerializerContext} context context + * @returns {void} + */ + serialize(loc, { write }) { + write(loc.start.line); + write(loc.start.column); + write(loc.end.line); + write(loc.end.column); + } + + /** + * @param {ObjectDeserializerContext} context context + * @returns {RealDependencyLocation} location + */ + deserialize({ read }) { + return { + start: { + line: read(), + column: read() + }, + end: { + line: read(), + column: read() + } + }; + } + })() +); + +register( + Position, + CURRENT_MODULE, + "acorn/Position", + new (class PositionSerializer { + /** + * @param {Position} pos the position to be serialized + * @param {WebpackObjectSerializerContext} context context + * @returns {void} + */ + serialize(pos, { write }) { + write(pos.line); + write(pos.column); + } + + /** + * @param {ObjectDeserializerContext} context context + * @returns {SourcePosition} position + */ + deserialize({ read }) { + return { + line: read(), + column: read() + }; + } + })() +); + +register( + SourceMapSource, + CURRENT_MODULE, + "webpack-sources/SourceMapSource", + new (class SourceMapSourceSerializer { + /** + * @param {SourceMapSource} source the source map source to be serialized + * @param {WebpackObjectSerializerContext} context context + * @returns {void} + */ + serialize(source, { write }) { + write(source.getArgsAsBuffers()); + } + + /** + * @param {ObjectDeserializerContext} context context + * @returns {SourceMapSource} source source map source + */ + deserialize({ read }) { + // @ts-expect-error + return new SourceMapSource(...read()); + } + })() +); + +register( + ValidationError, + CURRENT_MODULE, + "schema-utils/ValidationError", + new (class ValidationErrorSerializer { + // TODO error should be ValidationError, but this fails the type checks + /** + * @param {TODO} error the source map source to be serialized + * @param {WebpackObjectSerializerContext} context context + * @returns {void} + */ + serialize(error, { write }) { + write(error.errors); + write(error.schema); + write({ + name: error.headerName, + baseDataPath: error.baseDataPath, + postFormatter: error.postFormatter + }); + } + + /** + * @param {ObjectDeserializerContext} context context + * @returns {TODO} error + */ + deserialize({ read }) { + return new ValidationError(read(), read(), read()); + } + })() +); + + +/***/ }), + +/***/ 43478: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const SortableSet = __webpack_require__(51326); + +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Entrypoint").EntryOptions} EntryOptions */ + +/** @typedef {string | SortableSet | undefined} RuntimeSpec */ +/** @typedef {RuntimeSpec | boolean} RuntimeCondition */ + +/** + * @param {Compilation} compilation the compilation + * @param {string} name name of the entry + * @param {EntryOptions=} options optionally already received entry options + * @returns {RuntimeSpec} runtime + */ +exports.getEntryRuntime = (compilation, name, options) => { + let dependOn; + let runtime; + if (options) { + ({ dependOn, runtime } = options); + } else { + const entry = compilation.entries.get(name); + if (!entry) return name; + ({ dependOn, runtime } = entry.options); + } + if (dependOn) { + /** @type {RuntimeSpec} */ + let result = undefined; + const queue = new Set(dependOn); + for (const name of queue) { + const dep = compilation.entries.get(name); + if (!dep) continue; + const { dependOn, runtime } = dep.options; + if (dependOn) { + for (const name of dependOn) { + queue.add(name); + } + } else { + result = mergeRuntimeOwned(result, runtime || name); + } + } + return result || name; + } else { + return runtime || name; + } +}; + +/** + * @param {RuntimeSpec} runtime runtime + * @param {function(string): void} fn functor + * @returns {void} + */ +exports.forEachRuntime = (runtime, fn) => { + if (runtime === undefined) { + fn(undefined); + } else if (typeof runtime === "string") { + fn(runtime); + } else { + for (const r of runtime) { + fn(r); + } + } +}; + +const getRuntimesKey = set => { + set.sort(); + return Array.from(set).join("\n"); +}; + +/** + * @param {RuntimeSpec} runtime runtime(s) + * @returns {string} key of runtimes + */ +const getRuntimeKey = runtime => { + if (runtime === undefined) return "*"; + if (typeof runtime === "string") return runtime; + return runtime.getFromUnorderedCache(getRuntimesKey); +}; +exports.getRuntimeKey = getRuntimeKey; + +/** + * @param {string} key key of runtimes + * @returns {RuntimeSpec} runtime(s) + */ +const keyToRuntime = key => { + if (key === "*") return undefined; + const items = key.split("\n"); + if (items.length === 1) return items[0]; + return new SortableSet(items); +}; +exports.keyToRuntime = keyToRuntime; + +const getRuntimesString = set => { + set.sort(); + return Array.from(set).join("+"); +}; + +/** + * @param {RuntimeSpec} runtime runtime(s) + * @returns {string} readable version + */ +const runtimeToString = runtime => { + if (runtime === undefined) return "*"; + if (typeof runtime === "string") return runtime; + return runtime.getFromUnorderedCache(getRuntimesString); +}; +exports.runtimeToString = runtimeToString; + +/** + * @param {RuntimeCondition} runtimeCondition runtime condition + * @returns {string} readable version + */ +exports.runtimeConditionToString = runtimeCondition => { + if (runtimeCondition === true) return "true"; + if (runtimeCondition === false) return "false"; + return runtimeToString(runtimeCondition); +}; + +/** + * @param {RuntimeSpec} a first + * @param {RuntimeSpec} b second + * @returns {boolean} true, when they are equal + */ +exports.runtimeEqual = (a, b) => { + if (a === b) { + return true; + } else if ( + a === undefined || + b === undefined || + typeof a === "string" || + typeof b === "string" + ) { + return false; + } else if (a.size !== b.size) { + return false; + } else { + a.sort(); + b.sort(); + const aIt = a[Symbol.iterator](); + const bIt = b[Symbol.iterator](); + for (;;) { + const aV = aIt.next(); + if (aV.done) return true; + const bV = bIt.next(); + if (aV.value !== bV.value) return false; + } + } +}; + +/** + * @param {RuntimeSpec} a first + * @param {RuntimeSpec} b second + * @returns {-1|0|1} compare + */ +exports.compareRuntime = (a, b) => { + if (a === b) { + return 0; + } else if (a === undefined) { + return -1; + } else if (b === undefined) { + return 1; + } else { + const aKey = getRuntimeKey(a); + const bKey = getRuntimeKey(b); + if (aKey < bKey) return -1; + if (aKey > bKey) return 1; + return 0; + } +}; + +/** + * @param {RuntimeSpec} a first + * @param {RuntimeSpec} b second + * @returns {RuntimeSpec} merged + */ +const mergeRuntime = (a, b) => { + if (a === undefined) { + return b; + } else if (b === undefined) { + return a; + } else if (a === b) { + return a; + } else if (typeof a === "string") { + if (typeof b === "string") { + const set = new SortableSet(); + set.add(a); + set.add(b); + return set; + } else if (b.has(a)) { + return b; + } else { + const set = new SortableSet(b); + set.add(a); + return set; + } + } else { + if (typeof b === "string") { + if (a.has(b)) return a; + const set = new SortableSet(a); + set.add(b); + return set; + } else { + const set = new SortableSet(a); + for (const item of b) set.add(item); + if (set.size === a.size) return a; + return set; + } + } +}; +exports.mergeRuntime = mergeRuntime; + +/** + * @param {RuntimeCondition} a first + * @param {RuntimeCondition} b second + * @param {RuntimeSpec} runtime full runtime + * @returns {RuntimeCondition} result + */ +exports.mergeRuntimeCondition = (a, b, runtime) => { + if (a === false) return b; + if (b === false) return a; + if (a === true || b === true) return true; + const merged = mergeRuntime(a, b); + if (merged === undefined) return undefined; + if (typeof merged === "string") { + if (typeof runtime === "string" && merged === runtime) return true; + return merged; + } + if (typeof runtime === "string" || runtime === undefined) return merged; + if (merged.size === runtime.size) return true; + return merged; +}; + +/** + * @param {RuntimeSpec | true} a first + * @param {RuntimeSpec | true} b second + * @param {RuntimeSpec} runtime full runtime + * @returns {RuntimeSpec | true} result + */ +exports.mergeRuntimeConditionNonFalse = (a, b, runtime) => { + if (a === true || b === true) return true; + const merged = mergeRuntime(a, b); + if (merged === undefined) return undefined; + if (typeof merged === "string") { + if (typeof runtime === "string" && merged === runtime) return true; + return merged; + } + if (typeof runtime === "string" || runtime === undefined) return merged; + if (merged.size === runtime.size) return true; + return merged; +}; + +/** + * @param {RuntimeSpec} a first (may be modified) + * @param {RuntimeSpec} b second + * @returns {RuntimeSpec} merged + */ +const mergeRuntimeOwned = (a, b) => { + if (b === undefined) { + return a; + } else if (a === b) { + return a; + } else if (a === undefined) { + if (typeof b === "string") { + const set = new SortableSet(); + set.add(b); + return set; + } else { + return new SortableSet(b); + } + } else if (typeof a === "string") { + if (typeof b === "string") { + const set = new SortableSet(); + set.add(a); + set.add(b); + return set; + } else { + const set = new SortableSet(b); + set.add(a); + return set; + } + } else { + if (typeof b === "string") { + a.add(b); + return a; + } else { + for (const item of b) a.add(item); + return a; + } + } +}; +exports.mergeRuntimeOwned = mergeRuntimeOwned; + +/** + * @param {RuntimeSpec} a first + * @param {RuntimeSpec} b second + * @returns {RuntimeSpec} merged + */ +exports.intersectRuntime = (a, b) => { + if (a === undefined) { + return b; + } else if (b === undefined) { + return a; + } else if (a === b) { + return a; + } else if (typeof a === "string") { + if (typeof b === "string") { + return undefined; + } else if (b.has(a)) { + return a; + } else { + return undefined; + } + } else { + if (typeof b === "string") { + if (a.has(b)) return b; + return undefined; + } else { + const set = new SortableSet(); + for (const item of b) { + if (a.has(item)) set.add(item); + } + if (set.size === 0) return undefined; + if (set.size === 1) for (const item of set) return item; + return set; + } + } +}; + +/** + * @param {RuntimeSpec} a first + * @param {RuntimeSpec} b second + * @returns {RuntimeSpec} result + */ +const subtractRuntime = (a, b) => { + if (a === undefined) { + return undefined; + } else if (b === undefined) { + return a; + } else if (a === b) { + return undefined; + } else if (typeof a === "string") { + if (typeof b === "string") { + return undefined; + } else if (b.has(a)) { + return undefined; + } else { + return a; + } + } else { + if (typeof b === "string") { + if (!a.has(b)) return a; + if (a.size === 2) { + for (const item of a) { + if (item !== b) return item; + } + } + const set = new SortableSet(a); + set.delete(b); + } else { + const set = new SortableSet(); + for (const item of a) { + if (!b.has(item)) set.add(item); + } + if (set.size === 0) return undefined; + if (set.size === 1) for (const item of set) return item; + return set; + } + } +}; +exports.subtractRuntime = subtractRuntime; + +/** + * @param {RuntimeCondition} a first + * @param {RuntimeCondition} b second + * @param {RuntimeSpec} runtime runtime + * @returns {RuntimeCondition} result + */ +exports.subtractRuntimeCondition = (a, b, runtime) => { + if (b === true) return false; + if (b === false) return a; + if (a === false) return false; + const result = subtractRuntime(a === true ? runtime : a, b); + return result === undefined ? false : result; +}; + +/** + * @param {RuntimeSpec} runtime runtime + * @param {function(RuntimeSpec): boolean} filter filter function + * @returns {boolean | RuntimeSpec} true/false if filter is constant for all runtimes, otherwise runtimes that are active + */ +exports.filterRuntime = (runtime, filter) => { + if (runtime === undefined) return filter(undefined); + if (typeof runtime === "string") return filter(runtime); + let some = false; + let every = true; + let result = undefined; + for (const r of runtime) { + const v = filter(r); + if (v) { + some = true; + result = mergeRuntimeOwned(result, r); + } else { + every = false; + } + } + if (!some) return false; + if (every) return true; + return result; +}; + +/** + * @template T + */ +class RuntimeSpecMap { + /** + * @param {RuntimeSpecMap=} clone copy form this + */ + constructor(clone) { + /** @type {Map} */ + this._map = new Map(clone ? clone._map : undefined); + } + + /** + * @param {RuntimeSpec} runtime the runtimes + * @returns {T} value + */ + get(runtime) { + const key = getRuntimeKey(runtime); + return this._map.get(key); + } + + /** + * @param {RuntimeSpec} runtime the runtimes + * @returns {boolean} true, when the runtime is stored + */ + has(runtime) { + const key = getRuntimeKey(runtime); + return this._map.has(key); + } + + set(runtime, value) { + this._map.set(getRuntimeKey(runtime), value); + } + + delete(runtime) { + this._map.delete(getRuntimeKey(runtime)); + } + + update(runtime, fn) { + const key = getRuntimeKey(runtime); + const oldValue = this._map.get(key); + const newValue = fn(oldValue); + if (newValue !== oldValue) this._map.set(key, newValue); + } + + keys() { + return Array.from(this._map.keys(), keyToRuntime); + } + + values() { + return this._map.values(); + } +} + +exports.RuntimeSpecMap = RuntimeSpecMap; + +class RuntimeSpecSet { + constructor(iterable) { + /** @type {Map} */ + this._map = new Map(); + if (iterable) { + for (const item of iterable) { + this.add(item); + } + } + } + + add(runtime) { + this._map.set(getRuntimeKey(runtime), runtime); + } + + has(runtime) { + return this._map.has(getRuntimeKey(runtime)); + } + + [Symbol.iterator]() { + return this._map.values(); + } + + get size() { + return this._map.size; + } +} + +exports.RuntimeSpecSet = RuntimeSpecSet; + + +/***/ }), + +/***/ 22500: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {(string|number|undefined|[])[]} SemVerRange */ + +/** + * @param {string} str version string + * @returns {(string|number|undefined|[])[]} parsed version + */ +const parseVersion = str => { + var splitAndConvert = function (str) { + return str.split(".").map(function (item) { + // eslint-disable-next-line eqeqeq + return +item == item ? +item : item; + }); + }; + var match = /^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(str); + /** @type {(string|number|undefined|[])[]} */ + var ver = match[1] ? splitAndConvert(match[1]) : []; + if (match[2]) { + ver.length++; + ver.push.apply(ver, splitAndConvert(match[2])); + } + if (match[3]) { + ver.push([]); + ver.push.apply(ver, splitAndConvert(match[3])); + } + return ver; +}; +exports.parseVersion = parseVersion; + +/* eslint-disable eqeqeq */ +/** + * @param {string} a version + * @param {string} b version + * @returns {boolean} true, iff a < b + */ +const versionLt = (a, b) => { + // @ts-expect-error + a = parseVersion(a); + // @ts-expect-error + b = parseVersion(b); + var i = 0; + for (;;) { + // a b EOA object undefined number string + // EOA a == b a < b b < a a < b a < b + // object b < a (0) b < a a < b a < b + // undefined a < b a < b (0) a < b a < b + // number b < a b < a b < a (1) a < b + // string b < a b < a b < a b < a (1) + // EOA end of array + // (0) continue on + // (1) compare them via "<" + + // Handles first row in table + if (i >= a.length) return i < b.length && (typeof b[i])[0] != "u"; + + var aValue = a[i]; + var aType = (typeof aValue)[0]; + + // Handles first column in table + if (i >= b.length) return aType == "u"; + + var bValue = b[i]; + var bType = (typeof bValue)[0]; + + if (aType == bType) { + if (aType != "o" && aType != "u" && aValue != bValue) { + return aValue < bValue; + } + i++; + } else { + // Handles remaining cases + if (aType == "o" && bType == "n") return true; + return bType == "s" || aType == "u"; + } + } +}; +/* eslint-enable eqeqeq */ +exports.versionLt = versionLt; + +/** + * @param {string} str range string + * @returns {SemVerRange} parsed range + */ +exports.parseRange = str => { + const splitAndConvert = str => { + return str.split(".").map(item => (`${+item}` === item ? +item : item)); + }; + // see https://docs.npmjs.com/misc/semver#range-grammar for grammar + const parsePartial = str => { + const match = /^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(str); + /** @type {(string|number|undefined|[])[]} */ + const ver = match[1] ? [0, ...splitAndConvert(match[1])] : [0]; + if (match[2]) { + ver.length++; + ver.push.apply(ver, splitAndConvert(match[2])); + } + + // remove trailing any matchers + let last = ver[ver.length - 1]; + while ( + ver.length && + (last === undefined || /^[*xX]$/.test(/** @type {string} */ (last))) + ) { + ver.pop(); + last = ver[ver.length - 1]; + } + + return ver; + }; + const toFixed = range => { + if (range.length === 1) { + // Special case for "*" is "x.x.x" instead of "=" + return [0]; + } else if (range.length === 2) { + // Special case for "1" is "1.x.x" instead of "=1" + return [1, ...range.slice(1)]; + } else if (range.length === 3) { + // Special case for "1.2" is "1.2.x" instead of "=1.2" + return [2, ...range.slice(1)]; + } else { + return [range.length, ...range.slice(1)]; + } + }; + const negate = range => { + return [-range[0] - 1, ...range.slice(1)]; + }; + const parseSimple = str => { + // simple ::= primitive | partial | tilde | caret + // primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial + // tilde ::= '~' partial + // caret ::= '^' partial + const match = /^(\^|~|<=|<|>=|>|=|v|!)/.exec(str); + const start = match ? match[0] : ""; + const remainder = parsePartial(str.slice(start.length)); + switch (start) { + case "^": + if (remainder.length > 1 && remainder[1] === 0) { + if (remainder.length > 2 && remainder[2] === 0) { + return [3, ...remainder.slice(1)]; + } + return [2, ...remainder.slice(1)]; + } + return [1, ...remainder.slice(1)]; + case "~": + return [2, ...remainder.slice(1)]; + case ">=": + return remainder; + case "=": + case "v": + case "": + return toFixed(remainder); + case "<": + return negate(remainder); + case ">": { + // and( >=, not( = ) ) => >=, =, not, and + const fixed = toFixed(remainder); + // eslint-disable-next-line no-sparse-arrays + return [, fixed, 0, remainder, 2]; + } + case "<=": + // or( <, = ) => <, =, or + // eslint-disable-next-line no-sparse-arrays + return [, toFixed(remainder), negate(remainder), 1]; + case "!": { + // not = + const fixed = toFixed(remainder); + // eslint-disable-next-line no-sparse-arrays + return [, fixed, 0]; + } + default: + throw new Error("Unexpected start value"); + } + }; + const combine = (items, fn) => { + if (items.length === 1) return items[0]; + const arr = []; + for (const item of items.slice().reverse()) { + if (0 in item) { + arr.push(item); + } else { + arr.push(...item.slice(1)); + } + } + // eslint-disable-next-line no-sparse-arrays + return [, ...arr, ...items.slice(1).map(() => fn)]; + }; + const parseRange = str => { + // range ::= hyphen | simple ( ' ' simple ) * | '' + // hyphen ::= partial ' - ' partial + const items = str.split(" - "); + if (items.length === 1) { + const items = str.trim().split(/\s+/g).map(parseSimple); + return combine(items, 2); + } + const a = parsePartial(items[0]); + const b = parsePartial(items[1]); + // >=a <=b => and( >=a, or( >=a, { + // range-set ::= range ( logical-or range ) * + // logical-or ::= ( ' ' ) * '||' ( ' ' ) * + const items = str.split(/\s*\|\|\s*/).map(parseRange); + return combine(items, 1); + }; + return parseLogicalOr(str); +}; + +/* eslint-disable eqeqeq */ +const rangeToString = range => { + if (range.length === 1) { + return "*"; + } else if (0 in range) { + var str = ""; + var fixCount = range[0]; + str += + fixCount == 0 + ? ">=" + : fixCount == -1 + ? "<" + : fixCount == 1 + ? "^" + : fixCount == 2 + ? "~" + : fixCount > 0 + ? "=" + : "!="; + var needDot = 1; + // eslint-disable-next-line no-redeclare + for (var i = 1; i < range.length; i++) { + var item = range[i]; + var t = (typeof item)[0]; + needDot--; + str += + t == "u" + ? // undefined: prerelease marker, add an "-" + "-" + : // number or string: add the item, set flag to add an "." between two of them + (needDot > 0 ? "." : "") + ((needDot = 2), item); + } + return str; + } else { + var stack = []; + // eslint-disable-next-line no-redeclare + for (var i = 1; i < range.length; i++) { + // eslint-disable-next-line no-redeclare + var item = range[i]; + stack.push( + item === 0 + ? "not(" + pop() + ")" + : item === 1 + ? "(" + pop() + " || " + pop() + ")" + : item === 2 + ? stack.pop() + " " + stack.pop() + : rangeToString(item) + ); + } + return pop(); + } + function pop() { + return stack.pop().replace(/^\((.+)\)$/, "$1"); + } +}; +/* eslint-enable eqeqeq */ +exports.rangeToString = rangeToString; + +/* eslint-disable eqeqeq */ +/** + * @param {SemVerRange} range version range + * @param {string} version the version + * @returns {boolean} if version satisfy the range + */ +const satisfy = (range, version) => { + if (0 in range) { + // @ts-expect-error + version = parseVersion(version); + var fixCount = range[0]; + // when negated is set it swill set for < instead of >= + var negated = fixCount < 0; + if (negated) fixCount = -fixCount - 1; + for (var i = 0, j = 1, isEqual = true; ; j++, i++) { + // cspell:word nequal nequ + + // when isEqual = true: + // range version: EOA/object undefined number string + // EOA equal block big-ver big-ver + // undefined bigger next big-ver big-ver + // number smaller block cmp big-cmp + // fixed number smaller block cmp-fix differ + // string smaller block differ cmp + // fixed string smaller block small-cmp cmp-fix + + // when isEqual = false: + // range version: EOA/object undefined number string + // EOA nequal block next-ver next-ver + // undefined nequal block next-ver next-ver + // number nequal block next next + // fixed number nequal block next next (this never happens) + // string nequal block next next + // fixed string nequal block next next (this never happens) + + // EOA end of array + // equal (version is equal range): + // when !negated: return true, + // when negated: return false + // bigger (version is bigger as range): + // when fixed: return false, + // when !negated: return true, + // when negated: return false, + // smaller (version is smaller as range): + // when !negated: return false, + // when negated: return true + // nequal (version is not equal range (> resp <)): return true + // block (version is in different prerelease area): return false + // differ (version is different from fixed range (string vs. number)): return false + // next: continues to the next items + // next-ver: when fixed: return false, continues to the next item only for the version, sets isEqual=false + // big-ver: when fixed || negated: return false, continues to the next item only for the version, sets isEqual=false + // next-nequ: continues to the next items, sets isEqual=false + // cmp (negated === false): version < range => return false, version > range => next-nequ, else => next + // cmp (negated === true): version > range => return false, version < range => next-nequ, else => next + // cmp-fix: version == range => next, else => return false + // big-cmp: when negated => return false, else => next-nequ + // small-cmp: when negated => next-nequ, else => return false + + var rangeType = j < range.length ? (typeof range[j])[0] : ""; + + var versionValue; + var versionType; + + // Handles first column in both tables (end of version or object) + if ( + i >= version.length || + ((versionValue = version[i]), + (versionType = (typeof versionValue)[0]) == "o") + ) { + // Handles nequal + if (!isEqual) return true; + // Handles bigger + if (rangeType == "u") return j > fixCount && !negated; + // Handles equal and smaller: (range === EOA) XOR negated + return (rangeType == "") != negated; // equal + smaller + } + + // Handles second column in both tables (version = undefined) + if (versionType == "u") { + if (!isEqual || rangeType != "u") { + return false; + } + } + + // switch between first and second table + else if (isEqual) { + // Handle diagonal + if (rangeType == versionType) { + if (j <= fixCount) { + // Handles "cmp-fix" cases + if (versionValue != range[j]) { + return false; + } + } else { + // Handles "cmp" cases + if (negated ? versionValue > range[j] : versionValue < range[j]) { + return false; + } + if (versionValue != range[j]) isEqual = false; + } + } + + // Handle big-ver + else if (rangeType != "s" && rangeType != "n") { + if (negated || j <= fixCount) return false; + isEqual = false; + j--; + } + + // Handle differ, big-cmp and small-cmp + else if (j <= fixCount || versionType < rangeType != negated) { + return false; + } else { + isEqual = false; + } + } else { + // Handles all "next-ver" cases in the second table + if (rangeType != "s" && rangeType != "n") { + isEqual = false; + j--; + } + + // next is applied by default + } + } + } + /** @type {(boolean | number)[]} */ + var stack = []; + var p = stack.pop.bind(stack); + // eslint-disable-next-line no-redeclare + for (var i = 1; i < range.length; i++) { + var item = /** @type {SemVerRange | 0 | 1 | 2} */ (range[i]); + stack.push( + item == 1 + ? p() | p() + : item == 2 + ? p() & p() + : item + ? satisfy(item, version) + : !p() + ); + } + return !!p(); +}; +/* eslint-enable eqeqeq */ +exports.satisfy = satisfy; + +exports.stringifyHoley = json => { + switch (typeof json) { + case "undefined": + return ""; + case "object": + if (Array.isArray(json)) { + let str = "["; + for (let i = 0; i < json.length; i++) { + if (i !== 0) str += ","; + str += this.stringifyHoley(json[i]); + } + str += "]"; + return str; + } else { + return JSON.stringify(json); + } + default: + return JSON.stringify(json); + } +}; + +//#region runtime code: parseVersion +exports.parseVersionRuntimeCode = runtimeTemplate => + `var parseVersion = ${runtimeTemplate.basicFunction("str", [ + "// see webpack/lib/util/semver.js for original code", + `var p=${ + runtimeTemplate.supportsArrowFunction() ? "p=>" : "function(p)" + }{return p.split(".").map((${ + runtimeTemplate.supportsArrowFunction() ? "p=>" : "function(p)" + }{return+p==p?+p:p}))},n=/^([^-+]+)?(?:-([^+]+))?(?:\\+(.+))?$/.exec(str),r=n[1]?p(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,p(n[2]))),n[3]&&(r.push([]),r.push.apply(r,p(n[3]))),r;` + ])}`; +//#endregion + +//#region runtime code: versionLt +exports.versionLtRuntimeCode = runtimeTemplate => + `var versionLt = ${runtimeTemplate.basicFunction("a, b", [ + "// see webpack/lib/util/semver.js for original code", + 'a=parseVersion(a),b=parseVersion(b);for(var r=0;;){if(r>=a.length)return r=b.length)return"u"==n;var t=b[r],f=(typeof t)[0];if(n!=f)return"o"==n&&"n"==f||("s"==f||"u"==n);if("o"!=n&&"u"!=n&&e!=t)return e + `var rangeToString = ${runtimeTemplate.basicFunction("range", [ + "// see webpack/lib/util/semver.js for original code", + 'if(1===range.length)return"*";if(0 in range){var r="",n=range[0];r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var e=1,a=1;a0?".":"")+(e=2,t)}return r}var g=[];for(a=1;a + `var satisfy = ${runtimeTemplate.basicFunction("range, version", [ + "// see webpack/lib/util/semver.js for original code", + 'if(0 in range){version=parseVersion(version);var e=range[0],r=e<0;r&&(e=-e-1);for(var n=0,i=1,a=!0;;i++,n++){var f,s,g=i=version.length||"o"==(s=(typeof(f=version[n]))[0]))return!a||("u"==g?i>e&&!r:""==g!=r);if("u"==s){if(!a||"u"!=g)return!1}else if(a)if(g==s)if(i<=e){if(f!=range[i])return!1}else{if(r?f>range[i]:f { + if (context.write) { + context.writeLazy = value => { + context.write(SerializerMiddleware.createLazy(value, binaryMiddleware)); + }; + } + }), + binaryMiddleware +]); +exports.createFileSerializer = fs => { + const fileMiddleware = new FileMiddleware(fs); + return new Serializer([ + new SingleItemMiddleware(), + new ObjectMiddleware(context => { + if (context.write) { + context.writeLazy = value => { + context.write( + SerializerMiddleware.createLazy(value, binaryMiddleware) + ); + }; + context.writeSeparate = (value, options) => { + context.write( + SerializerMiddleware.createLazy(value, fileMiddleware, options) + ); + }; + } + }), + binaryMiddleware, + fileMiddleware + ]); +}; + +__webpack_require__(26426); + +// Load internal paths with a relative require +// This allows bundling all internal serializers +registerLoader(/^webpack\/lib\//, req => { + const loader = internalSerializables[req.slice("webpack/lib/".length)]; + if (loader) { + loader(); + } else { + console.warn(`${req} not found in internalSerializables`); + } + return true; +}); + + +/***/ }), + +/***/ 17824: +/***/ (function(module) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** + * @typedef {Object} GroupOptions + * @property {boolean=} groupChildren + * @property {boolean=} force + * @property {number=} targetGroupCount + */ + +/** + * @template T + * @template R + * @typedef {Object} GroupConfig + * @property {function(T): string[]} getKeys + * @property {function(string, (R | T)[], T[]): R} createGroup + * @property {function(string, T[]): GroupOptions=} getOptions + */ + +/** + * @template T + * @typedef {Object} ItemWithGroups + * @property {T} item + * @property {Set} groups + */ + +/** + * @template T + * @template R + * @param {T[]} items the list of items + * @param {GroupConfig[]} groupConfigs configuration + * @returns {(R | T)[]} grouped items + */ +const smartGrouping = (items, groupConfigs) => { + /** @type {Set>} */ + const itemsWithGroups = new Set(); + /** @type {Map, string]>} */ + const groupConfigMap = new Map(); + for (const item of items) { + const groups = new Set(); + for (let i = 0; i < groupConfigs.length; i++) { + const groupConfig = groupConfigs[i]; + const keys = groupConfig.getKeys(item); + if (keys) { + for (const group of keys) { + const fullGroup = `${i}:${group}`; + if (!groupConfigMap.has(fullGroup)) { + groupConfigMap.set(fullGroup, [groupConfig, group]); + } + groups.add(fullGroup); + } + } + } + itemsWithGroups.add({ + item, + groups + }); + } + const alreadyGrouped = new Set(); + /** + * @param {Set>} itemsWithGroups input items with groups + * @returns {(T | R)[]} groups items + */ + const runGrouping = itemsWithGroups => { + const totalSize = itemsWithGroups.size; + /** @type {Map>>} */ + const groupMap = new Map(); + for (const entry of itemsWithGroups) { + for (const group of entry.groups) { + if (alreadyGrouped.has(group)) continue; + const list = groupMap.get(group); + if (list === undefined) { + groupMap.set(group, new Set([entry])); + } else { + list.add(entry); + } + } + } + /** @type {Set} */ + const usedGroups = new Set(); + /** @type {(T | R)[]} */ + const results = []; + for (;;) { + let bestGroup = undefined; + let bestGroupSize = -1; + let bestGroupItems = undefined; + let bestGroupOptions = undefined; + for (const [group, items] of groupMap) { + if (items.size === 0) continue; + const [groupConfig, groupKey] = groupConfigMap.get(group); + const options = + groupConfig.getOptions && + groupConfig.getOptions( + groupKey, + Array.from(items, ({ item }) => item) + ); + const force = options && options.force; + if (!force) { + if (bestGroupOptions && bestGroupOptions.force) continue; + if (usedGroups.has(group)) continue; + if (items.size <= 1 || totalSize - items.size <= 1) { + continue; + } + } + const targetGroupCount = (options && options.targetGroupCount) || 4; + let sizeValue = force + ? items.size + : Math.min( + items.size, + (totalSize * 2) / targetGroupCount + + itemsWithGroups.size - + items.size + ); + if ( + sizeValue > bestGroupSize || + (force && (!bestGroupOptions || !bestGroupOptions.force)) + ) { + bestGroup = group; + bestGroupSize = sizeValue; + bestGroupItems = items; + bestGroupOptions = options; + } + } + if (bestGroup === undefined) { + break; + } + const items = new Set(bestGroupItems); + const options = bestGroupOptions; + + const groupChildren = !options || options.groupChildren !== false; + + for (const item of items) { + itemsWithGroups.delete(item); + // Remove all groups that items have from the map to not select them again + for (const group of item.groups) { + const list = groupMap.get(group); + if (list !== undefined) list.delete(item); + if (groupChildren) { + usedGroups.add(group); + } + } + } + groupMap.delete(bestGroup); + + const idx = bestGroup.indexOf(":"); + const configKey = bestGroup.slice(0, idx); + const key = bestGroup.slice(idx + 1); + const groupConfig = groupConfigs[+configKey]; + + const allItems = Array.from(items, ({ item }) => item); + + alreadyGrouped.add(bestGroup); + const children = groupChildren ? runGrouping(items) : allItems; + alreadyGrouped.delete(bestGroup); + + results.push(groupConfig.createGroup(key, children, allItems)); + } + for (const { item } of itemsWithGroups) { + results.push(item); + } + return results; + }; + return runGrouping(itemsWithGroups); +}; + +module.exports = smartGrouping; + + +/***/ }), + +/***/ 73212: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("webpack-sources").Source} Source */ + +/** @type {WeakMap>} */ +const equalityCache = new WeakMap(); + +/** + * @param {Source} a a source + * @param {Source} b another source + * @returns {boolean} true, when both sources are equal + */ +const _isSourceEqual = (a, b) => { + // prefer .buffer(), it's called anyway during emit + /** @type {Buffer|string} */ + let aSource = typeof a.buffer === "function" ? a.buffer() : a.source(); + /** @type {Buffer|string} */ + let bSource = typeof b.buffer === "function" ? b.buffer() : b.source(); + if (aSource === bSource) return true; + if (typeof aSource === "string" && typeof bSource === "string") return false; + if (!Buffer.isBuffer(aSource)) aSource = Buffer.from(aSource, "utf-8"); + if (!Buffer.isBuffer(bSource)) bSource = Buffer.from(bSource, "utf-8"); + return aSource.equals(bSource); +}; + +/** + * @param {Source} a a source + * @param {Source} b another source + * @returns {boolean} true, when both sources are equal + */ +const isSourceEqual = (a, b) => { + if (a === b) return true; + const cache1 = equalityCache.get(a); + if (cache1 !== undefined) { + const result = cache1.get(b); + if (result !== undefined) return result; + } + const result = _isSourceEqual(a, b); + if (cache1 !== undefined) { + cache1.set(b, result); + } else { + const map = new WeakMap(); + map.set(b, result); + equalityCache.set(a, map); + } + const cache2 = equalityCache.get(b); + if (cache2 !== undefined) { + cache2.set(a, result); + } else { + const map = new WeakMap(); + map.set(a, result); + equalityCache.set(b, map); + } + return result; +}; +exports.isSourceEqual = isSourceEqual; + + +/***/ }), + +/***/ 19651: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { validate } = __webpack_require__(79286); + +/* cSpell:disable */ +const DID_YOU_MEAN = { + rules: "module.rules", + loaders: "module.rules or module.rules.*.use", + query: "module.rules.*.options (BREAKING CHANGE since webpack 5)", + noParse: "module.noParse", + filename: "output.filename or module.rules.*.generator.filename", + file: "output.filename", + chunkFilename: "output.chunkFilename", + chunkfilename: "output.chunkFilename", + ecmaVersion: + "output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)", + ecmaversion: + "output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)", + ecma: + "output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)", + path: "output.path", + pathinfo: "output.pathinfo", + pathInfo: "output.pathinfo", + jsonpFunction: "output.chunkLoadingGlobal (BREAKING CHANGE since webpack 5)", + chunkCallbackName: + "output.chunkLoadingGlobal (BREAKING CHANGE since webpack 5)", + jsonpScriptType: "output.scriptType (BREAKING CHANGE since webpack 5)", + hotUpdateFunction: "output.hotUpdateGlobal (BREAKING CHANGE since webpack 5)", + splitChunks: "optimization.splitChunks", + immutablePaths: "snapshot.immutablePaths", + managedPaths: "snapshot.managedPaths", + maxModules: "stats.modulesSpace (BREAKING CHANGE since webpack 5)", + hashedModuleIds: + 'optimization.moduleIds: "hashed" (BREAKING CHANGE since webpack 5)', + namedChunks: + 'optimization.chunkIds: "named" (BREAKING CHANGE since webpack 5)', + namedModules: + 'optimization.moduleIds: "named" (BREAKING CHANGE since webpack 5)', + occurrenceOrder: + 'optimization.chunkIds: "size" and optimization.moduleIds: "size" (BREAKING CHANGE since webpack 5)', + automaticNamePrefix: + "optimization.splitChunks.[cacheGroups.*].idHint (BREAKING CHANGE since webpack 5)", + noEmitOnErrors: + "optimization.emitOnErrors (BREAKING CHANGE since webpack 5: logic is inverted to avoid negative flags)", + Buffer: + "to use the ProvidePlugin to process the Buffer variable to modules as polyfill\n" + + "BREAKING CHANGE: webpack 5 no longer provided Node.js polyfills by default.\n" + + "Note: if you are using 'node.Buffer: false', you can just remove that as this is the default behavior now.\n" + + "To provide a polyfill to modules use:\n" + + 'new ProvidePlugin({ Buffer: ["buffer", "Buffer"] }) and npm install buffer.', + process: + "to use the ProvidePlugin to process the process variable to modules as polyfill\n" + + "BREAKING CHANGE: webpack 5 no longer provided Node.js polyfills by default.\n" + + "Note: if you are using 'node.process: false', you can just remove that as this is the default behavior now.\n" + + "To provide a polyfill to modules use:\n" + + 'new ProvidePlugin({ process: "process" }) and npm install buffer.' +}; + +const REMOVED = { + concord: + "BREAKING CHANGE: resolve.concord has been removed and is no longer avaiable.", + devtoolLineToLine: + "BREAKING CHANGE: output.devtoolLineToLine has been removed and is no longer avaiable." +}; +/* cSpell:enable */ + +/** + * @param {Parameters[0]} schema a json schema + * @param {Parameters[1]} options the options that should be validated + * @param {Parameters[2]=} validationConfiguration configuration for generating errors + * @returns {void} + */ +const validateSchema = (schema, options, validationConfiguration) => { + validate( + schema, + options, + validationConfiguration || { + name: "Webpack", + postFormatter: (formattedError, error) => { + const children = error.children; + if ( + children && + children.some( + child => + child.keyword === "absolutePath" && + child.dataPath === ".output.filename" + ) + ) { + return `${formattedError}\nPlease use output.path to specify absolute path and output.filename for the file name.`; + } + + if ( + children && + children.some( + child => + child.keyword === "pattern" && child.dataPath === ".devtool" + ) + ) { + return ( + `${formattedError}\n` + + "BREAKING CHANGE since webpack 5: The devtool option is more strict.\n" + + "Please strictly follow the order of the keywords in the pattern." + ); + } + + if (error.keyword === "additionalProperties") { + const params = /** @type {import("ajv").AdditionalPropertiesParams} */ (error.params); + if ( + Object.prototype.hasOwnProperty.call( + DID_YOU_MEAN, + params.additionalProperty + ) + ) { + return `${formattedError}\nDid you mean ${ + DID_YOU_MEAN[params.additionalProperty] + }?`; + } + + if ( + Object.prototype.hasOwnProperty.call( + REMOVED, + params.additionalProperty + ) + ) { + return `${formattedError}\n${REMOVED[params.additionalProperty]}?`; + } + + if (!error.dataPath) { + if (params.additionalProperty === "debug") { + return ( + `${formattedError}\n` + + "The 'debug' property was removed in webpack 2.0.0.\n" + + "Loaders should be updated to allow passing this option via loader options in module.rules.\n" + + "Until loaders are updated one can use the LoaderOptionsPlugin to switch loaders into debug mode:\n" + + "plugins: [\n" + + " new webpack.LoaderOptionsPlugin({\n" + + " debug: true\n" + + " })\n" + + "]" + ); + } + + if (params.additionalProperty) { + return ( + `${formattedError}\n` + + "For typos: please correct them.\n" + + "For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.\n" + + " Loaders should be updated to allow passing options via loader options in module.rules.\n" + + " Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:\n" + + " plugins: [\n" + + " new webpack.LoaderOptionsPlugin({\n" + + " // test: /\\.xxx$/, // may apply this only for some modules\n" + + " options: {\n" + + ` ${params.additionalProperty}: …\n` + + " }\n" + + " })\n" + + " ]" + ); + } + } + } + + return formattedError; + } + } + ); +}; +module.exports = validateSchema; + + +/***/ }), + +/***/ 38733: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); + +class AsyncWasmChunkLoadingRuntimeModule extends RuntimeModule { + constructor({ generateLoadBinaryCode, supportsStreaming }) { + super("wasm chunk loading", RuntimeModule.STAGE_ATTACH); + this.generateLoadBinaryCode = generateLoadBinaryCode; + this.supportsStreaming = supportsStreaming; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { compilation, chunk } = this; + const { outputOptions, runtimeTemplate } = compilation; + const fn = RuntimeGlobals.instantiateWasm; + const wasmModuleSrcPath = compilation.getPath( + JSON.stringify(outputOptions.webassemblyModuleFilename), + { + hash: `" + ${RuntimeGlobals.getFullHash}() + "`, + hashWithLength: length => + `" + ${RuntimeGlobals.getFullHash}}().slice(0, ${length}) + "`, + module: { + id: '" + wasmModuleId + "', + hash: `" + wasmModuleHash + "`, + hashWithLength(length) { + return `" + wasmModuleHash.slice(0, ${length}) + "`; + } + }, + runtime: chunk.runtime + } + ); + return `${fn} = ${runtimeTemplate.basicFunction( + "exports, wasmModuleId, wasmModuleHash, importsObj", + [ + `var req = ${this.generateLoadBinaryCode(wasmModuleSrcPath)};`, + this.supportsStreaming + ? Template.asString([ + "if (typeof WebAssembly.instantiateStreaming === 'function') {", + Template.indent([ + "return WebAssembly.instantiateStreaming(req, importsObj)", + Template.indent([ + `.then(${runtimeTemplate.returningFunction( + "Object.assign(exports, res.instance.exports)", + "res" + )});` + ]) + ]), + "}" + ]) + : "// no support for streaming compilation", + "return req", + Template.indent([ + `.then(${runtimeTemplate.returningFunction("x.arrayBuffer()", "x")})`, + `.then(${runtimeTemplate.returningFunction( + "WebAssembly.instantiate(bytes, importsObj)", + "bytes" + )})`, + `.then(${runtimeTemplate.returningFunction( + "Object.assign(exports, res.instance.exports)", + "res" + )});` + ]) + ] + )};`; + } +} + +module.exports = AsyncWasmChunkLoadingRuntimeModule; + + +/***/ }), + +/***/ 82234: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Generator = __webpack_require__(14052); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Generator").GenerateContext} GenerateContext */ +/** @typedef {import("../NormalModule")} NormalModule */ + +const TYPES = new Set(["webassembly"]); + +class AsyncWebAssemblyGenerator extends Generator { + constructor(options) { + super(); + this.options = options; + } + + /** + * @param {NormalModule} module fresh module + * @returns {Set} available types (do not mutate) + */ + getTypes(module) { + return TYPES; + } + + /** + * @param {NormalModule} module the module + * @param {string=} type source type + * @returns {number} estimate size of the module + */ + getSize(module, type) { + const originalSource = module.originalSource(); + if (!originalSource) { + return 0; + } + return originalSource.size(); + } + + /** + * @param {NormalModule} module module for which the code should be generated + * @param {GenerateContext} generateContext context for generate + * @returns {Source} generated code + */ + generate(module, generateContext) { + return module.originalSource(); + } +} + +module.exports = AsyncWebAssemblyGenerator; + + +/***/ }), + +/***/ 53148: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { RawSource } = __webpack_require__(55600); +const Generator = __webpack_require__(14052); +const InitFragment = __webpack_require__(63382); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const WebAssemblyImportDependency = __webpack_require__(54629); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("../Generator").GenerateContext} GenerateContext */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ + +const TYPES = new Set(["webassembly"]); + +class AsyncWebAssemblyJavascriptGenerator extends Generator { + constructor(filenameTemplate) { + super(); + this.filenameTemplate = filenameTemplate; + } + + /** + * @param {NormalModule} module fresh module + * @returns {Set} available types (do not mutate) + */ + getTypes(module) { + return TYPES; + } + + /** + * @param {NormalModule} module the module + * @param {string=} type source type + * @returns {number} estimate size of the module + */ + getSize(module, type) { + return 40 + module.dependencies.length * 10; + } + + /** + * @param {NormalModule} module module for which the code should be generated + * @param {GenerateContext} generateContext context for generate + * @returns {Source} generated code + */ + generate(module, generateContext) { + const { + runtimeTemplate, + chunkGraph, + moduleGraph, + runtimeRequirements, + runtime + } = generateContext; + runtimeRequirements.add(RuntimeGlobals.module); + runtimeRequirements.add(RuntimeGlobals.moduleId); + runtimeRequirements.add(RuntimeGlobals.exports); + runtimeRequirements.add(RuntimeGlobals.instantiateWasm); + /** @type {InitFragment[]} */ + const initFragments = []; + /** @type {Map} */ + const depModules = new Map(); + /** @type {Map} */ + const wasmDepsByRequest = new Map(); + for (const dep of module.dependencies) { + if (dep instanceof WebAssemblyImportDependency) { + const module = moduleGraph.getModule(dep); + if (!depModules.has(module)) { + depModules.set(module, { + request: dep.request, + importVar: `WEBPACK_IMPORTED_MODULE_${depModules.size}` + }); + } + let list = wasmDepsByRequest.get(dep.request); + if (list === undefined) { + list = []; + wasmDepsByRequest.set(dep.request, list); + } + list.push(dep); + } + } + + const promises = []; + + const importStatements = Array.from( + depModules, + ([importedModule, { request, importVar }]) => { + if (moduleGraph.isAsync(importedModule)) { + promises.push(importVar); + } + return runtimeTemplate.importStatement({ + update: false, + module: importedModule, + chunkGraph, + request, + originModule: module, + importVar, + runtimeRequirements + }); + } + ); + const importsCode = importStatements.map(([x]) => x).join(""); + const importsCompatCode = importStatements.map(([_, x]) => x).join(""); + + const importObjRequestItems = Array.from( + wasmDepsByRequest, + ([request, deps]) => { + const exportItems = deps.map(dep => { + const importedModule = moduleGraph.getModule(dep); + const importVar = depModules.get(importedModule).importVar; + return `${JSON.stringify( + dep.name + )}: ${runtimeTemplate.exportFromImport({ + moduleGraph, + module: importedModule, + request, + exportName: dep.name, + originModule: module, + asiSafe: true, + isCall: false, + callContext: false, + defaultInterop: true, + importVar, + initFragments, + runtime, + runtimeRequirements + })}`; + }); + return Template.asString([ + `${JSON.stringify(request)}: {`, + Template.indent(exportItems.join(",\n")), + "}" + ]); + } + ); + + const importsObj = + importObjRequestItems.length > 0 + ? Template.asString([ + "{", + Template.indent(importObjRequestItems.join(",\n")), + "}" + ]) + : undefined; + + const instantiateCall = + `${RuntimeGlobals.instantiateWasm}(${module.exportsArgument}, ${ + module.moduleArgument + }.id, ${JSON.stringify( + chunkGraph.getRenderedModuleHash(module, runtime) + )}` + (importsObj ? `, ${importsObj})` : `)`); + + const source = new RawSource( + `${importsCode}${ + promises.length > 1 + ? Template.asString([ + `${module.moduleArgument}.exports = Promise.all([${promises.join( + ", " + )}]).then(${runtimeTemplate.basicFunction( + `[${promises.join(", ")}]`, + `${importsCompatCode}return ${instantiateCall};` + )})` + ]) + : promises.length === 1 + ? Template.asString([ + `${module.moduleArgument}.exports = Promise.resolve(${ + promises[0] + }).then(${runtimeTemplate.basicFunction( + promises[0], + + `${importsCompatCode}return ${instantiateCall};` + )})` + ]) + : `${importsCompatCode}${module.moduleArgument}.exports = ${instantiateCall}` + }` + ); + return InitFragment.addToSource(source, initFragments, generateContext); + } +} + +module.exports = AsyncWebAssemblyJavascriptGenerator; + + +/***/ }), + +/***/ 78379: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { SyncWaterfallHook } = __webpack_require__(18416); +const Compilation = __webpack_require__(75388); +const Generator = __webpack_require__(14052); +const { tryRunOrWebpackError } = __webpack_require__(14953); +const WebAssemblyImportDependency = __webpack_require__(54629); +const { compareModulesByIdentifier } = __webpack_require__(21699); +const memoize = __webpack_require__(18003); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../CodeGenerationResults")} CodeGenerationResults */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("../Template").RenderManifestEntry} RenderManifestEntry */ +/** @typedef {import("../Template").RenderManifestOptions} RenderManifestOptions */ + +const getAsyncWebAssemblyGenerator = memoize(() => + __webpack_require__(82234) +); +const getAsyncWebAssemblyJavascriptGenerator = memoize(() => + __webpack_require__(53148) +); +const getAsyncWebAssemblyParser = memoize(() => + __webpack_require__(77009) +); + +/** + * @typedef {Object} RenderContext + * @property {Chunk} chunk the chunk + * @property {DependencyTemplates} dependencyTemplates the dependency templates + * @property {RuntimeTemplate} runtimeTemplate the runtime template + * @property {ModuleGraph} moduleGraph the module graph + * @property {ChunkGraph} chunkGraph the chunk graph + * @property {CodeGenerationResults} codeGenerationResults results of code generation + */ + +/** + * @typedef {Object} CompilationHooks + * @property {SyncWaterfallHook<[Source, Module, RenderContext]>} renderModuleContent + */ + +/** @type {WeakMap} */ +const compilationHooksMap = new WeakMap(); + +class AsyncWebAssemblyModulesPlugin { + /** + * @param {Compilation} compilation the compilation + * @returns {CompilationHooks} the attached hooks + */ + static getCompilationHooks(compilation) { + if (!(compilation instanceof Compilation)) { + throw new TypeError( + "The 'compilation' argument must be an instance of Compilation" + ); + } + let hooks = compilationHooksMap.get(compilation); + if (hooks === undefined) { + hooks = { + renderModuleContent: new SyncWaterfallHook([ + "source", + "module", + "renderContext" + ]) + }; + compilationHooksMap.set(compilation, hooks); + } + return hooks; + } + + constructor(options) { + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "AsyncWebAssemblyModulesPlugin", + (compilation, { normalModuleFactory }) => { + const hooks = AsyncWebAssemblyModulesPlugin.getCompilationHooks( + compilation + ); + compilation.dependencyFactories.set( + WebAssemblyImportDependency, + normalModuleFactory + ); + + normalModuleFactory.hooks.createParser + .for("webassembly/async") + .tap("AsyncWebAssemblyModulesPlugin", () => { + const AsyncWebAssemblyParser = getAsyncWebAssemblyParser(); + + return new AsyncWebAssemblyParser(); + }); + normalModuleFactory.hooks.createGenerator + .for("webassembly/async") + .tap("AsyncWebAssemblyModulesPlugin", () => { + const AsyncWebAssemblyJavascriptGenerator = getAsyncWebAssemblyJavascriptGenerator(); + const AsyncWebAssemblyGenerator = getAsyncWebAssemblyGenerator(); + + return Generator.byType({ + javascript: new AsyncWebAssemblyJavascriptGenerator( + compilation.outputOptions.webassemblyModuleFilename + ), + webassembly: new AsyncWebAssemblyGenerator(this.options) + }); + }); + + compilation.hooks.renderManifest.tap( + "WebAssemblyModulesPlugin", + (result, options) => { + const { moduleGraph, chunkGraph, runtimeTemplate } = compilation; + const { + chunk, + outputOptions, + dependencyTemplates, + codeGenerationResults + } = options; + + for (const module of chunkGraph.getOrderedChunkModulesIterable( + chunk, + compareModulesByIdentifier + )) { + if (module.type === "webassembly/async") { + const filenameTemplate = + outputOptions.webassemblyModuleFilename; + + result.push({ + render: () => + this.renderModule( + module, + { + chunk, + dependencyTemplates, + runtimeTemplate, + moduleGraph, + chunkGraph, + codeGenerationResults + }, + hooks + ), + filenameTemplate, + pathOptions: { + module, + runtime: chunk.runtime, + chunkGraph + }, + auxiliary: true, + identifier: `webassemblyAsyncModule${chunkGraph.getModuleId( + module + )}`, + hash: chunkGraph.getModuleHash(module, chunk.runtime) + }); + } + } + + return result; + } + ); + } + ); + } + + renderModule(module, renderContext, hooks) { + const { codeGenerationResults, chunk } = renderContext; + try { + const moduleSource = codeGenerationResults.getSource( + module, + chunk.runtime, + "webassembly" + ); + return tryRunOrWebpackError( + () => + hooks.renderModuleContent.call(moduleSource, module, renderContext), + "AsyncWebAssemblyModulesPlugin.getCompilationHooks().renderModuleContent" + ); + } catch (e) { + e.module = module; + throw e; + } + } +} + +module.exports = AsyncWebAssemblyModulesPlugin; + + +/***/ }), + +/***/ 77009: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const t = __webpack_require__(87595); +const { decode } = __webpack_require__(55400); +const Parser = __webpack_require__(85569); +const StaticExportsDependency = __webpack_require__(68372); +const WebAssemblyImportDependency = __webpack_require__(54629); + +/** @typedef {import("../Parser").ParserState} ParserState */ +/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ + +const decoderOpts = { + ignoreCodeSection: true, + ignoreDataSection: true, + + // this will avoid having to lookup with identifiers in the ModuleContext + ignoreCustomNameSection: true +}; + +class WebAssemblyParser extends Parser { + constructor(options) { + super(); + this.hooks = Object.freeze({}); + this.options = options; + } + + /** + * @param {string | Buffer | PreparsedAst} source the source to parse + * @param {ParserState} state the parser state + * @returns {ParserState} the parser state + */ + parse(source, state) { + if (!Buffer.isBuffer(source)) { + throw new Error("WebAssemblyParser input must be a Buffer"); + } + + // flag it as async module + state.module.buildInfo.strict = true; + state.module.buildMeta.exportsType = "namespace"; + state.module.buildMeta.async = true; + + // parse it + const program = decode(source, decoderOpts); + const module = program.body[0]; + + const exports = []; + t.traverse(module, { + ModuleExport({ node }) { + exports.push(node.name); + }, + + ModuleImport({ node }) { + const dep = new WebAssemblyImportDependency( + node.module, + node.name, + node.descr, + false + ); + + state.module.addDependency(dep); + } + }); + + state.module.addDependency(new StaticExportsDependency(exports, false)); + + return state; + } +} + +module.exports = WebAssemblyParser; + + +/***/ }), + +/***/ 34537: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const WebpackError = __webpack_require__(24274); + +module.exports = class UnsupportedWebAssemblyFeatureError extends WebpackError { + /** @param {string} message Error message */ + constructor(message) { + super(message); + this.name = "UnsupportedWebAssemblyFeatureError"; + this.hideStack = true; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 53590: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); +const { compareModulesByIdentifier } = __webpack_require__(21699); +const WebAssemblyUtils = __webpack_require__(9711); + +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ + +// TODO webpack 6 remove the whole folder + +// Get all wasm modules +const getAllWasmModules = (moduleGraph, chunkGraph, chunk) => { + const wasmModules = chunk.getAllAsyncChunks(); + const array = []; + for (const chunk of wasmModules) { + for (const m of chunkGraph.getOrderedChunkModulesIterable( + chunk, + compareModulesByIdentifier + )) { + if (m.type.startsWith("webassembly")) { + array.push(m); + } + } + } + + return array; +}; + +/** + * generates the import object function for a module + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {Module} module the module + * @param {boolean} mangle mangle imports + * @param {string[]} declarations array where declarations are pushed to + * @param {RuntimeSpec} runtime the runtime + * @returns {string} source code + */ +const generateImportObject = ( + chunkGraph, + module, + mangle, + declarations, + runtime +) => { + const moduleGraph = chunkGraph.moduleGraph; + const waitForInstances = new Map(); + const properties = []; + const usedWasmDependencies = WebAssemblyUtils.getUsedDependencies( + moduleGraph, + module, + mangle + ); + for (const usedDep of usedWasmDependencies) { + const dep = usedDep.dependency; + const importedModule = moduleGraph.getModule(dep); + const exportName = dep.name; + const usedName = + importedModule && + moduleGraph + .getExportsInfo(importedModule) + .getUsedName(exportName, runtime); + const description = dep.description; + const direct = dep.onlyDirectImport; + + const module = usedDep.module; + const name = usedDep.name; + + if (direct) { + const instanceVar = `m${waitForInstances.size}`; + waitForInstances.set(instanceVar, chunkGraph.getModuleId(importedModule)); + properties.push({ + module, + name, + value: `${instanceVar}[${JSON.stringify(usedName)}]` + }); + } else { + const params = description.signature.params.map( + (param, k) => "p" + k + param.valtype + ); + + const mod = `${RuntimeGlobals.moduleCache}[${JSON.stringify( + chunkGraph.getModuleId(importedModule) + )}]`; + const modExports = `${mod}.exports`; + + const cache = `wasmImportedFuncCache${declarations.length}`; + declarations.push(`var ${cache};`); + + properties.push({ + module, + name, + value: Template.asString([ + (importedModule.type.startsWith("webassembly") + ? `${mod} ? ${modExports}[${JSON.stringify(usedName)}] : ` + : "") + `function(${params}) {`, + Template.indent([ + `if(${cache} === undefined) ${cache} = ${modExports};`, + `return ${cache}[${JSON.stringify(usedName)}](${params});` + ]), + "}" + ]) + }); + } + } + + let importObject; + if (mangle) { + importObject = [ + "return {", + Template.indent([ + properties.map(p => `${JSON.stringify(p.name)}: ${p.value}`).join(",\n") + ]), + "};" + ]; + } else { + const propertiesByModule = new Map(); + for (const p of properties) { + let list = propertiesByModule.get(p.module); + if (list === undefined) { + propertiesByModule.set(p.module, (list = [])); + } + list.push(p); + } + importObject = [ + "return {", + Template.indent([ + Array.from(propertiesByModule, ([module, list]) => { + return Template.asString([ + `${JSON.stringify(module)}: {`, + Template.indent([ + list.map(p => `${JSON.stringify(p.name)}: ${p.value}`).join(",\n") + ]), + "}" + ]); + }).join(",\n") + ]), + "};" + ]; + } + + const moduleIdStringified = JSON.stringify(chunkGraph.getModuleId(module)); + if (waitForInstances.size === 1) { + const moduleId = Array.from(waitForInstances.values())[0]; + const promise = `installedWasmModules[${JSON.stringify(moduleId)}]`; + const variable = Array.from(waitForInstances.keys())[0]; + return Template.asString([ + `${moduleIdStringified}: function() {`, + Template.indent([ + `return promiseResolve().then(function() { return ${promise}; }).then(function(${variable}) {`, + Template.indent(importObject), + "});" + ]), + "}," + ]); + } else if (waitForInstances.size > 0) { + const promises = Array.from( + waitForInstances.values(), + id => `installedWasmModules[${JSON.stringify(id)}]` + ).join(", "); + const variables = Array.from( + waitForInstances.keys(), + (name, i) => `${name} = array[${i}]` + ).join(", "); + return Template.asString([ + `${moduleIdStringified}: function() {`, + Template.indent([ + `return promiseResolve().then(function() { return Promise.all([${promises}]); }).then(function(array) {`, + Template.indent([`var ${variables};`, ...importObject]), + "});" + ]), + "}," + ]); + } else { + return Template.asString([ + `${moduleIdStringified}: function() {`, + Template.indent(importObject), + "}," + ]); + } +}; + +class WasmChunkLoadingRuntimeModule extends RuntimeModule { + constructor({ generateLoadBinaryCode, supportsStreaming, mangleImports }) { + super("wasm chunk loading", RuntimeModule.STAGE_ATTACH); + this.generateLoadBinaryCode = generateLoadBinaryCode; + this.supportsStreaming = supportsStreaming; + this.mangleImports = mangleImports; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { compilation, chunk, mangleImports } = this; + const { chunkGraph, moduleGraph, outputOptions } = compilation; + const fn = RuntimeGlobals.ensureChunkHandlers; + const wasmModules = getAllWasmModules(moduleGraph, chunkGraph, chunk); + const declarations = []; + const importObjects = wasmModules.map(module => { + return generateImportObject( + chunkGraph, + module, + this.mangleImports, + declarations, + chunk.runtime + ); + }); + const chunkModuleIdMap = chunkGraph.getChunkModuleIdMap(chunk, m => + m.type.startsWith("webassembly") + ); + const createImportObject = content => + mangleImports + ? `{ ${JSON.stringify(WebAssemblyUtils.MANGLED_MODULE)}: ${content} }` + : content; + const wasmModuleSrcPath = compilation.getPath( + JSON.stringify(outputOptions.webassemblyModuleFilename), + { + hash: `" + ${RuntimeGlobals.getFullHash}() + "`, + hashWithLength: length => + `" + ${RuntimeGlobals.getFullHash}}().slice(0, ${length}) + "`, + module: { + id: '" + wasmModuleId + "', + hash: `" + ${JSON.stringify( + chunkGraph.getChunkModuleRenderedHashMap(chunk, m => + m.type.startsWith("webassembly") + ) + )}[chunkId][wasmModuleId] + "`, + hashWithLength(length) { + return `" + ${JSON.stringify( + chunkGraph.getChunkModuleRenderedHashMap( + chunk, + m => m.type.startsWith("webassembly"), + length + ) + )}[chunkId][wasmModuleId] + "`; + } + }, + runtime: chunk.runtime + } + ); + return Template.asString([ + "// object to store loaded and loading wasm modules", + "var installedWasmModules = {};", + "", + // This function is used to delay reading the installed wasm module promises + // by a microtask. Sorting them doesn't help because there are edge cases where + // sorting is not possible (modules splitted into different chunks). + // So we not even trying and solve this by a microtask delay. + "function promiseResolve() { return Promise.resolve(); }", + "", + Template.asString(declarations), + "var wasmImportObjects = {", + Template.indent(importObjects), + "};", + "", + `var wasmModuleMap = ${JSON.stringify( + chunkModuleIdMap, + undefined, + "\t" + )};`, + "", + "// object with all WebAssembly.instance exports", + `${RuntimeGlobals.wasmInstances} = {};`, + "", + "// Fetch + compile chunk loading for webassembly", + `${fn}.wasm = function(chunkId, promises) {`, + Template.indent([ + "", + `var wasmModules = wasmModuleMap[chunkId] || [];`, + "", + "wasmModules.forEach(function(wasmModuleId, idx) {", + Template.indent([ + "var installedWasmModuleData = installedWasmModules[wasmModuleId];", + "", + '// a Promise means "currently loading" or "already loaded".', + "if(installedWasmModuleData)", + Template.indent(["promises.push(installedWasmModuleData);"]), + "else {", + Template.indent([ + `var importObject = wasmImportObjects[wasmModuleId]();`, + `var req = ${this.generateLoadBinaryCode(wasmModuleSrcPath)};`, + "var promise;", + this.supportsStreaming + ? Template.asString([ + "if(importObject instanceof Promise && typeof WebAssembly.compileStreaming === 'function') {", + Template.indent([ + "promise = Promise.all([WebAssembly.compileStreaming(req), importObject]).then(function(items) {", + Template.indent([ + `return WebAssembly.instantiate(items[0], ${createImportObject( + "items[1]" + )});` + ]), + "});" + ]), + "} else if(typeof WebAssembly.instantiateStreaming === 'function') {", + Template.indent([ + `promise = WebAssembly.instantiateStreaming(req, ${createImportObject( + "importObject" + )});` + ]) + ]) + : Template.asString([ + "if(importObject instanceof Promise) {", + Template.indent([ + "var bytesPromise = req.then(function(x) { return x.arrayBuffer(); });", + "promise = Promise.all([", + Template.indent([ + "bytesPromise.then(function(bytes) { return WebAssembly.compile(bytes); }),", + "importObject" + ]), + "]).then(function(items) {", + Template.indent([ + `return WebAssembly.instantiate(items[0], ${createImportObject( + "items[1]" + )});` + ]), + "});" + ]) + ]), + "} else {", + Template.indent([ + "var bytesPromise = req.then(function(x) { return x.arrayBuffer(); });", + "promise = bytesPromise.then(function(bytes) {", + Template.indent([ + `return WebAssembly.instantiate(bytes, ${createImportObject( + "importObject" + )});` + ]), + "});" + ]), + "}", + "promises.push(installedWasmModules[wasmModuleId] = promise.then(function(res) {", + Template.indent([ + `return ${RuntimeGlobals.wasmInstances}[wasmModuleId] = (res.instance || res).exports;` + ]), + "}));" + ]), + "}" + ]), + "});" + ]), + "};" + ]); + } +} + +module.exports = WasmChunkLoadingRuntimeModule; + + +/***/ }), + +/***/ 85489: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const formatLocation = __webpack_require__(82476); +const UnsupportedWebAssemblyFeatureError = __webpack_require__(34537); + +/** @typedef {import("../Compiler")} Compiler */ + +class WasmFinalizeExportsPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("WasmFinalizeExportsPlugin", compilation => { + compilation.hooks.finishModules.tap( + "WasmFinalizeExportsPlugin", + modules => { + for (const module of modules) { + // 1. if a WebAssembly module + if (module.type.startsWith("webassembly") === true) { + const jsIncompatibleExports = + module.buildMeta.jsIncompatibleExports; + + if (jsIncompatibleExports === undefined) { + continue; + } + + for (const connection of compilation.moduleGraph.getIncomingConnections( + module + )) { + // 2. is active and referenced by a non-WebAssembly module + if ( + connection.isTargetActive(undefined) && + connection.originModule.type.startsWith("webassembly") === + false + ) { + const referencedExports = compilation.getDependencyReferencedExports( + connection.dependency, + undefined + ); + + for (const info of referencedExports) { + const names = Array.isArray(info) ? info : info.name; + if (names.length === 0) continue; + const name = names[0]; + if (typeof name === "object") continue; + // 3. and uses a func with an incompatible JS signature + if ( + Object.prototype.hasOwnProperty.call( + jsIncompatibleExports, + name + ) + ) { + // 4. error + const error = new UnsupportedWebAssemblyFeatureError( + `Export "${name}" with ${jsIncompatibleExports[name]} can only be used for direct wasm to wasm dependencies\n` + + `It's used from ${connection.originModule.readableIdentifier( + compilation.requestShortener + )} at ${formatLocation(connection.dependency.loc)}.` + ); + error.module = module; + compilation.errors.push(error); + } + } + } + } + } + } + } + ); + }); + } +} + +module.exports = WasmFinalizeExportsPlugin; + + +/***/ }), + +/***/ 85257: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { RawSource } = __webpack_require__(55600); +const Generator = __webpack_require__(14052); +const WebAssemblyUtils = __webpack_require__(9711); + +const t = __webpack_require__(87595); +const { moduleContextFromModuleAST } = __webpack_require__(87595); +const { editWithAST, addWithAST } = __webpack_require__(84232); +const { decode } = __webpack_require__(55400); + +const WebAssemblyExportImportedDependency = __webpack_require__(16912); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("../Generator").GenerateContext} GenerateContext */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ +/** @typedef {import("./WebAssemblyUtils").UsedWasmDependency} UsedWasmDependency */ + +/** + * @typedef {(ArrayBuffer) => ArrayBuffer} ArrayBufferTransform + */ + +/** + * @template T + * @param {Function[]} fns transforms + * @returns {Function} composed transform + */ +const compose = (...fns) => { + return fns.reduce( + (prevFn, nextFn) => { + return value => nextFn(prevFn(value)); + }, + value => value + ); +}; + +/** + * Removes the start instruction + * + * @param {Object} state unused state + * @returns {ArrayBufferTransform} transform + */ +const removeStartFunc = state => bin => { + return editWithAST(state.ast, bin, { + Start(path) { + path.remove(); + } + }); +}; + +/** + * Get imported globals + * + * @param {Object} ast Module's AST + * @returns {Array} - nodes + */ +const getImportedGlobals = ast => { + const importedGlobals = []; + + t.traverse(ast, { + ModuleImport({ node }) { + if (t.isGlobalType(node.descr)) { + importedGlobals.push(node); + } + } + }); + + return importedGlobals; +}; + +/** + * Get the count for imported func + * + * @param {Object} ast Module's AST + * @returns {Number} - count + */ +const getCountImportedFunc = ast => { + let count = 0; + + t.traverse(ast, { + ModuleImport({ node }) { + if (t.isFuncImportDescr(node.descr)) { + count++; + } + } + }); + + return count; +}; + +/** + * Get next type index + * + * @param {Object} ast Module's AST + * @returns {t.Index} - index + */ +const getNextTypeIndex = ast => { + const typeSectionMetadata = t.getSectionMetadata(ast, "type"); + + if (typeSectionMetadata === undefined) { + return t.indexLiteral(0); + } + + return t.indexLiteral(typeSectionMetadata.vectorOfSize.value); +}; + +/** + * Get next func index + * + * The Func section metadata provide informations for implemented funcs + * in order to have the correct index we shift the index by number of external + * functions. + * + * @param {Object} ast Module's AST + * @param {Number} countImportedFunc number of imported funcs + * @returns {t.Index} - index + */ +const getNextFuncIndex = (ast, countImportedFunc) => { + const funcSectionMetadata = t.getSectionMetadata(ast, "func"); + + if (funcSectionMetadata === undefined) { + return t.indexLiteral(0 + countImportedFunc); + } + + const vectorOfSize = funcSectionMetadata.vectorOfSize.value; + + return t.indexLiteral(vectorOfSize + countImportedFunc); +}; + +/** + * Creates an init instruction for a global type + * @param {t.GlobalType} globalType the global type + * @returns {t.Instruction} init expression + */ +const createDefaultInitForGlobal = globalType => { + if (globalType.valtype[0] === "i") { + // create NumberLiteral global initializer + return t.objectInstruction("const", globalType.valtype, [ + t.numberLiteralFromRaw(66) + ]); + } else if (globalType.valtype[0] === "f") { + // create FloatLiteral global initializer + return t.objectInstruction("const", globalType.valtype, [ + t.floatLiteral(66, false, false, "66") + ]); + } else { + throw new Error("unknown type: " + globalType.valtype); + } +}; + +/** + * Rewrite the import globals: + * - removes the ModuleImport instruction + * - injects at the same offset a mutable global of the same type + * + * Since the imported globals are before the other global declarations, our + * indices will be preserved. + * + * Note that globals will become mutable. + * + * @param {Object} state unused state + * @returns {ArrayBufferTransform} transform + */ +const rewriteImportedGlobals = state => bin => { + const additionalInitCode = state.additionalInitCode; + const newGlobals = []; + + bin = editWithAST(state.ast, bin, { + ModuleImport(path) { + if (t.isGlobalType(path.node.descr)) { + const globalType = path.node.descr; + + globalType.mutability = "var"; + + const init = [ + createDefaultInitForGlobal(globalType), + t.instruction("end") + ]; + + newGlobals.push(t.global(globalType, init)); + + path.remove(); + } + }, + + // in order to preserve non-imported global's order we need to re-inject + // those as well + Global(path) { + const { node } = path; + const [init] = node.init; + + if (init.id === "get_global") { + node.globalType.mutability = "var"; + + const initialGlobalIdx = init.args[0]; + + node.init = [ + createDefaultInitForGlobal(node.globalType), + t.instruction("end") + ]; + + additionalInitCode.push( + /** + * get_global in global initializer only works for imported globals. + * They have the same indices as the init params, so use the + * same index. + */ + t.instruction("get_local", [initialGlobalIdx]), + t.instruction("set_global", [t.indexLiteral(newGlobals.length)]) + ); + } + + newGlobals.push(node); + + path.remove(); + } + }); + + // Add global declaration instructions + return addWithAST(state.ast, bin, newGlobals); +}; + +/** + * Rewrite the export names + * @param {Object} state state + * @param {Object} state.ast Module's ast + * @param {Module} state.module Module + * @param {ModuleGraph} state.moduleGraph module graph + * @param {Set} state.externalExports Module + * @param {RuntimeSpec} state.runtime runtime + * @returns {ArrayBufferTransform} transform + */ +const rewriteExportNames = ({ + ast, + moduleGraph, + module, + externalExports, + runtime +}) => bin => { + return editWithAST(ast, bin, { + ModuleExport(path) { + const isExternal = externalExports.has(path.node.name); + if (isExternal) { + path.remove(); + return; + } + const usedName = moduleGraph + .getExportsInfo(module) + .getUsedName(path.node.name, runtime); + if (!usedName) { + path.remove(); + return; + } + path.node.name = usedName; + } + }); +}; + +/** + * Mangle import names and modules + * @param {Object} state state + * @param {Object} state.ast Module's ast + * @param {Map} state.usedDependencyMap mappings to mangle names + * @returns {ArrayBufferTransform} transform + */ +const rewriteImports = ({ ast, usedDependencyMap }) => bin => { + return editWithAST(ast, bin, { + ModuleImport(path) { + const result = usedDependencyMap.get( + path.node.module + ":" + path.node.name + ); + + if (result !== undefined) { + path.node.module = result.module; + path.node.name = result.name; + } + } + }); +}; + +/** + * Add an init function. + * + * The init function fills the globals given input arguments. + * + * @param {Object} state transformation state + * @param {Object} state.ast Module's ast + * @param {t.Identifier} state.initFuncId identifier of the init function + * @param {t.Index} state.startAtFuncOffset index of the start function + * @param {t.ModuleImport[]} state.importedGlobals list of imported globals + * @param {t.Instruction[]} state.additionalInitCode list of addition instructions for the init function + * @param {t.Index} state.nextFuncIndex index of the next function + * @param {t.Index} state.nextTypeIndex index of the next type + * @returns {ArrayBufferTransform} transform + */ +const addInitFunction = ({ + ast, + initFuncId, + startAtFuncOffset, + importedGlobals, + additionalInitCode, + nextFuncIndex, + nextTypeIndex +}) => bin => { + const funcParams = importedGlobals.map(importedGlobal => { + // used for debugging + const id = t.identifier(`${importedGlobal.module}.${importedGlobal.name}`); + + return t.funcParam(importedGlobal.descr.valtype, id); + }); + + const funcBody = []; + importedGlobals.forEach((importedGlobal, index) => { + const args = [t.indexLiteral(index)]; + const body = [ + t.instruction("get_local", args), + t.instruction("set_global", args) + ]; + + funcBody.push(...body); + }); + + if (typeof startAtFuncOffset === "number") { + funcBody.push(t.callInstruction(t.numberLiteralFromRaw(startAtFuncOffset))); + } + + for (const instr of additionalInitCode) { + funcBody.push(instr); + } + + funcBody.push(t.instruction("end")); + + const funcResults = []; + + // Code section + const funcSignature = t.signature(funcParams, funcResults); + const func = t.func(initFuncId, funcSignature, funcBody); + + // Type section + const functype = t.typeInstruction(undefined, funcSignature); + + // Func section + const funcindex = t.indexInFuncSection(nextTypeIndex); + + // Export section + const moduleExport = t.moduleExport( + initFuncId.value, + t.moduleExportDescr("Func", nextFuncIndex) + ); + + return addWithAST(ast, bin, [func, moduleExport, funcindex, functype]); +}; + +/** + * Extract mangle mappings from module + * @param {ModuleGraph} moduleGraph module graph + * @param {Module} module current module + * @param {boolean} mangle mangle imports + * @returns {Map} mappings to mangled names + */ +const getUsedDependencyMap = (moduleGraph, module, mangle) => { + /** @type {Map} */ + const map = new Map(); + for (const usedDep of WebAssemblyUtils.getUsedDependencies( + moduleGraph, + module, + mangle + )) { + const dep = usedDep.dependency; + const request = dep.request; + const exportName = dep.name; + map.set(request + ":" + exportName, usedDep); + } + return map; +}; + +const TYPES = new Set(["webassembly"]); + +class WebAssemblyGenerator extends Generator { + constructor(options) { + super(); + this.options = options; + } + + /** + * @param {NormalModule} module fresh module + * @returns {Set} available types (do not mutate) + */ + getTypes(module) { + return TYPES; + } + + /** + * @param {NormalModule} module the module + * @param {string=} type source type + * @returns {number} estimate size of the module + */ + getSize(module, type) { + const originalSource = module.originalSource(); + if (!originalSource) { + return 0; + } + return originalSource.size(); + } + + /** + * @param {NormalModule} module module for which the code should be generated + * @param {GenerateContext} generateContext context for generate + * @returns {Source} generated code + */ + generate(module, { moduleGraph, runtime }) { + const bin = module.originalSource().source(); + + const initFuncId = t.identifier(""); + + // parse it + const ast = decode(bin, { + ignoreDataSection: true, + ignoreCodeSection: true, + ignoreCustomNameSection: true + }); + + const moduleContext = moduleContextFromModuleAST(ast.body[0]); + + const importedGlobals = getImportedGlobals(ast); + const countImportedFunc = getCountImportedFunc(ast); + const startAtFuncOffset = moduleContext.getStart(); + const nextFuncIndex = getNextFuncIndex(ast, countImportedFunc); + const nextTypeIndex = getNextTypeIndex(ast); + + const usedDependencyMap = getUsedDependencyMap( + moduleGraph, + module, + this.options.mangleImports + ); + const externalExports = new Set( + module.dependencies + .filter(d => d instanceof WebAssemblyExportImportedDependency) + .map(d => { + const wasmDep = /** @type {WebAssemblyExportImportedDependency} */ (d); + return wasmDep.exportName; + }) + ); + + /** @type {t.Instruction[]} */ + const additionalInitCode = []; + + const transform = compose( + rewriteExportNames({ + ast, + moduleGraph, + module, + externalExports, + runtime + }), + + removeStartFunc({ ast }), + + rewriteImportedGlobals({ ast, additionalInitCode }), + + rewriteImports({ + ast, + usedDependencyMap + }), + + addInitFunction({ + ast, + initFuncId, + importedGlobals, + additionalInitCode, + startAtFuncOffset, + nextFuncIndex, + nextTypeIndex + }) + ); + + const newBin = transform(bin); + + const newBuf = Buffer.from(newBin); + + return new RawSource(newBuf); + } +} + +module.exports = WebAssemblyGenerator; + + +/***/ }), + +/***/ 58718: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const WebpackError = __webpack_require__(24274); + +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ +/** @typedef {import("../RequestShortener")} RequestShortener */ + +/** + * @param {Module} module module to get chains from + * @param {ModuleGraph} moduleGraph the module graph + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {RequestShortener} requestShortener to make readable identifiers + * @returns {string[]} all chains to the module + */ +const getInitialModuleChains = ( + module, + moduleGraph, + chunkGraph, + requestShortener +) => { + const queue = [ + { head: module, message: module.readableIdentifier(requestShortener) } + ]; + /** @type {Set} */ + const results = new Set(); + /** @type {Set} */ + const incompleteResults = new Set(); + /** @type {Set} */ + const visitedModules = new Set(); + + for (const chain of queue) { + const { head, message } = chain; + let final = true; + /** @type {Set} */ + const alreadyReferencedModules = new Set(); + for (const connection of moduleGraph.getIncomingConnections(head)) { + const newHead = connection.originModule; + if (newHead) { + if (!chunkGraph.getModuleChunks(newHead).some(c => c.canBeInitial())) + continue; + final = false; + if (alreadyReferencedModules.has(newHead)) continue; + alreadyReferencedModules.add(newHead); + const moduleName = newHead.readableIdentifier(requestShortener); + const detail = connection.explanation + ? ` (${connection.explanation})` + : ""; + const newMessage = `${moduleName}${detail} --> ${message}`; + if (visitedModules.has(newHead)) { + incompleteResults.add(`... --> ${newMessage}`); + continue; + } + visitedModules.add(newHead); + queue.push({ + head: newHead, + message: newMessage + }); + } else { + final = false; + const newMessage = connection.explanation + ? `(${connection.explanation}) --> ${message}` + : message; + results.add(newMessage); + } + } + if (final) { + results.add(message); + } + } + for (const result of incompleteResults) { + results.add(result); + } + return Array.from(results); +}; + +module.exports = class WebAssemblyInInitialChunkError extends WebpackError { + /** + * @param {Module} module WASM module + * @param {ModuleGraph} moduleGraph the module graph + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {RequestShortener} requestShortener request shortener + */ + constructor(module, moduleGraph, chunkGraph, requestShortener) { + const moduleChains = getInitialModuleChains( + module, + moduleGraph, + chunkGraph, + requestShortener + ); + const message = `WebAssembly module is included in initial chunk. +This is not allowed, because WebAssembly download and compilation must happen asynchronous. +Add an async split point (i. e. import()) somewhere between your entrypoint and the WebAssembly module: +${moduleChains.map(s => `* ${s}`).join("\n")}`; + + super(message); + this.name = "WebAssemblyInInitialChunkError"; + this.hideStack = true; + this.module = module; + + Error.captureStackTrace(this, this.constructor); + } +}; + + +/***/ }), + +/***/ 65327: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const { RawSource } = __webpack_require__(55600); +const { UsageState } = __webpack_require__(54227); +const Generator = __webpack_require__(14052); +const InitFragment = __webpack_require__(63382); +const RuntimeGlobals = __webpack_require__(48801); +const Template = __webpack_require__(90751); +const ModuleDependency = __webpack_require__(5462); +const WebAssemblyExportImportedDependency = __webpack_require__(16912); +const WebAssemblyImportDependency = __webpack_require__(54629); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../DependencyTemplates")} DependencyTemplates */ +/** @typedef {import("../Generator").GenerateContext} GenerateContext */ +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ + +const TYPES = new Set(["webassembly"]); + +class WebAssemblyJavascriptGenerator extends Generator { + /** + * @param {NormalModule} module fresh module + * @returns {Set} available types (do not mutate) + */ + getTypes(module) { + return TYPES; + } + + /** + * @param {NormalModule} module the module + * @param {string=} type source type + * @returns {number} estimate size of the module + */ + getSize(module, type) { + return 95 + module.dependencies.length * 5; + } + + /** + * @param {NormalModule} module module for which the code should be generated + * @param {GenerateContext} generateContext context for generate + * @returns {Source} generated code + */ + generate(module, generateContext) { + const { + runtimeTemplate, + moduleGraph, + chunkGraph, + runtimeRequirements, + runtime + } = generateContext; + /** @type {InitFragment[]} */ + const initFragments = []; + + const exportsInfo = moduleGraph.getExportsInfo(module); + + let needExportsCopy = false; + const importedModules = new Map(); + const initParams = []; + let index = 0; + for (const dep of module.dependencies) { + const moduleDep = + dep && dep instanceof ModuleDependency ? dep : undefined; + if (moduleGraph.getModule(dep)) { + let importData = importedModules.get(moduleGraph.getModule(dep)); + if (importData === undefined) { + importedModules.set( + moduleGraph.getModule(dep), + (importData = { + importVar: `m${index}`, + index, + request: (moduleDep && moduleDep.userRequest) || undefined, + names: new Set(), + reexports: [] + }) + ); + index++; + } + if (dep instanceof WebAssemblyImportDependency) { + importData.names.add(dep.name); + if (dep.description.type === "GlobalType") { + const exportName = dep.name; + const importedModule = moduleGraph.getModule(dep); + + if (importedModule) { + const usedName = moduleGraph + .getExportsInfo(importedModule) + .getUsedName(exportName, runtime); + if (usedName) { + initParams.push( + runtimeTemplate.exportFromImport({ + moduleGraph, + module: importedModule, + request: dep.request, + importVar: importData.importVar, + originModule: module, + exportName: dep.name, + asiSafe: true, + isCall: false, + callContext: null, + defaultInterop: true, + initFragments, + runtime, + runtimeRequirements + }) + ); + } + } + } + } + if (dep instanceof WebAssemblyExportImportedDependency) { + importData.names.add(dep.name); + const usedName = moduleGraph + .getExportsInfo(module) + .getUsedName(dep.exportName, runtime); + if (usedName) { + runtimeRequirements.add(RuntimeGlobals.exports); + const exportProp = `${module.exportsArgument}[${JSON.stringify( + usedName + )}]`; + const defineStatement = Template.asString([ + `${exportProp} = ${runtimeTemplate.exportFromImport({ + moduleGraph, + module: moduleGraph.getModule(dep), + request: dep.request, + importVar: importData.importVar, + originModule: module, + exportName: dep.name, + asiSafe: true, + isCall: false, + callContext: null, + defaultInterop: true, + initFragments, + runtime, + runtimeRequirements + })};`, + `if(WebAssembly.Global) ${exportProp} = ` + + `new WebAssembly.Global({ value: ${JSON.stringify( + dep.valueType + )} }, ${exportProp});` + ]); + importData.reexports.push(defineStatement); + needExportsCopy = true; + } + } + } + } + const importsCode = Template.asString( + Array.from( + importedModules, + ([module, { importVar, request, reexports }]) => { + const importStatement = runtimeTemplate.importStatement({ + module, + chunkGraph, + request, + importVar, + originModule: module, + runtimeRequirements + }); + return importStatement[0] + importStatement[1] + reexports.join("\n"); + } + ) + ); + + const copyAllExports = + exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused && + !needExportsCopy; + + // need these globals + runtimeRequirements.add(RuntimeGlobals.module); + runtimeRequirements.add(RuntimeGlobals.moduleId); + runtimeRequirements.add(RuntimeGlobals.wasmInstances); + if (exportsInfo.otherExportsInfo.getUsed(runtime) !== UsageState.Unused) { + runtimeRequirements.add(RuntimeGlobals.makeNamespaceObject); + runtimeRequirements.add(RuntimeGlobals.exports); + } + if (!copyAllExports) { + runtimeRequirements.add(RuntimeGlobals.exports); + } + + // create source + const source = new RawSource( + [ + '"use strict";', + "// Instantiate WebAssembly module", + `var wasmExports = ${RuntimeGlobals.wasmInstances}[${module.moduleArgument}.id];`, + + exportsInfo.otherExportsInfo.getUsed(runtime) !== UsageState.Unused + ? `${RuntimeGlobals.makeNamespaceObject}(${module.exportsArgument});` + : "", + + // this must be before import for circular dependencies + "// export exports from WebAssembly module", + copyAllExports + ? `${module.moduleArgument}.exports = wasmExports;` + : "for(var name in wasmExports) " + + `if(name) ` + + `${module.exportsArgument}[name] = wasmExports[name];`, + "// exec imports from WebAssembly module (for esm order)", + importsCode, + "", + "// exec wasm module", + `wasmExports[""](${initParams.join(", ")})` + ].join("\n") + ); + return InitFragment.addToSource(source, initFragments, generateContext); + } +} + +module.exports = WebAssemblyJavascriptGenerator; + + +/***/ }), + +/***/ 20178: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Generator = __webpack_require__(14052); +const WebAssemblyExportImportedDependency = __webpack_require__(16912); +const WebAssemblyImportDependency = __webpack_require__(54629); +const { compareModulesByIdentifier } = __webpack_require__(21699); +const memoize = __webpack_require__(18003); +const WebAssemblyInInitialChunkError = __webpack_require__(58718); + +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Compiler")} Compiler */ +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleTemplate")} ModuleTemplate */ +/** @typedef {import("../ModuleTemplate").RenderContext} RenderContext */ + +const getWebAssemblyGenerator = memoize(() => + __webpack_require__(85257) +); +const getWebAssemblyJavascriptGenerator = memoize(() => + __webpack_require__(65327) +); +const getWebAssemblyParser = memoize(() => __webpack_require__(46757)); + +class WebAssemblyModulesPlugin { + constructor(options) { + this.options = options; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap( + "WebAssemblyModulesPlugin", + (compilation, { normalModuleFactory }) => { + compilation.dependencyFactories.set( + WebAssemblyImportDependency, + normalModuleFactory + ); + + compilation.dependencyFactories.set( + WebAssemblyExportImportedDependency, + normalModuleFactory + ); + + normalModuleFactory.hooks.createParser + .for("webassembly/sync") + .tap("WebAssemblyModulesPlugin", () => { + const WebAssemblyParser = getWebAssemblyParser(); + + return new WebAssemblyParser(); + }); + + normalModuleFactory.hooks.createGenerator + .for("webassembly/sync") + .tap("WebAssemblyModulesPlugin", () => { + const WebAssemblyJavascriptGenerator = getWebAssemblyJavascriptGenerator(); + const WebAssemblyGenerator = getWebAssemblyGenerator(); + + return Generator.byType({ + javascript: new WebAssemblyJavascriptGenerator(), + webassembly: new WebAssemblyGenerator(this.options) + }); + }); + + compilation.hooks.renderManifest.tap( + "WebAssemblyModulesPlugin", + (result, options) => { + const { chunkGraph } = compilation; + const { chunk, outputOptions, codeGenerationResults } = options; + + for (const module of chunkGraph.getOrderedChunkModulesIterable( + chunk, + compareModulesByIdentifier + )) { + if (module.type === "webassembly/sync") { + const filenameTemplate = + outputOptions.webassemblyModuleFilename; + + result.push({ + render: () => + codeGenerationResults.getSource( + module, + chunk.runtime, + "webassembly" + ), + filenameTemplate, + pathOptions: { + module, + runtime: chunk.runtime, + chunkGraph + }, + auxiliary: true, + identifier: `webassemblyModule${chunkGraph.getModuleId( + module + )}`, + hash: chunkGraph.getModuleHash(module, chunk.runtime) + }); + } + } + + return result; + } + ); + + compilation.hooks.afterChunks.tap("WebAssemblyModulesPlugin", () => { + const chunkGraph = compilation.chunkGraph; + const initialWasmModules = new Set(); + for (const chunk of compilation.chunks) { + if (chunk.canBeInitial()) { + for (const module of chunkGraph.getChunkModulesIterable(chunk)) { + if (module.type === "webassembly/sync") { + initialWasmModules.add(module); + } + } + } + } + for (const module of initialWasmModules) { + compilation.errors.push( + new WebAssemblyInInitialChunkError( + module, + compilation.moduleGraph, + compilation.chunkGraph, + compilation.requestShortener + ) + ); + } + }); + } + ); + } +} + +module.exports = WebAssemblyModulesPlugin; + + +/***/ }), + +/***/ 46757: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const t = __webpack_require__(87595); +const { moduleContextFromModuleAST } = __webpack_require__(87595); +const { decode } = __webpack_require__(55400); +const Parser = __webpack_require__(85569); +const StaticExportsDependency = __webpack_require__(68372); +const WebAssemblyExportImportedDependency = __webpack_require__(16912); +const WebAssemblyImportDependency = __webpack_require__(54629); + +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../Parser").ParserState} ParserState */ +/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ + +const JS_COMPAT_TYPES = new Set(["i32", "f32", "f64"]); + +/** + * @param {t.Signature} signature the func signature + * @returns {null | string} the type incompatible with js types + */ +const getJsIncompatibleType = signature => { + for (const param of signature.params) { + if (!JS_COMPAT_TYPES.has(param.valtype)) { + return `${param.valtype} as parameter`; + } + } + for (const type of signature.results) { + if (!JS_COMPAT_TYPES.has(type)) return `${type} as result`; + } + return null; +}; + +/** + * TODO why are there two different Signature types? + * @param {t.FuncSignature} signature the func signature + * @returns {null | string} the type incompatible with js types + */ +const getJsIncompatibleTypeOfFuncSignature = signature => { + for (const param of signature.args) { + if (!JS_COMPAT_TYPES.has(param)) { + return `${param} as parameter`; + } + } + for (const type of signature.result) { + if (!JS_COMPAT_TYPES.has(type)) return `${type} as result`; + } + return null; +}; + +const decoderOpts = { + ignoreCodeSection: true, + ignoreDataSection: true, + + // this will avoid having to lookup with identifiers in the ModuleContext + ignoreCustomNameSection: true +}; + +class WebAssemblyParser extends Parser { + constructor(options) { + super(); + this.hooks = Object.freeze({}); + this.options = options; + } + + /** + * @param {string | Buffer | PreparsedAst} source the source to parse + * @param {ParserState} state the parser state + * @returns {ParserState} the parser state + */ + parse(source, state) { + if (!Buffer.isBuffer(source)) { + throw new Error("WebAssemblyParser input must be a Buffer"); + } + + // flag it as ESM + state.module.buildInfo.strict = true; + state.module.buildMeta.exportsType = "namespace"; + + // parse it + const program = decode(source, decoderOpts); + const module = program.body[0]; + + const moduleContext = moduleContextFromModuleAST(module); + + // extract imports and exports + const exports = []; + let jsIncompatibleExports = (state.module.buildMeta.jsIncompatibleExports = undefined); + + const importedGlobals = []; + t.traverse(module, { + ModuleExport({ node }) { + const descriptor = node.descr; + + if (descriptor.exportType === "Func") { + const funcIdx = descriptor.id.value; + + /** @type {t.FuncSignature} */ + const funcSignature = moduleContext.getFunction(funcIdx); + + const incompatibleType = getJsIncompatibleTypeOfFuncSignature( + funcSignature + ); + + if (incompatibleType) { + if (jsIncompatibleExports === undefined) { + jsIncompatibleExports = state.module.buildMeta.jsIncompatibleExports = {}; + } + jsIncompatibleExports[node.name] = incompatibleType; + } + } + + exports.push(node.name); + + if (node.descr && node.descr.exportType === "Global") { + const refNode = importedGlobals[node.descr.id.value]; + if (refNode) { + const dep = new WebAssemblyExportImportedDependency( + node.name, + refNode.module, + refNode.name, + refNode.descr.valtype + ); + + state.module.addDependency(dep); + } + } + }, + + Global({ node }) { + const init = node.init[0]; + + let importNode = null; + + if (init.id === "get_global") { + const globalIdx = init.args[0].value; + + if (globalIdx < importedGlobals.length) { + importNode = importedGlobals[globalIdx]; + } + } + + importedGlobals.push(importNode); + }, + + ModuleImport({ node }) { + /** @type {false | string} */ + let onlyDirectImport = false; + + if (t.isMemory(node.descr) === true) { + onlyDirectImport = "Memory"; + } else if (t.isTable(node.descr) === true) { + onlyDirectImport = "Table"; + } else if (t.isFuncImportDescr(node.descr) === true) { + const incompatibleType = getJsIncompatibleType(node.descr.signature); + if (incompatibleType) { + onlyDirectImport = `Non-JS-compatible Func Signature (${incompatibleType})`; + } + } else if (t.isGlobalType(node.descr) === true) { + const type = node.descr.valtype; + if (!JS_COMPAT_TYPES.has(type)) { + onlyDirectImport = `Non-JS-compatible Global Type (${type})`; + } + } + + const dep = new WebAssemblyImportDependency( + node.module, + node.name, + node.descr, + onlyDirectImport + ); + + state.module.addDependency(dep); + + if (t.isGlobalType(node.descr)) { + importedGlobals.push(node); + } + } + }); + + state.module.addDependency(new StaticExportsDependency(exports, false)); + + return state; + } +} + +module.exports = WebAssemblyParser; + + +/***/ }), + +/***/ 9711: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const Template = __webpack_require__(90751); +const WebAssemblyImportDependency = __webpack_require__(54629); + +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../ModuleGraph")} ModuleGraph */ + +/** @typedef {Object} UsedWasmDependency + * @property {WebAssemblyImportDependency} dependency the dependency + * @property {string} name the export name + * @property {string} module the module name + */ + +const MANGLED_MODULE = "a"; + +/** + * @param {ModuleGraph} moduleGraph the module graph + * @param {Module} module the module + * @param {boolean} mangle mangle module and export names + * @returns {UsedWasmDependency[]} used dependencies and (mangled) name + */ +const getUsedDependencies = (moduleGraph, module, mangle) => { + /** @type {UsedWasmDependency[]} */ + const array = []; + let importIndex = 0; + for (const dep of module.dependencies) { + if (dep instanceof WebAssemblyImportDependency) { + if ( + dep.description.type === "GlobalType" || + moduleGraph.getModule(dep) === null + ) { + continue; + } + + const exportName = dep.name; + // TODO add the following 3 lines when removing of ModuleExport is possible + // const importedModule = moduleGraph.getModule(dep); + // const usedName = importedModule && moduleGraph.getExportsInfo(importedModule).getUsedName(exportName, runtime); + // if (usedName !== false) { + if (mangle) { + array.push({ + dependency: dep, + name: Template.numberToIdentifier(importIndex++), + module: MANGLED_MODULE + }); + } else { + array.push({ + dependency: dep, + name: exportName, + module: dep.request + }); + } + } + } + return array; +}; + +exports.getUsedDependencies = getUsedDependencies; +exports.MANGLED_MODULE = MANGLED_MODULE; + + +/***/ }), + +/***/ 19599: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */ +/** @typedef {import("../../declarations/WebpackOptions").WasmLoadingType} WasmLoadingType */ +/** @typedef {import("../Compiler")} Compiler */ + +/** @type {WeakMap>} */ +const enabledTypes = new WeakMap(); + +const getEnabledTypes = compiler => { + let set = enabledTypes.get(compiler); + if (set === undefined) { + set = new Set(); + enabledTypes.set(compiler, set); + } + return set; +}; + +class EnableWasmLoadingPlugin { + /** + * @param {WasmLoadingType} type library type that should be available + */ + constructor(type) { + this.type = type; + } + + /** + * @param {Compiler} compiler the compiler instance + * @param {WasmLoadingType} type type of library + * @returns {void} + */ + static setEnabled(compiler, type) { + getEnabledTypes(compiler).add(type); + } + + /** + * @param {Compiler} compiler the compiler instance + * @param {WasmLoadingType} type type of library + * @returns {void} + */ + static checkEnabled(compiler, type) { + if (!getEnabledTypes(compiler).has(type)) { + throw new Error( + `Library type "${type}" is not enabled. ` + + "EnableWasmLoadingPlugin need to be used to enable this type of wasm loading. " + + 'This usually happens through the "output.enabledWasmLoadingTypes" option. ' + + 'If you are using a function as entry which sets "wasmLoading", you need to add all potential library types to "output.enabledWasmLoadingTypes". ' + + "These types are enabled: " + + Array.from(getEnabledTypes(compiler)).join(", ") + ); + } + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + const { type } = this; + + // Only enable once + const enabled = getEnabledTypes(compiler); + if (enabled.has(type)) return; + enabled.add(type); + + if (typeof type === "string") { + switch (type) { + case "fetch": { + // TODO webpack 6 remove FetchCompileWasmPlugin + const FetchCompileWasmPlugin = __webpack_require__(45001); + const FetchCompileAsyncWasmPlugin = __webpack_require__(57878); + new FetchCompileWasmPlugin({ + mangleImports: compiler.options.optimization.mangleWasmImports + }).apply(compiler); + new FetchCompileAsyncWasmPlugin().apply(compiler); + break; + } + case "async-node": { + // TODO webpack 6 remove ReadFileCompileWasmPlugin + const ReadFileCompileWasmPlugin = __webpack_require__(13715); + const ReadFileCompileAsyncWasmPlugin = __webpack_require__(54874); + new ReadFileCompileWasmPlugin({ + mangleImports: compiler.options.optimization.mangleWasmImports + }).apply(compiler); + new ReadFileCompileAsyncWasmPlugin().apply(compiler); + break; + } + case "universal": + throw new Error( + "Universal WebAssembly Loading is not implemented yet" + ); + default: + throw new Error(`Unsupported wasm loading type ${type}. +Plugins which provide custom wasm loading types must call EnableWasmLoadingPlugin.setEnabled(compiler, type) to disable this error.`); + } + } else { + // TODO support plugin instances here + // apply them to the compiler + } + } +} + +module.exports = EnableWasmLoadingPlugin; + + +/***/ }), + +/***/ 57878: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const AsyncWasmChunkLoadingRuntimeModule = __webpack_require__(38733); + +/** @typedef {import("../Compiler")} Compiler */ + +class FetchCompileAsyncWasmPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "FetchCompileAsyncWasmPlugin", + compilation => { + const globalWasmLoading = compilation.outputOptions.wasmLoading; + const isEnabledForChunk = chunk => { + const options = chunk.getEntryOptions(); + const wasmLoading = + (options && options.wasmLoading) || globalWasmLoading; + return wasmLoading === "fetch"; + }; + const generateLoadBinaryCode = path => + `fetch(${RuntimeGlobals.publicPath} + ${path})`; + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.instantiateWasm) + .tap("FetchCompileAsyncWasmPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + const chunkGraph = compilation.chunkGraph; + if ( + !chunkGraph.hasModuleInGraph( + chunk, + m => m.type === "webassembly/async" + ) + ) { + return; + } + set.add(RuntimeGlobals.publicPath); + compilation.addRuntimeModule( + chunk, + new AsyncWasmChunkLoadingRuntimeModule({ + generateLoadBinaryCode, + supportsStreaming: true + }) + ); + }); + } + ); + } +} + +module.exports = FetchCompileAsyncWasmPlugin; + + +/***/ }), + +/***/ 45001: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const WasmChunkLoadingRuntimeModule = __webpack_require__(53590); + +/** @typedef {import("../Compiler")} Compiler */ + +// TODO webpack 6 remove + +class FetchCompileWasmPlugin { + constructor(options) { + this.options = options || {}; + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "FetchCompileWasmPlugin", + compilation => { + const globalWasmLoading = compilation.outputOptions.wasmLoading; + const isEnabledForChunk = chunk => { + const options = chunk.getEntryOptions(); + const wasmLoading = + (options && options.wasmLoading) || globalWasmLoading; + return wasmLoading === "fetch"; + }; + const generateLoadBinaryCode = path => + `fetch(${RuntimeGlobals.publicPath} + ${path})`; + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunkHandlers) + .tap("FetchCompileWasmPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + const chunkGraph = compilation.chunkGraph; + if ( + !chunkGraph.hasModuleInGraph( + chunk, + m => m.type === "webassembly/sync" + ) + ) { + return; + } + set.add(RuntimeGlobals.moduleCache); + set.add(RuntimeGlobals.publicPath); + compilation.addRuntimeModule( + chunk, + new WasmChunkLoadingRuntimeModule({ + generateLoadBinaryCode, + supportsStreaming: true, + mangleImports: this.options.mangleImports + }) + ); + }); + } + ); + } +} + +module.exports = FetchCompileWasmPlugin; + + +/***/ }), + +/***/ 21335: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const JsonpChunkLoadingRuntimeModule = __webpack_require__(84539); +const { needEntryDeferringCode } = __webpack_require__(39546); + +/** @typedef {import("../Compiler")} Compiler */ + +class JsonpChunkLoadingPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.hooks.thisCompilation.tap( + "JsonpChunkLoadingPlugin", + compilation => { + const globalChunkLoading = compilation.outputOptions.chunkLoading; + const isEnabledForChunk = chunk => { + const options = chunk.getEntryOptions(); + const chunkLoading = + (options && options.chunkLoading) || globalChunkLoading; + return chunkLoading === "jsonp"; + }; + const onceForChunkSet = new WeakSet(); + const handler = (chunk, set) => { + if (onceForChunkSet.has(chunk)) return; + onceForChunkSet.add(chunk); + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.moduleFactoriesAddOnly); + set.add(RuntimeGlobals.hasOwnProperty); + compilation.addRuntimeModule( + chunk, + new JsonpChunkLoadingRuntimeModule(set) + ); + }; + RuntimeGlobals.ensureChunkHandlers; + RuntimeGlobals.hmrDownloadUpdateHandlers; + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunkHandlers) + .tap("JsonpChunkLoadingPlugin", handler); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadUpdateHandlers) + .tap("JsonpChunkLoadingPlugin", handler); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadManifest) + .tap("JsonpChunkLoadingPlugin", handler); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.baseURI) + .tap("JsonpChunkLoadingPlugin", handler); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunkHandlers) + .tap("JsonpChunkLoadingPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.publicPath); + set.add(RuntimeGlobals.loadScript); + set.add(RuntimeGlobals.getChunkScriptFilename); + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadUpdateHandlers) + .tap("JsonpChunkLoadingPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.publicPath); + set.add(RuntimeGlobals.loadScript); + set.add(RuntimeGlobals.getChunkUpdateScriptFilename); + set.add(RuntimeGlobals.moduleCache); + set.add(RuntimeGlobals.hmrModuleData); + set.add(RuntimeGlobals.moduleFactoriesAddOnly); + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadManifest) + .tap("JsonpChunkLoadingPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.publicPath); + set.add(RuntimeGlobals.getUpdateManifestFilename); + }); + + compilation.hooks.additionalTreeRuntimeRequirements.tap( + "JsonpChunkLoadingPlugin", + (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + const withDefer = needEntryDeferringCode(compilation, chunk); + if (withDefer) { + set.add(RuntimeGlobals.startup); + set.add(RuntimeGlobals.startupNoDefault); + set.add(RuntimeGlobals.require); + handler(chunk, set); + } + } + ); + } + ); + } +} + +module.exports = JsonpChunkLoadingPlugin; + + +/***/ }), + +/***/ 84539: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const { SyncWaterfallHook } = __webpack_require__(18416); +const Compilation = __webpack_require__(75388); +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); +const chunkHasJs = __webpack_require__(80867).chunkHasJs; +const compileBooleanMatcher = __webpack_require__(29522); +const { getEntryInfo, needEntryDeferringCode } = __webpack_require__(39546); + +/** @typedef {import("../Chunk")} Chunk */ + +/** + * @typedef {Object} JsonpCompilationPluginHooks + * @property {SyncWaterfallHook<[string, Chunk]>} linkPreload + * @property {SyncWaterfallHook<[string, Chunk]>} linkPrefetch + */ + +/** @type {WeakMap} */ +const compilationHooksMap = new WeakMap(); + +class JsonpChunkLoadingRuntimeModule extends RuntimeModule { + /** + * @param {Compilation} compilation the compilation + * @returns {JsonpCompilationPluginHooks} hooks + */ + static getCompilationHooks(compilation) { + if (!(compilation instanceof Compilation)) { + throw new TypeError( + "The 'compilation' argument must be an instance of Compilation" + ); + } + let hooks = compilationHooksMap.get(compilation); + if (hooks === undefined) { + hooks = { + linkPreload: new SyncWaterfallHook(["source", "chunk"]), + linkPrefetch: new SyncWaterfallHook(["source", "chunk"]) + }; + compilationHooksMap.set(compilation, hooks); + } + return hooks; + } + + constructor(runtimeRequirements) { + super("jsonp chunk loading", RuntimeModule.STAGE_ATTACH); + this._runtimeRequirements = runtimeRequirements; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { compilation, chunk } = this; + const { + runtimeTemplate, + chunkGraph, + outputOptions: { + globalObject, + chunkLoadingGlobal, + hotUpdateGlobal, + crossOriginLoading, + scriptType + } + } = compilation; + const { + linkPreload, + linkPrefetch + } = JsonpChunkLoadingRuntimeModule.getCompilationHooks(compilation); + const fn = RuntimeGlobals.ensureChunkHandlers; + const withBaseURI = this._runtimeRequirements.has(RuntimeGlobals.baseURI); + const withLoading = this._runtimeRequirements.has( + RuntimeGlobals.ensureChunkHandlers + ); + const withDefer = needEntryDeferringCode(compilation, chunk); + const withHmr = this._runtimeRequirements.has( + RuntimeGlobals.hmrDownloadUpdateHandlers + ); + const withHmrManifest = this._runtimeRequirements.has( + RuntimeGlobals.hmrDownloadManifest + ); + const withPrefetch = this._runtimeRequirements.has( + RuntimeGlobals.prefetchChunkHandlers + ); + const withPreload = this._runtimeRequirements.has( + RuntimeGlobals.preloadChunkHandlers + ); + const entries = getEntryInfo(chunkGraph, chunk, c => + chunkHasJs(c, chunkGraph) + ); + const chunkLoadingGlobalExpr = `${globalObject}[${JSON.stringify( + chunkLoadingGlobal + )}]`; + const hasJsMatcher = compileBooleanMatcher( + chunkGraph.getChunkConditionMap(chunk, chunkHasJs) + ); + return Template.asString([ + withBaseURI + ? Template.asString([ + `${RuntimeGlobals.baseURI} = document.baseURI || self.location.href;` + ]) + : "// no baseURI", + "", + "// object to store loaded and loading chunks", + "// undefined = chunk not loaded, null = chunk preloaded/prefetched", + "// Promise = chunk loading, 0 = chunk loaded", + "var installedChunks = {", + Template.indent( + chunk.ids.map(id => `${JSON.stringify(id)}: 0`).join(",\n") + ), + "};", + "", + withDefer + ? Template.asString([ + "var deferredModules = [", + Template.indent(entries.map(e => JSON.stringify(e)).join(",\n")), + "];" + ]) + : "", + withLoading + ? Template.asString([ + `${fn}.j = ${runtimeTemplate.basicFunction( + "chunkId, promises", + hasJsMatcher !== false + ? Template.indent([ + "// JSONP chunk loading for javascript", + `var installedChunkData = ${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`, + 'if(installedChunkData !== 0) { // 0 means "already installed".', + Template.indent([ + "", + '// a Promise means "currently loading".', + "if(installedChunkData) {", + Template.indent([ + "promises.push(installedChunkData[2]);" + ]), + "} else {", + Template.indent([ + hasJsMatcher === true + ? "if(true) { // all chunks have JS" + : `if(${hasJsMatcher("chunkId")}) {`, + Template.indent([ + "// setup Promise in chunk cache", + `var promise = new Promise(${runtimeTemplate.basicFunction( + "resolve, reject", + [ + `installedChunkData = installedChunks[chunkId] = [resolve, reject];` + ] + )});`, + "promises.push(installedChunkData[2] = promise);", + "", + "// start chunk loading", + `var url = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`, + "// create error before stack unwound to get useful stacktrace later", + "var error = new Error();", + `var loadingEnded = ${runtimeTemplate.basicFunction( + "event", + [ + `if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId)) {`, + Template.indent([ + "installedChunkData = installedChunks[chunkId];", + "if(installedChunkData !== 0) installedChunks[chunkId] = undefined;", + "if(installedChunkData) {", + Template.indent([ + "var errorType = event && (event.type === 'load' ? 'missing' : event.type);", + "var realSrc = event && event.target && event.target.src;", + "error.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';", + "error.name = 'ChunkLoadError';", + "error.type = errorType;", + "error.request = realSrc;", + "installedChunkData[1](error);" + ]), + "}" + ]), + "}" + ] + )};`, + `${RuntimeGlobals.loadScript}(url, loadingEnded, "chunk-" + chunkId, chunkId);` + ]), + "} else installedChunks[chunkId] = 0;" + ]), + "}" + ]), + "}" + ]) + : Template.indent(["installedChunks[chunkId] = 0;"]) + )};` + ]) + : "// no chunk on demand loading", + "", + withPrefetch && hasJsMatcher !== false + ? `${ + RuntimeGlobals.prefetchChunkHandlers + }.j = ${runtimeTemplate.basicFunction("chunkId", [ + `if((!${ + RuntimeGlobals.hasOwnProperty + }(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${ + hasJsMatcher === true ? "true" : hasJsMatcher("chunkId") + }) {`, + Template.indent([ + "installedChunks[chunkId] = null;", + linkPrefetch.call( + Template.asString([ + "var link = document.createElement('link');", + crossOriginLoading + ? `link.crossOrigin = ${JSON.stringify( + crossOriginLoading + )};` + : "", + `if (${RuntimeGlobals.scriptNonce}) {`, + Template.indent( + `link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});` + ), + "}", + 'link.rel = "prefetch";', + 'link.as = "script";', + `link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);` + ]), + chunk + ), + "document.head.appendChild(link);" + ]), + "}" + ])};` + : "// no prefetching", + "", + withPreload && hasJsMatcher !== false + ? `${ + RuntimeGlobals.preloadChunkHandlers + }.j = ${runtimeTemplate.basicFunction("chunkId", [ + `if((!${ + RuntimeGlobals.hasOwnProperty + }(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${ + hasJsMatcher === true ? "true" : hasJsMatcher("chunkId") + }) {`, + Template.indent([ + "installedChunks[chunkId] = null;", + linkPreload.call( + Template.asString([ + "var link = document.createElement('link');", + scriptType + ? `link.type = ${JSON.stringify(scriptType)};` + : "", + "link.charset = 'utf-8';", + `if (${RuntimeGlobals.scriptNonce}) {`, + Template.indent( + `link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});` + ), + "}", + 'link.rel = "preload";', + 'link.as = "script";', + `link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`, + crossOriginLoading + ? Template.asString([ + "if (link.href.indexOf(window.location.origin + '/') !== 0) {", + Template.indent( + `link.crossOrigin = ${JSON.stringify( + crossOriginLoading + )};` + ), + "}" + ]) + : "" + ]), + chunk + ), + "document.head.appendChild(link);" + ]), + "}" + ])};` + : "// no preloaded", + "", + withHmr + ? Template.asString([ + "var currentUpdatedModulesList;", + "var waitingUpdateResolves = {};", + "function loadUpdateChunk(chunkId) {", + Template.indent([ + `return new Promise(${runtimeTemplate.basicFunction( + "resolve, reject", + [ + "waitingUpdateResolves[chunkId] = resolve;", + "// start update chunk loading", + `var url = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkUpdateScriptFilename}(chunkId);`, + "// create error before stack unwound to get useful stacktrace later", + "var error = new Error();", + `var loadingEnded = ${runtimeTemplate.basicFunction("event", [ + "if(waitingUpdateResolves[chunkId]) {", + Template.indent([ + "waitingUpdateResolves[chunkId] = undefined", + "var errorType = event && (event.type === 'load' ? 'missing' : event.type);", + "var realSrc = event && event.target && event.target.src;", + "error.message = 'Loading hot update chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';", + "error.name = 'ChunkLoadError';", + "error.type = errorType;", + "error.request = realSrc;", + "reject(error);" + ]), + "}" + ])};`, + `${RuntimeGlobals.loadScript}(url, loadingEnded);` + ] + )});` + ]), + "}", + "", + `${globalObject}[${JSON.stringify( + hotUpdateGlobal + )}] = ${runtimeTemplate.basicFunction( + "chunkId, moreModules, runtime", + [ + "for(var moduleId in moreModules) {", + Template.indent([ + `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, + Template.indent([ + "currentUpdate[moduleId] = moreModules[moduleId];", + "if(currentUpdatedModulesList) currentUpdatedModulesList.push(moduleId);" + ]), + "}" + ]), + "}", + "if(runtime) currentUpdateRuntime.push(runtime);", + "if(waitingUpdateResolves[chunkId]) {", + Template.indent([ + "waitingUpdateResolves[chunkId]();", + "waitingUpdateResolves[chunkId] = undefined;" + ]), + "}" + ] + )};`, + "", + Template.getFunctionContent( + require('./JavascriptHotModuleReplacement.runtime.js') + ) + .replace(/\$key\$/g, "jsonp") + .replace(/\$installedChunks\$/g, "installedChunks") + .replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk") + .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) + .replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories) + .replace( + /\$ensureChunkHandlers\$/g, + RuntimeGlobals.ensureChunkHandlers + ) + .replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty) + .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) + .replace( + /\$hmrDownloadUpdateHandlers\$/g, + RuntimeGlobals.hmrDownloadUpdateHandlers + ) + .replace( + /\$hmrInvalidateModuleHandlers\$/g, + RuntimeGlobals.hmrInvalidateModuleHandlers + ) + ]) + : "// no HMR", + "", + withHmrManifest + ? Template.asString([ + `${ + RuntimeGlobals.hmrDownloadManifest + } = ${runtimeTemplate.basicFunction("", [ + 'if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API");', + `return fetch(${RuntimeGlobals.publicPath} + ${ + RuntimeGlobals.getUpdateManifestFilename + }()).then(${runtimeTemplate.basicFunction("response", [ + "if(response.status === 404) return; // no update available", + 'if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText);', + "return response.json();" + ])});` + ])};` + ]) + : "// no HMR manifest", + "", + withDefer + ? Template.asString([ + `var checkDeferredModules = ${runtimeTemplate.emptyFunction()};` + ]) + : "// no deferred startup", + "", + withDefer || withLoading + ? Template.asString([ + "// install a JSONP callback for chunk loading", + `var webpackJsonpCallback = ${runtimeTemplate.basicFunction( + "parentChunkLoadingFunction, data", + [ + runtimeTemplate.destructureArray( + [ + "chunkIds", + "moreModules", + "runtime", + ...(withDefer ? ["executeModules"] : []) + ], + "data" + ), + '// add "moreModules" to the modules object,', + '// then flag all "chunkIds" as loaded and fire callback', + "var moduleId, chunkId, i = 0, resolves = [];", + "for(;i < chunkIds.length; i++) {", + Template.indent([ + "chunkId = chunkIds[i];", + `if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) && installedChunks[chunkId]) {`, + Template.indent( + "resolves.push(installedChunks[chunkId][0]);" + ), + "}", + "installedChunks[chunkId] = 0;" + ]), + "}", + "for(moduleId in moreModules) {", + Template.indent([ + `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, + Template.indent( + `${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];` + ), + "}" + ]), + "}", + "if(runtime) runtime(__webpack_require__);", + "if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);", + "while(resolves.length) {", + Template.indent("resolves.shift()();"), + "}", + withDefer + ? Template.asString([ + "", + "// add entry modules from loaded chunk to deferred list", + "if(executeModules) deferredModules.push.apply(deferredModules, executeModules);", + "", + "// run deferred modules when all chunks ready", + "return checkDeferredModules();" + ]) + : "" + ] + )}`, + "", + `var chunkLoadingGlobal = ${chunkLoadingGlobalExpr} = ${chunkLoadingGlobalExpr} || [];`, + "chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));", + "chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));" + ]) + : "// no jsonp function", + "", + withDefer + ? Template.asString([ + "function checkDeferredModulesImpl() {", + Template.indent([ + "var result;", + "for(var i = 0; i < deferredModules.length; i++) {", + Template.indent([ + "var deferredModule = deferredModules[i];", + "var fulfilled = true;", + "for(var j = 1; j < deferredModule.length; j++) {", + Template.indent([ + "var depId = deferredModule[j];", + "if(installedChunks[depId] !== 0) fulfilled = false;" + ]), + "}", + "if(fulfilled) {", + Template.indent([ + "deferredModules.splice(i--, 1);", + "result = " + + "__webpack_require__(" + + `${RuntimeGlobals.entryModuleId} = deferredModule[0]);` + ]), + "}" + ]), + "}", + "if(deferredModules.length === 0) {", + Template.indent([ + `${RuntimeGlobals.startup}();`, + `${ + RuntimeGlobals.startup + } = ${runtimeTemplate.emptyFunction()};` + ]), + "}", + "return result;" + ]), + "}", + `var startup = ${RuntimeGlobals.startup};`, + `${RuntimeGlobals.startup} = ${runtimeTemplate.basicFunction("", [ + "// reset startup function so it can be called again when more startup code is added", + `${ + RuntimeGlobals.startup + } = startup || (${runtimeTemplate.emptyFunction()});`, + "return (checkDeferredModules = checkDeferredModulesImpl)();" + ])};` + ]) + : "// no deferred startup" + ]); + } +} + +module.exports = JsonpChunkLoadingRuntimeModule; + + +/***/ }), + +/***/ 39546: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../ChunkGraph")} ChunkGraph */ +/** @typedef {import("../ChunkGroup")} ChunkGroup */ +/** @typedef {(string|number)[]} EntryItem */ + +// TODO move to this file to ../javascript/ChunkHelpers.js + +/** + * @param {ChunkGroup} chunkGroup a chunk group + * @returns {Set} chunks + */ +const getAllChunks = chunkGroup => { + const queue = new Set([chunkGroup]); + const chunks = new Set(); + for (const chunkGroup of queue) { + for (const chunk of chunkGroup.chunks) { + chunks.add(chunk); + } + for (const parent of chunkGroup.parentsIterable) { + queue.add(parent); + } + } + return chunks; +}; + +/** + * @param {ChunkGraph} chunkGraph the chunk graph + * @param {Chunk} chunk the chunk + * @param {function(Chunk): boolean} chunkFilter the chunk filter function + * @returns {EntryItem[]} serialized entry info: + * inner arrays have this format [module id, ...chunk ids] + */ +exports.getEntryInfo = (chunkGraph, chunk, chunkFilter) => { + return Array.from( + chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) + ).map(([module, chunkGroup]) => { + const arr = [chunkGraph.getModuleId(module)]; + for (const c of getAllChunks(chunkGroup)) { + if (!chunkFilter(c) && !c.hasRuntime()) continue; + const id = c.id; + if (id === chunk.id) continue; + arr.push(id); + } + return arr; + }); +}; + +/** + * @param {Compilation} compilation the compilation + * @param {Chunk} chunk the chunk + * @returns {boolean} true, when other chunks have this chunk as runtime chunk + */ +exports.needEntryDeferringCode = (compilation, chunk) => { + for (const entrypoint of compilation.entrypoints.values()) { + if (entrypoint.getRuntimeChunk() === chunk) { + if (entrypoint.chunks.length > 1 || entrypoint.chunks[0] !== chunk) + return true; + } + } + for (const entrypoint of compilation.asyncEntrypoints) { + if (entrypoint.getRuntimeChunk() === chunk) { + if (entrypoint.chunks.length > 1 || entrypoint.chunks[0] !== chunk) + return true; + } + } + return false; +}; + + +/***/ }), + +/***/ 57279: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ArrayPushCallbackChunkFormatPlugin = __webpack_require__(97504); +const EnableChunkLoadingPlugin = __webpack_require__(41952); +const JsonpChunkLoadingRuntimeModule = __webpack_require__(84539); + +/** @typedef {import("../Chunk")} Chunk */ +/** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../Compiler")} Compiler */ + +class JsonpTemplatePlugin { + /** + * @deprecated use JsonpChunkLoadingRuntimeModule.getCompilationHooks instead + * @param {Compilation} compilation the compilation + * @returns {JsonpChunkLoadingRuntimeModule.JsonpCompilationPluginHooks} hooks + */ + static getCompilationHooks(compilation) { + return JsonpChunkLoadingRuntimeModule.getCompilationHooks(compilation); + } + + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.options.output.chunkLoading = "jsonp"; + new ArrayPushCallbackChunkFormatPlugin().apply(compiler); + new EnableChunkLoadingPlugin("jsonp").apply(compiler); + } +} + +module.exports = JsonpTemplatePlugin; + + +/***/ }), + +/***/ 82517: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const util = __webpack_require__(31669); +const webpackOptionsSchema = __webpack_require__(15546); +const Compiler = __webpack_require__(51455); +const MultiCompiler = __webpack_require__(87225); +const WebpackOptionsApply = __webpack_require__(8185); +const { + applyWebpackOptionsDefaults, + applyWebpackOptionsBaseDefaults +} = __webpack_require__(72829); +const { getNormalizedWebpackOptions } = __webpack_require__(92188); +const NodeEnvironmentPlugin = __webpack_require__(46613); +const validateSchema = __webpack_require__(19651); + +/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} WebpackOptions */ +/** @typedef {import("./Compiler").WatchOptions} WatchOptions */ +/** @typedef {import("./MultiStats")} MultiStats */ +/** @typedef {import("./Stats")} Stats */ + +/** + * @template T + * @callback Callback + * @param {Error=} err + * @param {T=} stats + * @returns {void} + */ + +/** + * @param {WebpackOptions[]} childOptions options array + * @returns {MultiCompiler} a multi-compiler + */ +const createMultiCompiler = childOptions => { + const compilers = childOptions.map(options => createCompiler(options)); + const compiler = new MultiCompiler(compilers); + for (const childCompiler of compilers) { + if (childCompiler.options.dependencies) { + compiler.setDependencies( + childCompiler, + childCompiler.options.dependencies + ); + } + } + return compiler; +}; + +/** + * @param {WebpackOptions} rawOptions options object + * @returns {Compiler} a compiler + */ +const createCompiler = rawOptions => { + const options = getNormalizedWebpackOptions(rawOptions); + applyWebpackOptionsBaseDefaults(options); + const compiler = new Compiler(options.context); + compiler.options = options; + new NodeEnvironmentPlugin({ + infrastructureLogging: options.infrastructureLogging + }).apply(compiler); + if (Array.isArray(options.plugins)) { + for (const plugin of options.plugins) { + if (typeof plugin === "function") { + plugin.call(compiler, compiler); + } else { + plugin.apply(compiler); + } + } + } + applyWebpackOptionsDefaults(options); + compiler.hooks.environment.call(); + compiler.hooks.afterEnvironment.call(); + new WebpackOptionsApply().process(options, compiler); + compiler.hooks.initialize.call(); + return compiler; +}; + +/** + * @callback WebpackFunctionSingle + * @param {WebpackOptions} options options object + * @param {Callback=} callback callback + * @returns {Compiler} the compiler object + */ + +/** + * @callback WebpackFunctionMulti + * @param {WebpackOptions[]} options options objects + * @param {Callback=} callback callback + * @returns {MultiCompiler} the multi compiler object + */ + +const webpack = /** @type {WebpackFunctionSingle & WebpackFunctionMulti} */ (( + options, + callback +) => { + const create = () => { + validateSchema(webpackOptionsSchema, options); + /** @type {MultiCompiler|Compiler} */ + let compiler; + let watch = false; + /** @type {WatchOptions|WatchOptions[]} */ + let watchOptions; + if (Array.isArray(options)) { + /** @type {MultiCompiler} */ + compiler = createMultiCompiler(options); + watch = options.some(options => options.watch); + watchOptions = options.map(options => options.watchOptions || {}); + } else { + /** @type {Compiler} */ + compiler = createCompiler(options); + watch = options.watch; + watchOptions = options.watchOptions || {}; + } + return { compiler, watch, watchOptions }; + }; + if (callback) { + try { + const { compiler, watch, watchOptions } = create(); + if (watch) { + compiler.watch(watchOptions, callback); + } else { + compiler.run((err, stats) => { + compiler.close(err2 => { + callback(err || err2, stats); + }); + }); + } + return compiler; + } catch (err) { + process.nextTick(() => callback(err)); + return null; + } + } else { + const { compiler, watch } = create(); + if (watch) { + util.deprecate( + () => {}, + "A 'callback' argument need to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.", + "DEP_WEBPACK_WATCH_WITHOUT_CALLBACK" + )(); + } + return compiler; + } +}); + +module.exports = webpack; + + +/***/ }), + +/***/ 29845: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const StartupChunkDependenciesPlugin = __webpack_require__(9517); +const ImportScriptsChunkLoadingRuntimeModule = __webpack_require__(9187); + +/** @typedef {import("../Compiler")} Compiler */ + +class ImportScriptsChunkLoadingPlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + new StartupChunkDependenciesPlugin({ + chunkLoading: "import-scripts", + asyncChunkLoading: true + }).apply(compiler); + compiler.hooks.thisCompilation.tap( + "ImportScriptsChunkLoadingPlugin", + compilation => { + const globalChunkLoading = compilation.outputOptions.chunkLoading; + const isEnabledForChunk = chunk => { + const options = chunk.getEntryOptions(); + const chunkLoading = + (options && options.chunkLoading) || globalChunkLoading; + return chunkLoading === "import-scripts"; + }; + const onceForChunkSet = new WeakSet(); + const handler = (chunk, set) => { + if (onceForChunkSet.has(chunk)) return; + onceForChunkSet.add(chunk); + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.moduleFactoriesAddOnly); + set.add(RuntimeGlobals.hasOwnProperty); + compilation.addRuntimeModule( + chunk, + new ImportScriptsChunkLoadingRuntimeModule(set) + ); + }; + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunkHandlers) + .tap("ImportScriptsChunkLoadingPlugin", handler); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadUpdateHandlers) + .tap("ImportScriptsChunkLoadingPlugin", handler); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadManifest) + .tap("ImportScriptsChunkLoadingPlugin", handler); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.baseURI) + .tap("ImportScriptsChunkLoadingPlugin", handler); + + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.ensureChunkHandlers) + .tap("ImportScriptsChunkLoadingPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.publicPath); + set.add(RuntimeGlobals.getChunkScriptFilename); + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadUpdateHandlers) + .tap("ImportScriptsChunkLoadingPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.publicPath); + set.add(RuntimeGlobals.getChunkUpdateScriptFilename); + set.add(RuntimeGlobals.moduleCache); + set.add(RuntimeGlobals.hmrModuleData); + set.add(RuntimeGlobals.moduleFactoriesAddOnly); + }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.hmrDownloadManifest) + .tap("ImportScriptsChunkLoadingPlugin", (chunk, set) => { + if (!isEnabledForChunk(chunk)) return; + set.add(RuntimeGlobals.publicPath); + set.add(RuntimeGlobals.getUpdateManifestFilename); + }); + } + ); + } +} +module.exports = ImportScriptsChunkLoadingPlugin; + + +/***/ }), + +/***/ 9187: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + + + +const RuntimeGlobals = __webpack_require__(48801); +const RuntimeModule = __webpack_require__(54746); +const Template = __webpack_require__(90751); +const { + getChunkFilenameTemplate +} = __webpack_require__(80867); +const { getUndoPath } = __webpack_require__(47779); + +class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule { + constructor(runtimeRequirements) { + super("importScripts chunk loading", RuntimeModule.STAGE_ATTACH); + this.runtimeRequirements = runtimeRequirements; + } + + /** + * @returns {string} runtime code + */ + generate() { + const { + chunk, + compilation: { + runtimeTemplate, + outputOptions: { globalObject, chunkLoadingGlobal, hotUpdateGlobal } + } + } = this; + const fn = RuntimeGlobals.ensureChunkHandlers; + const withBaseURI = this.runtimeRequirements.has(RuntimeGlobals.baseURI); + const withLoading = this.runtimeRequirements.has( + RuntimeGlobals.ensureChunkHandlers + ); + const withHmr = this.runtimeRequirements.has( + RuntimeGlobals.hmrDownloadUpdateHandlers + ); + const withHmrManifest = this.runtimeRequirements.has( + RuntimeGlobals.hmrDownloadManifest + ); + const chunkLoadingGlobalExpr = `${globalObject}[${JSON.stringify( + chunkLoadingGlobal + )}]`; + const outputName = this.compilation.getPath( + getChunkFilenameTemplate(chunk, this.compilation.outputOptions), + { + chunk, + contentHashType: "javascript" + } + ); + const rootOutputDir = getUndoPath(outputName, false); + return Template.asString([ + withBaseURI + ? Template.asString([ + `${RuntimeGlobals.baseURI} = self.location + ${JSON.stringify( + rootOutputDir ? "/../" + rootOutputDir : "" + )};` + ]) + : "// no baseURI", + "", + "// object to store loaded chunks", + '// "1" means "already loaded"', + "var installedChunks = {", + Template.indent( + chunk.ids.map(id => `${JSON.stringify(id)}: 1`).join(",\n") + ), + "};", + "", + withLoading + ? Template.asString([ + "// importScripts chunk loading", + `var chunkLoadingCallback = ${runtimeTemplate.basicFunction( + "data", + [ + runtimeTemplate.destructureArray( + ["chunkIds", "moreModules", "runtime"], + "data" + ), + "for(var moduleId in moreModules) {", + Template.indent([ + `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, + Template.indent( + `${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];` + ), + "}" + ]), + "}", + "if(runtime) runtime(__webpack_require__);", + "while(chunkIds.length)", + Template.indent("installedChunks[chunkIds.pop()] = 1;"), + "parentChunkLoadingFunction(data);" + ] + )};`, + `${fn}.i = ${runtimeTemplate.basicFunction("chunkId, promises", [ + '// "1" is the signal for "already loaded"', + "if(!installedChunks[chunkId]) {", + Template.indent([ + `importScripts(${JSON.stringify(rootOutputDir)} + ${ + RuntimeGlobals.getChunkScriptFilename + }(chunkId));` + ]), + "}" + ])};`, + "", + `var chunkLoadingGlobal = ${chunkLoadingGlobalExpr} = ${chunkLoadingGlobalExpr} || [];`, + "var parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);", + "chunkLoadingGlobal.push = chunkLoadingCallback;" + ]) + : "// no chunk loading", + "", + withHmr + ? Template.asString([ + "function loadUpdateChunk(chunkId, updatedModulesList) {", + Template.indent([ + "var success = false;", + `${globalObject}[${JSON.stringify( + hotUpdateGlobal + )}] = ${runtimeTemplate.basicFunction("_, moreModules, runtime", [ + "for(var moduleId in moreModules) {", + Template.indent([ + `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, + Template.indent([ + "currentUpdate[moduleId] = moreModules[moduleId];", + "if(updatedModulesList) updatedModulesList.push(moduleId);" + ]), + "}" + ]), + "}", + "if(runtime) currentUpdateRuntime.push(runtime);", + "success = true;" + ])};`, + "// start update chunk loading", + `importScripts(${JSON.stringify(rootOutputDir)} + ${ + RuntimeGlobals.getChunkUpdateScriptFilename + }(chunkId));`, + 'if(!success) throw new Error("Loading update chunk failed for unknown reason");' + ]), + "}", + "", + Template.getFunctionContent( + require('./JavascriptHotModuleReplacement.runtime.js') + ) + .replace(/\$key\$/g, "importScrips") + .replace(/\$installedChunks\$/g, "installedChunks") + .replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk") + .replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) + .replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories) + .replace( + /\$ensureChunkHandlers\$/g, + RuntimeGlobals.ensureChunkHandlers + ) + .replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty) + .replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) + .replace( + /\$hmrDownloadUpdateHandlers\$/g, + RuntimeGlobals.hmrDownloadUpdateHandlers + ) + .replace( + /\$hmrInvalidateModuleHandlers\$/g, + RuntimeGlobals.hmrInvalidateModuleHandlers + ) + ]) + : "// no HMR", + "", + withHmrManifest + ? Template.asString([ + `${ + RuntimeGlobals.hmrDownloadManifest + } = ${runtimeTemplate.basicFunction("", [ + 'if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API");', + `return fetch(${RuntimeGlobals.publicPath} + ${ + RuntimeGlobals.getUpdateManifestFilename + }()).then(${runtimeTemplate.basicFunction("response", [ + "if(response.status === 404) return; // no update available", + 'if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText);', + "return response.json();" + ])});` + ])};` + ]) + : "// no HMR manifest" + ]); + } +} + +module.exports = ImportScriptsChunkLoadingRuntimeModule; + + +/***/ }), + +/***/ 39959: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + + + +const ArrayPushCallbackChunkFormatPlugin = __webpack_require__(97504); +const EnableChunkLoadingPlugin = __webpack_require__(41952); + +/** @typedef {import("../Compiler")} Compiler */ + +class WebWorkerTemplatePlugin { + /** + * Apply the plugin + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ + apply(compiler) { + compiler.options.output.chunkLoading = "import-scripts"; + new ArrayPushCallbackChunkFormatPlugin().apply(compiler); + new EnableChunkLoadingPlugin("import-scripts").apply(compiler); + } +} +module.exports = WebWorkerTemplatePlugin; + + +/***/ }), + +/***/ 57260: +/***/ (function(module) { + +class Node { + /// value; + /// next; + + constructor(value) { + this.value = value; + + // TODO: Remove this when targeting Node.js 12. + this.next = undefined; + } +} + +class Queue { + // TODO: Use private class fields when targeting Node.js 12. + // #_head; + // #_tail; + // #_size; + + constructor() { + this.clear(); + } + + enqueue(value) { + const node = new Node(value); + + if (this._head) { + this._tail.next = node; + this._tail = node; + } else { + this._head = node; + this._tail = node; + } + + this._size++; + } + + dequeue() { + const current = this._head; + if (!current) { + return; + } + + this._head = this._head.next; + this._size--; + return current.value; + } + + clear() { + this._head = undefined; + this._tail = undefined; + this._size = 0; + } + + get size() { + return this._size; + } + + * [Symbol.iterator]() { + let current = this._head; + + while (current) { + yield current.value; + current = current.next; + } + } +} + +module.exports = Queue; + + +/***/ }), + +/***/ 81956: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* eslint-disable import/no-extraneous-dependencies */ + +module.exports = function () { + return { + BasicEvaluatedExpression: __webpack_require__(98288), + ModuleFilenameHelpers: __webpack_require__(79843), + NodeTargetPlugin: __webpack_require__(62791), + StringXor: __webpack_require__(74395), + sources: __webpack_require__(16520).sources, + webpack: __webpack_require__(16520), + } +} + + +/***/ }), + +/***/ 97289: +/***/ (function(module) { + +module.exports = eval("require")("pnpapi"); + + +/***/ }), + +/***/ 42357: +/***/ (function(module) { + +"use strict"; +module.exports = require("assert");; + +/***/ }), + +/***/ 3561: +/***/ (function(module) { + +"use strict"; +module.exports = require("browserslist");; + +/***/ }), + +/***/ 64293: +/***/ (function(module) { + +"use strict"; +module.exports = require("buffer");; + +/***/ }), + +/***/ 27619: +/***/ (function(module) { + +"use strict"; +module.exports = require("constants");; + +/***/ }), + +/***/ 76417: +/***/ (function(module) { + +"use strict"; +module.exports = require("crypto");; + +/***/ }), + +/***/ 28614: +/***/ (function(module) { + +"use strict"; +module.exports = require("events");; + +/***/ }), + +/***/ 35747: +/***/ (function(module) { + +"use strict"; +module.exports = require("fs");; + +/***/ }), + +/***/ 98605: +/***/ (function(module) { + +"use strict"; +module.exports = require("http");; + +/***/ }), + +/***/ 57211: +/***/ (function(module) { + +"use strict"; +module.exports = require("https");; + +/***/ }), + +/***/ 57012: +/***/ (function(module) { + +"use strict"; +module.exports = require("inspector");; + +/***/ }), + +/***/ 59733: +/***/ (function(module) { + +"use strict"; +module.exports = require("jest-worker");; + +/***/ }), + +/***/ 14442: +/***/ (function(module) { + +"use strict"; +module.exports = require("next/dist/compiled/find-up");; + +/***/ }), + +/***/ 36386: +/***/ (function(module) { + +"use strict"; +module.exports = require("next/dist/compiled/neo-async");; + +/***/ }), + +/***/ 79286: +/***/ (function(module) { + +"use strict"; +module.exports = require("next/dist/compiled/schema-utils3");; + +/***/ }), + +/***/ 96241: +/***/ (function(module) { + +"use strict"; +module.exports = require("next/dist/compiled/source-map");; + +/***/ }), + +/***/ 54775: +/***/ (function(module) { + +"use strict"; +module.exports = require("next/dist/compiled/terser");; + +/***/ }), + +/***/ 55600: +/***/ (function(module) { + +"use strict"; +module.exports = require("next/dist/compiled/webpack-sources2");; + +/***/ }), + +/***/ 12087: +/***/ (function(module) { + +"use strict"; +module.exports = require("os");; + +/***/ }), + +/***/ 85622: +/***/ (function(module) { + +"use strict"; +module.exports = require("path");; + +/***/ }), + +/***/ 61765: +/***/ (function(module) { + +"use strict"; +module.exports = require("process");; + +/***/ }), + +/***/ 71191: +/***/ (function(module) { + +"use strict"; +module.exports = require("querystring");; + +/***/ }), + +/***/ 92413: +/***/ (function(module) { + +"use strict"; +module.exports = require("stream");; + +/***/ }), + +/***/ 78835: +/***/ (function(module) { + +"use strict"; +module.exports = require("url");; + +/***/ }), + +/***/ 31669: +/***/ (function(module) { + +"use strict"; +module.exports = require("util");; + +/***/ }), + +/***/ 92184: +/***/ (function(module) { + +"use strict"; +module.exports = require("vm");; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ loaded: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/node module decorator */ +/******/ !function() { +/******/ __webpack_require__.nmd = function(module) { +/******/ module.paths = []; +/******/ if (!module.children) module.children = []; +/******/ return module; +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __webpack_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __webpack_require__(81956); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/compiled/webpack/empty.js b/packages/next/compiled/webpack/empty.js new file mode 100644 index 000000000000000..c2e91d4fce28670 --- /dev/null +++ b/packages/next/compiled/webpack/empty.js @@ -0,0 +1,52 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 533: +/***/ (function() { + + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(533); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/compiled/webpack/global.js b/packages/next/compiled/webpack/global.js new file mode 100644 index 000000000000000..83dd9e57909c3a2 --- /dev/null +++ b/packages/next/compiled/webpack/global.js @@ -0,0 +1,72 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 149: +/***/ (function(module) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(149); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/compiled/webpack/harmony-module.js b/packages/next/compiled/webpack/harmony-module.js new file mode 100644 index 000000000000000..8676ca918aa9fa0 --- /dev/null +++ b/packages/next/compiled/webpack/harmony-module.js @@ -0,0 +1,76 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 931: +/***/ (function(module) { + +module.exports = function(originalModule) { + if (!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + Object.defineProperty(module, "exports", { + enumerable: true + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(931); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/compiled/webpack/index.js b/packages/next/compiled/webpack/index.js new file mode 100644 index 000000000000000..ed943c91578cab7 --- /dev/null +++ b/packages/next/compiled/webpack/index.js @@ -0,0 +1,109 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 305: +/***/ (function() { + + + +let $module + +/* + let contextProto = this.context; + while (contextProto = Object.getPrototypeOf(contextProto)) { + completionGroups.push(Object.getOwnPropertyNames(contextProto)); + } +*/ + + +function handle (data) { + let idx = data.idx + , child = data.child + , method = data.method + , args = data.args + , callback = function () { + let _args = Array.prototype.slice.call(arguments) + if (_args[0] instanceof Error) { + let e = _args[0] + _args[0] = { + '$error' : '$error' + , 'type' : e.constructor.name + , 'message' : e.message + , 'stack' : e.stack + } + Object.keys(e).forEach(function(key) { + _args[0][key] = e[key] + }) + } + process.send({ owner: 'farm', idx: idx, child: child, args: _args }) + } + , exec + + if (method == null && typeof $module == 'function') + exec = $module + else if (typeof $module[method] == 'function') + exec = $module[method] + + if (!exec) + return console.error('NO SUCH METHOD:', method) + + exec.apply(null, args.concat([ callback ])) +} + + +process.on('message', function (data) { + if (data.owner !== 'farm') { + return; + } + + if (!$module) return $module = require(data.module) + if (data.event == 'die') return process.exit(0) + handle(data) +}) + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(305); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/compiled/webpack/minify.js b/packages/next/compiled/webpack/minify.js new file mode 100644 index 000000000000000..b10280e0f25aaa8 --- /dev/null +++ b/packages/next/compiled/webpack/minify.js @@ -0,0 +1,341 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 149: +/***/ (function(module, exports, __nccwpck_require__) { + +/* module decorator */ module = __nccwpck_require__.nmd(module); + + +const { + minify: terserMinify +} = __nccwpck_require__(775); +/** @typedef {import("source-map").RawSourceMap} RawSourceMap */ + +/** @typedef {import("./index.js").ExtractCommentsOptions} ExtractCommentsOptions */ + +/** @typedef {import("./index.js").CustomMinifyFunction} CustomMinifyFunction */ + +/** @typedef {import("./index.js").MinifyOptions} MinifyOptions */ + +/** @typedef {import("terser").MinifyOptions} TerserMinifyOptions */ + +/** @typedef {import("terser").MinifyOutput} MinifyOutput */ + +/** @typedef {import("terser").FormatOptions} FormatOptions */ + +/** @typedef {import("terser").MangleOptions} MangleOptions */ + +/** @typedef {import("./index.js").ExtractCommentsFunction} ExtractCommentsFunction */ + +/** @typedef {import("./index.js").ExtractCommentsCondition} ExtractCommentsCondition */ + +/** + * @typedef {Object} InternalMinifyOptions + * @property {string} name + * @property {string} input + * @property {RawSourceMap | undefined} inputSourceMap + * @property {ExtractCommentsOptions} extractComments + * @property {CustomMinifyFunction | undefined} minify + * @property {MinifyOptions} minifyOptions + */ + +/** + * @typedef {Array} ExtractedComments + */ + +/** + * @typedef {Promise} InternalMinifyResult + */ + +/** + * @typedef {TerserMinifyOptions & { sourceMap: undefined } & ({ output: FormatOptions & { beautify: boolean } } | { format: FormatOptions & { beautify: boolean } })} NormalizedTerserMinifyOptions + */ + +/** + * @param {TerserMinifyOptions} [terserOptions={}] + * @returns {NormalizedTerserMinifyOptions} + */ + + +function buildTerserOptions(terserOptions = {}) { + return { ...terserOptions, + mangle: terserOptions.mangle == null ? true : typeof terserOptions.mangle === "boolean" ? terserOptions.mangle : { ...terserOptions.mangle + }, + // Ignoring sourceMap from options + // eslint-disable-next-line no-undefined + sourceMap: undefined, + // the `output` option is deprecated + ...(terserOptions.format ? { + format: { + beautify: false, + ...terserOptions.format + } + } : { + output: { + beautify: false, + ...terserOptions.output + } + }) + }; +} +/** + * @param {any} value + * @returns {boolean} + */ + + +function isObject(value) { + const type = typeof value; + return value != null && (type === "object" || type === "function"); +} +/** + * @param {ExtractCommentsOptions} extractComments + * @param {NormalizedTerserMinifyOptions} terserOptions + * @param {ExtractedComments} extractedComments + * @returns {ExtractCommentsFunction} + */ + + +function buildComments(extractComments, terserOptions, extractedComments) { + /** @type {{ [index: string]: ExtractCommentsCondition }} */ + const condition = {}; + let comments; + + if (terserOptions.format) { + ({ + comments + } = terserOptions.format); + } else if (terserOptions.output) { + ({ + comments + } = terserOptions.output); + } + + condition.preserve = typeof comments !== "undefined" ? comments : false; + + if (typeof extractComments === "boolean" && extractComments) { + condition.extract = "some"; + } else if (typeof extractComments === "string" || extractComments instanceof RegExp) { + condition.extract = extractComments; + } else if (typeof extractComments === "function") { + condition.extract = extractComments; + } else if (extractComments && isObject(extractComments)) { + condition.extract = typeof extractComments.condition === "boolean" && extractComments.condition ? "some" : typeof extractComments.condition !== "undefined" ? extractComments.condition : "some"; + } else { + // No extract + // Preserve using "commentsOpts" or "some" + condition.preserve = typeof comments !== "undefined" ? comments : "some"; + condition.extract = false; + } // Ensure that both conditions are functions + + + ["preserve", "extract"].forEach(key => { + /** @type {undefined | string} */ + let regexStr; + /** @type {undefined | RegExp} */ + + let regex; + + switch (typeof condition[key]) { + case "boolean": + condition[key] = condition[key] ? () => true : () => false; + break; + + case "function": + break; + + case "string": + if (condition[key] === "all") { + condition[key] = () => true; + + break; + } + + if (condition[key] === "some") { + condition[key] = + /** @type {ExtractCommentsFunction} */ + (astNode, comment) => (comment.type === "comment2" || comment.type === "comment1") && /@preserve|@lic|@cc_on|^\**!/i.test(comment.value); + + break; + } + + regexStr = + /** @type {string} */ + condition[key]; + + condition[key] = + /** @type {ExtractCommentsFunction} */ + (astNode, comment) => new RegExp( + /** @type {string} */ + regexStr).test(comment.value); + + break; + + default: + regex = + /** @type {RegExp} */ + condition[key]; + + condition[key] = + /** @type {ExtractCommentsFunction} */ + (astNode, comment) => + /** @type {RegExp} */ + regex.test(comment.value); + + } + }); // Redefine the comments function to extract and preserve + // comments according to the two conditions + + return (astNode, comment) => { + if ( + /** @type {{ extract: ExtractCommentsFunction }} */ + condition.extract(astNode, comment)) { + const commentText = comment.type === "comment2" ? `/*${comment.value}*/` : `//${comment.value}`; // Don't include duplicate comments + + if (!extractedComments.includes(commentText)) { + extractedComments.push(commentText); + } + } + + return ( + /** @type {{ preserve: ExtractCommentsFunction }} */ + condition.preserve(astNode, comment) + ); + }; +} +/** + * @param {InternalMinifyOptions} options + * @returns {InternalMinifyResult} + */ + + +async function minify(options) { + const { + name, + input, + inputSourceMap, + minify: minifyFn, + minifyOptions + } = options; + + if (minifyFn) { + return minifyFn({ + [name]: input + }, inputSourceMap, minifyOptions); + } // Copy terser options + + + const terserOptions = buildTerserOptions(minifyOptions); // Let terser generate a SourceMap + + if (inputSourceMap) { + // @ts-ignore + terserOptions.sourceMap = { + asObject: true + }; + } + /** @type {ExtractedComments} */ + + + const extractedComments = []; + const { + extractComments + } = options; + + if (terserOptions.output) { + terserOptions.output.comments = buildComments(extractComments, terserOptions, extractedComments); + } else if (terserOptions.format) { + terserOptions.format.comments = buildComments(extractComments, terserOptions, extractedComments); + } + + const result = await terserMinify({ + [name]: input + }, terserOptions); + return { ...result, + extractedComments + }; +} +/** + * @param {string} options + * @returns {InternalMinifyResult} + */ + + +function transform(options) { + // 'use strict' => this === undefined (Clean Scope) + // Safer for possible security issues, albeit not critical at all here + // eslint-disable-next-line no-param-reassign + const evaluatedOptions = + /** @type {InternalMinifyOptions} */ + // eslint-disable-next-line no-new-func + new Function("exports", "require", "module", "__filename", "__dirname", `'use strict'\nreturn ${options}`)(exports, require, module, __filename, __dirname); + return minify(evaluatedOptions); +} + +module.exports.minify = minify; +module.exports.transform = transform; + +/***/ }), + +/***/ 775: +/***/ (function(module) { + +module.exports = require("next/dist/compiled/terser");; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ loaded: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/node module decorator */ +/******/ !function() { +/******/ __nccwpck_require__.nmd = function(module) { +/******/ module.paths = []; +/******/ if (!module.children) module.children = []; +/******/ return module; +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(149); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/compiled/webpack/module.js b/packages/next/compiled/webpack/module.js new file mode 100644 index 000000000000000..dc6906554d3dcce --- /dev/null +++ b/packages/next/compiled/webpack/module.js @@ -0,0 +1,74 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 880: +/***/ (function(module) { + +module.exports = function(module) { + if (!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(880); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/compiled/webpack/package.json b/packages/next/compiled/webpack/package.json new file mode 100644 index 000000000000000..1b1fa93b730e808 --- /dev/null +++ b/packages/next/compiled/webpack/package.json @@ -0,0 +1 @@ +{"name":"webpack","main":"bundle4.js","author":"Tobias Koppers @sokra","license":"MIT"} diff --git a/packages/next/compiled/webpack/system.js b/packages/next/compiled/webpack/system.js new file mode 100644 index 000000000000000..6f400efed2bbe59 --- /dev/null +++ b/packages/next/compiled/webpack/system.js @@ -0,0 +1,59 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 957: +/***/ (function(module) { + +// Provide a "System" global. +module.exports = { + // Make sure import is only used as "System.import" + import: function() { + throw new Error("System.import cannot be used indirectly"); + } +}; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(957); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/compiled/webpack/webpack.js b/packages/next/compiled/webpack/webpack.js new file mode 100644 index 000000000000000..c5632cfbec988bc --- /dev/null +++ b/packages/next/compiled/webpack/webpack.js @@ -0,0 +1,27 @@ +exports.__esModule = true + +exports.isWebpack5 = false + +exports.default = undefined + +let initializedWebpack5 = false +let initializedWebpack4 = false +let initFns = [] +exports.init = function (useWebpack5) { + if (useWebpack5) { + Object.assign(exports, require('./bundle5')()) + exports.isWebpack5 = true + if (!initializedWebpack5) for (const cb of initFns) cb() + initializedWebpack5 = true + } else { + Object.assign(exports, require('./bundle4')()) + exports.isWebpack5 = false + if (!initializedWebpack4) for (const cb of initFns) cb() + initializedWebpack4 = true + } +} + +exports.onWebpackInit = function (cb) { + if (initializedWebpack5 || initializedWebpack4) cb() + initFns.push(cb) +} diff --git a/packages/next/compiled/webpack/worker.js b/packages/next/compiled/webpack/worker.js new file mode 100644 index 000000000000000..1fce4a8b36d0dc5 --- /dev/null +++ b/packages/next/compiled/webpack/worker.js @@ -0,0 +1,281 @@ +module.exports = +/******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 787: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _terser = __nccwpck_require__(775); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +const buildTerserOptions = ({ + ecma, + warnings, + parse = {}, + compress = {}, + mangle, + module, + output, + toplevel, + nameCache, + ie8, + + /* eslint-disable camelcase */ + keep_classnames, + keep_fnames, + + /* eslint-enable camelcase */ + safari10 +} = {}) => ({ + ecma, + warnings, + parse: _objectSpread({}, parse), + compress: typeof compress === 'boolean' ? compress : _objectSpread({}, compress), + // eslint-disable-next-line no-nested-ternary + mangle: mangle == null ? true : typeof mangle === 'boolean' ? mangle : _objectSpread({}, mangle), + output: _objectSpread({ + shebang: true, + comments: false, + beautify: false, + semicolons: true + }, output), + module, + // Ignoring sourceMap from options + sourceMap: null, + toplevel, + nameCache, + ie8, + keep_classnames, + keep_fnames, + safari10 +}); + +const buildComments = (options, terserOptions, extractedComments) => { + const condition = {}; + const commentsOpts = terserOptions.output.comments; // Use /^\**!|@preserve|@license|@cc_on/i RegExp + + if (typeof options.extractComments === 'boolean') { + condition.preserve = commentsOpts; + condition.extract = /^\**!|@preserve|@license|@cc_on/i; + } else if (typeof options.extractComments === 'string' || options.extractComments instanceof RegExp) { + // extractComments specifies the extract condition and commentsOpts specifies the preserve condition + condition.preserve = commentsOpts; + condition.extract = options.extractComments; + } else if (typeof options.extractComments === 'function') { + condition.preserve = commentsOpts; + condition.extract = options.extractComments; + } else if (Object.prototype.hasOwnProperty.call(options.extractComments, 'condition')) { + // Extract condition is given in extractComments.condition + condition.preserve = commentsOpts; + condition.extract = options.extractComments.condition; + } else { + // No extract condition is given. Extract comments that match commentsOpts instead of preserving them + condition.preserve = false; + condition.extract = commentsOpts; + } // Ensure that both conditions are functions + + + ['preserve', 'extract'].forEach(key => { + let regexStr; + let regex; + + switch (typeof condition[key]) { + case 'boolean': + condition[key] = condition[key] ? () => true : () => false; + break; + + case 'function': + break; + + case 'string': + if (condition[key] === 'all') { + condition[key] = () => true; + + break; + } + + if (condition[key] === 'some') { + condition[key] = (astNode, comment) => { + return comment.type === 'comment2' && /^\**!|@preserve|@license|@cc_on/i.test(comment.value); + }; + + break; + } + + regexStr = condition[key]; + + condition[key] = (astNode, comment) => { + return new RegExp(regexStr).test(comment.value); + }; + + break; + + default: + regex = condition[key]; + + condition[key] = (astNode, comment) => regex.test(comment.value); + + } + }); // Redefine the comments function to extract and preserve + // comments according to the two conditions + + return (astNode, comment) => { + if (condition.extract(astNode, comment)) { + const commentText = comment.type === 'comment2' ? `/*${comment.value}*/` : `//${comment.value}`; // Don't include duplicate comments + + if (!extractedComments.includes(commentText)) { + extractedComments.push(commentText); + } + } + + return condition.preserve(astNode, comment); + }; +}; + +const minify = options => { + const { + file, + input, + inputSourceMap, + extractComments, + minify: minifyFn + } = options; + + if (minifyFn) { + return minifyFn({ + [file]: input + }, inputSourceMap); + } // Copy terser options + + + const terserOptions = buildTerserOptions(options.terserOptions); // Let terser generate a SourceMap + + if (inputSourceMap) { + terserOptions.sourceMap = true; + } + + const extractedComments = []; + + if (extractComments) { + terserOptions.output.comments = buildComments(options, terserOptions, extractedComments); + } + + const { + error, + map, + code, + warnings + } = (0, _terser.minify)({ + [file]: input + }, terserOptions); + return { + error, + map, + code, + warnings, + extractedComments + }; +}; + +var _default = minify; +exports.default = _default; + +/***/ }), + +/***/ 359: +/***/ (function(module, exports, __nccwpck_require__) { + +/* module decorator */ module = __nccwpck_require__.nmd(module); + + +var _minify = _interopRequireDefault(__nccwpck_require__(787)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = (options, callback) => { + try { + // 'use strict' => this === undefined (Clean Scope) + // Safer for possible security issues, albeit not critical at all here + // eslint-disable-next-line no-new-func, no-param-reassign + options = new Function('exports', 'require', 'module', '__filename', '__dirname', `'use strict'\nreturn ${options}`)(exports, require, module, __filename, __dirname); + callback(null, (0, _minify.default)(options)); + } catch (errors) { + callback(errors); + } +}; + +/***/ }), + +/***/ 775: +/***/ (function(module) { + +module.exports = require("next/dist/compiled/terser");; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ loaded: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/node module decorator */ +/******/ !function() { +/******/ __nccwpck_require__.nmd = function(module) { +/******/ module.paths = []; +/******/ if (!module.children) module.children = []; +/******/ return module; +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __nccwpck_require__(359); +/******/ })() +; \ No newline at end of file diff --git a/packages/next/next-server/server/config.ts b/packages/next/next-server/server/config.ts index ba8b664dae66bbf..02e2558037f0dc9 100644 --- a/packages/next/next-server/server/config.ts +++ b/packages/next/next-server/server/config.ts @@ -35,6 +35,7 @@ export type NextConfig = { [key: string]: any } & { future: { strictPostcssConfiguration: boolean excludeDefaultMomentLocales: boolean + webpack5: boolean } } @@ -90,6 +91,7 @@ const defaultConfig: NextConfig = { future: { strictPostcssConfiguration: false, excludeDefaultMomentLocales: false, + webpack5: false, }, serverRuntimeConfig: {}, publicRuntimeConfig: {}, diff --git a/packages/next/package.json b/packages/next/package.json index 27d4be7daa5a843..e99ae821e402dd4 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -82,10 +82,12 @@ "etag": "1.8.1", "find-cache-dir": "3.3.1", "jest-worker": "24.9.0", + "klona": "^2.0.4", "loader-utils": "2.0.0", "native-url": "0.3.4", "node-fetch": "2.6.1", "node-html-parser": "1.4.9", + "node-libs-browser": "^2.2.1", "p-limit": "3.1.0", "path-browserify": "1.0.1", "pnp-webpack-plugin": "1.6.4", @@ -96,23 +98,19 @@ "react-is": "16.13.1", "react-refresh": "0.8.3", "resolve-url-loader": "3.1.2", - "sass-loader": "10.0.5", - "schema-utils": "2.7.1", "stream-browserify": "3.0.0", "style-loader": "1.2.1", "styled-jsx": "3.3.2", "use-subscription": "1.5.1", "vm-browserify": "1.1.2", - "watchpack": "2.0.0-beta.13", - "webpack": "4.44.1", - "webpack-sources": "1.4.3" + "watchpack": "2.0.0-beta.13" }, "optionalDependencies": { "sharp": "0.26.3" }, "peerDependencies": { "fibers": ">= 3.1.0", - "node-sass": "^4.0.0", + "node-sass": "^4.0.0 || ^5.0.0", "react": "^16.6.0 || ^17", "react-dom": "^16.6.0 || ^17", "sass": "^1.3.0" @@ -178,7 +176,7 @@ "@types/styled-jsx": "2.2.8", "@types/text-table": "0.2.1", "@types/webpack-sources": "0.1.5", - "@vercel/ncc": "0.26.1", + "@vercel/ncc": "0.27.0", "amphtml-validator": "1.0.33", "arg": "4.1.0", "ast-types": "0.13.2", @@ -219,6 +217,8 @@ "postcss-preset-env": "6.7.0", "postcss-scss": "3.0.4", "recast": "0.18.5", + "sass-loader": "10.0.5", + "schema-utils": "2.7.1", "semver": "7.3.2", "send": "0.17.1", "source-map": "0.6.1", @@ -230,7 +230,9 @@ "thread-loader": "2.1.3", "typescript": "3.8.3", "unistore": "3.4.1", - "web-vitals": "0.2.4" + "web-vitals": "0.2.4", + "webpack-sources": "1.4.3", + "webpack": "4.44.1" }, "engines": { "node": ">=10.13.0" diff --git a/packages/next/server/hot-middleware.ts b/packages/next/server/hot-middleware.ts index e6fbc497476a916..c89cada7f413392 100644 --- a/packages/next/server/hot-middleware.ts +++ b/packages/next/server/hot-middleware.ts @@ -21,7 +21,7 @@ // 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. -import webpack from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' import http from 'http' export class WebpackHotMiddleware { diff --git a/packages/next/server/hot-reloader.ts b/packages/next/server/hot-reloader.ts index 70169cecd5e2218..177a420fa231091 100644 --- a/packages/next/server/hot-reloader.ts +++ b/packages/next/server/hot-reloader.ts @@ -4,7 +4,7 @@ import { IncomingMessage, ServerResponse } from 'http' import { WebpackHotMiddleware } from './hot-middleware' import { join, relative as relativePath } from 'path' import { UrlObject } from 'url' -import webpack from 'webpack' +import { webpack, isWebpack5 } from 'next/dist/compiled/webpack/webpack' import { createEntrypoints, createPagesMapping } from '../build/entries' import { watchCompilers } from '../build/output' import getBaseWebpackConfig from '../build/webpack-config' @@ -546,6 +546,7 @@ export default class HotReloader { this.onDemandEntries.middleware, this.webpackHotMiddleware.middleware, getOverlayMiddleware({ + isWebpack5, rootDirectory: this.dir, stats: () => this.stats, serverStats: () => this.serverStats, diff --git a/packages/next/server/on-demand-entry-handler.ts b/packages/next/server/on-demand-entry-handler.ts index d3f3bfdced30b96..d6bef0477fe589a 100644 --- a/packages/next/server/on-demand-entry-handler.ts +++ b/packages/next/server/on-demand-entry-handler.ts @@ -2,7 +2,7 @@ import { EventEmitter } from 'events' import { IncomingMessage, ServerResponse } from 'http' import { join, posix } from 'path' import { parse } from 'url' -import webpack from 'webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' import * as Log from '../build/output/log' import { normalizePagePath, diff --git a/packages/next/taskfile-ncc.js b/packages/next/taskfile-ncc.js index fbc833720839434..eeb0cba2a667a8c 100644 --- a/packages/next/taskfile-ncc.js +++ b/packages/next/taskfile-ncc.js @@ -1,7 +1,16 @@ // eslint-disable-next-line import/no-extraneous-dependencies const ncc = require('@vercel/ncc') const { existsSync, readFileSync } = require('fs') -const { basename, dirname, extname, join } = require('path') +const { basename, dirname, extname, join, resolve } = require('path') +const { Module } = require('module') + +// See taskfile.js bundleContext definition for explanation +const m = new Module(resolve(__dirname, 'bundles', '_')) +m.filename = m.id +m.paths = Module._nodeModulePaths(m.id) +const bundleRequire = m.require +bundleRequire.resolve = (request, options) => + Module._resolveFilename(request, m, false, options) module.exports = function (task) { // eslint-disable-next-line require-yield @@ -12,7 +21,7 @@ module.exports = function (task) { } return ncc(join(__dirname, file.dir, file.base), { filename: file.base, - minify: true, + minify: options.minify === false ? false : true, ...options, }).then(({ code, assets }) => { Object.keys(assets).forEach((key) => { @@ -43,7 +52,7 @@ module.exports = function (task) { // It defines `name`, `main`, `author`, and `license`. It also defines `types`. // n.b. types intended for development usage only. function writePackageManifest(packageName, main, bundleName) { - const packagePath = require.resolve(packageName + '/package.json') + const packagePath = bundleRequire.resolve(packageName + '/package.json') let { name, author, license } = require(packagePath) const compiledPackagePath = join( diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index 89b8d525ffb7526..1b9e57b0b619d2a 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -1,6 +1,23 @@ // eslint-disable-next-line import/no-extraneous-dependencies const notifier = require('node-notifier') -const relative = require('path').relative +const { relative, basename, resolve } = require('path') +const { Module } = require('module') + +// Note: +// "bundles" folder shadows main node_modules in workspace where all installs in +// this shadow node_modules are alias installs only. +// This is because Yarn alias installs have bugs with version deduping where +// transitive versions are not resolved correctly - for example, webpack5 +// will end up resolving webpack-sources@1 instead of webpack-sources@2. +// If/when this issue is fixed upstream in Yarn, this "shadowing" workaround can +// then be removed to directly install the bundles/package.json packages into +// the main package.json as normal devDependencies aliases. +const m = new Module(resolve(__dirname, 'bundles', '_')) +m.filename = m.id +m.paths = Module._nodeModulePaths(m.id) +const bundleRequire = m.require +bundleRequire.resolve = (request, options) => + Module._resolveFilename(request, m, false, options) export async function next__polyfill_nomodule(task, opts) { await task @@ -23,20 +40,21 @@ const externals = { chalk: 'chalk', 'node-fetch': 'node-fetch', - // Webpack indirect and direct dependencies: - webpack: 'webpack', - 'webpack-sources': 'webpack-sources', - 'webpack/lib/node/NodeOutputFileSystem': - 'webpack/lib/node/NodeOutputFileSystem', - // dependents: terser-webpack-plugin - 'webpack/lib/cache/getLazyHashedEtag': 'webpack/lib/cache/getLazyHashedEtag', - 'webpack/lib/RequestShortener': 'webpack/lib/RequestShortener', + // webpack + 'node-libs-browser': 'node-libs-browser', + + // css-loader + // postcss: 'postcss', + + // sass-loader + // (also responsible for these dependencies in package.json) + 'node-sass': 'node-sass', + sass: 'sass', + fibers: 'fibers', + klona: 'klona', + chokidar: 'chokidar', - // dependents: thread-loader - 'loader-runner': 'loader-runner', - // dependents: thread-loader, babel-loader 'loader-utils': 'loader-utils', - // dependents: terser-webpack-plugin 'jest-worker': 'jest-worker', } // eslint-disable-next-line camelcase @@ -149,6 +167,13 @@ export async function ncc_ci_info(task, opts) { .ncc({ packageName: 'ci-info', externals }) .target('compiled/ci-info') } +externals['comment-json'] = 'next/dist/compiled/comment-json' +export async function ncc_comment_json(task, opts) { + await task + .source(opts.src || relative(__dirname, require.resolve('comment-json'))) + .ncc({ packageName: 'comment-json', externals }) + .target('compiled/comment-json') +} // eslint-disable-next-line camelcase externals['compression'] = 'next/dist/compiled/compression' export async function ncc_compression(task, opts) { @@ -404,6 +429,25 @@ export async function ncc_recast(task, opts) { .target('compiled/recast') } // eslint-disable-next-line camelcase +externals['sass-loader'] = 'next/dist/compiled/sass-loader' +export async function ncc_sass_loader(task, opts) { + await task + .source(opts.src || relative(__dirname, require.resolve('sass-loader'))) + .ncc({ + packageName: 'sass-loader', + customEmit(path, isRequire) { + if (isRequire && path === 'sass') return false + if (path.indexOf('node-sass') !== -1) + return `eval("require.resolve('node-sass')")` + }, + externals: { + ...externals, + 'schema-utils': 'next/dist/compiled/schema-utils3', + }, + }) + .target('compiled/sass-loader') +} +// eslint-disable-next-line camelcase externals['schema-utils'] = 'next/dist/compiled/schema-utils' export async function ncc_schema_utils(task, opts) { await task @@ -415,6 +459,26 @@ export async function ncc_schema_utils(task, opts) { .target('compiled/schema-utils') } // eslint-disable-next-line camelcase +externals['schema-utils3'] = 'next/dist/compiled/schema-utils3' +export async function ncc_schema_utils3(task, opts) { + await task + .source( + opts.src || relative(__dirname, bundleRequire.resolve('schema-utils3')) + ) + .ncc({ + packageName: 'schema-utils3', + externals, + }) + .target('compiled/schema-utils3') +} +externals['semver'] = 'next/dist/compiled/semver' +export async function ncc_semver(task, opts) { + await task + .source(opts.src || relative(__dirname, require.resolve('semver'))) + .ncc({ packageName: 'semver', externals }) + .target('compiled/semver') +} +// eslint-disable-next-line camelcase externals['send'] = 'next/dist/compiled/send' export async function ncc_send(task, opts) { await task @@ -488,21 +552,70 @@ export async function ncc_web_vitals(task, opts) { .ncc({ packageName: 'web-vitals', externals, target: 'es5' }) .target('compiled/web-vitals') } +// eslint-disable-next-line camelcase +externals['webpack-sources'] = 'next/dist/compiled/webpack-sources' +export async function ncc_webpack_sources(task, opts) { + await task + .source(opts.src || relative(__dirname, require.resolve('webpack-sources'))) + .ncc({ packageName: 'webpack-sources', externals, target: 'es5' }) + .target('compiled/webpack-sources') +} +// eslint-disable-next-line camelcase +externals['webpack-sources2'] = 'next/dist/compiled/webpack-sources2' +export async function ncc_webpack_sources2(task, opts) { + await task + .source( + opts.src || relative(__dirname, bundleRequire.resolve('webpack-sources2')) + ) + .ncc({ packageName: 'webpack-sources2', externals, target: 'es5' }) + .target('compiled/webpack-sources2') +} -externals['comment-json'] = 'next/dist/compiled/comment-json' -export async function ncc_comment_json(task, opts) { +// eslint-disable-next-line camelcase +export async function ncc_webpack_bundle4(task, opts) { await task - .source(opts.src || relative(__dirname, require.resolve('comment-json'))) - .ncc({ packageName: 'comment-json', externals }) - .target('compiled/comment-json') + .source(opts.src || 'bundles/webpack/bundle4.js') + .ncc({ + packageName: 'webpack', + bundleName: 'webpack', + externals, + minify: false, + target: 'es5', + }) + .target('compiled/webpack') } -externals['semver'] = 'next/dist/compiled/semver' -export async function ncc_semver(task, opts) { +// eslint-disable-next-line camelcase +export async function ncc_webpack_bundle5(task, opts) { await task - .source(opts.src || relative(__dirname, require.resolve('semver'))) - .ncc({ packageName: 'semver', externals }) - .target('compiled/semver') + .source(opts.src || 'bundles/webpack/bundle5.js') + .ncc({ + packageName: 'webpack5', + bundleName: 'webpack', + customEmit(path) { + if (path.endsWith('.runtime.js')) return `'./${basename(path)}'` + }, + externals: { + ...externals, + 'schema-utils': 'next/dist/compiled/schema-utils3', + 'webpack-sources': 'next/dist/compiled/webpack-sources2', + }, + minify: false, + target: 'es5', + }) + .target('compiled/webpack') +} + +const webpackBundlePackages = { + webpack: 'next/dist/compiled/webpack/webpack', +} + +Object.assign(externals, webpackBundlePackages) + +export async function ncc_webpack_bundle_packages(task, opts) { + await task + .source(opts.src || 'bundles/webpack/packages/*') + .target('compiled/webpack/') } externals['path-to-regexp'] = 'next/dist/compiled/path-to-regexp' @@ -536,6 +649,7 @@ export async function ncc(task) { 'ncc_cacache', 'ncc_cache_loader', 'ncc_ci_info', + 'ncc_comment_json', 'ncc_compression', 'ncc_conf', 'ncc_content_type', @@ -566,7 +680,10 @@ export async function ncc(task) { 'ncc_postcss_preset_env', 'ncc_postcss_scss', 'ncc_recast', + 'ncc_sass_loader', 'ncc_schema_utils', + 'ncc_schema_utils3', + 'ncc_semver', 'ncc_send', 'ncc_source_map', 'ncc_string_hash', @@ -576,8 +693,11 @@ export async function ncc(task) { 'ncc_thread_loader', 'ncc_unistore', 'ncc_web_vitals', - 'ncc_comment_json', - 'ncc_semver', + 'ncc_webpack_bundle4', + 'ncc_webpack_bundle5', + 'ncc_webpack_bundle_packages', + 'ncc_webpack_sources', + 'ncc_webpack_sources2', ]) } diff --git a/packages/next/types/misc.d.ts b/packages/next/types/misc.d.ts index afb31154d8125a6..c966709c45da797 100644 --- a/packages/next/types/misc.d.ts +++ b/packages/next/types/misc.d.ts @@ -8,9 +8,6 @@ declare module 'cssnano-simple' { export = cssnanoSimple } declare module 'styled-jsx/server' -declare module 'webpack/lib/GraphHelpers' -declare module 'webpack/lib/DynamicEntryPlugin' -declare module 'webpack/lib/Entrypoint' declare module 'next/dist/compiled/amphtml-validator' { import m from 'amphtml-validator' diff --git a/packages/next/types/webpack.d.ts b/packages/next/types/webpack.d.ts index eac5cc0ffbb5d87..945dc387000db9d 100644 --- a/packages/next/types/webpack.d.ts +++ b/packages/next/types/webpack.d.ts @@ -26,6 +26,18 @@ declare module 'mini-css-extract-plugin' declare module 'loader-utils' +declare module 'next/dist/compiled/webpack/webpack' { + import webpackSources from 'webpack-sources' + import webpack from 'webpack' + export let isWebpack5: boolean + export function init(useWebpack5: boolean): void + export let BasicEvaluatedExpression: any + export let GraphHelpers: any + export function onWebpackInit(cb: () => void): void + export let sources: typeof webpackSources + export { webpack } +} + declare module 'webpack' { import { RawSourceMap } from 'source-map' import { ConcatSource } from 'webpack-sources' diff --git a/packages/react-dev-overlay/src/middleware.ts b/packages/react-dev-overlay/src/middleware.ts index f2f7f5e3f9f30d8..baef529cb450dad 100644 --- a/packages/react-dev-overlay/src/middleware.ts +++ b/packages/react-dev-overlay/src/middleware.ts @@ -16,6 +16,7 @@ import { getRawSourceMap } from './internal/helpers/getRawSourceMap' import { launchEditor } from './internal/helpers/launchEditor' export type OverlayMiddlewareOptions = { + isWebpack5?: boolean rootDirectory: string stats(): webpack.Stats | null serverStats(): webpack.Stats | null @@ -28,9 +29,7 @@ export type OriginalStackFrameResponse = { type Source = { map: () => RawSourceMap } | null -const isWebpack5 = parseInt(webpack.version!) === 5 - -function getModuleId(compilation: any, module: any) { +function getModuleId(compilation: any, module: any, isWebpack5?: boolean) { if (isWebpack5) { return compilation.chunkGraph.getModuleId(module) } @@ -38,7 +37,11 @@ function getModuleId(compilation: any, module: any) { return module.id } -function getModuleSource(compilation: any, module: any): any { +function getModuleSource( + compilation: any, + module: any, + isWebpack5?: boolean +): any { if (isWebpack5) { return ( (module && @@ -208,9 +211,10 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) { } const module = [...compilation.modules].find( - (searchModule) => getModuleId(compilation, searchModule) === id + (searchModule) => + getModuleId(compilation, searchModule, options.isWebpack5) === id ) - return getModuleSource(compilation, module) + return getModuleSource(compilation, module, options.isWebpack5) } catch (err) { console.error(`Failed to lookup module by ID ("${id}"):`, err) return null diff --git a/packages/react-refresh-utils/ReactRefreshWebpackPlugin.ts b/packages/react-refresh-utils/ReactRefreshWebpackPlugin.ts index 4e01e25669ff4f2..1ef530236c58897 100644 --- a/packages/react-refresh-utils/ReactRefreshWebpackPlugin.ts +++ b/packages/react-refresh-utils/ReactRefreshWebpackPlugin.ts @@ -1,17 +1,20 @@ +// types only import import { - Compiler, - Template, + Compiler as WebpackCompiler, + Template as WebpackTemplate, // @ts-ignore exists in webpack 5 - RuntimeModule, + RuntimeModule as WebpackRuntimeModule, // @ts-ignore exists in webpack 5 - RuntimeGlobals, - version, + RuntimeGlobals as WebpackRuntimeGlobals, // @ts-ignore exists in webpack 5 - compilation as Compilation, + compilation as WebpackCompilation, } from 'webpack' // Shared between webpack 4 and 5: -function injectRefreshFunctions(compilation: Compilation.Compilation) { +function injectRefreshFunctions( + compilation: WebpackCompilation.Compilation, + Template: typeof WebpackTemplate +) { const hookVars: any = (compilation.mainTemplate.hooks as any).localVars hookVars.tap('ReactFreshWebpackPlugin', (source: string) => @@ -31,7 +34,8 @@ function injectRefreshFunctions(compilation: Compilation.Compilation) { ) } -function webpack4(compiler: Compiler) { +function webpack4(this: ReactFreshWebpackPlugin, compiler: WebpackCompiler) { + const { Template } = this // Webpack 4 does not have a method to handle interception of module // execution. // The closest thing we have to emulating this is mimicking the behavior of @@ -39,7 +43,7 @@ function webpack4(compiler: Compiler) { // https://github.com/webpack/webpack/blob/4c644bf1f7cb067c748a52614500e0e2182b2700/lib/MainTemplate.js#L200 compiler.hooks.compilation.tap('ReactFreshWebpackPlugin', (compilation) => { - injectRefreshFunctions(compilation) + injectRefreshFunctions(compilation, Template) const hookRequire: any = (compilation.mainTemplate.hooks as any).require @@ -85,7 +89,8 @@ function webpack4(compiler: Compiler) { }) } -function webpack5(compiler: Compiler) { +function webpack5(this: ReactFreshWebpackPlugin, compiler: WebpackCompiler) { + const { RuntimeGlobals, RuntimeModule, Template } = this class ReactRefreshRuntimeModule extends RuntimeModule { constructor() { super('react refresh', 5) @@ -133,7 +138,7 @@ function webpack5(compiler: Compiler) { // @ts-ignore webpack 5 types compat compiler.hooks.compilation.tap('ReactFreshWebpackPlugin', (compilation) => { - injectRefreshFunctions(compilation) + injectRefreshFunctions(compilation, Template) // @ts-ignore Exists in webpack 5 compilation.hooks.additionalTreeRuntimeRequirements.tap( @@ -147,21 +152,33 @@ function webpack5(compiler: Compiler) { } class ReactFreshWebpackPlugin { - apply(compiler: Compiler) { - const webpackMajorVersion = parseInt(version ?? '', 10) - - switch (webpackMajorVersion) { + webpackMajorVersion: number + // @ts-ignore exists in webpack 5 + RuntimeGlobals: typeof WebpackRuntimeGlobals + // @ts-ignore exists in webpack 5 + RuntimeModule: typeof WebpackRuntimeModule + Template: typeof WebpackTemplate + constructor( + { version, RuntimeGlobals, RuntimeModule, Template } = require('webpack') + ) { + this.webpackMajorVersion = parseInt(version ?? '', 10) + this.RuntimeGlobals = RuntimeGlobals + this.RuntimeModule = RuntimeModule + this.Template = Template + } + apply(compiler: WebpackCompiler) { + switch (this.webpackMajorVersion) { case 4: { - webpack4(compiler) + webpack4.call(this, compiler) break } case 5: { - webpack5(compiler) + webpack5.call(this, compiler) break } default: { throw new Error( - `ReactFreshWebpackPlugin does not support webpack v${webpackMajorVersion}.` + `ReactFreshWebpackPlugin does not support webpack v${this.webpackMajorVersion}.` ) } } diff --git a/test/integration/build-output/test/index.test.js b/test/integration/build-output/test/index.test.js index aee083a85e08cb1..501c6c75a07d3a3 100644 --- a/test/integration/build-output/test/index.test.js +++ b/test/integration/build-output/test/index.test.js @@ -164,11 +164,11 @@ describe('Build Output', () => { const indexSize = parsePageSize('/') const indexFirstLoad = parsePageFirstLoad('/') - expect(parseFloat(indexSize)).toBeLessThanOrEqual(3) + expect(parseFloat(indexSize)).toBeLessThanOrEqual(3.1) expect(parseFloat(indexSize)).toBeGreaterThanOrEqual(2) expect(indexSize.endsWith('kB')).toBe(true) - expect(parseFloat(indexFirstLoad)).toBeLessThanOrEqual(65) + expect(parseFloat(indexFirstLoad)).toBeLessThanOrEqual(65.2) expect(parseFloat(indexFirstLoad)).toBeGreaterThanOrEqual(60) expect(indexFirstLoad.endsWith('kB')).toBe(true) }) diff --git a/yarn.lock b/yarn.lock index dda54689a2d5a7b..51f7a47ce9500ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -958,6 +958,14 @@ pirates "^4.0.0" source-map-support "^0.5.16" +"@babel/runtime-corejs3@^7.12.1": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.12.5.tgz#ffee91da0eb4c6dae080774e94ba606368e414f4" + integrity sha512-roGr54CsTmNPPzZoCP1AmDXuBoNao7tnSA83TXTwt+UK5QVyh1DIJnrgYRPWKCF2flqZQXwa7Yr8v7VmLzF0YQ== + dependencies: + core-js-pure "^3.0.0" + regenerator-runtime "^0.13.4" + "@babel/runtime@7.12.5", "@babel/runtime@^7.12.5", "@babel/runtime@^7.8.4": version "7.12.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" @@ -3138,10 +3146,10 @@ resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.25.1.tgz#a4aacdb508ac496fc0c63a3c3203d700a619cc0e" integrity sha512-dGecC5+1wLof1MQpey4+6i2KZv4Sfs6WfXkl9KfO32GED4ZPiKxRfvtGPjbjZv0IbqMl6CxtcV1RotXYfd5SSA== -"@vercel/ncc@0.26.1": - version "0.26.1" - resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.26.1.tgz#457f13c8f207f5e74d19944b6797f4708c02359f" - integrity sha512-iVhYAL/rpHgjO88GkDHNVNrp7WTfMFBbeWXNgwaDPMv5rDI4hNOAM0u+Zhtbs42XBQE6EccNaY6UDb/tm1+dhg== +"@vercel/ncc@0.27.0": + version "0.27.0" + resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.27.0.tgz#c0cfeebb0bebb56052719efa4a0ecc090a932c76" + integrity sha512-DllIJQapnU2YwewIhh/4dYesmMQw3h2cFtabECc/zSJHqUbNa0eJuEkRa6DXbZvh1YPWBtYQoPV17NlDpBw1Vw== "@webassemblyjs/ast@1.9.0": version "1.9.0" @@ -4392,6 +4400,14 @@ cacheable-request@^7.0.1: normalize-url "^4.1.0" responselike "^2.0.0" +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -5214,6 +5230,11 @@ core-js-compat@^3.8.0: browserslist "^4.15.0" semver "7.0.0" +core-js-pure@^3.0.0: + version "3.8.2" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.8.2.tgz#286f885c0dac1cdcd6d78397392abc25ddeca225" + integrity sha512-v6zfIQqL/pzTVAbZvYUozsxNfxcFb6Ks3ZfEbuneJl3FW9Jb8F6vLWB6f+qTmAu72msUdyb84V8d/yBFf7FNnw== + core-js@3.6.5: version "3.6.5" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" @@ -6273,6 +6294,24 @@ es-abstract@^1.17.0, es-abstract@^1.17.0-next.1: string.prototype.trimleft "^2.1.1" string.prototype.trimright "^2.1.1" +es-abstract@^1.18.0-next.1: + version "1.18.0-next.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68" + integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.2.2" + is-negative-zero "^2.0.0" + is-regex "^1.1.1" + object-inspect "^1.8.0" + object-keys "^1.1.1" + object.assign "^4.1.1" + string.prototype.trimend "^1.0.1" + string.prototype.trimstart "^1.0.1" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -6393,9 +6432,10 @@ eslint-plugin-react-hooks@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.3.0.tgz#53e073961f1f5ccf8dd19558036c1fac8c29d99a" -eslint-plugin-react@7.18.0: - version "7.18.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.18.0.tgz#2317831284d005b30aff8afb7c4e906f13fa8e7e" +eslint-plugin-react@7.19.0: + version "7.19.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz#6d08f9673628aa69c5559d33489e855d83551666" + integrity sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ== dependencies: array-includes "^3.1.1" doctrine "^2.1.0" @@ -6405,7 +6445,10 @@ eslint-plugin-react@7.18.0: object.fromentries "^2.0.2" object.values "^1.1.1" prop-types "^15.7.2" - resolve "^1.14.2" + resolve "^1.15.1" + semver "^6.3.0" + string.prototype.matchall "^4.0.2" + xregexp "^4.3.0" eslint-scope@^4.0.3: version "4.0.3" @@ -7284,6 +7327,15 @@ get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" +get-intrinsic@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.2.tgz#6820da226e50b24894e08859469dc68361545d49" + integrity sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" @@ -8170,6 +8222,15 @@ inquirer@^6.2.0: strip-ansi "^5.1.0" through "^2.3.6" +internal-slot@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.2.tgz#9c2e9fb3cd8e5e4256c6f45fe310067fcfa378a3" + integrity sha512-2cQNfwhAfJIkU4KZPkDI+Gj5yNNnbqi40W9Gge6dfnk4TocEVm00B3bdiL+JINrbGJil2TeHvM4rETGzk/f/0g== + dependencies: + es-abstract "^1.17.0-next.1" + has "^1.0.3" + side-channel "^1.0.2" + invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -8261,6 +8322,11 @@ is-callable@^1.1.4, is-callable@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" +is-callable@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" + integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== + is-ci@^1.0.10: version "1.2.1" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" @@ -8436,6 +8502,11 @@ is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" +is-negative-zero@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" @@ -8519,6 +8590,13 @@ is-regex@^1.0.5: dependencies: has "^1.0.3" +is-regex@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" + integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== + dependencies: + has-symbols "^1.0.1" + is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" @@ -11193,6 +11271,11 @@ object-inspect@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" +object-inspect@^1.8.0, object-inspect@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" + integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== + object-is@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.2.tgz#6b80eb84fe451498f65007982f035a5b445edec4" @@ -11220,6 +11303,16 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" +object.assign@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + object.entries@^1.1.0, object.entries@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.1.tgz#ee1cf04153de02bb093fec33683900f57ce5399b" @@ -13371,6 +13464,14 @@ regex-parser@^2.2.11: resolved "https://registry.yarnpkg.com/regex-parser/-/regex-parser-2.2.11.tgz#3b37ec9049e19479806e878cabe7c1ca83ccfe58" integrity sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q== +regexp.prototype.flags@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" + integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" @@ -13655,7 +13756,7 @@ resolve@1.17.0: dependencies: path-parse "^1.0.6" -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0: +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== @@ -14211,6 +14312,15 @@ shimmer@^1.2.1: resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== +side-channel@^1.0.2, side-channel@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -14637,6 +14747,19 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string.prototype.matchall@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.3.tgz#24243399bc31b0a49d19e2b74171a15653ec996a" + integrity sha512-OBxYDA2ifZQ2e13cP82dWFMaCV9CGF8GzmN4fljBVw5O5wep0lu4gacm1OL6MjROoUnB8VbkWRThqkV2YFLNxw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + has-symbols "^1.0.1" + internal-slot "^1.0.2" + regexp.prototype.flags "^1.3.0" + side-channel "^1.0.3" + string.prototype.padend@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz#dc08f57a8010dc5c153550318f67e13adbb72ac3" @@ -14644,6 +14767,14 @@ string.prototype.padend@^3.0.0: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +string.prototype.trimend@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz#a22bd53cca5c7cf44d7c9d5c732118873d6cd18b" + integrity sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + string.prototype.trimleft@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" @@ -14658,6 +14789,14 @@ string.prototype.trimright@^2.1.1: define-properties "^1.1.3" function-bind "^1.1.1" +string.prototype.trimstart@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz#9b4cb590e123bb36564401d59824298de50fd5aa" + integrity sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -14946,7 +15085,16 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tar-fs@^2.0.0, tar-fs@^2.1.1: +tar-fs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.0.tgz#677700fc0c8b337a78bee3623fdc235f21d7afad" + dependencies: + chownr "^1.1.1" + mkdirp "^0.5.1" + pump "^3.0.0" + tar-stream "^2.0.0" + +tar-fs@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== @@ -14967,6 +15115,17 @@ tar-stream@2.1.3: inherits "^2.0.3" readable-stream "^3.1.1" +tar-stream@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + tar-stream@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.4.tgz#c4fb1a11eb0da29b893a5b25476397ba2d053bfa" @@ -16148,6 +16307,13 @@ xmlhttprequest@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" +xregexp@^4.3.0: + version "4.4.1" + resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.4.1.tgz#c84a88fa79e9ab18ca543959712094492185fe65" + integrity sha512-2u9HwfadaJaY9zHtRRnH6BY6CQVNQKkYm3oLtC9gJXXzfsbACg5X5e4EZZGVAH+YIfa+QA9lsFQTTe3HURF3ag== + dependencies: + "@babel/runtime-corejs3" "^7.12.1" + xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"